@ukpc-lib/react 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/index.cjs +4 -4
- package/dist/components/index.js +536 -535
- package/dist/index.css +1 -1
- package/dist/share/index.cjs +1 -1
- package/dist/share/index.js +1 -1
- package/package.json +1 -1
- package/web-components-bundle/global-menu/index.cjs +2 -2
- package/web-components-bundle/global-menu/index.js +2 -2
- package/web-components-bundle/global-topbar/index.cjs +2 -2
- package/web-components-bundle/global-topbar/index.js +7 -7
- package/web-components-bundle/{index-89f82cd2.cjs → index-2a824d74.cjs} +9 -9
- package/web-components-bundle/{index-e8e3a887.js → index-f1edf829.js} +231 -230
package/dist/components/index.js
CHANGED
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
import "../index.css";
|
|
2
|
-
import Xe, { jsxs as
|
|
2
|
+
import Xe, { jsxs as F, jsx as P, Fragment as Ao } from "react/jsx-runtime";
|
|
3
3
|
import * as R from "react";
|
|
4
|
-
import zs, { useState as ot, useRef as St, useEffect as Wt, createContext as Mt, useLayoutEffect as Ws, useContext as
|
|
5
|
-
import { g as Do, a as Ro, s as
|
|
4
|
+
import zs, { useState as ot, useRef as St, useEffect as Wt, createContext as Mt, useLayoutEffect as Ws, useContext as _, useInsertionEffect as So, useCallback as Vo, useMemo as he, forwardRef as Co, createElement as Gs, useId as Mo } from "react";
|
|
5
|
+
import { g as Do, a as Ro, s as ko, c as Nt, u as Lo, _ as Eo, b as Ie, d as Bo, P as D, e as Io, C as jo, r as Fo, f as Oo } from "../styled-f324a192.js";
|
|
6
6
|
import { createPortal as No } from "react-dom";
|
|
7
|
-
import { useLocation as
|
|
7
|
+
import { useLocation as _o, Link as Uo } from "react-router-dom";
|
|
8
8
|
import zo from "axios";
|
|
9
|
-
const Wo = "
|
|
10
|
-
"avatar-dropdown-item": "_avatar-dropdown-
|
|
9
|
+
const Wo = "_avartarDropdownMenu_1jszk_13", Go = "_navbar_1jszk_31", $o = "_userContainer_1jszk_68", Ho = "_userFullName_1jszk_74", qo = "_userAvatar_1jszk_81", Ko = "_relative_1jszk_89", z = {
|
|
10
|
+
"avatar-dropdown-item": "_avatar-dropdown-item_1jszk_1",
|
|
11
11
|
avartarDropdownMenu: Wo,
|
|
12
12
|
navbar: Go,
|
|
13
|
-
"navbar-container": "_navbar-
|
|
14
|
-
"
|
|
13
|
+
"navbar-container": "_navbar-container_1jszk_42",
|
|
14
|
+
"logo-container": "_logo-container_1jszk_50",
|
|
15
|
+
"right-side-container": "_right-side-container_1jszk_59",
|
|
15
16
|
userContainer: $o,
|
|
16
17
|
userFullName: Ho,
|
|
17
18
|
userAvatar: qo,
|
|
18
19
|
relative: Ko,
|
|
19
|
-
"cursor-pointer": "_cursor-
|
|
20
|
+
"cursor-pointer": "_cursor-pointer_1jszk_93"
|
|
20
21
|
};
|
|
21
22
|
function Yo() {
|
|
22
|
-
return /* @__PURE__ */
|
|
23
|
+
return /* @__PURE__ */ F(
|
|
23
24
|
"svg",
|
|
24
25
|
{
|
|
25
26
|
width: "24",
|
|
@@ -28,7 +29,7 @@ function Yo() {
|
|
|
28
29
|
fill: "none",
|
|
29
30
|
xmlns: "http://www.w3.org/2000/svg",
|
|
30
31
|
children: [
|
|
31
|
-
/* @__PURE__ */
|
|
32
|
+
/* @__PURE__ */ P(
|
|
32
33
|
"path",
|
|
33
34
|
{
|
|
34
35
|
"fill-rule": "evenodd",
|
|
@@ -40,7 +41,7 @@ function Yo() {
|
|
|
40
41
|
"stroke-linejoin": "round"
|
|
41
42
|
}
|
|
42
43
|
),
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
+
/* @__PURE__ */ P(
|
|
44
45
|
"path",
|
|
45
46
|
{
|
|
46
47
|
d: "M13.8274 20.0286C12.6679 21.3161 10.8591 21.3313 9.68848 20.0286",
|
|
@@ -50,13 +51,13 @@ function Yo() {
|
|
|
50
51
|
"stroke-linejoin": "round"
|
|
51
52
|
}
|
|
52
53
|
),
|
|
53
|
-
/* @__PURE__ */
|
|
54
|
+
/* @__PURE__ */ P("circle", { cx: "16.928", cy: "7", r: "2", fill: "#E01B00", stroke: "white" })
|
|
54
55
|
]
|
|
55
56
|
}
|
|
56
57
|
);
|
|
57
58
|
}
|
|
58
59
|
function Xo() {
|
|
59
|
-
return /* @__PURE__ */
|
|
60
|
+
return /* @__PURE__ */ F(
|
|
60
61
|
"svg",
|
|
61
62
|
{
|
|
62
63
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -65,7 +66,7 @@ function Xo() {
|
|
|
65
66
|
viewBox: "0 0 24 25",
|
|
66
67
|
fill: "none",
|
|
67
68
|
children: [
|
|
68
|
-
/* @__PURE__ */
|
|
69
|
+
/* @__PURE__ */ P(
|
|
69
70
|
"path",
|
|
70
71
|
{
|
|
71
72
|
d: "M8.5 19.5H8C4 19.5 2 18.5 2 13.5V8.5C2 4.5 4 2.5 8 2.5H16C20 2.5 22 4.5 22 8.5V13.5C22 17.5 20 19.5 16 19.5H15.5C15.19 19.5 14.89 19.65 14.7 19.9L13.2 21.9C12.54 22.78 11.46 22.78 10.8 21.9L9.3 19.9C9.14 19.68 8.77 19.5 8.5 19.5Z",
|
|
@@ -76,7 +77,7 @@ function Xo() {
|
|
|
76
77
|
"stroke-linejoin": "round"
|
|
77
78
|
}
|
|
78
79
|
),
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
+
/* @__PURE__ */ P(
|
|
80
81
|
"path",
|
|
81
82
|
{
|
|
82
83
|
d: "M15.9965 11.5H16.0054",
|
|
@@ -86,7 +87,7 @@ function Xo() {
|
|
|
86
87
|
"stroke-linejoin": "round"
|
|
87
88
|
}
|
|
88
89
|
),
|
|
89
|
-
/* @__PURE__ */
|
|
90
|
+
/* @__PURE__ */ P(
|
|
90
91
|
"path",
|
|
91
92
|
{
|
|
92
93
|
d: "M11.9955 11.5H12.0045",
|
|
@@ -96,7 +97,7 @@ function Xo() {
|
|
|
96
97
|
"stroke-linejoin": "round"
|
|
97
98
|
}
|
|
98
99
|
),
|
|
99
|
-
/* @__PURE__ */
|
|
100
|
+
/* @__PURE__ */ P(
|
|
100
101
|
"path",
|
|
101
102
|
{
|
|
102
103
|
d: "M7.99451 11.5H8.00349",
|
|
@@ -131,18 +132,18 @@ function $s({
|
|
|
131
132
|
var r;
|
|
132
133
|
((r = i.target) == null ? void 0 : r.id) === "modal-wrapper" && e();
|
|
133
134
|
}
|
|
134
|
-
return /* @__PURE__ */
|
|
135
|
+
return /* @__PURE__ */ P(
|
|
135
136
|
"div",
|
|
136
137
|
{
|
|
137
138
|
onClick: s,
|
|
138
139
|
className: Q["modal-overlay"],
|
|
139
140
|
id: "modal-wrapper",
|
|
140
|
-
children: /* @__PURE__ */
|
|
141
|
-
/* @__PURE__ */
|
|
142
|
-
/* @__PURE__ */
|
|
143
|
-
/* @__PURE__ */
|
|
144
|
-
/* @__PURE__ */
|
|
145
|
-
/* @__PURE__ */
|
|
141
|
+
children: /* @__PURE__ */ F("div", { className: Q["modal-container"], children: [
|
|
142
|
+
/* @__PURE__ */ P("h3", { className: Q["modal-title"], children: "Log out" }),
|
|
143
|
+
/* @__PURE__ */ P("p", { className: Q["text-sm"], children: "Are you sure want to log out?" }),
|
|
144
|
+
/* @__PURE__ */ F("div", { className: Q["modal-footer"], children: [
|
|
145
|
+
/* @__PURE__ */ P("button", { className: Q["modal-button"], onClick: e, children: "Cancel" }),
|
|
146
|
+
/* @__PURE__ */ P(
|
|
146
147
|
"button",
|
|
147
148
|
{
|
|
148
149
|
onClick: n,
|
|
@@ -163,21 +164,21 @@ function nh({
|
|
|
163
164
|
classNames: i = ""
|
|
164
165
|
}) {
|
|
165
166
|
const r = t || "/public/assets/icons/logo-header.png";
|
|
166
|
-
return /* @__PURE__ */
|
|
167
|
-
/* @__PURE__ */
|
|
168
|
-
/* @__PURE__ */
|
|
169
|
-
/* @__PURE__ */
|
|
170
|
-
/* @__PURE__ */
|
|
167
|
+
return /* @__PURE__ */ P("nav", { className: `${z.navbar} ${i}`, style: s, children: /* @__PURE__ */ F("div", { className: z["navbar-container"], children: [
|
|
168
|
+
/* @__PURE__ */ P("div", { className: z["logo-container"], children: /* @__PURE__ */ P("img", { src: r, alt: "logo-header" }) }),
|
|
169
|
+
/* @__PURE__ */ F("div", { className: z["right-side-container"], children: [
|
|
170
|
+
/* @__PURE__ */ F("div", { className: z.userContainer, children: [
|
|
171
|
+
/* @__PURE__ */ P(
|
|
171
172
|
"p",
|
|
172
173
|
{
|
|
173
|
-
className:
|
|
174
|
+
className: z.userFullName,
|
|
174
175
|
children: `${e == null ? void 0 : e.firstName} ${e == null ? void 0 : e.lastName}`
|
|
175
176
|
}
|
|
176
177
|
),
|
|
177
|
-
/* @__PURE__ */
|
|
178
|
+
/* @__PURE__ */ P(Zo, { baseUrl: n, avatarUrl: e == null ? void 0 : e.avatarUrl })
|
|
178
179
|
] }),
|
|
179
|
-
/* @__PURE__ */
|
|
180
|
-
/* @__PURE__ */
|
|
180
|
+
/* @__PURE__ */ P("span", { className: z["cursor-pointer"], children: /* @__PURE__ */ P(Yo, {}) }),
|
|
181
|
+
/* @__PURE__ */ P("span", { className: z["cursor-pointer"], children: /* @__PURE__ */ P(Xo, {}) })
|
|
181
182
|
] })
|
|
182
183
|
] }) });
|
|
183
184
|
}
|
|
@@ -186,38 +187,38 @@ function Zo({
|
|
|
186
187
|
baseUrl: e
|
|
187
188
|
}) {
|
|
188
189
|
const [n, s] = ot(!1), [i, r] = ot(!1), o = St(null), a = St(null), l = () => {
|
|
189
|
-
window.location.href = `${e}/authentication/logout?callbackUrl=${window.location.
|
|
190
|
+
window.location.href = `${e}/authentication/logout?callbackUrl=${window.location.href}`;
|
|
190
191
|
};
|
|
191
192
|
return Wt(() => {
|
|
192
193
|
function c(u) {
|
|
193
194
|
u.target !== a.current && u.target !== o.current && s(!1);
|
|
194
195
|
}
|
|
195
196
|
return window.addEventListener("click", c), () => window.removeEventListener("click", c);
|
|
196
|
-
}, []), /* @__PURE__ */
|
|
197
|
-
/* @__PURE__ */
|
|
198
|
-
/* @__PURE__ */
|
|
197
|
+
}, []), /* @__PURE__ */ F(Ao, { children: [
|
|
198
|
+
/* @__PURE__ */ F("div", { className: z.relative, children: [
|
|
199
|
+
/* @__PURE__ */ P(
|
|
199
200
|
"img",
|
|
200
201
|
{
|
|
201
202
|
ref: o,
|
|
202
203
|
onClick: () => s((c) => !c),
|
|
203
204
|
alt: "user avatar",
|
|
204
|
-
className:
|
|
205
|
+
className: z.userAvatar,
|
|
205
206
|
src: t || Qo
|
|
206
207
|
}
|
|
207
208
|
),
|
|
208
|
-
n && /* @__PURE__ */
|
|
209
|
-
/* @__PURE__ */
|
|
210
|
-
/* @__PURE__ */
|
|
209
|
+
n && /* @__PURE__ */ P("div", { ref: a, className: z.avartarDropdownMenu, children: /* @__PURE__ */ F("ul", { children: [
|
|
210
|
+
/* @__PURE__ */ P("li", { className: z["avatar-dropdown-item"], children: "Profile" }),
|
|
211
|
+
/* @__PURE__ */ P(
|
|
211
212
|
"li",
|
|
212
213
|
{
|
|
213
214
|
onClick: () => r(!0),
|
|
214
|
-
className:
|
|
215
|
+
className: z["avatar-dropdown-item"],
|
|
215
216
|
children: "Logout"
|
|
216
217
|
}
|
|
217
218
|
)
|
|
218
219
|
] }) })
|
|
219
220
|
] }),
|
|
220
|
-
/* @__PURE__ */
|
|
221
|
+
/* @__PURE__ */ P(
|
|
221
222
|
$s,
|
|
222
223
|
{
|
|
223
224
|
isOpen: i,
|
|
@@ -236,7 +237,7 @@ var Qe = {}, Hs = { exports: {} };
|
|
|
236
237
|
}
|
|
237
238
|
t.exports = e, t.exports.__esModule = !0, t.exports.default = t.exports;
|
|
238
239
|
})(Hs);
|
|
239
|
-
var Ze = Hs.exports,
|
|
240
|
+
var Ze = Hs.exports, Te = {};
|
|
240
241
|
function Jo(...t) {
|
|
241
242
|
return t.reduce((e, n) => n == null ? e : function(...i) {
|
|
242
243
|
e.apply(this, i), n.apply(this, i);
|
|
@@ -280,17 +281,17 @@ function Ks(t, e) {
|
|
|
280
281
|
typeof t == "function" ? t(e) : t && (t.current = e);
|
|
281
282
|
}
|
|
282
283
|
const ir = typeof window < "u" ? R.useLayoutEffect : R.useEffect, Ys = ir;
|
|
283
|
-
let
|
|
284
|
+
let kn = 0;
|
|
284
285
|
function or(t) {
|
|
285
286
|
const [e, n] = R.useState(t), s = t || e;
|
|
286
287
|
return R.useEffect(() => {
|
|
287
|
-
e == null && (
|
|
288
|
+
e == null && (kn += 1, n(`mui-${kn}`));
|
|
288
289
|
}, [e]), s;
|
|
289
290
|
}
|
|
290
|
-
const
|
|
291
|
+
const Ln = R["useId".toString()];
|
|
291
292
|
function rr(t) {
|
|
292
|
-
if (
|
|
293
|
-
const e =
|
|
293
|
+
if (Ln !== void 0) {
|
|
294
|
+
const e = Ln();
|
|
294
295
|
return t ?? e;
|
|
295
296
|
}
|
|
296
297
|
return or(t);
|
|
@@ -344,7 +345,7 @@ function ur(...t) {
|
|
|
344
345
|
});
|
|
345
346
|
}, t);
|
|
346
347
|
}
|
|
347
|
-
let fe = !0,
|
|
348
|
+
let fe = !0, je = !1, En;
|
|
348
349
|
const hr = {
|
|
349
350
|
text: !0,
|
|
350
351
|
search: !0,
|
|
@@ -370,14 +371,14 @@ function fr(t) {
|
|
|
370
371
|
function dr(t) {
|
|
371
372
|
t.metaKey || t.altKey || t.ctrlKey || (fe = !0);
|
|
372
373
|
}
|
|
373
|
-
function
|
|
374
|
+
function Pe() {
|
|
374
375
|
fe = !1;
|
|
375
376
|
}
|
|
376
377
|
function mr() {
|
|
377
|
-
this.visibilityState === "hidden" &&
|
|
378
|
+
this.visibilityState === "hidden" && je && (fe = !0);
|
|
378
379
|
}
|
|
379
380
|
function pr(t) {
|
|
380
|
-
t.addEventListener("keydown", dr, !0), t.addEventListener("mousedown",
|
|
381
|
+
t.addEventListener("keydown", dr, !0), t.addEventListener("mousedown", Pe, !0), t.addEventListener("pointerdown", Pe, !0), t.addEventListener("touchstart", Pe, !0), t.addEventListener("visibilitychange", mr, !0);
|
|
381
382
|
}
|
|
382
383
|
function gr(t) {
|
|
383
384
|
const {
|
|
@@ -394,8 +395,8 @@ function yr() {
|
|
|
394
395
|
i != null && pr(i.ownerDocument);
|
|
395
396
|
}, []), e = R.useRef(!1);
|
|
396
397
|
function n() {
|
|
397
|
-
return e.current ? (
|
|
398
|
-
|
|
398
|
+
return e.current ? (je = !0, window.clearTimeout(En), En = window.setTimeout(() => {
|
|
399
|
+
je = !1;
|
|
399
400
|
}, 100), e.current = !1, !0) : !1;
|
|
400
401
|
}
|
|
401
402
|
function s(i) {
|
|
@@ -421,7 +422,7 @@ const xr = ["children", "className", "color", "component", "fontSize", "htmlColo
|
|
|
421
422
|
root: ["root", e !== "inherit" && `color${Nt(e)}`, `fontSize${Nt(n)}`]
|
|
422
423
|
};
|
|
423
424
|
return Io(i, vr, s);
|
|
424
|
-
},
|
|
425
|
+
}, Tr = ko("svg", {
|
|
425
426
|
name: "MuiSvgIcon",
|
|
426
427
|
slot: "Root",
|
|
427
428
|
overridesResolver: (t, e) => {
|
|
@@ -461,7 +462,7 @@ const xr = ["children", "className", "color", "component", "fontSize", "htmlColo
|
|
|
461
462
|
}[e.color]
|
|
462
463
|
};
|
|
463
464
|
}), Je = /* @__PURE__ */ R.forwardRef(function(e, n) {
|
|
464
|
-
const s =
|
|
465
|
+
const s = Lo({
|
|
465
466
|
props: e,
|
|
466
467
|
name: "MuiSvgIcon"
|
|
467
468
|
}), {
|
|
@@ -474,7 +475,7 @@ const xr = ["children", "className", "color", "component", "fontSize", "htmlColo
|
|
|
474
475
|
inheritViewBox: u = !1,
|
|
475
476
|
titleAccess: h,
|
|
476
477
|
viewBox: f = "0 0 24 24"
|
|
477
|
-
} = s, d =
|
|
478
|
+
} = s, d = Eo(s, xr), m = /* @__PURE__ */ R.isValidElement(i) && i.type === "svg", p = Ie({}, s, {
|
|
478
479
|
color: o,
|
|
479
480
|
component: a,
|
|
480
481
|
fontSize: l,
|
|
@@ -485,7 +486,7 @@ const xr = ["children", "className", "color", "component", "fontSize", "htmlColo
|
|
|
485
486
|
}), v = {};
|
|
486
487
|
u || (v.viewBox = f);
|
|
487
488
|
const b = br(p);
|
|
488
|
-
return /* @__PURE__ */
|
|
489
|
+
return /* @__PURE__ */ F(Tr, Ie({
|
|
489
490
|
as: a,
|
|
490
491
|
className: Bo(b.root, r),
|
|
491
492
|
focusable: "false",
|
|
@@ -495,7 +496,7 @@ const xr = ["children", "className", "color", "component", "fontSize", "htmlColo
|
|
|
495
496
|
ref: n
|
|
496
497
|
}, v, d, m && i.props, {
|
|
497
498
|
ownerState: p,
|
|
498
|
-
children: [m ? i.props.children : i, h ? /* @__PURE__ */
|
|
499
|
+
children: [m ? i.props.children : i, h ? /* @__PURE__ */ P("title", {
|
|
499
500
|
children: h
|
|
500
501
|
}) : null]
|
|
501
502
|
}));
|
|
@@ -574,9 +575,9 @@ process.env.NODE_ENV !== "production" && (Je.propTypes = {
|
|
|
574
575
|
});
|
|
575
576
|
Je.muiName = "SvgIcon";
|
|
576
577
|
const Bn = Je;
|
|
577
|
-
function
|
|
578
|
+
function Pr(t, e) {
|
|
578
579
|
function n(s, i) {
|
|
579
|
-
return /* @__PURE__ */
|
|
580
|
+
return /* @__PURE__ */ P(Bn, Ie({
|
|
580
581
|
"data-testid": `${e}Icon`,
|
|
581
582
|
ref: i
|
|
582
583
|
}, s, {
|
|
@@ -585,24 +586,24 @@ function Tr(t, e) {
|
|
|
585
586
|
}
|
|
586
587
|
return process.env.NODE_ENV !== "production" && (n.displayName = `${e}Icon`), n.muiName = Bn.muiName, /* @__PURE__ */ R.memo(/* @__PURE__ */ R.forwardRef(n));
|
|
587
588
|
}
|
|
588
|
-
const
|
|
589
|
+
const wr = {
|
|
589
590
|
configure: (t) => {
|
|
590
591
|
process.env.NODE_ENV !== "production" && console.warn(["MUI: `ClassNameGenerator` import from `@mui/material/utils` is outdated and might cause unexpected issues.", "", "You should use `import { unstable_ClassNameGenerator } from '@mui/material/className'` instead", "", "The detail of the issue: https://github.com/mui/material-ui/issues/30011#issuecomment-1024993401", "", "The updated documentation: https://mui.com/guides/classname-generator/"].join(`
|
|
591
|
-
`)),
|
|
592
|
+
`)), jo.configure(t);
|
|
592
593
|
}
|
|
593
594
|
}, Ar = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
594
595
|
__proto__: null,
|
|
595
596
|
capitalize: Nt,
|
|
596
597
|
createChainedFunction: Jo,
|
|
597
|
-
createSvgIcon:
|
|
598
|
+
createSvgIcon: Pr,
|
|
598
599
|
debounce: tr,
|
|
599
600
|
deprecatedPropType: er,
|
|
600
601
|
isMuiElement: nr,
|
|
601
602
|
ownerDocument: qs,
|
|
602
603
|
ownerWindow: sr,
|
|
603
|
-
requirePropFactory:
|
|
604
|
+
requirePropFactory: Fo,
|
|
604
605
|
setRef: Ks,
|
|
605
|
-
unstable_ClassNameGenerator:
|
|
606
|
+
unstable_ClassNameGenerator: wr,
|
|
606
607
|
unstable_useEnhancedEffect: Ys,
|
|
607
608
|
unstable_useId: rr,
|
|
608
609
|
unsupportedProp: ar,
|
|
@@ -610,7 +611,7 @@ const Pr = {
|
|
|
610
611
|
useEventCallback: cr,
|
|
611
612
|
useForkRef: ur,
|
|
612
613
|
useIsFocusVisible: yr
|
|
613
|
-
}, Symbol.toStringTag, { value: "Module" })), Sr = /* @__PURE__ */
|
|
614
|
+
}, Symbol.toStringTag, { value: "Module" })), Sr = /* @__PURE__ */ Oo(Ar);
|
|
614
615
|
var In;
|
|
615
616
|
function tn() {
|
|
616
617
|
return In || (In = 1, function(t) {
|
|
@@ -624,7 +625,7 @@ function tn() {
|
|
|
624
625
|
}
|
|
625
626
|
});
|
|
626
627
|
var e = Sr;
|
|
627
|
-
}(
|
|
628
|
+
}(Te)), Te;
|
|
628
629
|
}
|
|
629
630
|
var Vr = Ze;
|
|
630
631
|
Object.defineProperty(Qe, "__esModule", {
|
|
@@ -638,25 +639,25 @@ var en = {}, Dr = Ze;
|
|
|
638
639
|
Object.defineProperty(en, "__esModule", {
|
|
639
640
|
value: !0
|
|
640
641
|
});
|
|
641
|
-
var Qs = en.default = void 0, Rr = Dr(tn()),
|
|
642
|
-
Qs = en.default = (0, Rr.default)(/* @__PURE__ */ (0,
|
|
642
|
+
var Qs = en.default = void 0, Rr = Dr(tn()), kr = Xe;
|
|
643
|
+
Qs = en.default = (0, Rr.default)(/* @__PURE__ */ (0, kr.jsx)("path", {
|
|
643
644
|
d: "M4 18h11c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1m0-5h8c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1M3 7c0 .55.45 1 1 1h11c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1m17.3 7.88L17.42 12l2.88-2.88c.39-.39.39-1.02 0-1.41a.9959.9959 0 0 0-1.41 0L15.3 11.3c-.39.39-.39 1.02 0 1.41l3.59 3.59c.39.39 1.02.39 1.41 0 .38-.39.39-1.03 0-1.42"
|
|
644
645
|
}), "MenuOpenRounded");
|
|
645
|
-
var nn = {},
|
|
646
|
+
var nn = {}, Lr = Ze;
|
|
646
647
|
Object.defineProperty(nn, "__esModule", {
|
|
647
648
|
value: !0
|
|
648
649
|
});
|
|
649
|
-
var Zs = nn.default = void 0,
|
|
650
|
-
Zs = nn.default = (0,
|
|
650
|
+
var Zs = nn.default = void 0, Er = Lr(tn()), Br = Xe;
|
|
651
|
+
Zs = nn.default = (0, Er.default)(/* @__PURE__ */ (0, Br.jsx)("path", {
|
|
651
652
|
d: "M4 18h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1m0-5h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1M3 7c0 .55.45 1 1 1h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1"
|
|
652
653
|
}), "MenuRounded");
|
|
653
654
|
const Js = Mt({
|
|
654
655
|
transformPagePoint: (t) => t,
|
|
655
656
|
isStatic: !1,
|
|
656
657
|
reducedMotion: "never"
|
|
657
|
-
}), de = Mt({}), sn = Mt(null), me = typeof document < "u", Ir = me ? Ws : Wt, ti = Mt({ strict: !1 }), on = (t) => t.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase(),
|
|
658
|
-
function
|
|
659
|
-
const { visualElement: i } =
|
|
658
|
+
}), de = Mt({}), sn = Mt(null), me = typeof document < "u", Ir = me ? Ws : Wt, ti = Mt({ strict: !1 }), on = (t) => t.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase(), jr = "framerAppearId", ei = "data-" + on(jr);
|
|
659
|
+
function Fr(t, e, n, s) {
|
|
660
|
+
const { visualElement: i } = _(de), r = _(ti), o = _(sn), a = _(Js).reducedMotion, l = St();
|
|
660
661
|
s = s || r.renderer, !l.current && s && (l.current = s(t, {
|
|
661
662
|
visualState: e,
|
|
662
663
|
parent: i,
|
|
@@ -676,13 +677,13 @@ function Or(t, e, n, s) {
|
|
|
676
677
|
c && (c.updateFeatures(), !u.current && c.animationState && c.animationState.animateChanges(), u.current && (u.current = !1, window.HandoffComplete = !0));
|
|
677
678
|
}), c;
|
|
678
679
|
}
|
|
679
|
-
function
|
|
680
|
+
function Tt(t) {
|
|
680
681
|
return t && typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "current");
|
|
681
682
|
}
|
|
682
|
-
function
|
|
683
|
+
function Or(t, e, n) {
|
|
683
684
|
return Vo(
|
|
684
685
|
(s) => {
|
|
685
|
-
s && t.mount && t.mount(s), e && (s ? e.mount(s) : e.unmount()), n && (typeof n == "function" ? n(s) :
|
|
686
|
+
s && t.mount && t.mount(s), e && (s ? e.mount(s) : e.unmount()), n && (typeof n == "function" ? n(s) : Tt(n) && (n.current = s));
|
|
686
687
|
},
|
|
687
688
|
/**
|
|
688
689
|
* Only pass a new ref callback to React if we've received a visual element
|
|
@@ -692,7 +693,7 @@ function jr(t, e, n) {
|
|
|
692
693
|
[e]
|
|
693
694
|
);
|
|
694
695
|
}
|
|
695
|
-
function
|
|
696
|
+
function _t(t) {
|
|
696
697
|
return typeof t == "string" || Array.isArray(t);
|
|
697
698
|
}
|
|
698
699
|
function pe(t) {
|
|
@@ -708,7 +709,7 @@ const rn = [
|
|
|
708
709
|
"exit"
|
|
709
710
|
], an = ["initial", ...rn];
|
|
710
711
|
function ge(t) {
|
|
711
|
-
return pe(t.animate) || an.some((e) =>
|
|
712
|
+
return pe(t.animate) || an.some((e) => _t(t[e]));
|
|
712
713
|
}
|
|
713
714
|
function ni(t) {
|
|
714
715
|
return !!(ge(t) || t.variants);
|
|
@@ -717,20 +718,20 @@ function Nr(t, e) {
|
|
|
717
718
|
if (ge(t)) {
|
|
718
719
|
const { initial: n, animate: s } = t;
|
|
719
720
|
return {
|
|
720
|
-
initial: n === !1 ||
|
|
721
|
-
animate:
|
|
721
|
+
initial: n === !1 || _t(n) ? n : void 0,
|
|
722
|
+
animate: _t(s) ? s : void 0
|
|
722
723
|
};
|
|
723
724
|
}
|
|
724
725
|
return t.inherit !== !1 ? e : {};
|
|
725
726
|
}
|
|
726
|
-
function
|
|
727
|
-
const { initial: e, animate: n } = Nr(t,
|
|
728
|
-
return he(() => ({ initial: e, animate: n }), [
|
|
727
|
+
function _r(t) {
|
|
728
|
+
const { initial: e, animate: n } = Nr(t, _(de));
|
|
729
|
+
return he(() => ({ initial: e, animate: n }), [jn(e), jn(n)]);
|
|
729
730
|
}
|
|
730
|
-
function
|
|
731
|
+
function jn(t) {
|
|
731
732
|
return Array.isArray(t) ? t.join(" ") : t;
|
|
732
733
|
}
|
|
733
|
-
const
|
|
734
|
+
const Fn = {
|
|
734
735
|
animation: [
|
|
735
736
|
"animate",
|
|
736
737
|
"variants",
|
|
@@ -749,31 +750,31 @@ const On = {
|
|
|
749
750
|
pan: ["onPan", "onPanStart", "onPanSessionStart", "onPanEnd"],
|
|
750
751
|
inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
|
|
751
752
|
layout: ["layout", "layoutId"]
|
|
752
|
-
},
|
|
753
|
-
for (const t in
|
|
754
|
-
|
|
755
|
-
isEnabled: (e) =>
|
|
753
|
+
}, Ut = {};
|
|
754
|
+
for (const t in Fn)
|
|
755
|
+
Ut[t] = {
|
|
756
|
+
isEnabled: (e) => Fn[t].some((n) => !!e[n])
|
|
756
757
|
};
|
|
757
|
-
function
|
|
758
|
+
function Ur(t) {
|
|
758
759
|
for (const e in t)
|
|
759
|
-
|
|
760
|
-
...
|
|
760
|
+
Ut[e] = {
|
|
761
|
+
...Ut[e],
|
|
761
762
|
...t[e]
|
|
762
763
|
};
|
|
763
764
|
}
|
|
764
765
|
const si = Mt({}), ii = Mt({}), zr = Symbol.for("motionComponentSymbol");
|
|
765
766
|
function Wr({ preloadedFeatures: t, createVisualElement: e, useRender: n, useVisualState: s, Component: i }) {
|
|
766
|
-
t &&
|
|
767
|
+
t && Ur(t);
|
|
767
768
|
function r(a, l) {
|
|
768
769
|
let c;
|
|
769
770
|
const u = {
|
|
770
|
-
...
|
|
771
|
+
..._(Js),
|
|
771
772
|
...a,
|
|
772
773
|
layoutId: Gr(a)
|
|
773
|
-
}, { isStatic: h } = u, f =
|
|
774
|
+
}, { isStatic: h } = u, f = _r(a), d = s(a, h);
|
|
774
775
|
if (!h && me) {
|
|
775
|
-
f.visualElement =
|
|
776
|
-
const m =
|
|
776
|
+
f.visualElement = Fr(i, d, u, e);
|
|
777
|
+
const m = _(ii), p = _(ti).strict;
|
|
777
778
|
f.visualElement && (c = f.visualElement.loadFeatures(
|
|
778
779
|
// Note: Pass the full new combined props to correctly re-render dynamic feature components.
|
|
779
780
|
u,
|
|
@@ -786,14 +787,14 @@ function Wr({ preloadedFeatures: t, createVisualElement: e, useRender: n, useVis
|
|
|
786
787
|
de.Provider,
|
|
787
788
|
{ value: f },
|
|
788
789
|
c && f.visualElement ? R.createElement(c, { visualElement: f.visualElement, ...u }) : null,
|
|
789
|
-
n(i, a,
|
|
790
|
+
n(i, a, Or(d, f.visualElement, l), d, h, f.visualElement)
|
|
790
791
|
);
|
|
791
792
|
}
|
|
792
793
|
const o = Co(r);
|
|
793
794
|
return o[zr] = i, o;
|
|
794
795
|
}
|
|
795
796
|
function Gr({ layoutId: t }) {
|
|
796
|
-
const e =
|
|
797
|
+
const e = _(si).id;
|
|
797
798
|
return e && t !== void 0 ? e + "-" + t : t;
|
|
798
799
|
}
|
|
799
800
|
function $r(t) {
|
|
@@ -885,7 +886,7 @@ const Gt = [
|
|
|
885
886
|
function oi(t, { layout: e, layoutId: n }) {
|
|
886
887
|
return gt.has(t) || t.startsWith("origin") || (e || n !== void 0) && (!!se[t] || t === "opacity");
|
|
887
888
|
}
|
|
888
|
-
const
|
|
889
|
+
const U = (t) => !!(t && t.getVelocity), Kr = {
|
|
889
890
|
x: "translateX",
|
|
890
891
|
y: "translateY",
|
|
891
892
|
z: "translateZ",
|
|
@@ -902,7 +903,7 @@ function Xr(t, { enableHardwareAcceleration: e = !0, allowTransformNone: n = !0
|
|
|
902
903
|
}
|
|
903
904
|
return e && !t.z && (r += "translateZ(0)"), r = r.trim(), i ? r = i(t, s ? "" : r) : n && s && (r = "none"), r;
|
|
904
905
|
}
|
|
905
|
-
const ri = (t) => (e) => typeof e == "string" && e.startsWith(t), ai = ri("--"),
|
|
906
|
+
const ri = (t) => (e) => typeof e == "string" && e.startsWith(t), ai = ri("--"), Fe = ri("var(--"), Qr = /var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g, Zr = (t, e) => e && typeof t == "number" ? e.transform(t) : t, lt = (t, e, n) => Math.min(Math.max(n, t), e), yt = {
|
|
906
907
|
test: (t) => typeof t == "number",
|
|
907
908
|
parse: parseFloat,
|
|
908
909
|
transform: (t) => t
|
|
@@ -912,7 +913,7 @@ const ri = (t) => (e) => typeof e == "string" && e.startsWith(t), ai = ri("--"),
|
|
|
912
913
|
}, Xt = {
|
|
913
914
|
...yt,
|
|
914
915
|
default: 1
|
|
915
|
-
},
|
|
916
|
+
}, jt = (t) => Math.round(t * 1e5) / 1e5, ye = /(-)?([\d]*\.?[\d])+/g, li = /(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi, Jr = /^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;
|
|
916
917
|
function $t(t) {
|
|
917
918
|
return typeof t == "string";
|
|
918
919
|
}
|
|
@@ -920,7 +921,7 @@ const Ht = (t) => ({
|
|
|
920
921
|
test: (e) => $t(e) && e.endsWith(t) && e.split(" ").length === 1,
|
|
921
922
|
parse: parseFloat,
|
|
922
923
|
transform: (e) => `${e}${t}`
|
|
923
|
-
}), st = Ht("deg"), K = Ht("%"),
|
|
924
|
+
}), st = Ht("deg"), K = Ht("%"), T = Ht("px"), ta = Ht("vh"), ea = Ht("vw"), On = {
|
|
924
925
|
...K,
|
|
925
926
|
parse: (t) => K.parse(t) / 100,
|
|
926
927
|
transform: (t) => K.transform(t * 100)
|
|
@@ -929,38 +930,38 @@ const Ht = (t) => ({
|
|
|
929
930
|
transform: Math.round
|
|
930
931
|
}, ci = {
|
|
931
932
|
// Border props
|
|
932
|
-
borderWidth:
|
|
933
|
-
borderTopWidth:
|
|
934
|
-
borderRightWidth:
|
|
935
|
-
borderBottomWidth:
|
|
936
|
-
borderLeftWidth:
|
|
937
|
-
borderRadius:
|
|
938
|
-
radius:
|
|
939
|
-
borderTopLeftRadius:
|
|
940
|
-
borderTopRightRadius:
|
|
941
|
-
borderBottomRightRadius:
|
|
942
|
-
borderBottomLeftRadius:
|
|
933
|
+
borderWidth: T,
|
|
934
|
+
borderTopWidth: T,
|
|
935
|
+
borderRightWidth: T,
|
|
936
|
+
borderBottomWidth: T,
|
|
937
|
+
borderLeftWidth: T,
|
|
938
|
+
borderRadius: T,
|
|
939
|
+
radius: T,
|
|
940
|
+
borderTopLeftRadius: T,
|
|
941
|
+
borderTopRightRadius: T,
|
|
942
|
+
borderBottomRightRadius: T,
|
|
943
|
+
borderBottomLeftRadius: T,
|
|
943
944
|
// Positioning props
|
|
944
|
-
width:
|
|
945
|
-
maxWidth:
|
|
946
|
-
height:
|
|
947
|
-
maxHeight:
|
|
948
|
-
size:
|
|
949
|
-
top:
|
|
950
|
-
right:
|
|
951
|
-
bottom:
|
|
952
|
-
left:
|
|
945
|
+
width: T,
|
|
946
|
+
maxWidth: T,
|
|
947
|
+
height: T,
|
|
948
|
+
maxHeight: T,
|
|
949
|
+
size: T,
|
|
950
|
+
top: T,
|
|
951
|
+
right: T,
|
|
952
|
+
bottom: T,
|
|
953
|
+
left: T,
|
|
953
954
|
// Spacing props
|
|
954
|
-
padding:
|
|
955
|
-
paddingTop:
|
|
956
|
-
paddingRight:
|
|
957
|
-
paddingBottom:
|
|
958
|
-
paddingLeft:
|
|
959
|
-
margin:
|
|
960
|
-
marginTop:
|
|
961
|
-
marginRight:
|
|
962
|
-
marginBottom:
|
|
963
|
-
marginLeft:
|
|
955
|
+
padding: T,
|
|
956
|
+
paddingTop: T,
|
|
957
|
+
paddingRight: T,
|
|
958
|
+
paddingBottom: T,
|
|
959
|
+
paddingLeft: T,
|
|
960
|
+
margin: T,
|
|
961
|
+
marginTop: T,
|
|
962
|
+
marginRight: T,
|
|
963
|
+
marginBottom: T,
|
|
964
|
+
marginLeft: T,
|
|
964
965
|
// Transform props
|
|
965
966
|
rotate: st,
|
|
966
967
|
rotateX: st,
|
|
@@ -973,19 +974,19 @@ const Ht = (t) => ({
|
|
|
973
974
|
skew: st,
|
|
974
975
|
skewX: st,
|
|
975
976
|
skewY: st,
|
|
976
|
-
distance:
|
|
977
|
-
translateX:
|
|
978
|
-
translateY:
|
|
979
|
-
translateZ:
|
|
980
|
-
x:
|
|
981
|
-
y:
|
|
982
|
-
z:
|
|
983
|
-
perspective:
|
|
984
|
-
transformPerspective:
|
|
977
|
+
distance: T,
|
|
978
|
+
translateX: T,
|
|
979
|
+
translateY: T,
|
|
980
|
+
translateZ: T,
|
|
981
|
+
x: T,
|
|
982
|
+
y: T,
|
|
983
|
+
z: T,
|
|
984
|
+
perspective: T,
|
|
985
|
+
transformPerspective: T,
|
|
985
986
|
opacity: It,
|
|
986
|
-
originX:
|
|
987
|
-
originY:
|
|
988
|
-
originZ:
|
|
987
|
+
originX: On,
|
|
988
|
+
originY: On,
|
|
989
|
+
originZ: T,
|
|
989
990
|
// Misc
|
|
990
991
|
zIndex: Nn,
|
|
991
992
|
// SVG
|
|
@@ -1023,7 +1024,7 @@ const un = () => ({
|
|
|
1023
1024
|
});
|
|
1024
1025
|
function ui(t, e, n) {
|
|
1025
1026
|
for (const s in e)
|
|
1026
|
-
!
|
|
1027
|
+
!U(e[s]) && !oi(s, n) && (t[s] = e[s]);
|
|
1027
1028
|
}
|
|
1028
1029
|
function na({ transformTemplate: t }, e, n) {
|
|
1029
1030
|
return he(() => {
|
|
@@ -1090,11 +1091,11 @@ function aa(t, e, n) {
|
|
|
1090
1091
|
t.draggable && i.startsWith("onDrag")) && (s[i] = t[i]);
|
|
1091
1092
|
return s;
|
|
1092
1093
|
}
|
|
1093
|
-
function
|
|
1094
|
-
return typeof t == "string" ? t :
|
|
1094
|
+
function _n(t, e, n) {
|
|
1095
|
+
return typeof t == "string" ? t : T.transform(e + n * t);
|
|
1095
1096
|
}
|
|
1096
1097
|
function la(t, e, n) {
|
|
1097
|
-
const s =
|
|
1098
|
+
const s = _n(e, t.x, t.width), i = _n(n, t.y, t.height);
|
|
1098
1099
|
return `${s} ${i}`;
|
|
1099
1100
|
}
|
|
1100
1101
|
const ca = {
|
|
@@ -1107,8 +1108,8 @@ const ca = {
|
|
|
1107
1108
|
function ha(t, e, n = 1, s = 0, i = !0) {
|
|
1108
1109
|
t.pathLength = 1;
|
|
1109
1110
|
const r = i ? ca : ua;
|
|
1110
|
-
t[r.offset] =
|
|
1111
|
-
const o =
|
|
1111
|
+
t[r.offset] = T.transform(-s);
|
|
1112
|
+
const o = T.transform(e), a = T.transform(n);
|
|
1112
1113
|
t[r.array] = `${o} ${a}`;
|
|
1113
1114
|
}
|
|
1114
1115
|
function hn(t, {
|
|
@@ -1155,7 +1156,7 @@ function da(t = !1) {
|
|
|
1155
1156
|
...aa(s, typeof n == "string", t),
|
|
1156
1157
|
...l,
|
|
1157
1158
|
ref: i
|
|
1158
|
-
}, { children: h } = s, f = he(() =>
|
|
1159
|
+
}, { children: h } = s, f = he(() => U(h) ? h.get() : h, [h]);
|
|
1159
1160
|
return Gs(n, {
|
|
1160
1161
|
...u,
|
|
1161
1162
|
children: f
|
|
@@ -1200,13 +1201,13 @@ function pi(t, e, n, s) {
|
|
|
1200
1201
|
function dn(t, e) {
|
|
1201
1202
|
const { style: n } = t, s = {};
|
|
1202
1203
|
for (const i in n)
|
|
1203
|
-
(
|
|
1204
|
+
(U(n[i]) || e.style && U(e.style[i]) || oi(i, t)) && (s[i] = n[i]);
|
|
1204
1205
|
return s;
|
|
1205
1206
|
}
|
|
1206
1207
|
function gi(t, e) {
|
|
1207
1208
|
const n = dn(t, e);
|
|
1208
1209
|
for (const s in t)
|
|
1209
|
-
if (
|
|
1210
|
+
if (U(t[s]) || U(e[s])) {
|
|
1210
1211
|
const i = Gt.indexOf(s) !== -1 ? "attr" + s.charAt(0).toUpperCase() + s.substring(1) : s;
|
|
1211
1212
|
n[i] = t[s];
|
|
1212
1213
|
}
|
|
@@ -1221,7 +1222,7 @@ function ma(t) {
|
|
|
1221
1222
|
}
|
|
1222
1223
|
const oe = (t) => Array.isArray(t), pa = (t) => !!(t && typeof t == "object" && t.mix && t.toValue), ga = (t) => oe(t) ? t[t.length - 1] || 0 : t;
|
|
1223
1224
|
function ee(t) {
|
|
1224
|
-
const e =
|
|
1225
|
+
const e = U(t) ? t.get() : t;
|
|
1225
1226
|
return pa(e) ? e.toValue() : e;
|
|
1226
1227
|
}
|
|
1227
1228
|
function ya({ scrapeMotionValuesFromProps: t, createRenderState: e, onMount: n }, s, i, r) {
|
|
@@ -1232,7 +1233,7 @@ function ya({ scrapeMotionValuesFromProps: t, createRenderState: e, onMount: n }
|
|
|
1232
1233
|
return n && (o.mount = (a) => n(s, a, o)), o;
|
|
1233
1234
|
}
|
|
1234
1235
|
const yi = (t) => (e, n) => {
|
|
1235
|
-
const s =
|
|
1236
|
+
const s = _(de), i = _(sn), r = () => ya(t, e, s, i);
|
|
1236
1237
|
return n ? r() : ma(r);
|
|
1237
1238
|
};
|
|
1238
1239
|
function va(t, e, n, s) {
|
|
@@ -1262,8 +1263,8 @@ function va(t, e, n, s) {
|
|
|
1262
1263
|
i[y] = p[y];
|
|
1263
1264
|
}), i;
|
|
1264
1265
|
}
|
|
1265
|
-
const
|
|
1266
|
-
class
|
|
1266
|
+
const E = (t) => t;
|
|
1267
|
+
class Un {
|
|
1267
1268
|
constructor() {
|
|
1268
1269
|
this.order = [], this.scheduled = /* @__PURE__ */ new Set();
|
|
1269
1270
|
}
|
|
@@ -1280,7 +1281,7 @@ class _n {
|
|
|
1280
1281
|
}
|
|
1281
1282
|
}
|
|
1282
1283
|
function xa(t) {
|
|
1283
|
-
let e = new
|
|
1284
|
+
let e = new Un(), n = new Un(), s = 0, i = !1, r = !1;
|
|
1284
1285
|
const o = /* @__PURE__ */ new WeakSet(), a = {
|
|
1285
1286
|
/**
|
|
1286
1287
|
* Schedule a process to run on the next frame.
|
|
@@ -1321,7 +1322,7 @@ const Qt = [
|
|
|
1321
1322
|
"render",
|
|
1322
1323
|
"postRender"
|
|
1323
1324
|
], ba = 40;
|
|
1324
|
-
function
|
|
1325
|
+
function Ta(t, e) {
|
|
1325
1326
|
let n = !1, s = !0;
|
|
1326
1327
|
const i = {
|
|
1327
1328
|
delta: 0,
|
|
@@ -1338,7 +1339,7 @@ function wa(t, e) {
|
|
|
1338
1339
|
return h[f] = (m, p = !1, v = !1) => (n || l(), d.schedule(m, p, v)), h;
|
|
1339
1340
|
}, {}), cancel: (h) => Qt.forEach((f) => r[f].cancel(h)), state: i, steps: r };
|
|
1340
1341
|
}
|
|
1341
|
-
const { schedule: V, cancel: et, state:
|
|
1342
|
+
const { schedule: V, cancel: et, state: j, steps: we } = Ta(typeof requestAnimationFrame < "u" ? requestAnimationFrame : E, !0), Pa = {
|
|
1342
1343
|
useVisualState: yi({
|
|
1343
1344
|
scrapeMotionValuesFromProps: gi,
|
|
1344
1345
|
createRenderState: fi,
|
|
@@ -1359,7 +1360,7 @@ const { schedule: V, cancel: et, state: F, steps: Pe } = wa(typeof requestAnimat
|
|
|
1359
1360
|
});
|
|
1360
1361
|
}
|
|
1361
1362
|
})
|
|
1362
|
-
},
|
|
1363
|
+
}, wa = {
|
|
1363
1364
|
useVisualState: yi({
|
|
1364
1365
|
scrapeMotionValuesFromProps: dn,
|
|
1365
1366
|
createRenderState: un
|
|
@@ -1367,7 +1368,7 @@ const { schedule: V, cancel: et, state: F, steps: Pe } = wa(typeof requestAnimat
|
|
|
1367
1368
|
};
|
|
1368
1369
|
function Aa(t, { forwardMotionProps: e = !1 }, n, s) {
|
|
1369
1370
|
return {
|
|
1370
|
-
...ln(t) ?
|
|
1371
|
+
...ln(t) ? Pa : wa,
|
|
1371
1372
|
preloadedFeatures: n,
|
|
1372
1373
|
useRender: da(e),
|
|
1373
1374
|
createVisualElement: s,
|
|
@@ -1415,7 +1416,7 @@ function bi(t) {
|
|
|
1415
1416
|
}
|
|
1416
1417
|
return e;
|
|
1417
1418
|
}
|
|
1418
|
-
function
|
|
1419
|
+
function Ti() {
|
|
1419
1420
|
const t = bi(!0);
|
|
1420
1421
|
return t ? (t(), !1) : !0;
|
|
1421
1422
|
}
|
|
@@ -1428,7 +1429,7 @@ class ut {
|
|
|
1428
1429
|
}
|
|
1429
1430
|
function Gn(t, e) {
|
|
1430
1431
|
const n = "pointer" + (e ? "enter" : "leave"), s = "onHover" + (e ? "Start" : "End"), i = (r, o) => {
|
|
1431
|
-
if (r.pointerType === "touch" ||
|
|
1432
|
+
if (r.pointerType === "touch" || Ti())
|
|
1432
1433
|
return;
|
|
1433
1434
|
const a = t.getProps();
|
|
1434
1435
|
t.animationState && a.whileHover && t.animationState.setActive("whileHover", e), a[s] && V.update(() => a[s](r, o));
|
|
@@ -1466,7 +1467,7 @@ class Ma extends ut {
|
|
|
1466
1467
|
unmount() {
|
|
1467
1468
|
}
|
|
1468
1469
|
}
|
|
1469
|
-
const
|
|
1470
|
+
const Pi = (t, e) => e ? t === e ? !0 : Pi(t, e.parentElement) : !1;
|
|
1470
1471
|
function Ae(t, e) {
|
|
1471
1472
|
if (!e)
|
|
1472
1473
|
return;
|
|
@@ -1475,7 +1476,7 @@ function Ae(t, e) {
|
|
|
1475
1476
|
}
|
|
1476
1477
|
class Da extends ut {
|
|
1477
1478
|
constructor() {
|
|
1478
|
-
super(...arguments), this.removeStartListeners =
|
|
1479
|
+
super(...arguments), this.removeStartListeners = E, this.removeEndListeners = E, this.removeAccessibleListeners = E, this.startPointerPress = (e, n) => {
|
|
1479
1480
|
if (this.isPressing)
|
|
1480
1481
|
return;
|
|
1481
1482
|
this.removeEndListeners();
|
|
@@ -1484,7 +1485,7 @@ class Da extends ut {
|
|
|
1484
1485
|
return;
|
|
1485
1486
|
const { onTap: c, onTapCancel: u, globalTapTarget: h } = this.node.getProps();
|
|
1486
1487
|
V.update(() => {
|
|
1487
|
-
!h && !
|
|
1488
|
+
!h && !Pi(this.node.current, a.target) ? u && u(a, l) : c && c(a, l);
|
|
1488
1489
|
});
|
|
1489
1490
|
}, { passive: !(s.onTap || s.onPointerUp) }), o = J(window, "pointercancel", (a, l) => this.cancelPress(a, l), { passive: !(s.onTapCancel || s.onPointerCancel) });
|
|
1490
1491
|
this.removeEndListeners = rt(r, o), this.startPress(e, n);
|
|
@@ -1513,7 +1514,7 @@ class Da extends ut {
|
|
|
1513
1514
|
i && this.node.animationState && this.node.animationState.setActive("whileTap", !0), s && V.update(() => s(e, n));
|
|
1514
1515
|
}
|
|
1515
1516
|
checkPressEnd() {
|
|
1516
|
-
return this.removeEndListeners(), this.isPressing = !1, this.node.getProps().whileTap && this.node.animationState && this.node.animationState.setActive("whileTap", !1), !
|
|
1517
|
+
return this.removeEndListeners(), this.isPressing = !1, this.node.getProps().whileTap && this.node.animationState && this.node.animationState.setActive("whileTap", !1), !Ti();
|
|
1517
1518
|
}
|
|
1518
1519
|
cancelPress(e, n) {
|
|
1519
1520
|
if (!this.checkPressEnd())
|
|
@@ -1529,22 +1530,22 @@ class Da extends ut {
|
|
|
1529
1530
|
this.removeStartListeners(), this.removeEndListeners(), this.removeAccessibleListeners();
|
|
1530
1531
|
}
|
|
1531
1532
|
}
|
|
1532
|
-
const
|
|
1533
|
-
const e =
|
|
1533
|
+
const Oe = /* @__PURE__ */ new WeakMap(), Se = /* @__PURE__ */ new WeakMap(), Ra = (t) => {
|
|
1534
|
+
const e = Oe.get(t.target);
|
|
1534
1535
|
e && e(t);
|
|
1535
|
-
},
|
|
1536
|
+
}, ka = (t) => {
|
|
1536
1537
|
t.forEach(Ra);
|
|
1537
1538
|
};
|
|
1538
|
-
function
|
|
1539
|
+
function La({ root: t, ...e }) {
|
|
1539
1540
|
const n = t || document;
|
|
1540
1541
|
Se.has(n) || Se.set(n, {});
|
|
1541
1542
|
const s = Se.get(n), i = JSON.stringify(e);
|
|
1542
|
-
return s[i] || (s[i] = new IntersectionObserver(
|
|
1543
|
+
return s[i] || (s[i] = new IntersectionObserver(ka, { root: t, ...e })), s[i];
|
|
1543
1544
|
}
|
|
1544
|
-
function
|
|
1545
|
-
const s =
|
|
1546
|
-
return
|
|
1547
|
-
|
|
1545
|
+
function Ea(t, e, n) {
|
|
1546
|
+
const s = La(e);
|
|
1547
|
+
return Oe.set(t, n), s.observe(t), () => {
|
|
1548
|
+
Oe.delete(t), s.unobserve(t);
|
|
1548
1549
|
};
|
|
1549
1550
|
}
|
|
1550
1551
|
const Ba = {
|
|
@@ -1569,7 +1570,7 @@ class Ia extends ut {
|
|
|
1569
1570
|
const { onViewportEnter: u, onViewportLeave: h } = this.node.getProps(), f = c ? u : h;
|
|
1570
1571
|
f && f(l);
|
|
1571
1572
|
};
|
|
1572
|
-
return
|
|
1573
|
+
return Ea(this.node.current, o, a);
|
|
1573
1574
|
}
|
|
1574
1575
|
mount() {
|
|
1575
1576
|
this.startObserver();
|
|
@@ -1578,15 +1579,15 @@ class Ia extends ut {
|
|
|
1578
1579
|
if (typeof IntersectionObserver > "u")
|
|
1579
1580
|
return;
|
|
1580
1581
|
const { props: e, prevProps: n } = this.node;
|
|
1581
|
-
["amount", "margin", "root"].some(
|
|
1582
|
+
["amount", "margin", "root"].some(ja(e, n)) && this.startObserver();
|
|
1582
1583
|
}
|
|
1583
1584
|
unmount() {
|
|
1584
1585
|
}
|
|
1585
1586
|
}
|
|
1586
|
-
function
|
|
1587
|
+
function ja({ viewport: t = {} }, { viewport: e = {} } = {}) {
|
|
1587
1588
|
return (n) => t[n] !== e[n];
|
|
1588
1589
|
}
|
|
1589
|
-
const
|
|
1590
|
+
const Fa = {
|
|
1590
1591
|
inView: {
|
|
1591
1592
|
Feature: Ia
|
|
1592
1593
|
},
|
|
@@ -1600,7 +1601,7 @@ const Oa = {
|
|
|
1600
1601
|
Feature: Ca
|
|
1601
1602
|
}
|
|
1602
1603
|
};
|
|
1603
|
-
function
|
|
1604
|
+
function wi(t, e) {
|
|
1604
1605
|
if (!Array.isArray(e))
|
|
1605
1606
|
return !1;
|
|
1606
1607
|
const n = e.length;
|
|
@@ -1611,7 +1612,7 @@ function Pi(t, e) {
|
|
|
1611
1612
|
return !1;
|
|
1612
1613
|
return !0;
|
|
1613
1614
|
}
|
|
1614
|
-
function
|
|
1615
|
+
function Oa(t) {
|
|
1615
1616
|
const e = {};
|
|
1616
1617
|
return t.values.forEach((n, s) => e[s] = n.get()), e;
|
|
1617
1618
|
}
|
|
@@ -1621,16 +1622,16 @@ function Na(t) {
|
|
|
1621
1622
|
}
|
|
1622
1623
|
function xe(t, e, n) {
|
|
1623
1624
|
const s = t.getProps();
|
|
1624
|
-
return mn(s, e, n !== void 0 ? n : s.custom,
|
|
1625
|
+
return mn(s, e, n !== void 0 ? n : s.custom, Oa(t), Na(t));
|
|
1625
1626
|
}
|
|
1626
|
-
let qt =
|
|
1627
|
+
let qt = E, q = E;
|
|
1627
1628
|
process.env.NODE_ENV !== "production" && (qt = (t, e) => {
|
|
1628
1629
|
!t && typeof console < "u" && console.warn(e);
|
|
1629
1630
|
}, q = (t, e) => {
|
|
1630
1631
|
if (!t)
|
|
1631
1632
|
throw new Error(e);
|
|
1632
1633
|
});
|
|
1633
|
-
const at = (t) => t * 1e3, tt = (t) => t / 1e3,
|
|
1634
|
+
const at = (t) => t * 1e3, tt = (t) => t / 1e3, _a = {
|
|
1634
1635
|
current: !1
|
|
1635
1636
|
}, Ai = (t) => Array.isArray(t) && typeof t[0] == "number";
|
|
1636
1637
|
function Si(t) {
|
|
@@ -1651,7 +1652,7 @@ function Ci(t) {
|
|
|
1651
1652
|
if (t)
|
|
1652
1653
|
return Ai(t) ? Bt(t) : Array.isArray(t) ? t.map(Ci) : Vi[t];
|
|
1653
1654
|
}
|
|
1654
|
-
function
|
|
1655
|
+
function Ua(t, e, n, { delay: s = 0, duration: i, repeat: r = 0, repeatType: o = "loop", ease: a, times: l } = {}) {
|
|
1655
1656
|
const c = { [e]: n };
|
|
1656
1657
|
l && (c.offset = l);
|
|
1657
1658
|
const u = Ci(a);
|
|
@@ -1678,21 +1679,21 @@ function $a(t, e, n, s, i) {
|
|
|
1678
1679
|
}
|
|
1679
1680
|
function Kt(t, e, n, s) {
|
|
1680
1681
|
if (t === e && n === s)
|
|
1681
|
-
return
|
|
1682
|
+
return E;
|
|
1682
1683
|
const i = (r) => $a(r, 0, 1, t, n);
|
|
1683
1684
|
return (r) => r === 0 || r === 1 ? r : Mi(i(r), e, s);
|
|
1684
1685
|
}
|
|
1685
|
-
const Ha = Kt(0.42, 0, 1, 1), qa = Kt(0, 0, 0.58, 1), Di = Kt(0.42, 0, 0.58, 1), Ka = (t) => Array.isArray(t) && typeof t[0] != "number", Ri = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2,
|
|
1686
|
-
linear:
|
|
1686
|
+
const Ha = Kt(0.42, 0, 1, 1), qa = Kt(0, 0, 0.58, 1), Di = Kt(0.42, 0, 0.58, 1), Ka = (t) => Array.isArray(t) && typeof t[0] != "number", Ri = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, ki = (t) => (e) => 1 - t(1 - e), pn = (t) => 1 - Math.sin(Math.acos(t)), Li = ki(pn), Ya = Ri(pn), Ei = Kt(0.33, 1.53, 0.69, 0.99), gn = ki(Ei), Xa = Ri(gn), Qa = (t) => (t *= 2) < 1 ? 0.5 * gn(t) : 0.5 * (2 - Math.pow(2, -10 * (t - 1))), $n = {
|
|
1687
|
+
linear: E,
|
|
1687
1688
|
easeIn: Ha,
|
|
1688
1689
|
easeInOut: Di,
|
|
1689
1690
|
easeOut: qa,
|
|
1690
1691
|
circIn: pn,
|
|
1691
1692
|
circInOut: Ya,
|
|
1692
|
-
circOut:
|
|
1693
|
+
circOut: Li,
|
|
1693
1694
|
backIn: gn,
|
|
1694
1695
|
backInOut: Xa,
|
|
1695
|
-
backOut:
|
|
1696
|
+
backOut: Ei,
|
|
1696
1697
|
anticipate: Qa
|
|
1697
1698
|
}, Hn = (t) => {
|
|
1698
1699
|
if (Array.isArray(t)) {
|
|
@@ -1718,7 +1719,7 @@ const Ha = Kt(0.42, 0, 1, 1), qa = Kt(0, 0, 0.58, 1), Di = Kt(0.42, 0, 0.58, 1),
|
|
|
1718
1719
|
}, pt = {
|
|
1719
1720
|
test: yn("rgb", "red"),
|
|
1720
1721
|
parse: Bi("red", "green", "blue"),
|
|
1721
|
-
transform: ({ red: t, green: e, blue: n, alpha: s = 1 }) => "rgba(" + Ve.transform(t) + ", " + Ve.transform(e) + ", " + Ve.transform(n) + ", " +
|
|
1722
|
+
transform: ({ red: t, green: e, blue: n, alpha: s = 1 }) => "rgba(" + Ve.transform(t) + ", " + Ve.transform(e) + ", " + Ve.transform(n) + ", " + jt(It.transform(s)) + ")"
|
|
1722
1723
|
};
|
|
1723
1724
|
function Ja(t) {
|
|
1724
1725
|
let e = "", n = "", s = "", i = "";
|
|
@@ -1733,15 +1734,15 @@ const Ne = {
|
|
|
1733
1734
|
test: yn("#"),
|
|
1734
1735
|
parse: Ja,
|
|
1735
1736
|
transform: pt.transform
|
|
1736
|
-
},
|
|
1737
|
+
}, Pt = {
|
|
1737
1738
|
test: yn("hsl", "hue"),
|
|
1738
1739
|
parse: Bi("hue", "saturation", "lightness"),
|
|
1739
|
-
transform: ({ hue: t, saturation: e, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(t) + ", " + K.transform(
|
|
1740
|
+
transform: ({ hue: t, saturation: e, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(t) + ", " + K.transform(jt(e)) + ", " + K.transform(jt(n)) + ", " + jt(It.transform(s)) + ")"
|
|
1740
1741
|
}, N = {
|
|
1741
|
-
test: (t) => pt.test(t) || Ne.test(t) ||
|
|
1742
|
-
parse: (t) => pt.test(t) ? pt.parse(t) :
|
|
1743
|
-
transform: (t) => $t(t) ? t : t.hasOwnProperty("red") ? pt.transform(t) :
|
|
1744
|
-
},
|
|
1742
|
+
test: (t) => pt.test(t) || Ne.test(t) || Pt.test(t),
|
|
1743
|
+
parse: (t) => pt.test(t) ? pt.parse(t) : Pt.test(t) ? Pt.parse(t) : Ne.parse(t),
|
|
1744
|
+
transform: (t) => $t(t) ? t : t.hasOwnProperty("red") ? pt.transform(t) : Pt.transform(t)
|
|
1745
|
+
}, k = (t, e, n) => -n * t + n * e + t;
|
|
1745
1746
|
function Ce(t, e, n) {
|
|
1746
1747
|
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;
|
|
1747
1748
|
}
|
|
@@ -1764,32 +1765,32 @@ function tl({ hue: t, saturation: e, lightness: n, alpha: s }) {
|
|
|
1764
1765
|
const Me = (t, e, n) => {
|
|
1765
1766
|
const s = t * t;
|
|
1766
1767
|
return Math.sqrt(Math.max(0, n * (e * e - s) + s));
|
|
1767
|
-
}, el = [Ne, pt,
|
|
1768
|
+
}, el = [Ne, pt, Pt], nl = (t) => el.find((e) => e.test(t));
|
|
1768
1769
|
function qn(t) {
|
|
1769
1770
|
const e = nl(t);
|
|
1770
1771
|
q(!!e, `'${t}' is not an animatable color. Use the equivalent color code instead.`);
|
|
1771
1772
|
let n = e.parse(t);
|
|
1772
|
-
return e ===
|
|
1773
|
+
return e === Pt && (n = tl(n)), n;
|
|
1773
1774
|
}
|
|
1774
1775
|
const Ii = (t, e) => {
|
|
1775
1776
|
const n = qn(t), s = qn(e), i = { ...n };
|
|
1776
|
-
return (r) => (i.red = Me(n.red, s.red, r), i.green = Me(n.green, s.green, r), i.blue = Me(n.blue, s.blue, r), i.alpha =
|
|
1777
|
+
return (r) => (i.red = Me(n.red, s.red, r), i.green = Me(n.green, s.green, r), i.blue = Me(n.blue, s.blue, r), i.alpha = k(n.alpha, s.alpha, r), pt.transform(i));
|
|
1777
1778
|
};
|
|
1778
1779
|
function sl(t) {
|
|
1779
1780
|
var e, n;
|
|
1780
1781
|
return isNaN(t) && $t(t) && (((e = t.match(ye)) === null || e === void 0 ? void 0 : e.length) || 0) + (((n = t.match(li)) === null || n === void 0 ? void 0 : n.length) || 0) > 0;
|
|
1781
1782
|
}
|
|
1782
|
-
const
|
|
1783
|
+
const ji = {
|
|
1783
1784
|
regex: Qr,
|
|
1784
1785
|
countKey: "Vars",
|
|
1785
1786
|
token: "${v}",
|
|
1786
|
-
parse:
|
|
1787
|
-
},
|
|
1787
|
+
parse: E
|
|
1788
|
+
}, Fi = {
|
|
1788
1789
|
regex: li,
|
|
1789
1790
|
countKey: "Colors",
|
|
1790
1791
|
token: "${c}",
|
|
1791
1792
|
parse: N.parse
|
|
1792
|
-
},
|
|
1793
|
+
}, Oi = {
|
|
1793
1794
|
regex: ye,
|
|
1794
1795
|
countKey: "Numbers",
|
|
1795
1796
|
token: "${n}",
|
|
@@ -1808,33 +1809,33 @@ function re(t) {
|
|
|
1808
1809
|
numColors: 0,
|
|
1809
1810
|
numNumbers: 0
|
|
1810
1811
|
};
|
|
1811
|
-
return n.value.includes("var(--") && De(n,
|
|
1812
|
+
return n.value.includes("var(--") && De(n, ji), De(n, Fi), De(n, Oi), n;
|
|
1812
1813
|
}
|
|
1813
1814
|
function Ni(t) {
|
|
1814
1815
|
return re(t).values;
|
|
1815
1816
|
}
|
|
1816
|
-
function
|
|
1817
|
+
function _i(t) {
|
|
1817
1818
|
const { values: e, numColors: n, numVars: s, tokenised: i } = re(t), r = e.length;
|
|
1818
1819
|
return (o) => {
|
|
1819
1820
|
let a = i;
|
|
1820
1821
|
for (let l = 0; l < r; l++)
|
|
1821
|
-
l < s ? a = a.replace(
|
|
1822
|
+
l < s ? a = a.replace(ji.token, o[l]) : l < s + n ? a = a.replace(Fi.token, N.transform(o[l])) : a = a.replace(Oi.token, jt(o[l]));
|
|
1822
1823
|
return a;
|
|
1823
1824
|
};
|
|
1824
1825
|
}
|
|
1825
1826
|
const il = (t) => typeof t == "number" ? 0 : t;
|
|
1826
1827
|
function ol(t) {
|
|
1827
1828
|
const e = Ni(t);
|
|
1828
|
-
return
|
|
1829
|
+
return _i(t)(e.map(il));
|
|
1829
1830
|
}
|
|
1830
1831
|
const ct = {
|
|
1831
1832
|
test: sl,
|
|
1832
1833
|
parse: Ni,
|
|
1833
|
-
createTransformer:
|
|
1834
|
+
createTransformer: _i,
|
|
1834
1835
|
getAnimatableNone: ol
|
|
1835
|
-
},
|
|
1836
|
+
}, Ui = (t, e) => (n) => `${n > 0 ? e : t}`;
|
|
1836
1837
|
function zi(t, e) {
|
|
1837
|
-
return typeof t == "number" ? (n) =>
|
|
1838
|
+
return typeof t == "number" ? (n) => k(t, e, n) : N.test(t) ? Ii(t, e) : t.startsWith("var(") ? Ui(t, e) : Gi(t, e);
|
|
1838
1839
|
}
|
|
1839
1840
|
const Wi = (t, e) => {
|
|
1840
1841
|
const n = [...t], s = n.length, i = t.map((r, o) => zi(r, e[o]));
|
|
@@ -1854,11 +1855,11 @@ const Wi = (t, e) => {
|
|
|
1854
1855
|
};
|
|
1855
1856
|
}, Gi = (t, e) => {
|
|
1856
1857
|
const n = ct.createTransformer(e), s = re(t), i = re(e);
|
|
1857
|
-
return s.numVars === i.numVars && s.numColors === i.numColors && s.numNumbers >= i.numNumbers ? rt(Wi(s.values, i.values), n) : (qt(!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.`),
|
|
1858
|
+
return s.numVars === i.numVars && s.numColors === i.numColors && s.numNumbers >= i.numNumbers ? rt(Wi(s.values, i.values), n) : (qt(!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.`), Ui(t, e));
|
|
1858
1859
|
}, zt = (t, e, n) => {
|
|
1859
1860
|
const s = e - t;
|
|
1860
1861
|
return s === 0 ? 1 : (n - t) / s;
|
|
1861
|
-
}, Kn = (t, e) => (n) =>
|
|
1862
|
+
}, Kn = (t, e) => (n) => k(t, e, n);
|
|
1862
1863
|
function al(t) {
|
|
1863
1864
|
return typeof t == "number" ? Kn : typeof t == "string" ? N.test(t) ? Ii : Gi : Array.isArray(t) ? Wi : typeof t == "object" ? rl : Kn;
|
|
1864
1865
|
}
|
|
@@ -1867,7 +1868,7 @@ function ll(t, e, n) {
|
|
|
1867
1868
|
for (let o = 0; o < r; o++) {
|
|
1868
1869
|
let a = i(t[o], t[o + 1]);
|
|
1869
1870
|
if (e) {
|
|
1870
|
-
const l = Array.isArray(e) ? e[o] ||
|
|
1871
|
+
const l = Array.isArray(e) ? e[o] || E : e;
|
|
1871
1872
|
a = rt(l, a);
|
|
1872
1873
|
}
|
|
1873
1874
|
s.push(a);
|
|
@@ -1893,7 +1894,7 @@ function cl(t, e) {
|
|
|
1893
1894
|
const n = t[t.length - 1];
|
|
1894
1895
|
for (let s = 1; s <= e; s++) {
|
|
1895
1896
|
const i = zt(0, e, s);
|
|
1896
|
-
t.push(
|
|
1897
|
+
t.push(k(n, 1, i));
|
|
1897
1898
|
}
|
|
1898
1899
|
}
|
|
1899
1900
|
function ul(t) {
|
|
@@ -1937,10 +1938,10 @@ function yl({ duration: t = 800, bounce: e = 0.25, velocity: n = 0, mass: s = 1
|
|
|
1937
1938
|
qt(t <= at(Yn), "Spring duration must be 10 seconds or less");
|
|
1938
1939
|
let o = 1 - e;
|
|
1939
1940
|
o = lt(pl, gl, o), t = lt(ml, Yn, tt(t)), o < 1 ? (i = (c) => {
|
|
1940
|
-
const u = c * o, h = u * t, f = u - n, d =
|
|
1941
|
+
const u = c * o, h = u * t, f = u - n, d = _e(c, o), m = Math.exp(-h);
|
|
1941
1942
|
return Re - f / d * m;
|
|
1942
1943
|
}, r = (c) => {
|
|
1943
|
-
const h = c * o * t, f = h * n + n, d = Math.pow(o, 2) * Math.pow(c, 2) * t, m = Math.exp(-h), p =
|
|
1944
|
+
const h = c * o * t, f = h * n + n, d = Math.pow(o, 2) * Math.pow(c, 2) * t, m = Math.exp(-h), p = _e(Math.pow(c, 2), o);
|
|
1944
1945
|
return (-i(c) + Re > 0 ? -1 : 1) * ((f - d) * m) / p;
|
|
1945
1946
|
}) : (i = (c) => {
|
|
1946
1947
|
const u = Math.exp(-c * t), h = (c - n) * t + 1;
|
|
@@ -1972,14 +1973,14 @@ function xl(t, e, n) {
|
|
|
1972
1973
|
s = s - t(s) / e(s);
|
|
1973
1974
|
return s;
|
|
1974
1975
|
}
|
|
1975
|
-
function
|
|
1976
|
+
function _e(t, e) {
|
|
1976
1977
|
return t * Math.sqrt(1 - e * e);
|
|
1977
1978
|
}
|
|
1978
|
-
const bl = ["duration", "bounce"],
|
|
1979
|
+
const bl = ["duration", "bounce"], Tl = ["stiffness", "damping", "mass"];
|
|
1979
1980
|
function Xn(t, e) {
|
|
1980
1981
|
return e.some((n) => t[n] !== void 0);
|
|
1981
1982
|
}
|
|
1982
|
-
function
|
|
1983
|
+
function Pl(t) {
|
|
1983
1984
|
let e = {
|
|
1984
1985
|
velocity: 0,
|
|
1985
1986
|
stiffness: 100,
|
|
@@ -1988,7 +1989,7 @@ function Tl(t) {
|
|
|
1988
1989
|
isResolvedFromDuration: !1,
|
|
1989
1990
|
...t
|
|
1990
1991
|
};
|
|
1991
|
-
if (!Xn(t,
|
|
1992
|
+
if (!Xn(t, Tl) && Xn(t, bl)) {
|
|
1992
1993
|
const n = yl(t);
|
|
1993
1994
|
e = {
|
|
1994
1995
|
...e,
|
|
@@ -1999,25 +2000,25 @@ function Tl(t) {
|
|
|
1999
2000
|
return e;
|
|
2000
2001
|
}
|
|
2001
2002
|
function Ki({ keyframes: t, restDelta: e, restSpeed: n, ...s }) {
|
|
2002
|
-
const i = t[0], r = t[t.length - 1], o = { done: !1, value: i }, { stiffness: a, damping: l, mass: c, duration: u, velocity: h, isResolvedFromDuration: f } =
|
|
2003
|
+
const i = t[0], r = t[t.length - 1], o = { done: !1, value: i }, { stiffness: a, damping: l, mass: c, duration: u, velocity: h, isResolvedFromDuration: f } = Pl({
|
|
2003
2004
|
...s,
|
|
2004
2005
|
velocity: -tt(s.velocity || 0)
|
|
2005
2006
|
}), d = h || 0, m = l / (2 * Math.sqrt(a * c)), p = r - i, v = tt(Math.sqrt(a / c)), b = Math.abs(p) < 5;
|
|
2006
2007
|
n || (n = b ? 0.01 : 2), e || (e = b ? 5e-3 : 0.5);
|
|
2007
2008
|
let y;
|
|
2008
2009
|
if (m < 1) {
|
|
2009
|
-
const g =
|
|
2010
|
+
const g = _e(v, m);
|
|
2010
2011
|
y = (x) => {
|
|
2011
|
-
const
|
|
2012
|
-
return r -
|
|
2012
|
+
const w = Math.exp(-m * v * x);
|
|
2013
|
+
return r - w * ((d + m * v * p) / g * Math.sin(g * x) + p * Math.cos(g * x));
|
|
2013
2014
|
};
|
|
2014
2015
|
} else if (m === 1)
|
|
2015
2016
|
y = (g) => r - Math.exp(-v * g) * (p + (d + v * p) * g);
|
|
2016
2017
|
else {
|
|
2017
2018
|
const g = v * Math.sqrt(m * m - 1);
|
|
2018
2019
|
y = (x) => {
|
|
2019
|
-
const
|
|
2020
|
-
return r -
|
|
2020
|
+
const w = Math.exp(-m * v * x), S = Math.min(g * x, 300);
|
|
2021
|
+
return r - w * ((d + m * v * p) * Math.sinh(S) + g * p * Math.cosh(S)) / g;
|
|
2021
2022
|
};
|
|
2022
2023
|
}
|
|
2023
2024
|
return {
|
|
@@ -2027,9 +2028,9 @@ function Ki({ keyframes: t, restDelta: e, restSpeed: n, ...s }) {
|
|
|
2027
2028
|
if (f)
|
|
2028
2029
|
o.done = g >= u;
|
|
2029
2030
|
else {
|
|
2030
|
-
let
|
|
2031
|
-
g !== 0 && (m < 1 ?
|
|
2032
|
-
const S = Math.abs(
|
|
2031
|
+
let w = d;
|
|
2032
|
+
g !== 0 && (m < 1 ? w = qi(y, g, x) : w = 0);
|
|
2033
|
+
const S = Math.abs(w) <= n, C = Math.abs(r - x) <= e;
|
|
2033
2034
|
o.done = S && C;
|
|
2034
2035
|
}
|
|
2035
2036
|
return o.value = o.done ? r : x, o;
|
|
@@ -2045,12 +2046,12 @@ function Qn({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: s = 3
|
|
|
2045
2046
|
const v = h + p, b = o === void 0 ? v : o(v);
|
|
2046
2047
|
b !== v && (p = b - h);
|
|
2047
2048
|
const y = (A) => -p * Math.exp(-A / s), g = (A) => b + y(A), x = (A) => {
|
|
2048
|
-
const
|
|
2049
|
-
f.done = Math.abs(
|
|
2049
|
+
const L = y(A), Y = g(A);
|
|
2050
|
+
f.done = Math.abs(L) <= c, f.value = f.done ? b : Y;
|
|
2050
2051
|
};
|
|
2051
|
-
let
|
|
2052
|
+
let w, S;
|
|
2052
2053
|
const C = (A) => {
|
|
2053
|
-
d(f.value) && (
|
|
2054
|
+
d(f.value) && (w = A, S = Ki({
|
|
2054
2055
|
keyframes: [f.value, m(f.value)],
|
|
2055
2056
|
velocity: qi(g, A, f.value),
|
|
2056
2057
|
damping: i,
|
|
@@ -2062,12 +2063,12 @@ function Qn({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: s = 3
|
|
|
2062
2063
|
return C(0), {
|
|
2063
2064
|
calculatedDuration: null,
|
|
2064
2065
|
next: (A) => {
|
|
2065
|
-
let
|
|
2066
|
-
return !S &&
|
|
2066
|
+
let L = !1;
|
|
2067
|
+
return !S && w === void 0 && (L = !0, x(A), C(A)), w !== void 0 && A > w ? S.next(A - w) : (!L && x(A), f);
|
|
2067
2068
|
}
|
|
2068
2069
|
};
|
|
2069
2070
|
}
|
|
2070
|
-
const
|
|
2071
|
+
const wl = (t) => {
|
|
2071
2072
|
const e = ({ timestamp: n }) => t(n);
|
|
2072
2073
|
return {
|
|
2073
2074
|
start: () => V.update(e, !0),
|
|
@@ -2076,7 +2077,7 @@ const Pl = (t) => {
|
|
|
2076
2077
|
* If we're processing this frame we can use the
|
|
2077
2078
|
* framelocked timestamp to keep things in sync.
|
|
2078
2079
|
*/
|
|
2079
|
-
now: () =>
|
|
2080
|
+
now: () => j.isProcessing ? j.timestamp : performance.now()
|
|
2080
2081
|
};
|
|
2081
2082
|
}, Zn = 2e4;
|
|
2082
2083
|
function Jn(t) {
|
|
@@ -2094,7 +2095,7 @@ const Al = {
|
|
|
2094
2095
|
keyframes: ae,
|
|
2095
2096
|
spring: Ki
|
|
2096
2097
|
};
|
|
2097
|
-
function le({ autoplay: t = !0, delay: e = 0, driver: n =
|
|
2098
|
+
function le({ autoplay: t = !0, delay: e = 0, driver: n = wl, keyframes: s, type: i = "keyframes", repeat: r = 0, repeatDelay: o = 0, repeatType: a = "loop", onPlay: l, onStop: c, onComplete: u, onUpdate: h, ...f }) {
|
|
2098
2099
|
let d = 1, m = !1, p, v;
|
|
2099
2100
|
const b = () => {
|
|
2100
2101
|
v = new Promise((M) => {
|
|
@@ -2108,41 +2109,41 @@ function le({ autoplay: t = !0, delay: e = 0, driver: n = Pl, keyframes: s, type
|
|
|
2108
2109
|
g !== ae && typeof s[0] != "number" && (process.env.NODE_ENV !== "production" && q(s.length === 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${s}`), x = $i([0, 100], s, {
|
|
2109
2110
|
clamp: !1
|
|
2110
2111
|
}), s = [0, 100]);
|
|
2111
|
-
const
|
|
2112
|
+
const w = g({ ...f, keyframes: s });
|
|
2112
2113
|
let S;
|
|
2113
2114
|
a === "mirror" && (S = g({
|
|
2114
2115
|
...f,
|
|
2115
2116
|
keyframes: [...s].reverse(),
|
|
2116
2117
|
velocity: -(f.velocity || 0)
|
|
2117
2118
|
}));
|
|
2118
|
-
let C = "idle", A = null,
|
|
2119
|
-
|
|
2120
|
-
const { calculatedDuration: vt } =
|
|
2119
|
+
let C = "idle", A = null, L = null, Y = null;
|
|
2120
|
+
w.calculatedDuration === null && r && (w.calculatedDuration = Jn(w));
|
|
2121
|
+
const { calculatedDuration: vt } = w;
|
|
2121
2122
|
let H = 1 / 0, X = 1 / 0;
|
|
2122
2123
|
vt !== null && (H = vt + o, X = H * (r + 1) - o);
|
|
2123
|
-
let
|
|
2124
|
+
let O = 0;
|
|
2124
2125
|
const xt = (M) => {
|
|
2125
|
-
if (
|
|
2126
|
+
if (L === null)
|
|
2126
2127
|
return;
|
|
2127
|
-
d > 0 && (
|
|
2128
|
-
const Rt =
|
|
2129
|
-
|
|
2130
|
-
let Mn =
|
|
2128
|
+
d > 0 && (L = Math.min(L, M)), d < 0 && (L = Math.min(M - X / d, L)), A !== null ? O = A : O = Math.round(M - L) * d;
|
|
2129
|
+
const Rt = O - e * (d >= 0 ? 1 : -1), Cn = d >= 0 ? Rt < 0 : Rt > X;
|
|
2130
|
+
O = Math.max(Rt, 0), C === "finished" && A === null && (O = X);
|
|
2131
|
+
let Mn = O, Dn = w;
|
|
2131
2132
|
if (r) {
|
|
2132
|
-
const be = Math.min(
|
|
2133
|
+
const be = Math.min(O, X) / H;
|
|
2133
2134
|
let Yt = Math.floor(be), ht = be % 1;
|
|
2134
2135
|
!ht && be >= 1 && (ht = 1), ht === 1 && Yt--, Yt = Math.min(Yt, r + 1), !!(Yt % 2) && (a === "reverse" ? (ht = 1 - ht, o && (ht -= o / H)) : a === "mirror" && (Dn = S)), Mn = lt(0, 1, ht) * H;
|
|
2135
2136
|
}
|
|
2136
|
-
const
|
|
2137
|
-
x && (
|
|
2138
|
-
let { done: Rn } =
|
|
2139
|
-
!Cn && vt !== null && (Rn = d >= 0 ?
|
|
2140
|
-
const
|
|
2141
|
-
return h && h(
|
|
2137
|
+
const kt = Cn ? { done: !1, value: s[0] } : Dn.next(Mn);
|
|
2138
|
+
x && (kt.value = x(kt.value));
|
|
2139
|
+
let { done: Rn } = kt;
|
|
2140
|
+
!Cn && vt !== null && (Rn = d >= 0 ? O >= X : O <= 0);
|
|
2141
|
+
const wo = A === null && (C === "finished" || C === "running" && Rn);
|
|
2142
|
+
return h && h(kt.value), wo && Dt(), kt;
|
|
2142
2143
|
}, I = () => {
|
|
2143
2144
|
y && y.stop(), y = void 0;
|
|
2144
2145
|
}, nt = () => {
|
|
2145
|
-
C = "idle", I(), p(), b(),
|
|
2146
|
+
C = "idle", I(), p(), b(), L = Y = null;
|
|
2146
2147
|
}, Dt = () => {
|
|
2147
2148
|
C = "finished", u && u(), I(), p();
|
|
2148
2149
|
}, bt = () => {
|
|
@@ -2150,7 +2151,7 @@ function le({ autoplay: t = !0, delay: e = 0, driver: n = Pl, keyframes: s, type
|
|
|
2150
2151
|
return;
|
|
2151
2152
|
y || (y = n(xt));
|
|
2152
2153
|
const M = y.now();
|
|
2153
|
-
l && l(), A !== null ?
|
|
2154
|
+
l && l(), A !== null ? L = M - A : (!L || C === "finished") && (L = M), C === "finished" && b(), Y = L, A = null, C = "running", y.start();
|
|
2154
2155
|
};
|
|
2155
2156
|
t && bt();
|
|
2156
2157
|
const Vn = {
|
|
@@ -2158,27 +2159,27 @@ function le({ autoplay: t = !0, delay: e = 0, driver: n = Pl, keyframes: s, type
|
|
|
2158
2159
|
return v.then(M, Rt);
|
|
2159
2160
|
},
|
|
2160
2161
|
get time() {
|
|
2161
|
-
return tt(
|
|
2162
|
+
return tt(O);
|
|
2162
2163
|
},
|
|
2163
2164
|
set time(M) {
|
|
2164
|
-
M = at(M),
|
|
2165
|
+
M = at(M), O = M, A !== null || !y || d === 0 ? A = M : L = y.now() - M / d;
|
|
2165
2166
|
},
|
|
2166
2167
|
get duration() {
|
|
2167
|
-
const M =
|
|
2168
|
+
const M = w.calculatedDuration === null ? Jn(w) : w.calculatedDuration;
|
|
2168
2169
|
return tt(M);
|
|
2169
2170
|
},
|
|
2170
2171
|
get speed() {
|
|
2171
2172
|
return d;
|
|
2172
2173
|
},
|
|
2173
2174
|
set speed(M) {
|
|
2174
|
-
M === d || !y || (d = M, Vn.time = tt(
|
|
2175
|
+
M === d || !y || (d = M, Vn.time = tt(O));
|
|
2175
2176
|
},
|
|
2176
2177
|
get state() {
|
|
2177
2178
|
return C;
|
|
2178
2179
|
},
|
|
2179
2180
|
play: bt,
|
|
2180
2181
|
pause: () => {
|
|
2181
|
-
C = "paused", A =
|
|
2182
|
+
C = "paused", A = O;
|
|
2182
2183
|
},
|
|
2183
2184
|
stop: () => {
|
|
2184
2185
|
m = !0, C !== "idle" && (C = "idle", c && c(), nt());
|
|
@@ -2189,7 +2190,7 @@ function le({ autoplay: t = !0, delay: e = 0, driver: n = Pl, keyframes: s, type
|
|
|
2189
2190
|
complete: () => {
|
|
2190
2191
|
C = "finished";
|
|
2191
2192
|
},
|
|
2192
|
-
sample: (M) => (
|
|
2193
|
+
sample: (M) => (L = 0, xt(M))
|
|
2193
2194
|
};
|
|
2194
2195
|
return Vn;
|
|
2195
2196
|
}
|
|
@@ -2222,13 +2223,13 @@ function Rl(t, e, { onUpdate: n, onComplete: s, ...i }) {
|
|
|
2222
2223
|
delay: 0
|
|
2223
2224
|
});
|
|
2224
2225
|
let x = { done: !1, value: h[0] };
|
|
2225
|
-
const
|
|
2226
|
+
const w = [];
|
|
2226
2227
|
let S = 0;
|
|
2227
2228
|
for (; !x.done && S < Ml; )
|
|
2228
|
-
x = g.sample(S),
|
|
2229
|
-
m = void 0, h =
|
|
2229
|
+
x = g.sample(S), w.push(x.value), S += Zt;
|
|
2230
|
+
m = void 0, h = w, f = S - Zt, d = "linear";
|
|
2230
2231
|
}
|
|
2231
|
-
const p =
|
|
2232
|
+
const p = Ua(t.owner.current, e, h, {
|
|
2232
2233
|
...i,
|
|
2233
2234
|
duration: f,
|
|
2234
2235
|
/**
|
|
@@ -2253,7 +2254,7 @@ function Rl(t, e, { onUpdate: n, onComplete: s, ...i }) {
|
|
|
2253
2254
|
return l.then(g, x);
|
|
2254
2255
|
},
|
|
2255
2256
|
attachTimeline(g) {
|
|
2256
|
-
return p.timeline = g, p.onfinish = null,
|
|
2257
|
+
return p.timeline = g, p.onfinish = null, E;
|
|
2257
2258
|
},
|
|
2258
2259
|
get time() {
|
|
2259
2260
|
return tt(p.currentTime || 0);
|
|
@@ -2293,17 +2294,17 @@ function Rl(t, e, { onUpdate: n, onComplete: s, ...i }) {
|
|
|
2293
2294
|
cancel: b
|
|
2294
2295
|
};
|
|
2295
2296
|
}
|
|
2296
|
-
function
|
|
2297
|
+
function kl({ keyframes: t, delay: e, onUpdate: n, onComplete: s }) {
|
|
2297
2298
|
const i = () => (n && n(t[t.length - 1]), s && s(), {
|
|
2298
2299
|
time: 0,
|
|
2299
2300
|
speed: 1,
|
|
2300
2301
|
duration: 0,
|
|
2301
|
-
play:
|
|
2302
|
-
pause:
|
|
2303
|
-
stop:
|
|
2302
|
+
play: E,
|
|
2303
|
+
pause: E,
|
|
2304
|
+
stop: E,
|
|
2304
2305
|
then: (r) => (r(), Promise.resolve()),
|
|
2305
|
-
cancel:
|
|
2306
|
-
complete:
|
|
2306
|
+
cancel: E,
|
|
2307
|
+
complete: E
|
|
2307
2308
|
});
|
|
2308
2309
|
return e ? le({
|
|
2309
2310
|
keyframes: [0, 1],
|
|
@@ -2312,12 +2313,12 @@ function Ll({ keyframes: t, delay: e, onUpdate: n, onComplete: s }) {
|
|
|
2312
2313
|
onComplete: i
|
|
2313
2314
|
}) : i();
|
|
2314
2315
|
}
|
|
2315
|
-
const
|
|
2316
|
+
const Ll = {
|
|
2316
2317
|
type: "spring",
|
|
2317
2318
|
stiffness: 500,
|
|
2318
2319
|
damping: 25,
|
|
2319
2320
|
restSpeed: 10
|
|
2320
|
-
},
|
|
2321
|
+
}, El = (t) => ({
|
|
2321
2322
|
type: "spring",
|
|
2322
2323
|
stiffness: 550,
|
|
2323
2324
|
damping: t === 0 ? 2 * Math.sqrt(550) : 30,
|
|
@@ -2329,10 +2330,10 @@ const El = {
|
|
|
2329
2330
|
type: "keyframes",
|
|
2330
2331
|
ease: [0.25, 0.1, 0.35, 1],
|
|
2331
2332
|
duration: 0.3
|
|
2332
|
-
},
|
|
2333
|
+
}, jl = (t, { keyframes: e }) => e.length > 2 ? Bl : gt.has(t) ? t.startsWith("scale") ? El(e[1]) : Ll : Il, Ue = (t, e) => t === "zIndex" ? !1 : !!(typeof e == "number" || Array.isArray(e) || typeof e == "string" && // It's animatable if we have a string
|
|
2333
2334
|
(ct.test(e) || e === "0") && // And it contains numbers and/or colors
|
|
2334
|
-
!e.startsWith("url(")),
|
|
2335
|
-
function
|
|
2335
|
+
!e.startsWith("url(")), Fl = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
|
|
2336
|
+
function Ol(t) {
|
|
2336
2337
|
const [e, n] = t.slice(0, -1).split("(");
|
|
2337
2338
|
if (e === "drop-shadow")
|
|
2338
2339
|
return t;
|
|
@@ -2340,16 +2341,16 @@ function jl(t) {
|
|
|
2340
2341
|
if (!s)
|
|
2341
2342
|
return t;
|
|
2342
2343
|
const i = n.replace(s, "");
|
|
2343
|
-
let r =
|
|
2344
|
+
let r = Fl.has(e) ? 1 : 0;
|
|
2344
2345
|
return s !== n && (r *= 100), e + "(" + r + i + ")";
|
|
2345
2346
|
}
|
|
2346
2347
|
const Nl = /([a-z-]*)\(.*?\)/g, ze = {
|
|
2347
2348
|
...ct,
|
|
2348
2349
|
getAnimatableNone: (t) => {
|
|
2349
2350
|
const e = t.match(Nl);
|
|
2350
|
-
return e ? e.map(
|
|
2351
|
+
return e ? e.map(Ol).join(" ") : t;
|
|
2351
2352
|
}
|
|
2352
|
-
},
|
|
2353
|
+
}, _l = {
|
|
2353
2354
|
...ci,
|
|
2354
2355
|
// Color props
|
|
2355
2356
|
color: N,
|
|
@@ -2365,27 +2366,27 @@ const Nl = /([a-z-]*)\(.*?\)/g, ze = {
|
|
|
2365
2366
|
borderLeftColor: N,
|
|
2366
2367
|
filter: ze,
|
|
2367
2368
|
WebkitFilter: ze
|
|
2368
|
-
}, vn = (t) =>
|
|
2369
|
+
}, vn = (t) => _l[t];
|
|
2369
2370
|
function Yi(t, e) {
|
|
2370
2371
|
let n = vn(t);
|
|
2371
2372
|
return n !== ze && (n = ct), n.getAnimatableNone ? n.getAnimatableNone(e) : void 0;
|
|
2372
2373
|
}
|
|
2373
2374
|
const Xi = (t) => /^0[^.\s]+$/.test(t);
|
|
2374
|
-
function
|
|
2375
|
+
function Ul(t) {
|
|
2375
2376
|
if (typeof t == "number")
|
|
2376
2377
|
return t === 0;
|
|
2377
2378
|
if (t !== null)
|
|
2378
2379
|
return t === "none" || t === "0" || Xi(t);
|
|
2379
2380
|
}
|
|
2380
2381
|
function zl(t, e, n, s) {
|
|
2381
|
-
const i =
|
|
2382
|
+
const i = Ue(e, n);
|
|
2382
2383
|
let r;
|
|
2383
2384
|
Array.isArray(n) ? r = [...n] : r = [null, n];
|
|
2384
2385
|
const o = s.from !== void 0 ? s.from : t.get();
|
|
2385
2386
|
let a;
|
|
2386
2387
|
const l = [];
|
|
2387
2388
|
for (let c = 0; c < r.length; c++)
|
|
2388
|
-
r[c] === null && (r[c] = c === 0 ? o : r[c - 1]),
|
|
2389
|
+
r[c] === null && (r[c] = c === 0 ? o : r[c - 1]), Ul(r[c]) && l.push(c), typeof r[c] == "string" && r[c] !== "none" && r[c] !== "0" && (a = r[c]);
|
|
2389
2390
|
if (i && l.length && a)
|
|
2390
2391
|
for (let c = 0; c < l.length; c++) {
|
|
2391
2392
|
const u = l[c];
|
|
@@ -2405,7 +2406,7 @@ const Gl = {
|
|
|
2405
2406
|
const r = xn(s, t) || {}, o = r.delay || s.delay || 0;
|
|
2406
2407
|
let { elapsed: a = 0 } = s;
|
|
2407
2408
|
a = a - at(o);
|
|
2408
|
-
const l = zl(e, t, n, r), c = l[0], u = l[l.length - 1], h =
|
|
2409
|
+
const l = zl(e, t, n, r), c = l[0], u = l[l.length - 1], h = Ue(t, c), f = Ue(t, u);
|
|
2409
2410
|
qt(h === f, `You are trying to animate ${t} from "${c}" to "${u}". ${c} is not an animatable value - to enable this animation set ${c} to a value animatable to ${u} via the \`style\` property.`);
|
|
2410
2411
|
let d = {
|
|
2411
2412
|
keyframes: l,
|
|
@@ -2422,9 +2423,9 @@ const Gl = {
|
|
|
2422
2423
|
};
|
|
2423
2424
|
if (Wl(r) || (d = {
|
|
2424
2425
|
...d,
|
|
2425
|
-
...
|
|
2426
|
-
}), d.duration && (d.duration = at(d.duration)), d.repeatDelay && (d.repeatDelay = at(d.repeatDelay)), !h || !f ||
|
|
2427
|
-
return
|
|
2426
|
+
...jl(t, d)
|
|
2427
|
+
}), d.duration && (d.duration = at(d.duration)), d.repeatDelay && (d.repeatDelay = at(d.repeatDelay)), !h || !f || _a.current || r.type === !1 || Gl.skipAnimations)
|
|
2428
|
+
return kl(d);
|
|
2428
2429
|
if (
|
|
2429
2430
|
/**
|
|
2430
2431
|
* If this is a handoff animation, the optimised animation will be running via
|
|
@@ -2444,22 +2445,22 @@ const Gl = {
|
|
|
2444
2445
|
return le(d);
|
|
2445
2446
|
};
|
|
2446
2447
|
function ce(t) {
|
|
2447
|
-
return !!(
|
|
2448
|
+
return !!(U(t) && t.add);
|
|
2448
2449
|
}
|
|
2449
2450
|
const Qi = (t) => /^\-?\d*\.?\d+$/.test(t);
|
|
2450
|
-
function
|
|
2451
|
+
function Tn(t, e) {
|
|
2451
2452
|
t.indexOf(e) === -1 && t.push(e);
|
|
2452
2453
|
}
|
|
2453
|
-
function
|
|
2454
|
+
function Pn(t, e) {
|
|
2454
2455
|
const n = t.indexOf(e);
|
|
2455
2456
|
n > -1 && t.splice(n, 1);
|
|
2456
2457
|
}
|
|
2457
|
-
class
|
|
2458
|
+
class wn {
|
|
2458
2459
|
constructor() {
|
|
2459
2460
|
this.subscriptions = [];
|
|
2460
2461
|
}
|
|
2461
2462
|
add(e) {
|
|
2462
|
-
return
|
|
2463
|
+
return Tn(this.subscriptions, e), () => Pn(this.subscriptions, e);
|
|
2463
2464
|
}
|
|
2464
2465
|
notify(e, n, s) {
|
|
2465
2466
|
const i = this.subscriptions.length;
|
|
@@ -2496,7 +2497,7 @@ class Hl {
|
|
|
2496
2497
|
constructor(e, n = {}) {
|
|
2497
2498
|
this.version = "10.18.0", this.timeDelta = 0, this.lastUpdated = 0, this.canTrackVelocity = !1, this.events = {}, this.updateAndNotify = (s, i = !0) => {
|
|
2498
2499
|
this.prev = this.current, this.current = s;
|
|
2499
|
-
const { delta: r, timestamp: o } =
|
|
2500
|
+
const { delta: r, timestamp: o } = j;
|
|
2500
2501
|
this.lastUpdated !== o && (this.timeDelta = r, this.lastUpdated = o, V.postRender(this.scheduleVelocityCheck)), this.prev !== this.current && this.events.change && this.events.change.notify(this.current), this.events.velocityChange && this.events.velocityChange.notify(this.getVelocity()), i && this.events.renderRequest && this.events.renderRequest.notify(this.current);
|
|
2501
2502
|
}, this.scheduleVelocityCheck = () => V.postRender(this.velocityCheck), this.velocityCheck = ({ timestamp: s }) => {
|
|
2502
2503
|
s !== this.lastUpdated && (this.prev = this.current, this.events.velocityChange && this.events.velocityChange.notify(this.getVelocity()));
|
|
@@ -2546,7 +2547,7 @@ class Hl {
|
|
|
2546
2547
|
return process.env.NODE_ENV !== "production" && An(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", e);
|
|
2547
2548
|
}
|
|
2548
2549
|
on(e, n) {
|
|
2549
|
-
this.events[e] || (this.events[e] = new
|
|
2550
|
+
this.events[e] || (this.events[e] = new wn());
|
|
2550
2551
|
const s = this.events[e].add(n);
|
|
2551
2552
|
return e === "change" ? () => {
|
|
2552
2553
|
s(), V.read(() => {
|
|
@@ -2680,7 +2681,7 @@ function Vt(t, e) {
|
|
|
2680
2681
|
const Zi = (t) => (e) => e.test(t), ql = {
|
|
2681
2682
|
test: (t) => t === "auto",
|
|
2682
2683
|
parse: (t) => t
|
|
2683
|
-
}, Ji = [yt,
|
|
2684
|
+
}, Ji = [yt, T, K, st, ea, ta, ql], Lt = (t) => Ji.find(Zi(t)), Kl = [...Ji, N, ct], Yl = (t) => Kl.find(Zi(t));
|
|
2684
2685
|
function Xl(t, e, n) {
|
|
2685
2686
|
t.hasValue(e) ? t.getValue(e).set(n) : t.addValue(e, Vt(n));
|
|
2686
2687
|
}
|
|
@@ -2827,34 +2828,34 @@ function cc(t) {
|
|
|
2827
2828
|
const u = t.getProps(), h = t.getVariantContext(!0) || {}, f = [], d = /* @__PURE__ */ new Set();
|
|
2828
2829
|
let m = {}, p = 1 / 0;
|
|
2829
2830
|
for (let b = 0; b < ac; b++) {
|
|
2830
|
-
const y = rc[b], g = n[y], x = u[y] !== void 0 ? u[y] : h[y],
|
|
2831
|
+
const y = rc[b], g = n[y], x = u[y] !== void 0 ? u[y] : h[y], w = _t(x), S = y === c ? g.isActive : null;
|
|
2831
2832
|
S === !1 && (p = b);
|
|
2832
|
-
let C = x === h[y] && x !== u[y] &&
|
|
2833
|
+
let C = x === h[y] && x !== u[y] && w;
|
|
2833
2834
|
if (C && s && t.manuallyAnimateOnMount && (C = !1), g.protectedKeys = { ...m }, // If it isn't active and hasn't *just* been set as inactive
|
|
2834
2835
|
!g.isActive && S === null || // If we didn't and don't have any defined prop for this animation type
|
|
2835
2836
|
!x && !g.prevProp || // Or if the prop doesn't define an animation
|
|
2836
2837
|
pe(x) || typeof x == "boolean")
|
|
2837
2838
|
continue;
|
|
2838
|
-
let
|
|
2839
|
-
y === c && g.isActive && !C &&
|
|
2840
|
-
b > p &&
|
|
2839
|
+
let L = uc(g.prevProp, x) || // If we're making this variant active, we want to always make it active
|
|
2840
|
+
y === c && g.isActive && !C && w || // If we removed a higher-priority variant (i is in reverse order)
|
|
2841
|
+
b > p && w, Y = !1;
|
|
2841
2842
|
const vt = Array.isArray(x) ? x : [x];
|
|
2842
2843
|
let H = vt.reduce(i, {});
|
|
2843
2844
|
S === !1 && (H = {});
|
|
2844
|
-
const { prevResolvedValues: X = {} } = g,
|
|
2845
|
+
const { prevResolvedValues: X = {} } = g, O = {
|
|
2845
2846
|
...X,
|
|
2846
2847
|
...H
|
|
2847
2848
|
}, xt = (I) => {
|
|
2848
|
-
|
|
2849
|
+
L = !0, d.has(I) && (Y = !0, d.delete(I)), g.needsAnimating[I] = !0;
|
|
2849
2850
|
};
|
|
2850
|
-
for (const I in
|
|
2851
|
+
for (const I in O) {
|
|
2851
2852
|
const nt = H[I], Dt = X[I];
|
|
2852
2853
|
if (m.hasOwnProperty(I))
|
|
2853
2854
|
continue;
|
|
2854
2855
|
let bt = !1;
|
|
2855
|
-
oe(nt) && oe(Dt) ? bt = !
|
|
2856
|
+
oe(nt) && oe(Dt) ? bt = !wi(nt, Dt) : bt = nt !== Dt, bt ? nt !== void 0 ? xt(I) : d.add(I) : nt !== void 0 && d.has(I) ? xt(I) : g.protectedKeys[I] = !0;
|
|
2856
2857
|
}
|
|
2857
|
-
g.prevProp = x, g.prevResolvedValues = H, g.isActive && (m = { ...m, ...H }), s && t.blockInitialAnimation && (
|
|
2858
|
+
g.prevProp = x, g.prevResolvedValues = H, g.isActive && (m = { ...m, ...H }), s && t.blockInitialAnimation && (L = !1), L && (!C || Y) && f.push(...vt.map((I) => ({
|
|
2858
2859
|
animation: I,
|
|
2859
2860
|
options: { type: y, ...l }
|
|
2860
2861
|
})));
|
|
@@ -2890,7 +2891,7 @@ function cc(t) {
|
|
|
2890
2891
|
};
|
|
2891
2892
|
}
|
|
2892
2893
|
function uc(t, e) {
|
|
2893
|
-
return typeof e == "string" ? e !== t : Array.isArray(e) ? !
|
|
2894
|
+
return typeof e == "string" ? e !== t : Array.isArray(e) ? !wi(e, t) : !1;
|
|
2894
2895
|
}
|
|
2895
2896
|
function ft(t = !1) {
|
|
2896
2897
|
return {
|
|
@@ -2975,29 +2976,29 @@ class eo {
|
|
|
2975
2976
|
if (this.startEvent = null, this.lastMoveEvent = null, this.lastMoveEventInfo = null, this.handlers = {}, this.contextWindow = window, this.updatePoint = () => {
|
|
2976
2977
|
if (!(this.lastMoveEvent && this.lastMoveEventInfo))
|
|
2977
2978
|
return;
|
|
2978
|
-
const h =
|
|
2979
|
+
const h = Le(this.lastMoveEventInfo, this.history), f = this.startEvent !== null, d = gc(h.offset, { x: 0, y: 0 }) >= 3;
|
|
2979
2980
|
if (!f && !d)
|
|
2980
2981
|
return;
|
|
2981
|
-
const { point: m } = h, { timestamp: p } =
|
|
2982
|
+
const { point: m } = h, { timestamp: p } = j;
|
|
2982
2983
|
this.history.push({ ...m, timestamp: p });
|
|
2983
2984
|
const { onStart: v, onMove: b } = this.handlers;
|
|
2984
2985
|
f || (v && v(this.lastMoveEvent, h), this.startEvent = this.lastMoveEvent), b && b(this.lastMoveEvent, h);
|
|
2985
2986
|
}, this.handlePointerMove = (h, f) => {
|
|
2986
|
-
this.lastMoveEvent = h, this.lastMoveEventInfo =
|
|
2987
|
+
this.lastMoveEvent = h, this.lastMoveEventInfo = ke(f, this.transformPagePoint), V.update(this.updatePoint, !0);
|
|
2987
2988
|
}, this.handlePointerUp = (h, f) => {
|
|
2988
2989
|
this.end();
|
|
2989
2990
|
const { onEnd: d, onSessionEnd: m, resumeAnimation: p } = this.handlers;
|
|
2990
2991
|
if (this.dragSnapToOrigin && p && p(), !(this.lastMoveEvent && this.lastMoveEventInfo))
|
|
2991
2992
|
return;
|
|
2992
|
-
const v =
|
|
2993
|
+
const v = Le(h.type === "pointercancel" ? this.lastMoveEventInfo : ke(f, this.transformPagePoint), this.history);
|
|
2993
2994
|
this.startEvent && d && d(h, v), m && m(h, v);
|
|
2994
2995
|
}, !vi(e))
|
|
2995
2996
|
return;
|
|
2996
2997
|
this.dragSnapToOrigin = r, this.handlers = n, this.transformPagePoint = s, this.contextWindow = i || window;
|
|
2997
|
-
const o = ve(e), a =
|
|
2998
|
+
const o = ve(e), a = ke(o, this.transformPagePoint), { point: l } = a, { timestamp: c } = j;
|
|
2998
2999
|
this.history = [{ ...l, timestamp: c }];
|
|
2999
3000
|
const { onSessionStart: u } = n;
|
|
3000
|
-
u && u(e,
|
|
3001
|
+
u && u(e, Le(a, this.history)), this.removeListeners = rt(J(this.contextWindow, "pointermove", this.handlePointerMove), J(this.contextWindow, "pointerup", this.handlePointerUp), J(this.contextWindow, "pointercancel", this.handlePointerUp));
|
|
3001
3002
|
}
|
|
3002
3003
|
updateHandlers(e) {
|
|
3003
3004
|
this.handlers = e;
|
|
@@ -3006,13 +3007,13 @@ class eo {
|
|
|
3006
3007
|
this.removeListeners && this.removeListeners(), et(this.updatePoint);
|
|
3007
3008
|
}
|
|
3008
3009
|
}
|
|
3009
|
-
function
|
|
3010
|
+
function ke(t, e) {
|
|
3010
3011
|
return e ? { point: e(t.point) } : t;
|
|
3011
3012
|
}
|
|
3012
3013
|
function ns(t, e) {
|
|
3013
3014
|
return { x: t.x - e.x, y: t.y - e.y };
|
|
3014
3015
|
}
|
|
3015
|
-
function
|
|
3016
|
+
function Le({ point: t }, e) {
|
|
3016
3017
|
return {
|
|
3017
3018
|
point: t,
|
|
3018
3019
|
delta: ns(t, no(e)),
|
|
@@ -3044,32 +3045,32 @@ function vc(t, e) {
|
|
|
3044
3045
|
};
|
|
3045
3046
|
return o.x === 1 / 0 && (o.x = 0), o.y === 1 / 0 && (o.y = 0), o;
|
|
3046
3047
|
}
|
|
3047
|
-
function
|
|
3048
|
+
function W(t) {
|
|
3048
3049
|
return t.max - t.min;
|
|
3049
3050
|
}
|
|
3050
3051
|
function Ge(t, e = 0, n = 0.01) {
|
|
3051
3052
|
return Math.abs(t - e) <= n;
|
|
3052
3053
|
}
|
|
3053
3054
|
function ss(t, e, n, s = 0.5) {
|
|
3054
|
-
t.origin = s, t.originPoint =
|
|
3055
|
+
t.origin = s, t.originPoint = k(e.min, e.max, t.origin), t.scale = W(n) / W(e), (Ge(t.scale, 1, 1e-4) || isNaN(t.scale)) && (t.scale = 1), t.translate = k(n.min, n.max, t.origin) - t.originPoint, (Ge(t.translate) || isNaN(t.translate)) && (t.translate = 0);
|
|
3055
3056
|
}
|
|
3056
|
-
function
|
|
3057
|
+
function Ft(t, e, n, s) {
|
|
3057
3058
|
ss(t.x, e.x, n.x, s ? s.originX : void 0), ss(t.y, e.y, n.y, s ? s.originY : void 0);
|
|
3058
3059
|
}
|
|
3059
3060
|
function is(t, e, n) {
|
|
3060
|
-
t.min = n.min + e.min, t.max = t.min +
|
|
3061
|
+
t.min = n.min + e.min, t.max = t.min + W(e);
|
|
3061
3062
|
}
|
|
3062
3063
|
function xc(t, e, n) {
|
|
3063
3064
|
is(t.x, e.x, n.x), is(t.y, e.y, n.y);
|
|
3064
3065
|
}
|
|
3065
3066
|
function os(t, e, n) {
|
|
3066
|
-
t.min = e.min - n.min, t.max = t.min +
|
|
3067
|
+
t.min = e.min - n.min, t.max = t.min + W(e);
|
|
3067
3068
|
}
|
|
3068
|
-
function
|
|
3069
|
+
function Ot(t, e, n) {
|
|
3069
3070
|
os(t.x, e.x, n.x), os(t.y, e.y, n.y);
|
|
3070
3071
|
}
|
|
3071
3072
|
function bc(t, { min: e, max: n }, s) {
|
|
3072
|
-
return e !== void 0 && t < e ? t = s ?
|
|
3073
|
+
return e !== void 0 && t < e ? t = s ? k(e, t, s.min) : Math.max(t, e) : n !== void 0 && t > n && (t = s ? k(n, t, s.max) : Math.min(t, n)), t;
|
|
3073
3074
|
}
|
|
3074
3075
|
function rs(t, e, n) {
|
|
3075
3076
|
return {
|
|
@@ -3077,7 +3078,7 @@ function rs(t, e, n) {
|
|
|
3077
3078
|
max: n !== void 0 ? t.max + n - (t.max - t.min) : void 0
|
|
3078
3079
|
};
|
|
3079
3080
|
}
|
|
3080
|
-
function
|
|
3081
|
+
function Tc(t, { top: e, left: n, bottom: s, right: i }) {
|
|
3081
3082
|
return {
|
|
3082
3083
|
x: rs(t.x, n, i),
|
|
3083
3084
|
y: rs(t.y, e, s)
|
|
@@ -3087,15 +3088,15 @@ function as(t, e) {
|
|
|
3087
3088
|
let n = e.min - t.min, s = e.max - t.max;
|
|
3088
3089
|
return e.max - e.min < t.max - t.min && ([n, s] = [s, n]), { min: n, max: s };
|
|
3089
3090
|
}
|
|
3090
|
-
function
|
|
3091
|
+
function Pc(t, e) {
|
|
3091
3092
|
return {
|
|
3092
3093
|
x: as(t.x, e.x),
|
|
3093
3094
|
y: as(t.y, e.y)
|
|
3094
3095
|
};
|
|
3095
3096
|
}
|
|
3096
|
-
function
|
|
3097
|
+
function wc(t, e) {
|
|
3097
3098
|
let n = 0.5;
|
|
3098
|
-
const s =
|
|
3099
|
+
const s = W(t), i = W(e);
|
|
3099
3100
|
return i > s ? n = zt(e.min, e.max - s, t.min) : s > i && (n = zt(t.min, t.max - i, e.min)), lt(0, 1, n);
|
|
3100
3101
|
}
|
|
3101
3102
|
function Ac(t, e) {
|
|
@@ -3123,14 +3124,14 @@ const us = () => ({
|
|
|
3123
3124
|
scale: 1,
|
|
3124
3125
|
origin: 0,
|
|
3125
3126
|
originPoint: 0
|
|
3126
|
-
}),
|
|
3127
|
+
}), wt = () => ({
|
|
3127
3128
|
x: us(),
|
|
3128
3129
|
y: us()
|
|
3129
3130
|
}), hs = () => ({ min: 0, max: 0 }), B = () => ({
|
|
3130
3131
|
x: hs(),
|
|
3131
3132
|
y: hs()
|
|
3132
3133
|
});
|
|
3133
|
-
function
|
|
3134
|
+
function $(t) {
|
|
3134
3135
|
return [t("x"), t("y")];
|
|
3135
3136
|
}
|
|
3136
3137
|
function so({ top: t, left: e, right: n, bottom: s }) {
|
|
@@ -3153,11 +3154,11 @@ function Cc(t, e) {
|
|
|
3153
3154
|
right: s.x
|
|
3154
3155
|
};
|
|
3155
3156
|
}
|
|
3156
|
-
function
|
|
3157
|
+
function Ee(t) {
|
|
3157
3158
|
return t === void 0 || t === 1;
|
|
3158
3159
|
}
|
|
3159
3160
|
function He({ scale: t, scaleX: e, scaleY: n }) {
|
|
3160
|
-
return !
|
|
3161
|
+
return !Ee(t) || !Ee(e) || !Ee(n);
|
|
3161
3162
|
}
|
|
3162
3163
|
function dt(t) {
|
|
3163
3164
|
return He(t) || io(t) || t.z || t.rotate || t.rotateX || t.rotateY;
|
|
@@ -3204,7 +3205,7 @@ function it(t, e) {
|
|
|
3204
3205
|
t.min = t.min + e, t.max = t.max + e;
|
|
3205
3206
|
}
|
|
3206
3207
|
function ps(t, e, [n, s, i]) {
|
|
3207
|
-
const r = e[i] !== void 0 ? e[i] : 0.5, o =
|
|
3208
|
+
const r = e[i] !== void 0 ? e[i] : 0.5, o = k(t.min, t.max, r);
|
|
3208
3209
|
qe(t, e[n], e[s], o, e.scale);
|
|
3209
3210
|
}
|
|
3210
3211
|
const Dc = ["x", "scaleX", "originX"], Rc = ["y", "scaleY", "originY"];
|
|
@@ -3214,12 +3215,12 @@ function At(t, e) {
|
|
|
3214
3215
|
function ro(t, e) {
|
|
3215
3216
|
return so(Cc(t.getBoundingClientRect(), e));
|
|
3216
3217
|
}
|
|
3217
|
-
function
|
|
3218
|
+
function kc(t, e, n) {
|
|
3218
3219
|
const s = ro(t, n), { scroll: i } = e;
|
|
3219
3220
|
return i && (it(s.x, i.offset.x), it(s.y, i.offset.y)), s;
|
|
3220
3221
|
}
|
|
3221
|
-
const ao = ({ current: t }) => t ? t.ownerDocument.defaultView : null,
|
|
3222
|
-
class
|
|
3222
|
+
const ao = ({ current: t }) => t ? t.ownerDocument.defaultView : null, Lc = /* @__PURE__ */ new WeakMap();
|
|
3223
|
+
class Ec {
|
|
3223
3224
|
constructor(e) {
|
|
3224
3225
|
this.openGlobalLock = null, this.isDragging = !1, this.currentDirection = null, this.originPoint = { x: 0, y: 0 }, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic = B(), this.visualElement = e;
|
|
3225
3226
|
}
|
|
@@ -3234,13 +3235,13 @@ class kc {
|
|
|
3234
3235
|
const { drag: f, dragPropagation: d, onDragStart: m } = this.getProps();
|
|
3235
3236
|
if (f && !d && (this.openGlobalLock && this.openGlobalLock(), this.openGlobalLock = bi(f), !this.openGlobalLock))
|
|
3236
3237
|
return;
|
|
3237
|
-
this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0),
|
|
3238
|
+
this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), $((v) => {
|
|
3238
3239
|
let b = this.getAxisMotionValue(v).get() || 0;
|
|
3239
3240
|
if (K.test(b)) {
|
|
3240
3241
|
const { projection: y } = this.visualElement;
|
|
3241
3242
|
if (y && y.layout) {
|
|
3242
3243
|
const g = y.layout.layoutBox[v];
|
|
3243
|
-
g && (b =
|
|
3244
|
+
g && (b = W(g) * (parseFloat(b) / 100));
|
|
3244
3245
|
}
|
|
3245
3246
|
}
|
|
3246
3247
|
this.originPoint[v] = b;
|
|
@@ -3257,7 +3258,7 @@ class kc {
|
|
|
3257
3258
|
return;
|
|
3258
3259
|
}
|
|
3259
3260
|
this.updateAxis("x", h.point, v), this.updateAxis("y", h.point, v), this.visualElement.render(), p && p(u, h);
|
|
3260
|
-
}, a = (u, h) => this.stop(u, h), l = () =>
|
|
3261
|
+
}, a = (u, h) => this.stop(u, h), l = () => $((u) => {
|
|
3261
3262
|
var h;
|
|
3262
3263
|
return this.getAnimationState(u) === "paused" && ((h = this.getAxisMotionValue(u).animation) === null || h === void 0 ? void 0 : h.play());
|
|
3263
3264
|
}), { dragSnapToOrigin: c } = this.getProps();
|
|
@@ -3300,21 +3301,21 @@ class kc {
|
|
|
3300
3301
|
resolveConstraints() {
|
|
3301
3302
|
var e;
|
|
3302
3303
|
const { dragConstraints: n, dragElastic: s } = this.getProps(), i = this.visualElement.projection && !this.visualElement.projection.layout ? this.visualElement.projection.measure(!1) : (e = this.visualElement.projection) === null || e === void 0 ? void 0 : e.layout, r = this.constraints;
|
|
3303
|
-
n &&
|
|
3304
|
+
n && Tt(n) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : n && i ? this.constraints = Tc(i.layoutBox, n) : this.constraints = !1, this.elastic = Sc(s), r !== this.constraints && i && this.constraints && !this.hasMutatedConstraints && $((o) => {
|
|
3304
3305
|
this.getAxisMotionValue(o) && (this.constraints[o] = Ac(i.layoutBox[o], this.constraints[o]));
|
|
3305
3306
|
});
|
|
3306
3307
|
}
|
|
3307
3308
|
resolveRefConstraints() {
|
|
3308
3309
|
const { dragConstraints: e, onMeasureDragConstraints: n } = this.getProps();
|
|
3309
|
-
if (!e || !
|
|
3310
|
+
if (!e || !Tt(e))
|
|
3310
3311
|
return !1;
|
|
3311
3312
|
const s = e.current;
|
|
3312
3313
|
q(s !== null, "If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");
|
|
3313
3314
|
const { projection: i } = this.visualElement;
|
|
3314
3315
|
if (!i || !i.layout)
|
|
3315
3316
|
return !1;
|
|
3316
|
-
const r =
|
|
3317
|
-
let o =
|
|
3317
|
+
const r = kc(s, i.root, this.visualElement.getTransformPagePoint());
|
|
3318
|
+
let o = Pc(i.layout.layoutBox, r);
|
|
3318
3319
|
if (n) {
|
|
3319
3320
|
const a = n(Vc(o));
|
|
3320
3321
|
this.hasMutatedConstraints = !!a, a && (o = so(a));
|
|
@@ -3322,7 +3323,7 @@ class kc {
|
|
|
3322
3323
|
return o;
|
|
3323
3324
|
}
|
|
3324
3325
|
startAnimation(e) {
|
|
3325
|
-
const { drag: n, dragMomentum: s, dragElastic: i, dragTransition: r, dragSnapToOrigin: o, onDragTransitionEnd: a } = this.getProps(), l = this.constraints || {}, c =
|
|
3326
|
+
const { drag: n, dragMomentum: s, dragElastic: i, dragTransition: r, dragSnapToOrigin: o, onDragTransitionEnd: a } = this.getProps(), l = this.constraints || {}, c = $((u) => {
|
|
3326
3327
|
if (!Jt(u, n, this.currentDirection))
|
|
3327
3328
|
return;
|
|
3328
3329
|
let h = l && l[u] || {};
|
|
@@ -3347,10 +3348,10 @@ class kc {
|
|
|
3347
3348
|
return s.start(bn(e, s, 0, n));
|
|
3348
3349
|
}
|
|
3349
3350
|
stopAnimation() {
|
|
3350
|
-
|
|
3351
|
+
$((e) => this.getAxisMotionValue(e).stop());
|
|
3351
3352
|
}
|
|
3352
3353
|
pauseAnimation() {
|
|
3353
|
-
|
|
3354
|
+
$((e) => {
|
|
3354
3355
|
var n;
|
|
3355
3356
|
return (n = this.getAxisMotionValue(e).animation) === null || n === void 0 ? void 0 : n.pause();
|
|
3356
3357
|
});
|
|
@@ -3370,14 +3371,14 @@ class kc {
|
|
|
3370
3371
|
return i || this.visualElement.getValue(e, (s.initial ? s.initial[e] : void 0) || 0);
|
|
3371
3372
|
}
|
|
3372
3373
|
snapToCursor(e) {
|
|
3373
|
-
|
|
3374
|
+
$((n) => {
|
|
3374
3375
|
const { drag: s } = this.getProps();
|
|
3375
3376
|
if (!Jt(n, s, this.currentDirection))
|
|
3376
3377
|
return;
|
|
3377
3378
|
const { projection: i } = this.visualElement, r = this.getAxisMotionValue(n);
|
|
3378
3379
|
if (i && i.layout) {
|
|
3379
3380
|
const { min: o, max: a } = i.layout.layoutBox[n];
|
|
3380
|
-
r.set(e[n] -
|
|
3381
|
+
r.set(e[n] - k(o, a, 0.5));
|
|
3381
3382
|
}
|
|
3382
3383
|
});
|
|
3383
3384
|
}
|
|
@@ -3390,39 +3391,39 @@ class kc {
|
|
|
3390
3391
|
if (!this.visualElement.current)
|
|
3391
3392
|
return;
|
|
3392
3393
|
const { drag: e, dragConstraints: n } = this.getProps(), { projection: s } = this.visualElement;
|
|
3393
|
-
if (!
|
|
3394
|
+
if (!Tt(n) || !s || !this.constraints)
|
|
3394
3395
|
return;
|
|
3395
3396
|
this.stopAnimation();
|
|
3396
3397
|
const i = { x: 0, y: 0 };
|
|
3397
|
-
|
|
3398
|
+
$((o) => {
|
|
3398
3399
|
const a = this.getAxisMotionValue(o);
|
|
3399
3400
|
if (a) {
|
|
3400
3401
|
const l = a.get();
|
|
3401
|
-
i[o] =
|
|
3402
|
+
i[o] = wc({ min: l, max: l }, this.constraints[o]);
|
|
3402
3403
|
}
|
|
3403
3404
|
});
|
|
3404
3405
|
const { transformTemplate: r } = this.visualElement.getProps();
|
|
3405
|
-
this.visualElement.current.style.transform = r ? r({}, "") : "none", s.root && s.root.updateScroll(), s.updateLayout(), this.resolveConstraints(),
|
|
3406
|
+
this.visualElement.current.style.transform = r ? r({}, "") : "none", s.root && s.root.updateScroll(), s.updateLayout(), this.resolveConstraints(), $((o) => {
|
|
3406
3407
|
if (!Jt(o, e, null))
|
|
3407
3408
|
return;
|
|
3408
3409
|
const a = this.getAxisMotionValue(o), { min: l, max: c } = this.constraints[o];
|
|
3409
|
-
a.set(
|
|
3410
|
+
a.set(k(l, c, i[o]));
|
|
3410
3411
|
});
|
|
3411
3412
|
}
|
|
3412
3413
|
addListeners() {
|
|
3413
3414
|
if (!this.visualElement.current)
|
|
3414
3415
|
return;
|
|
3415
|
-
|
|
3416
|
+
Lc.set(this.visualElement, this);
|
|
3416
3417
|
const e = this.visualElement.current, n = J(e, "pointerdown", (l) => {
|
|
3417
3418
|
const { drag: c, dragListener: u = !0 } = this.getProps();
|
|
3418
3419
|
c && u && this.start(l);
|
|
3419
3420
|
}), s = () => {
|
|
3420
3421
|
const { dragConstraints: l } = this.getProps();
|
|
3421
|
-
|
|
3422
|
+
Tt(l) && (this.constraints = this.resolveRefConstraints());
|
|
3422
3423
|
}, { projection: i } = this.visualElement, r = i.addEventListener("measure", s);
|
|
3423
3424
|
i && !i.layout && (i.root && i.root.updateScroll(), i.updateLayout()), s();
|
|
3424
3425
|
const o = Z(window, "resize", () => this.scalePositionWithinConstraints()), a = i.addEventListener("didUpdate", ({ delta: l, hasLayoutChanged: c }) => {
|
|
3425
|
-
this.isDragging && c && (
|
|
3426
|
+
this.isDragging && c && ($((u) => {
|
|
3426
3427
|
const h = this.getAxisMotionValue(u);
|
|
3427
3428
|
h && (this.originPoint[u] += l[u].translate, h.set(h.get() + l[u].translate));
|
|
3428
3429
|
}), this.visualElement.render());
|
|
@@ -3453,11 +3454,11 @@ function Bc(t, e = 10) {
|
|
|
3453
3454
|
}
|
|
3454
3455
|
class Ic extends ut {
|
|
3455
3456
|
constructor(e) {
|
|
3456
|
-
super(e), this.removeGroupControls =
|
|
3457
|
+
super(e), this.removeGroupControls = E, this.removeListeners = E, this.controls = new Ec(e);
|
|
3457
3458
|
}
|
|
3458
3459
|
mount() {
|
|
3459
3460
|
const { dragControls: e } = this.node.getProps();
|
|
3460
|
-
e && (this.removeGroupControls = e.subscribe(this.controls)), this.removeListeners = this.controls.addListeners() ||
|
|
3461
|
+
e && (this.removeGroupControls = e.subscribe(this.controls)), this.removeListeners = this.controls.addListeners() || E;
|
|
3461
3462
|
}
|
|
3462
3463
|
unmount() {
|
|
3463
3464
|
this.removeGroupControls(), this.removeListeners();
|
|
@@ -3466,9 +3467,9 @@ class Ic extends ut {
|
|
|
3466
3467
|
const gs = (t) => (e, n) => {
|
|
3467
3468
|
t && V.update(() => t(e, n));
|
|
3468
3469
|
};
|
|
3469
|
-
class
|
|
3470
|
+
class jc extends ut {
|
|
3470
3471
|
constructor() {
|
|
3471
|
-
super(...arguments), this.removePointerDownListener =
|
|
3472
|
+
super(...arguments), this.removePointerDownListener = E;
|
|
3472
3473
|
}
|
|
3473
3474
|
onPointerDown(e) {
|
|
3474
3475
|
this.session = new eo(e, this.createPanHandlers(), {
|
|
@@ -3497,8 +3498,8 @@ class Fc extends ut {
|
|
|
3497
3498
|
this.removePointerDownListener(), this.session && this.session.end();
|
|
3498
3499
|
}
|
|
3499
3500
|
}
|
|
3500
|
-
function
|
|
3501
|
-
const t =
|
|
3501
|
+
function Fc() {
|
|
3502
|
+
const t = _(sn);
|
|
3502
3503
|
if (t === null)
|
|
3503
3504
|
return [!0, null];
|
|
3504
3505
|
const { isPresent: e, onExitComplete: n, register: s } = t, i = Mo();
|
|
@@ -3519,26 +3520,26 @@ const ne = {
|
|
|
3519
3520
|
function ys(t, e) {
|
|
3520
3521
|
return e.max === e.min ? 0 : t / (e.max - e.min) * 100;
|
|
3521
3522
|
}
|
|
3522
|
-
const
|
|
3523
|
+
const Et = {
|
|
3523
3524
|
correct: (t, e) => {
|
|
3524
3525
|
if (!e.target)
|
|
3525
3526
|
return t;
|
|
3526
3527
|
if (typeof t == "string")
|
|
3527
|
-
if (
|
|
3528
|
+
if (T.test(t))
|
|
3528
3529
|
t = parseFloat(t);
|
|
3529
3530
|
else
|
|
3530
3531
|
return t;
|
|
3531
3532
|
const n = ys(t, e.target.x), s = ys(t, e.target.y);
|
|
3532
3533
|
return `${n}% ${s}%`;
|
|
3533
3534
|
}
|
|
3534
|
-
},
|
|
3535
|
+
}, Oc = {
|
|
3535
3536
|
correct: (t, { treeScale: e, projectionDelta: n }) => {
|
|
3536
3537
|
const s = t, i = ct.parse(t);
|
|
3537
3538
|
if (i.length > 5)
|
|
3538
3539
|
return s;
|
|
3539
3540
|
const r = ct.createTransformer(t), o = typeof i[0] != "number" ? 1 : 0, a = n.x.scale * e.x, l = n.y.scale * e.y;
|
|
3540
3541
|
i[0 + o] /= a, i[1 + o] /= l;
|
|
3541
|
-
const c =
|
|
3542
|
+
const c = k(a, l, 0.5);
|
|
3542
3543
|
return typeof i[2 + o] == "number" && (i[2 + o] /= c), typeof i[3 + o] == "number" && (i[3 + o] /= c), r(i);
|
|
3543
3544
|
}
|
|
3544
3545
|
};
|
|
@@ -3550,7 +3551,7 @@ class Nc extends zs.Component {
|
|
|
3550
3551
|
*/
|
|
3551
3552
|
componentDidMount() {
|
|
3552
3553
|
const { visualElement: e, layoutGroup: n, switchLayoutGroup: s, layoutId: i } = this.props, { projection: r } = e;
|
|
3553
|
-
qr(
|
|
3554
|
+
qr(_c), r && (n.group && n.group.add(r), s && s.register && i && s.register(r), r.root.didUpdate(), r.addEventListener("animationComplete", () => {
|
|
3554
3555
|
this.safeToRemove();
|
|
3555
3556
|
}), r.setOptions({
|
|
3556
3557
|
...r.options,
|
|
@@ -3583,12 +3584,12 @@ class Nc extends zs.Component {
|
|
|
3583
3584
|
}
|
|
3584
3585
|
}
|
|
3585
3586
|
function lo(t) {
|
|
3586
|
-
const [e, n] =
|
|
3587
|
-
return zs.createElement(Nc, { ...t, layoutGroup: s, switchLayoutGroup:
|
|
3587
|
+
const [e, n] = Fc(), s = _(si);
|
|
3588
|
+
return zs.createElement(Nc, { ...t, layoutGroup: s, switchLayoutGroup: _(ii), isPresent: e, safeToRemove: n });
|
|
3588
3589
|
}
|
|
3589
|
-
const
|
|
3590
|
+
const _c = {
|
|
3590
3591
|
borderRadius: {
|
|
3591
|
-
...
|
|
3592
|
+
...Et,
|
|
3592
3593
|
applyTo: [
|
|
3593
3594
|
"borderTopLeftRadius",
|
|
3594
3595
|
"borderTopRightRadius",
|
|
@@ -3596,56 +3597,56 @@ const Uc = {
|
|
|
3596
3597
|
"borderBottomRightRadius"
|
|
3597
3598
|
]
|
|
3598
3599
|
},
|
|
3599
|
-
borderTopLeftRadius:
|
|
3600
|
-
borderTopRightRadius:
|
|
3601
|
-
borderBottomLeftRadius:
|
|
3602
|
-
borderBottomRightRadius:
|
|
3603
|
-
boxShadow:
|
|
3604
|
-
}, co = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"],
|
|
3600
|
+
borderTopLeftRadius: Et,
|
|
3601
|
+
borderTopRightRadius: Et,
|
|
3602
|
+
borderBottomLeftRadius: Et,
|
|
3603
|
+
borderBottomRightRadius: Et,
|
|
3604
|
+
boxShadow: Oc
|
|
3605
|
+
}, co = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"], Uc = co.length, vs = (t) => typeof t == "string" ? parseFloat(t) : t, xs = (t) => typeof t == "number" || T.test(t);
|
|
3605
3606
|
function zc(t, e, n, s, i, r) {
|
|
3606
|
-
i ? (t.opacity =
|
|
3607
|
+
i ? (t.opacity = k(
|
|
3607
3608
|
0,
|
|
3608
3609
|
// TODO Reinstate this if only child
|
|
3609
3610
|
n.opacity !== void 0 ? n.opacity : 1,
|
|
3610
3611
|
Wc(s)
|
|
3611
|
-
), t.opacityExit =
|
|
3612
|
-
for (let o = 0; o <
|
|
3612
|
+
), t.opacityExit = k(e.opacity !== void 0 ? e.opacity : 1, 0, Gc(s))) : r && (t.opacity = k(e.opacity !== void 0 ? e.opacity : 1, n.opacity !== void 0 ? n.opacity : 1, s));
|
|
3613
|
+
for (let o = 0; o < Uc; o++) {
|
|
3613
3614
|
const a = `border${co[o]}Radius`;
|
|
3614
3615
|
let l = bs(e, a), c = bs(n, a);
|
|
3615
3616
|
if (l === void 0 && c === void 0)
|
|
3616
3617
|
continue;
|
|
3617
|
-
l || (l = 0), c || (c = 0), l === 0 || c === 0 || xs(l) === xs(c) ? (t[a] = Math.max(
|
|
3618
|
+
l || (l = 0), c || (c = 0), l === 0 || c === 0 || xs(l) === xs(c) ? (t[a] = Math.max(k(vs(l), vs(c), s), 0), (K.test(c) || K.test(l)) && (t[a] += "%")) : t[a] = c;
|
|
3618
3619
|
}
|
|
3619
|
-
(e.rotate || n.rotate) && (t.rotate =
|
|
3620
|
+
(e.rotate || n.rotate) && (t.rotate = k(e.rotate || 0, n.rotate || 0, s));
|
|
3620
3621
|
}
|
|
3621
3622
|
function bs(t, e) {
|
|
3622
3623
|
return t[e] !== void 0 ? t[e] : t.borderRadius;
|
|
3623
3624
|
}
|
|
3624
|
-
const Wc = uo(0, 0.5,
|
|
3625
|
+
const Wc = uo(0, 0.5, Li), Gc = uo(0.5, 0.95, E);
|
|
3625
3626
|
function uo(t, e, n) {
|
|
3626
3627
|
return (s) => s < t ? 0 : s > e ? 1 : n(zt(t, e, s));
|
|
3627
3628
|
}
|
|
3628
|
-
function
|
|
3629
|
+
function Ts(t, e) {
|
|
3629
3630
|
t.min = e.min, t.max = e.max;
|
|
3630
3631
|
}
|
|
3631
|
-
function
|
|
3632
|
-
|
|
3632
|
+
function G(t, e) {
|
|
3633
|
+
Ts(t.x, e.x), Ts(t.y, e.y);
|
|
3633
3634
|
}
|
|
3634
|
-
function
|
|
3635
|
+
function Ps(t, e, n, s, i) {
|
|
3635
3636
|
return t -= e, t = ue(t, 1 / n, s), i !== void 0 && (t = ue(t, 1 / i, s)), t;
|
|
3636
3637
|
}
|
|
3637
3638
|
function $c(t, e = 0, n = 1, s = 0.5, i, r = t, o = t) {
|
|
3638
|
-
if (K.test(e) && (e = parseFloat(e), e =
|
|
3639
|
+
if (K.test(e) && (e = parseFloat(e), e = k(o.min, o.max, e / 100) - o.min), typeof e != "number")
|
|
3639
3640
|
return;
|
|
3640
|
-
let a =
|
|
3641
|
-
t === r && (a -= e), t.min =
|
|
3641
|
+
let a = k(r.min, r.max, s);
|
|
3642
|
+
t === r && (a -= e), t.min = Ps(t.min, e, n, a, i), t.max = Ps(t.max, e, n, a, i);
|
|
3642
3643
|
}
|
|
3643
|
-
function
|
|
3644
|
+
function ws(t, e, [n, s, i], r, o) {
|
|
3644
3645
|
$c(t, e[n], e[s], e[i], e.scale, r, o);
|
|
3645
3646
|
}
|
|
3646
3647
|
const Hc = ["x", "scaleX", "originX"], qc = ["y", "scaleY", "originY"];
|
|
3647
3648
|
function As(t, e, n, s) {
|
|
3648
|
-
|
|
3649
|
+
ws(t.x, e, Hc, n ? n.x : void 0, s ? s.x : void 0), ws(t.y, e, qc, n ? n.y : void 0, s ? s.y : void 0);
|
|
3649
3650
|
}
|
|
3650
3651
|
function Ss(t) {
|
|
3651
3652
|
return t.translate === 0 && t.scale === 1;
|
|
@@ -3660,17 +3661,17 @@ function fo(t, e) {
|
|
|
3660
3661
|
return Math.round(t.x.min) === Math.round(e.x.min) && Math.round(t.x.max) === Math.round(e.x.max) && Math.round(t.y.min) === Math.round(e.y.min) && Math.round(t.y.max) === Math.round(e.y.max);
|
|
3661
3662
|
}
|
|
3662
3663
|
function Vs(t) {
|
|
3663
|
-
return
|
|
3664
|
+
return W(t.x) / W(t.y);
|
|
3664
3665
|
}
|
|
3665
3666
|
class Yc {
|
|
3666
3667
|
constructor() {
|
|
3667
3668
|
this.members = [];
|
|
3668
3669
|
}
|
|
3669
3670
|
add(e) {
|
|
3670
|
-
|
|
3671
|
+
Tn(this.members, e), e.scheduleRender();
|
|
3671
3672
|
}
|
|
3672
3673
|
remove(e) {
|
|
3673
|
-
if (
|
|
3674
|
+
if (Pn(this.members, e), e === this.prevLead && (this.prevLead = void 0), e === this.lead) {
|
|
3674
3675
|
const n = this.members[this.members.length - 1];
|
|
3675
3676
|
n && this.promote(n);
|
|
3676
3677
|
}
|
|
@@ -3732,10 +3733,10 @@ class Qc {
|
|
|
3732
3733
|
this.children = [], this.isDirty = !1;
|
|
3733
3734
|
}
|
|
3734
3735
|
add(e) {
|
|
3735
|
-
|
|
3736
|
+
Tn(this.children, e), this.isDirty = !0;
|
|
3736
3737
|
}
|
|
3737
3738
|
remove(e) {
|
|
3738
|
-
|
|
3739
|
+
Pn(this.children, e), this.isDirty = !0;
|
|
3739
3740
|
}
|
|
3740
3741
|
forEach(e) {
|
|
3741
3742
|
this.isDirty && this.children.sort(Xc), this.isDirty = !1, this.children.forEach(e);
|
|
@@ -3755,7 +3756,7 @@ function tu(t) {
|
|
|
3755
3756
|
return t instanceof SVGElement && t.tagName !== "svg";
|
|
3756
3757
|
}
|
|
3757
3758
|
function eu(t, e, n) {
|
|
3758
|
-
const s =
|
|
3759
|
+
const s = U(t) ? t : Vt(t);
|
|
3759
3760
|
return s.start(bn("", s, e, n)), s.animation;
|
|
3760
3761
|
}
|
|
3761
3762
|
const Ms = ["", "X", "Y", "Z"], nu = { visibility: "hidden" }, Ds = 1e3;
|
|
@@ -3779,7 +3780,7 @@ function mo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3779
3780
|
this.root === this && (this.nodes = new Qc());
|
|
3780
3781
|
}
|
|
3781
3782
|
addEventListener(o, a) {
|
|
3782
|
-
return this.eventHandlers.has(o) || this.eventHandlers.set(o, new
|
|
3783
|
+
return this.eventHandlers.has(o) || this.eventHandlers.set(o, new wn()), this.eventHandlers.get(o).add(a);
|
|
3783
3784
|
}
|
|
3784
3785
|
notifyListeners(o, ...a) {
|
|
3785
3786
|
const l = this.eventHandlers.get(o);
|
|
@@ -3800,7 +3801,7 @@ function mo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3800
3801
|
let h;
|
|
3801
3802
|
const f = () => this.root.updateBlockedByResize = !1;
|
|
3802
3803
|
t(o, () => {
|
|
3803
|
-
this.root.updateBlockedByResize = !0, h && h(), h = Zc(f, 250), ne.hasAnimatedSinceResize && (ne.hasAnimatedSinceResize = !1, this.nodes.forEach(
|
|
3804
|
+
this.root.updateBlockedByResize = !0, h && h(), h = Zc(f, 250), ne.hasAnimatedSinceResize && (ne.hasAnimatedSinceResize = !1, this.nodes.forEach(ks));
|
|
3804
3805
|
});
|
|
3805
3806
|
}
|
|
3806
3807
|
l && this.root.registerSharedNode(l, this), this.options.animate !== !1 && u && (l || c) && this.addEventListener("didUpdate", ({ delta: h, hasLayoutChanged: f, hasRelativeTargetChanged: d, layout: m }) => {
|
|
@@ -3818,7 +3819,7 @@ function mo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3818
3819
|
};
|
|
3819
3820
|
(u.shouldReduceMotion || this.options.layoutRoot) && (x.delay = 0, x.type = !1), this.startAnimation(x);
|
|
3820
3821
|
} else
|
|
3821
|
-
f ||
|
|
3822
|
+
f || ks(this), this.isLead() && this.options.onExitComplete && this.options.onExitComplete();
|
|
3822
3823
|
this.targetLayout = m;
|
|
3823
3824
|
});
|
|
3824
3825
|
}
|
|
@@ -3873,7 +3874,7 @@ function mo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3873
3874
|
}
|
|
3874
3875
|
this.isUpdating || this.nodes.forEach(cu), this.isUpdating = !1, this.nodes.forEach(uu), this.nodes.forEach(iu), this.nodes.forEach(ou), this.clearAllSnapshots();
|
|
3875
3876
|
const a = performance.now();
|
|
3876
|
-
|
|
3877
|
+
j.delta = lt(0, 1e3 / 60, a - j.timestamp), j.timestamp = a, j.isProcessing = !0, we.update.process(j), we.preRender.process(j), we.render.process(j), j.isProcessing = !1;
|
|
3877
3878
|
}
|
|
3878
3879
|
didUpdate() {
|
|
3879
3880
|
this.updateScheduled || (this.updateScheduled = !0, queueMicrotask(() => this.update()));
|
|
@@ -3941,12 +3942,12 @@ function mo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3941
3942
|
}
|
|
3942
3943
|
removeElementScroll(o) {
|
|
3943
3944
|
const a = B();
|
|
3944
|
-
|
|
3945
|
+
G(a, o);
|
|
3945
3946
|
for (let l = 0; l < this.path.length; l++) {
|
|
3946
3947
|
const c = this.path[l], { scroll: u, options: h } = c;
|
|
3947
3948
|
if (c !== this.root && u && h.layoutScroll) {
|
|
3948
3949
|
if (u.isRoot) {
|
|
3949
|
-
|
|
3950
|
+
G(a, o);
|
|
3950
3951
|
const { scroll: f } = this.root;
|
|
3951
3952
|
f && (it(a.x, -f.offset.x), it(a.y, -f.offset.y));
|
|
3952
3953
|
}
|
|
@@ -3957,7 +3958,7 @@ function mo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3957
3958
|
}
|
|
3958
3959
|
applyTransform(o, a = !1) {
|
|
3959
3960
|
const l = B();
|
|
3960
|
-
|
|
3961
|
+
G(l, o);
|
|
3961
3962
|
for (let c = 0; c < this.path.length; c++) {
|
|
3962
3963
|
const u = this.path[c];
|
|
3963
3964
|
!a && u.options.layoutScroll && u.scroll && u !== u.root && At(l, {
|
|
@@ -3969,14 +3970,14 @@ function mo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3969
3970
|
}
|
|
3970
3971
|
removeTransform(o) {
|
|
3971
3972
|
const a = B();
|
|
3972
|
-
|
|
3973
|
+
G(a, o);
|
|
3973
3974
|
for (let l = 0; l < this.path.length; l++) {
|
|
3974
3975
|
const c = this.path[l];
|
|
3975
3976
|
if (!c.instance || !dt(c.latestValues))
|
|
3976
3977
|
continue;
|
|
3977
3978
|
He(c.latestValues) && c.updateSnapshot();
|
|
3978
3979
|
const u = B(), h = c.measurePageBox();
|
|
3979
|
-
|
|
3980
|
+
G(u, h), As(a, c.latestValues, c.snapshot ? c.snapshot.layoutBox : void 0, u);
|
|
3980
3981
|
}
|
|
3981
3982
|
return dt(this.latestValues) && As(a, this.latestValues), a;
|
|
3982
3983
|
}
|
|
@@ -3994,7 +3995,7 @@ function mo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3994
3995
|
this.scroll = void 0, this.layout = void 0, this.snapshot = void 0, this.prevTransformTemplateValue = void 0, this.targetDelta = void 0, this.target = void 0, this.isLayoutDirty = !1;
|
|
3995
3996
|
}
|
|
3996
3997
|
forceRelativeParentToResolveTarget() {
|
|
3997
|
-
this.relativeParent && this.relativeParent.resolvedRelativeTargetAt !==
|
|
3998
|
+
this.relativeParent && this.relativeParent.resolvedRelativeTargetAt !== j.timestamp && this.relativeParent.resolveTargetDelta(!0);
|
|
3998
3999
|
}
|
|
3999
4000
|
resolveTargetDelta(o = !1) {
|
|
4000
4001
|
var a;
|
|
@@ -4005,15 +4006,15 @@ function mo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4005
4006
|
return;
|
|
4006
4007
|
const { layout: h, layoutId: f } = this.options;
|
|
4007
4008
|
if (!(!this.layout || !(h || f))) {
|
|
4008
|
-
if (this.resolvedRelativeTargetAt =
|
|
4009
|
+
if (this.resolvedRelativeTargetAt = j.timestamp, !this.targetDelta && !this.relativeTarget) {
|
|
4009
4010
|
const d = this.getClosestProjectingParent();
|
|
4010
|
-
d && d.layout && this.animationProgress !== 1 ? (this.relativeParent = d, this.forceRelativeParentToResolveTarget(), this.relativeTarget = B(), this.relativeTargetOrigin = B(),
|
|
4011
|
+
d && d.layout && this.animationProgress !== 1 ? (this.relativeParent = d, this.forceRelativeParentToResolveTarget(), this.relativeTarget = B(), this.relativeTargetOrigin = B(), Ot(this.relativeTargetOrigin, this.layout.layoutBox, d.layout.layoutBox), G(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
|
|
4011
4012
|
}
|
|
4012
4013
|
if (!(!this.relativeTarget && !this.targetDelta)) {
|
|
4013
|
-
if (this.target || (this.target = B(), this.targetWithTransforms = B()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), xc(this.target, this.relativeTarget, this.relativeParent.target)) : this.targetDelta ? (this.resumingFrom ? this.target = this.applyTransform(this.layout.layoutBox) :
|
|
4014
|
+
if (this.target || (this.target = B(), this.targetWithTransforms = B()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), xc(this.target, this.relativeTarget, this.relativeParent.target)) : this.targetDelta ? (this.resumingFrom ? this.target = this.applyTransform(this.layout.layoutBox) : G(this.target, this.layout.layoutBox), oo(this.target, this.targetDelta)) : G(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget) {
|
|
4014
4015
|
this.attemptToResolveRelativeTarget = !1;
|
|
4015
4016
|
const d = this.getClosestProjectingParent();
|
|
4016
|
-
d && !!d.resumingFrom == !!this.resumingFrom && !d.options.layoutScroll && d.target && this.animationProgress !== 1 ? (this.relativeParent = d, this.forceRelativeParentToResolveTarget(), this.relativeTarget = B(), this.relativeTargetOrigin = B(),
|
|
4017
|
+
d && !!d.resumingFrom == !!this.resumingFrom && !d.options.layoutScroll && d.target && this.animationProgress !== 1 ? (this.relativeParent = d, this.forceRelativeParentToResolveTarget(), this.relativeTarget = B(), this.relativeTargetOrigin = B(), Ot(this.relativeTargetOrigin, this.target, d.target), G(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
|
|
4017
4018
|
}
|
|
4018
4019
|
mt.resolvedTargetDeltas++;
|
|
4019
4020
|
}
|
|
@@ -4030,22 +4031,22 @@ function mo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4030
4031
|
var o;
|
|
4031
4032
|
const a = this.getLead(), l = !!this.resumingFrom || this !== a;
|
|
4032
4033
|
let c = !0;
|
|
4033
|
-
if ((this.isProjectionDirty || !((o = this.parent) === null || o === void 0) && o.isProjectionDirty) && (c = !1), l && (this.isSharedProjectionDirty || this.isTransformDirty) && (c = !1), this.resolvedRelativeTargetAt ===
|
|
4034
|
+
if ((this.isProjectionDirty || !((o = this.parent) === null || o === void 0) && o.isProjectionDirty) && (c = !1), l && (this.isSharedProjectionDirty || this.isTransformDirty) && (c = !1), this.resolvedRelativeTargetAt === j.timestamp && (c = !1), c)
|
|
4034
4035
|
return;
|
|
4035
4036
|
const { layout: u, layoutId: h } = this.options;
|
|
4036
4037
|
if (this.isTreeAnimating = !!(this.parent && this.parent.isTreeAnimating || this.currentAnimation || this.pendingAnimation), this.isTreeAnimating || (this.targetDelta = this.relativeTarget = void 0), !this.layout || !(u || h))
|
|
4037
4038
|
return;
|
|
4038
|
-
|
|
4039
|
+
G(this.layoutCorrected, this.layout.layoutBox);
|
|
4039
4040
|
const f = this.treeScale.x, d = this.treeScale.y;
|
|
4040
4041
|
Mc(this.layoutCorrected, this.treeScale, this.path, l), a.layout && !a.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (a.target = a.layout.layoutBox);
|
|
4041
4042
|
const { target: m } = a;
|
|
4042
4043
|
if (!m) {
|
|
4043
|
-
this.projectionTransform && (this.projectionDelta =
|
|
4044
|
+
this.projectionTransform && (this.projectionDelta = wt(), this.projectionTransform = "none", this.scheduleRender());
|
|
4044
4045
|
return;
|
|
4045
4046
|
}
|
|
4046
|
-
this.projectionDelta || (this.projectionDelta =
|
|
4047
|
+
this.projectionDelta || (this.projectionDelta = wt(), this.projectionDeltaWithTransform = wt());
|
|
4047
4048
|
const p = this.projectionTransform;
|
|
4048
|
-
|
|
4049
|
+
Ft(this.projectionDelta, this.layoutCorrected, m, this.latestValues), this.projectionTransform = Cs(this.projectionDelta, this.treeScale), (this.projectionTransform !== p || this.treeScale.x !== f || this.treeScale.y !== d) && (this.hasProjected = !0, this.scheduleRender(), this.notifyListeners("projectionUpdate", m)), mt.recalculatedProjection++;
|
|
4049
4050
|
}
|
|
4050
4051
|
hide() {
|
|
4051
4052
|
this.isVisible = !1;
|
|
@@ -4061,14 +4062,14 @@ function mo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4061
4062
|
this.resumingFrom && !this.resumingFrom.instance && (this.resumingFrom = void 0);
|
|
4062
4063
|
}
|
|
4063
4064
|
setAnimationOrigin(o, a = !1) {
|
|
4064
|
-
const l = this.snapshot, c = l ? l.latestValues : {}, u = { ...this.latestValues }, h =
|
|
4065
|
+
const l = this.snapshot, c = l ? l.latestValues : {}, u = { ...this.latestValues }, h = wt();
|
|
4065
4066
|
(!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !a;
|
|
4066
4067
|
const f = B(), d = l ? l.source : void 0, m = this.layout ? this.layout.source : void 0, p = d !== m, v = this.getStack(), b = !v || v.members.length <= 1, y = !!(p && !b && this.options.crossfade === !0 && !this.path.some(gu));
|
|
4067
4068
|
this.animationProgress = 0;
|
|
4068
4069
|
let g;
|
|
4069
4070
|
this.mixTargetDelta = (x) => {
|
|
4070
|
-
const
|
|
4071
|
-
|
|
4071
|
+
const w = x / 1e3;
|
|
4072
|
+
Ls(h.x, o.x, w), Ls(h.y, o.y, w), this.setTargetDelta(h), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (Ot(f, this.layout.layoutBox, this.relativeParent.layout.layoutBox), pu(this.relativeTarget, this.relativeTargetOrigin, f, w), g && Kc(this.relativeTarget, g) && (this.isProjectionDirty = !1), g || (g = B()), G(g, this.relativeTarget)), p && (this.animationValues = u, zc(u, c, this.latestValues, w, y, b)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = w;
|
|
4072
4073
|
}, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
|
|
4073
4074
|
}
|
|
4074
4075
|
startAnimation(o) {
|
|
@@ -4098,12 +4099,12 @@ function mo({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4098
4099
|
if (!(!a || !l || !c)) {
|
|
4099
4100
|
if (this !== o && this.layout && c && po(this.options.animationType, this.layout.layoutBox, c.layoutBox)) {
|
|
4100
4101
|
l = this.target || B();
|
|
4101
|
-
const h =
|
|
4102
|
+
const h = W(this.layout.layoutBox.x);
|
|
4102
4103
|
l.x.min = o.target.x.min, l.x.max = l.x.min + h;
|
|
4103
|
-
const f =
|
|
4104
|
+
const f = W(this.layout.layoutBox.y);
|
|
4104
4105
|
l.y.min = o.target.y.min, l.y.max = l.y.min + f;
|
|
4105
4106
|
}
|
|
4106
|
-
|
|
4107
|
+
G(a, l), At(a, u), Ft(this.projectionDeltaWithTransform, this.layoutCorrected, a, u);
|
|
4107
4108
|
}
|
|
4108
4109
|
}
|
|
4109
4110
|
registerSharedNode(o, a) {
|
|
@@ -4212,17 +4213,17 @@ function ou(t) {
|
|
|
4212
4213
|
const n = ((e = t.resumeFrom) === null || e === void 0 ? void 0 : e.snapshot) || t.snapshot;
|
|
4213
4214
|
if (t.isLead() && t.layout && n && t.hasListeners("didUpdate")) {
|
|
4214
4215
|
const { layoutBox: s, measuredBox: i } = t.layout, { animationType: r } = t.options, o = n.source !== t.layout.source;
|
|
4215
|
-
r === "size" ?
|
|
4216
|
-
const f = o ? n.measuredBox[h] : n.layoutBox[h], d =
|
|
4216
|
+
r === "size" ? $((h) => {
|
|
4217
|
+
const f = o ? n.measuredBox[h] : n.layoutBox[h], d = W(f);
|
|
4217
4218
|
f.min = s[h].min, f.max = f.min + d;
|
|
4218
|
-
}) : po(r, n.layoutBox, s) &&
|
|
4219
|
-
const f = o ? n.measuredBox[h] : n.layoutBox[h], d =
|
|
4219
|
+
}) : po(r, n.layoutBox, s) && $((h) => {
|
|
4220
|
+
const f = o ? n.measuredBox[h] : n.layoutBox[h], d = W(s[h]);
|
|
4220
4221
|
f.max = f.min + d, t.relativeTarget && !t.currentAnimation && (t.isProjectionDirty = !0, t.relativeTarget[h].max = t.relativeTarget[h].min + d);
|
|
4221
4222
|
});
|
|
4222
|
-
const a =
|
|
4223
|
-
|
|
4224
|
-
const l =
|
|
4225
|
-
o ?
|
|
4223
|
+
const a = wt();
|
|
4224
|
+
Ft(a, s, n.layoutBox);
|
|
4225
|
+
const l = wt();
|
|
4226
|
+
o ? Ft(l, t.applyTransform(i, !0), n.measuredBox) : Ft(l, s, n.layoutBox);
|
|
4226
4227
|
const c = !ho(a);
|
|
4227
4228
|
let u = !1;
|
|
4228
4229
|
if (!t.resumeFrom) {
|
|
@@ -4231,9 +4232,9 @@ function ou(t) {
|
|
|
4231
4232
|
const { snapshot: f, layout: d } = h;
|
|
4232
4233
|
if (f && d) {
|
|
4233
4234
|
const m = B();
|
|
4234
|
-
|
|
4235
|
+
Ot(m, n.layoutBox, f.layoutBox);
|
|
4235
4236
|
const p = B();
|
|
4236
|
-
|
|
4237
|
+
Ot(p, s, d.layoutBox), fo(m, p) || (u = !0), h.options.layoutRoot && (t.relativeTarget = p, t.relativeTargetOrigin = m, t.relativeParent = h);
|
|
4237
4238
|
}
|
|
4238
4239
|
}
|
|
4239
4240
|
}
|
|
@@ -4270,7 +4271,7 @@ function uu(t) {
|
|
|
4270
4271
|
const { visualElement: e } = t.options;
|
|
4271
4272
|
e && e.getProps().onBeforeLayoutMeasure && e.notify("BeforeLayoutMeasure"), t.resetTransform();
|
|
4272
4273
|
}
|
|
4273
|
-
function
|
|
4274
|
+
function ks(t) {
|
|
4274
4275
|
t.finishAnimation(), t.targetDelta = t.relativeTarget = t.target = void 0, t.isProjectionDirty = !0;
|
|
4275
4276
|
}
|
|
4276
4277
|
function hu(t) {
|
|
@@ -4285,14 +4286,14 @@ function du(t) {
|
|
|
4285
4286
|
function mu(t) {
|
|
4286
4287
|
t.removeLeadSnapshot();
|
|
4287
4288
|
}
|
|
4288
|
-
function
|
|
4289
|
-
t.translate =
|
|
4289
|
+
function Ls(t, e, n) {
|
|
4290
|
+
t.translate = k(e.translate, 0, n), t.scale = k(e.scale, 1, n), t.origin = e.origin, t.originPoint = e.originPoint;
|
|
4290
4291
|
}
|
|
4291
|
-
function
|
|
4292
|
-
t.min =
|
|
4292
|
+
function Es(t, e, n, s) {
|
|
4293
|
+
t.min = k(e.min, n.min, s), t.max = k(e.max, n.max, s);
|
|
4293
4294
|
}
|
|
4294
4295
|
function pu(t, e, n, s) {
|
|
4295
|
-
|
|
4296
|
+
Es(t.x, e.x, n.x, s), Es(t.y, e.y, n.y, s);
|
|
4296
4297
|
}
|
|
4297
4298
|
function gu(t) {
|
|
4298
4299
|
return t.animationValues && t.animationValues.opacityExit !== void 0;
|
|
@@ -4300,12 +4301,12 @@ function gu(t) {
|
|
|
4300
4301
|
const yu = {
|
|
4301
4302
|
duration: 0.45,
|
|
4302
4303
|
ease: [0.4, 0, 0.1, 1]
|
|
4303
|
-
}, Bs = (t) => typeof navigator < "u" && navigator.userAgent.toLowerCase().includes(t), Is = Bs("applewebkit/") && !Bs("chrome/") ? Math.round :
|
|
4304
|
-
function
|
|
4304
|
+
}, Bs = (t) => typeof navigator < "u" && navigator.userAgent.toLowerCase().includes(t), Is = Bs("applewebkit/") && !Bs("chrome/") ? Math.round : E;
|
|
4305
|
+
function js(t) {
|
|
4305
4306
|
t.min = Is(t.min), t.max = Is(t.max);
|
|
4306
4307
|
}
|
|
4307
4308
|
function vu(t) {
|
|
4308
|
-
|
|
4309
|
+
js(t.x), js(t.y);
|
|
4309
4310
|
}
|
|
4310
4311
|
function po(t, e, n) {
|
|
4311
4312
|
return t === "position" || t === "preserve-aspect" && !Ge(Vs(e), Vs(n), 0.2);
|
|
@@ -4337,25 +4338,25 @@ const xu = mo({
|
|
|
4337
4338
|
checkIsScrollRoot: (t) => window.getComputedStyle(t).position === "fixed"
|
|
4338
4339
|
}), bu = {
|
|
4339
4340
|
pan: {
|
|
4340
|
-
Feature:
|
|
4341
|
+
Feature: jc
|
|
4341
4342
|
},
|
|
4342
4343
|
drag: {
|
|
4343
4344
|
Feature: Ic,
|
|
4344
4345
|
ProjectionNode: go,
|
|
4345
4346
|
MeasureLayout: lo
|
|
4346
4347
|
}
|
|
4347
|
-
},
|
|
4348
|
-
function
|
|
4349
|
-
const e =
|
|
4348
|
+
}, Tu = /var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;
|
|
4349
|
+
function Pu(t) {
|
|
4350
|
+
const e = Tu.exec(t);
|
|
4350
4351
|
if (!e)
|
|
4351
4352
|
return [,];
|
|
4352
4353
|
const [, n, s] = e;
|
|
4353
4354
|
return [n, s];
|
|
4354
4355
|
}
|
|
4355
|
-
const
|
|
4356
|
+
const wu = 4;
|
|
4356
4357
|
function Ke(t, e, n = 1) {
|
|
4357
|
-
q(n <=
|
|
4358
|
-
const [s, i] =
|
|
4358
|
+
q(n <= wu, `Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);
|
|
4359
|
+
const [s, i] = Pu(t);
|
|
4359
4360
|
if (!s)
|
|
4360
4361
|
return;
|
|
4361
4362
|
const r = window.getComputedStyle(e).getPropertyValue(s);
|
|
@@ -4363,7 +4364,7 @@ function Ke(t, e, n = 1) {
|
|
|
4363
4364
|
const o = r.trim();
|
|
4364
4365
|
return Qi(o) ? parseFloat(o) : o;
|
|
4365
4366
|
} else
|
|
4366
|
-
return
|
|
4367
|
+
return Fe(i) ? Ke(i, e, n + 1) : i;
|
|
4367
4368
|
}
|
|
4368
4369
|
function Au(t, { ...e }, n) {
|
|
4369
4370
|
const s = t.current;
|
|
@@ -4371,14 +4372,14 @@ function Au(t, { ...e }, n) {
|
|
|
4371
4372
|
return { target: e, transitionEnd: n };
|
|
4372
4373
|
n && (n = { ...n }), t.values.forEach((i) => {
|
|
4373
4374
|
const r = i.get();
|
|
4374
|
-
if (!
|
|
4375
|
+
if (!Fe(r))
|
|
4375
4376
|
return;
|
|
4376
4377
|
const o = Ke(r, s);
|
|
4377
4378
|
o && i.set(o);
|
|
4378
4379
|
});
|
|
4379
4380
|
for (const i in e) {
|
|
4380
4381
|
const r = e[i];
|
|
4381
|
-
if (!
|
|
4382
|
+
if (!Fe(r))
|
|
4382
4383
|
continue;
|
|
4383
4384
|
const o = Ke(r, s);
|
|
4384
4385
|
o && (e[i] = o, n || (n = {}), n[i] === void 0 && (n[i] = r));
|
|
@@ -4396,15 +4397,15 @@ const Su = /* @__PURE__ */ new Set([
|
|
|
4396
4397
|
"y",
|
|
4397
4398
|
"translateX",
|
|
4398
4399
|
"translateY"
|
|
4399
|
-
]), yo = (t) => Su.has(t), Vu = (t) => Object.keys(t).some(yo), te = (t) => t === yt || t ===
|
|
4400
|
+
]), yo = (t) => Su.has(t), Vu = (t) => Object.keys(t).some(yo), te = (t) => t === yt || t === T, Fs = (t, e) => parseFloat(t.split(", ")[e]), Os = (t, e) => (n, { transform: s }) => {
|
|
4400
4401
|
if (s === "none" || !s)
|
|
4401
4402
|
return 0;
|
|
4402
4403
|
const i = s.match(/^matrix3d\((.+)\)$/);
|
|
4403
4404
|
if (i)
|
|
4404
|
-
return
|
|
4405
|
+
return Fs(i[1], e);
|
|
4405
4406
|
{
|
|
4406
4407
|
const r = s.match(/^matrix\((.+)\)$/);
|
|
4407
|
-
return r ?
|
|
4408
|
+
return r ? Fs(r[1], t) : 0;
|
|
4408
4409
|
}
|
|
4409
4410
|
}, Cu = /* @__PURE__ */ new Set(["x", "y", "z"]), Mu = Gt.filter((t) => !Cu.has(t));
|
|
4410
4411
|
function Du(t) {
|
|
@@ -4423,8 +4424,8 @@ const Ct = {
|
|
|
4423
4424
|
bottom: ({ y: t }, { top: e }) => parseFloat(e) + (t.max - t.min),
|
|
4424
4425
|
right: ({ x: t }, { left: e }) => parseFloat(e) + (t.max - t.min),
|
|
4425
4426
|
// Transform
|
|
4426
|
-
x:
|
|
4427
|
-
y:
|
|
4427
|
+
x: Os(4, 13),
|
|
4428
|
+
y: Os(5, 14)
|
|
4428
4429
|
};
|
|
4429
4430
|
Ct.translateX = Ct.x;
|
|
4430
4431
|
Ct.translateY = Ct.y;
|
|
@@ -4438,7 +4439,7 @@ const Ru = (t, e, n) => {
|
|
|
4438
4439
|
const u = e.getValue(c);
|
|
4439
4440
|
u && u.jump(a[c]), t[c] = Ct[c](l, r);
|
|
4440
4441
|
}), t;
|
|
4441
|
-
},
|
|
4442
|
+
}, ku = (t, e, n = {}, s = {}) => {
|
|
4442
4443
|
e = { ...e }, s = { ...s };
|
|
4443
4444
|
const i = Object.keys(e).filter(yo);
|
|
4444
4445
|
let r = [], o = !1;
|
|
@@ -4447,20 +4448,20 @@ const Ru = (t, e, n) => {
|
|
|
4447
4448
|
const c = t.getValue(l);
|
|
4448
4449
|
if (!t.hasValue(l))
|
|
4449
4450
|
return;
|
|
4450
|
-
let u = n[l], h =
|
|
4451
|
+
let u = n[l], h = Lt(u);
|
|
4451
4452
|
const f = e[l];
|
|
4452
4453
|
let d;
|
|
4453
4454
|
if (oe(f)) {
|
|
4454
4455
|
const m = f.length, p = f[0] === null ? 1 : 0;
|
|
4455
|
-
u = f[p], h =
|
|
4456
|
+
u = f[p], h = Lt(u);
|
|
4456
4457
|
for (let v = p; v < m && f[v] !== null; v++)
|
|
4457
|
-
d ? q(
|
|
4458
|
+
d ? q(Lt(f[v]) === d, "All keyframes must be of the same type") : (d = Lt(f[v]), q(d === h || te(h) && te(d), "Keyframes must be of the same dimension as the current value"));
|
|
4458
4459
|
} else
|
|
4459
|
-
d =
|
|
4460
|
+
d = Lt(f);
|
|
4460
4461
|
if (h !== d)
|
|
4461
4462
|
if (te(h) && te(d)) {
|
|
4462
4463
|
const m = c.get();
|
|
4463
|
-
typeof m == "string" && c.set(parseFloat(m)), typeof f == "string" ? e[l] = parseFloat(f) : Array.isArray(f) && d ===
|
|
4464
|
+
typeof m == "string" && c.set(parseFloat(m)), typeof f == "string" ? e[l] = parseFloat(f) : Array.isArray(f) && d === T && (e[l] = f.map(parseFloat));
|
|
4464
4465
|
} else
|
|
4465
4466
|
h != null && h.transform && (d != null && d.transform) && (u === 0 || f === 0) ? u === 0 ? c.set(d.transform(u)) : e[l] = h.transform(f) : (o || (r = Du(t), o = !0), a.push(l), s[l] = s[l] !== void 0 ? s[l] : e[l], c.jump(f));
|
|
4466
4467
|
}), a.length) {
|
|
@@ -4471,12 +4472,12 @@ const Ru = (t, e, n) => {
|
|
|
4471
4472
|
} else
|
|
4472
4473
|
return { target: e, transitionEnd: s };
|
|
4473
4474
|
};
|
|
4474
|
-
function
|
|
4475
|
-
return Vu(e) ?
|
|
4475
|
+
function Lu(t, e, n, s) {
|
|
4476
|
+
return Vu(e) ? ku(t, e, n, s) : { target: e, transitionEnd: s };
|
|
4476
4477
|
}
|
|
4477
|
-
const
|
|
4478
|
+
const Eu = (t, e, n, s) => {
|
|
4478
4479
|
const i = Au(t, e, s);
|
|
4479
|
-
return e = i.target, s = i.transitionEnd,
|
|
4480
|
+
return e = i.target, s = i.transitionEnd, Lu(t, e, n, s);
|
|
4480
4481
|
}, Ye = { current: null }, vo = { current: !1 };
|
|
4481
4482
|
function Bu() {
|
|
4482
4483
|
if (vo.current = !0, !!me)
|
|
@@ -4490,9 +4491,9 @@ function Iu(t, e, n) {
|
|
|
4490
4491
|
const { willChange: s } = e;
|
|
4491
4492
|
for (const i in e) {
|
|
4492
4493
|
const r = e[i], o = n[i];
|
|
4493
|
-
if (
|
|
4494
|
+
if (U(r))
|
|
4494
4495
|
t.addValue(i, r), ce(s) && s.add(i), process.env.NODE_ENV === "development" && An(r.version === "10.18.0", `Attempting to mix Framer Motion versions ${r.version} with 10.18.0 may not work as expected.`);
|
|
4495
|
-
else if (
|
|
4496
|
+
else if (U(o))
|
|
4496
4497
|
t.addValue(i, Vt(r, { owner: t })), ce(s) && s.remove(i);
|
|
4497
4498
|
else if (o !== r)
|
|
4498
4499
|
if (t.hasValue(i)) {
|
|
@@ -4507,7 +4508,7 @@ function Iu(t, e, n) {
|
|
|
4507
4508
|
e[i] === void 0 && t.removeValue(i);
|
|
4508
4509
|
return e;
|
|
4509
4510
|
}
|
|
4510
|
-
const Ns = /* @__PURE__ */ new WeakMap(), xo = Object.keys(
|
|
4511
|
+
const Ns = /* @__PURE__ */ new WeakMap(), xo = Object.keys(Ut), ju = xo.length, _s = [
|
|
4511
4512
|
"AnimationStart",
|
|
4512
4513
|
"AnimationComplete",
|
|
4513
4514
|
"Update",
|
|
@@ -4515,8 +4516,8 @@ const Ns = /* @__PURE__ */ new WeakMap(), xo = Object.keys(_t), Fu = xo.length,
|
|
|
4515
4516
|
"LayoutMeasure",
|
|
4516
4517
|
"LayoutAnimationStart",
|
|
4517
4518
|
"LayoutAnimationComplete"
|
|
4518
|
-
],
|
|
4519
|
-
class
|
|
4519
|
+
], Fu = an.length;
|
|
4520
|
+
class Ou {
|
|
4520
4521
|
constructor({ parent: e, props: n, presenceContext: s, reducedMotionConfig: i, visualState: r }, o = {}) {
|
|
4521
4522
|
this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
|
|
4522
4523
|
this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
|
|
@@ -4526,7 +4527,7 @@ class ju {
|
|
|
4526
4527
|
const { willChange: c, ...u } = this.scrapeMotionValuesFromProps(n, {});
|
|
4527
4528
|
for (const h in u) {
|
|
4528
4529
|
const f = u[h];
|
|
4529
|
-
a[h] !== void 0 &&
|
|
4530
|
+
a[h] !== void 0 && U(f) && (f.set(a[h], !1), ce(c) && c.add(h));
|
|
4530
4531
|
}
|
|
4531
4532
|
}
|
|
4532
4533
|
/**
|
|
@@ -4567,8 +4568,8 @@ class ju {
|
|
|
4567
4568
|
const l = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";
|
|
4568
4569
|
n.ignoreStrict ? qt(!1, l) : q(!1, l);
|
|
4569
4570
|
}
|
|
4570
|
-
for (let l = 0; l <
|
|
4571
|
-
const c = xo[l], { isEnabled: u, Feature: h, ProjectionNode: f, MeasureLayout: d } =
|
|
4571
|
+
for (let l = 0; l < ju; l++) {
|
|
4572
|
+
const c = xo[l], { isEnabled: u, Feature: h, ProjectionNode: f, MeasureLayout: d } = Ut[c];
|
|
4572
4573
|
f && (o = f), u(n) && (!this.features[c] && h && (this.features[c] = new h(this)), d && (a = d));
|
|
4573
4574
|
}
|
|
4574
4575
|
if ((this.type === "html" || this.type === "svg") && !this.projection && o) {
|
|
@@ -4577,7 +4578,7 @@ class ju {
|
|
|
4577
4578
|
this.projection.setOptions({
|
|
4578
4579
|
layoutId: l,
|
|
4579
4580
|
layout: c,
|
|
4580
|
-
alwaysMeasureLayout: !!u || h &&
|
|
4581
|
+
alwaysMeasureLayout: !!u || h && Tt(h),
|
|
4581
4582
|
visualElement: this,
|
|
4582
4583
|
scheduleRender: () => this.scheduleRender(),
|
|
4583
4584
|
/**
|
|
@@ -4634,8 +4635,8 @@ class ju {
|
|
|
4634
4635
|
*/
|
|
4635
4636
|
update(e, n) {
|
|
4636
4637
|
(e.transformTemplate || this.props.transformTemplate) && this.scheduleRender(), this.prevProps = this.props, this.props = e, this.prevPresenceContext = this.presenceContext, this.presenceContext = n;
|
|
4637
|
-
for (let s = 0; s <
|
|
4638
|
-
const i =
|
|
4638
|
+
for (let s = 0; s < _s.length; s++) {
|
|
4639
|
+
const i = _s[s];
|
|
4639
4640
|
this.propEventSubscriptions[i] && (this.propEventSubscriptions[i](), delete this.propEventSubscriptions[i]);
|
|
4640
4641
|
const r = e["on" + i];
|
|
4641
4642
|
r && (this.propEventSubscriptions[i] = this.on(i, r));
|
|
@@ -4671,9 +4672,9 @@ class ju {
|
|
|
4671
4672
|
return this.props.initial !== void 0 && (s.initial = this.props.initial), s;
|
|
4672
4673
|
}
|
|
4673
4674
|
const n = {};
|
|
4674
|
-
for (let s = 0; s <
|
|
4675
|
+
for (let s = 0; s < Fu; s++) {
|
|
4675
4676
|
const i = an[s], r = this.props[i];
|
|
4676
|
-
(
|
|
4677
|
+
(_t(r) || r === !1) && (n[i] = r);
|
|
4677
4678
|
}
|
|
4678
4679
|
return n;
|
|
4679
4680
|
}
|
|
@@ -4737,16 +4738,16 @@ class ju {
|
|
|
4737
4738
|
if (s && i !== void 0)
|
|
4738
4739
|
return i;
|
|
4739
4740
|
const r = this.getBaseTargetFromProps(this.props, e);
|
|
4740
|
-
return r !== void 0 && !
|
|
4741
|
+
return r !== void 0 && !U(r) ? r : this.initialValues[e] !== void 0 && i === void 0 ? void 0 : this.baseTarget[e];
|
|
4741
4742
|
}
|
|
4742
4743
|
on(e, n) {
|
|
4743
|
-
return this.events[e] || (this.events[e] = new
|
|
4744
|
+
return this.events[e] || (this.events[e] = new wn()), this.events[e].add(n);
|
|
4744
4745
|
}
|
|
4745
4746
|
notify(e, ...n) {
|
|
4746
4747
|
this.events[e] && this.events[e].notify(...n);
|
|
4747
4748
|
}
|
|
4748
4749
|
}
|
|
4749
|
-
class bo extends
|
|
4750
|
+
class bo extends Ou {
|
|
4750
4751
|
sortInstanceNodePosition(e, n) {
|
|
4751
4752
|
return e.compareDocumentPosition(n) & 2 ? 1 : -1;
|
|
4752
4753
|
}
|
|
@@ -4760,7 +4761,7 @@ class bo extends ju {
|
|
|
4760
4761
|
let o = tc(s, e || {}, this);
|
|
4761
4762
|
if (i && (n && (n = i(n)), s && (s = i(s)), o && (o = i(o))), r) {
|
|
4762
4763
|
Zl(this, s, o);
|
|
4763
|
-
const a =
|
|
4764
|
+
const a = Eu(this, s, o, n);
|
|
4764
4765
|
n = a.transitionEnd, s = a.target;
|
|
4765
4766
|
}
|
|
4766
4767
|
return {
|
|
@@ -4773,7 +4774,7 @@ class bo extends ju {
|
|
|
4773
4774
|
function Nu(t) {
|
|
4774
4775
|
return window.getComputedStyle(t);
|
|
4775
4776
|
}
|
|
4776
|
-
class
|
|
4777
|
+
class _u extends bo {
|
|
4777
4778
|
constructor() {
|
|
4778
4779
|
super(...arguments), this.type = "html";
|
|
4779
4780
|
}
|
|
@@ -4798,7 +4799,7 @@ class Uu extends bo {
|
|
|
4798
4799
|
handleChildMotionValue() {
|
|
4799
4800
|
this.childSubscription && (this.childSubscription(), delete this.childSubscription);
|
|
4800
4801
|
const { children: e } = this.props;
|
|
4801
|
-
|
|
4802
|
+
U(e) && (this.childSubscription = e.on("change", (n) => {
|
|
4802
4803
|
this.current && (this.current.textContent = `${n}`);
|
|
4803
4804
|
}));
|
|
4804
4805
|
}
|
|
@@ -4806,7 +4807,7 @@ class Uu extends bo {
|
|
|
4806
4807
|
di(e, n, s, i);
|
|
4807
4808
|
}
|
|
4808
4809
|
}
|
|
4809
|
-
class
|
|
4810
|
+
class Uu extends bo {
|
|
4810
4811
|
constructor() {
|
|
4811
4812
|
super(...arguments), this.type = "svg", this.isSVGTag = !1;
|
|
4812
4813
|
}
|
|
@@ -4836,28 +4837,28 @@ class _u extends bo {
|
|
|
4836
4837
|
this.isSVGTag = fn(e.tagName), super.mount(e);
|
|
4837
4838
|
}
|
|
4838
4839
|
}
|
|
4839
|
-
const zu = (t, e) => ln(t) ? new
|
|
4840
|
+
const zu = (t, e) => ln(t) ? new Uu(e, { enableHardwareAcceleration: !1 }) : new _u(e, { enableHardwareAcceleration: !0 }), Wu = {
|
|
4840
4841
|
layout: {
|
|
4841
4842
|
ProjectionNode: go,
|
|
4842
4843
|
MeasureLayout: lo
|
|
4843
4844
|
}
|
|
4844
4845
|
}, Gu = {
|
|
4845
4846
|
...pc,
|
|
4846
|
-
...
|
|
4847
|
+
...Fa,
|
|
4847
4848
|
...bu,
|
|
4848
4849
|
...Wu
|
|
4849
4850
|
}, Sn = /* @__PURE__ */ $r((t, e) => Aa(t, e, Gu, zu));
|
|
4850
|
-
function
|
|
4851
|
+
function Us(t) {
|
|
4851
4852
|
for (; t.startsWith("/"); )
|
|
4852
4853
|
t = t.slice(1);
|
|
4853
4854
|
return t;
|
|
4854
4855
|
}
|
|
4855
|
-
function
|
|
4856
|
+
function To(t, e, n = []) {
|
|
4856
4857
|
for (const s of t) {
|
|
4857
|
-
if (console.log(s.path, e, s.path === e),
|
|
4858
|
+
if (console.log(s.path, e, s.path === e), Us(s.path || "") === Us(e))
|
|
4858
4859
|
return [...n, s];
|
|
4859
4860
|
if (s.children) {
|
|
4860
|
-
const i =
|
|
4861
|
+
const i = To(s.children, e, [...n, s]);
|
|
4861
4862
|
if (i)
|
|
4862
4863
|
return i;
|
|
4863
4864
|
}
|
|
@@ -4865,7 +4866,7 @@ function wo(t, e, n = []) {
|
|
|
4865
4866
|
return null;
|
|
4866
4867
|
}
|
|
4867
4868
|
function $u(t) {
|
|
4868
|
-
return /* @__PURE__ */
|
|
4869
|
+
return /* @__PURE__ */ P(
|
|
4869
4870
|
"svg",
|
|
4870
4871
|
{
|
|
4871
4872
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -4874,7 +4875,7 @@ function $u(t) {
|
|
|
4874
4875
|
fill: "none",
|
|
4875
4876
|
viewBox: "0 0 18 20",
|
|
4876
4877
|
...t,
|
|
4877
|
-
children: /* @__PURE__ */
|
|
4878
|
+
children: /* @__PURE__ */ P(
|
|
4878
4879
|
"path",
|
|
4879
4880
|
{
|
|
4880
4881
|
fill: "#E01B00",
|
|
@@ -4887,14 +4888,14 @@ function $u(t) {
|
|
|
4887
4888
|
);
|
|
4888
4889
|
}
|
|
4889
4890
|
function ih(t) {
|
|
4890
|
-
return /* @__PURE__ */
|
|
4891
|
+
return /* @__PURE__ */ P(Hu, { ...t });
|
|
4891
4892
|
}
|
|
4892
4893
|
function Hu(t) {
|
|
4893
4894
|
const { baseUrl: e, menuPath: n } = t;
|
|
4894
4895
|
console.log("baseUrl:", e);
|
|
4895
|
-
const s =
|
|
4896
|
+
const s = _o();
|
|
4896
4897
|
console.log("location:", s);
|
|
4897
|
-
const [i, r] = ot([]), [o, a] = ot(!1), l = (
|
|
4898
|
+
const [i, r] = ot([]), [o, a] = ot(!1), l = (To(i, s.pathname) || []).filter((y) => y.parentKey !== 0), [c, u] = ot({}), h = (y) => {
|
|
4898
4899
|
u({
|
|
4899
4900
|
...c,
|
|
4900
4901
|
[y]: !c[y]
|
|
@@ -4908,16 +4909,16 @@ function Hu(t) {
|
|
|
4908
4909
|
(async () => {
|
|
4909
4910
|
const g = e + (n || "/global-menu-config/api/v1/menu-items/user"), x = await zo.get(g, {
|
|
4910
4911
|
withCredentials: !0
|
|
4911
|
-
}).then((S) => S.data),
|
|
4912
|
+
}).then((S) => S.data), w = {};
|
|
4912
4913
|
x.forEach((S) => {
|
|
4913
|
-
S.children && (
|
|
4914
|
-
}), u(
|
|
4914
|
+
S.children && (w[S.id] = !0);
|
|
4915
|
+
}), u(w), r(x.map((S) => ({ ...S, parentKey: 0 })));
|
|
4915
4916
|
})();
|
|
4916
4917
|
}, [e, n]);
|
|
4917
4918
|
const [d, m] = ot(!1), p = () => {
|
|
4918
|
-
window.location.href = `${e}/authentication/logout?callbackUrl=${window.location.
|
|
4919
|
+
window.location.href = `${e}/authentication/logout?callbackUrl=${window.location.href}`;
|
|
4919
4920
|
}, v = o ? "collapsed" : "expanded", b = (y) => `${y} ${v}`;
|
|
4920
|
-
return /* @__PURE__ */
|
|
4921
|
+
return /* @__PURE__ */ F(
|
|
4921
4922
|
Sn.nav,
|
|
4922
4923
|
{
|
|
4923
4924
|
initial: { width: "18rem" },
|
|
@@ -4925,18 +4926,18 @@ function Hu(t) {
|
|
|
4925
4926
|
transition: { duration: 0.3 },
|
|
4926
4927
|
className: b("side-bar"),
|
|
4927
4928
|
children: [
|
|
4928
|
-
/* @__PURE__ */
|
|
4929
|
-
/* @__PURE__ */
|
|
4930
|
-
/* @__PURE__ */
|
|
4929
|
+
/* @__PURE__ */ P("div", { className: "h-[8px]" }),
|
|
4930
|
+
/* @__PURE__ */ P("div", { className: b("side-bar__toggle-btn"), children: /* @__PURE__ */ P("button", { className: "icon-btn", onClick: f, children: o ? /* @__PURE__ */ P(Zs, {}) : /* @__PURE__ */ P(Qs, {}) }) }),
|
|
4931
|
+
/* @__PURE__ */ P(
|
|
4931
4932
|
"div",
|
|
4932
4933
|
{
|
|
4933
4934
|
id: "menu-items",
|
|
4934
4935
|
className: b("mt-6 overflow-y-auto overflow-x-hidden flex-1"),
|
|
4935
|
-
children: i.map((y) => /* @__PURE__ */
|
|
4936
|
-
|
|
4936
|
+
children: i.map((y) => /* @__PURE__ */ P(
|
|
4937
|
+
Po,
|
|
4937
4938
|
{
|
|
4938
4939
|
item: y,
|
|
4939
|
-
isActive: (x) => l.some((
|
|
4940
|
+
isActive: (x) => l.some((w) => w.id === x),
|
|
4940
4941
|
isCollapsed: o,
|
|
4941
4942
|
expanded: (x) => c[x],
|
|
4942
4943
|
toggleExpand: h
|
|
@@ -4945,19 +4946,19 @@ function Hu(t) {
|
|
|
4945
4946
|
))
|
|
4946
4947
|
}
|
|
4947
4948
|
),
|
|
4948
|
-
/* @__PURE__ */
|
|
4949
|
-
/* @__PURE__ */
|
|
4949
|
+
/* @__PURE__ */ F("div", { className: "w-full mt-10 mb-10", children: [
|
|
4950
|
+
/* @__PURE__ */ F(
|
|
4950
4951
|
"button",
|
|
4951
4952
|
{
|
|
4952
4953
|
className: b("side-bar__logout-btn"),
|
|
4953
4954
|
onClick: () => m(!0),
|
|
4954
4955
|
children: [
|
|
4955
|
-
/* @__PURE__ */
|
|
4956
|
-
/* @__PURE__ */
|
|
4956
|
+
/* @__PURE__ */ P($u, {}),
|
|
4957
|
+
/* @__PURE__ */ P("span", { className: `ml-3 ${o ? "hidden" : ""}`, children: "Logout" })
|
|
4957
4958
|
]
|
|
4958
4959
|
}
|
|
4959
4960
|
),
|
|
4960
|
-
/* @__PURE__ */
|
|
4961
|
+
/* @__PURE__ */ P(
|
|
4961
4962
|
$s,
|
|
4962
4963
|
{
|
|
4963
4964
|
isOpen: d,
|
|
@@ -4970,18 +4971,18 @@ function Hu(t) {
|
|
|
4970
4971
|
}
|
|
4971
4972
|
);
|
|
4972
4973
|
}
|
|
4973
|
-
function
|
|
4974
|
+
function Po({ item: t, level: e = 0, ...n }) {
|
|
4974
4975
|
var v;
|
|
4975
4976
|
const { isActive: s, isCollapsed: i, expanded: r, toggleExpand: o } = n, a = `level-${e}`, l = i ? "collapsed" : "expanded", c = s(t.id) ? "active" : "", u = (b, y = a) => `${b} ${y} ${l} ${c}`, h = !!((v = t.children) != null && v.length), [f, d] = ot(!1), m = St();
|
|
4976
4977
|
function p(b) {
|
|
4977
|
-
var
|
|
4978
|
+
var w;
|
|
4978
4979
|
const { level: y, hovered: g, parentRef: x } = b;
|
|
4979
|
-
return !h || i && y >= 2 && !g ? null : /* @__PURE__ */
|
|
4980
|
+
return !h || i && y >= 2 && !g ? null : /* @__PURE__ */ P(
|
|
4980
4981
|
qu,
|
|
4981
4982
|
{
|
|
4982
4983
|
parentRef: x,
|
|
4983
4984
|
onlyChild: !i || i && y < 2,
|
|
4984
|
-
children: /* @__PURE__ */
|
|
4985
|
+
children: /* @__PURE__ */ P(
|
|
4985
4986
|
Sn.div,
|
|
4986
4987
|
{
|
|
4987
4988
|
className: u("menu-item__dropdown", `level-${y}`),
|
|
@@ -4990,14 +4991,14 @@ function To({ item: t, level: e = 0, ...n }) {
|
|
|
4990
4991
|
height: i || r(t.id) ? "auto" : 0
|
|
4991
4992
|
},
|
|
4992
4993
|
transition: { duration: 0.2 },
|
|
4993
|
-
children: (
|
|
4994
|
+
children: (w = t.children) == null ? void 0 : w.map((S) => /* @__PURE__ */ Gs(Po, { ...n, key: S.id, item: S, level: y }))
|
|
4994
4995
|
},
|
|
4995
4996
|
+i
|
|
4996
4997
|
)
|
|
4997
4998
|
}
|
|
4998
4999
|
);
|
|
4999
5000
|
}
|
|
5000
|
-
return /* @__PURE__ */
|
|
5001
|
+
return /* @__PURE__ */ F(
|
|
5001
5002
|
"div",
|
|
5002
5003
|
{
|
|
5003
5004
|
ref: m,
|
|
@@ -5005,8 +5006,8 @@ function To({ item: t, level: e = 0, ...n }) {
|
|
|
5005
5006
|
onMouseEnter: () => i && d(!0),
|
|
5006
5007
|
onMouseLeave: () => i && d(!1),
|
|
5007
5008
|
children: [
|
|
5008
|
-
/* @__PURE__ */
|
|
5009
|
-
|
|
5009
|
+
/* @__PURE__ */ F(
|
|
5010
|
+
Uo,
|
|
5010
5011
|
{
|
|
5011
5012
|
to: h ? "#" : t.path || "#",
|
|
5012
5013
|
style: {
|
|
@@ -5017,7 +5018,7 @@ function To({ item: t, level: e = 0, ...n }) {
|
|
|
5017
5018
|
h && !i && o(t.id);
|
|
5018
5019
|
},
|
|
5019
5020
|
children: [
|
|
5020
|
-
e !== 0 && /* @__PURE__ */
|
|
5021
|
+
e !== 0 && /* @__PURE__ */ P("div", { className: u("menu-item__icon"), children: /* @__PURE__ */ P(
|
|
5021
5022
|
"img",
|
|
5022
5023
|
{
|
|
5023
5024
|
src: t.icon || "/",
|
|
@@ -5025,8 +5026,8 @@ function To({ item: t, level: e = 0, ...n }) {
|
|
|
5025
5026
|
style: { height: 24, maxHeight: 24 }
|
|
5026
5027
|
}
|
|
5027
5028
|
) }),
|
|
5028
|
-
/* @__PURE__ */
|
|
5029
|
-
h && /* @__PURE__ */
|
|
5029
|
+
/* @__PURE__ */ P("span", { className: u("menu-item__label"), children: t.name }),
|
|
5030
|
+
h && /* @__PURE__ */ P("div", { className: u("menu-item__icon-arrow__wrapper"), children: /* @__PURE__ */ P(
|
|
5030
5031
|
Xs,
|
|
5031
5032
|
{
|
|
5032
5033
|
className: u(
|
|
@@ -5055,7 +5056,7 @@ function qu(t) {
|
|
|
5055
5056
|
});
|
|
5056
5057
|
}
|
|
5057
5058
|
}, [n]), s ? e : No(
|
|
5058
|
-
/* @__PURE__ */
|
|
5059
|
+
/* @__PURE__ */ P(
|
|
5059
5060
|
Sn.div,
|
|
5060
5061
|
{
|
|
5061
5062
|
style: {
|