@devix-technologies/react-gjirafa-vp-player 1.0.10 → 1.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/react-gjirafa-vp-player.es.js +196 -201
- package/dist/react-gjirafa-vp-player.umd.js +5 -5
- package/package.json +1 -1
- package/dist/App.d.ts +0 -2
- package/dist/components/Feedback.d.ts +0 -25
- package/dist/components/VPPlayer/index.d.ts +0 -2
- package/dist/components/VPPlayer/ui/index.d.ts +0 -1
- package/dist/components/VPPlayer/ui/styled.d.ts +0 -42
- package/dist/config/index.d.ts +0 -1
- package/dist/config/vpPlayerConfig.d.ts +0 -9
- package/dist/constants/configs.d.ts +0 -22
- package/dist/constants/index.d.ts +0 -1
- package/dist/constants/storybook.d.ts +0 -11
- package/dist/constants/styles.d.ts +0 -11
- package/dist/constants/urls.d.ts +0 -18
- package/dist/constants/vpPlayer.d.ts +0 -29
- package/dist/contexts/VPPlayerContext.d.ts +0 -53
- package/dist/contexts/index.d.ts +0 -1
- package/dist/features/VPPlayer.d.ts +0 -27
- package/dist/features/stories/ads/Ads.stories.d.ts +0 -20
- package/dist/features/stories/context/Context.stories.d.ts +0 -10
- package/dist/features/stories/index.d.ts +0 -3
- package/dist/features/stories/playback/Playback.stories.d.ts +0 -33
- package/dist/fixtures/index.d.ts +0 -1
- package/dist/fixtures/playlist.d.ts +0 -11
- package/dist/hooks/index.d.ts +0 -3
- package/dist/hooks/useVPPlayerLogic.d.ts +0 -22
- package/dist/hooks/useVPPlayerScript.d.ts +0 -13
- package/dist/hooks/useVideoData.d.ts +0 -21
- package/dist/index.d.ts +0 -9
- package/dist/interfaces/config.d.ts +0 -311
- package/dist/interfaces/index.d.ts +0 -3
- package/dist/interfaces/instance.d.ts +0 -73
- package/dist/interfaces/props.d.ts +0 -54
- package/dist/main.d.ts +0 -1
- package/dist/types/api.types.d.ts +0 -50
- package/dist/types/index.d.ts +0 -1
- package/dist/utils/index.d.ts +0 -2
- package/dist/utils/vpPlayerConfigBuilder.d.ts +0 -30
- package/dist/utils/vpPlayerUtils.d.ts +0 -8
|
@@ -48,7 +48,7 @@ function bt() {
|
|
|
48
48
|
function e(o) {
|
|
49
49
|
if (o == null) return null;
|
|
50
50
|
if (typeof o == "function")
|
|
51
|
-
return o.$$typeof ===
|
|
51
|
+
return o.$$typeof === E ? null : o.displayName || o.name || null;
|
|
52
52
|
if (typeof o == "string") return o;
|
|
53
53
|
switch (o) {
|
|
54
54
|
case f:
|
|
@@ -57,11 +57,11 @@ function bt() {
|
|
|
57
57
|
return "Profiler";
|
|
58
58
|
case h:
|
|
59
59
|
return "StrictMode";
|
|
60
|
-
case x:
|
|
61
|
-
return "Suspense";
|
|
62
60
|
case S:
|
|
61
|
+
return "Suspense";
|
|
62
|
+
case R:
|
|
63
63
|
return "SuspenseList";
|
|
64
|
-
case
|
|
64
|
+
case I:
|
|
65
65
|
return "Activity";
|
|
66
66
|
}
|
|
67
67
|
if (typeof o == "object")
|
|
@@ -72,7 +72,7 @@ function bt() {
|
|
|
72
72
|
return "Portal";
|
|
73
73
|
case _:
|
|
74
74
|
return (o.displayName || "Context") + ".Provider";
|
|
75
|
-
case
|
|
75
|
+
case x:
|
|
76
76
|
return (o._context.displayName || "Context") + ".Consumer";
|
|
77
77
|
case T:
|
|
78
78
|
var b = o.render;
|
|
@@ -120,7 +120,7 @@ function bt() {
|
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
function a() {
|
|
123
|
-
var o =
|
|
123
|
+
var o = O.A;
|
|
124
124
|
return o === null ? null : o.getOwner();
|
|
125
125
|
}
|
|
126
126
|
function i() {
|
|
@@ -153,7 +153,7 @@ function bt() {
|
|
|
153
153
|
}
|
|
154
154
|
function m(o, b, C, L, K, D, _e, Se) {
|
|
155
155
|
return C = D.ref, o = {
|
|
156
|
-
$$typeof:
|
|
156
|
+
$$typeof: w,
|
|
157
157
|
type: o,
|
|
158
158
|
key: b,
|
|
159
159
|
props: D,
|
|
@@ -234,9 +234,9 @@ React keys must be passed directly to JSX without using spread:
|
|
|
234
234
|
);
|
|
235
235
|
}
|
|
236
236
|
function p(o) {
|
|
237
|
-
typeof o == "object" && o !== null && o.$$typeof ===
|
|
237
|
+
typeof o == "object" && o !== null && o.$$typeof === w && o._store && (o._store.validated = 1);
|
|
238
238
|
}
|
|
239
|
-
var g = mt,
|
|
239
|
+
var g = mt, w = Symbol.for("react.transitional.element"), v = Symbol.for("react.portal"), f = Symbol.for("react.fragment"), h = Symbol.for("react.strict_mode"), y = Symbol.for("react.profiler"), x = Symbol.for("react.consumer"), _ = Symbol.for("react.context"), T = Symbol.for("react.forward_ref"), S = Symbol.for("react.suspense"), R = Symbol.for("react.suspense_list"), u = Symbol.for("react.memo"), A = Symbol.for("react.lazy"), I = Symbol.for("react.activity"), E = Symbol.for("react.client.reference"), O = g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, G = Object.prototype.hasOwnProperty, z = Array.isArray, X = console.createTask ? console.createTask : function() {
|
|
240
240
|
return null;
|
|
241
241
|
};
|
|
242
242
|
g = {
|
|
@@ -249,7 +249,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
249
249
|
i
|
|
250
250
|
)(), ie = X(n(i)), oe = {};
|
|
251
251
|
ce.Fragment = f, ce.jsx = function(o, b, C, L, K) {
|
|
252
|
-
var D = 1e4 >
|
|
252
|
+
var D = 1e4 > O.recentlyCreatedOwnerStacks++;
|
|
253
253
|
return l(
|
|
254
254
|
o,
|
|
255
255
|
b,
|
|
@@ -261,7 +261,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
261
261
|
D ? X(n(o)) : ie
|
|
262
262
|
);
|
|
263
263
|
}, ce.jsxs = function(o, b, C, L, K) {
|
|
264
|
-
var D = 1e4 >
|
|
264
|
+
var D = 1e4 > O.recentlyCreatedOwnerStacks++;
|
|
265
265
|
return l(
|
|
266
266
|
o,
|
|
267
267
|
b,
|
|
@@ -279,7 +279,7 @@ var We;
|
|
|
279
279
|
function xt() {
|
|
280
280
|
return We || (We = 1, process.env.NODE_ENV === "production" ? he.exports = vt() : he.exports = bt()), he.exports;
|
|
281
281
|
}
|
|
282
|
-
var
|
|
282
|
+
var $ = xt();
|
|
283
283
|
function Oe() {
|
|
284
284
|
return Oe = Object.assign ? Object.assign.bind() : function(e) {
|
|
285
285
|
for (var t = 1; t < arguments.length; t++) {
|
|
@@ -329,7 +329,7 @@ var Pt = /* @__PURE__ */ function() {
|
|
|
329
329
|
return (a = n.parentNode) == null ? void 0 : a.removeChild(n);
|
|
330
330
|
}), this.tags = [], this.ctr = 0;
|
|
331
331
|
}, e;
|
|
332
|
-
}(), V = "-ms-", we = "-moz-",
|
|
332
|
+
}(), V = "-ms-", we = "-moz-", k = "-webkit-", rt = "comm", Le = "rule", Fe = "decl", Et = "@import", nt = "@keyframes", _t = "@layer", St = Math.abs, ke = String.fromCharCode, Rt = Object.assign;
|
|
333
333
|
function Tt(e, t) {
|
|
334
334
|
return N(e, 0) ^ 45 ? (((t << 2 ^ N(e, 0)) << 2 ^ N(e, 1)) << 2 ^ N(e, 2)) << 2 ^ N(e, 3) : 0;
|
|
335
335
|
}
|
|
@@ -339,7 +339,7 @@ function at(e) {
|
|
|
339
339
|
function At(e, t) {
|
|
340
340
|
return (e = t.exec(e)) ? e[0] : e;
|
|
341
341
|
}
|
|
342
|
-
function
|
|
342
|
+
function P(e, t, r) {
|
|
343
343
|
return e.replace(t, r);
|
|
344
344
|
}
|
|
345
345
|
function je(e, t) {
|
|
@@ -363,7 +363,7 @@ function me(e, t) {
|
|
|
363
363
|
function Ct(e, t) {
|
|
364
364
|
return e.map(t).join("");
|
|
365
365
|
}
|
|
366
|
-
var Pe = 1, re = 1, it = 0, M = 0,
|
|
366
|
+
var Pe = 1, re = 1, it = 0, M = 0, j = 0, ae = "";
|
|
367
367
|
function Ee(e, t, r, n, a, i, s) {
|
|
368
368
|
return { value: e, root: t, parent: r, type: n, props: a, children: i, line: Pe, column: re, length: s, return: "" };
|
|
369
369
|
}
|
|
@@ -371,13 +371,13 @@ function le(e, t) {
|
|
|
371
371
|
return Rt(Ee("", null, null, "", null, null, 0), e, { length: -e.length }, t);
|
|
372
372
|
}
|
|
373
373
|
function It() {
|
|
374
|
-
return
|
|
374
|
+
return j;
|
|
375
375
|
}
|
|
376
376
|
function Ot() {
|
|
377
|
-
return
|
|
377
|
+
return j = M > 0 ? N(ae, --M) : 0, re--, j === 10 && (re = 1, Pe--), j;
|
|
378
378
|
}
|
|
379
379
|
function B() {
|
|
380
|
-
return
|
|
380
|
+
return j = M < it ? N(ae, M++) : 0, re++, j === 10 && (re = 1, Pe++), j;
|
|
381
381
|
}
|
|
382
382
|
function q() {
|
|
383
383
|
return N(ae, M);
|
|
@@ -436,25 +436,25 @@ function ve(e) {
|
|
|
436
436
|
return at(pe(M - 1, $e(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
|
|
437
437
|
}
|
|
438
438
|
function jt(e) {
|
|
439
|
-
for (; (
|
|
439
|
+
for (; (j = q()) && j < 33; )
|
|
440
440
|
B();
|
|
441
|
-
return de(e) > 2 || de(
|
|
441
|
+
return de(e) > 2 || de(j) > 3 ? "" : " ";
|
|
442
442
|
}
|
|
443
443
|
function $t(e, t) {
|
|
444
|
-
for (; --t && B() && !(
|
|
444
|
+
for (; --t && B() && !(j < 48 || j > 102 || j > 57 && j < 65 || j > 70 && j < 97); )
|
|
445
445
|
;
|
|
446
446
|
return pe(e, ge() + (t < 6 && q() == 32 && B() == 32));
|
|
447
447
|
}
|
|
448
448
|
function $e(e) {
|
|
449
449
|
for (; B(); )
|
|
450
|
-
switch (
|
|
450
|
+
switch (j) {
|
|
451
451
|
// ] ) " '
|
|
452
452
|
case e:
|
|
453
453
|
return M;
|
|
454
454
|
// " '
|
|
455
455
|
case 34:
|
|
456
456
|
case 39:
|
|
457
|
-
e !== 34 && e !== 39 && $e(
|
|
457
|
+
e !== 34 && e !== 39 && $e(j);
|
|
458
458
|
break;
|
|
459
459
|
// (
|
|
460
460
|
case 40:
|
|
@@ -468,8 +468,8 @@ function $e(e) {
|
|
|
468
468
|
return M;
|
|
469
469
|
}
|
|
470
470
|
function Nt(e, t) {
|
|
471
|
-
for (; B() && e +
|
|
472
|
-
if (e +
|
|
471
|
+
for (; B() && e + j !== 57; )
|
|
472
|
+
if (e + j === 84 && q() === 47)
|
|
473
473
|
break;
|
|
474
474
|
return "/*" + pe(t, M - 1) + "*" + ke(e === 47 ? e : B());
|
|
475
475
|
}
|
|
@@ -482,19 +482,19 @@ function Ft(e) {
|
|
|
482
482
|
return st(be("", null, null, null, [""], e = ot(e), 0, [0], e));
|
|
483
483
|
}
|
|
484
484
|
function be(e, t, r, n, a, i, s, c, d) {
|
|
485
|
-
for (var m = 0, l = 0, p = s, g = 0,
|
|
486
|
-
switch (v =
|
|
485
|
+
for (var m = 0, l = 0, p = s, g = 0, w = 0, v = 0, f = 1, h = 1, y = 1, x = 0, _ = "", T = a, S = i, R = n, u = _; h; )
|
|
486
|
+
switch (v = x, x = B()) {
|
|
487
487
|
// (
|
|
488
488
|
case 40:
|
|
489
489
|
if (v != 108 && N(u, p - 1) == 58) {
|
|
490
|
-
je(u +=
|
|
490
|
+
je(u += P(ve(x), "&", "&\f"), "&\f") != -1 && (y = -1);
|
|
491
491
|
break;
|
|
492
492
|
}
|
|
493
493
|
// " ' [
|
|
494
494
|
case 34:
|
|
495
495
|
case 39:
|
|
496
496
|
case 91:
|
|
497
|
-
u += ve(
|
|
497
|
+
u += ve(x);
|
|
498
498
|
break;
|
|
499
499
|
// \t \n \r \s
|
|
500
500
|
case 9:
|
|
@@ -525,23 +525,23 @@ function be(e, t, r, n, a, i, s, c, d) {
|
|
|
525
525
|
case 125 * f:
|
|
526
526
|
case 59:
|
|
527
527
|
case 0:
|
|
528
|
-
switch (
|
|
528
|
+
switch (x) {
|
|
529
529
|
// \0 }
|
|
530
530
|
case 0:
|
|
531
531
|
case 125:
|
|
532
532
|
h = 0;
|
|
533
533
|
// ;
|
|
534
534
|
case 59 + l:
|
|
535
|
-
y == -1 && (u =
|
|
535
|
+
y == -1 && (u = P(u, /\f/g, "")), w > 0 && W(u) - p && me(w > 32 ? qe(u + ";", n, r, p - 1) : qe(P(u, " ", "") + ";", n, r, p - 2), d);
|
|
536
536
|
break;
|
|
537
537
|
// @ ;
|
|
538
538
|
case 59:
|
|
539
539
|
u += ";";
|
|
540
540
|
// { rule/at-rule
|
|
541
541
|
default:
|
|
542
|
-
if (me(
|
|
542
|
+
if (me(R = Ye(u, t, r, m, l, a, c, _, T = [], S = [], p), i), x === 123)
|
|
543
543
|
if (l === 0)
|
|
544
|
-
be(u, t,
|
|
544
|
+
be(u, t, R, R, T, i, p, c, S);
|
|
545
545
|
else
|
|
546
546
|
switch (g === 99 && N(u, 3) === 110 ? 100 : g) {
|
|
547
547
|
// d l m s
|
|
@@ -549,25 +549,25 @@ function be(e, t, r, n, a, i, s, c, d) {
|
|
|
549
549
|
case 108:
|
|
550
550
|
case 109:
|
|
551
551
|
case 115:
|
|
552
|
-
be(e,
|
|
552
|
+
be(e, R, R, n && me(Ye(e, R, R, 0, 0, a, c, _, a, T = [], p), S), a, S, p, c, n ? T : S);
|
|
553
553
|
break;
|
|
554
554
|
default:
|
|
555
|
-
be(u,
|
|
555
|
+
be(u, R, R, R, [""], S, 0, c, S);
|
|
556
556
|
}
|
|
557
557
|
}
|
|
558
|
-
m = l =
|
|
558
|
+
m = l = w = 0, f = y = 1, _ = u = "", p = s;
|
|
559
559
|
break;
|
|
560
560
|
// :
|
|
561
561
|
case 58:
|
|
562
|
-
p = 1 + W(u),
|
|
562
|
+
p = 1 + W(u), w = v;
|
|
563
563
|
default:
|
|
564
564
|
if (f < 1) {
|
|
565
|
-
if (
|
|
565
|
+
if (x == 123)
|
|
566
566
|
--f;
|
|
567
|
-
else if (
|
|
567
|
+
else if (x == 125 && f++ == 0 && Ot() == 125)
|
|
568
568
|
continue;
|
|
569
569
|
}
|
|
570
|
-
switch (u += ke(
|
|
570
|
+
switch (u += ke(x), x * f) {
|
|
571
571
|
// &
|
|
572
572
|
case 38:
|
|
573
573
|
y = l > 0 ? 1 : (u += "\f", -1);
|
|
@@ -578,7 +578,7 @@ function be(e, t, r, n, a, i, s, c, d) {
|
|
|
578
578
|
break;
|
|
579
579
|
// @
|
|
580
580
|
case 64:
|
|
581
|
-
q() === 45 && (u += ve(B())), g = q(), l = p = W(_ = u += Lt(ge())),
|
|
581
|
+
q() === 45 && (u += ve(B())), g = q(), l = p = W(_ = u += Lt(ge())), x++;
|
|
582
582
|
break;
|
|
583
583
|
// -
|
|
584
584
|
case 45:
|
|
@@ -588,9 +588,9 @@ function be(e, t, r, n, a, i, s, c, d) {
|
|
|
588
588
|
return i;
|
|
589
589
|
}
|
|
590
590
|
function Ye(e, t, r, n, a, i, s, c, d, m, l) {
|
|
591
|
-
for (var p = a - 1, g = a === 0 ? i : [""],
|
|
592
|
-
for (var y = 0,
|
|
593
|
-
(_ = at(f > 0 ? g[y] + " " +
|
|
591
|
+
for (var p = a - 1, g = a === 0 ? i : [""], w = Ve(g), v = 0, f = 0, h = 0; v < n; ++v)
|
|
592
|
+
for (var y = 0, x = ue(e, p + 1, p = St(f = s[v])), _ = e; y < w; ++y)
|
|
593
|
+
(_ = at(f > 0 ? g[y] + " " + x : P(x, /&\f/g, g[y]))) && (d[h++] = _);
|
|
594
594
|
return Ee(e, t, r, a === 0 ? Le : c, d, m, l);
|
|
595
595
|
}
|
|
596
596
|
function Vt(e, t, r) {
|
|
@@ -691,7 +691,7 @@ function lt(e, t) {
|
|
|
691
691
|
switch (Tt(e, t)) {
|
|
692
692
|
// color-adjust
|
|
693
693
|
case 5103:
|
|
694
|
-
return
|
|
694
|
+
return k + "print-" + e + e;
|
|
695
695
|
// animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
|
|
696
696
|
case 5737:
|
|
697
697
|
case 4201:
|
|
@@ -721,58 +721,58 @@ function lt(e, t) {
|
|
|
721
721
|
case 5365:
|
|
722
722
|
case 5621:
|
|
723
723
|
case 3829:
|
|
724
|
-
return
|
|
724
|
+
return k + e + e;
|
|
725
725
|
// appearance, user-select, transform, hyphens, text-size-adjust
|
|
726
726
|
case 5349:
|
|
727
727
|
case 4246:
|
|
728
728
|
case 4810:
|
|
729
729
|
case 6968:
|
|
730
730
|
case 2756:
|
|
731
|
-
return
|
|
731
|
+
return k + e + we + e + V + e + e;
|
|
732
732
|
// flex, flex-direction
|
|
733
733
|
case 6828:
|
|
734
734
|
case 4268:
|
|
735
|
-
return
|
|
735
|
+
return k + e + V + e + e;
|
|
736
736
|
// order
|
|
737
737
|
case 6165:
|
|
738
|
-
return
|
|
738
|
+
return k + e + V + "flex-" + e + e;
|
|
739
739
|
// align-items
|
|
740
740
|
case 5187:
|
|
741
|
-
return
|
|
741
|
+
return k + e + P(e, /(\w+).+(:[^]+)/, k + "box-$1$2" + V + "flex-$1$2") + e;
|
|
742
742
|
// align-self
|
|
743
743
|
case 5443:
|
|
744
|
-
return
|
|
744
|
+
return k + e + V + "flex-item-" + P(e, /flex-|-self/, "") + e;
|
|
745
745
|
// align-content
|
|
746
746
|
case 4675:
|
|
747
|
-
return
|
|
747
|
+
return k + e + V + "flex-line-pack" + P(e, /align-content|flex-|-self/, "") + e;
|
|
748
748
|
// flex-shrink
|
|
749
749
|
case 5548:
|
|
750
|
-
return
|
|
750
|
+
return k + e + V + P(e, "shrink", "negative") + e;
|
|
751
751
|
// flex-basis
|
|
752
752
|
case 5292:
|
|
753
|
-
return
|
|
753
|
+
return k + e + V + P(e, "basis", "preferred-size") + e;
|
|
754
754
|
// flex-grow
|
|
755
755
|
case 6060:
|
|
756
|
-
return
|
|
756
|
+
return k + "box-" + P(e, "-grow", "") + k + e + V + P(e, "grow", "positive") + e;
|
|
757
757
|
// transition
|
|
758
758
|
case 4554:
|
|
759
|
-
return
|
|
759
|
+
return k + P(e, /([^-])(transform)/g, "$1" + k + "$2") + e;
|
|
760
760
|
// cursor
|
|
761
761
|
case 6187:
|
|
762
|
-
return
|
|
762
|
+
return P(P(P(e, /(zoom-|grab)/, k + "$1"), /(image-set)/, k + "$1"), e, "") + e;
|
|
763
763
|
// background, background-image
|
|
764
764
|
case 5495:
|
|
765
765
|
case 3959:
|
|
766
|
-
return
|
|
766
|
+
return P(e, /(image-set\([^]*)/, k + "$1$`$1");
|
|
767
767
|
// justify-content
|
|
768
768
|
case 4968:
|
|
769
|
-
return
|
|
769
|
+
return P(P(e, /(.+:)(flex-)?(.*)/, k + "box-pack:$3" + V + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + k + 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
|
|
775
|
+
return P(e, /(.+)-inline(.+)/, k + "$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 lt(e, t) {
|
|
|
792
792
|
if (N(e, t + 4) !== 45) break;
|
|
793
793
|
// (f)ill-available, (f)it-content
|
|
794
794
|
case 102:
|
|
795
|
-
return
|
|
795
|
+
return P(e, /(.+:)(.+)-([^]+)/, "$1" + k + "$2-$3$1" + we + (N(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
|
|
796
796
|
// (s)tretch
|
|
797
797
|
case 115:
|
|
798
|
-
return ~je(e, "stretch") ? lt(
|
|
798
|
+
return ~je(e, "stretch") ? lt(P(e, "stretch", "fill-available"), t) + e : e;
|
|
799
799
|
}
|
|
800
800
|
break;
|
|
801
801
|
// position: sticky
|
|
@@ -806,10 +806,10 @@ function lt(e, t) {
|
|
|
806
806
|
switch (N(e, W(e) - 3 - (~je(e, "!important") && 10))) {
|
|
807
807
|
// stic(k)y
|
|
808
808
|
case 107:
|
|
809
|
-
return
|
|
809
|
+
return P(e, ":", ":" + k) + e;
|
|
810
810
|
// (inline-)?fl(e)x
|
|
811
811
|
case 101:
|
|
812
|
-
return
|
|
812
|
+
return P(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + k + (N(e, 14) === 45 ? "inline-" : "") + "box$3$1" + k + "$2$3$1" + V + "$2box$3") + e;
|
|
813
813
|
}
|
|
814
814
|
break;
|
|
815
815
|
// writing-mode
|
|
@@ -817,15 +817,15 @@ function lt(e, t) {
|
|
|
817
817
|
switch (N(e, t + 11)) {
|
|
818
818
|
// vertical-l(r)
|
|
819
819
|
case 114:
|
|
820
|
-
return
|
|
820
|
+
return k + e + V + P(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
|
|
821
821
|
// vertical-r(l)
|
|
822
822
|
case 108:
|
|
823
|
-
return
|
|
823
|
+
return k + e + V + P(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
|
|
824
824
|
// horizontal(-)tb
|
|
825
825
|
case 45:
|
|
826
|
-
return
|
|
826
|
+
return k + e + V + P(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
|
|
827
827
|
}
|
|
828
|
-
return
|
|
828
|
+
return k + e + V + e + e;
|
|
829
829
|
}
|
|
830
830
|
return e;
|
|
831
831
|
}
|
|
@@ -836,7 +836,7 @@ var Ht = function(t, r, n, a) {
|
|
|
836
836
|
break;
|
|
837
837
|
case nt:
|
|
838
838
|
return te([le(t, {
|
|
839
|
-
value:
|
|
839
|
+
value: P(t.value, "@", "@" + k)
|
|
840
840
|
})], a);
|
|
841
841
|
case Le:
|
|
842
842
|
if (t.length) return Ct(t.props, function(i) {
|
|
@@ -845,16 +845,16 @@ var Ht = function(t, r, n, a) {
|
|
|
845
845
|
case ":read-only":
|
|
846
846
|
case ":read-write":
|
|
847
847
|
return te([le(t, {
|
|
848
|
-
props: [
|
|
848
|
+
props: [P(i, /:(read-\w+)/, ":" + we + "$1")]
|
|
849
849
|
})], a);
|
|
850
850
|
// :placeholder
|
|
851
851
|
case "::placeholder":
|
|
852
852
|
return te([le(t, {
|
|
853
|
-
props: [
|
|
853
|
+
props: [P(i, /:(plac\w+)/, ":" + k + "input-$1")]
|
|
854
854
|
}), le(t, {
|
|
855
|
-
props: [
|
|
855
|
+
props: [P(i, /:(plac\w+)/, ":" + we + "$1")]
|
|
856
856
|
}), le(t, {
|
|
857
|
-
props: [
|
|
857
|
+
props: [P(i, /:(plac\w+)/, V + "input-$1")]
|
|
858
858
|
})], a);
|
|
859
859
|
}
|
|
860
860
|
return "";
|
|
@@ -884,11 +884,11 @@ var Ht = function(t, r, n, a) {
|
|
|
884
884
|
{
|
|
885
885
|
var l, p = [Mt, zt(function(f) {
|
|
886
886
|
l.insert(f);
|
|
887
|
-
})], g = Bt(m.concat(a, p)),
|
|
887
|
+
})], g = Bt(m.concat(a, p)), w = function(h) {
|
|
888
888
|
return te(Ft(h), g);
|
|
889
889
|
};
|
|
890
|
-
d = function(h, y,
|
|
891
|
-
l =
|
|
890
|
+
d = function(h, y, x, _) {
|
|
891
|
+
l = x, w(h ? h + "{" + y.styles + "}" : y.styles), _ && (v.inserted[y.name] = !0);
|
|
892
892
|
};
|
|
893
893
|
}
|
|
894
894
|
var v = {
|
|
@@ -1184,38 +1184,38 @@ var cr = function(t) {
|
|
|
1184
1184
|
else {
|
|
1185
1185
|
var g = l[0];
|
|
1186
1186
|
p.push(g[0]);
|
|
1187
|
-
for (var
|
|
1187
|
+
for (var w = l.length, v = 1; v < w; v++)
|
|
1188
1188
|
p.push(l[v], g[v]);
|
|
1189
1189
|
}
|
|
1190
|
-
var f = cr(function(h, y,
|
|
1191
|
-
var _ = m && h.as || a, T = "",
|
|
1190
|
+
var f = cr(function(h, y, x) {
|
|
1191
|
+
var _ = m && h.as || a, T = "", S = [], R = h;
|
|
1192
1192
|
if (h.theme == null) {
|
|
1193
|
-
|
|
1193
|
+
R = {};
|
|
1194
1194
|
for (var u in h)
|
|
1195
|
-
|
|
1196
|
-
|
|
1195
|
+
R[u] = h[u];
|
|
1196
|
+
R.theme = H.useContext(lr);
|
|
1197
1197
|
}
|
|
1198
|
-
typeof h.className == "string" ? T = Jt(y.registered,
|
|
1199
|
-
var A = ar(p.concat(
|
|
1198
|
+
typeof h.className == "string" ? T = Jt(y.registered, S, h.className) : h.className != null && (T = h.className + " ");
|
|
1199
|
+
var A = ar(p.concat(S), y.registered, R);
|
|
1200
1200
|
T += y.key + "-" + A.name, s !== void 0 && (T += " " + s);
|
|
1201
|
-
var
|
|
1202
|
-
for (var
|
|
1203
|
-
m &&
|
|
1204
|
-
return
|
|
1201
|
+
var I = m && c === void 0 ? Je(_) : d, E = {};
|
|
1202
|
+
for (var O in h)
|
|
1203
|
+
m && O === "as" || I(O) && (E[O] = h[O]);
|
|
1204
|
+
return E.className = T, x && (E.ref = x), /* @__PURE__ */ H.createElement(H.Fragment, null, /* @__PURE__ */ H.createElement(hr, {
|
|
1205
1205
|
cache: y,
|
|
1206
1206
|
serialized: A,
|
|
1207
1207
|
isStringTag: typeof _ == "string"
|
|
1208
|
-
}), /* @__PURE__ */ H.createElement(_,
|
|
1208
|
+
}), /* @__PURE__ */ H.createElement(_, E));
|
|
1209
1209
|
});
|
|
1210
1210
|
return f.displayName = i !== void 0 ? i : "Styled(" + (typeof a == "string" ? a : a.displayName || a.name || "Component") + ")", f.defaultProps = t.defaultProps, f.__emotion_real = f, f.__emotion_base = a, f.__emotion_styles = p, f.__emotion_forwardProp = c, Object.defineProperty(f, "toString", {
|
|
1211
1211
|
value: function() {
|
|
1212
1212
|
return "." + s;
|
|
1213
1213
|
}
|
|
1214
1214
|
}), f.withComponent = function(h, y) {
|
|
1215
|
-
var
|
|
1215
|
+
var x = e(h, Oe({}, r, y, {
|
|
1216
1216
|
shouldForwardProp: Ze(f, y, !0)
|
|
1217
1217
|
}));
|
|
1218
|
-
return
|
|
1218
|
+
return x.apply(void 0, p);
|
|
1219
1219
|
}, f;
|
|
1220
1220
|
};
|
|
1221
1221
|
}, yr = [
|
|
@@ -1399,7 +1399,7 @@ const gr = ne.div`
|
|
|
1399
1399
|
return "";
|
|
1400
1400
|
}
|
|
1401
1401
|
}}
|
|
1402
|
-
`, Ne = ({ type: e, children: t, className: r, icon: n, action: a }) =>
|
|
1402
|
+
`, Ne = ({ type: e, children: t, className: r, icon: n, action: a }) => $.jsxs(gr, { type: e, className: r, children: [n && $.jsx("span", { children: n }), $.jsx("span", { children: t }), a && $.jsx("span", { children: a })] }), Qe = ne.div`
|
|
1403
1403
|
width: ${({ width: e }) => e || "100%"};
|
|
1404
1404
|
height: ${({ height: e }) => e || "100%"};
|
|
1405
1405
|
border-radius: 8px;
|
|
@@ -1441,8 +1441,8 @@ const gr = ne.div`
|
|
|
1441
1441
|
let l;
|
|
1442
1442
|
try {
|
|
1443
1443
|
l = t || kr(e || "latest");
|
|
1444
|
-
} catch (
|
|
1445
|
-
const v =
|
|
1444
|
+
} catch (w) {
|
|
1445
|
+
const v = w instanceof Error ? w.message : String(w);
|
|
1446
1446
|
i(`Failed to resolve script URL: ${v}`), n(!1);
|
|
1447
1447
|
return;
|
|
1448
1448
|
}
|
|
@@ -1468,14 +1468,14 @@ const gr = ne.div`
|
|
|
1468
1468
|
};
|
|
1469
1469
|
}, [e, t]), { isLoaded: r, error: a };
|
|
1470
1470
|
}, Er = {}, ye = /* @__PURE__ */ new Map(), _r = 3e4, Ce = 5, Sr = ({ projectId: e, videoId: t, playlistId: r, videoUrl: n, apiKey: a }) => {
|
|
1471
|
-
const [i, s] = U(null), [c, d] = U(null), [m, l] = U(!1), [p, g] = U(null),
|
|
1471
|
+
const [i, s] = U(null), [c, d] = U(null), [m, l] = U(!1), [p, g] = U(null), w = a || (typeof Er < "u" ? "1CFC4B619E9342B6BAC4879BA8C30CF216C4BA9D3F084B11825F4AB2D5CF845E" : void 0);
|
|
1472
1472
|
return xe(() => {
|
|
1473
1473
|
const v = t ? `video:${t}` : r ? `playlist:${r}` : null;
|
|
1474
1474
|
if (!e || n || !t && !r) {
|
|
1475
1475
|
s(n || null), d(null), l(!1), g(null);
|
|
1476
1476
|
return;
|
|
1477
1477
|
}
|
|
1478
|
-
if (!
|
|
1478
|
+
if (!w) {
|
|
1479
1479
|
l(!1), g("No API key provided");
|
|
1480
1480
|
return;
|
|
1481
1481
|
}
|
|
@@ -1486,37 +1486,37 @@ const gr = ne.div`
|
|
|
1486
1486
|
}
|
|
1487
1487
|
let f = !0;
|
|
1488
1488
|
const h = new AbortController(), y = h.signal, _ = setTimeout(async () => {
|
|
1489
|
-
var
|
|
1489
|
+
var S, R;
|
|
1490
1490
|
if (!f)
|
|
1491
1491
|
return;
|
|
1492
1492
|
l(!0), g(null);
|
|
1493
1493
|
let T = 0;
|
|
1494
1494
|
for (; T < Ce && f; )
|
|
1495
1495
|
try {
|
|
1496
|
-
const u = t && !r ? xr(e, t) : wr(e, r), A = setTimeout(() => h.abort(), _r),
|
|
1496
|
+
const u = t && !r ? xr(e, t) : wr(e, r), A = setTimeout(() => h.abort(), _r), I = await fetch(u, {
|
|
1497
1497
|
method: "GET",
|
|
1498
1498
|
headers: {
|
|
1499
|
-
"api-key":
|
|
1499
|
+
"api-key": w,
|
|
1500
1500
|
Accept: "application/json",
|
|
1501
1501
|
"Cache-Control": "no-cache"
|
|
1502
1502
|
// Prevent caching issues
|
|
1503
1503
|
},
|
|
1504
1504
|
signal: y
|
|
1505
1505
|
});
|
|
1506
|
-
if (clearTimeout(A),
|
|
1507
|
-
throw new Error(`Fetch failed with status ${
|
|
1508
|
-
const
|
|
1506
|
+
if (clearTimeout(A), !I.ok)
|
|
1507
|
+
throw new Error(`Fetch failed with status ${I.status}`);
|
|
1508
|
+
const E = await I.json();
|
|
1509
1509
|
if (!f)
|
|
1510
1510
|
return;
|
|
1511
1511
|
if (t && !r) {
|
|
1512
|
-
const
|
|
1513
|
-
if (!(
|
|
1512
|
+
const O = (R = (S = E.result) == null ? void 0 : S.items) == null ? void 0 : R.find((G) => G.mediaId === t);
|
|
1513
|
+
if (!(O != null && O.playbackUrl))
|
|
1514
1514
|
throw new Error("Invalid video data");
|
|
1515
|
-
s(
|
|
1515
|
+
s(O.playbackUrl), d(null), v && ye.set(v, { url: O.playbackUrl, playlist: null });
|
|
1516
1516
|
} else {
|
|
1517
|
-
if (!Array.isArray(
|
|
1517
|
+
if (!Array.isArray(E.result))
|
|
1518
1518
|
throw new Error("Invalid playlist format");
|
|
1519
|
-
d(
|
|
1519
|
+
d(E.result), s(null), v && ye.set(v, { url: null, playlist: E.result });
|
|
1520
1520
|
}
|
|
1521
1521
|
break;
|
|
1522
1522
|
} catch (u) {
|
|
@@ -1535,7 +1535,7 @@ const gr = ne.div`
|
|
|
1535
1535
|
return () => {
|
|
1536
1536
|
f = !1, clearTimeout(_), h.abort();
|
|
1537
1537
|
};
|
|
1538
|
-
}, [
|
|
1538
|
+
}, [w, e, t, r, n]), { fetchedPlaybackUrl: i, fetchedPlaylist: c, isLoading: m, error: p };
|
|
1539
1539
|
}, Rr = {
|
|
1540
1540
|
projectId: "vp-player-projectId",
|
|
1541
1541
|
video: {
|
|
@@ -1599,7 +1599,7 @@ const gr = ne.div`
|
|
|
1599
1599
|
isVerticalPlayer: i
|
|
1600
1600
|
// Distinguish between VP Player types
|
|
1601
1601
|
}) => {
|
|
1602
|
-
var l, p, g,
|
|
1602
|
+
var l, p, g, w, v, f, h, y, x, _, T, S, R;
|
|
1603
1603
|
const s = { ...Rr, ...a }, c = { ...s.config, ...a.config };
|
|
1604
1604
|
if (e)
|
|
1605
1605
|
return {
|
|
@@ -1622,64 +1622,59 @@ const gr = ne.div`
|
|
|
1622
1622
|
config: c
|
|
1623
1623
|
};
|
|
1624
1624
|
if (r && r.length > 0) {
|
|
1625
|
-
const
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
video
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
//
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
}))
|
|
1677
|
-
}
|
|
1678
|
-
},
|
|
1679
|
-
config: c
|
|
1680
|
-
};
|
|
1625
|
+
const u = ((p = (l = a == null ? void 0 : a.video) == null ? void 0 : l.playlist) == null ? void 0 : p.playlistVideoIndex) ?? ((g = a == null ? void 0 : a.config) == null ? void 0 : g.playlistVideoIndex) ?? 0;
|
|
1626
|
+
return i ? {
|
|
1627
|
+
...s,
|
|
1628
|
+
projectId: n || "vp-player-projectId",
|
|
1629
|
+
video: {
|
|
1630
|
+
...s.video,
|
|
1631
|
+
// Set first video file (index 0) to avoid VP Player duplication
|
|
1632
|
+
file: (w = r[0]) == null ? void 0 : w.hlsUrl,
|
|
1633
|
+
title: (v = r[0]) == null ? void 0 : v.title,
|
|
1634
|
+
// thumbnail: fetchedPlaylist[0]?.thumbnailUrl,
|
|
1635
|
+
playlist: {
|
|
1636
|
+
state: !0,
|
|
1637
|
+
playlistId: "",
|
|
1638
|
+
// Will be set by API
|
|
1639
|
+
// Use original playlistVideoIndex - VP Player will navigate to it
|
|
1640
|
+
playlistVideoIndex: Number(u),
|
|
1641
|
+
// Remove first video from playlist to avoid duplication (already in file)
|
|
1642
|
+
videos: r.slice(1).map((I, E) => ({
|
|
1643
|
+
videoId: String(E),
|
|
1644
|
+
// Keep original IDs
|
|
1645
|
+
title: I.title,
|
|
1646
|
+
file: I.hlsUrl,
|
|
1647
|
+
thumbnailUrl: I.thumbnailUrl,
|
|
1648
|
+
duration: I.duration
|
|
1649
|
+
}))
|
|
1650
|
+
}
|
|
1651
|
+
},
|
|
1652
|
+
config: c
|
|
1653
|
+
} : {
|
|
1654
|
+
...s,
|
|
1655
|
+
projectId: n || "vp-player-projectId",
|
|
1656
|
+
video: {
|
|
1657
|
+
...s.video,
|
|
1658
|
+
file: ((f = r[Number(u)]) == null ? void 0 : f.hlsUrl) || ((h = r[0]) == null ? void 0 : h.hlsUrl) || "",
|
|
1659
|
+
title: ((y = r[Number(u)]) == null ? void 0 : y.title) || ((x = r[0]) == null ? void 0 : x.title),
|
|
1660
|
+
thumbnail: ((_ = r[Number(u)]) == null ? void 0 : _.thumbnailUrl) || ((T = r[0]) == null ? void 0 : T.thumbnailUrl),
|
|
1661
|
+
playlist: {
|
|
1662
|
+
state: !0,
|
|
1663
|
+
// playlistVideoIndex: String(userPlaylistVideoIndex), this has been bug, fixed, now int
|
|
1664
|
+
playlistVideoIndex: Number(u),
|
|
1665
|
+
videos: r.map((I, E) => ({
|
|
1666
|
+
videoId: String(E),
|
|
1667
|
+
title: I.title,
|
|
1668
|
+
file: I.hlsUrl,
|
|
1669
|
+
thumbnailUrl: I.thumbnailUrl,
|
|
1670
|
+
duration: I.duration
|
|
1671
|
+
}))
|
|
1672
|
+
}
|
|
1673
|
+
},
|
|
1674
|
+
config: c
|
|
1675
|
+
};
|
|
1681
1676
|
}
|
|
1682
|
-
const d = ((
|
|
1677
|
+
const d = ((S = a == null ? void 0 : a.video) == null ? void 0 : S.playlist) || s.video.playlist, m = (R = a == null ? void 0 : a.video) == null ? void 0 : R.file;
|
|
1683
1678
|
if (m)
|
|
1684
1679
|
return {
|
|
1685
1680
|
...s,
|
|
@@ -1692,12 +1687,12 @@ const gr = ne.div`
|
|
|
1692
1687
|
config: c
|
|
1693
1688
|
};
|
|
1694
1689
|
if (d != null && d.videos && d.videos.length > 0) {
|
|
1695
|
-
const
|
|
1690
|
+
const u = d.videos[Number(d.playlistVideoIndex) || 0];
|
|
1696
1691
|
return {
|
|
1697
1692
|
...s,
|
|
1698
1693
|
video: {
|
|
1699
1694
|
...s.video,
|
|
1700
|
-
file: (
|
|
1695
|
+
file: (u == null ? void 0 : u.file) || "",
|
|
1701
1696
|
playlist: {
|
|
1702
1697
|
...d,
|
|
1703
1698
|
state: d.state ?? !0,
|
|
@@ -1719,13 +1714,13 @@ const gr = ne.div`
|
|
|
1719
1714
|
const t = /https:\/\/host\.vpplayer\.tech\/player\/([^/]+)\/([^/]+)(?:\/[^/]+)?\.js/, r = e.match(t);
|
|
1720
1715
|
return r ? r[2] : void 0;
|
|
1721
1716
|
}, Cr = ({ playerId: e, videoId: t, version: r, videoUrl: n, projectId: a, playlistId: i, scriptUrl: s, config: c = {}, apiKey: d, isReels: m = !1 }) => {
|
|
1722
|
-
const l = Be(null), p = Be(null), { isLoaded: g, error:
|
|
1717
|
+
const l = Be(null), p = Be(null), { isLoaded: g, error: w } = Pr(r, s), v = t || Ar(s), [f, h] = U(null), { fetchedPlaybackUrl: y, fetchedPlaylist: x, isLoading: _, error: T } = Sr({
|
|
1723
1718
|
projectId: a,
|
|
1724
1719
|
videoId: v,
|
|
1725
1720
|
playlistId: i,
|
|
1726
1721
|
videoUrl: n,
|
|
1727
1722
|
apiKey: d
|
|
1728
|
-
}),
|
|
1723
|
+
}), S = Me(e, v), R = tt(() => {
|
|
1729
1724
|
const u = c.config || {}, A = m && !u.size ? { sizeType: "RESPONSIVE", aspectRatio: "9:16" } : u.size || { sizeType: "FIXED", width: "100%" };
|
|
1730
1725
|
return {
|
|
1731
1726
|
...c,
|
|
@@ -1736,29 +1731,29 @@ const gr = ne.div`
|
|
|
1736
1731
|
};
|
|
1737
1732
|
}, [c, m]);
|
|
1738
1733
|
return xe(() => {
|
|
1739
|
-
if (
|
|
1740
|
-
h(
|
|
1734
|
+
if (w) {
|
|
1735
|
+
h(w);
|
|
1741
1736
|
return;
|
|
1742
1737
|
}
|
|
1743
1738
|
if (!g || _ && !n)
|
|
1744
1739
|
return;
|
|
1745
1740
|
let u = !0;
|
|
1746
|
-
const
|
|
1741
|
+
const I = setTimeout(async () => {
|
|
1747
1742
|
try {
|
|
1748
|
-
const
|
|
1743
|
+
const E = s == null ? void 0 : s.includes("vertical-player");
|
|
1749
1744
|
if (document.querySelectorAll('[id*="player"]').forEach((Q) => {
|
|
1750
1745
|
var ie, oe;
|
|
1751
1746
|
const J = Q.id;
|
|
1752
|
-
if (J !==
|
|
1747
|
+
if (J !== S)
|
|
1753
1748
|
try {
|
|
1754
|
-
const o =
|
|
1749
|
+
const o = E ? (ie = window.vpVerticalPlayer) == null ? void 0 : ie.call(window, J) : (oe = window.vpPlayer) == null ? void 0 : oe.call(window, J);
|
|
1755
1750
|
o != null && o.destroy && o.destroy();
|
|
1756
1751
|
} catch (o) {
|
|
1757
1752
|
console.warn(`Failed to destroy existing player ${J}:`, o);
|
|
1758
1753
|
}
|
|
1759
1754
|
}), await new Promise((Q) => setTimeout(Q, 100)), !u || !l.current)
|
|
1760
1755
|
return;
|
|
1761
|
-
if (!document.getElementById(
|
|
1756
|
+
if (!document.getElementById(S)) {
|
|
1762
1757
|
h("DOM element not found after cleanup.");
|
|
1763
1758
|
return;
|
|
1764
1759
|
}
|
|
@@ -1766,67 +1761,67 @@ const gr = ne.div`
|
|
|
1766
1761
|
h("VP Player script not loaded.");
|
|
1767
1762
|
return;
|
|
1768
1763
|
}
|
|
1769
|
-
const z =
|
|
1764
|
+
const z = E ? window.vpVerticalPlayer : window.vpPlayer;
|
|
1770
1765
|
if (!z) {
|
|
1771
|
-
h(`VP ${
|
|
1766
|
+
h(`VP ${E ? "Vertical " : ""}Player script not loaded.`);
|
|
1772
1767
|
return;
|
|
1773
1768
|
}
|
|
1774
1769
|
const X = Tr({
|
|
1775
1770
|
videoUrl: n,
|
|
1776
1771
|
fetchedPlaybackUrl: y ?? void 0,
|
|
1777
|
-
fetchedPlaylist:
|
|
1772
|
+
fetchedPlaylist: x ?? void 0,
|
|
1778
1773
|
projectId: a,
|
|
1779
|
-
config:
|
|
1780
|
-
isVerticalPlayer:
|
|
1774
|
+
config: R,
|
|
1775
|
+
isVerticalPlayer: E
|
|
1781
1776
|
// Pass player type to config builder
|
|
1782
|
-
}), Z = z(
|
|
1777
|
+
}), Z = z(S);
|
|
1783
1778
|
if (!Z) {
|
|
1784
|
-
h(`Failed to create VP ${
|
|
1779
|
+
h(`Failed to create VP ${E ? "Vertical " : ""}Player instance.`);
|
|
1785
1780
|
return;
|
|
1786
1781
|
}
|
|
1787
1782
|
u && l.current && (Z.setup(X), p.current = Z, h(null));
|
|
1788
|
-
} catch (
|
|
1783
|
+
} catch (E) {
|
|
1789
1784
|
if (u) {
|
|
1790
|
-
const
|
|
1791
|
-
h(
|
|
1785
|
+
const O = E instanceof Error ? E.message : String(E);
|
|
1786
|
+
h(O), console.error("VP Player initialization error:", E);
|
|
1792
1787
|
}
|
|
1793
1788
|
}
|
|
1794
1789
|
}, 150);
|
|
1795
1790
|
return () => {
|
|
1796
|
-
u = !1, clearTimeout(
|
|
1791
|
+
u = !1, clearTimeout(I);
|
|
1797
1792
|
};
|
|
1798
1793
|
}, [
|
|
1799
1794
|
g,
|
|
1800
1795
|
_,
|
|
1801
1796
|
n,
|
|
1802
1797
|
y,
|
|
1803
|
-
|
|
1798
|
+
x,
|
|
1804
1799
|
a,
|
|
1800
|
+
R,
|
|
1805
1801
|
S,
|
|
1806
|
-
|
|
1807
|
-
k,
|
|
1802
|
+
w,
|
|
1808
1803
|
s
|
|
1809
1804
|
]), xe(() => () => {
|
|
1810
1805
|
if (p.current) {
|
|
1811
1806
|
try {
|
|
1812
1807
|
p.current.destroy && p.current.destroy();
|
|
1813
1808
|
} catch (A) {
|
|
1814
|
-
console.warn(`Failed to destroy player ${
|
|
1809
|
+
console.warn(`Failed to destroy player ${S}:`, A);
|
|
1815
1810
|
}
|
|
1816
1811
|
p.current = null;
|
|
1817
1812
|
}
|
|
1818
|
-
const u = document.getElementById(
|
|
1813
|
+
const u = document.getElementById(S);
|
|
1819
1814
|
u && (u.innerHTML = "");
|
|
1820
|
-
}, [
|
|
1815
|
+
}, [S]), {
|
|
1821
1816
|
playerRef: l,
|
|
1822
1817
|
playerInstanceRef: p,
|
|
1823
1818
|
isScriptLoaded: g,
|
|
1824
1819
|
isLoading: _,
|
|
1825
|
-
error: T || f ||
|
|
1820
|
+
error: T || f || w
|
|
1826
1821
|
};
|
|
1827
1822
|
}, Ir = ({ playerId: e, videoId: t, version: r, videoUrl: n, projectId: a, playlistId: i, scriptUrl: s, config: c = {}, apiKey: d, isReels: m = !1, hiddenClasses: l = [], onClose: p, className: g }) => {
|
|
1828
|
-
var
|
|
1829
|
-
const { playerRef:
|
|
1823
|
+
var I, E, O, G;
|
|
1824
|
+
const { playerRef: w, playerInstanceRef: v, isScriptLoaded: f, isLoading: h, error: y } = Cr({
|
|
1830
1825
|
playerId: e,
|
|
1831
1826
|
videoId: t,
|
|
1832
1827
|
version: r,
|
|
@@ -1837,11 +1832,11 @@ const gr = ne.div`
|
|
|
1837
1832
|
config: c,
|
|
1838
1833
|
apiKey: d,
|
|
1839
1834
|
isReels: m
|
|
1840
|
-
}), [
|
|
1835
|
+
}), [x, _] = U(!0), T = () => m && _(!0), S = () => {
|
|
1841
1836
|
var z, X;
|
|
1842
1837
|
_(!1), (X = (z = v.current) == null ? void 0 : z.play) == null || X.call(z), p == null || p();
|
|
1843
|
-
},
|
|
1844
|
-
return y ?
|
|
1838
|
+
}, R = (E = (I = c == null ? void 0 : c.config) == null ? void 0 : I.size) != null && E.width ? typeof c.config.size.width == "number" ? `${c.config.size.width}px` : c.config.size.width : void 0, u = (G = (O = c == null ? void 0 : c.config) == null ? void 0 : O.size) != null && G.height ? typeof c.config.size.height == "number" ? `${c.config.size.height}px` : c.config.size.height : void 0, A = Me(e, t);
|
|
1839
|
+
return y ? $.jsxs(Ne, { type: "error", children: ["An error occurred: ", y] }) : h || !f ? $.jsx(Ne, { type: "loading", children: "Loading..." }) : $.jsxs($.Fragment, { children: [m && !x ? $.jsx("div", { onClick: T }) : null, !m && $.jsx("div", { children: $.jsx(Qe, { id: A, ref: w, width: R || "100%", height: u || "auto", $hiddenClasses: l, className: g }) }, A), m && x && $.jsx(vr, { onClick: S, className: g, children: $.jsx(br, { className: g, onClick: (z) => z.stopPropagation(), children: $.jsx("div", { children: $.jsx(Qe, { id: A, ref: w, width: "100%", height: "auto", $hiddenClasses: l, className: g }) }, A) }) })] });
|
|
1845
1840
|
}, pt = gt(void 0), jr = ({ children: e }) => {
|
|
1846
1841
|
const [t, r] = U(!1), [n, a] = U(null), [i, s] = U(null), c = ze((l) => {
|
|
1847
1842
|
try {
|
|
@@ -1858,7 +1853,7 @@ const gr = ne.div`
|
|
|
1858
1853
|
isPlayerVisible: t,
|
|
1859
1854
|
playerParams: n
|
|
1860
1855
|
}), [c, d, t, n]);
|
|
1861
|
-
return
|
|
1856
|
+
return $.jsxs(pt.Provider, { value: m, children: [e, i && $.jsx(Ne, { type: "error", children: i }), t && (n == null ? void 0 : n.playerId) && $.jsx(Ir, { playerId: n.playerId, videoId: n.videoId, projectId: n.projectId, videoUrl: n.videoUrl, version: n.version, playlistId: n.playlistId, scriptUrl: n.scriptUrl, config: n.config, isReels: n.isReels, thumbnailUrl: n.thumbnailUrl, onClose: d, hiddenClasses: n.hiddenClasses || [], apiKey: n.apiKey, className: n.className })] });
|
|
1862
1857
|
}, $r = () => {
|
|
1863
1858
|
const e = et(pt);
|
|
1864
1859
|
if (!e)
|