@halibegic/react-video-player 0.0.31 → 0.0.33

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 (26) hide show
  1. package/dist/components/live-player/live-player-event-check.d.ts +4 -3
  2. package/dist/components/live-player/live-player-event-listener.d.ts +3 -0
  3. package/dist/components/live-player/live-player-tech.d.ts +4 -1
  4. package/dist/components/live-player/ui/live-player-gestures.d.ts +2 -0
  5. package/dist/components/player/player-event-listener.d.ts +1 -0
  6. package/dist/components/player/player-hls-engine.d.ts +4 -1
  7. package/dist/components/player/player-tech.d.ts +4 -1
  8. package/dist/components/player/ui/player-gestures.d.ts +9 -0
  9. package/dist/components/vod-player/ui/vod-player-gestures.d.ts +2 -0
  10. package/dist/components/vod-player/vod-player-event-listener.d.ts +3 -0
  11. package/dist/react-video-player.es.js +1193 -964
  12. package/dist/react-video-player.es.js.map +1 -1
  13. package/dist/react-video-player.umd.js +10 -10
  14. package/dist/react-video-player.umd.js.map +1 -1
  15. package/dist/stores/player-store.d.ts +10 -1
  16. package/dist/style.css +1 -1
  17. package/dist/types/player.d.ts +16 -15
  18. package/dist/utils/device.d.ts +2 -1
  19. package/package.json +1 -3
  20. package/dist/components/live-player/ui/live-player-desktop-playback-indicator.d.ts +0 -2
  21. package/dist/components/player/ui/player-controls.styles.d.ts +0 -16
  22. package/dist/components/player/ui/player-desktop-playback-indicator.d.ts +0 -4
  23. package/dist/components/player/ui/player-notice.styles.d.ts +0 -6
  24. package/dist/components/player/ui/player-progress.styles.d.ts +0 -8
  25. package/dist/components/player/ui/player-remaining-time.styles.d.ts +0 -6
  26. package/dist/components/vod-player/ui/vod-player-desktop-playback-indicator.d.ts +0 -2
