@m4l/gclick 0.21.0 → 0.22.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.
Files changed (29) hide show
  1. package/components/ReportsViewer/subcomponents/SectionRenderer/SeriesChartSectionRenderer/ReportsViewerChartSeries.d.ts.map +1 -1
  2. package/components/ReportsViewer/subcomponents/SectionRenderer/SeriesChartSectionRenderer/ReportsViewerChartSeries.js +17 -16
  3. package/components/ReportsViewer/subcomponents/SectionRenderer/SeriesChartSectionRenderer/helpers/generateReportsViewerChartSeriesOptions.d.ts +4 -1
  4. package/components/ReportsViewer/subcomponents/SectionRenderer/SeriesChartSectionRenderer/helpers/generateReportsViewerChartSeriesOptions.d.ts.map +1 -1
  5. package/components/ReportsViewer/subcomponents/SectionRenderer/SeriesChartSectionRenderer/helpers/generateReportsViewerChartSeriesOptions.js +70 -55
  6. package/components/VideoTimeLineSelector/helpers/clusterEvents/clusterEvents.d.ts +5 -5
  7. package/components/VideoTimeLineSelector/helpers/clusterEvents/clusterEvents.d.ts.map +1 -1
  8. package/components/VideoTimeLineSelector/helpers/clusterEvents/clusterEvents.js +55 -41
  9. package/components/VideoTimeLineSelector/helpers/getIntersectedSegments/getIntersectedSegments.d.ts +2 -2
  10. package/components/VideoTimeLineSelector/helpers/getIntersectedSegments/getIntersectedSegments.d.ts.map +1 -1
  11. package/components/VideoTimeLineSelector/helpers/getIntersectedSegments/getIntersectedSegments.js +16 -9
  12. package/components/VideoTimeLineSelector/helpers/getTimeLinePosition/getTimeLinePosition.d.ts +1 -1
  13. package/components/VideoTimeLineSelector/helpers/getTimeLinePosition/getTimeLinePosition.d.ts.map +1 -1
  14. package/components/VideoTimeLineSelector/helpers/getTimeLinePosition/getTimeLinePosition.js +6 -5
  15. package/components/VideoTimeLineSelector/helpers/getTimeLinePosition/types.d.ts +1 -0
  16. package/components/VideoTimeLineSelector/helpers/getTimeLinePosition/types.d.ts.map +1 -1
  17. package/components/VideoTimeLineSelector/helpers/playbackRange/playbackRange.d.ts +6 -6
  18. package/components/VideoTimeLineSelector/helpers/playbackRange/playbackRange.d.ts.map +1 -1
  19. package/components/VideoTimeLineSelector/helpers/playbackRange/playbackRange.js +82 -49
  20. package/components/VideoTimeLineSelector/helpers/playbackRange/types.d.ts +1 -0
  21. package/components/VideoTimeLineSelector/helpers/playbackRange/types.d.ts.map +1 -1
  22. package/components/VideoTimeLineSelector/subcomponents/BaseVideoTimeLineSelector/BaseVideoTimeLineSelector.d.ts.map +1 -1
  23. package/components/VideoTimeLineSelector/subcomponents/BaseVideoTimeLineSelector/BaseVideoTimeLineSelector.js +69 -64
  24. package/components/VideoTimeLineSelector/subcomponents/ChartTimeLine/ChartTimeLine.d.ts.map +1 -1
  25. package/components/VideoTimeLineSelector/subcomponents/ChartTimeLine/ChartTimeLine.js +205 -192
  26. package/components/VideoTimeLineSelector/subcomponents/EventCluster/EventCluster.d.ts +2 -2
  27. package/components/VideoTimeLineSelector/subcomponents/EventCluster/EventCluster.d.ts.map +1 -1
  28. package/components/VideoTimeLineSelector/subcomponents/EventCluster/EventCluster.js +32 -24
  29. package/package.json +2 -2
