@ukpc-lib/react 0.0.3 → 0.0.5
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/Topbar/index.d.ts +4 -1
- package/dist/components/index.cjs +4 -4
- package/dist/components/index.js +960 -1012
- package/dist/index.css +1 -1
- package/package.json +4 -4
- package/web-components-bundle/global-menu/index.cjs +9 -9
- package/web-components-bundle/global-menu/index.js +2447 -2667
- package/web-components-bundle/global-topbar/index.cjs +2 -2
- package/web-components-bundle/global-topbar/index.js +22 -19
- package/web-components-bundle/{index-1cd1b97d.cjs → index-89f82cd2.cjs} +7 -7
- package/web-components-bundle/{index-64e870d7.js → index-e8e3a887.js} +623 -673
package/dist/components/index.js
CHANGED
|
@@ -1,50 +1,25 @@
|
|
|
1
1
|
import "../index.css";
|
|
2
|
-
import Xe, { jsxs as
|
|
3
|
-
import * as
|
|
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
|
|
6
|
-
import { createPortal as
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
"h-[8px]": "_h-[8px]_de8pp_1",
|
|
21
|
-
"h-screen": "_h-screen_de8pp_1",
|
|
22
|
-
"min-h-[1000px]": "_min-h-[1000px]_de8pp_1",
|
|
23
|
-
"w-full": "_w-full_de8pp_1",
|
|
24
|
-
"flex-1": "_flex-1_de8pp_1",
|
|
25
|
-
"cursor-pointer": "_cursor-pointer_de8pp_1",
|
|
26
|
-
"flex-col": "_flex-col_de8pp_1",
|
|
27
|
-
"overflow-auto": "_overflow-auto_de8pp_1",
|
|
28
|
-
"overflow-hidden": "_overflow-hidden_de8pp_1",
|
|
29
|
-
"overflow-y-auto": "_overflow-y-auto_de8pp_1",
|
|
30
|
-
"overflow-x-hidden": "_overflow-x-hidden_de8pp_1",
|
|
31
|
-
"bg-gray-100": "_bg-gray-100_de8pp_1",
|
|
32
|
-
"text-sm": "_text-sm_de8pp_1",
|
|
33
|
-
"text-white": "_text-white_de8pp_1",
|
|
34
|
-
shadow: Yo,
|
|
35
|
-
filter: Xo,
|
|
36
|
-
transition: Qo,
|
|
37
|
-
"avatar-dropdown-item": "_avatar-dropdown-item_de8pp_5",
|
|
38
|
-
avartarDropdownMenu: Zo,
|
|
39
|
-
navbar: Jo,
|
|
40
|
-
"navbar-container": "_navbar-container_de8pp_17",
|
|
41
|
-
"right-side-container": "_right-side-container_de8pp_21",
|
|
42
|
-
userContainer: tr,
|
|
43
|
-
userFullName: er,
|
|
44
|
-
userAvatar: nr
|
|
2
|
+
import Xe, { jsxs as O, jsx as T, Fragment as Ao } from "react/jsx-runtime";
|
|
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 U, 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 Lo, c as Nt, u as Eo, _ as ko, b as Ie, d as Bo, P as D, e as Io, C as Fo, r as Oo, f as jo } from "../styled-f324a192.js";
|
|
6
|
+
import { createPortal as No } from "react-dom";
|
|
7
|
+
import { useLocation as Uo, Link as _o } from "react-router-dom";
|
|
8
|
+
import zo from "axios";
|
|
9
|
+
const Wo = "_avartarDropdownMenu_zliwx_13", Go = "_navbar_zliwx_25", $o = "_userContainer_zliwx_53", Ho = "_userFullName_zliwx_59", qo = "_userAvatar_zliwx_66", Ko = "_relative_zliwx_74", $ = {
|
|
10
|
+
"avatar-dropdown-item": "_avatar-dropdown-item_zliwx_1",
|
|
11
|
+
avartarDropdownMenu: Wo,
|
|
12
|
+
navbar: Go,
|
|
13
|
+
"navbar-container": "_navbar-container_zliwx_36",
|
|
14
|
+
"right-side-container": "_right-side-container_zliwx_44",
|
|
15
|
+
userContainer: $o,
|
|
16
|
+
userFullName: Ho,
|
|
17
|
+
userAvatar: qo,
|
|
18
|
+
relative: Ko,
|
|
19
|
+
"cursor-pointer": "_cursor-pointer_zliwx_78"
|
|
45
20
|
};
|
|
46
|
-
function
|
|
47
|
-
return /* @__PURE__ */
|
|
21
|
+
function Yo() {
|
|
22
|
+
return /* @__PURE__ */ O(
|
|
48
23
|
"svg",
|
|
49
24
|
{
|
|
50
25
|
width: "24",
|
|
@@ -80,8 +55,8 @@ function sr() {
|
|
|
80
55
|
}
|
|
81
56
|
);
|
|
82
57
|
}
|
|
83
|
-
function
|
|
84
|
-
return /* @__PURE__ */
|
|
58
|
+
function Xo() {
|
|
59
|
+
return /* @__PURE__ */ O(
|
|
85
60
|
"svg",
|
|
86
61
|
{
|
|
87
62
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -135,42 +110,17 @@ function ir() {
|
|
|
135
110
|
}
|
|
136
111
|
);
|
|
137
112
|
}
|
|
138
|
-
const
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
"
|
|
143
|
-
"
|
|
144
|
-
"
|
|
145
|
-
"
|
|
146
|
-
|
|
147
|
-
hidden: ur,
|
|
148
|
-
"h-[70px]": "_h-[70px]_14n48_1",
|
|
149
|
-
"h-[8px]": "_h-[8px]_14n48_1",
|
|
150
|
-
"h-screen": "_h-screen_14n48_1",
|
|
151
|
-
"min-h-[1000px]": "_min-h-[1000px]_14n48_1",
|
|
152
|
-
"w-full": "_w-full_14n48_1",
|
|
153
|
-
"flex-1": "_flex-1_14n48_1",
|
|
154
|
-
"cursor-pointer": "_cursor-pointer_14n48_1",
|
|
155
|
-
"flex-col": "_flex-col_14n48_1",
|
|
156
|
-
"overflow-auto": "_overflow-auto_14n48_1",
|
|
157
|
-
"overflow-hidden": "_overflow-hidden_14n48_1",
|
|
158
|
-
"overflow-y-auto": "_overflow-y-auto_14n48_1",
|
|
159
|
-
"overflow-x-hidden": "_overflow-x-hidden_14n48_1",
|
|
160
|
-
"bg-gray-100": "_bg-gray-100_14n48_1",
|
|
161
|
-
"text-sm": "_text-sm_14n48_1",
|
|
162
|
-
"text-white": "_text-white_14n48_1",
|
|
163
|
-
shadow: hr,
|
|
164
|
-
filter: fr,
|
|
165
|
-
transition: dr,
|
|
166
|
-
"modal-overlay": "_modal-overlay_14n48_5",
|
|
167
|
-
"modal-title": "_modal-title_14n48_9",
|
|
168
|
-
"modal-footer": "_modal-footer_14n48_13",
|
|
169
|
-
"modal-container": "_modal-container_14n48_17",
|
|
170
|
-
"modal-button": "_modal-button_14n48_35",
|
|
171
|
-
"confirm-btn": "_confirm-btn_14n48_43"
|
|
113
|
+
const Qo = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAArCAYAAAADgWq5AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAA3XSURBVHgBtVl7jFxVGf/dO3feMzuzO/tuu92y2xIoCEgCgUQogSIKhBIgaAxpFdREITxMVCrYNqB/+A8QCYQYbIuJUTChGqBQDCkaMUCgW0qtpe12t933drezs/N+XX/fuefOzK6l0KInPb2POfec3/m+3/c6a+ALNNu247xczL6Ofbm+j+suLck+pK972XcYhrEbX6AZOItGoGt4uZ99jQtu+tAnmP7kIPLz8yiwS/NHmxDr6kJTdzfaVq5qnGIb+/azAX9GgDXQTQJUQB3Y+SqOvL1bgXVB6nELv2OvcqllX74Uq2+8SV2buBE40n+QwHfgfwlYq34r+7rU+Bj2vvgH/Ou1VxXIxeAaW7Xht6ph1NGzCfAr7/meC3wb+xYCH8IXBaylurWQnu/d++IfMUCwRS1Nuz7mFN813lfVUrYh3xi1lWXIlXd/F1eww5H2rQQ9gLMFTCAP8PJEamIcO+77AebHx+u/6Y8FrItNJDqVL2Awm8WJQhFejwedfj9WhIJosjz8wKCkUdupu6koOX7n08+60haKPHnGgAlEuLp5bGAPdm78yUKO6tU4cQ3w/uQc3pqYwkypQOAGTNNU3SJoi+N6wmFclWjmBnxqvEja1rMJcF8kghseeRT9V62Rl5s595bPDZggxE29fPD11/DWLx9f/FsNqFwrvP5l6DjenZmBKN40TM5qqrEeAUzJGnz28Rpgv6atFRdGQmrXjjG6QrDV/Q0/+zlWf/1GebWB82//TMAE0svLnpnDh+N/umfDaY1KfnlrdBw7R8ZguyQxPJSsoW493JDHY7JbaiGhSNCycEt3J3oDgZp2qi5HOMgbjuCOp59B+8pV4rsvWWyIpwJ8ND0x0fvKQ/dDPIJh1yWgWVsbW6xU8au9+8jXAqUJWJRo2OdDiGqPBv1ojcUQIRVOptOYnEsjky+iUrXREw3jm91dihQ26VPRs0NvoKmrk6DJ6c6uAQK+pBGftQis8LZ3z/ZtIGjFQRJS78zQ05q1u/0nk5ghWOFoazCAloCFGIF2xKPobmtHW1sCifZWeP1e5DM5jJPjHxwaxsGpJE5WykhYlprZI1IWr0FOGASd4tpv/OIx3PHrZy4mJuHzZhejuYgKDxza9Tqkm4ah5Ck8NUzpjhG5z/L7QQIWsGGfFzGvGJeeUMZY5G0oxGgXRYBSjsSi6GpvwZoL+7GqM4GhbM5hkOEIw6SkDcN5ISIZ2fOh6mz36ziwEDCb7CK+94UXHFAKsHMVQzK1lIWfakq+T4p0+RwhWP5Tm1CcVAbFb7w+xwA9XnVvkS4RbuCS5Z18tvT8LmgO0+s5axrY5Ri8gH3gVICvPvLmG0hPTjjSNVyp6kk5Uhii7Mm01W9i1X6S1yLR7apj78ozKEPjDqoVlIsFLmIjJNKm6wpEI2iOBMhzT10wohmzDtSloGAZ2bNngZRNTYcNwt0ju3Y5vK19jIZJG7ssZiuL93kMTSmC5X3Acnq1lEM2lUQ2OYsTY2PI8BoOeOEXgVfLiPqtmmBqVGt4NrWG3932vCvlNY1GtyYzOYmpfR9pKsgWRa91ryBvXZ8pb1PFspo0YJpqxIlCCf6qiRx3eWwkidBkCj2JGfT3LsU+Gtp83sbyZcsRpTtDbhYtytWJUVfrkwqRbE0rJ4xilBIu0MtQO7fwzQ6XEldPfVQHa7vc1cZlurs26+9eOngIQ/MpeMmVeCiAXNWLXBkEVuDVwniqiH2Tafzz4Cj2T6QwkytifHYOyfQ8ZuYLeHN4FEUKxZWuY6v63k039NqDf/+bPK5TEiYdJOnunT16xLFu6TqKyVURTEvZwwlVBsaFUsqdAZlKBWYuj85QBJmq5A8mYpEw5uYraPUauHBZBxf18LuqChSlSgnnLO1AjnTxaA+huCl5BqUt63q0x6gq92lj+shhnEdaiCezND+QPHrUIbzgMZ3Q61ib7QQPdevwWh6DtPIygXpMD4p0Cx0RA+cnOlUaWShXkZsvYwkN7LLz+5AtVbF0SbcKzyGfhfTMNFYtaVXaMVzfRrCOlzE0TL0Z3owO7HEdw8UCuFfuMlOTNWnWrFWnhY5DdpnsXFfEYxjN5NSGKpw0ncsy8kVRplkcn06izQ+E6IujzQlcviqH9/49zIhmoY9AffQyYZ8fZsmjMghnaqNuIRLWbceQhculTMYFHK8Bzk1POzvUiY3zrVnLqZRJmI6UpfU3t+AfKt00tTHaODw2gQIHlctlTCaLGDqZwfzvX6Ira0IgEMTw1BRGR4awsiOOsBVg2uFXvK2vZzgobVN5oaqjYOXedOuthWZTATJr8V1RQyeCqMm1LvCepihDcRDJYlEBrkqgEP5yBQ8DhD8eRlu8CSuW96ClOYYSc2SDGjs6PonxZAqdTdRWuGlBpm+gIXuzDQfTwvSlIXBo92S7oExDewudLi7yxVEm5ndfcAF5yOSFq3jok6Ufm8sjze+C8WYsWXUuWnpXoBgM4/3jE9gzPO4EFY4zqqiF4gU+uOaLtZfQHsttIuEhuQl3dEB8sZs1aUY4FDCqTvJj63xN5wwtrCSaKc2xXAEpZmIrOoSfQILG1kOpfuXSS9Ddswz+YBA9zIGPkUIf7NuvpNfmDao5lJUYjo93c2xXy66bbersdPEOCWDJO+FjHpo1Jl1y1KkgXkIrwmiwP7Fjr6STlpcuK48CxTybztDQPEimUojxuv+99zB9bNihVjGNALUS9AfgJTWWB6M1Cdq60qsVBg0kWQxYkKiir43qVY5bAxLVeAxolaDm0G19dbO2CsdWCCBPQ5tIZZArVVQSP8nodGB4BIPDx5FlsLDI11lyt1wu4bJ4u/LpCpBZpwOABlpAGZ68be1b6QJOWpLRc1fJ2Ipz4nAduespFrkzxx8bdSMQAyMnyzpnzpdKBJpFdzSIJYkE+np70HtOL6KRIGZnZnF8cgpLQzG0+ILaMzR4h0XN1bNE1kRfn5KuVNSul/jzkssuX/9hLTXXEm2wW1tPXPOZXPBktqAqCFXq2I5WsswpjlWqSsm5cgXTLE5l+OiJWRW66d/wTr6E/oAP7bBrLs02Tln+qLW6LrpInnbLfy7gHd5weH3b6gswvf/jU+7VjXYizP0nTuCVw4MYnJsjjx2LrlYNRQ01iEAHZ1MYTqbhHRxVJdOKzg60NUUUzY4UWH14vehg4r+UX3QxexNe1845XAWyd1x4ESIdisNvNwLeLfw4785vxKc3PaIJUFUewlXcXKmM96nSd1h0jpKfZeYQMkqqZhnnkZhN0JJrlLgrcVs2k41YOICVXe0Is3SS9LNKflveELyMdCelCGDfT6Es529Ly0VE1by6Mudd//XXu3TYVgPMhyRV81Tr6gs2hds7kZUwDcegxjNZvM0INnBihiCrzBuY7DA5N0XkBGXy2SlHbFUuqQcxWOYYzQTbxoJTPLz4a8u0MG34lR8uku9hJvUVApT8Q3zJKLndzA2vLuYQ4PswtdJ/3doaHVx9u01OW5KX/vBexeNksYSXh4bxG6aRH88lafisJKhan1e6l1mZl++YC9CtSTBQZRQX9jMpipGf3bEQ2mlsQapdNpOn1McrTJhsllN8V2IlIqqrUAiSYko499LtZVjMvh+N4XgojC996y7BJW53y38BFinzIlLGSGe3A5RuyCYYARkMhuBjkJCTHK+EXk7u8zIXIPAycwKTwKFDu0+iGe+EGuliFWmTIdwMqdouwM3IKLGFErWTzeeoMQMZFqVObmyq0N659qvou/Y6gfZU49lEo4Shy+mB23+6EfGubiVBOQTxM2cQNYqqg4xuIuEgAYdo8WFGsRC7FQjBE4ygxKQmbfiQZSQrBOPwNLczKMUQZj0X4qYdz2io2k96kXm1SFlaLp9XjqEl0Yqbb7vN5e7mBRixqLknPwcPHIh/f/16ZHOyc+a8THIU6bmJEvnX6KttisuSKpjSKfG8QRLxMMF5+E42E6CGAtyccF/AWtz8PKNhS2sCkzRk0ZyYhJfjm1ta8Ojjj2FpT88pT37MxYD1gAfPPe88/GjjwwRoOZWAlPOUkgD1UbqKEuwRhvQwzx18lg9NLOETTHoSXDTKbC7EMCzGJxV2RdduUl3LfPIs3kjCdSaTJqU8yFPad939HQErQ799qvNiC6do4kJE0jevu3VTUyyOTQ9vRIVG4UpHpCxNXJiU8/KuSj6KNIsMvR66Lj8NVDyBAJPNCUjRiKWlLG7RrRWzrFyWdC/Fgw//GBddrE6mtnzaqbyB0zT3fHhsdBQP3XsfxkZGlBsSFSr1GI6f9pLT8l7O0WQTeXIxSm2UuMkcjSrRkqBXKCkteSW1FP/LoNPBpCZL6XposE8+ywNAZow42/PhBtBSpL7M3rv9+efx2+eeo0S99VTQcNSq/CoBi5pzLJcsbkKkn+W9ABa35UjYUvmBeIeeZT24+rpr8bWbbkIoHB6CQ4Pdp8PzmYA16F44R1nrJ5jT/m7rVvz19TecPJaqFsDlakXxWYCJNCt89mgDbWluVvx0D7mjTU248qqrsO7225BgksS2Q4NNfhaWzwW4AbicDTzB3jtJ4HsHBvDmzp0YPHQYhVKRbi6oKFIgOKGFBAhpQb4Pkt8r+s7B5VdcgWvWrhWJyk+SH2w2zuDPX2cEuAH4Gl42sK933w0ePowZhu9JHpWmyM8y3ZvwOMoz4r7+foLtc4cmNdAnjf/33+lOA14k7/4VdDkW/iV0Dk6RMARH9QOfR/Wf1v4D3Fe7Fu3OpbsAAAAASUVORK5CYII=", Q = {
|
|
114
|
+
"modal-overlay": "_modal-overlay_10n3k_1",
|
|
115
|
+
"modal-title": "_modal-title_10n3k_12",
|
|
116
|
+
"modal-footer": "_modal-footer_10n3k_19",
|
|
117
|
+
"modal-container": "_modal-container_10n3k_25",
|
|
118
|
+
"modal-button": "_modal-button_10n3k_43",
|
|
119
|
+
"confirm-btn": "_confirm-btn_10n3k_51",
|
|
120
|
+
"text-white": "_text-white_10n3k_55",
|
|
121
|
+
"text-sm": "_text-sm_10n3k_59"
|
|
172
122
|
};
|
|
173
|
-
function
|
|
123
|
+
function $s({
|
|
174
124
|
isOpen: t,
|
|
175
125
|
onClose: e,
|
|
176
126
|
onConfirm: n
|
|
@@ -187,10 +137,10 @@ function Gs({
|
|
|
187
137
|
onClick: s,
|
|
188
138
|
className: Q["modal-overlay"],
|
|
189
139
|
id: "modal-wrapper",
|
|
190
|
-
children: /* @__PURE__ */
|
|
140
|
+
children: /* @__PURE__ */ O("div", { className: Q["modal-container"], children: [
|
|
191
141
|
/* @__PURE__ */ T("h3", { className: Q["modal-title"], children: "Log out" }),
|
|
192
142
|
/* @__PURE__ */ T("p", { className: Q["text-sm"], children: "Are you sure want to log out?" }),
|
|
193
|
-
/* @__PURE__ */
|
|
143
|
+
/* @__PURE__ */ O("div", { className: Q["modal-footer"], children: [
|
|
194
144
|
/* @__PURE__ */ T("button", { className: Q["modal-button"], onClick: e, children: "Cancel" }),
|
|
195
145
|
/* @__PURE__ */ T(
|
|
196
146
|
"button",
|
|
@@ -205,31 +155,33 @@ function Gs({
|
|
|
205
155
|
}
|
|
206
156
|
);
|
|
207
157
|
}
|
|
208
|
-
function
|
|
158
|
+
function nh({
|
|
209
159
|
logo: t,
|
|
210
160
|
user: e,
|
|
211
|
-
baseUrl: n
|
|
161
|
+
baseUrl: n,
|
|
162
|
+
style: s,
|
|
163
|
+
classNames: i = ""
|
|
212
164
|
}) {
|
|
213
|
-
const
|
|
214
|
-
return /* @__PURE__ */ T("nav", { className:
|
|
215
|
-
/* @__PURE__ */ T("img", { src:
|
|
216
|
-
/* @__PURE__ */
|
|
217
|
-
/* @__PURE__ */
|
|
165
|
+
const r = t || "/public/assets/icons/logo-header.png";
|
|
166
|
+
return /* @__PURE__ */ T("nav", { className: `${$.navbar} ${i}`, style: s, children: /* @__PURE__ */ O("div", { className: $["navbar-container"], children: [
|
|
167
|
+
/* @__PURE__ */ T("img", { src: r, alt: "logo-header" }),
|
|
168
|
+
/* @__PURE__ */ O("div", { className: $["right-side-container"], children: [
|
|
169
|
+
/* @__PURE__ */ O("div", { className: $.userContainer, children: [
|
|
218
170
|
/* @__PURE__ */ T(
|
|
219
171
|
"p",
|
|
220
172
|
{
|
|
221
|
-
className:
|
|
173
|
+
className: $.userFullName,
|
|
222
174
|
children: `${e == null ? void 0 : e.firstName} ${e == null ? void 0 : e.lastName}`
|
|
223
175
|
}
|
|
224
176
|
),
|
|
225
|
-
/* @__PURE__ */ T(
|
|
177
|
+
/* @__PURE__ */ T(Zo, { baseUrl: n, avatarUrl: e == null ? void 0 : e.avatarUrl })
|
|
226
178
|
] }),
|
|
227
|
-
/* @__PURE__ */ T("span", { className:
|
|
228
|
-
/* @__PURE__ */ T("span", { className:
|
|
179
|
+
/* @__PURE__ */ T("span", { className: $["cursor-pointer"], children: /* @__PURE__ */ T(Yo, {}) }),
|
|
180
|
+
/* @__PURE__ */ T("span", { className: $["cursor-pointer"], children: /* @__PURE__ */ T(Xo, {}) })
|
|
229
181
|
] })
|
|
230
182
|
] }) });
|
|
231
183
|
}
|
|
232
|
-
function
|
|
184
|
+
function Zo({
|
|
233
185
|
avatarUrl: t,
|
|
234
186
|
baseUrl: e
|
|
235
187
|
}) {
|
|
@@ -241,32 +193,32 @@ function pr({
|
|
|
241
193
|
u.target !== a.current && u.target !== o.current && s(!1);
|
|
242
194
|
}
|
|
243
195
|
return window.addEventListener("click", c), () => window.removeEventListener("click", c);
|
|
244
|
-
}, []), /* @__PURE__ */
|
|
245
|
-
/* @__PURE__ */
|
|
196
|
+
}, []), /* @__PURE__ */ O(Ao, { children: [
|
|
197
|
+
/* @__PURE__ */ O("div", { className: $.relative, children: [
|
|
246
198
|
/* @__PURE__ */ T(
|
|
247
199
|
"img",
|
|
248
200
|
{
|
|
249
201
|
ref: o,
|
|
250
202
|
onClick: () => s((c) => !c),
|
|
251
203
|
alt: "user avatar",
|
|
252
|
-
className:
|
|
253
|
-
src: t ||
|
|
204
|
+
className: $.userAvatar,
|
|
205
|
+
src: t || Qo
|
|
254
206
|
}
|
|
255
207
|
),
|
|
256
|
-
n && /* @__PURE__ */ T("div", { ref: a, className:
|
|
257
|
-
/* @__PURE__ */ T("li", { className:
|
|
208
|
+
n && /* @__PURE__ */ T("div", { ref: a, className: $.avartarDropdownMenu, children: /* @__PURE__ */ O("ul", { children: [
|
|
209
|
+
/* @__PURE__ */ T("li", { className: $["avatar-dropdown-item"], children: "Profile" }),
|
|
258
210
|
/* @__PURE__ */ T(
|
|
259
211
|
"li",
|
|
260
212
|
{
|
|
261
213
|
onClick: () => r(!0),
|
|
262
|
-
className:
|
|
214
|
+
className: $["avatar-dropdown-item"],
|
|
263
215
|
children: "Logout"
|
|
264
216
|
}
|
|
265
217
|
)
|
|
266
218
|
] }) })
|
|
267
219
|
] }),
|
|
268
220
|
/* @__PURE__ */ T(
|
|
269
|
-
|
|
221
|
+
$s,
|
|
270
222
|
{
|
|
271
223
|
isOpen: i,
|
|
272
224
|
onClose: () => r(!1),
|
|
@@ -285,13 +237,13 @@ var Qe = {}, Hs = { exports: {} };
|
|
|
285
237
|
t.exports = e, t.exports.__esModule = !0, t.exports.default = t.exports;
|
|
286
238
|
})(Hs);
|
|
287
239
|
var Ze = Hs.exports, we = {};
|
|
288
|
-
function
|
|
240
|
+
function Jo(...t) {
|
|
289
241
|
return t.reduce((e, n) => n == null ? e : function(...i) {
|
|
290
242
|
e.apply(this, i), n.apply(this, i);
|
|
291
243
|
}, () => {
|
|
292
244
|
});
|
|
293
245
|
}
|
|
294
|
-
function
|
|
246
|
+
function tr(t, e = 166) {
|
|
295
247
|
let n;
|
|
296
248
|
function s(...i) {
|
|
297
249
|
const r = () => {
|
|
@@ -303,15 +255,15 @@ function gr(t, e = 166) {
|
|
|
303
255
|
clearTimeout(n);
|
|
304
256
|
}, s;
|
|
305
257
|
}
|
|
306
|
-
function
|
|
258
|
+
function er(t, e) {
|
|
307
259
|
return process.env.NODE_ENV === "production" ? () => null : (n, s, i, r, o) => {
|
|
308
260
|
const a = i || "<<anonymous>>", l = o || s;
|
|
309
261
|
return typeof n[s] < "u" ? new Error(`The ${r} \`${l}\` of \`${a}\` is deprecated. ${e}`) : null;
|
|
310
262
|
};
|
|
311
263
|
}
|
|
312
|
-
function
|
|
264
|
+
function nr(t, e) {
|
|
313
265
|
var n, s;
|
|
314
|
-
return /* @__PURE__ */
|
|
266
|
+
return /* @__PURE__ */ R.isValidElement(t) && e.indexOf(
|
|
315
267
|
// For server components `muiName` is avaialble in element.type._payload.value.muiName
|
|
316
268
|
// relevant info - https://github.com/facebook/react/blob/2807d781a08db8e9873687fccc25c0f12b4fb3d4/packages/react/src/ReactLazy.js#L45
|
|
317
269
|
// eslint-disable-next-line no-underscore-dangle
|
|
@@ -321,35 +273,35 @@ function vr(t, e) {
|
|
|
321
273
|
function qs(t) {
|
|
322
274
|
return t && t.ownerDocument || document;
|
|
323
275
|
}
|
|
324
|
-
function
|
|
276
|
+
function sr(t) {
|
|
325
277
|
return qs(t).defaultView || window;
|
|
326
278
|
}
|
|
327
279
|
function Ks(t, e) {
|
|
328
280
|
typeof t == "function" ? t(e) : t && (t.current = e);
|
|
329
281
|
}
|
|
330
|
-
const
|
|
331
|
-
let
|
|
332
|
-
function
|
|
333
|
-
const [e, n] =
|
|
334
|
-
return
|
|
335
|
-
e == null && (
|
|
282
|
+
const ir = typeof window < "u" ? R.useLayoutEffect : R.useEffect, Ys = ir;
|
|
283
|
+
let Ln = 0;
|
|
284
|
+
function or(t) {
|
|
285
|
+
const [e, n] = R.useState(t), s = t || e;
|
|
286
|
+
return R.useEffect(() => {
|
|
287
|
+
e == null && (Ln += 1, n(`mui-${Ln}`));
|
|
336
288
|
}, [e]), s;
|
|
337
289
|
}
|
|
338
|
-
const
|
|
339
|
-
function
|
|
340
|
-
if (
|
|
341
|
-
const e =
|
|
290
|
+
const En = R["useId".toString()];
|
|
291
|
+
function rr(t) {
|
|
292
|
+
if (En !== void 0) {
|
|
293
|
+
const e = En();
|
|
342
294
|
return t ?? e;
|
|
343
295
|
}
|
|
344
|
-
return
|
|
296
|
+
return or(t);
|
|
345
297
|
}
|
|
346
|
-
function
|
|
298
|
+
function ar(t, e, n, s, i) {
|
|
347
299
|
if (process.env.NODE_ENV === "production")
|
|
348
300
|
return null;
|
|
349
301
|
const r = i || e;
|
|
350
302
|
return typeof t[e] < "u" ? new Error(`The prop \`${r}\` is not supported. Please remove it.`) : null;
|
|
351
303
|
}
|
|
352
|
-
function
|
|
304
|
+
function lr({
|
|
353
305
|
controlled: t,
|
|
354
306
|
default: e,
|
|
355
307
|
name: n,
|
|
@@ -357,43 +309,43 @@ function Ar({
|
|
|
357
309
|
}) {
|
|
358
310
|
const {
|
|
359
311
|
current: i
|
|
360
|
-
} =
|
|
312
|
+
} = R.useRef(t !== void 0), [r, o] = R.useState(e), a = i ? t : r;
|
|
361
313
|
if (process.env.NODE_ENV !== "production") {
|
|
362
|
-
|
|
314
|
+
R.useEffect(() => {
|
|
363
315
|
i !== (t !== void 0) && console.error([`MUI: A component is changing the ${i ? "" : "un"}controlled ${s} state of ${n} to be ${i ? "un" : ""}controlled.`, "Elements should not switch from uncontrolled to controlled (or vice versa).", `Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`, "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", "More info: https://fb.me/react-controlled-components"].join(`
|
|
364
316
|
`));
|
|
365
317
|
}, [s, n, t]);
|
|
366
318
|
const {
|
|
367
319
|
current: c
|
|
368
|
-
} =
|
|
369
|
-
|
|
320
|
+
} = R.useRef(e);
|
|
321
|
+
R.useEffect(() => {
|
|
370
322
|
!i && c !== e && console.error([`MUI: A component is changing the default ${s} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
|
|
371
323
|
`));
|
|
372
324
|
}, [JSON.stringify(e)]);
|
|
373
325
|
}
|
|
374
|
-
const l =
|
|
326
|
+
const l = R.useCallback((c) => {
|
|
375
327
|
i || o(c);
|
|
376
328
|
}, []);
|
|
377
329
|
return [a, l];
|
|
378
330
|
}
|
|
379
|
-
function
|
|
380
|
-
const e =
|
|
331
|
+
function cr(t) {
|
|
332
|
+
const e = R.useRef(t);
|
|
381
333
|
return Ys(() => {
|
|
382
334
|
e.current = t;
|
|
383
|
-
}),
|
|
335
|
+
}), R.useRef((...n) => (
|
|
384
336
|
// @ts-expect-error hide `this`
|
|
385
337
|
(0, e.current)(...n)
|
|
386
338
|
)).current;
|
|
387
339
|
}
|
|
388
|
-
function
|
|
389
|
-
return
|
|
340
|
+
function ur(...t) {
|
|
341
|
+
return R.useMemo(() => t.every((e) => e == null) ? null : (e) => {
|
|
390
342
|
t.forEach((n) => {
|
|
391
343
|
Ks(n, e);
|
|
392
344
|
});
|
|
393
345
|
}, t);
|
|
394
346
|
}
|
|
395
|
-
let fe = !0,
|
|
396
|
-
const
|
|
347
|
+
let fe = !0, Fe = !1, kn;
|
|
348
|
+
const hr = {
|
|
397
349
|
text: !0,
|
|
398
350
|
search: !0,
|
|
399
351
|
url: !0,
|
|
@@ -408,26 +360,26 @@ const Cr = {
|
|
|
408
360
|
datetime: !0,
|
|
409
361
|
"datetime-local": !0
|
|
410
362
|
};
|
|
411
|
-
function
|
|
363
|
+
function fr(t) {
|
|
412
364
|
const {
|
|
413
365
|
type: e,
|
|
414
366
|
tagName: n
|
|
415
367
|
} = t;
|
|
416
|
-
return !!(n === "INPUT" &&
|
|
368
|
+
return !!(n === "INPUT" && hr[e] && !t.readOnly || n === "TEXTAREA" && !t.readOnly || t.isContentEditable);
|
|
417
369
|
}
|
|
418
|
-
function
|
|
370
|
+
function dr(t) {
|
|
419
371
|
t.metaKey || t.altKey || t.ctrlKey || (fe = !0);
|
|
420
372
|
}
|
|
421
373
|
function Te() {
|
|
422
374
|
fe = !1;
|
|
423
375
|
}
|
|
424
|
-
function
|
|
425
|
-
this.visibilityState === "hidden" &&
|
|
376
|
+
function mr() {
|
|
377
|
+
this.visibilityState === "hidden" && Fe && (fe = !0);
|
|
426
378
|
}
|
|
427
|
-
function
|
|
428
|
-
t.addEventListener("keydown",
|
|
379
|
+
function pr(t) {
|
|
380
|
+
t.addEventListener("keydown", dr, !0), t.addEventListener("mousedown", Te, !0), t.addEventListener("pointerdown", Te, !0), t.addEventListener("touchstart", Te, !0), t.addEventListener("visibilitychange", mr, !0);
|
|
429
381
|
}
|
|
430
|
-
function
|
|
382
|
+
function gr(t) {
|
|
431
383
|
const {
|
|
432
384
|
target: e
|
|
433
385
|
} = t;
|
|
@@ -435,19 +387,19 @@ function Lr(t) {
|
|
|
435
387
|
return e.matches(":focus-visible");
|
|
436
388
|
} catch {
|
|
437
389
|
}
|
|
438
|
-
return fe ||
|
|
390
|
+
return fe || fr(e);
|
|
439
391
|
}
|
|
440
|
-
function
|
|
441
|
-
const t =
|
|
442
|
-
i != null &&
|
|
443
|
-
}, []), e =
|
|
392
|
+
function yr() {
|
|
393
|
+
const t = R.useCallback((i) => {
|
|
394
|
+
i != null && pr(i.ownerDocument);
|
|
395
|
+
}, []), e = R.useRef(!1);
|
|
444
396
|
function n() {
|
|
445
|
-
return e.current ? (
|
|
446
|
-
|
|
397
|
+
return e.current ? (Fe = !0, window.clearTimeout(kn), kn = window.setTimeout(() => {
|
|
398
|
+
Fe = !1;
|
|
447
399
|
}, 100), e.current = !1, !0) : !1;
|
|
448
400
|
}
|
|
449
401
|
function s(i) {
|
|
450
|
-
return
|
|
402
|
+
return gr(i) ? (e.current = !0, !0) : !1;
|
|
451
403
|
}
|
|
452
404
|
return {
|
|
453
405
|
isFocusVisibleRef: e,
|
|
@@ -456,33 +408,33 @@ function Er() {
|
|
|
456
408
|
ref: t
|
|
457
409
|
};
|
|
458
410
|
}
|
|
459
|
-
function
|
|
411
|
+
function vr(t) {
|
|
460
412
|
return Do("MuiSvgIcon", t);
|
|
461
413
|
}
|
|
462
|
-
|
|
463
|
-
const
|
|
414
|
+
Ro("MuiSvgIcon", ["root", "colorPrimary", "colorSecondary", "colorAction", "colorError", "colorDisabled", "fontSizeInherit", "fontSizeSmall", "fontSizeMedium", "fontSizeLarge"]);
|
|
415
|
+
const xr = ["children", "className", "color", "component", "fontSize", "htmlColor", "inheritViewBox", "titleAccess", "viewBox"], br = (t) => {
|
|
464
416
|
const {
|
|
465
417
|
color: e,
|
|
466
418
|
fontSize: n,
|
|
467
419
|
classes: s
|
|
468
420
|
} = t, i = {
|
|
469
|
-
root: ["root", e !== "inherit" && `color${
|
|
421
|
+
root: ["root", e !== "inherit" && `color${Nt(e)}`, `fontSize${Nt(n)}`]
|
|
470
422
|
};
|
|
471
|
-
return
|
|
472
|
-
},
|
|
423
|
+
return Io(i, vr, s);
|
|
424
|
+
}, wr = Lo("svg", {
|
|
473
425
|
name: "MuiSvgIcon",
|
|
474
426
|
slot: "Root",
|
|
475
427
|
overridesResolver: (t, e) => {
|
|
476
428
|
const {
|
|
477
429
|
ownerState: n
|
|
478
430
|
} = t;
|
|
479
|
-
return [e.root, n.color !== "inherit" && e[`color${
|
|
431
|
+
return [e.root, n.color !== "inherit" && e[`color${Nt(n.color)}`], e[`fontSize${Nt(n.fontSize)}`]];
|
|
480
432
|
}
|
|
481
433
|
})(({
|
|
482
434
|
theme: t,
|
|
483
435
|
ownerState: e
|
|
484
436
|
}) => {
|
|
485
|
-
var n, s, i, r, o, a, l, c, u, h, f, d,
|
|
437
|
+
var n, s, i, r, o, a, l, c, u, h, f, d, m;
|
|
486
438
|
return {
|
|
487
439
|
userSelect: "none",
|
|
488
440
|
width: "1em",
|
|
@@ -504,12 +456,12 @@ const Br = ["children", "className", "color", "component", "fontSize", "htmlColo
|
|
|
504
456
|
// TODO v5 deprecate, v6 remove for sx
|
|
505
457
|
color: (h = (f = (t.vars || t).palette) == null || (f = f[e.color]) == null ? void 0 : f.main) != null ? h : {
|
|
506
458
|
action: (d = (t.vars || t).palette) == null || (d = d.action) == null ? void 0 : d.active,
|
|
507
|
-
disabled: (
|
|
459
|
+
disabled: (m = (t.vars || t).palette) == null || (m = m.action) == null ? void 0 : m.disabled,
|
|
508
460
|
inherit: void 0
|
|
509
461
|
}[e.color]
|
|
510
462
|
};
|
|
511
|
-
}), Je = /* @__PURE__ */
|
|
512
|
-
const s =
|
|
463
|
+
}), Je = /* @__PURE__ */ R.forwardRef(function(e, n) {
|
|
464
|
+
const s = Eo({
|
|
513
465
|
props: e,
|
|
514
466
|
name: "MuiSvgIcon"
|
|
515
467
|
}), {
|
|
@@ -522,28 +474,28 @@ const Br = ["children", "className", "color", "component", "fontSize", "htmlColo
|
|
|
522
474
|
inheritViewBox: u = !1,
|
|
523
475
|
titleAccess: h,
|
|
524
476
|
viewBox: f = "0 0 24 24"
|
|
525
|
-
} = s, d =
|
|
477
|
+
} = s, d = ko(s, xr), m = /* @__PURE__ */ R.isValidElement(i) && i.type === "svg", p = Ie({}, s, {
|
|
526
478
|
color: o,
|
|
527
479
|
component: a,
|
|
528
480
|
fontSize: l,
|
|
529
481
|
instanceFontSize: e.fontSize,
|
|
530
482
|
inheritViewBox: u,
|
|
531
483
|
viewBox: f,
|
|
532
|
-
hasSvgAsChild:
|
|
484
|
+
hasSvgAsChild: m
|
|
533
485
|
}), v = {};
|
|
534
486
|
u || (v.viewBox = f);
|
|
535
|
-
const b =
|
|
536
|
-
return /* @__PURE__ */
|
|
487
|
+
const b = br(p);
|
|
488
|
+
return /* @__PURE__ */ O(wr, Ie({
|
|
537
489
|
as: a,
|
|
538
|
-
className:
|
|
490
|
+
className: Bo(b.root, r),
|
|
539
491
|
focusable: "false",
|
|
540
492
|
color: c,
|
|
541
493
|
"aria-hidden": h ? void 0 : !0,
|
|
542
494
|
role: h ? "img" : void 0,
|
|
543
495
|
ref: n
|
|
544
|
-
}, v, d,
|
|
545
|
-
ownerState:
|
|
546
|
-
children: [
|
|
496
|
+
}, v, d, m && i.props, {
|
|
497
|
+
ownerState: p,
|
|
498
|
+
children: [m ? i.props.children : i, h ? /* @__PURE__ */ T("title", {
|
|
547
499
|
children: h
|
|
548
500
|
}) : null]
|
|
549
501
|
}));
|
|
@@ -621,47 +573,47 @@ process.env.NODE_ENV !== "production" && (Je.propTypes = {
|
|
|
621
573
|
viewBox: D.string
|
|
622
574
|
});
|
|
623
575
|
Je.muiName = "SvgIcon";
|
|
624
|
-
const
|
|
625
|
-
function
|
|
576
|
+
const Bn = Je;
|
|
577
|
+
function Tr(t, e) {
|
|
626
578
|
function n(s, i) {
|
|
627
|
-
return /* @__PURE__ */ T(
|
|
579
|
+
return /* @__PURE__ */ T(Bn, Ie({
|
|
628
580
|
"data-testid": `${e}Icon`,
|
|
629
581
|
ref: i
|
|
630
582
|
}, s, {
|
|
631
583
|
children: t
|
|
632
584
|
}));
|
|
633
585
|
}
|
|
634
|
-
return process.env.NODE_ENV !== "production" && (n.displayName = `${e}Icon`), n.muiName =
|
|
586
|
+
return process.env.NODE_ENV !== "production" && (n.displayName = `${e}Icon`), n.muiName = Bn.muiName, /* @__PURE__ */ R.memo(/* @__PURE__ */ R.forwardRef(n));
|
|
635
587
|
}
|
|
636
|
-
const
|
|
588
|
+
const Pr = {
|
|
637
589
|
configure: (t) => {
|
|
638
590
|
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(`
|
|
639
|
-
`)),
|
|
591
|
+
`)), Fo.configure(t);
|
|
640
592
|
}
|
|
641
|
-
},
|
|
593
|
+
}, Ar = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
642
594
|
__proto__: null,
|
|
643
|
-
capitalize:
|
|
644
|
-
createChainedFunction:
|
|
645
|
-
createSvgIcon:
|
|
646
|
-
debounce:
|
|
647
|
-
deprecatedPropType:
|
|
648
|
-
isMuiElement:
|
|
595
|
+
capitalize: Nt,
|
|
596
|
+
createChainedFunction: Jo,
|
|
597
|
+
createSvgIcon: Tr,
|
|
598
|
+
debounce: tr,
|
|
599
|
+
deprecatedPropType: er,
|
|
600
|
+
isMuiElement: nr,
|
|
649
601
|
ownerDocument: qs,
|
|
650
|
-
ownerWindow:
|
|
651
|
-
requirePropFactory:
|
|
602
|
+
ownerWindow: sr,
|
|
603
|
+
requirePropFactory: Oo,
|
|
652
604
|
setRef: Ks,
|
|
653
|
-
unstable_ClassNameGenerator:
|
|
605
|
+
unstable_ClassNameGenerator: Pr,
|
|
654
606
|
unstable_useEnhancedEffect: Ys,
|
|
655
|
-
unstable_useId:
|
|
656
|
-
unsupportedProp:
|
|
657
|
-
useControlled:
|
|
658
|
-
useEventCallback:
|
|
659
|
-
useForkRef:
|
|
660
|
-
useIsFocusVisible:
|
|
661
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
662
|
-
var
|
|
607
|
+
unstable_useId: rr,
|
|
608
|
+
unsupportedProp: ar,
|
|
609
|
+
useControlled: lr,
|
|
610
|
+
useEventCallback: cr,
|
|
611
|
+
useForkRef: ur,
|
|
612
|
+
useIsFocusVisible: yr
|
|
613
|
+
}, Symbol.toStringTag, { value: "Module" })), Sr = /* @__PURE__ */ jo(Ar);
|
|
614
|
+
var In;
|
|
663
615
|
function tn() {
|
|
664
|
-
return
|
|
616
|
+
return In || (In = 1, function(t) {
|
|
665
617
|
"use client";
|
|
666
618
|
Object.defineProperty(t, "__esModule", {
|
|
667
619
|
value: !0
|
|
@@ -671,40 +623,40 @@ function tn() {
|
|
|
671
623
|
return e.createSvgIcon;
|
|
672
624
|
}
|
|
673
625
|
});
|
|
674
|
-
var e =
|
|
626
|
+
var e = Sr;
|
|
675
627
|
}(we)), we;
|
|
676
628
|
}
|
|
677
|
-
var
|
|
629
|
+
var Vr = Ze;
|
|
678
630
|
Object.defineProperty(Qe, "__esModule", {
|
|
679
631
|
value: !0
|
|
680
632
|
});
|
|
681
|
-
var Xs = Qe.default = void 0,
|
|
682
|
-
Xs = Qe.default = (0,
|
|
633
|
+
var Xs = Qe.default = void 0, Cr = Vr(tn()), Mr = Xe;
|
|
634
|
+
Xs = Qe.default = (0, Cr.default)(/* @__PURE__ */ (0, Mr.jsx)("path", {
|
|
683
635
|
d: "m10 17 5-5-5-5z"
|
|
684
636
|
}), "ArrowRight");
|
|
685
|
-
var en = {},
|
|
637
|
+
var en = {}, Dr = Ze;
|
|
686
638
|
Object.defineProperty(en, "__esModule", {
|
|
687
639
|
value: !0
|
|
688
640
|
});
|
|
689
|
-
var Qs = en.default = void 0,
|
|
690
|
-
Qs = en.default = (0,
|
|
641
|
+
var Qs = en.default = void 0, Rr = Dr(tn()), Lr = Xe;
|
|
642
|
+
Qs = en.default = (0, Rr.default)(/* @__PURE__ */ (0, Lr.jsx)("path", {
|
|
691
643
|
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"
|
|
692
644
|
}), "MenuOpenRounded");
|
|
693
|
-
var nn = {},
|
|
645
|
+
var nn = {}, Er = Ze;
|
|
694
646
|
Object.defineProperty(nn, "__esModule", {
|
|
695
647
|
value: !0
|
|
696
648
|
});
|
|
697
|
-
var Zs = nn.default = void 0,
|
|
698
|
-
Zs = nn.default = (0,
|
|
649
|
+
var Zs = nn.default = void 0, kr = Er(tn()), Br = Xe;
|
|
650
|
+
Zs = nn.default = (0, kr.default)(/* @__PURE__ */ (0, Br.jsx)("path", {
|
|
699
651
|
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"
|
|
700
652
|
}), "MenuRounded");
|
|
701
653
|
const Js = Mt({
|
|
702
654
|
transformPagePoint: (t) => t,
|
|
703
655
|
isStatic: !1,
|
|
704
656
|
reducedMotion: "never"
|
|
705
|
-
}), de = Mt({}), sn = Mt(null),
|
|
706
|
-
function
|
|
707
|
-
const { visualElement: i } =
|
|
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(), Fr = "framerAppearId", ei = "data-" + on(Fr);
|
|
658
|
+
function Or(t, e, n, s) {
|
|
659
|
+
const { visualElement: i } = U(de), r = U(ti), o = U(sn), a = U(Js).reducedMotion, l = St();
|
|
708
660
|
s = s || r.renderer, !l.current && s && (l.current = s(t, {
|
|
709
661
|
visualState: e,
|
|
710
662
|
parent: i,
|
|
@@ -718,7 +670,7 @@ function Jr(t, e, n, s) {
|
|
|
718
670
|
c && c.update(n, o);
|
|
719
671
|
});
|
|
720
672
|
const u = St(!!(n[ei] && !window.HandoffComplete));
|
|
721
|
-
return
|
|
673
|
+
return Ir(() => {
|
|
722
674
|
c && (c.render(), u.current && c.animationState && c.animationState.animateChanges());
|
|
723
675
|
}), Wt(() => {
|
|
724
676
|
c && (c.updateFeatures(), !u.current && c.animationState && c.animationState.animateChanges(), u.current && (u.current = !1, window.HandoffComplete = !0));
|
|
@@ -727,7 +679,7 @@ function Jr(t, e, n, s) {
|
|
|
727
679
|
function wt(t) {
|
|
728
680
|
return t && typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "current");
|
|
729
681
|
}
|
|
730
|
-
function
|
|
682
|
+
function jr(t, e, n) {
|
|
731
683
|
return Vo(
|
|
732
684
|
(s) => {
|
|
733
685
|
s && t.mount && t.mount(s), e && (s ? e.mount(s) : e.unmount()), n && (typeof n == "function" ? n(s) : wt(n) && (n.current = s));
|
|
@@ -740,10 +692,10 @@ function ta(t, e, n) {
|
|
|
740
692
|
[e]
|
|
741
693
|
);
|
|
742
694
|
}
|
|
743
|
-
function
|
|
695
|
+
function Ut(t) {
|
|
744
696
|
return typeof t == "string" || Array.isArray(t);
|
|
745
697
|
}
|
|
746
|
-
function
|
|
698
|
+
function pe(t) {
|
|
747
699
|
return t !== null && typeof t == "object" && typeof t.start == "function";
|
|
748
700
|
}
|
|
749
701
|
const rn = [
|
|
@@ -756,29 +708,29 @@ const rn = [
|
|
|
756
708
|
"exit"
|
|
757
709
|
], an = ["initial", ...rn];
|
|
758
710
|
function ge(t) {
|
|
759
|
-
return
|
|
711
|
+
return pe(t.animate) || an.some((e) => Ut(t[e]));
|
|
760
712
|
}
|
|
761
713
|
function ni(t) {
|
|
762
714
|
return !!(ge(t) || t.variants);
|
|
763
715
|
}
|
|
764
|
-
function
|
|
716
|
+
function Nr(t, e) {
|
|
765
717
|
if (ge(t)) {
|
|
766
718
|
const { initial: n, animate: s } = t;
|
|
767
719
|
return {
|
|
768
|
-
initial: n === !1 ||
|
|
769
|
-
animate:
|
|
720
|
+
initial: n === !1 || Ut(n) ? n : void 0,
|
|
721
|
+
animate: Ut(s) ? s : void 0
|
|
770
722
|
};
|
|
771
723
|
}
|
|
772
724
|
return t.inherit !== !1 ? e : {};
|
|
773
725
|
}
|
|
774
|
-
function
|
|
775
|
-
const { initial: e, animate: n } =
|
|
776
|
-
return he(() => ({ initial: e, animate: n }), [
|
|
726
|
+
function Ur(t) {
|
|
727
|
+
const { initial: e, animate: n } = Nr(t, U(de));
|
|
728
|
+
return he(() => ({ initial: e, animate: n }), [Fn(e), Fn(n)]);
|
|
777
729
|
}
|
|
778
|
-
function
|
|
730
|
+
function Fn(t) {
|
|
779
731
|
return Array.isArray(t) ? t.join(" ") : t;
|
|
780
732
|
}
|
|
781
|
-
const
|
|
733
|
+
const On = {
|
|
782
734
|
animation: [
|
|
783
735
|
"animate",
|
|
784
736
|
"variants",
|
|
@@ -797,56 +749,56 @@ const Fn = {
|
|
|
797
749
|
pan: ["onPan", "onPanStart", "onPanSessionStart", "onPanEnd"],
|
|
798
750
|
inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
|
|
799
751
|
layout: ["layout", "layoutId"]
|
|
800
|
-
},
|
|
801
|
-
for (const t in
|
|
802
|
-
|
|
803
|
-
isEnabled: (e) =>
|
|
752
|
+
}, _t = {};
|
|
753
|
+
for (const t in On)
|
|
754
|
+
_t[t] = {
|
|
755
|
+
isEnabled: (e) => On[t].some((n) => !!e[n])
|
|
804
756
|
};
|
|
805
|
-
function
|
|
757
|
+
function _r(t) {
|
|
806
758
|
for (const e in t)
|
|
807
|
-
|
|
808
|
-
...
|
|
759
|
+
_t[e] = {
|
|
760
|
+
..._t[e],
|
|
809
761
|
...t[e]
|
|
810
762
|
};
|
|
811
763
|
}
|
|
812
|
-
const si = Mt({}), ii = Mt({}),
|
|
813
|
-
function
|
|
814
|
-
t &&
|
|
764
|
+
const si = Mt({}), ii = Mt({}), zr = Symbol.for("motionComponentSymbol");
|
|
765
|
+
function Wr({ preloadedFeatures: t, createVisualElement: e, useRender: n, useVisualState: s, Component: i }) {
|
|
766
|
+
t && _r(t);
|
|
815
767
|
function r(a, l) {
|
|
816
768
|
let c;
|
|
817
769
|
const u = {
|
|
818
|
-
...
|
|
770
|
+
...U(Js),
|
|
819
771
|
...a,
|
|
820
|
-
layoutId:
|
|
821
|
-
}, { isStatic: h } = u, f =
|
|
822
|
-
if (!h &&
|
|
823
|
-
f.visualElement =
|
|
824
|
-
const
|
|
772
|
+
layoutId: Gr(a)
|
|
773
|
+
}, { isStatic: h } = u, f = Ur(a), d = s(a, h);
|
|
774
|
+
if (!h && me) {
|
|
775
|
+
f.visualElement = Or(i, d, u, e);
|
|
776
|
+
const m = U(ii), p = U(ti).strict;
|
|
825
777
|
f.visualElement && (c = f.visualElement.loadFeatures(
|
|
826
778
|
// Note: Pass the full new combined props to correctly re-render dynamic feature components.
|
|
827
779
|
u,
|
|
828
|
-
|
|
780
|
+
p,
|
|
829
781
|
t,
|
|
830
|
-
|
|
782
|
+
m
|
|
831
783
|
));
|
|
832
784
|
}
|
|
833
|
-
return
|
|
785
|
+
return R.createElement(
|
|
834
786
|
de.Provider,
|
|
835
787
|
{ value: f },
|
|
836
|
-
c && f.visualElement ?
|
|
837
|
-
n(i, a,
|
|
788
|
+
c && f.visualElement ? R.createElement(c, { visualElement: f.visualElement, ...u }) : null,
|
|
789
|
+
n(i, a, jr(d, f.visualElement, l), d, h, f.visualElement)
|
|
838
790
|
);
|
|
839
791
|
}
|
|
840
792
|
const o = Co(r);
|
|
841
|
-
return o[
|
|
793
|
+
return o[zr] = i, o;
|
|
842
794
|
}
|
|
843
|
-
function
|
|
844
|
-
const e =
|
|
795
|
+
function Gr({ layoutId: t }) {
|
|
796
|
+
const e = U(si).id;
|
|
845
797
|
return e && t !== void 0 ? e + "-" + t : t;
|
|
846
798
|
}
|
|
847
|
-
function
|
|
799
|
+
function $r(t) {
|
|
848
800
|
function e(s, i = {}) {
|
|
849
|
-
return
|
|
801
|
+
return Wr(t(s, i));
|
|
850
802
|
}
|
|
851
803
|
if (typeof Proxy > "u")
|
|
852
804
|
return e;
|
|
@@ -860,7 +812,7 @@ function aa(t) {
|
|
|
860
812
|
get: (s, i) => (n.has(i) || n.set(i, e(i)), n.get(i))
|
|
861
813
|
});
|
|
862
814
|
}
|
|
863
|
-
const
|
|
815
|
+
const Hr = [
|
|
864
816
|
"animate",
|
|
865
817
|
"circle",
|
|
866
818
|
"defs",
|
|
@@ -900,7 +852,7 @@ function ln(t) {
|
|
|
900
852
|
/**
|
|
901
853
|
* If it's in our list of lowercase SVG tags, it's an SVG component
|
|
902
854
|
*/
|
|
903
|
-
!!(
|
|
855
|
+
!!(Hr.indexOf(t) > -1 || /**
|
|
904
856
|
* If it contains a capital letter, it's an SVG component
|
|
905
857
|
*/
|
|
906
858
|
/[A-Z]/.test(t))
|
|
@@ -908,10 +860,10 @@ function ln(t) {
|
|
|
908
860
|
);
|
|
909
861
|
}
|
|
910
862
|
const se = {};
|
|
911
|
-
function
|
|
863
|
+
function qr(t) {
|
|
912
864
|
Object.assign(se, t);
|
|
913
865
|
}
|
|
914
|
-
const
|
|
866
|
+
const Gt = [
|
|
915
867
|
"transformPerspective",
|
|
916
868
|
"x",
|
|
917
869
|
"y",
|
|
@@ -929,50 +881,50 @@ const $t = [
|
|
|
929
881
|
"skew",
|
|
930
882
|
"skewX",
|
|
931
883
|
"skewY"
|
|
932
|
-
], gt = new Set(
|
|
884
|
+
], gt = new Set(Gt);
|
|
933
885
|
function oi(t, { layout: e, layoutId: n }) {
|
|
934
886
|
return gt.has(t) || t.startsWith("origin") || (e || n !== void 0) && (!!se[t] || t === "opacity");
|
|
935
887
|
}
|
|
936
|
-
const
|
|
888
|
+
const _ = (t) => !!(t && t.getVelocity), Kr = {
|
|
937
889
|
x: "translateX",
|
|
938
890
|
y: "translateY",
|
|
939
891
|
z: "translateZ",
|
|
940
892
|
transformPerspective: "perspective"
|
|
941
|
-
},
|
|
942
|
-
function
|
|
893
|
+
}, Yr = Gt.length;
|
|
894
|
+
function Xr(t, { enableHardwareAcceleration: e = !0, allowTransformNone: n = !0 }, s, i) {
|
|
943
895
|
let r = "";
|
|
944
|
-
for (let o = 0; o <
|
|
945
|
-
const a =
|
|
896
|
+
for (let o = 0; o < Yr; o++) {
|
|
897
|
+
const a = Gt[o];
|
|
946
898
|
if (t[a] !== void 0) {
|
|
947
|
-
const l =
|
|
899
|
+
const l = Kr[a] || a;
|
|
948
900
|
r += `${l}(${t[a]}) `;
|
|
949
901
|
}
|
|
950
902
|
}
|
|
951
903
|
return e && !t.z && (r += "translateZ(0)"), r = r.trim(), i ? r = i(t, s ? "" : r) : n && s && (r = "none"), r;
|
|
952
904
|
}
|
|
953
|
-
const ri = (t) => (e) => typeof e == "string" && e.startsWith(t), ai = ri("--"),
|
|
905
|
+
const ri = (t) => (e) => typeof e == "string" && e.startsWith(t), ai = ri("--"), Oe = 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 = {
|
|
954
906
|
test: (t) => typeof t == "number",
|
|
955
907
|
parse: parseFloat,
|
|
956
908
|
transform: (t) => t
|
|
957
|
-
},
|
|
909
|
+
}, It = {
|
|
958
910
|
...yt,
|
|
959
911
|
transform: (t) => lt(0, 1, t)
|
|
960
912
|
}, Xt = {
|
|
961
913
|
...yt,
|
|
962
914
|
default: 1
|
|
963
|
-
},
|
|
964
|
-
function
|
|
915
|
+
}, Ft = (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
|
+
function $t(t) {
|
|
965
917
|
return typeof t == "string";
|
|
966
918
|
}
|
|
967
919
|
const Ht = (t) => ({
|
|
968
|
-
test: (e) =>
|
|
920
|
+
test: (e) => $t(e) && e.endsWith(t) && e.split(" ").length === 1,
|
|
969
921
|
parse: parseFloat,
|
|
970
922
|
transform: (e) => `${e}${t}`
|
|
971
|
-
}), st = Ht("deg"), K = Ht("%"), w = Ht("px"),
|
|
923
|
+
}), st = Ht("deg"), K = Ht("%"), w = Ht("px"), ta = Ht("vh"), ea = Ht("vw"), jn = {
|
|
972
924
|
...K,
|
|
973
925
|
parse: (t) => K.parse(t) / 100,
|
|
974
926
|
transform: (t) => K.transform(t * 100)
|
|
975
|
-
},
|
|
927
|
+
}, Nn = {
|
|
976
928
|
...yt,
|
|
977
929
|
transform: Math.round
|
|
978
930
|
}, ci = {
|
|
@@ -1030,16 +982,16 @@ const Ht = (t) => ({
|
|
|
1030
982
|
z: w,
|
|
1031
983
|
perspective: w,
|
|
1032
984
|
transformPerspective: w,
|
|
1033
|
-
opacity:
|
|
1034
|
-
originX:
|
|
1035
|
-
originY:
|
|
985
|
+
opacity: It,
|
|
986
|
+
originX: jn,
|
|
987
|
+
originY: jn,
|
|
1036
988
|
originZ: w,
|
|
1037
989
|
// Misc
|
|
1038
|
-
zIndex:
|
|
990
|
+
zIndex: Nn,
|
|
1039
991
|
// SVG
|
|
1040
|
-
fillOpacity:
|
|
1041
|
-
strokeOpacity:
|
|
1042
|
-
numOctaves:
|
|
992
|
+
fillOpacity: It,
|
|
993
|
+
strokeOpacity: It,
|
|
994
|
+
numOctaves: Nn
|
|
1043
995
|
};
|
|
1044
996
|
function cn(t, e, n, s) {
|
|
1045
997
|
const { style: i, vars: r, transform: o, transformOrigin: a } = t;
|
|
@@ -1050,15 +1002,15 @@ function cn(t, e, n, s) {
|
|
|
1050
1002
|
r[h] = f;
|
|
1051
1003
|
continue;
|
|
1052
1004
|
}
|
|
1053
|
-
const d = ci[h],
|
|
1005
|
+
const d = ci[h], m = Zr(f, d);
|
|
1054
1006
|
if (gt.has(h)) {
|
|
1055
|
-
if (l = !0, o[h] =
|
|
1007
|
+
if (l = !0, o[h] = m, !u)
|
|
1056
1008
|
continue;
|
|
1057
1009
|
f !== (d.default || 0) && (u = !1);
|
|
1058
1010
|
} else
|
|
1059
|
-
h.startsWith("origin") ? (c = !0, a[h] =
|
|
1011
|
+
h.startsWith("origin") ? (c = !0, a[h] = m) : i[h] = m;
|
|
1060
1012
|
}
|
|
1061
|
-
if (e.transform || (l || s ? i.transform =
|
|
1013
|
+
if (e.transform || (l || s ? i.transform = Xr(t.transform, n, u, s) : i.transform && (i.transform = "none")), c) {
|
|
1062
1014
|
const { originX: h = "50%", originY: f = "50%", originZ: d = 0 } = a;
|
|
1063
1015
|
i.transformOrigin = `${h} ${f} ${d}`;
|
|
1064
1016
|
}
|
|
@@ -1071,23 +1023,23 @@ const un = () => ({
|
|
|
1071
1023
|
});
|
|
1072
1024
|
function ui(t, e, n) {
|
|
1073
1025
|
for (const s in e)
|
|
1074
|
-
!
|
|
1026
|
+
!_(e[s]) && !oi(s, n) && (t[s] = e[s]);
|
|
1075
1027
|
}
|
|
1076
|
-
function
|
|
1028
|
+
function na({ transformTemplate: t }, e, n) {
|
|
1077
1029
|
return he(() => {
|
|
1078
1030
|
const s = un();
|
|
1079
1031
|
return cn(s, e, { enableHardwareAcceleration: !n }, t), Object.assign({}, s.vars, s.style);
|
|
1080
1032
|
}, [e]);
|
|
1081
1033
|
}
|
|
1082
|
-
function
|
|
1034
|
+
function sa(t, e, n) {
|
|
1083
1035
|
const s = t.style || {}, i = {};
|
|
1084
|
-
return ui(i, s, t), Object.assign(i,
|
|
1036
|
+
return ui(i, s, t), Object.assign(i, na(t, e, n)), t.transformValues ? t.transformValues(i) : i;
|
|
1085
1037
|
}
|
|
1086
|
-
function
|
|
1087
|
-
const s = {}, i =
|
|
1038
|
+
function ia(t, e, n) {
|
|
1039
|
+
const s = {}, i = sa(t, e, n);
|
|
1088
1040
|
return t.drag && t.dragListener !== !1 && (s.draggable = !1, i.userSelect = i.WebkitUserSelect = i.WebkitTouchCallout = "none", i.touchAction = t.drag === !0 ? "none" : `pan-${t.drag === "x" ? "y" : "x"}`), t.tabIndex === void 0 && (t.onTap || t.onTapStart || t.whileTap) && (s.tabIndex = 0), s.style = i, s;
|
|
1089
1041
|
}
|
|
1090
|
-
const
|
|
1042
|
+
const oa = /* @__PURE__ */ new Set([
|
|
1091
1043
|
"animate",
|
|
1092
1044
|
"exit",
|
|
1093
1045
|
"variants",
|
|
@@ -1121,40 +1073,40 @@ const wa = /* @__PURE__ */ new Set([
|
|
|
1121
1073
|
"viewport"
|
|
1122
1074
|
]);
|
|
1123
1075
|
function ie(t) {
|
|
1124
|
-
return t.startsWith("while") || t.startsWith("drag") && t !== "draggable" || t.startsWith("layout") || t.startsWith("onTap") || t.startsWith("onPan") || t.startsWith("onLayout") ||
|
|
1076
|
+
return t.startsWith("while") || t.startsWith("drag") && t !== "draggable" || t.startsWith("layout") || t.startsWith("onTap") || t.startsWith("onPan") || t.startsWith("onLayout") || oa.has(t);
|
|
1125
1077
|
}
|
|
1126
1078
|
let hi = (t) => !ie(t);
|
|
1127
|
-
function
|
|
1079
|
+
function ra(t) {
|
|
1128
1080
|
t && (hi = (e) => e.startsWith("on") ? !ie(e) : t(e));
|
|
1129
1081
|
}
|
|
1130
1082
|
try {
|
|
1131
|
-
|
|
1083
|
+
ra(require("@emotion/is-prop-valid").default);
|
|
1132
1084
|
} catch {
|
|
1133
1085
|
}
|
|
1134
|
-
function
|
|
1086
|
+
function aa(t, e, n) {
|
|
1135
1087
|
const s = {};
|
|
1136
1088
|
for (const i in t)
|
|
1137
1089
|
i === "values" && typeof t.values == "object" || (hi(i) || n === !0 && ie(i) || !e && !ie(i) || // If trying to use native HTML drag events, forward drag listeners
|
|
1138
1090
|
t.draggable && i.startsWith("onDrag")) && (s[i] = t[i]);
|
|
1139
1091
|
return s;
|
|
1140
1092
|
}
|
|
1141
|
-
function
|
|
1093
|
+
function Un(t, e, n) {
|
|
1142
1094
|
return typeof t == "string" ? t : w.transform(e + n * t);
|
|
1143
1095
|
}
|
|
1144
|
-
function
|
|
1145
|
-
const s =
|
|
1096
|
+
function la(t, e, n) {
|
|
1097
|
+
const s = Un(e, t.x, t.width), i = Un(n, t.y, t.height);
|
|
1146
1098
|
return `${s} ${i}`;
|
|
1147
1099
|
}
|
|
1148
|
-
const
|
|
1100
|
+
const ca = {
|
|
1149
1101
|
offset: "stroke-dashoffset",
|
|
1150
1102
|
array: "stroke-dasharray"
|
|
1151
|
-
},
|
|
1103
|
+
}, ua = {
|
|
1152
1104
|
offset: "strokeDashoffset",
|
|
1153
1105
|
array: "strokeDasharray"
|
|
1154
1106
|
};
|
|
1155
|
-
function
|
|
1107
|
+
function ha(t, e, n = 1, s = 0, i = !0) {
|
|
1156
1108
|
t.pathLength = 1;
|
|
1157
|
-
const r = i ?
|
|
1109
|
+
const r = i ? ca : ua;
|
|
1158
1110
|
t[r.offset] = w.transform(-s);
|
|
1159
1111
|
const o = w.transform(e), a = w.transform(n);
|
|
1160
1112
|
t[r.array] = `${o} ${a}`;
|
|
@@ -1176,14 +1128,14 @@ function hn(t, {
|
|
|
1176
1128
|
return;
|
|
1177
1129
|
}
|
|
1178
1130
|
t.attrs = t.style, t.style = {};
|
|
1179
|
-
const { attrs: d, style:
|
|
1180
|
-
d.transform && (
|
|
1131
|
+
const { attrs: d, style: m, dimensions: p } = t;
|
|
1132
|
+
d.transform && (p && (m.transform = d.transform), delete d.transform), p && (i !== void 0 || r !== void 0 || m.transform) && (m.transformOrigin = la(p, i !== void 0 ? i : 0.5, r !== void 0 ? r : 0.5)), e !== void 0 && (d.x = e), n !== void 0 && (d.y = n), s !== void 0 && (d.scale = s), o !== void 0 && ha(d, o, a, l, !1);
|
|
1181
1133
|
}
|
|
1182
1134
|
const fi = () => ({
|
|
1183
1135
|
...un(),
|
|
1184
1136
|
attrs: {}
|
|
1185
1137
|
}), fn = (t) => typeof t == "string" && t.toLowerCase() === "svg";
|
|
1186
|
-
function
|
|
1138
|
+
function fa(t, e, n, s) {
|
|
1187
1139
|
const i = he(() => {
|
|
1188
1140
|
const r = fi();
|
|
1189
1141
|
return hn(r, e, { enableHardwareAcceleration: !1 }, fn(s), t.transformTemplate), {
|
|
@@ -1197,14 +1149,14 @@ function Ma(t, e, n, s) {
|
|
|
1197
1149
|
}
|
|
1198
1150
|
return i;
|
|
1199
1151
|
}
|
|
1200
|
-
function
|
|
1152
|
+
function da(t = !1) {
|
|
1201
1153
|
return (n, s, i, { latestValues: r }, o) => {
|
|
1202
|
-
const l = (ln(n) ?
|
|
1203
|
-
...
|
|
1154
|
+
const l = (ln(n) ? fa : ia)(s, r, o, n), u = {
|
|
1155
|
+
...aa(s, typeof n == "string", t),
|
|
1204
1156
|
...l,
|
|
1205
1157
|
ref: i
|
|
1206
|
-
}, { children: h } = s, f = he(() =>
|
|
1207
|
-
return
|
|
1158
|
+
}, { children: h } = s, f = he(() => _(h) ? h.get() : h, [h]);
|
|
1159
|
+
return Gs(n, {
|
|
1208
1160
|
...u,
|
|
1209
1161
|
children: f
|
|
1210
1162
|
});
|
|
@@ -1215,7 +1167,7 @@ function di(t, { style: e, vars: n }, s, i) {
|
|
|
1215
1167
|
for (const r in n)
|
|
1216
1168
|
t.style.setProperty(r, n[r]);
|
|
1217
1169
|
}
|
|
1218
|
-
const
|
|
1170
|
+
const mi = /* @__PURE__ */ new Set([
|
|
1219
1171
|
"baseFrequency",
|
|
1220
1172
|
"diffuseConstant",
|
|
1221
1173
|
"kernelMatrix",
|
|
@@ -1240,50 +1192,50 @@ const pi = /* @__PURE__ */ new Set([
|
|
|
1240
1192
|
"textLength",
|
|
1241
1193
|
"lengthAdjust"
|
|
1242
1194
|
]);
|
|
1243
|
-
function
|
|
1195
|
+
function pi(t, e, n, s) {
|
|
1244
1196
|
di(t, e, void 0, s);
|
|
1245
1197
|
for (const i in e.attrs)
|
|
1246
|
-
t.setAttribute(
|
|
1198
|
+
t.setAttribute(mi.has(i) ? i : on(i), e.attrs[i]);
|
|
1247
1199
|
}
|
|
1248
1200
|
function dn(t, e) {
|
|
1249
1201
|
const { style: n } = t, s = {};
|
|
1250
1202
|
for (const i in n)
|
|
1251
|
-
(
|
|
1203
|
+
(_(n[i]) || e.style && _(e.style[i]) || oi(i, t)) && (s[i] = n[i]);
|
|
1252
1204
|
return s;
|
|
1253
1205
|
}
|
|
1254
1206
|
function gi(t, e) {
|
|
1255
1207
|
const n = dn(t, e);
|
|
1256
1208
|
for (const s in t)
|
|
1257
|
-
if (
|
|
1258
|
-
const i =
|
|
1209
|
+
if (_(t[s]) || _(e[s])) {
|
|
1210
|
+
const i = Gt.indexOf(s) !== -1 ? "attr" + s.charAt(0).toUpperCase() + s.substring(1) : s;
|
|
1259
1211
|
n[i] = t[s];
|
|
1260
1212
|
}
|
|
1261
1213
|
return n;
|
|
1262
1214
|
}
|
|
1263
|
-
function
|
|
1215
|
+
function mn(t, e, n, s = {}, i = {}) {
|
|
1264
1216
|
return typeof e == "function" && (e = e(n !== void 0 ? n : t.custom, s, i)), typeof e == "string" && (e = t.variants && t.variants[e]), typeof e == "function" && (e = e(n !== void 0 ? n : t.custom, s, i)), e;
|
|
1265
1217
|
}
|
|
1266
|
-
function
|
|
1218
|
+
function ma(t) {
|
|
1267
1219
|
const e = St(null);
|
|
1268
1220
|
return e.current === null && (e.current = t()), e.current;
|
|
1269
1221
|
}
|
|
1270
|
-
const oe = (t) => Array.isArray(t),
|
|
1222
|
+
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;
|
|
1271
1223
|
function ee(t) {
|
|
1272
|
-
const e =
|
|
1273
|
-
return
|
|
1224
|
+
const e = _(t) ? t.get() : t;
|
|
1225
|
+
return pa(e) ? e.toValue() : e;
|
|
1274
1226
|
}
|
|
1275
|
-
function
|
|
1227
|
+
function ya({ scrapeMotionValuesFromProps: t, createRenderState: e, onMount: n }, s, i, r) {
|
|
1276
1228
|
const o = {
|
|
1277
|
-
latestValues:
|
|
1229
|
+
latestValues: va(s, i, r, t),
|
|
1278
1230
|
renderState: e()
|
|
1279
1231
|
};
|
|
1280
1232
|
return n && (o.mount = (a) => n(s, a, o)), o;
|
|
1281
1233
|
}
|
|
1282
1234
|
const yi = (t) => (e, n) => {
|
|
1283
|
-
const s =
|
|
1284
|
-
return n ? r() :
|
|
1235
|
+
const s = U(de), i = U(sn), r = () => ya(t, e, s, i);
|
|
1236
|
+
return n ? r() : ma(r);
|
|
1285
1237
|
};
|
|
1286
|
-
function
|
|
1238
|
+
function va(t, e, n, s) {
|
|
1287
1239
|
const i = {}, r = s(t, {});
|
|
1288
1240
|
for (const f in r)
|
|
1289
1241
|
i[f] = ee(r[f]);
|
|
@@ -1293,11 +1245,11 @@ function ka(t, e, n, s) {
|
|
|
1293
1245
|
let u = n ? n.initial === !1 : !1;
|
|
1294
1246
|
u = u || o === !1;
|
|
1295
1247
|
const h = u ? a : o;
|
|
1296
|
-
return h && typeof h != "boolean" && !
|
|
1297
|
-
const
|
|
1298
|
-
if (!
|
|
1248
|
+
return h && typeof h != "boolean" && !pe(h) && (Array.isArray(h) ? h : [h]).forEach((d) => {
|
|
1249
|
+
const m = mn(t, d);
|
|
1250
|
+
if (!m)
|
|
1299
1251
|
return;
|
|
1300
|
-
const { transitionEnd:
|
|
1252
|
+
const { transitionEnd: p, transition: v, ...b } = m;
|
|
1301
1253
|
for (const y in b) {
|
|
1302
1254
|
let g = b[y];
|
|
1303
1255
|
if (Array.isArray(g)) {
|
|
@@ -1306,12 +1258,12 @@ function ka(t, e, n, s) {
|
|
|
1306
1258
|
}
|
|
1307
1259
|
g !== null && (i[y] = g);
|
|
1308
1260
|
}
|
|
1309
|
-
for (const y in
|
|
1310
|
-
i[y] =
|
|
1261
|
+
for (const y in p)
|
|
1262
|
+
i[y] = p[y];
|
|
1311
1263
|
}), i;
|
|
1312
1264
|
}
|
|
1313
|
-
const
|
|
1314
|
-
class
|
|
1265
|
+
const k = (t) => t;
|
|
1266
|
+
class _n {
|
|
1315
1267
|
constructor() {
|
|
1316
1268
|
this.order = [], this.scheduled = /* @__PURE__ */ new Set();
|
|
1317
1269
|
}
|
|
@@ -1327,8 +1279,8 @@ class Un {
|
|
|
1327
1279
|
this.order.length = 0, this.scheduled.clear();
|
|
1328
1280
|
}
|
|
1329
1281
|
}
|
|
1330
|
-
function
|
|
1331
|
-
let e = new
|
|
1282
|
+
function xa(t) {
|
|
1283
|
+
let e = new _n(), n = new _n(), s = 0, i = !1, r = !1;
|
|
1332
1284
|
const o = /* @__PURE__ */ new WeakSet(), a = {
|
|
1333
1285
|
/**
|
|
1334
1286
|
* Schedule a process to run on the next frame.
|
|
@@ -1368,25 +1320,25 @@ const Qt = [
|
|
|
1368
1320
|
"preRender",
|
|
1369
1321
|
"render",
|
|
1370
1322
|
"postRender"
|
|
1371
|
-
],
|
|
1372
|
-
function
|
|
1323
|
+
], ba = 40;
|
|
1324
|
+
function wa(t, e) {
|
|
1373
1325
|
let n = !1, s = !0;
|
|
1374
1326
|
const i = {
|
|
1375
1327
|
delta: 0,
|
|
1376
1328
|
timestamp: 0,
|
|
1377
1329
|
isProcessing: !1
|
|
1378
|
-
}, r = Qt.reduce((h, f) => (h[f] =
|
|
1330
|
+
}, r = Qt.reduce((h, f) => (h[f] = xa(() => n = !0), h), {}), o = (h) => r[h].process(i), a = () => {
|
|
1379
1331
|
const h = performance.now();
|
|
1380
|
-
n = !1, i.delta = s ? 1e3 / 60 : Math.max(Math.min(h - i.timestamp,
|
|
1332
|
+
n = !1, i.delta = s ? 1e3 / 60 : Math.max(Math.min(h - i.timestamp, ba), 1), i.timestamp = h, i.isProcessing = !0, Qt.forEach(o), i.isProcessing = !1, n && e && (s = !1, t(a));
|
|
1381
1333
|
}, l = () => {
|
|
1382
1334
|
n = !0, s = !0, i.isProcessing || t(a);
|
|
1383
1335
|
};
|
|
1384
1336
|
return { schedule: Qt.reduce((h, f) => {
|
|
1385
1337
|
const d = r[f];
|
|
1386
|
-
return h[f] = (
|
|
1338
|
+
return h[f] = (m, p = !1, v = !1) => (n || l(), d.schedule(m, p, v)), h;
|
|
1387
1339
|
}, {}), cancel: (h) => Qt.forEach((f) => r[f].cancel(h)), state: i, steps: r };
|
|
1388
1340
|
}
|
|
1389
|
-
const { schedule: V, cancel: et, state: F, steps: Pe } =
|
|
1341
|
+
const { schedule: V, cancel: et, state: F, steps: Pe } = wa(typeof requestAnimationFrame < "u" ? requestAnimationFrame : k, !0), Ta = {
|
|
1390
1342
|
useVisualState: yi({
|
|
1391
1343
|
scrapeMotionValuesFromProps: gi,
|
|
1392
1344
|
createRenderState: fi,
|
|
@@ -1403,21 +1355,21 @@ const { schedule: V, cancel: et, state: F, steps: Pe } = Fa(typeof requestAnimat
|
|
|
1403
1355
|
};
|
|
1404
1356
|
}
|
|
1405
1357
|
}), V.render(() => {
|
|
1406
|
-
hn(n, s, { enableHardwareAcceleration: !1 }, fn(e.tagName), t.transformTemplate),
|
|
1358
|
+
hn(n, s, { enableHardwareAcceleration: !1 }, fn(e.tagName), t.transformTemplate), pi(e, n);
|
|
1407
1359
|
});
|
|
1408
1360
|
}
|
|
1409
1361
|
})
|
|
1410
|
-
},
|
|
1362
|
+
}, Pa = {
|
|
1411
1363
|
useVisualState: yi({
|
|
1412
1364
|
scrapeMotionValuesFromProps: dn,
|
|
1413
1365
|
createRenderState: un
|
|
1414
1366
|
})
|
|
1415
1367
|
};
|
|
1416
|
-
function
|
|
1368
|
+
function Aa(t, { forwardMotionProps: e = !1 }, n, s) {
|
|
1417
1369
|
return {
|
|
1418
|
-
...ln(t) ?
|
|
1370
|
+
...ln(t) ? Ta : Pa,
|
|
1419
1371
|
preloadedFeatures: n,
|
|
1420
|
-
useRender:
|
|
1372
|
+
useRender: da(e),
|
|
1421
1373
|
createVisualElement: s,
|
|
1422
1374
|
Component: t
|
|
1423
1375
|
};
|
|
@@ -1434,11 +1386,11 @@ function ve(t, e = "page") {
|
|
|
1434
1386
|
}
|
|
1435
1387
|
};
|
|
1436
1388
|
}
|
|
1437
|
-
const
|
|
1389
|
+
const Sa = (t) => (e) => vi(e) && t(e, ve(e));
|
|
1438
1390
|
function J(t, e, n, s) {
|
|
1439
|
-
return Z(t, e,
|
|
1391
|
+
return Z(t, e, Sa(n), s);
|
|
1440
1392
|
}
|
|
1441
|
-
const
|
|
1393
|
+
const Va = (t, e) => (n) => e(t(n)), rt = (...t) => t.reduce(Va);
|
|
1442
1394
|
function xi(t) {
|
|
1443
1395
|
let e = null;
|
|
1444
1396
|
return () => {
|
|
@@ -1474,7 +1426,7 @@ class ut {
|
|
|
1474
1426
|
update() {
|
|
1475
1427
|
}
|
|
1476
1428
|
}
|
|
1477
|
-
function
|
|
1429
|
+
function Gn(t, e) {
|
|
1478
1430
|
const n = "pointer" + (e ? "enter" : "leave"), s = "onHover" + (e ? "Start" : "End"), i = (r, o) => {
|
|
1479
1431
|
if (r.pointerType === "touch" || wi())
|
|
1480
1432
|
return;
|
|
@@ -1485,14 +1437,14 @@ function $n(t, e) {
|
|
|
1485
1437
|
passive: !t.getProps()[s]
|
|
1486
1438
|
});
|
|
1487
1439
|
}
|
|
1488
|
-
class
|
|
1440
|
+
class Ca extends ut {
|
|
1489
1441
|
mount() {
|
|
1490
|
-
this.unmount = rt(
|
|
1442
|
+
this.unmount = rt(Gn(this.node, !0), Gn(this.node, !1));
|
|
1491
1443
|
}
|
|
1492
1444
|
unmount() {
|
|
1493
1445
|
}
|
|
1494
1446
|
}
|
|
1495
|
-
class
|
|
1447
|
+
class Ma extends ut {
|
|
1496
1448
|
constructor() {
|
|
1497
1449
|
super(...arguments), this.isActive = !1;
|
|
1498
1450
|
}
|
|
@@ -1521,9 +1473,9 @@ function Ae(t, e) {
|
|
|
1521
1473
|
const n = new PointerEvent("pointer" + t);
|
|
1522
1474
|
e(n, ve(n));
|
|
1523
1475
|
}
|
|
1524
|
-
class
|
|
1476
|
+
class Da extends ut {
|
|
1525
1477
|
constructor() {
|
|
1526
|
-
super(...arguments), this.removeStartListeners =
|
|
1478
|
+
super(...arguments), this.removeStartListeners = k, this.removeEndListeners = k, this.removeAccessibleListeners = k, this.startPointerPress = (e, n) => {
|
|
1527
1479
|
if (this.isPressing)
|
|
1528
1480
|
return;
|
|
1529
1481
|
this.removeEndListeners();
|
|
@@ -1577,29 +1529,29 @@ class Ga extends ut {
|
|
|
1577
1529
|
this.removeStartListeners(), this.removeEndListeners(), this.removeAccessibleListeners();
|
|
1578
1530
|
}
|
|
1579
1531
|
}
|
|
1580
|
-
const
|
|
1581
|
-
const e =
|
|
1532
|
+
const je = /* @__PURE__ */ new WeakMap(), Se = /* @__PURE__ */ new WeakMap(), Ra = (t) => {
|
|
1533
|
+
const e = je.get(t.target);
|
|
1582
1534
|
e && e(t);
|
|
1583
|
-
},
|
|
1584
|
-
t.forEach(
|
|
1535
|
+
}, La = (t) => {
|
|
1536
|
+
t.forEach(Ra);
|
|
1585
1537
|
};
|
|
1586
|
-
function
|
|
1538
|
+
function Ea({ root: t, ...e }) {
|
|
1587
1539
|
const n = t || document;
|
|
1588
1540
|
Se.has(n) || Se.set(n, {});
|
|
1589
1541
|
const s = Se.get(n), i = JSON.stringify(e);
|
|
1590
|
-
return s[i] || (s[i] = new IntersectionObserver(
|
|
1542
|
+
return s[i] || (s[i] = new IntersectionObserver(La, { root: t, ...e })), s[i];
|
|
1591
1543
|
}
|
|
1592
|
-
function
|
|
1593
|
-
const s =
|
|
1594
|
-
return
|
|
1595
|
-
|
|
1544
|
+
function ka(t, e, n) {
|
|
1545
|
+
const s = Ea(e);
|
|
1546
|
+
return je.set(t, n), s.observe(t), () => {
|
|
1547
|
+
je.delete(t), s.unobserve(t);
|
|
1596
1548
|
};
|
|
1597
1549
|
}
|
|
1598
|
-
const
|
|
1550
|
+
const Ba = {
|
|
1599
1551
|
some: 0,
|
|
1600
1552
|
all: 1
|
|
1601
1553
|
};
|
|
1602
|
-
class
|
|
1554
|
+
class Ia extends ut {
|
|
1603
1555
|
constructor() {
|
|
1604
1556
|
super(...arguments), this.hasEnteredView = !1, this.isInView = !1;
|
|
1605
1557
|
}
|
|
@@ -1608,7 +1560,7 @@ class Qa extends ut {
|
|
|
1608
1560
|
const { viewport: e = {} } = this.node.getProps(), { root: n, margin: s, amount: i = "some", once: r } = e, o = {
|
|
1609
1561
|
root: n ? n.current : void 0,
|
|
1610
1562
|
rootMargin: s,
|
|
1611
|
-
threshold: typeof i == "number" ? i :
|
|
1563
|
+
threshold: typeof i == "number" ? i : Ba[i]
|
|
1612
1564
|
}, a = (l) => {
|
|
1613
1565
|
const { isIntersecting: c } = l;
|
|
1614
1566
|
if (this.isInView === c || (this.isInView = c, r && !c && this.hasEnteredView))
|
|
@@ -1617,7 +1569,7 @@ class Qa extends ut {
|
|
|
1617
1569
|
const { onViewportEnter: u, onViewportLeave: h } = this.node.getProps(), f = c ? u : h;
|
|
1618
1570
|
f && f(l);
|
|
1619
1571
|
};
|
|
1620
|
-
return
|
|
1572
|
+
return ka(this.node.current, o, a);
|
|
1621
1573
|
}
|
|
1622
1574
|
mount() {
|
|
1623
1575
|
this.startObserver();
|
|
@@ -1626,26 +1578,26 @@ class Qa extends ut {
|
|
|
1626
1578
|
if (typeof IntersectionObserver > "u")
|
|
1627
1579
|
return;
|
|
1628
1580
|
const { props: e, prevProps: n } = this.node;
|
|
1629
|
-
["amount", "margin", "root"].some(
|
|
1581
|
+
["amount", "margin", "root"].some(Fa(e, n)) && this.startObserver();
|
|
1630
1582
|
}
|
|
1631
1583
|
unmount() {
|
|
1632
1584
|
}
|
|
1633
1585
|
}
|
|
1634
|
-
function
|
|
1586
|
+
function Fa({ viewport: t = {} }, { viewport: e = {} } = {}) {
|
|
1635
1587
|
return (n) => t[n] !== e[n];
|
|
1636
1588
|
}
|
|
1637
|
-
const
|
|
1589
|
+
const Oa = {
|
|
1638
1590
|
inView: {
|
|
1639
|
-
Feature:
|
|
1591
|
+
Feature: Ia
|
|
1640
1592
|
},
|
|
1641
1593
|
tap: {
|
|
1642
|
-
Feature:
|
|
1594
|
+
Feature: Da
|
|
1643
1595
|
},
|
|
1644
1596
|
focus: {
|
|
1645
|
-
Feature:
|
|
1597
|
+
Feature: Ma
|
|
1646
1598
|
},
|
|
1647
1599
|
hover: {
|
|
1648
|
-
Feature:
|
|
1600
|
+
Feature: Ca
|
|
1649
1601
|
}
|
|
1650
1602
|
};
|
|
1651
1603
|
function Pi(t, e) {
|
|
@@ -1659,47 +1611,47 @@ function Pi(t, e) {
|
|
|
1659
1611
|
return !1;
|
|
1660
1612
|
return !0;
|
|
1661
1613
|
}
|
|
1662
|
-
function
|
|
1614
|
+
function ja(t) {
|
|
1663
1615
|
const e = {};
|
|
1664
1616
|
return t.values.forEach((n, s) => e[s] = n.get()), e;
|
|
1665
1617
|
}
|
|
1666
|
-
function
|
|
1618
|
+
function Na(t) {
|
|
1667
1619
|
const e = {};
|
|
1668
1620
|
return t.values.forEach((n, s) => e[s] = n.getVelocity()), e;
|
|
1669
1621
|
}
|
|
1670
1622
|
function xe(t, e, n) {
|
|
1671
1623
|
const s = t.getProps();
|
|
1672
|
-
return
|
|
1624
|
+
return mn(s, e, n !== void 0 ? n : s.custom, ja(t), Na(t));
|
|
1673
1625
|
}
|
|
1674
|
-
let qt =
|
|
1626
|
+
let qt = k, q = k;
|
|
1675
1627
|
process.env.NODE_ENV !== "production" && (qt = (t, e) => {
|
|
1676
1628
|
!t && typeof console < "u" && console.warn(e);
|
|
1677
1629
|
}, q = (t, e) => {
|
|
1678
1630
|
if (!t)
|
|
1679
1631
|
throw new Error(e);
|
|
1680
1632
|
});
|
|
1681
|
-
const at = (t) => t * 1e3, tt = (t) => t / 1e3,
|
|
1633
|
+
const at = (t) => t * 1e3, tt = (t) => t / 1e3, Ua = {
|
|
1682
1634
|
current: !1
|
|
1683
1635
|
}, Ai = (t) => Array.isArray(t) && typeof t[0] == "number";
|
|
1684
1636
|
function Si(t) {
|
|
1685
1637
|
return !!(!t || typeof t == "string" && Vi[t] || Ai(t) || Array.isArray(t) && t.every(Si));
|
|
1686
1638
|
}
|
|
1687
|
-
const
|
|
1639
|
+
const Bt = ([t, e, n, s]) => `cubic-bezier(${t}, ${e}, ${n}, ${s})`, Vi = {
|
|
1688
1640
|
linear: "linear",
|
|
1689
1641
|
ease: "ease",
|
|
1690
1642
|
easeIn: "ease-in",
|
|
1691
1643
|
easeOut: "ease-out",
|
|
1692
1644
|
easeInOut: "ease-in-out",
|
|
1693
|
-
circIn:
|
|
1694
|
-
circOut:
|
|
1695
|
-
backIn:
|
|
1696
|
-
backOut:
|
|
1645
|
+
circIn: Bt([0, 0.65, 0.55, 1]),
|
|
1646
|
+
circOut: Bt([0.55, 0, 1, 0.45]),
|
|
1647
|
+
backIn: Bt([0.31, 0.01, 0.66, -0.59]),
|
|
1648
|
+
backOut: Bt([0.33, 1.53, 0.69, 0.99])
|
|
1697
1649
|
};
|
|
1698
1650
|
function Ci(t) {
|
|
1699
1651
|
if (t)
|
|
1700
|
-
return Ai(t) ?
|
|
1652
|
+
return Ai(t) ? Bt(t) : Array.isArray(t) ? t.map(Ci) : Vi[t];
|
|
1701
1653
|
}
|
|
1702
|
-
function
|
|
1654
|
+
function _a(t, e, n, { delay: s = 0, duration: i, repeat: r = 0, repeatType: o = "loop", ease: a, times: l } = {}) {
|
|
1703
1655
|
const c = { [e]: n };
|
|
1704
1656
|
l && (c.offset = l);
|
|
1705
1657
|
const u = Ci(a);
|
|
@@ -1712,46 +1664,46 @@ function sl(t, e, n, { delay: s = 0, duration: i, repeat: r = 0, repeatType: o =
|
|
|
1712
1664
|
direction: o === "reverse" ? "alternate" : "normal"
|
|
1713
1665
|
});
|
|
1714
1666
|
}
|
|
1715
|
-
function
|
|
1667
|
+
function za(t, { repeat: e, repeatType: n = "loop" }) {
|
|
1716
1668
|
const s = e && n !== "loop" && e % 2 === 1 ? 0 : t.length - 1;
|
|
1717
1669
|
return t[s];
|
|
1718
1670
|
}
|
|
1719
|
-
const Mi = (t, e, n) => (((1 - 3 * n + 3 * e) * t + (3 * n - 6 * e)) * t + 3 * e) * t,
|
|
1720
|
-
function
|
|
1671
|
+
const Mi = (t, e, n) => (((1 - 3 * n + 3 * e) * t + (3 * n - 6 * e)) * t + 3 * e) * t, Wa = 1e-7, Ga = 12;
|
|
1672
|
+
function $a(t, e, n, s, i) {
|
|
1721
1673
|
let r, o, a = 0;
|
|
1722
1674
|
do
|
|
1723
1675
|
o = e + (n - e) / 2, r = Mi(o, s, i) - t, r > 0 ? n = o : e = o;
|
|
1724
|
-
while (Math.abs(r) >
|
|
1676
|
+
while (Math.abs(r) > Wa && ++a < Ga);
|
|
1725
1677
|
return o;
|
|
1726
1678
|
}
|
|
1727
1679
|
function Kt(t, e, n, s) {
|
|
1728
1680
|
if (t === e && n === s)
|
|
1729
|
-
return
|
|
1730
|
-
const i = (r) =>
|
|
1681
|
+
return k;
|
|
1682
|
+
const i = (r) => $a(r, 0, 1, t, n);
|
|
1731
1683
|
return (r) => r === 0 || r === 1 ? r : Mi(i(r), e, s);
|
|
1732
1684
|
}
|
|
1733
|
-
const
|
|
1734
|
-
linear:
|
|
1735
|
-
easeIn:
|
|
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, Li = (t) => (e) => 1 - t(1 - e), pn = (t) => 1 - Math.sin(Math.acos(t)), Ei = Li(pn), Ya = Ri(pn), ki = Kt(0.33, 1.53, 0.69, 0.99), gn = Li(ki), Xa = Ri(gn), Qa = (t) => (t *= 2) < 1 ? 0.5 * gn(t) : 0.5 * (2 - Math.pow(2, -10 * (t - 1))), $n = {
|
|
1686
|
+
linear: k,
|
|
1687
|
+
easeIn: Ha,
|
|
1736
1688
|
easeInOut: Di,
|
|
1737
|
-
easeOut:
|
|
1738
|
-
circIn:
|
|
1739
|
-
circInOut:
|
|
1740
|
-
circOut:
|
|
1689
|
+
easeOut: qa,
|
|
1690
|
+
circIn: pn,
|
|
1691
|
+
circInOut: Ya,
|
|
1692
|
+
circOut: Ei,
|
|
1741
1693
|
backIn: gn,
|
|
1742
|
-
backInOut:
|
|
1743
|
-
backOut:
|
|
1744
|
-
anticipate:
|
|
1694
|
+
backInOut: Xa,
|
|
1695
|
+
backOut: ki,
|
|
1696
|
+
anticipate: Qa
|
|
1745
1697
|
}, Hn = (t) => {
|
|
1746
1698
|
if (Array.isArray(t)) {
|
|
1747
1699
|
q(t.length === 4, "Cubic bezier arrays must contain four numerical values.");
|
|
1748
1700
|
const [e, n, s, i] = t;
|
|
1749
1701
|
return Kt(e, n, s, i);
|
|
1750
1702
|
} else if (typeof t == "string")
|
|
1751
|
-
return q(
|
|
1703
|
+
return q($n[t] !== void 0, `Invalid easing type '${t}'`), $n[t];
|
|
1752
1704
|
return t;
|
|
1753
|
-
}, yn = (t, e) => (n) => !!(
|
|
1754
|
-
if (
|
|
1705
|
+
}, yn = (t, e) => (n) => !!($t(n) && Jr.test(n) && n.startsWith(t) || e && Object.prototype.hasOwnProperty.call(n, e)), Bi = (t, e, n) => (s) => {
|
|
1706
|
+
if (!$t(s))
|
|
1755
1707
|
return s;
|
|
1756
1708
|
const [i, r, o, a] = s.match(ye);
|
|
1757
1709
|
return {
|
|
@@ -1760,15 +1712,15 @@ const ll = Kt(0.42, 0, 1, 1), cl = Kt(0, 0, 0.58, 1), Di = Kt(0.42, 0, 0.58, 1),
|
|
|
1760
1712
|
[n]: parseFloat(o),
|
|
1761
1713
|
alpha: a !== void 0 ? parseFloat(a) : 1
|
|
1762
1714
|
};
|
|
1763
|
-
},
|
|
1715
|
+
}, Za = (t) => lt(0, 255, t), Ve = {
|
|
1764
1716
|
...yt,
|
|
1765
|
-
transform: (t) => Math.round(
|
|
1766
|
-
},
|
|
1717
|
+
transform: (t) => Math.round(Za(t))
|
|
1718
|
+
}, pt = {
|
|
1767
1719
|
test: yn("rgb", "red"),
|
|
1768
|
-
parse:
|
|
1769
|
-
transform: ({ red: t, green: e, blue: n, alpha: s = 1 }) => "rgba(" + Ve.transform(t) + ", " + Ve.transform(e) + ", " + Ve.transform(n) + ", " + It
|
|
1720
|
+
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) + ", " + Ft(It.transform(s)) + ")"
|
|
1770
1722
|
};
|
|
1771
|
-
function
|
|
1723
|
+
function Ja(t) {
|
|
1772
1724
|
let e = "", n = "", s = "", i = "";
|
|
1773
1725
|
return t.length > 5 ? (e = t.substring(1, 3), n = t.substring(3, 5), s = t.substring(5, 7), i = t.substring(7, 9)) : (e = t.substring(1, 2), n = t.substring(2, 3), s = t.substring(3, 4), i = t.substring(4, 5), e += e, n += n, s += s, i += i), {
|
|
1774
1726
|
red: parseInt(e, 16),
|
|
@@ -1777,23 +1729,23 @@ function ml(t) {
|
|
|
1777
1729
|
alpha: i ? parseInt(i, 16) / 255 : 1
|
|
1778
1730
|
};
|
|
1779
1731
|
}
|
|
1780
|
-
const
|
|
1732
|
+
const Ne = {
|
|
1781
1733
|
test: yn("#"),
|
|
1782
|
-
parse:
|
|
1783
|
-
transform:
|
|
1734
|
+
parse: Ja,
|
|
1735
|
+
transform: pt.transform
|
|
1784
1736
|
}, Tt = {
|
|
1785
1737
|
test: yn("hsl", "hue"),
|
|
1786
|
-
parse:
|
|
1787
|
-
transform: ({ hue: t, saturation: e, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(t) + ", " + K.transform(
|
|
1788
|
-
},
|
|
1789
|
-
test: (t) =>
|
|
1790
|
-
parse: (t) =>
|
|
1791
|
-
transform: (t) =>
|
|
1792
|
-
},
|
|
1738
|
+
parse: Bi("hue", "saturation", "lightness"),
|
|
1739
|
+
transform: ({ hue: t, saturation: e, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(t) + ", " + K.transform(Ft(e)) + ", " + K.transform(Ft(n)) + ", " + Ft(It.transform(s)) + ")"
|
|
1740
|
+
}, N = {
|
|
1741
|
+
test: (t) => pt.test(t) || Ne.test(t) || Tt.test(t),
|
|
1742
|
+
parse: (t) => pt.test(t) ? pt.parse(t) : Tt.test(t) ? Tt.parse(t) : Ne.parse(t),
|
|
1743
|
+
transform: (t) => $t(t) ? t : t.hasOwnProperty("red") ? pt.transform(t) : Tt.transform(t)
|
|
1744
|
+
}, L = (t, e, n) => -n * t + n * e + t;
|
|
1793
1745
|
function Ce(t, e, n) {
|
|
1794
1746
|
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;
|
|
1795
1747
|
}
|
|
1796
|
-
function
|
|
1748
|
+
function tl({ hue: t, saturation: e, lightness: n, alpha: s }) {
|
|
1797
1749
|
t /= 360, e /= 100, n /= 100;
|
|
1798
1750
|
let i = 0, r = 0, o = 0;
|
|
1799
1751
|
if (!e)
|
|
@@ -1812,32 +1764,32 @@ function gl({ hue: t, saturation: e, lightness: n, alpha: s }) {
|
|
|
1812
1764
|
const Me = (t, e, n) => {
|
|
1813
1765
|
const s = t * t;
|
|
1814
1766
|
return Math.sqrt(Math.max(0, n * (e * e - s) + s));
|
|
1815
|
-
},
|
|
1767
|
+
}, el = [Ne, pt, Tt], nl = (t) => el.find((e) => e.test(t));
|
|
1816
1768
|
function qn(t) {
|
|
1817
|
-
const e =
|
|
1769
|
+
const e = nl(t);
|
|
1818
1770
|
q(!!e, `'${t}' is not an animatable color. Use the equivalent color code instead.`);
|
|
1819
1771
|
let n = e.parse(t);
|
|
1820
|
-
return e === Tt && (n =
|
|
1772
|
+
return e === Tt && (n = tl(n)), n;
|
|
1821
1773
|
}
|
|
1822
|
-
const
|
|
1774
|
+
const Ii = (t, e) => {
|
|
1823
1775
|
const n = qn(t), s = qn(e), i = { ...n };
|
|
1824
|
-
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 =
|
|
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 = L(n.alpha, s.alpha, r), pt.transform(i));
|
|
1825
1777
|
};
|
|
1826
|
-
function
|
|
1778
|
+
function sl(t) {
|
|
1827
1779
|
var e, n;
|
|
1828
|
-
return isNaN(t) &&
|
|
1780
|
+
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;
|
|
1829
1781
|
}
|
|
1830
|
-
const
|
|
1831
|
-
regex:
|
|
1782
|
+
const Fi = {
|
|
1783
|
+
regex: Qr,
|
|
1832
1784
|
countKey: "Vars",
|
|
1833
1785
|
token: "${v}",
|
|
1834
|
-
parse:
|
|
1835
|
-
},
|
|
1786
|
+
parse: k
|
|
1787
|
+
}, Oi = {
|
|
1836
1788
|
regex: li,
|
|
1837
1789
|
countKey: "Colors",
|
|
1838
1790
|
token: "${c}",
|
|
1839
|
-
parse:
|
|
1840
|
-
},
|
|
1791
|
+
parse: N.parse
|
|
1792
|
+
}, ji = {
|
|
1841
1793
|
regex: ye,
|
|
1842
1794
|
countKey: "Numbers",
|
|
1843
1795
|
token: "${n}",
|
|
@@ -1856,33 +1808,33 @@ function re(t) {
|
|
|
1856
1808
|
numColors: 0,
|
|
1857
1809
|
numNumbers: 0
|
|
1858
1810
|
};
|
|
1859
|
-
return n.value.includes("var(--") && De(n,
|
|
1811
|
+
return n.value.includes("var(--") && De(n, Fi), De(n, Oi), De(n, ji), n;
|
|
1860
1812
|
}
|
|
1861
|
-
function
|
|
1813
|
+
function Ni(t) {
|
|
1862
1814
|
return re(t).values;
|
|
1863
1815
|
}
|
|
1864
|
-
function
|
|
1816
|
+
function Ui(t) {
|
|
1865
1817
|
const { values: e, numColors: n, numVars: s, tokenised: i } = re(t), r = e.length;
|
|
1866
1818
|
return (o) => {
|
|
1867
1819
|
let a = i;
|
|
1868
1820
|
for (let l = 0; l < r; l++)
|
|
1869
|
-
l < s ? a = a.replace(
|
|
1821
|
+
l < s ? a = a.replace(Fi.token, o[l]) : l < s + n ? a = a.replace(Oi.token, N.transform(o[l])) : a = a.replace(ji.token, Ft(o[l]));
|
|
1870
1822
|
return a;
|
|
1871
1823
|
};
|
|
1872
1824
|
}
|
|
1873
|
-
const
|
|
1874
|
-
function
|
|
1875
|
-
const e =
|
|
1876
|
-
return
|
|
1825
|
+
const il = (t) => typeof t == "number" ? 0 : t;
|
|
1826
|
+
function ol(t) {
|
|
1827
|
+
const e = Ni(t);
|
|
1828
|
+
return Ui(t)(e.map(il));
|
|
1877
1829
|
}
|
|
1878
1830
|
const ct = {
|
|
1879
|
-
test:
|
|
1880
|
-
parse:
|
|
1881
|
-
createTransformer:
|
|
1882
|
-
getAnimatableNone:
|
|
1883
|
-
},
|
|
1831
|
+
test: sl,
|
|
1832
|
+
parse: Ni,
|
|
1833
|
+
createTransformer: Ui,
|
|
1834
|
+
getAnimatableNone: ol
|
|
1835
|
+
}, _i = (t, e) => (n) => `${n > 0 ? e : t}`;
|
|
1884
1836
|
function zi(t, e) {
|
|
1885
|
-
return typeof t == "number" ? (n) =>
|
|
1837
|
+
return typeof t == "number" ? (n) => L(t, e, n) : N.test(t) ? Ii(t, e) : t.startsWith("var(") ? _i(t, e) : Gi(t, e);
|
|
1886
1838
|
}
|
|
1887
1839
|
const Wi = (t, e) => {
|
|
1888
1840
|
const n = [...t], s = n.length, i = t.map((r, o) => zi(r, e[o]));
|
|
@@ -1891,7 +1843,7 @@ const Wi = (t, e) => {
|
|
|
1891
1843
|
n[o] = i[o](r);
|
|
1892
1844
|
return n;
|
|
1893
1845
|
};
|
|
1894
|
-
},
|
|
1846
|
+
}, rl = (t, e) => {
|
|
1895
1847
|
const n = { ...t, ...e }, s = {};
|
|
1896
1848
|
for (const i in n)
|
|
1897
1849
|
t[i] !== void 0 && e[i] !== void 0 && (s[i] = zi(t[i], e[i]));
|
|
@@ -1900,34 +1852,34 @@ const Wi = (t, e) => {
|
|
|
1900
1852
|
n[r] = s[r](i);
|
|
1901
1853
|
return n;
|
|
1902
1854
|
};
|
|
1903
|
-
},
|
|
1855
|
+
}, Gi = (t, e) => {
|
|
1904
1856
|
const n = ct.createTransformer(e), s = re(t), i = re(e);
|
|
1905
|
-
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.`),
|
|
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.`), _i(t, e));
|
|
1906
1858
|
}, zt = (t, e, n) => {
|
|
1907
1859
|
const s = e - t;
|
|
1908
1860
|
return s === 0 ? 1 : (n - t) / s;
|
|
1909
|
-
}, Kn = (t, e) => (n) =>
|
|
1910
|
-
function
|
|
1911
|
-
return typeof t == "number" ? Kn : typeof t == "string" ?
|
|
1861
|
+
}, Kn = (t, e) => (n) => L(t, e, n);
|
|
1862
|
+
function al(t) {
|
|
1863
|
+
return typeof t == "number" ? Kn : typeof t == "string" ? N.test(t) ? Ii : Gi : Array.isArray(t) ? Wi : typeof t == "object" ? rl : Kn;
|
|
1912
1864
|
}
|
|
1913
|
-
function
|
|
1914
|
-
const s = [], i = n ||
|
|
1865
|
+
function ll(t, e, n) {
|
|
1866
|
+
const s = [], i = n || al(t[0]), r = t.length - 1;
|
|
1915
1867
|
for (let o = 0; o < r; o++) {
|
|
1916
1868
|
let a = i(t[o], t[o + 1]);
|
|
1917
1869
|
if (e) {
|
|
1918
|
-
const l = Array.isArray(e) ? e[o] ||
|
|
1870
|
+
const l = Array.isArray(e) ? e[o] || k : e;
|
|
1919
1871
|
a = rt(l, a);
|
|
1920
1872
|
}
|
|
1921
1873
|
s.push(a);
|
|
1922
1874
|
}
|
|
1923
1875
|
return s;
|
|
1924
1876
|
}
|
|
1925
|
-
function
|
|
1877
|
+
function $i(t, e, { clamp: n = !0, ease: s, mixer: i } = {}) {
|
|
1926
1878
|
const r = t.length;
|
|
1927
1879
|
if (q(r === e.length, "Both input and output ranges must be the same length"), r === 1)
|
|
1928
1880
|
return () => e[0];
|
|
1929
1881
|
t[0] > t[r - 1] && (t = [...t].reverse(), e = [...e].reverse());
|
|
1930
|
-
const o =
|
|
1882
|
+
const o = ll(e, s, i), a = o.length, l = (c) => {
|
|
1931
1883
|
let u = 0;
|
|
1932
1884
|
if (a > 1)
|
|
1933
1885
|
for (; u < t.length - 2 && !(c < t[u + 1]); u++)
|
|
@@ -1937,34 +1889,34 @@ function Gi(t, e, { clamp: n = !0, ease: s, mixer: i } = {}) {
|
|
|
1937
1889
|
};
|
|
1938
1890
|
return n ? (c) => l(lt(t[0], t[r - 1], c)) : l;
|
|
1939
1891
|
}
|
|
1940
|
-
function
|
|
1892
|
+
function cl(t, e) {
|
|
1941
1893
|
const n = t[t.length - 1];
|
|
1942
1894
|
for (let s = 1; s <= e; s++) {
|
|
1943
1895
|
const i = zt(0, e, s);
|
|
1944
|
-
t.push(
|
|
1896
|
+
t.push(L(n, 1, i));
|
|
1945
1897
|
}
|
|
1946
1898
|
}
|
|
1947
|
-
function
|
|
1899
|
+
function ul(t) {
|
|
1948
1900
|
const e = [0];
|
|
1949
|
-
return
|
|
1901
|
+
return cl(e, t.length - 1), e;
|
|
1950
1902
|
}
|
|
1951
|
-
function
|
|
1903
|
+
function hl(t, e) {
|
|
1952
1904
|
return t.map((n) => n * e);
|
|
1953
1905
|
}
|
|
1954
|
-
function
|
|
1906
|
+
function fl(t, e) {
|
|
1955
1907
|
return t.map(() => e || Di).splice(0, t.length - 1);
|
|
1956
1908
|
}
|
|
1957
1909
|
function ae({ duration: t = 300, keyframes: e, times: n, ease: s = "easeInOut" }) {
|
|
1958
|
-
const i =
|
|
1910
|
+
const i = Ka(s) ? s.map(Hn) : Hn(s), r = {
|
|
1959
1911
|
done: !1,
|
|
1960
1912
|
value: e[0]
|
|
1961
|
-
}, o =
|
|
1913
|
+
}, o = hl(
|
|
1962
1914
|
// Only use the provided offsets if they're the correct length
|
|
1963
1915
|
// TODO Maybe we should warn here if there's a length mismatch
|
|
1964
|
-
n && n.length === e.length ? n :
|
|
1916
|
+
n && n.length === e.length ? n : ul(e),
|
|
1965
1917
|
t
|
|
1966
|
-
), a =
|
|
1967
|
-
ease: Array.isArray(i) ? i :
|
|
1918
|
+
), a = $i(o, e, {
|
|
1919
|
+
ease: Array.isArray(i) ? i : fl(e, i)
|
|
1968
1920
|
});
|
|
1969
1921
|
return {
|
|
1970
1922
|
calculatedDuration: t,
|
|
@@ -1974,30 +1926,30 @@ function ae({ duration: t = 300, keyframes: e, times: n, ease: s = "easeInOut" }
|
|
|
1974
1926
|
function Hi(t, e) {
|
|
1975
1927
|
return e ? t * (1e3 / e) : 0;
|
|
1976
1928
|
}
|
|
1977
|
-
const
|
|
1929
|
+
const dl = 5;
|
|
1978
1930
|
function qi(t, e, n) {
|
|
1979
|
-
const s = Math.max(e -
|
|
1931
|
+
const s = Math.max(e - dl, 0);
|
|
1980
1932
|
return Hi(n - t(s), e - s);
|
|
1981
1933
|
}
|
|
1982
|
-
const
|
|
1983
|
-
function
|
|
1934
|
+
const Re = 1e-3, ml = 0.01, Yn = 10, pl = 0.05, gl = 1;
|
|
1935
|
+
function yl({ duration: t = 800, bounce: e = 0.25, velocity: n = 0, mass: s = 1 }) {
|
|
1984
1936
|
let i, r;
|
|
1985
1937
|
qt(t <= at(Yn), "Spring duration must be 10 seconds or less");
|
|
1986
1938
|
let o = 1 - e;
|
|
1987
|
-
o = lt(
|
|
1988
|
-
const u = c * o, h = u * t, f = u - n, d =
|
|
1989
|
-
return
|
|
1939
|
+
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 = Ue(c, o), m = Math.exp(-h);
|
|
1941
|
+
return Re - f / d * m;
|
|
1990
1942
|
}, r = (c) => {
|
|
1991
|
-
const h = c * o * t, f = h * n + n, d = Math.pow(o, 2) * Math.pow(c, 2) * t,
|
|
1992
|
-
return (-i(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 = Ue(Math.pow(c, 2), o);
|
|
1944
|
+
return (-i(c) + Re > 0 ? -1 : 1) * ((f - d) * m) / p;
|
|
1993
1945
|
}) : (i = (c) => {
|
|
1994
1946
|
const u = Math.exp(-c * t), h = (c - n) * t + 1;
|
|
1995
|
-
return -
|
|
1947
|
+
return -Re + u * h;
|
|
1996
1948
|
}, r = (c) => {
|
|
1997
1949
|
const u = Math.exp(-c * t), h = (n - c) * (t * t);
|
|
1998
1950
|
return u * h;
|
|
1999
1951
|
});
|
|
2000
|
-
const a = 5 / t, l =
|
|
1952
|
+
const a = 5 / t, l = xl(i, r, a);
|
|
2001
1953
|
if (t = at(t), isNaN(l))
|
|
2002
1954
|
return {
|
|
2003
1955
|
stiffness: 100,
|
|
@@ -2013,21 +1965,21 @@ function El({ duration: t = 800, bounce: e = 0.25, velocity: n = 0, mass: s = 1
|
|
|
2013
1965
|
};
|
|
2014
1966
|
}
|
|
2015
1967
|
}
|
|
2016
|
-
const
|
|
2017
|
-
function
|
|
1968
|
+
const vl = 12;
|
|
1969
|
+
function xl(t, e, n) {
|
|
2018
1970
|
let s = n;
|
|
2019
|
-
for (let i = 1; i <
|
|
1971
|
+
for (let i = 1; i < vl; i++)
|
|
2020
1972
|
s = s - t(s) / e(s);
|
|
2021
1973
|
return s;
|
|
2022
1974
|
}
|
|
2023
|
-
function
|
|
1975
|
+
function Ue(t, e) {
|
|
2024
1976
|
return t * Math.sqrt(1 - e * e);
|
|
2025
1977
|
}
|
|
2026
|
-
const
|
|
1978
|
+
const bl = ["duration", "bounce"], wl = ["stiffness", "damping", "mass"];
|
|
2027
1979
|
function Xn(t, e) {
|
|
2028
1980
|
return e.some((n) => t[n] !== void 0);
|
|
2029
1981
|
}
|
|
2030
|
-
function
|
|
1982
|
+
function Tl(t) {
|
|
2031
1983
|
let e = {
|
|
2032
1984
|
velocity: 0,
|
|
2033
1985
|
stiffness: 100,
|
|
@@ -2036,8 +1988,8 @@ function Ol(t) {
|
|
|
2036
1988
|
isResolvedFromDuration: !1,
|
|
2037
1989
|
...t
|
|
2038
1990
|
};
|
|
2039
|
-
if (!Xn(t,
|
|
2040
|
-
const n =
|
|
1991
|
+
if (!Xn(t, wl) && Xn(t, bl)) {
|
|
1992
|
+
const n = yl(t);
|
|
2041
1993
|
e = {
|
|
2042
1994
|
...e,
|
|
2043
1995
|
...n,
|
|
@@ -2047,25 +1999,25 @@ function Ol(t) {
|
|
|
2047
1999
|
return e;
|
|
2048
2000
|
}
|
|
2049
2001
|
function Ki({ keyframes: t, restDelta: e, restSpeed: n, ...s }) {
|
|
2050
|
-
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 } =
|
|
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 } = Tl({
|
|
2051
2003
|
...s,
|
|
2052
2004
|
velocity: -tt(s.velocity || 0)
|
|
2053
|
-
}), d = h || 0,
|
|
2005
|
+
}), d = h || 0, m = l / (2 * Math.sqrt(a * c)), p = r - i, v = tt(Math.sqrt(a / c)), b = Math.abs(p) < 5;
|
|
2054
2006
|
n || (n = b ? 0.01 : 2), e || (e = b ? 5e-3 : 0.5);
|
|
2055
2007
|
let y;
|
|
2056
|
-
if (
|
|
2057
|
-
const g =
|
|
2008
|
+
if (m < 1) {
|
|
2009
|
+
const g = Ue(v, m);
|
|
2058
2010
|
y = (x) => {
|
|
2059
|
-
const P = Math.exp(-
|
|
2060
|
-
return r - P * ((d +
|
|
2011
|
+
const P = Math.exp(-m * v * x);
|
|
2012
|
+
return r - P * ((d + m * v * p) / g * Math.sin(g * x) + p * Math.cos(g * x));
|
|
2061
2013
|
};
|
|
2062
|
-
} else if (
|
|
2063
|
-
y = (g) => r - Math.exp(-v * g) * (
|
|
2014
|
+
} else if (m === 1)
|
|
2015
|
+
y = (g) => r - Math.exp(-v * g) * (p + (d + v * p) * g);
|
|
2064
2016
|
else {
|
|
2065
|
-
const g = v * Math.sqrt(
|
|
2017
|
+
const g = v * Math.sqrt(m * m - 1);
|
|
2066
2018
|
y = (x) => {
|
|
2067
|
-
const P = Math.exp(-
|
|
2068
|
-
return r - P * ((d +
|
|
2019
|
+
const P = Math.exp(-m * v * x), S = Math.min(g * x, 300);
|
|
2020
|
+
return r - P * ((d + m * v * p) * Math.sinh(S) + g * p * Math.cosh(S)) / g;
|
|
2069
2021
|
};
|
|
2070
2022
|
}
|
|
2071
2023
|
return {
|
|
@@ -2076,7 +2028,7 @@ function Ki({ keyframes: t, restDelta: e, restSpeed: n, ...s }) {
|
|
|
2076
2028
|
o.done = g >= u;
|
|
2077
2029
|
else {
|
|
2078
2030
|
let P = d;
|
|
2079
|
-
g !== 0 && (
|
|
2031
|
+
g !== 0 && (m < 1 ? P = qi(y, g, x) : P = 0);
|
|
2080
2032
|
const S = Math.abs(P) <= n, C = Math.abs(r - x) <= e;
|
|
2081
2033
|
o.done = S && C;
|
|
2082
2034
|
}
|
|
@@ -2088,18 +2040,18 @@ function Qn({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: s = 3
|
|
|
2088
2040
|
const h = t[0], f = {
|
|
2089
2041
|
done: !1,
|
|
2090
2042
|
value: h
|
|
2091
|
-
}, d = (A) => a !== void 0 && A < a || l !== void 0 && A > l,
|
|
2092
|
-
let
|
|
2093
|
-
const v = h +
|
|
2094
|
-
b !== v && (
|
|
2095
|
-
const y = (A) => -
|
|
2096
|
-
const
|
|
2097
|
-
f.done = Math.abs(
|
|
2043
|
+
}, d = (A) => a !== void 0 && A < a || l !== void 0 && A > l, m = (A) => a === void 0 ? l : l === void 0 || Math.abs(a - A) < Math.abs(l - A) ? a : l;
|
|
2044
|
+
let p = n * e;
|
|
2045
|
+
const v = h + p, b = o === void 0 ? v : o(v);
|
|
2046
|
+
b !== v && (p = b - h);
|
|
2047
|
+
const y = (A) => -p * Math.exp(-A / s), g = (A) => b + y(A), x = (A) => {
|
|
2048
|
+
const E = y(A), Y = g(A);
|
|
2049
|
+
f.done = Math.abs(E) <= c, f.value = f.done ? b : Y;
|
|
2098
2050
|
};
|
|
2099
2051
|
let P, S;
|
|
2100
2052
|
const C = (A) => {
|
|
2101
2053
|
d(f.value) && (P = A, S = Ki({
|
|
2102
|
-
keyframes: [f.value,
|
|
2054
|
+
keyframes: [f.value, m(f.value)],
|
|
2103
2055
|
velocity: qi(g, A, f.value),
|
|
2104
2056
|
damping: i,
|
|
2105
2057
|
stiffness: r,
|
|
@@ -2110,12 +2062,12 @@ function Qn({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: s = 3
|
|
|
2110
2062
|
return C(0), {
|
|
2111
2063
|
calculatedDuration: null,
|
|
2112
2064
|
next: (A) => {
|
|
2113
|
-
let
|
|
2114
|
-
return !S && P === void 0 && (
|
|
2065
|
+
let E = !1;
|
|
2066
|
+
return !S && P === void 0 && (E = !0, x(A), C(A)), P !== void 0 && A > P ? S.next(A - P) : (!E && x(A), f);
|
|
2115
2067
|
}
|
|
2116
2068
|
};
|
|
2117
2069
|
}
|
|
2118
|
-
const
|
|
2070
|
+
const Pl = (t) => {
|
|
2119
2071
|
const e = ({ timestamp: n }) => t(n);
|
|
2120
2072
|
return {
|
|
2121
2073
|
start: () => V.update(e, !0),
|
|
@@ -2135,25 +2087,25 @@ function Jn(t) {
|
|
|
2135
2087
|
e += n, s = t.next(e);
|
|
2136
2088
|
return e >= Zn ? 1 / 0 : e;
|
|
2137
2089
|
}
|
|
2138
|
-
const
|
|
2090
|
+
const Al = {
|
|
2139
2091
|
decay: Qn,
|
|
2140
2092
|
inertia: Qn,
|
|
2141
2093
|
tween: ae,
|
|
2142
2094
|
keyframes: ae,
|
|
2143
2095
|
spring: Ki
|
|
2144
2096
|
};
|
|
2145
|
-
function le({ autoplay: t = !0, delay: e = 0, driver: n =
|
|
2146
|
-
let d = 1,
|
|
2097
|
+
function le({ autoplay: t = !0, delay: e = 0, driver: n = Pl, keyframes: s, type: i = "keyframes", repeat: r = 0, repeatDelay: o = 0, repeatType: a = "loop", onPlay: l, onStop: c, onComplete: u, onUpdate: h, ...f }) {
|
|
2098
|
+
let d = 1, m = !1, p, v;
|
|
2147
2099
|
const b = () => {
|
|
2148
2100
|
v = new Promise((M) => {
|
|
2149
|
-
|
|
2101
|
+
p = M;
|
|
2150
2102
|
});
|
|
2151
2103
|
};
|
|
2152
2104
|
b();
|
|
2153
2105
|
let y;
|
|
2154
|
-
const g =
|
|
2106
|
+
const g = Al[i] || ae;
|
|
2155
2107
|
let x;
|
|
2156
|
-
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 =
|
|
2108
|
+
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, {
|
|
2157
2109
|
clamp: !1
|
|
2158
2110
|
}), s = [0, 100]);
|
|
2159
2111
|
const P = g({ ...f, keyframes: s });
|
|
@@ -2163,53 +2115,53 @@ function le({ autoplay: t = !0, delay: e = 0, driver: n = jl, keyframes: s, type
|
|
|
2163
2115
|
keyframes: [...s].reverse(),
|
|
2164
2116
|
velocity: -(f.velocity || 0)
|
|
2165
2117
|
}));
|
|
2166
|
-
let C = "idle", A = null,
|
|
2118
|
+
let C = "idle", A = null, E = null, Y = null;
|
|
2167
2119
|
P.calculatedDuration === null && r && (P.calculatedDuration = Jn(P));
|
|
2168
2120
|
const { calculatedDuration: vt } = P;
|
|
2169
2121
|
let H = 1 / 0, X = 1 / 0;
|
|
2170
2122
|
vt !== null && (H = vt + o, X = H * (r + 1) - o);
|
|
2171
|
-
let
|
|
2123
|
+
let j = 0;
|
|
2172
2124
|
const xt = (M) => {
|
|
2173
|
-
if (
|
|
2125
|
+
if (E === null)
|
|
2174
2126
|
return;
|
|
2175
|
-
d > 0 && (
|
|
2176
|
-
const
|
|
2177
|
-
|
|
2178
|
-
let Mn =
|
|
2127
|
+
d > 0 && (E = Math.min(E, M)), d < 0 && (E = Math.min(M - X / d, E)), A !== null ? j = A : j = Math.round(M - E) * d;
|
|
2128
|
+
const Rt = j - e * (d >= 0 ? 1 : -1), Cn = d >= 0 ? Rt < 0 : Rt > X;
|
|
2129
|
+
j = Math.max(Rt, 0), C === "finished" && A === null && (j = X);
|
|
2130
|
+
let Mn = j, Dn = P;
|
|
2179
2131
|
if (r) {
|
|
2180
|
-
const be = Math.min(
|
|
2132
|
+
const be = Math.min(j, X) / H;
|
|
2181
2133
|
let Yt = Math.floor(be), ht = be % 1;
|
|
2182
2134
|
!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;
|
|
2183
2135
|
}
|
|
2184
|
-
const
|
|
2185
|
-
x && (
|
|
2186
|
-
let { done:
|
|
2187
|
-
!Cn && vt !== null && (
|
|
2188
|
-
const Po = A === null && (C === "finished" || C === "running" &&
|
|
2189
|
-
return h && h(
|
|
2190
|
-
},
|
|
2136
|
+
const Lt = Cn ? { done: !1, value: s[0] } : Dn.next(Mn);
|
|
2137
|
+
x && (Lt.value = x(Lt.value));
|
|
2138
|
+
let { done: Rn } = Lt;
|
|
2139
|
+
!Cn && vt !== null && (Rn = d >= 0 ? j >= X : j <= 0);
|
|
2140
|
+
const Po = A === null && (C === "finished" || C === "running" && Rn);
|
|
2141
|
+
return h && h(Lt.value), Po && Dt(), Lt;
|
|
2142
|
+
}, I = () => {
|
|
2191
2143
|
y && y.stop(), y = void 0;
|
|
2192
2144
|
}, nt = () => {
|
|
2193
|
-
C = "idle",
|
|
2145
|
+
C = "idle", I(), p(), b(), E = Y = null;
|
|
2194
2146
|
}, Dt = () => {
|
|
2195
|
-
C = "finished", u && u(),
|
|
2147
|
+
C = "finished", u && u(), I(), p();
|
|
2196
2148
|
}, bt = () => {
|
|
2197
|
-
if (
|
|
2149
|
+
if (m)
|
|
2198
2150
|
return;
|
|
2199
2151
|
y || (y = n(xt));
|
|
2200
2152
|
const M = y.now();
|
|
2201
|
-
l && l(), A !== null ?
|
|
2153
|
+
l && l(), A !== null ? E = M - A : (!E || C === "finished") && (E = M), C === "finished" && b(), Y = E, A = null, C = "running", y.start();
|
|
2202
2154
|
};
|
|
2203
2155
|
t && bt();
|
|
2204
2156
|
const Vn = {
|
|
2205
|
-
then(M,
|
|
2206
|
-
return v.then(M,
|
|
2157
|
+
then(M, Rt) {
|
|
2158
|
+
return v.then(M, Rt);
|
|
2207
2159
|
},
|
|
2208
2160
|
get time() {
|
|
2209
|
-
return tt(
|
|
2161
|
+
return tt(j);
|
|
2210
2162
|
},
|
|
2211
2163
|
set time(M) {
|
|
2212
|
-
M = at(M),
|
|
2164
|
+
M = at(M), j = M, A !== null || !y || d === 0 ? A = M : E = y.now() - M / d;
|
|
2213
2165
|
},
|
|
2214
2166
|
get duration() {
|
|
2215
2167
|
const M = P.calculatedDuration === null ? Jn(P) : P.calculatedDuration;
|
|
@@ -2219,17 +2171,17 @@ function le({ autoplay: t = !0, delay: e = 0, driver: n = jl, keyframes: s, type
|
|
|
2219
2171
|
return d;
|
|
2220
2172
|
},
|
|
2221
2173
|
set speed(M) {
|
|
2222
|
-
M === d || !y || (d = M, Vn.time = tt(
|
|
2174
|
+
M === d || !y || (d = M, Vn.time = tt(j));
|
|
2223
2175
|
},
|
|
2224
2176
|
get state() {
|
|
2225
2177
|
return C;
|
|
2226
2178
|
},
|
|
2227
2179
|
play: bt,
|
|
2228
2180
|
pause: () => {
|
|
2229
|
-
C = "paused", A =
|
|
2181
|
+
C = "paused", A = j;
|
|
2230
2182
|
},
|
|
2231
2183
|
stop: () => {
|
|
2232
|
-
|
|
2184
|
+
m = !0, C !== "idle" && (C = "idle", c && c(), nt());
|
|
2233
2185
|
},
|
|
2234
2186
|
cancel: () => {
|
|
2235
2187
|
Y !== null && xt(Y), nt();
|
|
@@ -2237,23 +2189,23 @@ function le({ autoplay: t = !0, delay: e = 0, driver: n = jl, keyframes: s, type
|
|
|
2237
2189
|
complete: () => {
|
|
2238
2190
|
C = "finished";
|
|
2239
2191
|
},
|
|
2240
|
-
sample: (M) => (
|
|
2192
|
+
sample: (M) => (E = 0, xt(M))
|
|
2241
2193
|
};
|
|
2242
2194
|
return Vn;
|
|
2243
2195
|
}
|
|
2244
|
-
function
|
|
2196
|
+
function Sl(t) {
|
|
2245
2197
|
let e;
|
|
2246
2198
|
return () => (e === void 0 && (e = t()), e);
|
|
2247
2199
|
}
|
|
2248
|
-
const
|
|
2200
|
+
const Vl = Sl(() => Object.hasOwnProperty.call(Element.prototype, "animate")), Cl = /* @__PURE__ */ new Set([
|
|
2249
2201
|
"opacity",
|
|
2250
2202
|
"clipPath",
|
|
2251
2203
|
"filter",
|
|
2252
2204
|
"transform",
|
|
2253
2205
|
"backgroundColor"
|
|
2254
|
-
]), Zt = 10,
|
|
2255
|
-
function
|
|
2256
|
-
if (!(
|
|
2206
|
+
]), Zt = 10, Ml = 2e4, Dl = (t, e) => e.type === "spring" || t === "backgroundColor" || !Si(e.ease);
|
|
2207
|
+
function Rl(t, e, { onUpdate: n, onComplete: s, ...i }) {
|
|
2208
|
+
if (!(Vl() && Cl.has(e) && !i.repeatDelay && i.repeatType !== "mirror" && i.damping !== 0 && i.type !== "inertia"))
|
|
2257
2209
|
return !1;
|
|
2258
2210
|
let o = !1, a, l, c = !1;
|
|
2259
2211
|
const u = () => {
|
|
@@ -2262,8 +2214,8 @@ function Hl(t, e, { onUpdate: n, onComplete: s, ...i }) {
|
|
|
2262
2214
|
});
|
|
2263
2215
|
};
|
|
2264
2216
|
u();
|
|
2265
|
-
let { keyframes: h, duration: f = 300, ease: d, times:
|
|
2266
|
-
if (
|
|
2217
|
+
let { keyframes: h, duration: f = 300, ease: d, times: m } = i;
|
|
2218
|
+
if (Dl(e, i)) {
|
|
2267
2219
|
const g = le({
|
|
2268
2220
|
...i,
|
|
2269
2221
|
repeat: 0,
|
|
@@ -2272,11 +2224,11 @@ function Hl(t, e, { onUpdate: n, onComplete: s, ...i }) {
|
|
|
2272
2224
|
let x = { done: !1, value: h[0] };
|
|
2273
2225
|
const P = [];
|
|
2274
2226
|
let S = 0;
|
|
2275
|
-
for (; !x.done && S <
|
|
2227
|
+
for (; !x.done && S < Ml; )
|
|
2276
2228
|
x = g.sample(S), P.push(x.value), S += Zt;
|
|
2277
|
-
|
|
2229
|
+
m = void 0, h = P, f = S - Zt, d = "linear";
|
|
2278
2230
|
}
|
|
2279
|
-
const
|
|
2231
|
+
const p = _a(t.owner.current, e, h, {
|
|
2280
2232
|
...i,
|
|
2281
2233
|
duration: f,
|
|
2282
2234
|
/**
|
|
@@ -2288,44 +2240,44 @@ function Hl(t, e, { onUpdate: n, onComplete: s, ...i }) {
|
|
|
2288
2240
|
* support the upcoming `linear()` easing function.
|
|
2289
2241
|
*/
|
|
2290
2242
|
ease: d,
|
|
2291
|
-
times:
|
|
2243
|
+
times: m
|
|
2292
2244
|
}), v = () => {
|
|
2293
|
-
c = !1,
|
|
2245
|
+
c = !1, p.cancel();
|
|
2294
2246
|
}, b = () => {
|
|
2295
2247
|
c = !0, V.update(v), a(), u();
|
|
2296
2248
|
};
|
|
2297
|
-
return
|
|
2298
|
-
c || (t.set(
|
|
2249
|
+
return p.onfinish = () => {
|
|
2250
|
+
c || (t.set(za(h, i)), s && s(), b());
|
|
2299
2251
|
}, {
|
|
2300
2252
|
then(g, x) {
|
|
2301
2253
|
return l.then(g, x);
|
|
2302
2254
|
},
|
|
2303
2255
|
attachTimeline(g) {
|
|
2304
|
-
return
|
|
2256
|
+
return p.timeline = g, p.onfinish = null, k;
|
|
2305
2257
|
},
|
|
2306
2258
|
get time() {
|
|
2307
|
-
return tt(
|
|
2259
|
+
return tt(p.currentTime || 0);
|
|
2308
2260
|
},
|
|
2309
2261
|
set time(g) {
|
|
2310
|
-
|
|
2262
|
+
p.currentTime = at(g);
|
|
2311
2263
|
},
|
|
2312
2264
|
get speed() {
|
|
2313
|
-
return
|
|
2265
|
+
return p.playbackRate;
|
|
2314
2266
|
},
|
|
2315
2267
|
set speed(g) {
|
|
2316
|
-
|
|
2268
|
+
p.playbackRate = g;
|
|
2317
2269
|
},
|
|
2318
2270
|
get duration() {
|
|
2319
2271
|
return tt(f);
|
|
2320
2272
|
},
|
|
2321
2273
|
play: () => {
|
|
2322
|
-
o || (
|
|
2274
|
+
o || (p.play(), et(v));
|
|
2323
2275
|
},
|
|
2324
|
-
pause: () =>
|
|
2276
|
+
pause: () => p.pause(),
|
|
2325
2277
|
stop: () => {
|
|
2326
|
-
if (o = !0,
|
|
2278
|
+
if (o = !0, p.playState === "idle")
|
|
2327
2279
|
return;
|
|
2328
|
-
const { currentTime: g } =
|
|
2280
|
+
const { currentTime: g } = p;
|
|
2329
2281
|
if (g) {
|
|
2330
2282
|
const x = le({
|
|
2331
2283
|
...i,
|
|
@@ -2336,22 +2288,22 @@ function Hl(t, e, { onUpdate: n, onComplete: s, ...i }) {
|
|
|
2336
2288
|
b();
|
|
2337
2289
|
},
|
|
2338
2290
|
complete: () => {
|
|
2339
|
-
c ||
|
|
2291
|
+
c || p.finish();
|
|
2340
2292
|
},
|
|
2341
2293
|
cancel: b
|
|
2342
2294
|
};
|
|
2343
2295
|
}
|
|
2344
|
-
function
|
|
2296
|
+
function Ll({ keyframes: t, delay: e, onUpdate: n, onComplete: s }) {
|
|
2345
2297
|
const i = () => (n && n(t[t.length - 1]), s && s(), {
|
|
2346
2298
|
time: 0,
|
|
2347
2299
|
speed: 1,
|
|
2348
2300
|
duration: 0,
|
|
2349
|
-
play:
|
|
2350
|
-
pause:
|
|
2351
|
-
stop:
|
|
2301
|
+
play: k,
|
|
2302
|
+
pause: k,
|
|
2303
|
+
stop: k,
|
|
2352
2304
|
then: (r) => (r(), Promise.resolve()),
|
|
2353
|
-
cancel:
|
|
2354
|
-
complete:
|
|
2305
|
+
cancel: k,
|
|
2306
|
+
complete: k
|
|
2355
2307
|
});
|
|
2356
2308
|
return e ? le({
|
|
2357
2309
|
keyframes: [0, 1],
|
|
@@ -2360,27 +2312,27 @@ function ql({ keyframes: t, delay: e, onUpdate: n, onComplete: s }) {
|
|
|
2360
2312
|
onComplete: i
|
|
2361
2313
|
}) : i();
|
|
2362
2314
|
}
|
|
2363
|
-
const
|
|
2315
|
+
const El = {
|
|
2364
2316
|
type: "spring",
|
|
2365
2317
|
stiffness: 500,
|
|
2366
2318
|
damping: 25,
|
|
2367
2319
|
restSpeed: 10
|
|
2368
|
-
},
|
|
2320
|
+
}, kl = (t) => ({
|
|
2369
2321
|
type: "spring",
|
|
2370
2322
|
stiffness: 550,
|
|
2371
2323
|
damping: t === 0 ? 2 * Math.sqrt(550) : 30,
|
|
2372
2324
|
restSpeed: 10
|
|
2373
|
-
}),
|
|
2325
|
+
}), Bl = {
|
|
2374
2326
|
type: "keyframes",
|
|
2375
2327
|
duration: 0.8
|
|
2376
|
-
},
|
|
2328
|
+
}, Il = {
|
|
2377
2329
|
type: "keyframes",
|
|
2378
2330
|
ease: [0.25, 0.1, 0.35, 1],
|
|
2379
2331
|
duration: 0.3
|
|
2380
|
-
},
|
|
2332
|
+
}, Fl = (t, { keyframes: e }) => e.length > 2 ? Bl : gt.has(t) ? t.startsWith("scale") ? kl(e[1]) : El : Il, _e = (t, e) => t === "zIndex" ? !1 : !!(typeof e == "number" || Array.isArray(e) || typeof e == "string" && // It's animatable if we have a string
|
|
2381
2333
|
(ct.test(e) || e === "0") && // And it contains numbers and/or colors
|
|
2382
|
-
!e.startsWith("url(")),
|
|
2383
|
-
function
|
|
2334
|
+
!e.startsWith("url(")), Ol = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
|
|
2335
|
+
function jl(t) {
|
|
2384
2336
|
const [e, n] = t.slice(0, -1).split("(");
|
|
2385
2337
|
if (e === "drop-shadow")
|
|
2386
2338
|
return t;
|
|
@@ -2388,52 +2340,52 @@ function tc(t) {
|
|
|
2388
2340
|
if (!s)
|
|
2389
2341
|
return t;
|
|
2390
2342
|
const i = n.replace(s, "");
|
|
2391
|
-
let r =
|
|
2343
|
+
let r = Ol.has(e) ? 1 : 0;
|
|
2392
2344
|
return s !== n && (r *= 100), e + "(" + r + i + ")";
|
|
2393
2345
|
}
|
|
2394
|
-
const
|
|
2346
|
+
const Nl = /([a-z-]*)\(.*?\)/g, ze = {
|
|
2395
2347
|
...ct,
|
|
2396
2348
|
getAnimatableNone: (t) => {
|
|
2397
|
-
const e = t.match(
|
|
2398
|
-
return e ? e.map(
|
|
2349
|
+
const e = t.match(Nl);
|
|
2350
|
+
return e ? e.map(jl).join(" ") : t;
|
|
2399
2351
|
}
|
|
2400
|
-
},
|
|
2352
|
+
}, Ul = {
|
|
2401
2353
|
...ci,
|
|
2402
2354
|
// Color props
|
|
2403
|
-
color:
|
|
2404
|
-
backgroundColor:
|
|
2405
|
-
outlineColor:
|
|
2406
|
-
fill:
|
|
2407
|
-
stroke:
|
|
2355
|
+
color: N,
|
|
2356
|
+
backgroundColor: N,
|
|
2357
|
+
outlineColor: N,
|
|
2358
|
+
fill: N,
|
|
2359
|
+
stroke: N,
|
|
2408
2360
|
// Border props
|
|
2409
|
-
borderColor:
|
|
2410
|
-
borderTopColor:
|
|
2411
|
-
borderRightColor:
|
|
2412
|
-
borderBottomColor:
|
|
2413
|
-
borderLeftColor:
|
|
2361
|
+
borderColor: N,
|
|
2362
|
+
borderTopColor: N,
|
|
2363
|
+
borderRightColor: N,
|
|
2364
|
+
borderBottomColor: N,
|
|
2365
|
+
borderLeftColor: N,
|
|
2414
2366
|
filter: ze,
|
|
2415
2367
|
WebkitFilter: ze
|
|
2416
|
-
}, vn = (t) =>
|
|
2368
|
+
}, vn = (t) => Ul[t];
|
|
2417
2369
|
function Yi(t, e) {
|
|
2418
2370
|
let n = vn(t);
|
|
2419
2371
|
return n !== ze && (n = ct), n.getAnimatableNone ? n.getAnimatableNone(e) : void 0;
|
|
2420
2372
|
}
|
|
2421
2373
|
const Xi = (t) => /^0[^.\s]+$/.test(t);
|
|
2422
|
-
function
|
|
2374
|
+
function _l(t) {
|
|
2423
2375
|
if (typeof t == "number")
|
|
2424
2376
|
return t === 0;
|
|
2425
2377
|
if (t !== null)
|
|
2426
2378
|
return t === "none" || t === "0" || Xi(t);
|
|
2427
2379
|
}
|
|
2428
|
-
function
|
|
2429
|
-
const i =
|
|
2380
|
+
function zl(t, e, n, s) {
|
|
2381
|
+
const i = _e(e, n);
|
|
2430
2382
|
let r;
|
|
2431
2383
|
Array.isArray(n) ? r = [...n] : r = [null, n];
|
|
2432
2384
|
const o = s.from !== void 0 ? s.from : t.get();
|
|
2433
2385
|
let a;
|
|
2434
2386
|
const l = [];
|
|
2435
2387
|
for (let c = 0; c < r.length; c++)
|
|
2436
|
-
r[c] === null && (r[c] = c === 0 ? o : r[c - 1]),
|
|
2388
|
+
r[c] === null && (r[c] = c === 0 ? o : r[c - 1]), _l(r[c]) && l.push(c), typeof r[c] == "string" && r[c] !== "none" && r[c] !== "0" && (a = r[c]);
|
|
2437
2389
|
if (i && l.length && a)
|
|
2438
2390
|
for (let c = 0; c < l.length; c++) {
|
|
2439
2391
|
const u = l[c];
|
|
@@ -2441,19 +2393,19 @@ function ic(t, e, n, s) {
|
|
|
2441
2393
|
}
|
|
2442
2394
|
return r;
|
|
2443
2395
|
}
|
|
2444
|
-
function
|
|
2396
|
+
function Wl({ when: t, delay: e, delayChildren: n, staggerChildren: s, staggerDirection: i, repeat: r, repeatType: o, repeatDelay: a, from: l, elapsed: c, ...u }) {
|
|
2445
2397
|
return !!Object.keys(u).length;
|
|
2446
2398
|
}
|
|
2447
2399
|
function xn(t, e) {
|
|
2448
2400
|
return t[e] || t.default || t;
|
|
2449
2401
|
}
|
|
2450
|
-
const
|
|
2402
|
+
const Gl = {
|
|
2451
2403
|
skipAnimations: !1
|
|
2452
2404
|
}, bn = (t, e, n, s = {}) => (i) => {
|
|
2453
2405
|
const r = xn(s, t) || {}, o = r.delay || s.delay || 0;
|
|
2454
2406
|
let { elapsed: a = 0 } = s;
|
|
2455
2407
|
a = a - at(o);
|
|
2456
|
-
const l =
|
|
2408
|
+
const l = zl(e, t, n, r), c = l[0], u = l[l.length - 1], h = _e(t, c), f = _e(t, u);
|
|
2457
2409
|
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.`);
|
|
2458
2410
|
let d = {
|
|
2459
2411
|
keyframes: l,
|
|
@@ -2461,18 +2413,18 @@ const rc = {
|
|
|
2461
2413
|
ease: "easeOut",
|
|
2462
2414
|
...r,
|
|
2463
2415
|
delay: -a,
|
|
2464
|
-
onUpdate: (
|
|
2465
|
-
e.set(
|
|
2416
|
+
onUpdate: (m) => {
|
|
2417
|
+
e.set(m), r.onUpdate && r.onUpdate(m);
|
|
2466
2418
|
},
|
|
2467
2419
|
onComplete: () => {
|
|
2468
2420
|
i(), r.onComplete && r.onComplete();
|
|
2469
2421
|
}
|
|
2470
2422
|
};
|
|
2471
|
-
if (
|
|
2423
|
+
if (Wl(r) || (d = {
|
|
2472
2424
|
...d,
|
|
2473
|
-
...
|
|
2474
|
-
}), d.duration && (d.duration = at(d.duration)), d.repeatDelay && (d.repeatDelay = at(d.repeatDelay)), !h || !f ||
|
|
2475
|
-
return
|
|
2425
|
+
...Fl(t, d)
|
|
2426
|
+
}), d.duration && (d.duration = at(d.duration)), d.repeatDelay && (d.repeatDelay = at(d.repeatDelay)), !h || !f || Ua.current || r.type === !1 || Gl.skipAnimations)
|
|
2427
|
+
return Ll(d);
|
|
2476
2428
|
if (
|
|
2477
2429
|
/**
|
|
2478
2430
|
* If this is a handoff animation, the optimised animation will be running via
|
|
@@ -2485,14 +2437,14 @@ const rc = {
|
|
|
2485
2437
|
*/
|
|
2486
2438
|
!e.owner.getProps().onUpdate
|
|
2487
2439
|
) {
|
|
2488
|
-
const
|
|
2489
|
-
if (
|
|
2490
|
-
return
|
|
2440
|
+
const m = Rl(e, t, d);
|
|
2441
|
+
if (m)
|
|
2442
|
+
return m;
|
|
2491
2443
|
}
|
|
2492
2444
|
return le(d);
|
|
2493
2445
|
};
|
|
2494
2446
|
function ce(t) {
|
|
2495
|
-
return !!(
|
|
2447
|
+
return !!(_(t) && t.add);
|
|
2496
2448
|
}
|
|
2497
2449
|
const Qi = (t) => /^\-?\d*\.?\d+$/.test(t);
|
|
2498
2450
|
function wn(t, e) {
|
|
@@ -2531,8 +2483,8 @@ const ts = /* @__PURE__ */ new Set();
|
|
|
2531
2483
|
function An(t, e, n) {
|
|
2532
2484
|
t || ts.has(e) || (console.warn(e), n && console.warn(n), ts.add(e));
|
|
2533
2485
|
}
|
|
2534
|
-
const
|
|
2535
|
-
class
|
|
2486
|
+
const $l = (t) => !isNaN(parseFloat(t));
|
|
2487
|
+
class Hl {
|
|
2536
2488
|
/**
|
|
2537
2489
|
* @param init - The initiating value
|
|
2538
2490
|
* @param config - Optional configuration options
|
|
@@ -2548,7 +2500,7 @@ class lc {
|
|
|
2548
2500
|
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);
|
|
2549
2501
|
}, this.scheduleVelocityCheck = () => V.postRender(this.velocityCheck), this.velocityCheck = ({ timestamp: s }) => {
|
|
2550
2502
|
s !== this.lastUpdated && (this.prev = this.current, this.events.velocityChange && this.events.velocityChange.notify(this.getVelocity()));
|
|
2551
|
-
}, this.hasAnimated = !1, this.prev = this.current = e, this.canTrackVelocity =
|
|
2503
|
+
}, this.hasAnimated = !1, this.prev = this.current = e, this.canTrackVelocity = $l(this.current), this.owner = n.owner;
|
|
2552
2504
|
}
|
|
2553
2505
|
/**
|
|
2554
2506
|
* Adds a function that will be notified when the `MotionValue` is updated.
|
|
@@ -2723,41 +2675,41 @@ class lc {
|
|
|
2723
2675
|
}
|
|
2724
2676
|
}
|
|
2725
2677
|
function Vt(t, e) {
|
|
2726
|
-
return new
|
|
2678
|
+
return new Hl(t, e);
|
|
2727
2679
|
}
|
|
2728
|
-
const Zi = (t) => (e) => e.test(t),
|
|
2680
|
+
const Zi = (t) => (e) => e.test(t), ql = {
|
|
2729
2681
|
test: (t) => t === "auto",
|
|
2730
2682
|
parse: (t) => t
|
|
2731
|
-
}, Ji = [yt, w, K, st,
|
|
2732
|
-
function
|
|
2683
|
+
}, Ji = [yt, w, K, st, ea, ta, ql], Et = (t) => Ji.find(Zi(t)), Kl = [...Ji, N, ct], Yl = (t) => Kl.find(Zi(t));
|
|
2684
|
+
function Xl(t, e, n) {
|
|
2733
2685
|
t.hasValue(e) ? t.getValue(e).set(n) : t.addValue(e, Vt(n));
|
|
2734
2686
|
}
|
|
2735
|
-
function
|
|
2687
|
+
function Ql(t, e) {
|
|
2736
2688
|
const n = xe(t, e);
|
|
2737
2689
|
let { transitionEnd: s = {}, transition: i = {}, ...r } = n ? t.makeTargetAnimatable(n, !1) : {};
|
|
2738
2690
|
r = { ...r, ...s };
|
|
2739
2691
|
for (const o in r) {
|
|
2740
|
-
const a =
|
|
2741
|
-
|
|
2692
|
+
const a = ga(r[o]);
|
|
2693
|
+
Xl(t, o, a);
|
|
2742
2694
|
}
|
|
2743
2695
|
}
|
|
2744
|
-
function
|
|
2696
|
+
function Zl(t, e, n) {
|
|
2745
2697
|
var s, i;
|
|
2746
2698
|
const r = Object.keys(e).filter((a) => !t.hasValue(a)), o = r.length;
|
|
2747
2699
|
if (o)
|
|
2748
2700
|
for (let a = 0; a < o; a++) {
|
|
2749
2701
|
const l = r[a], c = e[l];
|
|
2750
2702
|
let u = null;
|
|
2751
|
-
Array.isArray(c) && (u = c[0]), u === null && (u = (i = (s = n[l]) !== null && s !== void 0 ? s : t.readValue(l)) !== null && i !== void 0 ? i : e[l]), u != null && (typeof u == "string" && (Qi(u) || Xi(u)) ? u = parseFloat(u) : !
|
|
2703
|
+
Array.isArray(c) && (u = c[0]), u === null && (u = (i = (s = n[l]) !== null && s !== void 0 ? s : t.readValue(l)) !== null && i !== void 0 ? i : e[l]), u != null && (typeof u == "string" && (Qi(u) || Xi(u)) ? u = parseFloat(u) : !Yl(u) && ct.test(c) && (u = Yi(l, c)), t.addValue(l, Vt(u, { owner: t })), n[l] === void 0 && (n[l] = u), u !== null && t.setBaseTarget(l, u));
|
|
2752
2704
|
}
|
|
2753
2705
|
}
|
|
2754
|
-
function
|
|
2706
|
+
function Jl(t, e) {
|
|
2755
2707
|
return e ? (e[t] || e.default || e).from : void 0;
|
|
2756
2708
|
}
|
|
2757
|
-
function
|
|
2709
|
+
function tc(t, e, n) {
|
|
2758
2710
|
const s = {};
|
|
2759
2711
|
for (const i in t) {
|
|
2760
|
-
const r =
|
|
2712
|
+
const r = Jl(i, e);
|
|
2761
2713
|
if (r !== void 0)
|
|
2762
2714
|
s[i] = r;
|
|
2763
2715
|
else {
|
|
@@ -2767,11 +2719,11 @@ function gc(t, e, n) {
|
|
|
2767
2719
|
}
|
|
2768
2720
|
return s;
|
|
2769
2721
|
}
|
|
2770
|
-
function
|
|
2722
|
+
function ec({ protectedKeys: t, needsAnimating: e }, n) {
|
|
2771
2723
|
const s = t.hasOwnProperty(n) && e[n] !== !0;
|
|
2772
2724
|
return e[n] = !1, s;
|
|
2773
2725
|
}
|
|
2774
|
-
function
|
|
2726
|
+
function nc(t, e) {
|
|
2775
2727
|
const n = t.get();
|
|
2776
2728
|
if (Array.isArray(e)) {
|
|
2777
2729
|
for (let s = 0; s < e.length; s++)
|
|
@@ -2787,9 +2739,9 @@ function to(t, e, { delay: n = 0, transitionOverride: s, type: i } = {}) {
|
|
|
2787
2739
|
const c = [], u = i && t.animationState && t.animationState.getState()[i];
|
|
2788
2740
|
for (const h in a) {
|
|
2789
2741
|
const f = t.getValue(h), d = a[h];
|
|
2790
|
-
if (!f || d === void 0 || u &&
|
|
2742
|
+
if (!f || d === void 0 || u && ec(u, h))
|
|
2791
2743
|
continue;
|
|
2792
|
-
const
|
|
2744
|
+
const m = {
|
|
2793
2745
|
delay: n,
|
|
2794
2746
|
elapsed: 0,
|
|
2795
2747
|
...xn(r || {}, h)
|
|
@@ -2798,18 +2750,18 @@ function to(t, e, { delay: n = 0, transitionOverride: s, type: i } = {}) {
|
|
|
2798
2750
|
const b = t.getProps()[ei];
|
|
2799
2751
|
if (b) {
|
|
2800
2752
|
const y = window.HandoffAppearAnimations(b, h, f, V);
|
|
2801
|
-
y !== null && (
|
|
2753
|
+
y !== null && (m.elapsed = y, m.isHandoff = !0);
|
|
2802
2754
|
}
|
|
2803
2755
|
}
|
|
2804
|
-
let
|
|
2805
|
-
if (
|
|
2756
|
+
let p = !m.isHandoff && !nc(f, d);
|
|
2757
|
+
if (m.type === "spring" && (f.getVelocity() || m.velocity) && (p = !1), f.animation && (p = !1), p)
|
|
2806
2758
|
continue;
|
|
2807
|
-
f.start(bn(h, f, d, t.shouldReduceMotion && gt.has(h) ? { type: !1 } :
|
|
2759
|
+
f.start(bn(h, f, d, t.shouldReduceMotion && gt.has(h) ? { type: !1 } : m));
|
|
2808
2760
|
const v = f.animation;
|
|
2809
2761
|
ce(l) && (l.add(h), v.then(() => l.remove(h))), c.push(v);
|
|
2810
2762
|
}
|
|
2811
2763
|
return o && Promise.all(c).then(() => {
|
|
2812
|
-
o &&
|
|
2764
|
+
o && Ql(t, o);
|
|
2813
2765
|
}), c;
|
|
2814
2766
|
}
|
|
2815
2767
|
function We(t, e, n = {}) {
|
|
@@ -2818,7 +2770,7 @@ function We(t, e, n = {}) {
|
|
|
2818
2770
|
n.transitionOverride && (i = n.transitionOverride);
|
|
2819
2771
|
const r = s ? () => Promise.all(to(t, s, n)) : () => Promise.resolve(), o = t.variantChildren && t.variantChildren.size ? (l = 0) => {
|
|
2820
2772
|
const { delayChildren: c = 0, staggerChildren: u, staggerDirection: h } = i;
|
|
2821
|
-
return
|
|
2773
|
+
return sc(t, e, c + l, u, h, n);
|
|
2822
2774
|
} : () => Promise.resolve(), { when: a } = i;
|
|
2823
2775
|
if (a) {
|
|
2824
2776
|
const [l, c] = a === "beforeChildren" ? [r, o] : [o, r];
|
|
@@ -2826,19 +2778,19 @@ function We(t, e, n = {}) {
|
|
|
2826
2778
|
} else
|
|
2827
2779
|
return Promise.all([r(), o(n.delay)]);
|
|
2828
2780
|
}
|
|
2829
|
-
function
|
|
2781
|
+
function sc(t, e, n = 0, s = 0, i = 1, r) {
|
|
2830
2782
|
const o = [], a = (t.variantChildren.size - 1) * s, l = i === 1 ? (c = 0) => c * s : (c = 0) => a - c * s;
|
|
2831
|
-
return Array.from(t.variantChildren).sort(
|
|
2783
|
+
return Array.from(t.variantChildren).sort(ic).forEach((c, u) => {
|
|
2832
2784
|
c.notify("AnimationStart", e), o.push(We(c, e, {
|
|
2833
2785
|
...r,
|
|
2834
2786
|
delay: n + l(u)
|
|
2835
2787
|
}).then(() => c.notify("AnimationComplete", e)));
|
|
2836
2788
|
}), Promise.all(o);
|
|
2837
2789
|
}
|
|
2838
|
-
function
|
|
2790
|
+
function ic(t, e) {
|
|
2839
2791
|
return t.sortNodePosition(e);
|
|
2840
2792
|
}
|
|
2841
|
-
function
|
|
2793
|
+
function oc(t, e, n = {}) {
|
|
2842
2794
|
t.notify("AnimationStart", e);
|
|
2843
2795
|
let s;
|
|
2844
2796
|
if (Array.isArray(e)) {
|
|
@@ -2852,13 +2804,13 @@ function wc(t, e, n = {}) {
|
|
|
2852
2804
|
}
|
|
2853
2805
|
return s.then(() => t.notify("AnimationComplete", e));
|
|
2854
2806
|
}
|
|
2855
|
-
const
|
|
2856
|
-
function
|
|
2857
|
-
return (e) => Promise.all(e.map(({ animation: n, options: s }) =>
|
|
2807
|
+
const rc = [...rn].reverse(), ac = rn.length;
|
|
2808
|
+
function lc(t) {
|
|
2809
|
+
return (e) => Promise.all(e.map(({ animation: n, options: s }) => oc(t, n, s)));
|
|
2858
2810
|
}
|
|
2859
|
-
function
|
|
2860
|
-
let e =
|
|
2861
|
-
const n =
|
|
2811
|
+
function cc(t) {
|
|
2812
|
+
let e = lc(t);
|
|
2813
|
+
const n = hc();
|
|
2862
2814
|
let s = !0;
|
|
2863
2815
|
const i = (l, c) => {
|
|
2864
2816
|
const u = xe(t, c);
|
|
@@ -2873,37 +2825,37 @@ function Sc(t) {
|
|
|
2873
2825
|
}
|
|
2874
2826
|
function o(l, c) {
|
|
2875
2827
|
const u = t.getProps(), h = t.getVariantContext(!0) || {}, f = [], d = /* @__PURE__ */ new Set();
|
|
2876
|
-
let
|
|
2877
|
-
for (let b = 0; b <
|
|
2878
|
-
const y =
|
|
2879
|
-
S === !1 && (
|
|
2828
|
+
let m = {}, p = 1 / 0;
|
|
2829
|
+
for (let b = 0; b < ac; b++) {
|
|
2830
|
+
const y = rc[b], g = n[y], x = u[y] !== void 0 ? u[y] : h[y], P = Ut(x), S = y === c ? g.isActive : null;
|
|
2831
|
+
S === !1 && (p = b);
|
|
2880
2832
|
let C = x === h[y] && x !== u[y] && P;
|
|
2881
|
-
if (C && s && t.manuallyAnimateOnMount && (C = !1), g.protectedKeys = { ...
|
|
2833
|
+
if (C && s && t.manuallyAnimateOnMount && (C = !1), g.protectedKeys = { ...m }, // If it isn't active and hasn't *just* been set as inactive
|
|
2882
2834
|
!g.isActive && S === null || // If we didn't and don't have any defined prop for this animation type
|
|
2883
2835
|
!x && !g.prevProp || // Or if the prop doesn't define an animation
|
|
2884
|
-
|
|
2836
|
+
pe(x) || typeof x == "boolean")
|
|
2885
2837
|
continue;
|
|
2886
|
-
let
|
|
2838
|
+
let E = uc(g.prevProp, x) || // If we're making this variant active, we want to always make it active
|
|
2887
2839
|
y === c && g.isActive && !C && P || // If we removed a higher-priority variant (i is in reverse order)
|
|
2888
|
-
b >
|
|
2840
|
+
b > p && P, Y = !1;
|
|
2889
2841
|
const vt = Array.isArray(x) ? x : [x];
|
|
2890
2842
|
let H = vt.reduce(i, {});
|
|
2891
2843
|
S === !1 && (H = {});
|
|
2892
|
-
const { prevResolvedValues: X = {} } = g,
|
|
2844
|
+
const { prevResolvedValues: X = {} } = g, j = {
|
|
2893
2845
|
...X,
|
|
2894
2846
|
...H
|
|
2895
|
-
}, xt = (
|
|
2896
|
-
|
|
2847
|
+
}, xt = (I) => {
|
|
2848
|
+
E = !0, d.has(I) && (Y = !0, d.delete(I)), g.needsAnimating[I] = !0;
|
|
2897
2849
|
};
|
|
2898
|
-
for (const
|
|
2899
|
-
const nt = H[
|
|
2900
|
-
if (
|
|
2850
|
+
for (const I in j) {
|
|
2851
|
+
const nt = H[I], Dt = X[I];
|
|
2852
|
+
if (m.hasOwnProperty(I))
|
|
2901
2853
|
continue;
|
|
2902
2854
|
let bt = !1;
|
|
2903
|
-
oe(nt) && oe(Dt) ? bt = !Pi(nt, Dt) : bt = nt !== Dt, bt ? nt !== void 0 ? xt(
|
|
2855
|
+
oe(nt) && oe(Dt) ? bt = !Pi(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;
|
|
2904
2856
|
}
|
|
2905
|
-
g.prevProp = x, g.prevResolvedValues = H, g.isActive && (
|
|
2906
|
-
animation:
|
|
2857
|
+
g.prevProp = x, g.prevResolvedValues = H, g.isActive && (m = { ...m, ...H }), s && t.blockInitialAnimation && (E = !1), E && (!C || Y) && f.push(...vt.map((I) => ({
|
|
2858
|
+
animation: I,
|
|
2907
2859
|
options: { type: y, ...l }
|
|
2908
2860
|
})));
|
|
2909
2861
|
}
|
|
@@ -2922,8 +2874,8 @@ function Sc(t) {
|
|
|
2922
2874
|
if (n[l].isActive === c)
|
|
2923
2875
|
return Promise.resolve();
|
|
2924
2876
|
(h = t.variantChildren) === null || h === void 0 || h.forEach((d) => {
|
|
2925
|
-
var
|
|
2926
|
-
return (
|
|
2877
|
+
var m;
|
|
2878
|
+
return (m = d.animationState) === null || m === void 0 ? void 0 : m.setActive(l, c);
|
|
2927
2879
|
}), n[l].isActive = c;
|
|
2928
2880
|
const f = o(u, l);
|
|
2929
2881
|
for (const d in n)
|
|
@@ -2937,7 +2889,7 @@ function Sc(t) {
|
|
|
2937
2889
|
getState: () => n
|
|
2938
2890
|
};
|
|
2939
2891
|
}
|
|
2940
|
-
function
|
|
2892
|
+
function uc(t, e) {
|
|
2941
2893
|
return typeof e == "string" ? e !== t : Array.isArray(e) ? !Pi(e, t) : !1;
|
|
2942
2894
|
}
|
|
2943
2895
|
function ft(t = !1) {
|
|
@@ -2948,7 +2900,7 @@ function ft(t = !1) {
|
|
|
2948
2900
|
prevResolvedValues: {}
|
|
2949
2901
|
};
|
|
2950
2902
|
}
|
|
2951
|
-
function
|
|
2903
|
+
function hc() {
|
|
2952
2904
|
return {
|
|
2953
2905
|
animate: ft(!0),
|
|
2954
2906
|
whileInView: ft(),
|
|
@@ -2959,18 +2911,18 @@ function Cc() {
|
|
|
2959
2911
|
exit: ft()
|
|
2960
2912
|
};
|
|
2961
2913
|
}
|
|
2962
|
-
class
|
|
2914
|
+
class fc extends ut {
|
|
2963
2915
|
/**
|
|
2964
2916
|
* We dynamically generate the AnimationState manager as it contains a reference
|
|
2965
2917
|
* to the underlying animation library. We only want to load that if we load this,
|
|
2966
2918
|
* so people can optionally code split it out using the `m` component.
|
|
2967
2919
|
*/
|
|
2968
2920
|
constructor(e) {
|
|
2969
|
-
super(e), e.animationState || (e.animationState =
|
|
2921
|
+
super(e), e.animationState || (e.animationState = cc(e));
|
|
2970
2922
|
}
|
|
2971
2923
|
updateAnimationControlsSubscription() {
|
|
2972
2924
|
const { animate: e } = this.node.getProps();
|
|
2973
|
-
this.unmount(),
|
|
2925
|
+
this.unmount(), pe(e) && (this.unmount = e.subscribe(this.node));
|
|
2974
2926
|
}
|
|
2975
2927
|
/**
|
|
2976
2928
|
* Subscribe any provided AnimationControls to the component's VisualElement
|
|
@@ -2985,10 +2937,10 @@ class Mc extends ut {
|
|
|
2985
2937
|
unmount() {
|
|
2986
2938
|
}
|
|
2987
2939
|
}
|
|
2988
|
-
let
|
|
2989
|
-
class
|
|
2940
|
+
let dc = 0;
|
|
2941
|
+
class mc extends ut {
|
|
2990
2942
|
constructor() {
|
|
2991
|
-
super(...arguments), this.id =
|
|
2943
|
+
super(...arguments), this.id = dc++;
|
|
2992
2944
|
}
|
|
2993
2945
|
update() {
|
|
2994
2946
|
if (!this.node.presenceContext)
|
|
@@ -3006,15 +2958,15 @@ class _c extends ut {
|
|
|
3006
2958
|
unmount() {
|
|
3007
2959
|
}
|
|
3008
2960
|
}
|
|
3009
|
-
const
|
|
2961
|
+
const pc = {
|
|
3010
2962
|
animation: {
|
|
3011
|
-
Feature:
|
|
2963
|
+
Feature: fc
|
|
3012
2964
|
},
|
|
3013
2965
|
exit: {
|
|
3014
|
-
Feature:
|
|
2966
|
+
Feature: mc
|
|
3015
2967
|
}
|
|
3016
2968
|
}, es = (t, e) => Math.abs(t - e);
|
|
3017
|
-
function
|
|
2969
|
+
function gc(t, e) {
|
|
3018
2970
|
const n = es(t.x, e.x), s = es(t.y, e.y);
|
|
3019
2971
|
return Math.sqrt(n ** 2 + s ** 2);
|
|
3020
2972
|
}
|
|
@@ -3023,29 +2975,29 @@ class eo {
|
|
|
3023
2975
|
if (this.startEvent = null, this.lastMoveEvent = null, this.lastMoveEventInfo = null, this.handlers = {}, this.contextWindow = window, this.updatePoint = () => {
|
|
3024
2976
|
if (!(this.lastMoveEvent && this.lastMoveEventInfo))
|
|
3025
2977
|
return;
|
|
3026
|
-
const h =
|
|
2978
|
+
const h = Ee(this.lastMoveEventInfo, this.history), f = this.startEvent !== null, d = gc(h.offset, { x: 0, y: 0 }) >= 3;
|
|
3027
2979
|
if (!f && !d)
|
|
3028
2980
|
return;
|
|
3029
|
-
const { point:
|
|
3030
|
-
this.history.push({ ...
|
|
2981
|
+
const { point: m } = h, { timestamp: p } = F;
|
|
2982
|
+
this.history.push({ ...m, timestamp: p });
|
|
3031
2983
|
const { onStart: v, onMove: b } = this.handlers;
|
|
3032
2984
|
f || (v && v(this.lastMoveEvent, h), this.startEvent = this.lastMoveEvent), b && b(this.lastMoveEvent, h);
|
|
3033
2985
|
}, this.handlePointerMove = (h, f) => {
|
|
3034
|
-
this.lastMoveEvent = h, this.lastMoveEventInfo =
|
|
2986
|
+
this.lastMoveEvent = h, this.lastMoveEventInfo = Le(f, this.transformPagePoint), V.update(this.updatePoint, !0);
|
|
3035
2987
|
}, this.handlePointerUp = (h, f) => {
|
|
3036
2988
|
this.end();
|
|
3037
|
-
const { onEnd: d, onSessionEnd:
|
|
3038
|
-
if (this.dragSnapToOrigin &&
|
|
2989
|
+
const { onEnd: d, onSessionEnd: m, resumeAnimation: p } = this.handlers;
|
|
2990
|
+
if (this.dragSnapToOrigin && p && p(), !(this.lastMoveEvent && this.lastMoveEventInfo))
|
|
3039
2991
|
return;
|
|
3040
|
-
const v =
|
|
3041
|
-
this.startEvent && d && d(h, v),
|
|
2992
|
+
const v = Ee(h.type === "pointercancel" ? this.lastMoveEventInfo : Le(f, this.transformPagePoint), this.history);
|
|
2993
|
+
this.startEvent && d && d(h, v), m && m(h, v);
|
|
3042
2994
|
}, !vi(e))
|
|
3043
2995
|
return;
|
|
3044
2996
|
this.dragSnapToOrigin = r, this.handlers = n, this.transformPagePoint = s, this.contextWindow = i || window;
|
|
3045
|
-
const o = ve(e), a =
|
|
2997
|
+
const o = ve(e), a = Le(o, this.transformPagePoint), { point: l } = a, { timestamp: c } = F;
|
|
3046
2998
|
this.history = [{ ...l, timestamp: c }];
|
|
3047
2999
|
const { onSessionStart: u } = n;
|
|
3048
|
-
u && u(e,
|
|
3000
|
+
u && u(e, Ee(a, this.history)), this.removeListeners = rt(J(this.contextWindow, "pointermove", this.handlePointerMove), J(this.contextWindow, "pointerup", this.handlePointerUp), J(this.contextWindow, "pointercancel", this.handlePointerUp));
|
|
3049
3001
|
}
|
|
3050
3002
|
updateHandlers(e) {
|
|
3051
3003
|
this.handlers = e;
|
|
@@ -3054,27 +3006,27 @@ class eo {
|
|
|
3054
3006
|
this.removeListeners && this.removeListeners(), et(this.updatePoint);
|
|
3055
3007
|
}
|
|
3056
3008
|
}
|
|
3057
|
-
function
|
|
3009
|
+
function Le(t, e) {
|
|
3058
3010
|
return e ? { point: e(t.point) } : t;
|
|
3059
3011
|
}
|
|
3060
3012
|
function ns(t, e) {
|
|
3061
3013
|
return { x: t.x - e.x, y: t.y - e.y };
|
|
3062
3014
|
}
|
|
3063
|
-
function
|
|
3015
|
+
function Ee({ point: t }, e) {
|
|
3064
3016
|
return {
|
|
3065
3017
|
point: t,
|
|
3066
3018
|
delta: ns(t, no(e)),
|
|
3067
|
-
offset: ns(t,
|
|
3068
|
-
velocity:
|
|
3019
|
+
offset: ns(t, yc(e)),
|
|
3020
|
+
velocity: vc(e, 0.1)
|
|
3069
3021
|
};
|
|
3070
3022
|
}
|
|
3071
|
-
function
|
|
3023
|
+
function yc(t) {
|
|
3072
3024
|
return t[0];
|
|
3073
3025
|
}
|
|
3074
3026
|
function no(t) {
|
|
3075
3027
|
return t[t.length - 1];
|
|
3076
3028
|
}
|
|
3077
|
-
function
|
|
3029
|
+
function vc(t, e) {
|
|
3078
3030
|
if (t.length < 2)
|
|
3079
3031
|
return { x: 0, y: 0 };
|
|
3080
3032
|
let n = t.length - 1, s = null;
|
|
@@ -3095,29 +3047,29 @@ function kc(t, e) {
|
|
|
3095
3047
|
function z(t) {
|
|
3096
3048
|
return t.max - t.min;
|
|
3097
3049
|
}
|
|
3098
|
-
function
|
|
3050
|
+
function Ge(t, e = 0, n = 0.01) {
|
|
3099
3051
|
return Math.abs(t - e) <= n;
|
|
3100
3052
|
}
|
|
3101
3053
|
function ss(t, e, n, s = 0.5) {
|
|
3102
|
-
t.origin = s, t.originPoint =
|
|
3054
|
+
t.origin = s, t.originPoint = L(e.min, e.max, t.origin), t.scale = z(n) / z(e), (Ge(t.scale, 1, 1e-4) || isNaN(t.scale)) && (t.scale = 1), t.translate = L(n.min, n.max, t.origin) - t.originPoint, (Ge(t.translate) || isNaN(t.translate)) && (t.translate = 0);
|
|
3103
3055
|
}
|
|
3104
|
-
function
|
|
3056
|
+
function Ot(t, e, n, s) {
|
|
3105
3057
|
ss(t.x, e.x, n.x, s ? s.originX : void 0), ss(t.y, e.y, n.y, s ? s.originY : void 0);
|
|
3106
3058
|
}
|
|
3107
3059
|
function is(t, e, n) {
|
|
3108
3060
|
t.min = n.min + e.min, t.max = t.min + z(e);
|
|
3109
3061
|
}
|
|
3110
|
-
function
|
|
3062
|
+
function xc(t, e, n) {
|
|
3111
3063
|
is(t.x, e.x, n.x), is(t.y, e.y, n.y);
|
|
3112
3064
|
}
|
|
3113
3065
|
function os(t, e, n) {
|
|
3114
3066
|
t.min = e.min - n.min, t.max = t.min + z(e);
|
|
3115
3067
|
}
|
|
3116
|
-
function
|
|
3068
|
+
function jt(t, e, n) {
|
|
3117
3069
|
os(t.x, e.x, n.x), os(t.y, e.y, n.y);
|
|
3118
3070
|
}
|
|
3119
|
-
function
|
|
3120
|
-
return e !== void 0 && t < e ? t = s ?
|
|
3071
|
+
function bc(t, { min: e, max: n }, s) {
|
|
3072
|
+
return e !== void 0 && t < e ? t = s ? L(e, t, s.min) : Math.max(t, e) : n !== void 0 && t > n && (t = s ? L(n, t, s.max) : Math.min(t, n)), t;
|
|
3121
3073
|
}
|
|
3122
3074
|
function rs(t, e, n) {
|
|
3123
3075
|
return {
|
|
@@ -3125,7 +3077,7 @@ function rs(t, e, n) {
|
|
|
3125
3077
|
max: n !== void 0 ? t.max + n - (t.max - t.min) : void 0
|
|
3126
3078
|
};
|
|
3127
3079
|
}
|
|
3128
|
-
function
|
|
3080
|
+
function wc(t, { top: e, left: n, bottom: s, right: i }) {
|
|
3129
3081
|
return {
|
|
3130
3082
|
x: rs(t.x, n, i),
|
|
3131
3083
|
y: rs(t.y, e, s)
|
|
@@ -3135,24 +3087,24 @@ function as(t, e) {
|
|
|
3135
3087
|
let n = e.min - t.min, s = e.max - t.max;
|
|
3136
3088
|
return e.max - e.min < t.max - t.min && ([n, s] = [s, n]), { min: n, max: s };
|
|
3137
3089
|
}
|
|
3138
|
-
function
|
|
3090
|
+
function Tc(t, e) {
|
|
3139
3091
|
return {
|
|
3140
3092
|
x: as(t.x, e.x),
|
|
3141
3093
|
y: as(t.y, e.y)
|
|
3142
3094
|
};
|
|
3143
3095
|
}
|
|
3144
|
-
function
|
|
3096
|
+
function Pc(t, e) {
|
|
3145
3097
|
let n = 0.5;
|
|
3146
3098
|
const s = z(t), i = z(e);
|
|
3147
3099
|
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);
|
|
3148
3100
|
}
|
|
3149
|
-
function
|
|
3101
|
+
function Ac(t, e) {
|
|
3150
3102
|
const n = {};
|
|
3151
3103
|
return e.min !== void 0 && (n.min = e.min - t.min), e.max !== void 0 && (n.max = e.max - t.min), n;
|
|
3152
3104
|
}
|
|
3153
|
-
const
|
|
3154
|
-
function
|
|
3155
|
-
return t === !1 ? t = 0 : t === !0 && (t =
|
|
3105
|
+
const $e = 0.35;
|
|
3106
|
+
function Sc(t = $e) {
|
|
3107
|
+
return t === !1 ? t = 0 : t === !0 && (t = $e), {
|
|
3156
3108
|
x: ls(t, "left", "right"),
|
|
3157
3109
|
y: ls(t, "top", "bottom")
|
|
3158
3110
|
};
|
|
@@ -3174,11 +3126,11 @@ const us = () => ({
|
|
|
3174
3126
|
}), Pt = () => ({
|
|
3175
3127
|
x: us(),
|
|
3176
3128
|
y: us()
|
|
3177
|
-
}), hs = () => ({ min: 0, max: 0 }),
|
|
3129
|
+
}), hs = () => ({ min: 0, max: 0 }), B = () => ({
|
|
3178
3130
|
x: hs(),
|
|
3179
3131
|
y: hs()
|
|
3180
3132
|
});
|
|
3181
|
-
function
|
|
3133
|
+
function G(t) {
|
|
3182
3134
|
return [t("x"), t("y")];
|
|
3183
3135
|
}
|
|
3184
3136
|
function so({ top: t, left: e, right: n, bottom: s }) {
|
|
@@ -3187,10 +3139,10 @@ function so({ top: t, left: e, right: n, bottom: s }) {
|
|
|
3187
3139
|
y: { min: t, max: s }
|
|
3188
3140
|
};
|
|
3189
3141
|
}
|
|
3190
|
-
function
|
|
3142
|
+
function Vc({ x: t, y: e }) {
|
|
3191
3143
|
return { top: e.min, right: t.max, bottom: e.max, left: t.min };
|
|
3192
3144
|
}
|
|
3193
|
-
function
|
|
3145
|
+
function Cc(t, e) {
|
|
3194
3146
|
if (!e)
|
|
3195
3147
|
return t;
|
|
3196
3148
|
const n = e({ x: t.left, y: t.top }), s = e({ x: t.right, y: t.bottom });
|
|
@@ -3201,11 +3153,11 @@ function Wc(t, e) {
|
|
|
3201
3153
|
right: s.x
|
|
3202
3154
|
};
|
|
3203
3155
|
}
|
|
3204
|
-
function
|
|
3156
|
+
function ke(t) {
|
|
3205
3157
|
return t === void 0 || t === 1;
|
|
3206
3158
|
}
|
|
3207
3159
|
function He({ scale: t, scaleX: e, scaleY: n }) {
|
|
3208
|
-
return !
|
|
3160
|
+
return !ke(t) || !ke(e) || !ke(n);
|
|
3209
3161
|
}
|
|
3210
3162
|
function dt(t) {
|
|
3211
3163
|
return He(t) || io(t) || t.z || t.rotate || t.rotateX || t.rotateY;
|
|
@@ -3229,7 +3181,7 @@ function qe(t, e = 0, n = 1, s, i) {
|
|
|
3229
3181
|
function oo(t, { x: e, y: n }) {
|
|
3230
3182
|
qe(t.x, e.translate, e.scale, e.originPoint), qe(t.y, n.translate, n.scale, n.originPoint);
|
|
3231
3183
|
}
|
|
3232
|
-
function
|
|
3184
|
+
function Mc(t, e, n, s = !1) {
|
|
3233
3185
|
const i = n.length;
|
|
3234
3186
|
if (!i)
|
|
3235
3187
|
return;
|
|
@@ -3243,33 +3195,33 @@ function $c(t, e, n, s = !1) {
|
|
|
3243
3195
|
y: -r.scroll.offset.y
|
|
3244
3196
|
}), o && (e.x *= o.x.scale, e.y *= o.y.scale, oo(t, o)), s && dt(r.latestValues) && At(t, r.latestValues));
|
|
3245
3197
|
}
|
|
3246
|
-
e.x =
|
|
3198
|
+
e.x = ms(e.x), e.y = ms(e.y);
|
|
3247
3199
|
}
|
|
3248
|
-
function
|
|
3200
|
+
function ms(t) {
|
|
3249
3201
|
return Number.isInteger(t) || t > 1.0000000000001 || t < 0.999999999999 ? t : 1;
|
|
3250
3202
|
}
|
|
3251
3203
|
function it(t, e) {
|
|
3252
3204
|
t.min = t.min + e, t.max = t.max + e;
|
|
3253
3205
|
}
|
|
3254
|
-
function
|
|
3255
|
-
const r = e[i] !== void 0 ? e[i] : 0.5, o =
|
|
3206
|
+
function ps(t, e, [n, s, i]) {
|
|
3207
|
+
const r = e[i] !== void 0 ? e[i] : 0.5, o = L(t.min, t.max, r);
|
|
3256
3208
|
qe(t, e[n], e[s], o, e.scale);
|
|
3257
3209
|
}
|
|
3258
|
-
const
|
|
3210
|
+
const Dc = ["x", "scaleX", "originX"], Rc = ["y", "scaleY", "originY"];
|
|
3259
3211
|
function At(t, e) {
|
|
3260
|
-
|
|
3212
|
+
ps(t.x, e, Dc), ps(t.y, e, Rc);
|
|
3261
3213
|
}
|
|
3262
3214
|
function ro(t, e) {
|
|
3263
|
-
return so(
|
|
3215
|
+
return so(Cc(t.getBoundingClientRect(), e));
|
|
3264
3216
|
}
|
|
3265
|
-
function
|
|
3217
|
+
function Lc(t, e, n) {
|
|
3266
3218
|
const s = ro(t, n), { scroll: i } = e;
|
|
3267
3219
|
return i && (it(s.x, i.offset.x), it(s.y, i.offset.y)), s;
|
|
3268
3220
|
}
|
|
3269
|
-
const ao = ({ current: t }) => t ? t.ownerDocument.defaultView : null,
|
|
3270
|
-
class
|
|
3221
|
+
const ao = ({ current: t }) => t ? t.ownerDocument.defaultView : null, Ec = /* @__PURE__ */ new WeakMap();
|
|
3222
|
+
class kc {
|
|
3271
3223
|
constructor(e) {
|
|
3272
|
-
this.openGlobalLock = null, this.isDragging = !1, this.currentDirection = null, this.originPoint = { x: 0, y: 0 }, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic =
|
|
3224
|
+
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;
|
|
3273
3225
|
}
|
|
3274
3226
|
start(e, { snapToCursor: n = !1 } = {}) {
|
|
3275
3227
|
const { presenceContext: s } = this.visualElement;
|
|
@@ -3279,10 +3231,10 @@ class Yc {
|
|
|
3279
3231
|
const { dragSnapToOrigin: h } = this.getProps();
|
|
3280
3232
|
h ? this.pauseAnimation() : this.stopAnimation(), n && this.snapToCursor(ve(u, "page").point);
|
|
3281
3233
|
}, r = (u, h) => {
|
|
3282
|
-
const { drag: f, dragPropagation: d, onDragStart:
|
|
3234
|
+
const { drag: f, dragPropagation: d, onDragStart: m } = this.getProps();
|
|
3283
3235
|
if (f && !d && (this.openGlobalLock && this.openGlobalLock(), this.openGlobalLock = bi(f), !this.openGlobalLock))
|
|
3284
3236
|
return;
|
|
3285
|
-
this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0),
|
|
3237
|
+
this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), G((v) => {
|
|
3286
3238
|
let b = this.getAxisMotionValue(v).get() || 0;
|
|
3287
3239
|
if (K.test(b)) {
|
|
3288
3240
|
const { projection: y } = this.visualElement;
|
|
@@ -3292,20 +3244,20 @@ class Yc {
|
|
|
3292
3244
|
}
|
|
3293
3245
|
}
|
|
3294
3246
|
this.originPoint[v] = b;
|
|
3295
|
-
}),
|
|
3296
|
-
const { animationState:
|
|
3297
|
-
|
|
3247
|
+
}), m && V.update(() => m(u, h), !1, !0);
|
|
3248
|
+
const { animationState: p } = this.visualElement;
|
|
3249
|
+
p && p.setActive("whileDrag", !0);
|
|
3298
3250
|
}, o = (u, h) => {
|
|
3299
|
-
const { dragPropagation: f, dragDirectionLock: d, onDirectionLock:
|
|
3251
|
+
const { dragPropagation: f, dragDirectionLock: d, onDirectionLock: m, onDrag: p } = this.getProps();
|
|
3300
3252
|
if (!f && !this.openGlobalLock)
|
|
3301
3253
|
return;
|
|
3302
3254
|
const { offset: v } = h;
|
|
3303
3255
|
if (d && this.currentDirection === null) {
|
|
3304
|
-
this.currentDirection =
|
|
3256
|
+
this.currentDirection = Bc(v), this.currentDirection !== null && m && m(this.currentDirection);
|
|
3305
3257
|
return;
|
|
3306
3258
|
}
|
|
3307
|
-
this.updateAxis("x", h.point, v), this.updateAxis("y", h.point, v), this.visualElement.render(),
|
|
3308
|
-
}, a = (u, h) => this.stop(u, h), l = () =>
|
|
3259
|
+
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 = () => G((u) => {
|
|
3309
3261
|
var h;
|
|
3310
3262
|
return this.getAnimationState(u) === "paused" && ((h = this.getAxisMotionValue(u).animation) === null || h === void 0 ? void 0 : h.play());
|
|
3311
3263
|
}), { dragSnapToOrigin: c } = this.getProps();
|
|
@@ -3343,13 +3295,13 @@ class Yc {
|
|
|
3343
3295
|
return;
|
|
3344
3296
|
const r = this.getAxisMotionValue(e);
|
|
3345
3297
|
let o = this.originPoint[e] + s[e];
|
|
3346
|
-
this.constraints && this.constraints[e] && (o =
|
|
3298
|
+
this.constraints && this.constraints[e] && (o = bc(o, this.constraints[e], this.elastic[e])), r.set(o);
|
|
3347
3299
|
}
|
|
3348
3300
|
resolveConstraints() {
|
|
3349
3301
|
var e;
|
|
3350
3302
|
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;
|
|
3351
|
-
n && wt(n) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : n && i ? this.constraints =
|
|
3352
|
-
this.getAxisMotionValue(o) && (this.constraints[o] =
|
|
3303
|
+
n && wt(n) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : n && i ? this.constraints = wc(i.layoutBox, n) : this.constraints = !1, this.elastic = Sc(s), r !== this.constraints && i && this.constraints && !this.hasMutatedConstraints && G((o) => {
|
|
3304
|
+
this.getAxisMotionValue(o) && (this.constraints[o] = Ac(i.layoutBox[o], this.constraints[o]));
|
|
3353
3305
|
});
|
|
3354
3306
|
}
|
|
3355
3307
|
resolveRefConstraints() {
|
|
@@ -3361,21 +3313,21 @@ class Yc {
|
|
|
3361
3313
|
const { projection: i } = this.visualElement;
|
|
3362
3314
|
if (!i || !i.layout)
|
|
3363
3315
|
return !1;
|
|
3364
|
-
const r =
|
|
3365
|
-
let o =
|
|
3316
|
+
const r = Lc(s, i.root, this.visualElement.getTransformPagePoint());
|
|
3317
|
+
let o = Tc(i.layout.layoutBox, r);
|
|
3366
3318
|
if (n) {
|
|
3367
|
-
const a = n(
|
|
3319
|
+
const a = n(Vc(o));
|
|
3368
3320
|
this.hasMutatedConstraints = !!a, a && (o = so(a));
|
|
3369
3321
|
}
|
|
3370
3322
|
return o;
|
|
3371
3323
|
}
|
|
3372
3324
|
startAnimation(e) {
|
|
3373
|
-
const { drag: n, dragMomentum: s, dragElastic: i, dragTransition: r, dragSnapToOrigin: o, onDragTransitionEnd: a } = this.getProps(), l = this.constraints || {}, c =
|
|
3325
|
+
const { drag: n, dragMomentum: s, dragElastic: i, dragTransition: r, dragSnapToOrigin: o, onDragTransitionEnd: a } = this.getProps(), l = this.constraints || {}, c = G((u) => {
|
|
3374
3326
|
if (!Jt(u, n, this.currentDirection))
|
|
3375
3327
|
return;
|
|
3376
3328
|
let h = l && l[u] || {};
|
|
3377
3329
|
o && (h = { min: 0, max: 0 });
|
|
3378
|
-
const f = i ? 200 : 1e6, d = i ? 40 : 1e7,
|
|
3330
|
+
const f = i ? 200 : 1e6, d = i ? 40 : 1e7, m = {
|
|
3379
3331
|
type: "inertia",
|
|
3380
3332
|
velocity: s ? e[u] : 0,
|
|
3381
3333
|
bounceStiffness: f,
|
|
@@ -3386,7 +3338,7 @@ class Yc {
|
|
|
3386
3338
|
...r,
|
|
3387
3339
|
...h
|
|
3388
3340
|
};
|
|
3389
|
-
return this.startAxisValueAnimation(u,
|
|
3341
|
+
return this.startAxisValueAnimation(u, m);
|
|
3390
3342
|
});
|
|
3391
3343
|
return Promise.all(c).then(a);
|
|
3392
3344
|
}
|
|
@@ -3395,10 +3347,10 @@ class Yc {
|
|
|
3395
3347
|
return s.start(bn(e, s, 0, n));
|
|
3396
3348
|
}
|
|
3397
3349
|
stopAnimation() {
|
|
3398
|
-
|
|
3350
|
+
G((e) => this.getAxisMotionValue(e).stop());
|
|
3399
3351
|
}
|
|
3400
3352
|
pauseAnimation() {
|
|
3401
|
-
|
|
3353
|
+
G((e) => {
|
|
3402
3354
|
var n;
|
|
3403
3355
|
return (n = this.getAxisMotionValue(e).animation) === null || n === void 0 ? void 0 : n.pause();
|
|
3404
3356
|
});
|
|
@@ -3418,14 +3370,14 @@ class Yc {
|
|
|
3418
3370
|
return i || this.visualElement.getValue(e, (s.initial ? s.initial[e] : void 0) || 0);
|
|
3419
3371
|
}
|
|
3420
3372
|
snapToCursor(e) {
|
|
3421
|
-
|
|
3373
|
+
G((n) => {
|
|
3422
3374
|
const { drag: s } = this.getProps();
|
|
3423
3375
|
if (!Jt(n, s, this.currentDirection))
|
|
3424
3376
|
return;
|
|
3425
3377
|
const { projection: i } = this.visualElement, r = this.getAxisMotionValue(n);
|
|
3426
3378
|
if (i && i.layout) {
|
|
3427
3379
|
const { min: o, max: a } = i.layout.layoutBox[n];
|
|
3428
|
-
r.set(e[n] -
|
|
3380
|
+
r.set(e[n] - L(o, a, 0.5));
|
|
3429
3381
|
}
|
|
3430
3382
|
});
|
|
3431
3383
|
}
|
|
@@ -3442,25 +3394,25 @@ class Yc {
|
|
|
3442
3394
|
return;
|
|
3443
3395
|
this.stopAnimation();
|
|
3444
3396
|
const i = { x: 0, y: 0 };
|
|
3445
|
-
|
|
3397
|
+
G((o) => {
|
|
3446
3398
|
const a = this.getAxisMotionValue(o);
|
|
3447
3399
|
if (a) {
|
|
3448
3400
|
const l = a.get();
|
|
3449
|
-
i[o] =
|
|
3401
|
+
i[o] = Pc({ min: l, max: l }, this.constraints[o]);
|
|
3450
3402
|
}
|
|
3451
3403
|
});
|
|
3452
3404
|
const { transformTemplate: r } = this.visualElement.getProps();
|
|
3453
|
-
this.visualElement.current.style.transform = r ? r({}, "") : "none", s.root && s.root.updateScroll(), s.updateLayout(), this.resolveConstraints(),
|
|
3405
|
+
this.visualElement.current.style.transform = r ? r({}, "") : "none", s.root && s.root.updateScroll(), s.updateLayout(), this.resolveConstraints(), G((o) => {
|
|
3454
3406
|
if (!Jt(o, e, null))
|
|
3455
3407
|
return;
|
|
3456
3408
|
const a = this.getAxisMotionValue(o), { min: l, max: c } = this.constraints[o];
|
|
3457
|
-
a.set(
|
|
3409
|
+
a.set(L(l, c, i[o]));
|
|
3458
3410
|
});
|
|
3459
3411
|
}
|
|
3460
3412
|
addListeners() {
|
|
3461
3413
|
if (!this.visualElement.current)
|
|
3462
3414
|
return;
|
|
3463
|
-
|
|
3415
|
+
Ec.set(this.visualElement, this);
|
|
3464
3416
|
const e = this.visualElement.current, n = J(e, "pointerdown", (l) => {
|
|
3465
3417
|
const { drag: c, dragListener: u = !0 } = this.getProps();
|
|
3466
3418
|
c && u && this.start(l);
|
|
@@ -3470,7 +3422,7 @@ class Yc {
|
|
|
3470
3422
|
}, { projection: i } = this.visualElement, r = i.addEventListener("measure", s);
|
|
3471
3423
|
i && !i.layout && (i.root && i.root.updateScroll(), i.updateLayout()), s();
|
|
3472
3424
|
const o = Z(window, "resize", () => this.scalePositionWithinConstraints()), a = i.addEventListener("didUpdate", ({ delta: l, hasLayoutChanged: c }) => {
|
|
3473
|
-
this.isDragging && c && (
|
|
3425
|
+
this.isDragging && c && (G((u) => {
|
|
3474
3426
|
const h = this.getAxisMotionValue(u);
|
|
3475
3427
|
h && (this.originPoint[u] += l[u].translate, h.set(h.get() + l[u].translate));
|
|
3476
3428
|
}), this.visualElement.render());
|
|
@@ -3480,7 +3432,7 @@ class Yc {
|
|
|
3480
3432
|
};
|
|
3481
3433
|
}
|
|
3482
3434
|
getProps() {
|
|
3483
|
-
const e = this.visualElement.getProps(), { drag: n = !1, dragDirectionLock: s = !1, dragPropagation: i = !1, dragConstraints: r = !1, dragElastic: o =
|
|
3435
|
+
const e = this.visualElement.getProps(), { drag: n = !1, dragDirectionLock: s = !1, dragPropagation: i = !1, dragConstraints: r = !1, dragElastic: o = $e, dragMomentum: a = !0 } = e;
|
|
3484
3436
|
return {
|
|
3485
3437
|
...e,
|
|
3486
3438
|
drag: n,
|
|
@@ -3495,17 +3447,17 @@ class Yc {
|
|
|
3495
3447
|
function Jt(t, e, n) {
|
|
3496
3448
|
return (e === !0 || e === t) && (n === null || n === t);
|
|
3497
3449
|
}
|
|
3498
|
-
function
|
|
3450
|
+
function Bc(t, e = 10) {
|
|
3499
3451
|
let n = null;
|
|
3500
3452
|
return Math.abs(t.y) > e ? n = "y" : Math.abs(t.x) > e && (n = "x"), n;
|
|
3501
3453
|
}
|
|
3502
|
-
class
|
|
3454
|
+
class Ic extends ut {
|
|
3503
3455
|
constructor(e) {
|
|
3504
|
-
super(e), this.removeGroupControls =
|
|
3456
|
+
super(e), this.removeGroupControls = k, this.removeListeners = k, this.controls = new kc(e);
|
|
3505
3457
|
}
|
|
3506
3458
|
mount() {
|
|
3507
3459
|
const { dragControls: e } = this.node.getProps();
|
|
3508
|
-
e && (this.removeGroupControls = e.subscribe(this.controls)), this.removeListeners = this.controls.addListeners() ||
|
|
3460
|
+
e && (this.removeGroupControls = e.subscribe(this.controls)), this.removeListeners = this.controls.addListeners() || k;
|
|
3509
3461
|
}
|
|
3510
3462
|
unmount() {
|
|
3511
3463
|
this.removeGroupControls(), this.removeListeners();
|
|
@@ -3514,9 +3466,9 @@ class Qc extends ut {
|
|
|
3514
3466
|
const gs = (t) => (e, n) => {
|
|
3515
3467
|
t && V.update(() => t(e, n));
|
|
3516
3468
|
};
|
|
3517
|
-
class
|
|
3469
|
+
class Fc extends ut {
|
|
3518
3470
|
constructor() {
|
|
3519
|
-
super(...arguments), this.removePointerDownListener =
|
|
3471
|
+
super(...arguments), this.removePointerDownListener = k;
|
|
3520
3472
|
}
|
|
3521
3473
|
onPointerDown(e) {
|
|
3522
3474
|
this.session = new eo(e, this.createPanHandlers(), {
|
|
@@ -3545,8 +3497,8 @@ class Zc extends ut {
|
|
|
3545
3497
|
this.removePointerDownListener(), this.session && this.session.end();
|
|
3546
3498
|
}
|
|
3547
3499
|
}
|
|
3548
|
-
function
|
|
3549
|
-
const t =
|
|
3500
|
+
function Oc() {
|
|
3501
|
+
const t = U(sn);
|
|
3550
3502
|
if (t === null)
|
|
3551
3503
|
return [!0, null];
|
|
3552
3504
|
const { isPresent: e, onExitComplete: n, register: s } = t, i = Mo();
|
|
@@ -3567,7 +3519,7 @@ const ne = {
|
|
|
3567
3519
|
function ys(t, e) {
|
|
3568
3520
|
return e.max === e.min ? 0 : t / (e.max - e.min) * 100;
|
|
3569
3521
|
}
|
|
3570
|
-
const
|
|
3522
|
+
const kt = {
|
|
3571
3523
|
correct: (t, e) => {
|
|
3572
3524
|
if (!e.target)
|
|
3573
3525
|
return t;
|
|
@@ -3579,18 +3531,18 @@ const Et = {
|
|
|
3579
3531
|
const n = ys(t, e.target.x), s = ys(t, e.target.y);
|
|
3580
3532
|
return `${n}% ${s}%`;
|
|
3581
3533
|
}
|
|
3582
|
-
},
|
|
3534
|
+
}, jc = {
|
|
3583
3535
|
correct: (t, { treeScale: e, projectionDelta: n }) => {
|
|
3584
3536
|
const s = t, i = ct.parse(t);
|
|
3585
3537
|
if (i.length > 5)
|
|
3586
3538
|
return s;
|
|
3587
3539
|
const r = ct.createTransformer(t), o = typeof i[0] != "number" ? 1 : 0, a = n.x.scale * e.x, l = n.y.scale * e.y;
|
|
3588
3540
|
i[0 + o] /= a, i[1 + o] /= l;
|
|
3589
|
-
const c =
|
|
3541
|
+
const c = L(a, l, 0.5);
|
|
3590
3542
|
return typeof i[2 + o] == "number" && (i[2 + o] /= c), typeof i[3 + o] == "number" && (i[3 + o] /= c), r(i);
|
|
3591
3543
|
}
|
|
3592
3544
|
};
|
|
3593
|
-
class
|
|
3545
|
+
class Nc extends zs.Component {
|
|
3594
3546
|
/**
|
|
3595
3547
|
* This only mounts projection nodes for components that
|
|
3596
3548
|
* need measuring, we might want to do it for all components
|
|
@@ -3598,7 +3550,7 @@ class eu extends zs.Component {
|
|
|
3598
3550
|
*/
|
|
3599
3551
|
componentDidMount() {
|
|
3600
3552
|
const { visualElement: e, layoutGroup: n, switchLayoutGroup: s, layoutId: i } = this.props, { projection: r } = e;
|
|
3601
|
-
|
|
3553
|
+
qr(Uc), r && (n.group && n.group.add(r), s && s.register && i && s.register(r), r.root.didUpdate(), r.addEventListener("animationComplete", () => {
|
|
3602
3554
|
this.safeToRemove();
|
|
3603
3555
|
}), r.setOptions({
|
|
3604
3556
|
...r.options,
|
|
@@ -3631,12 +3583,12 @@ class eu extends zs.Component {
|
|
|
3631
3583
|
}
|
|
3632
3584
|
}
|
|
3633
3585
|
function lo(t) {
|
|
3634
|
-
const [e, n] =
|
|
3635
|
-
return zs.createElement(
|
|
3586
|
+
const [e, n] = Oc(), s = U(si);
|
|
3587
|
+
return zs.createElement(Nc, { ...t, layoutGroup: s, switchLayoutGroup: U(ii), isPresent: e, safeToRemove: n });
|
|
3636
3588
|
}
|
|
3637
|
-
const
|
|
3589
|
+
const Uc = {
|
|
3638
3590
|
borderRadius: {
|
|
3639
|
-
...
|
|
3591
|
+
...kt,
|
|
3640
3592
|
applyTo: [
|
|
3641
3593
|
"borderTopLeftRadius",
|
|
3642
3594
|
"borderTopRightRadius",
|
|
@@ -3644,32 +3596,32 @@ const nu = {
|
|
|
3644
3596
|
"borderBottomRightRadius"
|
|
3645
3597
|
]
|
|
3646
3598
|
},
|
|
3647
|
-
borderTopLeftRadius:
|
|
3648
|
-
borderTopRightRadius:
|
|
3649
|
-
borderBottomLeftRadius:
|
|
3650
|
-
borderBottomRightRadius:
|
|
3651
|
-
boxShadow:
|
|
3652
|
-
}, co = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"],
|
|
3653
|
-
function
|
|
3654
|
-
i ? (t.opacity =
|
|
3599
|
+
borderTopLeftRadius: kt,
|
|
3600
|
+
borderTopRightRadius: kt,
|
|
3601
|
+
borderBottomLeftRadius: kt,
|
|
3602
|
+
borderBottomRightRadius: kt,
|
|
3603
|
+
boxShadow: jc
|
|
3604
|
+
}, co = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"], _c = co.length, vs = (t) => typeof t == "string" ? parseFloat(t) : t, xs = (t) => typeof t == "number" || w.test(t);
|
|
3605
|
+
function zc(t, e, n, s, i, r) {
|
|
3606
|
+
i ? (t.opacity = L(
|
|
3655
3607
|
0,
|
|
3656
3608
|
// TODO Reinstate this if only child
|
|
3657
3609
|
n.opacity !== void 0 ? n.opacity : 1,
|
|
3658
|
-
|
|
3659
|
-
), t.opacityExit =
|
|
3660
|
-
for (let o = 0; o <
|
|
3610
|
+
Wc(s)
|
|
3611
|
+
), t.opacityExit = L(e.opacity !== void 0 ? e.opacity : 1, 0, Gc(s))) : r && (t.opacity = L(e.opacity !== void 0 ? e.opacity : 1, n.opacity !== void 0 ? n.opacity : 1, s));
|
|
3612
|
+
for (let o = 0; o < _c; o++) {
|
|
3661
3613
|
const a = `border${co[o]}Radius`;
|
|
3662
3614
|
let l = bs(e, a), c = bs(n, a);
|
|
3663
3615
|
if (l === void 0 && c === void 0)
|
|
3664
3616
|
continue;
|
|
3665
|
-
l || (l = 0), c || (c = 0), l === 0 || c === 0 || xs(l) === xs(c) ? (t[a] = Math.max(
|
|
3617
|
+
l || (l = 0), c || (c = 0), l === 0 || c === 0 || xs(l) === xs(c) ? (t[a] = Math.max(L(vs(l), vs(c), s), 0), (K.test(c) || K.test(l)) && (t[a] += "%")) : t[a] = c;
|
|
3666
3618
|
}
|
|
3667
|
-
(e.rotate || n.rotate) && (t.rotate =
|
|
3619
|
+
(e.rotate || n.rotate) && (t.rotate = L(e.rotate || 0, n.rotate || 0, s));
|
|
3668
3620
|
}
|
|
3669
3621
|
function bs(t, e) {
|
|
3670
3622
|
return t[e] !== void 0 ? t[e] : t.borderRadius;
|
|
3671
3623
|
}
|
|
3672
|
-
const
|
|
3624
|
+
const Wc = uo(0, 0.5, Ei), Gc = uo(0.5, 0.95, k);
|
|
3673
3625
|
function uo(t, e, n) {
|
|
3674
3626
|
return (s) => s < t ? 0 : s > e ? 1 : n(zt(t, e, s));
|
|
3675
3627
|
}
|
|
@@ -3682,18 +3634,18 @@ function W(t, e) {
|
|
|
3682
3634
|
function Ts(t, e, n, s, i) {
|
|
3683
3635
|
return t -= e, t = ue(t, 1 / n, s), i !== void 0 && (t = ue(t, 1 / i, s)), t;
|
|
3684
3636
|
}
|
|
3685
|
-
function
|
|
3686
|
-
if (K.test(e) && (e = parseFloat(e), e =
|
|
3637
|
+
function $c(t, e = 0, n = 1, s = 0.5, i, r = t, o = t) {
|
|
3638
|
+
if (K.test(e) && (e = parseFloat(e), e = L(o.min, o.max, e / 100) - o.min), typeof e != "number")
|
|
3687
3639
|
return;
|
|
3688
|
-
let a =
|
|
3640
|
+
let a = L(r.min, r.max, s);
|
|
3689
3641
|
t === r && (a -= e), t.min = Ts(t.min, e, n, a, i), t.max = Ts(t.max, e, n, a, i);
|
|
3690
3642
|
}
|
|
3691
3643
|
function Ps(t, e, [n, s, i], r, o) {
|
|
3692
|
-
|
|
3644
|
+
$c(t, e[n], e[s], e[i], e.scale, r, o);
|
|
3693
3645
|
}
|
|
3694
|
-
const
|
|
3646
|
+
const Hc = ["x", "scaleX", "originX"], qc = ["y", "scaleY", "originY"];
|
|
3695
3647
|
function As(t, e, n, s) {
|
|
3696
|
-
Ps(t.x, e,
|
|
3648
|
+
Ps(t.x, e, Hc, n ? n.x : void 0, s ? s.x : void 0), Ps(t.y, e, qc, n ? n.y : void 0, s ? s.y : void 0);
|
|
3697
3649
|
}
|
|
3698
3650
|
function Ss(t) {
|
|
3699
3651
|
return t.translate === 0 && t.scale === 1;
|
|
@@ -3701,7 +3653,7 @@ function Ss(t) {
|
|
|
3701
3653
|
function ho(t) {
|
|
3702
3654
|
return Ss(t.x) && Ss(t.y);
|
|
3703
3655
|
}
|
|
3704
|
-
function
|
|
3656
|
+
function Kc(t, e) {
|
|
3705
3657
|
return t.x.min === e.x.min && t.x.max === e.x.max && t.y.min === e.y.min && t.y.max === e.y.max;
|
|
3706
3658
|
}
|
|
3707
3659
|
function fo(t, e) {
|
|
@@ -3710,7 +3662,7 @@ function fo(t, e) {
|
|
|
3710
3662
|
function Vs(t) {
|
|
3711
3663
|
return z(t.x) / z(t.y);
|
|
3712
3664
|
}
|
|
3713
|
-
class
|
|
3665
|
+
class Yc {
|
|
3714
3666
|
constructor() {
|
|
3715
3667
|
this.members = [];
|
|
3716
3668
|
}
|
|
@@ -3774,8 +3726,8 @@ function Cs(t, e, n) {
|
|
|
3774
3726
|
const o = t.x.scale * e.x, a = t.y.scale * e.y;
|
|
3775
3727
|
return (o !== 1 || a !== 1) && (s += `scale(${o}, ${a})`), s || "none";
|
|
3776
3728
|
}
|
|
3777
|
-
const
|
|
3778
|
-
class
|
|
3729
|
+
const Xc = (t, e) => t.depth - e.depth;
|
|
3730
|
+
class Qc {
|
|
3779
3731
|
constructor() {
|
|
3780
3732
|
this.children = [], this.isDirty = !1;
|
|
3781
3733
|
}
|
|
@@ -3786,45 +3738,45 @@ class du {
|
|
|
3786
3738
|
Tn(this.children, e), this.isDirty = !0;
|
|
3787
3739
|
}
|
|
3788
3740
|
forEach(e) {
|
|
3789
|
-
this.isDirty && this.children.sort(
|
|
3741
|
+
this.isDirty && this.children.sort(Xc), this.isDirty = !1, this.children.forEach(e);
|
|
3790
3742
|
}
|
|
3791
3743
|
}
|
|
3792
|
-
function
|
|
3744
|
+
function Zc(t, e) {
|
|
3793
3745
|
const n = performance.now(), s = ({ timestamp: i }) => {
|
|
3794
3746
|
const r = i - n;
|
|
3795
3747
|
r >= e && (et(s), t(r - e));
|
|
3796
3748
|
};
|
|
3797
3749
|
return V.read(s, !0), () => et(s);
|
|
3798
3750
|
}
|
|
3799
|
-
function
|
|
3751
|
+
function Jc(t) {
|
|
3800
3752
|
window.MotionDebug && window.MotionDebug.record(t);
|
|
3801
3753
|
}
|
|
3802
|
-
function
|
|
3754
|
+
function tu(t) {
|
|
3803
3755
|
return t instanceof SVGElement && t.tagName !== "svg";
|
|
3804
3756
|
}
|
|
3805
|
-
function
|
|
3806
|
-
const s =
|
|
3757
|
+
function eu(t, e, n) {
|
|
3758
|
+
const s = _(t) ? t : Vt(t);
|
|
3807
3759
|
return s.start(bn("", s, e, n)), s.animation;
|
|
3808
3760
|
}
|
|
3809
|
-
const Ms = ["", "X", "Y", "Z"],
|
|
3810
|
-
let
|
|
3811
|
-
const
|
|
3761
|
+
const Ms = ["", "X", "Y", "Z"], nu = { visibility: "hidden" }, Ds = 1e3;
|
|
3762
|
+
let su = 0;
|
|
3763
|
+
const mt = {
|
|
3812
3764
|
type: "projectionFrame",
|
|
3813
3765
|
totalNodes: 0,
|
|
3814
3766
|
resolvedTargetDeltas: 0,
|
|
3815
3767
|
recalculatedProjection: 0
|
|
3816
3768
|
};
|
|
3817
|
-
function
|
|
3769
|
+
function mo({ attachResizeListener: t, defaultParent: e, measureScroll: n, checkIsScrollRoot: s, resetTransform: i }) {
|
|
3818
3770
|
return class {
|
|
3819
3771
|
constructor(o = {}, a = e == null ? void 0 : e()) {
|
|
3820
|
-
this.id =
|
|
3772
|
+
this.id = su++, this.animationId = 0, this.children = /* @__PURE__ */ new Set(), this.options = {}, this.isTreeAnimating = !1, this.isAnimationBlocked = !1, this.isLayoutDirty = !1, this.isProjectionDirty = !1, this.isSharedProjectionDirty = !1, this.isTransformDirty = !1, this.updateManuallyBlocked = !1, this.updateBlockedByResize = !1, this.isUpdating = !1, this.isSVG = !1, this.needsReset = !1, this.shouldResetTransform = !1, this.treeScale = { x: 1, y: 1 }, this.eventHandlers = /* @__PURE__ */ new Map(), this.hasTreeAnimated = !1, this.updateScheduled = !1, this.projectionUpdateScheduled = !1, this.checkUpdateFailed = () => {
|
|
3821
3773
|
this.isUpdating && (this.isUpdating = !1, this.clearAllSnapshots());
|
|
3822
3774
|
}, this.updateProjection = () => {
|
|
3823
|
-
this.projectionUpdateScheduled = !1,
|
|
3775
|
+
this.projectionUpdateScheduled = !1, mt.totalNodes = mt.resolvedTargetDeltas = mt.recalculatedProjection = 0, this.nodes.forEach(ru), this.nodes.forEach(hu), this.nodes.forEach(fu), this.nodes.forEach(au), Jc(mt);
|
|
3824
3776
|
}, this.hasProjected = !1, this.isVisible = !0, this.animationProgress = 0, this.sharedNodes = /* @__PURE__ */ new Map(), this.latestValues = o, this.root = a ? a.root || a : this, this.path = a ? [...a.path, a] : [], this.parent = a, this.depth = a ? a.depth + 1 : 0;
|
|
3825
3777
|
for (let l = 0; l < this.path.length; l++)
|
|
3826
3778
|
this.path[l].shouldResetTransform = !0;
|
|
3827
|
-
this.root === this && (this.nodes = new
|
|
3779
|
+
this.root === this && (this.nodes = new Qc());
|
|
3828
3780
|
}
|
|
3829
3781
|
addEventListener(o, a) {
|
|
3830
3782
|
return this.eventHandlers.has(o) || this.eventHandlers.set(o, new Pn()), this.eventHandlers.get(o).add(a);
|
|
@@ -3842,32 +3794,32 @@ function po({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3842
3794
|
mount(o, a = this.root.hasTreeAnimated) {
|
|
3843
3795
|
if (this.instance)
|
|
3844
3796
|
return;
|
|
3845
|
-
this.isSVG =
|
|
3797
|
+
this.isSVG = tu(o), this.instance = o;
|
|
3846
3798
|
const { layoutId: l, layout: c, visualElement: u } = this.options;
|
|
3847
3799
|
if (u && !u.current && u.mount(o), this.root.nodes.add(this), this.parent && this.parent.children.add(this), a && (c || l) && (this.isLayoutDirty = !0), t) {
|
|
3848
3800
|
let h;
|
|
3849
3801
|
const f = () => this.root.updateBlockedByResize = !1;
|
|
3850
3802
|
t(o, () => {
|
|
3851
|
-
this.root.updateBlockedByResize = !0, h && h(), h =
|
|
3803
|
+
this.root.updateBlockedByResize = !0, h && h(), h = Zc(f, 250), ne.hasAnimatedSinceResize && (ne.hasAnimatedSinceResize = !1, this.nodes.forEach(Ls));
|
|
3852
3804
|
});
|
|
3853
3805
|
}
|
|
3854
|
-
l && this.root.registerSharedNode(l, this), this.options.animate !== !1 && u && (l || c) && this.addEventListener("didUpdate", ({ delta: h, hasLayoutChanged: f, hasRelativeTargetChanged: d, layout:
|
|
3806
|
+
l && this.root.registerSharedNode(l, this), this.options.animate !== !1 && u && (l || c) && this.addEventListener("didUpdate", ({ delta: h, hasLayoutChanged: f, hasRelativeTargetChanged: d, layout: m }) => {
|
|
3855
3807
|
if (this.isTreeAnimationBlocked()) {
|
|
3856
3808
|
this.target = void 0, this.relativeTarget = void 0;
|
|
3857
3809
|
return;
|
|
3858
3810
|
}
|
|
3859
|
-
const
|
|
3811
|
+
const p = this.options.transition || u.getDefaultTransition() || yu, { onLayoutAnimationStart: v, onLayoutAnimationComplete: b } = u.getProps(), y = !this.targetLayout || !fo(this.targetLayout, m) || d, g = !f && d;
|
|
3860
3812
|
if (this.options.layoutRoot || this.resumeFrom && this.resumeFrom.instance || g || f && (y || !this.currentAnimation)) {
|
|
3861
3813
|
this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0), this.setAnimationOrigin(h, g);
|
|
3862
3814
|
const x = {
|
|
3863
|
-
...xn(
|
|
3815
|
+
...xn(p, "layout"),
|
|
3864
3816
|
onPlay: v,
|
|
3865
3817
|
onComplete: b
|
|
3866
3818
|
};
|
|
3867
3819
|
(u.shouldReduceMotion || this.options.layoutRoot) && (x.delay = 0, x.type = !1), this.startAnimation(x);
|
|
3868
3820
|
} else
|
|
3869
|
-
f ||
|
|
3870
|
-
this.targetLayout =
|
|
3821
|
+
f || Ls(this), this.isLead() && this.options.onExitComplete && this.options.onExitComplete();
|
|
3822
|
+
this.targetLayout = m;
|
|
3871
3823
|
});
|
|
3872
3824
|
}
|
|
3873
3825
|
unmount() {
|
|
@@ -3890,7 +3842,7 @@ function po({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3890
3842
|
}
|
|
3891
3843
|
// Note: currently only running on root node
|
|
3892
3844
|
startUpdate() {
|
|
3893
|
-
this.isUpdateBlocked() || (this.isUpdating = !0, this.nodes && this.nodes.forEach(
|
|
3845
|
+
this.isUpdateBlocked() || (this.isUpdating = !0, this.nodes && this.nodes.forEach(du), this.animationId++);
|
|
3894
3846
|
}
|
|
3895
3847
|
getTransformTemplate() {
|
|
3896
3848
|
const { visualElement: o } = this.options;
|
|
@@ -3916,10 +3868,10 @@ function po({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3916
3868
|
}
|
|
3917
3869
|
update() {
|
|
3918
3870
|
if (this.updateScheduled = !1, this.isUpdateBlocked()) {
|
|
3919
|
-
this.unblockUpdate(), this.clearAllSnapshots(), this.nodes.forEach(
|
|
3871
|
+
this.unblockUpdate(), this.clearAllSnapshots(), this.nodes.forEach(Rs);
|
|
3920
3872
|
return;
|
|
3921
3873
|
}
|
|
3922
|
-
this.isUpdating || this.nodes.forEach(
|
|
3874
|
+
this.isUpdating || this.nodes.forEach(cu), this.isUpdating = !1, this.nodes.forEach(uu), this.nodes.forEach(iu), this.nodes.forEach(ou), this.clearAllSnapshots();
|
|
3923
3875
|
const a = performance.now();
|
|
3924
3876
|
F.delta = lt(0, 1e3 / 60, a - F.timestamp), F.timestamp = a, F.isProcessing = !0, Pe.update.process(F), Pe.preRender.process(F), Pe.render.process(F), F.isProcessing = !1;
|
|
3925
3877
|
}
|
|
@@ -3927,7 +3879,7 @@ function po({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3927
3879
|
this.updateScheduled || (this.updateScheduled = !0, queueMicrotask(() => this.update()));
|
|
3928
3880
|
}
|
|
3929
3881
|
clearAllSnapshots() {
|
|
3930
|
-
this.nodes.forEach(
|
|
3882
|
+
this.nodes.forEach(lu), this.sharedNodes.forEach(mu);
|
|
3931
3883
|
}
|
|
3932
3884
|
scheduleUpdateProjection() {
|
|
3933
3885
|
this.projectionUpdateScheduled || (this.projectionUpdateScheduled = !0, V.preRender(this.updateProjection, !1, !0));
|
|
@@ -3950,7 +3902,7 @@ function po({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3950
3902
|
for (let l = 0; l < this.path.length; l++)
|
|
3951
3903
|
this.path[l].updateScroll();
|
|
3952
3904
|
const o = this.layout;
|
|
3953
|
-
this.layout = this.measure(!1), this.layoutCorrected =
|
|
3905
|
+
this.layout = this.measure(!1), this.layoutCorrected = B(), this.isLayoutDirty = !1, this.projectionDelta = void 0, this.notifyListeners("measure", this.layout.layoutBox);
|
|
3954
3906
|
const { visualElement: a } = this.options;
|
|
3955
3907
|
a && a.notify("LayoutMeasure", this.layout.layoutBox, o ? o.layoutBox : void 0);
|
|
3956
3908
|
}
|
|
@@ -3972,7 +3924,7 @@ function po({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3972
3924
|
measure(o = !0) {
|
|
3973
3925
|
const a = this.measurePageBox();
|
|
3974
3926
|
let l = this.removeElementScroll(a);
|
|
3975
|
-
return o && (l = this.removeTransform(l)),
|
|
3927
|
+
return o && (l = this.removeTransform(l)), vu(l), {
|
|
3976
3928
|
animationId: this.root.animationId,
|
|
3977
3929
|
measuredBox: a,
|
|
3978
3930
|
layoutBox: l,
|
|
@@ -3983,12 +3935,12 @@ function po({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3983
3935
|
measurePageBox() {
|
|
3984
3936
|
const { visualElement: o } = this.options;
|
|
3985
3937
|
if (!o)
|
|
3986
|
-
return
|
|
3938
|
+
return B();
|
|
3987
3939
|
const a = o.measureViewportBox(), { scroll: l } = this.root;
|
|
3988
3940
|
return l && (it(a.x, l.offset.x), it(a.y, l.offset.y)), a;
|
|
3989
3941
|
}
|
|
3990
3942
|
removeElementScroll(o) {
|
|
3991
|
-
const a =
|
|
3943
|
+
const a = B();
|
|
3992
3944
|
W(a, o);
|
|
3993
3945
|
for (let l = 0; l < this.path.length; l++) {
|
|
3994
3946
|
const c = this.path[l], { scroll: u, options: h } = c;
|
|
@@ -4004,7 +3956,7 @@ function po({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4004
3956
|
return a;
|
|
4005
3957
|
}
|
|
4006
3958
|
applyTransform(o, a = !1) {
|
|
4007
|
-
const l =
|
|
3959
|
+
const l = B();
|
|
4008
3960
|
W(l, o);
|
|
4009
3961
|
for (let c = 0; c < this.path.length; c++) {
|
|
4010
3962
|
const u = this.path[c];
|
|
@@ -4016,14 +3968,14 @@ function po({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4016
3968
|
return dt(this.latestValues) && At(l, this.latestValues), l;
|
|
4017
3969
|
}
|
|
4018
3970
|
removeTransform(o) {
|
|
4019
|
-
const a =
|
|
3971
|
+
const a = B();
|
|
4020
3972
|
W(a, o);
|
|
4021
3973
|
for (let l = 0; l < this.path.length; l++) {
|
|
4022
3974
|
const c = this.path[l];
|
|
4023
3975
|
if (!c.instance || !dt(c.latestValues))
|
|
4024
3976
|
continue;
|
|
4025
3977
|
He(c.latestValues) && c.updateSnapshot();
|
|
4026
|
-
const u =
|
|
3978
|
+
const u = B(), h = c.measurePageBox();
|
|
4027
3979
|
W(u, h), As(a, c.latestValues, c.snapshot ? c.snapshot.layoutBox : void 0, u);
|
|
4028
3980
|
}
|
|
4029
3981
|
return dt(this.latestValues) && As(a, this.latestValues), a;
|
|
@@ -4055,15 +4007,15 @@ function po({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4055
4007
|
if (!(!this.layout || !(h || f))) {
|
|
4056
4008
|
if (this.resolvedRelativeTargetAt = F.timestamp, !this.targetDelta && !this.relativeTarget) {
|
|
4057
4009
|
const d = this.getClosestProjectingParent();
|
|
4058
|
-
d && d.layout && this.animationProgress !== 1 ? (this.relativeParent = d, this.forceRelativeParentToResolveTarget(), this.relativeTarget =
|
|
4010
|
+
d && d.layout && this.animationProgress !== 1 ? (this.relativeParent = d, this.forceRelativeParentToResolveTarget(), this.relativeTarget = B(), this.relativeTargetOrigin = B(), jt(this.relativeTargetOrigin, this.layout.layoutBox, d.layout.layoutBox), W(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
|
|
4059
4011
|
}
|
|
4060
4012
|
if (!(!this.relativeTarget && !this.targetDelta)) {
|
|
4061
|
-
if (this.target || (this.target =
|
|
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) : W(this.target, this.layout.layoutBox), oo(this.target, this.targetDelta)) : W(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget) {
|
|
4062
4014
|
this.attemptToResolveRelativeTarget = !1;
|
|
4063
4015
|
const d = this.getClosestProjectingParent();
|
|
4064
|
-
d && !!d.resumingFrom == !!this.resumingFrom && !d.options.layoutScroll && d.target && this.animationProgress !== 1 ? (this.relativeParent = d, this.forceRelativeParentToResolveTarget(), this.relativeTarget =
|
|
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(), jt(this.relativeTargetOrigin, this.target, d.target), W(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
|
|
4065
4017
|
}
|
|
4066
|
-
|
|
4018
|
+
mt.resolvedTargetDeltas++;
|
|
4067
4019
|
}
|
|
4068
4020
|
}
|
|
4069
4021
|
}
|
|
@@ -4085,15 +4037,15 @@ function po({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4085
4037
|
return;
|
|
4086
4038
|
W(this.layoutCorrected, this.layout.layoutBox);
|
|
4087
4039
|
const f = this.treeScale.x, d = this.treeScale.y;
|
|
4088
|
-
|
|
4089
|
-
const { target:
|
|
4090
|
-
if (!
|
|
4040
|
+
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
|
+
const { target: m } = a;
|
|
4042
|
+
if (!m) {
|
|
4091
4043
|
this.projectionTransform && (this.projectionDelta = Pt(), this.projectionTransform = "none", this.scheduleRender());
|
|
4092
4044
|
return;
|
|
4093
4045
|
}
|
|
4094
4046
|
this.projectionDelta || (this.projectionDelta = Pt(), this.projectionDeltaWithTransform = Pt());
|
|
4095
|
-
const
|
|
4096
|
-
|
|
4047
|
+
const p = this.projectionTransform;
|
|
4048
|
+
Ot(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++;
|
|
4097
4049
|
}
|
|
4098
4050
|
hide() {
|
|
4099
4051
|
this.isVisible = !1;
|
|
@@ -4111,17 +4063,17 @@ function po({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4111
4063
|
setAnimationOrigin(o, a = !1) {
|
|
4112
4064
|
const l = this.snapshot, c = l ? l.latestValues : {}, u = { ...this.latestValues }, h = Pt();
|
|
4113
4065
|
(!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !a;
|
|
4114
|
-
const f =
|
|
4066
|
+
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));
|
|
4115
4067
|
this.animationProgress = 0;
|
|
4116
4068
|
let g;
|
|
4117
4069
|
this.mixTargetDelta = (x) => {
|
|
4118
4070
|
const P = x / 1e3;
|
|
4119
|
-
|
|
4071
|
+
Es(h.x, o.x, P), Es(h.y, o.y, P), this.setTargetDelta(h), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (jt(f, this.layout.layoutBox, this.relativeParent.layout.layoutBox), pu(this.relativeTarget, this.relativeTargetOrigin, f, P), g && Kc(this.relativeTarget, g) && (this.isProjectionDirty = !1), g || (g = B()), W(g, this.relativeTarget)), p && (this.animationValues = u, zc(u, c, this.latestValues, P, y, b)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = P;
|
|
4120
4072
|
}, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
|
|
4121
4073
|
}
|
|
4122
4074
|
startAnimation(o) {
|
|
4123
4075
|
this.notifyListeners("animationStart"), this.currentAnimation && this.currentAnimation.stop(), this.resumingFrom && this.resumingFrom.currentAnimation && this.resumingFrom.currentAnimation.stop(), this.pendingAnimation && (et(this.pendingAnimation), this.pendingAnimation = void 0), this.pendingAnimation = V.update(() => {
|
|
4124
|
-
ne.hasAnimatedSinceResize = !0, this.currentAnimation =
|
|
4076
|
+
ne.hasAnimatedSinceResize = !0, this.currentAnimation = eu(0, Ds, {
|
|
4125
4077
|
...o,
|
|
4126
4078
|
onUpdate: (a) => {
|
|
4127
4079
|
this.mixTargetDelta(a), o.onUpdate && o.onUpdate(a);
|
|
@@ -4144,18 +4096,18 @@ function po({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4144
4096
|
const o = this.getLead();
|
|
4145
4097
|
let { targetWithTransforms: a, target: l, layout: c, latestValues: u } = o;
|
|
4146
4098
|
if (!(!a || !l || !c)) {
|
|
4147
|
-
if (this !== o && this.layout && c &&
|
|
4148
|
-
l = this.target ||
|
|
4099
|
+
if (this !== o && this.layout && c && po(this.options.animationType, this.layout.layoutBox, c.layoutBox)) {
|
|
4100
|
+
l = this.target || B();
|
|
4149
4101
|
const h = z(this.layout.layoutBox.x);
|
|
4150
4102
|
l.x.min = o.target.x.min, l.x.max = l.x.min + h;
|
|
4151
4103
|
const f = z(this.layout.layoutBox.y);
|
|
4152
4104
|
l.y.min = o.target.y.min, l.y.max = l.y.min + f;
|
|
4153
4105
|
}
|
|
4154
|
-
W(a, l), At(a, u),
|
|
4106
|
+
W(a, l), At(a, u), Ot(this.projectionDeltaWithTransform, this.layoutCorrected, a, u);
|
|
4155
4107
|
}
|
|
4156
4108
|
}
|
|
4157
4109
|
registerSharedNode(o, a) {
|
|
4158
|
-
this.sharedNodes.has(o) || this.sharedNodes.set(o, new
|
|
4110
|
+
this.sharedNodes.has(o) || this.sharedNodes.set(o, new Yc()), this.sharedNodes.get(o).add(a);
|
|
4159
4111
|
const c = a.options.initialPromotionConfig;
|
|
4160
4112
|
a.promote({
|
|
4161
4113
|
transition: c ? c.transition : void 0,
|
|
@@ -4212,7 +4164,7 @@ function po({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4212
4164
|
if (!this.instance || this.isSVG)
|
|
4213
4165
|
return;
|
|
4214
4166
|
if (!this.isVisible)
|
|
4215
|
-
return
|
|
4167
|
+
return nu;
|
|
4216
4168
|
const c = {
|
|
4217
4169
|
visibility: ""
|
|
4218
4170
|
}, u = this.getTransformTemplate();
|
|
@@ -4220,23 +4172,23 @@ function po({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4220
4172
|
return this.needsReset = !1, c.opacity = "", c.pointerEvents = ee(o == null ? void 0 : o.pointerEvents) || "", c.transform = u ? u(this.latestValues, "") : "none", c;
|
|
4221
4173
|
const h = this.getLead();
|
|
4222
4174
|
if (!this.projectionDelta || !this.layout || !h.target) {
|
|
4223
|
-
const
|
|
4224
|
-
return this.options.layoutId && (
|
|
4175
|
+
const p = {};
|
|
4176
|
+
return this.options.layoutId && (p.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, p.pointerEvents = ee(o == null ? void 0 : o.pointerEvents) || ""), this.hasProjected && !dt(this.latestValues) && (p.transform = u ? u({}, "") : "none", this.hasProjected = !1), p;
|
|
4225
4177
|
}
|
|
4226
4178
|
const f = h.animationValues || h.latestValues;
|
|
4227
4179
|
this.applyTransformsToTarget(), c.transform = Cs(this.projectionDeltaWithTransform, this.treeScale, f), u && (c.transform = u(f, c.transform));
|
|
4228
|
-
const { x: d, y:
|
|
4229
|
-
c.transformOrigin = `${d.origin * 100}% ${
|
|
4230
|
-
for (const
|
|
4231
|
-
if (f[
|
|
4180
|
+
const { x: d, y: m } = this.projectionDelta;
|
|
4181
|
+
c.transformOrigin = `${d.origin * 100}% ${m.origin * 100}% 0`, h.animationValues ? c.opacity = h === this ? (l = (a = f.opacity) !== null && a !== void 0 ? a : this.latestValues.opacity) !== null && l !== void 0 ? l : 1 : this.preserveOpacity ? this.latestValues.opacity : f.opacityExit : c.opacity = h === this ? f.opacity !== void 0 ? f.opacity : "" : f.opacityExit !== void 0 ? f.opacityExit : 0;
|
|
4182
|
+
for (const p in se) {
|
|
4183
|
+
if (f[p] === void 0)
|
|
4232
4184
|
continue;
|
|
4233
|
-
const { correct: v, applyTo: b } = se[
|
|
4185
|
+
const { correct: v, applyTo: b } = se[p], y = c.transform === "none" ? f[p] : v(f[p], h);
|
|
4234
4186
|
if (b) {
|
|
4235
4187
|
const g = b.length;
|
|
4236
4188
|
for (let x = 0; x < g; x++)
|
|
4237
4189
|
c[b[x]] = y;
|
|
4238
4190
|
} else
|
|
4239
|
-
c[
|
|
4191
|
+
c[p] = y;
|
|
4240
4192
|
}
|
|
4241
4193
|
return this.options.layoutId && (c.pointerEvents = h === this ? ee(o == null ? void 0 : o.pointerEvents) || "" : "none"), c;
|
|
4242
4194
|
}
|
|
@@ -4248,29 +4200,29 @@ function po({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
4248
4200
|
this.root.nodes.forEach((o) => {
|
|
4249
4201
|
var a;
|
|
4250
4202
|
return (a = o.currentAnimation) === null || a === void 0 ? void 0 : a.stop();
|
|
4251
|
-
}), this.root.nodes.forEach(
|
|
4203
|
+
}), this.root.nodes.forEach(Rs), this.root.sharedNodes.clear();
|
|
4252
4204
|
}
|
|
4253
4205
|
};
|
|
4254
4206
|
}
|
|
4255
|
-
function
|
|
4207
|
+
function iu(t) {
|
|
4256
4208
|
t.updateLayout();
|
|
4257
4209
|
}
|
|
4258
|
-
function
|
|
4210
|
+
function ou(t) {
|
|
4259
4211
|
var e;
|
|
4260
4212
|
const n = ((e = t.resumeFrom) === null || e === void 0 ? void 0 : e.snapshot) || t.snapshot;
|
|
4261
4213
|
if (t.isLead() && t.layout && n && t.hasListeners("didUpdate")) {
|
|
4262
4214
|
const { layoutBox: s, measuredBox: i } = t.layout, { animationType: r } = t.options, o = n.source !== t.layout.source;
|
|
4263
|
-
r === "size" ?
|
|
4215
|
+
r === "size" ? G((h) => {
|
|
4264
4216
|
const f = o ? n.measuredBox[h] : n.layoutBox[h], d = z(f);
|
|
4265
4217
|
f.min = s[h].min, f.max = f.min + d;
|
|
4266
|
-
}) :
|
|
4218
|
+
}) : po(r, n.layoutBox, s) && G((h) => {
|
|
4267
4219
|
const f = o ? n.measuredBox[h] : n.layoutBox[h], d = z(s[h]);
|
|
4268
4220
|
f.max = f.min + d, t.relativeTarget && !t.currentAnimation && (t.isProjectionDirty = !0, t.relativeTarget[h].max = t.relativeTarget[h].min + d);
|
|
4269
4221
|
});
|
|
4270
4222
|
const a = Pt();
|
|
4271
|
-
|
|
4223
|
+
Ot(a, s, n.layoutBox);
|
|
4272
4224
|
const l = Pt();
|
|
4273
|
-
o ?
|
|
4225
|
+
o ? Ot(l, t.applyTransform(i, !0), n.measuredBox) : Ot(l, s, n.layoutBox);
|
|
4274
4226
|
const c = !ho(a);
|
|
4275
4227
|
let u = !1;
|
|
4276
4228
|
if (!t.resumeFrom) {
|
|
@@ -4278,10 +4230,10 @@ function wu(t) {
|
|
|
4278
4230
|
if (h && !h.resumeFrom) {
|
|
4279
4231
|
const { snapshot: f, layout: d } = h;
|
|
4280
4232
|
if (f && d) {
|
|
4281
|
-
const
|
|
4282
|
-
|
|
4283
|
-
const
|
|
4284
|
-
|
|
4233
|
+
const m = B();
|
|
4234
|
+
jt(m, n.layoutBox, f.layoutBox);
|
|
4235
|
+
const p = B();
|
|
4236
|
+
jt(p, s, d.layoutBox), fo(m, p) || (u = !0), h.options.layoutRoot && (t.relativeTarget = p, t.relativeTargetOrigin = m, t.relativeParent = h);
|
|
4285
4237
|
}
|
|
4286
4238
|
}
|
|
4287
4239
|
}
|
|
@@ -4299,111 +4251,111 @@ function wu(t) {
|
|
|
4299
4251
|
}
|
|
4300
4252
|
t.options.transition = void 0;
|
|
4301
4253
|
}
|
|
4302
|
-
function
|
|
4303
|
-
|
|
4254
|
+
function ru(t) {
|
|
4255
|
+
mt.totalNodes++, t.parent && (t.isProjecting() || (t.isProjectionDirty = t.parent.isProjectionDirty), t.isSharedProjectionDirty || (t.isSharedProjectionDirty = !!(t.isProjectionDirty || t.parent.isProjectionDirty || t.parent.isSharedProjectionDirty)), t.isTransformDirty || (t.isTransformDirty = t.parent.isTransformDirty));
|
|
4304
4256
|
}
|
|
4305
|
-
function
|
|
4257
|
+
function au(t) {
|
|
4306
4258
|
t.isProjectionDirty = t.isSharedProjectionDirty = t.isTransformDirty = !1;
|
|
4307
4259
|
}
|
|
4308
|
-
function
|
|
4260
|
+
function lu(t) {
|
|
4309
4261
|
t.clearSnapshot();
|
|
4310
4262
|
}
|
|
4311
|
-
function
|
|
4263
|
+
function Rs(t) {
|
|
4312
4264
|
t.clearMeasurements();
|
|
4313
4265
|
}
|
|
4314
|
-
function
|
|
4266
|
+
function cu(t) {
|
|
4315
4267
|
t.isLayoutDirty = !1;
|
|
4316
4268
|
}
|
|
4317
|
-
function
|
|
4269
|
+
function uu(t) {
|
|
4318
4270
|
const { visualElement: e } = t.options;
|
|
4319
4271
|
e && e.getProps().onBeforeLayoutMeasure && e.notify("BeforeLayoutMeasure"), t.resetTransform();
|
|
4320
4272
|
}
|
|
4321
|
-
function
|
|
4273
|
+
function Ls(t) {
|
|
4322
4274
|
t.finishAnimation(), t.targetDelta = t.relativeTarget = t.target = void 0, t.isProjectionDirty = !0;
|
|
4323
4275
|
}
|
|
4324
|
-
function
|
|
4276
|
+
function hu(t) {
|
|
4325
4277
|
t.resolveTargetDelta();
|
|
4326
4278
|
}
|
|
4327
|
-
function
|
|
4279
|
+
function fu(t) {
|
|
4328
4280
|
t.calcProjection();
|
|
4329
4281
|
}
|
|
4330
|
-
function
|
|
4282
|
+
function du(t) {
|
|
4331
4283
|
t.resetRotation();
|
|
4332
4284
|
}
|
|
4333
|
-
function
|
|
4285
|
+
function mu(t) {
|
|
4334
4286
|
t.removeLeadSnapshot();
|
|
4335
4287
|
}
|
|
4336
|
-
function
|
|
4337
|
-
t.translate =
|
|
4288
|
+
function Es(t, e, n) {
|
|
4289
|
+
t.translate = L(e.translate, 0, n), t.scale = L(e.scale, 1, n), t.origin = e.origin, t.originPoint = e.originPoint;
|
|
4338
4290
|
}
|
|
4339
|
-
function
|
|
4340
|
-
t.min =
|
|
4291
|
+
function ks(t, e, n, s) {
|
|
4292
|
+
t.min = L(e.min, n.min, s), t.max = L(e.max, n.max, s);
|
|
4341
4293
|
}
|
|
4342
|
-
function
|
|
4343
|
-
|
|
4294
|
+
function pu(t, e, n, s) {
|
|
4295
|
+
ks(t.x, e.x, n.x, s), ks(t.y, e.y, n.y, s);
|
|
4344
4296
|
}
|
|
4345
|
-
function
|
|
4297
|
+
function gu(t) {
|
|
4346
4298
|
return t.animationValues && t.animationValues.opacityExit !== void 0;
|
|
4347
4299
|
}
|
|
4348
|
-
const
|
|
4300
|
+
const yu = {
|
|
4349
4301
|
duration: 0.45,
|
|
4350
4302
|
ease: [0.4, 0, 0.1, 1]
|
|
4351
|
-
},
|
|
4352
|
-
function
|
|
4353
|
-
t.min =
|
|
4303
|
+
}, Bs = (t) => typeof navigator < "u" && navigator.userAgent.toLowerCase().includes(t), Is = Bs("applewebkit/") && !Bs("chrome/") ? Math.round : k;
|
|
4304
|
+
function Fs(t) {
|
|
4305
|
+
t.min = Is(t.min), t.max = Is(t.max);
|
|
4354
4306
|
}
|
|
4355
|
-
function
|
|
4356
|
-
|
|
4307
|
+
function vu(t) {
|
|
4308
|
+
Fs(t.x), Fs(t.y);
|
|
4357
4309
|
}
|
|
4358
|
-
function
|
|
4359
|
-
return t === "position" || t === "preserve-aspect" &&
|
|
4310
|
+
function po(t, e, n) {
|
|
4311
|
+
return t === "position" || t === "preserve-aspect" && !Ge(Vs(e), Vs(n), 0.2);
|
|
4360
4312
|
}
|
|
4361
|
-
const
|
|
4313
|
+
const xu = mo({
|
|
4362
4314
|
attachResizeListener: (t, e) => Z(t, "resize", e),
|
|
4363
4315
|
measureScroll: () => ({
|
|
4364
4316
|
x: document.documentElement.scrollLeft || document.body.scrollLeft,
|
|
4365
4317
|
y: document.documentElement.scrollTop || document.body.scrollTop
|
|
4366
4318
|
}),
|
|
4367
4319
|
checkIsScrollRoot: () => !0
|
|
4368
|
-
}),
|
|
4320
|
+
}), Be = {
|
|
4369
4321
|
current: void 0
|
|
4370
|
-
}, go =
|
|
4322
|
+
}, go = mo({
|
|
4371
4323
|
measureScroll: (t) => ({
|
|
4372
4324
|
x: t.scrollLeft,
|
|
4373
4325
|
y: t.scrollTop
|
|
4374
4326
|
}),
|
|
4375
4327
|
defaultParent: () => {
|
|
4376
|
-
if (!
|
|
4377
|
-
const t = new
|
|
4378
|
-
t.mount(window), t.setOptions({ layoutScroll: !0 }),
|
|
4328
|
+
if (!Be.current) {
|
|
4329
|
+
const t = new xu({});
|
|
4330
|
+
t.mount(window), t.setOptions({ layoutScroll: !0 }), Be.current = t;
|
|
4379
4331
|
}
|
|
4380
|
-
return
|
|
4332
|
+
return Be.current;
|
|
4381
4333
|
},
|
|
4382
4334
|
resetTransform: (t, e) => {
|
|
4383
4335
|
t.style.transform = e !== void 0 ? e : "none";
|
|
4384
4336
|
},
|
|
4385
4337
|
checkIsScrollRoot: (t) => window.getComputedStyle(t).position === "fixed"
|
|
4386
|
-
}),
|
|
4338
|
+
}), bu = {
|
|
4387
4339
|
pan: {
|
|
4388
|
-
Feature:
|
|
4340
|
+
Feature: Fc
|
|
4389
4341
|
},
|
|
4390
4342
|
drag: {
|
|
4391
|
-
Feature:
|
|
4343
|
+
Feature: Ic,
|
|
4392
4344
|
ProjectionNode: go,
|
|
4393
4345
|
MeasureLayout: lo
|
|
4394
4346
|
}
|
|
4395
|
-
},
|
|
4396
|
-
function
|
|
4397
|
-
const e =
|
|
4347
|
+
}, wu = /var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;
|
|
4348
|
+
function Tu(t) {
|
|
4349
|
+
const e = wu.exec(t);
|
|
4398
4350
|
if (!e)
|
|
4399
4351
|
return [,];
|
|
4400
4352
|
const [, n, s] = e;
|
|
4401
4353
|
return [n, s];
|
|
4402
4354
|
}
|
|
4403
|
-
const
|
|
4355
|
+
const Pu = 4;
|
|
4404
4356
|
function Ke(t, e, n = 1) {
|
|
4405
|
-
q(n <=
|
|
4406
|
-
const [s, i] =
|
|
4357
|
+
q(n <= Pu, `Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);
|
|
4358
|
+
const [s, i] = Tu(t);
|
|
4407
4359
|
if (!s)
|
|
4408
4360
|
return;
|
|
4409
4361
|
const r = window.getComputedStyle(e).getPropertyValue(s);
|
|
@@ -4411,29 +4363,29 @@ function Ke(t, e, n = 1) {
|
|
|
4411
4363
|
const o = r.trim();
|
|
4412
4364
|
return Qi(o) ? parseFloat(o) : o;
|
|
4413
4365
|
} else
|
|
4414
|
-
return
|
|
4366
|
+
return Oe(i) ? Ke(i, e, n + 1) : i;
|
|
4415
4367
|
}
|
|
4416
|
-
function
|
|
4368
|
+
function Au(t, { ...e }, n) {
|
|
4417
4369
|
const s = t.current;
|
|
4418
4370
|
if (!(s instanceof Element))
|
|
4419
4371
|
return { target: e, transitionEnd: n };
|
|
4420
4372
|
n && (n = { ...n }), t.values.forEach((i) => {
|
|
4421
4373
|
const r = i.get();
|
|
4422
|
-
if (!
|
|
4374
|
+
if (!Oe(r))
|
|
4423
4375
|
return;
|
|
4424
4376
|
const o = Ke(r, s);
|
|
4425
4377
|
o && i.set(o);
|
|
4426
4378
|
});
|
|
4427
4379
|
for (const i in e) {
|
|
4428
4380
|
const r = e[i];
|
|
4429
|
-
if (!
|
|
4381
|
+
if (!Oe(r))
|
|
4430
4382
|
continue;
|
|
4431
4383
|
const o = Ke(r, s);
|
|
4432
4384
|
o && (e[i] = o, n || (n = {}), n[i] === void 0 && (n[i] = r));
|
|
4433
4385
|
}
|
|
4434
4386
|
return { target: e, transitionEnd: n };
|
|
4435
4387
|
}
|
|
4436
|
-
const
|
|
4388
|
+
const Su = /* @__PURE__ */ new Set([
|
|
4437
4389
|
"width",
|
|
4438
4390
|
"height",
|
|
4439
4391
|
"top",
|
|
@@ -4444,20 +4396,20 @@ const Uu = /* @__PURE__ */ new Set([
|
|
|
4444
4396
|
"y",
|
|
4445
4397
|
"translateX",
|
|
4446
4398
|
"translateY"
|
|
4447
|
-
]), yo = (t) =>
|
|
4399
|
+
]), yo = (t) => Su.has(t), Vu = (t) => Object.keys(t).some(yo), te = (t) => t === yt || t === w, Os = (t, e) => parseFloat(t.split(", ")[e]), js = (t, e) => (n, { transform: s }) => {
|
|
4448
4400
|
if (s === "none" || !s)
|
|
4449
4401
|
return 0;
|
|
4450
4402
|
const i = s.match(/^matrix3d\((.+)\)$/);
|
|
4451
4403
|
if (i)
|
|
4452
|
-
return
|
|
4404
|
+
return Os(i[1], e);
|
|
4453
4405
|
{
|
|
4454
4406
|
const r = s.match(/^matrix\((.+)\)$/);
|
|
4455
|
-
return r ?
|
|
4407
|
+
return r ? Os(r[1], t) : 0;
|
|
4456
4408
|
}
|
|
4457
|
-
},
|
|
4458
|
-
function
|
|
4409
|
+
}, Cu = /* @__PURE__ */ new Set(["x", "y", "z"]), Mu = Gt.filter((t) => !Cu.has(t));
|
|
4410
|
+
function Du(t) {
|
|
4459
4411
|
const e = [];
|
|
4460
|
-
return
|
|
4412
|
+
return Mu.forEach((n) => {
|
|
4461
4413
|
const s = t.getValue(n);
|
|
4462
4414
|
s !== void 0 && (e.push([n, s.get()]), s.set(n.startsWith("scale") ? 1 : 0));
|
|
4463
4415
|
}), e.length && t.render(), e;
|
|
@@ -4471,12 +4423,12 @@ const Ct = {
|
|
|
4471
4423
|
bottom: ({ y: t }, { top: e }) => parseFloat(e) + (t.max - t.min),
|
|
4472
4424
|
right: ({ x: t }, { left: e }) => parseFloat(e) + (t.max - t.min),
|
|
4473
4425
|
// Transform
|
|
4474
|
-
x:
|
|
4475
|
-
y:
|
|
4426
|
+
x: js(4, 13),
|
|
4427
|
+
y: js(5, 14)
|
|
4476
4428
|
};
|
|
4477
4429
|
Ct.translateX = Ct.x;
|
|
4478
4430
|
Ct.translateY = Ct.y;
|
|
4479
|
-
const
|
|
4431
|
+
const Ru = (t, e, n) => {
|
|
4480
4432
|
const s = e.measureViewportBox(), i = e.current, r = getComputedStyle(i), { display: o } = r, a = {};
|
|
4481
4433
|
o === "none" && e.setStaticValue("display", t.display || "block"), n.forEach((c) => {
|
|
4482
4434
|
a[c] = Ct[c](s, r);
|
|
@@ -4486,7 +4438,7 @@ const Hu = (t, e, n) => {
|
|
|
4486
4438
|
const u = e.getValue(c);
|
|
4487
4439
|
u && u.jump(a[c]), t[c] = Ct[c](l, r);
|
|
4488
4440
|
}), t;
|
|
4489
|
-
},
|
|
4441
|
+
}, Lu = (t, e, n = {}, s = {}) => {
|
|
4490
4442
|
e = { ...e }, s = { ...s };
|
|
4491
4443
|
const i = Object.keys(e).filter(yo);
|
|
4492
4444
|
let r = [], o = !1;
|
|
@@ -4495,52 +4447,52 @@ const Hu = (t, e, n) => {
|
|
|
4495
4447
|
const c = t.getValue(l);
|
|
4496
4448
|
if (!t.hasValue(l))
|
|
4497
4449
|
return;
|
|
4498
|
-
let u = n[l], h =
|
|
4450
|
+
let u = n[l], h = Et(u);
|
|
4499
4451
|
const f = e[l];
|
|
4500
4452
|
let d;
|
|
4501
4453
|
if (oe(f)) {
|
|
4502
|
-
const
|
|
4503
|
-
u = f[
|
|
4504
|
-
for (let v =
|
|
4505
|
-
d ? q(
|
|
4454
|
+
const m = f.length, p = f[0] === null ? 1 : 0;
|
|
4455
|
+
u = f[p], h = Et(u);
|
|
4456
|
+
for (let v = p; v < m && f[v] !== null; v++)
|
|
4457
|
+
d ? q(Et(f[v]) === d, "All keyframes must be of the same type") : (d = Et(f[v]), q(d === h || te(h) && te(d), "Keyframes must be of the same dimension as the current value"));
|
|
4506
4458
|
} else
|
|
4507
|
-
d =
|
|
4459
|
+
d = Et(f);
|
|
4508
4460
|
if (h !== d)
|
|
4509
4461
|
if (te(h) && te(d)) {
|
|
4510
|
-
const
|
|
4511
|
-
typeof
|
|
4462
|
+
const m = c.get();
|
|
4463
|
+
typeof m == "string" && c.set(parseFloat(m)), typeof f == "string" ? e[l] = parseFloat(f) : Array.isArray(f) && d === w && (e[l] = f.map(parseFloat));
|
|
4512
4464
|
} else
|
|
4513
|
-
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 =
|
|
4465
|
+
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));
|
|
4514
4466
|
}), a.length) {
|
|
4515
|
-
const l = a.indexOf("height") >= 0 ? window.pageYOffset : null, c =
|
|
4467
|
+
const l = a.indexOf("height") >= 0 ? window.pageYOffset : null, c = Ru(e, t, a);
|
|
4516
4468
|
return r.length && r.forEach(([u, h]) => {
|
|
4517
4469
|
t.getValue(u).set(h);
|
|
4518
|
-
}), t.render(),
|
|
4470
|
+
}), t.render(), me && l !== null && window.scrollTo({ top: l }), { target: c, transitionEnd: s };
|
|
4519
4471
|
} else
|
|
4520
4472
|
return { target: e, transitionEnd: s };
|
|
4521
4473
|
};
|
|
4522
|
-
function
|
|
4523
|
-
return
|
|
4474
|
+
function Eu(t, e, n, s) {
|
|
4475
|
+
return Vu(e) ? Lu(t, e, n, s) : { target: e, transitionEnd: s };
|
|
4524
4476
|
}
|
|
4525
|
-
const
|
|
4526
|
-
const i =
|
|
4527
|
-
return e = i.target, s = i.transitionEnd,
|
|
4477
|
+
const ku = (t, e, n, s) => {
|
|
4478
|
+
const i = Au(t, e, s);
|
|
4479
|
+
return e = i.target, s = i.transitionEnd, Eu(t, e, n, s);
|
|
4528
4480
|
}, Ye = { current: null }, vo = { current: !1 };
|
|
4529
|
-
function
|
|
4530
|
-
if (vo.current = !0, !!
|
|
4481
|
+
function Bu() {
|
|
4482
|
+
if (vo.current = !0, !!me)
|
|
4531
4483
|
if (window.matchMedia) {
|
|
4532
4484
|
const t = window.matchMedia("(prefers-reduced-motion)"), e = () => Ye.current = t.matches;
|
|
4533
4485
|
t.addListener(e), e();
|
|
4534
4486
|
} else
|
|
4535
4487
|
Ye.current = !1;
|
|
4536
4488
|
}
|
|
4537
|
-
function
|
|
4489
|
+
function Iu(t, e, n) {
|
|
4538
4490
|
const { willChange: s } = e;
|
|
4539
4491
|
for (const i in e) {
|
|
4540
4492
|
const r = e[i], o = n[i];
|
|
4541
|
-
if (
|
|
4493
|
+
if (_(r))
|
|
4542
4494
|
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.`);
|
|
4543
|
-
else if (
|
|
4495
|
+
else if (_(o))
|
|
4544
4496
|
t.addValue(i, Vt(r, { owner: t })), ce(s) && s.remove(i);
|
|
4545
4497
|
else if (o !== r)
|
|
4546
4498
|
if (t.hasValue(i)) {
|
|
@@ -4555,7 +4507,7 @@ function Qu(t, e, n) {
|
|
|
4555
4507
|
e[i] === void 0 && t.removeValue(i);
|
|
4556
4508
|
return e;
|
|
4557
4509
|
}
|
|
4558
|
-
const
|
|
4510
|
+
const Ns = /* @__PURE__ */ new WeakMap(), xo = Object.keys(_t), Fu = xo.length, Us = [
|
|
4559
4511
|
"AnimationStart",
|
|
4560
4512
|
"AnimationComplete",
|
|
4561
4513
|
"Update",
|
|
@@ -4563,8 +4515,8 @@ const js = /* @__PURE__ */ new WeakMap(), xo = Object.keys(Ut), Zu = xo.length,
|
|
|
4563
4515
|
"LayoutMeasure",
|
|
4564
4516
|
"LayoutAnimationStart",
|
|
4565
4517
|
"LayoutAnimationComplete"
|
|
4566
|
-
],
|
|
4567
|
-
class
|
|
4518
|
+
], Ou = an.length;
|
|
4519
|
+
class ju {
|
|
4568
4520
|
constructor({ parent: e, props: n, presenceContext: s, reducedMotionConfig: i, visualState: r }, o = {}) {
|
|
4569
4521
|
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 = () => {
|
|
4570
4522
|
this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
|
|
@@ -4574,7 +4526,7 @@ class th {
|
|
|
4574
4526
|
const { willChange: c, ...u } = this.scrapeMotionValuesFromProps(n, {});
|
|
4575
4527
|
for (const h in u) {
|
|
4576
4528
|
const f = u[h];
|
|
4577
|
-
a[h] !== void 0 &&
|
|
4529
|
+
a[h] !== void 0 && _(f) && (f.set(a[h], !1), ce(c) && c.add(h));
|
|
4578
4530
|
}
|
|
4579
4531
|
}
|
|
4580
4532
|
/**
|
|
@@ -4588,10 +4540,10 @@ class th {
|
|
|
4588
4540
|
return {};
|
|
4589
4541
|
}
|
|
4590
4542
|
mount(e) {
|
|
4591
|
-
this.current = e,
|
|
4543
|
+
this.current = e, Ns.set(e, this), this.projection && !this.projection.instance && this.projection.mount(e), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((n, s) => this.bindToMotionValue(s, n)), vo.current || Bu(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : Ye.current, process.env.NODE_ENV !== "production" && An(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected."), this.parent && this.parent.children.add(this), this.update(this.props, this.presenceContext);
|
|
4592
4544
|
}
|
|
4593
4545
|
unmount() {
|
|
4594
|
-
|
|
4546
|
+
Ns.delete(this.current), this.projection && this.projection.unmount(), et(this.notifyUpdate), et(this.render), this.valueSubscriptions.forEach((e) => e()), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent && this.parent.children.delete(this);
|
|
4595
4547
|
for (const e in this.events)
|
|
4596
4548
|
this.events[e].clear();
|
|
4597
4549
|
for (const e in this.features)
|
|
@@ -4615,8 +4567,8 @@ class th {
|
|
|
4615
4567
|
const l = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";
|
|
4616
4568
|
n.ignoreStrict ? qt(!1, l) : q(!1, l);
|
|
4617
4569
|
}
|
|
4618
|
-
for (let l = 0; l <
|
|
4619
|
-
const c = xo[l], { isEnabled: u, Feature: h, ProjectionNode: f, MeasureLayout: d } =
|
|
4570
|
+
for (let l = 0; l < Fu; l++) {
|
|
4571
|
+
const c = xo[l], { isEnabled: u, Feature: h, ProjectionNode: f, MeasureLayout: d } = _t[c];
|
|
4620
4572
|
f && (o = f), u(n) && (!this.features[c] && h && (this.features[c] = new h(this)), d && (a = d));
|
|
4621
4573
|
}
|
|
4622
4574
|
if ((this.type === "html" || this.type === "svg") && !this.projection && o) {
|
|
@@ -4658,7 +4610,7 @@ class th {
|
|
|
4658
4610
|
* removed with a re-render to work.
|
|
4659
4611
|
*/
|
|
4660
4612
|
measureViewportBox() {
|
|
4661
|
-
return this.current ? this.measureInstanceViewportBox(this.current, this.props) :
|
|
4613
|
+
return this.current ? this.measureInstanceViewportBox(this.current, this.props) : B();
|
|
4662
4614
|
}
|
|
4663
4615
|
getStaticValue(e) {
|
|
4664
4616
|
return this.latestValues[e];
|
|
@@ -4682,13 +4634,13 @@ class th {
|
|
|
4682
4634
|
*/
|
|
4683
4635
|
update(e, n) {
|
|
4684
4636
|
(e.transformTemplate || this.props.transformTemplate) && this.scheduleRender(), this.prevProps = this.props, this.props = e, this.prevPresenceContext = this.presenceContext, this.presenceContext = n;
|
|
4685
|
-
for (let s = 0; s <
|
|
4686
|
-
const i =
|
|
4637
|
+
for (let s = 0; s < Us.length; s++) {
|
|
4638
|
+
const i = Us[s];
|
|
4687
4639
|
this.propEventSubscriptions[i] && (this.propEventSubscriptions[i](), delete this.propEventSubscriptions[i]);
|
|
4688
4640
|
const r = e["on" + i];
|
|
4689
4641
|
r && (this.propEventSubscriptions[i] = this.on(i, r));
|
|
4690
4642
|
}
|
|
4691
|
-
this.prevMotionValues =
|
|
4643
|
+
this.prevMotionValues = Iu(this, this.scrapeMotionValuesFromProps(e, this.prevProps), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
|
|
4692
4644
|
}
|
|
4693
4645
|
getProps() {
|
|
4694
4646
|
return this.props;
|
|
@@ -4719,9 +4671,9 @@ class th {
|
|
|
4719
4671
|
return this.props.initial !== void 0 && (s.initial = this.props.initial), s;
|
|
4720
4672
|
}
|
|
4721
4673
|
const n = {};
|
|
4722
|
-
for (let s = 0; s <
|
|
4674
|
+
for (let s = 0; s < Ou; s++) {
|
|
4723
4675
|
const i = an[s], r = this.props[i];
|
|
4724
|
-
(
|
|
4676
|
+
(Ut(r) || r === !1) && (n[i] = r);
|
|
4725
4677
|
}
|
|
4726
4678
|
return n;
|
|
4727
4679
|
}
|
|
@@ -4781,11 +4733,11 @@ class th {
|
|
|
4781
4733
|
*/
|
|
4782
4734
|
getBaseTarget(e) {
|
|
4783
4735
|
var n;
|
|
4784
|
-
const { initial: s } = this.props, i = typeof s == "string" || typeof s == "object" ? (n =
|
|
4736
|
+
const { initial: s } = this.props, i = typeof s == "string" || typeof s == "object" ? (n = mn(this.props, s)) === null || n === void 0 ? void 0 : n[e] : void 0;
|
|
4785
4737
|
if (s && i !== void 0)
|
|
4786
4738
|
return i;
|
|
4787
4739
|
const r = this.getBaseTargetFromProps(this.props, e);
|
|
4788
|
-
return r !== void 0 && !
|
|
4740
|
+
return r !== void 0 && !_(r) ? r : this.initialValues[e] !== void 0 && i === void 0 ? void 0 : this.baseTarget[e];
|
|
4789
4741
|
}
|
|
4790
4742
|
on(e, n) {
|
|
4791
4743
|
return this.events[e] || (this.events[e] = new Pn()), this.events[e].add(n);
|
|
@@ -4794,7 +4746,7 @@ class th {
|
|
|
4794
4746
|
this.events[e] && this.events[e].notify(...n);
|
|
4795
4747
|
}
|
|
4796
4748
|
}
|
|
4797
|
-
class bo extends
|
|
4749
|
+
class bo extends ju {
|
|
4798
4750
|
sortInstanceNodePosition(e, n) {
|
|
4799
4751
|
return e.compareDocumentPosition(n) & 2 ? 1 : -1;
|
|
4800
4752
|
}
|
|
@@ -4805,10 +4757,10 @@ class bo extends th {
|
|
|
4805
4757
|
delete n[e], delete s[e];
|
|
4806
4758
|
}
|
|
4807
4759
|
makeTargetAnimatableFromInstance({ transition: e, transitionEnd: n, ...s }, { transformValues: i }, r) {
|
|
4808
|
-
let o =
|
|
4760
|
+
let o = tc(s, e || {}, this);
|
|
4809
4761
|
if (i && (n && (n = i(n)), s && (s = i(s)), o && (o = i(o))), r) {
|
|
4810
|
-
|
|
4811
|
-
const a =
|
|
4762
|
+
Zl(this, s, o);
|
|
4763
|
+
const a = ku(this, s, o, n);
|
|
4812
4764
|
n = a.transitionEnd, s = a.target;
|
|
4813
4765
|
}
|
|
4814
4766
|
return {
|
|
@@ -4818,10 +4770,10 @@ class bo extends th {
|
|
|
4818
4770
|
};
|
|
4819
4771
|
}
|
|
4820
4772
|
}
|
|
4821
|
-
function
|
|
4773
|
+
function Nu(t) {
|
|
4822
4774
|
return window.getComputedStyle(t);
|
|
4823
4775
|
}
|
|
4824
|
-
class
|
|
4776
|
+
class Uu extends bo {
|
|
4825
4777
|
constructor() {
|
|
4826
4778
|
super(...arguments), this.type = "html";
|
|
4827
4779
|
}
|
|
@@ -4830,7 +4782,7 @@ class nh extends bo {
|
|
|
4830
4782
|
const s = vn(n);
|
|
4831
4783
|
return s && s.default || 0;
|
|
4832
4784
|
} else {
|
|
4833
|
-
const s =
|
|
4785
|
+
const s = Nu(e), i = (ai(n) ? s.getPropertyValue(n) : s[n]) || 0;
|
|
4834
4786
|
return typeof i == "string" ? i.trim() : i;
|
|
4835
4787
|
}
|
|
4836
4788
|
}
|
|
@@ -4846,7 +4798,7 @@ class nh extends bo {
|
|
|
4846
4798
|
handleChildMotionValue() {
|
|
4847
4799
|
this.childSubscription && (this.childSubscription(), delete this.childSubscription);
|
|
4848
4800
|
const { children: e } = this.props;
|
|
4849
|
-
|
|
4801
|
+
_(e) && (this.childSubscription = e.on("change", (n) => {
|
|
4850
4802
|
this.current && (this.current.textContent = `${n}`);
|
|
4851
4803
|
}));
|
|
4852
4804
|
}
|
|
@@ -4854,7 +4806,7 @@ class nh extends bo {
|
|
|
4854
4806
|
di(e, n, s, i);
|
|
4855
4807
|
}
|
|
4856
4808
|
}
|
|
4857
|
-
class
|
|
4809
|
+
class _u extends bo {
|
|
4858
4810
|
constructor() {
|
|
4859
4811
|
super(...arguments), this.type = "svg", this.isSVGTag = !1;
|
|
4860
4812
|
}
|
|
@@ -4866,10 +4818,10 @@ class sh extends bo {
|
|
|
4866
4818
|
const s = vn(n);
|
|
4867
4819
|
return s && s.default || 0;
|
|
4868
4820
|
}
|
|
4869
|
-
return n =
|
|
4821
|
+
return n = mi.has(n) ? n : on(n), e.getAttribute(n);
|
|
4870
4822
|
}
|
|
4871
4823
|
measureInstanceViewportBox() {
|
|
4872
|
-
return
|
|
4824
|
+
return B();
|
|
4873
4825
|
}
|
|
4874
4826
|
scrapeMotionValuesFromProps(e, n) {
|
|
4875
4827
|
return gi(e, n);
|
|
@@ -4878,31 +4830,31 @@ class sh extends bo {
|
|
|
4878
4830
|
hn(e, n, s, this.isSVGTag, i.transformTemplate);
|
|
4879
4831
|
}
|
|
4880
4832
|
renderInstance(e, n, s, i) {
|
|
4881
|
-
|
|
4833
|
+
pi(e, n, s, i);
|
|
4882
4834
|
}
|
|
4883
4835
|
mount(e) {
|
|
4884
4836
|
this.isSVGTag = fn(e.tagName), super.mount(e);
|
|
4885
4837
|
}
|
|
4886
4838
|
}
|
|
4887
|
-
const
|
|
4839
|
+
const zu = (t, e) => ln(t) ? new _u(e, { enableHardwareAcceleration: !1 }) : new Uu(e, { enableHardwareAcceleration: !0 }), Wu = {
|
|
4888
4840
|
layout: {
|
|
4889
4841
|
ProjectionNode: go,
|
|
4890
4842
|
MeasureLayout: lo
|
|
4891
4843
|
}
|
|
4892
|
-
},
|
|
4893
|
-
...
|
|
4894
|
-
...
|
|
4895
|
-
...
|
|
4896
|
-
...
|
|
4897
|
-
}, Sn = /* @__PURE__ */
|
|
4898
|
-
function
|
|
4844
|
+
}, Gu = {
|
|
4845
|
+
...pc,
|
|
4846
|
+
...Oa,
|
|
4847
|
+
...bu,
|
|
4848
|
+
...Wu
|
|
4849
|
+
}, Sn = /* @__PURE__ */ $r((t, e) => Aa(t, e, Gu, zu));
|
|
4850
|
+
function _s(t) {
|
|
4899
4851
|
for (; t.startsWith("/"); )
|
|
4900
4852
|
t = t.slice(1);
|
|
4901
4853
|
return t;
|
|
4902
4854
|
}
|
|
4903
4855
|
function wo(t, e, n = []) {
|
|
4904
4856
|
for (const s of t) {
|
|
4905
|
-
if (console.log(s.path, e, s.path === e),
|
|
4857
|
+
if (console.log(s.path, e, s.path === e), _s(s.path || "") === _s(e))
|
|
4906
4858
|
return [...n, s];
|
|
4907
4859
|
if (s.children) {
|
|
4908
4860
|
const i = wo(s.children, e, [...n, s]);
|
|
@@ -4912,7 +4864,7 @@ function wo(t, e, n = []) {
|
|
|
4912
4864
|
}
|
|
4913
4865
|
return null;
|
|
4914
4866
|
}
|
|
4915
|
-
function
|
|
4867
|
+
function $u(t) {
|
|
4916
4868
|
return /* @__PURE__ */ T(
|
|
4917
4869
|
"svg",
|
|
4918
4870
|
{
|
|
@@ -4934,15 +4886,15 @@ function ah(t) {
|
|
|
4934
4886
|
}
|
|
4935
4887
|
);
|
|
4936
4888
|
}
|
|
4937
|
-
function
|
|
4938
|
-
return /* @__PURE__ */ T(
|
|
4889
|
+
function ih(t) {
|
|
4890
|
+
return /* @__PURE__ */ T(Hu, { ...t });
|
|
4939
4891
|
}
|
|
4940
|
-
function
|
|
4892
|
+
function Hu(t) {
|
|
4941
4893
|
const { baseUrl: e, menuPath: n } = t;
|
|
4942
4894
|
console.log("baseUrl:", e);
|
|
4943
4895
|
const s = Uo();
|
|
4944
4896
|
console.log("location:", s);
|
|
4945
|
-
const [i, r] = ot([]), [o, a] = ot(!
|
|
4897
|
+
const [i, r] = ot([]), [o, a] = ot(!1), l = (wo(i, s.pathname) || []).filter((y) => y.parentKey !== 0), [c, u] = ot({}), h = (y) => {
|
|
4946
4898
|
u({
|
|
4947
4899
|
...c,
|
|
4948
4900
|
[y]: !c[y]
|
|
@@ -4954,7 +4906,7 @@ function lh(t) {
|
|
|
4954
4906
|
};
|
|
4955
4907
|
Wt(() => {
|
|
4956
4908
|
(async () => {
|
|
4957
|
-
const g = e + (n || "/global-menu-config/api/v1/menu-items"), x = await
|
|
4909
|
+
const g = e + (n || "/global-menu-config/api/v1/menu-items/user"), x = await zo.get(g, {
|
|
4958
4910
|
withCredentials: !0
|
|
4959
4911
|
}).then((S) => S.data), P = {};
|
|
4960
4912
|
x.forEach((S) => {
|
|
@@ -4962,10 +4914,10 @@ function lh(t) {
|
|
|
4962
4914
|
}), u(P), r(x.map((S) => ({ ...S, parentKey: 0 })));
|
|
4963
4915
|
})();
|
|
4964
4916
|
}, [e, n]);
|
|
4965
|
-
const [d,
|
|
4917
|
+
const [d, m] = ot(!1), p = () => {
|
|
4966
4918
|
window.location.href = `${e}/authentication/logout?callbackUrl=${window.location.origin}`;
|
|
4967
4919
|
}, v = o ? "collapsed" : "expanded", b = (y) => `${y} ${v}`;
|
|
4968
|
-
return /* @__PURE__ */
|
|
4920
|
+
return /* @__PURE__ */ O(
|
|
4969
4921
|
Sn.nav,
|
|
4970
4922
|
{
|
|
4971
4923
|
initial: { width: "18rem" },
|
|
@@ -4979,7 +4931,7 @@ function lh(t) {
|
|
|
4979
4931
|
"div",
|
|
4980
4932
|
{
|
|
4981
4933
|
id: "menu-items",
|
|
4982
|
-
className: "mt-6 overflow-y-auto overflow-x-hidden flex-1",
|
|
4934
|
+
className: b("mt-6 overflow-y-auto overflow-x-hidden flex-1"),
|
|
4983
4935
|
children: i.map((y) => /* @__PURE__ */ T(
|
|
4984
4936
|
To,
|
|
4985
4937
|
{
|
|
@@ -4993,24 +4945,24 @@ function lh(t) {
|
|
|
4993
4945
|
))
|
|
4994
4946
|
}
|
|
4995
4947
|
),
|
|
4996
|
-
/* @__PURE__ */
|
|
4997
|
-
/* @__PURE__ */
|
|
4948
|
+
/* @__PURE__ */ O("div", { className: "w-full mt-10 mb-10", children: [
|
|
4949
|
+
/* @__PURE__ */ O(
|
|
4998
4950
|
"button",
|
|
4999
4951
|
{
|
|
5000
4952
|
className: b("side-bar__logout-btn"),
|
|
5001
|
-
onClick: () =>
|
|
4953
|
+
onClick: () => m(!0),
|
|
5002
4954
|
children: [
|
|
5003
|
-
/* @__PURE__ */ T(
|
|
4955
|
+
/* @__PURE__ */ T($u, {}),
|
|
5004
4956
|
/* @__PURE__ */ T("span", { className: `ml-3 ${o ? "hidden" : ""}`, children: "Logout" })
|
|
5005
4957
|
]
|
|
5006
4958
|
}
|
|
5007
4959
|
),
|
|
5008
4960
|
/* @__PURE__ */ T(
|
|
5009
|
-
|
|
4961
|
+
$s,
|
|
5010
4962
|
{
|
|
5011
4963
|
isOpen: d,
|
|
5012
|
-
onClose: () =>
|
|
5013
|
-
onConfirm:
|
|
4964
|
+
onClose: () => m(!1),
|
|
4965
|
+
onConfirm: p
|
|
5014
4966
|
}
|
|
5015
4967
|
)
|
|
5016
4968
|
] })
|
|
@@ -5020,12 +4972,12 @@ function lh(t) {
|
|
|
5020
4972
|
}
|
|
5021
4973
|
function To({ item: t, level: e = 0, ...n }) {
|
|
5022
4974
|
var v;
|
|
5023
|
-
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),
|
|
5024
|
-
function
|
|
4975
|
+
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
|
+
function p(b) {
|
|
5025
4977
|
var P;
|
|
5026
4978
|
const { level: y, hovered: g, parentRef: x } = b;
|
|
5027
4979
|
return !h || i && y >= 2 && !g ? null : /* @__PURE__ */ T(
|
|
5028
|
-
|
|
4980
|
+
qu,
|
|
5029
4981
|
{
|
|
5030
4982
|
parentRef: x,
|
|
5031
4983
|
onlyChild: !i || i && y < 2,
|
|
@@ -5038,23 +4990,23 @@ function To({ item: t, level: e = 0, ...n }) {
|
|
|
5038
4990
|
height: i || r(t.id) ? "auto" : 0
|
|
5039
4991
|
},
|
|
5040
4992
|
transition: { duration: 0.2 },
|
|
5041
|
-
children: (P = t.children) == null ? void 0 : P.map((S) => /* @__PURE__ */
|
|
4993
|
+
children: (P = t.children) == null ? void 0 : P.map((S) => /* @__PURE__ */ Gs(To, { ...n, key: S.id, item: S, level: y }))
|
|
5042
4994
|
},
|
|
5043
4995
|
+i
|
|
5044
4996
|
)
|
|
5045
4997
|
}
|
|
5046
4998
|
);
|
|
5047
4999
|
}
|
|
5048
|
-
return /* @__PURE__ */
|
|
5000
|
+
return /* @__PURE__ */ O(
|
|
5049
5001
|
"div",
|
|
5050
5002
|
{
|
|
5051
|
-
ref:
|
|
5003
|
+
ref: m,
|
|
5052
5004
|
className: u("menu-item__wrapper"),
|
|
5053
5005
|
onMouseEnter: () => i && d(!0),
|
|
5054
5006
|
onMouseLeave: () => i && d(!1),
|
|
5055
5007
|
children: [
|
|
5056
|
-
/* @__PURE__ */
|
|
5057
|
-
|
|
5008
|
+
/* @__PURE__ */ O(
|
|
5009
|
+
_o,
|
|
5058
5010
|
{
|
|
5059
5011
|
to: h ? "#" : t.path || "#",
|
|
5060
5012
|
style: {
|
|
@@ -5073,11 +5025,7 @@ function To({ item: t, level: e = 0, ...n }) {
|
|
|
5073
5025
|
style: { height: 24, maxHeight: 24 }
|
|
5074
5026
|
}
|
|
5075
5027
|
) }),
|
|
5076
|
-
/* @__PURE__ */
|
|
5077
|
-
e,
|
|
5078
|
-
" ",
|
|
5079
|
-
t.name
|
|
5080
|
-
] }),
|
|
5028
|
+
/* @__PURE__ */ T("span", { className: u("menu-item__label"), children: t.name }),
|
|
5081
5029
|
h && /* @__PURE__ */ T("div", { className: u("menu-item__icon-arrow__wrapper"), children: /* @__PURE__ */ T(
|
|
5082
5030
|
Xs,
|
|
5083
5031
|
{
|
|
@@ -5090,13 +5038,13 @@ function To({ item: t, level: e = 0, ...n }) {
|
|
|
5090
5038
|
]
|
|
5091
5039
|
}
|
|
5092
5040
|
),
|
|
5093
|
-
|
|
5041
|
+
p({ level: e + 1, hovered: f, parentRef: m })
|
|
5094
5042
|
]
|
|
5095
5043
|
},
|
|
5096
5044
|
t.id
|
|
5097
5045
|
);
|
|
5098
5046
|
}
|
|
5099
|
-
function
|
|
5047
|
+
function qu(t) {
|
|
5100
5048
|
const { children: e, parentRef: n, onlyChild: s } = t, [i, r] = ot({ top: 0, left: 0 });
|
|
5101
5049
|
return Ws(() => {
|
|
5102
5050
|
if (n.current) {
|
|
@@ -5106,7 +5054,7 @@ function ch(t) {
|
|
|
5106
5054
|
left: o.left + o.width
|
|
5107
5055
|
});
|
|
5108
5056
|
}
|
|
5109
|
-
}, [n]), s ? e :
|
|
5057
|
+
}, [n]), s ? e : No(
|
|
5110
5058
|
/* @__PURE__ */ T(
|
|
5111
5059
|
Sn.div,
|
|
5112
5060
|
{
|
|
@@ -5122,6 +5070,6 @@ function ch(t) {
|
|
|
5122
5070
|
);
|
|
5123
5071
|
}
|
|
5124
5072
|
export {
|
|
5125
|
-
|
|
5126
|
-
|
|
5073
|
+
ih as GlobalMenu,
|
|
5074
|
+
nh as TopBar
|
|
5127
5075
|
};
|