@kteneyck/cesium-timeline-react 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
- import Ue, { useRef as w, useState as ve, useEffect as X, forwardRef as qe, useCallback as se, useImperativeHandle as Ge, useLayoutEffect as Ve, useMemo as Le } from "react";
1
+ import qe, { useMemo as Se, useRef as b, useState as ve, useEffect as J, forwardRef as Ge, useCallback as se, useImperativeHandle as Ve, useLayoutEffect as Ke } from "react";
2
2
  import * as j from "cesium";
3
- import { splitForDisplay as Ke, getTimezoneAbbr as Ze, formatDateTime as Ie, drawTimeline as Qe, hitTestSwimLane as et, hitTestLaneLabel as tt, isInSwimLaneRegion as nt, zoomRange as rt, TICK_AREA_HEIGHT as $e, DEFAULT_LANE_HEIGHT as Fe, LANE_GAP as Oe, SWIM_LANE_SCROLL_SPEED as ot, MIN_SPAN_MS as st, MAX_SPAN_MS as ct, toJulianDate as ge, defaultTheme as it, generateTicks as ut, timeToPosition as at, snapToTick as lt } from "@kteneyck/cesium-timeline-core";
3
+ import { DEFAULT_LABELS as Ze, splitForDisplay as Qe, getTimezoneAbbr as et, formatDateTime as Fe, resolveLabel as Ie, drawTimeline as tt, hitTestSwimLane as nt, hitTestLaneLabel as rt, isInSwimLaneRegion as ot, zoomRange as st, TICK_AREA_HEIGHT as $e, DEFAULT_LANE_HEIGHT as Oe, LANE_GAP as Pe, SWIM_LANE_SCROLL_SPEED as ct, MIN_SPAN_MS as it, MAX_SPAN_MS as lt, toJulianDate as ge, defaultTheme as at, generateTicks as ut, timeToPosition as dt, snapToTick as ft } from "@kteneyck/cesium-timeline-core";
4
4
  export * from "@kteneyck/cesium-timeline-core";
5
- import { TICK_AREA_HEIGHT as Mt } from "@kteneyck/cesium-timeline-core";
6
- var Re = { exports: {} }, ye = {};
5
+ import { TICK_AREA_HEIGHT as Dt } from "@kteneyck/cesium-timeline-core";
6
+ var Me = { exports: {} }, Te = {};
7
7
  /**
8
8
  * @license React
9
9
  * react-jsx-runtime.production.js
@@ -13,29 +13,29 @@ var Re = { exports: {} }, ye = {};
13
13
  * This source code is licensed under the MIT license found in the
14
14
  * LICENSE file in the root directory of this source tree.
15
15
  */
