@kommo-crm/crm-react-ui-kit 1.18.0 → 1.19.0
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/{ContextMenu-DY7dE-m3.mjs → ContextMenu-C5hUJzo_.mjs} +4 -4
- package/dist/ItemRoot.module-Bai745fc.mjs +7 -0
- package/dist/ItemRoot.module-aMBsZnCj.mjs +7 -0
- package/dist/assets/Item.css +1 -1
- package/dist/assets/Item3.css +1 -1
- package/dist/assets/ItemRoot.css +1 -1
- package/dist/assets/ItemRoot2.css +1 -1
- package/dist/assets/Ribbon.css +1 -0
- package/dist/components/CheckboxGroup/components/CheckboxSelectAll/ItemRootSelectAll.js +1 -1
- package/dist/components/CheckboxGroup/components/ItemRoot/ItemRoot.js +1 -1
- package/dist/components/ContextMenu/ContextMenu.d.ts +5 -15
- package/dist/components/ContextMenu/ContextMenu.d.ts.map +1 -1
- package/dist/components/ContextMenu/ContextMenu.js +3 -3
- package/dist/components/ContextMenu/components/Arrow/Arrow.js +1 -1
- package/dist/components/ContextMenu/components/CheckboxItem/CheckboxItem.d.ts +1 -3
- package/dist/components/ContextMenu/components/CheckboxItem/CheckboxItem.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/CheckboxItem/CheckboxItem.js +2 -2
- package/dist/components/ContextMenu/components/Content/Content.d.ts +1 -3
- package/dist/components/ContextMenu/components/Content/Content.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/Content/Content.js +2 -2
- package/dist/components/ContextMenu/components/Content/index.js +1 -1
- package/dist/components/ContextMenu/components/Group/Group.js +1 -1
- package/dist/components/ContextMenu/components/Item/Item.js +3 -3
- package/dist/components/ContextMenu/components/ItemIndicator/ItemIndicator.js +1 -1
- package/dist/components/ContextMenu/components/Label/Label.js +2 -2
- package/dist/components/ContextMenu/components/Portal/Portal.js +1 -1
- package/dist/components/ContextMenu/components/RadioGroup/RadioGroup.js +1 -1
- package/dist/components/ContextMenu/components/RadioItem/RadioItem.d.ts +1 -3
- package/dist/components/ContextMenu/components/RadioItem/RadioItem.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/RadioItem/RadioItem.js +2 -2
- package/dist/components/ContextMenu/components/Sub/Sub.js +2 -2
- package/dist/components/ContextMenu/components/Sub/hooks/useContextMenuSub/useContextMenuSub.js +1 -1
- package/dist/components/ContextMenu/components/Sub/index.js +1 -1
- package/dist/components/ContextMenu/components/SubContent/SubContent.js +2 -2
- package/dist/components/ContextMenu/components/SubRoot/SubRoot.d.ts +1 -3
- package/dist/components/ContextMenu/components/SubRoot/SubRoot.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/SubRoot/SubRoot.js +1 -1
- package/dist/components/ContextMenu/components/SubRoot/components/Content/Content.js +2 -2
- package/dist/components/ContextMenu/components/SubRoot/components/Trigger/Trigger.js +2 -2
- package/dist/components/ContextMenu/components/SubRoot/hooks/useContextMenuSubMenu/useContextMenuSubMenu.js +1 -1
- package/dist/components/ContextMenu/components/SubTrigger/SubTrigger.d.ts +1 -3
- package/dist/components/ContextMenu/components/SubTrigger/SubTrigger.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/SubTrigger/SubTrigger.js +2 -2
- package/dist/components/ContextMenu/components/Trigger/Trigger.js +1 -1
- package/dist/components/ContextMenu/hooks/index.js +1 -1
- package/dist/components/ContextMenu/hooks/useContentPositioning/useContentPositioning.js +1 -1
- package/dist/components/ContextMenu/hooks/useContextMenu/useContextMenu.js +1 -1
- package/dist/components/ContextMenu/index.js +1 -1
- package/dist/components/DropdownList/DropdownList.js +1 -1
- package/dist/components/FilterTabs/components/ItemRoot/ItemRoot.js +1 -1
- package/dist/components/FilterTabs/components/ItemRootReset/ItemRootReset.js +1 -1
- package/dist/components/Ribbon/Ribbon.d.ts +5 -0
- package/dist/components/Ribbon/Ribbon.d.ts.map +1 -0
- package/dist/components/Ribbon/Ribbon.js +66 -0
- package/dist/components/Ribbon/Ribbon.props.d.ts +47 -0
- package/dist/components/Ribbon/Ribbon.props.d.ts.map +1 -0
- package/dist/components/Ribbon/Ribbon.props.js +1 -0
- package/dist/components/Ribbon/Ribbon.themes.d.ts +7 -0
- package/dist/components/Ribbon/Ribbon.themes.d.ts.map +1 -0
- package/dist/components/Ribbon/Ribbon.themes.js +12 -0
- package/dist/components/Ribbon/index.d.ts +4 -0
- package/dist/components/Ribbon/index.d.ts.map +1 -0
- package/dist/components/Ribbon/index.js +6 -0
- package/dist/components/Select/components/Item/Item.js +1 -1
- package/dist/components/Select/components/List/List.js +12 -12
- package/dist/{index-SjVEUQPm.mjs → index-BSUeeun5.mjs} +1249 -1216
- package/dist/{index-DBS3EIVR.mjs → index-CitTBapb.mjs} +4 -4
- package/dist/{useContentPositioning-Dvz908Jg.mjs → useContentPositioning--C2HIYDR.mjs} +658 -636
- package/package.json +6 -1
- package/dist/ItemRoot.module-DaaOqYPx.mjs +0 -7
- package/dist/ItemRoot.module-fiKLca_h.mjs +0 -7
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import {
|
|
1
|
+
import * as Zt from "react";
|
|
2
|
+
import { useState as ee, useEffect as Re, useLayoutEffect as Fe, useRef as H, forwardRef as Xt, useCallback as Xn, useMemo as Oe, useContext as Yn } from "react";
|
|
3
3
|
import { jsx as Ke, jsxs as Jn } from "react/jsx-runtime";
|
|
4
|
-
import { f as ei } from "./index-
|
|
4
|
+
import { f as ei } from "./index-BSUeeun5.mjs";
|
|
5
5
|
import { c as ti } from "./index-L8X2o7IH.mjs";
|
|
6
6
|
import { unstable_batchedUpdates as ni } from "react-dom";
|
|
7
7
|
import { mergeRefs as ii } from "./lib/utils.js";
|
|
@@ -9,34 +9,34 @@ import { KeyboardKey as si } from "./lib/keyboard/index.js";
|
|
|
9
9
|
import { LevelProvider as ri } from "./components/ContextMenu/providers/LevelProvider/LevelProvider.js";
|
|
10
10
|
import { useContextMenuContext as ai, useContextMenuRootContext as oi } from "./components/ContextMenu/ContextMenu.context.js";
|
|
11
11
|
import { ContextMenuMode as ce } from "./components/ContextMenu/ContextMenu.enums.js";
|
|
12
|
-
import { Direction as
|
|
12
|
+
import { Direction as V } from "./components/ContextMenu/components/Content/Content.enums.js";
|
|
13
13
|
import { directionToSide as ui } from "./components/ContextMenu/components/Content/Content.utils.js";
|
|
14
14
|
import "./components/ContextMenu/providers/SubMenuProvider/SubMenuProvider.js";
|
|
15
15
|
import { FocusBlocker as ci } from "./components/ContextMenu/components/FocusBlocker/FocusBlocker.js";
|
|
16
|
-
import './assets/Content.css';var
|
|
17
|
-
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
var
|
|
23
|
-
|
|
16
|
+
import './assets/Content.css';var ht = Ce(), b = (e) => Ie(e, ht), mt = Ce();
|
|
17
|
+
b.write = (e) => Ie(e, mt);
|
|
18
|
+
var qe = Ce();
|
|
19
|
+
b.onStart = (e) => Ie(e, qe);
|
|
20
|
+
var pt = Ce();
|
|
21
|
+
b.onFrame = (e) => Ie(e, pt);
|
|
22
|
+
var gt = Ce();
|
|
23
|
+
b.onFinish = (e) => Ie(e, gt);
|
|
24
24
|
var se = [];
|
|
25
|
-
|
|
26
|
-
const n =
|
|
25
|
+
b.setTimeout = (e, t) => {
|
|
26
|
+
const n = b.now() + t, i = () => {
|
|
27
27
|
const r = se.findIndex((a) => a.cancel == i);
|
|
28
|
-
~r && se.splice(r, 1),
|
|
28
|
+
~r && se.splice(r, 1), X -= ~r ? 1 : 0;
|
|
29
29
|
}, s = { time: n, handler: e, cancel: i };
|
|
30
|
-
return se.splice(
|
|
30
|
+
return se.splice(Yt(n), 0, s), X += 1, Jt(), s;
|
|
31
31
|
};
|
|
32
|
-
var
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
var Yt = (e) => ~(~se.findIndex((t) => t.time > e) || ~se.length);
|
|
33
|
+
b.cancel = (e) => {
|
|
34
|
+
qe.delete(e), pt.delete(e), gt.delete(e), ht.delete(e), mt.delete(e);
|
|
35
35
|
};
|
|
36
|
-
|
|
37
|
-
nt = !0,
|
|
36
|
+
b.sync = (e) => {
|
|
37
|
+
nt = !0, b.batchedUpdates(e), nt = !1;
|
|
38
38
|
};
|
|
39
|
-
|
|
39
|
+
b.throttle = (e) => {
|
|
40
40
|
let t;
|
|
41
41
|
function n() {
|
|
42
42
|
try {
|
|
@@ -46,84 +46,84 @@ _.throttle = (e) => {
|
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
function i(...s) {
|
|
49
|
-
t = s,
|
|
49
|
+
t = s, b.onStart(n);
|
|
50
50
|
}
|
|
51
51
|
return i.handler = e, i.cancel = () => {
|
|
52
|
-
|
|
52
|
+
qe.delete(n), t = null;
|
|
53
53
|
}, i;
|
|
54
54
|
};
|
|
55
|
-
var
|
|
55
|
+
var vt = typeof window < "u" ? window.requestAnimationFrame : (
|
|
56
56
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
57
57
|
() => {
|
|
58
58
|
}
|
|
59
59
|
);
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
60
|
+
b.use = (e) => vt = e;
|
|
61
|
+
b.now = typeof performance < "u" ? () => performance.now() : Date.now;
|
|
62
|
+
b.batchedUpdates = (e) => e();
|
|
63
|
+
b.catch = console.error;
|
|
64
|
+
b.frameLoop = "always";
|
|
65
|
+
b.advance = () => {
|
|
66
|
+
b.frameLoop !== "demand" ? console.warn(
|
|
67
67
|
"Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"
|
|
68
|
-
) :
|
|
68
|
+
) : tn();
|
|
69
69
|
};
|
|
70
|
-
var
|
|
71
|
-
function
|
|
72
|
-
nt ? (t.delete(e), e(0)) : (t.add(e),
|
|
70
|
+
var Z = -1, X = 0, nt = !1;
|
|
71
|
+
function Ie(e, t) {
|
|
72
|
+
nt ? (t.delete(e), e(0)) : (t.add(e), Jt());
|
|
73
73
|
}
|
|
74
|
-
function
|
|
75
|
-
|
|
74
|
+
function Jt() {
|
|
75
|
+
Z < 0 && (Z = 0, b.frameLoop !== "demand" && vt(en));
|
|
76
76
|
}
|
|
77
77
|
function li() {
|
|
78
|
-
|
|
78
|
+
Z = -1;
|
|
79
79
|
}
|
|
80
|
-
function
|
|
81
|
-
~
|
|
80
|
+
function en() {
|
|
81
|
+
~Z && (vt(en), b.batchedUpdates(tn));
|
|
82
82
|
}
|
|
83
|
-
function
|
|
84
|
-
const e =
|
|
85
|
-
|
|
86
|
-
const t =
|
|
87
|
-
if (t && (
|
|
83
|
+
function tn() {
|
|
84
|
+
const e = Z;
|
|
85
|
+
Z = b.now();
|
|
86
|
+
const t = Yt(Z);
|
|
87
|
+
if (t && (nn(se.splice(0, t), (n) => n.handler()), X -= t), !X) {
|
|
88
88
|
li();
|
|
89
89
|
return;
|
|
90
90
|
}
|
|
91
|
-
|
|
91
|
+
qe.flush(), ht.flush(e ? Math.min(64, Z - e) : 16.667), pt.flush(), mt.flush(), gt.flush();
|
|
92
92
|
}
|
|
93
93
|
function Ce() {
|
|
94
94
|
let e = /* @__PURE__ */ new Set(), t = e;
|
|
95
95
|
return {
|
|
96
96
|
add(n) {
|
|
97
|
-
|
|
97
|
+
X += t == e && !e.has(n) ? 1 : 0, e.add(n);
|
|
98
98
|
},
|
|
99
99
|
delete(n) {
|
|
100
|
-
return
|
|
100
|
+
return X -= t == e && e.has(n) ? 1 : 0, e.delete(n);
|
|
101
101
|
},
|
|
102
102
|
flush(n) {
|
|
103
|
-
t.size && (e = /* @__PURE__ */ new Set(),
|
|
103
|
+
t.size && (e = /* @__PURE__ */ new Set(), X -= t.size, nn(t, (i) => i(n) && e.add(i)), X += e.size, t = e);
|
|
104
104
|
}
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function nn(e, t) {
|
|
108
108
|
e.forEach((n) => {
|
|
109
109
|
try {
|
|
110
110
|
t(n);
|
|
111
111
|
} catch (i) {
|
|
112
|
-
|
|
112
|
+
b.catch(i);
|
|
113
113
|
}
|
|
114
114
|
});
|
|
115
115
|
}
|
|
116
116
|
var di = Object.defineProperty, fi = (e, t) => {
|
|
117
117
|
for (var n in t)
|
|
118
118
|
di(e, n, { get: t[n], enumerable: !0 });
|
|
119
|
-
},
|
|
120
|
-
fi(
|
|
119
|
+
}, Q = {};
|
|
120
|
+
fi(Q, {
|
|
121
121
|
assign: () => mi,
|
|
122
122
|
colors: () => Y,
|
|
123
|
-
createStringInterpolator: () =>
|
|
124
|
-
skipAnimation: () =>
|
|
125
|
-
to: () =>
|
|
126
|
-
willAdvance: () =>
|
|
123
|
+
createStringInterpolator: () => bt,
|
|
124
|
+
skipAnimation: () => rn,
|
|
125
|
+
to: () => sn,
|
|
126
|
+
willAdvance: () => _t
|
|
127
127
|
});
|
|
128
128
|
function it() {
|
|
129
129
|
}
|
|
@@ -144,7 +144,7 @@ function G(e, t) {
|
|
|
144
144
|
}
|
|
145
145
|
return e === t;
|
|
146
146
|
}
|
|
147
|
-
var
|
|
147
|
+
var w = (e, t) => e.forEach(t);
|
|
148
148
|
function B(e, t, n) {
|
|
149
149
|
if (c.arr(e)) {
|
|
150
150
|
for (let i = 0; i < e.length; i++)
|
|
@@ -154,32 +154,32 @@ function B(e, t, n) {
|
|
|
154
154
|
for (const i in e)
|
|
155
155
|
e.hasOwnProperty(i) && t.call(n, e[i], i);
|
|
156
156
|
}
|
|
157
|
-
var
|
|
157
|
+
var j = (e) => c.und(e) ? [] : c.arr(e) ? e : [e];
|
|
158
158
|
function me(e, t) {
|
|
159
159
|
if (e.size) {
|
|
160
160
|
const n = Array.from(e);
|
|
161
|
-
e.clear(),
|
|
161
|
+
e.clear(), w(n, t);
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
|
-
var he = (e, ...t) => me(e, (n) => n(...t)),
|
|
165
|
-
e.to && (
|
|
166
|
-
}, pe = /* @__PURE__ */ new Set(),
|
|
164
|
+
var he = (e, ...t) => me(e, (n) => n(...t)), yt = () => typeof window > "u" || !window.navigator || /ServerSideRendering|^Deno\//.test(window.navigator.userAgent), bt, sn, Y = null, rn = !1, _t = it, mi = (e) => {
|
|
165
|
+
e.to && (sn = e.to), e.now && (b.now = e.now), e.colors !== void 0 && (Y = e.colors), e.skipAnimation != null && (rn = e.skipAnimation), e.createStringInterpolator && (bt = e.createStringInterpolator), e.requestAnimationFrame && b.use(e.requestAnimationFrame), e.batchedUpdates && (b.batchedUpdates = e.batchedUpdates), e.willAdvance && (_t = e.willAdvance), e.frameLoop && (b.frameLoop = e.frameLoop);
|
|
166
|
+
}, pe = /* @__PURE__ */ new Set(), L = [], Ze = [], Ne = 0, Le = {
|
|
167
167
|
get idle() {
|
|
168
|
-
return !pe.size &&
|
|
168
|
+
return !pe.size && !L.length;
|
|
169
169
|
},
|
|
170
170
|
/** Advance the given animation on every frame until idle. */
|
|
171
171
|
start(e) {
|
|
172
|
-
Ne > e.priority ? (pe.add(e),
|
|
172
|
+
Ne > e.priority ? (pe.add(e), b.onStart(pi)) : (an(e), b(st));
|
|
173
173
|
},
|
|
174
174
|
/** Advance all animations by the given time. */
|
|
175
175
|
advance: st,
|
|
176
176
|
/** Call this when an animation's priority changes. */
|
|
177
177
|
sort(e) {
|
|
178
178
|
if (Ne)
|
|
179
|
-
|
|
179
|
+
b.onFrame(() => Le.sort(e));
|
|
180
180
|
else {
|
|
181
|
-
const t =
|
|
182
|
-
~t && (
|
|
181
|
+
const t = L.indexOf(e);
|
|
182
|
+
~t && (L.splice(t, 1), on(e));
|
|
183
183
|
}
|
|
184
184
|
},
|
|
185
185
|
/**
|
|
@@ -188,29 +188,29 @@ var he = (e, ...t) => me(e, (n) => n(...t)), gt = () => typeof window > "u" || !
|
|
|
188
188
|
* ☠️ Never call this from within the frameloop.
|
|
189
189
|
*/
|
|
190
190
|
clear() {
|
|
191
|
-
|
|
191
|
+
L = [], pe.clear();
|
|
192
192
|
}
|
|
193
193
|
};
|
|
194
194
|
function pi() {
|
|
195
|
-
pe.forEach(
|
|
195
|
+
pe.forEach(an), pe.clear(), b(st);
|
|
196
196
|
}
|
|
197
|
-
function
|
|
198
|
-
|
|
197
|
+
function an(e) {
|
|
198
|
+
L.includes(e) || on(e);
|
|
199
199
|
}
|
|
200
|
-
function
|
|
201
|
-
|
|
202
|
-
gi(
|
|
200
|
+
function on(e) {
|
|
201
|
+
L.splice(
|
|
202
|
+
gi(L, (t) => t.priority > e.priority),
|
|
203
203
|
0,
|
|
204
204
|
e
|
|
205
205
|
);
|
|
206
206
|
}
|
|
207
207
|
function st(e) {
|
|
208
208
|
const t = Ze;
|
|
209
|
-
for (let n = 0; n <
|
|
210
|
-
const i =
|
|
211
|
-
Ne = i.priority, i.idle || (
|
|
209
|
+
for (let n = 0; n < L.length; n++) {
|
|
210
|
+
const i = L[n];
|
|
211
|
+
Ne = i.priority, i.idle || (_t(i), i.advance(e), i.idle || t.push(i));
|
|
212
212
|
}
|
|
213
|
-
return Ne = 0, Ze =
|
|
213
|
+
return Ne = 0, Ze = L, Ze.length = 0, L = t, L.length > 0;
|
|
214
214
|
}
|
|
215
215
|
function gi(e, t) {
|
|
216
216
|
const n = e.findIndex(t);
|
|
@@ -367,23 +367,23 @@ var vi = {
|
|
|
367
367
|
whitesmoke: 4126537215,
|
|
368
368
|
yellow: 4294902015,
|
|
369
369
|
yellowgreen: 2597139199
|
|
370
|
-
},
|
|
371
|
-
function
|
|
370
|
+
}, $ = "[-+]?\\d*\\.?\\d+", De = $ + "%";
|
|
371
|
+
function $e(...e) {
|
|
372
372
|
return "\\(\\s*(" + e.join(")\\s*,\\s*(") + ")\\s*\\)";
|
|
373
373
|
}
|
|
374
|
-
var yi = new RegExp("rgb" +
|
|
375
|
-
"hsla" +
|
|
376
|
-
), Ai = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
|
|
374
|
+
var yi = new RegExp("rgb" + $e($, $, $)), bi = new RegExp("rgba" + $e($, $, $, $)), _i = new RegExp("hsl" + $e($, De, De)), wi = new RegExp(
|
|
375
|
+
"hsla" + $e($, De, De, $)
|
|
376
|
+
), Ai = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, Si = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, Pi = /^#([0-9a-fA-F]{6})$/, Ri = /^#([0-9a-fA-F]{8})$/;
|
|
377
377
|
function Ii(e) {
|
|
378
378
|
let t;
|
|
379
|
-
return typeof e == "number" ? e >>> 0 === e && e >= 0 && e <= 4294967295 ? e : null : (t =
|
|
379
|
+
return typeof e == "number" ? e >>> 0 === e && e >= 0 && e <= 4294967295 ? e : null : (t = Pi.exec(e)) ? parseInt(t[1] + "ff", 16) >>> 0 : Y && Y[e] !== void 0 ? Y[e] : (t = yi.exec(e)) ? (ie(t[1]) << 24 | // r
|
|
380
380
|
ie(t[2]) << 16 | // g
|
|
381
381
|
ie(t[3]) << 8 | // b
|
|
382
382
|
255) >>> // a
|
|
383
383
|
0 : (t = bi.exec(e)) ? (ie(t[1]) << 24 | // r
|
|
384
384
|
ie(t[2]) << 16 | // g
|
|
385
385
|
ie(t[3]) << 8 | // b
|
|
386
|
-
|
|
386
|
+
kt(t[4])) >>> // a
|
|
387
387
|
0 : (t = Ai.exec(e)) ? parseInt(
|
|
388
388
|
t[1] + t[1] + // r
|
|
389
389
|
t[2] + t[2] + // g
|
|
@@ -391,35 +391,35 @@ function Ii(e) {
|
|
|
391
391
|
"ff",
|
|
392
392
|
// a
|
|
393
393
|
16
|
|
394
|
-
) >>> 0 : (t = Ri.exec(e)) ? parseInt(t[1], 16) >>> 0 : (t =
|
|
394
|
+
) >>> 0 : (t = Ri.exec(e)) ? parseInt(t[1], 16) >>> 0 : (t = Si.exec(e)) ? parseInt(
|
|
395
395
|
t[1] + t[1] + // r
|
|
396
396
|
t[2] + t[2] + // g
|
|
397
397
|
t[3] + t[3] + // b
|
|
398
398
|
t[4] + t[4],
|
|
399
399
|
// a
|
|
400
400
|
16
|
|
401
|
-
) >>> 0 : (t = _i.exec(e)) ? (
|
|
402
|
-
|
|
401
|
+
) >>> 0 : (t = _i.exec(e)) ? (Tt(
|
|
402
|
+
Ot(t[1]),
|
|
403
403
|
// h
|
|
404
|
-
|
|
404
|
+
ke(t[2]),
|
|
405
405
|
// s
|
|
406
|
-
|
|
406
|
+
ke(t[3])
|
|
407
407
|
// l
|
|
408
408
|
) | 255) >>> // a
|
|
409
|
-
0 : (t = wi.exec(e)) ? (
|
|
410
|
-
|
|
409
|
+
0 : (t = wi.exec(e)) ? (Tt(
|
|
410
|
+
Ot(t[1]),
|
|
411
411
|
// h
|
|
412
|
-
|
|
412
|
+
ke(t[2]),
|
|
413
413
|
// s
|
|
414
|
-
|
|
414
|
+
ke(t[3])
|
|
415
415
|
// l
|
|
416
|
-
) |
|
|
416
|
+
) | kt(t[4])) >>> // a
|
|
417
417
|
0 : null;
|
|
418
418
|
}
|
|
419
419
|
function Xe(e, t, n) {
|
|
420
420
|
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;
|
|
421
421
|
}
|
|
422
|
-
function
|
|
422
|
+
function Tt(e, t, n) {
|
|
423
423
|
const i = n < 0.5 ? n * (1 + t) : n + t - n * t, s = 2 * n - i, r = Xe(s, i, e + 1 / 3), a = Xe(s, i, e), o = Xe(s, i, e - 1 / 3);
|
|
424
424
|
return Math.round(r * 255) << 24 | Math.round(a * 255) << 16 | Math.round(o * 255) << 8;
|
|
425
425
|
}
|
|
@@ -427,18 +427,18 @@ function ie(e) {
|
|
|
427
427
|
const t = parseInt(e, 10);
|
|
428
428
|
return t < 0 ? 0 : t > 255 ? 255 : t;
|
|
429
429
|
}
|
|
430
|
-
function
|
|
430
|
+
function Ot(e) {
|
|
431
431
|
return (parseFloat(e) % 360 + 360) % 360 / 360;
|
|
432
432
|
}
|
|
433
|
-
function
|
|
433
|
+
function kt(e) {
|
|
434
434
|
const t = parseFloat(e);
|
|
435
435
|
return t < 0 ? 0 : t > 1 ? 255 : Math.round(t * 255);
|
|
436
436
|
}
|
|
437
|
-
function
|
|
437
|
+
function ke(e) {
|
|
438
438
|
const t = parseFloat(e);
|
|
439
439
|
return t < 0 ? 0 : t > 100 ? 1 : t / 100;
|
|
440
440
|
}
|
|
441
|
-
function
|
|
441
|
+
function Ft(e) {
|
|
442
442
|
let t = Ii(e);
|
|
443
443
|
if (t === null) return e;
|
|
444
444
|
t = t || 0;
|
|
@@ -455,16 +455,16 @@ var ye = (e, t, n) => {
|
|
|
455
455
|
extrapolate: n
|
|
456
456
|
});
|
|
457
457
|
if (c.str(e.output[0]))
|
|
458
|
-
return
|
|
458
|
+
return bt(e);
|
|
459
459
|
const i = e, s = i.output, r = i.range || [0, 1], a = i.extrapolateLeft || i.extrapolate || "extend", o = i.extrapolateRight || i.extrapolate || "extend", l = i.easing || ((u) => u);
|
|
460
460
|
return (u) => {
|
|
461
|
-
const
|
|
462
|
-
return
|
|
461
|
+
const m = xi(u, r);
|
|
462
|
+
return Ci(
|
|
463
463
|
u,
|
|
464
|
-
r[
|
|
465
|
-
r[
|
|
466
|
-
s[
|
|
467
|
-
s[
|
|
464
|
+
r[m],
|
|
465
|
+
r[m + 1],
|
|
466
|
+
s[m],
|
|
467
|
+
s[m + 1],
|
|
468
468
|
l,
|
|
469
469
|
a,
|
|
470
470
|
o,
|
|
@@ -472,7 +472,7 @@ var ye = (e, t, n) => {
|
|
|
472
472
|
);
|
|
473
473
|
};
|
|
474
474
|
};
|
|
475
|
-
function
|
|
475
|
+
function Ci(e, t, n, i, s, r, a, o, l) {
|
|
476
476
|
let u = l ? l(e) : e;
|
|
477
477
|
if (u < t) {
|
|
478
478
|
if (a === "identity") return u;
|
|
@@ -484,15 +484,15 @@ function xi(e, t, n, i, s, r, a, o, l) {
|
|
|
484
484
|
}
|
|
485
485
|
return i === s ? i : t === n ? e <= t ? i : s : (t === -1 / 0 ? u = -u : n === 1 / 0 ? u = u - t : u = (u - t) / (n - t), u = r(u), i === -1 / 0 ? u = -u : s === 1 / 0 ? u = u + i : u = u * (s - i) + i, u);
|
|
486
486
|
}
|
|
487
|
-
function
|
|
487
|
+
function xi(e, t) {
|
|
488
488
|
for (var n = 1; n < t.length - 1 && !(t[n] >= e); ++n)
|
|
489
489
|
;
|
|
490
490
|
return n - 1;
|
|
491
491
|
}
|
|
492
|
-
var
|
|
492
|
+
var un = {
|
|
493
493
|
linear: (e) => e,
|
|
494
494
|
easeInOutCubic: (e) => e < 0.5 ? 4 * e * e * e : 1 - Math.pow(-2 * e + 2, 3) / 2
|
|
495
|
-
}, be = Symbol.for("FluidValue.get"), ae = Symbol.for("FluidValue.observers"),
|
|
495
|
+
}, be = Symbol.for("FluidValue.get"), ae = Symbol.for("FluidValue.observers"), q = (e) => !!(e && e[be]), U = (e) => e && e[be] ? e[be]() : e, Et = (e) => e[ae] || null;
|
|
496
496
|
function Ti(e, t) {
|
|
497
497
|
e.eventObserved ? e.eventObserved(t) : e(t);
|
|
498
498
|
}
|
|
@@ -502,17 +502,17 @@ function _e(e, t) {
|
|
|
502
502
|
Ti(i, t);
|
|
503
503
|
});
|
|
504
504
|
}
|
|
505
|
-
var
|
|
505
|
+
var cn = class {
|
|
506
506
|
constructor(e) {
|
|
507
507
|
if (!e && !(e = this.get))
|
|
508
508
|
throw Error("Unknown getter");
|
|
509
|
-
|
|
509
|
+
Oi(this, e);
|
|
510
510
|
}
|
|
511
|
-
},
|
|
511
|
+
}, Oi = (e, t) => ln(e, be, t);
|
|
512
512
|
function oe(e, t) {
|
|
513
513
|
if (e[be]) {
|
|
514
514
|
let n = e[ae];
|
|
515
|
-
n ||
|
|
515
|
+
n || ln(e, ae, n = /* @__PURE__ */ new Set()), n.has(t) || (n.add(t), e.observerAdded && e.observerAdded(n.size, t));
|
|
516
516
|
}
|
|
517
517
|
return t;
|
|
518
518
|
}
|
|
@@ -523,13 +523,13 @@ function we(e, t) {
|
|
|
523
523
|
i ? n.delete(t) : e[ae] = null, e.observerRemoved && e.observerRemoved(i, t);
|
|
524
524
|
}
|
|
525
525
|
}
|
|
526
|
-
var
|
|
526
|
+
var ln = (e, t, n) => Object.defineProperty(e, t, {
|
|
527
527
|
value: n,
|
|
528
528
|
writable: !0,
|
|
529
529
|
configurable: !0
|
|
530
|
-
}),
|
|
530
|
+
}), Ee = /[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ki = /(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi, Vt = new RegExp(`(${Ee.source})(%|[a-z]+)`, "i"), Fi = /rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi, ze = /var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/, dn = (e) => {
|
|
531
531
|
const [t, n] = Ei(e);
|
|
532
|
-
if (!t ||
|
|
532
|
+
if (!t || yt())
|
|
533
533
|
return e;
|
|
534
534
|
const i = window.getComputedStyle(document.documentElement).getPropertyValue(t);
|
|
535
535
|
if (i)
|
|
@@ -538,18 +538,18 @@ var un = (e, t, n) => Object.defineProperty(e, t, {
|
|
|
538
538
|
const s = window.getComputedStyle(document.documentElement).getPropertyValue(n);
|
|
539
539
|
return s || e;
|
|
540
540
|
} else {
|
|
541
|
-
if (n &&
|
|
542
|
-
return
|
|
541
|
+
if (n && ze.test(n))
|
|
542
|
+
return dn(n);
|
|
543
543
|
if (n)
|
|
544
544
|
return n;
|
|
545
545
|
}
|
|
546
546
|
return e;
|
|
547
547
|
}, Ei = (e) => {
|
|
548
|
-
const t =
|
|
548
|
+
const t = ze.exec(e);
|
|
549
549
|
if (!t) return [,];
|
|
550
550
|
const [, n, i] = t;
|
|
551
551
|
return [n, i];
|
|
552
|
-
}, Ye, Vi = (e, t, n, i, s) => `rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(i)}, ${s})`,
|
|
552
|
+
}, Ye, Vi = (e, t, n, i, s) => `rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(i)}, ${s})`, fn = (e) => {
|
|
553
553
|
Ye || (Ye = Y ? (
|
|
554
554
|
// match color names, ignore partial matches
|
|
555
555
|
new RegExp(`(${Object.keys(Y).join("|")})(?!\\w)`, "g")
|
|
@@ -557,7 +557,7 @@ var un = (e, t, n) => Object.defineProperty(e, t, {
|
|
|
557
557
|
// never match
|
|
558
558
|
/^\b$/
|
|
559
559
|
));
|
|
560
|
-
const t = e.output.map((r) =>
|
|
560
|
+
const t = e.output.map((r) => U(r).replace(ze, dn).replace(ki, Ft).replace(Ye, Ft)), n = t.map((r) => r.match(Ee).map(Number)), s = n[0].map(
|
|
561
561
|
(r, a) => n.map((o) => {
|
|
562
562
|
if (!(a in o))
|
|
563
563
|
throw Error('The arity of each "output" value must be equal');
|
|
@@ -568,71 +568,71 @@ var un = (e, t, n) => Object.defineProperty(e, t, {
|
|
|
568
568
|
);
|
|
569
569
|
return (r) => {
|
|
570
570
|
var l;
|
|
571
|
-
const a = !
|
|
571
|
+
const a = !Vt.test(t[0]) && ((l = t.find((u) => Vt.test(u))) == null ? void 0 : l.replace(Ee, ""));
|
|
572
572
|
let o = 0;
|
|
573
573
|
return t[0].replace(
|
|
574
|
-
|
|
574
|
+
Ee,
|
|
575
575
|
() => `${s[o++](r)}${a || ""}`
|
|
576
576
|
).replace(Fi, Vi);
|
|
577
577
|
};
|
|
578
|
-
},
|
|
578
|
+
}, wt = "react-spring: ", hn = (e) => {
|
|
579
579
|
const t = e;
|
|
580
580
|
let n = !1;
|
|
581
581
|
if (typeof t != "function")
|
|
582
|
-
throw new TypeError(`${
|
|
582
|
+
throw new TypeError(`${wt}once requires a function parameter`);
|
|
583
583
|
return (...i) => {
|
|
584
584
|
n || (t(...i), n = !0);
|
|
585
585
|
};
|
|
586
|
-
},
|
|
587
|
-
function
|
|
588
|
-
|
|
589
|
-
`${
|
|
586
|
+
}, Ni = hn(console.warn);
|
|
587
|
+
function Di() {
|
|
588
|
+
Ni(
|
|
589
|
+
`${wt}The "interpolate" function is deprecated in v9 (use "to" instead)`
|
|
590
590
|
);
|
|
591
591
|
}
|
|
592
|
-
var Ui =
|
|
593
|
-
function
|
|
592
|
+
var Ui = hn(console.warn);
|
|
593
|
+
function ji() {
|
|
594
594
|
Ui(
|
|
595
|
-
`${
|
|
595
|
+
`${wt}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`
|
|
596
596
|
);
|
|
597
597
|
}
|
|
598
|
-
function
|
|
598
|
+
function Me(e) {
|
|
599
599
|
return c.str(e) && (e[0] == "#" || /\d/.test(e) || // Do not identify a CSS variable as an AnimatedString if its SSR
|
|
600
|
-
!
|
|
600
|
+
!yt() && ze.test(e) || e in (Y || {}));
|
|
601
601
|
}
|
|
602
|
-
var
|
|
603
|
-
const e =
|
|
604
|
-
return
|
|
602
|
+
var At = yt() ? Re : Fe, qi = () => {
|
|
603
|
+
const e = H(!1);
|
|
604
|
+
return At(() => (e.current = !0, () => {
|
|
605
605
|
e.current = !1;
|
|
606
606
|
}), []), e;
|
|
607
607
|
};
|
|
608
|
-
function
|
|
609
|
-
const e = ee()[1], t =
|
|
608
|
+
function mn() {
|
|
609
|
+
const e = ee()[1], t = qi();
|
|
610
610
|
return () => {
|
|
611
611
|
t.current && e(Math.random());
|
|
612
612
|
};
|
|
613
613
|
}
|
|
614
|
-
var
|
|
615
|
-
function
|
|
616
|
-
const t =
|
|
617
|
-
return
|
|
614
|
+
var pn = (e) => Re(e, Li), Li = [];
|
|
615
|
+
function Nt(e) {
|
|
616
|
+
const t = H(void 0);
|
|
617
|
+
return Re(() => {
|
|
618
618
|
t.current = e;
|
|
619
619
|
}), t.current;
|
|
620
620
|
}
|
|
621
|
-
var Ae = Symbol.for("Animated:node"),
|
|
621
|
+
var Ae = Symbol.for("Animated:node"), $i = (e) => !!e && e[Ae] === e, z = (e) => e && e[Ae], St = (e, t) => hi(e, Ae, t), Qe = (e) => e && e[Ae] && e[Ae].getPayload(), gn = class {
|
|
622
622
|
constructor() {
|
|
623
|
-
|
|
623
|
+
St(this, this);
|
|
624
624
|
}
|
|
625
625
|
/** Get every `AnimatedValue` used by this node. */
|
|
626
626
|
getPayload() {
|
|
627
627
|
return this.payload || [];
|
|
628
628
|
}
|
|
629
|
-
},
|
|
629
|
+
}, Be = class vn extends gn {
|
|
630
630
|
constructor(t) {
|
|
631
631
|
super(), this._value = t, this.done = !0, this.durationProgress = 0, c.num(this._value) && (this.lastPosition = this._value);
|
|
632
632
|
}
|
|
633
633
|
/** @internal */
|
|
634
634
|
static create(t) {
|
|
635
|
-
return new
|
|
635
|
+
return new vn(t);
|
|
636
636
|
}
|
|
637
637
|
getPayload() {
|
|
638
638
|
return [this];
|
|
@@ -647,7 +647,7 @@ var Ae = Symbol.for("Animated:node"), zi = (e) => !!e && e[Ae] === e, Q = (e) =>
|
|
|
647
647
|
const { done: t } = this;
|
|
648
648
|
this.done = !1, c.num(this._value) && (this.elapsedTime = 0, this.durationProgress = 0, this.lastPosition = this._value, t && (this.lastVelocity = null), this.v0 = null);
|
|
649
649
|
}
|
|
650
|
-
},
|
|
650
|
+
}, Ue = class yn extends Be {
|
|
651
651
|
constructor(t) {
|
|
652
652
|
super(0), this._string = null, this._toString = ye({
|
|
653
653
|
output: [t, t]
|
|
@@ -655,7 +655,7 @@ var Ae = Symbol.for("Animated:node"), zi = (e) => !!e && e[Ae] === e, Q = (e) =>
|
|
|
655
655
|
}
|
|
656
656
|
/** @internal */
|
|
657
657
|
static create(t) {
|
|
658
|
-
return new
|
|
658
|
+
return new yn(t);
|
|
659
659
|
}
|
|
660
660
|
getValue() {
|
|
661
661
|
const t = this._string;
|
|
@@ -677,14 +677,14 @@ var Ae = Symbol.for("Animated:node"), zi = (e) => !!e && e[Ae] === e, Q = (e) =>
|
|
|
677
677
|
output: [this.getValue(), t]
|
|
678
678
|
})), this._value = 0, super.reset();
|
|
679
679
|
}
|
|
680
|
-
}, je = { dependencies: null },
|
|
680
|
+
}, je = { dependencies: null }, Ge = class extends gn {
|
|
681
681
|
constructor(e) {
|
|
682
682
|
super(), this.source = e, this.setValue(e);
|
|
683
683
|
}
|
|
684
684
|
getValue(e) {
|
|
685
685
|
const t = {};
|
|
686
686
|
return B(this.source, (n, i) => {
|
|
687
|
-
|
|
687
|
+
$i(n) ? t[i] = n.getValue(e) : q(n) ? t[i] = U(n) : e || (t[i] = n);
|
|
688
688
|
}), t;
|
|
689
689
|
}
|
|
690
690
|
/** Replace the raw object data */
|
|
@@ -692,7 +692,7 @@ var Ae = Symbol.for("Animated:node"), zi = (e) => !!e && e[Ae] === e, Q = (e) =>
|
|
|
692
692
|
this.source = e, this.payload = this._makePayload(e);
|
|
693
693
|
}
|
|
694
694
|
reset() {
|
|
695
|
-
this.payload &&
|
|
695
|
+
this.payload && w(this.payload, (e) => e.reset());
|
|
696
696
|
}
|
|
697
697
|
/** Create a payload set. */
|
|
698
698
|
_makePayload(e) {
|
|
@@ -703,70 +703,70 @@ var Ae = Symbol.for("Animated:node"), zi = (e) => !!e && e[Ae] === e, Q = (e) =>
|
|
|
703
703
|
}
|
|
704
704
|
/** Add to a payload set. */
|
|
705
705
|
_addToPayload(e) {
|
|
706
|
-
je.dependencies &&
|
|
707
|
-
const t =
|
|
708
|
-
t &&
|
|
706
|
+
je.dependencies && q(e) && je.dependencies.add(e);
|
|
707
|
+
const t = Qe(e);
|
|
708
|
+
t && w(t, (n) => this.add(n));
|
|
709
709
|
}
|
|
710
|
-
},
|
|
710
|
+
}, zi = class bn extends Ge {
|
|
711
711
|
constructor(t) {
|
|
712
712
|
super(t);
|
|
713
713
|
}
|
|
714
714
|
/** @internal */
|
|
715
715
|
static create(t) {
|
|
716
|
-
return new
|
|
716
|
+
return new bn(t);
|
|
717
717
|
}
|
|
718
718
|
getValue() {
|
|
719
719
|
return this.source.map((t) => t.getValue());
|
|
720
720
|
}
|
|
721
721
|
setValue(t) {
|
|
722
722
|
const n = this.getPayload();
|
|
723
|
-
return t.length == n.length ? n.map((i, s) => i.setValue(t[s])).some(Boolean) : (super.setValue(t.map(
|
|
723
|
+
return t.length == n.length ? n.map((i, s) => i.setValue(t[s])).some(Boolean) : (super.setValue(t.map(Mi)), !0);
|
|
724
724
|
}
|
|
725
725
|
};
|
|
726
|
-
function
|
|
727
|
-
return (
|
|
726
|
+
function Mi(e) {
|
|
727
|
+
return (Me(e) ? Ue : Be).create(e);
|
|
728
728
|
}
|
|
729
729
|
function rt(e) {
|
|
730
|
-
const t =
|
|
731
|
-
return t ? t.constructor : c.arr(e) ?
|
|
730
|
+
const t = z(e);
|
|
731
|
+
return t ? t.constructor : c.arr(e) ? zi : Me(e) ? Ue : Be;
|
|
732
732
|
}
|
|
733
|
-
var
|
|
733
|
+
var Dt = (e, t) => {
|
|
734
734
|
const n = (
|
|
735
735
|
// Function components must use "forwardRef" to avoid being
|
|
736
736
|
// re-rendered on every animation frame.
|
|
737
737
|
!c.fun(e) || e.prototype && e.prototype.isReactComponent
|
|
738
738
|
);
|
|
739
|
-
return
|
|
740
|
-
const r =
|
|
739
|
+
return Xt((i, s) => {
|
|
740
|
+
const r = H(null), a = n && // eslint-disable-next-line react-hooks/rules-of-hooks
|
|
741
741
|
Xn(
|
|
742
742
|
(v) => {
|
|
743
743
|
r.current = Gi(s, v);
|
|
744
744
|
},
|
|
745
745
|
[s]
|
|
746
|
-
), [o, l] = Bi(i, t), u =
|
|
746
|
+
), [o, l] = Bi(i, t), u = mn(), m = () => {
|
|
747
747
|
const v = r.current;
|
|
748
748
|
if (n && !v)
|
|
749
749
|
return;
|
|
750
750
|
(v ? t.applyAnimatedValues(v, o.getValue(!0)) : !1) === !1 && u();
|
|
751
|
-
},
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
(v) => we(v,
|
|
756
|
-
),
|
|
757
|
-
})),
|
|
758
|
-
const v =
|
|
759
|
-
|
|
751
|
+
}, f = new Qi(m, l), h = H(void 0);
|
|
752
|
+
At(() => (h.current = f, w(l, (v) => oe(v, f)), () => {
|
|
753
|
+
h.current && (w(
|
|
754
|
+
h.current.deps,
|
|
755
|
+
(v) => we(v, h.current)
|
|
756
|
+
), b.cancel(h.current.update));
|
|
757
|
+
})), Re(m, []), pn(() => () => {
|
|
758
|
+
const v = h.current;
|
|
759
|
+
w(v.deps, (R) => we(R, v));
|
|
760
760
|
});
|
|
761
|
-
const
|
|
762
|
-
return /* @__PURE__ */
|
|
761
|
+
const g = t.getComponentProps(o.getValue());
|
|
762
|
+
return /* @__PURE__ */ Zt.createElement(e, { ...g, ref: a });
|
|
763
763
|
});
|
|
764
764
|
}, Qi = class {
|
|
765
765
|
constructor(e, t) {
|
|
766
766
|
this.update = e, this.deps = t;
|
|
767
767
|
}
|
|
768
768
|
eventObserved(e) {
|
|
769
|
-
e.type == "change" &&
|
|
769
|
+
e.type == "change" && b.write(this.update);
|
|
770
770
|
}
|
|
771
771
|
};
|
|
772
772
|
function Bi(e, t) {
|
|
@@ -774,14 +774,14 @@ function Bi(e, t) {
|
|
|
774
774
|
return je.dependencies = n, e.style && (e = {
|
|
775
775
|
...e,
|
|
776
776
|
style: t.createAnimatedStyle(e.style)
|
|
777
|
-
}), e = new
|
|
777
|
+
}), e = new Ge(e), je.dependencies = null, [e, n];
|
|
778
778
|
}
|
|
779
779
|
function Gi(e, t) {
|
|
780
780
|
return e && (c.fun(e) ? e(t) : e.current = t), t;
|
|
781
781
|
}
|
|
782
|
-
var
|
|
782
|
+
var Ut = Symbol.for("AnimatedComponent"), Hi = (e, {
|
|
783
783
|
applyAnimatedValues: t = () => !1,
|
|
784
|
-
createAnimatedStyle: n = (s) => new
|
|
784
|
+
createAnimatedStyle: n = (s) => new Ge(s),
|
|
785
785
|
getComponentProps: i = (s) => s
|
|
786
786
|
} = {}) => {
|
|
787
787
|
const s = {
|
|
@@ -789,19 +789,19 @@ var Dt = Symbol.for("AnimatedComponent"), Hi = (e, {
|
|
|
789
789
|
createAnimatedStyle: n,
|
|
790
790
|
getComponentProps: i
|
|
791
791
|
}, r = (a) => {
|
|
792
|
-
const o =
|
|
793
|
-
return c.str(a) ? a = r[a] || (r[a] =
|
|
792
|
+
const o = jt(a) || "Anonymous";
|
|
793
|
+
return c.str(a) ? a = r[a] || (r[a] = Dt(a, s)) : a = a[Ut] || (a[Ut] = Dt(a, s)), a.displayName = `Animated(${o})`, a;
|
|
794
794
|
};
|
|
795
795
|
return B(e, (a, o) => {
|
|
796
|
-
c.arr(e) && (o =
|
|
796
|
+
c.arr(e) && (o = jt(a)), r[o] = r(a);
|
|
797
797
|
}), {
|
|
798
798
|
animated: r
|
|
799
799
|
};
|
|
800
|
-
},
|
|
800
|
+
}, jt = (e) => c.str(e) ? e : e && c.str(e.displayName) ? e.displayName : c.fun(e) && e.name || null;
|
|
801
801
|
function te(e, ...t) {
|
|
802
802
|
return c.fun(e) ? e(...t) : e;
|
|
803
803
|
}
|
|
804
|
-
var ge = (e, t) => e === !0 || !!(t && e && (c.fun(e) ? e(t) :
|
|
804
|
+
var ge = (e, t) => e === !0 || !!(t && e && (c.fun(e) ? e(t) : j(e).includes(t))), _n = (e, t) => c.obj(e) ? t && e[t] : e, wn = (e, t) => e.default === !0 ? e[t] : e.default ? e.default[t] : void 0, Wi = (e) => e, Pt = (e, t = Wi) => {
|
|
805
805
|
let n = Ki;
|
|
806
806
|
e.default && e.default !== !0 && (e = e.default, n = Object.keys(e));
|
|
807
807
|
const i = {};
|
|
@@ -862,7 +862,7 @@ function Xi(e) {
|
|
|
862
862
|
}), n)
|
|
863
863
|
return t;
|
|
864
864
|
}
|
|
865
|
-
function
|
|
865
|
+
function An(e) {
|
|
866
866
|
const t = Xi(e);
|
|
867
867
|
if (t) {
|
|
868
868
|
const n = { to: t };
|
|
@@ -870,8 +870,8 @@ function _n(e) {
|
|
|
870
870
|
}
|
|
871
871
|
return { ...e };
|
|
872
872
|
}
|
|
873
|
-
function
|
|
874
|
-
return e =
|
|
873
|
+
function Se(e) {
|
|
874
|
+
return e = U(e), c.arr(e) ? e.map(Se) : Me(e) ? Q.createStringInterpolator({
|
|
875
875
|
range: [0, 1],
|
|
876
876
|
output: [e, e]
|
|
877
877
|
})(1) : e;
|
|
@@ -897,7 +897,7 @@ var ts = {
|
|
|
897
897
|
...ts.default,
|
|
898
898
|
mass: 1,
|
|
899
899
|
damping: 1,
|
|
900
|
-
easing:
|
|
900
|
+
easing: un.linear,
|
|
901
901
|
clamp: !1
|
|
902
902
|
}, ns = class {
|
|
903
903
|
constructor() {
|
|
@@ -905,14 +905,14 @@ var ts = {
|
|
|
905
905
|
}
|
|
906
906
|
};
|
|
907
907
|
function is(e, t, n) {
|
|
908
|
-
n && (n = { ...n },
|
|
908
|
+
n && (n = { ...n }, qt(n, t), t = { ...n, ...t }), qt(e, t), Object.assign(e, t);
|
|
909
909
|
for (const a in ot)
|
|
910
910
|
e[a] == null && (e[a] = ot[a]);
|
|
911
911
|
let { frequency: i, damping: s } = e;
|
|
912
912
|
const { mass: r } = e;
|
|
913
913
|
return c.und(i) || (i < 0.01 && (i = 0.01), s < 0 && (s = 0), e.tension = Math.pow(2 * Math.PI / i, 2) * r, e.friction = 4 * Math.PI * s * r / i), e;
|
|
914
914
|
}
|
|
915
|
-
function
|
|
915
|
+
function qt(e, t) {
|
|
916
916
|
if (!c.und(t.decay))
|
|
917
917
|
e.duration = void 0;
|
|
918
918
|
else {
|
|
@@ -920,46 +920,46 @@ function Ut(e, t) {
|
|
|
920
920
|
(n || !c.und(t.frequency) || !c.und(t.damping) || !c.und(t.mass)) && (e.duration = void 0, e.decay = void 0), n && (e.frequency = void 0);
|
|
921
921
|
}
|
|
922
922
|
}
|
|
923
|
-
var
|
|
923
|
+
var Lt = [], ss = class {
|
|
924
924
|
constructor() {
|
|
925
|
-
this.changed = !1, this.values =
|
|
925
|
+
this.changed = !1, this.values = Lt, this.toValues = null, this.fromValues = Lt, this.config = new ns(), this.immediate = !1;
|
|
926
926
|
}
|
|
927
927
|
};
|
|
928
|
-
function
|
|
928
|
+
function Sn(e, { key: t, props: n, defaultProps: i, state: s, actions: r }) {
|
|
929
929
|
return new Promise((a, o) => {
|
|
930
|
-
let l, u,
|
|
931
|
-
if (
|
|
932
|
-
|
|
930
|
+
let l, u, m = ge(n.cancel ?? (i == null ? void 0 : i.cancel), t);
|
|
931
|
+
if (m)
|
|
932
|
+
g();
|
|
933
933
|
else {
|
|
934
934
|
c.und(n.pause) || (s.paused = ge(n.pause, t));
|
|
935
935
|
let v = i == null ? void 0 : i.pause;
|
|
936
|
-
v !== !0 && (v = s.paused || ge(v, t)), l = te(n.delay || 0, t), v ? (s.resumeQueue.add(
|
|
936
|
+
v !== !0 && (v = s.paused || ge(v, t)), l = te(n.delay || 0, t), v ? (s.resumeQueue.add(h), r.pause()) : (r.resume(), h());
|
|
937
937
|
}
|
|
938
|
-
function
|
|
939
|
-
s.resumeQueue.add(
|
|
938
|
+
function f() {
|
|
939
|
+
s.resumeQueue.add(h), s.timeouts.delete(u), u.cancel(), l = u.time - b.now();
|
|
940
940
|
}
|
|
941
|
-
function
|
|
942
|
-
l > 0 && !
|
|
941
|
+
function h() {
|
|
942
|
+
l > 0 && !Q.skipAnimation ? (s.delayed = !0, u = b.setTimeout(g, l), s.pauseQueue.add(f), s.timeouts.add(u)) : g();
|
|
943
943
|
}
|
|
944
|
-
function
|
|
945
|
-
s.delayed && (s.delayed = !1), s.pauseQueue.delete(
|
|
944
|
+
function g() {
|
|
945
|
+
s.delayed && (s.delayed = !1), s.pauseQueue.delete(f), s.timeouts.delete(u), e <= (s.cancelId || 0) && (m = !0);
|
|
946
946
|
try {
|
|
947
|
-
r.start({ ...n, callId: e, cancel:
|
|
947
|
+
r.start({ ...n, callId: e, cancel: m }, a);
|
|
948
948
|
} catch (v) {
|
|
949
949
|
o(v);
|
|
950
950
|
}
|
|
951
951
|
}
|
|
952
952
|
});
|
|
953
953
|
}
|
|
954
|
-
var
|
|
954
|
+
var Rt = (e, t) => t.length == 1 ? t[0] : t.some((n) => n.cancelled) ? re(e.get()) : t.every((n) => n.noop) ? Pn(e.get()) : M(
|
|
955
955
|
e.get(),
|
|
956
956
|
t.every((n) => n.finished)
|
|
957
|
-
),
|
|
957
|
+
), Pn = (e) => ({
|
|
958
958
|
value: e,
|
|
959
959
|
noop: !0,
|
|
960
960
|
finished: !0,
|
|
961
961
|
cancelled: !1
|
|
962
|
-
}),
|
|
962
|
+
}), M = (e, t, n = !1) => ({
|
|
963
963
|
value: e,
|
|
964
964
|
finished: t,
|
|
965
965
|
cancelled: n
|
|
@@ -968,82 +968,84 @@ var Pt = (e, t) => t.length == 1 ? t[0] : t.some((n) => n.cancelled) ? re(e.get(
|
|
|
968
968
|
cancelled: !0,
|
|
969
969
|
finished: !1
|
|
970
970
|
});
|
|
971
|
-
function
|
|
971
|
+
function Rn(e, t, n, i) {
|
|
972
972
|
const { callId: s, parentId: r, onRest: a } = t, { asyncTo: o, promise: l } = n;
|
|
973
973
|
return !r && e === o && !t.reset ? l : n.promise = (async () => {
|
|
974
974
|
n.asyncId = s, n.asyncTo = e;
|
|
975
|
-
const u =
|
|
975
|
+
const u = Pt(
|
|
976
976
|
t,
|
|
977
|
-
(
|
|
977
|
+
(d, p) => (
|
|
978
978
|
// The `onRest` prop is only called when the `runAsync` promise is resolved.
|
|
979
|
-
|
|
979
|
+
p === "onRest" ? void 0 : d
|
|
980
980
|
)
|
|
981
981
|
);
|
|
982
|
-
let
|
|
983
|
-
const
|
|
984
|
-
(
|
|
985
|
-
),
|
|
986
|
-
const
|
|
982
|
+
let m, f;
|
|
983
|
+
const h = new Promise(
|
|
984
|
+
(d, p) => (m = d, f = p)
|
|
985
|
+
), g = (d) => {
|
|
986
|
+
const p = (
|
|
987
987
|
// The `cancel` prop or `stop` method was used.
|
|
988
988
|
s <= (n.cancelId || 0) && re(i) || // The async `to` prop was replaced.
|
|
989
|
-
s !== n.asyncId &&
|
|
989
|
+
s !== n.asyncId && M(i, !1)
|
|
990
990
|
);
|
|
991
|
-
if (
|
|
992
|
-
throw
|
|
993
|
-
}
|
|
994
|
-
|
|
991
|
+
if (p)
|
|
992
|
+
throw d.result = p, f(d), d;
|
|
993
|
+
};
|
|
994
|
+
let v = 0;
|
|
995
|
+
const R = 1024, A = (d, p) => {
|
|
996
|
+
const y = new $t(), P = new zt();
|
|
995
997
|
return (async () => {
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
998
|
+
g(y);
|
|
999
|
+
const S = c.obj(d) ? { ...d } : { ...p, to: d };
|
|
1000
|
+
if (S.parentId = s, B(u, (E, I) => {
|
|
1001
|
+
c.und(S[I]) && (S[I] = E);
|
|
1002
|
+
}), Q.skipAnimation) {
|
|
1003
|
+
if (++v > R)
|
|
1004
|
+
throw He(n), P.result = M(i, !1), f(P), P;
|
|
1005
|
+
return S.immediate = !0, await i.start(S);
|
|
1006
|
+
}
|
|
1007
|
+
const O = await i.start(S);
|
|
1008
|
+
return g(y), n.paused && await new Promise((E) => {
|
|
1005
1009
|
n.resumeQueue.add(E);
|
|
1006
|
-
}),
|
|
1010
|
+
}), O;
|
|
1007
1011
|
})();
|
|
1008
1012
|
};
|
|
1009
|
-
let
|
|
1010
|
-
if (L.skipAnimation)
|
|
1011
|
-
return Se(n), z(i, !1);
|
|
1013
|
+
let _;
|
|
1012
1014
|
try {
|
|
1013
|
-
let
|
|
1014
|
-
c.arr(e) ?
|
|
1015
|
-
for (const
|
|
1016
|
-
await
|
|
1017
|
-
})(e) :
|
|
1018
|
-
} catch (
|
|
1019
|
-
if (
|
|
1020
|
-
|
|
1021
|
-
else if (
|
|
1022
|
-
|
|
1015
|
+
let d;
|
|
1016
|
+
c.arr(e) ? d = (async (p) => {
|
|
1017
|
+
for (const y of p)
|
|
1018
|
+
await A(y);
|
|
1019
|
+
})(e) : d = Promise.resolve(e(A, i.stop.bind(i))), await Promise.all([d.then(m), h]), _ = M(i.get(), !0, !1);
|
|
1020
|
+
} catch (d) {
|
|
1021
|
+
if (d instanceof $t)
|
|
1022
|
+
_ = d.result;
|
|
1023
|
+
else if (d instanceof zt)
|
|
1024
|
+
_ = d.result;
|
|
1023
1025
|
else
|
|
1024
|
-
throw
|
|
1026
|
+
throw d;
|
|
1025
1027
|
} finally {
|
|
1026
1028
|
s == n.asyncId && (n.asyncId = r, n.asyncTo = r ? o : void 0, n.promise = r ? l : void 0);
|
|
1027
1029
|
}
|
|
1028
|
-
return c.fun(a) &&
|
|
1029
|
-
a(
|
|
1030
|
-
}),
|
|
1030
|
+
return c.fun(a) && b.batchedUpdates(() => {
|
|
1031
|
+
a(_, i, i.item);
|
|
1032
|
+
}), _;
|
|
1031
1033
|
})();
|
|
1032
1034
|
}
|
|
1033
|
-
function
|
|
1035
|
+
function He(e, t) {
|
|
1034
1036
|
me(e.timeouts, (n) => n.cancel()), e.pauseQueue.clear(), e.resumeQueue.clear(), e.asyncId = e.asyncTo = e.promise = void 0, t && (e.cancelId = t);
|
|
1035
1037
|
}
|
|
1036
|
-
var
|
|
1038
|
+
var $t = class extends Error {
|
|
1037
1039
|
constructor() {
|
|
1038
1040
|
super(
|
|
1039
1041
|
"An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise."
|
|
1040
1042
|
);
|
|
1041
1043
|
}
|
|
1042
|
-
},
|
|
1044
|
+
}, zt = class extends Error {
|
|
1043
1045
|
constructor() {
|
|
1044
1046
|
super("SkipAnimationSignal");
|
|
1045
1047
|
}
|
|
1046
|
-
}, ut = (e) => e instanceof
|
|
1048
|
+
}, ut = (e) => e instanceof It, rs = 1, It = class extends cn {
|
|
1047
1049
|
constructor() {
|
|
1048
1050
|
super(...arguments), this.id = rs++, this._priority = 0;
|
|
1049
1051
|
}
|
|
@@ -1055,16 +1057,16 @@ var jt = class extends Error {
|
|
|
1055
1057
|
}
|
|
1056
1058
|
/** Get the current value */
|
|
1057
1059
|
get() {
|
|
1058
|
-
const e =
|
|
1060
|
+
const e = z(this);
|
|
1059
1061
|
return e && e.getValue();
|
|
1060
1062
|
}
|
|
1061
1063
|
/** Create a spring that maps our value to another value */
|
|
1062
1064
|
to(...e) {
|
|
1063
|
-
return
|
|
1065
|
+
return Q.to(this, e);
|
|
1064
1066
|
}
|
|
1065
1067
|
/** @deprecated Use the `to` method instead. */
|
|
1066
1068
|
interpolate(...e) {
|
|
1067
|
-
return
|
|
1069
|
+
return Di(), Q.to(this, e);
|
|
1068
1070
|
}
|
|
1069
1071
|
toJSON() {
|
|
1070
1072
|
return this.get();
|
|
@@ -1092,13 +1094,13 @@ var jt = class extends Error {
|
|
|
1092
1094
|
}
|
|
1093
1095
|
/** Tell our children about our new priority */
|
|
1094
1096
|
_onPriorityChange(e) {
|
|
1095
|
-
this.idle ||
|
|
1097
|
+
this.idle || Le.sort(this), _e(this, {
|
|
1096
1098
|
type: "priority",
|
|
1097
1099
|
parent: this,
|
|
1098
1100
|
priority: e
|
|
1099
1101
|
});
|
|
1100
1102
|
}
|
|
1101
|
-
}, ne = Symbol.for("SpringPhase"),
|
|
1103
|
+
}, ne = Symbol.for("SpringPhase"), In = 1, ct = 2, lt = 4, Je = (e) => (e[ne] & In) > 0, K = (e) => (e[ne] & ct) > 0, le = (e) => (e[ne] & lt) > 0, Mt = (e, t) => t ? e[ne] |= ct | In : e[ne] &= ~ct, Qt = (e, t) => t ? e[ne] |= lt : e[ne] &= ~lt, as = class extends It {
|
|
1102
1104
|
constructor(e, t) {
|
|
1103
1105
|
if (super(), this.animation = new ss(), this.defaultProps = {}, this._state = {
|
|
1104
1106
|
paused: !1,
|
|
@@ -1113,14 +1115,14 @@ var jt = class extends Error {
|
|
|
1113
1115
|
}
|
|
1114
1116
|
/** Equals true when not advancing on each frame. */
|
|
1115
1117
|
get idle() {
|
|
1116
|
-
return !(
|
|
1118
|
+
return !(K(this) || this._state.asyncTo) || le(this);
|
|
1117
1119
|
}
|
|
1118
1120
|
get goal() {
|
|
1119
|
-
return
|
|
1121
|
+
return U(this.animation.to);
|
|
1120
1122
|
}
|
|
1121
1123
|
get velocity() {
|
|
1122
|
-
const e =
|
|
1123
|
-
return e instanceof
|
|
1124
|
+
const e = z(this);
|
|
1125
|
+
return e instanceof Be ? e.lastVelocity || 0 : e.getPayload().map((t) => t.lastVelocity || 0);
|
|
1124
1126
|
}
|
|
1125
1127
|
/**
|
|
1126
1128
|
* When true, this value has been animated at least once.
|
|
@@ -1133,7 +1135,7 @@ var jt = class extends Error {
|
|
|
1133
1135
|
* which is either active or paused.
|
|
1134
1136
|
*/
|
|
1135
1137
|
get isAnimating() {
|
|
1136
|
-
return
|
|
1138
|
+
return K(this);
|
|
1137
1139
|
}
|
|
1138
1140
|
/**
|
|
1139
1141
|
* When true, all current and future animations are paused.
|
|
@@ -1153,55 +1155,55 @@ var jt = class extends Error {
|
|
|
1153
1155
|
let t = !0, n = !1;
|
|
1154
1156
|
const i = this.animation;
|
|
1155
1157
|
let { toValues: s } = i;
|
|
1156
|
-
const { config: r } = i, a =
|
|
1157
|
-
!a &&
|
|
1158
|
+
const { config: r } = i, a = Qe(i.to);
|
|
1159
|
+
!a && q(i.to) && (s = j(U(i.to))), i.values.forEach((u, m) => {
|
|
1158
1160
|
if (u.done) return;
|
|
1159
|
-
const
|
|
1161
|
+
const f = (
|
|
1160
1162
|
// Animated strings always go from 0 to 1.
|
|
1161
|
-
u.constructor ==
|
|
1163
|
+
u.constructor == Ue ? 1 : a ? a[m].lastPosition : s[m]
|
|
1162
1164
|
);
|
|
1163
|
-
let
|
|
1164
|
-
if (!
|
|
1165
|
-
if (
|
|
1165
|
+
let h = i.immediate, g = f;
|
|
1166
|
+
if (!h) {
|
|
1167
|
+
if (g = u.lastPosition, r.tension <= 0) {
|
|
1166
1168
|
u.done = !0;
|
|
1167
1169
|
return;
|
|
1168
1170
|
}
|
|
1169
1171
|
let v = u.elapsedTime += e;
|
|
1170
|
-
const
|
|
1171
|
-
let
|
|
1172
|
-
const
|
|
1172
|
+
const R = i.fromValues[m], A = u.v0 != null ? u.v0 : u.v0 = c.arr(r.velocity) ? r.velocity[m] : r.velocity;
|
|
1173
|
+
let _;
|
|
1174
|
+
const d = r.precision || (R == f ? 5e-3 : Math.min(1, Math.abs(f - R) * 1e-3));
|
|
1173
1175
|
if (c.und(r.duration))
|
|
1174
1176
|
if (r.decay) {
|
|
1175
|
-
const
|
|
1176
|
-
|
|
1177
|
+
const p = r.decay === !0 ? 0.998 : r.decay, y = Math.exp(-(1 - p) * v);
|
|
1178
|
+
g = R + A / (1 - p) * (1 - y), h = Math.abs(u.lastPosition - g) <= d, _ = A * y;
|
|
1177
1179
|
} else {
|
|
1178
|
-
|
|
1179
|
-
const
|
|
1180
|
-
let
|
|
1181
|
-
const
|
|
1182
|
-
for (let
|
|
1183
|
-
|
|
1184
|
-
const
|
|
1185
|
-
|
|
1180
|
+
_ = u.lastVelocity == null ? A : u.lastVelocity;
|
|
1181
|
+
const p = r.restVelocity || d / 10, y = r.clamp ? 0 : r.bounce, P = !c.und(y), S = R == f ? u.v0 > 0 : R < f;
|
|
1182
|
+
let O, E = !1;
|
|
1183
|
+
const I = 1, N = Math.ceil(e / I);
|
|
1184
|
+
for (let C = 0; C < N && (O = Math.abs(_) > p, !(!O && (h = Math.abs(f - g) <= d, h))); ++C) {
|
|
1185
|
+
P && (E = g == f || g > f == S, E && (_ = -_ * y, g = f));
|
|
1186
|
+
const F = -r.tension * 1e-6 * (g - f), T = -r.friction * 1e-3 * _, D = (F + T) / r.mass;
|
|
1187
|
+
_ = _ + D * I, g = g + _ * I;
|
|
1186
1188
|
}
|
|
1187
1189
|
}
|
|
1188
1190
|
else {
|
|
1189
|
-
let
|
|
1190
|
-
r.duration > 0 && (this._memoizedDuration !== r.duration && (this._memoizedDuration = r.duration, u.durationProgress > 0 && (u.elapsedTime = r.duration * u.durationProgress, v = u.elapsedTime += e)),
|
|
1191
|
+
let p = 1;
|
|
1192
|
+
r.duration > 0 && (this._memoizedDuration !== r.duration && (this._memoizedDuration = r.duration, u.durationProgress > 0 && (u.elapsedTime = r.duration * u.durationProgress, v = u.elapsedTime += e)), p = (r.progress || 0) + v / this._memoizedDuration, p = p > 1 ? 1 : p < 0 ? 0 : p, u.durationProgress = p), g = R + r.easing(p) * (f - R), _ = (g - u.lastPosition) / e, h = p == 1;
|
|
1191
1193
|
}
|
|
1192
|
-
u.lastVelocity =
|
|
1194
|
+
u.lastVelocity = _, Number.isNaN(g) && (console.warn("Got NaN while animating:", this), h = !0);
|
|
1193
1195
|
}
|
|
1194
|
-
a && !a[
|
|
1196
|
+
a && !a[m].done && (h = !1), h ? u.done = !0 : t = !1, u.setValue(g, r.round) && (n = !0);
|
|
1195
1197
|
});
|
|
1196
|
-
const o =
|
|
1198
|
+
const o = z(this), l = o.getValue();
|
|
1197
1199
|
if (t) {
|
|
1198
|
-
const u =
|
|
1200
|
+
const u = U(i.to);
|
|
1199
1201
|
(l !== u || n) && !r.decay ? (o.setValue(u), this._onChange(u)) : n && r.decay && this._onChange(l), this._stop();
|
|
1200
1202
|
} else n && this._onChange(l);
|
|
1201
1203
|
}
|
|
1202
1204
|
/** Set the current value, while stopping the current animation */
|
|
1203
1205
|
set(e) {
|
|
1204
|
-
return
|
|
1206
|
+
return b.batchedUpdates(() => {
|
|
1205
1207
|
this._stop(), this._focus(e), this._set(e);
|
|
1206
1208
|
}), this;
|
|
1207
1209
|
}
|
|
@@ -1218,9 +1220,9 @@ var jt = class extends Error {
|
|
|
1218
1220
|
}
|
|
1219
1221
|
/** Skip to the end of the current animation. */
|
|
1220
1222
|
finish() {
|
|
1221
|
-
if (
|
|
1223
|
+
if (K(this)) {
|
|
1222
1224
|
const { to: e, config: t } = this.animation;
|
|
1223
|
-
|
|
1225
|
+
b.batchedUpdates(() => {
|
|
1224
1226
|
this._onStart(), t.decay || this._set(e, !1), this._stop();
|
|
1225
1227
|
});
|
|
1226
1228
|
}
|
|
@@ -1234,7 +1236,7 @@ var jt = class extends Error {
|
|
|
1234
1236
|
let n;
|
|
1235
1237
|
return c.und(e) ? (n = this.queue || [], this.queue = []) : n = [c.obj(e) ? e : { ...t, to: e }], Promise.all(
|
|
1236
1238
|
n.map((i) => this._update(i))
|
|
1237
|
-
).then((i) =>
|
|
1239
|
+
).then((i) => Rt(this, i));
|
|
1238
1240
|
}
|
|
1239
1241
|
/**
|
|
1240
1242
|
* Stop the current animation, and cancel any delayed updates.
|
|
@@ -1243,7 +1245,7 @@ var jt = class extends Error {
|
|
|
1243
1245
|
*/
|
|
1244
1246
|
stop(e) {
|
|
1245
1247
|
const { to: t } = this.animation;
|
|
1246
|
-
return this._focus(this.get()),
|
|
1248
|
+
return c.und(t) || this._focus(this.get()), He(this._state, e && this._lastCallId), b.batchedUpdates(() => this._stop(t, e)), this;
|
|
1247
1249
|
}
|
|
1248
1250
|
/** Restart the animation. */
|
|
1249
1251
|
reset() {
|
|
@@ -1264,43 +1266,43 @@ var jt = class extends Error {
|
|
|
1264
1266
|
let { to: n, from: i } = e;
|
|
1265
1267
|
n = c.obj(n) ? n[t] : n, (n == null || at(n)) && (n = void 0), i = c.obj(i) ? i[t] : i, i == null && (i = void 0);
|
|
1266
1268
|
const s = { to: n, from: i };
|
|
1267
|
-
return Je(this) || (e.reverse && ([n, i] = [i, n]), i =
|
|
1269
|
+
return Je(this) || (e.reverse && ([n, i] = [i, n]), i = U(i), c.und(i) ? z(this) || this._set(n) : this._set(i)), s;
|
|
1268
1270
|
}
|
|
1269
1271
|
/** Every update is processed by this method before merging. */
|
|
1270
1272
|
_update({ ...e }, t) {
|
|
1271
1273
|
const { key: n, defaultProps: i } = this;
|
|
1272
1274
|
e.default && Object.assign(
|
|
1273
1275
|
i,
|
|
1274
|
-
|
|
1276
|
+
Pt(
|
|
1275
1277
|
e,
|
|
1276
|
-
(a, o) => /^on/.test(o) ?
|
|
1278
|
+
(a, o) => /^on/.test(o) ? _n(a, n) : a
|
|
1277
1279
|
)
|
|
1278
|
-
),
|
|
1280
|
+
), Gt(this, e, "onProps"), fe(this, "onProps", e, this);
|
|
1279
1281
|
const s = this._prepareNode(e);
|
|
1280
1282
|
if (Object.isFrozen(this))
|
|
1281
1283
|
throw Error(
|
|
1282
1284
|
"Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?"
|
|
1283
1285
|
);
|
|
1284
1286
|
const r = this._state;
|
|
1285
|
-
return
|
|
1287
|
+
return Sn(++this._lastCallId, {
|
|
1286
1288
|
key: n,
|
|
1287
1289
|
props: e,
|
|
1288
1290
|
defaultProps: i,
|
|
1289
1291
|
state: r,
|
|
1290
1292
|
actions: {
|
|
1291
1293
|
pause: () => {
|
|
1292
|
-
le(this) || (
|
|
1294
|
+
le(this) || (Qt(this, !0), he(r.pauseQueue), fe(
|
|
1293
1295
|
this,
|
|
1294
1296
|
"onPause",
|
|
1295
|
-
|
|
1297
|
+
M(this, de(this, this.animation.to)),
|
|
1296
1298
|
this
|
|
1297
1299
|
));
|
|
1298
1300
|
},
|
|
1299
1301
|
resume: () => {
|
|
1300
|
-
le(this) && (
|
|
1302
|
+
le(this) && (Qt(this, !1), K(this) && this._resume(), he(r.resumeQueue), fe(
|
|
1301
1303
|
this,
|
|
1302
1304
|
"onResume",
|
|
1303
|
-
|
|
1305
|
+
M(this, de(this, this.animation.to)),
|
|
1304
1306
|
this
|
|
1305
1307
|
));
|
|
1306
1308
|
},
|
|
@@ -1308,7 +1310,7 @@ var jt = class extends Error {
|
|
|
1308
1310
|
}
|
|
1309
1311
|
}).then((a) => {
|
|
1310
1312
|
if (e.loop && a.finished && !(t && a.noop)) {
|
|
1311
|
-
const o =
|
|
1313
|
+
const o = Cn(e);
|
|
1312
1314
|
if (o)
|
|
1313
1315
|
return this._update(o, !0);
|
|
1314
1316
|
}
|
|
@@ -1326,92 +1328,92 @@ var jt = class extends Error {
|
|
|
1326
1328
|
else
|
|
1327
1329
|
return n(re(this));
|
|
1328
1330
|
const { key: r, defaultProps: a, animation: o } = this, { to: l, from: u } = o;
|
|
1329
|
-
let { to:
|
|
1330
|
-
s && !i && (!t.default || c.und(
|
|
1331
|
-
const
|
|
1332
|
-
|
|
1333
|
-
const
|
|
1334
|
-
|
|
1335
|
-
const v = at(t.to), { config:
|
|
1336
|
-
(i || s) && (
|
|
1337
|
-
|
|
1331
|
+
let { to: m = l, from: f = u } = e;
|
|
1332
|
+
s && !i && (!t.default || c.und(m)) && (m = f), t.reverse && ([m, f] = [f, m]);
|
|
1333
|
+
const h = !G(f, u);
|
|
1334
|
+
h && (o.from = f), f = U(f);
|
|
1335
|
+
const g = !G(m, l);
|
|
1336
|
+
g && this._focus(m);
|
|
1337
|
+
const v = at(t.to), { config: R } = o, { decay: A, velocity: _ } = R;
|
|
1338
|
+
(i || s) && (R.velocity = 0), t.config && !v && is(
|
|
1339
|
+
R,
|
|
1338
1340
|
te(t.config, r),
|
|
1339
1341
|
// Avoid calling the same "config" prop twice.
|
|
1340
1342
|
t.config !== a.config ? te(a.config, r) : void 0
|
|
1341
1343
|
);
|
|
1342
|
-
let
|
|
1343
|
-
if (!
|
|
1344
|
-
return n(
|
|
1345
|
-
const
|
|
1344
|
+
let d = z(this);
|
|
1345
|
+
if (!d || c.und(m))
|
|
1346
|
+
return n(M(this, !0));
|
|
1347
|
+
const p = (
|
|
1346
1348
|
// When `reset` is undefined, the `from` prop implies `reset: true`,
|
|
1347
1349
|
// except for declarative updates. When `reset` is defined, there
|
|
1348
1350
|
// must exist a value to animate from.
|
|
1349
|
-
c.und(t.reset) ? s && !t.default : !c.und(
|
|
1350
|
-
),
|
|
1351
|
-
if (
|
|
1352
|
-
const
|
|
1353
|
-
if (
|
|
1354
|
-
if (
|
|
1355
|
-
|
|
1351
|
+
c.und(t.reset) ? s && !t.default : !c.und(f) && ge(t.reset, r)
|
|
1352
|
+
), y = p ? f : this.get(), P = Se(m), S = c.num(P) || c.arr(P) || Me(P), O = !v && (!S || ge(a.immediate || t.immediate, r));
|
|
1353
|
+
if (g) {
|
|
1354
|
+
const C = rt(m);
|
|
1355
|
+
if (C !== d.constructor)
|
|
1356
|
+
if (O)
|
|
1357
|
+
d = this._set(P);
|
|
1356
1358
|
else
|
|
1357
1359
|
throw Error(
|
|
1358
|
-
`Cannot animate between ${
|
|
1360
|
+
`Cannot animate between ${d.constructor.name} and ${C.name}, as the "to" prop suggests`
|
|
1359
1361
|
);
|
|
1360
1362
|
}
|
|
1361
|
-
const
|
|
1362
|
-
let
|
|
1363
|
-
if (!
|
|
1364
|
-
const
|
|
1365
|
-
(
|
|
1363
|
+
const E = d.constructor;
|
|
1364
|
+
let I = q(m), N = !1;
|
|
1365
|
+
if (!I) {
|
|
1366
|
+
const C = p || !Je(this) && h;
|
|
1367
|
+
(g || C) && (N = G(Se(y), P), I = !N), (!G(o.immediate, O) && !O || !G(R.decay, A) || !G(R.velocity, _)) && (I = !0);
|
|
1366
1368
|
}
|
|
1367
|
-
if (
|
|
1368
|
-
const { onRest:
|
|
1369
|
-
|
|
1370
|
-
const
|
|
1371
|
-
he(this._pendingCalls,
|
|
1369
|
+
if (N && K(this) && (o.changed && !p ? I = !0 : I || this._stop(l)), !v && ((I || q(l)) && (o.values = d.getPayload(), o.toValues = q(m) ? null : E == Ue ? [1] : j(P)), o.immediate != O && (o.immediate = O, !O && !p && this._set(l)), I)) {
|
|
1370
|
+
const { onRest: C } = o;
|
|
1371
|
+
w(us, (T) => Gt(this, t, T));
|
|
1372
|
+
const F = M(this, de(this, l));
|
|
1373
|
+
he(this._pendingCalls, F), this._pendingCalls.add(n), o.changed && b.batchedUpdates(() => {
|
|
1372
1374
|
var T;
|
|
1373
|
-
o.changed = !
|
|
1375
|
+
o.changed = !p, C == null || C(F, this), p ? te(a.onRest, F) : (T = o.onStart) == null || T.call(o, F, this);
|
|
1374
1376
|
});
|
|
1375
1377
|
}
|
|
1376
|
-
|
|
1378
|
+
p && this._set(y), v ? n(Rn(t.to, t, this._state, this)) : I ? this._start() : K(this) && !g ? this._pendingCalls.add(n) : n(Pn(y));
|
|
1377
1379
|
}
|
|
1378
1380
|
/** Update the `animation.to` value, which might be a `FluidValue` */
|
|
1379
1381
|
_focus(e) {
|
|
1380
1382
|
const t = this.animation;
|
|
1381
|
-
e !== t.to && (
|
|
1383
|
+
e !== t.to && (Et(this) && this._detach(), t.to = e, Et(this) && this._attach());
|
|
1382
1384
|
}
|
|
1383
1385
|
_attach() {
|
|
1384
1386
|
let e = 0;
|
|
1385
1387
|
const { to: t } = this.animation;
|
|
1386
|
-
|
|
1388
|
+
q(t) && (oe(t, this), ut(t) && (e = t.priority + 1)), this.priority = e;
|
|
1387
1389
|
}
|
|
1388
1390
|
_detach() {
|
|
1389
1391
|
const { to: e } = this.animation;
|
|
1390
|
-
|
|
1392
|
+
q(e) && we(e, this);
|
|
1391
1393
|
}
|
|
1392
1394
|
/**
|
|
1393
1395
|
* Update the current value from outside the frameloop,
|
|
1394
1396
|
* and return the `Animated` node.
|
|
1395
1397
|
*/
|
|
1396
1398
|
_set(e, t = !0) {
|
|
1397
|
-
const n =
|
|
1399
|
+
const n = U(e);
|
|
1398
1400
|
if (!c.und(n)) {
|
|
1399
|
-
const i =
|
|
1401
|
+
const i = z(this);
|
|
1400
1402
|
if (!i || !G(n, i.getValue())) {
|
|
1401
1403
|
const s = rt(n);
|
|
1402
|
-
!i || i.constructor != s ?
|
|
1404
|
+
!i || i.constructor != s ? St(this, s.create(n)) : i.setValue(n), i && b.batchedUpdates(() => {
|
|
1403
1405
|
this._onChange(n, t);
|
|
1404
1406
|
});
|
|
1405
1407
|
}
|
|
1406
1408
|
}
|
|
1407
|
-
return
|
|
1409
|
+
return z(this);
|
|
1408
1410
|
}
|
|
1409
1411
|
_onStart() {
|
|
1410
1412
|
const e = this.animation;
|
|
1411
1413
|
e.changed || (e.changed = !0, fe(
|
|
1412
1414
|
this,
|
|
1413
1415
|
"onStart",
|
|
1414
|
-
|
|
1416
|
+
M(this, de(this, e.to)),
|
|
1415
1417
|
this
|
|
1416
1418
|
));
|
|
1417
1419
|
}
|
|
@@ -1423,10 +1425,10 @@ var jt = class extends Error {
|
|
|
1423
1425
|
// is added to the frameloop.
|
|
1424
1426
|
_start() {
|
|
1425
1427
|
const e = this.animation;
|
|
1426
|
-
|
|
1428
|
+
z(this).reset(U(e.to)), e.immediate || (e.fromValues = e.values.map((t) => t.lastPosition)), K(this) || (Mt(this, !0), le(this) || this._resume());
|
|
1427
1429
|
}
|
|
1428
1430
|
_resume() {
|
|
1429
|
-
|
|
1431
|
+
Q.skipAnimation ? this.finish() : Le.start(this);
|
|
1430
1432
|
}
|
|
1431
1433
|
/**
|
|
1432
1434
|
* Exit the frameloop and notify `onRest` listeners.
|
|
@@ -1434,29 +1436,29 @@ var jt = class extends Error {
|
|
|
1434
1436
|
* Always wrap `_stop` calls with `batchedUpdates`.
|
|
1435
1437
|
*/
|
|
1436
1438
|
_stop(e, t) {
|
|
1437
|
-
if (
|
|
1438
|
-
|
|
1439
|
+
if (K(this)) {
|
|
1440
|
+
Mt(this, !1);
|
|
1439
1441
|
const n = this.animation;
|
|
1440
|
-
|
|
1442
|
+
w(n.values, (s) => {
|
|
1441
1443
|
s.done = !0;
|
|
1442
1444
|
}), n.toValues && (n.onChange = n.onPause = n.onResume = void 0), _e(this, {
|
|
1443
1445
|
type: "idle",
|
|
1444
1446
|
parent: this
|
|
1445
1447
|
});
|
|
1446
|
-
const i = t ? re(this.get()) :
|
|
1448
|
+
const i = t ? re(this.get()) : M(this.get(), de(this, e ?? n.to));
|
|
1447
1449
|
he(this._pendingCalls, i), n.changed && (n.changed = !1, fe(this, "onRest", i, this));
|
|
1448
1450
|
}
|
|
1449
1451
|
}
|
|
1450
1452
|
};
|
|
1451
1453
|
function de(e, t) {
|
|
1452
|
-
const n =
|
|
1454
|
+
const n = Se(t), i = Se(e.get());
|
|
1453
1455
|
return G(i, n);
|
|
1454
1456
|
}
|
|
1455
|
-
function
|
|
1457
|
+
function Cn(e, t = e.loop, n = e.to) {
|
|
1456
1458
|
const i = te(t);
|
|
1457
1459
|
if (i) {
|
|
1458
|
-
const s = i !== !0 &&
|
|
1459
|
-
return
|
|
1460
|
+
const s = i !== !0 && An(i), r = (s || e).reverse, a = !s || s.reset;
|
|
1461
|
+
return Pe({
|
|
1460
1462
|
...e,
|
|
1461
1463
|
loop: t,
|
|
1462
1464
|
// Avoid updating default props when looping.
|
|
@@ -1476,15 +1478,15 @@ function xn(e, t = e.loop, n = e.to) {
|
|
|
1476
1478
|
});
|
|
1477
1479
|
}
|
|
1478
1480
|
}
|
|
1479
|
-
function
|
|
1480
|
-
const { to: t, from: n } = e =
|
|
1481
|
-
return c.obj(t) &&
|
|
1481
|
+
function Pe(e) {
|
|
1482
|
+
const { to: t, from: n } = e = An(e), i = /* @__PURE__ */ new Set();
|
|
1483
|
+
return c.obj(t) && Bt(t, i), c.obj(n) && Bt(n, i), e.keys = i.size ? Array.from(i) : null, e;
|
|
1482
1484
|
}
|
|
1483
1485
|
function os(e) {
|
|
1484
|
-
const t =
|
|
1485
|
-
return c.und(t.default) && (t.default =
|
|
1486
|
+
const t = Pe(e);
|
|
1487
|
+
return c.und(t.default) && (t.default = Pt(t)), t;
|
|
1486
1488
|
}
|
|
1487
|
-
function
|
|
1489
|
+
function Bt(e, t) {
|
|
1488
1490
|
B(e, (n, i) => n != null && t.add(i));
|
|
1489
1491
|
}
|
|
1490
1492
|
var us = [
|
|
@@ -1494,8 +1496,8 @@ var us = [
|
|
|
1494
1496
|
"onPause",
|
|
1495
1497
|
"onResume"
|
|
1496
1498
|
];
|
|
1497
|
-
function
|
|
1498
|
-
e.animation[n] = t[n] !==
|
|
1499
|
+
function Gt(e, t, n) {
|
|
1500
|
+
e.animation[n] = t[n] !== wn(t, n) ? _n(t[n], e.key) : void 0;
|
|
1499
1501
|
}
|
|
1500
1502
|
function fe(e, t, ...n) {
|
|
1501
1503
|
var i, s, r, a;
|
|
@@ -1541,7 +1543,7 @@ var cs = ["onStart", "onChange", "onRest"], ls = 1, ds = class {
|
|
|
1541
1543
|
}
|
|
1542
1544
|
/** Push an update onto the queue of each value. */
|
|
1543
1545
|
update(e) {
|
|
1544
|
-
return e && this.queue.push(
|
|
1546
|
+
return e && this.queue.push(Pe(e)), this;
|
|
1545
1547
|
}
|
|
1546
1548
|
/**
|
|
1547
1549
|
* Start the queued animations for every spring, and resolve the returned
|
|
@@ -1552,15 +1554,15 @@ var cs = ["onStart", "onChange", "onRest"], ls = 1, ds = class {
|
|
|
1552
1554
|
*/
|
|
1553
1555
|
start(e) {
|
|
1554
1556
|
let { queue: t } = this;
|
|
1555
|
-
return e ? t =
|
|
1557
|
+
return e ? t = j(e).map(Pe) : this.queue = [], this._flush ? this._flush(this, t) : (Fn(this, t), dt(this, t));
|
|
1556
1558
|
}
|
|
1557
1559
|
/** @internal */
|
|
1558
1560
|
stop(e, t) {
|
|
1559
1561
|
if (e !== !!e && (t = e), t) {
|
|
1560
1562
|
const n = this.springs;
|
|
1561
|
-
|
|
1563
|
+
w(j(t), (i) => n[i].stop(!!e));
|
|
1562
1564
|
} else
|
|
1563
|
-
|
|
1565
|
+
He(this._state, this._lastAsyncId), this.each((n) => n.stop(!!e));
|
|
1564
1566
|
return this;
|
|
1565
1567
|
}
|
|
1566
1568
|
/** Freeze the active animation in time */
|
|
@@ -1569,7 +1571,7 @@ var cs = ["onStart", "onChange", "onRest"], ls = 1, ds = class {
|
|
|
1569
1571
|
this.start({ pause: !0 });
|
|
1570
1572
|
else {
|
|
1571
1573
|
const t = this.springs;
|
|
1572
|
-
|
|
1574
|
+
w(j(e), (n) => t[n].pause());
|
|
1573
1575
|
}
|
|
1574
1576
|
return this;
|
|
1575
1577
|
}
|
|
@@ -1579,7 +1581,7 @@ var cs = ["onStart", "onChange", "onRest"], ls = 1, ds = class {
|
|
|
1579
1581
|
this.start({ pause: !1 });
|
|
1580
1582
|
else {
|
|
1581
1583
|
const t = this.springs;
|
|
1582
|
-
|
|
1584
|
+
w(j(e), (n) => t[n].resume());
|
|
1583
1585
|
}
|
|
1584
1586
|
return this;
|
|
1585
1587
|
}
|
|
@@ -1587,6 +1589,18 @@ var cs = ["onStart", "onChange", "onRest"], ls = 1, ds = class {
|
|
|
1587
1589
|
each(e) {
|
|
1588
1590
|
B(this.springs, e);
|
|
1589
1591
|
}
|
|
1592
|
+
/**
|
|
1593
|
+
* Subscribe to loop iteration restarts on this controller. Returns an
|
|
1594
|
+
* unsubscribe function. Listeners fire synchronously inside `flushUpdate`
|
|
1595
|
+
* just before the next iteration is dispatched.
|
|
1596
|
+
* @internal
|
|
1597
|
+
*/
|
|
1598
|
+
onLoopReset(e) {
|
|
1599
|
+
const t = this._onLoopReset ?? (this._onLoopReset = /* @__PURE__ */ new Set());
|
|
1600
|
+
return t.add(e), () => {
|
|
1601
|
+
t.delete(e);
|
|
1602
|
+
};
|
|
1603
|
+
}
|
|
1590
1604
|
/** @internal Called at the end of every animation frame */
|
|
1591
1605
|
_onFrame() {
|
|
1592
1606
|
const { onStart: e, onChange: t, onRest: n } = this._events, i = this._active.size > 0, s = this._changed.size > 0;
|
|
@@ -1607,71 +1621,72 @@ var cs = ["onStart", "onChange", "onRest"], ls = 1, ds = class {
|
|
|
1607
1621
|
else if (e.type == "idle")
|
|
1608
1622
|
this._active.delete(e.parent);
|
|
1609
1623
|
else return;
|
|
1610
|
-
|
|
1624
|
+
b.onFrame(this._onFrame);
|
|
1611
1625
|
}
|
|
1612
1626
|
};
|
|
1613
|
-
function
|
|
1614
|
-
return Promise.all(t.map((n) =>
|
|
1615
|
-
(n) =>
|
|
1627
|
+
function dt(e, t) {
|
|
1628
|
+
return Promise.all(t.map((n) => xn(e, n))).then(
|
|
1629
|
+
(n) => Rt(e, n)
|
|
1616
1630
|
);
|
|
1617
1631
|
}
|
|
1618
|
-
async function
|
|
1632
|
+
async function xn(e, t, n) {
|
|
1633
|
+
var R;
|
|
1619
1634
|
const { keys: i, to: s, from: r, loop: a, onRest: o, onResolve: l } = t, u = c.obj(t.default) && t.default;
|
|
1620
1635
|
a && (t.loop = !1), s === !1 && (t.to = null), r === !1 && (t.from = null);
|
|
1621
|
-
const
|
|
1622
|
-
|
|
1623
|
-
const
|
|
1624
|
-
if (c.fun(
|
|
1625
|
-
const
|
|
1626
|
-
t[
|
|
1627
|
-
const P =
|
|
1628
|
-
P ? (
|
|
1636
|
+
const m = c.arr(s) || c.fun(s) ? s : void 0;
|
|
1637
|
+
m ? (t.to = void 0, t.onRest = void 0, u && (u.onRest = void 0)) : w(cs, (A) => {
|
|
1638
|
+
const _ = t[A];
|
|
1639
|
+
if (c.fun(_)) {
|
|
1640
|
+
const d = e._events[A];
|
|
1641
|
+
t[A] = ({ finished: p, cancelled: y }) => {
|
|
1642
|
+
const P = d.get(_);
|
|
1643
|
+
P ? (p || (P.finished = !1), y && (P.cancelled = !0)) : d.set(_, {
|
|
1629
1644
|
value: null,
|
|
1630
|
-
finished:
|
|
1645
|
+
finished: p || !1,
|
|
1631
1646
|
cancelled: y || !1
|
|
1632
1647
|
});
|
|
1633
|
-
}, u && (u[
|
|
1648
|
+
}, u && (u[A] = t[A]);
|
|
1634
1649
|
}
|
|
1635
1650
|
});
|
|
1636
|
-
const
|
|
1637
|
-
t.pause === !
|
|
1638
|
-
const
|
|
1639
|
-
(
|
|
1640
|
-
),
|
|
1641
|
-
(
|
|
1642
|
-
|
|
1651
|
+
const f = e._state;
|
|
1652
|
+
t.pause === !f.paused ? (f.paused = t.pause, he(t.pause ? f.pauseQueue : f.resumeQueue)) : f.paused && (t.pause = !0);
|
|
1653
|
+
const h = (i || Object.keys(e.springs)).map(
|
|
1654
|
+
(A) => e.springs[A].start(t)
|
|
1655
|
+
), g = t.cancel === !0 || wn(t, "cancel") === !0;
|
|
1656
|
+
(m || g && f.asyncId) && h.push(
|
|
1657
|
+
Sn(++e._lastAsyncId, {
|
|
1643
1658
|
props: t,
|
|
1644
|
-
state:
|
|
1659
|
+
state: f,
|
|
1645
1660
|
actions: {
|
|
1646
1661
|
pause: it,
|
|
1647
1662
|
resume: it,
|
|
1648
|
-
start(
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1663
|
+
start(A, _) {
|
|
1664
|
+
g ? (He(f, e._lastAsyncId), _(re(e))) : (A.onRest = o, _(
|
|
1665
|
+
Rn(
|
|
1666
|
+
m,
|
|
1667
|
+
A,
|
|
1668
|
+
f,
|
|
1654
1669
|
e
|
|
1655
1670
|
)
|
|
1656
1671
|
));
|
|
1657
1672
|
}
|
|
1658
1673
|
}
|
|
1659
1674
|
})
|
|
1660
|
-
),
|
|
1661
|
-
|
|
1675
|
+
), f.paused && await new Promise((A) => {
|
|
1676
|
+
f.resumeQueue.add(A);
|
|
1662
1677
|
});
|
|
1663
|
-
const v =
|
|
1678
|
+
const v = Rt(e, await Promise.all(h));
|
|
1664
1679
|
if (a && v.finished && !(n && v.noop)) {
|
|
1665
|
-
const
|
|
1666
|
-
if (
|
|
1667
|
-
return Fn(e, [
|
|
1680
|
+
const A = Cn(t, a, s);
|
|
1681
|
+
if (A)
|
|
1682
|
+
return (R = e._onLoopReset) == null || R.forEach((_) => _()), Fn(e, [A]), xn(e, A, !0);
|
|
1668
1683
|
}
|
|
1669
|
-
return l &&
|
|
1684
|
+
return l && b.batchedUpdates(() => l(v, e, e.item)), v;
|
|
1670
1685
|
}
|
|
1671
|
-
function
|
|
1686
|
+
function Ht(e, t) {
|
|
1672
1687
|
const n = { ...e.springs };
|
|
1673
|
-
return t &&
|
|
1674
|
-
c.und(i.keys) && (i =
|
|
1688
|
+
return t && w(j(t), (i) => {
|
|
1689
|
+
c.und(i.keys) && (i = Pe(i)), c.obj(i.to) || (i = { ...i, to: void 0 }), kn(n, i, (s) => On(s));
|
|
1675
1690
|
}), Tn(e, n), n;
|
|
1676
1691
|
}
|
|
1677
1692
|
function Tn(e, t) {
|
|
@@ -1679,28 +1694,28 @@ function Tn(e, t) {
|
|
|
1679
1694
|
e.springs[i] || (e.springs[i] = n, oe(n, e));
|
|
1680
1695
|
});
|
|
1681
1696
|
}
|
|
1682
|
-
function
|
|
1697
|
+
function On(e, t) {
|
|
1683
1698
|
const n = new as();
|
|
1684
1699
|
return n.key = e, t && oe(n, t), n;
|
|
1685
1700
|
}
|
|
1686
|
-
function
|
|
1687
|
-
t.keys &&
|
|
1701
|
+
function kn(e, t, n) {
|
|
1702
|
+
t.keys && w(t.keys, (i) => {
|
|
1688
1703
|
(e[i] || (e[i] = n(i)))._prepareNode(t);
|
|
1689
1704
|
});
|
|
1690
1705
|
}
|
|
1691
1706
|
function Fn(e, t) {
|
|
1692
|
-
|
|
1693
|
-
|
|
1707
|
+
w(t, (n) => {
|
|
1708
|
+
kn(e.springs, n, (i) => On(i, e));
|
|
1694
1709
|
});
|
|
1695
1710
|
}
|
|
1696
|
-
var fs =
|
|
1711
|
+
var fs = Zt.createContext({
|
|
1697
1712
|
pause: !1,
|
|
1698
1713
|
immediate: !1
|
|
1699
1714
|
}), hs = () => {
|
|
1700
1715
|
const e = [], t = function(i) {
|
|
1701
|
-
|
|
1716
|
+
ji();
|
|
1702
1717
|
const s = [];
|
|
1703
|
-
return
|
|
1718
|
+
return w(e, (r, a) => {
|
|
1704
1719
|
if (c.und(i))
|
|
1705
1720
|
s.push(r.start());
|
|
1706
1721
|
else {
|
|
@@ -1715,17 +1730,17 @@ var fs = Wt.createContext({
|
|
|
1715
1730
|
const s = e.indexOf(i);
|
|
1716
1731
|
~s && e.splice(s, 1);
|
|
1717
1732
|
}, t.pause = function() {
|
|
1718
|
-
return
|
|
1733
|
+
return w(e, (i) => i.pause(...arguments)), this;
|
|
1719
1734
|
}, t.resume = function() {
|
|
1720
|
-
return
|
|
1735
|
+
return w(e, (i) => i.resume(...arguments)), this;
|
|
1721
1736
|
}, t.set = function(i) {
|
|
1722
|
-
|
|
1737
|
+
w(e, (s, r) => {
|
|
1723
1738
|
const a = c.fun(i) ? i(r, s) : i;
|
|
1724
1739
|
a && s.set(a);
|
|
1725
1740
|
});
|
|
1726
1741
|
}, t.start = function(i) {
|
|
1727
1742
|
const s = [];
|
|
1728
|
-
return
|
|
1743
|
+
return w(e, (r, a) => {
|
|
1729
1744
|
if (c.und(i))
|
|
1730
1745
|
s.push(r.start());
|
|
1731
1746
|
else {
|
|
@@ -1734,9 +1749,9 @@ var fs = Wt.createContext({
|
|
|
1734
1749
|
}
|
|
1735
1750
|
}), s;
|
|
1736
1751
|
}, t.stop = function() {
|
|
1737
|
-
return
|
|
1752
|
+
return w(e, (i) => i.stop(...arguments)), this;
|
|
1738
1753
|
}, t.update = function(i) {
|
|
1739
|
-
return
|
|
1754
|
+
return w(e, (s, r) => s.update(this._getProps(i, s, r))), this;
|
|
1740
1755
|
};
|
|
1741
1756
|
const n = function(i, s, r) {
|
|
1742
1757
|
return c.fun(i) ? i(r, s) : i;
|
|
@@ -1749,50 +1764,57 @@ function ms(e, t, n) {
|
|
|
1749
1764
|
const s = Oe(
|
|
1750
1765
|
() => i || arguments.length == 3 ? hs() : void 0,
|
|
1751
1766
|
[]
|
|
1752
|
-
), r =
|
|
1767
|
+
), r = H(0), a = mn(), o = Oe(
|
|
1753
1768
|
() => ({
|
|
1754
1769
|
ctrls: [],
|
|
1755
1770
|
queue: [],
|
|
1756
|
-
flush(
|
|
1757
|
-
const y =
|
|
1758
|
-
return r.current > 0 && !o.queue.length && !Object.keys(y).some((S) => !
|
|
1759
|
-
Tn(
|
|
1760
|
-
S(
|
|
1771
|
+
flush(d, p) {
|
|
1772
|
+
const y = Ht(d, p);
|
|
1773
|
+
return r.current > 0 && !o.queue.length && !Object.keys(y).some((S) => !d.springs[S]) ? dt(d, p) : new Promise((S) => {
|
|
1774
|
+
Tn(d, y), o.queue.push(() => {
|
|
1775
|
+
S(dt(d, p));
|
|
1761
1776
|
}), a();
|
|
1762
1777
|
});
|
|
1763
1778
|
}
|
|
1764
1779
|
}),
|
|
1765
1780
|
[]
|
|
1766
|
-
), l =
|
|
1781
|
+
), l = H([...o.ctrls]), u = H([]), m = H([]);
|
|
1782
|
+
m.current = [];
|
|
1783
|
+
const f = Nt(e) || 0;
|
|
1767
1784
|
Oe(() => {
|
|
1768
|
-
|
|
1769
|
-
Ji(
|
|
1770
|
-
}), l.current.length = e,
|
|
1785
|
+
w(l.current.slice(e, f), (d) => {
|
|
1786
|
+
Ji(d, s), d.stop(!0);
|
|
1787
|
+
}), l.current.length = e, h(f, e);
|
|
1771
1788
|
}, [e]), Oe(() => {
|
|
1772
|
-
|
|
1789
|
+
h(0, Math.min(f, e));
|
|
1773
1790
|
}, n);
|
|
1774
|
-
function d
|
|
1775
|
-
for (let y =
|
|
1791
|
+
function h(d, p) {
|
|
1792
|
+
for (let y = d; y < p; y++) {
|
|
1776
1793
|
const P = l.current[y] || (l.current[y] = new ds(null, o.flush)), S = i ? i(y, P) : t[y];
|
|
1777
1794
|
S && (u.current[y] = os(S));
|
|
1778
1795
|
}
|
|
1779
1796
|
}
|
|
1780
|
-
const
|
|
1781
|
-
(
|
|
1782
|
-
),
|
|
1783
|
-
|
|
1797
|
+
const g = l.current.map(
|
|
1798
|
+
(d, p) => Ht(d, u.current[p])
|
|
1799
|
+
), v = Yn(fs), R = Nt(v), A = v !== R && Yi(v);
|
|
1800
|
+
At(() => {
|
|
1784
1801
|
r.current++, o.ctrls = l.current;
|
|
1785
|
-
const { queue:
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1802
|
+
const { queue: d } = o;
|
|
1803
|
+
d.length && (o.queue = [], w(d, (y) => y()));
|
|
1804
|
+
const p = u.current.length > 0 ? u.current : m.current;
|
|
1805
|
+
w(l.current, (y, P) => {
|
|
1806
|
+
s == null || s.add(y), A && y.start({ default: v });
|
|
1807
|
+
const S = p[P];
|
|
1808
|
+
S && (es(y, S.ref), y.ref ? y.queue.push({
|
|
1809
|
+
...S,
|
|
1810
|
+
default: c.obj(S.default) ? { ...S.default } : S.default
|
|
1811
|
+
}) : y.start(S));
|
|
1812
|
+
}), u.current.length > 0 && (m.current = u.current), u.current = [];
|
|
1813
|
+
}), pn(() => () => {
|
|
1814
|
+
w(o.ctrls, (d) => d.stop(!0));
|
|
1793
1815
|
});
|
|
1794
|
-
const
|
|
1795
|
-
return s ? [
|
|
1816
|
+
const _ = g.map((d) => ({ ...d }));
|
|
1817
|
+
return s ? [_, s] : _;
|
|
1796
1818
|
}
|
|
1797
1819
|
function ps(e, t) {
|
|
1798
1820
|
const n = c.fun(e), [[i], s] = ms(
|
|
@@ -1802,41 +1824,41 @@ function ps(e, t) {
|
|
|
1802
1824
|
);
|
|
1803
1825
|
return n || arguments.length == 2 ? [i, s] : i;
|
|
1804
1826
|
}
|
|
1805
|
-
var gs = class extends
|
|
1827
|
+
var gs = class extends It {
|
|
1806
1828
|
constructor(e, t) {
|
|
1807
1829
|
super(), this.source = e, this.idle = !0, this._active = /* @__PURE__ */ new Set(), this.calc = ye(...t);
|
|
1808
1830
|
const n = this._get(), i = rt(n);
|
|
1809
|
-
|
|
1831
|
+
St(this, i.create(n));
|
|
1810
1832
|
}
|
|
1811
1833
|
advance(e) {
|
|
1812
1834
|
const t = this._get(), n = this.get();
|
|
1813
|
-
G(t, n) || (
|
|
1835
|
+
G(t, n) || (z(this).setValue(t), this._onChange(t, this.idle)), !this.idle && Wt(this._active) && et(this);
|
|
1814
1836
|
}
|
|
1815
1837
|
_get() {
|
|
1816
|
-
const e = c.arr(this.source) ? this.source.map(
|
|
1838
|
+
const e = c.arr(this.source) ? this.source.map(U) : j(U(this.source));
|
|
1817
1839
|
return this.calc(...e);
|
|
1818
1840
|
}
|
|
1819
1841
|
_start() {
|
|
1820
|
-
this.idle && !
|
|
1842
|
+
this.idle && !Wt(this._active) && (this.idle = !1, w(Qe(this), (e) => {
|
|
1821
1843
|
e.done = !1;
|
|
1822
|
-
}),
|
|
1844
|
+
}), Q.skipAnimation ? (b.batchedUpdates(() => this.advance()), et(this)) : Le.start(this));
|
|
1823
1845
|
}
|
|
1824
1846
|
// Observe our sources only when we're observed.
|
|
1825
1847
|
_attach() {
|
|
1826
1848
|
let e = 1;
|
|
1827
|
-
|
|
1828
|
-
|
|
1849
|
+
w(j(this.source), (t) => {
|
|
1850
|
+
q(t) && oe(t, this), ut(t) && (t.idle || this._active.add(t), e = Math.max(e, t.priority + 1));
|
|
1829
1851
|
}), this.priority = e, this._start();
|
|
1830
1852
|
}
|
|
1831
1853
|
// Stop observing our sources once we have no observers.
|
|
1832
1854
|
_detach() {
|
|
1833
|
-
|
|
1834
|
-
|
|
1855
|
+
w(j(this.source), (e) => {
|
|
1856
|
+
q(e) && we(e, this);
|
|
1835
1857
|
}), this._active.clear(), et(this);
|
|
1836
1858
|
}
|
|
1837
1859
|
/** @internal */
|
|
1838
1860
|
eventObserved(e) {
|
|
1839
|
-
e.type == "change" ? e.idle ? this.advance() : (this._active.add(e.parent), this._start()) : e.type == "idle" ? this._active.delete(e.parent) : e.type == "priority" && (this.priority =
|
|
1861
|
+
e.type == "change" ? e.idle ? this.advance() : (this._active.add(e.parent), this._start()) : e.type == "idle" ? this._active.delete(e.parent) : e.type == "priority" && (this.priority = j(this.source).reduce(
|
|
1840
1862
|
(t, n) => Math.max(t, (ut(n) ? n.priority : 0) + 1),
|
|
1841
1863
|
0
|
|
1842
1864
|
));
|
|
@@ -1845,26 +1867,26 @@ var gs = class extends St {
|
|
|
1845
1867
|
function vs(e) {
|
|
1846
1868
|
return e.idle !== !1;
|
|
1847
1869
|
}
|
|
1848
|
-
function
|
|
1870
|
+
function Wt(e) {
|
|
1849
1871
|
return !e.size || Array.from(e).every(vs);
|
|
1850
1872
|
}
|
|
1851
1873
|
function et(e) {
|
|
1852
|
-
e.idle || (e.idle = !0,
|
|
1874
|
+
e.idle || (e.idle = !0, w(Qe(e), (t) => {
|
|
1853
1875
|
t.done = !0;
|
|
1854
1876
|
}), _e(e, {
|
|
1855
1877
|
type: "idle",
|
|
1856
1878
|
parent: e
|
|
1857
1879
|
}));
|
|
1858
1880
|
}
|
|
1859
|
-
|
|
1860
|
-
createStringInterpolator:
|
|
1881
|
+
Q.assign({
|
|
1882
|
+
createStringInterpolator: fn,
|
|
1861
1883
|
to: (e, t) => new gs(e, t)
|
|
1862
1884
|
});
|
|
1863
1885
|
var En = /^--/;
|
|
1864
1886
|
function ys(e, t) {
|
|
1865
1887
|
return t == null || typeof t == "boolean" || t === "" ? "" : typeof t == "number" && t !== 0 && !En.test(e) && !(ve.hasOwnProperty(e) && ve[e]) ? t + "px" : ("" + t).trim();
|
|
1866
1888
|
}
|
|
1867
|
-
var
|
|
1889
|
+
var Kt = {};
|
|
1868
1890
|
function bs(e, t) {
|
|
1869
1891
|
if (!e.nodeType || !e.setAttribute)
|
|
1870
1892
|
return !1;
|
|
@@ -1876,21 +1898,21 @@ function bs(e, t) {
|
|
|
1876
1898
|
scrollLeft: o,
|
|
1877
1899
|
viewBox: l,
|
|
1878
1900
|
...u
|
|
1879
|
-
} = t,
|
|
1880
|
-
(
|
|
1901
|
+
} = t, m = Object.values(u), f = Object.keys(u).map(
|
|
1902
|
+
(h) => n || e.hasAttribute(h) ? h : Kt[h] || (Kt[h] = h.replace(
|
|
1881
1903
|
/([A-Z])/g,
|
|
1882
1904
|
// Attributes are written in dash case
|
|
1883
|
-
(
|
|
1905
|
+
(g) => "-" + g.toLowerCase()
|
|
1884
1906
|
))
|
|
1885
1907
|
);
|
|
1886
1908
|
r !== void 0 && (e.textContent = r);
|
|
1887
|
-
for (const
|
|
1888
|
-
if (s.hasOwnProperty(
|
|
1889
|
-
const
|
|
1890
|
-
En.test(
|
|
1909
|
+
for (const h in s)
|
|
1910
|
+
if (s.hasOwnProperty(h)) {
|
|
1911
|
+
const g = ys(h, s[h]);
|
|
1912
|
+
En.test(h) ? e.style.setProperty(h, g) : e.style[h] = g;
|
|
1891
1913
|
}
|
|
1892
|
-
|
|
1893
|
-
e.setAttribute(
|
|
1914
|
+
f.forEach((h, g) => {
|
|
1915
|
+
e.setAttribute(h, m[g]);
|
|
1894
1916
|
}), i !== void 0 && (e.className = i), a !== void 0 && (e.scrollTop = a), o !== void 0 && (e.scrollLeft = o), l !== void 0 && e.setAttribute("viewBox", l);
|
|
1895
1917
|
}
|
|
1896
1918
|
var ve = {
|
|
@@ -1938,32 +1960,32 @@ var ve = {
|
|
|
1938
1960
|
strokeWidth: !0
|
|
1939
1961
|
}, _s = (e, t) => e + t.charAt(0).toUpperCase() + t.substring(1), ws = ["Webkit", "Ms", "Moz", "O"];
|
|
1940
1962
|
ve = Object.keys(ve).reduce((e, t) => (ws.forEach((n) => e[_s(n, t)] = e[t]), e), ve);
|
|
1941
|
-
var As = /^(matrix|translate|scale|rotate|skew)/,
|
|
1963
|
+
var As = /^(matrix|translate|scale|rotate|skew)/, Ss = /^(translate)/, Ps = /^(rotate|skew)/, tt = (e, t) => c.num(e) && e !== 0 ? e + t : e, Ve = (e, t) => c.arr(e) ? e.every((n) => Ve(n, t)) : c.num(e) ? e === t : parseFloat(e) === t, Rs = class extends Ge {
|
|
1942
1964
|
constructor({ x: e, y: t, z: n, ...i }) {
|
|
1943
1965
|
const s = [], r = [];
|
|
1944
1966
|
(e || t || n) && (s.push([e || 0, t || 0, n || 0]), r.push((a) => [
|
|
1945
1967
|
`translate3d(${a.map((o) => tt(o, "px")).join(",")})`,
|
|
1946
1968
|
// prettier-ignore
|
|
1947
|
-
|
|
1969
|
+
Ve(a, 0)
|
|
1948
1970
|
])), B(i, (a, o) => {
|
|
1949
1971
|
if (o === "transform")
|
|
1950
1972
|
s.push([a || ""]), r.push((l) => [l, l === ""]);
|
|
1951
1973
|
else if (As.test(o)) {
|
|
1952
1974
|
if (delete i[o], c.und(a)) return;
|
|
1953
|
-
const l =
|
|
1954
|
-
s.push(
|
|
1955
|
-
o === "rotate3d" ? ([u,
|
|
1956
|
-
`rotate3d(${u},${
|
|
1957
|
-
|
|
1975
|
+
const l = Ss.test(o) ? "px" : Ps.test(o) ? "deg" : "";
|
|
1976
|
+
s.push(j(a)), r.push(
|
|
1977
|
+
o === "rotate3d" ? ([u, m, f, h]) => [
|
|
1978
|
+
`rotate3d(${u},${m},${f},${tt(h, l)})`,
|
|
1979
|
+
Ve(h, 0)
|
|
1958
1980
|
] : (u) => [
|
|
1959
|
-
`${o}(${u.map((
|
|
1960
|
-
|
|
1981
|
+
`${o}(${u.map((m) => tt(m, l)).join(",")})`,
|
|
1982
|
+
Ve(u, o.startsWith("scale") ? 1 : 0)
|
|
1961
1983
|
]
|
|
1962
1984
|
);
|
|
1963
1985
|
}
|
|
1964
1986
|
}), s.length && (i.transform = new Is(s, r)), super(i);
|
|
1965
1987
|
}
|
|
1966
|
-
}, Is = class extends
|
|
1988
|
+
}, Is = class extends cn {
|
|
1967
1989
|
constructor(e, t) {
|
|
1968
1990
|
super(), this.inputs = e, this.transforms = t, this._value = null;
|
|
1969
1991
|
}
|
|
@@ -1972,37 +1994,37 @@ var As = /^(matrix|translate|scale|rotate|skew)/, Ps = /^(translate)/, Ss = /^(r
|
|
|
1972
1994
|
}
|
|
1973
1995
|
_get() {
|
|
1974
1996
|
let e = "", t = !0;
|
|
1975
|
-
return
|
|
1976
|
-
const s =
|
|
1977
|
-
c.arr(s) ? s : n.map(
|
|
1997
|
+
return w(this.inputs, (n, i) => {
|
|
1998
|
+
const s = U(n[0]), [r, a] = this.transforms[i](
|
|
1999
|
+
c.arr(s) ? s : n.map(U)
|
|
1978
2000
|
);
|
|
1979
2001
|
e += " " + r, t = t && a;
|
|
1980
2002
|
}), t ? "none" : e;
|
|
1981
2003
|
}
|
|
1982
2004
|
// Start observing our inputs once we have an observer.
|
|
1983
2005
|
observerAdded(e) {
|
|
1984
|
-
e == 1 &&
|
|
2006
|
+
e == 1 && w(
|
|
1985
2007
|
this.inputs,
|
|
1986
|
-
(t) =>
|
|
2008
|
+
(t) => w(
|
|
1987
2009
|
t,
|
|
1988
|
-
(n) =>
|
|
2010
|
+
(n) => q(n) && oe(n, this)
|
|
1989
2011
|
)
|
|
1990
2012
|
);
|
|
1991
2013
|
}
|
|
1992
2014
|
// Stop observing our inputs once we have no observers.
|
|
1993
2015
|
observerRemoved(e) {
|
|
1994
|
-
e == 0 &&
|
|
2016
|
+
e == 0 && w(
|
|
1995
2017
|
this.inputs,
|
|
1996
|
-
(t) =>
|
|
2018
|
+
(t) => w(
|
|
1997
2019
|
t,
|
|
1998
|
-
(n) =>
|
|
2020
|
+
(n) => q(n) && we(n, this)
|
|
1999
2021
|
)
|
|
2000
2022
|
);
|
|
2001
2023
|
}
|
|
2002
2024
|
eventObserved(e) {
|
|
2003
2025
|
e.type == "change" && (this._value = null), _e(this, e);
|
|
2004
2026
|
}
|
|
2005
|
-
},
|
|
2027
|
+
}, Cs = [
|
|
2006
2028
|
"a",
|
|
2007
2029
|
"abbr",
|
|
2008
2030
|
"address",
|
|
@@ -2138,20 +2160,20 @@ var As = /^(matrix|translate|scale|rotate|skew)/, Ps = /^(translate)/, Ss = /^(r
|
|
|
2138
2160
|
"text",
|
|
2139
2161
|
"tspan"
|
|
2140
2162
|
];
|
|
2141
|
-
|
|
2163
|
+
Q.assign({
|
|
2142
2164
|
batchedUpdates: ni,
|
|
2143
|
-
createStringInterpolator:
|
|
2165
|
+
createStringInterpolator: fn,
|
|
2144
2166
|
colors: vi
|
|
2145
2167
|
});
|
|
2146
|
-
var
|
|
2168
|
+
var xs = Hi(Cs, {
|
|
2147
2169
|
applyAnimatedValues: bs,
|
|
2148
2170
|
createAnimatedStyle: (e) => new Rs(e),
|
|
2149
2171
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2150
2172
|
getComponentProps: ({ scrollTop: e, scrollLeft: t, ...n }) => n
|
|
2151
|
-
}), Ts =
|
|
2152
|
-
const
|
|
2153
|
-
content:
|
|
2154
|
-
},
|
|
2173
|
+
}), Ts = xs.animated;
|
|
2174
|
+
const Os = "_content_f2h52_1", ks = {
|
|
2175
|
+
content: Os
|
|
2176
|
+
}, ft = "ContextMenu.Content", Fs = Xt((e, t) => {
|
|
2155
2177
|
const {
|
|
2156
2178
|
style: n,
|
|
2157
2179
|
className: i,
|
|
@@ -2159,115 +2181,115 @@ const ks = "_content_f2h52_1", Os = {
|
|
|
2159
2181
|
alignOffset: r,
|
|
2160
2182
|
arrowPadding: a = 5,
|
|
2161
2183
|
collisionBoundary: o,
|
|
2162
|
-
direction: l =
|
|
2184
|
+
direction: l = V.DOWN_RIGHT,
|
|
2163
2185
|
disableAutoPositioning: u = !1,
|
|
2164
|
-
disableRepositioning:
|
|
2165
|
-
onMouseEnter:
|
|
2166
|
-
onMouseLeave:
|
|
2167
|
-
onKeyDown:
|
|
2186
|
+
disableRepositioning: m = !1,
|
|
2187
|
+
onMouseEnter: f,
|
|
2188
|
+
onMouseLeave: h,
|
|
2189
|
+
onKeyDown: g,
|
|
2168
2190
|
onPointerDownOutside: v,
|
|
2169
|
-
onEscapeKeyDown:
|
|
2170
|
-
onCloseAutoFocus:
|
|
2171
|
-
onOpenAutoFocus:
|
|
2172
|
-
onFocusOutside:
|
|
2173
|
-
...
|
|
2174
|
-
} = e, [
|
|
2175
|
-
triggerRef:
|
|
2176
|
-
contentRef:
|
|
2177
|
-
isOpen:
|
|
2178
|
-
isAnimatedOpen:
|
|
2179
|
-
skipAnimation:
|
|
2180
|
-
animationDuration:
|
|
2191
|
+
onEscapeKeyDown: R,
|
|
2192
|
+
onCloseAutoFocus: A,
|
|
2193
|
+
onOpenAutoFocus: _,
|
|
2194
|
+
onFocusOutside: d,
|
|
2195
|
+
...p
|
|
2196
|
+
} = e, [y, P] = ee(null), S = () => !1, {
|
|
2197
|
+
triggerRef: O,
|
|
2198
|
+
contentRef: E,
|
|
2199
|
+
isOpen: I,
|
|
2200
|
+
isAnimatedOpen: N,
|
|
2201
|
+
skipAnimation: C,
|
|
2202
|
+
animationDuration: F,
|
|
2181
2203
|
mode: T,
|
|
2182
2204
|
isRootContentBlocked: D,
|
|
2183
2205
|
isChildOpen: k,
|
|
2184
|
-
shouldCloseCurrentMenuOnSelect:
|
|
2185
|
-
closeMenuImmediately:
|
|
2206
|
+
shouldCloseCurrentMenuOnSelect: xe,
|
|
2207
|
+
closeMenuImmediately: Te,
|
|
2186
2208
|
onContentEnter: ue,
|
|
2187
|
-
onContentLeave:
|
|
2209
|
+
onContentLeave: W,
|
|
2188
2210
|
onChildOpen: Vn,
|
|
2189
|
-
itemWithFocusedInput:
|
|
2190
|
-
setItemWithFocusedInput:
|
|
2211
|
+
itemWithFocusedInput: Nn,
|
|
2212
|
+
setItemWithFocusedInput: Dn,
|
|
2191
2213
|
shouldPreventFocusRestore: We,
|
|
2192
2214
|
setOnFocusOutside: J,
|
|
2193
2215
|
isChildAiming: Un,
|
|
2194
|
-
onChildAiming:
|
|
2195
|
-
} = ai(
|
|
2216
|
+
onChildAiming: jn
|
|
2217
|
+
} = ai(ft), { align: qn, offset: Ln, isPositioned: Ct } = Es({
|
|
2196
2218
|
direction: l,
|
|
2197
2219
|
alignOffset: r,
|
|
2198
2220
|
disableAutoPositioning: u,
|
|
2199
|
-
triggerRef:
|
|
2200
|
-
contentRef:
|
|
2221
|
+
triggerRef: O,
|
|
2222
|
+
contentRef: E,
|
|
2201
2223
|
collisionBoundary: o,
|
|
2202
2224
|
children: s,
|
|
2203
|
-
disableRepositioning:
|
|
2204
|
-
}), { navigationContentRef:
|
|
2205
|
-
|
|
2206
|
-
if (
|
|
2207
|
-
return J == null || J(
|
|
2225
|
+
disableRepositioning: m
|
|
2226
|
+
}), { navigationContentRef: $n } = oi(ft);
|
|
2227
|
+
Re(() => {
|
|
2228
|
+
if (d)
|
|
2229
|
+
return J == null || J(d), () => {
|
|
2208
2230
|
J == null || J(void 0);
|
|
2209
2231
|
};
|
|
2210
|
-
}, [
|
|
2211
|
-
const
|
|
2212
|
-
opacity:
|
|
2213
|
-
config: T === ce.CLICK ||
|
|
2214
|
-
}),
|
|
2215
|
-
ue == null || ue(
|
|
2216
|
-
}, Qn = (
|
|
2217
|
-
|
|
2218
|
-
}, Bn = (
|
|
2219
|
-
|
|
2220
|
-
}, Gn = (
|
|
2221
|
-
k &&
|
|
2222
|
-
}, Hn = (
|
|
2223
|
-
k ?
|
|
2224
|
-
}, Wn = (
|
|
2225
|
-
var
|
|
2226
|
-
T === ce.HOVER && (
|
|
2227
|
-
}, Kn = (
|
|
2228
|
-
(T === ce.HOVER || We != null && We()) &&
|
|
2229
|
-
}, Zn = (
|
|
2230
|
-
T === ce.HOVER &&
|
|
2232
|
+
}, [d, J]);
|
|
2233
|
+
const zn = ps({
|
|
2234
|
+
opacity: Ct && (T === ce.CLICK || N) ? 1 : 0,
|
|
2235
|
+
config: T === ce.CLICK || C ? { duration: 0 } : { duration: F, easing: un.easeInOutCubic }
|
|
2236
|
+
}), Mn = (x) => {
|
|
2237
|
+
ue == null || ue(x), f == null || f(x);
|
|
2238
|
+
}, Qn = (x) => {
|
|
2239
|
+
W == null || W(x), h == null || h(x);
|
|
2240
|
+
}, Bn = (x) => {
|
|
2241
|
+
x.preventDefault();
|
|
2242
|
+
}, Gn = (x) => {
|
|
2243
|
+
k && x.preventDefault(), R == null || R(x);
|
|
2244
|
+
}, Hn = (x) => {
|
|
2245
|
+
k ? x.preventDefault() : I && Te(), v == null || v(x);
|
|
2246
|
+
}, Wn = (x) => {
|
|
2247
|
+
var xt;
|
|
2248
|
+
T === ce.HOVER && (x.preventDefault(), x.key === si.ESCAPE && ((xt = O.current) == null || xt.focus())), g == null || g(x);
|
|
2249
|
+
}, Kn = (x) => {
|
|
2250
|
+
(T === ce.HOVER || We != null && We()) && x.preventDefault(), A == null || A(x);
|
|
2251
|
+
}, Zn = (x) => {
|
|
2252
|
+
T === ce.HOVER && x.preventDefault(), _ == null || _(x);
|
|
2231
2253
|
};
|
|
2232
2254
|
return /* @__PURE__ */ Ke(
|
|
2233
2255
|
ri,
|
|
2234
2256
|
{
|
|
2235
|
-
activeItemId:
|
|
2236
|
-
setActiveItemId:
|
|
2257
|
+
activeItemId: y,
|
|
2258
|
+
setActiveItemId: P,
|
|
2237
2259
|
onChildOpen: Vn,
|
|
2238
|
-
shouldCloseCurrentMenuOnSelect:
|
|
2239
|
-
closeMenuImmediately:
|
|
2260
|
+
shouldCloseCurrentMenuOnSelect: xe,
|
|
2261
|
+
closeMenuImmediately: Te,
|
|
2240
2262
|
shouldCloseRootMenuOnSelect: !1,
|
|
2241
|
-
isAnimatedOpen:
|
|
2242
|
-
itemWithFocusedInput:
|
|
2243
|
-
setItemWithFocusedInput:
|
|
2244
|
-
isAiming:
|
|
2263
|
+
isAnimatedOpen: N,
|
|
2264
|
+
itemWithFocusedInput: Nn,
|
|
2265
|
+
setItemWithFocusedInput: Dn,
|
|
2266
|
+
isAiming: S,
|
|
2245
2267
|
isChildAiming: Un,
|
|
2246
|
-
onChildAiming:
|
|
2268
|
+
onChildAiming: jn,
|
|
2247
2269
|
level: 1,
|
|
2248
|
-
children:
|
|
2270
|
+
children: I && /* @__PURE__ */ Ke(
|
|
2249
2271
|
Ts.div,
|
|
2250
2272
|
{
|
|
2251
2273
|
style: {
|
|
2252
2274
|
zIndex: Number.MAX_SAFE_INTEGER - 10,
|
|
2253
2275
|
position: "fixed",
|
|
2254
|
-
...
|
|
2276
|
+
...zn
|
|
2255
2277
|
},
|
|
2256
2278
|
children: /* @__PURE__ */ Jn(
|
|
2257
2279
|
ei,
|
|
2258
2280
|
{
|
|
2259
|
-
ref: ii(
|
|
2260
|
-
className: ti(
|
|
2281
|
+
ref: ii(E, $n, t),
|
|
2282
|
+
className: ti(ks.content, i),
|
|
2261
2283
|
style: {
|
|
2262
2284
|
...n || {},
|
|
2263
|
-
pointerEvents: u ||
|
|
2285
|
+
pointerEvents: u || Ct ? "auto" : "none"
|
|
2264
2286
|
},
|
|
2265
2287
|
collisionBoundary: o,
|
|
2266
2288
|
side: ui[l],
|
|
2267
|
-
align:
|
|
2289
|
+
align: qn,
|
|
2268
2290
|
arrowPadding: a,
|
|
2269
|
-
alignOffset:
|
|
2270
|
-
onMouseEnter:
|
|
2291
|
+
alignOffset: Ln,
|
|
2292
|
+
onMouseEnter: Mn,
|
|
2271
2293
|
onMouseLeave: Qn,
|
|
2272
2294
|
onInteractOutside: Bn,
|
|
2273
2295
|
onEscapeKeyDown: Gn,
|
|
@@ -2276,7 +2298,7 @@ const ks = "_content_f2h52_1", Os = {
|
|
|
2276
2298
|
onCloseAutoFocus: Kn,
|
|
2277
2299
|
onOpenAutoFocus: Zn,
|
|
2278
2300
|
"data-menu-level": 1,
|
|
2279
|
-
...
|
|
2301
|
+
...p,
|
|
2280
2302
|
children: [
|
|
2281
2303
|
s,
|
|
2282
2304
|
D && /* @__PURE__ */ Ke(ci, {})
|
|
@@ -2288,7 +2310,7 @@ const ks = "_content_f2h52_1", Os = {
|
|
|
2288
2310
|
}
|
|
2289
2311
|
);
|
|
2290
2312
|
});
|
|
2291
|
-
Fs.displayName =
|
|
2313
|
+
Fs.displayName = ft;
|
|
2292
2314
|
const Es = (e) => {
|
|
2293
2315
|
const {
|
|
2294
2316
|
direction: t,
|
|
@@ -2300,63 +2322,63 @@ const Es = (e) => {
|
|
|
2300
2322
|
disableRepositioning: o,
|
|
2301
2323
|
children: l,
|
|
2302
2324
|
isSubContent: u
|
|
2303
|
-
} = e, [
|
|
2304
|
-
t ===
|
|
2305
|
-
), [
|
|
2306
|
-
return
|
|
2325
|
+
} = e, [m, f] = ee(
|
|
2326
|
+
t === V.UP_RIGHT || t === V.DOWN_RIGHT || t === V.RIGHT_DOWN || t === V.LEFT_DOWN || !t ? "start" : "end"
|
|
2327
|
+
), [h, g] = ee(n), [v, R] = ee(!1), [A, _] = ee(!1), [d, p] = ee(!1), y = H(!1);
|
|
2328
|
+
return Fe(() => {
|
|
2307
2329
|
if (u || i || !(s != null && s.current) || !t) {
|
|
2308
|
-
|
|
2330
|
+
R(!0);
|
|
2309
2331
|
return;
|
|
2310
2332
|
}
|
|
2311
|
-
let
|
|
2312
|
-
const
|
|
2313
|
-
if (!
|
|
2333
|
+
let P = null, S = !0;
|
|
2334
|
+
const O = a instanceof Element && a || document.documentElement, E = () => {
|
|
2335
|
+
if (!S)
|
|
2314
2336
|
return;
|
|
2315
|
-
const
|
|
2316
|
-
if (!
|
|
2337
|
+
const I = s.current, N = r.current;
|
|
2338
|
+
if (!I || !N)
|
|
2317
2339
|
return;
|
|
2318
|
-
const
|
|
2319
|
-
if (
|
|
2340
|
+
const C = I.getBoundingClientRect(), F = N.getBoundingClientRect();
|
|
2341
|
+
if (F.width <= 0)
|
|
2320
2342
|
return;
|
|
2321
|
-
const T =
|
|
2322
|
-
right: T.right -
|
|
2323
|
-
left:
|
|
2324
|
-
bottom: T.bottom -
|
|
2325
|
-
top:
|
|
2343
|
+
const T = O.getBoundingClientRect(), D = {
|
|
2344
|
+
right: T.right - C.right >= F.width,
|
|
2345
|
+
left: C.left - T.left >= F.width,
|
|
2346
|
+
bottom: T.bottom - C.bottom >= F.height,
|
|
2347
|
+
top: C.top - T.top >= F.height
|
|
2326
2348
|
};
|
|
2327
2349
|
let k = "start";
|
|
2328
2350
|
switch (t) {
|
|
2329
|
-
case
|
|
2330
|
-
case
|
|
2351
|
+
case V.UP_RIGHT:
|
|
2352
|
+
case V.DOWN_RIGHT: {
|
|
2331
2353
|
D.right ? k = "start" : D.left ? k = "end" : k = "start";
|
|
2332
2354
|
break;
|
|
2333
2355
|
}
|
|
2334
|
-
case
|
|
2335
|
-
case
|
|
2356
|
+
case V.UP_LEFT:
|
|
2357
|
+
case V.DOWN_LEFT: {
|
|
2336
2358
|
D.left ? k = "end" : D.right ? k = "start" : k = "end";
|
|
2337
2359
|
break;
|
|
2338
2360
|
}
|
|
2339
|
-
case
|
|
2340
|
-
case
|
|
2361
|
+
case V.RIGHT_DOWN:
|
|
2362
|
+
case V.LEFT_DOWN: {
|
|
2341
2363
|
D.bottom ? k = "start" : D.top ? k = "end" : k = "start";
|
|
2342
2364
|
break;
|
|
2343
2365
|
}
|
|
2344
|
-
case
|
|
2345
|
-
case
|
|
2366
|
+
case V.RIGHT_UP:
|
|
2367
|
+
case V.LEFT_UP: {
|
|
2346
2368
|
D.top ? k = "end" : D.bottom ? k = "start" : k = "end";
|
|
2347
2369
|
break;
|
|
2348
2370
|
}
|
|
2349
2371
|
}
|
|
2350
|
-
|
|
2372
|
+
f(k), R(!0), y.current = !0;
|
|
2351
2373
|
};
|
|
2352
|
-
if (o &&
|
|
2353
|
-
|
|
2374
|
+
if (o && y.current) {
|
|
2375
|
+
R(!0);
|
|
2354
2376
|
return;
|
|
2355
2377
|
}
|
|
2356
2378
|
return setTimeout(() => {
|
|
2357
|
-
|
|
2358
|
-
}, 0), !o && r.current && typeof ResizeObserver < "u" && (
|
|
2359
|
-
|
|
2379
|
+
E();
|
|
2380
|
+
}, 0), !o && r.current && typeof ResizeObserver < "u" && (P = new ResizeObserver(E), P.observe(r.current)), () => {
|
|
2381
|
+
S = !1, P == null || P.disconnect();
|
|
2360
2382
|
};
|
|
2361
2383
|
}, [
|
|
2362
2384
|
t,
|
|
@@ -2365,60 +2387,60 @@ const Es = (e) => {
|
|
|
2365
2387
|
s,
|
|
2366
2388
|
r,
|
|
2367
2389
|
a
|
|
2368
|
-
]),
|
|
2369
|
-
if (o &&
|
|
2370
|
-
|
|
2390
|
+
]), Fe(() => {
|
|
2391
|
+
if (o && y.current) {
|
|
2392
|
+
_(!0);
|
|
2371
2393
|
return;
|
|
2372
2394
|
}
|
|
2373
|
-
const
|
|
2374
|
-
if (!
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2395
|
+
const P = r == null ? void 0 : r.current, S = s == null ? void 0 : s.current;
|
|
2396
|
+
if (!P || !S || i || [
|
|
2397
|
+
V.DOWN_LEFT,
|
|
2398
|
+
V.DOWN_RIGHT,
|
|
2399
|
+
V.UP_LEFT,
|
|
2400
|
+
V.UP_RIGHT
|
|
2379
2401
|
].includes(t)) {
|
|
2380
|
-
|
|
2402
|
+
_(!0);
|
|
2381
2403
|
return;
|
|
2382
2404
|
}
|
|
2383
|
-
const
|
|
2384
|
-
(
|
|
2405
|
+
const O = Array.from(P.querySelectorAll("[data-item]")).filter(
|
|
2406
|
+
(C) => !C.hasAttribute("data-non-selectable")
|
|
2385
2407
|
);
|
|
2386
|
-
if (
|
|
2408
|
+
if (O.length === 0)
|
|
2387
2409
|
return;
|
|
2388
|
-
const
|
|
2389
|
-
const
|
|
2390
|
-
if ([
|
|
2391
|
-
requestAnimationFrame(
|
|
2410
|
+
const E = m === "start" ? O[0] : O[O.length - 1], I = () => {
|
|
2411
|
+
const C = S.getBoundingClientRect(), F = P.getBoundingClientRect(), T = E.getBoundingClientRect(), D = (W) => !W.width || !W.height || !isFinite(W.top) || !isFinite(W.left);
|
|
2412
|
+
if ([C, F, T].some(D)) {
|
|
2413
|
+
requestAnimationFrame(I);
|
|
2392
2414
|
return;
|
|
2393
2415
|
}
|
|
2394
|
-
const k =
|
|
2395
|
-
|
|
2416
|
+
const k = C.height / 2, xe = T.height / 2, Te = T.top - F.top, ue = T.bottom - F.bottom;
|
|
2417
|
+
g(m === "start" ? n + k - Te - xe : n + k + ue - xe), y.current = !0, _(!0);
|
|
2396
2418
|
};
|
|
2397
2419
|
if (setTimeout(() => {
|
|
2398
|
-
|
|
2420
|
+
I();
|
|
2399
2421
|
}, 0), o)
|
|
2400
2422
|
return;
|
|
2401
|
-
const
|
|
2402
|
-
|
|
2423
|
+
const N = new ResizeObserver(() => {
|
|
2424
|
+
I();
|
|
2403
2425
|
});
|
|
2404
|
-
return
|
|
2426
|
+
return N.observe(E), N.observe(S), () => N.disconnect();
|
|
2405
2427
|
}, [
|
|
2406
2428
|
l,
|
|
2407
2429
|
t,
|
|
2408
2430
|
o,
|
|
2409
|
-
|
|
2431
|
+
m,
|
|
2410
2432
|
r,
|
|
2411
2433
|
s,
|
|
2412
2434
|
n,
|
|
2413
2435
|
i
|
|
2414
|
-
]),
|
|
2415
|
-
v &&
|
|
2416
|
-
}, [v,
|
|
2436
|
+
]), Fe(() => {
|
|
2437
|
+
v && A && p(!0);
|
|
2438
|
+
}, [v, A]), { align: m, offset: h, isPositioned: d };
|
|
2417
2439
|
};
|
|
2418
2440
|
export {
|
|
2419
2441
|
Fs as C,
|
|
2420
2442
|
ps as a,
|
|
2421
2443
|
Ts as b,
|
|
2422
|
-
|
|
2444
|
+
un as e,
|
|
2423
2445
|
Es as u
|
|
2424
2446
|
};
|