@cyca/react-timeline-editor 0.2.3-alpha.7 → 0.2.4-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index-Do2XgyZc.js +77 -0
- package/dist/index-HslTC57T.cjs +1 -0
- package/dist/index.d.ts +3 -3
- package/dist/react-timeline-editor.cjs +4 -4
- package/dist/react-timeline-editor.js +1394 -1400
- package/dist/styles.css +1 -1
- package/dist/utils.cjs +1 -0
- package/dist/utils.d.ts +107 -0
- package/dist/utils.js +10 -0
- package/package.json +7 -3
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import * as g from "react";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
import qe, { useRef as ce, useEffect as Ct, useLayoutEffect as gn, useImperativeHandle as Zn, useState as Mt, useMemo as Tr, useCallback as Pr, createElement as Dr } from "react";
|
|
3
|
+
import { D as En, a as Xt, b as Qn, c as Gt, d as Zt, M as Lr, P as fn, e as dn, f as hn, p as At, g as vn, h as Dt, i as Or, j as Rt, k as Mr, l as Nr, S as yn } from "./index-Do2XgyZc.js";
|
|
4
|
+
import { flushSync as Ir } from "react-dom";
|
|
5
|
+
var jt = { exports: {} }, Lt = {};
|
|
6
|
+
var xn;
|
|
7
|
+
function kr() {
|
|
8
|
+
if (xn) return Lt;
|
|
9
|
+
xn = 1;
|
|
9
10
|
var n = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
|
|
10
11
|
function t(r, s, o) {
|
|
11
12
|
var i = null;
|
|
@@ -22,260 +23,260 @@ function Nr() {
|
|
|
22
23
|
props: o
|
|
23
24
|
};
|
|
24
25
|
}
|
|
25
|
-
return
|
|
26
|
+
return Lt.Fragment = e, Lt.jsx = t, Lt.jsxs = t, Lt;
|
|
26
27
|
}
|
|
27
|
-
var
|
|
28
|
-
var
|
|
29
|
-
function
|
|
30
|
-
return
|
|
31
|
-
function n(
|
|
32
|
-
if (
|
|
33
|
-
if (typeof
|
|
34
|
-
return
|
|
35
|
-
if (typeof
|
|
36
|
-
switch (
|
|
28
|
+
var Ot = {};
|
|
29
|
+
var Rn;
|
|
30
|
+
function Wr() {
|
|
31
|
+
return Rn || (Rn = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
32
|
+
function n(f) {
|
|
33
|
+
if (f == null) return null;
|
|
34
|
+
if (typeof f == "function")
|
|
35
|
+
return f.$$typeof === z ? null : f.displayName || f.name || null;
|
|
36
|
+
if (typeof f == "string") return f;
|
|
37
|
+
switch (f) {
|
|
37
38
|
case p:
|
|
38
39
|
return "Fragment";
|
|
39
40
|
case b:
|
|
40
41
|
return "Profiler";
|
|
41
|
-
case
|
|
42
|
+
case R:
|
|
42
43
|
return "StrictMode";
|
|
43
44
|
case T:
|
|
44
45
|
return "Suspense";
|
|
45
|
-
case
|
|
46
|
+
case D:
|
|
46
47
|
return "SuspenseList";
|
|
47
48
|
case W:
|
|
48
49
|
return "Activity";
|
|
49
50
|
}
|
|
50
|
-
if (typeof
|
|
51
|
-
switch (typeof
|
|
51
|
+
if (typeof f == "object")
|
|
52
|
+
switch (typeof f.tag == "number" && console.error(
|
|
52
53
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
53
|
-
),
|
|
54
|
+
), f.$$typeof) {
|
|
54
55
|
case v:
|
|
55
56
|
return "Portal";
|
|
56
|
-
case E:
|
|
57
|
-
return d.displayName || "Context";
|
|
58
57
|
case _:
|
|
59
|
-
return
|
|
58
|
+
return f.displayName || "Context";
|
|
59
|
+
case S:
|
|
60
|
+
return (f._context.displayName || "Context") + ".Consumer";
|
|
60
61
|
case P:
|
|
61
|
-
var y =
|
|
62
|
-
return
|
|
63
|
-
case
|
|
64
|
-
return y =
|
|
65
|
-
case
|
|
66
|
-
y =
|
|
62
|
+
var y = f.render;
|
|
63
|
+
return f = f.displayName, f || (f = y.displayName || y.name || "", f = f !== "" ? "ForwardRef(" + f + ")" : "ForwardRef"), f;
|
|
64
|
+
case U:
|
|
65
|
+
return y = f.displayName || null, y !== null ? y : n(f.type) || "Memo";
|
|
66
|
+
case O:
|
|
67
|
+
y = f._payload, f = f._init;
|
|
67
68
|
try {
|
|
68
|
-
return n(
|
|
69
|
+
return n(f(y));
|
|
69
70
|
} catch {
|
|
70
71
|
}
|
|
71
72
|
}
|
|
72
73
|
return null;
|
|
73
74
|
}
|
|
74
|
-
function e(
|
|
75
|
-
return "" +
|
|
75
|
+
function e(f) {
|
|
76
|
+
return "" + f;
|
|
76
77
|
}
|
|
77
|
-
function t(
|
|
78
|
+
function t(f) {
|
|
78
79
|
try {
|
|
79
|
-
e(
|
|
80
|
+
e(f);
|
|
80
81
|
var y = !1;
|
|
81
82
|
} catch {
|
|
82
83
|
y = !0;
|
|
83
84
|
}
|
|
84
85
|
if (y) {
|
|
85
86
|
y = console;
|
|
86
|
-
var
|
|
87
|
-
return
|
|
87
|
+
var N = y.error, H = typeof Symbol == "function" && Symbol.toStringTag && f[Symbol.toStringTag] || f.constructor.name || "Object";
|
|
88
|
+
return N.call(
|
|
88
89
|
y,
|
|
89
90
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
90
|
-
|
|
91
|
-
), e(
|
|
91
|
+
H
|
|
92
|
+
), e(f);
|
|
92
93
|
}
|
|
93
94
|
}
|
|
94
|
-
function r(
|
|
95
|
-
if (
|
|
96
|
-
if (typeof
|
|
95
|
+
function r(f) {
|
|
96
|
+
if (f === p) return "<>";
|
|
97
|
+
if (typeof f == "object" && f !== null && f.$$typeof === O)
|
|
97
98
|
return "<...>";
|
|
98
99
|
try {
|
|
99
|
-
var y = n(
|
|
100
|
+
var y = n(f);
|
|
100
101
|
return y ? "<" + y + ">" : "<...>";
|
|
101
102
|
} catch {
|
|
102
103
|
return "<...>";
|
|
103
104
|
}
|
|
104
105
|
}
|
|
105
106
|
function s() {
|
|
106
|
-
var
|
|
107
|
-
return
|
|
107
|
+
var f = Y.A;
|
|
108
|
+
return f === null ? null : f.getOwner();
|
|
108
109
|
}
|
|
109
110
|
function o() {
|
|
110
111
|
return Error("react-stack-top-frame");
|
|
111
112
|
}
|
|
112
|
-
function i(
|
|
113
|
-
if (
|
|
114
|
-
var y = Object.getOwnPropertyDescriptor(
|
|
113
|
+
function i(f) {
|
|
114
|
+
if (C.call(f, "key")) {
|
|
115
|
+
var y = Object.getOwnPropertyDescriptor(f, "key").get;
|
|
115
116
|
if (y && y.isReactWarning) return !1;
|
|
116
117
|
}
|
|
117
|
-
return
|
|
118
|
+
return f.key !== void 0;
|
|
118
119
|
}
|
|
119
|
-
function c(
|
|
120
|
-
function
|
|
121
|
-
|
|
120
|
+
function c(f, y) {
|
|
121
|
+
function N() {
|
|
122
|
+
E || (E = !0, console.error(
|
|
122
123
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
123
124
|
y
|
|
124
125
|
));
|
|
125
126
|
}
|
|
126
|
-
|
|
127
|
-
get:
|
|
127
|
+
N.isReactWarning = !0, Object.defineProperty(f, "key", {
|
|
128
|
+
get: N,
|
|
128
129
|
configurable: !0
|
|
129
130
|
});
|
|
130
131
|
}
|
|
131
132
|
function a() {
|
|
132
|
-
var
|
|
133
|
-
return
|
|
133
|
+
var f = n(this.type);
|
|
134
|
+
return A[f] || (A[f] = !0, console.error(
|
|
134
135
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
135
|
-
)),
|
|
136
|
+
)), f = this.props.ref, f !== void 0 ? f : null;
|
|
136
137
|
}
|
|
137
|
-
function u(
|
|
138
|
-
var B =
|
|
139
|
-
return
|
|
140
|
-
$$typeof:
|
|
141
|
-
type:
|
|
138
|
+
function u(f, y, N, H, Q, X) {
|
|
139
|
+
var B = N.ref;
|
|
140
|
+
return f = {
|
|
141
|
+
$$typeof: w,
|
|
142
|
+
type: f,
|
|
142
143
|
key: y,
|
|
143
|
-
props:
|
|
144
|
-
_owner:
|
|
145
|
-
}, (B !== void 0 ? B : null) !== null ? Object.defineProperty(
|
|
144
|
+
props: N,
|
|
145
|
+
_owner: H
|
|
146
|
+
}, (B !== void 0 ? B : null) !== null ? Object.defineProperty(f, "ref", {
|
|
146
147
|
enumerable: !1,
|
|
147
148
|
get: a
|
|
148
|
-
}) : Object.defineProperty(
|
|
149
|
+
}) : Object.defineProperty(f, "ref", { enumerable: !1, value: null }), f._store = {}, Object.defineProperty(f._store, "validated", {
|
|
149
150
|
configurable: !1,
|
|
150
151
|
enumerable: !1,
|
|
151
152
|
writable: !0,
|
|
152
153
|
value: 0
|
|
153
|
-
}), Object.defineProperty(
|
|
154
|
+
}), Object.defineProperty(f, "_debugInfo", {
|
|
154
155
|
configurable: !1,
|
|
155
156
|
enumerable: !1,
|
|
156
157
|
writable: !0,
|
|
157
158
|
value: null
|
|
158
|
-
}), Object.defineProperty(
|
|
159
|
+
}), Object.defineProperty(f, "_debugStack", {
|
|
159
160
|
configurable: !1,
|
|
160
161
|
enumerable: !1,
|
|
161
162
|
writable: !0,
|
|
162
|
-
value:
|
|
163
|
-
}), Object.defineProperty(
|
|
163
|
+
value: Q
|
|
164
|
+
}), Object.defineProperty(f, "_debugTask", {
|
|
164
165
|
configurable: !1,
|
|
165
166
|
enumerable: !1,
|
|
166
167
|
writable: !0,
|
|
167
|
-
value:
|
|
168
|
-
}), Object.freeze && (Object.freeze(
|
|
168
|
+
value: X
|
|
169
|
+
}), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
|
|
169
170
|
}
|
|
170
|
-
function l(
|
|
171
|
+
function l(f, y, N, H, Q, X) {
|
|
171
172
|
var B = y.children;
|
|
172
173
|
if (B !== void 0)
|
|
173
|
-
if (
|
|
174
|
-
if (
|
|
175
|
-
for (
|
|
176
|
-
h(B[
|
|
174
|
+
if (H)
|
|
175
|
+
if (j(B)) {
|
|
176
|
+
for (H = 0; H < B.length; H++)
|
|
177
|
+
h(B[H]);
|
|
177
178
|
Object.freeze && Object.freeze(B);
|
|
178
179
|
} else
|
|
179
180
|
console.error(
|
|
180
181
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
181
182
|
);
|
|
182
183
|
else h(B);
|
|
183
|
-
if (
|
|
184
|
-
B = n(
|
|
185
|
-
var L = Object.keys(y).filter(function(
|
|
186
|
-
return
|
|
184
|
+
if (C.call(y, "key")) {
|
|
185
|
+
B = n(f);
|
|
186
|
+
var L = Object.keys(y).filter(function($) {
|
|
187
|
+
return $ !== "key";
|
|
187
188
|
});
|
|
188
|
-
|
|
189
|
+
H = 0 < L.length ? "{key: someKey, " + L.join(": ..., ") + ": ...}" : "{key: someKey}", ee[B + H] || (L = 0 < L.length ? "{" + L.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
189
190
|
`A props object containing a "key" prop is being spread into JSX:
|
|
190
191
|
let props = %s;
|
|
191
192
|
<%s {...props} />
|
|
192
193
|
React keys must be passed directly to JSX without using spread:
|
|
193
194
|
let props = %s;
|
|
194
195
|
<%s key={someKey} {...props} />`,
|
|
195
|
-
|
|
196
|
+
H,
|
|
196
197
|
B,
|
|
197
198
|
L,
|
|
198
199
|
B
|
|
199
|
-
),
|
|
200
|
+
), ee[B + H] = !0);
|
|
200
201
|
}
|
|
201
|
-
if (B = null,
|
|
202
|
-
|
|
203
|
-
for (var
|
|
204
|
-
|
|
205
|
-
} else
|
|
202
|
+
if (B = null, N !== void 0 && (t(N), B = "" + N), i(y) && (t(y.key), B = "" + y.key), "key" in y) {
|
|
203
|
+
N = {};
|
|
204
|
+
for (var k in y)
|
|
205
|
+
k !== "key" && (N[k] = y[k]);
|
|
206
|
+
} else N = y;
|
|
206
207
|
return B && c(
|
|
207
|
-
|
|
208
|
-
typeof
|
|
208
|
+
N,
|
|
209
|
+
typeof f == "function" ? f.displayName || f.name || "Unknown" : f
|
|
209
210
|
), u(
|
|
210
|
-
|
|
211
|
+
f,
|
|
211
212
|
B,
|
|
212
|
-
|
|
213
|
+
N,
|
|
213
214
|
s(),
|
|
214
|
-
|
|
215
|
-
|
|
215
|
+
Q,
|
|
216
|
+
X
|
|
216
217
|
);
|
|
217
218
|
}
|
|
218
|
-
function h(
|
|
219
|
-
f
|
|
219
|
+
function h(f) {
|
|
220
|
+
d(f) ? f._store && (f._store.validated = 1) : typeof f == "object" && f !== null && f.$$typeof === O && (f._payload.status === "fulfilled" ? d(f._payload.value) && f._payload.value._store && (f._payload.value._store.validated = 1) : f._store && (f._store.validated = 1));
|
|
220
221
|
}
|
|
221
|
-
function f
|
|
222
|
-
return typeof
|
|
222
|
+
function d(f) {
|
|
223
|
+
return typeof f == "object" && f !== null && f.$$typeof === w;
|
|
223
224
|
}
|
|
224
|
-
var m =
|
|
225
|
+
var m = qe, w = Symbol.for("react.transitional.element"), v = Symbol.for("react.portal"), p = Symbol.for("react.fragment"), R = Symbol.for("react.strict_mode"), b = Symbol.for("react.profiler"), S = Symbol.for("react.consumer"), _ = Symbol.for("react.context"), P = Symbol.for("react.forward_ref"), T = Symbol.for("react.suspense"), D = Symbol.for("react.suspense_list"), U = Symbol.for("react.memo"), O = Symbol.for("react.lazy"), W = Symbol.for("react.activity"), z = Symbol.for("react.client.reference"), Y = m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, C = Object.prototype.hasOwnProperty, j = Array.isArray, I = console.createTask ? console.createTask : function() {
|
|
225
226
|
return null;
|
|
226
227
|
};
|
|
227
228
|
m = {
|
|
228
|
-
react_stack_bottom_frame: function(
|
|
229
|
-
return
|
|
229
|
+
react_stack_bottom_frame: function(f) {
|
|
230
|
+
return f();
|
|
230
231
|
}
|
|
231
232
|
};
|
|
232
|
-
var
|
|
233
|
+
var E, A = {}, M = m.react_stack_bottom_frame.bind(
|
|
233
234
|
m,
|
|
234
235
|
o
|
|
235
|
-
)(),
|
|
236
|
-
|
|
237
|
-
var
|
|
236
|
+
)(), Z = I(r(o)), ee = {};
|
|
237
|
+
Ot.Fragment = p, Ot.jsx = function(f, y, N) {
|
|
238
|
+
var H = 1e4 > Y.recentlyCreatedOwnerStacks++;
|
|
238
239
|
return l(
|
|
239
|
-
|
|
240
|
+
f,
|
|
240
241
|
y,
|
|
241
|
-
|
|
242
|
+
N,
|
|
242
243
|
!1,
|
|
243
|
-
|
|
244
|
-
|
|
244
|
+
H ? Error("react-stack-top-frame") : M,
|
|
245
|
+
H ? I(r(f)) : Z
|
|
245
246
|
);
|
|
246
|
-
},
|
|
247
|
-
var
|
|
247
|
+
}, Ot.jsxs = function(f, y, N) {
|
|
248
|
+
var H = 1e4 > Y.recentlyCreatedOwnerStacks++;
|
|
248
249
|
return l(
|
|
249
|
-
|
|
250
|
+
f,
|
|
250
251
|
y,
|
|
251
|
-
|
|
252
|
+
N,
|
|
252
253
|
!0,
|
|
253
|
-
|
|
254
|
-
|
|
254
|
+
H ? Error("react-stack-top-frame") : M,
|
|
255
|
+
H ? I(r(f)) : Z
|
|
255
256
|
);
|
|
256
257
|
};
|
|
257
|
-
})()),
|
|
258
|
+
})()), Ot;
|
|
258
259
|
}
|
|
259
|
-
var
|
|
260
|
-
function
|
|
261
|
-
return
|
|
260
|
+
var Cn;
|
|
261
|
+
function zr() {
|
|
262
|
+
return Cn || (Cn = 1, process.env.NODE_ENV === "production" ? jt.exports = kr() : jt.exports = Wr()), jt.exports;
|
|
262
263
|
}
|
|
263
|
-
var x =
|
|
264
|
-
const
|
|
264
|
+
var x = zr();
|
|
265
|
+
const rn = {
|
|
265
266
|
trace: 0,
|
|
266
267
|
debug: 1,
|
|
267
268
|
info: 2,
|
|
268
269
|
warn: 3,
|
|
269
270
|
error: 4,
|
|
270
271
|
silent: 5
|
|
271
|
-
},
|
|
272
|
+
}, jr = [
|
|
272
273
|
"trace",
|
|
273
274
|
"debug",
|
|
274
275
|
"info",
|
|
275
276
|
"warn",
|
|
276
277
|
"error"
|
|
277
278
|
];
|
|
278
|
-
var
|
|
279
|
+
var Fr = class er {
|
|
279
280
|
s;
|
|
280
281
|
ls = /* @__PURE__ */ new Map();
|
|
281
282
|
lvl;
|
|
@@ -295,10 +296,10 @@ var zr = class nr {
|
|
|
295
296
|
noop = () => {
|
|
296
297
|
};
|
|
297
298
|
bindMethods() {
|
|
298
|
-
|
|
299
|
+
jr.forEach((e) => {
|
|
299
300
|
const t = this.e.bind(this.c, e, this.n);
|
|
300
301
|
Object.defineProperty(this, e, {
|
|
301
|
-
get: () =>
|
|
302
|
+
get: () => rn[e] >= rn[this.currentLevel()] ? t : this.noop,
|
|
302
303
|
configurable: !0
|
|
303
304
|
});
|
|
304
305
|
});
|
|
@@ -309,7 +310,7 @@ var zr = class nr {
|
|
|
309
310
|
currentLevel() {
|
|
310
311
|
if (this.lvl) return this.lvl;
|
|
311
312
|
const e = this.s.get(this.storageKey());
|
|
312
|
-
return e && e in
|
|
313
|
+
return e && e in rn ? (this.lvl = e, this.lvl) : this.def ? this.def : this.r ? this.r.currentLevel() : "trace";
|
|
313
314
|
}
|
|
314
315
|
setLevel(e) {
|
|
315
316
|
return this.lvl = e, this.s.set(this.storageKey(), e), this;
|
|
@@ -323,8 +324,8 @@ var zr = class nr {
|
|
|
323
324
|
getLogger(e) {
|
|
324
325
|
if (!e) throw new Error("Logger name required");
|
|
325
326
|
if (!this.ls.has(e)) {
|
|
326
|
-
const t = new
|
|
327
|
-
this.ls.set(e,
|
|
327
|
+
const t = new er(this.s, this.e, e, this.r || this);
|
|
328
|
+
this.ls.set(e, tr(t));
|
|
328
329
|
}
|
|
329
330
|
return this.ls.get(e);
|
|
330
331
|
}
|
|
@@ -338,14 +339,14 @@ var zr = class nr {
|
|
|
338
339
|
this.c = e, this.bindMethods();
|
|
339
340
|
}
|
|
340
341
|
};
|
|
341
|
-
function
|
|
342
|
+
function tr(n) {
|
|
342
343
|
return new Proxy(n, { get(e, t, r) {
|
|
343
344
|
if (t in e) return Reflect.get(e, t, r);
|
|
344
345
|
const s = e.c[t];
|
|
345
346
|
return typeof s == "function" ? s.bind(e.c) : s;
|
|
346
347
|
} });
|
|
347
348
|
}
|
|
348
|
-
var
|
|
349
|
+
var Vr = class {
|
|
349
350
|
get(n) {
|
|
350
351
|
return localStorage.getItem(n);
|
|
351
352
|
}
|
|
@@ -356,13 +357,13 @@ var jr = class {
|
|
|
356
357
|
localStorage.removeItem(n);
|
|
357
358
|
}
|
|
358
359
|
};
|
|
359
|
-
const
|
|
360
|
+
const Ur = {
|
|
360
361
|
trace: "#95bdb7",
|
|
361
362
|
debug: "#ad95b8",
|
|
362
363
|
info: "#b6bd73",
|
|
363
364
|
warn: "#88a1bb",
|
|
364
365
|
error: "#bf6c69"
|
|
365
|
-
},
|
|
366
|
+
}, An = {
|
|
366
367
|
info: "⚡️",
|
|
367
368
|
success: "✔",
|
|
368
369
|
warn: "▲",
|
|
@@ -370,23 +371,23 @@ const Fr = {
|
|
|
370
371
|
log: "●",
|
|
371
372
|
trace: "◔",
|
|
372
373
|
debug: "◌"
|
|
373
|
-
},
|
|
374
|
-
const r = t ? `${
|
|
375
|
-
return (n[e] || n.log).bind(n, `%c${r}%c`, `color: ${
|
|
376
|
-
} },
|
|
377
|
-
function
|
|
374
|
+
}, $r = { bind(n, e, t) {
|
|
375
|
+
const r = t ? `${An[e]} ${String(t)}:` : `${An[e]}`;
|
|
376
|
+
return (n[e] || n.log).bind(n, `%c${r}%c`, `color: ${Ur[e]}; font-weight: bold;`, "color: inherit");
|
|
377
|
+
} }, Ge = tr(new Fr(new Vr(), $r));
|
|
378
|
+
function Hr(n) {
|
|
378
379
|
let {
|
|
379
380
|
editorData: e = [],
|
|
380
381
|
effects: t = {},
|
|
381
|
-
scale: r =
|
|
382
|
-
scaleSplitCount: s =
|
|
382
|
+
scale: r = Xt,
|
|
383
|
+
scaleSplitCount: s = Qn,
|
|
383
384
|
scaleWidth: o = Gt,
|
|
384
|
-
startLeft: i =
|
|
385
|
-
minScaleCount: c
|
|
385
|
+
startLeft: i = Zt,
|
|
386
|
+
minScaleCount: c,
|
|
386
387
|
maxScaleCount: a = 1 / 0,
|
|
387
|
-
rowHeight: u =
|
|
388
|
+
rowHeight: u = En
|
|
388
389
|
} = n;
|
|
389
|
-
r <= 0 && (
|
|
390
|
+
r <= 0 && (Ge.error("Error: scale must be greater than 0!"), r = Xt), s <= 0 && (Ge.warn("Warning: scaleSplitCount cannot be less than 1!"), s = 1), o <= 0 && (Ge.warn("Warning: scaleWidth must be greater than 0!"), o = Gt), i < 0 && (Ge.warn("Warning: startLeft cannot be less than 0!"), i = 0), c && typeof c == "number" && (c < 1 && (Ge.warn("Warning: minScaleCount must be greater than 1!"), c = Lr), c = parseInt(c + ""), a < c && (Ge.warn("Warning: maxScaleCount cannot be less than minScaleCount!"), a = c)), a = a === 1 / 0 ? 1 / 0 : parseInt(a + ""), u <= 0 && (Ge.warn("Warning: rowHeight must be greater than 0!"), u = En);
|
|
390
391
|
const l = {
|
|
391
392
|
...n
|
|
392
393
|
};
|
|
@@ -403,79 +404,22 @@ function Ur(n) {
|
|
|
403
404
|
rowHeight: u
|
|
404
405
|
};
|
|
405
406
|
}
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
return
|
|
413
|
-
}
|
|
414
|
-
function Ke(n, e) {
|
|
415
|
-
const {
|
|
416
|
-
startLeft: t,
|
|
417
|
-
scale: r,
|
|
418
|
-
scaleWidth: s
|
|
419
|
-
} = e;
|
|
420
|
-
return (n - t) / s * r;
|
|
421
|
-
}
|
|
422
|
-
function Pt(n, e) {
|
|
423
|
-
const {
|
|
424
|
-
left: t,
|
|
425
|
-
width: r
|
|
426
|
-
} = n, s = Ke(t, e), o = Ke(t + r, e);
|
|
427
|
-
return {
|
|
428
|
-
start: s,
|
|
429
|
-
end: o
|
|
430
|
-
};
|
|
431
|
-
}
|
|
432
|
-
function vn(n, e) {
|
|
433
|
-
const {
|
|
434
|
-
start: t,
|
|
435
|
-
end: r
|
|
436
|
-
} = n, s = ze(t, e), o = ze(r, e) - s;
|
|
437
|
-
return {
|
|
438
|
-
left: s,
|
|
439
|
-
width: o
|
|
440
|
-
};
|
|
441
|
-
}
|
|
442
|
-
function $r(n, e) {
|
|
443
|
-
let t = 0;
|
|
444
|
-
return n.forEach((s) => {
|
|
445
|
-
s.actions.forEach((o) => {
|
|
446
|
-
t = Math.max(t, o.end);
|
|
447
|
-
});
|
|
448
|
-
}), Math.ceil(t / e.scale) + tr;
|
|
449
|
-
}
|
|
450
|
-
function Hr(n, e) {
|
|
451
|
-
const {
|
|
452
|
-
startLeft: t,
|
|
453
|
-
scaleWidth: r
|
|
454
|
-
} = e, s = Math.ceil((n - t) / r);
|
|
455
|
-
return Math.max(s + tr, e.scaleCount);
|
|
456
|
-
}
|
|
457
|
-
function Br(n, e) {
|
|
458
|
-
const t = [];
|
|
459
|
-
return n.forEach((r) => {
|
|
460
|
-
t.push(ze(r.start, e)), t.push(ze(r.end, e));
|
|
461
|
-
}), t;
|
|
462
|
-
}
|
|
463
|
-
var Ft = { exports: {} }, on = {};
|
|
464
|
-
var Dn;
|
|
465
|
-
function Yr() {
|
|
466
|
-
if (Dn) return on;
|
|
467
|
-
Dn = 1;
|
|
468
|
-
var n = Qe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
469
|
-
return on.c = function(e) {
|
|
407
|
+
var Ft = { exports: {} }, sn = {};
|
|
408
|
+
var Tn;
|
|
409
|
+
function Br() {
|
|
410
|
+
if (Tn) return sn;
|
|
411
|
+
Tn = 1;
|
|
412
|
+
var n = qe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
413
|
+
return sn.c = function(e) {
|
|
470
414
|
return n.H.useMemoCache(e);
|
|
471
|
-
},
|
|
415
|
+
}, sn;
|
|
472
416
|
}
|
|
473
|
-
var
|
|
474
|
-
var
|
|
475
|
-
function
|
|
476
|
-
return
|
|
477
|
-
var n =
|
|
478
|
-
|
|
417
|
+
var on = {};
|
|
418
|
+
var Pn;
|
|
419
|
+
function Yr() {
|
|
420
|
+
return Pn || (Pn = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
421
|
+
var n = qe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
422
|
+
on.c = function(e) {
|
|
479
423
|
var t = n.H;
|
|
480
424
|
return t === null && console.error(
|
|
481
425
|
`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,13 +429,13 @@ function Xr() {
|
|
|
485
429
|
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`
|
|
486
430
|
), t.useMemoCache(e);
|
|
487
431
|
};
|
|
488
|
-
})()),
|
|
432
|
+
})()), on;
|
|
489
433
|
}
|
|
490
|
-
var
|
|
491
|
-
function
|
|
492
|
-
return
|
|
434
|
+
var Dn;
|
|
435
|
+
function Xr() {
|
|
436
|
+
return Dn || (Dn = 1, process.env.NODE_ENV === "production" ? Ft.exports = Br() : Ft.exports = Yr()), Ft.exports;
|
|
493
437
|
}
|
|
494
|
-
var
|
|
438
|
+
var Pe = Xr();
|
|
495
439
|
function Gr(n) {
|
|
496
440
|
for (var e = [], t = 1; t < arguments.length; t++)
|
|
497
441
|
e[t - 1] = arguments[t];
|
|
@@ -501,11 +445,11 @@ function Gr(n) {
|
|
|
501
445
|
}).join(" ");
|
|
502
446
|
}).join(" ");
|
|
503
447
|
}
|
|
504
|
-
function
|
|
448
|
+
function fe(...n) {
|
|
505
449
|
return Gr(`${fn}-`, ...n);
|
|
506
450
|
}
|
|
507
|
-
const
|
|
508
|
-
const e =
|
|
451
|
+
const Kr = (n) => {
|
|
452
|
+
const e = Pe.c(11), {
|
|
509
453
|
isMoving: t,
|
|
510
454
|
movePositions: r,
|
|
511
455
|
assistPositions: s
|
|
@@ -516,20 +460,20 @@ const qr = (n) => {
|
|
|
516
460
|
let u;
|
|
517
461
|
e[5] !== s ? (u = s === void 0 ? [] : s, e[5] = s, e[6] = u) : u = e[6];
|
|
518
462
|
const l = u;
|
|
519
|
-
e[7] === Symbol.for("react.memo_cache_sentinel") ? (o =
|
|
463
|
+
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(qr), e[0] = t, e[1] = r, e[2] = s, e[3] = o, e[4] = i;
|
|
520
464
|
} else
|
|
521
465
|
o = e[3], i = e[4];
|
|
522
466
|
let c;
|
|
523
467
|
return e[8] !== o || e[9] !== i ? (c = /* @__PURE__ */ x.jsx("div", { className: o, children: i }), e[8] = o, e[9] = i, e[10] = c) : c = e[10], c;
|
|
524
468
|
};
|
|
525
|
-
function
|
|
526
|
-
return /* @__PURE__ */ x.jsx("div", { className:
|
|
469
|
+
function qr(n, e) {
|
|
470
|
+
return /* @__PURE__ */ x.jsx("div", { className: fe("snap-line"), style: {
|
|
527
471
|
left: n
|
|
528
472
|
} }, e);
|
|
529
473
|
}
|
|
530
|
-
const Vt = 1,
|
|
531
|
-
function
|
|
532
|
-
const e =
|
|
474
|
+
const Vt = 1, Ln = 10, On = 10;
|
|
475
|
+
function Jr(n) {
|
|
476
|
+
const e = Pe.c(7), t = ce(Number.MIN_SAFE_INTEGER), r = ce(Number.MAX_SAFE_INTEGER), s = ce(Vt), o = ce(void 0);
|
|
533
477
|
let i;
|
|
534
478
|
e[0] !== n ? (i = () => {
|
|
535
479
|
if (n?.current) {
|
|
@@ -545,25 +489,25 @@ function Zr(n) {
|
|
|
545
489
|
e[2] === Symbol.for("react.memo_cache_sentinel") ? (a = (v, p) => {
|
|
546
490
|
if (v.clientX >= r.current || v.clientX <= t.current) {
|
|
547
491
|
o.current !== void 0 && cancelAnimationFrame(o.current);
|
|
548
|
-
const
|
|
549
|
-
s.current = Math.min(Number((
|
|
550
|
-
const
|
|
551
|
-
p && p(
|
|
492
|
+
const R = Math.abs(v.clientX >= r.current ? v.clientX - r.current : v.clientX - t.current);
|
|
493
|
+
s.current = Math.min(Number((R / On).toFixed(0)) * Vt, Ln);
|
|
494
|
+
const S = (v.clientX >= r.current ? 1 : -1) * s.current, _ = () => {
|
|
495
|
+
p && p(S), o.current = requestAnimationFrame(_);
|
|
552
496
|
};
|
|
553
|
-
return o.current = requestAnimationFrame(
|
|
497
|
+
return o.current = requestAnimationFrame(_), !1;
|
|
554
498
|
} else
|
|
555
499
|
o.current !== void 0 && cancelAnimationFrame(o.current);
|
|
556
500
|
return !0;
|
|
557
501
|
}, e[2] = a) : a = e[2];
|
|
558
502
|
const u = a;
|
|
559
503
|
let l;
|
|
560
|
-
e[3] === Symbol.for("react.memo_cache_sentinel") ? (l = (v, p,
|
|
504
|
+
e[3] === Symbol.for("react.memo_cache_sentinel") ? (l = (v, p, R) => {
|
|
561
505
|
if (v.clientX >= r.current || v.clientX < t.current) {
|
|
562
506
|
o.current !== void 0 && cancelAnimationFrame(o.current);
|
|
563
507
|
const b = Math.abs(v.clientX >= r.current ? v.clientX - r.current : v.clientX - t.current);
|
|
564
|
-
s.current = Math.min(Number((b /
|
|
565
|
-
const
|
|
566
|
-
|
|
508
|
+
s.current = Math.min(Number((b / On).toFixed(0)) * Vt, Ln);
|
|
509
|
+
const _ = (v.clientX >= r.current ? 1 : -1) * s.current, P = () => {
|
|
510
|
+
R && R(_), o.current = requestAnimationFrame(P);
|
|
567
511
|
};
|
|
568
512
|
return o.current = requestAnimationFrame(P), !1;
|
|
569
513
|
} else
|
|
@@ -571,23 +515,23 @@ function Zr(n) {
|
|
|
571
515
|
return !0;
|
|
572
516
|
}, e[3] = l) : l = e[3];
|
|
573
517
|
const h = l;
|
|
574
|
-
let
|
|
575
|
-
e[4] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
518
|
+
let d;
|
|
519
|
+
e[4] === Symbol.for("react.memo_cache_sentinel") ? (d = () => {
|
|
576
520
|
t.current = Number.MIN_SAFE_INTEGER, r.current = Number.MAX_SAFE_INTEGER, s.current = Vt, o.current !== void 0 && cancelAnimationFrame(o.current);
|
|
577
|
-
}, e[4] =
|
|
578
|
-
const m =
|
|
579
|
-
let
|
|
580
|
-
return e[5] !== c ? (
|
|
521
|
+
}, e[4] = d) : d = e[4];
|
|
522
|
+
const m = d;
|
|
523
|
+
let w;
|
|
524
|
+
return e[5] !== c ? (w = {
|
|
581
525
|
initAutoScroll: c,
|
|
582
526
|
dealDragAutoScroll: u,
|
|
583
527
|
dealResizeAutoScroll: h,
|
|
584
528
|
stopAutoScroll: m
|
|
585
|
-
}, e[5] = c, e[6] =
|
|
529
|
+
}, e[5] = c, e[6] = w) : w = e[6], w;
|
|
586
530
|
}
|
|
587
|
-
function
|
|
531
|
+
function Zr(n, e, t) {
|
|
588
532
|
return Math.max(e, Math.min(n, t));
|
|
589
533
|
}
|
|
590
|
-
const
|
|
534
|
+
const de = {
|
|
591
535
|
toVector(n, e) {
|
|
592
536
|
return n === void 0 && (n = e), Array.isArray(n) ? n : [n, n];
|
|
593
537
|
},
|
|
@@ -604,17 +548,17 @@ const he = {
|
|
|
604
548
|
n[0] -= e[0], n[1] -= e[1];
|
|
605
549
|
}
|
|
606
550
|
};
|
|
607
|
-
function
|
|
551
|
+
function Mn(n, e, t) {
|
|
608
552
|
return e === 0 || Math.abs(e) === 1 / 0 ? Math.pow(n, t * 5) : n * e * t / (e + t * n);
|
|
609
553
|
}
|
|
610
|
-
function
|
|
611
|
-
return r === 0 ?
|
|
554
|
+
function Nn(n, e, t, r = 0.15) {
|
|
555
|
+
return r === 0 ? Zr(n, e, t) : n < e ? -Mn(e - n, t - e, r) + e : n > t ? +Mn(n - t, t - e, r) + t : n;
|
|
612
556
|
}
|
|
613
|
-
function
|
|
557
|
+
function Qr(n, [e, t], [r, s]) {
|
|
614
558
|
const [[o, i], [c, a]] = n;
|
|
615
|
-
return [
|
|
559
|
+
return [Nn(e, o, i, r), Nn(t, c, a, s)];
|
|
616
560
|
}
|
|
617
|
-
function
|
|
561
|
+
function es(n, e) {
|
|
618
562
|
if (typeof n != "object" || n === null) return n;
|
|
619
563
|
var t = n[Symbol.toPrimitive];
|
|
620
564
|
if (t !== void 0) {
|
|
@@ -624,19 +568,19 @@ function ts(n, e) {
|
|
|
624
568
|
}
|
|
625
569
|
return (e === "string" ? String : Number)(n);
|
|
626
570
|
}
|
|
627
|
-
function
|
|
628
|
-
var e =
|
|
571
|
+
function ts(n) {
|
|
572
|
+
var e = es(n, "string");
|
|
629
573
|
return typeof e == "symbol" ? e : String(e);
|
|
630
574
|
}
|
|
631
|
-
function
|
|
632
|
-
return e =
|
|
575
|
+
function Se(n, e, t) {
|
|
576
|
+
return e = ts(e), e in n ? Object.defineProperty(n, e, {
|
|
633
577
|
value: t,
|
|
634
578
|
enumerable: !0,
|
|
635
579
|
configurable: !0,
|
|
636
580
|
writable: !0
|
|
637
581
|
}) : n[e] = t, n;
|
|
638
582
|
}
|
|
639
|
-
function
|
|
583
|
+
function In(n, e) {
|
|
640
584
|
var t = Object.keys(n);
|
|
641
585
|
if (Object.getOwnPropertySymbols) {
|
|
642
586
|
var r = Object.getOwnPropertySymbols(n);
|
|
@@ -646,18 +590,18 @@ function kn(n, e) {
|
|
|
646
590
|
}
|
|
647
591
|
return t;
|
|
648
592
|
}
|
|
649
|
-
function
|
|
593
|
+
function te(n) {
|
|
650
594
|
for (var e = 1; e < arguments.length; e++) {
|
|
651
595
|
var t = arguments[e] != null ? arguments[e] : {};
|
|
652
|
-
e % 2 ?
|
|
653
|
-
|
|
654
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(t)) :
|
|
596
|
+
e % 2 ? In(Object(t), !0).forEach(function(r) {
|
|
597
|
+
Se(n, r, t[r]);
|
|
598
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(t)) : In(Object(t)).forEach(function(r) {
|
|
655
599
|
Object.defineProperty(n, r, Object.getOwnPropertyDescriptor(t, r));
|
|
656
600
|
});
|
|
657
601
|
}
|
|
658
602
|
return n;
|
|
659
603
|
}
|
|
660
|
-
const
|
|
604
|
+
const nr = {
|
|
661
605
|
pointer: {
|
|
662
606
|
start: "down",
|
|
663
607
|
change: "move",
|
|
@@ -679,63 +623,63 @@ const sr = {
|
|
|
679
623
|
end: "end"
|
|
680
624
|
}
|
|
681
625
|
};
|
|
682
|
-
function
|
|
626
|
+
function kn(n) {
|
|
683
627
|
return n ? n[0].toUpperCase() + n.slice(1) : "";
|
|
684
628
|
}
|
|
685
|
-
const
|
|
686
|
-
function
|
|
687
|
-
return n && !
|
|
629
|
+
const ns = ["enter", "leave"];
|
|
630
|
+
function rs(n = !1, e) {
|
|
631
|
+
return n && !ns.includes(e);
|
|
688
632
|
}
|
|
689
|
-
function
|
|
690
|
-
const r =
|
|
691
|
-
return "on" +
|
|
633
|
+
function ss(n, e = "", t = !1) {
|
|
634
|
+
const r = nr[n], s = r && r[e] || e;
|
|
635
|
+
return "on" + kn(n) + kn(s) + (rs(t, s) ? "Capture" : "");
|
|
692
636
|
}
|
|
693
|
-
const
|
|
694
|
-
function
|
|
637
|
+
const os = ["gotpointercapture", "lostpointercapture"];
|
|
638
|
+
function is(n) {
|
|
695
639
|
let e = n.substring(2).toLowerCase();
|
|
696
640
|
const t = !!~e.indexOf("passive");
|
|
697
641
|
t && (e = e.replace("passive", ""));
|
|
698
|
-
const r =
|
|
642
|
+
const r = os.includes(e) ? "capturecapture" : "capture", s = !!~e.indexOf(r);
|
|
699
643
|
return s && (e = e.replace("capture", "")), {
|
|
700
644
|
device: e,
|
|
701
645
|
capture: s,
|
|
702
646
|
passive: t
|
|
703
647
|
};
|
|
704
648
|
}
|
|
705
|
-
function
|
|
706
|
-
const t =
|
|
649
|
+
function cs(n, e = "") {
|
|
650
|
+
const t = nr[n], r = t && t[e] || e;
|
|
707
651
|
return n + r;
|
|
708
652
|
}
|
|
709
|
-
function
|
|
653
|
+
function Qt(n) {
|
|
710
654
|
return "touches" in n;
|
|
711
655
|
}
|
|
712
|
-
function
|
|
713
|
-
return
|
|
656
|
+
function rr(n) {
|
|
657
|
+
return Qt(n) ? "touch" : "pointerType" in n ? n.pointerType : "mouse";
|
|
714
658
|
}
|
|
715
|
-
function
|
|
659
|
+
function as(n) {
|
|
716
660
|
return Array.from(n.touches).filter((e) => {
|
|
717
661
|
var t, r;
|
|
718
662
|
return e.target === n.currentTarget || ((t = n.currentTarget) === null || t === void 0 || (r = t.contains) === null || r === void 0 ? void 0 : r.call(t, e.target));
|
|
719
663
|
});
|
|
720
664
|
}
|
|
721
|
-
function
|
|
665
|
+
function ls(n) {
|
|
722
666
|
return n.type === "touchend" || n.type === "touchcancel" ? n.changedTouches : n.targetTouches;
|
|
723
667
|
}
|
|
724
|
-
function
|
|
725
|
-
return
|
|
668
|
+
function sr(n) {
|
|
669
|
+
return Qt(n) ? ls(n)[0] : n;
|
|
726
670
|
}
|
|
727
|
-
function
|
|
728
|
-
return
|
|
671
|
+
function us(n) {
|
|
672
|
+
return as(n).map((e) => e.identifier);
|
|
729
673
|
}
|
|
730
|
-
function
|
|
731
|
-
const e =
|
|
732
|
-
return
|
|
674
|
+
function cn(n) {
|
|
675
|
+
const e = sr(n);
|
|
676
|
+
return Qt(n) ? e.identifier : e.pointerId;
|
|
733
677
|
}
|
|
734
|
-
function
|
|
735
|
-
const e =
|
|
678
|
+
function Wn(n) {
|
|
679
|
+
const e = sr(n);
|
|
736
680
|
return [e.clientX, e.clientY];
|
|
737
681
|
}
|
|
738
|
-
function
|
|
682
|
+
function fs(n) {
|
|
739
683
|
const e = {};
|
|
740
684
|
if ("buttons" in n && (e.buttons = n.buttons), "shiftKey" in n) {
|
|
741
685
|
const {
|
|
@@ -753,24 +697,24 @@ function ds(n) {
|
|
|
753
697
|
}
|
|
754
698
|
return e;
|
|
755
699
|
}
|
|
756
|
-
function
|
|
700
|
+
function Kt(n, ...e) {
|
|
757
701
|
return typeof n == "function" ? n(...e) : n;
|
|
758
702
|
}
|
|
759
|
-
function
|
|
703
|
+
function ds() {
|
|
760
704
|
}
|
|
761
|
-
function
|
|
762
|
-
return n.length === 0 ?
|
|
705
|
+
function hs(...n) {
|
|
706
|
+
return n.length === 0 ? ds : n.length === 1 ? n[0] : function() {
|
|
763
707
|
let e;
|
|
764
708
|
for (const t of n)
|
|
765
709
|
e = t.apply(this, arguments) || e;
|
|
766
710
|
return e;
|
|
767
711
|
};
|
|
768
712
|
}
|
|
769
|
-
function
|
|
713
|
+
function zn(n, e) {
|
|
770
714
|
return Object.assign({}, e, n || {});
|
|
771
715
|
}
|
|
772
|
-
const
|
|
773
|
-
class
|
|
716
|
+
const ms = 32;
|
|
717
|
+
class ps {
|
|
774
718
|
constructor(e, t, r) {
|
|
775
719
|
this.ctrl = e, this.args = t, this.key = r, this.state || (this.state = {}, this.computeValues([0, 0]), this.computeInitial(), this.init && this.init(), this.reset());
|
|
776
720
|
}
|
|
@@ -809,7 +753,7 @@ class gs {
|
|
|
809
753
|
}
|
|
810
754
|
start(e) {
|
|
811
755
|
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 ?
|
|
756
|
+
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
757
|
}
|
|
814
758
|
computeValues(e) {
|
|
815
759
|
const t = this.state;
|
|
@@ -827,9 +771,9 @@ class gs {
|
|
|
827
771
|
} = this;
|
|
828
772
|
t.args = this.args;
|
|
829
773
|
let o = 0;
|
|
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,
|
|
774
|
+
if (e && (t.event = e, r.preventDefault && e.cancelable && t.event.preventDefault(), t.type = e.type, s.touches = this.ctrl.pointerIds.size || this.ctrl.touchIds.size, s.locked = !!document.pointerLockElement, Object.assign(s, fs(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
775
|
const T = t._delta.map(Math.abs);
|
|
832
|
-
|
|
776
|
+
de.addTo(t._distance, T);
|
|
833
777
|
}
|
|
834
778
|
this.axisIntent && this.axisIntent(e);
|
|
835
779
|
const [i, c] = t._movement, [a, u] = r.threshold, {
|
|
@@ -837,28 +781,28 @@ class gs {
|
|
|
837
781
|
values: h
|
|
838
782
|
} = t;
|
|
839
783
|
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
|
-
const
|
|
784
|
+
const d = [0, 0];
|
|
841
785
|
if (r.hasCustomTransform) {
|
|
842
|
-
const [T,
|
|
843
|
-
|
|
786
|
+
const [T, D] = h;
|
|
787
|
+
d[0] = l[0] !== !1 ? T - l[0] : 0, d[1] = l[1] !== !1 ? D - l[1] : 0;
|
|
844
788
|
} else
|
|
845
|
-
|
|
846
|
-
this.restrictToAxis && !t._blocked && this.restrictToAxis(
|
|
847
|
-
const m = t.offset,
|
|
848
|
-
|
|
849
|
-
const [v, p] = t.offset, [[
|
|
850
|
-
t.overflow = [v <
|
|
789
|
+
d[0] = l[0] !== !1 ? i - l[0] : 0, d[1] = l[1] !== !1 ? c - l[1] : 0;
|
|
790
|
+
this.restrictToAxis && !t._blocked && this.restrictToAxis(d);
|
|
791
|
+
const m = t.offset, w = t._active && !t._blocked || t.active;
|
|
792
|
+
w && (t.first = t._active && !t.active, t.last = !t._active && t.active, t.active = s[this.ingKey] = t._active, e && (t.first && ("bounds" in r && (t._bounds = Kt(r.bounds, t)), this.setup && this.setup()), t.movement = d, this.computeOffset()));
|
|
793
|
+
const [v, p] = t.offset, [[R, b], [S, _]] = t._bounds;
|
|
794
|
+
t.overflow = [v < R ? -1 : v > b ? 1 : 0, p < S ? -1 : p > _ ? 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
795
|
const P = t._active ? r.rubberband || [0, 0] : [0, 0];
|
|
852
|
-
if (t.offset =
|
|
853
|
-
t.delta =
|
|
796
|
+
if (t.offset = Qr(t._bounds, t.offset, P), t.delta = de.sub(t.offset, m), this.computeMovement(), w && (!t.last || o > ms)) {
|
|
797
|
+
t.delta = de.sub(t.offset, m);
|
|
854
798
|
const T = t.delta.map(Math.abs);
|
|
855
|
-
|
|
799
|
+
de.addTo(t.distance, T), t.direction = t.delta.map(Math.sign), t._direction = t._delta.map(Math.sign), !t.first && o > 0 && (t.velocity = [T[0] / o, T[1] / o], t.timeDelta = o);
|
|
856
800
|
}
|
|
857
801
|
}
|
|
858
802
|
emit() {
|
|
859
803
|
const e = this.state, t = this.shared, r = this.config;
|
|
860
804
|
if (e._active || this.clean(), (e._blocked || !e.intentional) && !e._force && !r.triggerAllEvents) return;
|
|
861
|
-
const s = this.handler(
|
|
805
|
+
const s = this.handler(te(te(te({}, t), e), {}, {
|
|
862
806
|
[this.aliasKey]: e.values
|
|
863
807
|
}));
|
|
864
808
|
s !== void 0 && (e.memo = s);
|
|
@@ -867,16 +811,16 @@ class gs {
|
|
|
867
811
|
this.eventStore.clean(), this.timeoutStore.clean();
|
|
868
812
|
}
|
|
869
813
|
}
|
|
870
|
-
function
|
|
814
|
+
function gs([n, e], t) {
|
|
871
815
|
const r = Math.abs(n), s = Math.abs(e);
|
|
872
816
|
if (r > s && r > t)
|
|
873
817
|
return "x";
|
|
874
818
|
if (s > r && s > t)
|
|
875
819
|
return "y";
|
|
876
820
|
}
|
|
877
|
-
class
|
|
821
|
+
class vs extends ps {
|
|
878
822
|
constructor(...e) {
|
|
879
|
-
super(...e),
|
|
823
|
+
super(...e), Se(this, "aliasKey", "xy");
|
|
880
824
|
}
|
|
881
825
|
reset() {
|
|
882
826
|
super.reset(), this.state.axis = void 0;
|
|
@@ -885,16 +829,16 @@ class bs extends gs {
|
|
|
885
829
|
this.state.offset = [0, 0], this.state.lastOffset = [0, 0];
|
|
886
830
|
}
|
|
887
831
|
computeOffset() {
|
|
888
|
-
this.state.offset =
|
|
832
|
+
this.state.offset = de.add(this.state.lastOffset, this.state.movement);
|
|
889
833
|
}
|
|
890
834
|
computeMovement() {
|
|
891
|
-
this.state.movement =
|
|
835
|
+
this.state.movement = de.sub(this.state.offset, this.state.lastOffset);
|
|
892
836
|
}
|
|
893
837
|
axisIntent(e) {
|
|
894
838
|
const t = this.state, r = this.config;
|
|
895
839
|
if (!t.axis && e) {
|
|
896
|
-
const s = typeof r.axisThreshold == "object" ? r.axisThreshold[
|
|
897
|
-
t.axis =
|
|
840
|
+
const s = typeof r.axisThreshold == "object" ? r.axisThreshold[rr(e)] : r.axisThreshold;
|
|
841
|
+
t.axis = gs(t._movement, s);
|
|
898
842
|
}
|
|
899
843
|
t._blocked = (r.lockDirection || !!r.axis) && !t.axis || !!r.axis && r.axis !== t.axis;
|
|
900
844
|
}
|
|
@@ -910,12 +854,12 @@ class bs extends gs {
|
|
|
910
854
|
}
|
|
911
855
|
}
|
|
912
856
|
}
|
|
913
|
-
const
|
|
857
|
+
const jn = (n) => n, Fn = 0.15, bn = {
|
|
914
858
|
enabled(n = !0) {
|
|
915
859
|
return n;
|
|
916
860
|
},
|
|
917
861
|
eventOptions(n, e, t) {
|
|
918
|
-
return
|
|
862
|
+
return te(te({}, t.shared.eventOptions), n);
|
|
919
863
|
},
|
|
920
864
|
preventDefault(n = !1) {
|
|
921
865
|
return n;
|
|
@@ -926,30 +870,30 @@ const Fn = (n) => n, Vn = 0.15, bn = {
|
|
|
926
870
|
rubberband(n = 0) {
|
|
927
871
|
switch (n) {
|
|
928
872
|
case !0:
|
|
929
|
-
return [
|
|
873
|
+
return [Fn, Fn];
|
|
930
874
|
case !1:
|
|
931
875
|
return [0, 0];
|
|
932
876
|
default:
|
|
933
|
-
return
|
|
877
|
+
return de.toVector(n);
|
|
934
878
|
}
|
|
935
879
|
},
|
|
936
880
|
from(n) {
|
|
937
881
|
if (typeof n == "function") return n;
|
|
938
|
-
if (n != null) return
|
|
882
|
+
if (n != null) return de.toVector(n);
|
|
939
883
|
},
|
|
940
884
|
transform(n, e, t) {
|
|
941
885
|
const r = n || t.shared.transform;
|
|
942
886
|
if (this.hasCustomTransform = !!r, process.env.NODE_ENV === "development") {
|
|
943
|
-
const s = r ||
|
|
887
|
+
const s = r || jn;
|
|
944
888
|
return (o) => {
|
|
945
889
|
const i = s(o);
|
|
946
890
|
return (!isFinite(i[0]) || !isFinite(i[1])) && console.warn(`[@use-gesture]: config.transform() must produce a valid result, but it was: [${i[0]},${[1]}]`), i;
|
|
947
891
|
};
|
|
948
892
|
}
|
|
949
|
-
return r ||
|
|
893
|
+
return r || jn;
|
|
950
894
|
},
|
|
951
895
|
threshold(n) {
|
|
952
|
-
return
|
|
896
|
+
return de.toVector(n, 0);
|
|
953
897
|
}
|
|
954
898
|
};
|
|
955
899
|
process.env.NODE_ENV === "development" && Object.assign(bn, {
|
|
@@ -969,13 +913,13 @@ process.env.NODE_ENV === "development" && Object.assign(bn, {
|
|
|
969
913
|
return NaN;
|
|
970
914
|
}
|
|
971
915
|
});
|
|
972
|
-
const
|
|
916
|
+
const bs = 0, Nt = te(te({}, bn), {}, {
|
|
973
917
|
axis(n, e, {
|
|
974
918
|
axis: t
|
|
975
919
|
}) {
|
|
976
920
|
if (this.lockDirection = t === "lock", !this.lockDirection) return t;
|
|
977
921
|
},
|
|
978
|
-
axisThreshold(n =
|
|
922
|
+
axisThreshold(n = bs) {
|
|
979
923
|
return n;
|
|
980
924
|
},
|
|
981
925
|
bounds(n = {}) {
|
|
@@ -993,15 +937,15 @@ const _s = 0, Nt = Q(Q({}, bn), {}, {
|
|
|
993
937
|
} = n;
|
|
994
938
|
return [[e, t], [r, s]];
|
|
995
939
|
}
|
|
996
|
-
}),
|
|
940
|
+
}), Vn = {
|
|
997
941
|
ArrowRight: (n, e = 1) => [n * e, 0],
|
|
998
942
|
ArrowLeft: (n, e = 1) => [-1 * n * e, 0],
|
|
999
943
|
ArrowUp: (n, e = 1) => [0, -1 * n * e],
|
|
1000
944
|
ArrowDown: (n, e = 1) => [0, n * e]
|
|
1001
945
|
};
|
|
1002
|
-
class Ss extends
|
|
946
|
+
class Ss extends vs {
|
|
1003
947
|
constructor(...e) {
|
|
1004
|
-
super(...e),
|
|
948
|
+
super(...e), Se(this, "ingKey", "dragging");
|
|
1005
949
|
}
|
|
1006
950
|
reset() {
|
|
1007
951
|
super.reset();
|
|
@@ -1036,7 +980,7 @@ class Ss extends bs {
|
|
|
1036
980
|
const t = this.config, r = this.state;
|
|
1037
981
|
if (e.buttons != null && (Array.isArray(t.pointerButtons) ? !t.pointerButtons.includes(e.buttons) : t.pointerButtons !== -1 && t.pointerButtons !== e.buttons)) return;
|
|
1038
982
|
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 =
|
|
983
|
+
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(Wn(e)), this.computeInitial(), t.preventScrollAxis && rr(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
984
|
}
|
|
1041
985
|
startPointerDrag(e) {
|
|
1042
986
|
const t = this.state;
|
|
@@ -1045,10 +989,10 @@ class Ss extends bs {
|
|
|
1045
989
|
pointerMove(e) {
|
|
1046
990
|
const t = this.state, r = this.config;
|
|
1047
991
|
if (!t._pointerActive) return;
|
|
1048
|
-
const s =
|
|
992
|
+
const s = cn(e);
|
|
1049
993
|
if (t._pointerId !== void 0 && s !== t._pointerId) return;
|
|
1050
|
-
const o =
|
|
1051
|
-
if (document.pointerLockElement === e.target ? t._delta = [e.movementX, e.movementY] : (t._delta =
|
|
994
|
+
const o = Wn(e);
|
|
995
|
+
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
996
|
this.timeoutStore.remove("dragDelay"), t.active = !1, this.startPointerDrag(e);
|
|
1053
997
|
return;
|
|
1054
998
|
}
|
|
@@ -1074,17 +1018,17 @@ class Ss extends bs {
|
|
|
1074
1018
|
}
|
|
1075
1019
|
const t = this.state, r = this.config;
|
|
1076
1020
|
if (!t._active || !t._pointerActive) return;
|
|
1077
|
-
const s =
|
|
1021
|
+
const s = cn(e);
|
|
1078
1022
|
if (t._pointerId !== void 0 && s !== t._pointerId) return;
|
|
1079
1023
|
this.state._pointerActive = !1, this.setActive(), this.compute(e);
|
|
1080
1024
|
const [o, i] = t._distance;
|
|
1081
1025
|
if (t.tap = o <= r.tapsThreshold && i <= r.tapsThreshold, t.tap && r.filterTaps)
|
|
1082
1026
|
t._force = !0;
|
|
1083
1027
|
else {
|
|
1084
|
-
const [c, a] = t._delta, [u, l] = t._movement, [h,
|
|
1028
|
+
const [c, a] = t._delta, [u, l] = t._movement, [h, d] = r.swipe.velocity, [m, w] = r.swipe.distance, v = r.swipe.duration;
|
|
1085
1029
|
if (t.elapsedTime < v) {
|
|
1086
|
-
const p = Math.abs(c / t.timeDelta),
|
|
1087
|
-
p > h && Math.abs(u) > m && (t.swipe[0] = Math.sign(c)),
|
|
1030
|
+
const p = Math.abs(c / t.timeDelta), R = Math.abs(a / t.timeDelta);
|
|
1031
|
+
p > h && Math.abs(u) > m && (t.swipe[0] = Math.sign(c)), R > d && Math.abs(l) > w && (t.swipe[1] = Math.sign(a));
|
|
1088
1032
|
}
|
|
1089
1033
|
}
|
|
1090
1034
|
this.emit();
|
|
@@ -1111,7 +1055,7 @@ class Ss extends bs {
|
|
|
1111
1055
|
this.state._preventScroll && e.cancelable && e.preventDefault();
|
|
1112
1056
|
}
|
|
1113
1057
|
setupScrollPrevention(e) {
|
|
1114
|
-
this.state._preventScroll = !1,
|
|
1058
|
+
this.state._preventScroll = !1, _s(e);
|
|
1115
1059
|
const t = this.eventStore.add(this.sharedConfig.window, "touch", "change", this.preventScroll.bind(this), {
|
|
1116
1060
|
passive: !1
|
|
1117
1061
|
});
|
|
@@ -1123,14 +1067,14 @@ class Ss extends bs {
|
|
|
1123
1067
|
}, this.config.delay);
|
|
1124
1068
|
}
|
|
1125
1069
|
keyDown(e) {
|
|
1126
|
-
const t =
|
|
1070
|
+
const t = Vn[e.key];
|
|
1127
1071
|
if (t) {
|
|
1128
1072
|
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,
|
|
1073
|
+
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
1074
|
}
|
|
1131
1075
|
}
|
|
1132
1076
|
keyUp(e) {
|
|
1133
|
-
e.key in
|
|
1077
|
+
e.key in Vn && (this.state._keyboardActive = !1, this.setActive(), this.compute(e), this.emit());
|
|
1134
1078
|
}
|
|
1135
1079
|
bind(e) {
|
|
1136
1080
|
const t = this.config.device;
|
|
@@ -1140,23 +1084,23 @@ class Ss extends bs {
|
|
|
1140
1084
|
});
|
|
1141
1085
|
}
|
|
1142
1086
|
}
|
|
1143
|
-
function
|
|
1087
|
+
function _s(n) {
|
|
1144
1088
|
"persist" in n && typeof n.persist == "function" && n.persist();
|
|
1145
1089
|
}
|
|
1146
1090
|
const It = typeof window < "u" && window.document && window.document.createElement;
|
|
1147
|
-
function
|
|
1091
|
+
function or() {
|
|
1148
1092
|
return It && "ontouchstart" in window;
|
|
1149
1093
|
}
|
|
1150
|
-
function
|
|
1151
|
-
return
|
|
1094
|
+
function ws() {
|
|
1095
|
+
return or() || It && window.navigator.maxTouchPoints > 1;
|
|
1152
1096
|
}
|
|
1153
|
-
function
|
|
1097
|
+
function Es() {
|
|
1154
1098
|
return It && "onpointerdown" in window;
|
|
1155
1099
|
}
|
|
1156
|
-
function
|
|
1100
|
+
function ys() {
|
|
1157
1101
|
return It && "exitPointerLock" in window.document;
|
|
1158
1102
|
}
|
|
1159
|
-
function
|
|
1103
|
+
function xs() {
|
|
1160
1104
|
try {
|
|
1161
1105
|
return "constructor" in GestureEvent;
|
|
1162
1106
|
} catch {
|
|
@@ -1165,16 +1109,16 @@ function Rs() {
|
|
|
1165
1109
|
}
|
|
1166
1110
|
const we = {
|
|
1167
1111
|
isBrowser: It,
|
|
1168
|
-
gesture:
|
|
1169
|
-
touch:
|
|
1170
|
-
touchscreen:
|
|
1171
|
-
pointer:
|
|
1172
|
-
pointerLock:
|
|
1173
|
-
},
|
|
1112
|
+
gesture: xs(),
|
|
1113
|
+
touch: or(),
|
|
1114
|
+
touchscreen: ws(),
|
|
1115
|
+
pointer: Es(),
|
|
1116
|
+
pointerLock: ys()
|
|
1117
|
+
}, Rs = 250, Cs = 180, As = 0.5, Ts = 50, Ps = 250, Ds = 10, Un = {
|
|
1174
1118
|
mouse: 0,
|
|
1175
1119
|
touch: 0,
|
|
1176
1120
|
pen: 8
|
|
1177
|
-
},
|
|
1121
|
+
}, ir = te(te({}, Nt), {}, {
|
|
1178
1122
|
device(n, e, {
|
|
1179
1123
|
pointer: {
|
|
1180
1124
|
touch: t = !1,
|
|
@@ -1187,7 +1131,7 @@ const we = {
|
|
|
1187
1131
|
preventScrollAxis(n, e, {
|
|
1188
1132
|
preventScroll: t
|
|
1189
1133
|
}) {
|
|
1190
|
-
if (this.preventScrollDelay = typeof t == "number" ? t : t || t === void 0 && n ?
|
|
1134
|
+
if (this.preventScrollDelay = typeof t == "number" ? t : t || t === void 0 && n ? Rs : void 0, !(!we.touchscreen || t === !1))
|
|
1191
1135
|
return n || (t !== void 0 ? "y" : void 0);
|
|
1192
1136
|
},
|
|
1193
1137
|
pointerCapture(n, e, {
|
|
@@ -1204,24 +1148,24 @@ const we = {
|
|
|
1204
1148
|
tapsThreshold: r = 3,
|
|
1205
1149
|
axis: s = void 0
|
|
1206
1150
|
}) {
|
|
1207
|
-
const o =
|
|
1151
|
+
const o = de.toVector(n, t ? r : s ? 1 : 0);
|
|
1208
1152
|
return this.filterTaps = t, this.tapsThreshold = r, o;
|
|
1209
1153
|
},
|
|
1210
1154
|
swipe({
|
|
1211
|
-
velocity: n =
|
|
1212
|
-
distance: e =
|
|
1213
|
-
duration: t =
|
|
1155
|
+
velocity: n = As,
|
|
1156
|
+
distance: e = Ts,
|
|
1157
|
+
duration: t = Ps
|
|
1214
1158
|
} = {}) {
|
|
1215
1159
|
return {
|
|
1216
|
-
velocity: this.transform(
|
|
1217
|
-
distance: this.transform(
|
|
1160
|
+
velocity: this.transform(de.toVector(n)),
|
|
1161
|
+
distance: this.transform(de.toVector(e)),
|
|
1218
1162
|
duration: t
|
|
1219
1163
|
};
|
|
1220
1164
|
},
|
|
1221
1165
|
delay(n = 0) {
|
|
1222
1166
|
switch (n) {
|
|
1223
1167
|
case !0:
|
|
1224
|
-
return
|
|
1168
|
+
return Cs;
|
|
1225
1169
|
case !1:
|
|
1226
1170
|
return 0;
|
|
1227
1171
|
default:
|
|
@@ -1229,13 +1173,13 @@ const we = {
|
|
|
1229
1173
|
}
|
|
1230
1174
|
},
|
|
1231
1175
|
axisThreshold(n) {
|
|
1232
|
-
return n ?
|
|
1176
|
+
return n ? te(te({}, Un), n) : Un;
|
|
1233
1177
|
},
|
|
1234
|
-
keyboardDisplacement(n =
|
|
1178
|
+
keyboardDisplacement(n = Ds) {
|
|
1235
1179
|
return n;
|
|
1236
1180
|
}
|
|
1237
1181
|
});
|
|
1238
|
-
process.env.NODE_ENV === "development" && Object.assign(
|
|
1182
|
+
process.env.NODE_ENV === "development" && Object.assign(ir, {
|
|
1239
1183
|
useTouch(n) {
|
|
1240
1184
|
if (n !== void 0)
|
|
1241
1185
|
throw Error("[@use-gesture]: `useTouch` option has been renamed to `pointer.touch`. Use it as in `{ pointer: { touch: true } }`.");
|
|
@@ -1262,7 +1206,7 @@ process.env.NODE_ENV === "development" && Object.assign(ar, {
|
|
|
1262
1206
|
return NaN;
|
|
1263
1207
|
}
|
|
1264
1208
|
});
|
|
1265
|
-
|
|
1209
|
+
te(te({}, bn), {}, {
|
|
1266
1210
|
device(n, e, {
|
|
1267
1211
|
shared: t,
|
|
1268
1212
|
pointer: {
|
|
@@ -1281,13 +1225,13 @@ Q(Q({}, bn), {}, {
|
|
|
1281
1225
|
angleBounds: r = {}
|
|
1282
1226
|
}) {
|
|
1283
1227
|
const s = (i) => {
|
|
1284
|
-
const c =
|
|
1228
|
+
const c = zn(Kt(t, i), {
|
|
1285
1229
|
min: -1 / 0,
|
|
1286
1230
|
max: 1 / 0
|
|
1287
1231
|
});
|
|
1288
1232
|
return [c.min, c.max];
|
|
1289
1233
|
}, o = (i) => {
|
|
1290
|
-
const c =
|
|
1234
|
+
const c = zn(Kt(r, i), {
|
|
1291
1235
|
min: -1 / 0,
|
|
1292
1236
|
max: 1 / 0
|
|
1293
1237
|
});
|
|
@@ -1296,7 +1240,7 @@ Q(Q({}, bn), {}, {
|
|
|
1296
1240
|
return typeof t != "function" && typeof r != "function" ? [s(), o()] : (i) => [s(i), o(i)];
|
|
1297
1241
|
},
|
|
1298
1242
|
threshold(n, e, t) {
|
|
1299
|
-
return this.lockDirection = t.axis === "lock",
|
|
1243
|
+
return this.lockDirection = t.axis === "lock", de.toVector(n, this.lockDirection ? [0.1, 3] : 0);
|
|
1300
1244
|
},
|
|
1301
1245
|
modifierKey(n) {
|
|
1302
1246
|
return n === void 0 ? "ctrlKey" : n;
|
|
@@ -1305,31 +1249,31 @@ Q(Q({}, bn), {}, {
|
|
|
1305
1249
|
return n;
|
|
1306
1250
|
}
|
|
1307
1251
|
});
|
|
1308
|
-
|
|
1252
|
+
te(te({}, Nt), {}, {
|
|
1309
1253
|
mouseOnly: (n = !0) => n
|
|
1310
1254
|
});
|
|
1311
|
-
|
|
1255
|
+
te(te({}, Nt), {}, {
|
|
1312
1256
|
mouseOnly: (n = !0) => n
|
|
1313
1257
|
});
|
|
1314
|
-
const
|
|
1315
|
-
function
|
|
1316
|
-
|
|
1258
|
+
const cr = /* @__PURE__ */ new Map(), mn = /* @__PURE__ */ new Map();
|
|
1259
|
+
function Ls(n) {
|
|
1260
|
+
cr.set(n.key, n.engine), mn.set(n.key, n.resolver);
|
|
1317
1261
|
}
|
|
1318
|
-
const
|
|
1262
|
+
const Os = {
|
|
1319
1263
|
key: "drag",
|
|
1320
1264
|
engine: Ss,
|
|
1321
|
-
resolver:
|
|
1265
|
+
resolver: ir
|
|
1322
1266
|
};
|
|
1323
|
-
function
|
|
1267
|
+
function Ms(n, e) {
|
|
1324
1268
|
if (n == null) return {};
|
|
1325
1269
|
var t = {}, r = Object.keys(n), s, o;
|
|
1326
1270
|
for (o = 0; o < r.length; o++)
|
|
1327
1271
|
s = r[o], !(e.indexOf(s) >= 0) && (t[s] = n[s]);
|
|
1328
1272
|
return t;
|
|
1329
1273
|
}
|
|
1330
|
-
function
|
|
1274
|
+
function Ns(n, e) {
|
|
1331
1275
|
if (n == null) return {};
|
|
1332
|
-
var t =
|
|
1276
|
+
var t = Ms(n, e), r, s;
|
|
1333
1277
|
if (Object.getOwnPropertySymbols) {
|
|
1334
1278
|
var o = Object.getOwnPropertySymbols(n);
|
|
1335
1279
|
for (s = 0; s < o.length; s++)
|
|
@@ -1337,7 +1281,7 @@ function Is(n, e) {
|
|
|
1337
1281
|
}
|
|
1338
1282
|
return t;
|
|
1339
1283
|
}
|
|
1340
|
-
const
|
|
1284
|
+
const Is = {
|
|
1341
1285
|
target(n) {
|
|
1342
1286
|
if (n)
|
|
1343
1287
|
return () => "current" in n ? n.current : n;
|
|
@@ -1360,8 +1304,8 @@ const ks = {
|
|
|
1360
1304
|
transform(n) {
|
|
1361
1305
|
return n;
|
|
1362
1306
|
}
|
|
1363
|
-
},
|
|
1364
|
-
function
|
|
1307
|
+
}, ks = ["target", "eventOptions", "window", "enabled", "transform"];
|
|
1308
|
+
function $t(n = {}, e) {
|
|
1365
1309
|
const t = {};
|
|
1366
1310
|
for (const [r, s] of Object.entries(e))
|
|
1367
1311
|
switch (typeof s) {
|
|
@@ -1373,7 +1317,7 @@ function Ht(n = {}, e) {
|
|
|
1373
1317
|
t[r] = s.call(t, n[r], r, n);
|
|
1374
1318
|
break;
|
|
1375
1319
|
case "object":
|
|
1376
|
-
t[r] =
|
|
1320
|
+
t[r] = $t(n[r], s);
|
|
1377
1321
|
break;
|
|
1378
1322
|
case "boolean":
|
|
1379
1323
|
s && (t[r] = n[r]);
|
|
@@ -1381,30 +1325,30 @@ function Ht(n = {}, e) {
|
|
|
1381
1325
|
}
|
|
1382
1326
|
return t;
|
|
1383
1327
|
}
|
|
1384
|
-
function
|
|
1328
|
+
function Ws(n, e, t = {}) {
|
|
1385
1329
|
const r = n, {
|
|
1386
1330
|
target: s,
|
|
1387
1331
|
eventOptions: o,
|
|
1388
1332
|
window: i,
|
|
1389
1333
|
enabled: c,
|
|
1390
1334
|
transform: a
|
|
1391
|
-
} = r, u =
|
|
1392
|
-
if (t.shared =
|
|
1335
|
+
} = r, u = Ns(r, ks);
|
|
1336
|
+
if (t.shared = $t({
|
|
1393
1337
|
target: s,
|
|
1394
1338
|
eventOptions: o,
|
|
1395
1339
|
window: i,
|
|
1396
1340
|
enabled: c,
|
|
1397
1341
|
transform: a
|
|
1398
|
-
},
|
|
1342
|
+
}, Is), e) {
|
|
1399
1343
|
const l = mn.get(e);
|
|
1400
|
-
t[e] =
|
|
1344
|
+
t[e] = $t(te({
|
|
1401
1345
|
shared: t.shared
|
|
1402
1346
|
}, u), l);
|
|
1403
1347
|
} else
|
|
1404
1348
|
for (const l in u) {
|
|
1405
1349
|
const h = mn.get(l);
|
|
1406
1350
|
if (h)
|
|
1407
|
-
t[l] =
|
|
1351
|
+
t[l] = $t(te({
|
|
1408
1352
|
shared: t.shared
|
|
1409
1353
|
}, u[l]), h);
|
|
1410
1354
|
else if (process.env.NODE_ENV === "development" && !["drag", "pinch", "scroll", "wheel", "move", "hover"].includes(l)) {
|
|
@@ -1415,12 +1359,12 @@ function zs(n, e, t = {}) {
|
|
|
1415
1359
|
}
|
|
1416
1360
|
return t;
|
|
1417
1361
|
}
|
|
1418
|
-
class
|
|
1362
|
+
class ar {
|
|
1419
1363
|
constructor(e, t) {
|
|
1420
|
-
|
|
1364
|
+
Se(this, "_listeners", /* @__PURE__ */ new Set()), this._ctrl = e, this._gestureKey = t;
|
|
1421
1365
|
}
|
|
1422
1366
|
add(e, t, r, s, o) {
|
|
1423
|
-
const i = this._listeners, c =
|
|
1367
|
+
const i = this._listeners, c = cs(t, r), a = this._gestureKey ? this._ctrl.config[this._gestureKey].eventOptions : {}, u = te(te({}, a), o);
|
|
1424
1368
|
e.addEventListener(c, s, u);
|
|
1425
1369
|
const l = () => {
|
|
1426
1370
|
e.removeEventListener(c, s, u), i.delete(l);
|
|
@@ -1431,9 +1375,9 @@ class ur {
|
|
|
1431
1375
|
this._listeners.forEach((e) => e()), this._listeners.clear();
|
|
1432
1376
|
}
|
|
1433
1377
|
}
|
|
1434
|
-
class
|
|
1378
|
+
class zs {
|
|
1435
1379
|
constructor() {
|
|
1436
|
-
|
|
1380
|
+
Se(this, "_timeouts", /* @__PURE__ */ new Map());
|
|
1437
1381
|
}
|
|
1438
1382
|
add(e, t, r = 140, ...s) {
|
|
1439
1383
|
this.remove(e), this._timeouts.set(e, window.setTimeout(t, r, ...s));
|
|
@@ -1446,20 +1390,20 @@ class js {
|
|
|
1446
1390
|
this._timeouts.forEach((e) => void window.clearTimeout(e)), this._timeouts.clear();
|
|
1447
1391
|
}
|
|
1448
1392
|
}
|
|
1449
|
-
class
|
|
1393
|
+
class js {
|
|
1450
1394
|
constructor(e) {
|
|
1451
|
-
|
|
1395
|
+
Se(this, "gestures", /* @__PURE__ */ new Set()), Se(this, "_targetEventStore", new ar(this)), Se(this, "gestureEventStores", {}), Se(this, "gestureTimeoutStores", {}), Se(this, "handlers", {}), Se(this, "config", {}), Se(this, "pointerIds", /* @__PURE__ */ new Set()), Se(this, "touchIds", /* @__PURE__ */ new Set()), Se(this, "state", {
|
|
1452
1396
|
shared: {
|
|
1453
1397
|
shiftKey: !1,
|
|
1454
1398
|
metaKey: !1,
|
|
1455
1399
|
ctrlKey: !1,
|
|
1456
1400
|
altKey: !1
|
|
1457
1401
|
}
|
|
1458
|
-
}),
|
|
1402
|
+
}), Fs(this, e);
|
|
1459
1403
|
}
|
|
1460
1404
|
setEventIds(e) {
|
|
1461
|
-
if (
|
|
1462
|
-
return this.touchIds = new Set(
|
|
1405
|
+
if (Qt(e))
|
|
1406
|
+
return this.touchIds = new Set(us(e)), this.touchIds;
|
|
1463
1407
|
if ("pointerId" in e)
|
|
1464
1408
|
return e.type === "pointerup" || e.type === "pointercancel" ? this.pointerIds.delete(e.pointerId) : e.type === "pointerdown" && this.pointerIds.add(e.pointerId), this.pointerIds;
|
|
1465
1409
|
}
|
|
@@ -1467,7 +1411,7 @@ class Fs {
|
|
|
1467
1411
|
this.handlers = e, this.nativeHandlers = t;
|
|
1468
1412
|
}
|
|
1469
1413
|
applyConfig(e, t) {
|
|
1470
|
-
this.config =
|
|
1414
|
+
this.config = Ws(e, t, this.config);
|
|
1471
1415
|
}
|
|
1472
1416
|
clean() {
|
|
1473
1417
|
this._targetEventStore.clean();
|
|
@@ -1483,28 +1427,28 @@ class Fs {
|
|
|
1483
1427
|
if (!(t.target && (s = t.target(), !s))) {
|
|
1484
1428
|
if (t.enabled) {
|
|
1485
1429
|
for (const i of this.gestures) {
|
|
1486
|
-
const c = this.config[i], a =
|
|
1430
|
+
const c = this.config[i], a = $n(r, c.eventOptions, !!s);
|
|
1487
1431
|
if (c.enabled) {
|
|
1488
|
-
const u =
|
|
1432
|
+
const u = cr.get(i);
|
|
1489
1433
|
new u(this, e, i).bind(a);
|
|
1490
1434
|
}
|
|
1491
1435
|
}
|
|
1492
|
-
const o =
|
|
1436
|
+
const o = $n(r, t.eventOptions, !!s);
|
|
1493
1437
|
for (const i in this.nativeHandlers)
|
|
1494
|
-
o(i, "", (c) => this.nativeHandlers[i](
|
|
1438
|
+
o(i, "", (c) => this.nativeHandlers[i](te(te({}, this.state.shared), {}, {
|
|
1495
1439
|
event: c,
|
|
1496
1440
|
args: e
|
|
1497
1441
|
})), void 0, !0);
|
|
1498
1442
|
}
|
|
1499
1443
|
for (const o in r)
|
|
1500
|
-
r[o] =
|
|
1444
|
+
r[o] = hs(...r[o]);
|
|
1501
1445
|
if (!s) return r;
|
|
1502
1446
|
for (const o in r) {
|
|
1503
1447
|
const {
|
|
1504
1448
|
device: i,
|
|
1505
1449
|
capture: c,
|
|
1506
1450
|
passive: a
|
|
1507
|
-
} =
|
|
1451
|
+
} = is(o);
|
|
1508
1452
|
this._targetEventStore.add(s, i, "", r[o], {
|
|
1509
1453
|
capture: c,
|
|
1510
1454
|
passive: a
|
|
@@ -1513,56 +1457,56 @@ class Fs {
|
|
|
1513
1457
|
}
|
|
1514
1458
|
}
|
|
1515
1459
|
}
|
|
1516
|
-
function
|
|
1517
|
-
n.gestures.add(e), n.gestureEventStores[e] = new
|
|
1460
|
+
function Et(n, e) {
|
|
1461
|
+
n.gestures.add(e), n.gestureEventStores[e] = new ar(n, e), n.gestureTimeoutStores[e] = new zs();
|
|
1518
1462
|
}
|
|
1519
|
-
function
|
|
1520
|
-
e.drag &&
|
|
1463
|
+
function Fs(n, e) {
|
|
1464
|
+
e.drag && Et(n, "drag"), e.wheel && Et(n, "wheel"), e.scroll && Et(n, "scroll"), e.move && Et(n, "move"), e.pinch && Et(n, "pinch"), e.hover && Et(n, "hover");
|
|
1521
1465
|
}
|
|
1522
|
-
const
|
|
1466
|
+
const $n = (n, e, t) => (r, s, o, i = {}, c = !1) => {
|
|
1523
1467
|
var a, u;
|
|
1524
1468
|
const l = (a = i.capture) !== null && a !== void 0 ? a : e.capture, h = (u = i.passive) !== null && u !== void 0 ? u : e.passive;
|
|
1525
|
-
let
|
|
1526
|
-
t && h && (
|
|
1469
|
+
let d = c ? r : ss(r, s, l);
|
|
1470
|
+
t && h && (d += "Passive"), n[d] = n[d] || [], n[d].push(o);
|
|
1527
1471
|
};
|
|
1528
|
-
function
|
|
1529
|
-
const s =
|
|
1530
|
-
if (s.applyHandlers(n, r), s.applyConfig(e, t),
|
|
1472
|
+
function Vs(n, e = {}, t, r) {
|
|
1473
|
+
const s = qe.useMemo(() => new js(n), []);
|
|
1474
|
+
if (s.applyHandlers(n, r), s.applyConfig(e, t), qe.useEffect(s.effect.bind(s)), qe.useEffect(() => s.clean.bind(s), []), e.target === void 0)
|
|
1531
1475
|
return s.bind.bind(s);
|
|
1532
1476
|
}
|
|
1533
|
-
function
|
|
1534
|
-
return Os
|
|
1477
|
+
function an(n, e) {
|
|
1478
|
+
return Ls(Os), Vs({
|
|
1535
1479
|
drag: n
|
|
1536
1480
|
}, e || {}, "drag");
|
|
1537
1481
|
}
|
|
1538
|
-
function
|
|
1482
|
+
function Hn(n, e) {
|
|
1539
1483
|
if (typeof n == "function")
|
|
1540
1484
|
return n(e);
|
|
1541
1485
|
n != null && (n.current = e);
|
|
1542
1486
|
}
|
|
1543
|
-
function
|
|
1487
|
+
function lr(...n) {
|
|
1544
1488
|
return (e) => {
|
|
1545
1489
|
let t = !1;
|
|
1546
1490
|
const r = n.map((s) => {
|
|
1547
|
-
const o =
|
|
1491
|
+
const o = Hn(s, e);
|
|
1548
1492
|
return !t && typeof o == "function" && (t = !0), o;
|
|
1549
1493
|
});
|
|
1550
1494
|
if (t)
|
|
1551
1495
|
return () => {
|
|
1552
1496
|
for (let s = 0; s < r.length; s++) {
|
|
1553
1497
|
const o = r[s];
|
|
1554
|
-
typeof o == "function" ? o() :
|
|
1498
|
+
typeof o == "function" ? o() : Hn(n[s], null);
|
|
1555
1499
|
}
|
|
1556
1500
|
};
|
|
1557
1501
|
};
|
|
1558
1502
|
}
|
|
1559
|
-
function
|
|
1560
|
-
return g.useCallback(
|
|
1503
|
+
function Ze(...n) {
|
|
1504
|
+
return g.useCallback(lr(...n), n);
|
|
1561
1505
|
}
|
|
1562
1506
|
// @__NO_SIDE_EFFECTS__
|
|
1563
|
-
function
|
|
1564
|
-
const e = /* @__PURE__ */
|
|
1565
|
-
const { children: o, ...i } = r, c = g.Children.toArray(o), a = c.find(
|
|
1507
|
+
function ur(n) {
|
|
1508
|
+
const e = /* @__PURE__ */ $s(n), t = g.forwardRef((r, s) => {
|
|
1509
|
+
const { children: o, ...i } = r, c = g.Children.toArray(o), a = c.find(Bs);
|
|
1566
1510
|
if (a) {
|
|
1567
1511
|
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
1512
|
return /* @__PURE__ */ x.jsx(e, { ...i, ref: s, children: g.isValidElement(u) ? g.cloneElement(u, void 0, l) : null });
|
|
@@ -1571,24 +1515,24 @@ function dr(n) {
|
|
|
1571
1515
|
});
|
|
1572
1516
|
return t.displayName = `${n}.Slot`, t;
|
|
1573
1517
|
}
|
|
1574
|
-
var
|
|
1518
|
+
var Us = /* @__PURE__ */ ur("Slot");
|
|
1575
1519
|
// @__NO_SIDE_EFFECTS__
|
|
1576
|
-
function
|
|
1520
|
+
function $s(n) {
|
|
1577
1521
|
const e = g.forwardRef((t, r) => {
|
|
1578
1522
|
const { children: s, ...o } = t;
|
|
1579
1523
|
if (g.isValidElement(s)) {
|
|
1580
|
-
const i =
|
|
1581
|
-
return s.type !== g.Fragment && (c.ref = r ?
|
|
1524
|
+
const i = Xs(s), c = Ys(o, s.props);
|
|
1525
|
+
return s.type !== g.Fragment && (c.ref = r ? lr(r, i) : i), g.cloneElement(s, c);
|
|
1582
1526
|
}
|
|
1583
1527
|
return g.Children.count(s) > 1 ? g.Children.only(null) : null;
|
|
1584
1528
|
});
|
|
1585
1529
|
return e.displayName = `${n}.SlotClone`, e;
|
|
1586
1530
|
}
|
|
1587
|
-
var
|
|
1588
|
-
function
|
|
1589
|
-
return g.isValidElement(n) && typeof n.type == "function" && "__radixId" in n.type && n.type.__radixId ===
|
|
1531
|
+
var Hs = Symbol("radix.slottable");
|
|
1532
|
+
function Bs(n) {
|
|
1533
|
+
return g.isValidElement(n) && typeof n.type == "function" && "__radixId" in n.type && n.type.__radixId === Hs;
|
|
1590
1534
|
}
|
|
1591
|
-
function
|
|
1535
|
+
function Ys(n, e) {
|
|
1592
1536
|
const t = { ...e };
|
|
1593
1537
|
for (const r in e) {
|
|
1594
1538
|
const s = n[r], o = e[r];
|
|
@@ -1599,7 +1543,7 @@ function Xs(n, e) {
|
|
|
1599
1543
|
}
|
|
1600
1544
|
return { ...n, ...t };
|
|
1601
1545
|
}
|
|
1602
|
-
function
|
|
1546
|
+
function Xs(n) {
|
|
1603
1547
|
let e = Object.getOwnPropertyDescriptor(n.props, "ref")?.get, t = e && "isReactWarning" in e && e.isReactWarning;
|
|
1604
1548
|
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
1549
|
}
|
|
@@ -1622,25 +1566,25 @@ var Gs = [
|
|
|
1622
1566
|
"svg",
|
|
1623
1567
|
"ul"
|
|
1624
1568
|
], kt = Gs.reduce((n, e) => {
|
|
1625
|
-
const t = /* @__PURE__ */
|
|
1569
|
+
const t = /* @__PURE__ */ ur(`Primitive.${e}`), r = g.forwardRef((s, o) => {
|
|
1626
1570
|
const { asChild: i, ...c } = s, a = i ? t : e;
|
|
1627
1571
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ x.jsx(a, { ...c, ref: o });
|
|
1628
1572
|
});
|
|
1629
1573
|
return r.displayName = `Primitive.${e}`, { ...n, [e]: r };
|
|
1630
1574
|
}, {});
|
|
1631
|
-
function
|
|
1575
|
+
function Ks(n, e = []) {
|
|
1632
1576
|
let t = [];
|
|
1633
1577
|
function r(o, i) {
|
|
1634
1578
|
const c = g.createContext(i), a = t.length;
|
|
1635
1579
|
t = [...t, i];
|
|
1636
1580
|
const u = (h) => {
|
|
1637
|
-
const { scope:
|
|
1581
|
+
const { scope: d, children: m, ...w } = h, v = d?.[n]?.[a] || c, p = g.useMemo(() => w, Object.values(w));
|
|
1638
1582
|
return /* @__PURE__ */ x.jsx(v.Provider, { value: p, children: m });
|
|
1639
1583
|
};
|
|
1640
1584
|
u.displayName = o + "Provider";
|
|
1641
|
-
function l(h,
|
|
1642
|
-
const m =
|
|
1643
|
-
if (
|
|
1585
|
+
function l(h, d) {
|
|
1586
|
+
const m = d?.[n]?.[a] || c, w = g.useContext(m);
|
|
1587
|
+
if (w) return w;
|
|
1644
1588
|
if (i !== void 0) return i;
|
|
1645
1589
|
throw new Error(`\`${h}\` must be used within \`${o}\``);
|
|
1646
1590
|
}
|
|
@@ -1656,9 +1600,9 @@ function qs(n, e = []) {
|
|
|
1656
1600
|
);
|
|
1657
1601
|
};
|
|
1658
1602
|
};
|
|
1659
|
-
return s.scopeName = n, [r,
|
|
1603
|
+
return s.scopeName = n, [r, qs(s, ...e)];
|
|
1660
1604
|
}
|
|
1661
|
-
function
|
|
1605
|
+
function qs(...n) {
|
|
1662
1606
|
const e = n[0];
|
|
1663
1607
|
if (n.length === 1) return e;
|
|
1664
1608
|
const t = () => {
|
|
@@ -1676,7 +1620,7 @@ function Js(...n) {
|
|
|
1676
1620
|
};
|
|
1677
1621
|
return t.scopeName = e.scopeName, t;
|
|
1678
1622
|
}
|
|
1679
|
-
function
|
|
1623
|
+
function Je(n, e, { checkForDefaultPrevented: t = !0 } = {}) {
|
|
1680
1624
|
return function(s) {
|
|
1681
1625
|
if (n?.(s), t === !1 || !s.defaultPrevented)
|
|
1682
1626
|
return e?.(s);
|
|
@@ -1684,16 +1628,16 @@ function et(n, e, { checkForDefaultPrevented: t = !0 } = {}) {
|
|
|
1684
1628
|
}
|
|
1685
1629
|
var pn = globalThis?.document ? g.useLayoutEffect : () => {
|
|
1686
1630
|
};
|
|
1687
|
-
function
|
|
1631
|
+
function Js(n, e) {
|
|
1688
1632
|
return g.useReducer((t, r) => e[t][r] ?? t, n);
|
|
1689
1633
|
}
|
|
1690
1634
|
var Wt = (n) => {
|
|
1691
|
-
const { present: e, children: t } = n, r =
|
|
1635
|
+
const { present: e, children: t } = n, r = Zs(e), s = typeof t == "function" ? t({ present: r.isPresent }) : g.Children.only(t), o = Ze(r.ref, Qs(s));
|
|
1692
1636
|
return typeof t == "function" || r.isPresent ? g.cloneElement(s, { ref: o }) : null;
|
|
1693
1637
|
};
|
|
1694
1638
|
Wt.displayName = "Presence";
|
|
1695
|
-
function
|
|
1696
|
-
const [e, t] = g.useState(), r = g.useRef(null), s = g.useRef(n), o = g.useRef("none"), i = n ? "mounted" : "unmounted", [c, a] =
|
|
1639
|
+
function Zs(n) {
|
|
1640
|
+
const [e, t] = g.useState(), r = g.useRef(null), s = g.useRef(n), o = g.useRef("none"), i = n ? "mounted" : "unmounted", [c, a] = Js(i, {
|
|
1697
1641
|
mounted: {
|
|
1698
1642
|
UNMOUNT: "unmounted",
|
|
1699
1643
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -1712,8 +1656,8 @@ function Qs(n) {
|
|
|
1712
1656
|
}, [c]), pn(() => {
|
|
1713
1657
|
const u = r.current, l = s.current;
|
|
1714
1658
|
if (l !== n) {
|
|
1715
|
-
const
|
|
1716
|
-
n ? a("MOUNT") : m === "none" || u?.display === "none" ? a("UNMOUNT") : a(l &&
|
|
1659
|
+
const d = o.current, m = Ut(u);
|
|
1660
|
+
n ? a("MOUNT") : m === "none" || u?.display === "none" ? a("UNMOUNT") : a(l && d !== m ? "ANIMATION_OUT" : "UNMOUNT"), s.current = n;
|
|
1717
1661
|
}
|
|
1718
1662
|
}, [n, a]), pn(() => {
|
|
1719
1663
|
if (e) {
|
|
@@ -1726,11 +1670,11 @@ function Qs(n) {
|
|
|
1726
1670
|
e.style.animationFillMode === "forwards" && (e.style.animationFillMode = p);
|
|
1727
1671
|
});
|
|
1728
1672
|
}
|
|
1729
|
-
},
|
|
1673
|
+
}, d = (m) => {
|
|
1730
1674
|
m.target === e && (o.current = Ut(r.current));
|
|
1731
1675
|
};
|
|
1732
|
-
return e.addEventListener("animationstart",
|
|
1733
|
-
l.clearTimeout(u), e.removeEventListener("animationstart",
|
|
1676
|
+
return e.addEventListener("animationstart", d), e.addEventListener("animationcancel", h), e.addEventListener("animationend", h), () => {
|
|
1677
|
+
l.clearTimeout(u), e.removeEventListener("animationstart", d), e.removeEventListener("animationcancel", h), e.removeEventListener("animationend", h);
|
|
1734
1678
|
};
|
|
1735
1679
|
} else
|
|
1736
1680
|
a("ANIMATION_END");
|
|
@@ -1744,28 +1688,28 @@ function Qs(n) {
|
|
|
1744
1688
|
function Ut(n) {
|
|
1745
1689
|
return n?.animationName || "none";
|
|
1746
1690
|
}
|
|
1747
|
-
function
|
|
1691
|
+
function Qs(n) {
|
|
1748
1692
|
let e = Object.getOwnPropertyDescriptor(n.props, "ref")?.get, t = e && "isReactWarning" in e && e.isReactWarning;
|
|
1749
1693
|
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);
|
|
1750
1694
|
}
|
|
1751
|
-
var
|
|
1752
|
-
function
|
|
1753
|
-
const e = g.useContext(
|
|
1695
|
+
var eo = g.createContext(void 0);
|
|
1696
|
+
function to(n) {
|
|
1697
|
+
const e = g.useContext(eo);
|
|
1754
1698
|
return n || e || "ltr";
|
|
1755
1699
|
}
|
|
1756
|
-
function
|
|
1700
|
+
function Ke(n) {
|
|
1757
1701
|
const e = g.useRef(n);
|
|
1758
1702
|
return g.useEffect(() => {
|
|
1759
1703
|
e.current = n;
|
|
1760
1704
|
}), g.useMemo(() => (...t) => e.current?.(...t), []);
|
|
1761
1705
|
}
|
|
1762
|
-
function
|
|
1706
|
+
function no(n, [e, t]) {
|
|
1763
1707
|
return Math.min(t, Math.max(e, n));
|
|
1764
1708
|
}
|
|
1765
|
-
function
|
|
1709
|
+
function ro(n, e) {
|
|
1766
1710
|
return g.useReducer((t, r) => e[t][r] ?? t, n);
|
|
1767
1711
|
}
|
|
1768
|
-
var
|
|
1712
|
+
var Sn = "ScrollArea", [fr] = Ks(Sn), [so, Ee] = fr(Sn), dr = g.forwardRef(
|
|
1769
1713
|
(n, e) => {
|
|
1770
1714
|
const {
|
|
1771
1715
|
__scopeScrollArea: t,
|
|
@@ -1773,9 +1717,9 @@ var _n = "ScrollArea", [hr] = qs(_n), [oo, Ee] = hr(_n), mr = g.forwardRef(
|
|
|
1773
1717
|
dir: s,
|
|
1774
1718
|
scrollHideDelay: o = 600,
|
|
1775
1719
|
...i
|
|
1776
|
-
} = n, [c, a] = g.useState(null), [u, l] = g.useState(null), [h,
|
|
1720
|
+
} = n, [c, a] = g.useState(null), [u, l] = g.useState(null), [h, d] = g.useState(null), [m, w] = g.useState(null), [v, p] = g.useState(null), [R, b] = g.useState(0), [S, _] = g.useState(0), [P, T] = g.useState(!1), [D, U] = g.useState(!1), O = Ze(e, (z) => a(z)), W = to(s);
|
|
1777
1721
|
return /* @__PURE__ */ x.jsx(
|
|
1778
|
-
|
|
1722
|
+
so,
|
|
1779
1723
|
{
|
|
1780
1724
|
scope: t,
|
|
1781
1725
|
type: r,
|
|
@@ -1785,28 +1729,28 @@ var _n = "ScrollArea", [hr] = qs(_n), [oo, Ee] = hr(_n), mr = g.forwardRef(
|
|
|
1785
1729
|
viewport: u,
|
|
1786
1730
|
onViewportChange: l,
|
|
1787
1731
|
content: h,
|
|
1788
|
-
onContentChange:
|
|
1732
|
+
onContentChange: d,
|
|
1789
1733
|
scrollbarX: m,
|
|
1790
|
-
onScrollbarXChange:
|
|
1734
|
+
onScrollbarXChange: w,
|
|
1791
1735
|
scrollbarXEnabled: P,
|
|
1792
1736
|
onScrollbarXEnabledChange: T,
|
|
1793
1737
|
scrollbarY: v,
|
|
1794
1738
|
onScrollbarYChange: p,
|
|
1795
|
-
scrollbarYEnabled:
|
|
1796
|
-
onScrollbarYEnabledChange:
|
|
1739
|
+
scrollbarYEnabled: D,
|
|
1740
|
+
onScrollbarYEnabledChange: U,
|
|
1797
1741
|
onCornerWidthChange: b,
|
|
1798
|
-
onCornerHeightChange:
|
|
1742
|
+
onCornerHeightChange: _,
|
|
1799
1743
|
children: /* @__PURE__ */ x.jsx(
|
|
1800
1744
|
kt.div,
|
|
1801
1745
|
{
|
|
1802
1746
|
dir: W,
|
|
1803
1747
|
...i,
|
|
1804
|
-
ref:
|
|
1748
|
+
ref: O,
|
|
1805
1749
|
style: {
|
|
1806
1750
|
position: "relative",
|
|
1807
1751
|
// Pass corner sizes as CSS vars to reduce re-renders of context consumers
|
|
1808
|
-
"--radix-scroll-area-corner-width":
|
|
1809
|
-
"--radix-scroll-area-corner-height":
|
|
1752
|
+
"--radix-scroll-area-corner-width": R + "px",
|
|
1753
|
+
"--radix-scroll-area-corner-height": S + "px",
|
|
1810
1754
|
...n.style
|
|
1811
1755
|
}
|
|
1812
1756
|
}
|
|
@@ -1815,10 +1759,10 @@ var _n = "ScrollArea", [hr] = qs(_n), [oo, Ee] = hr(_n), mr = g.forwardRef(
|
|
|
1815
1759
|
);
|
|
1816
1760
|
}
|
|
1817
1761
|
);
|
|
1818
|
-
|
|
1819
|
-
var
|
|
1762
|
+
dr.displayName = Sn;
|
|
1763
|
+
var hr = "ScrollAreaViewport", mr = g.forwardRef(
|
|
1820
1764
|
(n, e) => {
|
|
1821
|
-
const { __scopeScrollArea: t, children: r, nonce: s, ...o } = n, i = Ee(
|
|
1765
|
+
const { __scopeScrollArea: t, children: r, nonce: s, ...o } = n, i = Ee(hr, t), c = g.useRef(null), a = Ze(e, c, i.onViewportChange);
|
|
1822
1766
|
return /* @__PURE__ */ x.jsxs(x.Fragment, { children: [
|
|
1823
1767
|
/* @__PURE__ */ x.jsx(
|
|
1824
1768
|
"style",
|
|
@@ -1857,18 +1801,18 @@ var pr = "ScrollAreaViewport", gr = g.forwardRef(
|
|
|
1857
1801
|
] });
|
|
1858
1802
|
}
|
|
1859
1803
|
);
|
|
1860
|
-
|
|
1861
|
-
var
|
|
1804
|
+
mr.displayName = hr;
|
|
1805
|
+
var De = "ScrollAreaScrollbar", pr = g.forwardRef(
|
|
1862
1806
|
(n, e) => {
|
|
1863
|
-
const { forceMount: t, ...r } = n, s = Ee(
|
|
1807
|
+
const { forceMount: t, ...r } = n, s = Ee(De, n.__scopeScrollArea), { onScrollbarXEnabledChange: o, onScrollbarYEnabledChange: i } = s, c = n.orientation === "horizontal";
|
|
1864
1808
|
return g.useEffect(() => (c ? o(!0) : i(!0), () => {
|
|
1865
1809
|
c ? o(!1) : i(!1);
|
|
1866
|
-
}), [c, o, i]), s.type === "hover" ? /* @__PURE__ */ x.jsx(
|
|
1810
|
+
}), [c, o, i]), s.type === "hover" ? /* @__PURE__ */ x.jsx(oo, { ...r, ref: e, forceMount: t }) : s.type === "scroll" ? /* @__PURE__ */ x.jsx(io, { ...r, ref: e, forceMount: t }) : s.type === "auto" ? /* @__PURE__ */ x.jsx(gr, { ...r, ref: e, forceMount: t }) : s.type === "always" ? /* @__PURE__ */ x.jsx(_n, { ...r, ref: e }) : null;
|
|
1867
1811
|
}
|
|
1868
1812
|
);
|
|
1869
|
-
|
|
1870
|
-
var
|
|
1871
|
-
const { forceMount: t, ...r } = n, s = Ee(
|
|
1813
|
+
pr.displayName = De;
|
|
1814
|
+
var oo = g.forwardRef((n, e) => {
|
|
1815
|
+
const { forceMount: t, ...r } = n, s = Ee(De, n.__scopeScrollArea), [o, i] = g.useState(!1);
|
|
1872
1816
|
return g.useEffect(() => {
|
|
1873
1817
|
const c = s.scrollArea;
|
|
1874
1818
|
let a = 0;
|
|
@@ -1883,15 +1827,15 @@ var io = g.forwardRef((n, e) => {
|
|
|
1883
1827
|
};
|
|
1884
1828
|
}
|
|
1885
1829
|
}, [s.scrollArea, s.scrollHideDelay]), /* @__PURE__ */ x.jsx(Wt, { present: t || o, children: /* @__PURE__ */ x.jsx(
|
|
1886
|
-
|
|
1830
|
+
gr,
|
|
1887
1831
|
{
|
|
1888
1832
|
"data-state": o ? "visible" : "hidden",
|
|
1889
1833
|
...r,
|
|
1890
1834
|
ref: e
|
|
1891
1835
|
}
|
|
1892
1836
|
) });
|
|
1893
|
-
}),
|
|
1894
|
-
const { forceMount: t, ...r } = n, s = Ee(
|
|
1837
|
+
}), io = g.forwardRef((n, e) => {
|
|
1838
|
+
const { forceMount: t, ...r } = n, s = Ee(De, n.__scopeScrollArea), o = n.orientation === "horizontal", i = tn(() => a("SCROLL_END"), 100), [c, a] = ro("hidden", {
|
|
1895
1839
|
hidden: {
|
|
1896
1840
|
SCROLL: "scrolling"
|
|
1897
1841
|
},
|
|
@@ -1918,97 +1862,97 @@ var io = g.forwardRef((n, e) => {
|
|
|
1918
1862
|
const u = s.viewport, l = o ? "scrollLeft" : "scrollTop";
|
|
1919
1863
|
if (u) {
|
|
1920
1864
|
let h = u[l];
|
|
1921
|
-
const
|
|
1865
|
+
const d = () => {
|
|
1922
1866
|
const m = u[l];
|
|
1923
1867
|
h !== m && (a("SCROLL"), i()), h = m;
|
|
1924
1868
|
};
|
|
1925
|
-
return u.addEventListener("scroll",
|
|
1869
|
+
return u.addEventListener("scroll", d), () => u.removeEventListener("scroll", d);
|
|
1926
1870
|
}
|
|
1927
1871
|
}, [s.viewport, o, a, i]), /* @__PURE__ */ x.jsx(Wt, { present: t || c !== "hidden", children: /* @__PURE__ */ x.jsx(
|
|
1928
|
-
|
|
1872
|
+
_n,
|
|
1929
1873
|
{
|
|
1930
1874
|
"data-state": c === "hidden" ? "hidden" : "visible",
|
|
1931
1875
|
...r,
|
|
1932
1876
|
ref: e,
|
|
1933
|
-
onPointerEnter:
|
|
1934
|
-
onPointerLeave:
|
|
1877
|
+
onPointerEnter: Je(n.onPointerEnter, () => a("POINTER_ENTER")),
|
|
1878
|
+
onPointerLeave: Je(n.onPointerLeave, () => a("POINTER_LEAVE"))
|
|
1935
1879
|
}
|
|
1936
1880
|
) });
|
|
1937
|
-
}),
|
|
1938
|
-
const t = Ee(
|
|
1881
|
+
}), gr = g.forwardRef((n, e) => {
|
|
1882
|
+
const t = Ee(De, n.__scopeScrollArea), { forceMount: r, ...s } = n, [o, i] = g.useState(!1), c = n.orientation === "horizontal", a = tn(() => {
|
|
1939
1883
|
if (t.viewport) {
|
|
1940
1884
|
const u = t.viewport.offsetWidth < t.viewport.scrollWidth, l = t.viewport.offsetHeight < t.viewport.scrollHeight;
|
|
1941
1885
|
i(c ? u : l);
|
|
1942
1886
|
}
|
|
1943
1887
|
}, 10);
|
|
1944
|
-
return
|
|
1945
|
-
|
|
1888
|
+
return Tt(t.viewport, a), Tt(t.content, a), /* @__PURE__ */ x.jsx(Wt, { present: r || o, children: /* @__PURE__ */ x.jsx(
|
|
1889
|
+
_n,
|
|
1946
1890
|
{
|
|
1947
1891
|
"data-state": o ? "visible" : "hidden",
|
|
1948
1892
|
...s,
|
|
1949
1893
|
ref: e
|
|
1950
1894
|
}
|
|
1951
1895
|
) });
|
|
1952
|
-
}),
|
|
1953
|
-
const { orientation: t = "vertical", ...r } = n, s = Ee(
|
|
1896
|
+
}), _n = g.forwardRef((n, e) => {
|
|
1897
|
+
const { orientation: t = "vertical", ...r } = n, s = Ee(De, n.__scopeScrollArea), o = g.useRef(null), i = g.useRef(0), [c, a] = g.useState({
|
|
1954
1898
|
content: 0,
|
|
1955
1899
|
viewport: 0,
|
|
1956
1900
|
scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 }
|
|
1957
|
-
}), u =
|
|
1901
|
+
}), u = wr(c.viewport, c.content), l = {
|
|
1958
1902
|
...r,
|
|
1959
1903
|
sizes: c,
|
|
1960
1904
|
onSizesChange: a,
|
|
1961
1905
|
hasThumb: u > 0 && u < 1,
|
|
1962
|
-
onThumbChange: (
|
|
1906
|
+
onThumbChange: (d) => o.current = d,
|
|
1963
1907
|
onThumbPointerUp: () => i.current = 0,
|
|
1964
|
-
onThumbPointerDown: (
|
|
1908
|
+
onThumbPointerDown: (d) => i.current = d
|
|
1965
1909
|
};
|
|
1966
|
-
function h(
|
|
1967
|
-
return
|
|
1910
|
+
function h(d, m) {
|
|
1911
|
+
return ho(d, i.current, c, m);
|
|
1968
1912
|
}
|
|
1969
1913
|
return t === "horizontal" ? /* @__PURE__ */ x.jsx(
|
|
1970
|
-
|
|
1914
|
+
co,
|
|
1971
1915
|
{
|
|
1972
1916
|
...l,
|
|
1973
1917
|
ref: e,
|
|
1974
1918
|
onThumbPositionChange: () => {
|
|
1975
1919
|
if (s.viewport && o.current) {
|
|
1976
|
-
const
|
|
1920
|
+
const d = s.viewport.scrollLeft, m = Bn(d, c, s.dir);
|
|
1977
1921
|
o.current.style.transform = `translate3d(${m}px, 0, 0)`;
|
|
1978
1922
|
}
|
|
1979
1923
|
},
|
|
1980
|
-
onWheelScroll: (
|
|
1981
|
-
s.viewport && (s.viewport.scrollLeft =
|
|
1924
|
+
onWheelScroll: (d) => {
|
|
1925
|
+
s.viewport && (s.viewport.scrollLeft = d);
|
|
1982
1926
|
},
|
|
1983
|
-
onDragScroll: (
|
|
1984
|
-
s.viewport && (s.viewport.scrollLeft = h(
|
|
1927
|
+
onDragScroll: (d) => {
|
|
1928
|
+
s.viewport && (s.viewport.scrollLeft = h(d, s.dir));
|
|
1985
1929
|
}
|
|
1986
1930
|
}
|
|
1987
1931
|
) : t === "vertical" ? /* @__PURE__ */ x.jsx(
|
|
1988
|
-
|
|
1932
|
+
ao,
|
|
1989
1933
|
{
|
|
1990
1934
|
...l,
|
|
1991
1935
|
ref: e,
|
|
1992
1936
|
onThumbPositionChange: () => {
|
|
1993
1937
|
if (s.viewport && o.current) {
|
|
1994
|
-
const
|
|
1938
|
+
const d = s.viewport.scrollTop, m = Bn(d, c);
|
|
1995
1939
|
o.current.style.transform = `translate3d(0, ${m}px, 0)`;
|
|
1996
1940
|
}
|
|
1997
1941
|
},
|
|
1998
|
-
onWheelScroll: (
|
|
1999
|
-
s.viewport && (s.viewport.scrollTop =
|
|
1942
|
+
onWheelScroll: (d) => {
|
|
1943
|
+
s.viewport && (s.viewport.scrollTop = d);
|
|
2000
1944
|
},
|
|
2001
|
-
onDragScroll: (
|
|
2002
|
-
s.viewport && (s.viewport.scrollTop = h(
|
|
1945
|
+
onDragScroll: (d) => {
|
|
1946
|
+
s.viewport && (s.viewport.scrollTop = h(d));
|
|
2003
1947
|
}
|
|
2004
1948
|
}
|
|
2005
1949
|
) : null;
|
|
2006
|
-
}),
|
|
2007
|
-
const { sizes: t, onSizesChange: r, ...s } = n, o = Ee(
|
|
1950
|
+
}), co = g.forwardRef((n, e) => {
|
|
1951
|
+
const { sizes: t, onSizesChange: r, ...s } = n, o = Ee(De, n.__scopeScrollArea), [i, c] = g.useState(), a = g.useRef(null), u = Ze(e, a, o.onScrollbarXChange);
|
|
2008
1952
|
return g.useEffect(() => {
|
|
2009
1953
|
a.current && c(getComputedStyle(a.current));
|
|
2010
1954
|
}, [a]), /* @__PURE__ */ x.jsx(
|
|
2011
|
-
|
|
1955
|
+
br,
|
|
2012
1956
|
{
|
|
2013
1957
|
"data-orientation": "horizontal",
|
|
2014
1958
|
...s,
|
|
@@ -2018,15 +1962,15 @@ var io = g.forwardRef((n, e) => {
|
|
|
2018
1962
|
bottom: 0,
|
|
2019
1963
|
left: o.dir === "rtl" ? "var(--radix-scroll-area-corner-width)" : 0,
|
|
2020
1964
|
right: o.dir === "ltr" ? "var(--radix-scroll-area-corner-width)" : 0,
|
|
2021
|
-
"--radix-scroll-area-thumb-width":
|
|
1965
|
+
"--radix-scroll-area-thumb-width": en(t) + "px",
|
|
2022
1966
|
...n.style
|
|
2023
1967
|
},
|
|
2024
1968
|
onThumbPointerDown: (l) => n.onThumbPointerDown(l.x),
|
|
2025
1969
|
onDragScroll: (l) => n.onDragScroll(l.x),
|
|
2026
1970
|
onWheelScroll: (l, h) => {
|
|
2027
1971
|
if (o.viewport) {
|
|
2028
|
-
const
|
|
2029
|
-
n.onWheelScroll(
|
|
1972
|
+
const d = o.viewport.scrollLeft + l.deltaX;
|
|
1973
|
+
n.onWheelScroll(d), yr(d, h) && l.preventDefault();
|
|
2030
1974
|
}
|
|
2031
1975
|
},
|
|
2032
1976
|
onResize: () => {
|
|
@@ -2035,19 +1979,19 @@ var io = g.forwardRef((n, e) => {
|
|
|
2035
1979
|
viewport: o.viewport.offsetWidth,
|
|
2036
1980
|
scrollbar: {
|
|
2037
1981
|
size: a.current.clientWidth,
|
|
2038
|
-
paddingStart:
|
|
2039
|
-
paddingEnd:
|
|
1982
|
+
paddingStart: Jt(i.paddingLeft),
|
|
1983
|
+
paddingEnd: Jt(i.paddingRight)
|
|
2040
1984
|
}
|
|
2041
1985
|
});
|
|
2042
1986
|
}
|
|
2043
1987
|
}
|
|
2044
1988
|
);
|
|
2045
|
-
}),
|
|
2046
|
-
const { sizes: t, onSizesChange: r, ...s } = n, o = Ee(
|
|
1989
|
+
}), ao = g.forwardRef((n, e) => {
|
|
1990
|
+
const { sizes: t, onSizesChange: r, ...s } = n, o = Ee(De, n.__scopeScrollArea), [i, c] = g.useState(), a = g.useRef(null), u = Ze(e, a, o.onScrollbarYChange);
|
|
2047
1991
|
return g.useEffect(() => {
|
|
2048
1992
|
a.current && c(getComputedStyle(a.current));
|
|
2049
1993
|
}, [a]), /* @__PURE__ */ x.jsx(
|
|
2050
|
-
|
|
1994
|
+
br,
|
|
2051
1995
|
{
|
|
2052
1996
|
"data-orientation": "vertical",
|
|
2053
1997
|
...s,
|
|
@@ -2058,15 +2002,15 @@ var io = g.forwardRef((n, e) => {
|
|
|
2058
2002
|
right: o.dir === "ltr" ? 0 : void 0,
|
|
2059
2003
|
left: o.dir === "rtl" ? 0 : void 0,
|
|
2060
2004
|
bottom: "var(--radix-scroll-area-corner-height)",
|
|
2061
|
-
"--radix-scroll-area-thumb-height":
|
|
2005
|
+
"--radix-scroll-area-thumb-height": en(t) + "px",
|
|
2062
2006
|
...n.style
|
|
2063
2007
|
},
|
|
2064
2008
|
onThumbPointerDown: (l) => n.onThumbPointerDown(l.y),
|
|
2065
2009
|
onDragScroll: (l) => n.onDragScroll(l.y),
|
|
2066
2010
|
onWheelScroll: (l, h) => {
|
|
2067
2011
|
if (o.viewport) {
|
|
2068
|
-
const
|
|
2069
|
-
n.onWheelScroll(
|
|
2012
|
+
const d = o.viewport.scrollTop + l.deltaY;
|
|
2013
|
+
n.onWheelScroll(d), yr(d, h) && l.preventDefault();
|
|
2070
2014
|
}
|
|
2071
2015
|
},
|
|
2072
2016
|
onResize: () => {
|
|
@@ -2075,14 +2019,14 @@ var io = g.forwardRef((n, e) => {
|
|
|
2075
2019
|
viewport: o.viewport.offsetHeight,
|
|
2076
2020
|
scrollbar: {
|
|
2077
2021
|
size: a.current.clientHeight,
|
|
2078
|
-
paddingStart:
|
|
2079
|
-
paddingEnd:
|
|
2022
|
+
paddingStart: Jt(i.paddingTop),
|
|
2023
|
+
paddingEnd: Jt(i.paddingBottom)
|
|
2080
2024
|
}
|
|
2081
2025
|
});
|
|
2082
2026
|
}
|
|
2083
2027
|
}
|
|
2084
2028
|
);
|
|
2085
|
-
}), [
|
|
2029
|
+
}), [lo, vr] = fr(De), br = g.forwardRef((n, e) => {
|
|
2086
2030
|
const {
|
|
2087
2031
|
__scopeScrollArea: t,
|
|
2088
2032
|
sizes: r,
|
|
@@ -2094,71 +2038,71 @@ var io = g.forwardRef((n, e) => {
|
|
|
2094
2038
|
onDragScroll: u,
|
|
2095
2039
|
onWheelScroll: l,
|
|
2096
2040
|
onResize: h,
|
|
2097
|
-
...
|
|
2098
|
-
} = n, m = Ee(
|
|
2099
|
-
function
|
|
2100
|
-
if (
|
|
2101
|
-
const W =
|
|
2102
|
-
u({ x: W, y:
|
|
2041
|
+
...d
|
|
2042
|
+
} = n, m = Ee(De, t), [w, v] = g.useState(null), p = Ze(e, (O) => v(O)), R = g.useRef(null), b = g.useRef(""), S = m.viewport, _ = r.content - r.viewport, P = Ke(l), T = Ke(a), D = tn(h, 10);
|
|
2043
|
+
function U(O) {
|
|
2044
|
+
if (R.current) {
|
|
2045
|
+
const W = O.clientX - R.current.left, z = O.clientY - R.current.top;
|
|
2046
|
+
u({ x: W, y: z });
|
|
2103
2047
|
}
|
|
2104
2048
|
}
|
|
2105
2049
|
return g.useEffect(() => {
|
|
2106
|
-
const
|
|
2107
|
-
const
|
|
2108
|
-
|
|
2050
|
+
const O = (W) => {
|
|
2051
|
+
const z = W.target;
|
|
2052
|
+
w?.contains(z) && P(W, _);
|
|
2109
2053
|
};
|
|
2110
|
-
return document.addEventListener("wheel",
|
|
2111
|
-
}, [
|
|
2112
|
-
|
|
2054
|
+
return document.addEventListener("wheel", O, { passive: !1 }), () => document.removeEventListener("wheel", O, { passive: !1 });
|
|
2055
|
+
}, [S, w, _, P]), g.useEffect(T, [r, T]), Tt(w, D), Tt(m.content, D), /* @__PURE__ */ x.jsx(
|
|
2056
|
+
lo,
|
|
2113
2057
|
{
|
|
2114
2058
|
scope: t,
|
|
2115
|
-
scrollbar:
|
|
2059
|
+
scrollbar: w,
|
|
2116
2060
|
hasThumb: s,
|
|
2117
|
-
onThumbChange:
|
|
2118
|
-
onThumbPointerUp:
|
|
2061
|
+
onThumbChange: Ke(o),
|
|
2062
|
+
onThumbPointerUp: Ke(i),
|
|
2119
2063
|
onThumbPositionChange: T,
|
|
2120
|
-
onThumbPointerDown:
|
|
2064
|
+
onThumbPointerDown: Ke(c),
|
|
2121
2065
|
children: /* @__PURE__ */ x.jsx(
|
|
2122
2066
|
kt.div,
|
|
2123
2067
|
{
|
|
2124
|
-
...
|
|
2068
|
+
...d,
|
|
2125
2069
|
ref: p,
|
|
2126
|
-
style: { position: "absolute", ...
|
|
2127
|
-
onPointerDown:
|
|
2128
|
-
|
|
2070
|
+
style: { position: "absolute", ...d.style },
|
|
2071
|
+
onPointerDown: Je(n.onPointerDown, (O) => {
|
|
2072
|
+
O.button === 0 && (O.target.setPointerCapture(O.pointerId), R.current = w.getBoundingClientRect(), b.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", m.viewport && (m.viewport.style.scrollBehavior = "auto"), U(O));
|
|
2129
2073
|
}),
|
|
2130
|
-
onPointerMove:
|
|
2131
|
-
onPointerUp:
|
|
2132
|
-
const W =
|
|
2133
|
-
W.hasPointerCapture(
|
|
2074
|
+
onPointerMove: Je(n.onPointerMove, U),
|
|
2075
|
+
onPointerUp: Je(n.onPointerUp, (O) => {
|
|
2076
|
+
const W = O.target;
|
|
2077
|
+
W.hasPointerCapture(O.pointerId) && W.releasePointerCapture(O.pointerId), document.body.style.webkitUserSelect = b.current, m.viewport && (m.viewport.style.scrollBehavior = ""), R.current = null;
|
|
2134
2078
|
})
|
|
2135
2079
|
}
|
|
2136
2080
|
)
|
|
2137
2081
|
}
|
|
2138
2082
|
);
|
|
2139
|
-
}),
|
|
2083
|
+
}), qt = "ScrollAreaThumb", Sr = g.forwardRef(
|
|
2140
2084
|
(n, e) => {
|
|
2141
|
-
const { forceMount: t, ...r } = n, s =
|
|
2142
|
-
return /* @__PURE__ */ x.jsx(Wt, { present: t || s.hasThumb, children: /* @__PURE__ */ x.jsx(
|
|
2085
|
+
const { forceMount: t, ...r } = n, s = vr(qt, n.__scopeScrollArea);
|
|
2086
|
+
return /* @__PURE__ */ x.jsx(Wt, { present: t || s.hasThumb, children: /* @__PURE__ */ x.jsx(uo, { ref: e, ...r }) });
|
|
2143
2087
|
}
|
|
2144
|
-
),
|
|
2088
|
+
), uo = g.forwardRef(
|
|
2145
2089
|
(n, e) => {
|
|
2146
|
-
const { __scopeScrollArea: t, style: r, ...s } = n, o = Ee(
|
|
2090
|
+
const { __scopeScrollArea: t, style: r, ...s } = n, o = Ee(qt, t), i = vr(qt, t), { onThumbPositionChange: c } = i, a = Ze(
|
|
2147
2091
|
e,
|
|
2148
2092
|
(h) => i.onThumbChange(h)
|
|
2149
|
-
), u = g.useRef(void 0), l =
|
|
2093
|
+
), u = g.useRef(void 0), l = tn(() => {
|
|
2150
2094
|
u.current && (u.current(), u.current = void 0);
|
|
2151
2095
|
}, 100);
|
|
2152
2096
|
return g.useEffect(() => {
|
|
2153
2097
|
const h = o.viewport;
|
|
2154
2098
|
if (h) {
|
|
2155
|
-
const
|
|
2099
|
+
const d = () => {
|
|
2156
2100
|
if (l(), !u.current) {
|
|
2157
|
-
const m =
|
|
2101
|
+
const m = mo(h, c);
|
|
2158
2102
|
u.current = m, c();
|
|
2159
2103
|
}
|
|
2160
2104
|
};
|
|
2161
|
-
return c(), h.addEventListener("scroll",
|
|
2105
|
+
return c(), h.addEventListener("scroll", d), () => h.removeEventListener("scroll", d);
|
|
2162
2106
|
}
|
|
2163
2107
|
}, [o.viewport, l, c]), /* @__PURE__ */ x.jsx(
|
|
2164
2108
|
kt.div,
|
|
@@ -2171,29 +2115,29 @@ var io = g.forwardRef((n, e) => {
|
|
|
2171
2115
|
height: "var(--radix-scroll-area-thumb-height)",
|
|
2172
2116
|
...r
|
|
2173
2117
|
},
|
|
2174
|
-
onPointerDownCapture:
|
|
2175
|
-
const m = h.target.getBoundingClientRect(),
|
|
2176
|
-
i.onThumbPointerDown({ x:
|
|
2118
|
+
onPointerDownCapture: Je(n.onPointerDownCapture, (h) => {
|
|
2119
|
+
const m = h.target.getBoundingClientRect(), w = h.clientX - m.left, v = h.clientY - m.top;
|
|
2120
|
+
i.onThumbPointerDown({ x: w, y: v });
|
|
2177
2121
|
}),
|
|
2178
|
-
onPointerUp:
|
|
2122
|
+
onPointerUp: Je(n.onPointerUp, i.onThumbPointerUp)
|
|
2179
2123
|
}
|
|
2180
2124
|
);
|
|
2181
2125
|
}
|
|
2182
2126
|
);
|
|
2183
|
-
|
|
2184
|
-
var wn = "ScrollAreaCorner",
|
|
2127
|
+
Sr.displayName = qt;
|
|
2128
|
+
var wn = "ScrollAreaCorner", _r = g.forwardRef(
|
|
2185
2129
|
(n, e) => {
|
|
2186
2130
|
const t = Ee(wn, n.__scopeScrollArea), r = !!(t.scrollbarX && t.scrollbarY);
|
|
2187
|
-
return t.type !== "scroll" && r ? /* @__PURE__ */ x.jsx(
|
|
2131
|
+
return t.type !== "scroll" && r ? /* @__PURE__ */ x.jsx(fo, { ...n, ref: e }) : null;
|
|
2188
2132
|
}
|
|
2189
2133
|
);
|
|
2190
|
-
|
|
2191
|
-
var
|
|
2134
|
+
_r.displayName = wn;
|
|
2135
|
+
var fo = g.forwardRef((n, e) => {
|
|
2192
2136
|
const { __scopeScrollArea: t, ...r } = n, s = Ee(wn, t), [o, i] = g.useState(0), [c, a] = g.useState(0), u = !!(o && c);
|
|
2193
|
-
return
|
|
2137
|
+
return Tt(s.scrollbarX, () => {
|
|
2194
2138
|
const l = s.scrollbarX?.offsetHeight || 0;
|
|
2195
2139
|
s.onCornerHeightChange(l), a(l);
|
|
2196
|
-
}),
|
|
2140
|
+
}), Tt(s.scrollbarY, () => {
|
|
2197
2141
|
const l = s.scrollbarY?.offsetWidth || 0;
|
|
2198
2142
|
s.onCornerWidthChange(l), i(l);
|
|
2199
2143
|
}), u ? /* @__PURE__ */ x.jsx(
|
|
@@ -2213,36 +2157,36 @@ var ho = g.forwardRef((n, e) => {
|
|
|
2213
2157
|
}
|
|
2214
2158
|
) : null;
|
|
2215
2159
|
});
|
|
2216
|
-
function
|
|
2160
|
+
function Jt(n) {
|
|
2217
2161
|
return n ? parseInt(n, 10) : 0;
|
|
2218
2162
|
}
|
|
2219
|
-
function
|
|
2163
|
+
function wr(n, e) {
|
|
2220
2164
|
const t = n / e;
|
|
2221
2165
|
return isNaN(t) ? 0 : t;
|
|
2222
2166
|
}
|
|
2223
|
-
function
|
|
2224
|
-
const e =
|
|
2167
|
+
function en(n) {
|
|
2168
|
+
const e = wr(n.viewport, n.content), t = n.scrollbar.paddingStart + n.scrollbar.paddingEnd, r = (n.scrollbar.size - t) * e;
|
|
2225
2169
|
return Math.max(r, 18);
|
|
2226
2170
|
}
|
|
2227
|
-
function
|
|
2228
|
-
const s =
|
|
2229
|
-
return
|
|
2171
|
+
function ho(n, e, t, r = "ltr") {
|
|
2172
|
+
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];
|
|
2173
|
+
return Er([a, u], h)(n);
|
|
2230
2174
|
}
|
|
2231
|
-
function
|
|
2232
|
-
const r =
|
|
2233
|
-
return
|
|
2175
|
+
function Bn(n, e, t = "ltr") {
|
|
2176
|
+
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 = no(n, a);
|
|
2177
|
+
return Er([0, i], [0, c])(u);
|
|
2234
2178
|
}
|
|
2235
|
-
function
|
|
2179
|
+
function Er(n, e) {
|
|
2236
2180
|
return (t) => {
|
|
2237
2181
|
if (n[0] === n[1] || e[0] === e[1]) return e[0];
|
|
2238
2182
|
const r = (e[1] - e[0]) / (n[1] - n[0]);
|
|
2239
2183
|
return e[0] + r * (t - n[0]);
|
|
2240
2184
|
};
|
|
2241
2185
|
}
|
|
2242
|
-
function
|
|
2186
|
+
function yr(n, e) {
|
|
2243
2187
|
return n > 0 && n < e;
|
|
2244
2188
|
}
|
|
2245
|
-
var
|
|
2189
|
+
var mo = (n, e = () => {
|
|
2246
2190
|
}) => {
|
|
2247
2191
|
let t = { left: n.scrollLeft, top: n.scrollTop }, r = 0;
|
|
2248
2192
|
return (function s() {
|
|
@@ -2250,14 +2194,14 @@ var po = (n, e = () => {
|
|
|
2250
2194
|
(i || c) && e(), t = o, r = window.requestAnimationFrame(s);
|
|
2251
2195
|
})(), () => window.cancelAnimationFrame(r);
|
|
2252
2196
|
};
|
|
2253
|
-
function
|
|
2254
|
-
const t =
|
|
2197
|
+
function tn(n, e) {
|
|
2198
|
+
const t = Ke(n), r = g.useRef(0);
|
|
2255
2199
|
return g.useEffect(() => () => window.clearTimeout(r.current), []), g.useCallback(() => {
|
|
2256
2200
|
window.clearTimeout(r.current), r.current = window.setTimeout(t, e);
|
|
2257
2201
|
}, [t, e]);
|
|
2258
2202
|
}
|
|
2259
|
-
function
|
|
2260
|
-
const t =
|
|
2203
|
+
function Tt(n, e) {
|
|
2204
|
+
const t = Ke(e);
|
|
2261
2205
|
pn(() => {
|
|
2262
2206
|
let r = 0;
|
|
2263
2207
|
if (n) {
|
|
@@ -2270,8 +2214,8 @@ function At(n, e) {
|
|
|
2270
2214
|
}
|
|
2271
2215
|
}, [n, t]);
|
|
2272
2216
|
}
|
|
2273
|
-
var
|
|
2274
|
-
const
|
|
2217
|
+
var po = dr, go = mr, vo = _r;
|
|
2218
|
+
const ln = (n, e, t, r, s) => ({
|
|
2275
2219
|
target: n,
|
|
2276
2220
|
dx: e[0],
|
|
2277
2221
|
dy: e[1],
|
|
@@ -2283,8 +2227,8 @@ const un = (n, e, t, r, s) => ({
|
|
|
2283
2227
|
...s && {
|
|
2284
2228
|
deltaRect: s
|
|
2285
2229
|
}
|
|
2286
|
-
}),
|
|
2287
|
-
const e =
|
|
2230
|
+
}), bo = (n, e, t) => n ? n === e || n === t || (e?.contains(n) ?? !1) || (t?.contains(n) ?? !1) : !1, So = (n) => {
|
|
2231
|
+
const e = Pe.c(34), {
|
|
2288
2232
|
children: t,
|
|
2289
2233
|
style: r,
|
|
2290
2234
|
draggable: s,
|
|
@@ -2292,133 +2236,131 @@ const un = (n, e, t, r, s) => ({
|
|
|
2292
2236
|
draggableOptions: i,
|
|
2293
2237
|
resizableOptions: c,
|
|
2294
2238
|
ref: a
|
|
2295
|
-
} = n, u = ce(void 0), l = ce(void 0), h = ce(null),
|
|
2296
|
-
let v;
|
|
2239
|
+
} = n, u = ce(void 0), l = ce(void 0), h = ce(null), d = ce(null), m = ce(void 0), w = ce(void 0);
|
|
2240
|
+
let v, p;
|
|
2297
2241
|
e[0] !== i || e[1] !== a || e[2] !== c ? (v = () => {
|
|
2298
2242
|
if (u.current = i, l.current = c, !a?.current)
|
|
2299
2243
|
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) => {
|
|
2244
|
+
const E = c?.edges?.left, A = c?.edges?.right;
|
|
2245
|
+
E && E !== m.current && (m.current = E, h.current = a.current.querySelector(E)), A && A !== w.current && (w.current = A, d.current = a.current.querySelector(A));
|
|
2246
|
+
}, p = [i, a, c], e[0] = i, e[1] = a, e[2] = c, e[3] = v, e[4] = p) : (v = e[3], p = e[4]), Ct(v, p);
|
|
2247
|
+
let R;
|
|
2248
|
+
e[5] !== a ? (R = (E) => {
|
|
2307
2249
|
const {
|
|
2308
|
-
active:
|
|
2309
|
-
delta:
|
|
2310
|
-
xy:
|
|
2311
|
-
event:
|
|
2312
|
-
first:
|
|
2250
|
+
active: A,
|
|
2251
|
+
delta: M,
|
|
2252
|
+
xy: Z,
|
|
2253
|
+
event: ee,
|
|
2254
|
+
first: f,
|
|
2313
2255
|
last: y
|
|
2314
|
-
} =
|
|
2315
|
-
if (!
|
|
2256
|
+
} = E, N = a?.current;
|
|
2257
|
+
if (!N || bo(ee?.target, h.current, d.current))
|
|
2316
2258
|
return;
|
|
2317
|
-
const
|
|
2318
|
-
|
|
2319
|
-
}, e[
|
|
2259
|
+
const H = ln(N, M, Z);
|
|
2260
|
+
f ? u.current?.onstart?.(H) : y ? u.current?.onend?.(H) : A && u.current?.onmove?.(H);
|
|
2261
|
+
}, e[5] = a, e[6] = R) : R = e[6];
|
|
2320
2262
|
const b = i?.lockAxis === "x" ? "x" : void 0;
|
|
2321
|
-
let
|
|
2322
|
-
e[
|
|
2263
|
+
let S;
|
|
2264
|
+
e[7] === Symbol.for("react.memo_cache_sentinel") ? (S = {
|
|
2323
2265
|
capture: !0
|
|
2324
|
-
}, e[
|
|
2325
|
-
let
|
|
2326
|
-
e[
|
|
2266
|
+
}, e[7] = S) : S = e[7];
|
|
2267
|
+
let _;
|
|
2268
|
+
e[8] !== s || e[9] !== a || e[10] !== b ? (_ = {
|
|
2327
2269
|
enabled: s,
|
|
2328
2270
|
axis: b,
|
|
2329
|
-
pointer:
|
|
2271
|
+
pointer: S,
|
|
2330
2272
|
target: a,
|
|
2331
2273
|
threshold: 0
|
|
2332
|
-
}, e[
|
|
2274
|
+
}, e[8] = s, e[9] = a, e[10] = b, e[11] = _) : _ = e[11], an(R, _);
|
|
2333
2275
|
let P;
|
|
2334
|
-
e[
|
|
2276
|
+
e[12] !== a ? (P = (E) => {
|
|
2335
2277
|
const {
|
|
2336
|
-
active:
|
|
2337
|
-
delta:
|
|
2338
|
-
xy:
|
|
2339
|
-
first:
|
|
2340
|
-
last:
|
|
2341
|
-
} =
|
|
2278
|
+
active: A,
|
|
2279
|
+
delta: M,
|
|
2280
|
+
xy: Z,
|
|
2281
|
+
first: ee,
|
|
2282
|
+
last: f
|
|
2283
|
+
} = E, y = a?.current;
|
|
2342
2284
|
if (!y)
|
|
2343
2285
|
return;
|
|
2344
|
-
const
|
|
2286
|
+
const N = ln(y, M, Z, {
|
|
2345
2287
|
left: !0
|
|
2346
2288
|
}, {
|
|
2347
|
-
left:
|
|
2289
|
+
left: M[0]
|
|
2348
2290
|
});
|
|
2349
|
-
|
|
2350
|
-
}, e[
|
|
2291
|
+
ee ? l.current?.onstart?.(N) : f ? l.current?.onend?.(N) : A && l.current?.onmove?.(N);
|
|
2292
|
+
}, e[12] = a, e[13] = P) : P = e[13];
|
|
2351
2293
|
let T;
|
|
2352
|
-
e[
|
|
2294
|
+
e[14] === Symbol.for("react.memo_cache_sentinel") ? (T = {
|
|
2353
2295
|
capture: !0
|
|
2354
|
-
}, e[
|
|
2355
|
-
let
|
|
2356
|
-
e[
|
|
2296
|
+
}, e[14] = T) : T = e[14];
|
|
2297
|
+
let D;
|
|
2298
|
+
e[15] !== o ? (D = {
|
|
2357
2299
|
enabled: o,
|
|
2358
2300
|
target: h,
|
|
2359
2301
|
pointer: T,
|
|
2360
2302
|
threshold: 0
|
|
2361
|
-
}, e[
|
|
2362
|
-
let
|
|
2363
|
-
e[
|
|
2303
|
+
}, e[15] = o, e[16] = D) : D = e[16], an(P, D);
|
|
2304
|
+
let U;
|
|
2305
|
+
e[17] !== a ? (U = (E) => {
|
|
2364
2306
|
const {
|
|
2365
|
-
active:
|
|
2366
|
-
delta:
|
|
2367
|
-
xy:
|
|
2368
|
-
first:
|
|
2369
|
-
last:
|
|
2370
|
-
} =
|
|
2307
|
+
active: A,
|
|
2308
|
+
delta: M,
|
|
2309
|
+
xy: Z,
|
|
2310
|
+
first: ee,
|
|
2311
|
+
last: f
|
|
2312
|
+
} = E, y = a?.current;
|
|
2371
2313
|
if (!y)
|
|
2372
2314
|
return;
|
|
2373
|
-
const
|
|
2315
|
+
const N = ln(y, M, Z, {
|
|
2374
2316
|
right: !0
|
|
2375
2317
|
}, {
|
|
2376
|
-
right:
|
|
2318
|
+
right: M[0]
|
|
2377
2319
|
});
|
|
2378
|
-
|
|
2379
|
-
}, e[
|
|
2380
|
-
let
|
|
2381
|
-
e[
|
|
2320
|
+
ee ? l.current?.onstart?.(N) : f ? l.current?.onend?.(N) : A && l.current?.onmove?.(N);
|
|
2321
|
+
}, e[17] = a, e[18] = U) : U = e[18];
|
|
2322
|
+
let O;
|
|
2323
|
+
e[19] === Symbol.for("react.memo_cache_sentinel") ? (O = {
|
|
2382
2324
|
capture: !0
|
|
2383
|
-
}, e[
|
|
2325
|
+
}, e[19] = O) : O = e[19];
|
|
2384
2326
|
let W;
|
|
2385
|
-
e[
|
|
2327
|
+
e[20] !== o ? (W = {
|
|
2386
2328
|
enabled: o,
|
|
2387
|
-
target:
|
|
2388
|
-
pointer:
|
|
2329
|
+
target: d,
|
|
2330
|
+
pointer: O,
|
|
2389
2331
|
threshold: 0
|
|
2390
|
-
}, e[
|
|
2391
|
-
let
|
|
2392
|
-
e[
|
|
2393
|
-
const
|
|
2394
|
-
if (!
|
|
2332
|
+
}, e[20] = o, e[21] = W) : W = e[21], an(U, W);
|
|
2333
|
+
let z, Y;
|
|
2334
|
+
e[22] !== a ? (z = () => {
|
|
2335
|
+
const E = a?.current;
|
|
2336
|
+
if (!E)
|
|
2395
2337
|
return;
|
|
2396
|
-
const
|
|
2397
|
-
|
|
2398
|
-
},
|
|
2399
|
-
let
|
|
2400
|
-
e[
|
|
2338
|
+
const A = l.current?.edges?.left, M = l.current?.edges?.right;
|
|
2339
|
+
A && (h.current = E.querySelector(A)), M && (d.current = E.querySelector(M));
|
|
2340
|
+
}, Y = [a], e[22] = a, e[23] = z, e[24] = Y) : (z = e[23], Y = e[24]), gn(z, Y);
|
|
2341
|
+
let C;
|
|
2342
|
+
e[25] !== s ? (C = s ? {
|
|
2401
2343
|
touchAction: "none"
|
|
2402
|
-
} : {}, e[
|
|
2403
|
-
let
|
|
2404
|
-
e[
|
|
2405
|
-
...
|
|
2344
|
+
} : {}, e[25] = s, e[26] = C) : C = e[26];
|
|
2345
|
+
let j;
|
|
2346
|
+
e[27] !== r || e[28] !== C ? (j = {
|
|
2347
|
+
...C,
|
|
2406
2348
|
...r
|
|
2407
|
-
}, e[
|
|
2408
|
-
let
|
|
2409
|
-
return e[
|
|
2410
|
-
},
|
|
2349
|
+
}, e[27] = r, e[28] = C, e[29] = j) : j = e[29];
|
|
2350
|
+
let I;
|
|
2351
|
+
return e[30] !== t || e[31] !== a || e[32] !== j ? (I = /* @__PURE__ */ x.jsx(Us, { ref: a, style: j, draggable: !1, children: t }), e[30] = t, e[31] = a, e[32] = j, e[33] = I) : I = e[33], I;
|
|
2352
|
+
}, be = (n, e = 0) => n ? parseFloat(n) : e, un = (n, e, t, r = Number.MAX_SAFE_INTEGER) => {
|
|
2411
2353
|
let s = n, o = r;
|
|
2412
2354
|
for (const i of e) {
|
|
2413
2355
|
const c = Math.abs(i - n);
|
|
2414
2356
|
c < t && c < o && (s = i, o = c);
|
|
2415
2357
|
}
|
|
2416
2358
|
return {
|
|
2417
|
-
|
|
2359
|
+
snap: s,
|
|
2418
2360
|
minDis: o
|
|
2419
2361
|
};
|
|
2420
|
-
},
|
|
2421
|
-
const t =
|
|
2362
|
+
}, xr = qe.forwardRef((n, e) => {
|
|
2363
|
+
const t = Pe.c(68), {
|
|
2422
2364
|
children: r,
|
|
2423
2365
|
edges: s,
|
|
2424
2366
|
left: o,
|
|
@@ -2428,276 +2370,274 @@ const un = (n, e, t, r, s) => ({
|
|
|
2428
2370
|
getBounds: u,
|
|
2429
2371
|
enableResizing: l,
|
|
2430
2372
|
enableDragging: h,
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
onResizeStart:
|
|
2373
|
+
snapDistance: d,
|
|
2374
|
+
snapPositions: m,
|
|
2375
|
+
onResizeStart: w,
|
|
2434
2376
|
onResize: v,
|
|
2435
2377
|
onResizeEnd: p,
|
|
2436
|
-
onDragStart:
|
|
2378
|
+
onDragStart: R,
|
|
2437
2379
|
onDragEnd: b,
|
|
2438
|
-
onDrag:
|
|
2439
|
-
parentRef:
|
|
2380
|
+
onDrag: S,
|
|
2381
|
+
parentRef: _,
|
|
2440
2382
|
autoScroll: P
|
|
2441
|
-
} = n, T = c === void 0 ?
|
|
2442
|
-
let
|
|
2443
|
-
t[0] !== m ? (
|
|
2444
|
-
const
|
|
2445
|
-
initAutoScroll:
|
|
2446
|
-
stopAutoScroll:
|
|
2447
|
-
dealDragAutoScroll:
|
|
2448
|
-
dealResizeAutoScroll:
|
|
2449
|
-
} =
|
|
2383
|
+
} = n, T = c === void 0 ? Zt : c, D = a === void 0 ? dn : a, U = u === void 0 ? _o : u, O = l === void 0 ? !0 : l, W = h === void 0 ? !0 : h, z = d === void 0 ? hn : d;
|
|
2384
|
+
let Y;
|
|
2385
|
+
t[0] !== m ? (Y = m === void 0 ? [] : m, t[0] = m, t[1] = Y) : Y = t[1];
|
|
2386
|
+
const C = Y, j = P === void 0 ? !0 : P, I = ce(null), E = ce(0), A = ce(!1), {
|
|
2387
|
+
initAutoScroll: M,
|
|
2388
|
+
stopAutoScroll: Z,
|
|
2389
|
+
dealDragAutoScroll: ee,
|
|
2390
|
+
dealResizeAutoScroll: f
|
|
2391
|
+
} = Jr(_);
|
|
2450
2392
|
let y;
|
|
2451
|
-
t[2] === Symbol.for("react.memo_cache_sentinel") ? (y = (
|
|
2452
|
-
const
|
|
2453
|
-
if (!
|
|
2393
|
+
t[2] === Symbol.for("react.memo_cache_sentinel") ? (y = (V, q) => {
|
|
2394
|
+
const G = q === void 0 ? !0 : q;
|
|
2395
|
+
if (!I.current)
|
|
2454
2396
|
return;
|
|
2455
|
-
|
|
2456
|
-
const
|
|
2457
|
-
|
|
2397
|
+
G && (E.current = 0);
|
|
2398
|
+
const K = I.current;
|
|
2399
|
+
K.style.left = `${V}px`, K.dataset.left = String(V);
|
|
2458
2400
|
}, t[2] = y) : y = t[2];
|
|
2459
|
-
const
|
|
2460
|
-
let
|
|
2461
|
-
t[3] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2462
|
-
const
|
|
2463
|
-
if (!
|
|
2401
|
+
const N = y;
|
|
2402
|
+
let H;
|
|
2403
|
+
t[3] === Symbol.for("react.memo_cache_sentinel") ? (H = (V, q) => {
|
|
2404
|
+
const G = q === void 0 ? !0 : q;
|
|
2405
|
+
if (!I.current)
|
|
2464
2406
|
return;
|
|
2465
|
-
|
|
2466
|
-
const
|
|
2467
|
-
|
|
2468
|
-
}, t[3] =
|
|
2469
|
-
const
|
|
2470
|
-
let
|
|
2471
|
-
t[4] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2472
|
-
const B =
|
|
2407
|
+
G && (E.current = 0);
|
|
2408
|
+
const K = I.current;
|
|
2409
|
+
K.style.width = `${V}px`, K.dataset.width = String(V);
|
|
2410
|
+
}, t[3] = H) : H = t[3];
|
|
2411
|
+
const Q = H;
|
|
2412
|
+
let X;
|
|
2413
|
+
t[4] === Symbol.for("react.memo_cache_sentinel") ? (X = () => I.current ? be(I.current.dataset.left) : 0, t[4] = X) : X = t[4];
|
|
2414
|
+
const B = X;
|
|
2473
2415
|
let L;
|
|
2474
|
-
t[5] === Symbol.for("react.memo_cache_sentinel") ? (L = () =>
|
|
2475
|
-
const
|
|
2476
|
-
let
|
|
2477
|
-
t[6] !== i ? (
|
|
2478
|
-
if (!
|
|
2416
|
+
t[5] === Symbol.for("react.memo_cache_sentinel") ? (L = () => I.current ? be(I.current.dataset.width) : 0, t[5] = L) : L = t[5];
|
|
2417
|
+
const k = L;
|
|
2418
|
+
let $, Qe;
|
|
2419
|
+
t[6] !== i ? ($ = () => {
|
|
2420
|
+
if (!I.current)
|
|
2479
2421
|
return;
|
|
2480
|
-
const
|
|
2481
|
-
|
|
2482
|
-
},
|
|
2483
|
-
let
|
|
2484
|
-
t[9] !== o ? (
|
|
2485
|
-
|
|
2486
|
-
},
|
|
2487
|
-
let
|
|
2488
|
-
t[12] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2489
|
-
updateLeft: (
|
|
2490
|
-
updateWidth: (
|
|
2422
|
+
const V = I.current;
|
|
2423
|
+
Q(typeof i > "u" ? V.offsetWidth : i, !1);
|
|
2424
|
+
}, Qe = [i], t[6] = i, t[7] = $, t[8] = Qe) : ($ = t[7], Qe = t[8]), Ct($, Qe);
|
|
2425
|
+
let et, We;
|
|
2426
|
+
t[9] !== o ? (et = () => {
|
|
2427
|
+
N(o || 0, !1);
|
|
2428
|
+
}, We = [o], t[9] = o, t[10] = et, t[11] = We) : (et = t[10], We = t[11]), Ct(et, We);
|
|
2429
|
+
let Le;
|
|
2430
|
+
t[12] === Symbol.for("react.memo_cache_sentinel") ? (Le = () => ({
|
|
2431
|
+
updateLeft: (V) => N(V || 0, !1),
|
|
2432
|
+
updateWidth: (V) => Q(V, !1),
|
|
2491
2433
|
getLeft: B,
|
|
2492
|
-
getWidth:
|
|
2493
|
-
}), t[12] =
|
|
2434
|
+
getWidth: k
|
|
2435
|
+
}), t[12] = Le) : Le = t[12], Zn(e, Le);
|
|
2494
2436
|
let Re;
|
|
2495
|
-
t[13] !==
|
|
2496
|
-
|
|
2497
|
-
}, t[13] =
|
|
2498
|
-
const
|
|
2499
|
-
let
|
|
2500
|
-
t[16] !==
|
|
2437
|
+
t[13] !== M || t[14] !== R ? (Re = () => {
|
|
2438
|
+
E.current = 0, A.current = !1, M(), R?.();
|
|
2439
|
+
}, t[13] = M, t[14] = R, t[15] = Re) : Re = t[15];
|
|
2440
|
+
const Ye = Re;
|
|
2441
|
+
let Oe;
|
|
2442
|
+
t[16] !== U || t[17] !== D || t[18] !== S || t[19] !== z || t[20] !== C || t[21] !== T ? (Oe = (V) => {
|
|
2501
2443
|
const {
|
|
2502
2444
|
preLeft: q,
|
|
2503
|
-
preWidth:
|
|
2504
|
-
scrollDelta:
|
|
2505
|
-
} =
|
|
2506
|
-
|
|
2507
|
-
const
|
|
2508
|
-
if (Math.abs(
|
|
2445
|
+
preWidth: G,
|
|
2446
|
+
scrollDelta: K
|
|
2447
|
+
} = V;
|
|
2448
|
+
K && (E.current = E.current + K);
|
|
2449
|
+
const he = A.current ? z : D;
|
|
2450
|
+
if (Math.abs(E.current) < he)
|
|
2509
2451
|
return;
|
|
2510
|
-
const
|
|
2511
|
-
let
|
|
2512
|
-
const {
|
|
2513
|
-
|
|
2514
|
-
} =
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
if (ue !== K)
|
|
2518
|
-
k.current = !0, K = ue;
|
|
2452
|
+
const me = Math.trunc(E.current / he);
|
|
2453
|
+
let J = q + me * he;
|
|
2454
|
+
const re = E.current > 0, F = re ? J + G : J, {
|
|
2455
|
+
snap: ne
|
|
2456
|
+
} = un(F, C, z);
|
|
2457
|
+
if (ne !== F)
|
|
2458
|
+
A.current = !0, J = re ? ne - G : ne;
|
|
2519
2459
|
else {
|
|
2520
|
-
const
|
|
2521
|
-
|
|
2460
|
+
const ae = J - T;
|
|
2461
|
+
ae % D !== 0 && (J = T + D * Math.round(ae / D)), A.current = !1;
|
|
2522
2462
|
}
|
|
2523
|
-
|
|
2524
|
-
const
|
|
2525
|
-
|
|
2463
|
+
E.current = E.current % he;
|
|
2464
|
+
const se = U();
|
|
2465
|
+
J < se.left ? J = se.left : J + G > se.right && (J = se.right - G), !(S && S({
|
|
2526
2466
|
lastLeft: q,
|
|
2527
|
-
left:
|
|
2528
|
-
lastWidth:
|
|
2529
|
-
width:
|
|
2530
|
-
},
|
|
2531
|
-
}, t[16] =
|
|
2532
|
-
const Ce =
|
|
2533
|
-
let
|
|
2534
|
-
t[23] !==
|
|
2535
|
-
const q =
|
|
2536
|
-
|
|
2537
|
-
if (!
|
|
2467
|
+
left: J,
|
|
2468
|
+
lastWidth: G,
|
|
2469
|
+
width: G
|
|
2470
|
+
}, K) === !1) && N(J, !1);
|
|
2471
|
+
}, t[16] = U, t[17] = D, t[18] = S, t[19] = z, t[20] = C, t[21] = T, t[22] = Oe) : Oe = t[22];
|
|
2472
|
+
const Ce = Oe;
|
|
2473
|
+
let Me;
|
|
2474
|
+
t[23] !== j || t[24] !== ee || t[25] !== Ce || t[26] !== _ ? (Me = (V) => {
|
|
2475
|
+
const q = V.target, G = be(q.dataset.left), K = be(q.dataset.width);
|
|
2476
|
+
E.current = E.current + V.dx, !(j && _?.current && !ee(V, (J) => {
|
|
2477
|
+
if (!_?.current || !I.current)
|
|
2538
2478
|
return;
|
|
2539
|
-
|
|
2540
|
-
const
|
|
2479
|
+
_.current.scrollLeft = _.current.scrollLeft + J;
|
|
2480
|
+
const re = I.current, F = be(re.dataset.left), ne = be(re.dataset.width);
|
|
2541
2481
|
Ce({
|
|
2542
|
-
preLeft:
|
|
2543
|
-
preWidth:
|
|
2544
|
-
scrollDelta:
|
|
2482
|
+
preLeft: F,
|
|
2483
|
+
preWidth: ne,
|
|
2484
|
+
scrollDelta: J
|
|
2545
2485
|
});
|
|
2546
2486
|
})) && Ce({
|
|
2547
|
-
preLeft:
|
|
2548
|
-
preWidth:
|
|
2487
|
+
preLeft: G,
|
|
2488
|
+
preWidth: K
|
|
2549
2489
|
});
|
|
2550
|
-
}, t[23] =
|
|
2551
|
-
const
|
|
2552
|
-
let
|
|
2553
|
-
t[28] !== b || t[29] !==
|
|
2554
|
-
|
|
2555
|
-
const q =
|
|
2490
|
+
}, t[23] = j, t[24] = ee, t[25] = Ce, t[26] = _, t[27] = Me) : Me = t[27];
|
|
2491
|
+
const Pt = Me;
|
|
2492
|
+
let tt;
|
|
2493
|
+
t[28] !== b || t[29] !== Z ? (tt = (V) => {
|
|
2494
|
+
E.current = 0, A.current = !1, Z();
|
|
2495
|
+
const q = V.target;
|
|
2556
2496
|
b?.({
|
|
2557
|
-
left:
|
|
2558
|
-
width:
|
|
2497
|
+
left: be(q.dataset.left),
|
|
2498
|
+
width: be(q.dataset.width)
|
|
2559
2499
|
});
|
|
2560
|
-
}, t[28] = b, t[29] =
|
|
2561
|
-
const
|
|
2500
|
+
}, t[28] = b, t[29] = Z, t[30] = tt) : tt = t[30];
|
|
2501
|
+
const ze = tt;
|
|
2562
2502
|
let _e;
|
|
2563
|
-
t[31] !==
|
|
2564
|
-
|
|
2565
|
-
const q =
|
|
2566
|
-
|
|
2567
|
-
}, t[31] =
|
|
2568
|
-
const
|
|
2569
|
-
let
|
|
2570
|
-
t[34] !==
|
|
2503
|
+
t[31] !== M || t[32] !== w ? (_e = (V) => {
|
|
2504
|
+
E.current = 0, A.current = !1, M();
|
|
2505
|
+
const q = V.edges?.right ? "right" : "left";
|
|
2506
|
+
w?.(q);
|
|
2507
|
+
}, t[31] = M, t[32] = w, t[33] = _e) : _e = t[33];
|
|
2508
|
+
const je = _e;
|
|
2509
|
+
let Ne;
|
|
2510
|
+
t[34] !== U || t[35] !== D || t[36] !== v || t[37] !== z || t[38] !== C || t[39] !== T ? (Ne = (V) => {
|
|
2571
2511
|
const {
|
|
2572
2512
|
dir: q,
|
|
2573
|
-
preWidth:
|
|
2574
|
-
preLeft:
|
|
2575
|
-
scrollDelta:
|
|
2576
|
-
} =
|
|
2577
|
-
|
|
2578
|
-
const
|
|
2579
|
-
if (Math.abs(
|
|
2513
|
+
preWidth: G,
|
|
2514
|
+
preLeft: K,
|
|
2515
|
+
scrollDelta: he
|
|
2516
|
+
} = V;
|
|
2517
|
+
he && (E.current = E.current + he);
|
|
2518
|
+
const me = A.current ? z : D;
|
|
2519
|
+
if (Math.abs(E.current) < me)
|
|
2580
2520
|
return;
|
|
2581
|
-
const
|
|
2521
|
+
const J = U();
|
|
2582
2522
|
if (q === "left") {
|
|
2583
|
-
const
|
|
2584
|
-
let
|
|
2523
|
+
const re = Math.trunc(E.current / me);
|
|
2524
|
+
let F = K + re * me;
|
|
2585
2525
|
const {
|
|
2586
|
-
|
|
2587
|
-
} =
|
|
2588
|
-
if (
|
|
2589
|
-
|
|
2526
|
+
snap: ne
|
|
2527
|
+
} = un(F, C, z);
|
|
2528
|
+
if (ne !== F)
|
|
2529
|
+
A.current = !0, F = ne;
|
|
2590
2530
|
else {
|
|
2591
|
-
const
|
|
2592
|
-
|
|
2531
|
+
const pe = F - T;
|
|
2532
|
+
pe % D !== 0 && (F = T + D * Math.round(pe / D)), A.current = !1;
|
|
2593
2533
|
}
|
|
2594
|
-
|
|
2595
|
-
const
|
|
2596
|
-
if (
|
|
2597
|
-
lastLeft:
|
|
2598
|
-
lastWidth:
|
|
2599
|
-
left:
|
|
2600
|
-
width:
|
|
2534
|
+
E.current = E.current % me, F < J.left && (F = J.left);
|
|
2535
|
+
const se = K + G, ae = se - F;
|
|
2536
|
+
if (F >= se || v && v("left", {
|
|
2537
|
+
lastLeft: K,
|
|
2538
|
+
lastWidth: G,
|
|
2539
|
+
left: F,
|
|
2540
|
+
width: ae
|
|
2601
2541
|
}) === !1)
|
|
2602
2542
|
return;
|
|
2603
|
-
|
|
2543
|
+
N(F, !1), Q(ae, !1);
|
|
2604
2544
|
} else {
|
|
2605
|
-
const
|
|
2606
|
-
let
|
|
2607
|
-
const
|
|
2608
|
-
|
|
2609
|
-
} =
|
|
2610
|
-
if (
|
|
2611
|
-
|
|
2545
|
+
const re = Math.trunc(E.current / me);
|
|
2546
|
+
let F = G + re * me;
|
|
2547
|
+
const ne = K + F, {
|
|
2548
|
+
snap: se
|
|
2549
|
+
} = un(ne, C, z);
|
|
2550
|
+
if (se !== ne)
|
|
2551
|
+
A.current = !0, F = se - K;
|
|
2612
2552
|
else {
|
|
2613
|
-
let
|
|
2614
|
-
const
|
|
2615
|
-
|
|
2553
|
+
let ae = K + F;
|
|
2554
|
+
const pe = ae - T;
|
|
2555
|
+
pe % D !== 0 && (ae = T + D * Math.round(pe / D), F = ae - K), A.current = !1;
|
|
2616
2556
|
}
|
|
2617
|
-
if (
|
|
2618
|
-
lastLeft:
|
|
2619
|
-
lastWidth:
|
|
2620
|
-
left:
|
|
2621
|
-
width:
|
|
2557
|
+
if (E.current = E.current % me, K + F > J.right && (F = J.right - K), F <= 0 || v && v("right", {
|
|
2558
|
+
lastLeft: K,
|
|
2559
|
+
lastWidth: G,
|
|
2560
|
+
left: K,
|
|
2561
|
+
width: F
|
|
2622
2562
|
}) === !1)
|
|
2623
2563
|
return;
|
|
2624
|
-
|
|
2564
|
+
Q(F, !1);
|
|
2625
2565
|
}
|
|
2626
|
-
}, t[34] =
|
|
2627
|
-
const
|
|
2628
|
-
let
|
|
2629
|
-
t[41] !==
|
|
2630
|
-
const q =
|
|
2631
|
-
|
|
2632
|
-
if (!
|
|
2566
|
+
}, t[34] = U, t[35] = D, t[36] = v, t[37] = z, t[38] = C, t[39] = T, t[40] = Ne) : Ne = t[40];
|
|
2567
|
+
const Fe = Ne;
|
|
2568
|
+
let Ie;
|
|
2569
|
+
t[41] !== j || t[42] !== f || t[43] !== _ || t[44] !== Fe ? (Ie = (V) => {
|
|
2570
|
+
const q = V.target, G = V.edges?.left ? "left" : "right", K = be(q.dataset.left), he = be(q.dataset.width);
|
|
2571
|
+
E.current = E.current + (G === "left" ? V.deltaRect?.left || 0 : V.deltaRect?.right || 0), !(j && _?.current && !f(V, G, (re) => {
|
|
2572
|
+
if (!_?.current || !I.current)
|
|
2633
2573
|
return;
|
|
2634
|
-
|
|
2635
|
-
const
|
|
2636
|
-
|
|
2637
|
-
preLeft:
|
|
2638
|
-
preWidth:
|
|
2639
|
-
dir:
|
|
2640
|
-
scrollDelta:
|
|
2574
|
+
_.current.scrollLeft = _.current.scrollLeft + re;
|
|
2575
|
+
const F = I.current, ne = be(F.dataset.left), se = be(F.dataset.width);
|
|
2576
|
+
Fe({
|
|
2577
|
+
preLeft: ne,
|
|
2578
|
+
preWidth: se,
|
|
2579
|
+
dir: G,
|
|
2580
|
+
scrollDelta: re
|
|
2641
2581
|
});
|
|
2642
|
-
})) &&
|
|
2643
|
-
preLeft:
|
|
2644
|
-
preWidth:
|
|
2645
|
-
dir:
|
|
2582
|
+
})) && Fe({
|
|
2583
|
+
preLeft: K,
|
|
2584
|
+
preWidth: he,
|
|
2585
|
+
dir: G
|
|
2646
2586
|
});
|
|
2647
|
-
}, t[41] =
|
|
2648
|
-
const Ae =
|
|
2649
|
-
let
|
|
2650
|
-
t[46] !== p || t[47] !==
|
|
2651
|
-
|
|
2652
|
-
const q =
|
|
2653
|
-
p?.(
|
|
2654
|
-
left:
|
|
2655
|
-
width:
|
|
2587
|
+
}, t[41] = j, t[42] = f, t[43] = _, t[44] = Fe, t[45] = Ie) : Ie = t[45];
|
|
2588
|
+
const Ae = Ie;
|
|
2589
|
+
let ke;
|
|
2590
|
+
t[46] !== p || t[47] !== Z ? (ke = (V) => {
|
|
2591
|
+
E.current = 0, A.current = !1, Z();
|
|
2592
|
+
const q = V.target, G = V.edges?.right ? "right" : "left";
|
|
2593
|
+
p?.(G, {
|
|
2594
|
+
left: be(q.dataset.left),
|
|
2595
|
+
width: be(q.dataset.width)
|
|
2656
2596
|
});
|
|
2657
|
-
}, t[46] = p, t[47] =
|
|
2658
|
-
const
|
|
2597
|
+
}, t[46] = p, t[47] = Z, t[48] = ke) : ke = t[48];
|
|
2598
|
+
const Xe = ke;
|
|
2659
2599
|
let ye;
|
|
2660
2600
|
t[49] !== o || t[50] !== i ? (ye = {
|
|
2661
2601
|
left: o,
|
|
2662
2602
|
width: i
|
|
2663
2603
|
}, t[49] = o, t[50] = i, t[51] = ye) : ye = t[51];
|
|
2664
2604
|
let Te;
|
|
2665
|
-
t[52] !==
|
|
2605
|
+
t[52] !== Pt || t[53] !== Ye || t[54] !== ze ? (Te = {
|
|
2666
2606
|
lockAxis: "x",
|
|
2667
|
-
onmove:
|
|
2668
|
-
onstart:
|
|
2669
|
-
onend:
|
|
2670
|
-
cursorChecker:
|
|
2671
|
-
}, t[52] =
|
|
2607
|
+
onmove: Pt,
|
|
2608
|
+
onstart: Ye,
|
|
2609
|
+
onend: ze,
|
|
2610
|
+
cursorChecker: wo
|
|
2611
|
+
}, t[52] = Pt, t[53] = Ye, t[54] = ze, t[55] = Te) : Te = t[55];
|
|
2672
2612
|
let xe;
|
|
2673
|
-
t[56] !== s || t[57] !== Ae || t[58] !==
|
|
2613
|
+
t[56] !== s || t[57] !== Ae || t[58] !== je || t[59] !== Xe ? (xe = {
|
|
2674
2614
|
axis: "x",
|
|
2675
2615
|
invert: "none",
|
|
2676
2616
|
edges: s,
|
|
2677
2617
|
onmove: Ae,
|
|
2678
|
-
onstart:
|
|
2679
|
-
onend:
|
|
2680
|
-
}, t[56] = s, t[57] = Ae, t[58] =
|
|
2681
|
-
let
|
|
2682
|
-
return t[61] !== r || t[62] !== W || t[63] !==
|
|
2618
|
+
onstart: je,
|
|
2619
|
+
onend: Xe
|
|
2620
|
+
}, t[56] = s, t[57] = Ae, t[58] = je, t[59] = Xe, t[60] = xe) : xe = t[60];
|
|
2621
|
+
let Ve;
|
|
2622
|
+
return t[61] !== r || t[62] !== W || t[63] !== O || t[64] !== ye || t[65] !== Te || t[66] !== xe ? (Ve = /* @__PURE__ */ x.jsx(So, { style: ye, ref: I, draggable: W, resizable: O, draggableOptions: Te, resizableOptions: xe, children: r }), t[61] = r, t[62] = W, t[63] = O, t[64] = ye, t[65] = Te, t[66] = xe, t[67] = Ve) : Ve = t[67], Ve;
|
|
2683
2623
|
});
|
|
2684
|
-
function
|
|
2624
|
+
function _o() {
|
|
2685
2625
|
return {
|
|
2686
2626
|
left: Number.MIN_SAFE_INTEGER,
|
|
2687
2627
|
right: Number.MAX_SAFE_INTEGER
|
|
2688
2628
|
};
|
|
2689
2629
|
}
|
|
2690
|
-
function
|
|
2630
|
+
function wo() {
|
|
2691
2631
|
return "";
|
|
2692
2632
|
}
|
|
2693
|
-
function
|
|
2633
|
+
function Eo() {
|
|
2694
2634
|
let n = 0, e, t = "", r = arguments.length;
|
|
2695
2635
|
for (; n < r; n++)
|
|
2696
2636
|
(e = arguments[n]) && typeof e == "string" && (t += (t && " ") + e);
|
|
2697
2637
|
return t;
|
|
2698
2638
|
}
|
|
2699
|
-
const
|
|
2700
|
-
const e =
|
|
2639
|
+
const yo = (n) => {
|
|
2640
|
+
const e = Pe.c(191), {
|
|
2701
2641
|
editorData: t,
|
|
2702
2642
|
row: r,
|
|
2703
2643
|
action: s,
|
|
@@ -2708,308 +2648,309 @@ const xo = (n) => {
|
|
|
2708
2648
|
scaleSplitCount: u,
|
|
2709
2649
|
startLeft: l,
|
|
2710
2650
|
gridSnap: h,
|
|
2711
|
-
disableDrag:
|
|
2651
|
+
disableDrag: d,
|
|
2712
2652
|
scaleCount: m,
|
|
2713
|
-
maxScaleCount:
|
|
2653
|
+
maxScaleCount: w,
|
|
2714
2654
|
setScaleCount: v,
|
|
2715
2655
|
onActionMoveStart: p,
|
|
2716
|
-
onActionMoving:
|
|
2656
|
+
onActionMoving: R,
|
|
2717
2657
|
onActionMoveEnd: b,
|
|
2718
|
-
onActionResizeStart:
|
|
2719
|
-
onActionResizeEnd:
|
|
2658
|
+
onActionResizeStart: S,
|
|
2659
|
+
onActionResizeEnd: _,
|
|
2720
2660
|
onActionResizing: P,
|
|
2721
|
-
|
|
2722
|
-
setEditorData:
|
|
2723
|
-
onClickAction:
|
|
2724
|
-
onClickActionOnly:
|
|
2661
|
+
snapData: T,
|
|
2662
|
+
setEditorData: D,
|
|
2663
|
+
onClickAction: U,
|
|
2664
|
+
onClickActionOnly: O,
|
|
2725
2665
|
onDoubleClickAction: W,
|
|
2726
|
-
onContextMenuAction:
|
|
2727
|
-
getActionRender:
|
|
2728
|
-
handleTime:
|
|
2729
|
-
scrollContainerRef:
|
|
2730
|
-
} = n,
|
|
2731
|
-
id:
|
|
2732
|
-
maxEnd:
|
|
2733
|
-
minStart:
|
|
2734
|
-
end:
|
|
2735
|
-
start:
|
|
2666
|
+
onContextMenuAction: z,
|
|
2667
|
+
getActionRender: Y,
|
|
2668
|
+
handleTime: C,
|
|
2669
|
+
scrollContainerRef: j
|
|
2670
|
+
} = n, I = ce(null), E = ce(!1), {
|
|
2671
|
+
id: A,
|
|
2672
|
+
maxEnd: M,
|
|
2673
|
+
minStart: Z,
|
|
2674
|
+
end: ee,
|
|
2675
|
+
start: f,
|
|
2736
2676
|
selected: y,
|
|
2737
|
-
flexible:
|
|
2738
|
-
movable:
|
|
2739
|
-
effectId:
|
|
2740
|
-
} = s,
|
|
2677
|
+
flexible: N,
|
|
2678
|
+
movable: H,
|
|
2679
|
+
effectId: Q
|
|
2680
|
+
} = s, X = N === void 0 ? !0 : N, B = H === void 0 ? !0 : H, L = c ?? Xt, k = a ?? Gt, $ = l ?? Zt, Qe = u ?? Qn, et = w ?? Number.MAX_SAFE_INTEGER, We = Z || 0;
|
|
2681
|
+
let Le;
|
|
2682
|
+
e[0] !== L || e[1] !== k || e[2] !== $ || e[3] !== We ? (Le = At(We, {
|
|
2683
|
+
startLeft: $,
|
|
2684
|
+
scale: L,
|
|
2685
|
+
scaleWidth: k
|
|
2686
|
+
}), e[0] = L, e[1] = k, e[2] = $, e[3] = We, e[4] = Le) : Le = e[4];
|
|
2687
|
+
const Re = Le, Ye = M || Number.MAX_VALUE;
|
|
2741
2688
|
let Oe;
|
|
2742
|
-
e[
|
|
2743
|
-
startLeft:
|
|
2689
|
+
e[5] !== L || e[6] !== k || e[7] !== $ || e[8] !== Ye ? (Oe = At(Ye, {
|
|
2690
|
+
startLeft: $,
|
|
2744
2691
|
scale: L,
|
|
2745
|
-
scaleWidth:
|
|
2746
|
-
}), e[
|
|
2747
|
-
const
|
|
2692
|
+
scaleWidth: k
|
|
2693
|
+
}), e[5] = L, e[6] = k, e[7] = $, e[8] = Ye, e[9] = Oe) : Oe = e[9];
|
|
2694
|
+
const Ce = Math.min(et * k + $, Oe);
|
|
2748
2695
|
let Me;
|
|
2749
|
-
e[
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
scaleWidth: I
|
|
2753
|
-
}), e[5] = L, e[6] = I, e[7] = V, e[8] = Ge, e[9] = Me) : Me = e[9];
|
|
2754
|
-
const Ce = Math.min(rt * I + V, Me);
|
|
2755
|
-
let Ne;
|
|
2756
|
-
e[10] !== te || e[11] !== L || e[12] !== I || e[13] !== V || e[14] !== d ? (Ne = vn({
|
|
2757
|
-
start: d,
|
|
2758
|
-
end: te
|
|
2696
|
+
e[10] !== ee || e[11] !== L || e[12] !== k || e[13] !== $ || e[14] !== f ? (Me = vn({
|
|
2697
|
+
start: f,
|
|
2698
|
+
end: ee
|
|
2759
2699
|
}, {
|
|
2760
|
-
startLeft:
|
|
2700
|
+
startLeft: $,
|
|
2761
2701
|
scale: L,
|
|
2762
|
-
scaleWidth:
|
|
2763
|
-
}), e[10] =
|
|
2764
|
-
const
|
|
2702
|
+
scaleWidth: k
|
|
2703
|
+
}), e[10] = ee, e[11] = L, e[12] = k, e[13] = $, e[14] = f, e[15] = Me) : Me = e[15];
|
|
2704
|
+
const Pt = Me, [tt, ze] = Mt(null), _e = tt ?? Pt, je = k / Qe;
|
|
2705
|
+
let Ne;
|
|
2706
|
+
e[16] !== Q || e[17] !== o || e[18] !== X || e[19] !== B || e[20] !== y ? (Ne = fe(Eo("action", B && "action-movable", y && "action-selected", X && "action-flexible", o[Q] && `action-effect-${Q}`)), e[16] = Q, e[17] = o, e[18] = X, e[19] = B, e[20] = y, e[21] = Ne) : Ne = e[21];
|
|
2707
|
+
const Fe = Ne;
|
|
2765
2708
|
let Ie;
|
|
2766
|
-
e[
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
const re = Hr(pe + ge, {
|
|
2771
|
-
startLeft: V,
|
|
2709
|
+
e[22] !== k || e[23] !== $ || e[24] !== m || e[25] !== v ? (Ie = (ge, ve) => {
|
|
2710
|
+
console.log("handleScaleCount", ge, ve);
|
|
2711
|
+
const oe = Or(ge + ve, {
|
|
2712
|
+
startLeft: $,
|
|
2772
2713
|
scaleCount: m,
|
|
2773
|
-
scaleWidth:
|
|
2714
|
+
scaleWidth: k
|
|
2774
2715
|
});
|
|
2775
|
-
|
|
2776
|
-
}, e[22] =
|
|
2777
|
-
const Ae =
|
|
2778
|
-
let
|
|
2779
|
-
e[27] !== s || e[28] !== p || e[29] !== r ? (
|
|
2716
|
+
oe !== m && v(oe);
|
|
2717
|
+
}, e[22] = k, e[23] = $, e[24] = m, e[25] = v, e[26] = Ie) : Ie = e[26];
|
|
2718
|
+
const Ae = Ie;
|
|
2719
|
+
let ke;
|
|
2720
|
+
e[27] !== s || e[28] !== p || e[29] !== r ? (ke = () => {
|
|
2780
2721
|
p && p({
|
|
2781
2722
|
action: s,
|
|
2782
2723
|
row: r
|
|
2783
2724
|
});
|
|
2784
|
-
}, e[27] = s, e[28] = p, e[29] = r, e[30] =
|
|
2785
|
-
const
|
|
2725
|
+
}, e[27] = s, e[28] = p, e[29] = r, e[30] = ke) : ke = e[30];
|
|
2726
|
+
const Xe = ke;
|
|
2786
2727
|
let ye;
|
|
2787
|
-
e[31] !== s || e[32] !== Ae || e[33] !==
|
|
2728
|
+
e[31] !== s || e[32] !== Ae || e[33] !== R || e[34] !== r || e[35] !== L || e[36] !== k || e[37] !== $ ? (ye = (ge) => {
|
|
2788
2729
|
const {
|
|
2789
|
-
left:
|
|
2790
|
-
width:
|
|
2791
|
-
} =
|
|
2792
|
-
if (
|
|
2730
|
+
left: ve,
|
|
2731
|
+
width: oe
|
|
2732
|
+
} = ge;
|
|
2733
|
+
if (E.current = !0, R) {
|
|
2793
2734
|
const {
|
|
2794
|
-
start:
|
|
2735
|
+
start: ue,
|
|
2795
2736
|
end: ie
|
|
2796
|
-
} =
|
|
2797
|
-
left:
|
|
2798
|
-
width:
|
|
2737
|
+
} = Dt({
|
|
2738
|
+
left: ve,
|
|
2739
|
+
width: oe
|
|
2799
2740
|
}, {
|
|
2800
|
-
scaleWidth:
|
|
2741
|
+
scaleWidth: k,
|
|
2801
2742
|
scale: L,
|
|
2802
|
-
startLeft:
|
|
2743
|
+
startLeft: $
|
|
2803
2744
|
});
|
|
2804
|
-
if (
|
|
2745
|
+
if (R({
|
|
2805
2746
|
action: s,
|
|
2806
2747
|
row: r,
|
|
2807
|
-
start:
|
|
2748
|
+
start: ue,
|
|
2808
2749
|
end: ie
|
|
2809
2750
|
}) === !1)
|
|
2810
2751
|
return !1;
|
|
2811
2752
|
}
|
|
2812
|
-
|
|
2813
|
-
left:
|
|
2814
|
-
width:
|
|
2815
|
-
}), Ae(
|
|
2816
|
-
}, e[31] = s, e[32] = Ae, e[33] =
|
|
2753
|
+
ze({
|
|
2754
|
+
left: ve,
|
|
2755
|
+
width: oe
|
|
2756
|
+
}), Ae(ve, oe);
|
|
2757
|
+
}, e[31] = s, e[32] = Ae, e[33] = R, e[34] = r, e[35] = L, e[36] = k, e[37] = $, e[38] = ye) : ye = e[38];
|
|
2817
2758
|
const Te = ye;
|
|
2818
2759
|
let xe;
|
|
2819
|
-
e[39] !== t || e[40] !==
|
|
2760
|
+
e[39] !== t || e[40] !== A || e[41] !== b || e[42] !== r || e[43] !== L || e[44] !== k || e[45] !== $ || e[46] !== D ? (xe = (ge) => {
|
|
2820
2761
|
const {
|
|
2821
|
-
left:
|
|
2822
|
-
width:
|
|
2823
|
-
} =
|
|
2824
|
-
start:
|
|
2762
|
+
left: ve,
|
|
2763
|
+
width: oe
|
|
2764
|
+
} = ge, {
|
|
2765
|
+
start: ue,
|
|
2825
2766
|
end: ie
|
|
2826
|
-
} =
|
|
2827
|
-
left:
|
|
2828
|
-
width:
|
|
2767
|
+
} = Dt({
|
|
2768
|
+
left: ve,
|
|
2769
|
+
width: oe
|
|
2829
2770
|
}, {
|
|
2830
|
-
scaleWidth:
|
|
2771
|
+
scaleWidth: k,
|
|
2831
2772
|
scale: L,
|
|
2832
|
-
startLeft:
|
|
2833
|
-
}), le = t.find((
|
|
2773
|
+
startLeft: $
|
|
2774
|
+
}), le = t.find((Be) => Be.id === r.id);
|
|
2834
2775
|
if (!le)
|
|
2835
2776
|
return;
|
|
2836
|
-
const
|
|
2837
|
-
|
|
2838
|
-
action:
|
|
2777
|
+
const He = le.actions.find((Be) => Be.id === A);
|
|
2778
|
+
He && (He.start = ue, He.end = ie, D(t), b && b({
|
|
2779
|
+
action: He,
|
|
2839
2780
|
row: r,
|
|
2840
|
-
start:
|
|
2781
|
+
start: ue,
|
|
2841
2782
|
end: ie
|
|
2842
|
-
}),
|
|
2843
|
-
}, e[39] = t, e[40] =
|
|
2844
|
-
const
|
|
2845
|
-
let
|
|
2846
|
-
e[48] !== s || e[49] !==
|
|
2847
|
-
|
|
2783
|
+
}), ze(null));
|
|
2784
|
+
}, e[39] = t, e[40] = A, e[41] = b, e[42] = r, e[43] = L, e[44] = k, e[45] = $, e[46] = D, e[47] = xe) : xe = e[47];
|
|
2785
|
+
const Ve = xe;
|
|
2786
|
+
let V;
|
|
2787
|
+
e[48] !== s || e[49] !== S || e[50] !== r ? (V = (ge) => {
|
|
2788
|
+
S && S({
|
|
2848
2789
|
action: s,
|
|
2849
2790
|
row: r,
|
|
2850
|
-
dir:
|
|
2791
|
+
dir: ge
|
|
2851
2792
|
});
|
|
2852
|
-
}, e[48] = s, e[49] =
|
|
2853
|
-
const q =
|
|
2854
|
-
let
|
|
2855
|
-
e[52] !== s || e[53] !== Ae || e[54] !== P || e[55] !== r || e[56] !== L || e[57] !==
|
|
2793
|
+
}, e[48] = s, e[49] = S, e[50] = r, e[51] = V) : V = e[51];
|
|
2794
|
+
const q = V;
|
|
2795
|
+
let G;
|
|
2796
|
+
e[52] !== s || e[53] !== Ae || e[54] !== P || e[55] !== r || e[56] !== L || e[57] !== k || e[58] !== $ ? (G = (ge, ve) => {
|
|
2856
2797
|
const {
|
|
2857
|
-
left:
|
|
2858
|
-
width:
|
|
2859
|
-
} =
|
|
2860
|
-
if (
|
|
2798
|
+
left: oe,
|
|
2799
|
+
width: ue
|
|
2800
|
+
} = ve;
|
|
2801
|
+
if (E.current = !0, P) {
|
|
2861
2802
|
const {
|
|
2862
2803
|
start: ie,
|
|
2863
2804
|
end: le
|
|
2864
|
-
} =
|
|
2865
|
-
left:
|
|
2866
|
-
width:
|
|
2805
|
+
} = Dt({
|
|
2806
|
+
left: oe,
|
|
2807
|
+
width: ue
|
|
2867
2808
|
}, {
|
|
2868
|
-
scaleWidth:
|
|
2809
|
+
scaleWidth: k,
|
|
2869
2810
|
scale: L,
|
|
2870
|
-
startLeft:
|
|
2811
|
+
startLeft: $
|
|
2871
2812
|
});
|
|
2872
2813
|
if (P({
|
|
2873
2814
|
action: s,
|
|
2874
2815
|
row: r,
|
|
2875
2816
|
start: ie,
|
|
2876
2817
|
end: le,
|
|
2877
|
-
dir:
|
|
2818
|
+
dir: ge
|
|
2878
2819
|
}) === !1)
|
|
2879
2820
|
return !1;
|
|
2880
2821
|
}
|
|
2881
|
-
|
|
2882
|
-
left:
|
|
2883
|
-
width:
|
|
2884
|
-
}), Ae(
|
|
2885
|
-
}, e[52] = s, e[53] = Ae, e[54] = P, e[55] = r, e[56] = L, e[57] =
|
|
2886
|
-
const
|
|
2887
|
-
let
|
|
2888
|
-
e[60] !== t || e[61] !==
|
|
2822
|
+
ze({
|
|
2823
|
+
left: oe,
|
|
2824
|
+
width: ue
|
|
2825
|
+
}), Ae(oe, ue);
|
|
2826
|
+
}, e[52] = s, e[53] = Ae, e[54] = P, e[55] = r, e[56] = L, e[57] = k, e[58] = $, e[59] = G) : G = e[59];
|
|
2827
|
+
const K = G;
|
|
2828
|
+
let he;
|
|
2829
|
+
e[60] !== t || e[61] !== A || e[62] !== _ || e[63] !== r || e[64] !== L || e[65] !== k || e[66] !== $ || e[67] !== D ? (he = (ge, ve) => {
|
|
2889
2830
|
const {
|
|
2890
|
-
left:
|
|
2891
|
-
width:
|
|
2892
|
-
} =
|
|
2831
|
+
left: oe,
|
|
2832
|
+
width: ue
|
|
2833
|
+
} = ve, {
|
|
2893
2834
|
start: ie,
|
|
2894
2835
|
end: le
|
|
2895
|
-
} =
|
|
2896
|
-
left:
|
|
2897
|
-
width:
|
|
2836
|
+
} = Dt({
|
|
2837
|
+
left: oe,
|
|
2838
|
+
width: ue
|
|
2898
2839
|
}, {
|
|
2899
|
-
scaleWidth:
|
|
2840
|
+
scaleWidth: k,
|
|
2900
2841
|
scale: L,
|
|
2901
|
-
startLeft:
|
|
2902
|
-
}),
|
|
2903
|
-
if (!
|
|
2842
|
+
startLeft: $
|
|
2843
|
+
}), He = t.find((nn) => nn.id === r.id);
|
|
2844
|
+
if (!He)
|
|
2904
2845
|
return;
|
|
2905
|
-
const
|
|
2906
|
-
|
|
2907
|
-
action:
|
|
2846
|
+
const Be = He.actions.find((nn) => nn.id === A);
|
|
2847
|
+
Be && (Be.start = ie, Be.end = le, D(t), _ && _({
|
|
2848
|
+
action: Be,
|
|
2908
2849
|
row: r,
|
|
2909
2850
|
start: ie,
|
|
2910
2851
|
end: le,
|
|
2911
|
-
dir:
|
|
2912
|
-
}),
|
|
2913
|
-
}, e[60] = t, e[61] =
|
|
2914
|
-
const
|
|
2915
|
-
let
|
|
2916
|
-
if (e[69] !== s || e[70] !==
|
|
2917
|
-
const
|
|
2852
|
+
dir: ge
|
|
2853
|
+
}), ze(null));
|
|
2854
|
+
}, e[60] = t, e[61] = A, e[62] = _, e[63] = r, e[64] = L, e[65] = k, e[66] = $, e[67] = D, e[68] = he) : he = e[68];
|
|
2855
|
+
const me = he;
|
|
2856
|
+
let J, re, F, ne, se, ae, pe, nt, rt, st, ot, it, ct, at, lt, ut, Ue, $e, ft, dt, ht, mt, pt, gt, vt, bt;
|
|
2857
|
+
if (e[69] !== s || e[70] !== Fe || e[71] !== d || e[72] !== X || e[73] !== Y || e[74] !== je || e[75] !== h || e[76] !== Te || e[77] !== Ve || e[78] !== Xe || e[79] !== me || e[80] !== q || e[81] !== K || e[82] !== C || e[83] !== Re || e[84] !== B || e[85] !== U || e[86] !== O || e[87] !== z || e[88] !== W || e[89] !== Ce || e[90] !== r || e[91] !== i || e[92] !== L || e[93] !== k || e[94] !== $ || e[95] !== j || e[96] !== T.assistPositions || e[97] !== _e.left || e[98] !== _e.width) {
|
|
2858
|
+
const ge = {
|
|
2918
2859
|
...s,
|
|
2919
|
-
...
|
|
2860
|
+
...Dt({
|
|
2920
2861
|
left: _e.left,
|
|
2921
2862
|
width: _e.width
|
|
2922
2863
|
}, {
|
|
2923
|
-
startLeft:
|
|
2924
|
-
scaleWidth:
|
|
2864
|
+
startLeft: $,
|
|
2865
|
+
scaleWidth: k,
|
|
2925
2866
|
scale: L
|
|
2926
2867
|
})
|
|
2927
|
-
},
|
|
2868
|
+
}, ve = {
|
|
2928
2869
|
...r,
|
|
2929
2870
|
actions: [...r.actions]
|
|
2930
2871
|
};
|
|
2931
|
-
r.actions.includes(s) && (
|
|
2872
|
+
r.actions.includes(s) && (ve.actions[r.actions.indexOf(s)] = ge), J = xr, rt = I, st = j, ot = $, it = _e.left, ct = _e.width, at = h && je || dn, lt = h ? Math.max((je || dn) / 2, hn) : hn, ut = T.assistPositions, e[125] !== Re || e[126] !== Ce ? (Ue = () => ({
|
|
2932
2873
|
left: Re,
|
|
2933
2874
|
right: Ce
|
|
2934
|
-
}), e[125] = Re, e[126] = Ce, e[127] =
|
|
2935
|
-
let
|
|
2936
|
-
e[128] !==
|
|
2937
|
-
let
|
|
2938
|
-
e[131] !==
|
|
2939
|
-
left:
|
|
2940
|
-
right:
|
|
2941
|
-
}, e[134] =
|
|
2942
|
-
|
|
2943
|
-
}, e[137] =
|
|
2875
|
+
}), e[125] = Re, e[126] = Ce, e[127] = Ue) : Ue = e[127];
|
|
2876
|
+
let oe;
|
|
2877
|
+
e[128] !== d || e[129] !== X ? (oe = !d && X && `.${fe("action-left-stretch")}`, e[128] = d, e[129] = X, e[130] = oe) : oe = e[130];
|
|
2878
|
+
let ue;
|
|
2879
|
+
e[131] !== d || e[132] !== X ? (ue = !d && X && `.${fe("action-right-stretch")}`, e[131] = d, e[132] = X, e[133] = ue) : ue = e[133], e[134] !== oe || e[135] !== ue ? ($e = {
|
|
2880
|
+
left: oe,
|
|
2881
|
+
right: ue
|
|
2882
|
+
}, e[134] = oe, e[135] = ue, e[136] = $e) : $e = e[136], ft = !d && B, dt = !d && X, ht = Xe, mt = Te, pt = Ve, gt = q, vt = K, bt = me, e[137] === Symbol.for("react.memo_cache_sentinel") ? (re = () => {
|
|
2883
|
+
E.current = !1;
|
|
2884
|
+
}, e[137] = re) : re = e[137], e[138] !== s || e[139] !== C || e[140] !== U || e[141] !== O || e[142] !== r ? (F = (ie) => {
|
|
2944
2885
|
let le;
|
|
2945
|
-
|
|
2886
|
+
U && (le = C(ie), U(ie, {
|
|
2946
2887
|
row: r,
|
|
2947
2888
|
action: s,
|
|
2948
2889
|
time: le
|
|
2949
|
-
})), !
|
|
2890
|
+
})), !E.current && O && (le === void 0 && (le = C(ie)), O(ie, {
|
|
2950
2891
|
row: r,
|
|
2951
2892
|
action: s,
|
|
2952
2893
|
time: le
|
|
2953
2894
|
}));
|
|
2954
|
-
}, e[138] = s, e[139] =
|
|
2895
|
+
}, e[138] = s, e[139] = C, e[140] = U, e[141] = O, e[142] = r, e[143] = F) : F = e[143], e[144] !== s || e[145] !== C || e[146] !== W || e[147] !== r ? (ne = (ie) => {
|
|
2955
2896
|
if (W) {
|
|
2956
|
-
const le =
|
|
2897
|
+
const le = C(ie);
|
|
2957
2898
|
W(ie, {
|
|
2958
2899
|
row: r,
|
|
2959
2900
|
action: s,
|
|
2960
2901
|
time: le
|
|
2961
2902
|
});
|
|
2962
2903
|
}
|
|
2963
|
-
}, e[144] = s, e[145] =
|
|
2964
|
-
if (
|
|
2965
|
-
const le =
|
|
2966
|
-
|
|
2904
|
+
}, e[144] = s, e[145] = C, e[146] = W, e[147] = r, e[148] = ne) : ne = e[148], e[149] !== s || e[150] !== C || e[151] !== z || e[152] !== r ? (se = (ie) => {
|
|
2905
|
+
if (z) {
|
|
2906
|
+
const le = C(ie);
|
|
2907
|
+
z(ie, {
|
|
2967
2908
|
row: r,
|
|
2968
2909
|
action: s,
|
|
2969
2910
|
time: le
|
|
2970
2911
|
});
|
|
2971
2912
|
}
|
|
2972
|
-
}, e[149] = s, e[150] =
|
|
2913
|
+
}, e[149] = s, e[150] = C, e[151] = z, e[152] = r, e[153] = se) : se = e[153], ae = Fe, e[154] !== i ? (pe = {
|
|
2973
2914
|
height: i
|
|
2974
|
-
}, e[154] = i, e[155] =
|
|
2915
|
+
}, e[154] = i, e[155] = pe) : pe = e[155], nt = Y && Y(ge, ve), e[69] = s, e[70] = Fe, e[71] = d, e[72] = X, e[73] = Y, e[74] = je, e[75] = h, e[76] = Te, e[77] = Ve, e[78] = Xe, e[79] = me, e[80] = q, e[81] = K, e[82] = C, e[83] = Re, e[84] = B, e[85] = U, e[86] = O, e[87] = z, e[88] = W, e[89] = Ce, e[90] = r, e[91] = i, e[92] = L, e[93] = k, e[94] = $, e[95] = j, e[96] = T.assistPositions, e[97] = _e.left, e[98] = _e.width, e[99] = J, e[100] = re, e[101] = F, e[102] = ne, e[103] = se, e[104] = ae, e[105] = pe, e[106] = nt, e[107] = rt, e[108] = st, e[109] = ot, e[110] = it, e[111] = ct, e[112] = at, e[113] = lt, e[114] = ut, e[115] = Ue, e[116] = $e, e[117] = ft, e[118] = dt, e[119] = ht, e[120] = mt, e[121] = pt, e[122] = gt, e[123] = vt, e[124] = bt;
|
|
2975
2916
|
} else
|
|
2976
|
-
|
|
2977
|
-
let
|
|
2978
|
-
e[156] !==
|
|
2917
|
+
J = e[99], re = e[100], F = e[101], ne = e[102], se = e[103], ae = e[104], pe = e[105], nt = e[106], rt = e[107], st = e[108], ot = e[109], it = e[110], ct = e[111], at = e[112], lt = e[113], ut = e[114], Ue = e[115], $e = e[116], ft = e[117], dt = e[118], ht = e[119], mt = e[120], pt = e[121], gt = e[122], vt = e[123], bt = e[124];
|
|
2918
|
+
let St;
|
|
2919
|
+
e[156] !== X ? (St = X && /* @__PURE__ */ x.jsx("div", { className: fe("action-left-stretch"), style: {
|
|
2979
2920
|
touchAction: "none"
|
|
2980
|
-
} }), e[156] =
|
|
2981
|
-
let
|
|
2982
|
-
e[158] !==
|
|
2921
|
+
} }), e[156] = X, e[157] = St) : St = e[157];
|
|
2922
|
+
let _t;
|
|
2923
|
+
e[158] !== X ? (_t = X && /* @__PURE__ */ x.jsx("div", { className: fe("action-right-stretch"), style: {
|
|
2983
2924
|
touchAction: "none"
|
|
2984
|
-
} }), e[158] =
|
|
2985
|
-
let
|
|
2986
|
-
e[160] !==
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
] }), e[160] =
|
|
2925
|
+
} }), e[158] = X, e[159] = _t) : _t = e[159];
|
|
2926
|
+
let wt;
|
|
2927
|
+
e[160] !== re || e[161] !== F || e[162] !== ne || e[163] !== se || e[164] !== ae || e[165] !== pe || e[166] !== nt || e[167] !== St || e[168] !== _t ? (wt = /* @__PURE__ */ x.jsxs("div", { onMouseDown: re, onClick: F, onDoubleClick: ne, onContextMenu: se, className: ae, style: pe, children: [
|
|
2928
|
+
nt,
|
|
2929
|
+
St,
|
|
2930
|
+
_t
|
|
2931
|
+
] }), e[160] = re, e[161] = F, e[162] = ne, e[163] = se, e[164] = ae, e[165] = pe, e[166] = nt, e[167] = St, e[168] = _t, e[169] = wt) : wt = e[169];
|
|
2991
2932
|
let zt;
|
|
2992
|
-
return e[170] !==
|
|
2933
|
+
return e[170] !== J || e[171] !== rt || e[172] !== st || e[173] !== ot || e[174] !== it || e[175] !== ct || e[176] !== at || e[177] !== lt || e[178] !== ut || e[179] !== Ue || e[180] !== $e || e[181] !== ft || e[182] !== dt || e[183] !== ht || e[184] !== mt || e[185] !== pt || e[186] !== gt || e[187] !== vt || e[188] !== bt || e[189] !== wt ? (zt = /* @__PURE__ */ x.jsx(J, { ref: rt, parentRef: st, start: ot, left: it, width: ct, grid: at, snapDistance: lt, snapPositions: ut, getBounds: Ue, edges: $e, enableDragging: ft, enableResizing: dt, onDragStart: ht, onDrag: mt, onDragEnd: pt, onResizeStart: gt, onResize: vt, onResizeEnd: bt, children: wt }), e[170] = J, e[171] = rt, e[172] = st, e[173] = ot, e[174] = it, e[175] = ct, e[176] = at, e[177] = lt, e[178] = ut, e[179] = Ue, e[180] = $e, e[181] = ft, e[182] = dt, e[183] = ht, e[184] = mt, e[185] = pt, e[186] = gt, e[187] = vt, e[188] = bt, e[189] = wt, e[190] = zt) : zt = e[190], zt;
|
|
2993
2934
|
};
|
|
2994
|
-
function
|
|
2935
|
+
function yt(n, e, t) {
|
|
2995
2936
|
let r = t.initialDeps ?? [], s;
|
|
2996
2937
|
function o() {
|
|
2997
2938
|
var i, c, a, u;
|
|
2998
2939
|
let l;
|
|
2999
2940
|
t.key && ((i = t.debug) != null && i.call(t)) && (l = Date.now());
|
|
3000
2941
|
const h = n();
|
|
3001
|
-
if (!(h.length !== r.length || h.some((
|
|
2942
|
+
if (!(h.length !== r.length || h.some((w, v) => r[v] !== w)))
|
|
3002
2943
|
return s;
|
|
3003
2944
|
r = h;
|
|
3004
2945
|
let m;
|
|
3005
2946
|
if (t.key && ((c = t.debug) != null && c.call(t)) && (m = Date.now()), s = e(...h), t.key && ((a = t.debug) != null && a.call(t))) {
|
|
3006
|
-
const
|
|
3007
|
-
for (b = String(b); b.length <
|
|
2947
|
+
const w = Math.round((Date.now() - l) * 100) / 100, v = Math.round((Date.now() - m) * 100) / 100, p = v / 16, R = (b, S) => {
|
|
2948
|
+
for (b = String(b); b.length < S; )
|
|
3008
2949
|
b = " " + b;
|
|
3009
2950
|
return b;
|
|
3010
2951
|
};
|
|
3011
2952
|
console.info(
|
|
3012
|
-
`%c⏱ ${
|
|
2953
|
+
`%c⏱ ${R(v, 5)} /${R(w, 5)} ms`,
|
|
3013
2954
|
`
|
|
3014
2955
|
font-size: .6rem;
|
|
3015
2956
|
font-weight: bold;
|
|
@@ -3026,25 +2967,25 @@ function Rt(n, e, t) {
|
|
|
3026
2967
|
r = i;
|
|
3027
2968
|
}, o;
|
|
3028
2969
|
}
|
|
3029
|
-
function
|
|
2970
|
+
function Yn(n, e) {
|
|
3030
2971
|
if (n === void 0)
|
|
3031
2972
|
throw new Error("Unexpected undefined");
|
|
3032
2973
|
return n;
|
|
3033
2974
|
}
|
|
3034
|
-
const
|
|
2975
|
+
const xo = (n, e) => Math.abs(n - e) < 1.01, Ro = (n, e, t) => {
|
|
3035
2976
|
let r;
|
|
3036
2977
|
return function(...s) {
|
|
3037
2978
|
n.clearTimeout(r), r = n.setTimeout(() => e.apply(this, s), t);
|
|
3038
2979
|
};
|
|
3039
|
-
},
|
|
2980
|
+
}, Xn = (n) => {
|
|
3040
2981
|
const { offsetWidth: e, offsetHeight: t } = n;
|
|
3041
2982
|
return { width: e, height: t };
|
|
3042
|
-
},
|
|
2983
|
+
}, Co = (n) => n, Ao = (n) => {
|
|
3043
2984
|
const e = Math.max(n.startIndex - n.overscan, 0), t = Math.min(n.endIndex + n.overscan, n.count - 1), r = [];
|
|
3044
2985
|
for (let s = e; s <= t; s++)
|
|
3045
2986
|
r.push(s);
|
|
3046
2987
|
return r;
|
|
3047
|
-
},
|
|
2988
|
+
}, To = (n, e) => {
|
|
3048
2989
|
const t = n.scrollElement;
|
|
3049
2990
|
if (!t)
|
|
3050
2991
|
return;
|
|
@@ -3055,7 +2996,7 @@ const Ro = (n, e) => Math.abs(n - e) < 1.01, Co = (n, e, t) => {
|
|
|
3055
2996
|
const { width: c, height: a } = i;
|
|
3056
2997
|
e({ width: Math.round(c), height: Math.round(a) });
|
|
3057
2998
|
};
|
|
3058
|
-
if (s(
|
|
2999
|
+
if (s(Xn(t)), !r.ResizeObserver)
|
|
3059
3000
|
return () => {
|
|
3060
3001
|
};
|
|
3061
3002
|
const o = new r.ResizeObserver((i) => {
|
|
@@ -3068,7 +3009,7 @@ const Ro = (n, e) => Math.abs(n - e) < 1.01, Co = (n, e, t) => {
|
|
|
3068
3009
|
return;
|
|
3069
3010
|
}
|
|
3070
3011
|
}
|
|
3071
|
-
s(
|
|
3012
|
+
s(Xn(t));
|
|
3072
3013
|
};
|
|
3073
3014
|
n.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(c) : c();
|
|
3074
3015
|
});
|
|
@@ -3077,7 +3018,7 @@ const Ro = (n, e) => Math.abs(n - e) < 1.01, Co = (n, e, t) => {
|
|
|
3077
3018
|
};
|
|
3078
3019
|
}, Gn = {
|
|
3079
3020
|
passive: !0
|
|
3080
|
-
},
|
|
3021
|
+
}, Kn = typeof window > "u" ? !0 : "onscrollend" in window, Po = (n, e) => {
|
|
3081
3022
|
const t = n.scrollElement;
|
|
3082
3023
|
if (!t)
|
|
3083
3024
|
return;
|
|
@@ -3085,23 +3026,23 @@ const Ro = (n, e) => Math.abs(n - e) < 1.01, Co = (n, e, t) => {
|
|
|
3085
3026
|
if (!r)
|
|
3086
3027
|
return;
|
|
3087
3028
|
let s = 0;
|
|
3088
|
-
const o = n.options.useScrollendEvent &&
|
|
3089
|
-
} :
|
|
3029
|
+
const o = n.options.useScrollendEvent && Kn ? () => {
|
|
3030
|
+
} : Ro(
|
|
3090
3031
|
r,
|
|
3091
3032
|
() => {
|
|
3092
3033
|
e(s, !1);
|
|
3093
3034
|
},
|
|
3094
3035
|
n.options.isScrollingResetDelay
|
|
3095
3036
|
), i = (l) => () => {
|
|
3096
|
-
const { horizontal: h, isRtl:
|
|
3097
|
-
s = h ? t.scrollLeft * (
|
|
3037
|
+
const { horizontal: h, isRtl: d } = n.options;
|
|
3038
|
+
s = h ? t.scrollLeft * (d && -1 || 1) : t.scrollTop, o(), e(s, l);
|
|
3098
3039
|
}, c = i(!0), a = i(!1);
|
|
3099
3040
|
a(), t.addEventListener("scroll", c, Gn);
|
|
3100
|
-
const u = n.options.useScrollendEvent &&
|
|
3041
|
+
const u = n.options.useScrollendEvent && Kn;
|
|
3101
3042
|
return u && t.addEventListener("scrollend", a, Gn), () => {
|
|
3102
3043
|
t.removeEventListener("scroll", c), u && t.removeEventListener("scrollend", a);
|
|
3103
3044
|
};
|
|
3104
|
-
},
|
|
3045
|
+
}, Do = (n, e, t) => {
|
|
3105
3046
|
if (e?.borderBoxSize) {
|
|
3106
3047
|
const r = e.borderBoxSize[0];
|
|
3107
3048
|
if (r)
|
|
@@ -3110,7 +3051,7 @@ const Ro = (n, e) => Math.abs(n - e) < 1.01, Co = (n, e, t) => {
|
|
|
3110
3051
|
);
|
|
3111
3052
|
}
|
|
3112
3053
|
return n[t.options.horizontal ? "offsetWidth" : "offsetHeight"];
|
|
3113
|
-
},
|
|
3054
|
+
}, Lo = (n, {
|
|
3114
3055
|
adjustments: e = 0,
|
|
3115
3056
|
behavior: t
|
|
3116
3057
|
}, r) => {
|
|
@@ -3121,7 +3062,7 @@ const Ro = (n, e) => Math.abs(n - e) < 1.01, Co = (n, e, t) => {
|
|
|
3121
3062
|
behavior: t
|
|
3122
3063
|
});
|
|
3123
3064
|
};
|
|
3124
|
-
class
|
|
3065
|
+
class Oo {
|
|
3125
3066
|
constructor(e) {
|
|
3126
3067
|
this.unsubs = [], this.scrollElement = null, this.targetWindow = null, this.isScrolling = !1, this.measurementsCache = [], this.itemSizeCache = /* @__PURE__ */ new Map(), this.pendingMeasuredCacheIndexes = [], this.scrollRect = null, this.scrollOffset = null, this.scrollDirection = null, this.scrollAdjustments = 0, this.elementsCache = /* @__PURE__ */ new Map(), this.observer = /* @__PURE__ */ (() => {
|
|
3127
3068
|
let t = null;
|
|
@@ -3159,11 +3100,11 @@ class Mo {
|
|
|
3159
3100
|
scrollPaddingStart: 0,
|
|
3160
3101
|
scrollPaddingEnd: 0,
|
|
3161
3102
|
horizontal: !1,
|
|
3162
|
-
getItemKey:
|
|
3163
|
-
rangeExtractor:
|
|
3103
|
+
getItemKey: Co,
|
|
3104
|
+
rangeExtractor: Ao,
|
|
3164
3105
|
onChange: () => {
|
|
3165
3106
|
},
|
|
3166
|
-
measureElement:
|
|
3107
|
+
measureElement: Do,
|
|
3167
3108
|
initialRect: { width: 0, height: 0 },
|
|
3168
3109
|
scrollMargin: 0,
|
|
3169
3110
|
gap: 0,
|
|
@@ -3180,7 +3121,7 @@ class Mo {
|
|
|
3180
3121
|
}, this.notify = (t) => {
|
|
3181
3122
|
var r, s;
|
|
3182
3123
|
(s = (r = this.options).onChange) == null || s.call(r, this, t);
|
|
3183
|
-
}, this.maybeNotify =
|
|
3124
|
+
}, this.maybeNotify = yt(
|
|
3184
3125
|
() => (this.calculateRange(), [
|
|
3185
3126
|
this.isScrolling,
|
|
3186
3127
|
this.range ? this.range.startIndex : null,
|
|
@@ -3238,7 +3179,7 @@ class Mo {
|
|
|
3238
3179
|
break;
|
|
3239
3180
|
}
|
|
3240
3181
|
return o.size === this.options.lanes ? Array.from(o.values()).sort((i, c) => i.end === c.end ? i.index - c.index : i.end - c.end)[0] : void 0;
|
|
3241
|
-
}, this.getMeasurementOptions =
|
|
3182
|
+
}, this.getMeasurementOptions = yt(
|
|
3242
3183
|
() => [
|
|
3243
3184
|
this.options.count,
|
|
3244
3185
|
this.options.paddingStart,
|
|
@@ -3256,7 +3197,7 @@ class Mo {
|
|
|
3256
3197
|
{
|
|
3257
3198
|
key: !1
|
|
3258
3199
|
}
|
|
3259
|
-
), this.getMeasurements =
|
|
3200
|
+
), this.getMeasurements = yt(
|
|
3260
3201
|
() => [this.getMeasurementOptions(), this.itemSizeCache],
|
|
3261
3202
|
({ count: t, paddingStart: r, scrollMargin: s, getItemKey: o, enabled: i }, c) => {
|
|
3262
3203
|
if (!i)
|
|
@@ -3268,14 +3209,14 @@ class Mo {
|
|
|
3268
3209
|
this.pendingMeasuredCacheIndexes = [];
|
|
3269
3210
|
const u = this.measurementsCache.slice(0, a);
|
|
3270
3211
|
for (let l = a; l < t; l++) {
|
|
3271
|
-
const h = o(l),
|
|
3212
|
+
const h = o(l), d = this.options.lanes === 1 ? u[l - 1] : this.getFurthestMeasurement(u, l), m = d ? d.end + this.options.gap : r + s, w = c.get(h), v = typeof w == "number" ? w : this.options.estimateSize(l), p = m + v, R = d ? d.lane : l % this.options.lanes;
|
|
3272
3213
|
u[l] = {
|
|
3273
3214
|
index: l,
|
|
3274
3215
|
start: m,
|
|
3275
3216
|
size: v,
|
|
3276
3217
|
end: p,
|
|
3277
3218
|
key: h,
|
|
3278
|
-
lane:
|
|
3219
|
+
lane: R
|
|
3279
3220
|
};
|
|
3280
3221
|
}
|
|
3281
3222
|
return this.measurementsCache = u, u;
|
|
@@ -3284,14 +3225,14 @@ class Mo {
|
|
|
3284
3225
|
key: process.env.NODE_ENV !== "production" && "getMeasurements",
|
|
3285
3226
|
debug: () => this.options.debug
|
|
3286
3227
|
}
|
|
3287
|
-
), this.calculateRange =
|
|
3228
|
+
), this.calculateRange = yt(
|
|
3288
3229
|
() => [
|
|
3289
3230
|
this.getMeasurements(),
|
|
3290
3231
|
this.getSize(),
|
|
3291
3232
|
this.getScrollOffset(),
|
|
3292
3233
|
this.options.lanes
|
|
3293
3234
|
],
|
|
3294
|
-
(t, r, s, o) => this.range = t.length > 0 && r > 0 ?
|
|
3235
|
+
(t, r, s, o) => this.range = t.length > 0 && r > 0 ? Mo({
|
|
3295
3236
|
measurements: t,
|
|
3296
3237
|
outerSize: r,
|
|
3297
3238
|
scrollOffset: s,
|
|
@@ -3301,7 +3242,7 @@ class Mo {
|
|
|
3301
3242
|
key: process.env.NODE_ENV !== "production" && "calculateRange",
|
|
3302
3243
|
debug: () => this.options.debug
|
|
3303
3244
|
}
|
|
3304
|
-
), this.getVirtualIndexes =
|
|
3245
|
+
), this.getVirtualIndexes = yt(
|
|
3305
3246
|
() => {
|
|
3306
3247
|
let t = null, r = null;
|
|
3307
3248
|
const s = this.calculateRange();
|
|
@@ -3351,7 +3292,7 @@ class Mo {
|
|
|
3351
3292
|
return;
|
|
3352
3293
|
}
|
|
3353
3294
|
this._measureElement(t, void 0);
|
|
3354
|
-
}, this.getVirtualItems =
|
|
3295
|
+
}, this.getVirtualItems = yt(
|
|
3355
3296
|
() => [this.getVirtualIndexes(), this.getMeasurements()],
|
|
3356
3297
|
(t, r) => {
|
|
3357
3298
|
const s = [];
|
|
@@ -3368,11 +3309,11 @@ class Mo {
|
|
|
3368
3309
|
), this.getVirtualItemForOffset = (t) => {
|
|
3369
3310
|
const r = this.getMeasurements();
|
|
3370
3311
|
if (r.length !== 0)
|
|
3371
|
-
return
|
|
3372
|
-
r[
|
|
3312
|
+
return Yn(
|
|
3313
|
+
r[Rr(
|
|
3373
3314
|
0,
|
|
3374
3315
|
r.length - 1,
|
|
3375
|
-
(s) =>
|
|
3316
|
+
(s) => Yn(r[s]).start,
|
|
3376
3317
|
t
|
|
3377
3318
|
)]
|
|
3378
3319
|
);
|
|
@@ -3418,14 +3359,14 @@ class Mo {
|
|
|
3418
3359
|
console.warn("Failed to get offset for index:", t);
|
|
3419
3360
|
return;
|
|
3420
3361
|
}
|
|
3421
|
-
const [h,
|
|
3362
|
+
const [h, d] = l;
|
|
3422
3363
|
this._scrollToOffset(h, { adjustments: void 0, behavior: s }), this.targetWindow.requestAnimationFrame(() => {
|
|
3423
|
-
const m = this.getScrollOffset(),
|
|
3424
|
-
if (!
|
|
3364
|
+
const m = this.getScrollOffset(), w = this.getOffsetForIndex(t, d);
|
|
3365
|
+
if (!w) {
|
|
3425
3366
|
console.warn("Failed to get offset for index:", t);
|
|
3426
3367
|
return;
|
|
3427
3368
|
}
|
|
3428
|
-
|
|
3369
|
+
xo(w[0], m) || a(d);
|
|
3429
3370
|
});
|
|
3430
3371
|
}, a = (u) => {
|
|
3431
3372
|
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(
|
|
@@ -3471,7 +3412,7 @@ class Mo {
|
|
|
3471
3412
|
}, this.setOptions(e);
|
|
3472
3413
|
}
|
|
3473
3414
|
}
|
|
3474
|
-
const
|
|
3415
|
+
const Rr = (n, e, t, r) => {
|
|
3475
3416
|
for (; n <= e; ) {
|
|
3476
3417
|
const s = (n + e) / 2 | 0, o = t(s);
|
|
3477
3418
|
if (o < r)
|
|
@@ -3483,7 +3424,7 @@ const Ar = (n, e, t, r) => {
|
|
|
3483
3424
|
}
|
|
3484
3425
|
return n > 0 ? n - 1 : 0;
|
|
3485
3426
|
};
|
|
3486
|
-
function
|
|
3427
|
+
function Mo({
|
|
3487
3428
|
measurements: n,
|
|
3488
3429
|
outerSize: e,
|
|
3489
3430
|
scrollOffset: t,
|
|
@@ -3495,7 +3436,7 @@ function No({
|
|
|
3495
3436
|
startIndex: 0,
|
|
3496
3437
|
endIndex: s
|
|
3497
3438
|
};
|
|
3498
|
-
let i =
|
|
3439
|
+
let i = Rr(
|
|
3499
3440
|
0,
|
|
3500
3441
|
s,
|
|
3501
3442
|
o,
|
|
@@ -3519,28 +3460,28 @@ function No({
|
|
|
3519
3460
|
}
|
|
3520
3461
|
return { startIndex: i, endIndex: c };
|
|
3521
3462
|
}
|
|
3522
|
-
const
|
|
3523
|
-
function
|
|
3463
|
+
const qn = typeof document < "u" ? g.useLayoutEffect : g.useEffect;
|
|
3464
|
+
function No(n) {
|
|
3524
3465
|
const e = g.useReducer(() => ({}), {})[1], t = {
|
|
3525
3466
|
...n,
|
|
3526
3467
|
onChange: (s, o) => {
|
|
3527
3468
|
var i;
|
|
3528
|
-
o ?
|
|
3469
|
+
o ? Ir(e) : e(), (i = n.onChange) == null || i.call(n, s, o);
|
|
3529
3470
|
}
|
|
3530
3471
|
}, [r] = g.useState(
|
|
3531
|
-
() => new
|
|
3472
|
+
() => new Oo(t)
|
|
3532
3473
|
);
|
|
3533
|
-
return r.setOptions(t),
|
|
3474
|
+
return r.setOptions(t), qn(() => r._didMount(), []), qn(() => r._willUpdate()), r;
|
|
3534
3475
|
}
|
|
3535
|
-
function
|
|
3536
|
-
return
|
|
3537
|
-
observeElementRect:
|
|
3538
|
-
observeElementOffset:
|
|
3539
|
-
scrollToFn:
|
|
3476
|
+
function Cr(n) {
|
|
3477
|
+
return No({
|
|
3478
|
+
observeElementRect: To,
|
|
3479
|
+
observeElementOffset: Po,
|
|
3480
|
+
scrollToFn: Lo,
|
|
3540
3481
|
...n
|
|
3541
3482
|
});
|
|
3542
3483
|
}
|
|
3543
|
-
const
|
|
3484
|
+
const Io = (n) => {
|
|
3544
3485
|
const {
|
|
3545
3486
|
rowData: e,
|
|
3546
3487
|
style: t = {},
|
|
@@ -3553,124 +3494,135 @@ const ko = (n) => {
|
|
|
3553
3494
|
scaleWidth: u
|
|
3554
3495
|
} = n, l = ["edit-row"];
|
|
3555
3496
|
e?.selected && l.push("edit-row-selected");
|
|
3556
|
-
const h = a ??
|
|
3497
|
+
const h = a ?? Xt, d = u ?? Gt, m = c ?? Zt, w = (b) => {
|
|
3557
3498
|
if (!i.current) return 0;
|
|
3558
|
-
const
|
|
3559
|
-
return
|
|
3499
|
+
const _ = b.currentTarget.getBoundingClientRect(), T = b.clientX - _.x;
|
|
3500
|
+
return Rt(T, {
|
|
3560
3501
|
startLeft: m,
|
|
3561
3502
|
scale: h,
|
|
3562
|
-
scaleWidth:
|
|
3503
|
+
scaleWidth: d
|
|
3563
3504
|
});
|
|
3564
|
-
}, v =
|
|
3505
|
+
}, v = Tr(() => (e?.actions ? [...e.actions] : []).sort((b, S) => b.start - S.start), [e]), p = Pr((b) => v[b]?.id ?? b, [v]), R = Cr({
|
|
3565
3506
|
horizontal: !0,
|
|
3566
3507
|
count: v.length,
|
|
3567
3508
|
getItemKey: p,
|
|
3568
3509
|
getScrollElement: () => i.current,
|
|
3569
3510
|
estimateSize: (b) => {
|
|
3570
3511
|
if (!v[b]) return 0;
|
|
3571
|
-
let
|
|
3572
|
-
if (
|
|
3512
|
+
let S = b > 0 ? v[b - 1].end : 0, _ = v[b].end;
|
|
3513
|
+
if (S > _) return 0;
|
|
3573
3514
|
let {
|
|
3574
3515
|
width: P
|
|
3575
3516
|
} = vn({
|
|
3576
|
-
start:
|
|
3577
|
-
end:
|
|
3517
|
+
start: S,
|
|
3518
|
+
end: _
|
|
3578
3519
|
}, {
|
|
3579
3520
|
startLeft: m,
|
|
3580
3521
|
scale: h,
|
|
3581
|
-
scaleWidth:
|
|
3522
|
+
scaleWidth: d
|
|
3582
3523
|
});
|
|
3583
3524
|
return P;
|
|
3584
3525
|
},
|
|
3585
3526
|
overscan: 5
|
|
3586
3527
|
});
|
|
3587
3528
|
return gn(() => {
|
|
3588
|
-
|
|
3589
|
-
}, [u, c,
|
|
3529
|
+
R.measure();
|
|
3530
|
+
}, [u, c, R]), /* @__PURE__ */ x.jsx("div", { className: `${fe(...l)} ${(e?.classNames || []).join(" ")}`, style: t, onClick: (b) => {
|
|
3590
3531
|
if (e && r) {
|
|
3591
|
-
const
|
|
3532
|
+
const S = w(b);
|
|
3592
3533
|
r(b, {
|
|
3593
3534
|
row: e,
|
|
3594
|
-
time:
|
|
3535
|
+
time: S
|
|
3595
3536
|
});
|
|
3596
3537
|
}
|
|
3597
3538
|
}, onDoubleClick: (b) => {
|
|
3598
3539
|
if (e && s) {
|
|
3599
|
-
const
|
|
3540
|
+
const S = w(b);
|
|
3600
3541
|
s(b, {
|
|
3601
3542
|
row: e,
|
|
3602
|
-
time:
|
|
3543
|
+
time: S
|
|
3603
3544
|
});
|
|
3604
3545
|
}
|
|
3605
3546
|
}, onContextMenu: (b) => {
|
|
3606
3547
|
if (e && o) {
|
|
3607
|
-
const
|
|
3548
|
+
const S = w(b);
|
|
3608
3549
|
o(b, {
|
|
3609
3550
|
row: e,
|
|
3610
|
-
time:
|
|
3551
|
+
time: S
|
|
3611
3552
|
});
|
|
3612
3553
|
}
|
|
3613
|
-
}, children: e &&
|
|
3614
|
-
const
|
|
3615
|
-
if (!
|
|
3616
|
-
return /* @__PURE__ */ x.jsx(
|
|
3554
|
+
}, children: e && R.getVirtualItems().map((b) => {
|
|
3555
|
+
const S = v[b.index];
|
|
3556
|
+
if (!S) throw new Error("Action not found");
|
|
3557
|
+
return /* @__PURE__ */ x.jsx(yo, { ...n, handleTime: w, row: e, action: S }, S.id);
|
|
3617
3558
|
}) });
|
|
3618
3559
|
};
|
|
3619
|
-
function
|
|
3620
|
-
const n =
|
|
3560
|
+
function ko() {
|
|
3561
|
+
const n = Pe.c(7);
|
|
3621
3562
|
let e;
|
|
3622
3563
|
n[0] === Symbol.for("react.memo_cache_sentinel") ? (e = {
|
|
3623
3564
|
isMoving: !1,
|
|
3624
3565
|
movePositions: [],
|
|
3625
3566
|
assistPositions: []
|
|
3626
3567
|
}, n[0] = e) : e = n[0];
|
|
3627
|
-
const [t, r] = Mt(e), s =
|
|
3628
|
-
let
|
|
3629
|
-
n[1] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
3568
|
+
const [t, r] = Mt(e), s = ce(null), o = zo, i = Wo;
|
|
3569
|
+
let c;
|
|
3570
|
+
n[1] === Symbol.for("react.memo_cache_sentinel") ? (c = (p) => {
|
|
3630
3571
|
const {
|
|
3631
|
-
movePositions:
|
|
3632
|
-
assistPositions:
|
|
3633
|
-
|
|
3634
|
-
|
|
3572
|
+
movePositions: R,
|
|
3573
|
+
assistPositions: b,
|
|
3574
|
+
action: S,
|
|
3575
|
+
row: _,
|
|
3576
|
+
assistActionIds: P
|
|
3577
|
+
} = p;
|
|
3578
|
+
s.current = {
|
|
3579
|
+
action: S,
|
|
3580
|
+
row: _,
|
|
3581
|
+
assistActionIds: P
|
|
3582
|
+
}, r({
|
|
3635
3583
|
isMoving: !0,
|
|
3636
|
-
movePositions:
|
|
3637
|
-
assistPositions:
|
|
3584
|
+
movePositions: R || [],
|
|
3585
|
+
assistPositions: b || []
|
|
3638
3586
|
});
|
|
3639
|
-
}, n[1] =
|
|
3640
|
-
const
|
|
3641
|
-
let
|
|
3642
|
-
n[2] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
3587
|
+
}, n[1] = c) : c = n[1];
|
|
3588
|
+
const a = c;
|
|
3589
|
+
let u;
|
|
3590
|
+
n[2] === Symbol.for("react.memo_cache_sentinel") ? (u = (p) => {
|
|
3643
3591
|
const {
|
|
3644
|
-
movePositions:
|
|
3645
|
-
assistPositions:
|
|
3646
|
-
} =
|
|
3647
|
-
r((
|
|
3648
|
-
...
|
|
3649
|
-
movePositions:
|
|
3650
|
-
assistPositions:
|
|
3592
|
+
movePositions: R,
|
|
3593
|
+
assistPositions: b
|
|
3594
|
+
} = p;
|
|
3595
|
+
r((S) => ({
|
|
3596
|
+
...S,
|
|
3597
|
+
movePositions: R || S.movePositions,
|
|
3598
|
+
assistPositions: b || S.assistPositions
|
|
3651
3599
|
}));
|
|
3652
|
-
}, n[2] =
|
|
3653
|
-
const
|
|
3654
|
-
let
|
|
3655
|
-
n[3] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
3656
|
-
r({
|
|
3600
|
+
}, n[2] = u) : u = n[2];
|
|
3601
|
+
const l = u;
|
|
3602
|
+
let h;
|
|
3603
|
+
n[3] === Symbol.for("react.memo_cache_sentinel") ? (h = () => {
|
|
3604
|
+
s.current = null, r({
|
|
3657
3605
|
isMoving: !1,
|
|
3658
3606
|
movePositions: [],
|
|
3659
3607
|
assistPositions: []
|
|
3660
3608
|
});
|
|
3661
|
-
}, n[3] =
|
|
3662
|
-
const
|
|
3663
|
-
let
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3609
|
+
}, n[3] = h) : h = n[3];
|
|
3610
|
+
const d = h;
|
|
3611
|
+
let m;
|
|
3612
|
+
n[4] === Symbol.for("react.memo_cache_sentinel") ? (m = () => s.current, n[4] = m) : m = n[4];
|
|
3613
|
+
const w = m;
|
|
3614
|
+
let v;
|
|
3615
|
+
return n[5] !== t ? (v = {
|
|
3616
|
+
initSnap: a,
|
|
3617
|
+
updateSnap: l,
|
|
3618
|
+
disposeSnap: d,
|
|
3619
|
+
snapData: t,
|
|
3620
|
+
getActiveDragState: w,
|
|
3621
|
+
defaultGetAssistPosition: o,
|
|
3622
|
+
defaultGetMovePosition: i
|
|
3623
|
+
}, n[5] = t, n[6] = v) : v = n[6], v;
|
|
3672
3624
|
}
|
|
3673
|
-
function
|
|
3625
|
+
function Wo(n) {
|
|
3674
3626
|
const {
|
|
3675
3627
|
start: e,
|
|
3676
3628
|
end: t,
|
|
@@ -3691,7 +3643,7 @@ function zo(n) {
|
|
|
3691
3643
|
});
|
|
3692
3644
|
return r ? r === "right" ? [c + a] : [c] : [c, c + a];
|
|
3693
3645
|
}
|
|
3694
|
-
function
|
|
3646
|
+
function zo(n) {
|
|
3695
3647
|
const {
|
|
3696
3648
|
editorData: e,
|
|
3697
3649
|
assistActionIds: t,
|
|
@@ -3703,119 +3655,159 @@ function jo(n) {
|
|
|
3703
3655
|
cursorLeft: a,
|
|
3704
3656
|
hideCursor: u
|
|
3705
3657
|
} = n, l = [];
|
|
3706
|
-
t ? e.forEach((
|
|
3707
|
-
|
|
3658
|
+
t ? e.forEach((d) => {
|
|
3659
|
+
d.actions.forEach((m) => {
|
|
3708
3660
|
t.includes(m.id) && l.push(m);
|
|
3709
3661
|
});
|
|
3710
|
-
}) : e.forEach((
|
|
3711
|
-
|
|
3662
|
+
}) : e.forEach((d) => {
|
|
3663
|
+
d.id !== s.id ? l.push(...d.actions) : d.actions.forEach((m) => {
|
|
3712
3664
|
m.id !== r.id && l.push(m);
|
|
3713
3665
|
});
|
|
3714
3666
|
});
|
|
3715
|
-
const h =
|
|
3667
|
+
const h = Mr(l, {
|
|
3716
3668
|
startLeft: c,
|
|
3717
3669
|
scale: o,
|
|
3718
3670
|
scaleWidth: i
|
|
3719
3671
|
});
|
|
3720
3672
|
return u || h.push(a), h;
|
|
3721
3673
|
}
|
|
3722
|
-
const
|
|
3723
|
-
const e =
|
|
3674
|
+
const jo = (n) => {
|
|
3675
|
+
const e = Pe.c(50);
|
|
3724
3676
|
let t, r;
|
|
3725
3677
|
e[0] !== n ? ({
|
|
3726
3678
|
ref: r,
|
|
3727
3679
|
...t
|
|
3728
3680
|
} = n, e[0] = n, e[1] = t, e[2] = r) : (t = e[1], r = e[2]);
|
|
3729
3681
|
const {
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
startLeft: H
|
|
3748
|
-
}), k = a({
|
|
3682
|
+
snapData: s,
|
|
3683
|
+
initSnap: o,
|
|
3684
|
+
updateSnap: i,
|
|
3685
|
+
disposeSnap: c,
|
|
3686
|
+
getActiveDragState: a,
|
|
3687
|
+
defaultGetAssistPosition: u,
|
|
3688
|
+
defaultGetMovePosition: l
|
|
3689
|
+
} = ko();
|
|
3690
|
+
let h;
|
|
3691
|
+
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 = () => {
|
|
3692
|
+
const C = a();
|
|
3693
|
+
if (t.snap && C && s.isMoving) {
|
|
3694
|
+
const j = t.scaleWidth ?? 160, I = t.scale ?? 1, E = t.startLeft ?? 20, A = t.hideCursor ?? !1, M = At(t.cursorTime, {
|
|
3695
|
+
scaleWidth: j,
|
|
3696
|
+
scale: I,
|
|
3697
|
+
startLeft: E
|
|
3698
|
+
}), Z = u({
|
|
3749
3699
|
editorData: t.editorData,
|
|
3750
|
-
assistActionIds:
|
|
3751
|
-
action:
|
|
3752
|
-
row:
|
|
3753
|
-
scale:
|
|
3754
|
-
scaleWidth:
|
|
3755
|
-
startLeft:
|
|
3700
|
+
assistActionIds: C.assistActionIds,
|
|
3701
|
+
action: C.action,
|
|
3702
|
+
row: C.row,
|
|
3703
|
+
scale: I,
|
|
3704
|
+
scaleWidth: j,
|
|
3705
|
+
startLeft: E,
|
|
3756
3706
|
hideCursor: A,
|
|
3757
|
-
cursorLeft:
|
|
3707
|
+
cursorLeft: M
|
|
3708
|
+
});
|
|
3709
|
+
i({
|
|
3710
|
+
assistPositions: Z
|
|
3711
|
+
});
|
|
3712
|
+
} else
|
|
3713
|
+
!t.snap && s.isMoving && i({
|
|
3714
|
+
assistPositions: []
|
|
3715
|
+
});
|
|
3716
|
+
}, 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];
|
|
3717
|
+
let d;
|
|
3718
|
+
e[15] !== t.snap || e[16] !== s.isMoving ? (d = [t.snap, s.isMoving], e[15] = t.snap, e[16] = s.isMoving, e[17] = d) : d = e[17], Ct(h, d);
|
|
3719
|
+
let m;
|
|
3720
|
+
e[18] !== u || e[19] !== o || e[20] !== t ? (m = (C) => {
|
|
3721
|
+
const j = t.getAssistDragLineActionIds && t.getAssistDragLineActionIds({
|
|
3722
|
+
action: C.action,
|
|
3723
|
+
row: C.row,
|
|
3724
|
+
editorData: t.editorData
|
|
3725
|
+
});
|
|
3726
|
+
if (t.snap) {
|
|
3727
|
+
const I = t.scaleWidth ?? 160, E = t.scale ?? 1, A = t.startLeft ?? 20, M = t.hideCursor ?? !1, Z = At(t.cursorTime, {
|
|
3728
|
+
scaleWidth: I,
|
|
3729
|
+
scale: E,
|
|
3730
|
+
startLeft: A
|
|
3731
|
+
}), ee = u({
|
|
3732
|
+
editorData: t.editorData,
|
|
3733
|
+
assistActionIds: j,
|
|
3734
|
+
action: C.action,
|
|
3735
|
+
row: C.row,
|
|
3736
|
+
scale: E,
|
|
3737
|
+
scaleWidth: I,
|
|
3738
|
+
startLeft: A,
|
|
3739
|
+
hideCursor: M,
|
|
3740
|
+
cursorLeft: Z
|
|
3758
3741
|
});
|
|
3759
3742
|
o({
|
|
3760
|
-
assistPositions:
|
|
3743
|
+
assistPositions: ee,
|
|
3744
|
+
action: C.action,
|
|
3745
|
+
row: C.row,
|
|
3746
|
+
assistActionIds: j
|
|
3761
3747
|
});
|
|
3762
|
-
}
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3748
|
+
} else
|
|
3749
|
+
o({
|
|
3750
|
+
assistPositions: [],
|
|
3751
|
+
action: C.action,
|
|
3752
|
+
row: C.row,
|
|
3753
|
+
assistActionIds: j
|
|
3754
|
+
});
|
|
3755
|
+
}, e[18] = u, e[19] = o, e[20] = t, e[21] = m) : m = e[21];
|
|
3756
|
+
const w = m;
|
|
3757
|
+
let v;
|
|
3758
|
+
e[22] !== l || e[23] !== t.scale || e[24] !== t.scaleWidth || e[25] !== t.snap || e[26] !== t.startLeft || e[27] !== i ? (v = (C) => {
|
|
3759
|
+
if (t.snap) {
|
|
3760
|
+
const j = t.scaleWidth ?? 160, I = t.scale ?? 1, E = t.startLeft ?? 20, A = l({
|
|
3761
|
+
...C,
|
|
3762
|
+
startLeft: E,
|
|
3763
|
+
scaleWidth: j,
|
|
3764
|
+
scale: I
|
|
3773
3765
|
});
|
|
3774
3766
|
i({
|
|
3775
|
-
movePositions:
|
|
3767
|
+
movePositions: A
|
|
3776
3768
|
});
|
|
3777
3769
|
}
|
|
3778
|
-
}, e[
|
|
3779
|
-
const
|
|
3780
|
-
let
|
|
3781
|
-
if (e[
|
|
3782
|
-
const
|
|
3783
|
-
let
|
|
3784
|
-
for (let
|
|
3785
|
-
const
|
|
3786
|
-
if (!
|
|
3770
|
+
}, 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];
|
|
3771
|
+
const p = v, R = t.rowHeight ?? 32, b = t.scaleWidth ?? 160, S = t.startLeft ?? 20, _ = Math.max(t.scaleCount * b + S, t.timelineWidth);
|
|
3772
|
+
let P;
|
|
3773
|
+
if (e[29] !== _ || e[30] !== R || e[31] !== c || e[32] !== w || e[33] !== p || e[34] !== t || e[35] !== s) {
|
|
3774
|
+
const C = [];
|
|
3775
|
+
let j = 0;
|
|
3776
|
+
for (let I = 0; I < t.editorData.length; I++) {
|
|
3777
|
+
const E = t.editorData[I];
|
|
3778
|
+
if (!E)
|
|
3787
3779
|
continue;
|
|
3788
|
-
const
|
|
3789
|
-
|
|
3780
|
+
const A = E.rowHeight || R;
|
|
3781
|
+
C.push(/* @__PURE__ */ Dr(Io, { ...t, key: E.id, rowData: E, snapData: s, scrollContainerRef: t.scrollElementRef, style: {
|
|
3790
3782
|
position: "absolute",
|
|
3791
3783
|
top: 0,
|
|
3792
3784
|
left: 0,
|
|
3793
|
-
width:
|
|
3794
|
-
height: `${
|
|
3795
|
-
transform: `translateY(${
|
|
3796
|
-
}, onActionMoveStart: (
|
|
3785
|
+
width: _,
|
|
3786
|
+
height: `${A}px`,
|
|
3787
|
+
transform: `translateY(${j}px)`
|
|
3788
|
+
}, onActionMoveStart: (M) => (w(M), t.onActionMoveStart && t.onActionMoveStart(M)), onActionResizeStart: (M) => (w(M), t.onActionResizeStart && t.onActionResizeStart(M)), onActionMoving: (M) => (p(M), t.onActionMoving && t.onActionMoving(M)), onActionResizing: (M) => (p(M), t.onActionResizing && t.onActionResizing(M)), onActionResizeEnd: (M) => (c(), t.onActionResizeEnd && t.onActionResizeEnd(M)), onActionMoveEnd: (M) => (c(), t.onActionMoveEnd && t.onActionMoveEnd(M)) })), j = j + A;
|
|
3797
3789
|
}
|
|
3798
|
-
|
|
3790
|
+
P = [j, C], e[29] = _, e[30] = R, e[31] = c, e[32] = w, e[33] = p, e[34] = t, e[35] = s, e[36] = P;
|
|
3799
3791
|
} else
|
|
3800
|
-
|
|
3801
|
-
const [
|
|
3802
|
-
let
|
|
3803
|
-
e[
|
|
3804
|
-
width:
|
|
3805
|
-
height:
|
|
3792
|
+
P = e[36];
|
|
3793
|
+
const [T, D] = P, U = `0, ${t.startLeft ?? 20}px`, O = `${t.startLeft ?? 20}px, ${t.scaleWidth ?? 160}px`;
|
|
3794
|
+
let W;
|
|
3795
|
+
e[37] !== _ || e[38] !== U || e[39] !== O || e[40] !== T ? (W = {
|
|
3796
|
+
width: _,
|
|
3797
|
+
height: T,
|
|
3806
3798
|
position: "relative",
|
|
3807
|
-
backgroundPositionX:
|
|
3808
|
-
backgroundSize:
|
|
3809
|
-
}, e[
|
|
3810
|
-
let
|
|
3811
|
-
e[
|
|
3812
|
-
let
|
|
3813
|
-
return e[
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
] }), e[
|
|
3799
|
+
backgroundPositionX: U,
|
|
3800
|
+
backgroundSize: O
|
|
3801
|
+
}, e[37] = _, e[38] = U, e[39] = O, e[40] = T, e[41] = W) : W = e[41];
|
|
3802
|
+
let z;
|
|
3803
|
+
e[42] !== t.snap || e[43] !== s ? (z = t.snap && /* @__PURE__ */ x.jsx(Kr, { ...s }), e[42] = t.snap, e[43] = s, e[44] = z) : z = e[44];
|
|
3804
|
+
let Y;
|
|
3805
|
+
return e[45] !== r || e[46] !== D || e[47] !== W || e[48] !== z ? (Y = /* @__PURE__ */ x.jsxs("div", { ref: r, style: W, className: "timeline-editor-edit-area", children: [
|
|
3806
|
+
D,
|
|
3807
|
+
z
|
|
3808
|
+
] }), e[45] = r, e[46] = D, e[47] = W, e[48] = z, e[49] = Y) : Y = e[49], Y;
|
|
3817
3809
|
};
|
|
3818
|
-
function
|
|
3810
|
+
function Fo({
|
|
3819
3811
|
scaleSplitCount: n,
|
|
3820
3812
|
scaleWidth: e,
|
|
3821
3813
|
startLeft: t,
|
|
@@ -3824,47 +3816,48 @@ function Vo({
|
|
|
3824
3816
|
scale: o,
|
|
3825
3817
|
scrollElementRef: i,
|
|
3826
3818
|
onClickTimeArea: c,
|
|
3827
|
-
setCursor: a
|
|
3819
|
+
setCursor: a,
|
|
3820
|
+
getScaleRender: u
|
|
3828
3821
|
}) {
|
|
3829
|
-
const
|
|
3822
|
+
const l = n ?? 1, h = e ?? 160, d = t ?? 20, m = (n ?? 0) > 0, w = m ? r * (n ?? 1) + 1 : r, v = (m ? h / l : h) * (w - 1) + d, R = Cr({
|
|
3830
3823
|
horizontal: !0,
|
|
3831
|
-
count:
|
|
3824
|
+
count: w,
|
|
3832
3825
|
getScrollElement: () => i.current,
|
|
3833
|
-
estimateSize: (
|
|
3834
|
-
switch (
|
|
3826
|
+
estimateSize: (b) => {
|
|
3827
|
+
switch (b) {
|
|
3835
3828
|
case 0:
|
|
3836
|
-
return
|
|
3829
|
+
return d;
|
|
3837
3830
|
default:
|
|
3838
|
-
return
|
|
3831
|
+
return m ? h / l : h;
|
|
3839
3832
|
}
|
|
3840
3833
|
},
|
|
3841
3834
|
overscan: 10
|
|
3842
3835
|
});
|
|
3843
|
-
return
|
|
3844
|
-
width: `${
|
|
3845
|
-
}, className:
|
|
3846
|
-
const
|
|
3847
|
-
if (
|
|
3848
|
-
const
|
|
3849
|
-
startLeft:
|
|
3850
|
-
scale:
|
|
3836
|
+
return Ct(() => R.measure(), [e, t, R]), /* @__PURE__ */ x.jsx("div", { style: {
|
|
3837
|
+
width: `${v}px`
|
|
3838
|
+
}, className: fe("time-area"), onClick: (b) => {
|
|
3839
|
+
const S = t ?? 20, _ = e ?? 160, P = o ?? 1, T = s ?? 1 / 0, D = b.currentTarget.getBoundingClientRect(), U = b.clientX - D.x, O = Math.max(U, S);
|
|
3840
|
+
if (O > T * _ + S) return;
|
|
3841
|
+
const W = Rt(O, {
|
|
3842
|
+
startLeft: S,
|
|
3843
|
+
scale: P,
|
|
3851
3844
|
scaleWidth: _
|
|
3852
3845
|
});
|
|
3853
|
-
c && c(
|
|
3854
|
-
time:
|
|
3846
|
+
c && c(W, b), !b.defaultPrevented && a({
|
|
3847
|
+
time: W
|
|
3855
3848
|
});
|
|
3856
|
-
}, children:
|
|
3857
|
-
const
|
|
3858
|
-
return /* @__PURE__ */ x.jsx("div", { "data-index":
|
|
3859
|
-
width: `${
|
|
3860
|
-
transform: `translateX(${
|
|
3861
|
-
}, className:
|
|
3849
|
+
}, children: R.getVirtualItems().map((b) => {
|
|
3850
|
+
const S = b.index, _ = n ?? 1, P = o ?? 1, T = m ? S % _ === 0 : !0, D = [fe("time-unit"), fe(T ? "time-unit-big" : "time-unit-small")], U = (m ? S / _ : S) * P;
|
|
3851
|
+
return /* @__PURE__ */ x.jsx("div", { "data-index": b.index, style: {
|
|
3852
|
+
width: `${b.size}px`,
|
|
3853
|
+
transform: `translateX(${b.start}px)`
|
|
3854
|
+
}, className: D.join(" "), children: T && /* @__PURE__ */ x.jsx("div", { className: fe("time-unit-scale"), children: u?.(U) ?? U }) }, b.key);
|
|
3862
3855
|
}) });
|
|
3863
3856
|
}
|
|
3864
|
-
function
|
|
3857
|
+
function Vo(n) {
|
|
3865
3858
|
return typeof n == "object" && n !== null;
|
|
3866
3859
|
}
|
|
3867
|
-
function
|
|
3860
|
+
function Uo(n, e, t) {
|
|
3868
3861
|
if (n instanceof EventTarget)
|
|
3869
3862
|
return [n];
|
|
3870
3863
|
if (typeof n == "string") {
|
|
@@ -3873,47 +3866,47 @@ function $o(n, e, t) {
|
|
|
3873
3866
|
}
|
|
3874
3867
|
return Array.from(n);
|
|
3875
3868
|
}
|
|
3876
|
-
function
|
|
3877
|
-
return
|
|
3869
|
+
function $o(n) {
|
|
3870
|
+
return Vo(n) && "ownerSVGElement" in n;
|
|
3878
3871
|
}
|
|
3879
|
-
const
|
|
3880
|
-
let
|
|
3881
|
-
const
|
|
3882
|
-
function
|
|
3883
|
-
|
|
3872
|
+
const Ht = /* @__PURE__ */ new WeakMap();
|
|
3873
|
+
let Bt;
|
|
3874
|
+
const Ar = (n, e, t) => (r, s) => s && s[0] ? s[0][n + "Size"] : $o(r) && "getBBox" in r ? r.getBBox()[e] : r[t], Ho = /* @__PURE__ */ Ar("inline", "width", "offsetWidth"), Bo = /* @__PURE__ */ Ar("block", "height", "offsetHeight");
|
|
3875
|
+
function Yo({ target: n, borderBoxSize: e }) {
|
|
3876
|
+
Ht.get(n)?.forEach((t) => {
|
|
3884
3877
|
t(n, {
|
|
3885
3878
|
get width() {
|
|
3886
|
-
return
|
|
3879
|
+
return Ho(n, e);
|
|
3887
3880
|
},
|
|
3888
3881
|
get height() {
|
|
3889
|
-
return
|
|
3882
|
+
return Bo(n, e);
|
|
3890
3883
|
}
|
|
3891
3884
|
});
|
|
3892
3885
|
});
|
|
3893
3886
|
}
|
|
3894
|
-
function
|
|
3895
|
-
n.forEach(
|
|
3887
|
+
function Xo(n) {
|
|
3888
|
+
n.forEach(Yo);
|
|
3896
3889
|
}
|
|
3897
3890
|
function Go() {
|
|
3898
|
-
typeof ResizeObserver > "u" || (
|
|
3891
|
+
typeof ResizeObserver > "u" || (Bt = new ResizeObserver(Xo));
|
|
3899
3892
|
}
|
|
3900
|
-
function
|
|
3901
|
-
|
|
3902
|
-
const t =
|
|
3893
|
+
function Ko(n, e) {
|
|
3894
|
+
Bt || Go();
|
|
3895
|
+
const t = Uo(n);
|
|
3903
3896
|
return t.forEach((r) => {
|
|
3904
|
-
let s =
|
|
3905
|
-
s || (s = /* @__PURE__ */ new Set(),
|
|
3897
|
+
let s = Ht.get(r);
|
|
3898
|
+
s || (s = /* @__PURE__ */ new Set(), Ht.set(r, s)), s.add(e), Bt?.observe(r);
|
|
3906
3899
|
}), () => {
|
|
3907
3900
|
t.forEach((r) => {
|
|
3908
|
-
const s =
|
|
3909
|
-
s?.delete(e), s?.size ||
|
|
3901
|
+
const s = Ht.get(r);
|
|
3902
|
+
s?.delete(e), s?.size || Bt?.unobserve(r);
|
|
3910
3903
|
});
|
|
3911
3904
|
};
|
|
3912
3905
|
}
|
|
3913
|
-
const
|
|
3914
|
-
let
|
|
3915
|
-
function
|
|
3916
|
-
|
|
3906
|
+
const Yt = /* @__PURE__ */ new Set();
|
|
3907
|
+
let xt;
|
|
3908
|
+
function qo() {
|
|
3909
|
+
xt = () => {
|
|
3917
3910
|
const n = {
|
|
3918
3911
|
get width() {
|
|
3919
3912
|
return window.innerWidth;
|
|
@@ -3922,19 +3915,19 @@ function Jo() {
|
|
|
3922
3915
|
return window.innerHeight;
|
|
3923
3916
|
}
|
|
3924
3917
|
};
|
|
3925
|
-
|
|
3926
|
-
}, window.addEventListener("resize",
|
|
3918
|
+
Yt.forEach((e) => e(n));
|
|
3919
|
+
}, window.addEventListener("resize", xt);
|
|
3927
3920
|
}
|
|
3928
|
-
function
|
|
3929
|
-
return
|
|
3930
|
-
|
|
3921
|
+
function Jo(n) {
|
|
3922
|
+
return Yt.add(n), xt || qo(), () => {
|
|
3923
|
+
Yt.delete(n), !Yt.size && typeof xt == "function" && (window.removeEventListener("resize", xt), xt = void 0);
|
|
3931
3924
|
};
|
|
3932
3925
|
}
|
|
3933
|
-
function
|
|
3934
|
-
return typeof n == "function" ?
|
|
3926
|
+
function Zo(n, e) {
|
|
3927
|
+
return typeof n == "function" ? Jo(n) : Ko(n, e);
|
|
3935
3928
|
}
|
|
3936
|
-
function
|
|
3937
|
-
const e =
|
|
3929
|
+
function Qo(n) {
|
|
3930
|
+
const e = Pe.c(4), {
|
|
3938
3931
|
elementRef: t
|
|
3939
3932
|
} = n;
|
|
3940
3933
|
let r;
|
|
@@ -3945,7 +3938,7 @@ function ei(n) {
|
|
|
3945
3938
|
const [s, o] = Mt(r);
|
|
3946
3939
|
let i, c;
|
|
3947
3940
|
return e[1] !== t ? (i = () => {
|
|
3948
|
-
t.current &&
|
|
3941
|
+
t.current && Zo(t.current, (a, u) => {
|
|
3949
3942
|
o({
|
|
3950
3943
|
width: u.width,
|
|
3951
3944
|
height: u.height
|
|
@@ -3953,8 +3946,8 @@ function ei(n) {
|
|
|
3953
3946
|
});
|
|
3954
3947
|
}, c = [t], e[1] = t, e[2] = i, e[3] = c) : (i = e[2], c = e[3]), gn(i, c), s;
|
|
3955
3948
|
}
|
|
3956
|
-
const
|
|
3957
|
-
const e =
|
|
3949
|
+
const ei = (n) => {
|
|
3950
|
+
const e = Pe.c(42), {
|
|
3958
3951
|
disableDrag: t,
|
|
3959
3952
|
cursorTime: r,
|
|
3960
3953
|
setCursor: s,
|
|
@@ -3965,101 +3958,101 @@ const ti = (n) => {
|
|
|
3965
3958
|
scaleSplitCount: u,
|
|
3966
3959
|
scrollElementRef: l,
|
|
3967
3960
|
maxScaleCount: h,
|
|
3968
|
-
onCursorDragStart:
|
|
3961
|
+
onCursorDragStart: d,
|
|
3969
3962
|
onCursorDrag: m,
|
|
3970
|
-
onCursorDragEnd:
|
|
3963
|
+
onCursorDragEnd: w
|
|
3971
3964
|
} = n, v = ce(null), p = ce(void 0);
|
|
3972
|
-
let
|
|
3973
|
-
e[0] !== r || e[1] !== c || e[2] !== i || e[3] !== o ? (
|
|
3965
|
+
let R, b;
|
|
3966
|
+
e[0] !== r || e[1] !== c || e[2] !== i || e[3] !== o ? (R = () => {
|
|
3974
3967
|
if (typeof p.current > "u" && v.current) {
|
|
3975
|
-
const
|
|
3976
|
-
v.current.updateLeft(
|
|
3977
|
-
startLeft:
|
|
3968
|
+
const f = o ?? 20, y = i ?? 160, N = c ?? 1;
|
|
3969
|
+
v.current.updateLeft(At(r, {
|
|
3970
|
+
startLeft: f,
|
|
3978
3971
|
scaleWidth: y,
|
|
3979
|
-
scale:
|
|
3972
|
+
scale: N
|
|
3980
3973
|
}));
|
|
3981
3974
|
}
|
|
3982
|
-
}, b = [r, o, i, c], e[0] = r, e[1] = c, e[2] = i, e[3] = o, e[4] =
|
|
3983
|
-
const
|
|
3984
|
-
let
|
|
3985
|
-
e[6] !==
|
|
3975
|
+
}, b = [r, o, i, c], e[0] = r, e[1] = c, e[2] = i, e[3] = o, e[4] = R, e[5] = b) : (R = e[4], b = e[5]), Ct(R, b);
|
|
3976
|
+
const S = o ?? 20, _ = i ?? 160, P = c ?? 1, T = h ?? 1 / 0, D = (u ?? 0) > 0, U = u ?? 1, O = D ? a * (u ?? 1) + 1 : a, W = o ?? 20, z = (D ? _ / U : _) * (O - 1) + W;
|
|
3977
|
+
let Y;
|
|
3978
|
+
e[6] !== S || e[7] !== T || e[8] !== l || e[9] !== z || e[10] !== _ ? (Y = () => ({
|
|
3986
3979
|
left: 0,
|
|
3987
|
-
right: Math.min(
|
|
3988
|
-
}), e[6] =
|
|
3989
|
-
const
|
|
3990
|
-
let
|
|
3991
|
-
e[12] !== r || e[13] !==
|
|
3992
|
-
const
|
|
3993
|
-
startLeft:
|
|
3994
|
-
scaleWidth:
|
|
3980
|
+
right: Math.min(z, T * _ + S - (l.current?.scrollLeft ?? 0))
|
|
3981
|
+
}), e[6] = S, e[7] = T, e[8] = l, e[9] = z, e[10] = _, e[11] = Y) : Y = e[11];
|
|
3982
|
+
const C = !t;
|
|
3983
|
+
let j;
|
|
3984
|
+
e[12] !== r || e[13] !== S || e[14] !== d || e[15] !== P || e[16] !== _ ? (j = () => {
|
|
3985
|
+
const f = v.current?.getLeft() ?? At(r, {
|
|
3986
|
+
startLeft: S,
|
|
3987
|
+
scaleWidth: _,
|
|
3995
3988
|
scale: P
|
|
3996
3989
|
});
|
|
3997
|
-
p.current =
|
|
3998
|
-
const y =
|
|
3999
|
-
startLeft:
|
|
3990
|
+
p.current = f;
|
|
3991
|
+
const y = Rt(f, {
|
|
3992
|
+
startLeft: S,
|
|
4000
3993
|
scale: P,
|
|
4001
|
-
scaleWidth:
|
|
3994
|
+
scaleWidth: _
|
|
4002
3995
|
});
|
|
4003
|
-
|
|
4004
|
-
}, e[12] = r, e[13] =
|
|
4005
|
-
let
|
|
4006
|
-
e[18] !==
|
|
3996
|
+
d && d(y), v.current?.updateLeft(f);
|
|
3997
|
+
}, e[12] = r, e[13] = S, e[14] = d, e[15] = P, e[16] = _, e[17] = j) : j = e[17];
|
|
3998
|
+
let I;
|
|
3999
|
+
e[18] !== S || e[19] !== w || e[20] !== P || e[21] !== s || e[22] !== _ ? (I = () => {
|
|
4007
4000
|
if (typeof p.current < "u") {
|
|
4008
|
-
const
|
|
4009
|
-
startLeft:
|
|
4001
|
+
const f = Rt(p.current, {
|
|
4002
|
+
startLeft: S,
|
|
4010
4003
|
scale: P,
|
|
4011
|
-
scaleWidth:
|
|
4004
|
+
scaleWidth: _
|
|
4012
4005
|
});
|
|
4013
4006
|
s({
|
|
4014
|
-
time:
|
|
4015
|
-
}),
|
|
4007
|
+
time: f
|
|
4008
|
+
}), w && w(f);
|
|
4016
4009
|
}
|
|
4017
4010
|
p.current = void 0;
|
|
4018
|
-
}, e[18] =
|
|
4019
|
-
let
|
|
4020
|
-
e[24] !==
|
|
4011
|
+
}, e[18] = S, e[19] = w, e[20] = P, e[21] = s, e[22] = _, e[23] = I) : I = e[23];
|
|
4012
|
+
let E;
|
|
4013
|
+
e[24] !== S || e[25] !== m || e[26] !== P || e[27] !== l || e[28] !== s || e[29] !== _ ? (E = (f, y) => {
|
|
4021
4014
|
const {
|
|
4022
|
-
left:
|
|
4023
|
-
} =
|
|
4024
|
-
if (
|
|
4015
|
+
left: N
|
|
4016
|
+
} = f, H = y === void 0 ? 0 : y, Q = l.current?.scrollLeft ?? 0, X = l.current, B = X?.clientWidth ?? 0;
|
|
4017
|
+
if (H !== 0)
|
|
4025
4018
|
if (typeof p.current < "u") {
|
|
4026
|
-
p.current = p.current +
|
|
4027
|
-
const L =
|
|
4028
|
-
p.current < L + 10 ? p.current = L + 10 : p.current >
|
|
4019
|
+
p.current = p.current + H;
|
|
4020
|
+
const L = Q, k = Q + B;
|
|
4021
|
+
p.current < L + 10 ? p.current = L + 10 : p.current > k - 10 && (p.current = k - 10), p.current < S - Q && (p.current = S - Q);
|
|
4029
4022
|
} else {
|
|
4030
|
-
p.current =
|
|
4031
|
-
const L =
|
|
4032
|
-
p.current < L + 10 ? p.current = L + 10 : p.current >
|
|
4023
|
+
p.current = N + H;
|
|
4024
|
+
const L = Q, k = Q + B;
|
|
4025
|
+
p.current < L + 10 ? p.current = L + 10 : p.current > k - 10 && (p.current = k - 10);
|
|
4033
4026
|
}
|
|
4034
|
-
else if (
|
|
4035
|
-
const L =
|
|
4036
|
-
p.current < L + 10 ? p.current = L + 10 : p.current >
|
|
4027
|
+
else if (N < S - Q ? p.current = S - Q : p.current = N, X && B > 0) {
|
|
4028
|
+
const L = Q, k = Q + B;
|
|
4029
|
+
p.current < L + 10 ? p.current = L + 10 : p.current > k - 10 && (p.current = k - 10);
|
|
4037
4030
|
}
|
|
4038
4031
|
if (typeof p.current < "u") {
|
|
4039
4032
|
v.current?.updateLeft(p.current);
|
|
4040
|
-
const L =
|
|
4041
|
-
startLeft:
|
|
4033
|
+
const L = Rt(p.current, {
|
|
4034
|
+
startLeft: S,
|
|
4042
4035
|
scale: P,
|
|
4043
|
-
scaleWidth:
|
|
4036
|
+
scaleWidth: _
|
|
4044
4037
|
});
|
|
4045
4038
|
s({
|
|
4046
4039
|
time: L
|
|
4047
4040
|
}), m && m(L);
|
|
4048
4041
|
}
|
|
4049
4042
|
return !1;
|
|
4050
|
-
}, e[24] =
|
|
4051
|
-
let
|
|
4052
|
-
e[31] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
4043
|
+
}, e[24] = S, e[25] = m, e[26] = P, e[27] = l, e[28] = s, e[29] = _, e[30] = E) : E = e[30];
|
|
4044
|
+
let A, M;
|
|
4045
|
+
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]);
|
|
4046
|
+
let Z;
|
|
4047
|
+
e[33] === Symbol.for("react.memo_cache_sentinel") ? (Z = /* @__PURE__ */ x.jsxs("div", { className: A, children: [
|
|
4048
|
+
/* @__PURE__ */ x.jsx("svg", { className: M, 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" }) }),
|
|
4049
|
+
/* @__PURE__ */ x.jsx("div", { className: fe("cursor-area") })
|
|
4050
|
+
] }), e[33] = Z) : Z = e[33];
|
|
4053
4051
|
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;
|
|
4052
|
+
return e[34] !== S || e[35] !== l || e[36] !== Y || e[37] !== C || e[38] !== j || e[39] !== I || e[40] !== E ? (ee = /* @__PURE__ */ x.jsx(xr, { start: S, ref: v, parentRef: l, getBounds: Y, autoScroll: !0, enableDragging: C, enableResizing: !1, onDragStart: j, onDragEnd: I, onDrag: E, children: Z }), e[34] = S, e[35] = l, e[36] = Y, e[37] = C, e[38] = j, e[39] = I, e[40] = E, e[41] = ee) : ee = e[41], ee;
|
|
4060
4053
|
};
|
|
4061
|
-
function
|
|
4062
|
-
const e =
|
|
4054
|
+
function Jn(n) {
|
|
4055
|
+
const e = Pe.c(9);
|
|
4063
4056
|
let t, r, s;
|
|
4064
4057
|
e[0] !== n ? ({
|
|
4065
4058
|
className: t,
|
|
@@ -4068,37 +4061,38 @@ function Zn(n) {
|
|
|
4068
4061
|
} = n, e[0] = n, e[1] = t, e[2] = r, e[3] = s) : (t = e[1], r = e[2], s = e[3]);
|
|
4069
4062
|
const o = s === void 0 ? "vertical" : s;
|
|
4070
4063
|
let i;
|
|
4071
|
-
e[4] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ x.jsx(
|
|
4064
|
+
e[4] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ x.jsx(Sr, { "data-slot": "scroll-area-thumb" }), e[4] = i) : i = e[4];
|
|
4072
4065
|
let c;
|
|
4073
|
-
return e[5] !== t || e[6] !== o || e[7] !== r ? (c = /* @__PURE__ */ x.jsx(
|
|
4066
|
+
return e[5] !== t || e[6] !== o || e[7] !== r ? (c = /* @__PURE__ */ x.jsx(pr, { "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
4067
|
}
|
|
4075
4068
|
function si({
|
|
4076
4069
|
ref: n,
|
|
4077
4070
|
...e
|
|
4078
4071
|
}) {
|
|
4079
|
-
const t =
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
height: f
|
|
4084
|
-
} = ei({
|
|
4072
|
+
const t = Hr(e), r = ce(null), {
|
|
4073
|
+
width: s,
|
|
4074
|
+
height: o
|
|
4075
|
+
} = Qo({
|
|
4085
4076
|
elementRef: r
|
|
4086
|
-
}),
|
|
4087
|
-
|
|
4088
|
-
|
|
4077
|
+
}), i = Math.min(t.maxScaleCount, t.minScaleCount ?? Math.max(Nr(t.editorData, {
|
|
4078
|
+
scale: t.scale,
|
|
4079
|
+
pad: 0.2
|
|
4080
|
+
}), Math.ceil((s - t.startLeft) / t.scaleWidth))), [c, a] = Mt(i), u = Math.max(i, c), [l, h] = Mt(yn), d = ce(yn), m = (p) => {
|
|
4081
|
+
a(Math.min(t.maxScaleCount, Math.max(i, p)));
|
|
4082
|
+
}, w = (p) => {
|
|
4089
4083
|
t.onChange?.(p);
|
|
4090
4084
|
}, v = (p) => {
|
|
4091
4085
|
let {
|
|
4092
|
-
left:
|
|
4086
|
+
left: R,
|
|
4093
4087
|
time: b
|
|
4094
4088
|
} = p;
|
|
4095
|
-
return typeof b < "u" ? (
|
|
4089
|
+
return typeof b < "u" ? (h(b), d.current = b, !0) : typeof R < "u" ? (h(d.current = Rt(R, {
|
|
4096
4090
|
startLeft: t.startLeft,
|
|
4097
4091
|
scale: t.scale,
|
|
4098
4092
|
scaleWidth: t.scaleWidth
|
|
4099
4093
|
})), !0) : !1;
|
|
4100
4094
|
};
|
|
4101
|
-
return
|
|
4095
|
+
return Zn(n, () => ({
|
|
4102
4096
|
get target() {
|
|
4103
4097
|
return r.current;
|
|
4104
4098
|
},
|
|
@@ -4108,7 +4102,7 @@ function si({
|
|
|
4108
4102
|
});
|
|
4109
4103
|
},
|
|
4110
4104
|
get time() {
|
|
4111
|
-
return
|
|
4105
|
+
return d.current;
|
|
4112
4106
|
},
|
|
4113
4107
|
setScrollLeft: (p) => {
|
|
4114
4108
|
r.current && (r.current.scrollLeft = p);
|
|
@@ -4116,17 +4110,17 @@ function si({
|
|
|
4116
4110
|
setScrollTop: (p) => {
|
|
4117
4111
|
r.current && (r.current.scrollTop = p);
|
|
4118
4112
|
}
|
|
4119
|
-
})), /* @__PURE__ */ x.jsxs(
|
|
4120
|
-
/* @__PURE__ */ x.jsxs(
|
|
4113
|
+
})), /* @__PURE__ */ x.jsxs(po, { style: t.style, className: `${fn} ${t.disableDrag ? fn + "-disable" : ""}`, "data-slot": "scroll-area", children: [
|
|
4114
|
+
/* @__PURE__ */ x.jsxs(go, { "data-slot": "scroll-area-viewport", ref: r, onScroll: (p) => {
|
|
4121
4115
|
t.onScroll?.(p.currentTarget);
|
|
4122
4116
|
}, children: [
|
|
4123
|
-
/* @__PURE__ */ x.jsx(
|
|
4124
|
-
/* @__PURE__ */ x.jsx(
|
|
4125
|
-
!t.hideCursor && /* @__PURE__ */ x.jsx(
|
|
4117
|
+
/* @__PURE__ */ x.jsx(Fo, { ...t, setCursor: v, scaleCount: u, scrollElementRef: r }),
|
|
4118
|
+
/* @__PURE__ */ x.jsx(jo, { ...t, scrollElementRef: r, timelineWidth: s, timelineHeight: o, disableDrag: t.disableDrag, editorData: t.editorData, cursorTime: l, scaleCount: u, setScaleCount: m, setEditorData: w }),
|
|
4119
|
+
!t.hideCursor && /* @__PURE__ */ x.jsx(ei, { ...t, timelineWidth: s, height: o, scaleCount: u, setScaleCount: m, setCursor: v, cursorTime: l, editorData: t.editorData, scrollElementRef: r })
|
|
4126
4120
|
] }),
|
|
4127
|
-
/* @__PURE__ */ x.jsx(
|
|
4128
|
-
/* @__PURE__ */ x.jsx(
|
|
4129
|
-
/* @__PURE__ */ x.jsx(
|
|
4121
|
+
/* @__PURE__ */ x.jsx(Jn, { orientation: "horizontal" }),
|
|
4122
|
+
/* @__PURE__ */ x.jsx(Jn, { orientation: "vertical" }),
|
|
4123
|
+
/* @__PURE__ */ x.jsx(vo, {})
|
|
4130
4124
|
] });
|
|
4131
4125
|
}
|
|
4132
4126
|
export {
|