@contentmunch/contentmunch-ui 1.1.24 → 1.1.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/accordion/Accordion.d.ts +1 -0
- package/lib/backdrop/Backdrop.d.ts +1 -0
- package/lib/button/Button.d.ts +1 -0
- package/lib/index.cjs.js +3 -3
- package/lib/index.es.js +630 -624
- package/lib/index.umd.js +3 -3
- package/lib/table/Table.d.ts +1 -0
- package/package.json +1 -1
package/lib/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import gi, { useState as Y, Fragment as p, useRef as fe, useCallback as Ce, useEffect as je, useMemo as Oe, createContext as ze, useLayoutEffect as lo, useContext as
|
|
1
|
+
import gi, { useState as Y, Fragment as p, useRef as fe, useCallback as Ce, useEffect as je, useMemo as Oe, createContext as ze, useLayoutEffect as lo, useContext as ee, useId as co, createElement as uo, useInsertionEffect as ji, forwardRef as ho, Component as fo } from "react";
|
|
2
2
|
var at = { exports: {} }, $e = {};
|
|
3
3
|
/**
|
|
4
4
|
* @license React
|
|
@@ -44,149 +44,149 @@ var Ke = {};
|
|
|
44
44
|
var Zn;
|
|
45
45
|
function mo() {
|
|
46
46
|
return Zn || (Zn = 1, process.env.NODE_ENV !== "production" && function() {
|
|
47
|
-
function e(
|
|
48
|
-
if (
|
|
49
|
-
if (typeof
|
|
50
|
-
return
|
|
51
|
-
if (typeof
|
|
52
|
-
switch (
|
|
47
|
+
function e(j) {
|
|
48
|
+
if (j == null) return null;
|
|
49
|
+
if (typeof j == "function")
|
|
50
|
+
return j.$$typeof === T ? null : j.displayName || j.name || null;
|
|
51
|
+
if (typeof j == "string") return j;
|
|
52
|
+
switch (j) {
|
|
53
53
|
case g:
|
|
54
54
|
return "Fragment";
|
|
55
|
-
case
|
|
55
|
+
case w:
|
|
56
56
|
return "Profiler";
|
|
57
|
-
case
|
|
57
|
+
case y:
|
|
58
58
|
return "StrictMode";
|
|
59
59
|
case S:
|
|
60
60
|
return "Suspense";
|
|
61
61
|
case E:
|
|
62
62
|
return "SuspenseList";
|
|
63
|
-
case
|
|
63
|
+
case O:
|
|
64
64
|
return "Activity";
|
|
65
65
|
}
|
|
66
|
-
if (typeof
|
|
67
|
-
switch (typeof
|
|
66
|
+
if (typeof j == "object")
|
|
67
|
+
switch (typeof j.tag == "number" && console.error(
|
|
68
68
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
69
|
-
),
|
|
69
|
+
), j.$$typeof) {
|
|
70
70
|
case x:
|
|
71
71
|
return "Portal";
|
|
72
|
-
case w:
|
|
73
|
-
return (v.displayName || "Context") + ".Provider";
|
|
74
72
|
case b:
|
|
75
|
-
return (
|
|
76
|
-
case
|
|
77
|
-
|
|
78
|
-
return v = v.displayName, v || (v = V.displayName || V.name || "", v = v !== "" ? "ForwardRef(" + v + ")" : "ForwardRef"), v;
|
|
79
|
-
case R:
|
|
80
|
-
return V = v.displayName || null, V !== null ? V : e(v.type) || "Memo";
|
|
73
|
+
return (j.displayName || "Context") + ".Provider";
|
|
74
|
+
case v:
|
|
75
|
+
return (j._context.displayName || "Context") + ".Consumer";
|
|
81
76
|
case M:
|
|
82
|
-
V =
|
|
77
|
+
var V = j.render;
|
|
78
|
+
return j = j.displayName, j || (j = V.displayName || V.name || "", j = j !== "" ? "ForwardRef(" + j + ")" : "ForwardRef"), j;
|
|
79
|
+
case k:
|
|
80
|
+
return V = j.displayName || null, V !== null ? V : e(j.type) || "Memo";
|
|
81
|
+
case P:
|
|
82
|
+
V = j._payload, j = j._init;
|
|
83
83
|
try {
|
|
84
|
-
return e(
|
|
84
|
+
return e(j(V));
|
|
85
85
|
} catch {
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
return null;
|
|
89
89
|
}
|
|
90
|
-
function t(
|
|
91
|
-
return "" +
|
|
90
|
+
function t(j) {
|
|
91
|
+
return "" + j;
|
|
92
92
|
}
|
|
93
|
-
function n(
|
|
93
|
+
function n(j) {
|
|
94
94
|
try {
|
|
95
|
-
t(
|
|
95
|
+
t(j);
|
|
96
96
|
var V = !1;
|
|
97
97
|
} catch {
|
|
98
98
|
V = !0;
|
|
99
99
|
}
|
|
100
100
|
if (V) {
|
|
101
101
|
V = console;
|
|
102
|
-
var
|
|
103
|
-
return
|
|
102
|
+
var R = V.error, K = typeof Symbol == "function" && Symbol.toStringTag && j[Symbol.toStringTag] || j.constructor.name || "Object";
|
|
103
|
+
return R.call(
|
|
104
104
|
V,
|
|
105
105
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
106
106
|
K
|
|
107
|
-
), t(
|
|
107
|
+
), t(j);
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
|
-
function i(
|
|
111
|
-
if (
|
|
112
|
-
if (typeof
|
|
110
|
+
function i(j) {
|
|
111
|
+
if (j === g) return "<>";
|
|
112
|
+
if (typeof j == "object" && j !== null && j.$$typeof === P)
|
|
113
113
|
return "<...>";
|
|
114
114
|
try {
|
|
115
|
-
var V = e(
|
|
115
|
+
var V = e(j);
|
|
116
116
|
return V ? "<" + V + ">" : "<...>";
|
|
117
117
|
} catch {
|
|
118
118
|
return "<...>";
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
function r() {
|
|
122
|
-
var
|
|
123
|
-
return
|
|
122
|
+
var j = C.A;
|
|
123
|
+
return j === null ? null : j.getOwner();
|
|
124
124
|
}
|
|
125
125
|
function a() {
|
|
126
126
|
return Error("react-stack-top-frame");
|
|
127
127
|
}
|
|
128
|
-
function o(
|
|
129
|
-
if (
|
|
130
|
-
var V = Object.getOwnPropertyDescriptor(
|
|
128
|
+
function o(j) {
|
|
129
|
+
if (F.call(j, "key")) {
|
|
130
|
+
var V = Object.getOwnPropertyDescriptor(j, "key").get;
|
|
131
131
|
if (V && V.isReactWarning) return !1;
|
|
132
132
|
}
|
|
133
|
-
return
|
|
133
|
+
return j.key !== void 0;
|
|
134
134
|
}
|
|
135
|
-
function l(
|
|
136
|
-
function
|
|
137
|
-
|
|
135
|
+
function l(j, V) {
|
|
136
|
+
function R() {
|
|
137
|
+
Q || (Q = !0, console.error(
|
|
138
138
|
"%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)",
|
|
139
139
|
V
|
|
140
140
|
));
|
|
141
141
|
}
|
|
142
|
-
|
|
143
|
-
get:
|
|
142
|
+
R.isReactWarning = !0, Object.defineProperty(j, "key", {
|
|
143
|
+
get: R,
|
|
144
144
|
configurable: !0
|
|
145
145
|
});
|
|
146
146
|
}
|
|
147
147
|
function c() {
|
|
148
|
-
var
|
|
149
|
-
return
|
|
148
|
+
var j = e(this.type);
|
|
149
|
+
return q[j] || (q[j] = !0, console.error(
|
|
150
150
|
"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."
|
|
151
|
-
)),
|
|
151
|
+
)), j = this.props.ref, j !== void 0 ? j : null;
|
|
152
152
|
}
|
|
153
|
-
function h(
|
|
154
|
-
return
|
|
153
|
+
function h(j, V, R, K, me, le, Rt, Lt) {
|
|
154
|
+
return R = le.ref, j = {
|
|
155
155
|
$$typeof: m,
|
|
156
|
-
type:
|
|
156
|
+
type: j,
|
|
157
157
|
key: V,
|
|
158
158
|
props: le,
|
|
159
159
|
_owner: me
|
|
160
|
-
}, (
|
|
160
|
+
}, (R !== void 0 ? R : null) !== null ? Object.defineProperty(j, "ref", {
|
|
161
161
|
enumerable: !1,
|
|
162
162
|
get: c
|
|
163
|
-
}) : Object.defineProperty(
|
|
163
|
+
}) : Object.defineProperty(j, "ref", { enumerable: !1, value: null }), j._store = {}, Object.defineProperty(j._store, "validated", {
|
|
164
164
|
configurable: !1,
|
|
165
165
|
enumerable: !1,
|
|
166
166
|
writable: !0,
|
|
167
167
|
value: 0
|
|
168
|
-
}), Object.defineProperty(
|
|
168
|
+
}), Object.defineProperty(j, "_debugInfo", {
|
|
169
169
|
configurable: !1,
|
|
170
170
|
enumerable: !1,
|
|
171
171
|
writable: !0,
|
|
172
172
|
value: null
|
|
173
|
-
}), Object.defineProperty(
|
|
173
|
+
}), Object.defineProperty(j, "_debugStack", {
|
|
174
174
|
configurable: !1,
|
|
175
175
|
enumerable: !1,
|
|
176
176
|
writable: !0,
|
|
177
177
|
value: Rt
|
|
178
|
-
}), Object.defineProperty(
|
|
178
|
+
}), Object.defineProperty(j, "_debugTask", {
|
|
179
179
|
configurable: !1,
|
|
180
180
|
enumerable: !1,
|
|
181
181
|
writable: !0,
|
|
182
182
|
value: Lt
|
|
183
|
-
}), Object.freeze && (Object.freeze(
|
|
183
|
+
}), Object.freeze && (Object.freeze(j.props), Object.freeze(j)), j;
|
|
184
184
|
}
|
|
185
|
-
function u(
|
|
185
|
+
function u(j, V, R, K, me, le, Rt, Lt) {
|
|
186
186
|
var G = V.children;
|
|
187
187
|
if (G !== void 0)
|
|
188
188
|
if (K)
|
|
189
|
-
if (
|
|
189
|
+
if (X(G)) {
|
|
190
190
|
for (K = 0; K < G.length; K++)
|
|
191
191
|
d(G[K]);
|
|
192
192
|
Object.freeze && Object.freeze(G);
|
|
@@ -195,12 +195,12 @@ function mo() {
|
|
|
195
195
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
196
196
|
);
|
|
197
197
|
else d(G);
|
|
198
|
-
if (
|
|
199
|
-
G = e(
|
|
198
|
+
if (F.call(V, "key")) {
|
|
199
|
+
G = e(j);
|
|
200
200
|
var De = Object.keys(V).filter(function(ao) {
|
|
201
201
|
return ao !== "key";
|
|
202
202
|
});
|
|
203
|
-
K = 0 < De.length ? "{key: someKey, " + De.join(": ..., ") + ": ...}" : "{key: someKey}",
|
|
203
|
+
K = 0 < De.length ? "{key: someKey, " + De.join(": ..., ") + ": ...}" : "{key: someKey}", _[G + K] || (De = 0 < De.length ? "{" + De.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
204
204
|
`A props object containing a "key" prop is being spread into JSX:
|
|
205
205
|
let props = %s;
|
|
206
206
|
<%s {...props} />
|
|
@@ -211,65 +211,65 @@ React keys must be passed directly to JSX without using spread:
|
|
|
211
211
|
G,
|
|
212
212
|
De,
|
|
213
213
|
G
|
|
214
|
-
),
|
|
214
|
+
), _[G + K] = !0);
|
|
215
215
|
}
|
|
216
|
-
if (G = null,
|
|
217
|
-
|
|
216
|
+
if (G = null, R !== void 0 && (n(R), G = "" + R), o(V) && (n(V.key), G = "" + V.key), "key" in V) {
|
|
217
|
+
R = {};
|
|
218
218
|
for (var Nt in V)
|
|
219
|
-
Nt !== "key" && (
|
|
220
|
-
} else
|
|
219
|
+
Nt !== "key" && (R[Nt] = V[Nt]);
|
|
220
|
+
} else R = V;
|
|
221
221
|
return G && l(
|
|
222
|
-
|
|
223
|
-
typeof
|
|
222
|
+
R,
|
|
223
|
+
typeof j == "function" ? j.displayName || j.name || "Unknown" : j
|
|
224
224
|
), h(
|
|
225
|
-
|
|
225
|
+
j,
|
|
226
226
|
G,
|
|
227
227
|
le,
|
|
228
228
|
me,
|
|
229
229
|
r(),
|
|
230
|
-
|
|
230
|
+
R,
|
|
231
231
|
Rt,
|
|
232
232
|
Lt
|
|
233
233
|
);
|
|
234
234
|
}
|
|
235
|
-
function d(
|
|
236
|
-
typeof
|
|
235
|
+
function d(j) {
|
|
236
|
+
typeof j == "object" && j !== null && j.$$typeof === m && j._store && (j._store.validated = 1);
|
|
237
237
|
}
|
|
238
|
-
var f = gi, m = Symbol.for("react.transitional.element"), x = Symbol.for("react.portal"), g = Symbol.for("react.fragment"),
|
|
238
|
+
var f = gi, m = Symbol.for("react.transitional.element"), x = Symbol.for("react.portal"), g = Symbol.for("react.fragment"), y = Symbol.for("react.strict_mode"), w = Symbol.for("react.profiler"), v = Symbol.for("react.consumer"), b = Symbol.for("react.context"), M = Symbol.for("react.forward_ref"), S = Symbol.for("react.suspense"), E = Symbol.for("react.suspense_list"), k = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), O = Symbol.for("react.activity"), T = Symbol.for("react.client.reference"), C = f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, F = Object.prototype.hasOwnProperty, X = Array.isArray, $ = console.createTask ? console.createTask : function() {
|
|
239
239
|
return null;
|
|
240
240
|
};
|
|
241
241
|
f = {
|
|
242
|
-
"react-stack-bottom-frame": function(
|
|
243
|
-
return
|
|
242
|
+
"react-stack-bottom-frame": function(j) {
|
|
243
|
+
return j();
|
|
244
244
|
}
|
|
245
245
|
};
|
|
246
|
-
var
|
|
246
|
+
var Q, q = {}, Ee = f["react-stack-bottom-frame"].bind(
|
|
247
247
|
f,
|
|
248
248
|
a
|
|
249
|
-
)(),
|
|
250
|
-
Ke.Fragment = g, Ke.jsx = function(
|
|
251
|
-
var le = 1e4 >
|
|
249
|
+
)(), I = $(i(a)), _ = {};
|
|
250
|
+
Ke.Fragment = g, Ke.jsx = function(j, V, R, K, me) {
|
|
251
|
+
var le = 1e4 > C.recentlyCreatedOwnerStacks++;
|
|
252
252
|
return u(
|
|
253
|
-
|
|
253
|
+
j,
|
|
254
254
|
V,
|
|
255
|
-
|
|
255
|
+
R,
|
|
256
256
|
!1,
|
|
257
257
|
K,
|
|
258
258
|
me,
|
|
259
259
|
le ? Error("react-stack-top-frame") : Ee,
|
|
260
|
-
le ?
|
|
260
|
+
le ? $(i(j)) : I
|
|
261
261
|
);
|
|
262
|
-
}, Ke.jsxs = function(
|
|
263
|
-
var le = 1e4 >
|
|
262
|
+
}, Ke.jsxs = function(j, V, R, K, me) {
|
|
263
|
+
var le = 1e4 > C.recentlyCreatedOwnerStacks++;
|
|
264
264
|
return u(
|
|
265
|
-
|
|
265
|
+
j,
|
|
266
266
|
V,
|
|
267
|
-
|
|
267
|
+
R,
|
|
268
268
|
!0,
|
|
269
269
|
K,
|
|
270
270
|
me,
|
|
271
271
|
le ? Error("react-stack-top-frame") : Ee,
|
|
272
|
-
le ?
|
|
272
|
+
le ? $(i(j)) : I
|
|
273
273
|
);
|
|
274
274
|
};
|
|
275
275
|
}()), Ke;
|
|
@@ -279,45 +279,49 @@ function xo() {
|
|
|
279
279
|
return Jn || (Jn = 1, process.env.NODE_ENV === "production" ? at.exports = po() : at.exports = mo()), at.exports;
|
|
280
280
|
}
|
|
281
281
|
var s = xo();
|
|
282
|
-
const Ah = ({ variant: e, collapsed: t,
|
|
283
|
-
const { folds:
|
|
284
|
-
const
|
|
285
|
-
if (
|
|
286
|
-
const
|
|
287
|
-
|
|
282
|
+
const Ah = ({ variant: e, collapsed: t, className: n, children: i }) => {
|
|
283
|
+
const { folds: r } = i, [a, o] = Y(t ? -1 : 0), l = (f) => f === a ? "fold active" : "fold", c = (f) => "fold-button" + (e ? " fold-button--" + e : "") + (r[f].foldColor ? " fold-button--primary fold-button--" + r[f].foldColor : ""), h = (f) => {
|
|
284
|
+
const m = f.which.toString(), x = f.ctrlKey && m.match(/33|34/);
|
|
285
|
+
if (m.match(/38|40/) || x) {
|
|
286
|
+
const g = m.match(/34|40/) ? 1 : -1, y = r.length, w = (a + y + g) % y;
|
|
287
|
+
o(w);
|
|
288
288
|
} else
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
},
|
|
292
|
-
a
|
|
293
|
-
};
|
|
294
|
-
return /* @__PURE__ */ s.jsx("div", { className:
|
|
295
|
-
(
|
|
289
|
+
m === "36" && o(0), m === "35" && o(r.length - 1);
|
|
290
|
+
f.preventDefault();
|
|
291
|
+
}, u = (f) => {
|
|
292
|
+
o(a === f ? -1 : f);
|
|
293
|
+
}, d = "muncher-accordion" + (n ? " " + n : "");
|
|
294
|
+
return /* @__PURE__ */ s.jsx("div", { className: d, children: r.map(
|
|
295
|
+
(f, m) => /* @__PURE__ */ s.jsxs(
|
|
296
296
|
"div",
|
|
297
297
|
{
|
|
298
|
-
className:
|
|
299
|
-
"aria-expanded":
|
|
298
|
+
className: l(m),
|
|
299
|
+
"aria-expanded": a === m,
|
|
300
300
|
children: [
|
|
301
301
|
/* @__PURE__ */ s.jsx(
|
|
302
302
|
"button",
|
|
303
303
|
{
|
|
304
|
-
className:
|
|
305
|
-
onKeyDown:
|
|
306
|
-
onClick: () =>
|
|
307
|
-
children: /* @__PURE__ */ s.jsx("span", { children:
|
|
304
|
+
className: c(m),
|
|
305
|
+
onKeyDown: h,
|
|
306
|
+
onClick: () => u(m),
|
|
307
|
+
children: /* @__PURE__ */ s.jsx("span", { children: f.heading })
|
|
308
308
|
}
|
|
309
309
|
),
|
|
310
|
-
/* @__PURE__ */ s.jsx("section", { className: "fold-content", children:
|
|
310
|
+
/* @__PURE__ */ s.jsx("section", { className: "fold-content", children: f.body })
|
|
311
311
|
]
|
|
312
312
|
},
|
|
313
|
-
"muncher-accordion-fold-" +
|
|
313
|
+
"muncher-accordion-fold-" + m
|
|
314
314
|
)
|
|
315
315
|
) });
|
|
316
316
|
}, yo = ({
|
|
317
317
|
show: e = !1,
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
318
|
+
className: t,
|
|
319
|
+
backdropClickHandler: n,
|
|
320
|
+
...i
|
|
321
|
+
}) => {
|
|
322
|
+
const r = "muncher-backdrop" + (t ? " " + t : "");
|
|
323
|
+
return e ? /* @__PURE__ */ s.jsx("div", { className: r, onClick: n, ...i }) : null;
|
|
324
|
+
}, go = ({ variant: e, rounded: t, border: n, children: i, ...r }) => {
|
|
321
325
|
const a = "muncher-badge" + (e ? " muncher-badge--" + e : "") + (t ? " muncher-badge--rounded" : "") + (n ? " muncher-badge--border" : "");
|
|
322
326
|
return /* @__PURE__ */ s.jsx("div", { className: a, ...r, children: i });
|
|
323
327
|
}, lt = {
|
|
@@ -1365,7 +1369,7 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
1365
1369
|
/* @__PURE__ */ s.jsx("path", { d: "M20.49 15a9 9 0 1 1-2.12-9.36L23 10" }),
|
|
1366
1370
|
/* @__PURE__ */ s.jsx("text", { x: "6", y: "14", fontSize: "6", fontFamily: "'Lucida Grande', sans-serif", children: "360" })
|
|
1367
1371
|
] })
|
|
1368
|
-
},
|
|
1372
|
+
}, N = ({ color: e, name: t, size: n = "small", weight: i = 2, onClick: r, iconString: a, orientation: o = "left", children: l }) => {
|
|
1369
1373
|
const c = `muncher-icon--${n}`, h = t ? lt[t] : a && a in lt ? lt[a] : (process.env.NODE_ENV === "development" && console.warn("Unknown icon:", a), lt.muncher);
|
|
1370
1374
|
return /* @__PURE__ */ s.jsxs("span", { className: "muncher-icon", children: [
|
|
1371
1375
|
l && o && o === "right" ? /* @__PURE__ */ s.jsx("span", { className: "content-left", children: l }) : "",
|
|
@@ -1399,11 +1403,11 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
1399
1403
|
onClick: i,
|
|
1400
1404
|
...r,
|
|
1401
1405
|
children: [
|
|
1402
|
-
/* @__PURE__ */ s.jsx(
|
|
1406
|
+
/* @__PURE__ */ s.jsx(N, { name: t }),
|
|
1403
1407
|
n === "" ? "" : /* @__PURE__ */ s.jsx(go, { variant: e, children: n })
|
|
1404
1408
|
]
|
|
1405
1409
|
}
|
|
1406
|
-
),
|
|
1410
|
+
), ne = ({
|
|
1407
1411
|
type: e = "button",
|
|
1408
1412
|
variant: t,
|
|
1409
1413
|
size: n = "medium",
|
|
@@ -1411,27 +1415,28 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
1411
1415
|
active: r,
|
|
1412
1416
|
disabled: a,
|
|
1413
1417
|
rounded: o,
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1418
|
+
className: l,
|
|
1419
|
+
onClick: c,
|
|
1420
|
+
onMouseDown: h,
|
|
1421
|
+
onMouseEnter: u,
|
|
1422
|
+
onMouseLeave: d,
|
|
1423
|
+
children: f,
|
|
1424
|
+
...m
|
|
1420
1425
|
}) => {
|
|
1421
|
-
const
|
|
1426
|
+
const x = "muncher-button" + (e && e === "nav" ? " muncher-button--nav" : "") + (t ? " muncher-button--" + t : "") + (n ? " muncher-button--" + n : "") + (r ? " muncher-button--active" : "") + (o ? " muncher-button--rounded" : "") + (l ? " " + l : "");
|
|
1422
1427
|
return /* @__PURE__ */ s.jsx(
|
|
1423
1428
|
"button",
|
|
1424
1429
|
{
|
|
1425
1430
|
type: e && e !== "nav" ? e : "button",
|
|
1426
|
-
className:
|
|
1431
|
+
className: x,
|
|
1427
1432
|
disabled: !!a,
|
|
1428
1433
|
title: i,
|
|
1429
|
-
onClick:
|
|
1430
|
-
onMouseDown:
|
|
1431
|
-
onMouseEnter:
|
|
1432
|
-
onMouseLeave:
|
|
1433
|
-
...
|
|
1434
|
-
children:
|
|
1434
|
+
onClick: c,
|
|
1435
|
+
onMouseDown: h,
|
|
1436
|
+
onMouseEnter: u,
|
|
1437
|
+
onMouseLeave: d,
|
|
1438
|
+
...m,
|
|
1439
|
+
children: f
|
|
1435
1440
|
}
|
|
1436
1441
|
);
|
|
1437
1442
|
}, jo = ({
|
|
@@ -1452,30 +1457,30 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
1452
1457
|
children: x,
|
|
1453
1458
|
...g
|
|
1454
1459
|
}) => {
|
|
1455
|
-
const
|
|
1460
|
+
const y = fe(null), w = (S) => {
|
|
1456
1461
|
S.preventDefault(), h && h(S), f && f(!0);
|
|
1457
|
-
},
|
|
1462
|
+
}, v = Ce(() => {
|
|
1458
1463
|
f(!1), u && u();
|
|
1459
|
-
}, [u, f]),
|
|
1460
|
-
S.keyCode === 27 &&
|
|
1461
|
-
}, [
|
|
1464
|
+
}, [u, f]), b = Ce((S) => {
|
|
1465
|
+
S.keyCode === 27 && v();
|
|
1466
|
+
}, [v]);
|
|
1462
1467
|
je(() => {
|
|
1463
1468
|
const S = (E) => {
|
|
1464
|
-
|
|
1469
|
+
y && y.current && E.target instanceof HTMLElement && !y.current.contains(E.target) && v();
|
|
1465
1470
|
};
|
|
1466
|
-
return document.addEventListener("keydown",
|
|
1467
|
-
document.removeEventListener("keydown",
|
|
1471
|
+
return document.addEventListener("keydown", b, !1), document.addEventListener("mousedown", S), () => {
|
|
1472
|
+
document.removeEventListener("keydown", b, !1);
|
|
1468
1473
|
};
|
|
1469
|
-
}, [
|
|
1470
|
-
const
|
|
1471
|
-
var
|
|
1472
|
-
const S = (
|
|
1474
|
+
}, [b, v]);
|
|
1475
|
+
const M = () => {
|
|
1476
|
+
var k;
|
|
1477
|
+
const S = (k = y.current) == null ? void 0 : k.offsetLeft, E = window.innerWidth;
|
|
1473
1478
|
if (S) {
|
|
1474
1479
|
if (S < 100) return "muncher-dropdown--content";
|
|
1475
1480
|
if (E - S < 150) return "muncher-dropdown--content drop-left";
|
|
1476
1481
|
if (E - S < 250) {
|
|
1477
|
-
const
|
|
1478
|
-
if (
|
|
1482
|
+
const P = Math.round((E - S) / E * 100);
|
|
1483
|
+
if (P > 40 || P < 60) return "muncher-dropdown--content drop-middle";
|
|
1479
1484
|
}
|
|
1480
1485
|
}
|
|
1481
1486
|
switch (c) {
|
|
@@ -1487,11 +1492,11 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
1487
1492
|
return "muncher-dropdown--content";
|
|
1488
1493
|
}
|
|
1489
1494
|
};
|
|
1490
|
-
return /* @__PURE__ */ s.jsxs("div", { className: "muncher-dropdown", ref:
|
|
1495
|
+
return /* @__PURE__ */ s.jsxs("div", { className: "muncher-dropdown", ref: y, children: [
|
|
1491
1496
|
/* @__PURE__ */ s.jsxs(
|
|
1492
|
-
|
|
1497
|
+
ne,
|
|
1493
1498
|
{
|
|
1494
|
-
onMouseDown:
|
|
1499
|
+
onMouseDown: w,
|
|
1495
1500
|
title: n,
|
|
1496
1501
|
disabled: r,
|
|
1497
1502
|
rounded: l,
|
|
@@ -1511,7 +1516,7 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
1511
1516
|
]
|
|
1512
1517
|
}
|
|
1513
1518
|
),
|
|
1514
|
-
d ? /* @__PURE__ */ s.jsx("div", { className:
|
|
1519
|
+
d ? /* @__PURE__ */ s.jsx("div", { className: M(), children: x }) : ""
|
|
1515
1520
|
] });
|
|
1516
1521
|
}, Vh = ({
|
|
1517
1522
|
title: e,
|
|
@@ -1524,7 +1529,7 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
1524
1529
|
...l
|
|
1525
1530
|
}) => /* @__PURE__ */ s.jsxs("div", { className: `muncher-dropdown-nav ${a ? "drop-left" : ""}`, children: [
|
|
1526
1531
|
/* @__PURE__ */ s.jsx(
|
|
1527
|
-
|
|
1532
|
+
ne,
|
|
1528
1533
|
{
|
|
1529
1534
|
type: "nav",
|
|
1530
1535
|
title: e,
|
|
@@ -1549,13 +1554,13 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
1549
1554
|
}, 2e3);
|
|
1550
1555
|
};
|
|
1551
1556
|
return /* @__PURE__ */ s.jsx(
|
|
1552
|
-
|
|
1557
|
+
ne,
|
|
1553
1558
|
{
|
|
1554
1559
|
size: n,
|
|
1555
1560
|
variant: t,
|
|
1556
1561
|
title: l,
|
|
1557
1562
|
onClick: h,
|
|
1558
|
-
children: /* @__PURE__ */ s.jsx(
|
|
1563
|
+
children: /* @__PURE__ */ s.jsx(N, { name: a, color: i })
|
|
1559
1564
|
}
|
|
1560
1565
|
);
|
|
1561
1566
|
}, Ch = ({
|
|
@@ -1572,33 +1577,33 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
1572
1577
|
setShowContent: r,
|
|
1573
1578
|
variant: e,
|
|
1574
1579
|
size: t,
|
|
1575
|
-
element: /* @__PURE__ */ s.jsx(
|
|
1580
|
+
element: /* @__PURE__ */ s.jsx(N, { name: "share", orientation: "right", children: "Share" }),
|
|
1576
1581
|
children: [
|
|
1577
|
-
/* @__PURE__ */ s.jsx(
|
|
1582
|
+
/* @__PURE__ */ s.jsx(ne, { size: "small", variant: e, children: /* @__PURE__ */ s.jsx(
|
|
1578
1583
|
"a",
|
|
1579
1584
|
{
|
|
1580
1585
|
href: "https://twitter.com/share?url=" + window.location.href + "&text=" + n,
|
|
1581
1586
|
target: "_blank",
|
|
1582
1587
|
title: "Share link to Twitter",
|
|
1583
|
-
children: /* @__PURE__ */ s.jsx(
|
|
1588
|
+
children: /* @__PURE__ */ s.jsx(N, { name: "twitter" })
|
|
1584
1589
|
}
|
|
1585
1590
|
) }),
|
|
1586
|
-
/* @__PURE__ */ s.jsx(
|
|
1591
|
+
/* @__PURE__ */ s.jsx(ne, { size: "small", variant: e, children: /* @__PURE__ */ s.jsx(
|
|
1587
1592
|
"a",
|
|
1588
1593
|
{
|
|
1589
1594
|
href: "https://www.facebook.com/sharer/sharer.php?u=" + window.location.href,
|
|
1590
1595
|
target: "_blank",
|
|
1591
1596
|
title: "Share link to Facebook",
|
|
1592
|
-
children: /* @__PURE__ */ s.jsx(
|
|
1597
|
+
children: /* @__PURE__ */ s.jsx(N, { name: "facebook" })
|
|
1593
1598
|
}
|
|
1594
1599
|
) }),
|
|
1595
|
-
/* @__PURE__ */ s.jsx(
|
|
1600
|
+
/* @__PURE__ */ s.jsx(ne, { size: "small", variant: e, children: /* @__PURE__ */ s.jsx(
|
|
1596
1601
|
"a",
|
|
1597
1602
|
{
|
|
1598
1603
|
href: "mailto:?subject=" + n + "&body=" + window.location.href,
|
|
1599
1604
|
target: "_blank",
|
|
1600
1605
|
title: "share link by Email",
|
|
1601
|
-
children: /* @__PURE__ */ s.jsx(
|
|
1606
|
+
children: /* @__PURE__ */ s.jsx(N, { name: "mail" })
|
|
1602
1607
|
}
|
|
1603
1608
|
) }),
|
|
1604
1609
|
/* @__PURE__ */ s.jsx(wo, { text: window.location.href })
|
|
@@ -1619,7 +1624,7 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
1619
1624
|
const h = encodeURI("data:text/csv;charset=utf-8," + e.join(",") + `
|
|
1620
1625
|
` + t.map((u) => u.join(",")).join(`
|
|
1621
1626
|
`));
|
|
1622
|
-
return /* @__PURE__ */ s.jsx("div", { className: "muncher-csv", children: /* @__PURE__ */ s.jsx(
|
|
1627
|
+
return /* @__PURE__ */ s.jsx("div", { className: "muncher-csv", children: /* @__PURE__ */ s.jsx(ne, { variant: i, size: r, active: o, disabled: l, rounded: c, children: /* @__PURE__ */ s.jsx("a", { href: h, download: n + ".csv", children: /* @__PURE__ */ s.jsx(N, { name: "download", children: a || "Download" }) }) }) });
|
|
1623
1628
|
}, To = ({
|
|
1624
1629
|
variant: e = "transparent",
|
|
1625
1630
|
size: t = "small",
|
|
@@ -1630,9 +1635,9 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
1630
1635
|
onClick: o,
|
|
1631
1636
|
children: l
|
|
1632
1637
|
}) => {
|
|
1633
|
-
const [c, h] = Y(!1), u = () => !r || r && !c ? i ? /* @__PURE__ */ s.jsx(
|
|
1638
|
+
const [c, h] = Y(!1), u = () => !r || r && !c ? i ? /* @__PURE__ */ s.jsx(N, { name: "sort-asc" }) : /* @__PURE__ */ s.jsx(N, { name: "sort-desc" }) : i ? /* @__PURE__ */ s.jsx(N, { name: "sort-desc" }) : /* @__PURE__ */ s.jsx(N, { name: "sort-asc" });
|
|
1634
1639
|
return /* @__PURE__ */ s.jsxs(
|
|
1635
|
-
|
|
1640
|
+
ne,
|
|
1636
1641
|
{
|
|
1637
1642
|
variant: e,
|
|
1638
1643
|
size: t,
|
|
@@ -1677,14 +1682,14 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
1677
1682
|
{
|
|
1678
1683
|
className: e === "left" ? "muncher-button--navigate muncher-button--navigate-left" : "muncher-button--navigate muncher-button--navigate-right",
|
|
1679
1684
|
children: /* @__PURE__ */ s.jsx(
|
|
1680
|
-
|
|
1685
|
+
ne,
|
|
1681
1686
|
{
|
|
1682
1687
|
onClick: o,
|
|
1683
1688
|
disabled: i,
|
|
1684
1689
|
size: "small",
|
|
1685
1690
|
variant: r,
|
|
1686
1691
|
title: e === "left" ? "Navigate Left" : "Navigate Right",
|
|
1687
|
-
children: /* @__PURE__ */ s.jsx(
|
|
1692
|
+
children: /* @__PURE__ */ s.jsx(N, { name: l(), size: t, weight: n })
|
|
1688
1693
|
}
|
|
1689
1694
|
)
|
|
1690
1695
|
}
|
|
@@ -1752,7 +1757,7 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
1752
1757
|
};
|
|
1753
1758
|
return /* @__PURE__ */ s.jsx("div", { className: "muncher-file-input--div", children: /* @__PURE__ */ s.jsxs("div", { className: "file-input-element", children: [
|
|
1754
1759
|
/* @__PURE__ */ s.jsxs("label", { htmlFor: e, className: d, children: [
|
|
1755
|
-
/* @__PURE__ */ s.jsx(
|
|
1760
|
+
/* @__PURE__ */ s.jsx(N, { name: "upload" }),
|
|
1756
1761
|
" ",
|
|
1757
1762
|
t || "Upload CSV",
|
|
1758
1763
|
r ? /* @__PURE__ */ s.jsx("span", { className: "required", children: " *" }) : "",
|
|
@@ -1786,17 +1791,17 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
1786
1791
|
maxFiles: h,
|
|
1787
1792
|
...u
|
|
1788
1793
|
}) => {
|
|
1789
|
-
const [d, f] = Y(""), [m, x] = Y(""), g = h || 3,
|
|
1794
|
+
const [d, f] = Y(""), [m, x] = Y(""), g = h || 3, y = "muncher-button" + (n ? " muncher-button--" + n : "") + (i ? " muncher-button--" + i : "") + (a ? " muncher-button--active" : ""), w = (b) => {
|
|
1790
1795
|
if (c) {
|
|
1791
|
-
let
|
|
1792
|
-
|
|
1796
|
+
let M = Array.from(b.currentTarget.files);
|
|
1797
|
+
M.length > g && (M = M.slice(0, g), x("Only first " + g + " files included")), o(M), f(M.map((S) => S.name).join(", "));
|
|
1793
1798
|
} else
|
|
1794
|
-
o(Array.from(
|
|
1795
|
-
},
|
|
1799
|
+
o(Array.from(b.currentTarget.files[0])), f(b.currentTarget.files[0].name);
|
|
1800
|
+
}, v = () => l && l !== "";
|
|
1796
1801
|
return /* @__PURE__ */ s.jsxs("div", { className: "muncher-file-input--div", children: [
|
|
1797
1802
|
/* @__PURE__ */ s.jsxs("div", { className: "file-input-element", children: [
|
|
1798
|
-
/* @__PURE__ */ s.jsxs("label", { htmlFor: e, className:
|
|
1799
|
-
/* @__PURE__ */ s.jsx(
|
|
1803
|
+
/* @__PURE__ */ s.jsxs("label", { htmlFor: e, className: y, children: [
|
|
1804
|
+
/* @__PURE__ */ s.jsx(N, { name: "image" }),
|
|
1800
1805
|
" ",
|
|
1801
1806
|
t,
|
|
1802
1807
|
r ? /* @__PURE__ */ s.jsx("span", { className: "required", children: " *" }) : ""
|
|
@@ -1809,7 +1814,7 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
1809
1814
|
type: "file",
|
|
1810
1815
|
className: "muncher-file-input",
|
|
1811
1816
|
name: e,
|
|
1812
|
-
onChange:
|
|
1817
|
+
onChange: w,
|
|
1813
1818
|
multiple: c,
|
|
1814
1819
|
accept: "image/*",
|
|
1815
1820
|
...u
|
|
@@ -1817,7 +1822,7 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
1817
1822
|
)
|
|
1818
1823
|
] }),
|
|
1819
1824
|
m !== "" ? /* @__PURE__ */ s.jsx("p", { className: "text-danger", children: m }) : "",
|
|
1820
|
-
|
|
1825
|
+
v() ? /* @__PURE__ */ s.jsx("div", { className: "muncher-input-error-message", children: /* @__PURE__ */ s.jsx(N, { name: "alert", children: l }) }) : ""
|
|
1821
1826
|
] });
|
|
1822
1827
|
}, So = ({
|
|
1823
1828
|
name: e,
|
|
@@ -1836,26 +1841,26 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
1836
1841
|
focus: m = !1,
|
|
1837
1842
|
placeholder: x,
|
|
1838
1843
|
onChange: g,
|
|
1839
|
-
step:
|
|
1840
|
-
value:
|
|
1841
|
-
maxLength:
|
|
1842
|
-
onEnterPress:
|
|
1843
|
-
displayLoader:
|
|
1844
|
+
step: y,
|
|
1845
|
+
value: w,
|
|
1846
|
+
maxLength: v,
|
|
1847
|
+
onEnterPress: b,
|
|
1848
|
+
displayLoader: M,
|
|
1844
1849
|
...S
|
|
1845
1850
|
}) => {
|
|
1846
|
-
const E = () => f && f !== "",
|
|
1847
|
-
let
|
|
1848
|
-
return (r || a) && (
|
|
1849
|
-
},
|
|
1850
|
-
|
|
1851
|
+
const E = () => f && f !== "", k = () => {
|
|
1852
|
+
let T = "muncher-input";
|
|
1853
|
+
return (r || a) && (T += " muncher-input-icon"), E() && (T += " muncher-input-error"), u === "side" && (T += " muncher-label-side"), T;
|
|
1854
|
+
}, P = () => t ? /* @__PURE__ */ s.jsx(nt, { label: t, required: n, id: e }) : "", O = (T) => {
|
|
1855
|
+
T.key === "Enter" && b && b(), d && d(T);
|
|
1851
1856
|
};
|
|
1852
1857
|
return /* @__PURE__ */ s.jsxs("div", { className: "muncher-input--div", children: [
|
|
1853
|
-
u !== "side" ?
|
|
1858
|
+
u !== "side" ? P() : "",
|
|
1854
1859
|
/* @__PURE__ */ s.jsxs("div", { className: "muncher-input-element", children: [
|
|
1855
|
-
u === "side" ?
|
|
1856
|
-
r ? /* @__PURE__ */ s.jsx(
|
|
1860
|
+
u === "side" ? P() : "",
|
|
1861
|
+
r ? /* @__PURE__ */ s.jsx(N, { name: r }) : "",
|
|
1857
1862
|
a ? /* @__PURE__ */ s.jsxs("span", { className: "muncher-icon-hover", children: [
|
|
1858
|
-
/* @__PURE__ */ s.jsx(
|
|
1863
|
+
/* @__PURE__ */ s.jsx(N, { name: a, onClick: o }),
|
|
1859
1864
|
" "
|
|
1860
1865
|
] }) : "",
|
|
1861
1866
|
/* @__PURE__ */ s.jsxs("div", { className: "muncher-input-wrapper", children: [
|
|
@@ -1863,10 +1868,10 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
1863
1868
|
"input",
|
|
1864
1869
|
{
|
|
1865
1870
|
id: e,
|
|
1866
|
-
className:
|
|
1871
|
+
className: k(),
|
|
1867
1872
|
name: e,
|
|
1868
1873
|
autoFocus: m,
|
|
1869
|
-
value:
|
|
1874
|
+
value: w,
|
|
1870
1875
|
type: l || "text",
|
|
1871
1876
|
autoComplete: "off",
|
|
1872
1877
|
placeholder: x,
|
|
@@ -1874,17 +1879,17 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
1874
1879
|
required: n,
|
|
1875
1880
|
readOnly: i,
|
|
1876
1881
|
list: c,
|
|
1877
|
-
onKeyDown:
|
|
1882
|
+
onKeyDown: O,
|
|
1878
1883
|
onBlur: h,
|
|
1879
|
-
step:
|
|
1880
|
-
maxLength:
|
|
1884
|
+
step: y,
|
|
1885
|
+
maxLength: v,
|
|
1881
1886
|
...S
|
|
1882
1887
|
}
|
|
1883
1888
|
),
|
|
1884
|
-
|
|
1889
|
+
M ? /* @__PURE__ */ s.jsx(vi, { size: "tiny" }) : ""
|
|
1885
1890
|
] })
|
|
1886
1891
|
] }),
|
|
1887
|
-
E() ? /* @__PURE__ */ s.jsx("div", { className: "muncher-input-error-message", children: /* @__PURE__ */ s.jsx(
|
|
1892
|
+
E() ? /* @__PURE__ */ s.jsx("div", { className: "muncher-input-error-message", children: /* @__PURE__ */ s.jsx(N, { name: "alert", children: f }) }) : ""
|
|
1888
1893
|
] });
|
|
1889
1894
|
}, kh = ({ name: e, required: t = !1, onChange: n, checked: i = !1, label: r, ...a }) => /* @__PURE__ */ s.jsx("div", { className: "muncher-input--div", children: /* @__PURE__ */ s.jsxs("div", { className: "muncher-radio", children: [
|
|
1890
1895
|
/* @__PURE__ */ s.jsx(
|
|
@@ -1943,7 +1948,7 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
1943
1948
|
]
|
|
1944
1949
|
}
|
|
1945
1950
|
) }),
|
|
1946
|
-
h() ? /* @__PURE__ */ s.jsx("div", { className: "muncher-input-error-message", children: /* @__PURE__ */ s.jsx(
|
|
1951
|
+
h() ? /* @__PURE__ */ s.jsx("div", { className: "muncher-input-error-message", children: /* @__PURE__ */ s.jsx(N, { name: "alert", children: a }) }) : ""
|
|
1947
1952
|
] });
|
|
1948
1953
|
}, Rh = ({
|
|
1949
1954
|
name: e,
|
|
@@ -2002,31 +2007,31 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
2002
2007
|
displayLoader: m,
|
|
2003
2008
|
children: x
|
|
2004
2009
|
}) => {
|
|
2005
|
-
const g = fe(null),
|
|
2006
|
-
a(!0), i(
|
|
2007
|
-
},
|
|
2010
|
+
const g = fe(null), y = (b) => {
|
|
2011
|
+
a(!0), i(b.target.value);
|
|
2012
|
+
}, w = Ce(() => {
|
|
2008
2013
|
a(!1);
|
|
2009
|
-
}, [a]),
|
|
2010
|
-
|
|
2011
|
-
}, [
|
|
2014
|
+
}, [a]), v = Ce((b) => {
|
|
2015
|
+
b.keyCode === 27 && w();
|
|
2016
|
+
}, [w]);
|
|
2012
2017
|
return je(() => {
|
|
2013
|
-
const
|
|
2018
|
+
const b = (M) => {
|
|
2014
2019
|
if (g && g !== null) {
|
|
2015
2020
|
const S = g.current;
|
|
2016
|
-
S && !S.contains(
|
|
2021
|
+
S && !S.contains(M.target) && w();
|
|
2017
2022
|
}
|
|
2018
2023
|
};
|
|
2019
|
-
return document.addEventListener("keydown",
|
|
2020
|
-
document.removeEventListener("keydown",
|
|
2024
|
+
return document.addEventListener("keydown", v, !1), document.addEventListener("mousedown", b), () => {
|
|
2025
|
+
document.removeEventListener("keydown", v, !1);
|
|
2021
2026
|
};
|
|
2022
|
-
}, [
|
|
2027
|
+
}, [v, w]), /* @__PURE__ */ s.jsxs("div", { className: "muncher-input-drop-down", ref: g, children: [
|
|
2023
2028
|
/* @__PURE__ */ s.jsx(
|
|
2024
2029
|
So,
|
|
2025
2030
|
{
|
|
2026
2031
|
focus: t,
|
|
2027
2032
|
placeholder: n,
|
|
2028
2033
|
name: e,
|
|
2029
|
-
onChange:
|
|
2034
|
+
onChange: y,
|
|
2030
2035
|
onEnterPress: d,
|
|
2031
2036
|
list: f,
|
|
2032
2037
|
displayLoader: m,
|
|
@@ -2040,7 +2045,7 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
2040
2045
|
r ? /* @__PURE__ */ s.jsx("div", { className: "muncher-input-drop-down--content", children: x }) : ""
|
|
2041
2046
|
] });
|
|
2042
2047
|
}, Nh = ({ children: e }) => /* @__PURE__ */ s.jsx("ul", { className: "muncher-ul", children: e }), Fh = ({ isFeatured: e, bulletIcon: t = "arrow-right", bulletWeight: n = 2, bulletSize: i = "small", bulletColor: r, children: a }) => /* @__PURE__ */ s.jsx("li", { className: e ? "muncher-li featured" : "muncher-li", children: /* @__PURE__ */ s.jsx(
|
|
2043
|
-
|
|
2048
|
+
N,
|
|
2044
2049
|
{
|
|
2045
2050
|
name: t,
|
|
2046
2051
|
weight: n,
|
|
@@ -2075,7 +2080,7 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
2075
2080
|
const i = () => e ? "muncher-paper muncher-paper-hover" : "muncher-paper";
|
|
2076
2081
|
return /* @__PURE__ */ s.jsx("section", { className: i(), onClick: t, children: n });
|
|
2077
2082
|
}, Bh = ({ pillCloseHandler: e, children: t, ...n }) => /* @__PURE__ */ s.jsxs("div", { className: "muncher-pill", ...n, children: [
|
|
2078
|
-
/* @__PURE__ */ s.jsx("div", { className: "close", onClick: e, children: /* @__PURE__ */ s.jsx(
|
|
2083
|
+
/* @__PURE__ */ s.jsx("div", { className: "close", onClick: e, children: /* @__PURE__ */ s.jsx(N, { name: "close" }) }),
|
|
2079
2084
|
/* @__PURE__ */ s.jsxs("div", { className: "content", children: [
|
|
2080
2085
|
" ",
|
|
2081
2086
|
t
|
|
@@ -2233,7 +2238,7 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
2233
2238
|
/* @__PURE__ */ s.jsx("header", { children: r.map(
|
|
2234
2239
|
(o, l) => /* @__PURE__ */ s.jsxs("div", { className: "muncher-tab-header--item", children: [
|
|
2235
2240
|
/* @__PURE__ */ s.jsx(
|
|
2236
|
-
|
|
2241
|
+
ne,
|
|
2237
2242
|
{
|
|
2238
2243
|
variant: "transparent",
|
|
2239
2244
|
active: n === l,
|
|
@@ -2265,91 +2270,92 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
2265
2270
|
skeleton: n,
|
|
2266
2271
|
handleOnUpload: i,
|
|
2267
2272
|
sortBy: r,
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2273
|
+
className: a,
|
|
2274
|
+
excludeDownload: o,
|
|
2275
|
+
includeUpload: l,
|
|
2276
|
+
isUploading: c,
|
|
2277
|
+
uploadWarningMessage: h,
|
|
2278
|
+
uploadSuccessMessage: u,
|
|
2279
|
+
excludePagination: d,
|
|
2280
|
+
footer: f,
|
|
2281
|
+
children: m
|
|
2276
2282
|
}) => {
|
|
2277
|
-
const { header:
|
|
2278
|
-
|
|
2279
|
-
(C) => C.index ===
|
|
2283
|
+
const { header: x, rows: g } = m, [y, w] = Y(r ?? { index: -1 }), [v, b] = Y({ num: 0, size: t }), M = (T) => {
|
|
2284
|
+
w(
|
|
2285
|
+
(C) => C.index === T ? { ...C, desc: !C.desc } : { index: T }
|
|
2280
2286
|
);
|
|
2281
|
-
},
|
|
2282
|
-
var
|
|
2283
|
-
const
|
|
2284
|
-
if (
|
|
2285
|
-
return
|
|
2286
|
-
const C = (
|
|
2287
|
-
return C ?
|
|
2288
|
-
var
|
|
2289
|
-
const
|
|
2290
|
-
return
|
|
2291
|
-
}),
|
|
2292
|
-
}, [
|
|
2293
|
-
() =>
|
|
2294
|
-
[
|
|
2295
|
-
),
|
|
2296
|
-
(
|
|
2297
|
-
);
|
|
2298
|
-
return /* @__PURE__ */ s.jsxs("section", { className:
|
|
2299
|
-
/* @__PURE__ */ s.jsx("div", { className: "row head", children:
|
|
2300
|
-
(
|
|
2287
|
+
}, S = Oe(() => {
|
|
2288
|
+
var F;
|
|
2289
|
+
const T = [...g];
|
|
2290
|
+
if (y.index < 0)
|
|
2291
|
+
return T;
|
|
2292
|
+
const C = (F = x[y.index]) == null ? void 0 : F.sort;
|
|
2293
|
+
return C ? T.sort(C) : T.sort((X, $) => {
|
|
2294
|
+
var Ee, I, _, j;
|
|
2295
|
+
const Q = ((I = (Ee = X[y.index]) == null ? void 0 : Ee.value) == null ? void 0 : I.toString().toLowerCase()) ?? "", q = ((j = (_ = $[y.index]) == null ? void 0 : _.value) == null ? void 0 : j.toString().toLowerCase()) ?? "";
|
|
2296
|
+
return Q.localeCompare(q);
|
|
2297
|
+
}), y.desc ? T.reverse() : T;
|
|
2298
|
+
}, [g, y, x]), E = Oe(
|
|
2299
|
+
() => S.slice(v.num * v.size, (v.num + 1) * v.size),
|
|
2300
|
+
[S, v]
|
|
2301
|
+
), k = x.filter((T) => !T.csvExclude).map((T) => typeof T.name == "string" ? T.name : ""), P = g.map(
|
|
2302
|
+
(T) => T.filter((C, F) => !x[F].csvExclude).map((C) => C.csv ?? C.value ?? "")
|
|
2303
|
+
), O = "muncher-table" + (a ? " " + a : "");
|
|
2304
|
+
return /* @__PURE__ */ s.jsxs("section", { className: O, children: [
|
|
2305
|
+
/* @__PURE__ */ s.jsx("div", { className: "row head", children: x.map(
|
|
2306
|
+
(T, C) => T.visibility === "hidden" ? null : /* @__PURE__ */ s.jsx(
|
|
2301
2307
|
"div",
|
|
2302
2308
|
{
|
|
2303
|
-
title:
|
|
2304
|
-
className:
|
|
2305
|
-
children: typeof
|
|
2309
|
+
title: T.title,
|
|
2310
|
+
className: T.visibility ? "col main" : "col",
|
|
2311
|
+
children: typeof T.name == "string" ? /* @__PURE__ */ s.jsx("div", { className: "sort-button", children: /* @__PURE__ */ s.jsx(
|
|
2306
2312
|
To,
|
|
2307
2313
|
{
|
|
2308
|
-
onClick: () =>
|
|
2309
|
-
active:
|
|
2310
|
-
sortAsc: !
|
|
2311
|
-
children:
|
|
2314
|
+
onClick: () => M(C),
|
|
2315
|
+
active: y.index === C,
|
|
2316
|
+
sortAsc: !y.desc,
|
|
2317
|
+
children: T.name
|
|
2312
2318
|
}
|
|
2313
|
-
) }) :
|
|
2319
|
+
) }) : T.name
|
|
2314
2320
|
},
|
|
2315
2321
|
`row-head-${C}`
|
|
2316
2322
|
)
|
|
2317
2323
|
) }),
|
|
2318
|
-
n ||
|
|
2319
|
-
(
|
|
2324
|
+
n || E.map((T, C) => /* @__PURE__ */ s.jsx("div", { className: "row", children: T.map(
|
|
2325
|
+
(F, X) => x[X].visibility === "hidden" ? null : /* @__PURE__ */ s.jsx(
|
|
2320
2326
|
"div",
|
|
2321
2327
|
{
|
|
2322
|
-
className:
|
|
2323
|
-
children:
|
|
2328
|
+
className: x[X].visibility ? "col main" : "col",
|
|
2329
|
+
children: F.content
|
|
2324
2330
|
},
|
|
2325
|
-
`row-col-${C}-${
|
|
2331
|
+
`row-col-${C}-${X}`
|
|
2326
2332
|
)
|
|
2327
2333
|
) }, `row-${C}`)),
|
|
2328
|
-
|
|
2334
|
+
f ?? null,
|
|
2329
2335
|
/* @__PURE__ */ s.jsxs("div", { className: "row-footer", children: [
|
|
2330
2336
|
/* @__PURE__ */ s.jsxs("div", { className: "row-footer-buttons", children: [
|
|
2331
|
-
!
|
|
2337
|
+
!o && /* @__PURE__ */ s.jsx(
|
|
2332
2338
|
bo,
|
|
2333
2339
|
{
|
|
2334
2340
|
filename: e ?? "download",
|
|
2335
2341
|
variant: "secondary",
|
|
2336
2342
|
title: "Download",
|
|
2337
|
-
header:
|
|
2338
|
-
data:
|
|
2343
|
+
header: k,
|
|
2344
|
+
data: P
|
|
2339
2345
|
}
|
|
2340
2346
|
),
|
|
2341
|
-
|
|
2347
|
+
l && /* @__PURE__ */ s.jsx(
|
|
2342
2348
|
Mo,
|
|
2343
2349
|
{
|
|
2344
2350
|
name: "csv-input-file",
|
|
2345
2351
|
handleOnChange: i,
|
|
2346
|
-
isUploading:
|
|
2347
|
-
warningMessage:
|
|
2348
|
-
successMessage:
|
|
2352
|
+
isUploading: c,
|
|
2353
|
+
warningMessage: h,
|
|
2354
|
+
successMessage: u
|
|
2349
2355
|
}
|
|
2350
2356
|
)
|
|
2351
2357
|
] }),
|
|
2352
|
-
!
|
|
2358
|
+
!d && /* @__PURE__ */ s.jsxs("div", { className: "pagination", children: [
|
|
2353
2359
|
/* @__PURE__ */ s.jsxs("div", { className: "left", children: [
|
|
2354
2360
|
"Rows:",
|
|
2355
2361
|
/* @__PURE__ */ s.jsx(
|
|
@@ -2361,37 +2367,37 @@ const Ah = ({ variant: e, collapsed: t, children: n }) => {
|
|
|
2361
2367
|
{ label: "50", value: "50" },
|
|
2362
2368
|
{ label: "100", value: "100" }
|
|
2363
2369
|
],
|
|
2364
|
-
value: String(
|
|
2365
|
-
onChange: (
|
|
2370
|
+
value: String(v.size),
|
|
2371
|
+
onChange: (T) => b({ num: 0, size: parseInt(T.target.value, 10) })
|
|
2366
2372
|
}
|
|
2367
2373
|
)
|
|
2368
2374
|
] }),
|
|
2369
2375
|
/* @__PURE__ */ s.jsxs("div", { className: "center", children: [
|
|
2370
|
-
|
|
2376
|
+
v.num * v.size + 1,
|
|
2371
2377
|
" -",
|
|
2372
|
-
Math.min((
|
|
2378
|
+
Math.min((v.num + 1) * v.size, g.length),
|
|
2373
2379
|
" of ",
|
|
2374
|
-
|
|
2380
|
+
g.length
|
|
2375
2381
|
] }),
|
|
2376
2382
|
/* @__PURE__ */ s.jsxs("div", { className: "right", children: [
|
|
2377
2383
|
/* @__PURE__ */ s.jsx(
|
|
2378
|
-
|
|
2384
|
+
ne,
|
|
2379
2385
|
{
|
|
2380
2386
|
variant: "transparent",
|
|
2381
|
-
disabled:
|
|
2387
|
+
disabled: v.num === 0,
|
|
2382
2388
|
size: "small",
|
|
2383
|
-
onClick: () => b({ ...
|
|
2384
|
-
children: /* @__PURE__ */ s.jsx(
|
|
2389
|
+
onClick: () => b({ ...v, num: v.num - 1 }),
|
|
2390
|
+
children: /* @__PURE__ */ s.jsx(N, { name: "chevron-left" })
|
|
2385
2391
|
}
|
|
2386
2392
|
),
|
|
2387
2393
|
/* @__PURE__ */ s.jsx(
|
|
2388
|
-
|
|
2394
|
+
ne,
|
|
2389
2395
|
{
|
|
2390
2396
|
variant: "transparent",
|
|
2391
|
-
disabled: (
|
|
2397
|
+
disabled: (v.num + 1) * v.size >= g.length,
|
|
2392
2398
|
size: "small",
|
|
2393
|
-
onClick: () => b({ ...
|
|
2394
|
-
children: /* @__PURE__ */ s.jsx(
|
|
2399
|
+
onClick: () => b({ ...v, num: v.num + 1 }),
|
|
2400
|
+
children: /* @__PURE__ */ s.jsx(N, { name: "chevron-right" })
|
|
2395
2401
|
}
|
|
2396
2402
|
)
|
|
2397
2403
|
] })
|
|
@@ -2435,7 +2441,7 @@ function Si(e) {
|
|
|
2435
2441
|
let t;
|
|
2436
2442
|
return () => (t === void 0 && (t = e()), t);
|
|
2437
2443
|
}
|
|
2438
|
-
const
|
|
2444
|
+
const ie = /* @__NO_SIDE_EFFECTS__ */ (e) => e, Eo = (e, t) => (n) => t(e(n)), st = (...e) => e.reduce(Eo), Je = /* @__NO_SIDE_EFFECTS__ */ (e, t, n) => {
|
|
2439
2445
|
const i = t - e;
|
|
2440
2446
|
return i === 0 ? 1 : (n - e) / i;
|
|
2441
2447
|
};
|
|
@@ -2464,7 +2470,7 @@ class Sn {
|
|
|
2464
2470
|
this.subscriptions.length = 0;
|
|
2465
2471
|
}
|
|
2466
2472
|
}
|
|
2467
|
-
const
|
|
2473
|
+
const te = /* @__NO_SIDE_EFFECTS__ */ (e) => e * 1e3, se = /* @__NO_SIDE_EFFECTS__ */ (e) => e / 1e3;
|
|
2468
2474
|
function Ai(e, t) {
|
|
2469
2475
|
return t ? e * (1e3 / t) : 0;
|
|
2470
2476
|
}
|
|
@@ -2482,12 +2488,12 @@ function Ro(e, t, n, i, r) {
|
|
|
2482
2488
|
}
|
|
2483
2489
|
function it(e, t, n, i) {
|
|
2484
2490
|
if (e === t && n === i)
|
|
2485
|
-
return
|
|
2491
|
+
return ie;
|
|
2486
2492
|
const r = (a) => Ro(a, 0, 1, e, n);
|
|
2487
2493
|
return (a) => a === 0 || a === 1 ? a : Pi(r(a), t, i);
|
|
2488
2494
|
}
|
|
2489
2495
|
const Vi = (e) => (t) => t <= 0.5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2, Ci = (e) => (t) => 1 - e(1 - t), Ei = /* @__PURE__ */ it(0.33, 1.53, 0.69, 0.99), Pn = /* @__PURE__ */ Ci(Ei), Di = /* @__PURE__ */ Vi(Pn), ki = (e) => e >= 1 ? 1 : (e *= 2) < 1 ? 0.5 * Pn(e) : 0.5 * (2 - Math.pow(2, -10 * (e - 1))), Vn = (e) => 1 - Math.sin(Math.acos(e)), Ri = Ci(Vn), Li = Vi(Vn), Lo = /* @__PURE__ */ it(0.42, 0, 1, 1), No = /* @__PURE__ */ it(0, 0, 0.58, 1), Ni = /* @__PURE__ */ it(0.42, 0, 0.58, 1), Fo = (e) => Array.isArray(e) && typeof e[0] != "number", Fi = (e) => Array.isArray(e) && typeof e[0] == "number", ts = {
|
|
2490
|
-
linear:
|
|
2496
|
+
linear: ie,
|
|
2491
2497
|
easeIn: Lo,
|
|
2492
2498
|
easeInOut: Ni,
|
|
2493
2499
|
easeOut: No,
|
|
@@ -2571,27 +2577,27 @@ function Oi(e, t) {
|
|
|
2571
2577
|
delta: 0,
|
|
2572
2578
|
timestamp: 0,
|
|
2573
2579
|
isProcessing: !1
|
|
2574
|
-
}, a = () => n = !0, o = ct.reduce((
|
|
2575
|
-
const
|
|
2576
|
-
n = !1,
|
|
2577
|
-
},
|
|
2580
|
+
}, a = () => n = !0, o = ct.reduce((b, M) => (b[M] = Io(a), b), {}), { setup: l, read: c, resolveKeyframes: h, preUpdate: u, update: d, preRender: f, render: m, postRender: x } = o, g = () => {
|
|
2581
|
+
const b = ve.useManualTiming, M = b ? r.timestamp : performance.now();
|
|
2582
|
+
n = !1, b || (r.delta = i ? 1e3 / 60 : Math.max(Math.min(M - r.timestamp, Bo), 1)), r.timestamp = M, r.isProcessing = !0, l.process(r), c.process(r), h.process(r), u.process(r), d.process(r), f.process(r), m.process(r), x.process(r), r.isProcessing = !1, n && t && (i = !1, e(g));
|
|
2583
|
+
}, y = () => {
|
|
2578
2584
|
n = !0, i = !0, r.isProcessing || e(g);
|
|
2579
2585
|
};
|
|
2580
|
-
return { schedule: ct.reduce((
|
|
2581
|
-
const S = o[
|
|
2582
|
-
return
|
|
2583
|
-
}, {}), cancel: (
|
|
2584
|
-
for (let
|
|
2585
|
-
o[ct[
|
|
2586
|
+
return { schedule: ct.reduce((b, M) => {
|
|
2587
|
+
const S = o[M];
|
|
2588
|
+
return b[M] = (E, k = !1, P = !1) => (n || y(), S.schedule(E, k, P)), b;
|
|
2589
|
+
}, {}), cancel: (b) => {
|
|
2590
|
+
for (let M = 0; M < ct.length; M++)
|
|
2591
|
+
o[ct[M]].cancel(b);
|
|
2586
2592
|
}, state: r, steps: o };
|
|
2587
2593
|
}
|
|
2588
|
-
const { schedule:
|
|
2594
|
+
const { schedule: D, cancel: we, state: U, steps: Ft } = /* @__PURE__ */ Oi(typeof requestAnimationFrame < "u" ? requestAnimationFrame : ie, !0);
|
|
2589
2595
|
let ft;
|
|
2590
2596
|
function zo() {
|
|
2591
2597
|
ft = void 0;
|
|
2592
2598
|
}
|
|
2593
2599
|
const Z = {
|
|
2594
|
-
now: () => (ft === void 0 && Z.set(
|
|
2600
|
+
now: () => (ft === void 0 && Z.set(U.isProcessing || ve.useManualTiming ? U.timestamp : performance.now()), ft),
|
|
2595
2601
|
set: (e) => {
|
|
2596
2602
|
ft = e, queueMicrotask(zo);
|
|
2597
2603
|
}
|
|
@@ -2656,13 +2662,13 @@ const Jt = {
|
|
|
2656
2662
|
test: /* @__PURE__ */ Dn("hsl", "hue"),
|
|
2657
2663
|
parse: /* @__PURE__ */ zi("hue", "saturation", "lightness"),
|
|
2658
2664
|
transform: ({ hue: e, saturation: t, lightness: n, alpha: i = 1 }) => "hsla(" + Math.round(e) + ", " + he.transform(Xe(t)) + ", " + he.transform(Xe(n)) + ", " + Xe(Qe.transform(i)) + ")"
|
|
2659
|
-
},
|
|
2665
|
+
}, z = {
|
|
2660
2666
|
test: (e) => Se.test(e) || Jt.test(e) || Re.test(e),
|
|
2661
2667
|
parse: (e) => Se.test(e) ? Se.parse(e) : Re.test(e) ? Re.parse(e) : Jt.parse(e),
|
|
2662
2668
|
transform: (e) => typeof e == "string" ? e : e.hasOwnProperty("red") ? Se.transform(e) : Re.transform(e),
|
|
2663
2669
|
getAnimatableNone: (e) => {
|
|
2664
|
-
const t =
|
|
2665
|
-
return t.alpha = 0,
|
|
2670
|
+
const t = z.parse(e);
|
|
2671
|
+
return t.alpha = 0, z.transform(t);
|
|
2666
2672
|
}
|
|
2667
2673
|
}, Xo = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
|
|
2668
2674
|
function qo(e) {
|
|
@@ -2677,7 +2683,7 @@ function Ie(e) {
|
|
|
2677
2683
|
var: []
|
|
2678
2684
|
}, r = [];
|
|
2679
2685
|
let a = 0;
|
|
2680
|
-
const l = t.replace(Qo, (c) => (
|
|
2686
|
+
const l = t.replace(Qo, (c) => (z.test(c) ? (i.color.push(a), r.push(_i), n.push(z.parse(c))) : c.startsWith(Jo) ? (i.var.push(a), r.push(Zo), n.push(c)) : (i.number.push(a), r.push(Hi), n.push(parseFloat(c))), ++a, rs)).split(rs);
|
|
2681
2687
|
return { values: n, split: l, indexes: i, types: r };
|
|
2682
2688
|
}
|
|
2683
2689
|
function ea(e) {
|
|
@@ -2690,7 +2696,7 @@ function Ui({ split: e, types: t }) {
|
|
|
2690
2696
|
for (let a = 0; a < n; a++)
|
|
2691
2697
|
if (r += e[a], i[a] !== void 0) {
|
|
2692
2698
|
const o = t[a];
|
|
2693
|
-
o === Hi ? r += Xe(i[a]) : o === _i ? r +=
|
|
2699
|
+
o === Hi ? r += Xe(i[a]) : o === _i ? r += z.transform(i[a]) : r += i[a];
|
|
2694
2700
|
}
|
|
2695
2701
|
return r;
|
|
2696
2702
|
};
|
|
@@ -2698,7 +2704,7 @@ function Ui({ split: e, types: t }) {
|
|
|
2698
2704
|
function ta(e) {
|
|
2699
2705
|
return Ui(Ie(e));
|
|
2700
2706
|
}
|
|
2701
|
-
const na = (e) => typeof e == "number" ? 0 :
|
|
2707
|
+
const na = (e) => typeof e == "number" ? 0 : z.test(e) ? z.getAnimatableNone(e) : e, sa = (e, t) => typeof e == "number" ? t != null && t.trim().endsWith("/") ? e : 0 : na(e);
|
|
2702
2708
|
function ia(e) {
|
|
2703
2709
|
const t = Ie(e);
|
|
2704
2710
|
return Ui(t)(t.values.map((i, r) => sa(i, t.split[r])));
|
|
@@ -2731,7 +2737,7 @@ function ra({ hue: e, saturation: t, lightness: n, alpha: i }) {
|
|
|
2731
2737
|
function wt(e, t) {
|
|
2732
2738
|
return (n) => n > 0 ? t : e;
|
|
2733
2739
|
}
|
|
2734
|
-
const
|
|
2740
|
+
const L = (e, t, n) => e + (t - e) * n, Bt = (e, t, n) => {
|
|
2735
2741
|
const i = e * e, r = n * (t * t - i) + i;
|
|
2736
2742
|
return r < 0 ? 0 : Math.sqrt(r);
|
|
2737
2743
|
}, oa = [Jt, Se, Re], aa = (e) => oa.find((t) => t.test(e));
|
|
@@ -2747,16 +2753,16 @@ const as = (e, t) => {
|
|
|
2747
2753
|
if (!n || !i)
|
|
2748
2754
|
return wt(e, t);
|
|
2749
2755
|
const r = { ...n };
|
|
2750
|
-
return (a) => (r.red = Bt(n.red, i.red, a), r.green = Bt(n.green, i.green, a), r.blue = Bt(n.blue, i.blue, a), r.alpha =
|
|
2756
|
+
return (a) => (r.red = Bt(n.red, i.red, a), r.green = Bt(n.green, i.green, a), r.blue = Bt(n.blue, i.blue, a), r.alpha = L(n.alpha, i.alpha, a), Se.transform(r));
|
|
2751
2757
|
}, Qt = /* @__PURE__ */ new Set(["none", "hidden"]);
|
|
2752
2758
|
function la(e, t) {
|
|
2753
2759
|
return Qt.has(e) ? (n) => n <= 0 ? e : t : (n) => n >= 1 ? t : e;
|
|
2754
2760
|
}
|
|
2755
2761
|
function ca(e, t) {
|
|
2756
|
-
return (n) =>
|
|
2762
|
+
return (n) => L(e, t, n);
|
|
2757
2763
|
}
|
|
2758
2764
|
function kn(e) {
|
|
2759
|
-
return typeof e == "number" ? ca : typeof e == "string" ? Cn(e) ? wt :
|
|
2765
|
+
return typeof e == "number" ? ca : typeof e == "string" ? Cn(e) ? wt : z.test(e) ? as : da : Array.isArray(e) ? Wi : typeof e == "object" ? z.test(e) ? as : ua : wt;
|
|
2760
2766
|
}
|
|
2761
2767
|
function Wi(e, t) {
|
|
2762
2768
|
const n = [...e], i = n.length, r = e.map((a, o) => kn(a)(a, t[o]));
|
|
@@ -2789,18 +2795,18 @@ const da = (e, t) => {
|
|
|
2789
2795
|
return i.indexes.var.length === r.indexes.var.length && i.indexes.color.length === r.indexes.color.length && i.indexes.number.length >= r.indexes.number.length ? Qt.has(e) && !r.values.length || Qt.has(t) && !i.values.length ? la(e, t) : st(Wi(ha(i, r), r.values), n) : (He(!0, `Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`, "complex-values-different"), wt(e, t));
|
|
2790
2796
|
};
|
|
2791
2797
|
function $i(e, t, n) {
|
|
2792
|
-
return typeof e == "number" && typeof t == "number" && typeof n == "number" ?
|
|
2798
|
+
return typeof e == "number" && typeof t == "number" && typeof n == "number" ? L(e, t, n) : kn(e)(e, t);
|
|
2793
2799
|
}
|
|
2794
2800
|
const fa = (e) => {
|
|
2795
2801
|
const t = ({ timestamp: n }) => e(n);
|
|
2796
2802
|
return {
|
|
2797
|
-
start: (n = !0) =>
|
|
2803
|
+
start: (n = !0) => D.update(t, n),
|
|
2798
2804
|
stop: () => we(t),
|
|
2799
2805
|
/**
|
|
2800
2806
|
* If we're processing this frame we can use the
|
|
2801
2807
|
* framelocked timestamp to keep things in sync.
|
|
2802
2808
|
*/
|
|
2803
|
-
now: () =>
|
|
2809
|
+
now: () => U.isProcessing ? U.timestamp : Z.now()
|
|
2804
2810
|
};
|
|
2805
2811
|
}, Ki = (e, t, n = 10) => {
|
|
2806
2812
|
let i = "";
|
|
@@ -2822,10 +2828,10 @@ function pa(e, t = 100, n) {
|
|
|
2822
2828
|
return {
|
|
2823
2829
|
type: "keyframes",
|
|
2824
2830
|
ease: (a) => i.next(r * a).value / t,
|
|
2825
|
-
duration: /* @__PURE__ */
|
|
2831
|
+
duration: /* @__PURE__ */ se(r)
|
|
2826
2832
|
};
|
|
2827
2833
|
}
|
|
2828
|
-
const
|
|
2834
|
+
const B = {
|
|
2829
2835
|
// Default spring physics
|
|
2830
2836
|
stiffness: 100,
|
|
2831
2837
|
damping: 10,
|
|
@@ -2865,11 +2871,11 @@ function xa(e, t, n) {
|
|
|
2865
2871
|
return i;
|
|
2866
2872
|
}
|
|
2867
2873
|
const ls = 1e-3;
|
|
2868
|
-
function ya({ duration: e =
|
|
2874
|
+
function ya({ duration: e = B.duration, bounce: t = B.bounce, velocity: n = B.velocity, mass: i = B.mass }) {
|
|
2869
2875
|
let r, a;
|
|
2870
|
-
He(e <= /* @__PURE__ */
|
|
2876
|
+
He(e <= /* @__PURE__ */ te(B.maxDuration), "Spring duration must be 10 seconds or less", "spring-duration-limit");
|
|
2871
2877
|
let o = 1 - t;
|
|
2872
|
-
o = de(
|
|
2878
|
+
o = de(B.minDamping, B.maxDamping, o), e = de(B.minDuration, B.maxDuration, /* @__PURE__ */ se(e)), o < 1 ? (r = (h) => {
|
|
2873
2879
|
const u = h * o, d = u * e, f = u - n, m = en(h, o), x = Math.exp(-d);
|
|
2874
2880
|
return ls - f / m * x;
|
|
2875
2881
|
}, a = (h) => {
|
|
@@ -2883,10 +2889,10 @@ function ya({ duration: e = I.duration, bounce: t = I.bounce, velocity: n = I.ve
|
|
|
2883
2889
|
return u * d;
|
|
2884
2890
|
});
|
|
2885
2891
|
const l = 5 / e, c = xa(r, a, l);
|
|
2886
|
-
if (e = /* @__PURE__ */
|
|
2892
|
+
if (e = /* @__PURE__ */ te(e), isNaN(c))
|
|
2887
2893
|
return {
|
|
2888
|
-
stiffness:
|
|
2889
|
-
damping:
|
|
2894
|
+
stiffness: B.stiffness,
|
|
2895
|
+
damping: B.damping,
|
|
2890
2896
|
duration: e
|
|
2891
2897
|
};
|
|
2892
2898
|
{
|
|
@@ -2904,10 +2910,10 @@ function cs(e, t) {
|
|
|
2904
2910
|
}
|
|
2905
2911
|
function va(e) {
|
|
2906
2912
|
let t = {
|
|
2907
|
-
velocity:
|
|
2908
|
-
stiffness:
|
|
2909
|
-
damping:
|
|
2910
|
-
mass:
|
|
2913
|
+
velocity: B.velocity,
|
|
2914
|
+
stiffness: B.stiffness,
|
|
2915
|
+
damping: B.damping,
|
|
2916
|
+
mass: B.mass,
|
|
2911
2917
|
isResolvedFromDuration: !1,
|
|
2912
2918
|
...e
|
|
2913
2919
|
};
|
|
@@ -2916,7 +2922,7 @@ function va(e) {
|
|
|
2916
2922
|
const n = e.visualDuration, i = 2 * Math.PI / (n * 1.2), r = i * i, a = 2 * de(0.05, 1, 1 - (e.bounce || 0)) * Math.sqrt(r);
|
|
2917
2923
|
t = {
|
|
2918
2924
|
...t,
|
|
2919
|
-
mass:
|
|
2925
|
+
mass: B.mass,
|
|
2920
2926
|
stiffness: r,
|
|
2921
2927
|
damping: a
|
|
2922
2928
|
};
|
|
@@ -2925,12 +2931,12 @@ function va(e) {
|
|
|
2925
2931
|
t = {
|
|
2926
2932
|
...t,
|
|
2927
2933
|
...n,
|
|
2928
|
-
mass:
|
|
2934
|
+
mass: B.mass
|
|
2929
2935
|
}, t.isResolvedFromDuration = !0;
|
|
2930
2936
|
}
|
|
2931
2937
|
return t;
|
|
2932
2938
|
}
|
|
2933
|
-
function Tt(e =
|
|
2939
|
+
function Tt(e = B.visualDuration, t = B.bounce) {
|
|
2934
2940
|
const n = typeof e != "object" ? {
|
|
2935
2941
|
visualDuration: e,
|
|
2936
2942
|
keyframes: [0, 1],
|
|
@@ -2939,60 +2945,60 @@ function Tt(e = I.visualDuration, t = I.bounce) {
|
|
|
2939
2945
|
let { restSpeed: i, restDelta: r } = n;
|
|
2940
2946
|
const a = n.keyframes[0], o = n.keyframes[n.keyframes.length - 1], l = { done: !1, value: a }, { stiffness: c, damping: h, mass: u, duration: d, velocity: f, isResolvedFromDuration: m } = va({
|
|
2941
2947
|
...n,
|
|
2942
|
-
velocity: -/* @__PURE__ */
|
|
2943
|
-
}), x = f || 0, g = h / (2 * Math.sqrt(c * u)),
|
|
2944
|
-
i || (i =
|
|
2945
|
-
let
|
|
2948
|
+
velocity: -/* @__PURE__ */ se(n.velocity || 0)
|
|
2949
|
+
}), x = f || 0, g = h / (2 * Math.sqrt(c * u)), y = o - a, w = /* @__PURE__ */ se(Math.sqrt(c / u)), v = Math.abs(y) < 5;
|
|
2950
|
+
i || (i = v ? B.restSpeed.granular : B.restSpeed.default), r || (r = v ? B.restDelta.granular : B.restDelta.default);
|
|
2951
|
+
let b, M, S, E, k, P;
|
|
2946
2952
|
if (g < 1)
|
|
2947
|
-
S = en(
|
|
2948
|
-
const
|
|
2949
|
-
return o -
|
|
2950
|
-
},
|
|
2953
|
+
S = en(w, g), E = (x + g * w * y) / S, b = (T) => {
|
|
2954
|
+
const C = Math.exp(-g * w * T);
|
|
2955
|
+
return o - C * (E * Math.sin(S * T) + y * Math.cos(S * T));
|
|
2956
|
+
}, k = g * w * E + y * S, P = g * w * y - E * S, M = (T) => Math.exp(-g * w * T) * (k * Math.sin(S * T) + P * Math.cos(S * T));
|
|
2951
2957
|
else if (g === 1) {
|
|
2952
|
-
|
|
2953
|
-
const
|
|
2954
|
-
|
|
2958
|
+
b = (C) => o - Math.exp(-w * C) * (y + (x + w * y) * C);
|
|
2959
|
+
const T = x + w * y;
|
|
2960
|
+
M = (C) => Math.exp(-w * C) * (w * T * C - x);
|
|
2955
2961
|
} else {
|
|
2956
|
-
const
|
|
2957
|
-
|
|
2958
|
-
const
|
|
2959
|
-
return o -
|
|
2962
|
+
const T = w * Math.sqrt(g * g - 1);
|
|
2963
|
+
b = ($) => {
|
|
2964
|
+
const Q = Math.exp(-g * w * $), q = Math.min(T * $, 300);
|
|
2965
|
+
return o - Q * ((x + g * w * y) * Math.sinh(q) + T * y * Math.cosh(q)) / T;
|
|
2960
2966
|
};
|
|
2961
|
-
const
|
|
2962
|
-
|
|
2963
|
-
const
|
|
2964
|
-
return
|
|
2967
|
+
const C = (x + g * w * y) / T, F = g * w * C - y * T, X = g * w * y - C * T;
|
|
2968
|
+
M = ($) => {
|
|
2969
|
+
const Q = Math.exp(-g * w * $), q = Math.min(T * $, 300);
|
|
2970
|
+
return Q * (F * Math.sinh(q) + X * Math.cosh(q));
|
|
2965
2971
|
};
|
|
2966
2972
|
}
|
|
2967
|
-
const
|
|
2973
|
+
const O = {
|
|
2968
2974
|
calculatedDuration: m && d || null,
|
|
2969
|
-
velocity: (
|
|
2970
|
-
next: (
|
|
2975
|
+
velocity: (T) => /* @__PURE__ */ te(M(T)),
|
|
2976
|
+
next: (T) => {
|
|
2971
2977
|
if (!m && g < 1) {
|
|
2972
|
-
const
|
|
2973
|
-
return l.done = Math.abs(
|
|
2978
|
+
const F = Math.exp(-g * w * T), X = Math.sin(S * T), $ = Math.cos(S * T), Q = o - F * (E * X + y * $), q = /* @__PURE__ */ te(F * (k * X + P * $));
|
|
2979
|
+
return l.done = Math.abs(q) <= i && Math.abs(o - Q) <= r, l.value = l.done ? o : Q, l;
|
|
2974
2980
|
}
|
|
2975
|
-
const
|
|
2981
|
+
const C = b(T);
|
|
2976
2982
|
if (m)
|
|
2977
|
-
l.done =
|
|
2983
|
+
l.done = T >= d;
|
|
2978
2984
|
else {
|
|
2979
|
-
const
|
|
2980
|
-
l.done = Math.abs(
|
|
2985
|
+
const F = /* @__PURE__ */ te(M(T));
|
|
2986
|
+
l.done = Math.abs(F) <= i && Math.abs(o - C) <= r;
|
|
2981
2987
|
}
|
|
2982
|
-
return l.value = l.done ? o :
|
|
2988
|
+
return l.value = l.done ? o : C, l;
|
|
2983
2989
|
},
|
|
2984
2990
|
toString: () => {
|
|
2985
|
-
const
|
|
2986
|
-
return
|
|
2991
|
+
const T = Math.min(Rn(O), bt), C = Ki((F) => O.next(T * F).value, T, 30);
|
|
2992
|
+
return T + "ms " + C;
|
|
2987
2993
|
},
|
|
2988
2994
|
toTransition: () => {
|
|
2989
2995
|
}
|
|
2990
2996
|
};
|
|
2991
|
-
return
|
|
2997
|
+
return O;
|
|
2992
2998
|
}
|
|
2993
2999
|
Tt.applyToOptions = (e) => {
|
|
2994
3000
|
const t = pa(e, 100, Tt);
|
|
2995
|
-
return e.ease = t.ease, e.duration = /* @__PURE__ */
|
|
3001
|
+
return e.ease = t.ease, e.duration = /* @__PURE__ */ te(t.duration), e.type = "keyframes", e;
|
|
2996
3002
|
};
|
|
2997
3003
|
const wa = 5;
|
|
2998
3004
|
function Gi(e, t, n) {
|
|
@@ -3003,19 +3009,19 @@ function tn({ keyframes: e, velocity: t = 0, power: n = 0.8, timeConstant: i = 3
|
|
|
3003
3009
|
const d = e[0], f = {
|
|
3004
3010
|
done: !1,
|
|
3005
3011
|
value: d
|
|
3006
|
-
}, m = (
|
|
3012
|
+
}, m = (P) => l !== void 0 && P < l || c !== void 0 && P > c, x = (P) => l === void 0 ? c : c === void 0 || Math.abs(l - P) < Math.abs(c - P) ? l : c;
|
|
3007
3013
|
let g = n * t;
|
|
3008
|
-
const
|
|
3009
|
-
|
|
3010
|
-
const
|
|
3011
|
-
const
|
|
3012
|
-
f.done = Math.abs(
|
|
3014
|
+
const y = d + g, w = o === void 0 ? y : o(y);
|
|
3015
|
+
w !== y && (g = w - d);
|
|
3016
|
+
const v = (P) => -g * Math.exp(-P / i), b = (P) => w + v(P), M = (P) => {
|
|
3017
|
+
const O = v(P), T = b(P);
|
|
3018
|
+
f.done = Math.abs(O) <= h, f.value = f.done ? w : T;
|
|
3013
3019
|
};
|
|
3014
3020
|
let S, E;
|
|
3015
|
-
const
|
|
3016
|
-
m(f.value) && (S =
|
|
3021
|
+
const k = (P) => {
|
|
3022
|
+
m(f.value) && (S = P, E = Tt({
|
|
3017
3023
|
keyframes: [f.value, x(f.value)],
|
|
3018
|
-
velocity: Gi(
|
|
3024
|
+
velocity: Gi(b, P, f.value),
|
|
3019
3025
|
// TODO: This should be passing * 1000
|
|
3020
3026
|
damping: r,
|
|
3021
3027
|
stiffness: a,
|
|
@@ -3023,11 +3029,11 @@ function tn({ keyframes: e, velocity: t = 0, power: n = 0.8, timeConstant: i = 3
|
|
|
3023
3029
|
restSpeed: u
|
|
3024
3030
|
}));
|
|
3025
3031
|
};
|
|
3026
|
-
return
|
|
3032
|
+
return k(0), {
|
|
3027
3033
|
calculatedDuration: null,
|
|
3028
|
-
next: (
|
|
3029
|
-
let
|
|
3030
|
-
return !E && S === void 0 && (
|
|
3034
|
+
next: (P) => {
|
|
3035
|
+
let O = !1;
|
|
3036
|
+
return !E && S === void 0 && (O = !0, M(P), k(P)), S !== void 0 && P >= S ? E.next(P - S) : (!O && M(P), f);
|
|
3031
3037
|
}
|
|
3032
3038
|
};
|
|
3033
3039
|
}
|
|
@@ -3036,7 +3042,7 @@ function ba(e, t, n) {
|
|
|
3036
3042
|
for (let o = 0; o < a; o++) {
|
|
3037
3043
|
let l = r(e[o], e[o + 1]);
|
|
3038
3044
|
if (t) {
|
|
3039
|
-
const c = Array.isArray(t) ? t[o] ||
|
|
3045
|
+
const c = Array.isArray(t) ? t[o] || ie : t;
|
|
3040
3046
|
l = st(c, l);
|
|
3041
3047
|
}
|
|
3042
3048
|
i.push(l);
|
|
@@ -3067,7 +3073,7 @@ function Ma(e, t) {
|
|
|
3067
3073
|
const n = e[e.length - 1];
|
|
3068
3074
|
for (let i = 1; i <= t; i++) {
|
|
3069
3075
|
const r = /* @__PURE__ */ Je(0, t, i);
|
|
3070
|
-
e.push(
|
|
3076
|
+
e.push(L(n, 1, r));
|
|
3071
3077
|
}
|
|
3072
3078
|
}
|
|
3073
3079
|
function Sa(e) {
|
|
@@ -3172,22 +3178,22 @@ class Mt extends Ln {
|
|
|
3172
3178
|
const { generator: i, totalDuration: r, mixKeyframes: a, mirroredGenerator: o, resolvedDuration: l, calculatedDuration: c } = this;
|
|
3173
3179
|
if (this.startTime === null)
|
|
3174
3180
|
return i.next(0);
|
|
3175
|
-
const { delay: h = 0, keyframes: u, repeat: d, repeatType: f, repeatDelay: m, type: x, onUpdate: g, finalKeyframe:
|
|
3181
|
+
const { delay: h = 0, keyframes: u, repeat: d, repeatType: f, repeatDelay: m, type: x, onUpdate: g, finalKeyframe: y } = this.options;
|
|
3176
3182
|
this.speed > 0 ? this.startTime = Math.min(this.startTime, t) : this.speed < 0 && (this.startTime = Math.min(t - r / this.speed, this.startTime)), n ? this.currentTime = t : this.updateTime(t);
|
|
3177
|
-
const
|
|
3178
|
-
this.currentTime = Math.max(
|
|
3179
|
-
let
|
|
3183
|
+
const w = this.currentTime - h * (this.playbackSpeed >= 0 ? 1 : -1), v = this.playbackSpeed >= 0 ? w < 0 : w > r;
|
|
3184
|
+
this.currentTime = Math.max(w, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = r);
|
|
3185
|
+
let b = this.currentTime, M = i;
|
|
3180
3186
|
if (d) {
|
|
3181
|
-
const
|
|
3182
|
-
let
|
|
3183
|
-
!
|
|
3187
|
+
const P = Math.min(this.currentTime, r) / l;
|
|
3188
|
+
let O = Math.floor(P), T = P % 1;
|
|
3189
|
+
!T && P >= 1 && (T = 1), T === 1 && O--, O = Math.min(O, d + 1), !!(O % 2) && (f === "reverse" ? (T = 1 - T, m && (T -= m / l)) : f === "mirror" && (M = o)), b = de(0, 1, T) * l;
|
|
3184
3190
|
}
|
|
3185
3191
|
let S;
|
|
3186
|
-
|
|
3192
|
+
v ? (this.delayState.value = u[0], S = this.delayState) : S = M.next(b), a && !v && (S.value = a(S.value));
|
|
3187
3193
|
let { done: E } = S;
|
|
3188
|
-
!
|
|
3189
|
-
const
|
|
3190
|
-
return
|
|
3194
|
+
!v && c !== null && (E = this.playbackSpeed >= 0 ? this.currentTime >= r : this.currentTime <= 0);
|
|
3195
|
+
const k = this.holdTime === null && (this.state === "finished" || this.state === "running" && E);
|
|
3196
|
+
return k && x !== tn && (S.value = Ct(u, this.options, y, this.speed)), g && g(S.value), k && this.finish(), S;
|
|
3191
3197
|
}
|
|
3192
3198
|
/**
|
|
3193
3199
|
* Allows the returned animation to be awaited or promise-chained. Currently
|
|
@@ -3198,17 +3204,17 @@ class Mt extends Ln {
|
|
|
3198
3204
|
return this.finished.then(t, n);
|
|
3199
3205
|
}
|
|
3200
3206
|
get duration() {
|
|
3201
|
-
return /* @__PURE__ */
|
|
3207
|
+
return /* @__PURE__ */ se(this.calculatedDuration);
|
|
3202
3208
|
}
|
|
3203
3209
|
get iterationDuration() {
|
|
3204
3210
|
const { delay: t = 0 } = this.options || {};
|
|
3205
|
-
return this.duration + /* @__PURE__ */
|
|
3211
|
+
return this.duration + /* @__PURE__ */ se(t);
|
|
3206
3212
|
}
|
|
3207
3213
|
get time() {
|
|
3208
|
-
return /* @__PURE__ */
|
|
3214
|
+
return /* @__PURE__ */ se(this.currentTime);
|
|
3209
3215
|
}
|
|
3210
3216
|
set time(t) {
|
|
3211
|
-
t = /* @__PURE__ */
|
|
3217
|
+
t = /* @__PURE__ */ te(t), this.currentTime = t, this.startTime === null || this.holdTime !== null || this.playbackSpeed === 0 ? this.holdTime = t : this.driver && (this.startTime = this.driver.now() - t / this.playbackSpeed), this.driver ? this.driver.start(!1) : (this.startTime = 0, this.state = "paused", this.holdTime = t, this.tick(t));
|
|
3212
3218
|
}
|
|
3213
3219
|
/**
|
|
3214
3220
|
* Returns the generator's velocity at the current time in units/second.
|
|
@@ -3229,7 +3235,7 @@ class Mt extends Ln {
|
|
|
3229
3235
|
}
|
|
3230
3236
|
set speed(t) {
|
|
3231
3237
|
const n = this.playbackSpeed !== t;
|
|
3232
|
-
n && this.driver && this.updateTime(Z.now()), this.playbackSpeed = t, n && this.driver && (this.time = /* @__PURE__ */
|
|
3238
|
+
n && this.driver && this.updateTime(Z.now()), this.playbackSpeed = t, n && this.driver && (this.time = /* @__PURE__ */ se(this.currentTime));
|
|
3233
3239
|
}
|
|
3234
3240
|
play() {
|
|
3235
3241
|
var r, a;
|
|
@@ -3412,7 +3418,7 @@ class Nn {
|
|
|
3412
3418
|
this.state = "pending", this.isAsync = !1, this.needsMeasurement = !1, this.unresolvedKeyframes = [...t], this.onComplete = n, this.name = i, this.motionValue = r, this.element = a, this.isAsync = o;
|
|
3413
3419
|
}
|
|
3414
3420
|
scheduleResolve() {
|
|
3415
|
-
this.state = "scheduled", this.isAsync ? (Pe.add(this), an || (an = !0,
|
|
3421
|
+
this.state = "scheduled", this.isAsync ? (Pe.add(this), an || (an = !0, D.read(qi), D.resolveKeyframes(Xi))) : (this.readKeyframes(), this.complete());
|
|
3416
3422
|
}
|
|
3417
3423
|
readKeyframes() {
|
|
3418
3424
|
const { unresolvedKeyframes: t, name: n, element: i, motionValue: r } = this;
|
|
@@ -3558,18 +3564,18 @@ class nr extends Ln {
|
|
|
3558
3564
|
get duration() {
|
|
3559
3565
|
var n, i;
|
|
3560
3566
|
const t = ((i = (n = this.animation.effect) == null ? void 0 : n.getComputedTiming) == null ? void 0 : i.call(n).duration) || 0;
|
|
3561
|
-
return /* @__PURE__ */
|
|
3567
|
+
return /* @__PURE__ */ se(Number(t));
|
|
3562
3568
|
}
|
|
3563
3569
|
get iterationDuration() {
|
|
3564
3570
|
const { delay: t = 0 } = this.options || {};
|
|
3565
|
-
return this.duration + /* @__PURE__ */
|
|
3571
|
+
return this.duration + /* @__PURE__ */ se(t);
|
|
3566
3572
|
}
|
|
3567
3573
|
get time() {
|
|
3568
|
-
return /* @__PURE__ */
|
|
3574
|
+
return /* @__PURE__ */ se(Number(this.animation.currentTime) || 0);
|
|
3569
3575
|
}
|
|
3570
3576
|
set time(t) {
|
|
3571
3577
|
const n = this.finishedTime !== null;
|
|
3572
|
-
this.manualStartTime = null, this.finishedTime = null, this.animation.currentTime = /* @__PURE__ */
|
|
3578
|
+
this.manualStartTime = null, this.finishedTime = null, this.animation.currentTime = /* @__PURE__ */ te(t), n && this.animation.pause();
|
|
3573
3579
|
}
|
|
3574
3580
|
/**
|
|
3575
3581
|
* The playback speed of the animation.
|
|
@@ -3595,7 +3601,7 @@ class nr extends Ln {
|
|
|
3595
3601
|
*/
|
|
3596
3602
|
attachTimeline({ timeline: t, rangeStart: n, rangeEnd: i, observe: r }) {
|
|
3597
3603
|
var a;
|
|
3598
|
-
return this.allowFlatten && ((a = this.animation.effect) == null || a.updateTiming({ easing: "linear" })), this.animation.onfinish = null, t && _a() ? (this.animation.timeline = t, n && (this.animation.rangeStart = n), i && (this.animation.rangeEnd = i),
|
|
3604
|
+
return this.allowFlatten && ((a = this.animation.effect) == null || a.updateTiming({ easing: "linear" })), this.animation.onfinish = null, t && _a() ? (this.animation.timeline = t, n && (this.animation.rangeStart = n), i && (this.animation.rangeEnd = i), ie) : r(this);
|
|
3599
3605
|
}
|
|
3600
3606
|
}
|
|
3601
3607
|
const sr = {
|
|
@@ -3708,8 +3714,8 @@ class nl extends Ln {
|
|
|
3708
3714
|
constructor({ autoplay: t = !0, delay: n = 0, type: i = "keyframes", repeat: r = 0, repeatDelay: a = 0, repeatType: o = "loop", keyframes: l, name: c, motionValue: h, element: u, ...d }) {
|
|
3709
3715
|
var x;
|
|
3710
3716
|
super(), this.stop = () => {
|
|
3711
|
-
var g,
|
|
3712
|
-
this._animation && (this._animation.stop(), (g = this.stopTimeline) == null || g.call(this)), (
|
|
3717
|
+
var g, y;
|
|
3718
|
+
this._animation && (this._animation.stop(), (g = this.stopTimeline) == null || g.call(this)), (y = this.keyframeResolver) == null || y.cancel();
|
|
3713
3719
|
}, this.createdAt = Z.now();
|
|
3714
3720
|
const f = {
|
|
3715
3721
|
autoplay: t,
|
|
@@ -3723,10 +3729,10 @@ class nl extends Ln {
|
|
|
3723
3729
|
element: u,
|
|
3724
3730
|
...d
|
|
3725
3731
|
}, m = (u == null ? void 0 : u.KeyframeResolver) || Nn;
|
|
3726
|
-
this.keyframeResolver = new m(l, (g,
|
|
3732
|
+
this.keyframeResolver = new m(l, (g, y, w) => this.onKeyframesResolved(g, y, f, !w), c, h, u), (x = this.keyframeResolver) == null || x.scheduleResolve();
|
|
3727
3733
|
}
|
|
3728
3734
|
onKeyframesResolved(t, n, i, r) {
|
|
3729
|
-
var
|
|
3735
|
+
var w, v;
|
|
3730
3736
|
this.keyframeResolver = void 0;
|
|
3731
3737
|
const { name: a, type: o, velocity: l, delay: c, isHandoff: h, onUpdate: u } = i;
|
|
3732
3738
|
this.resolvedAt = Z.now();
|
|
@@ -3737,22 +3743,22 @@ class nl extends Ln {
|
|
|
3737
3743
|
finalKeyframe: n,
|
|
3738
3744
|
...i,
|
|
3739
3745
|
keyframes: t
|
|
3740
|
-
}, x = d && !h && el(m), g = (
|
|
3741
|
-
let
|
|
3746
|
+
}, x = d && !h && el(m), g = (v = (w = m.motionValue) == null ? void 0 : w.owner) == null ? void 0 : v.current;
|
|
3747
|
+
let y;
|
|
3742
3748
|
if (x)
|
|
3743
3749
|
try {
|
|
3744
|
-
|
|
3750
|
+
y = new Ga({
|
|
3745
3751
|
...m,
|
|
3746
3752
|
element: g
|
|
3747
3753
|
});
|
|
3748
3754
|
} catch {
|
|
3749
|
-
|
|
3755
|
+
y = new Mt(m);
|
|
3750
3756
|
}
|
|
3751
3757
|
else
|
|
3752
|
-
|
|
3753
|
-
|
|
3758
|
+
y = new Mt(m);
|
|
3759
|
+
y.finished.then(() => {
|
|
3754
3760
|
this.notifyFinished();
|
|
3755
|
-
}).catch(
|
|
3761
|
+
}).catch(ie), this.pendingTimeline && (this.stopTimeline = y.attachTimeline(this.pendingTimeline), this.pendingTimeline = void 0), this._animation = y;
|
|
3756
3762
|
}
|
|
3757
3763
|
get finished() {
|
|
3758
3764
|
return this._animation ? this.animation.finished : this._finished;
|
|
@@ -3884,7 +3890,7 @@ function dl(e) {
|
|
|
3884
3890
|
const On = (e, t, n, i = {}, r, a) => (o) => {
|
|
3885
3891
|
const l = Fn(i, e) || {}, c = l.delay || i.delay || 0;
|
|
3886
3892
|
let { elapsed: h = 0 } = i;
|
|
3887
|
-
h = h - /* @__PURE__ */
|
|
3893
|
+
h = h - /* @__PURE__ */ te(c);
|
|
3888
3894
|
const u = {
|
|
3889
3895
|
keyframes: Array.isArray(n) ? n : [null, n],
|
|
3890
3896
|
ease: "easeOut",
|
|
@@ -3901,12 +3907,12 @@ const On = (e, t, n, i = {}, r, a) => (o) => {
|
|
|
3901
3907
|
motionValue: t,
|
|
3902
3908
|
element: a ? void 0 : r
|
|
3903
3909
|
};
|
|
3904
|
-
dl(l) || Object.assign(u, ul(e, u)), u.duration && (u.duration = /* @__PURE__ */
|
|
3910
|
+
dl(l) || Object.assign(u, ul(e, u)), u.duration && (u.duration = /* @__PURE__ */ te(u.duration)), u.repeatDelay && (u.repeatDelay = /* @__PURE__ */ te(u.repeatDelay)), u.from !== void 0 && (u.keyframes[0] = u.from);
|
|
3905
3911
|
let d = !1;
|
|
3906
3912
|
if ((u.type === !1 || u.duration === 0 && !u.repeatDelay) && (un(u), u.delay === 0 && (d = !0)), (ve.instantAnimations || ve.skipAnimations || r != null && r.shouldSkipAnimations) && (d = !0, un(u), u.delay = 0), u.allowFlatten = !l.type && !l.ease, d && !a && t.get() !== void 0) {
|
|
3907
3913
|
const f = Ct(u.keyframes, l);
|
|
3908
3914
|
if (f !== void 0) {
|
|
3909
|
-
|
|
3915
|
+
D.update(() => {
|
|
3910
3916
|
u.onUpdate(f), u.onComplete();
|
|
3911
3917
|
});
|
|
3912
3918
|
return;
|
|
@@ -4013,7 +4019,7 @@ class pl {
|
|
|
4013
4019
|
this.events[t] || (this.events[t] = new Sn());
|
|
4014
4020
|
const i = this.events[t].add(n);
|
|
4015
4021
|
return t === "change" ? () => {
|
|
4016
|
-
i(),
|
|
4022
|
+
i(), D.read(() => {
|
|
4017
4023
|
this.events.change.getSize() || this.stop();
|
|
4018
4024
|
});
|
|
4019
4025
|
} : i;
|
|
@@ -4165,9 +4171,9 @@ function yl(e, t) {
|
|
|
4165
4171
|
ml(e, o, l);
|
|
4166
4172
|
}
|
|
4167
4173
|
}
|
|
4168
|
-
const
|
|
4174
|
+
const W = (e) => !!(e && e.getVelocity);
|
|
4169
4175
|
function gl(e) {
|
|
4170
|
-
return !!(
|
|
4176
|
+
return !!(W(e) && e.add);
|
|
4171
4177
|
}
|
|
4172
4178
|
function dn(e, t) {
|
|
4173
4179
|
const n = e.getValue("willChange");
|
|
@@ -4203,27 +4209,27 @@ function hr(e, t, { delay: n = 0, transitionOverride: i, type: r } = {}) {
|
|
|
4203
4209
|
const g = {
|
|
4204
4210
|
delay: n,
|
|
4205
4211
|
...Fn(a || {}, f)
|
|
4206
|
-
},
|
|
4207
|
-
if (
|
|
4208
|
-
|
|
4212
|
+
}, y = m.get();
|
|
4213
|
+
if (y !== void 0 && !m.isAnimating() && !Array.isArray(x) && x === y && !g.velocity) {
|
|
4214
|
+
D.update(() => m.set(x));
|
|
4209
4215
|
continue;
|
|
4210
4216
|
}
|
|
4211
|
-
let
|
|
4217
|
+
let w = !1;
|
|
4212
4218
|
if (window.MotionHandoffAnimation) {
|
|
4213
|
-
const
|
|
4214
|
-
if (
|
|
4215
|
-
const S = window.MotionHandoffAnimation(
|
|
4216
|
-
S !== null && (g.startTime = S,
|
|
4219
|
+
const M = ur(e);
|
|
4220
|
+
if (M) {
|
|
4221
|
+
const S = window.MotionHandoffAnimation(M, f, D);
|
|
4222
|
+
S !== null && (g.startTime = S, w = !0);
|
|
4217
4223
|
}
|
|
4218
4224
|
}
|
|
4219
4225
|
dn(e, f);
|
|
4220
|
-
const
|
|
4221
|
-
m.start(On(f, m, x,
|
|
4222
|
-
const
|
|
4223
|
-
|
|
4226
|
+
const v = h ?? e.shouldReduceMotion;
|
|
4227
|
+
m.start(On(f, m, x, v && lr.has(f) ? { type: !1 } : g, e, w));
|
|
4228
|
+
const b = m.animation;
|
|
4229
|
+
b && u.push(b);
|
|
4224
4230
|
}
|
|
4225
4231
|
if (o) {
|
|
4226
|
-
const f = () =>
|
|
4232
|
+
const f = () => D.update(() => {
|
|
4227
4233
|
o && yl(e, o);
|
|
4228
4234
|
});
|
|
4229
4235
|
u.length ? Promise.all(u).then(f) : f();
|
|
@@ -4394,17 +4400,17 @@ const Pl = /\b([a-z-]*)\(.*?\)/gu, pn = {
|
|
|
4394
4400
|
}, Cl = {
|
|
4395
4401
|
...zn,
|
|
4396
4402
|
// Color props
|
|
4397
|
-
color:
|
|
4398
|
-
backgroundColor:
|
|
4399
|
-
outlineColor:
|
|
4400
|
-
fill:
|
|
4401
|
-
stroke:
|
|
4403
|
+
color: z,
|
|
4404
|
+
backgroundColor: z,
|
|
4405
|
+
outlineColor: z,
|
|
4406
|
+
fill: z,
|
|
4407
|
+
stroke: z,
|
|
4402
4408
|
// Border props
|
|
4403
|
-
borderColor:
|
|
4404
|
-
borderTopColor:
|
|
4405
|
-
borderRightColor:
|
|
4406
|
-
borderBottomColor:
|
|
4407
|
-
borderLeftColor:
|
|
4409
|
+
borderColor: z,
|
|
4410
|
+
borderTopColor: z,
|
|
4411
|
+
borderRightColor: z,
|
|
4412
|
+
borderBottomColor: z,
|
|
4413
|
+
borderLeftColor: z,
|
|
4408
4414
|
filter: pn,
|
|
4409
4415
|
WebkitFilter: pn,
|
|
4410
4416
|
mask: mn,
|
|
@@ -4530,26 +4536,26 @@ function Ol(e, t, n = {}) {
|
|
|
4530
4536
|
let l = !1, c = !1, h;
|
|
4531
4537
|
const u = () => {
|
|
4532
4538
|
o.removeEventListener("pointerleave", x);
|
|
4533
|
-
}, d = (
|
|
4534
|
-
h && (h(
|
|
4535
|
-
}, f = (
|
|
4536
|
-
l = !1, window.removeEventListener("pointerup", f), window.removeEventListener("pointercancel", f), c && (c = !1, d(
|
|
4539
|
+
}, d = (y) => {
|
|
4540
|
+
h && (h(y), h = void 0), u();
|
|
4541
|
+
}, f = (y) => {
|
|
4542
|
+
l = !1, window.removeEventListener("pointerup", f), window.removeEventListener("pointercancel", f), c && (c = !1, d(y));
|
|
4537
4543
|
}, m = () => {
|
|
4538
4544
|
l = !0, window.addEventListener("pointerup", f, r), window.addEventListener("pointercancel", f, r);
|
|
4539
|
-
}, x = (
|
|
4540
|
-
if (
|
|
4545
|
+
}, x = (y) => {
|
|
4546
|
+
if (y.pointerType !== "touch") {
|
|
4541
4547
|
if (l) {
|
|
4542
4548
|
c = !0;
|
|
4543
4549
|
return;
|
|
4544
4550
|
}
|
|
4545
|
-
d(
|
|
4551
|
+
d(y);
|
|
4546
4552
|
}
|
|
4547
|
-
}, g = (
|
|
4548
|
-
if (!Fl(
|
|
4553
|
+
}, g = (y) => {
|
|
4554
|
+
if (!Fl(y))
|
|
4549
4555
|
return;
|
|
4550
4556
|
c = !1;
|
|
4551
|
-
const
|
|
4552
|
-
typeof
|
|
4557
|
+
const w = t(o, y);
|
|
4558
|
+
typeof w == "function" && (h = w, o.addEventListener("pointerleave", x, r));
|
|
4553
4559
|
};
|
|
4554
4560
|
o.addEventListener("pointerenter", g, r), o.addEventListener("pointerdown", m, r);
|
|
4555
4561
|
}), a;
|
|
@@ -4679,7 +4685,7 @@ function Ts(e, t) {
|
|
|
4679
4685
|
function Jl(e) {
|
|
4680
4686
|
return Un(e) && e.tagName === "svg";
|
|
4681
4687
|
}
|
|
4682
|
-
const Ql = [...fr,
|
|
4688
|
+
const Ql = [...fr, z, ae], ec = (e) => Ql.find(dr(e)), Ms = () => ({
|
|
4683
4689
|
translate: 0,
|
|
4684
4690
|
scale: 1,
|
|
4685
4691
|
origin: 0,
|
|
@@ -4715,9 +4721,9 @@ function br(e) {
|
|
|
4715
4721
|
function nc(e, t, n) {
|
|
4716
4722
|
for (const i in t) {
|
|
4717
4723
|
const r = t[i], a = n[i];
|
|
4718
|
-
if (
|
|
4724
|
+
if (W(r))
|
|
4719
4725
|
e.addValue(i, r);
|
|
4720
|
-
else if (
|
|
4726
|
+
else if (W(a))
|
|
4721
4727
|
e.addValue(i, Be(r, { owner: e }));
|
|
4722
4728
|
else if (a !== r)
|
|
4723
4729
|
if (e.hasValue(i)) {
|
|
@@ -4773,14 +4779,14 @@ class oc {
|
|
|
4773
4779
|
this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
|
|
4774
4780
|
}, this.renderScheduledAt = 0, this.scheduleRender = () => {
|
|
4775
4781
|
const m = Z.now();
|
|
4776
|
-
this.renderScheduledAt < m && (this.renderScheduledAt = m,
|
|
4782
|
+
this.renderScheduledAt < m && (this.renderScheduledAt = m, D.render(this.render, !1, !0));
|
|
4777
4783
|
};
|
|
4778
4784
|
const { latestValues: h, renderState: u } = l;
|
|
4779
4785
|
this.latestValues = h, this.baseTarget = { ...h }, this.initialValues = n.initial ? { ...h } : {}, this.renderState = u, this.parent = t, this.props = n, this.presenceContext = i, this.depth = t ? t.depth + 1 : 0, this.reducedMotionConfig = r, this.skipAnimationsConfig = a, this.options = c, this.blockInitialAnimation = !!o, this.isControllingVariants = Dt(n), this.isVariantNode = br(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(t && t.current);
|
|
4780
4786
|
const { willChange: d, ...f } = this.scrapeMotionValuesFromProps(n, {}, this);
|
|
4781
4787
|
for (const m in f) {
|
|
4782
4788
|
const x = f[m];
|
|
4783
|
-
h[m] !== void 0 &&
|
|
4789
|
+
h[m] !== void 0 && W(x) && x.set(h[m]);
|
|
4784
4790
|
}
|
|
4785
4791
|
}
|
|
4786
4792
|
mount(t) {
|
|
@@ -4815,7 +4821,7 @@ class oc {
|
|
|
4815
4821
|
keyframes: l,
|
|
4816
4822
|
times: c,
|
|
4817
4823
|
ease: h,
|
|
4818
|
-
duration: /* @__PURE__ */
|
|
4824
|
+
duration: /* @__PURE__ */ te(u)
|
|
4819
4825
|
}), f = o(d);
|
|
4820
4826
|
this.valueSubscriptions.set(t, () => {
|
|
4821
4827
|
f(), d.cancel();
|
|
@@ -4825,7 +4831,7 @@ class oc {
|
|
|
4825
4831
|
const i = We.has(t);
|
|
4826
4832
|
i && this.onBindTransform && this.onBindTransform();
|
|
4827
4833
|
const r = n.on("change", (o) => {
|
|
4828
|
-
this.latestValues[t] = o, this.props.onUpdate &&
|
|
4834
|
+
this.latestValues[t] = o, this.props.onUpdate && D.preRender(this.notifyUpdate), i && this.projection && (this.projection.isTransformDirty = !0), this.scheduleRender();
|
|
4829
4835
|
});
|
|
4830
4836
|
let a;
|
|
4831
4837
|
typeof window < "u" && window.MotionCheckAppearSync && (a = window.MotionCheckAppearSync(this, t, n)), this.valueSubscriptions.set(t, () => {
|
|
@@ -4942,7 +4948,7 @@ class oc {
|
|
|
4942
4948
|
*/
|
|
4943
4949
|
readValue(t, n) {
|
|
4944
4950
|
let i = this.latestValues[t] !== void 0 || !this.current ? this.latestValues[t] : this.getBaseTargetFromProps(this.props, t) ?? this.readValueFromInstance(this.current, t, this.options);
|
|
4945
|
-
return i != null && (typeof i == "string" && (bi(i) || Mi(i)) ? i = parseFloat(i) : !ec(i) && ae.test(n) && (i = mr(t, n)), this.setBaseTarget(t,
|
|
4951
|
+
return i != null && (typeof i == "string" && (bi(i) || Mi(i)) ? i = parseFloat(i) : !ec(i) && ae.test(n) && (i = mr(t, n)), this.setBaseTarget(t, W(i) ? i.get() : i)), W(i) ? i.get() : i;
|
|
4946
4952
|
}
|
|
4947
4953
|
/**
|
|
4948
4954
|
* Set the base target to later animate back to. This is currently
|
|
@@ -4966,7 +4972,7 @@ class oc {
|
|
|
4966
4972
|
if (n && i !== void 0)
|
|
4967
4973
|
return i;
|
|
4968
4974
|
const r = this.getBaseTargetFromProps(this.props, t);
|
|
4969
|
-
return r !== void 0 && !
|
|
4975
|
+
return r !== void 0 && !W(r) ? r : this.initialValues[t] !== void 0 && i === void 0 ? void 0 : this.baseTarget[t];
|
|
4970
4976
|
}
|
|
4971
4977
|
on(t, n) {
|
|
4972
4978
|
return this.events[t] || (this.events[t] = new Sn()), this.events[t].add(n);
|
|
@@ -4995,7 +5001,7 @@ class Sr extends oc {
|
|
|
4995
5001
|
handleChildMotionValue() {
|
|
4996
5002
|
this.childSubscription && (this.childSubscription(), delete this.childSubscription);
|
|
4997
5003
|
const { children: t } = this.props;
|
|
4998
|
-
|
|
5004
|
+
W(t) && (this.childSubscription = t.on("change", (n) => {
|
|
4999
5005
|
this.current && (this.current.textContent = `${n}`);
|
|
5000
5006
|
}));
|
|
5001
5007
|
}
|
|
@@ -5074,7 +5080,7 @@ function ue(e, t) {
|
|
|
5074
5080
|
e.min += t, e.max += t;
|
|
5075
5081
|
}
|
|
5076
5082
|
function Ds(e, t, n, i, r = 0.5) {
|
|
5077
|
-
const a =
|
|
5083
|
+
const a = L(e.min, e.max, r);
|
|
5078
5084
|
gn(e, t, n, a, i);
|
|
5079
5085
|
}
|
|
5080
5086
|
function ks(e, t) {
|
|
@@ -5174,7 +5180,7 @@ const Ge = {
|
|
|
5174
5180
|
return i;
|
|
5175
5181
|
const a = ae.createTransformer(e), o = typeof r[0] != "number" ? 1 : 0, l = n.x.scale * t.x, c = n.y.scale * t.y;
|
|
5176
5182
|
r[0 + o] /= l, r[1 + o] /= c;
|
|
5177
|
-
const h =
|
|
5183
|
+
const h = L(l, c, 0.5);
|
|
5178
5184
|
return typeof r[2 + o] == "number" && (r[2 + o] /= h), typeof r[3 + o] == "number" && (r[3 + o] /= h), a(r);
|
|
5179
5185
|
}
|
|
5180
5186
|
}, jn = {
|
|
@@ -5202,7 +5208,7 @@ function Gn(e, t, n) {
|
|
|
5202
5208
|
if (!i)
|
|
5203
5209
|
return a;
|
|
5204
5210
|
for (const l in i)
|
|
5205
|
-
(
|
|
5211
|
+
(W(i[l]) || r && W(r[l]) || Dr(l, e) || ((o = n == null ? void 0 : n.getValue(l)) == null ? void 0 : o.liveStyle) !== void 0) && (a[l] = i[l]);
|
|
5206
5212
|
return a;
|
|
5207
5213
|
}
|
|
5208
5214
|
function mc(e) {
|
|
@@ -5303,7 +5309,7 @@ function wc(e, t, n, i) {
|
|
|
5303
5309
|
function Nr(e, t, n) {
|
|
5304
5310
|
const i = Gn(e, t, n);
|
|
5305
5311
|
for (const r in e)
|
|
5306
|
-
if (
|
|
5312
|
+
if (W(e[r]) || W(t[r])) {
|
|
5307
5313
|
const a = Ue.indexOf(r) !== -1 ? "attr" + r.charAt(0).toUpperCase() + r.substring(1) : r;
|
|
5308
5314
|
i[a] = e[r];
|
|
5309
5315
|
}
|
|
@@ -5372,8 +5378,8 @@ function Pc(e) {
|
|
|
5372
5378
|
var m;
|
|
5373
5379
|
const f = Ve(e, d, h === "exit" ? (m = e.presenceContext) == null ? void 0 : m.custom : void 0);
|
|
5374
5380
|
if (f) {
|
|
5375
|
-
const { transition: x, transitionEnd: g, ...
|
|
5376
|
-
u = { ...u, ...
|
|
5381
|
+
const { transition: x, transitionEnd: g, ...y } = f;
|
|
5382
|
+
u = { ...u, ...y, ...g };
|
|
5377
5383
|
}
|
|
5378
5384
|
return u;
|
|
5379
5385
|
};
|
|
@@ -5383,74 +5389,74 @@ function Pc(e) {
|
|
|
5383
5389
|
function l(h) {
|
|
5384
5390
|
const { props: u } = e, d = Fr(e.parent) || {}, f = [], m = /* @__PURE__ */ new Set();
|
|
5385
5391
|
let x = {}, g = 1 / 0;
|
|
5386
|
-
for (let
|
|
5387
|
-
const
|
|
5388
|
-
E === !1 && (g =
|
|
5389
|
-
let
|
|
5390
|
-
if (
|
|
5391
|
-
!
|
|
5392
|
-
!
|
|
5393
|
-
Et(
|
|
5392
|
+
for (let w = 0; w < Sc; w++) {
|
|
5393
|
+
const v = Mc[w], b = n[v], M = u[v] !== void 0 ? u[v] : d[v], S = et(M), E = v === h ? b.isActive : null;
|
|
5394
|
+
E === !1 && (g = w);
|
|
5395
|
+
let k = M === d[v] && M !== u[v] && S;
|
|
5396
|
+
if (k && (i || r) && e.manuallyAnimateOnMount && (k = !1), b.protectedKeys = { ...x }, // If it isn't active and hasn't *just* been set as inactive
|
|
5397
|
+
!b.isActive && E === null || // If we didn't and don't have any defined prop for this animation type
|
|
5398
|
+
!M && !b.prevProp || // Or if the prop doesn't define an animation
|
|
5399
|
+
Et(M) || typeof M == "boolean")
|
|
5394
5400
|
continue;
|
|
5395
|
-
if (
|
|
5396
|
-
|
|
5401
|
+
if (v === "exit" && b.isActive && E !== !0) {
|
|
5402
|
+
b.prevResolvedValues && (x = {
|
|
5397
5403
|
...x,
|
|
5398
|
-
...
|
|
5404
|
+
...b.prevResolvedValues
|
|
5399
5405
|
});
|
|
5400
5406
|
continue;
|
|
5401
5407
|
}
|
|
5402
|
-
const
|
|
5403
|
-
let
|
|
5404
|
-
|
|
5405
|
-
|
|
5406
|
-
const
|
|
5407
|
-
let
|
|
5408
|
-
E === !1 && (
|
|
5409
|
-
const { prevResolvedValues:
|
|
5410
|
-
...
|
|
5411
|
-
...
|
|
5412
|
-
},
|
|
5413
|
-
|
|
5414
|
-
const
|
|
5415
|
-
|
|
5408
|
+
const P = Vc(b.prevProp, M);
|
|
5409
|
+
let O = P || // If we're making this variant active, we want to always make it active
|
|
5410
|
+
v === h && b.isActive && !k && S || // If we removed a higher-priority variant (i is in reverse order)
|
|
5411
|
+
w > g && S, T = !1;
|
|
5412
|
+
const C = Array.isArray(M) ? M : [M];
|
|
5413
|
+
let F = C.reduce(a(v), {});
|
|
5414
|
+
E === !1 && (F = {});
|
|
5415
|
+
const { prevResolvedValues: X = {} } = b, $ = {
|
|
5416
|
+
...X,
|
|
5417
|
+
...F
|
|
5418
|
+
}, Q = (I) => {
|
|
5419
|
+
O = !0, m.has(I) && (T = !0, m.delete(I)), b.needsAnimating[I] = !0;
|
|
5420
|
+
const _ = e.getValue(I);
|
|
5421
|
+
_ && (_.liveStyle = !1);
|
|
5416
5422
|
};
|
|
5417
|
-
for (const
|
|
5418
|
-
const
|
|
5419
|
-
if (x.hasOwnProperty(
|
|
5423
|
+
for (const I in $) {
|
|
5424
|
+
const _ = F[I], j = X[I];
|
|
5425
|
+
if (x.hasOwnProperty(I))
|
|
5420
5426
|
continue;
|
|
5421
5427
|
let V = !1;
|
|
5422
|
-
hn(
|
|
5428
|
+
hn(_) && hn(j) ? V = !Or(_, j) : V = _ !== j, V ? _ != null ? Q(I) : m.add(I) : _ !== void 0 && m.has(I) ? Q(I) : b.protectedKeys[I] = !0;
|
|
5423
5429
|
}
|
|
5424
|
-
|
|
5425
|
-
const
|
|
5426
|
-
|
|
5427
|
-
const
|
|
5428
|
-
if (typeof
|
|
5429
|
-
const { parent:
|
|
5430
|
-
if (
|
|
5431
|
-
const { delayChildren:
|
|
5432
|
-
|
|
5430
|
+
b.prevProp = M, b.prevResolvedValues = F, b.isActive && (x = { ...x, ...F }), (i || r) && e.blockInitialAnimation && (O = !1);
|
|
5431
|
+
const q = k && P;
|
|
5432
|
+
O && (!q || T) && f.push(...C.map((I) => {
|
|
5433
|
+
const _ = { type: v };
|
|
5434
|
+
if (typeof I == "string" && (i || r) && !q && e.manuallyAnimateOnMount && e.parent) {
|
|
5435
|
+
const { parent: j } = e, V = Ve(j, I);
|
|
5436
|
+
if (j.enteringChildren && V) {
|
|
5437
|
+
const { delayChildren: R } = V.transition || {};
|
|
5438
|
+
_.delay = rr(j.enteringChildren, e, R);
|
|
5433
5439
|
}
|
|
5434
5440
|
}
|
|
5435
5441
|
return {
|
|
5436
|
-
animation:
|
|
5437
|
-
options:
|
|
5442
|
+
animation: I,
|
|
5443
|
+
options: _
|
|
5438
5444
|
};
|
|
5439
5445
|
}));
|
|
5440
5446
|
}
|
|
5441
5447
|
if (m.size) {
|
|
5442
|
-
const
|
|
5448
|
+
const w = {};
|
|
5443
5449
|
if (typeof u.initial != "boolean") {
|
|
5444
|
-
const
|
|
5445
|
-
|
|
5450
|
+
const v = Ve(e, Array.isArray(u.initial) ? u.initial[0] : u.initial);
|
|
5451
|
+
v && v.transition && (w.transition = v.transition);
|
|
5446
5452
|
}
|
|
5447
|
-
m.forEach((
|
|
5448
|
-
const
|
|
5449
|
-
|
|
5450
|
-
}), f.push({ animation:
|
|
5453
|
+
m.forEach((v) => {
|
|
5454
|
+
const b = e.getBaseTarget(v), M = e.getValue(v);
|
|
5455
|
+
M && (M.liveStyle = !0), w[v] = b ?? null;
|
|
5456
|
+
}), f.push({ animation: w });
|
|
5451
5457
|
}
|
|
5452
|
-
let
|
|
5453
|
-
return i && (u.initial === !1 || u.initial === u.animate) && !e.manuallyAnimateOnMount && (
|
|
5458
|
+
let y = !!f.length;
|
|
5459
|
+
return i && (u.initial === !1 || u.initial === u.animate) && !e.manuallyAnimateOnMount && (y = !1), i = !1, r = !1, y ? t(f) : Promise.resolve();
|
|
5454
5460
|
}
|
|
5455
5461
|
function c(h, u) {
|
|
5456
5462
|
var f;
|
|
@@ -5514,20 +5520,20 @@ function Rc(e, t, n) {
|
|
|
5514
5520
|
return Math.abs(e - t) <= n;
|
|
5515
5521
|
}
|
|
5516
5522
|
function Fs(e, t, n, i = 0.5) {
|
|
5517
|
-
e.origin = i, e.originPoint =
|
|
5523
|
+
e.origin = i, e.originPoint = L(t.min, t.max, e.origin), e.scale = J(n) / J(t), e.translate = L(n.min, n.max, e.origin) - e.originPoint, (e.scale >= Cc && e.scale <= Ec || isNaN(e.scale)) && (e.scale = 1), (e.translate >= Dc && e.translate <= kc || isNaN(e.translate)) && (e.translate = 0);
|
|
5518
5524
|
}
|
|
5519
5525
|
function qe(e, t, n, i) {
|
|
5520
5526
|
Fs(e.x, t.x, n.x, i ? i.originX : void 0), Fs(e.y, t.y, n.y, i ? i.originY : void 0);
|
|
5521
5527
|
}
|
|
5522
5528
|
function Os(e, t, n, i = 0) {
|
|
5523
|
-
const r = i ?
|
|
5529
|
+
const r = i ? L(n.min, n.max, i) : n.min;
|
|
5524
5530
|
e.min = r + t.min, e.max = e.min + J(t);
|
|
5525
5531
|
}
|
|
5526
5532
|
function Lc(e, t, n, i) {
|
|
5527
5533
|
Os(e.x, t.x, n.x, i == null ? void 0 : i.x), Os(e.y, t.y, n.y, i == null ? void 0 : i.y);
|
|
5528
5534
|
}
|
|
5529
5535
|
function Is(e, t, n, i = 0) {
|
|
5530
|
-
const r = i ?
|
|
5536
|
+
const r = i ? L(n.min, n.max, i) : n.min;
|
|
5531
5537
|
e.min = t.min - r, e.max = e.min + J(t);
|
|
5532
5538
|
}
|
|
5533
5539
|
function Pt(e, t, n, i) {
|
|
@@ -5537,9 +5543,9 @@ function Bs(e, t, n, i, r) {
|
|
|
5537
5543
|
return e -= t, e = At(e, 1 / n, i), r !== void 0 && (e = At(e, 1 / r, i)), e;
|
|
5538
5544
|
}
|
|
5539
5545
|
function Nc(e, t = 0, n = 1, i = 0.5, r, a = e, o = e) {
|
|
5540
|
-
if (he.test(t) && (t = parseFloat(t), t =
|
|
5546
|
+
if (he.test(t) && (t = parseFloat(t), t = L(o.min, o.max, t / 100) - o.min), typeof t != "number")
|
|
5541
5547
|
return;
|
|
5542
|
-
let l =
|
|
5548
|
+
let l = L(a.min, a.max, i);
|
|
5543
5549
|
e === a && (l -= t), e.min = Bs(e.min, t, n, l, r), e.max = Bs(e.max, t, n, l, r);
|
|
5544
5550
|
}
|
|
5545
5551
|
function zs(e, t, [n, i, r], a, o) {
|
|
@@ -5593,25 +5599,25 @@ const _r = [
|
|
|
5593
5599
|
"borderBottomRightRadius"
|
|
5594
5600
|
], zc = _r.length, Gs = (e) => typeof e == "string" ? parseFloat(e) : e, Ys = (e) => typeof e == "number" || A.test(e);
|
|
5595
5601
|
function Hc(e, t, n, i, r, a) {
|
|
5596
|
-
r ? (e.opacity =
|
|
5602
|
+
r ? (e.opacity = L(0, n.opacity ?? 1, _c(i)), e.opacityExit = L(t.opacity ?? 1, 0, Uc(i))) : a && (e.opacity = L(t.opacity ?? 1, n.opacity ?? 1, i));
|
|
5597
5603
|
for (let o = 0; o < zc; o++) {
|
|
5598
5604
|
const l = _r[o];
|
|
5599
5605
|
let c = Xs(t, l), h = Xs(n, l);
|
|
5600
5606
|
if (c === void 0 && h === void 0)
|
|
5601
5607
|
continue;
|
|
5602
|
-
c || (c = 0), h || (h = 0), c === 0 || h === 0 || Ys(c) === Ys(h) ? (e[l] = Math.max(
|
|
5608
|
+
c || (c = 0), h || (h = 0), c === 0 || h === 0 || Ys(c) === Ys(h) ? (e[l] = Math.max(L(Gs(c), Gs(h), i), 0), (he.test(h) || he.test(c)) && (e[l] += "%")) : e[l] = h;
|
|
5603
5609
|
}
|
|
5604
|
-
(t.rotate || n.rotate) && (e.rotate =
|
|
5610
|
+
(t.rotate || n.rotate) && (e.rotate = L(t.rotate || 0, n.rotate || 0, i));
|
|
5605
5611
|
}
|
|
5606
5612
|
function Xs(e, t) {
|
|
5607
5613
|
return e[t] !== void 0 ? e[t] : e.borderRadius;
|
|
5608
5614
|
}
|
|
5609
|
-
const _c = /* @__PURE__ */ Ur(0, 0.5, Ri), Uc = /* @__PURE__ */ Ur(0.5, 0.95,
|
|
5615
|
+
const _c = /* @__PURE__ */ Ur(0, 0.5, Ri), Uc = /* @__PURE__ */ Ur(0.5, 0.95, ie);
|
|
5610
5616
|
function Ur(e, t, n) {
|
|
5611
5617
|
return (i) => i < e ? 0 : i > t ? 1 : n(/* @__PURE__ */ Je(e, t, i));
|
|
5612
5618
|
}
|
|
5613
5619
|
function Wc(e, t, n) {
|
|
5614
|
-
const i =
|
|
5620
|
+
const i = W(e) ? e : Be(e);
|
|
5615
5621
|
return i.start(On("", i, t, n)), i.animation;
|
|
5616
5622
|
}
|
|
5617
5623
|
function tt(e, t, n, i = { passive: !0 }) {
|
|
@@ -5637,10 +5643,10 @@ function Gc(e, t) {
|
|
|
5637
5643
|
const a = r - n;
|
|
5638
5644
|
a >= t && (we(i), e(a - t));
|
|
5639
5645
|
};
|
|
5640
|
-
return
|
|
5646
|
+
return D.setup(i, !0), () => we(i);
|
|
5641
5647
|
}
|
|
5642
5648
|
function gt(e) {
|
|
5643
|
-
return
|
|
5649
|
+
return W(e) ? e.get() : e;
|
|
5644
5650
|
}
|
|
5645
5651
|
class Yc {
|
|
5646
5652
|
constructor() {
|
|
@@ -5721,7 +5727,7 @@ function Wr(e) {
|
|
|
5721
5727
|
const n = ur(t);
|
|
5722
5728
|
if (window.MotionHasOptimisedAnimation(n, "transform")) {
|
|
5723
5729
|
const { layout: r, layoutId: a } = e.options;
|
|
5724
|
-
window.MotionCancelOptimisedAnimation(n, "transform",
|
|
5730
|
+
window.MotionCancelOptimisedAnimation(n, "transform", D, !(r || a));
|
|
5725
5731
|
}
|
|
5726
5732
|
const { parent: i } = e;
|
|
5727
5733
|
i && !i.hasCheckedOptimisedAppear && Wr(i);
|
|
@@ -5759,7 +5765,7 @@ function $r({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
5759
5765
|
if (h && !h.current && h.mount(o), this.root.nodes.add(this), this.parent && this.parent.children.add(this), this.root.hasTreeAnimated && (c || l) && (this.isLayoutDirty = !0), e) {
|
|
5760
5766
|
let u, d = 0;
|
|
5761
5767
|
const f = () => this.root.updateBlockedByResize = !1;
|
|
5762
|
-
|
|
5768
|
+
D.read(() => {
|
|
5763
5769
|
d = window.innerWidth;
|
|
5764
5770
|
}), e(o, () => {
|
|
5765
5771
|
const m = window.innerWidth;
|
|
@@ -5771,15 +5777,15 @@ function $r({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
5771
5777
|
this.target = void 0, this.relativeTarget = void 0;
|
|
5772
5778
|
return;
|
|
5773
5779
|
}
|
|
5774
|
-
const x = this.options.transition || h.getDefaultTransition() || hu, { onLayoutAnimationStart: g, onLayoutAnimationComplete:
|
|
5775
|
-
if (this.options.layoutRoot || this.resumeFrom ||
|
|
5780
|
+
const x = this.options.transition || h.getDefaultTransition() || hu, { onLayoutAnimationStart: g, onLayoutAnimationComplete: y } = h.getProps(), w = !this.targetLayout || !Hr(this.targetLayout, m), v = !d && f;
|
|
5781
|
+
if (this.options.layoutRoot || this.resumeFrom || v || d && (w || !this.currentAnimation)) {
|
|
5776
5782
|
this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0);
|
|
5777
|
-
const
|
|
5783
|
+
const b = {
|
|
5778
5784
|
...Fn(x, "layout"),
|
|
5779
5785
|
onPlay: g,
|
|
5780
|
-
onComplete:
|
|
5786
|
+
onComplete: y
|
|
5781
5787
|
};
|
|
5782
|
-
(h.shouldReduceMotion || this.options.layoutRoot) && (
|
|
5788
|
+
(h.shouldReduceMotion || this.options.layoutRoot) && (b.delay = 0, b.type = !1), this.startAnimation(b), this.setAnimationOrigin(u, v);
|
|
5783
5789
|
} else
|
|
5784
5790
|
d || Js(this), this.isLead() && this.options.onExitComplete && this.options.onExitComplete();
|
|
5785
5791
|
this.targetLayout = m;
|
|
@@ -5841,7 +5847,7 @@ function $r({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
5841
5847
|
}
|
|
5842
5848
|
this.animationCommitId = this.animationId, this.isUpdating ? (this.isUpdating = !1, this.nodes.forEach(su), this.nodes.forEach(iu), this.nodes.forEach(Zc), this.nodes.forEach(Jc)) : this.nodes.forEach(Zs), this.clearAllSnapshots();
|
|
5843
5849
|
const l = Z.now();
|
|
5844
|
-
|
|
5850
|
+
U.delta = de(0, 1e3 / 60, l - U.timestamp), U.timestamp = l, U.isProcessing = !0, Ft.update.process(U), Ft.preRender.process(U), Ft.render.process(U), U.isProcessing = !1;
|
|
5845
5851
|
}
|
|
5846
5852
|
didUpdate() {
|
|
5847
5853
|
this.updateScheduled || (this.updateScheduled = !0, Hn.read(this.scheduleUpdate));
|
|
@@ -5850,10 +5856,10 @@ function $r({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
5850
5856
|
this.nodes.forEach(tu), this.sharedNodes.forEach(lu);
|
|
5851
5857
|
}
|
|
5852
5858
|
scheduleUpdateProjection() {
|
|
5853
|
-
this.projectionUpdateScheduled || (this.projectionUpdateScheduled = !0,
|
|
5859
|
+
this.projectionUpdateScheduled || (this.projectionUpdateScheduled = !0, D.preRender(this.updateProjection, !1, !0));
|
|
5854
5860
|
}
|
|
5855
5861
|
scheduleCheckAfterUnmount() {
|
|
5856
|
-
|
|
5862
|
+
D.postRender(() => {
|
|
5857
5863
|
this.isLayoutDirty ? this.root.didUpdate() : this.root.checkUpdateFailed();
|
|
5858
5864
|
});
|
|
5859
5865
|
}
|
|
@@ -5964,7 +5970,7 @@ function $r({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
5964
5970
|
this.scroll = void 0, this.layout = void 0, this.snapshot = void 0, this.prevTransformTemplateValue = void 0, this.targetDelta = void 0, this.target = void 0, this.isLayoutDirty = !1;
|
|
5965
5971
|
}
|
|
5966
5972
|
forceRelativeParentToResolveTarget() {
|
|
5967
|
-
this.relativeParent && this.relativeParent.resolvedRelativeTargetAt !==
|
|
5973
|
+
this.relativeParent && this.relativeParent.resolvedRelativeTargetAt !== U.timestamp && this.relativeParent.resolveTargetDelta(!0);
|
|
5968
5974
|
}
|
|
5969
5975
|
resolveTargetDelta(o = !1) {
|
|
5970
5976
|
var m;
|
|
@@ -5976,7 +5982,7 @@ function $r({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
5976
5982
|
const { layout: u, layoutId: d } = this.options;
|
|
5977
5983
|
if (!this.layout || !(u || d))
|
|
5978
5984
|
return;
|
|
5979
|
-
this.resolvedRelativeTargetAt =
|
|
5985
|
+
this.resolvedRelativeTargetAt = U.timestamp;
|
|
5980
5986
|
const f = this.getClosestProjectingParent();
|
|
5981
5987
|
f && this.linkedParentVersion !== f.layoutVersion && !f.options.layoutRoot && this.removeRelativeTarget(), !this.targetDelta && !this.relativeTarget && (this.options.layoutAnchor !== !1 && f && f.layout ? this.createRelativeTarget(f, this.layout.layoutBox, f.layout.layoutBox) : this.removeRelativeTarget()), !(!this.relativeTarget && !this.targetDelta) && (this.target || (this.target = H(), this.targetWithTransforms = H()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), Lc(this.target, this.relativeTarget, this.relativeParent.target, this.options.layoutAnchor || void 0)) : this.targetDelta ? (this.resumingFrom ? this.applyTransform(this.layout.layoutBox, !1, this.target) : re(this.target, this.layout.layoutBox), Vr(this.target, this.targetDelta)) : re(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget && (this.attemptToResolveRelativeTarget = !1, this.options.layoutAnchor !== !1 && f && !!f.resumingFrom == !!this.resumingFrom && !f.options.layoutScroll && f.target && this.animationProgress !== 1 ? this.createRelativeTarget(f, this.target, f.target) : this.relativeParent = this.relativeTarget = void 0));
|
|
5982
5988
|
}
|
|
@@ -5997,7 +6003,7 @@ function $r({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
5997
6003
|
var x;
|
|
5998
6004
|
const o = this.getLead(), l = !!this.resumingFrom || this !== o;
|
|
5999
6005
|
let c = !0;
|
|
6000
|
-
if ((this.isProjectionDirty || (x = this.parent) != null && x.isProjectionDirty) && (c = !1), l && (this.isSharedProjectionDirty || this.isTransformDirty) && (c = !1), this.resolvedRelativeTargetAt ===
|
|
6006
|
+
if ((this.isProjectionDirty || (x = this.parent) != null && x.isProjectionDirty) && (c = !1), l && (this.isSharedProjectionDirty || this.isTransformDirty) && (c = !1), this.resolvedRelativeTargetAt === U.timestamp && (c = !1), c)
|
|
6001
6007
|
return;
|
|
6002
6008
|
const { layout: h, layoutId: u } = this.options;
|
|
6003
6009
|
if (this.isTreeAnimating = !!(this.parent && this.parent.isTreeAnimating || this.currentAnimation || this.pendingAnimation), this.isTreeAnimating || (this.targetDelta = this.relativeTarget = void 0), !this.layout || !(h || u))
|
|
@@ -6032,17 +6038,17 @@ function $r({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
6032
6038
|
setAnimationOrigin(o, l = !1) {
|
|
6033
6039
|
const c = this.snapshot, h = c ? c.latestValues : {}, u = { ...this.latestValues }, d = Fe();
|
|
6034
6040
|
(!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !l;
|
|
6035
|
-
const f = H(), m = c ? c.source : void 0, x = this.layout ? this.layout.source : void 0, g = m !== x,
|
|
6041
|
+
const f = H(), m = c ? c.source : void 0, x = this.layout ? this.layout.source : void 0, g = m !== x, y = this.getStack(), w = !y || y.members.length <= 1, v = !!(g && !w && this.options.crossfade === !0 && !this.path.some(uu));
|
|
6036
6042
|
this.animationProgress = 0;
|
|
6037
|
-
let
|
|
6038
|
-
this.mixTargetDelta = (
|
|
6039
|
-
const S =
|
|
6040
|
-
Qs(d.x, o.x, S), Qs(d.y, o.y, S), this.setTargetDelta(d), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (Pt(f, this.layout.layoutBox, this.relativeParent.layout.layoutBox, this.options.layoutAnchor || void 0), cu(this.relativeTarget, this.relativeTargetOrigin, f, S),
|
|
6043
|
+
let b;
|
|
6044
|
+
this.mixTargetDelta = (M) => {
|
|
6045
|
+
const S = M / 1e3;
|
|
6046
|
+
Qs(d.x, o.x, S), Qs(d.y, o.y, S), this.setTargetDelta(d), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (Pt(f, this.layout.layoutBox, this.relativeParent.layout.layoutBox, this.options.layoutAnchor || void 0), cu(this.relativeTarget, this.relativeTargetOrigin, f, S), b && Ic(this.relativeTarget, b) && (this.isProjectionDirty = !1), b || (b = H()), re(b, this.relativeTarget)), g && (this.animationValues = u, Hc(u, h, this.latestValues, S, v, w)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = S;
|
|
6041
6047
|
}, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
|
|
6042
6048
|
}
|
|
6043
6049
|
startAnimation(o) {
|
|
6044
6050
|
var l, c, h;
|
|
6045
|
-
this.notifyListeners("animationStart"), (l = this.currentAnimation) == null || l.stop(), (h = (c = this.resumingFrom) == null ? void 0 : c.currentAnimation) == null || h.stop(), this.pendingAnimation && (we(this.pendingAnimation), this.pendingAnimation = void 0), this.pendingAnimation =
|
|
6051
|
+
this.notifyListeners("animationStart"), (l = this.currentAnimation) == null || l.stop(), (h = (c = this.resumingFrom) == null ? void 0 : c.currentAnimation) == null || h.stop(), this.pendingAnimation && (we(this.pendingAnimation), this.pendingAnimation = void 0), this.pendingAnimation = D.update(() => {
|
|
6046
6052
|
jt.hasAnimatedSinceResize = !0, this.motionValue || (this.motionValue = Be(0)), this.motionValue.jump(0, !1), this.currentAnimation = Wc(this.motionValue, [0, 1e3], {
|
|
6047
6053
|
...o,
|
|
6048
6054
|
velocity: 0,
|
|
@@ -6159,13 +6165,13 @@ function $r({ attachResizeListener: e, defaultParent: t, measureScroll: n, check
|
|
|
6159
6165
|
for (const x in jn) {
|
|
6160
6166
|
if (u[x] === void 0)
|
|
6161
6167
|
continue;
|
|
6162
|
-
const { correct: g, applyTo:
|
|
6163
|
-
if (
|
|
6164
|
-
const
|
|
6165
|
-
for (let
|
|
6166
|
-
o[
|
|
6168
|
+
const { correct: g, applyTo: y, isCSSVariable: w } = jn[x], v = d === "none" ? u[x] : g(u[x], h);
|
|
6169
|
+
if (y) {
|
|
6170
|
+
const b = y.length;
|
|
6171
|
+
for (let M = 0; M < b; M++)
|
|
6172
|
+
o[y[M]] = v;
|
|
6167
6173
|
} else
|
|
6168
|
-
|
|
6174
|
+
w ? this.options.visualElement.renderState.vars[x] = v : o[x] = v;
|
|
6169
6175
|
}
|
|
6170
6176
|
this.options.layoutId && (o.pointerEvents = h === this ? gt(l == null ? void 0 : l.pointerEvents) || "" : "none");
|
|
6171
6177
|
}
|
|
@@ -6214,8 +6220,8 @@ function Jc(e) {
|
|
|
6214
6220
|
if (f && m) {
|
|
6215
6221
|
const x = e.options.layoutAnchor || void 0, g = H();
|
|
6216
6222
|
Pt(g, t.layoutBox, f.layoutBox, x);
|
|
6217
|
-
const
|
|
6218
|
-
Pt(
|
|
6223
|
+
const y = H();
|
|
6224
|
+
Pt(y, i, m.layoutBox, x), Hr(g, y) || (u = !0), d.options.layoutRoot && (e.relativeTarget = y, e.relativeTargetOrigin = g, e.relativeParent = d);
|
|
6219
6225
|
}
|
|
6220
6226
|
}
|
|
6221
6227
|
}
|
|
@@ -6274,10 +6280,10 @@ function lu(e) {
|
|
|
6274
6280
|
e.removeLeadSnapshot();
|
|
6275
6281
|
}
|
|
6276
6282
|
function Qs(e, t, n) {
|
|
6277
|
-
e.translate =
|
|
6283
|
+
e.translate = L(t.translate, 0, n), e.scale = L(t.scale, 1, n), e.origin = t.origin, e.originPoint = t.originPoint;
|
|
6278
6284
|
}
|
|
6279
6285
|
function ei(e, t, n, i) {
|
|
6280
|
-
e.min =
|
|
6286
|
+
e.min = L(t.min, n.min, i), e.max = L(t.max, n.max, i);
|
|
6281
6287
|
}
|
|
6282
6288
|
function cu(e, t, n, i) {
|
|
6283
6289
|
ei(e.x, t.x, n.x, i), ei(e.y, t.y, n.y, i);
|
|
@@ -6288,7 +6294,7 @@ function uu(e) {
|
|
|
6288
6294
|
const hu = {
|
|
6289
6295
|
duration: 0.45,
|
|
6290
6296
|
ease: [0.4, 0, 0.1, 1]
|
|
6291
|
-
}, ti = (e) => typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().includes(e), ni = ti("applewebkit/") && !ti("chrome/") ? Math.round :
|
|
6297
|
+
}, ti = (e) => typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().includes(e), ni = ti("applewebkit/") && !ti("chrome/") ? Math.round : ie;
|
|
6292
6298
|
function si(e) {
|
|
6293
6299
|
e.min = ni(e.min), e.max = ni(e.max);
|
|
6294
6300
|
}
|
|
@@ -6336,7 +6342,7 @@ const pu = $r({
|
|
|
6336
6342
|
reducedMotion: "never"
|
|
6337
6343
|
});
|
|
6338
6344
|
function mu(e = !0) {
|
|
6339
|
-
const t =
|
|
6345
|
+
const t = ee(Tn);
|
|
6340
6346
|
if (t === null)
|
|
6341
6347
|
return [!0, null];
|
|
6342
6348
|
const { isPresent: n, onExitComplete: i, register: r } = t, a = co();
|
|
@@ -6437,7 +6443,7 @@ try {
|
|
|
6437
6443
|
function vu(e, t, n) {
|
|
6438
6444
|
const i = {};
|
|
6439
6445
|
for (const r in e)
|
|
6440
|
-
r === "values" && typeof e.values == "object" ||
|
|
6446
|
+
r === "values" && typeof e.values == "object" || W(e[r]) || (Zr(r) || n === !0 && Vt(r) || !t && !Vt(r) || // If trying to use native HTML drag events, forward drag listeners
|
|
6441
6447
|
e.draggable && r.startsWith("onDrag")) && (i[r] = e[r]);
|
|
6442
6448
|
return i;
|
|
6443
6449
|
}
|
|
@@ -6453,7 +6459,7 @@ function wu(e, t) {
|
|
|
6453
6459
|
return e.inherit !== !1 ? t : {};
|
|
6454
6460
|
}
|
|
6455
6461
|
function bu(e) {
|
|
6456
|
-
const { initial: t, animate: n } = wu(e,
|
|
6462
|
+
const { initial: t, animate: n } = wu(e, ee(kt));
|
|
6457
6463
|
return Oe(() => ({ initial: t, animate: n }), [oi(t), oi(n)]);
|
|
6458
6464
|
}
|
|
6459
6465
|
function oi(e) {
|
|
@@ -6467,7 +6473,7 @@ const Yn = () => ({
|
|
|
6467
6473
|
});
|
|
6468
6474
|
function Jr(e, t, n) {
|
|
6469
6475
|
for (const i in t)
|
|
6470
|
-
!
|
|
6476
|
+
!W(t[i]) && !Dr(i, n) && (e[i] = t[i]);
|
|
6471
6477
|
}
|
|
6472
6478
|
function Tu({ transformTemplate: e }, t) {
|
|
6473
6479
|
return Oe(() => {
|
|
@@ -6549,7 +6555,7 @@ function Xn(e) {
|
|
|
6549
6555
|
);
|
|
6550
6556
|
}
|
|
6551
6557
|
function Vu(e, t, n, { latestValues: i }, r, a = !1, o) {
|
|
6552
|
-
const c = (o ?? Xn(e) ? Au : Su)(t, i, r, e), h = vu(t, typeof e == "string", a), u = e !== p ? { ...h, ...c, ref: n } : {}, { children: d } = t, f = Oe(() =>
|
|
6558
|
+
const c = (o ?? Xn(e) ? Au : Su)(t, i, r, e), h = vu(t, typeof e == "string", a), u = e !== p ? { ...h, ...c, ref: n } : {}, { children: d } = t, f = Oe(() => W(d) ? d.get() : d, [d]);
|
|
6553
6559
|
return uo(e, {
|
|
6554
6560
|
...u,
|
|
6555
6561
|
children: f
|
|
@@ -6576,24 +6582,24 @@ function Eu(e, t, n, i) {
|
|
|
6576
6582
|
for (let m = 0; m < f.length; m++) {
|
|
6577
6583
|
const x = In(e, f[m]);
|
|
6578
6584
|
if (x) {
|
|
6579
|
-
const { transitionEnd: g, transition:
|
|
6580
|
-
for (const
|
|
6581
|
-
let
|
|
6582
|
-
if (Array.isArray(
|
|
6583
|
-
const
|
|
6584
|
-
|
|
6585
|
+
const { transitionEnd: g, transition: y, ...w } = x;
|
|
6586
|
+
for (const v in w) {
|
|
6587
|
+
let b = w[v];
|
|
6588
|
+
if (Array.isArray(b)) {
|
|
6589
|
+
const M = u ? b.length - 1 : 0;
|
|
6590
|
+
b = b[M];
|
|
6585
6591
|
}
|
|
6586
|
-
|
|
6592
|
+
b !== null && (r[v] = b);
|
|
6587
6593
|
}
|
|
6588
|
-
for (const
|
|
6589
|
-
r[
|
|
6594
|
+
for (const v in g)
|
|
6595
|
+
r[v] = g[v];
|
|
6590
6596
|
}
|
|
6591
6597
|
}
|
|
6592
6598
|
}
|
|
6593
6599
|
return r;
|
|
6594
6600
|
}
|
|
6595
6601
|
const eo = (e) => (t, n) => {
|
|
6596
|
-
const i =
|
|
6602
|
+
const i = ee(kt), r = ee(Tn), a = () => Cu(e, t, i, r);
|
|
6597
6603
|
return n ? a() : Po(a);
|
|
6598
6604
|
}, Du = /* @__PURE__ */ eo({
|
|
6599
6605
|
scrapeMotionValuesFromProps: Gn,
|
|
@@ -6626,8 +6632,8 @@ function ke(e) {
|
|
|
6626
6632
|
return e && typeof e == "object" && Object.prototype.hasOwnProperty.call(e, "current");
|
|
6627
6633
|
}
|
|
6628
6634
|
function Nu(e, t, n, i, r, a) {
|
|
6629
|
-
var
|
|
6630
|
-
const { visualElement: o } =
|
|
6635
|
+
var b, M;
|
|
6636
|
+
const { visualElement: o } = ee(kt), l = ee(Xr), c = ee(Tn), h = ee(Yr), u = h.reducedMotion, d = h.skipAnimations, f = fe(null), m = fe(!1);
|
|
6631
6637
|
i = i || l.renderer, !f.current && i && (f.current = i(e, {
|
|
6632
6638
|
visualState: t,
|
|
6633
6639
|
parent: o,
|
|
@@ -6638,20 +6644,20 @@ function Nu(e, t, n, i, r, a) {
|
|
|
6638
6644
|
skipAnimations: d,
|
|
6639
6645
|
isSVG: a
|
|
6640
6646
|
}), m.current && f.current && (f.current.manuallyAnimateOnMount = !0));
|
|
6641
|
-
const x = f.current, g =
|
|
6647
|
+
const x = f.current, g = ee(to);
|
|
6642
6648
|
x && !x.projection && r && (x.type === "html" || x.type === "svg") && Fu(f.current, n, r, g);
|
|
6643
|
-
const
|
|
6649
|
+
const y = fe(!1);
|
|
6644
6650
|
ji(() => {
|
|
6645
|
-
x &&
|
|
6651
|
+
x && y.current && x.update(n, c);
|
|
6646
6652
|
});
|
|
6647
|
-
const
|
|
6653
|
+
const w = n[cr], v = fe(!!w && typeof window < "u" && !((b = window.MotionHandoffIsComplete) != null && b.call(window, w)) && ((M = window.MotionHasOptimisedAnimation) == null ? void 0 : M.call(window, w)));
|
|
6648
6654
|
return Co(() => {
|
|
6649
|
-
m.current = !0, x && (
|
|
6655
|
+
m.current = !0, x && (y.current = !0, window.MotionIsMounted = !0, x.updateFeatures(), x.scheduleRenderMicrotask(), v.current && x.animationState && x.animationState.animateChanges());
|
|
6650
6656
|
}), je(() => {
|
|
6651
|
-
x && (!
|
|
6657
|
+
x && (!v.current && x.animationState && x.animationState.animateChanges(), v.current && (queueMicrotask(() => {
|
|
6652
6658
|
var S;
|
|
6653
|
-
(S = window.MotionHandoffMarkAsComplete) == null || S.call(window,
|
|
6654
|
-
}),
|
|
6659
|
+
(S = window.MotionHandoffMarkAsComplete) == null || S.call(window, w);
|
|
6660
|
+
}), v.current = !1), x.enteringChildren = void 0);
|
|
6655
6661
|
}), x;
|
|
6656
6662
|
}
|
|
6657
6663
|
function Fu(e, t, n, i) {
|
|
@@ -6686,14 +6692,14 @@ function Kt(e, { forwardMotionProps: t = !1, type: n } = {}, i, r) {
|
|
|
6686
6692
|
function l(h, u) {
|
|
6687
6693
|
let d;
|
|
6688
6694
|
const f = {
|
|
6689
|
-
...
|
|
6695
|
+
...ee(Yr),
|
|
6690
6696
|
...h,
|
|
6691
6697
|
layoutId: Ou(h)
|
|
6692
6698
|
}, { isStatic: m } = f, x = bu(h), g = o(h, m);
|
|
6693
6699
|
if (!m && typeof window < "u") {
|
|
6694
6700
|
Iu(f, i);
|
|
6695
|
-
const
|
|
6696
|
-
d =
|
|
6701
|
+
const y = Bu(f);
|
|
6702
|
+
d = y.MeasureLayout, x.visualElement = Nu(e, g, f, r, y.ProjectionNode, a);
|
|
6697
6703
|
}
|
|
6698
6704
|
return s.jsxs(kt.Provider, { value: x, children: [d && x.visualElement ? s.jsx(d, { visualElement: x.visualElement, ...f }) : null, Vu(e, h, Lu(g, x.visualElement, u), g, m, t, a)] });
|
|
6699
6705
|
}
|
|
@@ -6702,11 +6708,11 @@ function Kt(e, { forwardMotionProps: t = !1, type: n } = {}, i, r) {
|
|
|
6702
6708
|
return c[Ru] = e, c;
|
|
6703
6709
|
}
|
|
6704
6710
|
function Ou({ layoutId: e }) {
|
|
6705
|
-
const t =
|
|
6711
|
+
const t = ee(wi).id;
|
|
6706
6712
|
return t && e !== void 0 ? t + "-" + e : e;
|
|
6707
6713
|
}
|
|
6708
6714
|
function Iu(e, t) {
|
|
6709
|
-
const n =
|
|
6715
|
+
const n = ee(Xr).strict;
|
|
6710
6716
|
if (process.env.NODE_ENV !== "production" && t && n) {
|
|
6711
6717
|
const i = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";
|
|
6712
6718
|
e.ignoreStrict ? He(!1, i, "lazy-strict-mode") : pe(!1, i, "lazy-strict-mode");
|
|
@@ -6846,23 +6852,23 @@ class io {
|
|
|
6846
6852
|
const m = Gt(this.lastMoveEventInfo, this.history), x = this.startEvent !== null, g = Gu(m.offset, { x: 0, y: 0 }) >= this.distanceThreshold;
|
|
6847
6853
|
if (!x && !g)
|
|
6848
6854
|
return;
|
|
6849
|
-
const { point:
|
|
6850
|
-
this.history.push({ ...
|
|
6851
|
-
const { onStart:
|
|
6852
|
-
x || (
|
|
6855
|
+
const { point: y } = m, { timestamp: w } = U;
|
|
6856
|
+
this.history.push({ ...y, timestamp: w });
|
|
6857
|
+
const { onStart: v, onMove: b } = this.handlers;
|
|
6858
|
+
x || (v && v(this.lastMoveEvent, m), this.startEvent = this.lastMoveEvent), b && b(this.lastMoveEvent, m);
|
|
6853
6859
|
}, this.handlePointerMove = (m, x) => {
|
|
6854
|
-
this.lastMoveEvent = m, this.lastRawMoveEventInfo = x, this.lastMoveEventInfo = ht(x, this.transformPagePoint),
|
|
6860
|
+
this.lastMoveEvent = m, this.lastRawMoveEventInfo = x, this.lastMoveEventInfo = ht(x, this.transformPagePoint), D.update(this.updatePoint, !0);
|
|
6855
6861
|
}, this.handlePointerUp = (m, x) => {
|
|
6856
6862
|
this.end();
|
|
6857
|
-
const { onEnd: g, onSessionEnd:
|
|
6858
|
-
if ((this.dragSnapToOrigin || !this.startEvent) &&
|
|
6863
|
+
const { onEnd: g, onSessionEnd: y, resumeAnimation: w } = this.handlers;
|
|
6864
|
+
if ((this.dragSnapToOrigin || !this.startEvent) && w && w(), !(this.lastMoveEvent && this.lastMoveEventInfo))
|
|
6859
6865
|
return;
|
|
6860
|
-
const
|
|
6861
|
-
this.startEvent && g && g(m,
|
|
6866
|
+
const v = Gt(m.type === "pointercancel" ? this.lastMoveEventInfo : ht(x, this.transformPagePoint), this.history);
|
|
6867
|
+
this.startEvent && g && g(m, v), y && y(m, v);
|
|
6862
6868
|
}, !_n(t))
|
|
6863
6869
|
return;
|
|
6864
6870
|
this.dragSnapToOrigin = a, this.handlers = n, this.transformPagePoint = i, this.distanceThreshold = o, this.contextWindow = r || window;
|
|
6865
|
-
const c = ot(t), h = ht(c, this.transformPagePoint), { point: u } = h, { timestamp: d } =
|
|
6871
|
+
const c = ot(t), h = ht(c, this.transformPagePoint), { point: u } = h, { timestamp: d } = U;
|
|
6866
6872
|
this.history = [{ ...u, timestamp: d }];
|
|
6867
6873
|
const { onSessionStart: f } = n;
|
|
6868
6874
|
f && f(t, Gt(h, this.history)), this.removeListeners = st(Ze(this.contextWindow, "pointermove", this.handlePointerMove), Ze(this.contextWindow, "pointerup", this.handlePointerUp), Ze(this.contextWindow, "pointercancel", this.handlePointerUp)), l && this.startScrollTracking(l);
|
|
@@ -6904,7 +6910,7 @@ class io {
|
|
|
6904
6910
|
x: t.scrollLeft,
|
|
6905
6911
|
y: t.scrollTop
|
|
6906
6912
|
}, a = { x: r.x - n.x, y: r.y - n.y };
|
|
6907
|
-
a.x === 0 && a.y === 0 || (i ? this.lastMoveEventInfo && (this.lastMoveEventInfo.point.x += a.x, this.lastMoveEventInfo.point.y += a.y) : this.history.length > 0 && (this.history[0].x -= a.x, this.history[0].y -= a.y), this.scrollPositions.set(t, r),
|
|
6913
|
+
a.x === 0 && a.y === 0 || (i ? this.lastMoveEventInfo && (this.lastMoveEventInfo.point.x += a.x, this.lastMoveEventInfo.point.y += a.y) : this.history.length > 0 && (this.history[0].x -= a.x, this.history[0].y -= a.y), this.scrollPositions.set(t, r), D.update(this.updatePoint, !0));
|
|
6908
6914
|
}
|
|
6909
6915
|
updateHandlers(t) {
|
|
6910
6916
|
this.handlers = t;
|
|
@@ -6938,12 +6944,12 @@ function Xu(e, t) {
|
|
|
6938
6944
|
return { x: 0, y: 0 };
|
|
6939
6945
|
let n = e.length - 1, i = null;
|
|
6940
6946
|
const r = ro(e);
|
|
6941
|
-
for (; n >= 0 && (i = e[n], !(r.timestamp - i.timestamp > /* @__PURE__ */
|
|
6947
|
+
for (; n >= 0 && (i = e[n], !(r.timestamp - i.timestamp > /* @__PURE__ */ te(t))); )
|
|
6942
6948
|
n--;
|
|
6943
6949
|
if (!i)
|
|
6944
6950
|
return { x: 0, y: 0 };
|
|
6945
|
-
i === e[0] && e.length > 2 && r.timestamp - i.timestamp > /* @__PURE__ */
|
|
6946
|
-
const a = /* @__PURE__ */
|
|
6951
|
+
i === e[0] && e.length > 2 && r.timestamp - i.timestamp > /* @__PURE__ */ te(t) * 2 && (i = e[1]);
|
|
6952
|
+
const a = /* @__PURE__ */ se(r.timestamp - i.timestamp);
|
|
6947
6953
|
if (a === 0)
|
|
6948
6954
|
return { x: 0, y: 0 };
|
|
6949
6955
|
const o = {
|
|
@@ -6953,7 +6959,7 @@ function Xu(e, t) {
|
|
|
6953
6959
|
return o.x === 1 / 0 && (o.x = 0), o.y === 1 / 0 && (o.y = 0), o;
|
|
6954
6960
|
}
|
|
6955
6961
|
function qu(e, { min: t, max: n }, i) {
|
|
6956
|
-
return t !== void 0 && e < t ? e = i ?
|
|
6962
|
+
return t !== void 0 && e < t ? e = i ? L(t, e, i.min) : Math.max(e, t) : n !== void 0 && e > n && (e = i ? L(n, e, i.max) : Math.min(e, n)), e;
|
|
6957
6963
|
}
|
|
6958
6964
|
function ui(e, t, n) {
|
|
6959
6965
|
return {
|
|
@@ -7017,30 +7023,30 @@ class sh {
|
|
|
7017
7023
|
const { drag: m, dragPropagation: x, onDragStart: g } = this.getProps();
|
|
7018
7024
|
if (m && !x && (this.openDragLock && this.openDragLock(), this.openDragLock = Nl(m), !this.openDragLock))
|
|
7019
7025
|
return;
|
|
7020
|
-
this.latestPointerEvent = d, this.latestPanInfo = f, this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), ce((
|
|
7021
|
-
let
|
|
7022
|
-
if (he.test(
|
|
7023
|
-
const { projection:
|
|
7024
|
-
if (
|
|
7025
|
-
const
|
|
7026
|
-
|
|
7026
|
+
this.latestPointerEvent = d, this.latestPanInfo = f, this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), ce((w) => {
|
|
7027
|
+
let v = this.getAxisMotionValue(w).get() || 0;
|
|
7028
|
+
if (he.test(v)) {
|
|
7029
|
+
const { projection: b } = this.visualElement;
|
|
7030
|
+
if (b && b.layout) {
|
|
7031
|
+
const M = b.layout.layoutBox[w];
|
|
7032
|
+
M && (v = J(M) * (parseFloat(v) / 100));
|
|
7027
7033
|
}
|
|
7028
7034
|
}
|
|
7029
|
-
this.originPoint[
|
|
7030
|
-
}), g &&
|
|
7031
|
-
const { animationState:
|
|
7032
|
-
|
|
7035
|
+
this.originPoint[w] = v;
|
|
7036
|
+
}), g && D.update(() => g(d, f), !1, !0), dn(this.visualElement, "transform");
|
|
7037
|
+
const { animationState: y } = this.visualElement;
|
|
7038
|
+
y && y.setActive("whileDrag", !0);
|
|
7033
7039
|
}, l = (d, f) => {
|
|
7034
7040
|
this.latestPointerEvent = d, this.latestPanInfo = f;
|
|
7035
|
-
const { dragPropagation: m, dragDirectionLock: x, onDirectionLock: g, onDrag:
|
|
7041
|
+
const { dragPropagation: m, dragDirectionLock: x, onDirectionLock: g, onDrag: y } = this.getProps();
|
|
7036
7042
|
if (!m && !this.openDragLock)
|
|
7037
7043
|
return;
|
|
7038
|
-
const { offset:
|
|
7044
|
+
const { offset: w } = f;
|
|
7039
7045
|
if (x && this.currentDirection === null) {
|
|
7040
|
-
this.currentDirection = rh(
|
|
7046
|
+
this.currentDirection = rh(w), this.currentDirection !== null && g && g(this.currentDirection);
|
|
7041
7047
|
return;
|
|
7042
7048
|
}
|
|
7043
|
-
this.updateAxis("x", f.point,
|
|
7049
|
+
this.updateAxis("x", f.point, w), this.updateAxis("y", f.point, w), this.visualElement.render(), y && D.update(() => y(d, f), !1, !0);
|
|
7044
7050
|
}, c = (d, f) => {
|
|
7045
7051
|
this.latestPointerEvent = d, this.latestPanInfo = f, this.stop(d, f), this.latestPointerEvent = null, this.latestPanInfo = null;
|
|
7046
7052
|
}, h = () => {
|
|
@@ -7071,7 +7077,7 @@ class sh {
|
|
|
7071
7077
|
const { velocity: o } = r;
|
|
7072
7078
|
this.startAnimation(o);
|
|
7073
7079
|
const { onDragEnd: l } = this.getProps();
|
|
7074
|
-
l &&
|
|
7080
|
+
l && D.postRender(() => l(i, r));
|
|
7075
7081
|
}
|
|
7076
7082
|
/**
|
|
7077
7083
|
* @internal
|
|
@@ -7170,7 +7176,7 @@ class sh {
|
|
|
7170
7176
|
const { projection: r } = this.visualElement, a = this.getAxisMotionValue(n);
|
|
7171
7177
|
if (r && r.layout) {
|
|
7172
7178
|
const { min: o, max: l } = r.layout.layoutBox[n], c = a.get() || 0;
|
|
7173
|
-
a.set(t[n] -
|
|
7179
|
+
a.set(t[n] - L(o, l, 0.5) + c);
|
|
7174
7180
|
}
|
|
7175
7181
|
});
|
|
7176
7182
|
}
|
|
@@ -7199,7 +7205,7 @@ class sh {
|
|
|
7199
7205
|
if (!dt(o, t, null))
|
|
7200
7206
|
return;
|
|
7201
7207
|
const l = this.getAxisMotionValue(o), { min: c, max: h } = this.constraints[o];
|
|
7202
|
-
l.set(
|
|
7208
|
+
l.set(L(c, h, r[o]));
|
|
7203
7209
|
}), this.visualElement.render();
|
|
7204
7210
|
}
|
|
7205
7211
|
addListeners() {
|
|
@@ -7215,7 +7221,7 @@ class sh {
|
|
|
7215
7221
|
const { dragConstraints: h } = this.getProps();
|
|
7216
7222
|
ke(h) && h.current && (this.constraints = this.resolveRefConstraints(), i || (i = ih(t, h.current, () => this.scalePositionWithinConstraints())));
|
|
7217
7223
|
}, { projection: a } = this.visualElement, o = a.addEventListener("measure", r);
|
|
7218
|
-
a && !a.layout && (a.root && a.root.updateScroll(), a.updateLayout()),
|
|
7224
|
+
a && !a.layout && (a.root && a.root.updateScroll(), a.updateLayout()), D.read(r);
|
|
7219
7225
|
const l = tt(window, "resize", () => this.scalePositionWithinConstraints()), c = a.addEventListener("didUpdate", ({ delta: h, hasLayoutChanged: u }) => {
|
|
7220
7226
|
this.isDragging && u && (ce((d) => {
|
|
7221
7227
|
const f = this.getAxisMotionValue(d);
|
|
@@ -7264,11 +7270,11 @@ function rh(e, t = 10) {
|
|
|
7264
7270
|
}
|
|
7265
7271
|
class oh extends be {
|
|
7266
7272
|
constructor(t) {
|
|
7267
|
-
super(t), this.removeGroupControls =
|
|
7273
|
+
super(t), this.removeGroupControls = ie, this.removeListeners = ie, this.controls = new sh(t);
|
|
7268
7274
|
}
|
|
7269
7275
|
mount() {
|
|
7270
7276
|
const { dragControls: t } = this.node.getProps();
|
|
7271
|
-
t && (this.removeGroupControls = t.subscribe(this.controls)), this.removeListeners = this.controls.addListeners() ||
|
|
7277
|
+
t && (this.removeGroupControls = t.subscribe(this.controls)), this.removeListeners = this.controls.addListeners() || ie;
|
|
7272
7278
|
}
|
|
7273
7279
|
update() {
|
|
7274
7280
|
const { dragControls: t } = this.node.getProps(), { dragControls: n } = this.node.prevProps || {};
|
|
@@ -7279,11 +7285,11 @@ class oh extends be {
|
|
|
7279
7285
|
}
|
|
7280
7286
|
}
|
|
7281
7287
|
const Yt = (e) => (t, n) => {
|
|
7282
|
-
e &&
|
|
7288
|
+
e && D.update(() => e(t, n), !1, !0);
|
|
7283
7289
|
};
|
|
7284
7290
|
class ah extends be {
|
|
7285
7291
|
constructor() {
|
|
7286
|
-
super(...arguments), this.removePointerDownListener =
|
|
7292
|
+
super(...arguments), this.removePointerDownListener = ie;
|
|
7287
7293
|
}
|
|
7288
7294
|
onPointerDown(t) {
|
|
7289
7295
|
this.session = new io(t, this.createPanHandlers(), {
|
|
@@ -7298,7 +7304,7 @@ class ah extends be {
|
|
|
7298
7304
|
onStart: Yt(n),
|
|
7299
7305
|
onMove: Yt(i),
|
|
7300
7306
|
onEnd: (a, o) => {
|
|
7301
|
-
delete this.session, r &&
|
|
7307
|
+
delete this.session, r && D.postRender(() => r(a, o));
|
|
7302
7308
|
}
|
|
7303
7309
|
};
|
|
7304
7310
|
}
|
|
@@ -7334,7 +7340,7 @@ class lh extends fo {
|
|
|
7334
7340
|
return o && (o.isPresent = a, t.layoutDependency !== n && o.setOptions({
|
|
7335
7341
|
...o.options,
|
|
7336
7342
|
layoutDependency: n
|
|
7337
|
-
}), Xt = !0, r || t.layoutDependency !== n || n === void 0 || t.isPresent !== a ? o.willUpdate() : this.safeToRemove(), t.isPresent !== a && (a ? o.promote() : o.relegate() ||
|
|
7343
|
+
}), Xt = !0, r || t.layoutDependency !== n || n === void 0 || t.isPresent !== a ? o.willUpdate() : this.safeToRemove(), t.isPresent !== a && (a ? o.promote() : o.relegate() || D.postRender(() => {
|
|
7338
7344
|
const l = o.getStack();
|
|
7339
7345
|
(!l || !l.members.length) && this.safeToRemove();
|
|
7340
7346
|
}))), null;
|
|
@@ -7358,8 +7364,8 @@ class lh extends fo {
|
|
|
7358
7364
|
}
|
|
7359
7365
|
}
|
|
7360
7366
|
function oo(e) {
|
|
7361
|
-
const [t, n] = mu(), i =
|
|
7362
|
-
return s.jsx(lh, { ...e, layoutGroup: i, switchLayoutGroup:
|
|
7367
|
+
const [t, n] = mu(), i = ee(wi);
|
|
7368
|
+
return s.jsx(lh, { ...e, layoutGroup: i, switchLayoutGroup: ee(to), isPresent: t, safeToRemove: n });
|
|
7363
7369
|
}
|
|
7364
7370
|
const ch = {
|
|
7365
7371
|
pan: {
|
|
@@ -7375,7 +7381,7 @@ function mi(e, t, n) {
|
|
|
7375
7381
|
const { props: i } = e;
|
|
7376
7382
|
e.animationState && i.whileHover && e.animationState.setActive("whileHover", n === "Start");
|
|
7377
7383
|
const r = "onHover" + n, a = i[r];
|
|
7378
|
-
a &&
|
|
7384
|
+
a && D.postRender(() => a(t, ot(t)));
|
|
7379
7385
|
}
|
|
7380
7386
|
class uh extends be {
|
|
7381
7387
|
mount() {
|
|
@@ -7413,7 +7419,7 @@ function xi(e, t, n) {
|
|
|
7413
7419
|
return;
|
|
7414
7420
|
e.animationState && i.whileTap && e.animationState.setActive("whileTap", n === "Start");
|
|
7415
7421
|
const r = "onTap" + (n === "End" ? "" : n), a = i[r];
|
|
7416
|
-
a &&
|
|
7422
|
+
a && D.postRender(() => a(t, ot(t)));
|
|
7417
7423
|
}
|
|
7418
7424
|
class dh extends be {
|
|
7419
7425
|
mount() {
|
|
@@ -7540,13 +7546,13 @@ const vh = {
|
|
|
7540
7546
|
top: document.documentElement.scrollHeight,
|
|
7541
7547
|
behavior: "smooth"
|
|
7542
7548
|
}), r = t ? "up" : "down";
|
|
7543
|
-
return /* @__PURE__ */ s.jsx("div", { className: "muncher-fab-container", children: /* @__PURE__ */ s.jsx(
|
|
7549
|
+
return /* @__PURE__ */ s.jsx("div", { className: "muncher-fab-container", children: /* @__PURE__ */ s.jsx(ne, { variant: e, onClick: r === "up" ? n : i, rounded: !0, children: r === "up" ? /* @__PURE__ */ s.jsx(N, { name: "arrow-up" }) : /* @__PURE__ */ s.jsx(N, { name: "arrow-down" }) }) });
|
|
7544
7550
|
};
|
|
7545
7551
|
export {
|
|
7546
7552
|
Ah as Accordion,
|
|
7547
7553
|
yo as Backdrop,
|
|
7548
7554
|
go as Badge,
|
|
7549
|
-
|
|
7555
|
+
ne as Button,
|
|
7550
7556
|
Xh as Card,
|
|
7551
7557
|
Eh as Checkbox,
|
|
7552
7558
|
wo as CopyButton,
|
|
@@ -7557,7 +7563,7 @@ export {
|
|
|
7557
7563
|
$h as Featured,
|
|
7558
7564
|
Zh as FlippableCard,
|
|
7559
7565
|
Hh as Hr,
|
|
7560
|
-
|
|
7566
|
+
N as Icon,
|
|
7561
7567
|
Ph as IconBadge,
|
|
7562
7568
|
Dh as ImageInput,
|
|
7563
7569
|
So as Input,
|