lizaui 3.0.35 → 3.0.37
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/button/index.cjs.js +1 -1
- package/dist/button/index.es.js +1 -1
- package/dist/calendar/index.cjs.js +1 -1
- package/dist/calendar/index.es.js +1 -1
- package/dist/checkbox/index.cjs.js +1 -1
- package/dist/checkbox/index.es.js +1 -1
- package/dist/chunks/assertion-C7nbUE-q.js +2 -0
- package/dist/chunks/assertion-C7nbUE-q.js.map +1 -0
- package/dist/chunks/assertion-CrT8p68K.js +11 -0
- package/dist/chunks/assertion-CrT8p68K.js.map +1 -0
- package/dist/chunks/button-ByG7rkKr.js +528 -0
- package/dist/chunks/button-ByG7rkKr.js.map +1 -0
- package/dist/chunks/button-W_O8D9E6.js +2 -0
- package/dist/chunks/button-W_O8D9E6.js.map +1 -0
- package/dist/chunks/checkbox-D7Bt7i2P.js +2 -0
- package/dist/chunks/{checkbox-C23sBMh5.js.map → checkbox-D7Bt7i2P.js.map} +1 -1
- package/dist/chunks/{checkbox-ChChDxFl.js → checkbox-lvTY3PXC.js} +3 -2
- package/dist/chunks/{checkbox-ChChDxFl.js.map → checkbox-lvTY3PXC.js.map} +1 -1
- package/dist/chunks/index-BnlGNtJe.js +65 -0
- package/dist/chunks/index-BnlGNtJe.js.map +1 -0
- package/dist/chunks/{index-BpSN4GSo.js → index-DSpBzH_i.js} +796 -793
- package/dist/chunks/index-DSpBzH_i.js.map +1 -0
- package/dist/chunks/refs-DAOksVs3.js +29 -0
- package/dist/chunks/refs-DAOksVs3.js.map +1 -0
- package/dist/chunks/refs-pI64b4UC.js +2 -0
- package/dist/chunks/refs-pI64b4UC.js.map +1 -0
- package/dist/chunks/ripple-BQsLJHrx.js +3594 -0
- package/dist/chunks/ripple-BQsLJHrx.js.map +1 -0
- package/dist/chunks/ripple-CUdIIH3t.js +10 -0
- package/dist/chunks/ripple-CUdIIH3t.js.map +1 -0
- package/dist/components/ripple/index.d.ts +3 -0
- package/dist/components/ripple/index.d.ts.map +1 -0
- package/dist/components/ui/modal.d.ts +1 -0
- package/dist/components/ui/modal.d.ts.map +1 -1
- package/dist/components/ui/sheet.d.ts +9 -2
- package/dist/components/ui/sheet.d.ts.map +1 -1
- package/dist/pagination/index.cjs.js +1 -1
- package/dist/pagination/index.es.js +2 -2
- package/dist/ripple/index.cjs.js +2 -0
- package/dist/ripple/index.cjs.js.map +1 -0
- package/dist/ripple/index.es.js +5 -0
- package/dist/ripple/index.es.js.map +1 -0
- package/dist/ripple.d.ts +2 -0
- package/dist/select-input/index.cjs.js +1 -1
- package/dist/select-input/index.cjs.js.map +1 -1
- package/dist/select-input/index.es.js +2 -2
- package/dist/table/index.cjs.js +1 -1
- package/dist/table/index.es.js +1 -1
- package/dist/ui/index.cjs.js +2 -2
- package/dist/ui/index.cjs.js.map +1 -1
- package/dist/ui/index.es.js +785 -755
- package/dist/ui/index.es.js.map +1 -1
- package/package.json +6 -1
- package/dist/chunks/button-C6LoJycL.js +0 -4112
- package/dist/chunks/button-C6LoJycL.js.map +0 -1
- package/dist/chunks/button-CPPU0FsH.js +0 -10
- package/dist/chunks/button-CPPU0FsH.js.map +0 -1
- package/dist/chunks/checkbox-C23sBMh5.js +0 -2
- package/dist/chunks/index-BTn-tZ5q.js +0 -65
- package/dist/chunks/index-BTn-tZ5q.js.map +0 -1
- package/dist/chunks/index-BpSN4GSo.js.map +0 -1
- package/dist/chunks/refs-DLih6QCP.js +0 -2
- package/dist/chunks/refs-DLih6QCP.js.map +0 -1
- package/dist/chunks/refs-DcCOPvdv.js +0 -35
- package/dist/chunks/refs-DcCOPvdv.js.map +0 -1
|
@@ -1,4112 +0,0 @@
|
|
|
1
|
-
import { j as P } from "./jsx-runtime-BYq8_R6m.js";
|
|
2
|
-
import * as xt from "react";
|
|
3
|
-
import { useState as Pe, useCallback as se, useId as ke, useMemo as W, cloneElement as rr, isValidElement as jn, createContext as ie, useRef as j, useLayoutEffect as ir, useEffect as Ne, useContext as O, useInsertionEffect as $n, Children as or, forwardRef as Wn, Fragment as Gn, createElement as ar } from "react";
|
|
4
|
-
import { u as lr, d as Zt } from "./refs-DcCOPvdv.js";
|
|
5
|
-
import { t as cr } from "./tv-ButAo3dF.js";
|
|
6
|
-
import { d as ur, c as Q } from "./classes-7MXTIFwM.js";
|
|
7
|
-
import { c as V } from "./variants-DhZQjbsQ.js";
|
|
8
|
-
import { c as dr } from "./clsx-OuTLNxxd.js";
|
|
9
|
-
import { S as fr } from "./index-ctnzfHek.js";
|
|
10
|
-
function hr(e, t, n) {
|
|
11
|
-
return Math.min(Math.max(e, t), n);
|
|
12
|
-
}
|
|
13
|
-
function pr(e) {
|
|
14
|
-
return `${e}-${Math.floor(Math.random() * 1e6)}`;
|
|
15
|
-
}
|
|
16
|
-
const mr = cr({
|
|
17
|
-
base: [
|
|
18
|
-
"z-0",
|
|
19
|
-
"cursor-pointer",
|
|
20
|
-
"group",
|
|
21
|
-
"relative",
|
|
22
|
-
"inline-flex",
|
|
23
|
-
"items-center",
|
|
24
|
-
"justify-center",
|
|
25
|
-
"box-border",
|
|
26
|
-
"appearance-none",
|
|
27
|
-
"outline-none",
|
|
28
|
-
"select-none",
|
|
29
|
-
"whitespace-nowrap",
|
|
30
|
-
"min-w-max",
|
|
31
|
-
"font-medium",
|
|
32
|
-
"subpixel-antialiased",
|
|
33
|
-
"overflow-hidden",
|
|
34
|
-
"tap-highlight-transparent",
|
|
35
|
-
"transform-gpu data-[pressed=true]:scale-[0.97]",
|
|
36
|
-
// focus ring
|
|
37
|
-
...ur
|
|
38
|
-
],
|
|
39
|
-
variants: {
|
|
40
|
-
variant: {
|
|
41
|
-
solid: "",
|
|
42
|
-
bordered: "border-[2px] bg-transparent",
|
|
43
|
-
light: "bg-transparent",
|
|
44
|
-
flat: "",
|
|
45
|
-
faded: "border-[2px]",
|
|
46
|
-
shadow: "",
|
|
47
|
-
ghost: "border-[2px] bg-transparent"
|
|
48
|
-
},
|
|
49
|
-
size: {
|
|
50
|
-
sm: "px-3 min-w-16 h-8 text-tiny gap-2 rounded-sm",
|
|
51
|
-
md: "px-4 min-w-20 h-10 text-sm gap-2 rounded-md",
|
|
52
|
-
lg: "px-6 min-w-24 h-12 text-md gap-3 rounded-lg"
|
|
53
|
-
},
|
|
54
|
-
color: {
|
|
55
|
-
default: "",
|
|
56
|
-
primary: "",
|
|
57
|
-
secondary: "",
|
|
58
|
-
success: "",
|
|
59
|
-
warning: "",
|
|
60
|
-
danger: ""
|
|
61
|
-
},
|
|
62
|
-
radius: {
|
|
63
|
-
none: "rounded-none",
|
|
64
|
-
sm: "rounded-sm",
|
|
65
|
-
md: "rounded-md",
|
|
66
|
-
lg: "rounded-lg",
|
|
67
|
-
full: "rounded-full"
|
|
68
|
-
},
|
|
69
|
-
fullWidth: {
|
|
70
|
-
true: "w-full"
|
|
71
|
-
},
|
|
72
|
-
isDisabled: {
|
|
73
|
-
true: "opacity-80 pointer-events-none"
|
|
74
|
-
},
|
|
75
|
-
isInGroup: {
|
|
76
|
-
true: "[&:not(:first-child):not(:last-child)]:rounded-none"
|
|
77
|
-
},
|
|
78
|
-
isIconOnly: {
|
|
79
|
-
true: "px-0 !gap-0",
|
|
80
|
-
false: "[&>svg]:max-w-[theme(spacing.8)]"
|
|
81
|
-
},
|
|
82
|
-
disableAnimation: {
|
|
83
|
-
true: "!transition-none data-[pressed=true]:scale-100",
|
|
84
|
-
false: "transition-transform-colors-opacity motion-reduce:transition-none"
|
|
85
|
-
}
|
|
86
|
-
},
|
|
87
|
-
defaultVariants: {
|
|
88
|
-
size: "md",
|
|
89
|
-
variant: "solid",
|
|
90
|
-
color: "default",
|
|
91
|
-
fullWidth: !1,
|
|
92
|
-
isDisabled: !1,
|
|
93
|
-
isInGroup: !1
|
|
94
|
-
},
|
|
95
|
-
compoundVariants: [
|
|
96
|
-
// solid / color
|
|
97
|
-
{
|
|
98
|
-
variant: "solid",
|
|
99
|
-
color: "default",
|
|
100
|
-
class: V.solid.default
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
variant: "solid",
|
|
104
|
-
color: "primary",
|
|
105
|
-
class: V.solid.primary
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
variant: "solid",
|
|
109
|
-
color: "secondary",
|
|
110
|
-
class: V.solid.secondary
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
variant: "solid",
|
|
114
|
-
color: "success",
|
|
115
|
-
class: V.solid.success
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
variant: "solid",
|
|
119
|
-
color: "warning",
|
|
120
|
-
class: V.solid.warning
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
variant: "solid",
|
|
124
|
-
color: "danger",
|
|
125
|
-
class: V.solid.danger
|
|
126
|
-
},
|
|
127
|
-
// shadow / color
|
|
128
|
-
{
|
|
129
|
-
variant: "shadow",
|
|
130
|
-
color: "default",
|
|
131
|
-
class: V.shadow.default
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
variant: "shadow",
|
|
135
|
-
color: "primary",
|
|
136
|
-
class: V.shadow.primary
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
variant: "shadow",
|
|
140
|
-
color: "secondary",
|
|
141
|
-
class: V.shadow.secondary
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
variant: "shadow",
|
|
145
|
-
color: "success",
|
|
146
|
-
class: V.shadow.success
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
variant: "shadow",
|
|
150
|
-
color: "warning",
|
|
151
|
-
class: V.shadow.warning
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
variant: "shadow",
|
|
155
|
-
color: "danger",
|
|
156
|
-
class: V.shadow.danger
|
|
157
|
-
},
|
|
158
|
-
// bordered / color
|
|
159
|
-
{
|
|
160
|
-
variant: "bordered",
|
|
161
|
-
color: "default",
|
|
162
|
-
class: V.bordered.default
|
|
163
|
-
},
|
|
164
|
-
{
|
|
165
|
-
variant: "bordered",
|
|
166
|
-
color: "primary",
|
|
167
|
-
class: V.bordered.primary
|
|
168
|
-
},
|
|
169
|
-
{
|
|
170
|
-
variant: "bordered",
|
|
171
|
-
color: "secondary",
|
|
172
|
-
class: V.bordered.secondary
|
|
173
|
-
},
|
|
174
|
-
{
|
|
175
|
-
variant: "bordered",
|
|
176
|
-
color: "success",
|
|
177
|
-
class: V.bordered.success
|
|
178
|
-
},
|
|
179
|
-
{
|
|
180
|
-
variant: "bordered",
|
|
181
|
-
color: "warning",
|
|
182
|
-
class: V.bordered.warning
|
|
183
|
-
},
|
|
184
|
-
{
|
|
185
|
-
variant: "bordered",
|
|
186
|
-
color: "danger",
|
|
187
|
-
class: V.bordered.danger
|
|
188
|
-
},
|
|
189
|
-
// flat / color
|
|
190
|
-
{
|
|
191
|
-
variant: "flat",
|
|
192
|
-
color: "default",
|
|
193
|
-
class: V.flat.default
|
|
194
|
-
},
|
|
195
|
-
{
|
|
196
|
-
variant: "flat",
|
|
197
|
-
color: "primary",
|
|
198
|
-
class: V.flat.primary
|
|
199
|
-
},
|
|
200
|
-
{
|
|
201
|
-
variant: "flat",
|
|
202
|
-
color: "secondary",
|
|
203
|
-
class: V.flat.secondary
|
|
204
|
-
},
|
|
205
|
-
{
|
|
206
|
-
variant: "flat",
|
|
207
|
-
color: "success",
|
|
208
|
-
class: V.flat.success
|
|
209
|
-
},
|
|
210
|
-
{
|
|
211
|
-
variant: "flat",
|
|
212
|
-
color: "warning",
|
|
213
|
-
class: V.flat.warning
|
|
214
|
-
},
|
|
215
|
-
{
|
|
216
|
-
variant: "flat",
|
|
217
|
-
color: "danger",
|
|
218
|
-
class: V.flat.danger
|
|
219
|
-
},
|
|
220
|
-
// faded / color
|
|
221
|
-
{
|
|
222
|
-
variant: "faded",
|
|
223
|
-
color: "default",
|
|
224
|
-
class: V.faded.default
|
|
225
|
-
},
|
|
226
|
-
{
|
|
227
|
-
variant: "faded",
|
|
228
|
-
color: "primary",
|
|
229
|
-
class: V.faded.primary
|
|
230
|
-
},
|
|
231
|
-
{
|
|
232
|
-
variant: "faded",
|
|
233
|
-
color: "secondary",
|
|
234
|
-
class: V.faded.secondary
|
|
235
|
-
},
|
|
236
|
-
{
|
|
237
|
-
variant: "faded",
|
|
238
|
-
color: "success",
|
|
239
|
-
class: V.faded.success
|
|
240
|
-
},
|
|
241
|
-
{
|
|
242
|
-
variant: "faded",
|
|
243
|
-
color: "warning",
|
|
244
|
-
class: V.faded.warning
|
|
245
|
-
},
|
|
246
|
-
{
|
|
247
|
-
variant: "faded",
|
|
248
|
-
color: "danger",
|
|
249
|
-
class: V.faded.danger
|
|
250
|
-
},
|
|
251
|
-
// light / color
|
|
252
|
-
{
|
|
253
|
-
variant: "light",
|
|
254
|
-
color: "default",
|
|
255
|
-
class: [V.light.default, "data-[hover=true]:bg-default/40"]
|
|
256
|
-
},
|
|
257
|
-
{
|
|
258
|
-
variant: "light",
|
|
259
|
-
color: "primary",
|
|
260
|
-
class: [V.light.primary, "data-[hover=true]:bg-primary/20"]
|
|
261
|
-
},
|
|
262
|
-
{
|
|
263
|
-
variant: "light",
|
|
264
|
-
color: "secondary",
|
|
265
|
-
class: [V.light.secondary, "data-[hover=true]:bg-secondary/20"]
|
|
266
|
-
},
|
|
267
|
-
{
|
|
268
|
-
variant: "light",
|
|
269
|
-
color: "success",
|
|
270
|
-
class: [V.light.success, "data-[hover=true]:bg-success/20"]
|
|
271
|
-
},
|
|
272
|
-
{
|
|
273
|
-
variant: "light",
|
|
274
|
-
color: "warning",
|
|
275
|
-
class: [V.light.warning, "data-[hover=true]:bg-warning/20"]
|
|
276
|
-
},
|
|
277
|
-
{
|
|
278
|
-
variant: "light",
|
|
279
|
-
color: "danger",
|
|
280
|
-
class: [V.light.danger, "data-[hover=true]:bg-danger/20"]
|
|
281
|
-
},
|
|
282
|
-
// ghost / color
|
|
283
|
-
{
|
|
284
|
-
variant: "ghost",
|
|
285
|
-
color: "default",
|
|
286
|
-
class: [V.ghost.default, "data-[hover=true]:!bg-default"]
|
|
287
|
-
},
|
|
288
|
-
{
|
|
289
|
-
variant: "ghost",
|
|
290
|
-
color: "primary",
|
|
291
|
-
class: [V.ghost.primary, "data-[hover=true]:!bg-primary data-[hover=true]:!text-primary-foreground"]
|
|
292
|
-
},
|
|
293
|
-
{
|
|
294
|
-
variant: "ghost",
|
|
295
|
-
color: "secondary",
|
|
296
|
-
class: [V.ghost.secondary, "data-[hover=true]:!bg-secondary data-[hover=true]:!text-secondary-foreground"]
|
|
297
|
-
},
|
|
298
|
-
{
|
|
299
|
-
variant: "ghost",
|
|
300
|
-
color: "success",
|
|
301
|
-
class: [V.ghost.success, "data-[hover=true]:!bg-success data-[hover=true]:!text-success-foreground"]
|
|
302
|
-
},
|
|
303
|
-
{
|
|
304
|
-
variant: "ghost",
|
|
305
|
-
color: "warning",
|
|
306
|
-
class: [V.ghost.warning, "data-[hover=true]:!bg-warning data-[hover=true]:!text-warning-foreground"]
|
|
307
|
-
},
|
|
308
|
-
{
|
|
309
|
-
variant: "ghost",
|
|
310
|
-
color: "danger",
|
|
311
|
-
class: [V.ghost.danger, "data-[hover=true]:!bg-danger data-[hover=true]:!text-danger-foreground"]
|
|
312
|
-
},
|
|
313
|
-
// isInGroup / radius / size <-- radius not provided
|
|
314
|
-
{
|
|
315
|
-
isInGroup: !0,
|
|
316
|
-
class: "rounded-none first:rounded-s-medium last:rounded-e-medium"
|
|
317
|
-
},
|
|
318
|
-
{
|
|
319
|
-
isInGroup: !0,
|
|
320
|
-
size: "sm",
|
|
321
|
-
class: "rounded-none first:rounded-s-small last:rounded-e-small"
|
|
322
|
-
},
|
|
323
|
-
{
|
|
324
|
-
isInGroup: !0,
|
|
325
|
-
size: "md",
|
|
326
|
-
class: "rounded-none first:rounded-s-medium last:rounded-e-medium"
|
|
327
|
-
},
|
|
328
|
-
{
|
|
329
|
-
isInGroup: !0,
|
|
330
|
-
size: "lg",
|
|
331
|
-
class: "rounded-none first:rounded-s-large last:rounded-e-large"
|
|
332
|
-
},
|
|
333
|
-
{
|
|
334
|
-
isInGroup: !0,
|
|
335
|
-
isRounded: !0,
|
|
336
|
-
class: "rounded-none first:rounded-s-full last:rounded-e-full"
|
|
337
|
-
},
|
|
338
|
-
// isInGroup / radius <-- radius provided
|
|
339
|
-
{
|
|
340
|
-
isInGroup: !0,
|
|
341
|
-
radius: "none",
|
|
342
|
-
class: "rounded-none first:rounded-s-none last:rounded-e-none"
|
|
343
|
-
},
|
|
344
|
-
{
|
|
345
|
-
isInGroup: !0,
|
|
346
|
-
radius: "sm",
|
|
347
|
-
class: "rounded-none first:rounded-s-small last:rounded-e-small"
|
|
348
|
-
},
|
|
349
|
-
{
|
|
350
|
-
isInGroup: !0,
|
|
351
|
-
radius: "md",
|
|
352
|
-
class: "rounded-none first:rounded-s-medium last:rounded-e-medium"
|
|
353
|
-
},
|
|
354
|
-
{
|
|
355
|
-
isInGroup: !0,
|
|
356
|
-
radius: "lg",
|
|
357
|
-
class: "rounded-none first:rounded-s-large last:rounded-e-large"
|
|
358
|
-
},
|
|
359
|
-
{
|
|
360
|
-
isInGroup: !0,
|
|
361
|
-
radius: "full",
|
|
362
|
-
class: "rounded-none first:rounded-s-full last:rounded-e-full"
|
|
363
|
-
},
|
|
364
|
-
// isInGroup / bordered / ghost
|
|
365
|
-
{
|
|
366
|
-
isInGroup: !0,
|
|
367
|
-
variant: ["ghost", "bordered"],
|
|
368
|
-
color: "default",
|
|
369
|
-
className: Q.default
|
|
370
|
-
},
|
|
371
|
-
{
|
|
372
|
-
isInGroup: !0,
|
|
373
|
-
variant: ["ghost", "bordered"],
|
|
374
|
-
color: "primary",
|
|
375
|
-
className: Q.primary
|
|
376
|
-
},
|
|
377
|
-
{
|
|
378
|
-
isInGroup: !0,
|
|
379
|
-
variant: ["ghost", "bordered"],
|
|
380
|
-
color: "secondary",
|
|
381
|
-
className: Q.secondary
|
|
382
|
-
},
|
|
383
|
-
{
|
|
384
|
-
isInGroup: !0,
|
|
385
|
-
variant: ["ghost", "bordered"],
|
|
386
|
-
color: "success",
|
|
387
|
-
className: Q.success
|
|
388
|
-
},
|
|
389
|
-
{
|
|
390
|
-
isInGroup: !0,
|
|
391
|
-
variant: ["ghost", "bordered"],
|
|
392
|
-
color: "warning",
|
|
393
|
-
className: Q.warning
|
|
394
|
-
},
|
|
395
|
-
{
|
|
396
|
-
isInGroup: !0,
|
|
397
|
-
variant: ["ghost", "bordered"],
|
|
398
|
-
color: "danger",
|
|
399
|
-
className: Q.danger
|
|
400
|
-
},
|
|
401
|
-
{
|
|
402
|
-
isIconOnly: !0,
|
|
403
|
-
size: "sm",
|
|
404
|
-
class: "min-w-8 w-8 h-8"
|
|
405
|
-
},
|
|
406
|
-
{
|
|
407
|
-
isIconOnly: !0,
|
|
408
|
-
size: "md",
|
|
409
|
-
class: "min-w-10 w-10 h-10"
|
|
410
|
-
},
|
|
411
|
-
{
|
|
412
|
-
isIconOnly: !0,
|
|
413
|
-
size: "lg",
|
|
414
|
-
class: "min-w-12 w-12 h-12"
|
|
415
|
-
},
|
|
416
|
-
// variant / hover
|
|
417
|
-
{
|
|
418
|
-
variant: ["solid", "faded", "flat", "bordered", "shadow"],
|
|
419
|
-
class: "hover:opacity-80"
|
|
420
|
-
}
|
|
421
|
-
]
|
|
422
|
-
});
|
|
423
|
-
function gr(e = {}) {
|
|
424
|
-
const [t, n] = Pe([]), s = se((i) => {
|
|
425
|
-
const o = i.target, a = Math.max(o.clientWidth, o.clientHeight);
|
|
426
|
-
n((c) => [
|
|
427
|
-
...c,
|
|
428
|
-
{
|
|
429
|
-
key: pr(c.length.toString()),
|
|
430
|
-
size: a,
|
|
431
|
-
x: i.x - a / 2,
|
|
432
|
-
y: i.y - a / 2
|
|
433
|
-
}
|
|
434
|
-
]);
|
|
435
|
-
}, []), r = se((i) => {
|
|
436
|
-
n((o) => o.filter((a) => a.key !== i));
|
|
437
|
-
}, []);
|
|
438
|
-
return { ripples: t, onClear: r, onPress: s, ...e };
|
|
439
|
-
}
|
|
440
|
-
function yr(e) {
|
|
441
|
-
const {
|
|
442
|
-
id: t,
|
|
443
|
-
classNames: n,
|
|
444
|
-
className: s,
|
|
445
|
-
asChild: r,
|
|
446
|
-
children: i,
|
|
447
|
-
isLoading: o = !1,
|
|
448
|
-
disabled: a = !1,
|
|
449
|
-
isIconOnly: c = !1,
|
|
450
|
-
onClick: u,
|
|
451
|
-
startContent: l,
|
|
452
|
-
endContent: d,
|
|
453
|
-
spinner: f = null,
|
|
454
|
-
spinnerPlacement: h = "start",
|
|
455
|
-
type: m = "button",
|
|
456
|
-
...v
|
|
457
|
-
} = e, T = lr(e.ref), p = ke(), S = t || p, { onPress: y, onClear: A, ripples: g } = gr(), w = W(
|
|
458
|
-
() => mr({
|
|
459
|
-
size: e.size,
|
|
460
|
-
color: e.color,
|
|
461
|
-
variant: e.variant,
|
|
462
|
-
radius: e.radius,
|
|
463
|
-
fullWidth: e.fullWidth,
|
|
464
|
-
isDisabled: a || o,
|
|
465
|
-
disableAnimation: e.disableAnimation,
|
|
466
|
-
isIconOnly: c,
|
|
467
|
-
isInGroup: e.isInGroup,
|
|
468
|
-
className: s
|
|
469
|
-
}),
|
|
470
|
-
[e, s, a, o, c]
|
|
471
|
-
), M = se(
|
|
472
|
-
(N) => {
|
|
473
|
-
if (a) {
|
|
474
|
-
N.preventDefault();
|
|
475
|
-
return;
|
|
476
|
-
}
|
|
477
|
-
u == null || u(N);
|
|
478
|
-
},
|
|
479
|
-
[u, a]
|
|
480
|
-
), x = (N) => jn(N) ? rr(N, {
|
|
481
|
-
// "aria-hidden": true,
|
|
482
|
-
// "focusable": false,
|
|
483
|
-
}) : null, I = x(l), R = x(d), z = (N) => {
|
|
484
|
-
const ze = N.currentTarget.getBoundingClientRect(), F = {
|
|
485
|
-
target: N.currentTarget,
|
|
486
|
-
x: N.clientX - ze.left,
|
|
487
|
-
y: N.clientY - ze.top
|
|
488
|
-
};
|
|
489
|
-
y(F);
|
|
490
|
-
}, Te = () => ({
|
|
491
|
-
className: dr(w, n == null ? void 0 : n.base),
|
|
492
|
-
"data-disabled": Zt(a),
|
|
493
|
-
"data-loading": Zt(o),
|
|
494
|
-
onClick: M,
|
|
495
|
-
onPointerDown: z,
|
|
496
|
-
"data-slot": "button",
|
|
497
|
-
"aria-disabled": a,
|
|
498
|
-
id: S,
|
|
499
|
-
type: m,
|
|
500
|
-
...v
|
|
501
|
-
}), We = se(() => ({ ripples: g, onClear: A }), [g, A]);
|
|
502
|
-
return {
|
|
503
|
-
domRef: T,
|
|
504
|
-
isIconOnly: c,
|
|
505
|
-
Component: r ? fr : "button",
|
|
506
|
-
children: i,
|
|
507
|
-
isLoading: o,
|
|
508
|
-
spinner: f,
|
|
509
|
-
spinnerPlacement: h,
|
|
510
|
-
startContent: I,
|
|
511
|
-
endContent: R,
|
|
512
|
-
getButtonProps: Te,
|
|
513
|
-
getRippleProps: We
|
|
514
|
-
};
|
|
515
|
-
}
|
|
516
|
-
const zn = ie({});
|
|
517
|
-
function Tt(e) {
|
|
518
|
-
const t = j(null);
|
|
519
|
-
return t.current === null && (t.current = e()), t.current;
|
|
520
|
-
}
|
|
521
|
-
const Vt = typeof window < "u", _n = Vt ? ir : Ne, Le = /* @__PURE__ */ ie(null);
|
|
522
|
-
function br(e, t) {
|
|
523
|
-
e.indexOf(t) === -1 && e.push(t);
|
|
524
|
-
}
|
|
525
|
-
function vr(e, t) {
|
|
526
|
-
const n = e.indexOf(t);
|
|
527
|
-
n > -1 && e.splice(n, 1);
|
|
528
|
-
}
|
|
529
|
-
const J = (e, t, n) => n > t ? t : n < e ? e : n;
|
|
530
|
-
let oe = () => {
|
|
531
|
-
}, U = () => {
|
|
532
|
-
};
|
|
533
|
-
process.env.NODE_ENV !== "production" && (oe = (e, t) => {
|
|
534
|
-
}, U = (e, t) => {
|
|
535
|
-
if (!e)
|
|
536
|
-
throw new Error(t);
|
|
537
|
-
});
|
|
538
|
-
const G = {}, Un = (e) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);
|
|
539
|
-
function wr(e) {
|
|
540
|
-
return typeof e == "object" && e !== null;
|
|
541
|
-
}
|
|
542
|
-
const Hn = (e) => /^0[^.\s]+$/u.test(e);
|
|
543
|
-
// @__NO_SIDE_EFFECTS__
|
|
544
|
-
function St(e) {
|
|
545
|
-
let t;
|
|
546
|
-
return () => (t === void 0 && (t = e()), t);
|
|
547
|
-
}
|
|
548
|
-
const ae = /* @__NO_SIDE_EFFECTS__ */ (e) => e, xr = (e, t) => (n) => t(e(n)), Be = (...e) => e.reduce(xr), Yn = /* @__NO_SIDE_EFFECTS__ */ (e, t, n) => {
|
|
549
|
-
const s = t - e;
|
|
550
|
-
return s === 0 ? 1 : (n - e) / s;
|
|
551
|
-
};
|
|
552
|
-
class Xn {
|
|
553
|
-
constructor() {
|
|
554
|
-
this.subscriptions = [];
|
|
555
|
-
}
|
|
556
|
-
add(t) {
|
|
557
|
-
return br(this.subscriptions, t), () => vr(this.subscriptions, t);
|
|
558
|
-
}
|
|
559
|
-
notify(t, n, s) {
|
|
560
|
-
const r = this.subscriptions.length;
|
|
561
|
-
if (r)
|
|
562
|
-
if (r === 1)
|
|
563
|
-
this.subscriptions[0](t, n, s);
|
|
564
|
-
else
|
|
565
|
-
for (let i = 0; i < r; i++) {
|
|
566
|
-
const o = this.subscriptions[i];
|
|
567
|
-
o && o(t, n, s);
|
|
568
|
-
}
|
|
569
|
-
}
|
|
570
|
-
getSize() {
|
|
571
|
-
return this.subscriptions.length;
|
|
572
|
-
}
|
|
573
|
-
clear() {
|
|
574
|
-
this.subscriptions.length = 0;
|
|
575
|
-
}
|
|
576
|
-
}
|
|
577
|
-
const B = /* @__NO_SIDE_EFFECTS__ */ (e) => e * 1e3, $ = /* @__NO_SIDE_EFFECTS__ */ (e) => e / 1e3;
|
|
578
|
-
function qn(e, t) {
|
|
579
|
-
return t ? e * (1e3 / t) : 0;
|
|
580
|
-
}
|
|
581
|
-
const Jt = /* @__PURE__ */ new Set();
|
|
582
|
-
function At(e, t, n) {
|
|
583
|
-
e || Jt.has(t) || Jt.add(t);
|
|
584
|
-
}
|
|
585
|
-
const Zn = (e, t, n) => (((1 - 3 * n + 3 * t) * e + (3 * n - 6 * t)) * e + 3 * t) * e, Tr = 1e-7, Vr = 12;
|
|
586
|
-
function Sr(e, t, n, s, r) {
|
|
587
|
-
let i, o, a = 0;
|
|
588
|
-
do
|
|
589
|
-
o = t + (n - t) / 2, i = Zn(o, s, r) - e, i > 0 ? n = o : t = o;
|
|
590
|
-
while (Math.abs(i) > Tr && ++a < Vr);
|
|
591
|
-
return o;
|
|
592
|
-
}
|
|
593
|
-
function ve(e, t, n, s) {
|
|
594
|
-
if (e === t && n === s)
|
|
595
|
-
return ae;
|
|
596
|
-
const r = (i) => Sr(i, 0, 1, e, n);
|
|
597
|
-
return (i) => i === 0 || i === 1 ? i : Zn(r(i), t, s);
|
|
598
|
-
}
|
|
599
|
-
const Jn = (e) => (t) => t <= 0.5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2, Qn = (e) => (t) => 1 - e(1 - t), es = /* @__PURE__ */ ve(0.33, 1.53, 0.69, 0.99), Mt = /* @__PURE__ */ Qn(es), ts = /* @__PURE__ */ Jn(Mt), ns = (e) => (e *= 2) < 1 ? 0.5 * Mt(e) : 0.5 * (2 - Math.pow(2, -10 * (e - 1))), Ct = (e) => 1 - Math.sin(Math.acos(e)), Ar = Qn(Ct), ss = Jn(Ct), Mr = /* @__PURE__ */ ve(0.42, 0, 1, 1), Cr = /* @__PURE__ */ ve(0, 0, 0.58, 1), rs = /* @__PURE__ */ ve(0.42, 0, 0.58, 1), Pr = (e) => Array.isArray(e) && typeof e[0] != "number", is = (e) => Array.isArray(e) && typeof e[0] == "number", Qt = {
|
|
600
|
-
linear: ae,
|
|
601
|
-
easeIn: Mr,
|
|
602
|
-
easeInOut: rs,
|
|
603
|
-
easeOut: Cr,
|
|
604
|
-
circIn: Ct,
|
|
605
|
-
circInOut: ss,
|
|
606
|
-
circOut: Ar,
|
|
607
|
-
backIn: Mt,
|
|
608
|
-
backInOut: ts,
|
|
609
|
-
backOut: es,
|
|
610
|
-
anticipate: ns
|
|
611
|
-
}, Dr = (e) => typeof e == "string", en = (e) => {
|
|
612
|
-
if (is(e)) {
|
|
613
|
-
U(e.length === 4, "Cubic bezier arrays must contain four numerical values.");
|
|
614
|
-
const [t, n, s, r] = e;
|
|
615
|
-
return ve(t, n, s, r);
|
|
616
|
-
} else if (Dr(e))
|
|
617
|
-
return U(Qt[e] !== void 0, `Invalid easing type '${e}'`), Qt[e];
|
|
618
|
-
return e;
|
|
619
|
-
}, Ve = [
|
|
620
|
-
"setup",
|
|
621
|
-
// Compute
|
|
622
|
-
"read",
|
|
623
|
-
// Read
|
|
624
|
-
"resolveKeyframes",
|
|
625
|
-
// Write/Read/Write/Read
|
|
626
|
-
"preUpdate",
|
|
627
|
-
// Compute
|
|
628
|
-
"update",
|
|
629
|
-
// Compute
|
|
630
|
-
"preRender",
|
|
631
|
-
// Compute
|
|
632
|
-
"render",
|
|
633
|
-
// Write
|
|
634
|
-
"postRender"
|
|
635
|
-
// Compute
|
|
636
|
-
];
|
|
637
|
-
function Ir(e, t) {
|
|
638
|
-
let n = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), r = !1, i = !1;
|
|
639
|
-
const o = /* @__PURE__ */ new WeakSet();
|
|
640
|
-
let a = {
|
|
641
|
-
delta: 0,
|
|
642
|
-
timestamp: 0,
|
|
643
|
-
isProcessing: !1
|
|
644
|
-
};
|
|
645
|
-
function c(l) {
|
|
646
|
-
o.has(l) && (u.schedule(l), e()), l(a);
|
|
647
|
-
}
|
|
648
|
-
const u = {
|
|
649
|
-
/**
|
|
650
|
-
* Schedule a process to run on the next frame.
|
|
651
|
-
*/
|
|
652
|
-
schedule: (l, d = !1, f = !1) => {
|
|
653
|
-
const m = f && r ? n : s;
|
|
654
|
-
return d && o.add(l), m.has(l) || m.add(l), l;
|
|
655
|
-
},
|
|
656
|
-
/**
|
|
657
|
-
* Cancel the provided callback from running on the next frame.
|
|
658
|
-
*/
|
|
659
|
-
cancel: (l) => {
|
|
660
|
-
s.delete(l), o.delete(l);
|
|
661
|
-
},
|
|
662
|
-
/**
|
|
663
|
-
* Execute all schedule callbacks.
|
|
664
|
-
*/
|
|
665
|
-
process: (l) => {
|
|
666
|
-
if (a = l, r) {
|
|
667
|
-
i = !0;
|
|
668
|
-
return;
|
|
669
|
-
}
|
|
670
|
-
r = !0, [n, s] = [s, n], n.forEach(c), n.clear(), r = !1, i && (i = !1, u.process(l));
|
|
671
|
-
}
|
|
672
|
-
};
|
|
673
|
-
return u;
|
|
674
|
-
}
|
|
675
|
-
const Fr = 40;
|
|
676
|
-
function os(e, t) {
|
|
677
|
-
let n = !1, s = !0;
|
|
678
|
-
const r = {
|
|
679
|
-
delta: 0,
|
|
680
|
-
timestamp: 0,
|
|
681
|
-
isProcessing: !1
|
|
682
|
-
}, i = () => n = !0, o = Ve.reduce((y, A) => (y[A] = Ir(i), y), {}), { setup: a, read: c, resolveKeyframes: u, preUpdate: l, update: d, preRender: f, render: h, postRender: m } = o, v = () => {
|
|
683
|
-
const y = G.useManualTiming ? r.timestamp : performance.now();
|
|
684
|
-
n = !1, G.useManualTiming || (r.delta = s ? 1e3 / 60 : Math.max(Math.min(y - r.timestamp, Fr), 1)), r.timestamp = y, r.isProcessing = !0, a.process(r), c.process(r), u.process(r), l.process(r), d.process(r), f.process(r), h.process(r), m.process(r), r.isProcessing = !1, n && t && (s = !1, e(v));
|
|
685
|
-
}, T = () => {
|
|
686
|
-
n = !0, s = !0, r.isProcessing || e(v);
|
|
687
|
-
};
|
|
688
|
-
return { schedule: Ve.reduce((y, A) => {
|
|
689
|
-
const g = o[A];
|
|
690
|
-
return y[A] = (w, M = !1, x = !1) => (n || T(), g.schedule(w, M, x)), y;
|
|
691
|
-
}, {}), cancel: (y) => {
|
|
692
|
-
for (let A = 0; A < Ve.length; A++)
|
|
693
|
-
o[Ve[A]].cancel(y);
|
|
694
|
-
}, state: r, steps: o };
|
|
695
|
-
}
|
|
696
|
-
const { schedule: L, cancel: tt, state: De, steps: vl } = /* @__PURE__ */ os(typeof requestAnimationFrame < "u" ? requestAnimationFrame : ae, !0);
|
|
697
|
-
let Me;
|
|
698
|
-
function Rr() {
|
|
699
|
-
Me = void 0;
|
|
700
|
-
}
|
|
701
|
-
const k = {
|
|
702
|
-
now: () => (Me === void 0 && k.set(De.isProcessing || G.useManualTiming ? De.timestamp : performance.now()), Me),
|
|
703
|
-
set: (e) => {
|
|
704
|
-
Me = e, queueMicrotask(Rr);
|
|
705
|
-
}
|
|
706
|
-
}, as = (e) => (t) => typeof t == "string" && t.startsWith(e), Pt = /* @__PURE__ */ as("--"), Er = /* @__PURE__ */ as("var(--"), Dt = (e) => Er(e) ? Or.test(e.split("/*")[0].trim()) : !1, Or = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu, le = {
|
|
707
|
-
test: (e) => typeof e == "number",
|
|
708
|
-
parse: parseFloat,
|
|
709
|
-
transform: (e) => e
|
|
710
|
-
}, me = {
|
|
711
|
-
...le,
|
|
712
|
-
transform: (e) => J(0, 1, e)
|
|
713
|
-
}, Se = {
|
|
714
|
-
...le,
|
|
715
|
-
default: 1
|
|
716
|
-
}, pe = (e) => Math.round(e * 1e5) / 1e5, It = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
|
|
717
|
-
function kr(e) {
|
|
718
|
-
return e == null;
|
|
719
|
-
}
|
|
720
|
-
const Nr = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, Ft = (e, t) => (n) => !!(typeof n == "string" && Nr.test(n) && n.startsWith(e) || t && !kr(n) && Object.prototype.hasOwnProperty.call(n, t)), ls = (e, t, n) => (s) => {
|
|
721
|
-
if (typeof s != "string")
|
|
722
|
-
return s;
|
|
723
|
-
const [r, i, o, a] = s.match(It);
|
|
724
|
-
return {
|
|
725
|
-
[e]: parseFloat(r),
|
|
726
|
-
[t]: parseFloat(i),
|
|
727
|
-
[n]: parseFloat(o),
|
|
728
|
-
alpha: a !== void 0 ? parseFloat(a) : 1
|
|
729
|
-
};
|
|
730
|
-
}, Lr = (e) => J(0, 255, e), He = {
|
|
731
|
-
...le,
|
|
732
|
-
transform: (e) => Math.round(Lr(e))
|
|
733
|
-
}, Y = {
|
|
734
|
-
test: /* @__PURE__ */ Ft("rgb", "red"),
|
|
735
|
-
parse: /* @__PURE__ */ ls("red", "green", "blue"),
|
|
736
|
-
transform: ({ red: e, green: t, blue: n, alpha: s = 1 }) => "rgba(" + He.transform(e) + ", " + He.transform(t) + ", " + He.transform(n) + ", " + pe(me.transform(s)) + ")"
|
|
737
|
-
};
|
|
738
|
-
function Br(e) {
|
|
739
|
-
let t = "", n = "", s = "", r = "";
|
|
740
|
-
return e.length > 5 ? (t = e.substring(1, 3), n = e.substring(3, 5), s = e.substring(5, 7), r = e.substring(7, 9)) : (t = e.substring(1, 2), n = e.substring(2, 3), s = e.substring(3, 4), r = e.substring(4, 5), t += t, n += n, s += s, r += r), {
|
|
741
|
-
red: parseInt(t, 16),
|
|
742
|
-
green: parseInt(n, 16),
|
|
743
|
-
blue: parseInt(s, 16),
|
|
744
|
-
alpha: r ? parseInt(r, 16) / 255 : 1
|
|
745
|
-
};
|
|
746
|
-
}
|
|
747
|
-
const nt = {
|
|
748
|
-
test: /* @__PURE__ */ Ft("#"),
|
|
749
|
-
parse: Br,
|
|
750
|
-
transform: Y.transform
|
|
751
|
-
}, we = /* @__NO_SIDE_EFFECTS__ */ (e) => ({
|
|
752
|
-
test: (t) => typeof t == "string" && t.endsWith(e) && t.split(" ").length === 1,
|
|
753
|
-
parse: parseFloat,
|
|
754
|
-
transform: (t) => `${t}${e}`
|
|
755
|
-
}), _ = /* @__PURE__ */ we("deg"), ne = /* @__PURE__ */ we("%"), b = /* @__PURE__ */ we("px"), Kr = /* @__PURE__ */ we("vh"), jr = /* @__PURE__ */ we("vw"), tn = {
|
|
756
|
-
...ne,
|
|
757
|
-
parse: (e) => ne.parse(e) / 100,
|
|
758
|
-
transform: (e) => ne.transform(e * 100)
|
|
759
|
-
}, ee = {
|
|
760
|
-
test: /* @__PURE__ */ Ft("hsl", "hue"),
|
|
761
|
-
parse: /* @__PURE__ */ ls("hue", "saturation", "lightness"),
|
|
762
|
-
transform: ({ hue: e, saturation: t, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(e) + ", " + ne.transform(pe(t)) + ", " + ne.transform(pe(n)) + ", " + pe(me.transform(s)) + ")"
|
|
763
|
-
}, D = {
|
|
764
|
-
test: (e) => Y.test(e) || nt.test(e) || ee.test(e),
|
|
765
|
-
parse: (e) => Y.test(e) ? Y.parse(e) : ee.test(e) ? ee.parse(e) : nt.parse(e),
|
|
766
|
-
transform: (e) => typeof e == "string" ? e : e.hasOwnProperty("red") ? Y.transform(e) : ee.transform(e),
|
|
767
|
-
getAnimatableNone: (e) => {
|
|
768
|
-
const t = D.parse(e);
|
|
769
|
-
return t.alpha = 0, D.transform(t);
|
|
770
|
-
}
|
|
771
|
-
}, $r = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
|
|
772
|
-
function Wr(e) {
|
|
773
|
-
var t, n;
|
|
774
|
-
return isNaN(e) && typeof e == "string" && (((t = e.match(It)) == null ? void 0 : t.length) || 0) + (((n = e.match($r)) == null ? void 0 : n.length) || 0) > 0;
|
|
775
|
-
}
|
|
776
|
-
const cs = "number", us = "color", Gr = "var", zr = "var(", nn = "${}", _r = /var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;
|
|
777
|
-
function ge(e) {
|
|
778
|
-
const t = e.toString(), n = [], s = {
|
|
779
|
-
color: [],
|
|
780
|
-
number: [],
|
|
781
|
-
var: []
|
|
782
|
-
}, r = [];
|
|
783
|
-
let i = 0;
|
|
784
|
-
const a = t.replace(_r, (c) => (D.test(c) ? (s.color.push(i), r.push(us), n.push(D.parse(c))) : c.startsWith(zr) ? (s.var.push(i), r.push(Gr), n.push(c)) : (s.number.push(i), r.push(cs), n.push(parseFloat(c))), ++i, nn)).split(nn);
|
|
785
|
-
return { values: n, split: a, indexes: s, types: r };
|
|
786
|
-
}
|
|
787
|
-
function ds(e) {
|
|
788
|
-
return ge(e).values;
|
|
789
|
-
}
|
|
790
|
-
function fs(e) {
|
|
791
|
-
const { split: t, types: n } = ge(e), s = t.length;
|
|
792
|
-
return (r) => {
|
|
793
|
-
let i = "";
|
|
794
|
-
for (let o = 0; o < s; o++)
|
|
795
|
-
if (i += t[o], r[o] !== void 0) {
|
|
796
|
-
const a = n[o];
|
|
797
|
-
a === cs ? i += pe(r[o]) : a === us ? i += D.transform(r[o]) : i += r[o];
|
|
798
|
-
}
|
|
799
|
-
return i;
|
|
800
|
-
};
|
|
801
|
-
}
|
|
802
|
-
const Ur = (e) => typeof e == "number" ? 0 : D.test(e) ? D.getAnimatableNone(e) : e;
|
|
803
|
-
function Hr(e) {
|
|
804
|
-
const t = ds(e);
|
|
805
|
-
return fs(e)(t.map(Ur));
|
|
806
|
-
}
|
|
807
|
-
const ce = {
|
|
808
|
-
test: Wr,
|
|
809
|
-
parse: ds,
|
|
810
|
-
createTransformer: fs,
|
|
811
|
-
getAnimatableNone: Hr
|
|
812
|
-
};
|
|
813
|
-
function Ye(e, t, n) {
|
|
814
|
-
return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? e + (t - e) * 6 * n : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e;
|
|
815
|
-
}
|
|
816
|
-
function Yr({ hue: e, saturation: t, lightness: n, alpha: s }) {
|
|
817
|
-
e /= 360, t /= 100, n /= 100;
|
|
818
|
-
let r = 0, i = 0, o = 0;
|
|
819
|
-
if (!t)
|
|
820
|
-
r = i = o = n;
|
|
821
|
-
else {
|
|
822
|
-
const a = n < 0.5 ? n * (1 + t) : n + t - n * t, c = 2 * n - a;
|
|
823
|
-
r = Ye(c, a, e + 1 / 3), i = Ye(c, a, e), o = Ye(c, a, e - 1 / 3);
|
|
824
|
-
}
|
|
825
|
-
return {
|
|
826
|
-
red: Math.round(r * 255),
|
|
827
|
-
green: Math.round(i * 255),
|
|
828
|
-
blue: Math.round(o * 255),
|
|
829
|
-
alpha: s
|
|
830
|
-
};
|
|
831
|
-
}
|
|
832
|
-
function Ie(e, t) {
|
|
833
|
-
return (n) => n > 0 ? t : e;
|
|
834
|
-
}
|
|
835
|
-
const xe = (e, t, n) => e + (t - e) * n, Xe = (e, t, n) => {
|
|
836
|
-
const s = e * e, r = n * (t * t - s) + s;
|
|
837
|
-
return r < 0 ? 0 : Math.sqrt(r);
|
|
838
|
-
}, Xr = [nt, Y, ee], qr = (e) => Xr.find((t) => t.test(e));
|
|
839
|
-
function sn(e) {
|
|
840
|
-
const t = qr(e);
|
|
841
|
-
if (oe(!!t, `'${e}' is not an animatable color. Use the equivalent color code instead.`), !t)
|
|
842
|
-
return !1;
|
|
843
|
-
let n = t.parse(e);
|
|
844
|
-
return t === ee && (n = Yr(n)), n;
|
|
845
|
-
}
|
|
846
|
-
const rn = (e, t) => {
|
|
847
|
-
const n = sn(e), s = sn(t);
|
|
848
|
-
if (!n || !s)
|
|
849
|
-
return Ie(e, t);
|
|
850
|
-
const r = { ...n };
|
|
851
|
-
return (i) => (r.red = Xe(n.red, s.red, i), r.green = Xe(n.green, s.green, i), r.blue = Xe(n.blue, s.blue, i), r.alpha = xe(n.alpha, s.alpha, i), Y.transform(r));
|
|
852
|
-
}, st = /* @__PURE__ */ new Set(["none", "hidden"]);
|
|
853
|
-
function Zr(e, t) {
|
|
854
|
-
return st.has(e) ? (n) => n <= 0 ? e : t : (n) => n >= 1 ? t : e;
|
|
855
|
-
}
|
|
856
|
-
function Jr(e, t) {
|
|
857
|
-
return (n) => xe(e, t, n);
|
|
858
|
-
}
|
|
859
|
-
function Rt(e) {
|
|
860
|
-
return typeof e == "number" ? Jr : typeof e == "string" ? Dt(e) ? Ie : D.test(e) ? rn : ti : Array.isArray(e) ? hs : typeof e == "object" ? D.test(e) ? rn : Qr : Ie;
|
|
861
|
-
}
|
|
862
|
-
function hs(e, t) {
|
|
863
|
-
const n = [...e], s = n.length, r = e.map((i, o) => Rt(i)(i, t[o]));
|
|
864
|
-
return (i) => {
|
|
865
|
-
for (let o = 0; o < s; o++)
|
|
866
|
-
n[o] = r[o](i);
|
|
867
|
-
return n;
|
|
868
|
-
};
|
|
869
|
-
}
|
|
870
|
-
function Qr(e, t) {
|
|
871
|
-
const n = { ...e, ...t }, s = {};
|
|
872
|
-
for (const r in n)
|
|
873
|
-
e[r] !== void 0 && t[r] !== void 0 && (s[r] = Rt(e[r])(e[r], t[r]));
|
|
874
|
-
return (r) => {
|
|
875
|
-
for (const i in s)
|
|
876
|
-
n[i] = s[i](r);
|
|
877
|
-
return n;
|
|
878
|
-
};
|
|
879
|
-
}
|
|
880
|
-
function ei(e, t) {
|
|
881
|
-
const n = [], s = { color: 0, var: 0, number: 0 };
|
|
882
|
-
for (let r = 0; r < t.values.length; r++) {
|
|
883
|
-
const i = t.types[r], o = e.indexes[i][s[i]], a = e.values[o] ?? 0;
|
|
884
|
-
n[r] = a, s[i]++;
|
|
885
|
-
}
|
|
886
|
-
return n;
|
|
887
|
-
}
|
|
888
|
-
const ti = (e, t) => {
|
|
889
|
-
const n = ce.createTransformer(t), s = ge(e), r = ge(t);
|
|
890
|
-
return s.indexes.var.length === r.indexes.var.length && s.indexes.color.length === r.indexes.color.length && s.indexes.number.length >= r.indexes.number.length ? st.has(e) && !r.values.length || st.has(t) && !s.values.length ? Zr(e, t) : Be(hs(ei(s, r), r.values), n) : (oe(!0, `Complex values '${e}' and '${t}' 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.`), Ie(e, t));
|
|
891
|
-
};
|
|
892
|
-
function ps(e, t, n) {
|
|
893
|
-
return typeof e == "number" && typeof t == "number" && typeof n == "number" ? xe(e, t, n) : Rt(e)(e, t);
|
|
894
|
-
}
|
|
895
|
-
const ni = (e) => {
|
|
896
|
-
const t = ({ timestamp: n }) => e(n);
|
|
897
|
-
return {
|
|
898
|
-
start: (n = !0) => L.update(t, n),
|
|
899
|
-
stop: () => tt(t),
|
|
900
|
-
/**
|
|
901
|
-
* If we're processing this frame we can use the
|
|
902
|
-
* framelocked timestamp to keep things in sync.
|
|
903
|
-
*/
|
|
904
|
-
now: () => De.isProcessing ? De.timestamp : k.now()
|
|
905
|
-
};
|
|
906
|
-
}, ms = (e, t, n = 10) => {
|
|
907
|
-
let s = "";
|
|
908
|
-
const r = Math.max(Math.round(t / n), 2);
|
|
909
|
-
for (let i = 0; i < r; i++)
|
|
910
|
-
s += Math.round(e(i / (r - 1)) * 1e4) / 1e4 + ", ";
|
|
911
|
-
return `linear(${s.substring(0, s.length - 2)})`;
|
|
912
|
-
}, Fe = 2e4;
|
|
913
|
-
function Et(e) {
|
|
914
|
-
let t = 0;
|
|
915
|
-
const n = 50;
|
|
916
|
-
let s = e.next(t);
|
|
917
|
-
for (; !s.done && t < Fe; )
|
|
918
|
-
t += n, s = e.next(t);
|
|
919
|
-
return t >= Fe ? 1 / 0 : t;
|
|
920
|
-
}
|
|
921
|
-
function si(e, t = 100, n) {
|
|
922
|
-
const s = n({ ...e, keyframes: [0, t] }), r = Math.min(Et(s), Fe);
|
|
923
|
-
return {
|
|
924
|
-
type: "keyframes",
|
|
925
|
-
ease: (i) => s.next(r * i).value / t,
|
|
926
|
-
duration: /* @__PURE__ */ $(r)
|
|
927
|
-
};
|
|
928
|
-
}
|
|
929
|
-
const ri = 5;
|
|
930
|
-
function gs(e, t, n) {
|
|
931
|
-
const s = Math.max(t - ri, 0);
|
|
932
|
-
return qn(n - e(s), t - s);
|
|
933
|
-
}
|
|
934
|
-
const C = {
|
|
935
|
-
// Default spring physics
|
|
936
|
-
stiffness: 100,
|
|
937
|
-
damping: 10,
|
|
938
|
-
mass: 1,
|
|
939
|
-
velocity: 0,
|
|
940
|
-
// Default duration/bounce-based options
|
|
941
|
-
duration: 800,
|
|
942
|
-
// in ms
|
|
943
|
-
bounce: 0.3,
|
|
944
|
-
visualDuration: 0.3,
|
|
945
|
-
// in seconds
|
|
946
|
-
// Rest thresholds
|
|
947
|
-
restSpeed: {
|
|
948
|
-
granular: 0.01,
|
|
949
|
-
default: 2
|
|
950
|
-
},
|
|
951
|
-
restDelta: {
|
|
952
|
-
granular: 5e-3,
|
|
953
|
-
default: 0.5
|
|
954
|
-
},
|
|
955
|
-
// Limits
|
|
956
|
-
minDuration: 0.01,
|
|
957
|
-
// in seconds
|
|
958
|
-
maxDuration: 10,
|
|
959
|
-
// in seconds
|
|
960
|
-
minDamping: 0.05,
|
|
961
|
-
maxDamping: 1
|
|
962
|
-
}, qe = 1e-3;
|
|
963
|
-
function ii({ duration: e = C.duration, bounce: t = C.bounce, velocity: n = C.velocity, mass: s = C.mass }) {
|
|
964
|
-
let r, i;
|
|
965
|
-
oe(e <= /* @__PURE__ */ B(C.maxDuration), "Spring duration must be 10 seconds or less");
|
|
966
|
-
let o = 1 - t;
|
|
967
|
-
o = J(C.minDamping, C.maxDamping, o), e = J(C.minDuration, C.maxDuration, /* @__PURE__ */ $(e)), o < 1 ? (r = (u) => {
|
|
968
|
-
const l = u * o, d = l * e, f = l - n, h = rt(u, o), m = Math.exp(-d);
|
|
969
|
-
return qe - f / h * m;
|
|
970
|
-
}, i = (u) => {
|
|
971
|
-
const d = u * o * e, f = d * n + n, h = Math.pow(o, 2) * Math.pow(u, 2) * e, m = Math.exp(-d), v = rt(Math.pow(u, 2), o);
|
|
972
|
-
return (-r(u) + qe > 0 ? -1 : 1) * ((f - h) * m) / v;
|
|
973
|
-
}) : (r = (u) => {
|
|
974
|
-
const l = Math.exp(-u * e), d = (u - n) * e + 1;
|
|
975
|
-
return -qe + l * d;
|
|
976
|
-
}, i = (u) => {
|
|
977
|
-
const l = Math.exp(-u * e), d = (n - u) * (e * e);
|
|
978
|
-
return l * d;
|
|
979
|
-
});
|
|
980
|
-
const a = 5 / e, c = ai(r, i, a);
|
|
981
|
-
if (e = /* @__PURE__ */ B(e), isNaN(c))
|
|
982
|
-
return {
|
|
983
|
-
stiffness: C.stiffness,
|
|
984
|
-
damping: C.damping,
|
|
985
|
-
duration: e
|
|
986
|
-
};
|
|
987
|
-
{
|
|
988
|
-
const u = Math.pow(c, 2) * s;
|
|
989
|
-
return {
|
|
990
|
-
stiffness: u,
|
|
991
|
-
damping: o * 2 * Math.sqrt(s * u),
|
|
992
|
-
duration: e
|
|
993
|
-
};
|
|
994
|
-
}
|
|
995
|
-
}
|
|
996
|
-
const oi = 12;
|
|
997
|
-
function ai(e, t, n) {
|
|
998
|
-
let s = n;
|
|
999
|
-
for (let r = 1; r < oi; r++)
|
|
1000
|
-
s = s - e(s) / t(s);
|
|
1001
|
-
return s;
|
|
1002
|
-
}
|
|
1003
|
-
function rt(e, t) {
|
|
1004
|
-
return e * Math.sqrt(1 - t * t);
|
|
1005
|
-
}
|
|
1006
|
-
const li = ["duration", "bounce"], ci = ["stiffness", "damping", "mass"];
|
|
1007
|
-
function on(e, t) {
|
|
1008
|
-
return t.some((n) => e[n] !== void 0);
|
|
1009
|
-
}
|
|
1010
|
-
function ui(e) {
|
|
1011
|
-
let t = {
|
|
1012
|
-
velocity: C.velocity,
|
|
1013
|
-
stiffness: C.stiffness,
|
|
1014
|
-
damping: C.damping,
|
|
1015
|
-
mass: C.mass,
|
|
1016
|
-
isResolvedFromDuration: !1,
|
|
1017
|
-
...e
|
|
1018
|
-
};
|
|
1019
|
-
if (!on(e, ci) && on(e, li))
|
|
1020
|
-
if (e.visualDuration) {
|
|
1021
|
-
const n = e.visualDuration, s = 2 * Math.PI / (n * 1.2), r = s * s, i = 2 * J(0.05, 1, 1 - (e.bounce || 0)) * Math.sqrt(r);
|
|
1022
|
-
t = {
|
|
1023
|
-
...t,
|
|
1024
|
-
mass: C.mass,
|
|
1025
|
-
stiffness: r,
|
|
1026
|
-
damping: i
|
|
1027
|
-
};
|
|
1028
|
-
} else {
|
|
1029
|
-
const n = ii(e);
|
|
1030
|
-
t = {
|
|
1031
|
-
...t,
|
|
1032
|
-
...n,
|
|
1033
|
-
mass: C.mass
|
|
1034
|
-
}, t.isResolvedFromDuration = !0;
|
|
1035
|
-
}
|
|
1036
|
-
return t;
|
|
1037
|
-
}
|
|
1038
|
-
function Re(e = C.visualDuration, t = C.bounce) {
|
|
1039
|
-
const n = typeof e != "object" ? {
|
|
1040
|
-
visualDuration: e,
|
|
1041
|
-
keyframes: [0, 1],
|
|
1042
|
-
bounce: t
|
|
1043
|
-
} : e;
|
|
1044
|
-
let { restSpeed: s, restDelta: r } = n;
|
|
1045
|
-
const i = n.keyframes[0], o = n.keyframes[n.keyframes.length - 1], a = { done: !1, value: i }, { stiffness: c, damping: u, mass: l, duration: d, velocity: f, isResolvedFromDuration: h } = ui({
|
|
1046
|
-
...n,
|
|
1047
|
-
velocity: -/* @__PURE__ */ $(n.velocity || 0)
|
|
1048
|
-
}), m = f || 0, v = u / (2 * Math.sqrt(c * l)), T = o - i, p = /* @__PURE__ */ $(Math.sqrt(c / l)), S = Math.abs(T) < 5;
|
|
1049
|
-
s || (s = S ? C.restSpeed.granular : C.restSpeed.default), r || (r = S ? C.restDelta.granular : C.restDelta.default);
|
|
1050
|
-
let y;
|
|
1051
|
-
if (v < 1) {
|
|
1052
|
-
const g = rt(p, v);
|
|
1053
|
-
y = (w) => {
|
|
1054
|
-
const M = Math.exp(-v * p * w);
|
|
1055
|
-
return o - M * ((m + v * p * T) / g * Math.sin(g * w) + T * Math.cos(g * w));
|
|
1056
|
-
};
|
|
1057
|
-
} else if (v === 1)
|
|
1058
|
-
y = (g) => o - Math.exp(-p * g) * (T + (m + p * T) * g);
|
|
1059
|
-
else {
|
|
1060
|
-
const g = p * Math.sqrt(v * v - 1);
|
|
1061
|
-
y = (w) => {
|
|
1062
|
-
const M = Math.exp(-v * p * w), x = Math.min(g * w, 300);
|
|
1063
|
-
return o - M * ((m + v * p * T) * Math.sinh(x) + g * T * Math.cosh(x)) / g;
|
|
1064
|
-
};
|
|
1065
|
-
}
|
|
1066
|
-
const A = {
|
|
1067
|
-
calculatedDuration: h && d || null,
|
|
1068
|
-
next: (g) => {
|
|
1069
|
-
const w = y(g);
|
|
1070
|
-
if (h)
|
|
1071
|
-
a.done = g >= d;
|
|
1072
|
-
else {
|
|
1073
|
-
let M = g === 0 ? m : 0;
|
|
1074
|
-
v < 1 && (M = g === 0 ? /* @__PURE__ */ B(m) : gs(y, g, w));
|
|
1075
|
-
const x = Math.abs(M) <= s, I = Math.abs(o - w) <= r;
|
|
1076
|
-
a.done = x && I;
|
|
1077
|
-
}
|
|
1078
|
-
return a.value = a.done ? o : w, a;
|
|
1079
|
-
},
|
|
1080
|
-
toString: () => {
|
|
1081
|
-
const g = Math.min(Et(A), Fe), w = ms((M) => A.next(g * M).value, g, 30);
|
|
1082
|
-
return g + "ms " + w;
|
|
1083
|
-
},
|
|
1084
|
-
toTransition: () => {
|
|
1085
|
-
}
|
|
1086
|
-
};
|
|
1087
|
-
return A;
|
|
1088
|
-
}
|
|
1089
|
-
Re.applyToOptions = (e) => {
|
|
1090
|
-
const t = si(e, 100, Re);
|
|
1091
|
-
return e.ease = t.ease, e.duration = /* @__PURE__ */ B(t.duration), e.type = "keyframes", e;
|
|
1092
|
-
};
|
|
1093
|
-
function it({ keyframes: e, velocity: t = 0, power: n = 0.8, timeConstant: s = 325, bounceDamping: r = 10, bounceStiffness: i = 500, modifyTarget: o, min: a, max: c, restDelta: u = 0.5, restSpeed: l }) {
|
|
1094
|
-
const d = e[0], f = {
|
|
1095
|
-
done: !1,
|
|
1096
|
-
value: d
|
|
1097
|
-
}, h = (x) => a !== void 0 && x < a || c !== void 0 && x > c, m = (x) => a === void 0 ? c : c === void 0 || Math.abs(a - x) < Math.abs(c - x) ? a : c;
|
|
1098
|
-
let v = n * t;
|
|
1099
|
-
const T = d + v, p = o === void 0 ? T : o(T);
|
|
1100
|
-
p !== T && (v = p - d);
|
|
1101
|
-
const S = (x) => -v * Math.exp(-x / s), y = (x) => p + S(x), A = (x) => {
|
|
1102
|
-
const I = S(x), R = y(x);
|
|
1103
|
-
f.done = Math.abs(I) <= u, f.value = f.done ? p : R;
|
|
1104
|
-
};
|
|
1105
|
-
let g, w;
|
|
1106
|
-
const M = (x) => {
|
|
1107
|
-
h(f.value) && (g = x, w = Re({
|
|
1108
|
-
keyframes: [f.value, m(f.value)],
|
|
1109
|
-
velocity: gs(y, x, f.value),
|
|
1110
|
-
// TODO: This should be passing * 1000
|
|
1111
|
-
damping: r,
|
|
1112
|
-
stiffness: i,
|
|
1113
|
-
restDelta: u,
|
|
1114
|
-
restSpeed: l
|
|
1115
|
-
}));
|
|
1116
|
-
};
|
|
1117
|
-
return M(0), {
|
|
1118
|
-
calculatedDuration: null,
|
|
1119
|
-
next: (x) => {
|
|
1120
|
-
let I = !1;
|
|
1121
|
-
return !w && g === void 0 && (I = !0, A(x), M(x)), g !== void 0 && x >= g ? w.next(x - g) : (!I && A(x), f);
|
|
1122
|
-
}
|
|
1123
|
-
};
|
|
1124
|
-
}
|
|
1125
|
-
function di(e, t, n) {
|
|
1126
|
-
const s = [], r = n || G.mix || ps, i = e.length - 1;
|
|
1127
|
-
for (let o = 0; o < i; o++) {
|
|
1128
|
-
let a = r(e[o], e[o + 1]);
|
|
1129
|
-
if (t) {
|
|
1130
|
-
const c = Array.isArray(t) ? t[o] || ae : t;
|
|
1131
|
-
a = Be(c, a);
|
|
1132
|
-
}
|
|
1133
|
-
s.push(a);
|
|
1134
|
-
}
|
|
1135
|
-
return s;
|
|
1136
|
-
}
|
|
1137
|
-
function fi(e, t, { clamp: n = !0, ease: s, mixer: r } = {}) {
|
|
1138
|
-
const i = e.length;
|
|
1139
|
-
if (U(i === t.length, "Both input and output ranges must be the same length"), i === 1)
|
|
1140
|
-
return () => t[0];
|
|
1141
|
-
if (i === 2 && t[0] === t[1])
|
|
1142
|
-
return () => t[1];
|
|
1143
|
-
const o = e[0] === e[1];
|
|
1144
|
-
e[0] > e[i - 1] && (e = [...e].reverse(), t = [...t].reverse());
|
|
1145
|
-
const a = di(t, s, r), c = a.length, u = (l) => {
|
|
1146
|
-
if (o && l < e[0])
|
|
1147
|
-
return t[0];
|
|
1148
|
-
let d = 0;
|
|
1149
|
-
if (c > 1)
|
|
1150
|
-
for (; d < e.length - 2 && !(l < e[d + 1]); d++)
|
|
1151
|
-
;
|
|
1152
|
-
const f = /* @__PURE__ */ Yn(e[d], e[d + 1], l);
|
|
1153
|
-
return a[d](f);
|
|
1154
|
-
};
|
|
1155
|
-
return n ? (l) => u(J(e[0], e[i - 1], l)) : u;
|
|
1156
|
-
}
|
|
1157
|
-
function hi(e, t) {
|
|
1158
|
-
const n = e[e.length - 1];
|
|
1159
|
-
for (let s = 1; s <= t; s++) {
|
|
1160
|
-
const r = /* @__PURE__ */ Yn(0, t, s);
|
|
1161
|
-
e.push(xe(n, 1, r));
|
|
1162
|
-
}
|
|
1163
|
-
}
|
|
1164
|
-
function pi(e) {
|
|
1165
|
-
const t = [0];
|
|
1166
|
-
return hi(t, e.length - 1), t;
|
|
1167
|
-
}
|
|
1168
|
-
function mi(e, t) {
|
|
1169
|
-
return e.map((n) => n * t);
|
|
1170
|
-
}
|
|
1171
|
-
function gi(e, t) {
|
|
1172
|
-
return e.map(() => t || rs).splice(0, e.length - 1);
|
|
1173
|
-
}
|
|
1174
|
-
function te({ duration: e = 300, keyframes: t, times: n, ease: s = "easeInOut" }) {
|
|
1175
|
-
const r = Pr(s) ? s.map(en) : en(s), i = {
|
|
1176
|
-
done: !1,
|
|
1177
|
-
value: t[0]
|
|
1178
|
-
}, o = mi(
|
|
1179
|
-
// Only use the provided offsets if they're the correct length
|
|
1180
|
-
// TODO Maybe we should warn here if there's a length mismatch
|
|
1181
|
-
n && n.length === t.length ? n : pi(t),
|
|
1182
|
-
e
|
|
1183
|
-
), a = fi(o, t, {
|
|
1184
|
-
ease: Array.isArray(r) ? r : gi(t, r)
|
|
1185
|
-
});
|
|
1186
|
-
return {
|
|
1187
|
-
calculatedDuration: e,
|
|
1188
|
-
next: (c) => (i.value = a(c), i.done = c >= e, i)
|
|
1189
|
-
};
|
|
1190
|
-
}
|
|
1191
|
-
const yi = (e) => e !== null;
|
|
1192
|
-
function Ot(e, { repeat: t, repeatType: n = "loop" }, s, r = 1) {
|
|
1193
|
-
const i = e.filter(yi), a = r < 0 || t && n !== "loop" && t % 2 === 1 ? 0 : i.length - 1;
|
|
1194
|
-
return !a || s === void 0 ? i[a] : s;
|
|
1195
|
-
}
|
|
1196
|
-
const bi = {
|
|
1197
|
-
decay: it,
|
|
1198
|
-
inertia: it,
|
|
1199
|
-
tween: te,
|
|
1200
|
-
keyframes: te,
|
|
1201
|
-
spring: Re
|
|
1202
|
-
};
|
|
1203
|
-
function ys(e) {
|
|
1204
|
-
typeof e.type == "string" && (e.type = bi[e.type]);
|
|
1205
|
-
}
|
|
1206
|
-
class kt {
|
|
1207
|
-
constructor() {
|
|
1208
|
-
this.updateFinished();
|
|
1209
|
-
}
|
|
1210
|
-
get finished() {
|
|
1211
|
-
return this._finished;
|
|
1212
|
-
}
|
|
1213
|
-
updateFinished() {
|
|
1214
|
-
this._finished = new Promise((t) => {
|
|
1215
|
-
this.resolve = t;
|
|
1216
|
-
});
|
|
1217
|
-
}
|
|
1218
|
-
notifyFinished() {
|
|
1219
|
-
this.resolve();
|
|
1220
|
-
}
|
|
1221
|
-
/**
|
|
1222
|
-
* Allows the animation to be awaited.
|
|
1223
|
-
*
|
|
1224
|
-
* @deprecated Use `finished` instead.
|
|
1225
|
-
*/
|
|
1226
|
-
then(t, n) {
|
|
1227
|
-
return this.finished.then(t, n);
|
|
1228
|
-
}
|
|
1229
|
-
}
|
|
1230
|
-
const vi = (e) => e / 100;
|
|
1231
|
-
class Nt extends kt {
|
|
1232
|
-
constructor(t) {
|
|
1233
|
-
super(), this.state = "idle", this.startTime = null, this.isStopped = !1, this.currentTime = 0, this.holdTime = null, this.playbackSpeed = 1, this.stop = () => {
|
|
1234
|
-
var s, r;
|
|
1235
|
-
const { motionValue: n } = this.options;
|
|
1236
|
-
n && n.updatedAt !== k.now() && this.tick(k.now()), this.isStopped = !0, this.state !== "idle" && (this.teardown(), (r = (s = this.options).onStop) == null || r.call(s));
|
|
1237
|
-
}, this.options = t, this.initAnimation(), this.play(), t.autoplay === !1 && this.pause();
|
|
1238
|
-
}
|
|
1239
|
-
initAnimation() {
|
|
1240
|
-
const { options: t } = this;
|
|
1241
|
-
ys(t);
|
|
1242
|
-
const { type: n = te, repeat: s = 0, repeatDelay: r = 0, repeatType: i, velocity: o = 0 } = t;
|
|
1243
|
-
let { keyframes: a } = t;
|
|
1244
|
-
const c = n || te;
|
|
1245
|
-
process.env.NODE_ENV !== "production" && c !== te && U(a.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`), c !== te && typeof a[0] != "number" && (this.mixKeyframes = Be(vi, ps(a[0], a[1])), a = [0, 100]);
|
|
1246
|
-
const u = c({ ...t, keyframes: a });
|
|
1247
|
-
i === "mirror" && (this.mirroredGenerator = c({
|
|
1248
|
-
...t,
|
|
1249
|
-
keyframes: [...a].reverse(),
|
|
1250
|
-
velocity: -o
|
|
1251
|
-
})), u.calculatedDuration === null && (u.calculatedDuration = Et(u));
|
|
1252
|
-
const { calculatedDuration: l } = u;
|
|
1253
|
-
this.calculatedDuration = l, this.resolvedDuration = l + r, this.totalDuration = this.resolvedDuration * (s + 1) - r, this.generator = u;
|
|
1254
|
-
}
|
|
1255
|
-
updateTime(t) {
|
|
1256
|
-
const n = Math.round(t - this.startTime) * this.playbackSpeed;
|
|
1257
|
-
this.holdTime !== null ? this.currentTime = this.holdTime : this.currentTime = n;
|
|
1258
|
-
}
|
|
1259
|
-
tick(t, n = !1) {
|
|
1260
|
-
const { generator: s, totalDuration: r, mixKeyframes: i, mirroredGenerator: o, resolvedDuration: a, calculatedDuration: c } = this;
|
|
1261
|
-
if (this.startTime === null)
|
|
1262
|
-
return s.next(0);
|
|
1263
|
-
const { delay: u = 0, keyframes: l, repeat: d, repeatType: f, repeatDelay: h, type: m, onUpdate: v, finalKeyframe: T } = this.options;
|
|
1264
|
-
this.speed > 0 ? this.startTime = Math.min(this.startTime, t) : this.speed < 0 && (this.startTime = Math.min(t - r / this.speed, this.startTime)), n ? this.currentTime = t : this.updateTime(t);
|
|
1265
|
-
const p = this.currentTime - u * (this.playbackSpeed >= 0 ? 1 : -1), S = this.playbackSpeed >= 0 ? p < 0 : p > r;
|
|
1266
|
-
this.currentTime = Math.max(p, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = r);
|
|
1267
|
-
let y = this.currentTime, A = s;
|
|
1268
|
-
if (d) {
|
|
1269
|
-
const x = Math.min(this.currentTime, r) / a;
|
|
1270
|
-
let I = Math.floor(x), R = x % 1;
|
|
1271
|
-
!R && x >= 1 && (R = 1), R === 1 && I--, I = Math.min(I, d + 1), !!(I % 2) && (f === "reverse" ? (R = 1 - R, h && (R -= h / a)) : f === "mirror" && (A = o)), y = J(0, 1, R) * a;
|
|
1272
|
-
}
|
|
1273
|
-
const g = S ? { done: !1, value: l[0] } : A.next(y);
|
|
1274
|
-
i && (g.value = i(g.value));
|
|
1275
|
-
let { done: w } = g;
|
|
1276
|
-
!S && c !== null && (w = this.playbackSpeed >= 0 ? this.currentTime >= r : this.currentTime <= 0);
|
|
1277
|
-
const M = this.holdTime === null && (this.state === "finished" || this.state === "running" && w);
|
|
1278
|
-
return M && m !== it && (g.value = Ot(l, this.options, T, this.speed)), v && v(g.value), M && this.finish(), g;
|
|
1279
|
-
}
|
|
1280
|
-
/**
|
|
1281
|
-
* Allows the returned animation to be awaited or promise-chained. Currently
|
|
1282
|
-
* resolves when the animation finishes at all but in a future update could/should
|
|
1283
|
-
* reject if its cancels.
|
|
1284
|
-
*/
|
|
1285
|
-
then(t, n) {
|
|
1286
|
-
return this.finished.then(t, n);
|
|
1287
|
-
}
|
|
1288
|
-
get duration() {
|
|
1289
|
-
return /* @__PURE__ */ $(this.calculatedDuration);
|
|
1290
|
-
}
|
|
1291
|
-
get time() {
|
|
1292
|
-
return /* @__PURE__ */ $(this.currentTime);
|
|
1293
|
-
}
|
|
1294
|
-
set time(t) {
|
|
1295
|
-
var n;
|
|
1296
|
-
t = /* @__PURE__ */ B(t), this.currentTime = t, this.startTime === null || this.holdTime !== null || this.playbackSpeed === 0 ? this.holdTime = t : this.driver && (this.startTime = this.driver.now() - t / this.playbackSpeed), (n = this.driver) == null || n.start(!1);
|
|
1297
|
-
}
|
|
1298
|
-
get speed() {
|
|
1299
|
-
return this.playbackSpeed;
|
|
1300
|
-
}
|
|
1301
|
-
set speed(t) {
|
|
1302
|
-
this.updateTime(k.now());
|
|
1303
|
-
const n = this.playbackSpeed !== t;
|
|
1304
|
-
this.playbackSpeed = t, n && (this.time = /* @__PURE__ */ $(this.currentTime));
|
|
1305
|
-
}
|
|
1306
|
-
play() {
|
|
1307
|
-
var r, i;
|
|
1308
|
-
if (this.isStopped)
|
|
1309
|
-
return;
|
|
1310
|
-
const { driver: t = ni, startTime: n } = this.options;
|
|
1311
|
-
this.driver || (this.driver = t((o) => this.tick(o))), (i = (r = this.options).onPlay) == null || i.call(r);
|
|
1312
|
-
const s = this.driver.now();
|
|
1313
|
-
this.state === "finished" ? (this.updateFinished(), this.startTime = s) : this.holdTime !== null ? this.startTime = s - this.holdTime : this.startTime || (this.startTime = n ?? s), this.state === "finished" && this.speed < 0 && (this.startTime += this.calculatedDuration), this.holdTime = null, this.state = "running", this.driver.start();
|
|
1314
|
-
}
|
|
1315
|
-
pause() {
|
|
1316
|
-
this.state = "paused", this.updateTime(k.now()), this.holdTime = this.currentTime;
|
|
1317
|
-
}
|
|
1318
|
-
complete() {
|
|
1319
|
-
this.state !== "running" && this.play(), this.state = "finished", this.holdTime = null;
|
|
1320
|
-
}
|
|
1321
|
-
finish() {
|
|
1322
|
-
var t, n;
|
|
1323
|
-
this.notifyFinished(), this.teardown(), this.state = "finished", (n = (t = this.options).onComplete) == null || n.call(t);
|
|
1324
|
-
}
|
|
1325
|
-
cancel() {
|
|
1326
|
-
var t, n;
|
|
1327
|
-
this.holdTime = null, this.startTime = 0, this.tick(0), this.teardown(), (n = (t = this.options).onCancel) == null || n.call(t);
|
|
1328
|
-
}
|
|
1329
|
-
teardown() {
|
|
1330
|
-
this.state = "idle", this.stopDriver(), this.startTime = this.holdTime = null;
|
|
1331
|
-
}
|
|
1332
|
-
stopDriver() {
|
|
1333
|
-
this.driver && (this.driver.stop(), this.driver = void 0);
|
|
1334
|
-
}
|
|
1335
|
-
sample(t) {
|
|
1336
|
-
return this.startTime = 0, this.tick(t, !0);
|
|
1337
|
-
}
|
|
1338
|
-
attachTimeline(t) {
|
|
1339
|
-
var n;
|
|
1340
|
-
return this.options.allowFlatten && (this.options.type = "keyframes", this.options.ease = "linear", this.initAnimation()), (n = this.driver) == null || n.stop(), t.observe(this);
|
|
1341
|
-
}
|
|
1342
|
-
}
|
|
1343
|
-
function wi(e) {
|
|
1344
|
-
for (let t = 1; t < e.length; t++)
|
|
1345
|
-
e[t] ?? (e[t] = e[t - 1]);
|
|
1346
|
-
}
|
|
1347
|
-
const X = (e) => e * 180 / Math.PI, ot = (e) => {
|
|
1348
|
-
const t = X(Math.atan2(e[1], e[0]));
|
|
1349
|
-
return at(t);
|
|
1350
|
-
}, xi = {
|
|
1351
|
-
x: 4,
|
|
1352
|
-
y: 5,
|
|
1353
|
-
translateX: 4,
|
|
1354
|
-
translateY: 5,
|
|
1355
|
-
scaleX: 0,
|
|
1356
|
-
scaleY: 3,
|
|
1357
|
-
scale: (e) => (Math.abs(e[0]) + Math.abs(e[3])) / 2,
|
|
1358
|
-
rotate: ot,
|
|
1359
|
-
rotateZ: ot,
|
|
1360
|
-
skewX: (e) => X(Math.atan(e[1])),
|
|
1361
|
-
skewY: (e) => X(Math.atan(e[2])),
|
|
1362
|
-
skew: (e) => (Math.abs(e[1]) + Math.abs(e[2])) / 2
|
|
1363
|
-
}, at = (e) => (e = e % 360, e < 0 && (e += 360), e), an = ot, ln = (e) => Math.sqrt(e[0] * e[0] + e[1] * e[1]), cn = (e) => Math.sqrt(e[4] * e[4] + e[5] * e[5]), Ti = {
|
|
1364
|
-
x: 12,
|
|
1365
|
-
y: 13,
|
|
1366
|
-
z: 14,
|
|
1367
|
-
translateX: 12,
|
|
1368
|
-
translateY: 13,
|
|
1369
|
-
translateZ: 14,
|
|
1370
|
-
scaleX: ln,
|
|
1371
|
-
scaleY: cn,
|
|
1372
|
-
scale: (e) => (ln(e) + cn(e)) / 2,
|
|
1373
|
-
rotateX: (e) => at(X(Math.atan2(e[6], e[5]))),
|
|
1374
|
-
rotateY: (e) => at(X(Math.atan2(-e[2], e[0]))),
|
|
1375
|
-
rotateZ: an,
|
|
1376
|
-
rotate: an,
|
|
1377
|
-
skewX: (e) => X(Math.atan(e[4])),
|
|
1378
|
-
skewY: (e) => X(Math.atan(e[1])),
|
|
1379
|
-
skew: (e) => (Math.abs(e[1]) + Math.abs(e[4])) / 2
|
|
1380
|
-
};
|
|
1381
|
-
function lt(e) {
|
|
1382
|
-
return e.includes("scale") ? 1 : 0;
|
|
1383
|
-
}
|
|
1384
|
-
function ct(e, t) {
|
|
1385
|
-
if (!e || e === "none")
|
|
1386
|
-
return lt(t);
|
|
1387
|
-
const n = e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);
|
|
1388
|
-
let s, r;
|
|
1389
|
-
if (n)
|
|
1390
|
-
s = Ti, r = n;
|
|
1391
|
-
else {
|
|
1392
|
-
const a = e.match(/^matrix\(([-\d.e\s,]+)\)$/u);
|
|
1393
|
-
s = xi, r = a;
|
|
1394
|
-
}
|
|
1395
|
-
if (!r)
|
|
1396
|
-
return lt(t);
|
|
1397
|
-
const i = s[t], o = r[1].split(",").map(Si);
|
|
1398
|
-
return typeof i == "function" ? i(o) : o[i];
|
|
1399
|
-
}
|
|
1400
|
-
const Vi = (e, t) => {
|
|
1401
|
-
const { transform: n = "none" } = getComputedStyle(e);
|
|
1402
|
-
return ct(n, t);
|
|
1403
|
-
};
|
|
1404
|
-
function Si(e) {
|
|
1405
|
-
return parseFloat(e.trim());
|
|
1406
|
-
}
|
|
1407
|
-
const ue = [
|
|
1408
|
-
"transformPerspective",
|
|
1409
|
-
"x",
|
|
1410
|
-
"y",
|
|
1411
|
-
"z",
|
|
1412
|
-
"translateX",
|
|
1413
|
-
"translateY",
|
|
1414
|
-
"translateZ",
|
|
1415
|
-
"scale",
|
|
1416
|
-
"scaleX",
|
|
1417
|
-
"scaleY",
|
|
1418
|
-
"rotate",
|
|
1419
|
-
"rotateX",
|
|
1420
|
-
"rotateY",
|
|
1421
|
-
"rotateZ",
|
|
1422
|
-
"skew",
|
|
1423
|
-
"skewX",
|
|
1424
|
-
"skewY"
|
|
1425
|
-
], de = new Set(ue), un = (e) => e === le || e === b, Ai = /* @__PURE__ */ new Set(["x", "y", "z"]), Mi = ue.filter((e) => !Ai.has(e));
|
|
1426
|
-
function Ci(e) {
|
|
1427
|
-
const t = [];
|
|
1428
|
-
return Mi.forEach((n) => {
|
|
1429
|
-
const s = e.getValue(n);
|
|
1430
|
-
s !== void 0 && (t.push([n, s.get()]), s.set(n.startsWith("scale") ? 1 : 0));
|
|
1431
|
-
}), t;
|
|
1432
|
-
}
|
|
1433
|
-
const q = {
|
|
1434
|
-
// Dimensions
|
|
1435
|
-
width: ({ x: e }, { paddingLeft: t = "0", paddingRight: n = "0" }) => e.max - e.min - parseFloat(t) - parseFloat(n),
|
|
1436
|
-
height: ({ y: e }, { paddingTop: t = "0", paddingBottom: n = "0" }) => e.max - e.min - parseFloat(t) - parseFloat(n),
|
|
1437
|
-
top: (e, { top: t }) => parseFloat(t),
|
|
1438
|
-
left: (e, { left: t }) => parseFloat(t),
|
|
1439
|
-
bottom: ({ y: e }, { top: t }) => parseFloat(t) + (e.max - e.min),
|
|
1440
|
-
right: ({ x: e }, { left: t }) => parseFloat(t) + (e.max - e.min),
|
|
1441
|
-
// Transform
|
|
1442
|
-
x: (e, { transform: t }) => ct(t, "x"),
|
|
1443
|
-
y: (e, { transform: t }) => ct(t, "y")
|
|
1444
|
-
};
|
|
1445
|
-
q.translateX = q.x;
|
|
1446
|
-
q.translateY = q.y;
|
|
1447
|
-
const Z = /* @__PURE__ */ new Set();
|
|
1448
|
-
let ut = !1, dt = !1, ft = !1;
|
|
1449
|
-
function bs() {
|
|
1450
|
-
if (dt) {
|
|
1451
|
-
const e = Array.from(Z).filter((s) => s.needsMeasurement), t = new Set(e.map((s) => s.element)), n = /* @__PURE__ */ new Map();
|
|
1452
|
-
t.forEach((s) => {
|
|
1453
|
-
const r = Ci(s);
|
|
1454
|
-
r.length && (n.set(s, r), s.render());
|
|
1455
|
-
}), e.forEach((s) => s.measureInitialState()), t.forEach((s) => {
|
|
1456
|
-
s.render();
|
|
1457
|
-
const r = n.get(s);
|
|
1458
|
-
r && r.forEach(([i, o]) => {
|
|
1459
|
-
var a;
|
|
1460
|
-
(a = s.getValue(i)) == null || a.set(o);
|
|
1461
|
-
});
|
|
1462
|
-
}), e.forEach((s) => s.measureEndState()), e.forEach((s) => {
|
|
1463
|
-
s.suspendedScrollY !== void 0 && window.scrollTo(0, s.suspendedScrollY);
|
|
1464
|
-
});
|
|
1465
|
-
}
|
|
1466
|
-
dt = !1, ut = !1, Z.forEach((e) => e.complete(ft)), Z.clear();
|
|
1467
|
-
}
|
|
1468
|
-
function vs() {
|
|
1469
|
-
Z.forEach((e) => {
|
|
1470
|
-
e.readKeyframes(), e.needsMeasurement && (dt = !0);
|
|
1471
|
-
});
|
|
1472
|
-
}
|
|
1473
|
-
function Pi() {
|
|
1474
|
-
ft = !0, vs(), bs(), ft = !1;
|
|
1475
|
-
}
|
|
1476
|
-
class Lt {
|
|
1477
|
-
constructor(t, n, s, r, i, o = !1) {
|
|
1478
|
-
this.state = "pending", this.isAsync = !1, this.needsMeasurement = !1, this.unresolvedKeyframes = [...t], this.onComplete = n, this.name = s, this.motionValue = r, this.element = i, this.isAsync = o;
|
|
1479
|
-
}
|
|
1480
|
-
scheduleResolve() {
|
|
1481
|
-
this.state = "scheduled", this.isAsync ? (Z.add(this), ut || (ut = !0, L.read(vs), L.resolveKeyframes(bs))) : (this.readKeyframes(), this.complete());
|
|
1482
|
-
}
|
|
1483
|
-
readKeyframes() {
|
|
1484
|
-
const { unresolvedKeyframes: t, name: n, element: s, motionValue: r } = this;
|
|
1485
|
-
if (t[0] === null) {
|
|
1486
|
-
const i = r == null ? void 0 : r.get(), o = t[t.length - 1];
|
|
1487
|
-
if (i !== void 0)
|
|
1488
|
-
t[0] = i;
|
|
1489
|
-
else if (s && n) {
|
|
1490
|
-
const a = s.readValue(n, o);
|
|
1491
|
-
a != null && (t[0] = a);
|
|
1492
|
-
}
|
|
1493
|
-
t[0] === void 0 && (t[0] = o), r && i === void 0 && r.set(t[0]);
|
|
1494
|
-
}
|
|
1495
|
-
wi(t);
|
|
1496
|
-
}
|
|
1497
|
-
setFinalKeyframe() {
|
|
1498
|
-
}
|
|
1499
|
-
measureInitialState() {
|
|
1500
|
-
}
|
|
1501
|
-
renderEndStyles() {
|
|
1502
|
-
}
|
|
1503
|
-
measureEndState() {
|
|
1504
|
-
}
|
|
1505
|
-
complete(t = !1) {
|
|
1506
|
-
this.state = "complete", this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, t), Z.delete(this);
|
|
1507
|
-
}
|
|
1508
|
-
cancel() {
|
|
1509
|
-
this.state === "scheduled" && (Z.delete(this), this.state = "pending");
|
|
1510
|
-
}
|
|
1511
|
-
resume() {
|
|
1512
|
-
this.state === "pending" && this.scheduleResolve();
|
|
1513
|
-
}
|
|
1514
|
-
}
|
|
1515
|
-
const Di = (e) => e.startsWith("--");
|
|
1516
|
-
function Ii(e, t, n) {
|
|
1517
|
-
Di(t) ? e.style.setProperty(t, n) : e.style[t] = n;
|
|
1518
|
-
}
|
|
1519
|
-
const Fi = /* @__PURE__ */ St(() => window.ScrollTimeline !== void 0), Ri = {};
|
|
1520
|
-
function Ei(e, t) {
|
|
1521
|
-
const n = /* @__PURE__ */ St(e);
|
|
1522
|
-
return () => Ri[t] ?? n();
|
|
1523
|
-
}
|
|
1524
|
-
const ws = /* @__PURE__ */ Ei(() => {
|
|
1525
|
-
try {
|
|
1526
|
-
document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
|
|
1527
|
-
} catch {
|
|
1528
|
-
return !1;
|
|
1529
|
-
}
|
|
1530
|
-
return !0;
|
|
1531
|
-
}, "linearEasing"), he = ([e, t, n, s]) => `cubic-bezier(${e}, ${t}, ${n}, ${s})`, dn = {
|
|
1532
|
-
linear: "linear",
|
|
1533
|
-
ease: "ease",
|
|
1534
|
-
easeIn: "ease-in",
|
|
1535
|
-
easeOut: "ease-out",
|
|
1536
|
-
easeInOut: "ease-in-out",
|
|
1537
|
-
circIn: /* @__PURE__ */ he([0, 0.65, 0.55, 1]),
|
|
1538
|
-
circOut: /* @__PURE__ */ he([0.55, 0, 1, 0.45]),
|
|
1539
|
-
backIn: /* @__PURE__ */ he([0.31, 0.01, 0.66, -0.59]),
|
|
1540
|
-
backOut: /* @__PURE__ */ he([0.33, 1.53, 0.69, 0.99])
|
|
1541
|
-
};
|
|
1542
|
-
function xs(e, t) {
|
|
1543
|
-
if (e)
|
|
1544
|
-
return typeof e == "function" ? ws() ? ms(e, t) : "ease-out" : is(e) ? he(e) : Array.isArray(e) ? e.map((n) => xs(n, t) || dn.easeOut) : dn[e];
|
|
1545
|
-
}
|
|
1546
|
-
function Oi(e, t, n, { delay: s = 0, duration: r = 300, repeat: i = 0, repeatType: o = "loop", ease: a = "easeOut", times: c } = {}, u = void 0) {
|
|
1547
|
-
const l = {
|
|
1548
|
-
[t]: n
|
|
1549
|
-
};
|
|
1550
|
-
c && (l.offset = c);
|
|
1551
|
-
const d = xs(a, r);
|
|
1552
|
-
Array.isArray(d) && (l.easing = d);
|
|
1553
|
-
const f = {
|
|
1554
|
-
delay: s,
|
|
1555
|
-
duration: r,
|
|
1556
|
-
easing: Array.isArray(d) ? "linear" : d,
|
|
1557
|
-
fill: "both",
|
|
1558
|
-
iterations: i + 1,
|
|
1559
|
-
direction: o === "reverse" ? "alternate" : "normal"
|
|
1560
|
-
};
|
|
1561
|
-
return u && (f.pseudoElement = u), e.animate(l, f);
|
|
1562
|
-
}
|
|
1563
|
-
function Ts(e) {
|
|
1564
|
-
return typeof e == "function" && "applyToOptions" in e;
|
|
1565
|
-
}
|
|
1566
|
-
function ki({ type: e, ...t }) {
|
|
1567
|
-
return Ts(e) && ws() ? e.applyToOptions(t) : (t.duration ?? (t.duration = 300), t.ease ?? (t.ease = "easeOut"), t);
|
|
1568
|
-
}
|
|
1569
|
-
class Ni extends kt {
|
|
1570
|
-
constructor(t) {
|
|
1571
|
-
if (super(), this.finishedTime = null, this.isStopped = !1, !t)
|
|
1572
|
-
return;
|
|
1573
|
-
const { element: n, name: s, keyframes: r, pseudoElement: i, allowFlatten: o = !1, finalKeyframe: a, onComplete: c } = t;
|
|
1574
|
-
this.isPseudoElement = !!i, this.allowFlatten = o, this.options = t, U(typeof t.type != "string", `animateMini doesn't support "type" as a string. Did you mean to import { spring } from "motion"?`);
|
|
1575
|
-
const u = ki(t);
|
|
1576
|
-
this.animation = Oi(n, s, r, u, i), u.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
|
|
1577
|
-
if (this.finishedTime = this.time, !i) {
|
|
1578
|
-
const l = Ot(r, this.options, a, this.speed);
|
|
1579
|
-
this.updateMotionValue ? this.updateMotionValue(l) : Ii(n, s, l), this.animation.cancel();
|
|
1580
|
-
}
|
|
1581
|
-
c == null || c(), this.notifyFinished();
|
|
1582
|
-
};
|
|
1583
|
-
}
|
|
1584
|
-
play() {
|
|
1585
|
-
this.isStopped || (this.animation.play(), this.state === "finished" && this.updateFinished());
|
|
1586
|
-
}
|
|
1587
|
-
pause() {
|
|
1588
|
-
this.animation.pause();
|
|
1589
|
-
}
|
|
1590
|
-
complete() {
|
|
1591
|
-
var t, n;
|
|
1592
|
-
(n = (t = this.animation).finish) == null || n.call(t);
|
|
1593
|
-
}
|
|
1594
|
-
cancel() {
|
|
1595
|
-
try {
|
|
1596
|
-
this.animation.cancel();
|
|
1597
|
-
} catch {
|
|
1598
|
-
}
|
|
1599
|
-
}
|
|
1600
|
-
stop() {
|
|
1601
|
-
if (this.isStopped)
|
|
1602
|
-
return;
|
|
1603
|
-
this.isStopped = !0;
|
|
1604
|
-
const { state: t } = this;
|
|
1605
|
-
t === "idle" || t === "finished" || (this.updateMotionValue ? this.updateMotionValue() : this.commitStyles(), this.isPseudoElement || this.cancel());
|
|
1606
|
-
}
|
|
1607
|
-
/**
|
|
1608
|
-
* WAAPI doesn't natively have any interruption capabilities.
|
|
1609
|
-
*
|
|
1610
|
-
* In this method, we commit styles back to the DOM before cancelling
|
|
1611
|
-
* the animation.
|
|
1612
|
-
*
|
|
1613
|
-
* This is designed to be overridden by NativeAnimationExtended, which
|
|
1614
|
-
* will create a renderless JS animation and sample it twice to calculate
|
|
1615
|
-
* its current value, "previous" value, and therefore allow
|
|
1616
|
-
* Motion to also correctly calculate velocity for any subsequent animation
|
|
1617
|
-
* while deferring the commit until the next animation frame.
|
|
1618
|
-
*/
|
|
1619
|
-
commitStyles() {
|
|
1620
|
-
var t, n;
|
|
1621
|
-
this.isPseudoElement || (n = (t = this.animation).commitStyles) == null || n.call(t);
|
|
1622
|
-
}
|
|
1623
|
-
get duration() {
|
|
1624
|
-
var n, s;
|
|
1625
|
-
const t = ((s = (n = this.animation.effect) == null ? void 0 : n.getComputedTiming) == null ? void 0 : s.call(n).duration) || 0;
|
|
1626
|
-
return /* @__PURE__ */ $(Number(t));
|
|
1627
|
-
}
|
|
1628
|
-
get time() {
|
|
1629
|
-
return /* @__PURE__ */ $(Number(this.animation.currentTime) || 0);
|
|
1630
|
-
}
|
|
1631
|
-
set time(t) {
|
|
1632
|
-
this.finishedTime = null, this.animation.currentTime = /* @__PURE__ */ B(t);
|
|
1633
|
-
}
|
|
1634
|
-
/**
|
|
1635
|
-
* The playback speed of the animation.
|
|
1636
|
-
* 1 = normal speed, 2 = double speed, 0.5 = half speed.
|
|
1637
|
-
*/
|
|
1638
|
-
get speed() {
|
|
1639
|
-
return this.animation.playbackRate;
|
|
1640
|
-
}
|
|
1641
|
-
set speed(t) {
|
|
1642
|
-
t < 0 && (this.finishedTime = null), this.animation.playbackRate = t;
|
|
1643
|
-
}
|
|
1644
|
-
get state() {
|
|
1645
|
-
return this.finishedTime !== null ? "finished" : this.animation.playState;
|
|
1646
|
-
}
|
|
1647
|
-
get startTime() {
|
|
1648
|
-
return Number(this.animation.startTime);
|
|
1649
|
-
}
|
|
1650
|
-
set startTime(t) {
|
|
1651
|
-
this.animation.startTime = t;
|
|
1652
|
-
}
|
|
1653
|
-
/**
|
|
1654
|
-
* Attaches a timeline to the animation, for instance the `ScrollTimeline`.
|
|
1655
|
-
*/
|
|
1656
|
-
attachTimeline({ timeline: t, observe: n }) {
|
|
1657
|
-
var s;
|
|
1658
|
-
return this.allowFlatten && ((s = this.animation.effect) == null || s.updateTiming({ easing: "linear" })), this.animation.onfinish = null, t && Fi() ? (this.animation.timeline = t, ae) : n(this);
|
|
1659
|
-
}
|
|
1660
|
-
}
|
|
1661
|
-
const Vs = {
|
|
1662
|
-
anticipate: ns,
|
|
1663
|
-
backInOut: ts,
|
|
1664
|
-
circInOut: ss
|
|
1665
|
-
};
|
|
1666
|
-
function Li(e) {
|
|
1667
|
-
return e in Vs;
|
|
1668
|
-
}
|
|
1669
|
-
function Bi(e) {
|
|
1670
|
-
typeof e.ease == "string" && Li(e.ease) && (e.ease = Vs[e.ease]);
|
|
1671
|
-
}
|
|
1672
|
-
const fn = 10;
|
|
1673
|
-
class Ki extends Ni {
|
|
1674
|
-
constructor(t) {
|
|
1675
|
-
Bi(t), ys(t), super(t), t.startTime && (this.startTime = t.startTime), this.options = t;
|
|
1676
|
-
}
|
|
1677
|
-
/**
|
|
1678
|
-
* WAAPI doesn't natively have any interruption capabilities.
|
|
1679
|
-
*
|
|
1680
|
-
* Rather than read commited styles back out of the DOM, we can
|
|
1681
|
-
* create a renderless JS animation and sample it twice to calculate
|
|
1682
|
-
* its current value, "previous" value, and therefore allow
|
|
1683
|
-
* Motion to calculate velocity for any subsequent animation.
|
|
1684
|
-
*/
|
|
1685
|
-
updateMotionValue(t) {
|
|
1686
|
-
const { motionValue: n, onUpdate: s, onComplete: r, element: i, ...o } = this.options;
|
|
1687
|
-
if (!n)
|
|
1688
|
-
return;
|
|
1689
|
-
if (t !== void 0) {
|
|
1690
|
-
n.set(t);
|
|
1691
|
-
return;
|
|
1692
|
-
}
|
|
1693
|
-
const a = new Nt({
|
|
1694
|
-
...o,
|
|
1695
|
-
autoplay: !1
|
|
1696
|
-
}), c = /* @__PURE__ */ B(this.finishedTime ?? this.time);
|
|
1697
|
-
n.setWithVelocity(a.sample(c - fn).value, a.sample(c).value, fn), a.stop();
|
|
1698
|
-
}
|
|
1699
|
-
}
|
|
1700
|
-
const hn = (e, t) => t === "zIndex" ? !1 : !!(typeof e == "number" || Array.isArray(e) || typeof e == "string" && // It's animatable if we have a string
|
|
1701
|
-
(ce.test(e) || e === "0") && // And it contains numbers and/or colors
|
|
1702
|
-
!e.startsWith("url("));
|
|
1703
|
-
function ji(e) {
|
|
1704
|
-
const t = e[0];
|
|
1705
|
-
if (e.length === 1)
|
|
1706
|
-
return !0;
|
|
1707
|
-
for (let n = 0; n < e.length; n++)
|
|
1708
|
-
if (e[n] !== t)
|
|
1709
|
-
return !0;
|
|
1710
|
-
}
|
|
1711
|
-
function $i(e, t, n, s) {
|
|
1712
|
-
const r = e[0];
|
|
1713
|
-
if (r === null)
|
|
1714
|
-
return !1;
|
|
1715
|
-
if (t === "display" || t === "visibility")
|
|
1716
|
-
return !0;
|
|
1717
|
-
const i = e[e.length - 1], o = hn(r, t), a = hn(i, t);
|
|
1718
|
-
return oe(o === a, `You are trying to animate ${t} from "${r}" to "${i}". ${r} is not an animatable value - to enable this animation set ${r} to a value animatable to ${i} via the \`style\` property.`), !o || !a ? !1 : ji(e) || (n === "spring" || Ts(n)) && s;
|
|
1719
|
-
}
|
|
1720
|
-
function Bt(e) {
|
|
1721
|
-
return wr(e) && "offsetHeight" in e;
|
|
1722
|
-
}
|
|
1723
|
-
const Wi = /* @__PURE__ */ new Set([
|
|
1724
|
-
"opacity",
|
|
1725
|
-
"clipPath",
|
|
1726
|
-
"filter",
|
|
1727
|
-
"transform"
|
|
1728
|
-
// TODO: Could be re-enabled now we have support for linear() easing
|
|
1729
|
-
// "background-color"
|
|
1730
|
-
]), Gi = /* @__PURE__ */ St(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
|
|
1731
|
-
function zi(e) {
|
|
1732
|
-
var u;
|
|
1733
|
-
const { motionValue: t, name: n, repeatDelay: s, repeatType: r, damping: i, type: o } = e;
|
|
1734
|
-
if (!Bt((u = t == null ? void 0 : t.owner) == null ? void 0 : u.current))
|
|
1735
|
-
return !1;
|
|
1736
|
-
const { onUpdate: a, transformTemplate: c } = t.owner.getProps();
|
|
1737
|
-
return Gi() && n && Wi.has(n) && (n !== "transform" || !c) && /**
|
|
1738
|
-
* If we're outputting values to onUpdate then we can't use WAAPI as there's
|
|
1739
|
-
* no way to read the value from WAAPI every frame.
|
|
1740
|
-
*/
|
|
1741
|
-
!a && !s && r !== "mirror" && i !== 0 && o !== "inertia";
|
|
1742
|
-
}
|
|
1743
|
-
const _i = 40;
|
|
1744
|
-
class Ui extends kt {
|
|
1745
|
-
constructor({ autoplay: t = !0, delay: n = 0, type: s = "keyframes", repeat: r = 0, repeatDelay: i = 0, repeatType: o = "loop", keyframes: a, name: c, motionValue: u, element: l, ...d }) {
|
|
1746
|
-
var m;
|
|
1747
|
-
super(), this.stop = () => {
|
|
1748
|
-
var v, T;
|
|
1749
|
-
this._animation && (this._animation.stop(), (v = this.stopTimeline) == null || v.call(this)), (T = this.keyframeResolver) == null || T.cancel();
|
|
1750
|
-
}, this.createdAt = k.now();
|
|
1751
|
-
const f = {
|
|
1752
|
-
autoplay: t,
|
|
1753
|
-
delay: n,
|
|
1754
|
-
type: s,
|
|
1755
|
-
repeat: r,
|
|
1756
|
-
repeatDelay: i,
|
|
1757
|
-
repeatType: o,
|
|
1758
|
-
name: c,
|
|
1759
|
-
motionValue: u,
|
|
1760
|
-
element: l,
|
|
1761
|
-
...d
|
|
1762
|
-
}, h = (l == null ? void 0 : l.KeyframeResolver) || Lt;
|
|
1763
|
-
this.keyframeResolver = new h(a, (v, T, p) => this.onKeyframesResolved(v, T, f, !p), c, u, l), (m = this.keyframeResolver) == null || m.scheduleResolve();
|
|
1764
|
-
}
|
|
1765
|
-
onKeyframesResolved(t, n, s, r) {
|
|
1766
|
-
this.keyframeResolver = void 0;
|
|
1767
|
-
const { name: i, type: o, velocity: a, delay: c, isHandoff: u, onUpdate: l } = s;
|
|
1768
|
-
this.resolvedAt = k.now(), $i(t, i, o, a) || ((G.instantAnimations || !c) && (l == null || l(Ot(t, s, n))), t[0] = t[t.length - 1], s.duration = 0, s.repeat = 0);
|
|
1769
|
-
const f = {
|
|
1770
|
-
startTime: r ? this.resolvedAt ? this.resolvedAt - this.createdAt > _i ? this.resolvedAt : this.createdAt : this.createdAt : void 0,
|
|
1771
|
-
finalKeyframe: n,
|
|
1772
|
-
...s,
|
|
1773
|
-
keyframes: t
|
|
1774
|
-
}, h = !u && zi(f) ? new Ki({
|
|
1775
|
-
...f,
|
|
1776
|
-
element: f.motionValue.owner.current
|
|
1777
|
-
}) : new Nt(f);
|
|
1778
|
-
h.finished.then(() => this.notifyFinished()).catch(ae), this.pendingTimeline && (this.stopTimeline = h.attachTimeline(this.pendingTimeline), this.pendingTimeline = void 0), this._animation = h;
|
|
1779
|
-
}
|
|
1780
|
-
get finished() {
|
|
1781
|
-
return this._animation ? this.animation.finished : this._finished;
|
|
1782
|
-
}
|
|
1783
|
-
then(t, n) {
|
|
1784
|
-
return this.finished.finally(t).then(() => {
|
|
1785
|
-
});
|
|
1786
|
-
}
|
|
1787
|
-
get animation() {
|
|
1788
|
-
var t;
|
|
1789
|
-
return this._animation || ((t = this.keyframeResolver) == null || t.resume(), Pi()), this._animation;
|
|
1790
|
-
}
|
|
1791
|
-
get duration() {
|
|
1792
|
-
return this.animation.duration;
|
|
1793
|
-
}
|
|
1794
|
-
get time() {
|
|
1795
|
-
return this.animation.time;
|
|
1796
|
-
}
|
|
1797
|
-
set time(t) {
|
|
1798
|
-
this.animation.time = t;
|
|
1799
|
-
}
|
|
1800
|
-
get speed() {
|
|
1801
|
-
return this.animation.speed;
|
|
1802
|
-
}
|
|
1803
|
-
get state() {
|
|
1804
|
-
return this.animation.state;
|
|
1805
|
-
}
|
|
1806
|
-
set speed(t) {
|
|
1807
|
-
this.animation.speed = t;
|
|
1808
|
-
}
|
|
1809
|
-
get startTime() {
|
|
1810
|
-
return this.animation.startTime;
|
|
1811
|
-
}
|
|
1812
|
-
attachTimeline(t) {
|
|
1813
|
-
return this._animation ? this.stopTimeline = this.animation.attachTimeline(t) : this.pendingTimeline = t, () => this.stop();
|
|
1814
|
-
}
|
|
1815
|
-
play() {
|
|
1816
|
-
this.animation.play();
|
|
1817
|
-
}
|
|
1818
|
-
pause() {
|
|
1819
|
-
this.animation.pause();
|
|
1820
|
-
}
|
|
1821
|
-
complete() {
|
|
1822
|
-
this.animation.complete();
|
|
1823
|
-
}
|
|
1824
|
-
cancel() {
|
|
1825
|
-
var t;
|
|
1826
|
-
this._animation && this.animation.cancel(), (t = this.keyframeResolver) == null || t.cancel();
|
|
1827
|
-
}
|
|
1828
|
-
}
|
|
1829
|
-
const Hi = (
|
|
1830
|
-
// eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words
|
|
1831
|
-
/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u
|
|
1832
|
-
);
|
|
1833
|
-
function Yi(e) {
|
|
1834
|
-
const t = Hi.exec(e);
|
|
1835
|
-
if (!t)
|
|
1836
|
-
return [,];
|
|
1837
|
-
const [, n, s, r] = t;
|
|
1838
|
-
return [`--${n ?? s}`, r];
|
|
1839
|
-
}
|
|
1840
|
-
const Xi = 4;
|
|
1841
|
-
function Ss(e, t, n = 1) {
|
|
1842
|
-
U(n <= Xi, `Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);
|
|
1843
|
-
const [s, r] = Yi(e);
|
|
1844
|
-
if (!s)
|
|
1845
|
-
return;
|
|
1846
|
-
const i = window.getComputedStyle(t).getPropertyValue(s);
|
|
1847
|
-
if (i) {
|
|
1848
|
-
const o = i.trim();
|
|
1849
|
-
return Un(o) ? parseFloat(o) : o;
|
|
1850
|
-
}
|
|
1851
|
-
return Dt(r) ? Ss(r, t, n + 1) : r;
|
|
1852
|
-
}
|
|
1853
|
-
function As(e, t) {
|
|
1854
|
-
return (e == null ? void 0 : e[t]) ?? (e == null ? void 0 : e.default) ?? e;
|
|
1855
|
-
}
|
|
1856
|
-
const Ms = /* @__PURE__ */ new Set([
|
|
1857
|
-
"width",
|
|
1858
|
-
"height",
|
|
1859
|
-
"top",
|
|
1860
|
-
"left",
|
|
1861
|
-
"right",
|
|
1862
|
-
"bottom",
|
|
1863
|
-
...ue
|
|
1864
|
-
]), qi = {
|
|
1865
|
-
test: (e) => e === "auto",
|
|
1866
|
-
parse: (e) => e
|
|
1867
|
-
}, Cs = (e) => (t) => t.test(e), Ps = [le, b, ne, _, jr, Kr, qi], pn = (e) => Ps.find(Cs(e));
|
|
1868
|
-
function Zi(e) {
|
|
1869
|
-
return typeof e == "number" ? e === 0 : e !== null ? e === "none" || e === "0" || Hn(e) : !0;
|
|
1870
|
-
}
|
|
1871
|
-
const Ji = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
|
|
1872
|
-
function Qi(e) {
|
|
1873
|
-
const [t, n] = e.slice(0, -1).split("(");
|
|
1874
|
-
if (t === "drop-shadow")
|
|
1875
|
-
return e;
|
|
1876
|
-
const [s] = n.match(It) || [];
|
|
1877
|
-
if (!s)
|
|
1878
|
-
return e;
|
|
1879
|
-
const r = n.replace(s, "");
|
|
1880
|
-
let i = Ji.has(t) ? 1 : 0;
|
|
1881
|
-
return s !== n && (i *= 100), t + "(" + i + r + ")";
|
|
1882
|
-
}
|
|
1883
|
-
const eo = /\b([a-z-]*)\(.*?\)/gu, ht = {
|
|
1884
|
-
...ce,
|
|
1885
|
-
getAnimatableNone: (e) => {
|
|
1886
|
-
const t = e.match(eo);
|
|
1887
|
-
return t ? t.map(Qi).join(" ") : e;
|
|
1888
|
-
}
|
|
1889
|
-
}, mn = {
|
|
1890
|
-
...le,
|
|
1891
|
-
transform: Math.round
|
|
1892
|
-
}, to = {
|
|
1893
|
-
rotate: _,
|
|
1894
|
-
rotateX: _,
|
|
1895
|
-
rotateY: _,
|
|
1896
|
-
rotateZ: _,
|
|
1897
|
-
scale: Se,
|
|
1898
|
-
scaleX: Se,
|
|
1899
|
-
scaleY: Se,
|
|
1900
|
-
scaleZ: Se,
|
|
1901
|
-
skew: _,
|
|
1902
|
-
skewX: _,
|
|
1903
|
-
skewY: _,
|
|
1904
|
-
distance: b,
|
|
1905
|
-
translateX: b,
|
|
1906
|
-
translateY: b,
|
|
1907
|
-
translateZ: b,
|
|
1908
|
-
x: b,
|
|
1909
|
-
y: b,
|
|
1910
|
-
z: b,
|
|
1911
|
-
perspective: b,
|
|
1912
|
-
transformPerspective: b,
|
|
1913
|
-
opacity: me,
|
|
1914
|
-
originX: tn,
|
|
1915
|
-
originY: tn,
|
|
1916
|
-
originZ: b
|
|
1917
|
-
}, Kt = {
|
|
1918
|
-
// Border props
|
|
1919
|
-
borderWidth: b,
|
|
1920
|
-
borderTopWidth: b,
|
|
1921
|
-
borderRightWidth: b,
|
|
1922
|
-
borderBottomWidth: b,
|
|
1923
|
-
borderLeftWidth: b,
|
|
1924
|
-
borderRadius: b,
|
|
1925
|
-
radius: b,
|
|
1926
|
-
borderTopLeftRadius: b,
|
|
1927
|
-
borderTopRightRadius: b,
|
|
1928
|
-
borderBottomRightRadius: b,
|
|
1929
|
-
borderBottomLeftRadius: b,
|
|
1930
|
-
// Positioning props
|
|
1931
|
-
width: b,
|
|
1932
|
-
maxWidth: b,
|
|
1933
|
-
height: b,
|
|
1934
|
-
maxHeight: b,
|
|
1935
|
-
top: b,
|
|
1936
|
-
right: b,
|
|
1937
|
-
bottom: b,
|
|
1938
|
-
left: b,
|
|
1939
|
-
// Spacing props
|
|
1940
|
-
padding: b,
|
|
1941
|
-
paddingTop: b,
|
|
1942
|
-
paddingRight: b,
|
|
1943
|
-
paddingBottom: b,
|
|
1944
|
-
paddingLeft: b,
|
|
1945
|
-
margin: b,
|
|
1946
|
-
marginTop: b,
|
|
1947
|
-
marginRight: b,
|
|
1948
|
-
marginBottom: b,
|
|
1949
|
-
marginLeft: b,
|
|
1950
|
-
// Misc
|
|
1951
|
-
backgroundPositionX: b,
|
|
1952
|
-
backgroundPositionY: b,
|
|
1953
|
-
...to,
|
|
1954
|
-
zIndex: mn,
|
|
1955
|
-
// SVG
|
|
1956
|
-
fillOpacity: me,
|
|
1957
|
-
strokeOpacity: me,
|
|
1958
|
-
numOctaves: mn
|
|
1959
|
-
}, no = {
|
|
1960
|
-
...Kt,
|
|
1961
|
-
// Color props
|
|
1962
|
-
color: D,
|
|
1963
|
-
backgroundColor: D,
|
|
1964
|
-
outlineColor: D,
|
|
1965
|
-
fill: D,
|
|
1966
|
-
stroke: D,
|
|
1967
|
-
// Border props
|
|
1968
|
-
borderColor: D,
|
|
1969
|
-
borderTopColor: D,
|
|
1970
|
-
borderRightColor: D,
|
|
1971
|
-
borderBottomColor: D,
|
|
1972
|
-
borderLeftColor: D,
|
|
1973
|
-
filter: ht,
|
|
1974
|
-
WebkitFilter: ht
|
|
1975
|
-
}, Ds = (e) => no[e];
|
|
1976
|
-
function Is(e, t) {
|
|
1977
|
-
let n = Ds(e);
|
|
1978
|
-
return n !== ht && (n = ce), n.getAnimatableNone ? n.getAnimatableNone(t) : void 0;
|
|
1979
|
-
}
|
|
1980
|
-
const so = /* @__PURE__ */ new Set(["auto", "none", "0"]);
|
|
1981
|
-
function ro(e, t, n) {
|
|
1982
|
-
let s = 0, r;
|
|
1983
|
-
for (; s < e.length && !r; ) {
|
|
1984
|
-
const i = e[s];
|
|
1985
|
-
typeof i == "string" && !so.has(i) && ge(i).values.length && (r = e[s]), s++;
|
|
1986
|
-
}
|
|
1987
|
-
if (r && n)
|
|
1988
|
-
for (const i of t)
|
|
1989
|
-
e[i] = Is(n, r);
|
|
1990
|
-
}
|
|
1991
|
-
class io extends Lt {
|
|
1992
|
-
constructor(t, n, s, r, i) {
|
|
1993
|
-
super(t, n, s, r, i, !0);
|
|
1994
|
-
}
|
|
1995
|
-
readKeyframes() {
|
|
1996
|
-
const { unresolvedKeyframes: t, element: n, name: s } = this;
|
|
1997
|
-
if (!n || !n.current)
|
|
1998
|
-
return;
|
|
1999
|
-
super.readKeyframes();
|
|
2000
|
-
for (let c = 0; c < t.length; c++) {
|
|
2001
|
-
let u = t[c];
|
|
2002
|
-
if (typeof u == "string" && (u = u.trim(), Dt(u))) {
|
|
2003
|
-
const l = Ss(u, n.current);
|
|
2004
|
-
l !== void 0 && (t[c] = l), c === t.length - 1 && (this.finalKeyframe = u);
|
|
2005
|
-
}
|
|
2006
|
-
}
|
|
2007
|
-
if (this.resolveNoneKeyframes(), !Ms.has(s) || t.length !== 2)
|
|
2008
|
-
return;
|
|
2009
|
-
const [r, i] = t, o = pn(r), a = pn(i);
|
|
2010
|
-
if (o !== a)
|
|
2011
|
-
if (un(o) && un(a))
|
|
2012
|
-
for (let c = 0; c < t.length; c++) {
|
|
2013
|
-
const u = t[c];
|
|
2014
|
-
typeof u == "string" && (t[c] = parseFloat(u));
|
|
2015
|
-
}
|
|
2016
|
-
else q[s] && (this.needsMeasurement = !0);
|
|
2017
|
-
}
|
|
2018
|
-
resolveNoneKeyframes() {
|
|
2019
|
-
const { unresolvedKeyframes: t, name: n } = this, s = [];
|
|
2020
|
-
for (let r = 0; r < t.length; r++)
|
|
2021
|
-
(t[r] === null || Zi(t[r])) && s.push(r);
|
|
2022
|
-
s.length && ro(t, s, n);
|
|
2023
|
-
}
|
|
2024
|
-
measureInitialState() {
|
|
2025
|
-
const { element: t, unresolvedKeyframes: n, name: s } = this;
|
|
2026
|
-
if (!t || !t.current)
|
|
2027
|
-
return;
|
|
2028
|
-
s === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin = q[s](t.measureViewportBox(), window.getComputedStyle(t.current)), n[0] = this.measuredOrigin;
|
|
2029
|
-
const r = n[n.length - 1];
|
|
2030
|
-
r !== void 0 && t.getValue(s, r).jump(r, !1);
|
|
2031
|
-
}
|
|
2032
|
-
measureEndState() {
|
|
2033
|
-
var a;
|
|
2034
|
-
const { element: t, name: n, unresolvedKeyframes: s } = this;
|
|
2035
|
-
if (!t || !t.current)
|
|
2036
|
-
return;
|
|
2037
|
-
const r = t.getValue(n);
|
|
2038
|
-
r && r.jump(this.measuredOrigin, !1);
|
|
2039
|
-
const i = s.length - 1, o = s[i];
|
|
2040
|
-
s[i] = q[n](t.measureViewportBox(), window.getComputedStyle(t.current)), o !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = o), (a = this.removedTransforms) != null && a.length && this.removedTransforms.forEach(([c, u]) => {
|
|
2041
|
-
t.getValue(c).set(u);
|
|
2042
|
-
}), this.resolveNoneKeyframes();
|
|
2043
|
-
}
|
|
2044
|
-
}
|
|
2045
|
-
function oo(e, t, n) {
|
|
2046
|
-
if (e instanceof EventTarget)
|
|
2047
|
-
return [e];
|
|
2048
|
-
if (typeof e == "string") {
|
|
2049
|
-
let s = document;
|
|
2050
|
-
const r = (n == null ? void 0 : n[e]) ?? s.querySelectorAll(e);
|
|
2051
|
-
return r ? Array.from(r) : [];
|
|
2052
|
-
}
|
|
2053
|
-
return Array.from(e);
|
|
2054
|
-
}
|
|
2055
|
-
const Fs = (e, t) => t && typeof e == "number" ? t.transform(e) : e, gn = 30, ao = (e) => !isNaN(parseFloat(e));
|
|
2056
|
-
class lo {
|
|
2057
|
-
/**
|
|
2058
|
-
* @param init - The initiating value
|
|
2059
|
-
* @param config - Optional configuration options
|
|
2060
|
-
*
|
|
2061
|
-
* - `transformer`: A function to transform incoming values with.
|
|
2062
|
-
*/
|
|
2063
|
-
constructor(t, n = {}) {
|
|
2064
|
-
this.canTrackVelocity = null, this.events = {}, this.updateAndNotify = (s, r = !0) => {
|
|
2065
|
-
var o, a;
|
|
2066
|
-
const i = k.now();
|
|
2067
|
-
if (this.updatedAt !== i && this.setPrevFrameValue(), this.prev = this.current, this.setCurrent(s), this.current !== this.prev && ((o = this.events.change) == null || o.notify(this.current), this.dependents))
|
|
2068
|
-
for (const c of this.dependents)
|
|
2069
|
-
c.dirty();
|
|
2070
|
-
r && ((a = this.events.renderRequest) == null || a.notify(this.current));
|
|
2071
|
-
}, this.hasAnimated = !1, this.setCurrent(t), this.owner = n.owner;
|
|
2072
|
-
}
|
|
2073
|
-
setCurrent(t) {
|
|
2074
|
-
this.current = t, this.updatedAt = k.now(), this.canTrackVelocity === null && t !== void 0 && (this.canTrackVelocity = ao(this.current));
|
|
2075
|
-
}
|
|
2076
|
-
setPrevFrameValue(t = this.current) {
|
|
2077
|
-
this.prevFrameValue = t, this.prevUpdatedAt = this.updatedAt;
|
|
2078
|
-
}
|
|
2079
|
-
/**
|
|
2080
|
-
* Adds a function that will be notified when the `MotionValue` is updated.
|
|
2081
|
-
*
|
|
2082
|
-
* It returns a function that, when called, will cancel the subscription.
|
|
2083
|
-
*
|
|
2084
|
-
* When calling `onChange` inside a React component, it should be wrapped with the
|
|
2085
|
-
* `useEffect` hook. As it returns an unsubscribe function, this should be returned
|
|
2086
|
-
* from the `useEffect` function to ensure you don't add duplicate subscribers..
|
|
2087
|
-
*
|
|
2088
|
-
* ```jsx
|
|
2089
|
-
* export const MyComponent = () => {
|
|
2090
|
-
* const x = useMotionValue(0)
|
|
2091
|
-
* const y = useMotionValue(0)
|
|
2092
|
-
* const opacity = useMotionValue(1)
|
|
2093
|
-
*
|
|
2094
|
-
* useEffect(() => {
|
|
2095
|
-
* function updateOpacity() {
|
|
2096
|
-
* const maxXY = Math.max(x.get(), y.get())
|
|
2097
|
-
* const newOpacity = transform(maxXY, [0, 100], [1, 0])
|
|
2098
|
-
* opacity.set(newOpacity)
|
|
2099
|
-
* }
|
|
2100
|
-
*
|
|
2101
|
-
* const unsubscribeX = x.on("change", updateOpacity)
|
|
2102
|
-
* const unsubscribeY = y.on("change", updateOpacity)
|
|
2103
|
-
*
|
|
2104
|
-
* return () => {
|
|
2105
|
-
* unsubscribeX()
|
|
2106
|
-
* unsubscribeY()
|
|
2107
|
-
* }
|
|
2108
|
-
* }, [])
|
|
2109
|
-
*
|
|
2110
|
-
* return <motion.div style={{ x }} />
|
|
2111
|
-
* }
|
|
2112
|
-
* ```
|
|
2113
|
-
*
|
|
2114
|
-
* @param subscriber - A function that receives the latest value.
|
|
2115
|
-
* @returns A function that, when called, will cancel this subscription.
|
|
2116
|
-
*
|
|
2117
|
-
* @deprecated
|
|
2118
|
-
*/
|
|
2119
|
-
onChange(t) {
|
|
2120
|
-
return process.env.NODE_ENV !== "production" && At(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", t);
|
|
2121
|
-
}
|
|
2122
|
-
on(t, n) {
|
|
2123
|
-
this.events[t] || (this.events[t] = new Xn());
|
|
2124
|
-
const s = this.events[t].add(n);
|
|
2125
|
-
return t === "change" ? () => {
|
|
2126
|
-
s(), L.read(() => {
|
|
2127
|
-
this.events.change.getSize() || this.stop();
|
|
2128
|
-
});
|
|
2129
|
-
} : s;
|
|
2130
|
-
}
|
|
2131
|
-
clearListeners() {
|
|
2132
|
-
for (const t in this.events)
|
|
2133
|
-
this.events[t].clear();
|
|
2134
|
-
}
|
|
2135
|
-
/**
|
|
2136
|
-
* Attaches a passive effect to the `MotionValue`.
|
|
2137
|
-
*/
|
|
2138
|
-
attach(t, n) {
|
|
2139
|
-
this.passiveEffect = t, this.stopPassiveEffect = n;
|
|
2140
|
-
}
|
|
2141
|
-
/**
|
|
2142
|
-
* Sets the state of the `MotionValue`.
|
|
2143
|
-
*
|
|
2144
|
-
* @remarks
|
|
2145
|
-
*
|
|
2146
|
-
* ```jsx
|
|
2147
|
-
* const x = useMotionValue(0)
|
|
2148
|
-
* x.set(10)
|
|
2149
|
-
* ```
|
|
2150
|
-
*
|
|
2151
|
-
* @param latest - Latest value to set.
|
|
2152
|
-
* @param render - Whether to notify render subscribers. Defaults to `true`
|
|
2153
|
-
*
|
|
2154
|
-
* @public
|
|
2155
|
-
*/
|
|
2156
|
-
set(t, n = !0) {
|
|
2157
|
-
!n || !this.passiveEffect ? this.updateAndNotify(t, n) : this.passiveEffect(t, this.updateAndNotify);
|
|
2158
|
-
}
|
|
2159
|
-
setWithVelocity(t, n, s) {
|
|
2160
|
-
this.set(n), this.prev = void 0, this.prevFrameValue = t, this.prevUpdatedAt = this.updatedAt - s;
|
|
2161
|
-
}
|
|
2162
|
-
/**
|
|
2163
|
-
* Set the state of the `MotionValue`, stopping any active animations,
|
|
2164
|
-
* effects, and resets velocity to `0`.
|
|
2165
|
-
*/
|
|
2166
|
-
jump(t, n = !0) {
|
|
2167
|
-
this.updateAndNotify(t), this.prev = t, this.prevUpdatedAt = this.prevFrameValue = void 0, n && this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
|
|
2168
|
-
}
|
|
2169
|
-
dirty() {
|
|
2170
|
-
var t;
|
|
2171
|
-
(t = this.events.change) == null || t.notify(this.current);
|
|
2172
|
-
}
|
|
2173
|
-
addDependent(t) {
|
|
2174
|
-
this.dependents || (this.dependents = /* @__PURE__ */ new Set()), this.dependents.add(t);
|
|
2175
|
-
}
|
|
2176
|
-
removeDependent(t) {
|
|
2177
|
-
this.dependents && this.dependents.delete(t);
|
|
2178
|
-
}
|
|
2179
|
-
/**
|
|
2180
|
-
* Returns the latest state of `MotionValue`
|
|
2181
|
-
*
|
|
2182
|
-
* @returns - The latest state of `MotionValue`
|
|
2183
|
-
*
|
|
2184
|
-
* @public
|
|
2185
|
-
*/
|
|
2186
|
-
get() {
|
|
2187
|
-
return this.current;
|
|
2188
|
-
}
|
|
2189
|
-
/**
|
|
2190
|
-
* @public
|
|
2191
|
-
*/
|
|
2192
|
-
getPrevious() {
|
|
2193
|
-
return this.prev;
|
|
2194
|
-
}
|
|
2195
|
-
/**
|
|
2196
|
-
* Returns the latest velocity of `MotionValue`
|
|
2197
|
-
*
|
|
2198
|
-
* @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical.
|
|
2199
|
-
*
|
|
2200
|
-
* @public
|
|
2201
|
-
*/
|
|
2202
|
-
getVelocity() {
|
|
2203
|
-
const t = k.now();
|
|
2204
|
-
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || t - this.updatedAt > gn)
|
|
2205
|
-
return 0;
|
|
2206
|
-
const n = Math.min(this.updatedAt - this.prevUpdatedAt, gn);
|
|
2207
|
-
return qn(parseFloat(this.current) - parseFloat(this.prevFrameValue), n);
|
|
2208
|
-
}
|
|
2209
|
-
/**
|
|
2210
|
-
* Registers a new animation to control this `MotionValue`. Only one
|
|
2211
|
-
* animation can drive a `MotionValue` at one time.
|
|
2212
|
-
*
|
|
2213
|
-
* ```jsx
|
|
2214
|
-
* value.start()
|
|
2215
|
-
* ```
|
|
2216
|
-
*
|
|
2217
|
-
* @param animation - A function that starts the provided animation
|
|
2218
|
-
*/
|
|
2219
|
-
start(t) {
|
|
2220
|
-
return this.stop(), new Promise((n) => {
|
|
2221
|
-
this.hasAnimated = !0, this.animation = t(n), this.events.animationStart && this.events.animationStart.notify();
|
|
2222
|
-
}).then(() => {
|
|
2223
|
-
this.events.animationComplete && this.events.animationComplete.notify(), this.clearAnimation();
|
|
2224
|
-
});
|
|
2225
|
-
}
|
|
2226
|
-
/**
|
|
2227
|
-
* Stop the currently active animation.
|
|
2228
|
-
*
|
|
2229
|
-
* @public
|
|
2230
|
-
*/
|
|
2231
|
-
stop() {
|
|
2232
|
-
this.animation && (this.animation.stop(), this.events.animationCancel && this.events.animationCancel.notify()), this.clearAnimation();
|
|
2233
|
-
}
|
|
2234
|
-
/**
|
|
2235
|
-
* Returns `true` if this value is currently animating.
|
|
2236
|
-
*
|
|
2237
|
-
* @public
|
|
2238
|
-
*/
|
|
2239
|
-
isAnimating() {
|
|
2240
|
-
return !!this.animation;
|
|
2241
|
-
}
|
|
2242
|
-
clearAnimation() {
|
|
2243
|
-
delete this.animation;
|
|
2244
|
-
}
|
|
2245
|
-
/**
|
|
2246
|
-
* Destroy and clean up subscribers to this `MotionValue`.
|
|
2247
|
-
*
|
|
2248
|
-
* The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically
|
|
2249
|
-
* handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually
|
|
2250
|
-
* created a `MotionValue` via the `motionValue` function.
|
|
2251
|
-
*
|
|
2252
|
-
* @public
|
|
2253
|
-
*/
|
|
2254
|
-
destroy() {
|
|
2255
|
-
var t, n;
|
|
2256
|
-
(t = this.dependents) == null || t.clear(), (n = this.events.destroy) == null || n.notify(), this.clearListeners(), this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
|
|
2257
|
-
}
|
|
2258
|
-
}
|
|
2259
|
-
function Ee(e, t) {
|
|
2260
|
-
return new lo(e, t);
|
|
2261
|
-
}
|
|
2262
|
-
const { schedule: co } = /* @__PURE__ */ os(queueMicrotask, !1), yn = {
|
|
2263
|
-
x: !1,
|
|
2264
|
-
y: !1
|
|
2265
|
-
};
|
|
2266
|
-
function Rs() {
|
|
2267
|
-
return yn.x || yn.y;
|
|
2268
|
-
}
|
|
2269
|
-
function Es(e, t) {
|
|
2270
|
-
const n = oo(e), s = new AbortController(), r = {
|
|
2271
|
-
passive: !0,
|
|
2272
|
-
...t,
|
|
2273
|
-
signal: s.signal
|
|
2274
|
-
};
|
|
2275
|
-
return [n, r, () => s.abort()];
|
|
2276
|
-
}
|
|
2277
|
-
function bn(e) {
|
|
2278
|
-
return !(e.pointerType === "touch" || Rs());
|
|
2279
|
-
}
|
|
2280
|
-
function uo(e, t, n = {}) {
|
|
2281
|
-
const [s, r, i] = Es(e, n), o = (a) => {
|
|
2282
|
-
if (!bn(a))
|
|
2283
|
-
return;
|
|
2284
|
-
const { target: c } = a, u = t(c, a);
|
|
2285
|
-
if (typeof u != "function" || !c)
|
|
2286
|
-
return;
|
|
2287
|
-
const l = (d) => {
|
|
2288
|
-
bn(d) && (u(d), c.removeEventListener("pointerleave", l));
|
|
2289
|
-
};
|
|
2290
|
-
c.addEventListener("pointerleave", l, r);
|
|
2291
|
-
};
|
|
2292
|
-
return s.forEach((a) => {
|
|
2293
|
-
a.addEventListener("pointerenter", o, r);
|
|
2294
|
-
}), i;
|
|
2295
|
-
}
|
|
2296
|
-
const Os = (e, t) => t ? e === t ? !0 : Os(e, t.parentElement) : !1, ks = (e) => e.pointerType === "mouse" ? typeof e.button != "number" || e.button <= 0 : e.isPrimary !== !1, fo = /* @__PURE__ */ new Set([
|
|
2297
|
-
"BUTTON",
|
|
2298
|
-
"INPUT",
|
|
2299
|
-
"SELECT",
|
|
2300
|
-
"TEXTAREA",
|
|
2301
|
-
"A"
|
|
2302
|
-
]);
|
|
2303
|
-
function ho(e) {
|
|
2304
|
-
return fo.has(e.tagName) || e.tabIndex !== -1;
|
|
2305
|
-
}
|
|
2306
|
-
const Ce = /* @__PURE__ */ new WeakSet();
|
|
2307
|
-
function vn(e) {
|
|
2308
|
-
return (t) => {
|
|
2309
|
-
t.key === "Enter" && e(t);
|
|
2310
|
-
};
|
|
2311
|
-
}
|
|
2312
|
-
function Ze(e, t) {
|
|
2313
|
-
e.dispatchEvent(new PointerEvent("pointer" + t, { isPrimary: !0, bubbles: !0 }));
|
|
2314
|
-
}
|
|
2315
|
-
const po = (e, t) => {
|
|
2316
|
-
const n = e.currentTarget;
|
|
2317
|
-
if (!n)
|
|
2318
|
-
return;
|
|
2319
|
-
const s = vn(() => {
|
|
2320
|
-
if (Ce.has(n))
|
|
2321
|
-
return;
|
|
2322
|
-
Ze(n, "down");
|
|
2323
|
-
const r = vn(() => {
|
|
2324
|
-
Ze(n, "up");
|
|
2325
|
-
}), i = () => Ze(n, "cancel");
|
|
2326
|
-
n.addEventListener("keyup", r, t), n.addEventListener("blur", i, t);
|
|
2327
|
-
});
|
|
2328
|
-
n.addEventListener("keydown", s, t), n.addEventListener("blur", () => n.removeEventListener("keydown", s), t);
|
|
2329
|
-
};
|
|
2330
|
-
function wn(e) {
|
|
2331
|
-
return ks(e) && !Rs();
|
|
2332
|
-
}
|
|
2333
|
-
function mo(e, t, n = {}) {
|
|
2334
|
-
const [s, r, i] = Es(e, n), o = (a) => {
|
|
2335
|
-
const c = a.currentTarget;
|
|
2336
|
-
if (!wn(a))
|
|
2337
|
-
return;
|
|
2338
|
-
Ce.add(c);
|
|
2339
|
-
const u = t(c, a), l = (h, m) => {
|
|
2340
|
-
window.removeEventListener("pointerup", d), window.removeEventListener("pointercancel", f), Ce.has(c) && Ce.delete(c), wn(h) && typeof u == "function" && u(h, { success: m });
|
|
2341
|
-
}, d = (h) => {
|
|
2342
|
-
l(h, c === window || c === document || n.useGlobalTarget || Os(c, h.target));
|
|
2343
|
-
}, f = (h) => {
|
|
2344
|
-
l(h, !1);
|
|
2345
|
-
};
|
|
2346
|
-
window.addEventListener("pointerup", d, r), window.addEventListener("pointercancel", f, r);
|
|
2347
|
-
};
|
|
2348
|
-
return s.forEach((a) => {
|
|
2349
|
-
(n.useGlobalTarget ? window : a).addEventListener("pointerdown", o, r), Bt(a) && (a.addEventListener("focus", (u) => po(u, r)), !ho(a) && !a.hasAttribute("tabindex") && (a.tabIndex = 0));
|
|
2350
|
-
}), i;
|
|
2351
|
-
}
|
|
2352
|
-
const E = (e) => !!(e && e.getVelocity), go = [...Ps, D, ce], yo = (e) => go.find(Cs(e)), jt = ie({
|
|
2353
|
-
transformPagePoint: (e) => e,
|
|
2354
|
-
isStatic: !1,
|
|
2355
|
-
reducedMotion: "never"
|
|
2356
|
-
});
|
|
2357
|
-
class bo extends xt.Component {
|
|
2358
|
-
getSnapshotBeforeUpdate(t) {
|
|
2359
|
-
const n = this.props.childRef.current;
|
|
2360
|
-
if (n && t.isPresent && !this.props.isPresent) {
|
|
2361
|
-
const s = n.offsetParent, r = Bt(s) && s.offsetWidth || 0, i = this.props.sizeRef.current;
|
|
2362
|
-
i.height = n.offsetHeight || 0, i.width = n.offsetWidth || 0, i.top = n.offsetTop, i.left = n.offsetLeft, i.right = r - i.width - i.left;
|
|
2363
|
-
}
|
|
2364
|
-
return null;
|
|
2365
|
-
}
|
|
2366
|
-
/**
|
|
2367
|
-
* Required with getSnapshotBeforeUpdate to stop React complaining.
|
|
2368
|
-
*/
|
|
2369
|
-
componentDidUpdate() {
|
|
2370
|
-
}
|
|
2371
|
-
render() {
|
|
2372
|
-
return this.props.children;
|
|
2373
|
-
}
|
|
2374
|
-
}
|
|
2375
|
-
function vo({ children: e, isPresent: t, anchorX: n }) {
|
|
2376
|
-
const s = ke(), r = j(null), i = j({
|
|
2377
|
-
width: 0,
|
|
2378
|
-
height: 0,
|
|
2379
|
-
top: 0,
|
|
2380
|
-
left: 0,
|
|
2381
|
-
right: 0
|
|
2382
|
-
}), { nonce: o } = O(jt);
|
|
2383
|
-
return $n(() => {
|
|
2384
|
-
const { width: a, height: c, top: u, left: l, right: d } = i.current;
|
|
2385
|
-
if (t || !r.current || !a || !c)
|
|
2386
|
-
return;
|
|
2387
|
-
const f = n === "left" ? `left: ${l}` : `right: ${d}`;
|
|
2388
|
-
r.current.dataset.motionPopId = s;
|
|
2389
|
-
const h = document.createElement("style");
|
|
2390
|
-
return o && (h.nonce = o), document.head.appendChild(h), h.sheet && h.sheet.insertRule(`
|
|
2391
|
-
[data-motion-pop-id="${s}"] {
|
|
2392
|
-
position: absolute !important;
|
|
2393
|
-
width: ${a}px !important;
|
|
2394
|
-
height: ${c}px !important;
|
|
2395
|
-
${f}px !important;
|
|
2396
|
-
top: ${u}px !important;
|
|
2397
|
-
}
|
|
2398
|
-
`), () => {
|
|
2399
|
-
document.head.contains(h) && document.head.removeChild(h);
|
|
2400
|
-
};
|
|
2401
|
-
}, [t]), P.jsx(bo, { isPresent: t, childRef: r, sizeRef: i, children: xt.cloneElement(e, { ref: r }) });
|
|
2402
|
-
}
|
|
2403
|
-
const wo = ({ children: e, initial: t, isPresent: n, onExitComplete: s, custom: r, presenceAffectsLayout: i, mode: o, anchorX: a }) => {
|
|
2404
|
-
const c = Tt(xo), u = ke();
|
|
2405
|
-
let l = !0, d = W(() => (l = !1, {
|
|
2406
|
-
id: u,
|
|
2407
|
-
initial: t,
|
|
2408
|
-
isPresent: n,
|
|
2409
|
-
custom: r,
|
|
2410
|
-
onExitComplete: (f) => {
|
|
2411
|
-
c.set(f, !0);
|
|
2412
|
-
for (const h of c.values())
|
|
2413
|
-
if (!h)
|
|
2414
|
-
return;
|
|
2415
|
-
s && s();
|
|
2416
|
-
},
|
|
2417
|
-
register: (f) => (c.set(f, !1), () => c.delete(f))
|
|
2418
|
-
}), [n, c, s]);
|
|
2419
|
-
return i && l && (d = { ...d }), W(() => {
|
|
2420
|
-
c.forEach((f, h) => c.set(h, !1));
|
|
2421
|
-
}, [n]), xt.useEffect(() => {
|
|
2422
|
-
!n && !c.size && s && s();
|
|
2423
|
-
}, [n]), o === "popLayout" && (e = P.jsx(vo, { isPresent: n, anchorX: a, children: e })), P.jsx(Le.Provider, { value: d, children: e });
|
|
2424
|
-
};
|
|
2425
|
-
function xo() {
|
|
2426
|
-
return /* @__PURE__ */ new Map();
|
|
2427
|
-
}
|
|
2428
|
-
function To(e = !0) {
|
|
2429
|
-
const t = O(Le);
|
|
2430
|
-
if (t === null)
|
|
2431
|
-
return [!0, null];
|
|
2432
|
-
const { isPresent: n, onExitComplete: s, register: r } = t, i = ke();
|
|
2433
|
-
Ne(() => {
|
|
2434
|
-
if (e)
|
|
2435
|
-
return r(i);
|
|
2436
|
-
}, [e]);
|
|
2437
|
-
const o = se(() => e && s && s(i), [i, s, e]);
|
|
2438
|
-
return !n && s ? [!1, o] : [!0];
|
|
2439
|
-
}
|
|
2440
|
-
const Ae = (e) => e.key || "";
|
|
2441
|
-
function xn(e) {
|
|
2442
|
-
const t = [];
|
|
2443
|
-
return or.forEach(e, (n) => {
|
|
2444
|
-
jn(n) && t.push(n);
|
|
2445
|
-
}), t;
|
|
2446
|
-
}
|
|
2447
|
-
const Vo = ({ children: e, custom: t, initial: n = !0, onExitComplete: s, presenceAffectsLayout: r = !0, mode: i = "sync", propagate: o = !1, anchorX: a = "left" }) => {
|
|
2448
|
-
const [c, u] = To(o), l = W(() => xn(e), [e]), d = o && !c ? [] : l.map(Ae), f = j(!0), h = j(l), m = Tt(() => /* @__PURE__ */ new Map()), [v, T] = Pe(l), [p, S] = Pe(l);
|
|
2449
|
-
_n(() => {
|
|
2450
|
-
f.current = !1, h.current = l;
|
|
2451
|
-
for (let g = 0; g < p.length; g++) {
|
|
2452
|
-
const w = Ae(p[g]);
|
|
2453
|
-
d.includes(w) ? m.delete(w) : m.get(w) !== !0 && m.set(w, !1);
|
|
2454
|
-
}
|
|
2455
|
-
}, [p, d.length, d.join("-")]);
|
|
2456
|
-
const y = [];
|
|
2457
|
-
if (l !== v) {
|
|
2458
|
-
let g = [...l];
|
|
2459
|
-
for (let w = 0; w < p.length; w++) {
|
|
2460
|
-
const M = p[w], x = Ae(M);
|
|
2461
|
-
d.includes(x) || (g.splice(w, 0, M), y.push(M));
|
|
2462
|
-
}
|
|
2463
|
-
return i === "wait" && y.length && (g = y), S(xn(g)), T(l), null;
|
|
2464
|
-
}
|
|
2465
|
-
process.env.NODE_ENV !== "production" && i === "wait" && p.length > 1;
|
|
2466
|
-
const { forceRender: A } = O(zn);
|
|
2467
|
-
return P.jsx(P.Fragment, { children: p.map((g) => {
|
|
2468
|
-
const w = Ae(g), M = o && !c ? !1 : l === p || d.includes(w), x = () => {
|
|
2469
|
-
if (m.has(w))
|
|
2470
|
-
m.set(w, !0);
|
|
2471
|
-
else
|
|
2472
|
-
return;
|
|
2473
|
-
let I = !0;
|
|
2474
|
-
m.forEach((R) => {
|
|
2475
|
-
R || (I = !1);
|
|
2476
|
-
}), I && (A == null || A(), S(h.current), o && (u == null || u()), s && s());
|
|
2477
|
-
};
|
|
2478
|
-
return P.jsx(wo, { isPresent: M, initial: !f.current || n ? void 0 : !1, custom: t, presenceAffectsLayout: r, mode: i, onExitComplete: M ? void 0 : x, anchorX: a, children: g }, w);
|
|
2479
|
-
}) });
|
|
2480
|
-
}, $t = ie({ strict: !1 }), Tn = {
|
|
2481
|
-
animation: [
|
|
2482
|
-
"animate",
|
|
2483
|
-
"variants",
|
|
2484
|
-
"whileHover",
|
|
2485
|
-
"whileTap",
|
|
2486
|
-
"exit",
|
|
2487
|
-
"whileInView",
|
|
2488
|
-
"whileFocus",
|
|
2489
|
-
"whileDrag"
|
|
2490
|
-
],
|
|
2491
|
-
exit: ["exit"],
|
|
2492
|
-
drag: ["drag", "dragControls"],
|
|
2493
|
-
focus: ["whileFocus"],
|
|
2494
|
-
hover: ["whileHover", "onHoverStart", "onHoverEnd"],
|
|
2495
|
-
tap: ["whileTap", "onTap", "onTapStart", "onTapCancel"],
|
|
2496
|
-
pan: ["onPan", "onPanStart", "onPanSessionStart", "onPanEnd"],
|
|
2497
|
-
inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
|
|
2498
|
-
layout: ["layout", "layoutId"]
|
|
2499
|
-
}, re = {};
|
|
2500
|
-
for (const e in Tn)
|
|
2501
|
-
re[e] = {
|
|
2502
|
-
isEnabled: (t) => Tn[e].some((n) => !!t[n])
|
|
2503
|
-
};
|
|
2504
|
-
function pt(e) {
|
|
2505
|
-
for (const t in e)
|
|
2506
|
-
re[t] = {
|
|
2507
|
-
...re[t],
|
|
2508
|
-
...e[t]
|
|
2509
|
-
};
|
|
2510
|
-
}
|
|
2511
|
-
function So({ children: e, features: t, strict: n = !1 }) {
|
|
2512
|
-
const [, s] = Pe(!Je(t)), r = j(void 0);
|
|
2513
|
-
if (!Je(t)) {
|
|
2514
|
-
const { renderer: i, ...o } = t;
|
|
2515
|
-
r.current = i, pt(o);
|
|
2516
|
-
}
|
|
2517
|
-
return Ne(() => {
|
|
2518
|
-
Je(t) && t().then(({ renderer: i, ...o }) => {
|
|
2519
|
-
pt(o), r.current = i, s(!0);
|
|
2520
|
-
});
|
|
2521
|
-
}, []), P.jsx($t.Provider, { value: { renderer: r.current, strict: n }, children: e });
|
|
2522
|
-
}
|
|
2523
|
-
function Je(e) {
|
|
2524
|
-
return typeof e == "function";
|
|
2525
|
-
}
|
|
2526
|
-
const Ao = /* @__PURE__ */ new Set([
|
|
2527
|
-
"animate",
|
|
2528
|
-
"exit",
|
|
2529
|
-
"variants",
|
|
2530
|
-
"initial",
|
|
2531
|
-
"style",
|
|
2532
|
-
"values",
|
|
2533
|
-
"variants",
|
|
2534
|
-
"transition",
|
|
2535
|
-
"transformTemplate",
|
|
2536
|
-
"custom",
|
|
2537
|
-
"inherit",
|
|
2538
|
-
"onBeforeLayoutMeasure",
|
|
2539
|
-
"onAnimationStart",
|
|
2540
|
-
"onAnimationComplete",
|
|
2541
|
-
"onUpdate",
|
|
2542
|
-
"onDragStart",
|
|
2543
|
-
"onDrag",
|
|
2544
|
-
"onDragEnd",
|
|
2545
|
-
"onMeasureDragConstraints",
|
|
2546
|
-
"onDirectionLock",
|
|
2547
|
-
"onDragTransitionEnd",
|
|
2548
|
-
"_dragX",
|
|
2549
|
-
"_dragY",
|
|
2550
|
-
"onHoverStart",
|
|
2551
|
-
"onHoverEnd",
|
|
2552
|
-
"onViewportEnter",
|
|
2553
|
-
"onViewportLeave",
|
|
2554
|
-
"globalTapTarget",
|
|
2555
|
-
"ignoreStrict",
|
|
2556
|
-
"viewport"
|
|
2557
|
-
]);
|
|
2558
|
-
function Oe(e) {
|
|
2559
|
-
return e.startsWith("while") || e.startsWith("drag") && e !== "draggable" || e.startsWith("layout") || e.startsWith("onTap") || e.startsWith("onPan") || e.startsWith("onLayout") || Ao.has(e);
|
|
2560
|
-
}
|
|
2561
|
-
let Ns = (e) => !Oe(e);
|
|
2562
|
-
function Mo(e) {
|
|
2563
|
-
typeof e == "function" && (Ns = (t) => t.startsWith("on") ? !Oe(t) : e(t));
|
|
2564
|
-
}
|
|
2565
|
-
try {
|
|
2566
|
-
Mo(require("@emotion/is-prop-valid").default);
|
|
2567
|
-
} catch {
|
|
2568
|
-
}
|
|
2569
|
-
function Co(e, t, n) {
|
|
2570
|
-
const s = {};
|
|
2571
|
-
for (const r in e)
|
|
2572
|
-
r === "values" && typeof e.values == "object" || (Ns(r) || n === !0 && Oe(r) || !t && !Oe(r) || // If trying to use native HTML drag events, forward drag listeners
|
|
2573
|
-
e.draggable && r.startsWith("onDrag")) && (s[r] = e[r]);
|
|
2574
|
-
return s;
|
|
2575
|
-
}
|
|
2576
|
-
function Po(e) {
|
|
2577
|
-
if (typeof Proxy > "u")
|
|
2578
|
-
return e;
|
|
2579
|
-
const t = /* @__PURE__ */ new Map(), n = (...s) => (process.env.NODE_ENV !== "production" && At(!1, "motion() is deprecated. Use motion.create() instead."), e(...s));
|
|
2580
|
-
return new Proxy(n, {
|
|
2581
|
-
/**
|
|
2582
|
-
* Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc.
|
|
2583
|
-
* The prop name is passed through as `key` and we can use that to generate a `motion`
|
|
2584
|
-
* DOM component with that name.
|
|
2585
|
-
*/
|
|
2586
|
-
get: (s, r) => r === "create" ? e : (t.has(r) || t.set(r, e(r)), t.get(r))
|
|
2587
|
-
});
|
|
2588
|
-
}
|
|
2589
|
-
const Ke = /* @__PURE__ */ ie({});
|
|
2590
|
-
function je(e) {
|
|
2591
|
-
return e !== null && typeof e == "object" && typeof e.start == "function";
|
|
2592
|
-
}
|
|
2593
|
-
function ye(e) {
|
|
2594
|
-
return typeof e == "string" || Array.isArray(e);
|
|
2595
|
-
}
|
|
2596
|
-
const Wt = [
|
|
2597
|
-
"animate",
|
|
2598
|
-
"whileInView",
|
|
2599
|
-
"whileFocus",
|
|
2600
|
-
"whileHover",
|
|
2601
|
-
"whileTap",
|
|
2602
|
-
"whileDrag",
|
|
2603
|
-
"exit"
|
|
2604
|
-
], Gt = ["initial", ...Wt];
|
|
2605
|
-
function $e(e) {
|
|
2606
|
-
return je(e.animate) || Gt.some((t) => ye(e[t]));
|
|
2607
|
-
}
|
|
2608
|
-
function Ls(e) {
|
|
2609
|
-
return !!($e(e) || e.variants);
|
|
2610
|
-
}
|
|
2611
|
-
function Do(e, t) {
|
|
2612
|
-
if ($e(e)) {
|
|
2613
|
-
const { initial: n, animate: s } = e;
|
|
2614
|
-
return {
|
|
2615
|
-
initial: n === !1 || ye(n) ? n : void 0,
|
|
2616
|
-
animate: ye(s) ? s : void 0
|
|
2617
|
-
};
|
|
2618
|
-
}
|
|
2619
|
-
return e.inherit !== !1 ? t : {};
|
|
2620
|
-
}
|
|
2621
|
-
function Io(e) {
|
|
2622
|
-
const { initial: t, animate: n } = Do(e, O(Ke));
|
|
2623
|
-
return W(() => ({ initial: t, animate: n }), [Vn(t), Vn(n)]);
|
|
2624
|
-
}
|
|
2625
|
-
function Vn(e) {
|
|
2626
|
-
return Array.isArray(e) ? e.join(" ") : e;
|
|
2627
|
-
}
|
|
2628
|
-
const Fo = Symbol.for("motionComponentSymbol");
|
|
2629
|
-
function Bs(e) {
|
|
2630
|
-
return e && typeof e == "object" && Object.prototype.hasOwnProperty.call(e, "current");
|
|
2631
|
-
}
|
|
2632
|
-
function Ro(e, t, n) {
|
|
2633
|
-
return se(
|
|
2634
|
-
(s) => {
|
|
2635
|
-
s && e.onMount && e.onMount(s), t && (s ? t.mount(s) : t.unmount()), n && (typeof n == "function" ? n(s) : Bs(n) && (n.current = s));
|
|
2636
|
-
},
|
|
2637
|
-
/**
|
|
2638
|
-
* Only pass a new ref callback to React if we've received a visual element
|
|
2639
|
-
* factory. Otherwise we'll be mounting/remounting every time externalRef
|
|
2640
|
-
* or other dependencies change.
|
|
2641
|
-
*/
|
|
2642
|
-
[t]
|
|
2643
|
-
);
|
|
2644
|
-
}
|
|
2645
|
-
const zt = (e) => e.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), Eo = "framerAppearId", Ks = "data-" + zt(Eo), Oo = ie({});
|
|
2646
|
-
function ko(e, t, n, s, r) {
|
|
2647
|
-
var v, T;
|
|
2648
|
-
const { visualElement: i } = O(Ke), o = O($t), a = O(Le), c = O(jt).reducedMotion, u = j(null);
|
|
2649
|
-
s = s || o.renderer, !u.current && s && (u.current = s(e, {
|
|
2650
|
-
visualState: t,
|
|
2651
|
-
parent: i,
|
|
2652
|
-
props: n,
|
|
2653
|
-
presenceContext: a,
|
|
2654
|
-
blockInitialAnimation: a ? a.initial === !1 : !1,
|
|
2655
|
-
reducedMotionConfig: c
|
|
2656
|
-
}));
|
|
2657
|
-
const l = u.current, d = O(Oo);
|
|
2658
|
-
l && !l.projection && r && (l.type === "html" || l.type === "svg") && No(u.current, n, r, d);
|
|
2659
|
-
const f = j(!1);
|
|
2660
|
-
$n(() => {
|
|
2661
|
-
l && f.current && l.update(n, a);
|
|
2662
|
-
});
|
|
2663
|
-
const h = n[Ks], m = j(!!h && !((v = window.MotionHandoffIsComplete) != null && v.call(window, h)) && ((T = window.MotionHasOptimisedAnimation) == null ? void 0 : T.call(window, h)));
|
|
2664
|
-
return _n(() => {
|
|
2665
|
-
l && (f.current = !0, window.MotionIsMounted = !0, l.updateFeatures(), co.render(l.render), m.current && l.animationState && l.animationState.animateChanges());
|
|
2666
|
-
}), Ne(() => {
|
|
2667
|
-
l && (!m.current && l.animationState && l.animationState.animateChanges(), m.current && (queueMicrotask(() => {
|
|
2668
|
-
var p;
|
|
2669
|
-
(p = window.MotionHandoffMarkAsComplete) == null || p.call(window, h);
|
|
2670
|
-
}), m.current = !1));
|
|
2671
|
-
}), l;
|
|
2672
|
-
}
|
|
2673
|
-
function No(e, t, n, s) {
|
|
2674
|
-
const { layoutId: r, layout: i, drag: o, dragConstraints: a, layoutScroll: c, layoutRoot: u, layoutCrossfade: l } = t;
|
|
2675
|
-
e.projection = new n(e.latestValues, t["data-framer-portal-id"] ? void 0 : js(e.parent)), e.projection.setOptions({
|
|
2676
|
-
layoutId: r,
|
|
2677
|
-
layout: i,
|
|
2678
|
-
alwaysMeasureLayout: !!o || a && Bs(a),
|
|
2679
|
-
visualElement: e,
|
|
2680
|
-
/**
|
|
2681
|
-
* TODO: Update options in an effect. This could be tricky as it'll be too late
|
|
2682
|
-
* to update by the time layout animations run.
|
|
2683
|
-
* We also need to fix this safeToRemove by linking it up to the one returned by usePresence,
|
|
2684
|
-
* ensuring it gets called if there's no potential layout animations.
|
|
2685
|
-
*
|
|
2686
|
-
*/
|
|
2687
|
-
animationType: typeof i == "string" ? i : "both",
|
|
2688
|
-
initialPromotionConfig: s,
|
|
2689
|
-
crossfade: l,
|
|
2690
|
-
layoutScroll: c,
|
|
2691
|
-
layoutRoot: u
|
|
2692
|
-
});
|
|
2693
|
-
}
|
|
2694
|
-
function js(e) {
|
|
2695
|
-
if (e)
|
|
2696
|
-
return e.options.allowProjection !== !1 ? e.projection : js(e.parent);
|
|
2697
|
-
}
|
|
2698
|
-
function Lo({ preloadedFeatures: e, createVisualElement: t, useRender: n, useVisualState: s, Component: r }) {
|
|
2699
|
-
e && pt(e);
|
|
2700
|
-
function i(a, c) {
|
|
2701
|
-
let u;
|
|
2702
|
-
const l = {
|
|
2703
|
-
...O(jt),
|
|
2704
|
-
...a,
|
|
2705
|
-
layoutId: Bo(a)
|
|
2706
|
-
}, { isStatic: d } = l, f = Io(a), h = s(a, d);
|
|
2707
|
-
if (!d && Vt) {
|
|
2708
|
-
Ko(l, e);
|
|
2709
|
-
const m = jo(l);
|
|
2710
|
-
u = m.MeasureLayout, f.visualElement = ko(r, h, l, t, m.ProjectionNode);
|
|
2711
|
-
}
|
|
2712
|
-
return P.jsxs(Ke.Provider, { value: f, children: [u && f.visualElement ? P.jsx(u, { visualElement: f.visualElement, ...l }) : null, n(r, a, Ro(h, f.visualElement, c), h, d, f.visualElement)] });
|
|
2713
|
-
}
|
|
2714
|
-
i.displayName = `motion.${typeof r == "string" ? r : `create(${r.displayName ?? r.name ?? ""})`}`;
|
|
2715
|
-
const o = Wn(i);
|
|
2716
|
-
return o[Fo] = r, o;
|
|
2717
|
-
}
|
|
2718
|
-
function Bo({ layoutId: e }) {
|
|
2719
|
-
const t = O(zn).id;
|
|
2720
|
-
return t && e !== void 0 ? t + "-" + e : e;
|
|
2721
|
-
}
|
|
2722
|
-
function Ko(e, t) {
|
|
2723
|
-
const n = O($t).strict;
|
|
2724
|
-
if (process.env.NODE_ENV !== "production" && t && n) {
|
|
2725
|
-
const s = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";
|
|
2726
|
-
e.ignoreStrict ? oe(!1, s) : U(!1, s);
|
|
2727
|
-
}
|
|
2728
|
-
}
|
|
2729
|
-
function jo(e) {
|
|
2730
|
-
const { drag: t, layout: n } = re;
|
|
2731
|
-
if (!t && !n)
|
|
2732
|
-
return {};
|
|
2733
|
-
const s = { ...t, ...n };
|
|
2734
|
-
return {
|
|
2735
|
-
MeasureLayout: t != null && t.isEnabled(e) || n != null && n.isEnabled(e) ? s.MeasureLayout : void 0,
|
|
2736
|
-
ProjectionNode: s.ProjectionNode
|
|
2737
|
-
};
|
|
2738
|
-
}
|
|
2739
|
-
const mt = {};
|
|
2740
|
-
function wl(e) {
|
|
2741
|
-
for (const t in e)
|
|
2742
|
-
mt[t] = e[t], Pt(t) && (mt[t].isCSSVariable = !0);
|
|
2743
|
-
}
|
|
2744
|
-
function $s(e, { layout: t, layoutId: n }) {
|
|
2745
|
-
return de.has(e) || e.startsWith("origin") || (t || n !== void 0) && (!!mt[e] || e === "opacity");
|
|
2746
|
-
}
|
|
2747
|
-
const $o = {
|
|
2748
|
-
x: "translateX",
|
|
2749
|
-
y: "translateY",
|
|
2750
|
-
z: "translateZ",
|
|
2751
|
-
transformPerspective: "perspective"
|
|
2752
|
-
}, Wo = ue.length;
|
|
2753
|
-
function Go(e, t, n) {
|
|
2754
|
-
let s = "", r = !0;
|
|
2755
|
-
for (let i = 0; i < Wo; i++) {
|
|
2756
|
-
const o = ue[i], a = e[o];
|
|
2757
|
-
if (a === void 0)
|
|
2758
|
-
continue;
|
|
2759
|
-
let c = !0;
|
|
2760
|
-
if (typeof a == "number" ? c = a === (o.startsWith("scale") ? 1 : 0) : c = parseFloat(a) === 0, !c || n) {
|
|
2761
|
-
const u = Fs(a, Kt[o]);
|
|
2762
|
-
if (!c) {
|
|
2763
|
-
r = !1;
|
|
2764
|
-
const l = $o[o] || o;
|
|
2765
|
-
s += `${l}(${u}) `;
|
|
2766
|
-
}
|
|
2767
|
-
n && (t[o] = u);
|
|
2768
|
-
}
|
|
2769
|
-
}
|
|
2770
|
-
return s = s.trim(), n ? s = n(t, r ? "" : s) : r && (s = "none"), s;
|
|
2771
|
-
}
|
|
2772
|
-
function _t(e, t, n) {
|
|
2773
|
-
const { style: s, vars: r, transformOrigin: i } = e;
|
|
2774
|
-
let o = !1, a = !1;
|
|
2775
|
-
for (const c in t) {
|
|
2776
|
-
const u = t[c];
|
|
2777
|
-
if (de.has(c)) {
|
|
2778
|
-
o = !0;
|
|
2779
|
-
continue;
|
|
2780
|
-
} else if (Pt(c)) {
|
|
2781
|
-
r[c] = u;
|
|
2782
|
-
continue;
|
|
2783
|
-
} else {
|
|
2784
|
-
const l = Fs(u, Kt[c]);
|
|
2785
|
-
c.startsWith("origin") ? (a = !0, i[c] = l) : s[c] = l;
|
|
2786
|
-
}
|
|
2787
|
-
}
|
|
2788
|
-
if (t.transform || (o || n ? s.transform = Go(t, e.transform, n) : s.transform && (s.transform = "none")), a) {
|
|
2789
|
-
const { originX: c = "50%", originY: u = "50%", originZ: l = 0 } = i;
|
|
2790
|
-
s.transformOrigin = `${c} ${u} ${l}`;
|
|
2791
|
-
}
|
|
2792
|
-
}
|
|
2793
|
-
const Ut = () => ({
|
|
2794
|
-
style: {},
|
|
2795
|
-
transform: {},
|
|
2796
|
-
transformOrigin: {},
|
|
2797
|
-
vars: {}
|
|
2798
|
-
});
|
|
2799
|
-
function Ws(e, t, n) {
|
|
2800
|
-
for (const s in t)
|
|
2801
|
-
!E(t[s]) && !$s(s, n) && (e[s] = t[s]);
|
|
2802
|
-
}
|
|
2803
|
-
function zo({ transformTemplate: e }, t) {
|
|
2804
|
-
return W(() => {
|
|
2805
|
-
const n = Ut();
|
|
2806
|
-
return _t(n, t, e), Object.assign({}, n.vars, n.style);
|
|
2807
|
-
}, [t]);
|
|
2808
|
-
}
|
|
2809
|
-
function _o(e, t) {
|
|
2810
|
-
const n = e.style || {}, s = {};
|
|
2811
|
-
return Ws(s, n, e), Object.assign(s, zo(e, t)), s;
|
|
2812
|
-
}
|
|
2813
|
-
function Uo(e, t) {
|
|
2814
|
-
const n = {}, s = _o(e, t);
|
|
2815
|
-
return e.drag && e.dragListener !== !1 && (n.draggable = !1, s.userSelect = s.WebkitUserSelect = s.WebkitTouchCallout = "none", s.touchAction = e.drag === !0 ? "none" : `pan-${e.drag === "x" ? "y" : "x"}`), e.tabIndex === void 0 && (e.onTap || e.onTapStart || e.whileTap) && (n.tabIndex = 0), n.style = s, n;
|
|
2816
|
-
}
|
|
2817
|
-
const Ho = {
|
|
2818
|
-
offset: "stroke-dashoffset",
|
|
2819
|
-
array: "stroke-dasharray"
|
|
2820
|
-
}, Yo = {
|
|
2821
|
-
offset: "strokeDashoffset",
|
|
2822
|
-
array: "strokeDasharray"
|
|
2823
|
-
};
|
|
2824
|
-
function Xo(e, t, n = 1, s = 0, r = !0) {
|
|
2825
|
-
e.pathLength = 1;
|
|
2826
|
-
const i = r ? Ho : Yo;
|
|
2827
|
-
e[i.offset] = b.transform(-s);
|
|
2828
|
-
const o = b.transform(t), a = b.transform(n);
|
|
2829
|
-
e[i.array] = `${o} ${a}`;
|
|
2830
|
-
}
|
|
2831
|
-
function Gs(e, {
|
|
2832
|
-
attrX: t,
|
|
2833
|
-
attrY: n,
|
|
2834
|
-
attrScale: s,
|
|
2835
|
-
pathLength: r,
|
|
2836
|
-
pathSpacing: i = 1,
|
|
2837
|
-
pathOffset: o = 0,
|
|
2838
|
-
// This is object creation, which we try to avoid per-frame.
|
|
2839
|
-
...a
|
|
2840
|
-
}, c, u, l) {
|
|
2841
|
-
if (_t(e, a, u), c) {
|
|
2842
|
-
e.style.viewBox && (e.attrs.viewBox = e.style.viewBox);
|
|
2843
|
-
return;
|
|
2844
|
-
}
|
|
2845
|
-
e.attrs = e.style, e.style = {};
|
|
2846
|
-
const { attrs: d, style: f } = e;
|
|
2847
|
-
d.transform && (f.transform = d.transform, delete d.transform), (f.transform || d.transformOrigin) && (f.transformOrigin = d.transformOrigin ?? "50% 50%", delete d.transformOrigin), f.transform && (f.transformBox = (l == null ? void 0 : l.transformBox) ?? "fill-box", delete d.transformBox), t !== void 0 && (d.x = t), n !== void 0 && (d.y = n), s !== void 0 && (d.scale = s), r !== void 0 && Xo(d, r, i, o, !1);
|
|
2848
|
-
}
|
|
2849
|
-
const zs = () => ({
|
|
2850
|
-
...Ut(),
|
|
2851
|
-
attrs: {}
|
|
2852
|
-
}), _s = (e) => typeof e == "string" && e.toLowerCase() === "svg";
|
|
2853
|
-
function qo(e, t, n, s) {
|
|
2854
|
-
const r = W(() => {
|
|
2855
|
-
const i = zs();
|
|
2856
|
-
return Gs(i, t, _s(s), e.transformTemplate, e.style), {
|
|
2857
|
-
...i.attrs,
|
|
2858
|
-
style: { ...i.style }
|
|
2859
|
-
};
|
|
2860
|
-
}, [t]);
|
|
2861
|
-
if (e.style) {
|
|
2862
|
-
const i = {};
|
|
2863
|
-
Ws(i, e.style, e), r.style = { ...i, ...r.style };
|
|
2864
|
-
}
|
|
2865
|
-
return r;
|
|
2866
|
-
}
|
|
2867
|
-
const Zo = [
|
|
2868
|
-
"animate",
|
|
2869
|
-
"circle",
|
|
2870
|
-
"defs",
|
|
2871
|
-
"desc",
|
|
2872
|
-
"ellipse",
|
|
2873
|
-
"g",
|
|
2874
|
-
"image",
|
|
2875
|
-
"line",
|
|
2876
|
-
"filter",
|
|
2877
|
-
"marker",
|
|
2878
|
-
"mask",
|
|
2879
|
-
"metadata",
|
|
2880
|
-
"path",
|
|
2881
|
-
"pattern",
|
|
2882
|
-
"polygon",
|
|
2883
|
-
"polyline",
|
|
2884
|
-
"rect",
|
|
2885
|
-
"stop",
|
|
2886
|
-
"switch",
|
|
2887
|
-
"symbol",
|
|
2888
|
-
"svg",
|
|
2889
|
-
"text",
|
|
2890
|
-
"tspan",
|
|
2891
|
-
"use",
|
|
2892
|
-
"view"
|
|
2893
|
-
];
|
|
2894
|
-
function Ht(e) {
|
|
2895
|
-
return (
|
|
2896
|
-
/**
|
|
2897
|
-
* If it's not a string, it's a custom React component. Currently we only support
|
|
2898
|
-
* HTML custom React components.
|
|
2899
|
-
*/
|
|
2900
|
-
typeof e != "string" || /**
|
|
2901
|
-
* If it contains a dash, the element is a custom HTML webcomponent.
|
|
2902
|
-
*/
|
|
2903
|
-
e.includes("-") ? !1 : (
|
|
2904
|
-
/**
|
|
2905
|
-
* If it's in our list of lowercase SVG tags, it's an SVG component
|
|
2906
|
-
*/
|
|
2907
|
-
!!(Zo.indexOf(e) > -1 || /**
|
|
2908
|
-
* If it contains a capital letter, it's an SVG component
|
|
2909
|
-
*/
|
|
2910
|
-
/[A-Z]/u.test(e))
|
|
2911
|
-
)
|
|
2912
|
-
);
|
|
2913
|
-
}
|
|
2914
|
-
function Jo(e = !1) {
|
|
2915
|
-
return (n, s, r, { latestValues: i }, o) => {
|
|
2916
|
-
const c = (Ht(n) ? qo : Uo)(s, i, o, n), u = Co(s, typeof n == "string", e), l = n !== Gn ? { ...u, ...c, ref: r } : {}, { children: d } = s, f = W(() => E(d) ? d.get() : d, [d]);
|
|
2917
|
-
return ar(n, {
|
|
2918
|
-
...l,
|
|
2919
|
-
children: f
|
|
2920
|
-
});
|
|
2921
|
-
};
|
|
2922
|
-
}
|
|
2923
|
-
function Sn(e) {
|
|
2924
|
-
const t = [{}, {}];
|
|
2925
|
-
return e == null || e.values.forEach((n, s) => {
|
|
2926
|
-
t[0][s] = n.get(), t[1][s] = n.getVelocity();
|
|
2927
|
-
}), t;
|
|
2928
|
-
}
|
|
2929
|
-
function Yt(e, t, n, s) {
|
|
2930
|
-
if (typeof t == "function") {
|
|
2931
|
-
const [r, i] = Sn(s);
|
|
2932
|
-
t = t(n !== void 0 ? n : e.custom, r, i);
|
|
2933
|
-
}
|
|
2934
|
-
if (typeof t == "string" && (t = e.variants && e.variants[t]), typeof t == "function") {
|
|
2935
|
-
const [r, i] = Sn(s);
|
|
2936
|
-
t = t(n !== void 0 ? n : e.custom, r, i);
|
|
2937
|
-
}
|
|
2938
|
-
return t;
|
|
2939
|
-
}
|
|
2940
|
-
function Qo(e) {
|
|
2941
|
-
return E(e) ? e.get() : e;
|
|
2942
|
-
}
|
|
2943
|
-
function ea({ scrapeMotionValuesFromProps: e, createRenderState: t }, n, s, r) {
|
|
2944
|
-
return {
|
|
2945
|
-
latestValues: ta(n, s, r, e),
|
|
2946
|
-
renderState: t()
|
|
2947
|
-
};
|
|
2948
|
-
}
|
|
2949
|
-
const Us = (e) => (t, n) => {
|
|
2950
|
-
const s = O(Ke), r = O(Le), i = () => ea(e, t, s, r);
|
|
2951
|
-
return n ? i() : Tt(i);
|
|
2952
|
-
};
|
|
2953
|
-
function ta(e, t, n, s) {
|
|
2954
|
-
const r = {}, i = s(e, {});
|
|
2955
|
-
for (const f in i)
|
|
2956
|
-
r[f] = Qo(i[f]);
|
|
2957
|
-
let { initial: o, animate: a } = e;
|
|
2958
|
-
const c = $e(e), u = Ls(e);
|
|
2959
|
-
t && u && !c && e.inherit !== !1 && (o === void 0 && (o = t.initial), a === void 0 && (a = t.animate));
|
|
2960
|
-
let l = n ? n.initial === !1 : !1;
|
|
2961
|
-
l = l || o === !1;
|
|
2962
|
-
const d = l ? a : o;
|
|
2963
|
-
if (d && typeof d != "boolean" && !je(d)) {
|
|
2964
|
-
const f = Array.isArray(d) ? d : [d];
|
|
2965
|
-
for (let h = 0; h < f.length; h++) {
|
|
2966
|
-
const m = Yt(e, f[h]);
|
|
2967
|
-
if (m) {
|
|
2968
|
-
const { transitionEnd: v, transition: T, ...p } = m;
|
|
2969
|
-
for (const S in p) {
|
|
2970
|
-
let y = p[S];
|
|
2971
|
-
if (Array.isArray(y)) {
|
|
2972
|
-
const A = l ? y.length - 1 : 0;
|
|
2973
|
-
y = y[A];
|
|
2974
|
-
}
|
|
2975
|
-
y !== null && (r[S] = y);
|
|
2976
|
-
}
|
|
2977
|
-
for (const S in v)
|
|
2978
|
-
r[S] = v[S];
|
|
2979
|
-
}
|
|
2980
|
-
}
|
|
2981
|
-
}
|
|
2982
|
-
return r;
|
|
2983
|
-
}
|
|
2984
|
-
function Xt(e, t, n) {
|
|
2985
|
-
var i;
|
|
2986
|
-
const { style: s } = e, r = {};
|
|
2987
|
-
for (const o in s)
|
|
2988
|
-
(E(s[o]) || t.style && E(t.style[o]) || $s(o, e) || ((i = n == null ? void 0 : n.getValue(o)) == null ? void 0 : i.liveStyle) !== void 0) && (r[o] = s[o]);
|
|
2989
|
-
return r;
|
|
2990
|
-
}
|
|
2991
|
-
const na = {
|
|
2992
|
-
useVisualState: Us({
|
|
2993
|
-
scrapeMotionValuesFromProps: Xt,
|
|
2994
|
-
createRenderState: Ut
|
|
2995
|
-
})
|
|
2996
|
-
};
|
|
2997
|
-
function Hs(e, t, n) {
|
|
2998
|
-
const s = Xt(e, t, n);
|
|
2999
|
-
for (const r in e)
|
|
3000
|
-
if (E(e[r]) || E(t[r])) {
|
|
3001
|
-
const i = ue.indexOf(r) !== -1 ? "attr" + r.charAt(0).toUpperCase() + r.substring(1) : r;
|
|
3002
|
-
s[i] = e[r];
|
|
3003
|
-
}
|
|
3004
|
-
return s;
|
|
3005
|
-
}
|
|
3006
|
-
const sa = {
|
|
3007
|
-
useVisualState: Us({
|
|
3008
|
-
scrapeMotionValuesFromProps: Hs,
|
|
3009
|
-
createRenderState: zs
|
|
3010
|
-
})
|
|
3011
|
-
};
|
|
3012
|
-
function ra(e, t) {
|
|
3013
|
-
return function(s, { forwardMotionProps: r } = { forwardMotionProps: !1 }) {
|
|
3014
|
-
const o = {
|
|
3015
|
-
...Ht(s) ? sa : na,
|
|
3016
|
-
preloadedFeatures: e,
|
|
3017
|
-
useRender: Jo(r),
|
|
3018
|
-
createVisualElement: t,
|
|
3019
|
-
Component: s
|
|
3020
|
-
};
|
|
3021
|
-
return Lo(o);
|
|
3022
|
-
};
|
|
3023
|
-
}
|
|
3024
|
-
const ia = /* @__PURE__ */ ra(), oa = /* @__PURE__ */ Po(ia);
|
|
3025
|
-
function be(e, t, n) {
|
|
3026
|
-
const s = e.getProps();
|
|
3027
|
-
return Yt(s, t, n !== void 0 ? n : s.custom, e);
|
|
3028
|
-
}
|
|
3029
|
-
const gt = (e) => Array.isArray(e);
|
|
3030
|
-
function aa(e, t, n) {
|
|
3031
|
-
e.hasValue(t) ? e.getValue(t).set(n) : e.addValue(t, Ee(n));
|
|
3032
|
-
}
|
|
3033
|
-
function la(e) {
|
|
3034
|
-
return gt(e) ? e[e.length - 1] || 0 : e;
|
|
3035
|
-
}
|
|
3036
|
-
function ca(e, t) {
|
|
3037
|
-
const n = be(e, t);
|
|
3038
|
-
let { transitionEnd: s = {}, transition: r = {}, ...i } = n || {};
|
|
3039
|
-
i = { ...i, ...s };
|
|
3040
|
-
for (const o in i) {
|
|
3041
|
-
const a = la(i[o]);
|
|
3042
|
-
aa(e, o, a);
|
|
3043
|
-
}
|
|
3044
|
-
}
|
|
3045
|
-
function ua(e) {
|
|
3046
|
-
return !!(E(e) && e.add);
|
|
3047
|
-
}
|
|
3048
|
-
function da(e, t) {
|
|
3049
|
-
const n = e.getValue("willChange");
|
|
3050
|
-
if (ua(n))
|
|
3051
|
-
return n.add(t);
|
|
3052
|
-
if (!n && G.WillChange) {
|
|
3053
|
-
const s = new G.WillChange("auto");
|
|
3054
|
-
e.addValue("willChange", s), s.add(t);
|
|
3055
|
-
}
|
|
3056
|
-
}
|
|
3057
|
-
function fa(e) {
|
|
3058
|
-
return e.props[Ks];
|
|
3059
|
-
}
|
|
3060
|
-
const ha = (e) => e !== null;
|
|
3061
|
-
function pa(e, { repeat: t, repeatType: n = "loop" }, s) {
|
|
3062
|
-
const r = e.filter(ha), i = t && n !== "loop" && t % 2 === 1 ? 0 : r.length - 1;
|
|
3063
|
-
return r[i];
|
|
3064
|
-
}
|
|
3065
|
-
const ma = {
|
|
3066
|
-
type: "spring",
|
|
3067
|
-
stiffness: 500,
|
|
3068
|
-
damping: 25,
|
|
3069
|
-
restSpeed: 10
|
|
3070
|
-
}, ga = (e) => ({
|
|
3071
|
-
type: "spring",
|
|
3072
|
-
stiffness: 550,
|
|
3073
|
-
damping: e === 0 ? 2 * Math.sqrt(550) : 30,
|
|
3074
|
-
restSpeed: 10
|
|
3075
|
-
}), ya = {
|
|
3076
|
-
type: "keyframes",
|
|
3077
|
-
duration: 0.8
|
|
3078
|
-
}, ba = {
|
|
3079
|
-
type: "keyframes",
|
|
3080
|
-
ease: [0.25, 0.1, 0.35, 1],
|
|
3081
|
-
duration: 0.3
|
|
3082
|
-
}, va = (e, { keyframes: t }) => t.length > 2 ? ya : de.has(e) ? e.startsWith("scale") ? ga(t[1]) : ma : ba;
|
|
3083
|
-
function wa({ when: e, delay: t, delayChildren: n, staggerChildren: s, staggerDirection: r, repeat: i, repeatType: o, repeatDelay: a, from: c, elapsed: u, ...l }) {
|
|
3084
|
-
return !!Object.keys(l).length;
|
|
3085
|
-
}
|
|
3086
|
-
const xa = (e, t, n, s = {}, r, i) => (o) => {
|
|
3087
|
-
const a = As(s, e) || {}, c = a.delay || s.delay || 0;
|
|
3088
|
-
let { elapsed: u = 0 } = s;
|
|
3089
|
-
u = u - /* @__PURE__ */ B(c);
|
|
3090
|
-
const l = {
|
|
3091
|
-
keyframes: Array.isArray(n) ? n : [null, n],
|
|
3092
|
-
ease: "easeOut",
|
|
3093
|
-
velocity: t.getVelocity(),
|
|
3094
|
-
...a,
|
|
3095
|
-
delay: -u,
|
|
3096
|
-
onUpdate: (f) => {
|
|
3097
|
-
t.set(f), a.onUpdate && a.onUpdate(f);
|
|
3098
|
-
},
|
|
3099
|
-
onComplete: () => {
|
|
3100
|
-
o(), a.onComplete && a.onComplete();
|
|
3101
|
-
},
|
|
3102
|
-
name: e,
|
|
3103
|
-
motionValue: t,
|
|
3104
|
-
element: i ? void 0 : r
|
|
3105
|
-
};
|
|
3106
|
-
wa(a) || Object.assign(l, va(e, l)), l.duration && (l.duration = /* @__PURE__ */ B(l.duration)), l.repeatDelay && (l.repeatDelay = /* @__PURE__ */ B(l.repeatDelay)), l.from !== void 0 && (l.keyframes[0] = l.from);
|
|
3107
|
-
let d = !1;
|
|
3108
|
-
if ((l.type === !1 || l.duration === 0 && !l.repeatDelay) && (l.duration = 0, l.delay === 0 && (d = !0)), (G.instantAnimations || G.skipAnimations) && (d = !0, l.duration = 0, l.delay = 0), l.allowFlatten = !a.type && !a.ease, d && !i && t.get() !== void 0) {
|
|
3109
|
-
const f = pa(l.keyframes, a);
|
|
3110
|
-
if (f !== void 0) {
|
|
3111
|
-
L.update(() => {
|
|
3112
|
-
l.onUpdate(f), l.onComplete();
|
|
3113
|
-
});
|
|
3114
|
-
return;
|
|
3115
|
-
}
|
|
3116
|
-
}
|
|
3117
|
-
return a.isSync ? new Nt(l) : new Ui(l);
|
|
3118
|
-
};
|
|
3119
|
-
function Ta({ protectedKeys: e, needsAnimating: t }, n) {
|
|
3120
|
-
const s = e.hasOwnProperty(n) && t[n] !== !0;
|
|
3121
|
-
return t[n] = !1, s;
|
|
3122
|
-
}
|
|
3123
|
-
function Ys(e, t, { delay: n = 0, transitionOverride: s, type: r } = {}) {
|
|
3124
|
-
let { transition: i = e.getDefaultTransition(), transitionEnd: o, ...a } = t;
|
|
3125
|
-
s && (i = s);
|
|
3126
|
-
const c = [], u = r && e.animationState && e.animationState.getState()[r];
|
|
3127
|
-
for (const l in a) {
|
|
3128
|
-
const d = e.getValue(l, e.latestValues[l] ?? null), f = a[l];
|
|
3129
|
-
if (f === void 0 || u && Ta(u, l))
|
|
3130
|
-
continue;
|
|
3131
|
-
const h = {
|
|
3132
|
-
delay: n,
|
|
3133
|
-
...As(i || {}, l)
|
|
3134
|
-
}, m = d.get();
|
|
3135
|
-
if (m !== void 0 && !d.isAnimating && !Array.isArray(f) && f === m && !h.velocity)
|
|
3136
|
-
continue;
|
|
3137
|
-
let v = !1;
|
|
3138
|
-
if (window.MotionHandoffAnimation) {
|
|
3139
|
-
const p = fa(e);
|
|
3140
|
-
if (p) {
|
|
3141
|
-
const S = window.MotionHandoffAnimation(p, l, L);
|
|
3142
|
-
S !== null && (h.startTime = S, v = !0);
|
|
3143
|
-
}
|
|
3144
|
-
}
|
|
3145
|
-
da(e, l), d.start(xa(l, d, f, e.shouldReduceMotion && Ms.has(l) ? { type: !1 } : h, e, v));
|
|
3146
|
-
const T = d.animation;
|
|
3147
|
-
T && c.push(T);
|
|
3148
|
-
}
|
|
3149
|
-
return o && Promise.all(c).then(() => {
|
|
3150
|
-
L.update(() => {
|
|
3151
|
-
o && ca(e, o);
|
|
3152
|
-
});
|
|
3153
|
-
}), c;
|
|
3154
|
-
}
|
|
3155
|
-
function yt(e, t, n = {}) {
|
|
3156
|
-
var c;
|
|
3157
|
-
const s = be(e, t, n.type === "exit" ? (c = e.presenceContext) == null ? void 0 : c.custom : void 0);
|
|
3158
|
-
let { transition: r = e.getDefaultTransition() || {} } = s || {};
|
|
3159
|
-
n.transitionOverride && (r = n.transitionOverride);
|
|
3160
|
-
const i = s ? () => Promise.all(Ys(e, s, n)) : () => Promise.resolve(), o = e.variantChildren && e.variantChildren.size ? (u = 0) => {
|
|
3161
|
-
const { delayChildren: l = 0, staggerChildren: d, staggerDirection: f } = r;
|
|
3162
|
-
return Va(e, t, l + u, d, f, n);
|
|
3163
|
-
} : () => Promise.resolve(), { when: a } = r;
|
|
3164
|
-
if (a) {
|
|
3165
|
-
const [u, l] = a === "beforeChildren" ? [i, o] : [o, i];
|
|
3166
|
-
return u().then(() => l());
|
|
3167
|
-
} else
|
|
3168
|
-
return Promise.all([i(), o(n.delay)]);
|
|
3169
|
-
}
|
|
3170
|
-
function Va(e, t, n = 0, s = 0, r = 1, i) {
|
|
3171
|
-
const o = [], a = (e.variantChildren.size - 1) * s, c = r === 1 ? (u = 0) => u * s : (u = 0) => a - u * s;
|
|
3172
|
-
return Array.from(e.variantChildren).sort(Sa).forEach((u, l) => {
|
|
3173
|
-
u.notify("AnimationStart", t), o.push(yt(u, t, {
|
|
3174
|
-
...i,
|
|
3175
|
-
delay: n + c(l)
|
|
3176
|
-
}).then(() => u.notify("AnimationComplete", t)));
|
|
3177
|
-
}), Promise.all(o);
|
|
3178
|
-
}
|
|
3179
|
-
function Sa(e, t) {
|
|
3180
|
-
return e.sortNodePosition(t);
|
|
3181
|
-
}
|
|
3182
|
-
function Aa(e, t, n = {}) {
|
|
3183
|
-
e.notify("AnimationStart", t);
|
|
3184
|
-
let s;
|
|
3185
|
-
if (Array.isArray(t)) {
|
|
3186
|
-
const r = t.map((i) => yt(e, i, n));
|
|
3187
|
-
s = Promise.all(r);
|
|
3188
|
-
} else if (typeof t == "string")
|
|
3189
|
-
s = yt(e, t, n);
|
|
3190
|
-
else {
|
|
3191
|
-
const r = typeof t == "function" ? be(e, t, n.custom) : t;
|
|
3192
|
-
s = Promise.all(Ys(e, r, n));
|
|
3193
|
-
}
|
|
3194
|
-
return s.then(() => {
|
|
3195
|
-
e.notify("AnimationComplete", t);
|
|
3196
|
-
});
|
|
3197
|
-
}
|
|
3198
|
-
function Xs(e, t) {
|
|
3199
|
-
if (!Array.isArray(t))
|
|
3200
|
-
return !1;
|
|
3201
|
-
const n = t.length;
|
|
3202
|
-
if (n !== e.length)
|
|
3203
|
-
return !1;
|
|
3204
|
-
for (let s = 0; s < n; s++)
|
|
3205
|
-
if (t[s] !== e[s])
|
|
3206
|
-
return !1;
|
|
3207
|
-
return !0;
|
|
3208
|
-
}
|
|
3209
|
-
const Ma = Gt.length;
|
|
3210
|
-
function qs(e) {
|
|
3211
|
-
if (!e)
|
|
3212
|
-
return;
|
|
3213
|
-
if (!e.isControllingVariants) {
|
|
3214
|
-
const n = e.parent ? qs(e.parent) || {} : {};
|
|
3215
|
-
return e.props.initial !== void 0 && (n.initial = e.props.initial), n;
|
|
3216
|
-
}
|
|
3217
|
-
const t = {};
|
|
3218
|
-
for (let n = 0; n < Ma; n++) {
|
|
3219
|
-
const s = Gt[n], r = e.props[s];
|
|
3220
|
-
(ye(r) || r === !1) && (t[s] = r);
|
|
3221
|
-
}
|
|
3222
|
-
return t;
|
|
3223
|
-
}
|
|
3224
|
-
const Ca = [...Wt].reverse(), Pa = Wt.length;
|
|
3225
|
-
function Da(e) {
|
|
3226
|
-
return (t) => Promise.all(t.map(({ animation: n, options: s }) => Aa(e, n, s)));
|
|
3227
|
-
}
|
|
3228
|
-
function Ia(e) {
|
|
3229
|
-
let t = Da(e), n = An(), s = !0;
|
|
3230
|
-
const r = (c) => (u, l) => {
|
|
3231
|
-
var f;
|
|
3232
|
-
const d = be(e, l, c === "exit" ? (f = e.presenceContext) == null ? void 0 : f.custom : void 0);
|
|
3233
|
-
if (d) {
|
|
3234
|
-
const { transition: h, transitionEnd: m, ...v } = d;
|
|
3235
|
-
u = { ...u, ...v, ...m };
|
|
3236
|
-
}
|
|
3237
|
-
return u;
|
|
3238
|
-
};
|
|
3239
|
-
function i(c) {
|
|
3240
|
-
t = c(e);
|
|
3241
|
-
}
|
|
3242
|
-
function o(c) {
|
|
3243
|
-
const { props: u } = e, l = qs(e.parent) || {}, d = [], f = /* @__PURE__ */ new Set();
|
|
3244
|
-
let h = {}, m = 1 / 0;
|
|
3245
|
-
for (let T = 0; T < Pa; T++) {
|
|
3246
|
-
const p = Ca[T], S = n[p], y = u[p] !== void 0 ? u[p] : l[p], A = ye(y), g = p === c ? S.isActive : null;
|
|
3247
|
-
g === !1 && (m = T);
|
|
3248
|
-
let w = y === l[p] && y !== u[p] && A;
|
|
3249
|
-
if (w && s && e.manuallyAnimateOnMount && (w = !1), S.protectedKeys = { ...h }, // If it isn't active and hasn't *just* been set as inactive
|
|
3250
|
-
!S.isActive && g === null || // If we didn't and don't have any defined prop for this animation type
|
|
3251
|
-
!y && !S.prevProp || // Or if the prop doesn't define an animation
|
|
3252
|
-
je(y) || typeof y == "boolean")
|
|
3253
|
-
continue;
|
|
3254
|
-
const M = Fa(S.prevProp, y);
|
|
3255
|
-
let x = M || // If we're making this variant active, we want to always make it active
|
|
3256
|
-
p === c && S.isActive && !w && A || // If we removed a higher-priority variant (i is in reverse order)
|
|
3257
|
-
T > m && A, I = !1;
|
|
3258
|
-
const R = Array.isArray(y) ? y : [y];
|
|
3259
|
-
let z = R.reduce(r(p), {});
|
|
3260
|
-
g === !1 && (z = {});
|
|
3261
|
-
const { prevResolvedValues: Te = {} } = S, We = {
|
|
3262
|
-
...Te,
|
|
3263
|
-
...z
|
|
3264
|
-
}, Ge = (F) => {
|
|
3265
|
-
x = !0, f.has(F) && (I = !0, f.delete(F)), S.needsAnimating[F] = !0;
|
|
3266
|
-
const K = e.getValue(F);
|
|
3267
|
-
K && (K.liveStyle = !1);
|
|
3268
|
-
};
|
|
3269
|
-
for (const F in We) {
|
|
3270
|
-
const K = z[F], _e = Te[F];
|
|
3271
|
-
if (h.hasOwnProperty(F))
|
|
3272
|
-
continue;
|
|
3273
|
-
let Ue = !1;
|
|
3274
|
-
gt(K) && gt(_e) ? Ue = !Xs(K, _e) : Ue = K !== _e, Ue ? K != null ? Ge(F) : f.add(F) : K !== void 0 && f.has(F) ? Ge(F) : S.protectedKeys[F] = !0;
|
|
3275
|
-
}
|
|
3276
|
-
S.prevProp = y, S.prevResolvedValues = z, S.isActive && (h = { ...h, ...z }), s && e.blockInitialAnimation && (x = !1), x && (!(w && M) || I) && d.push(...R.map((F) => ({
|
|
3277
|
-
animation: F,
|
|
3278
|
-
options: { type: p }
|
|
3279
|
-
})));
|
|
3280
|
-
}
|
|
3281
|
-
if (f.size) {
|
|
3282
|
-
const T = {};
|
|
3283
|
-
if (typeof u.initial != "boolean") {
|
|
3284
|
-
const p = be(e, Array.isArray(u.initial) ? u.initial[0] : u.initial);
|
|
3285
|
-
p && p.transition && (T.transition = p.transition);
|
|
3286
|
-
}
|
|
3287
|
-
f.forEach((p) => {
|
|
3288
|
-
const S = e.getBaseTarget(p), y = e.getValue(p);
|
|
3289
|
-
y && (y.liveStyle = !0), T[p] = S ?? null;
|
|
3290
|
-
}), d.push({ animation: T });
|
|
3291
|
-
}
|
|
3292
|
-
let v = !!d.length;
|
|
3293
|
-
return s && (u.initial === !1 || u.initial === u.animate) && !e.manuallyAnimateOnMount && (v = !1), s = !1, v ? t(d) : Promise.resolve();
|
|
3294
|
-
}
|
|
3295
|
-
function a(c, u) {
|
|
3296
|
-
var d;
|
|
3297
|
-
if (n[c].isActive === u)
|
|
3298
|
-
return Promise.resolve();
|
|
3299
|
-
(d = e.variantChildren) == null || d.forEach((f) => {
|
|
3300
|
-
var h;
|
|
3301
|
-
return (h = f.animationState) == null ? void 0 : h.setActive(c, u);
|
|
3302
|
-
}), n[c].isActive = u;
|
|
3303
|
-
const l = o(c);
|
|
3304
|
-
for (const f in n)
|
|
3305
|
-
n[f].protectedKeys = {};
|
|
3306
|
-
return l;
|
|
3307
|
-
}
|
|
3308
|
-
return {
|
|
3309
|
-
animateChanges: o,
|
|
3310
|
-
setActive: a,
|
|
3311
|
-
setAnimateFunction: i,
|
|
3312
|
-
getState: () => n,
|
|
3313
|
-
reset: () => {
|
|
3314
|
-
n = An(), s = !0;
|
|
3315
|
-
}
|
|
3316
|
-
};
|
|
3317
|
-
}
|
|
3318
|
-
function Fa(e, t) {
|
|
3319
|
-
return typeof t == "string" ? t !== e : Array.isArray(t) ? !Xs(t, e) : !1;
|
|
3320
|
-
}
|
|
3321
|
-
function H(e = !1) {
|
|
3322
|
-
return {
|
|
3323
|
-
isActive: e,
|
|
3324
|
-
protectedKeys: {},
|
|
3325
|
-
needsAnimating: {},
|
|
3326
|
-
prevResolvedValues: {}
|
|
3327
|
-
};
|
|
3328
|
-
}
|
|
3329
|
-
function An() {
|
|
3330
|
-
return {
|
|
3331
|
-
animate: H(!0),
|
|
3332
|
-
whileInView: H(),
|
|
3333
|
-
whileHover: H(),
|
|
3334
|
-
whileTap: H(),
|
|
3335
|
-
whileDrag: H(),
|
|
3336
|
-
whileFocus: H(),
|
|
3337
|
-
exit: H()
|
|
3338
|
-
};
|
|
3339
|
-
}
|
|
3340
|
-
class fe {
|
|
3341
|
-
constructor(t) {
|
|
3342
|
-
this.isMounted = !1, this.node = t;
|
|
3343
|
-
}
|
|
3344
|
-
update() {
|
|
3345
|
-
}
|
|
3346
|
-
}
|
|
3347
|
-
class Ra extends fe {
|
|
3348
|
-
/**
|
|
3349
|
-
* We dynamically generate the AnimationState manager as it contains a reference
|
|
3350
|
-
* to the underlying animation library. We only want to load that if we load this,
|
|
3351
|
-
* so people can optionally code split it out using the `m` component.
|
|
3352
|
-
*/
|
|
3353
|
-
constructor(t) {
|
|
3354
|
-
super(t), t.animationState || (t.animationState = Ia(t));
|
|
3355
|
-
}
|
|
3356
|
-
updateAnimationControlsSubscription() {
|
|
3357
|
-
const { animate: t } = this.node.getProps();
|
|
3358
|
-
je(t) && (this.unmountControls = t.subscribe(this.node));
|
|
3359
|
-
}
|
|
3360
|
-
/**
|
|
3361
|
-
* Subscribe any provided AnimationControls to the component's VisualElement
|
|
3362
|
-
*/
|
|
3363
|
-
mount() {
|
|
3364
|
-
this.updateAnimationControlsSubscription();
|
|
3365
|
-
}
|
|
3366
|
-
update() {
|
|
3367
|
-
const { animate: t } = this.node.getProps(), { animate: n } = this.node.prevProps || {};
|
|
3368
|
-
t !== n && this.updateAnimationControlsSubscription();
|
|
3369
|
-
}
|
|
3370
|
-
unmount() {
|
|
3371
|
-
var t;
|
|
3372
|
-
this.node.animationState.reset(), (t = this.unmountControls) == null || t.call(this);
|
|
3373
|
-
}
|
|
3374
|
-
}
|
|
3375
|
-
let Ea = 0;
|
|
3376
|
-
class Oa extends fe {
|
|
3377
|
-
constructor() {
|
|
3378
|
-
super(...arguments), this.id = Ea++;
|
|
3379
|
-
}
|
|
3380
|
-
update() {
|
|
3381
|
-
if (!this.node.presenceContext)
|
|
3382
|
-
return;
|
|
3383
|
-
const { isPresent: t, onExitComplete: n } = this.node.presenceContext, { isPresent: s } = this.node.prevPresenceContext || {};
|
|
3384
|
-
if (!this.node.animationState || t === s)
|
|
3385
|
-
return;
|
|
3386
|
-
const r = this.node.animationState.setActive("exit", !t);
|
|
3387
|
-
n && !t && r.then(() => {
|
|
3388
|
-
n(this.id);
|
|
3389
|
-
});
|
|
3390
|
-
}
|
|
3391
|
-
mount() {
|
|
3392
|
-
const { register: t, onExitComplete: n } = this.node.presenceContext || {};
|
|
3393
|
-
n && n(this.id), t && (this.unmount = t(this.id));
|
|
3394
|
-
}
|
|
3395
|
-
unmount() {
|
|
3396
|
-
}
|
|
3397
|
-
}
|
|
3398
|
-
const ka = {
|
|
3399
|
-
animation: {
|
|
3400
|
-
Feature: Ra
|
|
3401
|
-
},
|
|
3402
|
-
exit: {
|
|
3403
|
-
Feature: Oa
|
|
3404
|
-
}
|
|
3405
|
-
};
|
|
3406
|
-
function Mn(e, t, n, s = { passive: !0 }) {
|
|
3407
|
-
return e.addEventListener(t, n, s), () => e.removeEventListener(t, n);
|
|
3408
|
-
}
|
|
3409
|
-
function qt(e) {
|
|
3410
|
-
return {
|
|
3411
|
-
point: {
|
|
3412
|
-
x: e.pageX,
|
|
3413
|
-
y: e.pageY
|
|
3414
|
-
}
|
|
3415
|
-
};
|
|
3416
|
-
}
|
|
3417
|
-
const xl = (e) => (t) => ks(t) && e(t, qt(t));
|
|
3418
|
-
function Na({ top: e, left: t, right: n, bottom: s }) {
|
|
3419
|
-
return {
|
|
3420
|
-
x: { min: t, max: n },
|
|
3421
|
-
y: { min: e, max: s }
|
|
3422
|
-
};
|
|
3423
|
-
}
|
|
3424
|
-
function Tl({ x: e, y: t }) {
|
|
3425
|
-
return { top: t.min, right: e.max, bottom: t.max, left: e.min };
|
|
3426
|
-
}
|
|
3427
|
-
function La(e, t) {
|
|
3428
|
-
if (!t)
|
|
3429
|
-
return e;
|
|
3430
|
-
const n = t({ x: e.left, y: e.top }), s = t({ x: e.right, y: e.bottom });
|
|
3431
|
-
return {
|
|
3432
|
-
top: n.y,
|
|
3433
|
-
left: n.x,
|
|
3434
|
-
bottom: s.y,
|
|
3435
|
-
right: s.x
|
|
3436
|
-
};
|
|
3437
|
-
}
|
|
3438
|
-
const Cn = () => ({
|
|
3439
|
-
translate: 0,
|
|
3440
|
-
scale: 1,
|
|
3441
|
-
origin: 0,
|
|
3442
|
-
originPoint: 0
|
|
3443
|
-
}), Vl = () => ({
|
|
3444
|
-
x: Cn(),
|
|
3445
|
-
y: Cn()
|
|
3446
|
-
}), Pn = () => ({ min: 0, max: 0 }), Zs = () => ({
|
|
3447
|
-
x: Pn(),
|
|
3448
|
-
y: Pn()
|
|
3449
|
-
});
|
|
3450
|
-
function Qe(e) {
|
|
3451
|
-
return e === void 0 || e === 1;
|
|
3452
|
-
}
|
|
3453
|
-
function Ba({ scale: e, scaleX: t, scaleY: n }) {
|
|
3454
|
-
return !Qe(e) || !Qe(t) || !Qe(n);
|
|
3455
|
-
}
|
|
3456
|
-
function Ka(e) {
|
|
3457
|
-
return Ba(e) || ja(e) || e.z || e.rotate || e.rotateX || e.rotateY || e.skewX || e.skewY;
|
|
3458
|
-
}
|
|
3459
|
-
function ja(e) {
|
|
3460
|
-
return Dn(e.x) || Dn(e.y);
|
|
3461
|
-
}
|
|
3462
|
-
function Dn(e) {
|
|
3463
|
-
return e && e !== "0%";
|
|
3464
|
-
}
|
|
3465
|
-
function In(e, t, n) {
|
|
3466
|
-
const s = e - n, r = t * s;
|
|
3467
|
-
return n + r;
|
|
3468
|
-
}
|
|
3469
|
-
function Fn(e, t, n, s, r) {
|
|
3470
|
-
return r !== void 0 && (e = In(e, r, s)), In(e, n, s) + t;
|
|
3471
|
-
}
|
|
3472
|
-
function bt(e, t = 0, n = 1, s, r) {
|
|
3473
|
-
e.min = Fn(e.min, t, n, s, r), e.max = Fn(e.max, t, n, s, r);
|
|
3474
|
-
}
|
|
3475
|
-
function $a(e, { x: t, y: n }) {
|
|
3476
|
-
bt(e.x, t.translate, t.scale, t.originPoint), bt(e.y, n.translate, n.scale, n.originPoint);
|
|
3477
|
-
}
|
|
3478
|
-
const Rn = 0.999999999999, En = 1.0000000000001;
|
|
3479
|
-
function Sl(e, t, n, s = !1) {
|
|
3480
|
-
const r = n.length;
|
|
3481
|
-
if (!r)
|
|
3482
|
-
return;
|
|
3483
|
-
t.x = t.y = 1;
|
|
3484
|
-
let i, o;
|
|
3485
|
-
for (let a = 0; a < r; a++) {
|
|
3486
|
-
i = n[a], o = i.projectionDelta;
|
|
3487
|
-
const { visualElement: c } = i.options;
|
|
3488
|
-
c && c.props.style && c.props.style.display === "contents" || (s && i.options.layoutScroll && i.scroll && i !== i.root && Nn(e, {
|
|
3489
|
-
x: -i.scroll.offset.x,
|
|
3490
|
-
y: -i.scroll.offset.y
|
|
3491
|
-
}), o && (t.x *= o.x.scale, t.y *= o.y.scale, $a(e, o)), s && Ka(i.latestValues) && Nn(e, i.latestValues));
|
|
3492
|
-
}
|
|
3493
|
-
t.x < En && t.x > Rn && (t.x = 1), t.y < En && t.y > Rn && (t.y = 1);
|
|
3494
|
-
}
|
|
3495
|
-
function On(e, t) {
|
|
3496
|
-
e.min = e.min + t, e.max = e.max + t;
|
|
3497
|
-
}
|
|
3498
|
-
function kn(e, t, n, s, r = 0.5) {
|
|
3499
|
-
const i = xe(e.min, e.max, r);
|
|
3500
|
-
bt(e, t, n, i, s);
|
|
3501
|
-
}
|
|
3502
|
-
function Nn(e, t) {
|
|
3503
|
-
kn(e.x, t.x, t.scaleX, t.scale, t.originX), kn(e.y, t.y, t.scaleY, t.scale, t.originY);
|
|
3504
|
-
}
|
|
3505
|
-
function Js(e, t) {
|
|
3506
|
-
return Na(La(e.getBoundingClientRect(), t));
|
|
3507
|
-
}
|
|
3508
|
-
function Al(e, t, n) {
|
|
3509
|
-
const s = Js(e, n), { scroll: r } = t;
|
|
3510
|
-
return r && (On(s.x, r.offset.x), On(s.y, r.offset.y)), s;
|
|
3511
|
-
}
|
|
3512
|
-
function Ln(e, t, n) {
|
|
3513
|
-
const { props: s } = e;
|
|
3514
|
-
e.animationState && s.whileHover && e.animationState.setActive("whileHover", n === "Start");
|
|
3515
|
-
const r = "onHover" + n, i = s[r];
|
|
3516
|
-
i && L.postRender(() => i(t, qt(t)));
|
|
3517
|
-
}
|
|
3518
|
-
class Wa extends fe {
|
|
3519
|
-
mount() {
|
|
3520
|
-
const { current: t } = this.node;
|
|
3521
|
-
t && (this.unmount = uo(t, (n, s) => (Ln(this.node, s, "Start"), (r) => Ln(this.node, r, "End"))));
|
|
3522
|
-
}
|
|
3523
|
-
unmount() {
|
|
3524
|
-
}
|
|
3525
|
-
}
|
|
3526
|
-
class Ga extends fe {
|
|
3527
|
-
constructor() {
|
|
3528
|
-
super(...arguments), this.isActive = !1;
|
|
3529
|
-
}
|
|
3530
|
-
onFocus() {
|
|
3531
|
-
let t = !1;
|
|
3532
|
-
try {
|
|
3533
|
-
t = this.node.current.matches(":focus-visible");
|
|
3534
|
-
} catch {
|
|
3535
|
-
t = !0;
|
|
3536
|
-
}
|
|
3537
|
-
!t || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !0), this.isActive = !0);
|
|
3538
|
-
}
|
|
3539
|
-
onBlur() {
|
|
3540
|
-
!this.isActive || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !1), this.isActive = !1);
|
|
3541
|
-
}
|
|
3542
|
-
mount() {
|
|
3543
|
-
this.unmount = Be(Mn(this.node.current, "focus", () => this.onFocus()), Mn(this.node.current, "blur", () => this.onBlur()));
|
|
3544
|
-
}
|
|
3545
|
-
unmount() {
|
|
3546
|
-
}
|
|
3547
|
-
}
|
|
3548
|
-
function Bn(e, t, n) {
|
|
3549
|
-
const { props: s } = e;
|
|
3550
|
-
if (e.current instanceof HTMLButtonElement && e.current.disabled)
|
|
3551
|
-
return;
|
|
3552
|
-
e.animationState && s.whileTap && e.animationState.setActive("whileTap", n === "Start");
|
|
3553
|
-
const r = "onTap" + (n === "End" ? "" : n), i = s[r];
|
|
3554
|
-
i && L.postRender(() => i(t, qt(t)));
|
|
3555
|
-
}
|
|
3556
|
-
class za extends fe {
|
|
3557
|
-
mount() {
|
|
3558
|
-
const { current: t } = this.node;
|
|
3559
|
-
t && (this.unmount = mo(t, (n, s) => (Bn(this.node, s, "Start"), (r, { success: i }) => Bn(this.node, r, i ? "End" : "Cancel")), { useGlobalTarget: this.node.props.globalTapTarget }));
|
|
3560
|
-
}
|
|
3561
|
-
unmount() {
|
|
3562
|
-
}
|
|
3563
|
-
}
|
|
3564
|
-
const vt = /* @__PURE__ */ new WeakMap(), et = /* @__PURE__ */ new WeakMap(), _a = (e) => {
|
|
3565
|
-
const t = vt.get(e.target);
|
|
3566
|
-
t && t(e);
|
|
3567
|
-
}, Ua = (e) => {
|
|
3568
|
-
e.forEach(_a);
|
|
3569
|
-
};
|
|
3570
|
-
function Ha({ root: e, ...t }) {
|
|
3571
|
-
const n = e || document;
|
|
3572
|
-
et.has(n) || et.set(n, {});
|
|
3573
|
-
const s = et.get(n), r = JSON.stringify(t);
|
|
3574
|
-
return s[r] || (s[r] = new IntersectionObserver(Ua, { root: e, ...t })), s[r];
|
|
3575
|
-
}
|
|
3576
|
-
function Ya(e, t, n) {
|
|
3577
|
-
const s = Ha(t);
|
|
3578
|
-
return vt.set(e, n), s.observe(e), () => {
|
|
3579
|
-
vt.delete(e), s.unobserve(e);
|
|
3580
|
-
};
|
|
3581
|
-
}
|
|
3582
|
-
const Xa = {
|
|
3583
|
-
some: 0,
|
|
3584
|
-
all: 1
|
|
3585
|
-
};
|
|
3586
|
-
class qa extends fe {
|
|
3587
|
-
constructor() {
|
|
3588
|
-
super(...arguments), this.hasEnteredView = !1, this.isInView = !1;
|
|
3589
|
-
}
|
|
3590
|
-
startObserver() {
|
|
3591
|
-
this.unmount();
|
|
3592
|
-
const { viewport: t = {} } = this.node.getProps(), { root: n, margin: s, amount: r = "some", once: i } = t, o = {
|
|
3593
|
-
root: n ? n.current : void 0,
|
|
3594
|
-
rootMargin: s,
|
|
3595
|
-
threshold: typeof r == "number" ? r : Xa[r]
|
|
3596
|
-
}, a = (c) => {
|
|
3597
|
-
const { isIntersecting: u } = c;
|
|
3598
|
-
if (this.isInView === u || (this.isInView = u, i && !u && this.hasEnteredView))
|
|
3599
|
-
return;
|
|
3600
|
-
u && (this.hasEnteredView = !0), this.node.animationState && this.node.animationState.setActive("whileInView", u);
|
|
3601
|
-
const { onViewportEnter: l, onViewportLeave: d } = this.node.getProps(), f = u ? l : d;
|
|
3602
|
-
f && f(c);
|
|
3603
|
-
};
|
|
3604
|
-
return Ya(this.node.current, o, a);
|
|
3605
|
-
}
|
|
3606
|
-
mount() {
|
|
3607
|
-
this.startObserver();
|
|
3608
|
-
}
|
|
3609
|
-
update() {
|
|
3610
|
-
if (typeof IntersectionObserver > "u")
|
|
3611
|
-
return;
|
|
3612
|
-
const { props: t, prevProps: n } = this.node;
|
|
3613
|
-
["amount", "margin", "root"].some(Za(t, n)) && this.startObserver();
|
|
3614
|
-
}
|
|
3615
|
-
unmount() {
|
|
3616
|
-
}
|
|
3617
|
-
}
|
|
3618
|
-
function Za({ viewport: e = {} }, { viewport: t = {} } = {}) {
|
|
3619
|
-
return (n) => e[n] !== t[n];
|
|
3620
|
-
}
|
|
3621
|
-
const Ja = {
|
|
3622
|
-
inView: {
|
|
3623
|
-
Feature: qa
|
|
3624
|
-
},
|
|
3625
|
-
tap: {
|
|
3626
|
-
Feature: za
|
|
3627
|
-
},
|
|
3628
|
-
focus: {
|
|
3629
|
-
Feature: Ga
|
|
3630
|
-
},
|
|
3631
|
-
hover: {
|
|
3632
|
-
Feature: Wa
|
|
3633
|
-
}
|
|
3634
|
-
}, wt = { current: null }, Qs = { current: !1 };
|
|
3635
|
-
function Qa() {
|
|
3636
|
-
if (Qs.current = !0, !!Vt)
|
|
3637
|
-
if (window.matchMedia) {
|
|
3638
|
-
const e = window.matchMedia("(prefers-reduced-motion)"), t = () => wt.current = e.matches;
|
|
3639
|
-
e.addListener(t), t();
|
|
3640
|
-
} else
|
|
3641
|
-
wt.current = !1;
|
|
3642
|
-
}
|
|
3643
|
-
const el = /* @__PURE__ */ new WeakMap();
|
|
3644
|
-
function tl(e, t, n) {
|
|
3645
|
-
for (const s in t) {
|
|
3646
|
-
const r = t[s], i = n[s];
|
|
3647
|
-
if (E(r))
|
|
3648
|
-
e.addValue(s, r);
|
|
3649
|
-
else if (E(i))
|
|
3650
|
-
e.addValue(s, Ee(r, { owner: e }));
|
|
3651
|
-
else if (i !== r)
|
|
3652
|
-
if (e.hasValue(s)) {
|
|
3653
|
-
const o = e.getValue(s);
|
|
3654
|
-
o.liveStyle === !0 ? o.jump(r) : o.hasAnimated || o.set(r);
|
|
3655
|
-
} else {
|
|
3656
|
-
const o = e.getStaticValue(s);
|
|
3657
|
-
e.addValue(s, Ee(o !== void 0 ? o : r, { owner: e }));
|
|
3658
|
-
}
|
|
3659
|
-
}
|
|
3660
|
-
for (const s in n)
|
|
3661
|
-
t[s] === void 0 && e.removeValue(s);
|
|
3662
|
-
return t;
|
|
3663
|
-
}
|
|
3664
|
-
const Kn = [
|
|
3665
|
-
"AnimationStart",
|
|
3666
|
-
"AnimationComplete",
|
|
3667
|
-
"Update",
|
|
3668
|
-
"BeforeLayoutMeasure",
|
|
3669
|
-
"LayoutMeasure",
|
|
3670
|
-
"LayoutAnimationStart",
|
|
3671
|
-
"LayoutAnimationComplete"
|
|
3672
|
-
];
|
|
3673
|
-
class nl {
|
|
3674
|
-
/**
|
|
3675
|
-
* This method takes React props and returns found MotionValues. For example, HTML
|
|
3676
|
-
* MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.
|
|
3677
|
-
*
|
|
3678
|
-
* This isn't an abstract method as it needs calling in the constructor, but it is
|
|
3679
|
-
* intended to be one.
|
|
3680
|
-
*/
|
|
3681
|
-
scrapeMotionValuesFromProps(t, n, s) {
|
|
3682
|
-
return {};
|
|
3683
|
-
}
|
|
3684
|
-
constructor({ parent: t, props: n, presenceContext: s, reducedMotionConfig: r, blockInitialAnimation: i, visualState: o }, a = {}) {
|
|
3685
|
-
this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = Lt, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
|
|
3686
|
-
this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
|
|
3687
|
-
}, this.renderScheduledAt = 0, this.scheduleRender = () => {
|
|
3688
|
-
const f = k.now();
|
|
3689
|
-
this.renderScheduledAt < f && (this.renderScheduledAt = f, L.render(this.render, !1, !0));
|
|
3690
|
-
};
|
|
3691
|
-
const { latestValues: c, renderState: u } = o;
|
|
3692
|
-
this.latestValues = c, this.baseTarget = { ...c }, this.initialValues = n.initial ? { ...c } : {}, this.renderState = u, this.parent = t, this.props = n, this.presenceContext = s, this.depth = t ? t.depth + 1 : 0, this.reducedMotionConfig = r, this.options = a, this.blockInitialAnimation = !!i, this.isControllingVariants = $e(n), this.isVariantNode = Ls(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(t && t.current);
|
|
3693
|
-
const { willChange: l, ...d } = this.scrapeMotionValuesFromProps(n, {}, this);
|
|
3694
|
-
for (const f in d) {
|
|
3695
|
-
const h = d[f];
|
|
3696
|
-
c[f] !== void 0 && E(h) && h.set(c[f], !1);
|
|
3697
|
-
}
|
|
3698
|
-
}
|
|
3699
|
-
mount(t) {
|
|
3700
|
-
this.current = t, el.set(t, this), this.projection && !this.projection.instance && this.projection.mount(t), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((n, s) => this.bindToMotionValue(s, n)), Qs.current || Qa(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : wt.current, process.env.NODE_ENV !== "production" && At(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);
|
|
3701
|
-
}
|
|
3702
|
-
unmount() {
|
|
3703
|
-
this.projection && this.projection.unmount(), tt(this.notifyUpdate), tt(this.render), this.valueSubscriptions.forEach((t) => t()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent && this.parent.children.delete(this);
|
|
3704
|
-
for (const t in this.events)
|
|
3705
|
-
this.events[t].clear();
|
|
3706
|
-
for (const t in this.features) {
|
|
3707
|
-
const n = this.features[t];
|
|
3708
|
-
n && (n.unmount(), n.isMounted = !1);
|
|
3709
|
-
}
|
|
3710
|
-
this.current = null;
|
|
3711
|
-
}
|
|
3712
|
-
bindToMotionValue(t, n) {
|
|
3713
|
-
this.valueSubscriptions.has(t) && this.valueSubscriptions.get(t)();
|
|
3714
|
-
const s = de.has(t);
|
|
3715
|
-
s && this.onBindTransform && this.onBindTransform();
|
|
3716
|
-
const r = n.on("change", (a) => {
|
|
3717
|
-
this.latestValues[t] = a, this.props.onUpdate && L.preRender(this.notifyUpdate), s && this.projection && (this.projection.isTransformDirty = !0);
|
|
3718
|
-
}), i = n.on("renderRequest", this.scheduleRender);
|
|
3719
|
-
let o;
|
|
3720
|
-
window.MotionCheckAppearSync && (o = window.MotionCheckAppearSync(this, t, n)), this.valueSubscriptions.set(t, () => {
|
|
3721
|
-
r(), i(), o && o(), n.owner && n.stop();
|
|
3722
|
-
});
|
|
3723
|
-
}
|
|
3724
|
-
sortNodePosition(t) {
|
|
3725
|
-
return !this.current || !this.sortInstanceNodePosition || this.type !== t.type ? 0 : this.sortInstanceNodePosition(this.current, t.current);
|
|
3726
|
-
}
|
|
3727
|
-
updateFeatures() {
|
|
3728
|
-
let t = "animation";
|
|
3729
|
-
for (t in re) {
|
|
3730
|
-
const n = re[t];
|
|
3731
|
-
if (!n)
|
|
3732
|
-
continue;
|
|
3733
|
-
const { isEnabled: s, Feature: r } = n;
|
|
3734
|
-
if (!this.features[t] && r && s(this.props) && (this.features[t] = new r(this)), this.features[t]) {
|
|
3735
|
-
const i = this.features[t];
|
|
3736
|
-
i.isMounted ? i.update() : (i.mount(), i.isMounted = !0);
|
|
3737
|
-
}
|
|
3738
|
-
}
|
|
3739
|
-
}
|
|
3740
|
-
triggerBuild() {
|
|
3741
|
-
this.build(this.renderState, this.latestValues, this.props);
|
|
3742
|
-
}
|
|
3743
|
-
/**
|
|
3744
|
-
* Measure the current viewport box with or without transforms.
|
|
3745
|
-
* Only measures axis-aligned boxes, rotate and skew must be manually
|
|
3746
|
-
* removed with a re-render to work.
|
|
3747
|
-
*/
|
|
3748
|
-
measureViewportBox() {
|
|
3749
|
-
return this.current ? this.measureInstanceViewportBox(this.current, this.props) : Zs();
|
|
3750
|
-
}
|
|
3751
|
-
getStaticValue(t) {
|
|
3752
|
-
return this.latestValues[t];
|
|
3753
|
-
}
|
|
3754
|
-
setStaticValue(t, n) {
|
|
3755
|
-
this.latestValues[t] = n;
|
|
3756
|
-
}
|
|
3757
|
-
/**
|
|
3758
|
-
* Update the provided props. Ensure any newly-added motion values are
|
|
3759
|
-
* added to our map, old ones removed, and listeners updated.
|
|
3760
|
-
*/
|
|
3761
|
-
update(t, n) {
|
|
3762
|
-
(t.transformTemplate || this.props.transformTemplate) && this.scheduleRender(), this.prevProps = this.props, this.props = t, this.prevPresenceContext = this.presenceContext, this.presenceContext = n;
|
|
3763
|
-
for (let s = 0; s < Kn.length; s++) {
|
|
3764
|
-
const r = Kn[s];
|
|
3765
|
-
this.propEventSubscriptions[r] && (this.propEventSubscriptions[r](), delete this.propEventSubscriptions[r]);
|
|
3766
|
-
const i = "on" + r, o = t[i];
|
|
3767
|
-
o && (this.propEventSubscriptions[r] = this.on(r, o));
|
|
3768
|
-
}
|
|
3769
|
-
this.prevMotionValues = tl(this, this.scrapeMotionValuesFromProps(t, this.prevProps, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
|
|
3770
|
-
}
|
|
3771
|
-
getProps() {
|
|
3772
|
-
return this.props;
|
|
3773
|
-
}
|
|
3774
|
-
/**
|
|
3775
|
-
* Returns the variant definition with a given name.
|
|
3776
|
-
*/
|
|
3777
|
-
getVariant(t) {
|
|
3778
|
-
return this.props.variants ? this.props.variants[t] : void 0;
|
|
3779
|
-
}
|
|
3780
|
-
/**
|
|
3781
|
-
* Returns the defined default transition on this component.
|
|
3782
|
-
*/
|
|
3783
|
-
getDefaultTransition() {
|
|
3784
|
-
return this.props.transition;
|
|
3785
|
-
}
|
|
3786
|
-
getTransformPagePoint() {
|
|
3787
|
-
return this.props.transformPagePoint;
|
|
3788
|
-
}
|
|
3789
|
-
getClosestVariantNode() {
|
|
3790
|
-
return this.isVariantNode ? this : this.parent ? this.parent.getClosestVariantNode() : void 0;
|
|
3791
|
-
}
|
|
3792
|
-
/**
|
|
3793
|
-
* Add a child visual element to our set of children.
|
|
3794
|
-
*/
|
|
3795
|
-
addVariantChild(t) {
|
|
3796
|
-
const n = this.getClosestVariantNode();
|
|
3797
|
-
if (n)
|
|
3798
|
-
return n.variantChildren && n.variantChildren.add(t), () => n.variantChildren.delete(t);
|
|
3799
|
-
}
|
|
3800
|
-
/**
|
|
3801
|
-
* Add a motion value and bind it to this visual element.
|
|
3802
|
-
*/
|
|
3803
|
-
addValue(t, n) {
|
|
3804
|
-
const s = this.values.get(t);
|
|
3805
|
-
n !== s && (s && this.removeValue(t), this.bindToMotionValue(t, n), this.values.set(t, n), this.latestValues[t] = n.get());
|
|
3806
|
-
}
|
|
3807
|
-
/**
|
|
3808
|
-
* Remove a motion value and unbind any active subscriptions.
|
|
3809
|
-
*/
|
|
3810
|
-
removeValue(t) {
|
|
3811
|
-
this.values.delete(t);
|
|
3812
|
-
const n = this.valueSubscriptions.get(t);
|
|
3813
|
-
n && (n(), this.valueSubscriptions.delete(t)), delete this.latestValues[t], this.removeValueFromRenderState(t, this.renderState);
|
|
3814
|
-
}
|
|
3815
|
-
/**
|
|
3816
|
-
* Check whether we have a motion value for this key
|
|
3817
|
-
*/
|
|
3818
|
-
hasValue(t) {
|
|
3819
|
-
return this.values.has(t);
|
|
3820
|
-
}
|
|
3821
|
-
getValue(t, n) {
|
|
3822
|
-
if (this.props.values && this.props.values[t])
|
|
3823
|
-
return this.props.values[t];
|
|
3824
|
-
let s = this.values.get(t);
|
|
3825
|
-
return s === void 0 && n !== void 0 && (s = Ee(n === null ? void 0 : n, { owner: this }), this.addValue(t, s)), s;
|
|
3826
|
-
}
|
|
3827
|
-
/**
|
|
3828
|
-
* If we're trying to animate to a previously unencountered value,
|
|
3829
|
-
* we need to check for it in our state and as a last resort read it
|
|
3830
|
-
* directly from the instance (which might have performance implications).
|
|
3831
|
-
*/
|
|
3832
|
-
readValue(t, n) {
|
|
3833
|
-
let s = this.latestValues[t] !== void 0 || !this.current ? this.latestValues[t] : this.getBaseTargetFromProps(this.props, t) ?? this.readValueFromInstance(this.current, t, this.options);
|
|
3834
|
-
return s != null && (typeof s == "string" && (Un(s) || Hn(s)) ? s = parseFloat(s) : !yo(s) && ce.test(n) && (s = Is(t, n)), this.setBaseTarget(t, E(s) ? s.get() : s)), E(s) ? s.get() : s;
|
|
3835
|
-
}
|
|
3836
|
-
/**
|
|
3837
|
-
* Set the base target to later animate back to. This is currently
|
|
3838
|
-
* only hydrated on creation and when we first read a value.
|
|
3839
|
-
*/
|
|
3840
|
-
setBaseTarget(t, n) {
|
|
3841
|
-
this.baseTarget[t] = n;
|
|
3842
|
-
}
|
|
3843
|
-
/**
|
|
3844
|
-
* Find the base target for a value thats been removed from all animation
|
|
3845
|
-
* props.
|
|
3846
|
-
*/
|
|
3847
|
-
getBaseTarget(t) {
|
|
3848
|
-
var i;
|
|
3849
|
-
const { initial: n } = this.props;
|
|
3850
|
-
let s;
|
|
3851
|
-
if (typeof n == "string" || typeof n == "object") {
|
|
3852
|
-
const o = Yt(this.props, n, (i = this.presenceContext) == null ? void 0 : i.custom);
|
|
3853
|
-
o && (s = o[t]);
|
|
3854
|
-
}
|
|
3855
|
-
if (n && s !== void 0)
|
|
3856
|
-
return s;
|
|
3857
|
-
const r = this.getBaseTargetFromProps(this.props, t);
|
|
3858
|
-
return r !== void 0 && !E(r) ? r : this.initialValues[t] !== void 0 && s === void 0 ? void 0 : this.baseTarget[t];
|
|
3859
|
-
}
|
|
3860
|
-
on(t, n) {
|
|
3861
|
-
return this.events[t] || (this.events[t] = new Xn()), this.events[t].add(n);
|
|
3862
|
-
}
|
|
3863
|
-
notify(t, ...n) {
|
|
3864
|
-
this.events[t] && this.events[t].notify(...n);
|
|
3865
|
-
}
|
|
3866
|
-
}
|
|
3867
|
-
class er extends nl {
|
|
3868
|
-
constructor() {
|
|
3869
|
-
super(...arguments), this.KeyframeResolver = io;
|
|
3870
|
-
}
|
|
3871
|
-
sortInstanceNodePosition(t, n) {
|
|
3872
|
-
return t.compareDocumentPosition(n) & 2 ? 1 : -1;
|
|
3873
|
-
}
|
|
3874
|
-
getBaseTargetFromProps(t, n) {
|
|
3875
|
-
return t.style ? t.style[n] : void 0;
|
|
3876
|
-
}
|
|
3877
|
-
removeValueFromRenderState(t, { vars: n, style: s }) {
|
|
3878
|
-
delete n[t], delete s[t];
|
|
3879
|
-
}
|
|
3880
|
-
handleChildMotionValue() {
|
|
3881
|
-
this.childSubscription && (this.childSubscription(), delete this.childSubscription);
|
|
3882
|
-
const { children: t } = this.props;
|
|
3883
|
-
E(t) && (this.childSubscription = t.on("change", (n) => {
|
|
3884
|
-
this.current && (this.current.textContent = `${n}`);
|
|
3885
|
-
}));
|
|
3886
|
-
}
|
|
3887
|
-
}
|
|
3888
|
-
function tr(e, { style: t, vars: n }, s, r) {
|
|
3889
|
-
Object.assign(e.style, t, r && r.getProjectionStyles(s));
|
|
3890
|
-
for (const i in n)
|
|
3891
|
-
e.style.setProperty(i, n[i]);
|
|
3892
|
-
}
|
|
3893
|
-
function sl(e) {
|
|
3894
|
-
return window.getComputedStyle(e);
|
|
3895
|
-
}
|
|
3896
|
-
class rl extends er {
|
|
3897
|
-
constructor() {
|
|
3898
|
-
super(...arguments), this.type = "html", this.renderInstance = tr;
|
|
3899
|
-
}
|
|
3900
|
-
readValueFromInstance(t, n) {
|
|
3901
|
-
var s;
|
|
3902
|
-
if (de.has(n))
|
|
3903
|
-
return (s = this.projection) != null && s.isProjecting ? lt(n) : Vi(t, n);
|
|
3904
|
-
{
|
|
3905
|
-
const r = sl(t), i = (Pt(n) ? r.getPropertyValue(n) : r[n]) || 0;
|
|
3906
|
-
return typeof i == "string" ? i.trim() : i;
|
|
3907
|
-
}
|
|
3908
|
-
}
|
|
3909
|
-
measureInstanceViewportBox(t, { transformPagePoint: n }) {
|
|
3910
|
-
return Js(t, n);
|
|
3911
|
-
}
|
|
3912
|
-
build(t, n, s) {
|
|
3913
|
-
_t(t, n, s.transformTemplate);
|
|
3914
|
-
}
|
|
3915
|
-
scrapeMotionValuesFromProps(t, n, s) {
|
|
3916
|
-
return Xt(t, n, s);
|
|
3917
|
-
}
|
|
3918
|
-
}
|
|
3919
|
-
const nr = /* @__PURE__ */ new Set([
|
|
3920
|
-
"baseFrequency",
|
|
3921
|
-
"diffuseConstant",
|
|
3922
|
-
"kernelMatrix",
|
|
3923
|
-
"kernelUnitLength",
|
|
3924
|
-
"keySplines",
|
|
3925
|
-
"keyTimes",
|
|
3926
|
-
"limitingConeAngle",
|
|
3927
|
-
"markerHeight",
|
|
3928
|
-
"markerWidth",
|
|
3929
|
-
"numOctaves",
|
|
3930
|
-
"targetX",
|
|
3931
|
-
"targetY",
|
|
3932
|
-
"surfaceScale",
|
|
3933
|
-
"specularConstant",
|
|
3934
|
-
"specularExponent",
|
|
3935
|
-
"stdDeviation",
|
|
3936
|
-
"tableValues",
|
|
3937
|
-
"viewBox",
|
|
3938
|
-
"gradientTransform",
|
|
3939
|
-
"pathLength",
|
|
3940
|
-
"startOffset",
|
|
3941
|
-
"textLength",
|
|
3942
|
-
"lengthAdjust"
|
|
3943
|
-
]);
|
|
3944
|
-
function il(e, t, n, s) {
|
|
3945
|
-
tr(e, t, void 0, s);
|
|
3946
|
-
for (const r in t.attrs)
|
|
3947
|
-
e.setAttribute(nr.has(r) ? r : zt(r), t.attrs[r]);
|
|
3948
|
-
}
|
|
3949
|
-
class ol extends er {
|
|
3950
|
-
constructor() {
|
|
3951
|
-
super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = Zs;
|
|
3952
|
-
}
|
|
3953
|
-
getBaseTargetFromProps(t, n) {
|
|
3954
|
-
return t[n];
|
|
3955
|
-
}
|
|
3956
|
-
readValueFromInstance(t, n) {
|
|
3957
|
-
if (de.has(n)) {
|
|
3958
|
-
const s = Ds(n);
|
|
3959
|
-
return s && s.default || 0;
|
|
3960
|
-
}
|
|
3961
|
-
return n = nr.has(n) ? n : zt(n), t.getAttribute(n);
|
|
3962
|
-
}
|
|
3963
|
-
scrapeMotionValuesFromProps(t, n, s) {
|
|
3964
|
-
return Hs(t, n, s);
|
|
3965
|
-
}
|
|
3966
|
-
build(t, n, s) {
|
|
3967
|
-
Gs(t, n, this.isSVGTag, s.transformTemplate, s.style);
|
|
3968
|
-
}
|
|
3969
|
-
renderInstance(t, n, s, r) {
|
|
3970
|
-
il(t, n, s, r);
|
|
3971
|
-
}
|
|
3972
|
-
mount(t) {
|
|
3973
|
-
this.isSVGTag = _s(t.tagName), super.mount(t);
|
|
3974
|
-
}
|
|
3975
|
-
}
|
|
3976
|
-
const al = (e, t) => Ht(e) ? new ol(t) : new rl(t, {
|
|
3977
|
-
allowProjection: e !== Gn
|
|
3978
|
-
}), ll = {
|
|
3979
|
-
renderer: al,
|
|
3980
|
-
...ka,
|
|
3981
|
-
...Ja
|
|
3982
|
-
}, sr = (e) => {
|
|
3983
|
-
const { ripples: t = [], motionProps: n, color: s = "currentColor", style: r, onClear: i } = e;
|
|
3984
|
-
return /* @__PURE__ */ P.jsx(P.Fragment, { children: t.map((o) => {
|
|
3985
|
-
const a = hr(0.01 * o.size, 0.2, o.size > 100 ? 0.75 : 0.5);
|
|
3986
|
-
return /* @__PURE__ */ P.jsx(So, { features: ll, children: /* @__PURE__ */ P.jsx(Vo, { mode: "popLayout", children: /* @__PURE__ */ P.jsx(
|
|
3987
|
-
oa.span,
|
|
3988
|
-
{
|
|
3989
|
-
animate: { transform: "scale(2)", opacity: 0 },
|
|
3990
|
-
className: "ripple-item-span",
|
|
3991
|
-
exit: { opacity: 0 },
|
|
3992
|
-
initial: { transform: "scale(0)", opacity: 0.35 },
|
|
3993
|
-
style: {
|
|
3994
|
-
position: "absolute",
|
|
3995
|
-
backgroundColor: s,
|
|
3996
|
-
borderRadius: "100%",
|
|
3997
|
-
transformOrigin: "center",
|
|
3998
|
-
pointerEvents: "none",
|
|
3999
|
-
overflow: "hidden",
|
|
4000
|
-
inset: 0,
|
|
4001
|
-
zIndex: 0,
|
|
4002
|
-
top: o.y,
|
|
4003
|
-
left: o.x,
|
|
4004
|
-
width: `${o.size}px`,
|
|
4005
|
-
height: `${o.size}px`,
|
|
4006
|
-
...r
|
|
4007
|
-
},
|
|
4008
|
-
transition: { duration: a },
|
|
4009
|
-
onAnimationComplete: () => {
|
|
4010
|
-
i(o.key);
|
|
4011
|
-
},
|
|
4012
|
-
...n
|
|
4013
|
-
}
|
|
4014
|
-
) }) }, o.key);
|
|
4015
|
-
}) });
|
|
4016
|
-
};
|
|
4017
|
-
sr.displayName = "LizaUI.Ripple";
|
|
4018
|
-
const cl = () => /* @__PURE__ */ P.jsx("div", { "aria-label": "Loading", className: "relative inline-flex flex-col gap-2 items-center justify-center", children: /* @__PURE__ */ P.jsxs("div", { className: "relative flex w-5 h-5", children: [
|
|
4019
|
-
/* @__PURE__ */ P.jsx("i", { className: "absolute w-full h-full rounded-full border-2 border-b-current animate-spinner-ease-spin border-solid border-t-transparent border-l-transparent border-r-transparent" }),
|
|
4020
|
-
/* @__PURE__ */ P.jsx("i", { className: "absolute w-full h-full rounded-full border-2 border-b-current opacity-75 animate-spinner-linear-spin border-dotted border-t-transparent border-l-transparent border-r-transparent" })
|
|
4021
|
-
] }) }), ul = Wn((e, t) => {
|
|
4022
|
-
const {
|
|
4023
|
-
Component: n,
|
|
4024
|
-
domRef: s,
|
|
4025
|
-
children: r,
|
|
4026
|
-
isIconOnly: i,
|
|
4027
|
-
isLoading: o,
|
|
4028
|
-
spinner: a,
|
|
4029
|
-
spinnerPlacement: c,
|
|
4030
|
-
startContent: u,
|
|
4031
|
-
endContent: l,
|
|
4032
|
-
getButtonProps: d,
|
|
4033
|
-
getRippleProps: f
|
|
4034
|
-
} = yr({
|
|
4035
|
-
...e,
|
|
4036
|
-
ref: t
|
|
4037
|
-
}), h = W(() => /* @__PURE__ */ P.jsx(cl, {}), []), m = a ?? h;
|
|
4038
|
-
return /* @__PURE__ */ P.jsxs(n, { ...d(), ref: s, children: [
|
|
4039
|
-
u,
|
|
4040
|
-
o && c === "start" && m,
|
|
4041
|
-
o && i ? null : r,
|
|
4042
|
-
o && c === "end" && m,
|
|
4043
|
-
l,
|
|
4044
|
-
/* @__PURE__ */ P.jsx(sr, { ...f() })
|
|
4045
|
-
] });
|
|
4046
|
-
});
|
|
4047
|
-
ul.displayName = "Custom.Button";
|
|
4048
|
-
export {
|
|
4049
|
-
Qo as $,
|
|
4050
|
-
b as A,
|
|
4051
|
-
ul as B,
|
|
4052
|
-
ce as C,
|
|
4053
|
-
To as D,
|
|
4054
|
-
wl as E,
|
|
4055
|
-
fe as F,
|
|
4056
|
-
co as G,
|
|
4057
|
-
E as H,
|
|
4058
|
-
Ee as I,
|
|
4059
|
-
br as J,
|
|
4060
|
-
vr as K,
|
|
4061
|
-
zn as L,
|
|
4062
|
-
k as M,
|
|
4063
|
-
Ar as N,
|
|
4064
|
-
In as O,
|
|
4065
|
-
Xn as P,
|
|
4066
|
-
As as Q,
|
|
4067
|
-
vl as R,
|
|
4068
|
-
Oo as S,
|
|
4069
|
-
Ka as T,
|
|
4070
|
-
On as U,
|
|
4071
|
-
Nn as V,
|
|
4072
|
-
Ba as W,
|
|
4073
|
-
$a as X,
|
|
4074
|
-
ja as Y,
|
|
4075
|
-
Sl as Z,
|
|
4076
|
-
Vl as _,
|
|
4077
|
-
wr as a,
|
|
4078
|
-
mt as a0,
|
|
4079
|
-
fa as a1,
|
|
4080
|
-
ra as a2,
|
|
4081
|
-
al as a3,
|
|
4082
|
-
Ja as a4,
|
|
4083
|
-
ka as a5,
|
|
4084
|
-
Po as a6,
|
|
4085
|
-
Vo as a7,
|
|
4086
|
-
mr as b,
|
|
4087
|
-
Mn as c,
|
|
4088
|
-
xl as d,
|
|
4089
|
-
L as e,
|
|
4090
|
-
De as f,
|
|
4091
|
-
ks as g,
|
|
4092
|
-
qt as h,
|
|
4093
|
-
yn as i,
|
|
4094
|
-
tt as j,
|
|
4095
|
-
$ as k,
|
|
4096
|
-
Yn as l,
|
|
4097
|
-
xe as m,
|
|
4098
|
-
J as n,
|
|
4099
|
-
Zs as o,
|
|
4100
|
-
Be as p,
|
|
4101
|
-
Bs as q,
|
|
4102
|
-
U as r,
|
|
4103
|
-
B as s,
|
|
4104
|
-
Al as t,
|
|
4105
|
-
Tl as u,
|
|
4106
|
-
Na as v,
|
|
4107
|
-
da as w,
|
|
4108
|
-
xa as x,
|
|
4109
|
-
ne as y,
|
|
4110
|
-
ae as z
|
|
4111
|
-
};
|
|
4112
|
-
//# sourceMappingURL=button-C6LoJycL.js.map
|