@fluidattacks/design 3.1.12 → 3.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/design.css +1 -0
- package/dist/components/@core/index.js +15 -16
- package/dist/components/accordion/accordion-content/index.js +3 -7
- package/dist/components/accordion/index.js +5 -19
- package/dist/components/alert/index.js +4 -111
- package/dist/components/button/index.js +4 -16
- package/dist/components/card/card-header/index.js +4 -12
- package/dist/components/card/card-with-image/index.js +5 -16
- package/dist/components/card/card-with-input/index.js +5 -54
- package/dist/components/card/card-with-selector/index.js +4 -14
- package/dist/components/card/card-with-switch/index.js +4 -10
- package/dist/components/card/index.js +6 -10
- package/dist/components/carousel/index.js +4 -47
- package/dist/components/checkbox/index.js +4 -82
- package/dist/components/cloud-image/index.js +2 -2
- package/dist/components/code-snippet/index.js +6 -25
- package/dist/components/code-snippet/location-code/index.js +7 -123
- package/dist/components/colors/index.js +7 -7
- package/dist/components/confirm-dialog/index.js +4 -20
- package/dist/components/container/index.js +4 -25
- package/dist/components/content-card/category-tag/index.js +4 -11
- package/dist/components/content-card/event-date/index.js +5 -16
- package/dist/components/content-card/index.js +4 -61
- package/dist/components/content-card-carousel/index.js +4 -13
- package/dist/components/content-card-carousel/scroll-buttons/index.js +2 -4
- package/dist/components/divider/index.js +4 -8
- package/dist/components/empty-state/empty-button/index.js +3 -4
- package/dist/components/empty-state/index.js +3 -46
- package/dist/components/file-preview/index.js +3 -26
- package/dist/components/form/index.js +4 -24
- package/dist/components/grid-container/index.js +4 -26
- package/dist/components/group-selector/index.js +6 -24
- package/dist/components/group-selector/option-container/index.js +3 -7
- package/dist/components/icon/index.js +4 -46
- package/dist/components/icon-button/index.js +4 -25
- package/dist/components/indicator-card/index.js +5 -13
- package/dist/components/info-sidebar/index.js +4 -14
- package/dist/components/inputs/fields/combobox/index.js +7 -24
- package/dist/components/inputs/fields/combobox/option/index.js +2 -3
- package/dist/components/inputs/fields/date/calendar/cell/index.js +7 -14
- package/dist/components/inputs/fields/date/calendar/grid/index.js +5 -13
- package/dist/components/inputs/fields/date/calendar/header/index.js +4 -14
- package/dist/components/inputs/fields/date/calendar/index.js +6 -13
- package/dist/components/inputs/fields/date/index.js +8 -16
- package/dist/components/inputs/fields/date-range/calendar/index.js +7 -14
- package/dist/components/inputs/fields/date-range/index.js +6 -26
- package/dist/components/inputs/fields/date-time/calendar/index.js +7 -33
- package/dist/components/inputs/fields/date-time/index.js +6 -16
- package/dist/components/inputs/fields/editable/index.js +4 -14
- package/dist/components/inputs/fields/input/index.js +5 -11
- package/dist/components/inputs/fields/input-file/index.js +6 -30
- package/dist/components/inputs/fields/input-tags/index.js +4 -17
- package/dist/components/inputs/fields/number/index.js +4 -8
- package/dist/components/inputs/fields/number-range/index.js +4 -9
- package/dist/components/inputs/fields/phone/index.js +7 -417
- package/dist/components/inputs/fields/text-area/index.js +5 -11
- package/dist/components/inputs/index.js +14 -26
- package/dist/components/inputs/label/index.js +5 -10
- package/dist/components/inputs/outline-container/index.js +4 -16
- package/dist/components/inputs/utils/action-button/index.js +4 -8
- package/dist/components/inputs/utils/calendar-button/index.js +5 -11
- package/dist/components/inputs/utils/date-selector/index.js +3 -6
- package/dist/components/inputs/utils/date-time-field/index.js +10 -30
- package/dist/components/inputs/utils/dialog/index.js +5 -9
- package/dist/components/inputs/utils/number-field/index.js +5 -11
- package/dist/components/inputs/utils/popover/index.js +5 -11
- package/dist/components/interactive-card/icon/index.js +2 -4
- package/dist/components/interactive-card/index.js +4 -13
- package/dist/components/language-selector/index.js +4 -11
- package/dist/components/language-selector/item-list/index.js +2 -5
- package/dist/components/link/index.js +3 -50
- package/dist/components/list-item/index.js +6 -14
- package/dist/components/little-flag/index.js +3 -13
- package/dist/components/loading/index.js +4 -65
- package/dist/components/logo/index.js +3 -5
- package/dist/components/logo-carousel/index.js +4 -50
- package/dist/components/lottie/index.js +3 -13
- package/dist/components/menu/index.js +5 -20
- package/dist/components/message-banner/index.js +5 -33
- package/dist/components/modal/index.js +6 -17
- package/dist/components/modal/modal-confirm/index.js +3 -8
- package/dist/components/modal/modal-footer/index.js +5 -14
- package/dist/components/modal/modal-header/index.js +6 -23
- package/dist/components/notification/index.js +5 -66
- package/dist/components/notification-sign/index.js +4 -28
- package/dist/components/number-input/index.js +5 -50
- package/dist/components/oauth-selector/index.js +6 -24
- package/dist/components/oauth-selector/option-container/index.js +4 -13
- package/dist/components/plan-card/index.js +3 -82
- package/dist/components/plan-card/recommended-tag/index.js +3 -8
- package/dist/components/pop-up/description/index.js +5 -11
- package/dist/components/pop-up/index.js +7 -21
- package/dist/components/premium-feature/index.js +4 -43
- package/dist/components/priority-score/index.js +4 -12
- package/dist/components/progress/index.js +5 -32
- package/dist/components/progress-bar/index.js +3 -93
- package/dist/components/radio-button/index.js +4 -86
- package/dist/components/scroll-button/index.js +4 -22
- package/dist/components/search/index.js +7 -61
- package/dist/components/search-bar/index.js +4 -30
- package/dist/components/search-bar/item-searching/index.js +2 -7
- package/dist/components/severity-badge/index.js +4 -12
- package/dist/components/severity-overview/badge/index.js +4 -16
- package/dist/components/severity-overview/index.js +3 -5
- package/dist/components/show-on-hover/index.js +3 -23
- package/dist/components/slide-out-menu/index.js +6 -2006
- package/dist/components/slide-out-menu/menu-item/index.js +4 -13
- package/dist/components/slider/index.js +7 -91
- package/dist/components/slider/thumb/index.js +5 -8
- package/dist/components/step-lapse/index.js +4 -99
- package/dist/components/table-button/index.js +4 -54
- package/dist/components/tabs/fixed-tabs/index.js +3 -7
- package/dist/components/tabs/index.js +6 -12
- package/dist/components/tabs/tab/index.js +3 -6
- package/dist/components/tag/index.js +4 -114
- package/dist/components/timeline/card/index.js +2 -5
- package/dist/components/timeline/index.js +4 -5
- package/dist/components/toggle/index.js +4 -61
- package/dist/components/toggle-buttons/index.js +4 -72
- package/dist/components/tooltip/index.js +3 -6
- package/dist/components/tour/index.js +7 -2514
- package/dist/components/typography/heading/index.js +4 -7
- package/dist/components/typography/index.js +4 -6
- package/dist/components/typography/span/index.js +4 -7
- package/dist/components/typography/text/index.js +4 -7
- package/dist/components/web-form/index.js +4 -69
- package/dist/components-C2JBXbtI.mjs +9653 -0
- package/dist/hooks/index.js +6 -10
- package/dist/index.js +113 -205
- package/dist/vendor-CVMqCpkZ.mjs +14504 -0
- package/package.json +2 -3
- package/dist/_commonjsHelpers-C6fGbg64.mjs +0 -6
- package/dist/assets/index.css +0 -1
- package/dist/assets/index2.css +0 -1
- package/dist/index-38JqtnAI.mjs +0 -122
- package/dist/index-B5yoGFs6.mjs +0 -54
- package/dist/index-BLbKylyw.mjs +0 -209
- package/dist/index-Bu448Tz2.mjs +0 -106
- package/dist/index-BwFnfaRh.mjs +0 -2310
- package/dist/index-Co_k0WFk.mjs +0 -75
- package/dist/index-Cu7uUMlx.mjs +0 -82
- package/dist/index-D-lcuEHY.mjs +0 -1018
- package/dist/index-DrfjITyT.mjs +0 -61
- package/dist/styles-7_q7nHce.mjs +0 -110
- package/dist/styles-BA0WIQL-.mjs +0 -74
- package/dist/styles-C3cZmKVJ.mjs +0 -131
- package/dist/styles-CI-I6joH.mjs +0 -144
- package/dist/styles-Cx93EcVo.mjs +0 -76
- package/dist/styles-D85YYIjM.mjs +0 -131
- package/dist/styles-EIbGRPlk.mjs +0 -106
- package/dist/styles-Q1VXuWI7.mjs +0 -65
- package/dist/styles-fH2c4cfc.mjs +0 -77
- package/dist/styles-lSVV9kjn.mjs +0 -133
- package/dist/use-carousel-CvRxi2FI.mjs +0 -17
- package/dist/use-click-outside-BtZLIoU1.mjs +0 -18
- package/dist/use-cloudinary-image-fG7ODNgr.mjs +0 -611
- package/dist/use-modal-CkrZ-_-M.mjs +0 -14
- package/dist/use-search-DpLNvt7Q.mjs +0 -12
- package/dist/utils-CQvBF-wY.mjs +0 -4
|
@@ -1,2009 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import { Button as Pt } from "../button/index.js";
|
|
6
|
-
import { Container as z } from "../container/index.js";
|
|
7
|
-
import { IconButton as Es } from "../icon-button/index.js";
|
|
8
|
-
import "../typography/heading/index.js";
|
|
9
|
-
import "../typography/span/index.js";
|
|
10
|
-
import { Text as Fs } from "../typography/text/index.js";
|
|
11
|
-
import { u as Os } from "../../use-click-outside-BtZLIoU1.mjs";
|
|
1
|
+
import "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import "styled-components";
|
|
4
|
+
import { av as a } from "../../components-C2JBXbtI.mjs";
|
|
12
5
|
import "lodash";
|
|
13
|
-
|
|
14
|
-
function we(t, e, n) {
|
|
15
|
-
t || kt.has(e) || (console.warn(e), kt.add(e));
|
|
16
|
-
}
|
|
17
|
-
function Is(t) {
|
|
18
|
-
if (typeof Proxy > "u") return t;
|
|
19
|
-
const e = /* @__PURE__ */ new Map();
|
|
20
|
-
return new Proxy((...n) => (process.env.NODE_ENV !== "production" && we(!1, "motion() is deprecated. Use motion.create() instead."), t(...n)), { get: (n, s) => s === "create" ? t : (e.has(s) || e.set(s, t(s)), e.get(s)) });
|
|
21
|
-
}
|
|
22
|
-
function Ce(t) {
|
|
23
|
-
return t !== null && typeof t == "object" && typeof t.start == "function";
|
|
24
|
-
}
|
|
25
|
-
const Ue = (t) => Array.isArray(t);
|
|
26
|
-
function gn(t, e) {
|
|
27
|
-
if (!Array.isArray(e)) return !1;
|
|
28
|
-
const n = e.length;
|
|
29
|
-
if (n !== t.length) return !1;
|
|
30
|
-
for (let s = 0; s < n; s++) if (e[s] !== t[s]) return !1;
|
|
31
|
-
return !0;
|
|
32
|
-
}
|
|
33
|
-
function le(t) {
|
|
34
|
-
return typeof t == "string" || Array.isArray(t);
|
|
35
|
-
}
|
|
36
|
-
function Et(t) {
|
|
37
|
-
const e = [{}, {}];
|
|
38
|
-
return t == null || t.values.forEach((n, s) => {
|
|
39
|
-
e[0][s] = n.get(), e[1][s] = n.getVelocity();
|
|
40
|
-
}), e;
|
|
41
|
-
}
|
|
42
|
-
function it(t, e, n, s) {
|
|
43
|
-
if (typeof e == "function") {
|
|
44
|
-
const [i, r] = Et(s);
|
|
45
|
-
e = e(n !== void 0 ? n : t.custom, i, r);
|
|
46
|
-
}
|
|
47
|
-
if (typeof e == "string" && (e = t.variants && t.variants[e]), typeof e == "function") {
|
|
48
|
-
const [i, r] = Et(s);
|
|
49
|
-
e = e(n !== void 0 ? n : t.custom, i, r);
|
|
50
|
-
}
|
|
51
|
-
return e;
|
|
52
|
-
}
|
|
53
|
-
function Me(t, e, n) {
|
|
54
|
-
const s = t.getProps();
|
|
55
|
-
return it(s, e, n !== void 0 ? n : s.custom, t);
|
|
56
|
-
}
|
|
57
|
-
const rt = ["animate", "whileInView", "whileFocus", "whileHover", "whileTap", "whileDrag", "exit"], ot = ["initial", ...rt], he = ["transformPerspective", "x", "y", "z", "translateX", "translateY", "translateZ", "scale", "scaleX", "scaleY", "rotate", "rotateX", "rotateY", "rotateZ", "skew", "skewX", "skewY"], q = new Set(he), R = (t) => 1e3 * t, N = (t) => t / 1e3, Rs = { type: "spring", stiffness: 500, damping: 25, restSpeed: 10 }, Ds = { type: "keyframes", duration: 0.8 }, Bs = { type: "keyframes", ease: [0.25, 0.1, 0.35, 1], duration: 0.3 }, Ns = (t, { keyframes: e }) => e.length > 2 ? Ds : q.has(t) ? t.startsWith("scale") ? { type: "spring", stiffness: 550, damping: e[1] === 0 ? 2 * Math.sqrt(550) : 30, restSpeed: 10 } : Rs : Bs;
|
|
58
|
-
function yn(t, e) {
|
|
59
|
-
return t ? t[e] || t.default || t : void 0;
|
|
60
|
-
}
|
|
61
|
-
const Ls = !1, $s = (t) => t !== null;
|
|
62
|
-
function Pe(t, { repeat: e, repeatType: n = "loop" }, s) {
|
|
63
|
-
const i = t.filter($s), r = e && n !== "loop" && e % 2 == 1 ? 0 : i.length - 1;
|
|
64
|
-
return r && s !== void 0 ? s : i[r];
|
|
65
|
-
}
|
|
66
|
-
const $ = (t) => t;
|
|
67
|
-
let te = $, U = $;
|
|
68
|
-
process.env.NODE_ENV !== "production" && (te = (t, e) => {
|
|
69
|
-
t || typeof console > "u" || console.warn(e);
|
|
70
|
-
}, U = (t, e) => {
|
|
71
|
-
if (!t) throw new Error(e);
|
|
72
|
-
});
|
|
73
|
-
const me = ["read", "resolveKeyframes", "update", "preRender", "render", "postRender"];
|
|
74
|
-
function wn(t, e) {
|
|
75
|
-
let n = !1, s = !0;
|
|
76
|
-
const i = { delta: 0, timestamp: 0, isProcessing: !1 }, r = () => n = !0, o = me.reduce((v, p) => (v[p] = /* @__PURE__ */ function(g) {
|
|
77
|
-
let m = /* @__PURE__ */ new Set(), S = /* @__PURE__ */ new Set(), x = !1, C = !1;
|
|
78
|
-
const y = /* @__PURE__ */ new WeakSet();
|
|
79
|
-
let w = { delta: 0, timestamp: 0, isProcessing: !1 };
|
|
80
|
-
function T(V) {
|
|
81
|
-
y.has(V) && (A.schedule(V), g()), V(w);
|
|
82
|
-
}
|
|
83
|
-
const A = { schedule: (V, M = !1, Ie = !1) => {
|
|
84
|
-
const ie = Ie && x ? m : S;
|
|
85
|
-
return M && y.add(V), ie.has(V) || ie.add(V), V;
|
|
86
|
-
}, cancel: (V) => {
|
|
87
|
-
S.delete(V), y.delete(V);
|
|
88
|
-
}, process: (V) => {
|
|
89
|
-
w = V, x ? C = !0 : (x = !0, [m, S] = [S, m], m.forEach(T), m.clear(), x = !1, C && (C = !1, A.process(V)));
|
|
90
|
-
} };
|
|
91
|
-
return A;
|
|
92
|
-
}(r), v), {}), { read: a, resolveKeyframes: l, update: c, preRender: u, render: h, postRender: d } = o, f = () => {
|
|
93
|
-
const v = performance.now();
|
|
94
|
-
n = !1, i.delta = s ? 1e3 / 60 : Math.max(Math.min(v - i.timestamp, 40), 1), i.timestamp = v, i.isProcessing = !0, a.process(i), l.process(i), c.process(i), u.process(i), h.process(i), d.process(i), i.isProcessing = !1, n && e && (s = !1, t(f));
|
|
95
|
-
};
|
|
96
|
-
return { schedule: me.reduce((v, p) => {
|
|
97
|
-
const g = o[p];
|
|
98
|
-
return v[p] = (m, S = !1, x = !1) => (n || (n = !0, s = !0, i.isProcessing || t(f)), g.schedule(m, S, x)), v;
|
|
99
|
-
}, {}), cancel: (v) => {
|
|
100
|
-
for (let p = 0; p < me.length; p++) o[me[p]].cancel(v);
|
|
101
|
-
}, state: i, steps: o };
|
|
102
|
-
}
|
|
103
|
-
const { schedule: F, cancel: Ye, state: be, steps: Qr } = wn(typeof requestAnimationFrame < "u" ? requestAnimationFrame : $, !0), Ft = (t, e, n) => (((1 - 3 * n + 3 * e) * t + (3 * n - 6 * e)) * t + 3 * e) * t;
|
|
104
|
-
function de(t, e, n, s) {
|
|
105
|
-
if (t === e && n === s) return $;
|
|
106
|
-
const i = (r) => function(o, a, l, c, u) {
|
|
107
|
-
let h, d, f = 0;
|
|
108
|
-
do
|
|
109
|
-
d = a + (l - a) / 2, h = Ft(d, c, u) - o, h > 0 ? l = d : a = d;
|
|
110
|
-
while (Math.abs(h) > 1e-7 && ++f < 12);
|
|
111
|
-
return d;
|
|
112
|
-
}(r, 0, 1, t, n);
|
|
113
|
-
return (r) => r === 0 || r === 1 ? r : Ft(i(r), e, s);
|
|
114
|
-
}
|
|
115
|
-
const bn = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, Sn = (t) => (e) => 1 - t(1 - e), Tn = de(0.33, 1.53, 0.69, 0.99), at = Sn(Tn), xn = bn(at), An = (t) => (t *= 2) < 1 ? 0.5 * at(t) : 0.5 * (2 - Math.pow(2, -10 * (t - 1))), lt = (t) => 1 - Math.sin(Math.acos(t)), js = Sn(lt), Vn = bn(lt), Cn = (t) => /^0[^.\s]+$/u.test(t), Mn = (t) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t), Pn = (t) => (e) => typeof e == "string" && e.startsWith(t), kn = Pn("--"), Ks = Pn("var(--"), ut = (t) => !!Ks(t) && Ws.test(t.split("/*")[0].trim()), Ws = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu, Us = /^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;
|
|
116
|
-
function En(t, e, n = 1) {
|
|
117
|
-
U(n <= 4, `Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);
|
|
118
|
-
const [s, i] = function(o) {
|
|
119
|
-
const a = Us.exec(o);
|
|
120
|
-
if (!a) return [,];
|
|
121
|
-
const [, l, c, u] = a;
|
|
122
|
-
return [`--${l ?? c}`, u];
|
|
123
|
-
}(t);
|
|
124
|
-
if (!s) return;
|
|
125
|
-
const r = window.getComputedStyle(e).getPropertyValue(s);
|
|
126
|
-
if (r) {
|
|
127
|
-
const o = r.trim();
|
|
128
|
-
return Mn(o) ? parseFloat(o) : o;
|
|
129
|
-
}
|
|
130
|
-
return ut(i) ? En(i, e, n + 1) : i;
|
|
131
|
-
}
|
|
132
|
-
const Y = (t, e, n) => n > e ? e : n < t ? t : n, ne = { test: (t) => typeof t == "number", parse: parseFloat, transform: (t) => t }, ue = { ...ne, transform: (t) => Y(0, 1, t) }, fe = { ...ne, default: 1 }, pe = (t) => ({ test: (e) => typeof e == "string" && e.endsWith(t) && e.split(" ").length === 1, parse: parseFloat, transform: (e) => `${e}${t}` }), B = pe("deg"), J = pe("%"), b = pe("px"), Ys = pe("vh"), qs = pe("vw"), Ot = { ...J, parse: (t) => J.parse(t) / 100, transform: (t) => J.transform(100 * t) }, zs = /* @__PURE__ */ new Set(["width", "height", "top", "left", "right", "bottom", "x", "y", "translateX", "translateY"]), It = (t) => t === ne || t === b, Rt = (t, e) => parseFloat(t.split(", ")[e]), Dt = (t, e) => (n, { transform: s }) => {
|
|
133
|
-
if (s === "none" || !s) return 0;
|
|
134
|
-
const i = s.match(/^matrix3d\((.+)\)$/u);
|
|
135
|
-
if (i) return Rt(i[1], e);
|
|
136
|
-
{
|
|
137
|
-
const r = s.match(/^matrix\((.+)\)$/u);
|
|
138
|
-
return r ? Rt(r[1], t) : 0;
|
|
139
|
-
}
|
|
140
|
-
}, Hs = /* @__PURE__ */ new Set(["x", "y", "z"]), Xs = he.filter((t) => !Hs.has(t)), X = { width: ({ x: t }, { paddingLeft: e = "0", paddingRight: n = "0" }) => t.max - t.min - parseFloat(e) - parseFloat(n), height: ({ y: t }, { paddingTop: e = "0", paddingBottom: n = "0" }) => t.max - t.min - parseFloat(e) - parseFloat(n), top: (t, { top: e }) => parseFloat(e), left: (t, { left: e }) => parseFloat(e), bottom: ({ y: t }, { top: e }) => parseFloat(e) + (t.max - t.min), right: ({ x: t }, { left: e }) => parseFloat(e) + (t.max - t.min), x: Dt(4, 13), y: Dt(5, 14) };
|
|
141
|
-
X.translateX = X.x, X.translateY = X.y;
|
|
142
|
-
const Fn = (t) => (e) => e.test(t), On = [ne, b, J, B, qs, Ys, { test: (t) => t === "auto", parse: (t) => t }], Bt = (t) => On.find(Fn(t)), W = /* @__PURE__ */ new Set();
|
|
143
|
-
let qe = !1, ze = !1;
|
|
144
|
-
function In() {
|
|
145
|
-
if (ze) {
|
|
146
|
-
const t = Array.from(W).filter((s) => s.needsMeasurement), e = new Set(t.map((s) => s.element)), n = /* @__PURE__ */ new Map();
|
|
147
|
-
e.forEach((s) => {
|
|
148
|
-
const i = function(r) {
|
|
149
|
-
const o = [];
|
|
150
|
-
return Xs.forEach((a) => {
|
|
151
|
-
const l = r.getValue(a);
|
|
152
|
-
l !== void 0 && (o.push([a, l.get()]), l.set(a.startsWith("scale") ? 1 : 0));
|
|
153
|
-
}), o;
|
|
154
|
-
}(s);
|
|
155
|
-
i.length && (n.set(s, i), s.render());
|
|
156
|
-
}), t.forEach((s) => s.measureInitialState()), e.forEach((s) => {
|
|
157
|
-
s.render();
|
|
158
|
-
const i = n.get(s);
|
|
159
|
-
i && i.forEach(([r, o]) => {
|
|
160
|
-
var a;
|
|
161
|
-
(a = s.getValue(r)) === null || a === void 0 || a.set(o);
|
|
162
|
-
});
|
|
163
|
-
}), t.forEach((s) => s.measureEndState()), t.forEach((s) => {
|
|
164
|
-
s.suspendedScrollY !== void 0 && window.scrollTo(0, s.suspendedScrollY);
|
|
165
|
-
});
|
|
166
|
-
}
|
|
167
|
-
ze = !1, qe = !1, W.forEach((t) => t.complete()), W.clear();
|
|
168
|
-
}
|
|
169
|
-
function Rn() {
|
|
170
|
-
W.forEach((t) => {
|
|
171
|
-
t.readKeyframes(), t.needsMeasurement && (ze = !0);
|
|
172
|
-
});
|
|
173
|
-
}
|
|
174
|
-
class ct {
|
|
175
|
-
constructor(e, n, s, i, r, o = !1) {
|
|
176
|
-
this.isComplete = !1, this.isAsync = !1, this.needsMeasurement = !1, this.isScheduled = !1, this.unresolvedKeyframes = [...e], this.onComplete = n, this.name = s, this.motionValue = i, this.element = r, this.isAsync = o;
|
|
177
|
-
}
|
|
178
|
-
scheduleResolve() {
|
|
179
|
-
this.isScheduled = !0, this.isAsync ? (W.add(this), qe || (qe = !0, F.read(Rn), F.resolveKeyframes(In))) : (this.readKeyframes(), this.complete());
|
|
180
|
-
}
|
|
181
|
-
readKeyframes() {
|
|
182
|
-
const { unresolvedKeyframes: e, name: n, element: s, motionValue: i } = this;
|
|
183
|
-
for (let r = 0; r < e.length; r++) if (e[r] === null) if (r === 0) {
|
|
184
|
-
const o = i == null ? void 0 : i.get(), a = e[e.length - 1];
|
|
185
|
-
if (o !== void 0) e[0] = o;
|
|
186
|
-
else if (s && n) {
|
|
187
|
-
const l = s.readValue(n, a);
|
|
188
|
-
l != null && (e[0] = l);
|
|
189
|
-
}
|
|
190
|
-
e[0] === void 0 && (e[0] = a), i && o === void 0 && i.set(e[0]);
|
|
191
|
-
} else e[r] = e[r - 1];
|
|
192
|
-
}
|
|
193
|
-
setFinalKeyframe() {
|
|
194
|
-
}
|
|
195
|
-
measureInitialState() {
|
|
196
|
-
}
|
|
197
|
-
renderEndStyles() {
|
|
198
|
-
}
|
|
199
|
-
measureEndState() {
|
|
200
|
-
}
|
|
201
|
-
complete() {
|
|
202
|
-
this.isComplete = !0, this.onComplete(this.unresolvedKeyframes, this.finalKeyframe), W.delete(this);
|
|
203
|
-
}
|
|
204
|
-
cancel() {
|
|
205
|
-
this.isComplete || (this.isScheduled = !1, W.delete(this));
|
|
206
|
-
}
|
|
207
|
-
resume() {
|
|
208
|
-
this.isComplete || this.scheduleResolve();
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
const ae = (t) => Math.round(1e5 * t) / 1e5, ht = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu, _s = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, dt = (t, e) => (n) => !!(typeof n == "string" && _s.test(n) && n.startsWith(t) || e && !function(s) {
|
|
212
|
-
return s == null;
|
|
213
|
-
}(n) && Object.prototype.hasOwnProperty.call(n, e)), Dn = (t, e, n) => (s) => {
|
|
214
|
-
if (typeof s != "string") return s;
|
|
215
|
-
const [i, r, o, a] = s.match(ht);
|
|
216
|
-
return { [t]: parseFloat(i), [e]: parseFloat(r), [n]: parseFloat(o), alpha: a !== void 0 ? parseFloat(a) : 1 };
|
|
217
|
-
}, De = { ...ne, transform: (t) => Math.round(((e) => Y(0, 255, e))(t)) }, K = { test: dt("rgb", "red"), parse: Dn("red", "green", "blue"), transform: ({ red: t, green: e, blue: n, alpha: s = 1 }) => "rgba(" + De.transform(t) + ", " + De.transform(e) + ", " + De.transform(n) + ", " + ae(ue.transform(s)) + ")" }, He = { test: dt("#"), parse: function(t) {
|
|
218
|
-
let e = "", n = "", s = "", i = "";
|
|
219
|
-
return t.length > 5 ? (e = t.substring(1, 3), n = t.substring(3, 5), s = t.substring(5, 7), i = t.substring(7, 9)) : (e = t.substring(1, 2), n = t.substring(2, 3), s = t.substring(3, 4), i = t.substring(4, 5), e += e, n += n, s += s, i += i), { red: parseInt(e, 16), green: parseInt(n, 16), blue: parseInt(s, 16), alpha: i ? parseInt(i, 16) / 255 : 1 };
|
|
220
|
-
}, transform: K.transform }, _ = { test: dt("hsl", "hue"), parse: Dn("hue", "saturation", "lightness"), transform: ({ hue: t, saturation: e, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(t) + ", " + J.transform(ae(e)) + ", " + J.transform(ae(n)) + ", " + ae(ue.transform(s)) + ")" }, P = { test: (t) => K.test(t) || He.test(t) || _.test(t), parse: (t) => K.test(t) ? K.parse(t) : _.test(t) ? _.parse(t) : He.parse(t), transform: (t) => typeof t == "string" ? t : t.hasOwnProperty("red") ? K.transform(t) : _.transform(t) }, Gs = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu, Bn = "number", Nn = "color", Zs = /var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;
|
|
221
|
-
function ce(t) {
|
|
222
|
-
const e = t.toString(), n = [], s = { color: [], number: [], var: [] }, i = [];
|
|
223
|
-
let r = 0;
|
|
224
|
-
const o = e.replace(Zs, (a) => (P.test(a) ? (s.color.push(r), i.push(Nn), n.push(P.parse(a))) : a.startsWith("var(") ? (s.var.push(r), i.push("var"), n.push(a)) : (s.number.push(r), i.push(Bn), n.push(parseFloat(a))), ++r, "${}")).split("${}");
|
|
225
|
-
return { values: n, split: o, indexes: s, types: i };
|
|
226
|
-
}
|
|
227
|
-
function Nt(t) {
|
|
228
|
-
return ce(t).values;
|
|
229
|
-
}
|
|
230
|
-
function Lt(t) {
|
|
231
|
-
const { split: e, types: n } = ce(t), s = e.length;
|
|
232
|
-
return (i) => {
|
|
233
|
-
let r = "";
|
|
234
|
-
for (let o = 0; o < s; o++) if (r += e[o], i[o] !== void 0) {
|
|
235
|
-
const a = n[o];
|
|
236
|
-
r += a === Bn ? ae(i[o]) : a === Nn ? P.transform(i[o]) : i[o];
|
|
237
|
-
}
|
|
238
|
-
return r;
|
|
239
|
-
};
|
|
240
|
-
}
|
|
241
|
-
const Js = (t) => typeof t == "number" ? 0 : t, se = { test: function(t) {
|
|
242
|
-
var e, n;
|
|
243
|
-
return isNaN(t) && typeof t == "string" && (((e = t.match(ht)) === null || e === void 0 ? void 0 : e.length) || 0) + (((n = t.match(Gs)) === null || n === void 0 ? void 0 : n.length) || 0) > 0;
|
|
244
|
-
}, parse: Nt, createTransformer: Lt, getAnimatableNone: function(t) {
|
|
245
|
-
const e = Nt(t);
|
|
246
|
-
return Lt(t)(e.map(Js));
|
|
247
|
-
} }, Qs = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
|
|
248
|
-
function ei(t) {
|
|
249
|
-
const [e, n] = t.slice(0, -1).split("(");
|
|
250
|
-
if (e === "drop-shadow") return t;
|
|
251
|
-
const [s] = n.match(ht) || [];
|
|
252
|
-
if (!s) return t;
|
|
253
|
-
const i = n.replace(s, "");
|
|
254
|
-
let r = Qs.has(e) ? 1 : 0;
|
|
255
|
-
return s !== n && (r *= 100), e + "(" + r + i + ")";
|
|
256
|
-
}
|
|
257
|
-
const ti = /\b([a-z-]*)\(.*?\)/gu, Xe = { ...se, getAnimatableNone: (t) => {
|
|
258
|
-
const e = t.match(ti);
|
|
259
|
-
return e ? e.map(ei).join(" ") : t;
|
|
260
|
-
} }, ni = { borderWidth: b, borderTopWidth: b, borderRightWidth: b, borderBottomWidth: b, borderLeftWidth: b, borderRadius: b, radius: b, borderTopLeftRadius: b, borderTopRightRadius: b, borderBottomRightRadius: b, borderBottomLeftRadius: b, width: b, maxWidth: b, height: b, maxHeight: b, top: b, right: b, bottom: b, left: b, padding: b, paddingTop: b, paddingRight: b, paddingBottom: b, paddingLeft: b, margin: b, marginTop: b, marginRight: b, marginBottom: b, marginLeft: b, backgroundPositionX: b, backgroundPositionY: b }, si = { rotate: B, rotateX: B, rotateY: B, rotateZ: B, scale: fe, scaleX: fe, scaleY: fe, scaleZ: fe, skew: B, skewX: B, skewY: B, distance: b, translateX: b, translateY: b, translateZ: b, x: b, y: b, z: b, perspective: b, transformPerspective: b, opacity: ue, originX: Ot, originY: Ot, originZ: b }, $t = { ...ne, transform: Math.round }, _e = { ...ni, ...si, zIndex: $t, size: b, fillOpacity: ue, strokeOpacity: ue, numOctaves: $t }, ii = { ..._e, color: P, backgroundColor: P, outlineColor: P, fill: P, stroke: P, borderColor: P, borderTopColor: P, borderRightColor: P, borderBottomColor: P, borderLeftColor: P, filter: Xe, WebkitFilter: Xe }, pt = (t) => ii[t];
|
|
261
|
-
function Ln(t, e) {
|
|
262
|
-
let n = pt(t);
|
|
263
|
-
return n !== Xe && (n = se), n.getAnimatableNone ? n.getAnimatableNone(e) : void 0;
|
|
264
|
-
}
|
|
265
|
-
const ri = /* @__PURE__ */ new Set(["auto", "none", "0"]);
|
|
266
|
-
class $n extends ct {
|
|
267
|
-
constructor(e, n, s, i, r) {
|
|
268
|
-
super(e, n, s, i, r, !0);
|
|
269
|
-
}
|
|
270
|
-
readKeyframes() {
|
|
271
|
-
const { unresolvedKeyframes: e, element: n, name: s } = this;
|
|
272
|
-
if (!n || !n.current) return;
|
|
273
|
-
super.readKeyframes();
|
|
274
|
-
for (let l = 0; l < e.length; l++) {
|
|
275
|
-
let c = e[l];
|
|
276
|
-
if (typeof c == "string" && (c = c.trim(), ut(c))) {
|
|
277
|
-
const u = En(c, n.current);
|
|
278
|
-
u !== void 0 && (e[l] = u), l === e.length - 1 && (this.finalKeyframe = c);
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
if (this.resolveNoneKeyframes(), !zs.has(s) || e.length !== 2) return;
|
|
282
|
-
const [i, r] = e, o = Bt(i), a = Bt(r);
|
|
283
|
-
if (o !== a) if (It(o) && It(a)) for (let l = 0; l < e.length; l++) {
|
|
284
|
-
const c = e[l];
|
|
285
|
-
typeof c == "string" && (e[l] = parseFloat(c));
|
|
286
|
-
}
|
|
287
|
-
else this.needsMeasurement = !0;
|
|
288
|
-
}
|
|
289
|
-
resolveNoneKeyframes() {
|
|
290
|
-
const { unresolvedKeyframes: e, name: n } = this, s = [];
|
|
291
|
-
for (let r = 0; r < e.length; r++) (typeof (i = e[r]) == "number" ? i === 0 : i === null || i === "none" || i === "0" || Cn(i)) && s.push(r);
|
|
292
|
-
var i;
|
|
293
|
-
s.length && function(r, o, a) {
|
|
294
|
-
let l, c = 0;
|
|
295
|
-
for (; c < r.length && !l; ) {
|
|
296
|
-
const u = r[c];
|
|
297
|
-
typeof u == "string" && !ri.has(u) && ce(u).values.length && (l = r[c]), c++;
|
|
298
|
-
}
|
|
299
|
-
if (l && a) for (const u of o) r[u] = Ln(a, l);
|
|
300
|
-
}(e, s, n);
|
|
301
|
-
}
|
|
302
|
-
measureInitialState() {
|
|
303
|
-
const { element: e, unresolvedKeyframes: n, name: s } = this;
|
|
304
|
-
if (!e || !e.current) return;
|
|
305
|
-
s === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin = X[s](e.measureViewportBox(), window.getComputedStyle(e.current)), n[0] = this.measuredOrigin;
|
|
306
|
-
const i = n[n.length - 1];
|
|
307
|
-
i !== void 0 && e.getValue(s, i).jump(i, !1);
|
|
308
|
-
}
|
|
309
|
-
measureEndState() {
|
|
310
|
-
var e;
|
|
311
|
-
const { element: n, name: s, unresolvedKeyframes: i } = this;
|
|
312
|
-
if (!n || !n.current) return;
|
|
313
|
-
const r = n.getValue(s);
|
|
314
|
-
r && r.jump(this.measuredOrigin, !1);
|
|
315
|
-
const o = i.length - 1, a = i[o];
|
|
316
|
-
i[o] = X[s](n.measureViewportBox(), window.getComputedStyle(n.current)), a !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = a), !((e = this.removedTransforms) === null || e === void 0) && e.length && this.removedTransforms.forEach(([l, c]) => {
|
|
317
|
-
n.getValue(l).set(c);
|
|
318
|
-
}), this.resolveNoneKeyframes();
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
function mt(t) {
|
|
322
|
-
return typeof t == "function";
|
|
323
|
-
}
|
|
324
|
-
let ve;
|
|
325
|
-
function oi() {
|
|
326
|
-
ve = void 0;
|
|
327
|
-
}
|
|
328
|
-
const L = { now: () => (ve === void 0 && L.set(be.isProcessing || Ls ? be.timestamp : performance.now()), ve), set: (t) => {
|
|
329
|
-
ve = t, queueMicrotask(oi);
|
|
330
|
-
} }, jt = (t, e) => e !== "zIndex" && (!(typeof t != "number" && !Array.isArray(t)) || !(typeof t != "string" || !se.test(t) && t !== "0" || t.startsWith("url(")));
|
|
331
|
-
function ai(t, e, n, s) {
|
|
332
|
-
const i = t[0];
|
|
333
|
-
if (i === null) return !1;
|
|
334
|
-
if (e === "display" || e === "visibility") return !0;
|
|
335
|
-
const r = t[t.length - 1], o = jt(i, e), a = jt(r, e);
|
|
336
|
-
return te(o === a, `You are trying to animate ${e} from "${i}" to "${r}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${r} via the \`style\` property.`), !(!o || !a) && (function(l) {
|
|
337
|
-
const c = l[0];
|
|
338
|
-
if (l.length === 1) return !0;
|
|
339
|
-
for (let u = 0; u < l.length; u++) if (l[u] !== c) return !0;
|
|
340
|
-
}(t) || (n === "spring" || mt(n)) && s);
|
|
341
|
-
}
|
|
342
|
-
class jn {
|
|
343
|
-
constructor({ autoplay: e = !0, delay: n = 0, type: s = "keyframes", repeat: i = 0, repeatDelay: r = 0, repeatType: o = "loop", ...a }) {
|
|
344
|
-
this.isStopped = !1, this.hasAttemptedResolve = !1, this.createdAt = L.now(), this.options = { autoplay: e, delay: n, type: s, repeat: i, repeatDelay: r, repeatType: o, ...a }, this.updateFinishedPromise();
|
|
345
|
-
}
|
|
346
|
-
calcStartTime() {
|
|
347
|
-
return this.resolvedAt && this.resolvedAt - this.createdAt > 40 ? this.resolvedAt : this.createdAt;
|
|
348
|
-
}
|
|
349
|
-
get resolved() {
|
|
350
|
-
return this._resolved || this.hasAttemptedResolve || (Rn(), In()), this._resolved;
|
|
351
|
-
}
|
|
352
|
-
onKeyframesResolved(e, n) {
|
|
353
|
-
this.resolvedAt = L.now(), this.hasAttemptedResolve = !0;
|
|
354
|
-
const { name: s, type: i, velocity: r, delay: o, onComplete: a, onUpdate: l, isGenerator: c } = this.options;
|
|
355
|
-
if (!c && !ai(e, s, i, r)) {
|
|
356
|
-
if (!o) return l == null || l(Pe(e, this.options, n)), a == null || a(), void this.resolveFinishedPromise();
|
|
357
|
-
this.options.duration = 0;
|
|
358
|
-
}
|
|
359
|
-
const u = this.initPlayback(e, n);
|
|
360
|
-
u !== !1 && (this._resolved = { keyframes: e, finalKeyframe: n, ...u }, this.onPostResolved());
|
|
361
|
-
}
|
|
362
|
-
onPostResolved() {
|
|
363
|
-
}
|
|
364
|
-
then(e, n) {
|
|
365
|
-
return this.currentFinishedPromise.then(e, n);
|
|
366
|
-
}
|
|
367
|
-
flatten() {
|
|
368
|
-
this.options.type = "keyframes", this.options.ease = "linear";
|
|
369
|
-
}
|
|
370
|
-
updateFinishedPromise() {
|
|
371
|
-
this.currentFinishedPromise = new Promise((e) => {
|
|
372
|
-
this.resolveFinishedPromise = e;
|
|
373
|
-
});
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
const ft = (t, e, n) => {
|
|
377
|
-
const s = e - t;
|
|
378
|
-
return s === 0 ? 1 : (n - t) / s;
|
|
379
|
-
}, Kn = (t, e, n = 10) => {
|
|
380
|
-
let s = "";
|
|
381
|
-
const i = Math.max(Math.round(e / n), 2);
|
|
382
|
-
for (let r = 0; r < i; r++) s += t(ft(0, i - 1, r)) + ", ";
|
|
383
|
-
return `linear(${s.substring(0, s.length - 2)})`;
|
|
384
|
-
};
|
|
385
|
-
function Wn(t, e) {
|
|
386
|
-
return e ? t * (1e3 / e) : 0;
|
|
387
|
-
}
|
|
388
|
-
function Un(t, e, n) {
|
|
389
|
-
const s = Math.max(e - 5, 0);
|
|
390
|
-
return Wn(n - t(s), e - s);
|
|
391
|
-
}
|
|
392
|
-
const Yn = 100, qn = 10, ge = 1, zn = 0, li = 800, Hn = 0.3, ui = 0.3, Kt = { granular: 0.01, default: 2 }, Wt = { granular: 5e-3, default: 0.5 }, ci = 0.01, Ut = 10, hi = 0.05, di = 1;
|
|
393
|
-
function pi({ duration: t = li, bounce: e = Hn, velocity: n = zn, mass: s = ge }) {
|
|
394
|
-
let i, r;
|
|
395
|
-
te(t <= R(Ut), "Spring duration must be 10 seconds or less");
|
|
396
|
-
let o = 1 - e;
|
|
397
|
-
o = Y(hi, di, o), t = Y(ci, Ut, N(t)), o < 1 ? (i = (l) => {
|
|
398
|
-
const c = l * o, u = c * t;
|
|
399
|
-
return 1e-3 - (c - n) / Ge(l, o) * Math.exp(-u);
|
|
400
|
-
}, r = (l) => {
|
|
401
|
-
const c = l * o * t, u = c * n + n, h = Math.pow(o, 2) * Math.pow(l, 2) * t, d = Math.exp(-c), f = Ge(Math.pow(l, 2), o);
|
|
402
|
-
return (1e-3 - i(l) > 0 ? -1 : 1) * ((u - h) * d) / f;
|
|
403
|
-
}) : (i = (l) => Math.exp(-l * t) * ((l - n) * t + 1) - 1e-3, r = (l) => Math.exp(-l * t) * (t * t * (n - l)));
|
|
404
|
-
const a = function(l, c, u) {
|
|
405
|
-
let h = u;
|
|
406
|
-
for (let d = 1; d < mi; d++) h -= l(h) / c(h);
|
|
407
|
-
return h;
|
|
408
|
-
}(i, r, 5 / t);
|
|
409
|
-
if (t = R(t), isNaN(a)) return { stiffness: Yn, damping: qn, duration: t };
|
|
410
|
-
{
|
|
411
|
-
const l = Math.pow(a, 2) * s;
|
|
412
|
-
return { stiffness: l, damping: 2 * o * Math.sqrt(s * l), duration: t };
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
const mi = 12;
|
|
416
|
-
function Ge(t, e) {
|
|
417
|
-
return t * Math.sqrt(1 - e * e);
|
|
418
|
-
}
|
|
419
|
-
const Ze = 2e4;
|
|
420
|
-
function Xn(t) {
|
|
421
|
-
let e = 0, n = t.next(e);
|
|
422
|
-
for (; !n.done && e < Ze; ) e += 50, n = t.next(e);
|
|
423
|
-
return e >= Ze ? 1 / 0 : e;
|
|
424
|
-
}
|
|
425
|
-
const fi = ["duration", "bounce"], vi = ["stiffness", "damping", "mass"];
|
|
426
|
-
function Yt(t, e) {
|
|
427
|
-
return e.some((n) => t[n] !== void 0);
|
|
428
|
-
}
|
|
429
|
-
function _n(t = ui, e = Hn) {
|
|
430
|
-
const n = typeof t != "object" ? { visualDuration: t, keyframes: [0, 1], bounce: e } : t;
|
|
431
|
-
let { restSpeed: s, restDelta: i } = n;
|
|
432
|
-
const r = n.keyframes[0], o = n.keyframes[n.keyframes.length - 1], a = { done: !1, value: r }, { stiffness: l, damping: c, mass: u, duration: h, velocity: d, isResolvedFromDuration: f } = function(y) {
|
|
433
|
-
let w = { velocity: zn, stiffness: Yn, damping: qn, mass: ge, isResolvedFromDuration: !1, ...y };
|
|
434
|
-
if (!Yt(y, vi) && Yt(y, fi)) if (y.visualDuration) {
|
|
435
|
-
const T = y.visualDuration, A = 2 * Math.PI / (1.2 * T), V = A * A, M = 2 * Y(0.05, 1, 1 - y.bounce) * Math.sqrt(V);
|
|
436
|
-
w = { ...w, mass: ge, stiffness: V, damping: M };
|
|
437
|
-
} else {
|
|
438
|
-
const T = pi(y);
|
|
439
|
-
w = { ...w, ...T, mass: ge }, w.isResolvedFromDuration = !0;
|
|
440
|
-
}
|
|
441
|
-
return w;
|
|
442
|
-
}({ ...n, velocity: -N(n.velocity || 0) }), v = d || 0, p = c / (2 * Math.sqrt(l * u)), g = o - r, m = N(Math.sqrt(l / u)), S = Math.abs(g) < 5;
|
|
443
|
-
let x;
|
|
444
|
-
if (s || (s = S ? Kt.granular : Kt.default), i || (i = S ? Wt.granular : Wt.default), p < 1) {
|
|
445
|
-
const y = Ge(m, p);
|
|
446
|
-
x = (w) => {
|
|
447
|
-
const T = Math.exp(-p * m * w);
|
|
448
|
-
return o - T * ((v + p * m * g) / y * Math.sin(y * w) + g * Math.cos(y * w));
|
|
449
|
-
};
|
|
450
|
-
} else if (p === 1) x = (y) => o - Math.exp(-m * y) * (g + (v + m * g) * y);
|
|
451
|
-
else {
|
|
452
|
-
const y = m * Math.sqrt(p * p - 1);
|
|
453
|
-
x = (w) => {
|
|
454
|
-
const T = Math.exp(-p * m * w), A = Math.min(y * w, 300);
|
|
455
|
-
return o - T * ((v + p * m * g) * Math.sinh(A) + y * g * Math.cosh(A)) / y;
|
|
456
|
-
};
|
|
457
|
-
}
|
|
458
|
-
const C = { calculatedDuration: f && h || null, next: (y) => {
|
|
459
|
-
const w = x(y);
|
|
460
|
-
if (f) a.done = y >= h;
|
|
461
|
-
else {
|
|
462
|
-
let T = 0;
|
|
463
|
-
p < 1 && (T = y === 0 ? R(v) : Un(x, y, w));
|
|
464
|
-
const A = Math.abs(T) <= s, V = Math.abs(o - w) <= i;
|
|
465
|
-
a.done = A && V;
|
|
466
|
-
}
|
|
467
|
-
return a.value = a.done ? o : w, a;
|
|
468
|
-
}, toString: () => {
|
|
469
|
-
const y = Math.min(Xn(C), Ze), w = Kn((T) => C.next(y * T).value, y, 30);
|
|
470
|
-
return y + "ms " + w;
|
|
471
|
-
} };
|
|
472
|
-
return C;
|
|
473
|
-
}
|
|
474
|
-
function qt({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: s = 325, bounceDamping: i = 10, bounceStiffness: r = 500, modifyTarget: o, min: a, max: l, restDelta: c = 0.5, restSpeed: u }) {
|
|
475
|
-
const h = t[0], d = { done: !1, value: h }, f = (T) => a === void 0 ? l : l === void 0 || Math.abs(a - T) < Math.abs(l - T) ? a : l;
|
|
476
|
-
let v = n * e;
|
|
477
|
-
const p = h + v, g = o === void 0 ? p : o(p);
|
|
478
|
-
g !== p && (v = g - h);
|
|
479
|
-
const m = (T) => -v * Math.exp(-T / s), S = (T) => g + m(T), x = (T) => {
|
|
480
|
-
const A = m(T), V = S(T);
|
|
481
|
-
d.done = Math.abs(A) <= c, d.value = d.done ? g : V;
|
|
482
|
-
};
|
|
483
|
-
let C, y;
|
|
484
|
-
const w = (T) => {
|
|
485
|
-
var A;
|
|
486
|
-
A = d.value, (a !== void 0 && A < a || l !== void 0 && A > l) && (C = T, y = _n({ keyframes: [d.value, f(d.value)], velocity: Un(S, T, d.value), damping: i, stiffness: r, restDelta: c, restSpeed: u }));
|
|
487
|
-
};
|
|
488
|
-
return w(0), { calculatedDuration: null, next: (T) => {
|
|
489
|
-
let A = !1;
|
|
490
|
-
return y || C !== void 0 || (A = !0, x(T), w(T)), C !== void 0 && T >= C ? y.next(T - C) : (!A && x(T), d);
|
|
491
|
-
} };
|
|
492
|
-
}
|
|
493
|
-
const gi = de(0.42, 0, 1, 1), yi = de(0, 0, 0.58, 1), Gn = de(0.42, 0, 0.58, 1), vt = (t) => Array.isArray(t) && typeof t[0] == "number", zt = { linear: $, easeIn: gi, easeInOut: Gn, easeOut: yi, circIn: lt, circInOut: Vn, circOut: js, backIn: at, backInOut: xn, backOut: Tn, anticipate: An }, Ht = (t) => {
|
|
494
|
-
if (vt(t)) {
|
|
495
|
-
U(t.length === 4, "Cubic bezier arrays must contain four numerical values.");
|
|
496
|
-
const [e, n, s, i] = t;
|
|
497
|
-
return de(e, n, s, i);
|
|
498
|
-
}
|
|
499
|
-
return typeof t == "string" ? (U(zt[t] !== void 0, `Invalid easing type '${t}'`), zt[t]) : t;
|
|
500
|
-
}, wi = (t, e) => (n) => e(t(n)), ke = (...t) => t.reduce(wi), Ee = (t, e, n) => t + (e - t) * n;
|
|
501
|
-
function Be(t, e, n) {
|
|
502
|
-
return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? t + 6 * (e - t) * n : n < 0.5 ? e : n < 2 / 3 ? t + (e - t) * (2 / 3 - n) * 6 : t;
|
|
503
|
-
}
|
|
504
|
-
function Se(t, e) {
|
|
505
|
-
return (n) => n > 0 ? e : t;
|
|
506
|
-
}
|
|
507
|
-
const Ne = (t, e, n) => {
|
|
508
|
-
const s = t * t, i = n * (e * e - s) + s;
|
|
509
|
-
return i < 0 ? 0 : Math.sqrt(i);
|
|
510
|
-
}, bi = [He, K, _];
|
|
511
|
-
function Xt(t) {
|
|
512
|
-
const e = (n = t, bi.find((i) => i.test(n)));
|
|
513
|
-
var n;
|
|
514
|
-
if (te(!!e, `'${t}' is not an animatable color. Use the equivalent color code instead.`), !e) return !1;
|
|
515
|
-
let s = e.parse(t);
|
|
516
|
-
return e === _ && (s = function({ hue: i, saturation: r, lightness: o, alpha: a }) {
|
|
517
|
-
i /= 360, o /= 100;
|
|
518
|
-
let l = 0, c = 0, u = 0;
|
|
519
|
-
if (r /= 100) {
|
|
520
|
-
const h = o < 0.5 ? o * (1 + r) : o + r - o * r, d = 2 * o - h;
|
|
521
|
-
l = Be(d, h, i + 1 / 3), c = Be(d, h, i), u = Be(d, h, i - 1 / 3);
|
|
522
|
-
} else l = c = u = o;
|
|
523
|
-
return { red: Math.round(255 * l), green: Math.round(255 * c), blue: Math.round(255 * u), alpha: a };
|
|
524
|
-
}(s)), s;
|
|
525
|
-
}
|
|
526
|
-
const _t = (t, e) => {
|
|
527
|
-
const n = Xt(t), s = Xt(e);
|
|
528
|
-
if (!n || !s) return Se(t, e);
|
|
529
|
-
const i = { ...n };
|
|
530
|
-
return (r) => (i.red = Ne(n.red, s.red, r), i.green = Ne(n.green, s.green, r), i.blue = Ne(n.blue, s.blue, r), i.alpha = Ee(n.alpha, s.alpha, r), K.transform(i));
|
|
531
|
-
}, Le = /* @__PURE__ */ new Set(["none", "hidden"]);
|
|
532
|
-
function Si(t, e) {
|
|
533
|
-
return (n) => Ee(t, e, n);
|
|
534
|
-
}
|
|
535
|
-
function gt(t) {
|
|
536
|
-
return typeof t == "number" ? Si : typeof t == "string" ? ut(t) ? Se : P.test(t) ? _t : xi : Array.isArray(t) ? Zn : typeof t == "object" ? P.test(t) ? _t : Ti : Se;
|
|
537
|
-
}
|
|
538
|
-
function Zn(t, e) {
|
|
539
|
-
const n = [...t], s = n.length, i = t.map((r, o) => gt(r)(r, e[o]));
|
|
540
|
-
return (r) => {
|
|
541
|
-
for (let o = 0; o < s; o++) n[o] = i[o](r);
|
|
542
|
-
return n;
|
|
543
|
-
};
|
|
544
|
-
}
|
|
545
|
-
function Ti(t, e) {
|
|
546
|
-
const n = { ...t, ...e }, s = {};
|
|
547
|
-
for (const i in n) t[i] !== void 0 && e[i] !== void 0 && (s[i] = gt(t[i])(t[i], e[i]));
|
|
548
|
-
return (i) => {
|
|
549
|
-
for (const r in s) n[r] = s[r](i);
|
|
550
|
-
return n;
|
|
551
|
-
};
|
|
552
|
-
}
|
|
553
|
-
const xi = (t, e) => {
|
|
554
|
-
const n = se.createTransformer(e), s = ce(t), i = ce(e);
|
|
555
|
-
return s.indexes.var.length === i.indexes.var.length && s.indexes.color.length === i.indexes.color.length && s.indexes.number.length >= i.indexes.number.length ? Le.has(t) && !i.values.length || Le.has(e) && !s.values.length ? function(r, o) {
|
|
556
|
-
return Le.has(r) ? (a) => a <= 0 ? r : o : (a) => a >= 1 ? o : r;
|
|
557
|
-
}(t, e) : ke(Zn(function(r, o) {
|
|
558
|
-
var a;
|
|
559
|
-
const l = [], c = { color: 0, var: 0, number: 0 };
|
|
560
|
-
for (let u = 0; u < o.values.length; u++) {
|
|
561
|
-
const h = o.types[u], d = r.indexes[h][c[h]], f = (a = r.values[d]) !== null && a !== void 0 ? a : 0;
|
|
562
|
-
l[u] = f, c[h]++;
|
|
563
|
-
}
|
|
564
|
-
return l;
|
|
565
|
-
}(s, i), i.values), n) : (te(!0, `Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`), Se(t, e));
|
|
566
|
-
};
|
|
567
|
-
function Jn(t, e, n) {
|
|
568
|
-
return typeof t == "number" && typeof e == "number" && typeof n == "number" ? Ee(t, e, n) : gt(t)(t, e);
|
|
569
|
-
}
|
|
570
|
-
function Ai(t, e, { clamp: n = !0, ease: s, mixer: i } = {}) {
|
|
571
|
-
const r = t.length;
|
|
572
|
-
if (U(r === e.length, "Both input and output ranges must be the same length"), r === 1) return () => e[0];
|
|
573
|
-
if (r === 2 && t[0] === t[1]) return () => e[1];
|
|
574
|
-
t[0] > t[r - 1] && (t = [...t].reverse(), e = [...e].reverse());
|
|
575
|
-
const o = function(c, u, h) {
|
|
576
|
-
const d = [], f = h || Jn, v = c.length - 1;
|
|
577
|
-
for (let p = 0; p < v; p++) {
|
|
578
|
-
let g = f(c[p], c[p + 1]);
|
|
579
|
-
if (u) {
|
|
580
|
-
const m = Array.isArray(u) ? u[p] || $ : u;
|
|
581
|
-
g = ke(m, g);
|
|
582
|
-
}
|
|
583
|
-
d.push(g);
|
|
584
|
-
}
|
|
585
|
-
return d;
|
|
586
|
-
}(e, s, i), a = o.length, l = (c) => {
|
|
587
|
-
let u = 0;
|
|
588
|
-
if (a > 1) for (; u < t.length - 2 && !(c < t[u + 1]); u++) ;
|
|
589
|
-
const h = ft(t[u], t[u + 1], c);
|
|
590
|
-
return o[u](h);
|
|
591
|
-
};
|
|
592
|
-
return n ? (c) => l(Y(t[0], t[r - 1], c)) : l;
|
|
593
|
-
}
|
|
594
|
-
function Vi(t) {
|
|
595
|
-
const e = [0];
|
|
596
|
-
return function(n, s) {
|
|
597
|
-
const i = n[n.length - 1];
|
|
598
|
-
for (let r = 1; r <= s; r++) {
|
|
599
|
-
const o = ft(0, s, r);
|
|
600
|
-
n.push(Ee(i, 1, o));
|
|
601
|
-
}
|
|
602
|
-
}(e, t.length - 1), e;
|
|
603
|
-
}
|
|
604
|
-
function Te({ duration: t = 300, keyframes: e, times: n, ease: s = "easeInOut" }) {
|
|
605
|
-
const i = ((u) => Array.isArray(u) && typeof u[0] != "number")(s) ? s.map(Ht) : Ht(s), r = { done: !1, value: e[0] }, o = function(u, h) {
|
|
606
|
-
return u.map((d) => d * h);
|
|
607
|
-
}(n && n.length === e.length ? n : Vi(e), t), a = Ai(o, e, { ease: Array.isArray(i) ? i : (l = e, c = i, l.map(() => c || Gn).splice(0, l.length - 1)) });
|
|
608
|
-
var l, c;
|
|
609
|
-
return { calculatedDuration: t, next: (u) => (r.value = a(u), r.done = u >= t, r) };
|
|
610
|
-
}
|
|
611
|
-
const Ci = (t) => {
|
|
612
|
-
const e = ({ timestamp: n }) => t(n);
|
|
613
|
-
return { start: () => F.update(e, !0), stop: () => Ye(e), now: () => be.isProcessing ? be.timestamp : L.now() };
|
|
614
|
-
}, Mi = { decay: qt, inertia: qt, tween: Te, keyframes: Te, spring: _n }, Pi = (t) => t / 100;
|
|
615
|
-
class Je extends jn {
|
|
616
|
-
constructor(e) {
|
|
617
|
-
super(e), this.holdTime = null, this.cancelTime = null, this.currentTime = 0, this.playbackSpeed = 1, this.pendingPlayState = "running", this.startTime = null, this.state = "idle", this.stop = () => {
|
|
618
|
-
if (this.resolver.cancel(), this.isStopped = !0, this.state === "idle") return;
|
|
619
|
-
this.teardown();
|
|
620
|
-
const { onStop: a } = this.options;
|
|
621
|
-
a && a();
|
|
622
|
-
};
|
|
623
|
-
const { name: n, motionValue: s, element: i, keyframes: r } = this.options, o = (i == null ? void 0 : i.KeyframeResolver) || ct;
|
|
624
|
-
this.resolver = new o(r, (a, l) => this.onKeyframesResolved(a, l), n, s, i), this.resolver.scheduleResolve();
|
|
625
|
-
}
|
|
626
|
-
flatten() {
|
|
627
|
-
super.flatten(), this._resolved && Object.assign(this._resolved, this.initPlayback(this._resolved.keyframes));
|
|
628
|
-
}
|
|
629
|
-
initPlayback(e) {
|
|
630
|
-
const { type: n = "keyframes", repeat: s = 0, repeatDelay: i = 0, repeatType: r, velocity: o = 0 } = this.options, a = mt(n) ? n : Mi[n] || Te;
|
|
631
|
-
let l, c;
|
|
632
|
-
a !== Te && typeof e[0] != "number" && (process.env.NODE_ENV !== "production" && U(e.length === 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${e}`), l = ke(Pi, Jn(e[0], e[1])), e = [0, 100]);
|
|
633
|
-
const u = a({ ...this.options, keyframes: e });
|
|
634
|
-
r === "mirror" && (c = a({ ...this.options, keyframes: [...e].reverse(), velocity: -o })), u.calculatedDuration === null && (u.calculatedDuration = Xn(u));
|
|
635
|
-
const { calculatedDuration: h } = u, d = h + i;
|
|
636
|
-
return { generator: u, mirroredGenerator: c, mapPercentToKeyframes: l, calculatedDuration: h, resolvedDuration: d, totalDuration: d * (s + 1) - i };
|
|
637
|
-
}
|
|
638
|
-
onPostResolved() {
|
|
639
|
-
const { autoplay: e = !0 } = this.options;
|
|
640
|
-
this.play(), this.pendingPlayState !== "paused" && e ? this.state = this.pendingPlayState : this.pause();
|
|
641
|
-
}
|
|
642
|
-
tick(e, n = !1) {
|
|
643
|
-
const { resolved: s } = this;
|
|
644
|
-
if (!s) {
|
|
645
|
-
const { keyframes: A } = this.options;
|
|
646
|
-
return { done: !0, value: A[A.length - 1] };
|
|
647
|
-
}
|
|
648
|
-
const { finalKeyframe: i, generator: r, mirroredGenerator: o, mapPercentToKeyframes: a, keyframes: l, calculatedDuration: c, totalDuration: u, resolvedDuration: h } = s;
|
|
649
|
-
if (this.startTime === null) return r.next(0);
|
|
650
|
-
const { delay: d, repeat: f, repeatType: v, repeatDelay: p, onUpdate: g } = this.options;
|
|
651
|
-
this.speed > 0 ? this.startTime = Math.min(this.startTime, e) : this.speed < 0 && (this.startTime = Math.min(e - u / this.speed, this.startTime)), n ? this.currentTime = e : this.holdTime !== null ? this.currentTime = this.holdTime : this.currentTime = Math.round(e - this.startTime) * this.speed;
|
|
652
|
-
const m = this.currentTime - d * (this.speed >= 0 ? 1 : -1), S = this.speed >= 0 ? m < 0 : m > u;
|
|
653
|
-
this.currentTime = Math.max(m, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = u);
|
|
654
|
-
let x = this.currentTime, C = r;
|
|
655
|
-
if (f) {
|
|
656
|
-
const A = Math.min(this.currentTime, u) / h;
|
|
657
|
-
let V = Math.floor(A), M = A % 1;
|
|
658
|
-
!M && A >= 1 && (M = 1), M === 1 && V--, V = Math.min(V, f + 1), V % 2 && (v === "reverse" ? (M = 1 - M, p && (M -= p / h)) : v === "mirror" && (C = o)), x = Y(0, 1, M) * h;
|
|
659
|
-
}
|
|
660
|
-
const y = S ? { done: !1, value: l[0] } : C.next(x);
|
|
661
|
-
a && (y.value = a(y.value));
|
|
662
|
-
let { done: w } = y;
|
|
663
|
-
S || c === null || (w = this.speed >= 0 ? this.currentTime >= u : this.currentTime <= 0);
|
|
664
|
-
const T = this.holdTime === null && (this.state === "finished" || this.state === "running" && w);
|
|
665
|
-
return T && i !== void 0 && (y.value = Pe(l, this.options, i)), g && g(y.value), T && this.finish(), y;
|
|
666
|
-
}
|
|
667
|
-
get duration() {
|
|
668
|
-
const { resolved: e } = this;
|
|
669
|
-
return e ? N(e.calculatedDuration) : 0;
|
|
670
|
-
}
|
|
671
|
-
get time() {
|
|
672
|
-
return N(this.currentTime);
|
|
673
|
-
}
|
|
674
|
-
set time(e) {
|
|
675
|
-
e = R(e), this.currentTime = e, this.holdTime !== null || this.speed === 0 ? this.holdTime = e : this.driver && (this.startTime = this.driver.now() - e / this.speed);
|
|
676
|
-
}
|
|
677
|
-
get speed() {
|
|
678
|
-
return this.playbackSpeed;
|
|
679
|
-
}
|
|
680
|
-
set speed(e) {
|
|
681
|
-
const n = this.playbackSpeed !== e;
|
|
682
|
-
this.playbackSpeed = e, n && (this.time = N(this.currentTime));
|
|
683
|
-
}
|
|
684
|
-
play() {
|
|
685
|
-
if (this.resolver.isScheduled || this.resolver.resume(), !this._resolved) return void (this.pendingPlayState = "running");
|
|
686
|
-
if (this.isStopped) return;
|
|
687
|
-
const { driver: e = Ci, onPlay: n, startTime: s } = this.options;
|
|
688
|
-
this.driver || (this.driver = e((r) => this.tick(r))), n && n();
|
|
689
|
-
const i = this.driver.now();
|
|
690
|
-
this.holdTime !== null ? this.startTime = i - this.holdTime : this.startTime ? this.state === "finished" && (this.startTime = i) : this.startTime = s ?? this.calcStartTime(), this.state === "finished" && this.updateFinishedPromise(), this.cancelTime = this.startTime, this.holdTime = null, this.state = "running", this.driver.start();
|
|
691
|
-
}
|
|
692
|
-
pause() {
|
|
693
|
-
var e;
|
|
694
|
-
this._resolved ? (this.state = "paused", this.holdTime = (e = this.currentTime) !== null && e !== void 0 ? e : 0) : this.pendingPlayState = "paused";
|
|
695
|
-
}
|
|
696
|
-
complete() {
|
|
697
|
-
this.state !== "running" && this.play(), this.pendingPlayState = this.state = "finished", this.holdTime = null;
|
|
698
|
-
}
|
|
699
|
-
finish() {
|
|
700
|
-
this.teardown(), this.state = "finished";
|
|
701
|
-
const { onComplete: e } = this.options;
|
|
702
|
-
e && e();
|
|
703
|
-
}
|
|
704
|
-
cancel() {
|
|
705
|
-
this.cancelTime !== null && this.tick(this.cancelTime), this.teardown(), this.updateFinishedPromise();
|
|
706
|
-
}
|
|
707
|
-
teardown() {
|
|
708
|
-
this.state = "idle", this.stopDriver(), this.resolveFinishedPromise(), this.updateFinishedPromise(), this.startTime = this.cancelTime = null, this.resolver.cancel();
|
|
709
|
-
}
|
|
710
|
-
stopDriver() {
|
|
711
|
-
this.driver && (this.driver.stop(), this.driver = void 0);
|
|
712
|
-
}
|
|
713
|
-
sample(e) {
|
|
714
|
-
return this.startTime = 0, this.tick(e, !0);
|
|
715
|
-
}
|
|
716
|
-
}
|
|
717
|
-
const ki = /* @__PURE__ */ new Set(["opacity", "clipPath", "filter", "transform"]);
|
|
718
|
-
function yt(t) {
|
|
719
|
-
let e;
|
|
720
|
-
return () => (e === void 0 && (e = t()), e);
|
|
721
|
-
}
|
|
722
|
-
const Ei = { linearEasing: void 0 };
|
|
723
|
-
function Fi(t, e) {
|
|
724
|
-
const n = yt(t);
|
|
725
|
-
return () => {
|
|
726
|
-
var s;
|
|
727
|
-
return (s = Ei[e]) !== null && s !== void 0 ? s : n();
|
|
728
|
-
};
|
|
729
|
-
}
|
|
730
|
-
const xe = Fi(() => {
|
|
731
|
-
try {
|
|
732
|
-
document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
|
|
733
|
-
} catch {
|
|
734
|
-
return !1;
|
|
735
|
-
}
|
|
736
|
-
return !0;
|
|
737
|
-
}, "linearEasing");
|
|
738
|
-
function Qn(t) {
|
|
739
|
-
return !!(typeof t == "function" && xe() || !t || typeof t == "string" && (t in Qe || xe()) || vt(t) || Array.isArray(t) && t.every(Qn));
|
|
740
|
-
}
|
|
741
|
-
const oe = ([t, e, n, s]) => `cubic-bezier(${t}, ${e}, ${n}, ${s})`, Qe = { linear: "linear", ease: "ease", easeIn: "ease-in", easeOut: "ease-out", easeInOut: "ease-in-out", circIn: oe([0, 0.65, 0.55, 1]), circOut: oe([0.55, 0, 1, 0.45]), backIn: oe([0.31, 0.01, 0.66, -0.59]), backOut: oe([0.33, 1.53, 0.69, 0.99]) };
|
|
742
|
-
function es(t, e) {
|
|
743
|
-
return t ? typeof t == "function" && xe() ? Kn(t, e) : vt(t) ? oe(t) : Array.isArray(t) ? t.map((n) => es(n, e) || Qe.easeOut) : Qe[t] : void 0;
|
|
744
|
-
}
|
|
745
|
-
function Oi(t, e, n, { delay: s = 0, duration: i = 300, repeat: r = 0, repeatType: o = "loop", ease: a = "easeInOut", times: l } = {}) {
|
|
746
|
-
const c = { [e]: n };
|
|
747
|
-
l && (c.offset = l);
|
|
748
|
-
const u = es(a, i);
|
|
749
|
-
return Array.isArray(u) && (c.easing = u), t.animate(c, { delay: s, duration: i, easing: Array.isArray(u) ? "linear" : u, fill: "both", iterations: r + 1, direction: o === "reverse" ? "alternate" : "normal" });
|
|
750
|
-
}
|
|
751
|
-
function Gt(t, e) {
|
|
752
|
-
t.timeline = e, t.onfinish = null;
|
|
753
|
-
}
|
|
754
|
-
const Ii = yt(() => Object.hasOwnProperty.call(Element.prototype, "animate")), Zt = { anticipate: An, backInOut: xn, circInOut: Vn };
|
|
755
|
-
class Jt extends jn {
|
|
756
|
-
constructor(e) {
|
|
757
|
-
super(e);
|
|
758
|
-
const { name: n, motionValue: s, element: i, keyframes: r } = this.options;
|
|
759
|
-
this.resolver = new $n(r, (o, a) => this.onKeyframesResolved(o, a), n, s, i), this.resolver.scheduleResolve();
|
|
760
|
-
}
|
|
761
|
-
initPlayback(e, n) {
|
|
762
|
-
var s;
|
|
763
|
-
let { duration: i = 300, times: r, ease: o, type: a, motionValue: l, name: c, startTime: u } = this.options;
|
|
764
|
-
if (!(!((s = l.owner) === null || s === void 0) && s.current)) return !1;
|
|
765
|
-
var h;
|
|
766
|
-
if (typeof o == "string" && xe() && o in Zt && (o = Zt[o]), mt((h = this.options).type) || h.type === "spring" || !Qn(h.ease)) {
|
|
767
|
-
const { onComplete: f, onUpdate: v, motionValue: p, element: g, ...m } = this.options, S = function(x, C) {
|
|
768
|
-
const y = new Je({ ...C, keyframes: x, repeat: 0, delay: 0, isGenerator: !0 });
|
|
769
|
-
let w = { done: !1, value: x[0] };
|
|
770
|
-
const T = [];
|
|
771
|
-
let A = 0;
|
|
772
|
-
for (; !w.done && A < 2e4; ) w = y.sample(A), T.push(w.value), A += 10;
|
|
773
|
-
return { times: void 0, keyframes: T, duration: A - 10, ease: "linear" };
|
|
774
|
-
}(e, m);
|
|
775
|
-
(e = S.keyframes).length === 1 && (e[1] = e[0]), i = S.duration, r = S.times, o = S.ease, a = "keyframes";
|
|
776
|
-
}
|
|
777
|
-
const d = Oi(l.owner.current, c, e, { ...this.options, duration: i, times: r, ease: o });
|
|
778
|
-
return d.startTime = u ?? this.calcStartTime(), this.pendingTimeline ? (Gt(d, this.pendingTimeline), this.pendingTimeline = void 0) : d.onfinish = () => {
|
|
779
|
-
const { onComplete: f } = this.options;
|
|
780
|
-
l.set(Pe(e, this.options, n)), f && f(), this.cancel(), this.resolveFinishedPromise();
|
|
781
|
-
}, { animation: d, duration: i, times: r, type: a, ease: o, keyframes: e };
|
|
782
|
-
}
|
|
783
|
-
get duration() {
|
|
784
|
-
const { resolved: e } = this;
|
|
785
|
-
if (!e) return 0;
|
|
786
|
-
const { duration: n } = e;
|
|
787
|
-
return N(n);
|
|
788
|
-
}
|
|
789
|
-
get time() {
|
|
790
|
-
const { resolved: e } = this;
|
|
791
|
-
if (!e) return 0;
|
|
792
|
-
const { animation: n } = e;
|
|
793
|
-
return N(n.currentTime || 0);
|
|
794
|
-
}
|
|
795
|
-
set time(e) {
|
|
796
|
-
const { resolved: n } = this;
|
|
797
|
-
if (!n) return;
|
|
798
|
-
const { animation: s } = n;
|
|
799
|
-
s.currentTime = R(e);
|
|
800
|
-
}
|
|
801
|
-
get speed() {
|
|
802
|
-
const { resolved: e } = this;
|
|
803
|
-
if (!e) return 1;
|
|
804
|
-
const { animation: n } = e;
|
|
805
|
-
return n.playbackRate;
|
|
806
|
-
}
|
|
807
|
-
set speed(e) {
|
|
808
|
-
const { resolved: n } = this;
|
|
809
|
-
if (!n) return;
|
|
810
|
-
const { animation: s } = n;
|
|
811
|
-
s.playbackRate = e;
|
|
812
|
-
}
|
|
813
|
-
get state() {
|
|
814
|
-
const { resolved: e } = this;
|
|
815
|
-
if (!e) return "idle";
|
|
816
|
-
const { animation: n } = e;
|
|
817
|
-
return n.playState;
|
|
818
|
-
}
|
|
819
|
-
get startTime() {
|
|
820
|
-
const { resolved: e } = this;
|
|
821
|
-
if (!e) return null;
|
|
822
|
-
const { animation: n } = e;
|
|
823
|
-
return n.startTime;
|
|
824
|
-
}
|
|
825
|
-
attachTimeline(e) {
|
|
826
|
-
if (this._resolved) {
|
|
827
|
-
const { resolved: n } = this;
|
|
828
|
-
if (!n) return $;
|
|
829
|
-
const { animation: s } = n;
|
|
830
|
-
Gt(s, e);
|
|
831
|
-
} else this.pendingTimeline = e;
|
|
832
|
-
return $;
|
|
833
|
-
}
|
|
834
|
-
play() {
|
|
835
|
-
if (this.isStopped) return;
|
|
836
|
-
const { resolved: e } = this;
|
|
837
|
-
if (!e) return;
|
|
838
|
-
const { animation: n } = e;
|
|
839
|
-
n.playState === "finished" && this.updateFinishedPromise(), n.play();
|
|
840
|
-
}
|
|
841
|
-
pause() {
|
|
842
|
-
const { resolved: e } = this;
|
|
843
|
-
if (!e) return;
|
|
844
|
-
const { animation: n } = e;
|
|
845
|
-
n.pause();
|
|
846
|
-
}
|
|
847
|
-
stop() {
|
|
848
|
-
if (this.resolver.cancel(), this.isStopped = !0, this.state === "idle") return;
|
|
849
|
-
this.resolveFinishedPromise(), this.updateFinishedPromise();
|
|
850
|
-
const { resolved: e } = this;
|
|
851
|
-
if (!e) return;
|
|
852
|
-
const { animation: n, keyframes: s, duration: i, type: r, ease: o, times: a } = e;
|
|
853
|
-
if (n.playState === "idle" || n.playState === "finished") return;
|
|
854
|
-
if (this.time) {
|
|
855
|
-
const { motionValue: c, onUpdate: u, onComplete: h, element: d, ...f } = this.options, v = new Je({ ...f, keyframes: s, duration: i, type: r, ease: o, times: a, isGenerator: !0 }), p = R(this.time);
|
|
856
|
-
c.setWithVelocity(v.sample(p - 10).value, v.sample(p).value, 10);
|
|
857
|
-
}
|
|
858
|
-
const { onStop: l } = this.options;
|
|
859
|
-
l && l(), this.cancel();
|
|
860
|
-
}
|
|
861
|
-
complete() {
|
|
862
|
-
const { resolved: e } = this;
|
|
863
|
-
e && e.animation.finish();
|
|
864
|
-
}
|
|
865
|
-
cancel() {
|
|
866
|
-
const { resolved: e } = this;
|
|
867
|
-
e && e.animation.cancel();
|
|
868
|
-
}
|
|
869
|
-
static supports(e) {
|
|
870
|
-
const { motionValue: n, name: s, repeatDelay: i, repeatType: r, damping: o, type: a } = e;
|
|
871
|
-
return Ii() && s && ki.has(s) && n && n.owner && n.owner.current instanceof HTMLElement && !n.owner.getProps().onUpdate && !i && r !== "mirror" && o !== 0 && a !== "inertia";
|
|
872
|
-
}
|
|
873
|
-
}
|
|
874
|
-
const Ri = yt(() => window.ScrollTimeline !== void 0);
|
|
875
|
-
class Di {
|
|
876
|
-
constructor(e) {
|
|
877
|
-
this.stop = () => this.runAll("stop"), this.animations = e.filter(Boolean);
|
|
878
|
-
}
|
|
879
|
-
then(e, n) {
|
|
880
|
-
return Promise.all(this.animations).then(e).catch(n);
|
|
881
|
-
}
|
|
882
|
-
getAll(e) {
|
|
883
|
-
return this.animations[0][e];
|
|
884
|
-
}
|
|
885
|
-
setAll(e, n) {
|
|
886
|
-
for (let s = 0; s < this.animations.length; s++) this.animations[s][e] = n;
|
|
887
|
-
}
|
|
888
|
-
attachTimeline(e, n) {
|
|
889
|
-
const s = this.animations.map((i) => Ri() && i.attachTimeline ? i.attachTimeline(e) : n(i));
|
|
890
|
-
return () => {
|
|
891
|
-
s.forEach((i, r) => {
|
|
892
|
-
i && i(), this.animations[r].stop();
|
|
893
|
-
});
|
|
894
|
-
};
|
|
895
|
-
}
|
|
896
|
-
get time() {
|
|
897
|
-
return this.getAll("time");
|
|
898
|
-
}
|
|
899
|
-
set time(e) {
|
|
900
|
-
this.setAll("time", e);
|
|
901
|
-
}
|
|
902
|
-
get speed() {
|
|
903
|
-
return this.getAll("speed");
|
|
904
|
-
}
|
|
905
|
-
set speed(e) {
|
|
906
|
-
this.setAll("speed", e);
|
|
907
|
-
}
|
|
908
|
-
get startTime() {
|
|
909
|
-
return this.getAll("startTime");
|
|
910
|
-
}
|
|
911
|
-
get duration() {
|
|
912
|
-
let e = 0;
|
|
913
|
-
for (let n = 0; n < this.animations.length; n++) e = Math.max(e, this.animations[n].duration);
|
|
914
|
-
return e;
|
|
915
|
-
}
|
|
916
|
-
runAll(e) {
|
|
917
|
-
this.animations.forEach((n) => n[e]());
|
|
918
|
-
}
|
|
919
|
-
flatten() {
|
|
920
|
-
this.runAll("flatten");
|
|
921
|
-
}
|
|
922
|
-
play() {
|
|
923
|
-
this.runAll("play");
|
|
924
|
-
}
|
|
925
|
-
pause() {
|
|
926
|
-
this.runAll("pause");
|
|
927
|
-
}
|
|
928
|
-
cancel() {
|
|
929
|
-
this.runAll("cancel");
|
|
930
|
-
}
|
|
931
|
-
complete() {
|
|
932
|
-
this.runAll("complete");
|
|
933
|
-
}
|
|
934
|
-
}
|
|
935
|
-
const Bi = (t, e, n, s = {}, i, r) => (o) => {
|
|
936
|
-
const a = yn(s, t) || {}, l = a.delay || s.delay || 0;
|
|
937
|
-
let { elapsed: c = 0 } = s;
|
|
938
|
-
c -= R(l);
|
|
939
|
-
let u = { keyframes: Array.isArray(n) ? n : [null, n], ease: "easeOut", velocity: e.getVelocity(), ...a, delay: -c, onUpdate: (d) => {
|
|
940
|
-
e.set(d), a.onUpdate && a.onUpdate(d);
|
|
941
|
-
}, onComplete: () => {
|
|
942
|
-
o(), a.onComplete && a.onComplete();
|
|
943
|
-
}, name: t, motionValue: e, element: r ? void 0 : i };
|
|
944
|
-
(function({ when: d, delay: f, delayChildren: v, staggerChildren: p, staggerDirection: g, repeat: m, repeatType: S, repeatDelay: x, from: C, elapsed: y, ...w }) {
|
|
945
|
-
return !!Object.keys(w).length;
|
|
946
|
-
})(a) || (u = { ...u, ...Ns(t, u) }), u.duration && (u.duration = R(u.duration)), u.repeatDelay && (u.repeatDelay = R(u.repeatDelay)), u.from !== void 0 && (u.keyframes[0] = u.from);
|
|
947
|
-
let h = !1;
|
|
948
|
-
if ((u.type === !1 || u.duration === 0 && !u.repeatDelay) && (u.duration = 0, u.delay === 0 && (h = !0)), h && !r && e.get() !== void 0) {
|
|
949
|
-
const d = Pe(u.keyframes, a);
|
|
950
|
-
if (d !== void 0) return F.update(() => {
|
|
951
|
-
u.onUpdate(d), u.onComplete();
|
|
952
|
-
}), new Di([]);
|
|
953
|
-
}
|
|
954
|
-
return !r && Jt.supports(u) ? new Jt(u) : new Je(u);
|
|
955
|
-
};
|
|
956
|
-
class ts {
|
|
957
|
-
constructor() {
|
|
958
|
-
this.subscriptions = [];
|
|
959
|
-
}
|
|
960
|
-
add(e) {
|
|
961
|
-
var n, s;
|
|
962
|
-
return n = this.subscriptions, s = e, n.indexOf(s) === -1 && n.push(s), () => function(i, r) {
|
|
963
|
-
const o = i.indexOf(r);
|
|
964
|
-
o > -1 && i.splice(o, 1);
|
|
965
|
-
}(this.subscriptions, e);
|
|
966
|
-
}
|
|
967
|
-
notify(e, n, s) {
|
|
968
|
-
const i = this.subscriptions.length;
|
|
969
|
-
if (i) if (i === 1) this.subscriptions[0](e, n, s);
|
|
970
|
-
else for (let r = 0; r < i; r++) {
|
|
971
|
-
const o = this.subscriptions[r];
|
|
972
|
-
o && o(e, n, s);
|
|
973
|
-
}
|
|
974
|
-
}
|
|
975
|
-
getSize() {
|
|
976
|
-
return this.subscriptions.length;
|
|
977
|
-
}
|
|
978
|
-
clear() {
|
|
979
|
-
this.subscriptions.length = 0;
|
|
980
|
-
}
|
|
981
|
-
}
|
|
982
|
-
class Ni {
|
|
983
|
-
constructor(e, n = {}) {
|
|
984
|
-
this.version = "11.15.0", this.canTrackVelocity = null, this.events = {}, this.updateAndNotify = (s, i = !0) => {
|
|
985
|
-
const r = L.now();
|
|
986
|
-
this.updatedAt !== r && this.setPrevFrameValue(), this.prev = this.current, this.setCurrent(s), this.current !== this.prev && this.events.change && this.events.change.notify(this.current), i && this.events.renderRequest && this.events.renderRequest.notify(this.current);
|
|
987
|
-
}, this.hasAnimated = !1, this.setCurrent(e), this.owner = n.owner;
|
|
988
|
-
}
|
|
989
|
-
setCurrent(e) {
|
|
990
|
-
var n;
|
|
991
|
-
this.current = e, this.updatedAt = L.now(), this.canTrackVelocity === null && e !== void 0 && (this.canTrackVelocity = (n = this.current, !isNaN(parseFloat(n))));
|
|
992
|
-
}
|
|
993
|
-
setPrevFrameValue(e = this.current) {
|
|
994
|
-
this.prevFrameValue = e, this.prevUpdatedAt = this.updatedAt;
|
|
995
|
-
}
|
|
996
|
-
onChange(e) {
|
|
997
|
-
return process.env.NODE_ENV !== "production" && we(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", e);
|
|
998
|
-
}
|
|
999
|
-
on(e, n) {
|
|
1000
|
-
this.events[e] || (this.events[e] = new ts());
|
|
1001
|
-
const s = this.events[e].add(n);
|
|
1002
|
-
return e === "change" ? () => {
|
|
1003
|
-
s(), F.read(() => {
|
|
1004
|
-
this.events.change.getSize() || this.stop();
|
|
1005
|
-
});
|
|
1006
|
-
} : s;
|
|
1007
|
-
}
|
|
1008
|
-
clearListeners() {
|
|
1009
|
-
for (const e in this.events) this.events[e].clear();
|
|
1010
|
-
}
|
|
1011
|
-
attach(e, n) {
|
|
1012
|
-
this.passiveEffect = e, this.stopPassiveEffect = n;
|
|
1013
|
-
}
|
|
1014
|
-
set(e, n = !0) {
|
|
1015
|
-
n && this.passiveEffect ? this.passiveEffect(e, this.updateAndNotify) : this.updateAndNotify(e, n);
|
|
1016
|
-
}
|
|
1017
|
-
setWithVelocity(e, n, s) {
|
|
1018
|
-
this.set(n), this.prev = void 0, this.prevFrameValue = e, this.prevUpdatedAt = this.updatedAt - s;
|
|
1019
|
-
}
|
|
1020
|
-
jump(e, n = !0) {
|
|
1021
|
-
this.updateAndNotify(e), this.prev = e, this.prevUpdatedAt = this.prevFrameValue = void 0, n && this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
|
|
1022
|
-
}
|
|
1023
|
-
get() {
|
|
1024
|
-
return this.current;
|
|
1025
|
-
}
|
|
1026
|
-
getPrevious() {
|
|
1027
|
-
return this.prev;
|
|
1028
|
-
}
|
|
1029
|
-
getVelocity() {
|
|
1030
|
-
const e = L.now();
|
|
1031
|
-
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || e - this.updatedAt > 30) return 0;
|
|
1032
|
-
const n = Math.min(this.updatedAt - this.prevUpdatedAt, 30);
|
|
1033
|
-
return Wn(parseFloat(this.current) - parseFloat(this.prevFrameValue), n);
|
|
1034
|
-
}
|
|
1035
|
-
start(e) {
|
|
1036
|
-
return this.stop(), new Promise((n) => {
|
|
1037
|
-
this.hasAnimated = !0, this.animation = e(n), this.events.animationStart && this.events.animationStart.notify();
|
|
1038
|
-
}).then(() => {
|
|
1039
|
-
this.events.animationComplete && this.events.animationComplete.notify(), this.clearAnimation();
|
|
1040
|
-
});
|
|
1041
|
-
}
|
|
1042
|
-
stop() {
|
|
1043
|
-
this.animation && (this.animation.stop(), this.events.animationCancel && this.events.animationCancel.notify()), this.clearAnimation();
|
|
1044
|
-
}
|
|
1045
|
-
isAnimating() {
|
|
1046
|
-
return !!this.animation;
|
|
1047
|
-
}
|
|
1048
|
-
clearAnimation() {
|
|
1049
|
-
delete this.animation;
|
|
1050
|
-
}
|
|
1051
|
-
destroy() {
|
|
1052
|
-
this.clearListeners(), this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
|
|
1053
|
-
}
|
|
1054
|
-
}
|
|
1055
|
-
function ye(t, e) {
|
|
1056
|
-
return new Ni(t, e);
|
|
1057
|
-
}
|
|
1058
|
-
function Li(t, e, n) {
|
|
1059
|
-
t.hasValue(e) ? t.getValue(e).set(n) : t.addValue(e, ye(n));
|
|
1060
|
-
}
|
|
1061
|
-
const wt = (t) => t.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), ns = "data-" + wt("framerAppearId");
|
|
1062
|
-
function $i(t) {
|
|
1063
|
-
return t.props[ns];
|
|
1064
|
-
}
|
|
1065
|
-
const E = (t) => !!(t && t.getVelocity);
|
|
1066
|
-
function ji(t, e) {
|
|
1067
|
-
const n = t.getValue("willChange");
|
|
1068
|
-
if (s = n, !!(E(s) && s.add)) return n.add(e);
|
|
1069
|
-
var s;
|
|
1070
|
-
}
|
|
1071
|
-
function Ki({ protectedKeys: t, needsAnimating: e }, n) {
|
|
1072
|
-
const s = t.hasOwnProperty(n) && e[n] !== !0;
|
|
1073
|
-
return e[n] = !1, s;
|
|
1074
|
-
}
|
|
1075
|
-
function ss(t, e, { delay: n = 0, transitionOverride: s, type: i } = {}) {
|
|
1076
|
-
var r;
|
|
1077
|
-
let { transition: o = t.getDefaultTransition(), transitionEnd: a, ...l } = e;
|
|
1078
|
-
s && (o = s);
|
|
1079
|
-
const c = [], u = i && t.animationState && t.animationState.getState()[i];
|
|
1080
|
-
for (const h in l) {
|
|
1081
|
-
const d = t.getValue(h, (r = t.latestValues[h]) !== null && r !== void 0 ? r : null), f = l[h];
|
|
1082
|
-
if (f === void 0 || u && Ki(u, h)) continue;
|
|
1083
|
-
const v = { delay: n, ...yn(o || {}, h) };
|
|
1084
|
-
let p = !1;
|
|
1085
|
-
if (window.MotionHandoffAnimation) {
|
|
1086
|
-
const m = $i(t);
|
|
1087
|
-
if (m) {
|
|
1088
|
-
const S = window.MotionHandoffAnimation(m, h, F);
|
|
1089
|
-
S !== null && (v.startTime = S, p = !0);
|
|
1090
|
-
}
|
|
1091
|
-
}
|
|
1092
|
-
ji(t, h), d.start(Bi(h, d, f, t.shouldReduceMotion && q.has(h) ? { type: !1 } : v, t, p));
|
|
1093
|
-
const g = d.animation;
|
|
1094
|
-
g && c.push(g);
|
|
1095
|
-
}
|
|
1096
|
-
return a && Promise.all(c).then(() => {
|
|
1097
|
-
F.update(() => {
|
|
1098
|
-
a && function(h, d) {
|
|
1099
|
-
const f = Me(h, d);
|
|
1100
|
-
let { transitionEnd: v = {}, transition: p = {}, ...g } = f || {};
|
|
1101
|
-
g = { ...g, ...v };
|
|
1102
|
-
for (const S in g) Li(h, S, (m = g[S], Ue(m) ? m[m.length - 1] || 0 : m));
|
|
1103
|
-
var m;
|
|
1104
|
-
}(t, a);
|
|
1105
|
-
});
|
|
1106
|
-
}), c;
|
|
1107
|
-
}
|
|
1108
|
-
function et(t, e, n = {}) {
|
|
1109
|
-
var s;
|
|
1110
|
-
const i = Me(t, e, n.type === "exit" ? (s = t.presenceContext) === null || s === void 0 ? void 0 : s.custom : void 0);
|
|
1111
|
-
let { transition: r = t.getDefaultTransition() || {} } = i || {};
|
|
1112
|
-
n.transitionOverride && (r = n.transitionOverride);
|
|
1113
|
-
const o = i ? () => Promise.all(ss(t, i, n)) : () => Promise.resolve(), a = t.variantChildren && t.variantChildren.size ? (c = 0) => {
|
|
1114
|
-
const { delayChildren: u = 0, staggerChildren: h, staggerDirection: d } = r;
|
|
1115
|
-
return function(f, v, p = 0, g = 0, m = 1, S) {
|
|
1116
|
-
const x = [], C = (f.variantChildren.size - 1) * g, y = m === 1 ? (w = 0) => w * g : (w = 0) => C - w * g;
|
|
1117
|
-
return Array.from(f.variantChildren).sort(Wi).forEach((w, T) => {
|
|
1118
|
-
w.notify("AnimationStart", v), x.push(et(w, v, { ...S, delay: p + y(T) }).then(() => w.notify("AnimationComplete", v)));
|
|
1119
|
-
}), Promise.all(x);
|
|
1120
|
-
}(t, e, u + c, h, d, n);
|
|
1121
|
-
} : () => Promise.resolve(), { when: l } = r;
|
|
1122
|
-
if (l) {
|
|
1123
|
-
const [c, u] = l === "beforeChildren" ? [o, a] : [a, o];
|
|
1124
|
-
return c().then(() => u());
|
|
1125
|
-
}
|
|
1126
|
-
return Promise.all([o(), a(n.delay)]);
|
|
1127
|
-
}
|
|
1128
|
-
function Wi(t, e) {
|
|
1129
|
-
return t.sortNodePosition(e);
|
|
1130
|
-
}
|
|
1131
|
-
const Ui = ot.length;
|
|
1132
|
-
function is(t) {
|
|
1133
|
-
if (!t) return;
|
|
1134
|
-
if (!t.isControllingVariants) {
|
|
1135
|
-
const n = t.parent && is(t.parent) || {};
|
|
1136
|
-
return t.props.initial !== void 0 && (n.initial = t.props.initial), n;
|
|
1137
|
-
}
|
|
1138
|
-
const e = {};
|
|
1139
|
-
for (let n = 0; n < Ui; n++) {
|
|
1140
|
-
const s = ot[n], i = t.props[s];
|
|
1141
|
-
(le(i) || i === !1) && (e[s] = i);
|
|
1142
|
-
}
|
|
1143
|
-
return e;
|
|
1144
|
-
}
|
|
1145
|
-
const Yi = [...rt].reverse(), qi = rt.length;
|
|
1146
|
-
function zi(t) {
|
|
1147
|
-
return (e) => Promise.all(e.map(({ animation: n, options: s }) => function(i, r, o = {}) {
|
|
1148
|
-
let a;
|
|
1149
|
-
if (i.notify("AnimationStart", r), Array.isArray(r)) {
|
|
1150
|
-
const l = r.map((c) => et(i, c, o));
|
|
1151
|
-
a = Promise.all(l);
|
|
1152
|
-
} else if (typeof r == "string") a = et(i, r, o);
|
|
1153
|
-
else {
|
|
1154
|
-
const l = typeof r == "function" ? Me(i, r, o.custom) : r;
|
|
1155
|
-
a = Promise.all(ss(i, l, o));
|
|
1156
|
-
}
|
|
1157
|
-
return a.then(() => {
|
|
1158
|
-
i.notify("AnimationComplete", r);
|
|
1159
|
-
});
|
|
1160
|
-
}(t, n, s)));
|
|
1161
|
-
}
|
|
1162
|
-
function Hi(t) {
|
|
1163
|
-
let e = zi(t), n = Qt(), s = !0;
|
|
1164
|
-
const i = (o) => (a, l) => {
|
|
1165
|
-
var c;
|
|
1166
|
-
const u = Me(t, l, o === "exit" ? (c = t.presenceContext) === null || c === void 0 ? void 0 : c.custom : void 0);
|
|
1167
|
-
if (u) {
|
|
1168
|
-
const { transition: h, transitionEnd: d, ...f } = u;
|
|
1169
|
-
a = { ...a, ...f, ...d };
|
|
1170
|
-
}
|
|
1171
|
-
return a;
|
|
1172
|
-
};
|
|
1173
|
-
function r(o) {
|
|
1174
|
-
const { props: a } = t, l = is(t.parent) || {}, c = [], u = /* @__PURE__ */ new Set();
|
|
1175
|
-
let h = {}, d = 1 / 0;
|
|
1176
|
-
for (let v = 0; v < qi; v++) {
|
|
1177
|
-
const p = Yi[v], g = n[p], m = a[p] !== void 0 ? a[p] : l[p], S = le(m), x = p === o ? g.isActive : null;
|
|
1178
|
-
x === !1 && (d = v);
|
|
1179
|
-
let C = m === l[p] && m !== a[p] && S;
|
|
1180
|
-
if (C && s && t.manuallyAnimateOnMount && (C = !1), g.protectedKeys = { ...h }, !g.isActive && x === null || !m && !g.prevProp || Ce(m) || typeof m == "boolean") continue;
|
|
1181
|
-
const y = Xi(g.prevProp, m);
|
|
1182
|
-
let w = y || p === o && g.isActive && !C && S || v > d && S, T = !1;
|
|
1183
|
-
const A = Array.isArray(m) ? m : [m];
|
|
1184
|
-
let V = A.reduce(i(p), {});
|
|
1185
|
-
x === !1 && (V = {});
|
|
1186
|
-
const { prevResolvedValues: M = {} } = g, Ie = { ...M, ...V }, ie = (k) => {
|
|
1187
|
-
w = !0, u.has(k) && (T = !0, u.delete(k)), g.needsAnimating[k] = !0;
|
|
1188
|
-
const D = t.getValue(k);
|
|
1189
|
-
D && (D.liveStyle = !1);
|
|
1190
|
-
};
|
|
1191
|
-
for (const k in Ie) {
|
|
1192
|
-
const D = V[k], Re = M[k];
|
|
1193
|
-
if (h.hasOwnProperty(k)) continue;
|
|
1194
|
-
let Mt = !1;
|
|
1195
|
-
Mt = Ue(D) && Ue(Re) ? !gn(D, Re) : D !== Re, Mt ? D != null ? ie(k) : u.add(k) : D !== void 0 && u.has(k) ? ie(k) : g.protectedKeys[k] = !0;
|
|
1196
|
-
}
|
|
1197
|
-
g.prevProp = m, g.prevResolvedValues = V, g.isActive && (h = { ...h, ...V }), s && t.blockInitialAnimation && (w = !1), w && (!(C && y) || T) && c.push(...A.map((k) => ({ animation: k, options: { type: p } })));
|
|
1198
|
-
}
|
|
1199
|
-
if (u.size) {
|
|
1200
|
-
const v = {};
|
|
1201
|
-
u.forEach((p) => {
|
|
1202
|
-
const g = t.getBaseTarget(p), m = t.getValue(p);
|
|
1203
|
-
m && (m.liveStyle = !0), v[p] = g ?? null;
|
|
1204
|
-
}), c.push({ animation: v });
|
|
1205
|
-
}
|
|
1206
|
-
let f = !!c.length;
|
|
1207
|
-
return !s || a.initial !== !1 && a.initial !== a.animate || t.manuallyAnimateOnMount || (f = !1), s = !1, f ? e(c) : Promise.resolve();
|
|
1208
|
-
}
|
|
1209
|
-
return { animateChanges: r, setActive: function(o, a) {
|
|
1210
|
-
var l;
|
|
1211
|
-
if (n[o].isActive === a) return Promise.resolve();
|
|
1212
|
-
(l = t.variantChildren) === null || l === void 0 || l.forEach((u) => {
|
|
1213
|
-
var h;
|
|
1214
|
-
return (h = u.animationState) === null || h === void 0 ? void 0 : h.setActive(o, a);
|
|
1215
|
-
}), n[o].isActive = a;
|
|
1216
|
-
const c = r(o);
|
|
1217
|
-
for (const u in n) n[u].protectedKeys = {};
|
|
1218
|
-
return c;
|
|
1219
|
-
}, setAnimateFunction: function(o) {
|
|
1220
|
-
e = o(t);
|
|
1221
|
-
}, getState: () => n, reset: () => {
|
|
1222
|
-
n = Qt(), s = !0;
|
|
1223
|
-
} };
|
|
1224
|
-
}
|
|
1225
|
-
function Xi(t, e) {
|
|
1226
|
-
return typeof e == "string" ? e !== t : !!Array.isArray(e) && !gn(e, t);
|
|
1227
|
-
}
|
|
1228
|
-
function j(t = !1) {
|
|
1229
|
-
return { isActive: t, protectedKeys: {}, needsAnimating: {}, prevResolvedValues: {} };
|
|
1230
|
-
}
|
|
1231
|
-
function Qt() {
|
|
1232
|
-
return { animate: j(!0), whileInView: j(), whileHover: j(), whileTap: j(), whileDrag: j(), whileFocus: j(), exit: j() };
|
|
1233
|
-
}
|
|
1234
|
-
class G {
|
|
1235
|
-
constructor(e) {
|
|
1236
|
-
this.isMounted = !1, this.node = e;
|
|
1237
|
-
}
|
|
1238
|
-
update() {
|
|
1239
|
-
}
|
|
1240
|
-
}
|
|
1241
|
-
let _i = 0;
|
|
1242
|
-
const Gi = { animation: { Feature: class extends G {
|
|
1243
|
-
constructor(t) {
|
|
1244
|
-
super(t), t.animationState || (t.animationState = Hi(t));
|
|
1245
|
-
}
|
|
1246
|
-
updateAnimationControlsSubscription() {
|
|
1247
|
-
const { animate: t } = this.node.getProps();
|
|
1248
|
-
Ce(t) && (this.unmountControls = t.subscribe(this.node));
|
|
1249
|
-
}
|
|
1250
|
-
mount() {
|
|
1251
|
-
this.updateAnimationControlsSubscription();
|
|
1252
|
-
}
|
|
1253
|
-
update() {
|
|
1254
|
-
const { animate: t } = this.node.getProps(), { animate: e } = this.node.prevProps || {};
|
|
1255
|
-
t !== e && this.updateAnimationControlsSubscription();
|
|
1256
|
-
}
|
|
1257
|
-
unmount() {
|
|
1258
|
-
var t;
|
|
1259
|
-
this.node.animationState.reset(), (t = this.unmountControls) === null || t === void 0 || t.call(this);
|
|
1260
|
-
}
|
|
1261
|
-
} }, exit: { Feature: class extends G {
|
|
1262
|
-
constructor() {
|
|
1263
|
-
super(...arguments), this.id = _i++;
|
|
1264
|
-
}
|
|
1265
|
-
update() {
|
|
1266
|
-
if (!this.node.presenceContext) return;
|
|
1267
|
-
const { isPresent: t, onExitComplete: e } = this.node.presenceContext, { isPresent: n } = this.node.prevPresenceContext || {};
|
|
1268
|
-
if (!this.node.animationState || t === n) return;
|
|
1269
|
-
const s = this.node.animationState.setActive("exit", !t);
|
|
1270
|
-
e && !t && s.then(() => e(this.id));
|
|
1271
|
-
}
|
|
1272
|
-
mount() {
|
|
1273
|
-
const { register: t } = this.node.presenceContext || {};
|
|
1274
|
-
t && (this.unmount = t(this.id));
|
|
1275
|
-
}
|
|
1276
|
-
unmount() {
|
|
1277
|
-
}
|
|
1278
|
-
} } }, Zi = !1;
|
|
1279
|
-
function rs(t) {
|
|
1280
|
-
return { point: { x: t.pageX, y: t.pageY } };
|
|
1281
|
-
}
|
|
1282
|
-
function en(t, e, n, s = { passive: !0 }) {
|
|
1283
|
-
return t.addEventListener(e, n, s), () => t.removeEventListener(e, n);
|
|
1284
|
-
}
|
|
1285
|
-
function os(t) {
|
|
1286
|
-
return t && typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "current");
|
|
1287
|
-
}
|
|
1288
|
-
const Ji = () => ({ x: { min: 0, max: 0 }, y: { min: 0, max: 0 } }), as = ee(null), Qi = ee({}), er = ee({}), tr = {}, { schedule: nr, cancel: eo } = wn(queueMicrotask, !1);
|
|
1289
|
-
function sr(t) {
|
|
1290
|
-
const e = E(t) ? t.get() : t;
|
|
1291
|
-
return n = e, n && typeof n == "object" && n.mix && n.toValue ? e.toValue() : e;
|
|
1292
|
-
var n;
|
|
1293
|
-
}
|
|
1294
|
-
function ls(t, e) {
|
|
1295
|
-
const n = function(i) {
|
|
1296
|
-
if (i instanceof Element) return [i];
|
|
1297
|
-
if (typeof i == "string") {
|
|
1298
|
-
const r = document.querySelectorAll(i);
|
|
1299
|
-
return r ? Array.from(r) : [];
|
|
1300
|
-
}
|
|
1301
|
-
return Array.from(i);
|
|
1302
|
-
}(t), s = new AbortController();
|
|
1303
|
-
return [n, { passive: !0, ...e, signal: s.signal }, () => s.abort()];
|
|
1304
|
-
}
|
|
1305
|
-
function tn(t) {
|
|
1306
|
-
return (e) => {
|
|
1307
|
-
e.pointerType === "touch" || Zi || t(e);
|
|
1308
|
-
};
|
|
1309
|
-
}
|
|
1310
|
-
function nn(t, e, n) {
|
|
1311
|
-
const { props: s } = t;
|
|
1312
|
-
t.animationState && s.whileHover && t.animationState.setActive("whileHover", n === "Start");
|
|
1313
|
-
const i = s["onHover" + n];
|
|
1314
|
-
i && F.postRender(() => i(e, rs(e)));
|
|
1315
|
-
}
|
|
1316
|
-
const re = /* @__PURE__ */ new WeakSet();
|
|
1317
|
-
function sn(t) {
|
|
1318
|
-
return (e) => {
|
|
1319
|
-
e.key === "Enter" && t(e);
|
|
1320
|
-
};
|
|
1321
|
-
}
|
|
1322
|
-
function $e(t, e) {
|
|
1323
|
-
t.dispatchEvent(new PointerEvent("pointer" + e, { isPrimary: !0, bubbles: !0 }));
|
|
1324
|
-
}
|
|
1325
|
-
const ir = /* @__PURE__ */ new Set(["BUTTON", "INPUT", "SELECT", "TEXTAREA", "A"]), us = (t, e) => !!e && (t === e || us(t, e.parentElement));
|
|
1326
|
-
function rn(t) {
|
|
1327
|
-
return ((e) => e.pointerType === "mouse" ? typeof e.button != "number" || e.button <= 0 : e.isPrimary !== !1)(t) && !0;
|
|
1328
|
-
}
|
|
1329
|
-
function rr(t, e, n = {}) {
|
|
1330
|
-
const [s, i, r] = ls(t, n), o = (a) => {
|
|
1331
|
-
const l = a.currentTarget;
|
|
1332
|
-
if (!rn(a) || re.has(l)) return;
|
|
1333
|
-
re.add(l);
|
|
1334
|
-
const c = e(a), u = (f, v) => {
|
|
1335
|
-
window.removeEventListener("pointerup", h), window.removeEventListener("pointercancel", d), rn(f) && re.has(l) && (re.delete(l), c && c(f, { success: v }));
|
|
1336
|
-
}, h = (f) => {
|
|
1337
|
-
u(f, n.useGlobalTarget || us(l, f.target));
|
|
1338
|
-
}, d = (f) => {
|
|
1339
|
-
u(f, !1);
|
|
1340
|
-
};
|
|
1341
|
-
window.addEventListener("pointerup", h, i), window.addEventListener("pointercancel", d, i);
|
|
1342
|
-
};
|
|
1343
|
-
return s.forEach((a) => {
|
|
1344
|
-
(function(l) {
|
|
1345
|
-
return ir.has(l.tagName) || l.tabIndex !== -1;
|
|
1346
|
-
})(a) || (a.tabIndex = 0), (n.useGlobalTarget ? window : a).addEventListener("pointerdown", o, i), a.addEventListener("focus", (l) => ((c, u) => {
|
|
1347
|
-
const h = c.currentTarget;
|
|
1348
|
-
if (!h) return;
|
|
1349
|
-
const d = sn(() => {
|
|
1350
|
-
if (re.has(h)) return;
|
|
1351
|
-
$e(h, "down");
|
|
1352
|
-
const f = sn(() => {
|
|
1353
|
-
$e(h, "up");
|
|
1354
|
-
});
|
|
1355
|
-
h.addEventListener("keyup", f, u), h.addEventListener("blur", () => $e(h, "cancel"), u);
|
|
1356
|
-
});
|
|
1357
|
-
h.addEventListener("keydown", d, u), h.addEventListener("blur", () => h.removeEventListener("keydown", d), u);
|
|
1358
|
-
})(l, i), i);
|
|
1359
|
-
}), r;
|
|
1360
|
-
}
|
|
1361
|
-
function on(t, e, n) {
|
|
1362
|
-
const { props: s } = t;
|
|
1363
|
-
t.animationState && s.whileTap && t.animationState.setActive("whileTap", n === "Start");
|
|
1364
|
-
const i = s["onTap" + (n === "End" ? "" : n)];
|
|
1365
|
-
i && F.postRender(() => i(e, rs(e)));
|
|
1366
|
-
}
|
|
1367
|
-
const tt = /* @__PURE__ */ new WeakMap(), je = /* @__PURE__ */ new WeakMap(), or = (t) => {
|
|
1368
|
-
const e = tt.get(t.target);
|
|
1369
|
-
e && e(t);
|
|
1370
|
-
}, ar = (t) => {
|
|
1371
|
-
t.forEach(or);
|
|
1372
|
-
};
|
|
1373
|
-
function lr(t, e, n) {
|
|
1374
|
-
const s = function({ root: i, ...r }) {
|
|
1375
|
-
const o = i || document;
|
|
1376
|
-
je.has(o) || je.set(o, {});
|
|
1377
|
-
const a = je.get(o), l = JSON.stringify(r);
|
|
1378
|
-
return a[l] || (a[l] = new IntersectionObserver(ar, { root: i, ...r })), a[l];
|
|
1379
|
-
}(e);
|
|
1380
|
-
return tt.set(t, n), s.observe(t), () => {
|
|
1381
|
-
tt.delete(t), s.unobserve(t);
|
|
1382
|
-
};
|
|
1383
|
-
}
|
|
1384
|
-
const ur = { some: 0, all: 1 }, cr = { inView: { Feature: class extends G {
|
|
1385
|
-
constructor() {
|
|
1386
|
-
super(...arguments), this.hasEnteredView = !1, this.isInView = !1;
|
|
1387
|
-
}
|
|
1388
|
-
startObserver() {
|
|
1389
|
-
this.unmount();
|
|
1390
|
-
const { viewport: t = {} } = this.node.getProps(), { root: e, margin: n, amount: s = "some", once: i } = t, r = { root: e ? e.current : void 0, rootMargin: n, threshold: typeof s == "number" ? s : ur[s] };
|
|
1391
|
-
return lr(this.node.current, r, (o) => {
|
|
1392
|
-
const { isIntersecting: a } = o;
|
|
1393
|
-
if (this.isInView === a || (this.isInView = a, i && !a && this.hasEnteredView)) return;
|
|
1394
|
-
a && (this.hasEnteredView = !0), this.node.animationState && this.node.animationState.setActive("whileInView", a);
|
|
1395
|
-
const { onViewportEnter: l, onViewportLeave: c } = this.node.getProps(), u = a ? l : c;
|
|
1396
|
-
u && u(o);
|
|
1397
|
-
});
|
|
1398
|
-
}
|
|
1399
|
-
mount() {
|
|
1400
|
-
this.startObserver();
|
|
1401
|
-
}
|
|
1402
|
-
update() {
|
|
1403
|
-
if (typeof IntersectionObserver > "u") return;
|
|
1404
|
-
const { props: t, prevProps: e } = this.node;
|
|
1405
|
-
["amount", "margin", "root"].some(function({ viewport: n = {} }, { viewport: s = {} } = {}) {
|
|
1406
|
-
return (i) => n[i] !== s[i];
|
|
1407
|
-
}(t, e)) && this.startObserver();
|
|
1408
|
-
}
|
|
1409
|
-
unmount() {
|
|
1410
|
-
}
|
|
1411
|
-
} }, tap: { Feature: class extends G {
|
|
1412
|
-
mount() {
|
|
1413
|
-
const { current: t } = this.node;
|
|
1414
|
-
t && (this.unmount = rr(t, (e) => (on(this.node, e, "Start"), (n, { success: s }) => on(this.node, n, s ? "End" : "Cancel")), { useGlobalTarget: this.node.props.globalTapTarget }));
|
|
1415
|
-
}
|
|
1416
|
-
unmount() {
|
|
1417
|
-
}
|
|
1418
|
-
} }, focus: { Feature: class extends G {
|
|
1419
|
-
constructor() {
|
|
1420
|
-
super(...arguments), this.isActive = !1;
|
|
1421
|
-
}
|
|
1422
|
-
onFocus() {
|
|
1423
|
-
let t = !1;
|
|
1424
|
-
try {
|
|
1425
|
-
t = this.node.current.matches(":focus-visible");
|
|
1426
|
-
} catch {
|
|
1427
|
-
t = !0;
|
|
1428
|
-
}
|
|
1429
|
-
t && this.node.animationState && (this.node.animationState.setActive("whileFocus", !0), this.isActive = !0);
|
|
1430
|
-
}
|
|
1431
|
-
onBlur() {
|
|
1432
|
-
this.isActive && this.node.animationState && (this.node.animationState.setActive("whileFocus", !1), this.isActive = !1);
|
|
1433
|
-
}
|
|
1434
|
-
mount() {
|
|
1435
|
-
this.unmount = ke(en(this.node.current, "focus", () => this.onFocus()), en(this.node.current, "blur", () => this.onBlur()));
|
|
1436
|
-
}
|
|
1437
|
-
unmount() {
|
|
1438
|
-
}
|
|
1439
|
-
} }, hover: { Feature: class extends G {
|
|
1440
|
-
mount() {
|
|
1441
|
-
const { current: t } = this.node;
|
|
1442
|
-
t && (this.unmount = function(e, n, s = {}) {
|
|
1443
|
-
const [i, r, o] = ls(e, s), a = tn((l) => {
|
|
1444
|
-
const { target: c } = l, u = n(l);
|
|
1445
|
-
if (!u || !c) return;
|
|
1446
|
-
const h = tn((d) => {
|
|
1447
|
-
u(d), c.removeEventListener("pointerleave", h);
|
|
1448
|
-
});
|
|
1449
|
-
c.addEventListener("pointerleave", h, r);
|
|
1450
|
-
});
|
|
1451
|
-
return i.forEach((l) => {
|
|
1452
|
-
l.addEventListener("pointerenter", a, r);
|
|
1453
|
-
}), o;
|
|
1454
|
-
}(t, (e) => (nn(this.node, e, "Start"), (n) => nn(this.node, n, "End"))));
|
|
1455
|
-
}
|
|
1456
|
-
unmount() {
|
|
1457
|
-
}
|
|
1458
|
-
} } }, cs = ee({ transformPagePoint: (t) => t, isStatic: !1, reducedMotion: "never" }), Fe = ee({}), bt = typeof window < "u", hr = bt ? Ts : st, St = ee({ strict: !1 });
|
|
1459
|
-
function dr(t, e, n, s, i) {
|
|
1460
|
-
var r, o;
|
|
1461
|
-
const { visualElement: a } = O(Fe), l = O(St), c = O(as), u = O(cs).reducedMotion, h = Z(null);
|
|
1462
|
-
s = s || l.renderer, !h.current && s && (h.current = s(t, { visualState: e, parent: a, props: n, presenceContext: c, blockInitialAnimation: !!c && c.initial === !1, reducedMotionConfig: u }));
|
|
1463
|
-
const d = h.current, f = O(er);
|
|
1464
|
-
!d || d.projection || !i || d.type !== "html" && d.type !== "svg" || function(m, S, x, C) {
|
|
1465
|
-
const { layoutId: y, layout: w, drag: T, dragConstraints: A, layoutScroll: V, layoutRoot: M } = S;
|
|
1466
|
-
m.projection = new x(m.latestValues, S["data-framer-portal-id"] ? void 0 : hs(m.parent)), m.projection.setOptions({ layoutId: y, layout: w, alwaysMeasureLayout: !!T || A && os(A), visualElement: m, animationType: typeof w == "string" ? w : "both", initialPromotionConfig: C, layoutScroll: V, layoutRoot: M });
|
|
1467
|
-
}(h.current, n, i, f);
|
|
1468
|
-
const v = Z(!1);
|
|
1469
|
-
xs(() => {
|
|
1470
|
-
d && v.current && d.update(n, c);
|
|
1471
|
-
});
|
|
1472
|
-
const p = n[ns], g = Z(!!p && !(!((r = window.MotionHandoffIsComplete) === null || r === void 0) && r.call(window, p)) && ((o = window.MotionHasOptimisedAnimation) === null || o === void 0 ? void 0 : o.call(window, p)));
|
|
1473
|
-
return hr(() => {
|
|
1474
|
-
d && (v.current = !0, window.MotionIsMounted = !0, d.updateFeatures(), nr.render(d.render), g.current && d.animationState && d.animationState.animateChanges());
|
|
1475
|
-
}), st(() => {
|
|
1476
|
-
d && (!g.current && d.animationState && d.animationState.animateChanges(), g.current && (queueMicrotask(() => {
|
|
1477
|
-
var m;
|
|
1478
|
-
(m = window.MotionHandoffMarkAsComplete) === null || m === void 0 || m.call(window, p);
|
|
1479
|
-
}), g.current = !1));
|
|
1480
|
-
}), d;
|
|
1481
|
-
}
|
|
1482
|
-
function hs(t) {
|
|
1483
|
-
if (t) return t.options.allowProjection !== !1 ? t.projection : hs(t.parent);
|
|
1484
|
-
}
|
|
1485
|
-
function pr(t, e, n) {
|
|
1486
|
-
return fn((s) => {
|
|
1487
|
-
s && t.mount && t.mount(s), e && (s ? e.mount(s) : e.unmount()), n && (typeof n == "function" ? n(s) : os(n) && (n.current = s));
|
|
1488
|
-
}, [e]);
|
|
1489
|
-
}
|
|
1490
|
-
function Oe(t) {
|
|
1491
|
-
return Ce(t.animate) || ot.some((e) => le(t[e]));
|
|
1492
|
-
}
|
|
1493
|
-
function ds(t) {
|
|
1494
|
-
return !!(Oe(t) || t.variants);
|
|
1495
|
-
}
|
|
1496
|
-
function mr(t) {
|
|
1497
|
-
const { initial: e, animate: n } = function(s, i) {
|
|
1498
|
-
if (Oe(s)) {
|
|
1499
|
-
const { initial: r, animate: o } = s;
|
|
1500
|
-
return { initial: r === !1 || le(r) ? r : void 0, animate: le(o) ? o : void 0 };
|
|
1501
|
-
}
|
|
1502
|
-
return s.inherit !== !1 ? i : {};
|
|
1503
|
-
}(t, O(Fe));
|
|
1504
|
-
return Ve(() => ({ initial: e, animate: n }), [an(e), an(n)]);
|
|
1505
|
-
}
|
|
1506
|
-
function an(t) {
|
|
1507
|
-
return Array.isArray(t) ? t.join(" ") : t;
|
|
1508
|
-
}
|
|
1509
|
-
const ln = { 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"] }, Q = {};
|
|
1510
|
-
for (const t in ln) Q[t] = { isEnabled: (e) => ln[t].some((n) => !!e[n]) };
|
|
1511
|
-
function nt(t) {
|
|
1512
|
-
for (const e in t) Q[e] = { ...Q[e], ...t[e] };
|
|
1513
|
-
}
|
|
1514
|
-
const fr = Symbol.for("motionComponentSymbol");
|
|
1515
|
-
function vr({ preloadedFeatures: t, createVisualElement: e, useRender: n, useVisualState: s, Component: i }) {
|
|
1516
|
-
t && nt(t);
|
|
1517
|
-
const r = As(function(o, a) {
|
|
1518
|
-
let l;
|
|
1519
|
-
const c = { ...O(cs), ...o, layoutId: gr(o) }, { isStatic: u } = c, h = mr(o), d = s(o, u);
|
|
1520
|
-
if (!u && bt) {
|
|
1521
|
-
(function(v, p) {
|
|
1522
|
-
const g = O(St).strict;
|
|
1523
|
-
if (process.env.NODE_ENV !== "production" && p && g) {
|
|
1524
|
-
const m = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";
|
|
1525
|
-
v.ignoreStrict ? te(!1, m) : U(!1, m);
|
|
1526
|
-
}
|
|
1527
|
-
})(c, t);
|
|
1528
|
-
const f = function(v) {
|
|
1529
|
-
const { drag: p, layout: g } = Q;
|
|
1530
|
-
if (!p && !g) return {};
|
|
1531
|
-
const m = { ...p, ...g };
|
|
1532
|
-
return { MeasureLayout: p != null && p.isEnabled(v) || g != null && g.isEnabled(v) ? m.MeasureLayout : void 0, ProjectionNode: m.ProjectionNode };
|
|
1533
|
-
}(c);
|
|
1534
|
-
l = f.MeasureLayout, h.visualElement = dr(i, d, c, e, f.ProjectionNode);
|
|
1535
|
-
}
|
|
1536
|
-
return H(Fe.Provider, { value: h, children: [l && h.visualElement ? I(l, { visualElement: h.visualElement, ...c }) : null, n(i, o, pr(d, h.visualElement, a), d, u, h.visualElement)] });
|
|
1537
|
-
});
|
|
1538
|
-
return r[fr] = i, r;
|
|
1539
|
-
}
|
|
1540
|
-
function gr({ layoutId: t }) {
|
|
1541
|
-
const e = O(Qi).id;
|
|
1542
|
-
return e && t !== void 0 ? e + "-" + t : t;
|
|
1543
|
-
}
|
|
1544
|
-
const yr = ["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"];
|
|
1545
|
-
function Tt(t) {
|
|
1546
|
-
return typeof t == "string" && !t.includes("-") && !!(yr.indexOf(t) > -1 || /[A-Z]/u.test(t));
|
|
1547
|
-
}
|
|
1548
|
-
function ps(t, { style: e, vars: n }, s, i) {
|
|
1549
|
-
Object.assign(t.style, e, i && i.getProjectionStyles(s));
|
|
1550
|
-
for (const r in n) t.style.setProperty(r, n[r]);
|
|
1551
|
-
}
|
|
1552
|
-
const ms = /* @__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"]);
|
|
1553
|
-
function fs(t, e, n, s) {
|
|
1554
|
-
ps(t, e, void 0, s);
|
|
1555
|
-
for (const i in e.attrs) t.setAttribute(ms.has(i) ? i : wt(i), e.attrs[i]);
|
|
1556
|
-
}
|
|
1557
|
-
function vs(t, { layout: e, layoutId: n }) {
|
|
1558
|
-
return q.has(t) || t.startsWith("origin") || (e || n !== void 0) && (!!tr[t] || t === "opacity");
|
|
1559
|
-
}
|
|
1560
|
-
function xt(t, e, n) {
|
|
1561
|
-
var s;
|
|
1562
|
-
const { style: i } = t, r = {};
|
|
1563
|
-
for (const o in i) (E(i[o]) || e.style && E(e.style[o]) || vs(o, t) || ((s = n == null ? void 0 : n.getValue(o)) === null || s === void 0 ? void 0 : s.liveStyle) !== void 0) && (r[o] = i[o]);
|
|
1564
|
-
return r;
|
|
1565
|
-
}
|
|
1566
|
-
function gs(t, e, n) {
|
|
1567
|
-
const s = xt(t, e, n);
|
|
1568
|
-
for (const i in t) (E(t[i]) || E(e[i])) && (s[he.indexOf(i) !== -1 ? "attr" + i.charAt(0).toUpperCase() + i.substring(1) : i] = t[i]);
|
|
1569
|
-
return s;
|
|
1570
|
-
}
|
|
1571
|
-
const ys = (t) => (e, n) => {
|
|
1572
|
-
const s = O(Fe), i = O(as), r = () => function({ scrapeMotionValuesFromProps: o, createRenderState: a, onMount: l }, c, u, h) {
|
|
1573
|
-
const d = { latestValues: wr(c, u, h, o), renderState: a() };
|
|
1574
|
-
return l && (d.mount = (f) => l(c, f, d)), d;
|
|
1575
|
-
}(t, e, s, i);
|
|
1576
|
-
return n ? r() : function(o) {
|
|
1577
|
-
const a = Z(null);
|
|
1578
|
-
return a.current === null && (a.current = o()), a.current;
|
|
1579
|
-
}(r);
|
|
1580
|
-
};
|
|
1581
|
-
function wr(t, e, n, s) {
|
|
1582
|
-
const i = {}, r = s(t, {});
|
|
1583
|
-
for (const d in r) i[d] = sr(r[d]);
|
|
1584
|
-
let { initial: o, animate: a } = t;
|
|
1585
|
-
const l = Oe(t), c = ds(t);
|
|
1586
|
-
e && c && !l && t.inherit !== !1 && (o === void 0 && (o = e.initial), a === void 0 && (a = e.animate));
|
|
1587
|
-
let u = !!n && n.initial === !1;
|
|
1588
|
-
u = u || o === !1;
|
|
1589
|
-
const h = u ? a : o;
|
|
1590
|
-
if (h && typeof h != "boolean" && !Ce(h)) {
|
|
1591
|
-
const d = Array.isArray(h) ? h : [h];
|
|
1592
|
-
for (let f = 0; f < d.length; f++) {
|
|
1593
|
-
const v = it(t, d[f]);
|
|
1594
|
-
if (v) {
|
|
1595
|
-
const { transitionEnd: p, transition: g, ...m } = v;
|
|
1596
|
-
for (const S in m) {
|
|
1597
|
-
let x = m[S];
|
|
1598
|
-
Array.isArray(x) && (x = x[u ? x.length - 1 : 0]), x !== null && (i[S] = x);
|
|
1599
|
-
}
|
|
1600
|
-
for (const S in p) i[S] = p[S];
|
|
1601
|
-
}
|
|
1602
|
-
}
|
|
1603
|
-
}
|
|
1604
|
-
return i;
|
|
1605
|
-
}
|
|
1606
|
-
const br = () => ({ style: {}, transform: {}, transformOrigin: {}, vars: {} }), Sr = () => ({ style: {}, transform: {}, transformOrigin: {}, vars: {}, attrs: {} }), un = (t, e) => e && typeof t == "number" ? e.transform(t) : t, Tr = { x: "translateX", y: "translateY", z: "translateZ", transformPerspective: "perspective" }, xr = he.length;
|
|
1607
|
-
function At(t, e, n) {
|
|
1608
|
-
const { style: s, vars: i, transformOrigin: r } = t;
|
|
1609
|
-
let o = !1, a = !1;
|
|
1610
|
-
for (const l in e) {
|
|
1611
|
-
const c = e[l];
|
|
1612
|
-
if (q.has(l)) o = !0;
|
|
1613
|
-
else if (kn(l)) i[l] = c;
|
|
1614
|
-
else {
|
|
1615
|
-
const u = un(c, _e[l]);
|
|
1616
|
-
l.startsWith("origin") ? (a = !0, r[l] = u) : s[l] = u;
|
|
1617
|
-
}
|
|
1618
|
-
}
|
|
1619
|
-
if (e.transform || (o || n ? s.transform = function(l, c, u) {
|
|
1620
|
-
let h = "", d = !0;
|
|
1621
|
-
for (let f = 0; f < xr; f++) {
|
|
1622
|
-
const v = he[f], p = l[v];
|
|
1623
|
-
if (p === void 0) continue;
|
|
1624
|
-
let g = !0;
|
|
1625
|
-
if (g = typeof p == "number" ? p === (v.startsWith("scale") ? 1 : 0) : parseFloat(p) === 0, !g || u) {
|
|
1626
|
-
const m = un(p, _e[v]);
|
|
1627
|
-
g || (d = !1, h += `${Tr[v] || v}(${m}) `), u && (c[v] = m);
|
|
1628
|
-
}
|
|
1629
|
-
}
|
|
1630
|
-
return h = h.trim(), u ? h = u(c, d ? "" : h) : d && (h = "none"), h;
|
|
1631
|
-
}(e, t.transform, n) : s.transform && (s.transform = "none")), a) {
|
|
1632
|
-
const { originX: l = "50%", originY: c = "50%", originZ: u = 0 } = r;
|
|
1633
|
-
s.transformOrigin = `${l} ${c} ${u}`;
|
|
1634
|
-
}
|
|
1635
|
-
}
|
|
1636
|
-
function cn(t, e, n) {
|
|
1637
|
-
return typeof t == "string" ? t : b.transform(e + n * t);
|
|
1638
|
-
}
|
|
1639
|
-
const Ar = { offset: "stroke-dashoffset", array: "stroke-dasharray" }, Vr = { offset: "strokeDashoffset", array: "strokeDasharray" };
|
|
1640
|
-
function Vt(t, { attrX: e, attrY: n, attrScale: s, originX: i, originY: r, pathLength: o, pathSpacing: a = 1, pathOffset: l = 0, ...c }, u, h) {
|
|
1641
|
-
if (At(t, c, h), u) return void (t.style.viewBox && (t.attrs.viewBox = t.style.viewBox));
|
|
1642
|
-
t.attrs = t.style, t.style = {};
|
|
1643
|
-
const { attrs: d, style: f, dimensions: v } = t;
|
|
1644
|
-
d.transform && (v && (f.transform = d.transform), delete d.transform), v && (i !== void 0 || r !== void 0 || f.transform) && (f.transformOrigin = function(p, g, m) {
|
|
1645
|
-
return `${cn(g, p.x, p.width)} ${cn(m, p.y, p.height)}`;
|
|
1646
|
-
}(v, i !== void 0 ? i : 0.5, r !== void 0 ? r : 0.5)), e !== void 0 && (d.x = e), n !== void 0 && (d.y = n), s !== void 0 && (d.scale = s), o !== void 0 && function(p, g, m = 1, S = 0, x = !0) {
|
|
1647
|
-
p.pathLength = 1;
|
|
1648
|
-
const C = x ? Ar : Vr;
|
|
1649
|
-
p[C.offset] = b.transform(-S);
|
|
1650
|
-
const y = b.transform(g), w = b.transform(m);
|
|
1651
|
-
p[C.array] = `${y} ${w}`;
|
|
1652
|
-
}(d, o, a, l, !1);
|
|
1653
|
-
}
|
|
1654
|
-
const Ct = (t) => typeof t == "string" && t.toLowerCase() === "svg", Cr = { useVisualState: ys({ scrapeMotionValuesFromProps: gs, createRenderState: Sr, onMount: (t, e, { renderState: n, latestValues: s }) => {
|
|
1655
|
-
F.read(() => {
|
|
1656
|
-
try {
|
|
1657
|
-
n.dimensions = typeof e.getBBox == "function" ? e.getBBox() : e.getBoundingClientRect();
|
|
1658
|
-
} catch {
|
|
1659
|
-
n.dimensions = { x: 0, y: 0, width: 0, height: 0 };
|
|
1660
|
-
}
|
|
1661
|
-
}), F.render(() => {
|
|
1662
|
-
Vt(n, s, Ct(e.tagName), t.transformTemplate), fs(e, n);
|
|
1663
|
-
});
|
|
1664
|
-
} }) }, Mr = { useVisualState: ys({ scrapeMotionValuesFromProps: xt, createRenderState: br }) };
|
|
1665
|
-
function ws(t, e, n) {
|
|
1666
|
-
for (const s in e) E(e[s]) || vs(s, n) || (t[s] = e[s]);
|
|
1667
|
-
}
|
|
1668
|
-
function Pr(t, e) {
|
|
1669
|
-
const n = {};
|
|
1670
|
-
return ws(n, t.style || {}, t), Object.assign(n, function({ transformTemplate: s }, i) {
|
|
1671
|
-
return Ve(() => {
|
|
1672
|
-
const r = { style: {}, transform: {}, transformOrigin: {}, vars: {} };
|
|
1673
|
-
return At(r, i, s), Object.assign({}, r.vars, r.style);
|
|
1674
|
-
}, [i]);
|
|
1675
|
-
}(t, e)), n;
|
|
1676
|
-
}
|
|
1677
|
-
function kr(t, e) {
|
|
1678
|
-
const n = {}, s = Pr(t, e);
|
|
1679
|
-
return t.drag && t.dragListener !== !1 && (n.draggable = !1, s.userSelect = s.WebkitUserSelect = s.WebkitTouchCallout = "none", s.touchAction = t.drag === !0 ? "none" : "pan-" + (t.drag === "x" ? "y" : "x")), t.tabIndex === void 0 && (t.onTap || t.onTapStart || t.whileTap) && (n.tabIndex = 0), n.style = s, n;
|
|
1680
|
-
}
|
|
1681
|
-
const Er = /* @__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"]);
|
|
1682
|
-
function Ae(t) {
|
|
1683
|
-
return t.startsWith("while") || t.startsWith("drag") && t !== "draggable" || t.startsWith("layout") || t.startsWith("onTap") || t.startsWith("onPan") || t.startsWith("onLayout") || Er.has(t);
|
|
1684
|
-
}
|
|
1685
|
-
let bs = (t) => !Ae(t);
|
|
1686
|
-
try {
|
|
1687
|
-
(hn = require("@emotion/is-prop-valid").default) && (bs = (t) => t.startsWith("on") ? !Ae(t) : hn(t));
|
|
1688
|
-
} catch {
|
|
1689
|
-
}
|
|
1690
|
-
var hn;
|
|
1691
|
-
function Fr(t, e, n, s) {
|
|
1692
|
-
const i = Ve(() => {
|
|
1693
|
-
const r = { style: {}, transform: {}, transformOrigin: {}, vars: {}, attrs: {} };
|
|
1694
|
-
return Vt(r, e, Ct(s), t.transformTemplate), { ...r.attrs, style: { ...r.style } };
|
|
1695
|
-
}, [e]);
|
|
1696
|
-
if (t.style) {
|
|
1697
|
-
const r = {};
|
|
1698
|
-
ws(r, t.style, t), i.style = { ...r, ...i.style };
|
|
1699
|
-
}
|
|
1700
|
-
return i;
|
|
1701
|
-
}
|
|
1702
|
-
function Or(t = !1) {
|
|
1703
|
-
return (e, n, s, { latestValues: i }, r) => {
|
|
1704
|
-
const o = (Tt(e) ? Fr : kr)(n, i, r, e), a = function(h, d, f) {
|
|
1705
|
-
const v = {};
|
|
1706
|
-
for (const p in h) p === "values" && typeof h.values == "object" || (bs(p) || f === !0 && Ae(p) || !d && !Ae(p) || h.draggable && p.startsWith("onDrag")) && (v[p] = h[p]);
|
|
1707
|
-
return v;
|
|
1708
|
-
}(n, typeof e == "string", t), l = e !== vn ? { ...a, ...o, ref: s } : {}, { children: c } = n, u = Ve(() => E(c) ? c.get() : c, [c]);
|
|
1709
|
-
return Vs(e, { ...l, children: u });
|
|
1710
|
-
};
|
|
1711
|
-
}
|
|
1712
|
-
function Ir(t, e) {
|
|
1713
|
-
return function(n, { forwardMotionProps: s } = { forwardMotionProps: !1 }) {
|
|
1714
|
-
return vr({ ...Tt(n) ? Cr : Mr, preloadedFeatures: t, useRender: Or(s), createVisualElement: e, Component: n });
|
|
1715
|
-
};
|
|
1716
|
-
}
|
|
1717
|
-
const Ke = { current: null }, dn = { current: !1 }, pn = /* @__PURE__ */ new WeakMap(), Rr = [...On, P, se], mn = ["AnimationStart", "AnimationComplete", "Update", "BeforeLayoutMeasure", "LayoutMeasure", "LayoutAnimationStart", "LayoutAnimationComplete"];
|
|
1718
|
-
class Dr {
|
|
1719
|
-
scrapeMotionValuesFromProps(e, n, s) {
|
|
1720
|
-
return {};
|
|
1721
|
-
}
|
|
1722
|
-
constructor({ parent: e, props: n, presenceContext: s, reducedMotionConfig: i, blockInitialAnimation: r, visualState: o }, a = {}) {
|
|
1723
|
-
this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = ct, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
|
|
1724
|
-
this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
|
|
1725
|
-
}, this.renderScheduledAt = 0, this.scheduleRender = () => {
|
|
1726
|
-
const d = L.now();
|
|
1727
|
-
this.renderScheduledAt < d && (this.renderScheduledAt = d, F.render(this.render, !1, !0));
|
|
1728
|
-
};
|
|
1729
|
-
const { latestValues: l, renderState: c } = o;
|
|
1730
|
-
this.latestValues = l, this.baseTarget = { ...l }, this.initialValues = n.initial ? { ...l } : {}, this.renderState = c, this.parent = e, this.props = n, this.presenceContext = s, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = i, this.options = a, this.blockInitialAnimation = !!r, this.isControllingVariants = Oe(n), this.isVariantNode = ds(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(e && e.current);
|
|
1731
|
-
const { willChange: u, ...h } = this.scrapeMotionValuesFromProps(n, {}, this);
|
|
1732
|
-
for (const d in h) {
|
|
1733
|
-
const f = h[d];
|
|
1734
|
-
l[d] !== void 0 && E(f) && f.set(l[d], !1);
|
|
1735
|
-
}
|
|
1736
|
-
}
|
|
1737
|
-
mount(e) {
|
|
1738
|
-
this.current = e, pn.set(e, this), this.projection && !this.projection.instance && this.projection.mount(e), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((n, s) => this.bindToMotionValue(s, n)), dn.current || function() {
|
|
1739
|
-
if (dn.current = !0, bt) if (window.matchMedia) {
|
|
1740
|
-
const n = window.matchMedia("(prefers-reduced-motion)"), s = () => Ke.current = n.matches;
|
|
1741
|
-
n.addListener(s), s();
|
|
1742
|
-
} else Ke.current = !1;
|
|
1743
|
-
}(), this.shouldReduceMotion = this.reducedMotionConfig !== "never" && (this.reducedMotionConfig === "always" || Ke.current), process.env.NODE_ENV !== "production" && we(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected."), this.parent && this.parent.children.add(this), this.update(this.props, this.presenceContext);
|
|
1744
|
-
}
|
|
1745
|
-
unmount() {
|
|
1746
|
-
pn.delete(this.current), this.projection && this.projection.unmount(), Ye(this.notifyUpdate), Ye(this.render), this.valueSubscriptions.forEach((e) => e()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent && this.parent.children.delete(this);
|
|
1747
|
-
for (const e in this.events) this.events[e].clear();
|
|
1748
|
-
for (const e in this.features) {
|
|
1749
|
-
const n = this.features[e];
|
|
1750
|
-
n && (n.unmount(), n.isMounted = !1);
|
|
1751
|
-
}
|
|
1752
|
-
this.current = null;
|
|
1753
|
-
}
|
|
1754
|
-
bindToMotionValue(e, n) {
|
|
1755
|
-
this.valueSubscriptions.has(e) && this.valueSubscriptions.get(e)();
|
|
1756
|
-
const s = q.has(e), i = n.on("change", (a) => {
|
|
1757
|
-
this.latestValues[e] = a, this.props.onUpdate && F.preRender(this.notifyUpdate), s && this.projection && (this.projection.isTransformDirty = !0);
|
|
1758
|
-
}), r = n.on("renderRequest", this.scheduleRender);
|
|
1759
|
-
let o;
|
|
1760
|
-
window.MotionCheckAppearSync && (o = window.MotionCheckAppearSync(this, e, n)), this.valueSubscriptions.set(e, () => {
|
|
1761
|
-
i(), r(), o && o(), n.owner && n.stop();
|
|
1762
|
-
});
|
|
1763
|
-
}
|
|
1764
|
-
sortNodePosition(e) {
|
|
1765
|
-
return this.current && this.sortInstanceNodePosition && this.type === e.type ? this.sortInstanceNodePosition(this.current, e.current) : 0;
|
|
1766
|
-
}
|
|
1767
|
-
updateFeatures() {
|
|
1768
|
-
let e = "animation";
|
|
1769
|
-
for (e in Q) {
|
|
1770
|
-
const n = Q[e];
|
|
1771
|
-
if (!n) continue;
|
|
1772
|
-
const { isEnabled: s, Feature: i } = n;
|
|
1773
|
-
if (!this.features[e] && i && s(this.props) && (this.features[e] = new i(this)), this.features[e]) {
|
|
1774
|
-
const r = this.features[e];
|
|
1775
|
-
r.isMounted ? r.update() : (r.mount(), r.isMounted = !0);
|
|
1776
|
-
}
|
|
1777
|
-
}
|
|
1778
|
-
}
|
|
1779
|
-
triggerBuild() {
|
|
1780
|
-
this.build(this.renderState, this.latestValues, this.props);
|
|
1781
|
-
}
|
|
1782
|
-
measureViewportBox() {
|
|
1783
|
-
return this.current ? this.measureInstanceViewportBox(this.current, this.props) : { x: { min: 0, max: 0 }, y: { min: 0, max: 0 } };
|
|
1784
|
-
}
|
|
1785
|
-
getStaticValue(e) {
|
|
1786
|
-
return this.latestValues[e];
|
|
1787
|
-
}
|
|
1788
|
-
setStaticValue(e, n) {
|
|
1789
|
-
this.latestValues[e] = n;
|
|
1790
|
-
}
|
|
1791
|
-
update(e, n) {
|
|
1792
|
-
(e.transformTemplate || this.props.transformTemplate) && this.scheduleRender(), this.prevProps = this.props, this.props = e, this.prevPresenceContext = this.presenceContext, this.presenceContext = n;
|
|
1793
|
-
for (let s = 0; s < mn.length; s++) {
|
|
1794
|
-
const i = mn[s];
|
|
1795
|
-
this.propEventSubscriptions[i] && (this.propEventSubscriptions[i](), delete this.propEventSubscriptions[i]);
|
|
1796
|
-
const r = e["on" + i];
|
|
1797
|
-
r && (this.propEventSubscriptions[i] = this.on(i, r));
|
|
1798
|
-
}
|
|
1799
|
-
this.prevMotionValues = function(s, i, r) {
|
|
1800
|
-
for (const o in i) {
|
|
1801
|
-
const a = i[o], l = r[o];
|
|
1802
|
-
if (E(a)) s.addValue(o, a), process.env.NODE_ENV === "development" && we(a.version === "11.15.0", `Attempting to mix Motion versions ${a.version} with 11.15.0 may not work as expected.`);
|
|
1803
|
-
else if (E(l)) s.addValue(o, ye(a, { owner: s }));
|
|
1804
|
-
else if (l !== a) if (s.hasValue(o)) {
|
|
1805
|
-
const c = s.getValue(o);
|
|
1806
|
-
c.liveStyle === !0 ? c.jump(a) : c.hasAnimated || c.set(a);
|
|
1807
|
-
} else {
|
|
1808
|
-
const c = s.getStaticValue(o);
|
|
1809
|
-
s.addValue(o, ye(c !== void 0 ? c : a, { owner: s }));
|
|
1810
|
-
}
|
|
1811
|
-
}
|
|
1812
|
-
for (const o in r) i[o] === void 0 && s.removeValue(o);
|
|
1813
|
-
return i;
|
|
1814
|
-
}(this, this.scrapeMotionValuesFromProps(e, this.prevProps, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
|
|
1815
|
-
}
|
|
1816
|
-
getProps() {
|
|
1817
|
-
return this.props;
|
|
1818
|
-
}
|
|
1819
|
-
getVariant(e) {
|
|
1820
|
-
return this.props.variants ? this.props.variants[e] : void 0;
|
|
1821
|
-
}
|
|
1822
|
-
getDefaultTransition() {
|
|
1823
|
-
return this.props.transition;
|
|
1824
|
-
}
|
|
1825
|
-
getTransformPagePoint() {
|
|
1826
|
-
return this.props.transformPagePoint;
|
|
1827
|
-
}
|
|
1828
|
-
getClosestVariantNode() {
|
|
1829
|
-
return this.isVariantNode ? this : this.parent ? this.parent.getClosestVariantNode() : void 0;
|
|
1830
|
-
}
|
|
1831
|
-
addVariantChild(e) {
|
|
1832
|
-
const n = this.getClosestVariantNode();
|
|
1833
|
-
if (n) return n.variantChildren && n.variantChildren.add(e), () => n.variantChildren.delete(e);
|
|
1834
|
-
}
|
|
1835
|
-
addValue(e, n) {
|
|
1836
|
-
const s = this.values.get(e);
|
|
1837
|
-
n !== s && (s && this.removeValue(e), this.bindToMotionValue(e, n), this.values.set(e, n), this.latestValues[e] = n.get());
|
|
1838
|
-
}
|
|
1839
|
-
removeValue(e) {
|
|
1840
|
-
this.values.delete(e);
|
|
1841
|
-
const n = this.valueSubscriptions.get(e);
|
|
1842
|
-
n && (n(), this.valueSubscriptions.delete(e)), delete this.latestValues[e], this.removeValueFromRenderState(e, this.renderState);
|
|
1843
|
-
}
|
|
1844
|
-
hasValue(e) {
|
|
1845
|
-
return this.values.has(e);
|
|
1846
|
-
}
|
|
1847
|
-
getValue(e, n) {
|
|
1848
|
-
if (this.props.values && this.props.values[e]) return this.props.values[e];
|
|
1849
|
-
let s = this.values.get(e);
|
|
1850
|
-
return s === void 0 && n !== void 0 && (s = ye(n === null ? void 0 : n, { owner: this }), this.addValue(e, s)), s;
|
|
1851
|
-
}
|
|
1852
|
-
readValue(e, n) {
|
|
1853
|
-
var s;
|
|
1854
|
-
let i = this.latestValues[e] === void 0 && this.current ? (s = this.getBaseTargetFromProps(this.props, e)) !== null && s !== void 0 ? s : this.readValueFromInstance(this.current, e, this.options) : this.latestValues[e];
|
|
1855
|
-
var r;
|
|
1856
|
-
return i != null && (typeof i == "string" && (Mn(i) || Cn(i)) ? i = parseFloat(i) : (r = i, !Rr.find(Fn(r)) && se.test(n) && (i = Ln(e, n))), this.setBaseTarget(e, E(i) ? i.get() : i)), E(i) ? i.get() : i;
|
|
1857
|
-
}
|
|
1858
|
-
setBaseTarget(e, n) {
|
|
1859
|
-
this.baseTarget[e] = n;
|
|
1860
|
-
}
|
|
1861
|
-
getBaseTarget(e) {
|
|
1862
|
-
var n;
|
|
1863
|
-
const { initial: s } = this.props;
|
|
1864
|
-
let i;
|
|
1865
|
-
if (typeof s == "string" || typeof s == "object") {
|
|
1866
|
-
const o = it(this.props, s, (n = this.presenceContext) === null || n === void 0 ? void 0 : n.custom);
|
|
1867
|
-
o && (i = o[e]);
|
|
1868
|
-
}
|
|
1869
|
-
if (s && i !== void 0) return i;
|
|
1870
|
-
const r = this.getBaseTargetFromProps(this.props, e);
|
|
1871
|
-
return r === void 0 || E(r) ? this.initialValues[e] !== void 0 && i === void 0 ? void 0 : this.baseTarget[e] : r;
|
|
1872
|
-
}
|
|
1873
|
-
on(e, n) {
|
|
1874
|
-
return this.events[e] || (this.events[e] = new ts()), this.events[e].add(n);
|
|
1875
|
-
}
|
|
1876
|
-
notify(e, ...n) {
|
|
1877
|
-
this.events[e] && this.events[e].notify(...n);
|
|
1878
|
-
}
|
|
1879
|
-
}
|
|
1880
|
-
class Ss extends Dr {
|
|
1881
|
-
constructor() {
|
|
1882
|
-
super(...arguments), this.KeyframeResolver = $n;
|
|
1883
|
-
}
|
|
1884
|
-
sortInstanceNodePosition(e, n) {
|
|
1885
|
-
return 2 & e.compareDocumentPosition(n) ? 1 : -1;
|
|
1886
|
-
}
|
|
1887
|
-
getBaseTargetFromProps(e, n) {
|
|
1888
|
-
return e.style ? e.style[n] : void 0;
|
|
1889
|
-
}
|
|
1890
|
-
removeValueFromRenderState(e, { vars: n, style: s }) {
|
|
1891
|
-
delete n[e], delete s[e];
|
|
1892
|
-
}
|
|
1893
|
-
handleChildMotionValue() {
|
|
1894
|
-
this.childSubscription && (this.childSubscription(), delete this.childSubscription);
|
|
1895
|
-
const { children: e } = this.props;
|
|
1896
|
-
E(e) && (this.childSubscription = e.on("change", (n) => {
|
|
1897
|
-
this.current && (this.current.textContent = `${n}`);
|
|
1898
|
-
}));
|
|
1899
|
-
}
|
|
1900
|
-
}
|
|
1901
|
-
class Br extends Ss {
|
|
1902
|
-
constructor() {
|
|
1903
|
-
super(...arguments), this.type = "html", this.renderInstance = ps;
|
|
1904
|
-
}
|
|
1905
|
-
readValueFromInstance(e, n) {
|
|
1906
|
-
if (q.has(n)) {
|
|
1907
|
-
const i = pt(n);
|
|
1908
|
-
return i && i.default || 0;
|
|
1909
|
-
}
|
|
1910
|
-
{
|
|
1911
|
-
const i = (s = e, window.getComputedStyle(s)), r = (kn(n) ? i.getPropertyValue(n) : i[n]) || 0;
|
|
1912
|
-
return typeof r == "string" ? r.trim() : r;
|
|
1913
|
-
}
|
|
1914
|
-
var s;
|
|
1915
|
-
}
|
|
1916
|
-
measureInstanceViewportBox(e, { transformPagePoint: n }) {
|
|
1917
|
-
return function(s, i) {
|
|
1918
|
-
return function({ top: r, left: o, right: a, bottom: l }) {
|
|
1919
|
-
return { x: { min: o, max: a }, y: { min: r, max: l } };
|
|
1920
|
-
}(function(r, o) {
|
|
1921
|
-
if (!o) return r;
|
|
1922
|
-
const a = o({ x: r.left, y: r.top }), l = o({ x: r.right, y: r.bottom });
|
|
1923
|
-
return { top: a.y, left: a.x, bottom: l.y, right: l.x };
|
|
1924
|
-
}(s.getBoundingClientRect(), i));
|
|
1925
|
-
}(e, n);
|
|
1926
|
-
}
|
|
1927
|
-
build(e, n, s) {
|
|
1928
|
-
At(e, n, s.transformTemplate);
|
|
1929
|
-
}
|
|
1930
|
-
scrapeMotionValuesFromProps(e, n, s) {
|
|
1931
|
-
return xt(e, n, s);
|
|
1932
|
-
}
|
|
1933
|
-
}
|
|
1934
|
-
class Nr extends Ss {
|
|
1935
|
-
constructor() {
|
|
1936
|
-
super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = Ji;
|
|
1937
|
-
}
|
|
1938
|
-
getBaseTargetFromProps(e, n) {
|
|
1939
|
-
return e[n];
|
|
1940
|
-
}
|
|
1941
|
-
readValueFromInstance(e, n) {
|
|
1942
|
-
if (q.has(n)) {
|
|
1943
|
-
const s = pt(n);
|
|
1944
|
-
return s && s.default || 0;
|
|
1945
|
-
}
|
|
1946
|
-
return n = ms.has(n) ? n : wt(n), e.getAttribute(n);
|
|
1947
|
-
}
|
|
1948
|
-
scrapeMotionValuesFromProps(e, n, s) {
|
|
1949
|
-
return gs(e, n, s);
|
|
1950
|
-
}
|
|
1951
|
-
build(e, n, s) {
|
|
1952
|
-
Vt(e, n, this.isSVGTag, s.transformTemplate);
|
|
1953
|
-
}
|
|
1954
|
-
renderInstance(e, n, s, i) {
|
|
1955
|
-
fs(e, n, 0, i);
|
|
1956
|
-
}
|
|
1957
|
-
mount(e) {
|
|
1958
|
-
this.isSVGTag = Ct(e.tagName), super.mount(e);
|
|
1959
|
-
}
|
|
1960
|
-
}
|
|
1961
|
-
function Lr({ children: t, features: e, strict: n = !1 }) {
|
|
1962
|
-
const [, s] = Cs(!We(e)), i = Z(void 0);
|
|
1963
|
-
if (!We(e)) {
|
|
1964
|
-
const { renderer: r, ...o } = e;
|
|
1965
|
-
i.current = r, nt(o);
|
|
1966
|
-
}
|
|
1967
|
-
return st(() => {
|
|
1968
|
-
We(e) && e().then(({ renderer: r, ...o }) => {
|
|
1969
|
-
nt(o), i.current = r, s(!0);
|
|
1970
|
-
});
|
|
1971
|
-
}, []), I(St.Provider, { value: { renderer: i.current, strict: n }, children: t });
|
|
1972
|
-
}
|
|
1973
|
-
function We(t) {
|
|
1974
|
-
return typeof t == "function";
|
|
1975
|
-
}
|
|
1976
|
-
const $r = { renderer: (t, e) => Tt(t) ? new Nr(e) : new Br(e, { allowProjection: t !== vn }), ...Gi, ...cr }, jr = Ms(Is(Ir()).div)`
|
|
1977
|
-
${({ theme: t }) => `
|
|
1978
|
-
background-color: ${t.palette.white};
|
|
1979
|
-
box-shadow: ${t.shadows.lg};
|
|
1980
|
-
max-width: 350px;
|
|
1981
|
-
min-width: 350px;
|
|
1982
|
-
height: 100%;
|
|
1983
|
-
position: absolute;
|
|
1984
|
-
right: 0;
|
|
1985
|
-
top: 0;
|
|
1986
|
-
overflow: hidden auto;
|
|
1987
|
-
scrollbar-color: ${t.palette.gray[600]} ${t.palette.gray[100]};
|
|
1988
|
-
scroll-padding: ${t.spacing[0.5]};
|
|
1989
|
-
scrollbar-width: thin;
|
|
1990
|
-
z-index: 99999;
|
|
1991
|
-
|
|
1992
|
-
> div {
|
|
1993
|
-
border: 1px solid ${t.palette.gray[100]};
|
|
1994
|
-
width: auto;
|
|
1995
|
-
min-height: 100vh;
|
|
1996
|
-
height: auto;
|
|
1997
|
-
}
|
|
1998
|
-
`}
|
|
1999
|
-
`, to = ({ children: t, closeIconId: e = "close-menu", isOpen: n, items: s, onClose: i, primaryButtonText: r, primaryOnClick: o, secondaryButtonText: a, secondaryOnClick: l, title: c }) => {
|
|
2000
|
-
const u = Ps(), h = Z(null), d = fn((f) => () => {
|
|
2001
|
-
f(), i();
|
|
2002
|
-
}, [i]);
|
|
2003
|
-
return Os(h.current, () => {
|
|
2004
|
-
i();
|
|
2005
|
-
}, !0), I(Lr, { features: $r, children: I(jr, { animate: n ? { display: "block", x: 0 } : { transitionEnd: { display: "none" }, x: "100%" }, initial: { display: "none", x: "100%" }, ref: h, transition: { bounce: 0, duration: 0.6, type: "spring" }, children: H(z, { height: "100%", position: "relative", children: [H(z, { alignItems: "center", bgColor: u.palette.white, borderBottom: "1px solid", borderColor: u.palette.gray[200], display: "flex", gap: 1.25, justify: "space-between", padding: [1.25, 1.25, 1.25, 1.25], position: "sticky", top: "0", zIndex: 40, children: [I(Fs, { color: u.palette.black, display: "inline", fontWeight: "bold", size: "xl", children: c }), I(Es, { icon: "close", iconColor: u.palette.gray[400], iconSize: "xs", iconTransform: "grow-4", iconType: "fa-light", id: e, onClick: i, px: 0.25, py: 0.25, variant: "ghost" })] }), H(z, { display: "flex", flexDirection: "column", justify: "space-between", minHeight: "100vh", children: [H(z, { py: 1.25, children: [(s ?? []).map(({ customBadge: f, description: v, icon: p, onClick: g, requiresUpgrade: m, title: S }) => I(ks, { customBadge: f, description: v, icon: p, onClick: d(g), requiresUpgrade: m, title: S }, S)), t && I(z, { px: 1.25, children: t })] }), r === void 0 ? void 0 : H(z, { alignItems: "center", bgColor: u.palette.white, borderColor: u.palette.gray[200], borderTop: "1px solid", bottom: "0", display: "flex", gap: 1.25, justify: "end", padding: [1.25, 1.25, 1.25, 1.25], position: "sticky", width: "100%", zIndex: 40, children: [a === void 0 ? void 0 : I(Pt, { color: `${u.palette.primary[500]} !important`, onClick: l, pl: 0.5, pr: 0.5, variant: "ghost", children: a }), I(Pt, { onClick: o, type: "submit", children: r })] })] })] }) }) });
|
|
2006
|
-
};
|
|
6
|
+
import "../../vendor-CVMqCpkZ.mjs";
|
|
2007
7
|
export {
|
|
2008
|
-
|
|
8
|
+
a as SlideOutMenu
|
|
2009
9
|
};
|