@cyca/react-timeline-editor 0.2.3-alpha.8 → 0.2.4-alpha.1
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 +1 -1
- package/dist/react-timeline-editor.cjs +4 -4
- package/dist/react-timeline-editor.js +1415 -1433
- package/dist/utils.cjs +1 -0
- package/dist/utils.d.ts +107 -0
- package/dist/utils.js +10 -0
- package/package.json +8 -2
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import * as b from "react";
|
|
2
|
+
import Je, { useRef as ne, useEffect as Tt, useLayoutEffect as Nt, useImperativeHandle as Zn, useState as Mt, useMemo as Ar, useCallback as Pr, createElement as Dr, Activity as Lr } from "react";
|
|
3
|
+
import { D as En, a as Gt, b as Qn, c as Kt, d as Qt, M as Or, P as dn, e as hn, f as mn, p as Ye, g as vn, h as Dt, i as Mr, j as Ct, k as Nr, l as Ir, S as yn } from "./index-Do2XgyZc.js";
|
|
4
|
+
import { flushSync as kr } from "react-dom";
|
|
5
|
+
var Ft = { exports: {} }, Lt = {};
|
|
6
|
+
var Rn;
|
|
7
|
+
function Wr() {
|
|
8
|
+
if (Rn) return Lt;
|
|
9
|
+
Rn = 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 (
|
|
37
|
-
case
|
|
28
|
+
var Ot = {};
|
|
29
|
+
var xn;
|
|
30
|
+
function zr() {
|
|
31
|
+
return xn || (xn = 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 === F ? null : f.displayName || f.name || null;
|
|
36
|
+
if (typeof f == "string") return f;
|
|
37
|
+
switch (f) {
|
|
38
|
+
case _:
|
|
38
39
|
return "Fragment";
|
|
39
|
-
case
|
|
40
|
+
case g:
|
|
40
41
|
return "Profiler";
|
|
41
|
-
case
|
|
42
|
+
case p:
|
|
42
43
|
return "StrictMode";
|
|
43
|
-
case
|
|
44
|
+
case y:
|
|
44
45
|
return "Suspense";
|
|
45
|
-
case
|
|
46
|
+
case A:
|
|
46
47
|
return "SuspenseList";
|
|
47
48
|
case j:
|
|
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
|
-
case
|
|
54
|
+
), f.$$typeof) {
|
|
55
|
+
case S:
|
|
55
56
|
return "Portal";
|
|
56
57
|
case w:
|
|
57
|
-
return
|
|
58
|
-
case
|
|
59
|
-
return (
|
|
58
|
+
return f.displayName || "Context";
|
|
59
|
+
case v:
|
|
60
|
+
return (f._context.displayName || "Context") + ".Consumer";
|
|
60
61
|
case T:
|
|
61
|
-
var x =
|
|
62
|
-
return
|
|
63
|
-
case
|
|
64
|
-
return x =
|
|
62
|
+
var x = f.render;
|
|
63
|
+
return f = f.displayName, f || (f = x.displayName || x.name || "", f = f !== "" ? "ForwardRef(" + f + ")" : "ForwardRef"), f;
|
|
64
|
+
case z:
|
|
65
|
+
return x = f.displayName || null, x !== null ? x : n(f.type) || "Memo";
|
|
65
66
|
case O:
|
|
66
|
-
x =
|
|
67
|
+
x = f._payload, f = f._init;
|
|
67
68
|
try {
|
|
68
|
-
return n(
|
|
69
|
+
return n(f(x));
|
|
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 x = !1;
|
|
81
82
|
} catch {
|
|
82
83
|
x = !0;
|
|
83
84
|
}
|
|
84
85
|
if (x) {
|
|
85
86
|
x = console;
|
|
86
|
-
var
|
|
87
|
-
return
|
|
87
|
+
var D = x.error, W = typeof Symbol == "function" && Symbol.toStringTag && f[Symbol.toStringTag] || f.constructor.name || "Object";
|
|
88
|
+
return D.call(
|
|
88
89
|
x,
|
|
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
|
+
W
|
|
92
|
+
), e(f);
|
|
92
93
|
}
|
|
93
94
|
}
|
|
94
|
-
function r(
|
|
95
|
-
if (
|
|
96
|
-
if (typeof
|
|
95
|
+
function r(f) {
|
|
96
|
+
if (f === _) return "<>";
|
|
97
|
+
if (typeof f == "object" && f !== null && f.$$typeof === O)
|
|
97
98
|
return "<...>";
|
|
98
99
|
try {
|
|
99
|
-
var x = n(
|
|
100
|
+
var x = n(f);
|
|
100
101
|
return x ? "<" + x + ">" : "<...>";
|
|
101
102
|
} catch {
|
|
102
103
|
return "<...>";
|
|
103
104
|
}
|
|
104
105
|
}
|
|
105
106
|
function s() {
|
|
106
|
-
var
|
|
107
|
-
return
|
|
107
|
+
var f = q.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 x = Object.getOwnPropertyDescriptor(
|
|
113
|
+
function i(f) {
|
|
114
|
+
if (V.call(f, "key")) {
|
|
115
|
+
var x = Object.getOwnPropertyDescriptor(f, "key").get;
|
|
115
116
|
if (x && x.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, x) {
|
|
121
|
+
function D() {
|
|
122
|
+
C || (C = !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
|
x
|
|
124
125
|
));
|
|
125
126
|
}
|
|
126
|
-
|
|
127
|
-
get:
|
|
127
|
+
D.isReactWarning = !0, Object.defineProperty(f, "key", {
|
|
128
|
+
get: D,
|
|
128
129
|
configurable: !0
|
|
129
130
|
});
|
|
130
131
|
}
|
|
131
132
|
function a() {
|
|
132
|
-
var
|
|
133
|
-
return
|
|
133
|
+
var f = n(this.type);
|
|
134
|
+
return M[f] || (M[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
|
|
139
|
-
return
|
|
140
|
-
$$typeof:
|
|
141
|
-
type:
|
|
138
|
+
function u(f, x, D, W, Z, H) {
|
|
139
|
+
var $ = D.ref;
|
|
140
|
+
return f = {
|
|
141
|
+
$$typeof: E,
|
|
142
|
+
type: f,
|
|
142
143
|
key: x,
|
|
143
|
-
props:
|
|
144
|
-
_owner:
|
|
145
|
-
}, (
|
|
144
|
+
props: D,
|
|
145
|
+
_owner: W
|
|
146
|
+
}, ($ !== void 0 ? $ : 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: Z
|
|
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: H
|
|
169
|
+
}), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
|
|
169
170
|
}
|
|
170
|
-
function l(
|
|
171
|
-
var
|
|
172
|
-
if (
|
|
173
|
-
if (
|
|
174
|
-
if (
|
|
175
|
-
for (
|
|
176
|
-
h(
|
|
177
|
-
Object.freeze && Object.freeze(
|
|
171
|
+
function l(f, x, D, W, Z, H) {
|
|
172
|
+
var $ = x.children;
|
|
173
|
+
if ($ !== void 0)
|
|
174
|
+
if (W)
|
|
175
|
+
if (J($)) {
|
|
176
|
+
for (W = 0; W < $.length; W++)
|
|
177
|
+
h($[W]);
|
|
178
|
+
Object.freeze && Object.freeze($);
|
|
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
|
-
else h(
|
|
183
|
-
if (
|
|
184
|
-
|
|
185
|
-
var
|
|
186
|
-
return
|
|
183
|
+
else h($);
|
|
184
|
+
if (V.call(x, "key")) {
|
|
185
|
+
$ = n(f);
|
|
186
|
+
var P = Object.keys(x).filter(function(k) {
|
|
187
|
+
return k !== "key";
|
|
187
188
|
});
|
|
188
|
-
|
|
189
|
+
W = 0 < P.length ? "{key: someKey, " + P.join(": ..., ") + ": ...}" : "{key: someKey}", re[$ + W] || (P = 0 < P.length ? "{" + P.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} />`,
|
|
196
|
+
W,
|
|
195
197
|
$,
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
), ee[B + $] = !0);
|
|
198
|
+
P,
|
|
199
|
+
$
|
|
200
|
+
), re[$ + W] = !0);
|
|
200
201
|
}
|
|
201
|
-
if (
|
|
202
|
-
|
|
203
|
-
for (var
|
|
204
|
-
|
|
205
|
-
} else
|
|
206
|
-
return
|
|
207
|
-
|
|
208
|
-
typeof
|
|
202
|
+
if ($ = null, D !== void 0 && (t(D), $ = "" + D), i(x) && (t(x.key), $ = "" + x.key), "key" in x) {
|
|
203
|
+
D = {};
|
|
204
|
+
for (var L in x)
|
|
205
|
+
L !== "key" && (D[L] = x[L]);
|
|
206
|
+
} else D = x;
|
|
207
|
+
return $ && c(
|
|
208
|
+
D,
|
|
209
|
+
typeof f == "function" ? f.displayName || f.name || "Unknown" : f
|
|
209
210
|
), u(
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
211
|
+
f,
|
|
212
|
+
$,
|
|
213
|
+
D,
|
|
213
214
|
s(),
|
|
214
|
-
|
|
215
|
-
|
|
215
|
+
Z,
|
|
216
|
+
H
|
|
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 === E;
|
|
223
224
|
}
|
|
224
|
-
var
|
|
225
|
+
var m = Je, E = Symbol.for("react.transitional.element"), S = Symbol.for("react.portal"), _ = Symbol.for("react.fragment"), p = Symbol.for("react.strict_mode"), g = Symbol.for("react.profiler"), v = Symbol.for("react.consumer"), w = Symbol.for("react.context"), T = Symbol.for("react.forward_ref"), y = Symbol.for("react.suspense"), A = Symbol.for("react.suspense_list"), z = Symbol.for("react.memo"), O = Symbol.for("react.lazy"), j = Symbol.for("react.activity"), F = Symbol.for("react.client.reference"), q = m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, V = Object.prototype.hasOwnProperty, J = Array.isArray, U = console.createTask ? console.createTask : function() {
|
|
225
226
|
return null;
|
|
226
227
|
};
|
|
227
|
-
|
|
228
|
-
react_stack_bottom_frame: function(
|
|
229
|
-
return
|
|
228
|
+
m = {
|
|
229
|
+
react_stack_bottom_frame: function(f) {
|
|
230
|
+
return f();
|
|
230
231
|
}
|
|
231
232
|
};
|
|
232
|
-
var
|
|
233
|
-
|
|
233
|
+
var C, M = {}, G = m.react_stack_bottom_frame.bind(
|
|
234
|
+
m,
|
|
234
235
|
o
|
|
235
|
-
)(),
|
|
236
|
-
|
|
237
|
-
var
|
|
236
|
+
)(), ee = U(r(o)), re = {};
|
|
237
|
+
Ot.Fragment = _, Ot.jsx = function(f, x, D) {
|
|
238
|
+
var W = 1e4 > q.recentlyCreatedOwnerStacks++;
|
|
238
239
|
return l(
|
|
239
|
-
|
|
240
|
+
f,
|
|
240
241
|
x,
|
|
241
|
-
|
|
242
|
+
D,
|
|
242
243
|
!1,
|
|
243
|
-
|
|
244
|
-
|
|
244
|
+
W ? Error("react-stack-top-frame") : G,
|
|
245
|
+
W ? U(r(f)) : ee
|
|
245
246
|
);
|
|
246
|
-
},
|
|
247
|
-
var
|
|
247
|
+
}, Ot.jsxs = function(f, x, D) {
|
|
248
|
+
var W = 1e4 > q.recentlyCreatedOwnerStacks++;
|
|
248
249
|
return l(
|
|
249
|
-
|
|
250
|
+
f,
|
|
250
251
|
x,
|
|
251
|
-
|
|
252
|
+
D,
|
|
252
253
|
!0,
|
|
253
|
-
|
|
254
|
-
|
|
254
|
+
W ? Error("react-stack-top-frame") : G,
|
|
255
|
+
W ? U(r(f)) : ee
|
|
255
256
|
);
|
|
256
257
|
};
|
|
257
|
-
})()),
|
|
258
|
+
})()), Ot;
|
|
258
259
|
}
|
|
259
|
-
var
|
|
260
|
-
function
|
|
261
|
-
return
|
|
260
|
+
var Cn;
|
|
261
|
+
function jr() {
|
|
262
|
+
return Cn || (Cn = 1, process.env.NODE_ENV === "production" ? Ft.exports = Wr() : Ft.exports = zr()), Ft.exports;
|
|
262
263
|
}
|
|
263
|
-
var R =
|
|
264
|
-
const
|
|
264
|
+
var R = jr();
|
|
265
|
+
const sn = {
|
|
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
|
+
}, Fr = [
|
|
272
273
|
"trace",
|
|
273
274
|
"debug",
|
|
274
275
|
"info",
|
|
275
276
|
"warn",
|
|
276
277
|
"error"
|
|
277
278
|
];
|
|
278
|
-
var
|
|
279
|
+
var Vr = 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
|
+
Fr.forEach((e) => {
|
|
299
300
|
const t = this.e.bind(this.c, e, this.n);
|
|
300
301
|
Object.defineProperty(this, e, {
|
|
301
|
-
get: () =>
|
|
302
|
+
get: () => sn[e] >= sn[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 sn ? (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 Ur = class {
|
|
349
350
|
get(n) {
|
|
350
351
|
return localStorage.getItem(n);
|
|
351
352
|
}
|
|
@@ -356,7 +357,7 @@ var jr = class {
|
|
|
356
357
|
localStorage.removeItem(n);
|
|
357
358
|
}
|
|
358
359
|
};
|
|
359
|
-
const
|
|
360
|
+
const $r = {
|
|
360
361
|
trace: "#95bdb7",
|
|
361
362
|
debug: "#ad95b8",
|
|
362
363
|
info: "#b6bd73",
|
|
@@ -370,23 +371,23 @@ const Fr = {
|
|
|
370
371
|
log: "●",
|
|
371
372
|
trace: "◔",
|
|
372
373
|
debug: "◌"
|
|
373
|
-
},
|
|
374
|
+
}, Hr = { bind(n, e, t) {
|
|
374
375
|
const r = t ? `${Tn[e]} ${String(t)}:` : `${Tn[e]}`;
|
|
375
|
-
return (n[e] || n.log).bind(n, `%c${r}%c`, `color: ${
|
|
376
|
-
} },
|
|
377
|
-
function
|
|
376
|
+
return (n[e] || n.log).bind(n, `%c${r}%c`, `color: ${$r[e]}; font-weight: bold;`, "color: inherit");
|
|
377
|
+
} }, Ke = tr(new Vr(new Ur(), Hr));
|
|
378
|
+
function Br(n) {
|
|
378
379
|
let {
|
|
379
380
|
editorData: e = [],
|
|
380
381
|
effects: t = {},
|
|
381
|
-
scale: r =
|
|
382
|
-
scaleSplitCount: s =
|
|
383
|
-
scaleWidth: o =
|
|
384
|
-
startLeft: i =
|
|
385
|
-
minScaleCount: c
|
|
382
|
+
scale: r = Gt,
|
|
383
|
+
scaleSplitCount: s = Qn,
|
|
384
|
+
scaleWidth: o = Kt,
|
|
385
|
+
startLeft: i = Qt,
|
|
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 && (Ke.error("Error: scale must be greater than 0!"), r = Gt), s <= 0 && (Ke.warn("Warning: scaleSplitCount cannot be less than 1!"), s = 1), o <= 0 && (Ke.warn("Warning: scaleWidth must be greater than 0!"), o = Kt), i < 0 && (Ke.warn("Warning: startLeft cannot be less than 0!"), i = 0), c && typeof c == "number" && (c < 1 && (Ke.warn("Warning: minScaleCount must be greater than 1!"), c = Or), c = parseInt(c + ""), a < c && (Ke.warn("Warning: maxScaleCount cannot be less than minScaleCount!"), a = c)), a = a === 1 / 0 ? 1 / 0 : parseInt(a + ""), u <= 0 && (Ke.warn("Warning: rowHeight must be greater than 0!"), u = En);
|
|
390
391
|
const l = {
|
|
391
392
|
...n
|
|
392
393
|
};
|
|
@@ -403,79 +404,34 @@ function Ur(n) {
|
|
|
403
404
|
rowHeight: u
|
|
404
405
|
};
|
|
405
406
|
}
|
|
406
|
-
function
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
}
|
|
414
|
-
function Xe(n, e) {
|
|
415
|
-
const {
|
|
416
|
-
startLeft: t,
|
|
417
|
-
scale: r,
|
|
418
|
-
scaleWidth: s
|
|
419
|
-
} = e;
|
|
420
|
-
return (n - t) / s * r;
|
|
421
|
-
}
|
|
422
|
-
function Ot(n, e) {
|
|
423
|
-
const {
|
|
424
|
-
left: t,
|
|
425
|
-
width: r
|
|
426
|
-
} = n, s = Xe(t, e), o = Xe(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 = Pe(t, e), o = Pe(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);
|
|
407
|
+
function Yr(n) {
|
|
408
|
+
for (var e = [], t = 1; t < arguments.length; t++)
|
|
409
|
+
e[t - 1] = arguments[t];
|
|
410
|
+
return e.map(function(r) {
|
|
411
|
+
return r.split(" ").map(function(s) {
|
|
412
|
+
return s ? "" + n + s : "";
|
|
413
|
+
}).join(" ");
|
|
414
|
+
}).join(" ");
|
|
456
415
|
}
|
|
457
|
-
function
|
|
458
|
-
|
|
459
|
-
return n.forEach((r) => {
|
|
460
|
-
t.push(Pe(r.start, e)), t.push(Pe(r.end, e));
|
|
461
|
-
}), t;
|
|
416
|
+
function fe(...n) {
|
|
417
|
+
return Yr(`${dn}-`, ...n);
|
|
462
418
|
}
|
|
463
|
-
var
|
|
464
|
-
var
|
|
465
|
-
function
|
|
466
|
-
if (
|
|
467
|
-
|
|
468
|
-
var n =
|
|
469
|
-
return
|
|
419
|
+
var Vt = { exports: {} }, on = {};
|
|
420
|
+
var An;
|
|
421
|
+
function Xr() {
|
|
422
|
+
if (An) return on;
|
|
423
|
+
An = 1;
|
|
424
|
+
var n = Je.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
425
|
+
return on.c = function(e) {
|
|
470
426
|
return n.H.useMemoCache(e);
|
|
471
|
-
},
|
|
427
|
+
}, on;
|
|
472
428
|
}
|
|
473
|
-
var
|
|
474
|
-
var
|
|
475
|
-
function
|
|
476
|
-
return
|
|
477
|
-
var n =
|
|
478
|
-
|
|
429
|
+
var cn = {};
|
|
430
|
+
var Pn;
|
|
431
|
+
function Gr() {
|
|
432
|
+
return Pn || (Pn = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
433
|
+
var n = Je.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
|
|
434
|
+
cn.c = function(e) {
|
|
479
435
|
var t = n.H;
|
|
480
436
|
return t === null && console.error(
|
|
481
437
|
`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
@@ -485,27 +441,15 @@ function Xr() {
|
|
|
485
441
|
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`
|
|
486
442
|
), t.useMemoCache(e);
|
|
487
443
|
};
|
|
488
|
-
})()),
|
|
489
|
-
}
|
|
490
|
-
var Ln;
|
|
491
|
-
function Gr() {
|
|
492
|
-
return Ln || (Ln = 1, process.env.NODE_ENV === "production" ? Ft.exports = Yr() : Ft.exports = Xr()), Ft.exports;
|
|
444
|
+
})()), cn;
|
|
493
445
|
}
|
|
494
|
-
var
|
|
495
|
-
function Kr(
|
|
496
|
-
|
|
497
|
-
e[t - 1] = arguments[t];
|
|
498
|
-
return e.map(function(r) {
|
|
499
|
-
return r.split(" ").map(function(s) {
|
|
500
|
-
return s ? "" + n + s : "";
|
|
501
|
-
}).join(" ");
|
|
502
|
-
}).join(" ");
|
|
503
|
-
}
|
|
504
|
-
function fe(...n) {
|
|
505
|
-
return Kr(`${fn}-`, ...n);
|
|
446
|
+
var Dn;
|
|
447
|
+
function Kr() {
|
|
448
|
+
return Dn || (Dn = 1, process.env.NODE_ENV === "production" ? Vt.exports = Xr() : Vt.exports = Gr()), Vt.exports;
|
|
506
449
|
}
|
|
450
|
+
var Pe = Kr();
|
|
507
451
|
const qr = (n) => {
|
|
508
|
-
const e =
|
|
452
|
+
const e = Pe.c(11), {
|
|
509
453
|
isMoving: t,
|
|
510
454
|
movePositions: r,
|
|
511
455
|
assistPositions: s
|
|
@@ -527,28 +471,28 @@ function Jr(n, e) {
|
|
|
527
471
|
left: n
|
|
528
472
|
} }, e);
|
|
529
473
|
}
|
|
530
|
-
const
|
|
474
|
+
const Ut = 1, Ln = 10, On = 10;
|
|
531
475
|
function Zr(n) {
|
|
532
|
-
const e =
|
|
476
|
+
const e = Pe.c(7), t = ne(Number.MIN_SAFE_INTEGER), r = ne(Number.MAX_SAFE_INTEGER), s = ne(Ut), o = ne(void 0);
|
|
533
477
|
let i;
|
|
534
478
|
e[0] !== n ? (i = () => {
|
|
535
479
|
if (n?.current) {
|
|
536
480
|
const {
|
|
537
|
-
left:
|
|
538
|
-
width:
|
|
481
|
+
left: S,
|
|
482
|
+
width: _
|
|
539
483
|
} = n.current.getBoundingClientRect();
|
|
540
|
-
t.current =
|
|
484
|
+
t.current = S, r.current = S + _;
|
|
541
485
|
}
|
|
542
486
|
}, e[0] = n, e[1] = i) : i = e[1];
|
|
543
487
|
const c = i;
|
|
544
488
|
let a;
|
|
545
|
-
e[2] === Symbol.for("react.memo_cache_sentinel") ? (a = (
|
|
546
|
-
if (
|
|
489
|
+
e[2] === Symbol.for("react.memo_cache_sentinel") ? (a = (S, _) => {
|
|
490
|
+
if (S.clientX >= r.current || S.clientX <= t.current) {
|
|
547
491
|
o.current !== void 0 && cancelAnimationFrame(o.current);
|
|
548
|
-
const
|
|
549
|
-
s.current = Math.min(Number((
|
|
550
|
-
const
|
|
551
|
-
|
|
492
|
+
const p = Math.abs(S.clientX >= r.current ? S.clientX - r.current : S.clientX - t.current);
|
|
493
|
+
s.current = Math.min(Number((p / On).toFixed(0)) * Ut, Ln);
|
|
494
|
+
const v = (S.clientX >= r.current ? 1 : -1) * s.current, w = () => {
|
|
495
|
+
_ && _(v), o.current = requestAnimationFrame(w);
|
|
552
496
|
};
|
|
553
497
|
return o.current = requestAnimationFrame(w), !1;
|
|
554
498
|
} else
|
|
@@ -557,13 +501,13 @@ function Zr(n) {
|
|
|
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 = (
|
|
561
|
-
if (
|
|
504
|
+
e[3] === Symbol.for("react.memo_cache_sentinel") ? (l = (S, _, p) => {
|
|
505
|
+
if (S.clientX >= r.current || S.clientX < t.current) {
|
|
562
506
|
o.current !== void 0 && cancelAnimationFrame(o.current);
|
|
563
|
-
const
|
|
564
|
-
s.current = Math.min(Number((
|
|
565
|
-
const w = (
|
|
566
|
-
|
|
507
|
+
const g = Math.abs(S.clientX >= r.current ? S.clientX - r.current : S.clientX - t.current);
|
|
508
|
+
s.current = Math.min(Number((g / On).toFixed(0)) * Ut, Ln);
|
|
509
|
+
const w = (S.clientX >= r.current ? 1 : -1) * s.current, T = () => {
|
|
510
|
+
p && p(w), o.current = requestAnimationFrame(T);
|
|
567
511
|
};
|
|
568
512
|
return o.current = requestAnimationFrame(T), !1;
|
|
569
513
|
} else
|
|
@@ -571,18 +515,18 @@ 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") ? (
|
|
576
|
-
t.current = Number.MIN_SAFE_INTEGER, r.current = Number.MAX_SAFE_INTEGER, s.current =
|
|
577
|
-
}, e[4] =
|
|
578
|
-
const
|
|
579
|
-
let
|
|
580
|
-
return e[5] !== c ? (
|
|
518
|
+
let d;
|
|
519
|
+
e[4] === Symbol.for("react.memo_cache_sentinel") ? (d = () => {
|
|
520
|
+
t.current = Number.MIN_SAFE_INTEGER, r.current = Number.MAX_SAFE_INTEGER, s.current = Ut, o.current !== void 0 && cancelAnimationFrame(o.current);
|
|
521
|
+
}, e[4] = d) : d = e[4];
|
|
522
|
+
const m = d;
|
|
523
|
+
let E;
|
|
524
|
+
return e[5] !== c ? (E = {
|
|
581
525
|
initAutoScroll: c,
|
|
582
526
|
dealDragAutoScroll: u,
|
|
583
527
|
dealResizeAutoScroll: h,
|
|
584
|
-
stopAutoScroll:
|
|
585
|
-
}, e[5] = c, e[6] =
|
|
528
|
+
stopAutoScroll: m
|
|
529
|
+
}, e[5] = c, e[6] = E) : E = e[6], E;
|
|
586
530
|
}
|
|
587
531
|
function Qr(n, e, t) {
|
|
588
532
|
return Math.max(e, Math.min(n, t));
|
|
@@ -604,15 +548,15 @@ const de = {
|
|
|
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 ? Qr(n, e, t) : n < e ? -
|
|
554
|
+
function Nn(n, e, t, r = 0.15) {
|
|
555
|
+
return r === 0 ? Qr(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
557
|
function es(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
561
|
function ts(n, e) {
|
|
618
562
|
if (typeof n != "object" || n === null) return n;
|
|
@@ -628,7 +572,7 @@ function ns(n) {
|
|
|
628
572
|
var e = ts(n, "string");
|
|
629
573
|
return typeof e == "symbol" ? e : String(e);
|
|
630
574
|
}
|
|
631
|
-
function
|
|
575
|
+
function Se(n, e, t) {
|
|
632
576
|
return e = ns(e), e in n ? Object.defineProperty(n, e, {
|
|
633
577
|
value: t,
|
|
634
578
|
enumerable: !0,
|
|
@@ -636,7 +580,7 @@ function _e(n, e, t) {
|
|
|
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 Q(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,7 +623,7 @@ 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
629
|
const rs = ["enter", "leave"];
|
|
@@ -687,8 +631,8 @@ function ss(n = !1, e) {
|
|
|
687
631
|
return n && !rs.includes(e);
|
|
688
632
|
}
|
|
689
633
|
function os(n, e = "", t = !1) {
|
|
690
|
-
const r =
|
|
691
|
-
return "on" +
|
|
634
|
+
const r = nr[n], s = r && r[e] || e;
|
|
635
|
+
return "on" + kn(n) + kn(s) + (ss(t, s) ? "Capture" : "");
|
|
692
636
|
}
|
|
693
637
|
const is = ["gotpointercapture", "lostpointercapture"];
|
|
694
638
|
function cs(n) {
|
|
@@ -703,14 +647,14 @@ function cs(n) {
|
|
|
703
647
|
};
|
|
704
648
|
}
|
|
705
649
|
function as(n, e = "") {
|
|
706
|
-
const t =
|
|
650
|
+
const t = nr[n], r = t && t[e] || e;
|
|
707
651
|
return n + r;
|
|
708
652
|
}
|
|
709
|
-
function
|
|
653
|
+
function en(n) {
|
|
710
654
|
return "touches" in n;
|
|
711
655
|
}
|
|
712
|
-
function
|
|
713
|
-
return
|
|
656
|
+
function rr(n) {
|
|
657
|
+
return en(n) ? "touch" : "pointerType" in n ? n.pointerType : "mouse";
|
|
714
658
|
}
|
|
715
659
|
function ls(n) {
|
|
716
660
|
return Array.from(n.touches).filter((e) => {
|
|
@@ -721,18 +665,18 @@ function ls(n) {
|
|
|
721
665
|
function us(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 en(n) ? us(n)[0] : n;
|
|
726
670
|
}
|
|
727
671
|
function fs(n) {
|
|
728
672
|
return ls(n).map((e) => e.identifier);
|
|
729
673
|
}
|
|
730
|
-
function
|
|
731
|
-
const e =
|
|
732
|
-
return
|
|
674
|
+
function an(n) {
|
|
675
|
+
const e = sr(n);
|
|
676
|
+
return en(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
682
|
function ds(n) {
|
|
@@ -753,7 +697,7 @@ function ds(n) {
|
|
|
753
697
|
}
|
|
754
698
|
return e;
|
|
755
699
|
}
|
|
756
|
-
function
|
|
700
|
+
function qt(n, ...e) {
|
|
757
701
|
return typeof n == "function" ? n(...e) : n;
|
|
758
702
|
}
|
|
759
703
|
function hs() {
|
|
@@ -766,7 +710,7 @@ function ms(...n) {
|
|
|
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
716
|
const ps = 32;
|
|
@@ -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 ? qt(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;
|
|
@@ -828,8 +772,8 @@ class gs {
|
|
|
828
772
|
t.args = this.args;
|
|
829
773
|
let o = 0;
|
|
830
774
|
if (e && (t.event = e, r.preventDefault && e.cancelable && t.event.preventDefault(), t.type = e.type, s.touches = this.ctrl.pointerIds.size || this.ctrl.touchIds.size, s.locked = !!document.pointerLockElement, Object.assign(s, ds(e)), s.down = s.pressed = s.buttons % 2 === 1 || s.touches > 0, o = e.timeStamp - t.timeStamp, t.timeStamp = e.timeStamp, t.elapsedTime = t.timeStamp - t.startTime), t._active) {
|
|
831
|
-
const
|
|
832
|
-
de.addTo(t._distance,
|
|
775
|
+
const y = t._delta.map(Math.abs);
|
|
776
|
+
de.addTo(t._distance, y);
|
|
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 [
|
|
843
|
-
|
|
786
|
+
const [y, A] = h;
|
|
787
|
+
d[0] = l[0] !== !1 ? y - l[0] : 0, d[1] = l[1] !== !1 ? A - l[1] : 0;
|
|
844
788
|
} else
|
|
845
|
-
|
|
846
|
-
this.restrictToAxis && !t._blocked && this.restrictToAxis(
|
|
847
|
-
const
|
|
848
|
-
|
|
849
|
-
const [
|
|
850
|
-
t.overflow = [
|
|
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, E = t._active && !t._blocked || t.active;
|
|
792
|
+
E && (t.first = t._active && !t.active, t.last = !t._active && t.active, t.active = s[this.ingKey] = t._active, e && (t.first && ("bounds" in r && (t._bounds = qt(r.bounds, t)), this.setup && this.setup()), t.movement = d, this.computeOffset()));
|
|
793
|
+
const [S, _] = t.offset, [[p, g], [v, w]] = t._bounds;
|
|
794
|
+
t.overflow = [S < p ? -1 : S > g ? 1 : 0, _ < v ? -1 : _ > w ? 1 : 0], t._movementBound[0] = t.overflow[0] ? t._movementBound[0] === !1 ? t._movement[0] : t._movementBound[0] : !1, t._movementBound[1] = t.overflow[1] ? t._movementBound[1] === !1 ? t._movement[1] : t._movementBound[1] : !1;
|
|
851
795
|
const T = t._active ? r.rubberband || [0, 0] : [0, 0];
|
|
852
|
-
if (t.offset = es(t._bounds, t.offset, T), t.delta = de.sub(t.offset,
|
|
853
|
-
t.delta = de.sub(t.offset,
|
|
854
|
-
const
|
|
855
|
-
de.addTo(t.distance,
|
|
796
|
+
if (t.offset = es(t._bounds, t.offset, T), t.delta = de.sub(t.offset, m), this.computeMovement(), E && (!t.last || o > ps)) {
|
|
797
|
+
t.delta = de.sub(t.offset, m);
|
|
798
|
+
const y = t.delta.map(Math.abs);
|
|
799
|
+
de.addTo(t.distance, y), t.direction = t.delta.map(Math.sign), t._direction = t._delta.map(Math.sign), !t.first && o > 0 && (t.velocity = [y[0] / o, y[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(Q(Q(Q({}, t), e), {}, {
|
|
862
806
|
[this.aliasKey]: e.values
|
|
863
807
|
}));
|
|
864
808
|
s !== void 0 && (e.memo = s);
|
|
@@ -876,7 +820,7 @@ function vs([n, e], t) {
|
|
|
876
820
|
}
|
|
877
821
|
class bs extends gs {
|
|
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;
|
|
@@ -893,7 +837,7 @@ class bs extends gs {
|
|
|
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[
|
|
840
|
+
const s = typeof r.axisThreshold == "object" ? r.axisThreshold[rr(e)] : r.axisThreshold;
|
|
897
841
|
t.axis = vs(t._movement, s);
|
|
898
842
|
}
|
|
899
843
|
t._blocked = (r.lockDirection || !!r.axis) && !t.axis || !!r.axis && r.axis !== t.axis;
|
|
@@ -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 Q(Q({}, t.shared.eventOptions), n);
|
|
919
863
|
},
|
|
920
864
|
preventDefault(n = !1) {
|
|
921
865
|
return n;
|
|
@@ -926,7 +870,7 @@ 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:
|
|
@@ -940,13 +884,13 @@ const Fn = (n) => n, Vn = 0.15, bn = {
|
|
|
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
896
|
return de.toVector(n, 0);
|
|
@@ -969,18 +913,18 @@ process.env.NODE_ENV === "development" && Object.assign(bn, {
|
|
|
969
913
|
return NaN;
|
|
970
914
|
}
|
|
971
915
|
});
|
|
972
|
-
const
|
|
916
|
+
const Ss = 0, It = Q(Q({}, 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 = Ss) {
|
|
979
923
|
return n;
|
|
980
924
|
},
|
|
981
925
|
bounds(n = {}) {
|
|
982
926
|
if (typeof n == "function")
|
|
983
|
-
return (o) =>
|
|
927
|
+
return (o) => It.bounds(n(o));
|
|
984
928
|
if ("current" in n)
|
|
985
929
|
return () => n.current;
|
|
986
930
|
if (typeof HTMLElement == "function" && n instanceof HTMLElement)
|
|
@@ -993,15 +937,15 @@ const _s = 0, Nt = te(te({}, 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
|
|
946
|
+
class _s extends bs {
|
|
1003
947
|
constructor(...e) {
|
|
1004
|
-
super(...e),
|
|
948
|
+
super(...e), Se(this, "ingKey", "dragging");
|
|
1005
949
|
}
|
|
1006
950
|
reset() {
|
|
1007
951
|
super.reset();
|
|
@@ -1017,7 +961,7 @@ class Ss extends bs {
|
|
|
1017
961
|
top: t.top - r.top + e.offset[1],
|
|
1018
962
|
bottom: t.bottom - r.bottom + e.offset[1]
|
|
1019
963
|
};
|
|
1020
|
-
e._bounds =
|
|
964
|
+
e._bounds = It.bounds(s);
|
|
1021
965
|
}
|
|
1022
966
|
}
|
|
1023
967
|
cancel() {
|
|
@@ -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 = an(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,9 +989,9 @@ 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 = an(e);
|
|
1049
993
|
if (t._pointerId !== void 0 && s !== t._pointerId) return;
|
|
1050
|
-
const o =
|
|
994
|
+
const o = Wn(e);
|
|
1051
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;
|
|
@@ -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 = an(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,
|
|
1085
|
-
if (t.elapsedTime <
|
|
1086
|
-
const
|
|
1087
|
-
|
|
1028
|
+
const [c, a] = t._delta, [u, l] = t._movement, [h, d] = r.swipe.velocity, [m, E] = r.swipe.distance, S = r.swipe.duration;
|
|
1029
|
+
if (t.elapsedTime < S) {
|
|
1030
|
+
const _ = Math.abs(c / t.timeDelta), p = Math.abs(a / t.timeDelta);
|
|
1031
|
+
_ > h && Math.abs(u) > m && (t.swipe[0] = Math.sign(c)), p > d && Math.abs(l) > E && (t.swipe[1] = Math.sign(a));
|
|
1088
1032
|
}
|
|
1089
1033
|
}
|
|
1090
1034
|
this.emit();
|
|
@@ -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
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;
|
|
@@ -1143,20 +1087,20 @@ class Ss extends bs {
|
|
|
1143
1087
|
function ws(n) {
|
|
1144
1088
|
"persist" in n && typeof n.persist == "function" && n.persist();
|
|
1145
1089
|
}
|
|
1146
|
-
const
|
|
1147
|
-
function
|
|
1148
|
-
return
|
|
1090
|
+
const kt = typeof window < "u" && window.document && window.document.createElement;
|
|
1091
|
+
function or() {
|
|
1092
|
+
return kt && "ontouchstart" in window;
|
|
1149
1093
|
}
|
|
1150
1094
|
function Es() {
|
|
1151
|
-
return
|
|
1095
|
+
return or() || kt && window.navigator.maxTouchPoints > 1;
|
|
1152
1096
|
}
|
|
1153
1097
|
function ys() {
|
|
1154
|
-
return
|
|
1155
|
-
}
|
|
1156
|
-
function xs() {
|
|
1157
|
-
return It && "exitPointerLock" in window.document;
|
|
1098
|
+
return kt && "onpointerdown" in window;
|
|
1158
1099
|
}
|
|
1159
1100
|
function Rs() {
|
|
1101
|
+
return kt && "exitPointerLock" in window.document;
|
|
1102
|
+
}
|
|
1103
|
+
function xs() {
|
|
1160
1104
|
try {
|
|
1161
1105
|
return "constructor" in GestureEvent;
|
|
1162
1106
|
} catch {
|
|
@@ -1164,17 +1108,17 @@ function Rs() {
|
|
|
1164
1108
|
}
|
|
1165
1109
|
}
|
|
1166
1110
|
const we = {
|
|
1167
|
-
isBrowser:
|
|
1168
|
-
gesture:
|
|
1169
|
-
touch:
|
|
1111
|
+
isBrowser: kt,
|
|
1112
|
+
gesture: xs(),
|
|
1113
|
+
touch: or(),
|
|
1170
1114
|
touchscreen: Es(),
|
|
1171
1115
|
pointer: ys(),
|
|
1172
|
-
pointerLock:
|
|
1173
|
-
}, Cs = 250,
|
|
1116
|
+
pointerLock: Rs()
|
|
1117
|
+
}, Cs = 250, Ts = 180, As = 0.5, Ps = 50, Ds = 250, Ls = 10, Un = {
|
|
1174
1118
|
mouse: 0,
|
|
1175
1119
|
touch: 0,
|
|
1176
1120
|
pen: 8
|
|
1177
|
-
},
|
|
1121
|
+
}, ir = Q(Q({}, It), {}, {
|
|
1178
1122
|
device(n, e, {
|
|
1179
1123
|
pointer: {
|
|
1180
1124
|
touch: t = !1,
|
|
@@ -1208,7 +1152,7 @@ const we = {
|
|
|
1208
1152
|
return this.filterTaps = t, this.tapsThreshold = r, o;
|
|
1209
1153
|
},
|
|
1210
1154
|
swipe({
|
|
1211
|
-
velocity: n =
|
|
1155
|
+
velocity: n = As,
|
|
1212
1156
|
distance: e = Ps,
|
|
1213
1157
|
duration: t = Ds
|
|
1214
1158
|
} = {}) {
|
|
@@ -1221,7 +1165,7 @@ const we = {
|
|
|
1221
1165
|
delay(n = 0) {
|
|
1222
1166
|
switch (n) {
|
|
1223
1167
|
case !0:
|
|
1224
|
-
return
|
|
1168
|
+
return Ts;
|
|
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 ? Q(Q({}, Un), n) : Un;
|
|
1233
1177
|
},
|
|
1234
1178
|
keyboardDisplacement(n = Ls) {
|
|
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
|
+
Q(Q({}, bn), {}, {
|
|
1266
1210
|
device(n, e, {
|
|
1267
1211
|
shared: t,
|
|
1268
1212
|
pointer: {
|
|
@@ -1281,13 +1225,13 @@ te(te({}, bn), {}, {
|
|
|
1281
1225
|
angleBounds: r = {}
|
|
1282
1226
|
}) {
|
|
1283
1227
|
const s = (i) => {
|
|
1284
|
-
const c =
|
|
1228
|
+
const c = zn(qt(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(qt(r, i), {
|
|
1291
1235
|
min: -1 / 0,
|
|
1292
1236
|
max: 1 / 0
|
|
1293
1237
|
});
|
|
@@ -1305,20 +1249,20 @@ te(te({}, bn), {}, {
|
|
|
1305
1249
|
return n;
|
|
1306
1250
|
}
|
|
1307
1251
|
});
|
|
1308
|
-
|
|
1252
|
+
Q(Q({}, It), {}, {
|
|
1309
1253
|
mouseOnly: (n = !0) => n
|
|
1310
1254
|
});
|
|
1311
|
-
|
|
1255
|
+
Q(Q({}, It), {}, {
|
|
1312
1256
|
mouseOnly: (n = !0) => n
|
|
1313
1257
|
});
|
|
1314
|
-
const
|
|
1258
|
+
const cr = /* @__PURE__ */ new Map(), pn = /* @__PURE__ */ new Map();
|
|
1315
1259
|
function Os(n) {
|
|
1316
|
-
|
|
1260
|
+
cr.set(n.key, n.engine), pn.set(n.key, n.resolver);
|
|
1317
1261
|
}
|
|
1318
1262
|
const Ms = {
|
|
1319
1263
|
key: "drag",
|
|
1320
|
-
engine:
|
|
1321
|
-
resolver:
|
|
1264
|
+
engine: _s,
|
|
1265
|
+
resolver: ir
|
|
1322
1266
|
};
|
|
1323
1267
|
function Ns(n, e) {
|
|
1324
1268
|
if (n == null) return {};
|
|
@@ -1361,7 +1305,7 @@ const ks = {
|
|
|
1361
1305
|
return n;
|
|
1362
1306
|
}
|
|
1363
1307
|
}, Ws = ["target", "eventOptions", "window", "enabled", "transform"];
|
|
1364
|
-
function
|
|
1308
|
+
function Ht(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 $t(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] = Ht(n[r], s);
|
|
1377
1321
|
break;
|
|
1378
1322
|
case "boolean":
|
|
1379
1323
|
s && (t[r] = n[r]);
|
|
@@ -1389,22 +1333,22 @@ function zs(n, e, t = {}) {
|
|
|
1389
1333
|
enabled: c,
|
|
1390
1334
|
transform: a
|
|
1391
1335
|
} = r, u = Is(r, Ws);
|
|
1392
|
-
if (t.shared =
|
|
1336
|
+
if (t.shared = Ht({
|
|
1393
1337
|
target: s,
|
|
1394
1338
|
eventOptions: o,
|
|
1395
1339
|
window: i,
|
|
1396
1340
|
enabled: c,
|
|
1397
1341
|
transform: a
|
|
1398
1342
|
}, ks), e) {
|
|
1399
|
-
const l =
|
|
1400
|
-
t[e] =
|
|
1343
|
+
const l = pn.get(e);
|
|
1344
|
+
t[e] = Ht(Q({
|
|
1401
1345
|
shared: t.shared
|
|
1402
1346
|
}, u), l);
|
|
1403
1347
|
} else
|
|
1404
1348
|
for (const l in u) {
|
|
1405
|
-
const h =
|
|
1349
|
+
const h = pn.get(l);
|
|
1406
1350
|
if (h)
|
|
1407
|
-
t[l] =
|
|
1351
|
+
t[l] = Ht(Q({
|
|
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 = as(t, r), a = this._gestureKey ? this._ctrl.config[this._gestureKey].eventOptions : {}, u =
|
|
1367
|
+
const i = this._listeners, c = as(t, r), a = this._gestureKey ? this._ctrl.config[this._gestureKey].eventOptions : {}, u = Q(Q({}, a), o);
|
|
1424
1368
|
e.addEventListener(c, s, u);
|
|
1425
1369
|
const l = () => {
|
|
1426
1370
|
e.removeEventListener(c, s, u), i.delete(l);
|
|
@@ -1433,7 +1377,7 @@ class ur {
|
|
|
1433
1377
|
}
|
|
1434
1378
|
class js {
|
|
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));
|
|
@@ -1448,7 +1392,7 @@ class js {
|
|
|
1448
1392
|
}
|
|
1449
1393
|
class Fs {
|
|
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,
|
|
@@ -1458,7 +1402,7 @@ class Fs {
|
|
|
1458
1402
|
}), Vs(this, e);
|
|
1459
1403
|
}
|
|
1460
1404
|
setEventIds(e) {
|
|
1461
|
-
if (
|
|
1405
|
+
if (en(e))
|
|
1462
1406
|
return this.touchIds = new Set(fs(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;
|
|
@@ -1483,15 +1427,15 @@ 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](Q(Q({}, this.state.shared), {}, {
|
|
1495
1439
|
event: c,
|
|
1496
1440
|
args: e
|
|
1497
1441
|
})), void 0, !0);
|
|
@@ -1513,80 +1457,80 @@ class Fs {
|
|
|
1513
1457
|
}
|
|
1514
1458
|
}
|
|
1515
1459
|
}
|
|
1516
|
-
function
|
|
1517
|
-
n.gestures.add(e), n.gestureEventStores[e] = new
|
|
1460
|
+
function yt(n, e) {
|
|
1461
|
+
n.gestures.add(e), n.gestureEventStores[e] = new ar(n, e), n.gestureTimeoutStores[e] = new js();
|
|
1518
1462
|
}
|
|
1519
1463
|
function Vs(n, e) {
|
|
1520
|
-
e.drag &&
|
|
1464
|
+
e.drag && yt(n, "drag"), e.wheel && yt(n, "wheel"), e.scroll && yt(n, "scroll"), e.move && yt(n, "move"), e.pinch && yt(n, "pinch"), e.hover && yt(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 : os(r, s, l);
|
|
1470
|
+
t && h && (d += "Passive"), n[d] = n[d] || [], n[d].push(o);
|
|
1527
1471
|
};
|
|
1528
1472
|
function Us(n, e = {}, t, r) {
|
|
1529
|
-
const s =
|
|
1530
|
-
if (s.applyHandlers(n, r), s.applyConfig(e, t),
|
|
1473
|
+
const s = Je.useMemo(() => new Fs(n), []);
|
|
1474
|
+
if (s.applyHandlers(n, r), s.applyConfig(e, t), Je.useEffect(s.effect.bind(s)), Je.useEffect(() => s.clean.bind(s), []), e.target === void 0)
|
|
1531
1475
|
return s.bind.bind(s);
|
|
1532
1476
|
}
|
|
1533
|
-
function
|
|
1477
|
+
function ln(n, e) {
|
|
1534
1478
|
return Os(Ms), Us({
|
|
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
|
|
1503
|
+
function Qe(...n) {
|
|
1504
|
+
return b.useCallback(lr(...n), n);
|
|
1561
1505
|
}
|
|
1562
1506
|
// @__NO_SIDE_EFFECTS__
|
|
1563
|
-
function
|
|
1564
|
-
const e = /* @__PURE__ */ Hs(n), t =
|
|
1565
|
-
const { children: o, ...i } = r, c =
|
|
1507
|
+
function ur(n) {
|
|
1508
|
+
const e = /* @__PURE__ */ Hs(n), t = b.forwardRef((r, s) => {
|
|
1509
|
+
const { children: o, ...i } = r, c = b.Children.toArray(o), a = c.find(Ys);
|
|
1566
1510
|
if (a) {
|
|
1567
|
-
const u = a.props.children, l = c.map((h) => h === a ?
|
|
1568
|
-
return /* @__PURE__ */ R.jsx(e, { ...i, ref: s, children:
|
|
1511
|
+
const u = a.props.children, l = c.map((h) => h === a ? b.Children.count(u) > 1 ? b.Children.only(null) : b.isValidElement(u) ? u.props.children : null : h);
|
|
1512
|
+
return /* @__PURE__ */ R.jsx(e, { ...i, ref: s, children: b.isValidElement(u) ? b.cloneElement(u, void 0, l) : null });
|
|
1569
1513
|
}
|
|
1570
1514
|
return /* @__PURE__ */ R.jsx(e, { ...i, ref: s, children: o });
|
|
1571
1515
|
});
|
|
1572
1516
|
return t.displayName = `${n}.Slot`, t;
|
|
1573
1517
|
}
|
|
1574
|
-
var $s = /* @__PURE__ */
|
|
1518
|
+
var $s = /* @__PURE__ */ ur("Slot");
|
|
1575
1519
|
// @__NO_SIDE_EFFECTS__
|
|
1576
1520
|
function Hs(n) {
|
|
1577
|
-
const e =
|
|
1521
|
+
const e = b.forwardRef((t, r) => {
|
|
1578
1522
|
const { children: s, ...o } = t;
|
|
1579
|
-
if (
|
|
1523
|
+
if (b.isValidElement(s)) {
|
|
1580
1524
|
const i = Gs(s), c = Xs(o, s.props);
|
|
1581
|
-
return s.type !==
|
|
1525
|
+
return s.type !== b.Fragment && (c.ref = r ? lr(r, i) : i), b.cloneElement(s, c);
|
|
1582
1526
|
}
|
|
1583
|
-
return
|
|
1527
|
+
return b.Children.count(s) > 1 ? b.Children.only(null) : null;
|
|
1584
1528
|
});
|
|
1585
1529
|
return e.displayName = `${n}.SlotClone`, e;
|
|
1586
1530
|
}
|
|
1587
1531
|
var Bs = Symbol("radix.slottable");
|
|
1588
1532
|
function Ys(n) {
|
|
1589
|
-
return
|
|
1533
|
+
return b.isValidElement(n) && typeof n.type == "function" && "__radixId" in n.type && n.type.__radixId === Bs;
|
|
1590
1534
|
}
|
|
1591
1535
|
function Xs(n, e) {
|
|
1592
1536
|
const t = { ...e };
|
|
@@ -1621,8 +1565,8 @@ var Ks = [
|
|
|
1621
1565
|
"span",
|
|
1622
1566
|
"svg",
|
|
1623
1567
|
"ul"
|
|
1624
|
-
],
|
|
1625
|
-
const t = /* @__PURE__ */
|
|
1568
|
+
], Wt = Ks.reduce((n, e) => {
|
|
1569
|
+
const t = /* @__PURE__ */ ur(`Primitive.${e}`), r = b.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__ */ R.jsx(a, { ...c, ref: o });
|
|
1628
1572
|
});
|
|
@@ -1631,26 +1575,26 @@ var Ks = [
|
|
|
1631
1575
|
function qs(n, e = []) {
|
|
1632
1576
|
let t = [];
|
|
1633
1577
|
function r(o, i) {
|
|
1634
|
-
const c =
|
|
1578
|
+
const c = b.createContext(i), a = t.length;
|
|
1635
1579
|
t = [...t, i];
|
|
1636
1580
|
const u = (h) => {
|
|
1637
|
-
const { scope:
|
|
1638
|
-
return /* @__PURE__ */ R.jsx(
|
|
1581
|
+
const { scope: d, children: m, ...E } = h, S = d?.[n]?.[a] || c, _ = b.useMemo(() => E, Object.values(E));
|
|
1582
|
+
return /* @__PURE__ */ R.jsx(S.Provider, { value: _, children: m });
|
|
1639
1583
|
};
|
|
1640
1584
|
u.displayName = o + "Provider";
|
|
1641
|
-
function l(h,
|
|
1642
|
-
const
|
|
1643
|
-
if (
|
|
1585
|
+
function l(h, d) {
|
|
1586
|
+
const m = d?.[n]?.[a] || c, E = b.useContext(m);
|
|
1587
|
+
if (E) return E;
|
|
1644
1588
|
if (i !== void 0) return i;
|
|
1645
1589
|
throw new Error(`\`${h}\` must be used within \`${o}\``);
|
|
1646
1590
|
}
|
|
1647
1591
|
return [u, l];
|
|
1648
1592
|
}
|
|
1649
1593
|
const s = () => {
|
|
1650
|
-
const o = t.map((i) =>
|
|
1594
|
+
const o = t.map((i) => b.createContext(i));
|
|
1651
1595
|
return function(c) {
|
|
1652
1596
|
const a = c?.[n] || o;
|
|
1653
|
-
return
|
|
1597
|
+
return b.useMemo(
|
|
1654
1598
|
() => ({ [`__scope${n}`]: { ...c, [n]: a } }),
|
|
1655
1599
|
[c, a]
|
|
1656
1600
|
);
|
|
@@ -1671,29 +1615,29 @@ function Js(...n) {
|
|
|
1671
1615
|
const h = a(o)[`__scope${u}`];
|
|
1672
1616
|
return { ...c, ...h };
|
|
1673
1617
|
}, {});
|
|
1674
|
-
return
|
|
1618
|
+
return b.useMemo(() => ({ [`__scope${e.scopeName}`]: i }), [i]);
|
|
1675
1619
|
};
|
|
1676
1620
|
};
|
|
1677
1621
|
return t.scopeName = e.scopeName, t;
|
|
1678
1622
|
}
|
|
1679
|
-
function
|
|
1623
|
+
function Ze(n, e, { checkForDefaultPrevented: t = !0 } = {}) {
|
|
1680
1624
|
return function(s) {
|
|
1681
1625
|
if (n?.(s), t === !1 || !s.defaultPrevented)
|
|
1682
1626
|
return e?.(s);
|
|
1683
1627
|
};
|
|
1684
1628
|
}
|
|
1685
|
-
var
|
|
1629
|
+
var gn = globalThis?.document ? b.useLayoutEffect : () => {
|
|
1686
1630
|
};
|
|
1687
1631
|
function Zs(n, e) {
|
|
1688
|
-
return
|
|
1632
|
+
return b.useReducer((t, r) => e[t][r] ?? t, n);
|
|
1689
1633
|
}
|
|
1690
|
-
var
|
|
1691
|
-
const { present: e, children: t } = n, r = Qs(e), s = typeof t == "function" ? t({ present: r.isPresent }) :
|
|
1692
|
-
return typeof t == "function" || r.isPresent ?
|
|
1634
|
+
var zt = (n) => {
|
|
1635
|
+
const { present: e, children: t } = n, r = Qs(e), s = typeof t == "function" ? t({ present: r.isPresent }) : b.Children.only(t), o = Qe(r.ref, eo(s));
|
|
1636
|
+
return typeof t == "function" || r.isPresent ? b.cloneElement(s, { ref: o }) : null;
|
|
1693
1637
|
};
|
|
1694
|
-
|
|
1638
|
+
zt.displayName = "Presence";
|
|
1695
1639
|
function Qs(n) {
|
|
1696
|
-
const [e, t] =
|
|
1640
|
+
const [e, t] = b.useState(), r = b.useRef(null), s = b.useRef(n), o = b.useRef("none"), i = n ? "mounted" : "unmounted", [c, a] = Zs(i, {
|
|
1697
1641
|
mounted: {
|
|
1698
1642
|
UNMOUNT: "unmounted",
|
|
1699
1643
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -1706,66 +1650,66 @@ function Qs(n) {
|
|
|
1706
1650
|
MOUNT: "mounted"
|
|
1707
1651
|
}
|
|
1708
1652
|
});
|
|
1709
|
-
return
|
|
1710
|
-
const u =
|
|
1653
|
+
return b.useEffect(() => {
|
|
1654
|
+
const u = $t(r.current);
|
|
1711
1655
|
o.current = c === "mounted" ? u : "none";
|
|
1712
|
-
}, [c]),
|
|
1656
|
+
}, [c]), gn(() => {
|
|
1713
1657
|
const u = r.current, l = s.current;
|
|
1714
1658
|
if (l !== n) {
|
|
1715
|
-
const
|
|
1716
|
-
n ? a("MOUNT") :
|
|
1659
|
+
const d = o.current, m = $t(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
|
-
}, [n, a]),
|
|
1662
|
+
}, [n, a]), gn(() => {
|
|
1719
1663
|
if (e) {
|
|
1720
1664
|
let u;
|
|
1721
|
-
const l = e.ownerDocument.defaultView ?? window, h = (
|
|
1722
|
-
const
|
|
1723
|
-
if (
|
|
1724
|
-
const
|
|
1665
|
+
const l = e.ownerDocument.defaultView ?? window, h = (m) => {
|
|
1666
|
+
const S = $t(r.current).includes(CSS.escape(m.animationName));
|
|
1667
|
+
if (m.target === e && S && (a("ANIMATION_END"), !s.current)) {
|
|
1668
|
+
const _ = e.style.animationFillMode;
|
|
1725
1669
|
e.style.animationFillMode = "forwards", u = l.setTimeout(() => {
|
|
1726
|
-
e.style.animationFillMode === "forwards" && (e.style.animationFillMode =
|
|
1670
|
+
e.style.animationFillMode === "forwards" && (e.style.animationFillMode = _);
|
|
1727
1671
|
});
|
|
1728
1672
|
}
|
|
1729
|
-
},
|
|
1730
|
-
|
|
1673
|
+
}, d = (m) => {
|
|
1674
|
+
m.target === e && (o.current = $t(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");
|
|
1737
1681
|
}, [e, a]), {
|
|
1738
1682
|
isPresent: ["mounted", "unmountSuspended"].includes(c),
|
|
1739
|
-
ref:
|
|
1683
|
+
ref: b.useCallback((u) => {
|
|
1740
1684
|
r.current = u ? getComputedStyle(u) : null, t(u);
|
|
1741
1685
|
}, [])
|
|
1742
1686
|
};
|
|
1743
1687
|
}
|
|
1744
|
-
function
|
|
1688
|
+
function $t(n) {
|
|
1745
1689
|
return n?.animationName || "none";
|
|
1746
1690
|
}
|
|
1747
1691
|
function eo(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 to =
|
|
1695
|
+
var to = b.createContext(void 0);
|
|
1752
1696
|
function no(n) {
|
|
1753
|
-
const e =
|
|
1697
|
+
const e = b.useContext(to);
|
|
1754
1698
|
return n || e || "ltr";
|
|
1755
1699
|
}
|
|
1756
|
-
function
|
|
1757
|
-
const e =
|
|
1758
|
-
return
|
|
1700
|
+
function qe(n) {
|
|
1701
|
+
const e = b.useRef(n);
|
|
1702
|
+
return b.useEffect(() => {
|
|
1759
1703
|
e.current = n;
|
|
1760
|
-
}),
|
|
1704
|
+
}), b.useMemo(() => (...t) => e.current?.(...t), []);
|
|
1761
1705
|
}
|
|
1762
1706
|
function ro(n, [e, t]) {
|
|
1763
1707
|
return Math.min(t, Math.max(e, n));
|
|
1764
1708
|
}
|
|
1765
1709
|
function so(n, e) {
|
|
1766
|
-
return
|
|
1710
|
+
return b.useReducer((t, r) => e[t][r] ?? t, n);
|
|
1767
1711
|
}
|
|
1768
|
-
var
|
|
1712
|
+
var Sn = "ScrollArea", [fr] = qs(Sn), [oo, Ee] = fr(Sn), dr = b.forwardRef(
|
|
1769
1713
|
(n, e) => {
|
|
1770
1714
|
const {
|
|
1771
1715
|
__scopeScrollArea: t,
|
|
@@ -1773,7 +1717,7 @@ 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] =
|
|
1720
|
+
} = n, [c, a] = b.useState(null), [u, l] = b.useState(null), [h, d] = b.useState(null), [m, E] = b.useState(null), [S, _] = b.useState(null), [p, g] = b.useState(0), [v, w] = b.useState(0), [T, y] = b.useState(!1), [A, z] = b.useState(!1), O = Qe(e, (F) => a(F)), j = no(s);
|
|
1777
1721
|
return /* @__PURE__ */ R.jsx(
|
|
1778
1722
|
oo,
|
|
1779
1723
|
{
|
|
@@ -1785,19 +1729,19 @@ 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:
|
|
1789
|
-
scrollbarX:
|
|
1790
|
-
onScrollbarXChange:
|
|
1732
|
+
onContentChange: d,
|
|
1733
|
+
scrollbarX: m,
|
|
1734
|
+
onScrollbarXChange: E,
|
|
1791
1735
|
scrollbarXEnabled: T,
|
|
1792
|
-
onScrollbarXEnabledChange:
|
|
1793
|
-
scrollbarY:
|
|
1794
|
-
onScrollbarYChange:
|
|
1795
|
-
scrollbarYEnabled:
|
|
1796
|
-
onScrollbarYEnabledChange:
|
|
1797
|
-
onCornerWidthChange:
|
|
1736
|
+
onScrollbarXEnabledChange: y,
|
|
1737
|
+
scrollbarY: S,
|
|
1738
|
+
onScrollbarYChange: _,
|
|
1739
|
+
scrollbarYEnabled: A,
|
|
1740
|
+
onScrollbarYEnabledChange: z,
|
|
1741
|
+
onCornerWidthChange: g,
|
|
1798
1742
|
onCornerHeightChange: w,
|
|
1799
1743
|
children: /* @__PURE__ */ R.jsx(
|
|
1800
|
-
|
|
1744
|
+
Wt.div,
|
|
1801
1745
|
{
|
|
1802
1746
|
dir: j,
|
|
1803
1747
|
...i,
|
|
@@ -1805,8 +1749,8 @@ var _n = "ScrollArea", [hr] = qs(_n), [oo, Ee] = hr(_n), mr = g.forwardRef(
|
|
|
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": p + "px",
|
|
1753
|
+
"--radix-scroll-area-corner-height": v + "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 = b.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 = b.useRef(null), a = Qe(e, c, i.onViewportChange);
|
|
1822
1766
|
return /* @__PURE__ */ R.jsxs(R.Fragment, { children: [
|
|
1823
1767
|
/* @__PURE__ */ R.jsx(
|
|
1824
1768
|
"style",
|
|
@@ -1830,7 +1774,7 @@ var pr = "ScrollAreaViewport", gr = g.forwardRef(
|
|
|
1830
1774
|
}
|
|
1831
1775
|
),
|
|
1832
1776
|
/* @__PURE__ */ R.jsx(
|
|
1833
|
-
|
|
1777
|
+
Wt.div,
|
|
1834
1778
|
{
|
|
1835
1779
|
"data-radix-scroll-area-viewport": "",
|
|
1836
1780
|
...o,
|
|
@@ -1857,19 +1801,19 @@ var pr = "ScrollAreaViewport", gr = g.forwardRef(
|
|
|
1857
1801
|
] });
|
|
1858
1802
|
}
|
|
1859
1803
|
);
|
|
1860
|
-
|
|
1861
|
-
var
|
|
1804
|
+
mr.displayName = hr;
|
|
1805
|
+
var De = "ScrollAreaScrollbar", pr = b.forwardRef(
|
|
1862
1806
|
(n, e) => {
|
|
1863
|
-
const { forceMount: t, ...r } = n, s = Ee(
|
|
1864
|
-
return
|
|
1807
|
+
const { forceMount: t, ...r } = n, s = Ee(De, n.__scopeScrollArea), { onScrollbarXEnabledChange: o, onScrollbarYEnabledChange: i } = s, c = n.orientation === "horizontal";
|
|
1808
|
+
return b.useEffect(() => (c ? o(!0) : i(!0), () => {
|
|
1865
1809
|
c ? o(!1) : i(!1);
|
|
1866
|
-
}), [c, o, i]), s.type === "hover" ? /* @__PURE__ */ R.jsx(io, { ...r, ref: e, forceMount: t }) : s.type === "scroll" ? /* @__PURE__ */ R.jsx(co, { ...r, ref: e, forceMount: t }) : s.type === "auto" ? /* @__PURE__ */ R.jsx(
|
|
1810
|
+
}), [c, o, i]), s.type === "hover" ? /* @__PURE__ */ R.jsx(io, { ...r, ref: e, forceMount: t }) : s.type === "scroll" ? /* @__PURE__ */ R.jsx(co, { ...r, ref: e, forceMount: t }) : s.type === "auto" ? /* @__PURE__ */ R.jsx(gr, { ...r, ref: e, forceMount: t }) : s.type === "always" ? /* @__PURE__ */ R.jsx(_n, { ...r, ref: e }) : null;
|
|
1867
1811
|
}
|
|
1868
1812
|
);
|
|
1869
|
-
|
|
1870
|
-
var io =
|
|
1871
|
-
const { forceMount: t, ...r } = n, s = Ee(
|
|
1872
|
-
return
|
|
1813
|
+
pr.displayName = De;
|
|
1814
|
+
var io = b.forwardRef((n, e) => {
|
|
1815
|
+
const { forceMount: t, ...r } = n, s = Ee(De, n.__scopeScrollArea), [o, i] = b.useState(!1);
|
|
1816
|
+
return b.useEffect(() => {
|
|
1873
1817
|
const c = s.scrollArea;
|
|
1874
1818
|
let a = 0;
|
|
1875
1819
|
if (c) {
|
|
@@ -1882,16 +1826,16 @@ var io = g.forwardRef((n, e) => {
|
|
|
1882
1826
|
window.clearTimeout(a), c.removeEventListener("pointerenter", u), c.removeEventListener("pointerleave", l);
|
|
1883
1827
|
};
|
|
1884
1828
|
}
|
|
1885
|
-
}, [s.scrollArea, s.scrollHideDelay]), /* @__PURE__ */ R.jsx(
|
|
1886
|
-
|
|
1829
|
+
}, [s.scrollArea, s.scrollHideDelay]), /* @__PURE__ */ R.jsx(zt, { present: t || o, children: /* @__PURE__ */ R.jsx(
|
|
1830
|
+
gr,
|
|
1887
1831
|
{
|
|
1888
1832
|
"data-state": o ? "visible" : "hidden",
|
|
1889
1833
|
...r,
|
|
1890
1834
|
ref: e
|
|
1891
1835
|
}
|
|
1892
1836
|
) });
|
|
1893
|
-
}), co =
|
|
1894
|
-
const { forceMount: t, ...r } = n, s = Ee(
|
|
1837
|
+
}), co = b.forwardRef((n, e) => {
|
|
1838
|
+
const { forceMount: t, ...r } = n, s = Ee(De, n.__scopeScrollArea), o = n.orientation === "horizontal", i = nn(() => a("SCROLL_END"), 100), [c, a] = so("hidden", {
|
|
1895
1839
|
hidden: {
|
|
1896
1840
|
SCROLL: "scrolling"
|
|
1897
1841
|
},
|
|
@@ -1909,62 +1853,62 @@ var io = g.forwardRef((n, e) => {
|
|
|
1909
1853
|
POINTER_ENTER: "interacting"
|
|
1910
1854
|
}
|
|
1911
1855
|
});
|
|
1912
|
-
return
|
|
1856
|
+
return b.useEffect(() => {
|
|
1913
1857
|
if (c === "idle") {
|
|
1914
1858
|
const u = window.setTimeout(() => a("HIDE"), s.scrollHideDelay);
|
|
1915
1859
|
return () => window.clearTimeout(u);
|
|
1916
1860
|
}
|
|
1917
|
-
}, [c, s.scrollHideDelay, a]),
|
|
1861
|
+
}, [c, s.scrollHideDelay, a]), b.useEffect(() => {
|
|
1918
1862
|
const u = s.viewport, l = o ? "scrollLeft" : "scrollTop";
|
|
1919
1863
|
if (u) {
|
|
1920
1864
|
let h = u[l];
|
|
1921
|
-
const
|
|
1922
|
-
const
|
|
1923
|
-
h !==
|
|
1865
|
+
const d = () => {
|
|
1866
|
+
const m = u[l];
|
|
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
|
-
}, [s.viewport, o, a, i]), /* @__PURE__ */ R.jsx(
|
|
1928
|
-
|
|
1871
|
+
}, [s.viewport, o, a, i]), /* @__PURE__ */ R.jsx(zt, { present: t || c !== "hidden", children: /* @__PURE__ */ R.jsx(
|
|
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: Ze(n.onPointerEnter, () => a("POINTER_ENTER")),
|
|
1878
|
+
onPointerLeave: Ze(n.onPointerLeave, () => a("POINTER_LEAVE"))
|
|
1935
1879
|
}
|
|
1936
1880
|
) });
|
|
1937
|
-
}),
|
|
1938
|
-
const t = Ee(
|
|
1881
|
+
}), gr = b.forwardRef((n, e) => {
|
|
1882
|
+
const t = Ee(De, n.__scopeScrollArea), { forceMount: r, ...s } = n, [o, i] = b.useState(!1), c = n.orientation === "horizontal", a = nn(() => {
|
|
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 At(t.viewport, a), At(t.content, a), /* @__PURE__ */ R.jsx(zt, { present: r || o, children: /* @__PURE__ */ R.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 = b.forwardRef((n, e) => {
|
|
1897
|
+
const { orientation: t = "vertical", ...r } = n, s = Ee(De, n.__scopeScrollArea), o = b.useRef(null), i = b.useRef(0), [c, a] = b.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 mo(
|
|
1910
|
+
function h(d, m) {
|
|
1911
|
+
return mo(d, i.current, c, m);
|
|
1968
1912
|
}
|
|
1969
1913
|
return t === "horizontal" ? /* @__PURE__ */ R.jsx(
|
|
1970
1914
|
ao,
|
|
@@ -1973,15 +1917,15 @@ var io = g.forwardRef((n, e) => {
|
|
|
1973
1917
|
ref: e,
|
|
1974
1918
|
onThumbPositionChange: () => {
|
|
1975
1919
|
if (s.viewport && o.current) {
|
|
1976
|
-
const
|
|
1977
|
-
o.current.style.transform = `translate3d(${
|
|
1920
|
+
const d = s.viewport.scrollLeft, m = Bn(d, c, s.dir);
|
|
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__ */ R.jsx(
|
|
@@ -1991,24 +1935,24 @@ var io = g.forwardRef((n, e) => {
|
|
|
1991
1935
|
ref: e,
|
|
1992
1936
|
onThumbPositionChange: () => {
|
|
1993
1937
|
if (s.viewport && o.current) {
|
|
1994
|
-
const
|
|
1995
|
-
o.current.style.transform = `translate3d(0, ${
|
|
1938
|
+
const d = s.viewport.scrollTop, m = Bn(d, c);
|
|
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
|
-
}), ao =
|
|
2007
|
-
const { sizes: t, onSizesChange: r, ...s } = n, o = Ee(
|
|
2008
|
-
return
|
|
1950
|
+
}), ao = b.forwardRef((n, e) => {
|
|
1951
|
+
const { sizes: t, onSizesChange: r, ...s } = n, o = Ee(De, n.__scopeScrollArea), [i, c] = b.useState(), a = b.useRef(null), u = Qe(e, a, o.onScrollbarXChange);
|
|
1952
|
+
return b.useEffect(() => {
|
|
2009
1953
|
a.current && c(getComputedStyle(a.current));
|
|
2010
1954
|
}, [a]), /* @__PURE__ */ R.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": tn(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: Zt(i.paddingLeft),
|
|
1983
|
+
paddingEnd: Zt(i.paddingRight)
|
|
2040
1984
|
}
|
|
2041
1985
|
});
|
|
2042
1986
|
}
|
|
2043
1987
|
}
|
|
2044
1988
|
);
|
|
2045
|
-
}), lo =
|
|
2046
|
-
const { sizes: t, onSizesChange: r, ...s } = n, o = Ee(
|
|
2047
|
-
return
|
|
1989
|
+
}), lo = b.forwardRef((n, e) => {
|
|
1990
|
+
const { sizes: t, onSizesChange: r, ...s } = n, o = Ee(De, n.__scopeScrollArea), [i, c] = b.useState(), a = b.useRef(null), u = Qe(e, a, o.onScrollbarYChange);
|
|
1991
|
+
return b.useEffect(() => {
|
|
2048
1992
|
a.current && c(getComputedStyle(a.current));
|
|
2049
1993
|
}, [a]), /* @__PURE__ */ R.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": tn(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: Zt(i.paddingTop),
|
|
2023
|
+
paddingEnd: Zt(i.paddingBottom)
|
|
2080
2024
|
}
|
|
2081
2025
|
});
|
|
2082
2026
|
}
|
|
2083
2027
|
}
|
|
2084
2028
|
);
|
|
2085
|
-
}), [uo,
|
|
2029
|
+
}), [uo, vr] = fr(De), br = b.forwardRef((n, e) => {
|
|
2086
2030
|
const {
|
|
2087
2031
|
__scopeScrollArea: t,
|
|
2088
2032
|
sizes: r,
|
|
@@ -2094,74 +2038,74 @@ var io = g.forwardRef((n, e) => {
|
|
|
2094
2038
|
onDragScroll: u,
|
|
2095
2039
|
onWheelScroll: l,
|
|
2096
2040
|
onResize: h,
|
|
2097
|
-
...
|
|
2098
|
-
} = n,
|
|
2099
|
-
function
|
|
2100
|
-
if (
|
|
2101
|
-
const j = O.clientX -
|
|
2102
|
-
u({ x: j, y:
|
|
2041
|
+
...d
|
|
2042
|
+
} = n, m = Ee(De, t), [E, S] = b.useState(null), _ = Qe(e, (O) => S(O)), p = b.useRef(null), g = b.useRef(""), v = m.viewport, w = r.content - r.viewport, T = qe(l), y = qe(a), A = nn(h, 10);
|
|
2043
|
+
function z(O) {
|
|
2044
|
+
if (p.current) {
|
|
2045
|
+
const j = O.clientX - p.current.left, F = O.clientY - p.current.top;
|
|
2046
|
+
u({ x: j, y: F });
|
|
2103
2047
|
}
|
|
2104
2048
|
}
|
|
2105
|
-
return
|
|
2049
|
+
return b.useEffect(() => {
|
|
2106
2050
|
const O = (j) => {
|
|
2107
|
-
const
|
|
2108
|
-
|
|
2051
|
+
const F = j.target;
|
|
2052
|
+
E?.contains(F) && T(j, w);
|
|
2109
2053
|
};
|
|
2110
2054
|
return document.addEventListener("wheel", O, { passive: !1 }), () => document.removeEventListener("wheel", O, { passive: !1 });
|
|
2111
|
-
}, [
|
|
2055
|
+
}, [v, E, w, T]), b.useEffect(y, [r, y]), At(E, A), At(m.content, A), /* @__PURE__ */ R.jsx(
|
|
2112
2056
|
uo,
|
|
2113
2057
|
{
|
|
2114
2058
|
scope: t,
|
|
2115
|
-
scrollbar:
|
|
2059
|
+
scrollbar: E,
|
|
2116
2060
|
hasThumb: s,
|
|
2117
|
-
onThumbChange:
|
|
2118
|
-
onThumbPointerUp:
|
|
2119
|
-
onThumbPositionChange:
|
|
2120
|
-
onThumbPointerDown:
|
|
2061
|
+
onThumbChange: qe(o),
|
|
2062
|
+
onThumbPointerUp: qe(i),
|
|
2063
|
+
onThumbPositionChange: y,
|
|
2064
|
+
onThumbPointerDown: qe(c),
|
|
2121
2065
|
children: /* @__PURE__ */ R.jsx(
|
|
2122
|
-
|
|
2066
|
+
Wt.div,
|
|
2123
2067
|
{
|
|
2124
|
-
...
|
|
2125
|
-
ref:
|
|
2126
|
-
style: { position: "absolute", ...
|
|
2127
|
-
onPointerDown:
|
|
2128
|
-
O.button === 0 && (O.target.setPointerCapture(O.pointerId),
|
|
2068
|
+
...d,
|
|
2069
|
+
ref: _,
|
|
2070
|
+
style: { position: "absolute", ...d.style },
|
|
2071
|
+
onPointerDown: Ze(n.onPointerDown, (O) => {
|
|
2072
|
+
O.button === 0 && (O.target.setPointerCapture(O.pointerId), p.current = E.getBoundingClientRect(), g.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", m.viewport && (m.viewport.style.scrollBehavior = "auto"), z(O));
|
|
2129
2073
|
}),
|
|
2130
|
-
onPointerMove:
|
|
2131
|
-
onPointerUp:
|
|
2074
|
+
onPointerMove: Ze(n.onPointerMove, z),
|
|
2075
|
+
onPointerUp: Ze(n.onPointerUp, (O) => {
|
|
2132
2076
|
const j = O.target;
|
|
2133
|
-
j.hasPointerCapture(O.pointerId) && j.releasePointerCapture(O.pointerId), document.body.style.webkitUserSelect =
|
|
2077
|
+
j.hasPointerCapture(O.pointerId) && j.releasePointerCapture(O.pointerId), document.body.style.webkitUserSelect = g.current, m.viewport && (m.viewport.style.scrollBehavior = ""), p.current = null;
|
|
2134
2078
|
})
|
|
2135
2079
|
}
|
|
2136
2080
|
)
|
|
2137
2081
|
}
|
|
2138
2082
|
);
|
|
2139
|
-
}),
|
|
2083
|
+
}), Jt = "ScrollAreaThumb", Sr = b.forwardRef(
|
|
2140
2084
|
(n, e) => {
|
|
2141
|
-
const { forceMount: t, ...r } = n, s =
|
|
2142
|
-
return /* @__PURE__ */ R.jsx(
|
|
2085
|
+
const { forceMount: t, ...r } = n, s = vr(Jt, n.__scopeScrollArea);
|
|
2086
|
+
return /* @__PURE__ */ R.jsx(zt, { present: t || s.hasThumb, children: /* @__PURE__ */ R.jsx(fo, { ref: e, ...r }) });
|
|
2143
2087
|
}
|
|
2144
|
-
), fo =
|
|
2088
|
+
), fo = b.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(Jt, t), i = vr(Jt, t), { onThumbPositionChange: c } = i, a = Qe(
|
|
2147
2091
|
e,
|
|
2148
2092
|
(h) => i.onThumbChange(h)
|
|
2149
|
-
), u =
|
|
2093
|
+
), u = b.useRef(void 0), l = nn(() => {
|
|
2150
2094
|
u.current && (u.current(), u.current = void 0);
|
|
2151
2095
|
}, 100);
|
|
2152
|
-
return
|
|
2096
|
+
return b.useEffect(() => {
|
|
2153
2097
|
const h = o.viewport;
|
|
2154
2098
|
if (h) {
|
|
2155
|
-
const
|
|
2099
|
+
const d = () => {
|
|
2156
2100
|
if (l(), !u.current) {
|
|
2157
|
-
const
|
|
2158
|
-
u.current =
|
|
2101
|
+
const m = po(h, c);
|
|
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__ */ R.jsx(
|
|
2164
|
-
|
|
2108
|
+
Wt.div,
|
|
2165
2109
|
{
|
|
2166
2110
|
"data-state": i.hasThumb ? "visible" : "hidden",
|
|
2167
2111
|
...s,
|
|
@@ -2171,33 +2115,33 @@ var io = g.forwardRef((n, e) => {
|
|
|
2171
2115
|
height: "var(--radix-scroll-area-thumb-height)",
|
|
2172
2116
|
...r
|
|
2173
2117
|
},
|
|
2174
|
-
onPointerDownCapture:
|
|
2175
|
-
const
|
|
2176
|
-
i.onThumbPointerDown({ x:
|
|
2118
|
+
onPointerDownCapture: Ze(n.onPointerDownCapture, (h) => {
|
|
2119
|
+
const m = h.target.getBoundingClientRect(), E = h.clientX - m.left, S = h.clientY - m.top;
|
|
2120
|
+
i.onThumbPointerDown({ x: E, y: S });
|
|
2177
2121
|
}),
|
|
2178
|
-
onPointerUp:
|
|
2122
|
+
onPointerUp: Ze(n.onPointerUp, i.onThumbPointerUp)
|
|
2179
2123
|
}
|
|
2180
2124
|
);
|
|
2181
2125
|
}
|
|
2182
2126
|
);
|
|
2183
|
-
|
|
2184
|
-
var wn = "ScrollAreaCorner",
|
|
2127
|
+
Sr.displayName = Jt;
|
|
2128
|
+
var wn = "ScrollAreaCorner", _r = b.forwardRef(
|
|
2185
2129
|
(n, e) => {
|
|
2186
2130
|
const t = Ee(wn, n.__scopeScrollArea), r = !!(t.scrollbarX && t.scrollbarY);
|
|
2187
2131
|
return t.type !== "scroll" && r ? /* @__PURE__ */ R.jsx(ho, { ...n, ref: e }) : null;
|
|
2188
2132
|
}
|
|
2189
2133
|
);
|
|
2190
|
-
|
|
2191
|
-
var ho =
|
|
2192
|
-
const { __scopeScrollArea: t, ...r } = n, s = Ee(wn, t), [o, i] =
|
|
2193
|
-
return
|
|
2134
|
+
_r.displayName = wn;
|
|
2135
|
+
var ho = b.forwardRef((n, e) => {
|
|
2136
|
+
const { __scopeScrollArea: t, ...r } = n, s = Ee(wn, t), [o, i] = b.useState(0), [c, a] = b.useState(0), u = !!(o && c);
|
|
2137
|
+
return At(s.scrollbarX, () => {
|
|
2194
2138
|
const l = s.scrollbarX?.offsetHeight || 0;
|
|
2195
2139
|
s.onCornerHeightChange(l), a(l);
|
|
2196
|
-
}),
|
|
2140
|
+
}), At(s.scrollbarY, () => {
|
|
2197
2141
|
const l = s.scrollbarY?.offsetWidth || 0;
|
|
2198
2142
|
s.onCornerWidthChange(l), i(l);
|
|
2199
2143
|
}), u ? /* @__PURE__ */ R.jsx(
|
|
2200
|
-
|
|
2144
|
+
Wt.div,
|
|
2201
2145
|
{
|
|
2202
2146
|
...r,
|
|
2203
2147
|
ref: e,
|
|
@@ -2213,33 +2157,33 @@ var ho = g.forwardRef((n, e) => {
|
|
|
2213
2157
|
}
|
|
2214
2158
|
) : null;
|
|
2215
2159
|
});
|
|
2216
|
-
function
|
|
2160
|
+
function Zt(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 tn(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
2171
|
function mo(n, e, t, r = "ltr") {
|
|
2228
|
-
const s =
|
|
2229
|
-
return
|
|
2172
|
+
const s = tn(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 = tn(e), s = e.scrollbar.paddingStart + e.scrollbar.paddingEnd, o = e.scrollbar.size - s, i = e.content - e.viewport, c = o - r, a = t === "ltr" ? [0, i] : [i * -1, 0], u = ro(n, a);
|
|
2177
|
+
return 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
2189
|
var po = (n, e = () => {
|
|
@@ -2250,15 +2194,15 @@ 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 =
|
|
2255
|
-
return
|
|
2197
|
+
function nn(n, e) {
|
|
2198
|
+
const t = qe(n), r = b.useRef(0);
|
|
2199
|
+
return b.useEffect(() => () => window.clearTimeout(r.current), []), b.useCallback(() => {
|
|
2256
2200
|
window.clearTimeout(r.current), r.current = window.setTimeout(t, e);
|
|
2257
2201
|
}, [t, e]);
|
|
2258
2202
|
}
|
|
2259
|
-
function
|
|
2260
|
-
const t =
|
|
2261
|
-
|
|
2203
|
+
function At(n, e) {
|
|
2204
|
+
const t = qe(e);
|
|
2205
|
+
gn(() => {
|
|
2262
2206
|
let r = 0;
|
|
2263
2207
|
if (n) {
|
|
2264
2208
|
const s = new ResizeObserver(() => {
|
|
@@ -2270,8 +2214,8 @@ function Tt(n, e) {
|
|
|
2270
2214
|
}
|
|
2271
2215
|
}, [n, t]);
|
|
2272
2216
|
}
|
|
2273
|
-
var go =
|
|
2274
|
-
const
|
|
2217
|
+
var go = dr, vo = mr, bo = _r;
|
|
2218
|
+
const un = (n, e, t, r, s) => ({
|
|
2275
2219
|
target: n,
|
|
2276
2220
|
dx: e[0],
|
|
2277
2221
|
dy: e[1],
|
|
@@ -2283,8 +2227,8 @@ const ln = (n, e, t, r, s) => ({
|
|
|
2283
2227
|
...s && {
|
|
2284
2228
|
deltaRect: s
|
|
2285
2229
|
}
|
|
2286
|
-
}),
|
|
2287
|
-
const e =
|
|
2230
|
+
}), So = (n, e, t) => n ? n === e || n === t || (e?.contains(n) ?? !1) || (t?.contains(n) ?? !1) : !1, _o = (n) => {
|
|
2231
|
+
const e = Pe.c(34), {
|
|
2288
2232
|
children: t,
|
|
2289
2233
|
style: r,
|
|
2290
2234
|
draggable: s,
|
|
@@ -2292,89 +2236,89 @@ const ln = (n, e, t, r, s) => ({
|
|
|
2292
2236
|
draggableOptions: i,
|
|
2293
2237
|
resizableOptions: c,
|
|
2294
2238
|
ref: a
|
|
2295
|
-
} = n, u =
|
|
2296
|
-
let
|
|
2297
|
-
e[0] !== i || e[1] !== a || e[2] !== c ? (
|
|
2239
|
+
} = n, u = ne(void 0), l = ne(void 0), h = ne(null), d = ne(null), m = ne(void 0), E = ne(void 0);
|
|
2240
|
+
let S, _;
|
|
2241
|
+
e[0] !== i || e[1] !== a || e[2] !== c ? (S = () => {
|
|
2298
2242
|
if (u.current = i, l.current = c, !a?.current)
|
|
2299
2243
|
return;
|
|
2300
|
-
const
|
|
2301
|
-
|
|
2302
|
-
},
|
|
2303
|
-
let
|
|
2304
|
-
e[5] !== a ? (
|
|
2244
|
+
const C = c?.edges?.left, M = c?.edges?.right;
|
|
2245
|
+
C && C !== m.current && (m.current = C, h.current = a.current.querySelector(C)), M && M !== E.current && (E.current = M, d.current = a.current.querySelector(M));
|
|
2246
|
+
}, _ = [i, a, c], e[0] = i, e[1] = a, e[2] = c, e[3] = S, e[4] = _) : (S = e[3], _ = e[4]), Tt(S, _);
|
|
2247
|
+
let p;
|
|
2248
|
+
e[5] !== a ? (p = (C) => {
|
|
2305
2249
|
const {
|
|
2306
|
-
active:
|
|
2307
|
-
delta:
|
|
2308
|
-
xy:
|
|
2309
|
-
event:
|
|
2310
|
-
first:
|
|
2250
|
+
active: M,
|
|
2251
|
+
delta: G,
|
|
2252
|
+
xy: ee,
|
|
2253
|
+
event: re,
|
|
2254
|
+
first: f,
|
|
2311
2255
|
last: x
|
|
2312
|
-
} =
|
|
2313
|
-
if (!
|
|
2256
|
+
} = C, D = a?.current;
|
|
2257
|
+
if (!D || So(re?.target, h.current, d.current))
|
|
2314
2258
|
return;
|
|
2315
|
-
const
|
|
2316
|
-
|
|
2317
|
-
}, e[5] = a, e[6] =
|
|
2318
|
-
const
|
|
2319
|
-
let
|
|
2320
|
-
e[7] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2259
|
+
const W = un(D, G, ee);
|
|
2260
|
+
f ? u.current?.onstart?.(W) : x ? u.current?.onend?.(W) : M && u.current?.onmove?.(W);
|
|
2261
|
+
}, e[5] = a, e[6] = p) : p = e[6];
|
|
2262
|
+
const g = i?.lockAxis === "x" ? "x" : void 0;
|
|
2263
|
+
let v;
|
|
2264
|
+
e[7] === Symbol.for("react.memo_cache_sentinel") ? (v = {
|
|
2321
2265
|
capture: !0
|
|
2322
|
-
}, e[7] =
|
|
2266
|
+
}, e[7] = v) : v = e[7];
|
|
2323
2267
|
let w;
|
|
2324
|
-
e[8] !== s || e[9] !== a || e[10] !==
|
|
2268
|
+
e[8] !== s || e[9] !== a || e[10] !== g ? (w = {
|
|
2325
2269
|
enabled: s,
|
|
2326
|
-
axis:
|
|
2327
|
-
pointer:
|
|
2270
|
+
axis: g,
|
|
2271
|
+
pointer: v,
|
|
2328
2272
|
target: a,
|
|
2329
2273
|
threshold: 0
|
|
2330
|
-
}, e[8] = s, e[9] = a, e[10] =
|
|
2274
|
+
}, e[8] = s, e[9] = a, e[10] = g, e[11] = w) : w = e[11], ln(p, w);
|
|
2331
2275
|
let T;
|
|
2332
|
-
e[12] !== a ? (T = (
|
|
2276
|
+
e[12] !== a ? (T = (C) => {
|
|
2333
2277
|
const {
|
|
2334
|
-
active:
|
|
2335
|
-
delta:
|
|
2336
|
-
xy:
|
|
2337
|
-
first:
|
|
2338
|
-
last:
|
|
2339
|
-
} =
|
|
2278
|
+
active: M,
|
|
2279
|
+
delta: G,
|
|
2280
|
+
xy: ee,
|
|
2281
|
+
first: re,
|
|
2282
|
+
last: f
|
|
2283
|
+
} = C, x = a?.current;
|
|
2340
2284
|
if (!x)
|
|
2341
2285
|
return;
|
|
2342
|
-
const
|
|
2286
|
+
const D = un(x, G, ee, {
|
|
2343
2287
|
left: !0
|
|
2344
2288
|
}, {
|
|
2345
|
-
left:
|
|
2289
|
+
left: G[0]
|
|
2346
2290
|
});
|
|
2347
|
-
|
|
2291
|
+
re ? l.current?.onstart?.(D) : f ? l.current?.onend?.(D) : M && l.current?.onmove?.(D);
|
|
2348
2292
|
}, e[12] = a, e[13] = T) : T = e[13];
|
|
2349
|
-
let
|
|
2350
|
-
e[14] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2293
|
+
let y;
|
|
2294
|
+
e[14] === Symbol.for("react.memo_cache_sentinel") ? (y = {
|
|
2351
2295
|
capture: !0
|
|
2352
|
-
}, e[14] =
|
|
2353
|
-
let
|
|
2354
|
-
e[15] !== o ? (
|
|
2296
|
+
}, e[14] = y) : y = e[14];
|
|
2297
|
+
let A;
|
|
2298
|
+
e[15] !== o ? (A = {
|
|
2355
2299
|
enabled: o,
|
|
2356
2300
|
target: h,
|
|
2357
|
-
pointer:
|
|
2301
|
+
pointer: y,
|
|
2358
2302
|
threshold: 0
|
|
2359
|
-
}, e[15] = o, e[16] =
|
|
2360
|
-
let
|
|
2361
|
-
e[17] !== a ? (
|
|
2303
|
+
}, e[15] = o, e[16] = A) : A = e[16], ln(T, A);
|
|
2304
|
+
let z;
|
|
2305
|
+
e[17] !== a ? (z = (C) => {
|
|
2362
2306
|
const {
|
|
2363
|
-
active:
|
|
2364
|
-
delta:
|
|
2365
|
-
xy:
|
|
2366
|
-
first:
|
|
2367
|
-
last:
|
|
2368
|
-
} =
|
|
2307
|
+
active: M,
|
|
2308
|
+
delta: G,
|
|
2309
|
+
xy: ee,
|
|
2310
|
+
first: re,
|
|
2311
|
+
last: f
|
|
2312
|
+
} = C, x = a?.current;
|
|
2369
2313
|
if (!x)
|
|
2370
2314
|
return;
|
|
2371
|
-
const
|
|
2315
|
+
const D = un(x, G, ee, {
|
|
2372
2316
|
right: !0
|
|
2373
2317
|
}, {
|
|
2374
|
-
right:
|
|
2318
|
+
right: G[0]
|
|
2375
2319
|
});
|
|
2376
|
-
|
|
2377
|
-
}, e[17] = a, e[18] =
|
|
2320
|
+
re ? l.current?.onstart?.(D) : f ? l.current?.onend?.(D) : M && l.current?.onmove?.(D);
|
|
2321
|
+
}, e[17] = a, e[18] = z) : z = e[18];
|
|
2378
2322
|
let O;
|
|
2379
2323
|
e[19] === Symbol.for("react.memo_cache_sentinel") ? (O = {
|
|
2380
2324
|
capture: !0
|
|
@@ -2382,30 +2326,30 @@ const ln = (n, e, t, r, s) => ({
|
|
|
2382
2326
|
let j;
|
|
2383
2327
|
e[20] !== o ? (j = {
|
|
2384
2328
|
enabled: o,
|
|
2385
|
-
target:
|
|
2329
|
+
target: d,
|
|
2386
2330
|
pointer: O,
|
|
2387
2331
|
threshold: 0
|
|
2388
|
-
}, e[20] = o, e[21] = j) : j = e[21],
|
|
2389
|
-
let
|
|
2390
|
-
e[22] !== a ? (
|
|
2391
|
-
const
|
|
2392
|
-
if (!
|
|
2332
|
+
}, e[20] = o, e[21] = j) : j = e[21], ln(z, j);
|
|
2333
|
+
let F, q;
|
|
2334
|
+
e[22] !== a ? (F = () => {
|
|
2335
|
+
const C = a?.current;
|
|
2336
|
+
if (!C)
|
|
2393
2337
|
return;
|
|
2394
|
-
const
|
|
2395
|
-
|
|
2396
|
-
},
|
|
2397
|
-
let
|
|
2398
|
-
e[25] !== s ? (
|
|
2338
|
+
const M = l.current?.edges?.left, G = l.current?.edges?.right;
|
|
2339
|
+
M && (h.current = C.querySelector(M)), G && (d.current = C.querySelector(G));
|
|
2340
|
+
}, q = [a], e[22] = a, e[23] = F, e[24] = q) : (F = e[23], q = e[24]), Nt(F, q);
|
|
2341
|
+
let V;
|
|
2342
|
+
e[25] !== s ? (V = s ? {
|
|
2399
2343
|
touchAction: "none"
|
|
2400
|
-
} : {}, e[25] = s, e[26] =
|
|
2401
|
-
let
|
|
2402
|
-
e[27] !== r || e[28] !==
|
|
2403
|
-
...
|
|
2344
|
+
} : {}, e[25] = s, e[26] = V) : V = e[26];
|
|
2345
|
+
let J;
|
|
2346
|
+
e[27] !== r || e[28] !== V ? (J = {
|
|
2347
|
+
...V,
|
|
2404
2348
|
...r
|
|
2405
|
-
}, e[27] = r, e[28] =
|
|
2406
|
-
let
|
|
2407
|
-
return e[30] !== t || e[31] !== a || e[32] !==
|
|
2408
|
-
}, be = (n, e = 0) => n ? parseFloat(n) : e,
|
|
2349
|
+
}, e[27] = r, e[28] = V, e[29] = J) : J = e[29];
|
|
2350
|
+
let U;
|
|
2351
|
+
return e[30] !== t || e[31] !== a || e[32] !== J ? (U = /* @__PURE__ */ R.jsx($s, { ref: a, style: J, draggable: !1, children: t }), e[30] = t, e[31] = a, e[32] = J, e[33] = U) : U = e[33], U;
|
|
2352
|
+
}, be = (n, e = 0) => n ? parseFloat(n) : e, fn = (n, e, t, r = Number.MAX_SAFE_INTEGER) => {
|
|
2409
2353
|
let s = n, o = r;
|
|
2410
2354
|
for (const i of e) {
|
|
2411
2355
|
const c = Math.abs(i - n);
|
|
@@ -2415,8 +2359,8 @@ const ln = (n, e, t, r, s) => ({
|
|
|
2415
2359
|
snap: s,
|
|
2416
2360
|
minDis: o
|
|
2417
2361
|
};
|
|
2418
|
-
},
|
|
2419
|
-
const t =
|
|
2362
|
+
}, Rr = Je.forwardRef((n, e) => {
|
|
2363
|
+
const t = Pe.c(68), {
|
|
2420
2364
|
children: r,
|
|
2421
2365
|
edges: s,
|
|
2422
2366
|
left: o,
|
|
@@ -2426,256 +2370,256 @@ const ln = (n, e, t, r, s) => ({
|
|
|
2426
2370
|
getBounds: u,
|
|
2427
2371
|
enableResizing: l,
|
|
2428
2372
|
enableDragging: h,
|
|
2429
|
-
snapDistance:
|
|
2430
|
-
snapPositions:
|
|
2431
|
-
onResizeStart:
|
|
2432
|
-
onResize:
|
|
2433
|
-
onResizeEnd:
|
|
2434
|
-
onDragStart:
|
|
2435
|
-
onDragEnd:
|
|
2436
|
-
onDrag:
|
|
2373
|
+
snapDistance: d,
|
|
2374
|
+
snapPositions: m,
|
|
2375
|
+
onResizeStart: E,
|
|
2376
|
+
onResize: S,
|
|
2377
|
+
onResizeEnd: _,
|
|
2378
|
+
onDragStart: p,
|
|
2379
|
+
onDragEnd: g,
|
|
2380
|
+
onDrag: v,
|
|
2437
2381
|
parentRef: w,
|
|
2438
2382
|
autoScroll: T
|
|
2439
|
-
} = n,
|
|
2440
|
-
let
|
|
2441
|
-
t[0] !==
|
|
2442
|
-
const
|
|
2443
|
-
initAutoScroll:
|
|
2444
|
-
stopAutoScroll:
|
|
2445
|
-
dealDragAutoScroll:
|
|
2446
|
-
dealResizeAutoScroll:
|
|
2383
|
+
} = n, y = c === void 0 ? Qt : c, A = a === void 0 ? hn : a, z = u === void 0 ? wo : u, O = l === void 0 ? !0 : l, j = h === void 0 ? !0 : h, F = d === void 0 ? mn : d;
|
|
2384
|
+
let q;
|
|
2385
|
+
t[0] !== m ? (q = m === void 0 ? [] : m, t[0] = m, t[1] = q) : q = t[1];
|
|
2386
|
+
const V = q, J = T === void 0 ? !0 : T, U = ne(null), C = ne(0), M = ne(!1), {
|
|
2387
|
+
initAutoScroll: G,
|
|
2388
|
+
stopAutoScroll: ee,
|
|
2389
|
+
dealDragAutoScroll: re,
|
|
2390
|
+
dealResizeAutoScroll: f
|
|
2447
2391
|
} = Zr(w);
|
|
2448
2392
|
let x;
|
|
2449
|
-
t[2] === Symbol.for("react.memo_cache_sentinel") ? (x = (
|
|
2450
|
-
const
|
|
2451
|
-
if (!
|
|
2393
|
+
t[2] === Symbol.for("react.memo_cache_sentinel") ? (x = (I, X) => {
|
|
2394
|
+
const B = X === void 0 ? !0 : X;
|
|
2395
|
+
if (!U.current)
|
|
2452
2396
|
return;
|
|
2453
|
-
|
|
2454
|
-
const
|
|
2455
|
-
|
|
2397
|
+
B && (C.current = 0);
|
|
2398
|
+
const Y = U.current;
|
|
2399
|
+
Y.style.left = `${I}px`, Y.dataset.left = String(I);
|
|
2456
2400
|
}, t[2] = x) : x = t[2];
|
|
2457
|
-
const
|
|
2458
|
-
let
|
|
2459
|
-
t[3] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2460
|
-
const
|
|
2461
|
-
if (!
|
|
2401
|
+
const D = x;
|
|
2402
|
+
let W;
|
|
2403
|
+
t[3] === Symbol.for("react.memo_cache_sentinel") ? (W = (I, X) => {
|
|
2404
|
+
const B = X === void 0 ? !0 : X;
|
|
2405
|
+
if (!U.current)
|
|
2462
2406
|
return;
|
|
2463
|
-
|
|
2464
|
-
const
|
|
2465
|
-
|
|
2466
|
-
}, t[3] =
|
|
2467
|
-
const
|
|
2468
|
-
let
|
|
2469
|
-
t[4] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2470
|
-
const
|
|
2471
|
-
let
|
|
2472
|
-
t[5] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
2473
|
-
const
|
|
2474
|
-
let
|
|
2475
|
-
t[6] !== i ? (
|
|
2476
|
-
if (!
|
|
2407
|
+
B && (C.current = 0);
|
|
2408
|
+
const Y = U.current;
|
|
2409
|
+
Y.style.width = `${I}px`, Y.dataset.width = String(I);
|
|
2410
|
+
}, t[3] = W) : W = t[3];
|
|
2411
|
+
const Z = W;
|
|
2412
|
+
let H;
|
|
2413
|
+
t[4] === Symbol.for("react.memo_cache_sentinel") ? (H = () => U.current ? be(U.current.dataset.left) : 0, t[4] = H) : H = t[4];
|
|
2414
|
+
const $ = H;
|
|
2415
|
+
let P;
|
|
2416
|
+
t[5] === Symbol.for("react.memo_cache_sentinel") ? (P = () => U.current ? be(U.current.dataset.width) : 0, t[5] = P) : P = t[5];
|
|
2417
|
+
const L = P;
|
|
2418
|
+
let k, et;
|
|
2419
|
+
t[6] !== i ? (k = () => {
|
|
2420
|
+
if (!U.current)
|
|
2477
2421
|
return;
|
|
2478
|
-
const
|
|
2479
|
-
|
|
2480
|
-
},
|
|
2481
|
-
let
|
|
2482
|
-
t[9] !== o ? (
|
|
2483
|
-
|
|
2484
|
-
},
|
|
2422
|
+
const I = U.current;
|
|
2423
|
+
Z(typeof i > "u" ? I.offsetWidth : i, !1);
|
|
2424
|
+
}, et = [i], t[6] = i, t[7] = k, t[8] = et) : (k = t[7], et = t[8]), Tt(k, et);
|
|
2425
|
+
let tt, We;
|
|
2426
|
+
t[9] !== o ? (tt = () => {
|
|
2427
|
+
D(o || 0, !1);
|
|
2428
|
+
}, We = [o], t[9] = o, t[10] = tt, t[11] = We) : (tt = t[10], We = t[11]), Tt(tt, We);
|
|
2429
|
+
let Le;
|
|
2430
|
+
t[12] === Symbol.for("react.memo_cache_sentinel") ? (Le = () => ({
|
|
2431
|
+
updateLeft: (I) => D(I || 0, !1),
|
|
2432
|
+
updateWidth: (I) => Z(I, !1),
|
|
2433
|
+
getLeft: $,
|
|
2434
|
+
getWidth: L
|
|
2435
|
+
}), t[12] = Le) : Le = t[12], Zn(e, Le);
|
|
2436
|
+
let xe;
|
|
2437
|
+
t[13] !== G || t[14] !== p ? (xe = () => {
|
|
2438
|
+
C.current = 0, M.current = !1, G(), p?.();
|
|
2439
|
+
}, t[13] = G, t[14] = p, t[15] = xe) : xe = t[15];
|
|
2440
|
+
const Xe = xe;
|
|
2485
2441
|
let Oe;
|
|
2486
|
-
t[
|
|
2487
|
-
updateLeft: (V) => N(V || 0, !1),
|
|
2488
|
-
updateWidth: (V) => Q(V, !1),
|
|
2489
|
-
getLeft: B,
|
|
2490
|
-
getWidth: k
|
|
2491
|
-
}), t[12] = Oe) : Oe = t[12], Qn(e, Oe);
|
|
2492
|
-
let Re;
|
|
2493
|
-
t[13] !== M || t[14] !== E ? (Re = () => {
|
|
2494
|
-
y.current = 0, A.current = !1, M(), E?.();
|
|
2495
|
-
}, t[13] = M, t[14] = E, t[15] = Re) : Re = t[15];
|
|
2496
|
-
const Ge = Re;
|
|
2497
|
-
let Me;
|
|
2498
|
-
t[16] !== H || t[17] !== D || t[18] !== _ || t[19] !== W || t[20] !== C || t[21] !== P ? (Me = (V) => {
|
|
2442
|
+
t[16] !== z || t[17] !== A || t[18] !== v || t[19] !== F || t[20] !== V || t[21] !== y ? (Oe = (I) => {
|
|
2499
2443
|
const {
|
|
2500
|
-
preLeft:
|
|
2501
|
-
preWidth:
|
|
2502
|
-
scrollDelta:
|
|
2503
|
-
} =
|
|
2504
|
-
|
|
2505
|
-
const he =
|
|
2506
|
-
if (Math.abs(
|
|
2444
|
+
preLeft: X,
|
|
2445
|
+
preWidth: B,
|
|
2446
|
+
scrollDelta: Y
|
|
2447
|
+
} = I;
|
|
2448
|
+
Y && (C.current = C.current + Y);
|
|
2449
|
+
const he = M.current ? F : A;
|
|
2450
|
+
if (Math.abs(C.current) < he)
|
|
2507
2451
|
return;
|
|
2508
|
-
const me = Math.trunc(
|
|
2509
|
-
let
|
|
2510
|
-
const
|
|
2511
|
-
snap:
|
|
2512
|
-
} =
|
|
2513
|
-
if (
|
|
2514
|
-
|
|
2452
|
+
const me = Math.trunc(C.current / he);
|
|
2453
|
+
let K = X + me * he;
|
|
2454
|
+
const se = C.current > 0, N = se ? K + B : K, {
|
|
2455
|
+
snap: te
|
|
2456
|
+
} = fn(N, V, F);
|
|
2457
|
+
if (te !== N)
|
|
2458
|
+
M.current = !0, K = se ? te - B : te;
|
|
2515
2459
|
else {
|
|
2516
|
-
const ae =
|
|
2517
|
-
ae %
|
|
2460
|
+
const ae = K - y;
|
|
2461
|
+
ae % A !== 0 && (K = y + A * Math.round(ae / A)), M.current = !1;
|
|
2518
2462
|
}
|
|
2519
|
-
|
|
2520
|
-
const
|
|
2521
|
-
|
|
2522
|
-
lastLeft:
|
|
2523
|
-
left:
|
|
2524
|
-
lastWidth:
|
|
2525
|
-
width:
|
|
2526
|
-
},
|
|
2527
|
-
}, t[16] =
|
|
2528
|
-
const Ce =
|
|
2529
|
-
let
|
|
2530
|
-
t[23] !==
|
|
2531
|
-
const
|
|
2532
|
-
|
|
2533
|
-
if (!w?.current || !
|
|
2463
|
+
C.current = C.current % he;
|
|
2464
|
+
const oe = z();
|
|
2465
|
+
K < oe.left ? K = oe.left : K + B > oe.right && (K = oe.right - B), !(v && v({
|
|
2466
|
+
lastLeft: X,
|
|
2467
|
+
left: K,
|
|
2468
|
+
lastWidth: B,
|
|
2469
|
+
width: B
|
|
2470
|
+
}, Y) === !1) && D(K, !1);
|
|
2471
|
+
}, t[16] = z, t[17] = A, t[18] = v, t[19] = F, t[20] = V, t[21] = y, t[22] = Oe) : Oe = t[22];
|
|
2472
|
+
const Ce = Oe;
|
|
2473
|
+
let Me;
|
|
2474
|
+
t[23] !== J || t[24] !== re || t[25] !== Ce || t[26] !== w ? (Me = (I) => {
|
|
2475
|
+
const X = I.target, B = be(X.dataset.left), Y = be(X.dataset.width);
|
|
2476
|
+
C.current = C.current + I.dx, !(J && w?.current && !re(I, (K) => {
|
|
2477
|
+
if (!w?.current || !U.current)
|
|
2534
2478
|
return;
|
|
2535
|
-
w.current.scrollLeft = w.current.scrollLeft +
|
|
2536
|
-
const
|
|
2479
|
+
w.current.scrollLeft = w.current.scrollLeft + K;
|
|
2480
|
+
const se = U.current, N = be(se.dataset.left), te = be(se.dataset.width);
|
|
2537
2481
|
Ce({
|
|
2538
|
-
preLeft:
|
|
2539
|
-
preWidth:
|
|
2540
|
-
scrollDelta:
|
|
2482
|
+
preLeft: N,
|
|
2483
|
+
preWidth: te,
|
|
2484
|
+
scrollDelta: K
|
|
2541
2485
|
});
|
|
2542
2486
|
})) && Ce({
|
|
2543
|
-
preLeft:
|
|
2544
|
-
preWidth:
|
|
2487
|
+
preLeft: B,
|
|
2488
|
+
preWidth: Y
|
|
2545
2489
|
});
|
|
2546
|
-
}, t[23] =
|
|
2547
|
-
const Pt =
|
|
2548
|
-
let
|
|
2549
|
-
t[28] !==
|
|
2550
|
-
|
|
2551
|
-
const
|
|
2552
|
-
|
|
2553
|
-
left: be(
|
|
2554
|
-
width: be(
|
|
2490
|
+
}, t[23] = J, t[24] = re, t[25] = Ce, t[26] = w, t[27] = Me) : Me = t[27];
|
|
2491
|
+
const Pt = Me;
|
|
2492
|
+
let nt;
|
|
2493
|
+
t[28] !== g || t[29] !== ee ? (nt = (I) => {
|
|
2494
|
+
C.current = 0, M.current = !1, ee();
|
|
2495
|
+
const X = I.target;
|
|
2496
|
+
g?.({
|
|
2497
|
+
left: be(X.dataset.left),
|
|
2498
|
+
width: be(X.dataset.width)
|
|
2555
2499
|
});
|
|
2556
|
-
}, t[28] =
|
|
2557
|
-
const
|
|
2558
|
-
let
|
|
2559
|
-
t[31] !==
|
|
2560
|
-
|
|
2561
|
-
const
|
|
2562
|
-
|
|
2563
|
-
}, t[31] =
|
|
2564
|
-
const
|
|
2565
|
-
let
|
|
2566
|
-
t[34] !==
|
|
2500
|
+
}, t[28] = g, t[29] = ee, t[30] = nt) : nt = t[30];
|
|
2501
|
+
const ze = nt;
|
|
2502
|
+
let _e;
|
|
2503
|
+
t[31] !== G || t[32] !== E ? (_e = (I) => {
|
|
2504
|
+
C.current = 0, M.current = !1, G();
|
|
2505
|
+
const X = I.edges?.right ? "right" : "left";
|
|
2506
|
+
E?.(X);
|
|
2507
|
+
}, t[31] = G, t[32] = E, t[33] = _e) : _e = t[33];
|
|
2508
|
+
const je = _e;
|
|
2509
|
+
let Ne;
|
|
2510
|
+
t[34] !== z || t[35] !== A || t[36] !== S || t[37] !== F || t[38] !== V || t[39] !== y ? (Ne = (I) => {
|
|
2567
2511
|
const {
|
|
2568
|
-
dir:
|
|
2569
|
-
preWidth:
|
|
2570
|
-
preLeft:
|
|
2512
|
+
dir: X,
|
|
2513
|
+
preWidth: B,
|
|
2514
|
+
preLeft: Y,
|
|
2571
2515
|
scrollDelta: he
|
|
2572
|
-
} =
|
|
2573
|
-
he && (
|
|
2574
|
-
const me =
|
|
2575
|
-
if (Math.abs(
|
|
2516
|
+
} = I;
|
|
2517
|
+
he && (C.current = C.current + he);
|
|
2518
|
+
const me = M.current ? F : A;
|
|
2519
|
+
if (Math.abs(C.current) < me)
|
|
2576
2520
|
return;
|
|
2577
|
-
const
|
|
2578
|
-
if (
|
|
2579
|
-
const
|
|
2580
|
-
let
|
|
2521
|
+
const K = z();
|
|
2522
|
+
if (X === "left") {
|
|
2523
|
+
const se = Math.trunc(C.current / me);
|
|
2524
|
+
let N = Y + se * me;
|
|
2581
2525
|
const {
|
|
2582
|
-
snap:
|
|
2583
|
-
} =
|
|
2584
|
-
if (
|
|
2585
|
-
|
|
2526
|
+
snap: te
|
|
2527
|
+
} = fn(N, V, F);
|
|
2528
|
+
if (te !== N)
|
|
2529
|
+
M.current = !0, N = te;
|
|
2586
2530
|
else {
|
|
2587
|
-
const pe =
|
|
2588
|
-
pe %
|
|
2531
|
+
const pe = N - y;
|
|
2532
|
+
pe % A !== 0 && (N = y + A * Math.round(pe / A)), M.current = !1;
|
|
2589
2533
|
}
|
|
2590
|
-
|
|
2591
|
-
const
|
|
2592
|
-
if (
|
|
2593
|
-
lastLeft:
|
|
2594
|
-
lastWidth:
|
|
2595
|
-
left:
|
|
2534
|
+
C.current = C.current % me, N < K.left && (N = K.left);
|
|
2535
|
+
const oe = Y + B, ae = oe - N;
|
|
2536
|
+
if (N >= oe || S && S("left", {
|
|
2537
|
+
lastLeft: Y,
|
|
2538
|
+
lastWidth: B,
|
|
2539
|
+
left: N,
|
|
2596
2540
|
width: ae
|
|
2597
2541
|
}) === !1)
|
|
2598
2542
|
return;
|
|
2599
|
-
N
|
|
2543
|
+
D(N, !1), Z(ae, !1);
|
|
2600
2544
|
} else {
|
|
2601
|
-
const
|
|
2602
|
-
let
|
|
2603
|
-
const
|
|
2604
|
-
snap:
|
|
2605
|
-
} =
|
|
2606
|
-
if (
|
|
2607
|
-
|
|
2545
|
+
const se = Math.trunc(C.current / me);
|
|
2546
|
+
let N = B + se * me;
|
|
2547
|
+
const te = Y + N, {
|
|
2548
|
+
snap: oe
|
|
2549
|
+
} = fn(te, V, F);
|
|
2550
|
+
if (oe !== te)
|
|
2551
|
+
M.current = !0, N = oe - Y;
|
|
2608
2552
|
else {
|
|
2609
|
-
let ae =
|
|
2610
|
-
const pe = ae -
|
|
2611
|
-
pe %
|
|
2553
|
+
let ae = Y + N;
|
|
2554
|
+
const pe = ae - y;
|
|
2555
|
+
pe % A !== 0 && (ae = y + A * Math.round(pe / A), N = ae - Y), M.current = !1;
|
|
2612
2556
|
}
|
|
2613
|
-
if (
|
|
2614
|
-
lastLeft:
|
|
2615
|
-
lastWidth:
|
|
2616
|
-
left:
|
|
2617
|
-
width:
|
|
2557
|
+
if (C.current = C.current % me, Y + N > K.right && (N = K.right - Y), N <= 0 || S && S("right", {
|
|
2558
|
+
lastLeft: Y,
|
|
2559
|
+
lastWidth: B,
|
|
2560
|
+
left: Y,
|
|
2561
|
+
width: N
|
|
2618
2562
|
}) === !1)
|
|
2619
2563
|
return;
|
|
2620
|
-
|
|
2564
|
+
Z(N, !1);
|
|
2621
2565
|
}
|
|
2622
|
-
}, t[34] =
|
|
2623
|
-
const
|
|
2624
|
-
let
|
|
2625
|
-
t[41] !==
|
|
2626
|
-
const
|
|
2627
|
-
|
|
2628
|
-
if (!w?.current || !
|
|
2566
|
+
}, t[34] = z, t[35] = A, t[36] = S, t[37] = F, t[38] = V, t[39] = y, t[40] = Ne) : Ne = t[40];
|
|
2567
|
+
const Fe = Ne;
|
|
2568
|
+
let Ie;
|
|
2569
|
+
t[41] !== J || t[42] !== f || t[43] !== w || t[44] !== Fe ? (Ie = (I) => {
|
|
2570
|
+
const X = I.target, B = I.edges?.left ? "left" : "right", Y = be(X.dataset.left), he = be(X.dataset.width);
|
|
2571
|
+
C.current = C.current + (B === "left" ? I.deltaRect?.left || 0 : I.deltaRect?.right || 0), !(J && w?.current && !f(I, B, (se) => {
|
|
2572
|
+
if (!w?.current || !U.current)
|
|
2629
2573
|
return;
|
|
2630
|
-
w.current.scrollLeft = w.current.scrollLeft +
|
|
2631
|
-
const
|
|
2632
|
-
|
|
2633
|
-
preLeft:
|
|
2634
|
-
preWidth:
|
|
2635
|
-
dir:
|
|
2636
|
-
scrollDelta:
|
|
2574
|
+
w.current.scrollLeft = w.current.scrollLeft + se;
|
|
2575
|
+
const N = U.current, te = be(N.dataset.left), oe = be(N.dataset.width);
|
|
2576
|
+
Fe({
|
|
2577
|
+
preLeft: te,
|
|
2578
|
+
preWidth: oe,
|
|
2579
|
+
dir: B,
|
|
2580
|
+
scrollDelta: se
|
|
2637
2581
|
});
|
|
2638
|
-
})) &&
|
|
2639
|
-
preLeft:
|
|
2582
|
+
})) && Fe({
|
|
2583
|
+
preLeft: Y,
|
|
2640
2584
|
preWidth: he,
|
|
2641
|
-
dir:
|
|
2585
|
+
dir: B
|
|
2642
2586
|
});
|
|
2643
|
-
}, t[41] =
|
|
2644
|
-
const
|
|
2645
|
-
let
|
|
2646
|
-
t[46] !==
|
|
2647
|
-
|
|
2648
|
-
const
|
|
2649
|
-
|
|
2650
|
-
left: be(
|
|
2651
|
-
width: be(
|
|
2587
|
+
}, t[41] = J, t[42] = f, t[43] = w, t[44] = Fe, t[45] = Ie) : Ie = t[45];
|
|
2588
|
+
const Te = Ie;
|
|
2589
|
+
let ke;
|
|
2590
|
+
t[46] !== _ || t[47] !== ee ? (ke = (I) => {
|
|
2591
|
+
C.current = 0, M.current = !1, ee();
|
|
2592
|
+
const X = I.target, B = I.edges?.right ? "right" : "left";
|
|
2593
|
+
_?.(B, {
|
|
2594
|
+
left: be(X.dataset.left),
|
|
2595
|
+
width: be(X.dataset.width)
|
|
2652
2596
|
});
|
|
2653
|
-
}, t[46] =
|
|
2654
|
-
const
|
|
2597
|
+
}, t[46] = _, t[47] = ee, t[48] = ke) : ke = t[48];
|
|
2598
|
+
const Ge = ke;
|
|
2655
2599
|
let ye;
|
|
2656
2600
|
t[49] !== o || t[50] !== i ? (ye = {
|
|
2657
2601
|
left: o,
|
|
2658
2602
|
width: i
|
|
2659
2603
|
}, t[49] = o, t[50] = i, t[51] = ye) : ye = t[51];
|
|
2660
|
-
let
|
|
2661
|
-
t[52] !== Pt || t[53] !==
|
|
2604
|
+
let Ae;
|
|
2605
|
+
t[52] !== Pt || t[53] !== Xe || t[54] !== ze ? (Ae = {
|
|
2662
2606
|
lockAxis: "x",
|
|
2663
2607
|
onmove: Pt,
|
|
2664
|
-
onstart:
|
|
2665
|
-
onend:
|
|
2608
|
+
onstart: Xe,
|
|
2609
|
+
onend: ze,
|
|
2666
2610
|
cursorChecker: Eo
|
|
2667
|
-
}, t[52] = Pt, t[53] =
|
|
2668
|
-
let
|
|
2669
|
-
t[56] !== s || t[57] !==
|
|
2611
|
+
}, t[52] = Pt, t[53] = Xe, t[54] = ze, t[55] = Ae) : Ae = t[55];
|
|
2612
|
+
let Re;
|
|
2613
|
+
t[56] !== s || t[57] !== Te || t[58] !== je || t[59] !== Ge ? (Re = {
|
|
2670
2614
|
axis: "x",
|
|
2671
2615
|
invert: "none",
|
|
2672
2616
|
edges: s,
|
|
2673
|
-
onmove:
|
|
2674
|
-
onstart:
|
|
2675
|
-
onend:
|
|
2676
|
-
}, t[56] = s, t[57] =
|
|
2677
|
-
let
|
|
2678
|
-
return t[61] !== r || t[62] !== j || t[63] !== O || t[64] !== ye || t[65] !==
|
|
2617
|
+
onmove: Te,
|
|
2618
|
+
onstart: je,
|
|
2619
|
+
onend: Ge
|
|
2620
|
+
}, t[56] = s, t[57] = Te, t[58] = je, t[59] = Ge, t[60] = Re) : Re = t[60];
|
|
2621
|
+
let Ve;
|
|
2622
|
+
return t[61] !== r || t[62] !== j || t[63] !== O || t[64] !== ye || t[65] !== Ae || t[66] !== Re ? (Ve = /* @__PURE__ */ R.jsx(_o, { style: ye, ref: U, draggable: j, resizable: O, draggableOptions: Ae, resizableOptions: Re, children: r }), t[61] = r, t[62] = j, t[63] = O, t[64] = ye, t[65] = Ae, t[66] = Re, t[67] = Ve) : Ve = t[67], Ve;
|
|
2679
2623
|
});
|
|
2680
2624
|
function wo() {
|
|
2681
2625
|
return {
|
|
@@ -2692,8 +2636,8 @@ function yo() {
|
|
|
2692
2636
|
(e = arguments[n]) && typeof e == "string" && (t += (t && " ") + e);
|
|
2693
2637
|
return t;
|
|
2694
2638
|
}
|
|
2695
|
-
const
|
|
2696
|
-
const e =
|
|
2639
|
+
const Ro = (n) => {
|
|
2640
|
+
const e = Pe.c(191), {
|
|
2697
2641
|
editorData: t,
|
|
2698
2642
|
row: r,
|
|
2699
2643
|
action: s,
|
|
@@ -2704,288 +2648,288 @@ const xo = (n) => {
|
|
|
2704
2648
|
scaleSplitCount: u,
|
|
2705
2649
|
startLeft: l,
|
|
2706
2650
|
gridSnap: h,
|
|
2707
|
-
disableDrag:
|
|
2708
|
-
scaleCount:
|
|
2709
|
-
maxScaleCount:
|
|
2710
|
-
setScaleCount:
|
|
2711
|
-
onActionMoveStart:
|
|
2712
|
-
onActionMoving:
|
|
2713
|
-
onActionMoveEnd:
|
|
2714
|
-
onActionResizeStart:
|
|
2651
|
+
disableDrag: d,
|
|
2652
|
+
scaleCount: m,
|
|
2653
|
+
maxScaleCount: E,
|
|
2654
|
+
setScaleCount: S,
|
|
2655
|
+
onActionMoveStart: _,
|
|
2656
|
+
onActionMoving: p,
|
|
2657
|
+
onActionMoveEnd: g,
|
|
2658
|
+
onActionResizeStart: v,
|
|
2715
2659
|
onActionResizeEnd: w,
|
|
2716
2660
|
onActionResizing: T,
|
|
2717
|
-
snapData:
|
|
2718
|
-
setEditorData:
|
|
2719
|
-
onClickAction:
|
|
2661
|
+
snapData: y,
|
|
2662
|
+
setEditorData: A,
|
|
2663
|
+
onClickAction: z,
|
|
2720
2664
|
onClickActionOnly: O,
|
|
2721
2665
|
onDoubleClickAction: j,
|
|
2722
|
-
onContextMenuAction:
|
|
2723
|
-
getActionRender:
|
|
2724
|
-
handleTime:
|
|
2725
|
-
scrollContainerRef:
|
|
2726
|
-
} = n,
|
|
2727
|
-
id:
|
|
2728
|
-
maxEnd:
|
|
2729
|
-
minStart:
|
|
2730
|
-
end:
|
|
2731
|
-
start:
|
|
2666
|
+
onContextMenuAction: F,
|
|
2667
|
+
getActionRender: q,
|
|
2668
|
+
handleTime: V,
|
|
2669
|
+
scrollContainerRef: J
|
|
2670
|
+
} = n, U = ne(null), C = ne(!1), {
|
|
2671
|
+
id: M,
|
|
2672
|
+
maxEnd: G,
|
|
2673
|
+
minStart: ee,
|
|
2674
|
+
end: re,
|
|
2675
|
+
start: f,
|
|
2732
2676
|
selected: x,
|
|
2733
|
-
flexible:
|
|
2734
|
-
movable:
|
|
2735
|
-
effectId:
|
|
2736
|
-
} = s,
|
|
2677
|
+
flexible: D,
|
|
2678
|
+
movable: W,
|
|
2679
|
+
effectId: Z
|
|
2680
|
+
} = s, H = D === void 0 ? !0 : D, $ = W === void 0 ? !0 : W, P = c ?? Gt, L = a ?? Kt, k = l ?? Qt, et = u ?? Qn, tt = E ?? Number.MAX_SAFE_INTEGER, We = ee || 0;
|
|
2681
|
+
let Le;
|
|
2682
|
+
e[0] !== P || e[1] !== L || e[2] !== k || e[3] !== We ? (Le = Ye(We, {
|
|
2683
|
+
startLeft: k,
|
|
2684
|
+
scale: P,
|
|
2685
|
+
scaleWidth: L
|
|
2686
|
+
}), e[0] = P, e[1] = L, e[2] = k, e[3] = We, e[4] = Le) : Le = e[4];
|
|
2687
|
+
const xe = Le, Xe = G || Number.MAX_VALUE;
|
|
2737
2688
|
let Oe;
|
|
2738
|
-
e[
|
|
2739
|
-
startLeft:
|
|
2740
|
-
scale:
|
|
2741
|
-
scaleWidth:
|
|
2742
|
-
}), e[
|
|
2743
|
-
const
|
|
2689
|
+
e[5] !== P || e[6] !== L || e[7] !== k || e[8] !== Xe ? (Oe = Ye(Xe, {
|
|
2690
|
+
startLeft: k,
|
|
2691
|
+
scale: P,
|
|
2692
|
+
scaleWidth: L
|
|
2693
|
+
}), e[5] = P, e[6] = L, e[7] = k, e[8] = Xe, e[9] = Oe) : Oe = e[9];
|
|
2694
|
+
const Ce = Math.min(tt * L + k, Oe);
|
|
2744
2695
|
let Me;
|
|
2745
|
-
e[
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
scaleWidth: k
|
|
2749
|
-
}), e[5] = L, e[6] = k, e[7] = U, e[8] = Ge, e[9] = Me) : Me = e[9];
|
|
2750
|
-
const Ce = Math.min(nt * k + U, Me);
|
|
2751
|
-
let Ne;
|
|
2752
|
-
e[10] !== ee || e[11] !== L || e[12] !== k || e[13] !== U || e[14] !== d ? (Ne = vn({
|
|
2753
|
-
start: d,
|
|
2754
|
-
end: ee
|
|
2696
|
+
e[10] !== re || e[11] !== P || e[12] !== L || e[13] !== k || e[14] !== f ? (Me = vn({
|
|
2697
|
+
start: f,
|
|
2698
|
+
end: re
|
|
2755
2699
|
}, {
|
|
2756
|
-
startLeft:
|
|
2757
|
-
scale:
|
|
2758
|
-
scaleWidth:
|
|
2759
|
-
}), e[10] =
|
|
2760
|
-
const Pt =
|
|
2700
|
+
startLeft: k,
|
|
2701
|
+
scale: P,
|
|
2702
|
+
scaleWidth: L
|
|
2703
|
+
}), e[10] = re, e[11] = P, e[12] = L, e[13] = k, e[14] = f, e[15] = Me) : Me = e[15];
|
|
2704
|
+
const Pt = Me, [nt, ze] = Mt(null), _e = nt ?? Pt, je = L / et;
|
|
2705
|
+
let Ne;
|
|
2706
|
+
e[16] !== Z || e[17] !== o || e[18] !== H || e[19] !== $ || e[20] !== x ? (Ne = fe(yo("action", $ && "action-movable", x && "action-selected", H && "action-flexible", o[Z] && `action-effect-${Z}`)), e[16] = Z, e[17] = o, e[18] = H, e[19] = $, e[20] = x, e[21] = Ne) : Ne = e[21];
|
|
2707
|
+
const Fe = Ne;
|
|
2761
2708
|
let Ie;
|
|
2762
|
-
e[
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
startLeft: U,
|
|
2768
|
-
scaleCount: p,
|
|
2769
|
-
scaleWidth: k
|
|
2709
|
+
e[22] !== L || e[23] !== k || e[24] !== m || e[25] !== S ? (Ie = (ge, ve) => {
|
|
2710
|
+
const ie = Mr(ge + ve, {
|
|
2711
|
+
startLeft: k,
|
|
2712
|
+
scaleCount: m,
|
|
2713
|
+
scaleWidth: L
|
|
2770
2714
|
});
|
|
2771
|
-
|
|
2772
|
-
}, e[22] =
|
|
2773
|
-
const
|
|
2774
|
-
let
|
|
2775
|
-
e[27] !== s || e[28] !==
|
|
2776
|
-
|
|
2715
|
+
ie !== m && S(ie);
|
|
2716
|
+
}, e[22] = L, e[23] = k, e[24] = m, e[25] = S, e[26] = Ie) : Ie = e[26];
|
|
2717
|
+
const Te = Ie;
|
|
2718
|
+
let ke;
|
|
2719
|
+
e[27] !== s || e[28] !== _ || e[29] !== r ? (ke = () => {
|
|
2720
|
+
_ && _({
|
|
2777
2721
|
action: s,
|
|
2778
2722
|
row: r
|
|
2779
2723
|
});
|
|
2780
|
-
}, e[27] = s, e[28] =
|
|
2781
|
-
const
|
|
2724
|
+
}, e[27] = s, e[28] = _, e[29] = r, e[30] = ke) : ke = e[30];
|
|
2725
|
+
const Ge = ke;
|
|
2782
2726
|
let ye;
|
|
2783
|
-
e[31] !== s || e[32] !==
|
|
2727
|
+
e[31] !== s || e[32] !== Te || e[33] !== p || e[34] !== r || e[35] !== P || e[36] !== L || e[37] !== k ? (ye = (ge) => {
|
|
2784
2728
|
const {
|
|
2785
2729
|
left: ve,
|
|
2786
|
-
width:
|
|
2730
|
+
width: ie
|
|
2787
2731
|
} = ge;
|
|
2788
|
-
if (
|
|
2732
|
+
if (C.current = !0, p) {
|
|
2789
2733
|
const {
|
|
2790
2734
|
start: ue,
|
|
2791
|
-
end:
|
|
2792
|
-
} =
|
|
2735
|
+
end: ce
|
|
2736
|
+
} = Dt({
|
|
2793
2737
|
left: ve,
|
|
2794
|
-
width:
|
|
2738
|
+
width: ie
|
|
2795
2739
|
}, {
|
|
2796
|
-
scaleWidth:
|
|
2797
|
-
scale:
|
|
2798
|
-
startLeft:
|
|
2740
|
+
scaleWidth: L,
|
|
2741
|
+
scale: P,
|
|
2742
|
+
startLeft: k
|
|
2799
2743
|
});
|
|
2800
|
-
if (
|
|
2744
|
+
if (p({
|
|
2801
2745
|
action: s,
|
|
2802
2746
|
row: r,
|
|
2803
2747
|
start: ue,
|
|
2804
|
-
end:
|
|
2748
|
+
end: ce
|
|
2805
2749
|
}) === !1)
|
|
2806
2750
|
return !1;
|
|
2807
2751
|
}
|
|
2808
|
-
|
|
2752
|
+
ze({
|
|
2809
2753
|
left: ve,
|
|
2810
|
-
width:
|
|
2811
|
-
}),
|
|
2812
|
-
}, e[31] = s, e[32] =
|
|
2813
|
-
const
|
|
2814
|
-
let
|
|
2815
|
-
e[39] !== t || e[40] !==
|
|
2754
|
+
width: ie
|
|
2755
|
+
}), Te(ve, ie);
|
|
2756
|
+
}, e[31] = s, e[32] = Te, e[33] = p, e[34] = r, e[35] = P, e[36] = L, e[37] = k, e[38] = ye) : ye = e[38];
|
|
2757
|
+
const Ae = ye;
|
|
2758
|
+
let Re;
|
|
2759
|
+
e[39] !== t || e[40] !== M || e[41] !== g || e[42] !== r || e[43] !== P || e[44] !== L || e[45] !== k || e[46] !== A ? (Re = (ge) => {
|
|
2816
2760
|
const {
|
|
2817
2761
|
left: ve,
|
|
2818
|
-
width:
|
|
2762
|
+
width: ie
|
|
2819
2763
|
} = ge, {
|
|
2820
2764
|
start: ue,
|
|
2821
|
-
end:
|
|
2822
|
-
} =
|
|
2765
|
+
end: ce
|
|
2766
|
+
} = Dt({
|
|
2823
2767
|
left: ve,
|
|
2824
|
-
width:
|
|
2768
|
+
width: ie
|
|
2825
2769
|
}, {
|
|
2826
|
-
scaleWidth:
|
|
2827
|
-
scale:
|
|
2828
|
-
startLeft:
|
|
2829
|
-
}), le = t.find((
|
|
2770
|
+
scaleWidth: L,
|
|
2771
|
+
scale: P,
|
|
2772
|
+
startLeft: k
|
|
2773
|
+
}), le = t.find((Be) => Be.id === r.id);
|
|
2830
2774
|
if (!le)
|
|
2831
2775
|
return;
|
|
2832
|
-
const
|
|
2833
|
-
|
|
2834
|
-
action:
|
|
2776
|
+
const He = le.actions.find((Be) => Be.id === M);
|
|
2777
|
+
He && (He.start = ue, He.end = ce, A(t), g && g({
|
|
2778
|
+
action: He,
|
|
2835
2779
|
row: r,
|
|
2836
2780
|
start: ue,
|
|
2837
|
-
end:
|
|
2838
|
-
}),
|
|
2839
|
-
}, e[39] = t, e[40] =
|
|
2840
|
-
const
|
|
2841
|
-
let
|
|
2842
|
-
e[48] !== s || e[49] !==
|
|
2843
|
-
|
|
2781
|
+
end: ce
|
|
2782
|
+
}), ze(null));
|
|
2783
|
+
}, e[39] = t, e[40] = M, e[41] = g, e[42] = r, e[43] = P, e[44] = L, e[45] = k, e[46] = A, e[47] = Re) : Re = e[47];
|
|
2784
|
+
const Ve = Re;
|
|
2785
|
+
let I;
|
|
2786
|
+
e[48] !== s || e[49] !== v || e[50] !== r ? (I = (ge) => {
|
|
2787
|
+
v && v({
|
|
2844
2788
|
action: s,
|
|
2845
2789
|
row: r,
|
|
2846
2790
|
dir: ge
|
|
2847
2791
|
});
|
|
2848
|
-
}, e[48] = s, e[49] =
|
|
2849
|
-
const
|
|
2850
|
-
let
|
|
2851
|
-
e[52] !== s || e[53] !==
|
|
2792
|
+
}, e[48] = s, e[49] = v, e[50] = r, e[51] = I) : I = e[51];
|
|
2793
|
+
const X = I;
|
|
2794
|
+
let B;
|
|
2795
|
+
e[52] !== s || e[53] !== Te || e[54] !== T || e[55] !== r || e[56] !== P || e[57] !== L || e[58] !== k ? (B = (ge, ve) => {
|
|
2852
2796
|
const {
|
|
2853
|
-
left:
|
|
2797
|
+
left: ie,
|
|
2854
2798
|
width: ue
|
|
2855
2799
|
} = ve;
|
|
2856
|
-
if (
|
|
2800
|
+
if (C.current = !0, T) {
|
|
2857
2801
|
const {
|
|
2858
|
-
start:
|
|
2802
|
+
start: ce,
|
|
2859
2803
|
end: le
|
|
2860
|
-
} =
|
|
2861
|
-
left:
|
|
2804
|
+
} = Dt({
|
|
2805
|
+
left: ie,
|
|
2862
2806
|
width: ue
|
|
2863
2807
|
}, {
|
|
2864
|
-
scaleWidth:
|
|
2865
|
-
scale:
|
|
2866
|
-
startLeft:
|
|
2808
|
+
scaleWidth: L,
|
|
2809
|
+
scale: P,
|
|
2810
|
+
startLeft: k
|
|
2867
2811
|
});
|
|
2868
2812
|
if (T({
|
|
2869
2813
|
action: s,
|
|
2870
2814
|
row: r,
|
|
2871
|
-
start:
|
|
2815
|
+
start: ce,
|
|
2872
2816
|
end: le,
|
|
2873
2817
|
dir: ge
|
|
2874
2818
|
}) === !1)
|
|
2875
2819
|
return !1;
|
|
2876
2820
|
}
|
|
2877
|
-
|
|
2878
|
-
left:
|
|
2821
|
+
ze({
|
|
2822
|
+
left: ie,
|
|
2879
2823
|
width: ue
|
|
2880
|
-
}),
|
|
2881
|
-
}, e[52] = s, e[53] =
|
|
2882
|
-
const
|
|
2824
|
+
}), Te(ie, ue);
|
|
2825
|
+
}, e[52] = s, e[53] = Te, e[54] = T, e[55] = r, e[56] = P, e[57] = L, e[58] = k, e[59] = B) : B = e[59];
|
|
2826
|
+
const Y = B;
|
|
2883
2827
|
let he;
|
|
2884
|
-
e[60] !== t || e[61] !==
|
|
2828
|
+
e[60] !== t || e[61] !== M || e[62] !== w || e[63] !== r || e[64] !== P || e[65] !== L || e[66] !== k || e[67] !== A ? (he = (ge, ve) => {
|
|
2885
2829
|
const {
|
|
2886
|
-
left:
|
|
2830
|
+
left: ie,
|
|
2887
2831
|
width: ue
|
|
2888
2832
|
} = ve, {
|
|
2889
|
-
start:
|
|
2833
|
+
start: ce,
|
|
2890
2834
|
end: le
|
|
2891
|
-
} =
|
|
2892
|
-
left:
|
|
2835
|
+
} = Dt({
|
|
2836
|
+
left: ie,
|
|
2893
2837
|
width: ue
|
|
2894
2838
|
}, {
|
|
2895
|
-
scaleWidth:
|
|
2896
|
-
scale:
|
|
2897
|
-
startLeft:
|
|
2898
|
-
}),
|
|
2899
|
-
if (!
|
|
2839
|
+
scaleWidth: L,
|
|
2840
|
+
scale: P,
|
|
2841
|
+
startLeft: k
|
|
2842
|
+
}), He = t.find((rn) => rn.id === r.id);
|
|
2843
|
+
if (!He)
|
|
2900
2844
|
return;
|
|
2901
|
-
const
|
|
2902
|
-
|
|
2903
|
-
action:
|
|
2845
|
+
const Be = He.actions.find((rn) => rn.id === M);
|
|
2846
|
+
Be && (Be.start = ce, Be.end = le, A(t), w && w({
|
|
2847
|
+
action: Be,
|
|
2904
2848
|
row: r,
|
|
2905
|
-
start:
|
|
2849
|
+
start: ce,
|
|
2906
2850
|
end: le,
|
|
2907
2851
|
dir: ge
|
|
2908
|
-
}),
|
|
2909
|
-
}, e[60] = t, e[61] =
|
|
2852
|
+
}), ze(null));
|
|
2853
|
+
}, e[60] = t, e[61] = M, e[62] = w, e[63] = r, e[64] = P, e[65] = L, e[66] = k, e[67] = A, e[68] = he) : he = e[68];
|
|
2910
2854
|
const me = he;
|
|
2911
|
-
let
|
|
2912
|
-
if (e[69] !== s || e[70] !==
|
|
2855
|
+
let K, se, N, te, oe, ae, pe, rt, st, ot, it, ct, at, lt, ut, ft, Ue, $e, dt, ht, mt, pt, gt, vt, bt, St;
|
|
2856
|
+
if (e[69] !== s || e[70] !== Fe || e[71] !== d || e[72] !== H || e[73] !== q || e[74] !== je || e[75] !== h || e[76] !== Ae || e[77] !== Ve || e[78] !== Ge || e[79] !== me || e[80] !== X || e[81] !== Y || e[82] !== V || e[83] !== xe || e[84] !== $ || e[85] !== z || e[86] !== O || e[87] !== F || e[88] !== j || e[89] !== Ce || e[90] !== r || e[91] !== i || e[92] !== P || e[93] !== L || e[94] !== k || e[95] !== J || e[96] !== y.assistPositions || e[97] !== _e.left || e[98] !== _e.width) {
|
|
2913
2857
|
const ge = {
|
|
2914
2858
|
...s,
|
|
2915
|
-
...
|
|
2916
|
-
left:
|
|
2917
|
-
width:
|
|
2859
|
+
...Dt({
|
|
2860
|
+
left: _e.left,
|
|
2861
|
+
width: _e.width
|
|
2918
2862
|
}, {
|
|
2919
|
-
startLeft:
|
|
2920
|
-
scaleWidth:
|
|
2921
|
-
scale:
|
|
2863
|
+
startLeft: k,
|
|
2864
|
+
scaleWidth: L,
|
|
2865
|
+
scale: P
|
|
2922
2866
|
})
|
|
2923
2867
|
}, ve = {
|
|
2924
2868
|
...r,
|
|
2925
2869
|
actions: [...r.actions]
|
|
2926
2870
|
};
|
|
2927
|
-
r.actions.includes(s) && (ve.actions[r.actions.indexOf(s)] = ge),
|
|
2928
|
-
left:
|
|
2871
|
+
r.actions.includes(s) && (ve.actions[r.actions.indexOf(s)] = ge), K = Rr, st = U, ot = J, it = k, ct = _e.left, at = _e.width, lt = h && je || hn, ut = h ? Math.max((je || hn) / 2, mn) : mn, ft = y.assistPositions, e[125] !== xe || e[126] !== Ce ? (Ue = () => ({
|
|
2872
|
+
left: xe,
|
|
2929
2873
|
right: Ce
|
|
2930
|
-
}), e[125] =
|
|
2931
|
-
let
|
|
2932
|
-
e[128] !==
|
|
2874
|
+
}), e[125] = xe, e[126] = Ce, e[127] = Ue) : Ue = e[127];
|
|
2875
|
+
let ie;
|
|
2876
|
+
e[128] !== d || e[129] !== H ? (ie = !d && H && `.${fe("action-left-stretch")}`, e[128] = d, e[129] = H, e[130] = ie) : ie = e[130];
|
|
2933
2877
|
let ue;
|
|
2934
|
-
e[131] !==
|
|
2935
|
-
left:
|
|
2878
|
+
e[131] !== d || e[132] !== H ? (ue = !d && H && `.${fe("action-right-stretch")}`, e[131] = d, e[132] = H, e[133] = ue) : ue = e[133], e[134] !== ie || e[135] !== ue ? ($e = {
|
|
2879
|
+
left: ie,
|
|
2936
2880
|
right: ue
|
|
2937
|
-
}, e[134] =
|
|
2938
|
-
|
|
2939
|
-
}, e[137] =
|
|
2881
|
+
}, e[134] = ie, e[135] = ue, e[136] = $e) : $e = e[136], dt = !d && $, ht = !d && H, mt = Ge, pt = Ae, gt = Ve, vt = X, bt = Y, St = me, e[137] === Symbol.for("react.memo_cache_sentinel") ? (se = () => {
|
|
2882
|
+
C.current = !1;
|
|
2883
|
+
}, e[137] = se) : se = e[137], e[138] !== s || e[139] !== V || e[140] !== z || e[141] !== O || e[142] !== r ? (N = (ce) => {
|
|
2940
2884
|
let le;
|
|
2941
|
-
|
|
2885
|
+
z && (le = V(ce), z(ce, {
|
|
2942
2886
|
row: r,
|
|
2943
2887
|
action: s,
|
|
2944
2888
|
time: le
|
|
2945
|
-
})), !
|
|
2889
|
+
})), !C.current && O && (le === void 0 && (le = V(ce)), O(ce, {
|
|
2946
2890
|
row: r,
|
|
2947
2891
|
action: s,
|
|
2948
2892
|
time: le
|
|
2949
2893
|
}));
|
|
2950
|
-
}, e[138] = s, e[139] =
|
|
2894
|
+
}, e[138] = s, e[139] = V, e[140] = z, e[141] = O, e[142] = r, e[143] = N) : N = e[143], e[144] !== s || e[145] !== V || e[146] !== j || e[147] !== r ? (te = (ce) => {
|
|
2951
2895
|
if (j) {
|
|
2952
|
-
const le =
|
|
2953
|
-
j(
|
|
2896
|
+
const le = V(ce);
|
|
2897
|
+
j(ce, {
|
|
2954
2898
|
row: r,
|
|
2955
2899
|
action: s,
|
|
2956
2900
|
time: le
|
|
2957
2901
|
});
|
|
2958
2902
|
}
|
|
2959
|
-
}, e[144] = s, e[145] =
|
|
2960
|
-
if (
|
|
2961
|
-
const le =
|
|
2962
|
-
|
|
2903
|
+
}, e[144] = s, e[145] = V, e[146] = j, e[147] = r, e[148] = te) : te = e[148], e[149] !== s || e[150] !== V || e[151] !== F || e[152] !== r ? (oe = (ce) => {
|
|
2904
|
+
if (F) {
|
|
2905
|
+
const le = V(ce);
|
|
2906
|
+
F(ce, {
|
|
2963
2907
|
row: r,
|
|
2964
2908
|
action: s,
|
|
2965
2909
|
time: le
|
|
2966
2910
|
});
|
|
2967
2911
|
}
|
|
2968
|
-
}, e[149] = s, e[150] =
|
|
2912
|
+
}, e[149] = s, e[150] = V, e[151] = F, e[152] = r, e[153] = oe) : oe = e[153], ae = Fe, e[154] !== i ? (pe = {
|
|
2969
2913
|
height: i
|
|
2970
|
-
}, e[154] = i, e[155] = pe) : pe = e[155],
|
|
2914
|
+
}, e[154] = i, e[155] = pe) : pe = e[155], rt = q && q(ge, ve), e[69] = s, e[70] = Fe, e[71] = d, e[72] = H, e[73] = q, e[74] = je, e[75] = h, e[76] = Ae, e[77] = Ve, e[78] = Ge, e[79] = me, e[80] = X, e[81] = Y, e[82] = V, e[83] = xe, e[84] = $, e[85] = z, e[86] = O, e[87] = F, e[88] = j, e[89] = Ce, e[90] = r, e[91] = i, e[92] = P, e[93] = L, e[94] = k, e[95] = J, e[96] = y.assistPositions, e[97] = _e.left, e[98] = _e.width, e[99] = K, e[100] = se, e[101] = N, e[102] = te, e[103] = oe, e[104] = ae, e[105] = pe, 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] = ft, e[115] = Ue, e[116] = $e, e[117] = dt, e[118] = ht, e[119] = mt, e[120] = pt, e[121] = gt, e[122] = vt, e[123] = bt, e[124] = St;
|
|
2971
2915
|
} else
|
|
2972
|
-
|
|
2916
|
+
K = e[99], se = e[100], N = e[101], te = e[102], oe = e[103], ae = e[104], pe = e[105], rt = e[106], st = e[107], ot = e[108], it = e[109], ct = e[110], at = e[111], lt = e[112], ut = e[113], ft = e[114], Ue = e[115], $e = e[116], dt = e[117], ht = e[118], mt = e[119], pt = e[120], gt = e[121], vt = e[122], bt = e[123], St = e[124];
|
|
2917
|
+
let _t;
|
|
2918
|
+
e[156] !== H ? (_t = H && /* @__PURE__ */ R.jsx("div", { className: fe("action-left-stretch"), style: {
|
|
2919
|
+
touchAction: "none"
|
|
2920
|
+
} }), e[156] = H, e[157] = _t) : _t = e[157];
|
|
2973
2921
|
let wt;
|
|
2974
|
-
e[
|
|
2922
|
+
e[158] !== H ? (wt = H && /* @__PURE__ */ R.jsx("div", { className: fe("action-right-stretch"), style: {
|
|
2975
2923
|
touchAction: "none"
|
|
2976
|
-
} }), e[
|
|
2924
|
+
} }), e[158] = H, e[159] = wt) : wt = e[159];
|
|
2977
2925
|
let Et;
|
|
2978
|
-
e[
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
e[160]
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
Et
|
|
2986
|
-
] }), e[160] = re, e[161] = F, e[162] = ne, e[163] = se, e[164] = ae, e[165] = pe, e[166] = st, e[167] = wt, e[168] = Et, e[169] = yt) : yt = e[169];
|
|
2987
|
-
let zt;
|
|
2988
|
-
return e[170] !== J || e[171] !== ot || e[172] !== it || e[173] !== ct || e[174] !== at || e[175] !== lt || e[176] !== ut || e[177] !== ft || e[178] !== dt || e[179] !== $e || e[180] !== He || e[181] !== ht || e[182] !== mt || e[183] !== pt || e[184] !== gt || e[185] !== vt || e[186] !== bt || e[187] !== _t || e[188] !== St || e[189] !== yt ? (zt = /* @__PURE__ */ R.jsx(J, { ref: ot, parentRef: it, start: ct, left: at, width: lt, grid: ut, snapDistance: ft, snapPositions: dt, getBounds: $e, edges: He, enableDragging: ht, enableResizing: mt, onDragStart: pt, onDrag: gt, onDragEnd: vt, onResizeStart: bt, onResize: _t, onResizeEnd: St, children: yt }), e[170] = J, e[171] = ot, e[172] = it, e[173] = ct, e[174] = at, e[175] = lt, e[176] = ut, e[177] = ft, e[178] = dt, e[179] = $e, e[180] = He, e[181] = ht, e[182] = mt, e[183] = pt, e[184] = gt, e[185] = vt, e[186] = bt, e[187] = _t, e[188] = St, e[189] = yt, e[190] = zt) : zt = e[190], zt;
|
|
2926
|
+
e[160] !== se || e[161] !== N || e[162] !== te || e[163] !== oe || e[164] !== ae || e[165] !== pe || e[166] !== rt || e[167] !== _t || e[168] !== wt ? (Et = /* @__PURE__ */ R.jsxs("div", { onMouseDown: se, onClick: N, onDoubleClick: te, onContextMenu: oe, className: ae, style: pe, children: [
|
|
2927
|
+
rt,
|
|
2928
|
+
_t,
|
|
2929
|
+
wt
|
|
2930
|
+
] }), e[160] = se, e[161] = N, e[162] = te, e[163] = oe, e[164] = ae, e[165] = pe, e[166] = rt, e[167] = _t, e[168] = wt, e[169] = Et) : Et = e[169];
|
|
2931
|
+
let jt;
|
|
2932
|
+
return e[170] !== K || e[171] !== st || e[172] !== ot || e[173] !== it || e[174] !== ct || e[175] !== at || e[176] !== lt || e[177] !== ut || e[178] !== ft || e[179] !== Ue || e[180] !== $e || e[181] !== dt || e[182] !== ht || e[183] !== mt || e[184] !== pt || e[185] !== gt || e[186] !== vt || e[187] !== bt || e[188] !== St || e[189] !== Et ? (jt = /* @__PURE__ */ R.jsx(K, { ref: st, parentRef: ot, start: it, left: ct, width: at, grid: lt, snapDistance: ut, snapPositions: ft, getBounds: Ue, edges: $e, enableDragging: dt, enableResizing: ht, onDragStart: mt, onDrag: pt, onDragEnd: gt, onResizeStart: vt, onResize: bt, onResizeEnd: St, children: Et }), e[170] = K, e[171] = st, e[172] = ot, e[173] = it, e[174] = ct, e[175] = at, e[176] = lt, e[177] = ut, e[178] = ft, e[179] = Ue, e[180] = $e, e[181] = dt, e[182] = ht, e[183] = mt, e[184] = pt, e[185] = gt, e[186] = vt, e[187] = bt, e[188] = St, e[189] = Et, e[190] = jt) : jt = e[190], jt;
|
|
2989
2933
|
};
|
|
2990
2934
|
function Rt(n, e, t) {
|
|
2991
2935
|
let r = t.initialDeps ?? [], s;
|
|
@@ -2994,24 +2938,24 @@ function Rt(n, e, t) {
|
|
|
2994
2938
|
let l;
|
|
2995
2939
|
t.key && ((i = t.debug) != null && i.call(t)) && (l = Date.now());
|
|
2996
2940
|
const h = n();
|
|
2997
|
-
if (!(h.length !== r.length || h.some((
|
|
2941
|
+
if (!(h.length !== r.length || h.some((E, S) => r[S] !== E)))
|
|
2998
2942
|
return s;
|
|
2999
2943
|
r = h;
|
|
3000
|
-
let
|
|
3001
|
-
if (t.key && ((c = t.debug) != null && c.call(t)) && (
|
|
3002
|
-
const
|
|
3003
|
-
for (
|
|
3004
|
-
|
|
3005
|
-
return
|
|
2944
|
+
let m;
|
|
2945
|
+
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))) {
|
|
2946
|
+
const E = Math.round((Date.now() - l) * 100) / 100, S = Math.round((Date.now() - m) * 100) / 100, _ = S / 16, p = (g, v) => {
|
|
2947
|
+
for (g = String(g); g.length < v; )
|
|
2948
|
+
g = " " + g;
|
|
2949
|
+
return g;
|
|
3006
2950
|
};
|
|
3007
2951
|
console.info(
|
|
3008
|
-
`%c⏱ ${
|
|
2952
|
+
`%c⏱ ${p(S, 5)} /${p(E, 5)} ms`,
|
|
3009
2953
|
`
|
|
3010
2954
|
font-size: .6rem;
|
|
3011
2955
|
font-weight: bold;
|
|
3012
2956
|
color: hsl(${Math.max(
|
|
3013
2957
|
0,
|
|
3014
|
-
Math.min(120 - 120 *
|
|
2958
|
+
Math.min(120 - 120 * _, 120)
|
|
3015
2959
|
)}deg 100% 31%);`,
|
|
3016
2960
|
t?.key
|
|
3017
2961
|
);
|
|
@@ -3022,20 +2966,20 @@ function Rt(n, e, t) {
|
|
|
3022
2966
|
r = i;
|
|
3023
2967
|
}, o;
|
|
3024
2968
|
}
|
|
3025
|
-
function
|
|
2969
|
+
function Yn(n, e) {
|
|
3026
2970
|
if (n === void 0)
|
|
3027
2971
|
throw new Error("Unexpected undefined");
|
|
3028
2972
|
return n;
|
|
3029
2973
|
}
|
|
3030
|
-
const
|
|
2974
|
+
const xo = (n, e) => Math.abs(n - e) < 1.01, Co = (n, e, t) => {
|
|
3031
2975
|
let r;
|
|
3032
2976
|
return function(...s) {
|
|
3033
2977
|
n.clearTimeout(r), r = n.setTimeout(() => e.apply(this, s), t);
|
|
3034
2978
|
};
|
|
3035
|
-
},
|
|
2979
|
+
}, Xn = (n) => {
|
|
3036
2980
|
const { offsetWidth: e, offsetHeight: t } = n;
|
|
3037
2981
|
return { width: e, height: t };
|
|
3038
|
-
},
|
|
2982
|
+
}, To = (n) => n, Ao = (n) => {
|
|
3039
2983
|
const e = Math.max(n.startIndex - n.overscan, 0), t = Math.min(n.endIndex + n.overscan, n.count - 1), r = [];
|
|
3040
2984
|
for (let s = e; s <= t; s++)
|
|
3041
2985
|
r.push(s);
|
|
@@ -3051,7 +2995,7 @@ const Ro = (n, e) => Math.abs(n - e) < 1.01, Co = (n, e, t) => {
|
|
|
3051
2995
|
const { width: c, height: a } = i;
|
|
3052
2996
|
e({ width: Math.round(c), height: Math.round(a) });
|
|
3053
2997
|
};
|
|
3054
|
-
if (s(
|
|
2998
|
+
if (s(Xn(t)), !r.ResizeObserver)
|
|
3055
2999
|
return () => {
|
|
3056
3000
|
};
|
|
3057
3001
|
const o = new r.ResizeObserver((i) => {
|
|
@@ -3064,16 +3008,16 @@ const Ro = (n, e) => Math.abs(n - e) < 1.01, Co = (n, e, t) => {
|
|
|
3064
3008
|
return;
|
|
3065
3009
|
}
|
|
3066
3010
|
}
|
|
3067
|
-
s(
|
|
3011
|
+
s(Xn(t));
|
|
3068
3012
|
};
|
|
3069
3013
|
n.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(c) : c();
|
|
3070
3014
|
});
|
|
3071
3015
|
return o.observe(t, { box: "border-box" }), () => {
|
|
3072
3016
|
o.unobserve(t);
|
|
3073
3017
|
};
|
|
3074
|
-
},
|
|
3018
|
+
}, Gn = {
|
|
3075
3019
|
passive: !0
|
|
3076
|
-
},
|
|
3020
|
+
}, Kn = typeof window > "u" ? !0 : "onscrollend" in window, Do = (n, e) => {
|
|
3077
3021
|
const t = n.scrollElement;
|
|
3078
3022
|
if (!t)
|
|
3079
3023
|
return;
|
|
@@ -3081,7 +3025,7 @@ const Ro = (n, e) => Math.abs(n - e) < 1.01, Co = (n, e, t) => {
|
|
|
3081
3025
|
if (!r)
|
|
3082
3026
|
return;
|
|
3083
3027
|
let s = 0;
|
|
3084
|
-
const o = n.options.useScrollendEvent &&
|
|
3028
|
+
const o = n.options.useScrollendEvent && Kn ? () => {
|
|
3085
3029
|
} : Co(
|
|
3086
3030
|
r,
|
|
3087
3031
|
() => {
|
|
@@ -3089,12 +3033,12 @@ const Ro = (n, e) => Math.abs(n - e) < 1.01, Co = (n, e, t) => {
|
|
|
3089
3033
|
},
|
|
3090
3034
|
n.options.isScrollingResetDelay
|
|
3091
3035
|
), i = (l) => () => {
|
|
3092
|
-
const { horizontal: h, isRtl:
|
|
3093
|
-
s = h ? t.scrollLeft * (
|
|
3036
|
+
const { horizontal: h, isRtl: d } = n.options;
|
|
3037
|
+
s = h ? t.scrollLeft * (d && -1 || 1) : t.scrollTop, o(), e(s, l);
|
|
3094
3038
|
}, c = i(!0), a = i(!1);
|
|
3095
|
-
a(), t.addEventListener("scroll", c,
|
|
3096
|
-
const u = n.options.useScrollendEvent &&
|
|
3097
|
-
return u && t.addEventListener("scrollend", a,
|
|
3039
|
+
a(), t.addEventListener("scroll", c, Gn);
|
|
3040
|
+
const u = n.options.useScrollendEvent && Kn;
|
|
3041
|
+
return u && t.addEventListener("scrollend", a, Gn), () => {
|
|
3098
3042
|
t.removeEventListener("scroll", c), u && t.removeEventListener("scrollend", a);
|
|
3099
3043
|
};
|
|
3100
3044
|
}, Lo = (n, e, t) => {
|
|
@@ -3155,8 +3099,8 @@ class Mo {
|
|
|
3155
3099
|
scrollPaddingStart: 0,
|
|
3156
3100
|
scrollPaddingEnd: 0,
|
|
3157
3101
|
horizontal: !1,
|
|
3158
|
-
getItemKey:
|
|
3159
|
-
rangeExtractor:
|
|
3102
|
+
getItemKey: To,
|
|
3103
|
+
rangeExtractor: Ao,
|
|
3160
3104
|
onChange: () => {
|
|
3161
3105
|
},
|
|
3162
3106
|
measureElement: Lo,
|
|
@@ -3264,14 +3208,14 @@ class Mo {
|
|
|
3264
3208
|
this.pendingMeasuredCacheIndexes = [];
|
|
3265
3209
|
const u = this.measurementsCache.slice(0, a);
|
|
3266
3210
|
for (let l = a; l < t; l++) {
|
|
3267
|
-
const h = o(l),
|
|
3211
|
+
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, E = c.get(h), S = typeof E == "number" ? E : this.options.estimateSize(l), _ = m + S, p = d ? d.lane : l % this.options.lanes;
|
|
3268
3212
|
u[l] = {
|
|
3269
3213
|
index: l,
|
|
3270
|
-
start:
|
|
3271
|
-
size:
|
|
3272
|
-
end:
|
|
3214
|
+
start: m,
|
|
3215
|
+
size: S,
|
|
3216
|
+
end: _,
|
|
3273
3217
|
key: h,
|
|
3274
|
-
lane:
|
|
3218
|
+
lane: p
|
|
3275
3219
|
};
|
|
3276
3220
|
}
|
|
3277
3221
|
return this.measurementsCache = u, u;
|
|
@@ -3364,11 +3308,11 @@ class Mo {
|
|
|
3364
3308
|
), this.getVirtualItemForOffset = (t) => {
|
|
3365
3309
|
const r = this.getMeasurements();
|
|
3366
3310
|
if (r.length !== 0)
|
|
3367
|
-
return
|
|
3368
|
-
r[
|
|
3311
|
+
return Yn(
|
|
3312
|
+
r[xr(
|
|
3369
3313
|
0,
|
|
3370
3314
|
r.length - 1,
|
|
3371
|
-
(s) =>
|
|
3315
|
+
(s) => Yn(r[s]).start,
|
|
3372
3316
|
t
|
|
3373
3317
|
)]
|
|
3374
3318
|
);
|
|
@@ -3414,14 +3358,14 @@ class Mo {
|
|
|
3414
3358
|
console.warn("Failed to get offset for index:", t);
|
|
3415
3359
|
return;
|
|
3416
3360
|
}
|
|
3417
|
-
const [h,
|
|
3361
|
+
const [h, d] = l;
|
|
3418
3362
|
this._scrollToOffset(h, { adjustments: void 0, behavior: s }), this.targetWindow.requestAnimationFrame(() => {
|
|
3419
|
-
const
|
|
3420
|
-
if (!
|
|
3363
|
+
const m = this.getScrollOffset(), E = this.getOffsetForIndex(t, d);
|
|
3364
|
+
if (!E) {
|
|
3421
3365
|
console.warn("Failed to get offset for index:", t);
|
|
3422
3366
|
return;
|
|
3423
3367
|
}
|
|
3424
|
-
|
|
3368
|
+
xo(E[0], m) || a(d);
|
|
3425
3369
|
});
|
|
3426
3370
|
}, a = (u) => {
|
|
3427
3371
|
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(
|
|
@@ -3467,7 +3411,7 @@ class Mo {
|
|
|
3467
3411
|
}, this.setOptions(e);
|
|
3468
3412
|
}
|
|
3469
3413
|
}
|
|
3470
|
-
const
|
|
3414
|
+
const xr = (n, e, t, r) => {
|
|
3471
3415
|
for (; n <= e; ) {
|
|
3472
3416
|
const s = (n + e) / 2 | 0, o = t(s);
|
|
3473
3417
|
if (o < r)
|
|
@@ -3491,7 +3435,7 @@ function No({
|
|
|
3491
3435
|
startIndex: 0,
|
|
3492
3436
|
endIndex: s
|
|
3493
3437
|
};
|
|
3494
|
-
let i =
|
|
3438
|
+
let i = xr(
|
|
3495
3439
|
0,
|
|
3496
3440
|
s,
|
|
3497
3441
|
o,
|
|
@@ -3515,20 +3459,20 @@ function No({
|
|
|
3515
3459
|
}
|
|
3516
3460
|
return { startIndex: i, endIndex: c };
|
|
3517
3461
|
}
|
|
3518
|
-
const
|
|
3462
|
+
const qn = typeof document < "u" ? b.useLayoutEffect : b.useEffect;
|
|
3519
3463
|
function Io(n) {
|
|
3520
|
-
const e =
|
|
3464
|
+
const e = b.useReducer(() => ({}), {})[1], t = {
|
|
3521
3465
|
...n,
|
|
3522
3466
|
onChange: (s, o) => {
|
|
3523
3467
|
var i;
|
|
3524
|
-
o ?
|
|
3468
|
+
o ? kr(e) : e(), (i = n.onChange) == null || i.call(n, s, o);
|
|
3525
3469
|
}
|
|
3526
|
-
}, [r] =
|
|
3470
|
+
}, [r] = b.useState(
|
|
3527
3471
|
() => new Mo(t)
|
|
3528
3472
|
);
|
|
3529
|
-
return r.setOptions(t),
|
|
3473
|
+
return r.setOptions(t), qn(() => r._didMount(), []), qn(() => r._willUpdate()), r;
|
|
3530
3474
|
}
|
|
3531
|
-
function
|
|
3475
|
+
function Cr(n) {
|
|
3532
3476
|
return Io({
|
|
3533
3477
|
observeElementRect: Po,
|
|
3534
3478
|
observeElementOffset: Do,
|
|
@@ -3549,108 +3493,108 @@ const ko = (n) => {
|
|
|
3549
3493
|
scaleWidth: u
|
|
3550
3494
|
} = n, l = ["edit-row"];
|
|
3551
3495
|
e?.selected && l.push("edit-row-selected");
|
|
3552
|
-
const h = a ??
|
|
3496
|
+
const h = a ?? Gt, d = u ?? Kt, m = c ?? Qt, E = (g) => {
|
|
3553
3497
|
if (!i.current) return 0;
|
|
3554
|
-
const w =
|
|
3555
|
-
return
|
|
3556
|
-
startLeft:
|
|
3498
|
+
const w = g.currentTarget.getBoundingClientRect(), y = g.clientX - w.x;
|
|
3499
|
+
return Ct(y, {
|
|
3500
|
+
startLeft: m,
|
|
3557
3501
|
scale: h,
|
|
3558
|
-
scaleWidth:
|
|
3502
|
+
scaleWidth: d
|
|
3559
3503
|
});
|
|
3560
|
-
},
|
|
3504
|
+
}, S = Ar(() => (e?.actions ? [...e.actions] : []).sort((g, v) => g.start - v.start), [e]), _ = Pr((g) => S[g]?.id ?? g, [S]), p = Cr({
|
|
3561
3505
|
horizontal: !0,
|
|
3562
|
-
count:
|
|
3563
|
-
getItemKey:
|
|
3506
|
+
count: S.length,
|
|
3507
|
+
getItemKey: _,
|
|
3564
3508
|
getScrollElement: () => i.current,
|
|
3565
|
-
estimateSize: (
|
|
3566
|
-
if (!
|
|
3567
|
-
let
|
|
3568
|
-
if (
|
|
3509
|
+
estimateSize: (g) => {
|
|
3510
|
+
if (!S[g]) return 0;
|
|
3511
|
+
let v = g > 0 ? S[g - 1].end : 0, w = S[g].end;
|
|
3512
|
+
if (v > w) return 0;
|
|
3569
3513
|
let {
|
|
3570
3514
|
width: T
|
|
3571
3515
|
} = vn({
|
|
3572
|
-
start:
|
|
3516
|
+
start: v,
|
|
3573
3517
|
end: w
|
|
3574
3518
|
}, {
|
|
3575
|
-
startLeft:
|
|
3519
|
+
startLeft: m,
|
|
3576
3520
|
scale: h,
|
|
3577
|
-
scaleWidth:
|
|
3521
|
+
scaleWidth: d
|
|
3578
3522
|
});
|
|
3579
3523
|
return T;
|
|
3580
3524
|
},
|
|
3581
3525
|
overscan: 5
|
|
3582
3526
|
});
|
|
3583
|
-
return
|
|
3584
|
-
|
|
3585
|
-
}, [u, c,
|
|
3527
|
+
return Nt(() => {
|
|
3528
|
+
p.measure();
|
|
3529
|
+
}, [u, c, p]), /* @__PURE__ */ R.jsx("div", { className: `${fe(...l)} ${(e?.classNames || []).join(" ")}`, style: t, onClick: (g) => {
|
|
3586
3530
|
if (e && r) {
|
|
3587
|
-
const
|
|
3588
|
-
r(
|
|
3531
|
+
const v = E(g);
|
|
3532
|
+
r(g, {
|
|
3589
3533
|
row: e,
|
|
3590
|
-
time:
|
|
3534
|
+
time: v
|
|
3591
3535
|
});
|
|
3592
3536
|
}
|
|
3593
|
-
}, onDoubleClick: (
|
|
3537
|
+
}, onDoubleClick: (g) => {
|
|
3594
3538
|
if (e && s) {
|
|
3595
|
-
const
|
|
3596
|
-
s(
|
|
3539
|
+
const v = E(g);
|
|
3540
|
+
s(g, {
|
|
3597
3541
|
row: e,
|
|
3598
|
-
time:
|
|
3542
|
+
time: v
|
|
3599
3543
|
});
|
|
3600
3544
|
}
|
|
3601
|
-
}, onContextMenu: (
|
|
3545
|
+
}, onContextMenu: (g) => {
|
|
3602
3546
|
if (e && o) {
|
|
3603
|
-
const
|
|
3604
|
-
o(
|
|
3547
|
+
const v = E(g);
|
|
3548
|
+
o(g, {
|
|
3605
3549
|
row: e,
|
|
3606
|
-
time:
|
|
3550
|
+
time: v
|
|
3607
3551
|
});
|
|
3608
3552
|
}
|
|
3609
|
-
}, children: e &&
|
|
3610
|
-
const
|
|
3611
|
-
if (!
|
|
3612
|
-
return /* @__PURE__ */ R.jsx(
|
|
3553
|
+
}, children: e && p.getVirtualItems().map((g) => {
|
|
3554
|
+
const v = S[g.index];
|
|
3555
|
+
if (!v) throw new Error("Action not found");
|
|
3556
|
+
return /* @__PURE__ */ R.jsx(Ro, { ...n, handleTime: E, row: e, action: v }, v.id);
|
|
3613
3557
|
}) });
|
|
3614
3558
|
};
|
|
3615
3559
|
function Wo() {
|
|
3616
|
-
const n =
|
|
3560
|
+
const n = Pe.c(7);
|
|
3617
3561
|
let e;
|
|
3618
3562
|
n[0] === Symbol.for("react.memo_cache_sentinel") ? (e = {
|
|
3619
3563
|
isMoving: !1,
|
|
3620
3564
|
movePositions: [],
|
|
3621
3565
|
assistPositions: []
|
|
3622
3566
|
}, n[0] = e) : e = n[0];
|
|
3623
|
-
const [t, r] = Mt(e), s =
|
|
3567
|
+
const [t, r] = Mt(e), s = ne(null), o = jo, i = zo;
|
|
3624
3568
|
let c;
|
|
3625
|
-
n[1] === Symbol.for("react.memo_cache_sentinel") ? (c = (
|
|
3569
|
+
n[1] === Symbol.for("react.memo_cache_sentinel") ? (c = (_) => {
|
|
3626
3570
|
const {
|
|
3627
|
-
movePositions:
|
|
3628
|
-
assistPositions:
|
|
3629
|
-
action:
|
|
3571
|
+
movePositions: p,
|
|
3572
|
+
assistPositions: g,
|
|
3573
|
+
action: v,
|
|
3630
3574
|
row: w,
|
|
3631
3575
|
assistActionIds: T
|
|
3632
|
-
} =
|
|
3576
|
+
} = _;
|
|
3633
3577
|
s.current = {
|
|
3634
|
-
action:
|
|
3578
|
+
action: v,
|
|
3635
3579
|
row: w,
|
|
3636
3580
|
assistActionIds: T
|
|
3637
3581
|
}, r({
|
|
3638
3582
|
isMoving: !0,
|
|
3639
|
-
movePositions:
|
|
3640
|
-
assistPositions:
|
|
3583
|
+
movePositions: p || [],
|
|
3584
|
+
assistPositions: g || []
|
|
3641
3585
|
});
|
|
3642
3586
|
}, n[1] = c) : c = n[1];
|
|
3643
3587
|
const a = c;
|
|
3644
3588
|
let u;
|
|
3645
|
-
n[2] === Symbol.for("react.memo_cache_sentinel") ? (u = (
|
|
3589
|
+
n[2] === Symbol.for("react.memo_cache_sentinel") ? (u = (_) => {
|
|
3646
3590
|
const {
|
|
3647
|
-
movePositions:
|
|
3648
|
-
assistPositions:
|
|
3649
|
-
} =
|
|
3650
|
-
r((
|
|
3651
|
-
...
|
|
3652
|
-
movePositions:
|
|
3653
|
-
assistPositions:
|
|
3591
|
+
movePositions: p,
|
|
3592
|
+
assistPositions: g
|
|
3593
|
+
} = _;
|
|
3594
|
+
r((v) => ({
|
|
3595
|
+
...v,
|
|
3596
|
+
movePositions: p || v.movePositions,
|
|
3597
|
+
assistPositions: g || v.assistPositions
|
|
3654
3598
|
}));
|
|
3655
3599
|
}, n[2] = u) : u = n[2];
|
|
3656
3600
|
const l = u;
|
|
@@ -3662,20 +3606,20 @@ function Wo() {
|
|
|
3662
3606
|
assistPositions: []
|
|
3663
3607
|
});
|
|
3664
3608
|
}, n[3] = h) : h = n[3];
|
|
3665
|
-
const
|
|
3666
|
-
let
|
|
3667
|
-
n[4] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
3668
|
-
const
|
|
3669
|
-
let
|
|
3670
|
-
return n[5] !== t ? (
|
|
3609
|
+
const d = h;
|
|
3610
|
+
let m;
|
|
3611
|
+
n[4] === Symbol.for("react.memo_cache_sentinel") ? (m = () => s.current, n[4] = m) : m = n[4];
|
|
3612
|
+
const E = m;
|
|
3613
|
+
let S;
|
|
3614
|
+
return n[5] !== t ? (S = {
|
|
3671
3615
|
initSnap: a,
|
|
3672
3616
|
updateSnap: l,
|
|
3673
|
-
disposeSnap:
|
|
3617
|
+
disposeSnap: d,
|
|
3674
3618
|
snapData: t,
|
|
3675
|
-
getActiveDragState:
|
|
3619
|
+
getActiveDragState: E,
|
|
3676
3620
|
defaultGetAssistPosition: o,
|
|
3677
3621
|
defaultGetMovePosition: i
|
|
3678
|
-
}, n[5] = t, n[6] =
|
|
3622
|
+
}, n[5] = t, n[6] = S) : S = n[6], S;
|
|
3679
3623
|
}
|
|
3680
3624
|
function zo(n) {
|
|
3681
3625
|
const {
|
|
@@ -3710,157 +3654,134 @@ function jo(n) {
|
|
|
3710
3654
|
cursorLeft: a,
|
|
3711
3655
|
hideCursor: u
|
|
3712
3656
|
} = n, l = [];
|
|
3713
|
-
t ? e.forEach((
|
|
3714
|
-
|
|
3715
|
-
t.includes(
|
|
3657
|
+
t ? e.forEach((d) => {
|
|
3658
|
+
d.actions.forEach((m) => {
|
|
3659
|
+
t.includes(m.id) && l.push(m);
|
|
3716
3660
|
});
|
|
3717
|
-
}) : e.forEach((
|
|
3718
|
-
|
|
3719
|
-
|
|
3661
|
+
}) : e.forEach((d) => {
|
|
3662
|
+
d.id !== s.id ? l.push(...d.actions) : d.actions.forEach((m) => {
|
|
3663
|
+
m.id !== r.id && l.push(m);
|
|
3720
3664
|
});
|
|
3721
3665
|
});
|
|
3722
|
-
const h =
|
|
3666
|
+
const h = Nr(l, {
|
|
3723
3667
|
startLeft: c,
|
|
3724
3668
|
scale: o,
|
|
3725
3669
|
scaleWidth: i
|
|
3726
3670
|
});
|
|
3727
3671
|
return u || h.push(a), h;
|
|
3728
3672
|
}
|
|
3729
|
-
const Fo = (
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
ref: r,
|
|
3734
|
-
...t
|
|
3735
|
-
} = n, e[0] = n, e[1] = t, e[2] = r) : (t = e[1], r = e[2]);
|
|
3673
|
+
const Fo = ({
|
|
3674
|
+
ref: n,
|
|
3675
|
+
...e
|
|
3676
|
+
}) => {
|
|
3736
3677
|
const {
|
|
3737
|
-
snapData:
|
|
3738
|
-
initSnap:
|
|
3739
|
-
updateSnap:
|
|
3740
|
-
disposeSnap:
|
|
3741
|
-
getActiveDragState:
|
|
3742
|
-
defaultGetAssistPosition:
|
|
3743
|
-
defaultGetMovePosition:
|
|
3678
|
+
snapData: t,
|
|
3679
|
+
initSnap: r,
|
|
3680
|
+
updateSnap: s,
|
|
3681
|
+
disposeSnap: o,
|
|
3682
|
+
getActiveDragState: i,
|
|
3683
|
+
defaultGetAssistPosition: c,
|
|
3684
|
+
defaultGetMovePosition: a
|
|
3744
3685
|
} = Wo();
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
cursorLeft: M
|
|
3763
|
-
});
|
|
3764
|
-
i({
|
|
3765
|
-
assistPositions: Z
|
|
3686
|
+
Tt(() => {
|
|
3687
|
+
const p = i();
|
|
3688
|
+
if (e.snap && p && t.isMoving) {
|
|
3689
|
+
const g = e.scaleWidth ?? 160, v = e.scale ?? 1, w = e.startLeft ?? 20, T = e.hideCursor ?? !1, y = Ye(e.cursorTime, {
|
|
3690
|
+
scaleWidth: g,
|
|
3691
|
+
scale: v,
|
|
3692
|
+
startLeft: w
|
|
3693
|
+
}), A = c({
|
|
3694
|
+
editorData: e.editorData,
|
|
3695
|
+
assistActionIds: p.assistActionIds,
|
|
3696
|
+
action: p.action,
|
|
3697
|
+
row: p.row,
|
|
3698
|
+
scale: v,
|
|
3699
|
+
scaleWidth: g,
|
|
3700
|
+
startLeft: w,
|
|
3701
|
+
hideCursor: T,
|
|
3702
|
+
cursorLeft: y
|
|
3766
3703
|
});
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
assistPositions: []
|
|
3704
|
+
s({
|
|
3705
|
+
assistPositions: A
|
|
3770
3706
|
});
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
const
|
|
3777
|
-
action:
|
|
3778
|
-
row:
|
|
3779
|
-
editorData:
|
|
3707
|
+
} else !e.snap && t.isMoving && s({
|
|
3708
|
+
assistPositions: []
|
|
3709
|
+
});
|
|
3710
|
+
}, [e.snap, t.isMoving]);
|
|
3711
|
+
const u = (p) => {
|
|
3712
|
+
const g = e.getAssistDragLineActionIds && e.getAssistDragLineActionIds({
|
|
3713
|
+
action: p.action,
|
|
3714
|
+
row: p.row,
|
|
3715
|
+
editorData: e.editorData
|
|
3780
3716
|
});
|
|
3781
|
-
if (
|
|
3782
|
-
const
|
|
3783
|
-
scaleWidth:
|
|
3784
|
-
scale:
|
|
3785
|
-
startLeft:
|
|
3786
|
-
}),
|
|
3787
|
-
editorData:
|
|
3788
|
-
assistActionIds:
|
|
3789
|
-
action:
|
|
3790
|
-
row:
|
|
3791
|
-
scale:
|
|
3792
|
-
scaleWidth:
|
|
3793
|
-
startLeft:
|
|
3794
|
-
hideCursor:
|
|
3795
|
-
cursorLeft:
|
|
3717
|
+
if (e.snap) {
|
|
3718
|
+
const v = e.scaleWidth ?? 160, w = e.scale ?? 1, T = e.startLeft ?? 20, y = e.hideCursor ?? !1, A = Ye(e.cursorTime, {
|
|
3719
|
+
scaleWidth: v,
|
|
3720
|
+
scale: w,
|
|
3721
|
+
startLeft: T
|
|
3722
|
+
}), z = c({
|
|
3723
|
+
editorData: e.editorData,
|
|
3724
|
+
assistActionIds: g,
|
|
3725
|
+
action: p.action,
|
|
3726
|
+
row: p.row,
|
|
3727
|
+
scale: w,
|
|
3728
|
+
scaleWidth: v,
|
|
3729
|
+
startLeft: T,
|
|
3730
|
+
hideCursor: y,
|
|
3731
|
+
cursorLeft: A
|
|
3796
3732
|
});
|
|
3797
|
-
|
|
3798
|
-
assistPositions:
|
|
3799
|
-
action:
|
|
3800
|
-
row:
|
|
3801
|
-
assistActionIds:
|
|
3733
|
+
r({
|
|
3734
|
+
assistPositions: z,
|
|
3735
|
+
action: p.action,
|
|
3736
|
+
row: p.row,
|
|
3737
|
+
assistActionIds: g
|
|
3802
3738
|
});
|
|
3803
3739
|
} else
|
|
3804
|
-
|
|
3740
|
+
r({
|
|
3805
3741
|
assistPositions: [],
|
|
3806
|
-
action:
|
|
3807
|
-
row:
|
|
3808
|
-
assistActionIds:
|
|
3742
|
+
action: p.action,
|
|
3743
|
+
row: p.row,
|
|
3744
|
+
assistActionIds: g
|
|
3809
3745
|
});
|
|
3810
|
-
},
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
startLeft: y,
|
|
3818
|
-
scaleWidth: z,
|
|
3819
|
-
scale: I
|
|
3746
|
+
}, l = (p) => {
|
|
3747
|
+
if (e.snap) {
|
|
3748
|
+
const g = e.scaleWidth ?? 160, v = e.scale ?? 1, w = e.startLeft ?? 20, T = a({
|
|
3749
|
+
...p,
|
|
3750
|
+
startLeft: w,
|
|
3751
|
+
scaleWidth: g,
|
|
3752
|
+
scale: v
|
|
3820
3753
|
});
|
|
3821
|
-
|
|
3822
|
-
movePositions:
|
|
3754
|
+
s({
|
|
3755
|
+
movePositions: T
|
|
3823
3756
|
});
|
|
3824
3757
|
}
|
|
3825
|
-
},
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
const y = t.editorData[I];
|
|
3833
|
-
if (!y)
|
|
3834
|
-
continue;
|
|
3835
|
-
const A = y.rowHeight || E;
|
|
3836
|
-
C.push(/* @__PURE__ */ Or(ko, { ...t, key: y.id, rowData: y, snapData: s, scrollContainerRef: t.scrollElementRef, style: {
|
|
3758
|
+
}, h = e.rowHeight ?? 32, d = e.scaleWidth ?? 160, m = e.startLeft ?? 20, E = Math.max(e.scaleCount * d + m, e.timelineWidth), [S, _] = (() => {
|
|
3759
|
+
let p = [], g = 0;
|
|
3760
|
+
for (let v = 0; v < e.editorData.length; v++) {
|
|
3761
|
+
const w = e.editorData[v];
|
|
3762
|
+
if (!w) continue;
|
|
3763
|
+
const T = w.rowHeight || h;
|
|
3764
|
+
p.push(/* @__PURE__ */ Dr(ko, { ...e, key: w.id, rowData: w, snapData: t, scrollContainerRef: e.scrollElementRef, style: {
|
|
3837
3765
|
position: "absolute",
|
|
3838
3766
|
top: 0,
|
|
3839
3767
|
left: 0,
|
|
3840
|
-
width:
|
|
3841
|
-
height: `${
|
|
3842
|
-
transform: `translateY(${
|
|
3843
|
-
}, onActionMoveStart: (
|
|
3768
|
+
width: E,
|
|
3769
|
+
height: `${T}px`,
|
|
3770
|
+
transform: `translateY(${g}px)`
|
|
3771
|
+
}, onActionMoveStart: (y) => (u(y), e.onActionMoveStart && e.onActionMoveStart(y)), onActionResizeStart: (y) => (u(y), e.onActionResizeStart && e.onActionResizeStart(y)), onActionMoving: (y) => (l(y), e.onActionMoving && e.onActionMoving(y)), onActionResizing: (y) => (l(y), e.onActionResizing && e.onActionResizing(y)), onActionResizeEnd: (y) => (o(), e.onActionResizeEnd && e.onActionResizeEnd(y)), onActionMoveEnd: (y) => (o(), e.onActionMoveEnd && e.onActionMoveEnd(y)) })), g += T;
|
|
3844
3772
|
}
|
|
3845
|
-
|
|
3846
|
-
}
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
e[37] !== w || e[38] !== H || e[39] !== O || e[40] !== P ? (j = {
|
|
3851
|
-
width: w,
|
|
3852
|
-
height: P,
|
|
3773
|
+
return [g, p];
|
|
3774
|
+
})();
|
|
3775
|
+
return /* @__PURE__ */ R.jsxs("div", { ref: n, style: {
|
|
3776
|
+
width: E,
|
|
3777
|
+
height: S,
|
|
3853
3778
|
position: "relative",
|
|
3854
|
-
backgroundPositionX:
|
|
3855
|
-
backgroundSize:
|
|
3856
|
-
},
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
return e[45] !== r || e[46] !== D || e[47] !== j || e[48] !== W ? (Y = /* @__PURE__ */ R.jsxs("div", { ref: r, style: j, className: "timeline-editor-edit-area", children: [
|
|
3861
|
-
D,
|
|
3862
|
-
W
|
|
3863
|
-
] }), e[45] = r, e[46] = D, e[47] = j, e[48] = W, e[49] = Y) : Y = e[49], Y;
|
|
3779
|
+
backgroundPositionX: `0, ${e.startLeft ?? 20}px`,
|
|
3780
|
+
backgroundSize: `${e.startLeft ?? 20}px, ${e.scaleWidth ?? 160}px`
|
|
3781
|
+
}, className: "timeline-editor-edit-area", children: [
|
|
3782
|
+
_,
|
|
3783
|
+
e.snap && /* @__PURE__ */ R.jsx(qr, { ...t })
|
|
3784
|
+
] });
|
|
3864
3785
|
};
|
|
3865
3786
|
function Vo({
|
|
3866
3787
|
scaleSplitCount: n,
|
|
@@ -3871,41 +3792,42 @@ function Vo({
|
|
|
3871
3792
|
scale: o,
|
|
3872
3793
|
scrollElementRef: i,
|
|
3873
3794
|
onClickTimeArea: c,
|
|
3874
|
-
setCursor: a
|
|
3795
|
+
setCursor: a,
|
|
3796
|
+
getScaleRender: u
|
|
3875
3797
|
}) {
|
|
3876
|
-
const
|
|
3798
|
+
const l = n ?? 1, h = e ?? 160, d = t ?? 20, m = (n ?? 0) > 0, E = m ? r * (n ?? 1) + 1 : r, S = (m ? h / l : h) * (E - 1) + d, p = Cr({
|
|
3877
3799
|
horizontal: !0,
|
|
3878
|
-
count:
|
|
3800
|
+
count: E,
|
|
3879
3801
|
getScrollElement: () => i.current,
|
|
3880
|
-
estimateSize: (
|
|
3881
|
-
switch (
|
|
3802
|
+
estimateSize: (g) => {
|
|
3803
|
+
switch (g) {
|
|
3882
3804
|
case 0:
|
|
3883
|
-
return
|
|
3805
|
+
return d;
|
|
3884
3806
|
default:
|
|
3885
|
-
return
|
|
3807
|
+
return m ? h / l : h;
|
|
3886
3808
|
}
|
|
3887
3809
|
},
|
|
3888
3810
|
overscan: 10
|
|
3889
3811
|
});
|
|
3890
|
-
return
|
|
3812
|
+
return Tt(() => p.measure(), [e, t, p]), /* @__PURE__ */ R.jsx("div", { style: {
|
|
3891
3813
|
width: `${S}px`
|
|
3892
|
-
}, className: fe("time-area"), onClick: (
|
|
3893
|
-
const
|
|
3894
|
-
if (
|
|
3895
|
-
const
|
|
3896
|
-
startLeft:
|
|
3897
|
-
scale:
|
|
3898
|
-
scaleWidth:
|
|
3814
|
+
}, className: fe("time-area"), onClick: (g) => {
|
|
3815
|
+
const v = t ?? 20, w = e ?? 160, T = o ?? 1, y = s ?? 1 / 0, A = g.currentTarget.getBoundingClientRect(), z = g.clientX - A.x, O = Math.max(z, v);
|
|
3816
|
+
if (O > y * w + v) return;
|
|
3817
|
+
const j = Ct(O, {
|
|
3818
|
+
startLeft: v,
|
|
3819
|
+
scale: T,
|
|
3820
|
+
scaleWidth: w
|
|
3899
3821
|
});
|
|
3900
|
-
c && c(
|
|
3901
|
-
time:
|
|
3822
|
+
c && c(j, g), !g.defaultPrevented && a({
|
|
3823
|
+
time: j
|
|
3902
3824
|
});
|
|
3903
|
-
}, children:
|
|
3904
|
-
const
|
|
3905
|
-
return /* @__PURE__ */ R.jsx("div", { "data-index":
|
|
3906
|
-
width: `${
|
|
3907
|
-
transform: `translateX(${
|
|
3908
|
-
}, className:
|
|
3825
|
+
}, children: p.getVirtualItems().map((g) => {
|
|
3826
|
+
const v = g.index, w = n ?? 1, T = o ?? 1, y = m ? v % w === 0 : !0, A = [fe("time-unit"), fe(y ? "time-unit-big" : "time-unit-small")], z = (m ? v / w : v) * T;
|
|
3827
|
+
return /* @__PURE__ */ R.jsx("div", { "data-index": g.index, style: {
|
|
3828
|
+
width: `${g.size}px`,
|
|
3829
|
+
transform: `translateX(${g.start}px)`
|
|
3830
|
+
}, className: A.join(" "), children: /* @__PURE__ */ R.jsx(Lr, { mode: y ? "visible" : "hidden", children: /* @__PURE__ */ R.jsx("div", { className: fe("time-unit-scale"), children: u?.(z) ?? z }) }) }, g.key);
|
|
3909
3831
|
}) });
|
|
3910
3832
|
}
|
|
3911
3833
|
function Uo(n) {
|
|
@@ -3923,11 +3845,11 @@ function $o(n, e, t) {
|
|
|
3923
3845
|
function Ho(n) {
|
|
3924
3846
|
return Uo(n) && "ownerSVGElement" in n;
|
|
3925
3847
|
}
|
|
3926
|
-
const
|
|
3927
|
-
let
|
|
3928
|
-
const
|
|
3848
|
+
const Bt = /* @__PURE__ */ new WeakMap();
|
|
3849
|
+
let Yt;
|
|
3850
|
+
const Tr = (n, e, t) => (r, s) => s && s[0] ? s[0][n + "Size"] : Ho(r) && "getBBox" in r ? r.getBBox()[e] : r[t], Bo = /* @__PURE__ */ Tr("inline", "width", "offsetWidth"), Yo = /* @__PURE__ */ Tr("block", "height", "offsetHeight");
|
|
3929
3851
|
function Xo({ target: n, borderBoxSize: e }) {
|
|
3930
|
-
|
|
3852
|
+
Bt.get(n)?.forEach((t) => {
|
|
3931
3853
|
t(n, {
|
|
3932
3854
|
get width() {
|
|
3933
3855
|
return Bo(n, e);
|
|
@@ -3942,25 +3864,25 @@ function Go(n) {
|
|
|
3942
3864
|
n.forEach(Xo);
|
|
3943
3865
|
}
|
|
3944
3866
|
function Ko() {
|
|
3945
|
-
typeof ResizeObserver > "u" || (
|
|
3867
|
+
typeof ResizeObserver > "u" || (Yt = new ResizeObserver(Go));
|
|
3946
3868
|
}
|
|
3947
3869
|
function qo(n, e) {
|
|
3948
|
-
|
|
3870
|
+
Yt || Ko();
|
|
3949
3871
|
const t = $o(n);
|
|
3950
3872
|
return t.forEach((r) => {
|
|
3951
|
-
let s =
|
|
3952
|
-
s || (s = /* @__PURE__ */ new Set(),
|
|
3873
|
+
let s = Bt.get(r);
|
|
3874
|
+
s || (s = /* @__PURE__ */ new Set(), Bt.set(r, s)), s.add(e), Yt?.observe(r);
|
|
3953
3875
|
}), () => {
|
|
3954
3876
|
t.forEach((r) => {
|
|
3955
|
-
const s =
|
|
3956
|
-
s?.delete(e), s?.size ||
|
|
3877
|
+
const s = Bt.get(r);
|
|
3878
|
+
s?.delete(e), s?.size || Yt?.unobserve(r);
|
|
3957
3879
|
});
|
|
3958
3880
|
};
|
|
3959
3881
|
}
|
|
3960
|
-
const
|
|
3961
|
-
let
|
|
3882
|
+
const Xt = /* @__PURE__ */ new Set();
|
|
3883
|
+
let xt;
|
|
3962
3884
|
function Jo() {
|
|
3963
|
-
|
|
3885
|
+
xt = () => {
|
|
3964
3886
|
const n = {
|
|
3965
3887
|
get width() {
|
|
3966
3888
|
return window.innerWidth;
|
|
@@ -3969,19 +3891,19 @@ function Jo() {
|
|
|
3969
3891
|
return window.innerHeight;
|
|
3970
3892
|
}
|
|
3971
3893
|
};
|
|
3972
|
-
|
|
3973
|
-
}, window.addEventListener("resize",
|
|
3894
|
+
Xt.forEach((e) => e(n));
|
|
3895
|
+
}, window.addEventListener("resize", xt);
|
|
3974
3896
|
}
|
|
3975
3897
|
function Zo(n) {
|
|
3976
|
-
return
|
|
3977
|
-
|
|
3898
|
+
return Xt.add(n), xt || Jo(), () => {
|
|
3899
|
+
Xt.delete(n), !Xt.size && typeof xt == "function" && (window.removeEventListener("resize", xt), xt = void 0);
|
|
3978
3900
|
};
|
|
3979
3901
|
}
|
|
3980
3902
|
function Qo(n, e) {
|
|
3981
3903
|
return typeof n == "function" ? Zo(n) : qo(n, e);
|
|
3982
3904
|
}
|
|
3983
3905
|
function ei(n) {
|
|
3984
|
-
const e =
|
|
3906
|
+
const e = Pe.c(4), {
|
|
3985
3907
|
elementRef: t
|
|
3986
3908
|
} = n;
|
|
3987
3909
|
let r;
|
|
@@ -3998,10 +3920,10 @@ function ei(n) {
|
|
|
3998
3920
|
height: u.height
|
|
3999
3921
|
});
|
|
4000
3922
|
});
|
|
4001
|
-
}, c = [t], e[1] = t, e[2] = i, e[3] = c) : (i = e[2], c = e[3]),
|
|
3923
|
+
}, c = [t], e[1] = t, e[2] = i, e[3] = c) : (i = e[2], c = e[3]), Nt(i, c), s;
|
|
4002
3924
|
}
|
|
4003
3925
|
const ti = (n) => {
|
|
4004
|
-
const e =
|
|
3926
|
+
const e = Pe.c(42), {
|
|
4005
3927
|
disableDrag: t,
|
|
4006
3928
|
cursorTime: r,
|
|
4007
3929
|
setCursor: s,
|
|
@@ -4012,101 +3934,101 @@ const ti = (n) => {
|
|
|
4012
3934
|
scaleSplitCount: u,
|
|
4013
3935
|
scrollElementRef: l,
|
|
4014
3936
|
maxScaleCount: h,
|
|
4015
|
-
onCursorDragStart:
|
|
4016
|
-
onCursorDrag:
|
|
4017
|
-
onCursorDragEnd:
|
|
4018
|
-
} = n,
|
|
4019
|
-
let
|
|
4020
|
-
e[0] !== r || e[1] !== c || e[2] !== i || e[3] !== o ? (
|
|
4021
|
-
if (typeof
|
|
4022
|
-
const
|
|
4023
|
-
|
|
4024
|
-
startLeft:
|
|
3937
|
+
onCursorDragStart: d,
|
|
3938
|
+
onCursorDrag: m,
|
|
3939
|
+
onCursorDragEnd: E
|
|
3940
|
+
} = n, S = ne(null), _ = ne(void 0);
|
|
3941
|
+
let p, g;
|
|
3942
|
+
e[0] !== r || e[1] !== c || e[2] !== i || e[3] !== o ? (p = () => {
|
|
3943
|
+
if (typeof _.current > "u" && S.current) {
|
|
3944
|
+
const f = o ?? 20, x = i ?? 160, D = c ?? 1;
|
|
3945
|
+
S.current.updateLeft(Ye(r, {
|
|
3946
|
+
startLeft: f,
|
|
4025
3947
|
scaleWidth: x,
|
|
4026
|
-
scale:
|
|
3948
|
+
scale: D
|
|
4027
3949
|
}));
|
|
4028
3950
|
}
|
|
4029
|
-
},
|
|
4030
|
-
const
|
|
4031
|
-
let
|
|
4032
|
-
e[6] !==
|
|
3951
|
+
}, g = [r, o, i, c], e[0] = r, e[1] = c, e[2] = i, e[3] = o, e[4] = p, e[5] = g) : (p = e[4], g = e[5]), Tt(p, g);
|
|
3952
|
+
const v = o ?? 20, w = i ?? 160, T = c ?? 1, y = h ?? 1 / 0, A = (u ?? 0) > 0, z = u ?? 1, O = A ? a * (u ?? 1) + 1 : a, j = o ?? 20, F = (A ? w / z : w) * (O - 1) + j;
|
|
3953
|
+
let q;
|
|
3954
|
+
e[6] !== v || e[7] !== y || e[8] !== l || e[9] !== F || e[10] !== w ? (q = () => ({
|
|
4033
3955
|
left: 0,
|
|
4034
|
-
right: Math.min(
|
|
4035
|
-
}), e[6] =
|
|
4036
|
-
const
|
|
4037
|
-
let
|
|
4038
|
-
e[12] !== r || e[13] !==
|
|
4039
|
-
const
|
|
4040
|
-
startLeft:
|
|
3956
|
+
right: Math.min(F, y * w + v - (l.current?.scrollLeft ?? 0))
|
|
3957
|
+
}), e[6] = v, e[7] = y, e[8] = l, e[9] = F, e[10] = w, e[11] = q) : q = e[11];
|
|
3958
|
+
const V = !t;
|
|
3959
|
+
let J;
|
|
3960
|
+
e[12] !== r || e[13] !== v || e[14] !== d || e[15] !== T || e[16] !== w ? (J = () => {
|
|
3961
|
+
const f = S.current?.getLeft() ?? Ye(r, {
|
|
3962
|
+
startLeft: v,
|
|
4041
3963
|
scaleWidth: w,
|
|
4042
3964
|
scale: T
|
|
4043
3965
|
});
|
|
4044
|
-
|
|
4045
|
-
const x =
|
|
4046
|
-
startLeft:
|
|
3966
|
+
_.current = f;
|
|
3967
|
+
const x = Ct(f, {
|
|
3968
|
+
startLeft: v,
|
|
4047
3969
|
scale: T,
|
|
4048
3970
|
scaleWidth: w
|
|
4049
3971
|
});
|
|
4050
|
-
|
|
4051
|
-
}, e[12] = r, e[13] =
|
|
4052
|
-
let
|
|
4053
|
-
e[18] !==
|
|
4054
|
-
if (typeof
|
|
4055
|
-
const
|
|
4056
|
-
startLeft:
|
|
3972
|
+
d && d(x), S.current?.updateLeft(f);
|
|
3973
|
+
}, e[12] = r, e[13] = v, e[14] = d, e[15] = T, e[16] = w, e[17] = J) : J = e[17];
|
|
3974
|
+
let U;
|
|
3975
|
+
e[18] !== v || e[19] !== E || e[20] !== T || e[21] !== s || e[22] !== w ? (U = () => {
|
|
3976
|
+
if (typeof _.current < "u") {
|
|
3977
|
+
const f = Ct(_.current, {
|
|
3978
|
+
startLeft: v,
|
|
4057
3979
|
scale: T,
|
|
4058
3980
|
scaleWidth: w
|
|
4059
3981
|
});
|
|
4060
3982
|
s({
|
|
4061
|
-
time:
|
|
4062
|
-
}),
|
|
3983
|
+
time: f
|
|
3984
|
+
}), E && E(f);
|
|
4063
3985
|
}
|
|
4064
|
-
|
|
4065
|
-
}, e[18] =
|
|
4066
|
-
let
|
|
4067
|
-
e[24] !==
|
|
3986
|
+
_.current = void 0;
|
|
3987
|
+
}, e[18] = v, e[19] = E, e[20] = T, e[21] = s, e[22] = w, e[23] = U) : U = e[23];
|
|
3988
|
+
let C;
|
|
3989
|
+
e[24] !== v || e[25] !== m || e[26] !== T || e[27] !== l || e[28] !== s || e[29] !== w ? (C = (f, x) => {
|
|
4068
3990
|
const {
|
|
4069
|
-
left:
|
|
4070
|
-
} =
|
|
4071
|
-
if (
|
|
4072
|
-
if (typeof
|
|
4073
|
-
|
|
4074
|
-
const
|
|
4075
|
-
|
|
3991
|
+
left: D
|
|
3992
|
+
} = f, W = x === void 0 ? 0 : x, Z = l.current?.scrollLeft ?? 0, H = l.current, $ = H?.clientWidth ?? 0;
|
|
3993
|
+
if (W !== 0)
|
|
3994
|
+
if (typeof _.current < "u") {
|
|
3995
|
+
_.current = _.current + W;
|
|
3996
|
+
const P = Z, L = Z + $;
|
|
3997
|
+
_.current < P + 10 ? _.current = P + 10 : _.current > L - 10 && (_.current = L - 10), _.current < v - Z && (_.current = v - Z);
|
|
4076
3998
|
} else {
|
|
4077
|
-
|
|
4078
|
-
const
|
|
4079
|
-
|
|
3999
|
+
_.current = D + W;
|
|
4000
|
+
const P = Z, L = Z + $;
|
|
4001
|
+
_.current < P + 10 ? _.current = P + 10 : _.current > L - 10 && (_.current = L - 10);
|
|
4080
4002
|
}
|
|
4081
|
-
else if (
|
|
4082
|
-
const
|
|
4083
|
-
|
|
4003
|
+
else if (D < v - Z ? _.current = v - Z : _.current = D, H && $ > 0) {
|
|
4004
|
+
const P = Z, L = Z + $;
|
|
4005
|
+
_.current < P + 10 ? _.current = P + 10 : _.current > L - 10 && (_.current = L - 10);
|
|
4084
4006
|
}
|
|
4085
|
-
if (typeof
|
|
4086
|
-
|
|
4087
|
-
const
|
|
4088
|
-
startLeft:
|
|
4007
|
+
if (typeof _.current < "u") {
|
|
4008
|
+
S.current?.updateLeft(_.current);
|
|
4009
|
+
const P = Ct(_.current, {
|
|
4010
|
+
startLeft: v,
|
|
4089
4011
|
scale: T,
|
|
4090
4012
|
scaleWidth: w
|
|
4091
4013
|
});
|
|
4092
4014
|
s({
|
|
4093
|
-
time:
|
|
4094
|
-
}),
|
|
4015
|
+
time: P
|
|
4016
|
+
}), m && m(P);
|
|
4095
4017
|
}
|
|
4096
4018
|
return !1;
|
|
4097
|
-
}, e[24] =
|
|
4098
|
-
let
|
|
4099
|
-
e[31] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
4100
|
-
let Z;
|
|
4101
|
-
e[33] === Symbol.for("react.memo_cache_sentinel") ? (Z = /* @__PURE__ */ R.jsxs("div", { className: A, children: [
|
|
4102
|
-
/* @__PURE__ */ R.jsx("svg", { className: M, width: "8", height: "12", viewBox: "0 0 8 12", fill: "none", children: /* @__PURE__ */ R.jsx("path", { d: "M0 1C0 0.447715 0.447715 0 1 0H7C7.55228 0 8 0.447715 8 1V9.38197C8 9.76074 7.786 10.107 7.44721 10.2764L4.44721 11.7764C4.16569 11.9172 3.83431 11.9172 3.55279 11.7764L0.552786 10.2764C0.214002 10.107 0 9.76074 0 9.38197V1Z", fill: "currentColor" }) }),
|
|
4103
|
-
/* @__PURE__ */ R.jsx("div", { className: fe("cursor-area") })
|
|
4104
|
-
] }), e[33] = Z) : Z = e[33];
|
|
4019
|
+
}, e[24] = v, e[25] = m, e[26] = T, e[27] = l, e[28] = s, e[29] = w, e[30] = C) : C = e[30];
|
|
4020
|
+
let M, G;
|
|
4021
|
+
e[31] === Symbol.for("react.memo_cache_sentinel") ? (M = fe("cursor"), G = fe("cursor-top"), e[31] = M, e[32] = G) : (M = e[31], G = e[32]);
|
|
4105
4022
|
let ee;
|
|
4106
|
-
|
|
4023
|
+
e[33] === Symbol.for("react.memo_cache_sentinel") ? (ee = /* @__PURE__ */ R.jsxs("div", { className: M, children: [
|
|
4024
|
+
/* @__PURE__ */ R.jsx("svg", { className: G, width: "8", height: "12", viewBox: "0 0 8 12", fill: "none", children: /* @__PURE__ */ R.jsx("path", { d: "M0 1C0 0.447715 0.447715 0 1 0H7C7.55228 0 8 0.447715 8 1V9.38197C8 9.76074 7.786 10.107 7.44721 10.2764L4.44721 11.7764C4.16569 11.9172 3.83431 11.9172 3.55279 11.7764L0.552786 10.2764C0.214002 10.107 0 9.76074 0 9.38197V1Z", fill: "currentColor" }) }),
|
|
4025
|
+
/* @__PURE__ */ R.jsx("div", { className: fe("cursor-area") })
|
|
4026
|
+
] }), e[33] = ee) : ee = e[33];
|
|
4027
|
+
let re;
|
|
4028
|
+
return e[34] !== v || e[35] !== l || e[36] !== q || e[37] !== V || e[38] !== J || e[39] !== U || e[40] !== C ? (re = /* @__PURE__ */ R.jsx(Rr, { start: v, ref: S, parentRef: l, getBounds: q, autoScroll: !0, enableDragging: V, enableResizing: !1, onDragStart: J, onDragEnd: U, onDrag: C, children: ee }), e[34] = v, e[35] = l, e[36] = q, e[37] = V, e[38] = J, e[39] = U, e[40] = C, e[41] = re) : re = e[41], re;
|
|
4107
4029
|
};
|
|
4108
|
-
function
|
|
4109
|
-
const e =
|
|
4030
|
+
function Jn(n) {
|
|
4031
|
+
const e = Pe.c(9);
|
|
4110
4032
|
let t, r, s;
|
|
4111
4033
|
e[0] !== n ? ({
|
|
4112
4034
|
className: t,
|
|
@@ -4115,67 +4037,127 @@ function Zn(n) {
|
|
|
4115
4037
|
} = n, e[0] = n, e[1] = t, e[2] = r, e[3] = s) : (t = e[1], r = e[2], s = e[3]);
|
|
4116
4038
|
const o = s === void 0 ? "vertical" : s;
|
|
4117
4039
|
let i;
|
|
4118
|
-
e[4] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ R.jsx(
|
|
4040
|
+
e[4] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ R.jsx(Sr, { "data-slot": "scroll-area-thumb" }), e[4] = i) : i = e[4];
|
|
4119
4041
|
let c;
|
|
4120
|
-
return e[5] !== t || e[6] !== o || e[7] !== r ? (c = /* @__PURE__ */ R.jsx(
|
|
4042
|
+
return e[5] !== t || e[6] !== o || e[7] !== r ? (c = /* @__PURE__ */ R.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;
|
|
4043
|
+
}
|
|
4044
|
+
function ni(n) {
|
|
4045
|
+
const e = Pe.c(7), {
|
|
4046
|
+
scrollElementRef: t,
|
|
4047
|
+
scale: r,
|
|
4048
|
+
scaleWidth: s,
|
|
4049
|
+
startLeft: o,
|
|
4050
|
+
cursorTimeRef: i
|
|
4051
|
+
} = n, c = ne(null), a = ne(null);
|
|
4052
|
+
let u, l;
|
|
4053
|
+
e[0] !== i || e[1] !== r || e[2] !== s || e[3] !== t || e[4] !== o ? (u = () => {
|
|
4054
|
+
const h = t.current;
|
|
4055
|
+
if (c.current !== null && a.current !== null && h && (c.current !== r || a.current !== s)) {
|
|
4056
|
+
const d = h.scrollLeft, m = i.current, E = Ye(m, {
|
|
4057
|
+
startLeft: o,
|
|
4058
|
+
scale: c.current,
|
|
4059
|
+
scaleWidth: a.current
|
|
4060
|
+
}), S = Ye(m, {
|
|
4061
|
+
startLeft: o,
|
|
4062
|
+
scale: r,
|
|
4063
|
+
scaleWidth: s
|
|
4064
|
+
}), _ = E - d, p = S - _;
|
|
4065
|
+
h.scrollLeft = p;
|
|
4066
|
+
}
|
|
4067
|
+
c.current = r, a.current = s;
|
|
4068
|
+
}, l = [r, s, o, t, i], e[0] = i, e[1] = r, e[2] = s, e[3] = t, e[4] = o, e[5] = u, e[6] = l) : (u = e[5], l = e[6]), Nt(u, l);
|
|
4121
4069
|
}
|
|
4122
|
-
function
|
|
4070
|
+
function ii({
|
|
4123
4071
|
ref: n,
|
|
4124
4072
|
...e
|
|
4125
4073
|
}) {
|
|
4126
|
-
const t =
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
width: h,
|
|
4130
|
-
height: f
|
|
4074
|
+
const t = Br(e), r = ne(null), {
|
|
4075
|
+
width: s,
|
|
4076
|
+
height: o
|
|
4131
4077
|
} = ei({
|
|
4132
4078
|
elementRef: r
|
|
4133
|
-
}),
|
|
4134
|
-
|
|
4135
|
-
|
|
4136
|
-
|
|
4137
|
-
|
|
4079
|
+
}), i = t.minScaleCount ?? Math.max(Ir(t.editorData, {
|
|
4080
|
+
scale: t.scale,
|
|
4081
|
+
pad: 0.1
|
|
4082
|
+
}), Math.ceil((s - t.startLeft) / t.scaleWidth)), c = Math.min(t.maxScaleCount, i), [a, u] = Mt(null);
|
|
4083
|
+
Nt(() => {
|
|
4084
|
+
u(null);
|
|
4085
|
+
}, [c]);
|
|
4086
|
+
const l = a ?? c, h = (p) => {
|
|
4087
|
+
const g = Math.min(t.maxScaleCount, p);
|
|
4088
|
+
u(g);
|
|
4089
|
+
}, [d, m] = Mt(yn), E = ne(yn);
|
|
4090
|
+
ni({
|
|
4091
|
+
scrollElementRef: r,
|
|
4092
|
+
scale: t.scale,
|
|
4093
|
+
scaleWidth: t.scaleWidth,
|
|
4094
|
+
startLeft: t.startLeft,
|
|
4095
|
+
cursorTimeRef: E
|
|
4096
|
+
});
|
|
4097
|
+
const S = (p) => {
|
|
4098
|
+
t.onChange?.(p);
|
|
4099
|
+
}, _ = (p) => {
|
|
4138
4100
|
let {
|
|
4139
|
-
left:
|
|
4140
|
-
time:
|
|
4141
|
-
} =
|
|
4142
|
-
return typeof
|
|
4101
|
+
left: g,
|
|
4102
|
+
time: v
|
|
4103
|
+
} = p;
|
|
4104
|
+
return typeof v < "u" ? (m(v), E.current = v, !0) : typeof g < "u" ? (m(E.current = Ct(g, {
|
|
4143
4105
|
startLeft: t.startLeft,
|
|
4144
4106
|
scale: t.scale,
|
|
4145
4107
|
scaleWidth: t.scaleWidth
|
|
4146
4108
|
})), !0) : !1;
|
|
4147
4109
|
};
|
|
4148
|
-
return
|
|
4110
|
+
return Zn(n, () => ({
|
|
4149
4111
|
get target() {
|
|
4150
4112
|
return r.current;
|
|
4151
4113
|
},
|
|
4152
|
-
set time(
|
|
4153
|
-
|
|
4154
|
-
time:
|
|
4114
|
+
set time(p) {
|
|
4115
|
+
_({
|
|
4116
|
+
time: p
|
|
4155
4117
|
});
|
|
4156
4118
|
},
|
|
4157
4119
|
get time() {
|
|
4158
|
-
return
|
|
4120
|
+
return E.current;
|
|
4121
|
+
},
|
|
4122
|
+
getTime() {
|
|
4123
|
+
return E.current;
|
|
4124
|
+
},
|
|
4125
|
+
setTime(p) {
|
|
4126
|
+
_({
|
|
4127
|
+
time: p
|
|
4128
|
+
});
|
|
4129
|
+
},
|
|
4130
|
+
setScrollLeft: (p) => {
|
|
4131
|
+
r.current && (r.current.scrollLeft = p);
|
|
4132
|
+
},
|
|
4133
|
+
setScrollTop: (p) => {
|
|
4134
|
+
r.current && (r.current.scrollTop = p);
|
|
4135
|
+
},
|
|
4136
|
+
get scrollLeft() {
|
|
4137
|
+
return r.current ? r.current.scrollLeft : 0;
|
|
4138
|
+
},
|
|
4139
|
+
get scrollTop() {
|
|
4140
|
+
return r.current ? r.current.scrollTop : 0;
|
|
4159
4141
|
},
|
|
4160
|
-
|
|
4161
|
-
r.current && (r.current.scrollLeft =
|
|
4142
|
+
set scrollLeft(p) {
|
|
4143
|
+
r.current && (r.current.scrollLeft = p);
|
|
4162
4144
|
},
|
|
4163
|
-
|
|
4164
|
-
r.current && (r.current.scrollTop =
|
|
4145
|
+
set scrollTop(p) {
|
|
4146
|
+
r.current && (r.current.scrollTop = p);
|
|
4165
4147
|
}
|
|
4166
|
-
})), /* @__PURE__ */ R.jsxs(go, { style: t.style, className: `${
|
|
4167
|
-
/* @__PURE__ */ R.jsxs(vo, { "data-slot": "scroll-area-viewport", ref: r, onScroll: (
|
|
4168
|
-
t.onScroll?.(
|
|
4148
|
+
})), /* @__PURE__ */ R.jsxs(go, { style: t.style, className: `${dn} ${t.disableDrag ? dn + "-disable" : ""}`, "data-slot": "scroll-area", children: [
|
|
4149
|
+
/* @__PURE__ */ R.jsxs(vo, { "data-slot": "scroll-area-viewport", ref: r, onScroll: (p) => {
|
|
4150
|
+
t.onScroll?.(p.currentTarget);
|
|
4169
4151
|
}, children: [
|
|
4170
|
-
/* @__PURE__ */ R.jsx(Vo, { ...t, setCursor:
|
|
4171
|
-
/* @__PURE__ */ R.jsx(Fo, { ...t, scrollElementRef: r, timelineWidth:
|
|
4172
|
-
!t.hideCursor && /* @__PURE__ */ R.jsx(ti, { ...t, timelineWidth:
|
|
4152
|
+
/* @__PURE__ */ R.jsx(Vo, { ...t, setCursor: _, scaleCount: l, scrollElementRef: r }),
|
|
4153
|
+
/* @__PURE__ */ R.jsx(Fo, { ...t, scrollElementRef: r, timelineWidth: s, timelineHeight: o, disableDrag: t.disableDrag, editorData: t.editorData, cursorTime: d, scaleCount: l, setScaleCount: h, setEditorData: S }),
|
|
4154
|
+
!t.hideCursor && /* @__PURE__ */ R.jsx(ti, { ...t, timelineWidth: s, height: o, scaleCount: l, setScaleCount: h, setCursor: _, cursorTime: d, editorData: t.editorData, scrollElementRef: r })
|
|
4173
4155
|
] }),
|
|
4174
|
-
/* @__PURE__ */ R.jsx(
|
|
4175
|
-
/* @__PURE__ */ R.jsx(
|
|
4156
|
+
/* @__PURE__ */ R.jsx(Jn, { orientation: "horizontal" }),
|
|
4157
|
+
/* @__PURE__ */ R.jsx(Jn, { orientation: "vertical" }),
|
|
4176
4158
|
/* @__PURE__ */ R.jsx(bo, {})
|
|
4177
4159
|
] });
|
|
4178
4160
|
}
|
|
4179
4161
|
export {
|
|
4180
|
-
|
|
4162
|
+
ii as Timeline
|
|
4181
4163
|
};
|