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