@cyca/react-timeline-editor 0.2.4-alpha.1 → 0.2.4-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +25 -45
- package/dist/react-timeline-editor.cjs +4 -4
- package/dist/react-timeline-editor.js +1408 -1361
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as b from "react";
|
|
2
|
-
import
|
|
3
|
-
import { D as En, a as
|
|
2
|
+
import tt, { useRef as te, useEffect as rt, useLayoutEffect as Qt, useImperativeHandle as Zn, useState as Mt, useMemo as Pr, useCallback as Dr, createElement as Lr, Activity as Or } from "react";
|
|
3
|
+
import { D as En, a as Yt, b as Qn, c as Gt, d as en, M as Mr, P as hn, e as mn, f as Kt, p as je, g as vn, h as Dt, i as Nr, j as Tt, k as er, l as Ir, S as yn } from "./index-Do2XgyZc.js";
|
|
4
4
|
import { flushSync as kr } from "react-dom";
|
|
5
|
-
var
|
|
6
|
-
var
|
|
5
|
+
var jt = { exports: {} }, Lt = {};
|
|
6
|
+
var xn;
|
|
7
7
|
function Wr() {
|
|
8
|
-
if (
|
|
9
|
-
|
|
8
|
+
if (xn) return Lt;
|
|
9
|
+
xn = 1;
|
|
10
10
|
var n = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
|
|
11
11
|
function t(r, s, o) {
|
|
12
12
|
var i = null;
|
|
@@ -26,243 +26,243 @@ function Wr() {
|
|
|
26
26
|
return Lt.Fragment = e, Lt.jsx = t, Lt.jsxs = t, Lt;
|
|
27
27
|
}
|
|
28
28
|
var Ot = {};
|
|
29
|
-
var
|
|
29
|
+
var Rn;
|
|
30
30
|
function zr() {
|
|
31
|
-
return
|
|
32
|
-
function n(
|
|
33
|
-
if (
|
|
34
|
-
if (typeof
|
|
35
|
-
return
|
|
36
|
-
if (typeof
|
|
37
|
-
switch (
|
|
38
|
-
case
|
|
31
|
+
return Rn || (Rn = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
32
|
+
function n(d) {
|
|
33
|
+
if (d == null) return null;
|
|
34
|
+
if (typeof d == "function")
|
|
35
|
+
return d.$$typeof === U ? null : d.displayName || d.name || null;
|
|
36
|
+
if (typeof d == "string") return d;
|
|
37
|
+
switch (d) {
|
|
38
|
+
case y:
|
|
39
39
|
return "Fragment";
|
|
40
|
-
case
|
|
40
|
+
case h:
|
|
41
41
|
return "Profiler";
|
|
42
|
-
case
|
|
42
|
+
case _:
|
|
43
43
|
return "StrictMode";
|
|
44
|
-
case
|
|
44
|
+
case E:
|
|
45
45
|
return "Suspense";
|
|
46
|
-
case
|
|
46
|
+
case T:
|
|
47
47
|
return "SuspenseList";
|
|
48
|
-
case
|
|
48
|
+
case W:
|
|
49
49
|
return "Activity";
|
|
50
50
|
}
|
|
51
|
-
if (typeof
|
|
52
|
-
switch (typeof
|
|
51
|
+
if (typeof d == "object")
|
|
52
|
+
switch (typeof d.tag == "number" && console.error(
|
|
53
53
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
54
|
-
),
|
|
54
|
+
), d.$$typeof) {
|
|
55
55
|
case S:
|
|
56
56
|
return "Portal";
|
|
57
|
-
case w:
|
|
58
|
-
return f.displayName || "Context";
|
|
59
57
|
case v:
|
|
60
|
-
return
|
|
61
|
-
case
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
return
|
|
66
|
-
case
|
|
67
|
-
|
|
58
|
+
return d.displayName || "Context";
|
|
59
|
+
case p:
|
|
60
|
+
return (d._context.displayName || "Context") + ".Consumer";
|
|
61
|
+
case R:
|
|
62
|
+
var C = d.render;
|
|
63
|
+
return d = d.displayName, d || (d = C.displayName || C.name || "", d = d !== "" ? "ForwardRef(" + d + ")" : "ForwardRef"), d;
|
|
64
|
+
case k:
|
|
65
|
+
return C = d.displayName || null, C !== null ? C : n(d.type) || "Memo";
|
|
66
|
+
case P:
|
|
67
|
+
C = d._payload, d = d._init;
|
|
68
68
|
try {
|
|
69
|
-
return n(
|
|
69
|
+
return n(d(C));
|
|
70
70
|
} catch {
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
return null;
|
|
74
74
|
}
|
|
75
|
-
function e(
|
|
76
|
-
return "" +
|
|
75
|
+
function e(d) {
|
|
76
|
+
return "" + d;
|
|
77
77
|
}
|
|
78
|
-
function t(
|
|
78
|
+
function t(d) {
|
|
79
79
|
try {
|
|
80
|
-
e(
|
|
81
|
-
var
|
|
80
|
+
e(d);
|
|
81
|
+
var C = !1;
|
|
82
82
|
} catch {
|
|
83
|
-
|
|
83
|
+
C = !0;
|
|
84
84
|
}
|
|
85
|
-
if (
|
|
86
|
-
|
|
87
|
-
var
|
|
88
|
-
return
|
|
89
|
-
|
|
85
|
+
if (C) {
|
|
86
|
+
C = console;
|
|
87
|
+
var L = C.error, V = typeof Symbol == "function" && Symbol.toStringTag && d[Symbol.toStringTag] || d.constructor.name || "Object";
|
|
88
|
+
return L.call(
|
|
89
|
+
C,
|
|
90
90
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
91
|
-
|
|
92
|
-
), e(
|
|
91
|
+
V
|
|
92
|
+
), e(d);
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
|
-
function r(
|
|
96
|
-
if (
|
|
97
|
-
if (typeof
|
|
95
|
+
function r(d) {
|
|
96
|
+
if (d === y) return "<>";
|
|
97
|
+
if (typeof d == "object" && d !== null && d.$$typeof === P)
|
|
98
98
|
return "<...>";
|
|
99
99
|
try {
|
|
100
|
-
var
|
|
101
|
-
return
|
|
100
|
+
var C = n(d);
|
|
101
|
+
return C ? "<" + C + ">" : "<...>";
|
|
102
102
|
} catch {
|
|
103
103
|
return "<...>";
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
function s() {
|
|
107
|
-
var
|
|
108
|
-
return
|
|
107
|
+
var d = Q.A;
|
|
108
|
+
return d === null ? null : d.getOwner();
|
|
109
109
|
}
|
|
110
110
|
function o() {
|
|
111
111
|
return Error("react-stack-top-frame");
|
|
112
112
|
}
|
|
113
|
-
function i(
|
|
114
|
-
if (
|
|
115
|
-
var
|
|
116
|
-
if (
|
|
113
|
+
function i(d) {
|
|
114
|
+
if ($.call(d, "key")) {
|
|
115
|
+
var C = Object.getOwnPropertyDescriptor(d, "key").get;
|
|
116
|
+
if (C && C.isReactWarning) return !1;
|
|
117
117
|
}
|
|
118
|
-
return
|
|
118
|
+
return d.key !== void 0;
|
|
119
119
|
}
|
|
120
|
-
function c(
|
|
121
|
-
function
|
|
122
|
-
|
|
120
|
+
function c(d, C) {
|
|
121
|
+
function L() {
|
|
122
|
+
A || (A = !0, console.error(
|
|
123
123
|
"%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)",
|
|
124
|
-
|
|
124
|
+
C
|
|
125
125
|
));
|
|
126
126
|
}
|
|
127
|
-
|
|
128
|
-
get:
|
|
127
|
+
L.isReactWarning = !0, Object.defineProperty(d, "key", {
|
|
128
|
+
get: L,
|
|
129
129
|
configurable: !0
|
|
130
130
|
});
|
|
131
131
|
}
|
|
132
132
|
function a() {
|
|
133
|
-
var
|
|
134
|
-
return M[
|
|
133
|
+
var d = n(this.type);
|
|
134
|
+
return M[d] || (M[d] = !0, console.error(
|
|
135
135
|
"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."
|
|
136
|
-
)),
|
|
136
|
+
)), d = this.props.ref, d !== void 0 ? d : null;
|
|
137
137
|
}
|
|
138
|
-
function u(
|
|
139
|
-
var
|
|
140
|
-
return
|
|
141
|
-
$$typeof:
|
|
142
|
-
type:
|
|
143
|
-
key:
|
|
144
|
-
props:
|
|
145
|
-
_owner:
|
|
146
|
-
}, (
|
|
138
|
+
function u(d, C, L, V, ue, N) {
|
|
139
|
+
var j = L.ref;
|
|
140
|
+
return d = {
|
|
141
|
+
$$typeof: w,
|
|
142
|
+
type: d,
|
|
143
|
+
key: C,
|
|
144
|
+
props: L,
|
|
145
|
+
_owner: V
|
|
146
|
+
}, (j !== void 0 ? j : null) !== null ? Object.defineProperty(d, "ref", {
|
|
147
147
|
enumerable: !1,
|
|
148
148
|
get: a
|
|
149
|
-
}) : Object.defineProperty(
|
|
149
|
+
}) : Object.defineProperty(d, "ref", { enumerable: !1, value: null }), d._store = {}, Object.defineProperty(d._store, "validated", {
|
|
150
150
|
configurable: !1,
|
|
151
151
|
enumerable: !1,
|
|
152
152
|
writable: !0,
|
|
153
153
|
value: 0
|
|
154
|
-
}), Object.defineProperty(
|
|
154
|
+
}), Object.defineProperty(d, "_debugInfo", {
|
|
155
155
|
configurable: !1,
|
|
156
156
|
enumerable: !1,
|
|
157
157
|
writable: !0,
|
|
158
158
|
value: null
|
|
159
|
-
}), Object.defineProperty(
|
|
159
|
+
}), Object.defineProperty(d, "_debugStack", {
|
|
160
160
|
configurable: !1,
|
|
161
161
|
enumerable: !1,
|
|
162
162
|
writable: !0,
|
|
163
|
-
value:
|
|
164
|
-
}), Object.defineProperty(
|
|
163
|
+
value: ue
|
|
164
|
+
}), Object.defineProperty(d, "_debugTask", {
|
|
165
165
|
configurable: !1,
|
|
166
166
|
enumerable: !1,
|
|
167
167
|
writable: !0,
|
|
168
|
-
value:
|
|
169
|
-
}), Object.freeze && (Object.freeze(
|
|
168
|
+
value: N
|
|
169
|
+
}), Object.freeze && (Object.freeze(d.props), Object.freeze(d)), d;
|
|
170
170
|
}
|
|
171
|
-
function l(
|
|
172
|
-
var
|
|
173
|
-
if (
|
|
174
|
-
if (
|
|
175
|
-
if (
|
|
176
|
-
for (
|
|
177
|
-
|
|
178
|
-
Object.freeze && Object.freeze(
|
|
171
|
+
function l(d, C, L, V, ue, N) {
|
|
172
|
+
var j = C.children;
|
|
173
|
+
if (j !== void 0)
|
|
174
|
+
if (V)
|
|
175
|
+
if (ne(j)) {
|
|
176
|
+
for (V = 0; V < j.length; V++)
|
|
177
|
+
m(j[V]);
|
|
178
|
+
Object.freeze && Object.freeze(j);
|
|
179
179
|
} else
|
|
180
180
|
console.error(
|
|
181
181
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
182
182
|
);
|
|
183
|
-
else
|
|
184
|
-
if (
|
|
185
|
-
|
|
186
|
-
var
|
|
187
|
-
return
|
|
183
|
+
else m(j);
|
|
184
|
+
if ($.call(C, "key")) {
|
|
185
|
+
j = n(d);
|
|
186
|
+
var O = Object.keys(C).filter(function(D) {
|
|
187
|
+
return D !== "key";
|
|
188
188
|
});
|
|
189
|
-
|
|
189
|
+
V = 0 < O.length ? "{key: someKey, " + O.join(": ..., ") + ": ...}" : "{key: someKey}", J[j + V] || (O = 0 < O.length ? "{" + O.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
190
190
|
`A props object containing a "key" prop is being spread into JSX:
|
|
191
191
|
let props = %s;
|
|
192
192
|
<%s {...props} />
|
|
193
193
|
React keys must be passed directly to JSX without using spread:
|
|
194
194
|
let props = %s;
|
|
195
195
|
<%s key={someKey} {...props} />`,
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
),
|
|
196
|
+
V,
|
|
197
|
+
j,
|
|
198
|
+
O,
|
|
199
|
+
j
|
|
200
|
+
), J[j + V] = !0);
|
|
201
201
|
}
|
|
202
|
-
if (
|
|
203
|
-
|
|
204
|
-
for (var
|
|
205
|
-
|
|
206
|
-
} else
|
|
207
|
-
return
|
|
208
|
-
|
|
209
|
-
typeof
|
|
202
|
+
if (j = null, L !== void 0 && (t(L), j = "" + L), i(C) && (t(C.key), j = "" + C.key), "key" in C) {
|
|
203
|
+
L = {};
|
|
204
|
+
for (var I in C)
|
|
205
|
+
I !== "key" && (L[I] = C[I]);
|
|
206
|
+
} else L = C;
|
|
207
|
+
return j && c(
|
|
208
|
+
L,
|
|
209
|
+
typeof d == "function" ? d.displayName || d.name || "Unknown" : d
|
|
210
210
|
), u(
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
211
|
+
d,
|
|
212
|
+
j,
|
|
213
|
+
L,
|
|
214
214
|
s(),
|
|
215
|
-
|
|
216
|
-
|
|
215
|
+
ue,
|
|
216
|
+
N
|
|
217
217
|
);
|
|
218
218
|
}
|
|
219
|
-
function
|
|
220
|
-
d
|
|
219
|
+
function m(d) {
|
|
220
|
+
f(d) ? d._store && (d._store.validated = 1) : typeof d == "object" && d !== null && d.$$typeof === P && (d._payload.status === "fulfilled" ? f(d._payload.value) && d._payload.value._store && (d._payload.value._store.validated = 1) : d._store && (d._store.validated = 1));
|
|
221
221
|
}
|
|
222
|
-
function d
|
|
223
|
-
return typeof
|
|
222
|
+
function f(d) {
|
|
223
|
+
return typeof d == "object" && d !== null && d.$$typeof === w;
|
|
224
224
|
}
|
|
225
|
-
var
|
|
225
|
+
var g = tt, w = Symbol.for("react.transitional.element"), S = Symbol.for("react.portal"), y = Symbol.for("react.fragment"), _ = Symbol.for("react.strict_mode"), h = Symbol.for("react.profiler"), p = Symbol.for("react.consumer"), v = Symbol.for("react.context"), R = Symbol.for("react.forward_ref"), E = Symbol.for("react.suspense"), T = Symbol.for("react.suspense_list"), k = Symbol.for("react.memo"), P = Symbol.for("react.lazy"), W = Symbol.for("react.activity"), U = Symbol.for("react.client.reference"), Q = g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, $ = Object.prototype.hasOwnProperty, ne = Array.isArray, Y = console.createTask ? console.createTask : function() {
|
|
226
226
|
return null;
|
|
227
227
|
};
|
|
228
|
-
|
|
229
|
-
react_stack_bottom_frame: function(
|
|
230
|
-
return
|
|
228
|
+
g = {
|
|
229
|
+
react_stack_bottom_frame: function(d) {
|
|
230
|
+
return d();
|
|
231
231
|
}
|
|
232
232
|
};
|
|
233
|
-
var
|
|
234
|
-
|
|
233
|
+
var A, M = {}, K = g.react_stack_bottom_frame.bind(
|
|
234
|
+
g,
|
|
235
235
|
o
|
|
236
|
-
)(),
|
|
237
|
-
Ot.Fragment =
|
|
238
|
-
var
|
|
236
|
+
)(), q = Y(r(o)), J = {};
|
|
237
|
+
Ot.Fragment = y, Ot.jsx = function(d, C, L) {
|
|
238
|
+
var V = 1e4 > Q.recentlyCreatedOwnerStacks++;
|
|
239
239
|
return l(
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
240
|
+
d,
|
|
241
|
+
C,
|
|
242
|
+
L,
|
|
243
243
|
!1,
|
|
244
|
-
|
|
245
|
-
|
|
244
|
+
V ? Error("react-stack-top-frame") : K,
|
|
245
|
+
V ? Y(r(d)) : q
|
|
246
246
|
);
|
|
247
|
-
}, Ot.jsxs = function(
|
|
248
|
-
var
|
|
247
|
+
}, Ot.jsxs = function(d, C, L) {
|
|
248
|
+
var V = 1e4 > Q.recentlyCreatedOwnerStacks++;
|
|
249
249
|
return l(
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
250
|
+
d,
|
|
251
|
+
C,
|
|
252
|
+
L,
|
|
253
253
|
!0,
|
|
254
|
-
|
|
255
|
-
|
|
254
|
+
V ? Error("react-stack-top-frame") : K,
|
|
255
|
+
V ? Y(r(d)) : q
|
|
256
256
|
);
|
|
257
257
|
};
|
|
258
258
|
})()), Ot;
|
|
259
259
|
}
|
|
260
260
|
var Cn;
|
|
261
261
|
function jr() {
|
|
262
|
-
return Cn || (Cn = 1, process.env.NODE_ENV === "production" ?
|
|
262
|
+
return Cn || (Cn = 1, process.env.NODE_ENV === "production" ? jt.exports = Wr() : jt.exports = zr()), jt.exports;
|
|
263
263
|
}
|
|
264
|
-
var
|
|
265
|
-
const
|
|
264
|
+
var x = jr();
|
|
265
|
+
const on = {
|
|
266
266
|
trace: 0,
|
|
267
267
|
debug: 1,
|
|
268
268
|
info: 2,
|
|
@@ -276,7 +276,7 @@ const sn = {
|
|
|
276
276
|
"warn",
|
|
277
277
|
"error"
|
|
278
278
|
];
|
|
279
|
-
var Vr = class
|
|
279
|
+
var Vr = class tr {
|
|
280
280
|
s;
|
|
281
281
|
ls = /* @__PURE__ */ new Map();
|
|
282
282
|
lvl;
|
|
@@ -299,7 +299,7 @@ var Vr = class er {
|
|
|
299
299
|
Fr.forEach((e) => {
|
|
300
300
|
const t = this.e.bind(this.c, e, this.n);
|
|
301
301
|
Object.defineProperty(this, e, {
|
|
302
|
-
get: () =>
|
|
302
|
+
get: () => on[e] >= on[this.currentLevel()] ? t : this.noop,
|
|
303
303
|
configurable: !0
|
|
304
304
|
});
|
|
305
305
|
});
|
|
@@ -310,7 +310,7 @@ var Vr = class er {
|
|
|
310
310
|
currentLevel() {
|
|
311
311
|
if (this.lvl) return this.lvl;
|
|
312
312
|
const e = this.s.get(this.storageKey());
|
|
313
|
-
return e && e in
|
|
313
|
+
return e && e in on ? (this.lvl = e, this.lvl) : this.def ? this.def : this.r ? this.r.currentLevel() : "trace";
|
|
314
314
|
}
|
|
315
315
|
setLevel(e) {
|
|
316
316
|
return this.lvl = e, this.s.set(this.storageKey(), e), this;
|
|
@@ -324,8 +324,8 @@ var Vr = class er {
|
|
|
324
324
|
getLogger(e) {
|
|
325
325
|
if (!e) throw new Error("Logger name required");
|
|
326
326
|
if (!this.ls.has(e)) {
|
|
327
|
-
const t = new
|
|
328
|
-
this.ls.set(e,
|
|
327
|
+
const t = new tr(this.s, this.e, e, this.r || this);
|
|
328
|
+
this.ls.set(e, nr(t));
|
|
329
329
|
}
|
|
330
330
|
return this.ls.get(e);
|
|
331
331
|
}
|
|
@@ -339,7 +339,7 @@ var Vr = class er {
|
|
|
339
339
|
this.c = e, this.bindMethods();
|
|
340
340
|
}
|
|
341
341
|
};
|
|
342
|
-
function
|
|
342
|
+
function nr(n) {
|
|
343
343
|
return new Proxy(n, { get(e, t, r) {
|
|
344
344
|
if (t in e) return Reflect.get(e, t, r);
|
|
345
345
|
const s = e.c[t];
|
|
@@ -374,20 +374,20 @@ const $r = {
|
|
|
374
374
|
}, Hr = { bind(n, e, t) {
|
|
375
375
|
const r = t ? `${Tn[e]} ${String(t)}:` : `${Tn[e]}`;
|
|
376
376
|
return (n[e] || n.log).bind(n, `%c${r}%c`, `color: ${$r[e]}; font-weight: bold;`, "color: inherit");
|
|
377
|
-
} },
|
|
377
|
+
} }, Qe = nr(new Vr(new Ur(), Hr));
|
|
378
378
|
function Br(n) {
|
|
379
379
|
let {
|
|
380
380
|
editorData: e = [],
|
|
381
381
|
effects: t = {},
|
|
382
|
-
scale: r =
|
|
382
|
+
scale: r = Yt,
|
|
383
383
|
scaleSplitCount: s = Qn,
|
|
384
|
-
scaleWidth: o =
|
|
385
|
-
startLeft: i =
|
|
384
|
+
scaleWidth: o = Gt,
|
|
385
|
+
startLeft: i = en,
|
|
386
386
|
minScaleCount: c,
|
|
387
387
|
maxScaleCount: a = 1 / 0,
|
|
388
388
|
rowHeight: u = En
|
|
389
389
|
} = n;
|
|
390
|
-
r <= 0 && (
|
|
390
|
+
r <= 0 && (Qe.error("Error: scale must be greater than 0!"), r = Yt), s <= 0 && (Qe.warn("Warning: scaleSplitCount cannot be less than 1!"), s = 1), o <= 0 && (Qe.warn("Warning: scaleWidth must be greater than 0!"), o = Gt), i < 0 && (Qe.warn("Warning: startLeft cannot be less than 0!"), i = 0), c && typeof c == "number" && (c < 1 && (Qe.warn("Warning: minScaleCount must be greater than 1!"), c = Mr), c = parseInt(c + ""), a < c && (Qe.warn("Warning: maxScaleCount cannot be less than minScaleCount!"), a = c)), a = a === 1 / 0 ? 1 / 0 : parseInt(a + ""), u <= 0 && (Qe.warn("Warning: rowHeight must be greater than 0!"), u = En);
|
|
391
391
|
const l = {
|
|
392
392
|
...n
|
|
393
393
|
};
|
|
@@ -404,7 +404,7 @@ function Br(n) {
|
|
|
404
404
|
rowHeight: u
|
|
405
405
|
};
|
|
406
406
|
}
|
|
407
|
-
function
|
|
407
|
+
function Xr(n) {
|
|
408
408
|
for (var e = [], t = 1; t < arguments.length; t++)
|
|
409
409
|
e[t - 1] = arguments[t];
|
|
410
410
|
return e.map(function(r) {
|
|
@@ -413,25 +413,25 @@ function Yr(n) {
|
|
|
413
413
|
}).join(" ");
|
|
414
414
|
}).join(" ");
|
|
415
415
|
}
|
|
416
|
-
function
|
|
417
|
-
return
|
|
416
|
+
function pe(...n) {
|
|
417
|
+
return Xr(`${hn}-`, ...n);
|
|
418
418
|
}
|
|
419
|
-
var
|
|
419
|
+
var Ft = { exports: {} }, cn = {};
|
|
420
420
|
var An;
|
|
421
|
-
function
|
|
422
|
-
if (An) return
|
|
421
|
+
function Yr() {
|
|
422
|
+
if (An) return cn;
|
|
423
423
|
An = 1;
|
|
424
|
-
var n =
|
|
425
|
-
return
|
|
424
|
+
var n = tt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
425
|
+
return cn.c = function(e) {
|
|
426
426
|
return n.H.useMemoCache(e);
|
|
427
|
-
},
|
|
427
|
+
}, cn;
|
|
428
428
|
}
|
|
429
|
-
var
|
|
429
|
+
var an = {};
|
|
430
430
|
var Pn;
|
|
431
431
|
function Gr() {
|
|
432
432
|
return Pn || (Pn = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
433
|
-
var n =
|
|
434
|
-
|
|
433
|
+
var n = tt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
434
|
+
an.c = function(e) {
|
|
435
435
|
var t = n.H;
|
|
436
436
|
return t === null && console.error(
|
|
437
437
|
`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
@@ -441,15 +441,15 @@ function Gr() {
|
|
|
441
441
|
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`
|
|
442
442
|
), t.useMemoCache(e);
|
|
443
443
|
};
|
|
444
|
-
})()),
|
|
444
|
+
})()), an;
|
|
445
445
|
}
|
|
446
446
|
var Dn;
|
|
447
447
|
function Kr() {
|
|
448
|
-
return Dn || (Dn = 1, process.env.NODE_ENV === "production" ?
|
|
448
|
+
return Dn || (Dn = 1, process.env.NODE_ENV === "production" ? Ft.exports = Yr() : Ft.exports = Gr()), Ft.exports;
|
|
449
449
|
}
|
|
450
|
-
var
|
|
450
|
+
var Le = Kr();
|
|
451
451
|
const qr = (n) => {
|
|
452
|
-
const e =
|
|
452
|
+
const e = Le.c(11), {
|
|
453
453
|
isMoving: t,
|
|
454
454
|
movePositions: r,
|
|
455
455
|
assistPositions: s
|
|
@@ -460,78 +460,78 @@ const qr = (n) => {
|
|
|
460
460
|
let u;
|
|
461
461
|
e[5] !== s ? (u = s === void 0 ? [] : s, e[5] = s, e[6] = u) : u = e[6];
|
|
462
462
|
const l = u;
|
|
463
|
-
e[7] === Symbol.for("react.memo_cache_sentinel") ? (o =
|
|
463
|
+
e[7] === Symbol.for("react.memo_cache_sentinel") ? (o = pe("snap-line-container"), e[7] = o) : o = e[7], i = t && a.filter((m) => l.includes(m)).map(Jr), e[0] = t, e[1] = r, e[2] = s, e[3] = o, e[4] = i;
|
|
464
464
|
} else
|
|
465
465
|
o = e[3], i = e[4];
|
|
466
466
|
let c;
|
|
467
|
-
return e[8] !== o || e[9] !== i ? (c = /* @__PURE__ */
|
|
467
|
+
return e[8] !== o || e[9] !== i ? (c = /* @__PURE__ */ x.jsx("div", { className: o, children: i }), e[8] = o, e[9] = i, e[10] = c) : c = e[10], c;
|
|
468
468
|
};
|
|
469
469
|
function Jr(n, e) {
|
|
470
|
-
return /* @__PURE__ */
|
|
470
|
+
return /* @__PURE__ */ x.jsx("div", { className: pe("snap-line"), style: {
|
|
471
471
|
left: n
|
|
472
472
|
} }, e);
|
|
473
473
|
}
|
|
474
|
-
const
|
|
474
|
+
const Vt = 1, Ln = 10, On = 10;
|
|
475
475
|
function Zr(n) {
|
|
476
|
-
const e =
|
|
476
|
+
const e = Le.c(7), t = te(Number.MIN_SAFE_INTEGER), r = te(Number.MAX_SAFE_INTEGER), s = te(Vt), o = te(void 0);
|
|
477
477
|
let i;
|
|
478
478
|
e[0] !== n ? (i = () => {
|
|
479
479
|
if (n?.current) {
|
|
480
480
|
const {
|
|
481
481
|
left: S,
|
|
482
|
-
width:
|
|
482
|
+
width: y
|
|
483
483
|
} = n.current.getBoundingClientRect();
|
|
484
|
-
t.current = S, r.current = S +
|
|
484
|
+
t.current = S, r.current = S + y;
|
|
485
485
|
}
|
|
486
486
|
}, e[0] = n, e[1] = i) : i = e[1];
|
|
487
487
|
const c = i;
|
|
488
488
|
let a;
|
|
489
|
-
e[2] === Symbol.for("react.memo_cache_sentinel") ? (a = (S,
|
|
489
|
+
e[2] === Symbol.for("react.memo_cache_sentinel") ? (a = (S, y) => {
|
|
490
490
|
if (S.clientX >= r.current || S.clientX <= t.current) {
|
|
491
491
|
o.current !== void 0 && cancelAnimationFrame(o.current);
|
|
492
|
-
const
|
|
493
|
-
s.current = Math.min(Number((
|
|
494
|
-
const
|
|
495
|
-
|
|
492
|
+
const _ = Math.abs(S.clientX >= r.current ? S.clientX - r.current : S.clientX - t.current);
|
|
493
|
+
s.current = Math.min(Number((_ / On).toFixed(0)) * Vt, Ln);
|
|
494
|
+
const p = (S.clientX >= r.current ? 1 : -1) * s.current, v = () => {
|
|
495
|
+
y && y(p), o.current = requestAnimationFrame(v);
|
|
496
496
|
};
|
|
497
|
-
return o.current = requestAnimationFrame(
|
|
497
|
+
return o.current = requestAnimationFrame(v), !1;
|
|
498
498
|
} else
|
|
499
499
|
o.current !== void 0 && cancelAnimationFrame(o.current);
|
|
500
500
|
return !0;
|
|
501
501
|
}, e[2] = a) : a = e[2];
|
|
502
502
|
const u = a;
|
|
503
503
|
let l;
|
|
504
|
-
e[3] === Symbol.for("react.memo_cache_sentinel") ? (l = (S,
|
|
504
|
+
e[3] === Symbol.for("react.memo_cache_sentinel") ? (l = (S, y, _) => {
|
|
505
505
|
if (S.clientX >= r.current || S.clientX < t.current) {
|
|
506
506
|
o.current !== void 0 && cancelAnimationFrame(o.current);
|
|
507
|
-
const
|
|
508
|
-
s.current = Math.min(Number((
|
|
509
|
-
const
|
|
510
|
-
|
|
507
|
+
const h = Math.abs(S.clientX >= r.current ? S.clientX - r.current : S.clientX - t.current);
|
|
508
|
+
s.current = Math.min(Number((h / On).toFixed(0)) * Vt, Ln);
|
|
509
|
+
const v = (S.clientX >= r.current ? 1 : -1) * s.current, R = () => {
|
|
510
|
+
_ && _(v), o.current = requestAnimationFrame(R);
|
|
511
511
|
};
|
|
512
|
-
return o.current = requestAnimationFrame(
|
|
512
|
+
return o.current = requestAnimationFrame(R), !1;
|
|
513
513
|
} else
|
|
514
514
|
o.current !== void 0 && cancelAnimationFrame(o.current);
|
|
515
515
|
return !0;
|
|
516
516
|
}, e[3] = l) : l = e[3];
|
|
517
|
-
const
|
|
518
|
-
let
|
|
519
|
-
e[4] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
520
|
-
t.current = Number.MIN_SAFE_INTEGER, r.current = Number.MAX_SAFE_INTEGER, s.current =
|
|
521
|
-
}, e[4] =
|
|
522
|
-
const
|
|
523
|
-
let
|
|
524
|
-
return e[5] !== c ? (
|
|
517
|
+
const m = l;
|
|
518
|
+
let f;
|
|
519
|
+
e[4] === Symbol.for("react.memo_cache_sentinel") ? (f = () => {
|
|
520
|
+
t.current = Number.MIN_SAFE_INTEGER, r.current = Number.MAX_SAFE_INTEGER, s.current = Vt, o.current !== void 0 && cancelAnimationFrame(o.current);
|
|
521
|
+
}, e[4] = f) : f = e[4];
|
|
522
|
+
const g = f;
|
|
523
|
+
let w;
|
|
524
|
+
return e[5] !== c ? (w = {
|
|
525
525
|
initAutoScroll: c,
|
|
526
526
|
dealDragAutoScroll: u,
|
|
527
|
-
dealResizeAutoScroll:
|
|
528
|
-
stopAutoScroll:
|
|
529
|
-
}, e[5] = c, e[6] =
|
|
527
|
+
dealResizeAutoScroll: m,
|
|
528
|
+
stopAutoScroll: g
|
|
529
|
+
}, e[5] = c, e[6] = w) : w = e[6], w;
|
|
530
530
|
}
|
|
531
531
|
function Qr(n, e, t) {
|
|
532
532
|
return Math.max(e, Math.min(n, t));
|
|
533
533
|
}
|
|
534
|
-
const
|
|
534
|
+
const ge = {
|
|
535
535
|
toVector(n, e) {
|
|
536
536
|
return n === void 0 && (n = e), Array.isArray(n) ? n : [n, n];
|
|
537
537
|
},
|
|
@@ -572,7 +572,7 @@ function ns(n) {
|
|
|
572
572
|
var e = ts(n, "string");
|
|
573
573
|
return typeof e == "symbol" ? e : String(e);
|
|
574
574
|
}
|
|
575
|
-
function
|
|
575
|
+
function _e(n, e, t) {
|
|
576
576
|
return e = ns(e), e in n ? Object.defineProperty(n, e, {
|
|
577
577
|
value: t,
|
|
578
578
|
enumerable: !0,
|
|
@@ -590,18 +590,18 @@ function In(n, e) {
|
|
|
590
590
|
}
|
|
591
591
|
return t;
|
|
592
592
|
}
|
|
593
|
-
function
|
|
593
|
+
function Z(n) {
|
|
594
594
|
for (var e = 1; e < arguments.length; e++) {
|
|
595
595
|
var t = arguments[e] != null ? arguments[e] : {};
|
|
596
596
|
e % 2 ? In(Object(t), !0).forEach(function(r) {
|
|
597
|
-
|
|
597
|
+
_e(n, r, t[r]);
|
|
598
598
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(t)) : In(Object(t)).forEach(function(r) {
|
|
599
599
|
Object.defineProperty(n, r, Object.getOwnPropertyDescriptor(t, r));
|
|
600
600
|
});
|
|
601
601
|
}
|
|
602
602
|
return n;
|
|
603
603
|
}
|
|
604
|
-
const
|
|
604
|
+
const rr = {
|
|
605
605
|
pointer: {
|
|
606
606
|
start: "down",
|
|
607
607
|
change: "move",
|
|
@@ -631,7 +631,7 @@ function ss(n = !1, e) {
|
|
|
631
631
|
return n && !rs.includes(e);
|
|
632
632
|
}
|
|
633
633
|
function os(n, e = "", t = !1) {
|
|
634
|
-
const r =
|
|
634
|
+
const r = rr[n], s = r && r[e] || e;
|
|
635
635
|
return "on" + kn(n) + kn(s) + (ss(t, s) ? "Capture" : "");
|
|
636
636
|
}
|
|
637
637
|
const is = ["gotpointercapture", "lostpointercapture"];
|
|
@@ -647,14 +647,14 @@ function cs(n) {
|
|
|
647
647
|
};
|
|
648
648
|
}
|
|
649
649
|
function as(n, e = "") {
|
|
650
|
-
const t =
|
|
650
|
+
const t = rr[n], r = t && t[e] || e;
|
|
651
651
|
return n + r;
|
|
652
652
|
}
|
|
653
|
-
function
|
|
653
|
+
function tn(n) {
|
|
654
654
|
return "touches" in n;
|
|
655
655
|
}
|
|
656
|
-
function
|
|
657
|
-
return
|
|
656
|
+
function sr(n) {
|
|
657
|
+
return tn(n) ? "touch" : "pointerType" in n ? n.pointerType : "mouse";
|
|
658
658
|
}
|
|
659
659
|
function ls(n) {
|
|
660
660
|
return Array.from(n.touches).filter((e) => {
|
|
@@ -665,18 +665,18 @@ function ls(n) {
|
|
|
665
665
|
function us(n) {
|
|
666
666
|
return n.type === "touchend" || n.type === "touchcancel" ? n.changedTouches : n.targetTouches;
|
|
667
667
|
}
|
|
668
|
-
function
|
|
669
|
-
return
|
|
668
|
+
function or(n) {
|
|
669
|
+
return tn(n) ? us(n)[0] : n;
|
|
670
670
|
}
|
|
671
671
|
function fs(n) {
|
|
672
672
|
return ls(n).map((e) => e.identifier);
|
|
673
673
|
}
|
|
674
|
-
function
|
|
675
|
-
const e =
|
|
676
|
-
return
|
|
674
|
+
function ln(n) {
|
|
675
|
+
const e = or(n);
|
|
676
|
+
return tn(n) ? e.identifier : e.pointerId;
|
|
677
677
|
}
|
|
678
678
|
function Wn(n) {
|
|
679
|
-
const e =
|
|
679
|
+
const e = or(n);
|
|
680
680
|
return [e.clientX, e.clientY];
|
|
681
681
|
}
|
|
682
682
|
function ds(n) {
|
|
@@ -772,37 +772,37 @@ class gs {
|
|
|
772
772
|
t.args = this.args;
|
|
773
773
|
let o = 0;
|
|
774
774
|
if (e && (t.event = e, r.preventDefault && e.cancelable && t.event.preventDefault(), t.type = e.type, s.touches = this.ctrl.pointerIds.size || this.ctrl.touchIds.size, s.locked = !!document.pointerLockElement, Object.assign(s, ds(e)), s.down = s.pressed = s.buttons % 2 === 1 || s.touches > 0, o = e.timeStamp - t.timeStamp, t.timeStamp = e.timeStamp, t.elapsedTime = t.timeStamp - t.startTime), t._active) {
|
|
775
|
-
const
|
|
776
|
-
|
|
775
|
+
const E = t._delta.map(Math.abs);
|
|
776
|
+
ge.addTo(t._distance, E);
|
|
777
777
|
}
|
|
778
778
|
this.axisIntent && this.axisIntent(e);
|
|
779
779
|
const [i, c] = t._movement, [a, u] = r.threshold, {
|
|
780
780
|
_step: l,
|
|
781
|
-
values:
|
|
781
|
+
values: m
|
|
782
782
|
} = t;
|
|
783
|
-
if (r.hasCustomTransform ? (l[0] === !1 && (l[0] = Math.abs(i) >= a &&
|
|
784
|
-
const
|
|
783
|
+
if (r.hasCustomTransform ? (l[0] === !1 && (l[0] = Math.abs(i) >= a && m[0]), l[1] === !1 && (l[1] = Math.abs(c) >= u && m[1])) : (l[0] === !1 && (l[0] = Math.abs(i) >= a && Math.sign(i) * a), l[1] === !1 && (l[1] = Math.abs(c) >= u && Math.sign(c) * u)), t.intentional = l[0] !== !1 || l[1] !== !1, !t.intentional) return;
|
|
784
|
+
const f = [0, 0];
|
|
785
785
|
if (r.hasCustomTransform) {
|
|
786
|
-
const [
|
|
787
|
-
|
|
786
|
+
const [E, T] = m;
|
|
787
|
+
f[0] = l[0] !== !1 ? E - l[0] : 0, f[1] = l[1] !== !1 ? T - l[1] : 0;
|
|
788
788
|
} else
|
|
789
|
-
|
|
790
|
-
this.restrictToAxis && !t._blocked && this.restrictToAxis(
|
|
791
|
-
const
|
|
792
|
-
|
|
793
|
-
const [S,
|
|
794
|
-
t.overflow = [S <
|
|
795
|
-
const
|
|
796
|
-
if (t.offset = es(t._bounds, t.offset,
|
|
797
|
-
t.delta =
|
|
798
|
-
const
|
|
799
|
-
|
|
789
|
+
f[0] = l[0] !== !1 ? i - l[0] : 0, f[1] = l[1] !== !1 ? c - l[1] : 0;
|
|
790
|
+
this.restrictToAxis && !t._blocked && this.restrictToAxis(f);
|
|
791
|
+
const g = t.offset, w = t._active && !t._blocked || t.active;
|
|
792
|
+
w && (t.first = t._active && !t.active, t.last = !t._active && t.active, t.active = s[this.ingKey] = t._active, e && (t.first && ("bounds" in r && (t._bounds = qt(r.bounds, t)), this.setup && this.setup()), t.movement = f, this.computeOffset()));
|
|
793
|
+
const [S, y] = t.offset, [[_, h], [p, v]] = t._bounds;
|
|
794
|
+
t.overflow = [S < _ ? -1 : S > h ? 1 : 0, y < p ? -1 : y > v ? 1 : 0], t._movementBound[0] = t.overflow[0] ? t._movementBound[0] === !1 ? t._movement[0] : t._movementBound[0] : !1, t._movementBound[1] = t.overflow[1] ? t._movementBound[1] === !1 ? t._movement[1] : t._movementBound[1] : !1;
|
|
795
|
+
const R = t._active ? r.rubberband || [0, 0] : [0, 0];
|
|
796
|
+
if (t.offset = es(t._bounds, t.offset, R), t.delta = ge.sub(t.offset, g), this.computeMovement(), w && (!t.last || o > ps)) {
|
|
797
|
+
t.delta = ge.sub(t.offset, g);
|
|
798
|
+
const E = t.delta.map(Math.abs);
|
|
799
|
+
ge.addTo(t.distance, E), t.direction = t.delta.map(Math.sign), t._direction = t._delta.map(Math.sign), !t.first && o > 0 && (t.velocity = [E[0] / o, E[1] / o], t.timeDelta = o);
|
|
800
800
|
}
|
|
801
801
|
}
|
|
802
802
|
emit() {
|
|
803
803
|
const e = this.state, t = this.shared, r = this.config;
|
|
804
804
|
if (e._active || this.clean(), (e._blocked || !e.intentional) && !e._force && !r.triggerAllEvents) return;
|
|
805
|
-
const s = this.handler(
|
|
805
|
+
const s = this.handler(Z(Z(Z({}, t), e), {}, {
|
|
806
806
|
[this.aliasKey]: e.values
|
|
807
807
|
}));
|
|
808
808
|
s !== void 0 && (e.memo = s);
|
|
@@ -820,7 +820,7 @@ function vs([n, e], t) {
|
|
|
820
820
|
}
|
|
821
821
|
class bs extends gs {
|
|
822
822
|
constructor(...e) {
|
|
823
|
-
super(...e),
|
|
823
|
+
super(...e), _e(this, "aliasKey", "xy");
|
|
824
824
|
}
|
|
825
825
|
reset() {
|
|
826
826
|
super.reset(), this.state.axis = void 0;
|
|
@@ -829,15 +829,15 @@ class bs extends gs {
|
|
|
829
829
|
this.state.offset = [0, 0], this.state.lastOffset = [0, 0];
|
|
830
830
|
}
|
|
831
831
|
computeOffset() {
|
|
832
|
-
this.state.offset =
|
|
832
|
+
this.state.offset = ge.add(this.state.lastOffset, this.state.movement);
|
|
833
833
|
}
|
|
834
834
|
computeMovement() {
|
|
835
|
-
this.state.movement =
|
|
835
|
+
this.state.movement = ge.sub(this.state.offset, this.state.lastOffset);
|
|
836
836
|
}
|
|
837
837
|
axisIntent(e) {
|
|
838
838
|
const t = this.state, r = this.config;
|
|
839
839
|
if (!t.axis && e) {
|
|
840
|
-
const s = typeof r.axisThreshold == "object" ? r.axisThreshold[
|
|
840
|
+
const s = typeof r.axisThreshold == "object" ? r.axisThreshold[sr(e)] : r.axisThreshold;
|
|
841
841
|
t.axis = vs(t._movement, s);
|
|
842
842
|
}
|
|
843
843
|
t._blocked = (r.lockDirection || !!r.axis) && !t.axis || !!r.axis && r.axis !== t.axis;
|
|
@@ -859,7 +859,7 @@ const jn = (n) => n, Fn = 0.15, bn = {
|
|
|
859
859
|
return n;
|
|
860
860
|
},
|
|
861
861
|
eventOptions(n, e, t) {
|
|
862
|
-
return
|
|
862
|
+
return Z(Z({}, t.shared.eventOptions), n);
|
|
863
863
|
},
|
|
864
864
|
preventDefault(n = !1) {
|
|
865
865
|
return n;
|
|
@@ -874,12 +874,12 @@ const jn = (n) => n, Fn = 0.15, bn = {
|
|
|
874
874
|
case !1:
|
|
875
875
|
return [0, 0];
|
|
876
876
|
default:
|
|
877
|
-
return
|
|
877
|
+
return ge.toVector(n);
|
|
878
878
|
}
|
|
879
879
|
},
|
|
880
880
|
from(n) {
|
|
881
881
|
if (typeof n == "function") return n;
|
|
882
|
-
if (n != null) return
|
|
882
|
+
if (n != null) return ge.toVector(n);
|
|
883
883
|
},
|
|
884
884
|
transform(n, e, t) {
|
|
885
885
|
const r = n || t.shared.transform;
|
|
@@ -893,7 +893,7 @@ const jn = (n) => n, Fn = 0.15, bn = {
|
|
|
893
893
|
return r || jn;
|
|
894
894
|
},
|
|
895
895
|
threshold(n) {
|
|
896
|
-
return
|
|
896
|
+
return ge.toVector(n, 0);
|
|
897
897
|
}
|
|
898
898
|
};
|
|
899
899
|
process.env.NODE_ENV === "development" && Object.assign(bn, {
|
|
@@ -913,7 +913,7 @@ process.env.NODE_ENV === "development" && Object.assign(bn, {
|
|
|
913
913
|
return NaN;
|
|
914
914
|
}
|
|
915
915
|
});
|
|
916
|
-
const Ss = 0,
|
|
916
|
+
const Ss = 0, Nt = Z(Z({}, bn), {}, {
|
|
917
917
|
axis(n, e, {
|
|
918
918
|
axis: t
|
|
919
919
|
}) {
|
|
@@ -924,7 +924,7 @@ const Ss = 0, It = Q(Q({}, bn), {}, {
|
|
|
924
924
|
},
|
|
925
925
|
bounds(n = {}) {
|
|
926
926
|
if (typeof n == "function")
|
|
927
|
-
return (o) =>
|
|
927
|
+
return (o) => Nt.bounds(n(o));
|
|
928
928
|
if ("current" in n)
|
|
929
929
|
return () => n.current;
|
|
930
930
|
if (typeof HTMLElement == "function" && n instanceof HTMLElement)
|
|
@@ -945,7 +945,7 @@ const Ss = 0, It = Q(Q({}, bn), {}, {
|
|
|
945
945
|
};
|
|
946
946
|
class _s extends bs {
|
|
947
947
|
constructor(...e) {
|
|
948
|
-
super(...e),
|
|
948
|
+
super(...e), _e(this, "ingKey", "dragging");
|
|
949
949
|
}
|
|
950
950
|
reset() {
|
|
951
951
|
super.reset();
|
|
@@ -961,7 +961,7 @@ class _s extends bs {
|
|
|
961
961
|
top: t.top - r.top + e.offset[1],
|
|
962
962
|
bottom: t.bottom - r.bottom + e.offset[1]
|
|
963
963
|
};
|
|
964
|
-
e._bounds =
|
|
964
|
+
e._bounds = Nt.bounds(s);
|
|
965
965
|
}
|
|
966
966
|
}
|
|
967
967
|
cancel() {
|
|
@@ -980,7 +980,7 @@ class _s extends bs {
|
|
|
980
980
|
const t = this.config, r = this.state;
|
|
981
981
|
if (e.buttons != null && (Array.isArray(t.pointerButtons) ? !t.pointerButtons.includes(e.buttons) : t.pointerButtons !== -1 && t.pointerButtons !== e.buttons)) return;
|
|
982
982
|
const s = this.ctrl.setEventIds(e);
|
|
983
|
-
t.pointerCapture && e.target.setPointerCapture(e.pointerId), !(s && s.size > 1 && r._pointerActive) && (this.start(e), this.setupPointer(e), r._pointerId =
|
|
983
|
+
t.pointerCapture && e.target.setPointerCapture(e.pointerId), !(s && s.size > 1 && r._pointerActive) && (this.start(e), this.setupPointer(e), r._pointerId = ln(e), r._pointerActive = !0, this.computeValues(Wn(e)), this.computeInitial(), t.preventScrollAxis && sr(e) !== "mouse" ? (r._active = !1, this.setupScrollPrevention(e)) : t.delay > 0 ? (this.setupDelayTrigger(e), t.triggerAllEvents && (this.compute(e), this.emit())) : this.startPointerDrag(e));
|
|
984
984
|
}
|
|
985
985
|
startPointerDrag(e) {
|
|
986
986
|
const t = this.state;
|
|
@@ -989,10 +989,10 @@ class _s extends bs {
|
|
|
989
989
|
pointerMove(e) {
|
|
990
990
|
const t = this.state, r = this.config;
|
|
991
991
|
if (!t._pointerActive) return;
|
|
992
|
-
const s =
|
|
992
|
+
const s = ln(e);
|
|
993
993
|
if (t._pointerId !== void 0 && s !== t._pointerId) return;
|
|
994
994
|
const o = Wn(e);
|
|
995
|
-
if (document.pointerLockElement === e.target ? t._delta = [e.movementX, e.movementY] : (t._delta =
|
|
995
|
+
if (document.pointerLockElement === e.target ? t._delta = [e.movementX, e.movementY] : (t._delta = ge.sub(o, t._values), this.computeValues(o)), ge.addTo(t._movement, t._delta), this.compute(e), t._delayed && t.intentional) {
|
|
996
996
|
this.timeoutStore.remove("dragDelay"), t.active = !1, this.startPointerDrag(e);
|
|
997
997
|
return;
|
|
998
998
|
}
|
|
@@ -1018,17 +1018,17 @@ class _s extends bs {
|
|
|
1018
1018
|
}
|
|
1019
1019
|
const t = this.state, r = this.config;
|
|
1020
1020
|
if (!t._active || !t._pointerActive) return;
|
|
1021
|
-
const s =
|
|
1021
|
+
const s = ln(e);
|
|
1022
1022
|
if (t._pointerId !== void 0 && s !== t._pointerId) return;
|
|
1023
1023
|
this.state._pointerActive = !1, this.setActive(), this.compute(e);
|
|
1024
1024
|
const [o, i] = t._distance;
|
|
1025
1025
|
if (t.tap = o <= r.tapsThreshold && i <= r.tapsThreshold, t.tap && r.filterTaps)
|
|
1026
1026
|
t._force = !0;
|
|
1027
1027
|
else {
|
|
1028
|
-
const [c, a] = t._delta, [u, l] = t._movement, [
|
|
1028
|
+
const [c, a] = t._delta, [u, l] = t._movement, [m, f] = r.swipe.velocity, [g, w] = r.swipe.distance, S = r.swipe.duration;
|
|
1029
1029
|
if (t.elapsedTime < S) {
|
|
1030
|
-
const
|
|
1031
|
-
|
|
1030
|
+
const y = Math.abs(c / t.timeDelta), _ = Math.abs(a / t.timeDelta);
|
|
1031
|
+
y > m && Math.abs(u) > g && (t.swipe[0] = Math.sign(c)), _ > f && Math.abs(l) > w && (t.swipe[1] = Math.sign(a));
|
|
1032
1032
|
}
|
|
1033
1033
|
}
|
|
1034
1034
|
this.emit();
|
|
@@ -1070,7 +1070,7 @@ class _s extends bs {
|
|
|
1070
1070
|
const t = Vn[e.key];
|
|
1071
1071
|
if (t) {
|
|
1072
1072
|
const r = this.state, s = e.shiftKey ? 10 : e.altKey ? 0.1 : 1;
|
|
1073
|
-
this.start(e), r._delta = t(this.config.keyboardDisplacement, s), r._keyboardActive = !0,
|
|
1073
|
+
this.start(e), r._delta = t(this.config.keyboardDisplacement, s), r._keyboardActive = !0, ge.addTo(r._movement, r._delta), this.compute(e), this.emit();
|
|
1074
1074
|
}
|
|
1075
1075
|
}
|
|
1076
1076
|
keyUp(e) {
|
|
@@ -1087,38 +1087,38 @@ class _s extends bs {
|
|
|
1087
1087
|
function ws(n) {
|
|
1088
1088
|
"persist" in n && typeof n.persist == "function" && n.persist();
|
|
1089
1089
|
}
|
|
1090
|
-
const
|
|
1091
|
-
function
|
|
1092
|
-
return
|
|
1090
|
+
const It = typeof window < "u" && window.document && window.document.createElement;
|
|
1091
|
+
function ir() {
|
|
1092
|
+
return It && "ontouchstart" in window;
|
|
1093
1093
|
}
|
|
1094
1094
|
function Es() {
|
|
1095
|
-
return
|
|
1095
|
+
return ir() || It && window.navigator.maxTouchPoints > 1;
|
|
1096
1096
|
}
|
|
1097
1097
|
function ys() {
|
|
1098
|
-
return
|
|
1099
|
-
}
|
|
1100
|
-
function Rs() {
|
|
1101
|
-
return kt && "exitPointerLock" in window.document;
|
|
1098
|
+
return It && "onpointerdown" in window;
|
|
1102
1099
|
}
|
|
1103
1100
|
function xs() {
|
|
1101
|
+
return It && "exitPointerLock" in window.document;
|
|
1102
|
+
}
|
|
1103
|
+
function Rs() {
|
|
1104
1104
|
try {
|
|
1105
1105
|
return "constructor" in GestureEvent;
|
|
1106
1106
|
} catch {
|
|
1107
1107
|
return !1;
|
|
1108
1108
|
}
|
|
1109
1109
|
}
|
|
1110
|
-
const
|
|
1111
|
-
isBrowser:
|
|
1112
|
-
gesture:
|
|
1113
|
-
touch:
|
|
1110
|
+
const xe = {
|
|
1111
|
+
isBrowser: It,
|
|
1112
|
+
gesture: Rs(),
|
|
1113
|
+
touch: ir(),
|
|
1114
1114
|
touchscreen: Es(),
|
|
1115
1115
|
pointer: ys(),
|
|
1116
|
-
pointerLock:
|
|
1116
|
+
pointerLock: xs()
|
|
1117
1117
|
}, Cs = 250, Ts = 180, As = 0.5, Ps = 50, Ds = 250, Ls = 10, Un = {
|
|
1118
1118
|
mouse: 0,
|
|
1119
1119
|
touch: 0,
|
|
1120
1120
|
pen: 8
|
|
1121
|
-
},
|
|
1121
|
+
}, cr = Z(Z({}, Nt), {}, {
|
|
1122
1122
|
device(n, e, {
|
|
1123
1123
|
pointer: {
|
|
1124
1124
|
touch: t = !1,
|
|
@@ -1126,12 +1126,12 @@ const we = {
|
|
|
1126
1126
|
mouse: s = !1
|
|
1127
1127
|
} = {}
|
|
1128
1128
|
}) {
|
|
1129
|
-
return this.pointerLock = r &&
|
|
1129
|
+
return this.pointerLock = r && xe.pointerLock, xe.touch && t ? "touch" : this.pointerLock ? "mouse" : xe.pointer && !s ? "pointer" : xe.touch ? "touch" : "mouse";
|
|
1130
1130
|
},
|
|
1131
1131
|
preventScrollAxis(n, e, {
|
|
1132
1132
|
preventScroll: t
|
|
1133
1133
|
}) {
|
|
1134
|
-
if (this.preventScrollDelay = typeof t == "number" ? t : t || t === void 0 && n ? Cs : void 0, !(!
|
|
1134
|
+
if (this.preventScrollDelay = typeof t == "number" ? t : t || t === void 0 && n ? Cs : void 0, !(!xe.touchscreen || t === !1))
|
|
1135
1135
|
return n || (t !== void 0 ? "y" : void 0);
|
|
1136
1136
|
},
|
|
1137
1137
|
pointerCapture(n, e, {
|
|
@@ -1148,7 +1148,7 @@ const we = {
|
|
|
1148
1148
|
tapsThreshold: r = 3,
|
|
1149
1149
|
axis: s = void 0
|
|
1150
1150
|
}) {
|
|
1151
|
-
const o =
|
|
1151
|
+
const o = ge.toVector(n, t ? r : s ? 1 : 0);
|
|
1152
1152
|
return this.filterTaps = t, this.tapsThreshold = r, o;
|
|
1153
1153
|
},
|
|
1154
1154
|
swipe({
|
|
@@ -1157,8 +1157,8 @@ const we = {
|
|
|
1157
1157
|
duration: t = Ds
|
|
1158
1158
|
} = {}) {
|
|
1159
1159
|
return {
|
|
1160
|
-
velocity: this.transform(
|
|
1161
|
-
distance: this.transform(
|
|
1160
|
+
velocity: this.transform(ge.toVector(n)),
|
|
1161
|
+
distance: this.transform(ge.toVector(e)),
|
|
1162
1162
|
duration: t
|
|
1163
1163
|
};
|
|
1164
1164
|
},
|
|
@@ -1173,13 +1173,13 @@ const we = {
|
|
|
1173
1173
|
}
|
|
1174
1174
|
},
|
|
1175
1175
|
axisThreshold(n) {
|
|
1176
|
-
return n ?
|
|
1176
|
+
return n ? Z(Z({}, Un), n) : Un;
|
|
1177
1177
|
},
|
|
1178
1178
|
keyboardDisplacement(n = Ls) {
|
|
1179
1179
|
return n;
|
|
1180
1180
|
}
|
|
1181
1181
|
});
|
|
1182
|
-
process.env.NODE_ENV === "development" && Object.assign(
|
|
1182
|
+
process.env.NODE_ENV === "development" && Object.assign(cr, {
|
|
1183
1183
|
useTouch(n) {
|
|
1184
1184
|
if (n !== void 0)
|
|
1185
1185
|
throw Error("[@use-gesture]: `useTouch` option has been renamed to `pointer.touch`. Use it as in `{ pointer: { touch: true } }`.");
|
|
@@ -1206,18 +1206,18 @@ process.env.NODE_ENV === "development" && Object.assign(ir, {
|
|
|
1206
1206
|
return NaN;
|
|
1207
1207
|
}
|
|
1208
1208
|
});
|
|
1209
|
-
|
|
1209
|
+
Z(Z({}, bn), {}, {
|
|
1210
1210
|
device(n, e, {
|
|
1211
1211
|
shared: t,
|
|
1212
1212
|
pointer: {
|
|
1213
1213
|
touch: r = !1
|
|
1214
1214
|
} = {}
|
|
1215
1215
|
}) {
|
|
1216
|
-
if (t.target && !
|
|
1217
|
-
if (
|
|
1218
|
-
if (
|
|
1219
|
-
if (
|
|
1220
|
-
if (
|
|
1216
|
+
if (t.target && !xe.touch && xe.gesture) return "gesture";
|
|
1217
|
+
if (xe.touch && r) return "touch";
|
|
1218
|
+
if (xe.touchscreen) {
|
|
1219
|
+
if (xe.pointer) return "pointer";
|
|
1220
|
+
if (xe.touch) return "touch";
|
|
1221
1221
|
}
|
|
1222
1222
|
},
|
|
1223
1223
|
bounds(n, e, {
|
|
@@ -1240,7 +1240,7 @@ Q(Q({}, bn), {}, {
|
|
|
1240
1240
|
return typeof t != "function" && typeof r != "function" ? [s(), o()] : (i) => [s(i), o(i)];
|
|
1241
1241
|
},
|
|
1242
1242
|
threshold(n, e, t) {
|
|
1243
|
-
return this.lockDirection = t.axis === "lock",
|
|
1243
|
+
return this.lockDirection = t.axis === "lock", ge.toVector(n, this.lockDirection ? [0.1, 3] : 0);
|
|
1244
1244
|
},
|
|
1245
1245
|
modifierKey(n) {
|
|
1246
1246
|
return n === void 0 ? "ctrlKey" : n;
|
|
@@ -1249,20 +1249,20 @@ Q(Q({}, bn), {}, {
|
|
|
1249
1249
|
return n;
|
|
1250
1250
|
}
|
|
1251
1251
|
});
|
|
1252
|
-
|
|
1252
|
+
Z(Z({}, Nt), {}, {
|
|
1253
1253
|
mouseOnly: (n = !0) => n
|
|
1254
1254
|
});
|
|
1255
|
-
|
|
1255
|
+
Z(Z({}, Nt), {}, {
|
|
1256
1256
|
mouseOnly: (n = !0) => n
|
|
1257
1257
|
});
|
|
1258
|
-
const
|
|
1258
|
+
const ar = /* @__PURE__ */ new Map(), pn = /* @__PURE__ */ new Map();
|
|
1259
1259
|
function Os(n) {
|
|
1260
|
-
|
|
1260
|
+
ar.set(n.key, n.engine), pn.set(n.key, n.resolver);
|
|
1261
1261
|
}
|
|
1262
1262
|
const Ms = {
|
|
1263
1263
|
key: "drag",
|
|
1264
1264
|
engine: _s,
|
|
1265
|
-
resolver:
|
|
1265
|
+
resolver: cr
|
|
1266
1266
|
};
|
|
1267
1267
|
function Ns(n, e) {
|
|
1268
1268
|
if (n == null) return {};
|
|
@@ -1289,7 +1289,7 @@ const ks = {
|
|
|
1289
1289
|
enabled(n = !0) {
|
|
1290
1290
|
return n;
|
|
1291
1291
|
},
|
|
1292
|
-
window(n =
|
|
1292
|
+
window(n = xe.isBrowser ? window : void 0) {
|
|
1293
1293
|
return n;
|
|
1294
1294
|
},
|
|
1295
1295
|
eventOptions({
|
|
@@ -1305,7 +1305,7 @@ const ks = {
|
|
|
1305
1305
|
return n;
|
|
1306
1306
|
}
|
|
1307
1307
|
}, Ws = ["target", "eventOptions", "window", "enabled", "transform"];
|
|
1308
|
-
function
|
|
1308
|
+
function $t(n = {}, e) {
|
|
1309
1309
|
const t = {};
|
|
1310
1310
|
for (const [r, s] of Object.entries(e))
|
|
1311
1311
|
switch (typeof s) {
|
|
@@ -1317,7 +1317,7 @@ function Ht(n = {}, e) {
|
|
|
1317
1317
|
t[r] = s.call(t, n[r], r, n);
|
|
1318
1318
|
break;
|
|
1319
1319
|
case "object":
|
|
1320
|
-
t[r] =
|
|
1320
|
+
t[r] = $t(n[r], s);
|
|
1321
1321
|
break;
|
|
1322
1322
|
case "boolean":
|
|
1323
1323
|
s && (t[r] = n[r]);
|
|
@@ -1333,7 +1333,7 @@ function zs(n, e, t = {}) {
|
|
|
1333
1333
|
enabled: c,
|
|
1334
1334
|
transform: a
|
|
1335
1335
|
} = r, u = Is(r, Ws);
|
|
1336
|
-
if (t.shared =
|
|
1336
|
+
if (t.shared = $t({
|
|
1337
1337
|
target: s,
|
|
1338
1338
|
eventOptions: o,
|
|
1339
1339
|
window: i,
|
|
@@ -1341,16 +1341,16 @@ function zs(n, e, t = {}) {
|
|
|
1341
1341
|
transform: a
|
|
1342
1342
|
}, ks), e) {
|
|
1343
1343
|
const l = pn.get(e);
|
|
1344
|
-
t[e] =
|
|
1344
|
+
t[e] = $t(Z({
|
|
1345
1345
|
shared: t.shared
|
|
1346
1346
|
}, u), l);
|
|
1347
1347
|
} else
|
|
1348
1348
|
for (const l in u) {
|
|
1349
|
-
const
|
|
1350
|
-
if (
|
|
1351
|
-
t[l] =
|
|
1349
|
+
const m = pn.get(l);
|
|
1350
|
+
if (m)
|
|
1351
|
+
t[l] = $t(Z({
|
|
1352
1352
|
shared: t.shared
|
|
1353
|
-
}, u[l]),
|
|
1353
|
+
}, u[l]), m);
|
|
1354
1354
|
else if (process.env.NODE_ENV === "development" && !["drag", "pinch", "scroll", "wheel", "move", "hover"].includes(l)) {
|
|
1355
1355
|
if (l === "domTarget")
|
|
1356
1356
|
throw Error("[@use-gesture]: `domTarget` option has been renamed to `target`.");
|
|
@@ -1359,12 +1359,12 @@ function zs(n, e, t = {}) {
|
|
|
1359
1359
|
}
|
|
1360
1360
|
return t;
|
|
1361
1361
|
}
|
|
1362
|
-
class
|
|
1362
|
+
class lr {
|
|
1363
1363
|
constructor(e, t) {
|
|
1364
|
-
|
|
1364
|
+
_e(this, "_listeners", /* @__PURE__ */ new Set()), this._ctrl = e, this._gestureKey = t;
|
|
1365
1365
|
}
|
|
1366
1366
|
add(e, t, r, s, o) {
|
|
1367
|
-
const i = this._listeners, c = as(t, r), a = this._gestureKey ? this._ctrl.config[this._gestureKey].eventOptions : {}, u =
|
|
1367
|
+
const i = this._listeners, c = as(t, r), a = this._gestureKey ? this._ctrl.config[this._gestureKey].eventOptions : {}, u = Z(Z({}, a), o);
|
|
1368
1368
|
e.addEventListener(c, s, u);
|
|
1369
1369
|
const l = () => {
|
|
1370
1370
|
e.removeEventListener(c, s, u), i.delete(l);
|
|
@@ -1377,7 +1377,7 @@ class ar {
|
|
|
1377
1377
|
}
|
|
1378
1378
|
class js {
|
|
1379
1379
|
constructor() {
|
|
1380
|
-
|
|
1380
|
+
_e(this, "_timeouts", /* @__PURE__ */ new Map());
|
|
1381
1381
|
}
|
|
1382
1382
|
add(e, t, r = 140, ...s) {
|
|
1383
1383
|
this.remove(e), this._timeouts.set(e, window.setTimeout(t, r, ...s));
|
|
@@ -1392,7 +1392,7 @@ class js {
|
|
|
1392
1392
|
}
|
|
1393
1393
|
class Fs {
|
|
1394
1394
|
constructor(e) {
|
|
1395
|
-
|
|
1395
|
+
_e(this, "gestures", /* @__PURE__ */ new Set()), _e(this, "_targetEventStore", new lr(this)), _e(this, "gestureEventStores", {}), _e(this, "gestureTimeoutStores", {}), _e(this, "handlers", {}), _e(this, "config", {}), _e(this, "pointerIds", /* @__PURE__ */ new Set()), _e(this, "touchIds", /* @__PURE__ */ new Set()), _e(this, "state", {
|
|
1396
1396
|
shared: {
|
|
1397
1397
|
shiftKey: !1,
|
|
1398
1398
|
metaKey: !1,
|
|
@@ -1402,7 +1402,7 @@ class Fs {
|
|
|
1402
1402
|
}), Vs(this, e);
|
|
1403
1403
|
}
|
|
1404
1404
|
setEventIds(e) {
|
|
1405
|
-
if (
|
|
1405
|
+
if (tn(e))
|
|
1406
1406
|
return this.touchIds = new Set(fs(e)), this.touchIds;
|
|
1407
1407
|
if ("pointerId" in e)
|
|
1408
1408
|
return e.type === "pointerup" || e.type === "pointercancel" ? this.pointerIds.delete(e.pointerId) : e.type === "pointerdown" && this.pointerIds.add(e.pointerId), this.pointerIds;
|
|
@@ -1429,13 +1429,13 @@ class Fs {
|
|
|
1429
1429
|
for (const i of this.gestures) {
|
|
1430
1430
|
const c = this.config[i], a = $n(r, c.eventOptions, !!s);
|
|
1431
1431
|
if (c.enabled) {
|
|
1432
|
-
const u =
|
|
1432
|
+
const u = ar.get(i);
|
|
1433
1433
|
new u(this, e, i).bind(a);
|
|
1434
1434
|
}
|
|
1435
1435
|
}
|
|
1436
1436
|
const o = $n(r, t.eventOptions, !!s);
|
|
1437
1437
|
for (const i in this.nativeHandlers)
|
|
1438
|
-
o(i, "", (c) => this.nativeHandlers[i](
|
|
1438
|
+
o(i, "", (c) => this.nativeHandlers[i](Z(Z({}, this.state.shared), {}, {
|
|
1439
1439
|
event: c,
|
|
1440
1440
|
args: e
|
|
1441
1441
|
})), void 0, !0);
|
|
@@ -1457,24 +1457,24 @@ class Fs {
|
|
|
1457
1457
|
}
|
|
1458
1458
|
}
|
|
1459
1459
|
}
|
|
1460
|
-
function
|
|
1461
|
-
n.gestures.add(e), n.gestureEventStores[e] = new
|
|
1460
|
+
function xt(n, e) {
|
|
1461
|
+
n.gestures.add(e), n.gestureEventStores[e] = new lr(n, e), n.gestureTimeoutStores[e] = new js();
|
|
1462
1462
|
}
|
|
1463
1463
|
function Vs(n, e) {
|
|
1464
|
-
e.drag &&
|
|
1464
|
+
e.drag && xt(n, "drag"), e.wheel && xt(n, "wheel"), e.scroll && xt(n, "scroll"), e.move && xt(n, "move"), e.pinch && xt(n, "pinch"), e.hover && xt(n, "hover");
|
|
1465
1465
|
}
|
|
1466
1466
|
const $n = (n, e, t) => (r, s, o, i = {}, c = !1) => {
|
|
1467
1467
|
var a, u;
|
|
1468
|
-
const l = (a = i.capture) !== null && a !== void 0 ? a : e.capture,
|
|
1469
|
-
let
|
|
1470
|
-
t &&
|
|
1468
|
+
const l = (a = i.capture) !== null && a !== void 0 ? a : e.capture, m = (u = i.passive) !== null && u !== void 0 ? u : e.passive;
|
|
1469
|
+
let f = c ? r : os(r, s, l);
|
|
1470
|
+
t && m && (f += "Passive"), n[f] = n[f] || [], n[f].push(o);
|
|
1471
1471
|
};
|
|
1472
1472
|
function Us(n, e = {}, t, r) {
|
|
1473
|
-
const s =
|
|
1474
|
-
if (s.applyHandlers(n, r), s.applyConfig(e, t),
|
|
1473
|
+
const s = tt.useMemo(() => new Fs(n), []);
|
|
1474
|
+
if (s.applyHandlers(n, r), s.applyConfig(e, t), tt.useEffect(s.effect.bind(s)), tt.useEffect(() => s.clean.bind(s), []), e.target === void 0)
|
|
1475
1475
|
return s.bind.bind(s);
|
|
1476
1476
|
}
|
|
1477
|
-
function
|
|
1477
|
+
function un(n, e) {
|
|
1478
1478
|
return Os(Ms), Us({
|
|
1479
1479
|
drag: n
|
|
1480
1480
|
}, e || {}, "drag");
|
|
@@ -1484,7 +1484,7 @@ function Hn(n, e) {
|
|
|
1484
1484
|
return n(e);
|
|
1485
1485
|
n != null && (n.current = e);
|
|
1486
1486
|
}
|
|
1487
|
-
function
|
|
1487
|
+
function ur(...n) {
|
|
1488
1488
|
return (e) => {
|
|
1489
1489
|
let t = !1;
|
|
1490
1490
|
const r = n.map((s) => {
|
|
@@ -1500,39 +1500,39 @@ function lr(...n) {
|
|
|
1500
1500
|
};
|
|
1501
1501
|
};
|
|
1502
1502
|
}
|
|
1503
|
-
function
|
|
1504
|
-
return b.useCallback(
|
|
1503
|
+
function st(...n) {
|
|
1504
|
+
return b.useCallback(ur(...n), n);
|
|
1505
1505
|
}
|
|
1506
1506
|
// @__NO_SIDE_EFFECTS__
|
|
1507
|
-
function
|
|
1507
|
+
function fr(n) {
|
|
1508
1508
|
const e = /* @__PURE__ */ Hs(n), t = b.forwardRef((r, s) => {
|
|
1509
|
-
const { children: o, ...i } = r, c = b.Children.toArray(o), a = c.find(
|
|
1509
|
+
const { children: o, ...i } = r, c = b.Children.toArray(o), a = c.find(Xs);
|
|
1510
1510
|
if (a) {
|
|
1511
|
-
const u = a.props.children, l = c.map((
|
|
1512
|
-
return /* @__PURE__ */
|
|
1511
|
+
const u = a.props.children, l = c.map((m) => m === a ? b.Children.count(u) > 1 ? b.Children.only(null) : b.isValidElement(u) ? u.props.children : null : m);
|
|
1512
|
+
return /* @__PURE__ */ x.jsx(e, { ...i, ref: s, children: b.isValidElement(u) ? b.cloneElement(u, void 0, l) : null });
|
|
1513
1513
|
}
|
|
1514
|
-
return /* @__PURE__ */
|
|
1514
|
+
return /* @__PURE__ */ x.jsx(e, { ...i, ref: s, children: o });
|
|
1515
1515
|
});
|
|
1516
1516
|
return t.displayName = `${n}.Slot`, t;
|
|
1517
1517
|
}
|
|
1518
|
-
var $s = /* @__PURE__ */
|
|
1518
|
+
var $s = /* @__PURE__ */ fr("Slot");
|
|
1519
1519
|
// @__NO_SIDE_EFFECTS__
|
|
1520
1520
|
function Hs(n) {
|
|
1521
1521
|
const e = b.forwardRef((t, r) => {
|
|
1522
1522
|
const { children: s, ...o } = t;
|
|
1523
1523
|
if (b.isValidElement(s)) {
|
|
1524
|
-
const i = Gs(s), c =
|
|
1525
|
-
return s.type !== b.Fragment && (c.ref = r ?
|
|
1524
|
+
const i = Gs(s), c = Ys(o, s.props);
|
|
1525
|
+
return s.type !== b.Fragment && (c.ref = r ? ur(r, i) : i), b.cloneElement(s, c);
|
|
1526
1526
|
}
|
|
1527
1527
|
return b.Children.count(s) > 1 ? b.Children.only(null) : null;
|
|
1528
1528
|
});
|
|
1529
1529
|
return e.displayName = `${n}.SlotClone`, e;
|
|
1530
1530
|
}
|
|
1531
1531
|
var Bs = Symbol("radix.slottable");
|
|
1532
|
-
function
|
|
1532
|
+
function Xs(n) {
|
|
1533
1533
|
return b.isValidElement(n) && typeof n.type == "function" && "__radixId" in n.type && n.type.__radixId === Bs;
|
|
1534
1534
|
}
|
|
1535
|
-
function
|
|
1535
|
+
function Ys(n, e) {
|
|
1536
1536
|
const t = { ...e };
|
|
1537
1537
|
for (const r in e) {
|
|
1538
1538
|
const s = n[r], o = e[r];
|
|
@@ -1565,10 +1565,10 @@ var Ks = [
|
|
|
1565
1565
|
"span",
|
|
1566
1566
|
"svg",
|
|
1567
1567
|
"ul"
|
|
1568
|
-
],
|
|
1569
|
-
const t = /* @__PURE__ */
|
|
1568
|
+
], kt = Ks.reduce((n, e) => {
|
|
1569
|
+
const t = /* @__PURE__ */ fr(`Primitive.${e}`), r = b.forwardRef((s, o) => {
|
|
1570
1570
|
const { asChild: i, ...c } = s, a = i ? t : e;
|
|
1571
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */
|
|
1571
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ x.jsx(a, { ...c, ref: o });
|
|
1572
1572
|
});
|
|
1573
1573
|
return r.displayName = `Primitive.${e}`, { ...n, [e]: r };
|
|
1574
1574
|
}, {});
|
|
@@ -1577,16 +1577,16 @@ function qs(n, e = []) {
|
|
|
1577
1577
|
function r(o, i) {
|
|
1578
1578
|
const c = b.createContext(i), a = t.length;
|
|
1579
1579
|
t = [...t, i];
|
|
1580
|
-
const u = (
|
|
1581
|
-
const { scope:
|
|
1582
|
-
return /* @__PURE__ */
|
|
1580
|
+
const u = (m) => {
|
|
1581
|
+
const { scope: f, children: g, ...w } = m, S = f?.[n]?.[a] || c, y = b.useMemo(() => w, Object.values(w));
|
|
1582
|
+
return /* @__PURE__ */ x.jsx(S.Provider, { value: y, children: g });
|
|
1583
1583
|
};
|
|
1584
1584
|
u.displayName = o + "Provider";
|
|
1585
|
-
function l(
|
|
1586
|
-
const
|
|
1587
|
-
if (
|
|
1585
|
+
function l(m, f) {
|
|
1586
|
+
const g = f?.[n]?.[a] || c, w = b.useContext(g);
|
|
1587
|
+
if (w) return w;
|
|
1588
1588
|
if (i !== void 0) return i;
|
|
1589
|
-
throw new Error(`\`${
|
|
1589
|
+
throw new Error(`\`${m}\` must be used within \`${o}\``);
|
|
1590
1590
|
}
|
|
1591
1591
|
return [u, l];
|
|
1592
1592
|
}
|
|
@@ -1612,15 +1612,15 @@ function Js(...n) {
|
|
|
1612
1612
|
}));
|
|
1613
1613
|
return function(o) {
|
|
1614
1614
|
const i = r.reduce((c, { useScope: a, scopeName: u }) => {
|
|
1615
|
-
const
|
|
1616
|
-
return { ...c, ...
|
|
1615
|
+
const m = a(o)[`__scope${u}`];
|
|
1616
|
+
return { ...c, ...m };
|
|
1617
1617
|
}, {});
|
|
1618
1618
|
return b.useMemo(() => ({ [`__scope${e.scopeName}`]: i }), [i]);
|
|
1619
1619
|
};
|
|
1620
1620
|
};
|
|
1621
1621
|
return t.scopeName = e.scopeName, t;
|
|
1622
1622
|
}
|
|
1623
|
-
function
|
|
1623
|
+
function nt(n, e, { checkForDefaultPrevented: t = !0 } = {}) {
|
|
1624
1624
|
return function(s) {
|
|
1625
1625
|
if (n?.(s), t === !1 || !s.defaultPrevented)
|
|
1626
1626
|
return e?.(s);
|
|
@@ -1631,11 +1631,11 @@ var gn = globalThis?.document ? b.useLayoutEffect : () => {
|
|
|
1631
1631
|
function Zs(n, e) {
|
|
1632
1632
|
return b.useReducer((t, r) => e[t][r] ?? t, n);
|
|
1633
1633
|
}
|
|
1634
|
-
var
|
|
1635
|
-
const { present: e, children: t } = n, r = Qs(e), s = typeof t == "function" ? t({ present: r.isPresent }) : b.Children.only(t), o =
|
|
1634
|
+
var Wt = (n) => {
|
|
1635
|
+
const { present: e, children: t } = n, r = Qs(e), s = typeof t == "function" ? t({ present: r.isPresent }) : b.Children.only(t), o = st(r.ref, eo(s));
|
|
1636
1636
|
return typeof t == "function" || r.isPresent ? b.cloneElement(s, { ref: o }) : null;
|
|
1637
1637
|
};
|
|
1638
|
-
|
|
1638
|
+
Wt.displayName = "Presence";
|
|
1639
1639
|
function Qs(n) {
|
|
1640
1640
|
const [e, t] = b.useState(), r = b.useRef(null), s = b.useRef(n), o = b.useRef("none"), i = n ? "mounted" : "unmounted", [c, a] = Zs(i, {
|
|
1641
1641
|
mounted: {
|
|
@@ -1651,30 +1651,30 @@ function Qs(n) {
|
|
|
1651
1651
|
}
|
|
1652
1652
|
});
|
|
1653
1653
|
return b.useEffect(() => {
|
|
1654
|
-
const u =
|
|
1654
|
+
const u = Ut(r.current);
|
|
1655
1655
|
o.current = c === "mounted" ? u : "none";
|
|
1656
1656
|
}, [c]), gn(() => {
|
|
1657
1657
|
const u = r.current, l = s.current;
|
|
1658
1658
|
if (l !== n) {
|
|
1659
|
-
const
|
|
1660
|
-
n ? a("MOUNT") :
|
|
1659
|
+
const f = o.current, g = Ut(u);
|
|
1660
|
+
n ? a("MOUNT") : g === "none" || u?.display === "none" ? a("UNMOUNT") : a(l && f !== g ? "ANIMATION_OUT" : "UNMOUNT"), s.current = n;
|
|
1661
1661
|
}
|
|
1662
1662
|
}, [n, a]), gn(() => {
|
|
1663
1663
|
if (e) {
|
|
1664
1664
|
let u;
|
|
1665
|
-
const l = e.ownerDocument.defaultView ?? window,
|
|
1666
|
-
const S =
|
|
1667
|
-
if (
|
|
1668
|
-
const
|
|
1665
|
+
const l = e.ownerDocument.defaultView ?? window, m = (g) => {
|
|
1666
|
+
const S = Ut(r.current).includes(CSS.escape(g.animationName));
|
|
1667
|
+
if (g.target === e && S && (a("ANIMATION_END"), !s.current)) {
|
|
1668
|
+
const y = e.style.animationFillMode;
|
|
1669
1669
|
e.style.animationFillMode = "forwards", u = l.setTimeout(() => {
|
|
1670
|
-
e.style.animationFillMode === "forwards" && (e.style.animationFillMode =
|
|
1670
|
+
e.style.animationFillMode === "forwards" && (e.style.animationFillMode = y);
|
|
1671
1671
|
});
|
|
1672
1672
|
}
|
|
1673
|
-
},
|
|
1674
|
-
|
|
1673
|
+
}, f = (g) => {
|
|
1674
|
+
g.target === e && (o.current = Ut(r.current));
|
|
1675
1675
|
};
|
|
1676
|
-
return e.addEventListener("animationstart",
|
|
1677
|
-
l.clearTimeout(u), e.removeEventListener("animationstart",
|
|
1676
|
+
return e.addEventListener("animationstart", f), e.addEventListener("animationcancel", m), e.addEventListener("animationend", m), () => {
|
|
1677
|
+
l.clearTimeout(u), e.removeEventListener("animationstart", f), e.removeEventListener("animationcancel", m), e.removeEventListener("animationend", m);
|
|
1678
1678
|
};
|
|
1679
1679
|
} else
|
|
1680
1680
|
a("ANIMATION_END");
|
|
@@ -1685,7 +1685,7 @@ function Qs(n) {
|
|
|
1685
1685
|
}, [])
|
|
1686
1686
|
};
|
|
1687
1687
|
}
|
|
1688
|
-
function
|
|
1688
|
+
function Ut(n) {
|
|
1689
1689
|
return n?.animationName || "none";
|
|
1690
1690
|
}
|
|
1691
1691
|
function eo(n) {
|
|
@@ -1697,7 +1697,7 @@ function no(n) {
|
|
|
1697
1697
|
const e = b.useContext(to);
|
|
1698
1698
|
return n || e || "ltr";
|
|
1699
1699
|
}
|
|
1700
|
-
function
|
|
1700
|
+
function et(n) {
|
|
1701
1701
|
const e = b.useRef(n);
|
|
1702
1702
|
return b.useEffect(() => {
|
|
1703
1703
|
e.current = n;
|
|
@@ -1709,7 +1709,7 @@ function ro(n, [e, t]) {
|
|
|
1709
1709
|
function so(n, e) {
|
|
1710
1710
|
return b.useReducer((t, r) => e[t][r] ?? t, n);
|
|
1711
1711
|
}
|
|
1712
|
-
var Sn = "ScrollArea", [
|
|
1712
|
+
var Sn = "ScrollArea", [dr] = qs(Sn), [oo, Re] = dr(Sn), hr = b.forwardRef(
|
|
1713
1713
|
(n, e) => {
|
|
1714
1714
|
const {
|
|
1715
1715
|
__scopeScrollArea: t,
|
|
@@ -1717,40 +1717,40 @@ var Sn = "ScrollArea", [fr] = qs(Sn), [oo, Ee] = fr(Sn), dr = b.forwardRef(
|
|
|
1717
1717
|
dir: s,
|
|
1718
1718
|
scrollHideDelay: o = 600,
|
|
1719
1719
|
...i
|
|
1720
|
-
} = n, [c, a] = b.useState(null), [u, l] = b.useState(null), [
|
|
1721
|
-
return /* @__PURE__ */
|
|
1720
|
+
} = n, [c, a] = b.useState(null), [u, l] = b.useState(null), [m, f] = b.useState(null), [g, w] = b.useState(null), [S, y] = b.useState(null), [_, h] = b.useState(0), [p, v] = b.useState(0), [R, E] = b.useState(!1), [T, k] = b.useState(!1), P = st(e, (U) => a(U)), W = no(s);
|
|
1721
|
+
return /* @__PURE__ */ x.jsx(
|
|
1722
1722
|
oo,
|
|
1723
1723
|
{
|
|
1724
1724
|
scope: t,
|
|
1725
1725
|
type: r,
|
|
1726
|
-
dir:
|
|
1726
|
+
dir: W,
|
|
1727
1727
|
scrollHideDelay: o,
|
|
1728
1728
|
scrollArea: c,
|
|
1729
1729
|
viewport: u,
|
|
1730
1730
|
onViewportChange: l,
|
|
1731
|
-
content:
|
|
1732
|
-
onContentChange:
|
|
1733
|
-
scrollbarX:
|
|
1734
|
-
onScrollbarXChange:
|
|
1735
|
-
scrollbarXEnabled:
|
|
1736
|
-
onScrollbarXEnabledChange:
|
|
1731
|
+
content: m,
|
|
1732
|
+
onContentChange: f,
|
|
1733
|
+
scrollbarX: g,
|
|
1734
|
+
onScrollbarXChange: w,
|
|
1735
|
+
scrollbarXEnabled: R,
|
|
1736
|
+
onScrollbarXEnabledChange: E,
|
|
1737
1737
|
scrollbarY: S,
|
|
1738
|
-
onScrollbarYChange:
|
|
1739
|
-
scrollbarYEnabled:
|
|
1740
|
-
onScrollbarYEnabledChange:
|
|
1741
|
-
onCornerWidthChange:
|
|
1742
|
-
onCornerHeightChange:
|
|
1743
|
-
children: /* @__PURE__ */
|
|
1744
|
-
|
|
1738
|
+
onScrollbarYChange: y,
|
|
1739
|
+
scrollbarYEnabled: T,
|
|
1740
|
+
onScrollbarYEnabledChange: k,
|
|
1741
|
+
onCornerWidthChange: h,
|
|
1742
|
+
onCornerHeightChange: v,
|
|
1743
|
+
children: /* @__PURE__ */ x.jsx(
|
|
1744
|
+
kt.div,
|
|
1745
1745
|
{
|
|
1746
|
-
dir:
|
|
1746
|
+
dir: W,
|
|
1747
1747
|
...i,
|
|
1748
|
-
ref:
|
|
1748
|
+
ref: P,
|
|
1749
1749
|
style: {
|
|
1750
1750
|
position: "relative",
|
|
1751
1751
|
// Pass corner sizes as CSS vars to reduce re-renders of context consumers
|
|
1752
|
-
"--radix-scroll-area-corner-width":
|
|
1753
|
-
"--radix-scroll-area-corner-height":
|
|
1752
|
+
"--radix-scroll-area-corner-width": _ + "px",
|
|
1753
|
+
"--radix-scroll-area-corner-height": p + "px",
|
|
1754
1754
|
...n.style
|
|
1755
1755
|
}
|
|
1756
1756
|
}
|
|
@@ -1759,12 +1759,12 @@ var Sn = "ScrollArea", [fr] = qs(Sn), [oo, Ee] = fr(Sn), dr = b.forwardRef(
|
|
|
1759
1759
|
);
|
|
1760
1760
|
}
|
|
1761
1761
|
);
|
|
1762
|
-
|
|
1763
|
-
var
|
|
1762
|
+
hr.displayName = Sn;
|
|
1763
|
+
var mr = "ScrollAreaViewport", pr = b.forwardRef(
|
|
1764
1764
|
(n, e) => {
|
|
1765
|
-
const { __scopeScrollArea: t, children: r, nonce: s, ...o } = n, i =
|
|
1766
|
-
return /* @__PURE__ */
|
|
1767
|
-
/* @__PURE__ */
|
|
1765
|
+
const { __scopeScrollArea: t, children: r, nonce: s, ...o } = n, i = Re(mr, t), c = b.useRef(null), a = st(e, c, i.onViewportChange);
|
|
1766
|
+
return /* @__PURE__ */ x.jsxs(x.Fragment, { children: [
|
|
1767
|
+
/* @__PURE__ */ x.jsx(
|
|
1768
1768
|
"style",
|
|
1769
1769
|
{
|
|
1770
1770
|
dangerouslySetInnerHTML: {
|
|
@@ -1773,8 +1773,8 @@ var hr = "ScrollAreaViewport", mr = b.forwardRef(
|
|
|
1773
1773
|
nonce: s
|
|
1774
1774
|
}
|
|
1775
1775
|
),
|
|
1776
|
-
/* @__PURE__ */
|
|
1777
|
-
|
|
1776
|
+
/* @__PURE__ */ x.jsx(
|
|
1777
|
+
kt.div,
|
|
1778
1778
|
{
|
|
1779
1779
|
"data-radix-scroll-area-viewport": "",
|
|
1780
1780
|
...o,
|
|
@@ -1795,24 +1795,24 @@ var hr = "ScrollAreaViewport", mr = b.forwardRef(
|
|
|
1795
1795
|
overflowY: i.scrollbarYEnabled ? "scroll" : "hidden",
|
|
1796
1796
|
...n.style
|
|
1797
1797
|
},
|
|
1798
|
-
children: /* @__PURE__ */
|
|
1798
|
+
children: /* @__PURE__ */ x.jsx("div", { ref: i.onContentChange, style: { minWidth: "100%", display: "table" }, children: r })
|
|
1799
1799
|
}
|
|
1800
1800
|
)
|
|
1801
1801
|
] });
|
|
1802
1802
|
}
|
|
1803
1803
|
);
|
|
1804
|
-
|
|
1805
|
-
var
|
|
1804
|
+
pr.displayName = mr;
|
|
1805
|
+
var Oe = "ScrollAreaScrollbar", gr = b.forwardRef(
|
|
1806
1806
|
(n, e) => {
|
|
1807
|
-
const { forceMount: t, ...r } = n, s =
|
|
1807
|
+
const { forceMount: t, ...r } = n, s = Re(Oe, n.__scopeScrollArea), { onScrollbarXEnabledChange: o, onScrollbarYEnabledChange: i } = s, c = n.orientation === "horizontal";
|
|
1808
1808
|
return b.useEffect(() => (c ? o(!0) : i(!0), () => {
|
|
1809
1809
|
c ? o(!1) : i(!1);
|
|
1810
|
-
}), [c, o, i]), s.type === "hover" ? /* @__PURE__ */
|
|
1810
|
+
}), [c, o, i]), s.type === "hover" ? /* @__PURE__ */ x.jsx(io, { ...r, ref: e, forceMount: t }) : s.type === "scroll" ? /* @__PURE__ */ x.jsx(co, { ...r, ref: e, forceMount: t }) : s.type === "auto" ? /* @__PURE__ */ x.jsx(vr, { ...r, ref: e, forceMount: t }) : s.type === "always" ? /* @__PURE__ */ x.jsx(_n, { ...r, ref: e }) : null;
|
|
1811
1811
|
}
|
|
1812
1812
|
);
|
|
1813
|
-
|
|
1813
|
+
gr.displayName = Oe;
|
|
1814
1814
|
var io = b.forwardRef((n, e) => {
|
|
1815
|
-
const { forceMount: t, ...r } = n, s =
|
|
1815
|
+
const { forceMount: t, ...r } = n, s = Re(Oe, n.__scopeScrollArea), [o, i] = b.useState(!1);
|
|
1816
1816
|
return b.useEffect(() => {
|
|
1817
1817
|
const c = s.scrollArea;
|
|
1818
1818
|
let a = 0;
|
|
@@ -1826,8 +1826,8 @@ var io = b.forwardRef((n, e) => {
|
|
|
1826
1826
|
window.clearTimeout(a), c.removeEventListener("pointerenter", u), c.removeEventListener("pointerleave", l);
|
|
1827
1827
|
};
|
|
1828
1828
|
}
|
|
1829
|
-
}, [s.scrollArea, s.scrollHideDelay]), /* @__PURE__ */
|
|
1830
|
-
|
|
1829
|
+
}, [s.scrollArea, s.scrollHideDelay]), /* @__PURE__ */ x.jsx(Wt, { present: t || o, children: /* @__PURE__ */ x.jsx(
|
|
1830
|
+
vr,
|
|
1831
1831
|
{
|
|
1832
1832
|
"data-state": o ? "visible" : "hidden",
|
|
1833
1833
|
...r,
|
|
@@ -1835,7 +1835,7 @@ var io = b.forwardRef((n, e) => {
|
|
|
1835
1835
|
}
|
|
1836
1836
|
) });
|
|
1837
1837
|
}), co = b.forwardRef((n, e) => {
|
|
1838
|
-
const { forceMount: t, ...r } = n, s =
|
|
1838
|
+
const { forceMount: t, ...r } = n, s = Re(Oe, n.__scopeScrollArea), o = n.orientation === "horizontal", i = rn(() => a("SCROLL_END"), 100), [c, a] = so("hidden", {
|
|
1839
1839
|
hidden: {
|
|
1840
1840
|
SCROLL: "scrolling"
|
|
1841
1841
|
},
|
|
@@ -1861,31 +1861,31 @@ var io = b.forwardRef((n, e) => {
|
|
|
1861
1861
|
}, [c, s.scrollHideDelay, a]), b.useEffect(() => {
|
|
1862
1862
|
const u = s.viewport, l = o ? "scrollLeft" : "scrollTop";
|
|
1863
1863
|
if (u) {
|
|
1864
|
-
let
|
|
1865
|
-
const
|
|
1866
|
-
const
|
|
1867
|
-
|
|
1864
|
+
let m = u[l];
|
|
1865
|
+
const f = () => {
|
|
1866
|
+
const g = u[l];
|
|
1867
|
+
m !== g && (a("SCROLL"), i()), m = g;
|
|
1868
1868
|
};
|
|
1869
|
-
return u.addEventListener("scroll",
|
|
1869
|
+
return u.addEventListener("scroll", f), () => u.removeEventListener("scroll", f);
|
|
1870
1870
|
}
|
|
1871
|
-
}, [s.viewport, o, a, i]), /* @__PURE__ */
|
|
1871
|
+
}, [s.viewport, o, a, i]), /* @__PURE__ */ x.jsx(Wt, { present: t || c !== "hidden", children: /* @__PURE__ */ x.jsx(
|
|
1872
1872
|
_n,
|
|
1873
1873
|
{
|
|
1874
1874
|
"data-state": c === "hidden" ? "hidden" : "visible",
|
|
1875
1875
|
...r,
|
|
1876
1876
|
ref: e,
|
|
1877
|
-
onPointerEnter:
|
|
1878
|
-
onPointerLeave:
|
|
1877
|
+
onPointerEnter: nt(n.onPointerEnter, () => a("POINTER_ENTER")),
|
|
1878
|
+
onPointerLeave: nt(n.onPointerLeave, () => a("POINTER_LEAVE"))
|
|
1879
1879
|
}
|
|
1880
1880
|
) });
|
|
1881
|
-
}),
|
|
1882
|
-
const t =
|
|
1881
|
+
}), vr = b.forwardRef((n, e) => {
|
|
1882
|
+
const t = Re(Oe, n.__scopeScrollArea), { forceMount: r, ...s } = n, [o, i] = b.useState(!1), c = n.orientation === "horizontal", a = rn(() => {
|
|
1883
1883
|
if (t.viewport) {
|
|
1884
1884
|
const u = t.viewport.offsetWidth < t.viewport.scrollWidth, l = t.viewport.offsetHeight < t.viewport.scrollHeight;
|
|
1885
1885
|
i(c ? u : l);
|
|
1886
1886
|
}
|
|
1887
1887
|
}, 10);
|
|
1888
|
-
return At(t.viewport, a), At(t.content, a), /* @__PURE__ */
|
|
1888
|
+
return At(t.viewport, a), At(t.content, a), /* @__PURE__ */ x.jsx(Wt, { present: r || o, children: /* @__PURE__ */ x.jsx(
|
|
1889
1889
|
_n,
|
|
1890
1890
|
{
|
|
1891
1891
|
"data-state": o ? "visible" : "hidden",
|
|
@@ -1894,65 +1894,65 @@ var io = b.forwardRef((n, e) => {
|
|
|
1894
1894
|
}
|
|
1895
1895
|
) });
|
|
1896
1896
|
}), _n = b.forwardRef((n, e) => {
|
|
1897
|
-
const { orientation: t = "vertical", ...r } = n, s =
|
|
1897
|
+
const { orientation: t = "vertical", ...r } = n, s = Re(Oe, n.__scopeScrollArea), o = b.useRef(null), i = b.useRef(0), [c, a] = b.useState({
|
|
1898
1898
|
content: 0,
|
|
1899
1899
|
viewport: 0,
|
|
1900
1900
|
scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 }
|
|
1901
|
-
}), u =
|
|
1901
|
+
}), u = Er(c.viewport, c.content), l = {
|
|
1902
1902
|
...r,
|
|
1903
1903
|
sizes: c,
|
|
1904
1904
|
onSizesChange: a,
|
|
1905
1905
|
hasThumb: u > 0 && u < 1,
|
|
1906
|
-
onThumbChange: (
|
|
1906
|
+
onThumbChange: (f) => o.current = f,
|
|
1907
1907
|
onThumbPointerUp: () => i.current = 0,
|
|
1908
|
-
onThumbPointerDown: (
|
|
1908
|
+
onThumbPointerDown: (f) => i.current = f
|
|
1909
1909
|
};
|
|
1910
|
-
function
|
|
1911
|
-
return mo(
|
|
1910
|
+
function m(f, g) {
|
|
1911
|
+
return mo(f, i.current, c, g);
|
|
1912
1912
|
}
|
|
1913
|
-
return t === "horizontal" ? /* @__PURE__ */
|
|
1913
|
+
return t === "horizontal" ? /* @__PURE__ */ x.jsx(
|
|
1914
1914
|
ao,
|
|
1915
1915
|
{
|
|
1916
1916
|
...l,
|
|
1917
1917
|
ref: e,
|
|
1918
1918
|
onThumbPositionChange: () => {
|
|
1919
1919
|
if (s.viewport && o.current) {
|
|
1920
|
-
const
|
|
1921
|
-
o.current.style.transform = `translate3d(${
|
|
1920
|
+
const f = s.viewport.scrollLeft, g = Bn(f, c, s.dir);
|
|
1921
|
+
o.current.style.transform = `translate3d(${g}px, 0, 0)`;
|
|
1922
1922
|
}
|
|
1923
1923
|
},
|
|
1924
|
-
onWheelScroll: (
|
|
1925
|
-
s.viewport && (s.viewport.scrollLeft =
|
|
1924
|
+
onWheelScroll: (f) => {
|
|
1925
|
+
s.viewport && (s.viewport.scrollLeft = f);
|
|
1926
1926
|
},
|
|
1927
|
-
onDragScroll: (
|
|
1928
|
-
s.viewport && (s.viewport.scrollLeft =
|
|
1927
|
+
onDragScroll: (f) => {
|
|
1928
|
+
s.viewport && (s.viewport.scrollLeft = m(f, s.dir));
|
|
1929
1929
|
}
|
|
1930
1930
|
}
|
|
1931
|
-
) : t === "vertical" ? /* @__PURE__ */
|
|
1931
|
+
) : t === "vertical" ? /* @__PURE__ */ x.jsx(
|
|
1932
1932
|
lo,
|
|
1933
1933
|
{
|
|
1934
1934
|
...l,
|
|
1935
1935
|
ref: e,
|
|
1936
1936
|
onThumbPositionChange: () => {
|
|
1937
1937
|
if (s.viewport && o.current) {
|
|
1938
|
-
const
|
|
1939
|
-
o.current.style.transform = `translate3d(0, ${
|
|
1938
|
+
const f = s.viewport.scrollTop, g = Bn(f, c);
|
|
1939
|
+
o.current.style.transform = `translate3d(0, ${g}px, 0)`;
|
|
1940
1940
|
}
|
|
1941
1941
|
},
|
|
1942
|
-
onWheelScroll: (
|
|
1943
|
-
s.viewport && (s.viewport.scrollTop =
|
|
1942
|
+
onWheelScroll: (f) => {
|
|
1943
|
+
s.viewport && (s.viewport.scrollTop = f);
|
|
1944
1944
|
},
|
|
1945
|
-
onDragScroll: (
|
|
1946
|
-
s.viewport && (s.viewport.scrollTop =
|
|
1945
|
+
onDragScroll: (f) => {
|
|
1946
|
+
s.viewport && (s.viewport.scrollTop = m(f));
|
|
1947
1947
|
}
|
|
1948
1948
|
}
|
|
1949
1949
|
) : null;
|
|
1950
1950
|
}), ao = b.forwardRef((n, e) => {
|
|
1951
|
-
const { sizes: t, onSizesChange: r, ...s } = n, o =
|
|
1951
|
+
const { sizes: t, onSizesChange: r, ...s } = n, o = Re(Oe, n.__scopeScrollArea), [i, c] = b.useState(), a = b.useRef(null), u = st(e, a, o.onScrollbarXChange);
|
|
1952
1952
|
return b.useEffect(() => {
|
|
1953
1953
|
a.current && c(getComputedStyle(a.current));
|
|
1954
|
-
}, [a]), /* @__PURE__ */
|
|
1955
|
-
|
|
1954
|
+
}, [a]), /* @__PURE__ */ x.jsx(
|
|
1955
|
+
Sr,
|
|
1956
1956
|
{
|
|
1957
1957
|
"data-orientation": "horizontal",
|
|
1958
1958
|
...s,
|
|
@@ -1962,15 +1962,15 @@ var io = b.forwardRef((n, e) => {
|
|
|
1962
1962
|
bottom: 0,
|
|
1963
1963
|
left: o.dir === "rtl" ? "var(--radix-scroll-area-corner-width)" : 0,
|
|
1964
1964
|
right: o.dir === "ltr" ? "var(--radix-scroll-area-corner-width)" : 0,
|
|
1965
|
-
"--radix-scroll-area-thumb-width":
|
|
1965
|
+
"--radix-scroll-area-thumb-width": nn(t) + "px",
|
|
1966
1966
|
...n.style
|
|
1967
1967
|
},
|
|
1968
1968
|
onThumbPointerDown: (l) => n.onThumbPointerDown(l.x),
|
|
1969
1969
|
onDragScroll: (l) => n.onDragScroll(l.x),
|
|
1970
|
-
onWheelScroll: (l,
|
|
1970
|
+
onWheelScroll: (l, m) => {
|
|
1971
1971
|
if (o.viewport) {
|
|
1972
|
-
const
|
|
1973
|
-
n.onWheelScroll(
|
|
1972
|
+
const f = o.viewport.scrollLeft + l.deltaX;
|
|
1973
|
+
n.onWheelScroll(f), xr(f, m) && l.preventDefault();
|
|
1974
1974
|
}
|
|
1975
1975
|
},
|
|
1976
1976
|
onResize: () => {
|
|
@@ -1987,11 +1987,11 @@ var io = b.forwardRef((n, e) => {
|
|
|
1987
1987
|
}
|
|
1988
1988
|
);
|
|
1989
1989
|
}), lo = b.forwardRef((n, e) => {
|
|
1990
|
-
const { sizes: t, onSizesChange: r, ...s } = n, o =
|
|
1990
|
+
const { sizes: t, onSizesChange: r, ...s } = n, o = Re(Oe, n.__scopeScrollArea), [i, c] = b.useState(), a = b.useRef(null), u = st(e, a, o.onScrollbarYChange);
|
|
1991
1991
|
return b.useEffect(() => {
|
|
1992
1992
|
a.current && c(getComputedStyle(a.current));
|
|
1993
|
-
}, [a]), /* @__PURE__ */
|
|
1994
|
-
|
|
1993
|
+
}, [a]), /* @__PURE__ */ x.jsx(
|
|
1994
|
+
Sr,
|
|
1995
1995
|
{
|
|
1996
1996
|
"data-orientation": "vertical",
|
|
1997
1997
|
...s,
|
|
@@ -2002,15 +2002,15 @@ var io = b.forwardRef((n, e) => {
|
|
|
2002
2002
|
right: o.dir === "ltr" ? 0 : void 0,
|
|
2003
2003
|
left: o.dir === "rtl" ? 0 : void 0,
|
|
2004
2004
|
bottom: "var(--radix-scroll-area-corner-height)",
|
|
2005
|
-
"--radix-scroll-area-thumb-height":
|
|
2005
|
+
"--radix-scroll-area-thumb-height": nn(t) + "px",
|
|
2006
2006
|
...n.style
|
|
2007
2007
|
},
|
|
2008
2008
|
onThumbPointerDown: (l) => n.onThumbPointerDown(l.y),
|
|
2009
2009
|
onDragScroll: (l) => n.onDragScroll(l.y),
|
|
2010
|
-
onWheelScroll: (l,
|
|
2010
|
+
onWheelScroll: (l, m) => {
|
|
2011
2011
|
if (o.viewport) {
|
|
2012
|
-
const
|
|
2013
|
-
n.onWheelScroll(
|
|
2012
|
+
const f = o.viewport.scrollTop + l.deltaY;
|
|
2013
|
+
n.onWheelScroll(f), xr(f, m) && l.preventDefault();
|
|
2014
2014
|
}
|
|
2015
2015
|
},
|
|
2016
2016
|
onResize: () => {
|
|
@@ -2026,7 +2026,7 @@ var io = b.forwardRef((n, e) => {
|
|
|
2026
2026
|
}
|
|
2027
2027
|
}
|
|
2028
2028
|
);
|
|
2029
|
-
}), [uo,
|
|
2029
|
+
}), [uo, br] = dr(Oe), Sr = b.forwardRef((n, e) => {
|
|
2030
2030
|
const {
|
|
2031
2031
|
__scopeScrollArea: t,
|
|
2032
2032
|
sizes: r,
|
|
@@ -2037,75 +2037,75 @@ var io = b.forwardRef((n, e) => {
|
|
|
2037
2037
|
onThumbPositionChange: a,
|
|
2038
2038
|
onDragScroll: u,
|
|
2039
2039
|
onWheelScroll: l,
|
|
2040
|
-
onResize:
|
|
2041
|
-
...
|
|
2042
|
-
} = n,
|
|
2043
|
-
function
|
|
2044
|
-
if (
|
|
2045
|
-
const
|
|
2046
|
-
u({ x:
|
|
2040
|
+
onResize: m,
|
|
2041
|
+
...f
|
|
2042
|
+
} = n, g = Re(Oe, t), [w, S] = b.useState(null), y = st(e, (P) => S(P)), _ = b.useRef(null), h = b.useRef(""), p = g.viewport, v = r.content - r.viewport, R = et(l), E = et(a), T = rn(m, 10);
|
|
2043
|
+
function k(P) {
|
|
2044
|
+
if (_.current) {
|
|
2045
|
+
const W = P.clientX - _.current.left, U = P.clientY - _.current.top;
|
|
2046
|
+
u({ x: W, y: U });
|
|
2047
2047
|
}
|
|
2048
2048
|
}
|
|
2049
2049
|
return b.useEffect(() => {
|
|
2050
|
-
const
|
|
2051
|
-
const
|
|
2052
|
-
|
|
2050
|
+
const P = (W) => {
|
|
2051
|
+
const U = W.target;
|
|
2052
|
+
w?.contains(U) && R(W, v);
|
|
2053
2053
|
};
|
|
2054
|
-
return document.addEventListener("wheel",
|
|
2055
|
-
}, [
|
|
2054
|
+
return document.addEventListener("wheel", P, { passive: !1 }), () => document.removeEventListener("wheel", P, { passive: !1 });
|
|
2055
|
+
}, [p, w, v, R]), b.useEffect(E, [r, E]), At(w, T), At(g.content, T), /* @__PURE__ */ x.jsx(
|
|
2056
2056
|
uo,
|
|
2057
2057
|
{
|
|
2058
2058
|
scope: t,
|
|
2059
|
-
scrollbar:
|
|
2059
|
+
scrollbar: w,
|
|
2060
2060
|
hasThumb: s,
|
|
2061
|
-
onThumbChange:
|
|
2062
|
-
onThumbPointerUp:
|
|
2063
|
-
onThumbPositionChange:
|
|
2064
|
-
onThumbPointerDown:
|
|
2065
|
-
children: /* @__PURE__ */
|
|
2066
|
-
|
|
2061
|
+
onThumbChange: et(o),
|
|
2062
|
+
onThumbPointerUp: et(i),
|
|
2063
|
+
onThumbPositionChange: E,
|
|
2064
|
+
onThumbPointerDown: et(c),
|
|
2065
|
+
children: /* @__PURE__ */ x.jsx(
|
|
2066
|
+
kt.div,
|
|
2067
2067
|
{
|
|
2068
|
-
...
|
|
2069
|
-
ref:
|
|
2070
|
-
style: { position: "absolute", ...
|
|
2071
|
-
onPointerDown:
|
|
2072
|
-
|
|
2068
|
+
...f,
|
|
2069
|
+
ref: y,
|
|
2070
|
+
style: { position: "absolute", ...f.style },
|
|
2071
|
+
onPointerDown: nt(n.onPointerDown, (P) => {
|
|
2072
|
+
P.button === 0 && (P.target.setPointerCapture(P.pointerId), _.current = w.getBoundingClientRect(), h.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", g.viewport && (g.viewport.style.scrollBehavior = "auto"), k(P));
|
|
2073
2073
|
}),
|
|
2074
|
-
onPointerMove:
|
|
2075
|
-
onPointerUp:
|
|
2076
|
-
const
|
|
2077
|
-
|
|
2074
|
+
onPointerMove: nt(n.onPointerMove, k),
|
|
2075
|
+
onPointerUp: nt(n.onPointerUp, (P) => {
|
|
2076
|
+
const W = P.target;
|
|
2077
|
+
W.hasPointerCapture(P.pointerId) && W.releasePointerCapture(P.pointerId), document.body.style.webkitUserSelect = h.current, g.viewport && (g.viewport.style.scrollBehavior = ""), _.current = null;
|
|
2078
2078
|
})
|
|
2079
2079
|
}
|
|
2080
2080
|
)
|
|
2081
2081
|
}
|
|
2082
2082
|
);
|
|
2083
|
-
}), Jt = "ScrollAreaThumb",
|
|
2083
|
+
}), Jt = "ScrollAreaThumb", _r = b.forwardRef(
|
|
2084
2084
|
(n, e) => {
|
|
2085
|
-
const { forceMount: t, ...r } = n, s =
|
|
2086
|
-
return /* @__PURE__ */
|
|
2085
|
+
const { forceMount: t, ...r } = n, s = br(Jt, n.__scopeScrollArea);
|
|
2086
|
+
return /* @__PURE__ */ x.jsx(Wt, { present: t || s.hasThumb, children: /* @__PURE__ */ x.jsx(fo, { ref: e, ...r }) });
|
|
2087
2087
|
}
|
|
2088
2088
|
), fo = b.forwardRef(
|
|
2089
2089
|
(n, e) => {
|
|
2090
|
-
const { __scopeScrollArea: t, style: r, ...s } = n, o =
|
|
2090
|
+
const { __scopeScrollArea: t, style: r, ...s } = n, o = Re(Jt, t), i = br(Jt, t), { onThumbPositionChange: c } = i, a = st(
|
|
2091
2091
|
e,
|
|
2092
|
-
(
|
|
2093
|
-
), u = b.useRef(void 0), l =
|
|
2092
|
+
(m) => i.onThumbChange(m)
|
|
2093
|
+
), u = b.useRef(void 0), l = rn(() => {
|
|
2094
2094
|
u.current && (u.current(), u.current = void 0);
|
|
2095
2095
|
}, 100);
|
|
2096
2096
|
return b.useEffect(() => {
|
|
2097
|
-
const
|
|
2098
|
-
if (
|
|
2099
|
-
const
|
|
2097
|
+
const m = o.viewport;
|
|
2098
|
+
if (m) {
|
|
2099
|
+
const f = () => {
|
|
2100
2100
|
if (l(), !u.current) {
|
|
2101
|
-
const
|
|
2102
|
-
u.current =
|
|
2101
|
+
const g = po(m, c);
|
|
2102
|
+
u.current = g, c();
|
|
2103
2103
|
}
|
|
2104
2104
|
};
|
|
2105
|
-
return c(),
|
|
2105
|
+
return c(), m.addEventListener("scroll", f), () => m.removeEventListener("scroll", f);
|
|
2106
2106
|
}
|
|
2107
|
-
}, [o.viewport, l, c]), /* @__PURE__ */
|
|
2108
|
-
|
|
2107
|
+
}, [o.viewport, l, c]), /* @__PURE__ */ x.jsx(
|
|
2108
|
+
kt.div,
|
|
2109
2109
|
{
|
|
2110
2110
|
"data-state": i.hasThumb ? "visible" : "hidden",
|
|
2111
2111
|
...s,
|
|
@@ -2115,33 +2115,33 @@ var io = b.forwardRef((n, e) => {
|
|
|
2115
2115
|
height: "var(--radix-scroll-area-thumb-height)",
|
|
2116
2116
|
...r
|
|
2117
2117
|
},
|
|
2118
|
-
onPointerDownCapture:
|
|
2119
|
-
const
|
|
2120
|
-
i.onThumbPointerDown({ x:
|
|
2118
|
+
onPointerDownCapture: nt(n.onPointerDownCapture, (m) => {
|
|
2119
|
+
const g = m.target.getBoundingClientRect(), w = m.clientX - g.left, S = m.clientY - g.top;
|
|
2120
|
+
i.onThumbPointerDown({ x: w, y: S });
|
|
2121
2121
|
}),
|
|
2122
|
-
onPointerUp:
|
|
2122
|
+
onPointerUp: nt(n.onPointerUp, i.onThumbPointerUp)
|
|
2123
2123
|
}
|
|
2124
2124
|
);
|
|
2125
2125
|
}
|
|
2126
2126
|
);
|
|
2127
|
-
|
|
2128
|
-
var wn = "ScrollAreaCorner",
|
|
2127
|
+
_r.displayName = Jt;
|
|
2128
|
+
var wn = "ScrollAreaCorner", wr = b.forwardRef(
|
|
2129
2129
|
(n, e) => {
|
|
2130
|
-
const t =
|
|
2131
|
-
return t.type !== "scroll" && r ? /* @__PURE__ */
|
|
2130
|
+
const t = Re(wn, n.__scopeScrollArea), r = !!(t.scrollbarX && t.scrollbarY);
|
|
2131
|
+
return t.type !== "scroll" && r ? /* @__PURE__ */ x.jsx(ho, { ...n, ref: e }) : null;
|
|
2132
2132
|
}
|
|
2133
2133
|
);
|
|
2134
|
-
|
|
2134
|
+
wr.displayName = wn;
|
|
2135
2135
|
var ho = b.forwardRef((n, e) => {
|
|
2136
|
-
const { __scopeScrollArea: t, ...r } = n, s =
|
|
2136
|
+
const { __scopeScrollArea: t, ...r } = n, s = Re(wn, t), [o, i] = b.useState(0), [c, a] = b.useState(0), u = !!(o && c);
|
|
2137
2137
|
return At(s.scrollbarX, () => {
|
|
2138
2138
|
const l = s.scrollbarX?.offsetHeight || 0;
|
|
2139
2139
|
s.onCornerHeightChange(l), a(l);
|
|
2140
2140
|
}), At(s.scrollbarY, () => {
|
|
2141
2141
|
const l = s.scrollbarY?.offsetWidth || 0;
|
|
2142
2142
|
s.onCornerWidthChange(l), i(l);
|
|
2143
|
-
}), u ? /* @__PURE__ */
|
|
2144
|
-
|
|
2143
|
+
}), u ? /* @__PURE__ */ x.jsx(
|
|
2144
|
+
kt.div,
|
|
2145
2145
|
{
|
|
2146
2146
|
...r,
|
|
2147
2147
|
ref: e,
|
|
@@ -2160,30 +2160,30 @@ var ho = b.forwardRef((n, e) => {
|
|
|
2160
2160
|
function Zt(n) {
|
|
2161
2161
|
return n ? parseInt(n, 10) : 0;
|
|
2162
2162
|
}
|
|
2163
|
-
function
|
|
2163
|
+
function Er(n, e) {
|
|
2164
2164
|
const t = n / e;
|
|
2165
2165
|
return isNaN(t) ? 0 : t;
|
|
2166
2166
|
}
|
|
2167
|
-
function
|
|
2168
|
-
const e =
|
|
2167
|
+
function nn(n) {
|
|
2168
|
+
const e = Er(n.viewport, n.content), t = n.scrollbar.paddingStart + n.scrollbar.paddingEnd, r = (n.scrollbar.size - t) * e;
|
|
2169
2169
|
return Math.max(r, 18);
|
|
2170
2170
|
}
|
|
2171
2171
|
function mo(n, e, t, r = "ltr") {
|
|
2172
|
-
const s =
|
|
2173
|
-
return
|
|
2172
|
+
const s = nn(t), o = s / 2, i = e || o, c = s - i, a = t.scrollbar.paddingStart + i, u = t.scrollbar.size - t.scrollbar.paddingEnd - c, l = t.content - t.viewport, m = r === "ltr" ? [0, l] : [l * -1, 0];
|
|
2173
|
+
return yr([a, u], m)(n);
|
|
2174
2174
|
}
|
|
2175
2175
|
function Bn(n, e, t = "ltr") {
|
|
2176
|
-
const r =
|
|
2177
|
-
return
|
|
2176
|
+
const r = nn(e), s = e.scrollbar.paddingStart + e.scrollbar.paddingEnd, o = e.scrollbar.size - s, i = e.content - e.viewport, c = o - r, a = t === "ltr" ? [0, i] : [i * -1, 0], u = ro(n, a);
|
|
2177
|
+
return yr([0, i], [0, c])(u);
|
|
2178
2178
|
}
|
|
2179
|
-
function
|
|
2179
|
+
function yr(n, e) {
|
|
2180
2180
|
return (t) => {
|
|
2181
2181
|
if (n[0] === n[1] || e[0] === e[1]) return e[0];
|
|
2182
2182
|
const r = (e[1] - e[0]) / (n[1] - n[0]);
|
|
2183
2183
|
return e[0] + r * (t - n[0]);
|
|
2184
2184
|
};
|
|
2185
2185
|
}
|
|
2186
|
-
function
|
|
2186
|
+
function xr(n, e) {
|
|
2187
2187
|
return n > 0 && n < e;
|
|
2188
2188
|
}
|
|
2189
2189
|
var po = (n, e = () => {
|
|
@@ -2194,14 +2194,14 @@ var po = (n, e = () => {
|
|
|
2194
2194
|
(i || c) && e(), t = o, r = window.requestAnimationFrame(s);
|
|
2195
2195
|
})(), () => window.cancelAnimationFrame(r);
|
|
2196
2196
|
};
|
|
2197
|
-
function
|
|
2198
|
-
const t =
|
|
2197
|
+
function rn(n, e) {
|
|
2198
|
+
const t = et(n), r = b.useRef(0);
|
|
2199
2199
|
return b.useEffect(() => () => window.clearTimeout(r.current), []), b.useCallback(() => {
|
|
2200
2200
|
window.clearTimeout(r.current), r.current = window.setTimeout(t, e);
|
|
2201
2201
|
}, [t, e]);
|
|
2202
2202
|
}
|
|
2203
2203
|
function At(n, e) {
|
|
2204
|
-
const t =
|
|
2204
|
+
const t = et(e);
|
|
2205
2205
|
gn(() => {
|
|
2206
2206
|
let r = 0;
|
|
2207
2207
|
if (n) {
|
|
@@ -2214,8 +2214,8 @@ function At(n, e) {
|
|
|
2214
2214
|
}
|
|
2215
2215
|
}, [n, t]);
|
|
2216
2216
|
}
|
|
2217
|
-
var go =
|
|
2218
|
-
const
|
|
2217
|
+
var go = hr, vo = pr, bo = wr;
|
|
2218
|
+
const fn = (n, e, t, r, s) => ({
|
|
2219
2219
|
target: n,
|
|
2220
2220
|
dx: e[0],
|
|
2221
2221
|
dy: e[1],
|
|
@@ -2228,7 +2228,7 @@ const un = (n, e, t, r, s) => ({
|
|
|
2228
2228
|
deltaRect: s
|
|
2229
2229
|
}
|
|
2230
2230
|
}), So = (n, e, t) => n ? n === e || n === t || (e?.contains(n) ?? !1) || (t?.contains(n) ?? !1) : !1, _o = (n) => {
|
|
2231
|
-
const e =
|
|
2231
|
+
const e = Le.c(34), {
|
|
2232
2232
|
children: t,
|
|
2233
2233
|
style: r,
|
|
2234
2234
|
draggable: s,
|
|
@@ -2236,120 +2236,120 @@ const un = (n, e, t, r, s) => ({
|
|
|
2236
2236
|
draggableOptions: i,
|
|
2237
2237
|
resizableOptions: c,
|
|
2238
2238
|
ref: a
|
|
2239
|
-
} = n, u =
|
|
2240
|
-
let S,
|
|
2239
|
+
} = n, u = te(void 0), l = te(void 0), m = te(null), f = te(null), g = te(void 0), w = te(void 0);
|
|
2240
|
+
let S, y;
|
|
2241
2241
|
e[0] !== i || e[1] !== a || e[2] !== c ? (S = () => {
|
|
2242
2242
|
if (u.current = i, l.current = c, !a?.current)
|
|
2243
2243
|
return;
|
|
2244
|
-
const
|
|
2245
|
-
|
|
2246
|
-
},
|
|
2247
|
-
let
|
|
2248
|
-
e[5] !== a ? (
|
|
2244
|
+
const A = c?.edges?.left, M = c?.edges?.right;
|
|
2245
|
+
A && A !== g.current && (g.current = A, m.current = a.current.querySelector(A)), M && M !== w.current && (w.current = M, f.current = a.current.querySelector(M));
|
|
2246
|
+
}, y = [i, a, c], e[0] = i, e[1] = a, e[2] = c, e[3] = S, e[4] = y) : (S = e[3], y = e[4]), rt(S, y);
|
|
2247
|
+
let _;
|
|
2248
|
+
e[5] !== a ? (_ = (A) => {
|
|
2249
2249
|
const {
|
|
2250
2250
|
active: M,
|
|
2251
|
-
delta:
|
|
2252
|
-
xy:
|
|
2253
|
-
event:
|
|
2254
|
-
first:
|
|
2255
|
-
last:
|
|
2256
|
-
} =
|
|
2257
|
-
if (!
|
|
2251
|
+
delta: K,
|
|
2252
|
+
xy: q,
|
|
2253
|
+
event: J,
|
|
2254
|
+
first: d,
|
|
2255
|
+
last: C
|
|
2256
|
+
} = A, L = a?.current;
|
|
2257
|
+
if (!L || So(J?.target, m.current, f.current))
|
|
2258
2258
|
return;
|
|
2259
|
-
const
|
|
2260
|
-
|
|
2261
|
-
}, e[5] = a, e[6] =
|
|
2262
|
-
const
|
|
2263
|
-
let
|
|
2264
|
-
e[7] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2259
|
+
const V = fn(L, K, q);
|
|
2260
|
+
d ? u.current?.onstart?.(V) : C ? u.current?.onend?.(V) : M && u.current?.onmove?.(V);
|
|
2261
|
+
}, e[5] = a, e[6] = _) : _ = e[6];
|
|
2262
|
+
const h = i?.lockAxis === "x" ? "x" : void 0;
|
|
2263
|
+
let p;
|
|
2264
|
+
e[7] === Symbol.for("react.memo_cache_sentinel") ? (p = {
|
|
2265
2265
|
capture: !0
|
|
2266
|
-
}, e[7] =
|
|
2267
|
-
let
|
|
2268
|
-
e[8] !== s || e[9] !== a || e[10] !==
|
|
2266
|
+
}, e[7] = p) : p = e[7];
|
|
2267
|
+
let v;
|
|
2268
|
+
e[8] !== s || e[9] !== a || e[10] !== h ? (v = {
|
|
2269
2269
|
enabled: s,
|
|
2270
|
-
axis:
|
|
2271
|
-
pointer:
|
|
2270
|
+
axis: h,
|
|
2271
|
+
pointer: p,
|
|
2272
2272
|
target: a,
|
|
2273
2273
|
threshold: 0
|
|
2274
|
-
}, e[8] = s, e[9] = a, e[10] =
|
|
2275
|
-
let
|
|
2276
|
-
e[12] !== a ? (
|
|
2274
|
+
}, e[8] = s, e[9] = a, e[10] = h, e[11] = v) : v = e[11], un(_, v);
|
|
2275
|
+
let R;
|
|
2276
|
+
e[12] !== a ? (R = (A) => {
|
|
2277
2277
|
const {
|
|
2278
2278
|
active: M,
|
|
2279
|
-
delta:
|
|
2280
|
-
xy:
|
|
2281
|
-
first:
|
|
2282
|
-
last:
|
|
2283
|
-
} =
|
|
2284
|
-
if (!
|
|
2279
|
+
delta: K,
|
|
2280
|
+
xy: q,
|
|
2281
|
+
first: J,
|
|
2282
|
+
last: d
|
|
2283
|
+
} = A, C = a?.current;
|
|
2284
|
+
if (!C)
|
|
2285
2285
|
return;
|
|
2286
|
-
const
|
|
2286
|
+
const L = fn(C, K, q, {
|
|
2287
2287
|
left: !0
|
|
2288
2288
|
}, {
|
|
2289
|
-
left:
|
|
2289
|
+
left: K[0]
|
|
2290
2290
|
});
|
|
2291
|
-
|
|
2292
|
-
}, e[12] = a, e[13] =
|
|
2293
|
-
let
|
|
2294
|
-
e[14] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2291
|
+
J ? l.current?.onstart?.(L) : d ? l.current?.onend?.(L) : M && l.current?.onmove?.(L);
|
|
2292
|
+
}, e[12] = a, e[13] = R) : R = e[13];
|
|
2293
|
+
let E;
|
|
2294
|
+
e[14] === Symbol.for("react.memo_cache_sentinel") ? (E = {
|
|
2295
2295
|
capture: !0
|
|
2296
|
-
}, e[14] =
|
|
2297
|
-
let
|
|
2298
|
-
e[15] !== o ? (
|
|
2296
|
+
}, e[14] = E) : E = e[14];
|
|
2297
|
+
let T;
|
|
2298
|
+
e[15] !== o ? (T = {
|
|
2299
2299
|
enabled: o,
|
|
2300
|
-
target:
|
|
2301
|
-
pointer:
|
|
2300
|
+
target: m,
|
|
2301
|
+
pointer: E,
|
|
2302
2302
|
threshold: 0
|
|
2303
|
-
}, e[15] = o, e[16] =
|
|
2304
|
-
let
|
|
2305
|
-
e[17] !== a ? (
|
|
2303
|
+
}, e[15] = o, e[16] = T) : T = e[16], un(R, T);
|
|
2304
|
+
let k;
|
|
2305
|
+
e[17] !== a ? (k = (A) => {
|
|
2306
2306
|
const {
|
|
2307
2307
|
active: M,
|
|
2308
|
-
delta:
|
|
2309
|
-
xy:
|
|
2310
|
-
first:
|
|
2311
|
-
last:
|
|
2312
|
-
} =
|
|
2313
|
-
if (!
|
|
2308
|
+
delta: K,
|
|
2309
|
+
xy: q,
|
|
2310
|
+
first: J,
|
|
2311
|
+
last: d
|
|
2312
|
+
} = A, C = a?.current;
|
|
2313
|
+
if (!C)
|
|
2314
2314
|
return;
|
|
2315
|
-
const
|
|
2315
|
+
const L = fn(C, K, q, {
|
|
2316
2316
|
right: !0
|
|
2317
2317
|
}, {
|
|
2318
|
-
right:
|
|
2318
|
+
right: K[0]
|
|
2319
2319
|
});
|
|
2320
|
-
|
|
2321
|
-
}, e[17] = a, e[18] =
|
|
2322
|
-
let
|
|
2323
|
-
e[19] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2320
|
+
J ? l.current?.onstart?.(L) : d ? l.current?.onend?.(L) : M && l.current?.onmove?.(L);
|
|
2321
|
+
}, e[17] = a, e[18] = k) : k = e[18];
|
|
2322
|
+
let P;
|
|
2323
|
+
e[19] === Symbol.for("react.memo_cache_sentinel") ? (P = {
|
|
2324
2324
|
capture: !0
|
|
2325
|
-
}, e[19] =
|
|
2326
|
-
let
|
|
2327
|
-
e[20] !== o ? (
|
|
2325
|
+
}, e[19] = P) : P = e[19];
|
|
2326
|
+
let W;
|
|
2327
|
+
e[20] !== o ? (W = {
|
|
2328
2328
|
enabled: o,
|
|
2329
|
-
target:
|
|
2330
|
-
pointer:
|
|
2329
|
+
target: f,
|
|
2330
|
+
pointer: P,
|
|
2331
2331
|
threshold: 0
|
|
2332
|
-
}, e[20] = o, e[21] =
|
|
2333
|
-
let
|
|
2334
|
-
e[22] !== a ? (
|
|
2335
|
-
const
|
|
2336
|
-
if (!
|
|
2332
|
+
}, e[20] = o, e[21] = W) : W = e[21], un(k, W);
|
|
2333
|
+
let U, Q;
|
|
2334
|
+
e[22] !== a ? (U = () => {
|
|
2335
|
+
const A = a?.current;
|
|
2336
|
+
if (!A)
|
|
2337
2337
|
return;
|
|
2338
|
-
const M = l.current?.edges?.left,
|
|
2339
|
-
M && (
|
|
2340
|
-
},
|
|
2341
|
-
let
|
|
2342
|
-
e[25] !== s ? (
|
|
2338
|
+
const M = l.current?.edges?.left, K = l.current?.edges?.right;
|
|
2339
|
+
M && (m.current = A.querySelector(M)), K && (f.current = A.querySelector(K));
|
|
2340
|
+
}, Q = [a], e[22] = a, e[23] = U, e[24] = Q) : (U = e[23], Q = e[24]), Qt(U, Q);
|
|
2341
|
+
let $;
|
|
2342
|
+
e[25] !== s ? ($ = s ? {
|
|
2343
2343
|
touchAction: "none"
|
|
2344
|
-
} : {}, e[25] = s, e[26] =
|
|
2345
|
-
let
|
|
2346
|
-
e[27] !== r || e[28] !==
|
|
2347
|
-
|
|
2344
|
+
} : {}, e[25] = s, e[26] = $) : $ = e[26];
|
|
2345
|
+
let ne;
|
|
2346
|
+
e[27] !== r || e[28] !== $ ? (ne = {
|
|
2347
|
+
...$,
|
|
2348
2348
|
...r
|
|
2349
|
-
}, e[27] = r, e[28] =
|
|
2350
|
-
let
|
|
2351
|
-
return e[30] !== t || e[31] !== a || e[32] !==
|
|
2352
|
-
},
|
|
2349
|
+
}, e[27] = r, e[28] = $, e[29] = ne) : ne = e[29];
|
|
2350
|
+
let Y;
|
|
2351
|
+
return e[30] !== t || e[31] !== a || e[32] !== ne ? (Y = /* @__PURE__ */ x.jsx($s, { ref: a, style: ne, draggable: !1, children: t }), e[30] = t, e[31] = a, e[32] = ne, e[33] = Y) : Y = e[33], Y;
|
|
2352
|
+
}, Se = (n, e = 0) => n ? parseFloat(n) : e, dn = (n, e, t, r = Number.MAX_SAFE_INTEGER) => {
|
|
2353
2353
|
let s = n, o = r;
|
|
2354
2354
|
for (const i of e) {
|
|
2355
2355
|
const c = Math.abs(i - n);
|
|
@@ -2359,8 +2359,8 @@ const un = (n, e, t, r, s) => ({
|
|
|
2359
2359
|
snap: s,
|
|
2360
2360
|
minDis: o
|
|
2361
2361
|
};
|
|
2362
|
-
}, Rr =
|
|
2363
|
-
const t =
|
|
2362
|
+
}, Rr = tt.forwardRef((n, e) => {
|
|
2363
|
+
const t = Le.c(68), {
|
|
2364
2364
|
children: r,
|
|
2365
2365
|
edges: s,
|
|
2366
2366
|
left: o,
|
|
@@ -2369,257 +2369,259 @@ const un = (n, e, t, r, s) => ({
|
|
|
2369
2369
|
grid: a,
|
|
2370
2370
|
getBounds: u,
|
|
2371
2371
|
enableResizing: l,
|
|
2372
|
-
enableDragging:
|
|
2373
|
-
snapDistance:
|
|
2374
|
-
snapPositions:
|
|
2375
|
-
onResizeStart:
|
|
2372
|
+
enableDragging: m,
|
|
2373
|
+
snapDistance: f,
|
|
2374
|
+
snapPositions: g,
|
|
2375
|
+
onResizeStart: w,
|
|
2376
2376
|
onResize: S,
|
|
2377
|
-
onResizeEnd:
|
|
2378
|
-
onDragStart:
|
|
2379
|
-
onDragEnd:
|
|
2380
|
-
onDrag:
|
|
2381
|
-
parentRef:
|
|
2382
|
-
autoScroll:
|
|
2383
|
-
} = n,
|
|
2384
|
-
let
|
|
2385
|
-
t[0] !==
|
|
2386
|
-
const
|
|
2387
|
-
initAutoScroll:
|
|
2388
|
-
stopAutoScroll:
|
|
2389
|
-
dealDragAutoScroll:
|
|
2390
|
-
dealResizeAutoScroll:
|
|
2391
|
-
} = Zr(
|
|
2392
|
-
let
|
|
2393
|
-
t[2] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2394
|
-
const
|
|
2395
|
-
if (!
|
|
2377
|
+
onResizeEnd: y,
|
|
2378
|
+
onDragStart: _,
|
|
2379
|
+
onDragEnd: h,
|
|
2380
|
+
onDrag: p,
|
|
2381
|
+
parentRef: v,
|
|
2382
|
+
autoScroll: R
|
|
2383
|
+
} = n, E = c === void 0 ? en : c, T = a === void 0 ? mn : a, k = u === void 0 ? wo : u, P = l === void 0 ? !0 : l, W = m === void 0 ? !0 : m, U = f === void 0 ? Kt : f;
|
|
2384
|
+
let Q;
|
|
2385
|
+
t[0] !== g ? (Q = g === void 0 ? [] : g, t[0] = g, t[1] = Q) : Q = t[1];
|
|
2386
|
+
const $ = Q, ne = R === void 0 ? !0 : R, Y = te(null), A = te(0), M = te(!1), {
|
|
2387
|
+
initAutoScroll: K,
|
|
2388
|
+
stopAutoScroll: q,
|
|
2389
|
+
dealDragAutoScroll: J,
|
|
2390
|
+
dealResizeAutoScroll: d
|
|
2391
|
+
} = Zr(v);
|
|
2392
|
+
let C;
|
|
2393
|
+
t[2] === Symbol.for("react.memo_cache_sentinel") ? (C = (F, G) => {
|
|
2394
|
+
const H = G === void 0 ? !0 : G;
|
|
2395
|
+
if (!Y.current)
|
|
2396
2396
|
return;
|
|
2397
|
-
|
|
2398
|
-
const
|
|
2399
|
-
|
|
2400
|
-
}, t[2] =
|
|
2401
|
-
const
|
|
2402
|
-
let
|
|
2403
|
-
t[3] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2404
|
-
const
|
|
2405
|
-
if (!
|
|
2397
|
+
H && (A.current = 0);
|
|
2398
|
+
const B = Y.current;
|
|
2399
|
+
B.style.setProperty("--translate-x", `${F}px`), B.dataset.left = String(F);
|
|
2400
|
+
}, t[2] = C) : C = t[2];
|
|
2401
|
+
const L = C;
|
|
2402
|
+
let V;
|
|
2403
|
+
t[3] === Symbol.for("react.memo_cache_sentinel") ? (V = (F, G) => {
|
|
2404
|
+
const H = G === void 0 ? !0 : G;
|
|
2405
|
+
if (!Y.current)
|
|
2406
2406
|
return;
|
|
2407
|
-
|
|
2408
|
-
const
|
|
2409
|
-
|
|
2410
|
-
}, t[3] =
|
|
2411
|
-
const
|
|
2412
|
-
let
|
|
2413
|
-
t[4] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2414
|
-
const
|
|
2415
|
-
let
|
|
2416
|
-
t[5] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2417
|
-
const
|
|
2418
|
-
let
|
|
2419
|
-
t[6] !== i ? (
|
|
2420
|
-
if (!
|
|
2407
|
+
H && (A.current = 0);
|
|
2408
|
+
const B = Y.current;
|
|
2409
|
+
B.style.width = `${F}px`, B.dataset.width = String(F);
|
|
2410
|
+
}, t[3] = V) : V = t[3];
|
|
2411
|
+
const ue = V;
|
|
2412
|
+
let N;
|
|
2413
|
+
t[4] === Symbol.for("react.memo_cache_sentinel") ? (N = () => Y.current ? Se(Y.current.dataset.left) : 0, t[4] = N) : N = t[4];
|
|
2414
|
+
const j = N;
|
|
2415
|
+
let O;
|
|
2416
|
+
t[5] === Symbol.for("react.memo_cache_sentinel") ? (O = () => Y.current ? Se(Y.current.dataset.width) : 0, t[5] = O) : O = t[5];
|
|
2417
|
+
const I = O;
|
|
2418
|
+
let D, Me;
|
|
2419
|
+
t[6] !== i ? (D = () => {
|
|
2420
|
+
if (!Y.current)
|
|
2421
2421
|
return;
|
|
2422
|
-
const
|
|
2423
|
-
|
|
2424
|
-
},
|
|
2425
|
-
let
|
|
2426
|
-
t[9] !== o ? (
|
|
2427
|
-
|
|
2428
|
-
},
|
|
2429
|
-
let
|
|
2430
|
-
t[12] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2431
|
-
updateLeft: (
|
|
2432
|
-
updateWidth: (
|
|
2433
|
-
getLeft:
|
|
2434
|
-
getWidth:
|
|
2435
|
-
}), t[12] =
|
|
2436
|
-
let
|
|
2437
|
-
t[13] !==
|
|
2438
|
-
|
|
2439
|
-
}, t[13] =
|
|
2440
|
-
const
|
|
2441
|
-
let
|
|
2442
|
-
t[16] !==
|
|
2422
|
+
const F = Y.current;
|
|
2423
|
+
ue(typeof i > "u" ? F.offsetWidth : i, !1);
|
|
2424
|
+
}, Me = [i], t[6] = i, t[7] = D, t[8] = Me) : (D = t[7], Me = t[8]), rt(D, Me);
|
|
2425
|
+
let Ce, ee;
|
|
2426
|
+
t[9] !== o ? (Ce = () => {
|
|
2427
|
+
L(o || 0, !1);
|
|
2428
|
+
}, ee = [o], t[9] = o, t[10] = Ce, t[11] = ee) : (Ce = t[10], ee = t[11]), rt(Ce, ee);
|
|
2429
|
+
let re;
|
|
2430
|
+
t[12] === Symbol.for("react.memo_cache_sentinel") ? (re = () => ({
|
|
2431
|
+
updateLeft: (F) => L(F || 0, !1),
|
|
2432
|
+
updateWidth: (F) => ue(F, !1),
|
|
2433
|
+
getLeft: j,
|
|
2434
|
+
getWidth: I
|
|
2435
|
+
}), t[12] = re) : re = t[12], Zn(e, re);
|
|
2436
|
+
let we;
|
|
2437
|
+
t[13] !== K || t[14] !== _ ? (we = () => {
|
|
2438
|
+
A.current = 0, M.current = !1, K(), _?.();
|
|
2439
|
+
}, t[13] = K, t[14] = _, t[15] = we) : we = t[15];
|
|
2440
|
+
const Fe = we;
|
|
2441
|
+
let Ne;
|
|
2442
|
+
t[16] !== k || t[17] !== T || t[18] !== p || t[19] !== U || t[20] !== $ || t[21] !== E ? (Ne = (F) => {
|
|
2443
2443
|
const {
|
|
2444
|
-
preLeft:
|
|
2445
|
-
preWidth:
|
|
2446
|
-
scrollDelta:
|
|
2447
|
-
} =
|
|
2448
|
-
|
|
2449
|
-
const he = M.current ?
|
|
2450
|
-
if (Math.abs(
|
|
2444
|
+
preLeft: G,
|
|
2445
|
+
preWidth: H,
|
|
2446
|
+
scrollDelta: B
|
|
2447
|
+
} = F;
|
|
2448
|
+
B && (A.current = A.current + B);
|
|
2449
|
+
const he = M.current ? U : T;
|
|
2450
|
+
if (Math.abs(A.current) < he)
|
|
2451
2451
|
return;
|
|
2452
|
-
const
|
|
2453
|
-
let
|
|
2454
|
-
const se =
|
|
2455
|
-
snap:
|
|
2456
|
-
} =
|
|
2457
|
-
if (
|
|
2458
|
-
M.current = !0,
|
|
2452
|
+
const ce = Math.trunc(A.current / he);
|
|
2453
|
+
let X = G + ce * he;
|
|
2454
|
+
const se = A.current > 0, z = se ? X + H : X, {
|
|
2455
|
+
snap: ae
|
|
2456
|
+
} = dn(z, $, U);
|
|
2457
|
+
if (ae !== z)
|
|
2458
|
+
M.current = !0, X = se ? ae - H : ae;
|
|
2459
2459
|
else {
|
|
2460
|
-
const
|
|
2461
|
-
|
|
2460
|
+
const fe = X - E;
|
|
2461
|
+
fe % T !== 0 && (X = E + T * Math.round(fe / T)), M.current = !1;
|
|
2462
2462
|
}
|
|
2463
|
-
|
|
2464
|
-
const oe =
|
|
2465
|
-
|
|
2466
|
-
lastLeft:
|
|
2467
|
-
left:
|
|
2468
|
-
lastWidth:
|
|
2469
|
-
width:
|
|
2470
|
-
},
|
|
2471
|
-
}, t[16] =
|
|
2472
|
-
const
|
|
2473
|
-
let
|
|
2474
|
-
t[23] !==
|
|
2475
|
-
const
|
|
2476
|
-
|
|
2477
|
-
if (!
|
|
2463
|
+
A.current = A.current % he;
|
|
2464
|
+
const oe = k();
|
|
2465
|
+
X < oe.left ? X = oe.left : X + H > oe.right && (X = oe.right - H), !(p && p({
|
|
2466
|
+
lastLeft: G,
|
|
2467
|
+
left: X,
|
|
2468
|
+
lastWidth: H,
|
|
2469
|
+
width: H
|
|
2470
|
+
}, B) === !1) && L(X, !1);
|
|
2471
|
+
}, t[16] = k, t[17] = T, t[18] = p, t[19] = U, t[20] = $, t[21] = E, t[22] = Ne) : Ne = t[22];
|
|
2472
|
+
const Ae = Ne;
|
|
2473
|
+
let Ie;
|
|
2474
|
+
t[23] !== ne || t[24] !== J || t[25] !== Ae || t[26] !== v ? (Ie = (F) => {
|
|
2475
|
+
const G = F.target, H = Se(G.dataset.left), B = Se(G.dataset.width);
|
|
2476
|
+
A.current = A.current + F.dx, !(ne && v?.current && !J(F, (X) => {
|
|
2477
|
+
if (!v?.current || !Y.current)
|
|
2478
2478
|
return;
|
|
2479
|
-
|
|
2480
|
-
const se =
|
|
2481
|
-
|
|
2482
|
-
preLeft:
|
|
2483
|
-
preWidth:
|
|
2484
|
-
scrollDelta:
|
|
2479
|
+
v.current.scrollLeft = v.current.scrollLeft + X;
|
|
2480
|
+
const se = Y.current, z = Se(se.dataset.left), ae = Se(se.dataset.width);
|
|
2481
|
+
Ae({
|
|
2482
|
+
preLeft: z,
|
|
2483
|
+
preWidth: ae,
|
|
2484
|
+
scrollDelta: X
|
|
2485
2485
|
});
|
|
2486
|
-
})) &&
|
|
2487
|
-
preLeft:
|
|
2488
|
-
preWidth:
|
|
2486
|
+
})) && Ae({
|
|
2487
|
+
preLeft: H,
|
|
2488
|
+
preWidth: B
|
|
2489
2489
|
});
|
|
2490
|
-
}, t[23] =
|
|
2491
|
-
const Pt =
|
|
2492
|
-
let
|
|
2493
|
-
t[28] !==
|
|
2494
|
-
|
|
2495
|
-
const
|
|
2496
|
-
|
|
2497
|
-
left:
|
|
2498
|
-
width:
|
|
2490
|
+
}, t[23] = ne, t[24] = J, t[25] = Ae, t[26] = v, t[27] = Ie) : Ie = t[27];
|
|
2491
|
+
const Pt = Ie;
|
|
2492
|
+
let ot;
|
|
2493
|
+
t[28] !== h || t[29] !== q ? (ot = (F) => {
|
|
2494
|
+
A.current = 0, M.current = !1, q();
|
|
2495
|
+
const G = F.target;
|
|
2496
|
+
h?.({
|
|
2497
|
+
left: Se(G.dataset.left),
|
|
2498
|
+
width: Se(G.dataset.width)
|
|
2499
2499
|
});
|
|
2500
|
-
}, t[28] =
|
|
2501
|
-
const
|
|
2502
|
-
let
|
|
2503
|
-
t[31] !==
|
|
2504
|
-
|
|
2505
|
-
const
|
|
2506
|
-
|
|
2507
|
-
}, t[31] =
|
|
2508
|
-
const
|
|
2509
|
-
let
|
|
2510
|
-
t[34] !==
|
|
2500
|
+
}, t[28] = h, t[29] = q, t[30] = ot) : ot = t[30];
|
|
2501
|
+
const Ve = ot;
|
|
2502
|
+
let Ee;
|
|
2503
|
+
t[31] !== K || t[32] !== w ? (Ee = (F) => {
|
|
2504
|
+
A.current = 0, M.current = !1, K();
|
|
2505
|
+
const G = F.edges?.right ? "right" : "left";
|
|
2506
|
+
w?.(G);
|
|
2507
|
+
}, t[31] = K, t[32] = w, t[33] = Ee) : Ee = t[33];
|
|
2508
|
+
const Ue = Ee;
|
|
2509
|
+
let ke;
|
|
2510
|
+
t[34] !== k || t[35] !== T || t[36] !== S || t[37] !== U || t[38] !== $ || t[39] !== E ? (ke = (F) => {
|
|
2511
2511
|
const {
|
|
2512
|
-
dir:
|
|
2513
|
-
preWidth:
|
|
2514
|
-
preLeft:
|
|
2512
|
+
dir: G,
|
|
2513
|
+
preWidth: H,
|
|
2514
|
+
preLeft: B,
|
|
2515
2515
|
scrollDelta: he
|
|
2516
|
-
} =
|
|
2517
|
-
he && (
|
|
2518
|
-
const
|
|
2519
|
-
if (Math.abs(
|
|
2516
|
+
} = F;
|
|
2517
|
+
he && (A.current = A.current + he);
|
|
2518
|
+
const ce = M.current ? U : T;
|
|
2519
|
+
if (Math.abs(A.current) < ce)
|
|
2520
2520
|
return;
|
|
2521
|
-
const
|
|
2522
|
-
if (
|
|
2523
|
-
const se = Math.trunc(
|
|
2524
|
-
let
|
|
2521
|
+
const X = k();
|
|
2522
|
+
if (G === "left") {
|
|
2523
|
+
const se = Math.trunc(A.current / ce);
|
|
2524
|
+
let z = B + se * ce;
|
|
2525
2525
|
const {
|
|
2526
|
-
snap:
|
|
2527
|
-
} =
|
|
2528
|
-
if (
|
|
2529
|
-
M.current = !0,
|
|
2526
|
+
snap: ae
|
|
2527
|
+
} = dn(z, $, U);
|
|
2528
|
+
if (ae !== z)
|
|
2529
|
+
M.current = !0, z = ae;
|
|
2530
2530
|
else {
|
|
2531
|
-
const
|
|
2532
|
-
|
|
2531
|
+
const ye = z - E;
|
|
2532
|
+
ye % T !== 0 && (z = E + T * Math.round(ye / T)), M.current = !1;
|
|
2533
2533
|
}
|
|
2534
|
-
|
|
2535
|
-
const oe =
|
|
2536
|
-
if (
|
|
2537
|
-
lastLeft:
|
|
2538
|
-
lastWidth:
|
|
2539
|
-
left:
|
|
2540
|
-
width:
|
|
2534
|
+
A.current = A.current % ce, z < X.left && (z = X.left);
|
|
2535
|
+
const oe = B + H, fe = oe - z;
|
|
2536
|
+
if (z >= oe || S && S("left", {
|
|
2537
|
+
lastLeft: B,
|
|
2538
|
+
lastWidth: H,
|
|
2539
|
+
left: z,
|
|
2540
|
+
width: fe
|
|
2541
2541
|
}) === !1)
|
|
2542
2542
|
return;
|
|
2543
|
-
|
|
2543
|
+
L(z, !1), ue(fe, !1);
|
|
2544
2544
|
} else {
|
|
2545
|
-
const se = Math.trunc(
|
|
2546
|
-
let
|
|
2547
|
-
const
|
|
2545
|
+
const se = Math.trunc(A.current / ce);
|
|
2546
|
+
let z = H + se * ce;
|
|
2547
|
+
const ae = B + z, {
|
|
2548
2548
|
snap: oe
|
|
2549
|
-
} =
|
|
2550
|
-
if (oe !==
|
|
2551
|
-
M.current = !0,
|
|
2549
|
+
} = dn(ae, $, U);
|
|
2550
|
+
if (oe !== ae)
|
|
2551
|
+
M.current = !0, z = oe - B;
|
|
2552
2552
|
else {
|
|
2553
|
-
let
|
|
2554
|
-
const
|
|
2555
|
-
|
|
2553
|
+
let fe = B + z;
|
|
2554
|
+
const ye = fe - E;
|
|
2555
|
+
ye % T !== 0 && (fe = E + T * Math.round(ye / T), z = fe - B), M.current = !1;
|
|
2556
2556
|
}
|
|
2557
|
-
if (
|
|
2558
|
-
lastLeft:
|
|
2559
|
-
lastWidth:
|
|
2560
|
-
left:
|
|
2561
|
-
width:
|
|
2557
|
+
if (A.current = A.current % ce, B + z > X.right && (z = X.right - B), z <= 0 || S && S("right", {
|
|
2558
|
+
lastLeft: B,
|
|
2559
|
+
lastWidth: H,
|
|
2560
|
+
left: B,
|
|
2561
|
+
width: z
|
|
2562
2562
|
}) === !1)
|
|
2563
2563
|
return;
|
|
2564
|
-
|
|
2564
|
+
ue(z, !1);
|
|
2565
2565
|
}
|
|
2566
|
-
}, t[34] =
|
|
2567
|
-
const
|
|
2568
|
-
let
|
|
2569
|
-
t[41] !==
|
|
2570
|
-
const
|
|
2571
|
-
|
|
2572
|
-
if (!
|
|
2566
|
+
}, t[34] = k, t[35] = T, t[36] = S, t[37] = U, t[38] = $, t[39] = E, t[40] = ke) : ke = t[40];
|
|
2567
|
+
const $e = ke;
|
|
2568
|
+
let We;
|
|
2569
|
+
t[41] !== ne || t[42] !== d || t[43] !== v || t[44] !== $e ? (We = (F) => {
|
|
2570
|
+
const G = F.target, H = F.edges?.left ? "left" : "right", B = Se(G.dataset.left), he = Se(G.dataset.width);
|
|
2571
|
+
A.current = A.current + (H === "left" ? F.deltaRect?.left || 0 : F.deltaRect?.right || 0), !(ne && v?.current && !d(F, H, (se) => {
|
|
2572
|
+
if (!v?.current || !Y.current)
|
|
2573
2573
|
return;
|
|
2574
|
-
|
|
2575
|
-
const
|
|
2576
|
-
|
|
2577
|
-
preLeft:
|
|
2574
|
+
v.current.scrollLeft = v.current.scrollLeft + se;
|
|
2575
|
+
const z = Y.current, ae = Se(z.dataset.left), oe = Se(z.dataset.width);
|
|
2576
|
+
$e({
|
|
2577
|
+
preLeft: ae,
|
|
2578
2578
|
preWidth: oe,
|
|
2579
|
-
dir:
|
|
2579
|
+
dir: H,
|
|
2580
2580
|
scrollDelta: se
|
|
2581
2581
|
});
|
|
2582
|
-
})) &&
|
|
2583
|
-
preLeft:
|
|
2582
|
+
})) && $e({
|
|
2583
|
+
preLeft: B,
|
|
2584
2584
|
preWidth: he,
|
|
2585
|
-
dir:
|
|
2585
|
+
dir: H
|
|
2586
2586
|
});
|
|
2587
|
-
}, t[41] =
|
|
2588
|
-
const
|
|
2589
|
-
let
|
|
2590
|
-
t[46] !==
|
|
2591
|
-
|
|
2592
|
-
const
|
|
2593
|
-
|
|
2594
|
-
left:
|
|
2595
|
-
width:
|
|
2587
|
+
}, t[41] = ne, t[42] = d, t[43] = v, t[44] = $e, t[45] = We) : We = t[45];
|
|
2588
|
+
const Pe = We;
|
|
2589
|
+
let ze;
|
|
2590
|
+
t[46] !== y || t[47] !== q ? (ze = (F) => {
|
|
2591
|
+
A.current = 0, M.current = !1, q();
|
|
2592
|
+
const G = F.target, H = F.edges?.right ? "right" : "left";
|
|
2593
|
+
y?.(H, {
|
|
2594
|
+
left: Se(G.dataset.left),
|
|
2595
|
+
width: Se(G.dataset.width)
|
|
2596
2596
|
});
|
|
2597
|
-
}, t[46] =
|
|
2598
|
-
const
|
|
2599
|
-
let
|
|
2600
|
-
t[49] !==
|
|
2601
|
-
|
|
2597
|
+
}, t[46] = y, t[47] = q, t[48] = ze) : ze = t[48];
|
|
2598
|
+
const Ze = ze, He = `${o || 0}px`;
|
|
2599
|
+
let Be;
|
|
2600
|
+
t[49] !== He || t[50] !== i ? (Be = {
|
|
2601
|
+
"--translate-x": He,
|
|
2602
|
+
transform: "translateX(var(--translate-x)) scaleX(var(--scale-x,1))",
|
|
2602
2603
|
width: i
|
|
2603
|
-
}, t[49] =
|
|
2604
|
-
|
|
2605
|
-
|
|
2604
|
+
}, t[49] = He, t[50] = i, t[51] = Be) : Be = t[51];
|
|
2605
|
+
const Xe = Be;
|
|
2606
|
+
let De;
|
|
2607
|
+
t[52] !== Pt || t[53] !== Fe || t[54] !== Ve ? (De = {
|
|
2606
2608
|
lockAxis: "x",
|
|
2607
2609
|
onmove: Pt,
|
|
2608
|
-
onstart:
|
|
2609
|
-
onend:
|
|
2610
|
+
onstart: Fe,
|
|
2611
|
+
onend: Ve,
|
|
2610
2612
|
cursorChecker: Eo
|
|
2611
|
-
}, t[52] = Pt, t[53] =
|
|
2612
|
-
let
|
|
2613
|
-
t[56] !== s || t[57] !==
|
|
2613
|
+
}, t[52] = Pt, t[53] = Fe, t[54] = Ve, t[55] = De) : De = t[55];
|
|
2614
|
+
let Te;
|
|
2615
|
+
t[56] !== s || t[57] !== Pe || t[58] !== Ue || t[59] !== Ze ? (Te = {
|
|
2614
2616
|
axis: "x",
|
|
2615
2617
|
invert: "none",
|
|
2616
2618
|
edges: s,
|
|
2617
|
-
onmove:
|
|
2618
|
-
onstart:
|
|
2619
|
-
onend:
|
|
2620
|
-
}, t[56] = s, t[57] =
|
|
2621
|
-
let
|
|
2622
|
-
return t[61] !== r || t[62] !==
|
|
2619
|
+
onmove: Pe,
|
|
2620
|
+
onstart: Ue,
|
|
2621
|
+
onend: Ze
|
|
2622
|
+
}, t[56] = s, t[57] = Pe, t[58] = Ue, t[59] = Ze, t[60] = Te) : Te = t[60];
|
|
2623
|
+
let Ye;
|
|
2624
|
+
return t[61] !== r || t[62] !== W || t[63] !== P || t[64] !== Xe || t[65] !== De || t[66] !== Te ? (Ye = /* @__PURE__ */ x.jsx(_o, { style: Xe, ref: Y, draggable: W, resizable: P, draggableOptions: De, resizableOptions: Te, children: r }), t[61] = r, t[62] = W, t[63] = P, t[64] = Xe, t[65] = De, t[66] = Te, t[67] = Ye) : Ye = t[67], Ye;
|
|
2623
2625
|
});
|
|
2624
2626
|
function wo() {
|
|
2625
2627
|
return {
|
|
@@ -2636,8 +2638,8 @@ function yo() {
|
|
|
2636
2638
|
(e = arguments[n]) && typeof e == "string" && (t += (t && " ") + e);
|
|
2637
2639
|
return t;
|
|
2638
2640
|
}
|
|
2639
|
-
const
|
|
2640
|
-
const e =
|
|
2641
|
+
const xo = (n) => {
|
|
2642
|
+
const e = Le.c(191), {
|
|
2641
2643
|
editorData: t,
|
|
2642
2644
|
row: r,
|
|
2643
2645
|
action: s,
|
|
@@ -2647,289 +2649,289 @@ const Ro = (n) => {
|
|
|
2647
2649
|
scaleWidth: a,
|
|
2648
2650
|
scaleSplitCount: u,
|
|
2649
2651
|
startLeft: l,
|
|
2650
|
-
gridSnap:
|
|
2651
|
-
disableDrag:
|
|
2652
|
-
scaleCount:
|
|
2653
|
-
maxScaleCount:
|
|
2652
|
+
gridSnap: m,
|
|
2653
|
+
disableDrag: f,
|
|
2654
|
+
scaleCount: g,
|
|
2655
|
+
maxScaleCount: w,
|
|
2654
2656
|
setScaleCount: S,
|
|
2655
|
-
onActionMoveStart:
|
|
2656
|
-
onActionMoving:
|
|
2657
|
-
onActionMoveEnd:
|
|
2658
|
-
onActionResizeStart:
|
|
2659
|
-
onActionResizeEnd:
|
|
2660
|
-
onActionResizing:
|
|
2661
|
-
snapData:
|
|
2662
|
-
setEditorData:
|
|
2663
|
-
onClickAction:
|
|
2664
|
-
onClickActionOnly:
|
|
2665
|
-
onDoubleClickAction:
|
|
2666
|
-
onContextMenuAction:
|
|
2667
|
-
getActionRender:
|
|
2668
|
-
handleTime:
|
|
2669
|
-
scrollContainerRef:
|
|
2670
|
-
} = n,
|
|
2657
|
+
onActionMoveStart: y,
|
|
2658
|
+
onActionMoving: _,
|
|
2659
|
+
onActionMoveEnd: h,
|
|
2660
|
+
onActionResizeStart: p,
|
|
2661
|
+
onActionResizeEnd: v,
|
|
2662
|
+
onActionResizing: R,
|
|
2663
|
+
snapData: E,
|
|
2664
|
+
setEditorData: T,
|
|
2665
|
+
onClickAction: k,
|
|
2666
|
+
onClickActionOnly: P,
|
|
2667
|
+
onDoubleClickAction: W,
|
|
2668
|
+
onContextMenuAction: U,
|
|
2669
|
+
getActionRender: Q,
|
|
2670
|
+
handleTime: $,
|
|
2671
|
+
scrollContainerRef: ne
|
|
2672
|
+
} = n, Y = te(null), A = te(!1), {
|
|
2671
2673
|
id: M,
|
|
2672
|
-
maxEnd:
|
|
2673
|
-
minStart:
|
|
2674
|
-
end:
|
|
2675
|
-
start:
|
|
2676
|
-
selected:
|
|
2677
|
-
flexible:
|
|
2678
|
-
movable:
|
|
2679
|
-
effectId:
|
|
2680
|
-
} = s,
|
|
2681
|
-
let
|
|
2682
|
-
e[0] !==
|
|
2683
|
-
startLeft:
|
|
2684
|
-
scale:
|
|
2685
|
-
scaleWidth:
|
|
2686
|
-
}), e[0] =
|
|
2687
|
-
const
|
|
2688
|
-
let Oe;
|
|
2689
|
-
e[5] !== P || e[6] !== L || e[7] !== k || e[8] !== Xe ? (Oe = Ye(Xe, {
|
|
2690
|
-
startLeft: k,
|
|
2691
|
-
scale: P,
|
|
2692
|
-
scaleWidth: L
|
|
2693
|
-
}), e[5] = P, e[6] = L, e[7] = k, e[8] = Xe, e[9] = Oe) : Oe = e[9];
|
|
2694
|
-
const Ce = Math.min(tt * L + k, Oe);
|
|
2695
|
-
let Me;
|
|
2696
|
-
e[10] !== re || e[11] !== P || e[12] !== L || e[13] !== k || e[14] !== f ? (Me = vn({
|
|
2697
|
-
start: f,
|
|
2698
|
-
end: re
|
|
2699
|
-
}, {
|
|
2700
|
-
startLeft: k,
|
|
2701
|
-
scale: P,
|
|
2702
|
-
scaleWidth: L
|
|
2703
|
-
}), e[10] = re, e[11] = P, e[12] = L, e[13] = k, e[14] = f, e[15] = Me) : Me = e[15];
|
|
2704
|
-
const Pt = Me, [nt, ze] = Mt(null), _e = nt ?? Pt, je = L / et;
|
|
2674
|
+
maxEnd: K,
|
|
2675
|
+
minStart: q,
|
|
2676
|
+
end: J,
|
|
2677
|
+
start: d,
|
|
2678
|
+
selected: C,
|
|
2679
|
+
flexible: L,
|
|
2680
|
+
movable: V,
|
|
2681
|
+
effectId: ue
|
|
2682
|
+
} = s, N = L === void 0 ? !0 : L, j = V === void 0 ? !0 : V, O = c ?? Yt, I = a ?? Gt, D = l ?? en, Me = u ?? Qn, Ce = w ?? Number.MAX_SAFE_INTEGER, ee = q || 0;
|
|
2683
|
+
let re;
|
|
2684
|
+
e[0] !== O || e[1] !== I || e[2] !== D || e[3] !== ee ? (re = je(ee, {
|
|
2685
|
+
startLeft: D,
|
|
2686
|
+
scale: O,
|
|
2687
|
+
scaleWidth: I
|
|
2688
|
+
}), e[0] = O, e[1] = I, e[2] = D, e[3] = ee, e[4] = re) : re = e[4];
|
|
2689
|
+
const we = re, Fe = K || Number.MAX_VALUE;
|
|
2705
2690
|
let Ne;
|
|
2706
|
-
e[
|
|
2707
|
-
|
|
2691
|
+
e[5] !== O || e[6] !== I || e[7] !== D || e[8] !== Fe ? (Ne = je(Fe, {
|
|
2692
|
+
startLeft: D,
|
|
2693
|
+
scale: O,
|
|
2694
|
+
scaleWidth: I
|
|
2695
|
+
}), e[5] = O, e[6] = I, e[7] = D, e[8] = Fe, e[9] = Ne) : Ne = e[9];
|
|
2696
|
+
const Ae = Math.min(Ce * I + D, Ne);
|
|
2708
2697
|
let Ie;
|
|
2709
|
-
e[
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
}, e[
|
|
2717
|
-
const
|
|
2698
|
+
e[10] !== J || e[11] !== O || e[12] !== I || e[13] !== D || e[14] !== d ? (Ie = vn({
|
|
2699
|
+
start: d,
|
|
2700
|
+
end: J
|
|
2701
|
+
}, {
|
|
2702
|
+
startLeft: D,
|
|
2703
|
+
scale: O,
|
|
2704
|
+
scaleWidth: I
|
|
2705
|
+
}), e[10] = J, e[11] = O, e[12] = I, e[13] = D, e[14] = d, e[15] = Ie) : Ie = e[15];
|
|
2706
|
+
const Pt = Ie, [ot, Ve] = Mt(null), Ee = ot ?? Pt, Ue = I / Me;
|
|
2718
2707
|
let ke;
|
|
2719
|
-
e[
|
|
2720
|
-
|
|
2708
|
+
e[16] !== ue || e[17] !== o || e[18] !== N || e[19] !== j || e[20] !== C ? (ke = pe(yo("action", j && "action-movable", C && "action-selected", N && "action-flexible", o[ue] && `action-effect-${ue}`)), e[16] = ue, e[17] = o, e[18] = N, e[19] = j, e[20] = C, e[21] = ke) : ke = e[21];
|
|
2709
|
+
const $e = ke;
|
|
2710
|
+
let We;
|
|
2711
|
+
e[22] !== I || e[23] !== D || e[24] !== g || e[25] !== S ? (We = (ve, be) => {
|
|
2712
|
+
const ie = Nr(ve + be, {
|
|
2713
|
+
startLeft: D,
|
|
2714
|
+
scaleCount: g,
|
|
2715
|
+
scaleWidth: I
|
|
2716
|
+
});
|
|
2717
|
+
ie !== g && S(ie);
|
|
2718
|
+
}, e[22] = I, e[23] = D, e[24] = g, e[25] = S, e[26] = We) : We = e[26];
|
|
2719
|
+
const Pe = We;
|
|
2720
|
+
let ze;
|
|
2721
|
+
e[27] !== s || e[28] !== y || e[29] !== r ? (ze = () => {
|
|
2722
|
+
y && y({
|
|
2721
2723
|
action: s,
|
|
2722
2724
|
row: r
|
|
2723
2725
|
});
|
|
2724
|
-
}, e[27] = s, e[28] =
|
|
2725
|
-
const
|
|
2726
|
-
let
|
|
2727
|
-
e[31] !== s || e[32] !==
|
|
2726
|
+
}, e[27] = s, e[28] = y, e[29] = r, e[30] = ze) : ze = e[30];
|
|
2727
|
+
const Ze = ze;
|
|
2728
|
+
let He;
|
|
2729
|
+
e[31] !== s || e[32] !== Pe || e[33] !== _ || e[34] !== r || e[35] !== O || e[36] !== I || e[37] !== D ? (He = (ve) => {
|
|
2728
2730
|
const {
|
|
2729
|
-
left:
|
|
2731
|
+
left: be,
|
|
2730
2732
|
width: ie
|
|
2731
|
-
} =
|
|
2732
|
-
if (
|
|
2733
|
+
} = ve;
|
|
2734
|
+
if (A.current = !0, _) {
|
|
2733
2735
|
const {
|
|
2734
|
-
start:
|
|
2735
|
-
end:
|
|
2736
|
+
start: me,
|
|
2737
|
+
end: le
|
|
2736
2738
|
} = Dt({
|
|
2737
|
-
left:
|
|
2739
|
+
left: be,
|
|
2738
2740
|
width: ie
|
|
2739
2741
|
}, {
|
|
2740
|
-
scaleWidth:
|
|
2741
|
-
scale:
|
|
2742
|
-
startLeft:
|
|
2742
|
+
scaleWidth: I,
|
|
2743
|
+
scale: O,
|
|
2744
|
+
startLeft: D
|
|
2743
2745
|
});
|
|
2744
|
-
if (
|
|
2746
|
+
if (_({
|
|
2745
2747
|
action: s,
|
|
2746
2748
|
row: r,
|
|
2747
|
-
start:
|
|
2748
|
-
end:
|
|
2749
|
+
start: me,
|
|
2750
|
+
end: le
|
|
2749
2751
|
}) === !1)
|
|
2750
2752
|
return !1;
|
|
2751
2753
|
}
|
|
2752
|
-
|
|
2753
|
-
left:
|
|
2754
|
+
Ve({
|
|
2755
|
+
left: be,
|
|
2754
2756
|
width: ie
|
|
2755
|
-
}),
|
|
2756
|
-
}, e[31] = s, e[32] =
|
|
2757
|
-
const
|
|
2758
|
-
let
|
|
2759
|
-
e[39] !== t || e[40] !== M || e[41] !==
|
|
2757
|
+
}), Pe(be, ie);
|
|
2758
|
+
}, e[31] = s, e[32] = Pe, e[33] = _, e[34] = r, e[35] = O, e[36] = I, e[37] = D, e[38] = He) : He = e[38];
|
|
2759
|
+
const Be = He;
|
|
2760
|
+
let Xe;
|
|
2761
|
+
e[39] !== t || e[40] !== M || e[41] !== h || e[42] !== r || e[43] !== O || e[44] !== I || e[45] !== D || e[46] !== T ? (Xe = (ve) => {
|
|
2760
2762
|
const {
|
|
2761
|
-
left:
|
|
2763
|
+
left: be,
|
|
2762
2764
|
width: ie
|
|
2763
|
-
} =
|
|
2764
|
-
start:
|
|
2765
|
-
end:
|
|
2765
|
+
} = ve, {
|
|
2766
|
+
start: me,
|
|
2767
|
+
end: le
|
|
2766
2768
|
} = Dt({
|
|
2767
|
-
left:
|
|
2769
|
+
left: be,
|
|
2768
2770
|
width: ie
|
|
2769
2771
|
}, {
|
|
2770
|
-
scaleWidth:
|
|
2771
|
-
scale:
|
|
2772
|
-
startLeft:
|
|
2773
|
-
}),
|
|
2774
|
-
if (!
|
|
2772
|
+
scaleWidth: I,
|
|
2773
|
+
scale: O,
|
|
2774
|
+
startLeft: D
|
|
2775
|
+
}), de = t.find((Je) => Je.id === r.id);
|
|
2776
|
+
if (!de)
|
|
2775
2777
|
return;
|
|
2776
|
-
const
|
|
2777
|
-
|
|
2778
|
-
action:
|
|
2778
|
+
const qe = de.actions.find((Je) => Je.id === M);
|
|
2779
|
+
qe && (qe.start = me, qe.end = le, T(t), h && h({
|
|
2780
|
+
action: qe,
|
|
2779
2781
|
row: r,
|
|
2780
|
-
start:
|
|
2781
|
-
end:
|
|
2782
|
-
}),
|
|
2783
|
-
}, e[39] = t, e[40] = M, e[41] =
|
|
2784
|
-
const
|
|
2785
|
-
let
|
|
2786
|
-
e[48] !== s || e[49] !==
|
|
2787
|
-
|
|
2782
|
+
start: me,
|
|
2783
|
+
end: le
|
|
2784
|
+
}), Ve(null));
|
|
2785
|
+
}, e[39] = t, e[40] = M, e[41] = h, e[42] = r, e[43] = O, e[44] = I, e[45] = D, e[46] = T, e[47] = Xe) : Xe = e[47];
|
|
2786
|
+
const De = Xe;
|
|
2787
|
+
let Te;
|
|
2788
|
+
e[48] !== s || e[49] !== p || e[50] !== r ? (Te = (ve) => {
|
|
2789
|
+
p && p({
|
|
2788
2790
|
action: s,
|
|
2789
2791
|
row: r,
|
|
2790
|
-
dir:
|
|
2792
|
+
dir: ve
|
|
2791
2793
|
});
|
|
2792
|
-
}, e[48] = s, e[49] =
|
|
2793
|
-
const
|
|
2794
|
-
let
|
|
2795
|
-
e[52] !== s || e[53] !==
|
|
2794
|
+
}, e[48] = s, e[49] = p, e[50] = r, e[51] = Te) : Te = e[51];
|
|
2795
|
+
const Ye = Te;
|
|
2796
|
+
let F;
|
|
2797
|
+
e[52] !== s || e[53] !== Pe || e[54] !== R || e[55] !== r || e[56] !== O || e[57] !== I || e[58] !== D ? (F = (ve, be) => {
|
|
2796
2798
|
const {
|
|
2797
2799
|
left: ie,
|
|
2798
|
-
width:
|
|
2799
|
-
} =
|
|
2800
|
-
if (
|
|
2800
|
+
width: me
|
|
2801
|
+
} = be;
|
|
2802
|
+
if (A.current = !0, R) {
|
|
2801
2803
|
const {
|
|
2802
|
-
start:
|
|
2803
|
-
end:
|
|
2804
|
+
start: le,
|
|
2805
|
+
end: de
|
|
2804
2806
|
} = Dt({
|
|
2805
2807
|
left: ie,
|
|
2806
|
-
width:
|
|
2808
|
+
width: me
|
|
2807
2809
|
}, {
|
|
2808
|
-
scaleWidth:
|
|
2809
|
-
scale:
|
|
2810
|
-
startLeft:
|
|
2810
|
+
scaleWidth: I,
|
|
2811
|
+
scale: O,
|
|
2812
|
+
startLeft: D
|
|
2811
2813
|
});
|
|
2812
|
-
if (
|
|
2814
|
+
if (R({
|
|
2813
2815
|
action: s,
|
|
2814
2816
|
row: r,
|
|
2815
|
-
start:
|
|
2816
|
-
end:
|
|
2817
|
-
dir:
|
|
2817
|
+
start: le,
|
|
2818
|
+
end: de,
|
|
2819
|
+
dir: ve
|
|
2818
2820
|
}) === !1)
|
|
2819
2821
|
return !1;
|
|
2820
2822
|
}
|
|
2821
|
-
|
|
2823
|
+
Ve({
|
|
2822
2824
|
left: ie,
|
|
2823
|
-
width:
|
|
2824
|
-
}),
|
|
2825
|
-
}, e[52] = s, e[53] =
|
|
2826
|
-
const
|
|
2827
|
-
let
|
|
2828
|
-
e[60] !== t || e[61] !== M || e[62] !==
|
|
2825
|
+
width: me
|
|
2826
|
+
}), Pe(ie, me);
|
|
2827
|
+
}, e[52] = s, e[53] = Pe, e[54] = R, e[55] = r, e[56] = O, e[57] = I, e[58] = D, e[59] = F) : F = e[59];
|
|
2828
|
+
const G = F;
|
|
2829
|
+
let H;
|
|
2830
|
+
e[60] !== t || e[61] !== M || e[62] !== v || e[63] !== r || e[64] !== O || e[65] !== I || e[66] !== D || e[67] !== T ? (H = (ve, be) => {
|
|
2829
2831
|
const {
|
|
2830
2832
|
left: ie,
|
|
2831
|
-
width:
|
|
2832
|
-
} =
|
|
2833
|
-
start:
|
|
2834
|
-
end:
|
|
2833
|
+
width: me
|
|
2834
|
+
} = be, {
|
|
2835
|
+
start: le,
|
|
2836
|
+
end: de
|
|
2835
2837
|
} = Dt({
|
|
2836
2838
|
left: ie,
|
|
2837
|
-
width:
|
|
2839
|
+
width: me
|
|
2838
2840
|
}, {
|
|
2839
|
-
scaleWidth:
|
|
2840
|
-
scale:
|
|
2841
|
-
startLeft:
|
|
2842
|
-
}),
|
|
2843
|
-
if (!
|
|
2841
|
+
scaleWidth: I,
|
|
2842
|
+
scale: O,
|
|
2843
|
+
startLeft: D
|
|
2844
|
+
}), qe = t.find((sn) => sn.id === r.id);
|
|
2845
|
+
if (!qe)
|
|
2844
2846
|
return;
|
|
2845
|
-
const
|
|
2846
|
-
|
|
2847
|
-
action:
|
|
2847
|
+
const Je = qe.actions.find((sn) => sn.id === M);
|
|
2848
|
+
Je && (Je.start = le, Je.end = de, T(t), v && v({
|
|
2849
|
+
action: Je,
|
|
2848
2850
|
row: r,
|
|
2849
|
-
start:
|
|
2850
|
-
end:
|
|
2851
|
-
dir:
|
|
2852
|
-
}),
|
|
2853
|
-
}, e[60] = t, e[61] = M, e[62] =
|
|
2854
|
-
const
|
|
2855
|
-
let
|
|
2856
|
-
if (e[69] !== s || e[70] !==
|
|
2857
|
-
const
|
|
2851
|
+
start: le,
|
|
2852
|
+
end: de,
|
|
2853
|
+
dir: ve
|
|
2854
|
+
}), Ve(null));
|
|
2855
|
+
}, e[60] = t, e[61] = M, e[62] = v, e[63] = r, e[64] = O, e[65] = I, e[66] = D, e[67] = T, e[68] = H) : H = e[68];
|
|
2856
|
+
const B = H;
|
|
2857
|
+
let he, ce, X, se, z, ae, oe, fe, ye, it, ct, at, lt, ut, ft, dt, Ge, Ke, ht, mt, pt, gt, vt, bt, St, _t;
|
|
2858
|
+
if (e[69] !== s || e[70] !== $e || e[71] !== f || e[72] !== N || e[73] !== Q || e[74] !== Ue || e[75] !== m || e[76] !== Be || e[77] !== De || e[78] !== Ze || e[79] !== B || e[80] !== Ye || e[81] !== G || e[82] !== $ || e[83] !== we || e[84] !== j || e[85] !== k || e[86] !== P || e[87] !== U || e[88] !== W || e[89] !== Ae || e[90] !== r || e[91] !== i || e[92] !== O || e[93] !== I || e[94] !== D || e[95] !== ne || e[96] !== E.assistPositions || e[97] !== Ee.left || e[98] !== Ee.width) {
|
|
2859
|
+
const ve = {
|
|
2858
2860
|
...s,
|
|
2859
2861
|
...Dt({
|
|
2860
|
-
left:
|
|
2861
|
-
width:
|
|
2862
|
+
left: Ee.left,
|
|
2863
|
+
width: Ee.width
|
|
2862
2864
|
}, {
|
|
2863
|
-
startLeft:
|
|
2864
|
-
scaleWidth:
|
|
2865
|
-
scale:
|
|
2865
|
+
startLeft: D,
|
|
2866
|
+
scaleWidth: I,
|
|
2867
|
+
scale: O
|
|
2866
2868
|
})
|
|
2867
|
-
},
|
|
2869
|
+
}, be = {
|
|
2868
2870
|
...r,
|
|
2869
2871
|
actions: [...r.actions]
|
|
2870
2872
|
};
|
|
2871
|
-
r.actions.includes(s) && (
|
|
2872
|
-
left:
|
|
2873
|
-
right:
|
|
2874
|
-
}), e[125] =
|
|
2873
|
+
r.actions.includes(s) && (be.actions[r.actions.indexOf(s)] = ve), he = Rr, ye = Y, it = ne, ct = D, at = Ee.left, lt = Ee.width, ut = m && Ue || mn, ft = m ? Math.max((Ue || mn) / 2, Kt) : Kt, dt = E.assistPositions, e[125] !== we || e[126] !== Ae ? (Ge = () => ({
|
|
2874
|
+
left: we,
|
|
2875
|
+
right: Ae
|
|
2876
|
+
}), e[125] = we, e[126] = Ae, e[127] = Ge) : Ge = e[127];
|
|
2875
2877
|
let ie;
|
|
2876
|
-
e[128] !==
|
|
2877
|
-
let
|
|
2878
|
-
e[131] !==
|
|
2878
|
+
e[128] !== f || e[129] !== N ? (ie = !f && N && `.${pe("action-left-stretch")}`, e[128] = f, e[129] = N, e[130] = ie) : ie = e[130];
|
|
2879
|
+
let me;
|
|
2880
|
+
e[131] !== f || e[132] !== N ? (me = !f && N && `.${pe("action-right-stretch")}`, e[131] = f, e[132] = N, e[133] = me) : me = e[133], e[134] !== ie || e[135] !== me ? (Ke = {
|
|
2879
2881
|
left: ie,
|
|
2880
|
-
right:
|
|
2881
|
-
}, e[134] = ie, e[135] =
|
|
2882
|
-
|
|
2883
|
-
}, e[137] =
|
|
2884
|
-
let
|
|
2885
|
-
|
|
2882
|
+
right: me
|
|
2883
|
+
}, e[134] = ie, e[135] = me, e[136] = Ke) : Ke = e[136], ht = !f && j, mt = !f && N, pt = Ze, gt = Be, vt = De, bt = Ye, St = G, _t = B, e[137] === Symbol.for("react.memo_cache_sentinel") ? (ce = () => {
|
|
2884
|
+
A.current = !1;
|
|
2885
|
+
}, e[137] = ce) : ce = e[137], e[138] !== s || e[139] !== $ || e[140] !== k || e[141] !== P || e[142] !== r ? (X = (le) => {
|
|
2886
|
+
let de;
|
|
2887
|
+
k && (de = $(le), k(le, {
|
|
2886
2888
|
row: r,
|
|
2887
2889
|
action: s,
|
|
2888
|
-
time:
|
|
2889
|
-
})), !
|
|
2890
|
+
time: de
|
|
2891
|
+
})), !A.current && P && (de === void 0 && (de = $(le)), P(le, {
|
|
2890
2892
|
row: r,
|
|
2891
2893
|
action: s,
|
|
2892
|
-
time:
|
|
2894
|
+
time: de
|
|
2893
2895
|
}));
|
|
2894
|
-
}, e[138] = s, e[139] =
|
|
2895
|
-
if (
|
|
2896
|
-
const
|
|
2897
|
-
|
|
2896
|
+
}, e[138] = s, e[139] = $, e[140] = k, e[141] = P, e[142] = r, e[143] = X) : X = e[143], e[144] !== s || e[145] !== $ || e[146] !== W || e[147] !== r ? (se = (le) => {
|
|
2897
|
+
if (W) {
|
|
2898
|
+
const de = $(le);
|
|
2899
|
+
W(le, {
|
|
2898
2900
|
row: r,
|
|
2899
2901
|
action: s,
|
|
2900
|
-
time:
|
|
2902
|
+
time: de
|
|
2901
2903
|
});
|
|
2902
2904
|
}
|
|
2903
|
-
}, e[144] = s, e[145] =
|
|
2904
|
-
if (
|
|
2905
|
-
const
|
|
2906
|
-
|
|
2905
|
+
}, e[144] = s, e[145] = $, e[146] = W, e[147] = r, e[148] = se) : se = e[148], e[149] !== s || e[150] !== $ || e[151] !== U || e[152] !== r ? (z = (le) => {
|
|
2906
|
+
if (U) {
|
|
2907
|
+
const de = $(le);
|
|
2908
|
+
U(le, {
|
|
2907
2909
|
row: r,
|
|
2908
2910
|
action: s,
|
|
2909
|
-
time:
|
|
2911
|
+
time: de
|
|
2910
2912
|
});
|
|
2911
2913
|
}
|
|
2912
|
-
}, e[149] = s, e[150] =
|
|
2914
|
+
}, e[149] = s, e[150] = $, e[151] = U, e[152] = r, e[153] = z) : z = e[153], ae = $e, e[154] !== i ? (oe = {
|
|
2913
2915
|
height: i
|
|
2914
|
-
}, e[154] = i, e[155] =
|
|
2916
|
+
}, e[154] = i, e[155] = oe) : oe = e[155], fe = Q && Q(ve, be), e[69] = s, e[70] = $e, e[71] = f, e[72] = N, e[73] = Q, e[74] = Ue, e[75] = m, e[76] = Be, e[77] = De, e[78] = Ze, e[79] = B, e[80] = Ye, e[81] = G, e[82] = $, e[83] = we, e[84] = j, e[85] = k, e[86] = P, e[87] = U, e[88] = W, e[89] = Ae, e[90] = r, e[91] = i, e[92] = O, e[93] = I, e[94] = D, e[95] = ne, e[96] = E.assistPositions, e[97] = Ee.left, e[98] = Ee.width, e[99] = he, e[100] = ce, e[101] = X, e[102] = se, e[103] = z, e[104] = ae, e[105] = oe, e[106] = fe, e[107] = ye, e[108] = it, e[109] = ct, e[110] = at, e[111] = lt, e[112] = ut, e[113] = ft, e[114] = dt, e[115] = Ge, e[116] = Ke, e[117] = ht, e[118] = mt, e[119] = pt, e[120] = gt, e[121] = vt, e[122] = bt, e[123] = St, e[124] = _t;
|
|
2915
2917
|
} else
|
|
2916
|
-
|
|
2917
|
-
let _t;
|
|
2918
|
-
e[156] !== H ? (_t = H && /* @__PURE__ */ R.jsx("div", { className: fe("action-left-stretch"), style: {
|
|
2919
|
-
touchAction: "none"
|
|
2920
|
-
} }), e[156] = H, e[157] = _t) : _t = e[157];
|
|
2918
|
+
he = e[99], ce = e[100], X = e[101], se = e[102], z = e[103], ae = e[104], oe = e[105], fe = e[106], ye = e[107], it = e[108], ct = e[109], at = e[110], lt = e[111], ut = e[112], ft = e[113], dt = e[114], Ge = e[115], Ke = e[116], ht = e[117], mt = e[118], pt = e[119], gt = e[120], vt = e[121], bt = e[122], St = e[123], _t = e[124];
|
|
2921
2919
|
let wt;
|
|
2922
|
-
e[
|
|
2920
|
+
e[156] !== N ? (wt = N && /* @__PURE__ */ x.jsx("div", { className: pe("action-left-stretch"), style: {
|
|
2923
2921
|
touchAction: "none"
|
|
2924
|
-
} }), e[
|
|
2922
|
+
} }), e[156] = N, e[157] = wt) : wt = e[157];
|
|
2925
2923
|
let Et;
|
|
2926
|
-
e[
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2924
|
+
e[158] !== N ? (Et = N && /* @__PURE__ */ x.jsx("div", { className: pe("action-right-stretch"), style: {
|
|
2925
|
+
touchAction: "none"
|
|
2926
|
+
} }), e[158] = N, e[159] = Et) : Et = e[159];
|
|
2927
|
+
let yt;
|
|
2928
|
+
e[160] !== ce || e[161] !== X || e[162] !== se || e[163] !== z || e[164] !== ae || e[165] !== oe || e[166] !== fe || e[167] !== wt || e[168] !== Et ? (yt = /* @__PURE__ */ x.jsxs("div", { onMouseDown: ce, onClick: X, onDoubleClick: se, onContextMenu: z, className: ae, style: oe, children: [
|
|
2929
|
+
fe,
|
|
2930
|
+
wt,
|
|
2931
|
+
Et
|
|
2932
|
+
] }), e[160] = ce, e[161] = X, e[162] = se, e[163] = z, e[164] = ae, e[165] = oe, e[166] = fe, e[167] = wt, e[168] = Et, e[169] = yt) : yt = e[169];
|
|
2933
|
+
let zt;
|
|
2934
|
+
return e[170] !== he || e[171] !== ye || e[172] !== it || e[173] !== ct || e[174] !== at || e[175] !== lt || e[176] !== ut || e[177] !== ft || e[178] !== dt || e[179] !== Ge || e[180] !== Ke || e[181] !== ht || e[182] !== mt || e[183] !== pt || e[184] !== gt || e[185] !== vt || e[186] !== bt || e[187] !== St || e[188] !== _t || e[189] !== yt ? (zt = /* @__PURE__ */ x.jsx(he, { ref: ye, parentRef: it, start: ct, left: at, width: lt, grid: ut, snapDistance: ft, snapPositions: dt, getBounds: Ge, edges: Ke, enableDragging: ht, enableResizing: mt, onDragStart: pt, onDrag: gt, onDragEnd: vt, onResizeStart: bt, onResize: St, onResizeEnd: _t, children: yt }), e[170] = he, e[171] = ye, e[172] = it, e[173] = ct, e[174] = at, e[175] = lt, e[176] = ut, e[177] = ft, e[178] = dt, e[179] = Ge, e[180] = Ke, e[181] = ht, e[182] = mt, e[183] = pt, e[184] = gt, e[185] = vt, e[186] = bt, e[187] = St, e[188] = _t, e[189] = yt, e[190] = zt) : zt = e[190], zt;
|
|
2933
2935
|
};
|
|
2934
2936
|
function Rt(n, e, t) {
|
|
2935
2937
|
let r = t.initialDeps ?? [], s;
|
|
@@ -2937,25 +2939,25 @@ function Rt(n, e, t) {
|
|
|
2937
2939
|
var i, c, a, u;
|
|
2938
2940
|
let l;
|
|
2939
2941
|
t.key && ((i = t.debug) != null && i.call(t)) && (l = Date.now());
|
|
2940
|
-
const
|
|
2941
|
-
if (!(
|
|
2942
|
+
const m = n();
|
|
2943
|
+
if (!(m.length !== r.length || m.some((w, S) => r[S] !== w)))
|
|
2942
2944
|
return s;
|
|
2943
|
-
r =
|
|
2944
|
-
let
|
|
2945
|
-
if (t.key && ((c = t.debug) != null && c.call(t)) && (
|
|
2946
|
-
const
|
|
2947
|
-
for (
|
|
2948
|
-
|
|
2949
|
-
return
|
|
2945
|
+
r = m;
|
|
2946
|
+
let g;
|
|
2947
|
+
if (t.key && ((c = t.debug) != null && c.call(t)) && (g = Date.now()), s = e(...m), t.key && ((a = t.debug) != null && a.call(t))) {
|
|
2948
|
+
const w = Math.round((Date.now() - l) * 100) / 100, S = Math.round((Date.now() - g) * 100) / 100, y = S / 16, _ = (h, p) => {
|
|
2949
|
+
for (h = String(h); h.length < p; )
|
|
2950
|
+
h = " " + h;
|
|
2951
|
+
return h;
|
|
2950
2952
|
};
|
|
2951
2953
|
console.info(
|
|
2952
|
-
`%c⏱ ${
|
|
2954
|
+
`%c⏱ ${_(S, 5)} /${_(w, 5)} ms`,
|
|
2953
2955
|
`
|
|
2954
2956
|
font-size: .6rem;
|
|
2955
2957
|
font-weight: bold;
|
|
2956
2958
|
color: hsl(${Math.max(
|
|
2957
2959
|
0,
|
|
2958
|
-
Math.min(120 - 120 *
|
|
2960
|
+
Math.min(120 - 120 * y, 120)
|
|
2959
2961
|
)}deg 100% 31%);`,
|
|
2960
2962
|
t?.key
|
|
2961
2963
|
);
|
|
@@ -2966,17 +2968,17 @@ function Rt(n, e, t) {
|
|
|
2966
2968
|
r = i;
|
|
2967
2969
|
}, o;
|
|
2968
2970
|
}
|
|
2969
|
-
function
|
|
2971
|
+
function Xn(n, e) {
|
|
2970
2972
|
if (n === void 0)
|
|
2971
2973
|
throw new Error("Unexpected undefined");
|
|
2972
2974
|
return n;
|
|
2973
2975
|
}
|
|
2974
|
-
const
|
|
2976
|
+
const Ro = (n, e) => Math.abs(n - e) < 1.01, Co = (n, e, t) => {
|
|
2975
2977
|
let r;
|
|
2976
2978
|
return function(...s) {
|
|
2977
2979
|
n.clearTimeout(r), r = n.setTimeout(() => e.apply(this, s), t);
|
|
2978
2980
|
};
|
|
2979
|
-
},
|
|
2981
|
+
}, Yn = (n) => {
|
|
2980
2982
|
const { offsetWidth: e, offsetHeight: t } = n;
|
|
2981
2983
|
return { width: e, height: t };
|
|
2982
2984
|
}, To = (n) => n, Ao = (n) => {
|
|
@@ -2995,7 +2997,7 @@ const xo = (n, e) => Math.abs(n - e) < 1.01, Co = (n, e, t) => {
|
|
|
2995
2997
|
const { width: c, height: a } = i;
|
|
2996
2998
|
e({ width: Math.round(c), height: Math.round(a) });
|
|
2997
2999
|
};
|
|
2998
|
-
if (s(
|
|
3000
|
+
if (s(Yn(t)), !r.ResizeObserver)
|
|
2999
3001
|
return () => {
|
|
3000
3002
|
};
|
|
3001
3003
|
const o = new r.ResizeObserver((i) => {
|
|
@@ -3008,7 +3010,7 @@ const xo = (n, e) => Math.abs(n - e) < 1.01, Co = (n, e, t) => {
|
|
|
3008
3010
|
return;
|
|
3009
3011
|
}
|
|
3010
3012
|
}
|
|
3011
|
-
s(
|
|
3013
|
+
s(Yn(t));
|
|
3012
3014
|
};
|
|
3013
3015
|
n.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(c) : c();
|
|
3014
3016
|
});
|
|
@@ -3033,8 +3035,8 @@ const xo = (n, e) => Math.abs(n - e) < 1.01, Co = (n, e, t) => {
|
|
|
3033
3035
|
},
|
|
3034
3036
|
n.options.isScrollingResetDelay
|
|
3035
3037
|
), i = (l) => () => {
|
|
3036
|
-
const { horizontal:
|
|
3037
|
-
s =
|
|
3038
|
+
const { horizontal: m, isRtl: f } = n.options;
|
|
3039
|
+
s = m ? t.scrollLeft * (f && -1 || 1) : t.scrollTop, o(), e(s, l);
|
|
3038
3040
|
}, c = i(!0), a = i(!1);
|
|
3039
3041
|
a(), t.addEventListener("scroll", c, Gn);
|
|
3040
3042
|
const u = n.options.useScrollendEvent && Kn;
|
|
@@ -3208,14 +3210,14 @@ class Mo {
|
|
|
3208
3210
|
this.pendingMeasuredCacheIndexes = [];
|
|
3209
3211
|
const u = this.measurementsCache.slice(0, a);
|
|
3210
3212
|
for (let l = a; l < t; l++) {
|
|
3211
|
-
const
|
|
3213
|
+
const m = o(l), f = this.options.lanes === 1 ? u[l - 1] : this.getFurthestMeasurement(u, l), g = f ? f.end + this.options.gap : r + s, w = c.get(m), S = typeof w == "number" ? w : this.options.estimateSize(l), y = g + S, _ = f ? f.lane : l % this.options.lanes;
|
|
3212
3214
|
u[l] = {
|
|
3213
3215
|
index: l,
|
|
3214
|
-
start:
|
|
3216
|
+
start: g,
|
|
3215
3217
|
size: S,
|
|
3216
|
-
end:
|
|
3217
|
-
key:
|
|
3218
|
-
lane:
|
|
3218
|
+
end: y,
|
|
3219
|
+
key: m,
|
|
3220
|
+
lane: _
|
|
3219
3221
|
};
|
|
3220
3222
|
}
|
|
3221
3223
|
return this.measurementsCache = u, u;
|
|
@@ -3308,11 +3310,11 @@ class Mo {
|
|
|
3308
3310
|
), this.getVirtualItemForOffset = (t) => {
|
|
3309
3311
|
const r = this.getMeasurements();
|
|
3310
3312
|
if (r.length !== 0)
|
|
3311
|
-
return
|
|
3312
|
-
r[
|
|
3313
|
+
return Xn(
|
|
3314
|
+
r[Cr(
|
|
3313
3315
|
0,
|
|
3314
3316
|
r.length - 1,
|
|
3315
|
-
(s) =>
|
|
3317
|
+
(s) => Xn(r[s]).start,
|
|
3316
3318
|
t
|
|
3317
3319
|
)]
|
|
3318
3320
|
);
|
|
@@ -3358,14 +3360,14 @@ class Mo {
|
|
|
3358
3360
|
console.warn("Failed to get offset for index:", t);
|
|
3359
3361
|
return;
|
|
3360
3362
|
}
|
|
3361
|
-
const [
|
|
3362
|
-
this._scrollToOffset(
|
|
3363
|
-
const
|
|
3364
|
-
if (!
|
|
3363
|
+
const [m, f] = l;
|
|
3364
|
+
this._scrollToOffset(m, { adjustments: void 0, behavior: s }), this.targetWindow.requestAnimationFrame(() => {
|
|
3365
|
+
const g = this.getScrollOffset(), w = this.getOffsetForIndex(t, f);
|
|
3366
|
+
if (!w) {
|
|
3365
3367
|
console.warn("Failed to get offset for index:", t);
|
|
3366
3368
|
return;
|
|
3367
3369
|
}
|
|
3368
|
-
|
|
3370
|
+
Ro(w[0], g) || a(f);
|
|
3369
3371
|
});
|
|
3370
3372
|
}, a = (u) => {
|
|
3371
3373
|
this.targetWindow && (o++, o < i ? (process.env.NODE_ENV !== "production" && this.options.debug && console.info("Schedule retry", o, i), this.targetWindow.requestAnimationFrame(() => c(u))) : console.warn(
|
|
@@ -3411,7 +3413,7 @@ class Mo {
|
|
|
3411
3413
|
}, this.setOptions(e);
|
|
3412
3414
|
}
|
|
3413
3415
|
}
|
|
3414
|
-
const
|
|
3416
|
+
const Cr = (n, e, t, r) => {
|
|
3415
3417
|
for (; n <= e; ) {
|
|
3416
3418
|
const s = (n + e) / 2 | 0, o = t(s);
|
|
3417
3419
|
if (o < r)
|
|
@@ -3435,7 +3437,7 @@ function No({
|
|
|
3435
3437
|
startIndex: 0,
|
|
3436
3438
|
endIndex: s
|
|
3437
3439
|
};
|
|
3438
|
-
let i =
|
|
3440
|
+
let i = Cr(
|
|
3439
3441
|
0,
|
|
3440
3442
|
s,
|
|
3441
3443
|
o,
|
|
@@ -3472,7 +3474,7 @@ function Io(n) {
|
|
|
3472
3474
|
);
|
|
3473
3475
|
return r.setOptions(t), qn(() => r._didMount(), []), qn(() => r._willUpdate()), r;
|
|
3474
3476
|
}
|
|
3475
|
-
function
|
|
3477
|
+
function Tr(n) {
|
|
3476
3478
|
return Io({
|
|
3477
3479
|
observeElementRect: Po,
|
|
3478
3480
|
observeElementOffset: Do,
|
|
@@ -3490,133 +3492,132 @@ const ko = (n) => {
|
|
|
3490
3492
|
scrollContainerRef: i,
|
|
3491
3493
|
startLeft: c,
|
|
3492
3494
|
scale: a,
|
|
3493
|
-
scaleWidth: u
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3495
|
+
scaleWidth: u,
|
|
3496
|
+
unstable_rowActionsOverscan: l
|
|
3497
|
+
} = n, m = ["edit-row"];
|
|
3498
|
+
e?.selected && m.push("edit-row-selected");
|
|
3499
|
+
const f = a ?? Yt, g = u ?? Gt, w = c ?? en, S = (p) => {
|
|
3497
3500
|
if (!i.current) return 0;
|
|
3498
|
-
const
|
|
3499
|
-
return
|
|
3500
|
-
startLeft:
|
|
3501
|
-
scale:
|
|
3502
|
-
scaleWidth:
|
|
3501
|
+
const R = p.currentTarget.getBoundingClientRect(), T = p.clientX - R.x;
|
|
3502
|
+
return Tt(T, {
|
|
3503
|
+
startLeft: w,
|
|
3504
|
+
scale: f,
|
|
3505
|
+
scaleWidth: g
|
|
3503
3506
|
});
|
|
3504
|
-
},
|
|
3507
|
+
}, y = Pr(() => (e?.actions ? [...e.actions] : []).sort((p, v) => p.start - v.start), [e]), _ = Dr((p) => y[p]?.id ?? p, [y]), h = Tr({
|
|
3505
3508
|
horizontal: !0,
|
|
3506
|
-
count:
|
|
3509
|
+
count: y.length,
|
|
3507
3510
|
getItemKey: _,
|
|
3508
3511
|
getScrollElement: () => i.current,
|
|
3509
|
-
estimateSize: (
|
|
3510
|
-
if (!
|
|
3511
|
-
let v =
|
|
3512
|
-
if (v >
|
|
3512
|
+
estimateSize: (p) => {
|
|
3513
|
+
if (!y[p]) return 0;
|
|
3514
|
+
let v = p > 0 ? y[p - 1].end : 0, R = y[p].end;
|
|
3515
|
+
if (v > R) return 0;
|
|
3513
3516
|
let {
|
|
3514
|
-
width:
|
|
3517
|
+
width: E
|
|
3515
3518
|
} = vn({
|
|
3516
3519
|
start: v,
|
|
3517
|
-
end:
|
|
3520
|
+
end: R
|
|
3518
3521
|
}, {
|
|
3519
|
-
startLeft:
|
|
3520
|
-
scale:
|
|
3521
|
-
scaleWidth:
|
|
3522
|
+
startLeft: w,
|
|
3523
|
+
scale: f,
|
|
3524
|
+
scaleWidth: g
|
|
3522
3525
|
});
|
|
3523
|
-
return
|
|
3526
|
+
return E;
|
|
3524
3527
|
},
|
|
3525
|
-
overscan: 5
|
|
3528
|
+
overscan: l ?? 5
|
|
3526
3529
|
});
|
|
3527
|
-
return
|
|
3528
|
-
p.measure();
|
|
3529
|
-
}, [u, c, p]), /* @__PURE__ */ R.jsx("div", { className: `${fe(...l)} ${(e?.classNames || []).join(" ")}`, style: t, onClick: (g) => {
|
|
3530
|
+
return rt(() => h.measure(), [f, g, w, h]), /* @__PURE__ */ x.jsx("div", { className: `${pe(...m)} ${(e?.classNames || []).join(" ")}`, style: t, onClick: (p) => {
|
|
3530
3531
|
if (e && r) {
|
|
3531
|
-
const v =
|
|
3532
|
-
r(
|
|
3532
|
+
const v = S(p);
|
|
3533
|
+
r(p, {
|
|
3533
3534
|
row: e,
|
|
3534
3535
|
time: v
|
|
3535
3536
|
});
|
|
3536
3537
|
}
|
|
3537
|
-
}, onDoubleClick: (
|
|
3538
|
+
}, onDoubleClick: (p) => {
|
|
3538
3539
|
if (e && s) {
|
|
3539
|
-
const v =
|
|
3540
|
-
s(
|
|
3540
|
+
const v = S(p);
|
|
3541
|
+
s(p, {
|
|
3541
3542
|
row: e,
|
|
3542
3543
|
time: v
|
|
3543
3544
|
});
|
|
3544
3545
|
}
|
|
3545
|
-
}, onContextMenu: (
|
|
3546
|
+
}, onContextMenu: (p) => {
|
|
3546
3547
|
if (e && o) {
|
|
3547
|
-
const v =
|
|
3548
|
-
o(
|
|
3548
|
+
const v = S(p);
|
|
3549
|
+
o(p, {
|
|
3549
3550
|
row: e,
|
|
3550
3551
|
time: v
|
|
3551
3552
|
});
|
|
3552
3553
|
}
|
|
3553
|
-
}, children: e &&
|
|
3554
|
-
const v =
|
|
3554
|
+
}, children: e && h.getVirtualItems().map((p) => {
|
|
3555
|
+
const v = y[p.index];
|
|
3555
3556
|
if (!v) throw new Error("Action not found");
|
|
3556
|
-
return /* @__PURE__ */
|
|
3557
|
+
return /* @__PURE__ */ x.jsx(xo, { ...n, handleTime: S, row: e, action: v }, v.id);
|
|
3557
3558
|
}) });
|
|
3558
3559
|
};
|
|
3559
3560
|
function Wo() {
|
|
3560
|
-
const n =
|
|
3561
|
+
const n = Le.c(7);
|
|
3561
3562
|
let e;
|
|
3562
3563
|
n[0] === Symbol.for("react.memo_cache_sentinel") ? (e = {
|
|
3563
3564
|
isMoving: !1,
|
|
3564
3565
|
movePositions: [],
|
|
3565
3566
|
assistPositions: []
|
|
3566
3567
|
}, n[0] = e) : e = n[0];
|
|
3567
|
-
const [t, r] = Mt(e), s =
|
|
3568
|
+
const [t, r] = Mt(e), s = te(null), o = jo, i = zo;
|
|
3568
3569
|
let c;
|
|
3569
|
-
n[1] === Symbol.for("react.memo_cache_sentinel") ? (c = (
|
|
3570
|
+
n[1] === Symbol.for("react.memo_cache_sentinel") ? (c = (y) => {
|
|
3570
3571
|
const {
|
|
3571
|
-
movePositions:
|
|
3572
|
-
assistPositions:
|
|
3573
|
-
action:
|
|
3574
|
-
row:
|
|
3575
|
-
assistActionIds:
|
|
3576
|
-
} =
|
|
3572
|
+
movePositions: _,
|
|
3573
|
+
assistPositions: h,
|
|
3574
|
+
action: p,
|
|
3575
|
+
row: v,
|
|
3576
|
+
assistActionIds: R
|
|
3577
|
+
} = y;
|
|
3577
3578
|
s.current = {
|
|
3578
|
-
action:
|
|
3579
|
-
row:
|
|
3580
|
-
assistActionIds:
|
|
3579
|
+
action: p,
|
|
3580
|
+
row: v,
|
|
3581
|
+
assistActionIds: R
|
|
3581
3582
|
}, r({
|
|
3582
3583
|
isMoving: !0,
|
|
3583
|
-
movePositions:
|
|
3584
|
-
assistPositions:
|
|
3584
|
+
movePositions: _ || [],
|
|
3585
|
+
assistPositions: h || []
|
|
3585
3586
|
});
|
|
3586
3587
|
}, n[1] = c) : c = n[1];
|
|
3587
3588
|
const a = c;
|
|
3588
3589
|
let u;
|
|
3589
|
-
n[2] === Symbol.for("react.memo_cache_sentinel") ? (u = (
|
|
3590
|
+
n[2] === Symbol.for("react.memo_cache_sentinel") ? (u = (y) => {
|
|
3590
3591
|
const {
|
|
3591
|
-
movePositions:
|
|
3592
|
-
assistPositions:
|
|
3593
|
-
} =
|
|
3594
|
-
r((
|
|
3595
|
-
...
|
|
3596
|
-
movePositions:
|
|
3597
|
-
assistPositions:
|
|
3592
|
+
movePositions: _,
|
|
3593
|
+
assistPositions: h
|
|
3594
|
+
} = y;
|
|
3595
|
+
r((p) => ({
|
|
3596
|
+
...p,
|
|
3597
|
+
movePositions: _ || p.movePositions,
|
|
3598
|
+
assistPositions: h || p.assistPositions
|
|
3598
3599
|
}));
|
|
3599
3600
|
}, n[2] = u) : u = n[2];
|
|
3600
3601
|
const l = u;
|
|
3601
|
-
let
|
|
3602
|
-
n[3] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
3602
|
+
let m;
|
|
3603
|
+
n[3] === Symbol.for("react.memo_cache_sentinel") ? (m = () => {
|
|
3603
3604
|
s.current = null, r({
|
|
3604
3605
|
isMoving: !1,
|
|
3605
3606
|
movePositions: [],
|
|
3606
3607
|
assistPositions: []
|
|
3607
3608
|
});
|
|
3608
|
-
}, n[3] =
|
|
3609
|
-
const
|
|
3610
|
-
let
|
|
3611
|
-
n[4] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
3612
|
-
const
|
|
3609
|
+
}, n[3] = m) : m = n[3];
|
|
3610
|
+
const f = m;
|
|
3611
|
+
let g;
|
|
3612
|
+
n[4] === Symbol.for("react.memo_cache_sentinel") ? (g = () => s.current, n[4] = g) : g = n[4];
|
|
3613
|
+
const w = g;
|
|
3613
3614
|
let S;
|
|
3614
3615
|
return n[5] !== t ? (S = {
|
|
3615
3616
|
initSnap: a,
|
|
3616
3617
|
updateSnap: l,
|
|
3617
|
-
disposeSnap:
|
|
3618
|
+
disposeSnap: f,
|
|
3618
3619
|
snapData: t,
|
|
3619
|
-
getActiveDragState:
|
|
3620
|
+
getActiveDragState: w,
|
|
3620
3621
|
defaultGetAssistPosition: o,
|
|
3621
3622
|
defaultGetMovePosition: i
|
|
3622
3623
|
}, n[5] = t, n[6] = S) : S = n[6], S;
|
|
@@ -3654,21 +3655,21 @@ function jo(n) {
|
|
|
3654
3655
|
cursorLeft: a,
|
|
3655
3656
|
hideCursor: u
|
|
3656
3657
|
} = n, l = [];
|
|
3657
|
-
t ? e.forEach((
|
|
3658
|
-
|
|
3659
|
-
t.includes(
|
|
3658
|
+
t ? e.forEach((f) => {
|
|
3659
|
+
f.actions.forEach((g) => {
|
|
3660
|
+
t.includes(g.id) && l.push(g);
|
|
3660
3661
|
});
|
|
3661
|
-
}) : e.forEach((
|
|
3662
|
-
|
|
3663
|
-
|
|
3662
|
+
}) : e.forEach((f) => {
|
|
3663
|
+
f.id !== s.id ? l.push(...f.actions) : f.actions.forEach((g) => {
|
|
3664
|
+
g.id !== r.id && l.push(g);
|
|
3664
3665
|
});
|
|
3665
3666
|
});
|
|
3666
|
-
const
|
|
3667
|
+
const m = er(l, {
|
|
3667
3668
|
startLeft: c,
|
|
3668
3669
|
scale: o,
|
|
3669
3670
|
scaleWidth: i
|
|
3670
3671
|
});
|
|
3671
|
-
return u ||
|
|
3672
|
+
return u || m.push(a), m;
|
|
3672
3673
|
}
|
|
3673
3674
|
const Fo = ({
|
|
3674
3675
|
ref: n,
|
|
@@ -3683,104 +3684,104 @@ const Fo = ({
|
|
|
3683
3684
|
defaultGetAssistPosition: c,
|
|
3684
3685
|
defaultGetMovePosition: a
|
|
3685
3686
|
} = Wo();
|
|
3686
|
-
|
|
3687
|
-
const
|
|
3688
|
-
if (e.snap &&
|
|
3689
|
-
const
|
|
3690
|
-
scaleWidth:
|
|
3691
|
-
scale:
|
|
3692
|
-
startLeft:
|
|
3693
|
-
}),
|
|
3687
|
+
rt(() => {
|
|
3688
|
+
const _ = i();
|
|
3689
|
+
if (e.snap && _ && t.isMoving) {
|
|
3690
|
+
const h = e.scaleWidth ?? 160, p = e.scale ?? 1, v = e.startLeft ?? 20, R = e.hideCursor ?? !1, E = je(e.cursorTime, {
|
|
3691
|
+
scaleWidth: h,
|
|
3692
|
+
scale: p,
|
|
3693
|
+
startLeft: v
|
|
3694
|
+
}), T = c({
|
|
3694
3695
|
editorData: e.editorData,
|
|
3695
|
-
assistActionIds:
|
|
3696
|
-
action:
|
|
3697
|
-
row:
|
|
3698
|
-
scale:
|
|
3699
|
-
scaleWidth:
|
|
3700
|
-
startLeft:
|
|
3701
|
-
hideCursor:
|
|
3702
|
-
cursorLeft:
|
|
3696
|
+
assistActionIds: _.assistActionIds,
|
|
3697
|
+
action: _.action,
|
|
3698
|
+
row: _.row,
|
|
3699
|
+
scale: p,
|
|
3700
|
+
scaleWidth: h,
|
|
3701
|
+
startLeft: v,
|
|
3702
|
+
hideCursor: R,
|
|
3703
|
+
cursorLeft: E
|
|
3703
3704
|
});
|
|
3704
3705
|
s({
|
|
3705
|
-
assistPositions:
|
|
3706
|
+
assistPositions: T
|
|
3706
3707
|
});
|
|
3707
3708
|
} else !e.snap && t.isMoving && s({
|
|
3708
3709
|
assistPositions: []
|
|
3709
3710
|
});
|
|
3710
3711
|
}, [e.snap, t.isMoving]);
|
|
3711
|
-
const u = (
|
|
3712
|
-
const
|
|
3713
|
-
action:
|
|
3714
|
-
row:
|
|
3712
|
+
const u = (_) => {
|
|
3713
|
+
const h = e.getAssistDragLineActionIds && e.getAssistDragLineActionIds({
|
|
3714
|
+
action: _.action,
|
|
3715
|
+
row: _.row,
|
|
3715
3716
|
editorData: e.editorData
|
|
3716
3717
|
});
|
|
3717
3718
|
if (e.snap) {
|
|
3718
|
-
const
|
|
3719
|
-
scaleWidth:
|
|
3720
|
-
scale:
|
|
3721
|
-
startLeft:
|
|
3722
|
-
}),
|
|
3719
|
+
const p = e.scaleWidth ?? 160, v = e.scale ?? 1, R = e.startLeft ?? 20, E = e.hideCursor ?? !1, T = je(e.cursorTime, {
|
|
3720
|
+
scaleWidth: p,
|
|
3721
|
+
scale: v,
|
|
3722
|
+
startLeft: R
|
|
3723
|
+
}), k = c({
|
|
3723
3724
|
editorData: e.editorData,
|
|
3724
|
-
assistActionIds:
|
|
3725
|
-
action:
|
|
3726
|
-
row:
|
|
3727
|
-
scale:
|
|
3728
|
-
scaleWidth:
|
|
3729
|
-
startLeft:
|
|
3730
|
-
hideCursor:
|
|
3731
|
-
cursorLeft:
|
|
3725
|
+
assistActionIds: h,
|
|
3726
|
+
action: _.action,
|
|
3727
|
+
row: _.row,
|
|
3728
|
+
scale: v,
|
|
3729
|
+
scaleWidth: p,
|
|
3730
|
+
startLeft: R,
|
|
3731
|
+
hideCursor: E,
|
|
3732
|
+
cursorLeft: T
|
|
3732
3733
|
});
|
|
3733
3734
|
r({
|
|
3734
|
-
assistPositions:
|
|
3735
|
-
action:
|
|
3736
|
-
row:
|
|
3737
|
-
assistActionIds:
|
|
3735
|
+
assistPositions: k,
|
|
3736
|
+
action: _.action,
|
|
3737
|
+
row: _.row,
|
|
3738
|
+
assistActionIds: h
|
|
3738
3739
|
});
|
|
3739
3740
|
} else
|
|
3740
3741
|
r({
|
|
3741
3742
|
assistPositions: [],
|
|
3742
|
-
action:
|
|
3743
|
-
row:
|
|
3744
|
-
assistActionIds:
|
|
3743
|
+
action: _.action,
|
|
3744
|
+
row: _.row,
|
|
3745
|
+
assistActionIds: h
|
|
3745
3746
|
});
|
|
3746
|
-
}, l = (
|
|
3747
|
+
}, l = (_) => {
|
|
3747
3748
|
if (e.snap) {
|
|
3748
|
-
const
|
|
3749
|
-
...
|
|
3750
|
-
startLeft:
|
|
3751
|
-
scaleWidth:
|
|
3752
|
-
scale:
|
|
3749
|
+
const h = e.scaleWidth ?? 160, p = e.scale ?? 1, v = e.startLeft ?? 20, R = a({
|
|
3750
|
+
..._,
|
|
3751
|
+
startLeft: v,
|
|
3752
|
+
scaleWidth: h,
|
|
3753
|
+
scale: p
|
|
3753
3754
|
});
|
|
3754
3755
|
s({
|
|
3755
|
-
movePositions:
|
|
3756
|
+
movePositions: R
|
|
3756
3757
|
});
|
|
3757
3758
|
}
|
|
3758
|
-
},
|
|
3759
|
-
let
|
|
3760
|
-
for (let
|
|
3761
|
-
const
|
|
3762
|
-
if (!
|
|
3763
|
-
const
|
|
3764
|
-
|
|
3759
|
+
}, m = e.rowHeight ?? 32, f = e.scaleWidth ?? 160, g = e.startLeft ?? 20, w = Math.max(e.scaleCount * f + g, e.timelineWidth), [S, y] = (() => {
|
|
3760
|
+
let _ = [], h = 0;
|
|
3761
|
+
for (let p = 0; p < e.editorData.length; p++) {
|
|
3762
|
+
const v = e.editorData[p];
|
|
3763
|
+
if (!v) continue;
|
|
3764
|
+
const R = v.rowHeight || m;
|
|
3765
|
+
_.push(/* @__PURE__ */ Lr(ko, { ...e, key: v.id, rowData: v, snapData: t, scrollContainerRef: e.scrollElementRef, style: {
|
|
3765
3766
|
position: "absolute",
|
|
3766
3767
|
top: 0,
|
|
3767
3768
|
left: 0,
|
|
3768
|
-
width:
|
|
3769
|
-
height: `${
|
|
3770
|
-
transform: `translateY(${
|
|
3771
|
-
}, onActionMoveStart: (
|
|
3769
|
+
width: w,
|
|
3770
|
+
height: `${R}px`,
|
|
3771
|
+
transform: `translateY(${h}px)`
|
|
3772
|
+
}, onActionMoveStart: (E) => (u(E), e.onActionMoveStart && e.onActionMoveStart(E)), onActionResizeStart: (E) => (u(E), e.onActionResizeStart && e.onActionResizeStart(E)), onActionMoving: (E) => (l(E), e.onActionMoving && e.onActionMoving(E)), onActionResizing: (E) => (l(E), e.onActionResizing && e.onActionResizing(E)), onActionResizeEnd: (E) => (o(), e.onActionResizeEnd && e.onActionResizeEnd(E)), onActionMoveEnd: (E) => (o(), e.onActionMoveEnd && e.onActionMoveEnd(E)) })), h += R;
|
|
3772
3773
|
}
|
|
3773
|
-
return [
|
|
3774
|
+
return [h, _];
|
|
3774
3775
|
})();
|
|
3775
|
-
return /* @__PURE__ */
|
|
3776
|
-
width:
|
|
3776
|
+
return /* @__PURE__ */ x.jsxs("div", { ref: n, style: {
|
|
3777
|
+
width: w,
|
|
3777
3778
|
height: S,
|
|
3778
3779
|
position: "relative",
|
|
3779
3780
|
backgroundPositionX: `0, ${e.startLeft ?? 20}px`,
|
|
3780
3781
|
backgroundSize: `${e.startLeft ?? 20}px, ${e.scaleWidth ?? 160}px`
|
|
3781
3782
|
}, className: "timeline-editor-edit-area", children: [
|
|
3782
|
-
|
|
3783
|
-
e.snap && /* @__PURE__ */
|
|
3783
|
+
y,
|
|
3784
|
+
e.snap && /* @__PURE__ */ x.jsx(qr, { ...t })
|
|
3784
3785
|
] });
|
|
3785
3786
|
};
|
|
3786
3787
|
function Vo({
|
|
@@ -3795,39 +3796,39 @@ function Vo({
|
|
|
3795
3796
|
setCursor: a,
|
|
3796
3797
|
getScaleRender: u
|
|
3797
3798
|
}) {
|
|
3798
|
-
const l = n ?? 1,
|
|
3799
|
+
const l = n ?? 1, m = e ?? 160, f = t ?? 20, g = (n ?? 0) > 0, w = g ? r * (n ?? 1) + 1 : r, S = (g ? m / l : m) * (w - 1) + f, _ = Tr({
|
|
3799
3800
|
horizontal: !0,
|
|
3800
|
-
count:
|
|
3801
|
+
count: w,
|
|
3801
3802
|
getScrollElement: () => i.current,
|
|
3802
|
-
estimateSize: (
|
|
3803
|
-
switch (
|
|
3803
|
+
estimateSize: (h) => {
|
|
3804
|
+
switch (h) {
|
|
3804
3805
|
case 0:
|
|
3805
|
-
return
|
|
3806
|
+
return f;
|
|
3806
3807
|
default:
|
|
3807
|
-
return
|
|
3808
|
+
return g ? m / l : m;
|
|
3808
3809
|
}
|
|
3809
3810
|
},
|
|
3810
3811
|
overscan: 10
|
|
3811
3812
|
});
|
|
3812
|
-
return
|
|
3813
|
+
return rt(() => _.measure(), [o, e, t, _]), /* @__PURE__ */ x.jsx("div", { style: {
|
|
3813
3814
|
width: `${S}px`
|
|
3814
|
-
}, className:
|
|
3815
|
-
const
|
|
3816
|
-
if (
|
|
3817
|
-
const
|
|
3818
|
-
startLeft:
|
|
3819
|
-
scale:
|
|
3820
|
-
scaleWidth:
|
|
3815
|
+
}, className: pe("time-area"), onClick: (h) => {
|
|
3816
|
+
const p = t ?? 20, v = e ?? 160, R = o ?? 1, E = s ?? 1 / 0, T = h.currentTarget.getBoundingClientRect(), k = h.clientX - T.x, P = Math.max(k, p);
|
|
3817
|
+
if (P > E * v + p) return;
|
|
3818
|
+
const W = Tt(P, {
|
|
3819
|
+
startLeft: p,
|
|
3820
|
+
scale: R,
|
|
3821
|
+
scaleWidth: v
|
|
3821
3822
|
});
|
|
3822
|
-
c && c(
|
|
3823
|
-
time:
|
|
3823
|
+
c && c(W, h), !h.defaultPrevented && a({
|
|
3824
|
+
time: W
|
|
3824
3825
|
});
|
|
3825
|
-
}, children:
|
|
3826
|
-
const
|
|
3827
|
-
return /* @__PURE__ */
|
|
3828
|
-
width: `${
|
|
3829
|
-
transform: `translateX(${
|
|
3830
|
-
}, className:
|
|
3826
|
+
}, children: _.getVirtualItems().map((h) => {
|
|
3827
|
+
const p = h.index, v = n ?? 1, R = o ?? 1, E = g ? p % v === 0 : !0, T = [pe("time-unit"), pe(E ? "time-unit-big" : "time-unit-small")], k = (g ? p / v : p) * R;
|
|
3828
|
+
return /* @__PURE__ */ x.jsx("div", { "data-index": h.index, style: {
|
|
3829
|
+
width: `${h.size}px`,
|
|
3830
|
+
transform: `translateX(${h.start}px)`
|
|
3831
|
+
}, className: T.join(" "), children: /* @__PURE__ */ x.jsx(Or, { mode: E ? "visible" : "hidden", children: /* @__PURE__ */ x.jsx("div", { className: pe("time-unit-scale"), children: u?.(k) ?? k }) }) }, h.key);
|
|
3831
3832
|
}) });
|
|
3832
3833
|
}
|
|
3833
3834
|
function Uo(n) {
|
|
@@ -3845,44 +3846,44 @@ function $o(n, e, t) {
|
|
|
3845
3846
|
function Ho(n) {
|
|
3846
3847
|
return Uo(n) && "ownerSVGElement" in n;
|
|
3847
3848
|
}
|
|
3848
|
-
const
|
|
3849
|
-
let
|
|
3850
|
-
const
|
|
3851
|
-
function
|
|
3852
|
-
|
|
3849
|
+
const Ht = /* @__PURE__ */ new WeakMap();
|
|
3850
|
+
let Bt;
|
|
3851
|
+
const Ar = (n, e, t) => (r, s) => s && s[0] ? s[0][n + "Size"] : Ho(r) && "getBBox" in r ? r.getBBox()[e] : r[t], Bo = /* @__PURE__ */ Ar("inline", "width", "offsetWidth"), Xo = /* @__PURE__ */ Ar("block", "height", "offsetHeight");
|
|
3852
|
+
function Yo({ target: n, borderBoxSize: e }) {
|
|
3853
|
+
Ht.get(n)?.forEach((t) => {
|
|
3853
3854
|
t(n, {
|
|
3854
3855
|
get width() {
|
|
3855
3856
|
return Bo(n, e);
|
|
3856
3857
|
},
|
|
3857
3858
|
get height() {
|
|
3858
|
-
return
|
|
3859
|
+
return Xo(n, e);
|
|
3859
3860
|
}
|
|
3860
3861
|
});
|
|
3861
3862
|
});
|
|
3862
3863
|
}
|
|
3863
3864
|
function Go(n) {
|
|
3864
|
-
n.forEach(
|
|
3865
|
+
n.forEach(Yo);
|
|
3865
3866
|
}
|
|
3866
3867
|
function Ko() {
|
|
3867
|
-
typeof ResizeObserver > "u" || (
|
|
3868
|
+
typeof ResizeObserver > "u" || (Bt = new ResizeObserver(Go));
|
|
3868
3869
|
}
|
|
3869
3870
|
function qo(n, e) {
|
|
3870
|
-
|
|
3871
|
+
Bt || Ko();
|
|
3871
3872
|
const t = $o(n);
|
|
3872
3873
|
return t.forEach((r) => {
|
|
3873
|
-
let s =
|
|
3874
|
-
s || (s = /* @__PURE__ */ new Set(),
|
|
3874
|
+
let s = Ht.get(r);
|
|
3875
|
+
s || (s = /* @__PURE__ */ new Set(), Ht.set(r, s)), s.add(e), Bt?.observe(r);
|
|
3875
3876
|
}), () => {
|
|
3876
3877
|
t.forEach((r) => {
|
|
3877
|
-
const s =
|
|
3878
|
-
s?.delete(e), s?.size ||
|
|
3878
|
+
const s = Ht.get(r);
|
|
3879
|
+
s?.delete(e), s?.size || Bt?.unobserve(r);
|
|
3879
3880
|
});
|
|
3880
3881
|
};
|
|
3881
3882
|
}
|
|
3882
3883
|
const Xt = /* @__PURE__ */ new Set();
|
|
3883
|
-
let
|
|
3884
|
+
let Ct;
|
|
3884
3885
|
function Jo() {
|
|
3885
|
-
|
|
3886
|
+
Ct = () => {
|
|
3886
3887
|
const n = {
|
|
3887
3888
|
get width() {
|
|
3888
3889
|
return window.innerWidth;
|
|
@@ -3892,18 +3893,18 @@ function Jo() {
|
|
|
3892
3893
|
}
|
|
3893
3894
|
};
|
|
3894
3895
|
Xt.forEach((e) => e(n));
|
|
3895
|
-
}, window.addEventListener("resize",
|
|
3896
|
+
}, window.addEventListener("resize", Ct);
|
|
3896
3897
|
}
|
|
3897
3898
|
function Zo(n) {
|
|
3898
|
-
return Xt.add(n),
|
|
3899
|
-
Xt.delete(n), !Xt.size && typeof
|
|
3899
|
+
return Xt.add(n), Ct || Jo(), () => {
|
|
3900
|
+
Xt.delete(n), !Xt.size && typeof Ct == "function" && (window.removeEventListener("resize", Ct), Ct = void 0);
|
|
3900
3901
|
};
|
|
3901
3902
|
}
|
|
3902
3903
|
function Qo(n, e) {
|
|
3903
3904
|
return typeof n == "function" ? Zo(n) : qo(n, e);
|
|
3904
3905
|
}
|
|
3905
3906
|
function ei(n) {
|
|
3906
|
-
const e =
|
|
3907
|
+
const e = Le.c(4), {
|
|
3907
3908
|
elementRef: t
|
|
3908
3909
|
} = n;
|
|
3909
3910
|
let r;
|
|
@@ -3920,10 +3921,10 @@ function ei(n) {
|
|
|
3920
3921
|
height: u.height
|
|
3921
3922
|
});
|
|
3922
3923
|
});
|
|
3923
|
-
}, c = [t], e[1] = t, e[2] = i, e[3] = c) : (i = e[2], c = e[3]),
|
|
3924
|
+
}, c = [t], e[1] = t, e[2] = i, e[3] = c) : (i = e[2], c = e[3]), Qt(i, c), s;
|
|
3924
3925
|
}
|
|
3925
3926
|
const ti = (n) => {
|
|
3926
|
-
const e =
|
|
3927
|
+
const e = Le.c(47), {
|
|
3927
3928
|
disableDrag: t,
|
|
3928
3929
|
cursorTime: r,
|
|
3929
3930
|
setCursor: s,
|
|
@@ -3933,102 +3934,132 @@ const ti = (n) => {
|
|
|
3933
3934
|
scaleCount: a,
|
|
3934
3935
|
scaleSplitCount: u,
|
|
3935
3936
|
scrollElementRef: l,
|
|
3936
|
-
maxScaleCount:
|
|
3937
|
-
onCursorDragStart:
|
|
3938
|
-
onCursorDrag:
|
|
3939
|
-
onCursorDragEnd:
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3937
|
+
maxScaleCount: m,
|
|
3938
|
+
onCursorDragStart: f,
|
|
3939
|
+
onCursorDrag: g,
|
|
3940
|
+
onCursorDragEnd: w,
|
|
3941
|
+
cursorSnap: S,
|
|
3942
|
+
editorData: y
|
|
3943
|
+
} = n, _ = te(null), h = te(void 0), p = o ?? 20, v = i ?? 160, R = c ?? 1;
|
|
3944
|
+
let E;
|
|
3945
|
+
e[0] !== S ? (E = (N, j, O, I) => {
|
|
3946
|
+
if (!S || !N)
|
|
3947
|
+
return [];
|
|
3948
|
+
const D = N.flatMap(ni);
|
|
3949
|
+
return er(D, {
|
|
3950
|
+
startLeft: j,
|
|
3951
|
+
scale: I,
|
|
3952
|
+
scaleWidth: O
|
|
3953
|
+
});
|
|
3954
|
+
}, e[0] = S, e[1] = E) : E = e[1];
|
|
3955
|
+
const T = E, k = ri;
|
|
3956
|
+
let P, W;
|
|
3957
|
+
e[2] !== r || e[3] !== c || e[4] !== i || e[5] !== o ? (P = () => {
|
|
3958
|
+
if (typeof h.current > "u" && _.current) {
|
|
3959
|
+
const N = o ?? 20, j = i ?? 160, O = c ?? 1;
|
|
3960
|
+
_.current.updateLeft(je(r, {
|
|
3961
|
+
startLeft: N,
|
|
3962
|
+
scaleWidth: j,
|
|
3963
|
+
scale: O
|
|
3949
3964
|
}));
|
|
3950
3965
|
}
|
|
3951
|
-
},
|
|
3952
|
-
const
|
|
3953
|
-
let
|
|
3954
|
-
e[
|
|
3966
|
+
}, W = [r, o, i, c], e[2] = r, e[3] = c, e[4] = i, e[5] = o, e[6] = P, e[7] = W) : (P = e[6], W = e[7]), rt(P, W);
|
|
3967
|
+
const U = m ?? 1 / 0, Q = (u ?? 0) > 0, $ = u ?? 1, ne = Q ? a * (u ?? 1) + 1 : a, Y = o ?? 20, A = (Q ? v / $ : v) * (ne - 1) + Y;
|
|
3968
|
+
let M;
|
|
3969
|
+
e[8] !== p || e[9] !== U || e[10] !== l || e[11] !== A || e[12] !== v ? (M = () => ({
|
|
3955
3970
|
left: 0,
|
|
3956
|
-
right: Math.min(
|
|
3957
|
-
}), e[
|
|
3958
|
-
const
|
|
3959
|
-
let
|
|
3960
|
-
e[
|
|
3961
|
-
const
|
|
3962
|
-
startLeft:
|
|
3963
|
-
scaleWidth:
|
|
3964
|
-
scale:
|
|
3971
|
+
right: Math.min(A, U * v + p - (l.current?.scrollLeft ?? 0))
|
|
3972
|
+
}), e[8] = p, e[9] = U, e[10] = l, e[11] = A, e[12] = v, e[13] = M) : M = e[13];
|
|
3973
|
+
const K = !t;
|
|
3974
|
+
let q;
|
|
3975
|
+
e[14] !== r || e[15] !== p || e[16] !== f || e[17] !== R || e[18] !== v ? (q = () => {
|
|
3976
|
+
const N = _.current?.getLeft() ?? je(r, {
|
|
3977
|
+
startLeft: p,
|
|
3978
|
+
scaleWidth: v,
|
|
3979
|
+
scale: R
|
|
3965
3980
|
});
|
|
3966
|
-
|
|
3967
|
-
const
|
|
3968
|
-
startLeft:
|
|
3969
|
-
scale:
|
|
3970
|
-
scaleWidth:
|
|
3981
|
+
h.current = N;
|
|
3982
|
+
const j = Tt(N, {
|
|
3983
|
+
startLeft: p,
|
|
3984
|
+
scale: R,
|
|
3985
|
+
scaleWidth: v
|
|
3971
3986
|
});
|
|
3972
|
-
|
|
3973
|
-
}, e[
|
|
3974
|
-
let
|
|
3975
|
-
e[
|
|
3976
|
-
if (typeof
|
|
3977
|
-
const
|
|
3978
|
-
startLeft:
|
|
3979
|
-
scale:
|
|
3980
|
-
scaleWidth:
|
|
3987
|
+
f && f(j), _.current?.updateLeft(N);
|
|
3988
|
+
}, e[14] = r, e[15] = p, e[16] = f, e[17] = R, e[18] = v, e[19] = q) : q = e[19];
|
|
3989
|
+
let J;
|
|
3990
|
+
e[20] !== p || e[21] !== w || e[22] !== R || e[23] !== s || e[24] !== v ? (J = () => {
|
|
3991
|
+
if (typeof h.current < "u") {
|
|
3992
|
+
const N = Tt(h.current, {
|
|
3993
|
+
startLeft: p,
|
|
3994
|
+
scale: R,
|
|
3995
|
+
scaleWidth: v
|
|
3981
3996
|
});
|
|
3982
3997
|
s({
|
|
3983
|
-
time:
|
|
3984
|
-
}),
|
|
3998
|
+
time: N
|
|
3999
|
+
}), w && w(N);
|
|
3985
4000
|
}
|
|
3986
|
-
|
|
3987
|
-
}, e[
|
|
3988
|
-
let
|
|
3989
|
-
e[
|
|
4001
|
+
h.current = void 0;
|
|
4002
|
+
}, e[20] = p, e[21] = w, e[22] = R, e[23] = s, e[24] = v, e[25] = J) : J = e[25];
|
|
4003
|
+
let d;
|
|
4004
|
+
e[26] !== S || e[27] !== y || e[28] !== T || e[29] !== p || e[30] !== g || e[31] !== R || e[32] !== l || e[33] !== s || e[34] !== v ? (d = (N, j) => {
|
|
3990
4005
|
const {
|
|
3991
|
-
left:
|
|
3992
|
-
} =
|
|
3993
|
-
if (
|
|
3994
|
-
if (typeof
|
|
3995
|
-
|
|
3996
|
-
const
|
|
3997
|
-
|
|
4006
|
+
left: O
|
|
4007
|
+
} = N, I = j === void 0 ? 0 : j, D = l.current?.scrollLeft ?? 0, Me = l.current, Ce = Me?.clientWidth ?? 0;
|
|
4008
|
+
if (I !== 0)
|
|
4009
|
+
if (typeof h.current < "u") {
|
|
4010
|
+
h.current = h.current + I;
|
|
4011
|
+
const ee = D, re = D + Ce;
|
|
4012
|
+
h.current < ee + 10 ? h.current = ee + 10 : h.current > re - 10 && (h.current = re - 10), h.current < p - D && (h.current = p - D);
|
|
3998
4013
|
} else {
|
|
3999
|
-
|
|
4000
|
-
const
|
|
4001
|
-
|
|
4014
|
+
h.current = O + I;
|
|
4015
|
+
const ee = D, re = D + Ce;
|
|
4016
|
+
h.current < ee + 10 ? h.current = ee + 10 : h.current > re - 10 && (h.current = re - 10);
|
|
4002
4017
|
}
|
|
4003
|
-
else if (
|
|
4004
|
-
const
|
|
4005
|
-
|
|
4018
|
+
else if (O < p - D ? h.current = p - D : h.current = O, Me && Ce > 0) {
|
|
4019
|
+
const ee = D, re = D + Ce;
|
|
4020
|
+
h.current < ee + 10 ? h.current = ee + 10 : h.current > re - 10 && (h.current = re - 10);
|
|
4006
4021
|
}
|
|
4007
|
-
if (typeof
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
-
|
|
4022
|
+
if (typeof h.current < "u") {
|
|
4023
|
+
let ee = h.current;
|
|
4024
|
+
if (S) {
|
|
4025
|
+
const we = T(y, p, v, R);
|
|
4026
|
+
we.length > 0 && (ee = k(h.current, we, Kt), h.current = ee);
|
|
4027
|
+
}
|
|
4028
|
+
_.current?.updateLeft(ee);
|
|
4029
|
+
const re = Tt(ee, {
|
|
4030
|
+
startLeft: p,
|
|
4031
|
+
scale: R,
|
|
4032
|
+
scaleWidth: v
|
|
4013
4033
|
});
|
|
4014
4034
|
s({
|
|
4015
|
-
time:
|
|
4016
|
-
}),
|
|
4035
|
+
time: re
|
|
4036
|
+
}), g && g(re);
|
|
4017
4037
|
}
|
|
4018
4038
|
return !1;
|
|
4019
|
-
}, e[
|
|
4020
|
-
let
|
|
4021
|
-
e[
|
|
4022
|
-
let
|
|
4023
|
-
e[
|
|
4024
|
-
/* @__PURE__ */
|
|
4025
|
-
/* @__PURE__ */
|
|
4026
|
-
] }), e[
|
|
4027
|
-
let
|
|
4028
|
-
return e[
|
|
4039
|
+
}, e[26] = S, e[27] = y, e[28] = T, e[29] = p, e[30] = g, e[31] = R, e[32] = l, e[33] = s, e[34] = v, e[35] = d) : d = e[35];
|
|
4040
|
+
let C, L;
|
|
4041
|
+
e[36] === Symbol.for("react.memo_cache_sentinel") ? (L = pe("cursor"), C = pe("cursor-top"), e[36] = C, e[37] = L) : (C = e[36], L = e[37]);
|
|
4042
|
+
let V;
|
|
4043
|
+
e[38] === Symbol.for("react.memo_cache_sentinel") ? (V = /* @__PURE__ */ x.jsxs("div", { className: L, children: [
|
|
4044
|
+
/* @__PURE__ */ x.jsx("svg", { className: C, width: "8", height: "12", viewBox: "0 0 8 12", fill: "none", children: /* @__PURE__ */ x.jsx("path", { d: "M0 1C0 0.447715 0.447715 0 1 0H7C7.55228 0 8 0.447715 8 1V9.38197C8 9.76074 7.786 10.107 7.44721 10.2764L4.44721 11.7764C4.16569 11.9172 3.83431 11.9172 3.55279 11.7764L0.552786 10.2764C0.214002 10.107 0 9.76074 0 9.38197V1Z", fill: "currentColor" }) }),
|
|
4045
|
+
/* @__PURE__ */ x.jsx("div", { className: pe("cursor-area") })
|
|
4046
|
+
] }), e[38] = V) : V = e[38];
|
|
4047
|
+
let ue;
|
|
4048
|
+
return e[39] !== p || e[40] !== l || e[41] !== M || e[42] !== K || e[43] !== q || e[44] !== J || e[45] !== d ? (ue = /* @__PURE__ */ x.jsx(Rr, { start: p, ref: _, parentRef: l, getBounds: M, autoScroll: !0, enableDragging: K, enableResizing: !1, onDragStart: q, onDragEnd: J, onDrag: d, children: V }), e[39] = p, e[40] = l, e[41] = M, e[42] = K, e[43] = q, e[44] = J, e[45] = d, e[46] = ue) : ue = e[46], ue;
|
|
4029
4049
|
};
|
|
4050
|
+
function ni(n) {
|
|
4051
|
+
return n.actions;
|
|
4052
|
+
}
|
|
4053
|
+
function ri(n, e, t) {
|
|
4054
|
+
let r = n, s = Number.MAX_SAFE_INTEGER;
|
|
4055
|
+
for (const o of e) {
|
|
4056
|
+
const i = Math.abs(o - n);
|
|
4057
|
+
i < t && i < s && (r = o, s = i);
|
|
4058
|
+
}
|
|
4059
|
+
return r;
|
|
4060
|
+
}
|
|
4030
4061
|
function Jn(n) {
|
|
4031
|
-
const e =
|
|
4062
|
+
const e = Le.c(9);
|
|
4032
4063
|
let t, r, s;
|
|
4033
4064
|
e[0] !== n ? ({
|
|
4034
4065
|
className: t,
|
|
@@ -4037,41 +4068,41 @@ function Jn(n) {
|
|
|
4037
4068
|
} = n, e[0] = n, e[1] = t, e[2] = r, e[3] = s) : (t = e[1], r = e[2], s = e[3]);
|
|
4038
4069
|
const o = s === void 0 ? "vertical" : s;
|
|
4039
4070
|
let i;
|
|
4040
|
-
e[4] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */
|
|
4071
|
+
e[4] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ x.jsx(_r, { "data-slot": "scroll-area-thumb" }), e[4] = i) : i = e[4];
|
|
4041
4072
|
let c;
|
|
4042
|
-
return e[5] !== t || e[6] !== o || e[7] !== r ? (c = /* @__PURE__ */
|
|
4073
|
+
return e[5] !== t || e[6] !== o || e[7] !== r ? (c = /* @__PURE__ */ x.jsx(gr, { "data-slot": "scroll-area-scrollbar", orientation: o, className: t, ...r, children: i }), e[5] = t, e[6] = o, e[7] = r, e[8] = c) : c = e[8], c;
|
|
4043
4074
|
}
|
|
4044
|
-
function
|
|
4045
|
-
const e =
|
|
4075
|
+
function si(n) {
|
|
4076
|
+
const e = Le.c(7), {
|
|
4046
4077
|
scrollElementRef: t,
|
|
4047
4078
|
scale: r,
|
|
4048
4079
|
scaleWidth: s,
|
|
4049
4080
|
startLeft: o,
|
|
4050
4081
|
cursorTimeRef: i
|
|
4051
|
-
} = n, c =
|
|
4082
|
+
} = n, c = te(null), a = te(null);
|
|
4052
4083
|
let u, l;
|
|
4053
4084
|
e[0] !== i || e[1] !== r || e[2] !== s || e[3] !== t || e[4] !== o ? (u = () => {
|
|
4054
|
-
const
|
|
4055
|
-
if (c.current !== null && a.current !== null &&
|
|
4056
|
-
const
|
|
4085
|
+
const m = t.current;
|
|
4086
|
+
if (c.current !== null && a.current !== null && m && (c.current !== r || a.current !== s)) {
|
|
4087
|
+
const f = m.scrollLeft, g = i.current, w = je(g, {
|
|
4057
4088
|
startLeft: o,
|
|
4058
4089
|
scale: c.current,
|
|
4059
4090
|
scaleWidth: a.current
|
|
4060
|
-
}), S =
|
|
4091
|
+
}), S = je(g, {
|
|
4061
4092
|
startLeft: o,
|
|
4062
4093
|
scale: r,
|
|
4063
4094
|
scaleWidth: s
|
|
4064
|
-
}),
|
|
4065
|
-
|
|
4095
|
+
}), y = w - f, _ = S - y;
|
|
4096
|
+
m.scrollLeft = _;
|
|
4066
4097
|
}
|
|
4067
4098
|
c.current = r, a.current = s;
|
|
4068
|
-
}, l = [r, s, o, t, i], e[0] = i, e[1] = r, e[2] = s, e[3] = t, e[4] = o, e[5] = u, e[6] = l) : (u = e[5], l = e[6]),
|
|
4099
|
+
}, l = [r, s, o, t, i], e[0] = i, e[1] = r, e[2] = s, e[3] = t, e[4] = o, e[5] = u, e[6] = l) : (u = e[5], l = e[6]), Qt(u, l);
|
|
4069
4100
|
}
|
|
4070
|
-
function
|
|
4101
|
+
function ai({
|
|
4071
4102
|
ref: n,
|
|
4072
4103
|
...e
|
|
4073
4104
|
}) {
|
|
4074
|
-
const t = Br(e), r =
|
|
4105
|
+
const t = Br(e), r = te(null), {
|
|
4075
4106
|
width: s,
|
|
4076
4107
|
height: o
|
|
4077
4108
|
} = ei({
|
|
@@ -4080,58 +4111,73 @@ function ii({
|
|
|
4080
4111
|
scale: t.scale,
|
|
4081
4112
|
pad: 0.1
|
|
4082
4113
|
}), Math.ceil((s - t.startLeft) / t.scaleWidth)), c = Math.min(t.maxScaleCount, i), [a, u] = Mt(null);
|
|
4083
|
-
|
|
4114
|
+
Qt(() => {
|
|
4084
4115
|
u(null);
|
|
4085
4116
|
}, [c]);
|
|
4086
|
-
const l = a ?? c,
|
|
4087
|
-
const
|
|
4088
|
-
u(
|
|
4089
|
-
}, [
|
|
4090
|
-
|
|
4117
|
+
const l = a ?? c, m = (h) => {
|
|
4118
|
+
const p = Math.min(t.maxScaleCount, h);
|
|
4119
|
+
u(p);
|
|
4120
|
+
}, [f, g] = Mt(yn), w = te(yn);
|
|
4121
|
+
si({
|
|
4091
4122
|
scrollElementRef: r,
|
|
4092
4123
|
scale: t.scale,
|
|
4093
4124
|
scaleWidth: t.scaleWidth,
|
|
4094
4125
|
startLeft: t.startLeft,
|
|
4095
|
-
cursorTimeRef:
|
|
4126
|
+
cursorTimeRef: w
|
|
4096
4127
|
});
|
|
4097
|
-
const S = (
|
|
4098
|
-
t.onChange?.(
|
|
4099
|
-
},
|
|
4128
|
+
const S = (h) => {
|
|
4129
|
+
t.onChange?.(h);
|
|
4130
|
+
}, y = (h) => {
|
|
4100
4131
|
let {
|
|
4101
|
-
left:
|
|
4132
|
+
left: p,
|
|
4102
4133
|
time: v
|
|
4103
|
-
} =
|
|
4104
|
-
return typeof v < "u" ? (
|
|
4134
|
+
} = h;
|
|
4135
|
+
return typeof v < "u" ? (g(v), w.current = v, !0) : typeof p < "u" ? (g(w.current = Tt(p, {
|
|
4105
4136
|
startLeft: t.startLeft,
|
|
4106
4137
|
scale: t.scale,
|
|
4107
4138
|
scaleWidth: t.scaleWidth
|
|
4108
4139
|
})), !0) : !1;
|
|
4140
|
+
}, _ = (h, p = {}) => {
|
|
4141
|
+
const v = r.current;
|
|
4142
|
+
if (!v) return;
|
|
4143
|
+
const {
|
|
4144
|
+
block: R = "start",
|
|
4145
|
+
offset: E = 0
|
|
4146
|
+
} = p, T = je(h, {
|
|
4147
|
+
startLeft: t.startLeft,
|
|
4148
|
+
scale: t.scale,
|
|
4149
|
+
scaleWidth: t.scaleWidth
|
|
4150
|
+
}), k = v.clientWidth;
|
|
4151
|
+
let P;
|
|
4152
|
+
R === "end" ? P = T - k + E : R === "center" ? P = T - k / 2 : P = T - E;
|
|
4153
|
+
const W = Math.max(0, v.scrollWidth - k);
|
|
4154
|
+
v.scrollLeft = Math.min(Math.max(P, 0), W);
|
|
4109
4155
|
};
|
|
4110
4156
|
return Zn(n, () => ({
|
|
4111
4157
|
get target() {
|
|
4112
4158
|
return r.current;
|
|
4113
4159
|
},
|
|
4114
|
-
set time(
|
|
4115
|
-
|
|
4116
|
-
time:
|
|
4160
|
+
set time(h) {
|
|
4161
|
+
y({
|
|
4162
|
+
time: h
|
|
4117
4163
|
});
|
|
4118
4164
|
},
|
|
4119
4165
|
get time() {
|
|
4120
|
-
return
|
|
4166
|
+
return w.current;
|
|
4121
4167
|
},
|
|
4122
4168
|
getTime() {
|
|
4123
|
-
return
|
|
4169
|
+
return w.current;
|
|
4124
4170
|
},
|
|
4125
|
-
setTime(
|
|
4126
|
-
|
|
4127
|
-
time:
|
|
4171
|
+
setTime(h) {
|
|
4172
|
+
y({
|
|
4173
|
+
time: h
|
|
4128
4174
|
});
|
|
4129
4175
|
},
|
|
4130
|
-
setScrollLeft: (
|
|
4131
|
-
r.current && (r.current.scrollLeft =
|
|
4176
|
+
setScrollLeft: (h) => {
|
|
4177
|
+
r.current && (r.current.scrollLeft = h);
|
|
4132
4178
|
},
|
|
4133
|
-
setScrollTop: (
|
|
4134
|
-
r.current && (r.current.scrollTop =
|
|
4179
|
+
setScrollTop: (h) => {
|
|
4180
|
+
r.current && (r.current.scrollTop = h);
|
|
4135
4181
|
},
|
|
4136
4182
|
get scrollLeft() {
|
|
4137
4183
|
return r.current ? r.current.scrollLeft : 0;
|
|
@@ -4139,25 +4185,26 @@ function ii({
|
|
|
4139
4185
|
get scrollTop() {
|
|
4140
4186
|
return r.current ? r.current.scrollTop : 0;
|
|
4141
4187
|
},
|
|
4142
|
-
set scrollLeft(
|
|
4143
|
-
r.current && (r.current.scrollLeft =
|
|
4188
|
+
set scrollLeft(h) {
|
|
4189
|
+
r.current && (r.current.scrollLeft = h);
|
|
4144
4190
|
},
|
|
4145
|
-
set scrollTop(
|
|
4146
|
-
r.current && (r.current.scrollTop =
|
|
4147
|
-
}
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4191
|
+
set scrollTop(h) {
|
|
4192
|
+
r.current && (r.current.scrollTop = h);
|
|
4193
|
+
},
|
|
4194
|
+
scrollToTime: _
|
|
4195
|
+
})), /* @__PURE__ */ x.jsxs(go, { style: t.style, className: `${hn} ${t.disableDrag ? hn + "-disable" : ""}`, "data-slot": "scroll-area", children: [
|
|
4196
|
+
/* @__PURE__ */ x.jsxs(vo, { "data-slot": "scroll-area-viewport", ref: r, onScroll: (h) => {
|
|
4197
|
+
t.onScroll?.(h.currentTarget);
|
|
4151
4198
|
}, children: [
|
|
4152
|
-
/* @__PURE__ */
|
|
4153
|
-
/* @__PURE__ */
|
|
4154
|
-
!t.hideCursor && /* @__PURE__ */
|
|
4199
|
+
/* @__PURE__ */ x.jsx(Vo, { ...t, setCursor: y, scaleCount: l, scrollElementRef: r }),
|
|
4200
|
+
/* @__PURE__ */ x.jsx(Fo, { ...t, scrollElementRef: r, timelineWidth: s, timelineHeight: o, disableDrag: t.disableDrag, editorData: t.editorData, cursorTime: f, scaleCount: l, setScaleCount: m, setEditorData: S }),
|
|
4201
|
+
!t.hideCursor && /* @__PURE__ */ x.jsx(ti, { ...t, timelineWidth: s, height: o, scaleCount: l, setScaleCount: m, setCursor: y, cursorTime: f, editorData: t.editorData, scrollElementRef: r })
|
|
4155
4202
|
] }),
|
|
4156
|
-
/* @__PURE__ */
|
|
4157
|
-
/* @__PURE__ */
|
|
4158
|
-
/* @__PURE__ */
|
|
4203
|
+
/* @__PURE__ */ x.jsx(Jn, { orientation: "horizontal" }),
|
|
4204
|
+
/* @__PURE__ */ x.jsx(Jn, { orientation: "vertical" }),
|
|
4205
|
+
/* @__PURE__ */ x.jsx(bo, {})
|
|
4159
4206
|
] });
|
|
4160
4207
|
}
|
|
4161
4208
|
export {
|
|
4162
|
-
|
|
4209
|
+
ai as Timeline
|
|
4163
4210
|
};
|