@matthiaskrijgsman/mat-ui 0.0.1 → 0.0.2
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 +0 -129
- package/dist/{Badge.d.ts → components/Badge.d.ts} +1 -1
- package/dist/{Button.d.ts → components/Button.d.ts} +1 -1
- package/dist/{ButtonIconRound.d.ts → components/ButtonIconRound.d.ts} +1 -1
- package/dist/{ButtonIconSquare.d.ts → components/ButtonIconSquare.d.ts} +1 -1
- package/dist/{InputCheck.d.ts → components/InputCheck.d.ts} +1 -2
- package/dist/{InputPassword.d.ts → components/InputPassword.d.ts} +1 -1
- package/dist/{InputSelectOption.d.ts → components/InputSelectOption.d.ts} +1 -2
- package/dist/index.d.ts +12 -10
- package/dist/{mat-ui.js → index.js} +750 -743
- package/dist/index.js.map +1 -0
- package/dist/{mat-ui.umd.cjs → index.umd.cjs} +9 -9
- package/dist/index.umd.cjs.map +1 -0
- package/dist/style.css +1 -1
- package/dist/types.d.ts +31 -0
- package/package.json +11 -12
- package/dist/ScrollArea.d.ts +0 -5
- package/dist/mat-ui.js.map +0 -1
- package/dist/mat-ui.umd.cjs.map +0 -1
- package/dist/style.d.ts +0 -2
- package/dist/style.js +0 -1
- /package/dist/{BadgeColors.d.ts → components/BadgeColors.d.ts} +0 -0
- /package/dist/{Divider.d.ts → components/Divider.d.ts} +0 -0
- /package/dist/{Input.d.ts → components/Input.d.ts} +0 -0
- /package/dist/{InputDescription.d.ts → components/InputDescription.d.ts} +0 -0
- /package/dist/{InputError.d.ts → components/InputError.d.ts} +0 -0
- /package/dist/{InputErrorIcon.d.ts → components/InputErrorIcon.d.ts} +0 -0
- /package/dist/{InputIconButton.d.ts → components/InputIconButton.d.ts} +0 -0
- /package/dist/{InputIconButtonTray.d.ts → components/InputIconButtonTray.d.ts} +0 -0
- /package/dist/{InputLabel.d.ts → components/InputLabel.d.ts} +0 -0
- /package/dist/{InputRadio.d.ts → components/InputRadio.d.ts} +0 -0
- /package/dist/{InputSelect.d.ts → components/InputSelect.d.ts} +0 -0
- /package/dist/{InputSelectNative.d.ts → components/InputSelectNative.d.ts} +0 -0
- /package/dist/{InputSelectSearchable.d.ts → components/InputSelectSearchable.d.ts} +0 -0
- /package/dist/{InputSelectSearchableAsync.d.ts → components/InputSelectSearchableAsync.d.ts} +0 -0
- /package/dist/{InputTextArea.d.ts → components/InputTextArea.d.ts} +0 -0
- /package/dist/{InputToggle.d.ts → components/InputToggle.d.ts} +0 -0
- /package/dist/{Modal.d.ts → components/Modal.d.ts} +0 -0
- /package/dist/{Panel.d.ts → components/Panel.d.ts} +0 -0
- /package/dist/{TabButtons.d.ts → components/TabButtons.d.ts} +0 -0
- /package/dist/{Test.d.ts → components/Test.d.ts} +0 -0
- /package/dist/{Tooltip.d.ts → components/Tooltip.d.ts} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as C from "react";
|
|
2
|
-
import sa, { forwardRef as or, createElement as Se, useLayoutEffect as Kn, createContext as zt, useRef as
|
|
2
|
+
import sa, { forwardRef as or, createElement as Se, useLayoutEffect as Kn, createContext as zt, useRef as bt, useEffect as Be, useId as zn, useContext as z, useInsertionEffect as ar, useMemo as kt, useCallback as lr, Children as ia, isValidElement as ra, useState as vn, Fragment as cr, Component as oa } from "react";
|
|
3
3
|
import * as aa from "react-dom";
|
|
4
4
|
var ye = { exports: {} }, Zt = {};
|
|
5
5
|
/**
|
|
@@ -73,7 +73,7 @@ function ca() {
|
|
|
73
73
|
return "Portal";
|
|
74
74
|
case g:
|
|
75
75
|
return (p.displayName || "Context") + ".Provider";
|
|
76
|
-
case
|
|
76
|
+
case b:
|
|
77
77
|
return (p._context.displayName || "Context") + ".Consumer";
|
|
78
78
|
case S:
|
|
79
79
|
var V = p.render;
|
|
@@ -237,7 +237,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
237
237
|
function f(p) {
|
|
238
238
|
typeof p == "object" && p !== null && p.$$typeof === d && p._store && (p._store.validated = 1);
|
|
239
239
|
}
|
|
240
|
-
var h = sa, d = Symbol.for("react.transitional.element"), m = Symbol.for("react.portal"), y = Symbol.for("react.fragment"), x = Symbol.for("react.strict_mode"), v = Symbol.for("react.profiler"),
|
|
240
|
+
var h = sa, d = Symbol.for("react.transitional.element"), m = Symbol.for("react.portal"), y = Symbol.for("react.fragment"), x = Symbol.for("react.strict_mode"), v = Symbol.for("react.profiler"), b = Symbol.for("react.consumer"), g = Symbol.for("react.context"), S = Symbol.for("react.forward_ref"), T = Symbol.for("react.suspense"), A = Symbol.for("react.suspense_list"), E = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), M = Symbol.for("react.activity"), k = Symbol.for("react.client.reference"), _ = h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, nt = Object.prototype.hasOwnProperty, J = Array.isArray, lt = console.createTask ? console.createTask : function() {
|
|
241
241
|
return null;
|
|
242
242
|
};
|
|
243
243
|
h = {
|
|
@@ -280,17 +280,19 @@ var Os;
|
|
|
280
280
|
function ua() {
|
|
281
281
|
return Os || (Os = 1, process.env.NODE_ENV === "production" ? ye.exports = la() : ye.exports = ca()), ye.exports;
|
|
282
282
|
}
|
|
283
|
-
var
|
|
284
|
-
const W = (...t) => t.filter(Boolean).join(" "), fa = "inline-flex flex-row items-center justify-center font-semibold ring-0 hover:ring-4 active:ring-1 rounded-xl cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-4", ha = {
|
|
285
|
-
primary: "border
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
283
|
+
var w = ua();
|
|
284
|
+
const W = (...t) => t.filter(Boolean).join(" "), fa = "inline-flex flex-row items-center button-ring justify-center font-semibold ring-0 hover:ring-4 active:ring-1 rounded-xl cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-4 button-ring", ha = {
|
|
285
|
+
primary: "border button-primary shadow-sm",
|
|
286
|
+
secondary: "border button-secondary shadow-sm",
|
|
287
|
+
tertiary: "border button-tertiary",
|
|
288
|
+
white: "border button-white shadow-sm",
|
|
289
|
+
black: "border button-black shadow-sm",
|
|
290
|
+
transparent: "border button-transparent"
|
|
289
291
|
}, da = {
|
|
290
292
|
sm: "h-10 px-4",
|
|
291
293
|
md: "h-12 px-6",
|
|
292
294
|
lg: "h-14 px-8"
|
|
293
|
-
},
|
|
295
|
+
}, ma = C.forwardRef((t, e) => {
|
|
294
296
|
const {
|
|
295
297
|
variant: n = "white",
|
|
296
298
|
size: s = "md",
|
|
@@ -298,7 +300,7 @@ const W = (...t) => t.filter(Boolean).join(" "), fa = "inline-flex flex-row item
|
|
|
298
300
|
children: o,
|
|
299
301
|
...r
|
|
300
302
|
} = t;
|
|
301
|
-
return /* @__PURE__ */
|
|
303
|
+
return /* @__PURE__ */ w.jsx(
|
|
302
304
|
"button",
|
|
303
305
|
{
|
|
304
306
|
ref: e,
|
|
@@ -312,12 +314,14 @@ const W = (...t) => t.filter(Boolean).join(" "), fa = "inline-flex flex-row item
|
|
|
312
314
|
children: o
|
|
313
315
|
}
|
|
314
316
|
);
|
|
315
|
-
}),
|
|
316
|
-
primary: "border
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
317
|
+
}), pa = "inline-flex flex-row items-center justify-center font-semibold ring-0 hover:ring-4 active:ring-1 rounded-xl cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-4 aspect-square button-ring", ga = {
|
|
318
|
+
primary: "border button-primary shadow-sm",
|
|
319
|
+
secondary: "border button-secondary shadow-sm",
|
|
320
|
+
tertiary: "border button-tertiary",
|
|
321
|
+
white: "border button-white shadow-sm",
|
|
322
|
+
black: "border button-black shadow-sm",
|
|
323
|
+
transparent: "border button-transparent"
|
|
324
|
+
}, ya = {
|
|
321
325
|
sm: "h-10 w-10",
|
|
322
326
|
md: "h-12 w-12",
|
|
323
327
|
lg: "h-14 w-14"
|
|
@@ -329,26 +333,28 @@ const W = (...t) => t.filter(Boolean).join(" "), fa = "inline-flex flex-row item
|
|
|
329
333
|
Icon: o,
|
|
330
334
|
...r
|
|
331
335
|
} = t;
|
|
332
|
-
return /* @__PURE__ */
|
|
336
|
+
return /* @__PURE__ */ w.jsx(
|
|
333
337
|
"button",
|
|
334
338
|
{
|
|
335
339
|
ref: e,
|
|
336
340
|
className: W(
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
341
|
+
pa,
|
|
342
|
+
ga[n],
|
|
343
|
+
ya[s],
|
|
340
344
|
i
|
|
341
345
|
),
|
|
342
346
|
...r,
|
|
343
|
-
children: /* @__PURE__ */
|
|
347
|
+
children: /* @__PURE__ */ w.jsx(o, { className: "h-5 w-5" })
|
|
344
348
|
}
|
|
345
349
|
);
|
|
346
|
-
}),
|
|
347
|
-
primary: "border
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
350
|
+
}), va = "inline-flex flex-row items-center justify-center font-semibold ring-0 hover:ring-4 active:ring-1 rounded-full cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-4 aspect-square button-ring", xa = {
|
|
351
|
+
primary: "border button-primary shadow-sm",
|
|
352
|
+
secondary: "border button-secondary shadow-sm",
|
|
353
|
+
tertiary: "border button-tertiary",
|
|
354
|
+
white: "border button-white shadow-sm",
|
|
355
|
+
black: "border button-black shadow-sm",
|
|
356
|
+
transparent: "border button-transparent"
|
|
357
|
+
}, wa = {
|
|
352
358
|
sm: "h-10 w-10",
|
|
353
359
|
md: "h-12 w-12",
|
|
354
360
|
lg: "h-14 w-14"
|
|
@@ -360,18 +366,18 @@ const W = (...t) => t.filter(Boolean).join(" "), fa = "inline-flex flex-row item
|
|
|
360
366
|
Icon: o,
|
|
361
367
|
...r
|
|
362
368
|
} = t;
|
|
363
|
-
return /* @__PURE__ */
|
|
369
|
+
return /* @__PURE__ */ w.jsx(
|
|
364
370
|
"button",
|
|
365
371
|
{
|
|
366
372
|
ref: e,
|
|
367
373
|
className: W(
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
374
|
+
va,
|
|
375
|
+
xa[n],
|
|
376
|
+
wa[s],
|
|
371
377
|
i
|
|
372
378
|
),
|
|
373
379
|
...r,
|
|
374
|
-
children: /* @__PURE__ */
|
|
380
|
+
children: /* @__PURE__ */ w.jsx(o, { className: "h-5 w-5" })
|
|
375
381
|
}
|
|
376
382
|
);
|
|
377
383
|
});
|
|
@@ -441,38 +447,38 @@ const _e = (t, e, n, s) => {
|
|
|
441
447
|
* This source code is licensed under the MIT license.
|
|
442
448
|
* See the LICENSE file in the root directory of this source tree.
|
|
443
449
|
*/
|
|
444
|
-
const
|
|
450
|
+
const Ta = [["path", { d: "M5 12l5 5l10 -10", key: "svg-0" }]], Sa = _e("outline", "check", "Check", Ta);
|
|
445
451
|
/**
|
|
446
452
|
* @license @tabler/icons-react v3.34.1 - MIT
|
|
447
453
|
*
|
|
448
454
|
* This source code is licensed under the MIT license.
|
|
449
455
|
* See the LICENSE file in the root directory of this source tree.
|
|
450
456
|
*/
|
|
451
|
-
const
|
|
457
|
+
const Pa = [["path", { d: "M6 9l6 6l6 -6", key: "svg-0" }]], ur = _e("outline", "chevron-down", "ChevronDown", Pa);
|
|
452
458
|
/**
|
|
453
459
|
* @license @tabler/icons-react v3.34.1 - MIT
|
|
454
460
|
*
|
|
455
461
|
* This source code is licensed under the MIT license.
|
|
456
462
|
* See the LICENSE file in the root directory of this source tree.
|
|
457
463
|
*/
|
|
458
|
-
const
|
|
464
|
+
const Ca = [["path", { d: "M18 6l-12 12", key: "svg-0" }], ["path", { d: "M6 6l12 12", key: "svg-1" }]], Aa = _e("outline", "x", "X", Ca);
|
|
459
465
|
/**
|
|
460
466
|
* @license @tabler/icons-react v3.34.1 - MIT
|
|
461
467
|
*
|
|
462
468
|
* This source code is licensed under the MIT license.
|
|
463
469
|
* See the LICENSE file in the root directory of this source tree.
|
|
464
470
|
*/
|
|
465
|
-
const
|
|
471
|
+
const Ra = [["path", { d: "M17 3.34a10 10 0 1 1 -15 8.66l.005 -.324a10 10 0 0 1 14.995 -8.336m-5 11.66a1 1 0 0 0 -1 1v.01a1 1 0 0 0 2 0v-.01a1 1 0 0 0 -1 -1m0 -7a1 1 0 0 0 -1 1v4a1 1 0 0 0 2 0v-4a1 1 0 0 0 -1 -1", key: "svg-0" }]], Ea = _e("filled", "exclamation-circle-filled", "ExclamationCircleFilled", Ra), Hn = (t) => {
|
|
466
472
|
const {
|
|
467
473
|
children: e
|
|
468
474
|
} = t;
|
|
469
|
-
return e ? /* @__PURE__ */
|
|
470
|
-
}, Yn = () => /* @__PURE__ */
|
|
475
|
+
return e ? /* @__PURE__ */ w.jsx("label", { className: "text-gray-900 font-medium mb-1", children: e }) : null;
|
|
476
|
+
}, Yn = () => /* @__PURE__ */ w.jsx("div", { className: "h-5 w-5", children: /* @__PURE__ */ w.jsx(Ea, { className: "h-5 w-5 text-red-600" }) }), Xn = (t) => {
|
|
471
477
|
const {
|
|
472
478
|
children: e,
|
|
473
479
|
className: n
|
|
474
480
|
} = t;
|
|
475
|
-
return /* @__PURE__ */
|
|
481
|
+
return /* @__PURE__ */ w.jsx("div", { className: W(
|
|
476
482
|
"absolute top-1/2 -translate-y-1/2 right-3.5 flex flex-row items-center gap-1",
|
|
477
483
|
n
|
|
478
484
|
), children: e });
|
|
@@ -480,13 +486,13 @@ const Aa = [["path", { d: "M17 3.34a10 10 0 1 1 -15 8.66l.005 -.324a10 10 0 0 1
|
|
|
480
486
|
const {
|
|
481
487
|
children: e
|
|
482
488
|
} = t;
|
|
483
|
-
return e ? /* @__PURE__ */
|
|
489
|
+
return e ? /* @__PURE__ */ w.jsx("div", { className: "text-gray-500 text-sm font-medium mt-2", children: e }) : null;
|
|
484
490
|
}, We = (t) => {
|
|
485
491
|
const {
|
|
486
492
|
children: e
|
|
487
493
|
} = t;
|
|
488
|
-
return e ? /* @__PURE__ */
|
|
489
|
-
},
|
|
494
|
+
return e ? /* @__PURE__ */ w.jsx("div", { className: "text-red-600 text-sm font-medium mt-2", children: e }) : null;
|
|
495
|
+
}, Va = (t) => {
|
|
490
496
|
const {
|
|
491
497
|
className: e,
|
|
492
498
|
label: n,
|
|
@@ -496,7 +502,7 @@ const Aa = [["path", { d: "M17 3.34a10 10 0 1 1 -15 8.66l.005 -.324a10 10 0 0 1
|
|
|
496
502
|
buttonTray: r,
|
|
497
503
|
...a
|
|
498
504
|
} = t;
|
|
499
|
-
return /* @__PURE__ */
|
|
505
|
+
return /* @__PURE__ */ w.jsxs(
|
|
500
506
|
"div",
|
|
501
507
|
{
|
|
502
508
|
className: W(
|
|
@@ -504,10 +510,10 @@ const Aa = [["path", { d: "M17 3.34a10 10 0 1 1 -15 8.66l.005 -.324a10 10 0 0 1
|
|
|
504
510
|
e
|
|
505
511
|
),
|
|
506
512
|
children: [
|
|
507
|
-
/* @__PURE__ */
|
|
508
|
-
/* @__PURE__ */
|
|
509
|
-
i && /* @__PURE__ */
|
|
510
|
-
/* @__PURE__ */
|
|
513
|
+
/* @__PURE__ */ w.jsx(Hn, { children: n }),
|
|
514
|
+
/* @__PURE__ */ w.jsxs("div", { className: "flex flex-col relative", children: [
|
|
515
|
+
i && /* @__PURE__ */ w.jsx(i, { className: "h-4 w-4 text-gray-900/70 absolute left-4 top-1/2 -translate-y-1/2" }),
|
|
516
|
+
/* @__PURE__ */ w.jsx(
|
|
511
517
|
"input",
|
|
512
518
|
{
|
|
513
519
|
className: W(
|
|
@@ -518,13 +524,13 @@ const Aa = [["path", { d: "M17 3.34a10 10 0 1 1 -15 8.66l.005 -.324a10 10 0 0 1
|
|
|
518
524
|
...a
|
|
519
525
|
}
|
|
520
526
|
),
|
|
521
|
-
/* @__PURE__ */
|
|
522
|
-
o && /* @__PURE__ */
|
|
527
|
+
/* @__PURE__ */ w.jsxs(Xn, { children: [
|
|
528
|
+
o && /* @__PURE__ */ w.jsx(Yn, {}),
|
|
523
529
|
r
|
|
524
530
|
] })
|
|
525
531
|
] }),
|
|
526
|
-
/* @__PURE__ */
|
|
527
|
-
/* @__PURE__ */
|
|
532
|
+
/* @__PURE__ */ w.jsx($e, { children: s }),
|
|
533
|
+
/* @__PURE__ */ w.jsx(We, { children: o })
|
|
528
534
|
]
|
|
529
535
|
}
|
|
530
536
|
);
|
|
@@ -536,7 +542,7 @@ const Aa = [["path", { d: "M17 3.34a10 10 0 1 1 -15 8.66l.005 -.324a10 10 0 0 1
|
|
|
536
542
|
error: i,
|
|
537
543
|
...o
|
|
538
544
|
} = t;
|
|
539
|
-
return /* @__PURE__ */
|
|
545
|
+
return /* @__PURE__ */ w.jsxs(
|
|
540
546
|
"div",
|
|
541
547
|
{
|
|
542
548
|
className: W(
|
|
@@ -544,8 +550,8 @@ const Aa = [["path", { d: "M17 3.34a10 10 0 1 1 -15 8.66l.005 -.324a10 10 0 0 1
|
|
|
544
550
|
e
|
|
545
551
|
),
|
|
546
552
|
children: [
|
|
547
|
-
/* @__PURE__ */
|
|
548
|
-
/* @__PURE__ */
|
|
553
|
+
/* @__PURE__ */ w.jsxs("div", { className: "flex flex-row gap-3", children: [
|
|
554
|
+
/* @__PURE__ */ w.jsx(
|
|
549
555
|
"input",
|
|
550
556
|
{
|
|
551
557
|
type: "checkbox",
|
|
@@ -553,24 +559,24 @@ const Aa = [["path", { d: "M17 3.34a10 10 0 1 1 -15 8.66l.005 -.324a10 10 0 0 1
|
|
|
553
559
|
...o
|
|
554
560
|
}
|
|
555
561
|
),
|
|
556
|
-
n && /* @__PURE__ */
|
|
562
|
+
n && /* @__PURE__ */ w.jsx("label", { htmlFor: t.id, className: W(
|
|
557
563
|
"text-gray-900 font-medium mb-1",
|
|
558
564
|
t.id && "cursor-pointer"
|
|
559
565
|
), children: n })
|
|
560
566
|
] }),
|
|
561
|
-
/* @__PURE__ */
|
|
562
|
-
/* @__PURE__ */
|
|
567
|
+
/* @__PURE__ */ w.jsx($e, { children: s }),
|
|
568
|
+
/* @__PURE__ */ w.jsx(We, { children: i })
|
|
563
569
|
]
|
|
564
570
|
}
|
|
565
571
|
);
|
|
566
|
-
},
|
|
572
|
+
}, Da = (t) => {
|
|
567
573
|
const {
|
|
568
574
|
children: e,
|
|
569
575
|
onClick: n,
|
|
570
576
|
selected: s,
|
|
571
577
|
disabled: i = !1
|
|
572
578
|
} = t;
|
|
573
|
-
return /* @__PURE__ */
|
|
579
|
+
return /* @__PURE__ */ w.jsxs(
|
|
574
580
|
"div",
|
|
575
581
|
{
|
|
576
582
|
onClick: () => !i && n && n(),
|
|
@@ -580,8 +586,8 @@ const Aa = [["path", { d: "M17 3.34a10 10 0 1 1 -15 8.66l.005 -.324a10 10 0 0 1
|
|
|
580
586
|
i && "text-gray-400 cursor-not-allowed hover:bg-transparent active:bg-transparent"
|
|
581
587
|
),
|
|
582
588
|
children: [
|
|
583
|
-
/* @__PURE__ */
|
|
584
|
-
s && !i && /* @__PURE__ */
|
|
589
|
+
/* @__PURE__ */ w.jsx("div", { className: "flex-1", children: e }),
|
|
590
|
+
s && !i && /* @__PURE__ */ w.jsx("div", { className: "shrink-0", children: /* @__PURE__ */ w.jsx(Sa, { className: "h-5 w-5" }) })
|
|
585
591
|
]
|
|
586
592
|
}
|
|
587
593
|
);
|
|
@@ -612,7 +618,7 @@ function dt(t) {
|
|
|
612
618
|
function Ns(t) {
|
|
613
619
|
return !Ue() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof Z(t).ShadowRoot;
|
|
614
620
|
}
|
|
615
|
-
const
|
|
621
|
+
const Ma = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
616
622
|
function he(t) {
|
|
617
623
|
const {
|
|
618
624
|
overflow: e,
|
|
@@ -620,15 +626,15 @@ function he(t) {
|
|
|
620
626
|
overflowY: s,
|
|
621
627
|
display: i
|
|
622
628
|
} = at(t);
|
|
623
|
-
return /auto|scroll|overlay|hidden|clip/.test(e + s + n) && !
|
|
629
|
+
return /auto|scroll|overlay|hidden|clip/.test(e + s + n) && !Ma.has(i);
|
|
624
630
|
}
|
|
625
|
-
const
|
|
626
|
-
function
|
|
627
|
-
return
|
|
631
|
+
const ka = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
632
|
+
function ja(t) {
|
|
633
|
+
return ka.has(Ht(t));
|
|
628
634
|
}
|
|
629
|
-
const
|
|
635
|
+
const La = [":popover-open", ":modal"];
|
|
630
636
|
function Ke(t) {
|
|
631
|
-
return
|
|
637
|
+
return La.some((e) => {
|
|
632
638
|
try {
|
|
633
639
|
return t.matches(e);
|
|
634
640
|
} catch {
|
|
@@ -636,12 +642,12 @@ function Ke(t) {
|
|
|
636
642
|
}
|
|
637
643
|
});
|
|
638
644
|
}
|
|
639
|
-
const
|
|
645
|
+
const Oa = ["transform", "translate", "scale", "rotate", "perspective"], Na = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Ia = ["paint", "layout", "strict", "content"];
|
|
640
646
|
function Gn(t) {
|
|
641
647
|
const e = qn(), n = H(t) ? at(t) : t;
|
|
642
|
-
return
|
|
648
|
+
return Oa.some((s) => n[s] ? n[s] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || Na.some((s) => (n.willChange || "").includes(s)) || Ia.some((s) => (n.contain || "").includes(s));
|
|
643
649
|
}
|
|
644
|
-
function
|
|
650
|
+
function Fa(t) {
|
|
645
651
|
let e = Tt(t);
|
|
646
652
|
for (; dt(e) && !Wt(e); ) {
|
|
647
653
|
if (Gn(e))
|
|
@@ -655,9 +661,9 @@ function Ia(t) {
|
|
|
655
661
|
function qn() {
|
|
656
662
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
657
663
|
}
|
|
658
|
-
const
|
|
664
|
+
const Ba = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
659
665
|
function Wt(t) {
|
|
660
|
-
return
|
|
666
|
+
return Ba.has(Ht(t));
|
|
661
667
|
}
|
|
662
668
|
function at(t) {
|
|
663
669
|
return Z(t).getComputedStyle(t);
|
|
@@ -709,20 +715,20 @@ function Zn(t) {
|
|
|
709
715
|
function pr(t) {
|
|
710
716
|
return t.split("-")[1];
|
|
711
717
|
}
|
|
712
|
-
function
|
|
718
|
+
function _a(t) {
|
|
713
719
|
return t === "x" ? "y" : "x";
|
|
714
720
|
}
|
|
715
|
-
function
|
|
721
|
+
function $a(t) {
|
|
716
722
|
return t === "y" ? "height" : "width";
|
|
717
723
|
}
|
|
718
|
-
const
|
|
724
|
+
const Wa = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
719
725
|
function Jn(t) {
|
|
720
|
-
return
|
|
721
|
-
}
|
|
722
|
-
function Wa(t) {
|
|
723
|
-
return Ba(Jn(t));
|
|
726
|
+
return Wa.has(Zn(t)) ? "y" : "x";
|
|
724
727
|
}
|
|
725
728
|
function Ua(t) {
|
|
729
|
+
return _a(Jn(t));
|
|
730
|
+
}
|
|
731
|
+
function Ka(t) {
|
|
726
732
|
return {
|
|
727
733
|
top: 0,
|
|
728
734
|
right: 0,
|
|
@@ -731,8 +737,8 @@ function Ua(t) {
|
|
|
731
737
|
...t
|
|
732
738
|
};
|
|
733
739
|
}
|
|
734
|
-
function
|
|
735
|
-
return typeof t != "number" ?
|
|
740
|
+
function za(t) {
|
|
741
|
+
return typeof t != "number" ? Ka(t) : {
|
|
736
742
|
top: t,
|
|
737
743
|
right: t,
|
|
738
744
|
bottom: t,
|
|
@@ -757,21 +763,21 @@ function Me(t) {
|
|
|
757
763
|
y: n
|
|
758
764
|
};
|
|
759
765
|
}
|
|
760
|
-
function
|
|
766
|
+
function Ha() {
|
|
761
767
|
const t = navigator.userAgentData;
|
|
762
768
|
return t != null && t.platform ? t.platform : navigator.platform;
|
|
763
769
|
}
|
|
764
|
-
var
|
|
765
|
-
}, ke =
|
|
766
|
-
const
|
|
770
|
+
var Ya = typeof document < "u", Xa = function() {
|
|
771
|
+
}, ke = Ya ? Kn : Xa;
|
|
772
|
+
const Ga = {
|
|
767
773
|
...C
|
|
768
|
-
},
|
|
769
|
-
function
|
|
774
|
+
}, qa = Ga.useInsertionEffect, Za = qa || ((t) => t());
|
|
775
|
+
function Ja(t) {
|
|
770
776
|
const e = C.useRef(() => {
|
|
771
777
|
if (process.env.NODE_ENV !== "production")
|
|
772
778
|
throw new Error("Cannot call an event handler while rendering.");
|
|
773
779
|
});
|
|
774
|
-
return
|
|
780
|
+
return Za(() => {
|
|
775
781
|
e.current = t;
|
|
776
782
|
}), C.useCallback(function() {
|
|
777
783
|
for (var n = arguments.length, s = new Array(n), i = 0; i < n; i++)
|
|
@@ -784,7 +790,7 @@ function Is(t, e, n) {
|
|
|
784
790
|
reference: s,
|
|
785
791
|
floating: i
|
|
786
792
|
} = t;
|
|
787
|
-
const o = Jn(e), r =
|
|
793
|
+
const o = Jn(e), r = Ua(e), a = $a(r), l = Zn(e), u = o === "y", c = s.x + s.width / 2 - i.width / 2, f = s.y + s.height / 2 - i.height / 2, h = s[a] / 2 - i[a] / 2;
|
|
788
794
|
let d;
|
|
789
795
|
switch (l) {
|
|
790
796
|
case "top":
|
|
@@ -827,7 +833,7 @@ function Is(t, e, n) {
|
|
|
827
833
|
}
|
|
828
834
|
return d;
|
|
829
835
|
}
|
|
830
|
-
const
|
|
836
|
+
const Qa = async (t, e, n) => {
|
|
831
837
|
const {
|
|
832
838
|
placement: s = "bottom",
|
|
833
839
|
strategy: i = "absolute",
|
|
@@ -847,7 +853,7 @@ const Ja = async (t, e, n) => {
|
|
|
847
853
|
name: x,
|
|
848
854
|
fn: v
|
|
849
855
|
} = a[y], {
|
|
850
|
-
x:
|
|
856
|
+
x: b,
|
|
851
857
|
y: g,
|
|
852
858
|
data: S,
|
|
853
859
|
reset: T
|
|
@@ -865,7 +871,7 @@ const Ja = async (t, e, n) => {
|
|
|
865
871
|
floating: e
|
|
866
872
|
}
|
|
867
873
|
});
|
|
868
|
-
c =
|
|
874
|
+
c = b ?? c, f = g ?? f, d = {
|
|
869
875
|
...d,
|
|
870
876
|
[x]: {
|
|
871
877
|
...d[x],
|
|
@@ -888,7 +894,7 @@ const Ja = async (t, e, n) => {
|
|
|
888
894
|
middlewareData: d
|
|
889
895
|
};
|
|
890
896
|
};
|
|
891
|
-
async function
|
|
897
|
+
async function tl(t, e) {
|
|
892
898
|
var n;
|
|
893
899
|
e === void 0 && (e = {});
|
|
894
900
|
const {
|
|
@@ -904,12 +910,12 @@ async function Qa(t, e) {
|
|
|
904
910
|
elementContext: f = "floating",
|
|
905
911
|
altBoundary: h = !1,
|
|
906
912
|
padding: d = 0
|
|
907
|
-
} = mr(e, t), m =
|
|
913
|
+
} = mr(e, t), m = za(d), x = a[h ? f === "floating" ? "reference" : "floating" : f], v = Me(await o.getClippingRect({
|
|
908
914
|
element: (n = await (o.isElement == null ? void 0 : o.isElement(x))) == null || n ? x : x.contextElement || await (o.getDocumentElement == null ? void 0 : o.getDocumentElement(a.floating)),
|
|
909
915
|
boundary: u,
|
|
910
916
|
rootBoundary: c,
|
|
911
917
|
strategy: l
|
|
912
|
-
})),
|
|
918
|
+
})), b = f === "floating" ? {
|
|
913
919
|
x: s,
|
|
914
920
|
y: i,
|
|
915
921
|
width: r.floating.width,
|
|
@@ -922,10 +928,10 @@ async function Qa(t, e) {
|
|
|
922
928
|
y: 1
|
|
923
929
|
}, T = Me(o.convertOffsetParentRelativeRectToViewportRelativeRect ? await o.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
924
930
|
elements: a,
|
|
925
|
-
rect:
|
|
931
|
+
rect: b,
|
|
926
932
|
offsetParent: g,
|
|
927
933
|
strategy: l
|
|
928
|
-
}) :
|
|
934
|
+
}) : b);
|
|
929
935
|
return {
|
|
930
936
|
top: (v.top - T.top + m.top) / S.y,
|
|
931
937
|
bottom: (T.bottom - v.bottom + m.bottom) / S.y,
|
|
@@ -933,7 +939,7 @@ async function Qa(t, e) {
|
|
|
933
939
|
right: (T.right - v.right + m.right) / S.x
|
|
934
940
|
};
|
|
935
941
|
}
|
|
936
|
-
const
|
|
942
|
+
const el = function(t) {
|
|
937
943
|
return t === void 0 && (t = {}), {
|
|
938
944
|
name: "size",
|
|
939
945
|
options: t,
|
|
@@ -948,15 +954,15 @@ const tl = function(t) {
|
|
|
948
954
|
apply: l = () => {
|
|
949
955
|
},
|
|
950
956
|
...u
|
|
951
|
-
} = mr(t, e), c = await
|
|
957
|
+
} = mr(t, e), c = await tl(e, u), f = Zn(i), h = pr(i), d = Jn(i) === "y", {
|
|
952
958
|
width: m,
|
|
953
959
|
height: y
|
|
954
960
|
} = o.floating;
|
|
955
961
|
let x, v;
|
|
956
962
|
f === "top" || f === "bottom" ? (x = f, v = h === (await (r.isRTL == null ? void 0 : r.isRTL(a.floating)) ? "start" : "end") ? "left" : "right") : (v = f, x = h === "end" ? "top" : "bottom");
|
|
957
|
-
const
|
|
963
|
+
const b = y - c.top - c.bottom, g = m - c.left - c.right, S = Ve(y - c[x], b), T = Ve(m - c[v], g), A = !e.middlewareData.shift;
|
|
958
964
|
let E = S, P = T;
|
|
959
|
-
if ((n = e.middlewareData.shift) != null && n.enabled.x && (P = g), (s = e.middlewareData.shift) != null && s.enabled.y && (E =
|
|
965
|
+
if ((n = e.middlewareData.shift) != null && n.enabled.x && (P = g), (s = e.middlewareData.shift) != null && s.enabled.y && (E = b), A && !h) {
|
|
960
966
|
const k = rt(c.left, 0), _ = rt(c.right, 0), nt = rt(c.top, 0), J = rt(c.bottom, 0);
|
|
961
967
|
d ? P = m - 2 * (k !== 0 || _ !== 0 ? k + _ : rt(c.left, c.right)) : E = y - 2 * (nt !== 0 || J !== 0 ? nt + J : rt(c.top, c.bottom));
|
|
962
968
|
}
|
|
@@ -1002,15 +1008,15 @@ function _t(t) {
|
|
|
1002
1008
|
y: a
|
|
1003
1009
|
};
|
|
1004
1010
|
}
|
|
1005
|
-
const
|
|
1011
|
+
const nl = /* @__PURE__ */ ut(0);
|
|
1006
1012
|
function vr(t) {
|
|
1007
1013
|
const e = Z(t);
|
|
1008
|
-
return !qn() || !e.visualViewport ?
|
|
1014
|
+
return !qn() || !e.visualViewport ? nl : {
|
|
1009
1015
|
x: e.visualViewport.offsetLeft,
|
|
1010
1016
|
y: e.visualViewport.offsetTop
|
|
1011
1017
|
};
|
|
1012
1018
|
}
|
|
1013
|
-
function
|
|
1019
|
+
function sl(t, e, n) {
|
|
1014
1020
|
return e === void 0 && (e = !1), !n || e && n !== Z(t) ? !1 : e;
|
|
1015
1021
|
}
|
|
1016
1022
|
function re(t, e, n, s) {
|
|
@@ -1018,13 +1024,13 @@ function re(t, e, n, s) {
|
|
|
1018
1024
|
const i = t.getBoundingClientRect(), o = yr(t);
|
|
1019
1025
|
let r = ut(1);
|
|
1020
1026
|
e && (s ? H(s) && (r = _t(s)) : r = _t(t));
|
|
1021
|
-
const a =
|
|
1027
|
+
const a = sl(o, n, s) ? vr(o) : ut(0);
|
|
1022
1028
|
let l = (i.left + a.x) / r.x, u = (i.top + a.y) / r.y, c = i.width / r.x, f = i.height / r.y;
|
|
1023
1029
|
if (o) {
|
|
1024
1030
|
const h = Z(o), d = s && H(s) ? Z(s) : s;
|
|
1025
1031
|
let m = h, y = xn(m);
|
|
1026
1032
|
for (; y && s && d !== m; ) {
|
|
1027
|
-
const x = _t(y), v = y.getBoundingClientRect(),
|
|
1033
|
+
const x = _t(y), v = y.getBoundingClientRect(), b = at(y), g = v.left + (y.clientLeft + parseFloat(b.paddingLeft)) * x.x, S = v.top + (y.clientTop + parseFloat(b.paddingTop)) * x.y;
|
|
1028
1034
|
l *= x.x, u *= x.y, c *= x.x, f *= x.y, l += g, u += S, m = Z(y), y = xn(m);
|
|
1029
1035
|
}
|
|
1030
1036
|
}
|
|
@@ -1046,7 +1052,7 @@ function xr(t, e) {
|
|
|
1046
1052
|
y: i
|
|
1047
1053
|
};
|
|
1048
1054
|
}
|
|
1049
|
-
function
|
|
1055
|
+
function il(t) {
|
|
1050
1056
|
let {
|
|
1051
1057
|
elements: e,
|
|
1052
1058
|
rect: n,
|
|
@@ -1073,10 +1079,10 @@ function sl(t) {
|
|
|
1073
1079
|
y: n.y * u.y - l.scrollTop * u.y + c.y + h.y
|
|
1074
1080
|
};
|
|
1075
1081
|
}
|
|
1076
|
-
function
|
|
1082
|
+
function rl(t) {
|
|
1077
1083
|
return Array.from(t.getClientRects());
|
|
1078
1084
|
}
|
|
1079
|
-
function
|
|
1085
|
+
function ol(t) {
|
|
1080
1086
|
const e = yt(t), n = ze(t), s = t.ownerDocument.body, i = rt(e.scrollWidth, e.clientWidth, s.scrollWidth, s.clientWidth), o = rt(e.scrollHeight, e.clientHeight, s.scrollHeight, s.clientHeight);
|
|
1081
1087
|
let r = -n.scrollLeft + He(t);
|
|
1082
1088
|
const a = -n.scrollTop;
|
|
@@ -1088,7 +1094,7 @@ function rl(t) {
|
|
|
1088
1094
|
};
|
|
1089
1095
|
}
|
|
1090
1096
|
const Fs = 25;
|
|
1091
|
-
function
|
|
1097
|
+
function al(t, e) {
|
|
1092
1098
|
const n = Z(t), s = yt(t), i = n.visualViewport;
|
|
1093
1099
|
let o = s.clientWidth, r = s.clientHeight, a = 0, l = 0;
|
|
1094
1100
|
if (i) {
|
|
@@ -1108,8 +1114,8 @@ function ol(t, e) {
|
|
|
1108
1114
|
y: l
|
|
1109
1115
|
};
|
|
1110
1116
|
}
|
|
1111
|
-
const
|
|
1112
|
-
function
|
|
1117
|
+
const ll = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
1118
|
+
function cl(t, e) {
|
|
1113
1119
|
const n = re(t, !0, e === "fixed"), s = n.top + t.clientTop, i = n.left + t.clientLeft, o = dt(t) ? _t(t) : ut(1), r = t.clientWidth * o.x, a = t.clientHeight * o.y, l = i * o.x, u = s * o.y;
|
|
1114
1120
|
return {
|
|
1115
1121
|
width: r,
|
|
@@ -1121,11 +1127,11 @@ function ll(t, e) {
|
|
|
1121
1127
|
function Bs(t, e, n) {
|
|
1122
1128
|
let s;
|
|
1123
1129
|
if (e === "viewport")
|
|
1124
|
-
s =
|
|
1130
|
+
s = al(t, n);
|
|
1125
1131
|
else if (e === "document")
|
|
1126
|
-
s =
|
|
1132
|
+
s = ol(yt(t));
|
|
1127
1133
|
else if (H(e))
|
|
1128
|
-
s =
|
|
1134
|
+
s = cl(e, n);
|
|
1129
1135
|
else {
|
|
1130
1136
|
const i = vr(t);
|
|
1131
1137
|
s = {
|
|
@@ -1137,11 +1143,11 @@ function Bs(t, e, n) {
|
|
|
1137
1143
|
}
|
|
1138
1144
|
return Me(s);
|
|
1139
1145
|
}
|
|
1140
|
-
function
|
|
1146
|
+
function wr(t, e) {
|
|
1141
1147
|
const n = Tt(t);
|
|
1142
|
-
return n === e || !H(n) || Wt(n) ? !1 : at(n).position === "fixed" ||
|
|
1148
|
+
return n === e || !H(n) || Wt(n) ? !1 : at(n).position === "fixed" || wr(n, e);
|
|
1143
1149
|
}
|
|
1144
|
-
function
|
|
1150
|
+
function ul(t, e) {
|
|
1145
1151
|
const n = e.get(t);
|
|
1146
1152
|
if (n)
|
|
1147
1153
|
return n;
|
|
@@ -1150,18 +1156,18 @@ function cl(t, e) {
|
|
|
1150
1156
|
let r = o ? Tt(t) : t;
|
|
1151
1157
|
for (; H(r) && !Wt(r); ) {
|
|
1152
1158
|
const a = at(r), l = Gn(r);
|
|
1153
|
-
!l && a.position === "fixed" && (i = null), (o ? !l && !i : !l && a.position === "static" && !!i &&
|
|
1159
|
+
!l && a.position === "fixed" && (i = null), (o ? !l && !i : !l && a.position === "static" && !!i && ll.has(i.position) || he(r) && !l && wr(t, r)) ? s = s.filter((c) => c !== r) : i = a, r = Tt(r);
|
|
1154
1160
|
}
|
|
1155
1161
|
return e.set(t, s), s;
|
|
1156
1162
|
}
|
|
1157
|
-
function
|
|
1163
|
+
function fl(t) {
|
|
1158
1164
|
let {
|
|
1159
1165
|
element: e,
|
|
1160
1166
|
boundary: n,
|
|
1161
1167
|
rootBoundary: s,
|
|
1162
1168
|
strategy: i
|
|
1163
1169
|
} = t;
|
|
1164
|
-
const r = [...n === "clippingAncestors" ? Ke(e) ? [] :
|
|
1170
|
+
const r = [...n === "clippingAncestors" ? Ke(e) ? [] : ul(e, this._c) : [].concat(n), s], a = r[0], l = r.reduce((u, c) => {
|
|
1165
1171
|
const f = Bs(e, c, i);
|
|
1166
1172
|
return u.top = rt(f.top, u.top), u.right = Ve(f.right, u.right), u.bottom = Ve(f.bottom, u.bottom), u.left = rt(f.left, u.left), u;
|
|
1167
1173
|
}, Bs(e, a, i));
|
|
@@ -1172,7 +1178,7 @@ function ul(t) {
|
|
|
1172
1178
|
y: l.top
|
|
1173
1179
|
};
|
|
1174
1180
|
}
|
|
1175
|
-
function
|
|
1181
|
+
function hl(t) {
|
|
1176
1182
|
const {
|
|
1177
1183
|
width: e,
|
|
1178
1184
|
height: n
|
|
@@ -1182,7 +1188,7 @@ function fl(t) {
|
|
|
1182
1188
|
height: n
|
|
1183
1189
|
};
|
|
1184
1190
|
}
|
|
1185
|
-
function
|
|
1191
|
+
function dl(t, e, n) {
|
|
1186
1192
|
const s = dt(e), i = yt(e), o = n === "fixed", r = re(t, !0, o, e);
|
|
1187
1193
|
let a = {
|
|
1188
1194
|
scrollLeft: 0,
|
|
@@ -1217,7 +1223,7 @@ function _s(t, e) {
|
|
|
1217
1223
|
let n = t.offsetParent;
|
|
1218
1224
|
return yt(t) === n && (n = n.ownerDocument.body), n;
|
|
1219
1225
|
}
|
|
1220
|
-
function
|
|
1226
|
+
function br(t, e) {
|
|
1221
1227
|
const n = Z(t);
|
|
1222
1228
|
if (Ke(t))
|
|
1223
1229
|
return n;
|
|
@@ -1231,14 +1237,14 @@ function wr(t, e) {
|
|
|
1231
1237
|
return n;
|
|
1232
1238
|
}
|
|
1233
1239
|
let s = _s(t, e);
|
|
1234
|
-
for (; s &&
|
|
1240
|
+
for (; s && ja(s) && tn(s); )
|
|
1235
1241
|
s = _s(s, e);
|
|
1236
|
-
return s && Wt(s) && tn(s) && !Gn(s) ? n : s ||
|
|
1242
|
+
return s && Wt(s) && tn(s) && !Gn(s) ? n : s || Fa(t) || n;
|
|
1237
1243
|
}
|
|
1238
|
-
const
|
|
1239
|
-
const e = this.getOffsetParent ||
|
|
1244
|
+
const ml = async function(t) {
|
|
1245
|
+
const e = this.getOffsetParent || br, n = this.getDimensions, s = await n(t.floating);
|
|
1240
1246
|
return {
|
|
1241
|
-
reference:
|
|
1247
|
+
reference: dl(t.reference, await e(t.floating), t.strategy),
|
|
1242
1248
|
floating: {
|
|
1243
1249
|
x: 0,
|
|
1244
1250
|
y: 0,
|
|
@@ -1247,35 +1253,35 @@ const dl = async function(t) {
|
|
|
1247
1253
|
}
|
|
1248
1254
|
};
|
|
1249
1255
|
};
|
|
1250
|
-
function
|
|
1256
|
+
function pl(t) {
|
|
1251
1257
|
return at(t).direction === "rtl";
|
|
1252
1258
|
}
|
|
1253
|
-
const
|
|
1254
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
1259
|
+
const gl = {
|
|
1260
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: il,
|
|
1255
1261
|
getDocumentElement: yt,
|
|
1256
|
-
getClippingRect:
|
|
1257
|
-
getOffsetParent:
|
|
1258
|
-
getElementRects:
|
|
1259
|
-
getClientRects:
|
|
1260
|
-
getDimensions:
|
|
1262
|
+
getClippingRect: fl,
|
|
1263
|
+
getOffsetParent: br,
|
|
1264
|
+
getElementRects: ml,
|
|
1265
|
+
getClientRects: rl,
|
|
1266
|
+
getDimensions: hl,
|
|
1261
1267
|
getScale: _t,
|
|
1262
1268
|
isElement: H,
|
|
1263
|
-
isRTL:
|
|
1264
|
-
},
|
|
1269
|
+
isRTL: pl
|
|
1270
|
+
}, yl = el, vl = (t, e, n) => {
|
|
1265
1271
|
const s = /* @__PURE__ */ new Map(), i = {
|
|
1266
|
-
platform:
|
|
1272
|
+
platform: gl,
|
|
1267
1273
|
...n
|
|
1268
1274
|
}, o = {
|
|
1269
1275
|
...i.platform,
|
|
1270
1276
|
_c: s
|
|
1271
1277
|
};
|
|
1272
|
-
return
|
|
1278
|
+
return Qa(t, e, {
|
|
1273
1279
|
...i,
|
|
1274
1280
|
platform: o
|
|
1275
1281
|
});
|
|
1276
1282
|
};
|
|
1277
|
-
var
|
|
1278
|
-
}, Pe =
|
|
1283
|
+
var xl = typeof document < "u", wl = function() {
|
|
1284
|
+
}, Pe = xl ? Kn : wl;
|
|
1279
1285
|
function je(t, e) {
|
|
1280
1286
|
if (t === e)
|
|
1281
1287
|
return !0;
|
|
@@ -1342,7 +1348,7 @@ function bl(t) {
|
|
|
1342
1348
|
isPositioned: !1
|
|
1343
1349
|
}), [h, d] = C.useState(s);
|
|
1344
1350
|
je(h, s) || d(s);
|
|
1345
|
-
const [m, y] = C.useState(null), [x, v] = C.useState(null),
|
|
1351
|
+
const [m, y] = C.useState(null), [x, v] = C.useState(null), b = C.useCallback((D) => {
|
|
1346
1352
|
D !== A.current && (A.current = D, y(D));
|
|
1347
1353
|
}, []), g = C.useCallback((D) => {
|
|
1348
1354
|
D !== E.current && (E.current = D, v(D));
|
|
@@ -1354,7 +1360,7 @@ function bl(t) {
|
|
|
1354
1360
|
strategy: n,
|
|
1355
1361
|
middleware: h
|
|
1356
1362
|
};
|
|
1357
|
-
_.current && (D.platform = _.current),
|
|
1363
|
+
_.current && (D.platform = _.current), vl(A.current, E.current, D).then((X) => {
|
|
1358
1364
|
const p = {
|
|
1359
1365
|
...X,
|
|
1360
1366
|
// The floating element's position may be recomputed while it's closed
|
|
@@ -1387,9 +1393,9 @@ function bl(t) {
|
|
|
1387
1393
|
const vt = C.useMemo(() => ({
|
|
1388
1394
|
reference: A,
|
|
1389
1395
|
floating: E,
|
|
1390
|
-
setReference:
|
|
1396
|
+
setReference: b,
|
|
1391
1397
|
setFloating: g
|
|
1392
|
-
}), [
|
|
1398
|
+
}), [b, g]), st = C.useMemo(() => ({
|
|
1393
1399
|
reference: S,
|
|
1394
1400
|
floating: T
|
|
1395
1401
|
}), [S, T]), L = C.useMemo(() => {
|
|
@@ -1421,19 +1427,19 @@ function bl(t) {
|
|
|
1421
1427
|
floatingStyles: L
|
|
1422
1428
|
}), [c, J, vt, st, L]);
|
|
1423
1429
|
}
|
|
1424
|
-
const
|
|
1425
|
-
...
|
|
1430
|
+
const Tl = (t, e) => ({
|
|
1431
|
+
...yl(t),
|
|
1426
1432
|
options: [t, e]
|
|
1427
|
-
}),
|
|
1433
|
+
}), Sl = {
|
|
1428
1434
|
...C
|
|
1429
1435
|
};
|
|
1430
|
-
let Ws = !1,
|
|
1436
|
+
let Ws = !1, Pl = 0;
|
|
1431
1437
|
const Us = () => (
|
|
1432
1438
|
// Ensure the id is unique with multiple independent versions of Floating UI
|
|
1433
1439
|
// on <React 18
|
|
1434
|
-
"floating-ui-" + Math.random().toString(36).slice(2, 6) +
|
|
1440
|
+
"floating-ui-" + Math.random().toString(36).slice(2, 6) + Pl++
|
|
1435
1441
|
);
|
|
1436
|
-
function
|
|
1442
|
+
function Cl() {
|
|
1437
1443
|
const [t, e] = C.useState(() => Ws ? Us() : void 0);
|
|
1438
1444
|
return ke(() => {
|
|
1439
1445
|
t == null && e(Us());
|
|
@@ -1441,19 +1447,19 @@ function Pl() {
|
|
|
1441
1447
|
Ws = !0;
|
|
1442
1448
|
}, []), t;
|
|
1443
1449
|
}
|
|
1444
|
-
const
|
|
1445
|
-
let
|
|
1446
|
-
process.env.NODE_ENV !== "production" && (
|
|
1447
|
-
function
|
|
1450
|
+
const Al = Sl.useId, Rl = Al || Cl;
|
|
1451
|
+
let wn;
|
|
1452
|
+
process.env.NODE_ENV !== "production" && (wn = /* @__PURE__ */ new Set());
|
|
1453
|
+
function El() {
|
|
1448
1454
|
for (var t, e = arguments.length, n = new Array(e), s = 0; s < e; s++)
|
|
1449
1455
|
n[s] = arguments[s];
|
|
1450
1456
|
const i = "Floating UI: " + n.join(" ");
|
|
1451
|
-
if (!((t =
|
|
1457
|
+
if (!((t = wn) != null && t.has(i))) {
|
|
1452
1458
|
var o;
|
|
1453
|
-
(o =
|
|
1459
|
+
(o = wn) == null || o.add(i), console.error(i);
|
|
1454
1460
|
}
|
|
1455
1461
|
}
|
|
1456
|
-
function
|
|
1462
|
+
function Vl() {
|
|
1457
1463
|
const t = /* @__PURE__ */ new Map();
|
|
1458
1464
|
return {
|
|
1459
1465
|
emit(e, n) {
|
|
@@ -1469,14 +1475,14 @@ function El() {
|
|
|
1469
1475
|
}
|
|
1470
1476
|
};
|
|
1471
1477
|
}
|
|
1472
|
-
const
|
|
1478
|
+
const Dl = /* @__PURE__ */ C.createContext(null), Ml = /* @__PURE__ */ C.createContext(null), kl = () => {
|
|
1473
1479
|
var t;
|
|
1474
|
-
return ((t = C.useContext(
|
|
1475
|
-
},
|
|
1480
|
+
return ((t = C.useContext(Dl)) == null ? void 0 : t.id) || null;
|
|
1481
|
+
}, jl = () => C.useContext(Ml);
|
|
1476
1482
|
let ve = 0;
|
|
1477
1483
|
const Ks = "--floating-ui-scrollbar-width";
|
|
1478
|
-
function
|
|
1479
|
-
const t =
|
|
1484
|
+
function Ll() {
|
|
1485
|
+
const t = Ha(), e = /iP(hone|ad|od)|iOS/.test(t) || // iPads can claim to be MacIntel
|
|
1480
1486
|
t === "MacIntel" && navigator.maxTouchPoints > 1, n = document.body.style, i = Math.round(document.documentElement.getBoundingClientRect().left) + document.documentElement.scrollLeft ? "paddingLeft" : "paddingRight", o = window.innerWidth - document.documentElement.clientWidth, r = n.left ? parseFloat(n.left) : window.scrollX, a = n.top ? parseFloat(n.top) : window.scrollY;
|
|
1481
1487
|
if (n.overflow = "hidden", n.setProperty(Ks, o + "px"), o && (n[i] = o + "px"), e) {
|
|
1482
1488
|
var l, u;
|
|
@@ -1502,17 +1508,17 @@ function jl() {
|
|
|
1502
1508
|
}
|
|
1503
1509
|
let zs = () => {
|
|
1504
1510
|
};
|
|
1505
|
-
const
|
|
1511
|
+
const Ol = /* @__PURE__ */ C.forwardRef(function(e, n) {
|
|
1506
1512
|
const {
|
|
1507
1513
|
lockScroll: s = !1,
|
|
1508
1514
|
...i
|
|
1509
1515
|
} = e;
|
|
1510
1516
|
return ke(() => {
|
|
1511
1517
|
if (s)
|
|
1512
|
-
return ve++, ve === 1 && (zs =
|
|
1518
|
+
return ve++, ve === 1 && (zs = Ll()), () => {
|
|
1513
1519
|
ve--, ve === 0 && zs();
|
|
1514
1520
|
};
|
|
1515
|
-
}, [s]), /* @__PURE__ */
|
|
1521
|
+
}, [s]), /* @__PURE__ */ w.jsx("div", {
|
|
1516
1522
|
ref: n,
|
|
1517
1523
|
...i,
|
|
1518
1524
|
style: {
|
|
@@ -1526,17 +1532,17 @@ const Ll = /* @__PURE__ */ C.forwardRef(function(e, n) {
|
|
|
1526
1532
|
}
|
|
1527
1533
|
});
|
|
1528
1534
|
});
|
|
1529
|
-
function
|
|
1535
|
+
function Nl(t) {
|
|
1530
1536
|
const {
|
|
1531
1537
|
open: e = !1,
|
|
1532
1538
|
onOpenChange: n,
|
|
1533
1539
|
elements: s
|
|
1534
|
-
} = t, i =
|
|
1540
|
+
} = t, i = Rl(), o = C.useRef({}), [r] = C.useState(() => Vl()), a = kl() != null;
|
|
1535
1541
|
if (process.env.NODE_ENV !== "production") {
|
|
1536
1542
|
const d = s.reference;
|
|
1537
|
-
d && !H(d) &&
|
|
1543
|
+
d && !H(d) && El("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `refs.setPositionReference()`", "instead.");
|
|
1538
1544
|
}
|
|
1539
|
-
const [l, u] = C.useState(s.reference), c =
|
|
1545
|
+
const [l, u] = C.useState(s.reference), c = Ja((d, m, y) => {
|
|
1540
1546
|
o.current.openEvent = d ? m : void 0, r.emit("openchange", {
|
|
1541
1547
|
open: d,
|
|
1542
1548
|
event: m,
|
|
@@ -1560,18 +1566,18 @@ function Ol(t) {
|
|
|
1560
1566
|
refs: f
|
|
1561
1567
|
}), [e, c, h, r, i, f]);
|
|
1562
1568
|
}
|
|
1563
|
-
function
|
|
1569
|
+
function Il(t) {
|
|
1564
1570
|
t === void 0 && (t = {});
|
|
1565
1571
|
const {
|
|
1566
1572
|
nodeId: e
|
|
1567
|
-
} = t, n =
|
|
1573
|
+
} = t, n = Nl({
|
|
1568
1574
|
...t,
|
|
1569
1575
|
elements: {
|
|
1570
1576
|
reference: null,
|
|
1571
1577
|
floating: null,
|
|
1572
1578
|
...t.elements
|
|
1573
1579
|
}
|
|
1574
|
-
}), s = t.rootContext || n, i = s.elements, [o, r] = C.useState(null), [a, l] = C.useState(null), c = i?.domReference || o, f = C.useRef(null), h =
|
|
1580
|
+
}), s = t.rootContext || n, i = s.elements, [o, r] = C.useState(null), [a, l] = C.useState(null), c = i?.domReference || o, f = C.useRef(null), h = jl();
|
|
1575
1581
|
ke(() => {
|
|
1576
1582
|
c && (f.current = c);
|
|
1577
1583
|
}, [c]);
|
|
@@ -1603,7 +1609,7 @@ function Nl(t) {
|
|
|
1603
1609
|
}), [d.refs, y, m]), v = C.useMemo(() => ({
|
|
1604
1610
|
...d.elements,
|
|
1605
1611
|
domReference: c
|
|
1606
|
-
}), [d.elements, c]),
|
|
1612
|
+
}), [d.elements, c]), b = C.useMemo(() => ({
|
|
1607
1613
|
...d,
|
|
1608
1614
|
...s,
|
|
1609
1615
|
refs: x,
|
|
@@ -1611,19 +1617,19 @@ function Nl(t) {
|
|
|
1611
1617
|
nodeId: e
|
|
1612
1618
|
}), [d, x, v, e, s]);
|
|
1613
1619
|
return ke(() => {
|
|
1614
|
-
s.dataRef.current.floatingContext =
|
|
1620
|
+
s.dataRef.current.floatingContext = b;
|
|
1615
1621
|
const g = h?.nodesRef.current.find((S) => S.id === e);
|
|
1616
|
-
g && (g.context =
|
|
1622
|
+
g && (g.context = b);
|
|
1617
1623
|
}), C.useMemo(() => ({
|
|
1618
1624
|
...d,
|
|
1619
|
-
context:
|
|
1625
|
+
context: b,
|
|
1620
1626
|
refs: x,
|
|
1621
1627
|
elements: v
|
|
1622
|
-
}), [d, x, v,
|
|
1628
|
+
}), [d, x, v, b]);
|
|
1623
1629
|
}
|
|
1624
1630
|
const Qn = zt({});
|
|
1625
1631
|
function ts(t) {
|
|
1626
|
-
const e =
|
|
1632
|
+
const e = bt(null);
|
|
1627
1633
|
return e.current === null && (e.current = t()), e.current;
|
|
1628
1634
|
}
|
|
1629
1635
|
const es = typeof window < "u", Sr = es ? Kn : Be, Ye = /* @__PURE__ */ zt(null);
|
|
@@ -1635,17 +1641,17 @@ function ss(t, e) {
|
|
|
1635
1641
|
n > -1 && t.splice(n, 1);
|
|
1636
1642
|
}
|
|
1637
1643
|
const mt = (t, e, n) => n > e ? e : n < t ? t : n;
|
|
1638
|
-
function
|
|
1644
|
+
function bn(t, e) {
|
|
1639
1645
|
return e ? `${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}` : t;
|
|
1640
1646
|
}
|
|
1641
1647
|
let Yt = () => {
|
|
1642
1648
|
}, pt = () => {
|
|
1643
1649
|
};
|
|
1644
1650
|
process.env.NODE_ENV !== "production" && (Yt = (t, e, n) => {
|
|
1645
|
-
!t && typeof console < "u" && console.warn(
|
|
1651
|
+
!t && typeof console < "u" && console.warn(bn(e, n));
|
|
1646
1652
|
}, pt = (t, e, n) => {
|
|
1647
1653
|
if (!t)
|
|
1648
|
-
throw new Error(
|
|
1654
|
+
throw new Error(bn(e, n));
|
|
1649
1655
|
});
|
|
1650
1656
|
const gt = {}, Pr = (t) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);
|
|
1651
1657
|
function Cr(t) {
|
|
@@ -1657,7 +1663,7 @@ function is(t) {
|
|
|
1657
1663
|
let e;
|
|
1658
1664
|
return () => (e === void 0 && (e = t()), e);
|
|
1659
1665
|
}
|
|
1660
|
-
const et = /* @__NO_SIDE_EFFECTS__ */ (t) => t,
|
|
1666
|
+
const et = /* @__NO_SIDE_EFFECTS__ */ (t) => t, Fl = (t, e) => (n) => e(t(n)), de = (...t) => t.reduce(Fl), oe = /* @__NO_SIDE_EFFECTS__ */ (t, e, n) => {
|
|
1661
1667
|
const s = e - t;
|
|
1662
1668
|
return s === 0 ? 1 : (n - t) / s;
|
|
1663
1669
|
};
|
|
@@ -1692,27 +1698,27 @@ function Rr(t, e) {
|
|
|
1692
1698
|
}
|
|
1693
1699
|
const Hs = /* @__PURE__ */ new Set();
|
|
1694
1700
|
function os(t, e, n) {
|
|
1695
|
-
t || Hs.has(e) || (console.warn(
|
|
1701
|
+
t || Hs.has(e) || (console.warn(bn(e, n)), Hs.add(e));
|
|
1696
1702
|
}
|
|
1697
|
-
const Er = (t, e, n) => (((1 - 3 * n + 3 * e) * t + (3 * n - 6 * e)) * t + 3 * e) * t,
|
|
1698
|
-
function
|
|
1703
|
+
const Er = (t, e, n) => (((1 - 3 * n + 3 * e) * t + (3 * n - 6 * e)) * t + 3 * e) * t, Bl = 1e-7, _l = 12;
|
|
1704
|
+
function $l(t, e, n, s, i) {
|
|
1699
1705
|
let o, r, a = 0;
|
|
1700
1706
|
do
|
|
1701
1707
|
r = e + (n - e) / 2, o = Er(r, s, i) - t, o > 0 ? n = r : e = r;
|
|
1702
|
-
while (Math.abs(o) >
|
|
1708
|
+
while (Math.abs(o) > Bl && ++a < _l);
|
|
1703
1709
|
return r;
|
|
1704
1710
|
}
|
|
1705
1711
|
function me(t, e, n, s) {
|
|
1706
1712
|
if (t === e && n === s)
|
|
1707
1713
|
return et;
|
|
1708
|
-
const i = (o) =>
|
|
1714
|
+
const i = (o) => $l(o, 0, 1, t, n);
|
|
1709
1715
|
return (o) => o === 0 || o === 1 ? o : Er(i(o), e, s);
|
|
1710
1716
|
}
|
|
1711
|
-
const Vr = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, Dr = (t) => (e) => 1 - t(1 - e), Mr = /* @__PURE__ */ me(0.33, 1.53, 0.69, 0.99), as = /* @__PURE__ */ Dr(Mr), kr = /* @__PURE__ */ Vr(as), jr = (t) => (t *= 2) < 1 ? 0.5 * as(t) : 0.5 * (2 - Math.pow(2, -10 * (t - 1))), ls = (t) => 1 - Math.sin(Math.acos(t)), Lr = Dr(ls), Or = Vr(ls),
|
|
1717
|
+
const Vr = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, Dr = (t) => (e) => 1 - t(1 - e), Mr = /* @__PURE__ */ me(0.33, 1.53, 0.69, 0.99), as = /* @__PURE__ */ Dr(Mr), kr = /* @__PURE__ */ Vr(as), jr = (t) => (t *= 2) < 1 ? 0.5 * as(t) : 0.5 * (2 - Math.pow(2, -10 * (t - 1))), ls = (t) => 1 - Math.sin(Math.acos(t)), Lr = Dr(ls), Or = Vr(ls), Wl = /* @__PURE__ */ me(0.42, 0, 1, 1), Ul = /* @__PURE__ */ me(0, 0, 0.58, 1), Nr = /* @__PURE__ */ me(0.42, 0, 0.58, 1), Kl = (t) => Array.isArray(t) && typeof t[0] != "number", Ir = (t) => Array.isArray(t) && typeof t[0] == "number", Ys = {
|
|
1712
1718
|
linear: et,
|
|
1713
|
-
easeIn:
|
|
1719
|
+
easeIn: Wl,
|
|
1714
1720
|
easeInOut: Nr,
|
|
1715
|
-
easeOut:
|
|
1721
|
+
easeOut: Ul,
|
|
1716
1722
|
circIn: ls,
|
|
1717
1723
|
circInOut: Or,
|
|
1718
1724
|
circOut: Lr,
|
|
@@ -1720,12 +1726,12 @@ const Vr = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, Dr
|
|
|
1720
1726
|
backInOut: kr,
|
|
1721
1727
|
backOut: Mr,
|
|
1722
1728
|
anticipate: jr
|
|
1723
|
-
},
|
|
1729
|
+
}, zl = (t) => typeof t == "string", Xs = (t) => {
|
|
1724
1730
|
if (Ir(t)) {
|
|
1725
1731
|
pt(t.length === 4, "Cubic bezier arrays must contain four numerical values.", "cubic-bezier-length");
|
|
1726
1732
|
const [e, n, s, i] = t;
|
|
1727
1733
|
return me(e, n, s, i);
|
|
1728
|
-
} else if (
|
|
1734
|
+
} else if (zl(t))
|
|
1729
1735
|
return pt(Ys[t] !== void 0, `Invalid easing type '${t}'`, "invalid-easing-type"), Ys[t];
|
|
1730
1736
|
return t;
|
|
1731
1737
|
}, xe = [
|
|
@@ -1746,7 +1752,7 @@ const Vr = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, Dr
|
|
|
1746
1752
|
"postRender"
|
|
1747
1753
|
// Compute
|
|
1748
1754
|
];
|
|
1749
|
-
function
|
|
1755
|
+
function Hl(t, e) {
|
|
1750
1756
|
let n = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), i = !1, o = !1;
|
|
1751
1757
|
const r = /* @__PURE__ */ new WeakSet();
|
|
1752
1758
|
let a = {
|
|
@@ -1784,16 +1790,16 @@ function zl(t, e) {
|
|
|
1784
1790
|
};
|
|
1785
1791
|
return u;
|
|
1786
1792
|
}
|
|
1787
|
-
const
|
|
1793
|
+
const Yl = 40;
|
|
1788
1794
|
function Fr(t, e) {
|
|
1789
1795
|
let n = !1, s = !0;
|
|
1790
1796
|
const i = {
|
|
1791
1797
|
delta: 0,
|
|
1792
1798
|
timestamp: 0,
|
|
1793
1799
|
isProcessing: !1
|
|
1794
|
-
}, o = () => n = !0, r = xe.reduce((g, S) => (g[S] =
|
|
1800
|
+
}, o = () => n = !0, r = xe.reduce((g, S) => (g[S] = Hl(o), g), {}), { setup: a, read: l, resolveKeyframes: u, preUpdate: c, update: f, preRender: h, render: d, postRender: m } = r, y = () => {
|
|
1795
1801
|
const g = gt.useManualTiming ? i.timestamp : performance.now();
|
|
1796
|
-
n = !1, gt.useManualTiming || (i.delta = s ? 1e3 / 60 : Math.max(Math.min(g - i.timestamp,
|
|
1802
|
+
n = !1, gt.useManualTiming || (i.delta = s ? 1e3 / 60 : Math.max(Math.min(g - i.timestamp, Yl), 1)), i.timestamp = g, i.isProcessing = !0, a.process(i), l.process(i), u.process(i), c.process(i), f.process(i), h.process(i), d.process(i), m.process(i), i.isProcessing = !1, n && e && (s = !1, t(y));
|
|
1797
1803
|
}, x = () => {
|
|
1798
1804
|
n = !0, s = !0, i.isProcessing || t(y);
|
|
1799
1805
|
};
|
|
@@ -1807,29 +1813,29 @@ function Fr(t, e) {
|
|
|
1807
1813
|
}
|
|
1808
1814
|
const { schedule: j, cancel: St, state: $, steps: nn } = /* @__PURE__ */ Fr(typeof requestAnimationFrame < "u" ? requestAnimationFrame : et, !0);
|
|
1809
1815
|
let Ce;
|
|
1810
|
-
function
|
|
1816
|
+
function Xl() {
|
|
1811
1817
|
Ce = void 0;
|
|
1812
1818
|
}
|
|
1813
1819
|
const q = {
|
|
1814
1820
|
now: () => (Ce === void 0 && q.set($.isProcessing || gt.useManualTiming ? $.timestamp : performance.now()), Ce),
|
|
1815
1821
|
set: (t) => {
|
|
1816
|
-
Ce = t, queueMicrotask(
|
|
1822
|
+
Ce = t, queueMicrotask(Xl);
|
|
1817
1823
|
}
|
|
1818
|
-
}, Br = (t) => (e) => typeof e == "string" && e.startsWith(t), cs = /* @__PURE__ */ Br("--"),
|
|
1824
|
+
}, Br = (t) => (e) => typeof e == "string" && e.startsWith(t), cs = /* @__PURE__ */ Br("--"), Gl = /* @__PURE__ */ Br("var(--"), us = (t) => Gl(t) ? ql.test(t.split("/*")[0].trim()) : !1, ql = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu, Xt = {
|
|
1819
1825
|
test: (t) => typeof t == "number",
|
|
1820
1826
|
parse: parseFloat,
|
|
1821
1827
|
transform: (t) => t
|
|
1822
1828
|
}, ae = {
|
|
1823
1829
|
...Xt,
|
|
1824
1830
|
transform: (t) => mt(0, 1, t)
|
|
1825
|
-
},
|
|
1831
|
+
}, we = {
|
|
1826
1832
|
...Xt,
|
|
1827
1833
|
default: 1
|
|
1828
1834
|
}, ee = (t) => Math.round(t * 1e5) / 1e5, fs = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
|
|
1829
|
-
function
|
|
1835
|
+
function Zl(t) {
|
|
1830
1836
|
return t == null;
|
|
1831
1837
|
}
|
|
1832
|
-
const
|
|
1838
|
+
const Jl = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, hs = (t, e) => (n) => !!(typeof n == "string" && Jl.test(n) && n.startsWith(t) || e && !Zl(n) && Object.prototype.hasOwnProperty.call(n, e)), _r = (t, e, n) => (s) => {
|
|
1833
1839
|
if (typeof s != "string")
|
|
1834
1840
|
return s;
|
|
1835
1841
|
const [i, o, r, a] = s.match(fs);
|
|
@@ -1839,15 +1845,15 @@ const Zl = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s
|
|
|
1839
1845
|
[n]: parseFloat(r),
|
|
1840
1846
|
alpha: a !== void 0 ? parseFloat(a) : 1
|
|
1841
1847
|
};
|
|
1842
|
-
},
|
|
1848
|
+
}, Ql = (t) => mt(0, 255, t), sn = {
|
|
1843
1849
|
...Xt,
|
|
1844
|
-
transform: (t) => Math.round(
|
|
1850
|
+
transform: (t) => Math.round(Ql(t))
|
|
1845
1851
|
}, Et = {
|
|
1846
1852
|
test: /* @__PURE__ */ hs("rgb", "red"),
|
|
1847
1853
|
parse: /* @__PURE__ */ _r("red", "green", "blue"),
|
|
1848
1854
|
transform: ({ red: t, green: e, blue: n, alpha: s = 1 }) => "rgba(" + sn.transform(t) + ", " + sn.transform(e) + ", " + sn.transform(n) + ", " + ee(ae.transform(s)) + ")"
|
|
1849
1855
|
};
|
|
1850
|
-
function
|
|
1856
|
+
function tc(t) {
|
|
1851
1857
|
let e = "", n = "", s = "", i = "";
|
|
1852
1858
|
return t.length > 5 ? (e = t.substring(1, 3), n = t.substring(3, 5), s = t.substring(5, 7), i = t.substring(7, 9)) : (e = t.substring(1, 2), n = t.substring(2, 3), s = t.substring(3, 4), i = t.substring(4, 5), e += e, n += n, s += s, i += i), {
|
|
1853
1859
|
red: parseInt(e, 16),
|
|
@@ -1858,13 +1864,13 @@ function Ql(t) {
|
|
|
1858
1864
|
}
|
|
1859
1865
|
const Tn = {
|
|
1860
1866
|
test: /* @__PURE__ */ hs("#"),
|
|
1861
|
-
parse:
|
|
1867
|
+
parse: tc,
|
|
1862
1868
|
transform: Et.transform
|
|
1863
1869
|
}, pe = /* @__NO_SIDE_EFFECTS__ */ (t) => ({
|
|
1864
1870
|
test: (e) => typeof e == "string" && e.endsWith(t) && e.split(" ").length === 1,
|
|
1865
1871
|
parse: parseFloat,
|
|
1866
1872
|
transform: (e) => `${e}${t}`
|
|
1867
|
-
}),
|
|
1873
|
+
}), wt = /* @__PURE__ */ pe("deg"), ht = /* @__PURE__ */ pe("%"), R = /* @__PURE__ */ pe("px"), ec = /* @__PURE__ */ pe("vh"), nc = /* @__PURE__ */ pe("vw"), Gs = {
|
|
1868
1874
|
...ht,
|
|
1869
1875
|
parse: (t) => ht.parse(t) / 100,
|
|
1870
1876
|
transform: (t) => ht.transform(t * 100)
|
|
@@ -1880,11 +1886,11 @@ const Tn = {
|
|
|
1880
1886
|
const e = B.parse(t);
|
|
1881
1887
|
return e.alpha = 0, B.transform(e);
|
|
1882
1888
|
}
|
|
1883
|
-
},
|
|
1884
|
-
function
|
|
1885
|
-
return isNaN(t) && typeof t == "string" && (t.match(fs)?.length || 0) + (t.match(
|
|
1889
|
+
}, sc = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
|
|
1890
|
+
function ic(t) {
|
|
1891
|
+
return isNaN(t) && typeof t == "string" && (t.match(fs)?.length || 0) + (t.match(sc)?.length || 0) > 0;
|
|
1886
1892
|
}
|
|
1887
|
-
const $r = "number", Wr = "color",
|
|
1893
|
+
const $r = "number", Wr = "color", rc = "var", oc = "var(", qs = "${}", ac = /var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;
|
|
1888
1894
|
function le(t) {
|
|
1889
1895
|
const e = t.toString(), n = [], s = {
|
|
1890
1896
|
color: [],
|
|
@@ -1892,7 +1898,7 @@ function le(t) {
|
|
|
1892
1898
|
var: []
|
|
1893
1899
|
}, i = [];
|
|
1894
1900
|
let o = 0;
|
|
1895
|
-
const a = e.replace(
|
|
1901
|
+
const a = e.replace(ac, (l) => (B.test(l) ? (s.color.push(o), i.push(Wr), n.push(B.parse(l))) : l.startsWith(oc) ? (s.var.push(o), i.push(rc), n.push(l)) : (s.number.push(o), i.push($r), n.push(parseFloat(l))), ++o, qs)).split(qs);
|
|
1896
1902
|
return { values: n, split: a, indexes: s, types: i };
|
|
1897
1903
|
}
|
|
1898
1904
|
function Ur(t) {
|
|
@@ -1910,21 +1916,21 @@ function Kr(t) {
|
|
|
1910
1916
|
return o;
|
|
1911
1917
|
};
|
|
1912
1918
|
}
|
|
1913
|
-
const
|
|
1914
|
-
function
|
|
1919
|
+
const lc = (t) => typeof t == "number" ? 0 : B.test(t) ? B.getAnimatableNone(t) : t;
|
|
1920
|
+
function cc(t) {
|
|
1915
1921
|
const e = Ur(t);
|
|
1916
|
-
return Kr(t)(e.map(
|
|
1922
|
+
return Kr(t)(e.map(lc));
|
|
1917
1923
|
}
|
|
1918
1924
|
const Pt = {
|
|
1919
|
-
test:
|
|
1925
|
+
test: ic,
|
|
1920
1926
|
parse: Ur,
|
|
1921
1927
|
createTransformer: Kr,
|
|
1922
|
-
getAnimatableNone:
|
|
1928
|
+
getAnimatableNone: cc
|
|
1923
1929
|
};
|
|
1924
1930
|
function rn(t, e, n) {
|
|
1925
1931
|
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;
|
|
1926
1932
|
}
|
|
1927
|
-
function
|
|
1933
|
+
function uc({ hue: t, saturation: e, lightness: n, alpha: s }) {
|
|
1928
1934
|
t /= 360, e /= 100, n /= 100;
|
|
1929
1935
|
let i = 0, o = 0, r = 0;
|
|
1930
1936
|
if (!e)
|
|
@@ -1946,13 +1952,13 @@ function Le(t, e) {
|
|
|
1946
1952
|
const I = (t, e, n) => t + (e - t) * n, on = (t, e, n) => {
|
|
1947
1953
|
const s = t * t, i = n * (e * e - s) + s;
|
|
1948
1954
|
return i < 0 ? 0 : Math.sqrt(i);
|
|
1949
|
-
},
|
|
1955
|
+
}, fc = [Tn, Et, Lt], hc = (t) => fc.find((e) => e.test(t));
|
|
1950
1956
|
function Zs(t) {
|
|
1951
|
-
const e =
|
|
1957
|
+
const e = hc(t);
|
|
1952
1958
|
if (Yt(!!e, `'${t}' is not an animatable color. Use the equivalent color code instead.`, "color-not-animatable"), !e)
|
|
1953
1959
|
return !1;
|
|
1954
1960
|
let n = e.parse(t);
|
|
1955
|
-
return e === Lt && (n =
|
|
1961
|
+
return e === Lt && (n = uc(n)), n;
|
|
1956
1962
|
}
|
|
1957
1963
|
const Js = (t, e) => {
|
|
1958
1964
|
const n = Zs(t), s = Zs(e);
|
|
@@ -1961,14 +1967,14 @@ const Js = (t, e) => {
|
|
|
1961
1967
|
const i = { ...n };
|
|
1962
1968
|
return (o) => (i.red = on(n.red, s.red, o), i.green = on(n.green, s.green, o), i.blue = on(n.blue, s.blue, o), i.alpha = I(n.alpha, s.alpha, o), Et.transform(i));
|
|
1963
1969
|
}, Sn = /* @__PURE__ */ new Set(["none", "hidden"]);
|
|
1964
|
-
function
|
|
1970
|
+
function dc(t, e) {
|
|
1965
1971
|
return Sn.has(t) ? (n) => n <= 0 ? t : e : (n) => n >= 1 ? e : t;
|
|
1966
1972
|
}
|
|
1967
|
-
function
|
|
1973
|
+
function mc(t, e) {
|
|
1968
1974
|
return (n) => I(t, e, n);
|
|
1969
1975
|
}
|
|
1970
1976
|
function ds(t) {
|
|
1971
|
-
return typeof t == "number" ?
|
|
1977
|
+
return typeof t == "number" ? mc : typeof t == "string" ? us(t) ? Le : B.test(t) ? Js : yc : Array.isArray(t) ? zr : typeof t == "object" ? B.test(t) ? Js : pc : Le;
|
|
1972
1978
|
}
|
|
1973
1979
|
function zr(t, e) {
|
|
1974
1980
|
const n = [...t], s = n.length, i = t.map((o, r) => ds(o)(o, e[r]));
|
|
@@ -1978,7 +1984,7 @@ function zr(t, e) {
|
|
|
1978
1984
|
return n;
|
|
1979
1985
|
};
|
|
1980
1986
|
}
|
|
1981
|
-
function
|
|
1987
|
+
function pc(t, e) {
|
|
1982
1988
|
const n = { ...t, ...e }, s = {};
|
|
1983
1989
|
for (const i in n)
|
|
1984
1990
|
t[i] !== void 0 && e[i] !== void 0 && (s[i] = ds(t[i])(t[i], e[i]));
|
|
@@ -1988,7 +1994,7 @@ function mc(t, e) {
|
|
|
1988
1994
|
return n;
|
|
1989
1995
|
};
|
|
1990
1996
|
}
|
|
1991
|
-
function
|
|
1997
|
+
function gc(t, e) {
|
|
1992
1998
|
const n = [], s = { color: 0, var: 0, number: 0 };
|
|
1993
1999
|
for (let i = 0; i < e.values.length; i++) {
|
|
1994
2000
|
const o = e.types[i], r = t.indexes[o][s[o]], a = t.values[r] ?? 0;
|
|
@@ -1996,14 +2002,14 @@ function pc(t, e) {
|
|
|
1996
2002
|
}
|
|
1997
2003
|
return n;
|
|
1998
2004
|
}
|
|
1999
|
-
const
|
|
2005
|
+
const yc = (t, e) => {
|
|
2000
2006
|
const n = Pt.createTransformer(e), s = le(t), i = le(e);
|
|
2001
|
-
return s.indexes.var.length === i.indexes.var.length && s.indexes.color.length === i.indexes.color.length && s.indexes.number.length >= i.indexes.number.length ? Sn.has(t) && !i.values.length || Sn.has(e) && !s.values.length ?
|
|
2007
|
+
return s.indexes.var.length === i.indexes.var.length && s.indexes.color.length === i.indexes.color.length && s.indexes.number.length >= i.indexes.number.length ? Sn.has(t) && !i.values.length || Sn.has(e) && !s.values.length ? dc(t, e) : de(zr(gc(s, i), i.values), n) : (Yt(!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.`, "complex-values-different"), Le(t, e));
|
|
2002
2008
|
};
|
|
2003
2009
|
function Hr(t, e, n) {
|
|
2004
2010
|
return typeof t == "number" && typeof e == "number" && typeof n == "number" ? I(t, e, n) : ds(t)(t, e);
|
|
2005
2011
|
}
|
|
2006
|
-
const
|
|
2012
|
+
const vc = (t) => {
|
|
2007
2013
|
const e = ({ timestamp: n }) => t(n);
|
|
2008
2014
|
return {
|
|
2009
2015
|
start: (n = !0) => j.update(e, n),
|
|
@@ -2029,7 +2035,7 @@ function ms(t) {
|
|
|
2029
2035
|
e += n, s = t.next(e);
|
|
2030
2036
|
return e >= Oe ? 1 / 0 : e;
|
|
2031
2037
|
}
|
|
2032
|
-
function
|
|
2038
|
+
function xc(t, e = 100, n) {
|
|
2033
2039
|
const s = n({ ...t, keyframes: [0, e] }), i = Math.min(ms(s), Oe);
|
|
2034
2040
|
return {
|
|
2035
2041
|
type: "keyframes",
|
|
@@ -2037,9 +2043,9 @@ function vc(t, e = 100, n) {
|
|
|
2037
2043
|
duration: /* @__PURE__ */ ft(i)
|
|
2038
2044
|
};
|
|
2039
2045
|
}
|
|
2040
|
-
const
|
|
2046
|
+
const wc = 5;
|
|
2041
2047
|
function Xr(t, e, n) {
|
|
2042
|
-
const s = Math.max(e -
|
|
2048
|
+
const s = Math.max(e - wc, 0);
|
|
2043
2049
|
return Rr(n - t(s), e - s);
|
|
2044
2050
|
}
|
|
2045
2051
|
const N = {
|
|
@@ -2088,7 +2094,7 @@ function bc({ duration: t = N.duration, bounce: e = N.bounce, velocity: n = N.ve
|
|
|
2088
2094
|
const c = Math.exp(-u * t), f = (n - u) * (t * t);
|
|
2089
2095
|
return c * f;
|
|
2090
2096
|
});
|
|
2091
|
-
const a = 5 / t, l =
|
|
2097
|
+
const a = 5 / t, l = Sc(i, o, a);
|
|
2092
2098
|
if (t = /* @__PURE__ */ ot(t), isNaN(l))
|
|
2093
2099
|
return {
|
|
2094
2100
|
stiffness: N.stiffness,
|
|
@@ -2104,21 +2110,21 @@ function bc({ duration: t = N.duration, bounce: e = N.bounce, velocity: n = N.ve
|
|
|
2104
2110
|
};
|
|
2105
2111
|
}
|
|
2106
2112
|
}
|
|
2107
|
-
const
|
|
2108
|
-
function
|
|
2113
|
+
const Tc = 12;
|
|
2114
|
+
function Sc(t, e, n) {
|
|
2109
2115
|
let s = n;
|
|
2110
|
-
for (let i = 1; i <
|
|
2116
|
+
for (let i = 1; i < Tc; i++)
|
|
2111
2117
|
s = s - t(s) / e(s);
|
|
2112
2118
|
return s;
|
|
2113
2119
|
}
|
|
2114
2120
|
function Pn(t, e) {
|
|
2115
2121
|
return t * Math.sqrt(1 - e * e);
|
|
2116
2122
|
}
|
|
2117
|
-
const
|
|
2123
|
+
const Pc = ["duration", "bounce"], Cc = ["stiffness", "damping", "mass"];
|
|
2118
2124
|
function Qs(t, e) {
|
|
2119
2125
|
return e.some((n) => t[n] !== void 0);
|
|
2120
2126
|
}
|
|
2121
|
-
function
|
|
2127
|
+
function Ac(t) {
|
|
2122
2128
|
let e = {
|
|
2123
2129
|
velocity: N.velocity,
|
|
2124
2130
|
stiffness: N.stiffness,
|
|
@@ -2127,7 +2133,7 @@ function Cc(t) {
|
|
|
2127
2133
|
isResolvedFromDuration: !1,
|
|
2128
2134
|
...t
|
|
2129
2135
|
};
|
|
2130
|
-
if (!Qs(t,
|
|
2136
|
+
if (!Qs(t, Cc) && Qs(t, Pc))
|
|
2131
2137
|
if (t.visualDuration) {
|
|
2132
2138
|
const n = t.visualDuration, s = 2 * Math.PI / (n * 1.2), i = s * s, o = 2 * mt(0.05, 1, 1 - (t.bounce || 0)) * Math.sqrt(i);
|
|
2133
2139
|
e = {
|
|
@@ -2153,11 +2159,11 @@ function Ne(t = N.visualDuration, e = N.bounce) {
|
|
|
2153
2159
|
bounce: e
|
|
2154
2160
|
} : t;
|
|
2155
2161
|
let { restSpeed: s, restDelta: i } = n;
|
|
2156
|
-
const o = n.keyframes[0], r = n.keyframes[n.keyframes.length - 1], a = { done: !1, value: o }, { stiffness: l, damping: u, mass: c, duration: f, velocity: h, isResolvedFromDuration: d } =
|
|
2162
|
+
const o = n.keyframes[0], r = n.keyframes[n.keyframes.length - 1], a = { done: !1, value: o }, { stiffness: l, damping: u, mass: c, duration: f, velocity: h, isResolvedFromDuration: d } = Ac({
|
|
2157
2163
|
...n,
|
|
2158
2164
|
velocity: -/* @__PURE__ */ ft(n.velocity || 0)
|
|
2159
|
-
}), m = h || 0, y = u / (2 * Math.sqrt(l * c)), x = r - o, v = /* @__PURE__ */ ft(Math.sqrt(l / c)),
|
|
2160
|
-
s || (s =
|
|
2165
|
+
}), m = h || 0, y = u / (2 * Math.sqrt(l * c)), x = r - o, v = /* @__PURE__ */ ft(Math.sqrt(l / c)), b = Math.abs(x) < 5;
|
|
2166
|
+
s || (s = b ? N.restSpeed.granular : N.restSpeed.default), i || (i = b ? N.restDelta.granular : N.restDelta.default);
|
|
2161
2167
|
let g;
|
|
2162
2168
|
if (y < 1) {
|
|
2163
2169
|
const T = Pn(v, y);
|
|
@@ -2198,7 +2204,7 @@ function Ne(t = N.visualDuration, e = N.bounce) {
|
|
|
2198
2204
|
return S;
|
|
2199
2205
|
}
|
|
2200
2206
|
Ne.applyToOptions = (t) => {
|
|
2201
|
-
const e =
|
|
2207
|
+
const e = xc(t, 100, Ne);
|
|
2202
2208
|
return t.ease = e.ease, t.duration = /* @__PURE__ */ ot(e.duration), t.type = "keyframes", t;
|
|
2203
2209
|
};
|
|
2204
2210
|
function Cn({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: s = 325, bounceDamping: i = 10, bounceStiffness: o = 500, modifyTarget: r, min: a, max: l, restDelta: u = 0.5, restSpeed: c }) {
|
|
@@ -2209,8 +2215,8 @@ function Cn({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: s = 3
|
|
|
2209
2215
|
let y = n * e;
|
|
2210
2216
|
const x = f + y, v = r === void 0 ? x : r(x);
|
|
2211
2217
|
v !== x && (y = v - f);
|
|
2212
|
-
const
|
|
2213
|
-
const M =
|
|
2218
|
+
const b = (P) => -y * Math.exp(-P / s), g = (P) => v + b(P), S = (P) => {
|
|
2219
|
+
const M = b(P), k = g(P);
|
|
2214
2220
|
h.done = Math.abs(M) <= u, h.value = h.done ? v : k;
|
|
2215
2221
|
};
|
|
2216
2222
|
let T, A;
|
|
@@ -2233,7 +2239,7 @@ function Cn({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: s = 3
|
|
|
2233
2239
|
}
|
|
2234
2240
|
};
|
|
2235
2241
|
}
|
|
2236
|
-
function
|
|
2242
|
+
function Rc(t, e, n) {
|
|
2237
2243
|
const s = [], i = n || gt.mix || Hr, o = t.length - 1;
|
|
2238
2244
|
for (let r = 0; r < o; r++) {
|
|
2239
2245
|
let a = i(t[r], t[r + 1]);
|
|
@@ -2245,7 +2251,7 @@ function Ac(t, e, n) {
|
|
|
2245
2251
|
}
|
|
2246
2252
|
return s;
|
|
2247
2253
|
}
|
|
2248
|
-
function
|
|
2254
|
+
function Ec(t, e, { clamp: n = !0, ease: s, mixer: i } = {}) {
|
|
2249
2255
|
const o = t.length;
|
|
2250
2256
|
if (pt(o === e.length, "Both input and output ranges must be the same length", "range-length"), o === 1)
|
|
2251
2257
|
return () => e[0];
|
|
@@ -2253,7 +2259,7 @@ function Rc(t, e, { clamp: n = !0, ease: s, mixer: i } = {}) {
|
|
|
2253
2259
|
return () => e[1];
|
|
2254
2260
|
const r = t[0] === t[1];
|
|
2255
2261
|
t[0] > t[o - 1] && (t = [...t].reverse(), e = [...e].reverse());
|
|
2256
|
-
const a =
|
|
2262
|
+
const a = Rc(e, s, i), l = a.length, u = (c) => {
|
|
2257
2263
|
if (r && c < t[0])
|
|
2258
2264
|
return e[0];
|
|
2259
2265
|
let f = 0;
|
|
@@ -2265,46 +2271,46 @@ function Rc(t, e, { clamp: n = !0, ease: s, mixer: i } = {}) {
|
|
|
2265
2271
|
};
|
|
2266
2272
|
return n ? (c) => u(mt(t[0], t[o - 1], c)) : u;
|
|
2267
2273
|
}
|
|
2268
|
-
function
|
|
2274
|
+
function Vc(t, e) {
|
|
2269
2275
|
const n = t[t.length - 1];
|
|
2270
2276
|
for (let s = 1; s <= e; s++) {
|
|
2271
2277
|
const i = /* @__PURE__ */ oe(0, e, s);
|
|
2272
2278
|
t.push(I(n, 1, i));
|
|
2273
2279
|
}
|
|
2274
2280
|
}
|
|
2275
|
-
function
|
|
2281
|
+
function Dc(t) {
|
|
2276
2282
|
const e = [0];
|
|
2277
|
-
return
|
|
2283
|
+
return Vc(e, t.length - 1), e;
|
|
2278
2284
|
}
|
|
2279
|
-
function
|
|
2285
|
+
function Mc(t, e) {
|
|
2280
2286
|
return t.map((n) => n * e);
|
|
2281
2287
|
}
|
|
2282
|
-
function
|
|
2288
|
+
function kc(t, e) {
|
|
2283
2289
|
return t.map(() => e || Nr).splice(0, t.length - 1);
|
|
2284
2290
|
}
|
|
2285
2291
|
function Ot({ duration: t = 300, keyframes: e, times: n, ease: s = "easeInOut" }) {
|
|
2286
|
-
const i =
|
|
2292
|
+
const i = Kl(s) ? s.map(Xs) : Xs(s), o = {
|
|
2287
2293
|
done: !1,
|
|
2288
2294
|
value: e[0]
|
|
2289
|
-
}, r =
|
|
2295
|
+
}, r = Mc(
|
|
2290
2296
|
// Only use the provided offsets if they're the correct length
|
|
2291
2297
|
// TODO Maybe we should warn here if there's a length mismatch
|
|
2292
|
-
n && n.length === e.length ? n :
|
|
2298
|
+
n && n.length === e.length ? n : Dc(e),
|
|
2293
2299
|
t
|
|
2294
|
-
), a =
|
|
2295
|
-
ease: Array.isArray(i) ? i :
|
|
2300
|
+
), a = Ec(r, e, {
|
|
2301
|
+
ease: Array.isArray(i) ? i : kc(e, i)
|
|
2296
2302
|
});
|
|
2297
2303
|
return {
|
|
2298
2304
|
calculatedDuration: t,
|
|
2299
2305
|
next: (l) => (o.value = a(l), o.done = l >= t, o)
|
|
2300
2306
|
};
|
|
2301
2307
|
}
|
|
2302
|
-
const
|
|
2308
|
+
const jc = (t) => t !== null;
|
|
2303
2309
|
function ps(t, { repeat: e, repeatType: n = "loop" }, s, i = 1) {
|
|
2304
|
-
const o = t.filter(
|
|
2310
|
+
const o = t.filter(jc), a = i < 0 || e && n !== "loop" && e % 2 === 1 ? 0 : o.length - 1;
|
|
2305
2311
|
return !a || s === void 0 ? o[a] : s;
|
|
2306
2312
|
}
|
|
2307
|
-
const
|
|
2313
|
+
const Lc = {
|
|
2308
2314
|
decay: Cn,
|
|
2309
2315
|
inertia: Cn,
|
|
2310
2316
|
tween: Ot,
|
|
@@ -2312,7 +2318,7 @@ const jc = {
|
|
|
2312
2318
|
spring: Ne
|
|
2313
2319
|
};
|
|
2314
2320
|
function Gr(t) {
|
|
2315
|
-
typeof t.type == "string" && (t.type =
|
|
2321
|
+
typeof t.type == "string" && (t.type = Lc[t.type]);
|
|
2316
2322
|
}
|
|
2317
2323
|
class gs {
|
|
2318
2324
|
constructor() {
|
|
@@ -2338,7 +2344,7 @@ class gs {
|
|
|
2338
2344
|
return this.finished.then(e, n);
|
|
2339
2345
|
}
|
|
2340
2346
|
}
|
|
2341
|
-
const
|
|
2347
|
+
const Oc = (t) => t / 100;
|
|
2342
2348
|
class ys extends gs {
|
|
2343
2349
|
constructor(e) {
|
|
2344
2350
|
super(), this.state = "idle", this.startTime = null, this.isStopped = !1, this.currentTime = 0, this.holdTime = null, this.playbackSpeed = 1, this.stop = () => {
|
|
@@ -2352,7 +2358,7 @@ class ys extends gs {
|
|
|
2352
2358
|
const { type: n = Ot, repeat: s = 0, repeatDelay: i = 0, repeatType: o, velocity: r = 0 } = e;
|
|
2353
2359
|
let { keyframes: a } = e;
|
|
2354
2360
|
const l = n || Ot;
|
|
2355
|
-
process.env.NODE_ENV !== "production" && l !== Ot && pt(a.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`, "spring-two-frames"), l !== Ot && typeof a[0] != "number" && (this.mixKeyframes = de(
|
|
2361
|
+
process.env.NODE_ENV !== "production" && l !== Ot && pt(a.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`, "spring-two-frames"), l !== Ot && typeof a[0] != "number" && (this.mixKeyframes = de(Oc, Hr(a[0], a[1])), a = [0, 100]);
|
|
2356
2362
|
const u = l({ ...e, keyframes: a });
|
|
2357
2363
|
o === "mirror" && (this.mirroredGenerator = l({
|
|
2358
2364
|
...e,
|
|
@@ -2372,7 +2378,7 @@ class ys extends gs {
|
|
|
2372
2378
|
return s.next(0);
|
|
2373
2379
|
const { delay: u = 0, keyframes: c, repeat: f, repeatType: h, repeatDelay: d, type: m, onUpdate: y, finalKeyframe: x } = this.options;
|
|
2374
2380
|
this.speed > 0 ? this.startTime = Math.min(this.startTime, e) : this.speed < 0 && (this.startTime = Math.min(e - i / this.speed, this.startTime)), n ? this.currentTime = e : this.updateTime(e);
|
|
2375
|
-
const v = this.currentTime - u * (this.playbackSpeed >= 0 ? 1 : -1),
|
|
2381
|
+
const v = this.currentTime - u * (this.playbackSpeed >= 0 ? 1 : -1), b = this.playbackSpeed >= 0 ? v < 0 : v > i;
|
|
2376
2382
|
this.currentTime = Math.max(v, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = i);
|
|
2377
2383
|
let g = this.currentTime, S = s;
|
|
2378
2384
|
if (f) {
|
|
@@ -2380,10 +2386,10 @@ class ys extends gs {
|
|
|
2380
2386
|
let M = Math.floor(P), k = P % 1;
|
|
2381
2387
|
!k && P >= 1 && (k = 1), k === 1 && M--, M = Math.min(M, f + 1), !!(M % 2) && (h === "reverse" ? (k = 1 - k, d && (k -= d / a)) : h === "mirror" && (S = r)), g = mt(0, 1, k) * a;
|
|
2382
2388
|
}
|
|
2383
|
-
const T =
|
|
2389
|
+
const T = b ? { done: !1, value: c[0] } : S.next(g);
|
|
2384
2390
|
o && (T.value = o(T.value));
|
|
2385
2391
|
let { done: A } = T;
|
|
2386
|
-
!
|
|
2392
|
+
!b && l !== null && (A = this.playbackSpeed >= 0 ? this.currentTime >= i : this.currentTime <= 0);
|
|
2387
2393
|
const E = this.holdTime === null && (this.state === "finished" || this.state === "running" && A);
|
|
2388
2394
|
return E && m !== Cn && (T.value = ps(c, this.options, x, this.speed)), y && y(T.value), E && this.finish(), T;
|
|
2389
2395
|
}
|
|
@@ -2415,7 +2421,7 @@ class ys extends gs {
|
|
|
2415
2421
|
play() {
|
|
2416
2422
|
if (this.isStopped)
|
|
2417
2423
|
return;
|
|
2418
|
-
const { driver: e =
|
|
2424
|
+
const { driver: e = vc, startTime: n } = this.options;
|
|
2419
2425
|
this.driver || (this.driver = e((i) => this.tick(i))), this.options.onPlay?.();
|
|
2420
2426
|
const s = this.driver.now();
|
|
2421
2427
|
this.state === "finished" ? (this.updateFinished(), this.startTime = s) : this.holdTime !== null ? this.startTime = s - this.holdTime : this.startTime || (this.startTime = n ?? s), this.state === "finished" && this.speed < 0 && (this.startTime += this.calculatedDuration), this.holdTime = null, this.state = "running", this.driver.start();
|
|
@@ -2445,14 +2451,14 @@ class ys extends gs {
|
|
|
2445
2451
|
return this.options.allowFlatten && (this.options.type = "keyframes", this.options.ease = "linear", this.initAnimation()), this.driver?.stop(), e.observe(this);
|
|
2446
2452
|
}
|
|
2447
2453
|
}
|
|
2448
|
-
function
|
|
2454
|
+
function Nc(t) {
|
|
2449
2455
|
for (let e = 1; e < t.length; e++)
|
|
2450
2456
|
t[e] ?? (t[e] = t[e - 1]);
|
|
2451
2457
|
}
|
|
2452
2458
|
const Vt = (t) => t * 180 / Math.PI, An = (t) => {
|
|
2453
2459
|
const e = Vt(Math.atan2(t[1], t[0]));
|
|
2454
2460
|
return Rn(e);
|
|
2455
|
-
},
|
|
2461
|
+
}, Ic = {
|
|
2456
2462
|
x: 4,
|
|
2457
2463
|
y: 5,
|
|
2458
2464
|
translateX: 4,
|
|
@@ -2465,7 +2471,7 @@ const Vt = (t) => t * 180 / Math.PI, An = (t) => {
|
|
|
2465
2471
|
skewX: (t) => Vt(Math.atan(t[1])),
|
|
2466
2472
|
skewY: (t) => Vt(Math.atan(t[2])),
|
|
2467
2473
|
skew: (t) => (Math.abs(t[1]) + Math.abs(t[2])) / 2
|
|
2468
|
-
}, Rn = (t) => (t = t % 360, t < 0 && (t += 360), t), ti = An, ei = (t) => Math.sqrt(t[0] * t[0] + t[1] * t[1]), ni = (t) => Math.sqrt(t[4] * t[4] + t[5] * t[5]),
|
|
2474
|
+
}, Rn = (t) => (t = t % 360, t < 0 && (t += 360), t), ti = An, ei = (t) => Math.sqrt(t[0] * t[0] + t[1] * t[1]), ni = (t) => Math.sqrt(t[4] * t[4] + t[5] * t[5]), Fc = {
|
|
2469
2475
|
x: 12,
|
|
2470
2476
|
y: 13,
|
|
2471
2477
|
z: 14,
|
|
@@ -2492,21 +2498,21 @@ function Vn(t, e) {
|
|
|
2492
2498
|
const n = t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);
|
|
2493
2499
|
let s, i;
|
|
2494
2500
|
if (n)
|
|
2495
|
-
s =
|
|
2501
|
+
s = Fc, i = n;
|
|
2496
2502
|
else {
|
|
2497
2503
|
const a = t.match(/^matrix\(([-\d.e\s,]+)\)$/u);
|
|
2498
|
-
s =
|
|
2504
|
+
s = Ic, i = a;
|
|
2499
2505
|
}
|
|
2500
2506
|
if (!i)
|
|
2501
2507
|
return En(e);
|
|
2502
|
-
const o = s[e], r = i[1].split(",").map(
|
|
2508
|
+
const o = s[e], r = i[1].split(",").map(_c);
|
|
2503
2509
|
return typeof o == "function" ? o(r) : r[o];
|
|
2504
2510
|
}
|
|
2505
|
-
const
|
|
2511
|
+
const Bc = (t, e) => {
|
|
2506
2512
|
const { transform: n = "none" } = getComputedStyle(t);
|
|
2507
2513
|
return Vn(n, e);
|
|
2508
2514
|
};
|
|
2509
|
-
function
|
|
2515
|
+
function _c(t) {
|
|
2510
2516
|
return parseFloat(t.trim());
|
|
2511
2517
|
}
|
|
2512
2518
|
const Gt = [
|
|
@@ -2527,10 +2533,10 @@ const Gt = [
|
|
|
2527
2533
|
"skew",
|
|
2528
2534
|
"skewX",
|
|
2529
2535
|
"skewY"
|
|
2530
|
-
], qt = new Set(Gt), si = (t) => t === Xt || t === R,
|
|
2531
|
-
function
|
|
2536
|
+
], qt = new Set(Gt), si = (t) => t === Xt || t === R, $c = /* @__PURE__ */ new Set(["x", "y", "z"]), Wc = Gt.filter((t) => !$c.has(t));
|
|
2537
|
+
function Uc(t) {
|
|
2532
2538
|
const e = [];
|
|
2533
|
-
return
|
|
2539
|
+
return Wc.forEach((n) => {
|
|
2534
2540
|
const s = t.getValue(n);
|
|
2535
2541
|
s !== void 0 && (e.push([n, s.get()]), s.set(n.startsWith("scale") ? 1 : 0));
|
|
2536
2542
|
}), e;
|
|
@@ -2555,7 +2561,7 @@ function qr() {
|
|
|
2555
2561
|
if (Mn) {
|
|
2556
2562
|
const t = Array.from(Mt).filter((s) => s.needsMeasurement), e = new Set(t.map((s) => s.element)), n = /* @__PURE__ */ new Map();
|
|
2557
2563
|
e.forEach((s) => {
|
|
2558
|
-
const i =
|
|
2564
|
+
const i = Uc(s);
|
|
2559
2565
|
i.length && (n.set(s, i), s.render());
|
|
2560
2566
|
}), t.forEach((s) => s.measureInitialState()), e.forEach((s) => {
|
|
2561
2567
|
s.render();
|
|
@@ -2574,7 +2580,7 @@ function Zr() {
|
|
|
2574
2580
|
t.readKeyframes(), t.needsMeasurement && (Mn = !0);
|
|
2575
2581
|
});
|
|
2576
2582
|
}
|
|
2577
|
-
function
|
|
2583
|
+
function Kc() {
|
|
2578
2584
|
kn = !0, Zr(), qr(), kn = !1;
|
|
2579
2585
|
}
|
|
2580
2586
|
class vs {
|
|
@@ -2596,7 +2602,7 @@ class vs {
|
|
|
2596
2602
|
}
|
|
2597
2603
|
e[0] === void 0 && (e[0] = r), i && o === void 0 && i.set(e[0]);
|
|
2598
2604
|
}
|
|
2599
|
-
|
|
2605
|
+
Nc(e);
|
|
2600
2606
|
}
|
|
2601
2607
|
setFinalKeyframe() {
|
|
2602
2608
|
}
|
|
@@ -2616,16 +2622,16 @@ class vs {
|
|
|
2616
2622
|
this.state === "pending" && this.scheduleResolve();
|
|
2617
2623
|
}
|
|
2618
2624
|
}
|
|
2619
|
-
const
|
|
2620
|
-
function
|
|
2621
|
-
|
|
2625
|
+
const zc = (t) => t.startsWith("--");
|
|
2626
|
+
function Hc(t, e, n) {
|
|
2627
|
+
zc(e) ? t.style.setProperty(e, n) : t.style[e] = n;
|
|
2622
2628
|
}
|
|
2623
|
-
const
|
|
2624
|
-
function
|
|
2629
|
+
const Yc = /* @__PURE__ */ is(() => window.ScrollTimeline !== void 0), Xc = {};
|
|
2630
|
+
function Gc(t, e) {
|
|
2625
2631
|
const n = /* @__PURE__ */ is(t);
|
|
2626
|
-
return () =>
|
|
2632
|
+
return () => Xc[e] ?? n();
|
|
2627
2633
|
}
|
|
2628
|
-
const Jr = /* @__PURE__ */
|
|
2634
|
+
const Jr = /* @__PURE__ */ Gc(() => {
|
|
2629
2635
|
try {
|
|
2630
2636
|
document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
|
|
2631
2637
|
} catch {
|
|
@@ -2647,7 +2653,7 @@ function Qr(t, e) {
|
|
|
2647
2653
|
if (t)
|
|
2648
2654
|
return typeof t == "function" ? Jr() ? Yr(t, e) : "ease-out" : Ir(t) ? te(t) : Array.isArray(t) ? t.map((n) => Qr(n, e) || ii.easeOut) : ii[t];
|
|
2649
2655
|
}
|
|
2650
|
-
function
|
|
2656
|
+
function qc(t, e, n, { delay: s = 0, duration: i = 300, repeat: o = 0, repeatType: r = "loop", ease: a = "easeOut", times: l } = {}, u = void 0) {
|
|
2651
2657
|
const c = {
|
|
2652
2658
|
[e]: n
|
|
2653
2659
|
};
|
|
@@ -2667,20 +2673,20 @@ function Gc(t, e, n, { delay: s = 0, duration: i = 300, repeat: o = 0, repeatTyp
|
|
|
2667
2673
|
function to(t) {
|
|
2668
2674
|
return typeof t == "function" && "applyToOptions" in t;
|
|
2669
2675
|
}
|
|
2670
|
-
function
|
|
2676
|
+
function Zc({ type: t, ...e }) {
|
|
2671
2677
|
return to(t) && Jr() ? t.applyToOptions(e) : (e.duration ?? (e.duration = 300), e.ease ?? (e.ease = "easeOut"), e);
|
|
2672
2678
|
}
|
|
2673
|
-
class
|
|
2679
|
+
class Jc extends gs {
|
|
2674
2680
|
constructor(e) {
|
|
2675
2681
|
if (super(), this.finishedTime = null, this.isStopped = !1, !e)
|
|
2676
2682
|
return;
|
|
2677
2683
|
const { element: n, name: s, keyframes: i, pseudoElement: o, allowFlatten: r = !1, finalKeyframe: a, onComplete: l } = e;
|
|
2678
2684
|
this.isPseudoElement = !!o, this.allowFlatten = r, this.options = e, pt(typeof e.type != "string", `Mini animate() doesn't support "type" as a string.`, "mini-spring");
|
|
2679
|
-
const u =
|
|
2680
|
-
this.animation =
|
|
2685
|
+
const u = Zc(e);
|
|
2686
|
+
this.animation = qc(n, s, i, u, o), u.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
|
|
2681
2687
|
if (this.finishedTime = this.time, !o) {
|
|
2682
2688
|
const c = ps(i, this.options, a, this.speed);
|
|
2683
|
-
this.updateMotionValue ? this.updateMotionValue(c) :
|
|
2689
|
+
this.updateMotionValue ? this.updateMotionValue(c) : Hc(n, s, c), this.animation.cancel();
|
|
2684
2690
|
}
|
|
2685
2691
|
l?.(), this.notifyFinished();
|
|
2686
2692
|
};
|
|
@@ -2755,7 +2761,7 @@ class Zc extends gs {
|
|
|
2755
2761
|
* Attaches a timeline to the animation, for instance the `ScrollTimeline`.
|
|
2756
2762
|
*/
|
|
2757
2763
|
attachTimeline({ timeline: e, observe: n }) {
|
|
2758
|
-
return this.allowFlatten && this.animation.effect?.updateTiming({ easing: "linear" }), this.animation.onfinish = null, e &&
|
|
2764
|
+
return this.allowFlatten && this.animation.effect?.updateTiming({ easing: "linear" }), this.animation.onfinish = null, e && Yc() ? (this.animation.timeline = e, et) : n(this);
|
|
2759
2765
|
}
|
|
2760
2766
|
}
|
|
2761
2767
|
const eo = {
|
|
@@ -2763,16 +2769,16 @@ const eo = {
|
|
|
2763
2769
|
backInOut: kr,
|
|
2764
2770
|
circInOut: Or
|
|
2765
2771
|
};
|
|
2766
|
-
function
|
|
2772
|
+
function Qc(t) {
|
|
2767
2773
|
return t in eo;
|
|
2768
2774
|
}
|
|
2769
|
-
function
|
|
2770
|
-
typeof t.ease == "string" &&
|
|
2775
|
+
function tu(t) {
|
|
2776
|
+
typeof t.ease == "string" && Qc(t.ease) && (t.ease = eo[t.ease]);
|
|
2771
2777
|
}
|
|
2772
2778
|
const ri = 10;
|
|
2773
|
-
class
|
|
2779
|
+
class eu extends Jc {
|
|
2774
2780
|
constructor(e) {
|
|
2775
|
-
|
|
2781
|
+
tu(e), Gr(e), super(e), e.startTime && (this.startTime = e.startTime), this.options = e;
|
|
2776
2782
|
}
|
|
2777
2783
|
/**
|
|
2778
2784
|
* WAAPI doesn't natively have any interruption capabilities.
|
|
@@ -2800,7 +2806,7 @@ class tu extends Zc {
|
|
|
2800
2806
|
const oi = (t, e) => e === "zIndex" ? !1 : !!(typeof t == "number" || Array.isArray(t) || typeof t == "string" && // It's animatable if we have a string
|
|
2801
2807
|
(Pt.test(t) || t === "0") && // And it contains numbers and/or colors
|
|
2802
2808
|
!t.startsWith("url("));
|
|
2803
|
-
function
|
|
2809
|
+
function nu(t) {
|
|
2804
2810
|
const e = t[0];
|
|
2805
2811
|
if (t.length === 1)
|
|
2806
2812
|
return !0;
|
|
@@ -2808,39 +2814,39 @@ function eu(t) {
|
|
|
2808
2814
|
if (t[n] !== e)
|
|
2809
2815
|
return !0;
|
|
2810
2816
|
}
|
|
2811
|
-
function
|
|
2817
|
+
function su(t, e, n, s) {
|
|
2812
2818
|
const i = t[0];
|
|
2813
2819
|
if (i === null)
|
|
2814
2820
|
return !1;
|
|
2815
2821
|
if (e === "display" || e === "visibility")
|
|
2816
2822
|
return !0;
|
|
2817
2823
|
const o = t[t.length - 1], r = oi(i, e), a = oi(o, e);
|
|
2818
|
-
return Yt(r === a, `You are trying to animate ${e} from "${i}" to "${o}". "${r ? o : i}" is not an animatable value.`, "value-not-animatable"), !r || !a ? !1 :
|
|
2824
|
+
return Yt(r === a, `You are trying to animate ${e} from "${i}" to "${o}". "${r ? o : i}" is not an animatable value.`, "value-not-animatable"), !r || !a ? !1 : nu(t) || (n === "spring" || to(n)) && s;
|
|
2819
2825
|
}
|
|
2820
2826
|
function jn(t) {
|
|
2821
2827
|
t.duration = 0, t.type;
|
|
2822
2828
|
}
|
|
2823
|
-
const
|
|
2829
|
+
const iu = /* @__PURE__ */ new Set([
|
|
2824
2830
|
"opacity",
|
|
2825
2831
|
"clipPath",
|
|
2826
2832
|
"filter",
|
|
2827
2833
|
"transform"
|
|
2828
2834
|
// TODO: Could be re-enabled now we have support for linear() easing
|
|
2829
2835
|
// "background-color"
|
|
2830
|
-
]),
|
|
2831
|
-
function
|
|
2836
|
+
]), ru = /* @__PURE__ */ is(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
|
|
2837
|
+
function ou(t) {
|
|
2832
2838
|
const { motionValue: e, name: n, repeatDelay: s, repeatType: i, damping: o, type: r } = t;
|
|
2833
2839
|
if (!(e?.owner?.current instanceof HTMLElement))
|
|
2834
2840
|
return !1;
|
|
2835
2841
|
const { onUpdate: l, transformTemplate: u } = e.owner.getProps();
|
|
2836
|
-
return
|
|
2842
|
+
return ru() && n && iu.has(n) && (n !== "transform" || !u) && /**
|
|
2837
2843
|
* If we're outputting values to onUpdate then we can't use WAAPI as there's
|
|
2838
2844
|
* no way to read the value from WAAPI every frame.
|
|
2839
2845
|
*/
|
|
2840
2846
|
!l && !s && i !== "mirror" && o !== 0 && r !== "inertia";
|
|
2841
2847
|
}
|
|
2842
|
-
const
|
|
2843
|
-
class
|
|
2848
|
+
const au = 40;
|
|
2849
|
+
class lu extends gs {
|
|
2844
2850
|
constructor({ autoplay: e = !0, delay: n = 0, type: s = "keyframes", repeat: i = 0, repeatDelay: o = 0, repeatType: r = "loop", keyframes: a, name: l, motionValue: u, element: c, ...f }) {
|
|
2845
2851
|
super(), this.stop = () => {
|
|
2846
2852
|
this._animation && (this._animation.stop(), this.stopTimeline?.()), this.keyframeResolver?.cancel();
|
|
@@ -2862,13 +2868,13 @@ class au extends gs {
|
|
|
2862
2868
|
onKeyframesResolved(e, n, s, i) {
|
|
2863
2869
|
this.keyframeResolver = void 0;
|
|
2864
2870
|
const { name: o, type: r, velocity: a, delay: l, isHandoff: u, onUpdate: c } = s;
|
|
2865
|
-
this.resolvedAt = q.now(),
|
|
2871
|
+
this.resolvedAt = q.now(), su(e, o, r, a) || ((gt.instantAnimations || !l) && c?.(ps(e, s, n)), e[0] = e[e.length - 1], jn(s), s.repeat = 0);
|
|
2866
2872
|
const h = {
|
|
2867
|
-
startTime: i ? this.resolvedAt ? this.resolvedAt - this.createdAt >
|
|
2873
|
+
startTime: i ? this.resolvedAt ? this.resolvedAt - this.createdAt > au ? this.resolvedAt : this.createdAt : this.createdAt : void 0,
|
|
2868
2874
|
finalKeyframe: n,
|
|
2869
2875
|
...s,
|
|
2870
2876
|
keyframes: e
|
|
2871
|
-
}, d = !u &&
|
|
2877
|
+
}, d = !u && ou(h) ? new eu({
|
|
2872
2878
|
...h,
|
|
2873
2879
|
element: h.motionValue.owner.current
|
|
2874
2880
|
}) : new ys(h);
|
|
@@ -2882,7 +2888,7 @@ class au extends gs {
|
|
|
2882
2888
|
});
|
|
2883
2889
|
}
|
|
2884
2890
|
get animation() {
|
|
2885
|
-
return this._animation || (this.keyframeResolver?.resume(),
|
|
2891
|
+
return this._animation || (this.keyframeResolver?.resume(), Kc()), this._animation;
|
|
2886
2892
|
}
|
|
2887
2893
|
get duration() {
|
|
2888
2894
|
return this.animation.duration;
|
|
@@ -2921,21 +2927,21 @@ class au extends gs {
|
|
|
2921
2927
|
this._animation && this.animation.cancel(), this.keyframeResolver?.cancel();
|
|
2922
2928
|
}
|
|
2923
2929
|
}
|
|
2924
|
-
const
|
|
2930
|
+
const cu = (
|
|
2925
2931
|
// eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words
|
|
2926
2932
|
/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u
|
|
2927
2933
|
);
|
|
2928
|
-
function
|
|
2929
|
-
const e =
|
|
2934
|
+
function uu(t) {
|
|
2935
|
+
const e = cu.exec(t);
|
|
2930
2936
|
if (!e)
|
|
2931
2937
|
return [,];
|
|
2932
2938
|
const [, n, s, i] = e;
|
|
2933
2939
|
return [`--${n ?? s}`, i];
|
|
2934
2940
|
}
|
|
2935
|
-
const
|
|
2941
|
+
const fu = 4;
|
|
2936
2942
|
function no(t, e, n = 1) {
|
|
2937
|
-
pt(n <=
|
|
2938
|
-
const [s, i] =
|
|
2943
|
+
pt(n <= fu, `Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`, "max-css-var-depth");
|
|
2944
|
+
const [s, i] = uu(t);
|
|
2939
2945
|
if (!s)
|
|
2940
2946
|
return;
|
|
2941
2947
|
const o = window.getComputedStyle(e).getPropertyValue(s);
|
|
@@ -2956,15 +2962,15 @@ const so = /* @__PURE__ */ new Set([
|
|
|
2956
2962
|
"right",
|
|
2957
2963
|
"bottom",
|
|
2958
2964
|
...Gt
|
|
2959
|
-
]),
|
|
2965
|
+
]), hu = {
|
|
2960
2966
|
test: (t) => t === "auto",
|
|
2961
2967
|
parse: (t) => t
|
|
2962
|
-
}, io = (t) => (e) => e.test(t), ro = [Xt, R, ht,
|
|
2963
|
-
function
|
|
2968
|
+
}, io = (t) => (e) => e.test(t), ro = [Xt, R, ht, wt, nc, ec, hu], ai = (t) => ro.find(io(t));
|
|
2969
|
+
function du(t) {
|
|
2964
2970
|
return typeof t == "number" ? t === 0 : t !== null ? t === "none" || t === "0" || Ar(t) : !0;
|
|
2965
2971
|
}
|
|
2966
|
-
const
|
|
2967
|
-
function
|
|
2972
|
+
const mu = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
|
|
2973
|
+
function pu(t) {
|
|
2968
2974
|
const [e, n] = t.slice(0, -1).split("(");
|
|
2969
2975
|
if (e === "drop-shadow")
|
|
2970
2976
|
return t;
|
|
@@ -2972,30 +2978,30 @@ function mu(t) {
|
|
|
2972
2978
|
if (!s)
|
|
2973
2979
|
return t;
|
|
2974
2980
|
const i = n.replace(s, "");
|
|
2975
|
-
let o =
|
|
2981
|
+
let o = mu.has(e) ? 1 : 0;
|
|
2976
2982
|
return s !== n && (o *= 100), e + "(" + o + i + ")";
|
|
2977
2983
|
}
|
|
2978
|
-
const
|
|
2984
|
+
const gu = /\b([a-z-]*)\(.*?\)/gu, Ln = {
|
|
2979
2985
|
...Pt,
|
|
2980
2986
|
getAnimatableNone: (t) => {
|
|
2981
|
-
const e = t.match(
|
|
2982
|
-
return e ? e.map(
|
|
2987
|
+
const e = t.match(gu);
|
|
2988
|
+
return e ? e.map(pu).join(" ") : t;
|
|
2983
2989
|
}
|
|
2984
2990
|
}, li = {
|
|
2985
2991
|
...Xt,
|
|
2986
2992
|
transform: Math.round
|
|
2987
|
-
},
|
|
2988
|
-
rotate:
|
|
2989
|
-
rotateX:
|
|
2990
|
-
rotateY:
|
|
2991
|
-
rotateZ:
|
|
2992
|
-
scale:
|
|
2993
|
-
scaleX:
|
|
2994
|
-
scaleY:
|
|
2995
|
-
scaleZ:
|
|
2996
|
-
skew:
|
|
2997
|
-
skewX:
|
|
2998
|
-
skewY:
|
|
2993
|
+
}, yu = {
|
|
2994
|
+
rotate: wt,
|
|
2995
|
+
rotateX: wt,
|
|
2996
|
+
rotateY: wt,
|
|
2997
|
+
rotateZ: wt,
|
|
2998
|
+
scale: we,
|
|
2999
|
+
scaleX: we,
|
|
3000
|
+
scaleY: we,
|
|
3001
|
+
scaleZ: we,
|
|
3002
|
+
skew: wt,
|
|
3003
|
+
skewX: wt,
|
|
3004
|
+
skewY: wt,
|
|
2999
3005
|
distance: R,
|
|
3000
3006
|
translateX: R,
|
|
3001
3007
|
translateY: R,
|
|
@@ -3009,7 +3015,7 @@ const pu = /\b([a-z-]*)\(.*?\)/gu, Ln = {
|
|
|
3009
3015
|
originX: Gs,
|
|
3010
3016
|
originY: Gs,
|
|
3011
3017
|
originZ: R
|
|
3012
|
-
},
|
|
3018
|
+
}, ws = {
|
|
3013
3019
|
// Border props
|
|
3014
3020
|
borderWidth: R,
|
|
3015
3021
|
borderTopWidth: R,
|
|
@@ -3045,14 +3051,14 @@ const pu = /\b([a-z-]*)\(.*?\)/gu, Ln = {
|
|
|
3045
3051
|
// Misc
|
|
3046
3052
|
backgroundPositionX: R,
|
|
3047
3053
|
backgroundPositionY: R,
|
|
3048
|
-
...
|
|
3054
|
+
...yu,
|
|
3049
3055
|
zIndex: li,
|
|
3050
3056
|
// SVG
|
|
3051
3057
|
fillOpacity: ae,
|
|
3052
3058
|
strokeOpacity: ae,
|
|
3053
3059
|
numOctaves: li
|
|
3054
|
-
},
|
|
3055
|
-
...
|
|
3060
|
+
}, vu = {
|
|
3061
|
+
...ws,
|
|
3056
3062
|
// Color props
|
|
3057
3063
|
color: B,
|
|
3058
3064
|
backgroundColor: B,
|
|
@@ -3067,17 +3073,17 @@ const pu = /\b([a-z-]*)\(.*?\)/gu, Ln = {
|
|
|
3067
3073
|
borderLeftColor: B,
|
|
3068
3074
|
filter: Ln,
|
|
3069
3075
|
WebkitFilter: Ln
|
|
3070
|
-
}, oo = (t) =>
|
|
3076
|
+
}, oo = (t) => vu[t];
|
|
3071
3077
|
function ao(t, e) {
|
|
3072
3078
|
let n = oo(t);
|
|
3073
3079
|
return n !== Ln && (n = Pt), n.getAnimatableNone ? n.getAnimatableNone(e) : void 0;
|
|
3074
3080
|
}
|
|
3075
|
-
const
|
|
3076
|
-
function
|
|
3081
|
+
const xu = /* @__PURE__ */ new Set(["auto", "none", "0"]);
|
|
3082
|
+
function wu(t, e, n) {
|
|
3077
3083
|
let s = 0, i;
|
|
3078
3084
|
for (; s < t.length && !i; ) {
|
|
3079
3085
|
const o = t[s];
|
|
3080
|
-
typeof o == "string" && !
|
|
3086
|
+
typeof o == "string" && !xu.has(o) && le(o).values.length && (i = t[s]), s++;
|
|
3081
3087
|
}
|
|
3082
3088
|
if (i && n)
|
|
3083
3089
|
for (const o of e)
|
|
@@ -3113,8 +3119,8 @@ class bu extends vs {
|
|
|
3113
3119
|
resolveNoneKeyframes() {
|
|
3114
3120
|
const { unresolvedKeyframes: e, name: n } = this, s = [];
|
|
3115
3121
|
for (let i = 0; i < e.length; i++)
|
|
3116
|
-
(e[i] === null ||
|
|
3117
|
-
s.length &&
|
|
3122
|
+
(e[i] === null || du(e[i])) && s.push(i);
|
|
3123
|
+
s.length && wu(e, s, n);
|
|
3118
3124
|
}
|
|
3119
3125
|
measureInitialState() {
|
|
3120
3126
|
const { element: e, unresolvedKeyframes: n, name: s } = this;
|
|
@@ -3136,7 +3142,7 @@ class bu extends vs {
|
|
|
3136
3142
|
}), this.resolveNoneKeyframes();
|
|
3137
3143
|
}
|
|
3138
3144
|
}
|
|
3139
|
-
function
|
|
3145
|
+
function Tu(t, e, n) {
|
|
3140
3146
|
if (t instanceof EventTarget)
|
|
3141
3147
|
return [t];
|
|
3142
3148
|
if (typeof t == "string") {
|
|
@@ -3150,8 +3156,8 @@ const lo = (t, e) => e && typeof t == "number" ? e.transform(t) : t;
|
|
|
3150
3156
|
function co(t) {
|
|
3151
3157
|
return Cr(t) && "offsetHeight" in t;
|
|
3152
3158
|
}
|
|
3153
|
-
const ci = 30,
|
|
3154
|
-
class
|
|
3159
|
+
const ci = 30, Su = (t) => !isNaN(parseFloat(t));
|
|
3160
|
+
class Pu {
|
|
3155
3161
|
/**
|
|
3156
3162
|
* @param init - The initiating value
|
|
3157
3163
|
* @param config - Optional configuration options
|
|
@@ -3167,7 +3173,7 @@ class Su {
|
|
|
3167
3173
|
}, this.hasAnimated = !1, this.setCurrent(e), this.owner = n.owner;
|
|
3168
3174
|
}
|
|
3169
3175
|
setCurrent(e) {
|
|
3170
|
-
this.current = e, this.updatedAt = q.now(), this.canTrackVelocity === null && e !== void 0 && (this.canTrackVelocity =
|
|
3176
|
+
this.current = e, this.updatedAt = q.now(), this.canTrackVelocity === null && e !== void 0 && (this.canTrackVelocity = Su(this.current));
|
|
3171
3177
|
}
|
|
3172
3178
|
setPrevFrameValue(e = this.current) {
|
|
3173
3179
|
this.prevFrameValue = e, this.prevUpdatedAt = this.updatedAt;
|
|
@@ -3351,16 +3357,16 @@ class Su {
|
|
|
3351
3357
|
}
|
|
3352
3358
|
}
|
|
3353
3359
|
function Ut(t, e) {
|
|
3354
|
-
return new
|
|
3360
|
+
return new Pu(t, e);
|
|
3355
3361
|
}
|
|
3356
|
-
const { schedule:
|
|
3362
|
+
const { schedule: bs } = /* @__PURE__ */ Fr(queueMicrotask, !1), it = {
|
|
3357
3363
|
x: !1,
|
|
3358
3364
|
y: !1
|
|
3359
3365
|
};
|
|
3360
3366
|
function uo() {
|
|
3361
3367
|
return it.x || it.y;
|
|
3362
3368
|
}
|
|
3363
|
-
function
|
|
3369
|
+
function Cu(t) {
|
|
3364
3370
|
return t === "x" || t === "y" ? it[t] ? null : (it[t] = !0, () => {
|
|
3365
3371
|
it[t] = !1;
|
|
3366
3372
|
}) : it.x || it.y ? null : (it.x = it.y = !0, () => {
|
|
@@ -3368,7 +3374,7 @@ function Pu(t) {
|
|
|
3368
3374
|
});
|
|
3369
3375
|
}
|
|
3370
3376
|
function fo(t, e) {
|
|
3371
|
-
const n =
|
|
3377
|
+
const n = Tu(t), s = new AbortController(), i = {
|
|
3372
3378
|
passive: !0,
|
|
3373
3379
|
...e,
|
|
3374
3380
|
signal: s.signal
|
|
@@ -3378,7 +3384,7 @@ function fo(t, e) {
|
|
|
3378
3384
|
function ui(t) {
|
|
3379
3385
|
return !(t.pointerType === "touch" || uo());
|
|
3380
3386
|
}
|
|
3381
|
-
function
|
|
3387
|
+
function Au(t, e, n = {}) {
|
|
3382
3388
|
const [s, i, o] = fo(t, n), r = (a) => {
|
|
3383
3389
|
if (!ui(a))
|
|
3384
3390
|
return;
|
|
@@ -3394,15 +3400,15 @@ function Cu(t, e, n = {}) {
|
|
|
3394
3400
|
a.addEventListener("pointerenter", r, i);
|
|
3395
3401
|
}), o;
|
|
3396
3402
|
}
|
|
3397
|
-
const ho = (t, e) => e ? t === e ? !0 : ho(t, e.parentElement) : !1, Ts = (t) => t.pointerType === "mouse" ? typeof t.button != "number" || t.button <= 0 : t.isPrimary !== !1,
|
|
3403
|
+
const ho = (t, e) => e ? t === e ? !0 : ho(t, e.parentElement) : !1, Ts = (t) => t.pointerType === "mouse" ? typeof t.button != "number" || t.button <= 0 : t.isPrimary !== !1, Ru = /* @__PURE__ */ new Set([
|
|
3398
3404
|
"BUTTON",
|
|
3399
3405
|
"INPUT",
|
|
3400
3406
|
"SELECT",
|
|
3401
3407
|
"TEXTAREA",
|
|
3402
3408
|
"A"
|
|
3403
3409
|
]);
|
|
3404
|
-
function
|
|
3405
|
-
return
|
|
3410
|
+
function Eu(t) {
|
|
3411
|
+
return Ru.has(t.tagName) || t.tabIndex !== -1;
|
|
3406
3412
|
}
|
|
3407
3413
|
const Ae = /* @__PURE__ */ new WeakSet();
|
|
3408
3414
|
function fi(t) {
|
|
@@ -3413,7 +3419,7 @@ function fi(t) {
|
|
|
3413
3419
|
function ln(t, e) {
|
|
3414
3420
|
t.dispatchEvent(new PointerEvent("pointer" + e, { isPrimary: !0, bubbles: !0 }));
|
|
3415
3421
|
}
|
|
3416
|
-
const
|
|
3422
|
+
const Vu = (t, e) => {
|
|
3417
3423
|
const n = t.currentTarget;
|
|
3418
3424
|
if (!n)
|
|
3419
3425
|
return;
|
|
@@ -3431,7 +3437,7 @@ const Eu = (t, e) => {
|
|
|
3431
3437
|
function hi(t) {
|
|
3432
3438
|
return Ts(t) && !uo();
|
|
3433
3439
|
}
|
|
3434
|
-
function
|
|
3440
|
+
function Du(t, e, n = {}) {
|
|
3435
3441
|
const [s, i, o] = fo(t, n), r = (a) => {
|
|
3436
3442
|
const l = a.currentTarget;
|
|
3437
3443
|
if (!hi(a))
|
|
@@ -3447,21 +3453,21 @@ function Vu(t, e, n = {}) {
|
|
|
3447
3453
|
window.addEventListener("pointerup", f, i), window.addEventListener("pointercancel", h, i);
|
|
3448
3454
|
};
|
|
3449
3455
|
return s.forEach((a) => {
|
|
3450
|
-
(n.useGlobalTarget ? window : a).addEventListener("pointerdown", r, i), co(a) && (a.addEventListener("focus", (u) =>
|
|
3456
|
+
(n.useGlobalTarget ? window : a).addEventListener("pointerdown", r, i), co(a) && (a.addEventListener("focus", (u) => Vu(u, i)), !Eu(a) && !a.hasAttribute("tabindex") && (a.tabIndex = 0));
|
|
3451
3457
|
}), o;
|
|
3452
3458
|
}
|
|
3453
3459
|
function mo(t) {
|
|
3454
3460
|
return Cr(t) && "ownerSVGElement" in t;
|
|
3455
3461
|
}
|
|
3456
|
-
function
|
|
3462
|
+
function Mu(t) {
|
|
3457
3463
|
return mo(t) && t.tagName === "svg";
|
|
3458
3464
|
}
|
|
3459
|
-
const Y = (t) => !!(t && t.getVelocity),
|
|
3465
|
+
const Y = (t) => !!(t && t.getVelocity), ku = [...ro, B, Pt], ju = (t) => ku.find(io(t)), Ss = zt({
|
|
3460
3466
|
transformPagePoint: (t) => t,
|
|
3461
3467
|
isStatic: !1,
|
|
3462
3468
|
reducedMotion: "never"
|
|
3463
3469
|
});
|
|
3464
|
-
class
|
|
3470
|
+
class Lu extends C.Component {
|
|
3465
3471
|
getSnapshotBeforeUpdate(e) {
|
|
3466
3472
|
const n = this.props.childRef.current;
|
|
3467
3473
|
if (n && e.isPresent && !this.props.isPresent) {
|
|
@@ -3479,8 +3485,8 @@ class ju extends C.Component {
|
|
|
3479
3485
|
return this.props.children;
|
|
3480
3486
|
}
|
|
3481
3487
|
}
|
|
3482
|
-
function
|
|
3483
|
-
const i = zn(), o =
|
|
3488
|
+
function Ou({ children: t, isPresent: e, anchorX: n, root: s }) {
|
|
3489
|
+
const i = zn(), o = bt(null), r = bt({
|
|
3484
3490
|
width: 0,
|
|
3485
3491
|
height: 0,
|
|
3486
3492
|
top: 0,
|
|
@@ -3507,10 +3513,10 @@ function Lu({ children: t, isPresent: e, anchorX: n, root: s }) {
|
|
|
3507
3513
|
`), () => {
|
|
3508
3514
|
y.contains(m) && y.removeChild(m);
|
|
3509
3515
|
};
|
|
3510
|
-
}, [e]),
|
|
3516
|
+
}, [e]), w.jsx(Lu, { isPresent: e, childRef: o, sizeRef: r, children: C.cloneElement(t, { ref: o }) });
|
|
3511
3517
|
}
|
|
3512
|
-
const
|
|
3513
|
-
const u = ts(
|
|
3518
|
+
const Nu = ({ children: t, initial: e, isPresent: n, onExitComplete: s, custom: i, presenceAffectsLayout: o, mode: r, anchorX: a, root: l }) => {
|
|
3519
|
+
const u = ts(Iu), c = zn();
|
|
3514
3520
|
let f = !0, h = kt(() => (f = !1, {
|
|
3515
3521
|
id: c,
|
|
3516
3522
|
initial: e,
|
|
@@ -3529,9 +3535,9 @@ const Ou = ({ children: t, initial: e, isPresent: n, onExitComplete: s, custom:
|
|
|
3529
3535
|
u.forEach((d, m) => u.set(m, !1));
|
|
3530
3536
|
}, [n]), C.useEffect(() => {
|
|
3531
3537
|
!n && !u.size && s && s();
|
|
3532
|
-
}, [n]), r === "popLayout" && (t =
|
|
3538
|
+
}, [n]), r === "popLayout" && (t = w.jsx(Ou, { isPresent: n, anchorX: a, root: l, children: t })), w.jsx(Ye.Provider, { value: h, children: t });
|
|
3533
3539
|
};
|
|
3534
|
-
function
|
|
3540
|
+
function Iu() {
|
|
3535
3541
|
return /* @__PURE__ */ new Map();
|
|
3536
3542
|
}
|
|
3537
3543
|
function po(t = !0) {
|
|
@@ -3546,35 +3552,35 @@ function po(t = !0) {
|
|
|
3546
3552
|
const r = lr(() => t && s && s(o), [o, s, t]);
|
|
3547
3553
|
return !n && s ? [!1, r] : [!0];
|
|
3548
3554
|
}
|
|
3549
|
-
const
|
|
3555
|
+
const be = (t) => t.key || "";
|
|
3550
3556
|
function di(t) {
|
|
3551
3557
|
const e = [];
|
|
3552
3558
|
return ia.forEach(t, (n) => {
|
|
3553
3559
|
ra(n) && e.push(n);
|
|
3554
3560
|
}), e;
|
|
3555
3561
|
}
|
|
3556
|
-
const
|
|
3557
|
-
const [u, c] = po(r), f = kt(() => di(t), [t]), h = r && !u ? [] : f.map(
|
|
3562
|
+
const Fu = ({ children: t, custom: e, initial: n = !0, onExitComplete: s, presenceAffectsLayout: i = !0, mode: o = "sync", propagate: r = !1, anchorX: a = "left", root: l }) => {
|
|
3563
|
+
const [u, c] = po(r), f = kt(() => di(t), [t]), h = r && !u ? [] : f.map(be), d = bt(!0), m = bt(f), y = ts(() => /* @__PURE__ */ new Map()), [x, v] = vn(f), [b, g] = vn(f);
|
|
3558
3564
|
Sr(() => {
|
|
3559
3565
|
d.current = !1, m.current = f;
|
|
3560
|
-
for (let A = 0; A <
|
|
3561
|
-
const E =
|
|
3566
|
+
for (let A = 0; A < b.length; A++) {
|
|
3567
|
+
const E = be(b[A]);
|
|
3562
3568
|
h.includes(E) ? y.delete(E) : y.get(E) !== !0 && y.set(E, !1);
|
|
3563
3569
|
}
|
|
3564
|
-
}, [
|
|
3570
|
+
}, [b, h.length, h.join("-")]);
|
|
3565
3571
|
const S = [];
|
|
3566
3572
|
if (f !== x) {
|
|
3567
3573
|
let A = [...f];
|
|
3568
|
-
for (let E = 0; E <
|
|
3569
|
-
const P =
|
|
3574
|
+
for (let E = 0; E < b.length; E++) {
|
|
3575
|
+
const P = b[E], M = be(P);
|
|
3570
3576
|
h.includes(M) || (A.splice(E, 0, P), S.push(P));
|
|
3571
3577
|
}
|
|
3572
3578
|
return o === "wait" && S.length && (A = S), g(di(A)), v(f), null;
|
|
3573
3579
|
}
|
|
3574
|
-
process.env.NODE_ENV !== "production" && o === "wait" &&
|
|
3580
|
+
process.env.NODE_ENV !== "production" && o === "wait" && b.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.`);
|
|
3575
3581
|
const { forceRender: T } = z(Qn);
|
|
3576
|
-
return
|
|
3577
|
-
const E =
|
|
3582
|
+
return w.jsx(w.Fragment, { children: b.map((A) => {
|
|
3583
|
+
const E = be(A), P = r && !u ? !1 : f === b || h.includes(E), M = () => {
|
|
3578
3584
|
if (y.has(E))
|
|
3579
3585
|
y.set(E, !0);
|
|
3580
3586
|
else
|
|
@@ -3584,7 +3590,7 @@ const Iu = ({ children: t, custom: e, initial: n = !0, onExitComplete: s, presen
|
|
|
3584
3590
|
_ || (k = !1);
|
|
3585
3591
|
}), k && (T?.(), g(m.current), r && c?.(), s && s());
|
|
3586
3592
|
};
|
|
3587
|
-
return
|
|
3593
|
+
return w.jsx(Nu, { isPresent: P, initial: !d.current || n ? void 0 : !1, custom: e, presenceAffectsLayout: i, mode: o, root: l, onExitComplete: P ? void 0 : M, anchorX: a, children: A }, E);
|
|
3588
3594
|
}) });
|
|
3589
3595
|
}, go = zt({ strict: !1 }), mi = {
|
|
3590
3596
|
animation: [
|
|
@@ -3610,14 +3616,14 @@ for (const t in mi)
|
|
|
3610
3616
|
Kt[t] = {
|
|
3611
3617
|
isEnabled: (e) => mi[t].some((n) => !!e[n])
|
|
3612
3618
|
};
|
|
3613
|
-
function
|
|
3619
|
+
function Bu(t) {
|
|
3614
3620
|
for (const e in t)
|
|
3615
3621
|
Kt[e] = {
|
|
3616
3622
|
...Kt[e],
|
|
3617
3623
|
...t[e]
|
|
3618
3624
|
};
|
|
3619
3625
|
}
|
|
3620
|
-
const
|
|
3626
|
+
const _u = /* @__PURE__ */ new Set([
|
|
3621
3627
|
"animate",
|
|
3622
3628
|
"exit",
|
|
3623
3629
|
"variants",
|
|
@@ -3650,17 +3656,17 @@ const Bu = /* @__PURE__ */ new Set([
|
|
|
3650
3656
|
"viewport"
|
|
3651
3657
|
]);
|
|
3652
3658
|
function Ie(t) {
|
|
3653
|
-
return t.startsWith("while") || t.startsWith("drag") && t !== "draggable" || t.startsWith("layout") || t.startsWith("onTap") || t.startsWith("onPan") || t.startsWith("onLayout") ||
|
|
3659
|
+
return t.startsWith("while") || t.startsWith("drag") && t !== "draggable" || t.startsWith("layout") || t.startsWith("onTap") || t.startsWith("onPan") || t.startsWith("onLayout") || _u.has(t);
|
|
3654
3660
|
}
|
|
3655
3661
|
let yo = (t) => !Ie(t);
|
|
3656
|
-
function
|
|
3662
|
+
function $u(t) {
|
|
3657
3663
|
typeof t == "function" && (yo = (e) => e.startsWith("on") ? !Ie(e) : t(e));
|
|
3658
3664
|
}
|
|
3659
3665
|
try {
|
|
3660
|
-
|
|
3666
|
+
$u(require("@emotion/is-prop-valid").default);
|
|
3661
3667
|
} catch {
|
|
3662
3668
|
}
|
|
3663
|
-
function
|
|
3669
|
+
function Wu(t, e, n) {
|
|
3664
3670
|
const s = {};
|
|
3665
3671
|
for (const i in t)
|
|
3666
3672
|
i === "values" && typeof t.values == "object" || (yo(i) || n === !0 && Ie(i) || !e && !Ie(i) || // If trying to use native HTML drag events, forward drag listeners
|
|
@@ -3689,7 +3695,7 @@ function qe(t) {
|
|
|
3689
3695
|
function vo(t) {
|
|
3690
3696
|
return !!(qe(t) || t.variants);
|
|
3691
3697
|
}
|
|
3692
|
-
function
|
|
3698
|
+
function Uu(t, e) {
|
|
3693
3699
|
if (qe(t)) {
|
|
3694
3700
|
const { initial: n, animate: s } = t;
|
|
3695
3701
|
return {
|
|
@@ -3699,39 +3705,39 @@ function Wu(t, e) {
|
|
|
3699
3705
|
}
|
|
3700
3706
|
return t.inherit !== !1 ? e : {};
|
|
3701
3707
|
}
|
|
3702
|
-
function
|
|
3703
|
-
const { initial: e, animate: n } =
|
|
3708
|
+
function Ku(t) {
|
|
3709
|
+
const { initial: e, animate: n } = Uu(t, z(Xe));
|
|
3704
3710
|
return kt(() => ({ initial: e, animate: n }), [pi(e), pi(n)]);
|
|
3705
3711
|
}
|
|
3706
3712
|
function pi(t) {
|
|
3707
3713
|
return Array.isArray(t) ? t.join(" ") : t;
|
|
3708
3714
|
}
|
|
3709
3715
|
const ue = {};
|
|
3710
|
-
function
|
|
3716
|
+
function zu(t) {
|
|
3711
3717
|
for (const e in t)
|
|
3712
3718
|
ue[e] = t[e], cs(e) && (ue[e].isCSSVariable = !0);
|
|
3713
3719
|
}
|
|
3714
3720
|
function xo(t, { layout: e, layoutId: n }) {
|
|
3715
3721
|
return qt.has(t) || t.startsWith("origin") || (e || n !== void 0) && (!!ue[t] || t === "opacity");
|
|
3716
3722
|
}
|
|
3717
|
-
const
|
|
3723
|
+
const Hu = {
|
|
3718
3724
|
x: "translateX",
|
|
3719
3725
|
y: "translateY",
|
|
3720
3726
|
z: "translateZ",
|
|
3721
3727
|
transformPerspective: "perspective"
|
|
3722
|
-
},
|
|
3723
|
-
function
|
|
3728
|
+
}, Yu = Gt.length;
|
|
3729
|
+
function Xu(t, e, n) {
|
|
3724
3730
|
let s = "", i = !0;
|
|
3725
|
-
for (let o = 0; o <
|
|
3731
|
+
for (let o = 0; o < Yu; o++) {
|
|
3726
3732
|
const r = Gt[o], a = t[r];
|
|
3727
3733
|
if (a === void 0)
|
|
3728
3734
|
continue;
|
|
3729
3735
|
let l = !0;
|
|
3730
3736
|
if (typeof a == "number" ? l = a === (r.startsWith("scale") ? 1 : 0) : l = parseFloat(a) === 0, !l || n) {
|
|
3731
|
-
const u = lo(a,
|
|
3737
|
+
const u = lo(a, ws[r]);
|
|
3732
3738
|
if (!l) {
|
|
3733
3739
|
i = !1;
|
|
3734
|
-
const c =
|
|
3740
|
+
const c = Hu[r] || r;
|
|
3735
3741
|
s += `${c}(${u}) `;
|
|
3736
3742
|
}
|
|
3737
3743
|
n && (e[r] = u);
|
|
@@ -3751,11 +3757,11 @@ function As(t, e, n) {
|
|
|
3751
3757
|
i[l] = u;
|
|
3752
3758
|
continue;
|
|
3753
3759
|
} else {
|
|
3754
|
-
const c = lo(u,
|
|
3760
|
+
const c = lo(u, ws[l]);
|
|
3755
3761
|
l.startsWith("origin") ? (a = !0, o[l] = c) : s[l] = c;
|
|
3756
3762
|
}
|
|
3757
3763
|
}
|
|
3758
|
-
if (e.transform || (r || n ? s.transform =
|
|
3764
|
+
if (e.transform || (r || n ? s.transform = Xu(e, t.transform, n) : s.transform && (s.transform = "none")), a) {
|
|
3759
3765
|
const { originX: l = "50%", originY: u = "50%", originZ: c = 0 } = o;
|
|
3760
3766
|
s.transformOrigin = `${l} ${u} ${c}`;
|
|
3761
3767
|
}
|
|
@@ -3766,39 +3772,39 @@ const Rs = () => ({
|
|
|
3766
3772
|
transformOrigin: {},
|
|
3767
3773
|
vars: {}
|
|
3768
3774
|
});
|
|
3769
|
-
function
|
|
3775
|
+
function wo(t, e, n) {
|
|
3770
3776
|
for (const s in e)
|
|
3771
3777
|
!Y(e[s]) && !xo(s, n) && (t[s] = e[s]);
|
|
3772
3778
|
}
|
|
3773
|
-
function
|
|
3779
|
+
function Gu({ transformTemplate: t }, e) {
|
|
3774
3780
|
return kt(() => {
|
|
3775
3781
|
const n = Rs();
|
|
3776
3782
|
return As(n, e, t), Object.assign({}, n.vars, n.style);
|
|
3777
3783
|
}, [e]);
|
|
3778
3784
|
}
|
|
3779
|
-
function
|
|
3785
|
+
function qu(t, e) {
|
|
3780
3786
|
const n = t.style || {}, s = {};
|
|
3781
|
-
return
|
|
3787
|
+
return wo(s, n, t), Object.assign(s, Gu(t, e)), s;
|
|
3782
3788
|
}
|
|
3783
|
-
function
|
|
3784
|
-
const n = {}, s =
|
|
3789
|
+
function Zu(t, e) {
|
|
3790
|
+
const n = {}, s = qu(t, e);
|
|
3785
3791
|
return t.drag && t.dragListener !== !1 && (n.draggable = !1, s.userSelect = s.WebkitUserSelect = s.WebkitTouchCallout = "none", s.touchAction = t.drag === !0 ? "none" : `pan-${t.drag === "x" ? "y" : "x"}`), t.tabIndex === void 0 && (t.onTap || t.onTapStart || t.whileTap) && (n.tabIndex = 0), n.style = s, n;
|
|
3786
3792
|
}
|
|
3787
|
-
const
|
|
3793
|
+
const Ju = {
|
|
3788
3794
|
offset: "stroke-dashoffset",
|
|
3789
3795
|
array: "stroke-dasharray"
|
|
3790
|
-
},
|
|
3796
|
+
}, Qu = {
|
|
3791
3797
|
offset: "strokeDashoffset",
|
|
3792
3798
|
array: "strokeDasharray"
|
|
3793
3799
|
};
|
|
3794
|
-
function
|
|
3800
|
+
function tf(t, e, n = 1, s = 0, i = !0) {
|
|
3795
3801
|
t.pathLength = 1;
|
|
3796
|
-
const o = i ?
|
|
3802
|
+
const o = i ? Ju : Qu;
|
|
3797
3803
|
t[o.offset] = R.transform(-s);
|
|
3798
3804
|
const r = R.transform(e), a = R.transform(n);
|
|
3799
3805
|
t[o.array] = `${r} ${a}`;
|
|
3800
3806
|
}
|
|
3801
|
-
function
|
|
3807
|
+
function bo(t, {
|
|
3802
3808
|
attrX: e,
|
|
3803
3809
|
attrY: n,
|
|
3804
3810
|
attrScale: s,
|
|
@@ -3814,27 +3820,27 @@ function wo(t, {
|
|
|
3814
3820
|
}
|
|
3815
3821
|
t.attrs = t.style, t.style = {};
|
|
3816
3822
|
const { attrs: f, style: h } = t;
|
|
3817
|
-
f.transform && (h.transform = f.transform, delete f.transform), (h.transform || f.transformOrigin) && (h.transformOrigin = f.transformOrigin ?? "50% 50%", delete f.transformOrigin), h.transform && (h.transformBox = c?.transformBox ?? "fill-box", delete f.transformBox), e !== void 0 && (f.x = e), n !== void 0 && (f.y = n), s !== void 0 && (f.scale = s), i !== void 0 &&
|
|
3823
|
+
f.transform && (h.transform = f.transform, delete f.transform), (h.transform || f.transformOrigin) && (h.transformOrigin = f.transformOrigin ?? "50% 50%", delete f.transformOrigin), h.transform && (h.transformBox = c?.transformBox ?? "fill-box", delete f.transformBox), e !== void 0 && (f.x = e), n !== void 0 && (f.y = n), s !== void 0 && (f.scale = s), i !== void 0 && tf(f, i, o, r, !1);
|
|
3818
3824
|
}
|
|
3819
3825
|
const To = () => ({
|
|
3820
3826
|
...Rs(),
|
|
3821
3827
|
attrs: {}
|
|
3822
3828
|
}), So = (t) => typeof t == "string" && t.toLowerCase() === "svg";
|
|
3823
|
-
function
|
|
3829
|
+
function ef(t, e, n, s) {
|
|
3824
3830
|
const i = kt(() => {
|
|
3825
3831
|
const o = To();
|
|
3826
|
-
return
|
|
3832
|
+
return bo(o, e, So(s), t.transformTemplate, t.style), {
|
|
3827
3833
|
...o.attrs,
|
|
3828
3834
|
style: { ...o.style }
|
|
3829
3835
|
};
|
|
3830
3836
|
}, [e]);
|
|
3831
3837
|
if (t.style) {
|
|
3832
3838
|
const o = {};
|
|
3833
|
-
|
|
3839
|
+
wo(o, t.style, t), i.style = { ...o, ...i.style };
|
|
3834
3840
|
}
|
|
3835
3841
|
return i;
|
|
3836
3842
|
}
|
|
3837
|
-
const
|
|
3843
|
+
const nf = [
|
|
3838
3844
|
"animate",
|
|
3839
3845
|
"circle",
|
|
3840
3846
|
"defs",
|
|
@@ -3874,15 +3880,15 @@ function Es(t) {
|
|
|
3874
3880
|
/**
|
|
3875
3881
|
* If it's in our list of lowercase SVG tags, it's an SVG component
|
|
3876
3882
|
*/
|
|
3877
|
-
!!(
|
|
3883
|
+
!!(nf.indexOf(t) > -1 || /**
|
|
3878
3884
|
* If it contains a capital letter, it's an SVG component
|
|
3879
3885
|
*/
|
|
3880
3886
|
/[A-Z]/u.test(t))
|
|
3881
3887
|
)
|
|
3882
3888
|
);
|
|
3883
3889
|
}
|
|
3884
|
-
function
|
|
3885
|
-
const a = (Es(t) ?
|
|
3890
|
+
function sf(t, e, n, { latestValues: s }, i, o = !1) {
|
|
3891
|
+
const a = (Es(t) ? ef : Zu)(e, s, i, t), l = Wu(e, typeof t == "string", o), u = t !== cr ? { ...l, ...a, ref: n } : {}, { children: c } = e, f = kt(() => Y(c) ? c.get() : c, [c]);
|
|
3886
3892
|
return Se(t, {
|
|
3887
3893
|
...u,
|
|
3888
3894
|
children: f
|
|
@@ -3908,13 +3914,13 @@ function Vs(t, e, n, s) {
|
|
|
3908
3914
|
function Re(t) {
|
|
3909
3915
|
return Y(t) ? t.get() : t;
|
|
3910
3916
|
}
|
|
3911
|
-
function
|
|
3917
|
+
function rf({ scrapeMotionValuesFromProps: t, createRenderState: e }, n, s, i) {
|
|
3912
3918
|
return {
|
|
3913
|
-
latestValues:
|
|
3919
|
+
latestValues: of(n, s, i, t),
|
|
3914
3920
|
renderState: e()
|
|
3915
3921
|
};
|
|
3916
3922
|
}
|
|
3917
|
-
function
|
|
3923
|
+
function of(t, e, n, s) {
|
|
3918
3924
|
const i = {}, o = s(t, {});
|
|
3919
3925
|
for (const h in o)
|
|
3920
3926
|
i[h] = Re(o[h]);
|
|
@@ -3930,23 +3936,23 @@ function rf(t, e, n, s) {
|
|
|
3930
3936
|
const m = Vs(t, h[d]);
|
|
3931
3937
|
if (m) {
|
|
3932
3938
|
const { transitionEnd: y, transition: x, ...v } = m;
|
|
3933
|
-
for (const
|
|
3934
|
-
let g = v[
|
|
3939
|
+
for (const b in v) {
|
|
3940
|
+
let g = v[b];
|
|
3935
3941
|
if (Array.isArray(g)) {
|
|
3936
3942
|
const S = c ? g.length - 1 : 0;
|
|
3937
3943
|
g = g[S];
|
|
3938
3944
|
}
|
|
3939
|
-
g !== null && (i[
|
|
3945
|
+
g !== null && (i[b] = g);
|
|
3940
3946
|
}
|
|
3941
|
-
for (const
|
|
3942
|
-
i[
|
|
3947
|
+
for (const b in y)
|
|
3948
|
+
i[b] = y[b];
|
|
3943
3949
|
}
|
|
3944
3950
|
}
|
|
3945
3951
|
}
|
|
3946
3952
|
return i;
|
|
3947
3953
|
}
|
|
3948
3954
|
const Po = (t) => (e, n) => {
|
|
3949
|
-
const s = z(Xe), i = z(Ye), o = () =>
|
|
3955
|
+
const s = z(Xe), i = z(Ye), o = () => rf(t, e, s, i);
|
|
3950
3956
|
return n ? o() : ts(o);
|
|
3951
3957
|
};
|
|
3952
3958
|
function Ds(t, e, n) {
|
|
@@ -3955,7 +3961,7 @@ function Ds(t, e, n) {
|
|
|
3955
3961
|
(Y(s[o]) || e.style && Y(e.style[o]) || xo(o, t) || n?.getValue(o)?.liveStyle !== void 0) && (i[o] = s[o]);
|
|
3956
3962
|
return i;
|
|
3957
3963
|
}
|
|
3958
|
-
const
|
|
3964
|
+
const af = /* @__PURE__ */ Po({
|
|
3959
3965
|
scrapeMotionValuesFromProps: Ds,
|
|
3960
3966
|
createRenderState: Rs
|
|
3961
3967
|
});
|
|
@@ -3968,14 +3974,14 @@ function Co(t, e, n) {
|
|
|
3968
3974
|
}
|
|
3969
3975
|
return s;
|
|
3970
3976
|
}
|
|
3971
|
-
const
|
|
3977
|
+
const lf = /* @__PURE__ */ Po({
|
|
3972
3978
|
scrapeMotionValuesFromProps: Co,
|
|
3973
3979
|
createRenderState: To
|
|
3974
|
-
}),
|
|
3980
|
+
}), cf = Symbol.for("motionComponentSymbol");
|
|
3975
3981
|
function Nt(t) {
|
|
3976
3982
|
return t && typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "current");
|
|
3977
3983
|
}
|
|
3978
|
-
function
|
|
3984
|
+
function uf(t, e, n) {
|
|
3979
3985
|
return lr(
|
|
3980
3986
|
(s) => {
|
|
3981
3987
|
s && t.onMount && t.onMount(s), e && (s ? e.mount(s) : e.unmount()), n && (typeof n == "function" ? n(s) : Nt(n) && (n.current = s));
|
|
@@ -3988,9 +3994,9 @@ function cf(t, e, n) {
|
|
|
3988
3994
|
[e]
|
|
3989
3995
|
);
|
|
3990
3996
|
}
|
|
3991
|
-
const Ms = (t) => t.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(),
|
|
3992
|
-
function
|
|
3993
|
-
const { visualElement: o } = z(Xe), r = z(go), a = z(Ye), l = z(Ss).reducedMotion, u =
|
|
3997
|
+
const Ms = (t) => t.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), ff = "framerAppearId", Ao = "data-" + Ms(ff), Ro = zt({});
|
|
3998
|
+
function hf(t, e, n, s, i) {
|
|
3999
|
+
const { visualElement: o } = z(Xe), r = z(go), a = z(Ye), l = z(Ss).reducedMotion, u = bt(null);
|
|
3994
4000
|
s = s || r.renderer, !u.current && s && (u.current = s(t, {
|
|
3995
4001
|
visualState: e,
|
|
3996
4002
|
parent: o,
|
|
@@ -4000,12 +4006,12 @@ function ff(t, e, n, s, i) {
|
|
|
4000
4006
|
reducedMotionConfig: l
|
|
4001
4007
|
}));
|
|
4002
4008
|
const c = u.current, f = z(Ro);
|
|
4003
|
-
c && !c.projection && i && (c.type === "html" || c.type === "svg") &&
|
|
4004
|
-
const h =
|
|
4009
|
+
c && !c.projection && i && (c.type === "html" || c.type === "svg") && df(u.current, n, i, f);
|
|
4010
|
+
const h = bt(!1);
|
|
4005
4011
|
ar(() => {
|
|
4006
4012
|
c && h.current && c.update(n, a);
|
|
4007
4013
|
});
|
|
4008
|
-
const d = n[Ao], m =
|
|
4014
|
+
const d = n[Ao], m = bt(!!d && !window.MotionHandoffIsComplete?.(d) && window.MotionHasOptimisedAnimation?.(d));
|
|
4009
4015
|
return Sr(() => {
|
|
4010
4016
|
c && (h.current = !0, window.MotionIsMounted = !0, c.updateFeatures(), c.scheduleRenderMicrotask(), m.current && c.animationState && c.animationState.animateChanges());
|
|
4011
4017
|
}), Be(() => {
|
|
@@ -4014,7 +4020,7 @@ function ff(t, e, n, s, i) {
|
|
|
4014
4020
|
}), m.current = !1), c.enteringChildren = void 0);
|
|
4015
4021
|
}), c;
|
|
4016
4022
|
}
|
|
4017
|
-
function
|
|
4023
|
+
function df(t, e, n, s) {
|
|
4018
4024
|
const { layoutId: i, layout: o, drag: r, dragConstraints: a, layoutScroll: l, layoutRoot: u, layoutCrossfade: c } = e;
|
|
4019
4025
|
t.projection = new n(t.latestValues, e["data-framer-portal-id"] ? void 0 : Eo(t.parent)), t.projection.setOptions({
|
|
4020
4026
|
layoutId: i,
|
|
@@ -4040,38 +4046,38 @@ function Eo(t) {
|
|
|
4040
4046
|
return t.options.allowProjection !== !1 ? t.projection : Eo(t.parent);
|
|
4041
4047
|
}
|
|
4042
4048
|
function cn(t, { forwardMotionProps: e = !1 } = {}, n, s) {
|
|
4043
|
-
n &&
|
|
4044
|
-
const i = Es(t) ?
|
|
4049
|
+
n && Bu(n);
|
|
4050
|
+
const i = Es(t) ? lf : af;
|
|
4045
4051
|
function o(a, l) {
|
|
4046
4052
|
let u;
|
|
4047
4053
|
const c = {
|
|
4048
4054
|
...z(Ss),
|
|
4049
4055
|
...a,
|
|
4050
|
-
layoutId:
|
|
4051
|
-
}, { isStatic: f } = c, h =
|
|
4056
|
+
layoutId: mf(a)
|
|
4057
|
+
}, { isStatic: f } = c, h = Ku(a), d = i(a, f);
|
|
4052
4058
|
if (!f && es) {
|
|
4053
|
-
|
|
4054
|
-
const m =
|
|
4055
|
-
u = m.MeasureLayout, h.visualElement =
|
|
4059
|
+
pf(c, n);
|
|
4060
|
+
const m = gf(c);
|
|
4061
|
+
u = m.MeasureLayout, h.visualElement = hf(t, d, c, s, m.ProjectionNode);
|
|
4056
4062
|
}
|
|
4057
|
-
return
|
|
4063
|
+
return w.jsxs(Xe.Provider, { value: h, children: [u && h.visualElement ? w.jsx(u, { visualElement: h.visualElement, ...c }) : null, sf(t, a, uf(d, h.visualElement, l), d, f, e)] });
|
|
4058
4064
|
}
|
|
4059
4065
|
o.displayName = `motion.${typeof t == "string" ? t : `create(${t.displayName ?? t.name ?? ""})`}`;
|
|
4060
4066
|
const r = or(o);
|
|
4061
|
-
return r[
|
|
4067
|
+
return r[cf] = t, r;
|
|
4062
4068
|
}
|
|
4063
|
-
function
|
|
4069
|
+
function mf({ layoutId: t }) {
|
|
4064
4070
|
const e = z(Qn).id;
|
|
4065
4071
|
return e && t !== void 0 ? e + "-" + t : t;
|
|
4066
4072
|
}
|
|
4067
|
-
function
|
|
4073
|
+
function pf(t, e) {
|
|
4068
4074
|
const n = z(go).strict;
|
|
4069
4075
|
if (process.env.NODE_ENV !== "production" && e && n) {
|
|
4070
4076
|
const s = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";
|
|
4071
4077
|
t.ignoreStrict ? Yt(!1, s, "lazy-strict-mode") : pt(!1, s, "lazy-strict-mode");
|
|
4072
4078
|
}
|
|
4073
4079
|
}
|
|
4074
|
-
function
|
|
4080
|
+
function gf(t) {
|
|
4075
4081
|
const { drag: e, layout: n } = Kt;
|
|
4076
4082
|
if (!e && !n)
|
|
4077
4083
|
return {};
|
|
@@ -4081,7 +4087,7 @@ function pf(t) {
|
|
|
4081
4087
|
ProjectionNode: s.ProjectionNode
|
|
4082
4088
|
};
|
|
4083
4089
|
}
|
|
4084
|
-
function
|
|
4090
|
+
function yf(t, e) {
|
|
4085
4091
|
if (typeof Proxy > "u")
|
|
4086
4092
|
return cn;
|
|
4087
4093
|
const n = /* @__PURE__ */ new Map(), s = (o, r) => cn(o, r, t, e), i = (o, r) => (process.env.NODE_ENV !== "production" && os(!1, "motion() is deprecated. Use motion.create() instead."), s(o, r));
|
|
@@ -4100,10 +4106,10 @@ function Vo({ top: t, left: e, right: n, bottom: s }) {
|
|
|
4100
4106
|
y: { min: t, max: s }
|
|
4101
4107
|
};
|
|
4102
4108
|
}
|
|
4103
|
-
function
|
|
4109
|
+
function vf({ x: t, y: e }) {
|
|
4104
4110
|
return { top: e.min, right: t.max, bottom: e.max, left: t.min };
|
|
4105
4111
|
}
|
|
4106
|
-
function
|
|
4112
|
+
function xf(t, e) {
|
|
4107
4113
|
if (!e)
|
|
4108
4114
|
return t;
|
|
4109
4115
|
const n = e({ x: t.left, y: t.top }), s = e({ x: t.right, y: t.bottom });
|
|
@@ -4142,8 +4148,8 @@ function Nn(t, e = 0, n = 1, s, i) {
|
|
|
4142
4148
|
function Mo(t, { x: e, y: n }) {
|
|
4143
4149
|
Nn(t.x, e.translate, e.scale, e.originPoint), Nn(t.y, n.translate, n.scale, n.originPoint);
|
|
4144
4150
|
}
|
|
4145
|
-
const xi = 0.999999999999,
|
|
4146
|
-
function
|
|
4151
|
+
const xi = 0.999999999999, wi = 1.0000000000001;
|
|
4152
|
+
function wf(t, e, n, s = !1) {
|
|
4147
4153
|
const i = n.length;
|
|
4148
4154
|
if (!i)
|
|
4149
4155
|
return;
|
|
@@ -4157,20 +4163,20 @@ function xf(t, e, n, s = !1) {
|
|
|
4157
4163
|
y: -o.scroll.offset.y
|
|
4158
4164
|
}), r && (e.x *= r.x.scale, e.y *= r.y.scale, Mo(t, r)), s && Rt(o.latestValues) && Ft(t, o.latestValues));
|
|
4159
4165
|
}
|
|
4160
|
-
e.x <
|
|
4166
|
+
e.x < wi && e.x > xi && (e.x = 1), e.y < wi && e.y > xi && (e.y = 1);
|
|
4161
4167
|
}
|
|
4162
4168
|
function It(t, e) {
|
|
4163
4169
|
t.min = t.min + e, t.max = t.max + e;
|
|
4164
4170
|
}
|
|
4165
|
-
function
|
|
4171
|
+
function bi(t, e, n, s, i = 0.5) {
|
|
4166
4172
|
const o = I(t.min, t.max, i);
|
|
4167
4173
|
Nn(t, e, n, o, s);
|
|
4168
4174
|
}
|
|
4169
4175
|
function Ft(t, e) {
|
|
4170
|
-
|
|
4176
|
+
bi(t.x, e.x, e.scaleX, e.scale, e.originX), bi(t.y, e.y, e.scaleY, e.scale, e.originY);
|
|
4171
4177
|
}
|
|
4172
4178
|
function ko(t, e) {
|
|
4173
|
-
return Vo(
|
|
4179
|
+
return Vo(xf(t.getBoundingClientRect(), e));
|
|
4174
4180
|
}
|
|
4175
4181
|
function bf(t, e, n) {
|
|
4176
4182
|
const s = ko(t, n), { scroll: i } = e;
|
|
@@ -4188,7 +4194,7 @@ const Ti = () => ({
|
|
|
4188
4194
|
x: Si(),
|
|
4189
4195
|
y: Si()
|
|
4190
4196
|
}), In = { current: null }, jo = { current: !1 };
|
|
4191
|
-
function
|
|
4197
|
+
function Tf() {
|
|
4192
4198
|
if (jo.current = !0, !!es)
|
|
4193
4199
|
if (window.matchMedia) {
|
|
4194
4200
|
const t = window.matchMedia("(prefers-reduced-motion)"), e = () => In.current = t.matches;
|
|
@@ -4196,8 +4202,8 @@ function wf() {
|
|
|
4196
4202
|
} else
|
|
4197
4203
|
In.current = !1;
|
|
4198
4204
|
}
|
|
4199
|
-
const
|
|
4200
|
-
function
|
|
4205
|
+
const Sf = /* @__PURE__ */ new WeakMap();
|
|
4206
|
+
function Pf(t, e, n) {
|
|
4201
4207
|
for (const s in e) {
|
|
4202
4208
|
const i = e[s], o = n[s];
|
|
4203
4209
|
if (Y(i))
|
|
@@ -4226,7 +4232,7 @@ const Pi = [
|
|
|
4226
4232
|
"LayoutAnimationStart",
|
|
4227
4233
|
"LayoutAnimationComplete"
|
|
4228
4234
|
];
|
|
4229
|
-
class
|
|
4235
|
+
class Cf {
|
|
4230
4236
|
/**
|
|
4231
4237
|
* This method takes React props and returns found MotionValues. For example, HTML
|
|
4232
4238
|
* MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.
|
|
@@ -4253,7 +4259,7 @@ class Pf {
|
|
|
4253
4259
|
}
|
|
4254
4260
|
}
|
|
4255
4261
|
mount(e) {
|
|
4256
|
-
this.current = e,
|
|
4262
|
+
this.current = e, Sf.set(e, this), this.projection && !this.projection.instance && this.projection.mount(e), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((n, s) => this.bindToMotionValue(s, n)), jo.current || Tf(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : In.current, process.env.NODE_ENV !== "production" && os(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected.", "reduced-motion-disabled"), this.parent?.addChild(this), this.update(this.props, this.presenceContext);
|
|
4257
4263
|
}
|
|
4258
4264
|
unmount() {
|
|
4259
4265
|
this.projection && this.projection.unmount(), St(this.notifyUpdate), St(this.render), this.valueSubscriptions.forEach((e) => e()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent?.removeChild(this);
|
|
@@ -4328,7 +4334,7 @@ class Pf {
|
|
|
4328
4334
|
const o = "on" + i, r = e[o];
|
|
4329
4335
|
r && (this.propEventSubscriptions[i] = this.on(i, r));
|
|
4330
4336
|
}
|
|
4331
|
-
this.prevMotionValues =
|
|
4337
|
+
this.prevMotionValues = Pf(this, this.scrapeMotionValuesFromProps(e, this.prevProps, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
|
|
4332
4338
|
}
|
|
4333
4339
|
getProps() {
|
|
4334
4340
|
return this.props;
|
|
@@ -4393,7 +4399,7 @@ class Pf {
|
|
|
4393
4399
|
*/
|
|
4394
4400
|
readValue(e, n) {
|
|
4395
4401
|
let s = this.latestValues[e] !== void 0 || !this.current ? this.latestValues[e] : this.getBaseTargetFromProps(this.props, e) ?? this.readValueFromInstance(this.current, e, this.options);
|
|
4396
|
-
return s != null && (typeof s == "string" && (Pr(s) || Ar(s)) ? s = parseFloat(s) : !
|
|
4402
|
+
return s != null && (typeof s == "string" && (Pr(s) || Ar(s)) ? s = parseFloat(s) : !ju(s) && Pt.test(n) && (s = ao(e, n)), this.setBaseTarget(e, Y(s) ? s.get() : s)), Y(s) ? s.get() : s;
|
|
4397
4403
|
}
|
|
4398
4404
|
/**
|
|
4399
4405
|
* Set the base target to later animate back to. This is currently
|
|
@@ -4425,10 +4431,10 @@ class Pf {
|
|
|
4425
4431
|
this.events[e] && this.events[e].notify(...n);
|
|
4426
4432
|
}
|
|
4427
4433
|
scheduleRenderMicrotask() {
|
|
4428
|
-
|
|
4434
|
+
bs.render(this.render);
|
|
4429
4435
|
}
|
|
4430
4436
|
}
|
|
4431
|
-
class Lo extends
|
|
4437
|
+
class Lo extends Cf {
|
|
4432
4438
|
constructor() {
|
|
4433
4439
|
super(...arguments), this.KeyframeResolver = bu;
|
|
4434
4440
|
}
|
|
@@ -4458,18 +4464,18 @@ function Oo(t, { style: e, vars: n }, s, i) {
|
|
|
4458
4464
|
for (r in n)
|
|
4459
4465
|
o.setProperty(r, n[r]);
|
|
4460
4466
|
}
|
|
4461
|
-
function
|
|
4467
|
+
function Af(t) {
|
|
4462
4468
|
return window.getComputedStyle(t);
|
|
4463
4469
|
}
|
|
4464
|
-
class
|
|
4470
|
+
class Rf extends Lo {
|
|
4465
4471
|
constructor() {
|
|
4466
4472
|
super(...arguments), this.type = "html", this.renderInstance = Oo;
|
|
4467
4473
|
}
|
|
4468
4474
|
readValueFromInstance(e, n) {
|
|
4469
4475
|
if (qt.has(n))
|
|
4470
|
-
return this.projection?.isProjecting ? En(n) :
|
|
4476
|
+
return this.projection?.isProjecting ? En(n) : Bc(e, n);
|
|
4471
4477
|
{
|
|
4472
|
-
const s =
|
|
4478
|
+
const s = Af(e), i = (cs(n) ? s.getPropertyValue(n) : s[n]) || 0;
|
|
4473
4479
|
return typeof i == "string" ? i.trim() : i;
|
|
4474
4480
|
}
|
|
4475
4481
|
}
|
|
@@ -4508,12 +4514,12 @@ const No = /* @__PURE__ */ new Set([
|
|
|
4508
4514
|
"textLength",
|
|
4509
4515
|
"lengthAdjust"
|
|
4510
4516
|
]);
|
|
4511
|
-
function
|
|
4517
|
+
function Ef(t, e, n, s) {
|
|
4512
4518
|
Oo(t, e, void 0, s);
|
|
4513
4519
|
for (const i in e.attrs)
|
|
4514
4520
|
t.setAttribute(No.has(i) ? i : Ms(i), e.attrs[i]);
|
|
4515
4521
|
}
|
|
4516
|
-
class
|
|
4522
|
+
class Vf extends Lo {
|
|
4517
4523
|
constructor() {
|
|
4518
4524
|
super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = F;
|
|
4519
4525
|
}
|
|
@@ -4531,16 +4537,16 @@ class Ef extends Lo {
|
|
|
4531
4537
|
return Co(e, n, s);
|
|
4532
4538
|
}
|
|
4533
4539
|
build(e, n, s) {
|
|
4534
|
-
|
|
4540
|
+
bo(e, n, this.isSVGTag, s.transformTemplate, s.style);
|
|
4535
4541
|
}
|
|
4536
4542
|
renderInstance(e, n, s, i) {
|
|
4537
|
-
|
|
4543
|
+
Ef(e, n, s, i);
|
|
4538
4544
|
}
|
|
4539
4545
|
mount(e) {
|
|
4540
4546
|
this.isSVGTag = So(e.tagName), super.mount(e);
|
|
4541
4547
|
}
|
|
4542
4548
|
}
|
|
4543
|
-
const
|
|
4549
|
+
const Df = (t, e) => Es(t) ? new Vf(e) : new Rf(e, {
|
|
4544
4550
|
allowProjection: t !== cr
|
|
4545
4551
|
});
|
|
4546
4552
|
function $t(t, e, n) {
|
|
@@ -4548,27 +4554,27 @@ function $t(t, e, n) {
|
|
|
4548
4554
|
return Vs(s, e, n !== void 0 ? n : s.custom, t);
|
|
4549
4555
|
}
|
|
4550
4556
|
const Fn = (t) => Array.isArray(t);
|
|
4551
|
-
function
|
|
4557
|
+
function Mf(t, e, n) {
|
|
4552
4558
|
t.hasValue(e) ? t.getValue(e).set(n) : t.addValue(e, Ut(n));
|
|
4553
4559
|
}
|
|
4554
|
-
function
|
|
4560
|
+
function kf(t) {
|
|
4555
4561
|
return Fn(t) ? t[t.length - 1] || 0 : t;
|
|
4556
4562
|
}
|
|
4557
|
-
function
|
|
4563
|
+
function jf(t, e) {
|
|
4558
4564
|
const n = $t(t, e);
|
|
4559
4565
|
let { transitionEnd: s = {}, transition: i = {}, ...o } = n || {};
|
|
4560
4566
|
o = { ...o, ...s };
|
|
4561
4567
|
for (const r in o) {
|
|
4562
|
-
const a =
|
|
4563
|
-
|
|
4568
|
+
const a = kf(o[r]);
|
|
4569
|
+
Mf(t, r, a);
|
|
4564
4570
|
}
|
|
4565
4571
|
}
|
|
4566
|
-
function
|
|
4572
|
+
function Lf(t) {
|
|
4567
4573
|
return !!(Y(t) && t.add);
|
|
4568
4574
|
}
|
|
4569
4575
|
function Bn(t, e) {
|
|
4570
4576
|
const n = t.getValue("willChange");
|
|
4571
|
-
if (
|
|
4577
|
+
if (Lf(n))
|
|
4572
4578
|
return n.add(e);
|
|
4573
4579
|
if (!n && gt.WillChange) {
|
|
4574
4580
|
const s = new gt.WillChange("auto");
|
|
@@ -4578,30 +4584,30 @@ function Bn(t, e) {
|
|
|
4578
4584
|
function Io(t) {
|
|
4579
4585
|
return t.props[Ao];
|
|
4580
4586
|
}
|
|
4581
|
-
const
|
|
4582
|
-
function
|
|
4583
|
-
const i = t.filter(
|
|
4587
|
+
const Of = (t) => t !== null;
|
|
4588
|
+
function Nf(t, { repeat: e, repeatType: n = "loop" }, s) {
|
|
4589
|
+
const i = t.filter(Of), o = e && n !== "loop" && e % 2 === 1 ? 0 : i.length - 1;
|
|
4584
4590
|
return i[o];
|
|
4585
4591
|
}
|
|
4586
|
-
const
|
|
4592
|
+
const If = {
|
|
4587
4593
|
type: "spring",
|
|
4588
4594
|
stiffness: 500,
|
|
4589
4595
|
damping: 25,
|
|
4590
4596
|
restSpeed: 10
|
|
4591
|
-
},
|
|
4597
|
+
}, Ff = (t) => ({
|
|
4592
4598
|
type: "spring",
|
|
4593
4599
|
stiffness: 550,
|
|
4594
4600
|
damping: t === 0 ? 2 * Math.sqrt(550) : 30,
|
|
4595
4601
|
restSpeed: 10
|
|
4596
|
-
}),
|
|
4602
|
+
}), Bf = {
|
|
4597
4603
|
type: "keyframes",
|
|
4598
4604
|
duration: 0.8
|
|
4599
|
-
},
|
|
4605
|
+
}, _f = {
|
|
4600
4606
|
type: "keyframes",
|
|
4601
4607
|
ease: [0.25, 0.1, 0.35, 1],
|
|
4602
4608
|
duration: 0.3
|
|
4603
|
-
},
|
|
4604
|
-
function
|
|
4609
|
+
}, $f = (t, { keyframes: e }) => e.length > 2 ? Bf : qt.has(t) ? t.startsWith("scale") ? Ff(e[1]) : If : _f;
|
|
4610
|
+
function Wf({ when: t, delay: e, delayChildren: n, staggerChildren: s, staggerDirection: i, repeat: o, repeatType: r, repeatDelay: a, from: l, elapsed: u, ...c }) {
|
|
4605
4611
|
return !!Object.keys(c).length;
|
|
4606
4612
|
}
|
|
4607
4613
|
const ks = (t, e, n, s = {}, i, o) => (r) => {
|
|
@@ -4624,10 +4630,10 @@ const ks = (t, e, n, s = {}, i, o) => (r) => {
|
|
|
4624
4630
|
motionValue: e,
|
|
4625
4631
|
element: o ? void 0 : i
|
|
4626
4632
|
};
|
|
4627
|
-
|
|
4633
|
+
Wf(a) || Object.assign(c, $f(t, c)), c.duration && (c.duration = /* @__PURE__ */ ot(c.duration)), c.repeatDelay && (c.repeatDelay = /* @__PURE__ */ ot(c.repeatDelay)), c.from !== void 0 && (c.keyframes[0] = c.from);
|
|
4628
4634
|
let f = !1;
|
|
4629
4635
|
if ((c.type === !1 || c.duration === 0 && !c.repeatDelay) && (jn(c), c.delay === 0 && (f = !0)), (gt.instantAnimations || gt.skipAnimations) && (f = !0, jn(c), c.delay = 0), c.allowFlatten = !a.type && !a.ease, f && !o && e.get() !== void 0) {
|
|
4630
|
-
const h =
|
|
4636
|
+
const h = Nf(c.keyframes, a);
|
|
4631
4637
|
if (h !== void 0) {
|
|
4632
4638
|
j.update(() => {
|
|
4633
4639
|
c.onUpdate(h), c.onComplete();
|
|
@@ -4635,9 +4641,9 @@ const ks = (t, e, n, s = {}, i, o) => (r) => {
|
|
|
4635
4641
|
return;
|
|
4636
4642
|
}
|
|
4637
4643
|
}
|
|
4638
|
-
return a.isSync ? new ys(c) : new
|
|
4644
|
+
return a.isSync ? new ys(c) : new lu(c);
|
|
4639
4645
|
};
|
|
4640
|
-
function
|
|
4646
|
+
function Uf({ protectedKeys: t, needsAnimating: e }, n) {
|
|
4641
4647
|
const s = t.hasOwnProperty(n) && e[n] !== !0;
|
|
4642
4648
|
return e[n] = !1, s;
|
|
4643
4649
|
}
|
|
@@ -4647,7 +4653,7 @@ function Fo(t, e, { delay: n = 0, transitionOverride: s, type: i } = {}) {
|
|
|
4647
4653
|
const l = [], u = i && t.animationState && t.animationState.getState()[i];
|
|
4648
4654
|
for (const c in a) {
|
|
4649
4655
|
const f = t.getValue(c, t.latestValues[c] ?? null), h = a[c];
|
|
4650
|
-
if (h === void 0 || u &&
|
|
4656
|
+
if (h === void 0 || u && Uf(u, c))
|
|
4651
4657
|
continue;
|
|
4652
4658
|
const d = {
|
|
4653
4659
|
delay: n,
|
|
@@ -4659,8 +4665,8 @@ function Fo(t, e, { delay: n = 0, transitionOverride: s, type: i } = {}) {
|
|
|
4659
4665
|
if (window.MotionHandoffAnimation) {
|
|
4660
4666
|
const v = Io(t);
|
|
4661
4667
|
if (v) {
|
|
4662
|
-
const
|
|
4663
|
-
|
|
4668
|
+
const b = window.MotionHandoffAnimation(v, c, j);
|
|
4669
|
+
b !== null && (d.startTime = b, y = !0);
|
|
4664
4670
|
}
|
|
4665
4671
|
}
|
|
4666
4672
|
Bn(t, c), f.start(ks(c, f, h, t.shouldReduceMotion && so.has(c) ? { type: !1 } : d, t, y));
|
|
@@ -4669,7 +4675,7 @@ function Fo(t, e, { delay: n = 0, transitionOverride: s, type: i } = {}) {
|
|
|
4669
4675
|
}
|
|
4670
4676
|
return r && Promise.all(l).then(() => {
|
|
4671
4677
|
j.update(() => {
|
|
4672
|
-
r &&
|
|
4678
|
+
r && jf(t, r);
|
|
4673
4679
|
});
|
|
4674
4680
|
}), l;
|
|
4675
4681
|
}
|
|
@@ -4683,7 +4689,7 @@ function _n(t, e, n = {}) {
|
|
|
4683
4689
|
n.transitionOverride && (i = n.transitionOverride);
|
|
4684
4690
|
const o = s ? () => Promise.all(Fo(t, s, n)) : () => Promise.resolve(), r = t.variantChildren && t.variantChildren.size ? (l = 0) => {
|
|
4685
4691
|
const { delayChildren: u = 0, staggerChildren: c, staggerDirection: f } = i;
|
|
4686
|
-
return
|
|
4692
|
+
return Kf(t, e, l, u, c, f, n);
|
|
4687
4693
|
} : () => Promise.resolve(), { when: a } = i;
|
|
4688
4694
|
if (a) {
|
|
4689
4695
|
const [l, u] = a === "beforeChildren" ? [o, r] : [r, o];
|
|
@@ -4691,7 +4697,7 @@ function _n(t, e, n = {}) {
|
|
|
4691
4697
|
} else
|
|
4692
4698
|
return Promise.all([o(), r(n.delay)]);
|
|
4693
4699
|
}
|
|
4694
|
-
function
|
|
4700
|
+
function Kf(t, e, n = 0, s = 0, i = 0, o = 1, r) {
|
|
4695
4701
|
const a = [];
|
|
4696
4702
|
for (const l of t.variantChildren)
|
|
4697
4703
|
l.notify("AnimationStart", e), a.push(_n(l, e, {
|
|
@@ -4700,7 +4706,7 @@ function Uf(t, e, n = 0, s = 0, i = 0, o = 1, r) {
|
|
|
4700
4706
|
}).then(() => l.notify("AnimationComplete", e)));
|
|
4701
4707
|
return Promise.all(a);
|
|
4702
4708
|
}
|
|
4703
|
-
function
|
|
4709
|
+
function zf(t, e, n = {}) {
|
|
4704
4710
|
t.notify("AnimationStart", e);
|
|
4705
4711
|
let s;
|
|
4706
4712
|
if (Array.isArray(e)) {
|
|
@@ -4727,7 +4733,7 @@ function _o(t, e) {
|
|
|
4727
4733
|
return !1;
|
|
4728
4734
|
return !0;
|
|
4729
4735
|
}
|
|
4730
|
-
const
|
|
4736
|
+
const Hf = Cs.length;
|
|
4731
4737
|
function $o(t) {
|
|
4732
4738
|
if (!t)
|
|
4733
4739
|
return;
|
|
@@ -4736,18 +4742,18 @@ function $o(t) {
|
|
|
4736
4742
|
return t.props.initial !== void 0 && (n.initial = t.props.initial), n;
|
|
4737
4743
|
}
|
|
4738
4744
|
const e = {};
|
|
4739
|
-
for (let n = 0; n <
|
|
4745
|
+
for (let n = 0; n < Hf; n++) {
|
|
4740
4746
|
const s = Cs[n], i = t.props[s];
|
|
4741
4747
|
(ce(i) || i === !1) && (e[s] = i);
|
|
4742
4748
|
}
|
|
4743
4749
|
return e;
|
|
4744
4750
|
}
|
|
4745
|
-
const
|
|
4746
|
-
function Xf(t) {
|
|
4747
|
-
return (e) => Promise.all(e.map(({ animation: n, options: s }) => Kf(t, n, s)));
|
|
4748
|
-
}
|
|
4751
|
+
const Yf = [...Ps].reverse(), Xf = Ps.length;
|
|
4749
4752
|
function Gf(t) {
|
|
4750
|
-
|
|
4753
|
+
return (e) => Promise.all(e.map(({ animation: n, options: s }) => zf(t, n, s)));
|
|
4754
|
+
}
|
|
4755
|
+
function qf(t) {
|
|
4756
|
+
let e = Gf(t), n = Ci(), s = !0;
|
|
4751
4757
|
const i = (l) => (u, c) => {
|
|
4752
4758
|
const f = $t(t, c, l === "exit" ? t.presenceContext?.custom : void 0);
|
|
4753
4759
|
if (f) {
|
|
@@ -4762,27 +4768,27 @@ function Gf(t) {
|
|
|
4762
4768
|
function r(l) {
|
|
4763
4769
|
const { props: u } = t, c = $o(t.parent) || {}, f = [], h = /* @__PURE__ */ new Set();
|
|
4764
4770
|
let d = {}, m = 1 / 0;
|
|
4765
|
-
for (let x = 0; x <
|
|
4766
|
-
const v =
|
|
4771
|
+
for (let x = 0; x < Xf; x++) {
|
|
4772
|
+
const v = Yf[x], b = n[v], g = u[v] !== void 0 ? u[v] : c[v], S = ce(g), T = v === l ? b.isActive : null;
|
|
4767
4773
|
T === !1 && (m = x);
|
|
4768
4774
|
let A = g === c[v] && g !== u[v] && S;
|
|
4769
|
-
if (A && s && t.manuallyAnimateOnMount && (A = !1),
|
|
4770
|
-
!
|
|
4771
|
-
!g && !
|
|
4775
|
+
if (A && s && t.manuallyAnimateOnMount && (A = !1), b.protectedKeys = { ...d }, // If it isn't active and hasn't *just* been set as inactive
|
|
4776
|
+
!b.isActive && T === null || // If we didn't and don't have any defined prop for this animation type
|
|
4777
|
+
!g && !b.prevProp || // Or if the prop doesn't define an animation
|
|
4772
4778
|
Ge(g) || typeof g == "boolean")
|
|
4773
4779
|
continue;
|
|
4774
|
-
const E =
|
|
4780
|
+
const E = Zf(b.prevProp, g);
|
|
4775
4781
|
let P = E || // If we're making this variant active, we want to always make it active
|
|
4776
|
-
v === l &&
|
|
4782
|
+
v === l && b.isActive && !A && S || // If we removed a higher-priority variant (i is in reverse order)
|
|
4777
4783
|
x > m && S, M = !1;
|
|
4778
4784
|
const k = Array.isArray(g) ? g : [g];
|
|
4779
4785
|
let _ = k.reduce(i(v), {});
|
|
4780
4786
|
T === !1 && (_ = {});
|
|
4781
|
-
const { prevResolvedValues: nt = {} } =
|
|
4787
|
+
const { prevResolvedValues: nt = {} } = b, J = {
|
|
4782
4788
|
...nt,
|
|
4783
4789
|
..._
|
|
4784
4790
|
}, lt = (L) => {
|
|
4785
|
-
P = !0, h.has(L) && (M = !0, h.delete(L)),
|
|
4791
|
+
P = !0, h.has(L) && (M = !0, h.delete(L)), b.needsAnimating[L] = !0;
|
|
4786
4792
|
const D = t.getValue(L);
|
|
4787
4793
|
D && (D.liveStyle = !1);
|
|
4788
4794
|
};
|
|
@@ -4791,9 +4797,9 @@ function Gf(t) {
|
|
|
4791
4797
|
if (d.hasOwnProperty(L))
|
|
4792
4798
|
continue;
|
|
4793
4799
|
let p = !1;
|
|
4794
|
-
Fn(D) && Fn(X) ? p = !_o(D, X) : p = D !== X, p ? D != null ? lt(L) : h.add(L) : D !== void 0 && h.has(L) ? lt(L) :
|
|
4800
|
+
Fn(D) && Fn(X) ? p = !_o(D, X) : p = D !== X, p ? D != null ? lt(L) : h.add(L) : D !== void 0 && h.has(L) ? lt(L) : b.protectedKeys[L] = !0;
|
|
4795
4801
|
}
|
|
4796
|
-
|
|
4802
|
+
b.prevProp = g, b.prevResolvedValues = _, b.isActive && (d = { ...d, ..._ }), s && t.blockInitialAnimation && (P = !1);
|
|
4797
4803
|
const vt = A && E;
|
|
4798
4804
|
P && (!vt || M) && f.push(...k.map((L) => {
|
|
4799
4805
|
const D = { type: v };
|
|
@@ -4817,8 +4823,8 @@ function Gf(t) {
|
|
|
4817
4823
|
v && v.transition && (x.transition = v.transition);
|
|
4818
4824
|
}
|
|
4819
4825
|
h.forEach((v) => {
|
|
4820
|
-
const
|
|
4821
|
-
g && (g.liveStyle = !0), x[v] =
|
|
4826
|
+
const b = t.getBaseTarget(v), g = t.getValue(v);
|
|
4827
|
+
g && (g.liveStyle = !0), x[v] = b ?? null;
|
|
4822
4828
|
}), f.push({ animation: x });
|
|
4823
4829
|
}
|
|
4824
4830
|
let y = !!f.length;
|
|
@@ -4843,7 +4849,7 @@ function Gf(t) {
|
|
|
4843
4849
|
}
|
|
4844
4850
|
};
|
|
4845
4851
|
}
|
|
4846
|
-
function
|
|
4852
|
+
function Zf(t, e) {
|
|
4847
4853
|
return typeof e == "string" ? e !== t : Array.isArray(e) ? !_o(e, t) : !1;
|
|
4848
4854
|
}
|
|
4849
4855
|
function At(t = !1) {
|
|
@@ -4872,14 +4878,14 @@ class Ct {
|
|
|
4872
4878
|
update() {
|
|
4873
4879
|
}
|
|
4874
4880
|
}
|
|
4875
|
-
class
|
|
4881
|
+
class Jf extends Ct {
|
|
4876
4882
|
/**
|
|
4877
4883
|
* We dynamically generate the AnimationState manager as it contains a reference
|
|
4878
4884
|
* to the underlying animation library. We only want to load that if we load this,
|
|
4879
4885
|
* so people can optionally code split it out using the `m` component.
|
|
4880
4886
|
*/
|
|
4881
4887
|
constructor(e) {
|
|
4882
|
-
super(e), e.animationState || (e.animationState =
|
|
4888
|
+
super(e), e.animationState || (e.animationState = qf(e));
|
|
4883
4889
|
}
|
|
4884
4890
|
updateAnimationControlsSubscription() {
|
|
4885
4891
|
const { animate: e } = this.node.getProps();
|
|
@@ -4899,10 +4905,10 @@ class Zf extends Ct {
|
|
|
4899
4905
|
this.node.animationState.reset(), this.unmountControls?.();
|
|
4900
4906
|
}
|
|
4901
4907
|
}
|
|
4902
|
-
let
|
|
4903
|
-
class
|
|
4908
|
+
let Qf = 0;
|
|
4909
|
+
class th extends Ct {
|
|
4904
4910
|
constructor() {
|
|
4905
|
-
super(...arguments), this.id =
|
|
4911
|
+
super(...arguments), this.id = Qf++;
|
|
4906
4912
|
}
|
|
4907
4913
|
update() {
|
|
4908
4914
|
if (!this.node.presenceContext)
|
|
@@ -4922,12 +4928,12 @@ class Qf extends Ct {
|
|
|
4922
4928
|
unmount() {
|
|
4923
4929
|
}
|
|
4924
4930
|
}
|
|
4925
|
-
const
|
|
4931
|
+
const eh = {
|
|
4926
4932
|
animation: {
|
|
4927
|
-
Feature:
|
|
4933
|
+
Feature: Jf
|
|
4928
4934
|
},
|
|
4929
4935
|
exit: {
|
|
4930
|
-
Feature:
|
|
4936
|
+
Feature: th
|
|
4931
4937
|
}
|
|
4932
4938
|
};
|
|
4933
4939
|
function fe(t, e, n, s = { passive: !0 }) {
|
|
@@ -4941,19 +4947,19 @@ function ge(t) {
|
|
|
4941
4947
|
}
|
|
4942
4948
|
};
|
|
4943
4949
|
}
|
|
4944
|
-
const
|
|
4950
|
+
const nh = (t) => (e) => Ts(e) && t(e, ge(e));
|
|
4945
4951
|
function ne(t, e, n, s) {
|
|
4946
|
-
return fe(t, e,
|
|
4952
|
+
return fe(t, e, nh(n), s);
|
|
4947
4953
|
}
|
|
4948
|
-
const Wo = 1e-4,
|
|
4954
|
+
const Wo = 1e-4, sh = 1 - Wo, ih = 1 + Wo, Uo = 0.01, rh = 0 - Uo, oh = 0 + Uo;
|
|
4949
4955
|
function G(t) {
|
|
4950
4956
|
return t.max - t.min;
|
|
4951
4957
|
}
|
|
4952
|
-
function
|
|
4958
|
+
function ah(t, e, n) {
|
|
4953
4959
|
return Math.abs(t - e) <= n;
|
|
4954
4960
|
}
|
|
4955
4961
|
function Ai(t, e, n, s = 0.5) {
|
|
4956
|
-
t.origin = s, t.originPoint = I(e.min, e.max, t.origin), t.scale = G(n) / G(e), t.translate = I(n.min, n.max, t.origin) - t.originPoint, (t.scale >=
|
|
4962
|
+
t.origin = s, t.originPoint = I(e.min, e.max, t.origin), t.scale = G(n) / G(e), t.translate = I(n.min, n.max, t.origin) - t.originPoint, (t.scale >= sh && t.scale <= ih || isNaN(t.scale)) && (t.scale = 1), (t.translate >= rh && t.translate <= oh || isNaN(t.translate)) && (t.translate = 0);
|
|
4957
4963
|
}
|
|
4958
4964
|
function se(t, e, n, s) {
|
|
4959
4965
|
Ai(t.x, e.x, n.x, s ? s.originX : void 0), Ai(t.y, e.y, n.y, s ? s.originY : void 0);
|
|
@@ -4961,7 +4967,7 @@ function se(t, e, n, s) {
|
|
|
4961
4967
|
function Ri(t, e, n) {
|
|
4962
4968
|
t.min = n.min + e.min, t.max = t.min + G(e);
|
|
4963
4969
|
}
|
|
4964
|
-
function
|
|
4970
|
+
function lh(t, e, n) {
|
|
4965
4971
|
Ri(t.x, e.x, n.x), Ri(t.y, e.y, n.y);
|
|
4966
4972
|
}
|
|
4967
4973
|
function Ei(t, e, n) {
|
|
@@ -4974,7 +4980,7 @@ function tt(t) {
|
|
|
4974
4980
|
return [t("x"), t("y")];
|
|
4975
4981
|
}
|
|
4976
4982
|
const Ko = ({ current: t }) => t ? t.ownerDocument.defaultView : null, Vi = (t, e) => Math.abs(t - e);
|
|
4977
|
-
function
|
|
4983
|
+
function ch(t, e) {
|
|
4978
4984
|
const n = Vi(t.x, e.x), s = Vi(t.y, e.y);
|
|
4979
4985
|
return Math.sqrt(n ** 2 + s ** 2);
|
|
4980
4986
|
}
|
|
@@ -4983,13 +4989,13 @@ class zo {
|
|
|
4983
4989
|
if (this.startEvent = null, this.lastMoveEvent = null, this.lastMoveEventInfo = null, this.handlers = {}, this.contextWindow = window, this.updatePoint = () => {
|
|
4984
4990
|
if (!(this.lastMoveEvent && this.lastMoveEventInfo))
|
|
4985
4991
|
return;
|
|
4986
|
-
const h = hn(this.lastMoveEventInfo, this.history), d = this.startEvent !== null, m =
|
|
4992
|
+
const h = hn(this.lastMoveEventInfo, this.history), d = this.startEvent !== null, m = ch(h.offset, { x: 0, y: 0 }) >= this.distanceThreshold;
|
|
4987
4993
|
if (!d && !m)
|
|
4988
4994
|
return;
|
|
4989
4995
|
const { point: y } = h, { timestamp: x } = $;
|
|
4990
4996
|
this.history.push({ ...y, timestamp: x });
|
|
4991
|
-
const { onStart: v, onMove:
|
|
4992
|
-
d || (v && v(this.lastMoveEvent, h), this.startEvent = this.lastMoveEvent),
|
|
4997
|
+
const { onStart: v, onMove: b } = this.handlers;
|
|
4998
|
+
d || (v && v(this.lastMoveEvent, h), this.startEvent = this.lastMoveEvent), b && b(this.lastMoveEvent, h);
|
|
4993
4999
|
}, this.handlePointerMove = (h, d) => {
|
|
4994
5000
|
this.lastMoveEvent = h, this.lastMoveEventInfo = fn(d, this.transformPagePoint), j.update(this.updatePoint, !0);
|
|
4995
5001
|
}, this.handlePointerUp = (h, d) => {
|
|
@@ -5024,17 +5030,17 @@ function hn({ point: t }, e) {
|
|
|
5024
5030
|
return {
|
|
5025
5031
|
point: t,
|
|
5026
5032
|
delta: Di(t, Ho(e)),
|
|
5027
|
-
offset: Di(t,
|
|
5028
|
-
velocity:
|
|
5033
|
+
offset: Di(t, uh(e)),
|
|
5034
|
+
velocity: fh(e, 0.1)
|
|
5029
5035
|
};
|
|
5030
5036
|
}
|
|
5031
|
-
function
|
|
5037
|
+
function uh(t) {
|
|
5032
5038
|
return t[0];
|
|
5033
5039
|
}
|
|
5034
5040
|
function Ho(t) {
|
|
5035
5041
|
return t[t.length - 1];
|
|
5036
5042
|
}
|
|
5037
|
-
function
|
|
5043
|
+
function fh(t, e) {
|
|
5038
5044
|
if (t.length < 2)
|
|
5039
5045
|
return { x: 0, y: 0 };
|
|
5040
5046
|
let n = t.length - 1, s = null;
|
|
@@ -5052,7 +5058,7 @@ function uh(t, e) {
|
|
|
5052
5058
|
};
|
|
5053
5059
|
return r.x === 1 / 0 && (r.x = 0), r.y === 1 / 0 && (r.y = 0), r;
|
|
5054
5060
|
}
|
|
5055
|
-
function
|
|
5061
|
+
function hh(t, { min: e, max: n }, s) {
|
|
5056
5062
|
return e !== void 0 && t < e ? t = s ? I(e, t, s.min) : Math.max(t, e) : n !== void 0 && t > n && (t = s ? I(n, t, s.max) : Math.min(t, n)), t;
|
|
5057
5063
|
}
|
|
5058
5064
|
function Mi(t, e, n) {
|
|
@@ -5061,7 +5067,7 @@ function Mi(t, e, n) {
|
|
|
5061
5067
|
max: n !== void 0 ? t.max + n - (t.max - t.min) : void 0
|
|
5062
5068
|
};
|
|
5063
5069
|
}
|
|
5064
|
-
function
|
|
5070
|
+
function dh(t, { top: e, left: n, bottom: s, right: i }) {
|
|
5065
5071
|
return {
|
|
5066
5072
|
x: Mi(t.x, n, i),
|
|
5067
5073
|
y: Mi(t.y, e, s)
|
|
@@ -5071,23 +5077,23 @@ function ki(t, e) {
|
|
|
5071
5077
|
let n = e.min - t.min, s = e.max - t.max;
|
|
5072
5078
|
return e.max - e.min < t.max - t.min && ([n, s] = [s, n]), { min: n, max: s };
|
|
5073
5079
|
}
|
|
5074
|
-
function
|
|
5080
|
+
function mh(t, e) {
|
|
5075
5081
|
return {
|
|
5076
5082
|
x: ki(t.x, e.x),
|
|
5077
5083
|
y: ki(t.y, e.y)
|
|
5078
5084
|
};
|
|
5079
5085
|
}
|
|
5080
|
-
function
|
|
5086
|
+
function ph(t, e) {
|
|
5081
5087
|
let n = 0.5;
|
|
5082
5088
|
const s = G(t), i = G(e);
|
|
5083
5089
|
return i > s ? n = /* @__PURE__ */ oe(e.min, e.max - s, t.min) : s > i && (n = /* @__PURE__ */ oe(t.min, t.max - i, e.min)), mt(0, 1, n);
|
|
5084
5090
|
}
|
|
5085
|
-
function
|
|
5091
|
+
function gh(t, e) {
|
|
5086
5092
|
const n = {};
|
|
5087
5093
|
return e.min !== void 0 && (n.min = e.min - t.min), e.max !== void 0 && (n.max = e.max - t.min), n;
|
|
5088
5094
|
}
|
|
5089
5095
|
const $n = 0.35;
|
|
5090
|
-
function
|
|
5096
|
+
function yh(t = $n) {
|
|
5091
5097
|
return t === !1 ? t = 0 : t === !0 && (t = $n), {
|
|
5092
5098
|
x: ji(t, "left", "right"),
|
|
5093
5099
|
y: ji(t, "top", "bottom")
|
|
@@ -5102,8 +5108,8 @@ function ji(t, e, n) {
|
|
|
5102
5108
|
function Li(t, e) {
|
|
5103
5109
|
return typeof t == "number" ? t : t[e] || 0;
|
|
5104
5110
|
}
|
|
5105
|
-
const
|
|
5106
|
-
class
|
|
5111
|
+
const vh = /* @__PURE__ */ new WeakMap();
|
|
5112
|
+
class xh {
|
|
5107
5113
|
constructor(e) {
|
|
5108
5114
|
this.openDragLock = null, this.isDragging = !1, this.currentDirection = null, this.originPoint = { x: 0, y: 0 }, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic = F(), this.latestPointerEvent = null, this.latestPanInfo = null, this.visualElement = e;
|
|
5109
5115
|
}
|
|
@@ -5116,18 +5122,18 @@ class vh {
|
|
|
5116
5122
|
h ? this.pauseAnimation() : this.stopAnimation(), n && this.snapToCursor(ge(f).point);
|
|
5117
5123
|
}, r = (f, h) => {
|
|
5118
5124
|
const { drag: d, dragPropagation: m, onDragStart: y } = this.getProps();
|
|
5119
|
-
if (d && !m && (this.openDragLock && this.openDragLock(), this.openDragLock =
|
|
5125
|
+
if (d && !m && (this.openDragLock && this.openDragLock(), this.openDragLock = Cu(d), !this.openDragLock))
|
|
5120
5126
|
return;
|
|
5121
5127
|
this.latestPointerEvent = f, this.latestPanInfo = h, this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), tt((v) => {
|
|
5122
|
-
let
|
|
5123
|
-
if (ht.test(
|
|
5128
|
+
let b = this.getAxisMotionValue(v).get() || 0;
|
|
5129
|
+
if (ht.test(b)) {
|
|
5124
5130
|
const { projection: g } = this.visualElement;
|
|
5125
5131
|
if (g && g.layout) {
|
|
5126
5132
|
const S = g.layout.layoutBox[v];
|
|
5127
|
-
S && (
|
|
5133
|
+
S && (b = G(S) * (parseFloat(b) / 100));
|
|
5128
5134
|
}
|
|
5129
5135
|
}
|
|
5130
|
-
this.originPoint[v] =
|
|
5136
|
+
this.originPoint[v] = b;
|
|
5131
5137
|
}), y && j.postRender(() => y(f, h)), Bn(this.visualElement, "transform");
|
|
5132
5138
|
const { animationState: x } = this.visualElement;
|
|
5133
5139
|
x && x.setActive("whileDrag", !0);
|
|
@@ -5138,7 +5144,7 @@ class vh {
|
|
|
5138
5144
|
return;
|
|
5139
5145
|
const { offset: v } = h;
|
|
5140
5146
|
if (m && this.currentDirection === null) {
|
|
5141
|
-
this.currentDirection =
|
|
5147
|
+
this.currentDirection = wh(v), this.currentDirection !== null && y && y(this.currentDirection);
|
|
5142
5148
|
return;
|
|
5143
5149
|
}
|
|
5144
5150
|
this.updateAxis("x", h.point, v), this.updateAxis("y", h.point, v), this.visualElement.render(), x && x(f, h);
|
|
@@ -5186,12 +5192,12 @@ class vh {
|
|
|
5186
5192
|
return;
|
|
5187
5193
|
const o = this.getAxisMotionValue(e);
|
|
5188
5194
|
let r = this.originPoint[e] + s[e];
|
|
5189
|
-
this.constraints && this.constraints[e] && (r =
|
|
5195
|
+
this.constraints && this.constraints[e] && (r = hh(r, this.constraints[e], this.elastic[e])), o.set(r);
|
|
5190
5196
|
}
|
|
5191
5197
|
resolveConstraints() {
|
|
5192
5198
|
const { dragConstraints: e, dragElastic: n } = this.getProps(), s = this.visualElement.projection && !this.visualElement.projection.layout ? this.visualElement.projection.measure(!1) : this.visualElement.projection?.layout, i = this.constraints;
|
|
5193
|
-
e && Nt(e) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : e && s ? this.constraints =
|
|
5194
|
-
this.constraints !== !1 && this.getAxisMotionValue(o) && (this.constraints[o] =
|
|
5199
|
+
e && Nt(e) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : e && s ? this.constraints = dh(s.layoutBox, e) : this.constraints = !1, this.elastic = yh(n), i !== this.constraints && s && this.constraints && !this.hasMutatedConstraints && tt((o) => {
|
|
5200
|
+
this.constraints !== !1 && this.getAxisMotionValue(o) && (this.constraints[o] = gh(s.layoutBox[o], this.constraints[o]));
|
|
5195
5201
|
});
|
|
5196
5202
|
}
|
|
5197
5203
|
resolveRefConstraints() {
|
|
@@ -5204,9 +5210,9 @@ class vh {
|
|
|
5204
5210
|
if (!i || !i.layout)
|
|
5205
5211
|
return !1;
|
|
5206
5212
|
const o = bf(s, i.root, this.visualElement.getTransformPagePoint());
|
|
5207
|
-
let r =
|
|
5213
|
+
let r = mh(i.layout.layoutBox, o);
|
|
5208
5214
|
if (n) {
|
|
5209
|
-
const a = n(
|
|
5215
|
+
const a = n(vf(r));
|
|
5210
5216
|
this.hasMutatedConstraints = !!a, a && (r = Vo(a));
|
|
5211
5217
|
}
|
|
5212
5218
|
return r;
|
|
@@ -5284,7 +5290,7 @@ class vh {
|
|
|
5284
5290
|
const a = this.getAxisMotionValue(r);
|
|
5285
5291
|
if (a && this.constraints !== !1) {
|
|
5286
5292
|
const l = a.get();
|
|
5287
|
-
i[r] =
|
|
5293
|
+
i[r] = ph({ min: l, max: l }, this.constraints[r]);
|
|
5288
5294
|
}
|
|
5289
5295
|
});
|
|
5290
5296
|
const { transformTemplate: o } = this.visualElement.getProps();
|
|
@@ -5298,7 +5304,7 @@ class vh {
|
|
|
5298
5304
|
addListeners() {
|
|
5299
5305
|
if (!this.visualElement.current)
|
|
5300
5306
|
return;
|
|
5301
|
-
|
|
5307
|
+
vh.set(this.visualElement, this);
|
|
5302
5308
|
const e = this.visualElement.current, n = ne(e, "pointerdown", (l) => {
|
|
5303
5309
|
const { drag: u, dragListener: c = !0 } = this.getProps();
|
|
5304
5310
|
u && c && this.start(l);
|
|
@@ -5333,13 +5339,13 @@ class vh {
|
|
|
5333
5339
|
function Te(t, e, n) {
|
|
5334
5340
|
return (e === !0 || e === t) && (n === null || n === t);
|
|
5335
5341
|
}
|
|
5336
|
-
function
|
|
5342
|
+
function wh(t, e = 10) {
|
|
5337
5343
|
let n = null;
|
|
5338
5344
|
return Math.abs(t.y) > e ? n = "y" : Math.abs(t.x) > e && (n = "x"), n;
|
|
5339
5345
|
}
|
|
5340
5346
|
class bh extends Ct {
|
|
5341
5347
|
constructor(e) {
|
|
5342
|
-
super(e), this.removeGroupControls = et, this.removeListeners = et, this.controls = new
|
|
5348
|
+
super(e), this.removeGroupControls = et, this.removeListeners = et, this.controls = new xh(e);
|
|
5343
5349
|
}
|
|
5344
5350
|
mount() {
|
|
5345
5351
|
const { dragControls: e } = this.node.getProps();
|
|
@@ -5352,7 +5358,7 @@ class bh extends Ct {
|
|
|
5352
5358
|
const Oi = (t) => (e, n) => {
|
|
5353
5359
|
t && j.postRender(() => t(e, n));
|
|
5354
5360
|
};
|
|
5355
|
-
class
|
|
5361
|
+
class Th extends Ct {
|
|
5356
5362
|
constructor() {
|
|
5357
5363
|
super(...arguments), this.removePointerDownListener = et;
|
|
5358
5364
|
}
|
|
@@ -5410,7 +5416,7 @@ const Qt = {
|
|
|
5410
5416
|
const n = Ni(t, e.target.x), s = Ni(t, e.target.y);
|
|
5411
5417
|
return `${n}% ${s}%`;
|
|
5412
5418
|
}
|
|
5413
|
-
},
|
|
5419
|
+
}, Sh = {
|
|
5414
5420
|
correct: (t, { treeScale: e, projectionDelta: n }) => {
|
|
5415
5421
|
const s = t, i = Pt.parse(t);
|
|
5416
5422
|
if (i.length > 5)
|
|
@@ -5422,7 +5428,7 @@ const Qt = {
|
|
|
5422
5428
|
}
|
|
5423
5429
|
};
|
|
5424
5430
|
let dn = !1;
|
|
5425
|
-
class
|
|
5431
|
+
class Ph extends oa {
|
|
5426
5432
|
/**
|
|
5427
5433
|
* This only mounts projection nodes for components that
|
|
5428
5434
|
* need measuring, we might want to do it for all components
|
|
@@ -5430,7 +5436,7 @@ class Sh extends oa {
|
|
|
5430
5436
|
*/
|
|
5431
5437
|
componentDidMount() {
|
|
5432
5438
|
const { visualElement: e, layoutGroup: n, switchLayoutGroup: s, layoutId: i } = this.props, { projection: o } = e;
|
|
5433
|
-
|
|
5439
|
+
zu(Ch), o && (n.group && n.group.add(o), s && s.register && i && s.register(o), dn && o.root.didUpdate(), o.addEventListener("animationComplete", () => {
|
|
5434
5440
|
this.safeToRemove();
|
|
5435
5441
|
}), o.setOptions({
|
|
5436
5442
|
...o.options,
|
|
@@ -5446,7 +5452,7 @@ class Sh extends oa {
|
|
|
5446
5452
|
}
|
|
5447
5453
|
componentDidUpdate() {
|
|
5448
5454
|
const { projection: e } = this.props.visualElement;
|
|
5449
|
-
e && (e.root.didUpdate(),
|
|
5455
|
+
e && (e.root.didUpdate(), bs.postRender(() => {
|
|
5450
5456
|
!e.currentAnimation && e.isLead() && this.safeToRemove();
|
|
5451
5457
|
}));
|
|
5452
5458
|
}
|
|
@@ -5464,9 +5470,9 @@ class Sh extends oa {
|
|
|
5464
5470
|
}
|
|
5465
5471
|
function Yo(t) {
|
|
5466
5472
|
const [e, n] = po(), s = z(Qn);
|
|
5467
|
-
return
|
|
5473
|
+
return w.jsx(Ph, { ...t, layoutGroup: s, switchLayoutGroup: z(Ro), isPresent: e, safeToRemove: n });
|
|
5468
5474
|
}
|
|
5469
|
-
const
|
|
5475
|
+
const Ch = {
|
|
5470
5476
|
borderRadius: {
|
|
5471
5477
|
...Qt,
|
|
5472
5478
|
applyTo: [
|
|
@@ -5480,14 +5486,14 @@ const Ph = {
|
|
|
5480
5486
|
borderTopRightRadius: Qt,
|
|
5481
5487
|
borderBottomLeftRadius: Qt,
|
|
5482
5488
|
borderBottomRightRadius: Qt,
|
|
5483
|
-
boxShadow:
|
|
5489
|
+
boxShadow: Sh
|
|
5484
5490
|
};
|
|
5485
|
-
function
|
|
5491
|
+
function Ah(t, e, n) {
|
|
5486
5492
|
const s = Y(t) ? t : Ut(t);
|
|
5487
5493
|
return s.start(ks("", s, e, n)), s.animation;
|
|
5488
5494
|
}
|
|
5489
|
-
const
|
|
5490
|
-
class
|
|
5495
|
+
const Rh = (t, e) => t.depth - e.depth;
|
|
5496
|
+
class Eh {
|
|
5491
5497
|
constructor() {
|
|
5492
5498
|
this.children = [], this.isDirty = !1;
|
|
5493
5499
|
}
|
|
@@ -5498,20 +5504,20 @@ class Rh {
|
|
|
5498
5504
|
ss(this.children, e), this.isDirty = !0;
|
|
5499
5505
|
}
|
|
5500
5506
|
forEach(e) {
|
|
5501
|
-
this.isDirty && this.children.sort(
|
|
5507
|
+
this.isDirty && this.children.sort(Rh), this.isDirty = !1, this.children.forEach(e);
|
|
5502
5508
|
}
|
|
5503
5509
|
}
|
|
5504
|
-
function
|
|
5510
|
+
function Vh(t, e) {
|
|
5505
5511
|
const n = q.now(), s = ({ timestamp: i }) => {
|
|
5506
5512
|
const o = i - n;
|
|
5507
5513
|
o >= e && (St(s), t(o - e));
|
|
5508
5514
|
};
|
|
5509
5515
|
return j.setup(s, !0), () => St(s);
|
|
5510
5516
|
}
|
|
5511
|
-
const Xo = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"],
|
|
5512
|
-
function
|
|
5513
|
-
i ? (t.opacity = I(0, n.opacity ?? 1,
|
|
5514
|
-
for (let r = 0; r <
|
|
5517
|
+
const Xo = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"], Dh = Xo.length, Ii = (t) => typeof t == "string" ? parseFloat(t) : t, Fi = (t) => typeof t == "number" || R.test(t);
|
|
5518
|
+
function Mh(t, e, n, s, i, o) {
|
|
5519
|
+
i ? (t.opacity = I(0, n.opacity ?? 1, kh(s)), t.opacityExit = I(e.opacity ?? 1, 0, jh(s))) : o && (t.opacity = I(e.opacity ?? 1, n.opacity ?? 1, s));
|
|
5520
|
+
for (let r = 0; r < Dh; r++) {
|
|
5515
5521
|
const a = `border${Xo[r]}Radius`;
|
|
5516
5522
|
let l = Bi(e, a), u = Bi(n, a);
|
|
5517
5523
|
if (l === void 0 && u === void 0)
|
|
@@ -5523,7 +5529,7 @@ function Dh(t, e, n, s, i, o) {
|
|
|
5523
5529
|
function Bi(t, e) {
|
|
5524
5530
|
return t[e] !== void 0 ? t[e] : t.borderRadius;
|
|
5525
5531
|
}
|
|
5526
|
-
const
|
|
5532
|
+
const kh = /* @__PURE__ */ Go(0, 0.5, Lr), jh = /* @__PURE__ */ Go(0.5, 0.95, et);
|
|
5527
5533
|
function Go(t, e, n) {
|
|
5528
5534
|
return (s) => s < t ? 0 : s > e ? 1 : n(/* @__PURE__ */ oe(t, e, s));
|
|
5529
5535
|
}
|
|
@@ -5539,18 +5545,18 @@ function $i(t, e) {
|
|
|
5539
5545
|
function Wi(t, e, n, s, i) {
|
|
5540
5546
|
return t -= e, t = Fe(t, 1 / n, s), i !== void 0 && (t = Fe(t, 1 / i, s)), t;
|
|
5541
5547
|
}
|
|
5542
|
-
function
|
|
5548
|
+
function Lh(t, e = 0, n = 1, s = 0.5, i, o = t, r = t) {
|
|
5543
5549
|
if (ht.test(e) && (e = parseFloat(e), e = I(r.min, r.max, e / 100) - r.min), typeof e != "number")
|
|
5544
5550
|
return;
|
|
5545
5551
|
let a = I(o.min, o.max, s);
|
|
5546
5552
|
t === o && (a -= e), t.min = Wi(t.min, e, n, a, i), t.max = Wi(t.max, e, n, a, i);
|
|
5547
5553
|
}
|
|
5548
5554
|
function Ui(t, e, [n, s, i], o, r) {
|
|
5549
|
-
|
|
5555
|
+
Lh(t, e[n], e[s], e[i], e.scale, o, r);
|
|
5550
5556
|
}
|
|
5551
|
-
const
|
|
5557
|
+
const Oh = ["x", "scaleX", "originX"], Nh = ["y", "scaleY", "originY"];
|
|
5552
5558
|
function Ki(t, e, n, s) {
|
|
5553
|
-
Ui(t.x, e,
|
|
5559
|
+
Ui(t.x, e, Oh, n ? n.x : void 0, s ? s.x : void 0), Ui(t.y, e, Nh, n ? n.y : void 0, s ? s.y : void 0);
|
|
5554
5560
|
}
|
|
5555
5561
|
function zi(t) {
|
|
5556
5562
|
return t.translate === 0 && t.scale === 1;
|
|
@@ -5561,7 +5567,7 @@ function qo(t) {
|
|
|
5561
5567
|
function Hi(t, e) {
|
|
5562
5568
|
return t.min === e.min && t.max === e.max;
|
|
5563
5569
|
}
|
|
5564
|
-
function
|
|
5570
|
+
function Ih(t, e) {
|
|
5565
5571
|
return Hi(t.x, e.x) && Hi(t.y, e.y);
|
|
5566
5572
|
}
|
|
5567
5573
|
function Yi(t, e) {
|
|
@@ -5576,7 +5582,7 @@ function Xi(t) {
|
|
|
5576
5582
|
function Gi(t, e) {
|
|
5577
5583
|
return t.translate === e.translate && t.scale === e.scale && t.originPoint === e.originPoint;
|
|
5578
5584
|
}
|
|
5579
|
-
class
|
|
5585
|
+
class Fh {
|
|
5580
5586
|
constructor() {
|
|
5581
5587
|
this.members = [];
|
|
5582
5588
|
}
|
|
@@ -5630,7 +5636,7 @@ class Ih {
|
|
|
5630
5636
|
this.lead && this.lead.snapshot && (this.lead.snapshot = void 0);
|
|
5631
5637
|
}
|
|
5632
5638
|
}
|
|
5633
|
-
function
|
|
5639
|
+
function Bh(t, e, n) {
|
|
5634
5640
|
let s = "";
|
|
5635
5641
|
const i = t.x.translate / e.x, o = t.y.translate / e.y, r = n?.z || 0;
|
|
5636
5642
|
if ((i || o || r) && (s = `translate3d(${i}px, ${o}px, ${r}px) `), (e.x !== 1 || e.y !== 1) && (s += `scale(${1 / e.x}, ${1 / e.y}) `), n) {
|
|
@@ -5640,8 +5646,8 @@ function Fh(t, e, n) {
|
|
|
5640
5646
|
const a = t.x.scale * e.x, l = t.y.scale * e.y;
|
|
5641
5647
|
return (a !== 1 || l !== 1) && (s += `scale(${a}, ${l})`), s || "none";
|
|
5642
5648
|
}
|
|
5643
|
-
const mn = ["", "X", "Y", "Z"],
|
|
5644
|
-
let
|
|
5649
|
+
const mn = ["", "X", "Y", "Z"], _h = 1e3;
|
|
5650
|
+
let $h = 0;
|
|
5645
5651
|
function pn(t, e, n, s) {
|
|
5646
5652
|
const { latestValues: i } = e;
|
|
5647
5653
|
i[t] && (n[t] = i[t], e.setStaticValue(t, 0), s && (s[t] = 0));
|
|
@@ -5663,14 +5669,14 @@ function Jo(t) {
|
|
|
5663
5669
|
function Qo({ attachResizeListener: t, defaultParent: e, measureScroll: n, checkIsScrollRoot: s, resetTransform: i }) {
|
|
5664
5670
|
return class {
|
|
5665
5671
|
constructor(r = {}, a = e?.()) {
|
|
5666
|
-
this.id =
|
|
5672
|
+
this.id = $h++, this.animationId = 0, this.animationCommitId = 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 = () => {
|
|
5667
5673
|
this.isUpdating && (this.isUpdating = !1, this.clearAllSnapshots());
|
|
5668
5674
|
}, this.updateProjection = () => {
|
|
5669
|
-
this.projectionUpdateScheduled = !1, this.nodes.forEach(
|
|
5675
|
+
this.projectionUpdateScheduled = !1, this.nodes.forEach(Kh), this.nodes.forEach(Xh), this.nodes.forEach(Gh), this.nodes.forEach(zh);
|
|
5670
5676
|
}, this.resolvedRelativeTargetAt = 0, this.hasProjected = !1, this.isVisible = !0, this.animationProgress = 0, this.sharedNodes = /* @__PURE__ */ new Map(), this.latestValues = r, this.root = a ? a.root || a : this, this.path = a ? [...a.path, a] : [], this.parent = a, this.depth = a ? a.depth + 1 : 0;
|
|
5671
5677
|
for (let l = 0; l < this.path.length; l++)
|
|
5672
5678
|
this.path[l].shouldResetTransform = !0;
|
|
5673
|
-
this.root === this && (this.nodes = new
|
|
5679
|
+
this.root === this && (this.nodes = new Eh());
|
|
5674
5680
|
}
|
|
5675
5681
|
addEventListener(r, a) {
|
|
5676
5682
|
return this.eventHandlers.has(r) || this.eventHandlers.set(r, new rs()), this.eventHandlers.get(r).add(a);
|
|
@@ -5688,7 +5694,7 @@ function Qo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
5688
5694
|
mount(r) {
|
|
5689
5695
|
if (this.instance)
|
|
5690
5696
|
return;
|
|
5691
|
-
this.isSVG = mo(r) && !
|
|
5697
|
+
this.isSVG = mo(r) && !Mu(r), this.instance = r;
|
|
5692
5698
|
const { layoutId: a, layout: l, visualElement: u } = this.options;
|
|
5693
5699
|
if (u && !u.current && u.mount(r), this.root.nodes.add(this), this.parent && this.parent.children.add(this), this.root.hasTreeAnimated && (l || a) && (this.isLayoutDirty = !0), t) {
|
|
5694
5700
|
let c, f = 0;
|
|
@@ -5697,7 +5703,7 @@ function Qo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
5697
5703
|
f = window.innerWidth;
|
|
5698
5704
|
}), t(r, () => {
|
|
5699
5705
|
const d = window.innerWidth;
|
|
5700
|
-
d !== f && (f = d, this.root.updateBlockedByResize = !0, c && c(), c =
|
|
5706
|
+
d !== f && (f = d, this.root.updateBlockedByResize = !0, c && c(), c = Vh(h, 250), Ee.hasAnimatedSinceResize && (Ee.hasAnimatedSinceResize = !1, this.nodes.forEach(Ji)));
|
|
5701
5707
|
});
|
|
5702
5708
|
}
|
|
5703
5709
|
a && this.root.registerSharedNode(a, this), this.options.animate !== !1 && u && (a || l) && this.addEventListener("didUpdate", ({ delta: c, hasLayoutChanged: f, hasRelativeLayoutChanged: h, layout: d }) => {
|
|
@@ -5705,15 +5711,15 @@ function Qo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
5705
5711
|
this.target = void 0, this.relativeTarget = void 0;
|
|
5706
5712
|
return;
|
|
5707
5713
|
}
|
|
5708
|
-
const m = this.options.transition || u.getDefaultTransition() ||
|
|
5709
|
-
if (this.options.layoutRoot || this.resumeFrom ||
|
|
5714
|
+
const m = this.options.transition || u.getDefaultTransition() || td, { onLayoutAnimationStart: y, onLayoutAnimationComplete: x } = u.getProps(), v = !this.targetLayout || !Zo(this.targetLayout, d), b = !f && h;
|
|
5715
|
+
if (this.options.layoutRoot || this.resumeFrom || b || f && (v || !this.currentAnimation)) {
|
|
5710
5716
|
this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0);
|
|
5711
5717
|
const g = {
|
|
5712
5718
|
...xs(m, "layout"),
|
|
5713
5719
|
onPlay: y,
|
|
5714
5720
|
onComplete: x
|
|
5715
5721
|
};
|
|
5716
|
-
(u.shouldReduceMotion || this.options.layoutRoot) && (g.delay = 0, g.type = !1), this.startAnimation(g), this.setAnimationOrigin(c,
|
|
5722
|
+
(u.shouldReduceMotion || this.options.layoutRoot) && (g.delay = 0, g.type = !1), this.startAnimation(g), this.setAnimationOrigin(c, b);
|
|
5717
5723
|
} else
|
|
5718
5724
|
f || Ji(this), this.isLead() && this.options.onExitComplete && this.options.onExitComplete();
|
|
5719
5725
|
this.targetLayout = d;
|
|
@@ -5739,7 +5745,7 @@ function Qo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
5739
5745
|
}
|
|
5740
5746
|
// Note: currently only running on root node
|
|
5741
5747
|
startUpdate() {
|
|
5742
|
-
this.isUpdateBlocked() || (this.isUpdating = !0, this.nodes && this.nodes.forEach(
|
|
5748
|
+
this.isUpdateBlocked() || (this.isUpdating = !0, this.nodes && this.nodes.forEach(qh), this.animationId++);
|
|
5743
5749
|
}
|
|
5744
5750
|
getTransformTemplate() {
|
|
5745
5751
|
const { visualElement: r } = this.options;
|
|
@@ -5772,15 +5778,15 @@ function Qo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
5772
5778
|
this.nodes.forEach(Zi);
|
|
5773
5779
|
return;
|
|
5774
5780
|
}
|
|
5775
|
-
this.animationCommitId = this.animationId, this.isUpdating ? (this.isUpdating = !1, this.nodes.forEach(
|
|
5781
|
+
this.animationCommitId = this.animationId, this.isUpdating ? (this.isUpdating = !1, this.nodes.forEach(Yh), this.nodes.forEach(Wh), this.nodes.forEach(Uh)) : this.nodes.forEach(Zi), this.clearAllSnapshots();
|
|
5776
5782
|
const a = q.now();
|
|
5777
5783
|
$.delta = mt(0, 1e3 / 60, a - $.timestamp), $.timestamp = a, $.isProcessing = !0, nn.update.process($), nn.preRender.process($), nn.render.process($), $.isProcessing = !1;
|
|
5778
5784
|
}
|
|
5779
5785
|
didUpdate() {
|
|
5780
|
-
this.updateScheduled || (this.updateScheduled = !0,
|
|
5786
|
+
this.updateScheduled || (this.updateScheduled = !0, bs.read(this.scheduleUpdate));
|
|
5781
5787
|
}
|
|
5782
5788
|
clearAllSnapshots() {
|
|
5783
|
-
this.nodes.forEach(
|
|
5789
|
+
this.nodes.forEach(Hh), this.sharedNodes.forEach(Zh);
|
|
5784
5790
|
}
|
|
5785
5791
|
scheduleUpdateProjection() {
|
|
5786
5792
|
this.projectionUpdateScheduled || (this.projectionUpdateScheduled = !0, j.preRender(this.updateProjection, !1, !0));
|
|
@@ -5829,7 +5835,7 @@ function Qo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
5829
5835
|
measure(r = !0) {
|
|
5830
5836
|
const a = this.measurePageBox();
|
|
5831
5837
|
let l = this.removeElementScroll(a);
|
|
5832
|
-
return r && (l = this.removeTransform(l)),
|
|
5838
|
+
return r && (l = this.removeTransform(l)), ed(l), {
|
|
5833
5839
|
animationId: this.root.animationId,
|
|
5834
5840
|
measuredBox: a,
|
|
5835
5841
|
layoutBox: l,
|
|
@@ -5842,7 +5848,7 @@ function Qo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
5842
5848
|
if (!r)
|
|
5843
5849
|
return F();
|
|
5844
5850
|
const a = r.measureViewportBox();
|
|
5845
|
-
if (!(this.scroll?.wasRoot || this.path.some(
|
|
5851
|
+
if (!(this.scroll?.wasRoot || this.path.some(nd))) {
|
|
5846
5852
|
const { scroll: u } = this.root;
|
|
5847
5853
|
u && (It(a.x, u.offset.x), It(a.y, u.offset.y));
|
|
5848
5854
|
}
|
|
@@ -5911,7 +5917,7 @@ function Qo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
5911
5917
|
const h = this.getClosestProjectingParent();
|
|
5912
5918
|
h && h.layout && this.animationProgress !== 1 ? (this.relativeParent = h, this.forceRelativeParentToResolveTarget(), this.relativeTarget = F(), this.relativeTargetOrigin = F(), ie(this.relativeTargetOrigin, this.layout.layoutBox, h.layout.layoutBox), Q(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
|
|
5913
5919
|
}
|
|
5914
|
-
if (!(!this.relativeTarget && !this.targetDelta) && (this.target || (this.target = F(), this.targetWithTransforms = F()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(),
|
|
5920
|
+
if (!(!this.relativeTarget && !this.targetDelta) && (this.target || (this.target = F(), this.targetWithTransforms = F()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), lh(this.target, this.relativeTarget, this.relativeParent.target)) : this.targetDelta ? (this.resumingFrom ? this.target = this.applyTransform(this.layout.layoutBox) : Q(this.target, this.layout.layoutBox), Mo(this.target, this.targetDelta)) : Q(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget)) {
|
|
5915
5921
|
this.attemptToResolveRelativeTarget = !1;
|
|
5916
5922
|
const h = this.getClosestProjectingParent();
|
|
5917
5923
|
h && !!h.resumingFrom == !!this.resumingFrom && !h.options.layoutScroll && h.target && this.animationProgress !== 1 ? (this.relativeParent = h, this.forceRelativeParentToResolveTarget(), this.relativeTarget = F(), this.relativeTargetOrigin = F(), ie(this.relativeTargetOrigin, this.target, h.target), Q(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
|
|
@@ -5935,7 +5941,7 @@ function Qo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
5935
5941
|
return;
|
|
5936
5942
|
Q(this.layoutCorrected, this.layout.layoutBox);
|
|
5937
5943
|
const f = this.treeScale.x, h = this.treeScale.y;
|
|
5938
|
-
|
|
5944
|
+
wf(this.layoutCorrected, this.treeScale, this.path, a), r.layout && !r.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (r.target = r.layout.layoutBox, r.targetWithTransforms = F());
|
|
5939
5945
|
const { target: d } = r;
|
|
5940
5946
|
if (!d) {
|
|
5941
5947
|
this.prevProjectionDelta && (this.createProjectionDeltas(), this.scheduleRender());
|
|
@@ -5962,17 +5968,17 @@ function Qo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
5962
5968
|
setAnimationOrigin(r, a = !1) {
|
|
5963
5969
|
const l = this.snapshot, u = l ? l.latestValues : {}, c = { ...this.latestValues }, f = Bt();
|
|
5964
5970
|
(!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !a;
|
|
5965
|
-
const h = F(), d = l ? l.source : void 0, m = this.layout ? this.layout.source : void 0, y = d !== m, x = this.getStack(), v = !x || x.members.length <= 1,
|
|
5971
|
+
const h = F(), d = l ? l.source : void 0, m = this.layout ? this.layout.source : void 0, y = d !== m, x = this.getStack(), v = !x || x.members.length <= 1, b = !!(y && !v && this.options.crossfade === !0 && !this.path.some(Qh));
|
|
5966
5972
|
this.animationProgress = 0;
|
|
5967
5973
|
let g;
|
|
5968
5974
|
this.mixTargetDelta = (S) => {
|
|
5969
5975
|
const T = S / 1e3;
|
|
5970
|
-
Qi(f.x, r.x, T), Qi(f.y, r.y, T), this.setTargetDelta(f), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (ie(h, this.layout.layoutBox, this.relativeParent.layout.layoutBox),
|
|
5976
|
+
Qi(f.x, r.x, T), Qi(f.y, r.y, T), this.setTargetDelta(f), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (ie(h, this.layout.layoutBox, this.relativeParent.layout.layoutBox), Jh(this.relativeTarget, this.relativeTargetOrigin, h, T), g && Ih(this.relativeTarget, g) && (this.isProjectionDirty = !1), g || (g = F()), Q(g, this.relativeTarget)), y && (this.animationValues = c, Mh(c, u, this.latestValues, T, b, v)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = T;
|
|
5971
5977
|
}, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
|
|
5972
5978
|
}
|
|
5973
5979
|
startAnimation(r) {
|
|
5974
5980
|
this.notifyListeners("animationStart"), this.currentAnimation?.stop(), this.resumingFrom?.currentAnimation?.stop(), this.pendingAnimation && (St(this.pendingAnimation), this.pendingAnimation = void 0), this.pendingAnimation = j.update(() => {
|
|
5975
|
-
Ee.hasAnimatedSinceResize = !0, this.motionValue || (this.motionValue = Ut(0)), this.currentAnimation =
|
|
5981
|
+
Ee.hasAnimatedSinceResize = !0, this.motionValue || (this.motionValue = Ut(0)), this.currentAnimation = Ah(this.motionValue, [0, 1e3], {
|
|
5976
5982
|
...r,
|
|
5977
5983
|
velocity: 0,
|
|
5978
5984
|
isSync: !0,
|
|
@@ -5993,7 +5999,7 @@ function Qo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
5993
5999
|
r && r.exitAnimationComplete(), this.resumingFrom = this.currentAnimation = this.animationValues = void 0, this.notifyListeners("animationComplete");
|
|
5994
6000
|
}
|
|
5995
6001
|
finishAnimation() {
|
|
5996
|
-
this.currentAnimation && (this.mixTargetDelta && this.mixTargetDelta(
|
|
6002
|
+
this.currentAnimation && (this.mixTargetDelta && this.mixTargetDelta(_h), this.currentAnimation.stop()), this.completeAnimation();
|
|
5997
6003
|
}
|
|
5998
6004
|
applyTransformsToTarget() {
|
|
5999
6005
|
const r = this.getLead();
|
|
@@ -6010,7 +6016,7 @@ function Qo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
6010
6016
|
}
|
|
6011
6017
|
}
|
|
6012
6018
|
registerSharedNode(r, a) {
|
|
6013
|
-
this.sharedNodes.has(r) || this.sharedNodes.set(r, new
|
|
6019
|
+
this.sharedNodes.has(r) || this.sharedNodes.set(r, new Fh()), this.sharedNodes.get(r).add(a);
|
|
6014
6020
|
const u = a.options.initialPromotionConfig;
|
|
6015
6021
|
a.promote({
|
|
6016
6022
|
transition: u ? u.transition : void 0,
|
|
@@ -6079,20 +6085,20 @@ function Qo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
6079
6085
|
r.visibility = "";
|
|
6080
6086
|
const c = u.animationValues || u.latestValues;
|
|
6081
6087
|
this.applyTransformsToTarget();
|
|
6082
|
-
let f =
|
|
6088
|
+
let f = Bh(this.projectionDeltaWithTransform, this.treeScale, c);
|
|
6083
6089
|
l && (f = l(c, f)), r.transform = f;
|
|
6084
6090
|
const { x: h, y: d } = this.projectionDelta;
|
|
6085
6091
|
r.transformOrigin = `${h.origin * 100}% ${d.origin * 100}% 0`, u.animationValues ? r.opacity = u === this ? c.opacity ?? this.latestValues.opacity ?? 1 : this.preserveOpacity ? this.latestValues.opacity : c.opacityExit : r.opacity = u === this ? c.opacity !== void 0 ? c.opacity : "" : c.opacityExit !== void 0 ? c.opacityExit : 0;
|
|
6086
6092
|
for (const m in ue) {
|
|
6087
6093
|
if (c[m] === void 0)
|
|
6088
6094
|
continue;
|
|
6089
|
-
const { correct: y, applyTo: x, isCSSVariable: v } = ue[m],
|
|
6095
|
+
const { correct: y, applyTo: x, isCSSVariable: v } = ue[m], b = f === "none" ? c[m] : y(c[m], u);
|
|
6090
6096
|
if (x) {
|
|
6091
6097
|
const g = x.length;
|
|
6092
6098
|
for (let S = 0; S < g; S++)
|
|
6093
|
-
r[x[S]] =
|
|
6099
|
+
r[x[S]] = b;
|
|
6094
6100
|
} else
|
|
6095
|
-
v ? this.options.visualElement.renderState.vars[m] =
|
|
6101
|
+
v ? this.options.visualElement.renderState.vars[m] = b : r[m] = b;
|
|
6096
6102
|
}
|
|
6097
6103
|
this.options.layoutId && (r.pointerEvents = u === this ? Re(a?.pointerEvents) || "" : "none");
|
|
6098
6104
|
}
|
|
@@ -6105,10 +6111,10 @@ function Qo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
6105
6111
|
}
|
|
6106
6112
|
};
|
|
6107
6113
|
}
|
|
6108
|
-
function
|
|
6114
|
+
function Wh(t) {
|
|
6109
6115
|
t.updateLayout();
|
|
6110
6116
|
}
|
|
6111
|
-
function
|
|
6117
|
+
function Uh(t) {
|
|
6112
6118
|
const e = t.resumeFrom?.snapshot || t.snapshot;
|
|
6113
6119
|
if (t.isLead() && t.layout && e && t.hasListeners("didUpdate")) {
|
|
6114
6120
|
const { layoutBox: n, measuredBox: s } = t.layout, { animationType: i } = t.options, o = e.source !== t.layout.source;
|
|
@@ -6151,13 +6157,13 @@ function Wh(t) {
|
|
|
6151
6157
|
}
|
|
6152
6158
|
t.options.transition = void 0;
|
|
6153
6159
|
}
|
|
6154
|
-
function
|
|
6160
|
+
function Kh(t) {
|
|
6155
6161
|
t.parent && (t.isProjecting() || (t.isProjectionDirty = t.parent.isProjectionDirty), t.isSharedProjectionDirty || (t.isSharedProjectionDirty = !!(t.isProjectionDirty || t.parent.isProjectionDirty || t.parent.isSharedProjectionDirty)), t.isTransformDirty || (t.isTransformDirty = t.parent.isTransformDirty));
|
|
6156
6162
|
}
|
|
6157
|
-
function
|
|
6163
|
+
function zh(t) {
|
|
6158
6164
|
t.isProjectionDirty = t.isSharedProjectionDirty = t.isTransformDirty = !1;
|
|
6159
6165
|
}
|
|
6160
|
-
function
|
|
6166
|
+
function Hh(t) {
|
|
6161
6167
|
t.clearSnapshot();
|
|
6162
6168
|
}
|
|
6163
6169
|
function qi(t) {
|
|
@@ -6166,23 +6172,23 @@ function qi(t) {
|
|
|
6166
6172
|
function Zi(t) {
|
|
6167
6173
|
t.isLayoutDirty = !1;
|
|
6168
6174
|
}
|
|
6169
|
-
function
|
|
6175
|
+
function Yh(t) {
|
|
6170
6176
|
const { visualElement: e } = t.options;
|
|
6171
6177
|
e && e.getProps().onBeforeLayoutMeasure && e.notify("BeforeLayoutMeasure"), t.resetTransform();
|
|
6172
6178
|
}
|
|
6173
6179
|
function Ji(t) {
|
|
6174
6180
|
t.finishAnimation(), t.targetDelta = t.relativeTarget = t.target = void 0, t.isProjectionDirty = !0;
|
|
6175
6181
|
}
|
|
6176
|
-
function
|
|
6182
|
+
function Xh(t) {
|
|
6177
6183
|
t.resolveTargetDelta();
|
|
6178
6184
|
}
|
|
6179
|
-
function
|
|
6185
|
+
function Gh(t) {
|
|
6180
6186
|
t.calcProjection();
|
|
6181
6187
|
}
|
|
6182
|
-
function
|
|
6188
|
+
function qh(t) {
|
|
6183
6189
|
t.resetSkewAndRotation();
|
|
6184
6190
|
}
|
|
6185
|
-
function
|
|
6191
|
+
function Zh(t) {
|
|
6186
6192
|
t.removeLeadSnapshot();
|
|
6187
6193
|
}
|
|
6188
6194
|
function Qi(t, e, n) {
|
|
@@ -6191,29 +6197,29 @@ function Qi(t, e, n) {
|
|
|
6191
6197
|
function tr(t, e, n, s) {
|
|
6192
6198
|
t.min = I(e.min, n.min, s), t.max = I(e.max, n.max, s);
|
|
6193
6199
|
}
|
|
6194
|
-
function
|
|
6200
|
+
function Jh(t, e, n, s) {
|
|
6195
6201
|
tr(t.x, e.x, n.x, s), tr(t.y, e.y, n.y, s);
|
|
6196
6202
|
}
|
|
6197
|
-
function
|
|
6203
|
+
function Qh(t) {
|
|
6198
6204
|
return t.animationValues && t.animationValues.opacityExit !== void 0;
|
|
6199
6205
|
}
|
|
6200
|
-
const
|
|
6206
|
+
const td = {
|
|
6201
6207
|
duration: 0.45,
|
|
6202
6208
|
ease: [0.4, 0, 0.1, 1]
|
|
6203
6209
|
}, er = (t) => typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().includes(t), nr = er("applewebkit/") && !er("chrome/") ? Math.round : et;
|
|
6204
6210
|
function sr(t) {
|
|
6205
6211
|
t.min = nr(t.min), t.max = nr(t.max);
|
|
6206
6212
|
}
|
|
6207
|
-
function
|
|
6213
|
+
function ed(t) {
|
|
6208
6214
|
sr(t.x), sr(t.y);
|
|
6209
6215
|
}
|
|
6210
6216
|
function ta(t, e, n) {
|
|
6211
|
-
return t === "position" || t === "preserve-aspect" && !
|
|
6217
|
+
return t === "position" || t === "preserve-aspect" && !ah(Xi(e), Xi(n), 0.2);
|
|
6212
6218
|
}
|
|
6213
|
-
function
|
|
6219
|
+
function nd(t) {
|
|
6214
6220
|
return t !== t.root && t.scroll?.wasRoot;
|
|
6215
6221
|
}
|
|
6216
|
-
const
|
|
6222
|
+
const sd = Qo({
|
|
6217
6223
|
attachResizeListener: (t, e) => fe(t, "resize", e),
|
|
6218
6224
|
measureScroll: () => ({
|
|
6219
6225
|
x: document.documentElement.scrollLeft || document.body.scrollLeft,
|
|
@@ -6229,7 +6235,7 @@ const nd = Qo({
|
|
|
6229
6235
|
}),
|
|
6230
6236
|
defaultParent: () => {
|
|
6231
6237
|
if (!gn.current) {
|
|
6232
|
-
const t = new
|
|
6238
|
+
const t = new sd({});
|
|
6233
6239
|
t.mount(window), t.setOptions({ layoutScroll: !0 }), gn.current = t;
|
|
6234
6240
|
}
|
|
6235
6241
|
return gn.current;
|
|
@@ -6238,9 +6244,9 @@ const nd = Qo({
|
|
|
6238
6244
|
t.style.transform = e !== void 0 ? e : "none";
|
|
6239
6245
|
},
|
|
6240
6246
|
checkIsScrollRoot: (t) => window.getComputedStyle(t).position === "fixed"
|
|
6241
|
-
}),
|
|
6247
|
+
}), id = {
|
|
6242
6248
|
pan: {
|
|
6243
|
-
Feature:
|
|
6249
|
+
Feature: Th
|
|
6244
6250
|
},
|
|
6245
6251
|
drag: {
|
|
6246
6252
|
Feature: bh,
|
|
@@ -6254,15 +6260,15 @@ function ir(t, e, n) {
|
|
|
6254
6260
|
const i = "onHover" + n, o = s[i];
|
|
6255
6261
|
o && j.postRender(() => o(e, ge(e)));
|
|
6256
6262
|
}
|
|
6257
|
-
class
|
|
6263
|
+
class rd extends Ct {
|
|
6258
6264
|
mount() {
|
|
6259
6265
|
const { current: e } = this.node;
|
|
6260
|
-
e && (this.unmount =
|
|
6266
|
+
e && (this.unmount = Au(e, (n, s) => (ir(this.node, s, "Start"), (i) => ir(this.node, i, "End"))));
|
|
6261
6267
|
}
|
|
6262
6268
|
unmount() {
|
|
6263
6269
|
}
|
|
6264
6270
|
}
|
|
6265
|
-
class
|
|
6271
|
+
class od extends Ct {
|
|
6266
6272
|
constructor() {
|
|
6267
6273
|
super(...arguments), this.isActive = !1;
|
|
6268
6274
|
}
|
|
@@ -6292,37 +6298,37 @@ function rr(t, e, n) {
|
|
|
6292
6298
|
const i = "onTap" + (n === "End" ? "" : n), o = s[i];
|
|
6293
6299
|
o && j.postRender(() => o(e, ge(e)));
|
|
6294
6300
|
}
|
|
6295
|
-
class
|
|
6301
|
+
class ad extends Ct {
|
|
6296
6302
|
mount() {
|
|
6297
6303
|
const { current: e } = this.node;
|
|
6298
|
-
e && (this.unmount =
|
|
6304
|
+
e && (this.unmount = Du(e, (n, s) => (rr(this.node, s, "Start"), (i, { success: o }) => rr(this.node, i, o ? "End" : "Cancel")), { useGlobalTarget: this.node.props.globalTapTarget }));
|
|
6299
6305
|
}
|
|
6300
6306
|
unmount() {
|
|
6301
6307
|
}
|
|
6302
6308
|
}
|
|
6303
|
-
const Wn = /* @__PURE__ */ new WeakMap(), yn = /* @__PURE__ */ new WeakMap(),
|
|
6309
|
+
const Wn = /* @__PURE__ */ new WeakMap(), yn = /* @__PURE__ */ new WeakMap(), ld = (t) => {
|
|
6304
6310
|
const e = Wn.get(t.target);
|
|
6305
6311
|
e && e(t);
|
|
6306
|
-
},
|
|
6307
|
-
t.forEach(
|
|
6312
|
+
}, cd = (t) => {
|
|
6313
|
+
t.forEach(ld);
|
|
6308
6314
|
};
|
|
6309
|
-
function
|
|
6315
|
+
function ud({ root: t, ...e }) {
|
|
6310
6316
|
const n = t || document;
|
|
6311
6317
|
yn.has(n) || yn.set(n, {});
|
|
6312
6318
|
const s = yn.get(n), i = JSON.stringify(e);
|
|
6313
|
-
return s[i] || (s[i] = new IntersectionObserver(
|
|
6319
|
+
return s[i] || (s[i] = new IntersectionObserver(cd, { root: t, ...e })), s[i];
|
|
6314
6320
|
}
|
|
6315
|
-
function
|
|
6316
|
-
const s =
|
|
6321
|
+
function fd(t, e, n) {
|
|
6322
|
+
const s = ud(e);
|
|
6317
6323
|
return Wn.set(t, n), s.observe(t), () => {
|
|
6318
6324
|
Wn.delete(t), s.unobserve(t);
|
|
6319
6325
|
};
|
|
6320
6326
|
}
|
|
6321
|
-
const
|
|
6327
|
+
const hd = {
|
|
6322
6328
|
some: 0,
|
|
6323
6329
|
all: 1
|
|
6324
6330
|
};
|
|
6325
|
-
class
|
|
6331
|
+
class dd extends Ct {
|
|
6326
6332
|
constructor() {
|
|
6327
6333
|
super(...arguments), this.hasEnteredView = !1, this.isInView = !1;
|
|
6328
6334
|
}
|
|
@@ -6331,7 +6337,7 @@ class hd extends Ct {
|
|
|
6331
6337
|
const { viewport: e = {} } = this.node.getProps(), { root: n, margin: s, amount: i = "some", once: o } = e, r = {
|
|
6332
6338
|
root: n ? n.current : void 0,
|
|
6333
6339
|
rootMargin: s,
|
|
6334
|
-
threshold: typeof i == "number" ? i :
|
|
6340
|
+
threshold: typeof i == "number" ? i : hd[i]
|
|
6335
6341
|
}, a = (l) => {
|
|
6336
6342
|
const { isIntersecting: u } = l;
|
|
6337
6343
|
if (this.isInView === u || (this.isInView = u, o && !u && this.hasEnteredView))
|
|
@@ -6340,7 +6346,7 @@ class hd extends Ct {
|
|
|
6340
6346
|
const { onViewportEnter: c, onViewportLeave: f } = this.node.getProps(), h = u ? c : f;
|
|
6341
6347
|
h && h(l);
|
|
6342
6348
|
};
|
|
6343
|
-
return
|
|
6349
|
+
return fd(this.node.current, r, a);
|
|
6344
6350
|
}
|
|
6345
6351
|
mount() {
|
|
6346
6352
|
this.startObserver();
|
|
@@ -6349,38 +6355,38 @@ class hd extends Ct {
|
|
|
6349
6355
|
if (typeof IntersectionObserver > "u")
|
|
6350
6356
|
return;
|
|
6351
6357
|
const { props: e, prevProps: n } = this.node;
|
|
6352
|
-
["amount", "margin", "root"].some(
|
|
6358
|
+
["amount", "margin", "root"].some(md(e, n)) && this.startObserver();
|
|
6353
6359
|
}
|
|
6354
6360
|
unmount() {
|
|
6355
6361
|
}
|
|
6356
6362
|
}
|
|
6357
|
-
function
|
|
6363
|
+
function md({ viewport: t = {} }, { viewport: e = {} } = {}) {
|
|
6358
6364
|
return (n) => t[n] !== e[n];
|
|
6359
6365
|
}
|
|
6360
|
-
const
|
|
6366
|
+
const pd = {
|
|
6361
6367
|
inView: {
|
|
6362
|
-
Feature:
|
|
6368
|
+
Feature: dd
|
|
6363
6369
|
},
|
|
6364
6370
|
tap: {
|
|
6365
|
-
Feature:
|
|
6371
|
+
Feature: ad
|
|
6366
6372
|
},
|
|
6367
6373
|
focus: {
|
|
6368
|
-
Feature:
|
|
6374
|
+
Feature: od
|
|
6369
6375
|
},
|
|
6370
6376
|
hover: {
|
|
6371
|
-
Feature:
|
|
6377
|
+
Feature: rd
|
|
6372
6378
|
}
|
|
6373
|
-
},
|
|
6379
|
+
}, gd = {
|
|
6374
6380
|
layout: {
|
|
6375
6381
|
ProjectionNode: ea,
|
|
6376
6382
|
MeasureLayout: Yo
|
|
6377
6383
|
}
|
|
6378
|
-
},
|
|
6379
|
-
...
|
|
6380
|
-
...
|
|
6381
|
-
...
|
|
6382
|
-
...
|
|
6383
|
-
},
|
|
6384
|
+
}, yd = {
|
|
6385
|
+
...eh,
|
|
6386
|
+
...pd,
|
|
6387
|
+
...id,
|
|
6388
|
+
...gd
|
|
6389
|
+
}, vd = /* @__PURE__ */ yf(yd, Df), xd = {
|
|
6384
6390
|
top: "bottom center",
|
|
6385
6391
|
"top-start": "bottom left",
|
|
6386
6392
|
"top-end": "bottom right",
|
|
@@ -6393,14 +6399,14 @@ const md = {
|
|
|
6393
6399
|
left: "right center",
|
|
6394
6400
|
"left-start": "top right",
|
|
6395
6401
|
"left-end": "bottom right"
|
|
6396
|
-
},
|
|
6397
|
-
({ open: t, children: e, className: n, onOutsideClick: s, floatingStyles: i, setFloating: o, placement: r }) => /* @__PURE__ */
|
|
6398
|
-
s && /* @__PURE__ */
|
|
6399
|
-
/* @__PURE__ */
|
|
6400
|
-
|
|
6402
|
+
}, wd = C.memo(
|
|
6403
|
+
({ open: t, children: e, className: n, onOutsideClick: s, floatingStyles: i, setFloating: o, placement: r }) => /* @__PURE__ */ w.jsx(Fu, { children: t && /* @__PURE__ */ w.jsxs(w.Fragment, { children: [
|
|
6404
|
+
s && /* @__PURE__ */ w.jsx(Ol, { onClick: s }),
|
|
6405
|
+
/* @__PURE__ */ w.jsx("div", { ref: o, style: i, className: "z-10", children: /* @__PURE__ */ w.jsx(
|
|
6406
|
+
vd.div,
|
|
6401
6407
|
{
|
|
6402
6408
|
className: n,
|
|
6403
|
-
style: { transformOrigin:
|
|
6409
|
+
style: { transformOrigin: xd[r] },
|
|
6404
6410
|
initial: { opacity: 0, scale: 0.95 },
|
|
6405
6411
|
animate: { opacity: 1, scale: 1 },
|
|
6406
6412
|
exit: { opacity: 0, scale: 0.95 },
|
|
@@ -6411,12 +6417,12 @@ const md = {
|
|
|
6411
6417
|
] }) })
|
|
6412
6418
|
), bd = (t) => {
|
|
6413
6419
|
const { placement: e = "bottom", onOutsideClick: n, fullWidth: s, minWidth: i, maxWidth: o } = t, r = C.useMemo(() => [
|
|
6414
|
-
|
|
6420
|
+
Tl({
|
|
6415
6421
|
apply({ rects: f, elements: h }) {
|
|
6416
6422
|
s && (h.floating.style.width = `${f.reference.width}px`), i && (h.floating.style.minWidth = `${i}px`), o && (h.floating.style.maxWidth = `${o}px`);
|
|
6417
6423
|
}
|
|
6418
6424
|
})
|
|
6419
|
-
], [s, i]), { refs: a, floatingStyles: l } =
|
|
6425
|
+
], [s, i]), { refs: a, floatingStyles: l } = Il({
|
|
6420
6426
|
placement: e,
|
|
6421
6427
|
middleware: r
|
|
6422
6428
|
}), u = C.useRef({
|
|
@@ -6433,11 +6439,11 @@ const md = {
|
|
|
6433
6439
|
};
|
|
6434
6440
|
const c = C.useMemo(() => {
|
|
6435
6441
|
const f = (h) => {
|
|
6436
|
-
const { floatingStyles: d, setFloating: m, onOutsideClick: y, placement: x } = u.current, { className: v, open:
|
|
6437
|
-
return /* @__PURE__ */
|
|
6438
|
-
|
|
6442
|
+
const { floatingStyles: d, setFloating: m, onOutsideClick: y, placement: x } = u.current, { className: v, open: b, children: g } = h;
|
|
6443
|
+
return /* @__PURE__ */ w.jsx(
|
|
6444
|
+
wd,
|
|
6439
6445
|
{
|
|
6440
|
-
open:
|
|
6446
|
+
open: b,
|
|
6441
6447
|
className: v,
|
|
6442
6448
|
onOutsideClick: y,
|
|
6443
6449
|
floatingStyles: d,
|
|
@@ -6453,16 +6459,16 @@ const md = {
|
|
|
6453
6459
|
anchorRef: a.setReference,
|
|
6454
6460
|
Popover: c
|
|
6455
6461
|
};
|
|
6456
|
-
},
|
|
6462
|
+
}, Td = "flex flex-col bg-white border mt-1 border-gray-200 rounded-xl shadow-lg p-3 overflow-y-auto relative", Sd = (t) => {
|
|
6457
6463
|
const {
|
|
6458
6464
|
className: e,
|
|
6459
6465
|
children: n,
|
|
6460
6466
|
...s
|
|
6461
6467
|
} = t;
|
|
6462
|
-
return /* @__PURE__ */
|
|
6468
|
+
return /* @__PURE__ */ w.jsx(
|
|
6463
6469
|
"div",
|
|
6464
6470
|
{
|
|
6465
|
-
className: W(
|
|
6471
|
+
className: W(Td, e),
|
|
6466
6472
|
...s,
|
|
6467
6473
|
children: n
|
|
6468
6474
|
}
|
|
@@ -6472,7 +6478,7 @@ const md = {
|
|
|
6472
6478
|
onClick: e,
|
|
6473
6479
|
Icon: n
|
|
6474
6480
|
} = t;
|
|
6475
|
-
return /* @__PURE__ */
|
|
6481
|
+
return /* @__PURE__ */ w.jsx(
|
|
6476
6482
|
"div",
|
|
6477
6483
|
{
|
|
6478
6484
|
onClick: e,
|
|
@@ -6480,7 +6486,7 @@ const md = {
|
|
|
6480
6486
|
"h-6 w-6 select-none rounded-full p-0.5",
|
|
6481
6487
|
e && "ring-0 transition-all duration-150 ring-gray-200 active:ring-2 cursor-pointer hover:ring-4 group"
|
|
6482
6488
|
),
|
|
6483
|
-
children: /* @__PURE__ */
|
|
6489
|
+
children: /* @__PURE__ */ w.jsx(n, { className: W("h-5 w-5 text-gray-500", e && "group-active:scale-[0.8] transition-transform origin-center") })
|
|
6484
6490
|
}
|
|
6485
6491
|
);
|
|
6486
6492
|
}, kd = (t) => {
|
|
@@ -6503,7 +6509,7 @@ const md = {
|
|
|
6503
6509
|
fullWidth: !0,
|
|
6504
6510
|
onOutsideClick: () => f(!1)
|
|
6505
6511
|
});
|
|
6506
|
-
return /* @__PURE__ */
|
|
6512
|
+
return /* @__PURE__ */ w.jsxs(
|
|
6507
6513
|
"div",
|
|
6508
6514
|
{
|
|
6509
6515
|
className: W(
|
|
@@ -6511,9 +6517,9 @@ const md = {
|
|
|
6511
6517
|
e
|
|
6512
6518
|
),
|
|
6513
6519
|
children: [
|
|
6514
|
-
/* @__PURE__ */
|
|
6515
|
-
/* @__PURE__ */
|
|
6516
|
-
/* @__PURE__ */
|
|
6520
|
+
/* @__PURE__ */ w.jsx(Hn, { children: n }),
|
|
6521
|
+
/* @__PURE__ */ w.jsxs("div", { className: "relative flex w-full flex-col", ref: m, children: [
|
|
6522
|
+
/* @__PURE__ */ w.jsxs(
|
|
6517
6523
|
"div",
|
|
6518
6524
|
{
|
|
6519
6525
|
ref: h,
|
|
@@ -6527,20 +6533,20 @@ const md = {
|
|
|
6527
6533
|
onKeyDown: (x) => x.key === " " && f((v) => !v),
|
|
6528
6534
|
onClick: () => f(!c),
|
|
6529
6535
|
children: [
|
|
6530
|
-
d && /* @__PURE__ */
|
|
6531
|
-
!d && a && /* @__PURE__ */
|
|
6536
|
+
d && /* @__PURE__ */ w.jsx("span", { children: d.label }),
|
|
6537
|
+
!d && a && /* @__PURE__ */ w.jsx("span", { children: a })
|
|
6532
6538
|
]
|
|
6533
6539
|
}
|
|
6534
6540
|
),
|
|
6535
|
-
/* @__PURE__ */
|
|
6536
|
-
u && /* @__PURE__ */
|
|
6537
|
-
!!r && /* @__PURE__ */
|
|
6538
|
-
/* @__PURE__ */
|
|
6541
|
+
/* @__PURE__ */ w.jsxs(Xn, { children: [
|
|
6542
|
+
u && /* @__PURE__ */ w.jsx(Yn, {}),
|
|
6543
|
+
!!r && /* @__PURE__ */ w.jsx(Un, { Icon: Aa, onClick: () => o(null) }),
|
|
6544
|
+
/* @__PURE__ */ w.jsx(Un, { Icon: ur })
|
|
6539
6545
|
] }),
|
|
6540
|
-
/* @__PURE__ */
|
|
6546
|
+
/* @__PURE__ */ w.jsx(y, { open: c, children: /* @__PURE__ */ w.jsx(Sd, { className: "!p-0", style: { maxHeight: l }, children: /* @__PURE__ */ w.jsx("div", { className: "flex flex-col p-2 gap-1", children: i.map((x) => {
|
|
6541
6547
|
const v = x.value === r;
|
|
6542
|
-
return /* @__PURE__ */
|
|
6543
|
-
|
|
6548
|
+
return /* @__PURE__ */ w.jsx(
|
|
6549
|
+
Da,
|
|
6544
6550
|
{
|
|
6545
6551
|
onClick: () => {
|
|
6546
6552
|
!x.disabled && o && (o(x.value), f(!1));
|
|
@@ -6553,8 +6559,8 @@ const md = {
|
|
|
6553
6559
|
);
|
|
6554
6560
|
}) }) }) })
|
|
6555
6561
|
] }),
|
|
6556
|
-
/* @__PURE__ */
|
|
6557
|
-
/* @__PURE__ */
|
|
6562
|
+
/* @__PURE__ */ w.jsx($e, { children: s }),
|
|
6563
|
+
/* @__PURE__ */ w.jsx(We, { children: u })
|
|
6558
6564
|
]
|
|
6559
6565
|
}
|
|
6560
6566
|
);
|
|
@@ -6567,7 +6573,7 @@ const md = {
|
|
|
6567
6573
|
error: o,
|
|
6568
6574
|
...r
|
|
6569
6575
|
} = t;
|
|
6570
|
-
return /* @__PURE__ */
|
|
6576
|
+
return /* @__PURE__ */ w.jsxs(
|
|
6571
6577
|
"div",
|
|
6572
6578
|
{
|
|
6573
6579
|
className: W(
|
|
@@ -6575,9 +6581,9 @@ const md = {
|
|
|
6575
6581
|
e
|
|
6576
6582
|
),
|
|
6577
6583
|
children: [
|
|
6578
|
-
/* @__PURE__ */
|
|
6579
|
-
/* @__PURE__ */
|
|
6580
|
-
/* @__PURE__ */
|
|
6584
|
+
/* @__PURE__ */ w.jsx(Hn, { children: n }),
|
|
6585
|
+
/* @__PURE__ */ w.jsxs("div", { className: "relative flex w-full flex-col", children: [
|
|
6586
|
+
/* @__PURE__ */ w.jsx(
|
|
6581
6587
|
"select",
|
|
6582
6588
|
{
|
|
6583
6589
|
className: `
|
|
@@ -6601,7 +6607,7 @@ const md = {
|
|
|
6601
6607
|
focus:outline-none
|
|
6602
6608
|
`,
|
|
6603
6609
|
...r,
|
|
6604
|
-
children: i && i.map((a, l) => /* @__PURE__ */
|
|
6610
|
+
children: i && i.map((a, l) => /* @__PURE__ */ w.jsx(
|
|
6605
6611
|
"option",
|
|
6606
6612
|
{
|
|
6607
6613
|
value: a.value,
|
|
@@ -6612,13 +6618,13 @@ const md = {
|
|
|
6612
6618
|
))
|
|
6613
6619
|
}
|
|
6614
6620
|
),
|
|
6615
|
-
/* @__PURE__ */
|
|
6616
|
-
o && /* @__PURE__ */
|
|
6617
|
-
/* @__PURE__ */
|
|
6621
|
+
/* @__PURE__ */ w.jsxs(Xn, { children: [
|
|
6622
|
+
o && /* @__PURE__ */ w.jsx(Yn, {}),
|
|
6623
|
+
/* @__PURE__ */ w.jsx(Un, { Icon: ur })
|
|
6618
6624
|
] })
|
|
6619
6625
|
] }),
|
|
6620
|
-
/* @__PURE__ */
|
|
6621
|
-
/* @__PURE__ */
|
|
6626
|
+
/* @__PURE__ */ w.jsx($e, { children: s }),
|
|
6627
|
+
/* @__PURE__ */ w.jsx(We, { children: o })
|
|
6622
6628
|
]
|
|
6623
6629
|
}
|
|
6624
6630
|
);
|
|
@@ -6628,7 +6634,7 @@ const md = {
|
|
|
6628
6634
|
children: s,
|
|
6629
6635
|
...i
|
|
6630
6636
|
} = t;
|
|
6631
|
-
return /* @__PURE__ */
|
|
6637
|
+
return /* @__PURE__ */ w.jsx(
|
|
6632
6638
|
"div",
|
|
6633
6639
|
{
|
|
6634
6640
|
ref: e,
|
|
@@ -6646,7 +6652,7 @@ const md = {
|
|
|
6646
6652
|
vertical: n = !1,
|
|
6647
6653
|
...s
|
|
6648
6654
|
} = t;
|
|
6649
|
-
return /* @__PURE__ */
|
|
6655
|
+
return /* @__PURE__ */ w.jsx(
|
|
6650
6656
|
"div",
|
|
6651
6657
|
{
|
|
6652
6658
|
className: W(
|
|
@@ -6656,45 +6662,46 @@ const md = {
|
|
|
6656
6662
|
...s
|
|
6657
6663
|
}
|
|
6658
6664
|
);
|
|
6659
|
-
},
|
|
6665
|
+
}, Pd = (t) => {
|
|
6660
6666
|
const {
|
|
6661
6667
|
columns: e,
|
|
6662
6668
|
rows: n
|
|
6663
6669
|
} = t;
|
|
6664
|
-
return /* @__PURE__ */
|
|
6665
|
-
/* @__PURE__ */
|
|
6666
|
-
/* @__PURE__ */
|
|
6670
|
+
return /* @__PURE__ */ w.jsxs("table", { children: [
|
|
6671
|
+
/* @__PURE__ */ w.jsx("thead", { children: /* @__PURE__ */ w.jsx("tr", { className: "text-left", children: e.map((s) => /* @__PURE__ */ w.jsx("th", { children: s.header }, s.id)) }) }),
|
|
6672
|
+
/* @__PURE__ */ w.jsx("tbody", { children: n.map((s, i) => /* @__PURE__ */ w.jsx("tr", { children: e.map((o) => /* @__PURE__ */ w.jsx("td", { children: o.renderCell(s) }, o.id)) }, i)) })
|
|
6667
6673
|
] });
|
|
6668
|
-
},
|
|
6674
|
+
}, Cd = [
|
|
6669
6675
|
{ id: 1, email: "matthiaskrijgsman@gmail.com", firstname: "Matthias", lastname: "Krijgsman", status: "active" },
|
|
6670
6676
|
{ id: 2, email: "dennis@snijder.io", firstname: "Dennis", lastname: "Snijder", status: "inactive" },
|
|
6671
6677
|
{ id: 3, email: "arcokrijgsman@gmail.com", firstname: "Arco", lastname: "Krijgsman", status: "active" }
|
|
6672
|
-
],
|
|
6678
|
+
], Ad = [
|
|
6673
6679
|
{ id: "id", header: "ID", renderCell: (t) => t.id },
|
|
6674
6680
|
{ id: "email", header: "Email", renderCell: (t) => t.email },
|
|
6675
6681
|
{ id: "firstname", header: "First Name", renderCell: (t) => t.firstname },
|
|
6676
6682
|
{ id: "lastname", header: "Last Name", renderCell: (t) => t.lastname },
|
|
6677
6683
|
{ id: "status", header: "Status", renderCell: (t) => t.status }
|
|
6678
|
-
], Nd = () => /* @__PURE__ */
|
|
6679
|
-
/* @__PURE__ */
|
|
6680
|
-
/* @__PURE__ */
|
|
6681
|
-
|
|
6684
|
+
], Nd = () => /* @__PURE__ */ w.jsxs("div", { className: "flex flex-col gap-12", children: [
|
|
6685
|
+
/* @__PURE__ */ w.jsx(ma, { variant: "primary", children: "Test" }),
|
|
6686
|
+
/* @__PURE__ */ w.jsx(Va, { type: "text", label: "Label", description: "Description", placeholder: "Enter something" }),
|
|
6687
|
+
/* @__PURE__ */ w.jsx(
|
|
6688
|
+
Pd,
|
|
6682
6689
|
{
|
|
6683
|
-
columns:
|
|
6684
|
-
rows:
|
|
6690
|
+
columns: Ad,
|
|
6691
|
+
rows: Cd
|
|
6685
6692
|
}
|
|
6686
6693
|
)
|
|
6687
6694
|
] });
|
|
6688
6695
|
export {
|
|
6689
|
-
|
|
6696
|
+
ma as Button,
|
|
6690
6697
|
Vd as ButtonIconRound,
|
|
6691
6698
|
Ed as ButtonIconSquare,
|
|
6692
6699
|
Od as Divider,
|
|
6693
|
-
|
|
6700
|
+
Va as Input,
|
|
6694
6701
|
Dd as InputCheck,
|
|
6695
6702
|
kd as InputSelect,
|
|
6696
6703
|
jd as InputSelectNative,
|
|
6697
6704
|
Ld as Panel,
|
|
6698
6705
|
Nd as Test
|
|
6699
6706
|
};
|
|
6700
|
-
//# sourceMappingURL=
|
|
6707
|
+
//# sourceMappingURL=index.js.map
|