@micjanic/recursive-grid 1.0.8 → 1.0.11
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.
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
import { unstable_batchedUpdates as fn } from "react-dom";
|
|
9
|
-
var Oe = { exports: {} }, ce = {};
|
|
1
|
+
var ce = Object.defineProperty;
|
|
2
|
+
var fe = (a, t, n) => t in a ? ce(a, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : a[t] = n;
|
|
3
|
+
var m = (a, t, n) => fe(a, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import de, { createContext as me, useMemo as pe, useContext as he, useRef as F, useEffect as K } from "react";
|
|
5
|
+
import { useApplication as _e, useTick as Ee, extend as Re, Application as ve } from "@pixi/react";
|
|
6
|
+
import { Graphics as ee, Particle as re, Sprite as Te, Container as be, Texture as xe, ParticleContainer as Pe } from "pixi.js";
|
|
7
|
+
var N = { exports: {} }, A = {};
|
|
10
8
|
/**
|
|
11
9
|
* @license React
|
|
12
10
|
* react-jsx-runtime.production.js
|
|
@@ -16,29 +14,29 @@ var Oe = { exports: {} }, ce = {};
|
|
|
16
14
|
* This source code is licensed under the MIT license found in the
|
|
17
15
|
* LICENSE file in the root directory of this source tree.
|
|
18
16
|
*/
|
|
19
|
-
var
|
|
20
|
-
function
|
|
21
|
-
if (
|
|
22
|
-
|
|
23
|
-
var
|
|
24
|
-
function
|
|
25
|
-
var
|
|
26
|
-
if (
|
|
27
|
-
|
|
28
|
-
for (var
|
|
29
|
-
|
|
30
|
-
} else
|
|
31
|
-
return
|
|
32
|
-
$$typeof:
|
|
33
|
-
type:
|
|
34
|
-
key:
|
|
35
|
-
ref:
|
|
36
|
-
props:
|
|
17
|
+
var V;
|
|
18
|
+
function Ae() {
|
|
19
|
+
if (V) return A;
|
|
20
|
+
V = 1;
|
|
21
|
+
var a = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
|
|
22
|
+
function n(l, o, c) {
|
|
23
|
+
var f = null;
|
|
24
|
+
if (c !== void 0 && (f = "" + c), o.key !== void 0 && (f = "" + o.key), "key" in o) {
|
|
25
|
+
c = {};
|
|
26
|
+
for (var d in o)
|
|
27
|
+
d !== "key" && (c[d] = o[d]);
|
|
28
|
+
} else c = o;
|
|
29
|
+
return o = c.ref, {
|
|
30
|
+
$$typeof: a,
|
|
31
|
+
type: l,
|
|
32
|
+
key: f,
|
|
33
|
+
ref: o !== void 0 ? o : null,
|
|
34
|
+
props: c
|
|
37
35
|
};
|
|
38
36
|
}
|
|
39
|
-
return
|
|
37
|
+
return A.Fragment = t, A.jsx = n, A.jsxs = n, A;
|
|
40
38
|
}
|
|
41
|
-
var
|
|
39
|
+
var g = {};
|
|
42
40
|
/**
|
|
43
41
|
* @license React
|
|
44
42
|
* react-jsx-runtime.development.js
|
|
@@ -48,2474 +46,344 @@ var de = {};
|
|
|
48
46
|
* This source code is licensed under the MIT license found in the
|
|
49
47
|
* LICENSE file in the root directory of this source tree.
|
|
50
48
|
*/
|
|
51
|
-
var
|
|
52
|
-
function
|
|
53
|
-
return
|
|
54
|
-
function e
|
|
55
|
-
if (
|
|
56
|
-
if (typeof
|
|
57
|
-
return
|
|
58
|
-
if (typeof
|
|
59
|
-
switch (
|
|
60
|
-
case
|
|
49
|
+
var z;
|
|
50
|
+
function ge() {
|
|
51
|
+
return z || (z = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
52
|
+
function a(e) {
|
|
53
|
+
if (e == null) return null;
|
|
54
|
+
if (typeof e == "function")
|
|
55
|
+
return e.$$typeof === le ? null : e.displayName || e.name || null;
|
|
56
|
+
if (typeof e == "string") return e;
|
|
57
|
+
switch (e) {
|
|
58
|
+
case y:
|
|
61
59
|
return "Fragment";
|
|
62
|
-
case
|
|
60
|
+
case x:
|
|
63
61
|
return "Profiler";
|
|
64
|
-
case
|
|
62
|
+
case O:
|
|
65
63
|
return "StrictMode";
|
|
66
|
-
case
|
|
64
|
+
case ne:
|
|
67
65
|
return "Suspense";
|
|
68
|
-
case
|
|
66
|
+
case ae:
|
|
69
67
|
return "SuspenseList";
|
|
70
|
-
case
|
|
68
|
+
case se:
|
|
71
69
|
return "Activity";
|
|
72
70
|
}
|
|
73
|
-
if (typeof
|
|
74
|
-
switch (typeof
|
|
71
|
+
if (typeof e == "object")
|
|
72
|
+
switch (typeof e.tag == "number" && console.error(
|
|
75
73
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
76
|
-
),
|
|
77
|
-
case
|
|
74
|
+
), e.$$typeof) {
|
|
75
|
+
case T:
|
|
78
76
|
return "Portal";
|
|
79
|
-
case A:
|
|
80
|
-
return o.displayName || "Context";
|
|
81
|
-
case y:
|
|
82
|
-
return (o._context.displayName || "Context") + ".Consumer";
|
|
83
|
-
case P:
|
|
84
|
-
var S = o.render;
|
|
85
|
-
return o = o.displayName, o || (o = S.displayName || S.name || "", o = o !== "" ? "ForwardRef(" + o + ")" : "ForwardRef"), o;
|
|
86
|
-
case re:
|
|
87
|
-
return S = o.displayName || null, S !== null ? S : e(o.type) || "Memo";
|
|
88
77
|
case C:
|
|
89
|
-
|
|
78
|
+
return e.displayName || "Context";
|
|
79
|
+
case P:
|
|
80
|
+
return (e._context.displayName || "Context") + ".Consumer";
|
|
81
|
+
case j:
|
|
82
|
+
var r = e.render;
|
|
83
|
+
return e = e.displayName, e || (e = r.displayName || r.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
84
|
+
case oe:
|
|
85
|
+
return r = e.displayName || null, r !== null ? r : a(e.type) || "Memo";
|
|
86
|
+
case Y:
|
|
87
|
+
r = e._payload, e = e._init;
|
|
90
88
|
try {
|
|
91
|
-
return e(
|
|
89
|
+
return a(e(r));
|
|
92
90
|
} catch {
|
|
93
91
|
}
|
|
94
92
|
}
|
|
95
93
|
return null;
|
|
96
94
|
}
|
|
97
|
-
function t(
|
|
98
|
-
return "" +
|
|
95
|
+
function t(e) {
|
|
96
|
+
return "" + e;
|
|
99
97
|
}
|
|
100
|
-
function
|
|
98
|
+
function n(e) {
|
|
101
99
|
try {
|
|
102
|
-
t(
|
|
103
|
-
var
|
|
100
|
+
t(e);
|
|
101
|
+
var r = !1;
|
|
104
102
|
} catch {
|
|
105
|
-
|
|
103
|
+
r = !0;
|
|
106
104
|
}
|
|
107
|
-
if (
|
|
108
|
-
|
|
109
|
-
var
|
|
110
|
-
return
|
|
111
|
-
|
|
105
|
+
if (r) {
|
|
106
|
+
r = console;
|
|
107
|
+
var s = r.error, i = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
108
|
+
return s.call(
|
|
109
|
+
r,
|
|
112
110
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
113
|
-
|
|
114
|
-
), t(
|
|
111
|
+
i
|
|
112
|
+
), t(e);
|
|
115
113
|
}
|
|
116
114
|
}
|
|
117
|
-
function
|
|
118
|
-
if (
|
|
119
|
-
if (typeof
|
|
115
|
+
function l(e) {
|
|
116
|
+
if (e === y) return "<>";
|
|
117
|
+
if (typeof e == "object" && e !== null && e.$$typeof === Y)
|
|
120
118
|
return "<...>";
|
|
121
119
|
try {
|
|
122
|
-
var
|
|
123
|
-
return
|
|
120
|
+
var r = a(e);
|
|
121
|
+
return r ? "<" + r + ">" : "<...>";
|
|
124
122
|
} catch {
|
|
125
123
|
return "<...>";
|
|
126
124
|
}
|
|
127
125
|
}
|
|
128
|
-
function
|
|
129
|
-
var
|
|
130
|
-
return
|
|
126
|
+
function o() {
|
|
127
|
+
var e = D.A;
|
|
128
|
+
return e === null ? null : e.getOwner();
|
|
131
129
|
}
|
|
132
|
-
function
|
|
130
|
+
function c() {
|
|
133
131
|
return Error("react-stack-top-frame");
|
|
134
132
|
}
|
|
135
|
-
function
|
|
136
|
-
if (
|
|
137
|
-
var
|
|
138
|
-
if (
|
|
133
|
+
function f(e) {
|
|
134
|
+
if (L.call(e, "key")) {
|
|
135
|
+
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
136
|
+
if (r && r.isReactWarning) return !1;
|
|
139
137
|
}
|
|
140
|
-
return
|
|
138
|
+
return e.key !== void 0;
|
|
141
139
|
}
|
|
142
|
-
function
|
|
143
|
-
function
|
|
144
|
-
|
|
140
|
+
function d(e, r) {
|
|
141
|
+
function s() {
|
|
142
|
+
G || (G = !0, console.error(
|
|
145
143
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
146
|
-
|
|
144
|
+
r
|
|
147
145
|
));
|
|
148
146
|
}
|
|
149
|
-
|
|
150
|
-
get:
|
|
147
|
+
s.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
148
|
+
get: s,
|
|
151
149
|
configurable: !0
|
|
152
150
|
});
|
|
153
151
|
}
|
|
154
|
-
function
|
|
155
|
-
var
|
|
156
|
-
return
|
|
152
|
+
function S() {
|
|
153
|
+
var e = a(this.type);
|
|
154
|
+
return W[e] || (W[e] = !0, console.error(
|
|
157
155
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
158
|
-
)),
|
|
159
|
-
}
|
|
160
|
-
function
|
|
161
|
-
var
|
|
162
|
-
return
|
|
163
|
-
$$typeof:
|
|
164
|
-
type:
|
|
165
|
-
key:
|
|
166
|
-
props:
|
|
167
|
-
_owner:
|
|
168
|
-
}, (
|
|
156
|
+
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
157
|
+
}
|
|
158
|
+
function _(e, r, s, i, w, M) {
|
|
159
|
+
var u = s.ref;
|
|
160
|
+
return e = {
|
|
161
|
+
$$typeof: v,
|
|
162
|
+
type: e,
|
|
163
|
+
key: r,
|
|
164
|
+
props: s,
|
|
165
|
+
_owner: i
|
|
166
|
+
}, (u !== void 0 ? u : null) !== null ? Object.defineProperty(e, "ref", {
|
|
169
167
|
enumerable: !1,
|
|
170
|
-
get:
|
|
171
|
-
}) : Object.defineProperty(
|
|
168
|
+
get: S
|
|
169
|
+
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
172
170
|
configurable: !1,
|
|
173
171
|
enumerable: !1,
|
|
174
172
|
writable: !0,
|
|
175
173
|
value: 0
|
|
176
|
-
}), Object.defineProperty(
|
|
174
|
+
}), Object.defineProperty(e, "_debugInfo", {
|
|
177
175
|
configurable: !1,
|
|
178
176
|
enumerable: !1,
|
|
179
177
|
writable: !0,
|
|
180
178
|
value: null
|
|
181
|
-
}), Object.defineProperty(
|
|
179
|
+
}), Object.defineProperty(e, "_debugStack", {
|
|
182
180
|
configurable: !1,
|
|
183
181
|
enumerable: !1,
|
|
184
182
|
writable: !0,
|
|
185
|
-
value:
|
|
186
|
-
}), Object.defineProperty(
|
|
183
|
+
value: w
|
|
184
|
+
}), Object.defineProperty(e, "_debugTask", {
|
|
187
185
|
configurable: !1,
|
|
188
186
|
enumerable: !1,
|
|
189
187
|
writable: !0,
|
|
190
|
-
value:
|
|
191
|
-
}), Object.freeze && (Object.freeze(
|
|
192
|
-
}
|
|
193
|
-
function
|
|
194
|
-
var
|
|
195
|
-
if (
|
|
196
|
-
if (
|
|
197
|
-
if (
|
|
198
|
-
for (
|
|
199
|
-
|
|
200
|
-
Object.freeze && Object.freeze(
|
|
188
|
+
value: M
|
|
189
|
+
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
190
|
+
}
|
|
191
|
+
function k(e, r, s, i, w, M) {
|
|
192
|
+
var u = r.children;
|
|
193
|
+
if (u !== void 0)
|
|
194
|
+
if (i)
|
|
195
|
+
if (ie(u)) {
|
|
196
|
+
for (i = 0; i < u.length; i++)
|
|
197
|
+
E(u[i]);
|
|
198
|
+
Object.freeze && Object.freeze(u);
|
|
201
199
|
} else
|
|
202
200
|
console.error(
|
|
203
201
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
204
202
|
);
|
|
205
|
-
else
|
|
206
|
-
if (
|
|
207
|
-
|
|
208
|
-
var
|
|
209
|
-
return
|
|
203
|
+
else E(u);
|
|
204
|
+
if (L.call(r, "key")) {
|
|
205
|
+
u = a(e);
|
|
206
|
+
var b = Object.keys(r).filter(function(ue) {
|
|
207
|
+
return ue !== "key";
|
|
210
208
|
});
|
|
211
|
-
|
|
209
|
+
i = 0 < b.length ? "{key: someKey, " + b.join(": ..., ") + ": ...}" : "{key: someKey}", J[u + i] || (b = 0 < b.length ? "{" + b.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
212
210
|
`A props object containing a "key" prop is being spread into JSX:
|
|
213
211
|
let props = %s;
|
|
214
212
|
<%s {...props} />
|
|
215
213
|
React keys must be passed directly to JSX without using spread:
|
|
216
214
|
let props = %s;
|
|
217
215
|
<%s key={someKey} {...props} />`,
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
),
|
|
216
|
+
i,
|
|
217
|
+
u,
|
|
218
|
+
b,
|
|
219
|
+
u
|
|
220
|
+
), J[u + i] = !0);
|
|
223
221
|
}
|
|
224
|
-
if (
|
|
225
|
-
|
|
226
|
-
for (var
|
|
227
|
-
|
|
228
|
-
} else
|
|
229
|
-
return
|
|
230
|
-
|
|
231
|
-
typeof
|
|
232
|
-
),
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
222
|
+
if (u = null, s !== void 0 && (n(s), u = "" + s), f(r) && (n(r.key), u = "" + r.key), "key" in r) {
|
|
223
|
+
s = {};
|
|
224
|
+
for (var $ in r)
|
|
225
|
+
$ !== "key" && (s[$] = r[$]);
|
|
226
|
+
} else s = r;
|
|
227
|
+
return u && d(
|
|
228
|
+
s,
|
|
229
|
+
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
230
|
+
), _(
|
|
231
|
+
e,
|
|
232
|
+
u,
|
|
233
|
+
s,
|
|
234
|
+
o(),
|
|
235
|
+
w,
|
|
236
|
+
M
|
|
239
237
|
);
|
|
240
238
|
}
|
|
241
|
-
function
|
|
242
|
-
|
|
239
|
+
function E(e) {
|
|
240
|
+
R(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === Y && (e._payload.status === "fulfilled" ? R(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
|
|
243
241
|
}
|
|
244
|
-
function
|
|
245
|
-
return typeof
|
|
242
|
+
function R(e) {
|
|
243
|
+
return typeof e == "object" && e !== null && e.$$typeof === v;
|
|
246
244
|
}
|
|
247
|
-
var
|
|
245
|
+
var p = de, v = Symbol.for("react.transitional.element"), T = Symbol.for("react.portal"), y = Symbol.for("react.fragment"), O = Symbol.for("react.strict_mode"), x = Symbol.for("react.profiler"), P = Symbol.for("react.consumer"), C = Symbol.for("react.context"), j = Symbol.for("react.forward_ref"), ne = Symbol.for("react.suspense"), ae = Symbol.for("react.suspense_list"), oe = Symbol.for("react.memo"), Y = Symbol.for("react.lazy"), se = Symbol.for("react.activity"), le = Symbol.for("react.client.reference"), D = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, L = Object.prototype.hasOwnProperty, ie = Array.isArray, I = console.createTask ? console.createTask : function() {
|
|
248
246
|
return null;
|
|
249
247
|
};
|
|
250
|
-
|
|
251
|
-
react_stack_bottom_frame: function(
|
|
252
|
-
return
|
|
248
|
+
p = {
|
|
249
|
+
react_stack_bottom_frame: function(e) {
|
|
250
|
+
return e();
|
|
253
251
|
}
|
|
254
252
|
};
|
|
255
|
-
var
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
)(),
|
|
259
|
-
|
|
260
|
-
var
|
|
261
|
-
return
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
253
|
+
var G, W = {}, U = p.react_stack_bottom_frame.bind(
|
|
254
|
+
p,
|
|
255
|
+
c
|
|
256
|
+
)(), q = I(l(c)), J = {};
|
|
257
|
+
g.Fragment = y, g.jsx = function(e, r, s) {
|
|
258
|
+
var i = 1e4 > D.recentlyCreatedOwnerStacks++;
|
|
259
|
+
return k(
|
|
260
|
+
e,
|
|
261
|
+
r,
|
|
262
|
+
s,
|
|
265
263
|
!1,
|
|
266
|
-
|
|
267
|
-
|
|
264
|
+
i ? Error("react-stack-top-frame") : U,
|
|
265
|
+
i ? I(l(e)) : q
|
|
268
266
|
);
|
|
269
|
-
},
|
|
270
|
-
var
|
|
271
|
-
return
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
267
|
+
}, g.jsxs = function(e, r, s) {
|
|
268
|
+
var i = 1e4 > D.recentlyCreatedOwnerStacks++;
|
|
269
|
+
return k(
|
|
270
|
+
e,
|
|
271
|
+
r,
|
|
272
|
+
s,
|
|
275
273
|
!0,
|
|
276
|
-
|
|
277
|
-
|
|
274
|
+
i ? Error("react-stack-top-frame") : U,
|
|
275
|
+
i ? I(l(e)) : q
|
|
278
276
|
);
|
|
279
277
|
};
|
|
280
|
-
})()),
|
|
281
|
-
}
|
|
282
|
-
var Nt;
|
|
283
|
-
function pn() {
|
|
284
|
-
return Nt || (Nt = 1, process.env.NODE_ENV === "production" ? Oe.exports = hn() : Oe.exports = mn()), Oe.exports;
|
|
285
|
-
}
|
|
286
|
-
var D = pn(), pt = Ce(), b = (e) => ke(e, pt), gt = Ce();
|
|
287
|
-
b.write = (e) => ke(e, gt);
|
|
288
|
-
var Me = Ce();
|
|
289
|
-
b.onStart = (e) => ke(e, Me);
|
|
290
|
-
var vt = Ce();
|
|
291
|
-
b.onFrame = (e) => ke(e, vt);
|
|
292
|
-
var yt = Ce();
|
|
293
|
-
b.onFinish = (e) => ke(e, yt);
|
|
294
|
-
var ie = [];
|
|
295
|
-
b.setTimeout = (e, t) => {
|
|
296
|
-
const r = b.now() + t, n = () => {
|
|
297
|
-
const i = ie.findIndex((a) => a.cancel == n);
|
|
298
|
-
~i && ie.splice(i, 1), X -= ~i ? 1 : 0;
|
|
299
|
-
}, s = { time: r, handler: e, cancel: n };
|
|
300
|
-
return ie.splice(mr(r), 0, s), X += 1, pr(), s;
|
|
301
|
-
};
|
|
302
|
-
var mr = (e) => ~(~ie.findIndex((t) => t.time > e) || ~ie.length);
|
|
303
|
-
b.cancel = (e) => {
|
|
304
|
-
Me.delete(e), vt.delete(e), yt.delete(e), pt.delete(e), gt.delete(e);
|
|
305
|
-
};
|
|
306
|
-
b.sync = (e) => {
|
|
307
|
-
it = !0, b.batchedUpdates(e), it = !1;
|
|
308
|
-
};
|
|
309
|
-
b.throttle = (e) => {
|
|
310
|
-
let t;
|
|
311
|
-
function r() {
|
|
312
|
-
try {
|
|
313
|
-
e(...t);
|
|
314
|
-
} finally {
|
|
315
|
-
t = null;
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
function n(...s) {
|
|
319
|
-
t = s, b.onStart(r);
|
|
320
|
-
}
|
|
321
|
-
return n.handler = e, n.cancel = () => {
|
|
322
|
-
Me.delete(r), t = null;
|
|
323
|
-
}, n;
|
|
324
|
-
};
|
|
325
|
-
var _t = typeof window < "u" ? window.requestAnimationFrame : (
|
|
326
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
327
|
-
(() => {
|
|
328
|
-
})
|
|
329
|
-
);
|
|
330
|
-
b.use = (e) => _t = e;
|
|
331
|
-
b.now = typeof performance < "u" ? () => performance.now() : Date.now;
|
|
332
|
-
b.batchedUpdates = (e) => e();
|
|
333
|
-
b.catch = console.error;
|
|
334
|
-
b.frameLoop = "always";
|
|
335
|
-
b.advance = () => {
|
|
336
|
-
b.frameLoop !== "demand" ? console.warn(
|
|
337
|
-
"Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"
|
|
338
|
-
) : vr();
|
|
339
|
-
};
|
|
340
|
-
var J = -1, X = 0, it = !1;
|
|
341
|
-
function ke(e, t) {
|
|
342
|
-
it ? (t.delete(e), e(0)) : (t.add(e), pr());
|
|
343
|
-
}
|
|
344
|
-
function pr() {
|
|
345
|
-
J < 0 && (J = 0, b.frameLoop !== "demand" && _t(gr));
|
|
346
|
-
}
|
|
347
|
-
function gn() {
|
|
348
|
-
J = -1;
|
|
349
|
-
}
|
|
350
|
-
function gr() {
|
|
351
|
-
~J && (_t(gr), b.batchedUpdates(vr));
|
|
352
|
-
}
|
|
353
|
-
function vr() {
|
|
354
|
-
const e = J;
|
|
355
|
-
J = b.now();
|
|
356
|
-
const t = mr(J);
|
|
357
|
-
if (t && (yr(ie.splice(0, t), (r) => r.handler()), X -= t), !X) {
|
|
358
|
-
gn();
|
|
359
|
-
return;
|
|
360
|
-
}
|
|
361
|
-
Me.flush(), pt.flush(e ? Math.min(64, J - e) : 16.667), vt.flush(), gt.flush(), yt.flush();
|
|
362
|
-
}
|
|
363
|
-
function Ce() {
|
|
364
|
-
let e = /* @__PURE__ */ new Set(), t = e;
|
|
365
|
-
return {
|
|
366
|
-
add(r) {
|
|
367
|
-
X += t == e && !e.has(r) ? 1 : 0, e.add(r);
|
|
368
|
-
},
|
|
369
|
-
delete(r) {
|
|
370
|
-
return X -= t == e && e.has(r) ? 1 : 0, e.delete(r);
|
|
371
|
-
},
|
|
372
|
-
flush(r) {
|
|
373
|
-
t.size && (e = /* @__PURE__ */ new Set(), X -= t.size, yr(t, (n) => n(r) && e.add(n)), X += e.size, t = e);
|
|
374
|
-
}
|
|
375
|
-
};
|
|
376
|
-
}
|
|
377
|
-
function yr(e, t) {
|
|
378
|
-
e.forEach((r) => {
|
|
379
|
-
try {
|
|
380
|
-
t(r);
|
|
381
|
-
} catch (n) {
|
|
382
|
-
b.catch(n);
|
|
383
|
-
}
|
|
384
|
-
});
|
|
385
|
-
}
|
|
386
|
-
var vn = Object.defineProperty, yn = (e, t) => {
|
|
387
|
-
for (var r in t)
|
|
388
|
-
vn(e, r, { get: t[r], enumerable: !0 });
|
|
389
|
-
}, q = {};
|
|
390
|
-
yn(q, {
|
|
391
|
-
assign: () => bn,
|
|
392
|
-
colors: () => Z,
|
|
393
|
-
createStringInterpolator: () => wt,
|
|
394
|
-
skipAnimation: () => br,
|
|
395
|
-
to: () => _r,
|
|
396
|
-
willAdvance: () => Rt
|
|
397
|
-
});
|
|
398
|
-
function at() {
|
|
399
|
-
}
|
|
400
|
-
var _n = (e, t, r) => Object.defineProperty(e, t, { value: r, writable: !0, configurable: !0 }), c = {
|
|
401
|
-
arr: Array.isArray,
|
|
402
|
-
obj: (e) => !!e && e.constructor.name === "Object",
|
|
403
|
-
fun: (e) => typeof e == "function",
|
|
404
|
-
str: (e) => typeof e == "string",
|
|
405
|
-
num: (e) => typeof e == "number",
|
|
406
|
-
und: (e) => e === void 0
|
|
407
|
-
};
|
|
408
|
-
function W(e, t) {
|
|
409
|
-
if (c.arr(e)) {
|
|
410
|
-
if (!c.arr(t) || e.length !== t.length) return !1;
|
|
411
|
-
for (let r = 0; r < e.length; r++)
|
|
412
|
-
if (e[r] !== t[r]) return !1;
|
|
413
|
-
return !0;
|
|
414
|
-
}
|
|
415
|
-
return e === t;
|
|
416
|
-
}
|
|
417
|
-
var x = (e, t) => e.forEach(t);
|
|
418
|
-
function Q(e, t, r) {
|
|
419
|
-
if (c.arr(e)) {
|
|
420
|
-
for (let n = 0; n < e.length; n++)
|
|
421
|
-
t.call(r, e[n], `${n}`);
|
|
422
|
-
return;
|
|
423
|
-
}
|
|
424
|
-
for (const n in e)
|
|
425
|
-
e.hasOwnProperty(n) && t.call(r, e[n], n);
|
|
426
|
-
}
|
|
427
|
-
var F = (e) => c.und(e) ? [] : c.arr(e) ? e : [e];
|
|
428
|
-
function ve(e, t) {
|
|
429
|
-
if (e.size) {
|
|
430
|
-
const r = Array.from(e);
|
|
431
|
-
e.clear(), x(r, t);
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
var ge = (e, ...t) => ve(e, (r) => r(...t)), bt = () => typeof window > "u" || !window.navigator || /ServerSideRendering|^Deno\//.test(window.navigator.userAgent), wt, _r, Z = null, br = !1, Rt = at, bn = (e) => {
|
|
435
|
-
e.to && (_r = e.to), e.now && (b.now = e.now), e.colors !== void 0 && (Z = e.colors), e.skipAnimation != null && (br = e.skipAnimation), e.createStringInterpolator && (wt = e.createStringInterpolator), e.requestAnimationFrame && b.use(e.requestAnimationFrame), e.batchedUpdates && (b.batchedUpdates = e.batchedUpdates), e.willAdvance && (Rt = e.willAdvance), e.frameLoop && (b.frameLoop = e.frameLoop);
|
|
436
|
-
}, ye = /* @__PURE__ */ new Set(), N = [], Ke = [], $e = 0, ze = {
|
|
437
|
-
get idle() {
|
|
438
|
-
return !ye.size && !N.length;
|
|
439
|
-
},
|
|
440
|
-
/** Advance the given animation on every frame until idle. */
|
|
441
|
-
start(e) {
|
|
442
|
-
$e > e.priority ? (ye.add(e), b.onStart(wn)) : (wr(e), b(ot));
|
|
443
|
-
},
|
|
444
|
-
/** Advance all animations by the given time. */
|
|
445
|
-
advance: ot,
|
|
446
|
-
/** Call this when an animation's priority changes. */
|
|
447
|
-
sort(e) {
|
|
448
|
-
if ($e)
|
|
449
|
-
b.onFrame(() => ze.sort(e));
|
|
450
|
-
else {
|
|
451
|
-
const t = N.indexOf(e);
|
|
452
|
-
~t && (N.splice(t, 1), Rr(e));
|
|
453
|
-
}
|
|
454
|
-
},
|
|
455
|
-
/**
|
|
456
|
-
* Clear all animations. For testing purposes.
|
|
457
|
-
*
|
|
458
|
-
* ☠️ Never call this from within the frameloop.
|
|
459
|
-
*/
|
|
460
|
-
clear() {
|
|
461
|
-
N = [], ye.clear();
|
|
462
|
-
}
|
|
463
|
-
};
|
|
464
|
-
function wn() {
|
|
465
|
-
ye.forEach(wr), ye.clear(), b(ot);
|
|
466
|
-
}
|
|
467
|
-
function wr(e) {
|
|
468
|
-
N.includes(e) || Rr(e);
|
|
469
|
-
}
|
|
470
|
-
function Rr(e) {
|
|
471
|
-
N.splice(
|
|
472
|
-
Rn(N, (t) => t.priority > e.priority),
|
|
473
|
-
0,
|
|
474
|
-
e
|
|
475
|
-
);
|
|
476
|
-
}
|
|
477
|
-
function ot(e) {
|
|
478
|
-
const t = Ke;
|
|
479
|
-
for (let r = 0; r < N.length; r++) {
|
|
480
|
-
const n = N[r];
|
|
481
|
-
$e = n.priority, n.idle || (Rt(n), n.advance(e), n.idle || t.push(n));
|
|
482
|
-
}
|
|
483
|
-
return $e = 0, Ke = N, Ke.length = 0, N = t, N.length > 0;
|
|
484
|
-
}
|
|
485
|
-
function Rn(e, t) {
|
|
486
|
-
const r = e.findIndex(t);
|
|
487
|
-
return r < 0 ? e.length : r;
|
|
488
|
-
}
|
|
489
|
-
var Sn = {
|
|
490
|
-
transparent: 0,
|
|
491
|
-
aliceblue: 4042850303,
|
|
492
|
-
antiquewhite: 4209760255,
|
|
493
|
-
aqua: 16777215,
|
|
494
|
-
aquamarine: 2147472639,
|
|
495
|
-
azure: 4043309055,
|
|
496
|
-
beige: 4126530815,
|
|
497
|
-
bisque: 4293182719,
|
|
498
|
-
black: 255,
|
|
499
|
-
blanchedalmond: 4293643775,
|
|
500
|
-
blue: 65535,
|
|
501
|
-
blueviolet: 2318131967,
|
|
502
|
-
brown: 2771004159,
|
|
503
|
-
burlywood: 3736635391,
|
|
504
|
-
burntsienna: 3934150143,
|
|
505
|
-
cadetblue: 1604231423,
|
|
506
|
-
chartreuse: 2147418367,
|
|
507
|
-
chocolate: 3530104575,
|
|
508
|
-
coral: 4286533887,
|
|
509
|
-
cornflowerblue: 1687547391,
|
|
510
|
-
cornsilk: 4294499583,
|
|
511
|
-
crimson: 3692313855,
|
|
512
|
-
cyan: 16777215,
|
|
513
|
-
darkblue: 35839,
|
|
514
|
-
darkcyan: 9145343,
|
|
515
|
-
darkgoldenrod: 3095792639,
|
|
516
|
-
darkgray: 2846468607,
|
|
517
|
-
darkgreen: 6553855,
|
|
518
|
-
darkgrey: 2846468607,
|
|
519
|
-
darkkhaki: 3182914559,
|
|
520
|
-
darkmagenta: 2332068863,
|
|
521
|
-
darkolivegreen: 1433087999,
|
|
522
|
-
darkorange: 4287365375,
|
|
523
|
-
darkorchid: 2570243327,
|
|
524
|
-
darkred: 2332033279,
|
|
525
|
-
darksalmon: 3918953215,
|
|
526
|
-
darkseagreen: 2411499519,
|
|
527
|
-
darkslateblue: 1211993087,
|
|
528
|
-
darkslategray: 793726975,
|
|
529
|
-
darkslategrey: 793726975,
|
|
530
|
-
darkturquoise: 13554175,
|
|
531
|
-
darkviolet: 2483082239,
|
|
532
|
-
deeppink: 4279538687,
|
|
533
|
-
deepskyblue: 12582911,
|
|
534
|
-
dimgray: 1768516095,
|
|
535
|
-
dimgrey: 1768516095,
|
|
536
|
-
dodgerblue: 512819199,
|
|
537
|
-
firebrick: 2988581631,
|
|
538
|
-
floralwhite: 4294635775,
|
|
539
|
-
forestgreen: 579543807,
|
|
540
|
-
fuchsia: 4278255615,
|
|
541
|
-
gainsboro: 3705462015,
|
|
542
|
-
ghostwhite: 4177068031,
|
|
543
|
-
gold: 4292280575,
|
|
544
|
-
goldenrod: 3668254975,
|
|
545
|
-
gray: 2155905279,
|
|
546
|
-
green: 8388863,
|
|
547
|
-
greenyellow: 2919182335,
|
|
548
|
-
grey: 2155905279,
|
|
549
|
-
honeydew: 4043305215,
|
|
550
|
-
hotpink: 4285117695,
|
|
551
|
-
indianred: 3445382399,
|
|
552
|
-
indigo: 1258324735,
|
|
553
|
-
ivory: 4294963455,
|
|
554
|
-
khaki: 4041641215,
|
|
555
|
-
lavender: 3873897215,
|
|
556
|
-
lavenderblush: 4293981695,
|
|
557
|
-
lawngreen: 2096890111,
|
|
558
|
-
lemonchiffon: 4294626815,
|
|
559
|
-
lightblue: 2916673279,
|
|
560
|
-
lightcoral: 4034953471,
|
|
561
|
-
lightcyan: 3774873599,
|
|
562
|
-
lightgoldenrodyellow: 4210742015,
|
|
563
|
-
lightgray: 3553874943,
|
|
564
|
-
lightgreen: 2431553791,
|
|
565
|
-
lightgrey: 3553874943,
|
|
566
|
-
lightpink: 4290167295,
|
|
567
|
-
lightsalmon: 4288707327,
|
|
568
|
-
lightseagreen: 548580095,
|
|
569
|
-
lightskyblue: 2278488831,
|
|
570
|
-
lightslategray: 2005441023,
|
|
571
|
-
lightslategrey: 2005441023,
|
|
572
|
-
lightsteelblue: 2965692159,
|
|
573
|
-
lightyellow: 4294959359,
|
|
574
|
-
lime: 16711935,
|
|
575
|
-
limegreen: 852308735,
|
|
576
|
-
linen: 4210091775,
|
|
577
|
-
magenta: 4278255615,
|
|
578
|
-
maroon: 2147483903,
|
|
579
|
-
mediumaquamarine: 1724754687,
|
|
580
|
-
mediumblue: 52735,
|
|
581
|
-
mediumorchid: 3126187007,
|
|
582
|
-
mediumpurple: 2473647103,
|
|
583
|
-
mediumseagreen: 1018393087,
|
|
584
|
-
mediumslateblue: 2070474495,
|
|
585
|
-
mediumspringgreen: 16423679,
|
|
586
|
-
mediumturquoise: 1221709055,
|
|
587
|
-
mediumvioletred: 3340076543,
|
|
588
|
-
midnightblue: 421097727,
|
|
589
|
-
mintcream: 4127193855,
|
|
590
|
-
mistyrose: 4293190143,
|
|
591
|
-
moccasin: 4293178879,
|
|
592
|
-
navajowhite: 4292783615,
|
|
593
|
-
navy: 33023,
|
|
594
|
-
oldlace: 4260751103,
|
|
595
|
-
olive: 2155872511,
|
|
596
|
-
olivedrab: 1804477439,
|
|
597
|
-
orange: 4289003775,
|
|
598
|
-
orangered: 4282712319,
|
|
599
|
-
orchid: 3664828159,
|
|
600
|
-
palegoldenrod: 4008225535,
|
|
601
|
-
palegreen: 2566625535,
|
|
602
|
-
paleturquoise: 2951671551,
|
|
603
|
-
palevioletred: 3681588223,
|
|
604
|
-
papayawhip: 4293907967,
|
|
605
|
-
peachpuff: 4292524543,
|
|
606
|
-
peru: 3448061951,
|
|
607
|
-
pink: 4290825215,
|
|
608
|
-
plum: 3718307327,
|
|
609
|
-
powderblue: 2967529215,
|
|
610
|
-
purple: 2147516671,
|
|
611
|
-
rebeccapurple: 1714657791,
|
|
612
|
-
red: 4278190335,
|
|
613
|
-
rosybrown: 3163525119,
|
|
614
|
-
royalblue: 1097458175,
|
|
615
|
-
saddlebrown: 2336560127,
|
|
616
|
-
salmon: 4202722047,
|
|
617
|
-
sandybrown: 4104413439,
|
|
618
|
-
seagreen: 780883967,
|
|
619
|
-
seashell: 4294307583,
|
|
620
|
-
sienna: 2689740287,
|
|
621
|
-
silver: 3233857791,
|
|
622
|
-
skyblue: 2278484991,
|
|
623
|
-
slateblue: 1784335871,
|
|
624
|
-
slategray: 1887473919,
|
|
625
|
-
slategrey: 1887473919,
|
|
626
|
-
snow: 4294638335,
|
|
627
|
-
springgreen: 16744447,
|
|
628
|
-
steelblue: 1182971135,
|
|
629
|
-
tan: 3535047935,
|
|
630
|
-
teal: 8421631,
|
|
631
|
-
thistle: 3636451583,
|
|
632
|
-
tomato: 4284696575,
|
|
633
|
-
turquoise: 1088475391,
|
|
634
|
-
violet: 4001558271,
|
|
635
|
-
wheat: 4125012991,
|
|
636
|
-
white: 4294967295,
|
|
637
|
-
whitesmoke: 4126537215,
|
|
638
|
-
yellow: 4294902015,
|
|
639
|
-
yellowgreen: 2597139199
|
|
640
|
-
}, U = "[-+]?\\d*\\.?\\d+", De = U + "%";
|
|
641
|
-
function Le(...e) {
|
|
642
|
-
return "\\(\\s*(" + e.join(")\\s*,\\s*(") + ")\\s*\\)";
|
|
643
|
-
}
|
|
644
|
-
var xn = new RegExp("rgb" + Le(U, U, U)), An = new RegExp("rgba" + Le(U, U, U, U)), Pn = new RegExp("hsl" + Le(U, De, De)), En = new RegExp(
|
|
645
|
-
"hsla" + Le(U, De, De, U)
|
|
646
|
-
), Tn = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, kn = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, Cn = /^#([0-9a-fA-F]{6})$/, In = /^#([0-9a-fA-F]{8})$/;
|
|
647
|
-
function On(e) {
|
|
648
|
-
let t;
|
|
649
|
-
return typeof e == "number" ? e >>> 0 === e && e >= 0 && e <= 4294967295 ? e : null : (t = Cn.exec(e)) ? parseInt(t[1] + "ff", 16) >>> 0 : Z && Z[e] !== void 0 ? Z[e] : (t = xn.exec(e)) ? (se(t[1]) << 24 | // r
|
|
650
|
-
se(t[2]) << 16 | // g
|
|
651
|
-
se(t[3]) << 8 | // b
|
|
652
|
-
255) >>> // a
|
|
653
|
-
0 : (t = An.exec(e)) ? (se(t[1]) << 24 | // r
|
|
654
|
-
se(t[2]) << 16 | // g
|
|
655
|
-
se(t[3]) << 8 | // b
|
|
656
|
-
Ut(t[4])) >>> // a
|
|
657
|
-
0 : (t = Tn.exec(e)) ? parseInt(
|
|
658
|
-
t[1] + t[1] + // r
|
|
659
|
-
t[2] + t[2] + // g
|
|
660
|
-
t[3] + t[3] + // b
|
|
661
|
-
"ff",
|
|
662
|
-
// a
|
|
663
|
-
16
|
|
664
|
-
) >>> 0 : (t = In.exec(e)) ? parseInt(t[1], 16) >>> 0 : (t = kn.exec(e)) ? parseInt(
|
|
665
|
-
t[1] + t[1] + // r
|
|
666
|
-
t[2] + t[2] + // g
|
|
667
|
-
t[3] + t[3] + // b
|
|
668
|
-
t[4] + t[4],
|
|
669
|
-
// a
|
|
670
|
-
16
|
|
671
|
-
) >>> 0 : (t = Pn.exec(e)) ? ($t(
|
|
672
|
-
Dt(t[1]),
|
|
673
|
-
// h
|
|
674
|
-
je(t[2]),
|
|
675
|
-
// s
|
|
676
|
-
je(t[3])
|
|
677
|
-
// l
|
|
678
|
-
) | 255) >>> // a
|
|
679
|
-
0 : (t = En.exec(e)) ? ($t(
|
|
680
|
-
Dt(t[1]),
|
|
681
|
-
// h
|
|
682
|
-
je(t[2]),
|
|
683
|
-
// s
|
|
684
|
-
je(t[3])
|
|
685
|
-
// l
|
|
686
|
-
) | Ut(t[4])) >>> // a
|
|
687
|
-
0 : null;
|
|
688
|
-
}
|
|
689
|
-
function et(e, t, r) {
|
|
690
|
-
return r < 0 && (r += 1), r > 1 && (r -= 1), r < 1 / 6 ? e + (t - e) * 6 * r : r < 1 / 2 ? t : r < 2 / 3 ? e + (t - e) * (2 / 3 - r) * 6 : e;
|
|
691
|
-
}
|
|
692
|
-
function $t(e, t, r) {
|
|
693
|
-
const n = r < 0.5 ? r * (1 + t) : r + t - r * t, s = 2 * r - n, i = et(s, n, e + 1 / 3), a = et(s, n, e), u = et(s, n, e - 1 / 3);
|
|
694
|
-
return Math.round(i * 255) << 24 | Math.round(a * 255) << 16 | Math.round(u * 255) << 8;
|
|
695
|
-
}
|
|
696
|
-
function se(e) {
|
|
697
|
-
const t = parseInt(e, 10);
|
|
698
|
-
return t < 0 ? 0 : t > 255 ? 255 : t;
|
|
699
|
-
}
|
|
700
|
-
function Dt(e) {
|
|
701
|
-
return (parseFloat(e) % 360 + 360) % 360 / 360;
|
|
702
|
-
}
|
|
703
|
-
function Ut(e) {
|
|
704
|
-
const t = parseFloat(e);
|
|
705
|
-
return t < 0 ? 0 : t > 1 ? 255 : Math.round(t * 255);
|
|
706
|
-
}
|
|
707
|
-
function je(e) {
|
|
708
|
-
const t = parseFloat(e);
|
|
709
|
-
return t < 0 ? 0 : t > 100 ? 1 : t / 100;
|
|
710
|
-
}
|
|
711
|
-
function qt(e) {
|
|
712
|
-
let t = On(e);
|
|
713
|
-
if (t === null) return e;
|
|
714
|
-
t = t || 0;
|
|
715
|
-
const r = (t & 4278190080) >>> 24, n = (t & 16711680) >>> 16, s = (t & 65280) >>> 8, i = (t & 255) / 255;
|
|
716
|
-
return `rgba(${r}, ${n}, ${s}, ${i})`;
|
|
717
|
-
}
|
|
718
|
-
var we = (e, t, r) => {
|
|
719
|
-
if (c.fun(e))
|
|
720
|
-
return e;
|
|
721
|
-
if (c.arr(e))
|
|
722
|
-
return we({
|
|
723
|
-
range: e,
|
|
724
|
-
output: t,
|
|
725
|
-
extrapolate: r
|
|
726
|
-
});
|
|
727
|
-
if (c.str(e.output[0]))
|
|
728
|
-
return wt(e);
|
|
729
|
-
const n = e, s = n.output, i = n.range || [0, 1], a = n.extrapolateLeft || n.extrapolate || "extend", u = n.extrapolateRight || n.extrapolate || "extend", f = n.easing || ((l) => l);
|
|
730
|
-
return (l) => {
|
|
731
|
-
const p = Fn(l, i);
|
|
732
|
-
return jn(
|
|
733
|
-
l,
|
|
734
|
-
i[p],
|
|
735
|
-
i[p + 1],
|
|
736
|
-
s[p],
|
|
737
|
-
s[p + 1],
|
|
738
|
-
f,
|
|
739
|
-
a,
|
|
740
|
-
u,
|
|
741
|
-
n.map
|
|
742
|
-
);
|
|
743
|
-
};
|
|
744
|
-
};
|
|
745
|
-
function jn(e, t, r, n, s, i, a, u, f) {
|
|
746
|
-
let l = f ? f(e) : e;
|
|
747
|
-
if (l < t) {
|
|
748
|
-
if (a === "identity") return l;
|
|
749
|
-
a === "clamp" && (l = t);
|
|
750
|
-
}
|
|
751
|
-
if (l > r) {
|
|
752
|
-
if (u === "identity") return l;
|
|
753
|
-
u === "clamp" && (l = r);
|
|
754
|
-
}
|
|
755
|
-
return n === s ? n : t === r ? e <= t ? n : s : (t === -1 / 0 ? l = -l : r === 1 / 0 ? l = l - t : l = (l - t) / (r - t), l = i(l), n === -1 / 0 ? l = -l : s === 1 / 0 ? l = l + n : l = l * (s - n) + n, l);
|
|
756
|
-
}
|
|
757
|
-
function Fn(e, t) {
|
|
758
|
-
for (var r = 1; r < t.length - 1 && !(t[r] >= e); ++r)
|
|
759
|
-
;
|
|
760
|
-
return r - 1;
|
|
761
|
-
}
|
|
762
|
-
var Vn = {
|
|
763
|
-
linear: (e) => e
|
|
764
|
-
}, Re = Symbol.for("FluidValue.get"), oe = Symbol.for("FluidValue.observers"), V = (e) => !!(e && e[Re]), O = (e) => e && e[Re] ? e[Re]() : e, Mt = (e) => e[oe] || null;
|
|
765
|
-
function Nn(e, t) {
|
|
766
|
-
e.eventObserved ? e.eventObserved(t) : e(t);
|
|
767
|
-
}
|
|
768
|
-
function Se(e, t) {
|
|
769
|
-
const r = e[oe];
|
|
770
|
-
r && r.forEach((n) => {
|
|
771
|
-
Nn(n, t);
|
|
772
|
-
});
|
|
773
|
-
}
|
|
774
|
-
var Sr = class {
|
|
775
|
-
constructor(e) {
|
|
776
|
-
if (!e && !(e = this.get))
|
|
777
|
-
throw Error("Unknown getter");
|
|
778
|
-
$n(this, e);
|
|
779
|
-
}
|
|
780
|
-
}, $n = (e, t) => xr(e, Re, t);
|
|
781
|
-
function le(e, t) {
|
|
782
|
-
if (e[Re]) {
|
|
783
|
-
let r = e[oe];
|
|
784
|
-
r || xr(e, oe, r = /* @__PURE__ */ new Set()), r.has(t) || (r.add(t), e.observerAdded && e.observerAdded(r.size, t));
|
|
785
|
-
}
|
|
786
|
-
return t;
|
|
787
|
-
}
|
|
788
|
-
function xe(e, t) {
|
|
789
|
-
const r = e[oe];
|
|
790
|
-
if (r && r.has(t)) {
|
|
791
|
-
const n = r.size - 1;
|
|
792
|
-
n ? r.delete(t) : e[oe] = null, e.observerRemoved && e.observerRemoved(n, t);
|
|
793
|
-
}
|
|
794
|
-
}
|
|
795
|
-
var xr = (e, t, r) => Object.defineProperty(e, t, {
|
|
796
|
-
value: r,
|
|
797
|
-
writable: !0,
|
|
798
|
-
configurable: !0
|
|
799
|
-
}), Ve = /[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, Dn = /(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi, zt = new RegExp(`(${Ve.source})(%|[a-z]+)`, "i"), Un = /rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi, Qe = /var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/, Ar = (e) => {
|
|
800
|
-
const [t, r] = qn(e);
|
|
801
|
-
if (!t || bt())
|
|
802
|
-
return e;
|
|
803
|
-
const n = window.getComputedStyle(document.documentElement).getPropertyValue(t);
|
|
804
|
-
if (n)
|
|
805
|
-
return n.trim();
|
|
806
|
-
if (r && r.startsWith("--")) {
|
|
807
|
-
const s = window.getComputedStyle(document.documentElement).getPropertyValue(r);
|
|
808
|
-
return s || e;
|
|
809
|
-
} else {
|
|
810
|
-
if (r && Qe.test(r))
|
|
811
|
-
return Ar(r);
|
|
812
|
-
if (r)
|
|
813
|
-
return r;
|
|
814
|
-
}
|
|
815
|
-
return e;
|
|
816
|
-
}, qn = (e) => {
|
|
817
|
-
const t = Qe.exec(e);
|
|
818
|
-
if (!t) return [,];
|
|
819
|
-
const [, r, n] = t;
|
|
820
|
-
return [r, n];
|
|
821
|
-
}, tt, Mn = (e, t, r, n, s) => `rgba(${Math.round(t)}, ${Math.round(r)}, ${Math.round(n)}, ${s})`, Pr = (e) => {
|
|
822
|
-
tt || (tt = Z ? (
|
|
823
|
-
// match color names, ignore partial matches
|
|
824
|
-
new RegExp(`(${Object.keys(Z).join("|")})(?!\\w)`, "g")
|
|
825
|
-
) : (
|
|
826
|
-
// never match
|
|
827
|
-
/^\b$/
|
|
828
|
-
));
|
|
829
|
-
const t = e.output.map((i) => O(i).replace(Qe, Ar).replace(Dn, qt).replace(tt, qt)), r = t.map((i) => i.match(Ve).map(Number)), s = r[0].map(
|
|
830
|
-
(i, a) => r.map((u) => {
|
|
831
|
-
if (!(a in u))
|
|
832
|
-
throw Error('The arity of each "output" value must be equal');
|
|
833
|
-
return u[a];
|
|
834
|
-
})
|
|
835
|
-
).map(
|
|
836
|
-
(i) => we({ ...e, output: i })
|
|
837
|
-
);
|
|
838
|
-
return (i) => {
|
|
839
|
-
var f;
|
|
840
|
-
const a = !zt.test(t[0]) && ((f = t.find((l) => zt.test(l))) == null ? void 0 : f.replace(Ve, ""));
|
|
841
|
-
let u = 0;
|
|
842
|
-
return t[0].replace(
|
|
843
|
-
Ve,
|
|
844
|
-
() => `${s[u++](i)}${a || ""}`
|
|
845
|
-
).replace(Un, Mn);
|
|
846
|
-
};
|
|
847
|
-
}, St = "react-spring: ", Er = (e) => {
|
|
848
|
-
const t = e;
|
|
849
|
-
let r = !1;
|
|
850
|
-
if (typeof t != "function")
|
|
851
|
-
throw new TypeError(`${St}once requires a function parameter`);
|
|
852
|
-
return (...n) => {
|
|
853
|
-
r || (t(...n), r = !0);
|
|
854
|
-
};
|
|
855
|
-
}, zn = Er(console.warn);
|
|
856
|
-
function Ln() {
|
|
857
|
-
zn(
|
|
858
|
-
`${St}The "interpolate" function is deprecated in v9 (use "to" instead)`
|
|
859
|
-
);
|
|
860
|
-
}
|
|
861
|
-
var Qn = Er(console.warn);
|
|
862
|
-
function Gn() {
|
|
863
|
-
Qn(
|
|
864
|
-
`${St}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`
|
|
865
|
-
);
|
|
866
|
-
}
|
|
867
|
-
function Ge(e) {
|
|
868
|
-
return c.str(e) && (e[0] == "#" || /\d/.test(e) || // Do not identify a CSS variable as an AnimatedString if its SSR
|
|
869
|
-
!bt() && Qe.test(e) || e in (Z || {}));
|
|
870
|
-
}
|
|
871
|
-
var xt = bt() ? ue : Kr, Yn = () => {
|
|
872
|
-
const e = L(!1);
|
|
873
|
-
return xt(() => (e.current = !0, () => {
|
|
874
|
-
e.current = !1;
|
|
875
|
-
}), []), e;
|
|
876
|
-
};
|
|
877
|
-
function Tr() {
|
|
878
|
-
const e = Fe()[1], t = Yn();
|
|
879
|
-
return () => {
|
|
880
|
-
t.current && e(Math.random());
|
|
881
|
-
};
|
|
278
|
+
})()), g;
|
|
882
279
|
}
|
|
883
|
-
var
|
|
884
|
-
function
|
|
885
|
-
|
|
886
|
-
return ue(() => {
|
|
887
|
-
t.current = e;
|
|
888
|
-
}), t.current;
|
|
280
|
+
var X;
|
|
281
|
+
function Se() {
|
|
282
|
+
return X || (X = 1, process.env.NODE_ENV === "production" ? N.exports = Ae() : N.exports = ge()), N.exports;
|
|
889
283
|
}
|
|
890
|
-
var
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
}
|
|
894
|
-
/** Get every `AnimatedValue` used by this node. */
|
|
895
|
-
getPayload() {
|
|
896
|
-
return this.payload || [];
|
|
897
|
-
}
|
|
898
|
-
}, We = class Ir extends Cr {
|
|
899
|
-
constructor(t) {
|
|
900
|
-
super(), this._value = t, this.done = !0, this.durationProgress = 0, c.num(this._value) && (this.lastPosition = this._value);
|
|
901
|
-
}
|
|
902
|
-
/** @internal */
|
|
903
|
-
static create(t) {
|
|
904
|
-
return new Ir(t);
|
|
905
|
-
}
|
|
906
|
-
getPayload() {
|
|
907
|
-
return [this];
|
|
908
|
-
}
|
|
909
|
-
getValue() {
|
|
910
|
-
return this._value;
|
|
911
|
-
}
|
|
912
|
-
setValue(t, r) {
|
|
913
|
-
return c.num(t) && (this.lastPosition = t, r && (t = Math.round(t / r) * r, this.done && (this.lastPosition = t))), this._value === t ? !1 : (this._value = t, !0);
|
|
914
|
-
}
|
|
915
|
-
reset() {
|
|
916
|
-
const { done: t } = this;
|
|
917
|
-
this.done = !1, c.num(this._value) && (this.elapsedTime = 0, this.durationProgress = 0, this.lastPosition = this._value, t && (this.lastVelocity = null), this.v0 = null);
|
|
918
|
-
}
|
|
919
|
-
}, Ue = class Or extends We {
|
|
920
|
-
constructor(t) {
|
|
921
|
-
super(0), this._string = null, this._toString = we({
|
|
922
|
-
output: [t, t]
|
|
923
|
-
});
|
|
924
|
-
}
|
|
925
|
-
/** @internal */
|
|
926
|
-
static create(t) {
|
|
927
|
-
return new Or(t);
|
|
928
|
-
}
|
|
929
|
-
getValue() {
|
|
930
|
-
const t = this._string;
|
|
931
|
-
return t ?? (this._string = this._toString(this._value));
|
|
932
|
-
}
|
|
933
|
-
setValue(t) {
|
|
934
|
-
if (c.str(t)) {
|
|
935
|
-
if (t == this._string)
|
|
936
|
-
return !1;
|
|
937
|
-
this._string = t, this._value = 1;
|
|
938
|
-
} else if (super.setValue(t))
|
|
939
|
-
this._string = null;
|
|
940
|
-
else
|
|
941
|
-
return !1;
|
|
942
|
-
return !0;
|
|
943
|
-
}
|
|
944
|
-
reset(t) {
|
|
945
|
-
t && (this._toString = we({
|
|
946
|
-
output: [this.getValue(), t]
|
|
947
|
-
})), this._value = 0, super.reset();
|
|
948
|
-
}
|
|
949
|
-
}, qe = { dependencies: null }, Be = class extends Cr {
|
|
950
|
-
constructor(e) {
|
|
951
|
-
super(), this.source = e, this.setValue(e);
|
|
952
|
-
}
|
|
953
|
-
getValue(e) {
|
|
954
|
-
const t = {};
|
|
955
|
-
return Q(this.source, (r, n) => {
|
|
956
|
-
Bn(r) ? t[n] = r.getValue(e) : V(r) ? t[n] = O(r) : e || (t[n] = r);
|
|
957
|
-
}), t;
|
|
958
|
-
}
|
|
959
|
-
/** Replace the raw object data */
|
|
960
|
-
setValue(e) {
|
|
961
|
-
this.source = e, this.payload = this._makePayload(e);
|
|
962
|
-
}
|
|
963
|
-
reset() {
|
|
964
|
-
this.payload && x(this.payload, (e) => e.reset());
|
|
965
|
-
}
|
|
966
|
-
/** Create a payload set. */
|
|
967
|
-
_makePayload(e) {
|
|
968
|
-
if (e) {
|
|
969
|
-
const t = /* @__PURE__ */ new Set();
|
|
970
|
-
return Q(e, this._addToPayload, t), Array.from(t);
|
|
971
|
-
}
|
|
972
|
-
}
|
|
973
|
-
/** Add to a payload set. */
|
|
974
|
-
_addToPayload(e) {
|
|
975
|
-
qe.dependencies && V(e) && qe.dependencies.add(e);
|
|
976
|
-
const t = Ye(e);
|
|
977
|
-
t && x(t, (r) => this.add(r));
|
|
978
|
-
}
|
|
979
|
-
}, Hn = class jr extends Be {
|
|
980
|
-
constructor(t) {
|
|
981
|
-
super(t);
|
|
982
|
-
}
|
|
983
|
-
/** @internal */
|
|
984
|
-
static create(t) {
|
|
985
|
-
return new jr(t);
|
|
986
|
-
}
|
|
987
|
-
getValue() {
|
|
988
|
-
return this.source.map((t) => t.getValue());
|
|
989
|
-
}
|
|
990
|
-
setValue(t) {
|
|
991
|
-
const r = this.getPayload();
|
|
992
|
-
return t.length == r.length ? r.map((n, s) => n.setValue(t[s])).some(Boolean) : (super.setValue(t.map(Jn)), !0);
|
|
993
|
-
}
|
|
994
|
-
};
|
|
995
|
-
function Jn(e) {
|
|
996
|
-
return (Ge(e) ? Ue : We).create(e);
|
|
997
|
-
}
|
|
998
|
-
function ut(e) {
|
|
999
|
-
const t = z(e);
|
|
1000
|
-
return t ? t.constructor : c.arr(e) ? Hn : Ge(e) ? Ue : We;
|
|
1001
|
-
}
|
|
1002
|
-
var Qt = (e, t) => {
|
|
1003
|
-
const r = (
|
|
1004
|
-
// Function components must use "forwardRef" to avoid being
|
|
1005
|
-
// re-rendered on every animation frame.
|
|
1006
|
-
!c.fun(e) || e.prototype && e.prototype.isReactComponent
|
|
1007
|
-
);
|
|
1008
|
-
return en((n, s) => {
|
|
1009
|
-
const i = L(null), a = r && // eslint-disable-next-line react-hooks/rules-of-hooks
|
|
1010
|
-
tn(
|
|
1011
|
-
(_) => {
|
|
1012
|
-
i.current = Kn(s, _);
|
|
1013
|
-
},
|
|
1014
|
-
[s]
|
|
1015
|
-
), [u, f] = Zn(n, t), l = Tr(), p = () => {
|
|
1016
|
-
const _ = i.current;
|
|
1017
|
-
if (r && !_)
|
|
1018
|
-
return;
|
|
1019
|
-
(_ ? t.applyAnimatedValues(_, u.getValue(!0)) : !1) === !1 && l();
|
|
1020
|
-
}, h = new Xn(p, f), d = L(void 0);
|
|
1021
|
-
xt(() => (d.current = h, x(f, (_) => le(_, h)), () => {
|
|
1022
|
-
d.current && (x(
|
|
1023
|
-
d.current.deps,
|
|
1024
|
-
(_) => xe(_, d.current)
|
|
1025
|
-
), b.cancel(d.current.update));
|
|
1026
|
-
})), ue(p, []), kr(() => () => {
|
|
1027
|
-
const _ = d.current;
|
|
1028
|
-
x(_.deps, (v) => xe(v, _));
|
|
1029
|
-
});
|
|
1030
|
-
const m = t.getComponentProps(u.getValue());
|
|
1031
|
-
return /* @__PURE__ */ cr.createElement(e, { ...m, ref: a });
|
|
1032
|
-
});
|
|
1033
|
-
}, Xn = class {
|
|
1034
|
-
constructor(e, t) {
|
|
1035
|
-
this.update = e, this.deps = t;
|
|
1036
|
-
}
|
|
1037
|
-
eventObserved(e) {
|
|
1038
|
-
e.type == "change" && b.write(this.update);
|
|
1039
|
-
}
|
|
1040
|
-
};
|
|
1041
|
-
function Zn(e, t) {
|
|
1042
|
-
const r = /* @__PURE__ */ new Set();
|
|
1043
|
-
return qe.dependencies = r, e.style && (e = {
|
|
1044
|
-
...e,
|
|
1045
|
-
style: t.createAnimatedStyle(e.style)
|
|
1046
|
-
}), e = new Be(e), qe.dependencies = null, [e, r];
|
|
1047
|
-
}
|
|
1048
|
-
function Kn(e, t) {
|
|
1049
|
-
return e && (c.fun(e) ? e(t) : e.current = t), t;
|
|
1050
|
-
}
|
|
1051
|
-
var Gt = Symbol.for("AnimatedComponent"), es = (e, {
|
|
1052
|
-
applyAnimatedValues: t = () => !1,
|
|
1053
|
-
createAnimatedStyle: r = (s) => new Be(s),
|
|
1054
|
-
getComponentProps: n = (s) => s
|
|
1055
|
-
} = {}) => {
|
|
1056
|
-
const s = {
|
|
1057
|
-
applyAnimatedValues: t,
|
|
1058
|
-
createAnimatedStyle: r,
|
|
1059
|
-
getComponentProps: n
|
|
1060
|
-
}, i = (a) => {
|
|
1061
|
-
const u = Yt(a) || "Anonymous";
|
|
1062
|
-
return c.str(a) ? a = i[a] || (i[a] = Qt(a, s)) : a = a[Gt] || (a[Gt] = Qt(a, s)), a.displayName = `Animated(${u})`, a;
|
|
1063
|
-
};
|
|
1064
|
-
return Q(e, (a, u) => {
|
|
1065
|
-
c.arr(e) && (u = Yt(a)), i[u] = i(a);
|
|
1066
|
-
}), {
|
|
1067
|
-
animated: i
|
|
1068
|
-
};
|
|
1069
|
-
}, Yt = (e) => c.str(e) ? e : e && c.str(e.displayName) ? e.displayName : c.fun(e) && e.name || null;
|
|
1070
|
-
function ee(e, ...t) {
|
|
1071
|
-
return c.fun(e) ? e(...t) : e;
|
|
1072
|
-
}
|
|
1073
|
-
var _e = (e, t) => e === !0 || !!(t && e && (c.fun(e) ? e(t) : F(e).includes(t))), Fr = (e, t) => c.obj(e) ? t && e[t] : e, Vr = (e, t) => e.default === !0 ? e[t] : e.default ? e.default[t] : void 0, ts = (e) => e, Pt = (e, t = ts) => {
|
|
1074
|
-
let r = rs;
|
|
1075
|
-
e.default && e.default !== !0 && (e = e.default, r = Object.keys(e));
|
|
1076
|
-
const n = {};
|
|
1077
|
-
for (const s of r) {
|
|
1078
|
-
const i = t(e[s], s);
|
|
1079
|
-
c.und(i) || (n[s] = i);
|
|
1080
|
-
}
|
|
1081
|
-
return n;
|
|
1082
|
-
}, rs = [
|
|
1083
|
-
"config",
|
|
1084
|
-
"onProps",
|
|
1085
|
-
"onStart",
|
|
1086
|
-
"onChange",
|
|
1087
|
-
"onPause",
|
|
1088
|
-
"onResume",
|
|
1089
|
-
"onRest"
|
|
1090
|
-
], ns = {
|
|
1091
|
-
config: 1,
|
|
1092
|
-
from: 1,
|
|
1093
|
-
to: 1,
|
|
1094
|
-
ref: 1,
|
|
1095
|
-
loop: 1,
|
|
1096
|
-
reset: 1,
|
|
1097
|
-
pause: 1,
|
|
1098
|
-
cancel: 1,
|
|
1099
|
-
reverse: 1,
|
|
1100
|
-
immediate: 1,
|
|
1101
|
-
default: 1,
|
|
1102
|
-
delay: 1,
|
|
1103
|
-
onProps: 1,
|
|
1104
|
-
onStart: 1,
|
|
1105
|
-
onChange: 1,
|
|
1106
|
-
onPause: 1,
|
|
1107
|
-
onResume: 1,
|
|
1108
|
-
onRest: 1,
|
|
1109
|
-
onResolve: 1,
|
|
1110
|
-
// Transition props
|
|
1111
|
-
items: 1,
|
|
1112
|
-
trail: 1,
|
|
1113
|
-
sort: 1,
|
|
1114
|
-
expires: 1,
|
|
1115
|
-
initial: 1,
|
|
1116
|
-
enter: 1,
|
|
1117
|
-
update: 1,
|
|
1118
|
-
leave: 1,
|
|
1119
|
-
children: 1,
|
|
1120
|
-
onDestroyed: 1,
|
|
1121
|
-
// Internal props
|
|
1122
|
-
keys: 1,
|
|
1123
|
-
callId: 1,
|
|
1124
|
-
parentId: 1
|
|
1125
|
-
};
|
|
1126
|
-
function ss(e) {
|
|
1127
|
-
const t = {};
|
|
1128
|
-
let r = 0;
|
|
1129
|
-
if (Q(e, (n, s) => {
|
|
1130
|
-
ns[s] || (t[s] = n, r++);
|
|
1131
|
-
}), r)
|
|
1132
|
-
return t;
|
|
1133
|
-
}
|
|
1134
|
-
function Nr(e) {
|
|
1135
|
-
const t = ss(e);
|
|
1136
|
-
if (t) {
|
|
1137
|
-
const r = { to: t };
|
|
1138
|
-
return Q(e, (n, s) => s in t || (r[s] = n)), r;
|
|
1139
|
-
}
|
|
1140
|
-
return { ...e };
|
|
1141
|
-
}
|
|
1142
|
-
function Pe(e) {
|
|
1143
|
-
return e = O(e), c.arr(e) ? e.map(Pe) : Ge(e) ? q.createStringInterpolator({
|
|
1144
|
-
range: [0, 1],
|
|
1145
|
-
output: [e, e]
|
|
1146
|
-
})(1) : e;
|
|
1147
|
-
}
|
|
1148
|
-
function is(e) {
|
|
1149
|
-
for (const t in e) return !0;
|
|
1150
|
-
return !1;
|
|
1151
|
-
}
|
|
1152
|
-
function lt(e) {
|
|
1153
|
-
return c.fun(e) || c.arr(e) && c.obj(e[0]);
|
|
1154
|
-
}
|
|
1155
|
-
function as(e, t) {
|
|
1156
|
-
var r;
|
|
1157
|
-
(r = e.ref) == null || r.delete(e), t == null || t.delete(e);
|
|
1158
|
-
}
|
|
1159
|
-
function os(e, t) {
|
|
1160
|
-
var r;
|
|
1161
|
-
t && e.ref !== t && ((r = e.ref) == null || r.delete(e), t.add(e), e.ref = t);
|
|
1162
|
-
}
|
|
1163
|
-
var us = {
|
|
1164
|
-
default: { tension: 170, friction: 26 }
|
|
1165
|
-
}, ct = {
|
|
1166
|
-
...us.default,
|
|
1167
|
-
mass: 1,
|
|
1168
|
-
damping: 1,
|
|
1169
|
-
easing: Vn.linear,
|
|
1170
|
-
clamp: !1
|
|
1171
|
-
}, ls = class {
|
|
1172
|
-
constructor() {
|
|
1173
|
-
this.velocity = 0, Object.assign(this, ct);
|
|
1174
|
-
}
|
|
1175
|
-
};
|
|
1176
|
-
function cs(e, t, r) {
|
|
1177
|
-
r && (r = { ...r }, Wt(r, t), t = { ...r, ...t }), Wt(e, t), Object.assign(e, t);
|
|
1178
|
-
for (const a in ct)
|
|
1179
|
-
e[a] == null && (e[a] = ct[a]);
|
|
1180
|
-
let { frequency: n, damping: s } = e;
|
|
1181
|
-
const { mass: i } = e;
|
|
1182
|
-
return c.und(n) || (n < 0.01 && (n = 0.01), s < 0 && (s = 0), e.tension = Math.pow(2 * Math.PI / n, 2) * i, e.friction = 4 * Math.PI * s * i / n), e;
|
|
1183
|
-
}
|
|
1184
|
-
function Wt(e, t) {
|
|
1185
|
-
if (!c.und(t.decay))
|
|
1186
|
-
e.duration = void 0;
|
|
1187
|
-
else {
|
|
1188
|
-
const r = !c.und(t.tension) || !c.und(t.friction);
|
|
1189
|
-
(r || !c.und(t.frequency) || !c.und(t.damping) || !c.und(t.mass)) && (e.duration = void 0, e.decay = void 0), r && (e.frequency = void 0);
|
|
1190
|
-
}
|
|
1191
|
-
}
|
|
1192
|
-
var Bt = [], ds = class {
|
|
1193
|
-
constructor() {
|
|
1194
|
-
this.changed = !1, this.values = Bt, this.toValues = null, this.fromValues = Bt, this.config = new ls(), this.immediate = !1;
|
|
1195
|
-
}
|
|
1196
|
-
};
|
|
1197
|
-
function $r(e, { key: t, props: r, defaultProps: n, state: s, actions: i }) {
|
|
1198
|
-
return new Promise((a, u) => {
|
|
1199
|
-
let f, l, p = _e(r.cancel ?? (n == null ? void 0 : n.cancel), t);
|
|
1200
|
-
if (p)
|
|
1201
|
-
m();
|
|
1202
|
-
else {
|
|
1203
|
-
c.und(r.pause) || (s.paused = _e(r.pause, t));
|
|
1204
|
-
let _ = n == null ? void 0 : n.pause;
|
|
1205
|
-
_ !== !0 && (_ = s.paused || _e(_, t)), f = ee(r.delay || 0, t), _ ? (s.resumeQueue.add(d), i.pause()) : (i.resume(), d());
|
|
1206
|
-
}
|
|
1207
|
-
function h() {
|
|
1208
|
-
s.resumeQueue.add(d), s.timeouts.delete(l), l.cancel(), f = l.time - b.now();
|
|
1209
|
-
}
|
|
1210
|
-
function d() {
|
|
1211
|
-
f > 0 && !q.skipAnimation ? (s.delayed = !0, l = b.setTimeout(m, f), s.pauseQueue.add(h), s.timeouts.add(l)) : m();
|
|
1212
|
-
}
|
|
1213
|
-
function m() {
|
|
1214
|
-
s.delayed && (s.delayed = !1), s.pauseQueue.delete(h), s.timeouts.delete(l), e <= (s.cancelId || 0) && (p = !0);
|
|
1215
|
-
try {
|
|
1216
|
-
i.start({ ...r, callId: e, cancel: p }, a);
|
|
1217
|
-
} catch (_) {
|
|
1218
|
-
u(_);
|
|
1219
|
-
}
|
|
1220
|
-
}
|
|
1221
|
-
});
|
|
1222
|
-
}
|
|
1223
|
-
var Et = (e, t) => t.length == 1 ? t[0] : t.some((r) => r.cancelled) ? ae(e.get()) : t.every((r) => r.noop) ? Dr(e.get()) : $(
|
|
1224
|
-
e.get(),
|
|
1225
|
-
t.every((r) => r.finished)
|
|
1226
|
-
), Dr = (e) => ({
|
|
1227
|
-
value: e,
|
|
1228
|
-
noop: !0,
|
|
1229
|
-
finished: !0,
|
|
1230
|
-
cancelled: !1
|
|
1231
|
-
}), $ = (e, t, r = !1) => ({
|
|
1232
|
-
value: e,
|
|
1233
|
-
finished: t,
|
|
1234
|
-
cancelled: r
|
|
1235
|
-
}), ae = (e) => ({
|
|
1236
|
-
value: e,
|
|
1237
|
-
cancelled: !0,
|
|
1238
|
-
finished: !1
|
|
1239
|
-
});
|
|
1240
|
-
function Ur(e, t, r, n) {
|
|
1241
|
-
const { callId: s, parentId: i, onRest: a } = t, { asyncTo: u, promise: f } = r;
|
|
1242
|
-
return !i && e === u && !t.reset ? f : r.promise = (async () => {
|
|
1243
|
-
r.asyncId = s, r.asyncTo = e;
|
|
1244
|
-
const l = Pt(
|
|
1245
|
-
t,
|
|
1246
|
-
(w, g) => (
|
|
1247
|
-
// The `onRest` prop is only called when the `runAsync` promise is resolved.
|
|
1248
|
-
g === "onRest" ? void 0 : w
|
|
1249
|
-
)
|
|
1250
|
-
);
|
|
1251
|
-
let p, h;
|
|
1252
|
-
const d = new Promise(
|
|
1253
|
-
(w, g) => (p = w, h = g)
|
|
1254
|
-
), m = (w) => {
|
|
1255
|
-
const g = (
|
|
1256
|
-
// The `cancel` prop or `stop` method was used.
|
|
1257
|
-
s <= (r.cancelId || 0) && ae(n) || // The async `to` prop was replaced.
|
|
1258
|
-
s !== r.asyncId && $(n, !1)
|
|
1259
|
-
);
|
|
1260
|
-
if (g)
|
|
1261
|
-
throw w.result = g, h(w), w;
|
|
1262
|
-
}, _ = (w, g) => {
|
|
1263
|
-
const R = new Ht(), y = new Jt();
|
|
1264
|
-
return (async () => {
|
|
1265
|
-
if (q.skipAnimation)
|
|
1266
|
-
throw Ee(r), y.result = $(n, !1), h(y), y;
|
|
1267
|
-
m(R);
|
|
1268
|
-
const A = c.obj(w) ? { ...w } : { ...g, to: w };
|
|
1269
|
-
A.parentId = s, Q(l, (G, I) => {
|
|
1270
|
-
c.und(A[I]) && (A[I] = G);
|
|
1271
|
-
});
|
|
1272
|
-
const P = await n.start(A);
|
|
1273
|
-
return m(R), r.paused && await new Promise((G) => {
|
|
1274
|
-
r.resumeQueue.add(G);
|
|
1275
|
-
}), P;
|
|
1276
|
-
})();
|
|
1277
|
-
};
|
|
1278
|
-
let v;
|
|
1279
|
-
if (q.skipAnimation)
|
|
1280
|
-
return Ee(r), $(n, !1);
|
|
1281
|
-
try {
|
|
1282
|
-
let w;
|
|
1283
|
-
c.arr(e) ? w = (async (g) => {
|
|
1284
|
-
for (const R of g)
|
|
1285
|
-
await _(R);
|
|
1286
|
-
})(e) : w = Promise.resolve(e(_, n.stop.bind(n))), await Promise.all([w.then(p), d]), v = $(n.get(), !0, !1);
|
|
1287
|
-
} catch (w) {
|
|
1288
|
-
if (w instanceof Ht)
|
|
1289
|
-
v = w.result;
|
|
1290
|
-
else if (w instanceof Jt)
|
|
1291
|
-
v = w.result;
|
|
1292
|
-
else
|
|
1293
|
-
throw w;
|
|
1294
|
-
} finally {
|
|
1295
|
-
s == r.asyncId && (r.asyncId = i, r.asyncTo = i ? u : void 0, r.promise = i ? f : void 0);
|
|
1296
|
-
}
|
|
1297
|
-
return c.fun(a) && b.batchedUpdates(() => {
|
|
1298
|
-
a(v, n, n.item);
|
|
1299
|
-
}), v;
|
|
1300
|
-
})();
|
|
1301
|
-
}
|
|
1302
|
-
function Ee(e, t) {
|
|
1303
|
-
ve(e.timeouts, (r) => r.cancel()), e.pauseQueue.clear(), e.resumeQueue.clear(), e.asyncId = e.asyncTo = e.promise = void 0, t && (e.cancelId = t);
|
|
1304
|
-
}
|
|
1305
|
-
var Ht = class extends Error {
|
|
1306
|
-
constructor() {
|
|
1307
|
-
super(
|
|
1308
|
-
"An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise."
|
|
1309
|
-
);
|
|
1310
|
-
}
|
|
1311
|
-
}, Jt = class extends Error {
|
|
1312
|
-
constructor() {
|
|
1313
|
-
super("SkipAnimationSignal");
|
|
1314
|
-
}
|
|
1315
|
-
}, dt = (e) => e instanceof Tt, fs = 1, Tt = class extends Sr {
|
|
1316
|
-
constructor() {
|
|
1317
|
-
super(...arguments), this.id = fs++, this._priority = 0;
|
|
1318
|
-
}
|
|
1319
|
-
get priority() {
|
|
1320
|
-
return this._priority;
|
|
1321
|
-
}
|
|
1322
|
-
set priority(e) {
|
|
1323
|
-
this._priority != e && (this._priority = e, this._onPriorityChange(e));
|
|
1324
|
-
}
|
|
1325
|
-
/** Get the current value */
|
|
1326
|
-
get() {
|
|
1327
|
-
const e = z(this);
|
|
1328
|
-
return e && e.getValue();
|
|
1329
|
-
}
|
|
1330
|
-
/** Create a spring that maps our value to another value */
|
|
1331
|
-
to(...e) {
|
|
1332
|
-
return q.to(this, e);
|
|
1333
|
-
}
|
|
1334
|
-
/** @deprecated Use the `to` method instead. */
|
|
1335
|
-
interpolate(...e) {
|
|
1336
|
-
return Ln(), q.to(this, e);
|
|
1337
|
-
}
|
|
1338
|
-
toJSON() {
|
|
1339
|
-
return this.get();
|
|
1340
|
-
}
|
|
1341
|
-
observerAdded(e) {
|
|
1342
|
-
e == 1 && this._attach();
|
|
1343
|
-
}
|
|
1344
|
-
observerRemoved(e) {
|
|
1345
|
-
e == 0 && this._detach();
|
|
1346
|
-
}
|
|
1347
|
-
/** Called when the first child is added. */
|
|
1348
|
-
_attach() {
|
|
1349
|
-
}
|
|
1350
|
-
/** Called when the last child is removed. */
|
|
1351
|
-
_detach() {
|
|
1352
|
-
}
|
|
1353
|
-
/** Tell our children about our new value */
|
|
1354
|
-
_onChange(e, t = !1) {
|
|
1355
|
-
Se(this, {
|
|
1356
|
-
type: "change",
|
|
1357
|
-
parent: this,
|
|
1358
|
-
value: e,
|
|
1359
|
-
idle: t
|
|
1360
|
-
});
|
|
1361
|
-
}
|
|
1362
|
-
/** Tell our children about our new priority */
|
|
1363
|
-
_onPriorityChange(e) {
|
|
1364
|
-
this.idle || ze.sort(this), Se(this, {
|
|
1365
|
-
type: "priority",
|
|
1366
|
-
parent: this,
|
|
1367
|
-
priority: e
|
|
1368
|
-
});
|
|
1369
|
-
}
|
|
1370
|
-
}, te = Symbol.for("SpringPhase"), qr = 1, ft = 2, ht = 4, rt = (e) => (e[te] & qr) > 0, H = (e) => (e[te] & ft) > 0, fe = (e) => (e[te] & ht) > 0, Xt = (e, t) => t ? e[te] |= ft | qr : e[te] &= ~ft, Zt = (e, t) => t ? e[te] |= ht : e[te] &= ~ht, hs = class extends Tt {
|
|
1371
|
-
constructor(e, t) {
|
|
1372
|
-
if (super(), this.animation = new ds(), this.defaultProps = {}, this._state = {
|
|
1373
|
-
paused: !1,
|
|
1374
|
-
delayed: !1,
|
|
1375
|
-
pauseQueue: /* @__PURE__ */ new Set(),
|
|
1376
|
-
resumeQueue: /* @__PURE__ */ new Set(),
|
|
1377
|
-
timeouts: /* @__PURE__ */ new Set()
|
|
1378
|
-
}, this._pendingCalls = /* @__PURE__ */ new Set(), this._lastCallId = 0, this._lastToId = 0, this._memoizedDuration = 0, !c.und(e) || !c.und(t)) {
|
|
1379
|
-
const r = c.obj(e) ? { ...e } : { ...t, from: e };
|
|
1380
|
-
c.und(r.default) && (r.default = !0), this.start(r);
|
|
1381
|
-
}
|
|
1382
|
-
}
|
|
1383
|
-
/** Equals true when not advancing on each frame. */
|
|
1384
|
-
get idle() {
|
|
1385
|
-
return !(H(this) || this._state.asyncTo) || fe(this);
|
|
1386
|
-
}
|
|
1387
|
-
get goal() {
|
|
1388
|
-
return O(this.animation.to);
|
|
1389
|
-
}
|
|
1390
|
-
get velocity() {
|
|
1391
|
-
const e = z(this);
|
|
1392
|
-
return e instanceof We ? e.lastVelocity || 0 : e.getPayload().map((t) => t.lastVelocity || 0);
|
|
1393
|
-
}
|
|
1394
|
-
/**
|
|
1395
|
-
* When true, this value has been animated at least once.
|
|
1396
|
-
*/
|
|
1397
|
-
get hasAnimated() {
|
|
1398
|
-
return rt(this);
|
|
1399
|
-
}
|
|
1400
|
-
/**
|
|
1401
|
-
* When true, this value has an unfinished animation,
|
|
1402
|
-
* which is either active or paused.
|
|
1403
|
-
*/
|
|
1404
|
-
get isAnimating() {
|
|
1405
|
-
return H(this);
|
|
1406
|
-
}
|
|
1407
|
-
/**
|
|
1408
|
-
* When true, all current and future animations are paused.
|
|
1409
|
-
*/
|
|
1410
|
-
get isPaused() {
|
|
1411
|
-
return fe(this);
|
|
1412
|
-
}
|
|
1413
|
-
/**
|
|
1414
|
-
*
|
|
1415
|
-
*
|
|
1416
|
-
*/
|
|
1417
|
-
get isDelayed() {
|
|
1418
|
-
return this._state.delayed;
|
|
1419
|
-
}
|
|
1420
|
-
/** Advance the current animation by a number of milliseconds */
|
|
1421
|
-
advance(e) {
|
|
1422
|
-
let t = !0, r = !1;
|
|
1423
|
-
const n = this.animation;
|
|
1424
|
-
let { toValues: s } = n;
|
|
1425
|
-
const { config: i } = n, a = Ye(n.to);
|
|
1426
|
-
!a && V(n.to) && (s = F(O(n.to))), n.values.forEach((l, p) => {
|
|
1427
|
-
if (l.done) return;
|
|
1428
|
-
const h = (
|
|
1429
|
-
// Animated strings always go from 0 to 1.
|
|
1430
|
-
l.constructor == Ue ? 1 : a ? a[p].lastPosition : s[p]
|
|
1431
|
-
);
|
|
1432
|
-
let d = n.immediate, m = h;
|
|
1433
|
-
if (!d) {
|
|
1434
|
-
if (m = l.lastPosition, i.tension <= 0) {
|
|
1435
|
-
l.done = !0;
|
|
1436
|
-
return;
|
|
1437
|
-
}
|
|
1438
|
-
let _ = l.elapsedTime += e;
|
|
1439
|
-
const v = n.fromValues[p], w = l.v0 != null ? l.v0 : l.v0 = c.arr(i.velocity) ? i.velocity[p] : i.velocity;
|
|
1440
|
-
let g;
|
|
1441
|
-
const R = i.precision || (v == h ? 5e-3 : Math.min(1, Math.abs(h - v) * 1e-3));
|
|
1442
|
-
if (c.und(i.duration))
|
|
1443
|
-
if (i.decay) {
|
|
1444
|
-
const y = i.decay === !0 ? 0.998 : i.decay, A = Math.exp(-(1 - y) * _);
|
|
1445
|
-
m = v + w / (1 - y) * (1 - A), d = Math.abs(l.lastPosition - m) <= R, g = w * A;
|
|
1446
|
-
} else {
|
|
1447
|
-
g = l.lastVelocity == null ? w : l.lastVelocity;
|
|
1448
|
-
const y = i.restVelocity || R / 10, A = i.clamp ? 0 : i.bounce, P = !c.und(A), G = v == h ? l.v0 > 0 : v < h;
|
|
1449
|
-
let I, re = !1;
|
|
1450
|
-
const C = 1, K = Math.ceil(e / C);
|
|
1451
|
-
for (let j = 0; j < K && (I = Math.abs(g) > y, !(!I && (d = Math.abs(h - m) <= R, d))); ++j) {
|
|
1452
|
-
P && (re = m == h || m > h == G, re && (g = -g * A, m = h));
|
|
1453
|
-
const M = -i.tension * 1e-6 * (m - h), Y = -i.friction * 1e-3 * g, He = (M + Y) / i.mass;
|
|
1454
|
-
g = g + He * C, m = m + g * C;
|
|
1455
|
-
}
|
|
1456
|
-
}
|
|
1457
|
-
else {
|
|
1458
|
-
let y = 1;
|
|
1459
|
-
i.duration > 0 && (this._memoizedDuration !== i.duration && (this._memoizedDuration = i.duration, l.durationProgress > 0 && (l.elapsedTime = i.duration * l.durationProgress, _ = l.elapsedTime += e)), y = (i.progress || 0) + _ / this._memoizedDuration, y = y > 1 ? 1 : y < 0 ? 0 : y, l.durationProgress = y), m = v + i.easing(y) * (h - v), g = (m - l.lastPosition) / e, d = y == 1;
|
|
1460
|
-
}
|
|
1461
|
-
l.lastVelocity = g, Number.isNaN(m) && (console.warn("Got NaN while animating:", this), d = !0);
|
|
1462
|
-
}
|
|
1463
|
-
a && !a[p].done && (d = !1), d ? l.done = !0 : t = !1, l.setValue(m, i.round) && (r = !0);
|
|
1464
|
-
});
|
|
1465
|
-
const u = z(this), f = u.getValue();
|
|
1466
|
-
if (t) {
|
|
1467
|
-
const l = O(n.to);
|
|
1468
|
-
(f !== l || r) && !i.decay ? (u.setValue(l), this._onChange(l)) : r && i.decay && this._onChange(f), this._stop();
|
|
1469
|
-
} else r && this._onChange(f);
|
|
1470
|
-
}
|
|
1471
|
-
/** Set the current value, while stopping the current animation */
|
|
1472
|
-
set(e) {
|
|
1473
|
-
return b.batchedUpdates(() => {
|
|
1474
|
-
this._stop(), this._focus(e), this._set(e);
|
|
1475
|
-
}), this;
|
|
1476
|
-
}
|
|
1477
|
-
/**
|
|
1478
|
-
* Freeze the active animation in time, as well as any updates merged
|
|
1479
|
-
* before `resume` is called.
|
|
1480
|
-
*/
|
|
1481
|
-
pause() {
|
|
1482
|
-
this._update({ pause: !0 });
|
|
1483
|
-
}
|
|
1484
|
-
/** Resume the animation if paused. */
|
|
1485
|
-
resume() {
|
|
1486
|
-
this._update({ pause: !1 });
|
|
1487
|
-
}
|
|
1488
|
-
/** Skip to the end of the current animation. */
|
|
1489
|
-
finish() {
|
|
1490
|
-
if (H(this)) {
|
|
1491
|
-
const { to: e, config: t } = this.animation;
|
|
1492
|
-
b.batchedUpdates(() => {
|
|
1493
|
-
this._onStart(), t.decay || this._set(e, !1), this._stop();
|
|
1494
|
-
});
|
|
1495
|
-
}
|
|
1496
|
-
return this;
|
|
1497
|
-
}
|
|
1498
|
-
/** Push props into the pending queue. */
|
|
1499
|
-
update(e) {
|
|
1500
|
-
return (this.queue || (this.queue = [])).push(e), this;
|
|
1501
|
-
}
|
|
1502
|
-
start(e, t) {
|
|
1503
|
-
let r;
|
|
1504
|
-
return c.und(e) ? (r = this.queue || [], this.queue = []) : r = [c.obj(e) ? e : { ...t, to: e }], Promise.all(
|
|
1505
|
-
r.map((n) => this._update(n))
|
|
1506
|
-
).then((n) => Et(this, n));
|
|
1507
|
-
}
|
|
1508
|
-
/**
|
|
1509
|
-
* Stop the current animation, and cancel any delayed updates.
|
|
1510
|
-
*
|
|
1511
|
-
* Pass `true` to call `onRest` with `cancelled: true`.
|
|
1512
|
-
*/
|
|
1513
|
-
stop(e) {
|
|
1514
|
-
const { to: t } = this.animation;
|
|
1515
|
-
return this._focus(this.get()), Ee(this._state, e && this._lastCallId), b.batchedUpdates(() => this._stop(t, e)), this;
|
|
1516
|
-
}
|
|
1517
|
-
/** Restart the animation. */
|
|
1518
|
-
reset() {
|
|
1519
|
-
this._update({ reset: !0 });
|
|
1520
|
-
}
|
|
1521
|
-
/** @internal */
|
|
1522
|
-
eventObserved(e) {
|
|
1523
|
-
e.type == "change" ? this._start() : e.type == "priority" && (this.priority = e.priority + 1);
|
|
1524
|
-
}
|
|
1525
|
-
/**
|
|
1526
|
-
* Parse the `to` and `from` range from the given `props` object.
|
|
1527
|
-
*
|
|
1528
|
-
* This also ensures the initial value is available to animated components
|
|
1529
|
-
* during the render phase.
|
|
1530
|
-
*/
|
|
1531
|
-
_prepareNode(e) {
|
|
1532
|
-
const t = this.key || "";
|
|
1533
|
-
let { to: r, from: n } = e;
|
|
1534
|
-
r = c.obj(r) ? r[t] : r, (r == null || lt(r)) && (r = void 0), n = c.obj(n) ? n[t] : n, n == null && (n = void 0);
|
|
1535
|
-
const s = { to: r, from: n };
|
|
1536
|
-
return rt(this) || (e.reverse && ([r, n] = [n, r]), n = O(n), c.und(n) ? z(this) || this._set(r) : this._set(n)), s;
|
|
1537
|
-
}
|
|
1538
|
-
/** Every update is processed by this method before merging. */
|
|
1539
|
-
_update({ ...e }, t) {
|
|
1540
|
-
const { key: r, defaultProps: n } = this;
|
|
1541
|
-
e.default && Object.assign(
|
|
1542
|
-
n,
|
|
1543
|
-
Pt(
|
|
1544
|
-
e,
|
|
1545
|
-
(a, u) => /^on/.test(u) ? Fr(a, r) : a
|
|
1546
|
-
)
|
|
1547
|
-
), er(this, e, "onProps"), me(this, "onProps", e, this);
|
|
1548
|
-
const s = this._prepareNode(e);
|
|
1549
|
-
if (Object.isFrozen(this))
|
|
1550
|
-
throw Error(
|
|
1551
|
-
"Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?"
|
|
1552
|
-
);
|
|
1553
|
-
const i = this._state;
|
|
1554
|
-
return $r(++this._lastCallId, {
|
|
1555
|
-
key: r,
|
|
1556
|
-
props: e,
|
|
1557
|
-
defaultProps: n,
|
|
1558
|
-
state: i,
|
|
1559
|
-
actions: {
|
|
1560
|
-
pause: () => {
|
|
1561
|
-
fe(this) || (Zt(this, !0), ge(i.pauseQueue), me(
|
|
1562
|
-
this,
|
|
1563
|
-
"onPause",
|
|
1564
|
-
$(this, he(this, this.animation.to)),
|
|
1565
|
-
this
|
|
1566
|
-
));
|
|
1567
|
-
},
|
|
1568
|
-
resume: () => {
|
|
1569
|
-
fe(this) && (Zt(this, !1), H(this) && this._resume(), ge(i.resumeQueue), me(
|
|
1570
|
-
this,
|
|
1571
|
-
"onResume",
|
|
1572
|
-
$(this, he(this, this.animation.to)),
|
|
1573
|
-
this
|
|
1574
|
-
));
|
|
1575
|
-
},
|
|
1576
|
-
start: this._merge.bind(this, s)
|
|
1577
|
-
}
|
|
1578
|
-
}).then((a) => {
|
|
1579
|
-
if (e.loop && a.finished && !(t && a.noop)) {
|
|
1580
|
-
const u = Mr(e);
|
|
1581
|
-
if (u)
|
|
1582
|
-
return this._update(u, !0);
|
|
1583
|
-
}
|
|
1584
|
-
return a;
|
|
1585
|
-
});
|
|
1586
|
-
}
|
|
1587
|
-
/** Merge props into the current animation */
|
|
1588
|
-
_merge(e, t, r) {
|
|
1589
|
-
if (t.cancel)
|
|
1590
|
-
return this.stop(!0), r(ae(this));
|
|
1591
|
-
const n = !c.und(e.to), s = !c.und(e.from);
|
|
1592
|
-
if (n || s)
|
|
1593
|
-
if (t.callId > this._lastToId)
|
|
1594
|
-
this._lastToId = t.callId;
|
|
1595
|
-
else
|
|
1596
|
-
return r(ae(this));
|
|
1597
|
-
const { key: i, defaultProps: a, animation: u } = this, { to: f, from: l } = u;
|
|
1598
|
-
let { to: p = f, from: h = l } = e;
|
|
1599
|
-
s && !n && (!t.default || c.und(p)) && (p = h), t.reverse && ([p, h] = [h, p]);
|
|
1600
|
-
const d = !W(h, l);
|
|
1601
|
-
d && (u.from = h), h = O(h);
|
|
1602
|
-
const m = !W(p, f);
|
|
1603
|
-
m && this._focus(p);
|
|
1604
|
-
const _ = lt(t.to), { config: v } = u, { decay: w, velocity: g } = v;
|
|
1605
|
-
(n || s) && (v.velocity = 0), t.config && !_ && cs(
|
|
1606
|
-
v,
|
|
1607
|
-
ee(t.config, i),
|
|
1608
|
-
// Avoid calling the same "config" prop twice.
|
|
1609
|
-
t.config !== a.config ? ee(a.config, i) : void 0
|
|
1610
|
-
);
|
|
1611
|
-
let R = z(this);
|
|
1612
|
-
if (!R || c.und(p))
|
|
1613
|
-
return r($(this, !0));
|
|
1614
|
-
const y = (
|
|
1615
|
-
// When `reset` is undefined, the `from` prop implies `reset: true`,
|
|
1616
|
-
// except for declarative updates. When `reset` is defined, there
|
|
1617
|
-
// must exist a value to animate from.
|
|
1618
|
-
c.und(t.reset) ? s && !t.default : !c.und(h) && _e(t.reset, i)
|
|
1619
|
-
), A = y ? h : this.get(), P = Pe(p), G = c.num(P) || c.arr(P) || Ge(P), I = !_ && (!G || _e(a.immediate || t.immediate, i));
|
|
1620
|
-
if (m) {
|
|
1621
|
-
const j = ut(p);
|
|
1622
|
-
if (j !== R.constructor)
|
|
1623
|
-
if (I)
|
|
1624
|
-
R = this._set(P);
|
|
1625
|
-
else
|
|
1626
|
-
throw Error(
|
|
1627
|
-
`Cannot animate between ${R.constructor.name} and ${j.name}, as the "to" prop suggests`
|
|
1628
|
-
);
|
|
1629
|
-
}
|
|
1630
|
-
const re = R.constructor;
|
|
1631
|
-
let C = V(p), K = !1;
|
|
1632
|
-
if (!C) {
|
|
1633
|
-
const j = y || !rt(this) && d;
|
|
1634
|
-
(m || j) && (K = W(Pe(A), P), C = !K), (!W(u.immediate, I) && !I || !W(v.decay, w) || !W(v.velocity, g)) && (C = !0);
|
|
1635
|
-
}
|
|
1636
|
-
if (K && H(this) && (u.changed && !y ? C = !0 : C || this._stop(f)), !_ && ((C || V(f)) && (u.values = R.getPayload(), u.toValues = V(p) ? null : re == Ue ? [1] : F(P)), u.immediate != I && (u.immediate = I, !I && !y && this._set(f)), C)) {
|
|
1637
|
-
const { onRest: j } = u;
|
|
1638
|
-
x(ps, (Y) => er(this, t, Y));
|
|
1639
|
-
const M = $(this, he(this, f));
|
|
1640
|
-
ge(this._pendingCalls, M), this._pendingCalls.add(r), u.changed && b.batchedUpdates(() => {
|
|
1641
|
-
var Y;
|
|
1642
|
-
u.changed = !y, j == null || j(M, this), y ? ee(a.onRest, M) : (Y = u.onStart) == null || Y.call(u, M, this);
|
|
1643
|
-
});
|
|
1644
|
-
}
|
|
1645
|
-
y && this._set(A), _ ? r(Ur(t.to, t, this._state, this)) : C ? this._start() : H(this) && !m ? this._pendingCalls.add(r) : r(Dr(A));
|
|
1646
|
-
}
|
|
1647
|
-
/** Update the `animation.to` value, which might be a `FluidValue` */
|
|
1648
|
-
_focus(e) {
|
|
1649
|
-
const t = this.animation;
|
|
1650
|
-
e !== t.to && (Mt(this) && this._detach(), t.to = e, Mt(this) && this._attach());
|
|
1651
|
-
}
|
|
1652
|
-
_attach() {
|
|
1653
|
-
let e = 0;
|
|
1654
|
-
const { to: t } = this.animation;
|
|
1655
|
-
V(t) && (le(t, this), dt(t) && (e = t.priority + 1)), this.priority = e;
|
|
1656
|
-
}
|
|
1657
|
-
_detach() {
|
|
1658
|
-
const { to: e } = this.animation;
|
|
1659
|
-
V(e) && xe(e, this);
|
|
1660
|
-
}
|
|
1661
|
-
/**
|
|
1662
|
-
* Update the current value from outside the frameloop,
|
|
1663
|
-
* and return the `Animated` node.
|
|
1664
|
-
*/
|
|
1665
|
-
_set(e, t = !0) {
|
|
1666
|
-
const r = O(e);
|
|
1667
|
-
if (!c.und(r)) {
|
|
1668
|
-
const n = z(this);
|
|
1669
|
-
if (!n || !W(r, n.getValue())) {
|
|
1670
|
-
const s = ut(r);
|
|
1671
|
-
!n || n.constructor != s ? At(this, s.create(r)) : n.setValue(r), n && b.batchedUpdates(() => {
|
|
1672
|
-
this._onChange(r, t);
|
|
1673
|
-
});
|
|
1674
|
-
}
|
|
1675
|
-
}
|
|
1676
|
-
return z(this);
|
|
1677
|
-
}
|
|
1678
|
-
_onStart() {
|
|
1679
|
-
const e = this.animation;
|
|
1680
|
-
e.changed || (e.changed = !0, me(
|
|
1681
|
-
this,
|
|
1682
|
-
"onStart",
|
|
1683
|
-
$(this, he(this, e.to)),
|
|
1684
|
-
this
|
|
1685
|
-
));
|
|
1686
|
-
}
|
|
1687
|
-
_onChange(e, t) {
|
|
1688
|
-
t || (this._onStart(), ee(this.animation.onChange, e, this)), ee(this.defaultProps.onChange, e, this), super._onChange(e, t);
|
|
1689
|
-
}
|
|
1690
|
-
// This method resets the animation state (even if already animating) to
|
|
1691
|
-
// ensure the latest from/to range is used, and it also ensures this spring
|
|
1692
|
-
// is added to the frameloop.
|
|
1693
|
-
_start() {
|
|
1694
|
-
const e = this.animation;
|
|
1695
|
-
z(this).reset(O(e.to)), e.immediate || (e.fromValues = e.values.map((t) => t.lastPosition)), H(this) || (Xt(this, !0), fe(this) || this._resume());
|
|
1696
|
-
}
|
|
1697
|
-
_resume() {
|
|
1698
|
-
q.skipAnimation ? this.finish() : ze.start(this);
|
|
1699
|
-
}
|
|
1700
|
-
/**
|
|
1701
|
-
* Exit the frameloop and notify `onRest` listeners.
|
|
1702
|
-
*
|
|
1703
|
-
* Always wrap `_stop` calls with `batchedUpdates`.
|
|
1704
|
-
*/
|
|
1705
|
-
_stop(e, t) {
|
|
1706
|
-
if (H(this)) {
|
|
1707
|
-
Xt(this, !1);
|
|
1708
|
-
const r = this.animation;
|
|
1709
|
-
x(r.values, (s) => {
|
|
1710
|
-
s.done = !0;
|
|
1711
|
-
}), r.toValues && (r.onChange = r.onPause = r.onResume = void 0), Se(this, {
|
|
1712
|
-
type: "idle",
|
|
1713
|
-
parent: this
|
|
1714
|
-
});
|
|
1715
|
-
const n = t ? ae(this.get()) : $(this.get(), he(this, e ?? r.to));
|
|
1716
|
-
ge(this._pendingCalls, n), r.changed && (r.changed = !1, me(this, "onRest", n, this));
|
|
1717
|
-
}
|
|
1718
|
-
}
|
|
1719
|
-
};
|
|
1720
|
-
function he(e, t) {
|
|
1721
|
-
const r = Pe(t), n = Pe(e.get());
|
|
1722
|
-
return W(n, r);
|
|
1723
|
-
}
|
|
1724
|
-
function Mr(e, t = e.loop, r = e.to) {
|
|
1725
|
-
const n = ee(t);
|
|
1726
|
-
if (n) {
|
|
1727
|
-
const s = n !== !0 && Nr(n), i = (s || e).reverse, a = !s || s.reset;
|
|
1728
|
-
return Te({
|
|
1729
|
-
...e,
|
|
1730
|
-
loop: t,
|
|
1731
|
-
// Avoid updating default props when looping.
|
|
1732
|
-
default: !1,
|
|
1733
|
-
// Never loop the `pause` prop.
|
|
1734
|
-
pause: void 0,
|
|
1735
|
-
// For the "reverse" prop to loop as expected, the "to" prop
|
|
1736
|
-
// must be undefined. The "reverse" prop is ignored when the
|
|
1737
|
-
// "to" prop is an array or function.
|
|
1738
|
-
to: !i || lt(r) ? r : void 0,
|
|
1739
|
-
// Ignore the "from" prop except on reset.
|
|
1740
|
-
from: a ? e.from : void 0,
|
|
1741
|
-
reset: a,
|
|
1742
|
-
// The "loop" prop can return a "useSpring" props object to
|
|
1743
|
-
// override any of the original props.
|
|
1744
|
-
...s
|
|
1745
|
-
});
|
|
1746
|
-
}
|
|
1747
|
-
}
|
|
1748
|
-
function Te(e) {
|
|
1749
|
-
const { to: t, from: r } = e = Nr(e), n = /* @__PURE__ */ new Set();
|
|
1750
|
-
return c.obj(t) && Kt(t, n), c.obj(r) && Kt(r, n), e.keys = n.size ? Array.from(n) : null, e;
|
|
1751
|
-
}
|
|
1752
|
-
function ms(e) {
|
|
1753
|
-
const t = Te(e);
|
|
1754
|
-
return c.und(t.default) && (t.default = Pt(t)), t;
|
|
1755
|
-
}
|
|
1756
|
-
function Kt(e, t) {
|
|
1757
|
-
Q(e, (r, n) => r != null && t.add(n));
|
|
1758
|
-
}
|
|
1759
|
-
var ps = [
|
|
1760
|
-
"onStart",
|
|
1761
|
-
"onRest",
|
|
1762
|
-
"onChange",
|
|
1763
|
-
"onPause",
|
|
1764
|
-
"onResume"
|
|
1765
|
-
];
|
|
1766
|
-
function er(e, t, r) {
|
|
1767
|
-
e.animation[r] = t[r] !== Vr(t, r) ? Fr(t[r], e.key) : void 0;
|
|
1768
|
-
}
|
|
1769
|
-
function me(e, t, ...r) {
|
|
1770
|
-
var n, s, i, a;
|
|
1771
|
-
(s = (n = e.animation)[t]) == null || s.call(n, ...r), (a = (i = e.defaultProps)[t]) == null || a.call(i, ...r);
|
|
1772
|
-
}
|
|
1773
|
-
var gs = ["onStart", "onChange", "onRest"], vs = 1, ys = class {
|
|
1774
|
-
constructor(e, t) {
|
|
1775
|
-
this.id = vs++, this.springs = {}, this.queue = [], this._lastAsyncId = 0, this._active = /* @__PURE__ */ new Set(), this._changed = /* @__PURE__ */ new Set(), this._started = !1, this._state = {
|
|
1776
|
-
paused: !1,
|
|
1777
|
-
pauseQueue: /* @__PURE__ */ new Set(),
|
|
1778
|
-
resumeQueue: /* @__PURE__ */ new Set(),
|
|
1779
|
-
timeouts: /* @__PURE__ */ new Set()
|
|
1780
|
-
}, this._events = {
|
|
1781
|
-
onStart: /* @__PURE__ */ new Map(),
|
|
1782
|
-
onChange: /* @__PURE__ */ new Map(),
|
|
1783
|
-
onRest: /* @__PURE__ */ new Map()
|
|
1784
|
-
}, this._onFrame = this._onFrame.bind(this), t && (this._flush = t), e && this.start({ default: !0, ...e });
|
|
1785
|
-
}
|
|
1786
|
-
/**
|
|
1787
|
-
* Equals `true` when no spring values are in the frameloop, and
|
|
1788
|
-
* no async animation is currently active.
|
|
1789
|
-
*/
|
|
1790
|
-
get idle() {
|
|
1791
|
-
return !this._state.asyncTo && Object.values(this.springs).every((e) => e.idle && !e.isDelayed && !e.isPaused);
|
|
1792
|
-
}
|
|
1793
|
-
get item() {
|
|
1794
|
-
return this._item;
|
|
1795
|
-
}
|
|
1796
|
-
set item(e) {
|
|
1797
|
-
this._item = e;
|
|
1798
|
-
}
|
|
1799
|
-
/** Get the current values of our springs */
|
|
1800
|
-
get() {
|
|
1801
|
-
const e = {};
|
|
1802
|
-
return this.each((t, r) => e[r] = t.get()), e;
|
|
1803
|
-
}
|
|
1804
|
-
/** Set the current values without animating. */
|
|
1805
|
-
set(e) {
|
|
1806
|
-
for (const t in e) {
|
|
1807
|
-
const r = e[t];
|
|
1808
|
-
c.und(r) || this.springs[t].set(r);
|
|
1809
|
-
}
|
|
1810
|
-
}
|
|
1811
|
-
/** Push an update onto the queue of each value. */
|
|
1812
|
-
update(e) {
|
|
1813
|
-
return e && this.queue.push(Te(e)), this;
|
|
1814
|
-
}
|
|
1815
|
-
/**
|
|
1816
|
-
* Start the queued animations for every spring, and resolve the returned
|
|
1817
|
-
* promise once all queued animations have finished or been cancelled.
|
|
1818
|
-
*
|
|
1819
|
-
* When you pass a queue (instead of nothing), that queue is used instead of
|
|
1820
|
-
* the queued animations added with the `update` method, which are left alone.
|
|
1821
|
-
*/
|
|
1822
|
-
start(e) {
|
|
1823
|
-
let { queue: t } = this;
|
|
1824
|
-
return e ? t = F(e).map(Te) : this.queue = [], this._flush ? this._flush(this, t) : (Yr(this, t), mt(this, t));
|
|
1825
|
-
}
|
|
1826
|
-
/** @internal */
|
|
1827
|
-
stop(e, t) {
|
|
1828
|
-
if (e !== !!e && (t = e), t) {
|
|
1829
|
-
const r = this.springs;
|
|
1830
|
-
x(F(t), (n) => r[n].stop(!!e));
|
|
1831
|
-
} else
|
|
1832
|
-
Ee(this._state, this._lastAsyncId), this.each((r) => r.stop(!!e));
|
|
1833
|
-
return this;
|
|
1834
|
-
}
|
|
1835
|
-
/** Freeze the active animation in time */
|
|
1836
|
-
pause(e) {
|
|
1837
|
-
if (c.und(e))
|
|
1838
|
-
this.start({ pause: !0 });
|
|
1839
|
-
else {
|
|
1840
|
-
const t = this.springs;
|
|
1841
|
-
x(F(e), (r) => t[r].pause());
|
|
1842
|
-
}
|
|
1843
|
-
return this;
|
|
1844
|
-
}
|
|
1845
|
-
/** Resume the animation if paused. */
|
|
1846
|
-
resume(e) {
|
|
1847
|
-
if (c.und(e))
|
|
1848
|
-
this.start({ pause: !1 });
|
|
1849
|
-
else {
|
|
1850
|
-
const t = this.springs;
|
|
1851
|
-
x(F(e), (r) => t[r].resume());
|
|
1852
|
-
}
|
|
1853
|
-
return this;
|
|
1854
|
-
}
|
|
1855
|
-
/** Call a function once per spring value */
|
|
1856
|
-
each(e) {
|
|
1857
|
-
Q(this.springs, e);
|
|
1858
|
-
}
|
|
1859
|
-
/** @internal Called at the end of every animation frame */
|
|
1860
|
-
_onFrame() {
|
|
1861
|
-
const { onStart: e, onChange: t, onRest: r } = this._events, n = this._active.size > 0, s = this._changed.size > 0;
|
|
1862
|
-
(n && !this._started || s && !this._started) && (this._started = !0, ve(e, ([u, f]) => {
|
|
1863
|
-
f.value = this.get(), u(f, this, this._item);
|
|
1864
|
-
}));
|
|
1865
|
-
const i = !n && this._started, a = s || i && r.size ? this.get() : null;
|
|
1866
|
-
s && t.size && ve(t, ([u, f]) => {
|
|
1867
|
-
f.value = a, u(f, this, this._item);
|
|
1868
|
-
}), i && (this._started = !1, ve(r, ([u, f]) => {
|
|
1869
|
-
f.value = a, u(f, this, this._item);
|
|
1870
|
-
}));
|
|
1871
|
-
}
|
|
1872
|
-
/** @internal */
|
|
1873
|
-
eventObserved(e) {
|
|
1874
|
-
if (e.type == "change")
|
|
1875
|
-
this._changed.add(e.parent), e.idle || this._active.add(e.parent);
|
|
1876
|
-
else if (e.type == "idle")
|
|
1877
|
-
this._active.delete(e.parent);
|
|
1878
|
-
else return;
|
|
1879
|
-
b.onFrame(this._onFrame);
|
|
1880
|
-
}
|
|
1881
|
-
};
|
|
1882
|
-
function mt(e, t) {
|
|
1883
|
-
return Promise.all(t.map((r) => zr(e, r))).then(
|
|
1884
|
-
(r) => Et(e, r)
|
|
1885
|
-
);
|
|
1886
|
-
}
|
|
1887
|
-
async function zr(e, t, r) {
|
|
1888
|
-
const { keys: n, to: s, from: i, loop: a, onRest: u, onResolve: f } = t, l = c.obj(t.default) && t.default;
|
|
1889
|
-
a && (t.loop = !1), s === !1 && (t.to = null), i === !1 && (t.from = null);
|
|
1890
|
-
const p = c.arr(s) || c.fun(s) ? s : void 0;
|
|
1891
|
-
p ? (t.to = void 0, t.onRest = void 0, l && (l.onRest = void 0)) : x(gs, (v) => {
|
|
1892
|
-
const w = t[v];
|
|
1893
|
-
if (c.fun(w)) {
|
|
1894
|
-
const g = e._events[v];
|
|
1895
|
-
t[v] = ({ finished: R, cancelled: y }) => {
|
|
1896
|
-
const A = g.get(w);
|
|
1897
|
-
A ? (R || (A.finished = !1), y && (A.cancelled = !0)) : g.set(w, {
|
|
1898
|
-
value: null,
|
|
1899
|
-
finished: R || !1,
|
|
1900
|
-
cancelled: y || !1
|
|
1901
|
-
});
|
|
1902
|
-
}, l && (l[v] = t[v]);
|
|
1903
|
-
}
|
|
1904
|
-
});
|
|
1905
|
-
const h = e._state;
|
|
1906
|
-
t.pause === !h.paused ? (h.paused = t.pause, ge(t.pause ? h.pauseQueue : h.resumeQueue)) : h.paused && (t.pause = !0);
|
|
1907
|
-
const d = (n || Object.keys(e.springs)).map(
|
|
1908
|
-
(v) => e.springs[v].start(t)
|
|
1909
|
-
), m = t.cancel === !0 || Vr(t, "cancel") === !0;
|
|
1910
|
-
(p || m && h.asyncId) && d.push(
|
|
1911
|
-
$r(++e._lastAsyncId, {
|
|
1912
|
-
props: t,
|
|
1913
|
-
state: h,
|
|
1914
|
-
actions: {
|
|
1915
|
-
pause: at,
|
|
1916
|
-
resume: at,
|
|
1917
|
-
start(v, w) {
|
|
1918
|
-
m ? (Ee(h, e._lastAsyncId), w(ae(e))) : (v.onRest = u, w(
|
|
1919
|
-
Ur(
|
|
1920
|
-
p,
|
|
1921
|
-
v,
|
|
1922
|
-
h,
|
|
1923
|
-
e
|
|
1924
|
-
)
|
|
1925
|
-
));
|
|
1926
|
-
}
|
|
1927
|
-
}
|
|
1928
|
-
})
|
|
1929
|
-
), h.paused && await new Promise((v) => {
|
|
1930
|
-
h.resumeQueue.add(v);
|
|
1931
|
-
});
|
|
1932
|
-
const _ = Et(e, await Promise.all(d));
|
|
1933
|
-
if (a && _.finished && !(r && _.noop)) {
|
|
1934
|
-
const v = Mr(t, a, s);
|
|
1935
|
-
if (v)
|
|
1936
|
-
return Yr(e, [v]), zr(e, v, !0);
|
|
1937
|
-
}
|
|
1938
|
-
return f && b.batchedUpdates(() => f(_, e, e.item)), _;
|
|
1939
|
-
}
|
|
1940
|
-
function tr(e, t) {
|
|
1941
|
-
const r = { ...e.springs };
|
|
1942
|
-
return t && x(F(t), (n) => {
|
|
1943
|
-
c.und(n.keys) && (n = Te(n)), c.obj(n.to) || (n = { ...n, to: void 0 }), Gr(r, n, (s) => Qr(s));
|
|
1944
|
-
}), Lr(e, r), r;
|
|
1945
|
-
}
|
|
1946
|
-
function Lr(e, t) {
|
|
1947
|
-
Q(t, (r, n) => {
|
|
1948
|
-
e.springs[n] || (e.springs[n] = r, le(r, e));
|
|
1949
|
-
});
|
|
1950
|
-
}
|
|
1951
|
-
function Qr(e, t) {
|
|
1952
|
-
const r = new hs();
|
|
1953
|
-
return r.key = e, t && le(r, t), r;
|
|
1954
|
-
}
|
|
1955
|
-
function Gr(e, t, r) {
|
|
1956
|
-
t.keys && x(t.keys, (n) => {
|
|
1957
|
-
(e[n] || (e[n] = r(n)))._prepareNode(t);
|
|
1958
|
-
});
|
|
1959
|
-
}
|
|
1960
|
-
function Yr(e, t) {
|
|
1961
|
-
x(t, (r) => {
|
|
1962
|
-
Gr(e.springs, r, (n) => Qr(n, e));
|
|
1963
|
-
});
|
|
1964
|
-
}
|
|
1965
|
-
var _s = cr.createContext({
|
|
1966
|
-
pause: !1,
|
|
1967
|
-
immediate: !1
|
|
1968
|
-
}), bs = () => {
|
|
1969
|
-
const e = [], t = function(n) {
|
|
1970
|
-
Gn();
|
|
1971
|
-
const s = [];
|
|
1972
|
-
return x(e, (i, a) => {
|
|
1973
|
-
if (c.und(n))
|
|
1974
|
-
s.push(i.start());
|
|
1975
|
-
else {
|
|
1976
|
-
const u = r(n, i, a);
|
|
1977
|
-
u && s.push(i.start(u));
|
|
1978
|
-
}
|
|
1979
|
-
}), s;
|
|
1980
|
-
};
|
|
1981
|
-
t.current = e, t.add = function(n) {
|
|
1982
|
-
e.includes(n) || e.push(n);
|
|
1983
|
-
}, t.delete = function(n) {
|
|
1984
|
-
const s = e.indexOf(n);
|
|
1985
|
-
~s && e.splice(s, 1);
|
|
1986
|
-
}, t.pause = function() {
|
|
1987
|
-
return x(e, (n) => n.pause(...arguments)), this;
|
|
1988
|
-
}, t.resume = function() {
|
|
1989
|
-
return x(e, (n) => n.resume(...arguments)), this;
|
|
1990
|
-
}, t.set = function(n) {
|
|
1991
|
-
x(e, (s, i) => {
|
|
1992
|
-
const a = c.fun(n) ? n(i, s) : n;
|
|
1993
|
-
a && s.set(a);
|
|
1994
|
-
});
|
|
1995
|
-
}, t.start = function(n) {
|
|
1996
|
-
const s = [];
|
|
1997
|
-
return x(e, (i, a) => {
|
|
1998
|
-
if (c.und(n))
|
|
1999
|
-
s.push(i.start());
|
|
2000
|
-
else {
|
|
2001
|
-
const u = this._getProps(n, i, a);
|
|
2002
|
-
u && s.push(i.start(u));
|
|
2003
|
-
}
|
|
2004
|
-
}), s;
|
|
2005
|
-
}, t.stop = function() {
|
|
2006
|
-
return x(e, (n) => n.stop(...arguments)), this;
|
|
2007
|
-
}, t.update = function(n) {
|
|
2008
|
-
return x(e, (s, i) => s.update(this._getProps(n, s, i))), this;
|
|
2009
|
-
};
|
|
2010
|
-
const r = function(n, s, i) {
|
|
2011
|
-
return c.fun(n) ? n(i, s) : n;
|
|
2012
|
-
};
|
|
2013
|
-
return t._getProps = r, t;
|
|
2014
|
-
};
|
|
2015
|
-
function ws(e, t, r) {
|
|
2016
|
-
const n = c.fun(t) && t;
|
|
2017
|
-
n && !r && (r = []);
|
|
2018
|
-
const s = pe(
|
|
2019
|
-
() => n || arguments.length == 3 ? bs() : void 0,
|
|
2020
|
-
[]
|
|
2021
|
-
), i = L(0), a = Tr(), u = pe(
|
|
2022
|
-
() => ({
|
|
2023
|
-
ctrls: [],
|
|
2024
|
-
queue: [],
|
|
2025
|
-
flush(g, R) {
|
|
2026
|
-
const y = tr(g, R);
|
|
2027
|
-
return i.current > 0 && !u.queue.length && !Object.keys(y).some((P) => !g.springs[P]) ? mt(g, R) : new Promise((P) => {
|
|
2028
|
-
Lr(g, y), u.queue.push(() => {
|
|
2029
|
-
P(mt(g, R));
|
|
2030
|
-
}), a();
|
|
2031
|
-
});
|
|
2032
|
-
}
|
|
2033
|
-
}),
|
|
2034
|
-
[]
|
|
2035
|
-
), f = L([...u.ctrls]), l = L([]), p = Lt(e) || 0;
|
|
2036
|
-
pe(() => {
|
|
2037
|
-
x(f.current.slice(e, p), (g) => {
|
|
2038
|
-
as(g, s), g.stop(!0);
|
|
2039
|
-
}), f.current.length = e, h(p, e);
|
|
2040
|
-
}, [e]), pe(() => {
|
|
2041
|
-
h(0, Math.min(p, e));
|
|
2042
|
-
}, r);
|
|
2043
|
-
function h(g, R) {
|
|
2044
|
-
for (let y = g; y < R; y++) {
|
|
2045
|
-
const A = f.current[y] || (f.current[y] = new ys(null, u.flush)), P = n ? n(y, A) : t[y];
|
|
2046
|
-
P && (l.current[y] = ms(P));
|
|
2047
|
-
}
|
|
2048
|
-
}
|
|
2049
|
-
const d = f.current.map(
|
|
2050
|
-
(g, R) => tr(g, l.current[R])
|
|
2051
|
-
), m = dr(_s), _ = Lt(m), v = m !== _ && is(m);
|
|
2052
|
-
xt(() => {
|
|
2053
|
-
i.current++, u.ctrls = f.current;
|
|
2054
|
-
const { queue: g } = u;
|
|
2055
|
-
g.length && (u.queue = [], x(g, (R) => R())), x(f.current, (R, y) => {
|
|
2056
|
-
s == null || s.add(R), v && R.start({ default: m });
|
|
2057
|
-
const A = l.current[y];
|
|
2058
|
-
A && (os(R, A.ref), R.ref ? R.queue.push(A) : R.start(A));
|
|
2059
|
-
});
|
|
2060
|
-
}), kr(() => () => {
|
|
2061
|
-
x(u.ctrls, (g) => g.stop(!0));
|
|
2062
|
-
});
|
|
2063
|
-
const w = d.map((g) => ({ ...g }));
|
|
2064
|
-
return s ? [w, s] : w;
|
|
2065
|
-
}
|
|
2066
|
-
function rr(e, t) {
|
|
2067
|
-
const r = c.fun(e), [[n], s] = ws(
|
|
2068
|
-
1,
|
|
2069
|
-
r ? e : [e],
|
|
2070
|
-
r ? [] : t
|
|
2071
|
-
);
|
|
2072
|
-
return r || arguments.length == 2 ? [n, s] : n;
|
|
2073
|
-
}
|
|
2074
|
-
var Rs = class extends Tt {
|
|
2075
|
-
constructor(e, t) {
|
|
2076
|
-
super(), this.source = e, this.idle = !0, this._active = /* @__PURE__ */ new Set(), this.calc = we(...t);
|
|
2077
|
-
const r = this._get(), n = ut(r);
|
|
2078
|
-
At(this, n.create(r));
|
|
2079
|
-
}
|
|
2080
|
-
advance(e) {
|
|
2081
|
-
const t = this._get(), r = this.get();
|
|
2082
|
-
W(t, r) || (z(this).setValue(t), this._onChange(t, this.idle)), !this.idle && nr(this._active) && nt(this);
|
|
2083
|
-
}
|
|
2084
|
-
_get() {
|
|
2085
|
-
const e = c.arr(this.source) ? this.source.map(O) : F(O(this.source));
|
|
2086
|
-
return this.calc(...e);
|
|
2087
|
-
}
|
|
2088
|
-
_start() {
|
|
2089
|
-
this.idle && !nr(this._active) && (this.idle = !1, x(Ye(this), (e) => {
|
|
2090
|
-
e.done = !1;
|
|
2091
|
-
}), q.skipAnimation ? (b.batchedUpdates(() => this.advance()), nt(this)) : ze.start(this));
|
|
2092
|
-
}
|
|
2093
|
-
// Observe our sources only when we're observed.
|
|
2094
|
-
_attach() {
|
|
2095
|
-
let e = 1;
|
|
2096
|
-
x(F(this.source), (t) => {
|
|
2097
|
-
V(t) && le(t, this), dt(t) && (t.idle || this._active.add(t), e = Math.max(e, t.priority + 1));
|
|
2098
|
-
}), this.priority = e, this._start();
|
|
2099
|
-
}
|
|
2100
|
-
// Stop observing our sources once we have no observers.
|
|
2101
|
-
_detach() {
|
|
2102
|
-
x(F(this.source), (e) => {
|
|
2103
|
-
V(e) && xe(e, this);
|
|
2104
|
-
}), this._active.clear(), nt(this);
|
|
2105
|
-
}
|
|
2106
|
-
/** @internal */
|
|
2107
|
-
eventObserved(e) {
|
|
2108
|
-
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 = F(this.source).reduce(
|
|
2109
|
-
(t, r) => Math.max(t, (dt(r) ? r.priority : 0) + 1),
|
|
2110
|
-
0
|
|
2111
|
-
));
|
|
2112
|
-
}
|
|
2113
|
-
};
|
|
2114
|
-
function Ss(e) {
|
|
2115
|
-
return e.idle !== !1;
|
|
2116
|
-
}
|
|
2117
|
-
function nr(e) {
|
|
2118
|
-
return !e.size || Array.from(e).every(Ss);
|
|
2119
|
-
}
|
|
2120
|
-
function nt(e) {
|
|
2121
|
-
e.idle || (e.idle = !0, x(Ye(e), (t) => {
|
|
2122
|
-
t.done = !0;
|
|
2123
|
-
}), Se(e, {
|
|
2124
|
-
type: "idle",
|
|
2125
|
-
parent: e
|
|
2126
|
-
}));
|
|
2127
|
-
}
|
|
2128
|
-
q.assign({
|
|
2129
|
-
createStringInterpolator: Pr,
|
|
2130
|
-
to: (e, t) => new Rs(e, t)
|
|
2131
|
-
});
|
|
2132
|
-
var Wr = /^--/;
|
|
2133
|
-
function xs(e, t) {
|
|
2134
|
-
return t == null || typeof t == "boolean" || t === "" ? "" : typeof t == "number" && t !== 0 && !Wr.test(e) && !(be.hasOwnProperty(e) && be[e]) ? t + "px" : ("" + t).trim();
|
|
2135
|
-
}
|
|
2136
|
-
var sr = {};
|
|
2137
|
-
function As(e, t) {
|
|
2138
|
-
if (!e.nodeType || !e.setAttribute)
|
|
2139
|
-
return !1;
|
|
2140
|
-
const r = e.nodeName === "filter" || e.parentNode && e.parentNode.nodeName === "filter", {
|
|
2141
|
-
className: n,
|
|
2142
|
-
style: s,
|
|
2143
|
-
children: i,
|
|
2144
|
-
scrollTop: a,
|
|
2145
|
-
scrollLeft: u,
|
|
2146
|
-
viewBox: f,
|
|
2147
|
-
...l
|
|
2148
|
-
} = t, p = Object.values(l), h = Object.keys(l).map(
|
|
2149
|
-
(d) => r || e.hasAttribute(d) ? d : sr[d] || (sr[d] = d.replace(
|
|
2150
|
-
/([A-Z])/g,
|
|
2151
|
-
// Attributes are written in dash case
|
|
2152
|
-
(m) => "-" + m.toLowerCase()
|
|
2153
|
-
))
|
|
2154
|
-
);
|
|
2155
|
-
i !== void 0 && (e.textContent = i);
|
|
2156
|
-
for (const d in s)
|
|
2157
|
-
if (s.hasOwnProperty(d)) {
|
|
2158
|
-
const m = xs(d, s[d]);
|
|
2159
|
-
Wr.test(d) ? e.style.setProperty(d, m) : e.style[d] = m;
|
|
2160
|
-
}
|
|
2161
|
-
h.forEach((d, m) => {
|
|
2162
|
-
e.setAttribute(d, p[m]);
|
|
2163
|
-
}), n !== void 0 && (e.className = n), a !== void 0 && (e.scrollTop = a), u !== void 0 && (e.scrollLeft = u), f !== void 0 && e.setAttribute("viewBox", f);
|
|
2164
|
-
}
|
|
2165
|
-
var be = {
|
|
2166
|
-
animationIterationCount: !0,
|
|
2167
|
-
borderImageOutset: !0,
|
|
2168
|
-
borderImageSlice: !0,
|
|
2169
|
-
borderImageWidth: !0,
|
|
2170
|
-
boxFlex: !0,
|
|
2171
|
-
boxFlexGroup: !0,
|
|
2172
|
-
boxOrdinalGroup: !0,
|
|
2173
|
-
columnCount: !0,
|
|
2174
|
-
columns: !0,
|
|
2175
|
-
flex: !0,
|
|
2176
|
-
flexGrow: !0,
|
|
2177
|
-
flexPositive: !0,
|
|
2178
|
-
flexShrink: !0,
|
|
2179
|
-
flexNegative: !0,
|
|
2180
|
-
flexOrder: !0,
|
|
2181
|
-
gridRow: !0,
|
|
2182
|
-
gridRowEnd: !0,
|
|
2183
|
-
gridRowSpan: !0,
|
|
2184
|
-
gridRowStart: !0,
|
|
2185
|
-
gridColumn: !0,
|
|
2186
|
-
gridColumnEnd: !0,
|
|
2187
|
-
gridColumnSpan: !0,
|
|
2188
|
-
gridColumnStart: !0,
|
|
2189
|
-
fontWeight: !0,
|
|
2190
|
-
lineClamp: !0,
|
|
2191
|
-
lineHeight: !0,
|
|
2192
|
-
opacity: !0,
|
|
2193
|
-
order: !0,
|
|
2194
|
-
orphans: !0,
|
|
2195
|
-
tabSize: !0,
|
|
2196
|
-
widows: !0,
|
|
2197
|
-
zIndex: !0,
|
|
2198
|
-
zoom: !0,
|
|
2199
|
-
// SVG-related properties
|
|
2200
|
-
fillOpacity: !0,
|
|
2201
|
-
floodOpacity: !0,
|
|
2202
|
-
stopOpacity: !0,
|
|
2203
|
-
strokeDasharray: !0,
|
|
2204
|
-
strokeDashoffset: !0,
|
|
2205
|
-
strokeMiterlimit: !0,
|
|
2206
|
-
strokeOpacity: !0,
|
|
2207
|
-
strokeWidth: !0
|
|
2208
|
-
}, Ps = (e, t) => e + t.charAt(0).toUpperCase() + t.substring(1), Es = ["Webkit", "Ms", "Moz", "O"];
|
|
2209
|
-
be = Object.keys(be).reduce((e, t) => (Es.forEach((r) => e[Ps(r, t)] = e[t]), e), be);
|
|
2210
|
-
var Ts = /^(matrix|translate|scale|rotate|skew)/, ks = /^(translate)/, Cs = /^(rotate|skew)/, st = (e, t) => c.num(e) && e !== 0 ? e + t : e, Ne = (e, t) => c.arr(e) ? e.every((r) => Ne(r, t)) : c.num(e) ? e === t : parseFloat(e) === t, Is = class extends Be {
|
|
2211
|
-
constructor({ x: e, y: t, z: r, ...n }) {
|
|
2212
|
-
const s = [], i = [];
|
|
2213
|
-
(e || t || r) && (s.push([e || 0, t || 0, r || 0]), i.push((a) => [
|
|
2214
|
-
`translate3d(${a.map((u) => st(u, "px")).join(",")})`,
|
|
2215
|
-
// prettier-ignore
|
|
2216
|
-
Ne(a, 0)
|
|
2217
|
-
])), Q(n, (a, u) => {
|
|
2218
|
-
if (u === "transform")
|
|
2219
|
-
s.push([a || ""]), i.push((f) => [f, f === ""]);
|
|
2220
|
-
else if (Ts.test(u)) {
|
|
2221
|
-
if (delete n[u], c.und(a)) return;
|
|
2222
|
-
const f = ks.test(u) ? "px" : Cs.test(u) ? "deg" : "";
|
|
2223
|
-
s.push(F(a)), i.push(
|
|
2224
|
-
u === "rotate3d" ? ([l, p, h, d]) => [
|
|
2225
|
-
`rotate3d(${l},${p},${h},${st(d, f)})`,
|
|
2226
|
-
Ne(d, 0)
|
|
2227
|
-
] : (l) => [
|
|
2228
|
-
`${u}(${l.map((p) => st(p, f)).join(",")})`,
|
|
2229
|
-
Ne(l, u.startsWith("scale") ? 1 : 0)
|
|
2230
|
-
]
|
|
2231
|
-
);
|
|
2232
|
-
}
|
|
2233
|
-
}), s.length && (n.transform = new Os(s, i)), super(n);
|
|
2234
|
-
}
|
|
2235
|
-
}, Os = class extends Sr {
|
|
2236
|
-
constructor(e, t) {
|
|
2237
|
-
super(), this.inputs = e, this.transforms = t, this._value = null;
|
|
2238
|
-
}
|
|
2239
|
-
get() {
|
|
2240
|
-
return this._value || (this._value = this._get());
|
|
2241
|
-
}
|
|
2242
|
-
_get() {
|
|
2243
|
-
let e = "", t = !0;
|
|
2244
|
-
return x(this.inputs, (r, n) => {
|
|
2245
|
-
const s = O(r[0]), [i, a] = this.transforms[n](
|
|
2246
|
-
c.arr(s) ? s : r.map(O)
|
|
2247
|
-
);
|
|
2248
|
-
e += " " + i, t = t && a;
|
|
2249
|
-
}), t ? "none" : e;
|
|
2250
|
-
}
|
|
2251
|
-
// Start observing our inputs once we have an observer.
|
|
2252
|
-
observerAdded(e) {
|
|
2253
|
-
e == 1 && x(
|
|
2254
|
-
this.inputs,
|
|
2255
|
-
(t) => x(
|
|
2256
|
-
t,
|
|
2257
|
-
(r) => V(r) && le(r, this)
|
|
2258
|
-
)
|
|
2259
|
-
);
|
|
2260
|
-
}
|
|
2261
|
-
// Stop observing our inputs once we have no observers.
|
|
2262
|
-
observerRemoved(e) {
|
|
2263
|
-
e == 0 && x(
|
|
2264
|
-
this.inputs,
|
|
2265
|
-
(t) => x(
|
|
2266
|
-
t,
|
|
2267
|
-
(r) => V(r) && xe(r, this)
|
|
2268
|
-
)
|
|
2269
|
-
);
|
|
2270
|
-
}
|
|
2271
|
-
eventObserved(e) {
|
|
2272
|
-
e.type == "change" && (this._value = null), Se(this, e);
|
|
2273
|
-
}
|
|
2274
|
-
}, js = [
|
|
2275
|
-
"a",
|
|
2276
|
-
"abbr",
|
|
2277
|
-
"address",
|
|
2278
|
-
"area",
|
|
2279
|
-
"article",
|
|
2280
|
-
"aside",
|
|
2281
|
-
"audio",
|
|
2282
|
-
"b",
|
|
2283
|
-
"base",
|
|
2284
|
-
"bdi",
|
|
2285
|
-
"bdo",
|
|
2286
|
-
"big",
|
|
2287
|
-
"blockquote",
|
|
2288
|
-
"body",
|
|
2289
|
-
"br",
|
|
2290
|
-
"button",
|
|
2291
|
-
"canvas",
|
|
2292
|
-
"caption",
|
|
2293
|
-
"cite",
|
|
2294
|
-
"code",
|
|
2295
|
-
"col",
|
|
2296
|
-
"colgroup",
|
|
2297
|
-
"data",
|
|
2298
|
-
"datalist",
|
|
2299
|
-
"dd",
|
|
2300
|
-
"del",
|
|
2301
|
-
"details",
|
|
2302
|
-
"dfn",
|
|
2303
|
-
"dialog",
|
|
2304
|
-
"div",
|
|
2305
|
-
"dl",
|
|
2306
|
-
"dt",
|
|
2307
|
-
"em",
|
|
2308
|
-
"embed",
|
|
2309
|
-
"fieldset",
|
|
2310
|
-
"figcaption",
|
|
2311
|
-
"figure",
|
|
2312
|
-
"footer",
|
|
2313
|
-
"form",
|
|
2314
|
-
"h1",
|
|
2315
|
-
"h2",
|
|
2316
|
-
"h3",
|
|
2317
|
-
"h4",
|
|
2318
|
-
"h5",
|
|
2319
|
-
"h6",
|
|
2320
|
-
"head",
|
|
2321
|
-
"header",
|
|
2322
|
-
"hgroup",
|
|
2323
|
-
"hr",
|
|
2324
|
-
"html",
|
|
2325
|
-
"i",
|
|
2326
|
-
"iframe",
|
|
2327
|
-
"img",
|
|
2328
|
-
"input",
|
|
2329
|
-
"ins",
|
|
2330
|
-
"kbd",
|
|
2331
|
-
"keygen",
|
|
2332
|
-
"label",
|
|
2333
|
-
"legend",
|
|
2334
|
-
"li",
|
|
2335
|
-
"link",
|
|
2336
|
-
"main",
|
|
2337
|
-
"map",
|
|
2338
|
-
"mark",
|
|
2339
|
-
"menu",
|
|
2340
|
-
"menuitem",
|
|
2341
|
-
"meta",
|
|
2342
|
-
"meter",
|
|
2343
|
-
"nav",
|
|
2344
|
-
"noscript",
|
|
2345
|
-
"object",
|
|
2346
|
-
"ol",
|
|
2347
|
-
"optgroup",
|
|
2348
|
-
"option",
|
|
2349
|
-
"output",
|
|
2350
|
-
"p",
|
|
2351
|
-
"param",
|
|
2352
|
-
"picture",
|
|
2353
|
-
"pre",
|
|
2354
|
-
"progress",
|
|
2355
|
-
"q",
|
|
2356
|
-
"rp",
|
|
2357
|
-
"rt",
|
|
2358
|
-
"ruby",
|
|
2359
|
-
"s",
|
|
2360
|
-
"samp",
|
|
2361
|
-
"script",
|
|
2362
|
-
"section",
|
|
2363
|
-
"select",
|
|
2364
|
-
"small",
|
|
2365
|
-
"source",
|
|
2366
|
-
"span",
|
|
2367
|
-
"strong",
|
|
2368
|
-
"style",
|
|
2369
|
-
"sub",
|
|
2370
|
-
"summary",
|
|
2371
|
-
"sup",
|
|
2372
|
-
"table",
|
|
2373
|
-
"tbody",
|
|
2374
|
-
"td",
|
|
2375
|
-
"textarea",
|
|
2376
|
-
"tfoot",
|
|
2377
|
-
"th",
|
|
2378
|
-
"thead",
|
|
2379
|
-
"time",
|
|
2380
|
-
"title",
|
|
2381
|
-
"tr",
|
|
2382
|
-
"track",
|
|
2383
|
-
"u",
|
|
2384
|
-
"ul",
|
|
2385
|
-
"var",
|
|
2386
|
-
"video",
|
|
2387
|
-
"wbr",
|
|
2388
|
-
// SVG
|
|
2389
|
-
"circle",
|
|
2390
|
-
"clipPath",
|
|
2391
|
-
"defs",
|
|
2392
|
-
"ellipse",
|
|
2393
|
-
"foreignObject",
|
|
2394
|
-
"g",
|
|
2395
|
-
"image",
|
|
2396
|
-
"line",
|
|
2397
|
-
"linearGradient",
|
|
2398
|
-
"mask",
|
|
2399
|
-
"path",
|
|
2400
|
-
"pattern",
|
|
2401
|
-
"polygon",
|
|
2402
|
-
"polyline",
|
|
2403
|
-
"radialGradient",
|
|
2404
|
-
"rect",
|
|
2405
|
-
"stop",
|
|
2406
|
-
"svg",
|
|
2407
|
-
"text",
|
|
2408
|
-
"tspan"
|
|
2409
|
-
];
|
|
2410
|
-
q.assign({
|
|
2411
|
-
batchedUpdates: fn,
|
|
2412
|
-
createStringInterpolator: Pr,
|
|
2413
|
-
colors: Sn
|
|
2414
|
-
});
|
|
2415
|
-
var Fs = es(js, {
|
|
2416
|
-
applyAnimatedValues: As,
|
|
2417
|
-
createAnimatedStyle: (e) => new Is(e),
|
|
2418
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2419
|
-
getComponentProps: ({ scrollTop: e, scrollLeft: t, ...r }) => r
|
|
2420
|
-
}), ir = Fs.animated;
|
|
2421
|
-
const Br = rn({}), Vs = ({ children: e }) => {
|
|
2422
|
-
const { app: t } = nn(), r = pe(() => {
|
|
284
|
+
var h = Se();
|
|
285
|
+
const te = me({}), ke = ({ children: a }) => {
|
|
286
|
+
const { app: t } = _e(), n = pe(() => {
|
|
2423
287
|
if (!t || !t.renderer) return null;
|
|
2424
|
-
const
|
|
2425
|
-
|
|
2426
|
-
color: "#
|
|
2427
|
-
}),
|
|
2428
|
-
const
|
|
2429
|
-
return
|
|
288
|
+
const l = new ee();
|
|
289
|
+
l.setFillStyle({
|
|
290
|
+
color: "#000000"
|
|
291
|
+
}), l.rect(0, 0, 1, 1), l.fill();
|
|
292
|
+
const o = t.renderer.generateTexture(l);
|
|
293
|
+
return l.destroy(), o;
|
|
2430
294
|
}, [t == null ? void 0 : t.renderer]);
|
|
2431
|
-
return
|
|
295
|
+
return n ? /* @__PURE__ */ h.jsx(te.Provider, { value: n, children: a }) : null;
|
|
2432
296
|
};
|
|
2433
|
-
class
|
|
2434
|
-
constructor(
|
|
2435
|
-
super({ texture:
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
this
|
|
297
|
+
class ye extends re {
|
|
298
|
+
constructor(n, l, o, c, f, d) {
|
|
299
|
+
super({ texture: n, x: l, y: o, scaleX: c, scaleY: f, alpha: 0 });
|
|
300
|
+
m(this, "animationProgress", 0);
|
|
301
|
+
m(this, "delayCounter", 0);
|
|
302
|
+
m(this, "randomSpeed");
|
|
303
|
+
m(this, "randomDelayOffset");
|
|
304
|
+
m(this, "startScaleX");
|
|
305
|
+
m(this, "startScaleY");
|
|
306
|
+
m(this, "targetAlpha");
|
|
307
|
+
this.texture = n, this.x = l, this.y = o, this.scaleX = c, this.scaleY = f, this.curLevel = d, this.startScaleX = c, this.startScaleY = f, this.curLevel = d, this.randomSpeed = 0.04 + Math.random() * 0.04, this.randomDelayOffset = Math.floor(Math.random() * 150), this.targetAlpha = 0.7 + Math.random() * 0.3;
|
|
2443
308
|
}
|
|
2444
309
|
update() {
|
|
2445
310
|
if (this.delayCounter < this.curLevel * 15 + this.randomDelayOffset) {
|
|
2446
311
|
this.delayCounter++;
|
|
2447
312
|
return;
|
|
2448
313
|
}
|
|
2449
|
-
|
|
2450
|
-
|
|
314
|
+
if (this.animationProgress >= this.targetAlpha - 1e-3) {
|
|
315
|
+
this.animationProgress = this.targetAlpha, this.alpha = this.targetAlpha;
|
|
316
|
+
return;
|
|
317
|
+
}
|
|
318
|
+
this.animationProgress += (this.targetAlpha - this.animationProgress) * this.randomSpeed, this.alpha = this.animationProgress;
|
|
2451
319
|
}
|
|
2452
320
|
}
|
|
2453
|
-
class
|
|
2454
|
-
constructor(t,
|
|
2455
|
-
|
|
2456
|
-
this.texture = t, this.particleContainerRefCurrent =
|
|
321
|
+
class Oe {
|
|
322
|
+
constructor(t, n) {
|
|
323
|
+
m(this, "cells", []);
|
|
324
|
+
this.texture = t, this.particleContainerRefCurrent = n, this.texture = t;
|
|
2457
325
|
}
|
|
2458
|
-
add(t,
|
|
2459
|
-
const
|
|
2460
|
-
this.particleContainerRefCurrent.addParticle(
|
|
326
|
+
add(t, n, l, o, c) {
|
|
327
|
+
const f = new ye(this.texture, t, n, l, o, c);
|
|
328
|
+
this.particleContainerRefCurrent.addParticle(f), this.cells.push(f);
|
|
2461
329
|
}
|
|
2462
330
|
updateAll() {
|
|
2463
331
|
for (const t of this.cells)
|
|
2464
332
|
t.update();
|
|
2465
333
|
}
|
|
2466
334
|
}
|
|
2467
|
-
const
|
|
2468
|
-
gridRows:
|
|
335
|
+
const Ce = ({
|
|
336
|
+
gridRows: a,
|
|
2469
337
|
gridCols: t,
|
|
2470
|
-
cellWidth:
|
|
2471
|
-
cellHeight:
|
|
2472
|
-
gridDepth:
|
|
338
|
+
cellWidth: n,
|
|
339
|
+
cellHeight: l,
|
|
340
|
+
gridDepth: o
|
|
2473
341
|
}) => {
|
|
2474
|
-
const
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
),
|
|
342
|
+
const c = he(te), f = F(null), d = F(null);
|
|
343
|
+
K(() => {
|
|
344
|
+
f.current && (d.current = new Oe(
|
|
345
|
+
c,
|
|
346
|
+
f.current
|
|
347
|
+
), S(
|
|
2480
348
|
0,
|
|
2481
349
|
0,
|
|
2482
|
-
r,
|
|
2483
350
|
n,
|
|
351
|
+
l,
|
|
2484
352
|
t,
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
353
|
+
a,
|
|
354
|
+
o,
|
|
355
|
+
f.current
|
|
2488
356
|
));
|
|
2489
|
-
}, []),
|
|
2490
|
-
var
|
|
2491
|
-
(
|
|
357
|
+
}, []), Ee(() => {
|
|
358
|
+
var _;
|
|
359
|
+
(_ = d.current) == null || _.updateAll();
|
|
2492
360
|
});
|
|
2493
|
-
const
|
|
2494
|
-
var
|
|
2495
|
-
for (let
|
|
2496
|
-
for (let
|
|
2497
|
-
const
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
)) :
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
361
|
+
const S = (_, k, E, R, p, v, T, y) => {
|
|
362
|
+
var O;
|
|
363
|
+
for (let x = 0; x < v; x++)
|
|
364
|
+
for (let P = 0; P < p; P++) {
|
|
365
|
+
const C = _ + P * E, j = k + x * R;
|
|
366
|
+
T <= 0 || Math.random() > 0.7 && T < o ? Math.random() > 0.1 && ((O = d.current) == null || O.add(
|
|
367
|
+
C,
|
|
368
|
+
j,
|
|
369
|
+
E - 1,
|
|
370
|
+
R - 1,
|
|
371
|
+
T
|
|
372
|
+
)) : S(
|
|
373
|
+
C,
|
|
374
|
+
j,
|
|
375
|
+
E / p,
|
|
376
|
+
R / v,
|
|
377
|
+
p,
|
|
378
|
+
v,
|
|
379
|
+
T - 1
|
|
2512
380
|
);
|
|
2513
381
|
}
|
|
2514
382
|
};
|
|
2515
|
-
return /* @__PURE__ */
|
|
383
|
+
return /* @__PURE__ */ h.jsx(
|
|
2516
384
|
"pixiParticleContainer",
|
|
2517
385
|
{
|
|
2518
|
-
ref:
|
|
386
|
+
ref: f,
|
|
2519
387
|
dynamicProperties: {
|
|
2520
388
|
position: !0,
|
|
2521
389
|
vertex: !0,
|
|
@@ -2523,107 +391,56 @@ const Ds = ({
|
|
|
2523
391
|
}
|
|
2524
392
|
}
|
|
2525
393
|
);
|
|
2526
|
-
},
|
|
2527
|
-
cellWidth:
|
|
394
|
+
}, je = ({
|
|
395
|
+
cellWidth: a,
|
|
2528
396
|
cellHeight: t,
|
|
2529
|
-
gridRows:
|
|
2530
|
-
gridCols:
|
|
2531
|
-
gridDepth:
|
|
2532
|
-
}) => /* @__PURE__ */
|
|
2533
|
-
|
|
397
|
+
gridRows: n,
|
|
398
|
+
gridCols: l,
|
|
399
|
+
gridDepth: o
|
|
400
|
+
}) => /* @__PURE__ */ h.jsx(ke, { children: /* @__PURE__ */ h.jsx(
|
|
401
|
+
Ce,
|
|
2534
402
|
{
|
|
2535
|
-
cellWidth:
|
|
403
|
+
cellWidth: a,
|
|
2536
404
|
cellHeight: t,
|
|
2537
|
-
gridCols:
|
|
2538
|
-
gridRows:
|
|
2539
|
-
gridDepth:
|
|
2540
|
-
}
|
|
2541
|
-
) })
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
"path",
|
|
2550
|
-
{
|
|
2551
|
-
d: `M278.235,33.267c-116.7,0-211.6,95-211.6,211.7v0.7l-41.9-63.1c-4.1-6.2-12.5-7.9-18.7-3.8c-6.2,4.1-7.9,12.5-3.8,18.7 \r
|
|
2552
|
-
l60.8,91.5c2.2,3.3,5.7,5.4,9.6,5.9c0.6,0.1,1.1,0.1,1.7,0.1c3.3,0,6.5-1.2,9-3.5l84.5-76.1c5.5-5,6-13.5,1-19.1 \r
|
|
2553
|
-
c-5-5.5-13.5-6-19.1-1l-56.1,50.7v-1c0-101.9,82.8-184.7,184.6-184.7s184.7,82.8,184.7,184.7s-82.8,184.7-184.6,184.7 \r
|
|
2554
|
-
c-49.3,0-95.7-19.2-130.5-54.1c-5.3-5.3-13.8-5.3-19.1,0c-5.3,5.3-5.3,13.8,0,19.1c40,40,93.1,62,149.6,62 \r
|
|
2555
|
-
c116.6,0,211.6-94.9,211.6-211.7S394.935,33.267,278.235,33.267z`
|
|
2556
|
-
}
|
|
2557
|
-
)
|
|
2558
|
-
}
|
|
2559
|
-
);
|
|
2560
|
-
an({ ParticleContainer: dn, Particle: hr, Texture: cn, Container: ln, Sprite: un, Graphics: fr });
|
|
2561
|
-
const ar = 2, or = 2, ur = 225, lr = 225, Ms = 5, Ws = () => {
|
|
2562
|
-
const e = L(null), [t, r] = Fe(!1), [n, s] = Fe(0), [i, a] = Fe(0), u = rr({
|
|
2563
|
-
from: { rotate: 0 },
|
|
2564
|
-
to: { rotate: i * -360 },
|
|
2565
|
-
config: { duration: 500, easing: (d) => 1 - Math.pow(1 - d, 3) }
|
|
2566
|
-
}), f = rr({
|
|
2567
|
-
opacity: t ? 1 : 0,
|
|
2568
|
-
scale: t ? 1 : 0.5,
|
|
2569
|
-
config: { tension: 150, friction: 14 }
|
|
2570
|
-
}), l = ir(qs), p = ir("button"), h = () => {
|
|
2571
|
-
s((d) => d + 1), a((d) => d + 1);
|
|
2572
|
-
};
|
|
2573
|
-
return ue(() => () => {
|
|
2574
|
-
var m;
|
|
2575
|
-
const d = (m = e.current) == null ? void 0 : m.app;
|
|
2576
|
-
d && !d.destroyed && d.destroy(!0, {
|
|
405
|
+
gridCols: l,
|
|
406
|
+
gridRows: n,
|
|
407
|
+
gridDepth: o
|
|
408
|
+
}
|
|
409
|
+
) });
|
|
410
|
+
Re({ ParticleContainer: Pe, Particle: re, Texture: xe, Container: be, Sprite: Te, Graphics: ee });
|
|
411
|
+
const H = 2, B = 2, Z = 300, Q = 300, we = 5, Me = () => {
|
|
412
|
+
const a = F(null);
|
|
413
|
+
return K(() => () => {
|
|
414
|
+
var n;
|
|
415
|
+
const t = (n = a.current) == null ? void 0 : n.app;
|
|
416
|
+
t && !t.destroyed && t.destroy(!0, {
|
|
2577
417
|
children: !0,
|
|
2578
418
|
texture: !0,
|
|
2579
419
|
baseTexture: !0
|
|
2580
420
|
});
|
|
2581
|
-
}, []), /* @__PURE__ */
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
)
|
|
2603
|
-
}
|
|
2604
|
-
),
|
|
2605
|
-
t && /* @__PURE__ */ D.jsx(
|
|
2606
|
-
p,
|
|
2607
|
-
{
|
|
2608
|
-
style: f,
|
|
2609
|
-
className: "p-4",
|
|
2610
|
-
onClick: h,
|
|
2611
|
-
children: /* @__PURE__ */ D.jsx(
|
|
2612
|
-
l,
|
|
2613
|
-
{
|
|
2614
|
-
width: 36,
|
|
2615
|
-
height: 36,
|
|
2616
|
-
className: "hover:opacity-100 opacity-25",
|
|
2617
|
-
style: {
|
|
2618
|
-
rotate: u.rotate.to((d) => `${d}deg`)
|
|
2619
|
-
}
|
|
2620
|
-
}
|
|
2621
|
-
)
|
|
2622
|
-
}
|
|
2623
|
-
)
|
|
2624
|
-
] });
|
|
421
|
+
}, []), /* @__PURE__ */ h.jsx("div", { className: "flex flex-col items-center justify-center w-full h-full", children: /* @__PURE__ */ h.jsx(
|
|
422
|
+
ve,
|
|
423
|
+
{
|
|
424
|
+
ref: a,
|
|
425
|
+
antialias: !1,
|
|
426
|
+
width: Z * H,
|
|
427
|
+
height: Q * B,
|
|
428
|
+
className: "image-pixelated w-full",
|
|
429
|
+
backgroundAlpha: 0,
|
|
430
|
+
children: /* @__PURE__ */ h.jsx(
|
|
431
|
+
je,
|
|
432
|
+
{
|
|
433
|
+
gridCols: H,
|
|
434
|
+
gridRows: B,
|
|
435
|
+
cellWidth: Z,
|
|
436
|
+
cellHeight: Q,
|
|
437
|
+
gridDepth: we
|
|
438
|
+
}
|
|
439
|
+
)
|
|
440
|
+
}
|
|
441
|
+
) });
|
|
2625
442
|
};
|
|
2626
443
|
export {
|
|
2627
|
-
|
|
444
|
+
Me as default
|
|
2628
445
|
};
|
|
2629
446
|
//# sourceMappingURL=recursive-grid.es.js.map
|