tactile-material 1.0.3 → 1.0.4
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/tactile.es.js +316 -319
- package/dist/tactile.umd.js +11 -11
- package/package.json +1 -1
package/dist/tactile.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as Fn from "react";
|
|
2
2
|
import ar, { createContext as zt, useRef as B, useId as Bn, useContext as Q, useInsertionEffect as Ie, useCallback as In, useMemo as I, useEffect as dt, Children as ga, isValidElement as ya, useLayoutEffect as va, useState as bt, forwardRef as _n, Fragment as lr, createElement as vn, Component as xa } from "react";
|
|
3
3
|
const ue = (t, e = 360, n = 88) => {
|
|
4
4
|
const s = (i) => {
|
|
@@ -78,8 +78,8 @@ function Ta() {
|
|
|
78
78
|
}
|
|
79
79
|
function S(d, T, M) {
|
|
80
80
|
{
|
|
81
|
-
var E = y.ReactDebugCurrentFrame,
|
|
82
|
-
|
|
81
|
+
var E = y.ReactDebugCurrentFrame, N = E.getStackAddendum();
|
|
82
|
+
N !== "" && (T += "%s", M = M.concat([N]));
|
|
83
83
|
var _ = M.map(function($) {
|
|
84
84
|
return String($);
|
|
85
85
|
});
|
|
@@ -88,19 +88,19 @@ function Ta() {
|
|
|
88
88
|
}
|
|
89
89
|
var C = !1, w = !1, A = !1, b = !1, R = !1, D;
|
|
90
90
|
D = Symbol.for("react.module.reference");
|
|
91
|
-
function
|
|
91
|
+
function k(d) {
|
|
92
92
|
return !!(typeof d == "string" || typeof d == "function" || d === s || d === o || R || d === i || d === c || d === u || b || d === p || C || w || A || typeof d == "object" && d !== null && (d.$$typeof === h || d.$$typeof === f || d.$$typeof === r || d.$$typeof === a || d.$$typeof === l || // This needs to include all possible module reference object
|
|
93
93
|
// types supported by any Flight configuration anywhere since
|
|
94
94
|
// we don't know which Flight build this will end up being used
|
|
95
95
|
// with.
|
|
96
96
|
d.$$typeof === D || d.getModuleId !== void 0));
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function O(d, T, M) {
|
|
99
99
|
var E = d.displayName;
|
|
100
100
|
if (E)
|
|
101
101
|
return E;
|
|
102
|
-
var
|
|
103
|
-
return
|
|
102
|
+
var N = T.displayName || T.name || "";
|
|
103
|
+
return N !== "" ? M + "(" + N + ")" : M;
|
|
104
104
|
}
|
|
105
105
|
function Z(d) {
|
|
106
106
|
return d.displayName || "Context";
|
|
@@ -135,12 +135,12 @@ function Ta() {
|
|
|
135
135
|
var M = d;
|
|
136
136
|
return Z(M._context) + ".Provider";
|
|
137
137
|
case l:
|
|
138
|
-
return
|
|
138
|
+
return O(d, d.render, "ForwardRef");
|
|
139
139
|
case f:
|
|
140
140
|
var E = d.displayName || null;
|
|
141
141
|
return E !== null ? E : L(d.type) || "Memo";
|
|
142
142
|
case h: {
|
|
143
|
-
var
|
|
143
|
+
var N = d, _ = N._payload, $ = N._init;
|
|
144
144
|
try {
|
|
145
145
|
return L($(_));
|
|
146
146
|
} catch {
|
|
@@ -218,8 +218,8 @@ function Ta() {
|
|
|
218
218
|
if (qe === void 0)
|
|
219
219
|
try {
|
|
220
220
|
throw Error();
|
|
221
|
-
} catch (
|
|
222
|
-
var E =
|
|
221
|
+
} catch (N) {
|
|
222
|
+
var E = N.stack.trim().match(/\n( *(at )?)/);
|
|
223
223
|
qe = E && E[1] || "";
|
|
224
224
|
}
|
|
225
225
|
return `
|
|
@@ -241,7 +241,7 @@ function Ta() {
|
|
|
241
241
|
}
|
|
242
242
|
var E;
|
|
243
243
|
Qe = !0;
|
|
244
|
-
var
|
|
244
|
+
var N = Error.prepareStackTrace;
|
|
245
245
|
Error.prepareStackTrace = void 0;
|
|
246
246
|
var _;
|
|
247
247
|
_ = He.current, He.current = null, Wo();
|
|
@@ -297,9 +297,9 @@ function Ta() {
|
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
299
|
} finally {
|
|
300
|
-
Qe = !1, He.current = _, Xo(), Error.prepareStackTrace =
|
|
300
|
+
Qe = !1, He.current = _, Xo(), Error.prepareStackTrace = N;
|
|
301
301
|
}
|
|
302
|
-
var
|
|
302
|
+
var Ot = d ? d.displayName || d.name : "", At = Ot ? we(Ot) : "";
|
|
303
303
|
return typeof d == "function" && Pe.set(d, At), At;
|
|
304
304
|
}
|
|
305
305
|
function Ko(d, T, M) {
|
|
@@ -329,9 +329,9 @@ function Ta() {
|
|
|
329
329
|
case f:
|
|
330
330
|
return Se(d.type, T, M);
|
|
331
331
|
case h: {
|
|
332
|
-
var E = d,
|
|
332
|
+
var E = d, N = E._payload, _ = E._init;
|
|
333
333
|
try {
|
|
334
|
-
return Se(_(
|
|
334
|
+
return Se(_(N), T, M);
|
|
335
335
|
} catch {
|
|
336
336
|
}
|
|
337
337
|
}
|
|
@@ -346,7 +346,7 @@ function Ta() {
|
|
|
346
346
|
} else
|
|
347
347
|
Ms.setExtraStackFrame(null);
|
|
348
348
|
}
|
|
349
|
-
function Go(d, T, M, E,
|
|
349
|
+
function Go(d, T, M, E, N) {
|
|
350
350
|
{
|
|
351
351
|
var _ = Function.call.bind(Qt);
|
|
352
352
|
for (var $ in d)
|
|
@@ -361,7 +361,7 @@ function Ta() {
|
|
|
361
361
|
} catch (K) {
|
|
362
362
|
j = K;
|
|
363
363
|
}
|
|
364
|
-
j && !(j instanceof Error) && (Re(
|
|
364
|
+
j && !(j instanceof Error) && (Re(N), P("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", E || "React class", M, $, typeof j), Re(null)), j instanceof Error && !(j.message in Rs) && (Rs[j.message] = !0, Re(N), P("Failed %s type: %s", M, j.message), Re(null));
|
|
365
365
|
}
|
|
366
366
|
}
|
|
367
367
|
}
|
|
@@ -389,12 +389,12 @@ function Ta() {
|
|
|
389
389
|
if (qo(d))
|
|
390
390
|
return P("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ho(d)), As(d);
|
|
391
391
|
}
|
|
392
|
-
var
|
|
392
|
+
var ks = y.ReactCurrentOwner, Qo = {
|
|
393
393
|
key: !0,
|
|
394
394
|
ref: !0,
|
|
395
395
|
__self: !0,
|
|
396
396
|
__source: !0
|
|
397
|
-
},
|
|
397
|
+
}, Vs, Es;
|
|
398
398
|
function Jo(d) {
|
|
399
399
|
if (Qt.call(d, "ref")) {
|
|
400
400
|
var T = Object.getOwnPropertyDescriptor(d, "ref").get;
|
|
@@ -412,12 +412,12 @@ function Ta() {
|
|
|
412
412
|
return d.key !== void 0;
|
|
413
413
|
}
|
|
414
414
|
function ea(d, T) {
|
|
415
|
-
typeof d.ref == "string" &&
|
|
415
|
+
typeof d.ref == "string" && ks.current;
|
|
416
416
|
}
|
|
417
417
|
function na(d, T) {
|
|
418
418
|
{
|
|
419
419
|
var M = function() {
|
|
420
|
-
|
|
420
|
+
Vs || (Vs = !0, P("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", T));
|
|
421
421
|
};
|
|
422
422
|
M.isReactWarning = !0, Object.defineProperty(d, "key", {
|
|
423
423
|
get: M,
|
|
@@ -436,7 +436,7 @@ function Ta() {
|
|
|
436
436
|
});
|
|
437
437
|
}
|
|
438
438
|
}
|
|
439
|
-
var ia = function(d, T, M, E,
|
|
439
|
+
var ia = function(d, T, M, E, N, _, $) {
|
|
440
440
|
var j = {
|
|
441
441
|
// This tag allows us to uniquely identify this as a React Element
|
|
442
442
|
$$typeof: e,
|
|
@@ -462,13 +462,13 @@ function Ta() {
|
|
|
462
462
|
configurable: !1,
|
|
463
463
|
enumerable: !1,
|
|
464
464
|
writable: !1,
|
|
465
|
-
value:
|
|
465
|
+
value: N
|
|
466
466
|
}), Object.freeze && (Object.freeze(j.props), Object.freeze(j)), j;
|
|
467
467
|
};
|
|
468
|
-
function ra(d, T, M, E,
|
|
468
|
+
function ra(d, T, M, E, N) {
|
|
469
469
|
{
|
|
470
470
|
var _, $ = {}, j = null, nt = null;
|
|
471
|
-
M !== void 0 && (Cs(M), j = "" + M), ta(T) && (Cs(T.key), j = "" + T.key), Jo(T) && (nt = T.ref, ea(T,
|
|
471
|
+
M !== void 0 && (Cs(M), j = "" + M), ta(T) && (Cs(T.key), j = "" + T.key), Jo(T) && (nt = T.ref, ea(T, N));
|
|
472
472
|
for (_ in T)
|
|
473
473
|
Qt.call(T, _) && !Qo.hasOwnProperty(_) && ($[_] = T[_]);
|
|
474
474
|
if (d && d.defaultProps) {
|
|
@@ -480,11 +480,11 @@ function Ta() {
|
|
|
480
480
|
var G = typeof d == "function" ? d.displayName || d.name || "Unknown" : d;
|
|
481
481
|
j && na($, G), nt && sa($, G);
|
|
482
482
|
}
|
|
483
|
-
return ia(d, j, nt,
|
|
483
|
+
return ia(d, j, nt, N, E, ks.current, $);
|
|
484
484
|
}
|
|
485
485
|
}
|
|
486
486
|
var tn = y.ReactCurrentOwner, Ds = y.ReactDebugCurrentFrame;
|
|
487
|
-
function
|
|
487
|
+
function Nt(d) {
|
|
488
488
|
if (d) {
|
|
489
489
|
var T = d._owner, M = Se(d.type, d._source, T ? T.type : null);
|
|
490
490
|
Ds.setExtraStackFrame(M);
|
|
@@ -534,10 +534,10 @@ Check the top-level render call using <` + M + ">.");
|
|
|
534
534
|
return;
|
|
535
535
|
Ls[M] = !0;
|
|
536
536
|
var E = "";
|
|
537
|
-
d && d._owner && d._owner !== tn.current && (E = " It was passed a child from " + L(d._owner.type) + "."),
|
|
537
|
+
d && d._owner && d._owner !== tn.current && (E = " It was passed a child from " + L(d._owner.type) + "."), Nt(d), P('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', M, E), Nt(null);
|
|
538
538
|
}
|
|
539
539
|
}
|
|
540
|
-
function
|
|
540
|
+
function Ns(d, T) {
|
|
541
541
|
{
|
|
542
542
|
if (typeof d != "object")
|
|
543
543
|
return;
|
|
@@ -549,9 +549,9 @@ Check the top-level render call using <` + M + ">.");
|
|
|
549
549
|
else if (nn(d))
|
|
550
550
|
d._store && (d._store.validated = !0);
|
|
551
551
|
else if (d) {
|
|
552
|
-
var
|
|
553
|
-
if (typeof
|
|
554
|
-
for (var _ =
|
|
552
|
+
var N = x(d);
|
|
553
|
+
if (typeof N == "function" && N !== d.entries)
|
|
554
|
+
for (var _ = N.call(d), $; !($ = _.next()).done; )
|
|
555
555
|
nn($.value) && $s($.value, T);
|
|
556
556
|
}
|
|
557
557
|
}
|
|
@@ -575,8 +575,8 @@ Check the top-level render call using <` + M + ">.");
|
|
|
575
575
|
Go(M, d.props, "prop", E, d);
|
|
576
576
|
} else if (T.PropTypes !== void 0 && !en) {
|
|
577
577
|
en = !0;
|
|
578
|
-
var
|
|
579
|
-
P("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",
|
|
578
|
+
var N = L(T);
|
|
579
|
+
P("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", N || "Unknown");
|
|
580
580
|
}
|
|
581
581
|
typeof T.getDefaultProps == "function" && !T.getDefaultProps.isReactClassApproved && P("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
582
582
|
}
|
|
@@ -586,17 +586,17 @@ Check the top-level render call using <` + M + ">.");
|
|
|
586
586
|
for (var T = Object.keys(d.props), M = 0; M < T.length; M++) {
|
|
587
587
|
var E = T[M];
|
|
588
588
|
if (E !== "children" && E !== "key") {
|
|
589
|
-
|
|
589
|
+
Nt(d), P("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", E), Nt(null);
|
|
590
590
|
break;
|
|
591
591
|
}
|
|
592
592
|
}
|
|
593
|
-
d.ref !== null && (
|
|
593
|
+
d.ref !== null && (Nt(d), P("Invalid attribute `ref` supplied to `React.Fragment`."), Nt(null));
|
|
594
594
|
}
|
|
595
595
|
}
|
|
596
|
-
var
|
|
597
|
-
function
|
|
596
|
+
var Os = {};
|
|
597
|
+
function Fs(d, T, M, E, N, _) {
|
|
598
598
|
{
|
|
599
|
-
var $ =
|
|
599
|
+
var $ = k(d);
|
|
600
600
|
if (!$) {
|
|
601
601
|
var j = "";
|
|
602
602
|
(d === void 0 || typeof d == "object" && d !== null && Object.keys(d).length === 0) && (j += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
@@ -605,7 +605,7 @@ Check the top-level render call using <` + M + ">.");
|
|
|
605
605
|
var K;
|
|
606
606
|
d === null ? K = "null" : Je(d) ? K = "array" : d !== void 0 && d.$$typeof === e ? (K = "<" + (L(d.type) || "Unknown") + " />", j = " Did you accidentally export a JSX literal instead of a component?") : K = typeof d, P("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", K, j);
|
|
607
607
|
}
|
|
608
|
-
var G = ra(d, T, M,
|
|
608
|
+
var G = ra(d, T, M, N, _);
|
|
609
609
|
if (G == null)
|
|
610
610
|
return G;
|
|
611
611
|
if ($) {
|
|
@@ -613,36 +613,36 @@ Check the top-level render call using <` + M + ">.");
|
|
|
613
613
|
if (at !== void 0)
|
|
614
614
|
if (E)
|
|
615
615
|
if (Je(at)) {
|
|
616
|
-
for (var
|
|
617
|
-
|
|
616
|
+
for (var Ot = 0; Ot < at.length; Ot++)
|
|
617
|
+
Ns(at[Ot], d);
|
|
618
618
|
Object.freeze && Object.freeze(at);
|
|
619
619
|
} else
|
|
620
620
|
P("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
621
621
|
else
|
|
622
|
-
|
|
622
|
+
Ns(at, d);
|
|
623
623
|
}
|
|
624
624
|
if (Qt.call(T, "key")) {
|
|
625
625
|
var At = L(d), st = Object.keys(T).filter(function(ma) {
|
|
626
626
|
return ma !== "key";
|
|
627
627
|
}), sn = st.length > 0 ? "{key: someKey, " + st.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
628
|
-
if (!
|
|
628
|
+
if (!Os[At + sn]) {
|
|
629
629
|
var pa = st.length > 0 ? "{" + st.join(": ..., ") + ": ...}" : "{}";
|
|
630
630
|
P(`A props object containing a "key" prop is being spread into JSX:
|
|
631
631
|
let props = %s;
|
|
632
632
|
<%s {...props} />
|
|
633
633
|
React keys must be passed directly to JSX without using spread:
|
|
634
634
|
let props = %s;
|
|
635
|
-
<%s key={someKey} {...props} />`, sn, At, pa, At),
|
|
635
|
+
<%s key={someKey} {...props} />`, sn, At, pa, At), Os[At + sn] = !0;
|
|
636
636
|
}
|
|
637
637
|
}
|
|
638
638
|
return d === s ? ca(G) : la(G), G;
|
|
639
639
|
}
|
|
640
640
|
}
|
|
641
641
|
function ua(d, T, M) {
|
|
642
|
-
return
|
|
642
|
+
return Fs(d, T, M, !0);
|
|
643
643
|
}
|
|
644
644
|
function fa(d, T, M) {
|
|
645
|
-
return
|
|
645
|
+
return Fs(d, T, M, !1);
|
|
646
646
|
}
|
|
647
647
|
var da = fa, ha = ua;
|
|
648
648
|
te.Fragment = s, te.jsx = da, te.jsxs = ha;
|
|
@@ -660,7 +660,7 @@ const _e = zt(null), me = zt({
|
|
|
660
660
|
isStatic: !1,
|
|
661
661
|
reducedMotion: "never"
|
|
662
662
|
});
|
|
663
|
-
class wa extends
|
|
663
|
+
class wa extends Fn.Component {
|
|
664
664
|
getSnapshotBeforeUpdate(e) {
|
|
665
665
|
const n = this.props.childRef.current;
|
|
666
666
|
if (n && e.isPresent && !this.props.isPresent) {
|
|
@@ -702,7 +702,7 @@ function Pa({ children: t, isPresent: e }) {
|
|
|
702
702
|
`), () => {
|
|
703
703
|
document.head.removeChild(u);
|
|
704
704
|
};
|
|
705
|
-
}, [e]), m.jsx(wa, { isPresent: e, childRef: s, sizeRef: i, children:
|
|
705
|
+
}, [e]), m.jsx(wa, { isPresent: e, childRef: s, sizeRef: i, children: Fn.cloneElement(t, { ref: s }) });
|
|
706
706
|
}
|
|
707
707
|
const Sa = ({ children: t, initial: e, isPresent: n, onExitComplete: s, custom: i, presenceAffectsLayout: o, mode: r }) => {
|
|
708
708
|
const a = Gt(Ra), l = Bn(), c = In((f) => {
|
|
@@ -729,7 +729,7 @@ const Sa = ({ children: t, initial: e, isPresent: n, onExitComplete: s, custom:
|
|
|
729
729
|
);
|
|
730
730
|
return I(() => {
|
|
731
731
|
a.forEach((f, h) => a.set(h, !1));
|
|
732
|
-
}, [n]),
|
|
732
|
+
}, [n]), Fn.useEffect(() => {
|
|
733
733
|
!n && !a.size && s && s();
|
|
734
734
|
}, [n]), r === "popLayout" && (t = m.jsx(Pa, { isPresent: n, children: t })), m.jsx(_e.Provider, { value: u, children: t });
|
|
735
735
|
};
|
|
@@ -858,7 +858,7 @@ const Ae = [
|
|
|
858
858
|
// Write
|
|
859
859
|
"postRender"
|
|
860
860
|
// Compute
|
|
861
|
-
],
|
|
861
|
+
], ka = 40;
|
|
862
862
|
function ur(t, e) {
|
|
863
863
|
let n = !1, s = !0;
|
|
864
864
|
const i = {
|
|
@@ -867,7 +867,7 @@ function ur(t, e) {
|
|
|
867
867
|
isProcessing: !1
|
|
868
868
|
}, o = () => n = !0, r = Ae.reduce((y, P) => (y[P] = Ca(o), y), {}), { read: a, resolveKeyframes: l, update: c, preRender: u, render: f, postRender: h } = r, p = () => {
|
|
869
869
|
const y = performance.now();
|
|
870
|
-
n = !1, i.delta = s ? 1e3 / 60 : Math.max(Math.min(y - i.timestamp,
|
|
870
|
+
n = !1, i.delta = s ? 1e3 / 60 : Math.max(Math.min(y - i.timestamp, ka), 1), i.timestamp = y, i.isProcessing = !0, a.process(i), l.process(i), c.process(i), u.process(i), f.process(i), h.process(i), i.isProcessing = !1, n && e && (s = !1, t(p));
|
|
871
871
|
}, g = () => {
|
|
872
872
|
n = !0, s = !0, i.isProcessing || t(p);
|
|
873
873
|
};
|
|
@@ -879,7 +879,7 @@ function ur(t, e) {
|
|
|
879
879
|
r[Ae[P]].cancel(y);
|
|
880
880
|
}, state: i, steps: r };
|
|
881
881
|
}
|
|
882
|
-
const { schedule:
|
|
882
|
+
const { schedule: F, cancel: Tt, state: q, steps: rn } = ur(typeof requestAnimationFrame < "u" ? requestAnimationFrame : it, !0), fr = zt({ strict: !1 }), Us = {
|
|
883
883
|
animation: [
|
|
884
884
|
"animate",
|
|
885
885
|
"variants",
|
|
@@ -903,7 +903,7 @@ for (const t in Us)
|
|
|
903
903
|
Xt[t] = {
|
|
904
904
|
isEnabled: (e) => Us[t].some((n) => !!e[n])
|
|
905
905
|
};
|
|
906
|
-
function
|
|
906
|
+
function Va(t) {
|
|
907
907
|
for (const e in t)
|
|
908
908
|
Xt[e] = {
|
|
909
909
|
...Xt[e],
|
|
@@ -1009,21 +1009,21 @@ function $a(t, e) {
|
|
|
1009
1009
|
}
|
|
1010
1010
|
return t.inherit !== !1 ? e : {};
|
|
1011
1011
|
}
|
|
1012
|
-
function
|
|
1012
|
+
function Na(t) {
|
|
1013
1013
|
const { initial: e, animate: n } = $a(t, Q(We));
|
|
1014
1014
|
return I(() => ({ initial: e, animate: n }), [Xs(e), Xs(n)]);
|
|
1015
1015
|
}
|
|
1016
1016
|
function Xs(t) {
|
|
1017
1017
|
return Array.isArray(t) ? t.join(" ") : t;
|
|
1018
1018
|
}
|
|
1019
|
-
const
|
|
1020
|
-
function
|
|
1019
|
+
const Oa = Symbol.for("motionComponentSymbol");
|
|
1020
|
+
function Ft(t) {
|
|
1021
1021
|
return t && typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "current");
|
|
1022
1022
|
}
|
|
1023
|
-
function
|
|
1023
|
+
function Fa(t, e, n) {
|
|
1024
1024
|
return In(
|
|
1025
1025
|
(s) => {
|
|
1026
|
-
s && t.onMount && t.onMount(s), e && (s ? e.mount(s) : e.unmount()), n && (typeof n == "function" ? n(s) :
|
|
1026
|
+
s && t.onMount && t.onMount(s), e && (s ? e.mount(s) : e.unmount()), n && (typeof n == "function" ? n(s) : Ft(n) && (n.current = s));
|
|
1027
1027
|
},
|
|
1028
1028
|
/**
|
|
1029
1029
|
* Only pass a new ref callback to React if we've received a visual element
|
|
@@ -1066,7 +1066,7 @@ function _a(t, e, n, s) {
|
|
|
1066
1066
|
t.projection = new n(t.latestValues, e["data-framer-portal-id"] ? void 0 : gr(t.parent)), t.projection.setOptions({
|
|
1067
1067
|
layoutId: i,
|
|
1068
1068
|
layout: o,
|
|
1069
|
-
alwaysMeasureLayout: !!r || a &&
|
|
1069
|
+
alwaysMeasureLayout: !!r || a && Ft(a),
|
|
1070
1070
|
visualElement: t,
|
|
1071
1071
|
/**
|
|
1072
1072
|
* TODO: Update options in an effect. This could be tricky as it'll be too late
|
|
@@ -1087,24 +1087,24 @@ function gr(t) {
|
|
|
1087
1087
|
}
|
|
1088
1088
|
function Ua({ preloadedFeatures: t, createVisualElement: e, useRender: n, useVisualState: s, Component: i }) {
|
|
1089
1089
|
var o, r;
|
|
1090
|
-
t &&
|
|
1090
|
+
t && Va(t);
|
|
1091
1091
|
function a(c, u) {
|
|
1092
1092
|
let f;
|
|
1093
1093
|
const h = {
|
|
1094
1094
|
...Q(me),
|
|
1095
1095
|
...c,
|
|
1096
1096
|
layoutId: Wa(c)
|
|
1097
|
-
}, { isStatic: p } = h, g =
|
|
1097
|
+
}, { isStatic: p } = h, g = Na(c), v = s(c, p);
|
|
1098
1098
|
if (!p && Wn) {
|
|
1099
1099
|
Xa(h, t);
|
|
1100
1100
|
const x = Ya(h);
|
|
1101
1101
|
f = x.MeasureLayout, g.visualElement = Ia(i, v, h, e, x.ProjectionNode);
|
|
1102
1102
|
}
|
|
1103
|
-
return m.jsxs(We.Provider, { value: g, children: [f && g.visualElement ? m.jsx(f, { visualElement: g.visualElement, ...h }) : null, n(i, c,
|
|
1103
|
+
return m.jsxs(We.Provider, { value: g, children: [f && g.visualElement ? m.jsx(f, { visualElement: g.visualElement, ...h }) : null, n(i, c, Fa(v, g.visualElement, u), v, p, g.visualElement)] });
|
|
1104
1104
|
}
|
|
1105
1105
|
a.displayName = `motion.${typeof i == "string" ? i : `create(${(r = (o = i.displayName) !== null && o !== void 0 ? o : i.name) !== null && r !== void 0 ? r : ""})`}`;
|
|
1106
1106
|
const l = _n(a);
|
|
1107
|
-
return l[
|
|
1107
|
+
return l[Oa] = i, l;
|
|
1108
1108
|
}
|
|
1109
1109
|
function Wa({ layoutId: t }) {
|
|
1110
1110
|
const e = Q(Un).id;
|
|
@@ -1192,7 +1192,7 @@ function Hn(t, e, n, s) {
|
|
|
1192
1192
|
return e;
|
|
1193
1193
|
}
|
|
1194
1194
|
const bn = (t) => Array.isArray(t), za = (t) => !!(t && typeof t == "object" && t.mix && t.toValue), Ga = (t) => bn(t) ? t[t.length - 1] || 0 : t, J = (t) => !!(t && t.getVelocity);
|
|
1195
|
-
function
|
|
1195
|
+
function Ve(t) {
|
|
1196
1196
|
const e = J(t) ? t.get() : t;
|
|
1197
1197
|
return za(e) ? e.toValue() : e;
|
|
1198
1198
|
}
|
|
@@ -1210,7 +1210,7 @@ const yr = (t) => (e, n) => {
|
|
|
1210
1210
|
function Ha(t, e, n, s) {
|
|
1211
1211
|
const i = {}, o = s(t, {});
|
|
1212
1212
|
for (const h in o)
|
|
1213
|
-
i[h] =
|
|
1213
|
+
i[h] = Ve(o[h]);
|
|
1214
1214
|
let { initial: r, animate: a } = t;
|
|
1215
1215
|
const l = Ye(t), c = hr(t);
|
|
1216
1216
|
e && c && !l && t.inherit !== !1 && (r === void 0 && (r = e.initial), a === void 0 && (a = e.animate));
|
|
@@ -1270,46 +1270,46 @@ const Ht = [
|
|
|
1270
1270
|
test: (e) => typeof e == "string" && e.endsWith(t) && e.split(" ").length === 1,
|
|
1271
1271
|
parse: parseFloat,
|
|
1272
1272
|
transform: (e) => `${e}${t}`
|
|
1273
|
-
}), St = /* @__PURE__ */ ye("deg"), pt = /* @__PURE__ */ ye("%"),
|
|
1273
|
+
}), St = /* @__PURE__ */ ye("deg"), pt = /* @__PURE__ */ ye("%"), V = /* @__PURE__ */ ye("px"), Ja = /* @__PURE__ */ ye("vh"), tl = /* @__PURE__ */ ye("vw"), Ks = {
|
|
1274
1274
|
...pt,
|
|
1275
1275
|
parse: (t) => pt.parse(t) / 100,
|
|
1276
1276
|
transform: (t) => pt.transform(t * 100)
|
|
1277
1277
|
}, el = {
|
|
1278
1278
|
// Border props
|
|
1279
|
-
borderWidth:
|
|
1280
|
-
borderTopWidth:
|
|
1281
|
-
borderRightWidth:
|
|
1282
|
-
borderBottomWidth:
|
|
1283
|
-
borderLeftWidth:
|
|
1284
|
-
borderRadius:
|
|
1285
|
-
radius:
|
|
1286
|
-
borderTopLeftRadius:
|
|
1287
|
-
borderTopRightRadius:
|
|
1288
|
-
borderBottomRightRadius:
|
|
1289
|
-
borderBottomLeftRadius:
|
|
1279
|
+
borderWidth: V,
|
|
1280
|
+
borderTopWidth: V,
|
|
1281
|
+
borderRightWidth: V,
|
|
1282
|
+
borderBottomWidth: V,
|
|
1283
|
+
borderLeftWidth: V,
|
|
1284
|
+
borderRadius: V,
|
|
1285
|
+
radius: V,
|
|
1286
|
+
borderTopLeftRadius: V,
|
|
1287
|
+
borderTopRightRadius: V,
|
|
1288
|
+
borderBottomRightRadius: V,
|
|
1289
|
+
borderBottomLeftRadius: V,
|
|
1290
1290
|
// Positioning props
|
|
1291
|
-
width:
|
|
1292
|
-
maxWidth:
|
|
1293
|
-
height:
|
|
1294
|
-
maxHeight:
|
|
1295
|
-
top:
|
|
1296
|
-
right:
|
|
1297
|
-
bottom:
|
|
1298
|
-
left:
|
|
1291
|
+
width: V,
|
|
1292
|
+
maxWidth: V,
|
|
1293
|
+
height: V,
|
|
1294
|
+
maxHeight: V,
|
|
1295
|
+
top: V,
|
|
1296
|
+
right: V,
|
|
1297
|
+
bottom: V,
|
|
1298
|
+
left: V,
|
|
1299
1299
|
// Spacing props
|
|
1300
|
-
padding:
|
|
1301
|
-
paddingTop:
|
|
1302
|
-
paddingRight:
|
|
1303
|
-
paddingBottom:
|
|
1304
|
-
paddingLeft:
|
|
1305
|
-
margin:
|
|
1306
|
-
marginTop:
|
|
1307
|
-
marginRight:
|
|
1308
|
-
marginBottom:
|
|
1309
|
-
marginLeft:
|
|
1300
|
+
padding: V,
|
|
1301
|
+
paddingTop: V,
|
|
1302
|
+
paddingRight: V,
|
|
1303
|
+
paddingBottom: V,
|
|
1304
|
+
paddingLeft: V,
|
|
1305
|
+
margin: V,
|
|
1306
|
+
marginTop: V,
|
|
1307
|
+
marginRight: V,
|
|
1308
|
+
marginBottom: V,
|
|
1309
|
+
marginLeft: V,
|
|
1310
1310
|
// Misc
|
|
1311
|
-
backgroundPositionX:
|
|
1312
|
-
backgroundPositionY:
|
|
1311
|
+
backgroundPositionX: V,
|
|
1312
|
+
backgroundPositionY: V
|
|
1313
1313
|
}, nl = {
|
|
1314
1314
|
rotate: St,
|
|
1315
1315
|
rotateX: St,
|
|
@@ -1322,19 +1322,19 @@ const Ht = [
|
|
|
1322
1322
|
skew: St,
|
|
1323
1323
|
skewX: St,
|
|
1324
1324
|
skewY: St,
|
|
1325
|
-
distance:
|
|
1326
|
-
translateX:
|
|
1327
|
-
translateY:
|
|
1328
|
-
translateZ:
|
|
1329
|
-
x:
|
|
1330
|
-
y:
|
|
1331
|
-
z:
|
|
1332
|
-
perspective:
|
|
1333
|
-
transformPerspective:
|
|
1325
|
+
distance: V,
|
|
1326
|
+
translateX: V,
|
|
1327
|
+
translateY: V,
|
|
1328
|
+
translateZ: V,
|
|
1329
|
+
x: V,
|
|
1330
|
+
y: V,
|
|
1331
|
+
z: V,
|
|
1332
|
+
perspective: V,
|
|
1333
|
+
transformPerspective: V,
|
|
1334
1334
|
opacity: de,
|
|
1335
1335
|
originX: Ks,
|
|
1336
1336
|
originY: Ks,
|
|
1337
|
-
originZ:
|
|
1337
|
+
originZ: V
|
|
1338
1338
|
}, zs = {
|
|
1339
1339
|
...qt,
|
|
1340
1340
|
transform: Math.round
|
|
@@ -1342,7 +1342,7 @@ const Ht = [
|
|
|
1342
1342
|
...el,
|
|
1343
1343
|
...nl,
|
|
1344
1344
|
zIndex: zs,
|
|
1345
|
-
size:
|
|
1345
|
+
size: V,
|
|
1346
1346
|
// SVG
|
|
1347
1347
|
fillOpacity: de,
|
|
1348
1348
|
strokeOpacity: de,
|
|
@@ -1403,12 +1403,12 @@ const ol = {
|
|
|
1403
1403
|
function ll(t, e, n = 1, s = 0, i = !0) {
|
|
1404
1404
|
t.pathLength = 1;
|
|
1405
1405
|
const o = i ? ol : al;
|
|
1406
|
-
t[o.offset] =
|
|
1407
|
-
const r =
|
|
1406
|
+
t[o.offset] = V.transform(-s);
|
|
1407
|
+
const r = V.transform(e), a = V.transform(n);
|
|
1408
1408
|
t[o.array] = `${r} ${a}`;
|
|
1409
1409
|
}
|
|
1410
1410
|
function Gs(t, e, n) {
|
|
1411
|
-
return typeof t == "string" ? t :
|
|
1411
|
+
return typeof t == "string" ? t : V.transform(e + n * t);
|
|
1412
1412
|
}
|
|
1413
1413
|
function cl(t, e, n) {
|
|
1414
1414
|
const s = Gs(e, t.x, t.width), i = Gs(n, t.y, t.height);
|
|
@@ -1536,8 +1536,8 @@ const Zs = ["x", "y", "width", "height", "cx", "cy", "r"], dl = {
|
|
|
1536
1536
|
const l = Zs[a];
|
|
1537
1537
|
t[l] !== e[l] && (r = !0);
|
|
1538
1538
|
}
|
|
1539
|
-
r &&
|
|
1540
|
-
fl(n, s),
|
|
1539
|
+
r && F.read(() => {
|
|
1540
|
+
fl(n, s), F.render(() => {
|
|
1541
1541
|
ts(s, i, ns(n.tagName), t.transformTemplate), Sr(n, s);
|
|
1542
1542
|
});
|
|
1543
1543
|
});
|
|
@@ -1697,7 +1697,7 @@ function is(t, e) {
|
|
|
1697
1697
|
return t ? t[e] || t.default || t : void 0;
|
|
1698
1698
|
}
|
|
1699
1699
|
const Tn = 2e4;
|
|
1700
|
-
function
|
|
1700
|
+
function kr(t) {
|
|
1701
1701
|
let e = 0;
|
|
1702
1702
|
const n = 50;
|
|
1703
1703
|
let s = t.next(e);
|
|
@@ -1728,7 +1728,7 @@ const $e = /* @__PURE__ */ Sl(() => {
|
|
|
1728
1728
|
return !1;
|
|
1729
1729
|
}
|
|
1730
1730
|
return !0;
|
|
1731
|
-
}, "linearEasing"),
|
|
1731
|
+
}, "linearEasing"), Vr = (t, e, n = 10) => {
|
|
1732
1732
|
let s = "";
|
|
1733
1733
|
const i = Math.max(Math.round(e / n), 2);
|
|
1734
1734
|
for (let o = 0; o < i; o++)
|
|
@@ -1751,7 +1751,7 @@ const ne = ([t, e, n, s]) => `cubic-bezier(${t}, ${e}, ${n}, ${s})`, wn = {
|
|
|
1751
1751
|
};
|
|
1752
1752
|
function Dr(t, e) {
|
|
1753
1753
|
if (t)
|
|
1754
|
-
return typeof t == "function" && $e() ?
|
|
1754
|
+
return typeof t == "function" && $e() ? Vr(t, e) : os(t) ? ne(t) : Array.isArray(t) ? t.map((n) => Dr(n, e) || wn.easeOut) : wn[t];
|
|
1755
1755
|
}
|
|
1756
1756
|
const ft = {
|
|
1757
1757
|
x: !1,
|
|
@@ -1817,7 +1817,7 @@ function Qs(t) {
|
|
|
1817
1817
|
function on(t, e) {
|
|
1818
1818
|
t.dispatchEvent(new PointerEvent("pointer" + e, { isPrimary: !0, bubbles: !0 }));
|
|
1819
1819
|
}
|
|
1820
|
-
const
|
|
1820
|
+
const kl = (t, e) => {
|
|
1821
1821
|
const n = t.currentTarget;
|
|
1822
1822
|
if (!n)
|
|
1823
1823
|
return;
|
|
@@ -1835,7 +1835,7 @@ const Vl = (t, e) => {
|
|
|
1835
1835
|
function Js(t) {
|
|
1836
1836
|
return as(t) && !jr();
|
|
1837
1837
|
}
|
|
1838
|
-
function
|
|
1838
|
+
function Vl(t, e, n = {}) {
|
|
1839
1839
|
const [s, i, o] = Lr(t, n), r = (a) => {
|
|
1840
1840
|
const l = a.currentTarget;
|
|
1841
1841
|
if (!Js(a) || se.has(l))
|
|
@@ -1851,7 +1851,7 @@ function kl(t, e, n = {}) {
|
|
|
1851
1851
|
window.addEventListener("pointerup", f, i), window.addEventListener("pointercancel", h, i);
|
|
1852
1852
|
};
|
|
1853
1853
|
return s.forEach((a) => {
|
|
1854
|
-
!Cl(a) && a.getAttribute("tabindex") === null && (a.tabIndex = 0), (n.useGlobalTarget ? window : a).addEventListener("pointerdown", r, i), a.addEventListener("focus", (c) =>
|
|
1854
|
+
!Cl(a) && a.getAttribute("tabindex") === null && (a.tabIndex = 0), (n.useGlobalTarget ? window : a).addEventListener("pointerdown", r, i), a.addEventListener("focus", (c) => kl(c, i), i);
|
|
1855
1855
|
}), o;
|
|
1856
1856
|
}
|
|
1857
1857
|
function El(t) {
|
|
@@ -1861,7 +1861,7 @@ function El(t) {
|
|
|
1861
1861
|
ft.x = ft.y = !1;
|
|
1862
1862
|
});
|
|
1863
1863
|
}
|
|
1864
|
-
const
|
|
1864
|
+
const Nr = /* @__PURE__ */ new Set([
|
|
1865
1865
|
"width",
|
|
1866
1866
|
"height",
|
|
1867
1867
|
"top",
|
|
@@ -1912,7 +1912,7 @@ class us {
|
|
|
1912
1912
|
this.subscriptions.length = 0;
|
|
1913
1913
|
}
|
|
1914
1914
|
}
|
|
1915
|
-
function
|
|
1915
|
+
function Or(t, e) {
|
|
1916
1916
|
return e ? t * (1e3 / e) : 0;
|
|
1917
1917
|
}
|
|
1918
1918
|
const ti = 30, jl = (t) => !isNaN(parseFloat(t)), re = {
|
|
@@ -1986,7 +1986,7 @@ class Ll {
|
|
|
1986
1986
|
this.events[e] || (this.events[e] = new us());
|
|
1987
1987
|
const s = this.events[e].add(n);
|
|
1988
1988
|
return e === "change" ? () => {
|
|
1989
|
-
s(),
|
|
1989
|
+
s(), F.read(() => {
|
|
1990
1990
|
this.events.change.getSize() || this.stop();
|
|
1991
1991
|
});
|
|
1992
1992
|
} : s;
|
|
@@ -2059,7 +2059,7 @@ class Ll {
|
|
|
2059
2059
|
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || e - this.updatedAt > ti)
|
|
2060
2060
|
return 0;
|
|
2061
2061
|
const n = Math.min(this.updatedAt - this.prevUpdatedAt, ti);
|
|
2062
|
-
return
|
|
2062
|
+
return Or(parseFloat(this.current) - parseFloat(this.prevFrameValue), n);
|
|
2063
2063
|
}
|
|
2064
2064
|
/**
|
|
2065
2065
|
* Registers a new animation to control this `MotionValue`. Only one
|
|
@@ -2127,23 +2127,23 @@ function fs(t, e) {
|
|
|
2127
2127
|
$l(t, r, a);
|
|
2128
2128
|
}
|
|
2129
2129
|
}
|
|
2130
|
-
function
|
|
2130
|
+
function Nl(t) {
|
|
2131
2131
|
return !!(J(t) && t.add);
|
|
2132
2132
|
}
|
|
2133
2133
|
function Pn(t, e) {
|
|
2134
2134
|
const n = t.getValue("willChange");
|
|
2135
|
-
if (
|
|
2135
|
+
if (Nl(n))
|
|
2136
2136
|
return n.add(e);
|
|
2137
2137
|
}
|
|
2138
|
-
function
|
|
2138
|
+
function Fr(t) {
|
|
2139
2139
|
return t.props[pr];
|
|
2140
2140
|
}
|
|
2141
|
-
const Br = (t, e, n) => (((1 - 3 * n + 3 * e) * t + (3 * n - 6 * e)) * t + 3 * e) * t,
|
|
2141
|
+
const Br = (t, e, n) => (((1 - 3 * n + 3 * e) * t + (3 * n - 6 * e)) * t + 3 * e) * t, Ol = 1e-7, Fl = 12;
|
|
2142
2142
|
function Bl(t, e, n, s, i) {
|
|
2143
2143
|
let o, r, a = 0;
|
|
2144
2144
|
do
|
|
2145
2145
|
r = e + (n - e) / 2, o = Br(r, s, i) - t, o > 0 ? n = r : e = r;
|
|
2146
|
-
while (Math.abs(o) >
|
|
2146
|
+
while (Math.abs(o) > Ol && ++a < Fl);
|
|
2147
2147
|
return r;
|
|
2148
2148
|
}
|
|
2149
2149
|
function ve(t, e, n, s) {
|
|
@@ -2290,7 +2290,7 @@ function sc(t, e, n) {
|
|
|
2290
2290
|
for (const o of e)
|
|
2291
2291
|
t[o] = Jr(n, i);
|
|
2292
2292
|
}
|
|
2293
|
-
const ni = (t) => t === qt || t ===
|
|
2293
|
+
const ni = (t) => t === qt || t === V, si = (t, e) => parseFloat(t.split(", ")[e]), ii = (t, e) => (n, { transform: s }) => {
|
|
2294
2294
|
if (s === "none" || !s)
|
|
2295
2295
|
return 0;
|
|
2296
2296
|
const i = s.match(/^matrix3d\((.+)\)$/u);
|
|
@@ -2356,7 +2356,7 @@ class ys {
|
|
|
2356
2356
|
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 = o, this.isAsync = r;
|
|
2357
2357
|
}
|
|
2358
2358
|
scheduleResolve() {
|
|
2359
|
-
this.isScheduled = !0, this.isAsync ? (Dt.add(this), Mn || (Mn = !0,
|
|
2359
|
+
this.isScheduled = !0, this.isAsync ? (Dt.add(this), Mn || (Mn = !0, F.read(eo), F.resolveKeyframes(to))) : (this.readKeyframes(), this.complete());
|
|
2360
2360
|
}
|
|
2361
2361
|
readKeyframes() {
|
|
2362
2362
|
const { unresolvedKeyframes: e, name: n, element: s, motionValue: i } = this;
|
|
@@ -2419,7 +2419,7 @@ function so(t, e, n = 1) {
|
|
|
2419
2419
|
const io = (t) => (e) => e.test(t), fc = {
|
|
2420
2420
|
test: (t) => t === "auto",
|
|
2421
2421
|
parse: (t) => t
|
|
2422
|
-
}, ro = [qt,
|
|
2422
|
+
}, ro = [qt, V, pt, St, tl, Ja, fc], ri = (t) => ro.find(io(t));
|
|
2423
2423
|
class oo extends ys {
|
|
2424
2424
|
constructor(e, n, s, i, o) {
|
|
2425
2425
|
super(e, n, s, i, o, !0);
|
|
@@ -2436,7 +2436,7 @@ class oo extends ys {
|
|
|
2436
2436
|
u !== void 0 && (e[l] = u), l === e.length - 1 && (this.finalKeyframe = c);
|
|
2437
2437
|
}
|
|
2438
2438
|
}
|
|
2439
|
-
if (this.resolveNoneKeyframes(), !
|
|
2439
|
+
if (this.resolveNoneKeyframes(), !Nr.has(s) || e.length !== 2)
|
|
2440
2440
|
return;
|
|
2441
2441
|
const [i, o] = e, r = ri(i), a = ri(o);
|
|
2442
2442
|
if (r !== a)
|
|
@@ -2595,7 +2595,7 @@ function gc({ hue: t, saturation: e, lightness: n, alpha: s }) {
|
|
|
2595
2595
|
alpha: s
|
|
2596
2596
|
};
|
|
2597
2597
|
}
|
|
2598
|
-
function
|
|
2598
|
+
function Ne(t, e) {
|
|
2599
2599
|
return (n) => n > 0 ? e : t;
|
|
2600
2600
|
}
|
|
2601
2601
|
const cn = (t, e, n) => {
|
|
@@ -2612,7 +2612,7 @@ function ai(t) {
|
|
|
2612
2612
|
const li = (t, e) => {
|
|
2613
2613
|
const n = ai(t), s = ai(e);
|
|
2614
2614
|
if (!n || !s)
|
|
2615
|
-
return
|
|
2615
|
+
return Ne(t, e);
|
|
2616
2616
|
const i = { ...n };
|
|
2617
2617
|
return (o) => (i.red = cn(n.red, s.red, o), i.green = cn(n.green, s.green, o), i.blue = cn(n.blue, s.blue, o), i.alpha = X(n.alpha, s.alpha, o), Et.transform(i));
|
|
2618
2618
|
}, xc = (t, e) => (n) => e(t(n)), xe = (...t) => t.reduce(xc), Cn = /* @__PURE__ */ new Set(["none", "hidden"]);
|
|
@@ -2623,7 +2623,7 @@ function Tc(t, e) {
|
|
|
2623
2623
|
return (n) => X(t, e, n);
|
|
2624
2624
|
}
|
|
2625
2625
|
function vs(t) {
|
|
2626
|
-
return typeof t == "number" ? Tc : typeof t == "string" ? qn(t) ?
|
|
2626
|
+
return typeof t == "number" ? Tc : typeof t == "string" ? qn(t) ? Ne : tt.test(t) ? li : Sc : Array.isArray(t) ? lo : typeof t == "object" ? tt.test(t) ? li : wc : Ne;
|
|
2627
2627
|
}
|
|
2628
2628
|
function lo(t, e) {
|
|
2629
2629
|
const n = [...t], s = n.length, i = t.map((o, r) => vs(o)(o, e[r]));
|
|
@@ -2654,7 +2654,7 @@ function Pc(t, e) {
|
|
|
2654
2654
|
}
|
|
2655
2655
|
const Sc = (t, e) => {
|
|
2656
2656
|
const n = Rt.createTransformer(e), s = he(t), i = he(e);
|
|
2657
|
-
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 ? Cn.has(t) && !i.values.length || Cn.has(e) && !s.values.length ? bc(t, e) : xe(lo(Pc(s, i), i.values), n) : (Zt(!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.`),
|
|
2657
|
+
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 ? Cn.has(t) && !i.values.length || Cn.has(e) && !s.values.length ? bc(t, e) : xe(lo(Pc(s, i), i.values), n) : (Zt(!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.`), Ne(t, e));
|
|
2658
2658
|
};
|
|
2659
2659
|
function co(t, e, n) {
|
|
2660
2660
|
return typeof t == "number" && typeof e == "number" && typeof n == "number" ? X(t, e, n) : vs(t)(t, e);
|
|
@@ -2662,7 +2662,7 @@ function co(t, e, n) {
|
|
|
2662
2662
|
const Rc = 5;
|
|
2663
2663
|
function uo(t, e, n) {
|
|
2664
2664
|
const s = Math.max(e - Rc, 0);
|
|
2665
|
-
return
|
|
2665
|
+
return Or(n - t(s), e - s);
|
|
2666
2666
|
}
|
|
2667
2667
|
const W = {
|
|
2668
2668
|
// Default spring physics
|
|
@@ -2698,10 +2698,10 @@ function Mc({ duration: t = W.duration, bounce: e = W.bounce, velocity: n = W.ve
|
|
|
2698
2698
|
Zt(t <= /* @__PURE__ */ ht(W.maxDuration), "Spring duration must be 10 seconds or less");
|
|
2699
2699
|
let r = 1 - e;
|
|
2700
2700
|
r = wt(W.minDamping, W.maxDamping, r), t = wt(W.minDuration, W.maxDuration, /* @__PURE__ */ vt(t)), r < 1 ? (i = (c) => {
|
|
2701
|
-
const u = c * r, f = u * t, h = u - n, p =
|
|
2701
|
+
const u = c * r, f = u * t, h = u - n, p = kn(c, r), g = Math.exp(-f);
|
|
2702
2702
|
return un - h / p * g;
|
|
2703
2703
|
}, o = (c) => {
|
|
2704
|
-
const f = c * r * t, h = f * n + n, p = Math.pow(r, 2) * Math.pow(c, 2) * t, g = Math.exp(-f), v =
|
|
2704
|
+
const f = c * r * t, h = f * n + n, p = Math.pow(r, 2) * Math.pow(c, 2) * t, g = Math.exp(-f), v = kn(Math.pow(c, 2), r);
|
|
2705
2705
|
return (-i(c) + un > 0 ? -1 : 1) * ((h - p) * g) / v;
|
|
2706
2706
|
}) : (i = (c) => {
|
|
2707
2707
|
const u = Math.exp(-c * t), f = (c - n) * t + 1;
|
|
@@ -2733,10 +2733,10 @@ function Cc(t, e, n) {
|
|
|
2733
2733
|
s = s - t(s) / e(s);
|
|
2734
2734
|
return s;
|
|
2735
2735
|
}
|
|
2736
|
-
function
|
|
2736
|
+
function kn(t, e) {
|
|
2737
2737
|
return t * Math.sqrt(1 - e * e);
|
|
2738
2738
|
}
|
|
2739
|
-
const
|
|
2739
|
+
const kc = ["duration", "bounce"], Vc = ["stiffness", "damping", "mass"];
|
|
2740
2740
|
function ci(t, e) {
|
|
2741
2741
|
return e.some((n) => t[n] !== void 0);
|
|
2742
2742
|
}
|
|
@@ -2749,7 +2749,7 @@ function Ec(t) {
|
|
|
2749
2749
|
isResolvedFromDuration: !1,
|
|
2750
2750
|
...t
|
|
2751
2751
|
};
|
|
2752
|
-
if (!ci(t,
|
|
2752
|
+
if (!ci(t, Vc) && ci(t, kc))
|
|
2753
2753
|
if (t.visualDuration) {
|
|
2754
2754
|
const n = t.visualDuration, s = 2 * Math.PI / (n * 1.2), i = s * s, o = 2 * wt(0.05, 1, 1 - (t.bounce || 0)) * Math.sqrt(i);
|
|
2755
2755
|
e = {
|
|
@@ -2782,7 +2782,7 @@ function fo(t = W.visualDuration, e = W.bounce) {
|
|
|
2782
2782
|
s || (s = P ? W.restSpeed.granular : W.restSpeed.default), i || (i = P ? W.restDelta.granular : W.restDelta.default);
|
|
2783
2783
|
let S;
|
|
2784
2784
|
if (v < 1) {
|
|
2785
|
-
const w =
|
|
2785
|
+
const w = kn(y, v);
|
|
2786
2786
|
S = (A) => {
|
|
2787
2787
|
const b = Math.exp(-v * y * A);
|
|
2788
2788
|
return r - b * ((g + v * y * x) / w * Math.sin(w * A) + x * Math.cos(w * A));
|
|
@@ -2811,7 +2811,7 @@ function fo(t = W.visualDuration, e = W.bounce) {
|
|
|
2811
2811
|
return a.value = a.done ? r : A, a;
|
|
2812
2812
|
},
|
|
2813
2813
|
toString: () => {
|
|
2814
|
-
const w = Math.min(
|
|
2814
|
+
const w = Math.min(kr(C), Tn), A = Vr((b) => C.next(w * b).value, w, 30);
|
|
2815
2815
|
return w + "ms " + A;
|
|
2816
2816
|
}
|
|
2817
2817
|
};
|
|
@@ -2826,8 +2826,8 @@ function ui({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: s = 3
|
|
|
2826
2826
|
const x = f + v, y = r === void 0 ? x : r(x);
|
|
2827
2827
|
y !== x && (v = y - f);
|
|
2828
2828
|
const P = (R) => -v * Math.exp(-R / s), S = (R) => y + P(R), C = (R) => {
|
|
2829
|
-
const D = P(R),
|
|
2830
|
-
h.done = Math.abs(D) <= c, h.value = h.done ? y :
|
|
2829
|
+
const D = P(R), k = S(R);
|
|
2830
|
+
h.done = Math.abs(D) <= c, h.value = h.done ? y : k;
|
|
2831
2831
|
};
|
|
2832
2832
|
let w, A;
|
|
2833
2833
|
const b = (R) => {
|
|
@@ -2902,31 +2902,31 @@ function po(t, e, { clamp: n = !0, ease: s, mixer: i } = {}) {
|
|
|
2902
2902
|
};
|
|
2903
2903
|
return n ? (u) => c(wt(t[0], t[o - 1], u)) : c;
|
|
2904
2904
|
}
|
|
2905
|
-
function
|
|
2905
|
+
function Nc(t, e) {
|
|
2906
2906
|
const n = t[t.length - 1];
|
|
2907
2907
|
for (let s = 1; s <= e; s++) {
|
|
2908
2908
|
const i = /* @__PURE__ */ Wt(0, e, s);
|
|
2909
2909
|
t.push(X(n, 1, i));
|
|
2910
2910
|
}
|
|
2911
2911
|
}
|
|
2912
|
-
function
|
|
2912
|
+
function Oc(t) {
|
|
2913
2913
|
const e = [0];
|
|
2914
|
-
return
|
|
2914
|
+
return Nc(e, t.length - 1), e;
|
|
2915
2915
|
}
|
|
2916
|
-
function
|
|
2916
|
+
function Fc(t, e) {
|
|
2917
2917
|
return t.map((n) => n * e);
|
|
2918
2918
|
}
|
|
2919
2919
|
function Bc(t, e) {
|
|
2920
2920
|
return t.map(() => e || ho).splice(0, t.length - 1);
|
|
2921
2921
|
}
|
|
2922
|
-
function
|
|
2922
|
+
function Oe({ duration: t = 300, keyframes: e, times: n, ease: s = "easeInOut" }) {
|
|
2923
2923
|
const i = Lc(s) ? s.map(di) : di(s), o = {
|
|
2924
2924
|
done: !1,
|
|
2925
2925
|
value: e[0]
|
|
2926
|
-
}, r =
|
|
2926
|
+
}, r = Fc(
|
|
2927
2927
|
// Only use the provided offsets if they're the correct length
|
|
2928
2928
|
// TODO Maybe we should warn here if there's a length mismatch
|
|
2929
|
-
n && n.length === e.length ? n :
|
|
2929
|
+
n && n.length === e.length ? n : Oc(e),
|
|
2930
2930
|
t
|
|
2931
2931
|
), a = po(r, e, {
|
|
2932
2932
|
ease: Array.isArray(i) ? i : Bc(e, i)
|
|
@@ -2939,7 +2939,7 @@ function Fe({ duration: t = 300, keyframes: e, times: n, ease: s = "easeInOut" }
|
|
|
2939
2939
|
const Ic = (t) => {
|
|
2940
2940
|
const e = ({ timestamp: n }) => t(n);
|
|
2941
2941
|
return {
|
|
2942
|
-
start: () =>
|
|
2942
|
+
start: () => F.update(e, !0),
|
|
2943
2943
|
stop: () => Tt(e),
|
|
2944
2944
|
/**
|
|
2945
2945
|
* If we're processing this frame we can use the
|
|
@@ -2950,8 +2950,8 @@ const Ic = (t) => {
|
|
|
2950
2950
|
}, _c = {
|
|
2951
2951
|
decay: ui,
|
|
2952
2952
|
inertia: ui,
|
|
2953
|
-
tween:
|
|
2954
|
-
keyframes:
|
|
2953
|
+
tween: Oe,
|
|
2954
|
+
keyframes: Oe,
|
|
2955
2955
|
spring: fo
|
|
2956
2956
|
}, Uc = (t) => t / 100;
|
|
2957
2957
|
class Ge extends ao {
|
|
@@ -2970,15 +2970,15 @@ class Ge extends ao {
|
|
|
2970
2970
|
super.flatten(), this._resolved && Object.assign(this._resolved, this.initPlayback(this._resolved.keyframes));
|
|
2971
2971
|
}
|
|
2972
2972
|
initPlayback(e) {
|
|
2973
|
-
const { type: n = "keyframes", repeat: s = 0, repeatDelay: i = 0, repeatType: o, velocity: r = 0 } = this.options, a = rs(n) ? n : _c[n] ||
|
|
2973
|
+
const { type: n = "keyframes", repeat: s = 0, repeatDelay: i = 0, repeatType: o, velocity: r = 0 } = this.options, a = rs(n) ? n : _c[n] || Oe;
|
|
2974
2974
|
let l, c;
|
|
2975
|
-
a !==
|
|
2975
|
+
a !== Oe && typeof e[0] != "number" && (process.env.NODE_ENV !== "production" && gt(e.length === 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${e}`), l = xe(Uc, co(e[0], e[1])), e = [0, 100]);
|
|
2976
2976
|
const u = a({ ...this.options, keyframes: e });
|
|
2977
2977
|
o === "mirror" && (c = a({
|
|
2978
2978
|
...this.options,
|
|
2979
2979
|
keyframes: [...e].reverse(),
|
|
2980
2980
|
velocity: -r
|
|
2981
|
-
})), u.calculatedDuration === null && (u.calculatedDuration =
|
|
2981
|
+
})), u.calculatedDuration === null && (u.calculatedDuration = kr(u));
|
|
2982
2982
|
const { calculatedDuration: f } = u, h = f + i, p = h * (s + 1) - i;
|
|
2983
2983
|
return {
|
|
2984
2984
|
generator: u,
|
|
@@ -3009,8 +3009,8 @@ class Ge extends ao {
|
|
|
3009
3009
|
let S = this.currentTime, C = o;
|
|
3010
3010
|
if (p) {
|
|
3011
3011
|
const R = Math.min(this.currentTime, u) / f;
|
|
3012
|
-
let D = Math.floor(R),
|
|
3013
|
-
!
|
|
3012
|
+
let D = Math.floor(R), k = R % 1;
|
|
3013
|
+
!k && R >= 1 && (k = 1), k === 1 && D--, D = Math.min(D, p + 1), !!(D % 2) && (g === "reverse" ? (k = 1 - k, v && (k -= v / f)) : g === "mirror" && (C = r)), S = wt(0, 1, k) * f;
|
|
3014
3014
|
}
|
|
3015
3015
|
const w = P ? { done: !1, value: l[0] } : C.next(S);
|
|
3016
3016
|
a && (w.value = a(w.value));
|
|
@@ -3102,7 +3102,7 @@ function Yc(t, e, n, { delay: s = 0, duration: i = 300, repeat: o = 0, repeatTyp
|
|
|
3102
3102
|
direction: r === "reverse" ? "alternate" : "normal"
|
|
3103
3103
|
});
|
|
3104
3104
|
}
|
|
3105
|
-
const Kc = /* @__PURE__ */ Xn(() => Object.hasOwnProperty.call(Element.prototype, "animate")),
|
|
3105
|
+
const Kc = /* @__PURE__ */ Xn(() => Object.hasOwnProperty.call(Element.prototype, "animate")), Fe = 10, zc = 2e4;
|
|
3106
3106
|
function Gc(t) {
|
|
3107
3107
|
return rs(t.type) || t.type === "spring" || !Er(t.ease);
|
|
3108
3108
|
}
|
|
@@ -3118,11 +3118,11 @@ function Zc(t, e) {
|
|
|
3118
3118
|
const i = [];
|
|
3119
3119
|
let o = 0;
|
|
3120
3120
|
for (; !s.done && o < zc; )
|
|
3121
|
-
s = n.sample(o), i.push(s.value), o +=
|
|
3121
|
+
s = n.sample(o), i.push(s.value), o += Fe;
|
|
3122
3122
|
return {
|
|
3123
3123
|
times: void 0,
|
|
3124
3124
|
keyframes: i,
|
|
3125
|
-
duration: o -
|
|
3125
|
+
duration: o - Fe,
|
|
3126
3126
|
ease: "linear"
|
|
3127
3127
|
};
|
|
3128
3128
|
}
|
|
@@ -3262,7 +3262,7 @@ class hi extends ao {
|
|
|
3262
3262
|
times: a,
|
|
3263
3263
|
isGenerator: !0
|
|
3264
3264
|
}), v = /* @__PURE__ */ ht(this.time);
|
|
3265
|
-
c.setWithVelocity(g.sample(v -
|
|
3265
|
+
c.setWithVelocity(g.sample(v - Fe).value, g.sample(v).value, Fe);
|
|
3266
3266
|
}
|
|
3267
3267
|
const { onStop: l } = this.options;
|
|
3268
3268
|
l && l(), this.cancel();
|
|
@@ -3336,7 +3336,7 @@ const xs = (t, e, n, s = {}, i, o) => (r) => {
|
|
|
3336
3336
|
if ((u.type === !1 || u.duration === 0 && !u.repeatDelay) && (u.duration = 0, u.delay === 0 && (f = !0)), f && !o && e.get() !== void 0) {
|
|
3337
3337
|
const h = ze(u.keyframes, a);
|
|
3338
3338
|
if (h !== void 0)
|
|
3339
|
-
return
|
|
3339
|
+
return F.update(() => {
|
|
3340
3340
|
u.onUpdate(h), u.onComplete();
|
|
3341
3341
|
}), new wl([]);
|
|
3342
3342
|
}
|
|
@@ -3361,23 +3361,23 @@ function go(t, e, { delay: n = 0, transitionOverride: s, type: i } = {}) {
|
|
|
3361
3361
|
};
|
|
3362
3362
|
let v = !1;
|
|
3363
3363
|
if (window.MotionHandoffAnimation) {
|
|
3364
|
-
const y =
|
|
3364
|
+
const y = Fr(t);
|
|
3365
3365
|
if (y) {
|
|
3366
|
-
const P = window.MotionHandoffAnimation(y, f,
|
|
3366
|
+
const P = window.MotionHandoffAnimation(y, f, F);
|
|
3367
3367
|
P !== null && (g.startTime = P, v = !0);
|
|
3368
3368
|
}
|
|
3369
3369
|
}
|
|
3370
|
-
Pn(t, f), h.start(xs(f, h, p, t.shouldReduceMotion &&
|
|
3370
|
+
Pn(t, f), h.start(xs(f, h, p, t.shouldReduceMotion && Nr.has(f) ? { type: !1 } : g, t, v));
|
|
3371
3371
|
const x = h.animation;
|
|
3372
3372
|
x && c.push(x);
|
|
3373
3373
|
}
|
|
3374
3374
|
return a && Promise.all(c).then(() => {
|
|
3375
|
-
|
|
3375
|
+
F.update(() => {
|
|
3376
3376
|
a && fs(t, a);
|
|
3377
3377
|
});
|
|
3378
3378
|
}), c;
|
|
3379
3379
|
}
|
|
3380
|
-
function
|
|
3380
|
+
function Vn(t, e, n = {}) {
|
|
3381
3381
|
var s;
|
|
3382
3382
|
const i = Ke(t, e, n.type === "exit" ? (s = t.presenceContext) === null || s === void 0 ? void 0 : s.custom : void 0);
|
|
3383
3383
|
let { transition: o = t.getDefaultTransition() || {} } = i || {};
|
|
@@ -3395,7 +3395,7 @@ function kn(t, e, n = {}) {
|
|
|
3395
3395
|
function iu(t, e, n = 0, s = 0, i = 1, o) {
|
|
3396
3396
|
const r = [], a = (t.variantChildren.size - 1) * s, l = i === 1 ? (c = 0) => c * s : (c = 0) => a - c * s;
|
|
3397
3397
|
return Array.from(t.variantChildren).sort(ru).forEach((c, u) => {
|
|
3398
|
-
c.notify("AnimationStart", e), r.push(
|
|
3398
|
+
c.notify("AnimationStart", e), r.push(Vn(c, e, {
|
|
3399
3399
|
...o,
|
|
3400
3400
|
delay: n + l(u)
|
|
3401
3401
|
}).then(() => c.notify("AnimationComplete", e)));
|
|
@@ -3408,10 +3408,10 @@ function yo(t, e, n = {}) {
|
|
|
3408
3408
|
t.notify("AnimationStart", e);
|
|
3409
3409
|
let s;
|
|
3410
3410
|
if (Array.isArray(e)) {
|
|
3411
|
-
const i = e.map((o) =>
|
|
3411
|
+
const i = e.map((o) => Vn(t, o, n));
|
|
3412
3412
|
s = Promise.all(i);
|
|
3413
3413
|
} else if (typeof e == "string")
|
|
3414
|
-
s =
|
|
3414
|
+
s = Vn(t, e, n);
|
|
3415
3415
|
else {
|
|
3416
3416
|
const i = typeof e == "function" ? Ke(t, e, n.custom) : e;
|
|
3417
3417
|
s = Promise.all(go(t, i, n));
|
|
@@ -3469,25 +3469,25 @@ function uu(t) {
|
|
|
3469
3469
|
let R = b || // If we're making this variant active, we want to always make it active
|
|
3470
3470
|
y === l && P.isActive && !A && C || // If we removed a higher-priority variant (i is in reverse order)
|
|
3471
3471
|
x > g && C, D = !1;
|
|
3472
|
-
const
|
|
3473
|
-
let
|
|
3474
|
-
w === !1 && (
|
|
3472
|
+
const k = Array.isArray(S) ? S : [S];
|
|
3473
|
+
let O = k.reduce(i(y), {});
|
|
3474
|
+
w === !1 && (O = {});
|
|
3475
3475
|
const { prevResolvedValues: Z = {} } = P, L = {
|
|
3476
3476
|
...Z,
|
|
3477
|
-
...
|
|
3477
|
+
...O
|
|
3478
3478
|
}, U = (H) => {
|
|
3479
3479
|
R = !0, h.has(H) && (D = !0, h.delete(H)), P.needsAnimating[H] = !0;
|
|
3480
3480
|
const ot = t.getValue(H);
|
|
3481
3481
|
ot && (ot.liveStyle = !1);
|
|
3482
3482
|
};
|
|
3483
3483
|
for (const H in L) {
|
|
3484
|
-
const ot =
|
|
3484
|
+
const ot = O[H], Lt = Z[H];
|
|
3485
3485
|
if (p.hasOwnProperty(H))
|
|
3486
3486
|
continue;
|
|
3487
3487
|
let $t = !1;
|
|
3488
3488
|
bn(ot) && bn(Lt) ? $t = !Cr(ot, Lt) : $t = ot !== Lt, $t ? ot != null ? U(H) : h.add(H) : ot !== void 0 && h.has(H) ? U(H) : P.protectedKeys[H] = !0;
|
|
3489
3489
|
}
|
|
3490
|
-
P.prevProp = S, P.prevResolvedValues =
|
|
3490
|
+
P.prevProp = S, P.prevResolvedValues = O, P.isActive && (p = { ...p, ...O }), s && t.blockInitialAnimation && (R = !1), R && (!(A && b) || D) && f.push(...k.map((H) => ({
|
|
3491
3491
|
animation: H,
|
|
3492
3492
|
options: { type: y }
|
|
3493
3493
|
})));
|
|
@@ -3644,7 +3644,7 @@ class xo {
|
|
|
3644
3644
|
const { onStart: x, onMove: y } = this.handlers;
|
|
3645
3645
|
h || (x && x(this.lastMoveEvent, f), this.startEvent = this.lastMoveEvent), y && y(this.lastMoveEvent, f);
|
|
3646
3646
|
}, this.handlePointerMove = (f, h) => {
|
|
3647
|
-
this.lastMoveEvent = f, this.lastMoveEventInfo = fn(h, this.transformPagePoint),
|
|
3647
|
+
this.lastMoveEvent = f, this.lastMoveEventInfo = fn(h, this.transformPagePoint), F.update(this.updatePoint, !0);
|
|
3648
3648
|
}, this.handlePointerUp = (f, h) => {
|
|
3649
3649
|
this.end();
|
|
3650
3650
|
const { onEnd: p, onSessionEnd: g, resumeAnimation: v } = this.handlers;
|
|
@@ -3755,12 +3755,12 @@ function Cu(t, e) {
|
|
|
3755
3755
|
y: Ti(t.y, e.y)
|
|
3756
3756
|
};
|
|
3757
3757
|
}
|
|
3758
|
-
function
|
|
3758
|
+
function ku(t, e) {
|
|
3759
3759
|
let n = 0.5;
|
|
3760
3760
|
const s = rt(t), i = rt(e);
|
|
3761
3761
|
return i > s ? n = /* @__PURE__ */ Wt(e.min, e.max - s, t.min) : s > i && (n = /* @__PURE__ */ Wt(t.min, t.max - i, e.min)), wt(0, 1, n);
|
|
3762
3762
|
}
|
|
3763
|
-
function
|
|
3763
|
+
function Vu(t, e) {
|
|
3764
3764
|
const n = {};
|
|
3765
3765
|
return e.min !== void 0 && (n.min = e.min - t.min), e.max !== void 0 && (n.max = e.max - t.min), n;
|
|
3766
3766
|
}
|
|
@@ -3821,7 +3821,7 @@ function hn(t) {
|
|
|
3821
3821
|
function Dn({ scale: t, scaleX: e, scaleY: n }) {
|
|
3822
3822
|
return !hn(t) || !hn(e) || !hn(n);
|
|
3823
3823
|
}
|
|
3824
|
-
function
|
|
3824
|
+
function kt(t) {
|
|
3825
3825
|
return Dn(t) || So(t) || t.z || t.rotate || t.rotateX || t.rotateY || t.skewX || t.skewY;
|
|
3826
3826
|
}
|
|
3827
3827
|
function So(t) {
|
|
@@ -3843,7 +3843,7 @@ function jn(t, e = 0, n = 1, s, i) {
|
|
|
3843
3843
|
function Ro(t, { x: e, y: n }) {
|
|
3844
3844
|
jn(t.x, e.translate, e.scale, e.originPoint), jn(t.y, n.translate, n.scale, n.originPoint);
|
|
3845
3845
|
}
|
|
3846
|
-
const Ci = 0.999999999999,
|
|
3846
|
+
const Ci = 0.999999999999, ki = 1.0000000000001;
|
|
3847
3847
|
function Lu(t, e, n, s = !1) {
|
|
3848
3848
|
const i = n.length;
|
|
3849
3849
|
if (!i)
|
|
@@ -3856,19 +3856,19 @@ function Lu(t, e, n, s = !1) {
|
|
|
3856
3856
|
l && l.props.style && l.props.style.display === "contents" || (s && o.options.layoutScroll && o.scroll && o !== o.root && Ut(t, {
|
|
3857
3857
|
x: -o.scroll.offset.x,
|
|
3858
3858
|
y: -o.scroll.offset.y
|
|
3859
|
-
}), r && (e.x *= r.x.scale, e.y *= r.y.scale, Ro(t, r)), s &&
|
|
3859
|
+
}), r && (e.x *= r.x.scale, e.y *= r.y.scale, Ro(t, r)), s && kt(o.latestValues) && Ut(t, o.latestValues));
|
|
3860
3860
|
}
|
|
3861
|
-
e.x <
|
|
3861
|
+
e.x < ki && e.x > Ci && (e.x = 1), e.y < ki && e.y > Ci && (e.y = 1);
|
|
3862
3862
|
}
|
|
3863
3863
|
function _t(t, e) {
|
|
3864
3864
|
t.min = t.min + e, t.max = t.max + e;
|
|
3865
3865
|
}
|
|
3866
|
-
function
|
|
3866
|
+
function Vi(t, e, n, s, i = 0.5) {
|
|
3867
3867
|
const o = X(t.min, t.max, i);
|
|
3868
3868
|
jn(t, e, n, o, s);
|
|
3869
3869
|
}
|
|
3870
3870
|
function Ut(t, e) {
|
|
3871
|
-
|
|
3871
|
+
Vi(t.x, e.x, e.scaleX, e.scale, e.originX), Vi(t.y, e.y, e.scaleY, e.scale, e.originY);
|
|
3872
3872
|
}
|
|
3873
3873
|
function Mo(t, e) {
|
|
3874
3874
|
return Po(ju(t.getBoundingClientRect(), e));
|
|
@@ -3877,8 +3877,8 @@ function $u(t, e, n) {
|
|
|
3877
3877
|
const s = Mo(t, n), { scroll: i } = e;
|
|
3878
3878
|
return i && (_t(s.x, i.offset.x), _t(s.y, i.offset.y)), s;
|
|
3879
3879
|
}
|
|
3880
|
-
const Ao = ({ current: t }) => t ? t.ownerDocument.defaultView : null,
|
|
3881
|
-
class
|
|
3880
|
+
const Ao = ({ current: t }) => t ? t.ownerDocument.defaultView : null, Nu = /* @__PURE__ */ new WeakMap();
|
|
3881
|
+
class Ou {
|
|
3882
3882
|
constructor(e) {
|
|
3883
3883
|
this.openDragLock = null, this.isDragging = !1, this.currentDirection = null, this.originPoint = { x: 0, y: 0 }, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic = z(), this.visualElement = e;
|
|
3884
3884
|
}
|
|
@@ -3903,7 +3903,7 @@ class Fu {
|
|
|
3903
3903
|
}
|
|
3904
3904
|
}
|
|
3905
3905
|
this.originPoint[x] = y;
|
|
3906
|
-
}), g &&
|
|
3906
|
+
}), g && F.postRender(() => g(u, f)), Pn(this.visualElement, "transform");
|
|
3907
3907
|
const { animationState: v } = this.visualElement;
|
|
3908
3908
|
v && v.setActive("whileDrag", !0);
|
|
3909
3909
|
}, r = (u, f) => {
|
|
@@ -3912,7 +3912,7 @@ class Fu {
|
|
|
3912
3912
|
return;
|
|
3913
3913
|
const { offset: x } = f;
|
|
3914
3914
|
if (p && this.currentDirection === null) {
|
|
3915
|
-
this.currentDirection =
|
|
3915
|
+
this.currentDirection = Fu(x), this.currentDirection !== null && g && g(this.currentDirection);
|
|
3916
3916
|
return;
|
|
3917
3917
|
}
|
|
3918
3918
|
this.updateAxis("x", f.point, x), this.updateAxis("y", f.point, x), this.visualElement.render(), v && v(u, f);
|
|
@@ -3939,7 +3939,7 @@ class Fu {
|
|
|
3939
3939
|
const { velocity: i } = n;
|
|
3940
3940
|
this.startAnimation(i);
|
|
3941
3941
|
const { onDragEnd: o } = this.getProps();
|
|
3942
|
-
o &&
|
|
3942
|
+
o && F.postRender(() => o(e, n));
|
|
3943
3943
|
}
|
|
3944
3944
|
cancel() {
|
|
3945
3945
|
this.isDragging = !1;
|
|
@@ -3950,7 +3950,7 @@ class Fu {
|
|
|
3950
3950
|
}
|
|
3951
3951
|
updateAxis(e, n, s) {
|
|
3952
3952
|
const { drag: i } = this.getProps();
|
|
3953
|
-
if (!s || !
|
|
3953
|
+
if (!s || !ke(e, i, this.currentDirection))
|
|
3954
3954
|
return;
|
|
3955
3955
|
const o = this.getAxisMotionValue(e);
|
|
3956
3956
|
let r = this.originPoint[e] + s[e];
|
|
@@ -3959,13 +3959,13 @@ class Fu {
|
|
|
3959
3959
|
resolveConstraints() {
|
|
3960
3960
|
var e;
|
|
3961
3961
|
const { dragConstraints: n, dragElastic: s } = this.getProps(), i = this.visualElement.projection && !this.visualElement.projection.layout ? this.visualElement.projection.measure(!1) : (e = this.visualElement.projection) === null || e === void 0 ? void 0 : e.layout, o = this.constraints;
|
|
3962
|
-
n &&
|
|
3963
|
-
this.constraints !== !1 && this.getAxisMotionValue(r) && (this.constraints[r] =
|
|
3962
|
+
n && Ft(n) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : n && i ? this.constraints = Au(i.layoutBox, n) : this.constraints = !1, this.elastic = Eu(s), o !== this.constraints && i && this.constraints && !this.hasMutatedConstraints && ct((r) => {
|
|
3963
|
+
this.constraints !== !1 && this.getAxisMotionValue(r) && (this.constraints[r] = Vu(i.layoutBox[r], this.constraints[r]));
|
|
3964
3964
|
});
|
|
3965
3965
|
}
|
|
3966
3966
|
resolveRefConstraints() {
|
|
3967
3967
|
const { dragConstraints: e, onMeasureDragConstraints: n } = this.getProps();
|
|
3968
|
-
if (!e || !
|
|
3968
|
+
if (!e || !Ft(e))
|
|
3969
3969
|
return !1;
|
|
3970
3970
|
const s = e.current;
|
|
3971
3971
|
gt(s !== null, "If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");
|
|
@@ -3982,7 +3982,7 @@ class Fu {
|
|
|
3982
3982
|
}
|
|
3983
3983
|
startAnimation(e) {
|
|
3984
3984
|
const { drag: n, dragMomentum: s, dragElastic: i, dragTransition: o, dragSnapToOrigin: r, onDragTransitionEnd: a } = this.getProps(), l = this.constraints || {}, c = ct((u) => {
|
|
3985
|
-
if (!
|
|
3985
|
+
if (!ke(u, n, this.currentDirection))
|
|
3986
3986
|
return;
|
|
3987
3987
|
let f = l && l[u] || {};
|
|
3988
3988
|
r && (f = { min: 0, max: 0 });
|
|
@@ -4031,7 +4031,7 @@ class Fu {
|
|
|
4031
4031
|
snapToCursor(e) {
|
|
4032
4032
|
ct((n) => {
|
|
4033
4033
|
const { drag: s } = this.getProps();
|
|
4034
|
-
if (!
|
|
4034
|
+
if (!ke(n, s, this.currentDirection))
|
|
4035
4035
|
return;
|
|
4036
4036
|
const { projection: i } = this.visualElement, o = this.getAxisMotionValue(n);
|
|
4037
4037
|
if (i && i.layout) {
|
|
@@ -4049,7 +4049,7 @@ class Fu {
|
|
|
4049
4049
|
if (!this.visualElement.current)
|
|
4050
4050
|
return;
|
|
4051
4051
|
const { drag: e, dragConstraints: n } = this.getProps(), { projection: s } = this.visualElement;
|
|
4052
|
-
if (!
|
|
4052
|
+
if (!Ft(n) || !s || !this.constraints)
|
|
4053
4053
|
return;
|
|
4054
4054
|
this.stopAnimation();
|
|
4055
4055
|
const i = { x: 0, y: 0 };
|
|
@@ -4057,12 +4057,12 @@ class Fu {
|
|
|
4057
4057
|
const a = this.getAxisMotionValue(r);
|
|
4058
4058
|
if (a && this.constraints !== !1) {
|
|
4059
4059
|
const l = a.get();
|
|
4060
|
-
i[r] =
|
|
4060
|
+
i[r] = ku({ min: l, max: l }, this.constraints[r]);
|
|
4061
4061
|
}
|
|
4062
4062
|
});
|
|
4063
4063
|
const { transformTemplate: o } = this.visualElement.getProps();
|
|
4064
4064
|
this.visualElement.current.style.transform = o ? o({}, "") : "none", s.root && s.root.updateScroll(), s.updateLayout(), this.resolveConstraints(), ct((r) => {
|
|
4065
|
-
if (!
|
|
4065
|
+
if (!ke(r, e, null))
|
|
4066
4066
|
return;
|
|
4067
4067
|
const a = this.getAxisMotionValue(r), { min: l, max: c } = this.constraints[r];
|
|
4068
4068
|
a.set(X(l, c, i[r]));
|
|
@@ -4071,15 +4071,15 @@ class Fu {
|
|
|
4071
4071
|
addListeners() {
|
|
4072
4072
|
if (!this.visualElement.current)
|
|
4073
4073
|
return;
|
|
4074
|
-
|
|
4074
|
+
Nu.set(this.visualElement, this);
|
|
4075
4075
|
const e = this.visualElement.current, n = ae(e, "pointerdown", (l) => {
|
|
4076
4076
|
const { drag: c, dragListener: u = !0 } = this.getProps();
|
|
4077
4077
|
c && u && this.start(l);
|
|
4078
4078
|
}), s = () => {
|
|
4079
4079
|
const { dragConstraints: l } = this.getProps();
|
|
4080
|
-
|
|
4080
|
+
Ft(l) && l.current && (this.constraints = this.resolveRefConstraints());
|
|
4081
4081
|
}, { projection: i } = this.visualElement, o = i.addEventListener("measure", s);
|
|
4082
|
-
i && !i.layout && (i.root && i.root.updateScroll(), i.updateLayout()),
|
|
4082
|
+
i && !i.layout && (i.root && i.root.updateScroll(), i.updateLayout()), F.read(s);
|
|
4083
4083
|
const r = pe(window, "resize", () => this.scalePositionWithinConstraints()), a = i.addEventListener("didUpdate", ({ delta: l, hasLayoutChanged: c }) => {
|
|
4084
4084
|
this.isDragging && c && (ct((u) => {
|
|
4085
4085
|
const f = this.getAxisMotionValue(u);
|
|
@@ -4103,16 +4103,16 @@ class Fu {
|
|
|
4103
4103
|
};
|
|
4104
4104
|
}
|
|
4105
4105
|
}
|
|
4106
|
-
function
|
|
4106
|
+
function ke(t, e, n) {
|
|
4107
4107
|
return (e === !0 || e === t) && (n === null || n === t);
|
|
4108
4108
|
}
|
|
4109
|
-
function
|
|
4109
|
+
function Fu(t, e = 10) {
|
|
4110
4110
|
let n = null;
|
|
4111
4111
|
return Math.abs(t.y) > e ? n = "y" : Math.abs(t.x) > e && (n = "x"), n;
|
|
4112
4112
|
}
|
|
4113
4113
|
class Bu extends Mt {
|
|
4114
4114
|
constructor(e) {
|
|
4115
|
-
super(e), this.removeGroupControls = it, this.removeListeners = it, this.controls = new
|
|
4115
|
+
super(e), this.removeGroupControls = it, this.removeListeners = it, this.controls = new Ou(e);
|
|
4116
4116
|
}
|
|
4117
4117
|
mount() {
|
|
4118
4118
|
const { dragControls: e } = this.node.getProps();
|
|
@@ -4123,7 +4123,7 @@ class Bu extends Mt {
|
|
|
4123
4123
|
}
|
|
4124
4124
|
}
|
|
4125
4125
|
const Ei = (t) => (e, n) => {
|
|
4126
|
-
t &&
|
|
4126
|
+
t && F.postRender(() => t(e, n));
|
|
4127
4127
|
};
|
|
4128
4128
|
class Iu extends Mt {
|
|
4129
4129
|
constructor() {
|
|
@@ -4142,7 +4142,7 @@ class Iu extends Mt {
|
|
|
4142
4142
|
onStart: Ei(n),
|
|
4143
4143
|
onMove: s,
|
|
4144
4144
|
onEnd: (o, r) => {
|
|
4145
|
-
delete this.session, i &&
|
|
4145
|
+
delete this.session, i && F.postRender(() => i(o, r));
|
|
4146
4146
|
}
|
|
4147
4147
|
};
|
|
4148
4148
|
}
|
|
@@ -4176,7 +4176,7 @@ const ee = {
|
|
|
4176
4176
|
if (!e.target)
|
|
4177
4177
|
return t;
|
|
4178
4178
|
if (typeof t == "string")
|
|
4179
|
-
if (
|
|
4179
|
+
if (V.test(t))
|
|
4180
4180
|
t = parseFloat(t);
|
|
4181
4181
|
else
|
|
4182
4182
|
return t;
|
|
@@ -4211,7 +4211,7 @@ class Uu extends xa {
|
|
|
4211
4211
|
}
|
|
4212
4212
|
getSnapshotBeforeUpdate(e) {
|
|
4213
4213
|
const { layoutDependency: n, visualElement: s, drag: i, isPresent: o } = this.props, r = s.projection;
|
|
4214
|
-
return r && (r.isPresent = o, i || e.layoutDependency !== n || n === void 0 ? r.willUpdate() : this.safeToRemove(), e.isPresent !== o && (o ? r.promote() : r.relegate() ||
|
|
4214
|
+
return r && (r.isPresent = o, i || e.layoutDependency !== n || n === void 0 ? r.willUpdate() : this.safeToRemove(), e.isPresent !== o && (o ? r.promote() : r.relegate() || F.postRender(() => {
|
|
4215
4215
|
const a = r.getStack();
|
|
4216
4216
|
(!a || !a.members.length) && this.safeToRemove();
|
|
4217
4217
|
}))), null;
|
|
@@ -4281,9 +4281,9 @@ function Gu(t, e) {
|
|
|
4281
4281
|
const o = i - n;
|
|
4282
4282
|
o >= e && (Tt(s), t(o - e));
|
|
4283
4283
|
};
|
|
4284
|
-
return
|
|
4284
|
+
return F.read(s, !0), () => Tt(s);
|
|
4285
4285
|
}
|
|
4286
|
-
const
|
|
4286
|
+
const ko = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"], Zu = ko.length, ji = (t) => typeof t == "string" ? parseFloat(t) : t, Li = (t) => typeof t == "number" || V.test(t);
|
|
4287
4287
|
function Hu(t, e, n, s, i, o) {
|
|
4288
4288
|
i ? (t.opacity = X(
|
|
4289
4289
|
0,
|
|
@@ -4292,7 +4292,7 @@ function Hu(t, e, n, s, i, o) {
|
|
|
4292
4292
|
qu(s)
|
|
4293
4293
|
), t.opacityExit = X(e.opacity !== void 0 ? e.opacity : 1, 0, Qu(s))) : o && (t.opacity = X(e.opacity !== void 0 ? e.opacity : 1, n.opacity !== void 0 ? n.opacity : 1, s));
|
|
4294
4294
|
for (let r = 0; r < Zu; r++) {
|
|
4295
|
-
const a = `border${
|
|
4295
|
+
const a = `border${ko[r]}Radius`;
|
|
4296
4296
|
let l = $i(e, a), c = $i(n, a);
|
|
4297
4297
|
if (l === void 0 && c === void 0)
|
|
4298
4298
|
continue;
|
|
@@ -4303,27 +4303,27 @@ function Hu(t, e, n, s, i, o) {
|
|
|
4303
4303
|
function $i(t, e) {
|
|
4304
4304
|
return t[e] !== void 0 ? t[e] : t.borderRadius;
|
|
4305
4305
|
}
|
|
4306
|
-
const qu = /* @__PURE__ */
|
|
4307
|
-
function
|
|
4306
|
+
const qu = /* @__PURE__ */ Vo(0, 0.5, Yr), Qu = /* @__PURE__ */ Vo(0.5, 0.95, it);
|
|
4307
|
+
function Vo(t, e, n) {
|
|
4308
4308
|
return (s) => s < t ? 0 : s > e ? 1 : n(/* @__PURE__ */ Wt(t, e, s));
|
|
4309
4309
|
}
|
|
4310
|
-
function
|
|
4310
|
+
function Ni(t, e) {
|
|
4311
4311
|
t.min = e.min, t.max = e.max;
|
|
4312
4312
|
}
|
|
4313
4313
|
function lt(t, e) {
|
|
4314
|
-
|
|
4314
|
+
Ni(t.x, e.x), Ni(t.y, e.y);
|
|
4315
4315
|
}
|
|
4316
|
-
function
|
|
4316
|
+
function Oi(t, e) {
|
|
4317
4317
|
t.translate = e.translate, t.scale = e.scale, t.originPoint = e.originPoint, t.origin = e.origin;
|
|
4318
4318
|
}
|
|
4319
|
-
function
|
|
4319
|
+
function Fi(t, e, n, s, i) {
|
|
4320
4320
|
return t -= e, t = Be(t, 1 / n, s), i !== void 0 && (t = Be(t, 1 / i, s)), t;
|
|
4321
4321
|
}
|
|
4322
4322
|
function Ju(t, e = 0, n = 1, s = 0.5, i, o = t, r = t) {
|
|
4323
4323
|
if (pt.test(e) && (e = parseFloat(e), e = X(r.min, r.max, e / 100) - r.min), typeof e != "number")
|
|
4324
4324
|
return;
|
|
4325
4325
|
let a = X(o.min, o.max, s);
|
|
4326
|
-
t === o && (a -= e), t.min =
|
|
4326
|
+
t === o && (a -= e), t.min = Fi(t.min, e, n, a, i), t.max = Fi(t.max, e, n, a, i);
|
|
4327
4327
|
}
|
|
4328
4328
|
function Bi(t, e, [n, s, i], o, r) {
|
|
4329
4329
|
Ju(t, e[n], e[s], e[i], e.scale, o, r);
|
|
@@ -4420,7 +4420,7 @@ function rf(t, e, n) {
|
|
|
4420
4420
|
const a = t.x.scale * e.x, l = t.y.scale * e.y;
|
|
4421
4421
|
return (a !== 1 || l !== 1) && (s += `scale(${a}, ${l})`), s || "none";
|
|
4422
4422
|
}
|
|
4423
|
-
const
|
|
4423
|
+
const Vt = {
|
|
4424
4424
|
type: "projectionFrame",
|
|
4425
4425
|
totalNodes: 0,
|
|
4426
4426
|
resolvedTargetDeltas: 0,
|
|
@@ -4437,10 +4437,10 @@ function jo(t) {
|
|
|
4437
4437
|
const { visualElement: e } = t.options;
|
|
4438
4438
|
if (!e)
|
|
4439
4439
|
return;
|
|
4440
|
-
const n =
|
|
4440
|
+
const n = Fr(e);
|
|
4441
4441
|
if (window.MotionHasOptimisedAnimation(n, "transform")) {
|
|
4442
4442
|
const { layout: i, layoutId: o } = t.options;
|
|
4443
|
-
window.MotionCancelOptimisedAnimation(n, "transform",
|
|
4443
|
+
window.MotionCancelOptimisedAnimation(n, "transform", F, !(i || o));
|
|
4444
4444
|
}
|
|
4445
4445
|
const { parent: s } = t;
|
|
4446
4446
|
s && !s.hasCheckedOptimisedAppear && jo(s);
|
|
@@ -4451,7 +4451,7 @@ function Lo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4451
4451
|
this.id = af++, this.animationId = 0, this.children = /* @__PURE__ */ new Set(), this.options = {}, this.isTreeAnimating = !1, this.isAnimationBlocked = !1, this.isLayoutDirty = !1, this.isProjectionDirty = !1, this.isSharedProjectionDirty = !1, this.isTransformDirty = !1, this.updateManuallyBlocked = !1, this.updateBlockedByResize = !1, this.isUpdating = !1, this.isSVG = !1, this.needsReset = !1, this.shouldResetTransform = !1, this.hasCheckedOptimisedAppear = !1, this.treeScale = { x: 1, y: 1 }, this.eventHandlers = /* @__PURE__ */ new Map(), this.hasTreeAnimated = !1, this.updateScheduled = !1, this.scheduleUpdate = () => this.update(), this.projectionUpdateScheduled = !1, this.checkUpdateFailed = () => {
|
|
4452
4452
|
this.isUpdating && (this.isUpdating = !1, this.clearAllSnapshots());
|
|
4453
4453
|
}, this.updateProjection = () => {
|
|
4454
|
-
this.projectionUpdateScheduled = !1, ie && (
|
|
4454
|
+
this.projectionUpdateScheduled = !1, ie && (Vt.totalNodes = Vt.resolvedTargetDeltas = Vt.recalculatedProjection = 0), this.nodes.forEach(uf), this.nodes.forEach(mf), this.nodes.forEach(gf), this.nodes.forEach(ff), ie && window.MotionDebug.record(Vt);
|
|
4455
4455
|
}, this.resolvedRelativeTargetAt = 0, this.hasProjected = !1, this.isVisible = !0, this.animationProgress = 0, this.sharedNodes = /* @__PURE__ */ new Map(), this.latestValues = r, this.root = a ? a.root || a : this, this.path = a ? [...a.path, a] : [], this.parent = a, this.depth = a ? a.depth + 1 : 0;
|
|
4456
4456
|
for (let l = 0; l < this.path.length; l++)
|
|
4457
4457
|
this.path[l].shouldResetTransform = !0;
|
|
@@ -4561,10 +4561,10 @@ function Lo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4561
4561
|
this.nodes.forEach(df), this.sharedNodes.forEach(vf);
|
|
4562
4562
|
}
|
|
4563
4563
|
scheduleUpdateProjection() {
|
|
4564
|
-
this.projectionUpdateScheduled || (this.projectionUpdateScheduled = !0,
|
|
4564
|
+
this.projectionUpdateScheduled || (this.projectionUpdateScheduled = !0, F.preRender(this.updateProjection, !1, !0));
|
|
4565
4565
|
}
|
|
4566
4566
|
scheduleCheckAfterUnmount() {
|
|
4567
|
-
|
|
4567
|
+
F.postRender(() => {
|
|
4568
4568
|
this.isLayoutDirty ? this.root.didUpdate() : this.root.checkUpdateFailed();
|
|
4569
4569
|
});
|
|
4570
4570
|
}
|
|
@@ -4602,7 +4602,7 @@ function Lo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4602
4602
|
if (!i)
|
|
4603
4603
|
return;
|
|
4604
4604
|
const r = this.isLayoutDirty || this.shouldResetTransform || this.options.alwaysMeasureLayout, a = this.projectionDelta && !Eo(this.projectionDelta), l = this.getTransformTemplate(), c = l ? l(this.latestValues, "") : void 0, u = c !== this.prevTransformTemplateValue;
|
|
4605
|
-
r && (a ||
|
|
4605
|
+
r && (a || kt(this.latestValues) || u) && (i(this.instance, c), this.shouldResetTransform = !1, this.scheduleRender());
|
|
4606
4606
|
}
|
|
4607
4607
|
measure(r = !0) {
|
|
4608
4608
|
const a = this.measurePageBox();
|
|
@@ -4646,22 +4646,22 @@ function Lo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4646
4646
|
!a && u.options.layoutScroll && u.scroll && u !== u.root && Ut(l, {
|
|
4647
4647
|
x: -u.scroll.offset.x,
|
|
4648
4648
|
y: -u.scroll.offset.y
|
|
4649
|
-
}),
|
|
4649
|
+
}), kt(u.latestValues) && Ut(l, u.latestValues);
|
|
4650
4650
|
}
|
|
4651
|
-
return
|
|
4651
|
+
return kt(this.latestValues) && Ut(l, this.latestValues), l;
|
|
4652
4652
|
}
|
|
4653
4653
|
removeTransform(r) {
|
|
4654
4654
|
const a = z();
|
|
4655
4655
|
lt(a, r);
|
|
4656
4656
|
for (let l = 0; l < this.path.length; l++) {
|
|
4657
4657
|
const c = this.path[l];
|
|
4658
|
-
if (!c.instance || !
|
|
4658
|
+
if (!c.instance || !kt(c.latestValues))
|
|
4659
4659
|
continue;
|
|
4660
4660
|
Dn(c.latestValues) && c.updateSnapshot();
|
|
4661
4661
|
const u = z(), f = c.measurePageBox();
|
|
4662
4662
|
lt(u, f), Ii(a, c.latestValues, c.snapshot ? c.snapshot.layoutBox : void 0, u);
|
|
4663
4663
|
}
|
|
4664
|
-
return
|
|
4664
|
+
return kt(this.latestValues) && Ii(a, this.latestValues), a;
|
|
4665
4665
|
}
|
|
4666
4666
|
setTargetDelta(r) {
|
|
4667
4667
|
this.targetDelta = r, this.root.scheduleUpdateProjection(), this.isProjectionDirty = !0;
|
|
@@ -4698,7 +4698,7 @@ function Lo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4698
4698
|
const p = this.getClosestProjectingParent();
|
|
4699
4699
|
p && !!p.resumingFrom == !!this.resumingFrom && !p.options.layoutScroll && p.target && this.animationProgress !== 1 ? (this.relativeParent = p, this.forceRelativeParentToResolveTarget(), this.relativeTarget = z(), this.relativeTargetOrigin = z(), ce(this.relativeTargetOrigin, this.target, p.target), lt(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
|
|
4700
4700
|
}
|
|
4701
|
-
ie &&
|
|
4701
|
+
ie && Vt.resolvedTargetDeltas++;
|
|
4702
4702
|
}
|
|
4703
4703
|
}
|
|
4704
4704
|
}
|
|
@@ -4726,7 +4726,7 @@ function Lo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4726
4726
|
this.prevProjectionDelta && (this.createProjectionDeltas(), this.scheduleRender());
|
|
4727
4727
|
return;
|
|
4728
4728
|
}
|
|
4729
|
-
!this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (
|
|
4729
|
+
!this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (Oi(this.prevProjectionDelta.x, this.projectionDelta.x), Oi(this.prevProjectionDelta.y, this.projectionDelta.y)), le(this.projectionDelta, this.layoutCorrected, g, this.latestValues), (this.treeScale.x !== h || this.treeScale.y !== p || !Yi(this.projectionDelta.x, this.prevProjectionDelta.x) || !Yi(this.projectionDelta.y, this.prevProjectionDelta.y)) && (this.hasProjected = !0, this.scheduleRender(), this.notifyListeners("projectionUpdate", g)), ie && Vt.recalculatedProjection++;
|
|
4730
4730
|
}
|
|
4731
4731
|
hide() {
|
|
4732
4732
|
this.isVisible = !1;
|
|
@@ -4757,7 +4757,7 @@ function Lo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4757
4757
|
}, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
|
|
4758
4758
|
}
|
|
4759
4759
|
startAnimation(r) {
|
|
4760
|
-
this.notifyListeners("animationStart"), this.currentAnimation && this.currentAnimation.stop(), this.resumingFrom && this.resumingFrom.currentAnimation && this.resumingFrom.currentAnimation.stop(), this.pendingAnimation && (Tt(this.pendingAnimation), this.pendingAnimation = void 0), this.pendingAnimation =
|
|
4760
|
+
this.notifyListeners("animationStart"), this.currentAnimation && this.currentAnimation.stop(), this.resumingFrom && this.resumingFrom.currentAnimation && this.resumingFrom.currentAnimation.stop(), this.pendingAnimation && (Tt(this.pendingAnimation), this.pendingAnimation = void 0), this.pendingAnimation = F.update(() => {
|
|
4761
4761
|
De.hasAnimatedSinceResize = !0, this.currentAnimation = Xu(0, Ki, {
|
|
4762
4762
|
...r,
|
|
4763
4763
|
onUpdate: (a) => {
|
|
@@ -4853,11 +4853,11 @@ function Lo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4853
4853
|
visibility: ""
|
|
4854
4854
|
}, u = this.getTransformTemplate();
|
|
4855
4855
|
if (this.needsReset)
|
|
4856
|
-
return this.needsReset = !1, c.opacity = "", c.pointerEvents =
|
|
4856
|
+
return this.needsReset = !1, c.opacity = "", c.pointerEvents = Ve(r == null ? void 0 : r.pointerEvents) || "", c.transform = u ? u(this.latestValues, "") : "none", c;
|
|
4857
4857
|
const f = this.getLead();
|
|
4858
4858
|
if (!this.projectionDelta || !this.layout || !f.target) {
|
|
4859
4859
|
const v = {};
|
|
4860
|
-
return this.options.layoutId && (v.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, v.pointerEvents =
|
|
4860
|
+
return this.options.layoutId && (v.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, v.pointerEvents = Ve(r == null ? void 0 : r.pointerEvents) || ""), this.hasProjected && !kt(this.latestValues) && (v.transform = u ? u({}, "") : "none", this.hasProjected = !1), v;
|
|
4861
4861
|
}
|
|
4862
4862
|
const h = f.animationValues || f.latestValues;
|
|
4863
4863
|
this.applyTransformsToTarget(), c.transform = rf(this.projectionDeltaWithTransform, this.treeScale, h), u && (c.transform = u(h, c.transform));
|
|
@@ -4874,7 +4874,7 @@ function Lo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4874
4874
|
} else
|
|
4875
4875
|
c[v] = P;
|
|
4876
4876
|
}
|
|
4877
|
-
return this.options.layoutId && (c.pointerEvents = f === this ?
|
|
4877
|
+
return this.options.layoutId && (c.pointerEvents = f === this ? Ve(r == null ? void 0 : r.pointerEvents) || "" : "none"), c;
|
|
4878
4878
|
}
|
|
4879
4879
|
clearSnapshot() {
|
|
4880
4880
|
this.resumeFrom = this.snapshot = void 0;
|
|
@@ -4936,7 +4936,7 @@ function cf(t) {
|
|
|
4936
4936
|
t.options.transition = void 0;
|
|
4937
4937
|
}
|
|
4938
4938
|
function uf(t) {
|
|
4939
|
-
ie &&
|
|
4939
|
+
ie && Vt.totalNodes++, t.parent && (t.isProjecting() || (t.isProjectionDirty = t.parent.isProjectionDirty), t.isSharedProjectionDirty || (t.isSharedProjectionDirty = !!(t.isProjectionDirty || t.parent.isProjectionDirty || t.parent.isSharedProjectionDirty)), t.isTransformDirty || (t.isTransformDirty = t.parent.isTransformDirty));
|
|
4940
4940
|
}
|
|
4941
4941
|
function ff(t) {
|
|
4942
4942
|
t.isProjectionDirty = t.isSharedProjectionDirty = t.isTransformDirty = !1;
|
|
@@ -5007,7 +5007,7 @@ const Sf = Lo({
|
|
|
5007
5007
|
checkIsScrollRoot: () => !0
|
|
5008
5008
|
}), gn = {
|
|
5009
5009
|
current: void 0
|
|
5010
|
-
},
|
|
5010
|
+
}, No = Lo({
|
|
5011
5011
|
measureScroll: (t) => ({
|
|
5012
5012
|
x: t.scrollLeft,
|
|
5013
5013
|
y: t.scrollTop
|
|
@@ -5029,7 +5029,7 @@ const Sf = Lo({
|
|
|
5029
5029
|
},
|
|
5030
5030
|
drag: {
|
|
5031
5031
|
Feature: Bu,
|
|
5032
|
-
ProjectionNode:
|
|
5032
|
+
ProjectionNode: No,
|
|
5033
5033
|
MeasureLayout: Co
|
|
5034
5034
|
}
|
|
5035
5035
|
};
|
|
@@ -5037,7 +5037,7 @@ function tr(t, e, n) {
|
|
|
5037
5037
|
const { props: s } = t;
|
|
5038
5038
|
t.animationState && s.whileHover && t.animationState.setActive("whileHover", n === "Start");
|
|
5039
5039
|
const i = "onHover" + n, o = s[i];
|
|
5040
|
-
o &&
|
|
5040
|
+
o && F.postRender(() => o(e, be(e)));
|
|
5041
5041
|
}
|
|
5042
5042
|
class Mf extends Mt {
|
|
5043
5043
|
mount() {
|
|
@@ -5073,27 +5073,27 @@ function er(t, e, n) {
|
|
|
5073
5073
|
const { props: s } = t;
|
|
5074
5074
|
t.animationState && s.whileTap && t.animationState.setActive("whileTap", n === "Start");
|
|
5075
5075
|
const i = "onTap" + (n === "End" ? "" : n), o = s[i];
|
|
5076
|
-
o &&
|
|
5076
|
+
o && F.postRender(() => o(e, be(e)));
|
|
5077
5077
|
}
|
|
5078
5078
|
class Cf extends Mt {
|
|
5079
5079
|
mount() {
|
|
5080
5080
|
const { current: e } = this.node;
|
|
5081
|
-
e && (this.unmount =
|
|
5081
|
+
e && (this.unmount = Vl(e, (n) => (er(this.node, n, "Start"), (s, { success: i }) => er(this.node, s, i ? "End" : "Cancel")), { useGlobalTarget: this.node.props.globalTapTarget }));
|
|
5082
5082
|
}
|
|
5083
5083
|
unmount() {
|
|
5084
5084
|
}
|
|
5085
5085
|
}
|
|
5086
|
-
const Ln = /* @__PURE__ */ new WeakMap(), yn = /* @__PURE__ */ new WeakMap(),
|
|
5086
|
+
const Ln = /* @__PURE__ */ new WeakMap(), yn = /* @__PURE__ */ new WeakMap(), kf = (t) => {
|
|
5087
5087
|
const e = Ln.get(t.target);
|
|
5088
5088
|
e && e(t);
|
|
5089
|
-
},
|
|
5090
|
-
t.forEach(
|
|
5089
|
+
}, Vf = (t) => {
|
|
5090
|
+
t.forEach(kf);
|
|
5091
5091
|
};
|
|
5092
5092
|
function Ef({ root: t, ...e }) {
|
|
5093
5093
|
const n = t || document;
|
|
5094
5094
|
yn.has(n) || yn.set(n, {});
|
|
5095
5095
|
const s = yn.get(n), i = JSON.stringify(e);
|
|
5096
|
-
return s[i] || (s[i] = new IntersectionObserver(
|
|
5096
|
+
return s[i] || (s[i] = new IntersectionObserver(Vf, { root: t, ...e })), s[i];
|
|
5097
5097
|
}
|
|
5098
5098
|
function Df(t, e, n) {
|
|
5099
5099
|
const s = Ef(e);
|
|
@@ -5140,7 +5140,7 @@ class Lf extends Mt {
|
|
|
5140
5140
|
function $f({ viewport: t = {} }, { viewport: e = {} } = {}) {
|
|
5141
5141
|
return (n) => t[n] !== e[n];
|
|
5142
5142
|
}
|
|
5143
|
-
const
|
|
5143
|
+
const Nf = {
|
|
5144
5144
|
inView: {
|
|
5145
5145
|
Feature: Lf
|
|
5146
5146
|
},
|
|
@@ -5153,14 +5153,14 @@ const Of = {
|
|
|
5153
5153
|
hover: {
|
|
5154
5154
|
Feature: Mf
|
|
5155
5155
|
}
|
|
5156
|
-
},
|
|
5156
|
+
}, Of = {
|
|
5157
5157
|
layout: {
|
|
5158
|
-
ProjectionNode:
|
|
5158
|
+
ProjectionNode: No,
|
|
5159
5159
|
MeasureLayout: Co
|
|
5160
5160
|
}
|
|
5161
|
-
}, $n = { current: null },
|
|
5162
|
-
function
|
|
5163
|
-
if (
|
|
5161
|
+
}, $n = { current: null }, Oo = { current: !1 };
|
|
5162
|
+
function Ff() {
|
|
5163
|
+
if (Oo.current = !0, !!Wn)
|
|
5164
5164
|
if (window.matchMedia) {
|
|
5165
5165
|
const t = window.matchMedia("(prefers-reduced-motion)"), e = () => $n.current = t.matches;
|
|
5166
5166
|
t.addListener(e), e();
|
|
@@ -5213,7 +5213,7 @@ class Uf {
|
|
|
5213
5213
|
this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
|
|
5214
5214
|
}, this.renderScheduledAt = 0, this.scheduleRender = () => {
|
|
5215
5215
|
const p = mt.now();
|
|
5216
|
-
this.renderScheduledAt < p && (this.renderScheduledAt = p,
|
|
5216
|
+
this.renderScheduledAt < p && (this.renderScheduledAt = p, F.render(this.render, !1, !0));
|
|
5217
5217
|
};
|
|
5218
5218
|
const { latestValues: l, renderState: c, onUpdate: u } = r;
|
|
5219
5219
|
this.onUpdate = u, 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 = !!o, this.isControllingVariants = Ye(n), this.isVariantNode = hr(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(e && e.current);
|
|
@@ -5224,7 +5224,7 @@ class Uf {
|
|
|
5224
5224
|
}
|
|
5225
5225
|
}
|
|
5226
5226
|
mount(e) {
|
|
5227
|
-
this.current = e, nr.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)),
|
|
5227
|
+
this.current = e, nr.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)), Oo.current || Ff(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : $n.current, process.env.NODE_ENV !== "production" && Ue(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);
|
|
5228
5228
|
}
|
|
5229
5229
|
unmount() {
|
|
5230
5230
|
nr.delete(this.current), this.projection && this.projection.unmount(), Tt(this.notifyUpdate), Tt(this.render), this.valueSubscriptions.forEach((e) => e()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent && this.parent.children.delete(this);
|
|
@@ -5239,7 +5239,7 @@ class Uf {
|
|
|
5239
5239
|
bindToMotionValue(e, n) {
|
|
5240
5240
|
this.valueSubscriptions.has(e) && this.valueSubscriptions.get(e)();
|
|
5241
5241
|
const s = jt.has(e), i = n.on("change", (a) => {
|
|
5242
|
-
this.latestValues[e] = a, this.props.onUpdate &&
|
|
5242
|
+
this.latestValues[e] = a, this.props.onUpdate && F.preRender(this.notifyUpdate), s && this.projection && (this.projection.isTransformDirty = !0);
|
|
5243
5243
|
}), o = n.on("renderRequest", this.scheduleRender);
|
|
5244
5244
|
let r;
|
|
5245
5245
|
window.MotionCheckAppearSync && (r = window.MotionCheckAppearSync(this, e, n)), this.valueSubscriptions.set(e, () => {
|
|
@@ -5390,7 +5390,7 @@ class Uf {
|
|
|
5390
5390
|
this.events[e] && this.events[e].notify(...n);
|
|
5391
5391
|
}
|
|
5392
5392
|
}
|
|
5393
|
-
class
|
|
5393
|
+
class Fo extends Uf {
|
|
5394
5394
|
constructor() {
|
|
5395
5395
|
super(...arguments), this.KeyframeResolver = oo;
|
|
5396
5396
|
}
|
|
@@ -5414,7 +5414,7 @@ class No extends Uf {
|
|
|
5414
5414
|
function Wf(t) {
|
|
5415
5415
|
return window.getComputedStyle(t);
|
|
5416
5416
|
}
|
|
5417
|
-
class Xf extends
|
|
5417
|
+
class Xf extends Fo {
|
|
5418
5418
|
constructor() {
|
|
5419
5419
|
super(...arguments), this.type = "html", this.renderInstance = wr;
|
|
5420
5420
|
}
|
|
@@ -5437,7 +5437,7 @@ class Xf extends No {
|
|
|
5437
5437
|
return ss(e, n, s);
|
|
5438
5438
|
}
|
|
5439
5439
|
}
|
|
5440
|
-
class Yf extends
|
|
5440
|
+
class Yf extends Fo {
|
|
5441
5441
|
constructor() {
|
|
5442
5442
|
super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = z;
|
|
5443
5443
|
}
|
|
@@ -5468,9 +5468,9 @@ const Kf = (t, e) => Zn(t) ? new Yf(e) : new Xf(e, {
|
|
|
5468
5468
|
allowProjection: t !== lr
|
|
5469
5469
|
}), zf = /* @__PURE__ */ xl({
|
|
5470
5470
|
...mu,
|
|
5471
|
-
...
|
|
5471
|
+
...Nf,
|
|
5472
5472
|
...Rf,
|
|
5473
|
-
...
|
|
5473
|
+
...Of
|
|
5474
5474
|
}, Kf), et = /* @__PURE__ */ La(zf);
|
|
5475
5475
|
function Gf(t, e, n) {
|
|
5476
5476
|
Ie(() => t.on(e, n), [t, e, n]);
|
|
@@ -5486,7 +5486,7 @@ function ut(t) {
|
|
|
5486
5486
|
function Bo(t, e) {
|
|
5487
5487
|
const n = ut(e()), s = () => n.set(e());
|
|
5488
5488
|
return s(), ge(() => {
|
|
5489
|
-
const i = () =>
|
|
5489
|
+
const i = () => F.preRender(s, !1, !0), o = t.map((r) => r.on("change", i));
|
|
5490
5490
|
return () => {
|
|
5491
5491
|
o.forEach((r) => r()), Tt(s);
|
|
5492
5492
|
};
|
|
@@ -5511,7 +5511,7 @@ function xt(t, e = {}) {
|
|
|
5511
5511
|
}, l = () => {
|
|
5512
5512
|
s.current && s.current.stop();
|
|
5513
5513
|
};
|
|
5514
|
-
return Ie(() => i.attach((c, u) => n ? u(c) : (o.current = c, r.current = u,
|
|
5514
|
+
return Ie(() => i.attach((c, u) => n ? u(c) : (o.current = c, r.current = u, F.update(a), i.get()), l), [JSON.stringify(e)]), ge(() => {
|
|
5515
5515
|
if (J(t))
|
|
5516
5516
|
return t.on("change", (c) => i.set(ir(c)));
|
|
5517
5517
|
}, [i]), i;
|
|
@@ -5548,28 +5548,28 @@ function rr(t, e) {
|
|
|
5548
5548
|
function Jf(t) {
|
|
5549
5549
|
const e = ut(t.getVelocity()), n = () => {
|
|
5550
5550
|
const s = t.getVelocity();
|
|
5551
|
-
e.set(s), s &&
|
|
5551
|
+
e.set(s), s && F.update(n);
|
|
5552
5552
|
};
|
|
5553
5553
|
return Gf(t, "change", () => {
|
|
5554
|
-
|
|
5554
|
+
F.update(n, !1, !0);
|
|
5555
5555
|
}), e;
|
|
5556
5556
|
}
|
|
5557
5557
|
function td(t) {
|
|
5558
5558
|
t.values.forEach((e) => e.stop());
|
|
5559
5559
|
}
|
|
5560
|
-
function
|
|
5560
|
+
function Nn(t, e) {
|
|
5561
5561
|
[...e].reverse().forEach((s) => {
|
|
5562
5562
|
const i = t.getVariant(s);
|
|
5563
5563
|
i && fs(t, i), t.variantChildren && t.variantChildren.forEach((o) => {
|
|
5564
|
-
|
|
5564
|
+
Nn(o, e);
|
|
5565
5565
|
});
|
|
5566
5566
|
});
|
|
5567
5567
|
}
|
|
5568
5568
|
function ed(t, e) {
|
|
5569
5569
|
if (Array.isArray(e))
|
|
5570
|
-
return
|
|
5570
|
+
return Nn(t, e);
|
|
5571
5571
|
if (typeof e == "string")
|
|
5572
|
-
return
|
|
5572
|
+
return Nn(t, [e]);
|
|
5573
5573
|
fs(t, e);
|
|
5574
5574
|
}
|
|
5575
5575
|
function nd() {
|
|
@@ -5651,10 +5651,9 @@ const id = sd, Ze = (t) => {
|
|
|
5651
5651
|
"path",
|
|
5652
5652
|
{
|
|
5653
5653
|
d: f,
|
|
5654
|
-
|
|
5654
|
+
className: "fill-white dark:fill-slate-800 transition-colors duration-300",
|
|
5655
5655
|
stroke: e,
|
|
5656
|
-
strokeWidth: t.strokeWidth
|
|
5657
|
-
className: "transition-colors duration-300"
|
|
5656
|
+
strokeWidth: t.strokeWidth
|
|
5658
5657
|
}
|
|
5659
5658
|
) }),
|
|
5660
5659
|
/* @__PURE__ */ m.jsx("div", { className: "relative z-10 flex items-center h-full px-5 gap-4", children: n })
|
|
@@ -5675,10 +5674,9 @@ const id = sd, Ze = (t) => {
|
|
|
5675
5674
|
"path",
|
|
5676
5675
|
{
|
|
5677
5676
|
d: g,
|
|
5678
|
-
|
|
5677
|
+
className: `transition-all duration-300 ${e ? "fill-indigo-500 dark:fill-indigo-600" : "fill-slate-100 dark:fill-slate-700"}`,
|
|
5679
5678
|
stroke: e ? "#4f46e5" : "#e2e8f0",
|
|
5680
|
-
strokeWidth: 1.5
|
|
5681
|
-
className: "transition-all duration-300"
|
|
5679
|
+
strokeWidth: 1.5
|
|
5682
5680
|
}
|
|
5683
5681
|
) }),
|
|
5684
5682
|
/* @__PURE__ */ m.jsx(
|
|
@@ -5695,7 +5693,7 @@ const id = sd, Ze = (t) => {
|
|
|
5695
5693
|
damping: i.damping,
|
|
5696
5694
|
mass: i.mass
|
|
5697
5695
|
},
|
|
5698
|
-
children: /* @__PURE__ */ m.jsx("svg", { viewBox: "0 0 20 20", className: "overflow-visible drop-shadow-sm", children: /* @__PURE__ */ m.jsx("path", { d: S,
|
|
5696
|
+
children: /* @__PURE__ */ m.jsx("svg", { viewBox: "0 0 20 20", className: "overflow-visible drop-shadow-sm", children: /* @__PURE__ */ m.jsx("path", { d: S, className: "fill-white dark:fill-slate-200", stroke: e ? "#4f46e5" : "#94a3b8", strokeWidth: 1 }) })
|
|
5699
5697
|
}
|
|
5700
5698
|
)
|
|
5701
5699
|
] })
|
|
@@ -5804,7 +5802,7 @@ const Uo = Te("Info", [
|
|
|
5804
5802
|
* This source code is licensed under the ISC license.
|
|
5805
5803
|
* See the LICENSE file in the root directory of this source tree.
|
|
5806
5804
|
*/
|
|
5807
|
-
const
|
|
5805
|
+
const On = Te("X", [
|
|
5808
5806
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
5809
5807
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
5810
5808
|
]), hd = ({ isOpen: t, title: e, message: n, onConfirm: s, onCancel: i }) => {
|
|
@@ -5856,7 +5854,7 @@ const Fn = Te("X", [
|
|
|
5856
5854
|
info: { color: "#3b82f6", icon: Uo, label: "Info Sistem" },
|
|
5857
5855
|
warning: { color: "#f59e0b", icon: Io, label: "Peringatan" },
|
|
5858
5856
|
success: { color: "#10b981", icon: _o, label: "Berhasil" },
|
|
5859
|
-
error: { color: "#ef4444", icon:
|
|
5857
|
+
error: { color: "#ef4444", icon: On, label: "Kesalahan" }
|
|
5860
5858
|
}, c = l[t] || l.info;
|
|
5861
5859
|
return /* @__PURE__ */ m.jsx(
|
|
5862
5860
|
et.div,
|
|
@@ -5881,7 +5879,7 @@ const Fn = Te("X", [
|
|
|
5881
5879
|
info: { color: "#3b82f6", icon: Uo, label: "Info" },
|
|
5882
5880
|
warning: { color: "#f59e0b", icon: Io, label: "Warning" },
|
|
5883
5881
|
success: { color: "#10b981", icon: _o, label: "Success" },
|
|
5884
|
-
error: { color: "#ef4444", icon:
|
|
5882
|
+
error: { color: "#ef4444", icon: On, label: "Error" }
|
|
5885
5883
|
}, p = h[i] || h.info;
|
|
5886
5884
|
return /* @__PURE__ */ m.jsx(
|
|
5887
5885
|
et.div,
|
|
@@ -5908,16 +5906,16 @@ const Fn = Te("X", [
|
|
|
5908
5906
|
/* @__PURE__ */ m.jsx("h4", { className: "text-[10px] uppercase tracking-wider font-bold opacity-40 mb-0.5", children: p.label }),
|
|
5909
5907
|
/* @__PURE__ */ m.jsx("p", { className: "text-sm font-medium text-slate-800 truncate leading-snug", children: o })
|
|
5910
5908
|
] }),
|
|
5911
|
-
/* @__PURE__ */ m.jsx("button", { onClick: () => e(s), className: "flex-shrink-0 p-1.5 rounded-md hover:bg-slate-100 opacity-0 group-hover:opacity-100 transition-opacity duration-200", children: /* @__PURE__ */ m.jsx(
|
|
5909
|
+
/* @__PURE__ */ m.jsx("button", { onClick: () => e(s), className: "flex-shrink-0 p-1.5 rounded-md hover:bg-slate-100 opacity-0 group-hover:opacity-100 transition-opacity duration-200", children: /* @__PURE__ */ m.jsx(On, { size: 16, className: "text-slate-400" }) })
|
|
5912
5910
|
] })
|
|
5913
5911
|
}
|
|
5914
5912
|
);
|
|
5915
5913
|
});
|
|
5916
5914
|
ld.displayName = "TactileToast";
|
|
5917
5915
|
const md = ({ title: t, description: e, seed: n }) => {
|
|
5918
|
-
const s = I(() => n || Math.random() * 1e3, [n]), i = 340, o = 220, r = (
|
|
5919
|
-
const
|
|
5920
|
-
return
|
|
5916
|
+
const s = I(() => n || Math.random() * 1e3, [n]), i = 340, o = 220, r = (k) => {
|
|
5917
|
+
const O = Math.sin(s + k) * 1e4;
|
|
5918
|
+
return O - Math.floor(O);
|
|
5921
5919
|
}, a = I(() => ({
|
|
5922
5920
|
r: {
|
|
5923
5921
|
tl: 12 + r(1) * 16,
|
|
@@ -5931,13 +5929,13 @@ const md = ({ title: t, description: e, seed: n }) => {
|
|
|
5931
5929
|
// Adjust stiffness/damping values to fit framer-motion spring behavior
|
|
5932
5930
|
stiffness: 120 + r(8) * 60,
|
|
5933
5931
|
damping: 15 + r(9) * 10
|
|
5934
|
-
}), [s]), l = `M ${a.r.tl},0 L ${i - a.r.tr},0 Q ${i},0 ${i},${a.r.tr} L ${i},${o - a.r.br} Q ${i},${o} ${i - a.r.br},${o} L ${a.r.bl},${o} Q 0,${o} 0,${o - a.r.bl} L 0,${a.r.tl} Q 0,0 ${a.r.tl},0 Z`, c = ut(0), u = ut(0), f = ut(0), h = { stiffness: a.stiffness, damping: a.damping, mass: a.mass }, p = xt(c, h), g = xt(u, h), v = xt(f, h), x = B(null), y = (
|
|
5932
|
+
}), [s]), l = `M ${a.r.tl},0 L ${i - a.r.tr},0 Q ${i},0 ${i},${a.r.tr} L ${i},${o - a.r.br} Q ${i},${o} ${i - a.r.br},${o} L ${a.r.bl},${o} Q 0,${o} 0,${o - a.r.bl} L 0,${a.r.tl} Q 0,0 ${a.r.tl},0 Z`, c = ut(0), u = ut(0), f = ut(0), h = { stiffness: a.stiffness, damping: a.damping, mass: a.mass }, p = xt(c, h), g = xt(u, h), v = xt(f, h), x = B(null), y = (k) => {
|
|
5935
5933
|
if (!x.current) return;
|
|
5936
|
-
const
|
|
5934
|
+
const O = x.current.getBoundingClientRect(), Z = k.clientX - O.left, L = k.clientY - O.top, U = (Z / i - 0.5) * 16, Y = (L / o - 0.5) * -16;
|
|
5937
5935
|
u.set(U), c.set(Y), f.set(15);
|
|
5938
5936
|
}, P = () => {
|
|
5939
5937
|
c.set(0), u.set(0), f.set(0);
|
|
5940
|
-
}, S = () => f.set(-5), C = () => f.set(15), w = yt(g, (
|
|
5938
|
+
}, S = () => f.set(-5), C = () => f.set(15), w = yt(g, (k) => a.shadowX + k * 0.5), A = yt(p, (k) => 6 + k * -0.5), b = yt(v, (k) => 1 + k * 2e-3), R = yt(v, (k) => 0.06 + k * 4e-3), D = Math.floor(s).toString(16).toUpperCase();
|
|
5941
5939
|
return /* @__PURE__ */ m.jsxs(
|
|
5942
5940
|
"div",
|
|
5943
5941
|
{
|
|
@@ -5974,7 +5972,7 @@ const md = ({ title: t, description: e, seed: n }) => {
|
|
|
5974
5972
|
transformStyle: "preserve-3d"
|
|
5975
5973
|
},
|
|
5976
5974
|
children: [
|
|
5977
|
-
/* @__PURE__ */ m.jsx("svg", { viewBox: `0 0 ${i} ${o}`, className: "w-full h-full block", children: /* @__PURE__ */ m.jsx("path", { d: l,
|
|
5975
|
+
/* @__PURE__ */ m.jsx("svg", { viewBox: `0 0 ${i} ${o}`, className: "w-full h-full block", children: /* @__PURE__ */ m.jsx("path", { d: l, className: "fill-white dark:fill-slate-800 transition-colors group-hover:fill-slate-50/80 dark:group-hover:fill-slate-700/80", stroke: "#e2e8f0", strokeWidth: a.stroke }) }),
|
|
5978
5976
|
/* @__PURE__ */ m.jsxs("div", { className: "absolute inset-0 p-8 flex flex-col pointer-events-none", children: [
|
|
5979
5977
|
/* @__PURE__ */ m.jsxs("div", { className: "flex items-center gap-3 mb-4", children: [
|
|
5980
5978
|
/* @__PURE__ */ m.jsx("div", { className: "w-2.5 h-2.5 rounded-full bg-slate-200 group-hover:bg-indigo-400 transition-colors" }),
|
|
@@ -5983,14 +5981,14 @@ const md = ({ title: t, description: e, seed: n }) => {
|
|
|
5983
5981
|
Math.floor(s)
|
|
5984
5982
|
] })
|
|
5985
5983
|
] }),
|
|
5986
|
-
/* @__PURE__ */ m.jsx("h3", { className: "text-[13px] font-bold text-slate-800 leading-tight mb-2", children: t }),
|
|
5987
|
-
/* @__PURE__ */ m.jsx("p", { className: "text-[11px] text-slate-500 leading-relaxed font-medium", children: e }),
|
|
5988
|
-
/* @__PURE__ */ m.jsxs("div", { className: "mt-auto pt-4 border-t border-slate-100 flex justify-between items-center opacity-30 group-hover:opacity-60 transition-opacity", children: [
|
|
5989
|
-
/* @__PURE__ */ m.jsxs("span", { className: "text-[9px] font-mono", children: [
|
|
5984
|
+
/* @__PURE__ */ m.jsx("h3", { className: "text-[13px] font-bold text-slate-800 dark:text-slate-100 leading-tight mb-2", children: t }),
|
|
5985
|
+
/* @__PURE__ */ m.jsx("p", { className: "text-[11px] text-slate-500 dark:text-slate-400 leading-relaxed font-medium", children: e }),
|
|
5986
|
+
/* @__PURE__ */ m.jsxs("div", { className: "mt-auto pt-4 border-t border-slate-100 dark:border-slate-700/50 flex justify-between items-center opacity-30 group-hover:opacity-60 transition-opacity", children: [
|
|
5987
|
+
/* @__PURE__ */ m.jsxs("span", { className: "text-[9px] font-mono text-slate-800 dark:text-slate-300", children: [
|
|
5990
5988
|
"ID: 0x",
|
|
5991
5989
|
D
|
|
5992
5990
|
] }),
|
|
5993
|
-
/* @__PURE__ */ m.jsxs("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
5991
|
+
/* @__PURE__ */ m.jsxs("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", className: "text-slate-800 dark:text-slate-300", strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
5994
5992
|
/* @__PURE__ */ m.jsx("line", { x1: "5", y1: "12", x2: "19", y2: "12" }),
|
|
5995
5993
|
/* @__PURE__ */ m.jsx("polyline", { points: "12 5 19 12 12 19" })
|
|
5996
5994
|
] })
|
|
@@ -6003,9 +6001,9 @@ const md = ({ title: t, description: e, seed: n }) => {
|
|
|
6003
6001
|
}
|
|
6004
6002
|
);
|
|
6005
6003
|
}, gd = ({ label: t, color: e = "#64748b", onClick: n, className: s = "" }) => {
|
|
6006
|
-
const i = I(() => Math.random() * 1e3, []), o = 140, r = 54, a = (
|
|
6007
|
-
const
|
|
6008
|
-
return
|
|
6004
|
+
const i = I(() => Math.random() * 1e3, []), o = 140, r = 54, a = (k) => {
|
|
6005
|
+
const O = Math.sin(i + k) * 1e4;
|
|
6006
|
+
return O - Math.floor(O);
|
|
6009
6007
|
}, l = I(() => ({
|
|
6010
6008
|
r: {
|
|
6011
6009
|
tl: 6 + a(1) * 14,
|
|
@@ -6020,13 +6018,13 @@ const md = ({ title: t, description: e, seed: n }) => {
|
|
|
6020
6018
|
// Adjusted for Framer Motion
|
|
6021
6019
|
damping: 20 + a(9) * 10
|
|
6022
6020
|
// Adjusted for Framer Motion
|
|
6023
|
-
}), [i]), c = `M ${l.r.tl},0 L ${o - l.r.tr},0 Q ${o},0 ${o},${l.r.tr} L ${o},${r - l.r.br} Q ${o},${r} ${o - l.r.br},${r} L ${l.r.bl},${r} Q 0,${r} 0,${r - l.r.bl} L 0,${l.r.tl} Q 0,0 ${l.r.tl},0 Z`, u = ut(0), f = ut(0), h = ut(1), p = { stiffness: l.stiffness, damping: l.damping, mass: l.mass }, g = { stiffness: l.stiffness * 2, damping: l.damping, mass: l.mass }, v = xt(u, p), x = xt(f, p), y = xt(h, g), P = B(null), S = (
|
|
6021
|
+
}), [i]), c = `M ${l.r.tl},0 L ${o - l.r.tr},0 Q ${o},0 ${o},${l.r.tr} L ${o},${r - l.r.br} Q ${o},${r} ${o - l.r.br},${r} L ${l.r.bl},${r} Q 0,${r} 0,${r - l.r.bl} L 0,${l.r.tl} Q 0,0 ${l.r.tl},0 Z`, u = ut(0), f = ut(0), h = ut(1), p = { stiffness: l.stiffness, damping: l.damping, mass: l.mass }, g = { stiffness: l.stiffness * 2, damping: l.damping, mass: l.mass }, v = xt(u, p), x = xt(f, p), y = xt(h, g), P = B(null), S = (k) => {
|
|
6024
6022
|
if (!P.current) return;
|
|
6025
|
-
const
|
|
6023
|
+
const O = P.current.getBoundingClientRect(), Z = k.clientX - O.left, L = k.clientY - O.top, U = (Z / o - 0.5) * 25, Y = (L / r - 0.5) * -25;
|
|
6026
6024
|
f.set(U), u.set(Y);
|
|
6027
6025
|
}, C = () => {
|
|
6028
6026
|
u.set(0), f.set(0), h.set(1);
|
|
6029
|
-
}, w = () => h.set(0.94), A = () => h.set(1), b = yt(x, (
|
|
6027
|
+
}, w = () => h.set(0.94), A = () => h.set(1), b = yt(x, (k) => k * 0.2), R = yt(v, (k) => l.shadowY + k * -0.2), D = yt(y, (k) => 0.1 - (1 - k));
|
|
6030
6028
|
return /* @__PURE__ */ m.jsxs(
|
|
6031
6029
|
"div",
|
|
6032
6030
|
{
|
|
@@ -6067,10 +6065,9 @@ const md = ({ title: t, description: e, seed: n }) => {
|
|
|
6067
6065
|
"path",
|
|
6068
6066
|
{
|
|
6069
6067
|
d: c,
|
|
6070
|
-
|
|
6068
|
+
className: "fill-white dark:fill-slate-800 transition-colors duration-300 group-hover:fill-slate-50 dark:group-hover:fill-slate-700",
|
|
6071
6069
|
stroke: e,
|
|
6072
|
-
strokeWidth: l.stroke
|
|
6073
|
-
className: "transition-colors duration-300 group-hover:fill-slate-50"
|
|
6070
|
+
strokeWidth: l.stroke
|
|
6074
6071
|
}
|
|
6075
6072
|
) }),
|
|
6076
6073
|
/* @__PURE__ */ m.jsx("div", { className: "absolute inset-0 flex items-center justify-center pointer-events-none", children: /* @__PURE__ */ m.jsx("span", { className: "text-[10px] font-black uppercase tracking-[0.2em]", style: { color: e }, children: t }) })
|
|
@@ -6117,7 +6114,7 @@ const md = ({ title: t, description: e, seed: n }) => {
|
|
|
6117
6114
|
L.target.setPointerCapture(L.pointerId), b(L.clientX);
|
|
6118
6115
|
}, D = (L) => {
|
|
6119
6116
|
L.target.hasPointerCapture(L.pointerId) && b(L.clientX);
|
|
6120
|
-
},
|
|
6117
|
+
}, k = yt(w, (L) => `inset(0 ${a - L}px 0 0)`), O = Jf(w), Z = yt(O, (L) => 1 + Math.abs(L) * 5e-4);
|
|
6121
6118
|
return /* @__PURE__ */ m.jsxs("div", { className: `w-full max-w-[400px] mb-12 relative px-4 ${o}`, children: [
|
|
6122
6119
|
/* @__PURE__ */ m.jsxs("div", { className: "flex justify-between items-center mb-4", children: [
|
|
6123
6120
|
/* @__PURE__ */ m.jsx("span", { className: "text-[10px] font-black uppercase tracking-widest text-slate-400", children: t }),
|
|
@@ -6135,7 +6132,7 @@ const md = ({ title: t, description: e, seed: n }) => {
|
|
|
6135
6132
|
onPointerDown: R,
|
|
6136
6133
|
onPointerMove: D,
|
|
6137
6134
|
children: [
|
|
6138
|
-
/* @__PURE__ */ m.jsx("svg", { width: a, height: l, viewBox: `0 0 ${a} ${l}`, className: "overflow-visible absolute inset-0 pointer-events-none", children: /* @__PURE__ */ m.jsx("path", { d: v,
|
|
6135
|
+
/* @__PURE__ */ m.jsx("svg", { width: a, height: l, viewBox: `0 0 ${a} ${l}`, className: "overflow-visible absolute inset-0 pointer-events-none", children: /* @__PURE__ */ m.jsx("path", { d: v, className: "fill-slate-100 dark:fill-slate-700", stroke: "#e2e8f0", strokeWidth: g.strokeWidth }) }),
|
|
6139
6136
|
/* @__PURE__ */ m.jsx(
|
|
6140
6137
|
et.svg,
|
|
6141
6138
|
{
|
|
@@ -6143,8 +6140,8 @@ const md = ({ title: t, description: e, seed: n }) => {
|
|
|
6143
6140
|
height: l,
|
|
6144
6141
|
viewBox: `0 0 ${a} ${l}`,
|
|
6145
6142
|
className: "overflow-visible absolute inset-0 pointer-events-none",
|
|
6146
|
-
style: { clipPath:
|
|
6147
|
-
children: /* @__PURE__ */ m.jsx("path", { d: v,
|
|
6143
|
+
style: { clipPath: k },
|
|
6144
|
+
children: /* @__PURE__ */ m.jsx("path", { d: v, className: "fill-indigo-500 dark:fill-indigo-600" })
|
|
6148
6145
|
}
|
|
6149
6146
|
),
|
|
6150
6147
|
/* @__PURE__ */ m.jsx(
|
|
@@ -6159,7 +6156,7 @@ const md = ({ title: t, description: e, seed: n }) => {
|
|
|
6159
6156
|
scaleX: Z,
|
|
6160
6157
|
originX: 0.5
|
|
6161
6158
|
},
|
|
6162
|
-
children: /* @__PURE__ */ m.jsx("svg", { viewBox: `0 0 ${c} ${c}`, className: "overflow-visible drop-shadow-md", children: /* @__PURE__ */ m.jsx("path", { d: x,
|
|
6159
|
+
children: /* @__PURE__ */ m.jsx("svg", { viewBox: `0 0 ${c} ${c}`, className: "overflow-visible drop-shadow-md", children: /* @__PURE__ */ m.jsx("path", { d: x, className: "fill-white dark:fill-slate-200", stroke: "#4f46e5", strokeWidth: "1.5" }) })
|
|
6163
6160
|
}
|
|
6164
6161
|
)
|
|
6165
6162
|
]
|
|
@@ -6203,8 +6200,8 @@ const md = ({ title: t, description: e, seed: n }) => {
|
|
|
6203
6200
|
let w;
|
|
6204
6201
|
const A = () => {
|
|
6205
6202
|
if (!a.current || !r.current) return;
|
|
6206
|
-
const b = l.current, { mass: R, stiffness: D, damping:
|
|
6207
|
-
b.angularVelocity += L / R, b.angularVelocity *= b.friction, b.angle += b.angularVelocity, b.velocityRotateX += (b.targetRotateX - b.currentRotateX) * D / R, b.velocityRotateX *=
|
|
6203
|
+
const b = l.current, { mass: R, stiffness: D, damping: k, elasticity: O } = g, Z = Math.sin(Date.now() * 2e-3) * 0.02, L = (b.targetVelocity + Z - b.angularVelocity) * O;
|
|
6204
|
+
b.angularVelocity += L / R, b.angularVelocity *= b.friction, b.angle += b.angularVelocity, b.velocityRotateX += (b.targetRotateX - b.currentRotateX) * D / R, b.velocityRotateX *= k, b.currentRotateX += b.velocityRotateX, b.velocityRotateY += (b.targetRotateY - b.currentRotateY) * D / R, b.velocityRotateY *= k, b.currentRotateY += b.velocityRotateY, b.velocityTranslateZ += (b.targetTranslateZ - b.currentTranslateZ) * D / R, b.velocityTranslateZ *= k, b.currentTranslateZ += b.velocityTranslateZ;
|
|
6208
6205
|
const U = b.angularVelocity * 150, Y = x + U;
|
|
6209
6206
|
a.current.style.strokeDasharray = `${Y} ${v - Y}`;
|
|
6210
6207
|
const Pt = b.angle * 180 / Math.PI;
|
|
@@ -6309,12 +6306,12 @@ const md = ({ title: t, description: e, seed: n }) => {
|
|
|
6309
6306
|
}), s)) {
|
|
6310
6307
|
const R = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()_+-=[]{}|;:,.<>?";
|
|
6311
6308
|
let D = 0;
|
|
6312
|
-
const
|
|
6309
|
+
const k = 8;
|
|
6313
6310
|
g.current && clearInterval(g.current), g.current = setInterval(() => {
|
|
6314
|
-
let
|
|
6311
|
+
let O = "";
|
|
6315
6312
|
for (let Z = 0; Z < s.length; Z++)
|
|
6316
|
-
|
|
6317
|
-
h(
|
|
6313
|
+
O += R.charAt(Math.floor(Math.random() * R.length));
|
|
6314
|
+
h(O), D++, D >= k && (clearInterval(g.current), g.current = null, h(s));
|
|
6318
6315
|
}, 50);
|
|
6319
6316
|
}
|
|
6320
6317
|
v.current = n;
|
|
@@ -6431,8 +6428,8 @@ const md = ({ title: t, description: e, seed: n }) => {
|
|
|
6431
6428
|
dt(() => {
|
|
6432
6429
|
let w;
|
|
6433
6430
|
const A = () => {
|
|
6434
|
-
const b = c.current, { mass: R, stiffness: D, damping:
|
|
6435
|
-
b.velocity +=
|
|
6431
|
+
const b = c.current, { mass: R, stiffness: D, damping: k } = p, O = (b.targetX - b.currentX) * D;
|
|
6432
|
+
b.velocity += O / R, b.velocity *= k, b.currentX += b.velocity, b.velocityRX += (b.targetRotateX - b.currentRotateX) * D / R, b.velocityRX *= k, b.currentRotateX += b.velocityRX, b.velocityRY += (b.targetRotateY - b.currentRotateY) * D / R, b.velocityRY *= k, b.currentRotateY += b.velocityRY, b.velocityZ += (b.targetZ - b.currentZ) * D / R, b.velocityZ *= k, b.currentZ += b.velocityZ;
|
|
6436
6433
|
const Z = 1 + Math.abs(b.velocity) * 0.04;
|
|
6437
6434
|
u.knob.current && (u.knob.current.style.left = `${Math.floor(b.currentX)}px`, u.knob.current.style.transform = `scaleX(${Z})`), u.kineticBody.current && (u.kineticBody.current.style.transform = `
|
|
6438
6435
|
rotateX(${b.currentRotateX}deg)
|