@cyca/react-timeline-editor 0.2.3-alpha.7 → 0.2.3-alpha.8
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 +3 -3
- package/dist/react-timeline-editor.cjs +4 -4
- package/dist/react-timeline-editor.js +1083 -1036
- package/dist/styles.css +1 -1
- package/package.json +2 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as g from "react";
|
|
2
|
-
import
|
|
2
|
+
import Ze, { useRef as ce, useEffect as At, useLayoutEffect as gn, useImperativeHandle as Qn, useState as Mt, useMemo as Dr, useCallback as Lr, createElement as Or } from "react";
|
|
3
3
|
import { flushSync as Mr } from "react-dom";
|
|
4
4
|
var jt = { exports: {} }, Dt = {};
|
|
5
5
|
var En;
|
|
@@ -31,20 +31,20 @@ function Ir() {
|
|
|
31
31
|
function n(d) {
|
|
32
32
|
if (d == null) return null;
|
|
33
33
|
if (typeof d == "function")
|
|
34
|
-
return d.$$typeof ===
|
|
34
|
+
return d.$$typeof === W ? null : d.displayName || d.name || null;
|
|
35
35
|
if (typeof d == "string") return d;
|
|
36
36
|
switch (d) {
|
|
37
|
-
case
|
|
37
|
+
case m:
|
|
38
38
|
return "Fragment";
|
|
39
39
|
case b:
|
|
40
40
|
return "Profiler";
|
|
41
|
-
case
|
|
41
|
+
case E:
|
|
42
42
|
return "StrictMode";
|
|
43
|
-
case
|
|
43
|
+
case P:
|
|
44
44
|
return "Suspense";
|
|
45
|
-
case
|
|
45
|
+
case D:
|
|
46
46
|
return "SuspenseList";
|
|
47
|
-
case
|
|
47
|
+
case j:
|
|
48
48
|
return "Activity";
|
|
49
49
|
}
|
|
50
50
|
if (typeof d == "object")
|
|
@@ -53,19 +53,19 @@ function Ir() {
|
|
|
53
53
|
), d.$$typeof) {
|
|
54
54
|
case v:
|
|
55
55
|
return "Portal";
|
|
56
|
-
case
|
|
56
|
+
case w:
|
|
57
57
|
return d.displayName || "Context";
|
|
58
58
|
case _:
|
|
59
59
|
return (d._context.displayName || "Context") + ".Consumer";
|
|
60
|
-
case
|
|
61
|
-
var
|
|
62
|
-
return d = d.displayName, d || (d =
|
|
63
|
-
case
|
|
64
|
-
return
|
|
65
|
-
case
|
|
66
|
-
|
|
60
|
+
case T:
|
|
61
|
+
var x = d.render;
|
|
62
|
+
return d = d.displayName, d || (d = x.displayName || x.name || "", d = d !== "" ? "ForwardRef(" + d + ")" : "ForwardRef"), d;
|
|
63
|
+
case H:
|
|
64
|
+
return x = d.displayName || null, x !== null ? x : n(d.type) || "Memo";
|
|
65
|
+
case O:
|
|
66
|
+
x = d._payload, d = d._init;
|
|
67
67
|
try {
|
|
68
|
-
return n(d(
|
|
68
|
+
return n(d(x));
|
|
69
69
|
} catch {
|
|
70
70
|
}
|
|
71
71
|
}
|
|
@@ -77,70 +77,70 @@ function Ir() {
|
|
|
77
77
|
function t(d) {
|
|
78
78
|
try {
|
|
79
79
|
e(d);
|
|
80
|
-
var
|
|
80
|
+
var x = !1;
|
|
81
81
|
} catch {
|
|
82
|
-
|
|
82
|
+
x = !0;
|
|
83
83
|
}
|
|
84
|
-
if (
|
|
85
|
-
|
|
86
|
-
var
|
|
87
|
-
return
|
|
88
|
-
|
|
84
|
+
if (x) {
|
|
85
|
+
x = console;
|
|
86
|
+
var N = x.error, $ = typeof Symbol == "function" && Symbol.toStringTag && d[Symbol.toStringTag] || d.constructor.name || "Object";
|
|
87
|
+
return N.call(
|
|
88
|
+
x,
|
|
89
89
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
90
90
|
$
|
|
91
91
|
), e(d);
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
function r(d) {
|
|
95
|
-
if (d ===
|
|
96
|
-
if (typeof d == "object" && d !== null && d.$$typeof ===
|
|
95
|
+
if (d === m) return "<>";
|
|
96
|
+
if (typeof d == "object" && d !== null && d.$$typeof === O)
|
|
97
97
|
return "<...>";
|
|
98
98
|
try {
|
|
99
|
-
var
|
|
100
|
-
return
|
|
99
|
+
var x = n(d);
|
|
100
|
+
return x ? "<" + x + ">" : "<...>";
|
|
101
101
|
} catch {
|
|
102
102
|
return "<...>";
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
function s() {
|
|
106
|
-
var d =
|
|
106
|
+
var d = Y.A;
|
|
107
107
|
return d === null ? null : d.getOwner();
|
|
108
108
|
}
|
|
109
109
|
function o() {
|
|
110
110
|
return Error("react-stack-top-frame");
|
|
111
111
|
}
|
|
112
112
|
function i(d) {
|
|
113
|
-
if (
|
|
114
|
-
var
|
|
115
|
-
if (
|
|
113
|
+
if (C.call(d, "key")) {
|
|
114
|
+
var x = Object.getOwnPropertyDescriptor(d, "key").get;
|
|
115
|
+
if (x && x.isReactWarning) return !1;
|
|
116
116
|
}
|
|
117
117
|
return d.key !== void 0;
|
|
118
118
|
}
|
|
119
|
-
function c(d,
|
|
120
|
-
function
|
|
121
|
-
|
|
119
|
+
function c(d, x) {
|
|
120
|
+
function N() {
|
|
121
|
+
y || (y = !0, console.error(
|
|
122
122
|
"%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)",
|
|
123
|
-
|
|
123
|
+
x
|
|
124
124
|
));
|
|
125
125
|
}
|
|
126
|
-
|
|
127
|
-
get:
|
|
126
|
+
N.isReactWarning = !0, Object.defineProperty(d, "key", {
|
|
127
|
+
get: N,
|
|
128
128
|
configurable: !0
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
131
|
function a() {
|
|
132
132
|
var d = n(this.type);
|
|
133
|
-
return
|
|
133
|
+
return A[d] || (A[d] = !0, console.error(
|
|
134
134
|
"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."
|
|
135
135
|
)), d = this.props.ref, d !== void 0 ? d : null;
|
|
136
136
|
}
|
|
137
|
-
function u(d,
|
|
138
|
-
var B =
|
|
137
|
+
function u(d, x, N, $, Q, X) {
|
|
138
|
+
var B = N.ref;
|
|
139
139
|
return d = {
|
|
140
140
|
$$typeof: S,
|
|
141
141
|
type: d,
|
|
142
|
-
key:
|
|
143
|
-
props:
|
|
142
|
+
key: x,
|
|
143
|
+
props: N,
|
|
144
144
|
_owner: $
|
|
145
145
|
}, (B !== void 0 ? B : null) !== null ? Object.defineProperty(d, "ref", {
|
|
146
146
|
enumerable: !1,
|
|
@@ -159,19 +159,19 @@ function Ir() {
|
|
|
159
159
|
configurable: !1,
|
|
160
160
|
enumerable: !1,
|
|
161
161
|
writable: !0,
|
|
162
|
-
value:
|
|
162
|
+
value: Q
|
|
163
163
|
}), Object.defineProperty(d, "_debugTask", {
|
|
164
164
|
configurable: !1,
|
|
165
165
|
enumerable: !1,
|
|
166
166
|
writable: !0,
|
|
167
|
-
value:
|
|
167
|
+
value: X
|
|
168
168
|
}), Object.freeze && (Object.freeze(d.props), Object.freeze(d)), d;
|
|
169
169
|
}
|
|
170
|
-
function l(d,
|
|
171
|
-
var B =
|
|
170
|
+
function l(d, x, N, $, Q, X) {
|
|
171
|
+
var B = x.children;
|
|
172
172
|
if (B !== void 0)
|
|
173
173
|
if ($)
|
|
174
|
-
if (
|
|
174
|
+
if (z(B)) {
|
|
175
175
|
for ($ = 0; $ < B.length; $++)
|
|
176
176
|
h(B[$]);
|
|
177
177
|
Object.freeze && Object.freeze(B);
|
|
@@ -180,12 +180,12 @@ function Ir() {
|
|
|
180
180
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
181
181
|
);
|
|
182
182
|
else h(B);
|
|
183
|
-
if (
|
|
183
|
+
if (C.call(x, "key")) {
|
|
184
184
|
B = n(d);
|
|
185
|
-
var L = Object.keys(
|
|
186
|
-
return
|
|
185
|
+
var L = Object.keys(x).filter(function(U) {
|
|
186
|
+
return U !== "key";
|
|
187
187
|
});
|
|
188
|
-
$ = 0 < L.length ? "{key: someKey, " + L.join(": ..., ") + ": ...}" : "{key: someKey}",
|
|
188
|
+
$ = 0 < L.length ? "{key: someKey, " + L.join(": ..., ") + ": ...}" : "{key: someKey}", ee[B + $] || (L = 0 < L.length ? "{" + L.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
189
189
|
`A props object containing a "key" prop is being spread into JSX:
|
|
190
190
|
let props = %s;
|
|
191
191
|
<%s {...props} />
|
|
@@ -196,62 +196,62 @@ React keys must be passed directly to JSX without using spread:
|
|
|
196
196
|
B,
|
|
197
197
|
L,
|
|
198
198
|
B
|
|
199
|
-
),
|
|
199
|
+
), ee[B + $] = !0);
|
|
200
200
|
}
|
|
201
|
-
if (B = null,
|
|
202
|
-
|
|
203
|
-
for (var
|
|
204
|
-
|
|
205
|
-
} else
|
|
201
|
+
if (B = null, N !== void 0 && (t(N), B = "" + N), i(x) && (t(x.key), B = "" + x.key), "key" in x) {
|
|
202
|
+
N = {};
|
|
203
|
+
for (var k in x)
|
|
204
|
+
k !== "key" && (N[k] = x[k]);
|
|
205
|
+
} else N = x;
|
|
206
206
|
return B && c(
|
|
207
|
-
|
|
207
|
+
N,
|
|
208
208
|
typeof d == "function" ? d.displayName || d.name || "Unknown" : d
|
|
209
209
|
), u(
|
|
210
210
|
d,
|
|
211
211
|
B,
|
|
212
|
-
|
|
212
|
+
N,
|
|
213
213
|
s(),
|
|
214
|
-
|
|
215
|
-
|
|
214
|
+
Q,
|
|
215
|
+
X
|
|
216
216
|
);
|
|
217
217
|
}
|
|
218
218
|
function h(d) {
|
|
219
|
-
f(d) ? d._store && (d._store.validated = 1) : typeof d == "object" && d !== null && d.$$typeof ===
|
|
219
|
+
f(d) ? d._store && (d._store.validated = 1) : typeof d == "object" && d !== null && d.$$typeof === O && (d._payload.status === "fulfilled" ? f(d._payload.value) && d._payload.value._store && (d._payload.value._store.validated = 1) : d._store && (d._store.validated = 1));
|
|
220
220
|
}
|
|
221
221
|
function f(d) {
|
|
222
222
|
return typeof d == "object" && d !== null && d.$$typeof === S;
|
|
223
223
|
}
|
|
224
|
-
var
|
|
224
|
+
var p = Ze, S = Symbol.for("react.transitional.element"), v = Symbol.for("react.portal"), m = Symbol.for("react.fragment"), E = Symbol.for("react.strict_mode"), b = Symbol.for("react.profiler"), _ = Symbol.for("react.consumer"), w = Symbol.for("react.context"), T = Symbol.for("react.forward_ref"), P = Symbol.for("react.suspense"), D = Symbol.for("react.suspense_list"), H = Symbol.for("react.memo"), O = Symbol.for("react.lazy"), j = Symbol.for("react.activity"), W = Symbol.for("react.client.reference"), Y = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, C = Object.prototype.hasOwnProperty, z = Array.isArray, I = console.createTask ? console.createTask : function() {
|
|
225
225
|
return null;
|
|
226
226
|
};
|
|
227
|
-
|
|
227
|
+
p = {
|
|
228
228
|
react_stack_bottom_frame: function(d) {
|
|
229
229
|
return d();
|
|
230
230
|
}
|
|
231
231
|
};
|
|
232
|
-
var
|
|
233
|
-
|
|
232
|
+
var y, A = {}, M = p.react_stack_bottom_frame.bind(
|
|
233
|
+
p,
|
|
234
234
|
o
|
|
235
|
-
)(),
|
|
236
|
-
Lt.Fragment =
|
|
237
|
-
var $ = 1e4 >
|
|
235
|
+
)(), Z = I(r(o)), ee = {};
|
|
236
|
+
Lt.Fragment = m, Lt.jsx = function(d, x, N) {
|
|
237
|
+
var $ = 1e4 > Y.recentlyCreatedOwnerStacks++;
|
|
238
238
|
return l(
|
|
239
239
|
d,
|
|
240
|
-
|
|
241
|
-
|
|
240
|
+
x,
|
|
241
|
+
N,
|
|
242
242
|
!1,
|
|
243
|
-
$ ? Error("react-stack-top-frame") :
|
|
244
|
-
$ ?
|
|
243
|
+
$ ? Error("react-stack-top-frame") : M,
|
|
244
|
+
$ ? I(r(d)) : Z
|
|
245
245
|
);
|
|
246
|
-
}, Lt.jsxs = function(d,
|
|
247
|
-
var $ = 1e4 >
|
|
246
|
+
}, Lt.jsxs = function(d, x, N) {
|
|
247
|
+
var $ = 1e4 > Y.recentlyCreatedOwnerStacks++;
|
|
248
248
|
return l(
|
|
249
249
|
d,
|
|
250
|
-
|
|
251
|
-
|
|
250
|
+
x,
|
|
251
|
+
N,
|
|
252
252
|
!0,
|
|
253
|
-
$ ? Error("react-stack-top-frame") :
|
|
254
|
-
$ ?
|
|
253
|
+
$ ? Error("react-stack-top-frame") : M,
|
|
254
|
+
$ ? I(r(d)) : Z
|
|
255
255
|
);
|
|
256
256
|
};
|
|
257
257
|
})()), Lt;
|
|
@@ -260,8 +260,8 @@ var xn;
|
|
|
260
260
|
function kr() {
|
|
261
261
|
return xn || (xn = 1, process.env.NODE_ENV === "production" ? jt.exports = Nr() : jt.exports = Ir()), jt.exports;
|
|
262
262
|
}
|
|
263
|
-
var
|
|
264
|
-
const fn = "timeline-editor", Rn = 0,
|
|
263
|
+
var R = kr();
|
|
264
|
+
const fn = "timeline-editor", Rn = 0, Xt = 1, er = 10, Gt = 160, Zt = 20, dn = 1, hn = 8, Cn = 32, An = 20, tr = 5, rn = {
|
|
265
265
|
trace: 0,
|
|
266
266
|
debug: 1,
|
|
267
267
|
info: 2,
|
|
@@ -298,7 +298,7 @@ var zr = class nr {
|
|
|
298
298
|
Wr.forEach((e) => {
|
|
299
299
|
const t = this.e.bind(this.c, e, this.n);
|
|
300
300
|
Object.defineProperty(this, e, {
|
|
301
|
-
get: () =>
|
|
301
|
+
get: () => rn[e] >= rn[this.currentLevel()] ? t : this.noop,
|
|
302
302
|
configurable: !0
|
|
303
303
|
});
|
|
304
304
|
});
|
|
@@ -309,7 +309,7 @@ var zr = class nr {
|
|
|
309
309
|
currentLevel() {
|
|
310
310
|
if (this.lvl) return this.lvl;
|
|
311
311
|
const e = this.s.get(this.storageKey());
|
|
312
|
-
return e && e in
|
|
312
|
+
return e && e in rn ? (this.lvl = e, this.lvl) : this.def ? this.def : this.r ? this.r.currentLevel() : "trace";
|
|
313
313
|
}
|
|
314
314
|
setLevel(e) {
|
|
315
315
|
return this.lvl = e, this.s.set(this.storageKey(), e), this;
|
|
@@ -373,20 +373,20 @@ const Fr = {
|
|
|
373
373
|
}, Vr = { bind(n, e, t) {
|
|
374
374
|
const r = t ? `${Tn[e]} ${String(t)}:` : `${Tn[e]}`;
|
|
375
375
|
return (n[e] || n.log).bind(n, `%c${r}%c`, `color: ${Fr[e]}; font-weight: bold;`, "color: inherit");
|
|
376
|
-
} },
|
|
376
|
+
} }, qe = rr(new zr(new jr(), Vr));
|
|
377
377
|
function Ur(n) {
|
|
378
378
|
let {
|
|
379
379
|
editorData: e = [],
|
|
380
380
|
effects: t = {},
|
|
381
|
-
scale: r =
|
|
381
|
+
scale: r = Xt,
|
|
382
382
|
scaleSplitCount: s = er,
|
|
383
383
|
scaleWidth: o = Gt,
|
|
384
|
-
startLeft: i =
|
|
384
|
+
startLeft: i = Zt,
|
|
385
385
|
minScaleCount: c = An,
|
|
386
386
|
maxScaleCount: a = 1 / 0,
|
|
387
387
|
rowHeight: u = Cn
|
|
388
388
|
} = n;
|
|
389
|
-
r <= 0 && (
|
|
389
|
+
r <= 0 && (qe.error("Error: scale must be greater than 0!"), r = Xt), 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 < 1 && (qe.warn("Warning: minScaleCount must be greater than 1!"), c = An), 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 = Cn);
|
|
390
390
|
const l = {
|
|
391
391
|
...n
|
|
392
392
|
};
|
|
@@ -403,7 +403,7 @@ function Ur(n) {
|
|
|
403
403
|
rowHeight: u
|
|
404
404
|
};
|
|
405
405
|
}
|
|
406
|
-
function
|
|
406
|
+
function Pe(n, e) {
|
|
407
407
|
const {
|
|
408
408
|
startLeft: t,
|
|
409
409
|
scale: r,
|
|
@@ -411,7 +411,7 @@ function ze(n, e) {
|
|
|
411
411
|
} = e;
|
|
412
412
|
return t + n / r * s;
|
|
413
413
|
}
|
|
414
|
-
function
|
|
414
|
+
function Xe(n, e) {
|
|
415
415
|
const {
|
|
416
416
|
startLeft: t,
|
|
417
417
|
scale: r,
|
|
@@ -419,11 +419,11 @@ function Ke(n, e) {
|
|
|
419
419
|
} = e;
|
|
420
420
|
return (n - t) / s * r;
|
|
421
421
|
}
|
|
422
|
-
function
|
|
422
|
+
function Ot(n, e) {
|
|
423
423
|
const {
|
|
424
424
|
left: t,
|
|
425
425
|
width: r
|
|
426
|
-
} = n, s =
|
|
426
|
+
} = n, s = Xe(t, e), o = Xe(t + r, e);
|
|
427
427
|
return {
|
|
428
428
|
start: s,
|
|
429
429
|
end: o
|
|
@@ -433,7 +433,7 @@ function vn(n, e) {
|
|
|
433
433
|
const {
|
|
434
434
|
start: t,
|
|
435
435
|
end: r
|
|
436
|
-
} = n, s =
|
|
436
|
+
} = n, s = Pe(t, e), o = Pe(r, e) - s;
|
|
437
437
|
return {
|
|
438
438
|
left: s,
|
|
439
439
|
width: o
|
|
@@ -457,25 +457,25 @@ function Hr(n, e) {
|
|
|
457
457
|
function Br(n, e) {
|
|
458
458
|
const t = [];
|
|
459
459
|
return n.forEach((r) => {
|
|
460
|
-
t.push(
|
|
460
|
+
t.push(Pe(r.start, e)), t.push(Pe(r.end, e));
|
|
461
461
|
}), t;
|
|
462
462
|
}
|
|
463
|
-
var Ft = { exports: {} },
|
|
464
|
-
var
|
|
463
|
+
var Ft = { exports: {} }, sn = {};
|
|
464
|
+
var Pn;
|
|
465
465
|
function Yr() {
|
|
466
|
-
if (
|
|
467
|
-
|
|
468
|
-
var n =
|
|
469
|
-
return
|
|
466
|
+
if (Pn) return sn;
|
|
467
|
+
Pn = 1;
|
|
468
|
+
var n = Ze.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
469
|
+
return sn.c = function(e) {
|
|
470
470
|
return n.H.useMemoCache(e);
|
|
471
|
-
},
|
|
471
|
+
}, sn;
|
|
472
472
|
}
|
|
473
|
-
var
|
|
474
|
-
var
|
|
473
|
+
var on = {};
|
|
474
|
+
var Dn;
|
|
475
475
|
function Xr() {
|
|
476
|
-
return
|
|
477
|
-
var n =
|
|
478
|
-
|
|
476
|
+
return Dn || (Dn = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
477
|
+
var n = Ze.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
478
|
+
on.c = function(e) {
|
|
479
479
|
var t = n.H;
|
|
480
480
|
return t === null && console.error(
|
|
481
481
|
`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:
|
|
@@ -485,14 +485,14 @@ function Xr() {
|
|
|
485
485
|
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`
|
|
486
486
|
), t.useMemoCache(e);
|
|
487
487
|
};
|
|
488
|
-
})()),
|
|
488
|
+
})()), on;
|
|
489
489
|
}
|
|
490
|
-
var
|
|
491
|
-
function
|
|
492
|
-
return
|
|
490
|
+
var Ln;
|
|
491
|
+
function Gr() {
|
|
492
|
+
return Ln || (Ln = 1, process.env.NODE_ENV === "production" ? Ft.exports = Yr() : Ft.exports = Xr()), Ft.exports;
|
|
493
493
|
}
|
|
494
|
-
var
|
|
495
|
-
function
|
|
494
|
+
var De = Gr();
|
|
495
|
+
function Kr(n) {
|
|
496
496
|
for (var e = [], t = 1; t < arguments.length; t++)
|
|
497
497
|
e[t - 1] = arguments[t];
|
|
498
498
|
return e.map(function(r) {
|
|
@@ -501,11 +501,11 @@ function Gr(n) {
|
|
|
501
501
|
}).join(" ");
|
|
502
502
|
}).join(" ");
|
|
503
503
|
}
|
|
504
|
-
function
|
|
505
|
-
return
|
|
504
|
+
function fe(...n) {
|
|
505
|
+
return Kr(`${fn}-`, ...n);
|
|
506
506
|
}
|
|
507
507
|
const qr = (n) => {
|
|
508
|
-
const e =
|
|
508
|
+
const e = De.c(11), {
|
|
509
509
|
isMoving: t,
|
|
510
510
|
movePositions: r,
|
|
511
511
|
assistPositions: s
|
|
@@ -516,56 +516,56 @@ const qr = (n) => {
|
|
|
516
516
|
let u;
|
|
517
517
|
e[5] !== s ? (u = s === void 0 ? [] : s, e[5] = s, e[6] = u) : u = e[6];
|
|
518
518
|
const l = u;
|
|
519
|
-
e[7] === Symbol.for("react.memo_cache_sentinel") ? (o =
|
|
519
|
+
e[7] === Symbol.for("react.memo_cache_sentinel") ? (o = fe("snap-line-container"), e[7] = o) : o = e[7], i = t && a.filter((h) => l.includes(h)).map(Jr), e[0] = t, e[1] = r, e[2] = s, e[3] = o, e[4] = i;
|
|
520
520
|
} else
|
|
521
521
|
o = e[3], i = e[4];
|
|
522
522
|
let c;
|
|
523
|
-
return e[8] !== o || e[9] !== i ? (c = /* @__PURE__ */
|
|
523
|
+
return e[8] !== o || e[9] !== i ? (c = /* @__PURE__ */ R.jsx("div", { className: o, children: i }), e[8] = o, e[9] = i, e[10] = c) : c = e[10], c;
|
|
524
524
|
};
|
|
525
525
|
function Jr(n, e) {
|
|
526
|
-
return /* @__PURE__ */
|
|
526
|
+
return /* @__PURE__ */ R.jsx("div", { className: fe("snap-line"), style: {
|
|
527
527
|
left: n
|
|
528
528
|
} }, e);
|
|
529
529
|
}
|
|
530
530
|
const Vt = 1, On = 10, Mn = 10;
|
|
531
531
|
function Zr(n) {
|
|
532
|
-
const e =
|
|
532
|
+
const e = De.c(7), t = ce(Number.MIN_SAFE_INTEGER), r = ce(Number.MAX_SAFE_INTEGER), s = ce(Vt), o = ce(void 0);
|
|
533
533
|
let i;
|
|
534
534
|
e[0] !== n ? (i = () => {
|
|
535
535
|
if (n?.current) {
|
|
536
536
|
const {
|
|
537
537
|
left: v,
|
|
538
|
-
width:
|
|
538
|
+
width: m
|
|
539
539
|
} = n.current.getBoundingClientRect();
|
|
540
|
-
t.current = v, r.current = v +
|
|
540
|
+
t.current = v, r.current = v + m;
|
|
541
541
|
}
|
|
542
542
|
}, e[0] = n, e[1] = i) : i = e[1];
|
|
543
543
|
const c = i;
|
|
544
544
|
let a;
|
|
545
|
-
e[2] === Symbol.for("react.memo_cache_sentinel") ? (a = (v,
|
|
545
|
+
e[2] === Symbol.for("react.memo_cache_sentinel") ? (a = (v, m) => {
|
|
546
546
|
if (v.clientX >= r.current || v.clientX <= t.current) {
|
|
547
547
|
o.current !== void 0 && cancelAnimationFrame(o.current);
|
|
548
|
-
const
|
|
549
|
-
s.current = Math.min(Number((
|
|
550
|
-
const _ = (v.clientX >= r.current ? 1 : -1) * s.current,
|
|
551
|
-
|
|
548
|
+
const E = Math.abs(v.clientX >= r.current ? v.clientX - r.current : v.clientX - t.current);
|
|
549
|
+
s.current = Math.min(Number((E / Mn).toFixed(0)) * Vt, On);
|
|
550
|
+
const _ = (v.clientX >= r.current ? 1 : -1) * s.current, w = () => {
|
|
551
|
+
m && m(_), o.current = requestAnimationFrame(w);
|
|
552
552
|
};
|
|
553
|
-
return o.current = requestAnimationFrame(
|
|
553
|
+
return o.current = requestAnimationFrame(w), !1;
|
|
554
554
|
} else
|
|
555
555
|
o.current !== void 0 && cancelAnimationFrame(o.current);
|
|
556
556
|
return !0;
|
|
557
557
|
}, e[2] = a) : a = e[2];
|
|
558
558
|
const u = a;
|
|
559
559
|
let l;
|
|
560
|
-
e[3] === Symbol.for("react.memo_cache_sentinel") ? (l = (v,
|
|
560
|
+
e[3] === Symbol.for("react.memo_cache_sentinel") ? (l = (v, m, E) => {
|
|
561
561
|
if (v.clientX >= r.current || v.clientX < t.current) {
|
|
562
562
|
o.current !== void 0 && cancelAnimationFrame(o.current);
|
|
563
563
|
const b = Math.abs(v.clientX >= r.current ? v.clientX - r.current : v.clientX - t.current);
|
|
564
564
|
s.current = Math.min(Number((b / Mn).toFixed(0)) * Vt, On);
|
|
565
|
-
const
|
|
566
|
-
|
|
565
|
+
const w = (v.clientX >= r.current ? 1 : -1) * s.current, T = () => {
|
|
566
|
+
E && E(w), o.current = requestAnimationFrame(T);
|
|
567
567
|
};
|
|
568
|
-
return o.current = requestAnimationFrame(
|
|
568
|
+
return o.current = requestAnimationFrame(T), !1;
|
|
569
569
|
} else
|
|
570
570
|
o.current !== void 0 && cancelAnimationFrame(o.current);
|
|
571
571
|
return !0;
|
|
@@ -575,19 +575,19 @@ function Zr(n) {
|
|
|
575
575
|
e[4] === Symbol.for("react.memo_cache_sentinel") ? (f = () => {
|
|
576
576
|
t.current = Number.MIN_SAFE_INTEGER, r.current = Number.MAX_SAFE_INTEGER, s.current = Vt, o.current !== void 0 && cancelAnimationFrame(o.current);
|
|
577
577
|
}, e[4] = f) : f = e[4];
|
|
578
|
-
const
|
|
578
|
+
const p = f;
|
|
579
579
|
let S;
|
|
580
580
|
return e[5] !== c ? (S = {
|
|
581
581
|
initAutoScroll: c,
|
|
582
582
|
dealDragAutoScroll: u,
|
|
583
583
|
dealResizeAutoScroll: h,
|
|
584
|
-
stopAutoScroll:
|
|
584
|
+
stopAutoScroll: p
|
|
585
585
|
}, e[5] = c, e[6] = S) : S = e[6], S;
|
|
586
586
|
}
|
|
587
587
|
function Qr(n, e, t) {
|
|
588
588
|
return Math.max(e, Math.min(n, t));
|
|
589
589
|
}
|
|
590
|
-
const
|
|
590
|
+
const de = {
|
|
591
591
|
toVector(n, e) {
|
|
592
592
|
return n === void 0 && (n = e), Array.isArray(n) ? n : [n, n];
|
|
593
593
|
},
|
|
@@ -628,7 +628,7 @@ function ns(n) {
|
|
|
628
628
|
var e = ts(n, "string");
|
|
629
629
|
return typeof e == "symbol" ? e : String(e);
|
|
630
630
|
}
|
|
631
|
-
function
|
|
631
|
+
function _e(n, e, t) {
|
|
632
632
|
return e = ns(e), e in n ? Object.defineProperty(n, e, {
|
|
633
633
|
value: t,
|
|
634
634
|
enumerable: !0,
|
|
@@ -646,11 +646,11 @@ function kn(n, e) {
|
|
|
646
646
|
}
|
|
647
647
|
return t;
|
|
648
648
|
}
|
|
649
|
-
function
|
|
649
|
+
function te(n) {
|
|
650
650
|
for (var e = 1; e < arguments.length; e++) {
|
|
651
651
|
var t = arguments[e] != null ? arguments[e] : {};
|
|
652
652
|
e % 2 ? kn(Object(t), !0).forEach(function(r) {
|
|
653
|
-
|
|
653
|
+
_e(n, r, t[r]);
|
|
654
654
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(t)) : kn(Object(t)).forEach(function(r) {
|
|
655
655
|
Object.defineProperty(n, r, Object.getOwnPropertyDescriptor(t, r));
|
|
656
656
|
});
|
|
@@ -706,11 +706,11 @@ function as(n, e = "") {
|
|
|
706
706
|
const t = sr[n], r = t && t[e] || e;
|
|
707
707
|
return n + r;
|
|
708
708
|
}
|
|
709
|
-
function
|
|
709
|
+
function Qt(n) {
|
|
710
710
|
return "touches" in n;
|
|
711
711
|
}
|
|
712
712
|
function or(n) {
|
|
713
|
-
return
|
|
713
|
+
return Qt(n) ? "touch" : "pointerType" in n ? n.pointerType : "mouse";
|
|
714
714
|
}
|
|
715
715
|
function ls(n) {
|
|
716
716
|
return Array.from(n.touches).filter((e) => {
|
|
@@ -722,14 +722,14 @@ function us(n) {
|
|
|
722
722
|
return n.type === "touchend" || n.type === "touchcancel" ? n.changedTouches : n.targetTouches;
|
|
723
723
|
}
|
|
724
724
|
function ir(n) {
|
|
725
|
-
return
|
|
725
|
+
return Qt(n) ? us(n)[0] : n;
|
|
726
726
|
}
|
|
727
727
|
function fs(n) {
|
|
728
728
|
return ls(n).map((e) => e.identifier);
|
|
729
729
|
}
|
|
730
|
-
function
|
|
730
|
+
function cn(n) {
|
|
731
731
|
const e = ir(n);
|
|
732
|
-
return
|
|
732
|
+
return Qt(n) ? e.identifier : e.pointerId;
|
|
733
733
|
}
|
|
734
734
|
function zn(n) {
|
|
735
735
|
const e = ir(n);
|
|
@@ -753,7 +753,7 @@ function ds(n) {
|
|
|
753
753
|
}
|
|
754
754
|
return e;
|
|
755
755
|
}
|
|
756
|
-
function
|
|
756
|
+
function Kt(n, ...e) {
|
|
757
757
|
return typeof n == "function" ? n(...e) : n;
|
|
758
758
|
}
|
|
759
759
|
function hs() {
|
|
@@ -809,7 +809,7 @@ class gs {
|
|
|
809
809
|
}
|
|
810
810
|
start(e) {
|
|
811
811
|
const t = this.state, r = this.config;
|
|
812
|
-
t._active || (this.reset(), this.computeInitial(), t._active = !0, t.target = e.target, t.currentTarget = e.currentTarget, t.lastOffset = r.from ?
|
|
812
|
+
t._active || (this.reset(), this.computeInitial(), t._active = !0, t.target = e.target, t.currentTarget = e.currentTarget, t.lastOffset = r.from ? Kt(r.from, t) : t.offset, t.offset = t.lastOffset, t.startTime = t.timeStamp = e.timeStamp);
|
|
813
813
|
}
|
|
814
814
|
computeValues(e) {
|
|
815
815
|
const t = this.state;
|
|
@@ -828,8 +828,8 @@ class gs {
|
|
|
828
828
|
t.args = this.args;
|
|
829
829
|
let o = 0;
|
|
830
830
|
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) {
|
|
831
|
-
const
|
|
832
|
-
|
|
831
|
+
const P = t._delta.map(Math.abs);
|
|
832
|
+
de.addTo(t._distance, P);
|
|
833
833
|
}
|
|
834
834
|
this.axisIntent && this.axisIntent(e);
|
|
835
835
|
const [i, c] = t._movement, [a, u] = r.threshold, {
|
|
@@ -839,26 +839,26 @@ class gs {
|
|
|
839
839
|
if (r.hasCustomTransform ? (l[0] === !1 && (l[0] = Math.abs(i) >= a && h[0]), l[1] === !1 && (l[1] = Math.abs(c) >= u && h[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;
|
|
840
840
|
const f = [0, 0];
|
|
841
841
|
if (r.hasCustomTransform) {
|
|
842
|
-
const [
|
|
843
|
-
f[0] = l[0] !== !1 ?
|
|
842
|
+
const [P, D] = h;
|
|
843
|
+
f[0] = l[0] !== !1 ? P - l[0] : 0, f[1] = l[1] !== !1 ? D - l[1] : 0;
|
|
844
844
|
} else
|
|
845
845
|
f[0] = l[0] !== !1 ? i - l[0] : 0, f[1] = l[1] !== !1 ? c - l[1] : 0;
|
|
846
846
|
this.restrictToAxis && !t._blocked && this.restrictToAxis(f);
|
|
847
|
-
const
|
|
848
|
-
S && (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 =
|
|
849
|
-
const [v,
|
|
850
|
-
t.overflow = [v <
|
|
851
|
-
const
|
|
852
|
-
if (t.offset = es(t._bounds, t.offset,
|
|
853
|
-
t.delta =
|
|
854
|
-
const
|
|
855
|
-
|
|
847
|
+
const p = t.offset, S = t._active && !t._blocked || t.active;
|
|
848
|
+
S && (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 = Kt(r.bounds, t)), this.setup && this.setup()), t.movement = f, this.computeOffset()));
|
|
849
|
+
const [v, m] = t.offset, [[E, b], [_, w]] = t._bounds;
|
|
850
|
+
t.overflow = [v < E ? -1 : v > b ? 1 : 0, m < _ ? -1 : m > w ? 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;
|
|
851
|
+
const T = t._active ? r.rubberband || [0, 0] : [0, 0];
|
|
852
|
+
if (t.offset = es(t._bounds, t.offset, T), t.delta = de.sub(t.offset, p), this.computeMovement(), S && (!t.last || o > ps)) {
|
|
853
|
+
t.delta = de.sub(t.offset, p);
|
|
854
|
+
const P = t.delta.map(Math.abs);
|
|
855
|
+
de.addTo(t.distance, P), t.direction = t.delta.map(Math.sign), t._direction = t._delta.map(Math.sign), !t.first && o > 0 && (t.velocity = [P[0] / o, P[1] / o], t.timeDelta = o);
|
|
856
856
|
}
|
|
857
857
|
}
|
|
858
858
|
emit() {
|
|
859
859
|
const e = this.state, t = this.shared, r = this.config;
|
|
860
860
|
if (e._active || this.clean(), (e._blocked || !e.intentional) && !e._force && !r.triggerAllEvents) return;
|
|
861
|
-
const s = this.handler(
|
|
861
|
+
const s = this.handler(te(te(te({}, t), e), {}, {
|
|
862
862
|
[this.aliasKey]: e.values
|
|
863
863
|
}));
|
|
864
864
|
s !== void 0 && (e.memo = s);
|
|
@@ -876,7 +876,7 @@ function vs([n, e], t) {
|
|
|
876
876
|
}
|
|
877
877
|
class bs extends gs {
|
|
878
878
|
constructor(...e) {
|
|
879
|
-
super(...e),
|
|
879
|
+
super(...e), _e(this, "aliasKey", "xy");
|
|
880
880
|
}
|
|
881
881
|
reset() {
|
|
882
882
|
super.reset(), this.state.axis = void 0;
|
|
@@ -885,10 +885,10 @@ class bs extends gs {
|
|
|
885
885
|
this.state.offset = [0, 0], this.state.lastOffset = [0, 0];
|
|
886
886
|
}
|
|
887
887
|
computeOffset() {
|
|
888
|
-
this.state.offset =
|
|
888
|
+
this.state.offset = de.add(this.state.lastOffset, this.state.movement);
|
|
889
889
|
}
|
|
890
890
|
computeMovement() {
|
|
891
|
-
this.state.movement =
|
|
891
|
+
this.state.movement = de.sub(this.state.offset, this.state.lastOffset);
|
|
892
892
|
}
|
|
893
893
|
axisIntent(e) {
|
|
894
894
|
const t = this.state, r = this.config;
|
|
@@ -915,7 +915,7 @@ const Fn = (n) => n, Vn = 0.15, bn = {
|
|
|
915
915
|
return n;
|
|
916
916
|
},
|
|
917
917
|
eventOptions(n, e, t) {
|
|
918
|
-
return
|
|
918
|
+
return te(te({}, t.shared.eventOptions), n);
|
|
919
919
|
},
|
|
920
920
|
preventDefault(n = !1) {
|
|
921
921
|
return n;
|
|
@@ -930,12 +930,12 @@ const Fn = (n) => n, Vn = 0.15, bn = {
|
|
|
930
930
|
case !1:
|
|
931
931
|
return [0, 0];
|
|
932
932
|
default:
|
|
933
|
-
return
|
|
933
|
+
return de.toVector(n);
|
|
934
934
|
}
|
|
935
935
|
},
|
|
936
936
|
from(n) {
|
|
937
937
|
if (typeof n == "function") return n;
|
|
938
|
-
if (n != null) return
|
|
938
|
+
if (n != null) return de.toVector(n);
|
|
939
939
|
},
|
|
940
940
|
transform(n, e, t) {
|
|
941
941
|
const r = n || t.shared.transform;
|
|
@@ -949,7 +949,7 @@ const Fn = (n) => n, Vn = 0.15, bn = {
|
|
|
949
949
|
return r || Fn;
|
|
950
950
|
},
|
|
951
951
|
threshold(n) {
|
|
952
|
-
return
|
|
952
|
+
return de.toVector(n, 0);
|
|
953
953
|
}
|
|
954
954
|
};
|
|
955
955
|
process.env.NODE_ENV === "development" && Object.assign(bn, {
|
|
@@ -969,7 +969,7 @@ process.env.NODE_ENV === "development" && Object.assign(bn, {
|
|
|
969
969
|
return NaN;
|
|
970
970
|
}
|
|
971
971
|
});
|
|
972
|
-
const _s = 0, Nt =
|
|
972
|
+
const _s = 0, Nt = te(te({}, bn), {}, {
|
|
973
973
|
axis(n, e, {
|
|
974
974
|
axis: t
|
|
975
975
|
}) {
|
|
@@ -1001,7 +1001,7 @@ const _s = 0, Nt = Q(Q({}, bn), {}, {
|
|
|
1001
1001
|
};
|
|
1002
1002
|
class Ss extends bs {
|
|
1003
1003
|
constructor(...e) {
|
|
1004
|
-
super(...e),
|
|
1004
|
+
super(...e), _e(this, "ingKey", "dragging");
|
|
1005
1005
|
}
|
|
1006
1006
|
reset() {
|
|
1007
1007
|
super.reset();
|
|
@@ -1036,7 +1036,7 @@ class Ss extends bs {
|
|
|
1036
1036
|
const t = this.config, r = this.state;
|
|
1037
1037
|
if (e.buttons != null && (Array.isArray(t.pointerButtons) ? !t.pointerButtons.includes(e.buttons) : t.pointerButtons !== -1 && t.pointerButtons !== e.buttons)) return;
|
|
1038
1038
|
const s = this.ctrl.setEventIds(e);
|
|
1039
|
-
t.pointerCapture && e.target.setPointerCapture(e.pointerId), !(s && s.size > 1 && r._pointerActive) && (this.start(e), this.setupPointer(e), r._pointerId =
|
|
1039
|
+
t.pointerCapture && e.target.setPointerCapture(e.pointerId), !(s && s.size > 1 && r._pointerActive) && (this.start(e), this.setupPointer(e), r._pointerId = cn(e), r._pointerActive = !0, this.computeValues(zn(e)), this.computeInitial(), t.preventScrollAxis && or(e) !== "mouse" ? (r._active = !1, this.setupScrollPrevention(e)) : t.delay > 0 ? (this.setupDelayTrigger(e), t.triggerAllEvents && (this.compute(e), this.emit())) : this.startPointerDrag(e));
|
|
1040
1040
|
}
|
|
1041
1041
|
startPointerDrag(e) {
|
|
1042
1042
|
const t = this.state;
|
|
@@ -1045,10 +1045,10 @@ class Ss extends bs {
|
|
|
1045
1045
|
pointerMove(e) {
|
|
1046
1046
|
const t = this.state, r = this.config;
|
|
1047
1047
|
if (!t._pointerActive) return;
|
|
1048
|
-
const s =
|
|
1048
|
+
const s = cn(e);
|
|
1049
1049
|
if (t._pointerId !== void 0 && s !== t._pointerId) return;
|
|
1050
1050
|
const o = zn(e);
|
|
1051
|
-
if (document.pointerLockElement === e.target ? t._delta = [e.movementX, e.movementY] : (t._delta =
|
|
1051
|
+
if (document.pointerLockElement === e.target ? t._delta = [e.movementX, e.movementY] : (t._delta = de.sub(o, t._values), this.computeValues(o)), de.addTo(t._movement, t._delta), this.compute(e), t._delayed && t.intentional) {
|
|
1052
1052
|
this.timeoutStore.remove("dragDelay"), t.active = !1, this.startPointerDrag(e);
|
|
1053
1053
|
return;
|
|
1054
1054
|
}
|
|
@@ -1074,17 +1074,17 @@ class Ss extends bs {
|
|
|
1074
1074
|
}
|
|
1075
1075
|
const t = this.state, r = this.config;
|
|
1076
1076
|
if (!t._active || !t._pointerActive) return;
|
|
1077
|
-
const s =
|
|
1077
|
+
const s = cn(e);
|
|
1078
1078
|
if (t._pointerId !== void 0 && s !== t._pointerId) return;
|
|
1079
1079
|
this.state._pointerActive = !1, this.setActive(), this.compute(e);
|
|
1080
1080
|
const [o, i] = t._distance;
|
|
1081
1081
|
if (t.tap = o <= r.tapsThreshold && i <= r.tapsThreshold, t.tap && r.filterTaps)
|
|
1082
1082
|
t._force = !0;
|
|
1083
1083
|
else {
|
|
1084
|
-
const [c, a] = t._delta, [u, l] = t._movement, [h, f] = r.swipe.velocity, [
|
|
1084
|
+
const [c, a] = t._delta, [u, l] = t._movement, [h, f] = r.swipe.velocity, [p, S] = r.swipe.distance, v = r.swipe.duration;
|
|
1085
1085
|
if (t.elapsedTime < v) {
|
|
1086
|
-
const
|
|
1087
|
-
|
|
1086
|
+
const m = Math.abs(c / t.timeDelta), E = Math.abs(a / t.timeDelta);
|
|
1087
|
+
m > h && Math.abs(u) > p && (t.swipe[0] = Math.sign(c)), E > f && Math.abs(l) > S && (t.swipe[1] = Math.sign(a));
|
|
1088
1088
|
}
|
|
1089
1089
|
}
|
|
1090
1090
|
this.emit();
|
|
@@ -1126,7 +1126,7 @@ class Ss extends bs {
|
|
|
1126
1126
|
const t = Un[e.key];
|
|
1127
1127
|
if (t) {
|
|
1128
1128
|
const r = this.state, s = e.shiftKey ? 10 : e.altKey ? 0.1 : 1;
|
|
1129
|
-
this.start(e), r._delta = t(this.config.keyboardDisplacement, s), r._keyboardActive = !0,
|
|
1129
|
+
this.start(e), r._delta = t(this.config.keyboardDisplacement, s), r._keyboardActive = !0, de.addTo(r._movement, r._delta), this.compute(e), this.emit();
|
|
1130
1130
|
}
|
|
1131
1131
|
}
|
|
1132
1132
|
keyUp(e) {
|
|
@@ -1170,11 +1170,11 @@ const we = {
|
|
|
1170
1170
|
touchscreen: Es(),
|
|
1171
1171
|
pointer: ys(),
|
|
1172
1172
|
pointerLock: xs()
|
|
1173
|
-
}, Cs = 250, As = 180, Ts = 0.5,
|
|
1173
|
+
}, Cs = 250, As = 180, Ts = 0.5, Ps = 50, Ds = 250, Ls = 10, $n = {
|
|
1174
1174
|
mouse: 0,
|
|
1175
1175
|
touch: 0,
|
|
1176
1176
|
pen: 8
|
|
1177
|
-
}, ar =
|
|
1177
|
+
}, ar = te(te({}, Nt), {}, {
|
|
1178
1178
|
device(n, e, {
|
|
1179
1179
|
pointer: {
|
|
1180
1180
|
touch: t = !1,
|
|
@@ -1204,17 +1204,17 @@ const we = {
|
|
|
1204
1204
|
tapsThreshold: r = 3,
|
|
1205
1205
|
axis: s = void 0
|
|
1206
1206
|
}) {
|
|
1207
|
-
const o =
|
|
1207
|
+
const o = de.toVector(n, t ? r : s ? 1 : 0);
|
|
1208
1208
|
return this.filterTaps = t, this.tapsThreshold = r, o;
|
|
1209
1209
|
},
|
|
1210
1210
|
swipe({
|
|
1211
1211
|
velocity: n = Ts,
|
|
1212
|
-
distance: e =
|
|
1213
|
-
duration: t =
|
|
1212
|
+
distance: e = Ps,
|
|
1213
|
+
duration: t = Ds
|
|
1214
1214
|
} = {}) {
|
|
1215
1215
|
return {
|
|
1216
|
-
velocity: this.transform(
|
|
1217
|
-
distance: this.transform(
|
|
1216
|
+
velocity: this.transform(de.toVector(n)),
|
|
1217
|
+
distance: this.transform(de.toVector(e)),
|
|
1218
1218
|
duration: t
|
|
1219
1219
|
};
|
|
1220
1220
|
},
|
|
@@ -1229,9 +1229,9 @@ const we = {
|
|
|
1229
1229
|
}
|
|
1230
1230
|
},
|
|
1231
1231
|
axisThreshold(n) {
|
|
1232
|
-
return n ?
|
|
1232
|
+
return n ? te(te({}, $n), n) : $n;
|
|
1233
1233
|
},
|
|
1234
|
-
keyboardDisplacement(n =
|
|
1234
|
+
keyboardDisplacement(n = Ls) {
|
|
1235
1235
|
return n;
|
|
1236
1236
|
}
|
|
1237
1237
|
});
|
|
@@ -1262,7 +1262,7 @@ process.env.NODE_ENV === "development" && Object.assign(ar, {
|
|
|
1262
1262
|
return NaN;
|
|
1263
1263
|
}
|
|
1264
1264
|
});
|
|
1265
|
-
|
|
1265
|
+
te(te({}, bn), {}, {
|
|
1266
1266
|
device(n, e, {
|
|
1267
1267
|
shared: t,
|
|
1268
1268
|
pointer: {
|
|
@@ -1281,13 +1281,13 @@ Q(Q({}, bn), {}, {
|
|
|
1281
1281
|
angleBounds: r = {}
|
|
1282
1282
|
}) {
|
|
1283
1283
|
const s = (i) => {
|
|
1284
|
-
const c = jn(
|
|
1284
|
+
const c = jn(Kt(t, i), {
|
|
1285
1285
|
min: -1 / 0,
|
|
1286
1286
|
max: 1 / 0
|
|
1287
1287
|
});
|
|
1288
1288
|
return [c.min, c.max];
|
|
1289
1289
|
}, o = (i) => {
|
|
1290
|
-
const c = jn(
|
|
1290
|
+
const c = jn(Kt(r, i), {
|
|
1291
1291
|
min: -1 / 0,
|
|
1292
1292
|
max: 1 / 0
|
|
1293
1293
|
});
|
|
@@ -1296,7 +1296,7 @@ Q(Q({}, bn), {}, {
|
|
|
1296
1296
|
return typeof t != "function" && typeof r != "function" ? [s(), o()] : (i) => [s(i), o(i)];
|
|
1297
1297
|
},
|
|
1298
1298
|
threshold(n, e, t) {
|
|
1299
|
-
return this.lockDirection = t.axis === "lock",
|
|
1299
|
+
return this.lockDirection = t.axis === "lock", de.toVector(n, this.lockDirection ? [0.1, 3] : 0);
|
|
1300
1300
|
},
|
|
1301
1301
|
modifierKey(n) {
|
|
1302
1302
|
return n === void 0 ? "ctrlKey" : n;
|
|
@@ -1305,10 +1305,10 @@ Q(Q({}, bn), {}, {
|
|
|
1305
1305
|
return n;
|
|
1306
1306
|
}
|
|
1307
1307
|
});
|
|
1308
|
-
|
|
1308
|
+
te(te({}, Nt), {}, {
|
|
1309
1309
|
mouseOnly: (n = !0) => n
|
|
1310
1310
|
});
|
|
1311
|
-
|
|
1311
|
+
te(te({}, Nt), {}, {
|
|
1312
1312
|
mouseOnly: (n = !0) => n
|
|
1313
1313
|
});
|
|
1314
1314
|
const lr = /* @__PURE__ */ new Map(), mn = /* @__PURE__ */ new Map();
|
|
@@ -1361,7 +1361,7 @@ const ks = {
|
|
|
1361
1361
|
return n;
|
|
1362
1362
|
}
|
|
1363
1363
|
}, Ws = ["target", "eventOptions", "window", "enabled", "transform"];
|
|
1364
|
-
function
|
|
1364
|
+
function $t(n = {}, e) {
|
|
1365
1365
|
const t = {};
|
|
1366
1366
|
for (const [r, s] of Object.entries(e))
|
|
1367
1367
|
switch (typeof s) {
|
|
@@ -1373,7 +1373,7 @@ function Ht(n = {}, e) {
|
|
|
1373
1373
|
t[r] = s.call(t, n[r], r, n);
|
|
1374
1374
|
break;
|
|
1375
1375
|
case "object":
|
|
1376
|
-
t[r] =
|
|
1376
|
+
t[r] = $t(n[r], s);
|
|
1377
1377
|
break;
|
|
1378
1378
|
case "boolean":
|
|
1379
1379
|
s && (t[r] = n[r]);
|
|
@@ -1389,7 +1389,7 @@ function zs(n, e, t = {}) {
|
|
|
1389
1389
|
enabled: c,
|
|
1390
1390
|
transform: a
|
|
1391
1391
|
} = r, u = Is(r, Ws);
|
|
1392
|
-
if (t.shared =
|
|
1392
|
+
if (t.shared = $t({
|
|
1393
1393
|
target: s,
|
|
1394
1394
|
eventOptions: o,
|
|
1395
1395
|
window: i,
|
|
@@ -1397,14 +1397,14 @@ function zs(n, e, t = {}) {
|
|
|
1397
1397
|
transform: a
|
|
1398
1398
|
}, ks), e) {
|
|
1399
1399
|
const l = mn.get(e);
|
|
1400
|
-
t[e] =
|
|
1400
|
+
t[e] = $t(te({
|
|
1401
1401
|
shared: t.shared
|
|
1402
1402
|
}, u), l);
|
|
1403
1403
|
} else
|
|
1404
1404
|
for (const l in u) {
|
|
1405
1405
|
const h = mn.get(l);
|
|
1406
1406
|
if (h)
|
|
1407
|
-
t[l] =
|
|
1407
|
+
t[l] = $t(te({
|
|
1408
1408
|
shared: t.shared
|
|
1409
1409
|
}, u[l]), h);
|
|
1410
1410
|
else if (process.env.NODE_ENV === "development" && !["drag", "pinch", "scroll", "wheel", "move", "hover"].includes(l)) {
|
|
@@ -1417,10 +1417,10 @@ function zs(n, e, t = {}) {
|
|
|
1417
1417
|
}
|
|
1418
1418
|
class ur {
|
|
1419
1419
|
constructor(e, t) {
|
|
1420
|
-
|
|
1420
|
+
_e(this, "_listeners", /* @__PURE__ */ new Set()), this._ctrl = e, this._gestureKey = t;
|
|
1421
1421
|
}
|
|
1422
1422
|
add(e, t, r, s, o) {
|
|
1423
|
-
const i = this._listeners, c = as(t, r), a = this._gestureKey ? this._ctrl.config[this._gestureKey].eventOptions : {}, u =
|
|
1423
|
+
const i = this._listeners, c = as(t, r), a = this._gestureKey ? this._ctrl.config[this._gestureKey].eventOptions : {}, u = te(te({}, a), o);
|
|
1424
1424
|
e.addEventListener(c, s, u);
|
|
1425
1425
|
const l = () => {
|
|
1426
1426
|
e.removeEventListener(c, s, u), i.delete(l);
|
|
@@ -1433,7 +1433,7 @@ class ur {
|
|
|
1433
1433
|
}
|
|
1434
1434
|
class js {
|
|
1435
1435
|
constructor() {
|
|
1436
|
-
|
|
1436
|
+
_e(this, "_timeouts", /* @__PURE__ */ new Map());
|
|
1437
1437
|
}
|
|
1438
1438
|
add(e, t, r = 140, ...s) {
|
|
1439
1439
|
this.remove(e), this._timeouts.set(e, window.setTimeout(t, r, ...s));
|
|
@@ -1448,7 +1448,7 @@ class js {
|
|
|
1448
1448
|
}
|
|
1449
1449
|
class Fs {
|
|
1450
1450
|
constructor(e) {
|
|
1451
|
-
|
|
1451
|
+
_e(this, "gestures", /* @__PURE__ */ new Set()), _e(this, "_targetEventStore", new ur(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", {
|
|
1452
1452
|
shared: {
|
|
1453
1453
|
shiftKey: !1,
|
|
1454
1454
|
metaKey: !1,
|
|
@@ -1458,7 +1458,7 @@ class Fs {
|
|
|
1458
1458
|
}), Vs(this, e);
|
|
1459
1459
|
}
|
|
1460
1460
|
setEventIds(e) {
|
|
1461
|
-
if (
|
|
1461
|
+
if (Qt(e))
|
|
1462
1462
|
return this.touchIds = new Set(fs(e)), this.touchIds;
|
|
1463
1463
|
if ("pointerId" in e)
|
|
1464
1464
|
return e.type === "pointerup" || e.type === "pointercancel" ? this.pointerIds.delete(e.pointerId) : e.type === "pointerdown" && this.pointerIds.add(e.pointerId), this.pointerIds;
|
|
@@ -1491,7 +1491,7 @@ class Fs {
|
|
|
1491
1491
|
}
|
|
1492
1492
|
const o = Hn(r, t.eventOptions, !!s);
|
|
1493
1493
|
for (const i in this.nativeHandlers)
|
|
1494
|
-
o(i, "", (c) => this.nativeHandlers[i](
|
|
1494
|
+
o(i, "", (c) => this.nativeHandlers[i](te(te({}, this.state.shared), {}, {
|
|
1495
1495
|
event: c,
|
|
1496
1496
|
args: e
|
|
1497
1497
|
})), void 0, !0);
|
|
@@ -1526,11 +1526,11 @@ const Hn = (n, e, t) => (r, s, o, i = {}, c = !1) => {
|
|
|
1526
1526
|
t && h && (f += "Passive"), n[f] = n[f] || [], n[f].push(o);
|
|
1527
1527
|
};
|
|
1528
1528
|
function Us(n, e = {}, t, r) {
|
|
1529
|
-
const s =
|
|
1530
|
-
if (s.applyHandlers(n, r), s.applyConfig(e, t),
|
|
1529
|
+
const s = Ze.useMemo(() => new Fs(n), []);
|
|
1530
|
+
if (s.applyHandlers(n, r), s.applyConfig(e, t), Ze.useEffect(s.effect.bind(s)), Ze.useEffect(() => s.clean.bind(s), []), e.target === void 0)
|
|
1531
1531
|
return s.bind.bind(s);
|
|
1532
1532
|
}
|
|
1533
|
-
function
|
|
1533
|
+
function an(n, e) {
|
|
1534
1534
|
return Os(Ms), Us({
|
|
1535
1535
|
drag: n
|
|
1536
1536
|
}, e || {}, "drag");
|
|
@@ -1556,7 +1556,7 @@ function fr(...n) {
|
|
|
1556
1556
|
};
|
|
1557
1557
|
};
|
|
1558
1558
|
}
|
|
1559
|
-
function
|
|
1559
|
+
function et(...n) {
|
|
1560
1560
|
return g.useCallback(fr(...n), n);
|
|
1561
1561
|
}
|
|
1562
1562
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -1565,9 +1565,9 @@ function dr(n) {
|
|
|
1565
1565
|
const { children: o, ...i } = r, c = g.Children.toArray(o), a = c.find(Ys);
|
|
1566
1566
|
if (a) {
|
|
1567
1567
|
const u = a.props.children, l = c.map((h) => h === a ? g.Children.count(u) > 1 ? g.Children.only(null) : g.isValidElement(u) ? u.props.children : null : h);
|
|
1568
|
-
return /* @__PURE__ */
|
|
1568
|
+
return /* @__PURE__ */ R.jsx(e, { ...i, ref: s, children: g.isValidElement(u) ? g.cloneElement(u, void 0, l) : null });
|
|
1569
1569
|
}
|
|
1570
|
-
return /* @__PURE__ */
|
|
1570
|
+
return /* @__PURE__ */ R.jsx(e, { ...i, ref: s, children: o });
|
|
1571
1571
|
});
|
|
1572
1572
|
return t.displayName = `${n}.Slot`, t;
|
|
1573
1573
|
}
|
|
@@ -1577,7 +1577,7 @@ function Hs(n) {
|
|
|
1577
1577
|
const e = g.forwardRef((t, r) => {
|
|
1578
1578
|
const { children: s, ...o } = t;
|
|
1579
1579
|
if (g.isValidElement(s)) {
|
|
1580
|
-
const i =
|
|
1580
|
+
const i = Gs(s), c = Xs(o, s.props);
|
|
1581
1581
|
return s.type !== g.Fragment && (c.ref = r ? fr(r, i) : i), g.cloneElement(s, c);
|
|
1582
1582
|
}
|
|
1583
1583
|
return g.Children.count(s) > 1 ? g.Children.only(null) : null;
|
|
@@ -1599,11 +1599,11 @@ function Xs(n, e) {
|
|
|
1599
1599
|
}
|
|
1600
1600
|
return { ...n, ...t };
|
|
1601
1601
|
}
|
|
1602
|
-
function
|
|
1602
|
+
function Gs(n) {
|
|
1603
1603
|
let e = Object.getOwnPropertyDescriptor(n.props, "ref")?.get, t = e && "isReactWarning" in e && e.isReactWarning;
|
|
1604
1604
|
return t ? n.ref : (e = Object.getOwnPropertyDescriptor(n, "ref")?.get, t = e && "isReactWarning" in e && e.isReactWarning, t ? n.props.ref : n.props.ref || n.ref);
|
|
1605
1605
|
}
|
|
1606
|
-
var
|
|
1606
|
+
var Ks = [
|
|
1607
1607
|
"a",
|
|
1608
1608
|
"button",
|
|
1609
1609
|
"div",
|
|
@@ -1621,10 +1621,10 @@ var Gs = [
|
|
|
1621
1621
|
"span",
|
|
1622
1622
|
"svg",
|
|
1623
1623
|
"ul"
|
|
1624
|
-
], kt =
|
|
1624
|
+
], kt = Ks.reduce((n, e) => {
|
|
1625
1625
|
const t = /* @__PURE__ */ dr(`Primitive.${e}`), r = g.forwardRef((s, o) => {
|
|
1626
1626
|
const { asChild: i, ...c } = s, a = i ? t : e;
|
|
1627
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */
|
|
1627
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ R.jsx(a, { ...c, ref: o });
|
|
1628
1628
|
});
|
|
1629
1629
|
return r.displayName = `Primitive.${e}`, { ...n, [e]: r };
|
|
1630
1630
|
}, {});
|
|
@@ -1634,12 +1634,12 @@ function qs(n, e = []) {
|
|
|
1634
1634
|
const c = g.createContext(i), a = t.length;
|
|
1635
1635
|
t = [...t, i];
|
|
1636
1636
|
const u = (h) => {
|
|
1637
|
-
const { scope: f, children:
|
|
1638
|
-
return /* @__PURE__ */
|
|
1637
|
+
const { scope: f, children: p, ...S } = h, v = f?.[n]?.[a] || c, m = g.useMemo(() => S, Object.values(S));
|
|
1638
|
+
return /* @__PURE__ */ R.jsx(v.Provider, { value: m, children: p });
|
|
1639
1639
|
};
|
|
1640
1640
|
u.displayName = o + "Provider";
|
|
1641
1641
|
function l(h, f) {
|
|
1642
|
-
const
|
|
1642
|
+
const p = f?.[n]?.[a] || c, S = g.useContext(p);
|
|
1643
1643
|
if (S) return S;
|
|
1644
1644
|
if (i !== void 0) return i;
|
|
1645
1645
|
throw new Error(`\`${h}\` must be used within \`${o}\``);
|
|
@@ -1676,7 +1676,7 @@ function Js(...n) {
|
|
|
1676
1676
|
};
|
|
1677
1677
|
return t.scopeName = e.scopeName, t;
|
|
1678
1678
|
}
|
|
1679
|
-
function
|
|
1679
|
+
function Qe(n, e, { checkForDefaultPrevented: t = !0 } = {}) {
|
|
1680
1680
|
return function(s) {
|
|
1681
1681
|
if (n?.(s), t === !1 || !s.defaultPrevented)
|
|
1682
1682
|
return e?.(s);
|
|
@@ -1688,7 +1688,7 @@ function Zs(n, e) {
|
|
|
1688
1688
|
return g.useReducer((t, r) => e[t][r] ?? t, n);
|
|
1689
1689
|
}
|
|
1690
1690
|
var Wt = (n) => {
|
|
1691
|
-
const { present: e, children: t } = n, r = Qs(e), s = typeof t == "function" ? t({ present: r.isPresent }) : g.Children.only(t), o =
|
|
1691
|
+
const { present: e, children: t } = n, r = Qs(e), s = typeof t == "function" ? t({ present: r.isPresent }) : g.Children.only(t), o = et(r.ref, eo(s));
|
|
1692
1692
|
return typeof t == "function" || r.isPresent ? g.cloneElement(s, { ref: o }) : null;
|
|
1693
1693
|
};
|
|
1694
1694
|
Wt.displayName = "Presence";
|
|
@@ -1712,22 +1712,22 @@ function Qs(n) {
|
|
|
1712
1712
|
}, [c]), pn(() => {
|
|
1713
1713
|
const u = r.current, l = s.current;
|
|
1714
1714
|
if (l !== n) {
|
|
1715
|
-
const f = o.current,
|
|
1716
|
-
n ? a("MOUNT") :
|
|
1715
|
+
const f = o.current, p = Ut(u);
|
|
1716
|
+
n ? a("MOUNT") : p === "none" || u?.display === "none" ? a("UNMOUNT") : a(l && f !== p ? "ANIMATION_OUT" : "UNMOUNT"), s.current = n;
|
|
1717
1717
|
}
|
|
1718
1718
|
}, [n, a]), pn(() => {
|
|
1719
1719
|
if (e) {
|
|
1720
1720
|
let u;
|
|
1721
|
-
const l = e.ownerDocument.defaultView ?? window, h = (
|
|
1722
|
-
const v = Ut(r.current).includes(CSS.escape(
|
|
1723
|
-
if (
|
|
1724
|
-
const
|
|
1721
|
+
const l = e.ownerDocument.defaultView ?? window, h = (p) => {
|
|
1722
|
+
const v = Ut(r.current).includes(CSS.escape(p.animationName));
|
|
1723
|
+
if (p.target === e && v && (a("ANIMATION_END"), !s.current)) {
|
|
1724
|
+
const m = e.style.animationFillMode;
|
|
1725
1725
|
e.style.animationFillMode = "forwards", u = l.setTimeout(() => {
|
|
1726
|
-
e.style.animationFillMode === "forwards" && (e.style.animationFillMode =
|
|
1726
|
+
e.style.animationFillMode === "forwards" && (e.style.animationFillMode = m);
|
|
1727
1727
|
});
|
|
1728
1728
|
}
|
|
1729
|
-
}, f = (
|
|
1730
|
-
|
|
1729
|
+
}, f = (p) => {
|
|
1730
|
+
p.target === e && (o.current = Ut(r.current));
|
|
1731
1731
|
};
|
|
1732
1732
|
return e.addEventListener("animationstart", f), e.addEventListener("animationcancel", h), e.addEventListener("animationend", h), () => {
|
|
1733
1733
|
l.clearTimeout(u), e.removeEventListener("animationstart", f), e.removeEventListener("animationcancel", h), e.removeEventListener("animationend", h);
|
|
@@ -1753,7 +1753,7 @@ function no(n) {
|
|
|
1753
1753
|
const e = g.useContext(to);
|
|
1754
1754
|
return n || e || "ltr";
|
|
1755
1755
|
}
|
|
1756
|
-
function
|
|
1756
|
+
function Je(n) {
|
|
1757
1757
|
const e = g.useRef(n);
|
|
1758
1758
|
return g.useEffect(() => {
|
|
1759
1759
|
e.current = n;
|
|
@@ -1773,39 +1773,39 @@ var _n = "ScrollArea", [hr] = qs(_n), [oo, Ee] = hr(_n), mr = g.forwardRef(
|
|
|
1773
1773
|
dir: s,
|
|
1774
1774
|
scrollHideDelay: o = 600,
|
|
1775
1775
|
...i
|
|
1776
|
-
} = n, [c, a] = g.useState(null), [u, l] = g.useState(null), [h, f] = g.useState(null), [
|
|
1777
|
-
return /* @__PURE__ */
|
|
1776
|
+
} = n, [c, a] = g.useState(null), [u, l] = g.useState(null), [h, f] = g.useState(null), [p, S] = g.useState(null), [v, m] = g.useState(null), [E, b] = g.useState(0), [_, w] = g.useState(0), [T, P] = g.useState(!1), [D, H] = g.useState(!1), O = et(e, (W) => a(W)), j = no(s);
|
|
1777
|
+
return /* @__PURE__ */ R.jsx(
|
|
1778
1778
|
oo,
|
|
1779
1779
|
{
|
|
1780
1780
|
scope: t,
|
|
1781
1781
|
type: r,
|
|
1782
|
-
dir:
|
|
1782
|
+
dir: j,
|
|
1783
1783
|
scrollHideDelay: o,
|
|
1784
1784
|
scrollArea: c,
|
|
1785
1785
|
viewport: u,
|
|
1786
1786
|
onViewportChange: l,
|
|
1787
1787
|
content: h,
|
|
1788
1788
|
onContentChange: f,
|
|
1789
|
-
scrollbarX:
|
|
1789
|
+
scrollbarX: p,
|
|
1790
1790
|
onScrollbarXChange: S,
|
|
1791
|
-
scrollbarXEnabled:
|
|
1792
|
-
onScrollbarXEnabledChange:
|
|
1791
|
+
scrollbarXEnabled: T,
|
|
1792
|
+
onScrollbarXEnabledChange: P,
|
|
1793
1793
|
scrollbarY: v,
|
|
1794
|
-
onScrollbarYChange:
|
|
1795
|
-
scrollbarYEnabled:
|
|
1796
|
-
onScrollbarYEnabledChange:
|
|
1794
|
+
onScrollbarYChange: m,
|
|
1795
|
+
scrollbarYEnabled: D,
|
|
1796
|
+
onScrollbarYEnabledChange: H,
|
|
1797
1797
|
onCornerWidthChange: b,
|
|
1798
|
-
onCornerHeightChange:
|
|
1799
|
-
children: /* @__PURE__ */
|
|
1798
|
+
onCornerHeightChange: w,
|
|
1799
|
+
children: /* @__PURE__ */ R.jsx(
|
|
1800
1800
|
kt.div,
|
|
1801
1801
|
{
|
|
1802
|
-
dir:
|
|
1802
|
+
dir: j,
|
|
1803
1803
|
...i,
|
|
1804
|
-
ref:
|
|
1804
|
+
ref: O,
|
|
1805
1805
|
style: {
|
|
1806
1806
|
position: "relative",
|
|
1807
1807
|
// Pass corner sizes as CSS vars to reduce re-renders of context consumers
|
|
1808
|
-
"--radix-scroll-area-corner-width":
|
|
1808
|
+
"--radix-scroll-area-corner-width": E + "px",
|
|
1809
1809
|
"--radix-scroll-area-corner-height": _ + "px",
|
|
1810
1810
|
...n.style
|
|
1811
1811
|
}
|
|
@@ -1818,9 +1818,9 @@ var _n = "ScrollArea", [hr] = qs(_n), [oo, Ee] = hr(_n), mr = g.forwardRef(
|
|
|
1818
1818
|
mr.displayName = _n;
|
|
1819
1819
|
var pr = "ScrollAreaViewport", gr = g.forwardRef(
|
|
1820
1820
|
(n, e) => {
|
|
1821
|
-
const { __scopeScrollArea: t, children: r, nonce: s, ...o } = n, i = Ee(pr, t), c = g.useRef(null), a =
|
|
1822
|
-
return /* @__PURE__ */
|
|
1823
|
-
/* @__PURE__ */
|
|
1821
|
+
const { __scopeScrollArea: t, children: r, nonce: s, ...o } = n, i = Ee(pr, t), c = g.useRef(null), a = et(e, c, i.onViewportChange);
|
|
1822
|
+
return /* @__PURE__ */ R.jsxs(R.Fragment, { children: [
|
|
1823
|
+
/* @__PURE__ */ R.jsx(
|
|
1824
1824
|
"style",
|
|
1825
1825
|
{
|
|
1826
1826
|
dangerouslySetInnerHTML: {
|
|
@@ -1829,7 +1829,7 @@ var pr = "ScrollAreaViewport", gr = g.forwardRef(
|
|
|
1829
1829
|
nonce: s
|
|
1830
1830
|
}
|
|
1831
1831
|
),
|
|
1832
|
-
/* @__PURE__ */
|
|
1832
|
+
/* @__PURE__ */ R.jsx(
|
|
1833
1833
|
kt.div,
|
|
1834
1834
|
{
|
|
1835
1835
|
"data-radix-scroll-area-viewport": "",
|
|
@@ -1851,24 +1851,24 @@ var pr = "ScrollAreaViewport", gr = g.forwardRef(
|
|
|
1851
1851
|
overflowY: i.scrollbarYEnabled ? "scroll" : "hidden",
|
|
1852
1852
|
...n.style
|
|
1853
1853
|
},
|
|
1854
|
-
children: /* @__PURE__ */
|
|
1854
|
+
children: /* @__PURE__ */ R.jsx("div", { ref: i.onContentChange, style: { minWidth: "100%", display: "table" }, children: r })
|
|
1855
1855
|
}
|
|
1856
1856
|
)
|
|
1857
1857
|
] });
|
|
1858
1858
|
}
|
|
1859
1859
|
);
|
|
1860
1860
|
gr.displayName = pr;
|
|
1861
|
-
var
|
|
1861
|
+
var Le = "ScrollAreaScrollbar", vr = g.forwardRef(
|
|
1862
1862
|
(n, e) => {
|
|
1863
|
-
const { forceMount: t, ...r } = n, s = Ee(
|
|
1863
|
+
const { forceMount: t, ...r } = n, s = Ee(Le, n.__scopeScrollArea), { onScrollbarXEnabledChange: o, onScrollbarYEnabledChange: i } = s, c = n.orientation === "horizontal";
|
|
1864
1864
|
return g.useEffect(() => (c ? o(!0) : i(!0), () => {
|
|
1865
1865
|
c ? o(!1) : i(!1);
|
|
1866
|
-
}), [c, o, i]), s.type === "hover" ? /* @__PURE__ */
|
|
1866
|
+
}), [c, o, i]), s.type === "hover" ? /* @__PURE__ */ R.jsx(io, { ...r, ref: e, forceMount: t }) : s.type === "scroll" ? /* @__PURE__ */ R.jsx(co, { ...r, ref: e, forceMount: t }) : s.type === "auto" ? /* @__PURE__ */ R.jsx(br, { ...r, ref: e, forceMount: t }) : s.type === "always" ? /* @__PURE__ */ R.jsx(Sn, { ...r, ref: e }) : null;
|
|
1867
1867
|
}
|
|
1868
1868
|
);
|
|
1869
|
-
vr.displayName =
|
|
1869
|
+
vr.displayName = Le;
|
|
1870
1870
|
var io = g.forwardRef((n, e) => {
|
|
1871
|
-
const { forceMount: t, ...r } = n, s = Ee(
|
|
1871
|
+
const { forceMount: t, ...r } = n, s = Ee(Le, n.__scopeScrollArea), [o, i] = g.useState(!1);
|
|
1872
1872
|
return g.useEffect(() => {
|
|
1873
1873
|
const c = s.scrollArea;
|
|
1874
1874
|
let a = 0;
|
|
@@ -1882,7 +1882,7 @@ var io = g.forwardRef((n, e) => {
|
|
|
1882
1882
|
window.clearTimeout(a), c.removeEventListener("pointerenter", u), c.removeEventListener("pointerleave", l);
|
|
1883
1883
|
};
|
|
1884
1884
|
}
|
|
1885
|
-
}, [s.scrollArea, s.scrollHideDelay]), /* @__PURE__ */
|
|
1885
|
+
}, [s.scrollArea, s.scrollHideDelay]), /* @__PURE__ */ R.jsx(Wt, { present: t || o, children: /* @__PURE__ */ R.jsx(
|
|
1886
1886
|
br,
|
|
1887
1887
|
{
|
|
1888
1888
|
"data-state": o ? "visible" : "hidden",
|
|
@@ -1891,7 +1891,7 @@ var io = g.forwardRef((n, e) => {
|
|
|
1891
1891
|
}
|
|
1892
1892
|
) });
|
|
1893
1893
|
}), co = g.forwardRef((n, e) => {
|
|
1894
|
-
const { forceMount: t, ...r } = n, s = Ee(
|
|
1894
|
+
const { forceMount: t, ...r } = n, s = Ee(Le, n.__scopeScrollArea), o = n.orientation === "horizontal", i = tn(() => a("SCROLL_END"), 100), [c, a] = so("hidden", {
|
|
1895
1895
|
hidden: {
|
|
1896
1896
|
SCROLL: "scrolling"
|
|
1897
1897
|
},
|
|
@@ -1919,29 +1919,29 @@ var io = g.forwardRef((n, e) => {
|
|
|
1919
1919
|
if (u) {
|
|
1920
1920
|
let h = u[l];
|
|
1921
1921
|
const f = () => {
|
|
1922
|
-
const
|
|
1923
|
-
h !==
|
|
1922
|
+
const p = u[l];
|
|
1923
|
+
h !== p && (a("SCROLL"), i()), h = p;
|
|
1924
1924
|
};
|
|
1925
1925
|
return u.addEventListener("scroll", f), () => u.removeEventListener("scroll", f);
|
|
1926
1926
|
}
|
|
1927
|
-
}, [s.viewport, o, a, i]), /* @__PURE__ */
|
|
1927
|
+
}, [s.viewport, o, a, i]), /* @__PURE__ */ R.jsx(Wt, { present: t || c !== "hidden", children: /* @__PURE__ */ R.jsx(
|
|
1928
1928
|
Sn,
|
|
1929
1929
|
{
|
|
1930
1930
|
"data-state": c === "hidden" ? "hidden" : "visible",
|
|
1931
1931
|
...r,
|
|
1932
1932
|
ref: e,
|
|
1933
|
-
onPointerEnter:
|
|
1934
|
-
onPointerLeave:
|
|
1933
|
+
onPointerEnter: Qe(n.onPointerEnter, () => a("POINTER_ENTER")),
|
|
1934
|
+
onPointerLeave: Qe(n.onPointerLeave, () => a("POINTER_LEAVE"))
|
|
1935
1935
|
}
|
|
1936
1936
|
) });
|
|
1937
1937
|
}), br = g.forwardRef((n, e) => {
|
|
1938
|
-
const t = Ee(
|
|
1938
|
+
const t = Ee(Le, n.__scopeScrollArea), { forceMount: r, ...s } = n, [o, i] = g.useState(!1), c = n.orientation === "horizontal", a = tn(() => {
|
|
1939
1939
|
if (t.viewport) {
|
|
1940
1940
|
const u = t.viewport.offsetWidth < t.viewport.scrollWidth, l = t.viewport.offsetHeight < t.viewport.scrollHeight;
|
|
1941
1941
|
i(c ? u : l);
|
|
1942
1942
|
}
|
|
1943
1943
|
}, 10);
|
|
1944
|
-
return
|
|
1944
|
+
return Tt(t.viewport, a), Tt(t.content, a), /* @__PURE__ */ R.jsx(Wt, { present: r || o, children: /* @__PURE__ */ R.jsx(
|
|
1945
1945
|
Sn,
|
|
1946
1946
|
{
|
|
1947
1947
|
"data-state": o ? "visible" : "hidden",
|
|
@@ -1950,7 +1950,7 @@ var io = g.forwardRef((n, e) => {
|
|
|
1950
1950
|
}
|
|
1951
1951
|
) });
|
|
1952
1952
|
}), Sn = g.forwardRef((n, e) => {
|
|
1953
|
-
const { orientation: t = "vertical", ...r } = n, s = Ee(
|
|
1953
|
+
const { orientation: t = "vertical", ...r } = n, s = Ee(Le, n.__scopeScrollArea), o = g.useRef(null), i = g.useRef(0), [c, a] = g.useState({
|
|
1954
1954
|
content: 0,
|
|
1955
1955
|
viewport: 0,
|
|
1956
1956
|
scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 }
|
|
@@ -1963,18 +1963,18 @@ var io = g.forwardRef((n, e) => {
|
|
|
1963
1963
|
onThumbPointerUp: () => i.current = 0,
|
|
1964
1964
|
onThumbPointerDown: (f) => i.current = f
|
|
1965
1965
|
};
|
|
1966
|
-
function h(f,
|
|
1967
|
-
return mo(f, i.current, c,
|
|
1966
|
+
function h(f, p) {
|
|
1967
|
+
return mo(f, i.current, c, p);
|
|
1968
1968
|
}
|
|
1969
|
-
return t === "horizontal" ? /* @__PURE__ */
|
|
1969
|
+
return t === "horizontal" ? /* @__PURE__ */ R.jsx(
|
|
1970
1970
|
ao,
|
|
1971
1971
|
{
|
|
1972
1972
|
...l,
|
|
1973
1973
|
ref: e,
|
|
1974
1974
|
onThumbPositionChange: () => {
|
|
1975
1975
|
if (s.viewport && o.current) {
|
|
1976
|
-
const f = s.viewport.scrollLeft,
|
|
1977
|
-
o.current.style.transform = `translate3d(${
|
|
1976
|
+
const f = s.viewport.scrollLeft, p = Yn(f, c, s.dir);
|
|
1977
|
+
o.current.style.transform = `translate3d(${p}px, 0, 0)`;
|
|
1978
1978
|
}
|
|
1979
1979
|
},
|
|
1980
1980
|
onWheelScroll: (f) => {
|
|
@@ -1984,15 +1984,15 @@ var io = g.forwardRef((n, e) => {
|
|
|
1984
1984
|
s.viewport && (s.viewport.scrollLeft = h(f, s.dir));
|
|
1985
1985
|
}
|
|
1986
1986
|
}
|
|
1987
|
-
) : t === "vertical" ? /* @__PURE__ */
|
|
1987
|
+
) : t === "vertical" ? /* @__PURE__ */ R.jsx(
|
|
1988
1988
|
lo,
|
|
1989
1989
|
{
|
|
1990
1990
|
...l,
|
|
1991
1991
|
ref: e,
|
|
1992
1992
|
onThumbPositionChange: () => {
|
|
1993
1993
|
if (s.viewport && o.current) {
|
|
1994
|
-
const f = s.viewport.scrollTop,
|
|
1995
|
-
o.current.style.transform = `translate3d(0, ${
|
|
1994
|
+
const f = s.viewport.scrollTop, p = Yn(f, c);
|
|
1995
|
+
o.current.style.transform = `translate3d(0, ${p}px, 0)`;
|
|
1996
1996
|
}
|
|
1997
1997
|
},
|
|
1998
1998
|
onWheelScroll: (f) => {
|
|
@@ -2004,10 +2004,10 @@ var io = g.forwardRef((n, e) => {
|
|
|
2004
2004
|
}
|
|
2005
2005
|
) : null;
|
|
2006
2006
|
}), ao = g.forwardRef((n, e) => {
|
|
2007
|
-
const { sizes: t, onSizesChange: r, ...s } = n, o = Ee(
|
|
2007
|
+
const { sizes: t, onSizesChange: r, ...s } = n, o = Ee(Le, n.__scopeScrollArea), [i, c] = g.useState(), a = g.useRef(null), u = et(e, a, o.onScrollbarXChange);
|
|
2008
2008
|
return g.useEffect(() => {
|
|
2009
2009
|
a.current && c(getComputedStyle(a.current));
|
|
2010
|
-
}, [a]), /* @__PURE__ */
|
|
2010
|
+
}, [a]), /* @__PURE__ */ R.jsx(
|
|
2011
2011
|
Sr,
|
|
2012
2012
|
{
|
|
2013
2013
|
"data-orientation": "horizontal",
|
|
@@ -2018,7 +2018,7 @@ var io = g.forwardRef((n, e) => {
|
|
|
2018
2018
|
bottom: 0,
|
|
2019
2019
|
left: o.dir === "rtl" ? "var(--radix-scroll-area-corner-width)" : 0,
|
|
2020
2020
|
right: o.dir === "ltr" ? "var(--radix-scroll-area-corner-width)" : 0,
|
|
2021
|
-
"--radix-scroll-area-thumb-width":
|
|
2021
|
+
"--radix-scroll-area-thumb-width": en(t) + "px",
|
|
2022
2022
|
...n.style
|
|
2023
2023
|
},
|
|
2024
2024
|
onThumbPointerDown: (l) => n.onThumbPointerDown(l.x),
|
|
@@ -2035,18 +2035,18 @@ var io = g.forwardRef((n, e) => {
|
|
|
2035
2035
|
viewport: o.viewport.offsetWidth,
|
|
2036
2036
|
scrollbar: {
|
|
2037
2037
|
size: a.current.clientWidth,
|
|
2038
|
-
paddingStart:
|
|
2039
|
-
paddingEnd:
|
|
2038
|
+
paddingStart: Jt(i.paddingLeft),
|
|
2039
|
+
paddingEnd: Jt(i.paddingRight)
|
|
2040
2040
|
}
|
|
2041
2041
|
});
|
|
2042
2042
|
}
|
|
2043
2043
|
}
|
|
2044
2044
|
);
|
|
2045
2045
|
}), lo = g.forwardRef((n, e) => {
|
|
2046
|
-
const { sizes: t, onSizesChange: r, ...s } = n, o = Ee(
|
|
2046
|
+
const { sizes: t, onSizesChange: r, ...s } = n, o = Ee(Le, n.__scopeScrollArea), [i, c] = g.useState(), a = g.useRef(null), u = et(e, a, o.onScrollbarYChange);
|
|
2047
2047
|
return g.useEffect(() => {
|
|
2048
2048
|
a.current && c(getComputedStyle(a.current));
|
|
2049
|
-
}, [a]), /* @__PURE__ */
|
|
2049
|
+
}, [a]), /* @__PURE__ */ R.jsx(
|
|
2050
2050
|
Sr,
|
|
2051
2051
|
{
|
|
2052
2052
|
"data-orientation": "vertical",
|
|
@@ -2058,7 +2058,7 @@ var io = g.forwardRef((n, e) => {
|
|
|
2058
2058
|
right: o.dir === "ltr" ? 0 : void 0,
|
|
2059
2059
|
left: o.dir === "rtl" ? 0 : void 0,
|
|
2060
2060
|
bottom: "var(--radix-scroll-area-corner-height)",
|
|
2061
|
-
"--radix-scroll-area-thumb-height":
|
|
2061
|
+
"--radix-scroll-area-thumb-height": en(t) + "px",
|
|
2062
2062
|
...n.style
|
|
2063
2063
|
},
|
|
2064
2064
|
onThumbPointerDown: (l) => n.onThumbPointerDown(l.y),
|
|
@@ -2075,14 +2075,14 @@ var io = g.forwardRef((n, e) => {
|
|
|
2075
2075
|
viewport: o.viewport.offsetHeight,
|
|
2076
2076
|
scrollbar: {
|
|
2077
2077
|
size: a.current.clientHeight,
|
|
2078
|
-
paddingStart:
|
|
2079
|
-
paddingEnd:
|
|
2078
|
+
paddingStart: Jt(i.paddingTop),
|
|
2079
|
+
paddingEnd: Jt(i.paddingBottom)
|
|
2080
2080
|
}
|
|
2081
2081
|
});
|
|
2082
2082
|
}
|
|
2083
2083
|
}
|
|
2084
2084
|
);
|
|
2085
|
-
}), [uo, _r] = hr(
|
|
2085
|
+
}), [uo, _r] = hr(Le), Sr = g.forwardRef((n, e) => {
|
|
2086
2086
|
const {
|
|
2087
2087
|
__scopeScrollArea: t,
|
|
2088
2088
|
sizes: r,
|
|
@@ -2095,58 +2095,58 @@ var io = g.forwardRef((n, e) => {
|
|
|
2095
2095
|
onWheelScroll: l,
|
|
2096
2096
|
onResize: h,
|
|
2097
2097
|
...f
|
|
2098
|
-
} = n,
|
|
2099
|
-
function
|
|
2100
|
-
if (
|
|
2101
|
-
const
|
|
2102
|
-
u({ x:
|
|
2098
|
+
} = n, p = Ee(Le, t), [S, v] = g.useState(null), m = et(e, (O) => v(O)), E = g.useRef(null), b = g.useRef(""), _ = p.viewport, w = r.content - r.viewport, T = Je(l), P = Je(a), D = tn(h, 10);
|
|
2099
|
+
function H(O) {
|
|
2100
|
+
if (E.current) {
|
|
2101
|
+
const j = O.clientX - E.current.left, W = O.clientY - E.current.top;
|
|
2102
|
+
u({ x: j, y: W });
|
|
2103
2103
|
}
|
|
2104
2104
|
}
|
|
2105
2105
|
return g.useEffect(() => {
|
|
2106
|
-
const
|
|
2107
|
-
const
|
|
2108
|
-
S?.contains(
|
|
2106
|
+
const O = (j) => {
|
|
2107
|
+
const W = j.target;
|
|
2108
|
+
S?.contains(W) && T(j, w);
|
|
2109
2109
|
};
|
|
2110
|
-
return document.addEventListener("wheel",
|
|
2111
|
-
}, [_, S,
|
|
2110
|
+
return document.addEventListener("wheel", O, { passive: !1 }), () => document.removeEventListener("wheel", O, { passive: !1 });
|
|
2111
|
+
}, [_, S, w, T]), g.useEffect(P, [r, P]), Tt(S, D), Tt(p.content, D), /* @__PURE__ */ R.jsx(
|
|
2112
2112
|
uo,
|
|
2113
2113
|
{
|
|
2114
2114
|
scope: t,
|
|
2115
2115
|
scrollbar: S,
|
|
2116
2116
|
hasThumb: s,
|
|
2117
|
-
onThumbChange:
|
|
2118
|
-
onThumbPointerUp:
|
|
2119
|
-
onThumbPositionChange:
|
|
2120
|
-
onThumbPointerDown:
|
|
2121
|
-
children: /* @__PURE__ */
|
|
2117
|
+
onThumbChange: Je(o),
|
|
2118
|
+
onThumbPointerUp: Je(i),
|
|
2119
|
+
onThumbPositionChange: P,
|
|
2120
|
+
onThumbPointerDown: Je(c),
|
|
2121
|
+
children: /* @__PURE__ */ R.jsx(
|
|
2122
2122
|
kt.div,
|
|
2123
2123
|
{
|
|
2124
2124
|
...f,
|
|
2125
|
-
ref:
|
|
2125
|
+
ref: m,
|
|
2126
2126
|
style: { position: "absolute", ...f.style },
|
|
2127
|
-
onPointerDown:
|
|
2128
|
-
|
|
2127
|
+
onPointerDown: Qe(n.onPointerDown, (O) => {
|
|
2128
|
+
O.button === 0 && (O.target.setPointerCapture(O.pointerId), E.current = S.getBoundingClientRect(), b.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", p.viewport && (p.viewport.style.scrollBehavior = "auto"), H(O));
|
|
2129
2129
|
}),
|
|
2130
|
-
onPointerMove:
|
|
2131
|
-
onPointerUp:
|
|
2132
|
-
const
|
|
2133
|
-
|
|
2130
|
+
onPointerMove: Qe(n.onPointerMove, H),
|
|
2131
|
+
onPointerUp: Qe(n.onPointerUp, (O) => {
|
|
2132
|
+
const j = O.target;
|
|
2133
|
+
j.hasPointerCapture(O.pointerId) && j.releasePointerCapture(O.pointerId), document.body.style.webkitUserSelect = b.current, p.viewport && (p.viewport.style.scrollBehavior = ""), E.current = null;
|
|
2134
2134
|
})
|
|
2135
2135
|
}
|
|
2136
2136
|
)
|
|
2137
2137
|
}
|
|
2138
2138
|
);
|
|
2139
|
-
}),
|
|
2139
|
+
}), qt = "ScrollAreaThumb", wr = g.forwardRef(
|
|
2140
2140
|
(n, e) => {
|
|
2141
|
-
const { forceMount: t, ...r } = n, s = _r(
|
|
2142
|
-
return /* @__PURE__ */
|
|
2141
|
+
const { forceMount: t, ...r } = n, s = _r(qt, n.__scopeScrollArea);
|
|
2142
|
+
return /* @__PURE__ */ R.jsx(Wt, { present: t || s.hasThumb, children: /* @__PURE__ */ R.jsx(fo, { ref: e, ...r }) });
|
|
2143
2143
|
}
|
|
2144
2144
|
), fo = g.forwardRef(
|
|
2145
2145
|
(n, e) => {
|
|
2146
|
-
const { __scopeScrollArea: t, style: r, ...s } = n, o = Ee(
|
|
2146
|
+
const { __scopeScrollArea: t, style: r, ...s } = n, o = Ee(qt, t), i = _r(qt, t), { onThumbPositionChange: c } = i, a = et(
|
|
2147
2147
|
e,
|
|
2148
2148
|
(h) => i.onThumbChange(h)
|
|
2149
|
-
), u = g.useRef(void 0), l =
|
|
2149
|
+
), u = g.useRef(void 0), l = tn(() => {
|
|
2150
2150
|
u.current && (u.current(), u.current = void 0);
|
|
2151
2151
|
}, 100);
|
|
2152
2152
|
return g.useEffect(() => {
|
|
@@ -2154,13 +2154,13 @@ var io = g.forwardRef((n, e) => {
|
|
|
2154
2154
|
if (h) {
|
|
2155
2155
|
const f = () => {
|
|
2156
2156
|
if (l(), !u.current) {
|
|
2157
|
-
const
|
|
2158
|
-
u.current =
|
|
2157
|
+
const p = po(h, c);
|
|
2158
|
+
u.current = p, c();
|
|
2159
2159
|
}
|
|
2160
2160
|
};
|
|
2161
2161
|
return c(), h.addEventListener("scroll", f), () => h.removeEventListener("scroll", f);
|
|
2162
2162
|
}
|
|
2163
|
-
}, [o.viewport, l, c]), /* @__PURE__ */
|
|
2163
|
+
}, [o.viewport, l, c]), /* @__PURE__ */ R.jsx(
|
|
2164
2164
|
kt.div,
|
|
2165
2165
|
{
|
|
2166
2166
|
"data-state": i.hasThumb ? "visible" : "hidden",
|
|
@@ -2171,32 +2171,32 @@ var io = g.forwardRef((n, e) => {
|
|
|
2171
2171
|
height: "var(--radix-scroll-area-thumb-height)",
|
|
2172
2172
|
...r
|
|
2173
2173
|
},
|
|
2174
|
-
onPointerDownCapture:
|
|
2175
|
-
const
|
|
2174
|
+
onPointerDownCapture: Qe(n.onPointerDownCapture, (h) => {
|
|
2175
|
+
const p = h.target.getBoundingClientRect(), S = h.clientX - p.left, v = h.clientY - p.top;
|
|
2176
2176
|
i.onThumbPointerDown({ x: S, y: v });
|
|
2177
2177
|
}),
|
|
2178
|
-
onPointerUp:
|
|
2178
|
+
onPointerUp: Qe(n.onPointerUp, i.onThumbPointerUp)
|
|
2179
2179
|
}
|
|
2180
2180
|
);
|
|
2181
2181
|
}
|
|
2182
2182
|
);
|
|
2183
|
-
wr.displayName =
|
|
2183
|
+
wr.displayName = qt;
|
|
2184
2184
|
var wn = "ScrollAreaCorner", Er = g.forwardRef(
|
|
2185
2185
|
(n, e) => {
|
|
2186
2186
|
const t = Ee(wn, n.__scopeScrollArea), r = !!(t.scrollbarX && t.scrollbarY);
|
|
2187
|
-
return t.type !== "scroll" && r ? /* @__PURE__ */
|
|
2187
|
+
return t.type !== "scroll" && r ? /* @__PURE__ */ R.jsx(ho, { ...n, ref: e }) : null;
|
|
2188
2188
|
}
|
|
2189
2189
|
);
|
|
2190
2190
|
Er.displayName = wn;
|
|
2191
2191
|
var ho = g.forwardRef((n, e) => {
|
|
2192
2192
|
const { __scopeScrollArea: t, ...r } = n, s = Ee(wn, t), [o, i] = g.useState(0), [c, a] = g.useState(0), u = !!(o && c);
|
|
2193
|
-
return
|
|
2193
|
+
return Tt(s.scrollbarX, () => {
|
|
2194
2194
|
const l = s.scrollbarX?.offsetHeight || 0;
|
|
2195
2195
|
s.onCornerHeightChange(l), a(l);
|
|
2196
|
-
}),
|
|
2196
|
+
}), Tt(s.scrollbarY, () => {
|
|
2197
2197
|
const l = s.scrollbarY?.offsetWidth || 0;
|
|
2198
2198
|
s.onCornerWidthChange(l), i(l);
|
|
2199
|
-
}), u ? /* @__PURE__ */
|
|
2199
|
+
}), u ? /* @__PURE__ */ R.jsx(
|
|
2200
2200
|
kt.div,
|
|
2201
2201
|
{
|
|
2202
2202
|
...r,
|
|
@@ -2213,23 +2213,23 @@ var ho = g.forwardRef((n, e) => {
|
|
|
2213
2213
|
}
|
|
2214
2214
|
) : null;
|
|
2215
2215
|
});
|
|
2216
|
-
function
|
|
2216
|
+
function Jt(n) {
|
|
2217
2217
|
return n ? parseInt(n, 10) : 0;
|
|
2218
2218
|
}
|
|
2219
2219
|
function yr(n, e) {
|
|
2220
2220
|
const t = n / e;
|
|
2221
2221
|
return isNaN(t) ? 0 : t;
|
|
2222
2222
|
}
|
|
2223
|
-
function
|
|
2223
|
+
function en(n) {
|
|
2224
2224
|
const e = yr(n.viewport, n.content), t = n.scrollbar.paddingStart + n.scrollbar.paddingEnd, r = (n.scrollbar.size - t) * e;
|
|
2225
2225
|
return Math.max(r, 18);
|
|
2226
2226
|
}
|
|
2227
2227
|
function mo(n, e, t, r = "ltr") {
|
|
2228
|
-
const s =
|
|
2228
|
+
const s = en(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, h = r === "ltr" ? [0, l] : [l * -1, 0];
|
|
2229
2229
|
return xr([a, u], h)(n);
|
|
2230
2230
|
}
|
|
2231
2231
|
function Yn(n, e, t = "ltr") {
|
|
2232
|
-
const r =
|
|
2232
|
+
const r = en(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);
|
|
2233
2233
|
return xr([0, i], [0, c])(u);
|
|
2234
2234
|
}
|
|
2235
2235
|
function xr(n, e) {
|
|
@@ -2250,14 +2250,14 @@ var po = (n, e = () => {
|
|
|
2250
2250
|
(i || c) && e(), t = o, r = window.requestAnimationFrame(s);
|
|
2251
2251
|
})(), () => window.cancelAnimationFrame(r);
|
|
2252
2252
|
};
|
|
2253
|
-
function
|
|
2254
|
-
const t =
|
|
2253
|
+
function tn(n, e) {
|
|
2254
|
+
const t = Je(n), r = g.useRef(0);
|
|
2255
2255
|
return g.useEffect(() => () => window.clearTimeout(r.current), []), g.useCallback(() => {
|
|
2256
2256
|
window.clearTimeout(r.current), r.current = window.setTimeout(t, e);
|
|
2257
2257
|
}, [t, e]);
|
|
2258
2258
|
}
|
|
2259
|
-
function
|
|
2260
|
-
const t =
|
|
2259
|
+
function Tt(n, e) {
|
|
2260
|
+
const t = Je(e);
|
|
2261
2261
|
pn(() => {
|
|
2262
2262
|
let r = 0;
|
|
2263
2263
|
if (n) {
|
|
@@ -2271,7 +2271,7 @@ function At(n, e) {
|
|
|
2271
2271
|
}, [n, t]);
|
|
2272
2272
|
}
|
|
2273
2273
|
var go = mr, vo = gr, bo = Er;
|
|
2274
|
-
const
|
|
2274
|
+
const ln = (n, e, t, r, s) => ({
|
|
2275
2275
|
target: n,
|
|
2276
2276
|
dx: e[0],
|
|
2277
2277
|
dy: e[1],
|
|
@@ -2284,7 +2284,7 @@ const un = (n, e, t, r, s) => ({
|
|
|
2284
2284
|
deltaRect: s
|
|
2285
2285
|
}
|
|
2286
2286
|
}), _o = (n, e, t) => n ? n === e || n === t || (e?.contains(n) ?? !1) || (t?.contains(n) ?? !1) : !1, So = (n) => {
|
|
2287
|
-
const e =
|
|
2287
|
+
const e = De.c(34), {
|
|
2288
2288
|
children: t,
|
|
2289
2289
|
style: r,
|
|
2290
2290
|
draggable: s,
|
|
@@ -2292,133 +2292,131 @@ const un = (n, e, t, r, s) => ({
|
|
|
2292
2292
|
draggableOptions: i,
|
|
2293
2293
|
resizableOptions: c,
|
|
2294
2294
|
ref: a
|
|
2295
|
-
} = n, u = ce(void 0), l = ce(void 0), h = ce(null), f = ce(null),
|
|
2296
|
-
let v;
|
|
2295
|
+
} = n, u = ce(void 0), l = ce(void 0), h = ce(null), f = ce(null), p = ce(void 0), S = ce(void 0);
|
|
2296
|
+
let v, m;
|
|
2297
2297
|
e[0] !== i || e[1] !== a || e[2] !== c ? (v = () => {
|
|
2298
2298
|
if (u.current = i, l.current = c, !a?.current)
|
|
2299
2299
|
return;
|
|
2300
|
-
const
|
|
2301
|
-
|
|
2302
|
-
}, e[0] = i, e[1] = a, e[2] = c, e[3] = v) : v = e[3];
|
|
2303
|
-
let
|
|
2304
|
-
e[
|
|
2305
|
-
let w;
|
|
2306
|
-
e[7] !== a ? (w = (R) => {
|
|
2300
|
+
const y = c?.edges?.left, A = c?.edges?.right;
|
|
2301
|
+
y && y !== p.current && (p.current = y, h.current = a.current.querySelector(y)), A && A !== S.current && (S.current = A, f.current = a.current.querySelector(A));
|
|
2302
|
+
}, m = [i, a, c], e[0] = i, e[1] = a, e[2] = c, e[3] = v, e[4] = m) : (v = e[3], m = e[4]), At(v, m);
|
|
2303
|
+
let E;
|
|
2304
|
+
e[5] !== a ? (E = (y) => {
|
|
2307
2305
|
const {
|
|
2308
|
-
active:
|
|
2309
|
-
delta:
|
|
2310
|
-
xy:
|
|
2311
|
-
event:
|
|
2306
|
+
active: A,
|
|
2307
|
+
delta: M,
|
|
2308
|
+
xy: Z,
|
|
2309
|
+
event: ee,
|
|
2312
2310
|
first: d,
|
|
2313
|
-
last:
|
|
2314
|
-
} =
|
|
2315
|
-
if (!
|
|
2311
|
+
last: x
|
|
2312
|
+
} = y, N = a?.current;
|
|
2313
|
+
if (!N || _o(ee?.target, h.current, f.current))
|
|
2316
2314
|
return;
|
|
2317
|
-
const $ =
|
|
2318
|
-
d ? u.current?.onstart?.($) :
|
|
2319
|
-
}, e[
|
|
2315
|
+
const $ = ln(N, M, Z);
|
|
2316
|
+
d ? u.current?.onstart?.($) : x ? u.current?.onend?.($) : A && u.current?.onmove?.($);
|
|
2317
|
+
}, e[5] = a, e[6] = E) : E = e[6];
|
|
2320
2318
|
const b = i?.lockAxis === "x" ? "x" : void 0;
|
|
2321
2319
|
let _;
|
|
2322
|
-
e[
|
|
2320
|
+
e[7] === Symbol.for("react.memo_cache_sentinel") ? (_ = {
|
|
2323
2321
|
capture: !0
|
|
2324
|
-
}, e[
|
|
2325
|
-
let
|
|
2326
|
-
e[
|
|
2322
|
+
}, e[7] = _) : _ = e[7];
|
|
2323
|
+
let w;
|
|
2324
|
+
e[8] !== s || e[9] !== a || e[10] !== b ? (w = {
|
|
2327
2325
|
enabled: s,
|
|
2328
2326
|
axis: b,
|
|
2329
2327
|
pointer: _,
|
|
2330
2328
|
target: a,
|
|
2331
2329
|
threshold: 0
|
|
2332
|
-
}, e[
|
|
2333
|
-
let
|
|
2334
|
-
e[
|
|
2330
|
+
}, e[8] = s, e[9] = a, e[10] = b, e[11] = w) : w = e[11], an(E, w);
|
|
2331
|
+
let T;
|
|
2332
|
+
e[12] !== a ? (T = (y) => {
|
|
2335
2333
|
const {
|
|
2336
|
-
active:
|
|
2337
|
-
delta:
|
|
2338
|
-
xy:
|
|
2339
|
-
first:
|
|
2334
|
+
active: A,
|
|
2335
|
+
delta: M,
|
|
2336
|
+
xy: Z,
|
|
2337
|
+
first: ee,
|
|
2340
2338
|
last: d
|
|
2341
|
-
} =
|
|
2342
|
-
if (!
|
|
2339
|
+
} = y, x = a?.current;
|
|
2340
|
+
if (!x)
|
|
2343
2341
|
return;
|
|
2344
|
-
const
|
|
2342
|
+
const N = ln(x, M, Z, {
|
|
2345
2343
|
left: !0
|
|
2346
2344
|
}, {
|
|
2347
|
-
left:
|
|
2345
|
+
left: M[0]
|
|
2348
2346
|
});
|
|
2349
|
-
|
|
2350
|
-
}, e[
|
|
2351
|
-
let
|
|
2352
|
-
e[
|
|
2347
|
+
ee ? l.current?.onstart?.(N) : d ? l.current?.onend?.(N) : A && l.current?.onmove?.(N);
|
|
2348
|
+
}, e[12] = a, e[13] = T) : T = e[13];
|
|
2349
|
+
let P;
|
|
2350
|
+
e[14] === Symbol.for("react.memo_cache_sentinel") ? (P = {
|
|
2353
2351
|
capture: !0
|
|
2354
|
-
}, e[
|
|
2355
|
-
let
|
|
2356
|
-
e[
|
|
2352
|
+
}, e[14] = P) : P = e[14];
|
|
2353
|
+
let D;
|
|
2354
|
+
e[15] !== o ? (D = {
|
|
2357
2355
|
enabled: o,
|
|
2358
2356
|
target: h,
|
|
2359
|
-
pointer:
|
|
2357
|
+
pointer: P,
|
|
2360
2358
|
threshold: 0
|
|
2361
|
-
}, e[
|
|
2362
|
-
let
|
|
2363
|
-
e[
|
|
2359
|
+
}, e[15] = o, e[16] = D) : D = e[16], an(T, D);
|
|
2360
|
+
let H;
|
|
2361
|
+
e[17] !== a ? (H = (y) => {
|
|
2364
2362
|
const {
|
|
2365
|
-
active:
|
|
2366
|
-
delta:
|
|
2367
|
-
xy:
|
|
2368
|
-
first:
|
|
2363
|
+
active: A,
|
|
2364
|
+
delta: M,
|
|
2365
|
+
xy: Z,
|
|
2366
|
+
first: ee,
|
|
2369
2367
|
last: d
|
|
2370
|
-
} =
|
|
2371
|
-
if (!
|
|
2368
|
+
} = y, x = a?.current;
|
|
2369
|
+
if (!x)
|
|
2372
2370
|
return;
|
|
2373
|
-
const
|
|
2371
|
+
const N = ln(x, M, Z, {
|
|
2374
2372
|
right: !0
|
|
2375
2373
|
}, {
|
|
2376
|
-
right:
|
|
2374
|
+
right: M[0]
|
|
2377
2375
|
});
|
|
2378
|
-
|
|
2379
|
-
}, e[
|
|
2380
|
-
let
|
|
2381
|
-
e[
|
|
2376
|
+
ee ? l.current?.onstart?.(N) : d ? l.current?.onend?.(N) : A && l.current?.onmove?.(N);
|
|
2377
|
+
}, e[17] = a, e[18] = H) : H = e[18];
|
|
2378
|
+
let O;
|
|
2379
|
+
e[19] === Symbol.for("react.memo_cache_sentinel") ? (O = {
|
|
2382
2380
|
capture: !0
|
|
2383
|
-
}, e[
|
|
2384
|
-
let
|
|
2385
|
-
e[
|
|
2381
|
+
}, e[19] = O) : O = e[19];
|
|
2382
|
+
let j;
|
|
2383
|
+
e[20] !== o ? (j = {
|
|
2386
2384
|
enabled: o,
|
|
2387
2385
|
target: f,
|
|
2388
|
-
pointer:
|
|
2386
|
+
pointer: O,
|
|
2389
2387
|
threshold: 0
|
|
2390
|
-
}, e[
|
|
2391
|
-
let
|
|
2392
|
-
e[
|
|
2393
|
-
const
|
|
2394
|
-
if (!
|
|
2388
|
+
}, e[20] = o, e[21] = j) : j = e[21], an(H, j);
|
|
2389
|
+
let W, Y;
|
|
2390
|
+
e[22] !== a ? (W = () => {
|
|
2391
|
+
const y = a?.current;
|
|
2392
|
+
if (!y)
|
|
2395
2393
|
return;
|
|
2396
|
-
const
|
|
2397
|
-
|
|
2398
|
-
},
|
|
2399
|
-
let
|
|
2400
|
-
e[
|
|
2394
|
+
const A = l.current?.edges?.left, M = l.current?.edges?.right;
|
|
2395
|
+
A && (h.current = y.querySelector(A)), M && (f.current = y.querySelector(M));
|
|
2396
|
+
}, Y = [a], e[22] = a, e[23] = W, e[24] = Y) : (W = e[23], Y = e[24]), gn(W, Y);
|
|
2397
|
+
let C;
|
|
2398
|
+
e[25] !== s ? (C = s ? {
|
|
2401
2399
|
touchAction: "none"
|
|
2402
|
-
} : {}, e[
|
|
2403
|
-
let
|
|
2404
|
-
e[
|
|
2405
|
-
...
|
|
2400
|
+
} : {}, e[25] = s, e[26] = C) : C = e[26];
|
|
2401
|
+
let z;
|
|
2402
|
+
e[27] !== r || e[28] !== C ? (z = {
|
|
2403
|
+
...C,
|
|
2406
2404
|
...r
|
|
2407
|
-
}, e[
|
|
2408
|
-
let
|
|
2409
|
-
return e[
|
|
2410
|
-
},
|
|
2405
|
+
}, e[27] = r, e[28] = C, e[29] = z) : z = e[29];
|
|
2406
|
+
let I;
|
|
2407
|
+
return e[30] !== t || e[31] !== a || e[32] !== z ? (I = /* @__PURE__ */ R.jsx($s, { ref: a, style: z, draggable: !1, children: t }), e[30] = t, e[31] = a, e[32] = z, e[33] = I) : I = e[33], I;
|
|
2408
|
+
}, be = (n, e = 0) => n ? parseFloat(n) : e, un = (n, e, t, r = Number.MAX_SAFE_INTEGER) => {
|
|
2411
2409
|
let s = n, o = r;
|
|
2412
2410
|
for (const i of e) {
|
|
2413
2411
|
const c = Math.abs(i - n);
|
|
2414
2412
|
c < t && c < o && (s = i, o = c);
|
|
2415
2413
|
}
|
|
2416
2414
|
return {
|
|
2417
|
-
|
|
2415
|
+
snap: s,
|
|
2418
2416
|
minDis: o
|
|
2419
2417
|
};
|
|
2420
|
-
}, Cr =
|
|
2421
|
-
const t =
|
|
2418
|
+
}, Cr = Ze.forwardRef((n, e) => {
|
|
2419
|
+
const t = De.c(68), {
|
|
2422
2420
|
children: r,
|
|
2423
2421
|
edges: s,
|
|
2424
2422
|
left: o,
|
|
@@ -2428,258 +2426,256 @@ const un = (n, e, t, r, s) => ({
|
|
|
2428
2426
|
getBounds: u,
|
|
2429
2427
|
enableResizing: l,
|
|
2430
2428
|
enableDragging: h,
|
|
2431
|
-
|
|
2432
|
-
|
|
2429
|
+
snapDistance: f,
|
|
2430
|
+
snapPositions: p,
|
|
2433
2431
|
onResizeStart: S,
|
|
2434
2432
|
onResize: v,
|
|
2435
|
-
onResizeEnd:
|
|
2436
|
-
onDragStart:
|
|
2433
|
+
onResizeEnd: m,
|
|
2434
|
+
onDragStart: E,
|
|
2437
2435
|
onDragEnd: b,
|
|
2438
2436
|
onDrag: _,
|
|
2439
|
-
parentRef:
|
|
2440
|
-
autoScroll:
|
|
2441
|
-
} = n,
|
|
2442
|
-
let
|
|
2443
|
-
t[0] !==
|
|
2444
|
-
const
|
|
2445
|
-
initAutoScroll:
|
|
2446
|
-
stopAutoScroll:
|
|
2447
|
-
dealDragAutoScroll:
|
|
2437
|
+
parentRef: w,
|
|
2438
|
+
autoScroll: T
|
|
2439
|
+
} = n, P = c === void 0 ? Zt : c, D = a === void 0 ? dn : a, H = u === void 0 ? wo : u, O = l === void 0 ? !0 : l, j = h === void 0 ? !0 : h, W = f === void 0 ? hn : f;
|
|
2440
|
+
let Y;
|
|
2441
|
+
t[0] !== p ? (Y = p === void 0 ? [] : p, t[0] = p, t[1] = Y) : Y = t[1];
|
|
2442
|
+
const C = Y, z = T === void 0 ? !0 : T, I = ce(null), y = ce(0), A = ce(!1), {
|
|
2443
|
+
initAutoScroll: M,
|
|
2444
|
+
stopAutoScroll: Z,
|
|
2445
|
+
dealDragAutoScroll: ee,
|
|
2448
2446
|
dealResizeAutoScroll: d
|
|
2449
|
-
} = Zr(
|
|
2450
|
-
let
|
|
2451
|
-
t[2] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2452
|
-
const
|
|
2453
|
-
if (!
|
|
2447
|
+
} = Zr(w);
|
|
2448
|
+
let x;
|
|
2449
|
+
t[2] === Symbol.for("react.memo_cache_sentinel") ? (x = (V, q) => {
|
|
2450
|
+
const G = q === void 0 ? !0 : q;
|
|
2451
|
+
if (!I.current)
|
|
2454
2452
|
return;
|
|
2455
|
-
|
|
2456
|
-
const
|
|
2457
|
-
|
|
2458
|
-
}, t[2] =
|
|
2459
|
-
const
|
|
2453
|
+
G && (y.current = 0);
|
|
2454
|
+
const K = I.current;
|
|
2455
|
+
K.style.left = `${V}px`, K.dataset.left = String(V);
|
|
2456
|
+
}, t[2] = x) : x = t[2];
|
|
2457
|
+
const N = x;
|
|
2460
2458
|
let $;
|
|
2461
|
-
t[3] === Symbol.for("react.memo_cache_sentinel") ? ($ = (
|
|
2462
|
-
const
|
|
2463
|
-
if (!
|
|
2459
|
+
t[3] === Symbol.for("react.memo_cache_sentinel") ? ($ = (V, q) => {
|
|
2460
|
+
const G = q === void 0 ? !0 : q;
|
|
2461
|
+
if (!I.current)
|
|
2464
2462
|
return;
|
|
2465
|
-
|
|
2466
|
-
const
|
|
2467
|
-
|
|
2463
|
+
G && (y.current = 0);
|
|
2464
|
+
const K = I.current;
|
|
2465
|
+
K.style.width = `${V}px`, K.dataset.width = String(V);
|
|
2468
2466
|
}, t[3] = $) : $ = t[3];
|
|
2469
|
-
const
|
|
2470
|
-
let
|
|
2471
|
-
t[4] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2472
|
-
const B =
|
|
2467
|
+
const Q = $;
|
|
2468
|
+
let X;
|
|
2469
|
+
t[4] === Symbol.for("react.memo_cache_sentinel") ? (X = () => I.current ? be(I.current.dataset.left) : 0, t[4] = X) : X = t[4];
|
|
2470
|
+
const B = X;
|
|
2473
2471
|
let L;
|
|
2474
|
-
t[5] === Symbol.for("react.memo_cache_sentinel") ? (L = () =>
|
|
2475
|
-
const
|
|
2476
|
-
let
|
|
2477
|
-
t[6] !== i ? (
|
|
2478
|
-
if (!
|
|
2472
|
+
t[5] === Symbol.for("react.memo_cache_sentinel") ? (L = () => I.current ? be(I.current.dataset.width) : 0, t[5] = L) : L = t[5];
|
|
2473
|
+
const k = L;
|
|
2474
|
+
let U, tt;
|
|
2475
|
+
t[6] !== i ? (U = () => {
|
|
2476
|
+
if (!I.current)
|
|
2479
2477
|
return;
|
|
2480
|
-
const
|
|
2481
|
-
|
|
2482
|
-
},
|
|
2483
|
-
let
|
|
2484
|
-
t[9] !== o ? (
|
|
2485
|
-
|
|
2486
|
-
},
|
|
2478
|
+
const V = I.current;
|
|
2479
|
+
Q(typeof i > "u" ? V.offsetWidth : i, !1);
|
|
2480
|
+
}, tt = [i], t[6] = i, t[7] = U, t[8] = tt) : (U = t[7], tt = t[8]), At(U, tt);
|
|
2481
|
+
let nt, ze;
|
|
2482
|
+
t[9] !== o ? (nt = () => {
|
|
2483
|
+
N(o || 0, !1);
|
|
2484
|
+
}, ze = [o], t[9] = o, t[10] = nt, t[11] = ze) : (nt = t[10], ze = t[11]), At(nt, ze);
|
|
2487
2485
|
let Oe;
|
|
2488
2486
|
t[12] === Symbol.for("react.memo_cache_sentinel") ? (Oe = () => ({
|
|
2489
|
-
updateLeft: (
|
|
2490
|
-
updateWidth: (
|
|
2487
|
+
updateLeft: (V) => N(V || 0, !1),
|
|
2488
|
+
updateWidth: (V) => Q(V, !1),
|
|
2491
2489
|
getLeft: B,
|
|
2492
|
-
getWidth:
|
|
2490
|
+
getWidth: k
|
|
2493
2491
|
}), t[12] = Oe) : Oe = t[12], Qn(e, Oe);
|
|
2494
2492
|
let Re;
|
|
2495
|
-
t[13] !==
|
|
2496
|
-
|
|
2497
|
-
}, t[13] =
|
|
2493
|
+
t[13] !== M || t[14] !== E ? (Re = () => {
|
|
2494
|
+
y.current = 0, A.current = !1, M(), E?.();
|
|
2495
|
+
}, t[13] = M, t[14] = E, t[15] = Re) : Re = t[15];
|
|
2498
2496
|
const Ge = Re;
|
|
2499
2497
|
let Me;
|
|
2500
|
-
t[16] !==
|
|
2498
|
+
t[16] !== H || t[17] !== D || t[18] !== _ || t[19] !== W || t[20] !== C || t[21] !== P ? (Me = (V) => {
|
|
2501
2499
|
const {
|
|
2502
2500
|
preLeft: q,
|
|
2503
|
-
preWidth:
|
|
2504
|
-
scrollDelta:
|
|
2505
|
-
} =
|
|
2506
|
-
|
|
2507
|
-
const
|
|
2508
|
-
if (Math.abs(
|
|
2501
|
+
preWidth: G,
|
|
2502
|
+
scrollDelta: K
|
|
2503
|
+
} = V;
|
|
2504
|
+
K && (y.current = y.current + K);
|
|
2505
|
+
const he = A.current ? W : D;
|
|
2506
|
+
if (Math.abs(y.current) < he)
|
|
2509
2507
|
return;
|
|
2510
|
-
const
|
|
2511
|
-
let
|
|
2512
|
-
const {
|
|
2513
|
-
|
|
2514
|
-
} =
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
if (ue !== K)
|
|
2518
|
-
k.current = !0, K = ue;
|
|
2508
|
+
const me = Math.trunc(y.current / he);
|
|
2509
|
+
let J = q + me * he;
|
|
2510
|
+
const re = y.current > 0, F = re ? J + G : J, {
|
|
2511
|
+
snap: ne
|
|
2512
|
+
} = un(F, C, W);
|
|
2513
|
+
if (ne !== F)
|
|
2514
|
+
A.current = !0, J = re ? ne - G : ne;
|
|
2519
2515
|
else {
|
|
2520
|
-
const
|
|
2521
|
-
|
|
2516
|
+
const ae = J - P;
|
|
2517
|
+
ae % D !== 0 && (J = P + D * Math.round(ae / D)), A.current = !1;
|
|
2522
2518
|
}
|
|
2523
|
-
|
|
2524
|
-
const
|
|
2525
|
-
|
|
2519
|
+
y.current = y.current % he;
|
|
2520
|
+
const se = H();
|
|
2521
|
+
J < se.left ? J = se.left : J + G > se.right && (J = se.right - G), !(_ && _({
|
|
2526
2522
|
lastLeft: q,
|
|
2527
|
-
left:
|
|
2528
|
-
lastWidth:
|
|
2529
|
-
width:
|
|
2530
|
-
},
|
|
2531
|
-
}, t[16] =
|
|
2523
|
+
left: J,
|
|
2524
|
+
lastWidth: G,
|
|
2525
|
+
width: G
|
|
2526
|
+
}, K) === !1) && N(J, !1);
|
|
2527
|
+
}, t[16] = H, t[17] = D, t[18] = _, t[19] = W, t[20] = C, t[21] = P, t[22] = Me) : Me = t[22];
|
|
2532
2528
|
const Ce = Me;
|
|
2533
2529
|
let Ne;
|
|
2534
|
-
t[23] !==
|
|
2535
|
-
const q =
|
|
2536
|
-
|
|
2537
|
-
if (!
|
|
2530
|
+
t[23] !== z || t[24] !== ee || t[25] !== Ce || t[26] !== w ? (Ne = (V) => {
|
|
2531
|
+
const q = V.target, G = be(q.dataset.left), K = be(q.dataset.width);
|
|
2532
|
+
y.current = y.current + V.dx, !(z && w?.current && !ee(V, (J) => {
|
|
2533
|
+
if (!w?.current || !I.current)
|
|
2538
2534
|
return;
|
|
2539
|
-
|
|
2540
|
-
const
|
|
2535
|
+
w.current.scrollLeft = w.current.scrollLeft + J;
|
|
2536
|
+
const re = I.current, F = be(re.dataset.left), ne = be(re.dataset.width);
|
|
2541
2537
|
Ce({
|
|
2542
|
-
preLeft:
|
|
2543
|
-
preWidth:
|
|
2544
|
-
scrollDelta:
|
|
2538
|
+
preLeft: F,
|
|
2539
|
+
preWidth: ne,
|
|
2540
|
+
scrollDelta: J
|
|
2545
2541
|
});
|
|
2546
2542
|
})) && Ce({
|
|
2547
|
-
preLeft:
|
|
2548
|
-
preWidth:
|
|
2543
|
+
preLeft: G,
|
|
2544
|
+
preWidth: K
|
|
2549
2545
|
});
|
|
2550
|
-
}, t[23] =
|
|
2551
|
-
const
|
|
2552
|
-
let
|
|
2553
|
-
t[28] !== b || t[29] !==
|
|
2554
|
-
|
|
2555
|
-
const q =
|
|
2546
|
+
}, t[23] = z, t[24] = ee, t[25] = Ce, t[26] = w, t[27] = Ne) : Ne = t[27];
|
|
2547
|
+
const Pt = Ne;
|
|
2548
|
+
let rt;
|
|
2549
|
+
t[28] !== b || t[29] !== Z ? (rt = (V) => {
|
|
2550
|
+
y.current = 0, A.current = !1, Z();
|
|
2551
|
+
const q = V.target;
|
|
2556
2552
|
b?.({
|
|
2557
|
-
left:
|
|
2558
|
-
width:
|
|
2553
|
+
left: be(q.dataset.left),
|
|
2554
|
+
width: be(q.dataset.width)
|
|
2559
2555
|
});
|
|
2560
|
-
}, t[28] = b, t[29] =
|
|
2561
|
-
const
|
|
2562
|
-
let
|
|
2563
|
-
t[31] !==
|
|
2564
|
-
|
|
2565
|
-
const q =
|
|
2556
|
+
}, t[28] = b, t[29] = Z, t[30] = rt) : rt = t[30];
|
|
2557
|
+
const je = rt;
|
|
2558
|
+
let Se;
|
|
2559
|
+
t[31] !== M || t[32] !== S ? (Se = (V) => {
|
|
2560
|
+
y.current = 0, A.current = !1, M();
|
|
2561
|
+
const q = V.edges?.right ? "right" : "left";
|
|
2566
2562
|
S?.(q);
|
|
2567
|
-
}, t[31] =
|
|
2568
|
-
const
|
|
2563
|
+
}, t[31] = M, t[32] = S, t[33] = Se) : Se = t[33];
|
|
2564
|
+
const Fe = Se;
|
|
2569
2565
|
let Ie;
|
|
2570
|
-
t[34] !==
|
|
2566
|
+
t[34] !== H || t[35] !== D || t[36] !== v || t[37] !== W || t[38] !== C || t[39] !== P ? (Ie = (V) => {
|
|
2571
2567
|
const {
|
|
2572
2568
|
dir: q,
|
|
2573
|
-
preWidth:
|
|
2574
|
-
preLeft:
|
|
2575
|
-
scrollDelta:
|
|
2576
|
-
} =
|
|
2577
|
-
|
|
2578
|
-
const
|
|
2579
|
-
if (Math.abs(
|
|
2569
|
+
preWidth: G,
|
|
2570
|
+
preLeft: K,
|
|
2571
|
+
scrollDelta: he
|
|
2572
|
+
} = V;
|
|
2573
|
+
he && (y.current = y.current + he);
|
|
2574
|
+
const me = A.current ? W : D;
|
|
2575
|
+
if (Math.abs(y.current) < me)
|
|
2580
2576
|
return;
|
|
2581
|
-
const
|
|
2577
|
+
const J = H();
|
|
2582
2578
|
if (q === "left") {
|
|
2583
|
-
const
|
|
2584
|
-
let
|
|
2579
|
+
const re = Math.trunc(y.current / me);
|
|
2580
|
+
let F = K + re * me;
|
|
2585
2581
|
const {
|
|
2586
|
-
|
|
2587
|
-
} =
|
|
2588
|
-
if (
|
|
2589
|
-
|
|
2582
|
+
snap: ne
|
|
2583
|
+
} = un(F, C, W);
|
|
2584
|
+
if (ne !== F)
|
|
2585
|
+
A.current = !0, F = ne;
|
|
2590
2586
|
else {
|
|
2591
|
-
const
|
|
2592
|
-
|
|
2587
|
+
const pe = F - P;
|
|
2588
|
+
pe % D !== 0 && (F = P + D * Math.round(pe / D)), A.current = !1;
|
|
2593
2589
|
}
|
|
2594
|
-
|
|
2595
|
-
const
|
|
2596
|
-
if (
|
|
2597
|
-
lastLeft:
|
|
2598
|
-
lastWidth:
|
|
2599
|
-
left:
|
|
2600
|
-
width:
|
|
2590
|
+
y.current = y.current % me, F < J.left && (F = J.left);
|
|
2591
|
+
const se = K + G, ae = se - F;
|
|
2592
|
+
if (F >= se || v && v("left", {
|
|
2593
|
+
lastLeft: K,
|
|
2594
|
+
lastWidth: G,
|
|
2595
|
+
left: F,
|
|
2596
|
+
width: ae
|
|
2601
2597
|
}) === !1)
|
|
2602
2598
|
return;
|
|
2603
|
-
|
|
2599
|
+
N(F, !1), Q(ae, !1);
|
|
2604
2600
|
} else {
|
|
2605
|
-
const
|
|
2606
|
-
let
|
|
2607
|
-
const
|
|
2608
|
-
|
|
2609
|
-
} =
|
|
2610
|
-
if (
|
|
2611
|
-
|
|
2601
|
+
const re = Math.trunc(y.current / me);
|
|
2602
|
+
let F = G + re * me;
|
|
2603
|
+
const ne = K + F, {
|
|
2604
|
+
snap: se
|
|
2605
|
+
} = un(ne, C, W);
|
|
2606
|
+
if (se !== ne)
|
|
2607
|
+
A.current = !0, F = se - K;
|
|
2612
2608
|
else {
|
|
2613
|
-
let
|
|
2614
|
-
const
|
|
2615
|
-
|
|
2609
|
+
let ae = K + F;
|
|
2610
|
+
const pe = ae - P;
|
|
2611
|
+
pe % D !== 0 && (ae = P + D * Math.round(pe / D), F = ae - K), A.current = !1;
|
|
2616
2612
|
}
|
|
2617
|
-
if (
|
|
2618
|
-
lastLeft:
|
|
2619
|
-
lastWidth:
|
|
2620
|
-
left:
|
|
2621
|
-
width:
|
|
2613
|
+
if (y.current = y.current % me, K + F > J.right && (F = J.right - K), F <= 0 || v && v("right", {
|
|
2614
|
+
lastLeft: K,
|
|
2615
|
+
lastWidth: G,
|
|
2616
|
+
left: K,
|
|
2617
|
+
width: F
|
|
2622
2618
|
}) === !1)
|
|
2623
2619
|
return;
|
|
2624
|
-
|
|
2620
|
+
Q(F, !1);
|
|
2625
2621
|
}
|
|
2626
|
-
}, t[34] =
|
|
2627
|
-
const
|
|
2622
|
+
}, t[34] = H, t[35] = D, t[36] = v, t[37] = W, t[38] = C, t[39] = P, t[40] = Ie) : Ie = t[40];
|
|
2623
|
+
const Ve = Ie;
|
|
2628
2624
|
let ke;
|
|
2629
|
-
t[41] !==
|
|
2630
|
-
const q =
|
|
2631
|
-
|
|
2632
|
-
if (!
|
|
2625
|
+
t[41] !== z || t[42] !== d || t[43] !== w || t[44] !== Ve ? (ke = (V) => {
|
|
2626
|
+
const q = V.target, G = V.edges?.left ? "left" : "right", K = be(q.dataset.left), he = be(q.dataset.width);
|
|
2627
|
+
y.current = y.current + (G === "left" ? V.deltaRect?.left || 0 : V.deltaRect?.right || 0), !(z && w?.current && !d(V, G, (re) => {
|
|
2628
|
+
if (!w?.current || !I.current)
|
|
2633
2629
|
return;
|
|
2634
|
-
|
|
2635
|
-
const
|
|
2636
|
-
|
|
2637
|
-
preLeft:
|
|
2638
|
-
preWidth:
|
|
2639
|
-
dir:
|
|
2640
|
-
scrollDelta:
|
|
2630
|
+
w.current.scrollLeft = w.current.scrollLeft + re;
|
|
2631
|
+
const F = I.current, ne = be(F.dataset.left), se = be(F.dataset.width);
|
|
2632
|
+
Ve({
|
|
2633
|
+
preLeft: ne,
|
|
2634
|
+
preWidth: se,
|
|
2635
|
+
dir: G,
|
|
2636
|
+
scrollDelta: re
|
|
2641
2637
|
});
|
|
2642
|
-
})) &&
|
|
2643
|
-
preLeft:
|
|
2644
|
-
preWidth:
|
|
2645
|
-
dir:
|
|
2638
|
+
})) && Ve({
|
|
2639
|
+
preLeft: K,
|
|
2640
|
+
preWidth: he,
|
|
2641
|
+
dir: G
|
|
2646
2642
|
});
|
|
2647
|
-
}, t[41] =
|
|
2643
|
+
}, t[41] = z, t[42] = d, t[43] = w, t[44] = Ve, t[45] = ke) : ke = t[45];
|
|
2648
2644
|
const Ae = ke;
|
|
2649
2645
|
let We;
|
|
2650
|
-
t[46] !==
|
|
2651
|
-
|
|
2652
|
-
const q =
|
|
2653
|
-
|
|
2654
|
-
left:
|
|
2655
|
-
width:
|
|
2646
|
+
t[46] !== m || t[47] !== Z ? (We = (V) => {
|
|
2647
|
+
y.current = 0, A.current = !1, Z();
|
|
2648
|
+
const q = V.target, G = V.edges?.right ? "right" : "left";
|
|
2649
|
+
m?.(G, {
|
|
2650
|
+
left: be(q.dataset.left),
|
|
2651
|
+
width: be(q.dataset.width)
|
|
2656
2652
|
});
|
|
2657
|
-
}, t[46] =
|
|
2658
|
-
const
|
|
2653
|
+
}, t[46] = m, t[47] = Z, t[48] = We) : We = t[48];
|
|
2654
|
+
const Ke = We;
|
|
2659
2655
|
let ye;
|
|
2660
2656
|
t[49] !== o || t[50] !== i ? (ye = {
|
|
2661
2657
|
left: o,
|
|
2662
2658
|
width: i
|
|
2663
2659
|
}, t[49] = o, t[50] = i, t[51] = ye) : ye = t[51];
|
|
2664
2660
|
let Te;
|
|
2665
|
-
t[52] !==
|
|
2661
|
+
t[52] !== Pt || t[53] !== Ge || t[54] !== je ? (Te = {
|
|
2666
2662
|
lockAxis: "x",
|
|
2667
|
-
onmove:
|
|
2663
|
+
onmove: Pt,
|
|
2668
2664
|
onstart: Ge,
|
|
2669
|
-
onend:
|
|
2665
|
+
onend: je,
|
|
2670
2666
|
cursorChecker: Eo
|
|
2671
|
-
}, t[52] =
|
|
2667
|
+
}, t[52] = Pt, t[53] = Ge, t[54] = je, t[55] = Te) : Te = t[55];
|
|
2672
2668
|
let xe;
|
|
2673
|
-
t[56] !== s || t[57] !== Ae || t[58] !==
|
|
2669
|
+
t[56] !== s || t[57] !== Ae || t[58] !== Fe || t[59] !== Ke ? (xe = {
|
|
2674
2670
|
axis: "x",
|
|
2675
2671
|
invert: "none",
|
|
2676
2672
|
edges: s,
|
|
2677
2673
|
onmove: Ae,
|
|
2678
|
-
onstart:
|
|
2679
|
-
onend:
|
|
2680
|
-
}, t[56] = s, t[57] = Ae, t[58] =
|
|
2681
|
-
let
|
|
2682
|
-
return t[61] !== r || t[62] !==
|
|
2674
|
+
onstart: Fe,
|
|
2675
|
+
onend: Ke
|
|
2676
|
+
}, t[56] = s, t[57] = Ae, t[58] = Fe, t[59] = Ke, t[60] = xe) : xe = t[60];
|
|
2677
|
+
let Ue;
|
|
2678
|
+
return t[61] !== r || t[62] !== j || t[63] !== O || t[64] !== ye || t[65] !== Te || t[66] !== xe ? (Ue = /* @__PURE__ */ R.jsx(So, { style: ye, ref: I, draggable: j, resizable: O, draggableOptions: Te, resizableOptions: xe, children: r }), t[61] = r, t[62] = j, t[63] = O, t[64] = ye, t[65] = Te, t[66] = xe, t[67] = Ue) : Ue = t[67], Ue;
|
|
2683
2679
|
});
|
|
2684
2680
|
function wo() {
|
|
2685
2681
|
return {
|
|
@@ -2697,7 +2693,7 @@ function yo() {
|
|
|
2697
2693
|
return t;
|
|
2698
2694
|
}
|
|
2699
2695
|
const xo = (n) => {
|
|
2700
|
-
const e =
|
|
2696
|
+
const e = De.c(191), {
|
|
2701
2697
|
editorData: t,
|
|
2702
2698
|
row: r,
|
|
2703
2699
|
action: s,
|
|
@@ -2709,287 +2705,287 @@ const xo = (n) => {
|
|
|
2709
2705
|
startLeft: l,
|
|
2710
2706
|
gridSnap: h,
|
|
2711
2707
|
disableDrag: f,
|
|
2712
|
-
scaleCount:
|
|
2708
|
+
scaleCount: p,
|
|
2713
2709
|
maxScaleCount: S,
|
|
2714
2710
|
setScaleCount: v,
|
|
2715
|
-
onActionMoveStart:
|
|
2716
|
-
onActionMoving:
|
|
2711
|
+
onActionMoveStart: m,
|
|
2712
|
+
onActionMoving: E,
|
|
2717
2713
|
onActionMoveEnd: b,
|
|
2718
2714
|
onActionResizeStart: _,
|
|
2719
|
-
onActionResizeEnd:
|
|
2720
|
-
onActionResizing:
|
|
2721
|
-
|
|
2722
|
-
setEditorData:
|
|
2723
|
-
onClickAction:
|
|
2724
|
-
onClickActionOnly:
|
|
2725
|
-
onDoubleClickAction:
|
|
2726
|
-
onContextMenuAction:
|
|
2727
|
-
getActionRender:
|
|
2728
|
-
handleTime:
|
|
2729
|
-
scrollContainerRef:
|
|
2730
|
-
} = n,
|
|
2731
|
-
id:
|
|
2732
|
-
maxEnd:
|
|
2733
|
-
minStart:
|
|
2734
|
-
end:
|
|
2715
|
+
onActionResizeEnd: w,
|
|
2716
|
+
onActionResizing: T,
|
|
2717
|
+
snapData: P,
|
|
2718
|
+
setEditorData: D,
|
|
2719
|
+
onClickAction: H,
|
|
2720
|
+
onClickActionOnly: O,
|
|
2721
|
+
onDoubleClickAction: j,
|
|
2722
|
+
onContextMenuAction: W,
|
|
2723
|
+
getActionRender: Y,
|
|
2724
|
+
handleTime: C,
|
|
2725
|
+
scrollContainerRef: z
|
|
2726
|
+
} = n, I = ce(null), y = ce(!1), {
|
|
2727
|
+
id: A,
|
|
2728
|
+
maxEnd: M,
|
|
2729
|
+
minStart: Z,
|
|
2730
|
+
end: ee,
|
|
2735
2731
|
start: d,
|
|
2736
|
-
selected:
|
|
2737
|
-
flexible:
|
|
2732
|
+
selected: x,
|
|
2733
|
+
flexible: N,
|
|
2738
2734
|
movable: $,
|
|
2739
|
-
effectId:
|
|
2740
|
-
} = s,
|
|
2735
|
+
effectId: Q
|
|
2736
|
+
} = s, X = N === void 0 ? !0 : N, B = $ === void 0 ? !0 : $, L = c ?? Xt, k = a ?? Gt, U = l ?? Zt, tt = u ?? er, nt = S ?? Number.MAX_SAFE_INTEGER, ze = Z || 0;
|
|
2741
2737
|
let Oe;
|
|
2742
|
-
e[0] !== L || e[1] !==
|
|
2743
|
-
startLeft:
|
|
2738
|
+
e[0] !== L || e[1] !== k || e[2] !== U || e[3] !== ze ? (Oe = Pe(ze, {
|
|
2739
|
+
startLeft: U,
|
|
2744
2740
|
scale: L,
|
|
2745
|
-
scaleWidth:
|
|
2746
|
-
}), e[0] = L, e[1] =
|
|
2747
|
-
const Re = Oe, Ge =
|
|
2741
|
+
scaleWidth: k
|
|
2742
|
+
}), e[0] = L, e[1] = k, e[2] = U, e[3] = ze, e[4] = Oe) : Oe = e[4];
|
|
2743
|
+
const Re = Oe, Ge = M || Number.MAX_VALUE;
|
|
2748
2744
|
let Me;
|
|
2749
|
-
e[5] !== L || e[6] !==
|
|
2750
|
-
startLeft:
|
|
2745
|
+
e[5] !== L || e[6] !== k || e[7] !== U || e[8] !== Ge ? (Me = Pe(Ge, {
|
|
2746
|
+
startLeft: U,
|
|
2751
2747
|
scale: L,
|
|
2752
|
-
scaleWidth:
|
|
2753
|
-
}), e[5] = L, e[6] =
|
|
2754
|
-
const Ce = Math.min(
|
|
2748
|
+
scaleWidth: k
|
|
2749
|
+
}), e[5] = L, e[6] = k, e[7] = U, e[8] = Ge, e[9] = Me) : Me = e[9];
|
|
2750
|
+
const Ce = Math.min(nt * k + U, Me);
|
|
2755
2751
|
let Ne;
|
|
2756
|
-
e[10] !==
|
|
2752
|
+
e[10] !== ee || e[11] !== L || e[12] !== k || e[13] !== U || e[14] !== d ? (Ne = vn({
|
|
2757
2753
|
start: d,
|
|
2758
|
-
end:
|
|
2754
|
+
end: ee
|
|
2759
2755
|
}, {
|
|
2760
|
-
startLeft:
|
|
2756
|
+
startLeft: U,
|
|
2761
2757
|
scale: L,
|
|
2762
|
-
scaleWidth:
|
|
2763
|
-
}), e[10] =
|
|
2764
|
-
const
|
|
2758
|
+
scaleWidth: k
|
|
2759
|
+
}), e[10] = ee, e[11] = L, e[12] = k, e[13] = U, e[14] = d, e[15] = Ne) : Ne = e[15];
|
|
2760
|
+
const Pt = Ne, [rt, je] = Mt(null), Se = rt ?? Pt, Fe = k / tt;
|
|
2765
2761
|
let Ie;
|
|
2766
|
-
e[16] !==
|
|
2767
|
-
const
|
|
2762
|
+
e[16] !== Q || e[17] !== o || e[18] !== X || e[19] !== B || e[20] !== x ? (Ie = fe(yo("action", B && "action-movable", x && "action-selected", X && "action-flexible", o[Q] && `action-effect-${Q}`)), e[16] = Q, e[17] = o, e[18] = X, e[19] = B, e[20] = x, e[21] = Ie) : Ie = e[21];
|
|
2763
|
+
const Ve = Ie;
|
|
2768
2764
|
let ke;
|
|
2769
|
-
e[22] !==
|
|
2770
|
-
const
|
|
2771
|
-
startLeft:
|
|
2772
|
-
scaleCount:
|
|
2773
|
-
scaleWidth:
|
|
2765
|
+
e[22] !== k || e[23] !== U || e[24] !== p || e[25] !== v ? (ke = (ge, ve) => {
|
|
2766
|
+
const oe = Hr(ge + ve, {
|
|
2767
|
+
startLeft: U,
|
|
2768
|
+
scaleCount: p,
|
|
2769
|
+
scaleWidth: k
|
|
2774
2770
|
});
|
|
2775
|
-
|
|
2776
|
-
}, e[22] =
|
|
2771
|
+
oe !== p && v(oe);
|
|
2772
|
+
}, e[22] = k, e[23] = U, e[24] = p, e[25] = v, e[26] = ke) : ke = e[26];
|
|
2777
2773
|
const Ae = ke;
|
|
2778
2774
|
let We;
|
|
2779
|
-
e[27] !== s || e[28] !==
|
|
2780
|
-
|
|
2775
|
+
e[27] !== s || e[28] !== m || e[29] !== r ? (We = () => {
|
|
2776
|
+
m && m({
|
|
2781
2777
|
action: s,
|
|
2782
2778
|
row: r
|
|
2783
2779
|
});
|
|
2784
|
-
}, e[27] = s, e[28] =
|
|
2785
|
-
const
|
|
2780
|
+
}, e[27] = s, e[28] = m, e[29] = r, e[30] = We) : We = e[30];
|
|
2781
|
+
const Ke = We;
|
|
2786
2782
|
let ye;
|
|
2787
|
-
e[31] !== s || e[32] !== Ae || e[33] !==
|
|
2783
|
+
e[31] !== s || e[32] !== Ae || e[33] !== E || e[34] !== r || e[35] !== L || e[36] !== k || e[37] !== U ? (ye = (ge) => {
|
|
2788
2784
|
const {
|
|
2789
|
-
left:
|
|
2790
|
-
width:
|
|
2791
|
-
} =
|
|
2792
|
-
if (
|
|
2785
|
+
left: ve,
|
|
2786
|
+
width: oe
|
|
2787
|
+
} = ge;
|
|
2788
|
+
if (y.current = !0, E) {
|
|
2793
2789
|
const {
|
|
2794
|
-
start:
|
|
2790
|
+
start: ue,
|
|
2795
2791
|
end: ie
|
|
2796
|
-
} =
|
|
2797
|
-
left:
|
|
2798
|
-
width:
|
|
2792
|
+
} = Ot({
|
|
2793
|
+
left: ve,
|
|
2794
|
+
width: oe
|
|
2799
2795
|
}, {
|
|
2800
|
-
scaleWidth:
|
|
2796
|
+
scaleWidth: k,
|
|
2801
2797
|
scale: L,
|
|
2802
|
-
startLeft:
|
|
2798
|
+
startLeft: U
|
|
2803
2799
|
});
|
|
2804
|
-
if (
|
|
2800
|
+
if (E({
|
|
2805
2801
|
action: s,
|
|
2806
2802
|
row: r,
|
|
2807
|
-
start:
|
|
2803
|
+
start: ue,
|
|
2808
2804
|
end: ie
|
|
2809
2805
|
}) === !1)
|
|
2810
2806
|
return !1;
|
|
2811
2807
|
}
|
|
2812
|
-
|
|
2813
|
-
left:
|
|
2814
|
-
width:
|
|
2815
|
-
}), Ae(
|
|
2816
|
-
}, e[31] = s, e[32] = Ae, e[33] =
|
|
2808
|
+
je({
|
|
2809
|
+
left: ve,
|
|
2810
|
+
width: oe
|
|
2811
|
+
}), Ae(ve, oe);
|
|
2812
|
+
}, e[31] = s, e[32] = Ae, e[33] = E, e[34] = r, e[35] = L, e[36] = k, e[37] = U, e[38] = ye) : ye = e[38];
|
|
2817
2813
|
const Te = ye;
|
|
2818
2814
|
let xe;
|
|
2819
|
-
e[39] !== t || e[40] !==
|
|
2815
|
+
e[39] !== t || e[40] !== A || e[41] !== b || e[42] !== r || e[43] !== L || e[44] !== k || e[45] !== U || e[46] !== D ? (xe = (ge) => {
|
|
2820
2816
|
const {
|
|
2821
|
-
left:
|
|
2822
|
-
width:
|
|
2823
|
-
} =
|
|
2824
|
-
start:
|
|
2817
|
+
left: ve,
|
|
2818
|
+
width: oe
|
|
2819
|
+
} = ge, {
|
|
2820
|
+
start: ue,
|
|
2825
2821
|
end: ie
|
|
2826
|
-
} =
|
|
2827
|
-
left:
|
|
2828
|
-
width:
|
|
2822
|
+
} = Ot({
|
|
2823
|
+
left: ve,
|
|
2824
|
+
width: oe
|
|
2829
2825
|
}, {
|
|
2830
|
-
scaleWidth:
|
|
2826
|
+
scaleWidth: k,
|
|
2831
2827
|
scale: L,
|
|
2832
|
-
startLeft:
|
|
2833
|
-
}), le = t.find((
|
|
2828
|
+
startLeft: U
|
|
2829
|
+
}), le = t.find((Ye) => Ye.id === r.id);
|
|
2834
2830
|
if (!le)
|
|
2835
2831
|
return;
|
|
2836
|
-
const
|
|
2837
|
-
|
|
2838
|
-
action:
|
|
2832
|
+
const Be = le.actions.find((Ye) => Ye.id === A);
|
|
2833
|
+
Be && (Be.start = ue, Be.end = ie, D(t), b && b({
|
|
2834
|
+
action: Be,
|
|
2839
2835
|
row: r,
|
|
2840
|
-
start:
|
|
2836
|
+
start: ue,
|
|
2841
2837
|
end: ie
|
|
2842
|
-
}),
|
|
2843
|
-
}, e[39] = t, e[40] =
|
|
2844
|
-
const
|
|
2845
|
-
let
|
|
2846
|
-
e[48] !== s || e[49] !== _ || e[50] !== r ? (
|
|
2838
|
+
}), je(null));
|
|
2839
|
+
}, e[39] = t, e[40] = A, e[41] = b, e[42] = r, e[43] = L, e[44] = k, e[45] = U, e[46] = D, e[47] = xe) : xe = e[47];
|
|
2840
|
+
const Ue = xe;
|
|
2841
|
+
let V;
|
|
2842
|
+
e[48] !== s || e[49] !== _ || e[50] !== r ? (V = (ge) => {
|
|
2847
2843
|
_ && _({
|
|
2848
2844
|
action: s,
|
|
2849
2845
|
row: r,
|
|
2850
|
-
dir:
|
|
2846
|
+
dir: ge
|
|
2851
2847
|
});
|
|
2852
|
-
}, e[48] = s, e[49] = _, e[50] = r, e[51] =
|
|
2853
|
-
const q =
|
|
2854
|
-
let
|
|
2855
|
-
e[52] !== s || e[53] !== Ae || e[54] !==
|
|
2848
|
+
}, e[48] = s, e[49] = _, e[50] = r, e[51] = V) : V = e[51];
|
|
2849
|
+
const q = V;
|
|
2850
|
+
let G;
|
|
2851
|
+
e[52] !== s || e[53] !== Ae || e[54] !== T || e[55] !== r || e[56] !== L || e[57] !== k || e[58] !== U ? (G = (ge, ve) => {
|
|
2856
2852
|
const {
|
|
2857
|
-
left:
|
|
2858
|
-
width:
|
|
2859
|
-
} =
|
|
2860
|
-
if (
|
|
2853
|
+
left: oe,
|
|
2854
|
+
width: ue
|
|
2855
|
+
} = ve;
|
|
2856
|
+
if (y.current = !0, T) {
|
|
2861
2857
|
const {
|
|
2862
2858
|
start: ie,
|
|
2863
2859
|
end: le
|
|
2864
|
-
} =
|
|
2865
|
-
left:
|
|
2866
|
-
width:
|
|
2860
|
+
} = Ot({
|
|
2861
|
+
left: oe,
|
|
2862
|
+
width: ue
|
|
2867
2863
|
}, {
|
|
2868
|
-
scaleWidth:
|
|
2864
|
+
scaleWidth: k,
|
|
2869
2865
|
scale: L,
|
|
2870
|
-
startLeft:
|
|
2866
|
+
startLeft: U
|
|
2871
2867
|
});
|
|
2872
|
-
if (
|
|
2868
|
+
if (T({
|
|
2873
2869
|
action: s,
|
|
2874
2870
|
row: r,
|
|
2875
2871
|
start: ie,
|
|
2876
2872
|
end: le,
|
|
2877
|
-
dir:
|
|
2873
|
+
dir: ge
|
|
2878
2874
|
}) === !1)
|
|
2879
2875
|
return !1;
|
|
2880
2876
|
}
|
|
2881
|
-
|
|
2882
|
-
left:
|
|
2883
|
-
width:
|
|
2884
|
-
}), Ae(
|
|
2885
|
-
}, e[52] = s, e[53] = Ae, e[54] =
|
|
2886
|
-
const
|
|
2887
|
-
let
|
|
2888
|
-
e[60] !== t || e[61] !==
|
|
2877
|
+
je({
|
|
2878
|
+
left: oe,
|
|
2879
|
+
width: ue
|
|
2880
|
+
}), Ae(oe, ue);
|
|
2881
|
+
}, e[52] = s, e[53] = Ae, e[54] = T, e[55] = r, e[56] = L, e[57] = k, e[58] = U, e[59] = G) : G = e[59];
|
|
2882
|
+
const K = G;
|
|
2883
|
+
let he;
|
|
2884
|
+
e[60] !== t || e[61] !== A || e[62] !== w || e[63] !== r || e[64] !== L || e[65] !== k || e[66] !== U || e[67] !== D ? (he = (ge, ve) => {
|
|
2889
2885
|
const {
|
|
2890
|
-
left:
|
|
2891
|
-
width:
|
|
2892
|
-
} =
|
|
2886
|
+
left: oe,
|
|
2887
|
+
width: ue
|
|
2888
|
+
} = ve, {
|
|
2893
2889
|
start: ie,
|
|
2894
2890
|
end: le
|
|
2895
|
-
} =
|
|
2896
|
-
left:
|
|
2897
|
-
width:
|
|
2891
|
+
} = Ot({
|
|
2892
|
+
left: oe,
|
|
2893
|
+
width: ue
|
|
2898
2894
|
}, {
|
|
2899
|
-
scaleWidth:
|
|
2895
|
+
scaleWidth: k,
|
|
2900
2896
|
scale: L,
|
|
2901
|
-
startLeft:
|
|
2902
|
-
}),
|
|
2903
|
-
if (!
|
|
2897
|
+
startLeft: U
|
|
2898
|
+
}), Be = t.find((nn) => nn.id === r.id);
|
|
2899
|
+
if (!Be)
|
|
2904
2900
|
return;
|
|
2905
|
-
const
|
|
2906
|
-
|
|
2907
|
-
action:
|
|
2901
|
+
const Ye = Be.actions.find((nn) => nn.id === A);
|
|
2902
|
+
Ye && (Ye.start = ie, Ye.end = le, D(t), w && w({
|
|
2903
|
+
action: Ye,
|
|
2908
2904
|
row: r,
|
|
2909
2905
|
start: ie,
|
|
2910
2906
|
end: le,
|
|
2911
|
-
dir:
|
|
2912
|
-
}),
|
|
2913
|
-
}, e[60] = t, e[61] =
|
|
2914
|
-
const
|
|
2915
|
-
let
|
|
2916
|
-
if (e[69] !== s || e[70] !==
|
|
2917
|
-
const
|
|
2907
|
+
dir: ge
|
|
2908
|
+
}), je(null));
|
|
2909
|
+
}, e[60] = t, e[61] = A, e[62] = w, e[63] = r, e[64] = L, e[65] = k, e[66] = U, e[67] = D, e[68] = he) : he = e[68];
|
|
2910
|
+
const me = he;
|
|
2911
|
+
let J, re, F, ne, se, ae, pe, st, ot, it, ct, at, lt, ut, ft, dt, $e, He, ht, mt, pt, gt, vt, bt, _t, St;
|
|
2912
|
+
if (e[69] !== s || e[70] !== Ve || e[71] !== f || e[72] !== X || e[73] !== Y || e[74] !== Fe || e[75] !== h || e[76] !== Te || e[77] !== Ue || e[78] !== Ke || e[79] !== me || e[80] !== q || e[81] !== K || e[82] !== C || e[83] !== Re || e[84] !== B || e[85] !== H || e[86] !== O || e[87] !== W || e[88] !== j || e[89] !== Ce || e[90] !== r || e[91] !== i || e[92] !== L || e[93] !== k || e[94] !== U || e[95] !== z || e[96] !== P.assistPositions || e[97] !== Se.left || e[98] !== Se.width) {
|
|
2913
|
+
const ge = {
|
|
2918
2914
|
...s,
|
|
2919
|
-
...
|
|
2920
|
-
left:
|
|
2921
|
-
width:
|
|
2915
|
+
...Ot({
|
|
2916
|
+
left: Se.left,
|
|
2917
|
+
width: Se.width
|
|
2922
2918
|
}, {
|
|
2923
|
-
startLeft:
|
|
2924
|
-
scaleWidth:
|
|
2919
|
+
startLeft: U,
|
|
2920
|
+
scaleWidth: k,
|
|
2925
2921
|
scale: L
|
|
2926
2922
|
})
|
|
2927
|
-
},
|
|
2923
|
+
}, ve = {
|
|
2928
2924
|
...r,
|
|
2929
2925
|
actions: [...r.actions]
|
|
2930
2926
|
};
|
|
2931
|
-
r.actions.includes(s) && (
|
|
2927
|
+
r.actions.includes(s) && (ve.actions[r.actions.indexOf(s)] = ge), J = Cr, ot = I, it = z, ct = U, at = Se.left, lt = Se.width, ut = h && Fe || dn, ft = h ? Math.max((Fe || dn) / 2, hn) : hn, dt = P.assistPositions, e[125] !== Re || e[126] !== Ce ? ($e = () => ({
|
|
2932
2928
|
left: Re,
|
|
2933
2929
|
right: Ce
|
|
2934
|
-
}), e[125] = Re, e[126] = Ce, e[127] =
|
|
2935
|
-
let
|
|
2936
|
-
e[128] !== f || e[129] !==
|
|
2937
|
-
let
|
|
2938
|
-
e[131] !== f || e[132] !==
|
|
2939
|
-
left:
|
|
2940
|
-
right:
|
|
2941
|
-
}, e[134] =
|
|
2942
|
-
|
|
2943
|
-
}, e[137] =
|
|
2930
|
+
}), e[125] = Re, e[126] = Ce, e[127] = $e) : $e = e[127];
|
|
2931
|
+
let oe;
|
|
2932
|
+
e[128] !== f || e[129] !== X ? (oe = !f && X && `.${fe("action-left-stretch")}`, e[128] = f, e[129] = X, e[130] = oe) : oe = e[130];
|
|
2933
|
+
let ue;
|
|
2934
|
+
e[131] !== f || e[132] !== X ? (ue = !f && X && `.${fe("action-right-stretch")}`, e[131] = f, e[132] = X, e[133] = ue) : ue = e[133], e[134] !== oe || e[135] !== ue ? (He = {
|
|
2935
|
+
left: oe,
|
|
2936
|
+
right: ue
|
|
2937
|
+
}, e[134] = oe, e[135] = ue, e[136] = He) : He = e[136], ht = !f && B, mt = !f && X, pt = Ke, gt = Te, vt = Ue, bt = q, _t = K, St = me, e[137] === Symbol.for("react.memo_cache_sentinel") ? (re = () => {
|
|
2938
|
+
y.current = !1;
|
|
2939
|
+
}, e[137] = re) : re = e[137], e[138] !== s || e[139] !== C || e[140] !== H || e[141] !== O || e[142] !== r ? (F = (ie) => {
|
|
2944
2940
|
let le;
|
|
2945
|
-
|
|
2941
|
+
H && (le = C(ie), H(ie, {
|
|
2946
2942
|
row: r,
|
|
2947
2943
|
action: s,
|
|
2948
2944
|
time: le
|
|
2949
|
-
})), !
|
|
2945
|
+
})), !y.current && O && (le === void 0 && (le = C(ie)), O(ie, {
|
|
2950
2946
|
row: r,
|
|
2951
2947
|
action: s,
|
|
2952
2948
|
time: le
|
|
2953
2949
|
}));
|
|
2954
|
-
}, e[138] = s, e[139] =
|
|
2955
|
-
if (
|
|
2956
|
-
const le =
|
|
2957
|
-
|
|
2950
|
+
}, e[138] = s, e[139] = C, e[140] = H, e[141] = O, e[142] = r, e[143] = F) : F = e[143], e[144] !== s || e[145] !== C || e[146] !== j || e[147] !== r ? (ne = (ie) => {
|
|
2951
|
+
if (j) {
|
|
2952
|
+
const le = C(ie);
|
|
2953
|
+
j(ie, {
|
|
2958
2954
|
row: r,
|
|
2959
2955
|
action: s,
|
|
2960
2956
|
time: le
|
|
2961
2957
|
});
|
|
2962
2958
|
}
|
|
2963
|
-
}, e[144] = s, e[145] =
|
|
2964
|
-
if (
|
|
2965
|
-
const le =
|
|
2966
|
-
|
|
2959
|
+
}, e[144] = s, e[145] = C, e[146] = j, e[147] = r, e[148] = ne) : ne = e[148], e[149] !== s || e[150] !== C || e[151] !== W || e[152] !== r ? (se = (ie) => {
|
|
2960
|
+
if (W) {
|
|
2961
|
+
const le = C(ie);
|
|
2962
|
+
W(ie, {
|
|
2967
2963
|
row: r,
|
|
2968
2964
|
action: s,
|
|
2969
2965
|
time: le
|
|
2970
2966
|
});
|
|
2971
2967
|
}
|
|
2972
|
-
}, e[149] = s, e[150] =
|
|
2968
|
+
}, e[149] = s, e[150] = C, e[151] = W, e[152] = r, e[153] = se) : se = e[153], ae = Ve, e[154] !== i ? (pe = {
|
|
2973
2969
|
height: i
|
|
2974
|
-
}, e[154] = i, e[155] =
|
|
2970
|
+
}, e[154] = i, e[155] = pe) : pe = e[155], st = Y && Y(ge, ve), e[69] = s, e[70] = Ve, e[71] = f, e[72] = X, e[73] = Y, e[74] = Fe, e[75] = h, e[76] = Te, e[77] = Ue, e[78] = Ke, e[79] = me, e[80] = q, e[81] = K, e[82] = C, e[83] = Re, e[84] = B, e[85] = H, e[86] = O, e[87] = W, e[88] = j, e[89] = Ce, e[90] = r, e[91] = i, e[92] = L, e[93] = k, e[94] = U, e[95] = z, e[96] = P.assistPositions, e[97] = Se.left, e[98] = Se.width, e[99] = J, e[100] = re, e[101] = F, e[102] = ne, e[103] = se, e[104] = ae, e[105] = pe, e[106] = st, e[107] = ot, e[108] = it, e[109] = ct, e[110] = at, e[111] = lt, e[112] = ut, e[113] = ft, e[114] = dt, e[115] = $e, e[116] = He, e[117] = ht, e[118] = mt, e[119] = pt, e[120] = gt, e[121] = vt, e[122] = bt, e[123] = _t, e[124] = St;
|
|
2975
2971
|
} else
|
|
2976
|
-
|
|
2972
|
+
J = e[99], re = e[100], F = e[101], ne = e[102], se = e[103], ae = e[104], pe = e[105], st = e[106], ot = e[107], it = e[108], ct = e[109], at = e[110], lt = e[111], ut = e[112], ft = e[113], dt = e[114], $e = e[115], He = e[116], ht = e[117], mt = e[118], pt = e[119], gt = e[120], vt = e[121], bt = e[122], _t = e[123], St = e[124];
|
|
2977
2973
|
let wt;
|
|
2978
|
-
e[156] !==
|
|
2974
|
+
e[156] !== X ? (wt = X && /* @__PURE__ */ R.jsx("div", { className: fe("action-left-stretch"), style: {
|
|
2979
2975
|
touchAction: "none"
|
|
2980
|
-
} }), e[156] =
|
|
2976
|
+
} }), e[156] = X, e[157] = wt) : wt = e[157];
|
|
2981
2977
|
let Et;
|
|
2982
|
-
e[158] !==
|
|
2978
|
+
e[158] !== X ? (Et = X && /* @__PURE__ */ R.jsx("div", { className: fe("action-right-stretch"), style: {
|
|
2983
2979
|
touchAction: "none"
|
|
2984
|
-
} }), e[158] =
|
|
2980
|
+
} }), e[158] = X, e[159] = Et) : Et = e[159];
|
|
2985
2981
|
let yt;
|
|
2986
|
-
e[160] !==
|
|
2987
|
-
|
|
2982
|
+
e[160] !== re || e[161] !== F || e[162] !== ne || e[163] !== se || e[164] !== ae || e[165] !== pe || e[166] !== st || e[167] !== wt || e[168] !== Et ? (yt = /* @__PURE__ */ R.jsxs("div", { onMouseDown: re, onClick: F, onDoubleClick: ne, onContextMenu: se, className: ae, style: pe, children: [
|
|
2983
|
+
st,
|
|
2988
2984
|
wt,
|
|
2989
2985
|
Et
|
|
2990
|
-
] }), e[160] =
|
|
2986
|
+
] }), e[160] = re, e[161] = F, e[162] = ne, e[163] = se, e[164] = ae, e[165] = pe, e[166] = st, e[167] = wt, e[168] = Et, e[169] = yt) : yt = e[169];
|
|
2991
2987
|
let zt;
|
|
2992
|
-
return e[170] !==
|
|
2988
|
+
return e[170] !== J || e[171] !== ot || e[172] !== it || e[173] !== ct || e[174] !== at || e[175] !== lt || e[176] !== ut || e[177] !== ft || e[178] !== dt || e[179] !== $e || e[180] !== He || e[181] !== ht || e[182] !== mt || e[183] !== pt || e[184] !== gt || e[185] !== vt || e[186] !== bt || e[187] !== _t || e[188] !== St || e[189] !== yt ? (zt = /* @__PURE__ */ R.jsx(J, { ref: ot, parentRef: it, start: ct, left: at, width: lt, grid: ut, snapDistance: ft, snapPositions: dt, getBounds: $e, edges: He, enableDragging: ht, enableResizing: mt, onDragStart: pt, onDrag: gt, onDragEnd: vt, onResizeStart: bt, onResize: _t, onResizeEnd: St, children: yt }), e[170] = J, e[171] = ot, e[172] = it, e[173] = ct, e[174] = at, e[175] = lt, e[176] = ut, e[177] = ft, e[178] = dt, e[179] = $e, e[180] = He, e[181] = ht, e[182] = mt, e[183] = pt, e[184] = gt, e[185] = vt, e[186] = bt, e[187] = _t, e[188] = St, e[189] = yt, e[190] = zt) : zt = e[190], zt;
|
|
2993
2989
|
};
|
|
2994
2990
|
function Rt(n, e, t) {
|
|
2995
2991
|
let r = t.initialDeps ?? [], s;
|
|
@@ -3001,21 +2997,21 @@ function Rt(n, e, t) {
|
|
|
3001
2997
|
if (!(h.length !== r.length || h.some((S, v) => r[v] !== S)))
|
|
3002
2998
|
return s;
|
|
3003
2999
|
r = h;
|
|
3004
|
-
let
|
|
3005
|
-
if (t.key && ((c = t.debug) != null && c.call(t)) && (
|
|
3006
|
-
const S = Math.round((Date.now() - l) * 100) / 100, v = Math.round((Date.now() -
|
|
3000
|
+
let p;
|
|
3001
|
+
if (t.key && ((c = t.debug) != null && c.call(t)) && (p = Date.now()), s = e(...h), t.key && ((a = t.debug) != null && a.call(t))) {
|
|
3002
|
+
const S = Math.round((Date.now() - l) * 100) / 100, v = Math.round((Date.now() - p) * 100) / 100, m = v / 16, E = (b, _) => {
|
|
3007
3003
|
for (b = String(b); b.length < _; )
|
|
3008
3004
|
b = " " + b;
|
|
3009
3005
|
return b;
|
|
3010
3006
|
};
|
|
3011
3007
|
console.info(
|
|
3012
|
-
`%c⏱ ${
|
|
3008
|
+
`%c⏱ ${E(v, 5)} /${E(S, 5)} ms`,
|
|
3013
3009
|
`
|
|
3014
3010
|
font-size: .6rem;
|
|
3015
3011
|
font-weight: bold;
|
|
3016
3012
|
color: hsl(${Math.max(
|
|
3017
3013
|
0,
|
|
3018
|
-
Math.min(120 - 120 *
|
|
3014
|
+
Math.min(120 - 120 * m, 120)
|
|
3019
3015
|
)}deg 100% 31%);`,
|
|
3020
3016
|
t?.key
|
|
3021
3017
|
);
|
|
@@ -3036,7 +3032,7 @@ const Ro = (n, e) => Math.abs(n - e) < 1.01, Co = (n, e, t) => {
|
|
|
3036
3032
|
return function(...s) {
|
|
3037
3033
|
n.clearTimeout(r), r = n.setTimeout(() => e.apply(this, s), t);
|
|
3038
3034
|
};
|
|
3039
|
-
},
|
|
3035
|
+
}, Gn = (n) => {
|
|
3040
3036
|
const { offsetWidth: e, offsetHeight: t } = n;
|
|
3041
3037
|
return { width: e, height: t };
|
|
3042
3038
|
}, Ao = (n) => n, To = (n) => {
|
|
@@ -3044,7 +3040,7 @@ const Ro = (n, e) => Math.abs(n - e) < 1.01, Co = (n, e, t) => {
|
|
|
3044
3040
|
for (let s = e; s <= t; s++)
|
|
3045
3041
|
r.push(s);
|
|
3046
3042
|
return r;
|
|
3047
|
-
},
|
|
3043
|
+
}, Po = (n, e) => {
|
|
3048
3044
|
const t = n.scrollElement;
|
|
3049
3045
|
if (!t)
|
|
3050
3046
|
return;
|
|
@@ -3055,7 +3051,7 @@ const Ro = (n, e) => Math.abs(n - e) < 1.01, Co = (n, e, t) => {
|
|
|
3055
3051
|
const { width: c, height: a } = i;
|
|
3056
3052
|
e({ width: Math.round(c), height: Math.round(a) });
|
|
3057
3053
|
};
|
|
3058
|
-
if (s(
|
|
3054
|
+
if (s(Gn(t)), !r.ResizeObserver)
|
|
3059
3055
|
return () => {
|
|
3060
3056
|
};
|
|
3061
3057
|
const o = new r.ResizeObserver((i) => {
|
|
@@ -3068,16 +3064,16 @@ const Ro = (n, e) => Math.abs(n - e) < 1.01, Co = (n, e, t) => {
|
|
|
3068
3064
|
return;
|
|
3069
3065
|
}
|
|
3070
3066
|
}
|
|
3071
|
-
s(
|
|
3067
|
+
s(Gn(t));
|
|
3072
3068
|
};
|
|
3073
3069
|
n.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(c) : c();
|
|
3074
3070
|
});
|
|
3075
3071
|
return o.observe(t, { box: "border-box" }), () => {
|
|
3076
3072
|
o.unobserve(t);
|
|
3077
3073
|
};
|
|
3078
|
-
},
|
|
3074
|
+
}, Kn = {
|
|
3079
3075
|
passive: !0
|
|
3080
|
-
}, qn = typeof window > "u" ? !0 : "onscrollend" in window,
|
|
3076
|
+
}, qn = typeof window > "u" ? !0 : "onscrollend" in window, Do = (n, e) => {
|
|
3081
3077
|
const t = n.scrollElement;
|
|
3082
3078
|
if (!t)
|
|
3083
3079
|
return;
|
|
@@ -3096,12 +3092,12 @@ const Ro = (n, e) => Math.abs(n - e) < 1.01, Co = (n, e, t) => {
|
|
|
3096
3092
|
const { horizontal: h, isRtl: f } = n.options;
|
|
3097
3093
|
s = h ? t.scrollLeft * (f && -1 || 1) : t.scrollTop, o(), e(s, l);
|
|
3098
3094
|
}, c = i(!0), a = i(!1);
|
|
3099
|
-
a(), t.addEventListener("scroll", c,
|
|
3095
|
+
a(), t.addEventListener("scroll", c, Kn);
|
|
3100
3096
|
const u = n.options.useScrollendEvent && qn;
|
|
3101
|
-
return u && t.addEventListener("scrollend", a,
|
|
3097
|
+
return u && t.addEventListener("scrollend", a, Kn), () => {
|
|
3102
3098
|
t.removeEventListener("scroll", c), u && t.removeEventListener("scrollend", a);
|
|
3103
3099
|
};
|
|
3104
|
-
},
|
|
3100
|
+
}, Lo = (n, e, t) => {
|
|
3105
3101
|
if (e?.borderBoxSize) {
|
|
3106
3102
|
const r = e.borderBoxSize[0];
|
|
3107
3103
|
if (r)
|
|
@@ -3163,7 +3159,7 @@ class Mo {
|
|
|
3163
3159
|
rangeExtractor: To,
|
|
3164
3160
|
onChange: () => {
|
|
3165
3161
|
},
|
|
3166
|
-
measureElement:
|
|
3162
|
+
measureElement: Lo,
|
|
3167
3163
|
initialRect: { width: 0, height: 0 },
|
|
3168
3164
|
scrollMargin: 0,
|
|
3169
3165
|
gap: 0,
|
|
@@ -3268,14 +3264,14 @@ class Mo {
|
|
|
3268
3264
|
this.pendingMeasuredCacheIndexes = [];
|
|
3269
3265
|
const u = this.measurementsCache.slice(0, a);
|
|
3270
3266
|
for (let l = a; l < t; l++) {
|
|
3271
|
-
const h = o(l), f = this.options.lanes === 1 ? u[l - 1] : this.getFurthestMeasurement(u, l),
|
|
3267
|
+
const h = o(l), f = this.options.lanes === 1 ? u[l - 1] : this.getFurthestMeasurement(u, l), p = f ? f.end + this.options.gap : r + s, S = c.get(h), v = typeof S == "number" ? S : this.options.estimateSize(l), m = p + v, E = f ? f.lane : l % this.options.lanes;
|
|
3272
3268
|
u[l] = {
|
|
3273
3269
|
index: l,
|
|
3274
|
-
start:
|
|
3270
|
+
start: p,
|
|
3275
3271
|
size: v,
|
|
3276
|
-
end:
|
|
3272
|
+
end: m,
|
|
3277
3273
|
key: h,
|
|
3278
|
-
lane:
|
|
3274
|
+
lane: E
|
|
3279
3275
|
};
|
|
3280
3276
|
}
|
|
3281
3277
|
return this.measurementsCache = u, u;
|
|
@@ -3420,12 +3416,12 @@ class Mo {
|
|
|
3420
3416
|
}
|
|
3421
3417
|
const [h, f] = l;
|
|
3422
3418
|
this._scrollToOffset(h, { adjustments: void 0, behavior: s }), this.targetWindow.requestAnimationFrame(() => {
|
|
3423
|
-
const
|
|
3419
|
+
const p = this.getScrollOffset(), S = this.getOffsetForIndex(t, f);
|
|
3424
3420
|
if (!S) {
|
|
3425
3421
|
console.warn("Failed to get offset for index:", t);
|
|
3426
3422
|
return;
|
|
3427
3423
|
}
|
|
3428
|
-
Ro(S[0],
|
|
3424
|
+
Ro(S[0], p) || a(f);
|
|
3429
3425
|
});
|
|
3430
3426
|
}, a = (u) => {
|
|
3431
3427
|
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(
|
|
@@ -3534,8 +3530,8 @@ function Io(n) {
|
|
|
3534
3530
|
}
|
|
3535
3531
|
function Tr(n) {
|
|
3536
3532
|
return Io({
|
|
3537
|
-
observeElementRect:
|
|
3538
|
-
observeElementOffset:
|
|
3533
|
+
observeElementRect: Po,
|
|
3534
|
+
observeElementOffset: Do,
|
|
3539
3535
|
scrollToFn: Oo,
|
|
3540
3536
|
...n
|
|
3541
3537
|
});
|
|
@@ -3553,40 +3549,40 @@ const ko = (n) => {
|
|
|
3553
3549
|
scaleWidth: u
|
|
3554
3550
|
} = n, l = ["edit-row"];
|
|
3555
3551
|
e?.selected && l.push("edit-row-selected");
|
|
3556
|
-
const h = a ??
|
|
3552
|
+
const h = a ?? Xt, f = u ?? Gt, p = c ?? Zt, S = (b) => {
|
|
3557
3553
|
if (!i.current) return 0;
|
|
3558
|
-
const
|
|
3559
|
-
return
|
|
3560
|
-
startLeft:
|
|
3554
|
+
const w = b.currentTarget.getBoundingClientRect(), P = b.clientX - w.x;
|
|
3555
|
+
return Xe(P, {
|
|
3556
|
+
startLeft: p,
|
|
3561
3557
|
scale: h,
|
|
3562
3558
|
scaleWidth: f
|
|
3563
3559
|
});
|
|
3564
|
-
}, v =
|
|
3560
|
+
}, v = Dr(() => (e?.actions ? [...e.actions] : []).sort((b, _) => b.start - _.start), [e]), m = Lr((b) => v[b]?.id ?? b, [v]), E = Tr({
|
|
3565
3561
|
horizontal: !0,
|
|
3566
3562
|
count: v.length,
|
|
3567
|
-
getItemKey:
|
|
3563
|
+
getItemKey: m,
|
|
3568
3564
|
getScrollElement: () => i.current,
|
|
3569
3565
|
estimateSize: (b) => {
|
|
3570
3566
|
if (!v[b]) return 0;
|
|
3571
|
-
let _ = b > 0 ? v[b - 1].end : 0,
|
|
3572
|
-
if (_ >
|
|
3567
|
+
let _ = b > 0 ? v[b - 1].end : 0, w = v[b].end;
|
|
3568
|
+
if (_ > w) return 0;
|
|
3573
3569
|
let {
|
|
3574
|
-
width:
|
|
3570
|
+
width: T
|
|
3575
3571
|
} = vn({
|
|
3576
3572
|
start: _,
|
|
3577
|
-
end:
|
|
3573
|
+
end: w
|
|
3578
3574
|
}, {
|
|
3579
|
-
startLeft:
|
|
3575
|
+
startLeft: p,
|
|
3580
3576
|
scale: h,
|
|
3581
3577
|
scaleWidth: f
|
|
3582
3578
|
});
|
|
3583
|
-
return
|
|
3579
|
+
return T;
|
|
3584
3580
|
},
|
|
3585
3581
|
overscan: 5
|
|
3586
3582
|
});
|
|
3587
3583
|
return gn(() => {
|
|
3588
|
-
|
|
3589
|
-
}, [u, c,
|
|
3584
|
+
E.measure();
|
|
3585
|
+
}, [u, c, E]), /* @__PURE__ */ R.jsx("div", { className: `${fe(...l)} ${(e?.classNames || []).join(" ")}`, style: t, onClick: (b) => {
|
|
3590
3586
|
if (e && r) {
|
|
3591
3587
|
const _ = S(b);
|
|
3592
3588
|
r(b, {
|
|
@@ -3610,65 +3606,76 @@ const ko = (n) => {
|
|
|
3610
3606
|
time: _
|
|
3611
3607
|
});
|
|
3612
3608
|
}
|
|
3613
|
-
}, children: e &&
|
|
3609
|
+
}, children: e && E.getVirtualItems().map((b) => {
|
|
3614
3610
|
const _ = v[b.index];
|
|
3615
3611
|
if (!_) throw new Error("Action not found");
|
|
3616
|
-
return /* @__PURE__ */
|
|
3612
|
+
return /* @__PURE__ */ R.jsx(xo, { ...n, handleTime: S, row: e, action: _ }, _.id);
|
|
3617
3613
|
}) });
|
|
3618
3614
|
};
|
|
3619
3615
|
function Wo() {
|
|
3620
|
-
const n =
|
|
3616
|
+
const n = De.c(7);
|
|
3621
3617
|
let e;
|
|
3622
3618
|
n[0] === Symbol.for("react.memo_cache_sentinel") ? (e = {
|
|
3623
3619
|
isMoving: !1,
|
|
3624
3620
|
movePositions: [],
|
|
3625
3621
|
assistPositions: []
|
|
3626
3622
|
}, n[0] = e) : e = n[0];
|
|
3627
|
-
const [t, r] = Mt(e), s =
|
|
3628
|
-
let
|
|
3629
|
-
n[1] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
3623
|
+
const [t, r] = Mt(e), s = ce(null), o = jo, i = zo;
|
|
3624
|
+
let c;
|
|
3625
|
+
n[1] === Symbol.for("react.memo_cache_sentinel") ? (c = (m) => {
|
|
3630
3626
|
const {
|
|
3631
|
-
movePositions:
|
|
3632
|
-
assistPositions:
|
|
3627
|
+
movePositions: E,
|
|
3628
|
+
assistPositions: b,
|
|
3629
|
+
action: _,
|
|
3630
|
+
row: w,
|
|
3631
|
+
assistActionIds: T
|
|
3633
3632
|
} = m;
|
|
3634
|
-
|
|
3633
|
+
s.current = {
|
|
3634
|
+
action: _,
|
|
3635
|
+
row: w,
|
|
3636
|
+
assistActionIds: T
|
|
3637
|
+
}, r({
|
|
3635
3638
|
isMoving: !0,
|
|
3636
|
-
movePositions:
|
|
3637
|
-
assistPositions:
|
|
3639
|
+
movePositions: E || [],
|
|
3640
|
+
assistPositions: b || []
|
|
3638
3641
|
});
|
|
3639
|
-
}, n[1] =
|
|
3640
|
-
const
|
|
3641
|
-
let
|
|
3642
|
-
n[2] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
3642
|
+
}, n[1] = c) : c = n[1];
|
|
3643
|
+
const a = c;
|
|
3644
|
+
let u;
|
|
3645
|
+
n[2] === Symbol.for("react.memo_cache_sentinel") ? (u = (m) => {
|
|
3643
3646
|
const {
|
|
3644
|
-
movePositions:
|
|
3645
|
-
assistPositions:
|
|
3647
|
+
movePositions: E,
|
|
3648
|
+
assistPositions: b
|
|
3646
3649
|
} = m;
|
|
3647
|
-
r((
|
|
3648
|
-
...
|
|
3649
|
-
movePositions:
|
|
3650
|
-
assistPositions:
|
|
3650
|
+
r((_) => ({
|
|
3651
|
+
..._,
|
|
3652
|
+
movePositions: E || _.movePositions,
|
|
3653
|
+
assistPositions: b || _.assistPositions
|
|
3651
3654
|
}));
|
|
3652
|
-
}, n[2] =
|
|
3653
|
-
const
|
|
3654
|
-
let
|
|
3655
|
-
n[3] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
3656
|
-
r({
|
|
3655
|
+
}, n[2] = u) : u = n[2];
|
|
3656
|
+
const l = u;
|
|
3657
|
+
let h;
|
|
3658
|
+
n[3] === Symbol.for("react.memo_cache_sentinel") ? (h = () => {
|
|
3659
|
+
s.current = null, r({
|
|
3657
3660
|
isMoving: !1,
|
|
3658
3661
|
movePositions: [],
|
|
3659
3662
|
assistPositions: []
|
|
3660
3663
|
});
|
|
3661
|
-
}, n[3] =
|
|
3662
|
-
const
|
|
3663
|
-
let
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3664
|
+
}, n[3] = h) : h = n[3];
|
|
3665
|
+
const f = h;
|
|
3666
|
+
let p;
|
|
3667
|
+
n[4] === Symbol.for("react.memo_cache_sentinel") ? (p = () => s.current, n[4] = p) : p = n[4];
|
|
3668
|
+
const S = p;
|
|
3669
|
+
let v;
|
|
3670
|
+
return n[5] !== t ? (v = {
|
|
3671
|
+
initSnap: a,
|
|
3672
|
+
updateSnap: l,
|
|
3673
|
+
disposeSnap: f,
|
|
3674
|
+
snapData: t,
|
|
3675
|
+
getActiveDragState: S,
|
|
3676
|
+
defaultGetAssistPosition: o,
|
|
3677
|
+
defaultGetMovePosition: i
|
|
3678
|
+
}, n[5] = t, n[6] = v) : v = n[6], v;
|
|
3672
3679
|
}
|
|
3673
3680
|
function zo(n) {
|
|
3674
3681
|
const {
|
|
@@ -3704,12 +3711,12 @@ function jo(n) {
|
|
|
3704
3711
|
hideCursor: u
|
|
3705
3712
|
} = n, l = [];
|
|
3706
3713
|
t ? e.forEach((f) => {
|
|
3707
|
-
f.actions.forEach((
|
|
3708
|
-
t.includes(
|
|
3714
|
+
f.actions.forEach((p) => {
|
|
3715
|
+
t.includes(p.id) && l.push(p);
|
|
3709
3716
|
});
|
|
3710
3717
|
}) : e.forEach((f) => {
|
|
3711
|
-
f.id !== s.id ? l.push(...f.actions) : f.actions.forEach((
|
|
3712
|
-
|
|
3718
|
+
f.id !== s.id ? l.push(...f.actions) : f.actions.forEach((p) => {
|
|
3719
|
+
p.id !== r.id && l.push(p);
|
|
3713
3720
|
});
|
|
3714
3721
|
});
|
|
3715
3722
|
const h = Br(l, {
|
|
@@ -3720,100 +3727,140 @@ function jo(n) {
|
|
|
3720
3727
|
return u || h.push(a), h;
|
|
3721
3728
|
}
|
|
3722
3729
|
const Fo = (n) => {
|
|
3723
|
-
const e =
|
|
3730
|
+
const e = De.c(50);
|
|
3724
3731
|
let t, r;
|
|
3725
3732
|
e[0] !== n ? ({
|
|
3726
3733
|
ref: r,
|
|
3727
3734
|
...t
|
|
3728
3735
|
} = n, e[0] = n, e[1] = t, e[2] = r) : (t = e[1], r = e[2]);
|
|
3729
3736
|
const {
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3737
|
+
snapData: s,
|
|
3738
|
+
initSnap: o,
|
|
3739
|
+
updateSnap: i,
|
|
3740
|
+
disposeSnap: c,
|
|
3741
|
+
getActiveDragState: a,
|
|
3742
|
+
defaultGetAssistPosition: u,
|
|
3743
|
+
defaultGetMovePosition: l
|
|
3736
3744
|
} = Wo();
|
|
3737
|
-
let
|
|
3738
|
-
e[3] !==
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
scale: M,
|
|
3747
|
-
startLeft: H
|
|
3748
|
-
}), k = a({
|
|
3745
|
+
let h;
|
|
3746
|
+
e[3] !== u || e[4] !== a || e[5] !== t.cursorTime || e[6] !== t.editorData || e[7] !== t.hideCursor || e[8] !== t.scale || e[9] !== t.scaleWidth || e[10] !== t.snap || e[11] !== t.startLeft || e[12] !== s.isMoving || e[13] !== i ? (h = () => {
|
|
3747
|
+
const C = a();
|
|
3748
|
+
if (t.snap && C && s.isMoving) {
|
|
3749
|
+
const z = t.scaleWidth ?? 160, I = t.scale ?? 1, y = t.startLeft ?? 20, A = t.hideCursor ?? !1, M = Pe(t.cursorTime, {
|
|
3750
|
+
scaleWidth: z,
|
|
3751
|
+
scale: I,
|
|
3752
|
+
startLeft: y
|
|
3753
|
+
}), Z = u({
|
|
3749
3754
|
editorData: t.editorData,
|
|
3750
|
-
assistActionIds:
|
|
3751
|
-
action:
|
|
3752
|
-
row:
|
|
3753
|
-
scale:
|
|
3754
|
-
scaleWidth:
|
|
3755
|
-
startLeft:
|
|
3755
|
+
assistActionIds: C.assistActionIds,
|
|
3756
|
+
action: C.action,
|
|
3757
|
+
row: C.row,
|
|
3758
|
+
scale: I,
|
|
3759
|
+
scaleWidth: z,
|
|
3760
|
+
startLeft: y,
|
|
3756
3761
|
hideCursor: A,
|
|
3757
|
-
cursorLeft:
|
|
3762
|
+
cursorLeft: M
|
|
3758
3763
|
});
|
|
3759
|
-
|
|
3760
|
-
assistPositions:
|
|
3764
|
+
i({
|
|
3765
|
+
assistPositions: Z
|
|
3761
3766
|
});
|
|
3762
|
-
}
|
|
3763
|
-
|
|
3764
|
-
|
|
3767
|
+
} else
|
|
3768
|
+
!t.snap && s.isMoving && i({
|
|
3769
|
+
assistPositions: []
|
|
3770
|
+
});
|
|
3771
|
+
}, e[3] = u, e[4] = a, e[5] = t.cursorTime, e[6] = t.editorData, e[7] = t.hideCursor, e[8] = t.scale, e[9] = t.scaleWidth, e[10] = t.snap, e[11] = t.startLeft, e[12] = s.isMoving, e[13] = i, e[14] = h) : h = e[14];
|
|
3765
3772
|
let f;
|
|
3766
|
-
e[
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
+
e[15] !== t.snap || e[16] !== s.isMoving ? (f = [t.snap, s.isMoving], e[15] = t.snap, e[16] = s.isMoving, e[17] = f) : f = e[17], At(h, f);
|
|
3774
|
+
let p;
|
|
3775
|
+
e[18] !== u || e[19] !== o || e[20] !== t ? (p = (C) => {
|
|
3776
|
+
const z = t.getAssistDragLineActionIds && t.getAssistDragLineActionIds({
|
|
3777
|
+
action: C.action,
|
|
3778
|
+
row: C.row,
|
|
3779
|
+
editorData: t.editorData
|
|
3780
|
+
});
|
|
3781
|
+
if (t.snap) {
|
|
3782
|
+
const I = t.scaleWidth ?? 160, y = t.scale ?? 1, A = t.startLeft ?? 20, M = t.hideCursor ?? !1, Z = Pe(t.cursorTime, {
|
|
3783
|
+
scaleWidth: I,
|
|
3784
|
+
scale: y,
|
|
3785
|
+
startLeft: A
|
|
3786
|
+
}), ee = u({
|
|
3787
|
+
editorData: t.editorData,
|
|
3788
|
+
assistActionIds: z,
|
|
3789
|
+
action: C.action,
|
|
3790
|
+
row: C.row,
|
|
3791
|
+
scale: y,
|
|
3792
|
+
scaleWidth: I,
|
|
3793
|
+
startLeft: A,
|
|
3794
|
+
hideCursor: M,
|
|
3795
|
+
cursorLeft: Z
|
|
3796
|
+
});
|
|
3797
|
+
o({
|
|
3798
|
+
assistPositions: ee,
|
|
3799
|
+
action: C.action,
|
|
3800
|
+
row: C.row,
|
|
3801
|
+
assistActionIds: z
|
|
3802
|
+
});
|
|
3803
|
+
} else
|
|
3804
|
+
o({
|
|
3805
|
+
assistPositions: [],
|
|
3806
|
+
action: C.action,
|
|
3807
|
+
row: C.row,
|
|
3808
|
+
assistActionIds: z
|
|
3809
|
+
});
|
|
3810
|
+
}, e[18] = u, e[19] = o, e[20] = t, e[21] = p) : p = e[21];
|
|
3811
|
+
const S = p;
|
|
3812
|
+
let v;
|
|
3813
|
+
e[22] !== l || e[23] !== t.scale || e[24] !== t.scaleWidth || e[25] !== t.snap || e[26] !== t.startLeft || e[27] !== i ? (v = (C) => {
|
|
3814
|
+
if (t.snap) {
|
|
3815
|
+
const z = t.scaleWidth ?? 160, I = t.scale ?? 1, y = t.startLeft ?? 20, A = l({
|
|
3816
|
+
...C,
|
|
3817
|
+
startLeft: y,
|
|
3818
|
+
scaleWidth: z,
|
|
3819
|
+
scale: I
|
|
3773
3820
|
});
|
|
3774
3821
|
i({
|
|
3775
|
-
movePositions:
|
|
3822
|
+
movePositions: A
|
|
3776
3823
|
});
|
|
3777
3824
|
}
|
|
3778
|
-
}, e[
|
|
3779
|
-
const m =
|
|
3780
|
-
let
|
|
3781
|
-
if (e[
|
|
3782
|
-
const
|
|
3783
|
-
let
|
|
3784
|
-
for (let
|
|
3785
|
-
const
|
|
3786
|
-
if (!
|
|
3825
|
+
}, e[22] = l, e[23] = t.scale, e[24] = t.scaleWidth, e[25] = t.snap, e[26] = t.startLeft, e[27] = i, e[28] = v) : v = e[28];
|
|
3826
|
+
const m = v, E = t.rowHeight ?? 32, b = t.scaleWidth ?? 160, _ = t.startLeft ?? 20, w = Math.max(t.scaleCount * b + _, t.timelineWidth);
|
|
3827
|
+
let T;
|
|
3828
|
+
if (e[29] !== w || e[30] !== E || e[31] !== c || e[32] !== S || e[33] !== m || e[34] !== t || e[35] !== s) {
|
|
3829
|
+
const C = [];
|
|
3830
|
+
let z = 0;
|
|
3831
|
+
for (let I = 0; I < t.editorData.length; I++) {
|
|
3832
|
+
const y = t.editorData[I];
|
|
3833
|
+
if (!y)
|
|
3787
3834
|
continue;
|
|
3788
|
-
const
|
|
3789
|
-
|
|
3835
|
+
const A = y.rowHeight || E;
|
|
3836
|
+
C.push(/* @__PURE__ */ Or(ko, { ...t, key: y.id, rowData: y, snapData: s, scrollContainerRef: t.scrollElementRef, style: {
|
|
3790
3837
|
position: "absolute",
|
|
3791
3838
|
top: 0,
|
|
3792
3839
|
left: 0,
|
|
3793
3840
|
width: w,
|
|
3794
|
-
height: `${
|
|
3795
|
-
transform: `translateY(${
|
|
3796
|
-
}, onActionMoveStart: (
|
|
3841
|
+
height: `${A}px`,
|
|
3842
|
+
transform: `translateY(${z}px)`
|
|
3843
|
+
}, onActionMoveStart: (M) => (S(M), t.onActionMoveStart && t.onActionMoveStart(M)), onActionResizeStart: (M) => (S(M), t.onActionResizeStart && t.onActionResizeStart(M)), onActionMoving: (M) => (m(M), t.onActionMoving && t.onActionMoving(M)), onActionResizing: (M) => (m(M), t.onActionResizing && t.onActionResizing(M)), onActionResizeEnd: (M) => (c(), t.onActionResizeEnd && t.onActionResizeEnd(M)), onActionMoveEnd: (M) => (c(), t.onActionMoveEnd && t.onActionMoveEnd(M)) })), z = z + A;
|
|
3797
3844
|
}
|
|
3798
|
-
|
|
3845
|
+
T = [z, C], e[29] = w, e[30] = E, e[31] = c, e[32] = S, e[33] = m, e[34] = t, e[35] = s, e[36] = T;
|
|
3799
3846
|
} else
|
|
3800
|
-
|
|
3801
|
-
const [
|
|
3802
|
-
let
|
|
3803
|
-
e[
|
|
3847
|
+
T = e[36];
|
|
3848
|
+
const [P, D] = T, H = `0, ${t.startLeft ?? 20}px`, O = `${t.startLeft ?? 20}px, ${t.scaleWidth ?? 160}px`;
|
|
3849
|
+
let j;
|
|
3850
|
+
e[37] !== w || e[38] !== H || e[39] !== O || e[40] !== P ? (j = {
|
|
3804
3851
|
width: w,
|
|
3805
|
-
height:
|
|
3852
|
+
height: P,
|
|
3806
3853
|
position: "relative",
|
|
3807
|
-
backgroundPositionX:
|
|
3808
|
-
backgroundSize:
|
|
3809
|
-
}, e[
|
|
3810
|
-
let
|
|
3811
|
-
e[
|
|
3812
|
-
let
|
|
3813
|
-
return e[
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
] }), e[
|
|
3854
|
+
backgroundPositionX: H,
|
|
3855
|
+
backgroundSize: O
|
|
3856
|
+
}, e[37] = w, e[38] = H, e[39] = O, e[40] = P, e[41] = j) : j = e[41];
|
|
3857
|
+
let W;
|
|
3858
|
+
e[42] !== t.snap || e[43] !== s ? (W = t.snap && /* @__PURE__ */ R.jsx(qr, { ...s }), e[42] = t.snap, e[43] = s, e[44] = W) : W = e[44];
|
|
3859
|
+
let Y;
|
|
3860
|
+
return e[45] !== r || e[46] !== D || e[47] !== j || e[48] !== W ? (Y = /* @__PURE__ */ R.jsxs("div", { ref: r, style: j, className: "timeline-editor-edit-area", children: [
|
|
3861
|
+
D,
|
|
3862
|
+
W
|
|
3863
|
+
] }), e[45] = r, e[46] = D, e[47] = j, e[48] = W, e[49] = Y) : Y = e[49], Y;
|
|
3817
3864
|
};
|
|
3818
3865
|
function Vo({
|
|
3819
3866
|
scaleSplitCount: n,
|
|
@@ -3826,12 +3873,12 @@ function Vo({
|
|
|
3826
3873
|
onClickTimeArea: c,
|
|
3827
3874
|
setCursor: a
|
|
3828
3875
|
}) {
|
|
3829
|
-
const u = n ?? 1, l = e ?? 160, h = t ?? 20, f = (n ?? 0) > 0,
|
|
3876
|
+
const u = n ?? 1, l = e ?? 160, h = t ?? 20, f = (n ?? 0) > 0, p = f ? r * (n ?? 1) + 1 : r, S = (f ? l / u : l) * (p - 1) + h, m = Tr({
|
|
3830
3877
|
horizontal: !0,
|
|
3831
|
-
count:
|
|
3878
|
+
count: p,
|
|
3832
3879
|
getScrollElement: () => i.current,
|
|
3833
|
-
estimateSize: (
|
|
3834
|
-
switch (
|
|
3880
|
+
estimateSize: (E) => {
|
|
3881
|
+
switch (E) {
|
|
3835
3882
|
case 0:
|
|
3836
3883
|
return h;
|
|
3837
3884
|
default:
|
|
@@ -3840,25 +3887,25 @@ function Vo({
|
|
|
3840
3887
|
},
|
|
3841
3888
|
overscan: 10
|
|
3842
3889
|
});
|
|
3843
|
-
return
|
|
3890
|
+
return At(() => m.measure(), [e, t, m]), /* @__PURE__ */ R.jsx("div", { style: {
|
|
3844
3891
|
width: `${S}px`
|
|
3845
|
-
}, className:
|
|
3846
|
-
const b = t ?? 20, _ = e ?? 160,
|
|
3847
|
-
if (
|
|
3848
|
-
const
|
|
3892
|
+
}, className: fe("time-area"), onClick: (E) => {
|
|
3893
|
+
const b = t ?? 20, _ = e ?? 160, w = o ?? 1, T = s ?? 1 / 0, P = E.currentTarget.getBoundingClientRect(), D = E.clientX - P.x, H = Math.max(D, b);
|
|
3894
|
+
if (H > T * _ + b) return;
|
|
3895
|
+
const O = Xe(H, {
|
|
3849
3896
|
startLeft: b,
|
|
3850
|
-
scale:
|
|
3897
|
+
scale: w,
|
|
3851
3898
|
scaleWidth: _
|
|
3852
3899
|
});
|
|
3853
|
-
c && c(
|
|
3854
|
-
time:
|
|
3900
|
+
c && c(O, E), !E.defaultPrevented && a({
|
|
3901
|
+
time: O
|
|
3855
3902
|
});
|
|
3856
|
-
}, children:
|
|
3857
|
-
const b =
|
|
3858
|
-
return /* @__PURE__ */
|
|
3859
|
-
width: `${
|
|
3860
|
-
transform: `translateX(${
|
|
3861
|
-
}, className:
|
|
3903
|
+
}, children: m.getVirtualItems().map((E) => {
|
|
3904
|
+
const b = E.index, _ = n ?? 1, w = o ?? 1, T = f ? b % _ === 0 : !0, P = [fe("time-unit"), fe(T ? "time-unit-big" : "time-unit-small")], D = (f ? b / _ : b) * w;
|
|
3905
|
+
return /* @__PURE__ */ R.jsx("div", { "data-index": E.index, style: {
|
|
3906
|
+
width: `${E.size}px`,
|
|
3907
|
+
transform: `translateX(${E.start}px)`
|
|
3908
|
+
}, className: P.join(" "), children: T && /* @__PURE__ */ R.jsx("div", { className: fe("time-unit-scale"), children: D }) }, E.key);
|
|
3862
3909
|
}) });
|
|
3863
3910
|
}
|
|
3864
3911
|
function Uo(n) {
|
|
@@ -3876,11 +3923,11 @@ function $o(n, e, t) {
|
|
|
3876
3923
|
function Ho(n) {
|
|
3877
3924
|
return Uo(n) && "ownerSVGElement" in n;
|
|
3878
3925
|
}
|
|
3879
|
-
const
|
|
3880
|
-
let
|
|
3881
|
-
const
|
|
3926
|
+
const Ht = /* @__PURE__ */ new WeakMap();
|
|
3927
|
+
let Bt;
|
|
3928
|
+
const Pr = (n, e, t) => (r, s) => s && s[0] ? s[0][n + "Size"] : Ho(r) && "getBBox" in r ? r.getBBox()[e] : r[t], Bo = /* @__PURE__ */ Pr("inline", "width", "offsetWidth"), Yo = /* @__PURE__ */ Pr("block", "height", "offsetHeight");
|
|
3882
3929
|
function Xo({ target: n, borderBoxSize: e }) {
|
|
3883
|
-
|
|
3930
|
+
Ht.get(n)?.forEach((t) => {
|
|
3884
3931
|
t(n, {
|
|
3885
3932
|
get width() {
|
|
3886
3933
|
return Bo(n, e);
|
|
@@ -3891,26 +3938,26 @@ function Xo({ target: n, borderBoxSize: e }) {
|
|
|
3891
3938
|
});
|
|
3892
3939
|
});
|
|
3893
3940
|
}
|
|
3894
|
-
function
|
|
3941
|
+
function Go(n) {
|
|
3895
3942
|
n.forEach(Xo);
|
|
3896
3943
|
}
|
|
3897
|
-
function
|
|
3898
|
-
typeof ResizeObserver > "u" || (
|
|
3944
|
+
function Ko() {
|
|
3945
|
+
typeof ResizeObserver > "u" || (Bt = new ResizeObserver(Go));
|
|
3899
3946
|
}
|
|
3900
3947
|
function qo(n, e) {
|
|
3901
|
-
|
|
3948
|
+
Bt || Ko();
|
|
3902
3949
|
const t = $o(n);
|
|
3903
3950
|
return t.forEach((r) => {
|
|
3904
|
-
let s =
|
|
3905
|
-
s || (s = /* @__PURE__ */ new Set(),
|
|
3951
|
+
let s = Ht.get(r);
|
|
3952
|
+
s || (s = /* @__PURE__ */ new Set(), Ht.set(r, s)), s.add(e), Bt?.observe(r);
|
|
3906
3953
|
}), () => {
|
|
3907
3954
|
t.forEach((r) => {
|
|
3908
|
-
const s =
|
|
3909
|
-
s?.delete(e), s?.size ||
|
|
3955
|
+
const s = Ht.get(r);
|
|
3956
|
+
s?.delete(e), s?.size || Bt?.unobserve(r);
|
|
3910
3957
|
});
|
|
3911
3958
|
};
|
|
3912
3959
|
}
|
|
3913
|
-
const
|
|
3960
|
+
const Yt = /* @__PURE__ */ new Set();
|
|
3914
3961
|
let Ct;
|
|
3915
3962
|
function Jo() {
|
|
3916
3963
|
Ct = () => {
|
|
@@ -3922,19 +3969,19 @@ function Jo() {
|
|
|
3922
3969
|
return window.innerHeight;
|
|
3923
3970
|
}
|
|
3924
3971
|
};
|
|
3925
|
-
|
|
3972
|
+
Yt.forEach((e) => e(n));
|
|
3926
3973
|
}, window.addEventListener("resize", Ct);
|
|
3927
3974
|
}
|
|
3928
3975
|
function Zo(n) {
|
|
3929
|
-
return
|
|
3930
|
-
|
|
3976
|
+
return Yt.add(n), Ct || Jo(), () => {
|
|
3977
|
+
Yt.delete(n), !Yt.size && typeof Ct == "function" && (window.removeEventListener("resize", Ct), Ct = void 0);
|
|
3931
3978
|
};
|
|
3932
3979
|
}
|
|
3933
3980
|
function Qo(n, e) {
|
|
3934
3981
|
return typeof n == "function" ? Zo(n) : qo(n, e);
|
|
3935
3982
|
}
|
|
3936
3983
|
function ei(n) {
|
|
3937
|
-
const e =
|
|
3984
|
+
const e = De.c(4), {
|
|
3938
3985
|
elementRef: t
|
|
3939
3986
|
} = n;
|
|
3940
3987
|
let r;
|
|
@@ -3954,7 +4001,7 @@ function ei(n) {
|
|
|
3954
4001
|
}, c = [t], e[1] = t, e[2] = i, e[3] = c) : (i = e[2], c = e[3]), gn(i, c), s;
|
|
3955
4002
|
}
|
|
3956
4003
|
const ti = (n) => {
|
|
3957
|
-
const e =
|
|
4004
|
+
const e = De.c(42), {
|
|
3958
4005
|
disableDrag: t,
|
|
3959
4006
|
cursorTime: r,
|
|
3960
4007
|
setCursor: s,
|
|
@@ -3966,100 +4013,100 @@ const ti = (n) => {
|
|
|
3966
4013
|
scrollElementRef: l,
|
|
3967
4014
|
maxScaleCount: h,
|
|
3968
4015
|
onCursorDragStart: f,
|
|
3969
|
-
onCursorDrag:
|
|
4016
|
+
onCursorDrag: p,
|
|
3970
4017
|
onCursorDragEnd: S
|
|
3971
|
-
} = n, v = ce(null),
|
|
3972
|
-
let
|
|
3973
|
-
e[0] !== r || e[1] !== c || e[2] !== i || e[3] !== o ? (
|
|
3974
|
-
if (typeof
|
|
3975
|
-
const d = o ?? 20,
|
|
3976
|
-
v.current.updateLeft(
|
|
4018
|
+
} = n, v = ce(null), m = ce(void 0);
|
|
4019
|
+
let E, b;
|
|
4020
|
+
e[0] !== r || e[1] !== c || e[2] !== i || e[3] !== o ? (E = () => {
|
|
4021
|
+
if (typeof m.current > "u" && v.current) {
|
|
4022
|
+
const d = o ?? 20, x = i ?? 160, N = c ?? 1;
|
|
4023
|
+
v.current.updateLeft(Pe(r, {
|
|
3977
4024
|
startLeft: d,
|
|
3978
|
-
scaleWidth:
|
|
3979
|
-
scale:
|
|
4025
|
+
scaleWidth: x,
|
|
4026
|
+
scale: N
|
|
3980
4027
|
}));
|
|
3981
4028
|
}
|
|
3982
|
-
}, b = [r, o, i, c], e[0] = r, e[1] = c, e[2] = i, e[3] = o, e[4] =
|
|
3983
|
-
const _ = o ?? 20,
|
|
3984
|
-
let
|
|
3985
|
-
e[6] !== _ || e[7] !==
|
|
4029
|
+
}, b = [r, o, i, c], e[0] = r, e[1] = c, e[2] = i, e[3] = o, e[4] = E, e[5] = b) : (E = e[4], b = e[5]), At(E, b);
|
|
4030
|
+
const _ = o ?? 20, w = i ?? 160, T = c ?? 1, P = h ?? 1 / 0, D = (u ?? 0) > 0, H = u ?? 1, O = D ? a * (u ?? 1) + 1 : a, j = o ?? 20, W = (D ? w / H : w) * (O - 1) + j;
|
|
4031
|
+
let Y;
|
|
4032
|
+
e[6] !== _ || e[7] !== P || e[8] !== l || e[9] !== W || e[10] !== w ? (Y = () => ({
|
|
3986
4033
|
left: 0,
|
|
3987
|
-
right: Math.min(
|
|
3988
|
-
}), e[6] = _, e[7] =
|
|
3989
|
-
const
|
|
3990
|
-
let
|
|
3991
|
-
e[12] !== r || e[13] !== _ || e[14] !== f || e[15] !==
|
|
3992
|
-
const d = v.current?.getLeft() ??
|
|
4034
|
+
right: Math.min(W, P * w + _ - (l.current?.scrollLeft ?? 0))
|
|
4035
|
+
}), e[6] = _, e[7] = P, e[8] = l, e[9] = W, e[10] = w, e[11] = Y) : Y = e[11];
|
|
4036
|
+
const C = !t;
|
|
4037
|
+
let z;
|
|
4038
|
+
e[12] !== r || e[13] !== _ || e[14] !== f || e[15] !== T || e[16] !== w ? (z = () => {
|
|
4039
|
+
const d = v.current?.getLeft() ?? Pe(r, {
|
|
3993
4040
|
startLeft: _,
|
|
3994
|
-
scaleWidth:
|
|
3995
|
-
scale:
|
|
4041
|
+
scaleWidth: w,
|
|
4042
|
+
scale: T
|
|
3996
4043
|
});
|
|
3997
|
-
|
|
3998
|
-
const
|
|
4044
|
+
m.current = d;
|
|
4045
|
+
const x = Xe(d, {
|
|
3999
4046
|
startLeft: _,
|
|
4000
|
-
scale:
|
|
4001
|
-
scaleWidth:
|
|
4047
|
+
scale: T,
|
|
4048
|
+
scaleWidth: w
|
|
4002
4049
|
});
|
|
4003
|
-
f && f(
|
|
4004
|
-
}, e[12] = r, e[13] = _, e[14] = f, e[15] =
|
|
4005
|
-
let
|
|
4006
|
-
e[18] !== _ || e[19] !== S || e[20] !==
|
|
4007
|
-
if (typeof
|
|
4008
|
-
const d =
|
|
4050
|
+
f && f(x), v.current?.updateLeft(d);
|
|
4051
|
+
}, e[12] = r, e[13] = _, e[14] = f, e[15] = T, e[16] = w, e[17] = z) : z = e[17];
|
|
4052
|
+
let I;
|
|
4053
|
+
e[18] !== _ || e[19] !== S || e[20] !== T || e[21] !== s || e[22] !== w ? (I = () => {
|
|
4054
|
+
if (typeof m.current < "u") {
|
|
4055
|
+
const d = Xe(m.current, {
|
|
4009
4056
|
startLeft: _,
|
|
4010
|
-
scale:
|
|
4011
|
-
scaleWidth:
|
|
4057
|
+
scale: T,
|
|
4058
|
+
scaleWidth: w
|
|
4012
4059
|
});
|
|
4013
4060
|
s({
|
|
4014
4061
|
time: d
|
|
4015
4062
|
}), S && S(d);
|
|
4016
4063
|
}
|
|
4017
|
-
|
|
4018
|
-
}, e[18] = _, e[19] = S, e[20] =
|
|
4019
|
-
let
|
|
4020
|
-
e[24] !== _ || e[25] !==
|
|
4064
|
+
m.current = void 0;
|
|
4065
|
+
}, e[18] = _, e[19] = S, e[20] = T, e[21] = s, e[22] = w, e[23] = I) : I = e[23];
|
|
4066
|
+
let y;
|
|
4067
|
+
e[24] !== _ || e[25] !== p || e[26] !== T || e[27] !== l || e[28] !== s || e[29] !== w ? (y = (d, x) => {
|
|
4021
4068
|
const {
|
|
4022
|
-
left:
|
|
4023
|
-
} = d, $ =
|
|
4069
|
+
left: N
|
|
4070
|
+
} = d, $ = x === void 0 ? 0 : x, Q = l.current?.scrollLeft ?? 0, X = l.current, B = X?.clientWidth ?? 0;
|
|
4024
4071
|
if ($ !== 0)
|
|
4025
|
-
if (typeof
|
|
4026
|
-
|
|
4027
|
-
const L =
|
|
4028
|
-
|
|
4072
|
+
if (typeof m.current < "u") {
|
|
4073
|
+
m.current = m.current + $;
|
|
4074
|
+
const L = Q, k = Q + B;
|
|
4075
|
+
m.current < L + 10 ? m.current = L + 10 : m.current > k - 10 && (m.current = k - 10), m.current < _ - Q && (m.current = _ - Q);
|
|
4029
4076
|
} else {
|
|
4030
|
-
|
|
4031
|
-
const L =
|
|
4032
|
-
|
|
4077
|
+
m.current = N + $;
|
|
4078
|
+
const L = Q, k = Q + B;
|
|
4079
|
+
m.current < L + 10 ? m.current = L + 10 : m.current > k - 10 && (m.current = k - 10);
|
|
4033
4080
|
}
|
|
4034
|
-
else if (
|
|
4035
|
-
const L =
|
|
4036
|
-
|
|
4081
|
+
else if (N < _ - Q ? m.current = _ - Q : m.current = N, X && B > 0) {
|
|
4082
|
+
const L = Q, k = Q + B;
|
|
4083
|
+
m.current < L + 10 ? m.current = L + 10 : m.current > k - 10 && (m.current = k - 10);
|
|
4037
4084
|
}
|
|
4038
|
-
if (typeof
|
|
4039
|
-
v.current?.updateLeft(
|
|
4040
|
-
const L =
|
|
4085
|
+
if (typeof m.current < "u") {
|
|
4086
|
+
v.current?.updateLeft(m.current);
|
|
4087
|
+
const L = Xe(m.current, {
|
|
4041
4088
|
startLeft: _,
|
|
4042
|
-
scale:
|
|
4043
|
-
scaleWidth:
|
|
4089
|
+
scale: T,
|
|
4090
|
+
scaleWidth: w
|
|
4044
4091
|
});
|
|
4045
4092
|
s({
|
|
4046
4093
|
time: L
|
|
4047
|
-
}),
|
|
4094
|
+
}), p && p(L);
|
|
4048
4095
|
}
|
|
4049
4096
|
return !1;
|
|
4050
|
-
}, e[24] = _, e[25] =
|
|
4051
|
-
let
|
|
4052
|
-
e[31] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
4097
|
+
}, e[24] = _, e[25] = p, e[26] = T, e[27] = l, e[28] = s, e[29] = w, e[30] = y) : y = e[30];
|
|
4098
|
+
let A, M;
|
|
4099
|
+
e[31] === Symbol.for("react.memo_cache_sentinel") ? (A = fe("cursor"), M = fe("cursor-top"), e[31] = A, e[32] = M) : (A = e[31], M = e[32]);
|
|
4100
|
+
let Z;
|
|
4101
|
+
e[33] === Symbol.for("react.memo_cache_sentinel") ? (Z = /* @__PURE__ */ R.jsxs("div", { className: A, children: [
|
|
4102
|
+
/* @__PURE__ */ R.jsx("svg", { className: M, width: "8", height: "12", viewBox: "0 0 8 12", fill: "none", children: /* @__PURE__ */ R.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" }) }),
|
|
4103
|
+
/* @__PURE__ */ R.jsx("div", { className: fe("cursor-area") })
|
|
4104
|
+
] }), e[33] = Z) : Z = e[33];
|
|
4053
4105
|
let ee;
|
|
4054
|
-
e[
|
|
4055
|
-
/* @__PURE__ */ x.jsx("svg", { className: J, 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" }) }),
|
|
4056
|
-
/* @__PURE__ */ x.jsx("div", { className: de("cursor-area") })
|
|
4057
|
-
] }), e[33] = ee) : ee = e[33];
|
|
4058
|
-
let te;
|
|
4059
|
-
return e[34] !== _ || e[35] !== l || e[36] !== U || e[37] !== M || e[38] !== H || e[39] !== A || e[40] !== R ? (te = /* @__PURE__ */ x.jsx(Cr, { start: _, ref: v, parentRef: l, getBounds: U, autoScroll: !0, enableDragging: M, enableResizing: !1, onDragStart: H, onDragEnd: A, onDrag: R, children: ee }), e[34] = _, e[35] = l, e[36] = U, e[37] = M, e[38] = H, e[39] = A, e[40] = R, e[41] = te) : te = e[41], te;
|
|
4106
|
+
return e[34] !== _ || e[35] !== l || e[36] !== Y || e[37] !== C || e[38] !== z || e[39] !== I || e[40] !== y ? (ee = /* @__PURE__ */ R.jsx(Cr, { start: _, ref: v, parentRef: l, getBounds: Y, autoScroll: !0, enableDragging: C, enableResizing: !1, onDragStart: z, onDragEnd: I, onDrag: y, children: Z }), e[34] = _, e[35] = l, e[36] = Y, e[37] = C, e[38] = z, e[39] = I, e[40] = y, e[41] = ee) : ee = e[41], ee;
|
|
4060
4107
|
};
|
|
4061
4108
|
function Zn(n) {
|
|
4062
|
-
const e =
|
|
4109
|
+
const e = De.c(9);
|
|
4063
4110
|
let t, r, s;
|
|
4064
4111
|
e[0] !== n ? ({
|
|
4065
4112
|
className: t,
|
|
@@ -4068,9 +4115,9 @@ function Zn(n) {
|
|
|
4068
4115
|
} = n, e[0] = n, e[1] = t, e[2] = r, e[3] = s) : (t = e[1], r = e[2], s = e[3]);
|
|
4069
4116
|
const o = s === void 0 ? "vertical" : s;
|
|
4070
4117
|
let i;
|
|
4071
|
-
e[4] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */
|
|
4118
|
+
e[4] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ R.jsx(wr, { "data-slot": "scroll-area-thumb" }), e[4] = i) : i = e[4];
|
|
4072
4119
|
let c;
|
|
4073
|
-
return e[5] !== t || e[6] !== o || e[7] !== r ? (c = /* @__PURE__ */
|
|
4120
|
+
return e[5] !== t || e[6] !== o || e[7] !== r ? (c = /* @__PURE__ */ R.jsx(vr, { "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;
|
|
4074
4121
|
}
|
|
4075
4122
|
function si({
|
|
4076
4123
|
ref: n,
|
|
@@ -4083,16 +4130,16 @@ function si({
|
|
|
4083
4130
|
height: f
|
|
4084
4131
|
} = ei({
|
|
4085
4132
|
elementRef: r
|
|
4086
|
-
}),
|
|
4087
|
-
i(Math.min(t.maxScaleCount, Math.max(t.minScaleCount,
|
|
4088
|
-
}, S = (
|
|
4089
|
-
t.onChange?.(
|
|
4090
|
-
}, v = (
|
|
4133
|
+
}), p = (m) => {
|
|
4134
|
+
i(Math.min(t.maxScaleCount, Math.max(t.minScaleCount, m)));
|
|
4135
|
+
}, S = (m) => {
|
|
4136
|
+
t.onChange?.(m);
|
|
4137
|
+
}, v = (m) => {
|
|
4091
4138
|
let {
|
|
4092
|
-
left:
|
|
4139
|
+
left: E,
|
|
4093
4140
|
time: b
|
|
4094
|
-
} =
|
|
4095
|
-
return typeof b < "u" ? (u(b), l.current = b, !0) : typeof
|
|
4141
|
+
} = m;
|
|
4142
|
+
return typeof b < "u" ? (u(b), l.current = b, !0) : typeof E < "u" ? (u(l.current = Xe(E, {
|
|
4096
4143
|
startLeft: t.startLeft,
|
|
4097
4144
|
scale: t.scale,
|
|
4098
4145
|
scaleWidth: t.scaleWidth
|
|
@@ -4102,31 +4149,31 @@ function si({
|
|
|
4102
4149
|
get target() {
|
|
4103
4150
|
return r.current;
|
|
4104
4151
|
},
|
|
4105
|
-
set time(
|
|
4152
|
+
set time(m) {
|
|
4106
4153
|
v({
|
|
4107
|
-
time:
|
|
4154
|
+
time: m
|
|
4108
4155
|
});
|
|
4109
4156
|
},
|
|
4110
4157
|
get time() {
|
|
4111
4158
|
return l.current;
|
|
4112
4159
|
},
|
|
4113
|
-
setScrollLeft: (
|
|
4114
|
-
r.current && (r.current.scrollLeft =
|
|
4160
|
+
setScrollLeft: (m) => {
|
|
4161
|
+
r.current && (r.current.scrollLeft = m);
|
|
4115
4162
|
},
|
|
4116
|
-
setScrollTop: (
|
|
4117
|
-
r.current && (r.current.scrollTop =
|
|
4163
|
+
setScrollTop: (m) => {
|
|
4164
|
+
r.current && (r.current.scrollTop = m);
|
|
4118
4165
|
}
|
|
4119
|
-
})), /* @__PURE__ */
|
|
4120
|
-
/* @__PURE__ */
|
|
4121
|
-
t.onScroll?.(
|
|
4166
|
+
})), /* @__PURE__ */ R.jsxs(go, { style: t.style, className: `${fn} ${t.disableDrag ? fn + "-disable" : ""}`, "data-slot": "scroll-area", children: [
|
|
4167
|
+
/* @__PURE__ */ R.jsxs(vo, { "data-slot": "scroll-area-viewport", ref: r, onScroll: (m) => {
|
|
4168
|
+
t.onScroll?.(m.currentTarget);
|
|
4122
4169
|
}, children: [
|
|
4123
|
-
/* @__PURE__ */
|
|
4124
|
-
/* @__PURE__ */
|
|
4125
|
-
!t.hideCursor && /* @__PURE__ */
|
|
4170
|
+
/* @__PURE__ */ R.jsx(Vo, { ...t, setCursor: v, scaleCount: c, scrollElementRef: r }),
|
|
4171
|
+
/* @__PURE__ */ R.jsx(Fo, { ...t, scrollElementRef: r, timelineWidth: h, timelineHeight: f, disableDrag: t.disableDrag, editorData: t.editorData, cursorTime: a, scaleCount: c, setScaleCount: p, setEditorData: S }),
|
|
4172
|
+
!t.hideCursor && /* @__PURE__ */ R.jsx(ti, { ...t, timelineWidth: h, height: f, scaleCount: c, setScaleCount: p, setCursor: v, cursorTime: a, editorData: t.editorData, scrollElementRef: r })
|
|
4126
4173
|
] }),
|
|
4127
|
-
/* @__PURE__ */
|
|
4128
|
-
/* @__PURE__ */
|
|
4129
|
-
/* @__PURE__ */
|
|
4174
|
+
/* @__PURE__ */ R.jsx(Zn, { orientation: "horizontal" }),
|
|
4175
|
+
/* @__PURE__ */ R.jsx(Zn, { orientation: "vertical" }),
|
|
4176
|
+
/* @__PURE__ */ R.jsx(bo, {})
|
|
4130
4177
|
] });
|
|
4131
4178
|
}
|
|
4132
4179
|
export {
|