@cyca/react-timeline-editor 0.2.3-alpha.3 → 0.2.3-alpha.6

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.
@@ -1,11 +1,11 @@
1
1
  import * as p from "react";
2
- import nt, { useRef as ie, useEffect as et, useEffectEvent as Pr, useImperativeHandle as Jn, useState as Tt, useMemo as Dr, useCallback as Zn, useLayoutEffect as pn, createElement as Lr } from "react";
3
- import { flushSync as Or } from "react-dom";
2
+ import nt, { useRef as ee, useEffect as et, useEffectEvent as Lr, useImperativeHandle as Qn, useState as At, useMemo as Or, useCallback as er, useLayoutEffect as gn, createElement as Mr } from "react";
3
+ import { flushSync as Nr } from "react-dom";
4
4
  var Wt = { exports: {} }, Pt = {};
5
- var Sn;
6
- function Mr() {
7
- if (Sn) return Pt;
8
- Sn = 1;
5
+ var yn;
6
+ function Ir() {
7
+ if (yn) return Pt;
8
+ yn = 1;
9
9
  var n = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
10
10
  function t(r, s, o) {
11
11
  var i = null;
@@ -25,47 +25,47 @@ function Mr() {
25
25
  return Pt.Fragment = e, Pt.jsx = t, Pt.jsxs = t, Pt;
26
26
  }
27
27
  var Dt = {};
28
- var yn;
29
- function Nr() {
30
- return yn || (yn = 1, process.env.NODE_ENV !== "production" && (function() {
28
+ var En;
29
+ function kr() {
30
+ return En || (En = 1, process.env.NODE_ENV !== "production" && (function() {
31
31
  function n(d) {
32
32
  if (d == null) return null;
33
33
  if (typeof d == "function")
34
- return d.$$typeof === O ? null : d.displayName || d.name || null;
34
+ return d.$$typeof === L ? null : d.displayName || d.name || null;
35
35
  if (typeof d == "string") return d;
36
36
  switch (d) {
37
- case g:
37
+ case v:
38
38
  return "Fragment";
39
39
  case _:
40
40
  return "Profiler";
41
- case S:
41
+ case w:
42
42
  return "StrictMode";
43
43
  case x:
44
44
  return "Suspense";
45
- case R:
45
+ case C:
46
46
  return "SuspenseList";
47
- case A:
47
+ case D:
48
48
  return "Activity";
49
49
  }
50
50
  if (typeof d == "object")
51
51
  switch (typeof d.tag == "number" && console.error(
52
52
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
53
53
  ), d.$$typeof) {
54
- case v:
54
+ case b:
55
55
  return "Portal";
56
56
  case y:
57
57
  return d.displayName || "Context";
58
- case w:
58
+ case S:
59
59
  return (d._context.displayName || "Context") + ".Consumer";
60
- case C:
61
- var T = d.render;
62
- return d = d.displayName, d || (d = T.displayName || T.name || "", d = d !== "" ? "ForwardRef(" + d + ")" : "ForwardRef"), d;
63
- case k:
64
- return T = d.displayName || null, T !== null ? T : n(d.type) || "Memo";
65
- case L:
66
- T = d._payload, d = d._init;
60
+ case T:
61
+ var A = d.render;
62
+ return d = d.displayName, d || (d = A.displayName || A.name || "", d = d !== "" ? "ForwardRef(" + d + ")" : "ForwardRef"), d;
63
+ case P:
64
+ return A = d.displayName || null, A !== null ? A : n(d.type) || "Memo";
65
+ case E:
66
+ A = d._payload, d = d._init;
67
67
  try {
68
- return n(d(T));
68
+ return n(d(A));
69
69
  } catch {
70
70
  }
71
71
  }
@@ -77,74 +77,74 @@ function Nr() {
77
77
  function t(d) {
78
78
  try {
79
79
  e(d);
80
- var T = !1;
80
+ var A = !1;
81
81
  } catch {
82
- T = !0;
82
+ A = !0;
83
83
  }
84
- if (T) {
85
- T = console;
86
- var F = T.error, H = typeof Symbol == "function" && Symbol.toStringTag && d[Symbol.toStringTag] || d.constructor.name || "Object";
87
- return F.call(
88
- T,
84
+ if (A) {
85
+ A = console;
86
+ var V = A.error, H = typeof Symbol == "function" && Symbol.toStringTag && d[Symbol.toStringTag] || d.constructor.name || "Object";
87
+ return V.call(
88
+ A,
89
89
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
90
90
  H
91
91
  ), e(d);
92
92
  }
93
93
  }
94
94
  function r(d) {
95
- if (d === g) return "<>";
96
- if (typeof d == "object" && d !== null && d.$$typeof === L)
95
+ if (d === v) return "<>";
96
+ if (typeof d == "object" && d !== null && d.$$typeof === E)
97
97
  return "<...>";
98
98
  try {
99
- var T = n(d);
100
- return T ? "<" + T + ">" : "<...>";
99
+ var A = n(d);
100
+ return A ? "<" + A + ">" : "<...>";
101
101
  } catch {
102
102
  return "<...>";
103
103
  }
104
104
  }
105
105
  function s() {
106
- var d = $.A;
106
+ var d = k.A;
107
107
  return d === null ? null : d.getOwner();
108
108
  }
109
109
  function o() {
110
110
  return Error("react-stack-top-frame");
111
111
  }
112
112
  function i(d) {
113
- if (z.call(d, "key")) {
114
- var T = Object.getOwnPropertyDescriptor(d, "key").get;
115
- if (T && T.isReactWarning) return !1;
113
+ if (F.call(d, "key")) {
114
+ var A = Object.getOwnPropertyDescriptor(d, "key").get;
115
+ if (A && A.isReactWarning) return !1;
116
116
  }
117
117
  return d.key !== void 0;
118
118
  }
119
- function c(d, T) {
120
- function F() {
121
- N || (N = !0, console.error(
119
+ function c(d, A) {
120
+ function V() {
121
+ I || (I = !0, console.error(
122
122
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
123
- T
123
+ A
124
124
  ));
125
125
  }
126
- F.isReactWarning = !0, Object.defineProperty(d, "key", {
127
- get: F,
126
+ V.isReactWarning = !0, Object.defineProperty(d, "key", {
127
+ get: V,
128
128
  configurable: !0
129
129
  });
130
130
  }
131
- function a() {
131
+ function l() {
132
132
  var d = n(this.type);
133
133
  return G[d] || (G[d] = !0, console.error(
134
134
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
135
135
  )), d = this.props.ref, d !== void 0 ? d : null;
136
136
  }
137
- function u(d, T, F, H, q, B) {
138
- var V = F.ref;
137
+ function u(d, A, V, H, q, B) {
138
+ var U = V.ref;
139
139
  return d = {
140
- $$typeof: b,
140
+ $$typeof: g,
141
141
  type: d,
142
- key: T,
143
- props: F,
142
+ key: A,
143
+ props: V,
144
144
  _owner: H
145
- }, (V !== void 0 ? V : null) !== null ? Object.defineProperty(d, "ref", {
145
+ }, (U !== void 0 ? U : null) !== null ? Object.defineProperty(d, "ref", {
146
146
  enumerable: !1,
147
- get: a
147
+ get: l
148
148
  }) : Object.defineProperty(d, "ref", { enumerable: !1, value: null }), d._store = {}, Object.defineProperty(d._store, "validated", {
149
149
  configurable: !1,
150
150
  enumerable: !1,
@@ -167,25 +167,25 @@ function Nr() {
167
167
  value: B
168
168
  }), Object.freeze && (Object.freeze(d.props), Object.freeze(d)), d;
169
169
  }
170
- function l(d, T, F, H, q, B) {
171
- var V = T.children;
172
- if (V !== void 0)
170
+ function a(d, A, V, H, q, B) {
171
+ var U = A.children;
172
+ if (U !== void 0)
173
173
  if (H)
174
- if (K(V)) {
175
- for (H = 0; H < V.length; H++)
176
- h(V[H]);
177
- Object.freeze && Object.freeze(V);
174
+ if (K(U)) {
175
+ for (H = 0; H < U.length; H++)
176
+ h(U[H]);
177
+ Object.freeze && Object.freeze(U);
178
178
  } else
179
179
  console.error(
180
180
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
181
181
  );
182
- else h(V);
183
- if (z.call(T, "key")) {
184
- V = n(d);
185
- var D = Object.keys(T).filter(function(U) {
186
- return U !== "key";
182
+ else h(U);
183
+ if (F.call(A, "key")) {
184
+ U = n(d);
185
+ var M = Object.keys(A).filter(function($) {
186
+ return $ !== "key";
187
187
  });
188
- H = 0 < D.length ? "{key: someKey, " + D.join(": ..., ") + ": ...}" : "{key: someKey}", me[V + H] || (D = 0 < D.length ? "{" + D.join(": ..., ") + ": ...}" : "{}", console.error(
188
+ H = 0 < M.length ? "{key: someKey, " + M.join(": ..., ") + ": ...}" : "{key: someKey}", me[U + H] || (M = 0 < M.length ? "{" + M.join(": ..., ") + ": ...}" : "{}", console.error(
189
189
  `A props object containing a "key" prop is being spread into JSX:
190
190
  let props = %s;
191
191
  <%s {...props} />
@@ -193,35 +193,35 @@ React keys must be passed directly to JSX without using spread:
193
193
  let props = %s;
194
194
  <%s key={someKey} {...props} />`,
195
195
  H,
196
- V,
197
- D,
198
- V
199
- ), me[V + H] = !0);
196
+ U,
197
+ M,
198
+ U
199
+ ), me[U + H] = !0);
200
200
  }
201
- if (V = null, F !== void 0 && (t(F), V = "" + F), i(T) && (t(T.key), V = "" + T.key), "key" in T) {
202
- F = {};
203
- for (var M in T)
204
- M !== "key" && (F[M] = T[M]);
205
- } else F = T;
206
- return V && c(
207
- F,
201
+ if (U = null, V !== void 0 && (t(V), U = "" + V), i(A) && (t(A.key), U = "" + A.key), "key" in A) {
202
+ V = {};
203
+ for (var N in A)
204
+ N !== "key" && (V[N] = A[N]);
205
+ } else V = A;
206
+ return U && c(
207
+ V,
208
208
  typeof d == "function" ? d.displayName || d.name || "Unknown" : d
209
209
  ), u(
210
210
  d,
211
+ U,
211
212
  V,
212
- F,
213
213
  s(),
214
214
  q,
215
215
  B
216
216
  );
217
217
  }
218
218
  function h(d) {
219
- f(d) ? d._store && (d._store.validated = 1) : typeof d == "object" && d !== null && d.$$typeof === L && (d._payload.status === "fulfilled" ? f(d._payload.value) && d._payload.value._store && (d._payload.value._store.validated = 1) : d._store && (d._store.validated = 1));
219
+ f(d) ? d._store && (d._store.validated = 1) : typeof d == "object" && d !== null && d.$$typeof === E && (d._payload.status === "fulfilled" ? f(d._payload.value) && d._payload.value._store && (d._payload.value._store.validated = 1) : d._store && (d._store.validated = 1));
220
220
  }
221
221
  function f(d) {
222
- return typeof d == "object" && d !== null && d.$$typeof === b;
222
+ return typeof d == "object" && d !== null && d.$$typeof === g;
223
223
  }
224
- var m = nt, b = Symbol.for("react.transitional.element"), v = Symbol.for("react.portal"), g = Symbol.for("react.fragment"), S = Symbol.for("react.strict_mode"), _ = Symbol.for("react.profiler"), w = Symbol.for("react.consumer"), y = Symbol.for("react.context"), C = Symbol.for("react.forward_ref"), x = Symbol.for("react.suspense"), R = Symbol.for("react.suspense_list"), k = Symbol.for("react.memo"), L = Symbol.for("react.lazy"), A = Symbol.for("react.activity"), O = Symbol.for("react.client.reference"), $ = m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, z = Object.prototype.hasOwnProperty, K = Array.isArray, P = console.createTask ? console.createTask : function() {
224
+ var m = nt, g = Symbol.for("react.transitional.element"), b = Symbol.for("react.portal"), v = Symbol.for("react.fragment"), w = Symbol.for("react.strict_mode"), _ = Symbol.for("react.profiler"), S = Symbol.for("react.consumer"), y = Symbol.for("react.context"), T = Symbol.for("react.forward_ref"), x = Symbol.for("react.suspense"), C = Symbol.for("react.suspense_list"), P = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), D = Symbol.for("react.activity"), L = Symbol.for("react.client.reference"), k = m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, F = Object.prototype.hasOwnProperty, K = Array.isArray, O = console.createTask ? console.createTask : function() {
225
225
  return null;
226
226
  };
227
227
  m = {
@@ -229,53 +229,53 @@ React keys must be passed directly to JSX without using spread:
229
229
  return d();
230
230
  }
231
231
  };
232
- var N, G = {}, ue = m.react_stack_bottom_frame.bind(
232
+ var I, G = {}, ue = m.react_stack_bottom_frame.bind(
233
233
  m,
234
234
  o
235
- )(), fe = P(r(o)), me = {};
236
- Dt.Fragment = g, Dt.jsx = function(d, T, F) {
237
- var H = 1e4 > $.recentlyCreatedOwnerStacks++;
238
- return l(
235
+ )(), fe = O(r(o)), me = {};
236
+ Dt.Fragment = v, Dt.jsx = function(d, A, V) {
237
+ var H = 1e4 > k.recentlyCreatedOwnerStacks++;
238
+ return a(
239
239
  d,
240
- T,
241
- F,
240
+ A,
241
+ V,
242
242
  !1,
243
243
  H ? Error("react-stack-top-frame") : ue,
244
- H ? P(r(d)) : fe
244
+ H ? O(r(d)) : fe
245
245
  );
246
- }, Dt.jsxs = function(d, T, F) {
247
- var H = 1e4 > $.recentlyCreatedOwnerStacks++;
248
- return l(
246
+ }, Dt.jsxs = function(d, A, V) {
247
+ var H = 1e4 > k.recentlyCreatedOwnerStacks++;
248
+ return a(
249
249
  d,
250
- T,
251
- F,
250
+ A,
251
+ V,
252
252
  !0,
253
253
  H ? Error("react-stack-top-frame") : ue,
254
- H ? P(r(d)) : fe
254
+ H ? O(r(d)) : fe
255
255
  );
256
256
  };
257
257
  })()), Dt;
258
258
  }
259
- var En;
260
- function Ir() {
261
- return En || (En = 1, process.env.NODE_ENV === "production" ? Wt.exports = Mr() : Wt.exports = Nr()), Wt.exports;
259
+ var Rn;
260
+ function Wr() {
261
+ return Rn || (Rn = 1, process.env.NODE_ENV === "production" ? Wt.exports = Ir() : Wt.exports = kr()), Wt.exports;
262
262
  }
263
- var E = Ir();
264
- const ln = "timeline-editor", kr = 0, Yt = 1, Qn = 10, Xt = 160, Jt = 20, un = 1, fn = 8, Rn = 32, dn = 20, er = 5, rn = {
263
+ var R = Wr();
264
+ const un = "timeline-editor", xn = 0, Yt = 1, tr = 10, Xt = 160, Jt = 20, fn = 1, dn = 8, Cn = 32, hn = 20, nr = 5, rn = {
265
265
  trace: 0,
266
266
  debug: 1,
267
267
  info: 2,
268
268
  warn: 3,
269
269
  error: 4,
270
270
  silent: 5
271
- }, Wr = [
271
+ }, jr = [
272
272
  "trace",
273
273
  "debug",
274
274
  "info",
275
275
  "warn",
276
276
  "error"
277
277
  ];
278
- var jr = class tr {
278
+ var zr = class rr {
279
279
  s;
280
280
  ls = /* @__PURE__ */ new Map();
281
281
  lvl;
@@ -295,7 +295,7 @@ var jr = class tr {
295
295
  noop = () => {
296
296
  };
297
297
  bindMethods() {
298
- Wr.forEach((e) => {
298
+ jr.forEach((e) => {
299
299
  const t = this.e.bind(this.c, e, this.n);
300
300
  Object.defineProperty(this, e, {
301
301
  get: () => rn[e] >= rn[this.currentLevel()] ? t : this.noop,
@@ -323,8 +323,8 @@ var jr = class tr {
323
323
  getLogger(e) {
324
324
  if (!e) throw new Error("Logger name required");
325
325
  if (!this.ls.has(e)) {
326
- const t = new tr(this.s, this.e, e, this.r || this);
327
- this.ls.set(e, nr(t));
326
+ const t = new rr(this.s, this.e, e, this.r || this);
327
+ this.ls.set(e, sr(t));
328
328
  }
329
329
  return this.ls.get(e);
330
330
  }
@@ -338,14 +338,14 @@ var jr = class tr {
338
338
  this.c = e, this.bindMethods();
339
339
  }
340
340
  };
341
- function nr(n) {
341
+ function sr(n) {
342
342
  return new Proxy(n, { get(e, t, r) {
343
343
  if (t in e) return Reflect.get(e, t, r);
344
344
  const s = e.c[t];
345
345
  return typeof s == "function" ? s.bind(e.c) : s;
346
346
  } });
347
347
  }
348
- var zr = class {
348
+ var Fr = class {
349
349
  get(n) {
350
350
  return localStorage.getItem(n);
351
351
  }
@@ -356,13 +356,13 @@ var zr = class {
356
356
  localStorage.removeItem(n);
357
357
  }
358
358
  };
359
- const Fr = {
359
+ const Vr = {
360
360
  trace: "#95bdb7",
361
361
  debug: "#ad95b8",
362
362
  info: "#b6bd73",
363
363
  warn: "#88a1bb",
364
364
  error: "#bf6c69"
365
- }, xn = {
365
+ }, An = {
366
366
  info: "⚡️",
367
367
  success: "✔",
368
368
  warn: "▲",
@@ -370,28 +370,28 @@ const Fr = {
370
370
  log: "●",
371
371
  trace: "◔",
372
372
  debug: "◌"
373
- }, Vr = { bind(n, e, t) {
374
- const r = t ? `${xn[e]} ${String(t)}:` : `${xn[e]}`;
375
- return (n[e] || n.log).bind(n, `%c${r}%c`, `color: ${Fr[e]}; font-weight: bold;`, "color: inherit");
376
- } }, Ze = nr(new jr(new zr(), Vr));
377
- function Ur(n) {
373
+ }, Ur = { bind(n, e, t) {
374
+ const r = t ? `${An[e]} ${String(t)}:` : `${An[e]}`;
375
+ return (n[e] || n.log).bind(n, `%c${r}%c`, `color: ${Vr[e]}; font-weight: bold;`, "color: inherit");
376
+ } }, Ze = sr(new zr(new Fr(), Ur));
377
+ function $r(n) {
378
378
  let {
379
379
  editorData: e = [],
380
380
  effects: t = {},
381
381
  scale: r = Yt,
382
- scaleSplitCount: s = Qn,
382
+ scaleSplitCount: s = tr,
383
383
  scaleWidth: o = Xt,
384
384
  startLeft: i = Jt,
385
- minScaleCount: c = dn,
386
- maxScaleCount: a = 1 / 0,
387
- rowHeight: u = Rn
385
+ minScaleCount: c = hn,
386
+ maxScaleCount: l = 1 / 0,
387
+ rowHeight: u = Cn
388
388
  } = n;
389
- r <= 0 && (Ze.error("Error: scale must be greater than 0!"), r = Yt), s <= 0 && (Ze.warn("Warning: scaleSplitCount cannot be less than 1!"), s = 1), o <= 0 && (Ze.warn("Warning: scaleWidth must be greater than 0!"), o = Xt), i < 0 && (Ze.warn("Warning: startLeft cannot be less than 0!"), i = 0), c < 1 && (Ze.warn("Warning: minScaleCount must be greater than 1!"), c = dn), c = parseInt(c + ""), a < c && (Ze.warn("Warning: maxScaleCount cannot be less than minScaleCount!"), a = c), a = a === 1 / 0 ? 1 / 0 : parseInt(a + ""), u <= 0 && (Ze.warn("Warning: rowHeight must be greater than 0!"), u = Rn);
390
- const l = {
389
+ r <= 0 && (Ze.error("Error: scale must be greater than 0!"), r = Yt), s <= 0 && (Ze.warn("Warning: scaleSplitCount cannot be less than 1!"), s = 1), o <= 0 && (Ze.warn("Warning: scaleWidth must be greater than 0!"), o = Xt), i < 0 && (Ze.warn("Warning: startLeft cannot be less than 0!"), i = 0), c < 1 && (Ze.warn("Warning: minScaleCount must be greater than 1!"), c = hn), c = parseInt(c + ""), l < c && (Ze.warn("Warning: maxScaleCount cannot be less than minScaleCount!"), l = c), l = l === 1 / 0 ? 1 / 0 : parseInt(l + ""), u <= 0 && (Ze.warn("Warning: rowHeight must be greater than 0!"), u = Cn);
390
+ const a = {
391
391
  ...n
392
392
  };
393
- return delete l.style, {
394
- ...l,
393
+ return delete a.style, {
394
+ ...a,
395
395
  editorData: e,
396
396
  effects: t,
397
397
  scale: r,
@@ -399,7 +399,7 @@ function Ur(n) {
399
399
  scaleWidth: o,
400
400
  startLeft: i,
401
401
  minScaleCount: c,
402
- maxScaleCount: a,
402
+ maxScaleCount: l,
403
403
  rowHeight: u
404
404
  };
405
405
  }
@@ -429,7 +429,7 @@ function Lt(n, e) {
429
429
  end: o
430
430
  };
431
431
  }
432
- function gn(n, e) {
432
+ function vn(n, e) {
433
433
  const {
434
434
  start: t,
435
435
  end: r
@@ -439,41 +439,41 @@ function gn(n, e) {
439
439
  width: o
440
440
  };
441
441
  }
442
- function $r(n, e) {
442
+ function Hr(n, e) {
443
443
  let t = 0;
444
444
  return n.forEach((s) => {
445
445
  s.actions.forEach((o) => {
446
446
  t = Math.max(t, o.end);
447
447
  });
448
- }), Math.ceil(t / e.scale) + er;
448
+ }), Math.ceil(t / e.scale) + nr;
449
449
  }
450
- function Hr(n, e) {
450
+ function Br(n, e) {
451
451
  const {
452
452
  startLeft: t,
453
453
  scaleWidth: r
454
454
  } = e, s = Math.ceil((n - t) / r);
455
- return Math.max(s + er, e.scaleCount);
455
+ return Math.max(s + nr, e.scaleCount);
456
456
  }
457
- function Br(n, e) {
457
+ function Yr(n, e) {
458
458
  const t = [];
459
459
  return n.forEach((r) => {
460
460
  t.push(je(r.start, e)), t.push(je(r.end, e));
461
461
  }), t;
462
462
  }
463
463
  var jt = { exports: {} }, sn = {};
464
- var Cn;
465
- function Yr() {
466
- if (Cn) return sn;
467
- Cn = 1;
464
+ var Tn;
465
+ function Xr() {
466
+ if (Tn) return sn;
467
+ Tn = 1;
468
468
  var n = nt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
469
469
  return sn.c = function(e) {
470
470
  return n.H.useMemoCache(e);
471
471
  }, sn;
472
472
  }
473
473
  var on = {};
474
- var Tn;
475
- function Xr() {
476
- return Tn || (Tn = 1, process.env.NODE_ENV !== "production" && (function() {
474
+ var Pn;
475
+ function Gr() {
476
+ return Pn || (Pn = 1, process.env.NODE_ENV !== "production" && (function() {
477
477
  var n = nt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
478
478
  on.c = function(e) {
479
479
  var t = n.H;
@@ -487,12 +487,12 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
487
487
  };
488
488
  })()), on;
489
489
  }
490
- var An;
491
- function Gr() {
492
- return An || (An = 1, process.env.NODE_ENV === "production" ? jt.exports = Yr() : jt.exports = Xr()), jt.exports;
490
+ var Dn;
491
+ function Kr() {
492
+ return Dn || (Dn = 1, process.env.NODE_ENV === "production" ? jt.exports = Xr() : jt.exports = Gr()), jt.exports;
493
493
  }
494
- var ze = Gr();
495
- function Kr(n) {
494
+ var ze = Kr();
495
+ function qr(n) {
496
496
  for (var e = [], t = 1; t < arguments.length; t++)
497
497
  e[t - 1] = arguments[t];
498
498
  return e.map(function(r) {
@@ -502,9 +502,9 @@ function Kr(n) {
502
502
  }).join(" ");
503
503
  }
504
504
  function de(...n) {
505
- return Kr(`${ln}-`, ...n);
505
+ return qr(`${un}-`, ...n);
506
506
  }
507
- const qr = (n) => {
507
+ const Jr = (n) => {
508
508
  const e = ze.c(11), {
509
509
  isMoving: t,
510
510
  movePositions: r,
@@ -512,79 +512,79 @@ const qr = (n) => {
512
512
  } = n;
513
513
  let o, i;
514
514
  if (e[0] !== t || e[1] !== r || e[2] !== s) {
515
- const a = r === void 0 ? [] : r;
515
+ const l = r === void 0 ? [] : r;
516
516
  let u;
517
517
  e[5] !== s ? (u = s === void 0 ? [] : s, e[5] = s, e[6] = u) : u = e[6];
518
- const l = u;
519
- e[7] === Symbol.for("react.memo_cache_sentinel") ? (o = de("drag-line-container"), e[7] = o) : o = e[7], i = t && a.filter((h) => l.includes(h)).map(Jr), e[0] = t, e[1] = r, e[2] = s, e[3] = o, e[4] = i;
518
+ const a = u;
519
+ e[7] === Symbol.for("react.memo_cache_sentinel") ? (o = de("drag-line-container"), e[7] = o) : o = e[7], i = t && l.filter((h) => a.includes(h)).map(Zr), e[0] = t, e[1] = r, e[2] = s, e[3] = o, e[4] = i;
520
520
  } else
521
521
  o = e[3], i = e[4];
522
522
  let c;
523
- return e[8] !== o || e[9] !== i ? (c = /* @__PURE__ */ E.jsx("div", { className: o, children: i }), e[8] = o, e[9] = i, e[10] = c) : c = e[10], c;
523
+ return e[8] !== o || e[9] !== i ? (c = /* @__PURE__ */ R.jsx("div", { className: o, children: i }), e[8] = o, e[9] = i, e[10] = c) : c = e[10], c;
524
524
  };
525
- function Jr(n, e) {
526
- return /* @__PURE__ */ E.jsx("div", { className: de("drag-line"), style: {
525
+ function Zr(n, e) {
526
+ return /* @__PURE__ */ R.jsx("div", { className: de("drag-line"), style: {
527
527
  left: n
528
528
  } }, e);
529
529
  }
530
- const zt = 1, Pn = 10, Dn = 10;
531
- function Zr(n) {
532
- const e = ze.c(7), t = ie(Number.MIN_SAFE_INTEGER), r = ie(Number.MAX_SAFE_INTEGER), s = ie(zt), o = ie(void 0);
530
+ const zt = 1, Ln = 10, On = 10;
531
+ function Qr(n) {
532
+ const e = ze.c(7), t = ee(Number.MIN_SAFE_INTEGER), r = ee(Number.MAX_SAFE_INTEGER), s = ee(zt), o = ee(void 0);
533
533
  let i;
534
534
  e[0] !== n ? (i = () => {
535
535
  if (n?.current) {
536
536
  const {
537
- left: v,
538
- width: g
537
+ left: b,
538
+ width: v
539
539
  } = n.current.getBoundingClientRect();
540
- t.current = v, r.current = v + g;
540
+ t.current = b, r.current = b + v;
541
541
  }
542
542
  }, e[0] = n, e[1] = i) : i = e[1];
543
543
  const c = i;
544
- let a;
545
- e[2] === Symbol.for("react.memo_cache_sentinel") ? (a = (v, g) => {
546
- if (v.clientX >= r.current || v.clientX <= t.current) {
544
+ let l;
545
+ e[2] === Symbol.for("react.memo_cache_sentinel") ? (l = (b, v) => {
546
+ if (b.clientX >= r.current || b.clientX <= t.current) {
547
547
  o.current !== void 0 && cancelAnimationFrame(o.current);
548
- const S = Math.abs(v.clientX >= r.current ? v.clientX - r.current : v.clientX - t.current);
549
- s.current = Math.min(Number((S / Dn).toFixed(0)) * zt, Pn);
550
- const w = (v.clientX >= r.current ? 1 : -1) * s.current, y = () => {
551
- g && g(w), o.current = requestAnimationFrame(y);
548
+ const w = Math.abs(b.clientX >= r.current ? b.clientX - r.current : b.clientX - t.current);
549
+ s.current = Math.min(Number((w / On).toFixed(0)) * zt, Ln);
550
+ const S = (b.clientX >= r.current ? 1 : -1) * s.current, y = () => {
551
+ v && v(S), o.current = requestAnimationFrame(y);
552
552
  };
553
553
  return o.current = requestAnimationFrame(y), !1;
554
554
  } else
555
555
  o.current !== void 0 && cancelAnimationFrame(o.current);
556
556
  return !0;
557
- }, e[2] = a) : a = e[2];
558
- const u = a;
559
- let l;
560
- e[3] === Symbol.for("react.memo_cache_sentinel") ? (l = (v, g, S) => {
561
- if (v.clientX >= r.current || v.clientX < t.current) {
557
+ }, e[2] = l) : l = e[2];
558
+ const u = l;
559
+ let a;
560
+ e[3] === Symbol.for("react.memo_cache_sentinel") ? (a = (b, v, w) => {
561
+ if (b.clientX >= r.current || b.clientX < t.current) {
562
562
  o.current !== void 0 && cancelAnimationFrame(o.current);
563
- const _ = Math.abs(v.clientX >= r.current ? v.clientX - r.current : v.clientX - t.current);
564
- s.current = Math.min(Number((_ / Dn).toFixed(0)) * zt, Pn);
565
- const y = (v.clientX >= r.current ? 1 : -1) * s.current, C = () => {
566
- S && S(y), o.current = requestAnimationFrame(C);
563
+ const _ = Math.abs(b.clientX >= r.current ? b.clientX - r.current : b.clientX - t.current);
564
+ s.current = Math.min(Number((_ / On).toFixed(0)) * zt, Ln);
565
+ const y = (b.clientX >= r.current ? 1 : -1) * s.current, T = () => {
566
+ w && w(y), o.current = requestAnimationFrame(T);
567
567
  };
568
- return o.current = requestAnimationFrame(C), !1;
568
+ return o.current = requestAnimationFrame(T), !1;
569
569
  } else
570
570
  o.current !== void 0 && cancelAnimationFrame(o.current);
571
571
  return !0;
572
- }, e[3] = l) : l = e[3];
573
- const h = l;
572
+ }, e[3] = a) : a = e[3];
573
+ const h = a;
574
574
  let f;
575
575
  e[4] === Symbol.for("react.memo_cache_sentinel") ? (f = () => {
576
576
  t.current = Number.MIN_SAFE_INTEGER, r.current = Number.MAX_SAFE_INTEGER, s.current = zt, o.current !== void 0 && cancelAnimationFrame(o.current);
577
577
  }, e[4] = f) : f = e[4];
578
578
  const m = f;
579
- let b;
580
- return e[5] !== c ? (b = {
579
+ let g;
580
+ return e[5] !== c ? (g = {
581
581
  initAutoScroll: c,
582
582
  dealDragAutoScroll: u,
583
583
  dealResizeAutoScroll: h,
584
584
  stopAutoScroll: m
585
- }, e[5] = c, e[6] = b) : b = e[6], b;
585
+ }, e[5] = c, e[6] = g) : g = e[6], g;
586
586
  }
587
- function Qr(n, e, t) {
587
+ function es(n, e, t) {
588
588
  return Math.max(e, Math.min(n, t));
589
589
  }
590
590
  const he = {
@@ -604,17 +604,17 @@ const he = {
604
604
  n[0] -= e[0], n[1] -= e[1];
605
605
  }
606
606
  };
607
- function Ln(n, e, t) {
607
+ function Mn(n, e, t) {
608
608
  return e === 0 || Math.abs(e) === 1 / 0 ? Math.pow(n, t * 5) : n * e * t / (e + t * n);
609
609
  }
610
- function On(n, e, t, r = 0.15) {
611
- return r === 0 ? Qr(n, e, t) : n < e ? -Ln(e - n, t - e, r) + e : n > t ? +Ln(n - t, t - e, r) + t : n;
610
+ function Nn(n, e, t, r = 0.15) {
611
+ return r === 0 ? es(n, e, t) : n < e ? -Mn(e - n, t - e, r) + e : n > t ? +Mn(n - t, t - e, r) + t : n;
612
612
  }
613
- function es(n, [e, t], [r, s]) {
614
- const [[o, i], [c, a]] = n;
615
- return [On(e, o, i, r), On(t, c, a, s)];
613
+ function ts(n, [e, t], [r, s]) {
614
+ const [[o, i], [c, l]] = n;
615
+ return [Nn(e, o, i, r), Nn(t, c, l, s)];
616
616
  }
617
- function ts(n, e) {
617
+ function ns(n, e) {
618
618
  if (typeof n != "object" || n === null) return n;
619
619
  var t = n[Symbol.toPrimitive];
620
620
  if (t !== void 0) {
@@ -624,19 +624,19 @@ function ts(n, e) {
624
624
  }
625
625
  return (e === "string" ? String : Number)(n);
626
626
  }
627
- function ns(n) {
628
- var e = ts(n, "string");
627
+ function rs(n) {
628
+ var e = ns(n, "string");
629
629
  return typeof e == "symbol" ? e : String(e);
630
630
  }
631
631
  function ve(n, e, t) {
632
- return e = ns(e), e in n ? Object.defineProperty(n, e, {
632
+ return e = rs(e), e in n ? Object.defineProperty(n, e, {
633
633
  value: t,
634
634
  enumerable: !0,
635
635
  configurable: !0,
636
636
  writable: !0
637
637
  }) : n[e] = t, n;
638
638
  }
639
- function Mn(n, e) {
639
+ function In(n, e) {
640
640
  var t = Object.keys(n);
641
641
  if (Object.getOwnPropertySymbols) {
642
642
  var r = Object.getOwnPropertySymbols(n);
@@ -646,18 +646,18 @@ function Mn(n, e) {
646
646
  }
647
647
  return t;
648
648
  }
649
- function ee(n) {
649
+ function te(n) {
650
650
  for (var e = 1; e < arguments.length; e++) {
651
651
  var t = arguments[e] != null ? arguments[e] : {};
652
- e % 2 ? Mn(Object(t), !0).forEach(function(r) {
652
+ e % 2 ? In(Object(t), !0).forEach(function(r) {
653
653
  ve(n, r, t[r]);
654
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(t)) : Mn(Object(t)).forEach(function(r) {
654
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(t)) : In(Object(t)).forEach(function(r) {
655
655
  Object.defineProperty(n, r, Object.getOwnPropertyDescriptor(t, r));
656
656
  });
657
657
  }
658
658
  return n;
659
659
  }
660
- const rr = {
660
+ const or = {
661
661
  pointer: {
662
662
  start: "down",
663
663
  change: "move",
@@ -679,63 +679,63 @@ const rr = {
679
679
  end: "end"
680
680
  }
681
681
  };
682
- function Nn(n) {
682
+ function kn(n) {
683
683
  return n ? n[0].toUpperCase() + n.slice(1) : "";
684
684
  }
685
- const rs = ["enter", "leave"];
686
- function ss(n = !1, e) {
687
- return n && !rs.includes(e);
685
+ const ss = ["enter", "leave"];
686
+ function os(n = !1, e) {
687
+ return n && !ss.includes(e);
688
688
  }
689
- function os(n, e = "", t = !1) {
690
- const r = rr[n], s = r && r[e] || e;
691
- return "on" + Nn(n) + Nn(s) + (ss(t, s) ? "Capture" : "");
689
+ function is(n, e = "", t = !1) {
690
+ const r = or[n], s = r && r[e] || e;
691
+ return "on" + kn(n) + kn(s) + (os(t, s) ? "Capture" : "");
692
692
  }
693
- const is = ["gotpointercapture", "lostpointercapture"];
694
- function cs(n) {
693
+ const cs = ["gotpointercapture", "lostpointercapture"];
694
+ function as(n) {
695
695
  let e = n.substring(2).toLowerCase();
696
696
  const t = !!~e.indexOf("passive");
697
697
  t && (e = e.replace("passive", ""));
698
- const r = is.includes(e) ? "capturecapture" : "capture", s = !!~e.indexOf(r);
698
+ const r = cs.includes(e) ? "capturecapture" : "capture", s = !!~e.indexOf(r);
699
699
  return s && (e = e.replace("capture", "")), {
700
700
  device: e,
701
701
  capture: s,
702
702
  passive: t
703
703
  };
704
704
  }
705
- function as(n, e = "") {
706
- const t = rr[n], r = t && t[e] || e;
705
+ function ls(n, e = "") {
706
+ const t = or[n], r = t && t[e] || e;
707
707
  return n + r;
708
708
  }
709
709
  function Zt(n) {
710
710
  return "touches" in n;
711
711
  }
712
- function sr(n) {
712
+ function ir(n) {
713
713
  return Zt(n) ? "touch" : "pointerType" in n ? n.pointerType : "mouse";
714
714
  }
715
- function ls(n) {
715
+ function us(n) {
716
716
  return Array.from(n.touches).filter((e) => {
717
717
  var t, r;
718
718
  return e.target === n.currentTarget || ((t = n.currentTarget) === null || t === void 0 || (r = t.contains) === null || r === void 0 ? void 0 : r.call(t, e.target));
719
719
  });
720
720
  }
721
- function us(n) {
721
+ function fs(n) {
722
722
  return n.type === "touchend" || n.type === "touchcancel" ? n.changedTouches : n.targetTouches;
723
723
  }
724
- function or(n) {
725
- return Zt(n) ? us(n)[0] : n;
724
+ function cr(n) {
725
+ return Zt(n) ? fs(n)[0] : n;
726
726
  }
727
- function fs(n) {
728
- return ls(n).map((e) => e.identifier);
727
+ function ds(n) {
728
+ return us(n).map((e) => e.identifier);
729
729
  }
730
730
  function cn(n) {
731
- const e = or(n);
731
+ const e = cr(n);
732
732
  return Zt(n) ? e.identifier : e.pointerId;
733
733
  }
734
- function In(n) {
735
- const e = or(n);
734
+ function Wn(n) {
735
+ const e = cr(n);
736
736
  return [e.clientX, e.clientY];
737
737
  }
738
- function ds(n) {
738
+ function hs(n) {
739
739
  const e = {};
740
740
  if ("buttons" in n && (e.buttons = n.buttons), "shiftKey" in n) {
741
741
  const {
@@ -756,21 +756,21 @@ function ds(n) {
756
756
  function Gt(n, ...e) {
757
757
  return typeof n == "function" ? n(...e) : n;
758
758
  }
759
- function hs() {
759
+ function ms() {
760
760
  }
761
- function ms(...n) {
762
- return n.length === 0 ? hs : n.length === 1 ? n[0] : function() {
761
+ function ps(...n) {
762
+ return n.length === 0 ? ms : n.length === 1 ? n[0] : function() {
763
763
  let e;
764
764
  for (const t of n)
765
765
  e = t.apply(this, arguments) || e;
766
766
  return e;
767
767
  };
768
768
  }
769
- function kn(n, e) {
769
+ function jn(n, e) {
770
770
  return Object.assign({}, e, n || {});
771
771
  }
772
- const ps = 32;
773
- class gs {
772
+ const gs = 32;
773
+ class vs {
774
774
  constructor(e, t, r) {
775
775
  this.ctrl = e, this.args = t, this.key = r, this.state || (this.state = {}, this.computeValues([0, 0]), this.computeInitial(), this.init && this.init(), this.reset());
776
776
  }
@@ -827,29 +827,29 @@ class gs {
827
827
  } = this;
828
828
  t.args = this.args;
829
829
  let o = 0;
830
- if (e && (t.event = e, r.preventDefault && e.cancelable && t.event.preventDefault(), t.type = e.type, s.touches = this.ctrl.pointerIds.size || this.ctrl.touchIds.size, s.locked = !!document.pointerLockElement, Object.assign(s, 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) {
830
+ if (e && (t.event = e, r.preventDefault && e.cancelable && t.event.preventDefault(), t.type = e.type, s.touches = this.ctrl.pointerIds.size || this.ctrl.touchIds.size, s.locked = !!document.pointerLockElement, Object.assign(s, hs(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
831
  const x = t._delta.map(Math.abs);
832
832
  he.addTo(t._distance, x);
833
833
  }
834
834
  this.axisIntent && this.axisIntent(e);
835
- const [i, c] = t._movement, [a, u] = r.threshold, {
836
- _step: l,
835
+ const [i, c] = t._movement, [l, u] = r.threshold, {
836
+ _step: a,
837
837
  values: h
838
838
  } = t;
839
- if (r.hasCustomTransform ? (l[0] === !1 && (l[0] = Math.abs(i) >= a && h[0]), l[1] === !1 && (l[1] = Math.abs(c) >= u && h[1])) : (l[0] === !1 && (l[0] = Math.abs(i) >= a && Math.sign(i) * a), l[1] === !1 && (l[1] = Math.abs(c) >= u && Math.sign(c) * u)), t.intentional = l[0] !== !1 || l[1] !== !1, !t.intentional) return;
839
+ if (r.hasCustomTransform ? (a[0] === !1 && (a[0] = Math.abs(i) >= l && h[0]), a[1] === !1 && (a[1] = Math.abs(c) >= u && h[1])) : (a[0] === !1 && (a[0] = Math.abs(i) >= l && Math.sign(i) * l), a[1] === !1 && (a[1] = Math.abs(c) >= u && Math.sign(c) * u)), t.intentional = a[0] !== !1 || a[1] !== !1, !t.intentional) return;
840
840
  const f = [0, 0];
841
841
  if (r.hasCustomTransform) {
842
- const [x, R] = h;
843
- f[0] = l[0] !== !1 ? x - l[0] : 0, f[1] = l[1] !== !1 ? R - l[1] : 0;
842
+ const [x, C] = h;
843
+ f[0] = a[0] !== !1 ? x - a[0] : 0, f[1] = a[1] !== !1 ? C - a[1] : 0;
844
844
  } else
845
- f[0] = l[0] !== !1 ? i - l[0] : 0, f[1] = l[1] !== !1 ? c - l[1] : 0;
845
+ f[0] = a[0] !== !1 ? i - a[0] : 0, f[1] = a[1] !== !1 ? c - a[1] : 0;
846
846
  this.restrictToAxis && !t._blocked && this.restrictToAxis(f);
847
- const m = t.offset, b = t._active && !t._blocked || t.active;
848
- b && (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 = Gt(r.bounds, t)), this.setup && this.setup()), t.movement = f, this.computeOffset()));
849
- const [v, g] = t.offset, [[S, _], [w, y]] = t._bounds;
850
- t.overflow = [v < S ? -1 : v > _ ? 1 : 0, g < w ? -1 : g > y ? 1 : 0], t._movementBound[0] = t.overflow[0] ? t._movementBound[0] === !1 ? t._movement[0] : t._movementBound[0] : !1, t._movementBound[1] = t.overflow[1] ? t._movementBound[1] === !1 ? t._movement[1] : t._movementBound[1] : !1;
851
- const C = t._active ? r.rubberband || [0, 0] : [0, 0];
852
- if (t.offset = es(t._bounds, t.offset, C), t.delta = he.sub(t.offset, m), this.computeMovement(), b && (!t.last || o > ps)) {
847
+ const m = t.offset, g = t._active && !t._blocked || t.active;
848
+ g && (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 = Gt(r.bounds, t)), this.setup && this.setup()), t.movement = f, this.computeOffset()));
849
+ const [b, v] = t.offset, [[w, _], [S, y]] = t._bounds;
850
+ t.overflow = [b < w ? -1 : b > _ ? 1 : 0, v < S ? -1 : v > y ? 1 : 0], t._movementBound[0] = t.overflow[0] ? t._movementBound[0] === !1 ? t._movement[0] : t._movementBound[0] : !1, t._movementBound[1] = t.overflow[1] ? t._movementBound[1] === !1 ? t._movement[1] : t._movementBound[1] : !1;
851
+ const T = t._active ? r.rubberband || [0, 0] : [0, 0];
852
+ if (t.offset = ts(t._bounds, t.offset, T), t.delta = he.sub(t.offset, m), this.computeMovement(), g && (!t.last || o > gs)) {
853
853
  t.delta = he.sub(t.offset, m);
854
854
  const x = t.delta.map(Math.abs);
855
855
  he.addTo(t.distance, x), t.direction = t.delta.map(Math.sign), t._direction = t._delta.map(Math.sign), !t.first && o > 0 && (t.velocity = [x[0] / o, x[1] / o], t.timeDelta = o);
@@ -858,7 +858,7 @@ class gs {
858
858
  emit() {
859
859
  const e = this.state, t = this.shared, r = this.config;
860
860
  if (e._active || this.clean(), (e._blocked || !e.intentional) && !e._force && !r.triggerAllEvents) return;
861
- const s = this.handler(ee(ee(ee({}, t), e), {}, {
861
+ const s = this.handler(te(te(te({}, t), e), {}, {
862
862
  [this.aliasKey]: e.values
863
863
  }));
864
864
  s !== void 0 && (e.memo = s);
@@ -867,14 +867,14 @@ class gs {
867
867
  this.eventStore.clean(), this.timeoutStore.clean();
868
868
  }
869
869
  }
870
- function vs([n, e], t) {
870
+ function bs([n, e], t) {
871
871
  const r = Math.abs(n), s = Math.abs(e);
872
872
  if (r > s && r > t)
873
873
  return "x";
874
874
  if (s > r && s > t)
875
875
  return "y";
876
876
  }
877
- class bs extends gs {
877
+ class _s extends vs {
878
878
  constructor(...e) {
879
879
  super(...e), ve(this, "aliasKey", "xy");
880
880
  }
@@ -893,8 +893,8 @@ class bs extends gs {
893
893
  axisIntent(e) {
894
894
  const t = this.state, r = this.config;
895
895
  if (!t.axis && e) {
896
- const s = typeof r.axisThreshold == "object" ? r.axisThreshold[sr(e)] : r.axisThreshold;
897
- t.axis = vs(t._movement, s);
896
+ const s = typeof r.axisThreshold == "object" ? r.axisThreshold[ir(e)] : r.axisThreshold;
897
+ t.axis = bs(t._movement, s);
898
898
  }
899
899
  t._blocked = (r.lockDirection || !!r.axis) && !t.axis || !!r.axis && r.axis !== t.axis;
900
900
  }
@@ -910,12 +910,12 @@ class bs extends gs {
910
910
  }
911
911
  }
912
912
  }
913
- const Wn = (n) => n, jn = 0.15, vn = {
913
+ const zn = (n) => n, Fn = 0.15, bn = {
914
914
  enabled(n = !0) {
915
915
  return n;
916
916
  },
917
917
  eventOptions(n, e, t) {
918
- return ee(ee({}, t.shared.eventOptions), n);
918
+ return te(te({}, t.shared.eventOptions), n);
919
919
  },
920
920
  preventDefault(n = !1) {
921
921
  return n;
@@ -926,7 +926,7 @@ const Wn = (n) => n, jn = 0.15, vn = {
926
926
  rubberband(n = 0) {
927
927
  switch (n) {
928
928
  case !0:
929
- return [jn, jn];
929
+ return [Fn, Fn];
930
930
  case !1:
931
931
  return [0, 0];
932
932
  default:
@@ -940,19 +940,19 @@ const Wn = (n) => n, jn = 0.15, vn = {
940
940
  transform(n, e, t) {
941
941
  const r = n || t.shared.transform;
942
942
  if (this.hasCustomTransform = !!r, process.env.NODE_ENV === "development") {
943
- const s = r || Wn;
943
+ const s = r || zn;
944
944
  return (o) => {
945
945
  const i = s(o);
946
946
  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
947
  };
948
948
  }
949
- return r || Wn;
949
+ return r || zn;
950
950
  },
951
951
  threshold(n) {
952
952
  return he.toVector(n, 0);
953
953
  }
954
954
  };
955
- process.env.NODE_ENV === "development" && Object.assign(vn, {
955
+ process.env.NODE_ENV === "development" && Object.assign(bn, {
956
956
  domTarget(n) {
957
957
  if (n !== void 0)
958
958
  throw Error("[@use-gesture]: `domTarget` option has been renamed to `target`.");
@@ -969,13 +969,13 @@ process.env.NODE_ENV === "development" && Object.assign(vn, {
969
969
  return NaN;
970
970
  }
971
971
  });
972
- const _s = 0, Ot = ee(ee({}, vn), {}, {
972
+ const ws = 0, Ot = te(te({}, bn), {}, {
973
973
  axis(n, e, {
974
974
  axis: t
975
975
  }) {
976
976
  if (this.lockDirection = t === "lock", !this.lockDirection) return t;
977
977
  },
978
- axisThreshold(n = _s) {
978
+ axisThreshold(n = ws) {
979
979
  return n;
980
980
  },
981
981
  bounds(n = {}) {
@@ -993,13 +993,13 @@ const _s = 0, Ot = ee(ee({}, vn), {}, {
993
993
  } = n;
994
994
  return [[e, t], [r, s]];
995
995
  }
996
- }), zn = {
996
+ }), Vn = {
997
997
  ArrowRight: (n, e = 1) => [n * e, 0],
998
998
  ArrowLeft: (n, e = 1) => [-1 * n * e, 0],
999
999
  ArrowUp: (n, e = 1) => [0, -1 * n * e],
1000
1000
  ArrowDown: (n, e = 1) => [0, n * e]
1001
1001
  };
1002
- class ws extends bs {
1002
+ class Ss extends _s {
1003
1003
  constructor(...e) {
1004
1004
  super(...e), ve(this, "ingKey", "dragging");
1005
1005
  }
@@ -1036,7 +1036,7 @@ class ws extends bs {
1036
1036
  const t = this.config, r = this.state;
1037
1037
  if (e.buttons != null && (Array.isArray(t.pointerButtons) ? !t.pointerButtons.includes(e.buttons) : t.pointerButtons !== -1 && t.pointerButtons !== e.buttons)) return;
1038
1038
  const s = this.ctrl.setEventIds(e);
1039
- t.pointerCapture && e.target.setPointerCapture(e.pointerId), !(s && s.size > 1 && r._pointerActive) && (this.start(e), this.setupPointer(e), r._pointerId = cn(e), r._pointerActive = !0, this.computeValues(In(e)), this.computeInitial(), t.preventScrollAxis && sr(e) !== "mouse" ? (r._active = !1, this.setupScrollPrevention(e)) : t.delay > 0 ? (this.setupDelayTrigger(e), t.triggerAllEvents && (this.compute(e), this.emit())) : this.startPointerDrag(e));
1039
+ t.pointerCapture && e.target.setPointerCapture(e.pointerId), !(s && s.size > 1 && r._pointerActive) && (this.start(e), this.setupPointer(e), r._pointerId = cn(e), r._pointerActive = !0, this.computeValues(Wn(e)), this.computeInitial(), t.preventScrollAxis && ir(e) !== "mouse" ? (r._active = !1, this.setupScrollPrevention(e)) : t.delay > 0 ? (this.setupDelayTrigger(e), t.triggerAllEvents && (this.compute(e), this.emit())) : this.startPointerDrag(e));
1040
1040
  }
1041
1041
  startPointerDrag(e) {
1042
1042
  const t = this.state;
@@ -1047,7 +1047,7 @@ class ws extends bs {
1047
1047
  if (!t._pointerActive) return;
1048
1048
  const s = cn(e);
1049
1049
  if (t._pointerId !== void 0 && s !== t._pointerId) return;
1050
- const o = In(e);
1050
+ const o = Wn(e);
1051
1051
  if (document.pointerLockElement === e.target ? t._delta = [e.movementX, e.movementY] : (t._delta = he.sub(o, t._values), this.computeValues(o)), he.addTo(t._movement, t._delta), this.compute(e), t._delayed && t.intentional) {
1052
1052
  this.timeoutStore.remove("dragDelay"), t.active = !1, this.startPointerDrag(e);
1053
1053
  return;
@@ -1081,10 +1081,10 @@ class ws extends bs {
1081
1081
  if (t.tap = o <= r.tapsThreshold && i <= r.tapsThreshold, t.tap && r.filterTaps)
1082
1082
  t._force = !0;
1083
1083
  else {
1084
- const [c, a] = t._delta, [u, l] = t._movement, [h, f] = r.swipe.velocity, [m, b] = r.swipe.distance, v = r.swipe.duration;
1085
- if (t.elapsedTime < v) {
1086
- const g = Math.abs(c / t.timeDelta), S = Math.abs(a / t.timeDelta);
1087
- g > h && Math.abs(u) > m && (t.swipe[0] = Math.sign(c)), S > f && Math.abs(l) > b && (t.swipe[1] = Math.sign(a));
1084
+ const [c, l] = t._delta, [u, a] = t._movement, [h, f] = r.swipe.velocity, [m, g] = r.swipe.distance, b = r.swipe.duration;
1085
+ if (t.elapsedTime < b) {
1086
+ const v = Math.abs(c / t.timeDelta), w = Math.abs(l / t.timeDelta);
1087
+ v > h && Math.abs(u) > m && (t.swipe[0] = Math.sign(c)), w > f && Math.abs(a) > g && (t.swipe[1] = Math.sign(l));
1088
1088
  }
1089
1089
  }
1090
1090
  this.emit();
@@ -1111,7 +1111,7 @@ class ws extends bs {
1111
1111
  this.state._preventScroll && e.cancelable && e.preventDefault();
1112
1112
  }
1113
1113
  setupScrollPrevention(e) {
1114
- this.state._preventScroll = !1, Ss(e);
1114
+ this.state._preventScroll = !1, ys(e);
1115
1115
  const t = this.eventStore.add(this.sharedConfig.window, "touch", "change", this.preventScroll.bind(this), {
1116
1116
  passive: !1
1117
1117
  });
@@ -1123,14 +1123,14 @@ class ws extends bs {
1123
1123
  }, this.config.delay);
1124
1124
  }
1125
1125
  keyDown(e) {
1126
- const t = zn[e.key];
1126
+ const t = Vn[e.key];
1127
1127
  if (t) {
1128
1128
  const r = this.state, s = e.shiftKey ? 10 : e.altKey ? 0.1 : 1;
1129
1129
  this.start(e), r._delta = t(this.config.keyboardDisplacement, s), r._keyboardActive = !0, he.addTo(r._movement, r._delta), this.compute(e), this.emit();
1130
1130
  }
1131
1131
  }
1132
1132
  keyUp(e) {
1133
- e.key in zn && (this.state._keyboardActive = !1, this.setActive(), this.compute(e), this.emit());
1133
+ e.key in Vn && (this.state._keyboardActive = !1, this.setActive(), this.compute(e), this.emit());
1134
1134
  }
1135
1135
  bind(e) {
1136
1136
  const t = this.config.device;
@@ -1140,23 +1140,23 @@ class ws extends bs {
1140
1140
  });
1141
1141
  }
1142
1142
  }
1143
- function Ss(n) {
1143
+ function ys(n) {
1144
1144
  "persist" in n && typeof n.persist == "function" && n.persist();
1145
1145
  }
1146
1146
  const Mt = typeof window < "u" && window.document && window.document.createElement;
1147
- function ir() {
1147
+ function ar() {
1148
1148
  return Mt && "ontouchstart" in window;
1149
1149
  }
1150
- function ys() {
1151
- return ir() || Mt && window.navigator.maxTouchPoints > 1;
1152
- }
1153
1150
  function Es() {
1154
- return Mt && "onpointerdown" in window;
1151
+ return ar() || Mt && window.navigator.maxTouchPoints > 1;
1155
1152
  }
1156
1153
  function Rs() {
1157
- return Mt && "exitPointerLock" in window.document;
1154
+ return Mt && "onpointerdown" in window;
1158
1155
  }
1159
1156
  function xs() {
1157
+ return Mt && "exitPointerLock" in window.document;
1158
+ }
1159
+ function Cs() {
1160
1160
  try {
1161
1161
  return "constructor" in GestureEvent;
1162
1162
  } catch {
@@ -1165,16 +1165,16 @@ function xs() {
1165
1165
  }
1166
1166
  const we = {
1167
1167
  isBrowser: Mt,
1168
- gesture: xs(),
1169
- touch: ir(),
1170
- touchscreen: ys(),
1171
- pointer: Es(),
1172
- pointerLock: Rs()
1173
- }, Cs = 250, Ts = 180, As = 0.5, Ps = 50, Ds = 250, Ls = 10, Fn = {
1168
+ gesture: Cs(),
1169
+ touch: ar(),
1170
+ touchscreen: Es(),
1171
+ pointer: Rs(),
1172
+ pointerLock: xs()
1173
+ }, As = 250, Ts = 180, Ps = 0.5, Ds = 50, Ls = 250, Os = 10, Un = {
1174
1174
  mouse: 0,
1175
1175
  touch: 0,
1176
1176
  pen: 8
1177
- }, cr = ee(ee({}, Ot), {}, {
1177
+ }, lr = te(te({}, Ot), {}, {
1178
1178
  device(n, e, {
1179
1179
  pointer: {
1180
1180
  touch: t = !1,
@@ -1187,7 +1187,7 @@ const we = {
1187
1187
  preventScrollAxis(n, e, {
1188
1188
  preventScroll: t
1189
1189
  }) {
1190
- if (this.preventScrollDelay = typeof t == "number" ? t : t || t === void 0 && n ? Cs : void 0, !(!we.touchscreen || t === !1))
1190
+ if (this.preventScrollDelay = typeof t == "number" ? t : t || t === void 0 && n ? As : void 0, !(!we.touchscreen || t === !1))
1191
1191
  return n || (t !== void 0 ? "y" : void 0);
1192
1192
  },
1193
1193
  pointerCapture(n, e, {
@@ -1208,9 +1208,9 @@ const we = {
1208
1208
  return this.filterTaps = t, this.tapsThreshold = r, o;
1209
1209
  },
1210
1210
  swipe({
1211
- velocity: n = As,
1212
- distance: e = Ps,
1213
- duration: t = Ds
1211
+ velocity: n = Ps,
1212
+ distance: e = Ds,
1213
+ duration: t = Ls
1214
1214
  } = {}) {
1215
1215
  return {
1216
1216
  velocity: this.transform(he.toVector(n)),
@@ -1229,13 +1229,13 @@ const we = {
1229
1229
  }
1230
1230
  },
1231
1231
  axisThreshold(n) {
1232
- return n ? ee(ee({}, Fn), n) : Fn;
1232
+ return n ? te(te({}, Un), n) : Un;
1233
1233
  },
1234
- keyboardDisplacement(n = Ls) {
1234
+ keyboardDisplacement(n = Os) {
1235
1235
  return n;
1236
1236
  }
1237
1237
  });
1238
- process.env.NODE_ENV === "development" && Object.assign(cr, {
1238
+ process.env.NODE_ENV === "development" && Object.assign(lr, {
1239
1239
  useTouch(n) {
1240
1240
  if (n !== void 0)
1241
1241
  throw Error("[@use-gesture]: `useTouch` option has been renamed to `pointer.touch`. Use it as in `{ pointer: { touch: true } }`.");
@@ -1262,7 +1262,7 @@ process.env.NODE_ENV === "development" && Object.assign(cr, {
1262
1262
  return NaN;
1263
1263
  }
1264
1264
  });
1265
- ee(ee({}, vn), {}, {
1265
+ te(te({}, bn), {}, {
1266
1266
  device(n, e, {
1267
1267
  shared: t,
1268
1268
  pointer: {
@@ -1281,13 +1281,13 @@ ee(ee({}, vn), {}, {
1281
1281
  angleBounds: r = {}
1282
1282
  }) {
1283
1283
  const s = (i) => {
1284
- const c = kn(Gt(t, i), {
1284
+ const c = jn(Gt(t, i), {
1285
1285
  min: -1 / 0,
1286
1286
  max: 1 / 0
1287
1287
  });
1288
1288
  return [c.min, c.max];
1289
1289
  }, o = (i) => {
1290
- const c = kn(Gt(r, i), {
1290
+ const c = jn(Gt(r, i), {
1291
1291
  min: -1 / 0,
1292
1292
  max: 1 / 0
1293
1293
  });
@@ -1305,31 +1305,31 @@ ee(ee({}, vn), {}, {
1305
1305
  return n;
1306
1306
  }
1307
1307
  });
1308
- ee(ee({}, Ot), {}, {
1308
+ te(te({}, Ot), {}, {
1309
1309
  mouseOnly: (n = !0) => n
1310
1310
  });
1311
- ee(ee({}, Ot), {}, {
1311
+ te(te({}, Ot), {}, {
1312
1312
  mouseOnly: (n = !0) => n
1313
1313
  });
1314
- const ar = /* @__PURE__ */ new Map(), hn = /* @__PURE__ */ new Map();
1315
- function Os(n) {
1316
- ar.set(n.key, n.engine), hn.set(n.key, n.resolver);
1314
+ const ur = /* @__PURE__ */ new Map(), mn = /* @__PURE__ */ new Map();
1315
+ function Ms(n) {
1316
+ ur.set(n.key, n.engine), mn.set(n.key, n.resolver);
1317
1317
  }
1318
- const Ms = {
1318
+ const Ns = {
1319
1319
  key: "drag",
1320
- engine: ws,
1321
- resolver: cr
1320
+ engine: Ss,
1321
+ resolver: lr
1322
1322
  };
1323
- function Ns(n, e) {
1323
+ function Is(n, e) {
1324
1324
  if (n == null) return {};
1325
1325
  var t = {}, r = Object.keys(n), s, o;
1326
1326
  for (o = 0; o < r.length; o++)
1327
1327
  s = r[o], !(e.indexOf(s) >= 0) && (t[s] = n[s]);
1328
1328
  return t;
1329
1329
  }
1330
- function Is(n, e) {
1330
+ function ks(n, e) {
1331
1331
  if (n == null) return {};
1332
- var t = Ns(n, e), r, s;
1332
+ var t = Is(n, e), r, s;
1333
1333
  if (Object.getOwnPropertySymbols) {
1334
1334
  var o = Object.getOwnPropertySymbols(n);
1335
1335
  for (s = 0; s < o.length; s++)
@@ -1337,7 +1337,7 @@ function Is(n, e) {
1337
1337
  }
1338
1338
  return t;
1339
1339
  }
1340
- const ks = {
1340
+ const Ws = {
1341
1341
  target(n) {
1342
1342
  if (n)
1343
1343
  return () => "current" in n ? n.current : n;
@@ -1360,7 +1360,7 @@ const ks = {
1360
1360
  transform(n) {
1361
1361
  return n;
1362
1362
  }
1363
- }, Ws = ["target", "eventOptions", "window", "enabled", "transform"];
1363
+ }, js = ["target", "eventOptions", "window", "enabled", "transform"];
1364
1364
  function Ut(n = {}, e) {
1365
1365
  const t = {};
1366
1366
  for (const [r, s] of Object.entries(e))
@@ -1381,57 +1381,57 @@ function Ut(n = {}, e) {
1381
1381
  }
1382
1382
  return t;
1383
1383
  }
1384
- function js(n, e, t = {}) {
1384
+ function zs(n, e, t = {}) {
1385
1385
  const r = n, {
1386
1386
  target: s,
1387
1387
  eventOptions: o,
1388
1388
  window: i,
1389
1389
  enabled: c,
1390
- transform: a
1391
- } = r, u = Is(r, Ws);
1390
+ transform: l
1391
+ } = r, u = ks(r, js);
1392
1392
  if (t.shared = Ut({
1393
1393
  target: s,
1394
1394
  eventOptions: o,
1395
1395
  window: i,
1396
1396
  enabled: c,
1397
- transform: a
1398
- }, ks), e) {
1399
- const l = hn.get(e);
1400
- t[e] = Ut(ee({
1397
+ transform: l
1398
+ }, Ws), e) {
1399
+ const a = mn.get(e);
1400
+ t[e] = Ut(te({
1401
1401
  shared: t.shared
1402
- }, u), l);
1402
+ }, u), a);
1403
1403
  } else
1404
- for (const l in u) {
1405
- const h = hn.get(l);
1404
+ for (const a in u) {
1405
+ const h = mn.get(a);
1406
1406
  if (h)
1407
- t[l] = Ut(ee({
1407
+ t[a] = Ut(te({
1408
1408
  shared: t.shared
1409
- }, u[l]), h);
1410
- else if (process.env.NODE_ENV === "development" && !["drag", "pinch", "scroll", "wheel", "move", "hover"].includes(l)) {
1411
- if (l === "domTarget")
1409
+ }, u[a]), h);
1410
+ else if (process.env.NODE_ENV === "development" && !["drag", "pinch", "scroll", "wheel", "move", "hover"].includes(a)) {
1411
+ if (a === "domTarget")
1412
1412
  throw Error("[@use-gesture]: `domTarget` option has been renamed to `target`.");
1413
- console.warn(`[@use-gesture]: Unknown config key \`${l}\` was used. Please read the documentation for further information.`);
1413
+ console.warn(`[@use-gesture]: Unknown config key \`${a}\` was used. Please read the documentation for further information.`);
1414
1414
  }
1415
1415
  }
1416
1416
  return t;
1417
1417
  }
1418
- class lr {
1418
+ class fr {
1419
1419
  constructor(e, t) {
1420
1420
  ve(this, "_listeners", /* @__PURE__ */ new Set()), this._ctrl = e, this._gestureKey = t;
1421
1421
  }
1422
1422
  add(e, t, r, s, o) {
1423
- const i = this._listeners, c = as(t, r), a = this._gestureKey ? this._ctrl.config[this._gestureKey].eventOptions : {}, u = ee(ee({}, a), o);
1423
+ const i = this._listeners, c = ls(t, r), l = this._gestureKey ? this._ctrl.config[this._gestureKey].eventOptions : {}, u = te(te({}, l), o);
1424
1424
  e.addEventListener(c, s, u);
1425
- const l = () => {
1426
- e.removeEventListener(c, s, u), i.delete(l);
1425
+ const a = () => {
1426
+ e.removeEventListener(c, s, u), i.delete(a);
1427
1427
  };
1428
- return i.add(l), l;
1428
+ return i.add(a), a;
1429
1429
  }
1430
1430
  clean() {
1431
1431
  this._listeners.forEach((e) => e()), this._listeners.clear();
1432
1432
  }
1433
1433
  }
1434
- class zs {
1434
+ class Fs {
1435
1435
  constructor() {
1436
1436
  ve(this, "_timeouts", /* @__PURE__ */ new Map());
1437
1437
  }
@@ -1446,20 +1446,20 @@ class zs {
1446
1446
  this._timeouts.forEach((e) => void window.clearTimeout(e)), this._timeouts.clear();
1447
1447
  }
1448
1448
  }
1449
- class Fs {
1449
+ class Vs {
1450
1450
  constructor(e) {
1451
- ve(this, "gestures", /* @__PURE__ */ new Set()), ve(this, "_targetEventStore", new lr(this)), ve(this, "gestureEventStores", {}), ve(this, "gestureTimeoutStores", {}), ve(this, "handlers", {}), ve(this, "config", {}), ve(this, "pointerIds", /* @__PURE__ */ new Set()), ve(this, "touchIds", /* @__PURE__ */ new Set()), ve(this, "state", {
1451
+ ve(this, "gestures", /* @__PURE__ */ new Set()), ve(this, "_targetEventStore", new fr(this)), ve(this, "gestureEventStores", {}), ve(this, "gestureTimeoutStores", {}), ve(this, "handlers", {}), ve(this, "config", {}), ve(this, "pointerIds", /* @__PURE__ */ new Set()), ve(this, "touchIds", /* @__PURE__ */ new Set()), ve(this, "state", {
1452
1452
  shared: {
1453
1453
  shiftKey: !1,
1454
1454
  metaKey: !1,
1455
1455
  ctrlKey: !1,
1456
1456
  altKey: !1
1457
1457
  }
1458
- }), Vs(this, e);
1458
+ }), Us(this, e);
1459
1459
  }
1460
1460
  setEventIds(e) {
1461
1461
  if (Zt(e))
1462
- return this.touchIds = new Set(fs(e)), this.touchIds;
1462
+ return this.touchIds = new Set(ds(e)), this.touchIds;
1463
1463
  if ("pointerId" in e)
1464
1464
  return e.type === "pointerup" || e.type === "pointercancel" ? this.pointerIds.delete(e.pointerId) : e.type === "pointerdown" && this.pointerIds.add(e.pointerId), this.pointerIds;
1465
1465
  }
@@ -1467,7 +1467,7 @@ class Fs {
1467
1467
  this.handlers = e, this.nativeHandlers = t;
1468
1468
  }
1469
1469
  applyConfig(e, t) {
1470
- this.config = js(e, t, this.config);
1470
+ this.config = zs(e, t, this.config);
1471
1471
  }
1472
1472
  clean() {
1473
1473
  this._targetEventStore.clean();
@@ -1483,49 +1483,49 @@ class Fs {
1483
1483
  if (!(t.target && (s = t.target(), !s))) {
1484
1484
  if (t.enabled) {
1485
1485
  for (const i of this.gestures) {
1486
- const c = this.config[i], a = Vn(r, c.eventOptions, !!s);
1486
+ const c = this.config[i], l = $n(r, c.eventOptions, !!s);
1487
1487
  if (c.enabled) {
1488
- const u = ar.get(i);
1489
- new u(this, e, i).bind(a);
1488
+ const u = ur.get(i);
1489
+ new u(this, e, i).bind(l);
1490
1490
  }
1491
1491
  }
1492
- const o = Vn(r, t.eventOptions, !!s);
1492
+ const o = $n(r, t.eventOptions, !!s);
1493
1493
  for (const i in this.nativeHandlers)
1494
- o(i, "", (c) => this.nativeHandlers[i](ee(ee({}, this.state.shared), {}, {
1494
+ o(i, "", (c) => this.nativeHandlers[i](te(te({}, this.state.shared), {}, {
1495
1495
  event: c,
1496
1496
  args: e
1497
1497
  })), void 0, !0);
1498
1498
  }
1499
1499
  for (const o in r)
1500
- r[o] = ms(...r[o]);
1500
+ r[o] = ps(...r[o]);
1501
1501
  if (!s) return r;
1502
1502
  for (const o in r) {
1503
1503
  const {
1504
1504
  device: i,
1505
1505
  capture: c,
1506
- passive: a
1507
- } = cs(o);
1506
+ passive: l
1507
+ } = as(o);
1508
1508
  this._targetEventStore.add(s, i, "", r[o], {
1509
1509
  capture: c,
1510
- passive: a
1510
+ passive: l
1511
1511
  });
1512
1512
  }
1513
1513
  }
1514
1514
  }
1515
1515
  }
1516
1516
  function Rt(n, e) {
1517
- n.gestures.add(e), n.gestureEventStores[e] = new lr(n, e), n.gestureTimeoutStores[e] = new zs();
1517
+ n.gestures.add(e), n.gestureEventStores[e] = new fr(n, e), n.gestureTimeoutStores[e] = new Fs();
1518
1518
  }
1519
- function Vs(n, e) {
1519
+ function Us(n, e) {
1520
1520
  e.drag && Rt(n, "drag"), e.wheel && Rt(n, "wheel"), e.scroll && Rt(n, "scroll"), e.move && Rt(n, "move"), e.pinch && Rt(n, "pinch"), e.hover && Rt(n, "hover");
1521
1521
  }
1522
- const Vn = (n, e, t) => (r, s, o, i = {}, c = !1) => {
1523
- var a, u;
1524
- 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 f = c ? r : os(r, s, l);
1522
+ const $n = (n, e, t) => (r, s, o, i = {}, c = !1) => {
1523
+ var l, u;
1524
+ const a = (l = i.capture) !== null && l !== void 0 ? l : e.capture, h = (u = i.passive) !== null && u !== void 0 ? u : e.passive;
1525
+ let f = c ? r : is(r, s, a);
1526
1526
  t && h && (f += "Passive"), n[f] = n[f] || [], n[f].push(o);
1527
1527
  };
1528
- function Us(n, e) {
1528
+ function $s(n, e) {
1529
1529
  if (typeof n != "object" || n === null) return n;
1530
1530
  var t = n[Symbol.toPrimitive];
1531
1531
  if (t !== void 0) {
@@ -1535,19 +1535,19 @@ function Us(n, e) {
1535
1535
  }
1536
1536
  return (e === "string" ? String : Number)(n);
1537
1537
  }
1538
- function $s(n) {
1539
- var e = Us(n, "string");
1538
+ function Hs(n) {
1539
+ var e = $s(n, "string");
1540
1540
  return typeof e == "symbol" ? e : String(e);
1541
1541
  }
1542
- function Hs(n, e, t) {
1543
- return e = $s(e), e in n ? Object.defineProperty(n, e, {
1542
+ function Bs(n, e, t) {
1543
+ return e = Hs(e), e in n ? Object.defineProperty(n, e, {
1544
1544
  value: t,
1545
1545
  enumerable: !0,
1546
1546
  configurable: !0,
1547
1547
  writable: !0
1548
1548
  }) : n[e] = t, n;
1549
1549
  }
1550
- function Un(n, e) {
1550
+ function Hn(n, e) {
1551
1551
  var t = Object.keys(n);
1552
1552
  if (Object.getOwnPropertySymbols) {
1553
1553
  var r = Object.getOwnPropertySymbols(n);
@@ -1560,17 +1560,17 @@ function Un(n, e) {
1560
1560
  function Ft(n) {
1561
1561
  for (var e = 1; e < arguments.length; e++) {
1562
1562
  var t = arguments[e] != null ? arguments[e] : {};
1563
- e % 2 ? Un(Object(t), !0).forEach(function(r) {
1564
- Hs(n, r, t[r]);
1565
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(t)) : Un(Object(t)).forEach(function(r) {
1563
+ e % 2 ? Hn(Object(t), !0).forEach(function(r) {
1564
+ Bs(n, r, t[r]);
1565
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(t)) : Hn(Object(t)).forEach(function(r) {
1566
1566
  Object.defineProperty(n, r, Object.getOwnPropertyDescriptor(t, r));
1567
1567
  });
1568
1568
  }
1569
1569
  return n;
1570
1570
  }
1571
- class Bs {
1571
+ class Ys {
1572
1572
  constructor(e, t, r, s, o) {
1573
- this._target = e, this._gestureKey = s, this._ctrl = new Fs(t), this._ctrl.applyHandlers(t, o), this._ctrl.applyConfig(Ft(Ft({}, r), {}, {
1573
+ this._target = e, this._gestureKey = s, this._ctrl = new Vs(t), this._ctrl.applyHandlers(t, o), this._ctrl.applyConfig(Ft(Ft({}, r), {}, {
1574
1574
  target: e
1575
1575
  }), s), this._ctrl.effect();
1576
1576
  }
@@ -1584,22 +1584,22 @@ class Bs {
1584
1584
  }
1585
1585
  }
1586
1586
  const an = function(e, t, r) {
1587
- return Os(Ms), new Bs(e, {
1587
+ return Ms(Ns), new Ys(e, {
1588
1588
  drag: t
1589
1589
  }, r || {}, "drag");
1590
1590
  };
1591
- function Ys(...n) {
1591
+ function Xs(...n) {
1592
1592
  const e = n.filter(Boolean);
1593
1593
  return e.length <= 1 ? e[0] || null : function(r) {
1594
1594
  for (const s of e)
1595
1595
  typeof s == "function" ? s(r) : s && (s.current = r);
1596
1596
  };
1597
1597
  }
1598
- const ur = ({
1598
+ const dr = ({
1599
1599
  children: n,
1600
1600
  ...e
1601
1601
  }) => {
1602
- const t = nt.Children.only(n), r = Xs(t), s = t.props || {}, o = s.style || {}, i = {
1602
+ const t = nt.Children.only(n), r = Gs(t), s = t.props || {}, o = s.style || {}, i = {
1603
1603
  ...e,
1604
1604
  ...s,
1605
1605
  // child's own props take precedence
@@ -1607,15 +1607,27 @@ const ur = ({
1607
1607
  ...e.style ?? {},
1608
1608
  ...o
1609
1609
  },
1610
- ref: Ys(r, e.ref)
1610
+ ref: Xs(r, e.ref)
1611
1611
  };
1612
1612
  return nt.cloneElement(t, i);
1613
1613
  };
1614
- function Xs(n) {
1614
+ function Gs(n) {
1615
1615
  let e = Object.getOwnPropertyDescriptor(n, "ref")?.get;
1616
1616
  return e && "isReactWarning" in e && e.isReactWarning ? n.props.ref : n.props.ref || n.ref;
1617
1617
  }
1618
- const Gs = ({
1618
+ const ln = (n, e, t, r, s) => ({
1619
+ target: n,
1620
+ dx: e[0],
1621
+ dy: e[1],
1622
+ clientX: t[0],
1623
+ clientY: t[1],
1624
+ ...r && {
1625
+ edges: r
1626
+ },
1627
+ ...s && {
1628
+ deltaRect: s
1629
+ }
1630
+ }), Ks = (n, e, t) => n ? n === e || n === t || (e?.contains(n) ?? !1) || (t?.contains(n) ?? !1) : !1, qs = ({
1619
1631
  children: n,
1620
1632
  interactRef: e,
1621
1633
  draggable: t,
@@ -1623,101 +1635,87 @@ const Gs = ({
1623
1635
  draggableOptions: s,
1624
1636
  resizableOptions: o
1625
1637
  }) => {
1626
- const i = ie(null), c = ie(void 0), a = ie(void 0), u = ie(void 0), l = ie(void 0), h = ie(void 0), f = ie(null), m = ie(null);
1638
+ const i = ee(null), c = ee(void 0), l = ee(void 0), u = ee(void 0), a = ee(void 0), h = ee(void 0), f = ee(null), m = ee(null), g = ee(void 0), b = ee(void 0);
1627
1639
  et(() => {
1628
- c.current = s, a.current = o;
1640
+ c.current = s, l.current = o;
1629
1641
  }, [s, o]);
1630
- const b = Pr(() => {
1631
- i.current && (t && c.current && (u.current = new an(i.current, (v) => {
1642
+ const v = Lr(() => {
1643
+ const w = i.current;
1644
+ if (!w) return;
1645
+ u.current?.destroy(), a.current?.destroy(), h.current?.destroy(), u.current = void 0, a.current = void 0, h.current = void 0;
1646
+ const _ = l.current?.edges?.left, S = l.current?.edges?.right;
1647
+ _ !== g.current && (g.current = _, f.current = _ ? w.querySelector(_) : null), S !== b.current && (b.current = S, m.current = S ? w.querySelector(S) : null), t && c.current && (u.current = new an(w, (T) => {
1632
1648
  const {
1633
- active: g,
1634
- delta: S,
1635
- xy: _,
1636
- event: w,
1637
- first: y,
1638
- last: C
1639
- } = v, x = w?.target;
1640
- if (x && (x === f.current || x === m.current || f.current && f.current.contains(x) || m.current && m.current.contains(x)))
1649
+ active: x,
1650
+ delta: C,
1651
+ xy: P,
1652
+ event: E,
1653
+ first: D,
1654
+ last: L
1655
+ } = T;
1656
+ if (Ks(E?.target, f.current, m.current))
1641
1657
  return;
1642
- const R = {
1643
- target: i.current,
1644
- dx: S[0],
1645
- dy: S[1],
1646
- clientX: _[0],
1647
- clientY: _[1]
1648
- };
1649
- y ? c.current?.onstart?.(R) : C ? c.current?.onend?.(R) : g && c.current?.onmove?.(R);
1658
+ const k = ln(w, C, P);
1659
+ D ? c.current?.onstart?.(k) : L ? c.current?.onend?.(k) : x && c.current?.onmove?.(k);
1650
1660
  }, {
1651
1661
  axis: c.current?.lockAxis === "x" ? "x" : void 0,
1652
1662
  threshold: 0,
1653
1663
  pointer: {
1654
1664
  capture: !0
1655
1665
  }
1656
- })), r && a.current?.edges && (a.current.edges.left && (f.current || (f.current = i.current.querySelector(a.current.edges.left)), l.current = new an(f.current, (v) => {
1657
- const {
1658
- active: g,
1659
- delta: S,
1660
- xy: _,
1661
- first: w,
1662
- last: y
1663
- } = v, C = {
1664
- target: i.current,
1665
- dx: S[0],
1666
- dy: 0,
1667
- clientX: _[0],
1668
- clientY: _[1],
1669
- edges: {
1666
+ }));
1667
+ const y = l.current;
1668
+ if (r && y?.edges) {
1669
+ const T = y.edges;
1670
+ T.left && f.current && (a.current = new an(f.current, (x) => {
1671
+ const {
1672
+ active: C,
1673
+ delta: P,
1674
+ xy: E,
1675
+ first: D,
1676
+ last: L
1677
+ } = x, k = ln(w, P, E, {
1670
1678
  left: !0
1679
+ }, {
1680
+ left: P[0]
1681
+ });
1682
+ D ? y.onstart?.(k) : L ? y.onend?.(k) : C && y.onmove?.(k);
1683
+ }, {
1684
+ pointer: {
1685
+ capture: !0
1671
1686
  },
1672
- deltaRect: {
1673
- left: S[0]
1674
- }
1675
- };
1676
- y ? a.current?.onend?.(C) : w ? a.current?.onstart?.(C) : g && a.current?.onmove?.(C);
1677
- }, {
1678
- pointer: {
1679
- capture: !0
1680
- },
1681
- threshold: 0
1682
- })), a.current.edges.right && (m.current || (m.current = i.current.querySelector(a.current.edges.right)), h.current = new an(m.current, (v) => {
1683
- const {
1684
- active: g,
1685
- delta: S,
1686
- xy: _,
1687
- first: w,
1688
- last: y
1689
- } = v, C = {
1690
- target: i.current,
1691
- dx: S[0],
1692
- dy: 0,
1693
- clientX: _[0],
1694
- clientY: _[1],
1695
- edges: {
1687
+ threshold: 0
1688
+ })), T.right && m.current && (h.current = new an(m.current, (x) => {
1689
+ const {
1690
+ active: C,
1691
+ delta: P,
1692
+ xy: E,
1693
+ first: D,
1694
+ last: L
1695
+ } = x, k = ln(w, P, E, {
1696
1696
  right: !0
1697
+ }, {
1698
+ right: P[0]
1699
+ });
1700
+ D ? y.onstart?.(k) : L ? y.onend?.(k) : C && y.onmove?.(k);
1701
+ }, {
1702
+ pointer: {
1703
+ capture: !0
1697
1704
  },
1698
- deltaRect: {
1699
- right: S[0]
1700
- }
1701
- };
1702
- y ? a.current?.onend?.(C) : w ? a.current?.onstart?.(C) : g && a.current?.onmove?.(C);
1703
- }, {
1704
- pointer: {
1705
- capture: !0
1706
- },
1707
- threshold: 0
1708
- }))));
1705
+ threshold: 0
1706
+ }));
1707
+ }
1709
1708
  });
1710
1709
  return et(() => {
1711
1710
  if (!i.current) return;
1712
- u.current?.destroy(), l.current?.destroy(), h.current?.destroy();
1713
- const v = {
1711
+ const w = {
1714
1712
  target: i.current,
1715
1713
  unset: () => {
1716
- u.current?.destroy(), l.current?.destroy(), h.current?.destroy();
1714
+ u.current?.destroy(), a.current?.destroy(), h.current?.destroy();
1717
1715
  }
1718
1716
  };
1719
- e && (e.current = v), b();
1720
- }, [t, r, e]), ur({
1717
+ e && (e.current = w), v();
1718
+ }, [t, r]), dr({
1721
1719
  children: n,
1722
1720
  ref: i,
1723
1721
  draggable: !1,
@@ -1727,243 +1725,243 @@ const Gs = ({
1727
1725
  }
1728
1726
  }
1729
1727
  });
1730
- }, fr = nt.forwardRef((n, e) => {
1728
+ }, hr = nt.forwardRef((n, e) => {
1731
1729
  const t = ze.c(70), {
1732
1730
  children: r,
1733
1731
  edges: s,
1734
1732
  left: o,
1735
1733
  width: i,
1736
1734
  start: c,
1737
- grid: a,
1735
+ grid: l,
1738
1736
  getBounds: u,
1739
- enableResizing: l,
1737
+ enableResizing: a,
1740
1738
  enableDragging: h,
1741
1739
  adsorptionDistance: f,
1742
1740
  adsorptionPositions: m,
1743
- onResizeStart: b,
1744
- onResize: v,
1745
- onResizeEnd: g,
1746
- onDragStart: S,
1741
+ onResizeStart: g,
1742
+ onResize: b,
1743
+ onResizeEnd: v,
1744
+ onDragStart: w,
1747
1745
  onDragEnd: _,
1748
- onDrag: w,
1746
+ onDrag: S,
1749
1747
  parentRef: y,
1750
- autoScroll: C
1751
- } = n, x = c === void 0 ? Jt : c, R = a === void 0 ? un : a, k = u === void 0 ? Ks : u, L = l === void 0 ? !0 : l, A = h === void 0 ? !0 : h, O = f === void 0 ? fn : f;
1752
- let $;
1753
- t[0] !== m ? ($ = m === void 0 ? [] : m, t[0] = m, t[1] = $) : $ = t[1];
1754
- const z = $, K = C === void 0 ? !0 : C, P = ie(void 0), N = ie(0), G = ie(!1), {
1748
+ autoScroll: T
1749
+ } = n, x = c === void 0 ? Jt : c, C = l === void 0 ? fn : l, P = u === void 0 ? Js : u, E = a === void 0 ? !0 : a, D = h === void 0 ? !0 : h, L = f === void 0 ? dn : f;
1750
+ let k;
1751
+ t[0] !== m ? (k = m === void 0 ? [] : m, t[0] = m, t[1] = k) : k = t[1];
1752
+ const F = k, K = T === void 0 ? !0 : T, O = ee(void 0), I = ee(0), G = ee(!1), {
1755
1753
  initAutoScroll: ue,
1756
1754
  stopAutoScroll: fe,
1757
1755
  dealDragAutoScroll: me,
1758
1756
  dealResizeAutoScroll: d
1759
- } = Zr(y);
1760
- let T, F;
1761
- t[2] === Symbol.for("react.memo_cache_sentinel") ? (T = () => {
1762
- const I = P.current;
1757
+ } = Qr(y);
1758
+ let A, V;
1759
+ t[2] === Symbol.for("react.memo_cache_sentinel") ? (A = () => {
1760
+ const W = O.current;
1763
1761
  return () => {
1764
- I?.unset();
1762
+ W?.unset();
1765
1763
  };
1766
- }, F = [], t[2] = T, t[3] = F) : (T = t[2], F = t[3]), et(T, F);
1764
+ }, V = [], t[2] = A, t[3] = V) : (A = t[2], V = t[3]), et(A, V);
1767
1765
  let H;
1768
- t[4] === Symbol.for("react.memo_cache_sentinel") ? (H = (I, J) => {
1766
+ t[4] === Symbol.for("react.memo_cache_sentinel") ? (H = (W, J) => {
1769
1767
  const Y = J === void 0 ? !0 : J;
1770
- if (!P.current || !P.current.target)
1768
+ if (!O.current || !O.current.target)
1771
1769
  return;
1772
- Y && (N.current = 0);
1773
- const j = P.current.target;
1774
- j.style.left = `${I}px`, Object.assign(j.dataset, {
1775
- left: I
1770
+ Y && (I.current = 0);
1771
+ const z = O.current.target;
1772
+ z.style.left = `${W}px`, Object.assign(z.dataset, {
1773
+ left: W
1776
1774
  });
1777
1775
  }, t[4] = H) : H = t[4];
1778
1776
  const q = H;
1779
1777
  let B;
1780
- t[5] === Symbol.for("react.memo_cache_sentinel") ? (B = (I, J) => {
1778
+ t[5] === Symbol.for("react.memo_cache_sentinel") ? (B = (W, J) => {
1781
1779
  const Y = J === void 0 ? !0 : J;
1782
- if (!P.current || !P.current.target)
1780
+ if (!O.current || !O.current.target)
1783
1781
  return;
1784
- Y && (N.current = 0);
1785
- const j = P.current.target;
1786
- j.style.width = `${I}px`, Object.assign(j.dataset, {
1787
- width: I
1782
+ Y && (I.current = 0);
1783
+ const z = O.current.target;
1784
+ z.style.width = `${W}px`, Object.assign(z.dataset, {
1785
+ width: W
1788
1786
  });
1789
1787
  }, t[5] = B) : B = t[5];
1790
- const V = B;
1791
- let D;
1792
- t[6] === Symbol.for("react.memo_cache_sentinel") ? (D = () => {
1793
- if (!P.current?.target)
1788
+ const U = B;
1789
+ let M;
1790
+ t[6] === Symbol.for("react.memo_cache_sentinel") ? (M = () => {
1791
+ if (!O.current?.target)
1794
1792
  return 0;
1795
- const I = P.current.target;
1796
- return parseFloat(I?.dataset?.left || "0");
1797
- }, t[6] = D) : D = t[6];
1798
- const M = D;
1799
- let U;
1800
- t[7] === Symbol.for("react.memo_cache_sentinel") ? (U = () => {
1801
- if (!P.current?.target)
1793
+ const W = O.current.target;
1794
+ return parseFloat(W?.dataset?.left || "0");
1795
+ }, t[6] = M) : M = t[6];
1796
+ const N = M;
1797
+ let $;
1798
+ t[7] === Symbol.for("react.memo_cache_sentinel") ? ($ = () => {
1799
+ if (!O.current?.target)
1802
1800
  return 0;
1803
- const I = P.current.target;
1804
- return parseFloat(I?.dataset?.width || "0");
1805
- }, t[7] = U) : U = t[7];
1806
- const tn = U;
1801
+ const W = O.current.target;
1802
+ return parseFloat(W?.dataset?.width || "0");
1803
+ }, t[7] = $) : $ = t[7];
1804
+ const tn = $;
1807
1805
  let ot, Fe;
1808
1806
  t[8] !== i ? (ot = () => {
1809
- if (!P.current?.target)
1807
+ if (!O.current?.target)
1810
1808
  return;
1811
- const I = P.current.target;
1812
- V(typeof i > "u" ? I.offsetWidth : i, !1);
1809
+ const W = O.current.target;
1810
+ U(typeof i > "u" ? W.offsetWidth : i, !1);
1813
1811
  }, Fe = [i], t[8] = i, t[9] = ot, t[10] = Fe) : (ot = t[9], Fe = t[10]), et(ot, Fe);
1814
- let Ae, Re;
1815
- t[11] !== o ? (Ae = () => {
1812
+ let Te, Re;
1813
+ t[11] !== o ? (Te = () => {
1816
1814
  q(o || 0, !1);
1817
- }, Re = [o], t[11] = o, t[12] = Ae, t[13] = Re) : (Ae = t[12], Re = t[13]), et(Ae, Re);
1815
+ }, Re = [o], t[11] = o, t[12] = Te, t[13] = Re) : (Te = t[12], Re = t[13]), et(Te, Re);
1818
1816
  let Ve;
1819
1817
  t[14] === Symbol.for("react.memo_cache_sentinel") ? (Ve = () => ({
1820
- updateLeft: (I) => q(I || 0, !1),
1821
- updateWidth: (I) => V(I, !1),
1822
- getLeft: M,
1818
+ updateLeft: (W) => q(W || 0, !1),
1819
+ updateWidth: (W) => U(W, !1),
1820
+ getLeft: N,
1823
1821
  getWidth: tn
1824
- }), t[14] = Ve) : Ve = t[14], Jn(e, Ve);
1822
+ }), t[14] = Ve) : Ve = t[14], Qn(e, Ve);
1825
1823
  let Pe;
1826
- t[15] !== ue || t[16] !== S ? (Pe = () => {
1827
- N.current = 0, G.current = !1, ue(), S && S();
1828
- }, t[15] = ue, t[16] = S, t[17] = Pe) : Pe = t[17];
1824
+ t[15] !== ue || t[16] !== w ? (Pe = () => {
1825
+ I.current = 0, G.current = !1, ue(), w && w();
1826
+ }, t[15] = ue, t[16] = w, t[17] = Pe) : Pe = t[17];
1829
1827
  const De = Pe;
1830
1828
  let Le;
1831
- t[18] !== O || t[19] !== z || t[20] !== k || t[21] !== R || t[22] !== w || t[23] !== x ? (Le = (I) => {
1829
+ t[18] !== L || t[19] !== F || t[20] !== P || t[21] !== C || t[22] !== S || t[23] !== x ? (Le = (W) => {
1832
1830
  const {
1833
1831
  preLeft: J,
1834
1832
  preWidth: Y,
1835
- scrollDelta: j
1836
- } = I;
1837
- j && (N.current = N.current + j);
1838
- const te = G.current ? O : R;
1839
- if (Math.abs(N.current) >= te) {
1840
- const ne = parseInt(N.current / te + "");
1841
- let X = J + ne * te, W = X;
1842
- const re = Number.MAX_SAFE_INTEGER;
1843
- if (z.forEach((Q) => {
1833
+ scrollDelta: z
1834
+ } = W;
1835
+ z && (I.current = I.current + z);
1836
+ const ne = G.current ? L : C;
1837
+ if (Math.abs(I.current) >= ne) {
1838
+ const re = parseInt(I.current / ne + "");
1839
+ let X = J + re * ne, j = X;
1840
+ const se = Number.MAX_SAFE_INTEGER;
1841
+ if (F.forEach((Q) => {
1844
1842
  const Z = Math.abs(Q - X);
1845
- Z < O && Z < re && (W = Q);
1843
+ Z < L && Z < se && (j = Q);
1846
1844
  const ce = Math.abs(Q - (X + Y));
1847
- ce < O && ce < re && (W = Q - Y);
1848
- }), W !== X ? (G.current = !0, X = W) : ((X - x) % R !== 0 && (X = x + R * Math.round((X - x) / R)), G.current = !1), N.current = N.current % te, X < k().left ? X = k().left : X + Y > k().right && (X = k().right - Y), w && w({
1845
+ ce < L && ce < se && (j = Q - Y);
1846
+ }), j !== X ? (G.current = !0, X = j) : ((X - x) % C !== 0 && (X = x + C * Math.round((X - x) / C)), G.current = !1), I.current = I.current % ne, X < P().left ? X = P().left : X + Y > P().right && (X = P().right - Y), S && S({
1849
1847
  lastLeft: J,
1850
1848
  left: X,
1851
1849
  lastWidth: Y,
1852
1850
  width: Y
1853
- }, j) === !1)
1851
+ }, z) === !1)
1854
1852
  return;
1855
1853
  q(X, !1);
1856
1854
  }
1857
- }, t[18] = O, t[19] = z, t[20] = k, t[21] = R, t[22] = w, t[23] = x, t[24] = Le) : Le = t[24];
1855
+ }, t[18] = L, t[19] = F, t[20] = P, t[21] = C, t[22] = S, t[23] = x, t[24] = Le) : Le = t[24];
1858
1856
  const it = Le;
1859
1857
  let ct;
1860
- t[25] !== K || t[26] !== me || t[27] !== it || t[28] !== y ? (ct = (I) => {
1861
- const J = I.target, {
1858
+ t[25] !== K || t[26] !== me || t[27] !== it || t[28] !== y ? (ct = (W) => {
1859
+ const J = W.target, {
1862
1860
  left: Y,
1863
- width: j
1864
- } = J.dataset, te = parseFloat(Y || "0"), ne = parseFloat(j || "0");
1865
- N.current = N.current + I.dx, !(K && y?.current && !me(I, (re) => {
1866
- if (!y?.current || !P.current?.target)
1861
+ width: z
1862
+ } = J.dataset, ne = parseFloat(Y || "0"), re = parseFloat(z || "0");
1863
+ I.current = I.current + W.dx, !(K && y?.current && !me(W, (se) => {
1864
+ if (!y?.current || !O.current?.target)
1867
1865
  return;
1868
- y.current.scrollLeft = y.current.scrollLeft + re;
1869
- const Q = P.current.target, Z = parseFloat(Q.dataset.left || "0"), ce = parseFloat(Q.dataset.width || "0");
1866
+ y.current.scrollLeft = y.current.scrollLeft + se;
1867
+ const Q = O.current.target, Z = parseFloat(Q.dataset.left || "0"), ce = parseFloat(Q.dataset.width || "0");
1870
1868
  it({
1871
1869
  preLeft: Z,
1872
1870
  preWidth: ce,
1873
- scrollDelta: re
1871
+ scrollDelta: se
1874
1872
  });
1875
1873
  })) && it({
1876
- preLeft: te,
1877
- preWidth: ne
1874
+ preLeft: ne,
1875
+ preWidth: re
1878
1876
  });
1879
1877
  }, t[25] = K, t[26] = me, t[27] = it, t[28] = y, t[29] = ct) : ct = t[29];
1880
1878
  const Ue = ct;
1881
1879
  let be;
1882
- t[30] !== _ || t[31] !== fe ? (be = (I) => {
1883
- N.current = 0, G.current = !1, fe();
1884
- const J = I.target, {
1880
+ t[30] !== _ || t[31] !== fe ? (be = (W) => {
1881
+ I.current = 0, G.current = !1, fe();
1882
+ const J = W.target, {
1885
1883
  left: Y,
1886
- width: j
1884
+ width: z
1887
1885
  } = J.dataset;
1888
1886
  _ && _({
1889
1887
  left: parseFloat(Y || "0"),
1890
- width: parseFloat(j || "0")
1888
+ width: parseFloat(z || "0")
1891
1889
  });
1892
1890
  }, t[30] = _, t[31] = fe, t[32] = be) : be = t[32];
1893
1891
  const $e = be;
1894
1892
  let Oe;
1895
- t[33] !== ue || t[34] !== b ? (Oe = (I) => {
1896
- N.current = 0, G.current = !1, ue();
1897
- const J = I.edges?.right ? "right" : "left";
1898
- b && b(J);
1899
- }, t[33] = ue, t[34] = b, t[35] = Oe) : Oe = t[35];
1893
+ t[33] !== ue || t[34] !== g ? (Oe = (W) => {
1894
+ I.current = 0, G.current = !1, ue();
1895
+ const J = W.edges?.right ? "right" : "left";
1896
+ g && g(J);
1897
+ }, t[33] = ue, t[34] = g, t[35] = Oe) : Oe = t[35];
1900
1898
  const Ke = Oe;
1901
1899
  let Me;
1902
- t[36] !== O || t[37] !== z || t[38] !== k || t[39] !== R || t[40] !== v || t[41] !== x ? (Me = (I) => {
1900
+ t[36] !== L || t[37] !== F || t[38] !== P || t[39] !== C || t[40] !== b || t[41] !== x ? (Me = (W) => {
1903
1901
  const {
1904
1902
  dir: J,
1905
1903
  preWidth: Y,
1906
- preLeft: j,
1907
- scrollDelta: te
1908
- } = I;
1909
- te && (N.current = N.current + te);
1910
- const ne = G.current ? O : R;
1904
+ preLeft: z,
1905
+ scrollDelta: ne
1906
+ } = W;
1907
+ ne && (I.current = I.current + ne);
1908
+ const re = G.current ? L : C;
1911
1909
  if (J === "left") {
1912
- if (Math.abs(N.current) >= ne) {
1913
- const X = parseInt(N.current / ne + "");
1914
- let W = j + X * ne, re = W;
1910
+ if (Math.abs(I.current) >= re) {
1911
+ const X = parseInt(I.current / re + "");
1912
+ let j = z + X * re, se = j;
1915
1913
  const Q = Number.MAX_SAFE_INTEGER;
1916
- z.forEach((_e) => {
1917
- const We = Math.abs(_e - W);
1918
- We < O && We < Q && (re = _e);
1919
- }), re !== W ? (G.current = !0, W = re) : ((W - x) % R !== 0 && (W = x + R * Math.round((W - x) / R)), G.current = !1), N.current = N.current % ne;
1920
- const Z = j + Y;
1921
- W < k().left && (W = k().left);
1922
- const ce = Z - W;
1923
- if (v && v("left", {
1924
- lastLeft: j,
1914
+ F.forEach((_e) => {
1915
+ const We = Math.abs(_e - j);
1916
+ We < L && We < Q && (se = _e);
1917
+ }), se !== j ? (G.current = !0, j = se) : ((j - x) % C !== 0 && (j = x + C * Math.round((j - x) / C)), G.current = !1), I.current = I.current % re;
1918
+ const Z = z + Y;
1919
+ j < P().left && (j = P().left);
1920
+ const ce = Z - j;
1921
+ if (j >= Z || b && b("left", {
1922
+ lastLeft: z,
1925
1923
  lastWidth: Y,
1926
- left: W,
1924
+ left: j,
1927
1925
  width: ce
1928
1926
  }) === !1)
1929
1927
  return;
1930
- q(W, !1), V(ce, !1);
1928
+ q(j, !1), U(ce, !1);
1931
1929
  }
1932
- } else if (J === "right" && Math.abs(N.current) >= ne) {
1933
- const X = parseInt(N.current / R + "");
1934
- let W = Y + X * R, re = j + W;
1930
+ } else if (J === "right" && Math.abs(I.current) >= re) {
1931
+ const X = parseInt(I.current / C + "");
1932
+ let j = Y + X * C, se = z + j;
1935
1933
  const Q = Number.MAX_SAFE_INTEGER;
1936
- if (z.forEach((Z) => {
1937
- const ce = Math.abs(Z - (j + W));
1938
- ce < O && ce < Q && (re = Z);
1939
- }), re !== j + W)
1940
- G.current = !0, W = re - j;
1934
+ if (F.forEach((Z) => {
1935
+ const ce = Math.abs(Z - (z + j));
1936
+ ce < L && ce < Q && (se = Z);
1937
+ }), se !== z + j)
1938
+ G.current = !0, j = se - z;
1941
1939
  else {
1942
- let Z = j + W;
1943
- (Z - x) % R !== 0 && (Z = x + R * Math.round((Z - x) / R), W = Z - j), G.current = !1;
1940
+ let Z = z + j;
1941
+ (Z - x) % C !== 0 && (Z = x + C * Math.round((Z - x) / C), j = Z - z), G.current = !1;
1944
1942
  }
1945
- if (N.current = N.current % ne, j + W > k().right && (W = k().right - j), v && v("right", {
1946
- lastLeft: j,
1943
+ if (I.current = I.current % re, z + j > P().right && (j = P().right - z), j <= 0 || b && b("right", {
1944
+ lastLeft: z,
1947
1945
  lastWidth: Y,
1948
- left: j,
1949
- width: W
1946
+ left: z,
1947
+ width: j
1950
1948
  }) === !1)
1951
1949
  return;
1952
- V(W, !1);
1950
+ U(j, !1);
1953
1951
  }
1954
- }, t[36] = O, t[37] = z, t[38] = k, t[39] = R, t[40] = v, t[41] = x, t[42] = Me) : Me = t[42];
1952
+ }, t[36] = L, t[37] = F, t[38] = P, t[39] = C, t[40] = b, t[41] = x, t[42] = Me) : Me = t[42];
1955
1953
  const ye = Me;
1956
1954
  let Ne;
1957
- t[43] !== K || t[44] !== d || t[45] !== y || t[46] !== ye ? (Ne = (I) => {
1958
- const J = I.target, Y = I.edges?.left ? "left" : "right", {
1959
- left: j,
1960
- width: te
1961
- } = J.dataset, ne = parseFloat(j || "0"), X = parseFloat(te || "0");
1962
- N.current = N.current + (Y === "left" ? I.deltaRect?.left || 0 : I.deltaRect?.right || 0), !(K && y?.current && !d(I, Y, (Q) => {
1963
- if (!y?.current || !P.current?.target)
1955
+ t[43] !== K || t[44] !== d || t[45] !== y || t[46] !== ye ? (Ne = (W) => {
1956
+ const J = W.target, Y = W.edges?.left ? "left" : "right", {
1957
+ left: z,
1958
+ width: ne
1959
+ } = J.dataset, re = parseFloat(z || "0"), X = parseFloat(ne || "0");
1960
+ I.current = I.current + (Y === "left" ? W.deltaRect?.left || 0 : W.deltaRect?.right || 0), !(K && y?.current && !d(W, Y, (Q) => {
1961
+ if (!y?.current || !O.current?.target)
1964
1962
  return;
1965
1963
  y.current.scrollLeft = y.current.scrollLeft + Q;
1966
- const Z = P.current.target, ce = parseFloat(Z.dataset.left || "0"), _e = parseFloat(Z.dataset.width || "0");
1964
+ const Z = O.current.target, ce = parseFloat(Z.dataset.left || "0"), _e = parseFloat(Z.dataset.width || "0");
1967
1965
  ye({
1968
1966
  preLeft: ce,
1969
1967
  preWidth: _e,
@@ -1971,24 +1969,24 @@ const Gs = ({
1971
1969
  scrollDelta: Q
1972
1970
  });
1973
1971
  })) && ye({
1974
- preLeft: ne,
1972
+ preLeft: re,
1975
1973
  preWidth: X,
1976
1974
  dir: Y
1977
1975
  });
1978
1976
  }, t[43] = K, t[44] = d, t[45] = y, t[46] = ye, t[47] = Ne) : Ne = t[47];
1979
1977
  const qe = Ne;
1980
1978
  let Ie;
1981
- t[48] !== g || t[49] !== fe ? (Ie = (I) => {
1982
- N.current = 0, G.current = !1, fe();
1983
- const J = I.target, {
1979
+ t[48] !== v || t[49] !== fe ? (Ie = (W) => {
1980
+ I.current = 0, G.current = !1, fe();
1981
+ const J = W.target, {
1984
1982
  left: Y,
1985
- width: j
1986
- } = J.dataset, te = I.edges?.right ? "right" : "left";
1987
- g && g(te, {
1983
+ width: z
1984
+ } = J.dataset, ne = W.edges?.right ? "right" : "left";
1985
+ v && v(ne, {
1988
1986
  left: parseFloat(Y || "0"),
1989
- width: parseFloat(j || "0")
1987
+ width: parseFloat(z || "0")
1990
1988
  });
1991
- }, t[48] = g, t[49] = fe, t[50] = Ie) : Ie = t[50];
1989
+ }, t[48] = v, t[49] = fe, t[50] = Ie) : Ie = t[50];
1992
1990
  const Je = Ie;
1993
1991
  let Ee;
1994
1992
  t[51] !== Ue || t[52] !== De || t[53] !== $e ? (Ee = {
@@ -1996,7 +1994,7 @@ const Gs = ({
1996
1994
  onmove: Ue,
1997
1995
  onstart: De,
1998
1996
  onend: $e,
1999
- cursorChecker: qs
1997
+ cursorChecker: Zs
2000
1998
  }, t[51] = Ue, t[52] = De, t[53] = $e, t[54] = Ee) : Ee = t[54];
2001
1999
  let xe;
2002
2000
  t[55] !== s || t[56] !== qe || t[57] !== Ke || t[58] !== Je ? (xe = {
@@ -2009,7 +2007,7 @@ const Gs = ({
2009
2007
  }, t[55] = s, t[56] = qe, t[57] = Ke, t[58] = Je, t[59] = xe) : xe = t[59];
2010
2008
  const He = r;
2011
2009
  let Ce;
2012
- t[60] !== o || t[61] !== He || t[62] !== i ? (Ce = ur({
2010
+ t[60] !== o || t[61] !== He || t[62] !== i ? (Ce = dr({
2013
2011
  children: He,
2014
2012
  style: {
2015
2013
  left: o,
@@ -2017,24 +2015,24 @@ const Gs = ({
2017
2015
  }
2018
2016
  }), t[60] = o, t[61] = He, t[62] = i, t[63] = Ce) : Ce = t[63];
2019
2017
  let ke;
2020
- return t[64] !== A || t[65] !== L || t[66] !== Ee || t[67] !== xe || t[68] !== Ce ? (ke = /* @__PURE__ */ E.jsx(Gs, { interactRef: P, draggable: A, resizable: L, draggableOptions: Ee, resizableOptions: xe, children: Ce }), t[64] = A, t[65] = L, t[66] = Ee, t[67] = xe, t[68] = Ce, t[69] = ke) : ke = t[69], ke;
2018
+ return t[64] !== D || t[65] !== E || t[66] !== Ee || t[67] !== xe || t[68] !== Ce ? (ke = /* @__PURE__ */ R.jsx(qs, { interactRef: O, draggable: D, resizable: E, draggableOptions: Ee, resizableOptions: xe, children: Ce }), t[64] = D, t[65] = E, t[66] = Ee, t[67] = xe, t[68] = Ce, t[69] = ke) : ke = t[69], ke;
2021
2019
  });
2022
- function Ks() {
2020
+ function Js() {
2023
2021
  return {
2024
2022
  left: Number.MIN_SAFE_INTEGER,
2025
2023
  right: Number.MAX_SAFE_INTEGER
2026
2024
  };
2027
2025
  }
2028
- function qs() {
2026
+ function Zs() {
2029
2027
  return "";
2030
2028
  }
2031
- function Js() {
2029
+ function Qs() {
2032
2030
  let n = 0, e, t = "", r = arguments.length;
2033
2031
  for (; n < r; n++)
2034
2032
  (e = arguments[n]) && typeof e == "string" && (t += (t && " ") + e);
2035
2033
  return t;
2036
2034
  }
2037
- const Zs = (n) => {
2035
+ const eo = (n) => {
2038
2036
  const e = ze.c(191), {
2039
2037
  editorData: t,
2040
2038
  row: r,
@@ -2042,318 +2040,318 @@ const Zs = (n) => {
2042
2040
  effects: o,
2043
2041
  rowHeight: i,
2044
2042
  scale: c,
2045
- scaleWidth: a,
2043
+ scaleWidth: l,
2046
2044
  scaleSplitCount: u,
2047
- startLeft: l,
2045
+ startLeft: a,
2048
2046
  gridSnap: h,
2049
2047
  disableDrag: f,
2050
2048
  scaleCount: m,
2051
- maxScaleCount: b,
2052
- setScaleCount: v,
2053
- onActionMoveStart: g,
2054
- onActionMoving: S,
2049
+ maxScaleCount: g,
2050
+ setScaleCount: b,
2051
+ onActionMoveStart: v,
2052
+ onActionMoving: w,
2055
2053
  onActionMoveEnd: _,
2056
- onActionResizeStart: w,
2054
+ onActionResizeStart: S,
2057
2055
  onActionResizeEnd: y,
2058
- onActionResizing: C,
2056
+ onActionResizing: T,
2059
2057
  dragLineData: x,
2060
- setEditorData: R,
2061
- onClickAction: k,
2062
- onClickActionOnly: L,
2063
- onDoubleClickAction: A,
2064
- onContextMenuAction: O,
2065
- getActionRender: $,
2066
- handleTime: z,
2058
+ setEditorData: C,
2059
+ onClickAction: P,
2060
+ onClickActionOnly: E,
2061
+ onDoubleClickAction: D,
2062
+ onContextMenuAction: L,
2063
+ getActionRender: k,
2064
+ handleTime: F,
2067
2065
  scrollContainerRef: K
2068
- } = n, P = ie(null), N = ie(!1), {
2066
+ } = n, O = ee(null), I = ee(!1), {
2069
2067
  id: G,
2070
2068
  maxEnd: ue,
2071
2069
  minStart: fe,
2072
2070
  end: me,
2073
2071
  start: d,
2074
- selected: T,
2075
- flexible: F,
2072
+ selected: A,
2073
+ flexible: V,
2076
2074
  movable: H,
2077
2075
  effectId: q
2078
- } = s, B = F === void 0 ? !0 : F, V = H === void 0 ? !0 : H, D = c ?? Yt, M = a ?? Xt, U = l ?? Jt, tn = u ?? Qn, ot = b ?? Number.MAX_SAFE_INTEGER, Fe = fe || 0;
2079
- let Ae;
2080
- e[0] !== D || e[1] !== M || e[2] !== U || e[3] !== Fe ? (Ae = je(Fe, {
2081
- startLeft: U,
2082
- scale: D,
2083
- scaleWidth: M
2084
- }), e[0] = D, e[1] = M, e[2] = U, e[3] = Fe, e[4] = Ae) : Ae = e[4];
2085
- const Re = Ae, Ve = ue || Number.MAX_VALUE;
2076
+ } = s, B = V === void 0 ? !0 : V, U = H === void 0 ? !0 : H, M = c ?? Yt, N = l ?? Xt, $ = a ?? Jt, tn = u ?? tr, ot = g ?? Number.MAX_SAFE_INTEGER, Fe = fe || 0;
2077
+ let Te;
2078
+ e[0] !== M || e[1] !== N || e[2] !== $ || e[3] !== Fe ? (Te = je(Fe, {
2079
+ startLeft: $,
2080
+ scale: M,
2081
+ scaleWidth: N
2082
+ }), e[0] = M, e[1] = N, e[2] = $, e[3] = Fe, e[4] = Te) : Te = e[4];
2083
+ const Re = Te, Ve = ue || Number.MAX_VALUE;
2086
2084
  let Pe;
2087
- e[5] !== D || e[6] !== M || e[7] !== U || e[8] !== Ve ? (Pe = je(Ve, {
2088
- startLeft: U,
2089
- scale: D,
2090
- scaleWidth: M
2091
- }), e[5] = D, e[6] = M, e[7] = U, e[8] = Ve, e[9] = Pe) : Pe = e[9];
2092
- const De = Math.min(ot * M + U, Pe);
2085
+ e[5] !== M || e[6] !== N || e[7] !== $ || e[8] !== Ve ? (Pe = je(Ve, {
2086
+ startLeft: $,
2087
+ scale: M,
2088
+ scaleWidth: N
2089
+ }), e[5] = M, e[6] = N, e[7] = $, e[8] = Ve, e[9] = Pe) : Pe = e[9];
2090
+ const De = Math.min(ot * N + $, Pe);
2093
2091
  let Le;
2094
- e[10] !== me || e[11] !== D || e[12] !== M || e[13] !== U || e[14] !== d ? (Le = gn({
2092
+ e[10] !== me || e[11] !== M || e[12] !== N || e[13] !== $ || e[14] !== d ? (Le = vn({
2095
2093
  start: d,
2096
2094
  end: me
2097
2095
  }, {
2098
- startLeft: U,
2099
- scale: D,
2100
- scaleWidth: M
2101
- }), e[10] = me, e[11] = D, e[12] = M, e[13] = U, e[14] = d, e[15] = Le) : Le = e[15];
2102
- const it = Le, [ct, Ue] = Tt(null), be = ct ?? it, $e = M / tn;
2096
+ startLeft: $,
2097
+ scale: M,
2098
+ scaleWidth: N
2099
+ }), e[10] = me, e[11] = M, e[12] = N, e[13] = $, e[14] = d, e[15] = Le) : Le = e[15];
2100
+ const it = Le, [ct, Ue] = At(null), be = ct ?? it, $e = N / tn;
2103
2101
  let Oe;
2104
- e[16] !== q || e[17] !== o || e[18] !== B || e[19] !== V || e[20] !== T ? (Oe = de(Js("action", V && "action-movable", T && "action-selected", B && "action-flexible", o[q] && `action-effect-${q}`)), e[16] = q, e[17] = o, e[18] = B, e[19] = V, e[20] = T, e[21] = Oe) : Oe = e[21];
2102
+ e[16] !== q || e[17] !== o || e[18] !== B || e[19] !== U || e[20] !== A ? (Oe = de(Qs("action", U && "action-movable", A && "action-selected", B && "action-flexible", o[q] && `action-effect-${q}`)), e[16] = q, e[17] = o, e[18] = B, e[19] = U, e[20] = A, e[21] = Oe) : Oe = e[21];
2105
2103
  const Ke = Oe;
2106
2104
  let Me;
2107
- e[22] !== M || e[23] !== U || e[24] !== m || e[25] !== v ? (Me = (pe, ge) => {
2108
- const se = Hr(pe + ge, {
2109
- startLeft: U,
2105
+ e[22] !== N || e[23] !== $ || e[24] !== m || e[25] !== b ? (Me = (pe, ge) => {
2106
+ const oe = Br(pe + ge, {
2107
+ startLeft: $,
2110
2108
  scaleCount: m,
2111
- scaleWidth: M
2109
+ scaleWidth: N
2112
2110
  });
2113
- se !== m && v(se);
2114
- }, e[22] = M, e[23] = U, e[24] = m, e[25] = v, e[26] = Me) : Me = e[26];
2111
+ oe !== m && b(oe);
2112
+ }, e[22] = N, e[23] = $, e[24] = m, e[25] = b, e[26] = Me) : Me = e[26];
2115
2113
  const ye = Me;
2116
2114
  let Ne;
2117
- e[27] !== s || e[28] !== g || e[29] !== r ? (Ne = () => {
2118
- g && g({
2115
+ e[27] !== s || e[28] !== v || e[29] !== r ? (Ne = () => {
2116
+ v && v({
2119
2117
  action: s,
2120
2118
  row: r
2121
2119
  });
2122
- }, e[27] = s, e[28] = g, e[29] = r, e[30] = Ne) : Ne = e[30];
2120
+ }, e[27] = s, e[28] = v, e[29] = r, e[30] = Ne) : Ne = e[30];
2123
2121
  const qe = Ne;
2124
2122
  let Ie;
2125
- e[31] !== s || e[32] !== ye || e[33] !== S || e[34] !== r || e[35] !== D || e[36] !== M || e[37] !== U ? (Ie = (pe) => {
2123
+ e[31] !== s || e[32] !== ye || e[33] !== w || e[34] !== r || e[35] !== M || e[36] !== N || e[37] !== $ ? (Ie = (pe) => {
2126
2124
  const {
2127
2125
  left: ge,
2128
- width: se
2126
+ width: oe
2129
2127
  } = pe;
2130
- if (N.current = !0, S) {
2128
+ if (I.current = !0, w) {
2131
2129
  const {
2132
2130
  start: le,
2133
- end: oe
2131
+ end: ie
2134
2132
  } = Lt({
2135
2133
  left: ge,
2136
- width: se
2134
+ width: oe
2137
2135
  }, {
2138
- scaleWidth: M,
2139
- scale: D,
2140
- startLeft: U
2136
+ scaleWidth: N,
2137
+ scale: M,
2138
+ startLeft: $
2141
2139
  });
2142
- if (S({
2140
+ if (w({
2143
2141
  action: s,
2144
2142
  row: r,
2145
2143
  start: le,
2146
- end: oe
2144
+ end: ie
2147
2145
  }) === !1)
2148
2146
  return !1;
2149
2147
  }
2150
2148
  Ue({
2151
2149
  left: ge,
2152
- width: se
2153
- }), ye(ge, se);
2154
- }, e[31] = s, e[32] = ye, e[33] = S, e[34] = r, e[35] = D, e[36] = M, e[37] = U, e[38] = Ie) : Ie = e[38];
2150
+ width: oe
2151
+ }), ye(ge, oe);
2152
+ }, e[31] = s, e[32] = ye, e[33] = w, e[34] = r, e[35] = M, e[36] = N, e[37] = $, e[38] = Ie) : Ie = e[38];
2155
2153
  const Je = Ie;
2156
2154
  let Ee;
2157
- e[39] !== t || e[40] !== G || e[41] !== _ || e[42] !== r || e[43] !== D || e[44] !== M || e[45] !== U || e[46] !== R ? (Ee = (pe) => {
2155
+ e[39] !== t || e[40] !== G || e[41] !== _ || e[42] !== r || e[43] !== M || e[44] !== N || e[45] !== $ || e[46] !== C ? (Ee = (pe) => {
2158
2156
  const {
2159
2157
  left: ge,
2160
- width: se
2158
+ width: oe
2161
2159
  } = pe, {
2162
2160
  start: le,
2163
- end: oe
2161
+ end: ie
2164
2162
  } = Lt({
2165
2163
  left: ge,
2166
- width: se
2164
+ width: oe
2167
2165
  }, {
2168
- scaleWidth: M,
2169
- scale: D,
2170
- startLeft: U
2166
+ scaleWidth: N,
2167
+ scale: M,
2168
+ startLeft: $
2171
2169
  }), ae = t.find((Ge) => Ge.id === r.id);
2172
2170
  if (!ae)
2173
2171
  return;
2174
2172
  const Xe = ae.actions.find((Ge) => Ge.id === G);
2175
- Xe && (Xe.start = le, Xe.end = oe, R(t), _ && _({
2173
+ Xe && (Xe.start = le, Xe.end = ie, C(t), _ && _({
2176
2174
  action: Xe,
2177
2175
  row: r,
2178
2176
  start: le,
2179
- end: oe
2177
+ end: ie
2180
2178
  }), Ue(null));
2181
- }, e[39] = t, e[40] = G, e[41] = _, e[42] = r, e[43] = D, e[44] = M, e[45] = U, e[46] = R, e[47] = Ee) : Ee = e[47];
2179
+ }, e[39] = t, e[40] = G, e[41] = _, e[42] = r, e[43] = M, e[44] = N, e[45] = $, e[46] = C, e[47] = Ee) : Ee = e[47];
2182
2180
  const xe = Ee;
2183
2181
  let He;
2184
- e[48] !== s || e[49] !== w || e[50] !== r ? (He = (pe) => {
2185
- w && w({
2182
+ e[48] !== s || e[49] !== S || e[50] !== r ? (He = (pe) => {
2183
+ S && S({
2186
2184
  action: s,
2187
2185
  row: r,
2188
2186
  dir: pe
2189
2187
  });
2190
- }, e[48] = s, e[49] = w, e[50] = r, e[51] = He) : He = e[51];
2188
+ }, e[48] = s, e[49] = S, e[50] = r, e[51] = He) : He = e[51];
2191
2189
  const Ce = He;
2192
2190
  let ke;
2193
- e[52] !== s || e[53] !== ye || e[54] !== C || e[55] !== r || e[56] !== D || e[57] !== M || e[58] !== U ? (ke = (pe, ge) => {
2191
+ e[52] !== s || e[53] !== ye || e[54] !== T || e[55] !== r || e[56] !== M || e[57] !== N || e[58] !== $ ? (ke = (pe, ge) => {
2194
2192
  const {
2195
- left: se,
2193
+ left: oe,
2196
2194
  width: le
2197
2195
  } = ge;
2198
- if (N.current = !0, C) {
2196
+ if (I.current = !0, T) {
2199
2197
  const {
2200
- start: oe,
2198
+ start: ie,
2201
2199
  end: ae
2202
2200
  } = Lt({
2203
- left: se,
2201
+ left: oe,
2204
2202
  width: le
2205
2203
  }, {
2206
- scaleWidth: M,
2207
- scale: D,
2208
- startLeft: U
2204
+ scaleWidth: N,
2205
+ scale: M,
2206
+ startLeft: $
2209
2207
  });
2210
- if (C({
2208
+ if (T({
2211
2209
  action: s,
2212
2210
  row: r,
2213
- start: oe,
2211
+ start: ie,
2214
2212
  end: ae,
2215
2213
  dir: pe
2216
2214
  }) === !1)
2217
2215
  return !1;
2218
2216
  }
2219
2217
  Ue({
2220
- left: se,
2218
+ left: oe,
2221
2219
  width: le
2222
- }), ye(se, le);
2223
- }, e[52] = s, e[53] = ye, e[54] = C, e[55] = r, e[56] = D, e[57] = M, e[58] = U, e[59] = ke) : ke = e[59];
2224
- const I = ke;
2220
+ }), ye(oe, le);
2221
+ }, e[52] = s, e[53] = ye, e[54] = T, e[55] = r, e[56] = M, e[57] = N, e[58] = $, e[59] = ke) : ke = e[59];
2222
+ const W = ke;
2225
2223
  let J;
2226
- e[60] !== t || e[61] !== G || e[62] !== y || e[63] !== r || e[64] !== D || e[65] !== M || e[66] !== U || e[67] !== R ? (J = (pe, ge) => {
2224
+ e[60] !== t || e[61] !== G || e[62] !== y || e[63] !== r || e[64] !== M || e[65] !== N || e[66] !== $ || e[67] !== C ? (J = (pe, ge) => {
2227
2225
  const {
2228
- left: se,
2226
+ left: oe,
2229
2227
  width: le
2230
2228
  } = ge, {
2231
- start: oe,
2229
+ start: ie,
2232
2230
  end: ae
2233
2231
  } = Lt({
2234
- left: se,
2232
+ left: oe,
2235
2233
  width: le
2236
2234
  }, {
2237
- scaleWidth: M,
2238
- scale: D,
2239
- startLeft: U
2235
+ scaleWidth: N,
2236
+ scale: M,
2237
+ startLeft: $
2240
2238
  }), Xe = t.find((nn) => nn.id === r.id);
2241
2239
  if (!Xe)
2242
2240
  return;
2243
2241
  const Ge = Xe.actions.find((nn) => nn.id === G);
2244
- Ge && (Ge.start = oe, Ge.end = ae, R(t), y && y({
2242
+ Ge && (Ge.start = ie, Ge.end = ae, C(t), y && y({
2245
2243
  action: Ge,
2246
2244
  row: r,
2247
- start: oe,
2245
+ start: ie,
2248
2246
  end: ae,
2249
2247
  dir: pe
2250
2248
  }), Ue(null));
2251
- }, e[60] = t, e[61] = G, e[62] = y, e[63] = r, e[64] = D, e[65] = M, e[66] = U, e[67] = R, e[68] = J) : J = e[68];
2249
+ }, e[60] = t, e[61] = G, e[62] = y, e[63] = r, e[64] = M, e[65] = N, e[66] = $, e[67] = C, e[68] = J) : J = e[68];
2252
2250
  const Y = J;
2253
- let j, te, ne, X, W, re, Q, Z, ce, _e, We, at, lt, ut, ft, dt, Be, Ye, ht, mt, pt, gt, vt, bt, _t, wt;
2254
- if (e[69] !== s || e[70] !== Ke || e[71] !== f || e[72] !== x.assistPositions || e[73] !== B || e[74] !== $ || e[75] !== $e || e[76] !== h || e[77] !== Je || e[78] !== xe || e[79] !== qe || e[80] !== Y || e[81] !== Ce || e[82] !== I || e[83] !== z || e[84] !== Re || e[85] !== V || e[86] !== k || e[87] !== L || e[88] !== O || e[89] !== A || e[90] !== De || e[91] !== r || e[92] !== i || e[93] !== D || e[94] !== M || e[95] !== U || e[96] !== K || e[97] !== be.left || e[98] !== be.width) {
2251
+ let z, ne, re, X, j, se, Q, Z, ce, _e, We, at, lt, ut, ft, dt, Be, Ye, ht, mt, pt, gt, vt, bt, _t, wt;
2252
+ if (e[69] !== s || e[70] !== Ke || e[71] !== f || e[72] !== x.assistPositions || e[73] !== B || e[74] !== k || e[75] !== $e || e[76] !== h || e[77] !== Je || e[78] !== xe || e[79] !== qe || e[80] !== Y || e[81] !== Ce || e[82] !== W || e[83] !== F || e[84] !== Re || e[85] !== U || e[86] !== P || e[87] !== E || e[88] !== L || e[89] !== D || e[90] !== De || e[91] !== r || e[92] !== i || e[93] !== M || e[94] !== N || e[95] !== $ || e[96] !== K || e[97] !== be.left || e[98] !== be.width) {
2255
2253
  const pe = {
2256
2254
  ...s,
2257
2255
  ...Lt({
2258
2256
  left: be.left,
2259
2257
  width: be.width
2260
2258
  }, {
2261
- startLeft: U,
2262
- scaleWidth: M,
2263
- scale: D
2259
+ startLeft: $,
2260
+ scaleWidth: N,
2261
+ scale: M
2264
2262
  })
2265
2263
  }, ge = {
2266
2264
  ...r,
2267
2265
  actions: [...r.actions]
2268
2266
  };
2269
- r.actions.includes(s) && (ge.actions[r.actions.indexOf(s)] = pe), j = fr, ce = P, _e = K, We = U, at = be.left, lt = be.width, ut = h && $e || un, ft = h ? Math.max(($e || un) / 2, fn) : fn, dt = x.assistPositions, e[125] !== Re || e[126] !== De ? (Be = () => ({
2267
+ r.actions.includes(s) && (ge.actions[r.actions.indexOf(s)] = pe), z = hr, ce = O, _e = K, We = $, at = be.left, lt = be.width, ut = h && $e || fn, ft = h ? Math.max(($e || fn) / 2, dn) : dn, dt = x.assistPositions, e[125] !== Re || e[126] !== De ? (Be = () => ({
2270
2268
  left: Re,
2271
2269
  right: De
2272
2270
  }), e[125] = Re, e[126] = De, e[127] = Be) : Be = e[127];
2273
- let se;
2274
- e[128] !== f || e[129] !== B ? (se = !f && B && `.${de("action-left-stretch")}`, e[128] = f, e[129] = B, e[130] = se) : se = e[130];
2271
+ let oe;
2272
+ e[128] !== f || e[129] !== B ? (oe = !f && B && `.${de("action-left-stretch")}`, e[128] = f, e[129] = B, e[130] = oe) : oe = e[130];
2275
2273
  let le;
2276
- e[131] !== f || e[132] !== B ? (le = !f && B && `.${de("action-right-stretch")}`, e[131] = f, e[132] = B, e[133] = le) : le = e[133], e[134] !== se || e[135] !== le ? (Ye = {
2277
- left: se,
2274
+ e[131] !== f || e[132] !== B ? (le = !f && B && `.${de("action-right-stretch")}`, e[131] = f, e[132] = B, e[133] = le) : le = e[133], e[134] !== oe || e[135] !== le ? (Ye = {
2275
+ left: oe,
2278
2276
  right: le
2279
- }, e[134] = se, e[135] = le, e[136] = Ye) : Ye = e[136], ht = !f && V, mt = !f && B, pt = qe, gt = Je, vt = xe, bt = Ce, _t = I, wt = Y, e[137] === Symbol.for("react.memo_cache_sentinel") ? (te = () => {
2280
- N.current = !1;
2281
- }, e[137] = te) : te = e[137], e[138] !== s || e[139] !== z || e[140] !== k || e[141] !== L || e[142] !== r ? (ne = (oe) => {
2277
+ }, e[134] = oe, e[135] = le, e[136] = Ye) : Ye = e[136], ht = !f && U, mt = !f && B, pt = qe, gt = Je, vt = xe, bt = Ce, _t = W, wt = Y, e[137] === Symbol.for("react.memo_cache_sentinel") ? (ne = () => {
2278
+ I.current = !1;
2279
+ }, e[137] = ne) : ne = e[137], e[138] !== s || e[139] !== F || e[140] !== P || e[141] !== E || e[142] !== r ? (re = (ie) => {
2282
2280
  let ae;
2283
- k && (ae = z(oe), k(oe, {
2281
+ P && (ae = F(ie), P(ie, {
2284
2282
  row: r,
2285
2283
  action: s,
2286
2284
  time: ae
2287
- })), !N.current && L && (ae === void 0 && (ae = z(oe)), L(oe, {
2285
+ })), !I.current && E && (ae === void 0 && (ae = F(ie)), E(ie, {
2288
2286
  row: r,
2289
2287
  action: s,
2290
2288
  time: ae
2291
2289
  }));
2292
- }, e[138] = s, e[139] = z, e[140] = k, e[141] = L, e[142] = r, e[143] = ne) : ne = e[143], e[144] !== s || e[145] !== z || e[146] !== A || e[147] !== r ? (X = (oe) => {
2293
- if (A) {
2294
- const ae = z(oe);
2295
- A(oe, {
2290
+ }, e[138] = s, e[139] = F, e[140] = P, e[141] = E, e[142] = r, e[143] = re) : re = e[143], e[144] !== s || e[145] !== F || e[146] !== D || e[147] !== r ? (X = (ie) => {
2291
+ if (D) {
2292
+ const ae = F(ie);
2293
+ D(ie, {
2296
2294
  row: r,
2297
2295
  action: s,
2298
2296
  time: ae
2299
2297
  });
2300
2298
  }
2301
- }, e[144] = s, e[145] = z, e[146] = A, e[147] = r, e[148] = X) : X = e[148], e[149] !== s || e[150] !== z || e[151] !== O || e[152] !== r ? (W = (oe) => {
2302
- if (O) {
2303
- const ae = z(oe);
2304
- O(oe, {
2299
+ }, e[144] = s, e[145] = F, e[146] = D, e[147] = r, e[148] = X) : X = e[148], e[149] !== s || e[150] !== F || e[151] !== L || e[152] !== r ? (j = (ie) => {
2300
+ if (L) {
2301
+ const ae = F(ie);
2302
+ L(ie, {
2305
2303
  row: r,
2306
2304
  action: s,
2307
2305
  time: ae
2308
2306
  });
2309
2307
  }
2310
- }, e[149] = s, e[150] = z, e[151] = O, e[152] = r, e[153] = W) : W = e[153], re = Ke, e[154] !== i ? (Q = {
2308
+ }, e[149] = s, e[150] = F, e[151] = L, e[152] = r, e[153] = j) : j = e[153], se = Ke, e[154] !== i ? (Q = {
2311
2309
  height: i
2312
- }, e[154] = i, e[155] = Q) : Q = e[155], Z = $ && $(pe, ge), e[69] = s, e[70] = Ke, e[71] = f, e[72] = x.assistPositions, e[73] = B, e[74] = $, e[75] = $e, e[76] = h, e[77] = Je, e[78] = xe, e[79] = qe, e[80] = Y, e[81] = Ce, e[82] = I, e[83] = z, e[84] = Re, e[85] = V, e[86] = k, e[87] = L, e[88] = O, e[89] = A, e[90] = De, e[91] = r, e[92] = i, e[93] = D, e[94] = M, e[95] = U, e[96] = K, e[97] = be.left, e[98] = be.width, e[99] = j, e[100] = te, e[101] = ne, e[102] = X, e[103] = W, e[104] = re, e[105] = Q, e[106] = Z, e[107] = ce, e[108] = _e, e[109] = We, e[110] = at, e[111] = lt, e[112] = ut, e[113] = ft, e[114] = dt, e[115] = Be, e[116] = Ye, e[117] = ht, e[118] = mt, e[119] = pt, e[120] = gt, e[121] = vt, e[122] = bt, e[123] = _t, e[124] = wt;
2310
+ }, e[154] = i, e[155] = Q) : Q = e[155], Z = k && k(pe, ge), e[69] = s, e[70] = Ke, e[71] = f, e[72] = x.assistPositions, e[73] = B, e[74] = k, e[75] = $e, e[76] = h, e[77] = Je, e[78] = xe, e[79] = qe, e[80] = Y, e[81] = Ce, e[82] = W, e[83] = F, e[84] = Re, e[85] = U, e[86] = P, e[87] = E, e[88] = L, e[89] = D, e[90] = De, e[91] = r, e[92] = i, e[93] = M, e[94] = N, e[95] = $, e[96] = K, e[97] = be.left, e[98] = be.width, e[99] = z, e[100] = ne, e[101] = re, e[102] = X, e[103] = j, e[104] = se, e[105] = Q, e[106] = Z, e[107] = ce, e[108] = _e, e[109] = We, e[110] = at, e[111] = lt, e[112] = ut, e[113] = ft, e[114] = dt, e[115] = Be, e[116] = Ye, e[117] = ht, e[118] = mt, e[119] = pt, e[120] = gt, e[121] = vt, e[122] = bt, e[123] = _t, e[124] = wt;
2313
2311
  } else
2314
- j = e[99], te = e[100], ne = e[101], X = e[102], W = e[103], re = e[104], Q = e[105], Z = e[106], ce = e[107], _e = e[108], We = e[109], at = e[110], lt = e[111], ut = e[112], ft = e[113], dt = e[114], Be = e[115], Ye = e[116], ht = e[117], mt = e[118], pt = e[119], gt = e[120], vt = e[121], bt = e[122], _t = e[123], wt = e[124];
2312
+ z = e[99], ne = e[100], re = e[101], X = e[102], j = e[103], se = e[104], Q = e[105], Z = e[106], ce = e[107], _e = e[108], We = e[109], at = e[110], lt = e[111], ut = e[112], ft = e[113], dt = e[114], Be = e[115], Ye = e[116], ht = e[117], mt = e[118], pt = e[119], gt = e[120], vt = e[121], bt = e[122], _t = e[123], wt = e[124];
2315
2313
  let St;
2316
- e[156] !== B ? (St = B && /* @__PURE__ */ E.jsx("div", { className: de("action-left-stretch"), style: {
2314
+ e[156] !== B ? (St = B && /* @__PURE__ */ R.jsx("div", { className: de("action-left-stretch"), style: {
2317
2315
  touchAction: "none"
2318
2316
  } }), e[156] = B, e[157] = St) : St = e[157];
2319
2317
  let yt;
2320
- e[158] !== B ? (yt = B && /* @__PURE__ */ E.jsx("div", { className: de("action-right-stretch"), style: {
2318
+ e[158] !== B ? (yt = B && /* @__PURE__ */ R.jsx("div", { className: de("action-right-stretch"), style: {
2321
2319
  touchAction: "none"
2322
2320
  } }), e[158] = B, e[159] = yt) : yt = e[159];
2323
2321
  let Et;
2324
- e[160] !== te || e[161] !== ne || e[162] !== X || e[163] !== W || e[164] !== re || e[165] !== Q || e[166] !== Z || e[167] !== St || e[168] !== yt ? (Et = /* @__PURE__ */ E.jsxs("div", { onMouseDown: te, onClick: ne, onDoubleClick: X, onContextMenu: W, className: re, style: Q, children: [
2322
+ e[160] !== ne || e[161] !== re || e[162] !== X || e[163] !== j || e[164] !== se || e[165] !== Q || e[166] !== Z || e[167] !== St || e[168] !== yt ? (Et = /* @__PURE__ */ R.jsxs("div", { onMouseDown: ne, onClick: re, onDoubleClick: X, onContextMenu: j, className: se, style: Q, children: [
2325
2323
  Z,
2326
2324
  St,
2327
2325
  yt
2328
- ] }), e[160] = te, e[161] = ne, e[162] = X, e[163] = W, e[164] = re, e[165] = Q, e[166] = Z, e[167] = St, e[168] = yt, e[169] = Et) : Et = e[169];
2326
+ ] }), e[160] = ne, e[161] = re, e[162] = X, e[163] = j, e[164] = se, e[165] = Q, e[166] = Z, e[167] = St, e[168] = yt, e[169] = Et) : Et = e[169];
2329
2327
  let kt;
2330
- return e[170] !== j || e[171] !== ce || e[172] !== _e || e[173] !== We || e[174] !== at || e[175] !== lt || e[176] !== ut || e[177] !== ft || e[178] !== dt || e[179] !== Be || e[180] !== Ye || e[181] !== ht || e[182] !== mt || e[183] !== pt || e[184] !== gt || e[185] !== vt || e[186] !== bt || e[187] !== _t || e[188] !== wt || e[189] !== Et ? (kt = /* @__PURE__ */ E.jsx(j, { ref: ce, parentRef: _e, start: We, left: at, width: lt, grid: ut, adsorptionDistance: ft, adsorptionPositions: dt, getBounds: Be, edges: Ye, enableDragging: ht, enableResizing: mt, onDragStart: pt, onDrag: gt, onDragEnd: vt, onResizeStart: bt, onResize: _t, onResizeEnd: wt, children: Et }), e[170] = j, e[171] = ce, e[172] = _e, e[173] = We, e[174] = at, e[175] = lt, e[176] = ut, e[177] = ft, e[178] = dt, e[179] = Be, e[180] = Ye, e[181] = ht, e[182] = mt, e[183] = pt, e[184] = gt, e[185] = vt, e[186] = bt, e[187] = _t, e[188] = wt, e[189] = Et, e[190] = kt) : kt = e[190], kt;
2328
+ return e[170] !== z || e[171] !== ce || e[172] !== _e || e[173] !== We || e[174] !== at || e[175] !== lt || e[176] !== ut || e[177] !== ft || e[178] !== dt || e[179] !== Be || e[180] !== Ye || e[181] !== ht || e[182] !== mt || e[183] !== pt || e[184] !== gt || e[185] !== vt || e[186] !== bt || e[187] !== _t || e[188] !== wt || e[189] !== Et ? (kt = /* @__PURE__ */ R.jsx(z, { ref: ce, parentRef: _e, start: We, left: at, width: lt, grid: ut, adsorptionDistance: ft, adsorptionPositions: dt, getBounds: Be, edges: Ye, enableDragging: ht, enableResizing: mt, onDragStart: pt, onDrag: gt, onDragEnd: vt, onResizeStart: bt, onResize: _t, onResizeEnd: wt, children: Et }), e[170] = z, e[171] = ce, e[172] = _e, e[173] = We, e[174] = at, e[175] = lt, e[176] = ut, e[177] = ft, e[178] = dt, e[179] = Be, e[180] = Ye, e[181] = ht, e[182] = mt, e[183] = pt, e[184] = gt, e[185] = vt, e[186] = bt, e[187] = _t, e[188] = wt, e[189] = Et, e[190] = kt) : kt = e[190], kt;
2331
2329
  };
2332
2330
  function xt(n, e, t) {
2333
2331
  let r = t.initialDeps ?? [], s;
2334
2332
  function o() {
2335
- var i, c, a, u;
2336
- let l;
2337
- t.key && ((i = t.debug) != null && i.call(t)) && (l = Date.now());
2333
+ var i, c, l, u;
2334
+ let a;
2335
+ t.key && ((i = t.debug) != null && i.call(t)) && (a = Date.now());
2338
2336
  const h = n();
2339
- if (!(h.length !== r.length || h.some((b, v) => r[v] !== b)))
2337
+ if (!(h.length !== r.length || h.some((g, b) => r[b] !== g)))
2340
2338
  return s;
2341
2339
  r = h;
2342
2340
  let m;
2343
- 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))) {
2344
- const b = Math.round((Date.now() - l) * 100) / 100, v = Math.round((Date.now() - m) * 100) / 100, g = v / 16, S = (_, w) => {
2345
- for (_ = String(_); _.length < w; )
2341
+ if (t.key && ((c = t.debug) != null && c.call(t)) && (m = Date.now()), s = e(...h), t.key && ((l = t.debug) != null && l.call(t))) {
2342
+ const g = Math.round((Date.now() - a) * 100) / 100, b = Math.round((Date.now() - m) * 100) / 100, v = b / 16, w = (_, S) => {
2343
+ for (_ = String(_); _.length < S; )
2346
2344
  _ = " " + _;
2347
2345
  return _;
2348
2346
  };
2349
2347
  console.info(
2350
- `%c⏱ ${S(v, 5)} /${S(b, 5)} ms`,
2348
+ `%c⏱ ${w(b, 5)} /${w(g, 5)} ms`,
2351
2349
  `
2352
2350
  font-size: .6rem;
2353
2351
  font-weight: bold;
2354
2352
  color: hsl(${Math.max(
2355
2353
  0,
2356
- Math.min(120 - 120 * g, 120)
2354
+ Math.min(120 - 120 * v, 120)
2357
2355
  )}deg 100% 31%);`,
2358
2356
  t?.key
2359
2357
  );
@@ -2364,25 +2362,25 @@ function xt(n, e, t) {
2364
2362
  r = i;
2365
2363
  }, o;
2366
2364
  }
2367
- function $n(n, e) {
2365
+ function Bn(n, e) {
2368
2366
  if (n === void 0)
2369
2367
  throw new Error("Unexpected undefined");
2370
2368
  return n;
2371
2369
  }
2372
- const Qs = (n, e) => Math.abs(n - e) < 1.01, eo = (n, e, t) => {
2370
+ const to = (n, e) => Math.abs(n - e) < 1.01, no = (n, e, t) => {
2373
2371
  let r;
2374
2372
  return function(...s) {
2375
2373
  n.clearTimeout(r), r = n.setTimeout(() => e.apply(this, s), t);
2376
2374
  };
2377
- }, Hn = (n) => {
2375
+ }, Yn = (n) => {
2378
2376
  const { offsetWidth: e, offsetHeight: t } = n;
2379
2377
  return { width: e, height: t };
2380
- }, to = (n) => n, no = (n) => {
2378
+ }, ro = (n) => n, so = (n) => {
2381
2379
  const e = Math.max(n.startIndex - n.overscan, 0), t = Math.min(n.endIndex + n.overscan, n.count - 1), r = [];
2382
2380
  for (let s = e; s <= t; s++)
2383
2381
  r.push(s);
2384
2382
  return r;
2385
- }, ro = (n, e) => {
2383
+ }, oo = (n, e) => {
2386
2384
  const t = n.scrollElement;
2387
2385
  if (!t)
2388
2386
  return;
@@ -2390,32 +2388,32 @@ const Qs = (n, e) => Math.abs(n - e) < 1.01, eo = (n, e, t) => {
2390
2388
  if (!r)
2391
2389
  return;
2392
2390
  const s = (i) => {
2393
- const { width: c, height: a } = i;
2394
- e({ width: Math.round(c), height: Math.round(a) });
2391
+ const { width: c, height: l } = i;
2392
+ e({ width: Math.round(c), height: Math.round(l) });
2395
2393
  };
2396
- if (s(Hn(t)), !r.ResizeObserver)
2394
+ if (s(Yn(t)), !r.ResizeObserver)
2397
2395
  return () => {
2398
2396
  };
2399
2397
  const o = new r.ResizeObserver((i) => {
2400
2398
  const c = () => {
2401
- const a = i[0];
2402
- if (a?.borderBoxSize) {
2403
- const u = a.borderBoxSize[0];
2399
+ const l = i[0];
2400
+ if (l?.borderBoxSize) {
2401
+ const u = l.borderBoxSize[0];
2404
2402
  if (u) {
2405
2403
  s({ width: u.inlineSize, height: u.blockSize });
2406
2404
  return;
2407
2405
  }
2408
2406
  }
2409
- s(Hn(t));
2407
+ s(Yn(t));
2410
2408
  };
2411
2409
  n.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(c) : c();
2412
2410
  });
2413
2411
  return o.observe(t, { box: "border-box" }), () => {
2414
2412
  o.unobserve(t);
2415
2413
  };
2416
- }, Bn = {
2414
+ }, Xn = {
2417
2415
  passive: !0
2418
- }, Yn = typeof window > "u" ? !0 : "onscrollend" in window, so = (n, e) => {
2416
+ }, Gn = typeof window > "u" ? !0 : "onscrollend" in window, io = (n, e) => {
2419
2417
  const t = n.scrollElement;
2420
2418
  if (!t)
2421
2419
  return;
@@ -2423,23 +2421,23 @@ const Qs = (n, e) => Math.abs(n - e) < 1.01, eo = (n, e, t) => {
2423
2421
  if (!r)
2424
2422
  return;
2425
2423
  let s = 0;
2426
- const o = n.options.useScrollendEvent && Yn ? () => {
2427
- } : eo(
2424
+ const o = n.options.useScrollendEvent && Gn ? () => {
2425
+ } : no(
2428
2426
  r,
2429
2427
  () => {
2430
2428
  e(s, !1);
2431
2429
  },
2432
2430
  n.options.isScrollingResetDelay
2433
- ), i = (l) => () => {
2431
+ ), i = (a) => () => {
2434
2432
  const { horizontal: h, isRtl: f } = n.options;
2435
- s = h ? t.scrollLeft * (f && -1 || 1) : t.scrollTop, o(), e(s, l);
2436
- }, c = i(!0), a = i(!1);
2437
- a(), t.addEventListener("scroll", c, Bn);
2438
- const u = n.options.useScrollendEvent && Yn;
2439
- return u && t.addEventListener("scrollend", a, Bn), () => {
2440
- t.removeEventListener("scroll", c), u && t.removeEventListener("scrollend", a);
2433
+ s = h ? t.scrollLeft * (f && -1 || 1) : t.scrollTop, o(), e(s, a);
2434
+ }, c = i(!0), l = i(!1);
2435
+ l(), t.addEventListener("scroll", c, Xn);
2436
+ const u = n.options.useScrollendEvent && Gn;
2437
+ return u && t.addEventListener("scrollend", l, Xn), () => {
2438
+ t.removeEventListener("scroll", c), u && t.removeEventListener("scrollend", l);
2441
2439
  };
2442
- }, oo = (n, e, t) => {
2440
+ }, co = (n, e, t) => {
2443
2441
  if (e?.borderBoxSize) {
2444
2442
  const r = e.borderBoxSize[0];
2445
2443
  if (r)
@@ -2448,7 +2446,7 @@ const Qs = (n, e) => Math.abs(n - e) < 1.01, eo = (n, e, t) => {
2448
2446
  );
2449
2447
  }
2450
2448
  return n[t.options.horizontal ? "offsetWidth" : "offsetHeight"];
2451
- }, io = (n, {
2449
+ }, ao = (n, {
2452
2450
  adjustments: e = 0,
2453
2451
  behavior: t
2454
2452
  }, r) => {
@@ -2459,7 +2457,7 @@ const Qs = (n, e) => Math.abs(n - e) < 1.01, eo = (n, e, t) => {
2459
2457
  behavior: t
2460
2458
  });
2461
2459
  };
2462
- class co {
2460
+ class lo {
2463
2461
  constructor(e) {
2464
2462
  this.unsubs = [], this.scrollElement = null, this.targetWindow = null, this.isScrolling = !1, this.measurementsCache = [], this.itemSizeCache = /* @__PURE__ */ new Map(), this.pendingMeasuredCacheIndexes = [], this.scrollRect = null, this.scrollOffset = null, this.scrollDirection = null, this.scrollAdjustments = 0, this.elementsCache = /* @__PURE__ */ new Map(), this.observer = /* @__PURE__ */ (() => {
2465
2463
  let t = null;
@@ -2497,11 +2495,11 @@ class co {
2497
2495
  scrollPaddingStart: 0,
2498
2496
  scrollPaddingEnd: 0,
2499
2497
  horizontal: !1,
2500
- getItemKey: to,
2501
- rangeExtractor: no,
2498
+ getItemKey: ro,
2499
+ rangeExtractor: so,
2502
2500
  onChange: () => {
2503
2501
  },
2504
- measureElement: oo,
2502
+ measureElement: co,
2505
2503
  initialRect: { width: 0, height: 0 },
2506
2504
  scrollMargin: 0,
2507
2505
  gap: 0,
@@ -2569,10 +2567,10 @@ class co {
2569
2567
  const c = t[i];
2570
2568
  if (s.has(c.lane))
2571
2569
  continue;
2572
- const a = o.get(
2570
+ const l = o.get(
2573
2571
  c.lane
2574
2572
  );
2575
- if (a == null || c.end > a.end ? o.set(c.lane, c) : c.end < a.end && s.set(c.lane, !0), s.size === this.options.lanes)
2573
+ if (l == null || c.end > l.end ? o.set(c.lane, c) : c.end < l.end && s.set(c.lane, !0), s.size === this.options.lanes)
2576
2574
  break;
2577
2575
  }
2578
2576
  return o.size === this.options.lanes ? Array.from(o.values()).sort((i, c) => i.end === c.end ? i.index - c.index : i.end - c.end)[0] : void 0;
@@ -2599,21 +2597,21 @@ class co {
2599
2597
  ({ count: t, paddingStart: r, scrollMargin: s, getItemKey: o, enabled: i }, c) => {
2600
2598
  if (!i)
2601
2599
  return this.measurementsCache = [], this.itemSizeCache.clear(), [];
2602
- this.measurementsCache.length === 0 && (this.measurementsCache = this.options.initialMeasurementsCache, this.measurementsCache.forEach((l) => {
2603
- this.itemSizeCache.set(l.key, l.size);
2600
+ this.measurementsCache.length === 0 && (this.measurementsCache = this.options.initialMeasurementsCache, this.measurementsCache.forEach((a) => {
2601
+ this.itemSizeCache.set(a.key, a.size);
2604
2602
  }));
2605
- const a = this.pendingMeasuredCacheIndexes.length > 0 ? Math.min(...this.pendingMeasuredCacheIndexes) : 0;
2603
+ const l = this.pendingMeasuredCacheIndexes.length > 0 ? Math.min(...this.pendingMeasuredCacheIndexes) : 0;
2606
2604
  this.pendingMeasuredCacheIndexes = [];
2607
- const u = this.measurementsCache.slice(0, a);
2608
- for (let l = a; l < t; l++) {
2609
- const h = o(l), f = this.options.lanes === 1 ? u[l - 1] : this.getFurthestMeasurement(u, l), m = f ? f.end + this.options.gap : r + s, b = c.get(h), v = typeof b == "number" ? b : this.options.estimateSize(l), g = m + v, S = f ? f.lane : l % this.options.lanes;
2610
- u[l] = {
2611
- index: l,
2605
+ const u = this.measurementsCache.slice(0, l);
2606
+ for (let a = l; a < t; a++) {
2607
+ const h = o(a), f = this.options.lanes === 1 ? u[a - 1] : this.getFurthestMeasurement(u, a), m = f ? f.end + this.options.gap : r + s, g = c.get(h), b = typeof g == "number" ? g : this.options.estimateSize(a), v = m + b, w = f ? f.lane : a % this.options.lanes;
2608
+ u[a] = {
2609
+ index: a,
2612
2610
  start: m,
2613
- size: v,
2614
- end: g,
2611
+ size: b,
2612
+ end: v,
2615
2613
  key: h,
2616
- lane: S
2614
+ lane: w
2617
2615
  };
2618
2616
  }
2619
2617
  return this.measurementsCache = u, u;
@@ -2629,7 +2627,7 @@ class co {
2629
2627
  this.getScrollOffset(),
2630
2628
  this.options.lanes
2631
2629
  ],
2632
- (t, r, s, o) => this.range = t.length > 0 && r > 0 ? ao({
2630
+ (t, r, s, o) => this.range = t.length > 0 && r > 0 ? uo({
2633
2631
  measurements: t,
2634
2632
  outerSize: r,
2635
2633
  scrollOffset: s,
@@ -2694,8 +2692,8 @@ class co {
2694
2692
  (t, r) => {
2695
2693
  const s = [];
2696
2694
  for (let o = 0, i = t.length; o < i; o++) {
2697
- const c = t[o], a = r[c];
2698
- s.push(a);
2695
+ const c = t[o], l = r[c];
2696
+ s.push(l);
2699
2697
  }
2700
2698
  return s;
2701
2699
  },
@@ -2706,11 +2704,11 @@ class co {
2706
2704
  ), this.getVirtualItemForOffset = (t) => {
2707
2705
  const r = this.getMeasurements();
2708
2706
  if (r.length !== 0)
2709
- return $n(
2710
- r[dr(
2707
+ return Bn(
2708
+ r[mr(
2711
2709
  0,
2712
2710
  r.length - 1,
2713
- (s) => $n(r[s]).start,
2711
+ (s) => Bn(r[s]).start,
2714
2712
  t
2715
2713
  )]
2716
2714
  );
@@ -2751,21 +2749,21 @@ class co {
2751
2749
  let o = 0;
2752
2750
  const i = 10, c = (u) => {
2753
2751
  if (!this.targetWindow) return;
2754
- const l = this.getOffsetForIndex(t, u);
2755
- if (!l) {
2752
+ const a = this.getOffsetForIndex(t, u);
2753
+ if (!a) {
2756
2754
  console.warn("Failed to get offset for index:", t);
2757
2755
  return;
2758
2756
  }
2759
- const [h, f] = l;
2757
+ const [h, f] = a;
2760
2758
  this._scrollToOffset(h, { adjustments: void 0, behavior: s }), this.targetWindow.requestAnimationFrame(() => {
2761
- const m = this.getScrollOffset(), b = this.getOffsetForIndex(t, f);
2762
- if (!b) {
2759
+ const m = this.getScrollOffset(), g = this.getOffsetForIndex(t, f);
2760
+ if (!g) {
2763
2761
  console.warn("Failed to get offset for index:", t);
2764
2762
  return;
2765
2763
  }
2766
- Qs(b[0], m) || a(f);
2764
+ to(g[0], m) || l(f);
2767
2765
  });
2768
- }, a = (u) => {
2766
+ }, l = (u) => {
2769
2767
  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(
2770
2768
  `Failed to scroll to index ${t} after ${i} attempts.`
2771
2769
  ));
@@ -2809,7 +2807,7 @@ class co {
2809
2807
  }, this.setOptions(e);
2810
2808
  }
2811
2809
  }
2812
- const dr = (n, e, t, r) => {
2810
+ const mr = (n, e, t, r) => {
2813
2811
  for (; n <= e; ) {
2814
2812
  const s = (n + e) / 2 | 0, o = t(s);
2815
2813
  if (o < r)
@@ -2821,19 +2819,19 @@ const dr = (n, e, t, r) => {
2821
2819
  }
2822
2820
  return n > 0 ? n - 1 : 0;
2823
2821
  };
2824
- function ao({
2822
+ function uo({
2825
2823
  measurements: n,
2826
2824
  outerSize: e,
2827
2825
  scrollOffset: t,
2828
2826
  lanes: r
2829
2827
  }) {
2830
- const s = n.length - 1, o = (a) => n[a].start;
2828
+ const s = n.length - 1, o = (l) => n[l].start;
2831
2829
  if (n.length <= r)
2832
2830
  return {
2833
2831
  startIndex: 0,
2834
2832
  endIndex: s
2835
2833
  };
2836
- let i = dr(
2834
+ let i = mr(
2837
2835
  0,
2838
2836
  s,
2839
2837
  o,
@@ -2843,42 +2841,42 @@ function ao({
2843
2841
  for (; c < s && n[c].end < t + e; )
2844
2842
  c++;
2845
2843
  else if (r > 1) {
2846
- const a = Array(r).fill(0);
2847
- for (; c < s && a.some((l) => l < t + e); ) {
2848
- const l = n[c];
2849
- a[l.lane] = l.end, c++;
2844
+ const l = Array(r).fill(0);
2845
+ for (; c < s && l.some((a) => a < t + e); ) {
2846
+ const a = n[c];
2847
+ l[a.lane] = a.end, c++;
2850
2848
  }
2851
2849
  const u = Array(r).fill(t + e);
2852
- for (; i >= 0 && u.some((l) => l >= t); ) {
2853
- const l = n[i];
2854
- u[l.lane] = l.start, i--;
2850
+ for (; i >= 0 && u.some((a) => a >= t); ) {
2851
+ const a = n[i];
2852
+ u[a.lane] = a.start, i--;
2855
2853
  }
2856
2854
  i = Math.max(0, i - i % r), c = Math.min(s, c + (r - 1 - c % r));
2857
2855
  }
2858
2856
  return { startIndex: i, endIndex: c };
2859
2857
  }
2860
- const Xn = typeof document < "u" ? p.useLayoutEffect : p.useEffect;
2861
- function lo(n) {
2858
+ const Kn = typeof document < "u" ? p.useLayoutEffect : p.useEffect;
2859
+ function fo(n) {
2862
2860
  const e = p.useReducer(() => ({}), {})[1], t = {
2863
2861
  ...n,
2864
2862
  onChange: (s, o) => {
2865
2863
  var i;
2866
- o ? Or(e) : e(), (i = n.onChange) == null || i.call(n, s, o);
2864
+ o ? Nr(e) : e(), (i = n.onChange) == null || i.call(n, s, o);
2867
2865
  }
2868
2866
  }, [r] = p.useState(
2869
- () => new co(t)
2867
+ () => new lo(t)
2870
2868
  );
2871
- return r.setOptions(t), Xn(() => r._didMount(), []), Xn(() => r._willUpdate()), r;
2869
+ return r.setOptions(t), Kn(() => r._didMount(), []), Kn(() => r._willUpdate()), r;
2872
2870
  }
2873
- function hr(n) {
2874
- return lo({
2875
- observeElementRect: ro,
2876
- observeElementOffset: so,
2877
- scrollToFn: io,
2871
+ function pr(n) {
2872
+ return fo({
2873
+ observeElementRect: oo,
2874
+ observeElementOffset: io,
2875
+ scrollToFn: ao,
2878
2876
  ...n
2879
2877
  });
2880
2878
  }
2881
- const uo = (n) => {
2879
+ const ho = (n) => {
2882
2880
  const {
2883
2881
  rowData: e,
2884
2882
  style: t = {},
@@ -2887,11 +2885,11 @@ const uo = (n) => {
2887
2885
  onContextMenuRow: o,
2888
2886
  scrollContainerRef: i,
2889
2887
  startLeft: c,
2890
- scale: a,
2888
+ scale: l,
2891
2889
  scaleWidth: u
2892
- } = n, l = ["edit-row"];
2893
- e?.selected && l.push("edit-row-selected");
2894
- const h = a ?? Yt, f = u ?? Xt, m = c ?? Jt, b = (_) => {
2890
+ } = n, a = ["edit-row"];
2891
+ e?.selected && a.push("edit-row-selected");
2892
+ const h = l ?? Yt, f = u ?? Xt, m = c ?? Jt, g = (_) => {
2895
2893
  if (!i.current) return 0;
2896
2894
  const y = _.currentTarget.getBoundingClientRect(), x = _.clientX - y.x;
2897
2895
  return rt(x, {
@@ -2899,60 +2897,62 @@ const uo = (n) => {
2899
2897
  scale: h,
2900
2898
  scaleWidth: f
2901
2899
  });
2902
- }, v = Dr(() => (e?.actions ? [...e.actions] : []).sort((_, w) => _.start - w.start), [e]), g = Zn((_) => v[_]?.id ?? _, [v]), S = hr({
2900
+ }, b = Or(() => (e?.actions ? [...e.actions] : []).sort((_, S) => _.start - S.start), [e]), v = er((_) => b[_]?.id ?? _, [b]), w = pr({
2903
2901
  horizontal: !0,
2904
- count: v.length,
2905
- getItemKey: g,
2902
+ count: b.length,
2903
+ getItemKey: v,
2906
2904
  getScrollElement: () => i.current,
2907
2905
  estimateSize: (_) => {
2908
- if (!v[_]) return 0;
2906
+ if (!b[_]) return 0;
2907
+ let S = _ > 0 ? b[_ - 1].end : 0, y = b[_].end;
2908
+ if (S > y) return 0;
2909
2909
  let {
2910
- width: w
2911
- } = gn({
2912
- start: v[_].start,
2913
- end: v[_].end
2910
+ width: T
2911
+ } = vn({
2912
+ start: S,
2913
+ end: y
2914
2914
  }, {
2915
2915
  startLeft: m,
2916
2916
  scale: h,
2917
2917
  scaleWidth: f
2918
2918
  });
2919
- return w;
2919
+ return T;
2920
2920
  },
2921
- overscan: 3
2921
+ overscan: 5
2922
2922
  });
2923
- return pn(() => {
2924
- S.measure();
2925
- }, [u, c, S]), /* @__PURE__ */ E.jsx("div", { className: `${de(...l)} ${(e?.classNames || []).join(" ")}`, style: t, onClick: (_) => {
2923
+ return gn(() => {
2924
+ w.measure();
2925
+ }, [u, c, w]), /* @__PURE__ */ R.jsx("div", { className: `${de(...a)} ${(e?.classNames || []).join(" ")}`, style: t, onClick: (_) => {
2926
2926
  if (e && r) {
2927
- const w = b(_);
2927
+ const S = g(_);
2928
2928
  r(_, {
2929
2929
  row: e,
2930
- time: w
2930
+ time: S
2931
2931
  });
2932
2932
  }
2933
2933
  }, onDoubleClick: (_) => {
2934
2934
  if (e && s) {
2935
- const w = b(_);
2935
+ const S = g(_);
2936
2936
  s(_, {
2937
2937
  row: e,
2938
- time: w
2938
+ time: S
2939
2939
  });
2940
2940
  }
2941
2941
  }, onContextMenu: (_) => {
2942
2942
  if (e && o) {
2943
- const w = b(_);
2943
+ const S = g(_);
2944
2944
  o(_, {
2945
2945
  row: e,
2946
- time: w
2946
+ time: S
2947
2947
  });
2948
2948
  }
2949
- }, children: e && S.getVirtualItems().map((_) => {
2950
- const w = v[_.index];
2951
- if (!w) throw new Error("Action not found");
2952
- return /* @__PURE__ */ E.jsx(Zs, { ...n, handleTime: b, row: e, action: w }, w.id);
2949
+ }, children: e && w.getVirtualItems().map((_) => {
2950
+ const S = b[_.index];
2951
+ if (!S) throw new Error("Action not found");
2952
+ return /* @__PURE__ */ R.jsx(eo, { ...n, handleTime: g, row: e, action: S }, S.id);
2953
2953
  }) });
2954
2954
  };
2955
- function fo() {
2955
+ function mo() {
2956
2956
  const n = ze.c(6);
2957
2957
  let e;
2958
2958
  n[0] === Symbol.for("react.memo_cache_sentinel") ? (e = {
@@ -2960,42 +2960,42 @@ function fo() {
2960
2960
  movePositions: [],
2961
2961
  assistPositions: []
2962
2962
  }, n[0] = e) : e = n[0];
2963
- const [t, r] = Tt(e), s = mo, o = ho;
2963
+ const [t, r] = At(e), s = go, o = po;
2964
2964
  let i;
2965
2965
  n[1] === Symbol.for("react.memo_cache_sentinel") ? (i = (m) => {
2966
2966
  const {
2967
- movePositions: b,
2968
- assistPositions: v
2967
+ movePositions: g,
2968
+ assistPositions: b
2969
2969
  } = m;
2970
2970
  r({
2971
2971
  isMoving: !0,
2972
- movePositions: b || [],
2973
- assistPositions: v || []
2972
+ movePositions: g || [],
2973
+ assistPositions: b || []
2974
2974
  });
2975
2975
  }, n[1] = i) : i = n[1];
2976
2976
  const c = i;
2977
- let a;
2978
- n[2] === Symbol.for("react.memo_cache_sentinel") ? (a = (m) => {
2977
+ let l;
2978
+ n[2] === Symbol.for("react.memo_cache_sentinel") ? (l = (m) => {
2979
2979
  const {
2980
- movePositions: b,
2981
- assistPositions: v
2980
+ movePositions: g,
2981
+ assistPositions: b
2982
2982
  } = m;
2983
- r((g) => ({
2984
- ...g,
2985
- movePositions: b || g.movePositions,
2986
- assistPositions: v || g.assistPositions
2983
+ r((v) => ({
2984
+ ...v,
2985
+ movePositions: g || v.movePositions,
2986
+ assistPositions: b || v.assistPositions
2987
2987
  }));
2988
- }, n[2] = a) : a = n[2];
2989
- const u = a;
2990
- let l;
2991
- n[3] === Symbol.for("react.memo_cache_sentinel") ? (l = () => {
2988
+ }, n[2] = l) : l = n[2];
2989
+ const u = l;
2990
+ let a;
2991
+ n[3] === Symbol.for("react.memo_cache_sentinel") ? (a = () => {
2992
2992
  r({
2993
2993
  isMoving: !1,
2994
2994
  movePositions: [],
2995
2995
  assistPositions: []
2996
2996
  });
2997
- }, n[3] = l) : l = n[3];
2998
- const h = l;
2997
+ }, n[3] = a) : a = n[3];
2998
+ const h = a;
2999
2999
  let f;
3000
3000
  return n[4] !== t ? (f = {
3001
3001
  initDragLine: c,
@@ -3006,7 +3006,7 @@ function fo() {
3006
3006
  defaultGetMovePosition: o
3007
3007
  }, n[4] = t, n[5] = f) : f = n[5], f;
3008
3008
  }
3009
- function ho(n) {
3009
+ function po(n) {
3010
3010
  const {
3011
3011
  start: e,
3012
3012
  end: t,
@@ -3016,8 +3016,8 @@ function ho(n) {
3016
3016
  startLeft: i
3017
3017
  } = n, {
3018
3018
  left: c,
3019
- width: a
3020
- } = gn({
3019
+ width: l
3020
+ } = vn({
3021
3021
  start: e,
3022
3022
  end: t
3023
3023
  }, {
@@ -3025,9 +3025,9 @@ function ho(n) {
3025
3025
  scaleWidth: o,
3026
3026
  scale: s
3027
3027
  });
3028
- return r ? r === "right" ? [c + a] : [c] : [c, c + a];
3028
+ return r ? r === "right" ? [c + l] : [c] : [c, c + l];
3029
3029
  }
3030
- function mo(n) {
3030
+ function go(n) {
3031
3031
  const {
3032
3032
  editorData: e,
3033
3033
  assistActionIds: t,
@@ -3036,26 +3036,26 @@ function mo(n) {
3036
3036
  scale: o,
3037
3037
  scaleWidth: i,
3038
3038
  startLeft: c,
3039
- cursorLeft: a,
3039
+ cursorLeft: l,
3040
3040
  hideCursor: u
3041
- } = n, l = [];
3041
+ } = n, a = [];
3042
3042
  t ? e.forEach((f) => {
3043
3043
  f.actions.forEach((m) => {
3044
- t.includes(m.id) && l.push(m);
3044
+ t.includes(m.id) && a.push(m);
3045
3045
  });
3046
3046
  }) : e.forEach((f) => {
3047
- f.id !== s.id ? l.push(...f.actions) : f.actions.forEach((m) => {
3048
- m.id !== r.id && l.push(m);
3047
+ f.id !== s.id ? a.push(...f.actions) : f.actions.forEach((m) => {
3048
+ m.id !== r.id && a.push(m);
3049
3049
  });
3050
3050
  });
3051
- const h = Br(l, {
3051
+ const h = Yr(a, {
3052
3052
  startLeft: c,
3053
3053
  scale: o,
3054
3054
  scaleWidth: i
3055
3055
  });
3056
- return u || h.push(a), h;
3056
+ return u || h.push(l), h;
3057
3057
  }
3058
- const po = (n) => {
3058
+ const vo = (n) => {
3059
3059
  const e = ze.c(35);
3060
3060
  let t, r;
3061
3061
  e[0] !== n ? ({
@@ -3067,91 +3067,91 @@ const po = (n) => {
3067
3067
  initDragLine: o,
3068
3068
  updateDragLine: i,
3069
3069
  disposeDragLine: c,
3070
- defaultGetAssistPosition: a,
3070
+ defaultGetAssistPosition: l,
3071
3071
  defaultGetMovePosition: u
3072
- } = fo();
3073
- let l;
3074
- e[3] !== a || e[4] !== o || e[5] !== t ? (l = (A) => {
3072
+ } = mo();
3073
+ let a;
3074
+ e[3] !== l || e[4] !== o || e[5] !== t ? (a = (D) => {
3075
3075
  if (t.dragLine) {
3076
- const O = t.getAssistDragLineActionIds && t.getAssistDragLineActionIds({
3077
- action: A.action,
3078
- row: A.row,
3076
+ const L = t.getAssistDragLineActionIds && t.getAssistDragLineActionIds({
3077
+ action: D.action,
3078
+ row: D.row,
3079
3079
  editorData: t.editorData
3080
- }), $ = t.scaleWidth ?? 160, z = t.scale ?? 1, K = t.startLeft ?? 20, P = t.hideCursor ?? !1, N = je(t.cursorTime, {
3081
- scaleWidth: $,
3082
- scale: z,
3080
+ }), k = t.scaleWidth ?? 160, F = t.scale ?? 1, K = t.startLeft ?? 20, O = t.hideCursor ?? !1, I = je(t.cursorTime, {
3081
+ scaleWidth: k,
3082
+ scale: F,
3083
3083
  startLeft: K
3084
- }), G = a({
3084
+ }), G = l({
3085
3085
  editorData: t.editorData,
3086
- assistActionIds: O,
3087
- action: A.action,
3088
- row: A.row,
3089
- scale: z,
3090
- scaleWidth: $,
3086
+ assistActionIds: L,
3087
+ action: D.action,
3088
+ row: D.row,
3089
+ scale: F,
3090
+ scaleWidth: k,
3091
3091
  startLeft: K,
3092
- hideCursor: P,
3093
- cursorLeft: N
3092
+ hideCursor: O,
3093
+ cursorLeft: I
3094
3094
  });
3095
3095
  o({
3096
3096
  assistPositions: G
3097
3097
  });
3098
3098
  }
3099
- }, e[3] = a, e[4] = o, e[5] = t, e[6] = l) : l = e[6];
3100
- const h = l;
3099
+ }, e[3] = l, e[4] = o, e[5] = t, e[6] = a) : a = e[6];
3100
+ const h = a;
3101
3101
  let f;
3102
- e[7] !== u || e[8] !== t.dragLine || e[9] !== t.scale || e[10] !== t.scaleWidth || e[11] !== t.startLeft || e[12] !== i ? (f = (A) => {
3102
+ e[7] !== u || e[8] !== t.dragLine || e[9] !== t.scale || e[10] !== t.scaleWidth || e[11] !== t.startLeft || e[12] !== i ? (f = (D) => {
3103
3103
  if (t.dragLine) {
3104
- const O = t.scaleWidth ?? 160, $ = t.scale ?? 1, z = t.startLeft ?? 20, K = u({
3105
- ...A,
3106
- startLeft: z,
3107
- scaleWidth: O,
3108
- scale: $
3104
+ const L = t.scaleWidth ?? 160, k = t.scale ?? 1, F = t.startLeft ?? 20, K = u({
3105
+ ...D,
3106
+ startLeft: F,
3107
+ scaleWidth: L,
3108
+ scale: k
3109
3109
  });
3110
3110
  i({
3111
3111
  movePositions: K
3112
3112
  });
3113
3113
  }
3114
3114
  }, e[7] = u, e[8] = t.dragLine, e[9] = t.scale, e[10] = t.scaleWidth, e[11] = t.startLeft, e[12] = i, e[13] = f) : f = e[13];
3115
- const m = f, b = t.rowHeight ?? 32, v = t.scaleWidth ?? 160, g = t.startLeft ?? 20, S = Math.max(t.scaleCount * v + g, t.timelineWidth);
3115
+ const m = f, g = t.rowHeight ?? 32, b = t.scaleWidth ?? 160, v = t.startLeft ?? 20, w = Math.max(t.scaleCount * b + v, t.timelineWidth);
3116
3116
  let _;
3117
- if (e[14] !== S || e[15] !== b || e[16] !== c || e[17] !== s || e[18] !== h || e[19] !== m || e[20] !== t) {
3118
- const A = [];
3119
- let O = 0;
3120
- for (let $ = 0; $ < t.editorData.length; $++) {
3121
- const z = t.editorData[$];
3122
- if (!z)
3117
+ if (e[14] !== w || e[15] !== g || e[16] !== c || e[17] !== s || e[18] !== h || e[19] !== m || e[20] !== t) {
3118
+ const D = [];
3119
+ let L = 0;
3120
+ for (let k = 0; k < t.editorData.length; k++) {
3121
+ const F = t.editorData[k];
3122
+ if (!F)
3123
3123
  continue;
3124
- const K = z.rowHeight || b;
3125
- A.push(/* @__PURE__ */ Lr(uo, { ...t, key: z.id, rowData: z, dragLineData: s, scrollContainerRef: t.scrollElementRef, style: {
3124
+ const K = F.rowHeight || g;
3125
+ D.push(/* @__PURE__ */ Mr(ho, { ...t, key: F.id, rowData: F, dragLineData: s, scrollContainerRef: t.scrollElementRef, style: {
3126
3126
  position: "absolute",
3127
3127
  top: 0,
3128
3128
  left: 0,
3129
- width: S,
3129
+ width: w,
3130
3130
  height: `${K}px`,
3131
- transform: `translateY(${O}px)`
3132
- }, onActionMoveStart: (P) => (h(P), t.onActionMoveStart && t.onActionMoveStart(P)), onActionResizeStart: (P) => (h(P), t.onActionResizeStart && t.onActionResizeStart(P)), onActionMoving: (P) => (m(P), t.onActionMoving && t.onActionMoving(P)), onActionResizing: (P) => (m(P), t.onActionResizing && t.onActionResizing(P)), onActionResizeEnd: (P) => (c(), t.onActionResizeEnd && t.onActionResizeEnd(P)), onActionMoveEnd: (P) => (c(), t.onActionMoveEnd && t.onActionMoveEnd(P)) })), O = O + K;
3131
+ transform: `translateY(${L}px)`
3132
+ }, onActionMoveStart: (O) => (h(O), t.onActionMoveStart && t.onActionMoveStart(O)), onActionResizeStart: (O) => (h(O), t.onActionResizeStart && t.onActionResizeStart(O)), onActionMoving: (O) => (m(O), t.onActionMoving && t.onActionMoving(O)), onActionResizing: (O) => (m(O), t.onActionResizing && t.onActionResizing(O)), onActionResizeEnd: (O) => (c(), t.onActionResizeEnd && t.onActionResizeEnd(O)), onActionMoveEnd: (O) => (c(), t.onActionMoveEnd && t.onActionMoveEnd(O)) })), L = L + K;
3133
3133
  }
3134
- _ = [O, A], e[14] = S, e[15] = b, e[16] = c, e[17] = s, e[18] = h, e[19] = m, e[20] = t, e[21] = _;
3134
+ _ = [L, D], e[14] = w, e[15] = g, e[16] = c, e[17] = s, e[18] = h, e[19] = m, e[20] = t, e[21] = _;
3135
3135
  } else
3136
3136
  _ = e[21];
3137
- const [w, y] = _, C = `0, ${t.startLeft ?? 20}px`, x = `${t.startLeft ?? 20}px, ${t.scaleWidth ?? 160}px`;
3138
- let R;
3139
- e[22] !== S || e[23] !== C || e[24] !== x || e[25] !== w ? (R = {
3140
- width: S,
3141
- height: w,
3137
+ const [S, y] = _, T = `0, ${t.startLeft ?? 20}px`, x = `${t.startLeft ?? 20}px, ${t.scaleWidth ?? 160}px`;
3138
+ let C;
3139
+ e[22] !== w || e[23] !== T || e[24] !== x || e[25] !== S ? (C = {
3140
+ width: w,
3141
+ height: S,
3142
3142
  position: "relative",
3143
- backgroundPositionX: C,
3143
+ backgroundPositionX: T,
3144
3144
  backgroundSize: x
3145
- }, e[22] = S, e[23] = C, e[24] = x, e[25] = w, e[26] = R) : R = e[26];
3146
- let k;
3147
- e[27] !== s || e[28] !== t.dragLine ? (k = t.dragLine && /* @__PURE__ */ E.jsx(qr, { ...s }), e[27] = s, e[28] = t.dragLine, e[29] = k) : k = e[29];
3148
- let L;
3149
- return e[30] !== r || e[31] !== y || e[32] !== R || e[33] !== k ? (L = /* @__PURE__ */ E.jsxs("div", { ref: r, style: R, className: "timeline-editor-edit-area", children: [
3145
+ }, e[22] = w, e[23] = T, e[24] = x, e[25] = S, e[26] = C) : C = e[26];
3146
+ let P;
3147
+ e[27] !== s || e[28] !== t.dragLine ? (P = t.dragLine && /* @__PURE__ */ R.jsx(Jr, { ...s }), e[27] = s, e[28] = t.dragLine, e[29] = P) : P = e[29];
3148
+ let E;
3149
+ return e[30] !== r || e[31] !== y || e[32] !== C || e[33] !== P ? (E = /* @__PURE__ */ R.jsxs("div", { ref: r, style: C, className: "timeline-editor-edit-area", children: [
3150
3150
  y,
3151
- k
3152
- ] }), e[30] = r, e[31] = y, e[32] = R, e[33] = k, e[34] = L) : L = e[34], L;
3151
+ P
3152
+ ] }), e[30] = r, e[31] = y, e[32] = C, e[33] = P, e[34] = E) : E = e[34], E;
3153
3153
  };
3154
- function go({
3154
+ function bo({
3155
3155
  scaleSplitCount: n,
3156
3156
  scaleWidth: e,
3157
3157
  startLeft: t,
@@ -3160,47 +3160,47 @@ function go({
3160
3160
  scale: o,
3161
3161
  scrollElementRef: i,
3162
3162
  onClickTimeArea: c,
3163
- setCursor: a
3163
+ setCursor: l
3164
3164
  }) {
3165
- const u = n ?? 1, l = e ?? 160, h = t ?? 20, f = (n ?? 0) > 0, m = f ? r * (n ?? 1) + 1 : r, b = (f ? l / u : l) * (m - 1) + h, g = hr({
3165
+ const u = n ?? 1, a = e ?? 160, h = t ?? 20, f = (n ?? 0) > 0, m = f ? r * (n ?? 1) + 1 : r, g = (f ? a / u : a) * (m - 1) + h, v = pr({
3166
3166
  horizontal: !0,
3167
3167
  count: m,
3168
3168
  getScrollElement: () => i.current,
3169
- estimateSize: (S) => {
3170
- switch (S) {
3169
+ estimateSize: (w) => {
3170
+ switch (w) {
3171
3171
  case 0:
3172
3172
  return h;
3173
3173
  default:
3174
- return f ? l / u : l;
3174
+ return f ? a / u : a;
3175
3175
  }
3176
3176
  },
3177
3177
  overscan: 10
3178
3178
  });
3179
- return et(() => g.measure(), [e, t, g]), /* @__PURE__ */ E.jsx("div", { style: {
3180
- width: `${b}px`
3181
- }, className: de("time-area"), onClick: (S) => {
3182
- const _ = t ?? 20, w = e ?? 160, y = o ?? 1, C = s ?? 1 / 0, x = S.currentTarget.getBoundingClientRect(), R = S.clientX - x.x, k = Math.max(R, _);
3183
- if (k > C * w + _) return;
3184
- const L = rt(k, {
3179
+ return et(() => v.measure(), [e, t, v]), /* @__PURE__ */ R.jsx("div", { style: {
3180
+ width: `${g}px`
3181
+ }, className: de("time-area"), onClick: (w) => {
3182
+ const _ = t ?? 20, S = e ?? 160, y = o ?? 1, T = s ?? 1 / 0, x = w.currentTarget.getBoundingClientRect(), C = w.clientX - x.x, P = Math.max(C, _);
3183
+ if (P > T * S + _) return;
3184
+ const E = rt(P, {
3185
3185
  startLeft: _,
3186
3186
  scale: y,
3187
- scaleWidth: w
3187
+ scaleWidth: S
3188
3188
  });
3189
- c && c(L, S), !S.defaultPrevented && a({
3190
- time: L
3189
+ c && c(E, w), !w.defaultPrevented && l({
3190
+ time: E
3191
3191
  });
3192
- }, children: g.getVirtualItems().map((S) => {
3193
- const _ = S.index, w = n ?? 1, y = o ?? 1, C = f ? _ % w === 0 : !0, x = [de("time-unit"), de(C ? "time-unit-big" : "time-unit-small")], R = (f ? _ / w : _) * y;
3194
- return /* @__PURE__ */ E.jsx("div", { "data-index": S.index, style: {
3195
- width: `${S.size}px`,
3196
- transform: `translateX(${S.start}px)`
3197
- }, className: x.join(" "), children: C && /* @__PURE__ */ E.jsx("div", { className: de("time-unit-scale"), children: R }) }, S.key);
3192
+ }, children: v.getVirtualItems().map((w) => {
3193
+ const _ = w.index, S = n ?? 1, y = o ?? 1, T = f ? _ % S === 0 : !0, x = [de("time-unit"), de(T ? "time-unit-big" : "time-unit-small")], C = (f ? _ / S : _) * y;
3194
+ return /* @__PURE__ */ R.jsx("div", { "data-index": w.index, style: {
3195
+ width: `${w.size}px`,
3196
+ transform: `translateX(${w.start}px)`
3197
+ }, className: x.join(" "), children: T && /* @__PURE__ */ R.jsx("div", { className: de("time-unit-scale"), children: C }) }, w.key);
3198
3198
  }) });
3199
3199
  }
3200
- function vo(n) {
3200
+ function _o(n) {
3201
3201
  return typeof n == "object" && n !== null;
3202
3202
  }
3203
- function bo(n, e, t) {
3203
+ function wo(n, e, t) {
3204
3204
  if (n instanceof EventTarget)
3205
3205
  return [n];
3206
3206
  if (typeof n == "string") {
@@ -3209,33 +3209,33 @@ function bo(n, e, t) {
3209
3209
  }
3210
3210
  return Array.from(n);
3211
3211
  }
3212
- function _o(n) {
3213
- return vo(n) && "ownerSVGElement" in n;
3212
+ function So(n) {
3213
+ return _o(n) && "ownerSVGElement" in n;
3214
3214
  }
3215
3215
  const $t = /* @__PURE__ */ new WeakMap();
3216
3216
  let Ht;
3217
- const mr = (n, e, t) => (r, s) => s && s[0] ? s[0][n + "Size"] : _o(r) && "getBBox" in r ? r.getBBox()[e] : r[t], wo = /* @__PURE__ */ mr("inline", "width", "offsetWidth"), So = /* @__PURE__ */ mr("block", "height", "offsetHeight");
3218
- function yo({ target: n, borderBoxSize: e }) {
3217
+ const gr = (n, e, t) => (r, s) => s && s[0] ? s[0][n + "Size"] : So(r) && "getBBox" in r ? r.getBBox()[e] : r[t], yo = /* @__PURE__ */ gr("inline", "width", "offsetWidth"), Eo = /* @__PURE__ */ gr("block", "height", "offsetHeight");
3218
+ function Ro({ target: n, borderBoxSize: e }) {
3219
3219
  $t.get(n)?.forEach((t) => {
3220
3220
  t(n, {
3221
3221
  get width() {
3222
- return wo(n, e);
3222
+ return yo(n, e);
3223
3223
  },
3224
3224
  get height() {
3225
- return So(n, e);
3225
+ return Eo(n, e);
3226
3226
  }
3227
3227
  });
3228
3228
  });
3229
3229
  }
3230
- function Eo(n) {
3231
- n.forEach(yo);
3230
+ function xo(n) {
3231
+ n.forEach(Ro);
3232
3232
  }
3233
- function Ro() {
3234
- typeof ResizeObserver > "u" || (Ht = new ResizeObserver(Eo));
3233
+ function Co() {
3234
+ typeof ResizeObserver > "u" || (Ht = new ResizeObserver(xo));
3235
3235
  }
3236
- function xo(n, e) {
3237
- Ht || Ro();
3238
- const t = bo(n);
3236
+ function Ao(n, e) {
3237
+ Ht || Co();
3238
+ const t = wo(n);
3239
3239
  return t.forEach((r) => {
3240
3240
  let s = $t.get(r);
3241
3241
  s || (s = /* @__PURE__ */ new Set(), $t.set(r, s)), s.add(e), Ht?.observe(r);
@@ -3248,7 +3248,7 @@ function xo(n, e) {
3248
3248
  }
3249
3249
  const Bt = /* @__PURE__ */ new Set();
3250
3250
  let Ct;
3251
- function Co() {
3251
+ function To() {
3252
3252
  Ct = () => {
3253
3253
  const n = {
3254
3254
  get width() {
@@ -3261,35 +3261,45 @@ function Co() {
3261
3261
  Bt.forEach((e) => e(n));
3262
3262
  }, window.addEventListener("resize", Ct);
3263
3263
  }
3264
- function To(n) {
3265
- return Bt.add(n), Ct || Co(), () => {
3264
+ function Po(n) {
3265
+ return Bt.add(n), Ct || To(), () => {
3266
3266
  Bt.delete(n), !Bt.size && typeof Ct == "function" && (window.removeEventListener("resize", Ct), Ct = void 0);
3267
3267
  };
3268
3268
  }
3269
- function Ao(n, e) {
3270
- return typeof n == "function" ? To(n) : xo(n, e);
3269
+ function Do(n, e) {
3270
+ return typeof n == "function" ? Po(n) : Ao(n, e);
3271
3271
  }
3272
- function Po(n) {
3273
- const e = ze.c(4);
3274
- let t;
3275
- e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = {
3272
+ function Lo(n) {
3273
+ const e = ({
3274
+ children: t,
3275
+ ...r
3276
+ }) => {
3277
+ const s = n(r);
3278
+ return t(s);
3279
+ };
3280
+ return e.displayName = `withHooks(${n.name || "Hook"})`, e;
3281
+ }
3282
+ function Oo(n) {
3283
+ const e = ze.c(4), {
3284
+ elementRef: t
3285
+ } = n;
3286
+ let r;
3287
+ e[0] === Symbol.for("react.memo_cache_sentinel") ? (r = {
3276
3288
  width: 0,
3277
3289
  height: 0
3278
- }, e[0] = t) : t = e[0];
3279
- const [r, s] = Tt(t);
3280
- let o;
3281
- e[1] !== n ? (o = () => {
3282
- n.current && Ao(n.current, (c, a) => {
3283
- s({
3284
- width: a.width,
3285
- height: a.height
3290
+ }, e[0] = r) : r = e[0];
3291
+ const [s, o] = At(r);
3292
+ let i, c;
3293
+ return e[1] !== t ? (i = () => {
3294
+ t.current && Do(t.current, (l, u) => {
3295
+ o({
3296
+ width: u.width,
3297
+ height: u.height
3286
3298
  });
3287
3299
  });
3288
- }, e[1] = n, e[2] = o) : o = e[2];
3289
- let i;
3290
- return e[3] === Symbol.for("react.memo_cache_sentinel") ? (i = [], e[3] = i) : i = e[3], pn(o, i), r;
3300
+ }, c = [t], e[1] = t, e[2] = i, e[3] = c) : (i = e[2], c = e[3]), gn(i, c), s;
3291
3301
  }
3292
- const Do = (n) => {
3302
+ const Mo = Lo(Oo), No = (n) => {
3293
3303
  const e = ze.c(42), {
3294
3304
  disableDrag: t,
3295
3305
  cursorTime: r,
@@ -3297,164 +3307,164 @@ const Do = (n) => {
3297
3307
  startLeft: o,
3298
3308
  scaleWidth: i,
3299
3309
  scale: c,
3300
- scaleCount: a,
3310
+ scaleCount: l,
3301
3311
  scaleSplitCount: u,
3302
- scrollElementRef: l,
3312
+ scrollElementRef: a,
3303
3313
  maxScaleCount: h,
3304
3314
  onCursorDragStart: f,
3305
3315
  onCursorDrag: m,
3306
- onCursorDragEnd: b
3307
- } = n, v = ie(null), g = ie(void 0);
3308
- let S, _;
3309
- e[0] !== r || e[1] !== c || e[2] !== i || e[3] !== o ? (S = () => {
3310
- if (typeof g.current > "u" && v.current) {
3311
- const d = o ?? 20, T = i ?? 160, F = c ?? 1;
3312
- v.current.updateLeft(je(r, {
3316
+ onCursorDragEnd: g
3317
+ } = n, b = ee(null), v = ee(void 0);
3318
+ let w, _;
3319
+ e[0] !== r || e[1] !== c || e[2] !== i || e[3] !== o ? (w = () => {
3320
+ if (typeof v.current > "u" && b.current) {
3321
+ const d = o ?? 20, A = i ?? 160, V = c ?? 1;
3322
+ b.current.updateLeft(je(r, {
3313
3323
  startLeft: d,
3314
- scaleWidth: T,
3315
- scale: F
3324
+ scaleWidth: A,
3325
+ scale: V
3316
3326
  }));
3317
3327
  }
3318
- }, _ = [r, o, i, c], e[0] = r, e[1] = c, e[2] = i, e[3] = o, e[4] = S, e[5] = _) : (S = e[4], _ = e[5]), et(S, _);
3319
- const w = o ?? 20, y = i ?? 160, C = c ?? 1, x = h ?? 1 / 0, R = (u ?? 0) > 0, k = u ?? 1, L = R ? a * (u ?? 1) + 1 : a, A = o ?? 20, O = (R ? y / k : y) * (L - 1) + A;
3320
- let $;
3321
- e[6] !== w || e[7] !== x || e[8] !== l || e[9] !== O || e[10] !== y ? ($ = () => ({
3328
+ }, _ = [r, o, i, c], e[0] = r, e[1] = c, e[2] = i, e[3] = o, e[4] = w, e[5] = _) : (w = e[4], _ = e[5]), et(w, _);
3329
+ const S = o ?? 20, y = i ?? 160, T = c ?? 1, x = h ?? 1 / 0, C = (u ?? 0) > 0, P = u ?? 1, E = C ? l * (u ?? 1) + 1 : l, D = o ?? 20, L = (C ? y / P : y) * (E - 1) + D;
3330
+ let k;
3331
+ e[6] !== S || e[7] !== x || e[8] !== a || e[9] !== L || e[10] !== y ? (k = () => ({
3322
3332
  left: 0,
3323
- right: Math.min(O, x * y + w - (l.current?.scrollLeft ?? 0))
3324
- }), e[6] = w, e[7] = x, e[8] = l, e[9] = O, e[10] = y, e[11] = $) : $ = e[11];
3325
- const z = !t;
3333
+ right: Math.min(L, x * y + S - (a.current?.scrollLeft ?? 0))
3334
+ }), e[6] = S, e[7] = x, e[8] = a, e[9] = L, e[10] = y, e[11] = k) : k = e[11];
3335
+ const F = !t;
3326
3336
  let K;
3327
- e[12] !== r || e[13] !== w || e[14] !== f || e[15] !== C || e[16] !== y ? (K = () => {
3328
- f && f(r), g.current = je(r, {
3329
- startLeft: w,
3337
+ e[12] !== r || e[13] !== S || e[14] !== f || e[15] !== T || e[16] !== y ? (K = () => {
3338
+ f && f(r), v.current = je(r, {
3339
+ startLeft: S,
3330
3340
  scaleWidth: y,
3331
- scale: C
3332
- }), v.current?.updateLeft(g.current);
3333
- }, e[12] = r, e[13] = w, e[14] = f, e[15] = C, e[16] = y, e[17] = K) : K = e[17];
3334
- let P;
3335
- e[18] !== w || e[19] !== b || e[20] !== C || e[21] !== s || e[22] !== y ? (P = () => {
3336
- if (typeof g.current < "u") {
3337
- const d = rt(g.current, {
3338
- startLeft: w,
3339
- scale: C,
3341
+ scale: T
3342
+ }), b.current?.updateLeft(v.current);
3343
+ }, e[12] = r, e[13] = S, e[14] = f, e[15] = T, e[16] = y, e[17] = K) : K = e[17];
3344
+ let O;
3345
+ e[18] !== S || e[19] !== g || e[20] !== T || e[21] !== s || e[22] !== y ? (O = () => {
3346
+ if (typeof v.current < "u") {
3347
+ const d = rt(v.current, {
3348
+ startLeft: S,
3349
+ scale: T,
3340
3350
  scaleWidth: y
3341
3351
  });
3342
3352
  s({
3343
3353
  time: d
3344
- }), b && b(d);
3354
+ }), g && g(d);
3345
3355
  }
3346
- g.current = void 0;
3347
- }, e[18] = w, e[19] = b, e[20] = C, e[21] = s, e[22] = y, e[23] = P) : P = e[23];
3348
- let N;
3349
- e[24] !== w || e[25] !== m || e[26] !== C || e[27] !== l || e[28] !== s || e[29] !== y ? (N = (d, T) => {
3356
+ v.current = void 0;
3357
+ }, e[18] = S, e[19] = g, e[20] = T, e[21] = s, e[22] = y, e[23] = O) : O = e[23];
3358
+ let I;
3359
+ e[24] !== S || e[25] !== m || e[26] !== T || e[27] !== a || e[28] !== s || e[29] !== y ? (I = (d, A) => {
3350
3360
  const {
3351
- left: F
3352
- } = d, H = T === void 0 ? 0 : T, q = l.current?.scrollLeft ?? 0, B = l.current, V = B?.clientWidth ?? 0;
3361
+ left: V
3362
+ } = d, H = A === void 0 ? 0 : A, q = a.current?.scrollLeft ?? 0, B = a.current, U = B?.clientWidth ?? 0;
3353
3363
  if (H !== 0)
3354
- if (typeof g.current < "u") {
3355
- g.current = g.current + H;
3356
- const D = q, M = q + V;
3357
- g.current < D + 10 ? g.current = D + 10 : g.current > M - 10 && (g.current = M - 10), g.current < w - q && (g.current = w - q);
3364
+ if (typeof v.current < "u") {
3365
+ v.current = v.current + H;
3366
+ const M = q, N = q + U;
3367
+ v.current < M + 10 ? v.current = M + 10 : v.current > N - 10 && (v.current = N - 10), v.current < S - q && (v.current = S - q);
3358
3368
  } else {
3359
- g.current = F + H;
3360
- const D = q, M = q + V;
3361
- g.current < D + 10 ? g.current = D + 10 : g.current > M - 10 && (g.current = M - 10);
3369
+ v.current = V + H;
3370
+ const M = q, N = q + U;
3371
+ v.current < M + 10 ? v.current = M + 10 : v.current > N - 10 && (v.current = N - 10);
3362
3372
  }
3363
- else if (F < w - q ? g.current = w - q : g.current = F, B && V > 0) {
3364
- const D = q, M = q + V;
3365
- g.current < D + 10 ? g.current = D + 10 : g.current > M - 10 && (g.current = M - 10);
3373
+ else if (V < S - q ? v.current = S - q : v.current = V, B && U > 0) {
3374
+ const M = q, N = q + U;
3375
+ v.current < M + 10 ? v.current = M + 10 : v.current > N - 10 && (v.current = N - 10);
3366
3376
  }
3367
- if (typeof g.current < "u") {
3368
- v.current?.updateLeft(g.current);
3369
- const D = rt(g.current + q, {
3370
- startLeft: w,
3371
- scale: C,
3377
+ if (typeof v.current < "u") {
3378
+ b.current?.updateLeft(v.current);
3379
+ const M = rt(v.current + q, {
3380
+ startLeft: S,
3381
+ scale: T,
3372
3382
  scaleWidth: y
3373
3383
  });
3374
3384
  s({
3375
- time: D
3376
- }), m && m(D);
3385
+ time: M
3386
+ }), m && m(M);
3377
3387
  }
3378
3388
  return !1;
3379
- }, e[24] = w, e[25] = m, e[26] = C, e[27] = l, e[28] = s, e[29] = y, e[30] = N) : N = e[30];
3389
+ }, e[24] = S, e[25] = m, e[26] = T, e[27] = a, e[28] = s, e[29] = y, e[30] = I) : I = e[30];
3380
3390
  let G, ue;
3381
3391
  e[31] === Symbol.for("react.memo_cache_sentinel") ? (G = de("cursor"), ue = de("cursor-top"), e[31] = G, e[32] = ue) : (G = e[31], ue = e[32]);
3382
3392
  let fe;
3383
- e[33] === Symbol.for("react.memo_cache_sentinel") ? (fe = /* @__PURE__ */ E.jsxs("div", { className: G, children: [
3384
- /* @__PURE__ */ E.jsx("svg", { className: ue, width: "8", height: "12", viewBox: "0 0 8 12", fill: "none", children: /* @__PURE__ */ E.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" }) }),
3385
- /* @__PURE__ */ E.jsx("div", { className: de("cursor-area") })
3393
+ e[33] === Symbol.for("react.memo_cache_sentinel") ? (fe = /* @__PURE__ */ R.jsxs("div", { className: G, children: [
3394
+ /* @__PURE__ */ R.jsx("svg", { className: ue, 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" }) }),
3395
+ /* @__PURE__ */ R.jsx("div", { className: de("cursor-area") })
3386
3396
  ] }), e[33] = fe) : fe = e[33];
3387
3397
  let me;
3388
- return e[34] !== w || e[35] !== l || e[36] !== $ || e[37] !== z || e[38] !== K || e[39] !== P || e[40] !== N ? (me = /* @__PURE__ */ E.jsx(fr, { start: w, ref: v, parentRef: l, getBounds: $, autoScroll: !0, enableDragging: z, enableResizing: !1, onDragStart: K, onDragEnd: P, onDrag: N, children: fe }), e[34] = w, e[35] = l, e[36] = $, e[37] = z, e[38] = K, e[39] = P, e[40] = N, e[41] = me) : me = e[41], me;
3398
+ return e[34] !== S || e[35] !== a || e[36] !== k || e[37] !== F || e[38] !== K || e[39] !== O || e[40] !== I ? (me = /* @__PURE__ */ R.jsx(hr, { start: S, ref: b, parentRef: a, getBounds: k, autoScroll: !0, enableDragging: F, enableResizing: !1, onDragStart: K, onDragEnd: O, onDrag: I, children: fe }), e[34] = S, e[35] = a, e[36] = k, e[37] = F, e[38] = K, e[39] = O, e[40] = I, e[41] = me) : me = e[41], me;
3389
3399
  };
3390
- function Gn(n, e) {
3400
+ function qn(n, e) {
3391
3401
  if (typeof n == "function")
3392
3402
  return n(e);
3393
3403
  n != null && (n.current = e);
3394
3404
  }
3395
- function pr(...n) {
3405
+ function vr(...n) {
3396
3406
  return (e) => {
3397
3407
  let t = !1;
3398
3408
  const r = n.map((s) => {
3399
- const o = Gn(s, e);
3409
+ const o = qn(s, e);
3400
3410
  return !t && typeof o == "function" && (t = !0), o;
3401
3411
  });
3402
3412
  if (t)
3403
3413
  return () => {
3404
3414
  for (let s = 0; s < r.length; s++) {
3405
3415
  const o = r[s];
3406
- typeof o == "function" ? o() : Gn(n[s], null);
3416
+ typeof o == "function" ? o() : qn(n[s], null);
3407
3417
  }
3408
3418
  };
3409
3419
  };
3410
3420
  }
3411
3421
  function st(...n) {
3412
- return p.useCallback(pr(...n), n);
3422
+ return p.useCallback(vr(...n), n);
3413
3423
  }
3414
3424
  // @__NO_SIDE_EFFECTS__
3415
- function Lo(n) {
3416
- const e = /* @__PURE__ */ Oo(n), t = p.forwardRef((r, s) => {
3417
- const { children: o, ...i } = r, c = p.Children.toArray(o), a = c.find(No);
3418
- if (a) {
3419
- const u = a.props.children, l = c.map((h) => h === a ? p.Children.count(u) > 1 ? p.Children.only(null) : p.isValidElement(u) ? u.props.children : null : h);
3420
- return /* @__PURE__ */ E.jsx(e, { ...i, ref: s, children: p.isValidElement(u) ? p.cloneElement(u, void 0, l) : null });
3425
+ function Io(n) {
3426
+ const e = /* @__PURE__ */ ko(n), t = p.forwardRef((r, s) => {
3427
+ const { children: o, ...i } = r, c = p.Children.toArray(o), l = c.find(jo);
3428
+ if (l) {
3429
+ const u = l.props.children, a = c.map((h) => h === l ? p.Children.count(u) > 1 ? p.Children.only(null) : p.isValidElement(u) ? u.props.children : null : h);
3430
+ return /* @__PURE__ */ R.jsx(e, { ...i, ref: s, children: p.isValidElement(u) ? p.cloneElement(u, void 0, a) : null });
3421
3431
  }
3422
- return /* @__PURE__ */ E.jsx(e, { ...i, ref: s, children: o });
3432
+ return /* @__PURE__ */ R.jsx(e, { ...i, ref: s, children: o });
3423
3433
  });
3424
3434
  return t.displayName = `${n}.Slot`, t;
3425
3435
  }
3426
3436
  // @__NO_SIDE_EFFECTS__
3427
- function Oo(n) {
3437
+ function ko(n) {
3428
3438
  const e = p.forwardRef((t, r) => {
3429
3439
  const { children: s, ...o } = t;
3430
3440
  if (p.isValidElement(s)) {
3431
- const i = ko(s), c = Io(o, s.props);
3432
- return s.type !== p.Fragment && (c.ref = r ? pr(r, i) : i), p.cloneElement(s, c);
3441
+ const i = Fo(s), c = zo(o, s.props);
3442
+ return s.type !== p.Fragment && (c.ref = r ? vr(r, i) : i), p.cloneElement(s, c);
3433
3443
  }
3434
3444
  return p.Children.count(s) > 1 ? p.Children.only(null) : null;
3435
3445
  });
3436
3446
  return e.displayName = `${n}.SlotClone`, e;
3437
3447
  }
3438
- var Mo = Symbol("radix.slottable");
3439
- function No(n) {
3440
- return p.isValidElement(n) && typeof n.type == "function" && "__radixId" in n.type && n.type.__radixId === Mo;
3448
+ var Wo = Symbol("radix.slottable");
3449
+ function jo(n) {
3450
+ return p.isValidElement(n) && typeof n.type == "function" && "__radixId" in n.type && n.type.__radixId === Wo;
3441
3451
  }
3442
- function Io(n, e) {
3452
+ function zo(n, e) {
3443
3453
  const t = { ...e };
3444
3454
  for (const r in e) {
3445
3455
  const s = n[r], o = e[r];
3446
3456
  /^on[A-Z]/.test(r) ? s && o ? t[r] = (...c) => {
3447
- const a = o(...c);
3448
- return s(...c), a;
3457
+ const l = o(...c);
3458
+ return s(...c), l;
3449
3459
  } : s && (t[r] = s) : r === "style" ? t[r] = { ...s, ...o } : r === "className" && (t[r] = [s, o].filter(Boolean).join(" "));
3450
3460
  }
3451
3461
  return { ...n, ...t };
3452
3462
  }
3453
- function ko(n) {
3463
+ function Fo(n) {
3454
3464
  let e = Object.getOwnPropertyDescriptor(n.props, "ref")?.get, t = e && "isReactWarning" in e && e.isReactWarning;
3455
3465
  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);
3456
3466
  }
3457
- var Wo = [
3467
+ var Vo = [
3458
3468
  "a",
3459
3469
  "button",
3460
3470
  "div",
@@ -3472,44 +3482,44 @@ var Wo = [
3472
3482
  "span",
3473
3483
  "svg",
3474
3484
  "ul"
3475
- ], Nt = Wo.reduce((n, e) => {
3476
- const t = /* @__PURE__ */ Lo(`Primitive.${e}`), r = p.forwardRef((s, o) => {
3477
- const { asChild: i, ...c } = s, a = i ? t : e;
3478
- return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ E.jsx(a, { ...c, ref: o });
3485
+ ], Nt = Vo.reduce((n, e) => {
3486
+ const t = /* @__PURE__ */ Io(`Primitive.${e}`), r = p.forwardRef((s, o) => {
3487
+ const { asChild: i, ...c } = s, l = i ? t : e;
3488
+ return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ R.jsx(l, { ...c, ref: o });
3479
3489
  });
3480
3490
  return r.displayName = `Primitive.${e}`, { ...n, [e]: r };
3481
3491
  }, {});
3482
- function jo(n, e = []) {
3492
+ function Uo(n, e = []) {
3483
3493
  let t = [];
3484
3494
  function r(o, i) {
3485
- const c = p.createContext(i), a = t.length;
3495
+ const c = p.createContext(i), l = t.length;
3486
3496
  t = [...t, i];
3487
3497
  const u = (h) => {
3488
- const { scope: f, children: m, ...b } = h, v = f?.[n]?.[a] || c, g = p.useMemo(() => b, Object.values(b));
3489
- return /* @__PURE__ */ E.jsx(v.Provider, { value: g, children: m });
3498
+ const { scope: f, children: m, ...g } = h, b = f?.[n]?.[l] || c, v = p.useMemo(() => g, Object.values(g));
3499
+ return /* @__PURE__ */ R.jsx(b.Provider, { value: v, children: m });
3490
3500
  };
3491
3501
  u.displayName = o + "Provider";
3492
- function l(h, f) {
3493
- const m = f?.[n]?.[a] || c, b = p.useContext(m);
3494
- if (b) return b;
3502
+ function a(h, f) {
3503
+ const m = f?.[n]?.[l] || c, g = p.useContext(m);
3504
+ if (g) return g;
3495
3505
  if (i !== void 0) return i;
3496
3506
  throw new Error(`\`${h}\` must be used within \`${o}\``);
3497
3507
  }
3498
- return [u, l];
3508
+ return [u, a];
3499
3509
  }
3500
3510
  const s = () => {
3501
3511
  const o = t.map((i) => p.createContext(i));
3502
3512
  return function(c) {
3503
- const a = c?.[n] || o;
3513
+ const l = c?.[n] || o;
3504
3514
  return p.useMemo(
3505
- () => ({ [`__scope${n}`]: { ...c, [n]: a } }),
3506
- [c, a]
3515
+ () => ({ [`__scope${n}`]: { ...c, [n]: l } }),
3516
+ [c, l]
3507
3517
  );
3508
3518
  };
3509
3519
  };
3510
- return s.scopeName = n, [r, zo(s, ...e)];
3520
+ return s.scopeName = n, [r, $o(s, ...e)];
3511
3521
  }
3512
- function zo(...n) {
3522
+ function $o(...n) {
3513
3523
  const e = n[0];
3514
3524
  if (n.length === 1) return e;
3515
3525
  const t = () => {
@@ -3518,8 +3528,8 @@ function zo(...n) {
3518
3528
  scopeName: s.scopeName
3519
3529
  }));
3520
3530
  return function(o) {
3521
- const i = r.reduce((c, { useScope: a, scopeName: u }) => {
3522
- const h = a(o)[`__scope${u}`];
3531
+ const i = r.reduce((c, { useScope: l, scopeName: u }) => {
3532
+ const h = l(o)[`__scope${u}`];
3523
3533
  return { ...c, ...h };
3524
3534
  }, {});
3525
3535
  return p.useMemo(() => ({ [`__scope${e.scopeName}`]: i }), [i]);
@@ -3533,18 +3543,18 @@ function tt(n, e, { checkForDefaultPrevented: t = !0 } = {}) {
3533
3543
  return e?.(s);
3534
3544
  };
3535
3545
  }
3536
- var mn = globalThis?.document ? p.useLayoutEffect : () => {
3546
+ var pn = globalThis?.document ? p.useLayoutEffect : () => {
3537
3547
  };
3538
- function Fo(n, e) {
3548
+ function Ho(n, e) {
3539
3549
  return p.useReducer((t, r) => e[t][r] ?? t, n);
3540
3550
  }
3541
3551
  var It = (n) => {
3542
- const { present: e, children: t } = n, r = Vo(e), s = typeof t == "function" ? t({ present: r.isPresent }) : p.Children.only(t), o = st(r.ref, Uo(s));
3552
+ const { present: e, children: t } = n, r = Bo(e), s = typeof t == "function" ? t({ present: r.isPresent }) : p.Children.only(t), o = st(r.ref, Yo(s));
3543
3553
  return typeof t == "function" || r.isPresent ? p.cloneElement(s, { ref: o }) : null;
3544
3554
  };
3545
3555
  It.displayName = "Presence";
3546
- function Vo(n) {
3547
- const [e, t] = p.useState(), r = p.useRef(null), s = p.useRef(n), o = p.useRef("none"), i = n ? "mounted" : "unmounted", [c, a] = Fo(i, {
3556
+ function Bo(n) {
3557
+ const [e, t] = p.useState(), r = p.useRef(null), s = p.useRef(n), o = p.useRef("none"), i = n ? "mounted" : "unmounted", [c, l] = Ho(i, {
3548
3558
  mounted: {
3549
3559
  UNMOUNT: "unmounted",
3550
3560
  ANIMATION_OUT: "unmountSuspended"
@@ -3560,32 +3570,32 @@ function Vo(n) {
3560
3570
  return p.useEffect(() => {
3561
3571
  const u = Vt(r.current);
3562
3572
  o.current = c === "mounted" ? u : "none";
3563
- }, [c]), mn(() => {
3564
- const u = r.current, l = s.current;
3565
- if (l !== n) {
3573
+ }, [c]), pn(() => {
3574
+ const u = r.current, a = s.current;
3575
+ if (a !== n) {
3566
3576
  const f = o.current, m = Vt(u);
3567
- n ? a("MOUNT") : m === "none" || u?.display === "none" ? a("UNMOUNT") : a(l && f !== m ? "ANIMATION_OUT" : "UNMOUNT"), s.current = n;
3577
+ n ? l("MOUNT") : m === "none" || u?.display === "none" ? l("UNMOUNT") : l(a && f !== m ? "ANIMATION_OUT" : "UNMOUNT"), s.current = n;
3568
3578
  }
3569
- }, [n, a]), mn(() => {
3579
+ }, [n, l]), pn(() => {
3570
3580
  if (e) {
3571
3581
  let u;
3572
- const l = e.ownerDocument.defaultView ?? window, h = (m) => {
3573
- const v = Vt(r.current).includes(CSS.escape(m.animationName));
3574
- if (m.target === e && v && (a("ANIMATION_END"), !s.current)) {
3575
- const g = e.style.animationFillMode;
3576
- e.style.animationFillMode = "forwards", u = l.setTimeout(() => {
3577
- e.style.animationFillMode === "forwards" && (e.style.animationFillMode = g);
3582
+ const a = e.ownerDocument.defaultView ?? window, h = (m) => {
3583
+ const b = Vt(r.current).includes(CSS.escape(m.animationName));
3584
+ if (m.target === e && b && (l("ANIMATION_END"), !s.current)) {
3585
+ const v = e.style.animationFillMode;
3586
+ e.style.animationFillMode = "forwards", u = a.setTimeout(() => {
3587
+ e.style.animationFillMode === "forwards" && (e.style.animationFillMode = v);
3578
3588
  });
3579
3589
  }
3580
3590
  }, f = (m) => {
3581
3591
  m.target === e && (o.current = Vt(r.current));
3582
3592
  };
3583
3593
  return e.addEventListener("animationstart", f), e.addEventListener("animationcancel", h), e.addEventListener("animationend", h), () => {
3584
- l.clearTimeout(u), e.removeEventListener("animationstart", f), e.removeEventListener("animationcancel", h), e.removeEventListener("animationend", h);
3594
+ a.clearTimeout(u), e.removeEventListener("animationstart", f), e.removeEventListener("animationcancel", h), e.removeEventListener("animationend", h);
3585
3595
  };
3586
3596
  } else
3587
- a("ANIMATION_END");
3588
- }, [e, a]), {
3597
+ l("ANIMATION_END");
3598
+ }, [e, l]), {
3589
3599
  isPresent: ["mounted", "unmountSuspended"].includes(c),
3590
3600
  ref: p.useCallback((u) => {
3591
3601
  r.current = u ? getComputedStyle(u) : null, t(u);
@@ -3595,13 +3605,13 @@ function Vo(n) {
3595
3605
  function Vt(n) {
3596
3606
  return n?.animationName || "none";
3597
3607
  }
3598
- function Uo(n) {
3608
+ function Yo(n) {
3599
3609
  let e = Object.getOwnPropertyDescriptor(n.props, "ref")?.get, t = e && "isReactWarning" in e && e.isReactWarning;
3600
3610
  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);
3601
3611
  }
3602
- var $o = p.createContext(void 0);
3603
- function Ho(n) {
3604
- const e = p.useContext($o);
3612
+ var Xo = p.createContext(void 0);
3613
+ function Go(n) {
3614
+ const e = p.useContext(Xo);
3605
3615
  return n || e || "ltr";
3606
3616
  }
3607
3617
  function Qe(n) {
@@ -3610,13 +3620,13 @@ function Qe(n) {
3610
3620
  e.current = n;
3611
3621
  }), p.useMemo(() => (...t) => e.current?.(...t), []);
3612
3622
  }
3613
- function Bo(n, [e, t]) {
3623
+ function Ko(n, [e, t]) {
3614
3624
  return Math.min(t, Math.max(e, n));
3615
3625
  }
3616
- function Yo(n, e) {
3626
+ function qo(n, e) {
3617
3627
  return p.useReducer((t, r) => e[t][r] ?? t, n);
3618
3628
  }
3619
- var bn = "ScrollArea", [gr] = jo(bn), [Xo, Se] = gr(bn), vr = p.forwardRef(
3629
+ var _n = "ScrollArea", [br] = Uo(_n), [Jo, Se] = br(_n), _r = p.forwardRef(
3620
3630
  (n, e) => {
3621
3631
  const {
3622
3632
  __scopeScrollArea: t,
@@ -3624,40 +3634,40 @@ var bn = "ScrollArea", [gr] = jo(bn), [Xo, Se] = gr(bn), vr = p.forwardRef(
3624
3634
  dir: s,
3625
3635
  scrollHideDelay: o = 600,
3626
3636
  ...i
3627
- } = n, [c, a] = p.useState(null), [u, l] = p.useState(null), [h, f] = p.useState(null), [m, b] = p.useState(null), [v, g] = p.useState(null), [S, _] = p.useState(0), [w, y] = p.useState(0), [C, x] = p.useState(!1), [R, k] = p.useState(!1), L = st(e, (O) => a(O)), A = Ho(s);
3628
- return /* @__PURE__ */ E.jsx(
3629
- Xo,
3637
+ } = n, [c, l] = p.useState(null), [u, a] = p.useState(null), [h, f] = p.useState(null), [m, g] = p.useState(null), [b, v] = p.useState(null), [w, _] = p.useState(0), [S, y] = p.useState(0), [T, x] = p.useState(!1), [C, P] = p.useState(!1), E = st(e, (L) => l(L)), D = Go(s);
3638
+ return /* @__PURE__ */ R.jsx(
3639
+ Jo,
3630
3640
  {
3631
3641
  scope: t,
3632
3642
  type: r,
3633
- dir: A,
3643
+ dir: D,
3634
3644
  scrollHideDelay: o,
3635
3645
  scrollArea: c,
3636
3646
  viewport: u,
3637
- onViewportChange: l,
3647
+ onViewportChange: a,
3638
3648
  content: h,
3639
3649
  onContentChange: f,
3640
3650
  scrollbarX: m,
3641
- onScrollbarXChange: b,
3642
- scrollbarXEnabled: C,
3651
+ onScrollbarXChange: g,
3652
+ scrollbarXEnabled: T,
3643
3653
  onScrollbarXEnabledChange: x,
3644
- scrollbarY: v,
3645
- onScrollbarYChange: g,
3646
- scrollbarYEnabled: R,
3647
- onScrollbarYEnabledChange: k,
3654
+ scrollbarY: b,
3655
+ onScrollbarYChange: v,
3656
+ scrollbarYEnabled: C,
3657
+ onScrollbarYEnabledChange: P,
3648
3658
  onCornerWidthChange: _,
3649
3659
  onCornerHeightChange: y,
3650
- children: /* @__PURE__ */ E.jsx(
3660
+ children: /* @__PURE__ */ R.jsx(
3651
3661
  Nt.div,
3652
3662
  {
3653
- dir: A,
3663
+ dir: D,
3654
3664
  ...i,
3655
- ref: L,
3665
+ ref: E,
3656
3666
  style: {
3657
3667
  position: "relative",
3658
3668
  // Pass corner sizes as CSS vars to reduce re-renders of context consumers
3659
- "--radix-scroll-area-corner-width": S + "px",
3660
- "--radix-scroll-area-corner-height": w + "px",
3669
+ "--radix-scroll-area-corner-width": w + "px",
3670
+ "--radix-scroll-area-corner-height": S + "px",
3661
3671
  ...n.style
3662
3672
  }
3663
3673
  }
@@ -3666,12 +3676,12 @@ var bn = "ScrollArea", [gr] = jo(bn), [Xo, Se] = gr(bn), vr = p.forwardRef(
3666
3676
  );
3667
3677
  }
3668
3678
  );
3669
- vr.displayName = bn;
3670
- var br = "ScrollAreaViewport", _r = p.forwardRef(
3679
+ _r.displayName = _n;
3680
+ var wr = "ScrollAreaViewport", Sr = p.forwardRef(
3671
3681
  (n, e) => {
3672
- const { __scopeScrollArea: t, children: r, nonce: s, ...o } = n, i = Se(br, t), c = p.useRef(null), a = st(e, c, i.onViewportChange);
3673
- return /* @__PURE__ */ E.jsxs(E.Fragment, { children: [
3674
- /* @__PURE__ */ E.jsx(
3682
+ const { __scopeScrollArea: t, children: r, nonce: s, ...o } = n, i = Se(wr, t), c = p.useRef(null), l = st(e, c, i.onViewportChange);
3683
+ return /* @__PURE__ */ R.jsxs(R.Fragment, { children: [
3684
+ /* @__PURE__ */ R.jsx(
3675
3685
  "style",
3676
3686
  {
3677
3687
  dangerouslySetInnerHTML: {
@@ -3680,12 +3690,12 @@ var br = "ScrollAreaViewport", _r = p.forwardRef(
3680
3690
  nonce: s
3681
3691
  }
3682
3692
  ),
3683
- /* @__PURE__ */ E.jsx(
3693
+ /* @__PURE__ */ R.jsx(
3684
3694
  Nt.div,
3685
3695
  {
3686
3696
  "data-radix-scroll-area-viewport": "",
3687
3697
  ...o,
3688
- ref: a,
3698
+ ref: l,
3689
3699
  style: {
3690
3700
  /**
3691
3701
  * We don't support `visible` because the intention is to have at least one scrollbar
@@ -3702,47 +3712,47 @@ var br = "ScrollAreaViewport", _r = p.forwardRef(
3702
3712
  overflowY: i.scrollbarYEnabled ? "scroll" : "hidden",
3703
3713
  ...n.style
3704
3714
  },
3705
- children: /* @__PURE__ */ E.jsx("div", { ref: i.onContentChange, style: { minWidth: "100%", display: "table" }, children: r })
3715
+ children: /* @__PURE__ */ R.jsx("div", { ref: i.onContentChange, style: { minWidth: "100%", display: "table" }, children: r })
3706
3716
  }
3707
3717
  )
3708
3718
  ] });
3709
3719
  }
3710
3720
  );
3711
- _r.displayName = br;
3712
- var Te = "ScrollAreaScrollbar", wr = p.forwardRef(
3721
+ Sr.displayName = wr;
3722
+ var Ae = "ScrollAreaScrollbar", yr = p.forwardRef(
3713
3723
  (n, e) => {
3714
- const { forceMount: t, ...r } = n, s = Se(Te, n.__scopeScrollArea), { onScrollbarXEnabledChange: o, onScrollbarYEnabledChange: i } = s, c = n.orientation === "horizontal";
3724
+ const { forceMount: t, ...r } = n, s = Se(Ae, n.__scopeScrollArea), { onScrollbarXEnabledChange: o, onScrollbarYEnabledChange: i } = s, c = n.orientation === "horizontal";
3715
3725
  return p.useEffect(() => (c ? o(!0) : i(!0), () => {
3716
3726
  c ? o(!1) : i(!1);
3717
- }), [c, o, i]), s.type === "hover" ? /* @__PURE__ */ E.jsx(Go, { ...r, ref: e, forceMount: t }) : s.type === "scroll" ? /* @__PURE__ */ E.jsx(Ko, { ...r, ref: e, forceMount: t }) : s.type === "auto" ? /* @__PURE__ */ E.jsx(Sr, { ...r, ref: e, forceMount: t }) : s.type === "always" ? /* @__PURE__ */ E.jsx(_n, { ...r, ref: e }) : null;
3727
+ }), [c, o, i]), s.type === "hover" ? /* @__PURE__ */ R.jsx(Zo, { ...r, ref: e, forceMount: t }) : s.type === "scroll" ? /* @__PURE__ */ R.jsx(Qo, { ...r, ref: e, forceMount: t }) : s.type === "auto" ? /* @__PURE__ */ R.jsx(Er, { ...r, ref: e, forceMount: t }) : s.type === "always" ? /* @__PURE__ */ R.jsx(wn, { ...r, ref: e }) : null;
3718
3728
  }
3719
3729
  );
3720
- wr.displayName = Te;
3721
- var Go = p.forwardRef((n, e) => {
3722
- const { forceMount: t, ...r } = n, s = Se(Te, n.__scopeScrollArea), [o, i] = p.useState(!1);
3730
+ yr.displayName = Ae;
3731
+ var Zo = p.forwardRef((n, e) => {
3732
+ const { forceMount: t, ...r } = n, s = Se(Ae, n.__scopeScrollArea), [o, i] = p.useState(!1);
3723
3733
  return p.useEffect(() => {
3724
3734
  const c = s.scrollArea;
3725
- let a = 0;
3735
+ let l = 0;
3726
3736
  if (c) {
3727
3737
  const u = () => {
3728
- window.clearTimeout(a), i(!0);
3729
- }, l = () => {
3730
- a = window.setTimeout(() => i(!1), s.scrollHideDelay);
3738
+ window.clearTimeout(l), i(!0);
3739
+ }, a = () => {
3740
+ l = window.setTimeout(() => i(!1), s.scrollHideDelay);
3731
3741
  };
3732
- return c.addEventListener("pointerenter", u), c.addEventListener("pointerleave", l), () => {
3733
- window.clearTimeout(a), c.removeEventListener("pointerenter", u), c.removeEventListener("pointerleave", l);
3742
+ return c.addEventListener("pointerenter", u), c.addEventListener("pointerleave", a), () => {
3743
+ window.clearTimeout(l), c.removeEventListener("pointerenter", u), c.removeEventListener("pointerleave", a);
3734
3744
  };
3735
3745
  }
3736
- }, [s.scrollArea, s.scrollHideDelay]), /* @__PURE__ */ E.jsx(It, { present: t || o, children: /* @__PURE__ */ E.jsx(
3737
- Sr,
3746
+ }, [s.scrollArea, s.scrollHideDelay]), /* @__PURE__ */ R.jsx(It, { present: t || o, children: /* @__PURE__ */ R.jsx(
3747
+ Er,
3738
3748
  {
3739
3749
  "data-state": o ? "visible" : "hidden",
3740
3750
  ...r,
3741
3751
  ref: e
3742
3752
  }
3743
3753
  ) });
3744
- }), Ko = p.forwardRef((n, e) => {
3745
- const { forceMount: t, ...r } = n, s = Se(Te, n.__scopeScrollArea), o = n.orientation === "horizontal", i = en(() => a("SCROLL_END"), 100), [c, a] = Yo("hidden", {
3754
+ }), Qo = p.forwardRef((n, e) => {
3755
+ const { forceMount: t, ...r } = n, s = Se(Ae, n.__scopeScrollArea), o = n.orientation === "horizontal", i = en(() => l("SCROLL_END"), 100), [c, l] = qo("hidden", {
3746
3756
  hidden: {
3747
3757
  SCROLL: "scrolling"
3748
3758
  },
@@ -3762,69 +3772,69 @@ var Go = p.forwardRef((n, e) => {
3762
3772
  });
3763
3773
  return p.useEffect(() => {
3764
3774
  if (c === "idle") {
3765
- const u = window.setTimeout(() => a("HIDE"), s.scrollHideDelay);
3775
+ const u = window.setTimeout(() => l("HIDE"), s.scrollHideDelay);
3766
3776
  return () => window.clearTimeout(u);
3767
3777
  }
3768
- }, [c, s.scrollHideDelay, a]), p.useEffect(() => {
3769
- const u = s.viewport, l = o ? "scrollLeft" : "scrollTop";
3778
+ }, [c, s.scrollHideDelay, l]), p.useEffect(() => {
3779
+ const u = s.viewport, a = o ? "scrollLeft" : "scrollTop";
3770
3780
  if (u) {
3771
- let h = u[l];
3781
+ let h = u[a];
3772
3782
  const f = () => {
3773
- const m = u[l];
3774
- h !== m && (a("SCROLL"), i()), h = m;
3783
+ const m = u[a];
3784
+ h !== m && (l("SCROLL"), i()), h = m;
3775
3785
  };
3776
3786
  return u.addEventListener("scroll", f), () => u.removeEventListener("scroll", f);
3777
3787
  }
3778
- }, [s.viewport, o, a, i]), /* @__PURE__ */ E.jsx(It, { present: t || c !== "hidden", children: /* @__PURE__ */ E.jsx(
3779
- _n,
3788
+ }, [s.viewport, o, l, i]), /* @__PURE__ */ R.jsx(It, { present: t || c !== "hidden", children: /* @__PURE__ */ R.jsx(
3789
+ wn,
3780
3790
  {
3781
3791
  "data-state": c === "hidden" ? "hidden" : "visible",
3782
3792
  ...r,
3783
3793
  ref: e,
3784
- onPointerEnter: tt(n.onPointerEnter, () => a("POINTER_ENTER")),
3785
- onPointerLeave: tt(n.onPointerLeave, () => a("POINTER_LEAVE"))
3794
+ onPointerEnter: tt(n.onPointerEnter, () => l("POINTER_ENTER")),
3795
+ onPointerLeave: tt(n.onPointerLeave, () => l("POINTER_LEAVE"))
3786
3796
  }
3787
3797
  ) });
3788
- }), Sr = p.forwardRef((n, e) => {
3789
- const t = Se(Te, n.__scopeScrollArea), { forceMount: r, ...s } = n, [o, i] = p.useState(!1), c = n.orientation === "horizontal", a = en(() => {
3798
+ }), Er = p.forwardRef((n, e) => {
3799
+ const t = Se(Ae, n.__scopeScrollArea), { forceMount: r, ...s } = n, [o, i] = p.useState(!1), c = n.orientation === "horizontal", l = en(() => {
3790
3800
  if (t.viewport) {
3791
- const u = t.viewport.offsetWidth < t.viewport.scrollWidth, l = t.viewport.offsetHeight < t.viewport.scrollHeight;
3792
- i(c ? u : l);
3801
+ const u = t.viewport.offsetWidth < t.viewport.scrollWidth, a = t.viewport.offsetHeight < t.viewport.scrollHeight;
3802
+ i(c ? u : a);
3793
3803
  }
3794
3804
  }, 10);
3795
- return At(t.viewport, a), At(t.content, a), /* @__PURE__ */ E.jsx(It, { present: r || o, children: /* @__PURE__ */ E.jsx(
3796
- _n,
3805
+ return Tt(t.viewport, l), Tt(t.content, l), /* @__PURE__ */ R.jsx(It, { present: r || o, children: /* @__PURE__ */ R.jsx(
3806
+ wn,
3797
3807
  {
3798
3808
  "data-state": o ? "visible" : "hidden",
3799
3809
  ...s,
3800
3810
  ref: e
3801
3811
  }
3802
3812
  ) });
3803
- }), _n = p.forwardRef((n, e) => {
3804
- const { orientation: t = "vertical", ...r } = n, s = Se(Te, n.__scopeScrollArea), o = p.useRef(null), i = p.useRef(0), [c, a] = p.useState({
3813
+ }), wn = p.forwardRef((n, e) => {
3814
+ const { orientation: t = "vertical", ...r } = n, s = Se(Ae, n.__scopeScrollArea), o = p.useRef(null), i = p.useRef(0), [c, l] = p.useState({
3805
3815
  content: 0,
3806
3816
  viewport: 0,
3807
3817
  scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 }
3808
- }), u = Cr(c.viewport, c.content), l = {
3818
+ }), u = Tr(c.viewport, c.content), a = {
3809
3819
  ...r,
3810
3820
  sizes: c,
3811
- onSizesChange: a,
3821
+ onSizesChange: l,
3812
3822
  hasThumb: u > 0 && u < 1,
3813
3823
  onThumbChange: (f) => o.current = f,
3814
3824
  onThumbPointerUp: () => i.current = 0,
3815
3825
  onThumbPointerDown: (f) => i.current = f
3816
3826
  };
3817
3827
  function h(f, m) {
3818
- return ti(f, i.current, c, m);
3828
+ return oi(f, i.current, c, m);
3819
3829
  }
3820
- return t === "horizontal" ? /* @__PURE__ */ E.jsx(
3821
- qo,
3830
+ return t === "horizontal" ? /* @__PURE__ */ R.jsx(
3831
+ ei,
3822
3832
  {
3823
- ...l,
3833
+ ...a,
3824
3834
  ref: e,
3825
3835
  onThumbPositionChange: () => {
3826
3836
  if (s.viewport && o.current) {
3827
- const f = s.viewport.scrollLeft, m = Kn(f, c, s.dir);
3837
+ const f = s.viewport.scrollLeft, m = Jn(f, c, s.dir);
3828
3838
  o.current.style.transform = `translate3d(${m}px, 0, 0)`;
3829
3839
  }
3830
3840
  },
@@ -3835,14 +3845,14 @@ var Go = p.forwardRef((n, e) => {
3835
3845
  s.viewport && (s.viewport.scrollLeft = h(f, s.dir));
3836
3846
  }
3837
3847
  }
3838
- ) : t === "vertical" ? /* @__PURE__ */ E.jsx(
3839
- Jo,
3848
+ ) : t === "vertical" ? /* @__PURE__ */ R.jsx(
3849
+ ti,
3840
3850
  {
3841
- ...l,
3851
+ ...a,
3842
3852
  ref: e,
3843
3853
  onThumbPositionChange: () => {
3844
3854
  if (s.viewport && o.current) {
3845
- const f = s.viewport.scrollTop, m = Kn(f, c);
3855
+ const f = s.viewport.scrollTop, m = Jn(f, c);
3846
3856
  o.current.style.transform = `translate3d(0, ${m}px, 0)`;
3847
3857
  }
3848
3858
  },
@@ -3854,12 +3864,12 @@ var Go = p.forwardRef((n, e) => {
3854
3864
  }
3855
3865
  }
3856
3866
  ) : null;
3857
- }), qo = p.forwardRef((n, e) => {
3858
- const { sizes: t, onSizesChange: r, ...s } = n, o = Se(Te, n.__scopeScrollArea), [i, c] = p.useState(), a = p.useRef(null), u = st(e, a, o.onScrollbarXChange);
3867
+ }), ei = p.forwardRef((n, e) => {
3868
+ const { sizes: t, onSizesChange: r, ...s } = n, o = Se(Ae, n.__scopeScrollArea), [i, c] = p.useState(), l = p.useRef(null), u = st(e, l, o.onScrollbarXChange);
3859
3869
  return p.useEffect(() => {
3860
- a.current && c(getComputedStyle(a.current));
3861
- }, [a]), /* @__PURE__ */ E.jsx(
3862
- Er,
3870
+ l.current && c(getComputedStyle(l.current));
3871
+ }, [l]), /* @__PURE__ */ R.jsx(
3872
+ xr,
3863
3873
  {
3864
3874
  "data-orientation": "horizontal",
3865
3875
  ...s,
@@ -3872,20 +3882,20 @@ var Go = p.forwardRef((n, e) => {
3872
3882
  "--radix-scroll-area-thumb-width": Qt(t) + "px",
3873
3883
  ...n.style
3874
3884
  },
3875
- onThumbPointerDown: (l) => n.onThumbPointerDown(l.x),
3876
- onDragScroll: (l) => n.onDragScroll(l.x),
3877
- onWheelScroll: (l, h) => {
3885
+ onThumbPointerDown: (a) => n.onThumbPointerDown(a.x),
3886
+ onDragScroll: (a) => n.onDragScroll(a.x),
3887
+ onWheelScroll: (a, h) => {
3878
3888
  if (o.viewport) {
3879
- const f = o.viewport.scrollLeft + l.deltaX;
3880
- n.onWheelScroll(f), Ar(f, h) && l.preventDefault();
3889
+ const f = o.viewport.scrollLeft + a.deltaX;
3890
+ n.onWheelScroll(f), Dr(f, h) && a.preventDefault();
3881
3891
  }
3882
3892
  },
3883
3893
  onResize: () => {
3884
- a.current && o.viewport && i && r({
3894
+ l.current && o.viewport && i && r({
3885
3895
  content: o.viewport.scrollWidth,
3886
3896
  viewport: o.viewport.offsetWidth,
3887
3897
  scrollbar: {
3888
- size: a.current.clientWidth,
3898
+ size: l.current.clientWidth,
3889
3899
  paddingStart: qt(i.paddingLeft),
3890
3900
  paddingEnd: qt(i.paddingRight)
3891
3901
  }
@@ -3893,12 +3903,12 @@ var Go = p.forwardRef((n, e) => {
3893
3903
  }
3894
3904
  }
3895
3905
  );
3896
- }), Jo = p.forwardRef((n, e) => {
3897
- const { sizes: t, onSizesChange: r, ...s } = n, o = Se(Te, n.__scopeScrollArea), [i, c] = p.useState(), a = p.useRef(null), u = st(e, a, o.onScrollbarYChange);
3906
+ }), ti = p.forwardRef((n, e) => {
3907
+ const { sizes: t, onSizesChange: r, ...s } = n, o = Se(Ae, n.__scopeScrollArea), [i, c] = p.useState(), l = p.useRef(null), u = st(e, l, o.onScrollbarYChange);
3898
3908
  return p.useEffect(() => {
3899
- a.current && c(getComputedStyle(a.current));
3900
- }, [a]), /* @__PURE__ */ E.jsx(
3901
- Er,
3909
+ l.current && c(getComputedStyle(l.current));
3910
+ }, [l]), /* @__PURE__ */ R.jsx(
3911
+ xr,
3902
3912
  {
3903
3913
  "data-orientation": "vertical",
3904
3914
  ...s,
@@ -3912,20 +3922,20 @@ var Go = p.forwardRef((n, e) => {
3912
3922
  "--radix-scroll-area-thumb-height": Qt(t) + "px",
3913
3923
  ...n.style
3914
3924
  },
3915
- onThumbPointerDown: (l) => n.onThumbPointerDown(l.y),
3916
- onDragScroll: (l) => n.onDragScroll(l.y),
3917
- onWheelScroll: (l, h) => {
3925
+ onThumbPointerDown: (a) => n.onThumbPointerDown(a.y),
3926
+ onDragScroll: (a) => n.onDragScroll(a.y),
3927
+ onWheelScroll: (a, h) => {
3918
3928
  if (o.viewport) {
3919
- const f = o.viewport.scrollTop + l.deltaY;
3920
- n.onWheelScroll(f), Ar(f, h) && l.preventDefault();
3929
+ const f = o.viewport.scrollTop + a.deltaY;
3930
+ n.onWheelScroll(f), Dr(f, h) && a.preventDefault();
3921
3931
  }
3922
3932
  },
3923
3933
  onResize: () => {
3924
- a.current && o.viewport && i && r({
3934
+ l.current && o.viewport && i && r({
3925
3935
  content: o.viewport.scrollHeight,
3926
3936
  viewport: o.viewport.offsetHeight,
3927
3937
  scrollbar: {
3928
- size: a.current.clientHeight,
3938
+ size: l.current.clientHeight,
3929
3939
  paddingStart: qt(i.paddingTop),
3930
3940
  paddingEnd: qt(i.paddingBottom)
3931
3941
  }
@@ -3933,7 +3943,7 @@ var Go = p.forwardRef((n, e) => {
3933
3943
  }
3934
3944
  }
3935
3945
  );
3936
- }), [Zo, yr] = gr(Te), Er = p.forwardRef((n, e) => {
3946
+ }), [ni, Rr] = br(Ae), xr = p.forwardRef((n, e) => {
3937
3947
  const {
3938
3948
  __scopeScrollArea: t,
3939
3949
  sizes: r,
@@ -3941,113 +3951,113 @@ var Go = p.forwardRef((n, e) => {
3941
3951
  onThumbChange: o,
3942
3952
  onThumbPointerUp: i,
3943
3953
  onThumbPointerDown: c,
3944
- onThumbPositionChange: a,
3954
+ onThumbPositionChange: l,
3945
3955
  onDragScroll: u,
3946
- onWheelScroll: l,
3956
+ onWheelScroll: a,
3947
3957
  onResize: h,
3948
3958
  ...f
3949
- } = n, m = Se(Te, t), [b, v] = p.useState(null), g = st(e, (L) => v(L)), S = p.useRef(null), _ = p.useRef(""), w = m.viewport, y = r.content - r.viewport, C = Qe(l), x = Qe(a), R = en(h, 10);
3950
- function k(L) {
3951
- if (S.current) {
3952
- const A = L.clientX - S.current.left, O = L.clientY - S.current.top;
3953
- u({ x: A, y: O });
3959
+ } = n, m = Se(Ae, t), [g, b] = p.useState(null), v = st(e, (E) => b(E)), w = p.useRef(null), _ = p.useRef(""), S = m.viewport, y = r.content - r.viewport, T = Qe(a), x = Qe(l), C = en(h, 10);
3960
+ function P(E) {
3961
+ if (w.current) {
3962
+ const D = E.clientX - w.current.left, L = E.clientY - w.current.top;
3963
+ u({ x: D, y: L });
3954
3964
  }
3955
3965
  }
3956
3966
  return p.useEffect(() => {
3957
- const L = (A) => {
3958
- const O = A.target;
3959
- b?.contains(O) && C(A, y);
3967
+ const E = (D) => {
3968
+ const L = D.target;
3969
+ g?.contains(L) && T(D, y);
3960
3970
  };
3961
- return document.addEventListener("wheel", L, { passive: !1 }), () => document.removeEventListener("wheel", L, { passive: !1 });
3962
- }, [w, b, y, C]), p.useEffect(x, [r, x]), At(b, R), At(m.content, R), /* @__PURE__ */ E.jsx(
3963
- Zo,
3971
+ return document.addEventListener("wheel", E, { passive: !1 }), () => document.removeEventListener("wheel", E, { passive: !1 });
3972
+ }, [S, g, y, T]), p.useEffect(x, [r, x]), Tt(g, C), Tt(m.content, C), /* @__PURE__ */ R.jsx(
3973
+ ni,
3964
3974
  {
3965
3975
  scope: t,
3966
- scrollbar: b,
3976
+ scrollbar: g,
3967
3977
  hasThumb: s,
3968
3978
  onThumbChange: Qe(o),
3969
3979
  onThumbPointerUp: Qe(i),
3970
3980
  onThumbPositionChange: x,
3971
3981
  onThumbPointerDown: Qe(c),
3972
- children: /* @__PURE__ */ E.jsx(
3982
+ children: /* @__PURE__ */ R.jsx(
3973
3983
  Nt.div,
3974
3984
  {
3975
3985
  ...f,
3976
- ref: g,
3986
+ ref: v,
3977
3987
  style: { position: "absolute", ...f.style },
3978
- onPointerDown: tt(n.onPointerDown, (L) => {
3979
- L.button === 0 && (L.target.setPointerCapture(L.pointerId), S.current = b.getBoundingClientRect(), _.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", m.viewport && (m.viewport.style.scrollBehavior = "auto"), k(L));
3988
+ onPointerDown: tt(n.onPointerDown, (E) => {
3989
+ E.button === 0 && (E.target.setPointerCapture(E.pointerId), w.current = g.getBoundingClientRect(), _.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", m.viewport && (m.viewport.style.scrollBehavior = "auto"), P(E));
3980
3990
  }),
3981
- onPointerMove: tt(n.onPointerMove, k),
3982
- onPointerUp: tt(n.onPointerUp, (L) => {
3983
- const A = L.target;
3984
- A.hasPointerCapture(L.pointerId) && A.releasePointerCapture(L.pointerId), document.body.style.webkitUserSelect = _.current, m.viewport && (m.viewport.style.scrollBehavior = ""), S.current = null;
3991
+ onPointerMove: tt(n.onPointerMove, P),
3992
+ onPointerUp: tt(n.onPointerUp, (E) => {
3993
+ const D = E.target;
3994
+ D.hasPointerCapture(E.pointerId) && D.releasePointerCapture(E.pointerId), document.body.style.webkitUserSelect = _.current, m.viewport && (m.viewport.style.scrollBehavior = ""), w.current = null;
3985
3995
  })
3986
3996
  }
3987
3997
  )
3988
3998
  }
3989
3999
  );
3990
- }), Kt = "ScrollAreaThumb", Rr = p.forwardRef(
4000
+ }), Kt = "ScrollAreaThumb", Cr = p.forwardRef(
3991
4001
  (n, e) => {
3992
- const { forceMount: t, ...r } = n, s = yr(Kt, n.__scopeScrollArea);
3993
- return /* @__PURE__ */ E.jsx(It, { present: t || s.hasThumb, children: /* @__PURE__ */ E.jsx(Qo, { ref: e, ...r }) });
4002
+ const { forceMount: t, ...r } = n, s = Rr(Kt, n.__scopeScrollArea);
4003
+ return /* @__PURE__ */ R.jsx(It, { present: t || s.hasThumb, children: /* @__PURE__ */ R.jsx(ri, { ref: e, ...r }) });
3994
4004
  }
3995
- ), Qo = p.forwardRef(
4005
+ ), ri = p.forwardRef(
3996
4006
  (n, e) => {
3997
- const { __scopeScrollArea: t, style: r, ...s } = n, o = Se(Kt, t), i = yr(Kt, t), { onThumbPositionChange: c } = i, a = st(
4007
+ const { __scopeScrollArea: t, style: r, ...s } = n, o = Se(Kt, t), i = Rr(Kt, t), { onThumbPositionChange: c } = i, l = st(
3998
4008
  e,
3999
4009
  (h) => i.onThumbChange(h)
4000
- ), u = p.useRef(void 0), l = en(() => {
4010
+ ), u = p.useRef(void 0), a = en(() => {
4001
4011
  u.current && (u.current(), u.current = void 0);
4002
4012
  }, 100);
4003
4013
  return p.useEffect(() => {
4004
4014
  const h = o.viewport;
4005
4015
  if (h) {
4006
4016
  const f = () => {
4007
- if (l(), !u.current) {
4008
- const m = ni(h, c);
4017
+ if (a(), !u.current) {
4018
+ const m = ii(h, c);
4009
4019
  u.current = m, c();
4010
4020
  }
4011
4021
  };
4012
4022
  return c(), h.addEventListener("scroll", f), () => h.removeEventListener("scroll", f);
4013
4023
  }
4014
- }, [o.viewport, l, c]), /* @__PURE__ */ E.jsx(
4024
+ }, [o.viewport, a, c]), /* @__PURE__ */ R.jsx(
4015
4025
  Nt.div,
4016
4026
  {
4017
4027
  "data-state": i.hasThumb ? "visible" : "hidden",
4018
4028
  ...s,
4019
- ref: a,
4029
+ ref: l,
4020
4030
  style: {
4021
4031
  width: "var(--radix-scroll-area-thumb-width)",
4022
4032
  height: "var(--radix-scroll-area-thumb-height)",
4023
4033
  ...r
4024
4034
  },
4025
4035
  onPointerDownCapture: tt(n.onPointerDownCapture, (h) => {
4026
- const m = h.target.getBoundingClientRect(), b = h.clientX - m.left, v = h.clientY - m.top;
4027
- i.onThumbPointerDown({ x: b, y: v });
4036
+ const m = h.target.getBoundingClientRect(), g = h.clientX - m.left, b = h.clientY - m.top;
4037
+ i.onThumbPointerDown({ x: g, y: b });
4028
4038
  }),
4029
4039
  onPointerUp: tt(n.onPointerUp, i.onThumbPointerUp)
4030
4040
  }
4031
4041
  );
4032
4042
  }
4033
4043
  );
4034
- Rr.displayName = Kt;
4035
- var wn = "ScrollAreaCorner", xr = p.forwardRef(
4044
+ Cr.displayName = Kt;
4045
+ var Sn = "ScrollAreaCorner", Ar = p.forwardRef(
4036
4046
  (n, e) => {
4037
- const t = Se(wn, n.__scopeScrollArea), r = !!(t.scrollbarX && t.scrollbarY);
4038
- return t.type !== "scroll" && r ? /* @__PURE__ */ E.jsx(ei, { ...n, ref: e }) : null;
4047
+ const t = Se(Sn, n.__scopeScrollArea), r = !!(t.scrollbarX && t.scrollbarY);
4048
+ return t.type !== "scroll" && r ? /* @__PURE__ */ R.jsx(si, { ...n, ref: e }) : null;
4039
4049
  }
4040
4050
  );
4041
- xr.displayName = wn;
4042
- var ei = p.forwardRef((n, e) => {
4043
- const { __scopeScrollArea: t, ...r } = n, s = Se(wn, t), [o, i] = p.useState(0), [c, a] = p.useState(0), u = !!(o && c);
4044
- return At(s.scrollbarX, () => {
4045
- const l = s.scrollbarX?.offsetHeight || 0;
4046
- s.onCornerHeightChange(l), a(l);
4047
- }), At(s.scrollbarY, () => {
4048
- const l = s.scrollbarY?.offsetWidth || 0;
4049
- s.onCornerWidthChange(l), i(l);
4050
- }), u ? /* @__PURE__ */ E.jsx(
4051
+ Ar.displayName = Sn;
4052
+ var si = p.forwardRef((n, e) => {
4053
+ const { __scopeScrollArea: t, ...r } = n, s = Se(Sn, t), [o, i] = p.useState(0), [c, l] = p.useState(0), u = !!(o && c);
4054
+ return Tt(s.scrollbarX, () => {
4055
+ const a = s.scrollbarX?.offsetHeight || 0;
4056
+ s.onCornerHeightChange(a), l(a);
4057
+ }), Tt(s.scrollbarY, () => {
4058
+ const a = s.scrollbarY?.offsetWidth || 0;
4059
+ s.onCornerWidthChange(a), i(a);
4060
+ }), u ? /* @__PURE__ */ R.jsx(
4051
4061
  Nt.div,
4052
4062
  {
4053
4063
  ...r,
@@ -4067,33 +4077,33 @@ var ei = p.forwardRef((n, e) => {
4067
4077
  function qt(n) {
4068
4078
  return n ? parseInt(n, 10) : 0;
4069
4079
  }
4070
- function Cr(n, e) {
4080
+ function Tr(n, e) {
4071
4081
  const t = n / e;
4072
4082
  return isNaN(t) ? 0 : t;
4073
4083
  }
4074
4084
  function Qt(n) {
4075
- const e = Cr(n.viewport, n.content), t = n.scrollbar.paddingStart + n.scrollbar.paddingEnd, r = (n.scrollbar.size - t) * e;
4085
+ const e = Tr(n.viewport, n.content), t = n.scrollbar.paddingStart + n.scrollbar.paddingEnd, r = (n.scrollbar.size - t) * e;
4076
4086
  return Math.max(r, 18);
4077
4087
  }
4078
- function ti(n, e, t, r = "ltr") {
4079
- const s = Qt(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];
4080
- return Tr([a, u], h)(n);
4088
+ function oi(n, e, t, r = "ltr") {
4089
+ const s = Qt(t), o = s / 2, i = e || o, c = s - i, l = t.scrollbar.paddingStart + i, u = t.scrollbar.size - t.scrollbar.paddingEnd - c, a = t.content - t.viewport, h = r === "ltr" ? [0, a] : [a * -1, 0];
4090
+ return Pr([l, u], h)(n);
4081
4091
  }
4082
- function Kn(n, e, t = "ltr") {
4083
- const r = Qt(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 = Bo(n, a);
4084
- return Tr([0, i], [0, c])(u);
4092
+ function Jn(n, e, t = "ltr") {
4093
+ const r = Qt(e), s = e.scrollbar.paddingStart + e.scrollbar.paddingEnd, o = e.scrollbar.size - s, i = e.content - e.viewport, c = o - r, l = t === "ltr" ? [0, i] : [i * -1, 0], u = Ko(n, l);
4094
+ return Pr([0, i], [0, c])(u);
4085
4095
  }
4086
- function Tr(n, e) {
4096
+ function Pr(n, e) {
4087
4097
  return (t) => {
4088
4098
  if (n[0] === n[1] || e[0] === e[1]) return e[0];
4089
4099
  const r = (e[1] - e[0]) / (n[1] - n[0]);
4090
4100
  return e[0] + r * (t - n[0]);
4091
4101
  };
4092
4102
  }
4093
- function Ar(n, e) {
4103
+ function Dr(n, e) {
4094
4104
  return n > 0 && n < e;
4095
4105
  }
4096
- var ni = (n, e = () => {
4106
+ var ii = (n, e = () => {
4097
4107
  }) => {
4098
4108
  let t = { left: n.scrollLeft, top: n.scrollTop }, r = 0;
4099
4109
  return (function s() {
@@ -4107,9 +4117,9 @@ function en(n, e) {
4107
4117
  window.clearTimeout(r.current), r.current = window.setTimeout(t, e);
4108
4118
  }, [t, e]);
4109
4119
  }
4110
- function At(n, e) {
4120
+ function Tt(n, e) {
4111
4121
  const t = Qe(e);
4112
- mn(() => {
4122
+ pn(() => {
4113
4123
  let r = 0;
4114
4124
  if (n) {
4115
4125
  const s = new ResizeObserver(() => {
@@ -4121,8 +4131,8 @@ function At(n, e) {
4121
4131
  }
4122
4132
  }, [n, t]);
4123
4133
  }
4124
- var ri = vr, si = _r, oi = xr;
4125
- function qn(n) {
4134
+ var ci = _r, ai = Sr, li = Ar;
4135
+ function Zn(n) {
4126
4136
  const e = ze.c(9);
4127
4137
  let t, r, s;
4128
4138
  e[0] !== n ? ({
@@ -4132,12 +4142,12 @@ function qn(n) {
4132
4142
  } = n, e[0] = n, e[1] = t, e[2] = r, e[3] = s) : (t = e[1], r = e[2], s = e[3]);
4133
4143
  const o = s === void 0 ? "vertical" : s;
4134
4144
  let i;
4135
- e[4] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ E.jsx(Rr, { "data-slot": "scroll-area-thumb" }), e[4] = i) : i = e[4];
4145
+ e[4] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ R.jsx(Cr, { "data-slot": "scroll-area-thumb" }), e[4] = i) : i = e[4];
4136
4146
  let c;
4137
- return e[5] !== t || e[6] !== o || e[7] !== r ? (c = /* @__PURE__ */ E.jsx(wr, { "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;
4147
+ return e[5] !== t || e[6] !== o || e[7] !== r ? (c = /* @__PURE__ */ R.jsx(yr, { "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;
4138
4148
  }
4139
- const ai = nt.forwardRef((n, e) => {
4140
- const t = Ur(n), {
4149
+ const di = nt.forwardRef((n, e) => {
4150
+ const t = $r(n), {
4141
4151
  style: r
4142
4152
  } = n;
4143
4153
  let {
@@ -4145,71 +4155,69 @@ const ai = nt.forwardRef((n, e) => {
4145
4155
  hideCursor: o,
4146
4156
  disableDrag: i,
4147
4157
  scale: c = 1,
4148
- scaleWidth: a = 160,
4158
+ scaleWidth: l = 160,
4149
4159
  startLeft: u = 20,
4150
- minScaleCount: l = 20,
4160
+ minScaleCount: a = 20,
4151
4161
  maxScaleCount: h = 1 / 0,
4152
4162
  onChange: f,
4153
4163
  onScroll: m
4154
4164
  } = t;
4155
- const b = ie(null), [v, g] = Tt(s), [S, _] = Tt(dn), [w, y] = Tt(kr), C = Zn((A) => {
4156
- const O = Math.min(h, Math.max(l, A));
4157
- _(O);
4158
- }, [h, l]);
4159
- pn(() => {
4160
- C($r(s, {
4165
+ const g = ee(null), [b, v] = At(s), [w, _] = At(hn), [S, y] = At(xn), T = ee(xn), x = er((E) => {
4166
+ const D = Math.min(h, Math.max(a, E));
4167
+ _(D);
4168
+ }, [h, a]);
4169
+ gn(() => {
4170
+ x(Hr(s, {
4161
4171
  scale: c
4162
- })), g(s);
4163
- }, [s, l, h, c, C]);
4164
- const x = (A) => {
4165
- f?.(A);
4166
- }, R = (A) => {
4172
+ })), v(s);
4173
+ }, [s, a, h, c, x]);
4174
+ const C = (E) => {
4175
+ f?.(E);
4176
+ }, P = (E) => {
4167
4177
  let {
4168
- left: O,
4169
- time: $
4170
- } = A;
4171
- return typeof $ < "u" ? (y($), !0) : typeof O < "u" ? (y(rt(O, {
4178
+ left: D,
4179
+ time: L
4180
+ } = E;
4181
+ return typeof L < "u" ? (y(L), T.current = L, !0) : typeof D < "u" ? (y(T.current = rt(D, {
4172
4182
  startLeft: u,
4173
4183
  scale: c,
4174
- scaleWidth: a
4184
+ scaleWidth: l
4175
4185
  })), !0) : !1;
4176
4186
  };
4177
- Jn(e, () => ({
4187
+ return Qn(e, () => ({
4178
4188
  get target() {
4179
- return b.current;
4189
+ return g.current;
4180
4190
  },
4181
- set time(A) {
4182
- R({
4183
- time: A
4191
+ set time(E) {
4192
+ P({
4193
+ time: E
4184
4194
  });
4185
4195
  },
4186
4196
  get time() {
4187
- return w;
4197
+ return T.current;
4188
4198
  },
4189
- setScrollLeft: (A) => {
4190
- b.current && (b.current.scrollLeft = A);
4199
+ setScrollLeft: (E) => {
4200
+ g.current && (g.current.scrollLeft = E);
4191
4201
  },
4192
- setScrollTop: (A) => {
4193
- b.current && (b.current.scrollTop = A);
4202
+ setScrollTop: (E) => {
4203
+ g.current && (g.current.scrollTop = E);
4194
4204
  }
4195
- }));
4196
- const {
4197
- width: k,
4198
- height: L
4199
- } = Po(b);
4200
- return /* @__PURE__ */ E.jsxs(ri, { style: r, className: `${ln} ${i ? ln + "-disable" : ""}`, "data-slot": "scroll-area", children: [
4201
- /* @__PURE__ */ E.jsxs(si, { "data-slot": "scroll-area-viewport", ref: b, onScroll: (A) => {
4202
- m?.(A.currentTarget);
4203
- }, children: [
4204
- /* @__PURE__ */ E.jsx(go, { ...t, setCursor: R, scaleCount: S, scrollElementRef: b }),
4205
- /* @__PURE__ */ E.jsx(po, { ...t, scrollElementRef: b, timelineWidth: k, timelineHeight: L, disableDrag: i, editorData: v, cursorTime: w, scaleCount: S, setScaleCount: C, setEditorData: x }),
4206
- !o && /* @__PURE__ */ E.jsx(Do, { ...t, timelineWidth: k, height: L, scaleCount: S, setScaleCount: C, setCursor: R, cursorTime: w, editorData: v, scrollElementRef: b })
4207
- ] }),
4208
- /* @__PURE__ */ E.jsx(qn, { orientation: "horizontal" }),
4209
- /* @__PURE__ */ E.jsx(qn, { orientation: "vertical" }),
4210
- /* @__PURE__ */ E.jsx(oi, {})
4205
+ })), /* @__PURE__ */ R.jsxs(ci, { style: r, className: `${un} ${i ? un + "-disable" : ""}`, "data-slot": "scroll-area", children: [
4206
+ /* @__PURE__ */ R.jsx(ai, { "data-slot": "scroll-area-viewport", ref: g, onScroll: (E) => {
4207
+ m?.(E.currentTarget);
4208
+ }, children: /* @__PURE__ */ R.jsx(Mo, { elementRef: g, children: ({
4209
+ width: E,
4210
+ height: D
4211
+ }) => /* @__PURE__ */ R.jsxs(R.Fragment, { children: [
4212
+ /* @__PURE__ */ R.jsx(bo, { ...t, setCursor: P, scaleCount: w, scrollElementRef: g }),
4213
+ /* @__PURE__ */ R.jsx(vo, { ...t, scrollElementRef: g, timelineWidth: E, timelineHeight: D, disableDrag: i, editorData: b, cursorTime: S, scaleCount: w, setScaleCount: x, setEditorData: C }),
4214
+ !o && /* @__PURE__ */ R.jsx(No, { ...t, timelineWidth: E, height: D, scaleCount: w, setScaleCount: x, setCursor: P, cursorTime: S, editorData: b, scrollElementRef: g })
4215
+ ] }) }) }),
4216
+ /* @__PURE__ */ R.jsx(Zn, { orientation: "horizontal" }),
4217
+ /* @__PURE__ */ R.jsx(Zn, { orientation: "vertical" }),
4218
+ /* @__PURE__ */ R.jsx(li, {})
4211
4219
  ] });
4212
4220
  });
4213
4221
  export {
4214
- ai as Timeline
4222
+ di as Timeline
4215
4223
  };