@@ -1,237 +1,250 @@
1
- import { jsx as r, Fragment as Ne, jsxs as x } from "@emotion/react/jsx-runtime";
2
- import { memo as _e, useRef as w, useState as I, useEffect as P, useCallback as a, useMemo as E, Fragment as De } from "react";
3
- import $e from "lodash-es/throttle";
4
- import { TimeLineChannelWrapperStyled as Oe, PointChannelSegmentStyled as We, PlaybackRangePreviewStyled as Ve, PointSegmentStyled as Fe, AxisTickContainerStyled as Se, AxisTickNumberStyled as ge, AxisTickLineStyled as we, WrapperDialTimeLineStyled as ze, ContainerDialTimeLineStyled as Be, DashLineContainerStyled as Qe, DashLineStyled as Xe, PlaybackTooltipAnchorStyled as qe, DialPointIndicatorStyled as He, DialPointIndicatorInnerStyled as Ke } from "../../slots/VideoTimeLineSelectorSlots.js";
5
- import { TIME_VISIBLE_OPTIONS_KEYS as Z, TIME_SCALES as Ye, VIDEO_TIME_LINE_SELECTOR_CLASSES as m } from "../../constants.js";
6
- import { useVideoTimeLineSelectorStore as Pe } from "../../store/useVideoTimeLineSelectorStore.js";
7
- import { shallow as je } from "zustand/shallow";
8
- import { getTimeLinePosition as Ue } from "../../helpers/getTimeLinePosition/getTimeLinePosition.js";
9
- import { clusterEvents as Ge } from "../../helpers/clusterEvents/clusterEvents.js";
10
- import { EventCluster as Je } from "../EventCluster/EventCluster.js";
11
- import { getTimeFromPointIndex as Ze } from "../../helpers/getTimeFromPointIndex/getTimeFromPointIndex.js";
12
- import { convertHoursToTimeString as V } from "../../helpers/convertHoursToTimeString/convertHoursToTimeString.js";
13
- import { getVisiblePoints as et } from "../../helpers/getVisiblePoints/getVisiblePoints.js";
14
- import { useComponentSize as tt } from "@m4l/graphics";
15
- import { Tooltip as nt } from "@m4l/base";
16
- import F from "clsx";
17
- import { VIDEO_TIME_LINE_SELECTOR_DICTIONARY_KEYS as ve } from "../../dictionary.js";
18
- import { useModuleDictionary as it } from "@m4l/core";
19
- import { resolveTooltipAnchor as ot, secondsToTimelinePercent as A, snapToSegmentStart as ye, resolveActiveSegment as rt, resolvePreviewRange as st } from "../../helpers/playbackRange/playbackRange.js";
20
- const at = 1400, ct = 650, kt = _e((Me) => {
21
- const { isTransitioning: Le } = Me, u = w(null), { getLabel: z } = it(), {
1
+ import { jsx as r, Fragment as De, jsxs as I } from "@emotion/react/jsx-runtime";
2
+ import { memo as $e, useRef as P, useState as N, useEffect as v, useCallback as c, useMemo as C, Fragment as Oe } from "react";
3
+ import We from "lodash-es/throttle";
4
+ import { TimeLineChannelWrapperStyled as Ve, PointChannelSegmentStyled as Fe, PlaybackRangePreviewStyled as ze, PointSegmentStyled as Be, AxisTickContainerStyled as ge, AxisTickNumberStyled as we, AxisTickLineStyled as Pe, WrapperDialTimeLineStyled as Qe, ContainerDialTimeLineStyled as Xe, DashLineContainerStyled as qe, DashLineStyled as He, PlaybackTooltipAnchorStyled as Ke, DialPointIndicatorStyled as Ye, DialPointIndicatorInnerStyled as Ue } from "../../slots/VideoTimeLineSelectorSlots.js";
5
+ import { TIME_VISIBLE_OPTIONS_KEYS as ee, TIME_SCALES as je, VIDEO_TIME_LINE_SELECTOR_CLASSES as m } from "../../constants.js";
6
+ import { useVideoTimeLineSelectorStore as ve } from "../../store/useVideoTimeLineSelectorStore.js";
7
+ import { shallow as Ze } from "zustand/shallow";
8
+ import { getTimeLinePosition as Ge } from "../../helpers/getTimeLinePosition/getTimeLinePosition.js";
9
+ import { clusterEvents as Je } from "../../helpers/clusterEvents/clusterEvents.js";
10
+ import { EventCluster as et } from "../EventCluster/EventCluster.js";
11
+ import { getTimeFromPointIndex as tt } from "../../helpers/getTimeFromPointIndex/getTimeFromPointIndex.js";
12
+ import { convertHoursToTimeString as F } from "../../helpers/convertHoursToTimeString/convertHoursToTimeString.js";
13
+ import { getVisiblePoints as nt } from "../../helpers/getVisiblePoints/getVisiblePoints.js";
14
+ import { useComponentSize as it } from "@m4l/graphics";
15
+ import { Tooltip as ot } from "@m4l/base";
16
+ import z from "clsx";
17
+ import { VIDEO_TIME_LINE_SELECTOR_DICTIONARY_KEYS as ye } from "../../dictionary.js";
18
+ import { useModuleDictionary as rt, useUserPreferences as st } from "@m4l/core";
19
+ import { resolveTooltipAnchor as at, secondsToTimelinePercent as A, snapToSegmentStart as Me, dateToDaySeconds as ct, resolveActiveSegment as lt, resolvePreviewRange as mt } from "../../helpers/playbackRange/playbackRange.js";
20
+ const ut = 1400, dt = 650, Nt = $e((Le) => {
21
+ const { isTransitioning: be } = Le, u = P(null), { getLabel: B } = rt(), { timeZone: Ee } = st(), s = Ee?.name?.trim() || "UTC", {
22
22
  pointsQty: d,
23
- zoomQty: be,
24
- currentTime: s,
25
- quadrantsQty: h,
26
- currentQuadrant: T,
27
- timeVisible: N,
28
- channels: ee,
23
+ zoomQty: Ce,
24
+ currentTime: a,
25
+ quadrantsQty: S,
26
+ currentQuadrant: h,
27
+ timeVisible: _,
28
+ channels: te,
29
29
  segments: p,
30
- events: _,
31
- activeChannels: B,
30
+ events: D,
31
+ activeChannels: Q,
32
32
  snapToSegmentStart: f,
33
- showPlaybackRangePreview: te,
34
- playbackDurationSeconds: Q
35
- } = Pe(
33
+ showPlaybackRangePreview: ne,
34
+ playbackDurationSeconds: X
35
+ } = ve(
36
36
  (e) => e,
37
- je
38
- ), { currentSize: X } = tt(), { setCurrentTime: v, setTimeVisible: ne } = Pe((e) => e.actions), [D, Ee] = I(0), [y, ie] = I(!1), [q, M] = I(!1), [H, oe] = I(!1), [C, re] = I(0), K = w(s), L = w(null), b = w(null), se = w(null);
39
- P(() => {
40
- u.current && re(u.current.clientWidth);
37
+ Ze
38
+ ), { currentSize: q } = it(), { setCurrentTime: y, setTimeVisible: ie } = ve((e) => e.actions), [$, ke] = N(0), [M, oe] = N(!1), [H, L] = N(!1), [K, re] = N(!1), [k, se] = N(0), Y = P(a), b = P(null), E = P(null), ae = P(null);
39
+ v(() => {
40
+ u.current && se(u.current.clientWidth);
41
41
  const t = new ResizeObserver((n) => {
42
42
  for (const i of n)
43
- re(i.contentRect.width);
43
+ se(i.contentRect.width);
44
44
  });
45
45
  return u.current && t.observe(u.current), () => {
46
46
  t.disconnect();
47
47
  };
48
48
  }, []);
49
- const Y = w(!1), ae = a((e) => {
50
- if (Y.current)
49
+ const U = P(!1), ce = c((e) => {
50
+ if (U.current)
51
51
  return;
52
- const t = Z.indexOf(N);
52
+ const t = ee.indexOf(_);
53
53
  let n;
54
- if (e === "down" ? n = Math.max(0, t - 1) : n = Math.min(Z.length - 1, t + 1), n !== t) {
55
- Y.current = !0;
56
- const i = Z[n];
57
- ne(i), setTimeout(() => {
58
- Y.current = !1;
54
+ if (e === "down" ? n = Math.max(0, t - 1) : n = Math.min(ee.length - 1, t + 1), n !== t) {
55
+ U.current = !0;
56
+ const i = ee[n];
57
+ ie(i), setTimeout(() => {
58
+ U.current = !1;
59
59
  }, 500);
60
60
  }
61
- }, [N, ne]), j = a((e) => {
61
+ }, [_, ie]), j = c((e) => {
62
62
  if (e.ctrlKey) {
63
63
  e.preventDefault(), e.stopPropagation();
64
64
  const t = e.deltaY < 0 ? "up" : "down";
65
- ae(t);
65
+ ce(t);
66
66
  }
67
- }, [ae]);
68
- P(() => {
67
+ }, [ce]);
68
+ v(() => {
69
69
  const e = u.current;
70
70
  if (e)
71
71
  return e.addEventListener("wheel", j, { passive: !1 }), () => {
72
72
  e.removeEventListener("wheel", j);
73
73
  };
74
74
  }, [j]);
75
- const S = a((e) => {
76
- Ee(e);
77
- }, []), k = a(() => {
78
- se.current?.update();
79
- }, []), $ = a(() => {
80
- b.current === null || typeof window > "u" || (window.cancelAnimationFrame(b.current), b.current = null);
81
- }, []), ce = a(() => {
75
+ const g = c((e) => {
76
+ ke(e);
77
+ }, []), R = c(() => {
78
+ ae.current?.update();
79
+ }, []), O = c(() => {
80
+ E.current === null || typeof window > "u" || (window.cancelAnimationFrame(E.current), E.current = null);
81
+ }, []), le = c(() => {
82
82
  if (typeof window > "u" || typeof window.requestAnimationFrame != "function") {
83
- k();
83
+ R();
84
84
  return;
85
85
  }
86
- $();
86
+ O();
87
87
  const e = () => typeof window.performance?.now == "function" ? window.performance.now() : Date.now(), t = e(), n = () => {
88
- if (k(), e() - t < ct) {
89
- b.current = window.requestAnimationFrame(n);
88
+ if (R(), e() - t < dt) {
89
+ E.current = window.requestAnimationFrame(n);
90
90
  return;
91
91
  }
92
- b.current = null;
92
+ E.current = null;
93
93
  };
94
- b.current = window.requestAnimationFrame(n);
95
- }, [$, k]), le = a(() => {
96
- L.current && clearTimeout(L.current), oe(!0), L.current = setTimeout(() => {
97
- oe(!1), L.current = null;
98
- }, at);
94
+ E.current = window.requestAnimationFrame(n);
95
+ }, [O, R]), me = c(() => {
96
+ b.current && clearTimeout(b.current), re(!0), b.current = setTimeout(() => {
97
+ re(!1), b.current = null;
98
+ }, ut);
99
99
  }, []);
100
- P(() => () => {
101
- L.current && clearTimeout(L.current), $();
102
- }, [$]);
103
- const c = B[0] ?? null, O = E(() => ot({
104
- activeChannel: c,
105
- candidateTime: s,
106
- fallbackPositionPercent: D,
100
+ v(() => () => {
101
+ b.current && clearTimeout(b.current), O();
102
+ }, [O]);
103
+ const l = Q[0] ?? null, W = C(() => at({
104
+ activeChannel: l,
105
+ candidateTime: a,
106
+ fallbackPositionPercent: $,
107
107
  segments: p,
108
- snapEnabled: f
109
- }), [c, s, D, p, f]);
110
- P(() => {
111
- (q || y || H) && k();
112
- }, [s, y, H, q, D, O.positionPercent, k]), P(() => {
113
- K.current = s, S(A(s));
114
- }, [s, S]);
115
- const g = a((e, t = f) => {
116
- const n = t ? ye({
117
- activeChannel: c,
108
+ snapEnabled: f,
109
+ timeZoneName: s
110
+ }), [l, a, $, p, f, s]);
111
+ v(() => {
112
+ (H || M || K) && R();
113
+ }, [a, M, K, H, $, W.positionPercent, R]), v(() => {
114
+ Y.current = a, g(A(a));
115
+ }, [a, g]);
116
+ const w = c((e, t = f) => {
117
+ const n = t ? Me({
118
+ activeChannel: l,
118
119
  candidateTime: e,
119
- segments: p
120
+ segments: p,
121
+ timeZoneName: s
120
122
  }) : null, i = n?.time ?? e, o = Math.max(0, Math.min(86399, Math.floor(i)));
121
- return S(A(o)), v(o), {
123
+ return g(A(o)), y(o), {
122
124
  didSnap: !!n?.didSnap
123
125
  };
124
- }, [c, p, v, f, S]);
125
- P(() => {
126
- if (!f || !c || y)
126
+ }, [l, p, y, f, s, g]);
127
+ v(() => {
128
+ if (!f || !l || M)
127
129
  return;
128
- const e = ye({
129
- activeChannel: c,
130
- candidateTime: s,
131
- segments: p
130
+ const e = Me({
131
+ activeChannel: l,
132
+ candidateTime: a,
133
+ segments: p,
134
+ timeZoneName: s
132
135
  });
133
- if (!e.segment || e.time === s)
136
+ if (!e.segment || e.time === a)
134
137
  return;
135
138
  const t = Math.max(0, Math.min(86399, Math.floor(e.time)));
136
- S(A(t)), v(t);
137
- }, [c, s, y, p, v, f, S]);
138
- const Ce = a((e) => {
139
+ g(A(t)), y(t);
140
+ }, [l, a, M, p, y, f, s, g]);
141
+ const Re = c((e) => {
139
142
  if (!u.current)
140
143
  return;
141
- const t = u.current.getBoundingClientRect(), n = e.clientX - t.left, i = u.current.clientWidth, o = t.width, l = i - o, fe = (n + l * (n / o)) / i * 100, G = Math.floor(fe / 100 * 24 * 60 * 60), J = Math.max(0, Math.min(86399, G));
142
- g(J);
143
- }, [g]), me = w(T);
144
- P(() => {
145
- me.current = T;
146
- }, [T]);
147
- const ue = E(() => C === 0 ? [] : et({
144
+ const t = u.current.getBoundingClientRect(), n = e.clientX - t.left, i = u.current.clientWidth, o = t.width, T = i - o, Te = (n + T * (n / o)) / i * 100, G = Math.floor(Te / 100 * 24 * 60 * 60), J = Math.max(0, Math.min(86399, G));
145
+ w(J);
146
+ }, [w]), ue = P(h);
147
+ v(() => {
148
+ ue.current = h;
149
+ }, [h]);
150
+ const de = C(() => k === 0 ? [] : nt({
148
151
  totalPoints: d,
149
- totalQuadrants: h,
150
- currentQuadrant: T,
151
- containerWidth: C
152
- }), [d, h, T, C]), ke = E(() => !_ || _.length === 0 ? [] : Ge(_, Ye[N].clusterThresholdMinutes, C), [_, N, C]), de = a((e) => {
152
+ totalQuadrants: S,
153
+ currentQuadrant: h,
154
+ containerWidth: k
155
+ }), [d, S, h, k]), xe = C(() => !D || D.length === 0 ? [] : Je(
156
+ D,
157
+ je[_].clusterThresholdMinutes,
158
+ k,
159
+ s
160
+ ), [D, _, k, s]), pe = c((e) => {
153
161
  const t = 24 / d;
154
162
  return e * t;
155
- }, [d]), pe = a((e) => {
156
- const { newTime: t } = Ze(e, d, h, me.current);
157
- g(t);
158
- }, [g, d, h]), Re = a((e) => {
159
- const t = e.getHours(), n = e.getMinutes(), i = e.getSeconds(), o = e.getMilliseconds(), l = t * 3600 + n * 60 + i + o / 1e3;
160
- g(l);
161
- }, [g]), xe = a((e) => {
163
+ }, [d]), fe = c((e) => {
164
+ const { newTime: t } = tt(e, d, S, ue.current);
165
+ w(t);
166
+ }, [w, d, S]), Ie = c((e) => {
167
+ const t = ct(e, s);
168
+ w(t);
169
+ }, [w, s]), Ne = c((e) => {
162
170
  e.stopPropagation(), e.preventDefault();
163
171
  const t = u.current;
164
172
  if (!t)
165
173
  return;
166
- ie(!0);
167
- const n = t.getBoundingClientRect(), o = $e((R) => {
168
- const G = (R.clientX - n.left) * 100 / n.width, J = 100 / h * (T - 1), Ae = 100 / h * (T - 1e-5), Te = Math.max(J, Math.min(Ae, G));
169
- S(Te);
170
- const he = Te / 100 * 24 * 60 * 60;
171
- K.current = he, v(Math.floor(he));
174
+ oe(!0);
175
+ const n = t.getBoundingClientRect(), o = We((x) => {
176
+ const G = (x.clientX - n.left) * 100 / n.width, J = 100 / S * (h - 1), _e = 100 / S * (h - 1e-5), he = Math.max(J, Math.min(_e, G));
177
+ g(he);
178
+ const Se = he / 100 * 24 * 60 * 60;
179
+ Y.current = Se, y(Math.floor(Se));
172
180
  }, 50, {
173
181
  leading: !0,
174
182
  trailing: !0
175
- }), l = () => {
176
- ie(!1), window.removeEventListener("mousemove", o), window.removeEventListener("mouseup", l), o.cancel(), f && g(K.current, !0).didSnap && (le(), ce());
183
+ }), T = () => {
184
+ oe(!1), window.removeEventListener("mousemove", o), window.removeEventListener("mouseup", T), o.cancel(), f && w(Y.current, !0).didSnap && (me(), le());
177
185
  };
178
- window.addEventListener("mousemove", o), window.addEventListener("mouseup", l);
179
- }, [g, T, h, v, le, f, ce, S]), W = E(() => {
180
- if (!te || !c || !Q)
186
+ window.addEventListener("mousemove", o), window.addEventListener("mouseup", T);
187
+ }, [w, h, S, y, me, f, le, g]), V = C(() => {
188
+ if (!ne || !l || !X)
181
189
  return null;
182
- const e = rt({
183
- activeChannel: c,
184
- candidateTime: s,
185
- segments: p
190
+ const e = lt({
191
+ activeChannel: l,
192
+ candidateTime: a,
193
+ segments: p,
194
+ timeZoneName: s
186
195
  });
187
- return st({
188
- indicatorTime: s,
189
- durationSeconds: Q,
196
+ return mt({
197
+ indicatorTime: a,
198
+ durationSeconds: X,
190
199
  segment: e,
191
200
  snapEnabled: f
192
201
  });
193
- }, [c, s, Q, p, te, f]), U = E(() => {
194
- if (!W)
202
+ }, [l, a, X, p, ne, f, s]), Z = C(() => {
203
+ if (!V)
195
204
  return null;
196
- const e = A(W.start), t = A(W.end);
205
+ const e = A(V.start), t = A(V.end);
197
206
  return {
198
207
  left: `${e}%`,
199
208
  width: `${Math.max(0, t - e)}%`
200
209
  };
201
- }, [W]), Ie = E(() => /* @__PURE__ */ r(Ne, { children: ee.map((e, t) => {
210
+ }, [V]), Ae = C(() => /* @__PURE__ */ r(De, { children: te.map((e, t) => {
202
211
  const n = p.find((i) => i.channelId === e.id);
203
- return /* @__PURE__ */ x(
204
- Oe,
212
+ return /* @__PURE__ */ I(
213
+ Ve,
205
214
  {
206
- className: F(m.timeLineChannelWrapper, B.includes(e.id) ? " active" : ""),
215
+ className: z(m.timeLineChannelWrapper, Q.includes(e.id) ? " active" : ""),
207
216
  children: [
208
217
  n && n?.segmentsList && n?.segmentsList.length > 0 && n?.segmentsList.map((i, o) => {
209
- const { width: l, left: R } = Ue({ startTime: i.startTime, endTime: i.endTime });
218
+ const { width: T, left: x } = Ge({
219
+ startTime: i.startTime,
220
+ endTime: i.endTime,
221
+ timeZoneName: s
222
+ });
210
223
  return !i.startTime || !i.endTime || i.startTime === i.endTime ? null : /* @__PURE__ */ r(
211
- We,
224
+ Fe,
212
225
  {
213
226
  className: m.pointChannelSegment,
214
227
  style: {
215
- width: l,
216
- left: R
228
+ width: T,
229
+ left: x
217
230
  }
218
231
  },
219
232
  `point-channel-segment-${t}-${o}`
220
233
  );
221
234
  }),
222
- U && e.id === c && /* @__PURE__ */ r(
223
- Ve,
235
+ Z && e.id === l && /* @__PURE__ */ r(
236
+ ze,
224
237
  {
225
238
  className: m.playbackRangePreview,
226
- style: U
239
+ style: Z
227
240
  }
228
241
  ),
229
- ue.map((i) => {
230
- const o = i.index, l = de(o);
242
+ de.map((i) => {
243
+ const o = i.index, T = pe(o);
231
244
  return /* @__PURE__ */ r(
232
- Fe,
245
+ Be,
233
246
  {
234
- className: F(m.pointSegment),
247
+ className: z(m.pointSegment),
235
248
  style: {
236
249
  position: "absolute",
237
250
  width: i.widthPixels,
@@ -239,22 +252,22 @@ const at = 1400, ct = 650, kt = _e((Me) => {
239
252
  },
240
253
  role: "button",
241
254
  tabIndex: 0,
242
- "aria-label": `${z(ve.select_time)} ${V(l)}`,
243
- children: (o % 2 === 0 || o === d - 1) && /* @__PURE__ */ x(De, { children: [
244
- t === 0 && o !== d - 1 && /* @__PURE__ */ x(Se, { className: m.axisTickContainer, onClick: () => pe(o), children: [
255
+ "aria-label": `${B(ye.select_time)} ${F(T)}`,
256
+ children: (o % 2 === 0 || o === d - 1) && /* @__PURE__ */ I(Oe, { children: [
257
+ t === 0 && o !== d - 1 && /* @__PURE__ */ I(ge, { className: m.axisTickContainer, onClick: () => fe(o), children: [
245
258
  /* @__PURE__ */ r(
246
- ge,
259
+ we,
247
260
  {
248
261
  className: m.axisTickNumber,
249
- ownerState: { size: X },
250
- children: V(l)
262
+ ownerState: { size: q },
263
+ children: F(T)
251
264
  }
252
265
  ),
253
- /* @__PURE__ */ r(we, { className: m.axisTickLine })
266
+ /* @__PURE__ */ r(Pe, { className: m.axisTickLine })
254
267
  ] }),
255
- t === 0 && o === d - 1 && /* @__PURE__ */ x(Se, { className: `${m.axisTickContainer} last-tick`, children: [
256
- /* @__PURE__ */ r(ge, { className: m.axisTickNumber, ownerState: { size: X }, children: V(l, !0) }),
257
- /* @__PURE__ */ r(we, { className: m.axisTickLine })
268
+ t === 0 && o === d - 1 && /* @__PURE__ */ I(ge, { className: `${m.axisTickContainer} last-tick`, children: [
269
+ /* @__PURE__ */ r(we, { className: m.axisTickNumber, ownerState: { size: q }, children: F(T, !0) }),
270
+ /* @__PURE__ */ r(Pe, { className: m.axisTickLine })
258
271
  ] })
259
272
  ] })
260
273
  },
@@ -265,72 +278,72 @@ const at = 1400, ct = 650, kt = _e((Me) => {
265
278
  },
266
279
  `time-line-channel-${t}`
267
280
  );
268
- }) }), [c, B, ee, X, de, z, pe, U, d, p, ue]);
269
- return /* @__PURE__ */ r(ze, { children: /* @__PURE__ */ x(
270
- Be,
281
+ }) }), [l, Q, te, q, pe, B, fe, Z, d, p, s, de]);
282
+ return /* @__PURE__ */ r(Qe, { children: /* @__PURE__ */ I(
283
+ Xe,
271
284
  {
272
285
  ref: u,
273
286
  style: {
274
- width: `${be}%`,
275
- transform: `translateX(-${100 / h * (T - 1)}%)`
287
+ width: `${Ce}%`,
288
+ transform: `translateX(-${100 / S * (h - 1)}%)`
276
289
  },
277
290
  children: [
278
- /* @__PURE__ */ r(Qe, { onClick: Ce, children: /* @__PURE__ */ r(Xe, {}) }),
279
- ke.map((e) => /* @__PURE__ */ r(
280
- Je,
291
+ /* @__PURE__ */ r(qe, { onClick: Re, children: /* @__PURE__ */ r(He, {}) }),
292
+ xe.map((e) => /* @__PURE__ */ r(
293
+ et,
281
294
  {
282
295
  clusteredEvent: e,
283
- onEventClick: Re
296
+ onEventClick: Ie
284
297
  },
285
298
  e.id
286
299
  )),
287
300
  /* @__PURE__ */ r(
288
- nt,
301
+ ot,
289
302
  {
290
- title: V(O.time / 3600, !1, !0),
303
+ title: F(W.time / 3600, !1, !0),
291
304
  placement: "top",
292
305
  offset: [0, 20],
293
306
  PopperProps: {
294
- popperRef: se
307
+ popperRef: ae
295
308
  },
296
- open: q || y || H,
297
- onOpen: () => M(!0),
298
- onClose: () => M(!1),
309
+ open: H || M || K,
310
+ onOpen: () => L(!0),
311
+ onClose: () => L(!1),
299
312
  children: /* @__PURE__ */ r(
300
- qe,
313
+ Ke,
301
314
  {
302
- className: F(
315
+ className: z(
303
316
  m.playbackTooltipAnchor,
304
- O.snapsToSegment ? "snapped" : "floating"
317
+ W.snapsToSegment ? "snapped" : "floating"
305
318
  ),
306
- style: { left: `${O.positionPercent}%` }
319
+ style: { left: `${W.positionPercent}%` }
307
320
  }
308
321
  )
309
322
  }
310
323
  ),
311
324
  /* @__PURE__ */ r(
312
- He,
325
+ Ye,
313
326
  {
314
- style: { left: `${D}%` },
315
- className: F(m.dialPointIndicator, y ? "dragging" : ""),
316
- onMouseDown: xe,
317
- onMouseEnter: () => M(!0),
318
- onMouseLeave: () => M(!1),
319
- onFocus: () => M(!0),
320
- onBlur: () => M(!1),
327
+ style: { left: `${$}%` },
328
+ className: z(m.dialPointIndicator, M ? "dragging" : ""),
329
+ onMouseDown: Ne,
330
+ onMouseEnter: () => L(!0),
331
+ onMouseLeave: () => L(!1),
332
+ onFocus: () => L(!0),
333
+ onBlur: () => L(!1),
321
334
  role: "slider",
322
- "aria-valuenow": s,
335
+ "aria-valuenow": a,
323
336
  "aria-valuemin": 0,
324
337
  "aria-valuemax": 86399,
325
- "aria-label": z(ve.time_selector),
326
- children: /* @__PURE__ */ r(Ke, {})
338
+ "aria-label": B(ye.time_selector),
339
+ children: /* @__PURE__ */ r(Ue, {})
327
340
  }
328
341
  ),
329
- !Le && Ie
342
+ !be && Ae
330
343
  ]
331
344
  }
332
345
  ) });
333
346
  });
334
347
  export {
335
- kt as ChartTimeLine
348
+ Nt as ChartTimeLine
336
349
  };
@@ -4,8 +4,8 @@ interface EventClusterProps {
4
4
  onEventClick?: (eventTime: Date) => void;
5
5
  }
6
6
  /**
7
- * Componente que renderiza un clúster de eventos o un evento individual
8
- * @param props - Propiedades del componente
7
+ * Component that renders an event cluster or a single event.
8
+ * @param props - Component properties
9
9
  */
10
10
  export declare const EventCluster: import('react').MemoExoticComponent<({ clusteredEvent, onEventClick }: EventClusterProps) => import("@emotion/react/jsx-runtime").JSX.Element>;
11
11
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"EventCluster.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/gclick/src/components/VideoTimeLineSelector/subcomponents/EventCluster/EventCluster.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,2CAA2C,CAAC;AAQ3E,UAAU,iBAAiB;IACzB,cAAc,EAAE,cAAc,CAAC;IAC/B,YAAY,CAAC,EAAE,CAAC,SAAS,EAAE,IAAI,KAAK,IAAI,CAAC;CAC1C;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,yEAA2C,iBAAiB,sDA8FnF,CAAC"}
1
+ {"version":3,"file":"EventCluster.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/gclick/src/components/VideoTimeLineSelector/subcomponents/EventCluster/EventCluster.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,2CAA2C,CAAC;AAQ3E,UAAU,iBAAiB;IACzB,cAAc,EAAE,cAAc,CAAC;IAC/B,YAAY,CAAC,EAAE,CAAC,SAAS,EAAE,IAAI,KAAK,IAAI,CAAC;CAC1C;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,yEAA2C,iBAAiB,sDA4GnF,CAAC"}