@devix-technologies/react-gjirafa-vp-player 1.0.23 → 1.0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import * as ve from "react";
2
- import Lt, { forwardRef as Nt, useContext as Pt, useState as ce, useEffect as _e, useRef as te, useMemo as Et, createContext as Ft, useCallback as lt } from "react";
2
+ import $t, { forwardRef as Nt, useContext as Et, useState as ce, useEffect as Se, useRef as te, useMemo as Pt, createContext as Ft, useCallback as lt } from "react";
3
3
  var De = { exports: {} }, ke = {};
4
4
  /**
5
5
  * @license React
@@ -48,18 +48,18 @@ function Dt() {
48
48
  function e(o) {
49
49
  if (o == null) return null;
50
50
  if (typeof o == "function")
51
- return o.$$typeof === d ? null : o.displayName || o.name || null;
51
+ return o.$$typeof === f ? null : o.displayName || o.name || null;
52
52
  if (typeof o == "string") return o;
53
53
  switch (o) {
54
- case p:
54
+ case d:
55
55
  return "Fragment";
56
- case P:
56
+ case w:
57
57
  return "Profiler";
58
- case b:
58
+ case x:
59
59
  return "StrictMode";
60
60
  case B:
61
61
  return "Suspense";
62
- case j:
62
+ case V:
63
63
  return "SuspenseList";
64
64
  case q:
65
65
  return "Activity";
@@ -68,18 +68,18 @@ function Dt() {
68
68
  switch (typeof o.tag == "number" && console.error(
69
69
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
70
70
  ), o.$$typeof) {
71
- case v:
71
+ case E:
72
72
  return "Portal";
73
- case $:
73
+ case L:
74
74
  return (o.displayName || "Context") + ".Provider";
75
75
  case I:
76
76
  return (o._context.displayName || "Context") + ".Consumer";
77
77
  case T:
78
78
  var m = o.render;
79
79
  return o = o.displayName, o || (o = m.displayName || m.name || "", o = o !== "" ? "ForwardRef(" + o + ")" : "ForwardRef"), o;
80
- case w:
80
+ case b:
81
81
  return m = o.displayName || null, m !== null ? m : e(o.type) || "Memo";
82
- case J:
82
+ case Q:
83
83
  m = o._payload, o = o._init;
84
84
  try {
85
85
  return e(o(m));
@@ -109,8 +109,8 @@ function Dt() {
109
109
  }
110
110
  }
111
111
  function a(o) {
112
- if (o === p) return "<>";
113
- if (typeof o == "object" && o !== null && o.$$typeof === J)
112
+ if (o === d) return "<>";
113
+ if (typeof o == "object" && o !== null && o.$$typeof === Q)
114
114
  return "<...>";
115
115
  try {
116
116
  var m = e(o);
@@ -120,14 +120,14 @@ function Dt() {
120
120
  }
121
121
  }
122
122
  function i() {
123
- var o = g.A;
123
+ var o = v.A;
124
124
  return o === null ? null : o.getOwner();
125
125
  }
126
126
  function n() {
127
127
  return Error("react-stack-top-frame");
128
128
  }
129
129
  function s(o) {
130
- if (E.call(o, "key")) {
130
+ if (P.call(o, "key")) {
131
131
  var m = Object.getOwnPropertyDescriptor(o, "key").get;
132
132
  if (m && m.isReactWarning) return !1;
133
133
  }
@@ -151,12 +151,12 @@ function Dt() {
151
151
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
152
152
  )), o = this.props.ref, o !== void 0 ? o : null;
153
153
  }
154
- function y(o, m, A, C, Y, K, X, de) {
155
- return A = K.ref, o = {
154
+ function y(o, m, A, C, Y, J, X, de) {
155
+ return A = J.ref, o = {
156
156
  $$typeof: _,
157
157
  type: o,
158
158
  key: m,
159
- props: K,
159
+ props: J,
160
160
  _owner: Y
161
161
  }, (A !== void 0 ? A : null) !== null ? Object.defineProperty(o, "ref", {
162
162
  enumerable: !1,
@@ -183,25 +183,25 @@ function Dt() {
183
183
  value: de
184
184
  }), Object.freeze && (Object.freeze(o.props), Object.freeze(o)), o;
185
185
  }
186
- function u(o, m, A, C, Y, K, X, de) {
186
+ function u(o, m, A, C, Y, J, X, de) {
187
187
  var N = m.children;
188
188
  if (N !== void 0)
189
189
  if (C)
190
- if (L(N)) {
190
+ if ($(N)) {
191
191
  for (C = 0; C < N.length; C++)
192
- f(N[C]);
192
+ h(N[C]);
193
193
  Object.freeze && Object.freeze(N);
194
194
  } else
195
195
  console.error(
196
196
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
197
197
  );
198
- else f(N);
199
- if (E.call(m, "key")) {
198
+ else h(N);
199
+ if (P.call(m, "key")) {
200
200
  N = e(o);
201
201
  var Z = Object.keys(m).filter(function(ne) {
202
202
  return ne !== "key";
203
203
  });
204
- C = 0 < Z.length ? "{key: someKey, " + Z.join(": ..., ") + ": ...}" : "{key: someKey}", h[N + C] || (Z = 0 < Z.length ? "{" + Z.join(": ..., ") + ": ...}" : "{}", console.error(
204
+ C = 0 < Z.length ? "{key: someKey, " + Z.join(": ..., ") + ": ...}" : "{key: someKey}", p[N + C] || (Z = 0 < Z.length ? "{" + Z.join(": ..., ") + ": ...}" : "{}", console.error(
205
205
  `A props object containing a "key" prop is being spread into JSX:
206
206
  let props = %s;
207
207
  <%s {...props} />
@@ -212,7 +212,7 @@ React keys must be passed directly to JSX without using spread:
212
212
  N,
213
213
  Z,
214
214
  N
215
- ), h[N + C] = !0);
215
+ ), p[N + C] = !0);
216
216
  }
217
217
  if (N = null, A !== void 0 && (r(A), N = "" + A), s(m) && (r(m.key), N = "" + m.key), "key" in m) {
218
218
  A = {};
@@ -225,7 +225,7 @@ React keys must be passed directly to JSX without using spread:
225
225
  ), y(
226
226
  o,
227
227
  N,
228
- K,
228
+ J,
229
229
  Y,
230
230
  i(),
231
231
  A,
@@ -233,23 +233,23 @@ React keys must be passed directly to JSX without using spread:
233
233
  de
234
234
  );
235
235
  }
236
- function f(o) {
236
+ function h(o) {
237
237
  typeof o == "object" && o !== null && o.$$typeof === _ && o._store && (o._store.validated = 1);
238
238
  }
239
- var x = Lt, _ = Symbol.for("react.transitional.element"), v = Symbol.for("react.portal"), p = Symbol.for("react.fragment"), b = Symbol.for("react.strict_mode"), P = Symbol.for("react.profiler"), I = Symbol.for("react.consumer"), $ = Symbol.for("react.context"), T = Symbol.for("react.forward_ref"), B = Symbol.for("react.suspense"), j = Symbol.for("react.suspense_list"), w = Symbol.for("react.memo"), J = Symbol.for("react.lazy"), q = Symbol.for("react.activity"), d = Symbol.for("react.client.reference"), g = x.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, E = Object.prototype.hasOwnProperty, L = Array.isArray, D = console.createTask ? console.createTask : function() {
239
+ var g = $t, _ = Symbol.for("react.transitional.element"), E = Symbol.for("react.portal"), d = Symbol.for("react.fragment"), x = Symbol.for("react.strict_mode"), w = Symbol.for("react.profiler"), I = Symbol.for("react.consumer"), L = Symbol.for("react.context"), T = Symbol.for("react.forward_ref"), B = Symbol.for("react.suspense"), V = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), Q = Symbol.for("react.lazy"), q = Symbol.for("react.activity"), f = Symbol.for("react.client.reference"), v = g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, P = Object.prototype.hasOwnProperty, $ = Array.isArray, D = console.createTask ? console.createTask : function() {
240
240
  return null;
241
241
  };
242
- x = {
242
+ g = {
243
243
  "react-stack-bottom-frame": function(o) {
244
244
  return o();
245
245
  }
246
246
  };
247
- var U, M = {}, W = x["react-stack-bottom-frame"].bind(
248
- x,
247
+ var U, M = {}, W = g["react-stack-bottom-frame"].bind(
248
+ g,
249
249
  n
250
- )(), z = D(a(n)), h = {};
251
- Oe.Fragment = p, Oe.jsx = function(o, m, A, C, Y) {
252
- var K = 1e4 > g.recentlyCreatedOwnerStacks++;
250
+ )(), z = D(a(n)), p = {};
251
+ Oe.Fragment = d, Oe.jsx = function(o, m, A, C, Y) {
252
+ var J = 1e4 > v.recentlyCreatedOwnerStacks++;
253
253
  return u(
254
254
  o,
255
255
  m,
@@ -257,11 +257,11 @@ React keys must be passed directly to JSX without using spread:
257
257
  !1,
258
258
  C,
259
259
  Y,
260
- K ? Error("react-stack-top-frame") : W,
261
- K ? D(a(o)) : z
260
+ J ? Error("react-stack-top-frame") : W,
261
+ J ? D(a(o)) : z
262
262
  );
263
263
  }, Oe.jsxs = function(o, m, A, C, Y) {
264
- var K = 1e4 > g.recentlyCreatedOwnerStacks++;
264
+ var J = 1e4 > v.recentlyCreatedOwnerStacks++;
265
265
  return u(
266
266
  o,
267
267
  m,
@@ -269,8 +269,8 @@ React keys must be passed directly to JSX without using spread:
269
269
  !0,
270
270
  C,
271
271
  Y,
272
- K ? Error("react-stack-top-frame") : W,
273
- K ? D(a(o)) : z
272
+ J ? Error("react-stack-top-frame") : W,
273
+ J ? D(a(o)) : z
274
274
  );
275
275
  };
276
276
  }()), Oe;
@@ -279,7 +279,7 @@ var dt;
279
279
  function Mt() {
280
280
  return dt || (dt = 1, process.env.NODE_ENV === "production" ? De.exports = Bt() : De.exports = Dt()), De.exports;
281
281
  }
282
- var Q = Mt();
282
+ var K = Mt();
283
283
  function Ze() {
284
284
  return Ze = Object.assign ? Object.assign.bind() : function(e) {
285
285
  for (var t = 1; t < arguments.length; t++) {
@@ -339,7 +339,7 @@ function It(e) {
339
339
  function Jt(e, t) {
340
340
  return (e = t.exec(e)) ? e[0] : e;
341
341
  }
342
- function V(e, t, r) {
342
+ function j(e, t, r) {
343
343
  return e.replace(t, r);
344
344
  }
345
345
  function et(e, t) {
@@ -348,7 +348,7 @@ function et(e, t) {
348
348
  function re(e, t) {
349
349
  return e.charCodeAt(t) | 0;
350
350
  }
351
- function $e(e, t, r) {
351
+ function Le(e, t, r) {
352
352
  return e.slice(t, r);
353
353
  }
354
354
  function pe(e) {
@@ -363,32 +363,32 @@ function Me(e, t) {
363
363
  function Kt(e, t) {
364
364
  return e.map(t).join("");
365
365
  }
366
- var Ge = 1, Ie = 1, Ct = 0, oe = 0, H = 0, Re = "";
366
+ var Ge = 1, Ce = 1, Ct = 0, oe = 0, H = 0, Te = "";
367
367
  function He(e, t, r, a, i, n, s) {
368
- return { value: e, root: t, parent: r, type: a, props: i, children: n, line: Ge, column: Ie, length: s, return: "" };
368
+ return { value: e, root: t, parent: r, type: a, props: i, children: n, line: Ge, column: Ce, length: s, return: "" };
369
369
  }
370
- function Ve(e, t) {
370
+ function je(e, t) {
371
371
  return Ht(He("", null, null, "", null, null, 0), e, { length: -e.length }, t);
372
372
  }
373
373
  function Qt() {
374
374
  return H;
375
375
  }
376
376
  function Zt() {
377
- return H = oe > 0 ? re(Re, --oe) : 0, Ie--, H === 10 && (Ie = 1, Ge--), H;
377
+ return H = oe > 0 ? re(Te, --oe) : 0, Ce--, H === 10 && (Ce = 1, Ge--), H;
378
378
  }
379
379
  function ue() {
380
- return H = oe < Ct ? re(Re, oe++) : 0, Ie++, H === 10 && (Ie = 1, Ge++), H;
380
+ return H = oe < Ct ? re(Te, oe++) : 0, Ce++, H === 10 && (Ce = 1, Ge++), H;
381
381
  }
382
382
  function me() {
383
- return re(Re, oe);
383
+ return re(Te, oe);
384
384
  }
385
385
  function Ue() {
386
386
  return oe;
387
387
  }
388
388
  function Fe(e, t) {
389
- return $e(Re, e, t);
389
+ return Le(Te, e, t);
390
390
  }
391
- function Le(e) {
391
+ function $e(e) {
392
392
  switch (e) {
393
393
  // \0 \t \n \r \s whitespace token
394
394
  case 0:
@@ -427,10 +427,10 @@ function Le(e) {
427
427
  return 0;
428
428
  }
429
429
  function Rt(e) {
430
- return Ge = Ie = 1, Ct = pe(Re = e), oe = 0, [];
430
+ return Ge = Ce = 1, Ct = pe(Te = e), oe = 0, [];
431
431
  }
432
432
  function Tt(e) {
433
- return Re = "", e;
433
+ return Te = "", e;
434
434
  }
435
435
  function ze(e) {
436
436
  return It(Fe(oe - 1, tt(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
@@ -438,7 +438,7 @@ function ze(e) {
438
438
  function er(e) {
439
439
  for (; (H = me()) && H < 33; )
440
440
  ue();
441
- return Le(e) > 2 || Le(H) > 3 ? "" : " ";
441
+ return $e(e) > 2 || $e(H) > 3 ? "" : " ";
442
442
  }
443
443
  function tr(e, t) {
444
444
  for (; --t && ue() && !(H < 48 || H > 102 || H > 57 && H < 65 || H > 70 && H < 97); )
@@ -474,7 +474,7 @@ function rr(e, t) {
474
474
  return "/*" + Fe(t, oe - 1) + "*" + Ye(e === 47 ? e : ue());
475
475
  }
476
476
  function nr(e) {
477
- for (; !Le(me()); )
477
+ for (; !$e(me()); )
478
478
  ue();
479
479
  return Fe(e, oe);
480
480
  }
@@ -482,30 +482,30 @@ function ar(e) {
482
482
  return Tt(qe("", null, null, null, [""], e = Rt(e), 0, [0], e));
483
483
  }
484
484
  function qe(e, t, r, a, i, n, s, l, c) {
485
- for (var y = 0, u = 0, f = s, x = 0, _ = 0, v = 0, p = 1, b = 1, P = 1, I = 0, $ = "", T = i, B = n, j = a, w = $; b; )
486
- switch (v = I, I = ue()) {
485
+ for (var y = 0, u = 0, h = s, g = 0, _ = 0, E = 0, d = 1, x = 1, w = 1, I = 0, L = "", T = i, B = n, V = a, b = L; x; )
486
+ switch (E = I, I = ue()) {
487
487
  // (
488
488
  case 40:
489
- if (v != 108 && re(w, f - 1) == 58) {
490
- et(w += V(ze(I), "&", "&\f"), "&\f") != -1 && (P = -1);
489
+ if (E != 108 && re(b, h - 1) == 58) {
490
+ et(b += j(ze(I), "&", "&\f"), "&\f") != -1 && (w = -1);
491
491
  break;
492
492
  }
493
493
  // " ' [
494
494
  case 34:
495
495
  case 39:
496
496
  case 91:
497
- w += ze(I);
497
+ b += ze(I);
498
498
  break;
499
499
  // \t \n \r \s
500
500
  case 9:
501
501
  case 10:
502
502
  case 13:
503
503
  case 32:
504
- w += er(v);
504
+ b += er(E);
505
505
  break;
506
506
  // \
507
507
  case 92:
508
- w += tr(Ue() - 1, 7);
508
+ b += tr(Ue() - 1, 7);
509
509
  continue;
510
510
  // /
511
511
  case 47:
@@ -515,91 +515,91 @@ function qe(e, t, r, a, i, n, s, l, c) {
515
515
  Me(ir(rr(ue(), Ue()), t, r), c);
516
516
  break;
517
517
  default:
518
- w += "/";
518
+ b += "/";
519
519
  }
520
520
  break;
521
521
  // {
522
- case 123 * p:
523
- l[y++] = pe(w) * P;
522
+ case 123 * d:
523
+ l[y++] = pe(b) * w;
524
524
  // } ; \0
525
- case 125 * p:
525
+ case 125 * d:
526
526
  case 59:
527
527
  case 0:
528
528
  switch (I) {
529
529
  // \0 }
530
530
  case 0:
531
531
  case 125:
532
- b = 0;
532
+ x = 0;
533
533
  // ;
534
534
  case 59 + u:
535
- P == -1 && (w = V(w, /\f/g, "")), _ > 0 && pe(w) - f && Me(_ > 32 ? pt(w + ";", a, r, f - 1) : pt(V(w, " ", "") + ";", a, r, f - 2), c);
535
+ w == -1 && (b = j(b, /\f/g, "")), _ > 0 && pe(b) - h && Me(_ > 32 ? pt(b + ";", a, r, h - 1) : pt(j(b, " ", "") + ";", a, r, h - 2), c);
536
536
  break;
537
537
  // @ ;
538
538
  case 59:
539
- w += ";";
539
+ b += ";";
540
540
  // { rule/at-rule
541
541
  default:
542
- if (Me(j = ft(w, t, r, y, u, i, l, $, T = [], B = [], f), n), I === 123)
542
+ if (Me(V = ft(b, t, r, y, u, i, l, L, T = [], B = [], h), n), I === 123)
543
543
  if (u === 0)
544
- qe(w, t, j, j, T, n, f, l, B);
544
+ qe(b, t, V, V, T, n, h, l, B);
545
545
  else
546
- switch (x === 99 && re(w, 3) === 110 ? 100 : x) {
546
+ switch (g === 99 && re(b, 3) === 110 ? 100 : g) {
547
547
  // d l m s
548
548
  case 100:
549
549
  case 108:
550
550
  case 109:
551
551
  case 115:
552
- qe(e, j, j, a && Me(ft(e, j, j, 0, 0, i, l, $, i, T = [], f), B), i, B, f, l, a ? T : B);
552
+ qe(e, V, V, a && Me(ft(e, V, V, 0, 0, i, l, L, i, T = [], h), B), i, B, h, l, a ? T : B);
553
553
  break;
554
554
  default:
555
- qe(w, j, j, j, [""], B, 0, l, B);
555
+ qe(b, V, V, V, [""], B, 0, l, B);
556
556
  }
557
557
  }
558
- y = u = _ = 0, p = P = 1, $ = w = "", f = s;
558
+ y = u = _ = 0, d = w = 1, L = b = "", h = s;
559
559
  break;
560
560
  // :
561
561
  case 58:
562
- f = 1 + pe(w), _ = v;
562
+ h = 1 + pe(b), _ = E;
563
563
  default:
564
- if (p < 1) {
564
+ if (d < 1) {
565
565
  if (I == 123)
566
- --p;
567
- else if (I == 125 && p++ == 0 && Zt() == 125)
566
+ --d;
567
+ else if (I == 125 && d++ == 0 && Zt() == 125)
568
568
  continue;
569
569
  }
570
- switch (w += Ye(I), I * p) {
570
+ switch (b += Ye(I), I * d) {
571
571
  // &
572
572
  case 38:
573
- P = u > 0 ? 1 : (w += "\f", -1);
573
+ w = u > 0 ? 1 : (b += "\f", -1);
574
574
  break;
575
575
  // ,
576
576
  case 44:
577
- l[y++] = (pe(w) - 1) * P, P = 1;
577
+ l[y++] = (pe(b) - 1) * w, w = 1;
578
578
  break;
579
579
  // @
580
580
  case 64:
581
- me() === 45 && (w += ze(ue())), x = me(), u = f = pe($ = w += nr(Ue())), I++;
581
+ me() === 45 && (b += ze(ue())), g = me(), u = h = pe(L = b += nr(Ue())), I++;
582
582
  break;
583
583
  // -
584
584
  case 45:
585
- v === 45 && pe(w) == 2 && (p = 0);
585
+ E === 45 && pe(b) == 2 && (d = 0);
586
586
  }
587
587
  }
588
588
  return n;
589
589
  }
590
590
  function ft(e, t, r, a, i, n, s, l, c, y, u) {
591
- for (var f = i - 1, x = i === 0 ? n : [""], _ = it(x), v = 0, p = 0, b = 0; v < a; ++v)
592
- for (var P = 0, I = $e(e, f + 1, f = Gt(p = s[v])), $ = e; P < _; ++P)
593
- ($ = It(p > 0 ? x[P] + " " + I : V(I, /&\f/g, x[P]))) && (c[b++] = $);
591
+ for (var h = i - 1, g = i === 0 ? n : [""], _ = it(g), E = 0, d = 0, x = 0; E < a; ++E)
592
+ for (var w = 0, I = Le(e, h + 1, h = Gt(d = s[E])), L = e; w < _; ++w)
593
+ (L = It(d > 0 ? g[w] + " " + I : j(I, /&\f/g, g[w]))) && (c[x++] = L);
594
594
  return He(e, t, r, i === 0 ? nt : l, c, y, u);
595
595
  }
596
596
  function ir(e, t, r) {
597
- return He(e, t, r, _t, Ye(Qt()), $e(e, 2, -2), 0);
597
+ return He(e, t, r, _t, Ye(Qt()), Le(e, 2, -2), 0);
598
598
  }
599
599
  function pt(e, t, r, a) {
600
- return He(e, t, r, at, $e(e, 0, a), $e(e, a + 1, -1), a);
600
+ return He(e, t, r, at, Le(e, 0, a), Le(e, a + 1, -1), a);
601
601
  }
602
- function Se(e, t) {
602
+ function Ie(e, t) {
603
603
  for (var r = "", a = it(e), i = 0; i < a; i++)
604
604
  r += t(e[i], i, e, t) || "";
605
605
  return r;
@@ -614,11 +614,11 @@ function or(e, t, r, a) {
614
614
  case _t:
615
615
  return "";
616
616
  case St:
617
- return e.return = e.value + "{" + Se(e.children, a) + "}";
617
+ return e.return = e.value + "{" + Ie(e.children, a) + "}";
618
618
  case nt:
619
619
  e.value = e.props.join(",");
620
620
  }
621
- return pe(r = Se(e.children, a)) ? e.return = e.value + "{" + r + "}" : "";
621
+ return pe(r = Ie(e.children, a)) ? e.return = e.value + "{" + r + "}" : "";
622
622
  }
623
623
  function sr(e) {
624
624
  var t = it(e);
@@ -640,13 +640,13 @@ function At(e) {
640
640
  };
641
641
  }
642
642
  var ur = function(t, r, a) {
643
- for (var i = 0, n = 0; i = n, n = me(), i === 38 && n === 12 && (r[a] = 1), !Le(n); )
643
+ for (var i = 0, n = 0; i = n, n = me(), i === 38 && n === 12 && (r[a] = 1), !$e(n); )
644
644
  ue();
645
645
  return Fe(t, oe);
646
646
  }, cr = function(t, r) {
647
647
  var a = -1, i = 44;
648
648
  do
649
- switch (Le(i)) {
649
+ switch ($e(i)) {
650
650
  case 0:
651
651
  i === 38 && me() === 12 && (r[a] = 1), t[a] += ur(oe - 1, r, a);
652
652
  break;
@@ -738,41 +738,41 @@ function kt(e, t) {
738
738
  return O + e + ae + "flex-" + e + e;
739
739
  // align-items
740
740
  case 5187:
741
- return O + e + V(e, /(\w+).+(:[^]+)/, O + "box-$1$2" + ae + "flex-$1$2") + e;
741
+ return O + e + j(e, /(\w+).+(:[^]+)/, O + "box-$1$2" + ae + "flex-$1$2") + e;
742
742
  // align-self
743
743
  case 5443:
744
- return O + e + ae + "flex-item-" + V(e, /flex-|-self/, "") + e;
744
+ return O + e + ae + "flex-item-" + j(e, /flex-|-self/, "") + e;
745
745
  // align-content
746
746
  case 4675:
747
- return O + e + ae + "flex-line-pack" + V(e, /align-content|flex-|-self/, "") + e;
747
+ return O + e + ae + "flex-line-pack" + j(e, /align-content|flex-|-self/, "") + e;
748
748
  // flex-shrink
749
749
  case 5548:
750
- return O + e + ae + V(e, "shrink", "negative") + e;
750
+ return O + e + ae + j(e, "shrink", "negative") + e;
751
751
  // flex-basis
752
752
  case 5292:
753
- return O + e + ae + V(e, "basis", "preferred-size") + e;
753
+ return O + e + ae + j(e, "basis", "preferred-size") + e;
754
754
  // flex-grow
755
755
  case 6060:
756
- return O + "box-" + V(e, "-grow", "") + O + e + ae + V(e, "grow", "positive") + e;
756
+ return O + "box-" + j(e, "-grow", "") + O + e + ae + j(e, "grow", "positive") + e;
757
757
  // transition
758
758
  case 4554:
759
- return O + V(e, /([^-])(transform)/g, "$1" + O + "$2") + e;
759
+ return O + j(e, /([^-])(transform)/g, "$1" + O + "$2") + e;
760
760
  // cursor
761
761
  case 6187:
762
- return V(V(V(e, /(zoom-|grab)/, O + "$1"), /(image-set)/, O + "$1"), e, "") + e;
762
+ return j(j(j(e, /(zoom-|grab)/, O + "$1"), /(image-set)/, O + "$1"), e, "") + e;
763
763
  // background, background-image
764
764
  case 5495:
765
765
  case 3959:
766
- return V(e, /(image-set\([^]*)/, O + "$1$`$1");
766
+ return j(e, /(image-set\([^]*)/, O + "$1$`$1");
767
767
  // justify-content
768
768
  case 4968:
769
- return V(V(e, /(.+:)(flex-)?(.*)/, O + "box-pack:$3" + ae + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + O + e + e;
769
+ return j(j(e, /(.+:)(flex-)?(.*)/, O + "box-pack:$3" + ae + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + O + e + e;
770
770
  // (margin|padding)-inline-(start|end)
771
771
  case 4095:
772
772
  case 3583:
773
773
  case 4068:
774
774
  case 2532:
775
- return V(e, /(.+)-inline(.+)/, O + "$1$2") + e;
775
+ return j(e, /(.+)-inline(.+)/, O + "$1$2") + e;
776
776
  // (min|max)?(width|height|inline-size|block-size)
777
777
  case 8116:
778
778
  case 7059:
@@ -792,10 +792,10 @@ function kt(e, t) {
792
792
  if (re(e, t + 4) !== 45) break;
793
793
  // (f)ill-available, (f)it-content
794
794
  case 102:
795
- return V(e, /(.+:)(.+)-([^]+)/, "$1" + O + "$2-$3$1" + We + (re(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
795
+ return j(e, /(.+:)(.+)-([^]+)/, "$1" + O + "$2-$3$1" + We + (re(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
796
796
  // (s)tretch
797
797
  case 115:
798
- return ~et(e, "stretch") ? kt(V(e, "stretch", "fill-available"), t) + e : e;
798
+ return ~et(e, "stretch") ? kt(j(e, "stretch", "fill-available"), t) + e : e;
799
799
  }
800
800
  break;
801
801
  // position: sticky
@@ -806,10 +806,10 @@ function kt(e, t) {
806
806
  switch (re(e, pe(e) - 3 - (~et(e, "!important") && 10))) {
807
807
  // stic(k)y
808
808
  case 107:
809
- return V(e, ":", ":" + O) + e;
809
+ return j(e, ":", ":" + O) + e;
810
810
  // (inline-)?fl(e)x
811
811
  case 101:
812
- return V(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + O + (re(e, 14) === 45 ? "inline-" : "") + "box$3$1" + O + "$2$3$1" + ae + "$2box$3") + e;
812
+ return j(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + O + (re(e, 14) === 45 ? "inline-" : "") + "box$3$1" + O + "$2$3$1" + ae + "$2box$3") + e;
813
813
  }
814
814
  break;
815
815
  // writing-mode
@@ -817,13 +817,13 @@ function kt(e, t) {
817
817
  switch (re(e, t + 11)) {
818
818
  // vertical-l(r)
819
819
  case 114:
820
- return O + e + ae + V(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
820
+ return O + e + ae + j(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
821
821
  // vertical-r(l)
822
822
  case 108:
823
- return O + e + ae + V(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
823
+ return O + e + ae + j(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
824
824
  // horizontal(-)tb
825
825
  case 45:
826
- return O + e + ae + V(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
826
+ return O + e + ae + j(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
827
827
  }
828
828
  return O + e + ae + e + e;
829
829
  }
@@ -835,8 +835,8 @@ var hr = function(t, r, a, i) {
835
835
  t.return = kt(t.value, t.length);
836
836
  break;
837
837
  case St:
838
- return Se([Ve(t, {
839
- value: V(t.value, "@", "@" + O)
838
+ return Ie([je(t, {
839
+ value: j(t.value, "@", "@" + O)
840
840
  })], i);
841
841
  case nt:
842
842
  if (t.length) return Kt(t.props, function(n) {
@@ -844,17 +844,17 @@ var hr = function(t, r, a, i) {
844
844
  // :read-(only|write)
845
845
  case ":read-only":
846
846
  case ":read-write":
847
- return Se([Ve(t, {
848
- props: [V(n, /:(read-\w+)/, ":" + We + "$1")]
847
+ return Ie([je(t, {
848
+ props: [j(n, /:(read-\w+)/, ":" + We + "$1")]
849
849
  })], i);
850
850
  // :placeholder
851
851
  case "::placeholder":
852
- return Se([Ve(t, {
853
- props: [V(n, /:(plac\w+)/, ":" + O + "input-$1")]
854
- }), Ve(t, {
855
- props: [V(n, /:(plac\w+)/, ":" + We + "$1")]
856
- }), Ve(t, {
857
- props: [V(n, /:(plac\w+)/, ae + "input-$1")]
852
+ return Ie([je(t, {
853
+ props: [j(n, /:(plac\w+)/, ":" + O + "input-$1")]
854
+ }), je(t, {
855
+ props: [j(n, /:(plac\w+)/, ":" + We + "$1")]
856
+ }), je(t, {
857
+ props: [j(n, /:(plac\w+)/, ae + "input-$1")]
858
858
  })], i);
859
859
  }
860
860
  return "";
@@ -864,9 +864,9 @@ var hr = function(t, r, a, i) {
864
864
  var r = t.key;
865
865
  if (r === "css") {
866
866
  var a = document.querySelectorAll("style[data-emotion]:not([data-s])");
867
- Array.prototype.forEach.call(a, function(p) {
868
- var b = p.getAttribute("data-emotion");
869
- b.indexOf(" ") !== -1 && (document.head.appendChild(p), p.setAttribute("data-s", ""));
867
+ Array.prototype.forEach.call(a, function(d) {
868
+ var x = d.getAttribute("data-emotion");
869
+ x.indexOf(" ") !== -1 && (document.head.appendChild(d), d.setAttribute("data-s", ""));
870
870
  });
871
871
  }
872
872
  var i = t.stylisPlugins || mr, n = {}, s, l = [];
@@ -874,24 +874,24 @@ var hr = function(t, r, a, i) {
874
874
  // this means we will ignore elements which don't have a space in them which
875
875
  // means that the style elements we're looking at are only Emotion 11 server-rendered style elements
876
876
  document.querySelectorAll('style[data-emotion^="' + r + ' "]'),
877
- function(p) {
878
- for (var b = p.getAttribute("data-emotion").split(" "), P = 1; P < b.length; P++)
879
- n[b[P]] = !0;
880
- l.push(p);
877
+ function(d) {
878
+ for (var x = d.getAttribute("data-emotion").split(" "), w = 1; w < x.length; w++)
879
+ n[x[w]] = !0;
880
+ l.push(d);
881
881
  }
882
882
  );
883
883
  var c, y = [fr, pr];
884
884
  {
885
- var u, f = [or, lr(function(p) {
886
- u.insert(p);
887
- })], x = sr(y.concat(i, f)), _ = function(b) {
888
- return Se(ar(b), x);
885
+ var u, h = [or, lr(function(d) {
886
+ u.insert(d);
887
+ })], g = sr(y.concat(i, h)), _ = function(x) {
888
+ return Ie(ar(x), g);
889
889
  };
890
- c = function(b, P, I, $) {
891
- u = I, _(b ? b + "{" + P.styles + "}" : P.styles), $ && (v.inserted[P.name] = !0);
890
+ c = function(x, w, I, L) {
891
+ u = I, _(x ? x + "{" + w.styles + "}" : w.styles), L && (E.inserted[w.name] = !0);
892
892
  };
893
893
  }
894
- var v = {
894
+ var E = {
895
895
  key: r,
896
896
  sheet: new qt({
897
897
  key: r,
@@ -906,7 +906,7 @@ var hr = function(t, r, a, i) {
906
906
  registered: {},
907
907
  insert: c
908
908
  };
909
- return v.sheet.hydrate(l), v;
909
+ return E.sheet.hydrate(l), E;
910
910
  }, vr = !0;
911
911
  function gr(e, t, r) {
912
912
  var a = "";
@@ -1004,18 +1004,18 @@ var br = {
1004
1004
  strokeMiterlimit: 1,
1005
1005
  strokeOpacity: 1,
1006
1006
  strokeWidth: 1
1007
- }, Pr = /[A-Z]|^ms/g, Er = /_EMO_([^_]+?)_([^]*?)_EMO_/g, Vt = function(t) {
1007
+ }, Er = /[A-Z]|^ms/g, Pr = /_EMO_([^_]+?)_([^]*?)_EMO_/g, jt = function(t) {
1008
1008
  return t.charCodeAt(1) === 45;
1009
1009
  }, mt = function(t) {
1010
1010
  return t != null && typeof t != "boolean";
1011
1011
  }, Xe = /* @__PURE__ */ At(function(e) {
1012
- return Vt(e) ? e : e.replace(Pr, "-$&").toLowerCase();
1012
+ return jt(e) ? e : e.replace(Er, "-$&").toLowerCase();
1013
1013
  }), yt = function(t, r) {
1014
1014
  switch (t) {
1015
1015
  case "animation":
1016
1016
  case "animationName":
1017
1017
  if (typeof r == "string")
1018
- return r.replace(Er, function(a, i, n) {
1018
+ return r.replace(Pr, function(a, i, n) {
1019
1019
  return he = {
1020
1020
  name: i,
1021
1021
  styles: n,
@@ -1023,7 +1023,7 @@ var br = {
1023
1023
  }, i;
1024
1024
  });
1025
1025
  }
1026
- return br[t] !== 1 && !Vt(t) && typeof r == "number" && r !== 0 ? r + "px" : r;
1026
+ return br[t] !== 1 && !jt(t) && typeof r == "number" && r !== 0 ? r + "px" : r;
1027
1027
  };
1028
1028
  function Ne(e, t, r) {
1029
1029
  if (r == null)
@@ -1068,8 +1068,8 @@ function Ne(e, t, r) {
1068
1068
  var u = r;
1069
1069
  if (t == null)
1070
1070
  return u;
1071
- var f = t[u];
1072
- return f !== void 0 ? f : u;
1071
+ var h = t[u];
1072
+ return h !== void 0 ? h : u;
1073
1073
  }
1074
1074
  function _r(e, t, r) {
1075
1075
  var a = "";
@@ -1121,16 +1121,16 @@ function Sr(e, t, r) {
1121
1121
  vt.lastIndex = 0;
1122
1122
  for (var y = "", u; (u = vt.exec(i)) !== null; )
1123
1123
  y += "-" + u[1];
1124
- var f = wr(i) + y;
1124
+ var h = wr(i) + y;
1125
1125
  return {
1126
- name: f,
1126
+ name: h,
1127
1127
  styles: i,
1128
1128
  next: he
1129
1129
  };
1130
1130
  }
1131
1131
  var Ir = function(t) {
1132
1132
  return t();
1133
- }, Cr = ve.useInsertionEffect ? ve.useInsertionEffect : !1, Rr = Cr || Ir, jt = /* @__PURE__ */ ve.createContext(
1133
+ }, Cr = ve.useInsertionEffect ? ve.useInsertionEffect : !1, Rr = Cr || Ir, Vt = /* @__PURE__ */ ve.createContext(
1134
1134
  // we're doing this to avoid preconstruct's dead code elimination in this one case
1135
1135
  // because this module is primarily intended for the browser and node
1136
1136
  // but it's also required in react native and similar environments sometimes
@@ -1141,10 +1141,10 @@ var Ir = function(t) {
1141
1141
  key: "css"
1142
1142
  }) : null
1143
1143
  );
1144
- jt.Provider;
1144
+ Vt.Provider;
1145
1145
  var Tr = function(t) {
1146
1146
  return /* @__PURE__ */ Nt(function(r, a) {
1147
- var i = Pt(jt);
1147
+ var i = Et(Vt);
1148
1148
  return t(r, i, a);
1149
1149
  });
1150
1150
  }, Ar = /* @__PURE__ */ ve.createContext({}), kr = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/, Or = /* @__PURE__ */ At(
@@ -1152,13 +1152,13 @@ var Tr = function(t) {
1152
1152
  return kr.test(e) || e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && e.charCodeAt(2) < 91;
1153
1153
  }
1154
1154
  /* Z+1 */
1155
- ), Vr = Or, jr = function(t) {
1155
+ ), jr = Or, Vr = function(t) {
1156
1156
  return t !== "theme";
1157
1157
  }, gt = function(t) {
1158
1158
  return typeof t == "string" && // 96 is one less than the char code
1159
1159
  // for "a" so this is checking that
1160
1160
  // it's a lowercase character
1161
- t.charCodeAt(0) > 96 ? Vr : jr;
1161
+ t.charCodeAt(0) > 96 ? jr : Vr;
1162
1162
  }, xt = function(t, r, a) {
1163
1163
  var i;
1164
1164
  if (r) {
@@ -1168,55 +1168,55 @@ var Tr = function(t) {
1168
1168
  } : n;
1169
1169
  }
1170
1170
  return typeof i != "function" && a && (i = t.__emotion_forwardProp), i;
1171
- }, $r = function(t) {
1171
+ }, Lr = function(t) {
1172
1172
  var r = t.cache, a = t.serialized, i = t.isStringTag;
1173
1173
  return Ot(r, a, i), Rr(function() {
1174
1174
  return xr(r, a, i);
1175
1175
  }), null;
1176
- }, Lr = function e(t, r) {
1176
+ }, $r = function e(t, r) {
1177
1177
  var a = t.__emotion_real === t, i = a && t.__emotion_base || t, n, s;
1178
1178
  r !== void 0 && (n = r.label, s = r.target);
1179
1179
  var l = xt(t, r, a), c = l || gt(i), y = !c("as");
1180
1180
  return function() {
1181
- var u = arguments, f = a && t.__emotion_styles !== void 0 ? t.__emotion_styles.slice(0) : [];
1182
- if (n !== void 0 && f.push("label:" + n + ";"), u[0] == null || u[0].raw === void 0)
1183
- f.push.apply(f, u);
1181
+ var u = arguments, h = a && t.__emotion_styles !== void 0 ? t.__emotion_styles.slice(0) : [];
1182
+ if (n !== void 0 && h.push("label:" + n + ";"), u[0] == null || u[0].raw === void 0)
1183
+ h.push.apply(h, u);
1184
1184
  else {
1185
- var x = u[0];
1186
- f.push(x[0]);
1187
- for (var _ = u.length, v = 1; v < _; v++)
1188
- f.push(u[v], x[v]);
1185
+ var g = u[0];
1186
+ h.push(g[0]);
1187
+ for (var _ = u.length, E = 1; E < _; E++)
1188
+ h.push(u[E], g[E]);
1189
1189
  }
1190
- var p = Tr(function(b, P, I) {
1191
- var $ = y && b.as || i, T = "", B = [], j = b;
1192
- if (b.theme == null) {
1193
- j = {};
1194
- for (var w in b)
1195
- j[w] = b[w];
1196
- j.theme = ve.useContext(Ar);
1190
+ var d = Tr(function(x, w, I) {
1191
+ var L = y && x.as || i, T = "", B = [], V = x;
1192
+ if (x.theme == null) {
1193
+ V = {};
1194
+ for (var b in x)
1195
+ V[b] = x[b];
1196
+ V.theme = ve.useContext(Ar);
1197
1197
  }
1198
- typeof b.className == "string" ? T = gr(P.registered, B, b.className) : b.className != null && (T = b.className + " ");
1199
- var J = Sr(f.concat(B), P.registered, j);
1200
- T += P.key + "-" + J.name, s !== void 0 && (T += " " + s);
1201
- var q = y && l === void 0 ? gt($) : c, d = {};
1202
- for (var g in b)
1203
- y && g === "as" || q(g) && (d[g] = b[g]);
1204
- return d.className = T, I && (d.ref = I), /* @__PURE__ */ ve.createElement(ve.Fragment, null, /* @__PURE__ */ ve.createElement($r, {
1205
- cache: P,
1206
- serialized: J,
1207
- isStringTag: typeof $ == "string"
1208
- }), /* @__PURE__ */ ve.createElement($, d));
1198
+ typeof x.className == "string" ? T = gr(w.registered, B, x.className) : x.className != null && (T = x.className + " ");
1199
+ var Q = Sr(h.concat(B), w.registered, V);
1200
+ T += w.key + "-" + Q.name, s !== void 0 && (T += " " + s);
1201
+ var q = y && l === void 0 ? gt(L) : c, f = {};
1202
+ for (var v in x)
1203
+ y && v === "as" || q(v) && (f[v] = x[v]);
1204
+ return f.className = T, I && (f.ref = I), /* @__PURE__ */ ve.createElement(ve.Fragment, null, /* @__PURE__ */ ve.createElement(Lr, {
1205
+ cache: w,
1206
+ serialized: Q,
1207
+ isStringTag: typeof L == "string"
1208
+ }), /* @__PURE__ */ ve.createElement(L, f));
1209
1209
  });
1210
- return p.displayName = n !== void 0 ? n : "Styled(" + (typeof i == "string" ? i : i.displayName || i.name || "Component") + ")", p.defaultProps = t.defaultProps, p.__emotion_real = p, p.__emotion_base = i, p.__emotion_styles = f, p.__emotion_forwardProp = l, Object.defineProperty(p, "toString", {
1210
+ return d.displayName = n !== void 0 ? n : "Styled(" + (typeof i == "string" ? i : i.displayName || i.name || "Component") + ")", d.defaultProps = t.defaultProps, d.__emotion_real = d, d.__emotion_base = i, d.__emotion_styles = h, d.__emotion_forwardProp = l, Object.defineProperty(d, "toString", {
1211
1211
  value: function() {
1212
1212
  return "." + s;
1213
1213
  }
1214
- }), p.withComponent = function(b, P) {
1215
- var I = e(b, Ze({}, r, P, {
1216
- shouldForwardProp: xt(p, P, !0)
1214
+ }), d.withComponent = function(x, w) {
1215
+ var I = e(x, Ze({}, r, w, {
1216
+ shouldForwardProp: xt(d, w, !0)
1217
1217
  }));
1218
- return I.apply(void 0, f);
1219
- }, p;
1218
+ return I.apply(void 0, h);
1219
+ }, d;
1220
1220
  };
1221
1221
  }, Nr = [
1222
1222
  "a",
@@ -1354,11 +1354,11 @@ var Tr = function(t) {
1354
1354
  "svg",
1355
1355
  "text",
1356
1356
  "tspan"
1357
- ], Ce = Lr.bind(null);
1357
+ ], Re = $r.bind(null);
1358
1358
  Nr.forEach(function(e) {
1359
- Ce[e] = Ce(e);
1359
+ Re[e] = Re(e);
1360
1360
  });
1361
- const Fr = Ce.div`
1361
+ const Fr = Re.div`
1362
1362
  display: flex;
1363
1363
  align-items: center;
1364
1364
  justify-content: center;
@@ -1399,7 +1399,7 @@ const Fr = Ce.div`
1399
1399
  return "";
1400
1400
  }
1401
1401
  }}
1402
- `, rt = ({ type: e, children: t, className: r, icon: a, action: i }) => Q.jsxs(Fr, { type: e, className: r, children: [a && Q.jsx("span", { children: a }), Q.jsx("span", { children: t }), i && Q.jsx("span", { children: i })] }), wt = Ce.div`
1402
+ `, rt = ({ type: e, children: t, className: r, icon: a, action: i }) => K.jsxs(Fr, { type: e, className: r, children: [a && K.jsx("span", { children: a }), K.jsx("span", { children: t }), i && K.jsx("span", { children: i })] }), wt = Re.div`
1403
1403
  width: ${({ width: e }) => e || "100%"};
1404
1404
  height: ${({ height: e }) => e || "100%"};
1405
1405
  border-radius: 0px !important; /* Force remove rounded corners on container */
@@ -1411,7 +1411,7 @@ const Fr = Ce.div`
1411
1411
 
1412
1412
  /* Hide specific elements inside the player */
1413
1413
  ${({ $hiddenClasses: e }) => (e == null ? void 0 : e.length) && e.map((t) => `.${t} { display: none !important; }`).join("")}
1414
- `, Br = Ce.div`
1414
+ `, Br = Re.div`
1415
1415
  position: fixed;
1416
1416
  top: 0;
1417
1417
  left: 0;
@@ -1423,7 +1423,7 @@ const Fr = Ce.div`
1423
1423
  align-items: center;
1424
1424
  z-index: 1000;
1425
1425
  pointer-events: auto;
1426
- `, Dr = Ce.div`
1426
+ `, Dr = Re.div`
1427
1427
  position: relative;
1428
1428
  max-width: 100vw;
1429
1429
  aspect-ratio: 9 / 16;
@@ -1432,15 +1432,15 @@ const Fr = Ce.div`
1432
1432
  max-height: 100vh;
1433
1433
  `, Mr = (e, t) => `https://vp-api.gjirafa.tech/api/v2/projects/${e}/videos?search=${t}`, bt = (e, t) => `https://vp-api.gjirafa.tech/api/projects/${e}/playlists/${t}/videos`, Ur = (e, t) => `https://vp-api.gjirafa.tech/api/projects/${e}/playlists/${t}`, zr = (e) => `https://host.vpplayer.tech/player/${e}/vpplayer.js`, ot = (e, t) => `vp-player-${e || "default"}-${t || ""}`, Je = /* @__PURE__ */ new Map(), qr = (e, t) => {
1434
1434
  const [r, a] = ce(!1), [i, n] = ce(null);
1435
- return _e(() => {
1435
+ return Se(() => {
1436
1436
  let s = null, l, c = 0;
1437
1437
  const y = 3;
1438
1438
  let u;
1439
1439
  try {
1440
1440
  u = t || zr(e || "latest");
1441
1441
  } catch (_) {
1442
- const v = _ instanceof Error ? _.message : String(_);
1443
- n(`Failed to resolve script URL: ${v}`), a(!1);
1442
+ const E = _ instanceof Error ? _.message : String(_);
1443
+ n(`Failed to resolve script URL: ${E}`), a(!1);
1444
1444
  return;
1445
1445
  }
1446
1446
  if (Je.get(u)) {
@@ -1451,46 +1451,46 @@ const Fr = Ce.div`
1451
1451
  Je.set(u, !0), a(!0), n(null);
1452
1452
  return;
1453
1453
  }
1454
- const x = () => {
1454
+ const g = () => {
1455
1455
  s = document.createElement("script"), s.src = u, s.async = !0, l = window.setTimeout(() => {
1456
1456
  a(!1), n(`Loading script timed out: ${u}`);
1457
1457
  }, 1e4), s.onload = () => {
1458
1458
  clearTimeout(l), Je.set(u, !0), a(!0), n(null);
1459
1459
  }, s.onerror = () => {
1460
- clearTimeout(l), c++, c < y ? setTimeout(x, 1e3 * c) : (a(!1), n(`Failed to load VP Player script after ${y} attempts: ${u}`));
1460
+ clearTimeout(l), c++, c < y ? setTimeout(g, 1e3 * c) : (a(!1), n(`Failed to load VP Player script after ${y} attempts: ${u}`));
1461
1461
  }, document.body.appendChild(s);
1462
1462
  };
1463
- return x(), () => {
1463
+ return g(), () => {
1464
1464
  clearTimeout(l), s && document.body.contains(s) && document.body.removeChild(s);
1465
1465
  };
1466
1466
  }, [e, t]), { isLoaded: r, error: i };
1467
- }, Wr = {}, je = /* @__PURE__ */ new Map(), Yr = 3e4, Ke = 5, Gr = ({ projectId: e, videoId: t, playlistId: r, videoUrl: a, apiKey: i }) => {
1468
- const [n, s] = ce(null), [l, c] = ce(null), [y, u] = ce(!1), [f, x] = ce(null), _ = i || (typeof Wr < "u" ? "1CFC4B619E9342B6BAC4879BA8C30CF216C4BA9D3F084B11825F4AB2D5CF845E" : void 0);
1469
- return _e(() => {
1470
- const v = t ? `video:${t}` : r ? `playlist:${r}` : null;
1467
+ }, Wr = {}, Ve = /* @__PURE__ */ new Map(), Yr = 3e4, Ke = 5, Gr = ({ projectId: e, videoId: t, playlistId: r, videoUrl: a, apiKey: i }) => {
1468
+ const [n, s] = ce(null), [l, c] = ce(null), [y, u] = ce(!1), [h, g] = ce(null), _ = i || (typeof Wr < "u" ? "1CFC4B619E9342B6BAC4879BA8C30CF216C4BA9D3F084B11825F4AB2D5CF845E" : void 0);
1469
+ return Se(() => {
1470
+ const E = t ? `video:${t}` : r ? `playlist:${r}` : null;
1471
1471
  if (!e || a || !t && !r) {
1472
- s(a || null), c(null), u(!1), x(null);
1472
+ s(a || null), c(null), u(!1), g(null);
1473
1473
  return;
1474
1474
  }
1475
1475
  if (!_) {
1476
- u(!1), x("No API key provided");
1476
+ u(!1), g("No API key provided");
1477
1477
  return;
1478
1478
  }
1479
- if (v && je.has(v)) {
1480
- const T = je.get(v);
1481
- s(T.url), c(T.playlist), u(!1), x(null);
1479
+ if (E && Ve.has(E)) {
1480
+ const T = Ve.get(E);
1481
+ s(T.url), c(T.playlist), u(!1), g(null);
1482
1482
  return;
1483
1483
  }
1484
- let p = !0;
1485
- const b = new AbortController(), P = b.signal, $ = setTimeout(async () => {
1486
- var B, j, w, J;
1487
- if (!p)
1484
+ let d = !0;
1485
+ const x = new AbortController(), w = x.signal, L = setTimeout(async () => {
1486
+ var B, V, b, Q;
1487
+ if (!d)
1488
1488
  return;
1489
- u(!0), x(null);
1489
+ u(!0), g(null);
1490
1490
  let T = 0;
1491
- for (; T < Ke && p; )
1491
+ for (; T < Ke && d; )
1492
1492
  try {
1493
- const q = t && !r ? Mr(e, t) : bt(e, r), d = setTimeout(() => b.abort(), Yr), g = await fetch(q, {
1493
+ const q = t && !r ? Mr(e, t) : bt(e, r), f = setTimeout(() => x.abort(), Yr), v = await fetch(q, {
1494
1494
  method: "GET",
1495
1495
  headers: {
1496
1496
  "api-key": _,
@@ -1498,34 +1498,34 @@ const Fr = Ce.div`
1498
1498
  "Cache-Control": "no-cache"
1499
1499
  // Prevent caching issues
1500
1500
  },
1501
- signal: P
1501
+ signal: w
1502
1502
  });
1503
- if (clearTimeout(d), !g.ok)
1504
- throw new Error(`Fetch failed with status ${g.status}`);
1505
- const E = await g.json();
1506
- if (!p)
1503
+ if (clearTimeout(f), !v.ok)
1504
+ throw new Error(`Fetch failed with status ${v.status}`);
1505
+ const P = await v.json();
1506
+ if (!d)
1507
1507
  return;
1508
1508
  if (t && !r) {
1509
- const L = (j = (B = E.result) == null ? void 0 : B.items) == null ? void 0 : j.find((D) => D.mediaId === t);
1510
- if (!(L != null && L.playbackUrl))
1509
+ const $ = (V = (B = P.result) == null ? void 0 : B.items) == null ? void 0 : V.find((D) => D.mediaId === t);
1510
+ if (!($ != null && $.playbackUrl))
1511
1511
  throw new Error("Invalid video data");
1512
- s(L.playbackUrl), c(null), v && je.set(v, { url: L.playbackUrl, playlist: null });
1512
+ s($.playbackUrl), c(null), E && Ve.set(E, { url: $.playbackUrl, playlist: null });
1513
1513
  } else {
1514
- if (!Array.isArray(E.result))
1514
+ if (!Array.isArray(P.result))
1515
1515
  throw new Error("Invalid playlist format");
1516
- const L = Ur(e, r), D = await fetch(L, {
1516
+ const $ = Ur(e, r), D = await fetch($, {
1517
1517
  method: "GET",
1518
1518
  headers: {
1519
1519
  "api-key": _,
1520
1520
  Accept: "application/json",
1521
1521
  "Cache-Control": "no-cache"
1522
1522
  },
1523
- signal: P
1523
+ signal: w
1524
1524
  });
1525
1525
  if (D.ok) {
1526
1526
  const U = await D.json();
1527
- let M = [...E.result];
1528
- if ((w = U.result) != null && w.playlistBackupState && ((J = U.result) != null && J.playlistBackupId)) {
1527
+ let M = [...P.result];
1528
+ if ((b = U.result) != null && b.playlistBackupState && ((Q = U.result) != null && Q.playlistBackupId)) {
1529
1529
  const W = bt(e, U.result.playlistBackupId), z = await fetch(W, {
1530
1530
  method: "GET",
1531
1531
  headers: {
@@ -1533,12 +1533,12 @@ const Fr = Ce.div`
1533
1533
  Accept: "application/json",
1534
1534
  "Cache-Control": "no-cache"
1535
1535
  },
1536
- signal: P
1536
+ signal: w
1537
1537
  });
1538
1538
  if (z.ok) {
1539
- const h = await z.json();
1540
- if (Array.isArray(h.result)) {
1541
- const o = h.result.map((m) => ({
1539
+ const p = await z.json();
1540
+ if (Array.isArray(p.result)) {
1541
+ const o = p.result.map((m) => ({
1542
1542
  ...m,
1543
1543
  isBackupPlaylist: !0
1544
1544
  }));
@@ -1546,176 +1546,171 @@ const Fr = Ce.div`
1546
1546
  }
1547
1547
  }
1548
1548
  }
1549
- c(M), s(null), v && je.set(v, { url: null, playlist: M });
1549
+ c(M), s(null), E && Ve.set(E, { url: null, playlist: M });
1550
1550
  } else
1551
- c(E.result), s(null), v && je.set(v, { url: null, playlist: E.result });
1551
+ c(P.result), s(null), E && Ve.set(E, { url: null, playlist: P.result });
1552
1552
  }
1553
1553
  break;
1554
1554
  } catch (q) {
1555
- if (P.aborted) {
1556
- p && x("Request timed out");
1555
+ if (w.aborted) {
1556
+ d && g("Request timed out");
1557
1557
  break;
1558
1558
  }
1559
1559
  if (T++, T >= Ke) {
1560
- const d = q instanceof Error ? q.message : String(q);
1561
- p && x(`Failed after ${Ke} attempts: ${d}`);
1560
+ const f = q instanceof Error ? q.message : String(q);
1561
+ d && g(`Failed after ${Ke} attempts: ${f}`);
1562
1562
  } else
1563
- await new Promise((d) => setTimeout(d, 2e3));
1563
+ await new Promise((f) => setTimeout(f, 2e3));
1564
1564
  }
1565
- p && u(!1);
1565
+ d && u(!1);
1566
1566
  }, 100);
1567
1567
  return () => {
1568
- p = !1, clearTimeout($), b.abort();
1568
+ d = !1, clearTimeout(L), x.abort();
1569
1569
  };
1570
- }, [_, e, t, r, a]), { fetchedPlaybackUrl: n, fetchedPlaylist: l, isLoading: y, error: f };
1570
+ }, [_, e, t, r, a]), { fetchedPlaybackUrl: n, fetchedPlaylist: l, isLoading: y, error: h };
1571
1571
  }, Hr = ({ playerId: e, playerInstanceRef: t, playerRef: r, videoData: a, trackingMetadata: i, callbacks: n }) => {
1572
- const s = te(!1), l = te(!1), c = te(!1), y = te(0), u = te({}), f = te(null), x = te(null), _ = te(null), v = te(!1), p = te(!1);
1573
- _e(() => {
1572
+ const s = te(!1), l = te(!1), c = te(!1), y = te(0), u = te({}), h = te(null), g = te(null), _ = te(null), E = te(null), d = te(!1);
1573
+ Se(() => {
1574
1574
  if (!(n && (n.onPlayerStart || n.onPlayerPlay || n.onPlayerPause || n.onPlayerResume || n.onPlayerEnd || n.onPlayerProgressEvery10Seconds || n.onPlayerProgressAt20Seconds || n.onPlayerQuartile25 || n.onPlayerQuartile50 || n.onPlayerQuartile75 || n.onPlayerNext || n.onPlayerPrevious || n.onPlayerEvent)))
1575
1575
  return;
1576
1576
  (() => {
1577
1577
  s.current = !1, l.current = !1, c.current = !1, y.current = 0, u.current = {};
1578
1578
  })();
1579
1579
  const I = () => {
1580
- var E;
1581
- const d = document.getElementById(e);
1582
- if (!d)
1580
+ var P;
1581
+ const f = document.getElementById(e);
1582
+ if (!f)
1583
1583
  return null;
1584
- if (d.querySelectorAll("video").length > 1 && t.current) {
1585
- const L = t.current, D = L.videoIndex ?? ((E = L.playlist) == null ? void 0 : E.playlistVideoIndex) ?? 0, U = d.querySelector(`video[id="${D}"]`);
1584
+ if (f.querySelectorAll("video").length > 1 && t.current) {
1585
+ const $ = t.current, D = $.videoIndex ?? ((P = $.playlist) == null ? void 0 : P.playlistVideoIndex) ?? 0, U = f.querySelector(`video[id="${D}"]`);
1586
1586
  if (U)
1587
1587
  return U;
1588
- const M = d.querySelector("video.active");
1588
+ const M = f.querySelector("video.active");
1589
1589
  if (M)
1590
1590
  return M;
1591
1591
  }
1592
- return d.querySelector("video");
1593
- }, $ = () => {
1594
- const d = I();
1595
- if (!d)
1592
+ return f.querySelector("video");
1593
+ }, L = () => {
1594
+ const f = I();
1595
+ if (!f)
1596
1596
  return !1;
1597
- const g = (h, o) => {
1598
- var m, A, C, Y, K, X, de, N, Z, fe, ne, xe, Be, se;
1599
- switch (h) {
1600
- case "player_start":
1601
- (m = n.onPlayerStart) == null || m.call(n, h);
1602
- break;
1603
- case "player_play":
1604
- (A = n.onPlayerPlay) == null || A.call(n, h);
1605
- break;
1606
- case "player_pause":
1607
- (C = n.onPlayerPause) == null || C.call(n, h);
1608
- break;
1609
- case "player_resume":
1610
- (Y = n.onPlayerResume) == null || Y.call(n, h);
1611
- break;
1612
- case "player_end":
1613
- (K = n.onPlayerEnd) == null || K.call(n, h);
1614
- break;
1615
- case "player_progress_every_10_seconds":
1616
- o !== void 0 && ((X = n.onPlayerProgressEvery10Seconds) == null || X.call(n, h, o));
1617
- break;
1618
- case "player_progress_at_20_seconds":
1619
- o !== void 0 && ((de = n.onPlayerProgressAt20Seconds) == null || de.call(n, h, o));
1620
- break;
1621
- case "player_quartile_25":
1622
- o !== void 0 && ((N = n.onPlayerQuartile25) == null || N.call(n, h, o));
1623
- break;
1624
- case "player_quartile_50":
1625
- o !== void 0 && ((Z = n.onPlayerQuartile50) == null || Z.call(n, h, o));
1626
- break;
1627
- case "player_quartile_75":
1628
- o !== void 0 && ((fe = n.onPlayerQuartile75) == null || fe.call(n, h, o));
1629
- break;
1630
- case "player_next":
1631
- (ne = n.onPlayerNext) == null || ne.call(n, h);
1632
- break;
1633
- case "player_previous":
1634
- (xe = n.onPlayerPrevious) == null || xe.call(n, h);
1635
- break;
1636
- }
1637
- o !== void 0 && (h === "player_progress_every_10_seconds" || h === "player_progress_at_20_seconds" || h === "player_quartile_25" || h === "player_quartile_50" || h === "player_quartile_75") ? (Be = n.onPlayerEvent) == null || Be.call(n, h, o) : (se = n.onPlayerEvent) == null || se.call(n, h);
1638
- }, E = () => {
1639
- if (!s.current) {
1640
- if (p.current) {
1641
- p.current = !1, s.current = !0, d.readyState >= 2 && !d.paused && setTimeout(() => {
1642
- !l.current && !d.paused && (g("player_play"), l.current = !0, c.current = !1);
1643
- }, 100);
1644
- return;
1597
+ const v = (p, o) => {
1598
+ var A, C, Y, J, X, de, N, Z, fe, ne, we, Be, se, ge;
1599
+ const m = Date.now();
1600
+ if (!(p === "player_start" && s.current)) {
1601
+ switch (E.current = { type: p, time: m }, p) {
1602
+ case "player_start":
1603
+ (A = n.onPlayerStart) == null || A.call(n, p);
1604
+ break;
1605
+ case "player_play":
1606
+ (C = n.onPlayerPlay) == null || C.call(n, p);
1607
+ break;
1608
+ case "player_pause":
1609
+ (Y = n.onPlayerPause) == null || Y.call(n, p);
1610
+ break;
1611
+ case "player_resume":
1612
+ (J = n.onPlayerResume) == null || J.call(n, p);
1613
+ break;
1614
+ case "player_end":
1615
+ (X = n.onPlayerEnd) == null || X.call(n, p);
1616
+ break;
1617
+ case "player_progress_every_10_seconds":
1618
+ o !== void 0 && ((de = n.onPlayerProgressEvery10Seconds) == null || de.call(n, p, o));
1619
+ break;
1620
+ case "player_progress_at_20_seconds":
1621
+ o !== void 0 && ((N = n.onPlayerProgressAt20Seconds) == null || N.call(n, p, o));
1622
+ break;
1623
+ case "player_quartile_25":
1624
+ o !== void 0 && ((Z = n.onPlayerQuartile25) == null || Z.call(n, p, o));
1625
+ break;
1626
+ case "player_quartile_50":
1627
+ o !== void 0 && ((fe = n.onPlayerQuartile50) == null || fe.call(n, p, o));
1628
+ break;
1629
+ case "player_quartile_75":
1630
+ o !== void 0 && ((ne = n.onPlayerQuartile75) == null || ne.call(n, p, o));
1631
+ break;
1632
+ case "player_next":
1633
+ (we = n.onPlayerNext) == null || we.call(n, p);
1634
+ break;
1635
+ case "player_previous":
1636
+ (Be = n.onPlayerPrevious) == null || Be.call(n, p);
1637
+ break;
1645
1638
  }
1646
- g("player_start"), s.current = !0, d.readyState >= 2 && !d.paused && setTimeout(() => {
1647
- !l.current && !d.paused && (g("player_play"), l.current = !0, c.current = !1);
1648
- }, 100);
1639
+ o !== void 0 && (p === "player_progress_every_10_seconds" || p === "player_progress_at_20_seconds" || p === "player_quartile_25" || p === "player_quartile_50" || p === "player_quartile_75") ? (se = n.onPlayerEvent) == null || se.call(n, p, o) : (ge = n.onPlayerEvent) == null || ge.call(n, p);
1649
1640
  }
1650
- }, L = () => {
1651
- c.current ? g("player_resume") : l.current ? g("player_play") : (g("player_play"), l.current = !0), c.current = !1;
1641
+ }, P = () => {
1642
+ s.current || (v("player_start"), s.current = !0, f.readyState >= 2 && !f.paused && setTimeout(() => {
1643
+ !l.current && !f.paused && (v("player_play"), l.current = !0, c.current = !1);
1644
+ }, 100));
1645
+ }, $ = () => {
1646
+ c.current ? v("player_resume") : l.current ? v("player_play") : (v("player_play"), l.current = !0), c.current = !1;
1652
1647
  }, D = () => {
1653
- d.ended || v.current || setTimeout(() => {
1654
- var h;
1655
- if (!v.current) {
1656
- if (t.current && x.current !== null) {
1648
+ f.ended || d.current || setTimeout(() => {
1649
+ var p;
1650
+ if (!d.current) {
1651
+ if (t.current && g.current !== null) {
1657
1652
  const o = t.current;
1658
- if ((o.videoIndex ?? ((h = o.playlist) == null ? void 0 : h.playlistVideoIndex) ?? 0) !== x.current)
1653
+ if ((o.videoIndex ?? ((p = o.playlist) == null ? void 0 : p.playlistVideoIndex) ?? 0) !== g.current)
1659
1654
  return;
1660
1655
  }
1661
- g("player_pause"), c.current = !0;
1656
+ v("player_pause"), c.current = !0;
1662
1657
  }
1663
1658
  }, 200);
1664
1659
  }, U = () => {
1665
- g("player_end");
1660
+ v("player_end");
1666
1661
  }, M = () => {
1667
- s.current && !l.current && d.currentTime >= 1 && d.currentTime < 1.5 && !d.paused && (g("player_play"), l.current = !0, c.current = !1);
1668
- const h = d.duration > 0 ? d.currentTime / d.duration * 100 : 0, o = Math.floor(d.currentTime);
1669
- o - y.current >= 10 && (y.current = o, g("player_progress_every_10_seconds", o)), o >= 20 && !u.current[20] && (u.current[20] = !0, g("player_progress_at_20_seconds", o)), h >= 25 && !u.current[25] && (u.current[25] = !0, g("player_quartile_25", o)), h >= 50 && !u.current[50] && (u.current[50] = !0, g("player_quartile_50", o)), h >= 75 && !u.current[75] && (u.current[75] = !0, g("player_quartile_75", o));
1662
+ s.current && !l.current && f.currentTime >= 1 && f.currentTime < 1.5 && !f.paused && (v("player_play"), l.current = !0, c.current = !1);
1663
+ const p = f.duration > 0 ? f.currentTime / f.duration * 100 : 0, o = Math.floor(f.currentTime);
1664
+ o - y.current >= 10 && (y.current = o, v("player_progress_every_10_seconds", o)), o >= 20 && !u.current[20] && (u.current[20] = !0, v("player_progress_at_20_seconds", o)), p >= 25 && !u.current[25] && (u.current[25] = !0, v("player_quartile_25", o)), p >= 50 && !u.current[50] && (u.current[50] = !0, v("player_quartile_50", o)), p >= 75 && !u.current[75] && (u.current[75] = !0, v("player_quartile_75", o));
1670
1665
  };
1671
- if (_.current && _.current !== d) {
1672
- const h = _.current;
1673
- h.removeEventListener("loadedmetadata", E), h.removeEventListener("play", L), h.removeEventListener("pause", D), h.removeEventListener("ended", U), h.removeEventListener("timeupdate", M);
1666
+ if (_.current && _.current !== f) {
1667
+ const p = _.current;
1668
+ p.removeEventListener("loadedmetadata", P), p.removeEventListener("play", $), p.removeEventListener("pause", D), p.removeEventListener("ended", U), p.removeEventListener("timeupdate", M);
1674
1669
  }
1675
- _.current = d, d.addEventListener("loadedmetadata", E), d.addEventListener("play", L), d.addEventListener("pause", D), d.addEventListener("ended", U), d.addEventListener("timeupdate", M), d.readyState >= 1 && (console.log("[useVPPlayerEvents] Video metadata already loaded, triggering player_start"), E());
1676
- const W = document.getElementById(e), z = (h) => {
1677
- const o = h.target;
1678
- (o.closest(".vp-next") || o.closest(".vrt-icon-down") || o.closest(".vrt-arrow.vrt-icon-down")) && (v.current = !0, p.current = !0, g("player_next"), setTimeout(() => {
1679
- v.current = !1;
1680
- }, 500)), (o.closest(".vp-prev") || o.closest(".vp-previous") || o.closest(".vrt-icon-up") || o.closest(".vrt-arrow.vrt-icon-up")) && (v.current = !0, p.current = !0, g("player_previous"), setTimeout(() => {
1681
- v.current = !1;
1670
+ _.current = f, f.addEventListener("loadedmetadata", P), f.addEventListener("play", $), f.addEventListener("pause", D), f.addEventListener("ended", U), f.addEventListener("timeupdate", M), f.readyState >= 1 && P();
1671
+ const W = document.getElementById(e), z = (p) => {
1672
+ const o = p.target;
1673
+ (o.closest(".vp-next") || o.closest(".vrt-icon-down") || o.closest(".vrt-arrow.vrt-icon-down")) && (d.current = !0, v("player_next"), setTimeout(() => {
1674
+ d.current = !1;
1675
+ }, 500)), (o.closest(".vp-prev") || o.closest(".vp-previous") || o.closest(".vrt-icon-up") || o.closest(".vrt-arrow.vrt-icon-up")) && (d.current = !0, v("player_previous"), setTimeout(() => {
1676
+ d.current = !1;
1682
1677
  }, 500));
1683
1678
  };
1684
- return W && W.addEventListener("click", z, !0), f.current = () => {
1685
- const h = _.current || d;
1686
- h.removeEventListener("loadedmetadata", E), h.removeEventListener("play", L), h.removeEventListener("pause", D), h.removeEventListener("ended", U), h.removeEventListener("timeupdate", M), W == null || W.removeEventListener("click", z, !0), _.current = null;
1679
+ return W && W.addEventListener("click", z, !0), h.current = () => {
1680
+ const p = _.current || f;
1681
+ p.removeEventListener("loadedmetadata", P), p.removeEventListener("play", $), p.removeEventListener("pause", D), p.removeEventListener("ended", U), p.removeEventListener("timeupdate", M), W == null || W.removeEventListener("click", z, !0), _.current = null;
1687
1682
  }, !0;
1688
1683
  };
1689
1684
  let T = null, B = !1;
1690
- const j = () => {
1685
+ const V = () => {
1691
1686
  if (!t.current)
1692
1687
  return;
1693
- const d = t.current, g = document.getElementById(e), E = g == null ? void 0 : g.querySelectorAll("video");
1694
- E && E.length > 1 && d.videoIndex !== void 0 && (T = window.setInterval(() => {
1688
+ const f = t.current, v = document.getElementById(e), P = v == null ? void 0 : v.querySelectorAll("video");
1689
+ P && P.length > 1 && f.videoIndex !== void 0 && (T = window.setInterval(() => {
1695
1690
  var D, U, M, W;
1696
1691
  try {
1697
- const z = d.videoIndex ?? ((D = d.playlist) == null ? void 0 : D.playlistVideoIndex) ?? 0;
1698
- if (x.current !== null && z !== x.current) {
1699
- const h = z > x.current, o = h ? "player_next" : "player_previous";
1700
- n && !v.current && (h ? (U = n.onPlayerNext) == null || U.call(n, o) : (M = n.onPlayerPrevious) == null || M.call(n, o), (W = n.onPlayerEvent) == null || W.call(n, o)), v.current = !0, p.current = !0, f.current && (f.current(), f.current = null), l.current = !1, c.current = !1, y.current = 0, u.current = {}, _.current = null, setTimeout(() => {
1701
- $(), setTimeout(() => {
1702
- v.current = !1;
1692
+ const z = f.videoIndex ?? ((D = f.playlist) == null ? void 0 : D.playlistVideoIndex) ?? 0;
1693
+ if (g.current !== null && z !== g.current) {
1694
+ const p = z > g.current, o = p ? "player_next" : "player_previous";
1695
+ n && !d.current && (p ? (U = n.onPlayerNext) == null || U.call(n, o) : (M = n.onPlayerPrevious) == null || M.call(n, o), (W = n.onPlayerEvent) == null || W.call(n, o)), d.current = !0, h.current && (h.current(), h.current = null), s.current = !1, l.current = !1, c.current = !1, y.current = 0, u.current = {}, _.current = null, setTimeout(() => {
1696
+ L(), setTimeout(() => {
1697
+ d.current = !1;
1703
1698
  }, 200);
1704
1699
  }, 100);
1705
1700
  }
1706
- x.current = z;
1701
+ g.current = z;
1707
1702
  } catch {
1708
1703
  }
1709
1704
  }, 500));
1710
1705
  };
1711
- let w = 0;
1712
- const J = 20, q = setInterval(() => {
1713
- w++, $() && !B ? (console.log(`[useVPPlayerEvents] Successfully set up event tracking on attempt ${w}`), B = !0, clearInterval(q), setTimeout(() => {
1714
- j();
1715
- }, 1e3)) : w >= J && (console.warn(`[useVPPlayerEvents] Failed to set up event tracking after ${J} attempts for playerId: ${e}`), clearInterval(q));
1706
+ let b = 0;
1707
+ const Q = 20, q = setInterval(() => {
1708
+ b++, L() && !B ? (B = !0, clearInterval(q), setTimeout(() => {
1709
+ V();
1710
+ }, 1e3)) : b >= Q && clearInterval(q);
1716
1711
  }, 500);
1717
1712
  return () => {
1718
- clearInterval(q), T !== null && (clearInterval(T), T = null), f.current && (f.current(), f.current = null);
1713
+ clearInterval(q), T !== null && (clearInterval(T), T = null), h.current && (h.current(), h.current = null);
1719
1714
  };
1720
1715
  }, [
1721
1716
  e,
@@ -1788,7 +1783,7 @@ const Fr = Ce.div`
1788
1783
  isVerticalPlayer: n
1789
1784
  // Distinguish between VP Player types
1790
1785
  }) => {
1791
- var u, f, x, _, v, p, b, P, I, $, T, B, j, w, J, q;
1786
+ var u, h, g, _, E, d, x, w, I, L, T, B, V, b, Q, q;
1792
1787
  const s = { ...Xr, ...i }, l = { ...s.config, ...i.config };
1793
1788
  if (e)
1794
1789
  return {
@@ -1811,7 +1806,7 @@ const Fr = Ce.div`
1811
1806
  config: l
1812
1807
  };
1813
1808
  if (r && r.length > 0) {
1814
- const d = ((f = (u = i == null ? void 0 : i.video) == null ? void 0 : u.playlist) == null ? void 0 : f.playlistVideoIndex) ?? ((x = i == null ? void 0 : i.config) == null ? void 0 : x.playlistVideoIndex) ?? 0;
1809
+ const f = ((h = (u = i == null ? void 0 : i.video) == null ? void 0 : u.playlist) == null ? void 0 : h.playlistVideoIndex) ?? ((g = i == null ? void 0 : i.config) == null ? void 0 : g.playlistVideoIndex) ?? 0;
1815
1810
  return n ? {
1816
1811
  ...s,
1817
1812
  projectId: a || "vp-player-projectId",
@@ -1820,23 +1815,23 @@ const Fr = Ce.div`
1820
1815
  // Set first video file (index 0) to avoid VP Player duplication
1821
1816
  videoId: (_ = r[0]) == null ? void 0 : _.mediaId,
1822
1817
  // Add videoId for tracking
1823
- file: (v = r[0]) == null ? void 0 : v.hlsUrl,
1824
- title: (p = r[0]) == null ? void 0 : p.title,
1818
+ file: (E = r[0]) == null ? void 0 : E.hlsUrl,
1819
+ title: (d = r[0]) == null ? void 0 : d.title,
1825
1820
  // thumbnail: fetchedPlaylist[0]?.thumbnailUrl,
1826
1821
  playlist: {
1827
1822
  state: !0,
1828
1823
  playlistId: "",
1829
1824
  // Will be set by API
1830
1825
  // Use original playlistVideoIndex - VP Player will navigate to it
1831
- playlistVideoIndex: Number(d),
1826
+ playlistVideoIndex: Number(f),
1832
1827
  // Remove first video from playlist to avoid duplication (already in file)
1833
- videos: r.slice(1).map((E, L) => ({
1834
- videoId: E.mediaId || String(L + 1),
1828
+ videos: r.slice(1).map((P, $) => ({
1829
+ videoId: P.mediaId || String($ + 1),
1835
1830
  // Use mediaId if available
1836
- title: E.title,
1837
- file: E.hlsUrl,
1838
- thumbnailUrl: E.thumbnailUrl,
1839
- duration: E.duration
1831
+ title: P.title,
1832
+ file: P.hlsUrl,
1833
+ thumbnailUrl: P.thumbnailUrl,
1834
+ duration: P.duration
1840
1835
  }))
1841
1836
  }
1842
1837
  },
@@ -1846,29 +1841,29 @@ const Fr = Ce.div`
1846
1841
  projectId: a || "vp-player-projectId",
1847
1842
  video: {
1848
1843
  ...s.video,
1849
- videoId: ((b = r[Number(d)]) == null ? void 0 : b.mediaId) || ((P = r[0]) == null ? void 0 : P.mediaId),
1844
+ videoId: ((x = r[Number(f)]) == null ? void 0 : x.mediaId) || ((w = r[0]) == null ? void 0 : w.mediaId),
1850
1845
  // Add videoId for tracking
1851
- file: ((I = r[Number(d)]) == null ? void 0 : I.hlsUrl) || (($ = r[0]) == null ? void 0 : $.hlsUrl) || "",
1852
- title: ((T = r[Number(d)]) == null ? void 0 : T.title) || ((B = r[0]) == null ? void 0 : B.title),
1853
- thumbnail: ((j = r[Number(d)]) == null ? void 0 : j.thumbnailUrl) || ((w = r[0]) == null ? void 0 : w.thumbnailUrl),
1846
+ file: ((I = r[Number(f)]) == null ? void 0 : I.hlsUrl) || ((L = r[0]) == null ? void 0 : L.hlsUrl) || "",
1847
+ title: ((T = r[Number(f)]) == null ? void 0 : T.title) || ((B = r[0]) == null ? void 0 : B.title),
1848
+ thumbnail: ((V = r[Number(f)]) == null ? void 0 : V.thumbnailUrl) || ((b = r[0]) == null ? void 0 : b.thumbnailUrl),
1854
1849
  playlist: {
1855
1850
  state: !0,
1856
1851
  // playlistVideoIndex: String(userPlaylistVideoIndex), this has been bug, fixed, now int
1857
- playlistVideoIndex: Number(d),
1858
- videos: r.map((E, L) => ({
1859
- videoId: E.mediaId || String(L),
1852
+ playlistVideoIndex: Number(f),
1853
+ videos: r.map((P, $) => ({
1854
+ videoId: P.mediaId || String($),
1860
1855
  // Use mediaId if available
1861
- title: E.title,
1862
- file: E.hlsUrl,
1863
- thumbnailUrl: E.thumbnailUrl,
1864
- duration: E.duration
1856
+ title: P.title,
1857
+ file: P.hlsUrl,
1858
+ thumbnailUrl: P.thumbnailUrl,
1859
+ duration: P.duration
1865
1860
  }))
1866
1861
  }
1867
1862
  },
1868
1863
  config: l
1869
1864
  };
1870
1865
  }
1871
- const c = ((J = i == null ? void 0 : i.video) == null ? void 0 : J.playlist) || s.video.playlist, y = (q = i == null ? void 0 : i.video) == null ? void 0 : q.file;
1866
+ const c = ((Q = i == null ? void 0 : i.video) == null ? void 0 : Q.playlist) || s.video.playlist, y = (q = i == null ? void 0 : i.video) == null ? void 0 : q.file;
1872
1867
  if (y)
1873
1868
  return {
1874
1869
  ...s,
@@ -1881,12 +1876,12 @@ const Fr = Ce.div`
1881
1876
  config: l
1882
1877
  };
1883
1878
  if (c != null && c.videos && c.videos.length > 0) {
1884
- const d = c.videos[Number(c.playlistVideoIndex) || 0];
1879
+ const f = c.videos[Number(c.playlistVideoIndex) || 0];
1885
1880
  return {
1886
1881
  ...s,
1887
1882
  video: {
1888
1883
  ...s.video,
1889
- file: (d == null ? void 0 : d.file) || "",
1884
+ file: (f == null ? void 0 : f.file) || "",
1890
1885
  playlist: {
1891
1886
  ...c,
1892
1887
  state: c.state ?? !0,
@@ -1907,49 +1902,49 @@ const Fr = Ce.div`
1907
1902
  return;
1908
1903
  const t = /https:\/\/host\.vpplayer\.tech\/player\/([^/]+)\/([^/]+)(?:\/[^/]+)?\.js/, r = e.match(t);
1909
1904
  return r ? r[2] : void 0;
1910
- }, Qr = ({ playerId: e, videoId: t, version: r, videoUrl: a, projectId: i, playlistId: n, scriptUrl: s, config: l = {}, apiKey: c, isReels: y = !1, onPlaylistData: u, onVideoStarted: f, trackingMetadata: x, onPlayerStart: _, onPlayerPlay: v, onPlayerPause: p, onPlayerResume: b, onPlayerEnd: P, onPlayerProgressEvery10Seconds: I, onPlayerProgressAt20Seconds: $, onPlayerQuartile25: T, onPlayerQuartile50: B, onPlayerQuartile75: j, onPlayerNext: w, onPlayerPrevious: J, onPlayerEvent: q }) => {
1911
- const d = te(null), g = te(null), E = te(!1), L = te(""), D = te([]), U = te([]), M = te(null), { isLoaded: W, error: z } = qr(r, s), h = t || Kr(s), [o, m] = ce(null), { fetchedPlaybackUrl: A, fetchedPlaylist: C, isLoading: Y, error: K } = Gr({
1905
+ }, Qr = ({ playerId: e, videoId: t, version: r, videoUrl: a, projectId: i, playlistId: n, scriptUrl: s, config: l = {}, apiKey: c, isReels: y = !1, onPlaylistData: u, onVideoStarted: h, trackingMetadata: g, onPlayerStart: _, onPlayerPlay: E, onPlayerPause: d, onPlayerResume: x, onPlayerEnd: w, onPlayerProgressEvery10Seconds: I, onPlayerProgressAt20Seconds: L, onPlayerQuartile25: T, onPlayerQuartile50: B, onPlayerQuartile75: V, onPlayerNext: b, onPlayerPrevious: Q, onPlayerEvent: q }) => {
1906
+ const f = te(null), v = te(null), P = te(!1), $ = te(""), D = te([]), U = te([]), M = te(null), { isLoaded: W, error: z } = qr(r, s), p = t || Kr(s), [o, m] = ce(null), { fetchedPlaybackUrl: A, fetchedPlaylist: C, isLoading: Y, error: J } = Gr({
1912
1907
  projectId: i,
1913
- videoId: h,
1908
+ videoId: p,
1914
1909
  playlistId: n,
1915
1910
  videoUrl: a,
1916
1911
  apiKey: c
1917
- }), X = ot(e, h), [de, N] = ce(void 0);
1918
- _e(() => {
1912
+ }), X = ot(e, p), [de, N] = ce(void 0);
1913
+ Se(() => {
1919
1914
  C && u && u(C);
1920
1915
  }, [C, u]), Hr({
1921
1916
  playerId: X,
1922
- playerInstanceRef: g,
1923
- playerRef: d,
1917
+ playerInstanceRef: v,
1918
+ playerRef: f,
1924
1919
  videoData: de,
1925
- trackingMetadata: x,
1920
+ trackingMetadata: g,
1926
1921
  callbacks: {
1927
1922
  onPlayerStart: _,
1928
- onPlayerPlay: v,
1929
- onPlayerPause: p,
1930
- onPlayerResume: b,
1931
- onPlayerEnd: P,
1923
+ onPlayerPlay: E,
1924
+ onPlayerPause: d,
1925
+ onPlayerResume: x,
1926
+ onPlayerEnd: w,
1932
1927
  onPlayerProgressEvery10Seconds: I,
1933
- onPlayerProgressAt20Seconds: $,
1928
+ onPlayerProgressAt20Seconds: L,
1934
1929
  onPlayerQuartile25: T,
1935
1930
  onPlayerQuartile50: B,
1936
- onPlayerQuartile75: j,
1937
- onPlayerNext: w,
1938
- onPlayerPrevious: J,
1931
+ onPlayerQuartile75: V,
1932
+ onPlayerNext: b,
1933
+ onPlayerPrevious: Q,
1939
1934
  onPlayerEvent: q
1940
1935
  }
1941
1936
  });
1942
- const fe = Et(() => {
1943
- const ne = l.config || {}, xe = y && !ne.size ? { sizeType: "RESPONSIVE", aspectRatio: "9:16" } : ne.size || { sizeType: "FIXED", width: "100%" };
1937
+ const fe = Pt(() => {
1938
+ const ne = l.config || {}, we = y && !ne.size ? { sizeType: "RESPONSIVE", aspectRatio: "9:16" } : ne.size || { sizeType: "FIXED", width: "100%" };
1944
1939
  return {
1945
1940
  ...l,
1946
1941
  config: {
1947
1942
  ...ne,
1948
- size: xe
1943
+ size: we
1949
1944
  }
1950
1945
  };
1951
1946
  }, [l, y]);
1952
- return _e(() => {
1947
+ return Se(() => {
1953
1948
  if (z) {
1954
1949
  m(z);
1955
1950
  return;
@@ -1960,9 +1955,9 @@ const Fr = Ce.div`
1960
1955
  const Be = setTimeout(async () => {
1961
1956
  try {
1962
1957
  D.current.forEach((ie) => clearInterval(ie)), D.current = [], U.current.forEach((ie) => clearTimeout(ie)), U.current = [], M.current = null;
1963
- const se = (C == null ? void 0 : C.length) ?? 0, Te = JSON.stringify({
1958
+ const se = (C == null ? void 0 : C.length) ?? 0, ge = JSON.stringify({
1964
1959
  playerId: X,
1965
- videoId: t || h,
1960
+ videoId: t || p,
1966
1961
  playlistId: n,
1967
1962
  videoUrl: a,
1968
1963
  fetchedPlaybackUrl: A,
@@ -1971,21 +1966,21 @@ const Fr = Ce.div`
1971
1966
  projectId: i,
1972
1967
  playlistLength: se
1973
1968
  });
1974
- if (E.current && g.current && L.current === Te)
1969
+ if (P.current && v.current && $.current === ge)
1975
1970
  return;
1976
- L.current !== Te && (E.current = !1, L.current = Te);
1971
+ $.current !== ge && (P.current = !1, $.current = ge);
1977
1972
  const Ae = s == null ? void 0 : s.includes("vertical-player");
1978
1973
  if (document.querySelectorAll('[id*="player"]').forEach((ie) => {
1979
1974
  var Pe, R;
1980
- const ge = ie.id;
1981
- if (ge !== X)
1975
+ const xe = ie.id;
1976
+ if (xe !== X)
1982
1977
  try {
1983
- const S = Ae ? (Pe = window.vpVerticalPlayer) == null ? void 0 : Pe.call(window, ge) : (R = window.vpPlayer) == null ? void 0 : R.call(window, ge);
1978
+ const S = Ae ? (Pe = window.vpVerticalPlayer) == null ? void 0 : Pe.call(window, xe) : (R = window.vpPlayer) == null ? void 0 : R.call(window, xe);
1984
1979
  S != null && S.destroy && S.destroy();
1985
1980
  } catch (S) {
1986
- console.warn(`Failed to destroy existing player ${ge}:`, S);
1981
+ console.warn(`Failed to destroy existing player ${xe}:`, S);
1987
1982
  }
1988
- }), await new Promise((ie) => setTimeout(ie, 100)), !ne || !d.current)
1983
+ }), await new Promise((ie) => setTimeout(ie, 100)), !ne || !f.current)
1989
1984
  return;
1990
1985
  if (!document.getElementById(X)) {
1991
1986
  m("DOM element not found after cleanup.");
@@ -2000,7 +1995,7 @@ const Fr = Ce.div`
2000
1995
  m(`VP ${Ae ? "Vertical " : ""}Player script not loaded.`);
2001
1996
  return;
2002
1997
  }
2003
- const be = Jr({
1998
+ const Ee = Jr({
2004
1999
  videoUrl: a,
2005
2000
  fetchedPlaybackUrl: A ?? void 0,
2006
2001
  fetchedPlaylist: C ?? void 0,
@@ -2013,32 +2008,32 @@ const Fr = Ce.div`
2013
2008
  m(`Failed to create VP ${Ae ? "Vertical " : ""}Player instance.`);
2014
2009
  return;
2015
2010
  }
2016
- if (ne && d.current && (G.setup(be), g.current = G, E.current = !0, m(null), f && G.on)) {
2011
+ if (ne && f.current && (G.setup(Ee), v.current = G, P.current = !0, m(null), h && G.on)) {
2017
2012
  const ie = () => {
2018
2013
  var S;
2019
2014
  const R = {};
2020
2015
  if (C && C.length > 0) {
2021
2016
  const F = G.videoIndex ?? ((S = G.playlist) == null ? void 0 : S.playlistVideoIndex) ?? 0, k = C[F];
2022
2017
  k && (R.title = k.title, R.hlsUrl = k.hlsUrl, R.file = k.hlsUrl, R.thumbnailUrl = k.thumbnailUrl, R.duration = k.duration, R.videoIndex = F, R.playlistVideoIndex = F, R.isBackupPlaylist = k.isBackupPlaylist, R.mediaId = k.mediaId, R.videoId = k.mediaId || k.videoId);
2023
- } else be.video && (R.title = be.video.title, R.file = be.video.file, R.hlsUrl = be.video.file, R.thumbnailUrl = be.video.thumbnail, R.videoId = t || h, R.videoIndex = 0, R.playlistVideoIndex = 0, G.getDuration && (R.duration = G.getDuration()));
2018
+ } else Ee.video && (R.title = Ee.video.title, R.file = Ee.video.file, R.hlsUrl = Ee.video.file, R.thumbnailUrl = Ee.video.thumbnail, R.videoId = t || p, R.videoIndex = 0, R.playlistVideoIndex = 0, G.getDuration && (R.duration = G.getDuration()));
2024
2019
  return R;
2025
2020
  };
2026
- let ge = null;
2021
+ let xe = null;
2027
2022
  const Pe = async () => {
2028
2023
  var R;
2029
2024
  try {
2030
- ge && clearTimeout(ge), await new Promise((k) => setTimeout(k, 100));
2025
+ xe && clearTimeout(xe), await new Promise((k) => setTimeout(k, 100));
2031
2026
  let S = ie();
2032
2027
  const F = S.videoId || S.mediaId;
2033
2028
  if (F && F === M.current)
2034
2029
  return;
2035
- if (ge = window.setTimeout(() => {
2030
+ if (xe = window.setTimeout(() => {
2036
2031
  M.current = null;
2037
2032
  }, 500), y && F)
2038
2033
  try {
2039
- const ye = `https://host.vpplayer.tech/player/ptkzurnx/${F}.json`, we = await fetch(ye);
2040
- if (we.ok) {
2041
- const ee = await we.json();
2034
+ const ye = `https://host.vpplayer.tech/player/ptkzurnx/${F}.json`, be = await fetch(ye);
2035
+ if (be.ok) {
2036
+ const ee = await be.json();
2042
2037
  ee && ee.video && (S = {
2043
2038
  ...S,
2044
2039
  title: ee.video.title || S.title,
@@ -2052,7 +2047,7 @@ const Fr = Ce.div`
2052
2047
  }
2053
2048
  } catch {
2054
2049
  }
2055
- M.current = F || null, N(S), f(S);
2050
+ M.current = F || null, N(S), h(S);
2056
2051
  } catch (S) {
2057
2052
  console.warn("Error in video-started handler:", S);
2058
2053
  }
@@ -2072,19 +2067,19 @@ const Fr = Ce.div`
2072
2067
  }
2073
2068
  };
2074
2069
  let k = 0;
2075
- const ye = 15, we = setInterval(() => {
2070
+ const ye = 15, be = setInterval(() => {
2076
2071
  try {
2077
2072
  const ee = G.videoIndex !== void 0 || G.playlist;
2078
2073
  if (!R)
2079
2074
  k++, (ee || k >= ye) && F();
2080
2075
  else {
2081
- const Ee = G.videoIndex ?? 0;
2082
- Ee !== S && S !== -1 && (S = Ee, Pe());
2076
+ const _e = G.videoIndex ?? 0;
2077
+ _e !== S && S !== -1 && (S = _e, Pe());
2083
2078
  }
2084
2079
  } catch {
2085
2080
  }
2086
2081
  }, 200);
2087
- D.current.push(we);
2082
+ D.current.push(be);
2088
2083
  try {
2089
2084
  G.on && G.on("vp-listen-ready", F);
2090
2085
  } catch {
@@ -2093,13 +2088,13 @@ const Fr = Ce.div`
2093
2088
  const R = async (S) => {
2094
2089
  var F, k;
2095
2090
  try {
2096
- const ye = s == null ? void 0 : s.match(/player\/([^/.]+)/), we = ye == null ? void 0 : ye[1];
2097
- if (!we || !S)
2091
+ const ye = s == null ? void 0 : s.match(/player\/([^/.]+)/), be = ye == null ? void 0 : ye[1];
2092
+ if (!be || !S)
2098
2093
  return ie();
2099
- const ee = `https://host.vpplayer.tech/player/${we}/${S}.json`, Ee = await fetch(ee);
2100
- if (!Ee.ok)
2101
- return console.warn("Failed to fetch full video config:", Ee.status), ie();
2102
- const le = await Ee.json();
2094
+ const ee = `https://host.vpplayer.tech/player/${be}/${S}.json`, _e = await fetch(ee);
2095
+ if (!_e.ok)
2096
+ return console.warn("Failed to fetch full video config:", _e.status), ie();
2097
+ const le = await _e.json();
2103
2098
  return !le || !le.video ? ie() : {
2104
2099
  videoId: S,
2105
2100
  title: le.video.title,
@@ -2122,13 +2117,13 @@ const Fr = Ce.div`
2122
2117
  };
2123
2118
  G.on("ready", async (S) => {
2124
2119
  try {
2125
- const F = (S == null ? void 0 : S.id) || t || h;
2120
+ const F = (S == null ? void 0 : S.id) || t || p;
2126
2121
  if (F) {
2127
2122
  const k = await R(F);
2128
- N(k), f(k);
2123
+ N(k), h(k);
2129
2124
  } else {
2130
2125
  const k = ie();
2131
- (k.title || k.file) && (N(k), f(k));
2126
+ (k.title || k.file) && (N(k), h(k));
2132
2127
  }
2133
2128
  } catch (F) {
2134
2129
  console.warn("Error in ready handler:", F);
@@ -2138,7 +2133,7 @@ const Fr = Ce.div`
2138
2133
  const F = S == null ? void 0 : S.id;
2139
2134
  if (F) {
2140
2135
  const k = await R(F);
2141
- N(k), f(k);
2136
+ N(k), h(k);
2142
2137
  }
2143
2138
  } catch (F) {
2144
2139
  console.warn("Error in playlistItem handler:", F);
@@ -2148,13 +2143,13 @@ const Fr = Ce.div`
2148
2143
  }
2149
2144
  } catch (se) {
2150
2145
  if (ne) {
2151
- const Te = se instanceof Error ? se.message : String(se);
2152
- m(Te), console.error("VP Player initialization error:", se);
2146
+ const ge = se instanceof Error ? se.message : String(se);
2147
+ m(ge), console.error("VP Player initialization error:", se);
2153
2148
  }
2154
2149
  }
2155
2150
  }, 150);
2156
2151
  return () => {
2157
- ne = !1, clearTimeout(Be), D.current.forEach((se) => clearInterval(se)), D.current = [], U.current.forEach((se) => clearTimeout(se)), U.current = [], E.current = !1;
2152
+ ne = !1, clearTimeout(Be), D.current.forEach((se) => clearInterval(se)), D.current = [], U.current.forEach((se) => clearTimeout(se)), U.current = [], P.current = !1;
2158
2153
  };
2159
2154
  }, [
2160
2155
  W,
@@ -2162,28 +2157,28 @@ const Fr = Ce.div`
2162
2157
  X,
2163
2158
  z,
2164
2159
  s
2165
- ]), _e(() => () => {
2166
- if (g.current) {
2160
+ ]), Se(() => () => {
2161
+ if (v.current) {
2167
2162
  try {
2168
- g.current.destroy && g.current.destroy();
2169
- } catch (xe) {
2170
- console.warn(`Failed to destroy player ${X}:`, xe);
2163
+ v.current.destroy && v.current.destroy();
2164
+ } catch (we) {
2165
+ console.warn(`Failed to destroy player ${X}:`, we);
2171
2166
  }
2172
- g.current = null;
2167
+ v.current = null;
2173
2168
  }
2174
- E.current = !1;
2169
+ P.current = !1;
2175
2170
  const ne = document.getElementById(X);
2176
2171
  ne && (ne.innerHTML = "");
2177
2172
  }, [X]), {
2178
- playerRef: d,
2179
- playerInstanceRef: g,
2173
+ playerRef: f,
2174
+ playerInstanceRef: v,
2180
2175
  isScriptLoaded: W,
2181
2176
  isLoading: Y,
2182
- error: K || o || z
2177
+ error: J || o || z
2183
2178
  };
2184
- }, Zr = ({ playerId: e, videoId: t, version: r, videoUrl: a, projectId: i, playlistId: n, scriptUrl: s, config: l = {}, apiKey: c, isReels: y = !1, hiddenClasses: u = [], onClose: f, className: x, onPlaylistData: _, onVideoStarted: v, trackingMetadata: p, onPlayerStart: b, onPlayerPlay: P, onPlayerPause: I, onPlayerResume: $, onPlayerEnd: T, onPlayerProgressEvery10Seconds: B, onPlayerProgressAt20Seconds: j, onPlayerQuartile25: w, onPlayerQuartile50: J, onPlayerQuartile75: q, onPlayerNext: d, onPlayerPrevious: g, onPlayerEvent: E }) => {
2185
- var K, X, de, N;
2186
- const { playerRef: L, playerInstanceRef: D, isScriptLoaded: U, isLoading: M, error: W } = Qr({
2179
+ }, Zr = ({ playerId: e, videoId: t, version: r, videoUrl: a, projectId: i, playlistId: n, scriptUrl: s, config: l = {}, apiKey: c, isReels: y = !1, hiddenClasses: u = [], onClose: h, className: g, onPlaylistData: _, onVideoStarted: E, trackingMetadata: d, onPlayerStart: x, onPlayerPlay: w, onPlayerPause: I, onPlayerResume: L, onPlayerEnd: T, onPlayerProgressEvery10Seconds: B, onPlayerProgressAt20Seconds: V, onPlayerQuartile25: b, onPlayerQuartile50: Q, onPlayerQuartile75: q, onPlayerNext: f, onPlayerPrevious: v, onPlayerEvent: P }) => {
2180
+ var J, X, de, N;
2181
+ const { playerRef: $, playerInstanceRef: D, isScriptLoaded: U, isLoading: M, error: W } = Qr({
2187
2182
  playerId: e,
2188
2183
  videoId: t,
2189
2184
  version: r,
@@ -2195,45 +2190,45 @@ const Fr = Ce.div`
2195
2190
  apiKey: c,
2196
2191
  isReels: y,
2197
2192
  onPlaylistData: _,
2198
- onVideoStarted: v,
2199
- trackingMetadata: p,
2200
- onPlayerStart: b,
2201
- onPlayerPlay: P,
2193
+ onVideoStarted: E,
2194
+ trackingMetadata: d,
2195
+ onPlayerStart: x,
2196
+ onPlayerPlay: w,
2202
2197
  onPlayerPause: I,
2203
- onPlayerResume: $,
2198
+ onPlayerResume: L,
2204
2199
  onPlayerEnd: T,
2205
2200
  onPlayerProgressEvery10Seconds: B,
2206
- onPlayerProgressAt20Seconds: j,
2207
- onPlayerQuartile25: w,
2208
- onPlayerQuartile50: J,
2201
+ onPlayerProgressAt20Seconds: V,
2202
+ onPlayerQuartile25: b,
2203
+ onPlayerQuartile50: Q,
2209
2204
  onPlayerQuartile75: q,
2210
- onPlayerNext: d,
2211
- onPlayerPrevious: g,
2212
- onPlayerEvent: E
2213
- }), [z, h] = ce(!0), o = () => y && h(!0), m = () => {
2205
+ onPlayerNext: f,
2206
+ onPlayerPrevious: v,
2207
+ onPlayerEvent: P
2208
+ }), [z, p] = ce(!0), o = () => y && p(!0), m = () => {
2214
2209
  var Z, fe;
2215
- h(!1), (fe = (Z = D.current) == null ? void 0 : Z.play) == null || fe.call(Z), f == null || f();
2216
- }, A = (X = (K = l == null ? void 0 : l.config) == null ? void 0 : K.size) != null && X.width ? typeof l.config.size.width == "number" ? `${l.config.size.width}px` : l.config.size.width : void 0, C = (N = (de = l == null ? void 0 : l.config) == null ? void 0 : de.size) != null && N.height ? typeof l.config.size.height == "number" ? `${l.config.size.height}px` : l.config.size.height : void 0, Y = ot(e, t);
2217
- return W ? Q.jsxs(rt, { type: "error", children: ["An error occurred: ", W] }) : M || !U ? Q.jsx(rt, { type: "loading", children: "Loading..." }) : Q.jsxs(Q.Fragment, { children: [y && !z ? Q.jsx("div", { onClick: o }) : null, !y && Q.jsx("div", { children: Q.jsx(wt, { id: Y, ref: L, width: A || "100%", height: C || "auto", $hiddenClasses: u, className: x }) }, Y), y && z && Q.jsx(Br, { onClick: m, className: x, children: Q.jsx(Dr, { className: x, onClick: (Z) => Z.stopPropagation(), children: Q.jsx("div", { children: Q.jsx(wt, { id: Y, ref: L, width: "100%", height: "auto", $hiddenClasses: u, className: x }) }, Y) }) })] });
2218
- }, $t = Ft(void 0), nn = ({ children: e }) => {
2210
+ p(!1), (fe = (Z = D.current) == null ? void 0 : Z.play) == null || fe.call(Z), h == null || h();
2211
+ }, A = (X = (J = l == null ? void 0 : l.config) == null ? void 0 : J.size) != null && X.width ? typeof l.config.size.width == "number" ? `${l.config.size.width}px` : l.config.size.width : void 0, C = (N = (de = l == null ? void 0 : l.config) == null ? void 0 : de.size) != null && N.height ? typeof l.config.size.height == "number" ? `${l.config.size.height}px` : l.config.size.height : void 0, Y = ot(e, t);
2212
+ return W ? K.jsxs(rt, { type: "error", children: ["An error occurred: ", W] }) : M || !U ? K.jsx(rt, { type: "loading", children: "Loading..." }) : K.jsxs(K.Fragment, { children: [y && !z ? K.jsx("div", { onClick: o }) : null, !y && K.jsx("div", { children: K.jsx(wt, { id: Y, ref: $, width: A || "100%", height: C || "auto", $hiddenClasses: u, className: g }) }, Y), y && z && K.jsx(Br, { onClick: m, className: g, children: K.jsx(Dr, { className: g, onClick: (Z) => Z.stopPropagation(), children: K.jsx("div", { children: K.jsx(wt, { id: Y, ref: $, width: "100%", height: "auto", $hiddenClasses: u, className: g }) }, Y) }) })] });
2213
+ }, Lt = Ft(void 0), nn = ({ children: e }) => {
2219
2214
  const [t, r] = ce(!1), [a, i] = ce(null), [n, s] = ce(null), l = lt((u) => {
2220
2215
  try {
2221
- const f = ot(u.playerId, u.videoId);
2222
- i({ ...u, playerId: f }), r(!0), s(null);
2216
+ const h = ot(u.playerId, u.videoId);
2217
+ i({ ...u, playerId: h }), r(!0), s(null);
2223
2218
  } catch {
2224
2219
  s("Failed to show player.");
2225
2220
  }
2226
2221
  }, []), c = lt(() => {
2227
2222
  r(!1), i(null), s(null);
2228
- }, []), y = Et(() => ({
2223
+ }, []), y = Pt(() => ({
2229
2224
  showPlayer: l,
2230
2225
  hidePlayer: c,
2231
2226
  isPlayerVisible: t,
2232
2227
  playerParams: a
2233
2228
  }), [l, c, t, a]);
2234
- return Q.jsxs($t.Provider, { value: y, children: [e, n && Q.jsx(rt, { type: "error", children: n }), t && (a == null ? void 0 : a.playerId) && Q.jsx(Zr, { playerId: a.playerId, videoId: a.videoId, projectId: a.projectId, videoUrl: a.videoUrl, version: a.version, playlistId: a.playlistId, scriptUrl: a.scriptUrl, config: a.config, isReels: a.isReels, thumbnailUrl: a.thumbnailUrl, onClose: c, hiddenClasses: a.hiddenClasses || [], apiKey: a.apiKey, className: a.className })] });
2229
+ return K.jsxs(Lt.Provider, { value: y, children: [e, n && K.jsx(rt, { type: "error", children: n }), t && (a == null ? void 0 : a.playerId) && K.jsx(Zr, { playerId: a.playerId, videoId: a.videoId, projectId: a.projectId, videoUrl: a.videoUrl, version: a.version, playlistId: a.playlistId, scriptUrl: a.scriptUrl, config: a.config, isReels: a.isReels, thumbnailUrl: a.thumbnailUrl, onClose: c, hiddenClasses: a.hiddenClasses || [], apiKey: a.apiKey, className: a.className })] });
2235
2230
  }, an = () => {
2236
- const e = Pt($t);
2231
+ const e = Et(Lt);
2237
2232
  if (!e)
2238
2233
  throw new Error("useVPPlayer must be used within a VPPlayerProvider");
2239
2234
  return e;