@acrool/react-picker 0.0.9 → 0.0.10-alpha.1
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/README.md +15 -0
- package/dist/acrool-react-picker.es.js +662 -660
- package/dist/compose/createPicker.d.ts +3 -2
- package/dist/types.d.ts +4 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as kn from "react";
|
|
2
|
-
import Ln, { createContext as Mt, useContext as
|
|
2
|
+
import Ln, { createContext as Mt, useContext as G, useLayoutEffect as Qs, useEffect as lt, useRef as it, useInsertionEffect as tr, useCallback as vt, useMemo as Dt, forwardRef as De, Fragment as er, createElement as sa, useId as On, Component as ra, Children as oa, isValidElement as aa, useState as _t } from "react";
|
|
3
3
|
import la from "react-dom";
|
|
4
|
-
var st = /* @__PURE__ */ ((t) => (t.bottom = "bottom", t.top = "top", t))(st || {}),
|
|
4
|
+
var st = /* @__PURE__ */ ((t) => (t.bottom = "bottom", t.top = "top", t))(st || {}), mt = /* @__PURE__ */ ((t) => (t.left = "left", t.right = "right", t))(mt || {}), Ft = /* @__PURE__ */ ((t) => (t.Escape = "Escape", t.Enter = "Enter", t.Tab = "Tab", t.ArrowUp = "ArrowUp", t.ArrowDown = "ArrowDown", t))(Ft || {});
|
|
5
5
|
const fe = [
|
|
6
6
|
"color: #fff",
|
|
7
7
|
"display: inline-block",
|
|
@@ -49,24 +49,24 @@ function da(t, ...e) {
|
|
|
49
49
|
]).join(";");
|
|
50
50
|
de(t, n, ...e);
|
|
51
51
|
}
|
|
52
|
-
const
|
|
52
|
+
const gt = {
|
|
53
53
|
primary: ca,
|
|
54
54
|
success: ua,
|
|
55
55
|
info: fa,
|
|
56
56
|
warning: ha,
|
|
57
57
|
danger: da
|
|
58
58
|
}, jn = Mt({
|
|
59
|
-
hide: () =>
|
|
60
|
-
show: () =>
|
|
61
|
-
toggle: () =>
|
|
59
|
+
hide: () => gt.warning("No hide method detected, did you embed your app with Acrool/PickerPortal?"),
|
|
60
|
+
show: () => gt.warning("No show method detected, did you embed your app with Acrool/PickerPortal?"),
|
|
61
|
+
toggle: () => gt.warning("No toggle method detected, did you embed your app with Acrool/PickerPortal?"),
|
|
62
62
|
isVisible: !1,
|
|
63
|
-
inputFocus: () =>
|
|
64
|
-
inputBlur: () =>
|
|
63
|
+
inputFocus: () => gt.warning("No focus method detected, did you embed your app with Acrool/PickerPortal?"),
|
|
64
|
+
inputBlur: () => gt.warning("No blur method detected, did you embed your app with Acrool/PickerPortal?"),
|
|
65
65
|
isInputFocus: !1,
|
|
66
|
-
onChange: () =>
|
|
66
|
+
onChange: () => gt.warning("No onChange method detected, did you embed your app with Acrool/PickerPortal?"),
|
|
67
67
|
vertical: st.bottom,
|
|
68
|
-
setVertical: () =>
|
|
69
|
-
}), uh = jn.Consumer, pa = () =>
|
|
68
|
+
setVertical: () => gt.warning("No onChange method detected, did you embed your app with Acrool/PickerPortal?")
|
|
69
|
+
}), uh = jn.Consumer, pa = () => G(jn);
|
|
70
70
|
var gn = { exports: {} }, qt = {};
|
|
71
71
|
/**
|
|
72
72
|
* @license React
|
|
@@ -108,48 +108,48 @@ var Zt = {};
|
|
|
108
108
|
var ki;
|
|
109
109
|
function ga() {
|
|
110
110
|
return ki || (ki = 1, process.env.NODE_ENV !== "production" && function() {
|
|
111
|
-
var t = Ln, 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"), c = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), d = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), g = Symbol.iterator,
|
|
111
|
+
var t = Ln, 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"), c = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), d = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), g = Symbol.iterator, v = "@@iterator";
|
|
112
112
|
function T(h) {
|
|
113
113
|
if (h === null || typeof h != "object")
|
|
114
114
|
return null;
|
|
115
|
-
var m = g && h[g] || h[
|
|
115
|
+
var m = g && h[g] || h[v];
|
|
116
116
|
return typeof m == "function" ? m : null;
|
|
117
117
|
}
|
|
118
|
-
var
|
|
118
|
+
var P = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
119
119
|
function y(h) {
|
|
120
120
|
{
|
|
121
121
|
for (var m = arguments.length, b = new Array(m > 1 ? m - 1 : 0), C = 1; C < m; C++)
|
|
122
122
|
b[C - 1] = arguments[C];
|
|
123
|
-
|
|
123
|
+
x("error", h, b);
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function x(h, m, b) {
|
|
127
127
|
{
|
|
128
|
-
var C =
|
|
128
|
+
var C = P.ReactDebugCurrentFrame, D = C.getStackAddendum();
|
|
129
129
|
D !== "" && (m += "%s", b = b.concat([D]));
|
|
130
|
-
var
|
|
130
|
+
var O = b.map(function(E) {
|
|
131
131
|
return String(E);
|
|
132
132
|
});
|
|
133
|
-
|
|
133
|
+
O.unshift("Warning: " + m), Function.prototype.apply.call(console[h], console, O);
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
|
-
var
|
|
137
|
-
|
|
136
|
+
var w = !1, A = !1, L = !1, $ = !1, R = !1, _;
|
|
137
|
+
_ = Symbol.for("react.module.reference");
|
|
138
138
|
function U(h) {
|
|
139
|
-
return !!(typeof h == "string" || typeof h == "function" || h === i || h === o ||
|
|
139
|
+
return !!(typeof h == "string" || typeof h == "function" || h === i || h === o || R || h === s || h === c || h === u || $ || h === p || w || A || L || typeof h == "object" && h !== null && (h.$$typeof === d || h.$$typeof === f || h.$$typeof === r || h.$$typeof === a || h.$$typeof === l || // This needs to include all possible module reference object
|
|
140
140
|
// types supported by any Flight configuration anywhere since
|
|
141
141
|
// we don't know which Flight build this will end up being used
|
|
142
142
|
// with.
|
|
143
|
-
h.$$typeof ===
|
|
143
|
+
h.$$typeof === _ || h.getModuleId !== void 0));
|
|
144
144
|
}
|
|
145
|
-
function
|
|
145
|
+
function M(h, m, b) {
|
|
146
146
|
var C = h.displayName;
|
|
147
147
|
if (C)
|
|
148
148
|
return C;
|
|
149
149
|
var D = m.displayName || m.name || "";
|
|
150
150
|
return D !== "" ? b + "(" + D + ")" : b;
|
|
151
151
|
}
|
|
152
|
-
function
|
|
152
|
+
function zt(h) {
|
|
153
153
|
return h.displayName || "Context";
|
|
154
154
|
}
|
|
155
155
|
function J(h) {
|
|
@@ -177,19 +177,19 @@ function ga() {
|
|
|
177
177
|
switch (h.$$typeof) {
|
|
178
178
|
case a:
|
|
179
179
|
var m = h;
|
|
180
|
-
return
|
|
180
|
+
return zt(m) + ".Consumer";
|
|
181
181
|
case r:
|
|
182
182
|
var b = h;
|
|
183
|
-
return
|
|
183
|
+
return zt(b._context) + ".Provider";
|
|
184
184
|
case l:
|
|
185
|
-
return
|
|
185
|
+
return M(h, h.render, "ForwardRef");
|
|
186
186
|
case f:
|
|
187
187
|
var C = h.displayName || null;
|
|
188
188
|
return C !== null ? C : J(h.type) || "Memo";
|
|
189
189
|
case d: {
|
|
190
|
-
var D = h,
|
|
190
|
+
var D = h, O = D._payload, E = D._init;
|
|
191
191
|
try {
|
|
192
|
-
return J(E(
|
|
192
|
+
return J(E(O));
|
|
193
193
|
} catch {
|
|
194
194
|
return null;
|
|
195
195
|
}
|
|
@@ -197,13 +197,13 @@ function ga() {
|
|
|
197
197
|
}
|
|
198
198
|
return null;
|
|
199
199
|
}
|
|
200
|
-
var rt = Object.assign,
|
|
200
|
+
var rt = Object.assign, B = 0, Q, kt, Lt, hi, di, pi, mi;
|
|
201
201
|
function gi() {
|
|
202
202
|
}
|
|
203
203
|
gi.__reactDisabledLog = !0;
|
|
204
204
|
function Mo() {
|
|
205
205
|
{
|
|
206
|
-
if (
|
|
206
|
+
if (B === 0) {
|
|
207
207
|
Q = console.log, kt = console.info, Lt = console.warn, hi = console.error, di = console.group, pi = console.groupCollapsed, mi = console.groupEnd;
|
|
208
208
|
var h = {
|
|
209
209
|
configurable: !0,
|
|
@@ -221,12 +221,12 @@ function ga() {
|
|
|
221
221
|
groupEnd: h
|
|
222
222
|
});
|
|
223
223
|
}
|
|
224
|
-
|
|
224
|
+
B++;
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
227
|
function ko() {
|
|
228
228
|
{
|
|
229
|
-
if (
|
|
229
|
+
if (B--, B === 0) {
|
|
230
230
|
var h = {
|
|
231
231
|
configurable: !0,
|
|
232
232
|
enumerable: !0,
|
|
@@ -256,21 +256,21 @@ function ga() {
|
|
|
256
256
|
})
|
|
257
257
|
});
|
|
258
258
|
}
|
|
259
|
-
|
|
259
|
+
B < 0 && y("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
|
-
var
|
|
262
|
+
var He = P.ReactCurrentDispatcher, ze;
|
|
263
263
|
function ve(h, m, b) {
|
|
264
264
|
{
|
|
265
|
-
if (
|
|
265
|
+
if (ze === void 0)
|
|
266
266
|
try {
|
|
267
267
|
throw Error();
|
|
268
268
|
} catch (D) {
|
|
269
269
|
var C = D.stack.trim().match(/\n( *(at )?)/);
|
|
270
|
-
|
|
270
|
+
ze = C && C[1] || "";
|
|
271
271
|
}
|
|
272
272
|
return `
|
|
273
|
-
` +
|
|
273
|
+
` + ze + h;
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
276
|
var Ye = !1, Pe;
|
|
@@ -290,8 +290,8 @@ function ga() {
|
|
|
290
290
|
Ye = !0;
|
|
291
291
|
var D = Error.prepareStackTrace;
|
|
292
292
|
Error.prepareStackTrace = void 0;
|
|
293
|
-
var
|
|
294
|
-
|
|
293
|
+
var O;
|
|
294
|
+
O = He.current, He.current = null, Mo();
|
|
295
295
|
try {
|
|
296
296
|
if (m) {
|
|
297
297
|
var E = function() {
|
|
@@ -304,47 +304,47 @@ function ga() {
|
|
|
304
304
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
305
305
|
try {
|
|
306
306
|
Reflect.construct(E, []);
|
|
307
|
-
} catch (
|
|
308
|
-
C =
|
|
307
|
+
} catch (q) {
|
|
308
|
+
C = q;
|
|
309
309
|
}
|
|
310
310
|
Reflect.construct(h, [], E);
|
|
311
311
|
} else {
|
|
312
312
|
try {
|
|
313
313
|
E.call();
|
|
314
|
-
} catch (
|
|
315
|
-
C =
|
|
314
|
+
} catch (q) {
|
|
315
|
+
C = q;
|
|
316
316
|
}
|
|
317
317
|
h.call(E.prototype);
|
|
318
318
|
}
|
|
319
319
|
} else {
|
|
320
320
|
try {
|
|
321
321
|
throw Error();
|
|
322
|
-
} catch (
|
|
323
|
-
C =
|
|
322
|
+
} catch (q) {
|
|
323
|
+
C = q;
|
|
324
324
|
}
|
|
325
325
|
h();
|
|
326
326
|
}
|
|
327
|
-
} catch (
|
|
328
|
-
if (
|
|
329
|
-
for (var V =
|
|
330
|
-
`),
|
|
331
|
-
`),
|
|
332
|
-
|
|
333
|
-
for (;
|
|
334
|
-
if (V[
|
|
335
|
-
if (
|
|
327
|
+
} catch (q) {
|
|
328
|
+
if (q && C && typeof q.stack == "string") {
|
|
329
|
+
for (var V = q.stack.split(`
|
|
330
|
+
`), X = C.stack.split(`
|
|
331
|
+
`), I = V.length - 1, W = X.length - 1; I >= 1 && W >= 0 && V[I] !== X[W]; )
|
|
332
|
+
W--;
|
|
333
|
+
for (; I >= 1 && W >= 0; I--, W--)
|
|
334
|
+
if (V[I] !== X[W]) {
|
|
335
|
+
if (I !== 1 || W !== 1)
|
|
336
336
|
do
|
|
337
|
-
if (
|
|
337
|
+
if (I--, W--, W < 0 || V[I] !== X[W]) {
|
|
338
338
|
var tt = `
|
|
339
|
-
` + V[
|
|
339
|
+
` + V[I].replace(" at new ", " at ");
|
|
340
340
|
return h.displayName && tt.includes("<anonymous>") && (tt = tt.replace("<anonymous>", h.displayName)), typeof h == "function" && Pe.set(h, tt), tt;
|
|
341
341
|
}
|
|
342
|
-
while (
|
|
342
|
+
while (I >= 1 && W >= 0);
|
|
343
343
|
break;
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
346
|
} finally {
|
|
347
|
-
Ye = !1,
|
|
347
|
+
Ye = !1, He.current = O, ko(), Error.prepareStackTrace = D;
|
|
348
348
|
}
|
|
349
349
|
var jt = h ? h.displayName || h.name : "", St = jt ? ve(jt) : "";
|
|
350
350
|
return typeof h == "function" && Pe.set(h, St), St;
|
|
@@ -376,16 +376,16 @@ function ga() {
|
|
|
376
376
|
case f:
|
|
377
377
|
return xe(h.type, m, b);
|
|
378
378
|
case d: {
|
|
379
|
-
var C = h, D = C._payload,
|
|
379
|
+
var C = h, D = C._payload, O = C._init;
|
|
380
380
|
try {
|
|
381
|
-
return xe(
|
|
381
|
+
return xe(O(D), m, b);
|
|
382
382
|
} catch {
|
|
383
383
|
}
|
|
384
384
|
}
|
|
385
385
|
}
|
|
386
386
|
return "";
|
|
387
387
|
}
|
|
388
|
-
var Yt = Object.prototype.hasOwnProperty, vi = {}, Pi =
|
|
388
|
+
var Yt = Object.prototype.hasOwnProperty, vi = {}, Pi = P.ReactDebugCurrentFrame;
|
|
389
389
|
function be(h) {
|
|
390
390
|
if (h) {
|
|
391
391
|
var m = h._owner, b = xe(h.type, h._source, m ? m.type : null);
|
|
@@ -395,18 +395,18 @@ function ga() {
|
|
|
395
395
|
}
|
|
396
396
|
function Fo(h, m, b, C, D) {
|
|
397
397
|
{
|
|
398
|
-
var
|
|
398
|
+
var O = Function.call.bind(Yt);
|
|
399
399
|
for (var E in h)
|
|
400
|
-
if (
|
|
400
|
+
if (O(h, E)) {
|
|
401
401
|
var V = void 0;
|
|
402
402
|
try {
|
|
403
403
|
if (typeof h[E] != "function") {
|
|
404
|
-
var
|
|
405
|
-
throw
|
|
404
|
+
var X = Error((C || "React class") + ": " + b + " type `" + E + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof h[E] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
405
|
+
throw X.name = "Invariant Violation", X;
|
|
406
406
|
}
|
|
407
407
|
V = h[E](m, E, C, b, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
408
|
-
} catch (
|
|
409
|
-
V =
|
|
408
|
+
} catch (I) {
|
|
409
|
+
V = I;
|
|
410
410
|
}
|
|
411
411
|
V && !(V instanceof Error) && (be(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).", C || "React class", b, E, typeof V), be(null)), V instanceof Error && !(V.message in vi) && (vi[V.message] = !0, be(D), y("Failed %s type: %s", b, V.message), be(null));
|
|
412
412
|
}
|
|
@@ -436,7 +436,7 @@ function ga() {
|
|
|
436
436
|
if (Io(h))
|
|
437
437
|
return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Bo(h)), xi(h);
|
|
438
438
|
}
|
|
439
|
-
var Xt =
|
|
439
|
+
var Xt = P.ReactCurrentOwner, No = {
|
|
440
440
|
key: !0,
|
|
441
441
|
ref: !0,
|
|
442
442
|
__self: !0,
|
|
@@ -487,7 +487,7 @@ function ga() {
|
|
|
487
487
|
});
|
|
488
488
|
}
|
|
489
489
|
}
|
|
490
|
-
var
|
|
490
|
+
var Ho = function(h, m, b, C, D, O, E) {
|
|
491
491
|
var V = {
|
|
492
492
|
// This tag allows us to uniquely identify this as a React Element
|
|
493
493
|
$$typeof: e,
|
|
@@ -497,7 +497,7 @@ function ga() {
|
|
|
497
497
|
ref: b,
|
|
498
498
|
props: E,
|
|
499
499
|
// Record the component responsible for creating this element.
|
|
500
|
-
_owner:
|
|
500
|
+
_owner: O
|
|
501
501
|
};
|
|
502
502
|
return V._store = {}, Object.defineProperty(V._store, "validated", {
|
|
503
503
|
configurable: !1,
|
|
@@ -516,25 +516,25 @@ function ga() {
|
|
|
516
516
|
value: D
|
|
517
517
|
}), Object.freeze && (Object.freeze(V.props), Object.freeze(V)), V;
|
|
518
518
|
};
|
|
519
|
-
function
|
|
519
|
+
function zo(h, m, b, C, D) {
|
|
520
520
|
{
|
|
521
|
-
var
|
|
522
|
-
b !== void 0 && (bi(b), V = "" + b), Wo(m) && (bi(m.key), V = "" + m.key), Uo(m) && (
|
|
523
|
-
for (
|
|
524
|
-
Yt.call(m,
|
|
521
|
+
var O, E = {}, V = null, X = null;
|
|
522
|
+
b !== void 0 && (bi(b), V = "" + b), Wo(m) && (bi(m.key), V = "" + m.key), Uo(m) && (X = m.ref, $o(m, D));
|
|
523
|
+
for (O in m)
|
|
524
|
+
Yt.call(m, O) && !No.hasOwnProperty(O) && (E[O] = m[O]);
|
|
525
525
|
if (h && h.defaultProps) {
|
|
526
|
-
var
|
|
527
|
-
for (
|
|
528
|
-
E[
|
|
526
|
+
var I = h.defaultProps;
|
|
527
|
+
for (O in I)
|
|
528
|
+
E[O] === void 0 && (E[O] = I[O]);
|
|
529
529
|
}
|
|
530
|
-
if (V ||
|
|
531
|
-
var
|
|
532
|
-
V && Ko(E,
|
|
530
|
+
if (V || X) {
|
|
531
|
+
var W = typeof h == "function" ? h.displayName || h.name || "Unknown" : h;
|
|
532
|
+
V && Ko(E, W), X && Go(E, W);
|
|
533
533
|
}
|
|
534
|
-
return
|
|
534
|
+
return Ho(h, V, X, D, C, Xt.current, E);
|
|
535
535
|
}
|
|
536
536
|
}
|
|
537
|
-
var Ze =
|
|
537
|
+
var Ze = P.ReactCurrentOwner, Si = P.ReactDebugCurrentFrame;
|
|
538
538
|
function Ot(h) {
|
|
539
539
|
if (h) {
|
|
540
540
|
var m = h._owner, b = xe(h.type, h._source, m ? m.type : null);
|
|
@@ -547,7 +547,7 @@ function ga() {
|
|
|
547
547
|
function Qe(h) {
|
|
548
548
|
return typeof h == "object" && h !== null && h.$$typeof === e;
|
|
549
549
|
}
|
|
550
|
-
function
|
|
550
|
+
function Ci() {
|
|
551
551
|
{
|
|
552
552
|
if (Ze.current) {
|
|
553
553
|
var h = J(Ze.current.type);
|
|
@@ -570,10 +570,10 @@ Check your code at ` + m + ":" + b + ".";
|
|
|
570
570
|
return "";
|
|
571
571
|
}
|
|
572
572
|
}
|
|
573
|
-
var
|
|
573
|
+
var Ai = {};
|
|
574
574
|
function Xo(h) {
|
|
575
575
|
{
|
|
576
|
-
var m =
|
|
576
|
+
var m = Ci();
|
|
577
577
|
if (!m) {
|
|
578
578
|
var b = typeof h == "string" ? h : h.displayName || h.name;
|
|
579
579
|
b && (m = `
|
|
@@ -589,9 +589,9 @@ Check the top-level render call using <` + b + ">.");
|
|
|
589
589
|
return;
|
|
590
590
|
h._store.validated = !0;
|
|
591
591
|
var b = Xo(m);
|
|
592
|
-
if (
|
|
592
|
+
if (Ai[b])
|
|
593
593
|
return;
|
|
594
|
-
|
|
594
|
+
Ai[b] = !0;
|
|
595
595
|
var C = "";
|
|
596
596
|
h && h._owner && h._owner !== Ze.current && (C = " It was passed a child from " + J(h._owner.type) + "."), Ot(h), y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', b, C), Ot(null);
|
|
597
597
|
}
|
|
@@ -610,7 +610,7 @@ Check the top-level render call using <` + b + ">.");
|
|
|
610
610
|
else if (h) {
|
|
611
611
|
var D = T(h);
|
|
612
612
|
if (typeof D == "function" && D !== h.entries)
|
|
613
|
-
for (var
|
|
613
|
+
for (var O = D.call(h), E; !(E = O.next()).done; )
|
|
614
614
|
Qe(E.value) && Ri(E.value, m);
|
|
615
615
|
}
|
|
616
616
|
}
|
|
@@ -653,20 +653,20 @@ Check the top-level render call using <` + b + ">.");
|
|
|
653
653
|
}
|
|
654
654
|
}
|
|
655
655
|
var Ei = {};
|
|
656
|
-
function Di(h, m, b, C, D,
|
|
656
|
+
function Di(h, m, b, C, D, O) {
|
|
657
657
|
{
|
|
658
658
|
var E = U(h);
|
|
659
659
|
if (!E) {
|
|
660
660
|
var V = "";
|
|
661
661
|
(h === void 0 || typeof h == "object" && h !== null && Object.keys(h).length === 0) && (V += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
662
|
-
var
|
|
663
|
-
|
|
664
|
-
var
|
|
665
|
-
h === null ?
|
|
662
|
+
var X = Yo(D);
|
|
663
|
+
X ? V += X : V += Ci();
|
|
664
|
+
var I;
|
|
665
|
+
h === null ? I = "null" : Xe(h) ? I = "array" : h !== void 0 && h.$$typeof === e ? (I = "<" + (J(h.type) || "Unknown") + " />", V = " Did you accidentally export a JSX literal instead of a component?") : I = typeof h, y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", I, V);
|
|
666
666
|
}
|
|
667
|
-
var
|
|
668
|
-
if (
|
|
669
|
-
return
|
|
667
|
+
var W = zo(h, m, b, D, O);
|
|
668
|
+
if (W == null)
|
|
669
|
+
return W;
|
|
670
670
|
if (E) {
|
|
671
671
|
var tt = m.children;
|
|
672
672
|
if (tt !== void 0)
|
|
@@ -681,11 +681,11 @@ Check the top-level render call using <` + b + ">.");
|
|
|
681
681
|
Vi(tt, h);
|
|
682
682
|
}
|
|
683
683
|
if (Yt.call(m, "key")) {
|
|
684
|
-
var St = J(h),
|
|
684
|
+
var St = J(h), q = Object.keys(m).filter(function(ia) {
|
|
685
685
|
return ia !== "key";
|
|
686
|
-
}), tn =
|
|
686
|
+
}), tn = q.length > 0 ? "{key: someKey, " + q.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
687
687
|
if (!Ei[St + tn]) {
|
|
688
|
-
var na =
|
|
688
|
+
var na = q.length > 0 ? "{" + q.join(": ..., ") + ": ...}" : "{}";
|
|
689
689
|
y(`A props object containing a "key" prop is being spread into JSX:
|
|
690
690
|
let props = %s;
|
|
691
691
|
<%s {...props} />
|
|
@@ -694,7 +694,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
694
694
|
<%s key={someKey} {...props} />`, tn, St, na, St), Ei[St + tn] = !0;
|
|
695
695
|
}
|
|
696
696
|
}
|
|
697
|
-
return h === i ? Zo(
|
|
697
|
+
return h === i ? Zo(W) : qo(W), W;
|
|
698
698
|
}
|
|
699
699
|
}
|
|
700
700
|
function Jo(h, m, b) {
|
|
@@ -708,7 +708,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
708
708
|
}()), Zt;
|
|
709
709
|
}
|
|
710
710
|
process.env.NODE_ENV === "production" ? gn.exports = ma() : gn.exports = ga();
|
|
711
|
-
var
|
|
711
|
+
var j = gn.exports, ya = Object.defineProperty, va = (t, e, n) => e in t ? ya(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, yn = (t, e, n) => (va(t, typeof e != "symbol" ? e + "" : e, n), n);
|
|
712
712
|
class nr extends Ln.Component {
|
|
713
713
|
constructor(e) {
|
|
714
714
|
super(e), yn(this, "_el"), yn(this, "renderPortal", () => la.createPortal(
|
|
@@ -740,7 +740,7 @@ const Fn = Mt({
|
|
|
740
740
|
transformPagePoint: (t) => t,
|
|
741
741
|
isStatic: !1,
|
|
742
742
|
reducedMotion: "never"
|
|
743
|
-
}), _e = Mt({}), Be = Mt(null), _n = typeof window < "u", ir = _n ? Qs :
|
|
743
|
+
}), _e = Mt({}), Be = Mt(null), _n = typeof window < "u", ir = _n ? Qs : lt, sr = Mt({ strict: !1 }), Ie = (t) => t.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), Pa = "framerAppearId", rr = "data-" + Ie(Pa), xa = {
|
|
744
744
|
skipAnimations: !1,
|
|
745
745
|
useManualTiming: !1
|
|
746
746
|
};
|
|
@@ -802,18 +802,18 @@ function or(t, e) {
|
|
|
802
802
|
delta: 0,
|
|
803
803
|
timestamp: 0,
|
|
804
804
|
isProcessing: !1
|
|
805
|
-
}, o = () => n = !0, r = Te.reduce((
|
|
806
|
-
const
|
|
807
|
-
n = !1, s.delta = i ? 1e3 / 60 : Math.max(Math.min(
|
|
805
|
+
}, o = () => n = !0, r = Te.reduce((P, y) => (P[y] = ba(o), P), {}), { read: a, resolveKeyframes: l, update: c, preRender: u, render: f, postRender: d } = r, p = () => {
|
|
806
|
+
const P = performance.now();
|
|
807
|
+
n = !1, s.delta = i ? 1e3 / 60 : Math.max(Math.min(P - s.timestamp, Ta), 1), s.timestamp = P, s.isProcessing = !0, a.process(s), l.process(s), c.process(s), u.process(s), f.process(s), d.process(s), s.isProcessing = !1, n && e && (i = !1, t(p));
|
|
808
808
|
}, g = () => {
|
|
809
809
|
n = !0, i = !0, s.isProcessing || t(p);
|
|
810
810
|
};
|
|
811
|
-
return { schedule: Te.reduce((
|
|
812
|
-
const
|
|
813
|
-
return
|
|
814
|
-
}, {}), cancel: (
|
|
811
|
+
return { schedule: Te.reduce((P, y) => {
|
|
812
|
+
const x = r[y];
|
|
813
|
+
return P[y] = (w, A = !1, L = !1) => (n || g(), x.schedule(w, A, L)), P;
|
|
814
|
+
}, {}), cancel: (P) => {
|
|
815
815
|
for (let y = 0; y < Te.length; y++)
|
|
816
|
-
r[Te[y]].cancel(
|
|
816
|
+
r[Te[y]].cancel(P);
|
|
817
817
|
}, state: s, steps: r };
|
|
818
818
|
}
|
|
819
819
|
const { schedule: Bn, cancel: fh } = or(queueMicrotask, !1);
|
|
@@ -823,7 +823,7 @@ function Bt(t) {
|
|
|
823
823
|
const ar = Mt({});
|
|
824
824
|
let Li = !1;
|
|
825
825
|
function wa(t, e, n, i, s) {
|
|
826
|
-
const { visualElement: o } =
|
|
826
|
+
const { visualElement: o } = G(_e), r = G(sr), a = G(Be), l = G(Fn).reducedMotion, c = it();
|
|
827
827
|
i = i || r.renderer, !c.current && i && (c.current = i(t, {
|
|
828
828
|
visualState: e,
|
|
829
829
|
parent: o,
|
|
@@ -832,21 +832,21 @@ function wa(t, e, n, i, s) {
|
|
|
832
832
|
blockInitialAnimation: a ? a.initial === !1 : !1,
|
|
833
833
|
reducedMotionConfig: l
|
|
834
834
|
}));
|
|
835
|
-
const u = c.current, f =
|
|
836
|
-
u && !u.projection && s && (u.type === "html" || u.type === "svg") &&
|
|
835
|
+
const u = c.current, f = G(ar);
|
|
836
|
+
u && !u.projection && s && (u.type === "html" || u.type === "svg") && Ca(c.current, n, s, f), tr(() => {
|
|
837
837
|
u && u.update(n, a);
|
|
838
838
|
});
|
|
839
839
|
const d = it(!!(n[rr] && !window.HandoffComplete));
|
|
840
840
|
return ir(() => {
|
|
841
841
|
u && (u.updateFeatures(), Bn.render(u.render), d.current && u.animationState && u.animationState.animateChanges());
|
|
842
|
-
}),
|
|
842
|
+
}), lt(() => {
|
|
843
843
|
u && (!d.current && u.animationState && u.animationState.animateChanges(), d.current && (d.current = !1, Li || (Li = !0, queueMicrotask(Sa))));
|
|
844
844
|
}), u;
|
|
845
845
|
}
|
|
846
846
|
function Sa() {
|
|
847
847
|
window.HandoffComplete = !0;
|
|
848
848
|
}
|
|
849
|
-
function
|
|
849
|
+
function Ca(t, e, n, i) {
|
|
850
850
|
const { layoutId: s, layout: o, drag: r, dragConstraints: a, layoutScroll: l, layoutRoot: c } = e;
|
|
851
851
|
t.projection = new n(t.latestValues, e["data-framer-portal-id"] ? void 0 : lr(t.parent)), t.projection.setOptions({
|
|
852
852
|
layoutId: s,
|
|
@@ -870,8 +870,8 @@ function lr(t) {
|
|
|
870
870
|
if (t)
|
|
871
871
|
return t.options.allowProjection !== !1 ? t.projection : lr(t.parent);
|
|
872
872
|
}
|
|
873
|
-
function
|
|
874
|
-
return
|
|
873
|
+
function Aa(t, e, n) {
|
|
874
|
+
return vt(
|
|
875
875
|
(i) => {
|
|
876
876
|
i && t.mount && t.mount(i), e && (i ? e.mount(i) : e.unmount()), n && (typeof n == "function" ? n(i) : Bt(n) && (n.current = i));
|
|
877
877
|
},
|
|
@@ -915,7 +915,7 @@ function Ra(t, e) {
|
|
|
915
915
|
return t.inherit !== !1 ? e : {};
|
|
916
916
|
}
|
|
917
917
|
function Va(t) {
|
|
918
|
-
const { initial: e, animate: n } = Ra(t,
|
|
918
|
+
const { initial: e, animate: n } = Ra(t, G(_e));
|
|
919
919
|
return Dt(() => ({ initial: e, animate: n }), [Oi(e), Oi(n)]);
|
|
920
920
|
}
|
|
921
921
|
function Oi(t) {
|
|
@@ -952,11 +952,11 @@ function Ea(t) {
|
|
|
952
952
|
...t[e]
|
|
953
953
|
};
|
|
954
954
|
}
|
|
955
|
-
const Un = Mt({}), Da = Symbol.for("motionComponentSymbol"),
|
|
956
|
-
let Gt =
|
|
955
|
+
const Un = Mt({}), Da = Symbol.for("motionComponentSymbol"), H = (t) => t;
|
|
956
|
+
let Gt = H, dt = H;
|
|
957
957
|
process.env.NODE_ENV !== "production" && (Gt = (t, e) => {
|
|
958
958
|
!t && typeof console < "u" && console.warn(e);
|
|
959
|
-
},
|
|
959
|
+
}, dt = (t, e) => {
|
|
960
960
|
if (!t)
|
|
961
961
|
throw new Error(e);
|
|
962
962
|
});
|
|
@@ -965,7 +965,7 @@ function Ma({ preloadedFeatures: t, createVisualElement: e, useRender: n, useVis
|
|
|
965
965
|
function o(a, l) {
|
|
966
966
|
let c;
|
|
967
967
|
const u = {
|
|
968
|
-
...
|
|
968
|
+
...G(Fn),
|
|
969
969
|
...a,
|
|
970
970
|
layoutId: ka(a)
|
|
971
971
|
}, { isStatic: f } = u, d = Va(a), p = i(a, f);
|
|
@@ -974,20 +974,20 @@ function Ma({ preloadedFeatures: t, createVisualElement: e, useRender: n, useVis
|
|
|
974
974
|
const g = Oa(u);
|
|
975
975
|
c = g.MeasureLayout, d.visualElement = wa(s, p, u, e, g.ProjectionNode);
|
|
976
976
|
}
|
|
977
|
-
return
|
|
977
|
+
return j.jsxs(_e.Provider, { value: d, children: [c && d.visualElement ? j.jsx(c, { visualElement: d.visualElement, ...u }) : null, n(s, a, Aa(p, d.visualElement, l), p, f, d.visualElement)] });
|
|
978
978
|
}
|
|
979
979
|
const r = De(o);
|
|
980
980
|
return r[Da] = s, r;
|
|
981
981
|
}
|
|
982
982
|
function ka({ layoutId: t }) {
|
|
983
|
-
const e =
|
|
983
|
+
const e = G(Un).id;
|
|
984
984
|
return e && t !== void 0 ? e + "-" + t : t;
|
|
985
985
|
}
|
|
986
986
|
function La(t, e) {
|
|
987
|
-
const n =
|
|
987
|
+
const n = G(sr).strict;
|
|
988
988
|
if (process.env.NODE_ENV !== "production" && e && n) {
|
|
989
989
|
const i = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";
|
|
990
|
-
t.ignoreStrict ? Gt(!1, i) :
|
|
990
|
+
t.ignoreStrict ? Gt(!1, i) : dt(!1, i);
|
|
991
991
|
}
|
|
992
992
|
}
|
|
993
993
|
function Oa(t) {
|
|
@@ -1089,15 +1089,15 @@ const pe = [
|
|
|
1089
1089
|
function ur(t, { layout: e, layoutId: n }) {
|
|
1090
1090
|
return Tt.has(t) || t.startsWith("origin") || (e || n !== void 0) && (!!Me[t] || t === "opacity");
|
|
1091
1091
|
}
|
|
1092
|
-
const
|
|
1092
|
+
const Y = (t) => !!(t && t.getVelocity), fr = (t, e) => e && typeof t == "number" ? e.transform(t) : t, xt = (t, e, n) => n > e ? e : n < t ? t : n, Ht = {
|
|
1093
1093
|
test: (t) => typeof t == "number",
|
|
1094
1094
|
parse: parseFloat,
|
|
1095
1095
|
transform: (t) => t
|
|
1096
1096
|
}, ee = {
|
|
1097
|
-
...
|
|
1097
|
+
...Ht,
|
|
1098
1098
|
transform: (t) => xt(0, 1, t)
|
|
1099
1099
|
}, we = {
|
|
1100
|
-
...
|
|
1100
|
+
...Ht,
|
|
1101
1101
|
default: 1
|
|
1102
1102
|
}, ne = (t) => Math.round(t * 1e5) / 1e5, $n = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu, Ba = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu, Ia = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;
|
|
1103
1103
|
function me(t) {
|
|
@@ -1110,76 +1110,76 @@ const ge = (t) => ({
|
|
|
1110
1110
|
test: (e) => me(e) && e.endsWith(t) && e.split(" ").length === 1,
|
|
1111
1111
|
parse: parseFloat,
|
|
1112
1112
|
transform: (e) => `${e}${t}`
|
|
1113
|
-
}),
|
|
1113
|
+
}), yt = ge("deg"), ot = ge("%"), S = ge("px"), Ua = ge("vh"), Wa = ge("vw"), Fi = {
|
|
1114
1114
|
...ot,
|
|
1115
1115
|
parse: (t) => ot.parse(t) / 100,
|
|
1116
1116
|
transform: (t) => ot.transform(t * 100)
|
|
1117
1117
|
}, _i = {
|
|
1118
|
-
...
|
|
1118
|
+
...Ht,
|
|
1119
1119
|
transform: Math.round
|
|
1120
1120
|
}, Kn = {
|
|
1121
1121
|
// Border props
|
|
1122
|
-
borderWidth:
|
|
1123
|
-
borderTopWidth:
|
|
1124
|
-
borderRightWidth:
|
|
1125
|
-
borderBottomWidth:
|
|
1126
|
-
borderLeftWidth:
|
|
1127
|
-
borderRadius:
|
|
1128
|
-
radius:
|
|
1129
|
-
borderTopLeftRadius:
|
|
1130
|
-
borderTopRightRadius:
|
|
1131
|
-
borderBottomRightRadius:
|
|
1132
|
-
borderBottomLeftRadius:
|
|
1122
|
+
borderWidth: S,
|
|
1123
|
+
borderTopWidth: S,
|
|
1124
|
+
borderRightWidth: S,
|
|
1125
|
+
borderBottomWidth: S,
|
|
1126
|
+
borderLeftWidth: S,
|
|
1127
|
+
borderRadius: S,
|
|
1128
|
+
radius: S,
|
|
1129
|
+
borderTopLeftRadius: S,
|
|
1130
|
+
borderTopRightRadius: S,
|
|
1131
|
+
borderBottomRightRadius: S,
|
|
1132
|
+
borderBottomLeftRadius: S,
|
|
1133
1133
|
// Positioning props
|
|
1134
|
-
width:
|
|
1135
|
-
maxWidth:
|
|
1136
|
-
height:
|
|
1137
|
-
maxHeight:
|
|
1138
|
-
size:
|
|
1139
|
-
top:
|
|
1140
|
-
right:
|
|
1141
|
-
bottom:
|
|
1142
|
-
left:
|
|
1134
|
+
width: S,
|
|
1135
|
+
maxWidth: S,
|
|
1136
|
+
height: S,
|
|
1137
|
+
maxHeight: S,
|
|
1138
|
+
size: S,
|
|
1139
|
+
top: S,
|
|
1140
|
+
right: S,
|
|
1141
|
+
bottom: S,
|
|
1142
|
+
left: S,
|
|
1143
1143
|
// Spacing props
|
|
1144
|
-
padding:
|
|
1145
|
-
paddingTop:
|
|
1146
|
-
paddingRight:
|
|
1147
|
-
paddingBottom:
|
|
1148
|
-
paddingLeft:
|
|
1149
|
-
margin:
|
|
1150
|
-
marginTop:
|
|
1151
|
-
marginRight:
|
|
1152
|
-
marginBottom:
|
|
1153
|
-
marginLeft:
|
|
1144
|
+
padding: S,
|
|
1145
|
+
paddingTop: S,
|
|
1146
|
+
paddingRight: S,
|
|
1147
|
+
paddingBottom: S,
|
|
1148
|
+
paddingLeft: S,
|
|
1149
|
+
margin: S,
|
|
1150
|
+
marginTop: S,
|
|
1151
|
+
marginRight: S,
|
|
1152
|
+
marginBottom: S,
|
|
1153
|
+
marginLeft: S,
|
|
1154
1154
|
// Transform props
|
|
1155
|
-
rotate:
|
|
1156
|
-
rotateX:
|
|
1157
|
-
rotateY:
|
|
1158
|
-
rotateZ:
|
|
1155
|
+
rotate: yt,
|
|
1156
|
+
rotateX: yt,
|
|
1157
|
+
rotateY: yt,
|
|
1158
|
+
rotateZ: yt,
|
|
1159
1159
|
scale: we,
|
|
1160
1160
|
scaleX: we,
|
|
1161
1161
|
scaleY: we,
|
|
1162
1162
|
scaleZ: we,
|
|
1163
|
-
skew:
|
|
1164
|
-
skewX:
|
|
1165
|
-
skewY:
|
|
1166
|
-
distance:
|
|
1167
|
-
translateX:
|
|
1168
|
-
translateY:
|
|
1169
|
-
translateZ:
|
|
1170
|
-
x:
|
|
1171
|
-
y:
|
|
1172
|
-
z:
|
|
1173
|
-
perspective:
|
|
1174
|
-
transformPerspective:
|
|
1163
|
+
skew: yt,
|
|
1164
|
+
skewX: yt,
|
|
1165
|
+
skewY: yt,
|
|
1166
|
+
distance: S,
|
|
1167
|
+
translateX: S,
|
|
1168
|
+
translateY: S,
|
|
1169
|
+
translateZ: S,
|
|
1170
|
+
x: S,
|
|
1171
|
+
y: S,
|
|
1172
|
+
z: S,
|
|
1173
|
+
perspective: S,
|
|
1174
|
+
transformPerspective: S,
|
|
1175
1175
|
opacity: ee,
|
|
1176
1176
|
originX: Fi,
|
|
1177
1177
|
originY: Fi,
|
|
1178
|
-
originZ:
|
|
1178
|
+
originZ: S,
|
|
1179
1179
|
// Misc
|
|
1180
1180
|
zIndex: _i,
|
|
1181
|
-
backgroundPositionX:
|
|
1182
|
-
backgroundPositionY:
|
|
1181
|
+
backgroundPositionX: S,
|
|
1182
|
+
backgroundPositionY: S,
|
|
1183
1183
|
// SVG
|
|
1184
1184
|
fillOpacity: ee,
|
|
1185
1185
|
strokeOpacity: ee,
|
|
@@ -1209,8 +1209,8 @@ function Ga(t, e, n) {
|
|
|
1209
1209
|
}
|
|
1210
1210
|
return i = i.trim(), n ? i = n(e, s ? "" : i) : s && (i = "none"), i;
|
|
1211
1211
|
}
|
|
1212
|
-
const hr = (t) => (e) => typeof e == "string" && e.startsWith(t), dr = hr("--"),
|
|
1213
|
-
function
|
|
1212
|
+
const hr = (t) => (e) => typeof e == "string" && e.startsWith(t), dr = hr("--"), Ha = hr("var(--"), Gn = (t) => Ha(t) ? za.test(t.split("/*")[0].trim()) : !1, za = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;
|
|
1213
|
+
function Hn(t, e, n) {
|
|
1214
1214
|
const { style: i, vars: s, transformOrigin: o } = t;
|
|
1215
1215
|
let r = !1, a = !1;
|
|
1216
1216
|
for (const l in e) {
|
|
@@ -1231,7 +1231,7 @@ function zn(t, e, n) {
|
|
|
1231
1231
|
i.transformOrigin = `${l} ${c} ${u}`;
|
|
1232
1232
|
}
|
|
1233
1233
|
}
|
|
1234
|
-
const
|
|
1234
|
+
const zn = () => ({
|
|
1235
1235
|
style: {},
|
|
1236
1236
|
transform: {},
|
|
1237
1237
|
transformOrigin: {},
|
|
@@ -1239,12 +1239,12 @@ const Hn = () => ({
|
|
|
1239
1239
|
});
|
|
1240
1240
|
function pr(t, e, n) {
|
|
1241
1241
|
for (const i in e)
|
|
1242
|
-
!
|
|
1242
|
+
!Y(e[i]) && !ur(i, n) && (t[i] = e[i]);
|
|
1243
1243
|
}
|
|
1244
1244
|
function Ya({ transformTemplate: t }, e) {
|
|
1245
1245
|
return Dt(() => {
|
|
1246
|
-
const n =
|
|
1247
|
-
return
|
|
1246
|
+
const n = zn();
|
|
1247
|
+
return Hn(n, e, t), Object.assign({}, n.vars, n.style);
|
|
1248
1248
|
}, [e]);
|
|
1249
1249
|
}
|
|
1250
1250
|
function Xa(t, e) {
|
|
@@ -1306,7 +1306,7 @@ function Qa(t, e, n) {
|
|
|
1306
1306
|
return i;
|
|
1307
1307
|
}
|
|
1308
1308
|
function Bi(t, e, n) {
|
|
1309
|
-
return typeof t == "string" ? t :
|
|
1309
|
+
return typeof t == "string" ? t : S.transform(e + n * t);
|
|
1310
1310
|
}
|
|
1311
1311
|
function tl(t, e, n) {
|
|
1312
1312
|
const i = Bi(e, t.x, t.width), s = Bi(n, t.y, t.height);
|
|
@@ -1322,8 +1322,8 @@ const el = {
|
|
|
1322
1322
|
function il(t, e, n = 1, i = 0, s = !0) {
|
|
1323
1323
|
t.pathLength = 1;
|
|
1324
1324
|
const o = s ? el : nl;
|
|
1325
|
-
t[o.offset] =
|
|
1326
|
-
const r =
|
|
1325
|
+
t[o.offset] = S.transform(-i);
|
|
1326
|
+
const r = S.transform(e), a = S.transform(n);
|
|
1327
1327
|
t[o.array] = `${r} ${a}`;
|
|
1328
1328
|
}
|
|
1329
1329
|
function Yn(t, {
|
|
@@ -1338,7 +1338,7 @@ function Yn(t, {
|
|
|
1338
1338
|
// This is object creation, which we try to avoid per-frame.
|
|
1339
1339
|
...c
|
|
1340
1340
|
}, u, f) {
|
|
1341
|
-
if (
|
|
1341
|
+
if (Hn(t, c, f), u) {
|
|
1342
1342
|
t.style.viewBox && (t.attrs.viewBox = t.style.viewBox);
|
|
1343
1343
|
return;
|
|
1344
1344
|
}
|
|
@@ -1347,7 +1347,7 @@ function Yn(t, {
|
|
|
1347
1347
|
d.transform && (g && (p.transform = d.transform), delete d.transform), g && (s !== void 0 || o !== void 0 || p.transform) && (p.transformOrigin = tl(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 && il(d, r, a, l, !1);
|
|
1348
1348
|
}
|
|
1349
1349
|
const gr = () => ({
|
|
1350
|
-
...
|
|
1350
|
+
...zn(),
|
|
1351
1351
|
attrs: {}
|
|
1352
1352
|
}), Xn = (t) => typeof t == "string" && t.toLowerCase() === "svg";
|
|
1353
1353
|
function sl(t, e, n, i) {
|
|
@@ -1366,7 +1366,7 @@ function sl(t, e, n, i) {
|
|
|
1366
1366
|
}
|
|
1367
1367
|
function rl(t = !1) {
|
|
1368
1368
|
return (n, i, s, { latestValues: o }, r) => {
|
|
1369
|
-
const l = (Wn(n) ? sl : qa)(i, o, r, n), c = Qa(i, typeof n == "string", t), u = n !== er ? { ...c, ...l, ref: s } : {}, { children: f } = i, d = Dt(() =>
|
|
1369
|
+
const l = (Wn(n) ? sl : qa)(i, o, r, n), c = Qa(i, typeof n == "string", t), u = n !== er ? { ...c, ...l, ref: s } : {}, { children: f } = i, d = Dt(() => Y(f) ? f.get() : f, [f]);
|
|
1370
1370
|
return sa(n, {
|
|
1371
1371
|
...u,
|
|
1372
1372
|
children: d
|
|
@@ -1412,13 +1412,13 @@ function qn(t, e, n) {
|
|
|
1412
1412
|
var i;
|
|
1413
1413
|
const { style: s } = t, o = {};
|
|
1414
1414
|
for (const r in s)
|
|
1415
|
-
(
|
|
1415
|
+
(Y(s[r]) || e.style && Y(e.style[r]) || ur(r, t) || ((i = n == null ? void 0 : n.getValue(r)) === null || i === void 0 ? void 0 : i.liveStyle) !== void 0) && (o[r] = s[r]);
|
|
1416
1416
|
return n && s && typeof s.willChange == "string" && (n.applyWillChange = !1), o;
|
|
1417
1417
|
}
|
|
1418
1418
|
function xr(t, e, n) {
|
|
1419
1419
|
const i = qn(t, e, n);
|
|
1420
1420
|
for (const s in t)
|
|
1421
|
-
if (
|
|
1421
|
+
if (Y(t[s]) || Y(e[s])) {
|
|
1422
1422
|
const o = pe.indexOf(s) !== -1 ? "attr" + s.charAt(0).toUpperCase() + s.substring(1) : s;
|
|
1423
1423
|
i[o] = t[s];
|
|
1424
1424
|
}
|
|
@@ -1446,8 +1446,8 @@ function Jn(t) {
|
|
|
1446
1446
|
return e.current === null && (e.current = t()), e.current;
|
|
1447
1447
|
}
|
|
1448
1448
|
const vn = (t) => Array.isArray(t), ol = (t) => !!(t && typeof t == "object" && t.mix && t.toValue), al = (t) => vn(t) ? t[t.length - 1] || 0 : t;
|
|
1449
|
-
function
|
|
1450
|
-
const e =
|
|
1449
|
+
function Ae(t) {
|
|
1450
|
+
const e = Y(t) ? t.get() : t;
|
|
1451
1451
|
return ol(e) ? e.toValue() : e;
|
|
1452
1452
|
}
|
|
1453
1453
|
const br = /* @__PURE__ */ new Set([
|
|
@@ -1480,7 +1480,7 @@ function ll({ applyWillChange: t = !1, scrapeMotionValuesFromProps: e, createRen
|
|
|
1480
1480
|
return i && (l.mount = (c) => i(s, c, l)), l;
|
|
1481
1481
|
}
|
|
1482
1482
|
const wr = (t) => (e, n) => {
|
|
1483
|
-
const i =
|
|
1483
|
+
const i = G(_e), s = G(Be), o = () => ll(t, e, i, s, n);
|
|
1484
1484
|
return n ? o() : Jn(o);
|
|
1485
1485
|
};
|
|
1486
1486
|
function cl(t, e) {
|
|
@@ -1501,35 +1501,35 @@ function ul(t, e, n, i, s) {
|
|
|
1501
1501
|
var o;
|
|
1502
1502
|
const r = {}, a = [], l = i && ((o = t.style) === null || o === void 0 ? void 0 : o.willChange) === void 0, c = s(t, {});
|
|
1503
1503
|
for (const T in c)
|
|
1504
|
-
r[T] =
|
|
1504
|
+
r[T] = Ae(c[T]);
|
|
1505
1505
|
let { initial: u, animate: f } = t;
|
|
1506
1506
|
const d = Ne(t), p = cr(t);
|
|
1507
1507
|
e && p && !d && t.inherit !== !1 && (u === void 0 && (u = e.initial), f === void 0 && (f = e.animate));
|
|
1508
1508
|
let g = n ? n.initial === !1 : !1;
|
|
1509
1509
|
g = g || u === !1;
|
|
1510
|
-
const
|
|
1511
|
-
return
|
|
1510
|
+
const v = g ? f : u;
|
|
1511
|
+
return v && typeof v != "boolean" && !ae(v) && Ni(t, v, (T, P) => {
|
|
1512
1512
|
for (const y in T) {
|
|
1513
|
-
let
|
|
1514
|
-
if (Array.isArray(
|
|
1515
|
-
const
|
|
1516
|
-
|
|
1513
|
+
let x = T[y];
|
|
1514
|
+
if (Array.isArray(x)) {
|
|
1515
|
+
const w = g ? x.length - 1 : 0;
|
|
1516
|
+
x = x[w];
|
|
1517
1517
|
}
|
|
1518
|
-
|
|
1518
|
+
x !== null && (r[y] = x);
|
|
1519
1519
|
}
|
|
1520
|
-
for (const y in
|
|
1521
|
-
r[y] =
|
|
1520
|
+
for (const y in P)
|
|
1521
|
+
r[y] = P[y];
|
|
1522
1522
|
}), l && (f && u !== !1 && !ae(f) && Ni(t, f, (T) => {
|
|
1523
|
-
for (const
|
|
1524
|
-
cl(a,
|
|
1523
|
+
for (const P in T)
|
|
1524
|
+
cl(a, P);
|
|
1525
1525
|
}), a.length && (r.willChange = a.join(","))), r;
|
|
1526
1526
|
}
|
|
1527
|
-
const { schedule:
|
|
1527
|
+
const { schedule: k, cancel: pt, state: K, steps: en } = or(typeof requestAnimationFrame < "u" ? requestAnimationFrame : H, !0), fl = {
|
|
1528
1528
|
useVisualState: wr({
|
|
1529
1529
|
scrapeMotionValuesFromProps: xr,
|
|
1530
1530
|
createRenderState: gr,
|
|
1531
1531
|
onMount: (t, e, { renderState: n, latestValues: i }) => {
|
|
1532
|
-
|
|
1532
|
+
k.read(() => {
|
|
1533
1533
|
try {
|
|
1534
1534
|
n.dimensions = typeof e.getBBox == "function" ? e.getBBox() : e.getBoundingClientRect();
|
|
1535
1535
|
} catch {
|
|
@@ -1540,7 +1540,7 @@ const { schedule: M, cancel: dt, state: $, steps: en } = or(typeof requestAnimat
|
|
|
1540
1540
|
height: 0
|
|
1541
1541
|
};
|
|
1542
1542
|
}
|
|
1543
|
-
}),
|
|
1543
|
+
}), k.render(() => {
|
|
1544
1544
|
Yn(n, i, Xn(e.tagName), t.transformTemplate), Pr(e, n);
|
|
1545
1545
|
});
|
|
1546
1546
|
}
|
|
@@ -1549,7 +1549,7 @@ const { schedule: M, cancel: dt, state: $, steps: en } = or(typeof requestAnimat
|
|
|
1549
1549
|
useVisualState: wr({
|
|
1550
1550
|
applyWillChange: !0,
|
|
1551
1551
|
scrapeMotionValuesFromProps: qn,
|
|
1552
|
-
createRenderState:
|
|
1552
|
+
createRenderState: zn
|
|
1553
1553
|
})
|
|
1554
1554
|
};
|
|
1555
1555
|
function dl(t, { forwardMotionProps: e = !1 }, n, i) {
|
|
@@ -1574,11 +1574,11 @@ function $e(t, e = "page") {
|
|
|
1574
1574
|
};
|
|
1575
1575
|
}
|
|
1576
1576
|
const pl = (t) => (e) => Sr(e) && t(e, $e(e));
|
|
1577
|
-
function
|
|
1577
|
+
function ct(t, e, n, i) {
|
|
1578
1578
|
return at(t, e, pl(n), i);
|
|
1579
1579
|
}
|
|
1580
|
-
const ml = (t, e) => (n) => e(t(n)),
|
|
1581
|
-
function
|
|
1580
|
+
const ml = (t, e) => (n) => e(t(n)), ut = (...t) => t.reduce(ml);
|
|
1581
|
+
function Cr(t) {
|
|
1582
1582
|
let e = null;
|
|
1583
1583
|
return () => {
|
|
1584
1584
|
const n = () => {
|
|
@@ -1587,8 +1587,8 @@ function Ar(t) {
|
|
|
1587
1587
|
return e === null ? (e = t, n) : !1;
|
|
1588
1588
|
};
|
|
1589
1589
|
}
|
|
1590
|
-
const Ui =
|
|
1591
|
-
function
|
|
1590
|
+
const Ui = Cr("dragHorizontal"), Wi = Cr("dragVertical");
|
|
1591
|
+
function Ar(t) {
|
|
1592
1592
|
let e = !1;
|
|
1593
1593
|
if (t === "y")
|
|
1594
1594
|
e = Wi();
|
|
@@ -1603,7 +1603,7 @@ function Cr(t) {
|
|
|
1603
1603
|
return e;
|
|
1604
1604
|
}
|
|
1605
1605
|
function Rr() {
|
|
1606
|
-
const t =
|
|
1606
|
+
const t = Ar(!0);
|
|
1607
1607
|
return t ? (t(), !1) : !0;
|
|
1608
1608
|
}
|
|
1609
1609
|
class wt {
|
|
@@ -1620,15 +1620,15 @@ function $i(t, e) {
|
|
|
1620
1620
|
const a = t.getProps();
|
|
1621
1621
|
t.animationState && a.whileHover && t.animationState.setActive("whileHover", e);
|
|
1622
1622
|
const l = a[i];
|
|
1623
|
-
l &&
|
|
1623
|
+
l && k.postRender(() => l(o, r));
|
|
1624
1624
|
};
|
|
1625
|
-
return
|
|
1625
|
+
return ct(t.current, n, s, {
|
|
1626
1626
|
passive: !t.getProps()[i]
|
|
1627
1627
|
});
|
|
1628
1628
|
}
|
|
1629
1629
|
class gl extends wt {
|
|
1630
1630
|
mount() {
|
|
1631
|
-
this.unmount =
|
|
1631
|
+
this.unmount = ut($i(this.node, !0), $i(this.node, !1));
|
|
1632
1632
|
}
|
|
1633
1633
|
unmount() {
|
|
1634
1634
|
}
|
|
@@ -1650,7 +1650,7 @@ class yl extends wt {
|
|
|
1650
1650
|
!this.isActive || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !1), this.isActive = !1);
|
|
1651
1651
|
}
|
|
1652
1652
|
mount() {
|
|
1653
|
-
this.unmount =
|
|
1653
|
+
this.unmount = ut(at(this.node.current, "focus", () => this.onFocus()), at(this.node.current, "blur", () => this.onBlur()));
|
|
1654
1654
|
}
|
|
1655
1655
|
unmount() {
|
|
1656
1656
|
}
|
|
@@ -1664,21 +1664,21 @@ function nn(t, e) {
|
|
|
1664
1664
|
}
|
|
1665
1665
|
class vl extends wt {
|
|
1666
1666
|
constructor() {
|
|
1667
|
-
super(...arguments), this.removeStartListeners =
|
|
1667
|
+
super(...arguments), this.removeStartListeners = H, this.removeEndListeners = H, this.removeAccessibleListeners = H, this.startPointerPress = (e, n) => {
|
|
1668
1668
|
if (this.isPressing)
|
|
1669
1669
|
return;
|
|
1670
1670
|
this.removeEndListeners();
|
|
1671
|
-
const i = this.node.getProps(), o =
|
|
1671
|
+
const i = this.node.getProps(), o = ct(window, "pointerup", (a, l) => {
|
|
1672
1672
|
if (!this.checkPressEnd())
|
|
1673
1673
|
return;
|
|
1674
1674
|
const { onTap: c, onTapCancel: u, globalTapTarget: f } = this.node.getProps(), d = !f && !Vr(this.node.current, a.target) ? u : c;
|
|
1675
|
-
d &&
|
|
1675
|
+
d && k.update(() => d(a, l));
|
|
1676
1676
|
}, {
|
|
1677
1677
|
passive: !(i.onTap || i.onPointerUp)
|
|
1678
|
-
}), r =
|
|
1678
|
+
}), r = ct(window, "pointercancel", (a, l) => this.cancelPress(a, l), {
|
|
1679
1679
|
passive: !(i.onTapCancel || i.onPointerCancel)
|
|
1680
1680
|
});
|
|
1681
|
-
this.removeEndListeners =
|
|
1681
|
+
this.removeEndListeners = ut(o, r), this.startPress(e, n);
|
|
1682
1682
|
}, this.startAccessiblePress = () => {
|
|
1683
1683
|
const e = (o) => {
|
|
1684
1684
|
if (o.key !== "Enter" || this.isPressing)
|
|
@@ -1686,7 +1686,7 @@ class vl extends wt {
|
|
|
1686
1686
|
const r = (a) => {
|
|
1687
1687
|
a.key !== "Enter" || !this.checkPressEnd() || nn("up", (l, c) => {
|
|
1688
1688
|
const { onTap: u } = this.node.getProps();
|
|
1689
|
-
u &&
|
|
1689
|
+
u && k.postRender(() => u(l, c));
|
|
1690
1690
|
});
|
|
1691
1691
|
};
|
|
1692
1692
|
this.removeEndListeners(), this.removeEndListeners = at(this.node.current, "keyup", r), nn("down", (a, l) => {
|
|
@@ -1695,13 +1695,13 @@ class vl extends wt {
|
|
|
1695
1695
|
}, n = at(this.node.current, "keydown", e), i = () => {
|
|
1696
1696
|
this.isPressing && nn("cancel", (o, r) => this.cancelPress(o, r));
|
|
1697
1697
|
}, s = at(this.node.current, "blur", i);
|
|
1698
|
-
this.removeAccessibleListeners =
|
|
1698
|
+
this.removeAccessibleListeners = ut(n, s);
|
|
1699
1699
|
};
|
|
1700
1700
|
}
|
|
1701
1701
|
startPress(e, n) {
|
|
1702
1702
|
this.isPressing = !0;
|
|
1703
1703
|
const { onTapStart: i, whileTap: s } = this.node.getProps();
|
|
1704
|
-
s && this.node.animationState && this.node.animationState.setActive("whileTap", !0), i &&
|
|
1704
|
+
s && this.node.animationState && this.node.animationState.setActive("whileTap", !0), i && k.postRender(() => i(e, n));
|
|
1705
1705
|
}
|
|
1706
1706
|
checkPressEnd() {
|
|
1707
1707
|
return this.removeEndListeners(), this.isPressing = !1, this.node.getProps().whileTap && this.node.animationState && this.node.animationState.setActive("whileTap", !1), !Rr();
|
|
@@ -1710,13 +1710,13 @@ class vl extends wt {
|
|
|
1710
1710
|
if (!this.checkPressEnd())
|
|
1711
1711
|
return;
|
|
1712
1712
|
const { onTapCancel: i } = this.node.getProps();
|
|
1713
|
-
i &&
|
|
1713
|
+
i && k.postRender(() => i(e, n));
|
|
1714
1714
|
}
|
|
1715
1715
|
mount() {
|
|
1716
|
-
const e = this.node.getProps(), n =
|
|
1716
|
+
const e = this.node.getProps(), n = ct(e.globalTapTarget ? window : this.node.current, "pointerdown", this.startPointerPress, {
|
|
1717
1717
|
passive: !(e.onTapStart || e.onPointerStart)
|
|
1718
1718
|
}), i = at(this.node.current, "focus", this.startAccessiblePress);
|
|
1719
|
-
this.removeStartListeners =
|
|
1719
|
+
this.removeStartListeners = ut(n, i);
|
|
1720
1720
|
}
|
|
1721
1721
|
unmount() {
|
|
1722
1722
|
this.removeStartListeners(), this.removeEndListeners(), this.removeAccessibleListeners();
|
|
@@ -1771,15 +1771,15 @@ class Sl extends wt {
|
|
|
1771
1771
|
if (typeof IntersectionObserver > "u")
|
|
1772
1772
|
return;
|
|
1773
1773
|
const { props: e, prevProps: n } = this.node;
|
|
1774
|
-
["amount", "margin", "root"].some(
|
|
1774
|
+
["amount", "margin", "root"].some(Cl(e, n)) && this.startObserver();
|
|
1775
1775
|
}
|
|
1776
1776
|
unmount() {
|
|
1777
1777
|
}
|
|
1778
1778
|
}
|
|
1779
|
-
function
|
|
1779
|
+
function Cl({ viewport: t = {} }, { viewport: e = {} } = {}) {
|
|
1780
1780
|
return (n) => t[n] !== e[n];
|
|
1781
1781
|
}
|
|
1782
|
-
const
|
|
1782
|
+
const Al = {
|
|
1783
1783
|
inView: {
|
|
1784
1784
|
Feature: Sl
|
|
1785
1785
|
},
|
|
@@ -1808,7 +1808,7 @@ function Ke(t, e, n) {
|
|
|
1808
1808
|
const i = t.getProps();
|
|
1809
1809
|
return Zn(i, e, n !== void 0 ? n : i.custom, t);
|
|
1810
1810
|
}
|
|
1811
|
-
const
|
|
1811
|
+
const ft = (t) => t * 1e3, ht = (t) => t / 1e3, Rl = {
|
|
1812
1812
|
type: "spring",
|
|
1813
1813
|
stiffness: 500,
|
|
1814
1814
|
damping: 25,
|
|
@@ -1841,8 +1841,8 @@ let Re;
|
|
|
1841
1841
|
function Ol() {
|
|
1842
1842
|
Re = void 0;
|
|
1843
1843
|
}
|
|
1844
|
-
const
|
|
1845
|
-
now: () => (Re === void 0 &&
|
|
1844
|
+
const Pt = {
|
|
1845
|
+
now: () => (Re === void 0 && Pt.set(K.isProcessing || xa.useManualTiming ? K.timestamp : performance.now()), Re),
|
|
1846
1846
|
set: (t) => {
|
|
1847
1847
|
Re = t, queueMicrotask(Ol);
|
|
1848
1848
|
}
|
|
@@ -1863,7 +1863,7 @@ function _l(t) {
|
|
|
1863
1863
|
}
|
|
1864
1864
|
const Bl = 4;
|
|
1865
1865
|
function kr(t, e, n = 1) {
|
|
1866
|
-
|
|
1866
|
+
dt(n <= Bl, `Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);
|
|
1867
1867
|
const [i, s] = _l(t);
|
|
1868
1868
|
if (!i)
|
|
1869
1869
|
return;
|
|
@@ -1885,7 +1885,7 @@ const Il = /* @__PURE__ */ new Set([
|
|
|
1885
1885
|
"y",
|
|
1886
1886
|
"translateX",
|
|
1887
1887
|
"translateY"
|
|
1888
|
-
]), Ki = (t) => t ===
|
|
1888
|
+
]), Ki = (t) => t === Ht || t === S, Gi = (t, e) => parseFloat(t.split(", ")[e]), Hi = (t, e) => (n, { transform: i }) => {
|
|
1889
1889
|
if (i === "none" || !i)
|
|
1890
1890
|
return 0;
|
|
1891
1891
|
const s = i.match(/^matrix3d\((.+)\)$/u);
|
|
@@ -1912,15 +1912,15 @@ const Kt = {
|
|
|
1912
1912
|
bottom: ({ y: t }, { top: e }) => parseFloat(e) + (t.max - t.min),
|
|
1913
1913
|
right: ({ x: t }, { left: e }) => parseFloat(e) + (t.max - t.min),
|
|
1914
1914
|
// Transform
|
|
1915
|
-
x:
|
|
1916
|
-
y:
|
|
1915
|
+
x: Hi(4, 13),
|
|
1916
|
+
y: Hi(5, 14)
|
|
1917
1917
|
};
|
|
1918
1918
|
Kt.translateX = Kt.x;
|
|
1919
1919
|
Kt.translateY = Kt.y;
|
|
1920
1920
|
const Lr = (t) => (e) => e.test(t), $l = {
|
|
1921
1921
|
test: (t) => t === "auto",
|
|
1922
1922
|
parse: (t) => t
|
|
1923
|
-
}, Or = [
|
|
1923
|
+
}, Or = [Ht, S, ot, yt, Wa, Ua, $l], zi = (t) => Or.find(Lr(t)), Et = /* @__PURE__ */ new Set();
|
|
1924
1924
|
let xn = !1, bn = !1;
|
|
1925
1925
|
function jr() {
|
|
1926
1926
|
if (bn) {
|
|
@@ -1954,7 +1954,7 @@ class ti {
|
|
|
1954
1954
|
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;
|
|
1955
1955
|
}
|
|
1956
1956
|
scheduleResolve() {
|
|
1957
|
-
this.isScheduled = !0, this.isAsync ? (Et.add(this), xn || (xn = !0,
|
|
1957
|
+
this.isScheduled = !0, this.isAsync ? (Et.add(this), xn || (xn = !0, k.read(Fr), k.resolveKeyframes(jr))) : (this.readKeyframes(), this.complete());
|
|
1958
1958
|
}
|
|
1959
1959
|
readKeyframes() {
|
|
1960
1960
|
const { unresolvedKeyframes: e, name: n, element: i, motionValue: s } = this;
|
|
@@ -2001,14 +2001,14 @@ const ei = (t, e) => (n) => !!(me(n) && Ia.test(n) && n.startsWith(t) || e && !N
|
|
|
2001
2001
|
alpha: a !== void 0 ? parseFloat(a) : 1
|
|
2002
2002
|
};
|
|
2003
2003
|
}, Gl = (t) => xt(0, 255, t), rn = {
|
|
2004
|
-
...
|
|
2004
|
+
...Ht,
|
|
2005
2005
|
transform: (t) => Math.round(Gl(t))
|
|
2006
2006
|
}, Vt = {
|
|
2007
2007
|
test: ei("rgb", "red"),
|
|
2008
2008
|
parse: _r("red", "green", "blue"),
|
|
2009
2009
|
transform: ({ red: t, green: e, blue: n, alpha: i = 1 }) => "rgba(" + rn.transform(t) + ", " + rn.transform(e) + ", " + rn.transform(n) + ", " + ne(ee.transform(i)) + ")"
|
|
2010
2010
|
};
|
|
2011
|
-
function
|
|
2011
|
+
function Hl(t) {
|
|
2012
2012
|
let e = "", n = "", i = "", s = "";
|
|
2013
2013
|
return t.length > 5 ? (e = t.substring(1, 3), n = t.substring(3, 5), i = t.substring(5, 7), s = t.substring(7, 9)) : (e = t.substring(1, 2), n = t.substring(2, 3), i = t.substring(3, 4), s = t.substring(4, 5), e += e, n += n, i += i, s += s), {
|
|
2014
2014
|
red: parseInt(e, 16),
|
|
@@ -2019,7 +2019,7 @@ function zl(t) {
|
|
|
2019
2019
|
}
|
|
2020
2020
|
const Tn = {
|
|
2021
2021
|
test: ei("#"),
|
|
2022
|
-
parse:
|
|
2022
|
+
parse: Hl,
|
|
2023
2023
|
transform: Vt.transform
|
|
2024
2024
|
}, It = {
|
|
2025
2025
|
test: ei("hsl", "hue"),
|
|
@@ -2030,7 +2030,7 @@ const Tn = {
|
|
|
2030
2030
|
parse: (t) => Vt.test(t) ? Vt.parse(t) : It.test(t) ? It.parse(t) : Tn.parse(t),
|
|
2031
2031
|
transform: (t) => me(t) ? t : t.hasOwnProperty("red") ? Vt.transform(t) : It.transform(t)
|
|
2032
2032
|
};
|
|
2033
|
-
function
|
|
2033
|
+
function zl(t) {
|
|
2034
2034
|
var e, n;
|
|
2035
2035
|
return isNaN(t) && me(t) && (((e = t.match($n)) === null || e === void 0 ? void 0 : e.length) || 0) + (((n = t.match(Ba)) === null || n === void 0 ? void 0 : n.length) || 0) > 0;
|
|
2036
2036
|
}
|
|
@@ -2066,7 +2066,7 @@ function Jl(t) {
|
|
|
2066
2066
|
return Ur(t)(e.map(Zl));
|
|
2067
2067
|
}
|
|
2068
2068
|
const bt = {
|
|
2069
|
-
test:
|
|
2069
|
+
test: zl,
|
|
2070
2070
|
parse: Nr,
|
|
2071
2071
|
createTransformer: Ur,
|
|
2072
2072
|
getAnimatableNone: Jl
|
|
@@ -2138,7 +2138,7 @@ class $r extends ti {
|
|
|
2138
2138
|
}
|
|
2139
2139
|
if (this.resolveNoneKeyframes(), !Il.has(i) || e.length !== 2)
|
|
2140
2140
|
return;
|
|
2141
|
-
const [s, o] = e, r =
|
|
2141
|
+
const [s, o] = e, r = zi(s), a = zi(o);
|
|
2142
2142
|
if (r !== a)
|
|
2143
2143
|
if (Ki(r) && Ki(a))
|
|
2144
2144
|
for (let l = 0; l < e.length; l++) {
|
|
@@ -2257,25 +2257,25 @@ class Gr {
|
|
|
2257
2257
|
});
|
|
2258
2258
|
}
|
|
2259
2259
|
}
|
|
2260
|
-
function
|
|
2260
|
+
function Hr(t, e) {
|
|
2261
2261
|
return e ? t * (1e3 / e) : 0;
|
|
2262
2262
|
}
|
|
2263
2263
|
const ac = 5;
|
|
2264
|
-
function
|
|
2264
|
+
function zr(t, e, n) {
|
|
2265
2265
|
const i = Math.max(e - ac, 0);
|
|
2266
|
-
return
|
|
2266
|
+
return Hr(n - t(i), e - i);
|
|
2267
2267
|
}
|
|
2268
2268
|
const on = 1e-3, lc = 0.01, qi = 10, cc = 0.05, uc = 1;
|
|
2269
2269
|
function fc({ duration: t = 800, bounce: e = 0.25, velocity: n = 0, mass: i = 1 }) {
|
|
2270
2270
|
let s, o;
|
|
2271
|
-
Gt(t <=
|
|
2271
|
+
Gt(t <= ft(qi), "Spring duration must be 10 seconds or less");
|
|
2272
2272
|
let r = 1 - e;
|
|
2273
|
-
r = xt(cc, uc, r), t = xt(lc, qi,
|
|
2273
|
+
r = xt(cc, uc, r), t = xt(lc, qi, ht(t)), r < 1 ? (s = (c) => {
|
|
2274
2274
|
const u = c * r, f = u * t, d = u - n, p = Sn(c, r), g = Math.exp(-f);
|
|
2275
2275
|
return on - d / p * g;
|
|
2276
2276
|
}, o = (c) => {
|
|
2277
|
-
const f = c * r * t, d = f * n + n, p = Math.pow(r, 2) * Math.pow(c, 2) * t, g = Math.exp(-f),
|
|
2278
|
-
return (-s(c) + on > 0 ? -1 : 1) * ((d - p) * g) /
|
|
2277
|
+
const f = c * r * t, d = f * n + n, p = Math.pow(r, 2) * Math.pow(c, 2) * t, g = Math.exp(-f), v = Sn(Math.pow(c, 2), r);
|
|
2278
|
+
return (-s(c) + on > 0 ? -1 : 1) * ((d - p) * g) / v;
|
|
2279
2279
|
}) : (s = (c) => {
|
|
2280
2280
|
const u = Math.exp(-c * t), f = (c - n) * t + 1;
|
|
2281
2281
|
return -on + u * f;
|
|
@@ -2284,7 +2284,7 @@ function fc({ duration: t = 800, bounce: e = 0.25, velocity: n = 0, mass: i = 1
|
|
|
2284
2284
|
return u * f;
|
|
2285
2285
|
});
|
|
2286
2286
|
const a = 5 / t, l = dc(s, o, a);
|
|
2287
|
-
if (t =
|
|
2287
|
+
if (t = ft(t), isNaN(l))
|
|
2288
2288
|
return {
|
|
2289
2289
|
stiffness: 100,
|
|
2290
2290
|
damping: 10,
|
|
@@ -2335,38 +2335,38 @@ function gc(t) {
|
|
|
2335
2335
|
function Yr({ keyframes: t, restDelta: e, restSpeed: n, ...i }) {
|
|
2336
2336
|
const s = t[0], o = t[t.length - 1], r = { done: !1, value: s }, { stiffness: a, damping: l, mass: c, duration: u, velocity: f, isResolvedFromDuration: d } = gc({
|
|
2337
2337
|
...i,
|
|
2338
|
-
velocity: -
|
|
2339
|
-
}), p = f || 0, g = l / (2 * Math.sqrt(a * c)),
|
|
2340
|
-
n || (n =
|
|
2338
|
+
velocity: -ht(i.velocity || 0)
|
|
2339
|
+
}), p = f || 0, g = l / (2 * Math.sqrt(a * c)), v = o - s, T = ht(Math.sqrt(a / c)), P = Math.abs(v) < 5;
|
|
2340
|
+
n || (n = P ? 0.01 : 2), e || (e = P ? 5e-3 : 0.5);
|
|
2341
2341
|
let y;
|
|
2342
2342
|
if (g < 1) {
|
|
2343
|
-
const
|
|
2344
|
-
y = (
|
|
2345
|
-
const
|
|
2346
|
-
return o -
|
|
2343
|
+
const x = Sn(T, g);
|
|
2344
|
+
y = (w) => {
|
|
2345
|
+
const A = Math.exp(-g * T * w);
|
|
2346
|
+
return o - A * ((p + g * T * v) / x * Math.sin(x * w) + v * Math.cos(x * w));
|
|
2347
2347
|
};
|
|
2348
2348
|
} else if (g === 1)
|
|
2349
|
-
y = (
|
|
2349
|
+
y = (x) => o - Math.exp(-T * x) * (v + (p + T * v) * x);
|
|
2350
2350
|
else {
|
|
2351
|
-
const
|
|
2352
|
-
y = (
|
|
2353
|
-
const
|
|
2354
|
-
return o -
|
|
2351
|
+
const x = T * Math.sqrt(g * g - 1);
|
|
2352
|
+
y = (w) => {
|
|
2353
|
+
const A = Math.exp(-g * T * w), L = Math.min(x * w, 300);
|
|
2354
|
+
return o - A * ((p + g * T * v) * Math.sinh(L) + x * v * Math.cosh(L)) / x;
|
|
2355
2355
|
};
|
|
2356
2356
|
}
|
|
2357
2357
|
return {
|
|
2358
2358
|
calculatedDuration: d && u || null,
|
|
2359
|
-
next: (
|
|
2360
|
-
const
|
|
2359
|
+
next: (x) => {
|
|
2360
|
+
const w = y(x);
|
|
2361
2361
|
if (d)
|
|
2362
|
-
r.done =
|
|
2362
|
+
r.done = x >= u;
|
|
2363
2363
|
else {
|
|
2364
|
-
let
|
|
2365
|
-
|
|
2366
|
-
const
|
|
2367
|
-
r.done =
|
|
2364
|
+
let A = p;
|
|
2365
|
+
x !== 0 && (g < 1 ? A = zr(y, x, w) : A = 0);
|
|
2366
|
+
const L = Math.abs(A) <= n, $ = Math.abs(o - w) <= e;
|
|
2367
|
+
r.done = L && $;
|
|
2368
2368
|
}
|
|
2369
|
-
return r.value = r.done ? o :
|
|
2369
|
+
return r.value = r.done ? o : w, r;
|
|
2370
2370
|
}
|
|
2371
2371
|
};
|
|
2372
2372
|
}
|
|
@@ -2374,19 +2374,19 @@ function Ji({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: i = 3
|
|
|
2374
2374
|
const f = t[0], d = {
|
|
2375
2375
|
done: !1,
|
|
2376
2376
|
value: f
|
|
2377
|
-
}, p = (
|
|
2378
|
-
let
|
|
2379
|
-
const T = f +
|
|
2380
|
-
|
|
2381
|
-
const y = (
|
|
2382
|
-
const
|
|
2383
|
-
d.done = Math.abs(
|
|
2377
|
+
}, p = (R) => a !== void 0 && R < a || l !== void 0 && R > l, g = (R) => a === void 0 ? l : l === void 0 || Math.abs(a - R) < Math.abs(l - R) ? a : l;
|
|
2378
|
+
let v = n * e;
|
|
2379
|
+
const T = f + v, P = r === void 0 ? T : r(T);
|
|
2380
|
+
P !== T && (v = P - f);
|
|
2381
|
+
const y = (R) => -v * Math.exp(-R / i), x = (R) => P + y(R), w = (R) => {
|
|
2382
|
+
const _ = y(R), U = x(R);
|
|
2383
|
+
d.done = Math.abs(_) <= c, d.value = d.done ? P : U;
|
|
2384
2384
|
};
|
|
2385
|
-
let
|
|
2386
|
-
const
|
|
2387
|
-
p(d.value) && (
|
|
2385
|
+
let A, L;
|
|
2386
|
+
const $ = (R) => {
|
|
2387
|
+
p(d.value) && (A = R, L = Yr({
|
|
2388
2388
|
keyframes: [d.value, g(d.value)],
|
|
2389
|
-
velocity:
|
|
2389
|
+
velocity: zr(x, R, d.value),
|
|
2390
2390
|
// TODO: This should be passing * 1000
|
|
2391
2391
|
damping: s,
|
|
2392
2392
|
stiffness: o,
|
|
@@ -2394,11 +2394,11 @@ function Ji({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: i = 3
|
|
|
2394
2394
|
restSpeed: u
|
|
2395
2395
|
}));
|
|
2396
2396
|
};
|
|
2397
|
-
return
|
|
2397
|
+
return $(0), {
|
|
2398
2398
|
calculatedDuration: null,
|
|
2399
|
-
next: (
|
|
2400
|
-
let
|
|
2401
|
-
return !
|
|
2399
|
+
next: (R) => {
|
|
2400
|
+
let _ = !1;
|
|
2401
|
+
return !L && A === void 0 && (_ = !0, w(R), $(R)), A !== void 0 && R >= A ? L.next(R - A) : (!_ && w(R), d);
|
|
2402
2402
|
}
|
|
2403
2403
|
};
|
|
2404
2404
|
}
|
|
@@ -2412,12 +2412,12 @@ function Pc(t, e, n, i, s) {
|
|
|
2412
2412
|
}
|
|
2413
2413
|
function ye(t, e, n, i) {
|
|
2414
2414
|
if (t === e && n === i)
|
|
2415
|
-
return
|
|
2415
|
+
return H;
|
|
2416
2416
|
const s = (o) => Pc(o, 0, 1, t, n);
|
|
2417
2417
|
return (o) => o === 0 || o === 1 ? o : Xr(s(o), e, i);
|
|
2418
2418
|
}
|
|
2419
|
-
const xc = ye(0.42, 0, 1, 1), bc = ye(0, 0, 0.58, 1), qr = ye(0.42, 0, 0.58, 1), Tc = (t) => Array.isArray(t) && typeof t[0] != "number", Zr = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, Jr = (t) => (e) => 1 - t(1 - e), ii = (t) => 1 - Math.sin(Math.acos(t)), Qr = Jr(ii), wc = Zr(ii), to = ye(0.33, 1.53, 0.69, 0.99), si = Jr(to), Sc = Zr(si),
|
|
2420
|
-
linear:
|
|
2419
|
+
const xc = ye(0.42, 0, 1, 1), bc = ye(0, 0, 0.58, 1), qr = ye(0.42, 0, 0.58, 1), Tc = (t) => Array.isArray(t) && typeof t[0] != "number", Zr = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, Jr = (t) => (e) => 1 - t(1 - e), ii = (t) => 1 - Math.sin(Math.acos(t)), Qr = Jr(ii), wc = Zr(ii), to = ye(0.33, 1.53, 0.69, 0.99), si = Jr(to), Sc = Zr(si), Cc = (t) => (t *= 2) < 1 ? 0.5 * si(t) : 0.5 * (2 - Math.pow(2, -10 * (t - 1))), Qi = {
|
|
2420
|
+
linear: H,
|
|
2421
2421
|
easeIn: xc,
|
|
2422
2422
|
easeInOut: qr,
|
|
2423
2423
|
easeOut: bc,
|
|
@@ -2427,23 +2427,23 @@ const xc = ye(0.42, 0, 1, 1), bc = ye(0, 0, 0.58, 1), qr = ye(0.42, 0, 0.58, 1),
|
|
|
2427
2427
|
backIn: si,
|
|
2428
2428
|
backInOut: Sc,
|
|
2429
2429
|
backOut: to,
|
|
2430
|
-
anticipate:
|
|
2430
|
+
anticipate: Cc
|
|
2431
2431
|
}, ts = (t) => {
|
|
2432
2432
|
if (Array.isArray(t)) {
|
|
2433
|
-
|
|
2433
|
+
dt(t.length === 4, "Cubic bezier arrays must contain four numerical values.");
|
|
2434
2434
|
const [e, n, i, s] = t;
|
|
2435
2435
|
return ye(e, n, i, s);
|
|
2436
2436
|
} else if (typeof t == "string")
|
|
2437
|
-
return
|
|
2437
|
+
return dt(Qi[t] !== void 0, `Invalid easing type '${t}'`), Qi[t];
|
|
2438
2438
|
return t;
|
|
2439
2439
|
}, ce = (t, e, n) => {
|
|
2440
2440
|
const i = e - t;
|
|
2441
2441
|
return i === 0 ? 1 : (n - t) / i;
|
|
2442
|
-
},
|
|
2442
|
+
}, F = (t, e, n) => t + (e - t) * n;
|
|
2443
2443
|
function an(t, e, n) {
|
|
2444
2444
|
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;
|
|
2445
2445
|
}
|
|
2446
|
-
function
|
|
2446
|
+
function Ac({ hue: t, saturation: e, lightness: n, alpha: i }) {
|
|
2447
2447
|
t /= 360, e /= 100, n /= 100;
|
|
2448
2448
|
let s = 0, o = 0, r = 0;
|
|
2449
2449
|
if (!e)
|
|
@@ -2471,20 +2471,20 @@ function es(t) {
|
|
|
2471
2471
|
if (Gt(!!e, `'${t}' is not an animatable color. Use the equivalent color code instead.`), !e)
|
|
2472
2472
|
return !1;
|
|
2473
2473
|
let n = e.parse(t);
|
|
2474
|
-
return e === It && (n =
|
|
2474
|
+
return e === It && (n = Ac(n)), n;
|
|
2475
2475
|
}
|
|
2476
2476
|
const ns = (t, e) => {
|
|
2477
2477
|
const n = es(t), i = es(e);
|
|
2478
2478
|
if (!n || !i)
|
|
2479
2479
|
return Le(t, e);
|
|
2480
2480
|
const s = { ...n };
|
|
2481
|
-
return (o) => (s.red = ln(n.red, i.red, o), s.green = ln(n.green, i.green, o), s.blue = ln(n.blue, i.blue, o), s.alpha =
|
|
2482
|
-
},
|
|
2481
|
+
return (o) => (s.red = ln(n.red, i.red, o), s.green = ln(n.green, i.green, o), s.blue = ln(n.blue, i.blue, o), s.alpha = F(n.alpha, i.alpha, o), Vt.transform(s));
|
|
2482
|
+
}, Cn = /* @__PURE__ */ new Set(["none", "hidden"]);
|
|
2483
2483
|
function Ec(t, e) {
|
|
2484
|
-
return
|
|
2484
|
+
return Cn.has(t) ? (n) => n <= 0 ? t : e : (n) => n >= 1 ? e : t;
|
|
2485
2485
|
}
|
|
2486
2486
|
function Dc(t, e) {
|
|
2487
|
-
return (n) =>
|
|
2487
|
+
return (n) => F(t, e, n);
|
|
2488
2488
|
}
|
|
2489
2489
|
function ri(t) {
|
|
2490
2490
|
return typeof t == "number" ? Dc : typeof t == "string" ? Gn(t) ? Le : z.test(t) ? ns : Lc : Array.isArray(t) ? eo : typeof t == "object" ? z.test(t) ? ns : Mc : Le;
|
|
@@ -2518,18 +2518,18 @@ function kc(t, e) {
|
|
|
2518
2518
|
}
|
|
2519
2519
|
const Lc = (t, e) => {
|
|
2520
2520
|
const n = bt.createTransformer(e), i = le(t), s = le(e);
|
|
2521
|
-
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 ?
|
|
2521
|
+
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 ? Cn.has(t) && !s.values.length || Cn.has(e) && !i.values.length ? Ec(t, e) : ut(eo(kc(i, s), s.values), n) : (Gt(!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.`), Le(t, e));
|
|
2522
2522
|
};
|
|
2523
2523
|
function no(t, e, n) {
|
|
2524
|
-
return typeof t == "number" && typeof e == "number" && typeof n == "number" ?
|
|
2524
|
+
return typeof t == "number" && typeof e == "number" && typeof n == "number" ? F(t, e, n) : ri(t)(t, e);
|
|
2525
2525
|
}
|
|
2526
2526
|
function Oc(t, e, n) {
|
|
2527
2527
|
const i = [], s = n || no, o = t.length - 1;
|
|
2528
2528
|
for (let r = 0; r < o; r++) {
|
|
2529
2529
|
let a = s(t[r], t[r + 1]);
|
|
2530
2530
|
if (e) {
|
|
2531
|
-
const l = Array.isArray(e) ? e[r] ||
|
|
2532
|
-
a =
|
|
2531
|
+
const l = Array.isArray(e) ? e[r] || H : e;
|
|
2532
|
+
a = ut(l, a);
|
|
2533
2533
|
}
|
|
2534
2534
|
i.push(a);
|
|
2535
2535
|
}
|
|
@@ -2537,7 +2537,7 @@ function Oc(t, e, n) {
|
|
|
2537
2537
|
}
|
|
2538
2538
|
function jc(t, e, { clamp: n = !0, ease: i, mixer: s } = {}) {
|
|
2539
2539
|
const o = t.length;
|
|
2540
|
-
if (
|
|
2540
|
+
if (dt(o === e.length, "Both input and output ranges must be the same length"), o === 1)
|
|
2541
2541
|
return () => e[0];
|
|
2542
2542
|
if (o === 2 && t[0] === t[1])
|
|
2543
2543
|
return () => e[1];
|
|
@@ -2556,7 +2556,7 @@ function Fc(t, e) {
|
|
|
2556
2556
|
const n = t[t.length - 1];
|
|
2557
2557
|
for (let i = 1; i <= e; i++) {
|
|
2558
2558
|
const s = ce(0, e, i);
|
|
2559
|
-
t.push(
|
|
2559
|
+
t.push(F(n, 1, s));
|
|
2560
2560
|
}
|
|
2561
2561
|
}
|
|
2562
2562
|
function _c(t) {
|
|
@@ -2598,13 +2598,13 @@ function Nc(t) {
|
|
|
2598
2598
|
const Uc = (t) => {
|
|
2599
2599
|
const e = ({ timestamp: n }) => t(n);
|
|
2600
2600
|
return {
|
|
2601
|
-
start: () =>
|
|
2602
|
-
stop: () =>
|
|
2601
|
+
start: () => k.update(e, !0),
|
|
2602
|
+
stop: () => pt(e),
|
|
2603
2603
|
/**
|
|
2604
2604
|
* If we're processing this frame we can use the
|
|
2605
2605
|
* framelocked timestamp to keep things in sync.
|
|
2606
2606
|
*/
|
|
2607
|
-
now: () =>
|
|
2607
|
+
now: () => K.isProcessing ? K.timestamp : Pt.now()
|
|
2608
2608
|
};
|
|
2609
2609
|
}, Wc = {
|
|
2610
2610
|
decay: Ji,
|
|
@@ -2628,7 +2628,7 @@ class oi extends Gr {
|
|
|
2628
2628
|
initPlayback(e) {
|
|
2629
2629
|
const { type: n = "keyframes", repeat: i = 0, repeatDelay: s = 0, repeatType: o, velocity: r = 0 } = this.options, a = Wc[n] || Oe;
|
|
2630
2630
|
let l, c;
|
|
2631
|
-
a !== Oe && typeof e[0] != "number" && (process.env.NODE_ENV !== "production" &&
|
|
2631
|
+
a !== Oe && typeof e[0] != "number" && (process.env.NODE_ENV !== "production" && dt(e.length === 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${e}`), l = ut($c, no(e[0], e[1])), e = [0, 100]);
|
|
2632
2632
|
const u = a({ ...this.options, keyframes: e });
|
|
2633
2633
|
o === "mirror" && (c = a({
|
|
2634
2634
|
...this.options,
|
|
@@ -2652,45 +2652,45 @@ class oi extends Gr {
|
|
|
2652
2652
|
tick(e, n = !1) {
|
|
2653
2653
|
const { resolved: i } = this;
|
|
2654
2654
|
if (!i) {
|
|
2655
|
-
const { keyframes:
|
|
2656
|
-
return { done: !0, value:
|
|
2655
|
+
const { keyframes: R } = this.options;
|
|
2656
|
+
return { done: !0, value: R[R.length - 1] };
|
|
2657
2657
|
}
|
|
2658
2658
|
const { finalKeyframe: s, generator: o, mirroredGenerator: r, mapPercentToKeyframes: a, keyframes: l, calculatedDuration: c, totalDuration: u, resolvedDuration: f } = i;
|
|
2659
2659
|
if (this.startTime === null)
|
|
2660
2660
|
return o.next(0);
|
|
2661
|
-
const { delay: d, repeat: p, repeatType: g, repeatDelay:
|
|
2661
|
+
const { delay: d, repeat: p, repeatType: g, repeatDelay: v, onUpdate: T } = this.options;
|
|
2662
2662
|
this.speed > 0 ? this.startTime = Math.min(this.startTime, e) : this.speed < 0 && (this.startTime = Math.min(e - u / this.speed, this.startTime)), n ? this.currentTime = e : this.holdTime !== null ? this.currentTime = this.holdTime : this.currentTime = Math.round(e - this.startTime) * this.speed;
|
|
2663
|
-
const
|
|
2664
|
-
this.currentTime = Math.max(
|
|
2665
|
-
let
|
|
2663
|
+
const P = this.currentTime - d * (this.speed >= 0 ? 1 : -1), y = this.speed >= 0 ? P < 0 : P > u;
|
|
2664
|
+
this.currentTime = Math.max(P, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = u);
|
|
2665
|
+
let x = this.currentTime, w = o;
|
|
2666
2666
|
if (p) {
|
|
2667
|
-
const
|
|
2668
|
-
let
|
|
2669
|
-
!U &&
|
|
2667
|
+
const R = Math.min(this.currentTime, u) / f;
|
|
2668
|
+
let _ = Math.floor(R), U = R % 1;
|
|
2669
|
+
!U && R >= 1 && (U = 1), U === 1 && _--, _ = Math.min(_, p + 1), !!(_ % 2) && (g === "reverse" ? (U = 1 - U, v && (U -= v / f)) : g === "mirror" && (w = r)), x = xt(0, 1, U) * f;
|
|
2670
2670
|
}
|
|
2671
|
-
const
|
|
2672
|
-
a && (
|
|
2673
|
-
let { done:
|
|
2674
|
-
!y && c !== null && (
|
|
2675
|
-
const
|
|
2676
|
-
return
|
|
2671
|
+
const A = y ? { done: !1, value: l[0] } : w.next(x);
|
|
2672
|
+
a && (A.value = a(A.value));
|
|
2673
|
+
let { done: L } = A;
|
|
2674
|
+
!y && c !== null && (L = this.speed >= 0 ? this.currentTime >= u : this.currentTime <= 0);
|
|
2675
|
+
const $ = this.holdTime === null && (this.state === "finished" || this.state === "running" && L);
|
|
2676
|
+
return $ && s !== void 0 && (A.value = Ge(l, this.options, s)), T && T(A.value), $ && this.finish(), A;
|
|
2677
2677
|
}
|
|
2678
2678
|
get duration() {
|
|
2679
2679
|
const { resolved: e } = this;
|
|
2680
|
-
return e ?
|
|
2680
|
+
return e ? ht(e.calculatedDuration) : 0;
|
|
2681
2681
|
}
|
|
2682
2682
|
get time() {
|
|
2683
|
-
return
|
|
2683
|
+
return ht(this.currentTime);
|
|
2684
2684
|
}
|
|
2685
2685
|
set time(e) {
|
|
2686
|
-
e =
|
|
2686
|
+
e = ft(e), this.currentTime = e, this.holdTime !== null || this.speed === 0 ? this.holdTime = e : this.driver && (this.startTime = this.driver.now() - e / this.speed);
|
|
2687
2687
|
}
|
|
2688
2688
|
get speed() {
|
|
2689
2689
|
return this.playbackSpeed;
|
|
2690
2690
|
}
|
|
2691
2691
|
set speed(e) {
|
|
2692
2692
|
const n = this.playbackSpeed !== e;
|
|
2693
|
-
this.playbackSpeed = e, n && (this.time =
|
|
2693
|
+
this.playbackSpeed = e, n && (this.time = ht(this.currentTime));
|
|
2694
2694
|
}
|
|
2695
2695
|
play() {
|
|
2696
2696
|
if (this.resolver.isScheduled || this.resolver.resume(), !this._resolved) {
|
|
@@ -2768,7 +2768,7 @@ function Gc(t, e, n, { delay: i = 0, duration: s = 300, repeat: o = 0, repeatTyp
|
|
|
2768
2768
|
direction: r === "reverse" ? "alternate" : "normal"
|
|
2769
2769
|
});
|
|
2770
2770
|
}
|
|
2771
|
-
const
|
|
2771
|
+
const Hc = Kr(() => Object.hasOwnProperty.call(Element.prototype, "animate")), je = 10, zc = 2e4;
|
|
2772
2772
|
function Yc(t) {
|
|
2773
2773
|
return t.type === "spring" || !so(t.ease);
|
|
2774
2774
|
}
|
|
@@ -2783,7 +2783,7 @@ function Xc(t, e) {
|
|
|
2783
2783
|
let i = { done: !1, value: t[0] };
|
|
2784
2784
|
const s = [];
|
|
2785
2785
|
let o = 0;
|
|
2786
|
-
for (; !i.done && o <
|
|
2786
|
+
for (; !i.done && o < zc; )
|
|
2787
2787
|
i = n.sample(o), s.push(i.value), o += je;
|
|
2788
2788
|
return {
|
|
2789
2789
|
times: void 0,
|
|
@@ -2804,11 +2804,11 @@ class ss extends Gr {
|
|
|
2804
2804
|
if (!(!((i = l.owner) === null || i === void 0) && i.current))
|
|
2805
2805
|
return !1;
|
|
2806
2806
|
if (Yc(this.options)) {
|
|
2807
|
-
const { onComplete: f, onUpdate: d, motionValue: p, ...g } = this.options,
|
|
2808
|
-
e =
|
|
2807
|
+
const { onComplete: f, onUpdate: d, motionValue: p, ...g } = this.options, v = Xc(e, g);
|
|
2808
|
+
e = v.keyframes, e.length === 1 && (e[1] = e[0]), s = v.duration, o = v.times, r = v.ease, a = "keyframes";
|
|
2809
2809
|
}
|
|
2810
2810
|
const u = Gc(l.owner.current, c, e, { ...this.options, duration: s, times: o, ease: r });
|
|
2811
|
-
return u.startTime =
|
|
2811
|
+
return u.startTime = Pt.now(), this.pendingTimeline ? (u.timeline = this.pendingTimeline, this.pendingTimeline = void 0) : u.onfinish = () => {
|
|
2812
2812
|
const { onComplete: f } = this.options;
|
|
2813
2813
|
l.set(Ge(e, this.options, n)), f && f(), this.cancel(), this.resolveFinishedPromise();
|
|
2814
2814
|
}, {
|
|
@@ -2825,21 +2825,21 @@ class ss extends Gr {
|
|
|
2825
2825
|
if (!e)
|
|
2826
2826
|
return 0;
|
|
2827
2827
|
const { duration: n } = e;
|
|
2828
|
-
return
|
|
2828
|
+
return ht(n);
|
|
2829
2829
|
}
|
|
2830
2830
|
get time() {
|
|
2831
2831
|
const { resolved: e } = this;
|
|
2832
2832
|
if (!e)
|
|
2833
2833
|
return 0;
|
|
2834
2834
|
const { animation: n } = e;
|
|
2835
|
-
return
|
|
2835
|
+
return ht(n.currentTime || 0);
|
|
2836
2836
|
}
|
|
2837
2837
|
set time(e) {
|
|
2838
2838
|
const { resolved: n } = this;
|
|
2839
2839
|
if (!n)
|
|
2840
2840
|
return;
|
|
2841
2841
|
const { animation: i } = n;
|
|
2842
|
-
i.currentTime =
|
|
2842
|
+
i.currentTime = ft(e);
|
|
2843
2843
|
}
|
|
2844
2844
|
get speed() {
|
|
2845
2845
|
const { resolved: e } = this;
|
|
@@ -2872,11 +2872,11 @@ class ss extends Gr {
|
|
|
2872
2872
|
else {
|
|
2873
2873
|
const { resolved: n } = this;
|
|
2874
2874
|
if (!n)
|
|
2875
|
-
return
|
|
2875
|
+
return H;
|
|
2876
2876
|
const { animation: i } = n;
|
|
2877
2877
|
i.timeline = e, i.onfinish = null;
|
|
2878
2878
|
}
|
|
2879
|
-
return
|
|
2879
|
+
return H;
|
|
2880
2880
|
}
|
|
2881
2881
|
play() {
|
|
2882
2882
|
if (this.isStopped)
|
|
@@ -2913,7 +2913,7 @@ class ss extends Gr {
|
|
|
2913
2913
|
ease: r,
|
|
2914
2914
|
times: a,
|
|
2915
2915
|
isGenerator: !0
|
|
2916
|
-
}), g =
|
|
2916
|
+
}), g = ft(this.time);
|
|
2917
2917
|
c.setWithVelocity(p.sample(g - je).value, p.sample(g).value, je);
|
|
2918
2918
|
}
|
|
2919
2919
|
const { onStop: l } = this.options;
|
|
@@ -2929,7 +2929,7 @@ class ss extends Gr {
|
|
|
2929
2929
|
}
|
|
2930
2930
|
static supports(e) {
|
|
2931
2931
|
const { motionValue: n, name: i, repeatDelay: s, repeatType: o, damping: r, type: a } = e;
|
|
2932
|
-
return
|
|
2932
|
+
return Hc() && i && br.has(i) && n && n.owner && n.owner.current instanceof HTMLElement && /**
|
|
2933
2933
|
* If we're outputting values to onUpdate then we can't use WAAPI as there's
|
|
2934
2934
|
* no way to read the value from WAAPI every frame.
|
|
2935
2935
|
*/
|
|
@@ -2942,7 +2942,7 @@ function qc(t, e) {
|
|
|
2942
2942
|
const { currentTime: s } = e, r = (s === null ? 0 : s.value) / 100;
|
|
2943
2943
|
n !== r && t(r), n = r;
|
|
2944
2944
|
};
|
|
2945
|
-
return
|
|
2945
|
+
return k.update(i, !0), () => pt(i);
|
|
2946
2946
|
}
|
|
2947
2947
|
const Zc = Kr(() => window.ScrollTimeline !== void 0);
|
|
2948
2948
|
class Jc {
|
|
@@ -3014,7 +3014,7 @@ class Jc {
|
|
|
3014
3014
|
const li = (t, e, n, i = {}, s, o, r) => (a) => {
|
|
3015
3015
|
const l = Qn(i, t) || {}, c = l.delay || i.delay || 0;
|
|
3016
3016
|
let { elapsed: u = 0 } = i;
|
|
3017
|
-
u = u -
|
|
3017
|
+
u = u - ft(c);
|
|
3018
3018
|
let f = {
|
|
3019
3019
|
keyframes: Array.isArray(n) ? n : [null, n],
|
|
3020
3020
|
ease: "easeOut",
|
|
@@ -3035,12 +3035,12 @@ const li = (t, e, n, i = {}, s, o, r) => (a) => {
|
|
|
3035
3035
|
kl(l) || (f = {
|
|
3036
3036
|
...f,
|
|
3037
3037
|
...Ml(t, f)
|
|
3038
|
-
}), f.duration && (f.duration =
|
|
3038
|
+
}), f.duration && (f.duration = ft(f.duration)), f.repeatDelay && (f.repeatDelay = ft(f.repeatDelay)), f.from !== void 0 && (f.keyframes[0] = f.from);
|
|
3039
3039
|
let d = !1;
|
|
3040
3040
|
if ((f.type === !1 || f.duration === 0 && !f.repeatDelay) && (f.duration = 0, f.delay === 0 && (d = !0)), d && !o && e.get() !== void 0) {
|
|
3041
3041
|
const p = Ge(f.keyframes, l);
|
|
3042
3042
|
if (p !== void 0)
|
|
3043
|
-
return
|
|
3043
|
+
return k.update(() => {
|
|
3044
3044
|
f.onUpdate(p), f.onComplete();
|
|
3045
3045
|
}), new Jc([]);
|
|
3046
3046
|
}
|
|
@@ -3087,12 +3087,12 @@ class oo {
|
|
|
3087
3087
|
*/
|
|
3088
3088
|
constructor(e, n = {}) {
|
|
3089
3089
|
this.version = "11.3.21", this.canTrackVelocity = null, this.events = {}, this.updateAndNotify = (i, s = !0) => {
|
|
3090
|
-
const o =
|
|
3090
|
+
const o = Pt.now();
|
|
3091
3091
|
this.updatedAt !== o && this.setPrevFrameValue(), this.prev = this.current, this.setCurrent(i), this.current !== this.prev && this.events.change && this.events.change.notify(this.current), s && this.events.renderRequest && this.events.renderRequest.notify(this.current);
|
|
3092
3092
|
}, this.hasAnimated = !1, this.setCurrent(e), this.owner = n.owner;
|
|
3093
3093
|
}
|
|
3094
3094
|
setCurrent(e) {
|
|
3095
|
-
this.current = e, this.updatedAt =
|
|
3095
|
+
this.current = e, this.updatedAt = Pt.now(), this.canTrackVelocity === null && e !== void 0 && (this.canTrackVelocity = Qc(this.current));
|
|
3096
3096
|
}
|
|
3097
3097
|
setPrevFrameValue(e = this.current) {
|
|
3098
3098
|
this.prevFrameValue = e, this.prevUpdatedAt = this.updatedAt;
|
|
@@ -3144,7 +3144,7 @@ class oo {
|
|
|
3144
3144
|
this.events[e] || (this.events[e] = new ci());
|
|
3145
3145
|
const i = this.events[e].add(n);
|
|
3146
3146
|
return e === "change" ? () => {
|
|
3147
|
-
i(),
|
|
3147
|
+
i(), k.read(() => {
|
|
3148
3148
|
this.events.change.getSize() || this.stop();
|
|
3149
3149
|
});
|
|
3150
3150
|
} : i;
|
|
@@ -3213,11 +3213,11 @@ class oo {
|
|
|
3213
3213
|
* @public
|
|
3214
3214
|
*/
|
|
3215
3215
|
getVelocity() {
|
|
3216
|
-
const e =
|
|
3216
|
+
const e = Pt.now();
|
|
3217
3217
|
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || e - this.updatedAt > os)
|
|
3218
3218
|
return 0;
|
|
3219
3219
|
const n = Math.min(this.updatedAt - this.prevUpdatedAt, os);
|
|
3220
|
-
return
|
|
3220
|
+
return Hr(parseFloat(this.current) - parseFloat(this.prevFrameValue), n);
|
|
3221
3221
|
}
|
|
3222
3222
|
/**
|
|
3223
3223
|
* Registers a new animation to control this `MotionValue`. Only one
|
|
@@ -3312,9 +3312,9 @@ class nu extends oo {
|
|
|
3312
3312
|
}
|
|
3313
3313
|
}
|
|
3314
3314
|
function iu(t) {
|
|
3315
|
-
return !!(
|
|
3315
|
+
return !!(Y(t) && t.add);
|
|
3316
3316
|
}
|
|
3317
|
-
function
|
|
3317
|
+
function An(t, e) {
|
|
3318
3318
|
var n;
|
|
3319
3319
|
if (!t.applyWillChange)
|
|
3320
3320
|
return;
|
|
@@ -3340,20 +3340,20 @@ function lo(t, e, { delay: n = 0, transitionOverride: i, type: s } = {}) {
|
|
|
3340
3340
|
elapsed: 0,
|
|
3341
3341
|
...Qn(r || {}, f)
|
|
3342
3342
|
};
|
|
3343
|
-
let
|
|
3343
|
+
let v = !1;
|
|
3344
3344
|
if (window.HandoffAppearAnimations) {
|
|
3345
|
-
const
|
|
3346
|
-
if (
|
|
3347
|
-
const y = window.HandoffAppearAnimations(
|
|
3348
|
-
y !== null && (g.elapsed = y,
|
|
3345
|
+
const P = ao(t);
|
|
3346
|
+
if (P) {
|
|
3347
|
+
const y = window.HandoffAppearAnimations(P, f, d, k);
|
|
3348
|
+
y !== null && (g.elapsed = y, v = !0);
|
|
3349
3349
|
}
|
|
3350
3350
|
}
|
|
3351
|
-
d.start(li(f, d, p, t.shouldReduceMotion && Tt.has(f) ? { type: !1 } : g, t,
|
|
3351
|
+
d.start(li(f, d, p, t.shouldReduceMotion && Tt.has(f) ? { type: !1 } : g, t, v, An(t, f)));
|
|
3352
3352
|
const T = d.animation;
|
|
3353
3353
|
T && c.push(T);
|
|
3354
3354
|
}
|
|
3355
3355
|
return a && Promise.all(c).then(() => {
|
|
3356
|
-
|
|
3356
|
+
k.update(() => {
|
|
3357
3357
|
a && eu(t, a);
|
|
3358
3358
|
});
|
|
3359
3359
|
}), c;
|
|
@@ -3411,8 +3411,8 @@ function fu(t) {
|
|
|
3411
3411
|
var f;
|
|
3412
3412
|
const d = Ke(t, u, l === "exit" ? (f = t.presenceContext) === null || f === void 0 ? void 0 : f.custom : void 0);
|
|
3413
3413
|
if (d) {
|
|
3414
|
-
const { transition: p, transitionEnd: g, ...
|
|
3415
|
-
c = { ...c, ...
|
|
3414
|
+
const { transition: p, transitionEnd: g, ...v } = d;
|
|
3415
|
+
c = { ...c, ...v, ...g };
|
|
3416
3416
|
}
|
|
3417
3417
|
return c;
|
|
3418
3418
|
};
|
|
@@ -3423,49 +3423,49 @@ function fu(t) {
|
|
|
3423
3423
|
const c = t.getProps(), u = t.getVariantContext(!0) || {}, f = [], d = /* @__PURE__ */ new Set();
|
|
3424
3424
|
let p = {}, g = 1 / 0;
|
|
3425
3425
|
for (let T = 0; T < cu; T++) {
|
|
3426
|
-
const
|
|
3427
|
-
|
|
3428
|
-
let
|
|
3429
|
-
if (
|
|
3430
|
-
!y.isActive &&
|
|
3431
|
-
!
|
|
3432
|
-
ae(
|
|
3426
|
+
const P = lu[T], y = n[P], x = c[P] !== void 0 ? c[P] : u[P], w = oe(x), A = P === l ? y.isActive : null;
|
|
3427
|
+
A === !1 && (g = T);
|
|
3428
|
+
let L = x === u[P] && x !== c[P] && w;
|
|
3429
|
+
if (L && i && t.manuallyAnimateOnMount && (L = !1), y.protectedKeys = { ...p }, // If it isn't active and hasn't *just* been set as inactive
|
|
3430
|
+
!y.isActive && A === null || // If we didn't and don't have any defined prop for this animation type
|
|
3431
|
+
!x && !y.prevProp || // Or if the prop doesn't define an animation
|
|
3432
|
+
ae(x) || typeof x == "boolean")
|
|
3433
3433
|
continue;
|
|
3434
|
-
let
|
|
3435
|
-
|
|
3436
|
-
T > g &&
|
|
3437
|
-
const U = Array.isArray(
|
|
3438
|
-
let
|
|
3439
|
-
|
|
3440
|
-
const { prevResolvedValues:
|
|
3441
|
-
...
|
|
3442
|
-
...
|
|
3443
|
-
}, rt = (
|
|
3444
|
-
|
|
3445
|
-
const Q = t.getValue(
|
|
3434
|
+
let R = hu(y.prevProp, x) || // If we're making this variant active, we want to always make it active
|
|
3435
|
+
P === l && y.isActive && !L && w || // If we removed a higher-priority variant (i is in reverse order)
|
|
3436
|
+
T > g && w, _ = !1;
|
|
3437
|
+
const U = Array.isArray(x) ? x : [x];
|
|
3438
|
+
let M = U.reduce(s(P), {});
|
|
3439
|
+
A === !1 && (M = {});
|
|
3440
|
+
const { prevResolvedValues: zt = {} } = y, J = {
|
|
3441
|
+
...zt,
|
|
3442
|
+
...M
|
|
3443
|
+
}, rt = (B) => {
|
|
3444
|
+
R = !0, d.has(B) && (_ = !0, d.delete(B)), y.needsAnimating[B] = !0;
|
|
3445
|
+
const Q = t.getValue(B);
|
|
3446
3446
|
Q && (Q.liveStyle = !1);
|
|
3447
3447
|
};
|
|
3448
|
-
for (const
|
|
3449
|
-
const Q =
|
|
3450
|
-
if (p.hasOwnProperty(
|
|
3448
|
+
for (const B in J) {
|
|
3449
|
+
const Q = M[B], kt = zt[B];
|
|
3450
|
+
if (p.hasOwnProperty(B))
|
|
3451
3451
|
continue;
|
|
3452
3452
|
let Lt = !1;
|
|
3453
|
-
vn(Q) && vn(kt) ? Lt = !Er(Q, kt) : Lt = Q !== kt, Lt ? Q != null ? rt(
|
|
3453
|
+
vn(Q) && vn(kt) ? Lt = !Er(Q, kt) : Lt = Q !== kt, Lt ? Q != null ? rt(B) : d.add(B) : Q !== void 0 && d.has(B) ? rt(B) : y.protectedKeys[B] = !0;
|
|
3454
3454
|
}
|
|
3455
|
-
y.prevProp =
|
|
3456
|
-
animation:
|
|
3457
|
-
options: { type:
|
|
3455
|
+
y.prevProp = x, y.prevResolvedValues = M, y.isActive && (p = { ...p, ...M }), i && t.blockInitialAnimation && (R = !1), R && (!L || _) && f.push(...U.map((B) => ({
|
|
3456
|
+
animation: B,
|
|
3457
|
+
options: { type: P }
|
|
3458
3458
|
})));
|
|
3459
3459
|
}
|
|
3460
3460
|
if (d.size) {
|
|
3461
3461
|
const T = {};
|
|
3462
|
-
d.forEach((
|
|
3463
|
-
const y = t.getBaseTarget(
|
|
3464
|
-
|
|
3462
|
+
d.forEach((P) => {
|
|
3463
|
+
const y = t.getBaseTarget(P), x = t.getValue(P);
|
|
3464
|
+
x && (x.liveStyle = !0), T[P] = y ?? null;
|
|
3465
3465
|
}), f.push({ animation: T });
|
|
3466
3466
|
}
|
|
3467
|
-
let
|
|
3468
|
-
return i && (c.initial === !1 || c.initial === c.animate) && !t.manuallyAnimateOnMount && (
|
|
3467
|
+
let v = !!f.length;
|
|
3468
|
+
return i && (c.initial === !1 || c.initial === c.animate) && !t.manuallyAnimateOnMount && (v = !1), i = !1, v ? e(f) : Promise.resolve();
|
|
3469
3469
|
}
|
|
3470
3470
|
function a(l, c) {
|
|
3471
3471
|
var u;
|
|
@@ -3493,7 +3493,7 @@ function fu(t) {
|
|
|
3493
3493
|
function hu(t, e) {
|
|
3494
3494
|
return typeof e == "string" ? e !== t : Array.isArray(e) ? !Er(e, t) : !1;
|
|
3495
3495
|
}
|
|
3496
|
-
function
|
|
3496
|
+
function Ct(t = !1) {
|
|
3497
3497
|
return {
|
|
3498
3498
|
isActive: t,
|
|
3499
3499
|
protectedKeys: {},
|
|
@@ -3503,13 +3503,13 @@ function At(t = !1) {
|
|
|
3503
3503
|
}
|
|
3504
3504
|
function as() {
|
|
3505
3505
|
return {
|
|
3506
|
-
animate:
|
|
3507
|
-
whileInView:
|
|
3508
|
-
whileHover:
|
|
3509
|
-
whileTap:
|
|
3510
|
-
whileDrag:
|
|
3511
|
-
whileFocus:
|
|
3512
|
-
exit:
|
|
3506
|
+
animate: Ct(!0),
|
|
3507
|
+
whileInView: Ct(),
|
|
3508
|
+
whileHover: Ct(),
|
|
3509
|
+
whileTap: Ct(),
|
|
3510
|
+
whileDrag: Ct(),
|
|
3511
|
+
whileFocus: Ct(),
|
|
3512
|
+
exit: Ct()
|
|
3513
3513
|
};
|
|
3514
3514
|
}
|
|
3515
3515
|
class du extends wt {
|
|
@@ -3581,32 +3581,32 @@ class co {
|
|
|
3581
3581
|
const f = un(this.lastMoveEventInfo, this.history), d = this.startEvent !== null, p = yu(f.offset, { x: 0, y: 0 }) >= 3;
|
|
3582
3582
|
if (!d && !p)
|
|
3583
3583
|
return;
|
|
3584
|
-
const { point: g } = f, { timestamp:
|
|
3585
|
-
this.history.push({ ...g, timestamp:
|
|
3586
|
-
const { onStart: T, onMove:
|
|
3587
|
-
d || (T && T(this.lastMoveEvent, f), this.startEvent = this.lastMoveEvent),
|
|
3584
|
+
const { point: g } = f, { timestamp: v } = K;
|
|
3585
|
+
this.history.push({ ...g, timestamp: v });
|
|
3586
|
+
const { onStart: T, onMove: P } = this.handlers;
|
|
3587
|
+
d || (T && T(this.lastMoveEvent, f), this.startEvent = this.lastMoveEvent), P && P(this.lastMoveEvent, f);
|
|
3588
3588
|
}, this.handlePointerMove = (f, d) => {
|
|
3589
|
-
this.lastMoveEvent = f, this.lastMoveEventInfo = cn(d, this.transformPagePoint),
|
|
3589
|
+
this.lastMoveEvent = f, this.lastMoveEventInfo = cn(d, this.transformPagePoint), k.update(this.updatePoint, !0);
|
|
3590
3590
|
}, this.handlePointerUp = (f, d) => {
|
|
3591
3591
|
this.end();
|
|
3592
|
-
const { onEnd: p, onSessionEnd: g, resumeAnimation:
|
|
3593
|
-
if (this.dragSnapToOrigin &&
|
|
3592
|
+
const { onEnd: p, onSessionEnd: g, resumeAnimation: v } = this.handlers;
|
|
3593
|
+
if (this.dragSnapToOrigin && v && v(), !(this.lastMoveEvent && this.lastMoveEventInfo))
|
|
3594
3594
|
return;
|
|
3595
3595
|
const T = un(f.type === "pointercancel" ? this.lastMoveEventInfo : cn(d, this.transformPagePoint), this.history);
|
|
3596
3596
|
this.startEvent && p && p(f, T), g && g(f, T);
|
|
3597
3597
|
}, !Sr(e))
|
|
3598
3598
|
return;
|
|
3599
3599
|
this.dragSnapToOrigin = o, this.handlers = n, this.transformPagePoint = i, this.contextWindow = s || window;
|
|
3600
|
-
const r = $e(e), a = cn(r, this.transformPagePoint), { point: l } = a, { timestamp: c } =
|
|
3600
|
+
const r = $e(e), a = cn(r, this.transformPagePoint), { point: l } = a, { timestamp: c } = K;
|
|
3601
3601
|
this.history = [{ ...l, timestamp: c }];
|
|
3602
3602
|
const { onSessionStart: u } = n;
|
|
3603
|
-
u && u(e, un(a, this.history)), this.removeListeners = ct(
|
|
3603
|
+
u && u(e, un(a, this.history)), this.removeListeners = ut(ct(this.contextWindow, "pointermove", this.handlePointerMove), ct(this.contextWindow, "pointerup", this.handlePointerUp), ct(this.contextWindow, "pointercancel", this.handlePointerUp));
|
|
3604
3604
|
}
|
|
3605
3605
|
updateHandlers(e) {
|
|
3606
3606
|
this.handlers = e;
|
|
3607
3607
|
}
|
|
3608
3608
|
end() {
|
|
3609
|
-
this.removeListeners && this.removeListeners(),
|
|
3609
|
+
this.removeListeners && this.removeListeners(), pt(this.updatePoint);
|
|
3610
3610
|
}
|
|
3611
3611
|
}
|
|
3612
3612
|
function cn(t, e) {
|
|
@@ -3634,11 +3634,11 @@ function Pu(t, e) {
|
|
|
3634
3634
|
return { x: 0, y: 0 };
|
|
3635
3635
|
let n = t.length - 1, i = null;
|
|
3636
3636
|
const s = uo(t);
|
|
3637
|
-
for (; n >= 0 && (i = t[n], !(s.timestamp - i.timestamp >
|
|
3637
|
+
for (; n >= 0 && (i = t[n], !(s.timestamp - i.timestamp > ft(e))); )
|
|
3638
3638
|
n--;
|
|
3639
3639
|
if (!i)
|
|
3640
3640
|
return { x: 0, y: 0 };
|
|
3641
|
-
const o =
|
|
3641
|
+
const o = ht(s.timestamp - i.timestamp);
|
|
3642
3642
|
if (o === 0)
|
|
3643
3643
|
return { x: 0, y: 0 };
|
|
3644
3644
|
const r = {
|
|
@@ -3648,32 +3648,32 @@ function Pu(t, e) {
|
|
|
3648
3648
|
return r.x === 1 / 0 && (r.x = 0), r.y === 1 / 0 && (r.y = 0), r;
|
|
3649
3649
|
}
|
|
3650
3650
|
const fo = 1e-4, xu = 1 - fo, bu = 1 + fo, ho = 0.01, Tu = 0 - ho, wu = 0 + ho;
|
|
3651
|
-
function
|
|
3651
|
+
function Z(t) {
|
|
3652
3652
|
return t.max - t.min;
|
|
3653
3653
|
}
|
|
3654
3654
|
function Su(t, e, n) {
|
|
3655
3655
|
return Math.abs(t - e) <= n;
|
|
3656
3656
|
}
|
|
3657
3657
|
function us(t, e, n, i = 0.5) {
|
|
3658
|
-
t.origin = i, t.originPoint =
|
|
3658
|
+
t.origin = i, t.originPoint = F(e.min, e.max, t.origin), t.scale = Z(n) / Z(e), t.translate = F(n.min, n.max, t.origin) - t.originPoint, (t.scale >= xu && t.scale <= bu || isNaN(t.scale)) && (t.scale = 1), (t.translate >= Tu && t.translate <= wu || isNaN(t.translate)) && (t.translate = 0);
|
|
3659
3659
|
}
|
|
3660
3660
|
function ie(t, e, n, i) {
|
|
3661
3661
|
us(t.x, e.x, n.x, i ? i.originX : void 0), us(t.y, e.y, n.y, i ? i.originY : void 0);
|
|
3662
3662
|
}
|
|
3663
3663
|
function fs(t, e, n) {
|
|
3664
|
-
t.min = n.min + e.min, t.max = t.min +
|
|
3664
|
+
t.min = n.min + e.min, t.max = t.min + Z(e);
|
|
3665
3665
|
}
|
|
3666
|
-
function
|
|
3666
|
+
function Cu(t, e, n) {
|
|
3667
3667
|
fs(t.x, e.x, n.x), fs(t.y, e.y, n.y);
|
|
3668
3668
|
}
|
|
3669
3669
|
function hs(t, e, n) {
|
|
3670
|
-
t.min = e.min - n.min, t.max = t.min +
|
|
3670
|
+
t.min = e.min - n.min, t.max = t.min + Z(e);
|
|
3671
3671
|
}
|
|
3672
3672
|
function se(t, e, n) {
|
|
3673
3673
|
hs(t.x, e.x, n.x), hs(t.y, e.y, n.y);
|
|
3674
3674
|
}
|
|
3675
|
-
function
|
|
3676
|
-
return e !== void 0 && t < e ? t = i ?
|
|
3675
|
+
function Au(t, { min: e, max: n }, i) {
|
|
3676
|
+
return e !== void 0 && t < e ? t = i ? F(e, t, i.min) : Math.max(t, e) : n !== void 0 && t > n && (t = i ? F(n, t, i.max) : Math.min(t, n)), t;
|
|
3677
3677
|
}
|
|
3678
3678
|
function ds(t, e, n) {
|
|
3679
3679
|
return {
|
|
@@ -3699,7 +3699,7 @@ function Vu(t, e) {
|
|
|
3699
3699
|
}
|
|
3700
3700
|
function Eu(t, e) {
|
|
3701
3701
|
let n = 0.5;
|
|
3702
|
-
const i =
|
|
3702
|
+
const i = Z(t), s = Z(e);
|
|
3703
3703
|
return s > i ? n = ce(e.min, e.max - i, t.min) : i > s && (n = ce(t.min, t.max - s, e.min)), xt(0, 1, n);
|
|
3704
3704
|
}
|
|
3705
3705
|
function Du(t, e) {
|
|
@@ -3730,7 +3730,7 @@ const ys = () => ({
|
|
|
3730
3730
|
}), Nt = () => ({
|
|
3731
3731
|
x: ys(),
|
|
3732
3732
|
y: ys()
|
|
3733
|
-
}), vs = () => ({ min: 0, max: 0 }),
|
|
3733
|
+
}), vs = () => ({ min: 0, max: 0 }), N = () => ({
|
|
3734
3734
|
x: vs(),
|
|
3735
3735
|
y: vs()
|
|
3736
3736
|
});
|
|
@@ -3763,7 +3763,7 @@ function fn(t) {
|
|
|
3763
3763
|
function En({ scale: t, scaleX: e, scaleY: n }) {
|
|
3764
3764
|
return !fn(t) || !fn(e) || !fn(n);
|
|
3765
3765
|
}
|
|
3766
|
-
function
|
|
3766
|
+
function At(t) {
|
|
3767
3767
|
return En(t) || mo(t) || t.z || t.rotate || t.rotateX || t.rotateY || t.skewX || t.skewY;
|
|
3768
3768
|
}
|
|
3769
3769
|
function mo(t) {
|
|
@@ -3798,7 +3798,7 @@ function Ou(t, e, n, i = !1) {
|
|
|
3798
3798
|
l && l.props.style && l.props.style.display === "contents" || (i && o.options.layoutScroll && o.scroll && o !== o.root && Wt(t, {
|
|
3799
3799
|
x: -o.scroll.offset.x,
|
|
3800
3800
|
y: -o.scroll.offset.y
|
|
3801
|
-
}), r && (e.x *= r.x.scale, e.y *= r.y.scale, go(t, r)), i &&
|
|
3801
|
+
}), r && (e.x *= r.x.scale, e.y *= r.y.scale, go(t, r)), i && At(o.latestValues) && Wt(t, o.latestValues));
|
|
3802
3802
|
}
|
|
3803
3803
|
e.x < Ts && e.x > bs && (e.x = 1), e.y < Ts && e.y > bs && (e.y = 1);
|
|
3804
3804
|
}
|
|
@@ -3806,7 +3806,7 @@ function Ut(t, e) {
|
|
|
3806
3806
|
t.min = t.min + e, t.max = t.max + e;
|
|
3807
3807
|
}
|
|
3808
3808
|
function ws(t, e, n, i, s = 0.5) {
|
|
3809
|
-
const o =
|
|
3809
|
+
const o = F(t.min, t.max, s);
|
|
3810
3810
|
Dn(t, e, n, o, i);
|
|
3811
3811
|
}
|
|
3812
3812
|
function Wt(t, e) {
|
|
@@ -3822,7 +3822,7 @@ function ju(t, e, n) {
|
|
|
3822
3822
|
const vo = ({ current: t }) => t ? t.ownerDocument.defaultView : null, Fu = /* @__PURE__ */ new WeakMap();
|
|
3823
3823
|
class _u {
|
|
3824
3824
|
constructor(e) {
|
|
3825
|
-
this.openGlobalLock = null, this.isDragging = !1, this.currentDirection = null, this.originPoint = { x: 0, y: 0 }, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic =
|
|
3825
|
+
this.openGlobalLock = null, this.isDragging = !1, this.currentDirection = null, this.originPoint = { x: 0, y: 0 }, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic = N(), this.visualElement = e;
|
|
3826
3826
|
}
|
|
3827
3827
|
start(e, { snapToCursor: n = !1 } = {}) {
|
|
3828
3828
|
const { presenceContext: i } = this.visualElement;
|
|
@@ -3833,24 +3833,24 @@ class _u {
|
|
|
3833
3833
|
f ? this.pauseAnimation() : this.stopAnimation(), n && this.snapToCursor($e(u, "page").point);
|
|
3834
3834
|
}, o = (u, f) => {
|
|
3835
3835
|
var d;
|
|
3836
|
-
const { drag: p, dragPropagation: g, onDragStart:
|
|
3837
|
-
if (p && !g && (this.openGlobalLock && this.openGlobalLock(), this.openGlobalLock =
|
|
3836
|
+
const { drag: p, dragPropagation: g, onDragStart: v } = this.getProps();
|
|
3837
|
+
if (p && !g && (this.openGlobalLock && this.openGlobalLock(), this.openGlobalLock = Ar(p), !this.openGlobalLock))
|
|
3838
3838
|
return;
|
|
3839
|
-
this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), nt((
|
|
3840
|
-
let y = this.getAxisMotionValue(
|
|
3839
|
+
this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), nt((P) => {
|
|
3840
|
+
let y = this.getAxisMotionValue(P).get() || 0;
|
|
3841
3841
|
if (ot.test(y)) {
|
|
3842
|
-
const { projection:
|
|
3843
|
-
if (
|
|
3844
|
-
const
|
|
3845
|
-
|
|
3842
|
+
const { projection: x } = this.visualElement;
|
|
3843
|
+
if (x && x.layout) {
|
|
3844
|
+
const w = x.layout.layoutBox[P];
|
|
3845
|
+
w && (y = Z(w) * (parseFloat(y) / 100));
|
|
3846
3846
|
}
|
|
3847
3847
|
}
|
|
3848
|
-
this.originPoint[
|
|
3849
|
-
}),
|
|
3848
|
+
this.originPoint[P] = y;
|
|
3849
|
+
}), v && k.postRender(() => v(u, f)), (d = this.removeWillChange) === null || d === void 0 || d.call(this), this.removeWillChange = An(this.visualElement, "transform");
|
|
3850
3850
|
const { animationState: T } = this.visualElement;
|
|
3851
3851
|
T && T.setActive("whileDrag", !0);
|
|
3852
3852
|
}, r = (u, f) => {
|
|
3853
|
-
const { dragPropagation: d, dragDirectionLock: p, onDirectionLock: g, onDrag:
|
|
3853
|
+
const { dragPropagation: d, dragDirectionLock: p, onDirectionLock: g, onDrag: v } = this.getProps();
|
|
3854
3854
|
if (!d && !this.openGlobalLock)
|
|
3855
3855
|
return;
|
|
3856
3856
|
const { offset: T } = f;
|
|
@@ -3858,7 +3858,7 @@ class _u {
|
|
|
3858
3858
|
this.currentDirection = Bu(T), this.currentDirection !== null && g && g(this.currentDirection);
|
|
3859
3859
|
return;
|
|
3860
3860
|
}
|
|
3861
|
-
this.updateAxis("x", f.point, T), this.updateAxis("y", f.point, T), this.visualElement.render(),
|
|
3861
|
+
this.updateAxis("x", f.point, T), this.updateAxis("y", f.point, T), this.visualElement.render(), v && v(u, f);
|
|
3862
3862
|
}, a = (u, f) => this.stop(u, f), l = () => nt((u) => {
|
|
3863
3863
|
var f;
|
|
3864
3864
|
return this.getAnimationState(u) === "paused" && ((f = this.getAxisMotionValue(u).animation) === null || f === void 0 ? void 0 : f.play());
|
|
@@ -3884,7 +3884,7 @@ class _u {
|
|
|
3884
3884
|
const { velocity: o } = n;
|
|
3885
3885
|
this.startAnimation(o);
|
|
3886
3886
|
const { onDragEnd: r } = this.getProps();
|
|
3887
|
-
r &&
|
|
3887
|
+
r && k.postRender(() => r(e, n));
|
|
3888
3888
|
}
|
|
3889
3889
|
cancel() {
|
|
3890
3890
|
this.isDragging = !1;
|
|
@@ -3899,7 +3899,7 @@ class _u {
|
|
|
3899
3899
|
return;
|
|
3900
3900
|
const o = this.getAxisMotionValue(e);
|
|
3901
3901
|
let r = this.originPoint[e] + i[e];
|
|
3902
|
-
this.constraints && this.constraints[e] && (r =
|
|
3902
|
+
this.constraints && this.constraints[e] && (r = Au(r, this.constraints[e], this.elastic[e])), o.set(r);
|
|
3903
3903
|
}
|
|
3904
3904
|
resolveConstraints() {
|
|
3905
3905
|
var e;
|
|
@@ -3913,7 +3913,7 @@ class _u {
|
|
|
3913
3913
|
if (!e || !Bt(e))
|
|
3914
3914
|
return !1;
|
|
3915
3915
|
const i = e.current;
|
|
3916
|
-
|
|
3916
|
+
dt(i !== null, "If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");
|
|
3917
3917
|
const { projection: s } = this.visualElement;
|
|
3918
3918
|
if (!s || !s.layout)
|
|
3919
3919
|
return !1;
|
|
@@ -3948,7 +3948,7 @@ class _u {
|
|
|
3948
3948
|
}
|
|
3949
3949
|
startAxisValueAnimation(e, n) {
|
|
3950
3950
|
const i = this.getAxisMotionValue(e);
|
|
3951
|
-
return i.start(li(e, i, 0, n, this.visualElement, !1,
|
|
3951
|
+
return i.start(li(e, i, 0, n, this.visualElement, !1, An(this.visualElement, e)));
|
|
3952
3952
|
}
|
|
3953
3953
|
stopAnimation() {
|
|
3954
3954
|
nt((e) => this.getAxisMotionValue(e).stop());
|
|
@@ -3981,7 +3981,7 @@ class _u {
|
|
|
3981
3981
|
const { projection: s } = this.visualElement, o = this.getAxisMotionValue(n);
|
|
3982
3982
|
if (s && s.layout) {
|
|
3983
3983
|
const { min: r, max: a } = s.layout.layoutBox[n];
|
|
3984
|
-
o.set(e[n] -
|
|
3984
|
+
o.set(e[n] - F(r, a, 0.5));
|
|
3985
3985
|
}
|
|
3986
3986
|
});
|
|
3987
3987
|
}
|
|
@@ -4010,21 +4010,21 @@ class _u {
|
|
|
4010
4010
|
if (!Se(r, e, null))
|
|
4011
4011
|
return;
|
|
4012
4012
|
const a = this.getAxisMotionValue(r), { min: l, max: c } = this.constraints[r];
|
|
4013
|
-
a.set(
|
|
4013
|
+
a.set(F(l, c, s[r]));
|
|
4014
4014
|
});
|
|
4015
4015
|
}
|
|
4016
4016
|
addListeners() {
|
|
4017
4017
|
if (!this.visualElement.current)
|
|
4018
4018
|
return;
|
|
4019
4019
|
Fu.set(this.visualElement, this);
|
|
4020
|
-
const e = this.visualElement.current, n =
|
|
4020
|
+
const e = this.visualElement.current, n = ct(e, "pointerdown", (l) => {
|
|
4021
4021
|
const { drag: c, dragListener: u = !0 } = this.getProps();
|
|
4022
4022
|
c && u && this.start(l);
|
|
4023
4023
|
}), i = () => {
|
|
4024
4024
|
const { dragConstraints: l } = this.getProps();
|
|
4025
4025
|
Bt(l) && l.current && (this.constraints = this.resolveRefConstraints());
|
|
4026
4026
|
}, { projection: s } = this.visualElement, o = s.addEventListener("measure", i);
|
|
4027
|
-
s && !s.layout && (s.root && s.root.updateScroll(), s.updateLayout()),
|
|
4027
|
+
s && !s.layout && (s.root && s.root.updateScroll(), s.updateLayout()), k.read(i);
|
|
4028
4028
|
const r = at(window, "resize", () => this.scalePositionWithinConstraints()), a = s.addEventListener("didUpdate", ({ delta: l, hasLayoutChanged: c }) => {
|
|
4029
4029
|
this.isDragging && c && (nt((u) => {
|
|
4030
4030
|
const f = this.getAxisMotionValue(u);
|
|
@@ -4057,22 +4057,22 @@ function Bu(t, e = 10) {
|
|
|
4057
4057
|
}
|
|
4058
4058
|
class Iu extends wt {
|
|
4059
4059
|
constructor(e) {
|
|
4060
|
-
super(e), this.removeGroupControls =
|
|
4060
|
+
super(e), this.removeGroupControls = H, this.removeListeners = H, this.controls = new _u(e);
|
|
4061
4061
|
}
|
|
4062
4062
|
mount() {
|
|
4063
4063
|
const { dragControls: e } = this.node.getProps();
|
|
4064
|
-
e && (this.removeGroupControls = e.subscribe(this.controls)), this.removeListeners = this.controls.addListeners() ||
|
|
4064
|
+
e && (this.removeGroupControls = e.subscribe(this.controls)), this.removeListeners = this.controls.addListeners() || H;
|
|
4065
4065
|
}
|
|
4066
4066
|
unmount() {
|
|
4067
4067
|
this.removeGroupControls(), this.removeListeners();
|
|
4068
4068
|
}
|
|
4069
4069
|
}
|
|
4070
4070
|
const Ss = (t) => (e, n) => {
|
|
4071
|
-
t &&
|
|
4071
|
+
t && k.postRender(() => t(e, n));
|
|
4072
4072
|
};
|
|
4073
4073
|
class Nu extends wt {
|
|
4074
4074
|
constructor() {
|
|
4075
|
-
super(...arguments), this.removePointerDownListener =
|
|
4075
|
+
super(...arguments), this.removePointerDownListener = H;
|
|
4076
4076
|
}
|
|
4077
4077
|
onPointerDown(e) {
|
|
4078
4078
|
this.session = new co(e, this.createPanHandlers(), {
|
|
@@ -4087,12 +4087,12 @@ class Nu extends wt {
|
|
|
4087
4087
|
onStart: Ss(n),
|
|
4088
4088
|
onMove: i,
|
|
4089
4089
|
onEnd: (o, r) => {
|
|
4090
|
-
delete this.session, s &&
|
|
4090
|
+
delete this.session, s && k.postRender(() => s(o, r));
|
|
4091
4091
|
}
|
|
4092
4092
|
};
|
|
4093
4093
|
}
|
|
4094
4094
|
mount() {
|
|
4095
|
-
this.removePointerDownListener =
|
|
4095
|
+
this.removePointerDownListener = ct(this.node.current, "pointerdown", (e) => this.onPointerDown(e));
|
|
4096
4096
|
}
|
|
4097
4097
|
update() {
|
|
4098
4098
|
this.session && this.session.updateHandlers(this.createPanHandlers());
|
|
@@ -4102,12 +4102,12 @@ class Nu extends wt {
|
|
|
4102
4102
|
}
|
|
4103
4103
|
}
|
|
4104
4104
|
function Uu() {
|
|
4105
|
-
const t =
|
|
4105
|
+
const t = G(Be);
|
|
4106
4106
|
if (t === null)
|
|
4107
4107
|
return [!0, null];
|
|
4108
4108
|
const { isPresent: e, onExitComplete: n, register: i } = t, s = On();
|
|
4109
|
-
|
|
4110
|
-
const o =
|
|
4109
|
+
lt(() => i(s), []);
|
|
4110
|
+
const o = vt(() => n && n(s), [s, n]);
|
|
4111
4111
|
return !e && n ? [!1, o] : [!0];
|
|
4112
4112
|
}
|
|
4113
4113
|
const Ve = {
|
|
@@ -4122,7 +4122,7 @@ const Ve = {
|
|
|
4122
4122
|
*/
|
|
4123
4123
|
hasEverUpdated: !1
|
|
4124
4124
|
};
|
|
4125
|
-
function
|
|
4125
|
+
function Cs(t, e) {
|
|
4126
4126
|
return e.max === e.min ? 0 : t / (e.max - e.min) * 100;
|
|
4127
4127
|
}
|
|
4128
4128
|
const Jt = {
|
|
@@ -4130,11 +4130,11 @@ const Jt = {
|
|
|
4130
4130
|
if (!e.target)
|
|
4131
4131
|
return t;
|
|
4132
4132
|
if (typeof t == "string")
|
|
4133
|
-
if (
|
|
4133
|
+
if (S.test(t))
|
|
4134
4134
|
t = parseFloat(t);
|
|
4135
4135
|
else
|
|
4136
4136
|
return t;
|
|
4137
|
-
const n =
|
|
4137
|
+
const n = Cs(t, e.target.x), i = Cs(t, e.target.y);
|
|
4138
4138
|
return `${n}% ${i}%`;
|
|
4139
4139
|
}
|
|
4140
4140
|
}, Wu = {
|
|
@@ -4144,7 +4144,7 @@ const Jt = {
|
|
|
4144
4144
|
return i;
|
|
4145
4145
|
const o = bt.createTransformer(t), r = typeof s[0] != "number" ? 1 : 0, a = n.x.scale * e.x, l = n.y.scale * e.y;
|
|
4146
4146
|
s[0 + r] /= a, s[1 + r] /= l;
|
|
4147
|
-
const c =
|
|
4147
|
+
const c = F(a, l, 0.5);
|
|
4148
4148
|
return typeof s[2 + r] == "number" && (s[2 + r] /= c), typeof s[3 + r] == "number" && (s[3 + r] /= c), o(s);
|
|
4149
4149
|
}
|
|
4150
4150
|
};
|
|
@@ -4165,7 +4165,7 @@ class $u extends ra {
|
|
|
4165
4165
|
}
|
|
4166
4166
|
getSnapshotBeforeUpdate(e) {
|
|
4167
4167
|
const { layoutDependency: n, visualElement: i, drag: s, isPresent: o } = this.props, r = i.projection;
|
|
4168
|
-
return r && (r.isPresent = o, s || e.layoutDependency !== n || n === void 0 ? r.willUpdate() : this.safeToRemove(), e.isPresent !== o && (o ? r.promote() : r.relegate() ||
|
|
4168
|
+
return r && (r.isPresent = o, s || e.layoutDependency !== n || n === void 0 ? r.willUpdate() : this.safeToRemove(), e.isPresent !== o && (o ? r.promote() : r.relegate() || k.postRender(() => {
|
|
4169
4169
|
const a = r.getStack();
|
|
4170
4170
|
(!a || !a.members.length) && this.safeToRemove();
|
|
4171
4171
|
}))), null;
|
|
@@ -4189,8 +4189,8 @@ class $u extends ra {
|
|
|
4189
4189
|
}
|
|
4190
4190
|
}
|
|
4191
4191
|
function Po(t) {
|
|
4192
|
-
const [e, n] = Uu(), i =
|
|
4193
|
-
return
|
|
4192
|
+
const [e, n] = Uu(), i = G(Un);
|
|
4193
|
+
return j.jsx($u, { ...t, layoutGroup: i, switchLayoutGroup: G(ar), isPresent: e, safeToRemove: n });
|
|
4194
4194
|
}
|
|
4195
4195
|
const Ku = {
|
|
4196
4196
|
borderRadius: {
|
|
@@ -4207,27 +4207,27 @@ const Ku = {
|
|
|
4207
4207
|
borderBottomLeftRadius: Jt,
|
|
4208
4208
|
borderBottomRightRadius: Jt,
|
|
4209
4209
|
boxShadow: Wu
|
|
4210
|
-
}, xo = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"], Gu = xo.length,
|
|
4211
|
-
function
|
|
4212
|
-
s ? (t.opacity =
|
|
4210
|
+
}, xo = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"], Gu = xo.length, As = (t) => typeof t == "string" ? parseFloat(t) : t, Rs = (t) => typeof t == "number" || S.test(t);
|
|
4211
|
+
function Hu(t, e, n, i, s, o) {
|
|
4212
|
+
s ? (t.opacity = F(
|
|
4213
4213
|
0,
|
|
4214
4214
|
// TODO Reinstate this if only child
|
|
4215
4215
|
n.opacity !== void 0 ? n.opacity : 1,
|
|
4216
|
-
|
|
4217
|
-
), t.opacityExit =
|
|
4216
|
+
zu(i)
|
|
4217
|
+
), t.opacityExit = F(e.opacity !== void 0 ? e.opacity : 1, 0, Yu(i))) : o && (t.opacity = F(e.opacity !== void 0 ? e.opacity : 1, n.opacity !== void 0 ? n.opacity : 1, i));
|
|
4218
4218
|
for (let r = 0; r < Gu; r++) {
|
|
4219
4219
|
const a = `border${xo[r]}Radius`;
|
|
4220
4220
|
let l = Vs(e, a), c = Vs(n, a);
|
|
4221
4221
|
if (l === void 0 && c === void 0)
|
|
4222
4222
|
continue;
|
|
4223
|
-
l || (l = 0), c || (c = 0), l === 0 || c === 0 || Rs(l) === Rs(c) ? (t[a] = Math.max(
|
|
4223
|
+
l || (l = 0), c || (c = 0), l === 0 || c === 0 || Rs(l) === Rs(c) ? (t[a] = Math.max(F(As(l), As(c), i), 0), (ot.test(c) || ot.test(l)) && (t[a] += "%")) : t[a] = c;
|
|
4224
4224
|
}
|
|
4225
|
-
(e.rotate || n.rotate) && (t.rotate =
|
|
4225
|
+
(e.rotate || n.rotate) && (t.rotate = F(e.rotate || 0, n.rotate || 0, i));
|
|
4226
4226
|
}
|
|
4227
4227
|
function Vs(t, e) {
|
|
4228
4228
|
return t[e] !== void 0 ? t[e] : t.borderRadius;
|
|
4229
4229
|
}
|
|
4230
|
-
const
|
|
4230
|
+
const zu = bo(0, 0.5, Qr), Yu = bo(0.5, 0.95, H);
|
|
4231
4231
|
function bo(t, e, n) {
|
|
4232
4232
|
return (i) => i < t ? 0 : i > e ? 1 : n(ce(t, e, i));
|
|
4233
4233
|
}
|
|
@@ -4244,9 +4244,9 @@ function Ms(t, e, n, i, s) {
|
|
|
4244
4244
|
return t -= e, t = Fe(t, 1 / n, i), s !== void 0 && (t = Fe(t, 1 / s, i)), t;
|
|
4245
4245
|
}
|
|
4246
4246
|
function Xu(t, e = 0, n = 1, i = 0.5, s, o = t, r = t) {
|
|
4247
|
-
if (ot.test(e) && (e = parseFloat(e), e =
|
|
4247
|
+
if (ot.test(e) && (e = parseFloat(e), e = F(r.min, r.max, e / 100) - r.min), typeof e != "number")
|
|
4248
4248
|
return;
|
|
4249
|
-
let a =
|
|
4249
|
+
let a = F(o.min, o.max, i);
|
|
4250
4250
|
t === o && (a -= e), t.min = Ms(t.min, e, n, a, s), t.max = Ms(t.max, e, n, a, s);
|
|
4251
4251
|
}
|
|
4252
4252
|
function ks(t, e, [n, i, s], o, r) {
|
|
@@ -4275,7 +4275,7 @@ function wo(t, e) {
|
|
|
4275
4275
|
return Fs(t.x, e.x) && Fs(t.y, e.y);
|
|
4276
4276
|
}
|
|
4277
4277
|
function _s(t) {
|
|
4278
|
-
return
|
|
4278
|
+
return Z(t.x) / Z(t.y);
|
|
4279
4279
|
}
|
|
4280
4280
|
function Bs(t, e) {
|
|
4281
4281
|
return t.translate === e.translate && t.scale === e.scale && t.originPoint === e.originPoint;
|
|
@@ -4360,17 +4360,17 @@ class nf {
|
|
|
4360
4360
|
}
|
|
4361
4361
|
}
|
|
4362
4362
|
function sf(t, e) {
|
|
4363
|
-
const n =
|
|
4363
|
+
const n = Pt.now(), i = ({ timestamp: s }) => {
|
|
4364
4364
|
const o = s - n;
|
|
4365
|
-
o >= e && (
|
|
4365
|
+
o >= e && (pt(i), t(o - e));
|
|
4366
4366
|
};
|
|
4367
|
-
return
|
|
4367
|
+
return k.read(i, !0), () => pt(i);
|
|
4368
4368
|
}
|
|
4369
4369
|
function rf(t) {
|
|
4370
4370
|
return t instanceof SVGElement && t.tagName !== "svg";
|
|
4371
4371
|
}
|
|
4372
4372
|
function of(t, e, n) {
|
|
4373
|
-
const i =
|
|
4373
|
+
const i = Y(t) ? t : ue(t);
|
|
4374
4374
|
return i.start(li("", i, e, n)), i.animation;
|
|
4375
4375
|
}
|
|
4376
4376
|
const Rt = {
|
|
@@ -4390,7 +4390,7 @@ function So(t) {
|
|
|
4390
4390
|
const { visualElement: e } = t.options;
|
|
4391
4391
|
return e ? ao(e) ? !0 : t.parent && !t.parent.hasCheckedOptimisedAppear ? So(t.parent) : !1 : !1;
|
|
4392
4392
|
}
|
|
4393
|
-
function
|
|
4393
|
+
function Co({ attachResizeListener: t, defaultParent: e, measureScroll: n, checkIsScrollRoot: i, resetTransform: s }) {
|
|
4394
4394
|
return class {
|
|
4395
4395
|
constructor(r = {}, a = e == null ? void 0 : e()) {
|
|
4396
4396
|
this.id = lf++, 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 = () => {
|
|
@@ -4432,15 +4432,15 @@ function Ao({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4432
4432
|
this.target = void 0, this.relativeTarget = void 0;
|
|
4433
4433
|
return;
|
|
4434
4434
|
}
|
|
4435
|
-
const
|
|
4436
|
-
if (this.options.layoutRoot || this.resumeFrom && this.resumeFrom.instance ||
|
|
4437
|
-
this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0), this.setAnimationOrigin(f,
|
|
4438
|
-
const
|
|
4439
|
-
...Qn(
|
|
4435
|
+
const v = this.options.transition || u.getDefaultTransition() || Tf, { onLayoutAnimationStart: T, onLayoutAnimationComplete: P } = u.getProps(), y = !this.targetLayout || !wo(this.targetLayout, g) || p, x = !d && p;
|
|
4436
|
+
if (this.options.layoutRoot || this.resumeFrom && this.resumeFrom.instance || x || d && (y || !this.currentAnimation)) {
|
|
4437
|
+
this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0), this.setAnimationOrigin(f, x);
|
|
4438
|
+
const w = {
|
|
4439
|
+
...Qn(v, "layout"),
|
|
4440
4440
|
onPlay: T,
|
|
4441
|
-
onComplete:
|
|
4441
|
+
onComplete: P
|
|
4442
4442
|
};
|
|
4443
|
-
(u.shouldReduceMotion || this.options.layoutRoot) && (
|
|
4443
|
+
(u.shouldReduceMotion || this.options.layoutRoot) && (w.delay = 0, w.type = !1), this.startAnimation(w);
|
|
4444
4444
|
} else
|
|
4445
4445
|
d || Us(this), this.isLead() && this.options.onExitComplete && this.options.onExitComplete();
|
|
4446
4446
|
this.targetLayout = g;
|
|
@@ -4449,7 +4449,7 @@ function Ao({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4449
4449
|
unmount() {
|
|
4450
4450
|
this.options.layoutId && this.willUpdate(), this.root.nodes.remove(this);
|
|
4451
4451
|
const r = this.getStack();
|
|
4452
|
-
r && r.remove(this), this.parent && this.parent.children.delete(this), this.instance = void 0,
|
|
4452
|
+
r && r.remove(this), this.parent && this.parent.children.delete(this), this.instance = void 0, pt(this.updateProjection);
|
|
4453
4453
|
}
|
|
4454
4454
|
// only on the root
|
|
4455
4455
|
blockUpdate() {
|
|
@@ -4496,8 +4496,8 @@ function Ao({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4496
4496
|
return;
|
|
4497
4497
|
}
|
|
4498
4498
|
this.isUpdating || this.nodes.forEach(pf), this.isUpdating = !1, this.nodes.forEach(mf), this.nodes.forEach(cf), this.nodes.forEach(uf), this.clearAllSnapshots();
|
|
4499
|
-
const a =
|
|
4500
|
-
|
|
4499
|
+
const a = Pt.now();
|
|
4500
|
+
K.delta = xt(0, 1e3 / 60, a - K.timestamp), K.timestamp = a, K.isProcessing = !0, en.update.process(K), en.preRender.process(K), en.render.process(K), K.isProcessing = !1;
|
|
4501
4501
|
}
|
|
4502
4502
|
didUpdate() {
|
|
4503
4503
|
this.updateScheduled || (this.updateScheduled = !0, Bn.read(this.scheduleUpdate));
|
|
@@ -4506,10 +4506,10 @@ function Ao({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4506
4506
|
this.nodes.forEach(df), this.sharedNodes.forEach(Pf);
|
|
4507
4507
|
}
|
|
4508
4508
|
scheduleUpdateProjection() {
|
|
4509
|
-
this.projectionUpdateScheduled || (this.projectionUpdateScheduled = !0,
|
|
4509
|
+
this.projectionUpdateScheduled || (this.projectionUpdateScheduled = !0, k.preRender(this.updateProjection, !1, !0));
|
|
4510
4510
|
}
|
|
4511
4511
|
scheduleCheckAfterUnmount() {
|
|
4512
|
-
|
|
4512
|
+
k.postRender(() => {
|
|
4513
4513
|
this.isLayoutDirty ? this.root.didUpdate() : this.root.checkUpdateFailed();
|
|
4514
4514
|
});
|
|
4515
4515
|
}
|
|
@@ -4526,7 +4526,7 @@ function Ao({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4526
4526
|
for (let l = 0; l < this.path.length; l++)
|
|
4527
4527
|
this.path[l].updateScroll();
|
|
4528
4528
|
const r = this.layout;
|
|
4529
|
-
this.layout = this.measure(!1), this.layoutCorrected =
|
|
4529
|
+
this.layout = this.measure(!1), this.layoutCorrected = N(), this.isLayoutDirty = !1, this.projectionDelta = void 0, this.notifyListeners("measure", this.layout.layoutBox);
|
|
4530
4530
|
const { visualElement: a } = this.options;
|
|
4531
4531
|
a && a.notify("LayoutMeasure", this.layout.layoutBox, r ? r.layoutBox : void 0);
|
|
4532
4532
|
}
|
|
@@ -4547,7 +4547,7 @@ function Ao({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4547
4547
|
if (!s)
|
|
4548
4548
|
return;
|
|
4549
4549
|
const r = this.isLayoutDirty || this.shouldResetTransform || this.options.alwaysMeasureLayout, a = this.projectionDelta && !To(this.projectionDelta), l = this.getTransformTemplate(), c = l ? l(this.latestValues, "") : void 0, u = c !== this.prevTransformTemplateValue;
|
|
4550
|
-
r && (a ||
|
|
4550
|
+
r && (a || At(this.latestValues) || u) && (s(this.instance, c), this.shouldResetTransform = !1, this.scheduleRender());
|
|
4551
4551
|
}
|
|
4552
4552
|
measure(r = !0) {
|
|
4553
4553
|
const a = this.measurePageBox();
|
|
@@ -4564,7 +4564,7 @@ function Ao({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4564
4564
|
var r;
|
|
4565
4565
|
const { visualElement: a } = this.options;
|
|
4566
4566
|
if (!a)
|
|
4567
|
-
return
|
|
4567
|
+
return N();
|
|
4568
4568
|
const l = a.measureViewportBox();
|
|
4569
4569
|
if (!(((r = this.scroll) === null || r === void 0 ? void 0 : r.wasRoot) || this.path.some(Sf))) {
|
|
4570
4570
|
const { scroll: u } = this.root;
|
|
@@ -4574,7 +4574,7 @@ function Ao({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4574
4574
|
}
|
|
4575
4575
|
removeElementScroll(r) {
|
|
4576
4576
|
var a;
|
|
4577
|
-
const l =
|
|
4577
|
+
const l = N();
|
|
4578
4578
|
if (et(l, r), !((a = this.scroll) === null || a === void 0) && a.wasRoot)
|
|
4579
4579
|
return l;
|
|
4580
4580
|
for (let c = 0; c < this.path.length; c++) {
|
|
@@ -4584,29 +4584,29 @@ function Ao({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4584
4584
|
return l;
|
|
4585
4585
|
}
|
|
4586
4586
|
applyTransform(r, a = !1) {
|
|
4587
|
-
const l =
|
|
4587
|
+
const l = N();
|
|
4588
4588
|
et(l, r);
|
|
4589
4589
|
for (let c = 0; c < this.path.length; c++) {
|
|
4590
4590
|
const u = this.path[c];
|
|
4591
4591
|
!a && u.options.layoutScroll && u.scroll && u !== u.root && Wt(l, {
|
|
4592
4592
|
x: -u.scroll.offset.x,
|
|
4593
4593
|
y: -u.scroll.offset.y
|
|
4594
|
-
}),
|
|
4594
|
+
}), At(u.latestValues) && Wt(l, u.latestValues);
|
|
4595
4595
|
}
|
|
4596
|
-
return
|
|
4596
|
+
return At(this.latestValues) && Wt(l, this.latestValues), l;
|
|
4597
4597
|
}
|
|
4598
4598
|
removeTransform(r) {
|
|
4599
|
-
const a =
|
|
4599
|
+
const a = N();
|
|
4600
4600
|
et(a, r);
|
|
4601
4601
|
for (let l = 0; l < this.path.length; l++) {
|
|
4602
4602
|
const c = this.path[l];
|
|
4603
|
-
if (!c.instance || !
|
|
4603
|
+
if (!c.instance || !At(c.latestValues))
|
|
4604
4604
|
continue;
|
|
4605
4605
|
En(c.latestValues) && c.updateSnapshot();
|
|
4606
|
-
const u =
|
|
4606
|
+
const u = N(), f = c.measurePageBox();
|
|
4607
4607
|
et(u, f), Ls(a, c.latestValues, c.snapshot ? c.snapshot.layoutBox : void 0, u);
|
|
4608
4608
|
}
|
|
4609
|
-
return
|
|
4609
|
+
return At(this.latestValues) && Ls(a, this.latestValues), a;
|
|
4610
4610
|
}
|
|
4611
4611
|
setTargetDelta(r) {
|
|
4612
4612
|
this.targetDelta = r, this.root.scheduleUpdateProjection(), this.isProjectionDirty = !0;
|
|
@@ -4622,7 +4622,7 @@ function Ao({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4622
4622
|
this.scroll = void 0, this.layout = void 0, this.snapshot = void 0, this.prevTransformTemplateValue = void 0, this.targetDelta = void 0, this.target = void 0, this.isLayoutDirty = !1;
|
|
4623
4623
|
}
|
|
4624
4624
|
forceRelativeParentToResolveTarget() {
|
|
4625
|
-
this.relativeParent && this.relativeParent.resolvedRelativeTargetAt !==
|
|
4625
|
+
this.relativeParent && this.relativeParent.resolvedRelativeTargetAt !== K.timestamp && this.relativeParent.resolveTargetDelta(!0);
|
|
4626
4626
|
}
|
|
4627
4627
|
resolveTargetDelta(r = !1) {
|
|
4628
4628
|
var a;
|
|
@@ -4633,15 +4633,15 @@ function Ao({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4633
4633
|
return;
|
|
4634
4634
|
const { layout: f, layoutId: d } = this.options;
|
|
4635
4635
|
if (!(!this.layout || !(f || d))) {
|
|
4636
|
-
if (this.resolvedRelativeTargetAt =
|
|
4636
|
+
if (this.resolvedRelativeTargetAt = K.timestamp, !this.targetDelta && !this.relativeTarget) {
|
|
4637
4637
|
const p = this.getClosestProjectingParent();
|
|
4638
|
-
p && p.layout && this.animationProgress !== 1 ? (this.relativeParent = p, this.forceRelativeParentToResolveTarget(), this.relativeTarget =
|
|
4638
|
+
p && p.layout && this.animationProgress !== 1 ? (this.relativeParent = p, this.forceRelativeParentToResolveTarget(), this.relativeTarget = N(), this.relativeTargetOrigin = N(), se(this.relativeTargetOrigin, this.layout.layoutBox, p.layout.layoutBox), et(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
|
|
4639
4639
|
}
|
|
4640
4640
|
if (!(!this.relativeTarget && !this.targetDelta)) {
|
|
4641
|
-
if (this.target || (this.target =
|
|
4641
|
+
if (this.target || (this.target = N(), this.targetWithTransforms = N()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), Cu(this.target, this.relativeTarget, this.relativeParent.target)) : this.targetDelta ? (this.resumingFrom ? this.target = this.applyTransform(this.layout.layoutBox) : et(this.target, this.layout.layoutBox), go(this.target, this.targetDelta)) : et(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget) {
|
|
4642
4642
|
this.attemptToResolveRelativeTarget = !1;
|
|
4643
4643
|
const p = this.getClosestProjectingParent();
|
|
4644
|
-
p && !!p.resumingFrom == !!this.resumingFrom && !p.options.layoutScroll && p.target && this.animationProgress !== 1 ? (this.relativeParent = p, this.forceRelativeParentToResolveTarget(), this.relativeTarget =
|
|
4644
|
+
p && !!p.resumingFrom == !!this.resumingFrom && !p.options.layoutScroll && p.target && this.animationProgress !== 1 ? (this.relativeParent = p, this.forceRelativeParentToResolveTarget(), this.relativeTarget = N(), this.relativeTargetOrigin = N(), se(this.relativeTargetOrigin, this.target, p.target), et(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
|
|
4645
4645
|
}
|
|
4646
4646
|
te && Rt.resolvedTargetDeltas++;
|
|
4647
4647
|
}
|
|
@@ -4658,14 +4658,14 @@ function Ao({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4658
4658
|
var r;
|
|
4659
4659
|
const a = this.getLead(), l = !!this.resumingFrom || this !== a;
|
|
4660
4660
|
let c = !0;
|
|
4661
|
-
if ((this.isProjectionDirty || !((r = this.parent) === null || r === void 0) && r.isProjectionDirty) && (c = !1), l && (this.isSharedProjectionDirty || this.isTransformDirty) && (c = !1), this.resolvedRelativeTargetAt ===
|
|
4661
|
+
if ((this.isProjectionDirty || !((r = this.parent) === null || r === void 0) && r.isProjectionDirty) && (c = !1), l && (this.isSharedProjectionDirty || this.isTransformDirty) && (c = !1), this.resolvedRelativeTargetAt === K.timestamp && (c = !1), c)
|
|
4662
4662
|
return;
|
|
4663
4663
|
const { layout: u, layoutId: f } = this.options;
|
|
4664
4664
|
if (this.isTreeAnimating = !!(this.parent && this.parent.isTreeAnimating || this.currentAnimation || this.pendingAnimation), this.isTreeAnimating || (this.targetDelta = this.relativeTarget = void 0), !this.layout || !(u || f))
|
|
4665
4665
|
return;
|
|
4666
4666
|
et(this.layoutCorrected, this.layout.layoutBox);
|
|
4667
4667
|
const d = this.treeScale.x, p = this.treeScale.y;
|
|
4668
|
-
Ou(this.layoutCorrected, this.treeScale, this.path, l), a.layout && !a.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (a.target = a.layout.layoutBox, a.targetWithTransforms =
|
|
4668
|
+
Ou(this.layoutCorrected, this.treeScale, this.path, l), a.layout && !a.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (a.target = a.layout.layoutBox, a.targetWithTransforms = N());
|
|
4669
4669
|
const { target: g } = a;
|
|
4670
4670
|
if (!g) {
|
|
4671
4671
|
this.prevProjectionDelta && (this.createProjectionDeltas(), this.scheduleRender());
|
|
@@ -4693,16 +4693,16 @@ function Ao({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4693
4693
|
setAnimationOrigin(r, a = !1) {
|
|
4694
4694
|
const l = this.snapshot, c = l ? l.latestValues : {}, u = { ...this.latestValues }, f = Nt();
|
|
4695
4695
|
(!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !a;
|
|
4696
|
-
const d =
|
|
4696
|
+
const d = N(), p = l ? l.source : void 0, g = this.layout ? this.layout.source : void 0, v = p !== g, T = this.getStack(), P = !T || T.members.length <= 1, y = !!(v && !P && this.options.crossfade === !0 && !this.path.some(bf));
|
|
4697
4697
|
this.animationProgress = 0;
|
|
4698
|
-
let
|
|
4699
|
-
this.mixTargetDelta = (
|
|
4700
|
-
const
|
|
4701
|
-
Ws(f.x, r.x,
|
|
4698
|
+
let x;
|
|
4699
|
+
this.mixTargetDelta = (w) => {
|
|
4700
|
+
const A = w / 1e3;
|
|
4701
|
+
Ws(f.x, r.x, A), Ws(f.y, r.y, A), this.setTargetDelta(f), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (se(d, this.layout.layoutBox, this.relativeParent.layout.layoutBox), xf(this.relativeTarget, this.relativeTargetOrigin, d, A), x && Ju(this.relativeTarget, x) && (this.isProjectionDirty = !1), x || (x = N()), et(x, this.relativeTarget)), v && (this.animationValues = u, Hu(u, c, this.latestValues, A, y, P)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = A;
|
|
4702
4702
|
}, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
|
|
4703
4703
|
}
|
|
4704
4704
|
startAnimation(r) {
|
|
4705
|
-
this.notifyListeners("animationStart"), this.currentAnimation && this.currentAnimation.stop(), this.resumingFrom && this.resumingFrom.currentAnimation && this.resumingFrom.currentAnimation.stop(), this.pendingAnimation && (
|
|
4705
|
+
this.notifyListeners("animationStart"), this.currentAnimation && this.currentAnimation.stop(), this.resumingFrom && this.resumingFrom.currentAnimation && this.resumingFrom.currentAnimation.stop(), this.pendingAnimation && (pt(this.pendingAnimation), this.pendingAnimation = void 0), this.pendingAnimation = k.update(() => {
|
|
4706
4706
|
Ve.hasAnimatedSinceResize = !0, this.currentAnimation = of(0, Is, {
|
|
4707
4707
|
...r,
|
|
4708
4708
|
onUpdate: (a) => {
|
|
@@ -4726,11 +4726,11 @@ function Ao({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4726
4726
|
const r = this.getLead();
|
|
4727
4727
|
let { targetWithTransforms: a, target: l, layout: c, latestValues: u } = r;
|
|
4728
4728
|
if (!(!a || !l || !c)) {
|
|
4729
|
-
if (this !== r && this.layout && c &&
|
|
4730
|
-
l = this.target ||
|
|
4731
|
-
const f =
|
|
4729
|
+
if (this !== r && this.layout && c && Ao(this.options.animationType, this.layout.layoutBox, c.layoutBox)) {
|
|
4730
|
+
l = this.target || N();
|
|
4731
|
+
const f = Z(this.layout.layoutBox.x);
|
|
4732
4732
|
l.x.min = r.target.x.min, l.x.max = l.x.min + f;
|
|
4733
|
-
const d =
|
|
4733
|
+
const d = Z(this.layout.layoutBox.y);
|
|
4734
4734
|
l.y.min = r.target.y.min, l.y.max = l.y.min + d;
|
|
4735
4735
|
}
|
|
4736
4736
|
et(a, l), Wt(a, u), ie(this.projectionDeltaWithTransform, this.layoutCorrected, a, u);
|
|
@@ -4798,28 +4798,28 @@ function Ao({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4798
4798
|
visibility: ""
|
|
4799
4799
|
}, u = this.getTransformTemplate();
|
|
4800
4800
|
if (this.needsReset)
|
|
4801
|
-
return this.needsReset = !1, c.opacity = "", c.pointerEvents =
|
|
4801
|
+
return this.needsReset = !1, c.opacity = "", c.pointerEvents = Ae(r == null ? void 0 : r.pointerEvents) || "", c.transform = u ? u(this.latestValues, "") : "none", c;
|
|
4802
4802
|
const f = this.getLead();
|
|
4803
4803
|
if (!this.projectionDelta || !this.layout || !f.target) {
|
|
4804
|
-
const
|
|
4805
|
-
return this.options.layoutId && (
|
|
4804
|
+
const v = {};
|
|
4805
|
+
return this.options.layoutId && (v.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, v.pointerEvents = Ae(r == null ? void 0 : r.pointerEvents) || ""), this.hasProjected && !At(this.latestValues) && (v.transform = u ? u({}, "") : "none", this.hasProjected = !1), v;
|
|
4806
4806
|
}
|
|
4807
4807
|
const d = f.animationValues || f.latestValues;
|
|
4808
4808
|
this.applyTransformsToTarget(), c.transform = tf(this.projectionDeltaWithTransform, this.treeScale, d), u && (c.transform = u(d, c.transform));
|
|
4809
4809
|
const { x: p, y: g } = this.projectionDelta;
|
|
4810
4810
|
c.transformOrigin = `${p.origin * 100}% ${g.origin * 100}% 0`, f.animationValues ? c.opacity = f === 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 : c.opacity = f === this ? d.opacity !== void 0 ? d.opacity : "" : d.opacityExit !== void 0 ? d.opacityExit : 0;
|
|
4811
|
-
for (const
|
|
4812
|
-
if (d[
|
|
4811
|
+
for (const v in Me) {
|
|
4812
|
+
if (d[v] === void 0)
|
|
4813
4813
|
continue;
|
|
4814
|
-
const { correct: T, applyTo:
|
|
4815
|
-
if (
|
|
4816
|
-
const
|
|
4817
|
-
for (let
|
|
4818
|
-
c[
|
|
4814
|
+
const { correct: T, applyTo: P } = Me[v], y = c.transform === "none" ? d[v] : T(d[v], f);
|
|
4815
|
+
if (P) {
|
|
4816
|
+
const x = P.length;
|
|
4817
|
+
for (let w = 0; w < x; w++)
|
|
4818
|
+
c[P[w]] = y;
|
|
4819
4819
|
} else
|
|
4820
|
-
c[
|
|
4820
|
+
c[v] = y;
|
|
4821
4821
|
}
|
|
4822
|
-
return this.options.layoutId && (c.pointerEvents = f === this ?
|
|
4822
|
+
return this.options.layoutId && (c.pointerEvents = f === this ? Ae(r == null ? void 0 : r.pointerEvents) || "" : "none"), c;
|
|
4823
4823
|
}
|
|
4824
4824
|
clearSnapshot() {
|
|
4825
4825
|
this.resumeFrom = this.snapshot = void 0;
|
|
@@ -4842,10 +4842,10 @@ function uf(t) {
|
|
|
4842
4842
|
if (t.isLead() && t.layout && n && t.hasListeners("didUpdate")) {
|
|
4843
4843
|
const { layoutBox: i, measuredBox: s } = t.layout, { animationType: o } = t.options, r = n.source !== t.layout.source;
|
|
4844
4844
|
o === "size" ? nt((f) => {
|
|
4845
|
-
const d = r ? n.measuredBox[f] : n.layoutBox[f], p =
|
|
4845
|
+
const d = r ? n.measuredBox[f] : n.layoutBox[f], p = Z(d);
|
|
4846
4846
|
d.min = i[f].min, d.max = d.min + p;
|
|
4847
|
-
}) :
|
|
4848
|
-
const d = r ? n.measuredBox[f] : n.layoutBox[f], p =
|
|
4847
|
+
}) : Ao(o, n.layoutBox, i) && nt((f) => {
|
|
4848
|
+
const d = r ? n.measuredBox[f] : n.layoutBox[f], p = Z(i[f]);
|
|
4849
4849
|
d.max = d.min + p, t.relativeTarget && !t.currentAnimation && (t.isProjectionDirty = !0, t.relativeTarget[f].max = t.relativeTarget[f].min + p);
|
|
4850
4850
|
});
|
|
4851
4851
|
const a = Nt();
|
|
@@ -4859,10 +4859,10 @@ function uf(t) {
|
|
|
4859
4859
|
if (f && !f.resumeFrom) {
|
|
4860
4860
|
const { snapshot: d, layout: p } = f;
|
|
4861
4861
|
if (d && p) {
|
|
4862
|
-
const g =
|
|
4862
|
+
const g = N();
|
|
4863
4863
|
se(g, n.layoutBox, d.layoutBox);
|
|
4864
|
-
const
|
|
4865
|
-
se(
|
|
4864
|
+
const v = N();
|
|
4865
|
+
se(v, i, p.layoutBox), wo(g, v) || (u = !0), f.options.layoutRoot && (t.relativeTarget = v, t.relativeTargetOrigin = g, t.relativeParent = f);
|
|
4866
4866
|
}
|
|
4867
4867
|
}
|
|
4868
4868
|
}
|
|
@@ -4915,10 +4915,10 @@ function Pf(t) {
|
|
|
4915
4915
|
t.removeLeadSnapshot();
|
|
4916
4916
|
}
|
|
4917
4917
|
function Ws(t, e, n) {
|
|
4918
|
-
t.translate =
|
|
4918
|
+
t.translate = F(e.translate, 0, n), t.scale = F(e.scale, 1, n), t.origin = e.origin, t.originPoint = e.originPoint;
|
|
4919
4919
|
}
|
|
4920
4920
|
function $s(t, e, n, i) {
|
|
4921
|
-
t.min =
|
|
4921
|
+
t.min = F(e.min, n.min, i), t.max = F(e.max, n.max, i);
|
|
4922
4922
|
}
|
|
4923
4923
|
function xf(t, e, n, i) {
|
|
4924
4924
|
$s(t.x, e.x, n.x, i), $s(t.y, e.y, n.y, i);
|
|
@@ -4929,21 +4929,21 @@ function bf(t) {
|
|
|
4929
4929
|
const Tf = {
|
|
4930
4930
|
duration: 0.45,
|
|
4931
4931
|
ease: [0.4, 0, 0.1, 1]
|
|
4932
|
-
}, Ks = (t) => typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().includes(t), Gs = Ks("applewebkit/") && !Ks("chrome/") ? Math.round :
|
|
4933
|
-
function
|
|
4932
|
+
}, Ks = (t) => typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().includes(t), Gs = Ks("applewebkit/") && !Ks("chrome/") ? Math.round : H;
|
|
4933
|
+
function Hs(t) {
|
|
4934
4934
|
t.min = Gs(t.min), t.max = Gs(t.max);
|
|
4935
4935
|
}
|
|
4936
4936
|
function wf(t) {
|
|
4937
|
-
|
|
4937
|
+
Hs(t.x), Hs(t.y);
|
|
4938
4938
|
}
|
|
4939
|
-
function
|
|
4939
|
+
function Ao(t, e, n) {
|
|
4940
4940
|
return t === "position" || t === "preserve-aspect" && !Su(_s(e), _s(n), 0.2);
|
|
4941
4941
|
}
|
|
4942
4942
|
function Sf(t) {
|
|
4943
4943
|
var e;
|
|
4944
4944
|
return t !== t.root && ((e = t.scroll) === null || e === void 0 ? void 0 : e.wasRoot);
|
|
4945
4945
|
}
|
|
4946
|
-
const
|
|
4946
|
+
const Cf = Co({
|
|
4947
4947
|
attachResizeListener: (t, e) => at(t, "resize", e),
|
|
4948
4948
|
measureScroll: () => ({
|
|
4949
4949
|
x: document.documentElement.scrollLeft || document.body.scrollLeft,
|
|
@@ -4952,14 +4952,14 @@ const Af = Ao({
|
|
|
4952
4952
|
checkIsScrollRoot: () => !0
|
|
4953
4953
|
}), pn = {
|
|
4954
4954
|
current: void 0
|
|
4955
|
-
}, Ro =
|
|
4955
|
+
}, Ro = Co({
|
|
4956
4956
|
measureScroll: (t) => ({
|
|
4957
4957
|
x: t.scrollLeft,
|
|
4958
4958
|
y: t.scrollTop
|
|
4959
4959
|
}),
|
|
4960
4960
|
defaultParent: () => {
|
|
4961
4961
|
if (!pn.current) {
|
|
4962
|
-
const t = new
|
|
4962
|
+
const t = new Cf({});
|
|
4963
4963
|
t.mount(window), t.setOptions({ layoutScroll: !0 }), pn.current = t;
|
|
4964
4964
|
}
|
|
4965
4965
|
return pn.current;
|
|
@@ -4968,7 +4968,7 @@ const Af = Ao({
|
|
|
4968
4968
|
t.style.transform = e !== void 0 ? e : "none";
|
|
4969
4969
|
},
|
|
4970
4970
|
checkIsScrollRoot: (t) => window.getComputedStyle(t).position === "fixed"
|
|
4971
|
-
}),
|
|
4971
|
+
}), Af = {
|
|
4972
4972
|
pan: {
|
|
4973
4973
|
Feature: Nu
|
|
4974
4974
|
},
|
|
@@ -4989,9 +4989,9 @@ function Rf() {
|
|
|
4989
4989
|
function Vf(t, e, n) {
|
|
4990
4990
|
for (const i in e) {
|
|
4991
4991
|
const s = e[i], o = n[i];
|
|
4992
|
-
if (
|
|
4992
|
+
if (Y(s))
|
|
4993
4993
|
t.addValue(i, s), process.env.NODE_ENV === "development" && ui(s.version === "11.3.21", `Attempting to mix Framer Motion versions ${s.version} with 11.3.21 may not work as expected.`);
|
|
4994
|
-
else if (
|
|
4994
|
+
else if (Y(o))
|
|
4995
4995
|
t.addValue(i, ue(s, { owner: t }));
|
|
4996
4996
|
else if (o !== s)
|
|
4997
4997
|
if (t.hasValue(i)) {
|
|
@@ -5006,7 +5006,7 @@ function Vf(t, e, n) {
|
|
|
5006
5006
|
e[i] === void 0 && t.removeValue(i);
|
|
5007
5007
|
return e;
|
|
5008
5008
|
}
|
|
5009
|
-
const
|
|
5009
|
+
const zs = /* @__PURE__ */ new WeakMap(), Ef = [...Or, z, bt], Df = (t) => Ef.find(Lr(t)), Ys = [
|
|
5010
5010
|
"AnimationStart",
|
|
5011
5011
|
"AnimationComplete",
|
|
5012
5012
|
"Update",
|
|
@@ -5027,24 +5027,24 @@ class kf {
|
|
|
5027
5027
|
return {};
|
|
5028
5028
|
}
|
|
5029
5029
|
constructor({ parent: e, props: n, presenceContext: i, reducedMotionConfig: s, blockInitialAnimation: o, visualState: r }, a = {}) {
|
|
5030
|
-
this.applyWillChange = !1, this.resolveKeyframes = (d, p, g,
|
|
5030
|
+
this.applyWillChange = !1, this.resolveKeyframes = (d, p, g, v) => new this.KeyframeResolver(d, p, g, v, 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 = ti, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
|
|
5031
5031
|
this.isRenderScheduled = !1, this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
|
|
5032
5032
|
}, this.isRenderScheduled = !1, this.scheduleRender = () => {
|
|
5033
|
-
this.isRenderScheduled || (this.isRenderScheduled = !0,
|
|
5033
|
+
this.isRenderScheduled || (this.isRenderScheduled = !0, k.render(this.render, !1, !0));
|
|
5034
5034
|
};
|
|
5035
5035
|
const { latestValues: l, renderState: c } = r;
|
|
5036
5036
|
this.latestValues = l, this.baseTarget = { ...l }, this.initialValues = n.initial ? { ...l } : {}, this.renderState = c, 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 = Ne(n), this.isVariantNode = cr(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(e && e.current);
|
|
5037
5037
|
const { willChange: u, ...f } = this.scrapeMotionValuesFromProps(n, {}, this);
|
|
5038
5038
|
for (const d in f) {
|
|
5039
5039
|
const p = f[d];
|
|
5040
|
-
l[d] !== void 0 &&
|
|
5040
|
+
l[d] !== void 0 && Y(p) && p.set(l[d], !1);
|
|
5041
5041
|
}
|
|
5042
5042
|
}
|
|
5043
5043
|
mount(e) {
|
|
5044
|
-
this.current = e,
|
|
5044
|
+
this.current = e, zs.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 || Rf(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : Mn.current, process.env.NODE_ENV !== "production" && ui(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);
|
|
5045
5045
|
}
|
|
5046
5046
|
unmount() {
|
|
5047
|
-
|
|
5047
|
+
zs.delete(this.current), this.projection && this.projection.unmount(), pt(this.notifyUpdate), pt(this.render), this.valueSubscriptions.forEach((e) => e()), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent && this.parent.children.delete(this);
|
|
5048
5048
|
for (const e in this.events)
|
|
5049
5049
|
this.events[e].clear();
|
|
5050
5050
|
for (const e in this.features) {
|
|
@@ -5055,7 +5055,7 @@ class kf {
|
|
|
5055
5055
|
}
|
|
5056
5056
|
bindToMotionValue(e, n) {
|
|
5057
5057
|
const i = Tt.has(e), s = n.on("change", (r) => {
|
|
5058
|
-
this.latestValues[e] = r, this.props.onUpdate &&
|
|
5058
|
+
this.latestValues[e] = r, this.props.onUpdate && k.preRender(this.notifyUpdate), i && this.projection && (this.projection.isTransformDirty = !0);
|
|
5059
5059
|
}), o = n.on("renderRequest", this.scheduleRender);
|
|
5060
5060
|
this.valueSubscriptions.set(e, () => {
|
|
5061
5061
|
s(), o(), n.owner && n.stop();
|
|
@@ -5086,7 +5086,7 @@ class kf {
|
|
|
5086
5086
|
* removed with a re-render to work.
|
|
5087
5087
|
*/
|
|
5088
5088
|
measureViewportBox() {
|
|
5089
|
-
return this.current ? this.measureInstanceViewportBox(this.current, this.props) :
|
|
5089
|
+
return this.current ? this.measureInstanceViewportBox(this.current, this.props) : N();
|
|
5090
5090
|
}
|
|
5091
5091
|
getStaticValue(e) {
|
|
5092
5092
|
return this.latestValues[e];
|
|
@@ -5186,7 +5186,7 @@ class kf {
|
|
|
5186
5186
|
readValue(e, n) {
|
|
5187
5187
|
var i;
|
|
5188
5188
|
let s = this.latestValues[e] !== void 0 || !this.current ? this.latestValues[e] : (i = this.getBaseTargetFromProps(this.props, e)) !== null && i !== void 0 ? i : this.readValueFromInstance(this.current, e, this.options);
|
|
5189
|
-
return s != null && (typeof s == "string" && (Mr(s) || Dr(s)) ? s = parseFloat(s) : !Df(s) && bt.test(n) && (s = Wr(e, n)), this.setBaseTarget(e,
|
|
5189
|
+
return s != null && (typeof s == "string" && (Mr(s) || Dr(s)) ? s = parseFloat(s) : !Df(s) && bt.test(n) && (s = Wr(e, n)), this.setBaseTarget(e, Y(s) ? s.get() : s)), Y(s) ? s.get() : s;
|
|
5190
5190
|
}
|
|
5191
5191
|
/**
|
|
5192
5192
|
* Set the base target to later animate back to. This is currently
|
|
@@ -5210,7 +5210,7 @@ class kf {
|
|
|
5210
5210
|
if (i && s !== void 0)
|
|
5211
5211
|
return s;
|
|
5212
5212
|
const o = this.getBaseTargetFromProps(this.props, e);
|
|
5213
|
-
return o !== void 0 && !
|
|
5213
|
+
return o !== void 0 && !Y(o) ? o : this.initialValues[e] !== void 0 && s === void 0 ? void 0 : this.baseTarget[e];
|
|
5214
5214
|
}
|
|
5215
5215
|
on(e, n) {
|
|
5216
5216
|
return this.events[e] || (this.events[e] = new ci()), this.events[e].add(n);
|
|
@@ -5253,7 +5253,7 @@ class Of extends Eo {
|
|
|
5253
5253
|
return yo(e, n);
|
|
5254
5254
|
}
|
|
5255
5255
|
build(e, n, i) {
|
|
5256
|
-
|
|
5256
|
+
Hn(e, n, i.transformTemplate);
|
|
5257
5257
|
}
|
|
5258
5258
|
scrapeMotionValuesFromProps(e, n, i) {
|
|
5259
5259
|
return qn(e, n, i);
|
|
@@ -5261,14 +5261,14 @@ class Of extends Eo {
|
|
|
5261
5261
|
handleChildMotionValue() {
|
|
5262
5262
|
this.childSubscription && (this.childSubscription(), delete this.childSubscription);
|
|
5263
5263
|
const { children: e } = this.props;
|
|
5264
|
-
|
|
5264
|
+
Y(e) && (this.childSubscription = e.on("change", (n) => {
|
|
5265
5265
|
this.current && (this.current.textContent = `${n}`);
|
|
5266
5266
|
}));
|
|
5267
5267
|
}
|
|
5268
5268
|
}
|
|
5269
5269
|
class jf extends Eo {
|
|
5270
5270
|
constructor() {
|
|
5271
|
-
super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox =
|
|
5271
|
+
super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = N;
|
|
5272
5272
|
}
|
|
5273
5273
|
getBaseTargetFromProps(e, n) {
|
|
5274
5274
|
return e[n];
|
|
@@ -5302,8 +5302,8 @@ const Ff = (t, e) => Wn(t) ? new jf(e) : new Of(e, {
|
|
|
5302
5302
|
}
|
|
5303
5303
|
}, Bf = {
|
|
5304
5304
|
...gu,
|
|
5305
|
-
...
|
|
5306
|
-
...
|
|
5305
|
+
...Al,
|
|
5306
|
+
...Af,
|
|
5307
5307
|
..._f
|
|
5308
5308
|
}, If = /* @__PURE__ */ ja((t, e) => dl(t, e, Bf, Ff));
|
|
5309
5309
|
class Nf extends kn.Component {
|
|
@@ -5330,7 +5330,7 @@ function Uf({ children: t, isPresent: e }) {
|
|
|
5330
5330
|
height: 0,
|
|
5331
5331
|
top: 0,
|
|
5332
5332
|
left: 0
|
|
5333
|
-
}), { nonce: o } =
|
|
5333
|
+
}), { nonce: o } = G(Fn);
|
|
5334
5334
|
return tr(() => {
|
|
5335
5335
|
const { width: r, height: a, top: l, left: c } = s.current;
|
|
5336
5336
|
if (e || !i.current || !r || !a)
|
|
@@ -5348,7 +5348,7 @@ function Uf({ children: t, isPresent: e }) {
|
|
|
5348
5348
|
`), () => {
|
|
5349
5349
|
document.head.removeChild(u);
|
|
5350
5350
|
};
|
|
5351
|
-
}, [e]),
|
|
5351
|
+
}, [e]), j.jsx(Nf, { isPresent: e, childRef: i, sizeRef: s, children: kn.cloneElement(t, { ref: i }) });
|
|
5352
5352
|
}
|
|
5353
5353
|
const Wf = ({ children: t, initial: e, isPresent: n, onExitComplete: i, custom: s, presenceAffectsLayout: o, mode: r }) => {
|
|
5354
5354
|
const a = Jn($f), l = On(), c = Dt(
|
|
@@ -5377,12 +5377,12 @@ const Wf = ({ children: t, initial: e, isPresent: n, onExitComplete: i, custom:
|
|
|
5377
5377
|
a.forEach((u, f) => a.set(f, !1));
|
|
5378
5378
|
}, [n]), kn.useEffect(() => {
|
|
5379
5379
|
!n && !a.size && i && i();
|
|
5380
|
-
}, [n]), r === "popLayout" && (t =
|
|
5380
|
+
}, [n]), r === "popLayout" && (t = j.jsx(Uf, { isPresent: n, children: t })), j.jsx(Be.Provider, { value: c, children: t });
|
|
5381
5381
|
};
|
|
5382
5382
|
function $f() {
|
|
5383
5383
|
return /* @__PURE__ */ new Map();
|
|
5384
5384
|
}
|
|
5385
|
-
const
|
|
5385
|
+
const Ce = (t) => t.key || "";
|
|
5386
5386
|
function Xs(t) {
|
|
5387
5387
|
const e = [];
|
|
5388
5388
|
return oa.forEach(t, (n) => {
|
|
@@ -5390,47 +5390,47 @@ function Xs(t) {
|
|
|
5390
5390
|
}), e;
|
|
5391
5391
|
}
|
|
5392
5392
|
const Kf = ({ children: t, exitBeforeEnter: e, custom: n, initial: i = !0, onExitComplete: s, presenceAffectsLayout: o = !0, mode: r = "sync" }) => {
|
|
5393
|
-
|
|
5394
|
-
const a = Dt(() => Xs(t), [t]), l = a.map(
|
|
5393
|
+
dt(!e, "Replace exitBeforeEnter with mode='wait'");
|
|
5394
|
+
const a = Dt(() => Xs(t), [t]), l = a.map(Ce), c = it(!0), u = it(a), f = Jn(() => /* @__PURE__ */ new Map()), [d, p] = _t(a), [g, v] = _t(a);
|
|
5395
5395
|
ir(() => {
|
|
5396
5396
|
c.current = !1, u.current = a;
|
|
5397
5397
|
for (let y = 0; y < g.length; y++) {
|
|
5398
|
-
const
|
|
5399
|
-
l.includes(
|
|
5398
|
+
const x = Ce(g[y]);
|
|
5399
|
+
l.includes(x) ? f.delete(x) : f.get(x) !== !0 && f.set(x, !1);
|
|
5400
5400
|
}
|
|
5401
5401
|
}, [g, l.length, l.join("-")]);
|
|
5402
5402
|
const T = [];
|
|
5403
5403
|
if (a !== d) {
|
|
5404
5404
|
let y = [...a];
|
|
5405
|
-
for (let
|
|
5406
|
-
const
|
|
5407
|
-
l.includes(
|
|
5405
|
+
for (let x = 0; x < g.length; x++) {
|
|
5406
|
+
const w = g[x], A = Ce(w);
|
|
5407
|
+
l.includes(A) || (y.splice(x, 0, w), T.push(w));
|
|
5408
5408
|
}
|
|
5409
|
-
r === "wait" && T.length && (y = T),
|
|
5409
|
+
r === "wait" && T.length && (y = T), v(Xs(y)), p(a);
|
|
5410
5410
|
return;
|
|
5411
5411
|
}
|
|
5412
5412
|
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.`);
|
|
5413
|
-
const { forceRender:
|
|
5414
|
-
return
|
|
5415
|
-
const
|
|
5416
|
-
if (f.has(
|
|
5417
|
-
f.set(
|
|
5413
|
+
const { forceRender: P } = G(Un);
|
|
5414
|
+
return j.jsx(j.Fragment, { children: g.map((y) => {
|
|
5415
|
+
const x = Ce(y), w = a === g || l.includes(x), A = () => {
|
|
5416
|
+
if (f.has(x))
|
|
5417
|
+
f.set(x, !0);
|
|
5418
5418
|
else
|
|
5419
5419
|
return;
|
|
5420
|
-
let
|
|
5421
|
-
f.forEach((
|
|
5422
|
-
|
|
5423
|
-
}),
|
|
5420
|
+
let L = !0;
|
|
5421
|
+
f.forEach(($) => {
|
|
5422
|
+
$ || (L = !1);
|
|
5423
|
+
}), L && (P == null || P(), v(u.current), s && s());
|
|
5424
5424
|
};
|
|
5425
|
-
return
|
|
5425
|
+
return j.jsx(Wf, { isPresent: w, initial: !c.current || i ? void 0 : !1, custom: w ? void 0 : n, presenceAffectsLayout: o, mode: r, onExitComplete: w ? void 0 : A, children: y }, x);
|
|
5426
5426
|
}) });
|
|
5427
5427
|
};
|
|
5428
5428
|
function Ee(t) {
|
|
5429
5429
|
var e = new Error(t);
|
|
5430
5430
|
return e.source = "ulid", e;
|
|
5431
5431
|
}
|
|
5432
|
-
var fi = "0123456789ABCDEFGHJKMNPQRSTVWXYZ", re = fi.length, qs = Math.pow(2, 48) - 1, Gf = 10,
|
|
5433
|
-
function
|
|
5432
|
+
var fi = "0123456789ABCDEFGHJKMNPQRSTVWXYZ", re = fi.length, qs = Math.pow(2, 48) - 1, Gf = 10, Hf = 16;
|
|
5433
|
+
function zf(t) {
|
|
5434
5434
|
var e = Math.floor(t() * re);
|
|
5435
5435
|
return e === re && (e = re - 1), fi.charAt(e);
|
|
5436
5436
|
}
|
|
@@ -5449,7 +5449,7 @@ function Yf(t, e) {
|
|
|
5449
5449
|
}
|
|
5450
5450
|
function Xf(t, e) {
|
|
5451
5451
|
for (var n = ""; t > 0; t--)
|
|
5452
|
-
n =
|
|
5452
|
+
n = zf(e) + n;
|
|
5453
5453
|
return n;
|
|
5454
5454
|
}
|
|
5455
5455
|
function qf() {
|
|
@@ -5481,21 +5481,21 @@ function qf() {
|
|
|
5481
5481
|
}
|
|
5482
5482
|
function Zf(t) {
|
|
5483
5483
|
return t || (t = qf()), function(n) {
|
|
5484
|
-
return isNaN(n) && (n = Date.now()), Yf(n, Gf) + Xf(
|
|
5484
|
+
return isNaN(n) && (n = Date.now()), Yf(n, Gf) + Xf(Hf, t);
|
|
5485
5485
|
};
|
|
5486
5486
|
}
|
|
5487
5487
|
var Jf = Zf();
|
|
5488
5488
|
const Zs = ({
|
|
5489
5489
|
onKeyDown: t
|
|
5490
|
-
}) => (
|
|
5490
|
+
}) => (lt(() => (document.addEventListener("keydown", t), () => {
|
|
5491
5491
|
document.removeEventListener("keydown", t);
|
|
5492
5492
|
}), []), null), Js = ({
|
|
5493
5493
|
onMousedown: t
|
|
5494
|
-
}) => (
|
|
5494
|
+
}) => (lt(() => (document.addEventListener("mousedown", t), () => {
|
|
5495
5495
|
document.removeEventListener("mousedown", t);
|
|
5496
5496
|
}), []), null), Qf = ({
|
|
5497
5497
|
onPickerHide: t
|
|
5498
|
-
}) => (
|
|
5498
|
+
}) => (lt(() => () => {
|
|
5499
5499
|
t();
|
|
5500
5500
|
}, []), null), th = "acrool-react-picker__root", eh = "acrool-react-picker__main-el", nh = "acrool-react-picker__picker-el", mn = {
|
|
5501
5501
|
root: th,
|
|
@@ -5529,16 +5529,16 @@ const Zs = ({
|
|
|
5529
5529
|
}, n) => {
|
|
5530
5530
|
const i = it(null), s = pa();
|
|
5531
5531
|
return Qs(() => {
|
|
5532
|
-
let o = st.bottom, r =
|
|
5532
|
+
let o = st.bottom, r = mt.left;
|
|
5533
5533
|
const a = (l) => {
|
|
5534
5534
|
var c;
|
|
5535
5535
|
if (s.isVisible && e.current && i.current) {
|
|
5536
5536
|
const u = ((c = l == null ? void 0 : l[0]) == null ? void 0 : c.contentRect) ?? i.current.getBoundingClientRect(), f = u.height, d = u.width, p = e.current.getBoundingClientRect(), g = p.height;
|
|
5537
5537
|
p.width;
|
|
5538
|
-
const
|
|
5539
|
-
o === st.bottom ? !
|
|
5540
|
-
const U =
|
|
5541
|
-
r ===
|
|
5538
|
+
const v = p.bottom, T = p.top, P = p.left, y = p.right, x = window.pageYOffset || document.documentElement.scrollTop, w = window.pageXOffset || document.documentElement.scrollLeft, A = window.innerWidth || document.documentElement.clientWidth, L = window.innerHeight || document.documentElement.clientHeight, $ = 15, R = v + f < L, _ = T - (f + $) > 0;
|
|
5539
|
+
o === st.bottom ? !R && _ && (o = st.top) : o === st.top && (R && !_ || !R && !_) && (o = st.bottom);
|
|
5540
|
+
const U = P + d < A, M = y - (d + $) > 0;
|
|
5541
|
+
r === mt.left ? !U && M && (r = mt.right) : r === mt.right && (U && !M || !U && !M) && (r = mt.left), s.setVertical(o), i.current.style.top = o === st.bottom ? `${v + x}px` : `${v + x - (f + g)}px`, i.current.style.left = r === mt.left ? `${P + w}px` : `${y + w - d}px`, i.current.style.transformOrigin = o === st.bottom ? "top" : "bottom", requestAnimationFrame(a);
|
|
5542
5542
|
}
|
|
5543
5543
|
};
|
|
5544
5544
|
if (e.current && i.current) {
|
|
@@ -5548,7 +5548,7 @@ const Zs = ({
|
|
|
5548
5548
|
l.disconnect();
|
|
5549
5549
|
};
|
|
5550
5550
|
}
|
|
5551
|
-
}, [s.isVisible, e, i]), /* @__PURE__ */
|
|
5551
|
+
}, [s.isVisible, e, i]), /* @__PURE__ */ j.jsx(j.Fragment, { children: /* @__PURE__ */ j.jsx(
|
|
5552
5552
|
If.div,
|
|
5553
5553
|
{
|
|
5554
5554
|
ref: Do(n, i),
|
|
@@ -5563,83 +5563,85 @@ const Zs = ({
|
|
|
5563
5563
|
}
|
|
5564
5564
|
) });
|
|
5565
5565
|
}, ah = De(oh);
|
|
5566
|
-
function dh(t, e) {
|
|
5567
|
-
const
|
|
5568
|
-
return De((
|
|
5569
|
-
const [
|
|
5570
|
-
|
|
5571
|
-
|
|
5572
|
-
}, [JSON.stringify(
|
|
5573
|
-
|
|
5574
|
-
}, [
|
|
5575
|
-
|
|
5576
|
-
|
|
5577
|
-
|
|
5578
|
-
|
|
5579
|
-
}, []),
|
|
5580
|
-
|
|
5581
|
-
}, []),
|
|
5582
|
-
|
|
5583
|
-
}, []),
|
|
5584
|
-
|
|
5585
|
-
|
|
5566
|
+
function dh(t, e, n) {
|
|
5567
|
+
const i = De(t);
|
|
5568
|
+
return De((o, r) => {
|
|
5569
|
+
const [a, l] = _t(!1), [c, u] = _t(!1), [f, d] = _t(st.bottom), [p, g] = _t(), v = it(null), T = it(null), P = it(null), y = it(p), x = (n == null ? void 0 : n.isEnableClickOutSiteHidden) !== !1, w = (n == null ? void 0 : n.isEnableHideSave) !== !1;
|
|
5570
|
+
lt(() => {
|
|
5571
|
+
g(o.value);
|
|
5572
|
+
}, [JSON.stringify(o.value)]), lt(() => {
|
|
5573
|
+
y.current = p;
|
|
5574
|
+
}, [p]), lt(() => {
|
|
5575
|
+
a && g(o.value);
|
|
5576
|
+
}, [a, o.value]);
|
|
5577
|
+
const A = vt((M) => {
|
|
5578
|
+
[Ft.Tab].includes(M.key) && (l(!1), T.current.focus(), u(!1));
|
|
5579
|
+
}, []), L = vt((M) => {
|
|
5580
|
+
([Ft.ArrowUp, Ft.ArrowDown, Ft.Enter].includes(M.key) || M.code === "Space") && (M.stopPropagation(), l(!0));
|
|
5581
|
+
}, []), $ = vt((M) => {
|
|
5582
|
+
!v.current && P.current && !P.current.contains(M.target) && u(!1);
|
|
5583
|
+
}, []), R = vt((M) => {
|
|
5584
|
+
v.current && !v.current.contains(M.target) && P.current && !P.current.contains(M.target) && (l(!1), u(!1));
|
|
5585
|
+
}, []), _ = vt(() => {
|
|
5586
|
+
if (typeof (o == null ? void 0 : o.onChange) > "u") {
|
|
5587
|
+
gt.warning("@acrool/react-picker", "createPicker component props onChange is undefined, is no call");
|
|
5586
5588
|
return;
|
|
5587
5589
|
}
|
|
5588
|
-
typeof
|
|
5589
|
-
}, [
|
|
5590
|
-
[Ft.Escape].includes(
|
|
5591
|
-
}, [
|
|
5592
|
-
return /* @__PURE__ */
|
|
5590
|
+
typeof y.current < "u" && w && JSON.stringify(p) !== JSON.stringify(y.current) && o.onChange(y.current);
|
|
5591
|
+
}, [p, o.onChange, w]), U = vt((M) => {
|
|
5592
|
+
[Ft.Escape].includes(M.key) && a && (M.stopPropagation(), l(!1));
|
|
5593
|
+
}, [a]);
|
|
5594
|
+
return /* @__PURE__ */ j.jsx(
|
|
5593
5595
|
jn.Provider,
|
|
5594
5596
|
{
|
|
5595
5597
|
value: {
|
|
5596
|
-
hide: () => requestAnimationFrame(() =>
|
|
5597
|
-
show: () =>
|
|
5598
|
-
toggle: () =>
|
|
5599
|
-
isVisible:
|
|
5600
|
-
inputFocus: () =>
|
|
5601
|
-
inputBlur: () =>
|
|
5602
|
-
isInputFocus:
|
|
5603
|
-
value:
|
|
5604
|
-
onChange:
|
|
5605
|
-
vertical:
|
|
5606
|
-
setVertical:
|
|
5598
|
+
hide: () => requestAnimationFrame(() => l(!1)),
|
|
5599
|
+
show: () => l(!0),
|
|
5600
|
+
toggle: () => l((M) => !M),
|
|
5601
|
+
isVisible: a,
|
|
5602
|
+
inputFocus: () => u(!0),
|
|
5603
|
+
inputBlur: () => u(!1),
|
|
5604
|
+
isInputFocus: c,
|
|
5605
|
+
value: p,
|
|
5606
|
+
onChange: g,
|
|
5607
|
+
vertical: f,
|
|
5608
|
+
setVertical: d
|
|
5607
5609
|
},
|
|
5608
|
-
children: /* @__PURE__ */
|
|
5609
|
-
/* @__PURE__ */
|
|
5610
|
-
|
|
5610
|
+
children: /* @__PURE__ */ j.jsxs("div", { className: mn.root, onKeyDown: U, children: [
|
|
5611
|
+
/* @__PURE__ */ j.jsx("div", { ref: P, className: mn.mainEl, children: /* @__PURE__ */ j.jsx(
|
|
5612
|
+
i,
|
|
5611
5613
|
{
|
|
5612
|
-
...
|
|
5613
|
-
ref: Do(
|
|
5614
|
+
...o,
|
|
5615
|
+
ref: Do(r, T)
|
|
5614
5616
|
}
|
|
5615
5617
|
) }),
|
|
5616
|
-
/* @__PURE__ */
|
|
5618
|
+
/* @__PURE__ */ j.jsx(Kf, { children: a && /* @__PURE__ */ j.jsx(
|
|
5617
5619
|
nr,
|
|
5618
5620
|
{
|
|
5619
5621
|
id: `acrool-react-picker-${Jf().toLowerCase()}`,
|
|
5620
5622
|
className: mn.pickerEl,
|
|
5621
|
-
children: /* @__PURE__ */
|
|
5623
|
+
children: /* @__PURE__ */ j.jsx(
|
|
5622
5624
|
ah,
|
|
5623
5625
|
{
|
|
5624
|
-
ref:
|
|
5625
|
-
anchorRef:
|
|
5626
|
-
children: /* @__PURE__ */
|
|
5626
|
+
ref: v,
|
|
5627
|
+
anchorRef: P,
|
|
5628
|
+
children: /* @__PURE__ */ j.jsx(e, { ...o })
|
|
5627
5629
|
}
|
|
5628
5630
|
)
|
|
5629
5631
|
}
|
|
5630
5632
|
) }),
|
|
5631
|
-
|
|
5632
|
-
|
|
5633
|
-
|
|
5634
|
-
|
|
5635
|
-
|
|
5633
|
+
a && /* @__PURE__ */ j.jsx(Qf, { onPickerHide: _ }),
|
|
5634
|
+
x && a && /* @__PURE__ */ j.jsx(Js, { onMousedown: R }),
|
|
5635
|
+
c && /* @__PURE__ */ j.jsx(Js, { onMousedown: $ }),
|
|
5636
|
+
c && /* @__PURE__ */ j.jsx(Zs, { onKeyDown: L }),
|
|
5637
|
+
c && /* @__PURE__ */ j.jsx(Zs, { onKeyDown: A })
|
|
5636
5638
|
] })
|
|
5637
5639
|
}
|
|
5638
5640
|
);
|
|
5639
5641
|
});
|
|
5640
5642
|
}
|
|
5641
5643
|
export {
|
|
5642
|
-
|
|
5644
|
+
mt as EHorizontal,
|
|
5643
5645
|
Ft as EKeyboardKey,
|
|
5644
5646
|
st as EVertical,
|
|
5645
5647
|
uh as PickerProviderConsumer,
|