16
- var Pe;
17
- function dt() {
18
- if (Pe) return ye;
19
- Pe = 1;
20
- var C = Symbol.for("react.transitional.element"), k = Symbol.for("react.fragment");
21
- function Y(a, T, R) {
22
- var I = null;
23
- if (R !== void 0 && (I = "" + R), T.key !== void 0 && (I = "" + T.key), "key" in T) {
16
+ var Ne;
17
+ function pt() {
18
+ if (Ne) return Te;
19
+ Ne = 1;
20
+ var A = Symbol.for("react.transitional.element"), L = Symbol.for("react.fragment");
21
+ function Y(a, M, R) {
22
+ var F = null;
23
+ if (R !== void 0 && (F = "" + R), M.key !== void 0 && (F = "" + M.key), "key" in M) {
24
24
  R = {};
25
- for (var O in T)
26
- O !== "key" && (R[O] = T[O]);
27
- } else R = T;
28
- return T = R.ref, {
29
- $$typeof: C,
25
+ for (var O in M)
26
+ O !== "key" && (R[O] = M[O]);
27
+ } else R = M;
28
+ return M = R.ref, {
29
+ $$typeof: A,
30
30
  type: a,
31
- key: I,
32
- ref: T !== void 0 ? T : null,
31
+ key: F,
32
+ ref: M !== void 0 ? M : null,
33
33
  props: R
34
34
  };
35
35
  }
36
- return ye.Fragment = k, ye.jsx = Y, ye.jsxs = Y, ye;
36
+ return Te.Fragment = L, Te.jsx = Y, Te.jsxs = Y, Te;
37
37
  }
38
- var Ee = {};
38
+ var we = {};
39
39
  /**
40
40
  * @license React
41
41
  * react-jsx-runtime.development.js
@@ -45,26 +45,26 @@ var Ee = {};
45
45
  * This source code is licensed under the MIT license found in the
46
46
  * LICENSE file in the root directory of this source tree.
47
47
  */
48
- var Ne;
49
- function ft() {
50
- return Ne || (Ne = 1, process.env.NODE_ENV !== "production" && (function() {
51
- function C(t) {
48
+ var Xe;
49
+ function mt() {
50
+ return Xe || (Xe = 1, process.env.NODE_ENV !== "production" && (function() {
51
+ function A(t) {
52
52
  if (t == null) return null;
53
53
  if (typeof t == "function")
54
- return t.$$typeof === ce ? null : t.displayName || t.name || null;
54
+ return t.$$typeof === re ? null : t.displayName || t.name || null;
55
55
  if (typeof t == "string") return t;
56
56
  switch (t) {
57
57
  case B:
58
58
  return "Fragment";
59
- case d:
59
+ case p:
60
60
  return "Profiler";
61
61
  case ee:
62
62
  return "StrictMode";
63
- case l:
63
+ case u:
64
64
  return "Suspense";
65
- case y:
65
+ case v:
66
66
  return "SuspenseList";
67
- case te:
67
+ case w:
68
68
  return "Activity";
69
69
  }
70
70
  if (typeof t == "object")
@@ -73,98 +73,98 @@ function ft() {
73
73
  ), t.$$typeof) {
74
74
  case Q:
75
75
  return "Portal";
76
- case H:
76
+ case $:
77
77
  return t.displayName || "Context";
78
- case v:
78
+ case g:
79
79
  return (t._context.displayName || "Context") + ".Consumer";
80
- case z:
81
- var m = t.render;
82
- return t = t.displayName, t || (t = m.displayName || m.name || "", t = t !== "" ? "ForwardRef(" + t + ")" : "ForwardRef"), t;
83
- case _:
84
- return m = t.displayName || null, m !== null ? m : C(t.type) || "Memo";
85
- case A:
86
- m = t._payload, t = t._init;
80
+ case K:
81
+ var d = t.render;
82
+ return t = t.displayName, t || (t = d.displayName || d.name || "", t = t !== "" ? "ForwardRef(" + t + ")" : "ForwardRef"), t;
83
+ case P:
84
+ return d = t.displayName || null, d !== null ? d : A(t.type) || "Memo";
85
+ case y:
86
+ d = t._payload, t = t._init;
87
87
  try {
88
- return C(t(m));
88
+ return A(t(d));
89
89
  } catch {
90
90
  }
91
91
  }
92
92
  return null;
93
93
  }
94
- function k(t) {
94
+ function L(t) {
95
95
  return "" + t;
96
96
  }
97
97
  function Y(t) {
98
98
  try {
99
- k(t);
100
- var m = !1;
99
+ L(t);
100
+ var d = !1;
101
101
  } catch {
102
- m = !0;
102
+ d = !0;
103
103
  }
104
- if (m) {
105
- m = console;
106
- var g = m.error, M = typeof Symbol == "function" && Symbol.toStringTag && t[Symbol.toStringTag] || t.constructor.name || "Object";
107
- return g.call(
108
- m,
104
+ if (d) {
105
+ d = console;
106
+ var x = d.error, E = typeof Symbol == "function" && Symbol.toStringTag && t[Symbol.toStringTag] || t.constructor.name || "Object";
107
+ return x.call(
108
+ d,
109
109
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
110
- M
111
- ), k(t);
110
+ E
111
+ ), L(t);
112
112
  }
113
113
  }
114
114
  function a(t) {
115
115
  if (t === B) return "<>";
116
- if (typeof t == "object" && t !== null && t.$$typeof === A)
116
+ if (typeof t == "object" && t !== null && t.$$typeof === y)
117
117
  return "<...>";
118
118
  try {
119
- var m = C(t);
120
- return m ? "<" + m + ">" : "<...>";
119
+ var d = A(t);
120
+ return d ? "<" + d + ">" : "<...>";
121
121
  } catch {
122
122
  return "<...>";
123
123
  }
124
124
  }
125
- function T() {
126
- var t = P.A;
125
+ function M() {
126
+ var t = X.A;
127
127
  return t === null ? null : t.getOwner();
128
128
  }
129
129
  function R() {
130
130
  return Error("react-stack-top-frame");
131
131
  }
132
- function I(t) {
133
- if (q.call(t, "key")) {
134
- var m = Object.getOwnPropertyDescriptor(t, "key").get;
135
- if (m && m.isReactWarning) return !1;
132
+ function F(t) {
133
+ if (te.call(t, "key")) {
134
+ var d = Object.getOwnPropertyDescriptor(t, "key").get;
135
+ if (d && d.isReactWarning) return !1;
136
136
  }
137
137
  return t.key !== void 0;
138
138
  }
139
- function O(t, m) {
140
- function g() {
141
- i || (i = !0, console.error(
139
+ function O(t, d) {
140
+ function x() {
141
+ k || (k = !0, console.error(
142
142
  "%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)",
143
- m
143
+ d
144
144
  ));
145
145
  }
146
- g.isReactWarning = !0, Object.defineProperty(t, "key", {
147
- get: g,
146
+ x.isReactWarning = !0, Object.defineProperty(t, "key", {
147
+ get: x,
148
148
  configurable: !0
149
149
  });
150
150
  }
151
- function W() {
152
- var t = C(this.type);
153
- return L[t] || (L[t] = !0, console.error(
151
+ function z() {
152
+ var t = A(this.type);
153
+ return S[t] || (S[t] = !0, console.error(
154
154
  "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."
155
155
  )), t = this.props.ref, t !== void 0 ? t : null;
156
156
  }
157
- function D(t, m, g, M, ue, ae) {
158
- var E = g.ref;
157
+ function _(t, d, x, E, ce, pe) {
158
+ var T = x.ref;
159
159
  return t = {
160
160
  $$typeof: Z,
161
161
  type: t,
162
- key: m,
163
- props: g,
164
- _owner: M
165
- }, (E !== void 0 ? E : null) !== null ? Object.defineProperty(t, "ref", {
162
+ key: d,
163
+ props: x,
164
+ _owner: E
165
+ }, (T !== void 0 ? T : null) !== null ? Object.defineProperty(t, "ref", {
166
166
  enumerable: !1,
167
- get: W
167
+ get: z
168
168
  }) : Object.defineProperty(t, "ref", { enumerable: !1, value: null }), t._store = {}, Object.defineProperty(t._store, "validated", {
169
169
  configurable: !1,
170
170
  enumerable: !1,
@@ -179,69 +179,69 @@ function ft() {
179
179
  configurable: !1,
180
180
  enumerable: !1,
181
181
  writable: !0,
182
- value: ue
182
+ value: ce
183
183
  }), Object.defineProperty(t, "_debugTask", {
184
184
  configurable: !1,
185
185
  enumerable: !1,
186
186
  writable: !0,
187
- value: ae
187
+ value: pe
188
188
  }), Object.freeze && (Object.freeze(t.props), Object.freeze(t)), t;
189
189
  }
190
- function U(t, m, g, M, ue, ae) {
191
- var E = m.children;
192
- if (E !== void 0)
193
- if (M)
194
- if (N(E)) {
195
- for (M = 0; M < E.length; M++)
196
- $(E[M]);
197
- Object.freeze && Object.freeze(E);
190
+ function U(t, d, x, E, ce, pe) {
191
+ var T = d.children;
192
+ if (T !== void 0)
193
+ if (E)
194
+ if (H(T)) {
195
+ for (E = 0; E < T.length; E++)
196
+ W(T[E]);
197
+ Object.freeze && Object.freeze(T);
198
198
  } else
199
199
  console.error(
200
200
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
201
201
  );
202
- else $(E);
203
- if (q.call(m, "key")) {
204
- E = C(t);
205
- var ie = Object.keys(m).filter(function(be) {
206
- return be !== "key";
202
+ else W(T);
203
+ if (te.call(d, "key")) {
204
+ T = A(t);
205
+ var oe = Object.keys(d).filter(function(xe) {
206
+ return xe !== "key";
207
207
  });
208
- M = 0 < ie.length ? "{key: someKey, " + ie.join(": ..., ") + ": ...}" : "{key: someKey}", re[E + M] || (ie = 0 < ie.length ? "{" + ie.join(": ..., ") + ": ...}" : "{}", console.error(
208
+ E = 0 < oe.length ? "{key: someKey, " + oe.join(": ..., ") + ": ...}" : "{key: someKey}", q[T + E] || (oe = 0 < oe.length ? "{" + oe.join(": ..., ") + ": ...}" : "{}", console.error(
209
209
  `A props object containing a "key" prop is being spread into JSX:
210
210
  let props = %s;
211
211
  <%s {...props} />
212
212
  React keys must be passed directly to JSX without using spread:
213
213
  let props = %s;
214
214
  <%s key={someKey} {...props} />`,
215
- M,
216
215
  E,
217
- ie,
218
- E
219
- ), re[E + M] = !0);
216
+ T,
217
+ oe,
218
+ T
219
+ ), q[T + E] = !0);
220
220
  }
221
- if (E = null, g !== void 0 && (Y(g), E = "" + g), I(m) && (Y(m.key), E = "" + m.key), "key" in m) {
222
- g = {};
223
- for (var le in m)
224
- le !== "key" && (g[le] = m[le]);
225
- } else g = m;
226
- return E && O(
227
- g,
221
+ if (T = null, x !== void 0 && (Y(x), T = "" + x), F(d) && (Y(d.key), T = "" + d.key), "key" in d) {
222
+ x = {};
223
+ for (var ae in d)
224
+ ae !== "key" && (x[ae] = d[ae]);
225
+ } else x = d;
226
+ return T && O(
227
+ x,
228
228
  typeof t == "function" ? t.displayName || t.name || "Unknown" : t
229
- ), D(
229
+ ), _(
230
230
  t,
231
- E,
232
- g,
233
- T(),
234
- ue,
235
- ae
231
+ T,
232
+ x,
233
+ M(),
234
+ ce,
235
+ pe
236
236
  );
237
237
  }
238
- function $(t) {
239
- oe(t) ? t._store && (t._store.validated = 1) : typeof t == "object" && t !== null && t.$$typeof === A && (t._payload.status === "fulfilled" ? oe(t._payload.value) && t._payload.value._store && (t._payload.value._store.validated = 1) : t._store && (t._store.validated = 1));
238
+ function W(t) {
239
+ ne(t) ? t._store && (t._store.validated = 1) : typeof t == "object" && t !== null && t.$$typeof === y && (t._payload.status === "fulfilled" ? ne(t._payload.value) && t._payload.value._store && (t._payload.value._store.validated = 1) : t._store && (t._store.validated = 1));
240
240
  }
241
- function oe(t) {
241
+ function ne(t) {
242
242
  return typeof t == "object" && t !== null && t.$$typeof === Z;
243
243
  }
244
- var V = Ue, Z = Symbol.for("react.transitional.element"), Q = Symbol.for("react.portal"), B = Symbol.for("react.fragment"), ee = Symbol.for("react.strict_mode"), d = Symbol.for("react.profiler"), v = Symbol.for("react.consumer"), H = Symbol.for("react.context"), z = Symbol.for("react.forward_ref"), l = Symbol.for("react.suspense"), y = Symbol.for("react.suspense_list"), _ = Symbol.for("react.memo"), A = Symbol.for("react.lazy"), te = Symbol.for("react.activity"), ce = Symbol.for("react.client.reference"), P = V.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, q = Object.prototype.hasOwnProperty, N = Array.isArray, b = console.createTask ? console.createTask : function() {
244
+ var V = qe, Z = Symbol.for("react.transitional.element"), Q = Symbol.for("react.portal"), B = Symbol.for("react.fragment"), ee = Symbol.for("react.strict_mode"), p = Symbol.for("react.profiler"), g = Symbol.for("react.consumer"), $ = Symbol.for("react.context"), K = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), P = Symbol.for("react.memo"), y = Symbol.for("react.lazy"), w = Symbol.for("react.activity"), re = Symbol.for("react.client.reference"), X = V.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, te = Object.prototype.hasOwnProperty, H = Array.isArray, D = console.createTask ? console.createTask : function() {
245
245
  return null;
246
246
  };
247
247
  V = {
@@ -249,74 +249,78 @@ React keys must be passed directly to JSX without using spread:
249
249
  return t();
250
250
  }
251
251
  };
252
- var i, L = {}, S = V.react_stack_bottom_frame.bind(
252
+ var k, S = {}, i = V.react_stack_bottom_frame.bind(
253
253
  V,
254
254
  R
255
- )(), ne = b(a(R)), re = {};
256
- Ee.Fragment = B, Ee.jsx = function(t, m, g) {
257
- var M = 1e4 > P.recentlyCreatedOwnerStacks++;
255
+ )(), C = D(a(R)), q = {};
256
+ we.Fragment = B, we.jsx = function(t, d, x) {
257
+ var E = 1e4 > X.recentlyCreatedOwnerStacks++;
258
258
  return U(
259
259
  t,
260
- m,
261
- g,
260
+ d,
261
+ x,
262
262
  !1,
263
- M ? Error("react-stack-top-frame") : S,
264
- M ? b(a(t)) : ne
263
+ E ? Error("react-stack-top-frame") : i,
264
+ E ? D(a(t)) : C
265
265
  );
266
- }, Ee.jsxs = function(t, m, g) {
267
- var M = 1e4 > P.recentlyCreatedOwnerStacks++;
266
+ }, we.jsxs = function(t, d, x) {
267
+ var E = 1e4 > X.recentlyCreatedOwnerStacks++;
268
268
  return U(
269
269
  t,
270
- m,
271
- g,
270
+ d,
271
+ x,
272
272
  !0,
273
- M ? Error("react-stack-top-frame") : S,
274
- M ? b(a(t)) : ne
273
+ E ? Error("react-stack-top-frame") : i,
274
+ E ? D(a(t)) : C
275
275
  );
276
276
  };
277
- })()), Ee;
277
+ })()), we;
278
278
  }
279
279
  var Je;
280
- function mt() {
281
- return Je || (Je = 1, process.env.NODE_ENV === "production" ? Re.exports = dt() : Re.exports = ft()), Re.exports;
280
+ function ht() {
281
+ return Je || (Je = 1, process.env.NODE_ENV === "production" ? Me.exports = pt() : Me.exports = mt()), Me.exports;
282
282
  }
283
- var c = mt();
284
- const pt = 520, ht = () => /* @__PURE__ */ c.jsxs("svg", { width: "14", height: "16", viewBox: "0 0 14 16", fill: "currentColor", "aria-hidden": "true", children: [
285
- /* @__PURE__ */ c.jsx("rect", { x: "1", y: "0", width: "4", height: "16", rx: "1" }),
286
- /* @__PURE__ */ c.jsx("rect", { x: "9", y: "0", width: "4", height: "16", rx: "1" })
287
- ] }), Xe = () => /* @__PURE__ */ c.jsx("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ c.jsx("polyline", { points: "3,5 7,9 11,5" }) }), Ye = () => /* @__PURE__ */ c.jsx("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ c.jsx("polyline", { points: "3,9 7,5 11,9" }) }), xt = ({
288
- currentTime: C,
289
- isPlaying: k,
283
+ var l = ht();
284
+ const xt = 520, gt = () => /* @__PURE__ */ l.jsxs("svg", { width: "14", height: "16", viewBox: "0 0 14 16", fill: "currentColor", "aria-hidden": "true", children: [
285
+ /* @__PURE__ */ l.jsx("rect", { x: "1", y: "0", width: "4", height: "16", rx: "1" }),
286
+ /* @__PURE__ */ l.jsx("rect", { x: "9", y: "0", width: "4", height: "16", rx: "1" })
287
+ ] }), Ye = () => /* @__PURE__ */ l.jsx("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ l.jsx("polyline", { points: "3,5 7,9 11,5" }) }), ze = () => /* @__PURE__ */ l.jsx("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ l.jsx("polyline", { points: "3,9 7,5 11,9" }) }), vt = ({
288
+ currentTime: A,
289
+ isPlaying: L,
290
290
  multiplier: Y,
291
291
  dateTimeFormat: a,
292
- timezone: T,
292
+ timezone: M,
293
293
  isLive: R,
294
- hasStartTime: I,
294
+ hasStartTime: F,
295
295
  hasEndTime: O,
296
- showJumpToStart: W = !0,
297
- showJumpToEnd: D = !0,
296
+ showJumpToStart: z = !0,
297
+ showJumpToEnd: _ = !0,
298
298
  onPlayPause: U,
299
- onJumpToStart: $,
300
- onRewind: oe,
299
+ onJumpToStart: W,
300
+ onRewind: ne,
301
301
  onFastForward: V,
302
302
  onJumpToEnd: Z,
303
303
  onJumpToLive: Q,
304
304
  onResetSpeed: B,
305
305
  onDateTimeClick: ee,
306
- theme: d,
307
- swimLanesVisible: v,
308
- onToggleSwimLanes: H
306
+ theme: p,
307
+ swimLanesVisible: g,
308
+ onToggleSwimLanes: $,
309
+ labels: K
309
310
  }) => {
310
- const z = Y < 0, l = Y > 1, y = Y === 1, _ = Math.abs(Y), A = w(null), [te, ce] = ve(!1);
311
- X(() => {
312
- const i = A.current;
311
+ const u = Y < 0, v = Y > 1, P = Y === 1, y = Math.abs(Y), w = Se(
312
+ () => ({ ...Ze, ...K }),
313
+ [K]
314
+ ), re = b(null), [X, te] = ve(!1);
315
+ J(() => {
316
+ const i = re.current;
313
317
  if (!i) return;
314
- const L = new ResizeObserver(([S]) => {
315
- ce(S.contentRect.width < pt);
318
+ const C = new ResizeObserver(([q]) => {
319
+ te(q.contentRect.width < xt);
316
320
  });
317
- return L.observe(i), () => L.disconnect();
321
+ return C.observe(i), () => C.disconnect();
318
322
  }, []);
319
- const P = {
323
+ const H = {
320
324
  background: "none",
321
325
  border: "1px solid transparent",
322
326
  cursor: "pointer",
@@ -333,37 +337,37 @@ const pt = 520, ht = () => /* @__PURE__ */ c.jsxs("svg", { width: "14", height:
333
337
  fontFamily: "system-ui, -apple-system, sans-serif",
334
338
  flexShrink: 0,
335
339
  lineHeight: 1
336
- }, q = (i) => ({
337
- ...P,
338
- color: i ? d.buttonActiveColor : d.buttonColor,
339
- borderColor: i ? `${d.buttonActiveColor}33` : "transparent"
340
- }), N = (i, L) => {
341
- i.currentTarget.style.backgroundColor = L ? `${d.buttonActiveColor}22` : d.buttonHoverColor + "44";
342
- }, b = (i) => {
340
+ }, D = (i) => ({
341
+ ...H,
342
+ color: i ? p.buttonActiveColor : p.buttonColor,
343
+ borderColor: i ? `${p.buttonActiveColor}33` : "transparent"
344
+ }), k = (i, C) => {
345
+ i.currentTarget.style.backgroundColor = C ? `${p.buttonActiveColor}22` : p.buttonHoverColor + "44";
346
+ }, S = (i) => {
343
347
  i.currentTarget.style.backgroundColor = "transparent";
344
348
  };
345
- return /* @__PURE__ */ c.jsxs(
349
+ return /* @__PURE__ */ l.jsxs(
346
350
  "div",
347
351
  {
348
- ref: A,
352
+ ref: re,
349
353
  style: {
350
- display: te ? "flex" : "grid",
351
- gridTemplateColumns: te ? void 0 : "1fr auto 1fr",
354
+ display: X ? "flex" : "grid",
355
+ gridTemplateColumns: X ? void 0 : "1fr auto 1fr",
352
356
  alignItems: "center",
353
357
  padding: "6px 16px",
354
- backgroundColor: d.controlBarBackground,
355
- borderBottom: `1px solid ${d.controlBarBorder}`,
358
+ backgroundColor: p.controlBarBackground,
359
+ borderBottom: `1px solid ${p.controlBarBorder}`,
356
360
  fontFamily: "system-ui, -apple-system, sans-serif"
357
361
  },
358
362
  children: [
359
- /* @__PURE__ */ c.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px", flexShrink: 0 }, children: [
360
- /* @__PURE__ */ c.jsx(
363
+ /* @__PURE__ */ l.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px", flexShrink: 0 }, children: [
364
+ /* @__PURE__ */ l.jsx(
361
365
  "div",
362
366
  {
363
367
  onClick: ee,
364
- title: ee ? "Click to jump to a date/time" : void 0,
368
+ title: ee ? w.dateTimeClickTooltip : void 0,
365
369
  style: {
366
- color: d.labelColor,
370
+ color: p.labelColor,
367
371
  fontFamily: "monospace",
368
372
  lineHeight: 1.15,
369
373
  cursor: ee ? "pointer" : "default",
@@ -372,34 +376,34 @@ const pt = 520, ht = () => /* @__PURE__ */ c.jsxs("svg", { width: "14", height:
372
376
  transition: "background 0.15s"
373
377
  },
374
378
  onMouseEnter: (i) => {
375
- ee && (i.currentTarget.style.background = d.buttonHoverColor + "44");
379
+ ee && (i.currentTarget.style.background = p.buttonHoverColor + "44");
376
380
  },
377
381
  onMouseLeave: (i) => i.currentTarget.style.background = "transparent",
378
382
  children: (() => {
379
- const { timeFormat: i, dateFormat: L } = Ke(a), S = Ze(C, T);
380
- return /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
381
- i && /* @__PURE__ */ c.jsx("div", { style: { fontSize: "2em", fontWeight: "bold", letterSpacing: "0.02em" }, children: Ie(C, i, T) }),
382
- L && /* @__PURE__ */ c.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "6px" }, children: [
383
- /* @__PURE__ */ c.jsx("span", { style: { fontSize: "1.15em", letterSpacing: "0.03em", color: d.buttonActiveColor }, children: Ie(C, L, T) }),
384
- S && /* @__PURE__ */ c.jsx("span", { style: {
383
+ const { timeFormat: i, dateFormat: C } = Qe(a), q = et(A, M);
384
+ return /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
385
+ i && /* @__PURE__ */ l.jsx("div", { style: { fontSize: "2em", fontWeight: "bold", letterSpacing: "0.02em" }, children: Fe(A, i, M) }),
386
+ C && /* @__PURE__ */ l.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "6px" }, children: [
387
+ /* @__PURE__ */ l.jsx("span", { style: { fontSize: "1.15em", letterSpacing: "0.03em", color: p.buttonActiveColor }, children: Fe(A, C, M) }),
388
+ q && /* @__PURE__ */ l.jsx("span", { style: {
385
389
  fontSize: "0.9em",
386
- color: d.labelColor,
390
+ color: p.labelColor,
387
391
  opacity: 0.7,
388
392
  fontWeight: "bold",
389
393
  letterSpacing: "0.04em"
390
- }, children: S })
394
+ }, children: q })
391
395
  ] })
392
396
  ] });
393
397
  })()
394
398
  }
395
399
  ),
396
- /* @__PURE__ */ c.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "2px", justifyContent: "center" }, children: [
397
- /* @__PURE__ */ c.jsx(
400
+ /* @__PURE__ */ l.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "2px", justifyContent: "center" }, children: [
401
+ /* @__PURE__ */ l.jsx(
398
402
  "button",
399
403
  {
400
404
  onClick: Q,
401
405
  style: {
402
- ...P,
406
+ ...H,
403
407
  fontSize: "11px",
404
408
  fontWeight: "bold",
405
409
  letterSpacing: "0.05em",
@@ -407,9 +411,9 @@ const pt = 520, ht = () => /* @__PURE__ */ c.jsxs("svg", { width: "14", height:
407
411
  minWidth: "52px",
408
412
  height: "20px",
409
413
  borderRadius: "3px",
410
- color: R ? d.controlBarBackground : d.buttonActiveColor,
411
- backgroundColor: R ? d.buttonActiveColor : "transparent",
412
- borderColor: d.buttonActiveColor,
414
+ color: R ? p.controlBarBackground : p.buttonActiveColor,
415
+ backgroundColor: R ? p.buttonActiveColor : "transparent",
416
+ borderColor: p.buttonActiveColor,
413
417
  opacity: R ? 1 : 0.55
414
418
  },
415
419
  onMouseEnter: (i) => {
@@ -418,803 +422,805 @@ const pt = 520, ht = () => /* @__PURE__ */ c.jsxs("svg", { width: "14", height:
418
422
  onMouseLeave: (i) => {
419
423
  i.currentTarget.style.opacity = R ? "1" : "0.55";
420
424
  },
421
- title: R ? "Currently live" : "Jump to live (now)",
422
- children: R ? "● LIVE" : "LIVE"
425
+ title: R ? w.liveActiveTooltip : w.liveTooltip,
426
+ children: R ? w.liveActiveLabel : w.liveLabel
423
427
  }
424
428
  ),
425
- /* @__PURE__ */ c.jsx("div", { style: { height: "20px", display: "flex", alignItems: "center" }, children: !y && /* @__PURE__ */ c.jsx(
429
+ /* @__PURE__ */ l.jsx("div", { style: { height: "20px", display: "flex", alignItems: "center" }, children: !P && /* @__PURE__ */ l.jsx(
426
430
  "button",
427
431
  {
428
432
  onClick: () => B(),
429
433
  style: {
430
- ...P,
434
+ ...H,
431
435
  fontSize: "11px",
432
- color: d.buttonActiveColor,
433
- borderColor: `${d.buttonActiveColor}44`,
436
+ color: p.buttonActiveColor,
437
+ borderColor: `${p.buttonActiveColor}44`,
434
438
  width: "52px",
435
439
  minWidth: "52px",
436
440
  height: "20px"
437
441
  },
438
- onMouseEnter: (i) => N(i, !0),
439
- onMouseLeave: b,
440
- title: "Reset to 1× speed",
441
- children: z ? `◀ ${_}×` : `${_}× ▶`
442
+ onMouseEnter: (i) => k(i, !0),
443
+ onMouseLeave: S,
444
+ title: w.resetSpeedTooltip,
445
+ children: u ? `◀ ${y}×` : `${y}× ▶`
442
446
  }
443
447
  ) })
444
448
  ] })
445
449
  ] }),
446
- /* @__PURE__ */ c.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "2px", ...te ? { flex: 1, justifyContent: "center" } : {} }, children: [
447
- W && /* @__PURE__ */ c.jsx(
450
+ /* @__PURE__ */ l.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "2px", ...X ? { flex: 1, justifyContent: "center" } : {} }, children: [
451
+ z && /* @__PURE__ */ l.jsx(
448
452
  "button",
449
453
  {
450
- onClick: I ? $ : void 0,
451
- disabled: !I,
452
- style: { ...q(!1), opacity: I ? 1 : 0.3, cursor: I ? "pointer" : "default" },
453
- onMouseEnter: I ? (i) => N(i, !1) : void 0,
454
- onMouseLeave: I ? b : void 0,
455
- title: I ? "Jump to start" : "No start time set",
454
+ onClick: F ? W : void 0,
455
+ disabled: !F,
456
+ style: { ...D(!1), opacity: F ? 1 : 0.3, cursor: F ? "pointer" : "default" },
457
+ onMouseEnter: F ? (i) => k(i, !1) : void 0,
458
+ onMouseLeave: F ? S : void 0,
459
+ title: F ? w.jumpToStartTooltip : w.noStartTimeTooltip,
456
460
  children: "⏮"
457
461
  }
458
462
  ),
459
- /* @__PURE__ */ c.jsx(
463
+ /* @__PURE__ */ l.jsx(
460
464
  "button",
461
465
  {
462
- onClick: oe,
463
- style: { ...q(z), width: "64px", minWidth: "64px", gap: "3px" },
464
- onMouseEnter: (i) => N(i, z),
465
- onMouseLeave: b,
466
- title: z ? `Reverse ${_}× — click to speed up, press play to stop` : "Rewind",
467
- children: z ? /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
468
- /* @__PURE__ */ c.jsxs("span", { style: { fontSize: "11px", fontWeight: "bold" }, children: [
469
- _,
466
+ onClick: ne,
467
+ style: { ...D(u), width: "64px", minWidth: "64px", gap: "3px" },
468
+ onMouseEnter: (i) => k(i, u),
469
+ onMouseLeave: S,
470
+ title: u ? Ie(w.rewindActiveTooltip, y) : w.rewindTooltip,
471
+ children: u ? /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
472
+ /* @__PURE__ */ l.jsxs("span", { style: { fontSize: "11px", fontWeight: "bold" }, children: [
473
+ y,
470
474
  "×"
471
475
  ] }),
472
476
  "◀◀"
473
477
  ] }) : "◀◀"
474
478
  }
475
479
  ),
476
- /* @__PURE__ */ c.jsx(
480
+ /* @__PURE__ */ l.jsx(
477
481
  "button",
478
482
  {
479
- onClick: () => U(!k),
483
+ onClick: () => U(!L),
480
484
  style: {
481
- ...P,
482
- color: d.buttonActiveColor,
485
+ ...H,
486
+ color: p.buttonActiveColor,
483
487
  fontSize: "18px",
484
488
  width: "40px",
485
489
  minWidth: "40px",
486
490
  height: "40px",
487
- borderColor: `${d.buttonActiveColor}55`,
491
+ borderColor: `${p.buttonActiveColor}55`,
488
492
  borderRadius: "50%",
489
- paddingLeft: k ? "0" : "2px"
493
+ paddingLeft: L ? "0" : "2px"
490
494
  },
491
- onMouseEnter: (i) => N(i, !0),
492
- onMouseLeave: b,
493
- title: k ? "Pause" : z ? "Play (reset to 1×)" : "Play",
494
- children: k ? /* @__PURE__ */ c.jsx(ht, {}) : "▶"
495
+ onMouseEnter: (i) => k(i, !0),
496
+ onMouseLeave: S,
497
+ title: L ? w.pauseTooltip : u ? w.playFromRewindTooltip : w.playTooltip,
498
+ children: L ? /* @__PURE__ */ l.jsx(gt, {}) : "▶"
495
499
  }
496
500
  ),
497
- /* @__PURE__ */ c.jsx(
501
+ /* @__PURE__ */ l.jsx(
498
502
  "button",
499
503
  {
500
504
  onClick: V,
501
- style: { ...q(l), width: "64px", minWidth: "64px", gap: "3px" },
502
- onMouseEnter: (i) => N(i, l),
503
- onMouseLeave: b,
504
- title: l ? `${_}× speed — click to increase, click again at max to reset` : "Fast forward",
505
- children: l ? /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
505
+ style: { ...D(v), width: "64px", minWidth: "64px", gap: "3px" },
506
+ onMouseEnter: (i) => k(i, v),
507
+ onMouseLeave: S,
508
+ title: v ? Ie(w.fastForwardActiveTooltip, y) : w.fastForwardTooltip,
509
+ children: v ? /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
506
510
  "▶▶",
507
- /* @__PURE__ */ c.jsxs("span", { style: { fontSize: "11px", fontWeight: "bold" }, children: [
508
- _,
511
+ /* @__PURE__ */ l.jsxs("span", { style: { fontSize: "11px", fontWeight: "bold" }, children: [
512
+ y,
509
513
  "×"
510
514
  ] })
511
515
  ] }) : "▶▶"
512
516
  }
513
517
  ),
514
- D && /* @__PURE__ */ c.jsx(
518
+ _ && /* @__PURE__ */ l.jsx(
515
519
  "button",
516
520
  {
517
521
  onClick: O ? Z : void 0,
518
522
  disabled: !O,
519
- style: { ...q(!1), opacity: O ? 1 : 0.3, cursor: O ? "pointer" : "default" },
520
- onMouseEnter: O ? (i) => N(i, !1) : void 0,
521
- onMouseLeave: O ? b : void 0,
522
- title: O ? "Jump to end" : "No end time set",
523
+ style: { ...D(!1), opacity: O ? 1 : 0.3, cursor: O ? "pointer" : "default" },
524
+ onMouseEnter: O ? (i) => k(i, !1) : void 0,
525
+ onMouseLeave: O ? S : void 0,
526
+ title: O ? w.jumpToEndTooltip : w.noEndTimeTooltip,
523
527
  children: "⏭"
524
528
  }
525
529
  )
526
530
  ] }),
527
- !te && /* @__PURE__ */ c.jsx("div", { style: { display: "flex", justifyContent: "flex-end", alignItems: "center" }, children: H != null && v != null && /* @__PURE__ */ c.jsx(
531
+ !X && /* @__PURE__ */ l.jsx("div", { style: { display: "flex", justifyContent: "flex-end", alignItems: "center" }, children: $ != null && g != null && /* @__PURE__ */ l.jsx(
528
532
  "button",
529
533
  {
530
- onClick: H,
534
+ onClick: $,
531
535
  style: {
532
- ...P,
533
- color: d.buttonActiveColor,
534
- borderColor: `${d.buttonActiveColor}33`
536
+ ...H,
537
+ color: p.buttonActiveColor,
538
+ borderColor: `${p.buttonActiveColor}33`
535
539
  },
536
- onMouseEnter: (i) => N(i, v),
537
- onMouseLeave: b,
538
- title: v ? "Collapse swim lanes" : "Expand swim lanes",
539
- children: v ? /* @__PURE__ */ c.jsx(Xe, {}) : /* @__PURE__ */ c.jsx(Ye, {})
540
+ onMouseEnter: (i) => k(i, g),
541
+ onMouseLeave: S,
542
+ title: g ? w.collapseSwimLanesTooltip : w.expandSwimLanesTooltip,
543
+ children: g ? /* @__PURE__ */ l.jsx(Ye, {}) : /* @__PURE__ */ l.jsx(ze, {})
540
544
  }
541
545
  ) }),
542
- te && H != null && v != null && /* @__PURE__ */ c.jsx(
546
+ X && $ != null && g != null && /* @__PURE__ */ l.jsx(
543
547
  "button",
544
548
  {
545
- onClick: H,
549
+ onClick: $,
546
550
  style: {
547
- ...P,
548
- color: d.buttonActiveColor,
549
- borderColor: `${d.buttonActiveColor}33`,
551
+ ...H,
552
+ color: p.buttonActiveColor,
553
+ borderColor: `${p.buttonActiveColor}33`,
550
554
  marginLeft: "4px"
551
555
  },
552
- onMouseEnter: (i) => N(i, v),
553
- onMouseLeave: b,
554
- title: v ? "Collapse swim lanes" : "Expand swim lanes",
555
- children: v ? /* @__PURE__ */ c.jsx(Xe, {}) : /* @__PURE__ */ c.jsx(Ye, {})
556
+ onMouseEnter: (i) => k(i, g),
557
+ onMouseLeave: S,
558
+ title: g ? w.collapseSwimLanesTooltip : w.expandSwimLanesTooltip,
559
+ children: g ? /* @__PURE__ */ l.jsx(Ye, {}) : /* @__PURE__ */ l.jsx(ze, {})
556
560
  }
557
561
  )
558
562
  ]
559
563
  }
560
564
  );
561
- }, Be = qe(
562
- (C, k) => {
565
+ }, He = Ge(
566
+ (A, L) => {
563
567
  const {
564
568
  currentTime: Y,
565
569
  defaultStartMs: a,
566
- defaultEndMs: T,
570
+ defaultEndMs: M,
567
571
  theme: R,
568
- maxTicks: I,
572
+ maxTicks: F,
569
573
  timezone: O,
570
- onTimeChange: W,
571
- onDragStart: D,
574
+ onTimeChange: z,
575
+ onDragStart: _,
572
576
  onDragEnd: U,
573
- swimLanes: $,
574
- showSwimLanes: oe,
577
+ swimLanes: W,
578
+ showSwimLanes: ne,
575
579
  onSwimLaneItemClick: V,
576
580
  onSwimLaneItemHover: Z,
577
581
  onSwimLaneItemDoubleClick: Q,
578
582
  onSwimLaneItemContextMenu: B,
579
583
  onSwimLaneReorder: ee
580
- } = C, d = w(null), v = w(R), H = w(I), z = w(O), l = w(a), y = w(T), _ = w(j.JulianDate.toDate(Y).getTime());
581
- X(() => {
582
- v.current = R;
583
- }, [R]), X(() => {
584
- H.current = I;
585
- }, [I]), X(() => {
586
- z.current = O, p();
584
+ } = A, p = b(null), g = b(R), $ = b(F), K = b(O), u = b(a), v = b(M), P = b(j.JulianDate.toDate(Y).getTime());
585
+ J(() => {
586
+ g.current = R;
587
+ }, [R]), J(() => {
588
+ $.current = F;
589
+ }, [F]), J(() => {
590
+ K.current = O, h();
587
591
  }, [O]);
588
- const A = w($ ?? []), te = w(oe ?? ($ != null && $.length > 0)), ce = w(0), P = w(null), q = w(null), N = w(V), b = w(Z), i = w(Q), L = w(B), S = w(ee);
589
- X(() => {
590
- N.current = V;
591
- }, [V]), X(() => {
592
- b.current = Z;
593
- }, [Z]), X(() => {
594
- i.current = Q;
595
- }, [Q]), X(() => {
596
- L.current = B;
597
- }, [B]), X(() => {
598
- S.current = ee;
599
- }, [ee]), X(() => {
600
- A.current = $ ?? [], p();
601
- }, [$]), X(() => {
602
- te.current = oe ?? ($ != null && $.length > 0), p();
603
- }, [oe, $]);
604
- const ne = w(null), re = w(null), t = w(!1), m = w(0), g = w("none"), M = w(0), ue = w(0), ae = w(0), E = w("none"), ie = w(0), le = w(0), be = (e, n) => Math.hypot(n.clientX - e.clientX, n.clientY - e.clientY), de = se(() => ({
605
- startMs: l.current,
606
- endMs: y.current,
607
- currentMs: _.current,
608
- theme: v.current,
609
- maxTicks: H.current,
610
- timezone: z.current,
611
- swimLanes: A.current,
612
- showSwimLanes: te.current,
613
- scrollTop: ce.current,
614
- reorderState: q.current
592
+ const y = b(W ?? []), w = b(ne ?? (W != null && W.length > 0)), re = b(0), X = b(null), te = b(null), H = b(V), D = b(Z), k = b(Q), S = b(B), i = b(ee);
593
+ J(() => {
594
+ H.current = V;
595
+ }, [V]), J(() => {
596
+ D.current = Z;
597
+ }, [Z]), J(() => {
598
+ k.current = Q;
599
+ }, [Q]), J(() => {
600
+ S.current = B;
601
+ }, [B]), J(() => {
602
+ i.current = ee;
603
+ }, [ee]), J(() => {
604
+ y.current = W ?? [], h();
605
+ }, [W]), J(() => {
606
+ w.current = ne ?? (W != null && W.length > 0), h();
607
+ }, [ne, W]);
608
+ const C = b(null), q = b(null), t = b(!1), d = b(0), x = b("none"), E = b(0), ce = b(0), pe = b(0), T = b("none"), oe = b(0), ae = b(0), xe = (e, n) => Math.hypot(n.clientX - e.clientX, n.clientY - e.clientY), fe = se(() => ({
609
+ startMs: u.current,
610
+ endMs: v.current,
611
+ currentMs: P.current,
612
+ theme: g.current,
613
+ maxTicks: $.current,
614
+ timezone: K.current,
615
+ swimLanes: y.current,
616
+ showSwimLanes: w.current,
617
+ scrollTop: re.current,
618
+ reorderState: te.current
615
619
  }), []);
616
- Ge(k, () => ({
617
- zoomTo(e, n, o) {
618
- const s = Math.max(st, Math.min(ct, n - e)), r = (e + n) / 2;
619
- l.current = r - s / 2, y.current = r + s / 2, o !== void 0 && (_.current = o), p();
620
+ Ve(L, () => ({
621
+ zoomTo(e, n, r) {
622
+ const c = Math.max(it, Math.min(lt, n - e)), o = (e + n) / 2;
623
+ u.current = o - c / 2, v.current = o + c / 2, r !== void 0 && (P.current = r), h();
620
624
  },
621
625
  getVisibleRange() {
622
- return { startMs: l.current, endMs: y.current };
626
+ return { startMs: u.current, endMs: v.current };
623
627
  },
624
628
  startFollow(e) {
625
- if (m.current = e, re.current !== null) return;
629
+ if (d.current = e, q.current !== null) return;
626
630
  t.current = !0;
627
631
  let n = performance.now();
628
- const o = () => {
629
- const s = performance.now(), r = s - n;
630
- n = s;
631
- const u = r * m.current;
632
- l.current += u, y.current += u, _.current += u, p(), re.current = requestAnimationFrame(o);
632
+ const r = () => {
633
+ const c = performance.now(), o = c - n;
634
+ n = c;
635
+ const s = o * d.current;
636
+ u.current += s, v.current += s, P.current += s, h(), q.current = requestAnimationFrame(r);
633
637
  };
634
- re.current = requestAnimationFrame(o);
638
+ q.current = requestAnimationFrame(r);
635
639
  },
636
640
  stopFollow() {
637
- t.current = !1, re.current !== null && (cancelAnimationFrame(re.current), re.current = null);
641
+ t.current = !1, q.current !== null && (cancelAnimationFrame(q.current), q.current = null);
638
642
  },
639
643
  correctFollow(e) {
640
644
  if (!t.current) return;
641
- const n = e - _.current;
642
- _.current = e, l.current += n, y.current += n;
645
+ const n = e - P.current;
646
+ P.current = e, u.current += n, v.current += n;
643
647
  },
644
648
  // ── Swim lane CRUD ──────────────────────────────────────────────
645
649
  appendSwimLane(e) {
646
- A.current = [...A.current, e], p();
650
+ y.current = [...y.current, e], h();
647
651
  },
648
652
  updateSwimLane(e, n) {
649
- A.current = A.current.map(
650
- (o) => o.id === e ? { ...o, ...n, id: o.id } : o
651
- ), p();
653
+ y.current = y.current.map(
654
+ (r) => r.id === e ? { ...r, ...n, id: r.id } : r
655
+ ), h();
652
656
  },
653
657
  removeSwimLane(e) {
654
- A.current = A.current.filter((n) => n.id !== e), p();
658
+ y.current = y.current.filter((n) => n.id !== e), h();
655
659
  },
656
660
  reorderSwimLanes(e) {
657
- const n = new Map(A.current.map((s) => [s.id, s])), o = [];
658
- for (const s of e) {
659
- const r = n.get(s);
660
- r && o.push(r);
661
+ const n = new Map(y.current.map((c) => [c.id, c])), r = [];
662
+ for (const c of e) {
663
+ const o = n.get(c);
664
+ o && r.push(o);
661
665
  }
662
- A.current = o, p();
666
+ y.current = r, h();
663
667
  }
664
668
  }));
665
- const p = se(() => {
666
- const e = d.current;
669
+ const h = se(() => {
670
+ const e = p.current;
667
671
  if (!e) return;
668
672
  const n = e.getContext("2d");
669
673
  if (!n) return;
670
- const o = e.getBoundingClientRect(), s = o.width, r = o.height;
671
- if (s === 0 || r === 0) return;
672
- const u = window.devicePixelRatio || 1, h = Math.round(s * u), x = Math.round(r * u);
673
- (e.width !== h || e.height !== x) && (e.width = h, e.height = x), n.save(), n.scale(u, u);
674
- const F = Qe(n, s, r, de());
675
- F !== ce.current && (ce.current = F), n.restore();
676
- }, [de]);
677
- Ve(() => {
678
- p();
679
- const e = d.current;
674
+ const r = e.getBoundingClientRect(), c = r.width, o = r.height;
675
+ if (c === 0 || o === 0) return;
676
+ const s = window.devicePixelRatio || 1, f = Math.round(c * s), m = Math.round(o * s);
677
+ (e.width !== f || e.height !== m) && (e.width = f, e.height = m), n.save(), n.scale(s, s);
678
+ const I = tt(n, c, o, fe());
679
+ I !== re.current && (re.current = I), n.restore();
680
+ }, [fe]);
681
+ Ke(() => {
682
+ h();
683
+ const e = p.current;
680
684
  if (!e) return;
681
- const n = new ResizeObserver(() => p());
685
+ const n = new ResizeObserver(() => h());
682
686
  return n.observe(e), () => n.disconnect();
683
- }, [p]), X(() => {
687
+ }, [h]), J(() => {
684
688
  if (t.current) return;
685
689
  const e = j.JulianDate.toDate(Y).getTime();
686
- _.current !== e && (_.current = e, p());
687
- }, [Y, p]);
688
- const J = se((e) => {
689
- if (ne.current !== null) return;
690
+ P.current !== e && (P.current = e, h());
691
+ }, [Y, h]);
692
+ const le = se((e) => {
693
+ if (C.current !== null) return;
690
694
  const n = () => {
691
- const o = d.current, s = y.current - l.current, r = e * s * 0.01;
692
- if (l.current += r, y.current += r, o) {
693
- const u = o.getBoundingClientRect(), h = Math.max(0, Math.min(u.width, ue.current - u.left)), x = l.current + h / u.width * (y.current - l.current);
694
- _.current = x, W(j.JulianDate.fromDate(new Date(x)));
695
+ const r = p.current, c = v.current - u.current, o = e * c * 0.01;
696
+ if (u.current += o, v.current += o, r) {
697
+ const s = r.getBoundingClientRect(), f = Math.max(0, Math.min(s.width, ce.current - s.left)), m = u.current + f / s.width * (v.current - u.current);
698
+ P.current = m, z(j.JulianDate.fromDate(new Date(m)));
695
699
  }
696
- p(), ne.current = requestAnimationFrame(n);
700
+ h(), C.current = requestAnimationFrame(n);
697
701
  };
698
- ne.current = requestAnimationFrame(n);
699
- }, [p, W]), me = se(() => {
700
- ne.current !== null && (cancelAnimationFrame(ne.current), ne.current = null);
701
- }, []), K = se((e, n, o, s) => et(e, n, o, s, de()), [de]), pe = se((e, n, o) => tt(e, n, o, de()), [de]), he = se((e, n) => nt(e, n, de()), [de]), Ce = se((e) => {
702
+ C.current = requestAnimationFrame(n);
703
+ }, [h, z]), N = se(() => {
704
+ C.current !== null && (cancelAnimationFrame(C.current), C.current = null);
705
+ }, []), ie = se((e, n, r, c) => nt(e, n, r, c, fe()), [fe]), ue = se((e, n, r) => rt(e, n, r, fe()), [fe]), me = se((e, n) => ot(e, n, fe()), [fe]), Re = se((e) => {
702
706
  e.preventDefault();
703
- const n = e.currentTarget.getBoundingClientRect(), o = e.clientX - n.left, s = e.clientY - n.top;
704
- if (e.button === 0 && S.current) {
705
- const r = pe(o, s, n.height);
706
- if (r) {
707
- const h = A.current.findIndex((x) => x.id === r.id);
708
- q.current = {
707
+ const n = e.currentTarget.getBoundingClientRect(), r = e.clientX - n.left, c = e.clientY - n.top;
708
+ if (e.button === 0 && i.current) {
709
+ const o = ue(r, c, n.height);
710
+ if (o) {
711
+ const f = y.current.findIndex((m) => m.id === o.id);
712
+ te.current = {
709
713
  dragging: !0,
710
- dragLaneId: r.id,
714
+ dragLaneId: o.id,
711
715
  dragStartY: e.clientY,
712
716
  currentY: e.clientY,
713
- insertIndex: h
717
+ insertIndex: f
714
718
  }, e.currentTarget.style.cursor = "grabbing";
715
719
  return;
716
720
  }
717
721
  }
718
- if (e.button === 0 && he(s, n.height)) {
719
- const r = (_.current - l.current) / (y.current - l.current) * n.width;
720
- if (!(Math.abs(o - r) <= 10) && K(o, s, n.width, n.height)) {
721
- ae.current = performance.now();
722
+ if (e.button === 0 && me(c, n.height)) {
723
+ const o = (P.current - u.current) / (v.current - u.current) * n.width;
724
+ if (!(Math.abs(r - o) <= 10) && ie(r, c, n.width, n.height)) {
725
+ pe.current = performance.now();
722
726
  return;
723
727
  }
724
728
  }
725
729
  if (e.button === 0) {
726
- g.current = "scrub", ue.current = e.clientX, e.currentTarget.style.cursor = "grabbing", D == null || D();
727
- const r = l.current + o / n.width * (y.current - l.current);
728
- _.current = r, p(), W(j.JulianDate.fromDate(new Date(r)));
730
+ x.current = "scrub", ce.current = e.clientX, e.currentTarget.style.cursor = "grabbing", _ == null || _();
731
+ const o = u.current + r / n.width * (v.current - u.current);
732
+ P.current = o, h(), z(j.JulianDate.fromDate(new Date(o)));
729
733
  } else if (e.button === 1)
730
- g.current = "slide", M.current = e.clientX;
734
+ x.current = "slide", E.current = e.clientX;
731
735
  else if (e.button === 2) {
732
- if (L.current && he(s, n.height))
736
+ if (S.current && me(c, n.height))
733
737
  return;
734
- g.current = "zoom", M.current = e.clientX;
738
+ x.current = "zoom", E.current = e.clientX;
735
739
  }
736
- }, [p, W, D, pe, he, K]);
737
- X(() => {
738
- const e = (o) => {
739
- const s = q.current;
740
- if (s && s.dragging) {
741
- s.currentY = o.clientY;
742
- const x = d.current;
743
- if (x) {
744
- const F = x.getBoundingClientRect(), G = o.clientY - F.top;
745
- let Te = -ce.current;
746
- const Ae = A.current;
747
- let Se = Ae.length;
748
- for (let Me = 0; Me < Ae.length; Me++) {
749
- const ke = Ae[Me].height ?? Fe, He = Te + ke / 2;
750
- if (G < He) {
751
- Se = Me;
740
+ }, [h, z, _, ue, me, ie]);
741
+ J(() => {
742
+ const e = (r) => {
743
+ const c = te.current;
744
+ if (c && c.dragging) {
745
+ c.currentY = r.clientY;
746
+ const m = p.current;
747
+ if (m) {
748
+ const I = m.getBoundingClientRect(), G = r.clientY - I.top;
749
+ let Ee = -re.current;
750
+ const je = y.current;
751
+ let Le = je.length;
752
+ for (let ye = 0; ye < je.length; ye++) {
753
+ const ke = je[ye].height ?? Oe, Ue = Ee + ke / 2;
754
+ if (G < Ue) {
755
+ Le = ye;
752
756
  break;
753
757
  }
754
- Te += ke + Oe;
758
+ Ee += ke + Pe;
755
759
  }
756
- s.insertIndex = Se;
760
+ c.insertIndex = Le;
757
761
  }
758
- p();
762
+ h();
759
763
  return;
760
764
  }
761
- if (g.current === "none") return;
762
- const r = d.current;
763
- if (!r) return;
764
- const u = r.getBoundingClientRect(), h = u.width;
765
- if (g.current === "scrub") {
766
- ue.current = o.clientX;
767
- const x = o.clientX - u.left, F = h * 0.08;
768
- x < F ? J(-1) : x > h - F ? J(1) : me();
769
- const G = Math.max(0, Math.min(h, x)), fe = l.current + G / h * (y.current - l.current);
770
- _.current = fe, p(), W(j.JulianDate.fromDate(new Date(fe)));
771
- } else if (g.current === "slide") {
772
- const x = M.current - o.clientX;
773
- if (M.current = o.clientX, x !== 0) {
774
- const F = x / h * (y.current - l.current);
775
- l.current += F, y.current += F, p();
765
+ if (x.current === "none") return;
766
+ const o = p.current;
767
+ if (!o) return;
768
+ const s = o.getBoundingClientRect(), f = s.width;
769
+ if (x.current === "scrub") {
770
+ ce.current = r.clientX;
771
+ const m = r.clientX - s.left, I = f * 0.08;
772
+ m < I ? le(-1) : m > f - I ? le(1) : N();
773
+ const G = Math.max(0, Math.min(f, m)), de = u.current + G / f * (v.current - u.current);
774
+ P.current = de, h(), z(j.JulianDate.fromDate(new Date(de)));
775
+ } else if (x.current === "slide") {
776
+ const m = E.current - r.clientX;
777
+ if (E.current = r.clientX, m !== 0) {
778
+ const I = m / f * (v.current - u.current);
779
+ u.current += I, v.current += I, h();
776
780
  }
777
- } else if (g.current === "zoom") {
778
- const x = M.current - o.clientX;
779
- M.current = o.clientX, x !== 0 && xe(Math.pow(1.01, x));
781
+ } else if (x.current === "zoom") {
782
+ const m = E.current - r.clientX;
783
+ E.current = r.clientX, m !== 0 && he(Math.pow(1.01, m));
780
784
  }
781
785
  }, n = () => {
782
- var s;
783
- const o = q.current;
784
- if (o && o.dragging) {
785
- const r = Math.abs(o.currentY - o.dragStartY), u = A.current, h = u.findIndex((x) => x.id === o.dragLaneId);
786
- if (r > 5 && h >= 0 && o.insertIndex !== h && o.insertIndex !== h + 1) {
787
- const x = [...u], [F] = x.splice(h, 1), G = o.insertIndex > h ? o.insertIndex - 1 : o.insertIndex;
788
- x.splice(G, 0, F), A.current = x, (s = S.current) == null || s.call(S, x.map((fe) => fe.id));
786
+ var c;
787
+ const r = te.current;
788
+ if (r && r.dragging) {
789
+ const o = Math.abs(r.currentY - r.dragStartY), s = y.current, f = s.findIndex((m) => m.id === r.dragLaneId);
790
+ if (o > 5 && f >= 0 && r.insertIndex !== f && r.insertIndex !== f + 1) {
791
+ const m = [...s], [I] = m.splice(f, 1), G = r.insertIndex > f ? r.insertIndex - 1 : r.insertIndex;
792
+ m.splice(G, 0, I), y.current = m, (c = i.current) == null || c.call(i, m.map((de) => de.id));
789
793
  }
790
- q.current = null, d.current && (d.current.style.cursor = "default"), p();
794
+ te.current = null, p.current && (p.current.style.cursor = "default"), h();
791
795
  return;
792
796
  }
793
- me(), g.current = "none", d.current && (d.current.style.cursor = "default"), U == null || U();
797
+ N(), x.current = "none", p.current && (p.current.style.cursor = "default"), U == null || U();
794
798
  };
795
799
  return document.addEventListener("mousemove", e), document.addEventListener("mouseup", n), () => {
796
800
  document.removeEventListener("mousemove", e), document.removeEventListener("mouseup", n);
797
801
  };
798
- }, [p, W, U, J, me]);
799
- const xe = se((e) => {
800
- const n = rt(l.current, y.current, e);
801
- l.current = n.startMs, y.current = n.endMs, p();
802
- }, [p]), we = se((e) => {
802
+ }, [h, z, U, le, N]);
803
+ const he = se((e) => {
804
+ const n = st(u.current, v.current, e);
805
+ u.current = n.startMs, v.current = n.endMs, h();
806
+ }, [h]), be = se((e) => {
803
807
  e.preventDefault();
804
- const n = d.current;
808
+ const n = p.current;
805
809
  if (!n) return;
806
- const o = n.getBoundingClientRect(), s = e.clientY - o.top, r = te.current, u = A.current;
807
- if (r && u.length > 0) {
808
- const h = Math.max(0, o.height - $e);
809
- if (s >= 0 && s < h) {
810
- let x = 0;
811
- for (const G of u) x += (G.height ?? Fe) + Oe;
812
- const F = Math.max(0, x - h);
813
- if (F > 0) {
814
- ce.current = Math.max(0, Math.min(F, ce.current + e.deltaY * ot)), p();
810
+ const r = n.getBoundingClientRect(), c = e.clientY - r.top, o = w.current, s = y.current;
811
+ if (o && s.length > 0) {
812
+ const f = Math.max(0, r.height - $e);
813
+ if (c >= 0 && c < f) {
814
+ let m = 0;
815
+ for (const G of s) m += (G.height ?? Oe) + Pe;
816
+ const I = Math.max(0, m - f);
817
+ if (I > 0) {
818
+ re.current = Math.max(0, Math.min(I, re.current + e.deltaY * ct)), h();
815
819
  return;
816
820
  }
817
821
  }
818
822
  }
819
- xe(Math.pow(1.05, e.deltaY > 0 ? -1 : 1));
820
- }, [xe, p]);
821
- X(() => {
822
- const e = d.current;
823
+ he(Math.pow(1.05, e.deltaY > 0 ? -1 : 1));
824
+ }, [he, h]);
825
+ J(() => {
826
+ const e = p.current;
823
827
  if (e)
824
- return e.addEventListener("wheel", we, { passive: !1 }), () => e.removeEventListener("wheel", we);
825
- }, [we]), X(() => {
826
- const e = d.current;
828
+ return e.addEventListener("wheel", be, { passive: !1 }), () => e.removeEventListener("wheel", be);
829
+ }, [be]), J(() => {
830
+ const e = p.current;
827
831
  if (!e) return;
828
- const n = (r) => {
829
- r.preventDefault();
830
- const u = e.getBoundingClientRect();
831
- if (r.touches.length === 1) {
832
- const h = r.touches[0].clientX - u.left, x = Math.max(0, Math.min(u.width, h)), F = l.current + x / u.width * (y.current - l.current);
833
- E.current = "scrub", ie.current = r.touches[0].clientX, ue.current = r.touches[0].clientX, _.current = F, p(), D == null || D(), W(j.JulianDate.fromDate(new Date(F)));
834
- } else r.touches.length >= 2 && (E.current = "pinch", le.current = be(r.touches[0], r.touches[1]));
835
- }, o = (r) => {
836
- r.preventDefault();
837
- const u = e.getBoundingClientRect();
838
- if (E.current === "scrub" && r.touches.length >= 1) {
839
- const h = r.touches[0].clientX - u.left, x = u.width * 0.08;
840
- if (ue.current = r.touches[0].clientX, h < x) J(-1);
841
- else if (h > u.width - x) J(1);
832
+ const n = (o) => {
833
+ o.preventDefault();
834
+ const s = e.getBoundingClientRect();
835
+ if (o.touches.length === 1) {
836
+ const f = o.touches[0].clientX - s.left, m = Math.max(0, Math.min(s.width, f)), I = u.current + m / s.width * (v.current - u.current);
837
+ T.current = "scrub", oe.current = o.touches[0].clientX, ce.current = o.touches[0].clientX, P.current = I, h(), _ == null || _(), z(j.JulianDate.fromDate(new Date(I)));
838
+ } else o.touches.length >= 2 && (T.current = "pinch", ae.current = xe(o.touches[0], o.touches[1]));
839
+ }, r = (o) => {
840
+ o.preventDefault();
841
+ const s = e.getBoundingClientRect();
842
+ if (T.current === "scrub" && o.touches.length >= 1) {
843
+ const f = o.touches[0].clientX - s.left, m = s.width * 0.08;
844
+ if (ce.current = o.touches[0].clientX, f < m) le(-1);
845
+ else if (f > s.width - m) le(1);
842
846
  else {
843
- me();
844
- const F = Math.max(0, Math.min(u.width, h)), G = l.current + F / u.width * (y.current - l.current);
845
- _.current = G, p(), W(j.JulianDate.fromDate(new Date(G)));
847
+ N();
848
+ const I = Math.max(0, Math.min(s.width, f)), G = u.current + I / s.width * (v.current - u.current);
849
+ P.current = G, h(), z(j.JulianDate.fromDate(new Date(G)));
846
850
  }
847
- } else if (E.current === "slide" && r.touches.length >= 1) {
848
- const h = ie.current - r.touches[0].clientX;
849
- if (ie.current = r.touches[0].clientX, h !== 0) {
850
- const x = h / u.width * (y.current - l.current);
851
- l.current += x, y.current += x, p();
851
+ } else if (T.current === "slide" && o.touches.length >= 1) {
852
+ const f = oe.current - o.touches[0].clientX;
853
+ if (oe.current = o.touches[0].clientX, f !== 0) {
854
+ const m = f / s.width * (v.current - u.current);
855
+ u.current += m, v.current += m, h();
852
856
  }
853
- } else if (E.current === "pinch" && r.touches.length >= 2) {
854
- const h = be(r.touches[0], r.touches[1]);
855
- h > 0 && le.current > 0 && xe(le.current / h), le.current = h;
857
+ } else if (T.current === "pinch" && o.touches.length >= 2) {
858
+ const f = xe(o.touches[0], o.touches[1]);
859
+ f > 0 && ae.current > 0 && he(ae.current / f), ae.current = f;
856
860
  }
857
- }, s = (r) => {
858
- me(), E.current === "scrub" && (U == null || U()), r.touches.length === 0 ? E.current = "none" : r.touches.length === 1 && (E.current = "slide", ie.current = r.touches[0].clientX);
861
+ }, c = (o) => {
862
+ N(), T.current === "scrub" && (U == null || U()), o.touches.length === 0 ? T.current = "none" : o.touches.length === 1 && (T.current = "slide", oe.current = o.touches[0].clientX);
859
863
  };
860
- return e.addEventListener("touchstart", n, { passive: !1 }), e.addEventListener("touchmove", o, { passive: !1 }), e.addEventListener("touchend", s, { passive: !1 }), () => {
861
- e.removeEventListener("touchstart", n), e.removeEventListener("touchmove", o), e.removeEventListener("touchend", s);
864
+ return e.addEventListener("touchstart", n, { passive: !1 }), e.addEventListener("touchmove", r, { passive: !1 }), e.addEventListener("touchend", c, { passive: !1 }), () => {
865
+ e.removeEventListener("touchstart", n), e.removeEventListener("touchmove", r), e.removeEventListener("touchend", c);
862
866
  };
863
- }, [p, D, U, W, xe, J, me]);
867
+ }, [h, _, U, z, he, le, N]);
864
868
  const De = se((e) => {
865
- var h, x, F;
866
- if (g.current !== "none") return;
867
- const n = e.currentTarget.getBoundingClientRect(), o = e.clientX - n.left, s = e.clientY - n.top, r = (_.current - l.current) / (y.current - l.current) * n.width, u = Math.abs(o - r) <= 10;
868
- if (he(s, n.height)) {
869
- const G = K(o, s, n.width, n.height), fe = P.current;
869
+ var f, m, I;
870
+ if (x.current !== "none") return;
871
+ const n = e.currentTarget.getBoundingClientRect(), r = e.clientX - n.left, c = e.clientY - n.top, o = (P.current - u.current) / (v.current - u.current) * n.width, s = Math.abs(r - o) <= 10;
872
+ if (me(c, n.height)) {
873
+ const G = ie(r, c, n.width, n.height), de = X.current;
870
874
  if (G)
871
- e.currentTarget.style.cursor = u ? "grab" : "pointer", (!fe || fe.item.id !== G.item.id || fe.lane.id !== G.lane.id) && (P.current = G, (h = b.current) == null || h.call(b, { laneId: G.lane.id, item: G.item, originalEvent: e.nativeEvent }), p());
872
- else if (fe && (P.current = null, (x = b.current) == null || x.call(b, null), p()), u)
875
+ e.currentTarget.style.cursor = s ? "grab" : "pointer", (!de || de.item.id !== G.item.id || de.lane.id !== G.lane.id) && (X.current = G, (f = D.current) == null || f.call(D, { laneId: G.lane.id, item: G.item, originalEvent: e.nativeEvent }), h());
876
+ else if (de && (X.current = null, (m = D.current) == null || m.call(D, null), h()), s)
873
877
  e.currentTarget.style.cursor = "grab";
874
878
  else {
875
- const Te = pe(o, s, n.height);
876
- e.currentTarget.style.cursor = Te && S.current ? "grab" : "default";
879
+ const Ee = ue(r, c, n.height);
880
+ e.currentTarget.style.cursor = Ee && i.current ? "grab" : "default";
877
881
  }
878
882
  return;
879
883
  }
880
- P.current && (P.current = null, (F = b.current) == null || F.call(b, null), p()), e.currentTarget.style.cursor = u ? "grab" : "default";
881
- }, [p, K, he, pe]), _e = se((e) => {
882
- var h;
883
- if (performance.now() - ae.current > 300) return;
884
- const o = e.currentTarget.getBoundingClientRect(), s = e.clientX - o.left, r = e.clientY - o.top, u = K(s, r, o.width, o.height);
885
- u && ((h = N.current) == null || h.call(N, { laneId: u.lane.id, item: u.item, originalEvent: e.nativeEvent }));
886
- }, [K]), je = se((e) => {
887
- var u;
888
- const n = e.currentTarget.getBoundingClientRect(), o = e.clientX - n.left, s = e.clientY - n.top, r = K(o, s, n.width, n.height);
889
- r && ((u = i.current) == null || u.call(i, { laneId: r.lane.id, item: r.item, originalEvent: e.nativeEvent }));
890
- }, [K]), f = se((e) => {
891
- const n = e.currentTarget.getBoundingClientRect(), o = e.clientX - n.left, s = e.clientY - n.top, r = K(o, s, n.width, n.height);
892
- r && L.current ? (e.preventDefault(), L.current({ laneId: r.lane.id, item: r.item, originalEvent: e.nativeEvent })) : e.preventDefault();
893
- }, [K]);
894
- return X(() => () => {
895
- ne.current !== null && cancelAnimationFrame(ne.current), re.current !== null && cancelAnimationFrame(re.current);
896
- }, []), /* @__PURE__ */ c.jsx(
884
+ X.current && (X.current = null, (I = D.current) == null || I.call(D, null), h()), e.currentTarget.style.cursor = s ? "grab" : "default";
885
+ }, [h, ie, me, ue]), Ce = se((e) => {
886
+ var f;
887
+ if (performance.now() - pe.current > 300) return;
888
+ const r = e.currentTarget.getBoundingClientRect(), c = e.clientX - r.left, o = e.clientY - r.top, s = ie(c, o, r.width, r.height);
889
+ s && ((f = H.current) == null || f.call(H, { laneId: s.lane.id, item: s.item, originalEvent: e.nativeEvent }));
890
+ }, [ie]), Ae = se((e) => {
891
+ var s;
892
+ const n = e.currentTarget.getBoundingClientRect(), r = e.clientX - n.left, c = e.clientY - n.top, o = ie(r, c, n.width, n.height);
893
+ o && ((s = k.current) == null || s.call(k, { laneId: o.lane.id, item: o.item, originalEvent: e.nativeEvent }));
894
+ }, [ie]), _e = se((e) => {
895
+ const n = e.currentTarget.getBoundingClientRect(), r = e.clientX - n.left, c = e.clientY - n.top, o = ie(r, c, n.width, n.height);
896
+ o && S.current ? (e.preventDefault(), S.current({ laneId: o.lane.id, item: o.item, originalEvent: e.nativeEvent })) : e.preventDefault();
897
+ }, [ie]);
898
+ return J(() => () => {
899
+ C.current !== null && cancelAnimationFrame(C.current), q.current !== null && cancelAnimationFrame(q.current);
900
+ }, []), /* @__PURE__ */ l.jsx(
897
901
  "canvas",
898
902
  {
899
- ref: d,
903
+ ref: p,
900
904
  style: { width: "100%", flex: 1, minHeight: 0, display: "block", cursor: "default" },
901
- onMouseDown: Ce,
905
+ onMouseDown: Re,
902
906
  onMouseMove: De,
903
- onClick: _e,
904
- onDoubleClick: je,
907
+ onClick: Ce,
908
+ onDoubleClick: Ae,
905
909
  onMouseLeave: () => {
906
910
  var e;
907
- P.current && (P.current = null, (e = b.current) == null || e.call(b, null), p()), g.current === "none" && d.current && (d.current.style.cursor = "default");
911
+ X.current && (X.current = null, (e = D.current) == null || e.call(D, null), h()), x.current === "none" && p.current && (p.current.style.cursor = "default");
908
912
  },
909
- onContextMenu: f
913
+ onContextMenu: _e
910
914
  }
911
915
  );
912
916
  }
913
917
  );
914
- Be.displayName = "TimelineCanvas";
915
- const ze = [2, 4, 8, 16, 32, 100, 1], We = [1, 2, 4, 8, 16, 32, 100], bt = ({
916
- startTime: C,
917
- endTime: k,
918
+ He.displayName = "TimelineCanvas";
919
+ const We = [2, 4, 8, 16, 32, 100, 1], Be = [1, 2, 4, 8, 16, 32, 100], wt = ({
920
+ startTime: A,
921
+ endTime: L,
918
922
  currentTime: Y,
919
923
  clock: a,
920
- onTimeChange: T,
924
+ onTimeChange: M,
921
925
  onPlayPause: R,
922
- onMultiplierChange: I,
926
+ onMultiplierChange: F,
923
927
  height: O,
924
- showControls: W = !0,
925
- showJumpToStart: D,
928
+ showControls: z = !0,
929
+ showJumpToStart: _,
926
930
  showJumpToEnd: U,
927
- enableDrag: $ = !0,
928
- dateTimeFormat: oe,
931
+ enableDrag: W = !0,
932
+ dateTimeFormat: ne,
929
933
  onDateTimeClick: V,
930
934
  jumpToTime: Z,
931
935
  maxTicks: Q,
932
- ffSpeeds: B = ze,
933
- rwSpeeds: ee = We,
934
- theme: d,
935
- className: v,
936
- timezone: H,
937
- swimLanes: z,
938
- showSwimLanes: l,
939
- onShowSwimLanesChange: y,
940
- swimLaneTransition: _ = "animated",
941
- onSwimLaneItemClick: A,
942
- onSwimLaneItemHover: te,
943
- onSwimLaneItemDoubleClick: ce,
944
- onSwimLaneItemContextMenu: P,
945
- onSwimLaneReorder: q
936
+ ffSpeeds: B = We,
937
+ rwSpeeds: ee = Be,
938
+ theme: p,
939
+ className: g,
940
+ timezone: $,
941
+ swimLanes: K,
942
+ showSwimLanes: u,
943
+ onShowSwimLanesChange: v,
944
+ swimLaneTransition: P = "animated",
945
+ onSwimLaneItemClick: y,
946
+ onSwimLaneItemHover: w,
947
+ onSwimLaneItemDoubleClick: re,
948
+ onSwimLaneItemContextMenu: X,
949
+ onSwimLaneReorder: te,
950
+ labels: H
946
951
  }) => {
947
- const N = () => Date.now(), b = C ? j.JulianDate.toDate(ge(C)).getTime() : N() - 432e5, i = k ? j.JulianDate.toDate(ge(k)).getTime() : N() + 12 * 3600 * 1e3, [L, S] = ve(
948
- () => ge(Y ?? C ?? j.JulianDate.fromDate(/* @__PURE__ */ new Date()))
949
- ), [ne, re] = ve((a == null ? void 0 : a.shouldAnimate) ?? !1), [t, m] = ve((a == null ? void 0 : a.multiplier) ?? 1), [g, M] = ve(l ?? !0);
950
- X(() => {
951
- l != null && M(l);
952
- }, [l]);
953
- const ue = () => {
954
- const f = !g;
955
- M(f), y == null || y(f);
956
- }, ae = z != null && z.length > 0, E = w(null), [ie, le] = ve(0);
957
- X(() => {
958
- const f = E.current;
959
- if (!f) return;
960
- const e = new ResizeObserver(([n]) => le(n.borderBoxSize[0].blockSize));
961
- return e.observe(f), () => e.disconnect();
962
- }, [W]);
963
- const de = ae && !g ? `${ie + $e}px` : O != null ? `${O}px` : "100%", p = w(!1), J = w(null), me = { ...it, ...d };
964
- X(() => {
952
+ const D = () => Date.now(), k = A ? j.JulianDate.toDate(ge(A)).getTime() : D() - 432e5, S = L ? j.JulianDate.toDate(ge(L)).getTime() : D() + 12 * 3600 * 1e3, [i, C] = ve(
953
+ () => ge(Y ?? A ?? j.JulianDate.fromDate(/* @__PURE__ */ new Date()))
954
+ ), [q, t] = ve((a == null ? void 0 : a.shouldAnimate) ?? !1), [d, x] = ve((a == null ? void 0 : a.multiplier) ?? 1), [E, ce] = ve(u ?? !0);
955
+ J(() => {
956
+ u != null && ce(u);
957
+ }, [u]);
958
+ const pe = () => {
959
+ const e = !E;
960
+ ce(e), v == null || v(e);
961
+ }, T = K != null && K.length > 0, oe = b(null), [ae, xe] = ve(0);
962
+ J(() => {
963
+ const e = oe.current;
964
+ if (!e) return;
965
+ const n = new ResizeObserver(([r]) => xe(r.borderBoxSize[0].blockSize));
966
+ return n.observe(e), () => n.disconnect();
967
+ }, [z]);
968
+ const h = T && !E ? `${ae + $e}px` : O != null ? `${O}px` : "100%", le = b(!1), N = b(null), ie = { ...at, ...p };
969
+ J(() => {
965
970
  if (!a) return;
966
- const f = () => {
967
- if (!p.current) {
968
- const e = j.JulianDate.clone(a.currentTime);
969
- if (S(e), re(a.shouldAnimate), m(a.multiplier), J.current) {
970
- const { startMs: n, endMs: o } = J.current.getVisibleRange(), s = o - n, r = j.JulianDate.toDate(e).getTime(), u = r - n;
971
- u <= s * 0.1 ? J.current.zoomTo(r - s * 0.1, r + s * 0.9, r) : u >= s * 0.9 && J.current.zoomTo(r - s * 0.9, r + s * 0.1, r);
971
+ const e = () => {
972
+ if (!le.current) {
973
+ const n = j.JulianDate.clone(a.currentTime);
974
+ if (C(n), t(a.shouldAnimate), x(a.multiplier), N.current) {
975
+ const { startMs: r, endMs: c } = N.current.getVisibleRange(), o = c - r, s = j.JulianDate.toDate(n).getTime(), f = s - r;
976
+ f <= o * 0.1 ? N.current.zoomTo(s - o * 0.1, s + o * 0.9, s) : f >= o * 0.9 && N.current.zoomTo(s - o * 0.9, s + o * 0.1, s);
972
977
  }
973
978
  }
974
979
  };
975
- return a.onTick.addEventListener(f), () => {
976
- a.onTick.removeEventListener(f);
980
+ return a.onTick.addEventListener(e), () => {
981
+ a.onTick.removeEventListener(e);
977
982
  };
978
- }, [a]), X(() => {
983
+ }, [a]), J(() => {
979
984
  if (a) return;
980
- const f = setInterval(() => {
981
- if (p.current) return;
982
- const e = j.JulianDate.fromDate(/* @__PURE__ */ new Date());
983
- if (S(e), J.current) {
984
- const { startMs: n, endMs: o } = J.current.getVisibleRange(), s = o - n, r = j.JulianDate.toDate(e).getTime(), u = r - n;
985
- u <= s * 0.1 ? J.current.zoomTo(r - s * 0.1, r + s * 0.9, r) : u >= s * 0.9 && J.current.zoomTo(r - s * 0.9, r + s * 0.1, r);
985
+ const e = setInterval(() => {
986
+ if (le.current) return;
987
+ const n = j.JulianDate.fromDate(/* @__PURE__ */ new Date());
988
+ if (C(n), N.current) {
989
+ const { startMs: r, endMs: c } = N.current.getVisibleRange(), o = c - r, s = j.JulianDate.toDate(n).getTime(), f = s - r;
990
+ f <= o * 0.1 ? N.current.zoomTo(s - o * 0.1, s + o * 0.9, s) : f >= o * 0.9 && N.current.zoomTo(s - o * 0.9, s + o * 0.1, s);
986
991
  }
987
992
  }, 1e3);
988
- return () => clearInterval(f);
989
- }, [a]), X(() => {
993
+ return () => clearInterval(e);
994
+ }, [a]), J(() => {
990
995
  if (!Z) return;
991
- const f = ge(Z);
992
- if (pe(f), J.current) {
993
- const { startMs: e, endMs: n } = J.current.getVisibleRange(), o = n - e, s = j.JulianDate.toDate(f).getTime();
994
- J.current.zoomTo(s - o / 2, s + o / 2);
996
+ const e = ge(Z);
997
+ if (me(e), N.current) {
998
+ const { startMs: n, endMs: r } = N.current.getVisibleRange(), c = r - n, o = j.JulianDate.toDate(e).getTime();
999
+ N.current.zoomTo(o - c / 2, o + c / 2);
995
1000
  }
996
1001
  }, [Z]);
997
- const K = (f, e = !0) => {
998
- a && (a.multiplier = f, e && (a.shouldAnimate = !0)), m(f), e && re(!0), I == null || I(f);
999
- }, pe = (f) => {
1000
- S(f), a && (a.currentTime = j.JulianDate.clone(f)), T == null || T(f);
1001
- }, he = (f) => {
1002
- f && t < 0 && K(1, !1), a && (a.shouldAnimate = f), re(f), R == null || R(f);
1003
- }, Ce = () => {
1004
- const f = B.length > 0 ? B : ze, e = t > 1 ? t : 1, n = f.indexOf(e), o = f[n < 0 || n === f.length - 1 ? 0 : n + 1];
1005
- K(o);
1006
- }, xe = () => {
1007
- const f = ee.length > 0 ? ee : We, e = t < 0 ? Math.abs(t) : 0, n = f.indexOf(e), o = -f[n < 0 || n === f.length - 1 ? 0 : n + 1];
1008
- K(o);
1009
- }, we = () => {
1010
- var e;
1011
- const f = ge(C ?? j.JulianDate.fromDate(new Date(b)));
1012
- a && (a.currentTime = j.JulianDate.clone(f)), S(f), (e = J.current) == null || e.zoomTo(b, i);
1002
+ const ue = (e, n = !0) => {
1003
+ a && (a.multiplier = e, n && (a.shouldAnimate = !0)), x(e), n && t(!0), F == null || F(e);
1004
+ }, me = (e) => {
1005
+ C(e), a && (a.currentTime = j.JulianDate.clone(e)), M == null || M(e);
1006
+ }, Re = (e) => {
1007
+ e && d < 0 && ue(1, !1), a && (a.shouldAnimate = e), t(e), R == null || R(e);
1008
+ }, he = () => {
1009
+ const e = B.length > 0 ? B : We, n = d > 1 ? d : 1, r = e.indexOf(n), c = e[r < 0 || r === e.length - 1 ? 0 : r + 1];
1010
+ ue(c);
1011
+ }, be = () => {
1012
+ const e = ee.length > 0 ? ee : Be, n = d < 0 ? Math.abs(d) : 0, r = e.indexOf(n), c = -e[r < 0 || r === e.length - 1 ? 0 : r + 1];
1013
+ ue(c);
1013
1014
  }, De = () => {
1014
- var e;
1015
- const f = ge(k ?? j.JulianDate.fromDate(new Date(i)));
1016
- a && (a.currentTime = j.JulianDate.clone(f)), S(f), (e = J.current) == null || e.zoomTo(b, i);
1017
- }, _e = () => {
1018
1015
  var n;
1019
- const f = j.JulianDate.fromDate(/* @__PURE__ */ new Date());
1020
- a && (a.currentTime = j.JulianDate.clone(f)), S(f), K(1);
1021
- const e = Date.now();
1022
- (n = J.current) == null || n.zoomTo(e - 12 * 3600 * 1e3, e + 12 * 3600 * 1e3);
1023
- }, je = Math.abs(j.JulianDate.toDate(L).getTime() - Date.now()) < 1e4;
1024
- return /* @__PURE__ */ c.jsxs(
1016
+ const e = ge(A ?? j.JulianDate.fromDate(new Date(k)));
1017
+ a && (a.currentTime = j.JulianDate.clone(e)), C(e), (n = N.current) == null || n.zoomTo(k, S);
1018
+ }, Ce = () => {
1019
+ var n;
1020
+ const e = ge(L ?? j.JulianDate.fromDate(new Date(S)));
1021
+ a && (a.currentTime = j.JulianDate.clone(e)), C(e), (n = N.current) == null || n.zoomTo(k, S);
1022
+ }, Ae = () => {
1023
+ var r;
1024
+ const e = j.JulianDate.fromDate(/* @__PURE__ */ new Date());
1025
+ a && (a.currentTime = j.JulianDate.clone(e)), C(e), ue(1);
1026
+ const n = Date.now();
1027
+ (r = N.current) == null || r.zoomTo(n - 12 * 3600 * 1e3, n + 12 * 3600 * 1e3);
1028
+ }, _e = Math.abs(j.JulianDate.toDate(i).getTime() - Date.now()) < 1e4;
1029
+ return /* @__PURE__ */ l.jsxs(
1025
1030
  "div",
1026
1031
  {
1027
- className: v,
1032
+ className: g,
1028
1033
  style: {
1029
1034
  width: "100%",
1030
- height: de,
1035
+ height: h,
1031
1036
  overflow: "hidden",
1032
1037
  display: "flex",
1033
1038
  flexDirection: "column",
1034
1039
  fontFamily: "system-ui, -apple-system, sans-serif",
1035
- transition: _ === "animated" ? "height 0.2s ease" : void 0
1040
+ transition: P === "animated" ? "height 0.2s ease" : void 0
1036
1041
  },
1037
1042
  children: [
1038
- W && /* @__PURE__ */ c.jsx("div", { ref: E, children: /* @__PURE__ */ c.jsx(
1039
- xt,
1043
+ z && /* @__PURE__ */ l.jsx("div", { ref: oe, children: /* @__PURE__ */ l.jsx(
1044
+ vt,
1040
1045
  {
1041
- currentTime: L,
1042
- isPlaying: ne,
1043
- multiplier: t,
1044
- isLive: je,
1045
- hasStartTime: C != null,
1046
- hasEndTime: k != null,
1047
- showJumpToStart: D,
1046
+ currentTime: i,
1047
+ isPlaying: q,
1048
+ multiplier: d,
1049
+ isLive: _e,
1050
+ hasStartTime: A != null,
1051
+ hasEndTime: L != null,
1052
+ showJumpToStart: _,
1048
1053
  showJumpToEnd: U,
1049
- onPlayPause: he,
1050
- onJumpToStart: we,
1051
- onRewind: xe,
1052
- onFastForward: Ce,
1053
- onJumpToEnd: De,
1054
- onJumpToLive: _e,
1055
- onResetSpeed: () => K(1),
1054
+ onPlayPause: Re,
1055
+ onJumpToStart: De,
1056
+ onRewind: be,
1057
+ onFastForward: he,
1058
+ onJumpToEnd: Ce,
1059
+ onJumpToLive: Ae,
1060
+ onResetSpeed: () => ue(1),
1056
1061
  onDateTimeClick: V,
1057
- dateTimeFormat: oe,
1058
- timezone: H,
1059
- theme: me,
1060
- swimLanesVisible: ae ? g : void 0,
1061
- onToggleSwimLanes: ae ? ue : void 0
1062
+ dateTimeFormat: ne,
1063
+ timezone: $,
1064
+ theme: ie,
1065
+ swimLanesVisible: T ? E : void 0,
1066
+ onToggleSwimLanes: T ? pe : void 0,
1067
+ labels: H
1062
1068
  }
1063
1069
  ) }),
1064
- $ !== !1 && /* @__PURE__ */ c.jsx(
1065
- Be,
1070
+ W !== !1 && /* @__PURE__ */ l.jsx(
1071
+ He,
1066
1072
  {
1067
- ref: J,
1068
- currentTime: L,
1069
- defaultStartMs: b,
1070
- defaultEndMs: i,
1071
- theme: me,
1073
+ ref: N,
1074
+ currentTime: i,
1075
+ defaultStartMs: k,
1076
+ defaultEndMs: S,
1077
+ theme: ie,
1072
1078
  maxTicks: Q,
1073
- timezone: H,
1074
- onTimeChange: pe,
1079
+ timezone: $,
1080
+ onTimeChange: me,
1075
1081
  onDragStart: () => {
1076
- p.current = !0;
1082
+ le.current = !0;
1077
1083
  },
1078
1084
  onDragEnd: () => {
1079
- p.current = !1;
1085
+ le.current = !1;
1080
1086
  },
1081
- swimLanes: z,
1082
- showSwimLanes: g,
1083
- onSwimLaneItemClick: A,
1084
- onSwimLaneItemHover: te,
1085
- onSwimLaneItemDoubleClick: ce,
1086
- onSwimLaneItemContextMenu: P,
1087
- onSwimLaneReorder: q
1087
+ swimLanes: K,
1088
+ showSwimLanes: E,
1089
+ onSwimLaneItemClick: y,
1090
+ onSwimLaneItemHover: w,
1091
+ onSwimLaneItemDoubleClick: re,
1092
+ onSwimLaneItemContextMenu: X,
1093
+ onSwimLaneReorder: te
1088
1094
  }
1089
1095
  )
1090
1096
  ]
1091
1097
  }
1092
1098
  );
1093
- }, wt = ({
1094
- startTime: C,
1095
- endTime: k,
1099
+ }, Et = ({
1100
+ startTime: A,
1101
+ endTime: L,
1096
1102
  currentTime: Y,
1097
1103
  width: a,
1098
- height: T,
1104
+ height: M,
1099
1105
  tickInterval: R,
1100
- showLabels: I,
1106
+ showLabels: F,
1101
1107
  snapToTicks: O,
1102
- enableDrag: W,
1103
- theme: D,
1108
+ enableDrag: z,
1109
+ theme: _,
1104
1110
  onTimeChange: U,
1105
- onVisibleRangeChange: $,
1106
- onDragStart: oe,
1111
+ onVisibleRangeChange: W,
1112
+ onDragStart: ne,
1107
1113
  onDragEnd: V
1108
1114
  }) => {
1109
- const Z = Le(
1110
- () => ut(C, k, R, a),
1111
- [C, k, R, a]
1112
- ), Q = Le(
1113
- () => at(Y, C, k, a),
1114
- [Y, C, k, a]
1115
- ), B = w(null), ee = (v) => {
1116
- if (!W) return;
1117
- const H = v.currentTarget.getBoundingClientRect(), z = v.clientX - H.left, l = Math.max(0, Math.min(a, z));
1118
- if (!(Math.abs(l - Q) <= 10)) {
1119
- let L = l;
1120
- O && (L = lt(l, Z, 10));
1121
- const S = new Date(C).getTime(), ne = new Date(k).getTime();
1122
- U(j.JulianDate.fromDate(new Date(S + L / a * (ne - S))));
1115
+ const Z = Se(
1116
+ () => ut(A, L, R, a),
1117
+ [A, L, R, a]
1118
+ ), Q = Se(
1119
+ () => dt(Y, A, L, a),
1120
+ [Y, A, L, a]
1121
+ ), B = b(null), ee = (g) => {
1122
+ if (!z) return;
1123
+ const $ = g.currentTarget.getBoundingClientRect(), K = g.clientX - $.left, u = Math.max(0, Math.min(a, K));
1124
+ if (!(Math.abs(u - Q) <= 10)) {
1125
+ let S = u;
1126
+ O && (S = ft(u, Z, 10));
1127
+ const i = new Date(A).getTime(), C = new Date(L).getTime();
1128
+ U(j.JulianDate.fromDate(new Date(i + S / a * (C - i))));
1123
1129
  return;
1124
1130
  }
1125
- oe == null || oe();
1126
- const _ = v.clientX, A = new Date(Y).getTime(), te = new Date(C).getTime(), P = (new Date(k).getTime() - te) / a;
1127
- let q = 0, N = !1;
1128
- const b = (L) => {
1129
- q = L.clientX - _, N = !0, B.current || (B.current = requestAnimationFrame(() => {
1130
- if (N) {
1131
- const S = A + q * P;
1132
- U(j.JulianDate.fromDate(new Date(S))), N = !1;
1131
+ ne == null || ne();
1132
+ const P = g.clientX, y = new Date(Y).getTime(), w = new Date(A).getTime(), X = (new Date(L).getTime() - w) / a;
1133
+ let te = 0, H = !1;
1134
+ const D = (S) => {
1135
+ te = S.clientX - P, H = !0, B.current || (B.current = requestAnimationFrame(() => {
1136
+ if (H) {
1137
+ const i = y + te * X;
1138
+ U(j.JulianDate.fromDate(new Date(i))), H = !1;
1133
1139
  }
1134
1140
  B.current = null;
1135
1141
  }));
1136
- }, i = () => {
1137
- document.removeEventListener("mousemove", b), document.removeEventListener("mouseup", i), B.current !== null && (cancelAnimationFrame(B.current), B.current = null), V == null || V();
1142
+ }, k = () => {
1143
+ document.removeEventListener("mousemove", D), document.removeEventListener("mouseup", k), B.current !== null && (cancelAnimationFrame(B.current), B.current = null), V == null || V();
1138
1144
  };
1139
- document.addEventListener("mousemove", b), document.addEventListener("mouseup", i);
1140
- }, d = (v) => {
1141
- v.preventDefault();
1142
- const H = v.shiftKey ? v.deltaY : v.deltaX !== 0 ? v.deltaX : v.deltaY;
1143
- if (Math.abs(H) < 1) return;
1144
- const z = new Date(C).getTime(), l = new Date(k).getTime(), y = H / a * (l - z) * 0.5;
1145
- $ == null || $(
1146
- j.JulianDate.fromDate(new Date(z + y)),
1147
- j.JulianDate.fromDate(new Date(l + y))
1145
+ document.addEventListener("mousemove", D), document.addEventListener("mouseup", k);
1146
+ }, p = (g) => {
1147
+ g.preventDefault();
1148
+ const $ = g.shiftKey ? g.deltaY : g.deltaX !== 0 ? g.deltaX : g.deltaY;
1149
+ if (Math.abs($) < 1) return;
1150
+ const K = new Date(A).getTime(), u = new Date(L).getTime(), v = $ / a * (u - K) * 0.5;
1151
+ W == null || W(
1152
+ j.JulianDate.fromDate(new Date(K + v)),
1153
+ j.JulianDate.fromDate(new Date(u + v))
1148
1154
  );
1149
1155
  };
1150
- return /* @__PURE__ */ c.jsxs(
1156
+ return /* @__PURE__ */ l.jsxs(
1151
1157
  "svg",
1152
1158
  {
1153
1159
  width: "100%",
1154
- height: T,
1155
- style: { backgroundColor: D.backgroundColor, display: "block", cursor: "default" },
1160
+ height: M,
1161
+ style: { backgroundColor: _.backgroundColor, display: "block", cursor: "default" },
1156
1162
  onMouseDown: ee,
1157
- onWheel: d,
1163
+ onWheel: p,
1158
1164
  children: [
1159
- /* @__PURE__ */ c.jsx("rect", { width: a, height: T, fill: D.backgroundColor }),
1160
- Z.map((v, H) => /* @__PURE__ */ c.jsxs("g", { children: [
1161
- /* @__PURE__ */ c.jsx(
1165
+ /* @__PURE__ */ l.jsx("rect", { width: a, height: M, fill: _.backgroundColor }),
1166
+ Z.map((g, $) => /* @__PURE__ */ l.jsxs("g", { children: [
1167
+ /* @__PURE__ */ l.jsx(
1162
1168
  "line",
1163
1169
  {
1164
- x1: v.position,
1165
- y1: T - (v.isMajor ? D.majorTickHeight : D.minorTickHeight),
1166
- x2: v.position,
1167
- y2: T,
1168
- stroke: v.isMajor ? D.majorTickColor : D.tickColor,
1170
+ x1: g.position,
1171
+ y1: M - (g.isMajor ? _.majorTickHeight : _.minorTickHeight),
1172
+ x2: g.position,
1173
+ y2: M,
1174
+ stroke: g.isMajor ? _.majorTickColor : _.tickColor,
1169
1175
  strokeWidth: "1"
1170
1176
  }
1171
1177
  ),
1172
- I && v.isMajor && v.label && /* @__PURE__ */ c.jsx(
1178
+ F && g.isMajor && g.label && /* @__PURE__ */ l.jsx(
1173
1179
  "text",
1174
1180
  {
1175
- x: v.position,
1176
- y: T - D.majorTickHeight - 5,
1181
+ x: g.position,
1182
+ y: M - _.majorTickHeight - 5,
1177
1183
  textAnchor: "middle",
1178
- fill: D.labelColor,
1179
- fontSize: D.fontSize,
1184
+ fill: _.labelColor,
1185
+ fontSize: _.fontSize,
1180
1186
  fontFamily: "monospace",
1181
- children: v.label
1187
+ children: g.label
1182
1188
  }
1183
1189
  )
1184
- ] }, H)),
1185
- /* @__PURE__ */ c.jsx(
1190
+ ] }, $)),
1191
+ /* @__PURE__ */ l.jsx(
1186
1192
  "line",
1187
1193
  {
1188
1194
  x1: Q,
1189
1195
  y1: 0,
1190
1196
  x2: Q,
1191
- y2: T,
1192
- stroke: D.indicatorColor,
1193
- strokeWidth: D.indicatorLineWidth,
1197
+ y2: M,
1198
+ stroke: _.indicatorColor,
1199
+ strokeWidth: _.indicatorLineWidth,
1194
1200
  pointerEvents: "none"
1195
1201
  }
1196
1202
  ),
1197
- W && /* @__PURE__ */ c.jsx(
1203
+ z && /* @__PURE__ */ l.jsx(
1198
1204
  "rect",
1199
1205
  {
1200
1206
  x: Math.max(0, Q - 10),
1201
1207
  y: 0,
1202
1208
  width: 20,
1203
- height: T,
1209
+ height: M,
1204
1210
  fill: "transparent",
1205
1211
  style: { cursor: "ew-resize" },
1206
1212
  pointerEvents: "visiblePainted"
1207
1213
  }
1208
1214
  ),
1209
- /* @__PURE__ */ c.jsx("circle", { cx: Q, cy: 5, r: 4, fill: D.indicatorColor, pointerEvents: "none" })
1215
+ /* @__PURE__ */ l.jsx("circle", { cx: Q, cy: 5, r: 4, fill: _.indicatorColor, pointerEvents: "none" })
1210
1216
  ]
1211
1217
  }
1212
1218
  );
1213
1219
  };
1214
1220
  export {
1215
- Mt as TICK_AREA_HEIGHT,
1216
- bt as Timeline,
1217
- Be as TimelineCanvas,
1218
- xt as TimelineControls,
1219
- wt as TimelineSVG
1221
+ Dt as TICK_AREA_HEIGHT,
1222
+ wt as Timeline,
1223
+ He as TimelineCanvas,
1224
+ vt as TimelineControls,
1225
+ Et as TimelineSVG
1220
1226
  };