@acrool/react-picker 0.0.2-alpha.6 → 0.0.2-alpha.7
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/acrool-react-picker.es.js +605 -603
- package/dist/compose/createPicker.d.ts +1 -3
- package/package.json +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as An from "react";
|
|
2
|
-
import
|
|
2
|
+
import Ks, { createContext as Et, useContext as U, useLayoutEffect as Ho, useEffect as gt, useRef as it, useInsertionEffect as Gs, useCallback as pt, useMemo as Vt, forwardRef as Ae, Fragment as zs, createElement as Yo, useId as Rn, Component as Xo, Children as qo, isValidElement as Zo, useState as Jt } from "react";
|
|
3
3
|
var jt = /* @__PURE__ */ ((t) => (t.Escape = "Escape", t.Enter = "Enter", t.Tab = "Tab", t.ArrowUp = "ArrowUp", t.ArrowDown = "ArrowDown", t))(jt || {});
|
|
4
4
|
const le = [
|
|
5
5
|
"color: #fff",
|
|
@@ -54,7 +54,7 @@ const wt = {
|
|
|
54
54
|
info: ta,
|
|
55
55
|
warning: ea,
|
|
56
56
|
danger: na
|
|
57
|
-
},
|
|
57
|
+
}, Vn = Et({
|
|
58
58
|
hide: () => wt.warning("No hide method detected, did you embed your app with Acrool/PickerPortal?"),
|
|
59
59
|
show: () => wt.warning("No show method detected, did you embed your app with Acrool/PickerPortal?"),
|
|
60
60
|
toggle: () => wt.warning("No toggle method detected, did you embed your app with Acrool/PickerPortal?"),
|
|
@@ -63,8 +63,8 @@ const wt = {
|
|
|
63
63
|
inputBlur: () => wt.warning("No blur method detected, did you embed your app with Acrool/PickerPortal?"),
|
|
64
64
|
isInputFocus: !1,
|
|
65
65
|
onChange: () => wt.warning("No onChange method detected, did you embed your app with Acrool/PickerPortal?")
|
|
66
|
-
}), Uh =
|
|
67
|
-
var
|
|
66
|
+
}), Uh = Vn.Consumer, Wh = () => U(Vn);
|
|
67
|
+
var hn = { exports: {} }, Ht = {};
|
|
68
68
|
/**
|
|
69
69
|
* @license React
|
|
70
70
|
* react-jsx-runtime.production.min.js
|
|
@@ -74,12 +74,12 @@ var cn = { exports: {} }, Ht = {};
|
|
|
74
74
|
* This source code is licensed under the MIT license found in the
|
|
75
75
|
* LICENSE file in the root directory of this source tree.
|
|
76
76
|
*/
|
|
77
|
-
var
|
|
77
|
+
var bi;
|
|
78
78
|
function ia() {
|
|
79
|
-
if (
|
|
79
|
+
if (bi)
|
|
80
80
|
return Ht;
|
|
81
|
-
|
|
82
|
-
var t =
|
|
81
|
+
bi = 1;
|
|
82
|
+
var t = Ks, e = Symbol.for("react.element"), n = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, s = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
83
83
|
function r(a, l, u) {
|
|
84
84
|
var c, h = {}, d = null, p = null;
|
|
85
85
|
u !== void 0 && (d = "" + u), l.key !== void 0 && (d = "" + l.key), l.ref !== void 0 && (p = l.ref);
|
|
@@ -102,10 +102,10 @@ var Yt = {};
|
|
|
102
102
|
* This source code is licensed under the MIT license found in the
|
|
103
103
|
* LICENSE file in the root directory of this source tree.
|
|
104
104
|
*/
|
|
105
|
-
var
|
|
105
|
+
var wi;
|
|
106
106
|
function sa() {
|
|
107
|
-
return
|
|
108
|
-
var t =
|
|
107
|
+
return wi || (wi = 1, process.env.NODE_ENV !== "production" && function() {
|
|
108
|
+
var t = Ks, e = Symbol.for("react.element"), n = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), r = Symbol.for("react.provider"), a = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), c = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"), d = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), g = Symbol.iterator, P = "@@iterator";
|
|
109
109
|
function b(f) {
|
|
110
110
|
if (f === null || typeof f != "object")
|
|
111
111
|
return null;
|
|
@@ -130,10 +130,10 @@ function sa() {
|
|
|
130
130
|
k.unshift("Warning: " + m), Function.prototype.apply.call(console[f], console, k);
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
|
-
var
|
|
133
|
+
var C = !1, w = !1, L = !1, q = !1, V = !1, G;
|
|
134
134
|
G = Symbol.for("react.module.reference");
|
|
135
135
|
function H(f) {
|
|
136
|
-
return !!(typeof f == "string" || typeof f == "function" || f === i || f === o || V || f === s || f === u || f === c || q || f === p ||
|
|
136
|
+
return !!(typeof f == "string" || typeof f == "function" || f === i || f === o || V || f === s || f === u || f === c || q || f === p || C || w || L || typeof f == "object" && f !== null && (f.$$typeof === d || f.$$typeof === h || f.$$typeof === r || f.$$typeof === a || f.$$typeof === l || // This needs to include all possible module reference object
|
|
137
137
|
// types supported by any Flight configuration anywhere since
|
|
138
138
|
// we don't know which Flight build this will end up being used
|
|
139
139
|
// with.
|
|
@@ -194,18 +194,18 @@ function sa() {
|
|
|
194
194
|
}
|
|
195
195
|
return null;
|
|
196
196
|
}
|
|
197
|
-
var nt = Object.assign, F = 0, J, Dt, Mt,
|
|
198
|
-
function
|
|
197
|
+
var nt = Object.assign, F = 0, J, Dt, Mt, ii, si, ri, oi;
|
|
198
|
+
function ai() {
|
|
199
199
|
}
|
|
200
|
-
|
|
200
|
+
ai.__reactDisabledLog = !0;
|
|
201
201
|
function xo() {
|
|
202
202
|
{
|
|
203
203
|
if (F === 0) {
|
|
204
|
-
J = console.log, Dt = console.info, Mt = console.warn,
|
|
204
|
+
J = console.log, Dt = console.info, Mt = console.warn, ii = console.error, si = console.group, ri = console.groupCollapsed, oi = console.groupEnd;
|
|
205
205
|
var f = {
|
|
206
206
|
configurable: !0,
|
|
207
207
|
enumerable: !0,
|
|
208
|
-
value:
|
|
208
|
+
value: ai,
|
|
209
209
|
writable: !0
|
|
210
210
|
};
|
|
211
211
|
Object.defineProperties(console, {
|
|
@@ -240,43 +240,43 @@ function sa() {
|
|
|
240
240
|
value: Mt
|
|
241
241
|
}),
|
|
242
242
|
error: nt({}, f, {
|
|
243
|
-
value:
|
|
243
|
+
value: ii
|
|
244
244
|
}),
|
|
245
245
|
group: nt({}, f, {
|
|
246
|
-
value:
|
|
246
|
+
value: si
|
|
247
247
|
}),
|
|
248
248
|
groupCollapsed: nt({}, f, {
|
|
249
|
-
value:
|
|
249
|
+
value: ri
|
|
250
250
|
}),
|
|
251
251
|
groupEnd: nt({}, f, {
|
|
252
|
-
value:
|
|
252
|
+
value: oi
|
|
253
253
|
})
|
|
254
254
|
});
|
|
255
255
|
}
|
|
256
256
|
F < 0 && y("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
|
-
var
|
|
259
|
+
var We = x.ReactCurrentDispatcher, $e;
|
|
260
260
|
function me(f, m, T) {
|
|
261
261
|
{
|
|
262
|
-
if (
|
|
262
|
+
if ($e === void 0)
|
|
263
263
|
try {
|
|
264
264
|
throw Error();
|
|
265
265
|
} catch (D) {
|
|
266
266
|
var A = D.stack.trim().match(/\n( *(at )?)/);
|
|
267
|
-
|
|
267
|
+
$e = A && A[1] || "";
|
|
268
268
|
}
|
|
269
269
|
return `
|
|
270
|
-
` +
|
|
270
|
+
` + $e + f;
|
|
271
271
|
}
|
|
272
272
|
}
|
|
273
|
-
var
|
|
273
|
+
var Ke = !1, ge;
|
|
274
274
|
{
|
|
275
275
|
var bo = typeof WeakMap == "function" ? WeakMap : Map;
|
|
276
276
|
ge = new bo();
|
|
277
277
|
}
|
|
278
|
-
function
|
|
279
|
-
if (!f ||
|
|
278
|
+
function li(f, m) {
|
|
279
|
+
if (!f || Ke)
|
|
280
280
|
return "";
|
|
281
281
|
{
|
|
282
282
|
var T = ge.get(f);
|
|
@@ -284,11 +284,11 @@ function sa() {
|
|
|
284
284
|
return T;
|
|
285
285
|
}
|
|
286
286
|
var A;
|
|
287
|
-
|
|
287
|
+
Ke = !0;
|
|
288
288
|
var D = Error.prepareStackTrace;
|
|
289
289
|
Error.prepareStackTrace = void 0;
|
|
290
290
|
var k;
|
|
291
|
-
k =
|
|
291
|
+
k = We.current, We.current = null, xo();
|
|
292
292
|
try {
|
|
293
293
|
if (m) {
|
|
294
294
|
var E = function() {
|
|
@@ -341,13 +341,13 @@ function sa() {
|
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
343
|
} finally {
|
|
344
|
-
|
|
344
|
+
Ke = !1, We.current = k, To(), Error.prepareStackTrace = D;
|
|
345
345
|
}
|
|
346
346
|
var Lt = f ? f.displayName || f.name : "", Tt = Lt ? me(Lt) : "";
|
|
347
347
|
return typeof f == "function" && ge.set(f, Tt), Tt;
|
|
348
348
|
}
|
|
349
349
|
function wo(f, m, T) {
|
|
350
|
-
return
|
|
350
|
+
return li(f, !1);
|
|
351
351
|
}
|
|
352
352
|
function So(f) {
|
|
353
353
|
var m = f.prototype;
|
|
@@ -357,7 +357,7 @@ function sa() {
|
|
|
357
357
|
if (f == null)
|
|
358
358
|
return "";
|
|
359
359
|
if (typeof f == "function")
|
|
360
|
-
return
|
|
360
|
+
return li(f, So(f));
|
|
361
361
|
if (typeof f == "string")
|
|
362
362
|
return me(f);
|
|
363
363
|
switch (f) {
|
|
@@ -382,15 +382,15 @@ function sa() {
|
|
|
382
382
|
}
|
|
383
383
|
return "";
|
|
384
384
|
}
|
|
385
|
-
var Gt = Object.prototype.hasOwnProperty,
|
|
385
|
+
var Gt = Object.prototype.hasOwnProperty, ui = {}, ci = x.ReactDebugCurrentFrame;
|
|
386
386
|
function ve(f) {
|
|
387
387
|
if (f) {
|
|
388
388
|
var m = f._owner, T = ye(f.type, f._source, m ? m.type : null);
|
|
389
|
-
|
|
389
|
+
ci.setExtraStackFrame(T);
|
|
390
390
|
} else
|
|
391
|
-
|
|
391
|
+
ci.setExtraStackFrame(null);
|
|
392
392
|
}
|
|
393
|
-
function
|
|
393
|
+
function Co(f, m, T, A, D) {
|
|
394
394
|
{
|
|
395
395
|
var k = Function.call.bind(Gt);
|
|
396
396
|
for (var E in f)
|
|
@@ -405,13 +405,13 @@ function sa() {
|
|
|
405
405
|
} catch (_) {
|
|
406
406
|
R = _;
|
|
407
407
|
}
|
|
408
|
-
R && !(R instanceof Error) && (ve(D), y("%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).", A || "React class", T, E, typeof R), ve(null)), R instanceof Error && !(R.message in
|
|
408
|
+
R && !(R instanceof Error) && (ve(D), y("%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).", A || "React class", T, E, typeof R), ve(null)), R instanceof Error && !(R.message in ui) && (ui[R.message] = !0, ve(D), y("Failed %s type: %s", T, R.message), ve(null));
|
|
409
409
|
}
|
|
410
410
|
}
|
|
411
411
|
}
|
|
412
|
-
var
|
|
413
|
-
function
|
|
414
|
-
return
|
|
412
|
+
var Ao = Array.isArray;
|
|
413
|
+
function Ge(f) {
|
|
414
|
+
return Ao(f);
|
|
415
415
|
}
|
|
416
416
|
function Ro(f) {
|
|
417
417
|
{
|
|
@@ -421,25 +421,25 @@ function sa() {
|
|
|
421
421
|
}
|
|
422
422
|
function Vo(f) {
|
|
423
423
|
try {
|
|
424
|
-
return
|
|
424
|
+
return hi(f), !1;
|
|
425
425
|
} catch {
|
|
426
426
|
return !0;
|
|
427
427
|
}
|
|
428
428
|
}
|
|
429
|
-
function
|
|
429
|
+
function hi(f) {
|
|
430
430
|
return "" + f;
|
|
431
431
|
}
|
|
432
|
-
function
|
|
432
|
+
function fi(f) {
|
|
433
433
|
if (Vo(f))
|
|
434
|
-
return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ro(f)),
|
|
434
|
+
return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ro(f)), hi(f);
|
|
435
435
|
}
|
|
436
436
|
var zt = x.ReactCurrentOwner, Eo = {
|
|
437
437
|
key: !0,
|
|
438
438
|
ref: !0,
|
|
439
439
|
__self: !0,
|
|
440
440
|
__source: !0
|
|
441
|
-
},
|
|
442
|
-
|
|
441
|
+
}, di, pi, ze;
|
|
442
|
+
ze = {};
|
|
443
443
|
function Do(f) {
|
|
444
444
|
if (Gt.call(f, "ref")) {
|
|
445
445
|
var m = Object.getOwnPropertyDescriptor(f, "ref").get;
|
|
@@ -459,13 +459,13 @@ function sa() {
|
|
|
459
459
|
function ko(f, m) {
|
|
460
460
|
if (typeof f.ref == "string" && zt.current && m && zt.current.stateNode !== m) {
|
|
461
461
|
var T = Z(zt.current.type);
|
|
462
|
-
|
|
462
|
+
ze[T] || (y('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', Z(zt.current.type), f.ref), ze[T] = !0);
|
|
463
463
|
}
|
|
464
464
|
}
|
|
465
465
|
function Lo(f, m) {
|
|
466
466
|
{
|
|
467
467
|
var T = function() {
|
|
468
|
-
|
|
468
|
+
di || (di = !0, y("%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)", m));
|
|
469
469
|
};
|
|
470
470
|
T.isReactWarning = !0, Object.defineProperty(f, "key", {
|
|
471
471
|
get: T,
|
|
@@ -476,7 +476,7 @@ function sa() {
|
|
|
476
476
|
function jo(f, m) {
|
|
477
477
|
{
|
|
478
478
|
var T = function() {
|
|
479
|
-
|
|
479
|
+
pi || (pi = !0, y("%s: `ref` 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)", m));
|
|
480
480
|
};
|
|
481
481
|
T.isReactWarning = !0, Object.defineProperty(f, "ref", {
|
|
482
482
|
get: T,
|
|
@@ -516,7 +516,7 @@ function sa() {
|
|
|
516
516
|
function Fo(f, m, T, A, D) {
|
|
517
517
|
{
|
|
518
518
|
var k, E = {}, R = null, z = null;
|
|
519
|
-
T !== void 0 && (
|
|
519
|
+
T !== void 0 && (fi(T), R = "" + T), Mo(m) && (fi(m.key), R = "" + m.key), Do(m) && (z = m.ref, ko(m, D));
|
|
520
520
|
for (k in m)
|
|
521
521
|
Gt.call(m, k) && !Eo.hasOwnProperty(k) && (E[k] = m[k]);
|
|
522
522
|
if (f && f.defaultProps) {
|
|
@@ -531,23 +531,23 @@ function sa() {
|
|
|
531
531
|
return Oo(f, R, z, D, A, zt.current, E);
|
|
532
532
|
}
|
|
533
533
|
}
|
|
534
|
-
var
|
|
534
|
+
var He = x.ReactCurrentOwner, mi = x.ReactDebugCurrentFrame;
|
|
535
535
|
function kt(f) {
|
|
536
536
|
if (f) {
|
|
537
537
|
var m = f._owner, T = ye(f.type, f._source, m ? m.type : null);
|
|
538
|
-
|
|
538
|
+
mi.setExtraStackFrame(T);
|
|
539
539
|
} else
|
|
540
|
-
|
|
540
|
+
mi.setExtraStackFrame(null);
|
|
541
541
|
}
|
|
542
|
-
var
|
|
543
|
-
|
|
544
|
-
function
|
|
542
|
+
var Ye;
|
|
543
|
+
Ye = !1;
|
|
544
|
+
function Xe(f) {
|
|
545
545
|
return typeof f == "object" && f !== null && f.$$typeof === e;
|
|
546
546
|
}
|
|
547
|
-
function
|
|
547
|
+
function gi() {
|
|
548
548
|
{
|
|
549
|
-
if (
|
|
550
|
-
var f = Z(
|
|
549
|
+
if (He.current) {
|
|
550
|
+
var f = Z(He.current.type);
|
|
551
551
|
if (f)
|
|
552
552
|
return `
|
|
553
553
|
|
|
@@ -567,10 +567,10 @@ Check your code at ` + m + ":" + T + ".";
|
|
|
567
567
|
return "";
|
|
568
568
|
}
|
|
569
569
|
}
|
|
570
|
-
var
|
|
570
|
+
var yi = {};
|
|
571
571
|
function Bo(f) {
|
|
572
572
|
{
|
|
573
|
-
var m =
|
|
573
|
+
var m = gi();
|
|
574
574
|
if (!m) {
|
|
575
575
|
var T = typeof f == "string" ? f : f.displayName || f.name;
|
|
576
576
|
T && (m = `
|
|
@@ -580,35 +580,35 @@ Check the top-level render call using <` + T + ">.");
|
|
|
580
580
|
return m;
|
|
581
581
|
}
|
|
582
582
|
}
|
|
583
|
-
function
|
|
583
|
+
function vi(f, m) {
|
|
584
584
|
{
|
|
585
585
|
if (!f._store || f._store.validated || f.key != null)
|
|
586
586
|
return;
|
|
587
587
|
f._store.validated = !0;
|
|
588
588
|
var T = Bo(m);
|
|
589
|
-
if (
|
|
589
|
+
if (yi[T])
|
|
590
590
|
return;
|
|
591
|
-
|
|
591
|
+
yi[T] = !0;
|
|
592
592
|
var A = "";
|
|
593
|
-
f && f._owner && f._owner !==
|
|
593
|
+
f && f._owner && f._owner !== He.current && (A = " It was passed a child from " + Z(f._owner.type) + "."), kt(f), y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', T, A), kt(null);
|
|
594
594
|
}
|
|
595
595
|
}
|
|
596
|
-
function
|
|
596
|
+
function Pi(f, m) {
|
|
597
597
|
{
|
|
598
598
|
if (typeof f != "object")
|
|
599
599
|
return;
|
|
600
|
-
if (
|
|
600
|
+
if (Ge(f))
|
|
601
601
|
for (var T = 0; T < f.length; T++) {
|
|
602
602
|
var A = f[T];
|
|
603
|
-
|
|
603
|
+
Xe(A) && vi(A, m);
|
|
604
604
|
}
|
|
605
|
-
else if (
|
|
605
|
+
else if (Xe(f))
|
|
606
606
|
f._store && (f._store.validated = !0);
|
|
607
607
|
else if (f) {
|
|
608
608
|
var D = b(f);
|
|
609
609
|
if (typeof D == "function" && D !== f.entries)
|
|
610
610
|
for (var k = D.call(f), E; !(E = k.next()).done; )
|
|
611
|
-
|
|
611
|
+
Xe(E.value) && vi(E.value, m);
|
|
612
612
|
}
|
|
613
613
|
}
|
|
614
614
|
}
|
|
@@ -628,9 +628,9 @@ Check the top-level render call using <` + T + ">.");
|
|
|
628
628
|
return;
|
|
629
629
|
if (T) {
|
|
630
630
|
var A = Z(m);
|
|
631
|
-
|
|
632
|
-
} else if (m.PropTypes !== void 0 && !
|
|
633
|
-
|
|
631
|
+
Co(T, f.props, "prop", A, f);
|
|
632
|
+
} else if (m.PropTypes !== void 0 && !Ye) {
|
|
633
|
+
Ye = !0;
|
|
634
634
|
var D = Z(m);
|
|
635
635
|
y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", D || "Unknown");
|
|
636
636
|
}
|
|
@@ -649,17 +649,17 @@ Check the top-level render call using <` + T + ">.");
|
|
|
649
649
|
f.ref !== null && (kt(f), y("Invalid attribute `ref` supplied to `React.Fragment`."), kt(null));
|
|
650
650
|
}
|
|
651
651
|
}
|
|
652
|
-
var
|
|
653
|
-
function
|
|
652
|
+
var xi = {};
|
|
653
|
+
function Ti(f, m, T, A, D, k) {
|
|
654
654
|
{
|
|
655
655
|
var E = H(f);
|
|
656
656
|
if (!E) {
|
|
657
657
|
var R = "";
|
|
658
658
|
(f === void 0 || typeof f == "object" && f !== null && Object.keys(f).length === 0) && (R += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
659
659
|
var z = _o(D);
|
|
660
|
-
z ? R += z : R +=
|
|
660
|
+
z ? R += z : R += gi();
|
|
661
661
|
var _;
|
|
662
|
-
f === null ? _ = "null" :
|
|
662
|
+
f === null ? _ = "null" : Ge(f) ? _ = "array" : f !== void 0 && f.$$typeof === e ? (_ = "<" + (Z(f.type) || "Unknown") + " />", R = " Did you accidentally export a JSX literal instead of a component?") : _ = typeof f, y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", _, R);
|
|
663
663
|
}
|
|
664
664
|
var I = Fo(f, m, T, D, k);
|
|
665
665
|
if (I == null)
|
|
@@ -668,49 +668,49 @@ Check the top-level render call using <` + T + ">.");
|
|
|
668
668
|
var Q = m.children;
|
|
669
669
|
if (Q !== void 0)
|
|
670
670
|
if (A)
|
|
671
|
-
if (
|
|
671
|
+
if (Ge(Q)) {
|
|
672
672
|
for (var Lt = 0; Lt < Q.length; Lt++)
|
|
673
|
-
|
|
673
|
+
Pi(Q[Lt], f);
|
|
674
674
|
Object.freeze && Object.freeze(Q);
|
|
675
675
|
} else
|
|
676
676
|
y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
677
677
|
else
|
|
678
|
-
|
|
678
|
+
Pi(Q, f);
|
|
679
679
|
}
|
|
680
680
|
if (Gt.call(m, "key")) {
|
|
681
681
|
var Tt = Z(f), Y = Object.keys(m).filter(function(zo) {
|
|
682
682
|
return zo !== "key";
|
|
683
|
-
}),
|
|
684
|
-
if (!
|
|
683
|
+
}), qe = Y.length > 0 ? "{key: someKey, " + Y.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
684
|
+
if (!xi[Tt + qe]) {
|
|
685
685
|
var Go = Y.length > 0 ? "{" + Y.join(": ..., ") + ": ...}" : "{}";
|
|
686
686
|
y(`A props object containing a "key" prop is being spread into JSX:
|
|
687
687
|
let props = %s;
|
|
688
688
|
<%s {...props} />
|
|
689
689
|
React keys must be passed directly to JSX without using spread:
|
|
690
690
|
let props = %s;
|
|
691
|
-
<%s key={someKey} {...props} />`,
|
|
691
|
+
<%s key={someKey} {...props} />`, qe, Tt, Go, Tt), xi[Tt + qe] = !0;
|
|
692
692
|
}
|
|
693
693
|
}
|
|
694
694
|
return f === i ? No(I) : Io(I), I;
|
|
695
695
|
}
|
|
696
696
|
}
|
|
697
697
|
function Uo(f, m, T) {
|
|
698
|
-
return
|
|
698
|
+
return Ti(f, m, T, !0);
|
|
699
699
|
}
|
|
700
700
|
function Wo(f, m, T) {
|
|
701
|
-
return
|
|
701
|
+
return Ti(f, m, T, !1);
|
|
702
702
|
}
|
|
703
703
|
var $o = Wo, Ko = Uo;
|
|
704
704
|
Yt.Fragment = i, Yt.jsx = $o, Yt.jsxs = Ko;
|
|
705
705
|
}()), Yt;
|
|
706
706
|
}
|
|
707
|
-
process.env.NODE_ENV === "production" ?
|
|
708
|
-
var O =
|
|
709
|
-
const
|
|
707
|
+
process.env.NODE_ENV === "production" ? hn.exports = ia() : hn.exports = sa();
|
|
708
|
+
var O = hn.exports;
|
|
709
|
+
const En = Et({
|
|
710
710
|
transformPagePoint: (t) => t,
|
|
711
711
|
isStatic: !1,
|
|
712
712
|
reducedMotion: "never"
|
|
713
|
-
}),
|
|
713
|
+
}), Le = Et({}), je = Et(null), Dn = typeof window < "u", Hs = Dn ? Ho : gt, Ys = Et({ strict: !1 }), Oe = (t) => t.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), ra = "framerAppearId", Xs = "data-" + Oe(ra), oa = {
|
|
714
714
|
skipAnimations: !1,
|
|
715
715
|
useManualTiming: !1
|
|
716
716
|
};
|
|
@@ -780,20 +780,20 @@ function qs(t, e) {
|
|
|
780
780
|
};
|
|
781
781
|
return { schedule: Pe.reduce((x, y) => {
|
|
782
782
|
const v = r[y];
|
|
783
|
-
return x[y] = (
|
|
783
|
+
return x[y] = (C, w = !1, L = !1) => (n || g(), v.schedule(C, w, L)), x;
|
|
784
784
|
}, {}), cancel: (x) => {
|
|
785
785
|
for (let y = 0; y < Pe.length; y++)
|
|
786
786
|
r[Pe[y]].cancel(x);
|
|
787
787
|
}, state: s, steps: r };
|
|
788
788
|
}
|
|
789
|
-
const { schedule:
|
|
789
|
+
const { schedule: Mn, cancel: $h } = qs(queueMicrotask, !1);
|
|
790
790
|
function Ot(t) {
|
|
791
791
|
return t && typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "current");
|
|
792
792
|
}
|
|
793
793
|
const Zs = Et({});
|
|
794
|
-
let
|
|
794
|
+
let Si = !1;
|
|
795
795
|
function ua(t, e, n, i, s) {
|
|
796
|
-
const { visualElement: o } = U(
|
|
796
|
+
const { visualElement: o } = U(Le), r = U(Ys), a = U(je), l = U(En).reducedMotion, u = it();
|
|
797
797
|
i = i || r.renderer, !u.current && i && (u.current = i(t, {
|
|
798
798
|
visualState: e,
|
|
799
799
|
parent: o,
|
|
@@ -803,14 +803,14 @@ function ua(t, e, n, i, s) {
|
|
|
803
803
|
reducedMotionConfig: l
|
|
804
804
|
}));
|
|
805
805
|
const c = u.current, h = U(Zs);
|
|
806
|
-
c && !c.projection && s && (c.type === "html" || c.type === "svg") && ha(u.current, n, s, h),
|
|
806
|
+
c && !c.projection && s && (c.type === "html" || c.type === "svg") && ha(u.current, n, s, h), Gs(() => {
|
|
807
807
|
c && c.update(n, a);
|
|
808
808
|
});
|
|
809
809
|
const d = it(!!(n[Xs] && !window.HandoffComplete));
|
|
810
810
|
return Hs(() => {
|
|
811
|
-
c && (c.updateFeatures(),
|
|
811
|
+
c && (c.updateFeatures(), Mn.render(c.render), d.current && c.animationState && c.animationState.animateChanges());
|
|
812
812
|
}), gt(() => {
|
|
813
|
-
c && (!d.current && c.animationState && c.animationState.animateChanges(), d.current && (d.current = !1,
|
|
813
|
+
c && (!d.current && c.animationState && c.animationState.animateChanges(), d.current && (d.current = !1, Si || (Si = !0, queueMicrotask(ca))));
|
|
814
814
|
}), c;
|
|
815
815
|
}
|
|
816
816
|
function ca() {
|
|
@@ -859,7 +859,7 @@ function ie(t) {
|
|
|
859
859
|
function se(t) {
|
|
860
860
|
return t !== null && typeof t == "object" && typeof t.start == "function";
|
|
861
861
|
}
|
|
862
|
-
const
|
|
862
|
+
const kn = [
|
|
863
863
|
"animate",
|
|
864
864
|
"whileInView",
|
|
865
865
|
"whileFocus",
|
|
@@ -867,15 +867,15 @@ const Mn = [
|
|
|
867
867
|
"whileTap",
|
|
868
868
|
"whileDrag",
|
|
869
869
|
"exit"
|
|
870
|
-
],
|
|
871
|
-
function
|
|
872
|
-
return se(t.animate) ||
|
|
870
|
+
], Ln = ["initial", ...kn];
|
|
871
|
+
function Fe(t) {
|
|
872
|
+
return se(t.animate) || Ln.some((e) => ie(t[e]));
|
|
873
873
|
}
|
|
874
874
|
function Qs(t) {
|
|
875
|
-
return !!(
|
|
875
|
+
return !!(Fe(t) || t.variants);
|
|
876
876
|
}
|
|
877
877
|
function da(t, e) {
|
|
878
|
-
if (
|
|
878
|
+
if (Fe(t)) {
|
|
879
879
|
const { initial: n, animate: i } = t;
|
|
880
880
|
return {
|
|
881
881
|
initial: n === !1 || ie(n) ? n : void 0,
|
|
@@ -885,10 +885,10 @@ function da(t, e) {
|
|
|
885
885
|
return t.inherit !== !1 ? e : {};
|
|
886
886
|
}
|
|
887
887
|
function pa(t) {
|
|
888
|
-
const { initial: e, animate: n } = da(t, U(
|
|
889
|
-
return Vt(() => ({ initial: e, animate: n }), [
|
|
888
|
+
const { initial: e, animate: n } = da(t, U(Le));
|
|
889
|
+
return Vt(() => ({ initial: e, animate: n }), [Ci(e), Ci(n)]);
|
|
890
890
|
}
|
|
891
|
-
function
|
|
891
|
+
function Ci(t) {
|
|
892
892
|
return Array.isArray(t) ? t.join(" ") : t;
|
|
893
893
|
}
|
|
894
894
|
const Ai = {
|
|
@@ -922,7 +922,7 @@ function ma(t) {
|
|
|
922
922
|
...t[e]
|
|
923
923
|
};
|
|
924
924
|
}
|
|
925
|
-
const
|
|
925
|
+
const jn = Et({}), ga = Symbol.for("motionComponentSymbol"), W = (t) => t;
|
|
926
926
|
let Wt = W, ct = W;
|
|
927
927
|
process.env.NODE_ENV !== "production" && (Wt = (t, e) => {
|
|
928
928
|
!t && typeof console < "u" && console.warn(e);
|
|
@@ -935,22 +935,22 @@ function ya({ preloadedFeatures: t, createVisualElement: e, useRender: n, useVis
|
|
|
935
935
|
function o(a, l) {
|
|
936
936
|
let u;
|
|
937
937
|
const c = {
|
|
938
|
-
...U(
|
|
938
|
+
...U(En),
|
|
939
939
|
...a,
|
|
940
940
|
layoutId: va(a)
|
|
941
941
|
}, { isStatic: h } = c, d = pa(a), p = i(a, h);
|
|
942
|
-
if (!h &&
|
|
942
|
+
if (!h && Dn) {
|
|
943
943
|
Pa(c, t);
|
|
944
944
|
const g = xa(c);
|
|
945
945
|
u = g.MeasureLayout, d.visualElement = ua(s, p, c, e, g.ProjectionNode);
|
|
946
946
|
}
|
|
947
|
-
return O.jsxs(
|
|
947
|
+
return O.jsxs(Le.Provider, { value: d, children: [u && d.visualElement ? O.jsx(u, { visualElement: d.visualElement, ...c }) : null, n(s, a, fa(p, d.visualElement, l), p, h, d.visualElement)] });
|
|
948
948
|
}
|
|
949
|
-
const r =
|
|
949
|
+
const r = Ae(o);
|
|
950
950
|
return r[ga] = s, r;
|
|
951
951
|
}
|
|
952
952
|
function va({ layoutId: t }) {
|
|
953
|
-
const e = U(
|
|
953
|
+
const e = U(jn).id;
|
|
954
954
|
return e && t !== void 0 ? e + "-" + t : t;
|
|
955
955
|
}
|
|
956
956
|
function Pa(t, e) {
|
|
@@ -1013,7 +1013,7 @@ const ba = [
|
|
|
1013
1013
|
"use",
|
|
1014
1014
|
"view"
|
|
1015
1015
|
];
|
|
1016
|
-
function
|
|
1016
|
+
function On(t) {
|
|
1017
1017
|
return (
|
|
1018
1018
|
/**
|
|
1019
1019
|
* If it's not a string, it's a custom React component. Currently we only support
|
|
@@ -1033,9 +1033,9 @@ function jn(t) {
|
|
|
1033
1033
|
)
|
|
1034
1034
|
);
|
|
1035
1035
|
}
|
|
1036
|
-
const
|
|
1036
|
+
const Re = {};
|
|
1037
1037
|
function wa(t) {
|
|
1038
|
-
Object.assign(
|
|
1038
|
+
Object.assign(Re, t);
|
|
1039
1039
|
}
|
|
1040
1040
|
const he = [
|
|
1041
1041
|
"transformPerspective",
|
|
@@ -1057,17 +1057,17 @@ const he = [
|
|
|
1057
1057
|
"skewY"
|
|
1058
1058
|
], Pt = new Set(he);
|
|
1059
1059
|
function tr(t, { layout: e, layoutId: n }) {
|
|
1060
|
-
return Pt.has(t) || t.startsWith("origin") || (e || n !== void 0) && (!!
|
|
1060
|
+
return Pt.has(t) || t.startsWith("origin") || (e || n !== void 0) && (!!Re[t] || t === "opacity");
|
|
1061
1061
|
}
|
|
1062
1062
|
const K = (t) => !!(t && t.getVelocity), Sa = {
|
|
1063
1063
|
x: "translateX",
|
|
1064
1064
|
y: "translateY",
|
|
1065
1065
|
z: "translateZ",
|
|
1066
1066
|
transformPerspective: "perspective"
|
|
1067
|
-
},
|
|
1068
|
-
function
|
|
1067
|
+
}, Ca = he.length;
|
|
1068
|
+
function Aa(t, e, n) {
|
|
1069
1069
|
let i = "";
|
|
1070
|
-
for (let s = 0; s <
|
|
1070
|
+
for (let s = 0; s < Ca; s++) {
|
|
1071
1071
|
const o = he[s];
|
|
1072
1072
|
if (t[o] !== void 0) {
|
|
1073
1073
|
const r = Sa[o] || o;
|
|
@@ -1076,7 +1076,7 @@ function Ca(t, e, n) {
|
|
|
1076
1076
|
}
|
|
1077
1077
|
return i = i.trim(), n ? i = n(t, e ? "" : i) : e && (i = "none"), i;
|
|
1078
1078
|
}
|
|
1079
|
-
const er = (t) => (e) => typeof e == "string" && e.startsWith(t), nr = er("--"), Ra = er("var(--"),
|
|
1079
|
+
const er = (t) => (e) => typeof e == "string" && e.startsWith(t), nr = er("--"), Ra = er("var(--"), Fn = (t) => Ra(t) ? Va.test(t.split("/*")[0].trim()) : !1, Va = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu, Ea = (t, e) => e && typeof t == "number" ? e.transform(t) : t, yt = (t, e, n) => n > e ? e : n < t ? t : n, $t = {
|
|
1080
1080
|
test: (t) => typeof t == "number",
|
|
1081
1081
|
parse: parseFloat,
|
|
1082
1082
|
transform: (t) => t
|
|
@@ -1086,7 +1086,7 @@ const er = (t) => (e) => typeof e == "string" && e.startsWith(t), nr = er("--"),
|
|
|
1086
1086
|
}, xe = {
|
|
1087
1087
|
...$t,
|
|
1088
1088
|
default: 1
|
|
1089
|
-
}, te = (t) => Math.round(t * 1e5) / 1e5,
|
|
1089
|
+
}, te = (t) => Math.round(t * 1e5) / 1e5, _n = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu, Da = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu, Ma = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;
|
|
1090
1090
|
function fe(t) {
|
|
1091
1091
|
return typeof t == "string";
|
|
1092
1092
|
}
|
|
@@ -1097,11 +1097,11 @@ const de = (t) => ({
|
|
|
1097
1097
|
test: (e) => fe(e) && e.endsWith(t) && e.split(" ").length === 1,
|
|
1098
1098
|
parse: parseFloat,
|
|
1099
1099
|
transform: (e) => `${e}${t}`
|
|
1100
|
-
}), dt = de("deg"), st = de("%"), S = de("px"), La = de("vh"), ja = de("vw"),
|
|
1100
|
+
}), dt = de("deg"), st = de("%"), S = de("px"), La = de("vh"), ja = de("vw"), Ri = {
|
|
1101
1101
|
...st,
|
|
1102
1102
|
parse: (t) => st.parse(t) / 100,
|
|
1103
1103
|
transform: (t) => st.transform(t * 100)
|
|
1104
|
-
},
|
|
1104
|
+
}, Vi = {
|
|
1105
1105
|
...$t,
|
|
1106
1106
|
transform: Math.round
|
|
1107
1107
|
}, ir = {
|
|
@@ -1160,19 +1160,19 @@ const de = (t) => ({
|
|
|
1160
1160
|
perspective: S,
|
|
1161
1161
|
transformPerspective: S,
|
|
1162
1162
|
opacity: Qt,
|
|
1163
|
-
originX:
|
|
1164
|
-
originY:
|
|
1163
|
+
originX: Ri,
|
|
1164
|
+
originY: Ri,
|
|
1165
1165
|
originZ: S,
|
|
1166
1166
|
// Misc
|
|
1167
|
-
zIndex:
|
|
1167
|
+
zIndex: Vi,
|
|
1168
1168
|
backgroundPositionX: S,
|
|
1169
1169
|
backgroundPositionY: S,
|
|
1170
1170
|
// SVG
|
|
1171
1171
|
fillOpacity: Qt,
|
|
1172
1172
|
strokeOpacity: Qt,
|
|
1173
|
-
numOctaves:
|
|
1173
|
+
numOctaves: Vi
|
|
1174
1174
|
};
|
|
1175
|
-
function
|
|
1175
|
+
function Bn(t, e, n) {
|
|
1176
1176
|
const { style: i, vars: s, transform: o, transformOrigin: r } = t;
|
|
1177
1177
|
let a = !1, l = !1, u = !0;
|
|
1178
1178
|
for (const c in e) {
|
|
@@ -1189,12 +1189,12 @@ function _n(t, e, n) {
|
|
|
1189
1189
|
} else
|
|
1190
1190
|
c.startsWith("origin") ? (l = !0, r[c] = p) : i[c] = p;
|
|
1191
1191
|
}
|
|
1192
|
-
if (e.transform || (a || n ? i.transform =
|
|
1192
|
+
if (e.transform || (a || n ? i.transform = Aa(t.transform, u, n) : i.transform && (i.transform = "none")), l) {
|
|
1193
1193
|
const { originX: c = "50%", originY: h = "50%", originZ: d = 0 } = r;
|
|
1194
1194
|
i.transformOrigin = `${c} ${h} ${d}`;
|
|
1195
1195
|
}
|
|
1196
1196
|
}
|
|
1197
|
-
const
|
|
1197
|
+
const In = () => ({
|
|
1198
1198
|
style: {},
|
|
1199
1199
|
transform: {},
|
|
1200
1200
|
transformOrigin: {},
|
|
@@ -1206,8 +1206,8 @@ function sr(t, e, n) {
|
|
|
1206
1206
|
}
|
|
1207
1207
|
function Oa({ transformTemplate: t }, e) {
|
|
1208
1208
|
return Vt(() => {
|
|
1209
|
-
const n =
|
|
1210
|
-
return
|
|
1209
|
+
const n = In();
|
|
1210
|
+
return Bn(n, e, t), Object.assign({}, n.vars, n.style);
|
|
1211
1211
|
}, [e]);
|
|
1212
1212
|
}
|
|
1213
1213
|
function Fa(t, e) {
|
|
@@ -1250,12 +1250,12 @@ const Ba = /* @__PURE__ */ new Set([
|
|
|
1250
1250
|
"ignoreStrict",
|
|
1251
1251
|
"viewport"
|
|
1252
1252
|
]);
|
|
1253
|
-
function
|
|
1253
|
+
function Ve(t) {
|
|
1254
1254
|
return t.startsWith("while") || t.startsWith("drag") && t !== "draggable" || t.startsWith("layout") || t.startsWith("onTap") || t.startsWith("onPan") || t.startsWith("onLayout") || Ba.has(t);
|
|
1255
1255
|
}
|
|
1256
|
-
let rr = (t) => !
|
|
1256
|
+
let rr = (t) => !Ve(t);
|
|
1257
1257
|
function Ia(t) {
|
|
1258
|
-
t && (rr = (e) => e.startsWith("on") ? !
|
|
1258
|
+
t && (rr = (e) => e.startsWith("on") ? !Ve(e) : t(e));
|
|
1259
1259
|
}
|
|
1260
1260
|
try {
|
|
1261
1261
|
Ia(require("@emotion/is-prop-valid").default);
|
|
@@ -1264,15 +1264,15 @@ try {
|
|
|
1264
1264
|
function Na(t, e, n) {
|
|
1265
1265
|
const i = {};
|
|
1266
1266
|
for (const s in t)
|
|
1267
|
-
s === "values" && typeof t.values == "object" || (rr(s) || n === !0 &&
|
|
1267
|
+
s === "values" && typeof t.values == "object" || (rr(s) || n === !0 && Ve(s) || !e && !Ve(s) || // If trying to use native HTML drag events, forward drag listeners
|
|
1268
1268
|
t.draggable && s.startsWith("onDrag")) && (i[s] = t[s]);
|
|
1269
1269
|
return i;
|
|
1270
1270
|
}
|
|
1271
|
-
function
|
|
1271
|
+
function Ei(t, e, n) {
|
|
1272
1272
|
return typeof t == "string" ? t : S.transform(e + n * t);
|
|
1273
1273
|
}
|
|
1274
1274
|
function Ua(t, e, n) {
|
|
1275
|
-
const i =
|
|
1275
|
+
const i = Ei(e, t.x, t.width), s = Ei(n, t.y, t.height);
|
|
1276
1276
|
return `${i} ${s}`;
|
|
1277
1277
|
}
|
|
1278
1278
|
const Wa = {
|
|
@@ -1289,7 +1289,7 @@ function Ka(t, e, n = 1, i = 0, s = !0) {
|
|
|
1289
1289
|
const r = S.transform(e), a = S.transform(n);
|
|
1290
1290
|
t[o.array] = `${r} ${a}`;
|
|
1291
1291
|
}
|
|
1292
|
-
function
|
|
1292
|
+
function Nn(t, {
|
|
1293
1293
|
attrX: e,
|
|
1294
1294
|
attrY: n,
|
|
1295
1295
|
attrScale: i,
|
|
@@ -1301,7 +1301,7 @@ function In(t, {
|
|
|
1301
1301
|
// This is object creation, which we try to avoid per-frame.
|
|
1302
1302
|
...u
|
|
1303
1303
|
}, c, h) {
|
|
1304
|
-
if (
|
|
1304
|
+
if (Bn(t, u, h), c) {
|
|
1305
1305
|
t.style.viewBox && (t.attrs.viewBox = t.style.viewBox);
|
|
1306
1306
|
return;
|
|
1307
1307
|
}
|
|
@@ -1310,13 +1310,13 @@ function In(t, {
|
|
|
1310
1310
|
d.transform && (g && (p.transform = d.transform), delete d.transform), g && (s !== void 0 || o !== void 0 || p.transform) && (p.transformOrigin = Ua(g, s !== void 0 ? s : 0.5, o !== void 0 ? o : 0.5)), e !== void 0 && (d.x = e), n !== void 0 && (d.y = n), i !== void 0 && (d.scale = i), r !== void 0 && Ka(d, r, a, l, !1);
|
|
1311
1311
|
}
|
|
1312
1312
|
const or = () => ({
|
|
1313
|
-
...
|
|
1313
|
+
...In(),
|
|
1314
1314
|
attrs: {}
|
|
1315
|
-
}),
|
|
1315
|
+
}), Un = (t) => typeof t == "string" && t.toLowerCase() === "svg";
|
|
1316
1316
|
function Ga(t, e, n, i) {
|
|
1317
1317
|
const s = Vt(() => {
|
|
1318
1318
|
const o = or();
|
|
1319
|
-
return
|
|
1319
|
+
return Nn(o, e, Un(i), t.transformTemplate), {
|
|
1320
1320
|
...o.attrs,
|
|
1321
1321
|
style: { ...o.style }
|
|
1322
1322
|
};
|
|
@@ -1329,7 +1329,7 @@ function Ga(t, e, n, i) {
|
|
|
1329
1329
|
}
|
|
1330
1330
|
function za(t = !1) {
|
|
1331
1331
|
return (n, i, s, { latestValues: o }, r) => {
|
|
1332
|
-
const l = (
|
|
1332
|
+
const l = (On(n) ? Ga : _a)(i, o, r, n), u = Na(i, typeof n == "string", t), c = n !== zs ? { ...u, ...l, ref: s } : {}, { children: h } = i, d = Vt(() => K(h) ? h.get() : h, [h]);
|
|
1333
1333
|
return Yo(n, {
|
|
1334
1334
|
...c,
|
|
1335
1335
|
children: d
|
|
@@ -1369,9 +1369,9 @@ const lr = /* @__PURE__ */ new Set([
|
|
|
1369
1369
|
function ur(t, e, n, i) {
|
|
1370
1370
|
ar(t, e, void 0, i);
|
|
1371
1371
|
for (const s in e.attrs)
|
|
1372
|
-
t.setAttribute(lr.has(s) ? s :
|
|
1372
|
+
t.setAttribute(lr.has(s) ? s : Oe(s), e.attrs[s]);
|
|
1373
1373
|
}
|
|
1374
|
-
function
|
|
1374
|
+
function Wn(t, e, n) {
|
|
1375
1375
|
var i;
|
|
1376
1376
|
const { style: s } = t, o = {};
|
|
1377
1377
|
for (const r in s)
|
|
@@ -1379,7 +1379,7 @@ function Un(t, e, n) {
|
|
|
1379
1379
|
return n && s && typeof s.willChange == "string" && (n.applyWillChange = !1), o;
|
|
1380
1380
|
}
|
|
1381
1381
|
function cr(t, e, n) {
|
|
1382
|
-
const i =
|
|
1382
|
+
const i = Wn(t, e, n);
|
|
1383
1383
|
for (const s in t)
|
|
1384
1384
|
if (K(t[s]) || K(e[s])) {
|
|
1385
1385
|
const o = he.indexOf(s) !== -1 ? "attr" + s.charAt(0).toUpperCase() + s.substring(1) : s;
|
|
@@ -1387,28 +1387,28 @@ function cr(t, e, n) {
|
|
|
1387
1387
|
}
|
|
1388
1388
|
return i;
|
|
1389
1389
|
}
|
|
1390
|
-
function
|
|
1390
|
+
function Di(t) {
|
|
1391
1391
|
const e = [{}, {}];
|
|
1392
1392
|
return t == null || t.values.forEach((n, i) => {
|
|
1393
1393
|
e[0][i] = n.get(), e[1][i] = n.getVelocity();
|
|
1394
1394
|
}), e;
|
|
1395
1395
|
}
|
|
1396
|
-
function
|
|
1396
|
+
function $n(t, e, n, i) {
|
|
1397
1397
|
if (typeof e == "function") {
|
|
1398
|
-
const [s, o] =
|
|
1398
|
+
const [s, o] = Di(i);
|
|
1399
1399
|
e = e(n !== void 0 ? n : t.custom, s, o);
|
|
1400
1400
|
}
|
|
1401
1401
|
if (typeof e == "string" && (e = t.variants && t.variants[e]), typeof e == "function") {
|
|
1402
|
-
const [s, o] =
|
|
1402
|
+
const [s, o] = Di(i);
|
|
1403
1403
|
e = e(n !== void 0 ? n : t.custom, s, o);
|
|
1404
1404
|
}
|
|
1405
1405
|
return e;
|
|
1406
1406
|
}
|
|
1407
|
-
function
|
|
1407
|
+
function Kn(t) {
|
|
1408
1408
|
const e = it(null);
|
|
1409
1409
|
return e.current === null && (e.current = t()), e.current;
|
|
1410
1410
|
}
|
|
1411
|
-
const
|
|
1411
|
+
const fn = (t) => Array.isArray(t), Ha = (t) => !!(t && typeof t == "object" && t.mix && t.toValue), Ya = (t) => fn(t) ? t[t.length - 1] || 0 : t;
|
|
1412
1412
|
function we(t) {
|
|
1413
1413
|
const e = K(t) ? t.get() : t;
|
|
1414
1414
|
return Ha(e) ? e.toValue() : e;
|
|
@@ -1426,12 +1426,12 @@ function fr(t) {
|
|
|
1426
1426
|
if (Pt.has(t))
|
|
1427
1427
|
return "transform";
|
|
1428
1428
|
if (hr.has(t))
|
|
1429
|
-
return
|
|
1429
|
+
return Oe(t);
|
|
1430
1430
|
}
|
|
1431
|
-
function
|
|
1431
|
+
function _e(t, e) {
|
|
1432
1432
|
t.indexOf(e) === -1 && t.push(e);
|
|
1433
1433
|
}
|
|
1434
|
-
function
|
|
1434
|
+
function Be(t, e) {
|
|
1435
1435
|
const n = t.indexOf(e);
|
|
1436
1436
|
n > -1 && t.splice(n, 1);
|
|
1437
1437
|
}
|
|
@@ -1443,17 +1443,17 @@ function Xa({ applyWillChange: t = !1, scrapeMotionValuesFromProps: e, createRen
|
|
|
1443
1443
|
return i && (l.mount = (u) => i(s, u, l)), l;
|
|
1444
1444
|
}
|
|
1445
1445
|
const dr = (t) => (e, n) => {
|
|
1446
|
-
const i = U(
|
|
1447
|
-
return n ? o() :
|
|
1446
|
+
const i = U(Le), s = U(je), o = () => Xa(t, e, i, s, n);
|
|
1447
|
+
return n ? o() : Kn(o);
|
|
1448
1448
|
};
|
|
1449
1449
|
function qa(t, e) {
|
|
1450
1450
|
const n = fr(e);
|
|
1451
|
-
n &&
|
|
1451
|
+
n && _e(t, n);
|
|
1452
1452
|
}
|
|
1453
|
-
function
|
|
1453
|
+
function Mi(t, e, n) {
|
|
1454
1454
|
const i = Array.isArray(e) ? e : [e];
|
|
1455
1455
|
for (let s = 0; s < i.length; s++) {
|
|
1456
|
-
const o =
|
|
1456
|
+
const o = $n(t, i[s]);
|
|
1457
1457
|
if (o) {
|
|
1458
1458
|
const { transitionEnd: r, transition: a, ...l } = o;
|
|
1459
1459
|
n(l, r);
|
|
@@ -1466,28 +1466,28 @@ function Za(t, e, n, i, s) {
|
|
|
1466
1466
|
for (const b in u)
|
|
1467
1467
|
r[b] = we(u[b]);
|
|
1468
1468
|
let { initial: c, animate: h } = t;
|
|
1469
|
-
const d =
|
|
1469
|
+
const d = Fe(t), p = Qs(t);
|
|
1470
1470
|
e && p && !d && t.inherit !== !1 && (c === void 0 && (c = e.initial), h === void 0 && (h = e.animate));
|
|
1471
1471
|
let g = n ? n.initial === !1 : !1;
|
|
1472
1472
|
g = g || c === !1;
|
|
1473
1473
|
const P = g ? h : c;
|
|
1474
|
-
return P && typeof P != "boolean" && !se(P) &&
|
|
1474
|
+
return P && typeof P != "boolean" && !se(P) && Mi(t, P, (b, x) => {
|
|
1475
1475
|
for (const y in b) {
|
|
1476
1476
|
let v = b[y];
|
|
1477
1477
|
if (Array.isArray(v)) {
|
|
1478
|
-
const
|
|
1479
|
-
v = v[
|
|
1478
|
+
const C = g ? v.length - 1 : 0;
|
|
1479
|
+
v = v[C];
|
|
1480
1480
|
}
|
|
1481
1481
|
v !== null && (r[y] = v);
|
|
1482
1482
|
}
|
|
1483
1483
|
for (const y in x)
|
|
1484
1484
|
r[y] = x[y];
|
|
1485
|
-
}), l && (h && c !== !1 && !se(h) &&
|
|
1485
|
+
}), l && (h && c !== !1 && !se(h) && Mi(t, h, (b) => {
|
|
1486
1486
|
for (const x in b)
|
|
1487
1487
|
qa(a, x);
|
|
1488
1488
|
}), a.length && (r.willChange = a.join(","))), r;
|
|
1489
1489
|
}
|
|
1490
|
-
const { schedule: M, cancel: ht, state: N, steps:
|
|
1490
|
+
const { schedule: M, cancel: ht, state: N, steps: Ze } = qs(typeof requestAnimationFrame < "u" ? requestAnimationFrame : W, !0), Ja = {
|
|
1491
1491
|
useVisualState: dr({
|
|
1492
1492
|
scrapeMotionValuesFromProps: cr,
|
|
1493
1493
|
createRenderState: or,
|
|
@@ -1504,20 +1504,20 @@ const { schedule: M, cancel: ht, state: N, steps: qe } = qs(typeof requestAnimat
|
|
|
1504
1504
|
};
|
|
1505
1505
|
}
|
|
1506
1506
|
}), M.render(() => {
|
|
1507
|
-
|
|
1507
|
+
Nn(n, i, Un(e.tagName), t.transformTemplate), ur(e, n);
|
|
1508
1508
|
});
|
|
1509
1509
|
}
|
|
1510
1510
|
})
|
|
1511
1511
|
}, Qa = {
|
|
1512
1512
|
useVisualState: dr({
|
|
1513
1513
|
applyWillChange: !0,
|
|
1514
|
-
scrapeMotionValuesFromProps:
|
|
1515
|
-
createRenderState:
|
|
1514
|
+
scrapeMotionValuesFromProps: Wn,
|
|
1515
|
+
createRenderState: In
|
|
1516
1516
|
})
|
|
1517
1517
|
};
|
|
1518
1518
|
function tl(t, { forwardMotionProps: e = !1 }, n, i) {
|
|
1519
1519
|
return {
|
|
1520
|
-
...
|
|
1520
|
+
...On(t) ? Ja : Qa,
|
|
1521
1521
|
preloadedFeatures: n,
|
|
1522
1522
|
useRender: za(e),
|
|
1523
1523
|
createVisualElement: i,
|
|
@@ -1528,7 +1528,7 @@ function rt(t, e, n, i = { passive: !0 }) {
|
|
|
1528
1528
|
return t.addEventListener(e, n, i), () => t.removeEventListener(e, n);
|
|
1529
1529
|
}
|
|
1530
1530
|
const pr = (t) => t.pointerType === "mouse" ? typeof t.button != "number" || t.button <= 0 : t.isPrimary !== !1;
|
|
1531
|
-
function
|
|
1531
|
+
function Ie(t, e = "page") {
|
|
1532
1532
|
return {
|
|
1533
1533
|
point: {
|
|
1534
1534
|
x: t[`${e}X`],
|
|
@@ -1536,7 +1536,7 @@ function Be(t, e = "page") {
|
|
|
1536
1536
|
}
|
|
1537
1537
|
};
|
|
1538
1538
|
}
|
|
1539
|
-
const el = (t) => (e) => pr(e) && t(e,
|
|
1539
|
+
const el = (t) => (e) => pr(e) && t(e, Ie(e));
|
|
1540
1540
|
function ot(t, e, n, i) {
|
|
1541
1541
|
return rt(t, e, el(n), i);
|
|
1542
1542
|
}
|
|
@@ -1550,15 +1550,15 @@ function mr(t) {
|
|
|
1550
1550
|
return e === null ? (e = t, n) : !1;
|
|
1551
1551
|
};
|
|
1552
1552
|
}
|
|
1553
|
-
const
|
|
1553
|
+
const ki = mr("dragHorizontal"), Li = mr("dragVertical");
|
|
1554
1554
|
function gr(t) {
|
|
1555
1555
|
let e = !1;
|
|
1556
1556
|
if (t === "y")
|
|
1557
|
-
e =
|
|
1557
|
+
e = Li();
|
|
1558
1558
|
else if (t === "x")
|
|
1559
|
-
e =
|
|
1559
|
+
e = ki();
|
|
1560
1560
|
else {
|
|
1561
|
-
const n =
|
|
1561
|
+
const n = ki(), i = Li();
|
|
1562
1562
|
n && i ? e = () => {
|
|
1563
1563
|
n(), i();
|
|
1564
1564
|
} : (n && n(), i && i());
|
|
@@ -1576,7 +1576,7 @@ class xt {
|
|
|
1576
1576
|
update() {
|
|
1577
1577
|
}
|
|
1578
1578
|
}
|
|
1579
|
-
function
|
|
1579
|
+
function ji(t, e) {
|
|
1580
1580
|
const n = e ? "pointerenter" : "pointerleave", i = e ? "onHoverStart" : "onHoverEnd", s = (o, r) => {
|
|
1581
1581
|
if (o.pointerType === "touch" || yr())
|
|
1582
1582
|
return;
|
|
@@ -1591,7 +1591,7 @@ function Li(t, e) {
|
|
|
1591
1591
|
}
|
|
1592
1592
|
class il extends xt {
|
|
1593
1593
|
mount() {
|
|
1594
|
-
this.unmount = at(
|
|
1594
|
+
this.unmount = at(ji(this.node, !0), ji(this.node, !1));
|
|
1595
1595
|
}
|
|
1596
1596
|
unmount() {
|
|
1597
1597
|
}
|
|
@@ -1619,11 +1619,11 @@ class sl extends xt {
|
|
|
1619
1619
|
}
|
|
1620
1620
|
}
|
|
1621
1621
|
const vr = (t, e) => e ? t === e ? !0 : vr(t, e.parentElement) : !1;
|
|
1622
|
-
function
|
|
1622
|
+
function Je(t, e) {
|
|
1623
1623
|
if (!e)
|
|
1624
1624
|
return;
|
|
1625
1625
|
const n = new PointerEvent("pointer" + t);
|
|
1626
|
-
e(n,
|
|
1626
|
+
e(n, Ie(n));
|
|
1627
1627
|
}
|
|
1628
1628
|
class rl extends xt {
|
|
1629
1629
|
constructor() {
|
|
@@ -1647,16 +1647,16 @@ class rl extends xt {
|
|
|
1647
1647
|
if (o.key !== "Enter" || this.isPressing)
|
|
1648
1648
|
return;
|
|
1649
1649
|
const r = (a) => {
|
|
1650
|
-
a.key !== "Enter" || !this.checkPressEnd() ||
|
|
1650
|
+
a.key !== "Enter" || !this.checkPressEnd() || Je("up", (l, u) => {
|
|
1651
1651
|
const { onTap: c } = this.node.getProps();
|
|
1652
1652
|
c && M.postRender(() => c(l, u));
|
|
1653
1653
|
});
|
|
1654
1654
|
};
|
|
1655
|
-
this.removeEndListeners(), this.removeEndListeners = rt(this.node.current, "keyup", r),
|
|
1655
|
+
this.removeEndListeners(), this.removeEndListeners = rt(this.node.current, "keyup", r), Je("down", (a, l) => {
|
|
1656
1656
|
this.startPress(a, l);
|
|
1657
1657
|
});
|
|
1658
1658
|
}, n = rt(this.node.current, "keydown", e), i = () => {
|
|
1659
|
-
this.isPressing &&
|
|
1659
|
+
this.isPressing && Je("cancel", (o, r) => this.cancelPress(o, r));
|
|
1660
1660
|
}, s = rt(this.node.current, "blur", i);
|
|
1661
1661
|
this.removeAccessibleListeners = at(n, s);
|
|
1662
1662
|
};
|
|
@@ -1685,22 +1685,22 @@ class rl extends xt {
|
|
|
1685
1685
|
this.removeStartListeners(), this.removeEndListeners(), this.removeAccessibleListeners();
|
|
1686
1686
|
}
|
|
1687
1687
|
}
|
|
1688
|
-
const
|
|
1689
|
-
const e =
|
|
1688
|
+
const dn = /* @__PURE__ */ new WeakMap(), Qe = /* @__PURE__ */ new WeakMap(), ol = (t) => {
|
|
1689
|
+
const e = dn.get(t.target);
|
|
1690
1690
|
e && e(t);
|
|
1691
1691
|
}, al = (t) => {
|
|
1692
1692
|
t.forEach(ol);
|
|
1693
1693
|
};
|
|
1694
1694
|
function ll({ root: t, ...e }) {
|
|
1695
1695
|
const n = t || document;
|
|
1696
|
-
|
|
1697
|
-
const i =
|
|
1696
|
+
Qe.has(n) || Qe.set(n, {});
|
|
1697
|
+
const i = Qe.get(n), s = JSON.stringify(e);
|
|
1698
1698
|
return i[s] || (i[s] = new IntersectionObserver(al, { root: t, ...e })), i[s];
|
|
1699
1699
|
}
|
|
1700
1700
|
function ul(t, e, n) {
|
|
1701
1701
|
const i = ll(e);
|
|
1702
|
-
return
|
|
1703
|
-
|
|
1702
|
+
return dn.set(t, n), i.observe(t), () => {
|
|
1703
|
+
dn.delete(t), i.unobserve(t);
|
|
1704
1704
|
};
|
|
1705
1705
|
}
|
|
1706
1706
|
const cl = {
|
|
@@ -1767,9 +1767,9 @@ function Pr(t, e) {
|
|
|
1767
1767
|
return !1;
|
|
1768
1768
|
return !0;
|
|
1769
1769
|
}
|
|
1770
|
-
function
|
|
1770
|
+
function Ne(t, e, n) {
|
|
1771
1771
|
const i = t.getProps();
|
|
1772
|
-
return
|
|
1772
|
+
return $n(i, e, n !== void 0 ? n : i.custom, t);
|
|
1773
1773
|
}
|
|
1774
1774
|
const lt = (t) => t * 1e3, ut = (t) => t / 1e3, pl = {
|
|
1775
1775
|
type: "spring",
|
|
@@ -1792,11 +1792,11 @@ const lt = (t) => t * 1e3, ut = (t) => t / 1e3, pl = {
|
|
|
1792
1792
|
function Pl({ when: t, delay: e, delayChildren: n, staggerChildren: i, staggerDirection: s, repeat: o, repeatType: r, repeatDelay: a, from: l, elapsed: u, ...c }) {
|
|
1793
1793
|
return !!Object.keys(c).length;
|
|
1794
1794
|
}
|
|
1795
|
-
function
|
|
1795
|
+
function Gn(t, e) {
|
|
1796
1796
|
return t[e] || t.default || t;
|
|
1797
1797
|
}
|
|
1798
1798
|
const xl = (t) => t !== null;
|
|
1799
|
-
function
|
|
1799
|
+
function Ue(t, { repeat: e, repeatType: n = "loop" }, i) {
|
|
1800
1800
|
const s = t.filter(xl), o = e && n !== "loop" && e % 2 === 1 ? 0 : s.length - 1;
|
|
1801
1801
|
return !o || i === void 0 ? s[o] : i;
|
|
1802
1802
|
}
|
|
@@ -1824,9 +1824,9 @@ function Sl(t) {
|
|
|
1824
1824
|
const [, n, i, s] = e;
|
|
1825
1825
|
return [`--${n ?? i}`, s];
|
|
1826
1826
|
}
|
|
1827
|
-
const
|
|
1827
|
+
const Cl = 4;
|
|
1828
1828
|
function br(t, e, n = 1) {
|
|
1829
|
-
ct(n <=
|
|
1829
|
+
ct(n <= Cl, `Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);
|
|
1830
1830
|
const [i, s] = Sl(t);
|
|
1831
1831
|
if (!i)
|
|
1832
1832
|
return;
|
|
@@ -1835,9 +1835,9 @@ function br(t, e, n = 1) {
|
|
|
1835
1835
|
const r = o.trim();
|
|
1836
1836
|
return Tr(r) ? parseFloat(r) : r;
|
|
1837
1837
|
}
|
|
1838
|
-
return
|
|
1838
|
+
return Fn(s) ? br(s, e, n + 1) : s;
|
|
1839
1839
|
}
|
|
1840
|
-
const
|
|
1840
|
+
const Al = /* @__PURE__ */ new Set([
|
|
1841
1841
|
"width",
|
|
1842
1842
|
"height",
|
|
1843
1843
|
"top",
|
|
@@ -1848,15 +1848,15 @@ const Cl = /* @__PURE__ */ new Set([
|
|
|
1848
1848
|
"y",
|
|
1849
1849
|
"translateX",
|
|
1850
1850
|
"translateY"
|
|
1851
|
-
]),
|
|
1851
|
+
]), Oi = (t) => t === $t || t === S, Fi = (t, e) => parseFloat(t.split(", ")[e]), _i = (t, e) => (n, { transform: i }) => {
|
|
1852
1852
|
if (i === "none" || !i)
|
|
1853
1853
|
return 0;
|
|
1854
1854
|
const s = i.match(/^matrix3d\((.+)\)$/u);
|
|
1855
1855
|
if (s)
|
|
1856
|
-
return
|
|
1856
|
+
return Fi(s[1], e);
|
|
1857
1857
|
{
|
|
1858
1858
|
const o = i.match(/^matrix\((.+)\)$/u);
|
|
1859
|
-
return o ?
|
|
1859
|
+
return o ? Fi(o[1], t) : 0;
|
|
1860
1860
|
}
|
|
1861
1861
|
}, Rl = /* @__PURE__ */ new Set(["x", "y", "z"]), Vl = he.filter((t) => !Rl.has(t));
|
|
1862
1862
|
function El(t) {
|
|
@@ -1875,18 +1875,18 @@ const Ut = {
|
|
|
1875
1875
|
bottom: ({ y: t }, { top: e }) => parseFloat(e) + (t.max - t.min),
|
|
1876
1876
|
right: ({ x: t }, { left: e }) => parseFloat(e) + (t.max - t.min),
|
|
1877
1877
|
// Transform
|
|
1878
|
-
x:
|
|
1879
|
-
y:
|
|
1878
|
+
x: _i(4, 13),
|
|
1879
|
+
y: _i(5, 14)
|
|
1880
1880
|
};
|
|
1881
1881
|
Ut.translateX = Ut.x;
|
|
1882
1882
|
Ut.translateY = Ut.y;
|
|
1883
1883
|
const wr = (t) => (e) => e.test(t), Dl = {
|
|
1884
1884
|
test: (t) => t === "auto",
|
|
1885
1885
|
parse: (t) => t
|
|
1886
|
-
}, Sr = [$t, S, st, dt, ja, La, Dl],
|
|
1887
|
-
let
|
|
1888
|
-
function
|
|
1889
|
-
if (
|
|
1886
|
+
}, Sr = [$t, S, st, dt, ja, La, Dl], Bi = (t) => Sr.find(wr(t)), Rt = /* @__PURE__ */ new Set();
|
|
1887
|
+
let pn = !1, mn = !1;
|
|
1888
|
+
function Cr() {
|
|
1889
|
+
if (mn) {
|
|
1890
1890
|
const t = Array.from(Rt).filter((i) => i.needsMeasurement), e = new Set(t.map((i) => i.element)), n = /* @__PURE__ */ new Map();
|
|
1891
1891
|
e.forEach((i) => {
|
|
1892
1892
|
const s = El(i);
|
|
@@ -1902,22 +1902,22 @@ function Ar() {
|
|
|
1902
1902
|
i.suspendedScrollY !== void 0 && window.scrollTo(0, i.suspendedScrollY);
|
|
1903
1903
|
});
|
|
1904
1904
|
}
|
|
1905
|
-
|
|
1905
|
+
mn = !1, pn = !1, Rt.forEach((t) => t.complete()), Rt.clear();
|
|
1906
1906
|
}
|
|
1907
|
-
function
|
|
1907
|
+
function Ar() {
|
|
1908
1908
|
Rt.forEach((t) => {
|
|
1909
|
-
t.readKeyframes(), t.needsMeasurement && (
|
|
1909
|
+
t.readKeyframes(), t.needsMeasurement && (mn = !0);
|
|
1910
1910
|
});
|
|
1911
1911
|
}
|
|
1912
1912
|
function Ml() {
|
|
1913
|
-
|
|
1913
|
+
Ar(), Cr();
|
|
1914
1914
|
}
|
|
1915
|
-
class
|
|
1915
|
+
class zn {
|
|
1916
1916
|
constructor(e, n, i, s, o, r = !1) {
|
|
1917
1917
|
this.isComplete = !1, this.isAsync = !1, this.needsMeasurement = !1, this.isScheduled = !1, this.unresolvedKeyframes = [...e], this.onComplete = n, this.name = i, this.motionValue = s, this.element = o, this.isAsync = r;
|
|
1918
1918
|
}
|
|
1919
1919
|
scheduleResolve() {
|
|
1920
|
-
this.isScheduled = !0, this.isAsync ? (Rt.add(this),
|
|
1920
|
+
this.isScheduled = !0, this.isAsync ? (Rt.add(this), pn || (pn = !0, M.read(Ar), M.resolveKeyframes(Cr))) : (this.readKeyframes(), this.complete());
|
|
1921
1921
|
}
|
|
1922
1922
|
readKeyframes() {
|
|
1923
1923
|
const { unresolvedKeyframes: e, name: n, element: i, motionValue: s } = this;
|
|
@@ -1953,23 +1953,23 @@ class Gn {
|
|
|
1953
1953
|
this.isComplete || this.scheduleResolve();
|
|
1954
1954
|
}
|
|
1955
1955
|
}
|
|
1956
|
-
const
|
|
1956
|
+
const Hn = (t, e) => (n) => !!(fe(n) && Ma.test(n) && n.startsWith(t) || e && !ka(n) && Object.prototype.hasOwnProperty.call(n, e)), Rr = (t, e, n) => (i) => {
|
|
1957
1957
|
if (!fe(i))
|
|
1958
1958
|
return i;
|
|
1959
|
-
const [s, o, r, a] = i.match(
|
|
1959
|
+
const [s, o, r, a] = i.match(_n);
|
|
1960
1960
|
return {
|
|
1961
1961
|
[t]: parseFloat(s),
|
|
1962
1962
|
[e]: parseFloat(o),
|
|
1963
1963
|
[n]: parseFloat(r),
|
|
1964
1964
|
alpha: a !== void 0 ? parseFloat(a) : 1
|
|
1965
1965
|
};
|
|
1966
|
-
}, kl = (t) => yt(0, 255, t),
|
|
1966
|
+
}, kl = (t) => yt(0, 255, t), tn = {
|
|
1967
1967
|
...$t,
|
|
1968
1968
|
transform: (t) => Math.round(kl(t))
|
|
1969
|
-
},
|
|
1970
|
-
test:
|
|
1969
|
+
}, At = {
|
|
1970
|
+
test: Hn("rgb", "red"),
|
|
1971
1971
|
parse: Rr("red", "green", "blue"),
|
|
1972
|
-
transform: ({ red: t, green: e, blue: n, alpha: i = 1 }) => "rgba(" +
|
|
1972
|
+
transform: ({ red: t, green: e, blue: n, alpha: i = 1 }) => "rgba(" + tn.transform(t) + ", " + tn.transform(e) + ", " + tn.transform(n) + ", " + te(Qt.transform(i)) + ")"
|
|
1973
1973
|
};
|
|
1974
1974
|
function Ll(t) {
|
|
1975
1975
|
let e = "", n = "", i = "", s = "";
|
|
@@ -1980,24 +1980,24 @@ function Ll(t) {
|
|
|
1980
1980
|
alpha: s ? parseInt(s, 16) / 255 : 1
|
|
1981
1981
|
};
|
|
1982
1982
|
}
|
|
1983
|
-
const
|
|
1984
|
-
test:
|
|
1983
|
+
const gn = {
|
|
1984
|
+
test: Hn("#"),
|
|
1985
1985
|
parse: Ll,
|
|
1986
|
-
transform:
|
|
1986
|
+
transform: At.transform
|
|
1987
1987
|
}, Ft = {
|
|
1988
|
-
test:
|
|
1988
|
+
test: Hn("hsl", "hue"),
|
|
1989
1989
|
parse: Rr("hue", "saturation", "lightness"),
|
|
1990
1990
|
transform: ({ hue: t, saturation: e, lightness: n, alpha: i = 1 }) => "hsla(" + Math.round(t) + ", " + st.transform(te(e)) + ", " + st.transform(te(n)) + ", " + te(Qt.transform(i)) + ")"
|
|
1991
1991
|
}, $ = {
|
|
1992
|
-
test: (t) =>
|
|
1993
|
-
parse: (t) =>
|
|
1994
|
-
transform: (t) => fe(t) ? t : t.hasOwnProperty("red") ?
|
|
1992
|
+
test: (t) => At.test(t) || gn.test(t) || Ft.test(t),
|
|
1993
|
+
parse: (t) => At.test(t) ? At.parse(t) : Ft.test(t) ? Ft.parse(t) : gn.parse(t),
|
|
1994
|
+
transform: (t) => fe(t) ? t : t.hasOwnProperty("red") ? At.transform(t) : Ft.transform(t)
|
|
1995
1995
|
};
|
|
1996
1996
|
function jl(t) {
|
|
1997
1997
|
var e, n;
|
|
1998
|
-
return isNaN(t) && fe(t) && (((e = t.match(
|
|
1998
|
+
return isNaN(t) && fe(t) && (((e = t.match(_n)) === null || e === void 0 ? void 0 : e.length) || 0) + (((n = t.match(Da)) === null || n === void 0 ? void 0 : n.length) || 0) > 0;
|
|
1999
1999
|
}
|
|
2000
|
-
const Vr = "number", Er = "color", Ol = "var", Fl = "var(",
|
|
2000
|
+
const Vr = "number", Er = "color", Ol = "var", Fl = "var(", Ii = "${}", _l = /var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;
|
|
2001
2001
|
function re(t) {
|
|
2002
2002
|
const e = t.toString(), n = [], i = {
|
|
2003
2003
|
color: [],
|
|
@@ -2005,7 +2005,7 @@ function re(t) {
|
|
|
2005
2005
|
var: []
|
|
2006
2006
|
}, s = [];
|
|
2007
2007
|
let o = 0;
|
|
2008
|
-
const a = e.replace(_l, (l) => ($.test(l) ? (i.color.push(o), s.push(Er), n.push($.parse(l))) : l.startsWith(Fl) ? (i.var.push(o), s.push(Ol), n.push(l)) : (i.number.push(o), s.push(Vr), n.push(parseFloat(l))), ++o,
|
|
2008
|
+
const a = e.replace(_l, (l) => ($.test(l) ? (i.color.push(o), s.push(Er), n.push($.parse(l))) : l.startsWith(Fl) ? (i.var.push(o), s.push(Ol), n.push(l)) : (i.number.push(o), s.push(Vr), n.push(parseFloat(l))), ++o, Ii)).split(Ii);
|
|
2009
2009
|
return { values: n, split: a, indexes: i, types: s };
|
|
2010
2010
|
}
|
|
2011
2011
|
function Dr(t) {
|
|
@@ -2038,14 +2038,14 @@ function Ul(t) {
|
|
|
2038
2038
|
const [e, n] = t.slice(0, -1).split("(");
|
|
2039
2039
|
if (e === "drop-shadow")
|
|
2040
2040
|
return t;
|
|
2041
|
-
const [i] = n.match(
|
|
2041
|
+
const [i] = n.match(_n) || [];
|
|
2042
2042
|
if (!i)
|
|
2043
2043
|
return t;
|
|
2044
2044
|
const s = n.replace(i, "");
|
|
2045
2045
|
let o = Nl.has(e) ? 1 : 0;
|
|
2046
2046
|
return i !== n && (o *= 100), e + "(" + o + s + ")";
|
|
2047
2047
|
}
|
|
2048
|
-
const Wl = /\b([a-z-]*)\(.*?\)/gu,
|
|
2048
|
+
const Wl = /\b([a-z-]*)\(.*?\)/gu, yn = {
|
|
2049
2049
|
...vt,
|
|
2050
2050
|
getAnimatableNone: (t) => {
|
|
2051
2051
|
const e = t.match(Wl);
|
|
@@ -2065,12 +2065,12 @@ const Wl = /\b([a-z-]*)\(.*?\)/gu, gn = {
|
|
|
2065
2065
|
borderRightColor: $,
|
|
2066
2066
|
borderBottomColor: $,
|
|
2067
2067
|
borderLeftColor: $,
|
|
2068
|
-
filter:
|
|
2069
|
-
WebkitFilter:
|
|
2070
|
-
},
|
|
2068
|
+
filter: yn,
|
|
2069
|
+
WebkitFilter: yn
|
|
2070
|
+
}, Yn = (t) => $l[t];
|
|
2071
2071
|
function kr(t, e) {
|
|
2072
|
-
let n =
|
|
2073
|
-
return n !==
|
|
2072
|
+
let n = Yn(t);
|
|
2073
|
+
return n !== yn && (n = vt), n.getAnimatableNone ? n.getAnimatableNone(e) : void 0;
|
|
2074
2074
|
}
|
|
2075
2075
|
const Kl = /* @__PURE__ */ new Set(["auto", "none", "0"]);
|
|
2076
2076
|
function Gl(t, e, n) {
|
|
@@ -2083,7 +2083,7 @@ function Gl(t, e, n) {
|
|
|
2083
2083
|
for (const o of e)
|
|
2084
2084
|
t[o] = kr(n, s);
|
|
2085
2085
|
}
|
|
2086
|
-
class Lr extends
|
|
2086
|
+
class Lr extends zn {
|
|
2087
2087
|
constructor(e, n, i, s) {
|
|
2088
2088
|
super(e, n, i, s, s == null ? void 0 : s.owner, !0);
|
|
2089
2089
|
}
|
|
@@ -2094,16 +2094,16 @@ class Lr extends Gn {
|
|
|
2094
2094
|
super.readKeyframes();
|
|
2095
2095
|
for (let l = 0; l < e.length; l++) {
|
|
2096
2096
|
let u = e[l];
|
|
2097
|
-
if (typeof u == "string" && (u = u.trim(),
|
|
2097
|
+
if (typeof u == "string" && (u = u.trim(), Fn(u))) {
|
|
2098
2098
|
const c = br(u, n.current);
|
|
2099
2099
|
c !== void 0 && (e[l] = c), l === e.length - 1 && (this.finalKeyframe = u);
|
|
2100
2100
|
}
|
|
2101
2101
|
}
|
|
2102
|
-
if (this.resolveNoneKeyframes(), !
|
|
2102
|
+
if (this.resolveNoneKeyframes(), !Al.has(i) || e.length !== 2)
|
|
2103
2103
|
return;
|
|
2104
|
-
const [s, o] = e, r =
|
|
2104
|
+
const [s, o] = e, r = Bi(s), a = Bi(o);
|
|
2105
2105
|
if (r !== a)
|
|
2106
|
-
if (
|
|
2106
|
+
if (Oi(r) && Oi(a))
|
|
2107
2107
|
for (let l = 0; l < e.length; l++) {
|
|
2108
2108
|
const u = e[l];
|
|
2109
2109
|
typeof u == "string" && (e[l] = parseFloat(u));
|
|
@@ -2142,7 +2142,7 @@ function jr(t) {
|
|
|
2142
2142
|
let e;
|
|
2143
2143
|
return () => (e === void 0 && (e = t()), e);
|
|
2144
2144
|
}
|
|
2145
|
-
const
|
|
2145
|
+
const Ni = (t, e) => e === "zIndex" ? !1 : !!(typeof t == "number" || Array.isArray(t) || typeof t == "string" && // It's animatable if we have a string
|
|
2146
2146
|
(vt.test(t) || t === "0") && // And it contains numbers and/or colors
|
|
2147
2147
|
!t.startsWith("url("));
|
|
2148
2148
|
function zl(t) {
|
|
@@ -2159,7 +2159,7 @@ function Hl(t, e, n, i) {
|
|
|
2159
2159
|
return !1;
|
|
2160
2160
|
if (e === "display" || e === "visibility")
|
|
2161
2161
|
return !0;
|
|
2162
|
-
const o = t[t.length - 1], r =
|
|
2162
|
+
const o = t[t.length - 1], r = Ni(s, e), a = Ni(o, e);
|
|
2163
2163
|
return Wt(r === a, `You are trying to animate ${e} from "${s}" to "${o}". ${s} is not an animatable value - to enable this animation set ${s} to a value animatable to ${o} via the \`style\` property.`), !r || !a ? !1 : zl(t) || n === "spring" && i;
|
|
2164
2164
|
}
|
|
2165
2165
|
class Or {
|
|
@@ -2194,7 +2194,7 @@ class Or {
|
|
|
2194
2194
|
if (r)
|
|
2195
2195
|
this.options.duration = 0;
|
|
2196
2196
|
else {
|
|
2197
|
-
l == null || l(
|
|
2197
|
+
l == null || l(Ue(e, this.options, n)), a == null || a(), this.resolveFinishedPromise();
|
|
2198
2198
|
return;
|
|
2199
2199
|
}
|
|
2200
2200
|
const c = this.initPlayback(e, n);
|
|
@@ -2228,20 +2228,20 @@ function _r(t, e, n) {
|
|
|
2228
2228
|
const i = Math.max(e - Yl, 0);
|
|
2229
2229
|
return Fr(n - t(i), e - i);
|
|
2230
2230
|
}
|
|
2231
|
-
const
|
|
2231
|
+
const en = 1e-3, Xl = 0.01, Ui = 10, ql = 0.05, Zl = 1;
|
|
2232
2232
|
function Jl({ duration: t = 800, bounce: e = 0.25, velocity: n = 0, mass: i = 1 }) {
|
|
2233
2233
|
let s, o;
|
|
2234
|
-
Wt(t <= lt(
|
|
2234
|
+
Wt(t <= lt(Ui), "Spring duration must be 10 seconds or less");
|
|
2235
2235
|
let r = 1 - e;
|
|
2236
|
-
r = yt(ql, Zl, r), t = yt(Xl,
|
|
2237
|
-
const c = u * r, h = c * t, d = c - n, p =
|
|
2238
|
-
return
|
|
2236
|
+
r = yt(ql, Zl, r), t = yt(Xl, Ui, ut(t)), r < 1 ? (s = (u) => {
|
|
2237
|
+
const c = u * r, h = c * t, d = c - n, p = vn(u, r), g = Math.exp(-h);
|
|
2238
|
+
return en - d / p * g;
|
|
2239
2239
|
}, o = (u) => {
|
|
2240
|
-
const h = u * r * t, d = h * n + n, p = Math.pow(r, 2) * Math.pow(u, 2) * t, g = Math.exp(-h), P =
|
|
2241
|
-
return (-s(u) +
|
|
2240
|
+
const h = u * r * t, d = h * n + n, p = Math.pow(r, 2) * Math.pow(u, 2) * t, g = Math.exp(-h), P = vn(Math.pow(u, 2), r);
|
|
2241
|
+
return (-s(u) + en > 0 ? -1 : 1) * ((d - p) * g) / P;
|
|
2242
2242
|
}) : (s = (u) => {
|
|
2243
2243
|
const c = Math.exp(-u * t), h = (u - n) * t + 1;
|
|
2244
|
-
return -
|
|
2244
|
+
return -en + c * h;
|
|
2245
2245
|
}, o = (u) => {
|
|
2246
2246
|
const c = Math.exp(-u * t), h = (n - u) * (t * t);
|
|
2247
2247
|
return c * h;
|
|
@@ -2269,11 +2269,11 @@ function tu(t, e, n) {
|
|
|
2269
2269
|
i = i - t(i) / e(i);
|
|
2270
2270
|
return i;
|
|
2271
2271
|
}
|
|
2272
|
-
function
|
|
2272
|
+
function vn(t, e) {
|
|
2273
2273
|
return t * Math.sqrt(1 - e * e);
|
|
2274
2274
|
}
|
|
2275
2275
|
const eu = ["duration", "bounce"], nu = ["stiffness", "damping", "mass"];
|
|
2276
|
-
function
|
|
2276
|
+
function Wi(t, e) {
|
|
2277
2277
|
return e.some((n) => t[n] !== void 0);
|
|
2278
2278
|
}
|
|
2279
2279
|
function iu(t) {
|
|
@@ -2285,7 +2285,7 @@ function iu(t) {
|
|
|
2285
2285
|
isResolvedFromDuration: !1,
|
|
2286
2286
|
...t
|
|
2287
2287
|
};
|
|
2288
|
-
if (!
|
|
2288
|
+
if (!Wi(t, nu) && Wi(t, eu)) {
|
|
2289
2289
|
const n = Jl(t);
|
|
2290
2290
|
e = {
|
|
2291
2291
|
...e,
|
|
@@ -2303,37 +2303,37 @@ function Br({ keyframes: t, restDelta: e, restSpeed: n, ...i }) {
|
|
|
2303
2303
|
n || (n = x ? 0.01 : 2), e || (e = x ? 5e-3 : 0.5);
|
|
2304
2304
|
let y;
|
|
2305
2305
|
if (g < 1) {
|
|
2306
|
-
const v =
|
|
2307
|
-
y = (
|
|
2308
|
-
const
|
|
2309
|
-
return o -
|
|
2306
|
+
const v = vn(b, g);
|
|
2307
|
+
y = (C) => {
|
|
2308
|
+
const w = Math.exp(-g * b * C);
|
|
2309
|
+
return o - w * ((p + g * b * P) / v * Math.sin(v * C) + P * Math.cos(v * C));
|
|
2310
2310
|
};
|
|
2311
2311
|
} else if (g === 1)
|
|
2312
2312
|
y = (v) => o - Math.exp(-b * v) * (P + (p + b * P) * v);
|
|
2313
2313
|
else {
|
|
2314
2314
|
const v = b * Math.sqrt(g * g - 1);
|
|
2315
|
-
y = (
|
|
2316
|
-
const
|
|
2317
|
-
return o -
|
|
2315
|
+
y = (C) => {
|
|
2316
|
+
const w = Math.exp(-g * b * C), L = Math.min(v * C, 300);
|
|
2317
|
+
return o - w * ((p + g * b * P) * Math.sinh(L) + v * P * Math.cosh(L)) / v;
|
|
2318
2318
|
};
|
|
2319
2319
|
}
|
|
2320
2320
|
return {
|
|
2321
2321
|
calculatedDuration: d && c || null,
|
|
2322
2322
|
next: (v) => {
|
|
2323
|
-
const
|
|
2323
|
+
const C = y(v);
|
|
2324
2324
|
if (d)
|
|
2325
2325
|
r.done = v >= c;
|
|
2326
2326
|
else {
|
|
2327
|
-
let
|
|
2328
|
-
v !== 0 && (g < 1 ?
|
|
2329
|
-
const L = Math.abs(
|
|
2327
|
+
let w = p;
|
|
2328
|
+
v !== 0 && (g < 1 ? w = _r(y, v, C) : w = 0);
|
|
2329
|
+
const L = Math.abs(w) <= n, q = Math.abs(o - C) <= e;
|
|
2330
2330
|
r.done = L && q;
|
|
2331
2331
|
}
|
|
2332
|
-
return r.value = r.done ? o :
|
|
2332
|
+
return r.value = r.done ? o : C, r;
|
|
2333
2333
|
}
|
|
2334
2334
|
};
|
|
2335
2335
|
}
|
|
2336
|
-
function
|
|
2336
|
+
function $i({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: i = 325, bounceDamping: s = 10, bounceStiffness: o = 500, modifyTarget: r, min: a, max: l, restDelta: u = 0.5, restSpeed: c }) {
|
|
2337
2337
|
const h = t[0], d = {
|
|
2338
2338
|
done: !1,
|
|
2339
2339
|
value: h
|
|
@@ -2341,13 +2341,13 @@ function Wi({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: i = 3
|
|
|
2341
2341
|
let P = n * e;
|
|
2342
2342
|
const b = h + P, x = r === void 0 ? b : r(b);
|
|
2343
2343
|
x !== b && (P = x - h);
|
|
2344
|
-
const y = (V) => -P * Math.exp(-V / i), v = (V) => x + y(V),
|
|
2344
|
+
const y = (V) => -P * Math.exp(-V / i), v = (V) => x + y(V), C = (V) => {
|
|
2345
2345
|
const G = y(V), H = v(V);
|
|
2346
2346
|
d.done = Math.abs(G) <= u, d.value = d.done ? x : H;
|
|
2347
2347
|
};
|
|
2348
|
-
let
|
|
2348
|
+
let w, L;
|
|
2349
2349
|
const q = (V) => {
|
|
2350
|
-
p(d.value) && (
|
|
2350
|
+
p(d.value) && (w = V, L = Br({
|
|
2351
2351
|
keyframes: [d.value, g(d.value)],
|
|
2352
2352
|
velocity: _r(v, V, d.value),
|
|
2353
2353
|
// TODO: This should be passing * 1000
|
|
@@ -2361,7 +2361,7 @@ function Wi({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: i = 3
|
|
|
2361
2361
|
calculatedDuration: null,
|
|
2362
2362
|
next: (V) => {
|
|
2363
2363
|
let G = !1;
|
|
2364
|
-
return !L &&
|
|
2364
|
+
return !L && w === void 0 && (G = !0, C(V), q(V)), w !== void 0 && V >= w ? L.next(V - w) : (!G && C(V), d);
|
|
2365
2365
|
}
|
|
2366
2366
|
};
|
|
2367
2367
|
}
|
|
@@ -2379,31 +2379,31 @@ function pe(t, e, n, i) {
|
|
|
2379
2379
|
const s = (o) => ou(o, 0, 1, t, n);
|
|
2380
2380
|
return (o) => o === 0 || o === 1 ? o : Ir(s(o), e, i);
|
|
2381
2381
|
}
|
|
2382
|
-
const au = pe(0.42, 0, 1, 1), lu = pe(0, 0, 0.58, 1), Nr = pe(0.42, 0, 0.58, 1), uu = (t) => Array.isArray(t) && typeof t[0] != "number", Ur = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, Wr = (t) => (e) => 1 - t(1 - e),
|
|
2382
|
+
const au = pe(0.42, 0, 1, 1), lu = pe(0, 0, 0.58, 1), Nr = pe(0.42, 0, 0.58, 1), uu = (t) => Array.isArray(t) && typeof t[0] != "number", Ur = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, Wr = (t) => (e) => 1 - t(1 - e), Xn = (t) => 1 - Math.sin(Math.acos(t)), $r = Wr(Xn), cu = Ur(Xn), Kr = pe(0.33, 1.53, 0.69, 0.99), qn = Wr(Kr), hu = Ur(qn), fu = (t) => (t *= 2) < 1 ? 0.5 * qn(t) : 0.5 * (2 - Math.pow(2, -10 * (t - 1))), Ki = {
|
|
2383
2383
|
linear: W,
|
|
2384
2384
|
easeIn: au,
|
|
2385
2385
|
easeInOut: Nr,
|
|
2386
2386
|
easeOut: lu,
|
|
2387
|
-
circIn:
|
|
2387
|
+
circIn: Xn,
|
|
2388
2388
|
circInOut: cu,
|
|
2389
2389
|
circOut: $r,
|
|
2390
|
-
backIn:
|
|
2390
|
+
backIn: qn,
|
|
2391
2391
|
backInOut: hu,
|
|
2392
2392
|
backOut: Kr,
|
|
2393
2393
|
anticipate: fu
|
|
2394
|
-
},
|
|
2394
|
+
}, Gi = (t) => {
|
|
2395
2395
|
if (Array.isArray(t)) {
|
|
2396
2396
|
ct(t.length === 4, "Cubic bezier arrays must contain four numerical values.");
|
|
2397
2397
|
const [e, n, i, s] = t;
|
|
2398
2398
|
return pe(e, n, i, s);
|
|
2399
2399
|
} else if (typeof t == "string")
|
|
2400
|
-
return ct(
|
|
2400
|
+
return ct(Ki[t] !== void 0, `Invalid easing type '${t}'`), Ki[t];
|
|
2401
2401
|
return t;
|
|
2402
2402
|
}, oe = (t, e, n) => {
|
|
2403
2403
|
const i = e - t;
|
|
2404
2404
|
return i === 0 ? 1 : (n - t) / i;
|
|
2405
2405
|
}, j = (t, e, n) => t + (e - t) * n;
|
|
2406
|
-
function
|
|
2406
|
+
function nn(t, e, n) {
|
|
2407
2407
|
return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? t + (e - t) * 6 * n : n < 1 / 2 ? e : n < 2 / 3 ? t + (e - t) * (2 / 3 - n) * 6 : t;
|
|
2408
2408
|
}
|
|
2409
2409
|
function du({ hue: t, saturation: e, lightness: n, alpha: i }) {
|
|
@@ -2413,7 +2413,7 @@ function du({ hue: t, saturation: e, lightness: n, alpha: i }) {
|
|
|
2413
2413
|
s = o = r = n;
|
|
2414
2414
|
else {
|
|
2415
2415
|
const a = n < 0.5 ? n * (1 + e) : n + e - n * e, l = 2 * n - a;
|
|
2416
|
-
s =
|
|
2416
|
+
s = nn(l, a, t + 1 / 3), o = nn(l, a, t), r = nn(l, a, t - 1 / 3);
|
|
2417
2417
|
}
|
|
2418
2418
|
return {
|
|
2419
2419
|
red: Math.round(s * 255),
|
|
@@ -2422,38 +2422,38 @@ function du({ hue: t, saturation: e, lightness: n, alpha: i }) {
|
|
|
2422
2422
|
alpha: i
|
|
2423
2423
|
};
|
|
2424
2424
|
}
|
|
2425
|
-
function
|
|
2425
|
+
function Ee(t, e) {
|
|
2426
2426
|
return (n) => n > 0 ? e : t;
|
|
2427
2427
|
}
|
|
2428
|
-
const
|
|
2428
|
+
const sn = (t, e, n) => {
|
|
2429
2429
|
const i = t * t, s = n * (e * e - i) + i;
|
|
2430
2430
|
return s < 0 ? 0 : Math.sqrt(s);
|
|
2431
|
-
}, pu = [
|
|
2432
|
-
function
|
|
2431
|
+
}, pu = [gn, At, Ft], mu = (t) => pu.find((e) => e.test(t));
|
|
2432
|
+
function zi(t) {
|
|
2433
2433
|
const e = mu(t);
|
|
2434
2434
|
if (Wt(!!e, `'${t}' is not an animatable color. Use the equivalent color code instead.`), !e)
|
|
2435
2435
|
return !1;
|
|
2436
2436
|
let n = e.parse(t);
|
|
2437
2437
|
return e === Ft && (n = du(n)), n;
|
|
2438
2438
|
}
|
|
2439
|
-
const
|
|
2440
|
-
const n =
|
|
2439
|
+
const Hi = (t, e) => {
|
|
2440
|
+
const n = zi(t), i = zi(e);
|
|
2441
2441
|
if (!n || !i)
|
|
2442
|
-
return
|
|
2442
|
+
return Ee(t, e);
|
|
2443
2443
|
const s = { ...n };
|
|
2444
|
-
return (o) => (s.red =
|
|
2445
|
-
},
|
|
2444
|
+
return (o) => (s.red = sn(n.red, i.red, o), s.green = sn(n.green, i.green, o), s.blue = sn(n.blue, i.blue, o), s.alpha = j(n.alpha, i.alpha, o), At.transform(s));
|
|
2445
|
+
}, Pn = /* @__PURE__ */ new Set(["none", "hidden"]);
|
|
2446
2446
|
function gu(t, e) {
|
|
2447
|
-
return
|
|
2447
|
+
return Pn.has(t) ? (n) => n <= 0 ? t : e : (n) => n >= 1 ? e : t;
|
|
2448
2448
|
}
|
|
2449
2449
|
function yu(t, e) {
|
|
2450
2450
|
return (n) => j(t, e, n);
|
|
2451
2451
|
}
|
|
2452
|
-
function
|
|
2453
|
-
return typeof t == "number" ? yu : typeof t == "string" ?
|
|
2452
|
+
function Zn(t) {
|
|
2453
|
+
return typeof t == "number" ? yu : typeof t == "string" ? Fn(t) ? Ee : $.test(t) ? Hi : xu : Array.isArray(t) ? Gr : typeof t == "object" ? $.test(t) ? Hi : vu : Ee;
|
|
2454
2454
|
}
|
|
2455
2455
|
function Gr(t, e) {
|
|
2456
|
-
const n = [...t], i = n.length, s = t.map((o, r) =>
|
|
2456
|
+
const n = [...t], i = n.length, s = t.map((o, r) => Zn(o)(o, e[r]));
|
|
2457
2457
|
return (o) => {
|
|
2458
2458
|
for (let r = 0; r < i; r++)
|
|
2459
2459
|
n[r] = s[r](o);
|
|
@@ -2463,7 +2463,7 @@ function Gr(t, e) {
|
|
|
2463
2463
|
function vu(t, e) {
|
|
2464
2464
|
const n = { ...t, ...e }, i = {};
|
|
2465
2465
|
for (const s in n)
|
|
2466
|
-
t[s] !== void 0 && e[s] !== void 0 && (i[s] =
|
|
2466
|
+
t[s] !== void 0 && e[s] !== void 0 && (i[s] = Zn(t[s])(t[s], e[s]));
|
|
2467
2467
|
return (s) => {
|
|
2468
2468
|
for (const o in i)
|
|
2469
2469
|
n[o] = i[o](s);
|
|
@@ -2481,10 +2481,10 @@ function Pu(t, e) {
|
|
|
2481
2481
|
}
|
|
2482
2482
|
const xu = (t, e) => {
|
|
2483
2483
|
const n = vt.createTransformer(e), i = re(t), s = re(e);
|
|
2484
|
-
return i.indexes.var.length === s.indexes.var.length && i.indexes.color.length === s.indexes.color.length && i.indexes.number.length >= s.indexes.number.length ?
|
|
2484
|
+
return i.indexes.var.length === s.indexes.var.length && i.indexes.color.length === s.indexes.color.length && i.indexes.number.length >= s.indexes.number.length ? Pn.has(t) && !s.values.length || Pn.has(e) && !i.values.length ? gu(t, e) : at(Gr(Pu(i, s), s.values), n) : (Wt(!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.`), Ee(t, e));
|
|
2485
2485
|
};
|
|
2486
2486
|
function zr(t, e, n) {
|
|
2487
|
-
return typeof t == "number" && typeof e == "number" && typeof n == "number" ? j(t, e, n) :
|
|
2487
|
+
return typeof t == "number" && typeof e == "number" && typeof n == "number" ? j(t, e, n) : Zn(t)(t, e);
|
|
2488
2488
|
}
|
|
2489
2489
|
function Tu(t, e, n) {
|
|
2490
2490
|
const i = [], s = n || zr, o = t.length - 1;
|
|
@@ -2526,37 +2526,37 @@ function Su(t) {
|
|
|
2526
2526
|
const e = [0];
|
|
2527
2527
|
return wu(e, t.length - 1), e;
|
|
2528
2528
|
}
|
|
2529
|
-
function
|
|
2529
|
+
function Cu(t, e) {
|
|
2530
2530
|
return t.map((n) => n * e);
|
|
2531
2531
|
}
|
|
2532
|
-
function
|
|
2532
|
+
function Au(t, e) {
|
|
2533
2533
|
return t.map(() => e || Nr).splice(0, t.length - 1);
|
|
2534
2534
|
}
|
|
2535
|
-
function
|
|
2536
|
-
const s = uu(i) ? i.map(
|
|
2535
|
+
function De({ duration: t = 300, keyframes: e, times: n, ease: i = "easeInOut" }) {
|
|
2536
|
+
const s = uu(i) ? i.map(Gi) : Gi(i), o = {
|
|
2537
2537
|
done: !1,
|
|
2538
2538
|
value: e[0]
|
|
2539
|
-
}, r =
|
|
2539
|
+
}, r = Cu(
|
|
2540
2540
|
// Only use the provided offsets if they're the correct length
|
|
2541
2541
|
// TODO Maybe we should warn here if there's a length mismatch
|
|
2542
2542
|
n && n.length === e.length ? n : Su(e),
|
|
2543
2543
|
t
|
|
2544
2544
|
), a = bu(r, e, {
|
|
2545
|
-
ease: Array.isArray(s) ? s :
|
|
2545
|
+
ease: Array.isArray(s) ? s : Au(e, s)
|
|
2546
2546
|
});
|
|
2547
2547
|
return {
|
|
2548
2548
|
calculatedDuration: t,
|
|
2549
2549
|
next: (l) => (o.value = a(l), o.done = l >= t, o)
|
|
2550
2550
|
};
|
|
2551
2551
|
}
|
|
2552
|
-
const
|
|
2552
|
+
const Yi = 2e4;
|
|
2553
2553
|
function Ru(t) {
|
|
2554
2554
|
let e = 0;
|
|
2555
2555
|
const n = 50;
|
|
2556
2556
|
let i = t.next(e);
|
|
2557
|
-
for (; !i.done && e <
|
|
2557
|
+
for (; !i.done && e < Yi; )
|
|
2558
2558
|
e += n, i = t.next(e);
|
|
2559
|
-
return e >=
|
|
2559
|
+
return e >= Yi ? 1 / 0 : e;
|
|
2560
2560
|
}
|
|
2561
2561
|
const Vu = (t) => {
|
|
2562
2562
|
const e = ({ timestamp: n }) => t(n);
|
|
@@ -2570,14 +2570,14 @@ const Vu = (t) => {
|
|
|
2570
2570
|
now: () => N.isProcessing ? N.timestamp : mt.now()
|
|
2571
2571
|
};
|
|
2572
2572
|
}, Eu = {
|
|
2573
|
-
decay:
|
|
2574
|
-
inertia:
|
|
2575
|
-
tween:
|
|
2576
|
-
keyframes:
|
|
2573
|
+
decay: $i,
|
|
2574
|
+
inertia: $i,
|
|
2575
|
+
tween: De,
|
|
2576
|
+
keyframes: De,
|
|
2577
2577
|
spring: Br
|
|
2578
2578
|
}, Du = (t) => t / 100;
|
|
2579
|
-
class
|
|
2580
|
-
constructor({ KeyframeResolver: e =
|
|
2579
|
+
class Jn extends Or {
|
|
2580
|
+
constructor({ KeyframeResolver: e = zn, ...n }) {
|
|
2581
2581
|
super(n), this.holdTime = null, this.startTime = null, this.cancelTime = null, this.currentTime = 0, this.playbackSpeed = 1, this.pendingPlayState = "running", this.state = "idle", this.stop = () => {
|
|
2582
2582
|
if (this.resolver.cancel(), this.isStopped = !0, this.state === "idle")
|
|
2583
2583
|
return;
|
|
@@ -2589,9 +2589,9 @@ class Zn extends Or {
|
|
|
2589
2589
|
i && s && s.owner ? this.resolver = s.owner.resolveKeyframes(o, r, i, s) : this.resolver = new e(o, r, i, s), this.resolver.scheduleResolve();
|
|
2590
2590
|
}
|
|
2591
2591
|
initPlayback(e) {
|
|
2592
|
-
const { type: n = "keyframes", repeat: i = 0, repeatDelay: s = 0, repeatType: o, velocity: r = 0 } = this.options, a = Eu[n] ||
|
|
2592
|
+
const { type: n = "keyframes", repeat: i = 0, repeatDelay: s = 0, repeatType: o, velocity: r = 0 } = this.options, a = Eu[n] || De;
|
|
2593
2593
|
let l, u;
|
|
2594
|
-
a !==
|
|
2594
|
+
a !== De && typeof e[0] != "number" && (process.env.NODE_ENV !== "production" && ct(e.length === 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${e}`), l = at(Du, zr(e[0], e[1])), e = [0, 100]);
|
|
2595
2595
|
const c = a({ ...this.options, keyframes: e });
|
|
2596
2596
|
o === "mirror" && (u = a({
|
|
2597
2597
|
...this.options,
|
|
@@ -2625,18 +2625,18 @@ class Zn extends Or {
|
|
|
2625
2625
|
this.speed > 0 ? this.startTime = Math.min(this.startTime, e) : this.speed < 0 && (this.startTime = Math.min(e - c / this.speed, this.startTime)), n ? this.currentTime = e : this.holdTime !== null ? this.currentTime = this.holdTime : this.currentTime = Math.round(e - this.startTime) * this.speed;
|
|
2626
2626
|
const x = this.currentTime - d * (this.speed >= 0 ? 1 : -1), y = this.speed >= 0 ? x < 0 : x > c;
|
|
2627
2627
|
this.currentTime = Math.max(x, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = c);
|
|
2628
|
-
let v = this.currentTime,
|
|
2628
|
+
let v = this.currentTime, C = o;
|
|
2629
2629
|
if (p) {
|
|
2630
2630
|
const V = Math.min(this.currentTime, c) / h;
|
|
2631
2631
|
let G = Math.floor(V), H = V % 1;
|
|
2632
|
-
!H && V >= 1 && (H = 1), H === 1 && G--, G = Math.min(G, p + 1), !!(G % 2) && (g === "reverse" ? (H = 1 - H, P && (H -= P / h)) : g === "mirror" && (
|
|
2632
|
+
!H && V >= 1 && (H = 1), H === 1 && G--, G = Math.min(G, p + 1), !!(G % 2) && (g === "reverse" ? (H = 1 - H, P && (H -= P / h)) : g === "mirror" && (C = r)), v = yt(0, 1, H) * h;
|
|
2633
2633
|
}
|
|
2634
|
-
const
|
|
2635
|
-
a && (
|
|
2636
|
-
let { done: L } =
|
|
2634
|
+
const w = y ? { done: !1, value: l[0] } : C.next(v);
|
|
2635
|
+
a && (w.value = a(w.value));
|
|
2636
|
+
let { done: L } = w;
|
|
2637
2637
|
!y && u !== null && (L = this.speed >= 0 ? this.currentTime >= c : this.currentTime <= 0);
|
|
2638
2638
|
const q = this.holdTime === null && (this.state === "finished" || this.state === "running" && L);
|
|
2639
|
-
return q && s !== void 0 && (
|
|
2639
|
+
return q && s !== void 0 && (w.value = Ue(l, this.options, s)), b && b(w.value), q && this.finish(), w;
|
|
2640
2640
|
}
|
|
2641
2641
|
get duration() {
|
|
2642
2642
|
const { resolved: e } = this;
|
|
@@ -2698,9 +2698,9 @@ class Zn extends Or {
|
|
|
2698
2698
|
}
|
|
2699
2699
|
const Hr = (t) => Array.isArray(t) && typeof t[0] == "number";
|
|
2700
2700
|
function Yr(t) {
|
|
2701
|
-
return !!(!t || typeof t == "string" && t in
|
|
2701
|
+
return !!(!t || typeof t == "string" && t in Qn || Hr(t) || Array.isArray(t) && t.every(Yr));
|
|
2702
2702
|
}
|
|
2703
|
-
const qt = ([t, e, n, i]) => `cubic-bezier(${t}, ${e}, ${n}, ${i})`,
|
|
2703
|
+
const qt = ([t, e, n, i]) => `cubic-bezier(${t}, ${e}, ${n}, ${i})`, Qn = {
|
|
2704
2704
|
linear: "linear",
|
|
2705
2705
|
ease: "ease",
|
|
2706
2706
|
easeIn: "ease-in",
|
|
@@ -2712,11 +2712,11 @@ const qt = ([t, e, n, i]) => `cubic-bezier(${t}, ${e}, ${n}, ${i})`, Jn = {
|
|
|
2712
2712
|
backOut: qt([0.33, 1.53, 0.69, 0.99])
|
|
2713
2713
|
};
|
|
2714
2714
|
function Mu(t) {
|
|
2715
|
-
return Xr(t) ||
|
|
2715
|
+
return Xr(t) || Qn.easeOut;
|
|
2716
2716
|
}
|
|
2717
2717
|
function Xr(t) {
|
|
2718
2718
|
if (t)
|
|
2719
|
-
return Hr(t) ? qt(t) : Array.isArray(t) ? t.map(Mu) :
|
|
2719
|
+
return Hr(t) ? qt(t) : Array.isArray(t) ? t.map(Mu) : Qn[t];
|
|
2720
2720
|
}
|
|
2721
2721
|
function ku(t, e, n, { delay: i = 0, duration: s = 300, repeat: o = 0, repeatType: r = "loop", ease: a, times: l } = {}) {
|
|
2722
2722
|
const u = { [e]: n };
|
|
@@ -2731,12 +2731,12 @@ function ku(t, e, n, { delay: i = 0, duration: s = 300, repeat: o = 0, repeatTyp
|
|
|
2731
2731
|
direction: r === "reverse" ? "alternate" : "normal"
|
|
2732
2732
|
});
|
|
2733
2733
|
}
|
|
2734
|
-
const Lu = jr(() => Object.hasOwnProperty.call(Element.prototype, "animate")),
|
|
2734
|
+
const Lu = jr(() => Object.hasOwnProperty.call(Element.prototype, "animate")), Me = 10, ju = 2e4;
|
|
2735
2735
|
function Ou(t) {
|
|
2736
2736
|
return t.type === "spring" || !Yr(t.ease);
|
|
2737
2737
|
}
|
|
2738
2738
|
function Fu(t, e) {
|
|
2739
|
-
const n = new
|
|
2739
|
+
const n = new Jn({
|
|
2740
2740
|
...e,
|
|
2741
2741
|
keyframes: t,
|
|
2742
2742
|
repeat: 0,
|
|
@@ -2747,15 +2747,15 @@ function Fu(t, e) {
|
|
|
2747
2747
|
const s = [];
|
|
2748
2748
|
let o = 0;
|
|
2749
2749
|
for (; !i.done && o < ju; )
|
|
2750
|
-
i = n.sample(o), s.push(i.value), o +=
|
|
2750
|
+
i = n.sample(o), s.push(i.value), o += Me;
|
|
2751
2751
|
return {
|
|
2752
2752
|
times: void 0,
|
|
2753
2753
|
keyframes: s,
|
|
2754
|
-
duration: o -
|
|
2754
|
+
duration: o - Me,
|
|
2755
2755
|
ease: "linear"
|
|
2756
2756
|
};
|
|
2757
2757
|
}
|
|
2758
|
-
class
|
|
2758
|
+
class Xi extends Or {
|
|
2759
2759
|
constructor(e) {
|
|
2760
2760
|
super(e);
|
|
2761
2761
|
const { name: n, motionValue: i, keyframes: s } = this.options;
|
|
@@ -2773,7 +2773,7 @@ class Yi extends Or {
|
|
|
2773
2773
|
const c = ku(l.owner.current, u, e, { ...this.options, duration: s, times: o, ease: r });
|
|
2774
2774
|
return c.startTime = mt.now(), this.pendingTimeline ? (c.timeline = this.pendingTimeline, this.pendingTimeline = void 0) : c.onfinish = () => {
|
|
2775
2775
|
const { onComplete: h } = this.options;
|
|
2776
|
-
l.set(
|
|
2776
|
+
l.set(Ue(e, this.options, n)), h && h(), this.cancel(), this.resolveFinishedPromise();
|
|
2777
2777
|
}, {
|
|
2778
2778
|
animation: c,
|
|
2779
2779
|
duration: s,
|
|
@@ -2868,7 +2868,7 @@ class Yi extends Or {
|
|
|
2868
2868
|
if (n.playState === "idle" || n.playState === "finished")
|
|
2869
2869
|
return;
|
|
2870
2870
|
if (this.time) {
|
|
2871
|
-
const { motionValue: u, onUpdate: c, onComplete: h, ...d } = this.options, p = new
|
|
2871
|
+
const { motionValue: u, onUpdate: c, onComplete: h, ...d } = this.options, p = new Jn({
|
|
2872
2872
|
...d,
|
|
2873
2873
|
keyframes: i,
|
|
2874
2874
|
duration: s,
|
|
@@ -2877,7 +2877,7 @@ class Yi extends Or {
|
|
|
2877
2877
|
times: a,
|
|
2878
2878
|
isGenerator: !0
|
|
2879
2879
|
}), g = lt(this.time);
|
|
2880
|
-
u.setWithVelocity(p.sample(g -
|
|
2880
|
+
u.setWithVelocity(p.sample(g - Me).value, p.sample(g).value, Me);
|
|
2881
2881
|
}
|
|
2882
2882
|
const { onStop: l } = this.options;
|
|
2883
2883
|
l && l(), this.cancel();
|
|
@@ -2974,8 +2974,8 @@ class Iu {
|
|
|
2974
2974
|
this.runAll("complete");
|
|
2975
2975
|
}
|
|
2976
2976
|
}
|
|
2977
|
-
const
|
|
2978
|
-
const l =
|
|
2977
|
+
const ti = (t, e, n, i = {}, s, o, r) => (a) => {
|
|
2978
|
+
const l = Gn(i, t) || {}, u = l.delay || i.delay || 0;
|
|
2979
2979
|
let { elapsed: c = 0 } = i;
|
|
2980
2980
|
c = c - lt(u);
|
|
2981
2981
|
let h = {
|
|
@@ -3001,20 +3001,20 @@ const Qn = (t, e, n, i = {}, s, o, r) => (a) => {
|
|
|
3001
3001
|
}), h.duration && (h.duration = lt(h.duration)), h.repeatDelay && (h.repeatDelay = lt(h.repeatDelay)), h.from !== void 0 && (h.keyframes[0] = h.from);
|
|
3002
3002
|
let d = !1;
|
|
3003
3003
|
if ((h.type === !1 || h.duration === 0 && !h.repeatDelay) && (h.duration = 0, h.delay === 0 && (d = !0)), d && !o && e.get() !== void 0) {
|
|
3004
|
-
const p =
|
|
3004
|
+
const p = Ue(h.keyframes, l);
|
|
3005
3005
|
if (p !== void 0)
|
|
3006
3006
|
return M.update(() => {
|
|
3007
3007
|
h.onUpdate(p), h.onComplete();
|
|
3008
3008
|
}), new Iu([]);
|
|
3009
3009
|
}
|
|
3010
|
-
return !o &&
|
|
3010
|
+
return !o && Xi.supports(h) ? new Xi(h) : new Jn(h);
|
|
3011
3011
|
};
|
|
3012
|
-
class
|
|
3012
|
+
class ei {
|
|
3013
3013
|
constructor() {
|
|
3014
3014
|
this.subscriptions = [];
|
|
3015
3015
|
}
|
|
3016
3016
|
add(e) {
|
|
3017
|
-
return
|
|
3017
|
+
return _e(this.subscriptions, e), () => Be(this.subscriptions, e);
|
|
3018
3018
|
}
|
|
3019
3019
|
notify(e, n, i) {
|
|
3020
3020
|
const s = this.subscriptions.length;
|
|
@@ -3034,11 +3034,11 @@ class ti {
|
|
|
3034
3034
|
this.subscriptions.length = 0;
|
|
3035
3035
|
}
|
|
3036
3036
|
}
|
|
3037
|
-
const
|
|
3038
|
-
function
|
|
3039
|
-
t ||
|
|
3037
|
+
const qi = /* @__PURE__ */ new Set();
|
|
3038
|
+
function ni(t, e, n) {
|
|
3039
|
+
t || qi.has(e) || (console.warn(e), n && console.warn(n), qi.add(e));
|
|
3040
3040
|
}
|
|
3041
|
-
const
|
|
3041
|
+
const Zi = 30, Nu = (t) => !isNaN(parseFloat(t));
|
|
3042
3042
|
class qr {
|
|
3043
3043
|
/**
|
|
3044
3044
|
* @param init - The initiating value
|
|
@@ -3101,10 +3101,10 @@ class qr {
|
|
|
3101
3101
|
* @deprecated
|
|
3102
3102
|
*/
|
|
3103
3103
|
onChange(e) {
|
|
3104
|
-
return process.env.NODE_ENV !== "production" &&
|
|
3104
|
+
return process.env.NODE_ENV !== "production" && ni(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", e);
|
|
3105
3105
|
}
|
|
3106
3106
|
on(e, n) {
|
|
3107
|
-
this.events[e] || (this.events[e] = new
|
|
3107
|
+
this.events[e] || (this.events[e] = new ei());
|
|
3108
3108
|
const i = this.events[e].add(n);
|
|
3109
3109
|
return e === "change" ? () => {
|
|
3110
3110
|
i(), M.read(() => {
|
|
@@ -3177,9 +3177,9 @@ class qr {
|
|
|
3177
3177
|
*/
|
|
3178
3178
|
getVelocity() {
|
|
3179
3179
|
const e = mt.now();
|
|
3180
|
-
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || e - this.updatedAt >
|
|
3180
|
+
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || e - this.updatedAt > Zi)
|
|
3181
3181
|
return 0;
|
|
3182
|
-
const n = Math.min(this.updatedAt - this.prevUpdatedAt,
|
|
3182
|
+
const n = Math.min(this.updatedAt - this.prevUpdatedAt, Zi);
|
|
3183
3183
|
return Fr(parseFloat(this.current) - parseFloat(this.prevFrameValue), n);
|
|
3184
3184
|
}
|
|
3185
3185
|
/**
|
|
@@ -3240,7 +3240,7 @@ function Uu(t, e, n) {
|
|
|
3240
3240
|
t.hasValue(e) ? t.getValue(e).set(n) : t.addValue(e, ae(n));
|
|
3241
3241
|
}
|
|
3242
3242
|
function Wu(t, e) {
|
|
3243
|
-
const n =
|
|
3243
|
+
const n = Ne(t, e);
|
|
3244
3244
|
let { transitionEnd: i = {}, transition: s = {}, ...o } = n || {};
|
|
3245
3245
|
o = { ...o, ...i };
|
|
3246
3246
|
for (const r in o) {
|
|
@@ -3267,7 +3267,7 @@ class $u extends qr {
|
|
|
3267
3267
|
return;
|
|
3268
3268
|
s = !0;
|
|
3269
3269
|
const o = this.counts.get(n) - 1;
|
|
3270
|
-
this.counts.set(n, o), o === 0 && (
|
|
3270
|
+
this.counts.set(n, o), o === 0 && (Be(this.output, n), this.update());
|
|
3271
3271
|
};
|
|
3272
3272
|
}
|
|
3273
3273
|
update() {
|
|
@@ -3277,7 +3277,7 @@ class $u extends qr {
|
|
|
3277
3277
|
function Ku(t) {
|
|
3278
3278
|
return !!(K(t) && t.add);
|
|
3279
3279
|
}
|
|
3280
|
-
function
|
|
3280
|
+
function xn(t, e) {
|
|
3281
3281
|
var n;
|
|
3282
3282
|
if (!t.applyWillChange)
|
|
3283
3283
|
return;
|
|
@@ -3301,7 +3301,7 @@ function Jr(t, e, { delay: n = 0, transitionOverride: i, type: s } = {}) {
|
|
|
3301
3301
|
const g = {
|
|
3302
3302
|
delay: n,
|
|
3303
3303
|
elapsed: 0,
|
|
3304
|
-
...
|
|
3304
|
+
...Gn(r || {}, h)
|
|
3305
3305
|
};
|
|
3306
3306
|
let P = !1;
|
|
3307
3307
|
if (window.HandoffAppearAnimations) {
|
|
@@ -3311,7 +3311,7 @@ function Jr(t, e, { delay: n = 0, transitionOverride: i, type: s } = {}) {
|
|
|
3311
3311
|
y !== null && (g.elapsed = y, P = !0);
|
|
3312
3312
|
}
|
|
3313
3313
|
}
|
|
3314
|
-
d.start(
|
|
3314
|
+
d.start(ti(h, d, p, t.shouldReduceMotion && Pt.has(h) ? { type: !1 } : g, t, P, xn(t, h)));
|
|
3315
3315
|
const b = d.animation;
|
|
3316
3316
|
b && u.push(b);
|
|
3317
3317
|
}
|
|
@@ -3321,9 +3321,9 @@ function Jr(t, e, { delay: n = 0, transitionOverride: i, type: s } = {}) {
|
|
|
3321
3321
|
});
|
|
3322
3322
|
}), u;
|
|
3323
3323
|
}
|
|
3324
|
-
function
|
|
3324
|
+
function Tn(t, e, n = {}) {
|
|
3325
3325
|
var i;
|
|
3326
|
-
const s =
|
|
3326
|
+
const s = Ne(t, e, n.type === "exit" ? (i = t.presenceContext) === null || i === void 0 ? void 0 : i.custom : void 0);
|
|
3327
3327
|
let { transition: o = t.getDefaultTransition() || {} } = s || {};
|
|
3328
3328
|
n.transitionOverride && (o = n.transitionOverride);
|
|
3329
3329
|
const r = s ? () => Promise.all(Jr(t, s, n)) : () => Promise.resolve(), a = t.variantChildren && t.variantChildren.size ? (u = 0) => {
|
|
@@ -3339,7 +3339,7 @@ function xn(t, e, n = {}) {
|
|
|
3339
3339
|
function zu(t, e, n = 0, i = 0, s = 1, o) {
|
|
3340
3340
|
const r = [], a = (t.variantChildren.size - 1) * i, l = s === 1 ? (u = 0) => u * i : (u = 0) => a - u * i;
|
|
3341
3341
|
return Array.from(t.variantChildren).sort(Hu).forEach((u, c) => {
|
|
3342
|
-
u.notify("AnimationStart", e), r.push(
|
|
3342
|
+
u.notify("AnimationStart", e), r.push(Tn(u, e, {
|
|
3343
3343
|
...o,
|
|
3344
3344
|
delay: n + l(c)
|
|
3345
3345
|
}).then(() => u.notify("AnimationComplete", e)));
|
|
@@ -3352,27 +3352,27 @@ function Yu(t, e, n = {}) {
|
|
|
3352
3352
|
t.notify("AnimationStart", e);
|
|
3353
3353
|
let i;
|
|
3354
3354
|
if (Array.isArray(e)) {
|
|
3355
|
-
const s = e.map((o) =>
|
|
3355
|
+
const s = e.map((o) => Tn(t, o, n));
|
|
3356
3356
|
i = Promise.all(s);
|
|
3357
3357
|
} else if (typeof e == "string")
|
|
3358
|
-
i =
|
|
3358
|
+
i = Tn(t, e, n);
|
|
3359
3359
|
else {
|
|
3360
|
-
const s = typeof e == "function" ?
|
|
3360
|
+
const s = typeof e == "function" ? Ne(t, e, n.custom) : e;
|
|
3361
3361
|
i = Promise.all(Jr(t, s, n));
|
|
3362
3362
|
}
|
|
3363
3363
|
return i.then(() => {
|
|
3364
3364
|
t.notify("AnimationComplete", e);
|
|
3365
3365
|
});
|
|
3366
3366
|
}
|
|
3367
|
-
const Xu = [...
|
|
3367
|
+
const Xu = [...kn].reverse(), qu = kn.length;
|
|
3368
3368
|
function Zu(t) {
|
|
3369
3369
|
return (e) => Promise.all(e.map(({ animation: n, options: i }) => Yu(t, n, i)));
|
|
3370
3370
|
}
|
|
3371
3371
|
function Ju(t) {
|
|
3372
|
-
let e = Zu(t), n =
|
|
3372
|
+
let e = Zu(t), n = Ji(), i = !0;
|
|
3373
3373
|
const s = (l) => (u, c) => {
|
|
3374
3374
|
var h;
|
|
3375
|
-
const d =
|
|
3375
|
+
const d = Ne(t, c, l === "exit" ? (h = t.presenceContext) === null || h === void 0 ? void 0 : h.custom : void 0);
|
|
3376
3376
|
if (d) {
|
|
3377
3377
|
const { transition: p, transitionEnd: g, ...P } = d;
|
|
3378
3378
|
u = { ...u, ...P, ...g };
|
|
@@ -3386,20 +3386,20 @@ function Ju(t) {
|
|
|
3386
3386
|
const u = t.getProps(), c = t.getVariantContext(!0) || {}, h = [], d = /* @__PURE__ */ new Set();
|
|
3387
3387
|
let p = {}, g = 1 / 0;
|
|
3388
3388
|
for (let b = 0; b < qu; b++) {
|
|
3389
|
-
const x = Xu[b], y = n[x], v = u[x] !== void 0 ? u[x] : c[x],
|
|
3390
|
-
|
|
3391
|
-
let L = v === c[x] && v !== u[x] &&
|
|
3389
|
+
const x = Xu[b], y = n[x], v = u[x] !== void 0 ? u[x] : c[x], C = ie(v), w = x === l ? y.isActive : null;
|
|
3390
|
+
w === !1 && (g = b);
|
|
3391
|
+
let L = v === c[x] && v !== u[x] && C;
|
|
3392
3392
|
if (L && i && t.manuallyAnimateOnMount && (L = !1), y.protectedKeys = { ...p }, // If it isn't active and hasn't *just* been set as inactive
|
|
3393
|
-
!y.isActive &&
|
|
3393
|
+
!y.isActive && w === null || // If we didn't and don't have any defined prop for this animation type
|
|
3394
3394
|
!v && !y.prevProp || // Or if the prop doesn't define an animation
|
|
3395
3395
|
se(v) || typeof v == "boolean")
|
|
3396
3396
|
continue;
|
|
3397
3397
|
let V = Qu(y.prevProp, v) || // If we're making this variant active, we want to always make it active
|
|
3398
|
-
x === l && y.isActive && !L &&
|
|
3399
|
-
b > g &&
|
|
3398
|
+
x === l && y.isActive && !L && C || // If we removed a higher-priority variant (i is in reverse order)
|
|
3399
|
+
b > g && C, G = !1;
|
|
3400
3400
|
const H = Array.isArray(v) ? v : [v];
|
|
3401
3401
|
let ft = H.reduce(s(x), {});
|
|
3402
|
-
|
|
3402
|
+
w === !1 && (ft = {});
|
|
3403
3403
|
const { prevResolvedValues: Kt = {} } = y, Z = {
|
|
3404
3404
|
...Kt,
|
|
3405
3405
|
...ft
|
|
@@ -3413,7 +3413,7 @@ function Ju(t) {
|
|
|
3413
3413
|
if (p.hasOwnProperty(F))
|
|
3414
3414
|
continue;
|
|
3415
3415
|
let Mt = !1;
|
|
3416
|
-
|
|
3416
|
+
fn(J) && fn(Dt) ? Mt = !Pr(J, Dt) : Mt = J !== Dt, Mt ? J != null ? nt(F) : d.add(F) : J !== void 0 && d.has(F) ? nt(F) : y.protectedKeys[F] = !0;
|
|
3417
3417
|
}
|
|
3418
3418
|
y.prevProp = v, y.prevResolvedValues = ft, y.isActive && (p = { ...p, ...ft }), i && t.blockInitialAnimation && (V = !1), V && (!L || G) && h.push(...H.map((F) => ({
|
|
3419
3419
|
animation: F,
|
|
@@ -3449,7 +3449,7 @@ function Ju(t) {
|
|
|
3449
3449
|
setAnimateFunction: o,
|
|
3450
3450
|
getState: () => n,
|
|
3451
3451
|
reset: () => {
|
|
3452
|
-
n =
|
|
3452
|
+
n = Ji(), i = !0;
|
|
3453
3453
|
}
|
|
3454
3454
|
};
|
|
3455
3455
|
}
|
|
@@ -3464,7 +3464,7 @@ function bt(t = !1) {
|
|
|
3464
3464
|
prevResolvedValues: {}
|
|
3465
3465
|
};
|
|
3466
3466
|
}
|
|
3467
|
-
function
|
|
3467
|
+
function Ji() {
|
|
3468
3468
|
return {
|
|
3469
3469
|
animate: bt(!0),
|
|
3470
3470
|
whileInView: bt(),
|
|
@@ -3531,9 +3531,9 @@ const ic = {
|
|
|
3531
3531
|
exit: {
|
|
3532
3532
|
Feature: nc
|
|
3533
3533
|
}
|
|
3534
|
-
},
|
|
3534
|
+
}, Qi = (t, e) => Math.abs(t - e);
|
|
3535
3535
|
function sc(t, e) {
|
|
3536
|
-
const n =
|
|
3536
|
+
const n = Qi(t.x, e.x), i = Qi(t.y, e.y);
|
|
3537
3537
|
return Math.sqrt(n ** 2 + i ** 2);
|
|
3538
3538
|
}
|
|
3539
3539
|
class Qr {
|
|
@@ -3541,7 +3541,7 @@ class Qr {
|
|
|
3541
3541
|
if (this.startEvent = null, this.lastMoveEvent = null, this.lastMoveEventInfo = null, this.handlers = {}, this.contextWindow = window, this.updatePoint = () => {
|
|
3542
3542
|
if (!(this.lastMoveEvent && this.lastMoveEventInfo))
|
|
3543
3543
|
return;
|
|
3544
|
-
const h =
|
|
3544
|
+
const h = on(this.lastMoveEventInfo, this.history), d = this.startEvent !== null, p = sc(h.offset, { x: 0, y: 0 }) >= 3;
|
|
3545
3545
|
if (!d && !p)
|
|
3546
3546
|
return;
|
|
3547
3547
|
const { point: g } = h, { timestamp: P } = N;
|
|
@@ -3549,21 +3549,21 @@ class Qr {
|
|
|
3549
3549
|
const { onStart: b, onMove: x } = this.handlers;
|
|
3550
3550
|
d || (b && b(this.lastMoveEvent, h), this.startEvent = this.lastMoveEvent), x && x(this.lastMoveEvent, h);
|
|
3551
3551
|
}, this.handlePointerMove = (h, d) => {
|
|
3552
|
-
this.lastMoveEvent = h, this.lastMoveEventInfo =
|
|
3552
|
+
this.lastMoveEvent = h, this.lastMoveEventInfo = rn(d, this.transformPagePoint), M.update(this.updatePoint, !0);
|
|
3553
3553
|
}, this.handlePointerUp = (h, d) => {
|
|
3554
3554
|
this.end();
|
|
3555
3555
|
const { onEnd: p, onSessionEnd: g, resumeAnimation: P } = this.handlers;
|
|
3556
3556
|
if (this.dragSnapToOrigin && P && P(), !(this.lastMoveEvent && this.lastMoveEventInfo))
|
|
3557
3557
|
return;
|
|
3558
|
-
const b =
|
|
3558
|
+
const b = on(h.type === "pointercancel" ? this.lastMoveEventInfo : rn(d, this.transformPagePoint), this.history);
|
|
3559
3559
|
this.startEvent && p && p(h, b), g && g(h, b);
|
|
3560
3560
|
}, !pr(e))
|
|
3561
3561
|
return;
|
|
3562
3562
|
this.dragSnapToOrigin = o, this.handlers = n, this.transformPagePoint = i, this.contextWindow = s || window;
|
|
3563
|
-
const r =
|
|
3563
|
+
const r = Ie(e), a = rn(r, this.transformPagePoint), { point: l } = a, { timestamp: u } = N;
|
|
3564
3564
|
this.history = [{ ...l, timestamp: u }];
|
|
3565
3565
|
const { onSessionStart: c } = n;
|
|
3566
|
-
c && c(e,
|
|
3566
|
+
c && c(e, on(a, this.history)), this.removeListeners = at(ot(this.contextWindow, "pointermove", this.handlePointerMove), ot(this.contextWindow, "pointerup", this.handlePointerUp), ot(this.contextWindow, "pointercancel", this.handlePointerUp));
|
|
3567
3567
|
}
|
|
3568
3568
|
updateHandlers(e) {
|
|
3569
3569
|
this.handlers = e;
|
|
@@ -3572,17 +3572,17 @@ class Qr {
|
|
|
3572
3572
|
this.removeListeners && this.removeListeners(), ht(this.updatePoint);
|
|
3573
3573
|
}
|
|
3574
3574
|
}
|
|
3575
|
-
function
|
|
3575
|
+
function rn(t, e) {
|
|
3576
3576
|
return e ? { point: e(t.point) } : t;
|
|
3577
3577
|
}
|
|
3578
|
-
function
|
|
3578
|
+
function ts(t, e) {
|
|
3579
3579
|
return { x: t.x - e.x, y: t.y - e.y };
|
|
3580
3580
|
}
|
|
3581
|
-
function
|
|
3581
|
+
function on({ point: t }, e) {
|
|
3582
3582
|
return {
|
|
3583
3583
|
point: t,
|
|
3584
|
-
delta:
|
|
3585
|
-
offset:
|
|
3584
|
+
delta: ts(t, to(e)),
|
|
3585
|
+
offset: ts(t, rc(e)),
|
|
3586
3586
|
velocity: oc(e, 0.1)
|
|
3587
3587
|
};
|
|
3588
3588
|
}
|
|
@@ -3617,28 +3617,28 @@ function X(t) {
|
|
|
3617
3617
|
function hc(t, e, n) {
|
|
3618
3618
|
return Math.abs(t - e) <= n;
|
|
3619
3619
|
}
|
|
3620
|
-
function
|
|
3620
|
+
function es(t, e, n, i = 0.5) {
|
|
3621
3621
|
t.origin = i, t.originPoint = j(e.min, e.max, t.origin), t.scale = X(n) / X(e), t.translate = j(n.min, n.max, t.origin) - t.originPoint, (t.scale >= ac && t.scale <= lc || isNaN(t.scale)) && (t.scale = 1), (t.translate >= uc && t.translate <= cc || isNaN(t.translate)) && (t.translate = 0);
|
|
3622
3622
|
}
|
|
3623
3623
|
function ee(t, e, n, i) {
|
|
3624
|
-
|
|
3624
|
+
es(t.x, e.x, n.x, i ? i.originX : void 0), es(t.y, e.y, n.y, i ? i.originY : void 0);
|
|
3625
3625
|
}
|
|
3626
|
-
function
|
|
3626
|
+
function ns(t, e, n) {
|
|
3627
3627
|
t.min = n.min + e.min, t.max = t.min + X(e);
|
|
3628
3628
|
}
|
|
3629
3629
|
function fc(t, e, n) {
|
|
3630
|
-
|
|
3630
|
+
ns(t.x, e.x, n.x), ns(t.y, e.y, n.y);
|
|
3631
3631
|
}
|
|
3632
|
-
function
|
|
3632
|
+
function is(t, e, n) {
|
|
3633
3633
|
t.min = e.min - n.min, t.max = t.min + X(e);
|
|
3634
3634
|
}
|
|
3635
3635
|
function ne(t, e, n) {
|
|
3636
|
-
|
|
3636
|
+
is(t.x, e.x, n.x), is(t.y, e.y, n.y);
|
|
3637
3637
|
}
|
|
3638
3638
|
function dc(t, { min: e, max: n }, i) {
|
|
3639
3639
|
return e !== void 0 && t < e ? t = i ? j(e, t, i.min) : Math.max(t, e) : n !== void 0 && t > n && (t = i ? j(n, t, i.max) : Math.min(t, n)), t;
|
|
3640
3640
|
}
|
|
3641
|
-
function
|
|
3641
|
+
function ss(t, e, n) {
|
|
3642
3642
|
return {
|
|
3643
3643
|
min: e !== void 0 ? t.min + e : void 0,
|
|
3644
3644
|
max: n !== void 0 ? t.max + n - (t.max - t.min) : void 0
|
|
@@ -3646,18 +3646,18 @@ function is(t, e, n) {
|
|
|
3646
3646
|
}
|
|
3647
3647
|
function pc(t, { top: e, left: n, bottom: i, right: s }) {
|
|
3648
3648
|
return {
|
|
3649
|
-
x:
|
|
3650
|
-
y:
|
|
3649
|
+
x: ss(t.x, n, s),
|
|
3650
|
+
y: ss(t.y, e, i)
|
|
3651
3651
|
};
|
|
3652
3652
|
}
|
|
3653
|
-
function
|
|
3653
|
+
function rs(t, e) {
|
|
3654
3654
|
let n = e.min - t.min, i = e.max - t.max;
|
|
3655
3655
|
return e.max - e.min < t.max - t.min && ([n, i] = [i, n]), { min: n, max: i };
|
|
3656
3656
|
}
|
|
3657
3657
|
function mc(t, e) {
|
|
3658
3658
|
return {
|
|
3659
|
-
x:
|
|
3660
|
-
y:
|
|
3659
|
+
x: rs(t.x, e.x),
|
|
3660
|
+
y: rs(t.y, e.y)
|
|
3661
3661
|
};
|
|
3662
3662
|
}
|
|
3663
3663
|
function gc(t, e) {
|
|
@@ -3669,33 +3669,33 @@ function yc(t, e) {
|
|
|
3669
3669
|
const n = {};
|
|
3670
3670
|
return e.min !== void 0 && (n.min = e.min - t.min), e.max !== void 0 && (n.max = e.max - t.min), n;
|
|
3671
3671
|
}
|
|
3672
|
-
const
|
|
3673
|
-
function vc(t =
|
|
3674
|
-
return t === !1 ? t = 0 : t === !0 && (t =
|
|
3675
|
-
x:
|
|
3676
|
-
y:
|
|
3672
|
+
const bn = 0.35;
|
|
3673
|
+
function vc(t = bn) {
|
|
3674
|
+
return t === !1 ? t = 0 : t === !0 && (t = bn), {
|
|
3675
|
+
x: os(t, "left", "right"),
|
|
3676
|
+
y: os(t, "top", "bottom")
|
|
3677
3677
|
};
|
|
3678
3678
|
}
|
|
3679
|
-
function
|
|
3679
|
+
function os(t, e, n) {
|
|
3680
3680
|
return {
|
|
3681
|
-
min:
|
|
3682
|
-
max:
|
|
3681
|
+
min: as(t, e),
|
|
3682
|
+
max: as(t, n)
|
|
3683
3683
|
};
|
|
3684
3684
|
}
|
|
3685
|
-
function
|
|
3685
|
+
function as(t, e) {
|
|
3686
3686
|
return typeof t == "number" ? t : t[e] || 0;
|
|
3687
3687
|
}
|
|
3688
|
-
const
|
|
3688
|
+
const ls = () => ({
|
|
3689
3689
|
translate: 0,
|
|
3690
3690
|
scale: 1,
|
|
3691
3691
|
origin: 0,
|
|
3692
3692
|
originPoint: 0
|
|
3693
3693
|
}), _t = () => ({
|
|
3694
|
-
x: as(),
|
|
3695
|
-
y: as()
|
|
3696
|
-
}), ls = () => ({ min: 0, max: 0 }), B = () => ({
|
|
3697
3694
|
x: ls(),
|
|
3698
3695
|
y: ls()
|
|
3696
|
+
}), us = () => ({ min: 0, max: 0 }), B = () => ({
|
|
3697
|
+
x: us(),
|
|
3698
|
+
y: us()
|
|
3699
3699
|
});
|
|
3700
3700
|
function et(t) {
|
|
3701
3701
|
return [t("x"), t("y")];
|
|
@@ -3720,35 +3720,35 @@ function xc(t, e) {
|
|
|
3720
3720
|
right: i.x
|
|
3721
3721
|
};
|
|
3722
3722
|
}
|
|
3723
|
-
function
|
|
3723
|
+
function an(t) {
|
|
3724
3724
|
return t === void 0 || t === 1;
|
|
3725
3725
|
}
|
|
3726
|
-
function
|
|
3727
|
-
return !
|
|
3726
|
+
function wn({ scale: t, scaleX: e, scaleY: n }) {
|
|
3727
|
+
return !an(t) || !an(e) || !an(n);
|
|
3728
3728
|
}
|
|
3729
3729
|
function St(t) {
|
|
3730
|
-
return
|
|
3730
|
+
return wn(t) || so(t) || t.z || t.rotate || t.rotateX || t.rotateY || t.skewX || t.skewY;
|
|
3731
3731
|
}
|
|
3732
3732
|
function so(t) {
|
|
3733
|
-
return
|
|
3733
|
+
return cs(t.x) || cs(t.y);
|
|
3734
3734
|
}
|
|
3735
|
-
function
|
|
3735
|
+
function cs(t) {
|
|
3736
3736
|
return t && t !== "0%";
|
|
3737
3737
|
}
|
|
3738
|
-
function
|
|
3738
|
+
function ke(t, e, n) {
|
|
3739
3739
|
const i = t - n, s = e * i;
|
|
3740
3740
|
return n + s;
|
|
3741
3741
|
}
|
|
3742
|
-
function
|
|
3743
|
-
return s !== void 0 && (t =
|
|
3742
|
+
function hs(t, e, n, i, s) {
|
|
3743
|
+
return s !== void 0 && (t = ke(t, s, i)), ke(t, n, i) + e;
|
|
3744
3744
|
}
|
|
3745
|
-
function
|
|
3746
|
-
t.min =
|
|
3745
|
+
function Sn(t, e = 0, n = 1, i, s) {
|
|
3746
|
+
t.min = hs(t.min, e, n, i, s), t.max = hs(t.max, e, n, i, s);
|
|
3747
3747
|
}
|
|
3748
3748
|
function ro(t, { x: e, y: n }) {
|
|
3749
|
-
|
|
3749
|
+
Sn(t.x, e.translate, e.scale, e.originPoint), Sn(t.y, n.translate, n.scale, n.originPoint);
|
|
3750
3750
|
}
|
|
3751
|
-
const
|
|
3751
|
+
const fs = 0.999999999999, ds = 1.0000000000001;
|
|
3752
3752
|
function Tc(t, e, n, i = !1) {
|
|
3753
3753
|
const s = n.length;
|
|
3754
3754
|
if (!s)
|
|
@@ -3763,17 +3763,17 @@ function Tc(t, e, n, i = !1) {
|
|
|
3763
3763
|
y: -o.scroll.offset.y
|
|
3764
3764
|
}), r && (e.x *= r.x.scale, e.y *= r.y.scale, ro(t, r)), i && St(o.latestValues) && It(t, o.latestValues));
|
|
3765
3765
|
}
|
|
3766
|
-
e.x <
|
|
3766
|
+
e.x < ds && e.x > fs && (e.x = 1), e.y < ds && e.y > fs && (e.y = 1);
|
|
3767
3767
|
}
|
|
3768
3768
|
function Bt(t, e) {
|
|
3769
3769
|
t.min = t.min + e, t.max = t.max + e;
|
|
3770
3770
|
}
|
|
3771
|
-
function
|
|
3771
|
+
function ps(t, e, n, i, s = 0.5) {
|
|
3772
3772
|
const o = j(t.min, t.max, s);
|
|
3773
|
-
|
|
3773
|
+
Sn(t, e, n, o, i);
|
|
3774
3774
|
}
|
|
3775
3775
|
function It(t, e) {
|
|
3776
|
-
|
|
3776
|
+
ps(t.x, e.x, e.scaleX, e.scale, e.originX), ps(t.y, e.y, e.scaleY, e.scale, e.originY);
|
|
3777
3777
|
}
|
|
3778
3778
|
function oo(t, e) {
|
|
3779
3779
|
return io(xc(t.getBoundingClientRect(), e));
|
|
@@ -3793,7 +3793,7 @@ class Sc {
|
|
|
3793
3793
|
return;
|
|
3794
3794
|
const s = (c) => {
|
|
3795
3795
|
const { dragSnapToOrigin: h } = this.getProps();
|
|
3796
|
-
h ? this.pauseAnimation() : this.stopAnimation(), n && this.snapToCursor(
|
|
3796
|
+
h ? this.pauseAnimation() : this.stopAnimation(), n && this.snapToCursor(Ie(c, "page").point);
|
|
3797
3797
|
}, o = (c, h) => {
|
|
3798
3798
|
var d;
|
|
3799
3799
|
const { drag: p, dragPropagation: g, onDragStart: P } = this.getProps();
|
|
@@ -3804,12 +3804,12 @@ class Sc {
|
|
|
3804
3804
|
if (st.test(y)) {
|
|
3805
3805
|
const { projection: v } = this.visualElement;
|
|
3806
3806
|
if (v && v.layout) {
|
|
3807
|
-
const
|
|
3808
|
-
|
|
3807
|
+
const C = v.layout.layoutBox[x];
|
|
3808
|
+
C && (y = X(C) * (parseFloat(y) / 100));
|
|
3809
3809
|
}
|
|
3810
3810
|
}
|
|
3811
3811
|
this.originPoint[x] = y;
|
|
3812
|
-
}), P && M.postRender(() => P(c, h)), (d = this.removeWillChange) === null || d === void 0 || d.call(this), this.removeWillChange =
|
|
3812
|
+
}), P && M.postRender(() => P(c, h)), (d = this.removeWillChange) === null || d === void 0 || d.call(this), this.removeWillChange = xn(this.visualElement, "transform");
|
|
3813
3813
|
const { animationState: b } = this.visualElement;
|
|
3814
3814
|
b && b.setActive("whileDrag", !0);
|
|
3815
3815
|
}, r = (c, h) => {
|
|
@@ -3818,7 +3818,7 @@ class Sc {
|
|
|
3818
3818
|
return;
|
|
3819
3819
|
const { offset: b } = h;
|
|
3820
3820
|
if (p && this.currentDirection === null) {
|
|
3821
|
-
this.currentDirection =
|
|
3821
|
+
this.currentDirection = Cc(b), this.currentDirection !== null && g && g(this.currentDirection);
|
|
3822
3822
|
return;
|
|
3823
3823
|
}
|
|
3824
3824
|
this.updateAxis("x", h.point, b), this.updateAxis("y", h.point, b), this.visualElement.render(), P && P(c, h);
|
|
@@ -3911,7 +3911,7 @@ class Sc {
|
|
|
3911
3911
|
}
|
|
3912
3912
|
startAxisValueAnimation(e, n) {
|
|
3913
3913
|
const i = this.getAxisMotionValue(e);
|
|
3914
|
-
return i.start(
|
|
3914
|
+
return i.start(ti(e, i, 0, n, this.visualElement, !1, xn(this.visualElement, e)));
|
|
3915
3915
|
}
|
|
3916
3916
|
stopAnimation() {
|
|
3917
3917
|
et((e) => this.getAxisMotionValue(e).stop());
|
|
@@ -3999,7 +3999,7 @@ class Sc {
|
|
|
3999
3999
|
};
|
|
4000
4000
|
}
|
|
4001
4001
|
getProps() {
|
|
4002
|
-
const e = this.visualElement.getProps(), { drag: n = !1, dragDirectionLock: i = !1, dragPropagation: s = !1, dragConstraints: o = !1, dragElastic: r =
|
|
4002
|
+
const e = this.visualElement.getProps(), { drag: n = !1, dragDirectionLock: i = !1, dragPropagation: s = !1, dragConstraints: o = !1, dragElastic: r = bn, dragMomentum: a = !0 } = e;
|
|
4003
4003
|
return {
|
|
4004
4004
|
...e,
|
|
4005
4005
|
drag: n,
|
|
@@ -4014,11 +4014,11 @@ class Sc {
|
|
|
4014
4014
|
function Te(t, e, n) {
|
|
4015
4015
|
return (e === !0 || e === t) && (n === null || n === t);
|
|
4016
4016
|
}
|
|
4017
|
-
function
|
|
4017
|
+
function Cc(t, e = 10) {
|
|
4018
4018
|
let n = null;
|
|
4019
4019
|
return Math.abs(t.y) > e ? n = "y" : Math.abs(t.x) > e && (n = "x"), n;
|
|
4020
4020
|
}
|
|
4021
|
-
class
|
|
4021
|
+
class Ac extends xt {
|
|
4022
4022
|
constructor(e) {
|
|
4023
4023
|
super(e), this.removeGroupControls = W, this.removeListeners = W, this.controls = new Sc(e);
|
|
4024
4024
|
}
|
|
@@ -4030,7 +4030,7 @@ class Cc extends xt {
|
|
|
4030
4030
|
this.removeGroupControls(), this.removeListeners();
|
|
4031
4031
|
}
|
|
4032
4032
|
}
|
|
4033
|
-
const
|
|
4033
|
+
const ms = (t) => (e, n) => {
|
|
4034
4034
|
t && M.postRender(() => t(e, n));
|
|
4035
4035
|
};
|
|
4036
4036
|
class Rc extends xt {
|
|
@@ -4046,8 +4046,8 @@ class Rc extends xt {
|
|
|
4046
4046
|
createPanHandlers() {
|
|
4047
4047
|
const { onPanSessionStart: e, onPanStart: n, onPan: i, onPanEnd: s } = this.node.getProps();
|
|
4048
4048
|
return {
|
|
4049
|
-
onSessionStart:
|
|
4050
|
-
onStart:
|
|
4049
|
+
onSessionStart: ms(e),
|
|
4050
|
+
onStart: ms(n),
|
|
4051
4051
|
onMove: i,
|
|
4052
4052
|
onEnd: (o, r) => {
|
|
4053
4053
|
delete this.session, s && M.postRender(() => s(o, r));
|
|
@@ -4065,15 +4065,15 @@ class Rc extends xt {
|
|
|
4065
4065
|
}
|
|
4066
4066
|
}
|
|
4067
4067
|
function Vc() {
|
|
4068
|
-
const t = U(
|
|
4068
|
+
const t = U(je);
|
|
4069
4069
|
if (t === null)
|
|
4070
4070
|
return [!0, null];
|
|
4071
|
-
const { isPresent: e, onExitComplete: n, register: i } = t, s =
|
|
4071
|
+
const { isPresent: e, onExitComplete: n, register: i } = t, s = Rn();
|
|
4072
4072
|
gt(() => i(s), []);
|
|
4073
4073
|
const o = pt(() => n && n(s), [s, n]);
|
|
4074
4074
|
return !e && n ? [!1, o] : [!0];
|
|
4075
4075
|
}
|
|
4076
|
-
const
|
|
4076
|
+
const Ce = {
|
|
4077
4077
|
/**
|
|
4078
4078
|
* Global flag as to whether the tree has animated since the last time
|
|
4079
4079
|
* we resized the window
|
|
@@ -4085,7 +4085,7 @@ const Ae = {
|
|
|
4085
4085
|
*/
|
|
4086
4086
|
hasEverUpdated: !1
|
|
4087
4087
|
};
|
|
4088
|
-
function
|
|
4088
|
+
function gs(t, e) {
|
|
4089
4089
|
return e.max === e.min ? 0 : t / (e.max - e.min) * 100;
|
|
4090
4090
|
}
|
|
4091
4091
|
const Xt = {
|
|
@@ -4097,7 +4097,7 @@ const Xt = {
|
|
|
4097
4097
|
t = parseFloat(t);
|
|
4098
4098
|
else
|
|
4099
4099
|
return t;
|
|
4100
|
-
const n =
|
|
4100
|
+
const n = gs(t, e.target.x), i = gs(t, e.target.y);
|
|
4101
4101
|
return `${n}% ${i}%`;
|
|
4102
4102
|
}
|
|
4103
4103
|
}, Ec = {
|
|
@@ -4124,7 +4124,7 @@ class Dc extends Xo {
|
|
|
4124
4124
|
}), o.setOptions({
|
|
4125
4125
|
...o.options,
|
|
4126
4126
|
onExitComplete: () => this.safeToRemove()
|
|
4127
|
-
})),
|
|
4127
|
+
})), Ce.hasEverUpdated = !0;
|
|
4128
4128
|
}
|
|
4129
4129
|
getSnapshotBeforeUpdate(e) {
|
|
4130
4130
|
const { layoutDependency: n, visualElement: i, drag: s, isPresent: o } = this.props, r = i.projection;
|
|
@@ -4135,7 +4135,7 @@ class Dc extends Xo {
|
|
|
4135
4135
|
}
|
|
4136
4136
|
componentDidUpdate() {
|
|
4137
4137
|
const { projection: e } = this.props.visualElement;
|
|
4138
|
-
e && (e.root.didUpdate(),
|
|
4138
|
+
e && (e.root.didUpdate(), Mn.postRender(() => {
|
|
4139
4139
|
!e.currentAnimation && e.isLead() && this.safeToRemove();
|
|
4140
4140
|
}));
|
|
4141
4141
|
}
|
|
@@ -4152,7 +4152,7 @@ class Dc extends Xo {
|
|
|
4152
4152
|
}
|
|
4153
4153
|
}
|
|
4154
4154
|
function lo(t) {
|
|
4155
|
-
const [e, n] = Vc(), i = U(
|
|
4155
|
+
const [e, n] = Vc(), i = U(jn);
|
|
4156
4156
|
return O.jsx(Dc, { ...t, layoutGroup: i, switchLayoutGroup: U(Zs), isPresent: e, safeToRemove: n });
|
|
4157
4157
|
}
|
|
4158
4158
|
const Mc = {
|
|
@@ -4170,7 +4170,7 @@ const Mc = {
|
|
|
4170
4170
|
borderBottomLeftRadius: Xt,
|
|
4171
4171
|
borderBottomRightRadius: Xt,
|
|
4172
4172
|
boxShadow: Ec
|
|
4173
|
-
}, uo = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"], kc = uo.length,
|
|
4173
|
+
}, uo = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"], kc = uo.length, ys = (t) => typeof t == "string" ? parseFloat(t) : t, vs = (t) => typeof t == "number" || S.test(t);
|
|
4174
4174
|
function Lc(t, e, n, i, s, o) {
|
|
4175
4175
|
s ? (t.opacity = j(
|
|
4176
4176
|
0,
|
|
@@ -4180,50 +4180,50 @@ function Lc(t, e, n, i, s, o) {
|
|
|
4180
4180
|
), t.opacityExit = j(e.opacity !== void 0 ? e.opacity : 1, 0, Oc(i))) : o && (t.opacity = j(e.opacity !== void 0 ? e.opacity : 1, n.opacity !== void 0 ? n.opacity : 1, i));
|
|
4181
4181
|
for (let r = 0; r < kc; r++) {
|
|
4182
4182
|
const a = `border${uo[r]}Radius`;
|
|
4183
|
-
let l =
|
|
4183
|
+
let l = Ps(e, a), u = Ps(n, a);
|
|
4184
4184
|
if (l === void 0 && u === void 0)
|
|
4185
4185
|
continue;
|
|
4186
|
-
l || (l = 0), u || (u = 0), l === 0 || u === 0 ||
|
|
4186
|
+
l || (l = 0), u || (u = 0), l === 0 || u === 0 || vs(l) === vs(u) ? (t[a] = Math.max(j(ys(l), ys(u), i), 0), (st.test(u) || st.test(l)) && (t[a] += "%")) : t[a] = u;
|
|
4187
4187
|
}
|
|
4188
4188
|
(e.rotate || n.rotate) && (t.rotate = j(e.rotate || 0, n.rotate || 0, i));
|
|
4189
4189
|
}
|
|
4190
|
-
function
|
|
4190
|
+
function Ps(t, e) {
|
|
4191
4191
|
return t[e] !== void 0 ? t[e] : t.borderRadius;
|
|
4192
4192
|
}
|
|
4193
4193
|
const jc = co(0, 0.5, $r), Oc = co(0.5, 0.95, W);
|
|
4194
4194
|
function co(t, e, n) {
|
|
4195
4195
|
return (i) => i < t ? 0 : i > e ? 1 : n(oe(t, e, i));
|
|
4196
4196
|
}
|
|
4197
|
-
function
|
|
4197
|
+
function xs(t, e) {
|
|
4198
4198
|
t.min = e.min, t.max = e.max;
|
|
4199
4199
|
}
|
|
4200
4200
|
function tt(t, e) {
|
|
4201
|
-
|
|
4201
|
+
xs(t.x, e.x), xs(t.y, e.y);
|
|
4202
4202
|
}
|
|
4203
|
-
function
|
|
4203
|
+
function Ts(t, e) {
|
|
4204
4204
|
t.translate = e.translate, t.scale = e.scale, t.originPoint = e.originPoint, t.origin = e.origin;
|
|
4205
4205
|
}
|
|
4206
|
-
function
|
|
4207
|
-
return t -= e, t =
|
|
4206
|
+
function bs(t, e, n, i, s) {
|
|
4207
|
+
return t -= e, t = ke(t, 1 / n, i), s !== void 0 && (t = ke(t, 1 / s, i)), t;
|
|
4208
4208
|
}
|
|
4209
4209
|
function Fc(t, e = 0, n = 1, i = 0.5, s, o = t, r = t) {
|
|
4210
4210
|
if (st.test(e) && (e = parseFloat(e), e = j(r.min, r.max, e / 100) - r.min), typeof e != "number")
|
|
4211
4211
|
return;
|
|
4212
4212
|
let a = j(o.min, o.max, i);
|
|
4213
|
-
t === o && (a -= e), t.min =
|
|
4213
|
+
t === o && (a -= e), t.min = bs(t.min, e, n, a, s), t.max = bs(t.max, e, n, a, s);
|
|
4214
4214
|
}
|
|
4215
|
-
function
|
|
4215
|
+
function ws(t, e, [n, i, s], o, r) {
|
|
4216
4216
|
Fc(t, e[n], e[i], e[s], e.scale, o, r);
|
|
4217
4217
|
}
|
|
4218
4218
|
const _c = ["x", "scaleX", "originX"], Bc = ["y", "scaleY", "originY"];
|
|
4219
|
-
function
|
|
4220
|
-
|
|
4219
|
+
function Ss(t, e, n, i) {
|
|
4220
|
+
ws(t.x, e, _c, n ? n.x : void 0, i ? i.x : void 0), ws(t.y, e, Bc, n ? n.y : void 0, i ? i.y : void 0);
|
|
4221
4221
|
}
|
|
4222
|
-
function
|
|
4222
|
+
function Cs(t) {
|
|
4223
4223
|
return t.translate === 0 && t.scale === 1;
|
|
4224
4224
|
}
|
|
4225
4225
|
function ho(t) {
|
|
4226
|
-
return
|
|
4226
|
+
return Cs(t.x) && Cs(t.y);
|
|
4227
4227
|
}
|
|
4228
4228
|
function As(t, e) {
|
|
4229
4229
|
return t.min === e.min && t.max === e.max;
|
|
@@ -4231,16 +4231,16 @@ function As(t, e) {
|
|
|
4231
4231
|
function Ic(t, e) {
|
|
4232
4232
|
return As(t.x, e.x) && As(t.y, e.y);
|
|
4233
4233
|
}
|
|
4234
|
-
function
|
|
4234
|
+
function Rs(t, e) {
|
|
4235
4235
|
return Math.round(t.min) === Math.round(e.min) && Math.round(t.max) === Math.round(e.max);
|
|
4236
4236
|
}
|
|
4237
4237
|
function fo(t, e) {
|
|
4238
|
-
return
|
|
4238
|
+
return Rs(t.x, e.x) && Rs(t.y, e.y);
|
|
4239
4239
|
}
|
|
4240
|
-
function
|
|
4240
|
+
function Vs(t) {
|
|
4241
4241
|
return X(t.x) / X(t.y);
|
|
4242
4242
|
}
|
|
4243
|
-
function
|
|
4243
|
+
function Es(t, e) {
|
|
4244
4244
|
return t.translate === e.translate && t.scale === e.scale && t.originPoint === e.originPoint;
|
|
4245
4245
|
}
|
|
4246
4246
|
class Nc {
|
|
@@ -4248,10 +4248,10 @@ class Nc {
|
|
|
4248
4248
|
this.members = [];
|
|
4249
4249
|
}
|
|
4250
4250
|
add(e) {
|
|
4251
|
-
|
|
4251
|
+
_e(this.members, e), e.scheduleRender();
|
|
4252
4252
|
}
|
|
4253
4253
|
remove(e) {
|
|
4254
|
-
if (
|
|
4254
|
+
if (Be(this.members, e), e === this.prevLead && (this.prevLead = void 0), e === this.lead) {
|
|
4255
4255
|
const n = this.members[this.members.length - 1];
|
|
4256
4256
|
n && this.promote(n);
|
|
4257
4257
|
}
|
|
@@ -4313,10 +4313,10 @@ class $c {
|
|
|
4313
4313
|
this.children = [], this.isDirty = !1;
|
|
4314
4314
|
}
|
|
4315
4315
|
add(e) {
|
|
4316
|
-
|
|
4316
|
+
_e(this.children, e), this.isDirty = !0;
|
|
4317
4317
|
}
|
|
4318
4318
|
remove(e) {
|
|
4319
|
-
|
|
4319
|
+
Be(this.children, e), this.isDirty = !0;
|
|
4320
4320
|
}
|
|
4321
4321
|
forEach(e) {
|
|
4322
4322
|
this.isDirty && this.children.sort(Wc), this.isDirty = !1, this.children.forEach(e);
|
|
@@ -4334,16 +4334,16 @@ function Gc(t) {
|
|
|
4334
4334
|
}
|
|
4335
4335
|
function zc(t, e, n) {
|
|
4336
4336
|
const i = K(t) ? t : ae(t);
|
|
4337
|
-
return i.start(
|
|
4337
|
+
return i.start(ti("", i, e, n)), i.animation;
|
|
4338
4338
|
}
|
|
4339
|
-
const
|
|
4339
|
+
const Ct = {
|
|
4340
4340
|
type: "projectionFrame",
|
|
4341
4341
|
totalNodes: 0,
|
|
4342
4342
|
resolvedTargetDeltas: 0,
|
|
4343
4343
|
recalculatedProjection: 0
|
|
4344
|
-
}, Zt = typeof window < "u" && window.MotionDebug !== void 0,
|
|
4344
|
+
}, Zt = typeof window < "u" && window.MotionDebug !== void 0, ln = ["", "X", "Y", "Z"], Hc = { visibility: "hidden" }, Ds = 1e3;
|
|
4345
4345
|
let Yc = 0;
|
|
4346
|
-
function
|
|
4346
|
+
function un(t, e, n, i) {
|
|
4347
4347
|
const { latestValues: s } = e;
|
|
4348
4348
|
s[t] && (n[t] = s[t], e.setStaticValue(t, 0), i && (i[t] = 0));
|
|
4349
4349
|
}
|
|
@@ -4359,14 +4359,14 @@ function mo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4359
4359
|
this.id = Yc++, 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 = () => {
|
|
4360
4360
|
this.isUpdating && (this.isUpdating = !1, this.clearAllSnapshots());
|
|
4361
4361
|
}, this.updateProjection = () => {
|
|
4362
|
-
this.projectionUpdateScheduled = !1, Zt && (
|
|
4362
|
+
this.projectionUpdateScheduled = !1, Zt && (Ct.totalNodes = Ct.resolvedTargetDeltas = Ct.recalculatedProjection = 0), this.nodes.forEach(Zc), this.nodes.forEach(nh), this.nodes.forEach(ih), this.nodes.forEach(Jc), Zt && window.MotionDebug.record(Ct);
|
|
4363
4363
|
}, 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;
|
|
4364
4364
|
for (let l = 0; l < this.path.length; l++)
|
|
4365
4365
|
this.path[l].shouldResetTransform = !0;
|
|
4366
4366
|
this.root === this && (this.nodes = new $c());
|
|
4367
4367
|
}
|
|
4368
4368
|
addEventListener(r, a) {
|
|
4369
|
-
return this.eventHandlers.has(r) || this.eventHandlers.set(r, new
|
|
4369
|
+
return this.eventHandlers.has(r) || this.eventHandlers.set(r, new ei()), this.eventHandlers.get(r).add(a);
|
|
4370
4370
|
}
|
|
4371
4371
|
notifyListeners(r, ...a) {
|
|
4372
4372
|
const l = this.eventHandlers.get(r);
|
|
@@ -4387,7 +4387,7 @@ function mo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4387
4387
|
let h;
|
|
4388
4388
|
const d = () => this.root.updateBlockedByResize = !1;
|
|
4389
4389
|
t(r, () => {
|
|
4390
|
-
this.root.updateBlockedByResize = !0, h && h(), h = Kc(d, 250),
|
|
4390
|
+
this.root.updateBlockedByResize = !0, h && h(), h = Kc(d, 250), Ce.hasAnimatedSinceResize && (Ce.hasAnimatedSinceResize = !1, this.nodes.forEach(ks));
|
|
4391
4391
|
});
|
|
4392
4392
|
}
|
|
4393
4393
|
l && this.root.registerSharedNode(l, this), this.options.animate !== !1 && c && (l || u) && this.addEventListener("didUpdate", ({ delta: h, hasLayoutChanged: d, hasRelativeTargetChanged: p, layout: g }) => {
|
|
@@ -4398,14 +4398,14 @@ function mo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4398
4398
|
const P = this.options.transition || c.getDefaultTransition() || lh, { onLayoutAnimationStart: b, onLayoutAnimationComplete: x } = c.getProps(), y = !this.targetLayout || !fo(this.targetLayout, g) || p, v = !d && p;
|
|
4399
4399
|
if (this.options.layoutRoot || this.resumeFrom && this.resumeFrom.instance || v || d && (y || !this.currentAnimation)) {
|
|
4400
4400
|
this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0), this.setAnimationOrigin(h, v);
|
|
4401
|
-
const
|
|
4402
|
-
...
|
|
4401
|
+
const C = {
|
|
4402
|
+
...Gn(P, "layout"),
|
|
4403
4403
|
onPlay: b,
|
|
4404
4404
|
onComplete: x
|
|
4405
4405
|
};
|
|
4406
|
-
(c.shouldReduceMotion || this.options.layoutRoot) && (
|
|
4406
|
+
(c.shouldReduceMotion || this.options.layoutRoot) && (C.delay = 0, C.type = !1), this.startAnimation(C);
|
|
4407
4407
|
} else
|
|
4408
|
-
d ||
|
|
4408
|
+
d || ks(this), this.isLead() && this.options.onExitComplete && this.options.onExitComplete();
|
|
4409
4409
|
this.targetLayout = g;
|
|
4410
4410
|
});
|
|
4411
4411
|
}
|
|
@@ -4455,15 +4455,15 @@ function mo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4455
4455
|
}
|
|
4456
4456
|
update() {
|
|
4457
4457
|
if (this.updateScheduled = !1, this.isUpdateBlocked()) {
|
|
4458
|
-
this.unblockUpdate(), this.clearAllSnapshots(), this.nodes.forEach(
|
|
4458
|
+
this.unblockUpdate(), this.clearAllSnapshots(), this.nodes.forEach(Ms);
|
|
4459
4459
|
return;
|
|
4460
4460
|
}
|
|
4461
4461
|
this.isUpdating || this.nodes.forEach(th), this.isUpdating = !1, this.nodes.forEach(eh), this.nodes.forEach(Xc), this.nodes.forEach(qc), this.clearAllSnapshots();
|
|
4462
4462
|
const a = mt.now();
|
|
4463
|
-
N.delta = yt(0, 1e3 / 60, a - N.timestamp), N.timestamp = a, N.isProcessing = !0,
|
|
4463
|
+
N.delta = yt(0, 1e3 / 60, a - N.timestamp), N.timestamp = a, N.isProcessing = !0, Ze.update.process(N), Ze.preRender.process(N), Ze.render.process(N), N.isProcessing = !1;
|
|
4464
4464
|
}
|
|
4465
4465
|
didUpdate() {
|
|
4466
|
-
this.updateScheduled || (this.updateScheduled = !0,
|
|
4466
|
+
this.updateScheduled || (this.updateScheduled = !0, Mn.read(this.scheduleUpdate));
|
|
4467
4467
|
}
|
|
4468
4468
|
clearAllSnapshots() {
|
|
4469
4469
|
this.nodes.forEach(Qc), this.sharedNodes.forEach(rh);
|
|
@@ -4565,11 +4565,11 @@ function mo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4565
4565
|
const u = this.path[l];
|
|
4566
4566
|
if (!u.instance || !St(u.latestValues))
|
|
4567
4567
|
continue;
|
|
4568
|
-
|
|
4568
|
+
wn(u.latestValues) && u.updateSnapshot();
|
|
4569
4569
|
const c = B(), h = u.measurePageBox();
|
|
4570
|
-
tt(c, h),
|
|
4570
|
+
tt(c, h), Ss(a, u.latestValues, u.snapshot ? u.snapshot.layoutBox : void 0, c);
|
|
4571
4571
|
}
|
|
4572
|
-
return St(this.latestValues) &&
|
|
4572
|
+
return St(this.latestValues) && Ss(a, this.latestValues), a;
|
|
4573
4573
|
}
|
|
4574
4574
|
setTargetDelta(r) {
|
|
4575
4575
|
this.targetDelta = r, this.root.scheduleUpdateProjection(), this.isProjectionDirty = !0;
|
|
@@ -4606,12 +4606,12 @@ function mo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4606
4606
|
const p = this.getClosestProjectingParent();
|
|
4607
4607
|
p && !!p.resumingFrom == !!this.resumingFrom && !p.options.layoutScroll && p.target && this.animationProgress !== 1 ? (this.relativeParent = p, this.forceRelativeParentToResolveTarget(), this.relativeTarget = B(), this.relativeTargetOrigin = B(), ne(this.relativeTargetOrigin, this.target, p.target), tt(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
|
|
4608
4608
|
}
|
|
4609
|
-
Zt &&
|
|
4609
|
+
Zt && Ct.resolvedTargetDeltas++;
|
|
4610
4610
|
}
|
|
4611
4611
|
}
|
|
4612
4612
|
}
|
|
4613
4613
|
getClosestProjectingParent() {
|
|
4614
|
-
if (!(!this.parent ||
|
|
4614
|
+
if (!(!this.parent || wn(this.parent.latestValues) || so(this.parent.latestValues)))
|
|
4615
4615
|
return this.parent.isProjecting() ? this.parent : this.parent.getClosestProjectingParent();
|
|
4616
4616
|
}
|
|
4617
4617
|
isProjecting() {
|
|
@@ -4634,7 +4634,7 @@ function mo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4634
4634
|
this.prevProjectionDelta && (this.createProjectionDeltas(), this.scheduleRender());
|
|
4635
4635
|
return;
|
|
4636
4636
|
}
|
|
4637
|
-
!this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (
|
|
4637
|
+
!this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (Ts(this.prevProjectionDelta.x, this.projectionDelta.x), Ts(this.prevProjectionDelta.y, this.projectionDelta.y)), ee(this.projectionDelta, this.layoutCorrected, g, this.latestValues), (this.treeScale.x !== d || this.treeScale.y !== p || !Es(this.projectionDelta.x, this.prevProjectionDelta.x) || !Es(this.projectionDelta.y, this.prevProjectionDelta.y)) && (this.hasProjected = !0, this.scheduleRender(), this.notifyListeners("projectionUpdate", g)), Zt && Ct.recalculatedProjection++;
|
|
4638
4638
|
}
|
|
4639
4639
|
hide() {
|
|
4640
4640
|
this.isVisible = !1;
|
|
@@ -4659,14 +4659,14 @@ function mo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4659
4659
|
const d = B(), p = l ? l.source : void 0, g = this.layout ? this.layout.source : void 0, P = p !== g, b = this.getStack(), x = !b || b.members.length <= 1, y = !!(P && !x && this.options.crossfade === !0 && !this.path.some(ah));
|
|
4660
4660
|
this.animationProgress = 0;
|
|
4661
4661
|
let v;
|
|
4662
|
-
this.mixTargetDelta = (
|
|
4663
|
-
const
|
|
4664
|
-
|
|
4662
|
+
this.mixTargetDelta = (C) => {
|
|
4663
|
+
const w = C / 1e3;
|
|
4664
|
+
Ls(h.x, r.x, w), Ls(h.y, r.y, w), this.setTargetDelta(h), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (ne(d, this.layout.layoutBox, this.relativeParent.layout.layoutBox), oh(this.relativeTarget, this.relativeTargetOrigin, d, w), v && Ic(this.relativeTarget, v) && (this.isProjectionDirty = !1), v || (v = B()), tt(v, this.relativeTarget)), P && (this.animationValues = c, Lc(c, u, this.latestValues, w, y, x)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = w;
|
|
4665
4665
|
}, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
|
|
4666
4666
|
}
|
|
4667
4667
|
startAnimation(r) {
|
|
4668
4668
|
this.notifyListeners("animationStart"), this.currentAnimation && this.currentAnimation.stop(), this.resumingFrom && this.resumingFrom.currentAnimation && this.resumingFrom.currentAnimation.stop(), this.pendingAnimation && (ht(this.pendingAnimation), this.pendingAnimation = void 0), this.pendingAnimation = M.update(() => {
|
|
4669
|
-
|
|
4669
|
+
Ce.hasAnimatedSinceResize = !0, this.currentAnimation = zc(0, Ds, {
|
|
4670
4670
|
...r,
|
|
4671
4671
|
onUpdate: (a) => {
|
|
4672
4672
|
this.mixTargetDelta(a), r.onUpdate && r.onUpdate(a);
|
|
@@ -4683,7 +4683,7 @@ function mo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4683
4683
|
r && r.exitAnimationComplete(), this.resumingFrom = this.currentAnimation = this.animationValues = void 0, this.notifyListeners("animationComplete");
|
|
4684
4684
|
}
|
|
4685
4685
|
finishAnimation() {
|
|
4686
|
-
this.currentAnimation && (this.mixTargetDelta && this.mixTargetDelta(
|
|
4686
|
+
this.currentAnimation && (this.mixTargetDelta && this.mixTargetDelta(Ds), this.currentAnimation.stop()), this.completeAnimation();
|
|
4687
4687
|
}
|
|
4688
4688
|
applyTransformsToTarget() {
|
|
4689
4689
|
const r = this.getLead();
|
|
@@ -4743,9 +4743,9 @@ function mo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4743
4743
|
if ((l.z || l.rotate || l.rotateX || l.rotateY || l.rotateZ || l.skewX || l.skewY) && (a = !0), !a)
|
|
4744
4744
|
return;
|
|
4745
4745
|
const u = {};
|
|
4746
|
-
l.z &&
|
|
4747
|
-
for (let c = 0; c <
|
|
4748
|
-
|
|
4746
|
+
l.z && un("z", r, u, this.animationValues);
|
|
4747
|
+
for (let c = 0; c < ln.length; c++)
|
|
4748
|
+
un(`rotate${ln[c]}`, r, u, this.animationValues), un(`skew${ln[c]}`, r, u, this.animationValues);
|
|
4749
4749
|
r.render();
|
|
4750
4750
|
for (const c in u)
|
|
4751
4751
|
r.setStaticValue(c, u[c]), this.animationValues && (this.animationValues[c] = u[c]);
|
|
@@ -4771,14 +4771,14 @@ function mo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4771
4771
|
this.applyTransformsToTarget(), u.transform = Uc(this.projectionDeltaWithTransform, this.treeScale, d), c && (u.transform = c(d, u.transform));
|
|
4772
4772
|
const { x: p, y: g } = this.projectionDelta;
|
|
4773
4773
|
u.transformOrigin = `${p.origin * 100}% ${g.origin * 100}% 0`, h.animationValues ? u.opacity = h === this ? (l = (a = d.opacity) !== null && a !== void 0 ? a : this.latestValues.opacity) !== null && l !== void 0 ? l : 1 : this.preserveOpacity ? this.latestValues.opacity : d.opacityExit : u.opacity = h === this ? d.opacity !== void 0 ? d.opacity : "" : d.opacityExit !== void 0 ? d.opacityExit : 0;
|
|
4774
|
-
for (const P in
|
|
4774
|
+
for (const P in Re) {
|
|
4775
4775
|
if (d[P] === void 0)
|
|
4776
4776
|
continue;
|
|
4777
|
-
const { correct: b, applyTo: x } =
|
|
4777
|
+
const { correct: b, applyTo: x } = Re[P], y = u.transform === "none" ? d[P] : b(d[P], h);
|
|
4778
4778
|
if (x) {
|
|
4779
4779
|
const v = x.length;
|
|
4780
|
-
for (let
|
|
4781
|
-
u[x[
|
|
4780
|
+
for (let C = 0; C < v; C++)
|
|
4781
|
+
u[x[C]] = y;
|
|
4782
4782
|
} else
|
|
4783
4783
|
u[P] = y;
|
|
4784
4784
|
}
|
|
@@ -4792,7 +4792,7 @@ function mo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4792
4792
|
this.root.nodes.forEach((r) => {
|
|
4793
4793
|
var a;
|
|
4794
4794
|
return (a = r.currentAnimation) === null || a === void 0 ? void 0 : a.stop();
|
|
4795
|
-
}), this.root.nodes.forEach(
|
|
4795
|
+
}), this.root.nodes.forEach(Ms), this.root.sharedNodes.clear();
|
|
4796
4796
|
}
|
|
4797
4797
|
};
|
|
4798
4798
|
}
|
|
@@ -4844,7 +4844,7 @@ function qc(t) {
|
|
|
4844
4844
|
t.options.transition = void 0;
|
|
4845
4845
|
}
|
|
4846
4846
|
function Zc(t) {
|
|
4847
|
-
Zt &&
|
|
4847
|
+
Zt && Ct.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));
|
|
4848
4848
|
}
|
|
4849
4849
|
function Jc(t) {
|
|
4850
4850
|
t.isProjectionDirty = t.isSharedProjectionDirty = t.isTransformDirty = !1;
|
|
@@ -4852,7 +4852,7 @@ function Jc(t) {
|
|
|
4852
4852
|
function Qc(t) {
|
|
4853
4853
|
t.clearSnapshot();
|
|
4854
4854
|
}
|
|
4855
|
-
function
|
|
4855
|
+
function Ms(t) {
|
|
4856
4856
|
t.clearMeasurements();
|
|
4857
4857
|
}
|
|
4858
4858
|
function th(t) {
|
|
@@ -4862,7 +4862,7 @@ function eh(t) {
|
|
|
4862
4862
|
const { visualElement: e } = t.options;
|
|
4863
4863
|
e && e.getProps().onBeforeLayoutMeasure && e.notify("BeforeLayoutMeasure"), t.resetTransform();
|
|
4864
4864
|
}
|
|
4865
|
-
function
|
|
4865
|
+
function ks(t) {
|
|
4866
4866
|
t.finishAnimation(), t.targetDelta = t.relativeTarget = t.target = void 0, t.isProjectionDirty = !0;
|
|
4867
4867
|
}
|
|
4868
4868
|
function nh(t) {
|
|
@@ -4877,14 +4877,14 @@ function sh(t) {
|
|
|
4877
4877
|
function rh(t) {
|
|
4878
4878
|
t.removeLeadSnapshot();
|
|
4879
4879
|
}
|
|
4880
|
-
function
|
|
4880
|
+
function Ls(t, e, n) {
|
|
4881
4881
|
t.translate = j(e.translate, 0, n), t.scale = j(e.scale, 1, n), t.origin = e.origin, t.originPoint = e.originPoint;
|
|
4882
4882
|
}
|
|
4883
|
-
function
|
|
4883
|
+
function js(t, e, n, i) {
|
|
4884
4884
|
t.min = j(e.min, n.min, i), t.max = j(e.max, n.max, i);
|
|
4885
4885
|
}
|
|
4886
4886
|
function oh(t, e, n, i) {
|
|
4887
|
-
|
|
4887
|
+
js(t.x, e.x, n.x, i), js(t.y, e.y, n.y, i);
|
|
4888
4888
|
}
|
|
4889
4889
|
function ah(t) {
|
|
4890
4890
|
return t.animationValues && t.animationValues.opacityExit !== void 0;
|
|
@@ -4892,15 +4892,15 @@ function ah(t) {
|
|
|
4892
4892
|
const lh = {
|
|
4893
4893
|
duration: 0.45,
|
|
4894
4894
|
ease: [0.4, 0, 0.1, 1]
|
|
4895
|
-
},
|
|
4896
|
-
function
|
|
4897
|
-
t.min =
|
|
4895
|
+
}, Os = (t) => typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().includes(t), Fs = Os("applewebkit/") && !Os("chrome/") ? Math.round : W;
|
|
4896
|
+
function _s(t) {
|
|
4897
|
+
t.min = Fs(t.min), t.max = Fs(t.max);
|
|
4898
4898
|
}
|
|
4899
4899
|
function uh(t) {
|
|
4900
|
-
|
|
4900
|
+
_s(t.x), _s(t.y);
|
|
4901
4901
|
}
|
|
4902
4902
|
function go(t, e, n) {
|
|
4903
|
-
return t === "position" || t === "preserve-aspect" && !hc(
|
|
4903
|
+
return t === "position" || t === "preserve-aspect" && !hc(Vs(e), Vs(n), 0.2);
|
|
4904
4904
|
}
|
|
4905
4905
|
function ch(t) {
|
|
4906
4906
|
var e;
|
|
@@ -4913,7 +4913,7 @@ const hh = mo({
|
|
|
4913
4913
|
y: document.documentElement.scrollTop || document.body.scrollTop
|
|
4914
4914
|
}),
|
|
4915
4915
|
checkIsScrollRoot: () => !0
|
|
4916
|
-
}),
|
|
4916
|
+
}), cn = {
|
|
4917
4917
|
current: void 0
|
|
4918
4918
|
}, yo = mo({
|
|
4919
4919
|
measureScroll: (t) => ({
|
|
@@ -4921,11 +4921,11 @@ const hh = mo({
|
|
|
4921
4921
|
y: t.scrollTop
|
|
4922
4922
|
}),
|
|
4923
4923
|
defaultParent: () => {
|
|
4924
|
-
if (!
|
|
4924
|
+
if (!cn.current) {
|
|
4925
4925
|
const t = new hh({});
|
|
4926
|
-
t.mount(window), t.setOptions({ layoutScroll: !0 }),
|
|
4926
|
+
t.mount(window), t.setOptions({ layoutScroll: !0 }), cn.current = t;
|
|
4927
4927
|
}
|
|
4928
|
-
return
|
|
4928
|
+
return cn.current;
|
|
4929
4929
|
},
|
|
4930
4930
|
resetTransform: (t, e) => {
|
|
4931
4931
|
t.style.transform = e !== void 0 ? e : "none";
|
|
@@ -4936,24 +4936,24 @@ const hh = mo({
|
|
|
4936
4936
|
Feature: Rc
|
|
4937
4937
|
},
|
|
4938
4938
|
drag: {
|
|
4939
|
-
Feature:
|
|
4939
|
+
Feature: Ac,
|
|
4940
4940
|
ProjectionNode: yo,
|
|
4941
4941
|
MeasureLayout: lo
|
|
4942
4942
|
}
|
|
4943
|
-
},
|
|
4943
|
+
}, Cn = { current: null }, vo = { current: !1 };
|
|
4944
4944
|
function dh() {
|
|
4945
|
-
if (vo.current = !0, !!
|
|
4945
|
+
if (vo.current = !0, !!Dn)
|
|
4946
4946
|
if (window.matchMedia) {
|
|
4947
|
-
const t = window.matchMedia("(prefers-reduced-motion)"), e = () =>
|
|
4947
|
+
const t = window.matchMedia("(prefers-reduced-motion)"), e = () => Cn.current = t.matches;
|
|
4948
4948
|
t.addListener(e), e();
|
|
4949
4949
|
} else
|
|
4950
|
-
|
|
4950
|
+
Cn.current = !1;
|
|
4951
4951
|
}
|
|
4952
4952
|
function ph(t, e, n) {
|
|
4953
4953
|
for (const i in e) {
|
|
4954
4954
|
const s = e[i], o = n[i];
|
|
4955
4955
|
if (K(s))
|
|
4956
|
-
t.addValue(i, s), process.env.NODE_ENV === "development" &&
|
|
4956
|
+
t.addValue(i, s), process.env.NODE_ENV === "development" && ni(s.version === "11.3.19", `Attempting to mix Framer Motion versions ${s.version} with 11.3.19 may not work as expected.`);
|
|
4957
4957
|
else if (K(o))
|
|
4958
4958
|
t.addValue(i, ae(s, { owner: t }));
|
|
4959
4959
|
else if (o !== s)
|
|
@@ -4969,7 +4969,7 @@ function ph(t, e, n) {
|
|
|
4969
4969
|
e[i] === void 0 && t.removeValue(i);
|
|
4970
4970
|
return e;
|
|
4971
4971
|
}
|
|
4972
|
-
const
|
|
4972
|
+
const Bs = /* @__PURE__ */ new WeakMap(), mh = [...Sr, $, vt], gh = (t) => mh.find(wr(t)), Is = [
|
|
4973
4973
|
"AnimationStart",
|
|
4974
4974
|
"AnimationComplete",
|
|
4975
4975
|
"Update",
|
|
@@ -4977,7 +4977,7 @@ const _s = /* @__PURE__ */ new WeakMap(), mh = [...Sr, $, vt], gh = (t) => mh.fi
|
|
|
4977
4977
|
"LayoutMeasure",
|
|
4978
4978
|
"LayoutAnimationStart",
|
|
4979
4979
|
"LayoutAnimationComplete"
|
|
4980
|
-
], yh =
|
|
4980
|
+
], yh = Ln.length;
|
|
4981
4981
|
class vh {
|
|
4982
4982
|
/**
|
|
4983
4983
|
* This method takes React props and returns found MotionValues. For example, HTML
|
|
@@ -4990,13 +4990,13 @@ class vh {
|
|
|
4990
4990
|
return {};
|
|
4991
4991
|
}
|
|
4992
4992
|
constructor({ parent: e, props: n, presenceContext: i, reducedMotionConfig: s, blockInitialAnimation: o, visualState: r }, a = {}) {
|
|
4993
|
-
this.applyWillChange = !1, this.resolveKeyframes = (d, p, g, P) => new this.KeyframeResolver(d, p, g, P, this), this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver =
|
|
4993
|
+
this.applyWillChange = !1, this.resolveKeyframes = (d, p, g, P) => new this.KeyframeResolver(d, p, g, P, this), this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = zn, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
|
|
4994
4994
|
this.isRenderScheduled = !1, this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
|
|
4995
4995
|
}, this.isRenderScheduled = !1, this.scheduleRender = () => {
|
|
4996
4996
|
this.isRenderScheduled || (this.isRenderScheduled = !0, M.render(this.render, !1, !0));
|
|
4997
4997
|
};
|
|
4998
4998
|
const { latestValues: l, renderState: u } = r;
|
|
4999
|
-
this.latestValues = l, this.baseTarget = { ...l }, this.initialValues = n.initial ? { ...l } : {}, this.renderState = u, this.parent = e, this.props = n, this.presenceContext = i, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = s, this.options = a, this.blockInitialAnimation = !!o, this.isControllingVariants =
|
|
4999
|
+
this.latestValues = l, this.baseTarget = { ...l }, this.initialValues = n.initial ? { ...l } : {}, this.renderState = u, this.parent = e, this.props = n, this.presenceContext = i, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = s, this.options = a, this.blockInitialAnimation = !!o, this.isControllingVariants = Fe(n), this.isVariantNode = Qs(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(e && e.current);
|
|
5000
5000
|
const { willChange: c, ...h } = this.scrapeMotionValuesFromProps(n, {}, this);
|
|
5001
5001
|
for (const d in h) {
|
|
5002
5002
|
const p = h[d];
|
|
@@ -5004,10 +5004,10 @@ class vh {
|
|
|
5004
5004
|
}
|
|
5005
5005
|
}
|
|
5006
5006
|
mount(e) {
|
|
5007
|
-
this.current = e,
|
|
5007
|
+
this.current = e, Bs.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, i) => this.bindToMotionValue(i, n)), vo.current || dh(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : Cn.current, process.env.NODE_ENV !== "production" && ni(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);
|
|
5008
5008
|
}
|
|
5009
5009
|
unmount() {
|
|
5010
|
-
|
|
5010
|
+
Bs.delete(this.current), this.projection && this.projection.unmount(), ht(this.notifyUpdate), ht(this.render), this.valueSubscriptions.forEach((e) => e()), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent && this.parent.children.delete(this);
|
|
5011
5011
|
for (const e in this.events)
|
|
5012
5012
|
this.events[e].clear();
|
|
5013
5013
|
for (const e in this.features) {
|
|
@@ -5063,8 +5063,8 @@ class vh {
|
|
|
5063
5063
|
*/
|
|
5064
5064
|
update(e, n) {
|
|
5065
5065
|
(e.transformTemplate || this.props.transformTemplate) && this.scheduleRender(), this.prevProps = this.props, this.props = e, this.prevPresenceContext = this.presenceContext, this.presenceContext = n;
|
|
5066
|
-
for (let i = 0; i <
|
|
5067
|
-
const s =
|
|
5066
|
+
for (let i = 0; i < Is.length; i++) {
|
|
5067
|
+
const s = Is[i];
|
|
5068
5068
|
this.propEventSubscriptions[s] && (this.propEventSubscriptions[s](), delete this.propEventSubscriptions[s]);
|
|
5069
5069
|
const o = "on" + s, r = e[o];
|
|
5070
5070
|
r && (this.propEventSubscriptions[s] = this.on(s, r));
|
|
@@ -5101,7 +5101,7 @@ class vh {
|
|
|
5101
5101
|
}
|
|
5102
5102
|
const n = {};
|
|
5103
5103
|
for (let i = 0; i < yh; i++) {
|
|
5104
|
-
const s =
|
|
5104
|
+
const s = Ln[i], o = this.props[s];
|
|
5105
5105
|
(ie(o) || o === !1) && (n[s] = o);
|
|
5106
5106
|
}
|
|
5107
5107
|
return n;
|
|
@@ -5167,7 +5167,7 @@ class vh {
|
|
|
5167
5167
|
const { initial: i } = this.props;
|
|
5168
5168
|
let s;
|
|
5169
5169
|
if (typeof i == "string" || typeof i == "object") {
|
|
5170
|
-
const r =
|
|
5170
|
+
const r = $n(this.props, i, (n = this.presenceContext) === null || n === void 0 ? void 0 : n.custom);
|
|
5171
5171
|
r && (s = r[e]);
|
|
5172
5172
|
}
|
|
5173
5173
|
if (i && s !== void 0)
|
|
@@ -5176,7 +5176,7 @@ class vh {
|
|
|
5176
5176
|
return o !== void 0 && !K(o) ? o : this.initialValues[e] !== void 0 && s === void 0 ? void 0 : this.baseTarget[e];
|
|
5177
5177
|
}
|
|
5178
5178
|
on(e, n) {
|
|
5179
|
-
return this.events[e] || (this.events[e] = new
|
|
5179
|
+
return this.events[e] || (this.events[e] = new ei()), this.events[e].add(n);
|
|
5180
5180
|
}
|
|
5181
5181
|
notify(e, ...n) {
|
|
5182
5182
|
this.events[e] && this.events[e].notify(...n);
|
|
@@ -5205,7 +5205,7 @@ class xh extends Po {
|
|
|
5205
5205
|
}
|
|
5206
5206
|
readValueFromInstance(e, n) {
|
|
5207
5207
|
if (Pt.has(n)) {
|
|
5208
|
-
const i =
|
|
5208
|
+
const i = Yn(n);
|
|
5209
5209
|
return i && i.default || 0;
|
|
5210
5210
|
} else {
|
|
5211
5211
|
const i = Ph(e), s = (nr(n) ? i.getPropertyValue(n) : i[n]) || 0;
|
|
@@ -5216,10 +5216,10 @@ class xh extends Po {
|
|
|
5216
5216
|
return oo(e, n);
|
|
5217
5217
|
}
|
|
5218
5218
|
build(e, n, i) {
|
|
5219
|
-
|
|
5219
|
+
Bn(e, n, i.transformTemplate);
|
|
5220
5220
|
}
|
|
5221
5221
|
scrapeMotionValuesFromProps(e, n, i) {
|
|
5222
|
-
return
|
|
5222
|
+
return Wn(e, n, i);
|
|
5223
5223
|
}
|
|
5224
5224
|
handleChildMotionValue() {
|
|
5225
5225
|
this.childSubscription && (this.childSubscription(), delete this.childSubscription);
|
|
@@ -5238,25 +5238,25 @@ class Th extends Po {
|
|
|
5238
5238
|
}
|
|
5239
5239
|
readValueFromInstance(e, n) {
|
|
5240
5240
|
if (Pt.has(n)) {
|
|
5241
|
-
const i =
|
|
5241
|
+
const i = Yn(n);
|
|
5242
5242
|
return i && i.default || 0;
|
|
5243
5243
|
}
|
|
5244
|
-
return n = lr.has(n) ? n :
|
|
5244
|
+
return n = lr.has(n) ? n : Oe(n), e.getAttribute(n);
|
|
5245
5245
|
}
|
|
5246
5246
|
scrapeMotionValuesFromProps(e, n, i) {
|
|
5247
5247
|
return cr(e, n, i);
|
|
5248
5248
|
}
|
|
5249
5249
|
build(e, n, i) {
|
|
5250
|
-
|
|
5250
|
+
Nn(e, n, this.isSVGTag, i.transformTemplate);
|
|
5251
5251
|
}
|
|
5252
5252
|
renderInstance(e, n, i, s) {
|
|
5253
5253
|
ur(e, n, i, s);
|
|
5254
5254
|
}
|
|
5255
5255
|
mount(e) {
|
|
5256
|
-
this.isSVGTag =
|
|
5256
|
+
this.isSVGTag = Un(e.tagName), super.mount(e);
|
|
5257
5257
|
}
|
|
5258
5258
|
}
|
|
5259
|
-
const bh = (t, e) =>
|
|
5259
|
+
const bh = (t, e) => On(t) ? new Th(e) : new xh(e, {
|
|
5260
5260
|
allowProjection: t !== zs
|
|
5261
5261
|
}), wh = {
|
|
5262
5262
|
layout: {
|
|
@@ -5268,8 +5268,8 @@ const bh = (t, e) => jn(t) ? new Th(e) : new xh(e, {
|
|
|
5268
5268
|
...dl,
|
|
5269
5269
|
...fh,
|
|
5270
5270
|
...wh
|
|
5271
|
-
},
|
|
5272
|
-
class
|
|
5271
|
+
}, Ch = /* @__PURE__ */ Ta((t, e) => tl(t, e, Sh, bh));
|
|
5272
|
+
class Ah extends An.Component {
|
|
5273
5273
|
getSnapshotBeforeUpdate(e) {
|
|
5274
5274
|
const n = this.props.childRef.current;
|
|
5275
5275
|
if (n && e.isPresent && !this.props.isPresent) {
|
|
@@ -5288,13 +5288,13 @@ class Ch extends An.Component {
|
|
|
5288
5288
|
}
|
|
5289
5289
|
}
|
|
5290
5290
|
function Rh({ children: t, isPresent: e }) {
|
|
5291
|
-
const n =
|
|
5291
|
+
const n = Rn(), i = it(null), s = it({
|
|
5292
5292
|
width: 0,
|
|
5293
5293
|
height: 0,
|
|
5294
5294
|
top: 0,
|
|
5295
5295
|
left: 0
|
|
5296
|
-
}), { nonce: o } = U(
|
|
5297
|
-
return
|
|
5296
|
+
}), { nonce: o } = U(En);
|
|
5297
|
+
return Gs(() => {
|
|
5298
5298
|
const { width: r, height: a, top: l, left: u } = s.current;
|
|
5299
5299
|
if (e || !i.current || !r || !a)
|
|
5300
5300
|
return;
|
|
@@ -5311,10 +5311,10 @@ function Rh({ children: t, isPresent: e }) {
|
|
|
5311
5311
|
`), () => {
|
|
5312
5312
|
document.head.removeChild(c);
|
|
5313
5313
|
};
|
|
5314
|
-
}, [e]), O.jsx(
|
|
5314
|
+
}, [e]), O.jsx(Ah, { isPresent: e, childRef: i, sizeRef: s, children: An.cloneElement(t, { ref: i }) });
|
|
5315
5315
|
}
|
|
5316
5316
|
const Vh = ({ children: t, initial: e, isPresent: n, onExitComplete: i, custom: s, presenceAffectsLayout: o, mode: r }) => {
|
|
5317
|
-
const a =
|
|
5317
|
+
const a = Kn(Eh), l = Rn(), u = Vt(
|
|
5318
5318
|
() => ({
|
|
5319
5319
|
id: l,
|
|
5320
5320
|
initial: e,
|
|
@@ -5340,13 +5340,13 @@ const Vh = ({ children: t, initial: e, isPresent: n, onExitComplete: i, custom:
|
|
|
5340
5340
|
a.forEach((c, h) => a.set(h, !1));
|
|
5341
5341
|
}, [n]), An.useEffect(() => {
|
|
5342
5342
|
!n && !a.size && i && i();
|
|
5343
|
-
}, [n]), r === "popLayout" && (t = O.jsx(Rh, { isPresent: n, children: t })), O.jsx(
|
|
5343
|
+
}, [n]), r === "popLayout" && (t = O.jsx(Rh, { isPresent: n, children: t })), O.jsx(je.Provider, { value: u, children: t });
|
|
5344
5344
|
};
|
|
5345
5345
|
function Eh() {
|
|
5346
5346
|
return /* @__PURE__ */ new Map();
|
|
5347
5347
|
}
|
|
5348
5348
|
const be = (t) => t.key || "";
|
|
5349
|
-
function
|
|
5349
|
+
function Ns(t) {
|
|
5350
5350
|
const e = [];
|
|
5351
5351
|
return qo.forEach(t, (n) => {
|
|
5352
5352
|
Zo(n) && e.push(n);
|
|
@@ -5354,7 +5354,7 @@ function Is(t) {
|
|
|
5354
5354
|
}
|
|
5355
5355
|
const Dh = ({ children: t, exitBeforeEnter: e, custom: n, initial: i = !0, onExitComplete: s, presenceAffectsLayout: o = !0, mode: r = "sync" }) => {
|
|
5356
5356
|
ct(!e, "Replace exitBeforeEnter with mode='wait'");
|
|
5357
|
-
const a = Vt(() =>
|
|
5357
|
+
const a = Vt(() => Ns(t), [t]), l = a.map(be), u = it(!0), c = it(a), h = Kn(() => /* @__PURE__ */ new Map()), [d, p] = Jt(a), [g, P] = Jt(a);
|
|
5358
5358
|
Hs(() => {
|
|
5359
5359
|
u.current = !1, c.current = a;
|
|
5360
5360
|
for (let y = 0; y < g.length; y++) {
|
|
@@ -5366,16 +5366,16 @@ const Dh = ({ children: t, exitBeforeEnter: e, custom: n, initial: i = !0, onExi
|
|
|
5366
5366
|
if (a !== d) {
|
|
5367
5367
|
let y = [...a];
|
|
5368
5368
|
for (let v = 0; v < g.length; v++) {
|
|
5369
|
-
const
|
|
5370
|
-
l.includes(
|
|
5369
|
+
const C = g[v], w = be(C);
|
|
5370
|
+
l.includes(w) || (y.splice(v, 0, C), b.push(C));
|
|
5371
5371
|
}
|
|
5372
|
-
r === "wait" && b.length && (y = b), P(
|
|
5372
|
+
r === "wait" && b.length && (y = b), P(Ns(y)), p(a);
|
|
5373
5373
|
return;
|
|
5374
5374
|
}
|
|
5375
5375
|
process.env.NODE_ENV !== "production" && r === "wait" && g.length > 1 && console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);
|
|
5376
|
-
const { forceRender: x } = U(
|
|
5376
|
+
const { forceRender: x } = U(jn);
|
|
5377
5377
|
return O.jsx(O.Fragment, { children: g.map((y) => {
|
|
5378
|
-
const v = be(y),
|
|
5378
|
+
const v = be(y), C = a === g || l.includes(v), w = () => {
|
|
5379
5379
|
if (h.has(v))
|
|
5380
5380
|
h.set(v, !0);
|
|
5381
5381
|
else
|
|
@@ -5385,13 +5385,13 @@ const Dh = ({ children: t, exitBeforeEnter: e, custom: n, initial: i = !0, onExi
|
|
|
5385
5385
|
q || (L = !1);
|
|
5386
5386
|
}), L && (x == null || x(), P(c.current), s && s());
|
|
5387
5387
|
};
|
|
5388
|
-
return O.jsx(Vh, { isPresent:
|
|
5388
|
+
return O.jsx(Vh, { isPresent: C, initial: !u.current || i ? void 0 : !1, custom: C ? void 0 : n, presenceAffectsLayout: o, mode: r, onExitComplete: C ? void 0 : w, children: y }, v);
|
|
5389
5389
|
}) });
|
|
5390
|
-
},
|
|
5390
|
+
}, Us = ({
|
|
5391
5391
|
onKeydown: t
|
|
5392
5392
|
}) => (gt(() => (document.addEventListener("keydown", t), () => {
|
|
5393
5393
|
document.removeEventListener("keydown", t);
|
|
5394
|
-
}), []), null),
|
|
5394
|
+
}), []), null), Ws = ({
|
|
5395
5395
|
onMousedown: t
|
|
5396
5396
|
}) => (gt(() => (document.addEventListener("mousedown", t), () => {
|
|
5397
5397
|
document.removeEventListener("mousedown", t);
|
|
@@ -5399,7 +5399,7 @@ const Dh = ({ children: t, exitBeforeEnter: e, custom: n, initial: i = !0, onExi
|
|
|
5399
5399
|
onPickerHide: t
|
|
5400
5400
|
}) => (gt(() => () => {
|
|
5401
5401
|
t();
|
|
5402
|
-
}, []), null), kh = "acrool-react-picker__root", Lh = "acrool-react-picker__main-el",
|
|
5402
|
+
}, []), null), kh = "acrool-react-picker__root", Lh = "acrool-react-picker__main-el", $s = {
|
|
5403
5403
|
root: kh,
|
|
5404
5404
|
"main-el": "acrool-react-picker__main-el",
|
|
5405
5405
|
mainEl: Lh
|
|
@@ -5426,7 +5426,7 @@ const Dh = ({ children: t, exitBeforeEnter: e, custom: n, initial: i = !0, onExi
|
|
|
5426
5426
|
// right: position.horizontal === 'left' ? 'calc(100% - 1px)': undefined,
|
|
5427
5427
|
};
|
|
5428
5428
|
return /* @__PURE__ */ O.jsx(
|
|
5429
|
-
|
|
5429
|
+
Ch.div,
|
|
5430
5430
|
{
|
|
5431
5431
|
ref: n,
|
|
5432
5432
|
transition: { type: "spring", duration: 0.2 },
|
|
@@ -5439,7 +5439,7 @@ const Dh = ({ children: t, exitBeforeEnter: e, custom: n, initial: i = !0, onExi
|
|
|
5439
5439
|
children: e
|
|
5440
5440
|
}
|
|
5441
5441
|
);
|
|
5442
|
-
}, Bh =
|
|
5442
|
+
}, Bh = Ae(_h), Ih = (t) => {
|
|
5443
5443
|
if (!t)
|
|
5444
5444
|
return {
|
|
5445
5445
|
vertical: "bottom",
|
|
@@ -5452,73 +5452,75 @@ const Dh = ({ children: t, exitBeforeEnter: e, custom: n, initial: i = !0, onExi
|
|
|
5452
5452
|
};
|
|
5453
5453
|
};
|
|
5454
5454
|
function Gh(t, e) {
|
|
5455
|
-
|
|
5456
|
-
|
|
5455
|
+
const n = Ae(t);
|
|
5456
|
+
return Ae((s, o) => {
|
|
5457
|
+
const [r, a] = Jt(!1), [l, u] = Jt(!1), [c, h] = Jt(), d = it(null), p = it(null), g = it(c);
|
|
5457
5458
|
gt(() => {
|
|
5458
|
-
|
|
5459
|
-
}, [JSON.stringify(
|
|
5460
|
-
|
|
5461
|
-
}, [
|
|
5462
|
-
const
|
|
5463
|
-
[jt.Tab].includes(w.key) && (
|
|
5464
|
-
}, []), P = pt((w) => {
|
|
5465
|
-
([jt.ArrowUp, jt.ArrowDown, jt.Enter].includes(w.key) || w.code === "Space") && r(!0);
|
|
5459
|
+
h(s.value);
|
|
5460
|
+
}, [JSON.stringify(s.value)]), gt(() => {
|
|
5461
|
+
g.current = c;
|
|
5462
|
+
}, [c]);
|
|
5463
|
+
const P = pt((w) => {
|
|
5464
|
+
[jt.Tab].includes(w.key) && (a(!1), u(!1));
|
|
5466
5465
|
}, []), b = pt((w) => {
|
|
5467
|
-
|
|
5466
|
+
([jt.ArrowUp, jt.ArrowDown, jt.Enter].includes(w.key) || w.code === "Space") && a(!0);
|
|
5468
5467
|
}, []), x = pt((w) => {
|
|
5469
|
-
|
|
5470
|
-
}, []), y = pt(() => {
|
|
5471
|
-
|
|
5468
|
+
!d.current && p.current && !p.current.contains(w.target) && u(!1);
|
|
5469
|
+
}, []), y = pt((w) => {
|
|
5470
|
+
d.current && !d.current.contains(w.target) && p.current && !p.current.contains(w.target) && (a(!1), u(!1));
|
|
5471
|
+
}, []), v = pt(() => {
|
|
5472
|
+
if (typeof (s == null ? void 0 : s.onChange) > "u") {
|
|
5472
5473
|
wt.warning("@acrool/react-picker", "createPicker component props onChange is undefined, is no call");
|
|
5473
5474
|
return;
|
|
5474
5475
|
}
|
|
5475
|
-
|
|
5476
|
-
}, [
|
|
5477
|
-
[jt.Escape].includes(w.key) &&
|
|
5478
|
-
}, [
|
|
5476
|
+
typeof g.current < "u" && JSON.stringify(c) !== JSON.stringify(g.current) && s.onChange(g.current);
|
|
5477
|
+
}, [c, s.onChange]), C = pt((w) => {
|
|
5478
|
+
[jt.Escape].includes(w.key) && r && (w.stopPropagation(), a(!1));
|
|
5479
|
+
}, [r]);
|
|
5479
5480
|
return /* @__PURE__ */ O.jsx(
|
|
5480
|
-
|
|
5481
|
+
Vn.Provider,
|
|
5481
5482
|
{
|
|
5482
5483
|
value: {
|
|
5483
|
-
hide: () => requestAnimationFrame(() =>
|
|
5484
|
-
show: () =>
|
|
5485
|
-
toggle: () =>
|
|
5486
|
-
isVisible:
|
|
5487
|
-
inputFocus: () =>
|
|
5488
|
-
inputBlur: () =>
|
|
5489
|
-
isInputFocus:
|
|
5490
|
-
value:
|
|
5491
|
-
onChange:
|
|
5484
|
+
hide: () => requestAnimationFrame(() => a(!1)),
|
|
5485
|
+
show: () => a(!0),
|
|
5486
|
+
toggle: () => a((w) => !w),
|
|
5487
|
+
isVisible: r,
|
|
5488
|
+
inputFocus: () => u(!0),
|
|
5489
|
+
inputBlur: () => u(!1),
|
|
5490
|
+
isInputFocus: l,
|
|
5491
|
+
value: c,
|
|
5492
|
+
onChange: h
|
|
5492
5493
|
},
|
|
5493
|
-
children: /* @__PURE__ */ O.jsxs("div", { className:
|
|
5494
|
-
/* @__PURE__ */ O.jsx("div", { ref:
|
|
5495
|
-
|
|
5494
|
+
children: /* @__PURE__ */ O.jsxs("div", { className: $s.root, children: [
|
|
5495
|
+
/* @__PURE__ */ O.jsx("div", { ref: p, className: $s.mainEl, onKeyDown: C, children: /* @__PURE__ */ O.jsx(
|
|
5496
|
+
n,
|
|
5496
5497
|
{
|
|
5497
|
-
...
|
|
5498
|
+
...s,
|
|
5499
|
+
ref: o
|
|
5498
5500
|
}
|
|
5499
5501
|
) }),
|
|
5500
|
-
/* @__PURE__ */ O.jsx(Dh, { children:
|
|
5502
|
+
/* @__PURE__ */ O.jsx(Dh, { children: r && /* @__PURE__ */ O.jsx(
|
|
5501
5503
|
Bh,
|
|
5502
5504
|
{
|
|
5503
|
-
ref:
|
|
5504
|
-
position: Ih(
|
|
5505
|
-
children: /* @__PURE__ */ O.jsx(e, { ...
|
|
5505
|
+
ref: d,
|
|
5506
|
+
position: Ih(p.current),
|
|
5507
|
+
children: /* @__PURE__ */ O.jsx(e, { ...s })
|
|
5506
5508
|
}
|
|
5507
5509
|
) }),
|
|
5508
|
-
|
|
5509
|
-
|
|
5510
|
-
|
|
5511
|
-
|
|
5512
|
-
|
|
5510
|
+
r && /* @__PURE__ */ O.jsx(Mh, { onPickerHide: v }),
|
|
5511
|
+
r && /* @__PURE__ */ O.jsx(Ws, { onMousedown: y }),
|
|
5512
|
+
l && /* @__PURE__ */ O.jsx(Ws, { onMousedown: x }),
|
|
5513
|
+
l && /* @__PURE__ */ O.jsx(Us, { onKeydown: b }),
|
|
5514
|
+
l && /* @__PURE__ */ O.jsx(Us, { onKeydown: P })
|
|
5513
5515
|
] })
|
|
5514
5516
|
}
|
|
5515
5517
|
);
|
|
5516
|
-
};
|
|
5518
|
+
});
|
|
5517
5519
|
}
|
|
5518
5520
|
export {
|
|
5519
5521
|
jt as EKeyboardKey,
|
|
5520
5522
|
Uh as PickerProviderConsumer,
|
|
5521
|
-
|
|
5523
|
+
Vn as PickerProviderContext,
|
|
5522
5524
|
Gh as createPicker,
|
|
5523
5525
|
Wh as usePicker
|
|
5524
5526
|
};
|