@@ -1,32 +1,31 @@
1
- var Zn = Object.defineProperty, qn = Object.defineProperties;
2
- var Yn = Object.getOwnPropertyDescriptors;
3
- var Ee = Object.getOwnPropertySymbols;
4
- var vt = Object.prototype.hasOwnProperty, pt = Object.prototype.propertyIsEnumerable;
5
- var mt = (e, t, n) => t in e ? Zn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, j = (e, t) => {
1
+ var Dn = Object.defineProperty, Fn = Object.defineProperties;
2
+ var Mn = Object.getOwnPropertyDescriptors;
3
+ var Se = Object.getOwnPropertySymbols;
4
+ var ht = Object.prototype.hasOwnProperty, mt = Object.prototype.propertyIsEnumerable;
5
+ var ft = (e, t, n) => t in e ? Dn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, b = (e, t) => {
6
6
  for (var n in t || (t = {}))
7
- vt.call(t, n) && mt(e, n, t[n]);
8
- if (Ee)
9
- for (var n of Ee(t))
10
- pt.call(t, n) && mt(e, n, t[n]);
7
+ ht.call(t, n) && ft(e, n, t[n]);
8
+ if (Se)
9
+ for (var n of Se(t))
10
+ mt.call(t, n) && ft(e, n, t[n]);
11
11
  return e;
12
- }, he = (e, t) => qn(e, Yn(t));
13
- var G = (e, t) => {
12
+ }, ve = (e, t) => Fn(e, Mn(t));
13
+ var ne = (e, t) => {
14
14
  var n = {};
15
15
  for (var o in e)
16
- vt.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
17
- if (e != null && Ee)
18
- for (var o of Ee(e))
19
- t.indexOf(o) < 0 && pt.call(e, o) && (n[o] = e[o]);
16
+ ht.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
17
+ if (e != null && Se)
18
+ for (var o of Se(e))
19
+ t.indexOf(o) < 0 && mt.call(e, o) && (n[o] = e[o]);
20
20
  return n;
21
21
  };
22
- import Pt, { useLayoutEffect as Kn, useEffect as V, useRef as A, useState as U, createContext as Lt, useContext as jt, useCallback as M, forwardRef as De } from "react";
23
- import { create as bt, useStore as kt } from "zustand";
24
- import { toZonedTime as Xn } from "date-fns-tz";
25
- import Jn from "mitt";
26
- import K from "hls.js";
27
- import * as Te from "@radix-ui/react-slider";
28
- import * as ye from "@radix-ui/react-dropdown-menu";
29
- function Dt(e) {
22
+ import Et, { useLayoutEffect as Nn, useEffect as N, useRef as H, useState as X, createContext as Rt, useContext as St, useCallback as U, forwardRef as De } from "react";
23
+ import { create as Pt, useStore as Lt } from "zustand";
24
+ import Vn from "mitt";
25
+ import re from "hls.js";
26
+ import * as Pe from "@radix-ui/react-slider";
27
+ import * as Ce from "@radix-ui/react-dropdown-menu";
28
+ function bt(e) {
30
29
  var t = this.constructor;
31
30
  return this.then(
32
31
  function(n) {
@@ -41,7 +40,7 @@ function Dt(e) {
41
40
  }
42
41
  );
43
42
  }
44
- function It(e) {
43
+ function jt(e) {
45
44
  var t = this;
46
45
  return new t(function(n, o) {
47
46
  if (!(e && typeof e.length != "undefined"))
@@ -53,33 +52,33 @@ function It(e) {
53
52
  var s = Array.prototype.slice.call(e);
54
53
  if (s.length === 0) return n([]);
55
54
  var l = s.length;
56
- function u(c, h) {
57
- if (h && (typeof h == "object" || typeof h == "function")) {
58
- var v = h.then;
59
- if (typeof v == "function") {
60
- v.call(
61
- h,
62
- function(C) {
63
- u(c, C);
55
+ function u(c, d) {
56
+ if (d && (typeof d == "object" || typeof d == "function")) {
57
+ var g = d.then;
58
+ if (typeof g == "function") {
59
+ g.call(
60
+ d,
61
+ function(y) {
62
+ u(c, y);
64
63
  },
65
- function(C) {
66
- s[c] = { status: "rejected", reason: C }, --l === 0 && n(s);
64
+ function(y) {
65
+ s[c] = { status: "rejected", reason: y }, --l === 0 && n(s);
67
66
  }
68
67
  );
69
68
  return;
70
69
  }
71
70
  }
72
- s[c] = { status: "fulfilled", value: h }, --l === 0 && n(s);
71
+ s[c] = { status: "fulfilled", value: d }, --l === 0 && n(s);
73
72
  }
74
73
  for (var i = 0; i < s.length; i++)
75
74
  u(i, s[i]);
76
75
  });
77
76
  }
78
- function Ft(e, t) {
77
+ function kt(e, t) {
79
78
  this.name = "AggregateError", this.errors = e, this.message = t || "";
80
79
  }
81
- Ft.prototype = Error.prototype;
82
- function Nt(e) {
80
+ kt.prototype = Error.prototype;
81
+ function It(e) {
83
82
  var t = this;
84
83
  return new t(function(n, o) {
85
84
  if (!(e && typeof e.length != "undefined"))
@@ -90,7 +89,7 @@ function Nt(e) {
90
89
  try {
91
90
  t.resolve(s[u]).then(n).catch(function(i) {
92
91
  l.push(i), l.length === s.length && o(
93
- new Ft(
92
+ new kt(
94
93
  l,
95
94
  "All promises were rejected"
96
95
  )
@@ -101,106 +100,106 @@ function Nt(e) {
101
100
  }
102
101
  });
103
102
  }
104
- var Gn = setTimeout;
105
- function Mt(e) {
103
+ var On = setTimeout;
104
+ function Dt(e) {
106
105
  return !!(e && typeof e.length != "undefined");
107
106
  }
108
- function Qn() {
107
+ function Hn() {
109
108
  }
110
- function er(e, t) {
109
+ function $n(e, t) {
111
110
  return function() {
112
111
  e.apply(t, arguments);
113
112
  };
114
113
  }
115
- function P(e) {
116
- if (!(this instanceof P))
114
+ function F(e) {
115
+ if (!(this instanceof F))
117
116
  throw new TypeError("Promises must be constructed via new");
118
117
  if (typeof e != "function") throw new TypeError("not a function");
119
- this._state = 0, this._handled = !1, this._value = void 0, this._deferreds = [], Ot(e, this);
118
+ this._state = 0, this._handled = !1, this._value = void 0, this._deferreds = [], Mt(e, this);
120
119
  }
121
- function Vt(e, t) {
120
+ function Ft(e, t) {
122
121
  for (; e._state === 3; )
123
122
  e = e._value;
124
123
  if (e._state === 0) {
125
124
  e._deferreds.push(t);
126
125
  return;
127
126
  }
128
- e._handled = !0, P._immediateFn(function() {
127
+ e._handled = !0, F._immediateFn(function() {
129
128
  var n = e._state === 1 ? t.onFulfilled : t.onRejected;
130
129
  if (n === null) {
131
- (e._state === 1 ? Be : pe)(t.promise, e._value);
130
+ (e._state === 1 ? We : we)(t.promise, e._value);
132
131
  return;
133
132
  }
134
133
  var o;
135
134
  try {
136
135
  o = n(e._value);
137
136
  } catch (s) {
138
- pe(t.promise, s);
137
+ we(t.promise, s);
139
138
  return;
140
139
  }
141
- Be(t.promise, o);
140
+ We(t.promise, o);
142
141
  });
143
142
  }
144
- function Be(e, t) {
143
+ function We(e, t) {
145
144
  try {
146
145
  if (t === e)
147
146
  throw new TypeError("A promise cannot be resolved with itself.");
148
147
  if (t && (typeof t == "object" || typeof t == "function")) {
149
148
  var n = t.then;
150
- if (t instanceof P) {
151
- e._state = 3, e._value = t, We(e);
149
+ if (t instanceof F) {
150
+ e._state = 3, e._value = t, ze(e);
152
151
  return;
153
152
  } else if (typeof n == "function") {
154
- Ot(er(n, t), e);
153
+ Mt($n(n, t), e);
155
154
  return;
156
155
  }
157
156
  }
158
- e._state = 1, e._value = t, We(e);
157
+ e._state = 1, e._value = t, ze(e);
159
158
  } catch (o) {
160
- pe(e, o);
159
+ we(e, o);
161
160
  }
162
161
  }
163
- function pe(e, t) {
164
- e._state = 2, e._value = t, We(e);
162
+ function we(e, t) {
163
+ e._state = 2, e._value = t, ze(e);
165
164
  }
166
- function We(e) {
167
- e._state === 2 && e._deferreds.length === 0 && P._immediateFn(function() {
168
- e._handled || P._unhandledRejectionFn(e._value);
165
+ function ze(e) {
166
+ e._state === 2 && e._deferreds.length === 0 && F._immediateFn(function() {
167
+ e._handled || F._unhandledRejectionFn(e._value);
169
168
  });
170
169
  for (var t = 0, n = e._deferreds.length; t < n; t++)
171
- Vt(e, e._deferreds[t]);
170
+ Ft(e, e._deferreds[t]);
172
171
  e._deferreds = null;
173
172
  }
174
- function tr(e, t, n) {
173
+ function An(e, t, n) {
175
174
  this.onFulfilled = typeof e == "function" ? e : null, this.onRejected = typeof t == "function" ? t : null, this.promise = n;
176
175
  }
177
- function Ot(e, t) {
176
+ function Mt(e, t) {
178
177
  var n = !1;
179
178
  try {
180
179
  e(
181
180
  function(o) {
182
- n || (n = !0, Be(t, o));
181
+ n || (n = !0, We(t, o));
183
182
  },
184
183
  function(o) {
185
- n || (n = !0, pe(t, o));
184
+ n || (n = !0, we(t, o));
186
185
  }
187
186
  );
188
187
  } catch (o) {
189
188
  if (n) return;
190
- n = !0, pe(t, o);
189
+ n = !0, we(t, o);
191
190
  }
192
191
  }
193
- P.prototype.catch = function(e) {
192
+ F.prototype.catch = function(e) {
194
193
  return this.then(null, e);
195
194
  };
196
- P.prototype.then = function(e, t) {
197
- var n = new this.constructor(Qn);
198
- return Vt(this, new tr(e, t, n)), n;
195
+ F.prototype.then = function(e, t) {
196
+ var n = new this.constructor(Hn);
197
+ return Ft(this, new An(e, t, n)), n;
199
198
  };
200
- P.prototype.finally = Dt;
201
- P.all = function(e) {
202
- return new P(function(t, n) {
203
- if (!Mt(e))
199
+ F.prototype.finally = bt;
200
+ F.all = function(e) {
201
+ return new F(function(t, n) {
202
+ if (!Dt(e))
204
203
  return n(new TypeError("Promise.all accepts an array"));
205
204
  var o = Array.prototype.slice.call(e);
206
205
  if (o.length === 0) return t([]);
@@ -208,12 +207,12 @@ P.all = function(e) {
208
207
  function l(i, c) {
209
208
  try {
210
209
  if (c && (typeof c == "object" || typeof c == "function")) {
211
- var h = c.then;
212
- if (typeof h == "function") {
213
- h.call(
210
+ var d = c.then;
211
+ if (typeof d == "function") {
212
+ d.call(
214
213
  c,
215
- function(v) {
216
- l(i, v);
214
+ function(g) {
215
+ l(i, g);
217
216
  },
218
217
  n
219
218
  );
@@ -221,44 +220,44 @@ P.all = function(e) {
221
220
  }
222
221
  }
223
222
  o[i] = c, --s === 0 && t(o);
224
- } catch (v) {
225
- n(v);
223
+ } catch (g) {
224
+ n(g);
226
225
  }
227
226
  }
228
227
  for (var u = 0; u < o.length; u++)
229
228
  l(u, o[u]);
230
229
  });
231
230
  };
232
- P.any = Nt;
233
- P.allSettled = It;
234
- P.resolve = function(e) {
235
- return e && typeof e == "object" && e.constructor === P ? e : new P(function(t) {
231
+ F.any = It;
232
+ F.allSettled = jt;
233
+ F.resolve = function(e) {
234
+ return e && typeof e == "object" && e.constructor === F ? e : new F(function(t) {
236
235
  t(e);
237
236
  });
238
237
  };
239
- P.reject = function(e) {
240
- return new P(function(t, n) {
238
+ F.reject = function(e) {
239
+ return new F(function(t, n) {
241
240
  n(e);
242
241
  });
243
242
  };
244
- P.race = function(e) {
245
- return new P(function(t, n) {
246
- if (!Mt(e))
243
+ F.race = function(e) {
244
+ return new F(function(t, n) {
245
+ if (!Dt(e))
247
246
  return n(new TypeError("Promise.race accepts an array"));
248
247
  for (var o = 0, s = e.length; o < s; o++)
249
- P.resolve(e[o]).then(t, n);
248
+ F.resolve(e[o]).then(t, n);
250
249
  });
251
250
  };
252
- P._immediateFn = // @ts-ignore
251
+ F._immediateFn = // @ts-ignore
253
252
  typeof setImmediate == "function" && function(e) {
254
253
  setImmediate(e);
255
254
  } || function(e) {
256
- Gn(e, 0);
255
+ On(e, 0);
257
256
  };
258
- P._unhandledRejectionFn = function(t) {
257
+ F._unhandledRejectionFn = function(t) {
259
258
  typeof console != "undefined" && console && console.warn("Possible Unhandled Promise Rejection:", t);
260
259
  };
261
- var ne = (function() {
260
+ var ae = (function() {
262
261
  if (typeof self != "undefined")
263
262
  return self;
264
263
  if (typeof window != "undefined")
@@ -267,74 +266,74 @@ var ne = (function() {
267
266
  return global;
268
267
  throw new Error("unable to locate global object");
269
268
  })();
270
- typeof ne.Promise != "function" ? ne.Promise = P : (ne.Promise.prototype.finally || (ne.Promise.prototype.finally = Dt), ne.Promise.allSettled || (ne.Promise.allSettled = It), ne.Promise.any || (ne.Promise.any = Nt));
271
- var Re = { exports: {} }, me = {};
272
- var yt;
273
- function nr() {
274
- if (yt) return me;
275
- yt = 1;
276
- var e = Pt, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, s = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = { key: !0, ref: !0, __self: !0, __source: !0 };
277
- function u(i, c, h) {
278
- var v, C = {}, R = null, _ = null;
279
- h !== void 0 && (R = "" + h), c.key !== void 0 && (R = "" + c.key), c.ref !== void 0 && (_ = c.ref);
280
- for (v in c) o.call(c, v) && !l.hasOwnProperty(v) && (C[v] = c[v]);
281
- if (i && i.defaultProps) for (v in c = i.defaultProps, c) C[v] === void 0 && (C[v] = c[v]);
282
- return { $$typeof: t, type: i, key: R, ref: _, props: C, _owner: s.current };
269
+ typeof ae.Promise != "function" ? ae.Promise = F : (ae.Promise.prototype.finally || (ae.Promise.prototype.finally = bt), ae.Promise.allSettled || (ae.Promise.allSettled = jt), ae.Promise.any || (ae.Promise.any = It));
270
+ var Le = { exports: {} }, ye = {};
271
+ var pt;
272
+ function Bn() {
273
+ if (pt) return ye;
274
+ pt = 1;
275
+ var e = Et, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, s = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = { key: !0, ref: !0, __self: !0, __source: !0 };
276
+ function u(i, c, d) {
277
+ var g, y = {}, v = null, C = null;
278
+ d !== void 0 && (v = "" + d), c.key !== void 0 && (v = "" + c.key), c.ref !== void 0 && (C = c.ref);
279
+ for (g in c) o.call(c, g) && !l.hasOwnProperty(g) && (y[g] = c[g]);
280
+ if (i && i.defaultProps) for (g in c = i.defaultProps, c) y[g] === void 0 && (y[g] = c[g]);
281
+ return { $$typeof: t, type: i, key: v, ref: C, props: y, _owner: s.current };
283
282
  }
284
- return me.Fragment = n, me.jsx = u, me.jsxs = u, me;
283
+ return ye.Fragment = n, ye.jsx = u, ye.jsxs = u, ye;
285
284
  }
286
- var ve = {};
287
- var gt;
288
- function rr() {
289
- return gt || (gt = 1, process.env.NODE_ENV !== "production" && (function() {
290
- var e = Pt, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), o = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), i = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), h = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), C = Symbol.for("react.memo"), R = Symbol.for("react.lazy"), _ = Symbol.for("react.offscreen"), b = Symbol.iterator, H = "@@iterator";
285
+ var ge = {};
286
+ var vt;
287
+ function Un() {
288
+ return vt || (vt = 1, process.env.NODE_ENV !== "production" && (function() {
289
+ var e = Et, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), o = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), i = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), y = Symbol.for("react.memo"), v = Symbol.for("react.lazy"), C = Symbol.for("react.offscreen"), j = Symbol.iterator, S = "@@iterator";
291
290
  function L(r) {
292
291
  if (r === null || typeof r != "object")
293
292
  return null;
294
- var d = b && r[b] || r[H];
295
- return typeof d == "function" ? d : null;
293
+ var h = j && r[j] || r[S];
294
+ return typeof h == "function" ? h : null;
296
295
  }
297
- var N = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
298
- function S(r) {
296
+ var M = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
297
+ function R(r) {
299
298
  {
300
- for (var d = arguments.length, m = new Array(d > 1 ? d - 1 : 0), y = 1; y < d; y++)
301
- m[y - 1] = arguments[y];
302
- g("error", r, m);
299
+ for (var h = arguments.length, m = new Array(h > 1 ? h - 1 : 0), w = 1; w < h; w++)
300
+ m[w - 1] = arguments[w];
301
+ k("error", r, m);
303
302
  }
304
303
  }
305
- function g(r, d, m) {
304
+ function k(r, h, m) {
306
305
  {
307
- var y = N.ReactDebugCurrentFrame, E = y.getStackAddendum();
308
- E !== "" && (d += "%s", m = m.concat([E]));
309
- var T = m.map(function(x) {
306
+ var w = M.ReactDebugCurrentFrame, E = w.getStackAddendum();
307
+ E !== "" && (h += "%s", m = m.concat([E]));
308
+ var P = m.map(function(x) {
310
309
  return String(x);
311
310
  });
312
- T.unshift("Warning: " + d), Function.prototype.apply.call(console[r], console, T);
311
+ P.unshift("Warning: " + h), Function.prototype.apply.call(console[r], console, P);
313
312
  }
314
313
  }
315
- var k = !1, p = !1, q = !1, Q = !1, ee = !1, X;
316
- X = Symbol.for("react.module.reference");
317
- function W(r) {
318
- return !!(typeof r == "string" || typeof r == "function" || r === o || r === l || ee || r === s || r === h || r === v || Q || r === _ || k || p || q || typeof r == "object" && r !== null && (r.$$typeof === R || r.$$typeof === C || r.$$typeof === u || r.$$typeof === i || r.$$typeof === c || // This needs to include all possible module reference object
314
+ var T = !1, I = !1, p = !1, B = !1, J = !1, q;
315
+ q = Symbol.for("react.module.reference");
316
+ function V(r) {
317
+ return !!(typeof r == "string" || typeof r == "function" || r === o || r === l || J || r === s || r === d || r === g || B || r === C || T || I || p || typeof r == "object" && r !== null && (r.$$typeof === v || r.$$typeof === y || r.$$typeof === u || r.$$typeof === i || r.$$typeof === c || // This needs to include all possible module reference object
319
318
  // types supported by any Flight configuration anywhere since
320
319
  // we don't know which Flight build this will end up being used
321
320
  // with.
322
- r.$$typeof === X || r.getModuleId !== void 0));
321
+ r.$$typeof === q || r.getModuleId !== void 0));
323
322
  }
324
- function I(r, d, m) {
325
- var y = r.displayName;
326
- if (y)
327
- return y;
328
- var E = d.displayName || d.name || "";
323
+ function D(r, h, m) {
324
+ var w = r.displayName;
325
+ if (w)
326
+ return w;
327
+ var E = h.displayName || h.name || "";
329
328
  return E !== "" ? m + "(" + E + ")" : m;
330
329
  }
331
- function le(r) {
330
+ function Q(r) {
332
331
  return r.displayName || "Context";
333
332
  }
334
- function z(r) {
333
+ function Z(r) {
335
334
  if (r == null)
336
335
  return null;
337
- if (typeof r.tag == "number" && S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof r == "function")
336
+ if (typeof r.tag == "number" && R("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof r == "function")
338
337
  return r.displayName || r.name || null;
339
338
  if (typeof r == "string")
340
339
  return r;
@@ -347,47 +346,47 @@ function rr() {
347
346
  return "Profiler";
348
347
  case s:
349
348
  return "StrictMode";
350
- case h:
349
+ case d:
351
350
  return "Suspense";
352
- case v:
351
+ case g:
353
352
  return "SuspenseList";
354
353
  }
355
354
  if (typeof r == "object")
356
355
  switch (r.$$typeof) {
357
356
  case i:
358
- var d = r;
359
- return le(d) + ".Consumer";
357
+ var h = r;
358
+ return Q(h) + ".Consumer";
360
359
  case u:
361
360
  var m = r;
362
- return le(m._context) + ".Provider";
361
+ return Q(m._context) + ".Provider";
363
362
  case c:
364
- return I(r, r.render, "ForwardRef");
365
- case C:
366
- var y = r.displayName || null;
367
- return y !== null ? y : z(r.type) || "Memo";
368
- case R: {
369
- var E = r, T = E._payload, x = E._init;
363
+ return D(r, r.render, "ForwardRef");
364
+ case y:
365
+ var w = r.displayName || null;
366
+ return w !== null ? w : Z(r.type) || "Memo";
367
+ case v: {
368
+ var E = r, P = E._payload, x = E._init;
370
369
  try {
371
- return z(x(T));
372
- } catch (w) {
370
+ return Z(x(P));
371
+ } catch (_) {
373
372
  return null;
374
373
  }
375
374
  }
376
375
  }
377
376
  return null;
378
377
  }
379
- var Y = Object.assign, te = 0, ce, ue, J, de, Ke, Xe, Je;
380
- function Ge() {
378
+ var W = Object.assign, oe = 0, ue, te, z, me, Ze, Ye, Ke;
379
+ function Xe() {
381
380
  }
382
- Ge.__reactDisabledLog = !0;
383
- function Cn() {
381
+ Xe.__reactDisabledLog = !0;
382
+ function sn() {
384
383
  {
385
- if (te === 0) {
386
- ce = console.log, ue = console.info, J = console.warn, de = console.error, Ke = console.group, Xe = console.groupCollapsed, Je = console.groupEnd;
384
+ if (oe === 0) {
385
+ ue = console.log, te = console.info, z = console.warn, me = console.error, Ze = console.group, Ye = console.groupCollapsed, Ke = console.groupEnd;
387
386
  var r = {
388
387
  configurable: !0,
389
388
  enumerable: !0,
390
- value: Ge,
389
+ value: Xe,
391
390
  writable: !0
392
391
  };
393
392
  Object.defineProperties(console, {
@@ -400,79 +399,79 @@ function rr() {
400
399
  groupEnd: r
401
400
  });
402
401
  }
403
- te++;
402
+ oe++;
404
403
  }
405
404
  }
406
- function wn() {
405
+ function an() {
407
406
  {
408
- if (te--, te === 0) {
407
+ if (oe--, oe === 0) {
409
408
  var r = {
410
409
  configurable: !0,
411
410
  enumerable: !0,
412
411
  writable: !0
413
412
  };
414
413
  Object.defineProperties(console, {
415
- log: Y({}, r, {
416
- value: ce
417
- }),
418
- info: Y({}, r, {
414
+ log: W({}, r, {
419
415
  value: ue
420
416
  }),
421
- warn: Y({}, r, {
422
- value: J
417
+ info: W({}, r, {
418
+ value: te
423
419
  }),
424
- error: Y({}, r, {
425
- value: de
420
+ warn: W({}, r, {
421
+ value: z
426
422
  }),
427
- group: Y({}, r, {
428
- value: Ke
423
+ error: W({}, r, {
424
+ value: me
429
425
  }),
430
- groupCollapsed: Y({}, r, {
431
- value: Xe
426
+ group: W({}, r, {
427
+ value: Ze
432
428
  }),
433
- groupEnd: Y({}, r, {
434
- value: Je
429
+ groupCollapsed: W({}, r, {
430
+ value: Ye
431
+ }),
432
+ groupEnd: W({}, r, {
433
+ value: Ke
435
434
  })
436
435
  });
437
436
  }
438
- te < 0 && S("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
437
+ oe < 0 && R("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
439
438
  }
440
439
  }
441
- var Fe = N.ReactCurrentDispatcher, Ne;
442
- function Ce(r, d, m) {
440
+ var Me = M.ReactCurrentDispatcher, Ne;
441
+ function _e(r, h, m) {
443
442
  {
444
443
  if (Ne === void 0)
445
444
  try {
446
445
  throw Error();
447
446
  } catch (E) {
448
- var y = E.stack.trim().match(/\n( *(at )?)/);
449
- Ne = y && y[1] || "";
447
+ var w = E.stack.trim().match(/\n( *(at )?)/);
448
+ Ne = w && w[1] || "";
450
449
  }
451
450
  return `
452
451
  ` + Ne + r;
453
452
  }
454
453
  }
455
- var Me = !1, we;
454
+ var Ve = !1, xe;
456
455
  {
457
- var xn = typeof WeakMap == "function" ? WeakMap : Map;
458
- we = new xn();
456
+ var ln = typeof WeakMap == "function" ? WeakMap : Map;
457
+ xe = new ln();
459
458
  }
460
- function Qe(r, d) {
461
- if (!r || Me)
459
+ function Ge(r, h) {
460
+ if (!r || Ve)
462
461
  return "";
463
462
  {
464
- var m = we.get(r);
463
+ var m = xe.get(r);
465
464
  if (m !== void 0)
466
465
  return m;
467
466
  }
468
- var y;
469
- Me = !0;
467
+ var w;
468
+ Ve = !0;
470
469
  var E = Error.prepareStackTrace;
471
470
  Error.prepareStackTrace = void 0;
472
- var T;
473
- T = Fe.current, Fe.current = null, Cn();
471
+ var P;
472
+ P = Me.current, Me.current = null, sn();
474
473
  try {
475
- if (d) {
474
+ if (h) {
476
475
  var x = function() {
477
476
  throw Error();
478
477
  };
@@ -483,167 +482,167 @@ function rr() {
483
482
  }), typeof Reflect == "object" && Reflect.construct) {
484
483
  try {
485
484
  Reflect.construct(x, []);
486
- } catch (B) {
487
- y = B;
485
+ } catch (G) {
486
+ w = G;
488
487
  }
489
488
  Reflect.construct(r, [], x);
490
489
  } else {
491
490
  try {
492
491
  x.call();
493
- } catch (B) {
494
- y = B;
492
+ } catch (G) {
493
+ w = G;
495
494
  }
496
495
  r.call(x.prototype);
497
496
  }
498
497
  } else {
499
498
  try {
500
499
  throw Error();
501
- } catch (B) {
502
- y = B;
500
+ } catch (G) {
501
+ w = G;
503
502
  }
504
503
  r();
505
504
  }
506
- } catch (B) {
507
- if (B && y && typeof B.stack == "string") {
508
- for (var w = B.stack.split(`
509
- `), $ = y.stack.split(`
510
- `), D = w.length - 1, F = $.length - 1; D >= 1 && F >= 0 && w[D] !== $[F]; )
511
- F--;
512
- for (; D >= 1 && F >= 0; D--, F--)
513
- if (w[D] !== $[F]) {
514
- if (D !== 1 || F !== 1)
505
+ } catch (G) {
506
+ if (G && w && typeof G.stack == "string") {
507
+ for (var _ = G.stack.split(`
508
+ `), K = w.stack.split(`
509
+ `), O = _.length - 1, $ = K.length - 1; O >= 1 && $ >= 0 && _[O] !== K[$]; )
510
+ $--;
511
+ for (; O >= 1 && $ >= 0; O--, $--)
512
+ if (_[O] !== K[$]) {
513
+ if (O !== 1 || $ !== 1)
515
514
  do
516
- if (D--, F--, F < 0 || w[D] !== $[F]) {
517
- var Z = `
518
- ` + w[D].replace(" at new ", " at ");
519
- return r.displayName && Z.includes("<anonymous>") && (Z = Z.replace("<anonymous>", r.displayName)), typeof r == "function" && we.set(r, Z), Z;
515
+ if (O--, $--, $ < 0 || _[O] !== K[$]) {
516
+ var ee = `
517
+ ` + _[O].replace(" at new ", " at ");
518
+ return r.displayName && ee.includes("<anonymous>") && (ee = ee.replace("<anonymous>", r.displayName)), typeof r == "function" && xe.set(r, ee), ee;
520
519
  }
521
- while (D >= 1 && F >= 0);
520
+ while (O >= 1 && $ >= 0);
522
521
  break;
523
522
  }
524
523
  }
525
524
  } finally {
526
- Me = !1, Fe.current = T, wn(), Error.prepareStackTrace = E;
525
+ Ve = !1, Me.current = P, an(), Error.prepareStackTrace = E;
527
526
  }
528
- var ae = r ? r.displayName || r.name : "", ie = ae ? Ce(ae) : "";
529
- return typeof r == "function" && we.set(r, ie), ie;
527
+ var fe = r ? r.displayName || r.name : "", ce = fe ? _e(fe) : "";
528
+ return typeof r == "function" && xe.set(r, ce), ce;
530
529
  }
531
- function _n(r, d, m) {
532
- return Qe(r, !1);
530
+ function cn(r, h, m) {
531
+ return Ge(r, !1);
533
532
  }
534
- function En(r) {
535
- var d = r.prototype;
536
- return !!(d && d.isReactComponent);
533
+ function un(r) {
534
+ var h = r.prototype;
535
+ return !!(h && h.isReactComponent);
537
536
  }
538
- function xe(r, d, m) {
537
+ function Ee(r, h, m) {
539
538
  if (r == null)
540
539
  return "";
541
540
  if (typeof r == "function")
542
- return Qe(r, En(r));
541
+ return Ge(r, un(r));
543
542
  if (typeof r == "string")
544
- return Ce(r);
543
+ return _e(r);
545
544
  switch (r) {
546
- case h:
547
- return Ce("Suspense");
548
- case v:
549
- return Ce("SuspenseList");
545
+ case d:
546
+ return _e("Suspense");
547
+ case g:
548
+ return _e("SuspenseList");
550
549
  }
551
550
  if (typeof r == "object")
552
551
  switch (r.$$typeof) {
553
552
  case c:
554
- return _n(r.render);
555
- case C:
556
- return xe(r.type, d, m);
557
- case R: {
558
- var y = r, E = y._payload, T = y._init;
553
+ return cn(r.render);
554
+ case y:
555
+ return Ee(r.type, h, m);
556
+ case v: {
557
+ var w = r, E = w._payload, P = w._init;
559
558
  try {
560
- return xe(T(E), d, m);
559
+ return Ee(P(E), h, m);
561
560
  } catch (x) {
562
561
  }
563
562
  }
564
563
  }
565
564
  return "";
566
565
  }
567
- var fe = Object.prototype.hasOwnProperty, et = {}, tt = N.ReactDebugCurrentFrame;
568
- function _e(r) {
566
+ var pe = Object.prototype.hasOwnProperty, Je = {}, Qe = M.ReactDebugCurrentFrame;
567
+ function Re(r) {
569
568
  if (r) {
570
- var d = r._owner, m = xe(r.type, r._source, d ? d.type : null);
571
- tt.setExtraStackFrame(m);
569
+ var h = r._owner, m = Ee(r.type, r._source, h ? h.type : null);
570
+ Qe.setExtraStackFrame(m);
572
571
  } else
573
- tt.setExtraStackFrame(null);
572
+ Qe.setExtraStackFrame(null);
574
573
  }
575
- function Tn(r, d, m, y, E) {
574
+ function dn(r, h, m, w, E) {
576
575
  {
577
- var T = Function.call.bind(fe);
576
+ var P = Function.call.bind(pe);
578
577
  for (var x in r)
579
- if (T(r, x)) {
580
- var w = void 0;
578
+ if (P(r, x)) {
579
+ var _ = void 0;
581
580
  try {
582
581
  if (typeof r[x] != "function") {
583
- var $ = Error((y || "React class") + ": " + m + " type `" + x + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[x] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
584
- throw $.name = "Invariant Violation", $;
582
+ var K = Error((w || "React class") + ": " + m + " type `" + x + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[x] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
583
+ throw K.name = "Invariant Violation", K;
585
584
  }
586
- w = r[x](d, x, y, m, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
587
- } catch (D) {
588
- w = D;
585
+ _ = r[x](h, x, w, m, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
586
+ } catch (O) {
587
+ _ = O;
589
588
  }
590
- w && !(w instanceof Error) && (_e(E), S("%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).", y || "React class", m, x, typeof w), _e(null)), w instanceof Error && !(w.message in et) && (et[w.message] = !0, _e(E), S("Failed %s type: %s", m, w.message), _e(null));
589
+ _ && !(_ instanceof Error) && (Re(E), R("%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).", w || "React class", m, x, typeof _), Re(null)), _ instanceof Error && !(_.message in Je) && (Je[_.message] = !0, Re(E), R("Failed %s type: %s", m, _.message), Re(null));
591
590
  }
592
591
  }
593
592
  }
594
- var Rn = Array.isArray;
595
- function Ve(r) {
596
- return Rn(r);
593
+ var fn = Array.isArray;
594
+ function Oe(r) {
595
+ return fn(r);
597
596
  }
598
- function Sn(r) {
597
+ function hn(r) {
599
598
  {
600
- var d = typeof Symbol == "function" && Symbol.toStringTag, m = d && r[Symbol.toStringTag] || r.constructor.name || "Object";
599
+ var h = typeof Symbol == "function" && Symbol.toStringTag, m = h && r[Symbol.toStringTag] || r.constructor.name || "Object";
601
600
  return m;
602
601
  }
603
602
  }
604
- function Pn(r) {
603
+ function mn(r) {
605
604
  try {
606
- return nt(r), !1;
607
- } catch (d) {
605
+ return et(r), !1;
606
+ } catch (h) {
608
607
  return !0;
609
608
  }
610
609
  }
611
- function nt(r) {
610
+ function et(r) {
612
611
  return "" + r;
613
612
  }
614
- function rt(r) {
615
- if (Pn(r))
616
- return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Sn(r)), nt(r);
613
+ function tt(r) {
614
+ if (mn(r))
615
+ return R("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", hn(r)), et(r);
617
616
  }
618
- var ot = N.ReactCurrentOwner, Ln = {
617
+ var nt = M.ReactCurrentOwner, pn = {
619
618
  key: !0,
620
619
  ref: !0,
621
620
  __self: !0,
622
621
  __source: !0
623
- }, it, st;
624
- function jn(r) {
625
- if (fe.call(r, "ref")) {
626
- var d = Object.getOwnPropertyDescriptor(r, "ref").get;
627
- if (d && d.isReactWarning)
622
+ }, rt, ot;
623
+ function vn(r) {
624
+ if (pe.call(r, "ref")) {
625
+ var h = Object.getOwnPropertyDescriptor(r, "ref").get;
626
+ if (h && h.isReactWarning)
628
627
  return !1;
629
628
  }
630
629
  return r.ref !== void 0;
631
630
  }
632
- function bn(r) {
633
- if (fe.call(r, "key")) {
634
- var d = Object.getOwnPropertyDescriptor(r, "key").get;
635
- if (d && d.isReactWarning)
631
+ function yn(r) {
632
+ if (pe.call(r, "key")) {
633
+ var h = Object.getOwnPropertyDescriptor(r, "key").get;
634
+ if (h && h.isReactWarning)
636
635
  return !1;
637
636
  }
638
637
  return r.key !== void 0;
639
638
  }
640
- function kn(r, d) {
641
- typeof r.ref == "string" && ot.current;
639
+ function gn(r, h) {
640
+ typeof r.ref == "string" && nt.current;
642
641
  }
643
- function Dn(r, d) {
642
+ function wn(r, h) {
644
643
  {
645
644
  var m = function() {
646
- it || (it = !0, S("%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)", d));
645
+ rt || (rt = !0, R("%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)", h));
647
646
  };
648
647
  m.isReactWarning = !0, Object.defineProperty(r, "key", {
649
648
  get: m,
@@ -651,10 +650,10 @@ function rr() {
651
650
  });
652
651
  }
653
652
  }
654
- function In(r, d) {
653
+ function Tn(r, h) {
655
654
  {
656
655
  var m = function() {
657
- st || (st = !0, S("%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)", d));
656
+ ot || (ot = !0, R("%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)", h));
658
657
  };
659
658
  m.isReactWarning = !0, Object.defineProperty(r, "ref", {
660
659
  get: m,
@@ -662,70 +661,70 @@ function rr() {
662
661
  });
663
662
  }
664
663
  }
665
- var Fn = function(r, d, m, y, E, T, x) {
666
- var w = {
664
+ var Cn = function(r, h, m, w, E, P, x) {
665
+ var _ = {
667
666
  // This tag allows us to uniquely identify this as a React Element
668
667
  $$typeof: t,
669
668
  // Built-in properties that belong on the element
670
669
  type: r,
671
- key: d,
670
+ key: h,
672
671
  ref: m,
673
672
  props: x,
674
673
  // Record the component responsible for creating this element.
675
- _owner: T
674
+ _owner: P
676
675
  };
677
- return w._store = {}, Object.defineProperty(w._store, "validated", {
676
+ return _._store = {}, Object.defineProperty(_._store, "validated", {
678
677
  configurable: !1,
679
678
  enumerable: !1,
680
679
  writable: !0,
681
680
  value: !1
682
- }), Object.defineProperty(w, "_self", {
681
+ }), Object.defineProperty(_, "_self", {
683
682
  configurable: !1,
684
683
  enumerable: !1,
685
684
  writable: !1,
686
- value: y
687
- }), Object.defineProperty(w, "_source", {
685
+ value: w
686
+ }), Object.defineProperty(_, "_source", {
688
687
  configurable: !1,
689
688
  enumerable: !1,
690
689
  writable: !1,
691
690
  value: E
692
- }), Object.freeze && (Object.freeze(w.props), Object.freeze(w)), w;
691
+ }), Object.freeze && (Object.freeze(_.props), Object.freeze(_)), _;
693
692
  };
694
- function Nn(r, d, m, y, E) {
693
+ function _n(r, h, m, w, E) {
695
694
  {
696
- var T, x = {}, w = null, $ = null;
697
- m !== void 0 && (rt(m), w = "" + m), bn(d) && (rt(d.key), w = "" + d.key), jn(d) && ($ = d.ref, kn(d, E));
698
- for (T in d)
699
- fe.call(d, T) && !Ln.hasOwnProperty(T) && (x[T] = d[T]);
695
+ var P, x = {}, _ = null, K = null;
696
+ m !== void 0 && (tt(m), _ = "" + m), yn(h) && (tt(h.key), _ = "" + h.key), vn(h) && (K = h.ref, gn(h, E));
697
+ for (P in h)
698
+ pe.call(h, P) && !pn.hasOwnProperty(P) && (x[P] = h[P]);
700
699
  if (r && r.defaultProps) {
701
- var D = r.defaultProps;
702
- for (T in D)
703
- x[T] === void 0 && (x[T] = D[T]);
700
+ var O = r.defaultProps;
701
+ for (P in O)
702
+ x[P] === void 0 && (x[P] = O[P]);
704
703
  }
705
- if (w || $) {
706
- var F = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
707
- w && Dn(x, F), $ && In(x, F);
704
+ if (_ || K) {
705
+ var $ = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
706
+ _ && wn(x, $), K && Tn(x, $);
708
707
  }
709
- return Fn(r, w, $, E, y, ot.current, x);
708
+ return Cn(r, _, K, E, w, nt.current, x);
710
709
  }
711
710
  }
712
- var Oe = N.ReactCurrentOwner, at = N.ReactDebugCurrentFrame;
713
- function se(r) {
711
+ var He = M.ReactCurrentOwner, it = M.ReactDebugCurrentFrame;
712
+ function de(r) {
714
713
  if (r) {
715
- var d = r._owner, m = xe(r.type, r._source, d ? d.type : null);
716
- at.setExtraStackFrame(m);
714
+ var h = r._owner, m = Ee(r.type, r._source, h ? h.type : null);
715
+ it.setExtraStackFrame(m);
717
716
  } else
718
- at.setExtraStackFrame(null);
717
+ it.setExtraStackFrame(null);
719
718
  }
720
- var He;
721
- He = !1;
719
+ var $e;
720
+ $e = !1;
722
721
  function Ae(r) {
723
722
  return typeof r == "object" && r !== null && r.$$typeof === t;
724
723
  }
725
- function lt() {
724
+ function st() {
726
725
  {
727
- if (Oe.current) {
728
- var r = z(Oe.current.type);
726
+ if (He.current) {
727
+ var r = Z(He.current.type);
729
728
  if (r)
730
729
  return `
731
730
 
@@ -734,161 +733,161 @@ Check the render method of \`` + r + "`.";
734
733
  return "";
735
734
  }
736
735
  }
737
- function Mn(r) {
736
+ function xn(r) {
738
737
  return "";
739
738
  }
740
- var ct = {};
741
- function Vn(r) {
739
+ var at = {};
740
+ function En(r) {
742
741
  {
743
- var d = lt();
744
- if (!d) {
742
+ var h = st();
743
+ if (!h) {
745
744
  var m = typeof r == "string" ? r : r.displayName || r.name;
746
- m && (d = `
745
+ m && (h = `
747
746
 
748
747
  Check the top-level render call using <` + m + ">.");
749
748
  }
750
- return d;
749
+ return h;
751
750
  }
752
751
  }
753
- function ut(r, d) {
752
+ function lt(r, h) {
754
753
  {
755
754
  if (!r._store || r._store.validated || r.key != null)
756
755
  return;
757
756
  r._store.validated = !0;
758
- var m = Vn(d);
759
- if (ct[m])
757
+ var m = En(h);
758
+ if (at[m])
760
759
  return;
761
- ct[m] = !0;
762
- var y = "";
763
- r && r._owner && r._owner !== Oe.current && (y = " It was passed a child from " + z(r._owner.type) + "."), se(r), S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', m, y), se(null);
760
+ at[m] = !0;
761
+ var w = "";
762
+ r && r._owner && r._owner !== He.current && (w = " It was passed a child from " + Z(r._owner.type) + "."), de(r), R('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', m, w), de(null);
764
763
  }
765
764
  }
766
- function dt(r, d) {
765
+ function ct(r, h) {
767
766
  {
768
767
  if (typeof r != "object")
769
768
  return;
770
- if (Ve(r))
769
+ if (Oe(r))
771
770
  for (var m = 0; m < r.length; m++) {
772
- var y = r[m];
773
- Ae(y) && ut(y, d);
771
+ var w = r[m];
772
+ Ae(w) && lt(w, h);
774
773
  }
775
774
  else if (Ae(r))
776
775
  r._store && (r._store.validated = !0);
777
776
  else if (r) {
778
777
  var E = L(r);
779
778
  if (typeof E == "function" && E !== r.entries)
780
- for (var T = E.call(r), x; !(x = T.next()).done; )
781
- Ae(x.value) && ut(x.value, d);
779
+ for (var P = E.call(r), x; !(x = P.next()).done; )
780
+ Ae(x.value) && lt(x.value, h);
782
781
  }
783
782
  }
784
783
  }
785
- function On(r) {
784
+ function Rn(r) {
786
785
  {
787
- var d = r.type;
788
- if (d == null || typeof d == "string")
786
+ var h = r.type;
787
+ if (h == null || typeof h == "string")
789
788
  return;
790
789
  var m;
791
- if (typeof d == "function")
792
- m = d.propTypes;
793
- else if (typeof d == "object" && (d.$$typeof === c || // Note: Memo only checks outer props here.
790
+ if (typeof h == "function")
791
+ m = h.propTypes;
792
+ else if (typeof h == "object" && (h.$$typeof === c || // Note: Memo only checks outer props here.
794
793
  // Inner props are checked in the reconciler.
795
- d.$$typeof === C))
796
- m = d.propTypes;
794
+ h.$$typeof === y))
795
+ m = h.propTypes;
797
796
  else
798
797
  return;
799
798
  if (m) {
800
- var y = z(d);
801
- Tn(m, r.props, "prop", y, r);
802
- } else if (d.PropTypes !== void 0 && !He) {
803
- He = !0;
804
- var E = z(d);
805
- S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", E || "Unknown");
799
+ var w = Z(h);
800
+ dn(m, r.props, "prop", w, r);
801
+ } else if (h.PropTypes !== void 0 && !$e) {
802
+ $e = !0;
803
+ var E = Z(h);
804
+ R("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", E || "Unknown");
806
805
  }
807
- typeof d.getDefaultProps == "function" && !d.getDefaultProps.isReactClassApproved && S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
806
+ typeof h.getDefaultProps == "function" && !h.getDefaultProps.isReactClassApproved && R("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
808
807
  }
809
808
  }
810
- function Hn(r) {
809
+ function Sn(r) {
811
810
  {
812
- for (var d = Object.keys(r.props), m = 0; m < d.length; m++) {
813
- var y = d[m];
814
- if (y !== "children" && y !== "key") {
815
- se(r), S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", y), se(null);
811
+ for (var h = Object.keys(r.props), m = 0; m < h.length; m++) {
812
+ var w = h[m];
813
+ if (w !== "children" && w !== "key") {
814
+ de(r), R("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", w), de(null);
816
815
  break;
817
816
  }
818
817
  }
819
- r.ref !== null && (se(r), S("Invalid attribute `ref` supplied to `React.Fragment`."), se(null));
818
+ r.ref !== null && (de(r), R("Invalid attribute `ref` supplied to `React.Fragment`."), de(null));
820
819
  }
821
820
  }
822
- var ft = {};
823
- function ht(r, d, m, y, E, T) {
821
+ var ut = {};
822
+ function dt(r, h, m, w, E, P) {
824
823
  {
825
- var x = W(r);
824
+ var x = V(r);
826
825
  if (!x) {
827
- var w = "";
828
- (r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (w += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
829
- var $ = Mn();
830
- $ ? w += $ : w += lt();
831
- var D;
832
- r === null ? D = "null" : Ve(r) ? D = "array" : r !== void 0 && r.$$typeof === t ? (D = "<" + (z(r.type) || "Unknown") + " />", w = " Did you accidentally export a JSX literal instead of a component?") : D = typeof r, S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", D, w);
826
+ var _ = "";
827
+ (r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (_ += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
828
+ var K = xn();
829
+ K ? _ += K : _ += st();
830
+ var O;
831
+ r === null ? O = "null" : Oe(r) ? O = "array" : r !== void 0 && r.$$typeof === t ? (O = "<" + (Z(r.type) || "Unknown") + " />", _ = " Did you accidentally export a JSX literal instead of a component?") : O = typeof r, R("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", O, _);
833
832
  }
834
- var F = Nn(r, d, m, E, T);
835
- if (F == null)
836
- return F;
833
+ var $ = _n(r, h, m, E, P);
834
+ if ($ == null)
835
+ return $;
837
836
  if (x) {
838
- var Z = d.children;
839
- if (Z !== void 0)
840
- if (y)
841
- if (Ve(Z)) {
842
- for (var ae = 0; ae < Z.length; ae++)
843
- dt(Z[ae], r);
844
- Object.freeze && Object.freeze(Z);
837
+ var ee = h.children;
838
+ if (ee !== void 0)
839
+ if (w)
840
+ if (Oe(ee)) {
841
+ for (var fe = 0; fe < ee.length; fe++)
842
+ ct(ee[fe], r);
843
+ Object.freeze && Object.freeze(ee);
845
844
  } else
846
- S("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
845
+ R("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
847
846
  else
848
- dt(Z, r);
847
+ ct(ee, r);
849
848
  }
850
- if (fe.call(d, "key")) {
851
- var ie = z(r), B = Object.keys(d).filter(function(zn) {
852
- return zn !== "key";
853
- }), $e = B.length > 0 ? "{key: someKey, " + B.join(": ..., ") + ": ...}" : "{key: someKey}";
854
- if (!ft[ie + $e]) {
855
- var Wn = B.length > 0 ? "{" + B.join(": ..., ") + ": ...}" : "{}";
856
- S(`A props object containing a "key" prop is being spread into JSX:
849
+ if (pe.call(h, "key")) {
850
+ var ce = Z(r), G = Object.keys(h).filter(function(In) {
851
+ return In !== "key";
852
+ }), Be = G.length > 0 ? "{key: someKey, " + G.join(": ..., ") + ": ...}" : "{key: someKey}";
853
+ if (!ut[ce + Be]) {
854
+ var kn = G.length > 0 ? "{" + G.join(": ..., ") + ": ...}" : "{}";
855
+ R(`A props object containing a "key" prop is being spread into JSX:
857
856
  let props = %s;
858
857
  <%s {...props} />
859
858
  React keys must be passed directly to JSX without using spread:
860
859
  let props = %s;
861
- <%s key={someKey} {...props} />`, $e, ie, Wn, ie), ft[ie + $e] = !0;
860
+ <%s key={someKey} {...props} />`, Be, ce, kn, ce), ut[ce + Be] = !0;
862
861
  }
863
862
  }
864
- return r === o ? Hn(F) : On(F), F;
863
+ return r === o ? Sn($) : Rn($), $;
865
864
  }
866
865
  }
867
- function An(r, d, m) {
868
- return ht(r, d, m, !0);
866
+ function Pn(r, h, m) {
867
+ return dt(r, h, m, !0);
869
868
  }
870
- function $n(r, d, m) {
871
- return ht(r, d, m, !1);
869
+ function Ln(r, h, m) {
870
+ return dt(r, h, m, !1);
872
871
  }
873
- var Un = $n, Bn = An;
874
- ve.Fragment = o, ve.jsx = Un, ve.jsxs = Bn;
875
- })()), ve;
872
+ var bn = Ln, jn = Pn;
873
+ ge.Fragment = o, ge.jsx = bn, ge.jsxs = jn;
874
+ })()), ge;
876
875
  }
877
- var Ct;
878
- function or() {
879
- return Ct || (Ct = 1, process.env.NODE_ENV === "production" ? Re.exports = nr() : Re.exports = rr()), Re.exports;
880
- }
881
- var a = or();
882
- const ir = "_playerNotice_wol1k_1", sr = "_playerNoticeTitle_wol1k_16", ar = "_playerNoticeText_wol1k_25", Ze = {
883
- playerNotice: ir,
884
- playerNoticeTitle: sr,
885
- playerNoticeText: ar
886
- }, Le = Ze.playerNotice, je = Ze.playerNoticeTitle, ze = Ze.playerNoticeText, Ht = typeof window != "undefined" ? Kn : V;
876
+ var yt;
877
+ function Wn() {
878
+ return yt || (yt = 1, process.env.NODE_ENV === "production" ? Le.exports = Bn() : Le.exports = Un()), Le.exports;
879
+ }
880
+ var a = Wn();
881
+ const zn = "_playerNotice_1m0i8_1", qn = "_playerNoticeTitle_1m0i8_17", Zn = "_playerNoticeText_1m0i8_26", se = {
882
+ playerNotice: zn,
883
+ playerNoticeTitle: qn,
884
+ playerNoticeText: Zn
885
+ }, Nt = typeof window != "undefined" ? Nn : N;
887
886
  function qe(e, t) {
888
- const n = A(e);
889
- Ht(() => {
887
+ const n = H(e);
888
+ Nt(() => {
890
889
  n.current = e;
891
- }, [e]), V(() => {
890
+ }, [e]), N(() => {
892
891
  if (t === null)
893
892
  return;
894
893
  const o = setInterval(() => {
@@ -899,29 +898,29 @@ function qe(e, t) {
899
898
  };
900
899
  }, [t]);
901
900
  }
902
- function lr(e) {
903
- const [, t] = U(0);
901
+ function Yn(e) {
902
+ const [, t] = X(0);
904
903
  qe(() => t((n) => n + 1), e);
905
904
  }
906
- const cr = () => bt((e) => ({
905
+ const Kn = () => Pt((e) => ({
907
906
  delay: 0,
908
907
  startDate: null,
909
908
  setDelay: (t) => e({ delay: t }),
910
909
  setStartDate: (t) => e({ startDate: t })
911
- })), At = Lt(
910
+ })), Vt = Rt(
912
911
  null
913
- ), ur = ({ children: e }) => {
914
- const t = A(
912
+ ), Xn = ({ children: e }) => {
913
+ const t = H(
915
914
  null
916
915
  );
917
- return t.current || (t.current = cr()), /* @__PURE__ */ a.jsx(At.Provider, { value: t.current, children: e });
918
- }, O = (e) => {
919
- const t = jt(At);
916
+ return t.current || (t.current = Kn()), /* @__PURE__ */ a.jsx(Vt.Provider, { value: t.current, children: e });
917
+ }, A = (e) => {
918
+ const t = St(Vt);
920
919
  if (!t)
921
920
  throw new Error("usePlayerStore must be used within PlayerStoreProvider");
922
- return kt(t, e);
921
+ return Lt(t, e);
923
922
  };
924
- function dr(e, t, n) {
923
+ function Gn(e, t, n) {
925
924
  const o = {
926
925
  days: 86400,
927
926
  hours: 3600,
@@ -931,39 +930,79 @@ function dr(e, t, n) {
931
930
  };
932
931
  return e * (o[t] / o[n]);
933
932
  }
934
- function fr(e) {
935
- return dr(e, "milliseconds", "seconds");
933
+ function Jn(e) {
934
+ return Gn(e, "milliseconds", "seconds");
936
935
  }
937
- const be = (e) => {
936
+ const Te = (e) => {
938
937
  if (isNaN(e) || e === 1 / 0) return "0:00";
939
938
  const t = (l) => (l < 10 ? "0" : "") + l, n = Math.floor(e / 3600), o = Math.floor(e % 3600 / 60), s = Math.floor(e % 60);
940
939
  return n === 0 ? `${o}:${t(s)}` : `${n}:${t(o)}:${t(s)}`;
941
940
  };
942
- function hr(e, t) {
943
- return Xn(e, t);
944
- }
945
- function mr(e) {
941
+ function Qn(e, t) {
942
+ var n, o, s, l, u, i;
943
+ if (typeof Intl != "undefined" && Intl.DateTimeFormat)
944
+ try {
945
+ const d = new Intl.DateTimeFormat("en-US", {
946
+ timeZone: t,
947
+ year: "numeric",
948
+ month: "2-digit",
949
+ day: "2-digit",
950
+ hour: "2-digit",
951
+ minute: "2-digit",
952
+ second: "2-digit",
953
+ hour12: !1
954
+ }).formatToParts(e), g = parseInt(
955
+ ((n = d.find((L) => L.type === "year")) == null ? void 0 : n.value) || "0",
956
+ 10
957
+ ), y = parseInt(
958
+ ((o = d.find((L) => L.type === "month")) == null ? void 0 : o.value) || "0",
959
+ 10
960
+ ) - 1, v = parseInt(
961
+ ((s = d.find((L) => L.type === "day")) == null ? void 0 : s.value) || "0",
962
+ 10
963
+ ), C = parseInt(
964
+ ((l = d.find((L) => L.type === "hour")) == null ? void 0 : l.value) || "0",
965
+ 10
966
+ ), j = parseInt(
967
+ ((u = d.find((L) => L.type === "minute")) == null ? void 0 : u.value) || "0",
968
+ 10
969
+ ), S = parseInt(
970
+ ((i = d.find((L) => L.type === "second")) == null ? void 0 : i.value) || "0",
971
+ 10
972
+ );
973
+ return new Date(g, y, v, C, j, S);
974
+ } catch (c) {
975
+ return console.warn(
976
+ `Failed to convert date to timezone ${t}, returning original date:`,
977
+ c
978
+ ), e;
979
+ }
980
+ return console.warn(
981
+ "Intl.DateTimeFormat not available, timezone conversion may be inaccurate"
982
+ ), e;
983
+ }
984
+ function Ot(e) {
946
985
  var n;
947
986
  const t = typeof window != "undefined" && ((n = window.navigator) == null ? void 0 : n.userAgent) || "";
948
987
  return e.test(t);
949
988
  }
950
- const $t = mr(/iPhone|iPad|iPod/i);
951
- function vr() {
989
+ const Ht = Ot(/iPhone|iPad|iPod/i), er = Ot(/Tizen/i);
990
+ function tr() {
952
991
  const e = document;
953
992
  return !!(e.fullscreenElement || e.mozFullScreenElement || e.webkitFullscreenElement || e.msFullscreenElement);
954
993
  }
955
- function pr(e) {
994
+ function nr(e) {
956
995
  e.requestFullscreen ? e.requestFullscreen() : e.msRequestFullscreen ? e.msRequestFullscreen() : e.webkitRequestFullScreen ? e.webkitRequestFullScreen() : e.webkitEnterFullScreen ? e.webkitEnterFullScreen() : e.mozRequestFullScreen && e.mozRequestFullScreen();
957
996
  }
958
- function yr(e) {
997
+ function rr(e) {
959
998
  e.exitFullscreen ? e.exitFullscreen() : e.msExitFullscreen ? e.msExitFullscreen() : e.webkitExitFullscreen ? e.webkitExitFullscreen() : e.mozCancelFullScreen && e.mozCancelFullScreen();
960
999
  }
961
- function gr(e, t) {
1000
+ function or(e, t) {
962
1001
  return e.addEventListener("fullscreenchange", t), e.addEventListener("webkitfullscreenchange", t), e.addEventListener("mozfullscreenchange", t), e.addEventListener("MSFullscreenChange", t), () => {
963
1002
  e.removeEventListener("fullscreenchange", t), e.removeEventListener("webkitfullscreenchange", t), e.removeEventListener("mozfullscreenchange", t), e.removeEventListener("MSFullscreenChange", t);
964
1003
  };
965
1004
  }
966
- const Cr = () => Jn(), wr = (e, t) => ({
1005
+ const ir = () => Vn(), sr = (e, t) => ({
967
1006
  currentTime: 0,
968
1007
  duration: 0,
969
1008
  isEnded: !1,
@@ -1075,7 +1114,7 @@ const Cr = () => Jn(), wr = (e, t) => ({
1075
1114
  }));
1076
1115
  },
1077
1116
  getPauseTimeDiff: () => !t().isStarted || !t().pauseTime ? 0 : parseInt(
1078
- fr(Date.now() - t().pauseTime).toFixed(0)
1117
+ Jn(Date.now() - t().pauseTime).toFixed(0)
1079
1118
  ),
1080
1119
  play: () => {
1081
1120
  const n = t().techRef.current;
@@ -1122,7 +1161,11 @@ const Cr = () => Jn(), wr = (e, t) => ({
1122
1161
  isLoading: !1
1123
1162
  });
1124
1163
  }
1125
- }), xr = (e) => ({
1164
+ }), ar = (e, t) => ({
1165
+ isIdle: !1,
1166
+ setIsIdle: (n) => e({ isIdle: n }),
1167
+ resetIdle: () => t().eventEmitter.emit("resetIdle")
1168
+ }), lr = (e) => ({
1126
1169
  idleLocks: /* @__PURE__ */ new Set(),
1127
1170
  addIdleLock: (t) => e((n) => ({
1128
1171
  idleLocks: new Set(n.idleLocks).add(t)
@@ -1131,48 +1174,48 @@ const Cr = () => Jn(), wr = (e, t) => ({
1131
1174
  const o = new Set(n.idleLocks);
1132
1175
  return o.delete(t), { idleLocks: o };
1133
1176
  })
1134
- }), _r = (e, t) => ({
1177
+ }), cr = (e, t) => ({
1135
1178
  level: null,
1136
1179
  levels: null,
1137
1180
  setLevels: (n) => e({ levels: n }),
1138
1181
  setLevel: (n) => {
1139
1182
  n && t().eventEmitter.emit("qualityChange", { level: n }), e({ level: n });
1140
1183
  }
1141
- }), Er = (e, t) => ({
1184
+ }), ur = (e, t) => ({
1142
1185
  isFullscreen: !1,
1143
1186
  isFullscreenReady: !1,
1144
1187
  exitFullscreen: () => {
1145
- t().eventEmitter.emit("fullscreenChange", { isFullscreen: !1 }), yr(document), e({ isFullscreen: !1 });
1188
+ t().eventEmitter.emit("fullscreenChange", { isFullscreen: !1 }), rr(document), e({ isFullscreen: !1 });
1146
1189
  },
1147
1190
  requestFullscreen: () => {
1148
1191
  const n = t().techRef.current, o = t().containerRef.current;
1149
1192
  if (!n || !o) return;
1150
1193
  t().eventEmitter.emit("fullscreenChange", { isFullscreen: !0 });
1151
- const s = $t ? n : o;
1152
- s && pr(s), e({ isFullscreen: !0 });
1194
+ const s = Ht ? n : o;
1195
+ s && nr(s), e({ isFullscreen: !0 });
1153
1196
  },
1154
1197
  setIsFullscreen: (n) => e({ isFullscreen: n }),
1155
1198
  setIsFullscreenReady: (n) => e({ isFullscreenReady: n })
1156
- }), Tr = (e) => ({
1199
+ }), dr = (e) => ({
1157
1200
  error: null,
1158
1201
  setError: (t) => e({ error: t })
1159
- }), Rr = () => ({
1160
- eventEmitter: Cr()
1161
- }), Sr = (e) => () => j({}, e), Pr = (e, t) => bt()((...n) => j(j(j(j(j(j(j({}, wr(...n)), xr(...n)), Er(...n)), _r(...n)), Tr(...n)), Rr(...n)), Sr({
1202
+ }), fr = () => ({
1203
+ eventEmitter: ir()
1204
+ }), hr = (e) => () => b({}, e), mr = (e, t) => Pt()((...n) => b(b(b(b(b(b(b(b({}, sr(...n)), ar(...n)), lr(...n)), ur(...n)), cr(...n)), dr(...n)), fr(...n)), hr({
1162
1205
  techRef: e,
1163
1206
  containerRef: t
1164
- })(...n))), Ut = Lt(null);
1165
- function Lr({ children: e }) {
1166
- const t = A(null), n = A(null), o = A(null);
1167
- return t.current || (t.current = Pr(n, o)), /* @__PURE__ */ a.jsx(Ut.Provider, { value: t.current, children: e });
1207
+ })(...n))), $t = Rt(null);
1208
+ function pr({ children: e }) {
1209
+ const t = H(null), n = H(null), o = H(null);
1210
+ return t.current || (t.current = mr(n, o)), /* @__PURE__ */ a.jsx($t.Provider, { value: t.current, children: e });
1168
1211
  }
1169
1212
  const f = (e) => {
1170
- const t = jt(Ut);
1213
+ const t = St($t);
1171
1214
  if (!t)
1172
1215
  throw new Error("usePlayerStore must be used within PlayerStoreProvider");
1173
- return kt(t, e);
1216
+ return Lt(t, e);
1174
1217
  };
1175
- function jr(e) {
1218
+ function vr(e) {
1176
1219
  const t = e.split(`
1177
1220
  `);
1178
1221
  for (const n of t) {
@@ -1180,12 +1223,12 @@ function jr(e) {
1180
1223
  if (o.startsWith("#EXT-X-PROGRAM-DATE-TIME:")) {
1181
1224
  const s = o.replace("#EXT-X-PROGRAM-DATE-TIME:", "").trim(), l = new Date(s);
1182
1225
  if (!isNaN(l.getTime()))
1183
- return hr(l, "Europe/Sarajevo");
1226
+ return Qn(l, "Europe/Sarajevo");
1184
1227
  }
1185
1228
  }
1186
1229
  return null;
1187
1230
  }
1188
- function br(e, t) {
1231
+ function yr(e, t) {
1189
1232
  const n = e.split(`
1190
1233
  `);
1191
1234
  let o = !1;
@@ -1212,19 +1255,19 @@ function br(e, t) {
1212
1255
  }
1213
1256
  return null;
1214
1257
  }
1215
- function kr(e) {
1258
+ function gr(e) {
1216
1259
  return e.replace("playlist.m3u8", "playlist_fmp4_dvr.m3u8");
1217
1260
  }
1218
- async function Dr(e) {
1261
+ async function wr(e) {
1219
1262
  try {
1220
- const t = kr(e);
1263
+ const t = gr(e);
1221
1264
  console.log("Converting to DVR URL:", t);
1222
1265
  const n = await fetch(t);
1223
1266
  if (!n.ok)
1224
1267
  throw new Error(
1225
1268
  `Failed to fetch master playlist: ${n.status} ${n.statusText}`
1226
1269
  );
1227
- const o = await n.text(), s = br(
1270
+ const o = await n.text(), s = yr(
1228
1271
  o,
1229
1272
  t
1230
1273
  );
@@ -1236,54 +1279,105 @@ async function Dr(e) {
1236
1279
  throw new Error(
1237
1280
  `Failed to fetch chunklist: ${l.status} ${l.statusText}`
1238
1281
  );
1239
- const u = await l.text(), i = jr(u);
1282
+ const u = await l.text(), i = vr(u);
1240
1283
  return i ? console.log("Successfully detected start time:", i.toISOString()) : console.log(" No start time found in chunklist"), i;
1241
1284
  } catch (t) {
1242
1285
  return console.error("Error getting start time from HLS URL:", t), null;
1243
1286
  }
1244
1287
  }
1245
- function Ir(n) {
1246
- var o = n, { url: e } = o, t = G(o, ["url"]);
1247
- const [s, l] = U(!0), u = O((h) => h.startDate), i = O((h) => h.setStartDate), c = M(async () => {
1248
- const h = await Dr(e);
1249
- h && i(h);
1288
+ function Tr(n) {
1289
+ var o = n, { url: e } = o, t = ne(o, ["url"]);
1290
+ const [s, l] = X(!0), u = A((d) => d.startDate), i = A((d) => d.setStartDate), c = U(async () => {
1291
+ const d = await wr(e);
1292
+ d && i(d);
1250
1293
  }, [e, i]);
1251
- return V(() => {
1294
+ return N(() => {
1252
1295
  (async () => {
1253
1296
  l(!0), await c(), l(!1);
1254
1297
  })();
1255
- }, [c]), qe(c, u ? null : 5e3), s ? null : /* @__PURE__ */ a.jsx(Fr, j({}, t));
1298
+ }, [c]), qe(c, u ? null : 5e3), s ? null : /* @__PURE__ */ a.jsx(Cr, b({}, t));
1256
1299
  }
1257
- function Fr({
1300
+ function Cr({
1258
1301
  children: e,
1259
- eventNotStartedMessage: t = "Event has not started yet.",
1260
- eventStartingSoonMessage: n = "Starting in few seconds..."
1302
+ messages: t = {}
1261
1303
  }) {
1262
- const o = O((i) => i.startDate), s = f((i) => i.isStarted);
1263
- return lr(s ? null : 5e3), o ? Date.now() < o.getTime() ? /* @__PURE__ */ a.jsx(
1264
- Nr,
1304
+ var u, i, c;
1305
+ const n = A((d) => d.startDate), o = f((d) => d.isStarted);
1306
+ return Yn(o ? null : 5e3), n ? Date.now() < n.getTime() ? /* @__PURE__ */ a.jsx(
1307
+ _r,
1265
1308
  {
1266
- startDate: o,
1267
- title: t,
1268
- message: n
1309
+ startDate: n,
1310
+ title: (i = t == null ? void 0 : t.eventNotStarted) != null ? i : "Event has not started yet.",
1311
+ message: (c = t == null ? void 0 : t.eventStartingSoon) != null ? c : "Starting in few seconds..."
1269
1312
  }
1270
- ) : /* @__PURE__ */ a.jsx(a.Fragment, { children: e }) : /* @__PURE__ */ a.jsx("div", { className: Le, children: /* @__PURE__ */ a.jsx("h3", { className: je, children: t }) });
1313
+ ) : /* @__PURE__ */ a.jsx(a.Fragment, { children: e }) : /* @__PURE__ */ a.jsx("div", { className: se.playerNotice, children: /* @__PURE__ */ a.jsx("h3", { className: se.playerNoticeTitle, children: (u = t == null ? void 0 : t.eventNotStarted) != null ? u : "Event has not started yet." }) });
1271
1314
  }
1272
- function Nr({ startDate: e, title: t, message: n }) {
1315
+ function _r({ startDate: e, title: t, message: n }) {
1273
1316
  const o = e.getTime() - Date.now(), s = Math.floor(o / (1e3 * 60 * 60)), l = Math.floor(
1274
1317
  o % (1e3 * 60 * 60) / (1e3 * 60)
1275
1318
  );
1276
- return s || l ? /* @__PURE__ */ a.jsxs("div", { className: Le, children: [
1277
- /* @__PURE__ */ a.jsx("h3", { className: je, children: t }),
1278
- /* @__PURE__ */ a.jsxs("p", { className: ze, children: [
1319
+ return s || l ? /* @__PURE__ */ a.jsxs("div", { className: se.playerNotice, children: [
1320
+ /* @__PURE__ */ a.jsx("h3", { className: se.playerNoticeTitle, children: t }),
1321
+ /* @__PURE__ */ a.jsxs("p", { className: se.playerNoticeText, children: [
1279
1322
  "(",
1280
1323
  s > 0 ? `${s}h ${l}m` : `${l}m`,
1281
1324
  ")"
1282
1325
  ] })
1283
- ] }) : /* @__PURE__ */ a.jsx("div", { className: Le, children: /* @__PURE__ */ a.jsx("h3", { className: je, children: n }) });
1326
+ ] }) : /* @__PURE__ */ a.jsx("div", { className: se.playerNotice, children: /* @__PURE__ */ a.jsx("h3", { className: se.playerNoticeTitle, children: n }) });
1327
+ }
1328
+ function At({ callback: e }) {
1329
+ const t = f((n) => n.eventEmitter);
1330
+ return N(() => {
1331
+ const n = () => e("play", void 0), o = () => e("pause", void 0), s = () => e("ended", void 0), l = () => e("seeking", void 0), u = () => e("seeked", void 0), i = (S) => e("volumeChange", S), c = (S) => e("fullscreenChange", S), d = (S) => e("qualityChange", S), g = (S) => e("loadedMetadata", S), y = () => e("loadStart", void 0), v = () => e("playing", void 0), C = () => e("waiting", void 0), j = () => e("error", void 0);
1332
+ return t.on("play", n), t.on("pause", o), t.on("ended", s), t.on("seeking", l), t.on("seeked", u), t.on("volumeChange", i), t.on("fullscreenChange", c), t.on("qualityChange", d), t.on("loadedMetadata", g), t.on("loadStart", y), t.on("playing", v), t.on("waiting", C), t.on("error", j), () => {
1333
+ t.off("play", n), t.off("pause", o), t.off("ended", s), t.off("seeking", l), t.off("seeked", u), t.off("volumeChange", i), t.off("fullscreenChange", c), t.off("qualityChange", d), t.off("loadedMetadata", g), t.off("loadStart", y), t.off("playing", v), t.off("waiting", C), t.off("error", j);
1334
+ };
1335
+ }, [e, t]), null;
1336
+ }
1337
+ const Bt = (e, t = 0) => parseInt(
1338
+ Math.max(0, (Date.now() - (e + t * 1e3)) / 1e3).toFixed(0)
1339
+ ), Ut = (e, t) => Math.max(0, (Date.now() - e - t * 1e3) / 1e3), xr = (e, t) => Math.max(0, (t - e) / 1e3), Er = (e, t = 0) => {
1340
+ const o = t < 0 ? 0 : t, s = ["bytes", "kb", "mb", "gb", "tb", "pb", "eb", "zb", "yb"], l = Math.floor(Math.log(e) / Math.log(1024));
1341
+ return `${parseFloat((e / Math.pow(1024, l)).toFixed(o))}${s[l]}`;
1342
+ };
1343
+ function Rr({
1344
+ isAuto: e,
1345
+ level: t,
1346
+ levels: n
1347
+ }) {
1348
+ const o = n.length, s = [];
1349
+ return o > 1 && s.push({
1350
+ sid: "quality-level-auto",
1351
+ label: "Auto",
1352
+ value: -1,
1353
+ selected: e || t === -1
1354
+ }), n.sort(function(l, u) {
1355
+ const i = l.height || l.bitrate || 0, c = u.height || u.bitrate || 0;
1356
+ return i === c ? 0 : i > c ? 1 : -1;
1357
+ }), n.map((l) => {
1358
+ const { bitrate: u, height: i, index: c } = l;
1359
+ s.push({
1360
+ sid: `quality-level-${c}`,
1361
+ label: i ? `${i}p` : Er(u),
1362
+ value: c,
1363
+ selected: o === 1 || !e && c === t
1364
+ });
1365
+ }), s;
1366
+ }
1367
+ function Sr({ callback: e }) {
1368
+ const t = A((l) => l.delay), n = A((l) => l.startDate), o = n ? n.getTime() : 0, s = f((l) => l.eventEmitter);
1369
+ return N(() => {
1370
+ const l = () => e("timeUpdate", {
1371
+ currentTime: Ut(o, t),
1372
+ duration: -1
1373
+ });
1374
+ return s.on("timeUpdate", l), () => {
1375
+ s.off("timeUpdate", l);
1376
+ };
1377
+ }, [e, s]), /* @__PURE__ */ a.jsx(At, { callback: e });
1284
1378
  }
1285
- function Bt() {
1286
- const e = f((i) => i.exitFullscreen), t = f((i) => i.isFullscreen), n = f((i) => i.isFullscreenReady), o = f((i) => i.requestFullscreen), s = f((i) => i.setVolume), l = f((i) => i.volume), u = M(
1379
+ function Wt() {
1380
+ const e = f((i) => i.exitFullscreen), t = f((i) => i.isFullscreen), n = f((i) => i.isFullscreenReady), o = f((i) => i.requestFullscreen), s = f((i) => i.setVolume), l = f((i) => i.volume), u = U(
1287
1381
  (i) => {
1288
1382
  let c = !1;
1289
1383
  if (!(i.target instanceof HTMLInputElement || i.ctrlKey)) {
@@ -1313,12 +1407,12 @@ function Bt() {
1313
1407
  l
1314
1408
  ]
1315
1409
  );
1316
- return V(() => (document.addEventListener("keydown", u), () => {
1410
+ return N(() => (document.addEventListener("keydown", u), () => {
1317
1411
  document.removeEventListener("keydown", u);
1318
1412
  }), [u]), null;
1319
1413
  }
1320
- function Mr() {
1321
- const e = O((i) => i.delay), t = f((i) => i.isPlaying), n = f((i) => i.pause), o = f((i) => i.getPauseTimeDiff), s = f((i) => i.play), l = O((i) => i.setDelay), u = M(
1414
+ function Pr() {
1415
+ const e = A((i) => i.delay), t = f((i) => i.isPlaying), n = f((i) => i.pause), o = f((i) => i.getPauseTimeDiff), s = f((i) => i.play), l = A((i) => i.setDelay), u = U(
1322
1416
  (i) => {
1323
1417
  let c = !1;
1324
1418
  if (!(i.target instanceof HTMLInputElement || i.ctrlKey)) {
@@ -1333,8 +1427,8 @@ function Mr() {
1333
1427
  if (t)
1334
1428
  n();
1335
1429
  else {
1336
- const h = o();
1337
- h && l(e + h), s();
1430
+ const d = o();
1431
+ d && l(e + d), s();
1338
1432
  }
1339
1433
  c = !0;
1340
1434
  break;
@@ -1344,248 +1438,355 @@ function Mr() {
1344
1438
  },
1345
1439
  [e, o, t, n, s, l]
1346
1440
  );
1347
- return V(() => (document.addEventListener("keydown", u), () => {
1441
+ return N(() => (document.addEventListener("keydown", u), () => {
1348
1442
  document.removeEventListener("keydown", u);
1349
- }), [u]), /* @__PURE__ */ a.jsx(Bt, {});
1350
- }
1351
- function Wt({ children: e }) {
1352
- return /* @__PURE__ */ a.jsx(Lr, { children: e });
1443
+ }), [u]), /* @__PURE__ */ a.jsx(Wt, {});
1353
1444
  }
1354
- function Vr({ children: e }) {
1355
- return /* @__PURE__ */ a.jsx(ur, { children: /* @__PURE__ */ a.jsx(Wt, { children: e }) });
1445
+ function zt({ children: e }) {
1446
+ return /* @__PURE__ */ a.jsx(pr, { children: e });
1356
1447
  }
1357
- const zt = (e, t = 0) => parseInt(
1358
- Math.max(0, (Date.now() - (e + t * 1e3)) / 1e3).toFixed(0)
1359
- ), Or = (e, t) => Math.max(0, (Date.now() - e - t * 1e3) / 1e3), Hr = (e, t) => Math.max(0, (t - e) / 1e3), Ar = (e, t = 0) => {
1360
- const o = t < 0 ? 0 : t, s = ["bytes", "kb", "mb", "gb", "tb", "pb", "eb", "zb", "yb"], l = Math.floor(Math.log(e) / Math.log(1024));
1361
- return `${parseFloat((e / Math.pow(1024, l)).toFixed(o))}${s[l]}`;
1362
- };
1363
- function $r({
1364
- isAuto: e,
1365
- level: t,
1366
- levels: n
1367
- }) {
1368
- const o = n.length, s = [];
1369
- return o > 1 && s.push({
1370
- sid: "quality-level-auto",
1371
- label: "Auto",
1372
- value: -1,
1373
- selected: e || t === -1
1374
- }), n.sort(function(l, u) {
1375
- const i = l.height || l.bitrate || 0, c = u.height || u.bitrate || 0;
1376
- return i === c ? 0 : i > c ? 1 : -1;
1377
- }), n.map((l) => {
1378
- const { bitrate: u, height: i, index: c } = l;
1379
- s.push({
1380
- sid: `quality-level-${c}`,
1381
- label: i ? `${i}p` : Ar(u),
1382
- value: c,
1383
- selected: o === 1 || !e && c === t
1384
- });
1385
- }), s;
1386
- }
1387
- function Ur({ url: e, isLive: t }) {
1388
- const n = A(null), o = f((g) => g.level), s = f((g) => g.levels), l = f((g) => g.setLevel), u = f((g) => g.setLevels), i = f((g) => g.techRef), c = f((g) => g.setError), h = A(0), v = A(null), C = 50, R = 1e4, _ = M(
1389
- (g) => {
1390
- if (n.current && (n.current.nextLevel = g, l(null), s)) {
1391
- const k = s.map((p) => he(j({}, p), {
1392
- selected: p.value === g
1448
+ function Lr({ children: e }) {
1449
+ return /* @__PURE__ */ a.jsx(Xn, { children: /* @__PURE__ */ a.jsx(zt, { children: e }) });
1450
+ }
1451
+ function br({ url: e, isLive: t, messages: n }) {
1452
+ const o = H(null), s = f((T) => T.level), l = f((T) => T.levels), u = f((T) => T.setLevel), i = f((T) => T.setLevels), c = f((T) => T.techRef), d = f((T) => T.setError), g = H(0), y = H(null), v = 50, C = 1e4, j = U(
1453
+ (T) => {
1454
+ if (o.current && (o.current.nextLevel = T, u(null), l)) {
1455
+ const I = l.map((p) => ve(b({}, p), {
1456
+ selected: p.value === T
1393
1457
  }));
1394
- u(k);
1458
+ i(I);
1395
1459
  }
1396
1460
  },
1397
- [s, l, u, n]
1398
- ), b = M(() => {
1399
- n.current && (console.log("[Player][HLS] MEDIA_ATTACHED"), n.current.loadSource(e));
1400
- }, [e]), H = M(() => {
1401
- if (!n.current) return;
1402
- console.log("[Player][HLS] MANIFEST_LOADED"), c(null), v.current && (clearTimeout(v.current), v.current = null), h.current = 0;
1403
- const g = n.current.levels, k = n.current.currentLevel, p = n.current.autoLevelEnabled;
1404
- u(
1405
- $r({
1406
- levels: g.map((q, Q) => {
1407
- const { bitrate: ee, height: X, width: W } = q;
1461
+ [l, u, i, o]
1462
+ ), S = U(() => {
1463
+ o.current && (console.log("[Player][HLS] MEDIA_ATTACHED"), o.current.loadSource(e));
1464
+ }, [e]), L = U(() => {
1465
+ if (!o.current) return;
1466
+ console.log("[Player][HLS] MANIFEST_LOADED"), d(null), y.current && (clearTimeout(y.current), y.current = null), g.current = 0;
1467
+ const T = o.current.levels, I = o.current.currentLevel, p = o.current.autoLevelEnabled;
1468
+ i(
1469
+ Rr({
1470
+ levels: T.map((B, J) => {
1471
+ const { bitrate: q, height: V, width: D } = B;
1408
1472
  return {
1409
- bitrate: ee,
1410
- height: X,
1411
- index: Q,
1412
- width: W
1473
+ bitrate: q,
1474
+ height: V,
1475
+ index: J,
1476
+ width: D
1413
1477
  };
1414
1478
  }),
1415
- level: k,
1479
+ level: I,
1416
1480
  isAuto: p
1417
1481
  })
1418
1482
  );
1419
- }, [c, u]), L = M(
1483
+ }, [d, i]), M = U(
1420
1484
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1421
- (g, k) => {
1422
- if (console.error("[Player][HLS] ERROR", g, k), !!n.current)
1423
- switch (k.type) {
1424
- case K.ErrorTypes.NETWORK_ERROR:
1425
- console.log("[Player][HLS] NETWORK_ERROR", k), t ? k.details === "manifestLoadError" && (h.current < C && (v.current && clearTimeout(v.current), h.current += 1, v.current = setTimeout(() => {
1426
- if (n.current)
1485
+ (T, I) => {
1486
+ var p;
1487
+ if (console.error("[Player][HLS] ERROR", T, I), !!o.current && I.fatal)
1488
+ switch (I.type) {
1489
+ case re.ErrorTypes.NETWORK_ERROR:
1490
+ console.log("[Player][HLS] NETWORK_ERROR", I), t ? I.details === "manifestLoadError" && (g.current < v && (y.current && clearTimeout(y.current), g.current += 1, y.current = setTimeout(() => {
1491
+ if (o.current)
1427
1492
  try {
1428
- console.log("[Player][HLS] Retrying stream..."), n.current.loadSource(e);
1429
- } catch (p) {
1430
- console.error("[Player][HLS] Retry failed:", p);
1493
+ console.log("[Player][HLS] Retrying stream..."), o.current.loadSource(e);
1494
+ } catch (B) {
1495
+ console.error("[Player][HLS] Retry failed:", B);
1431
1496
  }
1432
- }, R)), c({
1433
- message: "Live event will be back shortly.",
1497
+ }, C)), d({
1498
+ message: (p = n == null ? void 0 : n.eventFinished) != null ? p : "Live event will be back shortly.",
1434
1499
  code: "MANIFEST_LOAD_ERROR",
1435
1500
  tech: "hls"
1436
- })) : n.current.startLoad();
1501
+ })) : o.current.startLoad();
1437
1502
  break;
1438
- case K.ErrorTypes.MEDIA_ERROR:
1439
- n.current.recoverMediaError();
1503
+ case re.ErrorTypes.MEDIA_ERROR:
1504
+ o.current.recoverMediaError();
1440
1505
  break;
1441
1506
  }
1442
1507
  },
1443
- [t, e, c]
1444
- ), N = M(() => {
1445
- if (!i.current) return;
1446
- const g = {
1447
- backBufferLength: 10,
1508
+ [t, e, d]
1509
+ ), R = U(() => {
1510
+ if (!c.current) return;
1511
+ let T = {
1448
1512
  startLevel: -1,
1449
1513
  maxBufferSize: 30 * 1024 * 1024
1450
1514
  // 30MB
1451
- }, k = {
1452
- backBufferLength: 60,
1453
- startLevel: -1,
1454
- maxBufferSize: 30 * 1024 * 1024
1455
- // 30MB
1456
- }, p = t ? g : k;
1515
+ };
1516
+ er ? (T.backBufferLength = -1, T.enableWorker = !1) : t ? T.backBufferLength = 10 : T.backBufferLength = 60;
1457
1517
  try {
1458
- console.log("[Player][HLS] URL", e), console.log("[Player][HLS] Config", JSON.stringify(p)), console.log("[Player][HLS] Version", K.version), n.current = new K(p), n.current.attachMedia(i.current), n.current.on(K.Events.MEDIA_ATTACHED, b), n.current.on(K.Events.MANIFEST_LOADED, H), n.current.on(K.Events.ERROR, L);
1459
- } catch (q) {
1460
- throw new Error(`Error initializing Hls: ${q}`);
1518
+ console.log("[Player][HLS] URL", e), console.log("[Player][HLS] Config", JSON.stringify(T)), console.log("[Player][HLS] Version", re.version), o.current = new re(T), o.current.attachMedia(c.current), o.current.on(re.Events.MEDIA_ATTACHED, S), o.current.on(re.Events.MANIFEST_LOADED, L), o.current.on(re.Events.ERROR, M);
1519
+ } catch (I) {
1520
+ throw new Error(`Error initializing Hls: ${I}`);
1461
1521
  }
1462
1522
  }, [
1463
- H,
1464
- b,
1465
1523
  L,
1524
+ S,
1525
+ M,
1466
1526
  t,
1467
- i,
1527
+ c,
1468
1528
  e
1469
- ]), S = M(() => {
1470
- n.current && (n.current.off(K.Events.MEDIA_ATTACHED, b), n.current.off(K.Events.MANIFEST_LOADED, H), n.current.off(K.Events.ERROR, L), n.current.destroy(), n.current = null), v.current && (clearTimeout(v.current), v.current = null), h.current = 0;
1471
- }, [H, b, L]);
1472
- return V(() => {
1473
- o !== null && _(o);
1474
- }, [o, _]), V(() => (K.isSupported() && N(), S), [S, N]), null;
1475
- }
1476
- const Br = "_video_14rmx_1", Wr = {
1477
- video: Br
1529
+ ]), k = U(() => {
1530
+ o.current && (o.current.off(re.Events.MEDIA_ATTACHED, S), o.current.off(re.Events.MANIFEST_LOADED, L), o.current.off(re.Events.ERROR, M), o.current.destroy(), o.current = null), y.current && (clearTimeout(y.current), y.current = null), g.current = 0;
1531
+ }, [L, S, M]);
1532
+ return N(() => {
1533
+ s !== null && j(s);
1534
+ }, [s, j]), N(() => (re.isSupported() && R(), k), [k, R]), null;
1535
+ }
1536
+ const jr = "_playerVideo_wc0sm_1", kr = {
1537
+ playerVideo: jr
1478
1538
  };
1479
- function Zt({ url: e, isLive: t, isMuted: n = !1 }) {
1480
- const o = f((p) => p.handleDurationChange), s = f((p) => p.handleEnd), l = f((p) => p.handleLoadedMetadata), u = f((p) => p.handleLoadStart), i = f((p) => p.handlePause), c = f((p) => p.handlePlay), h = f((p) => p.handlePlaying), v = f((p) => p.handleSeeked), C = f((p) => p.handleSeeking), R = f((p) => p.handleTimeUpdate), _ = f((p) => p.handleWaiting), b = f((p) => p.handleVolumeChange), H = f((p) => p.handleError), L = f((p) => p.techRef), N = A(null), S = () => t ? {} : {
1481
- onDurationChange: o,
1482
- onSeeked: v,
1483
- onSeeking: C,
1484
- onTimeUpdate: g
1485
- }, g = () => {
1486
- (!N.current || Date.now() - N.current >= 1e3) && (R(), N.current = Date.now());
1487
- }, k = S();
1539
+ function qt({
1540
+ url: e,
1541
+ isLive: t,
1542
+ isMuted: n = !1,
1543
+ messages: o = {}
1544
+ }) {
1545
+ const s = f((p) => p.handleDurationChange), l = f((p) => p.handleEnd), u = f((p) => p.handleLoadedMetadata), i = f((p) => p.handleLoadStart), c = f((p) => p.handlePause), d = f((p) => p.handlePlay), g = f((p) => p.handlePlaying), y = f((p) => p.handleSeeked), v = f((p) => p.handleSeeking), C = f((p) => p.handleTimeUpdate), j = f((p) => p.handleWaiting), S = f((p) => p.handleVolumeChange), L = f((p) => p.handleError), M = f((p) => p.techRef), R = H(null), k = () => t ? {} : {
1546
+ onDurationChange: s,
1547
+ onSeeked: y,
1548
+ onSeeking: v,
1549
+ onTimeUpdate: T
1550
+ }, T = () => {
1551
+ (!R.current || Date.now() - R.current >= 1e3) && (C(), R.current = Date.now());
1552
+ }, I = k();
1488
1553
  return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1489
- /* @__PURE__ */ a.jsx(Ur, { isLive: t, url: e }),
1554
+ /* @__PURE__ */ a.jsx(br, { isLive: t, url: e, messages: o }),
1490
1555
  /* @__PURE__ */ a.jsx(
1491
1556
  "video",
1492
- j({
1493
- ref: L,
1494
- className: Wr.video,
1557
+ b({
1558
+ ref: M,
1559
+ className: kr.playerVideo,
1495
1560
  playsInline: !0,
1496
1561
  autoPlay: !0,
1497
1562
  controls: !1,
1498
1563
  muted: n,
1499
1564
  preload: "auto",
1500
1565
  crossOrigin: "anonymous",
1501
- onEnded: s,
1502
- onError: H,
1503
- onLoadedMetadata: l,
1504
- onLoadStart: u,
1505
- onPause: i,
1506
- onPlay: c,
1507
- onPlaying: h,
1508
- onWaiting: _,
1509
- onVolumeChange: b,
1566
+ onEnded: l,
1567
+ onError: L,
1568
+ onLoadedMetadata: u,
1569
+ onLoadStart: i,
1570
+ onPause: c,
1571
+ onPlay: d,
1572
+ onPlaying: g,
1573
+ onWaiting: j,
1574
+ onVolumeChange: S,
1510
1575
  tabIndex: -1
1511
- }, k)
1576
+ }, I)
1512
1577
  )
1513
1578
  ] });
1514
1579
  }
1515
- function zr({ url: e }) {
1516
- const [t, n] = U(null), o = O((l) => l.delay), s = M(async () => {
1517
- n(
1518
- o ? e.replace("-live", "-catchup").replace("playlist.m3u8", `playlist_fmp4_dvr_timeshift-${o}.m3u8`) : e
1580
+ function Ir({ url: e, messages: t = {} }) {
1581
+ const [n, o] = X(null), s = A((u) => u.delay), l = U(async () => {
1582
+ o(
1583
+ s ? e.replace("-live", "-catchup").replace("playlist.m3u8", `playlist_fmp4_dvr_timeshift-${s}.m3u8`) : e
1519
1584
  );
1520
- }, [o, e]);
1521
- return V(() => {
1522
- s();
1523
- }, [s]), t ? /* @__PURE__ */ a.jsx(Zt, { url: t, isLive: !0 }) : null;
1585
+ }, [s, e]);
1586
+ return N(() => {
1587
+ l();
1588
+ }, [l]), n ? /* @__PURE__ */ a.jsx(qt, { url: n, isLive: !0, messages: t }) : null;
1524
1589
  }
1525
- const Zr = "_toggleButton_m3he7_1", qr = {
1526
- toggleButton: Zr
1527
- };
1528
- function qt(o) {
1529
- var s = o, {
1590
+ function Dr(e, {
1591
+ defaultValue: t = !1,
1592
+ initializeWithValue: n = !0
1593
+ } = {}) {
1594
+ const o = (i) => typeof window == "undefined" ? t : window.matchMedia(i).matches, [s, l] = X(() => n ? o(e) : t);
1595
+ function u() {
1596
+ l(o(e));
1597
+ }
1598
+ return Nt(() => {
1599
+ if (typeof window == "undefined")
1600
+ return;
1601
+ const i = window.matchMedia(e);
1602
+ return u(), i.addListener ? i.addListener(u) : i.addEventListener("change", u), () => {
1603
+ i.removeListener ? i.removeListener(u) : i.removeEventListener("change", u);
1604
+ };
1605
+ }, [e]), s;
1606
+ }
1607
+ const Fr = "_playbackButton_lgsgw_1", Mr = "_seekIndicator_lgsgw_23", Nr = "_seekIndicatorLeft_lgsgw_49", Vr = "_seekIndicatorRight_lgsgw_53", Or = "_seekIndicatorVisible_lgsgw_57", he = {
1608
+ playbackButton: Fr,
1609
+ seekIndicator: Mr,
1610
+ seekIndicatorLeft: Nr,
1611
+ seekIndicatorRight: Vr,
1612
+ seekIndicatorVisible: Or
1613
+ }, Hr = 10;
1614
+ function Zt(i) {
1615
+ var c = i, {
1530
1616
  className: e,
1531
- onClick: t
1532
- } = s, n = G(s, [
1617
+ onClick: t,
1618
+ onForwardSeek: n,
1619
+ onBackwardSeek: o,
1620
+ maxForwardTime: s,
1621
+ maxBackwardTime: l
1622
+ } = c, u = ne(c, [
1533
1623
  "className",
1534
- "onClick"
1624
+ "onClick",
1625
+ "onForwardSeek",
1626
+ "onBackwardSeek",
1627
+ "maxForwardTime",
1628
+ "maxBackwardTime"
1535
1629
  ]);
1536
- const l = A(null), u = f((_) => _.exitFullscreen), i = f((_) => _.isFullscreen), c = f((_) => _.requestFullscreen), h = (_) => {
1537
- R() ? (C(), i ? u() : c()) : v(_);
1538
- }, v = (_) => {
1630
+ return Dr("(min-width: 1024px)") ? /* @__PURE__ */ a.jsx($r, b({ className: e, onClick: t }, u)) : /* @__PURE__ */ a.jsx(
1631
+ Ar,
1632
+ b({
1633
+ className: e,
1634
+ maxForwardTime: s,
1635
+ maxBackwardTime: l,
1636
+ onForwardSeek: n,
1637
+ onBackwardSeek: o
1638
+ }, u)
1639
+ );
1640
+ }
1641
+ function $r(o) {
1642
+ var s = o, { className: e, onClick: t } = s, n = ne(s, ["className", "onClick"]);
1643
+ const l = H(null), u = f((C) => C.exitFullscreen), i = f((C) => C.isFullscreen), c = f((C) => C.requestFullscreen), d = (C) => {
1644
+ v() ? (y(), i ? u() : c()) : g(C);
1645
+ }, g = (C) => {
1539
1646
  l.current = window.setTimeout(() => {
1540
- t == null || t(_), C();
1647
+ t == null || t(C), y();
1541
1648
  }, 200);
1542
- }, C = () => {
1649
+ }, y = () => {
1543
1650
  l.current !== null && (window.clearTimeout(l.current), l.current = null);
1544
- }, R = () => l.current !== null;
1545
- return V(() => () => {
1546
- C();
1651
+ }, v = () => l.current !== null;
1652
+ return N(() => () => {
1653
+ y();
1547
1654
  }, []), /* @__PURE__ */ a.jsx(
1548
1655
  "button",
1549
- j({
1550
- onClick: h,
1551
- className: [qr.toggleButton, e].filter(Boolean).join(" "),
1552
- "aria-label": "Player playback indicator"
1656
+ b({
1657
+ onClick: d,
1658
+ className: [he.playbackButton, e].filter(Boolean).join(" "),
1659
+ "aria-label": "Player gestures"
1553
1660
  }, n)
1554
1661
  );
1555
1662
  }
1556
- function Yr() {
1557
- const e = f((i) => i.isPlaying), t = f((i) => i.pause), n = f((i) => i.getPauseTimeDiff), o = f((i) => i.play), s = O((i) => i.delay), l = O((i) => i.setDelay), u = () => {
1558
- if (e)
1559
- t();
1560
- else {
1561
- const i = n();
1562
- i && l(s + i), o();
1563
- }
1663
+ function Ar(u) {
1664
+ var i = u, {
1665
+ className: e,
1666
+ maxForwardTime: t,
1667
+ maxBackwardTime: n,
1668
+ onForwardSeek: o,
1669
+ onBackwardSeek: s
1670
+ } = i, l = ne(i, [
1671
+ "className",
1672
+ "maxForwardTime",
1673
+ "maxBackwardTime",
1674
+ "onForwardSeek",
1675
+ "onBackwardSeek"
1676
+ ]);
1677
+ const c = H(null), d = H({
1678
+ single: null,
1679
+ indicator: null,
1680
+ accumulate: null
1681
+ }), g = H(null), y = H(0), v = H(null), [C, j] = X({ visible: !1, direction: null, time: 0 }), S = f((p) => p.isIdle), L = f((p) => p.setIsIdle), M = f((p) => p.resetIdle), R = (p, B) => p < B / 2 ? "backward" : "forward", k = (p) => {
1682
+ if (!g.current) return;
1683
+ const B = p.changedTouches[0];
1684
+ if (!B) return;
1685
+ const J = Date.now(), q = g.current.getBoundingClientRect(), V = B.clientX - q.left, D = B.clientY - q.top;
1686
+ if (V < 0 || V > q.width || D < 0 || D > q.height)
1687
+ return;
1688
+ const Q = c.current, Z = Q ? J - Q.time : 1 / 0, W = R(V, q.width), oe = v.current !== null && v.current === W && Q !== null && Z < 700 && Math.abs(V - Q.x) < 100;
1689
+ if (Q !== null && v.current === null && Z < 300 && Math.abs(V - Q.x) < 50 || oe) {
1690
+ p.preventDefault(), p.stopPropagation(), d.current.single && (window.clearTimeout(d.current.single), d.current.single = null), M(), (v.current === null || v.current !== W) && (y.current = 0, v.current = W);
1691
+ const te = W === "backward" ? n : t;
1692
+ y.current = Math.min(
1693
+ y.current + Hr,
1694
+ te != null ? te : 1 / 0
1695
+ ), T(W, y.current), d.current.accumulate && window.clearTimeout(d.current.accumulate), d.current.accumulate = window.setTimeout(() => {
1696
+ const z = y.current;
1697
+ z > 0 && (v.current === "backward" ? s == null || s(z) : o == null || o(z), y.current = 0, v.current = null, c.current = null, I(), M()), d.current.accumulate = null;
1698
+ }, 500), c.current = { time: J, x: V };
1699
+ } else {
1700
+ c.current = { time: J, x: V }, d.current.single && window.clearTimeout(d.current.single);
1701
+ const te = v.current !== null ? 700 : 350;
1702
+ d.current.single = window.setTimeout(() => {
1703
+ if (v.current === null) {
1704
+ d.current.single = null;
1705
+ const z = S;
1706
+ L(!z), z && M();
1707
+ }
1708
+ c.current = null;
1709
+ }, te);
1710
+ }
1711
+ }, T = (p, B) => {
1712
+ j({ visible: !0, direction: p, time: B }), d.current.indicator && window.clearTimeout(d.current.indicator), d.current.indicator = window.setTimeout(() => {
1713
+ I();
1714
+ }, 700);
1715
+ }, I = () => {
1716
+ j({ visible: !1, direction: null, time: 0 }), d.current.indicator && (window.clearTimeout(d.current.indicator), d.current.indicator = null);
1564
1717
  };
1565
- return /* @__PURE__ */ a.jsx(qt, { onClick: u });
1718
+ return N(() => () => {
1719
+ d.current.single && window.clearTimeout(d.current.single), d.current.indicator && window.clearTimeout(d.current.indicator), d.current.accumulate && window.clearTimeout(d.current.accumulate);
1720
+ }, []), /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1721
+ /* @__PURE__ */ a.jsx(
1722
+ "button",
1723
+ b({
1724
+ ref: g,
1725
+ onTouchEnd: k,
1726
+ className: [he.playbackButton, e].filter(Boolean).join(" "),
1727
+ "aria-label": "Player gestures"
1728
+ }, l)
1729
+ ),
1730
+ C.visible && /* @__PURE__ */ a.jsxs(
1731
+ "div",
1732
+ {
1733
+ className: `${he.seekIndicator} ${he.seekIndicatorVisible} ${C.direction === "backward" ? he.seekIndicatorLeft : he.seekIndicatorRight}`,
1734
+ children: [
1735
+ C.direction === "backward" ? "-" : "+",
1736
+ Te(C.time)
1737
+ ]
1738
+ }
1739
+ )
1740
+ ] });
1566
1741
  }
1567
- const Kr = "_button_e9zrb_1", Xr = "_buttonCircle_e9zrb_43", wt = {
1568
- button: Kr,
1569
- buttonCircle: Xr
1570
- }, oe = De(
1742
+ function Br() {
1743
+ const e = f((c) => c.isPlaying), t = f((c) => c.pause), n = f((c) => c.getPauseTimeDiff), o = f((c) => c.play), s = A((c) => c.delay), l = A((c) => c.setDelay), u = A((c) => c.startDate), i = u ? u.getTime() : 0;
1744
+ return /* @__PURE__ */ a.jsx(
1745
+ Zt,
1746
+ {
1747
+ onClick: () => {
1748
+ if (e)
1749
+ t();
1750
+ else {
1751
+ const c = n();
1752
+ c && l(s + c), o();
1753
+ }
1754
+ },
1755
+ onBackwardSeek: (c) => {
1756
+ const d = s + c;
1757
+ l(d);
1758
+ },
1759
+ onForwardSeek: (c) => {
1760
+ const d = Math.max(0, s - c);
1761
+ l(d);
1762
+ },
1763
+ maxBackwardTime: Math.floor(i),
1764
+ maxForwardTime: Math.floor(s)
1765
+ }
1766
+ );
1767
+ }
1768
+ const Ur = "_playerButton_izwqq_1", Wr = "_playerButtonCircle_izwqq_42", gt = {
1769
+ playerButton: Ur,
1770
+ playerButtonCircle: Wr
1771
+ }, le = De(
1571
1772
  (s, o) => {
1572
- var l = s, { shape: e = "circle", className: t } = l, n = G(l, ["shape", "className"]);
1573
- const u = e === "circle" ? wt.buttonCircle : "", i = [wt.button, u, t].filter(Boolean).join(" ");
1574
- return /* @__PURE__ */ a.jsx("button", j({ ref: o, className: i }, n));
1773
+ var l = s, { shape: e = "circle", className: t } = l, n = ne(l, ["shape", "className"]);
1774
+ const u = e === "circle" ? gt.playerButtonCircle : "", i = [gt.playerButton, u, t].filter(Boolean).join(" ");
1775
+ return /* @__PURE__ */ a.jsx("button", b({ ref: o, className: i }, n));
1575
1776
  }
1576
1777
  );
1577
- oe.displayName = "PlayerButton";
1578
- const Jr = "_liveIndicator_1k5fh_1", Gr = "_liveIndicatorHasDelay_1k5fh_8", Qr = "_liveIndicatorNoDelay_1k5fh_12", Se = {
1579
- liveIndicator: Jr,
1580
- liveIndicatorHasDelay: Gr,
1581
- liveIndicatorNoDelay: Qr
1778
+ le.displayName = "PlayerButton";
1779
+ const zr = "_liveIndicator_1jczn_1", qr = "_liveIndicatorHasDelay_1jczn_9", Zr = "_liveIndicatorNoDelay_1jczn_13", be = {
1780
+ liveIndicator: zr,
1781
+ liveIndicatorHasDelay: qr,
1782
+ liveIndicatorNoDelay: Zr
1582
1783
  };
1583
- function eo(n) {
1584
- var o = n, { message: e } = o, t = G(o, ["message"]);
1585
- const s = O((c) => c.delay), l = O((c) => c.setDelay), u = () => {
1784
+ function Yr(n) {
1785
+ var o = n, { message: e } = o, t = ne(o, ["message"]);
1786
+ const s = A((c) => c.delay), l = A((c) => c.setDelay), u = () => {
1586
1787
  s && l(0);
1587
- }, i = s ? `${Se.liveIndicator} ${Se.liveIndicatorHasDelay}` : `${Se.liveIndicator} ${Se.liveIndicatorNoDelay}`;
1588
- return /* @__PURE__ */ a.jsxs(oe, he(j({ onClick: u, shape: "square" }, t), { children: [
1788
+ }, i = s ? `${be.liveIndicator} ${be.liveIndicatorHasDelay}` : `${be.liveIndicator} ${be.liveIndicatorNoDelay}`;
1789
+ return /* @__PURE__ */ a.jsxs(le, ve(b({ onClick: u, shape: "square" }, t), { children: [
1589
1790
  /* @__PURE__ */ a.jsx("div", { className: i }),
1590
1791
  e || "Live"
1591
1792
  ] }));
@@ -1612,8 +1813,8 @@ function Kt() {
1612
1813
  }
1613
1814
  );
1614
1815
  }
1615
- function to() {
1616
- const e = f((i) => i.isPlaying), t = f((i) => i.pause), n = f((i) => i.getPauseTimeDiff), o = f((i) => i.play), s = O((i) => i.delay), l = O((i) => i.setDelay), u = () => {
1816
+ function Kr() {
1817
+ const e = f((i) => i.isPlaying), t = f((i) => i.pause), n = f((i) => i.getPauseTimeDiff), o = f((i) => i.play), s = A((i) => i.delay), l = A((i) => i.setDelay), u = () => {
1617
1818
  if (e)
1618
1819
  t();
1619
1820
  else {
@@ -1621,29 +1822,29 @@ function to() {
1621
1822
  i && l(s + i), o();
1622
1823
  }
1623
1824
  };
1624
- return /* @__PURE__ */ a.jsx(oe, { onClick: u, children: e ? /* @__PURE__ */ a.jsx(Yt, {}) : /* @__PURE__ */ a.jsx(Kt, {}) });
1625
- }
1626
- const no = "_progressSlider_hwzgf_1", ro = "_tipContainer_hwzgf_7", oo = "_tipContainerVisible_hwzgf_17", io = "_tipContainerHidden_hwzgf_22", so = "_tipContent_hwzgf_27", ge = {
1627
- progressSlider: no,
1628
- tipContainer: ro,
1629
- tipContainerVisible: oo,
1630
- tipContainerHidden: io,
1631
- tipContent: so
1632
- }, Xt = ge.progressSlider, Jt = ge.tipContainer, Gt = ge.tipContainerVisible, Qt = ge.tipContainerHidden, en = ge.tipContent, ao = "_sliderRoot_aeak6_1", lo = "_sliderTrack_aeak6_18", co = "_sliderRange_aeak6_28", uo = "_sliderThumb_aeak6_37", Pe = {
1633
- sliderRoot: ao,
1634
- sliderTrack: lo,
1635
- sliderRange: co,
1636
- sliderThumb: uo
1637
- }, Ie = De((l, s) => {
1638
- var u = l, { max: e = 100, min: t = 0, className: n } = u, o = G(u, ["max", "min", "className"]);
1825
+ return /* @__PURE__ */ a.jsx(le, { onClick: u, children: e ? /* @__PURE__ */ a.jsx(Yt, {}) : /* @__PURE__ */ a.jsx(Kt, {}) });
1826
+ }
1827
+ const Xr = "_progressSlider_hwzgf_1", Gr = "_tipContainer_hwzgf_7", Jr = "_tipContainerVisible_hwzgf_17", Qr = "_tipContainerHidden_hwzgf_22", eo = "_tipContent_hwzgf_27", ie = {
1828
+ progressSlider: Xr,
1829
+ tipContainer: Gr,
1830
+ tipContainerVisible: Jr,
1831
+ tipContainerHidden: Qr,
1832
+ tipContent: eo
1833
+ }, to = "_sliderRoot_aeak6_1", no = "_sliderTrack_aeak6_18", ro = "_sliderRange_aeak6_28", oo = "_sliderThumb_aeak6_37", je = {
1834
+ sliderRoot: to,
1835
+ sliderTrack: no,
1836
+ sliderRange: ro,
1837
+ sliderThumb: oo
1838
+ }, Fe = De((l, s) => {
1839
+ var u = l, { max: e = 100, min: t = 0, className: n } = u, o = ne(u, ["max", "min", "className"]);
1639
1840
  return /* @__PURE__ */ a.jsxs(
1640
- Te.Root,
1641
- he(j({
1841
+ Pe.Root,
1842
+ ve(b({
1642
1843
  ref: s,
1643
1844
  min: t,
1644
1845
  max: e,
1645
1846
  "aria-label": "Player progress",
1646
- className: [Pe.sliderRoot, n].filter(Boolean).join(" "),
1847
+ className: [je.sliderRoot, n].filter(Boolean).join(" "),
1647
1848
  onKeyDown: (i) => (
1648
1849
  // Prevent the slider from being controlled by the keyboard
1649
1850
  // when the slider is focused by a click
@@ -1651,14 +1852,14 @@ const no = "_progressSlider_hwzgf_1", ro = "_tipContainer_hwzgf_7", oo = "_tipCo
1651
1852
  )
1652
1853
  }, o), {
1653
1854
  children: [
1654
- /* @__PURE__ */ a.jsx(Te.Track, { className: Pe.sliderTrack, children: /* @__PURE__ */ a.jsx(Te.Range, { className: Pe.sliderRange }) }),
1655
- /* @__PURE__ */ a.jsx(Te.Thumb, { className: Pe.sliderThumb })
1855
+ /* @__PURE__ */ a.jsx(Pe.Track, { className: je.sliderTrack, children: /* @__PURE__ */ a.jsx(Pe.Range, { className: je.sliderRange }) }),
1856
+ /* @__PURE__ */ a.jsx(Pe.Thumb, { className: je.sliderThumb })
1656
1857
  ]
1657
1858
  })
1658
1859
  );
1659
1860
  });
1660
- Ie.displayName = "PlayerSlider";
1661
- function ke(e) {
1861
+ Fe.displayName = "PlayerSlider";
1862
+ function Ie(e) {
1662
1863
  const t = e.getBoundingClientRect();
1663
1864
  return e.offsetWidth / e.offsetHeight > e.clientWidth / e.clientHeight ? {
1664
1865
  left: t.left * 100,
@@ -1669,47 +1870,47 @@ function ke(e) {
1669
1870
  height: t.height * 100
1670
1871
  } : t;
1671
1872
  }
1672
- const xt = "vod-player-progress-bar";
1673
- function fo() {
1674
- const e = A(null), t = A(null), [n, o] = U(0), [s, l] = U(0), [u, i] = U(!1), [c, h] = U(-1), [v, C] = U(-1), R = O((I) => I.delay), _ = O((I) => I.startDate), b = _ ? _.getTime() : 0, H = (/* @__PURE__ */ new Date()).getTime(), L = O((I) => I.setDelay), N = f((I) => I.isPlaying), S = f((I) => I.addIdleLock), g = f((I) => I.removeIdleLock), k = M(() => {
1675
- o(Or(b, R)), l(Hr(b, H));
1676
- }, [R, H, b]), p = parseFloat(
1677
- (s ? (v !== -1 ? v : n) / s * 100 : 0).toFixed(1)
1678
- ), q = (I) => {
1679
- C(s * (I[0] / 100)), S(xt);
1680
- }, Q = () => {
1681
- if (v !== -1) {
1682
- const I = zt(b, v);
1683
- L(I), C(-1), g(xt);
1684
- }
1685
- }, ee = () => i(!0), X = () => i(!1), W = M(
1686
- (I) => {
1687
- const le = e.current, z = t.current;
1688
- if (le && z) {
1689
- const Y = ke(le), te = ke(z), ce = (I.pageX || I.clientX) - Y.left, ue = ce / Y.width;
1690
- if (ue < 0) return;
1691
- let J = ce - te.width / 2;
1692
- J < 0 && (J = 0), J > Y.width - te.width && (J = -1), z.style.left = J > -1 ? `${J}px` : "auto", z.style.right = J > -1 ? "auto" : "0px";
1693
- const de = s - ue * s;
1694
- h(de > 0 ? de : 0);
1873
+ const wt = "vod-player-progress-bar";
1874
+ function io() {
1875
+ const e = H(null), t = H(null), [n, o] = X(0), [s, l] = X(0), [u, i] = X(!1), [c, d] = X(-1), [g, y] = X(-1), v = A((D) => D.delay), C = A((D) => D.startDate), j = C ? C.getTime() : 0, S = (/* @__PURE__ */ new Date()).getTime(), L = A((D) => D.setDelay), M = f((D) => D.isPlaying), R = f((D) => D.addIdleLock), k = f((D) => D.removeIdleLock), T = U(() => {
1876
+ o(Ut(j, v)), l(xr(j, S));
1877
+ }, [v, S, j]), I = parseFloat(
1878
+ (s ? (g !== -1 ? g : n) / s * 100 : 0).toFixed(1)
1879
+ ), p = (D) => {
1880
+ y(s * (D[0] / 100)), R(wt);
1881
+ }, B = () => {
1882
+ if (g !== -1) {
1883
+ const D = Bt(j, g);
1884
+ L(D), y(-1), k(wt);
1885
+ }
1886
+ }, J = () => i(!0), q = () => i(!1), V = U(
1887
+ (D) => {
1888
+ const Q = e.current, Z = t.current;
1889
+ if (Q && Z) {
1890
+ const W = Ie(Q), oe = Ie(Z), ue = (D.pageX || D.clientX) - W.left, te = ue / W.width;
1891
+ if (te < 0) return;
1892
+ let z = ue - oe.width / 2;
1893
+ z < 0 && (z = 0), z > W.width - oe.width && (z = -1), Z.style.left = z > -1 ? `${z}px` : "auto", Z.style.right = z > -1 ? "auto" : "0px";
1894
+ const me = s - te * s;
1895
+ d(me > 0 ? me : 0);
1695
1896
  }
1696
- ee();
1897
+ J();
1697
1898
  },
1698
1899
  [s]
1699
1900
  );
1700
- return qe(() => k(), N ? 1e3 : null), V(() => {
1701
- k();
1702
- }, [k]), /* @__PURE__ */ a.jsxs("div", { className: Xt, children: [
1901
+ return qe(() => T(), M ? 1e3 : null), N(() => {
1902
+ T();
1903
+ }, [T]), /* @__PURE__ */ a.jsxs("div", { className: ie.progressSlider, children: [
1703
1904
  /* @__PURE__ */ a.jsx(
1704
- Ie,
1905
+ Fe,
1705
1906
  {
1706
1907
  ref: e,
1707
- value: [p],
1708
- onPointerLeave: X,
1709
- onPointerDown: X,
1710
- onPointerMove: W,
1711
- onValueChange: q,
1712
- onValueCommit: Q,
1908
+ value: [I],
1909
+ onPointerLeave: q,
1910
+ onPointerDown: q,
1911
+ onPointerMove: V,
1912
+ onValueChange: p,
1913
+ onValueCommit: B,
1713
1914
  step: 0.1
1714
1915
  }
1715
1916
  ),
@@ -1717,13 +1918,13 @@ function fo() {
1717
1918
  "div",
1718
1919
  {
1719
1920
  ref: t,
1720
- className: `${Jt} ${u ? Gt : Qt}`,
1721
- children: /* @__PURE__ */ a.jsx("p", { className: en, children: `-${be(c)}` })
1921
+ className: `${ie.tipContainer} ${u ? ie.tipContainerVisible : ie.tipContainerHidden}`,
1922
+ children: /* @__PURE__ */ a.jsx("p", { className: ie.tipContent, children: `-${Te(c)}` })
1722
1923
  }
1723
1924
  )
1724
1925
  ] });
1725
1926
  }
1726
- function ho() {
1927
+ function so() {
1727
1928
  return /* @__PURE__ */ a.jsx(
1728
1929
  "svg",
1729
1930
  {
@@ -1734,43 +1935,24 @@ function ho() {
1734
1935
  }
1735
1936
  );
1736
1937
  }
1737
- function mo() {
1738
- const e = O((s) => s.startDate), t = O((s) => s.setDelay), n = e ? e.getTime() : 0, o = () => t(zt(n));
1739
- return /* @__PURE__ */ a.jsx(oe, { onClick: o, children: /* @__PURE__ */ a.jsx(ho, {}) });
1938
+ function ao() {
1939
+ const e = A((s) => s.startDate), t = A((s) => s.setDelay), n = e ? e.getTime() : 0, o = () => t(Bt(n));
1940
+ return /* @__PURE__ */ a.jsx(le, { onClick: o, children: /* @__PURE__ */ a.jsx(so, {}) });
1740
1941
  }
1741
- function tn() {
1942
+ function Xt() {
1742
1943
  const e = f((t) => t.error);
1743
- return e ? /* @__PURE__ */ a.jsxs("div", { className: Le, children: [
1744
- /* @__PURE__ */ a.jsx("h3", { className: je, children: e.message }),
1745
- e.code ? /* @__PURE__ */ a.jsxs("p", { className: ze, children: [
1746
- "Code: ",
1747
- e.code
1748
- ] }) : null,
1749
- e.tech ? /* @__PURE__ */ a.jsxs("p", { className: ze, children: [
1750
- "Engine: ",
1751
- e.tech
1752
- ] }) : null
1753
- ] }) : null;
1754
- }
1755
- function nn({ callback: e }) {
1756
- const t = f((n) => n.eventEmitter);
1757
- return V(() => {
1758
- const n = () => e("play", void 0), o = () => e("pause", void 0), s = () => e("ended", void 0), l = () => e("seeking", void 0), u = () => e("seeked", void 0), i = (L) => e("timeUpdate", L), c = (L) => e("volumeChange", L), h = (L) => e("fullscreenChange", L), v = (L) => e("qualityChange", L), C = (L) => e("loadedMetadata", L), R = () => e("loadStart", void 0), _ = () => e("playing", void 0), b = () => e("waiting", void 0), H = () => e("error", void 0);
1759
- return t.on("play", n), t.on("pause", o), t.on("ended", s), t.on("seeking", l), t.on("seeked", u), t.on("timeUpdate", i), t.on("volumeChange", c), t.on("fullscreenChange", h), t.on("qualityChange", v), t.on("loadedMetadata", C), t.on("loadStart", R), t.on("playing", _), t.on("waiting", b), t.on("error", H), () => {
1760
- t.off("play", n), t.off("pause", o), t.off("ended", s), t.off("seeking", l), t.off("seeked", u), t.off("timeUpdate", i), t.off("volumeChange", c), t.off("fullscreenChange", h), t.off("qualityChange", v), t.off("loadedMetadata", C), t.off("loadStart", R), t.off("playing", _), t.off("waiting", b), t.off("error", H);
1761
- };
1762
- }, [e, t]), null;
1763
- }
1764
- const vo = "_playerContainer_rry4k_1", po = "_controlsBottom_rry4k_29", yo = "_controlsContainer_rry4k_45", go = "_controlsRow_rry4k_61", Co = "_controlsSection_rry4k_68", wo = "_controlsSectionStart_rry4k_75", xo = "_controlsSectionEnd_rry4k_79", re = {
1765
- playerContainer: vo,
1766
- controlsBottom: po,
1767
- controlsContainer: yo,
1768
- controlsRow: go,
1769
- controlsSection: Co,
1770
- controlsSectionStart: wo,
1771
- controlsSectionEnd: xo
1772
- }, rn = re.playerContainer, on = re.controlsBottom, sn = re.controlsContainer, an = re.controlsRow, ln = `${re.controlsSection} ${re.controlsSectionStart}`, cn = `${re.controlsSection} ${re.controlsSectionEnd}`;
1773
- function _o() {
1944
+ return e ? /* @__PURE__ */ a.jsx("div", { className: se.playerNotice, children: /* @__PURE__ */ a.jsx("h3", { className: se.playerNoticeTitle, children: e.message }) }) : null;
1945
+ }
1946
+ const lo = "_playerContainer_1fn8l_1", co = "_controlsBottom_1fn8l_29", uo = "_controlsContainer_1fn8l_45", fo = "_controlsRow_1fn8l_61", ho = "_controlsSection_1fn8l_68", mo = "_controlsSectionStart_1fn8l_78", po = "_controlsSectionEnd_1fn8l_82", Y = {
1947
+ playerContainer: lo,
1948
+ controlsBottom: co,
1949
+ controlsContainer: uo,
1950
+ controlsRow: fo,
1951
+ controlsSection: ho,
1952
+ controlsSectionStart: mo,
1953
+ controlsSectionEnd: po
1954
+ };
1955
+ function vo() {
1774
1956
  return /* @__PURE__ */ a.jsx(
1775
1957
  "svg",
1776
1958
  {
@@ -1781,7 +1963,7 @@ function _o() {
1781
1963
  }
1782
1964
  );
1783
1965
  }
1784
- function Eo() {
1966
+ function yo() {
1785
1967
  return /* @__PURE__ */ a.jsx(
1786
1968
  "svg",
1787
1969
  {
@@ -1792,75 +1974,82 @@ function Eo() {
1792
1974
  }
1793
1975
  );
1794
1976
  }
1795
- function un() {
1796
- const e = f((h) => h.containerRef), t = f((h) => h.exitFullscreen), n = f((h) => h.isFullscreen), o = f((h) => h.requestFullscreen), s = f((h) => h.setIsFullscreen), l = f((h) => h.setIsFullscreenReady), u = f((h) => h.techRef), i = M(
1797
- (h) => {
1798
- h.stopPropagation(), s(vr());
1977
+ function Gt() {
1978
+ const e = f((d) => d.containerRef), t = f((d) => d.exitFullscreen), n = f((d) => d.isFullscreen), o = f((d) => d.requestFullscreen), s = f((d) => d.setIsFullscreen), l = f((d) => d.setIsFullscreenReady), u = f((d) => d.techRef), i = U(
1979
+ (d) => {
1980
+ d.stopPropagation(), s(tr());
1799
1981
  },
1800
1982
  [s]
1801
1983
  ), c = () => {
1802
1984
  n ? t() : o();
1803
1985
  };
1804
- return V(() => {
1805
- const h = $t ? u.current : e.current;
1806
- if (h)
1807
- return gr(h, i);
1808
- }, [e, i, u]), V(() => {
1986
+ return N(() => {
1987
+ const d = Ht ? u.current : e.current;
1988
+ if (d)
1989
+ return or(d, i);
1990
+ }, [e, i, u]), N(() => {
1809
1991
  l(!0);
1810
- }, [l]), /* @__PURE__ */ a.jsx(oe, { onClick: c, children: n ? /* @__PURE__ */ a.jsx(Eo, {}) : /* @__PURE__ */ a.jsx(_o, {}) });
1811
- }
1812
- const To = "_idleCheckContainer_iz9tu_1", Ro = "_idleCheckContainerIdle_iz9tu_10", So = "_idleCheckContainerActive_iz9tu_15", Ue = {
1813
- idleCheckContainer: To,
1814
- idleCheckContainerIdle: Ro,
1815
- idleCheckContainerActive: So
1816
- }, Po = 5 * 1e3;
1817
- function dn({ children: e }) {
1818
- const t = A(null), [n, o] = U(!1), s = A(null), u = f((C) => C.idleLocks).size, i = M(() => {
1992
+ }, [l]), /* @__PURE__ */ a.jsx(le, { onClick: c, children: n ? /* @__PURE__ */ a.jsx(yo, {}) : /* @__PURE__ */ a.jsx(vo, {}) });
1993
+ }
1994
+ const go = "_idleCheckContainer_iz9tu_1", wo = "_idleCheckContainerIdle_iz9tu_10", To = "_idleCheckContainerActive_iz9tu_15", Ue = {
1995
+ idleCheckContainer: go,
1996
+ idleCheckContainerIdle: wo,
1997
+ idleCheckContainerActive: To
1998
+ }, Co = 5 * 1e3;
1999
+ function Jt({ children: e }) {
2000
+ const t = H(null), n = f((v) => v.isIdle), o = f((v) => v.setIsIdle), s = H(null), u = f((v) => v.idleLocks).size, i = f((v) => v.eventEmitter), c = U(() => {
1819
2001
  s.current !== null && (window.clearTimeout(s.current), s.current = null);
1820
- }, []), c = M(() => {
1821
- i(), s.current = window.setTimeout(() => o(!0), Po);
1822
- }, [i]);
1823
- V(() => (o(!1), c(), () => {
1824
- i();
1825
- }), [i, c]), V(() => {
1826
- const C = t.current;
1827
- if (!C) return;
1828
- const R = (b) => {
1829
- n && (b.stopPropagation(), o(!1), c());
1830
- }, _ = () => {
1831
- n && o(!1), c();
2002
+ }, []), d = U(() => {
2003
+ c(), s.current = window.setTimeout(() => o(!0), Co);
2004
+ }, [c]);
2005
+ N(() => (o(!1), d(), () => {
2006
+ c();
2007
+ }), [c, d]), N(() => {
2008
+ const v = t.current;
2009
+ if (!v) return;
2010
+ const C = (S) => {
2011
+ n && (S.stopPropagation(), o(!1), d());
2012
+ }, j = () => {
2013
+ n && o(!1), d();
2014
+ };
2015
+ return v.addEventListener("click", C), v.addEventListener("mousemove", j), () => {
2016
+ v.removeEventListener("click", C), v.removeEventListener("mousemove", j);
2017
+ };
2018
+ }, [t, n, o, d]), N(() => {
2019
+ const v = () => {
2020
+ o(!1), d();
1832
2021
  };
1833
- return C.addEventListener("click", R), C.addEventListener("mousemove", _), () => {
1834
- C.removeEventListener("click", R), C.removeEventListener("mousemove", _);
2022
+ return i.on("resetIdle", v), () => {
2023
+ i.off("resetIdle", v);
1835
2024
  };
1836
- }, [t, n, o, c]);
1837
- const h = n && !u, v = `${Ue.idleCheckContainer} ${h ? Ue.idleCheckContainerIdle : Ue.idleCheckContainerActive}`;
1838
- return /* @__PURE__ */ a.jsx("div", { ref: t, className: v, children: e });
2025
+ }, [i, o, d]);
2026
+ const g = n && !u, y = `${Ue.idleCheckContainer} ${g ? Ue.idleCheckContainerIdle : Ue.idleCheckContainerActive}`;
2027
+ return /* @__PURE__ */ a.jsx("div", { ref: t, className: y, children: e });
1839
2028
  }
1840
- const Lo = "_spinner_oo4hi_10", jo = {
1841
- spinner: Lo
2029
+ const _o = "_spinner_oo4hi_10", xo = {
2030
+ spinner: _o
1842
2031
  };
1843
- function bo(e) {
1844
- return /* @__PURE__ */ a.jsx("div", j({ className: jo.spinner }, e));
2032
+ function Eo(e) {
2033
+ return /* @__PURE__ */ a.jsx("div", b({ className: xo.spinner }, e));
1845
2034
  }
1846
- function ko(e, t = 500) {
1847
- const [n, o] = U(e);
1848
- return V(() => {
2035
+ function Ro(e, t = 500) {
2036
+ const [n, o] = X(e);
2037
+ return N(() => {
1849
2038
  const s = window.setTimeout(() => o(e), t);
1850
2039
  return () => {
1851
2040
  window.clearTimeout(s);
1852
2041
  };
1853
2042
  }, [e, t]), n;
1854
2043
  }
1855
- const Do = "_loadingContainer_v9v7r_1", Io = {
1856
- loadingContainer: Do
2044
+ const So = "_loadingContainer_v9v7r_1", Po = {
2045
+ loadingContainer: So
1857
2046
  };
1858
- function fn(n) {
1859
- var o = n, { style: e } = o, t = G(o, ["style"]);
2047
+ function Qt(n) {
2048
+ var o = n, { style: e } = o, t = ne(o, ["style"]);
1860
2049
  const s = f((u) => u.isLoading);
1861
- return ko(s, 100) ? /* @__PURE__ */ a.jsx("div", he(j({ className: Io.loadingContainer, style: e }, t), { children: /* @__PURE__ */ a.jsx(bo, {}) })) : null;
2050
+ return Ro(s, 100) ? /* @__PURE__ */ a.jsx("div", ve(b({ className: Po.loadingContainer, style: e }, t), { children: /* @__PURE__ */ a.jsx(Eo, {}) })) : null;
1862
2051
  }
1863
- function Fo() {
2052
+ function Lo() {
1864
2053
  return /* @__PURE__ */ a.jsx(
1865
2054
  "svg",
1866
2055
  {
@@ -1871,7 +2060,7 @@ function Fo() {
1871
2060
  }
1872
2061
  );
1873
2062
  }
1874
- function No() {
2063
+ function bo() {
1875
2064
  return /* @__PURE__ */ a.jsx(
1876
2065
  "svg",
1877
2066
  {
@@ -1882,59 +2071,59 @@ function No() {
1882
2071
  }
1883
2072
  );
1884
2073
  }
1885
- const Mo = "_dropdownMenuContent_1gwy6_1", Vo = "_dropdownMenuItem_1gwy6_80", hn = {
1886
- dropdownMenuContent: Mo,
1887
- dropdownMenuItem: Vo
1888
- }, Oo = ye.Root, Ho = ye.Trigger, Ao = ye.Portal, mn = De((s, o) => {
1889
- var l = s, { sideOffset: e = 4, className: t } = l, n = G(l, ["sideOffset", "className"]);
2074
+ const jo = "_dropdownMenuContent_1gwy6_1", ko = "_dropdownMenuItem_1gwy6_80", en = {
2075
+ dropdownMenuContent: jo,
2076
+ dropdownMenuItem: ko
2077
+ }, Io = Ce.Root, Do = Ce.Trigger, Fo = Ce.Portal, tn = De((s, o) => {
2078
+ var l = s, { sideOffset: e = 4, className: t } = l, n = ne(l, ["sideOffset", "className"]);
1890
2079
  return /* @__PURE__ */ a.jsx(
1891
- ye.Content,
1892
- j({
2080
+ Ce.Content,
2081
+ b({
1893
2082
  ref: o,
1894
2083
  sideOffset: e,
1895
- className: [hn.dropdownMenuContent, t].filter(Boolean).join(" "),
2084
+ className: [en.dropdownMenuContent, t].filter(Boolean).join(" "),
1896
2085
  onCloseAutoFocus: (u) => {
1897
2086
  u.preventDefault();
1898
2087
  }
1899
2088
  }, n)
1900
2089
  );
1901
2090
  });
1902
- mn.displayName = "PlayerDropdownMenuContent";
1903
- const vn = De((o, n) => {
1904
- var s = o, { className: e } = s, t = G(s, ["className"]);
2091
+ tn.displayName = "PlayerDropdownMenuContent";
2092
+ const nn = De((o, n) => {
2093
+ var s = o, { className: e } = s, t = ne(s, ["className"]);
1905
2094
  return /* @__PURE__ */ a.jsx(
1906
- ye.Item,
1907
- j({
2095
+ Ce.Item,
2096
+ b({
1908
2097
  ref: n,
1909
- className: [hn.dropdownMenuItem, e].filter(Boolean).join(" ")
2098
+ className: [en.dropdownMenuItem, e].filter(Boolean).join(" ")
1910
2099
  }, t)
1911
2100
  );
1912
2101
  });
1913
- vn.displayName = "PlayerDropdownMenuItem";
1914
- const _t = "settings";
1915
- function pn() {
1916
- const [e, t] = U(!1), n = f((c) => c.containerRef), o = f((c) => c.addIdleLock), s = f((c) => c.removeIdleLock), l = f((c) => c.levels), u = f((c) => c.setLevel), i = M(
2102
+ nn.displayName = "PlayerDropdownMenuItem";
2103
+ const Tt = "settings";
2104
+ function rn() {
2105
+ const [e, t] = X(!1), n = f((c) => c.containerRef), o = f((c) => c.addIdleLock), s = f((c) => c.removeIdleLock), l = f((c) => c.levels), u = f((c) => c.setLevel), i = U(
1917
2106
  (c) => {
1918
- t(c), c ? o(_t) : s(_t);
2107
+ t(c), c ? o(Tt) : s(Tt);
1919
2108
  },
1920
2109
  [o, s]
1921
2110
  );
1922
- return /* @__PURE__ */ a.jsxs(Oo, { open: e, onOpenChange: i, children: [
1923
- /* @__PURE__ */ a.jsx(Ho, { asChild: !0, children: /* @__PURE__ */ a.jsx(oe, { children: /* @__PURE__ */ a.jsx(No, {}) }) }),
1924
- /* @__PURE__ */ a.jsx(Ao, { container: n.current, children: /* @__PURE__ */ a.jsx(mn, { side: "top", align: "end", children: l == null ? void 0 : l.map((c) => /* @__PURE__ */ a.jsxs(
1925
- vn,
2111
+ return /* @__PURE__ */ a.jsxs(Io, { open: e, onOpenChange: i, children: [
2112
+ /* @__PURE__ */ a.jsx(Do, { asChild: !0, children: /* @__PURE__ */ a.jsx(le, { children: /* @__PURE__ */ a.jsx(bo, {}) }) }),
2113
+ /* @__PURE__ */ a.jsx(Fo, { container: n.current, children: /* @__PURE__ */ a.jsx(tn, { side: "top", align: "end", children: l == null ? void 0 : l.map((c) => /* @__PURE__ */ a.jsxs(
2114
+ nn,
1926
2115
  {
1927
2116
  onClick: () => u(c.value),
1928
2117
  children: [
1929
2118
  c.label,
1930
- c.selected && /* @__PURE__ */ a.jsx(Fo, {})
2119
+ c.selected && /* @__PURE__ */ a.jsx(Lo, {})
1931
2120
  ]
1932
2121
  },
1933
2122
  c.sid
1934
2123
  )) }) })
1935
2124
  ] });
1936
2125
  }
1937
- function $o() {
2126
+ function Mo() {
1938
2127
  return /* @__PURE__ */ a.jsx(
1939
2128
  "svg",
1940
2129
  {
@@ -1945,7 +2134,7 @@ function $o() {
1945
2134
  }
1946
2135
  );
1947
2136
  }
1948
- function Uo() {
2137
+ function No() {
1949
2138
  return /* @__PURE__ */ a.jsx(
1950
2139
  "svg",
1951
2140
  {
@@ -1956,7 +2145,7 @@ function Uo() {
1956
2145
  }
1957
2146
  );
1958
2147
  }
1959
- function Bo() {
2148
+ function Vo() {
1960
2149
  return /* @__PURE__ */ a.jsx(
1961
2150
  "svg",
1962
2151
  {
@@ -1967,20 +2156,20 @@ function Bo() {
1967
2156
  }
1968
2157
  );
1969
2158
  }
1970
- const Wo = "_volumeSlider_59ltz_1", zo = "_volumeContainer_59ltz_7", Et = {
1971
- volumeSlider: Wo,
1972
- volumeContainer: zo
1973
- }, Tt = "volume";
1974
- function yn() {
2159
+ const Oo = "_volumeContainer_4d6jg_1", Ho = "_volumeSlider_4d6jg_8", Ct = {
2160
+ volumeContainer: Oo,
2161
+ volumeSlider: Ho
2162
+ }, _t = "volume";
2163
+ function on() {
1975
2164
  const e = f((i) => i.setVolume), t = f((i) => i.volume), n = f((i) => i.addIdleLock), o = f((i) => i.removeIdleLock), s = (i) => {
1976
- e(i[0]), n(Tt);
2165
+ e(i[0]), n(_t);
1977
2166
  }, l = () => {
1978
- o(Tt);
2167
+ o(_t);
1979
2168
  }, u = () => e(t ? 0 : 100);
1980
- return /* @__PURE__ */ a.jsxs("div", { className: Et.volumeContainer, children: [
1981
- /* @__PURE__ */ a.jsx(oe, { onClick: u, className: "shrink-0", children: t ? t > 50 ? /* @__PURE__ */ a.jsx($o, {}) : /* @__PURE__ */ a.jsx(Uo, {}) : /* @__PURE__ */ a.jsx(Bo, {}) }),
1982
- /* @__PURE__ */ a.jsx("div", { className: Et.volumeSlider, children: /* @__PURE__ */ a.jsx(
1983
- Ie,
2169
+ return /* @__PURE__ */ a.jsxs("div", { className: Ct.volumeContainer, children: [
2170
+ /* @__PURE__ */ a.jsx(le, { onClick: u, className: "shrink-0", children: t ? t > 50 ? /* @__PURE__ */ a.jsx(Mo, {}) : /* @__PURE__ */ a.jsx(No, {}) : /* @__PURE__ */ a.jsx(Vo, {}) }),
2171
+ /* @__PURE__ */ a.jsx("div", { className: Ct.volumeSlider, children: /* @__PURE__ */ a.jsx(
2172
+ Fe,
1984
2173
  {
1985
2174
  value: [t],
1986
2175
  onValueChange: s,
@@ -1989,116 +2178,135 @@ function yn() {
1989
2178
  ) })
1990
2179
  ] });
1991
2180
  }
1992
- function gn(e, {
1993
- defaultValue: t = !1,
1994
- initializeWithValue: n = !0
1995
- } = {}) {
1996
- const o = (i) => typeof window == "undefined" ? t : window.matchMedia(i).matches, [s, l] = U(() => n ? o(e) : t);
1997
- function u() {
1998
- l(o(e));
1999
- }
2000
- return Ht(() => {
2001
- if (typeof window == "undefined")
2002
- return;
2003
- const i = window.matchMedia(e);
2004
- return u(), i.addListener ? i.addListener(u) : i.addEventListener("change", u), () => {
2005
- i.removeListener ? i.removeListener(u) : i.removeEventListener("change", u);
2006
- };
2007
- }, [e]), s;
2008
- }
2009
- function ui(e) {
2010
- return /* @__PURE__ */ a.jsx(Vr, { children: /* @__PURE__ */ a.jsx(Zo, j({}, e)) });
2181
+ function ni(e) {
2182
+ return /* @__PURE__ */ a.jsx(Lr, { children: /* @__PURE__ */ a.jsx($o, b({}, e)) });
2011
2183
  }
2012
- function Zo({ url: e, messages: t, onEvent: n }) {
2013
- const o = gn("(min-width: 1024px)"), s = f((l) => l.containerRef);
2184
+ function $o({ url: e, messages: t, onEvent: n }) {
2185
+ const o = f((s) => s.containerRef);
2014
2186
  return /* @__PURE__ */ a.jsxs(
2015
2187
  "div",
2016
2188
  {
2017
- ref: s,
2018
- className: rn,
2189
+ ref: o,
2190
+ className: Y.playerContainer,
2019
2191
  children: [
2020
2192
  /* @__PURE__ */ a.jsxs(
2021
- Ir,
2193
+ Tr,
2022
2194
  {
2023
2195
  url: e,
2024
- eventFinishedMessage: t == null ? void 0 : t.eventFinished,
2025
- eventNotStartedMessage: t == null ? void 0 : t.eventNotStarted,
2026
- eventStartingSoonMessage: t == null ? void 0 : t.eventStartingSoon,
2196
+ messages: {
2197
+ eventNotStarted: t == null ? void 0 : t.eventNotStarted,
2198
+ eventStartingSoon: t == null ? void 0 : t.eventStartingSoon
2199
+ },
2027
2200
  children: [
2028
- /* @__PURE__ */ a.jsx(zr, { url: e }),
2029
- /* @__PURE__ */ a.jsx(tn, {}),
2030
- /* @__PURE__ */ a.jsx(fn, {}),
2031
- /* @__PURE__ */ a.jsxs(dn, { children: [
2032
- o ? /* @__PURE__ */ a.jsx(Yr, {}) : null,
2033
- /* @__PURE__ */ a.jsx("div", { className: on, children: /* @__PURE__ */ a.jsxs("div", { className: sn, children: [
2034
- /* @__PURE__ */ a.jsx(fo, {}),
2035
- /* @__PURE__ */ a.jsxs("div", { className: an, children: [
2036
- /* @__PURE__ */ a.jsxs("div", { className: ln, children: [
2037
- /* @__PURE__ */ a.jsx(to, {}),
2038
- /* @__PURE__ */ a.jsx(mo, {}),
2039
- /* @__PURE__ */ a.jsx(yn, {})
2040
- ] }),
2041
- /* @__PURE__ */ a.jsxs("div", { className: cn, children: [
2042
- /* @__PURE__ */ a.jsx(eo, { message: t == null ? void 0 : t.live }),
2043
- /* @__PURE__ */ a.jsx(pn, {}),
2044
- /* @__PURE__ */ a.jsx(un, {})
2045
- ] })
2201
+ /* @__PURE__ */ a.jsx(
2202
+ Ir,
2203
+ {
2204
+ url: e,
2205
+ messages: {
2206
+ eventFinished: t == null ? void 0 : t.eventFinished
2207
+ }
2208
+ }
2209
+ ),
2210
+ /* @__PURE__ */ a.jsx(Xt, {}),
2211
+ /* @__PURE__ */ a.jsx(Qt, {}),
2212
+ /* @__PURE__ */ a.jsxs(Jt, { children: [
2213
+ /* @__PURE__ */ a.jsx(Br, {}),
2214
+ /* @__PURE__ */ a.jsx("div", { className: Y.controlsBottom, children: /* @__PURE__ */ a.jsxs("div", { className: Y.controlsContainer, children: [
2215
+ /* @__PURE__ */ a.jsx(io, {}),
2216
+ /* @__PURE__ */ a.jsxs("div", { className: Y.controlsRow, children: [
2217
+ /* @__PURE__ */ a.jsxs(
2218
+ "div",
2219
+ {
2220
+ className: `${Y.controlsSection} ${Y.controlsSectionStart}`,
2221
+ children: [
2222
+ /* @__PURE__ */ a.jsx(Kr, {}),
2223
+ /* @__PURE__ */ a.jsx(ao, {}),
2224
+ /* @__PURE__ */ a.jsx(on, {})
2225
+ ]
2226
+ }
2227
+ ),
2228
+ /* @__PURE__ */ a.jsxs(
2229
+ "div",
2230
+ {
2231
+ className: `${Y.controlsSection} ${Y.controlsSectionEnd}`,
2232
+ children: [
2233
+ /* @__PURE__ */ a.jsx(Yr, { message: t == null ? void 0 : t.live }),
2234
+ /* @__PURE__ */ a.jsx(rn, {}),
2235
+ /* @__PURE__ */ a.jsx(Gt, {})
2236
+ ]
2237
+ }
2238
+ )
2046
2239
  ] })
2047
2240
  ] }) })
2048
2241
  ] })
2049
2242
  ]
2050
2243
  }
2051
2244
  ),
2052
- /* @__PURE__ */ a.jsx(Mr, {}),
2053
- n && /* @__PURE__ */ a.jsx(nn, { callback: n })
2245
+ /* @__PURE__ */ a.jsx(Pr, {}),
2246
+ n && /* @__PURE__ */ a.jsx(Sr, { callback: n })
2054
2247
  ]
2055
2248
  }
2056
2249
  );
2057
2250
  }
2058
- function qo() {
2059
- const e = f((s) => s.isPlaying), t = f((s) => s.pause), n = f((s) => s.play), o = () => {
2060
- e ? t() : n();
2061
- };
2062
- return /* @__PURE__ */ a.jsx(qt, { onClick: o });
2251
+ function Ao() {
2252
+ const e = f((u) => u.isPlaying), t = f((u) => u.pause), n = f((u) => u.play), o = f((u) => u.currentTime), s = f((u) => u.duration), l = f((u) => u.seek);
2253
+ return /* @__PURE__ */ a.jsx(
2254
+ Zt,
2255
+ {
2256
+ onClick: () => {
2257
+ e ? t() : n();
2258
+ },
2259
+ onBackwardSeek: (u) => {
2260
+ const i = Math.max(0, o - u);
2261
+ l(i);
2262
+ },
2263
+ onForwardSeek: (u) => {
2264
+ const i = Math.min(o + u, s);
2265
+ l(i);
2266
+ },
2267
+ maxBackwardTime: Math.floor(o),
2268
+ maxForwardTime: Math.floor(s - o)
2269
+ }
2270
+ );
2063
2271
  }
2064
- function Yo() {
2272
+ function Bo() {
2065
2273
  const e = f((s) => s.isPlaying), t = f((s) => s.pause), n = f((s) => s.play), o = () => {
2066
2274
  e ? t() : n();
2067
2275
  };
2068
- return /* @__PURE__ */ a.jsx(oe, { onClick: o, children: e ? /* @__PURE__ */ a.jsx(Yt, {}) : /* @__PURE__ */ a.jsx(Kt, {}) });
2276
+ return /* @__PURE__ */ a.jsx(le, { onClick: o, children: e ? /* @__PURE__ */ a.jsx(Yt, {}) : /* @__PURE__ */ a.jsx(Kt, {}) });
2069
2277
  }
2070
- const Rt = "vod-player-progress-bar";
2071
- function Ko() {
2072
- const e = A(null), t = A(null), [n, o] = U(!1), [s, l] = U(-1), [u, i] = U(-1), c = f((g) => g.currentTime), h = f((g) => g.duration), v = f((g) => g.seek), C = f((g) => g.addIdleLock), R = f((g) => g.removeIdleLock), _ = parseFloat(
2073
- (h ? (u !== -1 ? u : c) / h * 100 : 0).toFixed(1)
2074
- ), b = (g) => {
2075
- i(h * (g[0] / 100)), C(Rt);
2076
- }, H = () => {
2077
- u !== -1 && (v(u), i(-1), R(Rt));
2078
- }, L = () => o(!0), N = () => o(!1), S = M(
2079
- (g) => {
2080
- const k = e.current, p = t.current;
2081
- if (k && p) {
2082
- const q = ke(k), Q = ke(p), ee = (g.pageX || g.clientX) - q.left, X = ee / q.width;
2083
- if (X < 0) return;
2084
- let W = ee - Q.width / 2;
2085
- W < 0 && (W = 0), W > q.width - Q.width && (W = -1), p.style.left = W > -1 ? `${W}px` : "auto", p.style.right = W > -1 ? "auto" : "0px", l(X * h);
2278
+ const xt = "vod-player-progress-bar";
2279
+ function Uo() {
2280
+ const e = H(null), t = H(null), [n, o] = X(!1), [s, l] = X(-1), [u, i] = X(-1), c = f((k) => k.currentTime), d = f((k) => k.duration), g = f((k) => k.seek), y = f((k) => k.addIdleLock), v = f((k) => k.removeIdleLock), C = parseFloat(
2281
+ (d ? (u !== -1 ? u : c) / d * 100 : 0).toFixed(1)
2282
+ ), j = (k) => {
2283
+ i(d * (k[0] / 100)), y(xt);
2284
+ }, S = () => {
2285
+ u !== -1 && (g(u), i(-1), v(xt));
2286
+ }, L = () => o(!0), M = () => o(!1), R = U(
2287
+ (k) => {
2288
+ const T = e.current, I = t.current;
2289
+ if (T && I) {
2290
+ const p = Ie(T), B = Ie(I), J = (k.pageX || k.clientX) - p.left, q = J / p.width;
2291
+ if (q < 0) return;
2292
+ let V = J - B.width / 2;
2293
+ V < 0 && (V = 0), V > p.width - B.width && (V = -1), I.style.left = V > -1 ? `${V}px` : "auto", I.style.right = V > -1 ? "auto" : "0px", l(q * d);
2086
2294
  }
2087
2295
  L();
2088
2296
  },
2089
- [h]
2297
+ [d]
2090
2298
  );
2091
- return /* @__PURE__ */ a.jsxs("div", { className: Xt, children: [
2299
+ return /* @__PURE__ */ a.jsxs("div", { className: ie.progressSlider, children: [
2092
2300
  /* @__PURE__ */ a.jsx(
2093
- Ie,
2301
+ Fe,
2094
2302
  {
2095
2303
  ref: e,
2096
- value: [_],
2097
- onPointerLeave: N,
2098
- onPointerDown: N,
2099
- onPointerMove: S,
2100
- onValueChange: b,
2101
- onValueCommit: H,
2304
+ value: [C],
2305
+ onPointerLeave: M,
2306
+ onPointerDown: M,
2307
+ onPointerMove: R,
2308
+ onValueChange: j,
2309
+ onValueCommit: S,
2102
2310
  step: 0.1
2103
2311
  }
2104
2312
  ),
@@ -2106,27 +2314,36 @@ function Ko() {
2106
2314
  "div",
2107
2315
  {
2108
2316
  ref: t,
2109
- className: `${Jt} ${n ? Gt : Qt}`,
2110
- children: /* @__PURE__ */ a.jsx("p", { className: en, children: be(s) })
2317
+ className: `${ie.tipContainer} ${n ? ie.tipContainerVisible : ie.tipContainerHidden}`,
2318
+ children: /* @__PURE__ */ a.jsx("p", { className: ie.tipContent, children: Te(s) })
2111
2319
  }
2112
2320
  )
2113
2321
  ] });
2114
2322
  }
2115
- const Xo = "_remainingTime_1c40f_1", Jo = "_time_1c40f_7", Go = "_separator_1c40f_18", Ye = {
2116
- remainingTime: Xo,
2117
- time: Jo,
2118
- separator: Go
2119
- }, Qo = Ye.remainingTime, St = Ye.time, ei = Ye.separator;
2120
- function ti() {
2323
+ const Wo = "_remainingTimeContainer_1yyhb_1", zo = "_remainingTime_1yyhb_1", qo = "_remainingSeparator_1yyhb_17", ke = {
2324
+ remainingTimeContainer: Wo,
2325
+ remainingTime: zo,
2326
+ remainingSeparator: qo
2327
+ };
2328
+ function Zo() {
2121
2329
  const e = f((n) => n.currentTime), t = f((n) => n.duration);
2122
- return /* @__PURE__ */ a.jsxs("div", { className: Qo, children: [
2123
- /* @__PURE__ */ a.jsx("p", { className: St, children: be(e) }),
2124
- /* @__PURE__ */ a.jsx("p", { className: ei }),
2125
- /* @__PURE__ */ a.jsx("p", { className: St, children: be(t) })
2330
+ return /* @__PURE__ */ a.jsxs("div", { className: ke.remainingTimeContainer, children: [
2331
+ /* @__PURE__ */ a.jsx("p", { className: ke.remainingTime, children: Te(e) }),
2332
+ /* @__PURE__ */ a.jsx("p", { className: ke.remainingSeparator }),
2333
+ /* @__PURE__ */ a.jsx("p", { className: ke.remainingTime, children: Te(t) })
2126
2334
  ] });
2127
2335
  }
2128
- function ni() {
2129
- const e = f((i) => i.currentTime), t = f((i) => i.duration), n = f((i) => i.isPlaying), o = f((i) => i.pause), s = f((i) => i.play), l = f((i) => i.seek), u = M(
2336
+ function Yo({ callback: e }) {
2337
+ const t = f((n) => n.eventEmitter);
2338
+ return N(() => {
2339
+ const n = (o) => e("timeUpdate", o);
2340
+ return t.on("timeUpdate", n), () => {
2341
+ t.off("timeUpdate", n);
2342
+ };
2343
+ }, [e, t]), /* @__PURE__ */ a.jsx(At, { callback: e });
2344
+ }
2345
+ function Ko() {
2346
+ const e = f((i) => i.currentTime), t = f((i) => i.duration), n = f((i) => i.isPlaying), o = f((i) => i.pause), s = f((i) => i.play), l = f((i) => i.seek), u = U(
2130
2347
  (i) => {
2131
2348
  let c = !1;
2132
2349
  if (!(i.target instanceof HTMLInputElement || i.ctrlKey)) {
@@ -2146,51 +2363,63 @@ function ni() {
2146
2363
  },
2147
2364
  [e, t, n, o, s, l]
2148
2365
  );
2149
- return V(() => (document.addEventListener("keydown", u), () => {
2366
+ return N(() => (document.addEventListener("keydown", u), () => {
2150
2367
  document.removeEventListener("keydown", u);
2151
- }), [u]), /* @__PURE__ */ a.jsx(Bt, {});
2368
+ }), [u]), /* @__PURE__ */ a.jsx(Wt, {});
2152
2369
  }
2153
- function di(e) {
2154
- return /* @__PURE__ */ a.jsx(Wt, { children: /* @__PURE__ */ a.jsx(ri, j({}, e)) });
2370
+ function ri(e) {
2371
+ return /* @__PURE__ */ a.jsx(zt, { children: /* @__PURE__ */ a.jsx(Xo, b({}, e)) });
2155
2372
  }
2156
- function ri({ url: e, onEvent: t, startTime: n }) {
2157
- const o = gn("(min-width: 1024px)"), s = f((u) => u.setStartTime), l = f((u) => u.containerRef);
2158
- return V(() => {
2159
- n && s(n);
2160
- }, [n, s]), /* @__PURE__ */ a.jsxs(
2373
+ function Xo({ url: e, onEvent: t, startTime: n }) {
2374
+ const o = f((l) => l.setStartTime), s = f((l) => l.containerRef);
2375
+ return N(() => {
2376
+ n && o(n);
2377
+ }, [n, o]), /* @__PURE__ */ a.jsxs(
2161
2378
  "div",
2162
2379
  {
2163
- ref: l,
2164
- className: rn,
2380
+ ref: s,
2381
+ className: Y.playerContainer,
2165
2382
  children: [
2166
- /* @__PURE__ */ a.jsx(Zt, { url: e, isLive: !1 }),
2167
- /* @__PURE__ */ a.jsx(tn, {}),
2168
- /* @__PURE__ */ a.jsx(fn, {}),
2169
- /* @__PURE__ */ a.jsxs(dn, { children: [
2170
- o ? /* @__PURE__ */ a.jsx(qo, {}) : null,
2171
- /* @__PURE__ */ a.jsx("div", { className: on, children: /* @__PURE__ */ a.jsxs("div", { className: sn, children: [
2172
- /* @__PURE__ */ a.jsx(Ko, {}),
2173
- /* @__PURE__ */ a.jsxs("div", { className: an, children: [
2174
- /* @__PURE__ */ a.jsxs("div", { className: ln, children: [
2175
- /* @__PURE__ */ a.jsx(Yo, {}),
2176
- /* @__PURE__ */ a.jsx(yn, {}),
2177
- /* @__PURE__ */ a.jsx(ti, {})
2178
- ] }),
2179
- /* @__PURE__ */ a.jsxs("div", { className: cn, children: [
2180
- /* @__PURE__ */ a.jsx(pn, {}),
2181
- /* @__PURE__ */ a.jsx(un, {})
2182
- ] })
2383
+ /* @__PURE__ */ a.jsx(qt, { url: e, isLive: !1 }),
2384
+ /* @__PURE__ */ a.jsx(Xt, {}),
2385
+ /* @__PURE__ */ a.jsx(Qt, {}),
2386
+ /* @__PURE__ */ a.jsxs(Jt, { children: [
2387
+ /* @__PURE__ */ a.jsx(Ao, {}),
2388
+ /* @__PURE__ */ a.jsx("div", { className: Y.controlsBottom, children: /* @__PURE__ */ a.jsxs("div", { className: Y.controlsContainer, children: [
2389
+ /* @__PURE__ */ a.jsx(Uo, {}),
2390
+ /* @__PURE__ */ a.jsxs("div", { className: Y.controlsRow, children: [
2391
+ /* @__PURE__ */ a.jsxs(
2392
+ "div",
2393
+ {
2394
+ className: `${Y.controlsSection} ${Y.controlsSectionStart}`,
2395
+ children: [
2396
+ /* @__PURE__ */ a.jsx(Bo, {}),
2397
+ /* @__PURE__ */ a.jsx(on, {}),
2398
+ /* @__PURE__ */ a.jsx(Zo, {})
2399
+ ]
2400
+ }
2401
+ ),
2402
+ /* @__PURE__ */ a.jsxs(
2403
+ "div",
2404
+ {
2405
+ className: `${Y.controlsSection} ${Y.controlsSectionEnd}`,
2406
+ children: [
2407
+ /* @__PURE__ */ a.jsx(rn, {}),
2408
+ /* @__PURE__ */ a.jsx(Gt, {})
2409
+ ]
2410
+ }
2411
+ )
2183
2412
  ] })
2184
2413
  ] }) })
2185
2414
  ] }),
2186
- /* @__PURE__ */ a.jsx(ni, {}),
2187
- t && /* @__PURE__ */ a.jsx(nn, { callback: t })
2415
+ /* @__PURE__ */ a.jsx(Ko, {}),
2416
+ t && /* @__PURE__ */ a.jsx(Yo, { callback: t })
2188
2417
  ]
2189
2418
  }
2190
2419
  );
2191
2420
  }
2192
2421
  export {
2193
- ui as LivePlayer,
2194
- di as VodPlayer
2422
+ ni as LivePlayer,
2423
+ ri as VodPlayer
2195
2424
  };
2196
2425
  //# sourceMappingURL=react-video-player.es.js.map