react-av-timeline 1.1.3 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,2 @@
1
- import { CSSProperties, HTMLAttributes, ReactNode } from 'react';
2
- export interface itemsType {
3
- time: number;
4
- style?: CSSProperties;
5
- content?: ReactNode;
6
- }
7
- export default function Component({ items, currentTime, totalTime, scale, indicator, itemStyle }: {
8
- items: itemsType[];
9
- itemStyle?: CSSProperties;
10
- currentTime: number;
11
- totalTime: number;
12
- scale?: number;
13
- indicator?: HTMLAttributes<HTMLDivElement>;
14
- }): import("react/jsx-runtime").JSX.Element;
1
+ import { PropsType } from './utils';
2
+ export default function Component({ items, currentTime, totalTime, scale, indicator, itemStyle }: PropsType): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { CSSProperties } from 'react';
2
+ import { PropsType } from './utils';
3
+ export default function Component({ items, currentTime, totalTime, scale, indicator, itemStyle, prev, height, left }: PropsType & {
4
+ prev?: number;
5
+ left?: number;
6
+ height?: CSSProperties['height'];
7
+ }): import("react/jsx-runtime").JSX.Element;
package/dist/index.css CHANGED
@@ -1 +1 @@
1
- ._timeline_160ei_1{position:relative;overflow:clip;width:100%}._timeline-items_160ei_6{transform:translate(var(--translate));display:flex;transition:all .13s;height:100%;width:100%}._timeline-item_160ei_6{display:flex;align-items:center;justify-content:center;color:#000;background:var(--bg);flex-shrink:0;border-right:2px solid white;box-sizing:border-box}._timeline-indicator_160ei_23{z-index:1;position:absolute;top:0;left:50%;background-color:#000;transform:translate(-50%);width:3px;opacity:.4;height:100%}
1
+ ._timeline_100yd_1{position:relative;overflow:clip;width:100%}._timeline-items_100yd_6{transform:translate(var(--translate));display:flex;transition:all .13s;height:100%;width:100%}._timeline-item_100yd_6{display:flex;align-items:center;justify-content:center;color:#000;background:var(--bg);flex-shrink:0;border-right:2px solid white;box-sizing:border-box;white-space:nowrap}._timeline-indicator_100yd_24{z-index:1;position:absolute;top:0;left:50%;background-color:#000;transform:translate(-50%);width:3px;opacity:.4;height:100%}._timeline_212s7_1{overflow:clip;position:relative;height:200px}._timeline-items_212s7_6{transform:translate(var(--translate));display:flex;flex-direction:column;transition:all .13s}._timeline-item_212s7_6{background:var(--bg);position:relative;display:flex;justify-content:center;align-items:center;white-space:nowrap}._timeline-indicator_212s7_20{z-index:1;position:absolute;top:0;background-color:#000;width:3px;opacity:.4;height:100%}
package/dist/index.d.ts CHANGED
@@ -1,2 +1,5 @@
1
- import Component from "./Component";
2
- export default Component;
1
+ import Horizonal from "./Component";
2
+ import Vertical from './Vertical';
3
+ import type { PropsType, itemsType } from './utils';
4
+ export default Horizonal;
5
+ export { Vertical, type PropsType, type itemsType };
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import Pe from "react";
2
- var V = { exports: {} }, I = {};
1
+ import De from "react";
2
+ var J = { exports: {} }, W = {};
3
3
  /**
4
4
  * @license React
5
5
  * react-jsx-runtime.production.min.js
@@ -9,21 +9,21 @@ var V = { exports: {} }, I = {};
9
9
  * This source code is licensed under the MIT license found in the
10
10
  * LICENSE file in the root directory of this source tree.
11
11
  */
12
- var Ce;
13
- function dr() {
14
- if (Ce) return I;
15
- Ce = 1;
16
- var m = Pe, c = Symbol.for("react.element"), E = Symbol.for("react.fragment"), y = Object.prototype.hasOwnProperty, P = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, j = { key: !0, ref: !0, __self: !0, __source: !0 };
17
- function T(h, l, O) {
18
- var d, b = {}, C = null, W = null;
19
- O !== void 0 && (C = "" + O), l.key !== void 0 && (C = "" + l.key), l.ref !== void 0 && (W = l.ref);
20
- for (d in l) y.call(l, d) && !j.hasOwnProperty(d) && (b[d] = l[d]);
21
- if (h && h.defaultProps) for (d in l = h.defaultProps, l) b[d] === void 0 && (b[d] = l[d]);
22
- return { $$typeof: c, type: h, key: C, ref: W, props: b, _owner: P.current };
12
+ var Pe;
13
+ function mr() {
14
+ if (Pe) return W;
15
+ Pe = 1;
16
+ var s = De, l = Symbol.for("react.element"), _ = Symbol.for("react.fragment"), p = Object.prototype.hasOwnProperty, O = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, w = { key: !0, ref: !0, __self: !0, __source: !0 };
17
+ function T(h, c, R) {
18
+ var f, g = {}, C = null, D = null;
19
+ R !== void 0 && (C = "" + R), c.key !== void 0 && (C = "" + c.key), c.ref !== void 0 && (D = c.ref);
20
+ for (f in c) p.call(c, f) && !w.hasOwnProperty(f) && (g[f] = c[f]);
21
+ if (h && h.defaultProps) for (f in c = h.defaultProps, c) g[f] === void 0 && (g[f] = c[f]);
22
+ return { $$typeof: l, type: h, key: C, ref: D, props: g, _owner: O.current };
23
23
  }
24
- return I.Fragment = E, I.jsx = T, I.jsxs = T, I;
24
+ return W.Fragment = _, W.jsx = T, W.jsxs = T, W;
25
25
  }
26
- var $ = {};
26
+ var Y = {};
27
27
  /**
28
28
  * @license React
29
29
  * react-jsx-runtime.development.js
@@ -33,27 +33,27 @@ var $ = {};
33
33
  * This source code is licensed under the MIT license found in the
34
34
  * LICENSE file in the root directory of this source tree.
35
35
  */
36
- var Se;
37
- function vr() {
38
- return Se || (Se = 1, process.env.NODE_ENV !== "production" && (function() {
39
- var m = Pe, c = Symbol.for("react.element"), E = Symbol.for("react.portal"), y = Symbol.for("react.fragment"), P = Symbol.for("react.strict_mode"), j = Symbol.for("react.profiler"), T = Symbol.for("react.provider"), h = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), O = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), W = Symbol.for("react.offscreen"), Q = Symbol.iterator, je = "@@iterator";
40
- function xe(e) {
36
+ var xe;
37
+ function _r() {
38
+ return xe || (xe = 1, process.env.NODE_ENV !== "production" && (function() {
39
+ var s = De, l = Symbol.for("react.element"), _ = Symbol.for("react.portal"), p = Symbol.for("react.fragment"), O = Symbol.for("react.strict_mode"), w = Symbol.for("react.profiler"), T = Symbol.for("react.provider"), h = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), R = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), g = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), D = Symbol.for("react.offscreen"), M = Symbol.iterator, K = "@@iterator";
40
+ function ne(e) {
41
41
  if (e === null || typeof e != "object")
42
42
  return null;
43
- var r = Q && e[Q] || e[je];
43
+ var r = M && e[M] || e[K];
44
44
  return typeof r == "function" ? r : null;
45
45
  }
46
- var x = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
47
- function v(e) {
46
+ var S = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
47
+ function m(e) {
48
48
  {
49
49
  for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
50
50
  t[n - 1] = arguments[n];
51
- ke("error", e, t);
51
+ Fe("error", e, t);
52
52
  }
53
53
  }
54
- function ke(e, r, t) {
54
+ function Fe(e, r, t) {
55
55
  {
56
- var n = x.ReactDebugCurrentFrame, o = n.getStackAddendum();
56
+ var n = S.ReactDebugCurrentFrame, o = n.getStackAddendum();
57
57
  o !== "" && (r += "%s", t = t.concat([o]));
58
58
  var u = t.map(function(i) {
59
59
  return String(i);
@@ -61,63 +61,63 @@ function vr() {
61
61
  u.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, u);
62
62
  }
63
63
  }
64
- var De = !1, Ae = !1, Fe = !1, Ie = !1, $e = !1, ee;
65
- ee = Symbol.for("react.module.reference");
66
- function We(e) {
67
- return !!(typeof e == "string" || typeof e == "function" || e === y || e === j || $e || e === P || e === O || e === d || Ie || e === W || De || Ae || Fe || typeof e == "object" && e !== null && (e.$$typeof === C || e.$$typeof === b || e.$$typeof === T || e.$$typeof === h || e.$$typeof === l || // This needs to include all possible module reference object
64
+ var $e = !1, Ie = !1, We = !1, Ye = !1, Me = !1, ae;
65
+ ae = Symbol.for("react.module.reference");
66
+ function Ne(e) {
67
+ return !!(typeof e == "string" || typeof e == "function" || e === p || e === w || Me || e === O || e === R || e === f || Ye || e === D || $e || Ie || We || typeof e == "object" && e !== null && (e.$$typeof === C || e.$$typeof === g || e.$$typeof === T || e.$$typeof === h || e.$$typeof === c || // This needs to include all possible module reference object
68
68
  // types supported by any Flight configuration anywhere since
69
69
  // we don't know which Flight build this will end up being used
70
70
  // with.
71
- e.$$typeof === ee || e.getModuleId !== void 0));
71
+ e.$$typeof === ae || e.getModuleId !== void 0));
72
72
  }
73
- function Ye(e, r, t) {
73
+ function Ve(e, r, t) {
74
74
  var n = e.displayName;
75
75
  if (n)
76
76
  return n;
77
77
  var o = r.displayName || r.name || "";
78
78
  return o !== "" ? t + "(" + o + ")" : t;
79
79
  }
80
- function re(e) {
80
+ function ie(e) {
81
81
  return e.displayName || "Context";
82
82
  }
83
- function R(e) {
83
+ function j(e) {
84
84
  if (e == null)
85
85
  return null;
86
- if (typeof e.tag == "number" && v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
86
+ if (typeof e.tag == "number" && m("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
87
87
  return e.displayName || e.name || null;
88
88
  if (typeof e == "string")
89
89
  return e;
90
90
  switch (e) {
91
- case y:
91
+ case p:
92
92
  return "Fragment";
93
- case E:
93
+ case _:
94
94
  return "Portal";
95
- case j:
95
+ case w:
96
96
  return "Profiler";
97
- case P:
98
- return "StrictMode";
99
97
  case O:
98
+ return "StrictMode";
99
+ case R:
100
100
  return "Suspense";
101
- case d:
101
+ case f:
102
102
  return "SuspenseList";
103
103
  }
104
104
  if (typeof e == "object")
105
105
  switch (e.$$typeof) {
106
106
  case h:
107
107
  var r = e;
108
- return re(r) + ".Consumer";
108
+ return ie(r) + ".Consumer";
109
109
  case T:
110
110
  var t = e;
111
- return re(t._context) + ".Provider";
112
- case l:
113
- return Ye(e, e.render, "ForwardRef");
114
- case b:
111
+ return ie(t._context) + ".Provider";
112
+ case c:
113
+ return Ve(e, e.render, "ForwardRef");
114
+ case g:
115
115
  var n = e.displayName || null;
116
- return n !== null ? n : R(e.type) || "Memo";
116
+ return n !== null ? n : j(e.type) || "Memo";
117
117
  case C: {
118
118
  var o = e, u = o._payload, i = o._init;
119
119
  try {
120
- return R(i(u));
120
+ return j(i(u));
121
121
  } catch {
122
122
  return null;
123
123
  }
@@ -125,18 +125,18 @@ function vr() {
125
125
  }
126
126
  return null;
127
127
  }
128
- var S = Object.assign, A = 0, te, ne, ae, ie, oe, ue, se;
129
- function le() {
128
+ var x = Object.assign, $ = 0, oe, ue, se, le, ce, fe, de;
129
+ function ve() {
130
130
  }
131
- le.__reactDisabledLog = !0;
132
- function Me() {
131
+ ve.__reactDisabledLog = !0;
132
+ function Le() {
133
133
  {
134
- if (A === 0) {
135
- te = console.log, ne = console.info, ae = console.warn, ie = console.error, oe = console.group, ue = console.groupCollapsed, se = console.groupEnd;
134
+ if ($ === 0) {
135
+ oe = console.log, ue = console.info, se = console.warn, le = console.error, ce = console.group, fe = console.groupCollapsed, de = console.groupEnd;
136
136
  var e = {
137
137
  configurable: !0,
138
138
  enumerable: !0,
139
- value: le,
139
+ value: ve,
140
140
  writable: !0
141
141
  };
142
142
  Object.defineProperties(console, {
@@ -149,77 +149,77 @@ function vr() {
149
149
  groupEnd: e
150
150
  });
151
151
  }
152
- A++;
152
+ $++;
153
153
  }
154
154
  }
155
- function Le() {
155
+ function Ue() {
156
156
  {
157
- if (A--, A === 0) {
157
+ if ($--, $ === 0) {
158
158
  var e = {
159
159
  configurable: !0,
160
160
  enumerable: !0,
161
161
  writable: !0
162
162
  };
163
163
  Object.defineProperties(console, {
164
- log: S({}, e, {
165
- value: te
164
+ log: x({}, e, {
165
+ value: oe
166
166
  }),
167
- info: S({}, e, {
168
- value: ne
167
+ info: x({}, e, {
168
+ value: ue
169
169
  }),
170
- warn: S({}, e, {
171
- value: ae
170
+ warn: x({}, e, {
171
+ value: se
172
172
  }),
173
- error: S({}, e, {
174
- value: ie
173
+ error: x({}, e, {
174
+ value: le
175
175
  }),
176
- group: S({}, e, {
177
- value: oe
176
+ group: x({}, e, {
177
+ value: ce
178
178
  }),
179
- groupCollapsed: S({}, e, {
180
- value: ue
179
+ groupCollapsed: x({}, e, {
180
+ value: fe
181
181
  }),
182
- groupEnd: S({}, e, {
183
- value: se
182
+ groupEnd: x({}, e, {
183
+ value: de
184
184
  })
185
185
  });
186
186
  }
187
- A < 0 && v("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
187
+ $ < 0 && m("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
188
188
  }
189
189
  }
190
- var q = x.ReactCurrentDispatcher, B;
191
- function Y(e, r, t) {
190
+ var G = S.ReactCurrentDispatcher, z;
191
+ function N(e, r, t) {
192
192
  {
193
- if (B === void 0)
193
+ if (z === void 0)
194
194
  try {
195
195
  throw Error();
196
196
  } catch (o) {
197
197
  var n = o.stack.trim().match(/\n( *(at )?)/);
198
- B = n && n[1] || "";
198
+ z = n && n[1] || "";
199
199
  }
200
200
  return `
201
- ` + B + e;
201
+ ` + z + e;
202
202
  }
203
203
  }
204
- var K = !1, M;
204
+ var X = !1, V;
205
205
  {
206
- var Ne = typeof WeakMap == "function" ? WeakMap : Map;
207
- M = new Ne();
206
+ var Je = typeof WeakMap == "function" ? WeakMap : Map;
207
+ V = new Je();
208
208
  }
209
- function fe(e, r) {
210
- if (!e || K)
209
+ function pe(e, r) {
210
+ if (!e || X)
211
211
  return "";
212
212
  {
213
- var t = M.get(e);
213
+ var t = V.get(e);
214
214
  if (t !== void 0)
215
215
  return t;
216
216
  }
217
217
  var n;
218
- K = !0;
218
+ X = !0;
219
219
  var o = Error.prepareStackTrace;
220
220
  Error.prepareStackTrace = void 0;
221
221
  var u;
222
- u = q.current, q.current = null, Me();
222
+ u = G.current, G.current = null, Le();
223
223
  try {
224
224
  if (r) {
225
225
  var i = function() {
@@ -232,55 +232,55 @@ function vr() {
232
232
  }), typeof Reflect == "object" && Reflect.construct) {
233
233
  try {
234
234
  Reflect.construct(i, []);
235
- } catch (_) {
236
- n = _;
235
+ } catch (b) {
236
+ n = b;
237
237
  }
238
238
  Reflect.construct(e, [], i);
239
239
  } else {
240
240
  try {
241
241
  i.call();
242
- } catch (_) {
243
- n = _;
242
+ } catch (b) {
243
+ n = b;
244
244
  }
245
245
  e.call(i.prototype);
246
246
  }
247
247
  } else {
248
248
  try {
249
249
  throw Error();
250
- } catch (_) {
251
- n = _;
250
+ } catch (b) {
251
+ n = b;
252
252
  }
253
253
  e();
254
254
  }
255
- } catch (_) {
256
- if (_ && n && typeof _.stack == "string") {
257
- for (var a = _.stack.split(`
258
- `), p = n.stack.split(`
259
- `), s = a.length - 1, f = p.length - 1; s >= 1 && f >= 0 && a[s] !== p[f]; )
260
- f--;
261
- for (; s >= 1 && f >= 0; s--, f--)
262
- if (a[s] !== p[f]) {
263
- if (s !== 1 || f !== 1)
255
+ } catch (b) {
256
+ if (b && n && typeof b.stack == "string") {
257
+ for (var a = b.stack.split(`
258
+ `), y = n.stack.split(`
259
+ `), d = a.length - 1, v = y.length - 1; d >= 1 && v >= 0 && a[d] !== y[v]; )
260
+ v--;
261
+ for (; d >= 1 && v >= 0; d--, v--)
262
+ if (a[d] !== y[v]) {
263
+ if (d !== 1 || v !== 1)
264
264
  do
265
- if (s--, f--, f < 0 || a[s] !== p[f]) {
266
- var g = `
267
- ` + a[s].replace(" at new ", " at ");
268
- return e.displayName && g.includes("<anonymous>") && (g = g.replace("<anonymous>", e.displayName)), typeof e == "function" && M.set(e, g), g;
265
+ if (d--, v--, v < 0 || a[d] !== y[v]) {
266
+ var E = `
267
+ ` + a[d].replace(" at new ", " at ");
268
+ return e.displayName && E.includes("<anonymous>") && (E = E.replace("<anonymous>", e.displayName)), typeof e == "function" && V.set(e, E), E;
269
269
  }
270
- while (s >= 1 && f >= 0);
270
+ while (d >= 1 && v >= 0);
271
271
  break;
272
272
  }
273
273
  }
274
274
  } finally {
275
- K = !1, q.current = u, Le(), Error.prepareStackTrace = o;
275
+ X = !1, G.current = u, Ue(), Error.prepareStackTrace = o;
276
276
  }
277
- var D = e ? e.displayName || e.name : "", w = D ? Y(D) : "";
278
- return typeof e == "function" && M.set(e, w), w;
277
+ var F = e ? e.displayName || e.name : "", k = F ? N(F) : "";
278
+ return typeof e == "function" && V.set(e, k), k;
279
279
  }
280
- function Ve(e, r, t) {
281
- return fe(e, !1);
280
+ function qe(e, r, t) {
281
+ return pe(e, !1);
282
282
  }
283
- function Ue(e) {
283
+ function Be(e) {
284
284
  var r = e.prototype;
285
285
  return !!(r && r.isReactComponent);
286
286
  }
@@ -288,20 +288,20 @@ function vr() {
288
288
  if (e == null)
289
289
  return "";
290
290
  if (typeof e == "function")
291
- return fe(e, Ue(e));
291
+ return pe(e, Be(e));
292
292
  if (typeof e == "string")
293
- return Y(e);
293
+ return N(e);
294
294
  switch (e) {
295
- case O:
296
- return Y("Suspense");
297
- case d:
298
- return Y("SuspenseList");
295
+ case R:
296
+ return N("Suspense");
297
+ case f:
298
+ return N("SuspenseList");
299
299
  }
300
300
  if (typeof e == "object")
301
301
  switch (e.$$typeof) {
302
- case l:
303
- return Ve(e.render);
304
- case b:
302
+ case c:
303
+ return qe(e.render);
304
+ case g:
305
305
  return L(e.type, r, t);
306
306
  case C: {
307
307
  var n = e, o = n._payload, u = n._init;
@@ -313,86 +313,86 @@ function vr() {
313
313
  }
314
314
  return "";
315
315
  }
316
- var F = Object.prototype.hasOwnProperty, ce = {}, de = x.ReactDebugCurrentFrame;
317
- function N(e) {
316
+ var I = Object.prototype.hasOwnProperty, me = {}, _e = S.ReactDebugCurrentFrame;
317
+ function U(e) {
318
318
  if (e) {
319
319
  var r = e._owner, t = L(e.type, e._source, r ? r.type : null);
320
- de.setExtraStackFrame(t);
320
+ _e.setExtraStackFrame(t);
321
321
  } else
322
- de.setExtraStackFrame(null);
322
+ _e.setExtraStackFrame(null);
323
323
  }
324
- function Je(e, r, t, n, o) {
324
+ function Ke(e, r, t, n, o) {
325
325
  {
326
- var u = Function.call.bind(F);
326
+ var u = Function.call.bind(I);
327
327
  for (var i in e)
328
328
  if (u(e, i)) {
329
329
  var a = void 0;
330
330
  try {
331
331
  if (typeof e[i] != "function") {
332
- var p = Error((n || "React class") + ": " + t + " type `" + i + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[i] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
333
- throw p.name = "Invariant Violation", p;
332
+ var y = Error((n || "React class") + ": " + t + " type `" + i + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[i] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
333
+ throw y.name = "Invariant Violation", y;
334
334
  }
335
335
  a = e[i](r, i, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
336
- } catch (s) {
337
- a = s;
336
+ } catch (d) {
337
+ a = d;
338
338
  }
339
- a && !(a instanceof Error) && (N(o), v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", n || "React class", t, i, typeof a), N(null)), a instanceof Error && !(a.message in ce) && (ce[a.message] = !0, N(o), v("Failed %s type: %s", t, a.message), N(null));
339
+ a && !(a instanceof Error) && (U(o), m("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", n || "React class", t, i, typeof a), U(null)), a instanceof Error && !(a.message in me) && (me[a.message] = !0, U(o), m("Failed %s type: %s", t, a.message), U(null));
340
340
  }
341
341
  }
342
342
  }
343
- var qe = Array.isArray;
344
- function G(e) {
345
- return qe(e);
343
+ var Ge = Array.isArray;
344
+ function H(e) {
345
+ return Ge(e);
346
346
  }
347
- function Be(e) {
347
+ function ze(e) {
348
348
  {
349
349
  var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
350
350
  return t;
351
351
  }
352
352
  }
353
- function Ke(e) {
353
+ function Xe(e) {
354
354
  try {
355
- return ve(e), !1;
355
+ return ye(e), !1;
356
356
  } catch {
357
357
  return !0;
358
358
  }
359
359
  }
360
- function ve(e) {
360
+ function ye(e) {
361
361
  return "" + e;
362
362
  }
363
- function pe(e) {
364
- if (Ke(e))
365
- return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Be(e)), ve(e);
363
+ function he(e) {
364
+ if (Xe(e))
365
+ return m("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ze(e)), ye(e);
366
366
  }
367
- var me = x.ReactCurrentOwner, Ge = {
367
+ var ge = S.ReactCurrentOwner, He = {
368
368
  key: !0,
369
369
  ref: !0,
370
370
  __self: !0,
371
371
  __source: !0
372
- }, _e, he;
373
- function ze(e) {
374
- if (F.call(e, "ref")) {
372
+ }, be, Ee;
373
+ function Ze(e) {
374
+ if (I.call(e, "ref")) {
375
375
  var r = Object.getOwnPropertyDescriptor(e, "ref").get;
376
376
  if (r && r.isReactWarning)
377
377
  return !1;
378
378
  }
379
379
  return e.ref !== void 0;
380
380
  }
381
- function Xe(e) {
382
- if (F.call(e, "key")) {
381
+ function Qe(e) {
382
+ if (I.call(e, "key")) {
383
383
  var r = Object.getOwnPropertyDescriptor(e, "key").get;
384
384
  if (r && r.isReactWarning)
385
385
  return !1;
386
386
  }
387
387
  return e.key !== void 0;
388
388
  }
389
- function He(e, r) {
390
- typeof e.ref == "string" && me.current;
389
+ function er(e, r) {
390
+ typeof e.ref == "string" && ge.current;
391
391
  }
392
- function Ze(e, r) {
392
+ function rr(e, r) {
393
393
  {
394
394
  var t = function() {
395
- _e || (_e = !0, v("%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://reactjs.org/link/special-props)", r));
395
+ be || (be = !0, m("%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://reactjs.org/link/special-props)", r));
396
396
  };
397
397
  t.isReactWarning = !0, Object.defineProperty(e, "key", {
398
398
  get: t,
@@ -400,10 +400,10 @@ function vr() {
400
400
  });
401
401
  }
402
402
  }
403
- function Qe(e, r) {
403
+ function tr(e, r) {
404
404
  {
405
405
  var t = function() {
406
- he || (he = !0, v("%s: `ref` 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://reactjs.org/link/special-props)", r));
406
+ Ee || (Ee = !0, m("%s: `ref` 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://reactjs.org/link/special-props)", r));
407
407
  };
408
408
  t.isReactWarning = !0, Object.defineProperty(e, "ref", {
409
409
  get: t,
@@ -411,10 +411,10 @@ function vr() {
411
411
  });
412
412
  }
413
413
  }
414
- var er = function(e, r, t, n, o, u, i) {
414
+ var nr = function(e, r, t, n, o, u, i) {
415
415
  var a = {
416
416
  // This tag allows us to uniquely identify this as a React Element
417
- $$typeof: c,
417
+ $$typeof: l,
418
418
  // Built-in properties that belong on the element
419
419
  type: e,
420
420
  key: r,
@@ -440,41 +440,41 @@ function vr() {
440
440
  value: o
441
441
  }), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
442
442
  };
443
- function rr(e, r, t, n, o) {
443
+ function ar(e, r, t, n, o) {
444
444
  {
445
- var u, i = {}, a = null, p = null;
446
- t !== void 0 && (pe(t), a = "" + t), Xe(r) && (pe(r.key), a = "" + r.key), ze(r) && (p = r.ref, He(r, o));
445
+ var u, i = {}, a = null, y = null;
446
+ t !== void 0 && (he(t), a = "" + t), Qe(r) && (he(r.key), a = "" + r.key), Ze(r) && (y = r.ref, er(r, o));
447
447
  for (u in r)
448
- F.call(r, u) && !Ge.hasOwnProperty(u) && (i[u] = r[u]);
448
+ I.call(r, u) && !He.hasOwnProperty(u) && (i[u] = r[u]);
449
449
  if (e && e.defaultProps) {
450
- var s = e.defaultProps;
451
- for (u in s)
452
- i[u] === void 0 && (i[u] = s[u]);
450
+ var d = e.defaultProps;
451
+ for (u in d)
452
+ i[u] === void 0 && (i[u] = d[u]);
453
453
  }
454
- if (a || p) {
455
- var f = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
456
- a && Ze(i, f), p && Qe(i, f);
454
+ if (a || y) {
455
+ var v = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
456
+ a && rr(i, v), y && tr(i, v);
457
457
  }
458
- return er(e, a, p, o, n, me.current, i);
458
+ return nr(e, a, y, o, n, ge.current, i);
459
459
  }
460
460
  }
461
- var z = x.ReactCurrentOwner, ge = x.ReactDebugCurrentFrame;
462
- function k(e) {
461
+ var Z = S.ReactCurrentOwner, Re = S.ReactDebugCurrentFrame;
462
+ function A(e) {
463
463
  if (e) {
464
464
  var r = e._owner, t = L(e.type, e._source, r ? r.type : null);
465
- ge.setExtraStackFrame(t);
465
+ Re.setExtraStackFrame(t);
466
466
  } else
467
- ge.setExtraStackFrame(null);
467
+ Re.setExtraStackFrame(null);
468
468
  }
469
- var X;
470
- X = !1;
471
- function H(e) {
472
- return typeof e == "object" && e !== null && e.$$typeof === c;
469
+ var Q;
470
+ Q = !1;
471
+ function ee(e) {
472
+ return typeof e == "object" && e !== null && e.$$typeof === l;
473
473
  }
474
- function ye() {
474
+ function Te() {
475
475
  {
476
- if (z.current) {
477
- var e = R(z.current.type);
476
+ if (Z.current) {
477
+ var e = j(Z.current.type);
478
478
  if (e)
479
479
  return `
480
480
 
@@ -483,13 +483,13 @@ Check the render method of \`` + e + "`.";
483
483
  return "";
484
484
  }
485
485
  }
486
- function tr(e) {
486
+ function ir(e) {
487
487
  return "";
488
488
  }
489
- var be = {};
490
- function nr(e) {
489
+ var Oe = {};
490
+ function or(e) {
491
491
  {
492
- var r = ye();
492
+ var r = Te();
493
493
  if (!r) {
494
494
  var t = typeof e == "string" ? e : e.displayName || e.name;
495
495
  t && (r = `
@@ -499,39 +499,39 @@ Check the top-level render call using <` + t + ">.");
499
499
  return r;
500
500
  }
501
501
  }
502
- function Ee(e, r) {
502
+ function we(e, r) {
503
503
  {
504
504
  if (!e._store || e._store.validated || e.key != null)
505
505
  return;
506
506
  e._store.validated = !0;
507
- var t = nr(r);
508
- if (be[t])
507
+ var t = or(r);
508
+ if (Oe[t])
509
509
  return;
510
- be[t] = !0;
510
+ Oe[t] = !0;
511
511
  var n = "";
512
- e && e._owner && e._owner !== z.current && (n = " It was passed a child from " + R(e._owner.type) + "."), k(e), v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), k(null);
512
+ e && e._owner && e._owner !== Z.current && (n = " It was passed a child from " + j(e._owner.type) + "."), A(e), m('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), A(null);
513
513
  }
514
514
  }
515
- function Re(e, r) {
515
+ function Ce(e, r) {
516
516
  {
517
517
  if (typeof e != "object")
518
518
  return;
519
- if (G(e))
519
+ if (H(e))
520
520
  for (var t = 0; t < e.length; t++) {
521
521
  var n = e[t];
522
- H(n) && Ee(n, r);
522
+ ee(n) && we(n, r);
523
523
  }
524
- else if (H(e))
524
+ else if (ee(e))
525
525
  e._store && (e._store.validated = !0);
526
526
  else if (e) {
527
- var o = xe(e);
527
+ var o = ne(e);
528
528
  if (typeof o == "function" && o !== e.entries)
529
529
  for (var u = o.call(e), i; !(i = u.next()).done; )
530
- H(i.value) && Ee(i.value, r);
530
+ ee(i.value) && we(i.value, r);
531
531
  }
532
532
  }
533
533
  }
534
- function ar(e) {
534
+ function ur(e) {
535
535
  {
536
536
  var r = e.type;
537
537
  if (r == null || typeof r == "string")
@@ -539,122 +539,151 @@ Check the top-level render call using <` + t + ">.");
539
539
  var t;
540
540
  if (typeof r == "function")
541
541
  t = r.propTypes;
542
- else if (typeof r == "object" && (r.$$typeof === l || // Note: Memo only checks outer props here.
542
+ else if (typeof r == "object" && (r.$$typeof === c || // Note: Memo only checks outer props here.
543
543
  // Inner props are checked in the reconciler.
544
- r.$$typeof === b))
544
+ r.$$typeof === g))
545
545
  t = r.propTypes;
546
546
  else
547
547
  return;
548
548
  if (t) {
549
- var n = R(r);
550
- Je(t, e.props, "prop", n, e);
551
- } else if (r.PropTypes !== void 0 && !X) {
552
- X = !0;
553
- var o = R(r);
554
- v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", o || "Unknown");
549
+ var n = j(r);
550
+ Ke(t, e.props, "prop", n, e);
551
+ } else if (r.PropTypes !== void 0 && !Q) {
552
+ Q = !0;
553
+ var o = j(r);
554
+ m("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", o || "Unknown");
555
555
  }
556
- typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
556
+ typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && m("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
557
557
  }
558
558
  }
559
- function ir(e) {
559
+ function sr(e) {
560
560
  {
561
561
  for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
562
562
  var n = r[t];
563
563
  if (n !== "children" && n !== "key") {
564
- k(e), v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), k(null);
564
+ A(e), m("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), A(null);
565
565
  break;
566
566
  }
567
567
  }
568
- e.ref !== null && (k(e), v("Invalid attribute `ref` supplied to `React.Fragment`."), k(null));
568
+ e.ref !== null && (A(e), m("Invalid attribute `ref` supplied to `React.Fragment`."), A(null));
569
569
  }
570
570
  }
571
- var Te = {};
572
- function Oe(e, r, t, n, o, u) {
571
+ var Se = {};
572
+ function je(e, r, t, n, o, u) {
573
573
  {
574
- var i = We(e);
574
+ var i = Ne(e);
575
575
  if (!i) {
576
576
  var a = "";
577
577
  (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (a += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
578
- var p = tr();
579
- p ? a += p : a += ye();
580
- var s;
581
- e === null ? s = "null" : G(e) ? s = "array" : e !== void 0 && e.$$typeof === c ? (s = "<" + (R(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : s = typeof e, v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", s, a);
578
+ var y = ir();
579
+ y ? a += y : a += Te();
580
+ var d;
581
+ e === null ? d = "null" : H(e) ? d = "array" : e !== void 0 && e.$$typeof === l ? (d = "<" + (j(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : d = typeof e, m("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", d, a);
582
582
  }
583
- var f = rr(e, r, t, o, u);
584
- if (f == null)
585
- return f;
583
+ var v = ar(e, r, t, o, u);
584
+ if (v == null)
585
+ return v;
586
586
  if (i) {
587
- var g = r.children;
588
- if (g !== void 0)
587
+ var E = r.children;
588
+ if (E !== void 0)
589
589
  if (n)
590
- if (G(g)) {
591
- for (var D = 0; D < g.length; D++)
592
- Re(g[D], e);
593
- Object.freeze && Object.freeze(g);
590
+ if (H(E)) {
591
+ for (var F = 0; F < E.length; F++)
592
+ Ce(E[F], e);
593
+ Object.freeze && Object.freeze(E);
594
594
  } else
595
- v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
595
+ m("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
596
596
  else
597
- Re(g, e);
597
+ Ce(E, e);
598
598
  }
599
- if (F.call(r, "key")) {
600
- var w = R(e), _ = Object.keys(r).filter(function(cr) {
601
- return cr !== "key";
602
- }), Z = _.length > 0 ? "{key: someKey, " + _.join(": ..., ") + ": ...}" : "{key: someKey}";
603
- if (!Te[w + Z]) {
604
- var fr = _.length > 0 ? "{" + _.join(": ..., ") + ": ...}" : "{}";
605
- v(`A props object containing a "key" prop is being spread into JSX:
599
+ if (I.call(r, "key")) {
600
+ var k = j(e), b = Object.keys(r).filter(function(pr) {
601
+ return pr !== "key";
602
+ }), re = b.length > 0 ? "{key: someKey, " + b.join(": ..., ") + ": ...}" : "{key: someKey}";
603
+ if (!Se[k + re]) {
604
+ var vr = b.length > 0 ? "{" + b.join(": ..., ") + ": ...}" : "{}";
605
+ m(`A props object containing a "key" prop is being spread into JSX:
606
606
  let props = %s;
607
607
  <%s {...props} />
608
608
  React keys must be passed directly to JSX without using spread:
609
609
  let props = %s;
610
- <%s key={someKey} {...props} />`, Z, w, fr, w), Te[w + Z] = !0;
610
+ <%s key={someKey} {...props} />`, re, k, vr, k), Se[k + re] = !0;
611
611
  }
612
612
  }
613
- return e === y ? ir(f) : ar(f), f;
613
+ return e === p ? sr(v) : ur(v), v;
614
614
  }
615
615
  }
616
- function or(e, r, t) {
617
- return Oe(e, r, t, !0);
616
+ function lr(e, r, t) {
617
+ return je(e, r, t, !0);
618
618
  }
619
- function ur(e, r, t) {
620
- return Oe(e, r, t, !1);
619
+ function cr(e, r, t) {
620
+ return je(e, r, t, !1);
621
621
  }
622
- var sr = ur, lr = or;
623
- $.Fragment = y, $.jsx = sr, $.jsxs = lr;
624
- })()), $;
622
+ var fr = cr, dr = lr;
623
+ Y.Fragment = p, Y.jsx = fr, Y.jsxs = dr;
624
+ })()), Y;
625
625
  }
626
- var we;
627
- function pr() {
628
- return we || (we = 1, process.env.NODE_ENV === "production" ? V.exports = dr() : V.exports = vr()), V.exports;
626
+ var ke;
627
+ function yr() {
628
+ return ke || (ke = 1, process.env.NODE_ENV === "production" ? J.exports = mr() : J.exports = _r()), J.exports;
629
629
  }
630
- var U = pr();
631
- const mr = "_timeline_160ei_1", J = {
632
- timeline: mr,
633
- "timeline-items": "_timeline-items_160ei_6",
634
- "timeline-item": "_timeline-item_160ei_6",
635
- "timeline-indicator": "_timeline-indicator_160ei_23"
630
+ var P = yr();
631
+ const hr = "_timeline_100yd_1", q = {
632
+ timeline: hr,
633
+ "timeline-items": "_timeline-items_100yd_6",
634
+ "timeline-item": "_timeline-item_100yd_6",
635
+ "timeline-indicator": "_timeline-indicator_100yd_24"
636
636
  };
637
- function _r() {
638
- var m = Math.floor(156 + Math.random() * 100), c = Math.floor(156 + Math.random() * 100), E = Math.floor(156 + Math.random() * 100);
639
- return "rgb(" + m + "," + c + "," + E + ")";
637
+ function Ae() {
638
+ var s = Math.floor(120 + Math.random() * 91), l = Math.floor(120 + Math.random() * 91), _ = Math.floor(120 + Math.random() * 91);
639
+ return `rgb(${s},${l},${_})`;
640
640
  }
641
- function hr(m, c) {
642
- return c === m.length - 1 ? m[c] - m[c - 1] : m[c + 1] - m[c];
641
+ function te(s, l) {
642
+ return l === s.length - 1 ? s[l] - s[l - 1] : s[l + 1] - s[l];
643
643
  }
644
- const gr = new Array(10).fill(0).map(_r);
645
- function br({ items: m, currentTime: c, totalTime: E, scale: y = 1, indicator: P, itemStyle: j }) {
646
- const T = m.map((h) => h.time);
647
- return U.jsxs("div", { className: J.timeline, children: [U.jsx("div", { className: J["timeline-indicator"], ...P }), U.jsx("div", { className: J["timeline-items"], style: {
648
- "--translate": `${y * 50 / y - c / E * y * 100}%`
649
- }, children: m.map((h, l) => {
650
- const d = hr(T, l) / E * y * 100 + "%";
651
- return U.jsx("span", { className: J["timeline-item"], style: {
652
- "--bg": h.style?.background || gr[l > 10 ? l % 10 : l],
653
- width: d,
654
- ...j
644
+ function gr(s, l, _ = 1) {
645
+ return l + _ >= s.length ? s.at(-1) : s[l + _];
646
+ }
647
+ const br = new Array(20).fill(0).map(Ae);
648
+ function Or({ items: s, currentTime: l, totalTime: _, scale: p = 1, indicator: O, itemStyle: w }) {
649
+ const T = s.map((h) => h.time);
650
+ return P.jsxs("div", { className: q.timeline, children: [P.jsx("div", { className: q["timeline-indicator"], ...O }), P.jsx("div", { className: q["timeline-items"], style: {
651
+ "--translate": `${p * 50 / p - l / _ * p * 100}%`
652
+ }, children: s.map((h, c) => {
653
+ const f = te(T, c) / _ * p * 100 + "%";
654
+ return P.jsx("span", { className: q["timeline-item"], style: {
655
+ "--bg": h.style?.background || br[c % 20],
656
+ width: f,
657
+ left: f,
658
+ ...w
655
659
  }, children: h.content });
656
660
  }) })] });
657
661
  }
662
+ const Er = "_timeline_212s7_1", B = {
663
+ timeline: Er,
664
+ "timeline-items": "_timeline-items_212s7_6",
665
+ "timeline-item": "_timeline-item_212s7_6",
666
+ "timeline-indicator": "_timeline-indicator_212s7_20"
667
+ }, Rr = new Array(20).fill(0).map(Ae);
668
+ function wr({ items: s, currentTime: l, totalTime: _, scale: p = 1, indicator: O, itemStyle: w, prev: T = 2, height: h, left: c = 10 }) {
669
+ const R = s.map((f) => f.time);
670
+ return P.jsxs("div", { className: B.timeline, style: { height: h }, children: [P.jsx("div", { className: B["timeline-indicator"], ...O, style: { left: `${c}%` } }), P.jsx("div", { className: B["timeline-items"], style: {
671
+ "--translate": `${p * c / p - l / _ * p * 100}%`
672
+ }, children: s.map((f, g) => {
673
+ const D = te(R, g) / _ * p * 100 + "%", M = s.slice(0, g).reduce((K, ne, S) => {
674
+ const m = te(R, S);
675
+ return K + m / _ * p * 100;
676
+ }, 0) + "%";
677
+ if (l <= gr(s, g, T).time)
678
+ return P.jsx("div", { className: B["timeline-item"], style: {
679
+ "--bg": f.style?.background || Rr[g % 20],
680
+ width: D,
681
+ left: M,
682
+ ...w
683
+ }, children: f.content });
684
+ }) })] });
685
+ }
658
686
  export {
659
- br as default
687
+ wr as Vertical,
688
+ Or as default
660
689
  };
package/dist/utils.d.ts CHANGED
@@ -1,2 +1,18 @@
1
+ import { CSSProperties, HTMLAttributes, ReactNode } from "react";
1
2
  export declare function randomRGBColor(): string;
2
3
  export declare function getDuration(timeline: number[], i: number): number;
4
+ export declare function getPrevElement<T>(item: T[], i: number, number?: number): T;
5
+ export declare function getNextElement<T>(item: T[], i: number, number?: number): T;
6
+ export interface PropsType {
7
+ items: itemsType[];
8
+ itemStyle?: CSSProperties;
9
+ currentTime: number;
10
+ totalTime: number;
11
+ scale?: number;
12
+ indicator?: HTMLAttributes<HTMLDivElement>;
13
+ }
14
+ export interface itemsType {
15
+ time: number;
16
+ style?: CSSProperties;
17
+ content?: ReactNode;
18
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-av-timeline",
3
- "version": "1.1.3",
3
+ "version": "1.2.0",
4
4
  "description": "React 音视频时间线组件",
5
5
  "type": "module",
6
6
  "files": [
@@ -1,30 +0,0 @@
1
- (function(O,E){typeof exports=="object"&&typeof module<"u"?module.exports=E(require("react")):typeof define=="function"&&define.amd?define(["react"],E):(O=typeof globalThis<"u"?globalThis:O||self,O.index=E(O.react))})(this,(function(O){"use strict";var E={exports:{}},I={};/**
2
- * @license React
3
- * react-jsx-runtime.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var ee;function je(){if(ee)return I;ee=1;var m=O,c=Symbol.for("react.element"),R=Symbol.for("react.fragment"),y=Object.prototype.hasOwnProperty,x=m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,k={key:!0,ref:!0,__self:!0,__source:!0};function C(_,l,S){var d,b={},w=null,N=null;S!==void 0&&(w=""+S),l.key!==void 0&&(w=""+l.key),l.ref!==void 0&&(N=l.ref);for(d in l)y.call(l,d)&&!k.hasOwnProperty(d)&&(b[d]=l[d]);if(_&&_.defaultProps)for(d in l=_.defaultProps,l)b[d]===void 0&&(b[d]=l[d]);return{$$typeof:c,type:_,key:w,ref:N,props:b,_owner:x.current}}return I.Fragment=R,I.jsx=C,I.jsxs=C,I}var W={};/**
10
- * @license React
11
- * react-jsx-runtime.development.js
12
- *
13
- * Copyright (c) Facebook, Inc. and its affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var re;function xe(){return re||(re=1,process.env.NODE_ENV!=="production"&&(function(){var m=O,c=Symbol.for("react.element"),R=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),C=Symbol.for("react.provider"),_=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),b=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),N=Symbol.for("react.offscreen"),ne=Symbol.iterator,We="@@iterator";function Ye(e){if(e===null||typeof e!="object")return null;var r=ne&&e[ne]||e[We];return typeof r=="function"?r:null}var D=m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function v(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];Me("error",e,t)}}function Me(e,r,t){{var n=D.ReactDebugCurrentFrame,o=n.getStackAddendum();o!==""&&(r+="%s",t=t.concat([o]));var u=t.map(function(i){return String(i)});u.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,u)}}var $e=!1,Le=!1,Ne=!1,Ve=!1,Ue=!1,ae;ae=Symbol.for("react.module.reference");function Je(e){return!!(typeof e=="string"||typeof e=="function"||e===y||e===k||Ue||e===x||e===S||e===d||Ve||e===N||$e||Le||Ne||typeof e=="object"&&e!==null&&(e.$$typeof===w||e.$$typeof===b||e.$$typeof===C||e.$$typeof===_||e.$$typeof===l||e.$$typeof===ae||e.getModuleId!==void 0))}function Be(e,r,t){var n=e.displayName;if(n)return n;var o=r.displayName||r.name||"";return o!==""?t+"("+o+")":t}function ie(e){return e.displayName||"Context"}function T(e){if(e==null)return null;if(typeof e.tag=="number"&&v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case y:return"Fragment";case R:return"Portal";case k:return"Profiler";case x:return"StrictMode";case S:return"Suspense";case d:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case _:var r=e;return ie(r)+".Consumer";case C:var t=e;return ie(t._context)+".Provider";case l:return Be(e,e.render,"ForwardRef");case b:var n=e.displayName||null;return n!==null?n:T(e.type)||"Memo";case w:{var o=e,u=o._payload,i=o._init;try{return T(i(u))}catch{return null}}}return null}var P=Object.assign,Y=0,oe,ue,se,le,fe,ce,de;function ve(){}ve.__reactDisabledLog=!0;function qe(){{if(Y===0){oe=console.log,ue=console.info,se=console.warn,le=console.error,fe=console.group,ce=console.groupCollapsed,de=console.groupEnd;var e={configurable:!0,enumerable:!0,value:ve,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}Y++}}function Ke(){{if(Y--,Y===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:P({},e,{value:oe}),info:P({},e,{value:ue}),warn:P({},e,{value:se}),error:P({},e,{value:le}),group:P({},e,{value:fe}),groupCollapsed:P({},e,{value:ce}),groupEnd:P({},e,{value:de})})}Y<0&&v("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var q=D.ReactCurrentDispatcher,K;function V(e,r,t){{if(K===void 0)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);K=n&&n[1]||""}return`
18
- `+K+e}}var G=!1,U;{var Ge=typeof WeakMap=="function"?WeakMap:Map;U=new Ge}function pe(e,r){if(!e||G)return"";{var t=U.get(e);if(t!==void 0)return t}var n;G=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var u;u=q.current,q.current=null,qe();try{if(r){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(h){n=h}Reflect.construct(e,[],i)}else{try{i.call()}catch(h){n=h}e.call(i.prototype)}}else{try{throw Error()}catch(h){n=h}e()}}catch(h){if(h&&n&&typeof h.stack=="string"){for(var a=h.stack.split(`
19
- `),p=n.stack.split(`
20
- `),s=a.length-1,f=p.length-1;s>=1&&f>=0&&a[s]!==p[f];)f--;for(;s>=1&&f>=0;s--,f--)if(a[s]!==p[f]){if(s!==1||f!==1)do if(s--,f--,f<0||a[s]!==p[f]){var g=`
21
- `+a[s].replace(" at new "," at ");return e.displayName&&g.includes("<anonymous>")&&(g=g.replace("<anonymous>",e.displayName)),typeof e=="function"&&U.set(e,g),g}while(s>=1&&f>=0);break}}}finally{G=!1,q.current=u,Ke(),Error.prepareStackTrace=o}var F=e?e.displayName||e.name:"",j=F?V(F):"";return typeof e=="function"&&U.set(e,j),j}function ze(e,r,t){return pe(e,!1)}function Xe(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function J(e,r,t){if(e==null)return"";if(typeof e=="function")return pe(e,Xe(e));if(typeof e=="string")return V(e);switch(e){case S:return V("Suspense");case d:return V("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case l:return ze(e.render);case b:return J(e.type,r,t);case w:{var n=e,o=n._payload,u=n._init;try{return J(u(o),r,t)}catch{}}}return""}var M=Object.prototype.hasOwnProperty,me={},he=D.ReactDebugCurrentFrame;function B(e){if(e){var r=e._owner,t=J(e.type,e._source,r?r.type:null);he.setExtraStackFrame(t)}else he.setExtraStackFrame(null)}function He(e,r,t,n,o){{var u=Function.call.bind(M);for(var i in e)if(u(e,i)){var a=void 0;try{if(typeof e[i]!="function"){var p=Error((n||"React class")+": "+t+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}a=e[i](r,i,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(s){a=s}a&&!(a instanceof Error)&&(B(o),v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",t,i,typeof a),B(null)),a instanceof Error&&!(a.message in me)&&(me[a.message]=!0,B(o),v("Failed %s type: %s",t,a.message),B(null))}}}var Ze=Array.isArray;function z(e){return Ze(e)}function Qe(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function er(e){try{return _e(e),!1}catch{return!0}}function _e(e){return""+e}function ge(e){if(er(e))return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Qe(e)),_e(e)}var ye=D.ReactCurrentOwner,rr={key:!0,ref:!0,__self:!0,__source:!0},be,Ee;function tr(e){if(M.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function nr(e){if(M.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function ar(e,r){typeof e.ref=="string"&&ye.current}function ir(e,r){{var t=function(){be||(be=!0,v("%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://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function or(e,r){{var t=function(){Ee||(Ee=!0,v("%s: `ref` 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://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var ur=function(e,r,t,n,o,u,i){var a={$$typeof:c,type:e,key:r,ref:t,props:i,_owner:u};return a._store={},Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(a,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(a,"_source",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function sr(e,r,t,n,o){{var u,i={},a=null,p=null;t!==void 0&&(ge(t),a=""+t),nr(r)&&(ge(r.key),a=""+r.key),tr(r)&&(p=r.ref,ar(r,o));for(u in r)M.call(r,u)&&!rr.hasOwnProperty(u)&&(i[u]=r[u]);if(e&&e.defaultProps){var s=e.defaultProps;for(u in s)i[u]===void 0&&(i[u]=s[u])}if(a||p){var f=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&ir(i,f),p&&or(i,f)}return ur(e,a,p,o,n,ye.current,i)}}var X=D.ReactCurrentOwner,Re=D.ReactDebugCurrentFrame;function A(e){if(e){var r=e._owner,t=J(e.type,e._source,r?r.type:null);Re.setExtraStackFrame(t)}else Re.setExtraStackFrame(null)}var H;H=!1;function Z(e){return typeof e=="object"&&e!==null&&e.$$typeof===c}function Te(){{if(X.current){var e=T(X.current.type);if(e)return`
22
-
23
- Check the render method of \``+e+"`."}return""}}function lr(e){return""}var Oe={};function fr(e){{var r=Te();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
24
-
25
- Check the top-level render call using <`+t+">.")}return r}}function Ce(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=fr(r);if(Oe[t])return;Oe[t]=!0;var n="";e&&e._owner&&e._owner!==X.current&&(n=" It was passed a child from "+T(e._owner.type)+"."),A(e),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,n),A(null)}}function Se(e,r){{if(typeof e!="object")return;if(z(e))for(var t=0;t<e.length;t++){var n=e[t];Z(n)&&Ce(n,r)}else if(Z(e))e._store&&(e._store.validated=!0);else if(e){var o=Ye(e);if(typeof o=="function"&&o!==e.entries)for(var u=o.call(e),i;!(i=u.next()).done;)Z(i.value)&&Ce(i.value,r)}}}function cr(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===l||r.$$typeof===b))t=r.propTypes;else return;if(t){var n=T(r);He(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!H){H=!0;var o=T(r);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",o||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function dr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){A(e),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),A(null);break}}e.ref!==null&&(A(e),v("Invalid attribute `ref` supplied to `React.Fragment`."),A(null))}}var we={};function Pe(e,r,t,n,o,u){{var i=Je(e);if(!i){var a="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(a+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var p=lr();p?a+=p:a+=Te();var s;e===null?s="null":z(e)?s="array":e!==void 0&&e.$$typeof===c?(s="<"+(T(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):s=typeof e,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",s,a)}var f=sr(e,r,t,o,u);if(f==null)return f;if(i){var g=r.children;if(g!==void 0)if(n)if(z(g)){for(var F=0;F<g.length;F++)Se(g[F],e);Object.freeze&&Object.freeze(g)}else v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Se(g,e)}if(M.call(r,"key")){var j=T(e),h=Object.keys(r).filter(function(gr){return gr!=="key"}),Q=h.length>0?"{key: someKey, "+h.join(": ..., ")+": ...}":"{key: someKey}";if(!we[j+Q]){var _r=h.length>0?"{"+h.join(": ..., ")+": ...}":"{}";v(`A props object containing a "key" prop is being spread into JSX:
26
- let props = %s;
27
- <%s {...props} />
28
- React keys must be passed directly to JSX without using spread:
29
- let props = %s;
30
- <%s key={someKey} {...props} />`,Q,j,_r,j),we[j+Q]=!0}}return e===y?dr(f):cr(f),f}}function vr(e,r,t){return Pe(e,r,t,!0)}function pr(e,r,t){return Pe(e,r,t,!1)}var mr=pr,hr=vr;W.Fragment=y,W.jsx=mr,W.jsxs=hr})()),W}var te;function ke(){return te||(te=1,process.env.NODE_ENV==="production"?E.exports=je():E.exports=xe()),E.exports}var $=ke();const L={timeline:"_timeline_160ei_1","timeline-items":"_timeline-items_160ei_6","timeline-item":"_timeline-item_160ei_6","timeline-indicator":"_timeline-indicator_160ei_23"};function De(){var m=Math.floor(156+Math.random()*100),c=Math.floor(156+Math.random()*100),R=Math.floor(156+Math.random()*100);return"rgb("+m+","+c+","+R+")"}function Ae(m,c){return c===m.length-1?m[c]-m[c-1]:m[c+1]-m[c]}const Fe=new Array(10).fill(0).map(De);function Ie({items:m,currentTime:c,totalTime:R,scale:y=1,indicator:x,itemStyle:k}){const C=m.map(_=>_.time);return $.jsxs("div",{className:L.timeline,children:[$.jsx("div",{className:L["timeline-indicator"],...x}),$.jsx("div",{className:L["timeline-items"],style:{"--translate":`${y*50/y-c/R*y*100}%`},children:m.map((_,l)=>{const d=Ae(C,l)/R*y*100+"%";return $.jsx("span",{className:L["timeline-item"],style:{"--bg":_.style?.background||Fe[l>10?l%10:l],width:d,...k},children:_.content})})})]})}return Ie}));