@devix-technologies/react-gjirafa-vp-player 1.0.24 → 1.0.27
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/README.md +38 -52
- package/dist/react-gjirafa-vp-player.es.js +1059 -1097
- package/dist/react-gjirafa-vp-player.umd.js +8 -8
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
1
|
+
import * as xe from "react";
|
|
2
|
+
import jr, { forwardRef as $r, useContext as _r, useState as de, useEffect as Se, useRef as ee, useMemo as br, createContext as Nr, useCallback as lr } from "react";
|
|
3
3
|
var De = { exports: {} }, ke = {};
|
|
4
4
|
/**
|
|
5
5
|
* @license React
|
|
@@ -10,27 +10,27 @@ var De = { exports: {} }, ke = {};
|
|
|
10
10
|
* This source code is licensed under the MIT license found in the
|
|
11
11
|
* LICENSE file in the root directory of this source tree.
|
|
12
12
|
*/
|
|
13
|
-
var
|
|
14
|
-
function
|
|
15
|
-
if (
|
|
16
|
-
|
|
17
|
-
var e = Symbol.for("react.transitional.element"),
|
|
18
|
-
function
|
|
13
|
+
var ur;
|
|
14
|
+
function Fr() {
|
|
15
|
+
if (ur) return ke;
|
|
16
|
+
ur = 1;
|
|
17
|
+
var e = Symbol.for("react.transitional.element"), r = Symbol.for("react.fragment");
|
|
18
|
+
function n(i, a, t) {
|
|
19
19
|
var s = null;
|
|
20
|
-
if (
|
|
21
|
-
|
|
22
|
-
for (var l in
|
|
23
|
-
l !== "key" && (
|
|
24
|
-
} else
|
|
25
|
-
return
|
|
20
|
+
if (t !== void 0 && (s = "" + t), a.key !== void 0 && (s = "" + a.key), "key" in a) {
|
|
21
|
+
t = {};
|
|
22
|
+
for (var l in a)
|
|
23
|
+
l !== "key" && (t[l] = a[l]);
|
|
24
|
+
} else t = a;
|
|
25
|
+
return a = t.ref, {
|
|
26
26
|
$$typeof: e,
|
|
27
|
-
type:
|
|
27
|
+
type: i,
|
|
28
28
|
key: s,
|
|
29
|
-
ref:
|
|
30
|
-
props:
|
|
29
|
+
ref: a !== void 0 ? a : null,
|
|
30
|
+
props: t
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
return ke.Fragment =
|
|
33
|
+
return ke.Fragment = r, ke.jsx = n, ke.jsxs = n, ke;
|
|
34
34
|
}
|
|
35
35
|
var Oe = {};
|
|
36
36
|
/**
|
|
@@ -42,123 +42,124 @@ var Oe = {};
|
|
|
42
42
|
* This source code is licensed under the MIT license found in the
|
|
43
43
|
* LICENSE file in the root directory of this source tree.
|
|
44
44
|
*/
|
|
45
|
-
var
|
|
46
|
-
function
|
|
47
|
-
return
|
|
45
|
+
var cr;
|
|
46
|
+
function Dr() {
|
|
47
|
+
return cr || (cr = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
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
|
-
case
|
|
54
|
+
case x:
|
|
55
55
|
return "Fragment";
|
|
56
|
-
case
|
|
56
|
+
case P:
|
|
57
57
|
return "Profiler";
|
|
58
|
-
case
|
|
58
|
+
case b:
|
|
59
59
|
return "StrictMode";
|
|
60
|
-
case
|
|
60
|
+
case T:
|
|
61
61
|
return "Suspense";
|
|
62
|
-
case
|
|
62
|
+
case w:
|
|
63
63
|
return "SuspenseList";
|
|
64
|
-
case
|
|
64
|
+
case d:
|
|
65
65
|
return "Activity";
|
|
66
66
|
}
|
|
67
67
|
if (typeof o == "object")
|
|
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
|
|
71
|
+
case h:
|
|
72
72
|
return "Portal";
|
|
73
|
+
case N:
|
|
74
|
+
return o.displayName || "Context";
|
|
73
75
|
case L:
|
|
74
|
-
return (o.displayName || "Context") + ".Provider";
|
|
75
|
-
case I:
|
|
76
76
|
return (o._context.displayName || "Context") + ".Consumer";
|
|
77
|
-
case
|
|
78
|
-
var
|
|
79
|
-
return o = o.displayName, o || (o =
|
|
80
|
-
case
|
|
81
|
-
return
|
|
82
|
-
case
|
|
83
|
-
|
|
77
|
+
case j:
|
|
78
|
+
var y = o.render;
|
|
79
|
+
return o = o.displayName, o || (o = y.displayName || y.name || "", o = o !== "" ? "ForwardRef(" + o + ")" : "ForwardRef"), o;
|
|
80
|
+
case K:
|
|
81
|
+
return y = o.displayName || null, y !== null ? y : e(o.type) || "Memo";
|
|
82
|
+
case U:
|
|
83
|
+
y = o._payload, o = o._init;
|
|
84
84
|
try {
|
|
85
|
-
return e(o(
|
|
85
|
+
return e(o(y));
|
|
86
86
|
} catch {
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
return null;
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function r(o) {
|
|
92
92
|
return "" + o;
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function n(o) {
|
|
95
95
|
try {
|
|
96
|
-
|
|
97
|
-
var
|
|
96
|
+
r(o);
|
|
97
|
+
var y = !1;
|
|
98
98
|
} catch {
|
|
99
|
-
|
|
99
|
+
y = !0;
|
|
100
100
|
}
|
|
101
|
-
if (
|
|
102
|
-
|
|
103
|
-
var
|
|
104
|
-
return
|
|
105
|
-
|
|
101
|
+
if (y) {
|
|
102
|
+
y = console;
|
|
103
|
+
var R = y.error, F = typeof Symbol == "function" && Symbol.toStringTag && o[Symbol.toStringTag] || o.constructor.name || "Object";
|
|
104
|
+
return R.call(
|
|
105
|
+
y,
|
|
106
106
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
107
|
-
|
|
108
|
-
),
|
|
107
|
+
F
|
|
108
|
+
), r(o);
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
-
function
|
|
112
|
-
if (o ===
|
|
113
|
-
if (typeof o == "object" && o !== null && o.$$typeof ===
|
|
111
|
+
function i(o) {
|
|
112
|
+
if (o === x) return "<>";
|
|
113
|
+
if (typeof o == "object" && o !== null && o.$$typeof === U)
|
|
114
114
|
return "<...>";
|
|
115
115
|
try {
|
|
116
|
-
var
|
|
117
|
-
return
|
|
116
|
+
var y = e(o);
|
|
117
|
+
return y ? "<" + y + ">" : "<...>";
|
|
118
118
|
} catch {
|
|
119
119
|
return "<...>";
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
|
-
function
|
|
123
|
-
var o =
|
|
122
|
+
function a() {
|
|
123
|
+
var o = M.A;
|
|
124
124
|
return o === null ? null : o.getOwner();
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function t() {
|
|
127
127
|
return Error("react-stack-top-frame");
|
|
128
128
|
}
|
|
129
129
|
function s(o) {
|
|
130
|
-
if (
|
|
131
|
-
var
|
|
132
|
-
if (
|
|
130
|
+
if (W.call(o, "key")) {
|
|
131
|
+
var y = Object.getOwnPropertyDescriptor(o, "key").get;
|
|
132
|
+
if (y && y.isReactWarning) return !1;
|
|
133
133
|
}
|
|
134
134
|
return o.key !== void 0;
|
|
135
135
|
}
|
|
136
|
-
function l(o,
|
|
137
|
-
function
|
|
138
|
-
|
|
136
|
+
function l(o, y) {
|
|
137
|
+
function R() {
|
|
138
|
+
$ || ($ = !0, console.error(
|
|
139
139
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
140
|
-
|
|
140
|
+
y
|
|
141
141
|
));
|
|
142
142
|
}
|
|
143
|
-
|
|
144
|
-
get:
|
|
143
|
+
R.isReactWarning = !0, Object.defineProperty(o, "key", {
|
|
144
|
+
get: R,
|
|
145
145
|
configurable: !0
|
|
146
146
|
});
|
|
147
147
|
}
|
|
148
148
|
function c() {
|
|
149
149
|
var o = e(this.type);
|
|
150
|
-
return
|
|
150
|
+
return q[o] || (q[o] = !0, console.error(
|
|
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
|
|
155
|
-
|
|
156
|
-
|
|
154
|
+
function m(o, y, R, F, H, fe) {
|
|
155
|
+
var V = R.ref;
|
|
156
|
+
return o = {
|
|
157
|
+
$$typeof: S,
|
|
157
158
|
type: o,
|
|
158
|
-
key:
|
|
159
|
-
props:
|
|
160
|
-
_owner:
|
|
161
|
-
}, (
|
|
159
|
+
key: y,
|
|
160
|
+
props: R,
|
|
161
|
+
_owner: F
|
|
162
|
+
}, (V !== void 0 ? V : null) !== null ? Object.defineProperty(o, "ref", {
|
|
162
163
|
enumerable: !1,
|
|
163
164
|
get: c
|
|
164
165
|
}) : Object.defineProperty(o, "ref", { enumerable: !1, value: null }), o._store = {}, Object.defineProperty(o._store, "validated", {
|
|
@@ -175,220 +176,217 @@ function Dt() {
|
|
|
175
176
|
configurable: !1,
|
|
176
177
|
enumerable: !1,
|
|
177
178
|
writable: !0,
|
|
178
|
-
value:
|
|
179
|
+
value: H
|
|
179
180
|
}), Object.defineProperty(o, "_debugTask", {
|
|
180
181
|
configurable: !1,
|
|
181
182
|
enumerable: !1,
|
|
182
183
|
writable: !0,
|
|
183
|
-
value:
|
|
184
|
+
value: fe
|
|
184
185
|
}), Object.freeze && (Object.freeze(o.props), Object.freeze(o)), o;
|
|
185
186
|
}
|
|
186
|
-
function u(o,
|
|
187
|
-
var
|
|
188
|
-
if (
|
|
189
|
-
if (
|
|
190
|
-
if (
|
|
191
|
-
for (
|
|
192
|
-
|
|
193
|
-
Object.freeze && Object.freeze(
|
|
187
|
+
function u(o, y, R, F, H, fe) {
|
|
188
|
+
var V = y.children;
|
|
189
|
+
if (V !== void 0)
|
|
190
|
+
if (F)
|
|
191
|
+
if (Y(V)) {
|
|
192
|
+
for (F = 0; F < V.length; F++)
|
|
193
|
+
f(V[F]);
|
|
194
|
+
Object.freeze && Object.freeze(V);
|
|
194
195
|
} else
|
|
195
196
|
console.error(
|
|
196
197
|
"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
198
|
);
|
|
198
|
-
else
|
|
199
|
-
if (
|
|
200
|
-
|
|
201
|
-
var Z = Object.keys(
|
|
202
|
-
return
|
|
199
|
+
else f(V);
|
|
200
|
+
if (W.call(y, "key")) {
|
|
201
|
+
V = e(o);
|
|
202
|
+
var Z = Object.keys(y).filter(function(te) {
|
|
203
|
+
return te !== "key";
|
|
203
204
|
});
|
|
204
|
-
|
|
205
|
+
F = 0 < Z.length ? "{key: someKey, " + Z.join(": ..., ") + ": ...}" : "{key: someKey}", v[V + F] || (Z = 0 < Z.length ? "{" + Z.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
205
206
|
`A props object containing a "key" prop is being spread into JSX:
|
|
206
207
|
let props = %s;
|
|
207
208
|
<%s {...props} />
|
|
208
209
|
React keys must be passed directly to JSX without using spread:
|
|
209
210
|
let props = %s;
|
|
210
211
|
<%s key={someKey} {...props} />`,
|
|
211
|
-
|
|
212
|
-
|
|
212
|
+
F,
|
|
213
|
+
V,
|
|
213
214
|
Z,
|
|
214
|
-
|
|
215
|
-
),
|
|
215
|
+
V
|
|
216
|
+
), v[V + F] = !0);
|
|
216
217
|
}
|
|
217
|
-
if (
|
|
218
|
-
|
|
219
|
-
for (var
|
|
220
|
-
|
|
221
|
-
} else
|
|
222
|
-
return
|
|
223
|
-
|
|
218
|
+
if (V = null, R !== void 0 && (n(R), V = "" + R), s(y) && (n(y.key), V = "" + y.key), "key" in y) {
|
|
219
|
+
R = {};
|
|
220
|
+
for (var pe in y)
|
|
221
|
+
pe !== "key" && (R[pe] = y[pe]);
|
|
222
|
+
} else R = y;
|
|
223
|
+
return V && l(
|
|
224
|
+
R,
|
|
224
225
|
typeof o == "function" ? o.displayName || o.name || "Unknown" : o
|
|
225
|
-
),
|
|
226
|
+
), m(
|
|
226
227
|
o,
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
X,
|
|
233
|
-
de
|
|
228
|
+
V,
|
|
229
|
+
R,
|
|
230
|
+
a(),
|
|
231
|
+
H,
|
|
232
|
+
fe
|
|
234
233
|
);
|
|
235
234
|
}
|
|
236
|
-
function
|
|
237
|
-
typeof o == "object" && o !== null && o.$$typeof === _ && o._store && (o._store.validated = 1);
|
|
235
|
+
function f(o) {
|
|
236
|
+
_(o) ? o._store && (o._store.validated = 1) : typeof o == "object" && o !== null && o.$$typeof === U && (o._payload.status === "fulfilled" ? _(o._payload.value) && o._payload.value._store && (o._payload.value._store.validated = 1) : o._store && (o._store.validated = 1));
|
|
237
|
+
}
|
|
238
|
+
function _(o) {
|
|
239
|
+
return typeof o == "object" && o !== null && o.$$typeof === S;
|
|
238
240
|
}
|
|
239
|
-
var g =
|
|
241
|
+
var g = jr, S = Symbol.for("react.transitional.element"), h = Symbol.for("react.portal"), x = Symbol.for("react.fragment"), b = Symbol.for("react.strict_mode"), P = Symbol.for("react.profiler"), L = Symbol.for("react.consumer"), N = Symbol.for("react.context"), j = Symbol.for("react.forward_ref"), T = Symbol.for("react.suspense"), w = Symbol.for("react.suspense_list"), K = Symbol.for("react.memo"), U = Symbol.for("react.lazy"), d = Symbol.for("react.activity"), E = Symbol.for("react.client.reference"), M = g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, W = Object.prototype.hasOwnProperty, Y = Array.isArray, z = console.createTask ? console.createTask : function() {
|
|
240
242
|
return null;
|
|
241
243
|
};
|
|
242
244
|
g = {
|
|
243
|
-
|
|
245
|
+
react_stack_bottom_frame: function(o) {
|
|
244
246
|
return o();
|
|
245
247
|
}
|
|
246
248
|
};
|
|
247
|
-
var
|
|
249
|
+
var $, q = {}, C = g.react_stack_bottom_frame.bind(
|
|
248
250
|
g,
|
|
249
|
-
|
|
250
|
-
)(),
|
|
251
|
-
Oe.Fragment =
|
|
252
|
-
var
|
|
251
|
+
t
|
|
252
|
+
)(), p = z(i(t)), v = {};
|
|
253
|
+
Oe.Fragment = x, Oe.jsx = function(o, y, R) {
|
|
254
|
+
var F = 1e4 > M.recentlyCreatedOwnerStacks++;
|
|
253
255
|
return u(
|
|
254
256
|
o,
|
|
255
|
-
|
|
256
|
-
|
|
257
|
+
y,
|
|
258
|
+
R,
|
|
257
259
|
!1,
|
|
258
|
-
C,
|
|
259
|
-
|
|
260
|
-
J ? Error("react-stack-top-frame") : W,
|
|
261
|
-
J ? D(a(o)) : z
|
|
260
|
+
F ? Error("react-stack-top-frame") : C,
|
|
261
|
+
F ? z(i(o)) : p
|
|
262
262
|
);
|
|
263
|
-
}, Oe.jsxs = function(o,
|
|
264
|
-
var
|
|
263
|
+
}, Oe.jsxs = function(o, y, R) {
|
|
264
|
+
var F = 1e4 > M.recentlyCreatedOwnerStacks++;
|
|
265
265
|
return u(
|
|
266
266
|
o,
|
|
267
|
-
|
|
268
|
-
|
|
267
|
+
y,
|
|
268
|
+
R,
|
|
269
269
|
!0,
|
|
270
|
-
C,
|
|
271
|
-
|
|
272
|
-
J ? Error("react-stack-top-frame") : W,
|
|
273
|
-
J ? D(a(o)) : z
|
|
270
|
+
F ? Error("react-stack-top-frame") : C,
|
|
271
|
+
F ? z(i(o)) : p
|
|
274
272
|
);
|
|
275
273
|
};
|
|
276
|
-
}()), Oe;
|
|
274
|
+
})()), Oe;
|
|
277
275
|
}
|
|
278
|
-
var
|
|
279
|
-
function
|
|
280
|
-
return
|
|
276
|
+
var dr;
|
|
277
|
+
function Mr() {
|
|
278
|
+
return dr || (dr = 1, process.env.NODE_ENV === "production" ? De.exports = Fr() : De.exports = Dr()), De.exports;
|
|
281
279
|
}
|
|
282
|
-
var
|
|
280
|
+
var Q = Mr();
|
|
283
281
|
function Ze() {
|
|
284
282
|
return Ze = Object.assign ? Object.assign.bind() : function(e) {
|
|
285
|
-
for (var
|
|
286
|
-
var
|
|
287
|
-
for (var
|
|
283
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
284
|
+
var n = arguments[r];
|
|
285
|
+
for (var i in n) ({}).hasOwnProperty.call(n, i) && (e[i] = n[i]);
|
|
288
286
|
}
|
|
289
287
|
return e;
|
|
290
288
|
}, Ze.apply(null, arguments);
|
|
291
289
|
}
|
|
292
|
-
function
|
|
290
|
+
function zr(e) {
|
|
293
291
|
if (e.sheet)
|
|
294
292
|
return e.sheet;
|
|
295
|
-
for (var
|
|
296
|
-
if (document.styleSheets[
|
|
297
|
-
return document.styleSheets[
|
|
293
|
+
for (var r = 0; r < document.styleSheets.length; r++)
|
|
294
|
+
if (document.styleSheets[r].ownerNode === e)
|
|
295
|
+
return document.styleSheets[r];
|
|
298
296
|
}
|
|
299
|
-
function
|
|
300
|
-
var
|
|
301
|
-
return
|
|
297
|
+
function Br(e) {
|
|
298
|
+
var r = document.createElement("style");
|
|
299
|
+
return r.setAttribute("data-emotion", e.key), e.nonce !== void 0 && r.setAttribute("nonce", e.nonce), r.appendChild(document.createTextNode("")), r.setAttribute("data-s", ""), r;
|
|
302
300
|
}
|
|
303
|
-
var
|
|
304
|
-
function e(
|
|
305
|
-
var
|
|
306
|
-
this._insertTag = function(
|
|
307
|
-
var
|
|
308
|
-
|
|
309
|
-
}, this.isSpeedy =
|
|
301
|
+
var Ur = /* @__PURE__ */ (function() {
|
|
302
|
+
function e(n) {
|
|
303
|
+
var i = this;
|
|
304
|
+
this._insertTag = function(a) {
|
|
305
|
+
var t;
|
|
306
|
+
i.tags.length === 0 ? i.insertionPoint ? t = i.insertionPoint.nextSibling : i.prepend ? t = i.container.firstChild : t = i.before : t = i.tags[i.tags.length - 1].nextSibling, i.container.insertBefore(a, t), i.tags.push(a);
|
|
307
|
+
}, this.isSpeedy = n.speedy === void 0 ? !0 : n.speedy, this.tags = [], this.ctr = 0, this.nonce = n.nonce, this.key = n.key, this.container = n.container, this.prepend = n.prepend, this.insertionPoint = n.insertionPoint, this.before = null;
|
|
310
308
|
}
|
|
311
|
-
var
|
|
312
|
-
return
|
|
313
|
-
|
|
314
|
-
},
|
|
315
|
-
this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(
|
|
316
|
-
var
|
|
309
|
+
var r = e.prototype;
|
|
310
|
+
return r.hydrate = function(i) {
|
|
311
|
+
i.forEach(this._insertTag);
|
|
312
|
+
}, r.insert = function(i) {
|
|
313
|
+
this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(Br(this));
|
|
314
|
+
var a = this.tags[this.tags.length - 1];
|
|
317
315
|
if (this.isSpeedy) {
|
|
318
|
-
var
|
|
316
|
+
var t = zr(a);
|
|
319
317
|
try {
|
|
320
|
-
|
|
318
|
+
t.insertRule(i, t.cssRules.length);
|
|
321
319
|
} catch {
|
|
322
320
|
}
|
|
323
321
|
} else
|
|
324
|
-
|
|
322
|
+
a.appendChild(document.createTextNode(i));
|
|
325
323
|
this.ctr++;
|
|
326
|
-
},
|
|
327
|
-
this.tags.forEach(function(
|
|
328
|
-
var
|
|
329
|
-
return (
|
|
324
|
+
}, r.flush = function() {
|
|
325
|
+
this.tags.forEach(function(i) {
|
|
326
|
+
var a;
|
|
327
|
+
return (a = i.parentNode) == null ? void 0 : a.removeChild(i);
|
|
330
328
|
}), this.tags = [], this.ctr = 0;
|
|
331
329
|
}, e;
|
|
332
|
-
}(),
|
|
333
|
-
function
|
|
334
|
-
return re(e, 0) ^ 45 ? (((
|
|
330
|
+
})(), ie = "-ms-", We = "-moz-", k = "-webkit-", Er = "comm", nr = "rule", ir = "decl", qr = "@import", Pr = "@keyframes", Wr = "@layer", Yr = Math.abs, Ye = String.fromCharCode, Hr = Object.assign;
|
|
331
|
+
function Gr(e, r) {
|
|
332
|
+
return re(e, 0) ^ 45 ? (((r << 2 ^ re(e, 0)) << 2 ^ re(e, 1)) << 2 ^ re(e, 2)) << 2 ^ re(e, 3) : 0;
|
|
335
333
|
}
|
|
336
|
-
function
|
|
334
|
+
function Ir(e) {
|
|
337
335
|
return e.trim();
|
|
338
336
|
}
|
|
339
|
-
function
|
|
340
|
-
return (e =
|
|
337
|
+
function Xr(e, r) {
|
|
338
|
+
return (e = r.exec(e)) ? e[0] : e;
|
|
341
339
|
}
|
|
342
|
-
function
|
|
343
|
-
return e.replace(
|
|
340
|
+
function O(e, r, n) {
|
|
341
|
+
return e.replace(r, n);
|
|
344
342
|
}
|
|
345
|
-
function
|
|
346
|
-
return e.indexOf(
|
|
343
|
+
function er(e, r) {
|
|
344
|
+
return e.indexOf(r);
|
|
347
345
|
}
|
|
348
|
-
function re(e,
|
|
349
|
-
return e.charCodeAt(
|
|
346
|
+
function re(e, r) {
|
|
347
|
+
return e.charCodeAt(r) | 0;
|
|
350
348
|
}
|
|
351
|
-
function Le(e,
|
|
352
|
-
return e.slice(
|
|
349
|
+
function Le(e, r, n) {
|
|
350
|
+
return e.slice(r, n);
|
|
353
351
|
}
|
|
354
|
-
function
|
|
352
|
+
function he(e) {
|
|
355
353
|
return e.length;
|
|
356
354
|
}
|
|
357
|
-
function
|
|
355
|
+
function ar(e) {
|
|
358
356
|
return e.length;
|
|
359
357
|
}
|
|
360
|
-
function Me(e,
|
|
361
|
-
return
|
|
358
|
+
function Me(e, r) {
|
|
359
|
+
return r.push(e), e;
|
|
362
360
|
}
|
|
363
|
-
function
|
|
364
|
-
return e.map(
|
|
361
|
+
function Jr(e, r) {
|
|
362
|
+
return e.map(r).join("");
|
|
365
363
|
}
|
|
366
|
-
var
|
|
367
|
-
function
|
|
368
|
-
return { value: e, root:
|
|
364
|
+
var He = 1, Te = 1, Sr = 0, se = 0, J = 0, Ae = "";
|
|
365
|
+
function Ge(e, r, n, i, a, t, s) {
|
|
366
|
+
return { value: e, root: r, parent: n, type: i, props: a, children: t, line: He, column: Te, length: s, return: "" };
|
|
369
367
|
}
|
|
370
|
-
function
|
|
371
|
-
return
|
|
368
|
+
function Ve(e, r) {
|
|
369
|
+
return Hr(Ge("", null, null, "", null, null, 0), e, { length: -e.length }, r);
|
|
372
370
|
}
|
|
373
|
-
function
|
|
374
|
-
return
|
|
371
|
+
function Qr() {
|
|
372
|
+
return J;
|
|
375
373
|
}
|
|
376
|
-
function
|
|
377
|
-
return
|
|
374
|
+
function Kr() {
|
|
375
|
+
return J = se > 0 ? re(Ae, --se) : 0, Te--, J === 10 && (Te = 1, He--), J;
|
|
378
376
|
}
|
|
379
|
-
function
|
|
380
|
-
return
|
|
377
|
+
function ce() {
|
|
378
|
+
return J = se < Sr ? re(Ae, se++) : 0, Te++, J === 10 && (Te = 1, He++), J;
|
|
381
379
|
}
|
|
382
|
-
function
|
|
383
|
-
return re(
|
|
380
|
+
function ye() {
|
|
381
|
+
return re(Ae, se);
|
|
384
382
|
}
|
|
385
|
-
function
|
|
386
|
-
return
|
|
383
|
+
function Be() {
|
|
384
|
+
return se;
|
|
387
385
|
}
|
|
388
|
-
function
|
|
389
|
-
return Le(
|
|
386
|
+
function Ne(e, r) {
|
|
387
|
+
return Le(Ae, e, r);
|
|
390
388
|
}
|
|
391
|
-
function
|
|
389
|
+
function je(e) {
|
|
392
390
|
switch (e) {
|
|
393
391
|
// \0 \t \n \r \s whitespace token
|
|
394
392
|
case 0:
|
|
@@ -426,272 +424,272 @@ function $e(e) {
|
|
|
426
424
|
}
|
|
427
425
|
return 0;
|
|
428
426
|
}
|
|
429
|
-
function
|
|
430
|
-
return
|
|
427
|
+
function Rr(e) {
|
|
428
|
+
return He = Te = 1, Sr = he(Ae = e), se = 0, [];
|
|
431
429
|
}
|
|
432
|
-
function
|
|
433
|
-
return
|
|
430
|
+
function Tr(e) {
|
|
431
|
+
return Ae = "", e;
|
|
434
432
|
}
|
|
435
|
-
function
|
|
436
|
-
return
|
|
433
|
+
function Ue(e) {
|
|
434
|
+
return Ir(Ne(se - 1, rr(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
|
|
437
435
|
}
|
|
438
|
-
function
|
|
439
|
-
for (; (
|
|
440
|
-
|
|
441
|
-
return
|
|
436
|
+
function Zr(e) {
|
|
437
|
+
for (; (J = ye()) && J < 33; )
|
|
438
|
+
ce();
|
|
439
|
+
return je(e) > 2 || je(J) > 3 ? "" : " ";
|
|
442
440
|
}
|
|
443
|
-
function
|
|
444
|
-
for (; --
|
|
441
|
+
function et(e, r) {
|
|
442
|
+
for (; --r && ce() && !(J < 48 || J > 102 || J > 57 && J < 65 || J > 70 && J < 97); )
|
|
445
443
|
;
|
|
446
|
-
return
|
|
444
|
+
return Ne(e, Be() + (r < 6 && ye() == 32 && ce() == 32));
|
|
447
445
|
}
|
|
448
|
-
function
|
|
449
|
-
for (;
|
|
450
|
-
switch (
|
|
446
|
+
function rr(e) {
|
|
447
|
+
for (; ce(); )
|
|
448
|
+
switch (J) {
|
|
451
449
|
// ] ) " '
|
|
452
450
|
case e:
|
|
453
|
-
return
|
|
451
|
+
return se;
|
|
454
452
|
// " '
|
|
455
453
|
case 34:
|
|
456
454
|
case 39:
|
|
457
|
-
e !== 34 && e !== 39 &&
|
|
455
|
+
e !== 34 && e !== 39 && rr(J);
|
|
458
456
|
break;
|
|
459
457
|
// (
|
|
460
458
|
case 40:
|
|
461
|
-
e === 41 &&
|
|
459
|
+
e === 41 && rr(e);
|
|
462
460
|
break;
|
|
463
461
|
// \
|
|
464
462
|
case 92:
|
|
465
|
-
|
|
463
|
+
ce();
|
|
466
464
|
break;
|
|
467
465
|
}
|
|
468
|
-
return
|
|
466
|
+
return se;
|
|
469
467
|
}
|
|
470
|
-
function
|
|
471
|
-
for (;
|
|
472
|
-
if (e +
|
|
468
|
+
function rt(e, r) {
|
|
469
|
+
for (; ce() && e + J !== 57; )
|
|
470
|
+
if (e + J === 84 && ye() === 47)
|
|
473
471
|
break;
|
|
474
|
-
return "/*" +
|
|
472
|
+
return "/*" + Ne(r, se - 1) + "*" + Ye(e === 47 ? e : ce());
|
|
475
473
|
}
|
|
476
|
-
function
|
|
477
|
-
for (;
|
|
478
|
-
|
|
479
|
-
return
|
|
474
|
+
function tt(e) {
|
|
475
|
+
for (; !je(ye()); )
|
|
476
|
+
ce();
|
|
477
|
+
return Ne(e, se);
|
|
480
478
|
}
|
|
481
|
-
function
|
|
482
|
-
return
|
|
479
|
+
function nt(e) {
|
|
480
|
+
return Tr(qe("", null, null, null, [""], e = Rr(e), 0, [0], e));
|
|
483
481
|
}
|
|
484
|
-
function qe(e,
|
|
485
|
-
for (var
|
|
486
|
-
switch (
|
|
482
|
+
function qe(e, r, n, i, a, t, s, l, c) {
|
|
483
|
+
for (var m = 0, u = 0, f = s, _ = 0, g = 0, S = 0, h = 1, x = 1, b = 1, P = 0, L = "", N = a, j = t, T = i, w = L; x; )
|
|
484
|
+
switch (S = P, P = ce()) {
|
|
487
485
|
// (
|
|
488
486
|
case 40:
|
|
489
|
-
if (
|
|
490
|
-
|
|
487
|
+
if (S != 108 && re(w, f - 1) == 58) {
|
|
488
|
+
er(w += O(Ue(P), "&", "&\f"), "&\f") != -1 && (b = -1);
|
|
491
489
|
break;
|
|
492
490
|
}
|
|
493
491
|
// " ' [
|
|
494
492
|
case 34:
|
|
495
493
|
case 39:
|
|
496
494
|
case 91:
|
|
497
|
-
|
|
495
|
+
w += Ue(P);
|
|
498
496
|
break;
|
|
499
497
|
// \t \n \r \s
|
|
500
498
|
case 9:
|
|
501
499
|
case 10:
|
|
502
500
|
case 13:
|
|
503
501
|
case 32:
|
|
504
|
-
|
|
502
|
+
w += Zr(S);
|
|
505
503
|
break;
|
|
506
504
|
// \
|
|
507
505
|
case 92:
|
|
508
|
-
|
|
506
|
+
w += et(Be() - 1, 7);
|
|
509
507
|
continue;
|
|
510
508
|
// /
|
|
511
509
|
case 47:
|
|
512
|
-
switch (
|
|
510
|
+
switch (ye()) {
|
|
513
511
|
case 42:
|
|
514
512
|
case 47:
|
|
515
|
-
Me(
|
|
513
|
+
Me(it(rt(ce(), Be()), r, n), c);
|
|
516
514
|
break;
|
|
517
515
|
default:
|
|
518
|
-
|
|
516
|
+
w += "/";
|
|
519
517
|
}
|
|
520
518
|
break;
|
|
521
519
|
// {
|
|
522
|
-
case 123 *
|
|
523
|
-
l[
|
|
520
|
+
case 123 * h:
|
|
521
|
+
l[m++] = he(w) * b;
|
|
524
522
|
// } ; \0
|
|
525
|
-
case 125 *
|
|
523
|
+
case 125 * h:
|
|
526
524
|
case 59:
|
|
527
525
|
case 0:
|
|
528
|
-
switch (
|
|
526
|
+
switch (P) {
|
|
529
527
|
// \0 }
|
|
530
528
|
case 0:
|
|
531
529
|
case 125:
|
|
532
530
|
x = 0;
|
|
533
531
|
// ;
|
|
534
532
|
case 59 + u:
|
|
535
|
-
|
|
533
|
+
b == -1 && (w = O(w, /\f/g, "")), g > 0 && he(w) - f && Me(g > 32 ? pr(w + ";", i, n, f - 1) : pr(O(w, " ", "") + ";", i, n, f - 2), c);
|
|
536
534
|
break;
|
|
537
535
|
// @ ;
|
|
538
536
|
case 59:
|
|
539
|
-
|
|
537
|
+
w += ";";
|
|
540
538
|
// { rule/at-rule
|
|
541
539
|
default:
|
|
542
|
-
if (Me(
|
|
540
|
+
if (Me(T = fr(w, r, n, m, u, a, l, L, N = [], j = [], f), t), P === 123)
|
|
543
541
|
if (u === 0)
|
|
544
|
-
qe(
|
|
542
|
+
qe(w, r, T, T, N, t, f, l, j);
|
|
545
543
|
else
|
|
546
|
-
switch (
|
|
544
|
+
switch (_ === 99 && re(w, 3) === 110 ? 100 : _) {
|
|
547
545
|
// d l m s
|
|
548
546
|
case 100:
|
|
549
547
|
case 108:
|
|
550
548
|
case 109:
|
|
551
549
|
case 115:
|
|
552
|
-
qe(e,
|
|
550
|
+
qe(e, T, T, i && Me(fr(e, T, T, 0, 0, a, l, L, a, N = [], f), j), a, j, f, l, i ? N : j);
|
|
553
551
|
break;
|
|
554
552
|
default:
|
|
555
|
-
qe(
|
|
553
|
+
qe(w, T, T, T, [""], j, 0, l, j);
|
|
556
554
|
}
|
|
557
555
|
}
|
|
558
|
-
|
|
556
|
+
m = u = g = 0, h = b = 1, L = w = "", f = s;
|
|
559
557
|
break;
|
|
560
558
|
// :
|
|
561
559
|
case 58:
|
|
562
|
-
|
|
560
|
+
f = 1 + he(w), g = S;
|
|
563
561
|
default:
|
|
564
|
-
if (
|
|
565
|
-
if (
|
|
566
|
-
--
|
|
567
|
-
else if (
|
|
562
|
+
if (h < 1) {
|
|
563
|
+
if (P == 123)
|
|
564
|
+
--h;
|
|
565
|
+
else if (P == 125 && h++ == 0 && Kr() == 125)
|
|
568
566
|
continue;
|
|
569
567
|
}
|
|
570
|
-
switch (
|
|
568
|
+
switch (w += Ye(P), P * h) {
|
|
571
569
|
// &
|
|
572
570
|
case 38:
|
|
573
|
-
|
|
571
|
+
b = u > 0 ? 1 : (w += "\f", -1);
|
|
574
572
|
break;
|
|
575
573
|
// ,
|
|
576
574
|
case 44:
|
|
577
|
-
l[
|
|
575
|
+
l[m++] = (he(w) - 1) * b, b = 1;
|
|
578
576
|
break;
|
|
579
577
|
// @
|
|
580
578
|
case 64:
|
|
581
|
-
|
|
579
|
+
ye() === 45 && (w += Ue(ce())), _ = ye(), u = f = he(L = w += tt(Be())), P++;
|
|
582
580
|
break;
|
|
583
581
|
// -
|
|
584
582
|
case 45:
|
|
585
|
-
|
|
583
|
+
S === 45 && he(w) == 2 && (h = 0);
|
|
586
584
|
}
|
|
587
585
|
}
|
|
588
|
-
return
|
|
586
|
+
return t;
|
|
589
587
|
}
|
|
590
|
-
function
|
|
591
|
-
for (var
|
|
592
|
-
for (var
|
|
593
|
-
(L =
|
|
594
|
-
return
|
|
588
|
+
function fr(e, r, n, i, a, t, s, l, c, m, u) {
|
|
589
|
+
for (var f = a - 1, _ = a === 0 ? t : [""], g = ar(_), S = 0, h = 0, x = 0; S < i; ++S)
|
|
590
|
+
for (var b = 0, P = Le(e, f + 1, f = Yr(h = s[S])), L = e; b < g; ++b)
|
|
591
|
+
(L = Ir(h > 0 ? _[b] + " " + P : O(P, /&\f/g, _[b]))) && (c[x++] = L);
|
|
592
|
+
return Ge(e, r, n, a === 0 ? nr : l, c, m, u);
|
|
595
593
|
}
|
|
596
|
-
function
|
|
597
|
-
return
|
|
594
|
+
function it(e, r, n) {
|
|
595
|
+
return Ge(e, r, n, Er, Ye(Qr()), Le(e, 2, -2), 0);
|
|
598
596
|
}
|
|
599
|
-
function
|
|
600
|
-
return
|
|
597
|
+
function pr(e, r, n, i) {
|
|
598
|
+
return Ge(e, r, n, ir, Le(e, 0, i), Le(e, i + 1, -1), i);
|
|
601
599
|
}
|
|
602
|
-
function
|
|
603
|
-
for (var
|
|
604
|
-
|
|
605
|
-
return
|
|
600
|
+
function Re(e, r) {
|
|
601
|
+
for (var n = "", i = ar(e), a = 0; a < i; a++)
|
|
602
|
+
n += r(e[a], a, e, r) || "";
|
|
603
|
+
return n;
|
|
606
604
|
}
|
|
607
|
-
function
|
|
605
|
+
function at(e, r, n, i) {
|
|
608
606
|
switch (e.type) {
|
|
609
|
-
case
|
|
607
|
+
case Wr:
|
|
610
608
|
if (e.children.length) break;
|
|
611
|
-
case
|
|
612
|
-
case
|
|
609
|
+
case qr:
|
|
610
|
+
case ir:
|
|
613
611
|
return e.return = e.return || e.value;
|
|
614
|
-
case
|
|
612
|
+
case Er:
|
|
615
613
|
return "";
|
|
616
|
-
case
|
|
617
|
-
return e.return = e.value + "{" +
|
|
618
|
-
case
|
|
614
|
+
case Pr:
|
|
615
|
+
return e.return = e.value + "{" + Re(e.children, i) + "}";
|
|
616
|
+
case nr:
|
|
619
617
|
e.value = e.props.join(",");
|
|
620
618
|
}
|
|
621
|
-
return
|
|
619
|
+
return he(n = Re(e.children, i)) ? e.return = e.value + "{" + n + "}" : "";
|
|
622
620
|
}
|
|
623
|
-
function
|
|
624
|
-
var
|
|
625
|
-
return function(
|
|
626
|
-
for (var s = "", l = 0; l <
|
|
627
|
-
s += e[l](
|
|
621
|
+
function ot(e) {
|
|
622
|
+
var r = ar(e);
|
|
623
|
+
return function(n, i, a, t) {
|
|
624
|
+
for (var s = "", l = 0; l < r; l++)
|
|
625
|
+
s += e[l](n, i, a, t) || "";
|
|
628
626
|
return s;
|
|
629
627
|
};
|
|
630
628
|
}
|
|
631
|
-
function
|
|
632
|
-
return function(
|
|
633
|
-
|
|
629
|
+
function st(e) {
|
|
630
|
+
return function(r) {
|
|
631
|
+
r.root || (r = r.return) && e(r);
|
|
634
632
|
};
|
|
635
633
|
}
|
|
636
|
-
function
|
|
637
|
-
var
|
|
638
|
-
return function(
|
|
639
|
-
return
|
|
634
|
+
function Cr(e) {
|
|
635
|
+
var r = /* @__PURE__ */ Object.create(null);
|
|
636
|
+
return function(n) {
|
|
637
|
+
return r[n] === void 0 && (r[n] = e(n)), r[n];
|
|
640
638
|
};
|
|
641
639
|
}
|
|
642
|
-
var
|
|
643
|
-
for (var
|
|
644
|
-
|
|
645
|
-
return
|
|
646
|
-
},
|
|
647
|
-
var
|
|
640
|
+
var lt = function(r, n, i) {
|
|
641
|
+
for (var a = 0, t = 0; a = t, t = ye(), a === 38 && t === 12 && (n[i] = 1), !je(t); )
|
|
642
|
+
ce();
|
|
643
|
+
return Ne(r, se);
|
|
644
|
+
}, ut = function(r, n) {
|
|
645
|
+
var i = -1, a = 44;
|
|
648
646
|
do
|
|
649
|
-
switch (
|
|
647
|
+
switch (je(a)) {
|
|
650
648
|
case 0:
|
|
651
|
-
|
|
649
|
+
a === 38 && ye() === 12 && (n[i] = 1), r[i] += lt(se - 1, n, i);
|
|
652
650
|
break;
|
|
653
651
|
case 2:
|
|
654
|
-
|
|
652
|
+
r[i] += Ue(a);
|
|
655
653
|
break;
|
|
656
654
|
case 4:
|
|
657
|
-
if (
|
|
658
|
-
|
|
655
|
+
if (a === 44) {
|
|
656
|
+
r[++i] = ye() === 58 ? "&\f" : "", n[i] = r[i].length;
|
|
659
657
|
break;
|
|
660
658
|
}
|
|
661
659
|
// fallthrough
|
|
662
660
|
default:
|
|
663
|
-
|
|
661
|
+
r[i] += Ye(a);
|
|
664
662
|
}
|
|
665
|
-
while (
|
|
666
|
-
return
|
|
667
|
-
},
|
|
668
|
-
return
|
|
669
|
-
},
|
|
670
|
-
if (!(
|
|
663
|
+
while (a = ce());
|
|
664
|
+
return r;
|
|
665
|
+
}, ct = function(r, n) {
|
|
666
|
+
return Tr(ut(Rr(r), n));
|
|
667
|
+
}, hr = /* @__PURE__ */ new WeakMap(), dt = function(r) {
|
|
668
|
+
if (!(r.type !== "rule" || !r.parent || // positive .length indicates that this rule contains pseudo
|
|
671
669
|
// negative .length indicates that this rule has been already prefixed
|
|
672
|
-
|
|
673
|
-
for (var
|
|
674
|
-
if (
|
|
675
|
-
if (!(
|
|
676
|
-
|
|
677
|
-
for (var
|
|
678
|
-
for (var u = 0; u < l.length; u++,
|
|
679
|
-
|
|
670
|
+
r.length < 1)) {
|
|
671
|
+
for (var n = r.value, i = r.parent, a = r.column === i.column && r.line === i.line; i.type !== "rule"; )
|
|
672
|
+
if (i = i.parent, !i) return;
|
|
673
|
+
if (!(r.props.length === 1 && n.charCodeAt(0) !== 58 && !hr.get(i)) && !a) {
|
|
674
|
+
hr.set(r, !0);
|
|
675
|
+
for (var t = [], s = ct(n, t), l = i.props, c = 0, m = 0; c < s.length; c++)
|
|
676
|
+
for (var u = 0; u < l.length; u++, m++)
|
|
677
|
+
r.props[m] = t[c] ? s[c].replace(/&\f/g, l[u]) : l[u] + " " + s[c];
|
|
680
678
|
}
|
|
681
679
|
}
|
|
682
|
-
},
|
|
683
|
-
if (
|
|
684
|
-
var
|
|
680
|
+
}, ft = function(r) {
|
|
681
|
+
if (r.type === "decl") {
|
|
682
|
+
var n = r.value;
|
|
685
683
|
// charcode for l
|
|
686
|
-
|
|
687
|
-
|
|
684
|
+
n.charCodeAt(0) === 108 && // charcode for b
|
|
685
|
+
n.charCodeAt(2) === 98 && (r.return = "", r.value = "");
|
|
688
686
|
}
|
|
689
687
|
};
|
|
690
|
-
function
|
|
691
|
-
switch (
|
|
688
|
+
function Ar(e, r) {
|
|
689
|
+
switch (Gr(e, r)) {
|
|
692
690
|
// color-adjust
|
|
693
691
|
case 5103:
|
|
694
|
-
return
|
|
692
|
+
return k + "print-" + e + e;
|
|
695
693
|
// animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
|
|
696
694
|
case 5737:
|
|
697
695
|
case 4201:
|
|
@@ -721,58 +719,58 @@ function kt(e, t) {
|
|
|
721
719
|
case 5365:
|
|
722
720
|
case 5621:
|
|
723
721
|
case 3829:
|
|
724
|
-
return
|
|
722
|
+
return k + e + e;
|
|
725
723
|
// appearance, user-select, transform, hyphens, text-size-adjust
|
|
726
724
|
case 5349:
|
|
727
725
|
case 4246:
|
|
728
726
|
case 4810:
|
|
729
727
|
case 6968:
|
|
730
728
|
case 2756:
|
|
731
|
-
return
|
|
729
|
+
return k + e + We + e + ie + e + e;
|
|
732
730
|
// flex, flex-direction
|
|
733
731
|
case 6828:
|
|
734
732
|
case 4268:
|
|
735
|
-
return
|
|
733
|
+
return k + e + ie + e + e;
|
|
736
734
|
// order
|
|
737
735
|
case 6165:
|
|
738
|
-
return
|
|
736
|
+
return k + e + ie + "flex-" + e + e;
|
|
739
737
|
// align-items
|
|
740
738
|
case 5187:
|
|
741
|
-
return
|
|
739
|
+
return k + e + O(e, /(\w+).+(:[^]+)/, k + "box-$1$2" + ie + "flex-$1$2") + e;
|
|
742
740
|
// align-self
|
|
743
741
|
case 5443:
|
|
744
|
-
return
|
|
742
|
+
return k + e + ie + "flex-item-" + O(e, /flex-|-self/, "") + e;
|
|
745
743
|
// align-content
|
|
746
744
|
case 4675:
|
|
747
|
-
return
|
|
745
|
+
return k + e + ie + "flex-line-pack" + O(e, /align-content|flex-|-self/, "") + e;
|
|
748
746
|
// flex-shrink
|
|
749
747
|
case 5548:
|
|
750
|
-
return
|
|
748
|
+
return k + e + ie + O(e, "shrink", "negative") + e;
|
|
751
749
|
// flex-basis
|
|
752
750
|
case 5292:
|
|
753
|
-
return
|
|
751
|
+
return k + e + ie + O(e, "basis", "preferred-size") + e;
|
|
754
752
|
// flex-grow
|
|
755
753
|
case 6060:
|
|
756
|
-
return
|
|
754
|
+
return k + "box-" + O(e, "-grow", "") + k + e + ie + O(e, "grow", "positive") + e;
|
|
757
755
|
// transition
|
|
758
756
|
case 4554:
|
|
759
|
-
return
|
|
757
|
+
return k + O(e, /([^-])(transform)/g, "$1" + k + "$2") + e;
|
|
760
758
|
// cursor
|
|
761
759
|
case 6187:
|
|
762
|
-
return
|
|
760
|
+
return O(O(O(e, /(zoom-|grab)/, k + "$1"), /(image-set)/, k + "$1"), e, "") + e;
|
|
763
761
|
// background, background-image
|
|
764
762
|
case 5495:
|
|
765
763
|
case 3959:
|
|
766
|
-
return
|
|
764
|
+
return O(e, /(image-set\([^]*)/, k + "$1$`$1");
|
|
767
765
|
// justify-content
|
|
768
766
|
case 4968:
|
|
769
|
-
return
|
|
767
|
+
return O(O(e, /(.+:)(flex-)?(.*)/, k + "box-pack:$3" + ie + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + k + e + e;
|
|
770
768
|
// (margin|padding)-inline-(start|end)
|
|
771
769
|
case 4095:
|
|
772
770
|
case 3583:
|
|
773
771
|
case 4068:
|
|
774
772
|
case 2532:
|
|
775
|
-
return
|
|
773
|
+
return O(e, /(.+)-inline(.+)/, k + "$1$2") + e;
|
|
776
774
|
// (min|max)?(width|height|inline-size|block-size)
|
|
777
775
|
case 8116:
|
|
778
776
|
case 7059:
|
|
@@ -786,176 +784,176 @@ function kt(e, t) {
|
|
|
786
784
|
case 5789:
|
|
787
785
|
case 5021:
|
|
788
786
|
case 4765:
|
|
789
|
-
if (
|
|
787
|
+
if (he(e) - 1 - r > 6) switch (re(e, r + 1)) {
|
|
790
788
|
// (m)ax-content, (m)in-content
|
|
791
789
|
case 109:
|
|
792
|
-
if (re(e,
|
|
790
|
+
if (re(e, r + 4) !== 45) break;
|
|
793
791
|
// (f)ill-available, (f)it-content
|
|
794
792
|
case 102:
|
|
795
|
-
return
|
|
793
|
+
return O(e, /(.+:)(.+)-([^]+)/, "$1" + k + "$2-$3$1" + We + (re(e, r + 3) == 108 ? "$3" : "$2-$3")) + e;
|
|
796
794
|
// (s)tretch
|
|
797
795
|
case 115:
|
|
798
|
-
return ~
|
|
796
|
+
return ~er(e, "stretch") ? Ar(O(e, "stretch", "fill-available"), r) + e : e;
|
|
799
797
|
}
|
|
800
798
|
break;
|
|
801
799
|
// position: sticky
|
|
802
800
|
case 4949:
|
|
803
|
-
if (re(e,
|
|
801
|
+
if (re(e, r + 1) !== 115) break;
|
|
804
802
|
// display: (flex|inline-flex)
|
|
805
803
|
case 6444:
|
|
806
|
-
switch (re(e,
|
|
804
|
+
switch (re(e, he(e) - 3 - (~er(e, "!important") && 10))) {
|
|
807
805
|
// stic(k)y
|
|
808
806
|
case 107:
|
|
809
|
-
return
|
|
807
|
+
return O(e, ":", ":" + k) + e;
|
|
810
808
|
// (inline-)?fl(e)x
|
|
811
809
|
case 101:
|
|
812
|
-
return
|
|
810
|
+
return O(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + k + (re(e, 14) === 45 ? "inline-" : "") + "box$3$1" + k + "$2$3$1" + ie + "$2box$3") + e;
|
|
813
811
|
}
|
|
814
812
|
break;
|
|
815
813
|
// writing-mode
|
|
816
814
|
case 5936:
|
|
817
|
-
switch (re(e,
|
|
815
|
+
switch (re(e, r + 11)) {
|
|
818
816
|
// vertical-l(r)
|
|
819
817
|
case 114:
|
|
820
|
-
return
|
|
818
|
+
return k + e + ie + O(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
|
|
821
819
|
// vertical-r(l)
|
|
822
820
|
case 108:
|
|
823
|
-
return
|
|
821
|
+
return k + e + ie + O(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
|
|
824
822
|
// horizontal(-)tb
|
|
825
823
|
case 45:
|
|
826
|
-
return
|
|
824
|
+
return k + e + ie + O(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
|
|
827
825
|
}
|
|
828
|
-
return
|
|
826
|
+
return k + e + ie + e + e;
|
|
829
827
|
}
|
|
830
828
|
return e;
|
|
831
829
|
}
|
|
832
|
-
var
|
|
833
|
-
if (
|
|
834
|
-
case
|
|
835
|
-
|
|
830
|
+
var pt = function(r, n, i, a) {
|
|
831
|
+
if (r.length > -1 && !r.return) switch (r.type) {
|
|
832
|
+
case ir:
|
|
833
|
+
r.return = Ar(r.value, r.length);
|
|
836
834
|
break;
|
|
837
|
-
case
|
|
838
|
-
return
|
|
839
|
-
value:
|
|
840
|
-
})],
|
|
841
|
-
case
|
|
842
|
-
if (
|
|
843
|
-
switch (
|
|
835
|
+
case Pr:
|
|
836
|
+
return Re([Ve(r, {
|
|
837
|
+
value: O(r.value, "@", "@" + k)
|
|
838
|
+
})], a);
|
|
839
|
+
case nr:
|
|
840
|
+
if (r.length) return Jr(r.props, function(t) {
|
|
841
|
+
switch (Xr(t, /(::plac\w+|:read-\w+)/)) {
|
|
844
842
|
// :read-(only|write)
|
|
845
843
|
case ":read-only":
|
|
846
844
|
case ":read-write":
|
|
847
|
-
return
|
|
848
|
-
props: [
|
|
849
|
-
})],
|
|
845
|
+
return Re([Ve(r, {
|
|
846
|
+
props: [O(t, /:(read-\w+)/, ":" + We + "$1")]
|
|
847
|
+
})], a);
|
|
850
848
|
// :placeholder
|
|
851
849
|
case "::placeholder":
|
|
852
|
-
return
|
|
853
|
-
props: [
|
|
854
|
-
}),
|
|
855
|
-
props: [
|
|
856
|
-
}),
|
|
857
|
-
props: [
|
|
858
|
-
})],
|
|
850
|
+
return Re([Ve(r, {
|
|
851
|
+
props: [O(t, /:(plac\w+)/, ":" + k + "input-$1")]
|
|
852
|
+
}), Ve(r, {
|
|
853
|
+
props: [O(t, /:(plac\w+)/, ":" + We + "$1")]
|
|
854
|
+
}), Ve(r, {
|
|
855
|
+
props: [O(t, /:(plac\w+)/, ie + "input-$1")]
|
|
856
|
+
})], a);
|
|
859
857
|
}
|
|
860
858
|
return "";
|
|
861
859
|
});
|
|
862
860
|
}
|
|
863
|
-
},
|
|
864
|
-
var
|
|
865
|
-
if (
|
|
866
|
-
var
|
|
867
|
-
Array.prototype.forEach.call(
|
|
868
|
-
var x =
|
|
869
|
-
x.indexOf(" ") !== -1 && (document.head.appendChild(
|
|
861
|
+
}, ht = [pt], mt = function(r) {
|
|
862
|
+
var n = r.key;
|
|
863
|
+
if (n === "css") {
|
|
864
|
+
var i = document.querySelectorAll("style[data-emotion]:not([data-s])");
|
|
865
|
+
Array.prototype.forEach.call(i, function(h) {
|
|
866
|
+
var x = h.getAttribute("data-emotion");
|
|
867
|
+
x.indexOf(" ") !== -1 && (document.head.appendChild(h), h.setAttribute("data-s", ""));
|
|
870
868
|
});
|
|
871
869
|
}
|
|
872
|
-
var
|
|
873
|
-
s =
|
|
870
|
+
var a = r.stylisPlugins || ht, t = {}, s, l = [];
|
|
871
|
+
s = r.container || document.head, Array.prototype.forEach.call(
|
|
874
872
|
// this means we will ignore elements which don't have a space in them which
|
|
875
873
|
// means that the style elements we're looking at are only Emotion 11 server-rendered style elements
|
|
876
|
-
document.querySelectorAll('style[data-emotion^="' +
|
|
877
|
-
function(
|
|
878
|
-
for (var x =
|
|
879
|
-
|
|
880
|
-
l.push(
|
|
874
|
+
document.querySelectorAll('style[data-emotion^="' + n + ' "]'),
|
|
875
|
+
function(h) {
|
|
876
|
+
for (var x = h.getAttribute("data-emotion").split(" "), b = 1; b < x.length; b++)
|
|
877
|
+
t[x[b]] = !0;
|
|
878
|
+
l.push(h);
|
|
881
879
|
}
|
|
882
880
|
);
|
|
883
|
-
var c,
|
|
881
|
+
var c, m = [dt, ft];
|
|
884
882
|
{
|
|
885
|
-
var u,
|
|
886
|
-
u.insert(
|
|
887
|
-
})],
|
|
888
|
-
return
|
|
883
|
+
var u, f = [at, st(function(h) {
|
|
884
|
+
u.insert(h);
|
|
885
|
+
})], _ = ot(m.concat(a, f)), g = function(x) {
|
|
886
|
+
return Re(nt(x), _);
|
|
889
887
|
};
|
|
890
|
-
c = function(x,
|
|
891
|
-
u =
|
|
888
|
+
c = function(x, b, P, L) {
|
|
889
|
+
u = P, g(x ? x + "{" + b.styles + "}" : b.styles), L && (S.inserted[b.name] = !0);
|
|
892
890
|
};
|
|
893
891
|
}
|
|
894
|
-
var
|
|
895
|
-
key:
|
|
896
|
-
sheet: new
|
|
897
|
-
key:
|
|
892
|
+
var S = {
|
|
893
|
+
key: n,
|
|
894
|
+
sheet: new Ur({
|
|
895
|
+
key: n,
|
|
898
896
|
container: s,
|
|
899
|
-
nonce:
|
|
900
|
-
speedy:
|
|
901
|
-
prepend:
|
|
902
|
-
insertionPoint:
|
|
897
|
+
nonce: r.nonce,
|
|
898
|
+
speedy: r.speedy,
|
|
899
|
+
prepend: r.prepend,
|
|
900
|
+
insertionPoint: r.insertionPoint
|
|
903
901
|
}),
|
|
904
|
-
nonce:
|
|
905
|
-
inserted:
|
|
902
|
+
nonce: r.nonce,
|
|
903
|
+
inserted: t,
|
|
906
904
|
registered: {},
|
|
907
905
|
insert: c
|
|
908
906
|
};
|
|
909
|
-
return
|
|
910
|
-
},
|
|
911
|
-
function
|
|
912
|
-
var
|
|
913
|
-
return
|
|
914
|
-
e[
|
|
915
|
-
}),
|
|
907
|
+
return S.sheet.hydrate(l), S;
|
|
908
|
+
}, yt = !0;
|
|
909
|
+
function vt(e, r, n) {
|
|
910
|
+
var i = "";
|
|
911
|
+
return n.split(" ").forEach(function(a) {
|
|
912
|
+
e[a] !== void 0 ? r.push(e[a] + ";") : a && (i += a + " ");
|
|
913
|
+
}), i;
|
|
916
914
|
}
|
|
917
|
-
var
|
|
918
|
-
var
|
|
915
|
+
var kr = function(r, n, i) {
|
|
916
|
+
var a = r.key + "-" + n.name;
|
|
919
917
|
// we only need to add the styles to the registered cache if the
|
|
920
918
|
// class name could be used further down
|
|
921
919
|
// the tree but if it's a string tag, we know it won't
|
|
922
920
|
// so we don't have to add it to registered cache.
|
|
923
921
|
// this improves memory usage since we can avoid storing the whole style string
|
|
924
|
-
(
|
|
922
|
+
(i === !1 || // we need to always store it if we're in compat mode and
|
|
925
923
|
// in node since emotion-server relies on whether a style is in
|
|
926
924
|
// the registered cache to know whether a style is global or not
|
|
927
925
|
// also, note that this check will be dead code eliminated in the browser
|
|
928
|
-
|
|
929
|
-
},
|
|
930
|
-
|
|
931
|
-
var
|
|
932
|
-
if (
|
|
933
|
-
var
|
|
926
|
+
yt === !1) && r.registered[a] === void 0 && (r.registered[a] = n.styles);
|
|
927
|
+
}, gt = function(r, n, i) {
|
|
928
|
+
kr(r, n, i);
|
|
929
|
+
var a = r.key + "-" + n.name;
|
|
930
|
+
if (r.inserted[n.name] === void 0) {
|
|
931
|
+
var t = n;
|
|
934
932
|
do
|
|
935
|
-
|
|
936
|
-
while (
|
|
933
|
+
r.insert(n === t ? "." + a : "", t, r.sheet, !0), t = t.next;
|
|
934
|
+
while (t !== void 0);
|
|
937
935
|
}
|
|
938
936
|
};
|
|
939
|
-
function
|
|
940
|
-
for (var
|
|
941
|
-
|
|
942
|
-
(
|
|
943
|
-
|
|
944
|
-
(
|
|
945
|
-
(
|
|
946
|
-
switch (
|
|
937
|
+
function xt(e) {
|
|
938
|
+
for (var r = 0, n, i = 0, a = e.length; a >= 4; ++i, a -= 4)
|
|
939
|
+
n = e.charCodeAt(i) & 255 | (e.charCodeAt(++i) & 255) << 8 | (e.charCodeAt(++i) & 255) << 16 | (e.charCodeAt(++i) & 255) << 24, n = /* Math.imul(k, m): */
|
|
940
|
+
(n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16), n ^= /* k >>> r: */
|
|
941
|
+
n >>> 24, r = /* Math.imul(k, m): */
|
|
942
|
+
(n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
|
|
943
|
+
(r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16);
|
|
944
|
+
switch (a) {
|
|
947
945
|
case 3:
|
|
948
|
-
|
|
946
|
+
r ^= (e.charCodeAt(i + 2) & 255) << 16;
|
|
949
947
|
case 2:
|
|
950
|
-
|
|
948
|
+
r ^= (e.charCodeAt(i + 1) & 255) << 8;
|
|
951
949
|
case 1:
|
|
952
|
-
|
|
953
|
-
(
|
|
950
|
+
r ^= e.charCodeAt(i) & 255, r = /* Math.imul(h, m): */
|
|
951
|
+
(r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16);
|
|
954
952
|
}
|
|
955
|
-
return
|
|
956
|
-
(
|
|
953
|
+
return r ^= r >>> 13, r = /* Math.imul(h, m): */
|
|
954
|
+
(r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16), ((r ^ r >>> 15) >>> 0).toString(36);
|
|
957
955
|
}
|
|
958
|
-
var
|
|
956
|
+
var wt = {
|
|
959
957
|
animationIterationCount: 1,
|
|
960
958
|
aspectRatio: 1,
|
|
961
959
|
borderImageOutset: 1,
|
|
@@ -1004,221 +1002,221 @@ var br = {
|
|
|
1004
1002
|
strokeMiterlimit: 1,
|
|
1005
1003
|
strokeOpacity: 1,
|
|
1006
1004
|
strokeWidth: 1
|
|
1007
|
-
},
|
|
1008
|
-
return
|
|
1009
|
-
},
|
|
1010
|
-
return
|
|
1011
|
-
}, Xe = /* @__PURE__ */
|
|
1012
|
-
return
|
|
1013
|
-
}),
|
|
1014
|
-
switch (
|
|
1005
|
+
}, _t = /[A-Z]|^ms/g, bt = /_EMO_([^_]+?)_([^]*?)_EMO_/g, Or = function(r) {
|
|
1006
|
+
return r.charCodeAt(1) === 45;
|
|
1007
|
+
}, mr = function(r) {
|
|
1008
|
+
return r != null && typeof r != "boolean";
|
|
1009
|
+
}, Xe = /* @__PURE__ */ Cr(function(e) {
|
|
1010
|
+
return Or(e) ? e : e.replace(_t, "-$&").toLowerCase();
|
|
1011
|
+
}), yr = function(r, n) {
|
|
1012
|
+
switch (r) {
|
|
1015
1013
|
case "animation":
|
|
1016
1014
|
case "animationName":
|
|
1017
|
-
if (typeof
|
|
1018
|
-
return
|
|
1019
|
-
return
|
|
1020
|
-
name:
|
|
1021
|
-
styles:
|
|
1022
|
-
next:
|
|
1023
|
-
},
|
|
1015
|
+
if (typeof n == "string")
|
|
1016
|
+
return n.replace(bt, function(i, a, t) {
|
|
1017
|
+
return me = {
|
|
1018
|
+
name: a,
|
|
1019
|
+
styles: t,
|
|
1020
|
+
next: me
|
|
1021
|
+
}, a;
|
|
1024
1022
|
});
|
|
1025
1023
|
}
|
|
1026
|
-
return
|
|
1024
|
+
return wt[r] !== 1 && !Or(r) && typeof n == "number" && n !== 0 ? n + "px" : n;
|
|
1027
1025
|
};
|
|
1028
|
-
function
|
|
1029
|
-
if (
|
|
1026
|
+
function $e(e, r, n) {
|
|
1027
|
+
if (n == null)
|
|
1030
1028
|
return "";
|
|
1031
|
-
var
|
|
1032
|
-
if (
|
|
1033
|
-
return
|
|
1034
|
-
switch (typeof
|
|
1029
|
+
var i = n;
|
|
1030
|
+
if (i.__emotion_styles !== void 0)
|
|
1031
|
+
return i;
|
|
1032
|
+
switch (typeof n) {
|
|
1035
1033
|
case "boolean":
|
|
1036
1034
|
return "";
|
|
1037
1035
|
case "object": {
|
|
1038
|
-
var
|
|
1039
|
-
if (
|
|
1040
|
-
return
|
|
1041
|
-
name:
|
|
1042
|
-
styles:
|
|
1043
|
-
next:
|
|
1044
|
-
},
|
|
1045
|
-
var
|
|
1046
|
-
if (
|
|
1047
|
-
var s =
|
|
1036
|
+
var a = n;
|
|
1037
|
+
if (a.anim === 1)
|
|
1038
|
+
return me = {
|
|
1039
|
+
name: a.name,
|
|
1040
|
+
styles: a.styles,
|
|
1041
|
+
next: me
|
|
1042
|
+
}, a.name;
|
|
1043
|
+
var t = n;
|
|
1044
|
+
if (t.styles !== void 0) {
|
|
1045
|
+
var s = t.next;
|
|
1048
1046
|
if (s !== void 0)
|
|
1049
1047
|
for (; s !== void 0; )
|
|
1050
|
-
|
|
1048
|
+
me = {
|
|
1051
1049
|
name: s.name,
|
|
1052
1050
|
styles: s.styles,
|
|
1053
|
-
next:
|
|
1051
|
+
next: me
|
|
1054
1052
|
}, s = s.next;
|
|
1055
|
-
var l =
|
|
1053
|
+
var l = t.styles + ";";
|
|
1056
1054
|
return l;
|
|
1057
1055
|
}
|
|
1058
|
-
return
|
|
1056
|
+
return Et(e, r, n);
|
|
1059
1057
|
}
|
|
1060
1058
|
case "function": {
|
|
1061
1059
|
if (e !== void 0) {
|
|
1062
|
-
var c =
|
|
1063
|
-
return
|
|
1060
|
+
var c = me, m = n(e);
|
|
1061
|
+
return me = c, $e(e, r, m);
|
|
1064
1062
|
}
|
|
1065
1063
|
break;
|
|
1066
1064
|
}
|
|
1067
1065
|
}
|
|
1068
|
-
var u =
|
|
1069
|
-
if (
|
|
1066
|
+
var u = n;
|
|
1067
|
+
if (r == null)
|
|
1070
1068
|
return u;
|
|
1071
|
-
var
|
|
1072
|
-
return
|
|
1069
|
+
var f = r[u];
|
|
1070
|
+
return f !== void 0 ? f : u;
|
|
1073
1071
|
}
|
|
1074
|
-
function
|
|
1075
|
-
var
|
|
1076
|
-
if (Array.isArray(
|
|
1077
|
-
for (var
|
|
1078
|
-
|
|
1072
|
+
function Et(e, r, n) {
|
|
1073
|
+
var i = "";
|
|
1074
|
+
if (Array.isArray(n))
|
|
1075
|
+
for (var a = 0; a < n.length; a++)
|
|
1076
|
+
i += $e(e, r, n[a]) + ";";
|
|
1079
1077
|
else
|
|
1080
|
-
for (var
|
|
1081
|
-
var s =
|
|
1078
|
+
for (var t in n) {
|
|
1079
|
+
var s = n[t];
|
|
1082
1080
|
if (typeof s != "object") {
|
|
1083
1081
|
var l = s;
|
|
1084
|
-
|
|
1085
|
-
} else if (Array.isArray(s) && typeof s[0] == "string" && (
|
|
1082
|
+
r != null && r[l] !== void 0 ? i += t + "{" + r[l] + "}" : mr(l) && (i += Xe(t) + ":" + yr(t, l) + ";");
|
|
1083
|
+
} else if (Array.isArray(s) && typeof s[0] == "string" && (r == null || r[s[0]] === void 0))
|
|
1086
1084
|
for (var c = 0; c < s.length; c++)
|
|
1087
|
-
|
|
1085
|
+
mr(s[c]) && (i += Xe(t) + ":" + yr(t, s[c]) + ";");
|
|
1088
1086
|
else {
|
|
1089
|
-
var
|
|
1090
|
-
switch (
|
|
1087
|
+
var m = $e(e, r, s);
|
|
1088
|
+
switch (t) {
|
|
1091
1089
|
case "animation":
|
|
1092
1090
|
case "animationName": {
|
|
1093
|
-
|
|
1091
|
+
i += Xe(t) + ":" + m + ";";
|
|
1094
1092
|
break;
|
|
1095
1093
|
}
|
|
1096
1094
|
default:
|
|
1097
|
-
|
|
1095
|
+
i += t + "{" + m + "}";
|
|
1098
1096
|
}
|
|
1099
1097
|
}
|
|
1100
1098
|
}
|
|
1101
|
-
return
|
|
1099
|
+
return i;
|
|
1102
1100
|
}
|
|
1103
|
-
var
|
|
1104
|
-
function
|
|
1101
|
+
var vr = /label:\s*([^\s;{]+)\s*(;|$)/g, me;
|
|
1102
|
+
function Pt(e, r, n) {
|
|
1105
1103
|
if (e.length === 1 && typeof e[0] == "object" && e[0] !== null && e[0].styles !== void 0)
|
|
1106
1104
|
return e[0];
|
|
1107
|
-
var
|
|
1108
|
-
|
|
1109
|
-
var
|
|
1110
|
-
if (
|
|
1111
|
-
|
|
1105
|
+
var i = !0, a = "";
|
|
1106
|
+
me = void 0;
|
|
1107
|
+
var t = e[0];
|
|
1108
|
+
if (t == null || t.raw === void 0)
|
|
1109
|
+
i = !1, a += $e(n, r, t);
|
|
1112
1110
|
else {
|
|
1113
|
-
var s =
|
|
1114
|
-
|
|
1111
|
+
var s = t;
|
|
1112
|
+
a += s[0];
|
|
1115
1113
|
}
|
|
1116
1114
|
for (var l = 1; l < e.length; l++)
|
|
1117
|
-
if (
|
|
1118
|
-
var c =
|
|
1119
|
-
|
|
1115
|
+
if (a += $e(n, r, e[l]), i) {
|
|
1116
|
+
var c = t;
|
|
1117
|
+
a += c[l];
|
|
1120
1118
|
}
|
|
1121
|
-
|
|
1122
|
-
for (var
|
|
1123
|
-
|
|
1124
|
-
var
|
|
1119
|
+
vr.lastIndex = 0;
|
|
1120
|
+
for (var m = "", u; (u = vr.exec(a)) !== null; )
|
|
1121
|
+
m += "-" + u[1];
|
|
1122
|
+
var f = xt(a) + m;
|
|
1125
1123
|
return {
|
|
1126
|
-
name:
|
|
1127
|
-
styles:
|
|
1128
|
-
next:
|
|
1124
|
+
name: f,
|
|
1125
|
+
styles: a,
|
|
1126
|
+
next: me
|
|
1129
1127
|
};
|
|
1130
1128
|
}
|
|
1131
|
-
var
|
|
1132
|
-
return
|
|
1133
|
-
},
|
|
1129
|
+
var It = function(r) {
|
|
1130
|
+
return r();
|
|
1131
|
+
}, St = xe.useInsertionEffect ? xe.useInsertionEffect : !1, Rt = St || It, Vr = /* @__PURE__ */ xe.createContext(
|
|
1134
1132
|
// we're doing this to avoid preconstruct's dead code elimination in this one case
|
|
1135
1133
|
// because this module is primarily intended for the browser and node
|
|
1136
1134
|
// but it's also required in react native and similar environments sometimes
|
|
1137
1135
|
// and we could have a special build just for that
|
|
1138
1136
|
// but this is much easier and the native packages
|
|
1139
1137
|
// might use a different theme context in the future anyway
|
|
1140
|
-
typeof HTMLElement < "u" ? /* @__PURE__ */
|
|
1138
|
+
typeof HTMLElement < "u" ? /* @__PURE__ */ mt({
|
|
1141
1139
|
key: "css"
|
|
1142
1140
|
}) : null
|
|
1143
1141
|
);
|
|
1144
|
-
|
|
1145
|
-
var
|
|
1146
|
-
return /* @__PURE__ */
|
|
1147
|
-
var
|
|
1148
|
-
return
|
|
1142
|
+
Vr.Provider;
|
|
1143
|
+
var Tt = function(r) {
|
|
1144
|
+
return /* @__PURE__ */ $r(function(n, i) {
|
|
1145
|
+
var a = _r(Vr);
|
|
1146
|
+
return r(n, a, i);
|
|
1149
1147
|
});
|
|
1150
|
-
},
|
|
1148
|
+
}, Ct = /* @__PURE__ */ xe.createContext({}), At = /^((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|popover|popoverTarget|popoverTargetAction|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)-.*))$/, kt = /* @__PURE__ */ Cr(
|
|
1151
1149
|
function(e) {
|
|
1152
|
-
return
|
|
1150
|
+
return At.test(e) || e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && e.charCodeAt(2) < 91;
|
|
1153
1151
|
}
|
|
1154
1152
|
/* Z+1 */
|
|
1155
|
-
),
|
|
1156
|
-
return
|
|
1157
|
-
},
|
|
1158
|
-
return typeof
|
|
1153
|
+
), Ot = kt, Vt = function(r) {
|
|
1154
|
+
return r !== "theme";
|
|
1155
|
+
}, gr = function(r) {
|
|
1156
|
+
return typeof r == "string" && // 96 is one less than the char code
|
|
1159
1157
|
// for "a" so this is checking that
|
|
1160
1158
|
// it's a lowercase character
|
|
1161
|
-
|
|
1162
|
-
},
|
|
1163
|
-
var
|
|
1164
|
-
if (
|
|
1165
|
-
var
|
|
1166
|
-
|
|
1167
|
-
return
|
|
1168
|
-
} :
|
|
1159
|
+
r.charCodeAt(0) > 96 ? Ot : Vt;
|
|
1160
|
+
}, xr = function(r, n, i) {
|
|
1161
|
+
var a;
|
|
1162
|
+
if (n) {
|
|
1163
|
+
var t = n.shouldForwardProp;
|
|
1164
|
+
a = r.__emotion_forwardProp && t ? function(s) {
|
|
1165
|
+
return r.__emotion_forwardProp(s) && t(s);
|
|
1166
|
+
} : t;
|
|
1169
1167
|
}
|
|
1170
|
-
return typeof
|
|
1171
|
-
},
|
|
1172
|
-
var
|
|
1173
|
-
return
|
|
1174
|
-
return
|
|
1168
|
+
return typeof a != "function" && i && (a = r.__emotion_forwardProp), a;
|
|
1169
|
+
}, Lt = function(r) {
|
|
1170
|
+
var n = r.cache, i = r.serialized, a = r.isStringTag;
|
|
1171
|
+
return kr(n, i, a), Rt(function() {
|
|
1172
|
+
return gt(n, i, a);
|
|
1175
1173
|
}), null;
|
|
1176
|
-
},
|
|
1177
|
-
var
|
|
1178
|
-
|
|
1179
|
-
var l =
|
|
1174
|
+
}, jt = function e(r, n) {
|
|
1175
|
+
var i = r.__emotion_real === r, a = i && r.__emotion_base || r, t, s;
|
|
1176
|
+
n !== void 0 && (t = n.label, s = n.target);
|
|
1177
|
+
var l = xr(r, n, i), c = l || gr(a), m = !c("as");
|
|
1180
1178
|
return function() {
|
|
1181
|
-
var u = arguments,
|
|
1182
|
-
if (
|
|
1183
|
-
|
|
1179
|
+
var u = arguments, f = i && r.__emotion_styles !== void 0 ? r.__emotion_styles.slice(0) : [];
|
|
1180
|
+
if (t !== void 0 && f.push("label:" + t + ";"), u[0] == null || u[0].raw === void 0)
|
|
1181
|
+
f.push.apply(f, u);
|
|
1184
1182
|
else {
|
|
1185
|
-
var
|
|
1186
|
-
|
|
1187
|
-
for (var
|
|
1188
|
-
|
|
1183
|
+
var _ = u[0];
|
|
1184
|
+
f.push(_[0]);
|
|
1185
|
+
for (var g = u.length, S = 1; S < g; S++)
|
|
1186
|
+
f.push(u[S], _[S]);
|
|
1189
1187
|
}
|
|
1190
|
-
var
|
|
1191
|
-
var L =
|
|
1188
|
+
var h = Tt(function(x, b, P) {
|
|
1189
|
+
var L = m && x.as || a, N = "", j = [], T = x;
|
|
1192
1190
|
if (x.theme == null) {
|
|
1193
|
-
|
|
1194
|
-
for (var
|
|
1195
|
-
|
|
1196
|
-
|
|
1191
|
+
T = {};
|
|
1192
|
+
for (var w in x)
|
|
1193
|
+
T[w] = x[w];
|
|
1194
|
+
T.theme = xe.useContext(Ct);
|
|
1197
1195
|
}
|
|
1198
|
-
typeof x.className == "string" ?
|
|
1199
|
-
var
|
|
1200
|
-
|
|
1201
|
-
var
|
|
1202
|
-
for (var
|
|
1203
|
-
|
|
1204
|
-
return
|
|
1205
|
-
cache:
|
|
1206
|
-
serialized:
|
|
1196
|
+
typeof x.className == "string" ? N = vt(b.registered, j, x.className) : x.className != null && (N = x.className + " ");
|
|
1197
|
+
var K = Pt(f.concat(j), b.registered, T);
|
|
1198
|
+
N += b.key + "-" + K.name, s !== void 0 && (N += " " + s);
|
|
1199
|
+
var U = m && l === void 0 ? gr(L) : c, d = {};
|
|
1200
|
+
for (var E in x)
|
|
1201
|
+
m && E === "as" || U(E) && (d[E] = x[E]);
|
|
1202
|
+
return d.className = N, P && (d.ref = P), /* @__PURE__ */ xe.createElement(xe.Fragment, null, /* @__PURE__ */ xe.createElement(Lt, {
|
|
1203
|
+
cache: b,
|
|
1204
|
+
serialized: K,
|
|
1207
1205
|
isStringTag: typeof L == "string"
|
|
1208
|
-
}), /* @__PURE__ */
|
|
1206
|
+
}), /* @__PURE__ */ xe.createElement(L, d));
|
|
1209
1207
|
});
|
|
1210
|
-
return
|
|
1208
|
+
return h.displayName = t !== void 0 ? t : "Styled(" + (typeof a == "string" ? a : a.displayName || a.name || "Component") + ")", h.defaultProps = r.defaultProps, h.__emotion_real = h, h.__emotion_base = a, h.__emotion_styles = f, h.__emotion_forwardProp = l, Object.defineProperty(h, "toString", {
|
|
1211
1209
|
value: function() {
|
|
1212
1210
|
return "." + s;
|
|
1213
1211
|
}
|
|
1214
|
-
}),
|
|
1215
|
-
var
|
|
1216
|
-
shouldForwardProp:
|
|
1212
|
+
}), h.withComponent = function(x, b) {
|
|
1213
|
+
var P = e(x, Ze({}, n, b, {
|
|
1214
|
+
shouldForwardProp: xr(h, b, !0)
|
|
1217
1215
|
}));
|
|
1218
|
-
return
|
|
1219
|
-
},
|
|
1216
|
+
return P.apply(void 0, f);
|
|
1217
|
+
}, h;
|
|
1220
1218
|
};
|
|
1221
|
-
},
|
|
1219
|
+
}, $t = [
|
|
1222
1220
|
"a",
|
|
1223
1221
|
"abbr",
|
|
1224
1222
|
"address",
|
|
@@ -1354,11 +1352,11 @@ var Tr = function(t) {
|
|
|
1354
1352
|
"svg",
|
|
1355
1353
|
"text",
|
|
1356
1354
|
"tspan"
|
|
1357
|
-
],
|
|
1358
|
-
|
|
1359
|
-
|
|
1355
|
+
], Ce = jt.bind(null);
|
|
1356
|
+
$t.forEach(function(e) {
|
|
1357
|
+
Ce[e] = Ce(e);
|
|
1360
1358
|
});
|
|
1361
|
-
const
|
|
1359
|
+
const Nt = Ce.div`
|
|
1362
1360
|
display: flex;
|
|
1363
1361
|
align-items: center;
|
|
1364
1362
|
justify-content: center;
|
|
@@ -1399,7 +1397,7 @@ const Fr = Re.div`
|
|
|
1399
1397
|
return "";
|
|
1400
1398
|
}
|
|
1401
1399
|
}}
|
|
1402
|
-
`,
|
|
1400
|
+
`, tr = ({ type: e, children: r, className: n, icon: i, action: a }) => Q.jsxs(Nt, { type: e, className: n, children: [i && Q.jsx("span", { children: i }), Q.jsx("span", { children: r }), a && Q.jsx("span", { children: a })] }), wr = Ce.div`
|
|
1403
1401
|
width: ${({ width: e }) => e || "100%"};
|
|
1404
1402
|
height: ${({ height: e }) => e || "100%"};
|
|
1405
1403
|
border-radius: 0px !important; /* Force remove rounded corners on container */
|
|
@@ -1410,8 +1408,8 @@ const Fr = Re.div`
|
|
|
1410
1408
|
z-index: 1002;
|
|
1411
1409
|
|
|
1412
1410
|
/* Hide specific elements inside the player */
|
|
1413
|
-
${({ $hiddenClasses: e }) => (e == null ? void 0 : e.length) && e.map((
|
|
1414
|
-
`,
|
|
1411
|
+
${({ $hiddenClasses: e }) => (e == null ? void 0 : e.length) && e.map((r) => `.${r} { display: none !important; }`).join("")}
|
|
1412
|
+
`, Ft = Ce.div`
|
|
1415
1413
|
position: fixed;
|
|
1416
1414
|
top: 0;
|
|
1417
1415
|
left: 0;
|
|
@@ -1423,304 +1421,268 @@ const Fr = Re.div`
|
|
|
1423
1421
|
align-items: center;
|
|
1424
1422
|
z-index: 1000;
|
|
1425
1423
|
pointer-events: auto;
|
|
1426
|
-
`,
|
|
1424
|
+
`, Dt = Ce.div`
|
|
1427
1425
|
position: relative;
|
|
1428
1426
|
max-width: 100vw;
|
|
1429
1427
|
aspect-ratio: 9 / 16;
|
|
1430
1428
|
height: auto;
|
|
1431
1429
|
z-index: 1001;
|
|
1432
1430
|
max-height: 100vh;
|
|
1433
|
-
`,
|
|
1434
|
-
const [
|
|
1431
|
+
`, Mt = (e, r) => `https://vp-api.gjirafa.tech/api/v2/projects/${e}/videos?search=${r}`, zt = (e) => `https://host.vpplayer.tech/playlist/${e}`, Bt = (e) => `https://host.vpplayer.tech/player/${e}/vpplayer.js`, or = (e, r) => `vp-player-${e || "default"}-${r || ""}`, Je = /* @__PURE__ */ new Map(), Ut = (e, r) => {
|
|
1432
|
+
const [n, i] = de(!1), [a, t] = de(null);
|
|
1435
1433
|
return Se(() => {
|
|
1436
1434
|
let s = null, l, c = 0;
|
|
1437
|
-
const
|
|
1435
|
+
const m = 3;
|
|
1438
1436
|
let u;
|
|
1439
1437
|
try {
|
|
1440
|
-
u =
|
|
1441
|
-
} catch (
|
|
1442
|
-
const
|
|
1443
|
-
|
|
1438
|
+
u = r || Bt(e || "latest");
|
|
1439
|
+
} catch (g) {
|
|
1440
|
+
const S = g instanceof Error ? g.message : String(g);
|
|
1441
|
+
t(`Failed to resolve script URL: ${S}`), i(!1);
|
|
1444
1442
|
return;
|
|
1445
1443
|
}
|
|
1446
1444
|
if (Je.get(u)) {
|
|
1447
|
-
|
|
1445
|
+
i(!0), t(null);
|
|
1448
1446
|
return;
|
|
1449
1447
|
}
|
|
1450
1448
|
if (document.querySelector(`script[src="${u}"]`)) {
|
|
1451
|
-
Je.set(u, !0),
|
|
1449
|
+
Je.set(u, !0), i(!0), t(null);
|
|
1452
1450
|
return;
|
|
1453
1451
|
}
|
|
1454
|
-
const
|
|
1452
|
+
const _ = () => {
|
|
1455
1453
|
s = document.createElement("script"), s.src = u, s.async = !0, l = window.setTimeout(() => {
|
|
1456
|
-
|
|
1454
|
+
i(!1), t(`Loading script timed out: ${u}`);
|
|
1457
1455
|
}, 1e4), s.onload = () => {
|
|
1458
|
-
clearTimeout(l), Je.set(u, !0),
|
|
1456
|
+
clearTimeout(l), Je.set(u, !0), i(!0), t(null);
|
|
1459
1457
|
}, s.onerror = () => {
|
|
1460
|
-
clearTimeout(l), c++, c <
|
|
1458
|
+
clearTimeout(l), c++, c < m ? setTimeout(_, 1e3 * c) : (i(!1), t(`Failed to load VP Player script after ${m} attempts: ${u}`));
|
|
1461
1459
|
}, document.body.appendChild(s);
|
|
1462
1460
|
};
|
|
1463
|
-
return
|
|
1461
|
+
return _(), () => {
|
|
1464
1462
|
clearTimeout(l), s && document.body.contains(s) && document.body.removeChild(s);
|
|
1465
1463
|
};
|
|
1466
|
-
}, [e,
|
|
1467
|
-
},
|
|
1468
|
-
const [
|
|
1464
|
+
}, [e, r]), { isLoaded: n, error: a };
|
|
1465
|
+
}, ze = /* @__PURE__ */ new Map(), qt = 3e4, Qe = 5, Wt = ({ projectId: e, videoId: r, playlistId: n, videoUrl: i }) => {
|
|
1466
|
+
const [a, t] = de(null), [s, l] = de(null), [c, m] = de(!1), [u, f] = de(null);
|
|
1469
1467
|
return Se(() => {
|
|
1470
|
-
const
|
|
1471
|
-
if (
|
|
1472
|
-
|
|
1468
|
+
const _ = r ? `video:${r}` : n ? `playlist:${n}` : null;
|
|
1469
|
+
if (i || !r && !n) {
|
|
1470
|
+
t(i || null), l(null), m(!1), f(null);
|
|
1473
1471
|
return;
|
|
1474
1472
|
}
|
|
1475
|
-
if (!
|
|
1476
|
-
|
|
1473
|
+
if (r && !e) {
|
|
1474
|
+
m(!1), f("projectId is required for single video fetch");
|
|
1477
1475
|
return;
|
|
1478
1476
|
}
|
|
1479
|
-
if (
|
|
1480
|
-
const
|
|
1481
|
-
|
|
1477
|
+
if (_ && ze.has(_)) {
|
|
1478
|
+
const P = ze.get(_);
|
|
1479
|
+
t(P.url), l(P.playlist), m(!1), f(null);
|
|
1482
1480
|
return;
|
|
1483
1481
|
}
|
|
1484
|
-
let
|
|
1485
|
-
const
|
|
1486
|
-
var
|
|
1487
|
-
if (!
|
|
1482
|
+
let g = !0;
|
|
1483
|
+
const S = new AbortController(), h = S.signal, b = setTimeout(async () => {
|
|
1484
|
+
var L, N;
|
|
1485
|
+
if (!g)
|
|
1488
1486
|
return;
|
|
1489
|
-
|
|
1490
|
-
let
|
|
1491
|
-
for (;
|
|
1487
|
+
m(!0), f(null);
|
|
1488
|
+
let P = 0;
|
|
1489
|
+
for (; P < Qe && g; )
|
|
1492
1490
|
try {
|
|
1493
|
-
const
|
|
1491
|
+
const j = r && !n ? Mt(e, r) : zt(n), T = setTimeout(() => S.abort(), qt), K = await fetch(j, {
|
|
1494
1492
|
method: "GET",
|
|
1495
1493
|
headers: {
|
|
1496
|
-
"api-key": _,
|
|
1497
1494
|
Accept: "application/json",
|
|
1498
1495
|
"Cache-Control": "no-cache"
|
|
1499
|
-
// Prevent caching issues
|
|
1500
1496
|
},
|
|
1501
|
-
signal:
|
|
1497
|
+
signal: h
|
|
1502
1498
|
});
|
|
1503
|
-
if (clearTimeout(
|
|
1504
|
-
throw new Error(`Fetch failed with status ${
|
|
1505
|
-
const
|
|
1506
|
-
if (!
|
|
1499
|
+
if (clearTimeout(T), !K.ok)
|
|
1500
|
+
throw new Error(`Fetch failed with status ${K.status}`);
|
|
1501
|
+
const U = await K.json();
|
|
1502
|
+
if (!g)
|
|
1507
1503
|
return;
|
|
1508
|
-
if (
|
|
1509
|
-
const
|
|
1510
|
-
if (!(
|
|
1504
|
+
if (r && !n) {
|
|
1505
|
+
const d = (N = (L = U.result) == null ? void 0 : L.items) == null ? void 0 : N.find((E) => E.mediaId === r);
|
|
1506
|
+
if (!(d != null && d.playbackUrl))
|
|
1511
1507
|
throw new Error("Invalid video data");
|
|
1512
|
-
|
|
1508
|
+
t(d.playbackUrl), l(null), _ && ze.set(_, { url: d.playbackUrl, playlist: null });
|
|
1513
1509
|
} else {
|
|
1514
|
-
|
|
1510
|
+
const d = U.videos;
|
|
1511
|
+
if (!Array.isArray(d))
|
|
1515
1512
|
throw new Error("Invalid playlist format");
|
|
1516
|
-
|
|
1517
|
-
method: "GET",
|
|
1518
|
-
headers: {
|
|
1519
|
-
"api-key": _,
|
|
1520
|
-
Accept: "application/json",
|
|
1521
|
-
"Cache-Control": "no-cache"
|
|
1522
|
-
},
|
|
1523
|
-
signal: w
|
|
1524
|
-
});
|
|
1525
|
-
if (D.ok) {
|
|
1526
|
-
const U = await D.json();
|
|
1527
|
-
let M = [...P.result];
|
|
1528
|
-
if ((b = U.result) != null && b.playlistBackupState && ((Q = U.result) != null && Q.playlistBackupId)) {
|
|
1529
|
-
const W = bt(e, U.result.playlistBackupId), z = await fetch(W, {
|
|
1530
|
-
method: "GET",
|
|
1531
|
-
headers: {
|
|
1532
|
-
"api-key": _,
|
|
1533
|
-
Accept: "application/json",
|
|
1534
|
-
"Cache-Control": "no-cache"
|
|
1535
|
-
},
|
|
1536
|
-
signal: w
|
|
1537
|
-
});
|
|
1538
|
-
if (z.ok) {
|
|
1539
|
-
const p = await z.json();
|
|
1540
|
-
if (Array.isArray(p.result)) {
|
|
1541
|
-
const o = p.result.map((m) => ({
|
|
1542
|
-
...m,
|
|
1543
|
-
isBackupPlaylist: !0
|
|
1544
|
-
}));
|
|
1545
|
-
M = [...M, ...o];
|
|
1546
|
-
}
|
|
1547
|
-
}
|
|
1548
|
-
}
|
|
1549
|
-
c(M), s(null), E && Ve.set(E, { url: null, playlist: M });
|
|
1550
|
-
} else
|
|
1551
|
-
c(P.result), s(null), E && Ve.set(E, { url: null, playlist: P.result });
|
|
1513
|
+
l(d), t(null), _ && ze.set(_, { url: null, playlist: d });
|
|
1552
1514
|
}
|
|
1553
1515
|
break;
|
|
1554
|
-
} catch (
|
|
1555
|
-
if (
|
|
1556
|
-
|
|
1516
|
+
} catch (j) {
|
|
1517
|
+
if (h.aborted) {
|
|
1518
|
+
g && f("Request timed out");
|
|
1557
1519
|
break;
|
|
1558
1520
|
}
|
|
1559
|
-
if (
|
|
1560
|
-
const
|
|
1561
|
-
|
|
1521
|
+
if (P++, P >= Qe) {
|
|
1522
|
+
const T = j instanceof Error ? j.message : String(j);
|
|
1523
|
+
g && f(`Failed after ${Qe} attempts: ${T}`);
|
|
1562
1524
|
} else
|
|
1563
|
-
await new Promise((
|
|
1525
|
+
await new Promise((T) => setTimeout(T, 2e3));
|
|
1564
1526
|
}
|
|
1565
|
-
|
|
1527
|
+
g && m(!1);
|
|
1566
1528
|
}, 100);
|
|
1567
1529
|
return () => {
|
|
1568
|
-
|
|
1530
|
+
g = !1, clearTimeout(b), S.abort();
|
|
1569
1531
|
};
|
|
1570
|
-
}, [
|
|
1571
|
-
},
|
|
1572
|
-
const s =
|
|
1532
|
+
}, [e, r, n, i]), { fetchedPlaybackUrl: a, fetchedPlaylist: s, isLoading: c, error: u };
|
|
1533
|
+
}, Yt = ({ playerId: e, playerInstanceRef: r, playerRef: n, videoData: i, trackingMetadata: a, callbacks: t }) => {
|
|
1534
|
+
const s = ee(!1), l = ee(!1), c = ee(!1), m = ee(0), u = ee({}), f = ee(null), _ = ee(null), g = ee(null), S = ee(null), h = ee(!1);
|
|
1573
1535
|
Se(() => {
|
|
1574
|
-
if (!(
|
|
1536
|
+
if (!(t && (t.onPlayerStart || t.onPlayerPlay || t.onPlayerPause || t.onPlayerResume || t.onPlayerEnd || t.onPlayerProgressEvery10Seconds || t.onPlayerProgressAt20Seconds || t.onPlayerQuartile25 || t.onPlayerQuartile50 || t.onPlayerQuartile75 || t.onPlayerNext || t.onPlayerPrevious || t.onPlayerEvent)))
|
|
1575
1537
|
return;
|
|
1576
1538
|
(() => {
|
|
1577
|
-
s.current = !1, l.current = !1, c.current = !1,
|
|
1539
|
+
s.current = !1, l.current = !1, c.current = !1, m.current = 0, u.current = {};
|
|
1578
1540
|
})();
|
|
1579
|
-
const
|
|
1580
|
-
var
|
|
1581
|
-
const
|
|
1582
|
-
if (!
|
|
1541
|
+
const P = () => {
|
|
1542
|
+
var M;
|
|
1543
|
+
const d = document.getElementById(e);
|
|
1544
|
+
if (!d)
|
|
1583
1545
|
return null;
|
|
1584
|
-
if (
|
|
1585
|
-
const
|
|
1586
|
-
if (
|
|
1587
|
-
return
|
|
1588
|
-
const
|
|
1589
|
-
if (
|
|
1590
|
-
return
|
|
1546
|
+
if (d.querySelectorAll("video").length > 1 && r.current) {
|
|
1547
|
+
const W = r.current, Y = W.videoIndex ?? ((M = W.playlist) == null ? void 0 : M.playlistVideoIndex) ?? 0, z = d.querySelector(`video[id="${Y}"]`);
|
|
1548
|
+
if (z)
|
|
1549
|
+
return z;
|
|
1550
|
+
const $ = d.querySelector("video.active");
|
|
1551
|
+
if ($)
|
|
1552
|
+
return $;
|
|
1591
1553
|
}
|
|
1592
|
-
return
|
|
1554
|
+
return d.querySelector("video");
|
|
1593
1555
|
}, L = () => {
|
|
1594
|
-
const
|
|
1595
|
-
if (!
|
|
1556
|
+
const d = P();
|
|
1557
|
+
if (!d)
|
|
1596
1558
|
return !1;
|
|
1597
|
-
const
|
|
1598
|
-
var
|
|
1599
|
-
const
|
|
1559
|
+
const E = (p, v) => {
|
|
1560
|
+
var y, R, F, H, fe, V, Z, pe, te, be, Fe, le, we, ve;
|
|
1561
|
+
const o = Date.now();
|
|
1600
1562
|
if (!(p === "player_start" && s.current)) {
|
|
1601
|
-
switch (
|
|
1563
|
+
switch (S.current = { type: p, time: o }, p) {
|
|
1602
1564
|
case "player_start":
|
|
1603
|
-
(
|
|
1565
|
+
(y = t.onPlayerStart) == null || y.call(t, p);
|
|
1604
1566
|
break;
|
|
1605
1567
|
case "player_play":
|
|
1606
|
-
(
|
|
1568
|
+
(R = t.onPlayerPlay) == null || R.call(t, p);
|
|
1607
1569
|
break;
|
|
1608
1570
|
case "player_pause":
|
|
1609
|
-
(
|
|
1571
|
+
(F = t.onPlayerPause) == null || F.call(t, p);
|
|
1610
1572
|
break;
|
|
1611
1573
|
case "player_resume":
|
|
1612
|
-
(
|
|
1574
|
+
(H = t.onPlayerResume) == null || H.call(t, p);
|
|
1613
1575
|
break;
|
|
1614
1576
|
case "player_end":
|
|
1615
|
-
(
|
|
1577
|
+
(fe = t.onPlayerEnd) == null || fe.call(t, p);
|
|
1616
1578
|
break;
|
|
1617
1579
|
case "player_progress_every_10_seconds":
|
|
1618
|
-
|
|
1580
|
+
v !== void 0 && ((V = t.onPlayerProgressEvery10Seconds) == null || V.call(t, p, v));
|
|
1619
1581
|
break;
|
|
1620
1582
|
case "player_progress_at_20_seconds":
|
|
1621
|
-
|
|
1583
|
+
v !== void 0 && ((Z = t.onPlayerProgressAt20Seconds) == null || Z.call(t, p, v));
|
|
1622
1584
|
break;
|
|
1623
1585
|
case "player_quartile_25":
|
|
1624
|
-
|
|
1586
|
+
v !== void 0 && ((pe = t.onPlayerQuartile25) == null || pe.call(t, p, v));
|
|
1625
1587
|
break;
|
|
1626
1588
|
case "player_quartile_50":
|
|
1627
|
-
|
|
1589
|
+
v !== void 0 && ((te = t.onPlayerQuartile50) == null || te.call(t, p, v));
|
|
1628
1590
|
break;
|
|
1629
1591
|
case "player_quartile_75":
|
|
1630
|
-
|
|
1592
|
+
v !== void 0 && ((be = t.onPlayerQuartile75) == null || be.call(t, p, v));
|
|
1631
1593
|
break;
|
|
1632
1594
|
case "player_next":
|
|
1633
|
-
(
|
|
1595
|
+
(Fe = t.onPlayerNext) == null || Fe.call(t, p);
|
|
1634
1596
|
break;
|
|
1635
1597
|
case "player_previous":
|
|
1636
|
-
(
|
|
1598
|
+
(le = t.onPlayerPrevious) == null || le.call(t, p);
|
|
1637
1599
|
break;
|
|
1638
1600
|
}
|
|
1639
|
-
|
|
1601
|
+
v !== 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") ? (we = t.onPlayerEvent) == null || we.call(t, p, v) : (ve = t.onPlayerEvent) == null || ve.call(t, p);
|
|
1640
1602
|
}
|
|
1641
|
-
},
|
|
1642
|
-
s.current || (
|
|
1643
|
-
!l.current && !
|
|
1603
|
+
}, M = () => {
|
|
1604
|
+
s.current || (E("player_start"), s.current = !0, d.readyState >= 2 && !d.paused && setTimeout(() => {
|
|
1605
|
+
!l.current && !d.paused && (E("player_play"), l.current = !0, c.current = !1);
|
|
1644
1606
|
}, 100));
|
|
1645
|
-
},
|
|
1646
|
-
c.current ?
|
|
1647
|
-
},
|
|
1648
|
-
|
|
1607
|
+
}, W = () => {
|
|
1608
|
+
c.current ? E("player_resume") : l.current ? E("player_play") : (E("player_play"), l.current = !0), c.current = !1;
|
|
1609
|
+
}, Y = () => {
|
|
1610
|
+
d.ended || h.current || setTimeout(() => {
|
|
1649
1611
|
var p;
|
|
1650
|
-
if (!
|
|
1651
|
-
if (
|
|
1652
|
-
const
|
|
1653
|
-
if ((
|
|
1612
|
+
if (!h.current) {
|
|
1613
|
+
if (r.current && _.current !== null) {
|
|
1614
|
+
const v = r.current;
|
|
1615
|
+
if ((v.videoIndex ?? ((p = v.playlist) == null ? void 0 : p.playlistVideoIndex) ?? 0) !== _.current)
|
|
1654
1616
|
return;
|
|
1655
1617
|
}
|
|
1656
|
-
|
|
1618
|
+
E("player_pause"), c.current = !0;
|
|
1657
1619
|
}
|
|
1658
1620
|
}, 200);
|
|
1659
|
-
},
|
|
1660
|
-
|
|
1661
|
-
},
|
|
1662
|
-
s.current && !l.current &&
|
|
1663
|
-
const p =
|
|
1664
|
-
|
|
1621
|
+
}, z = () => {
|
|
1622
|
+
E("player_end");
|
|
1623
|
+
}, $ = () => {
|
|
1624
|
+
s.current && !l.current && d.currentTime >= 1 && d.currentTime < 1.5 && !d.paused && (E("player_play"), l.current = !0, c.current = !1);
|
|
1625
|
+
const p = d.duration > 0 ? d.currentTime / d.duration * 100 : 0, v = Math.floor(d.currentTime);
|
|
1626
|
+
v - m.current >= 10 && (m.current = v, E("player_progress_every_10_seconds", v)), v >= 20 && !u.current[20] && (u.current[20] = !0, E("player_progress_at_20_seconds", v)), p >= 25 && !u.current[25] && (u.current[25] = !0, E("player_quartile_25", v)), p >= 50 && !u.current[50] && (u.current[50] = !0, E("player_quartile_50", v)), p >= 75 && !u.current[75] && (u.current[75] = !0, E("player_quartile_75", v));
|
|
1665
1627
|
};
|
|
1666
|
-
if (
|
|
1667
|
-
const p =
|
|
1668
|
-
p.removeEventListener("loadedmetadata",
|
|
1628
|
+
if (g.current && g.current !== d) {
|
|
1629
|
+
const p = g.current;
|
|
1630
|
+
p.removeEventListener("loadedmetadata", M), p.removeEventListener("play", W), p.removeEventListener("pause", Y), p.removeEventListener("ended", z), p.removeEventListener("timeupdate", $);
|
|
1669
1631
|
}
|
|
1670
|
-
|
|
1671
|
-
const
|
|
1672
|
-
const
|
|
1673
|
-
(
|
|
1674
|
-
|
|
1675
|
-
}, 500)), (
|
|
1676
|
-
|
|
1632
|
+
g.current = d, d.addEventListener("loadedmetadata", M), d.addEventListener("play", W), d.addEventListener("pause", Y), d.addEventListener("ended", z), d.addEventListener("timeupdate", $), d.readyState >= 1 && M();
|
|
1633
|
+
const q = document.getElementById(e), C = (p) => {
|
|
1634
|
+
const v = p.target;
|
|
1635
|
+
(v.closest(".vp-next") || v.closest(".vrt-icon-down") || v.closest(".vrt-arrow.vrt-icon-down")) && (h.current = !0, E("player_next"), setTimeout(() => {
|
|
1636
|
+
h.current = !1;
|
|
1637
|
+
}, 500)), (v.closest(".vp-prev") || v.closest(".vp-previous") || v.closest(".vrt-icon-up") || v.closest(".vrt-arrow.vrt-icon-up")) && (h.current = !0, E("player_previous"), setTimeout(() => {
|
|
1638
|
+
h.current = !1;
|
|
1677
1639
|
}, 500));
|
|
1678
1640
|
};
|
|
1679
|
-
return
|
|
1680
|
-
const p =
|
|
1681
|
-
p.removeEventListener("loadedmetadata",
|
|
1641
|
+
return q && q.addEventListener("click", C, !0), f.current = () => {
|
|
1642
|
+
const p = g.current || d;
|
|
1643
|
+
p.removeEventListener("loadedmetadata", M), p.removeEventListener("play", W), p.removeEventListener("pause", Y), p.removeEventListener("ended", z), p.removeEventListener("timeupdate", $), q == null || q.removeEventListener("click", C, !0), g.current = null;
|
|
1682
1644
|
}, !0;
|
|
1683
1645
|
};
|
|
1684
|
-
let
|
|
1685
|
-
const
|
|
1686
|
-
if (!
|
|
1646
|
+
let N = null, j = !1;
|
|
1647
|
+
const T = () => {
|
|
1648
|
+
if (!r.current)
|
|
1687
1649
|
return;
|
|
1688
|
-
const
|
|
1689
|
-
|
|
1690
|
-
var
|
|
1650
|
+
const d = r.current, E = document.getElementById(e), M = E == null ? void 0 : E.querySelectorAll("video");
|
|
1651
|
+
M && M.length > 1 && d.videoIndex !== void 0 && (N = window.setInterval(() => {
|
|
1652
|
+
var Y, z, $, q;
|
|
1691
1653
|
try {
|
|
1692
|
-
const
|
|
1693
|
-
if (
|
|
1694
|
-
const p =
|
|
1695
|
-
|
|
1654
|
+
const C = d.videoIndex ?? ((Y = d.playlist) == null ? void 0 : Y.playlistVideoIndex) ?? 0;
|
|
1655
|
+
if (_.current !== null && C !== _.current) {
|
|
1656
|
+
const p = C > _.current, v = p ? "player_next" : "player_previous";
|
|
1657
|
+
t && !h.current && (p ? (z = t.onPlayerNext) == null || z.call(t, v) : ($ = t.onPlayerPrevious) == null || $.call(t, v), (q = t.onPlayerEvent) == null || q.call(t, v)), h.current = !0, f.current && (f.current(), f.current = null), s.current = !1, l.current = !1, c.current = !1, m.current = 0, u.current = {}, g.current = null, setTimeout(() => {
|
|
1696
1658
|
L(), setTimeout(() => {
|
|
1697
|
-
|
|
1659
|
+
h.current = !1;
|
|
1698
1660
|
}, 200);
|
|
1699
1661
|
}, 100);
|
|
1700
1662
|
}
|
|
1701
|
-
|
|
1663
|
+
_.current = C;
|
|
1702
1664
|
} catch {
|
|
1703
1665
|
}
|
|
1704
1666
|
}, 500));
|
|
1705
1667
|
};
|
|
1706
|
-
let
|
|
1707
|
-
const
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
}, 1e3)) :
|
|
1668
|
+
let w = 0;
|
|
1669
|
+
const K = 20, U = setInterval(() => {
|
|
1670
|
+
w++, L() && !j ? (j = !0, clearInterval(U), setTimeout(() => {
|
|
1671
|
+
T();
|
|
1672
|
+
}, 1e3)) : w >= K && clearInterval(U);
|
|
1711
1673
|
}, 500);
|
|
1712
1674
|
return () => {
|
|
1713
|
-
clearInterval(
|
|
1675
|
+
clearInterval(U), N !== null && (clearInterval(N), N = null), f.current && (f.current(), f.current = null);
|
|
1714
1676
|
};
|
|
1715
1677
|
}, [
|
|
1716
1678
|
e,
|
|
1717
|
-
a,
|
|
1718
1679
|
i,
|
|
1719
|
-
|
|
1680
|
+
a,
|
|
1720
1681
|
t,
|
|
1721
|
-
r
|
|
1682
|
+
r,
|
|
1683
|
+
n
|
|
1722
1684
|
]);
|
|
1723
|
-
},
|
|
1685
|
+
}, Ht = {
|
|
1724
1686
|
projectId: "vp-player-projectId",
|
|
1725
1687
|
// this is used only if prop projectId is not provided
|
|
1726
1688
|
video: {
|
|
@@ -1774,20 +1736,21 @@ const Fr = Re.div`
|
|
|
1774
1736
|
// Enabled by default
|
|
1775
1737
|
}
|
|
1776
1738
|
}
|
|
1777
|
-
},
|
|
1739
|
+
}, Ie = "vp-player-project", Gt = ({
|
|
1778
1740
|
videoUrl: e,
|
|
1779
|
-
fetchedPlaybackUrl:
|
|
1780
|
-
fetchedPlaylist:
|
|
1781
|
-
projectId:
|
|
1782
|
-
config:
|
|
1783
|
-
isVerticalPlayer:
|
|
1741
|
+
fetchedPlaybackUrl: r,
|
|
1742
|
+
fetchedPlaylist: n,
|
|
1743
|
+
projectId: i,
|
|
1744
|
+
config: a = {},
|
|
1745
|
+
isVerticalPlayer: t
|
|
1784
1746
|
// Distinguish between VP Player types
|
|
1785
1747
|
}) => {
|
|
1786
|
-
var u,
|
|
1787
|
-
const s = { ...
|
|
1748
|
+
var u, f, _, g, S, h, x, b, P, L, N, j, T, w, K, U, d, E, M, W, Y, z;
|
|
1749
|
+
const s = { ...Ht, ...a }, l = { ...s.config, ...a.config };
|
|
1788
1750
|
if (e)
|
|
1789
1751
|
return {
|
|
1790
1752
|
...s,
|
|
1753
|
+
projectId: i || Ie,
|
|
1791
1754
|
video: {
|
|
1792
1755
|
...s.video,
|
|
1793
1756
|
file: e,
|
|
@@ -1795,444 +1758,443 @@ const Fr = Re.div`
|
|
|
1795
1758
|
},
|
|
1796
1759
|
config: l
|
|
1797
1760
|
};
|
|
1798
|
-
if (
|
|
1761
|
+
if (r)
|
|
1799
1762
|
return {
|
|
1800
1763
|
...s,
|
|
1764
|
+
projectId: i || Ie,
|
|
1801
1765
|
video: {
|
|
1802
1766
|
...s.video,
|
|
1803
|
-
file:
|
|
1767
|
+
file: r,
|
|
1804
1768
|
playlist: void 0
|
|
1805
1769
|
},
|
|
1806
1770
|
config: l
|
|
1807
1771
|
};
|
|
1808
|
-
if (
|
|
1809
|
-
const
|
|
1810
|
-
return
|
|
1772
|
+
if (n && n.length > 0) {
|
|
1773
|
+
const $ = ((f = (u = a == null ? void 0 : a.video) == null ? void 0 : u.playlist) == null ? void 0 : f.playlistVideoIndex) ?? ((_ = a == null ? void 0 : a.config) == null ? void 0 : _.playlistVideoIndex) ?? 0;
|
|
1774
|
+
return t ? {
|
|
1811
1775
|
...s,
|
|
1812
|
-
projectId:
|
|
1776
|
+
projectId: i || Ie,
|
|
1813
1777
|
video: {
|
|
1814
1778
|
...s.video,
|
|
1815
1779
|
// Set first video file (index 0) to avoid VP Player duplication
|
|
1816
|
-
videoId: (
|
|
1780
|
+
videoId: (g = n[0]) == null ? void 0 : g.mediaId,
|
|
1817
1781
|
// Add videoId for tracking
|
|
1818
|
-
file: (
|
|
1819
|
-
title: (
|
|
1782
|
+
file: (S = n[0]) == null ? void 0 : S.hlsUrl,
|
|
1783
|
+
title: (h = n[0]) == null ? void 0 : h.title,
|
|
1820
1784
|
// thumbnail: fetchedPlaylist[0]?.thumbnailUrl,
|
|
1821
1785
|
playlist: {
|
|
1822
1786
|
state: !0,
|
|
1823
1787
|
playlistId: "",
|
|
1824
1788
|
// Will be set by API
|
|
1825
1789
|
// Use original playlistVideoIndex - VP Player will navigate to it
|
|
1826
|
-
playlistVideoIndex: Number(
|
|
1790
|
+
playlistVideoIndex: Number($),
|
|
1827
1791
|
// Remove first video from playlist to avoid duplication (already in file)
|
|
1828
|
-
videos:
|
|
1829
|
-
videoId:
|
|
1792
|
+
videos: n.slice(1).map((C, p) => ({
|
|
1793
|
+
videoId: C.mediaId || String(p + 1),
|
|
1830
1794
|
// Use mediaId if available
|
|
1831
|
-
title:
|
|
1832
|
-
file:
|
|
1833
|
-
thumbnailUrl:
|
|
1834
|
-
duration:
|
|
1795
|
+
title: C.title,
|
|
1796
|
+
file: C.hlsUrl,
|
|
1797
|
+
thumbnailUrl: C.thumbnailUrl,
|
|
1798
|
+
duration: C.duration
|
|
1835
1799
|
}))
|
|
1836
1800
|
}
|
|
1837
1801
|
},
|
|
1838
1802
|
config: l
|
|
1839
1803
|
} : {
|
|
1840
1804
|
...s,
|
|
1841
|
-
projectId:
|
|
1805
|
+
projectId: i || Ie,
|
|
1842
1806
|
video: {
|
|
1843
1807
|
...s.video,
|
|
1844
|
-
videoId: ((x =
|
|
1808
|
+
videoId: ((x = n[Number($)]) == null ? void 0 : x.mediaId) || ((b = n[0]) == null ? void 0 : b.mediaId),
|
|
1845
1809
|
// Add videoId for tracking
|
|
1846
|
-
file: ((
|
|
1847
|
-
title: ((
|
|
1848
|
-
thumbnail: ((
|
|
1810
|
+
file: ((P = n[Number($)]) == null ? void 0 : P.hlsUrl) || ((L = n[0]) == null ? void 0 : L.hlsUrl) || "",
|
|
1811
|
+
title: ((N = n[Number($)]) == null ? void 0 : N.title) || ((j = n[0]) == null ? void 0 : j.title),
|
|
1812
|
+
thumbnail: ((T = n[Number($)]) == null ? void 0 : T.thumbnailUrl) || ((w = n[0]) == null ? void 0 : w.thumbnailUrl),
|
|
1849
1813
|
playlist: {
|
|
1850
1814
|
state: !0,
|
|
1851
1815
|
// playlistVideoIndex: String(userPlaylistVideoIndex), this has been bug, fixed, now int
|
|
1852
|
-
playlistVideoIndex: Number(
|
|
1853
|
-
videos:
|
|
1854
|
-
videoId:
|
|
1816
|
+
playlistVideoIndex: Number($),
|
|
1817
|
+
videos: n.map((C, p) => ({
|
|
1818
|
+
videoId: C.mediaId || String(p),
|
|
1855
1819
|
// Use mediaId if available
|
|
1856
|
-
title:
|
|
1857
|
-
file:
|
|
1858
|
-
thumbnailUrl:
|
|
1859
|
-
duration:
|
|
1820
|
+
title: C.title,
|
|
1821
|
+
file: C.hlsUrl,
|
|
1822
|
+
thumbnailUrl: C.thumbnailUrl,
|
|
1823
|
+
duration: C.duration
|
|
1860
1824
|
}))
|
|
1861
1825
|
}
|
|
1862
1826
|
},
|
|
1863
1827
|
config: l
|
|
1864
1828
|
};
|
|
1865
1829
|
}
|
|
1866
|
-
const c = ((
|
|
1867
|
-
if (
|
|
1830
|
+
const c = ((K = a == null ? void 0 : a.video) == null ? void 0 : K.playlist) || s.video.playlist, m = (U = a == null ? void 0 : a.video) == null ? void 0 : U.file;
|
|
1831
|
+
if (m)
|
|
1868
1832
|
return {
|
|
1869
1833
|
...s,
|
|
1834
|
+
projectId: i || Ie,
|
|
1870
1835
|
video: {
|
|
1871
1836
|
...s.video,
|
|
1872
|
-
file:
|
|
1837
|
+
file: m,
|
|
1873
1838
|
playlist: void 0
|
|
1874
1839
|
// No playlist, just one video
|
|
1875
1840
|
},
|
|
1876
1841
|
config: l
|
|
1877
1842
|
};
|
|
1878
1843
|
if (c != null && c.videos && c.videos.length > 0) {
|
|
1879
|
-
const
|
|
1844
|
+
const $ = ((E = (d = a == null ? void 0 : a.video) == null ? void 0 : d.playlist) == null ? void 0 : E.playlistVideoIndex) ?? ((M = a == null ? void 0 : a.config) == null ? void 0 : M.playlistVideoIndex) ?? 0;
|
|
1880
1845
|
return {
|
|
1881
1846
|
...s,
|
|
1847
|
+
projectId: i || Ie,
|
|
1882
1848
|
video: {
|
|
1883
1849
|
...s.video,
|
|
1884
|
-
|
|
1850
|
+
videoId: (W = c.videos[0]) == null ? void 0 : W.videoId,
|
|
1851
|
+
file: ((Y = c.videos[0]) == null ? void 0 : Y.file) || "",
|
|
1852
|
+
title: (z = c.videos[0]) == null ? void 0 : z.title,
|
|
1885
1853
|
playlist: {
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
playlistVideoIndex: Number(c.playlistVideoIndex || 0),
|
|
1854
|
+
state: !0,
|
|
1855
|
+
playlistId: "",
|
|
1856
|
+
playlistVideoIndex: Number($),
|
|
1890
1857
|
videos: c.videos
|
|
1891
1858
|
}
|
|
1892
1859
|
},
|
|
1893
|
-
config:
|
|
1894
|
-
...s.config,
|
|
1895
|
-
...i == null ? void 0 : i.config
|
|
1896
|
-
}
|
|
1860
|
+
config: l
|
|
1897
1861
|
};
|
|
1898
1862
|
}
|
|
1899
1863
|
throw new Error("No valid video source found. Provide videoUrl, videoId, playlistId, or config with video.file or playlist.");
|
|
1900
|
-
},
|
|
1864
|
+
}, Xt = (e) => {
|
|
1901
1865
|
if (!e)
|
|
1902
1866
|
return;
|
|
1903
|
-
const
|
|
1904
|
-
return
|
|
1905
|
-
},
|
|
1906
|
-
const
|
|
1907
|
-
projectId:
|
|
1908
|
-
videoId:
|
|
1909
|
-
playlistId:
|
|
1910
|
-
videoUrl:
|
|
1911
|
-
|
|
1912
|
-
}), X = ot(e, p), [de, N] = ce(void 0);
|
|
1867
|
+
const r = /https:\/\/host\.vpplayer\.tech\/player\/([^/]+)\/([^/]+)(?:\/[^/]+)?\.js/, n = e.match(r);
|
|
1868
|
+
return n ? n[2] : void 0;
|
|
1869
|
+
}, Jt = ({ playerId: e, videoId: r, version: n, videoUrl: i, projectId: a, playlistId: t, scriptUrl: s, config: l = {}, isReels: c = !1, onPlaylistData: m, onVideoStarted: u, trackingMetadata: f, onPlayerStart: _, onPlayerPlay: g, onPlayerPause: S, onPlayerResume: h, onPlayerEnd: x, onPlayerProgressEvery10Seconds: b, onPlayerProgressAt20Seconds: P, onPlayerQuartile25: L, onPlayerQuartile50: N, onPlayerQuartile75: j, onPlayerNext: T, onPlayerPrevious: w, onPlayerEvent: K }) => {
|
|
1870
|
+
const U = ee(null), d = ee(null), E = ee(!1), M = ee(""), W = ee([]), Y = ee([]), z = ee(null), { isLoaded: $, error: q } = Ut(n, s), C = r || Xt(s), [p, v] = de(null), { fetchedPlaybackUrl: o, fetchedPlaylist: y, isLoading: R, error: F } = Wt({
|
|
1871
|
+
projectId: a,
|
|
1872
|
+
videoId: C,
|
|
1873
|
+
playlistId: t,
|
|
1874
|
+
videoUrl: i
|
|
1875
|
+
}), H = or(e, C), [fe, V] = de(void 0);
|
|
1913
1876
|
Se(() => {
|
|
1914
|
-
|
|
1915
|
-
}, [
|
|
1916
|
-
playerId:
|
|
1917
|
-
playerInstanceRef:
|
|
1918
|
-
playerRef:
|
|
1919
|
-
videoData:
|
|
1920
|
-
trackingMetadata:
|
|
1877
|
+
y && m && m(y);
|
|
1878
|
+
}, [y, m]), Yt({
|
|
1879
|
+
playerId: H,
|
|
1880
|
+
playerInstanceRef: d,
|
|
1881
|
+
playerRef: U,
|
|
1882
|
+
videoData: fe,
|
|
1883
|
+
trackingMetadata: f,
|
|
1921
1884
|
callbacks: {
|
|
1922
1885
|
onPlayerStart: _,
|
|
1923
|
-
onPlayerPlay:
|
|
1924
|
-
onPlayerPause:
|
|
1925
|
-
onPlayerResume:
|
|
1926
|
-
onPlayerEnd:
|
|
1927
|
-
onPlayerProgressEvery10Seconds:
|
|
1928
|
-
onPlayerProgressAt20Seconds:
|
|
1929
|
-
onPlayerQuartile25:
|
|
1930
|
-
onPlayerQuartile50:
|
|
1931
|
-
onPlayerQuartile75:
|
|
1932
|
-
onPlayerNext:
|
|
1933
|
-
onPlayerPrevious:
|
|
1934
|
-
onPlayerEvent:
|
|
1886
|
+
onPlayerPlay: g,
|
|
1887
|
+
onPlayerPause: S,
|
|
1888
|
+
onPlayerResume: h,
|
|
1889
|
+
onPlayerEnd: x,
|
|
1890
|
+
onPlayerProgressEvery10Seconds: b,
|
|
1891
|
+
onPlayerProgressAt20Seconds: P,
|
|
1892
|
+
onPlayerQuartile25: L,
|
|
1893
|
+
onPlayerQuartile50: N,
|
|
1894
|
+
onPlayerQuartile75: j,
|
|
1895
|
+
onPlayerNext: T,
|
|
1896
|
+
onPlayerPrevious: w,
|
|
1897
|
+
onPlayerEvent: K
|
|
1935
1898
|
}
|
|
1936
1899
|
});
|
|
1937
|
-
const
|
|
1938
|
-
const
|
|
1900
|
+
const pe = br(() => {
|
|
1901
|
+
const te = l.config || {}, be = c && !te.size ? { sizeType: "RESPONSIVE", aspectRatio: "9:16" } : te.size || { sizeType: "FIXED", width: "100%" };
|
|
1939
1902
|
return {
|
|
1940
1903
|
...l,
|
|
1941
1904
|
config: {
|
|
1942
|
-
...
|
|
1943
|
-
size:
|
|
1905
|
+
...te,
|
|
1906
|
+
size: be
|
|
1944
1907
|
}
|
|
1945
1908
|
};
|
|
1946
|
-
}, [l,
|
|
1909
|
+
}, [l, c]);
|
|
1947
1910
|
return Se(() => {
|
|
1948
|
-
if (
|
|
1949
|
-
|
|
1911
|
+
if (q) {
|
|
1912
|
+
v(q);
|
|
1950
1913
|
return;
|
|
1951
1914
|
}
|
|
1952
|
-
if (
|
|
1915
|
+
if (!$ || R && !i)
|
|
1953
1916
|
return;
|
|
1954
|
-
let
|
|
1955
|
-
const
|
|
1917
|
+
let te = !0;
|
|
1918
|
+
const Fe = setTimeout(async () => {
|
|
1956
1919
|
try {
|
|
1957
|
-
|
|
1958
|
-
const
|
|
1959
|
-
playerId:
|
|
1960
|
-
videoId:
|
|
1961
|
-
playlistId:
|
|
1962
|
-
videoUrl:
|
|
1963
|
-
fetchedPlaybackUrl:
|
|
1920
|
+
W.current.forEach((oe) => clearInterval(oe)), W.current = [], Y.current.forEach((oe) => clearTimeout(oe)), Y.current = [], z.current = null;
|
|
1921
|
+
const le = (y == null ? void 0 : y.length) ?? 0, we = JSON.stringify({
|
|
1922
|
+
playerId: H,
|
|
1923
|
+
videoId: r || C,
|
|
1924
|
+
playlistId: t,
|
|
1925
|
+
videoUrl: i,
|
|
1926
|
+
fetchedPlaybackUrl: o,
|
|
1964
1927
|
scriptUrl: s,
|
|
1965
|
-
isReels:
|
|
1966
|
-
projectId:
|
|
1967
|
-
playlistLength:
|
|
1928
|
+
isReels: c,
|
|
1929
|
+
projectId: a,
|
|
1930
|
+
playlistLength: le
|
|
1968
1931
|
});
|
|
1969
|
-
if (
|
|
1932
|
+
if (E.current && d.current && M.current === we)
|
|
1970
1933
|
return;
|
|
1971
|
-
|
|
1972
|
-
const
|
|
1973
|
-
if (document.querySelectorAll('[id*="player"]').forEach((
|
|
1974
|
-
var Pe,
|
|
1975
|
-
const
|
|
1976
|
-
if (
|
|
1934
|
+
M.current !== we && (E.current = !1, M.current = we);
|
|
1935
|
+
const ve = s == null ? void 0 : s.includes("vertical-player");
|
|
1936
|
+
if (document.querySelectorAll('[id*="player"]').forEach((oe) => {
|
|
1937
|
+
var Pe, A;
|
|
1938
|
+
const _e = oe.id;
|
|
1939
|
+
if (_e !== H)
|
|
1977
1940
|
try {
|
|
1978
|
-
const
|
|
1979
|
-
|
|
1980
|
-
} catch (
|
|
1981
|
-
console.warn(`Failed to destroy existing player ${
|
|
1941
|
+
const I = ve ? (Pe = window.vpVerticalPlayer) == null ? void 0 : Pe.call(window, _e) : (A = window.vpPlayer) == null ? void 0 : A.call(window, _e);
|
|
1942
|
+
I != null && I.destroy && I.destroy();
|
|
1943
|
+
} catch (I) {
|
|
1944
|
+
console.warn(`Failed to destroy existing player ${_e}:`, I);
|
|
1982
1945
|
}
|
|
1983
|
-
}), await new Promise((
|
|
1946
|
+
}), await new Promise((oe) => setTimeout(oe, 100)), !te || !U.current)
|
|
1984
1947
|
return;
|
|
1985
|
-
if (!document.getElementById(
|
|
1986
|
-
|
|
1948
|
+
if (!document.getElementById(H)) {
|
|
1949
|
+
v("DOM element not found after cleanup.");
|
|
1987
1950
|
return;
|
|
1988
1951
|
}
|
|
1989
1952
|
if (!window.vpPlayer && !window.vpVerticalPlayer) {
|
|
1990
|
-
|
|
1953
|
+
v("VP Player script not loaded.");
|
|
1991
1954
|
return;
|
|
1992
1955
|
}
|
|
1993
|
-
const
|
|
1994
|
-
if (!
|
|
1995
|
-
|
|
1956
|
+
const sr = ve ? window.vpVerticalPlayer : window.vpPlayer;
|
|
1957
|
+
if (!sr) {
|
|
1958
|
+
v(`VP ${ve ? "Vertical " : ""}Player script not loaded.`);
|
|
1996
1959
|
return;
|
|
1997
1960
|
}
|
|
1998
|
-
const
|
|
1999
|
-
videoUrl:
|
|
2000
|
-
fetchedPlaybackUrl:
|
|
2001
|
-
fetchedPlaylist:
|
|
2002
|
-
projectId:
|
|
2003
|
-
config:
|
|
2004
|
-
isVerticalPlayer:
|
|
1961
|
+
const ge = Gt({
|
|
1962
|
+
videoUrl: i,
|
|
1963
|
+
fetchedPlaybackUrl: o ?? void 0,
|
|
1964
|
+
fetchedPlaylist: y ?? void 0,
|
|
1965
|
+
projectId: a,
|
|
1966
|
+
config: pe,
|
|
1967
|
+
isVerticalPlayer: ve
|
|
2005
1968
|
// Pass player type to config builder
|
|
2006
|
-
}), G =
|
|
1969
|
+
}), G = sr(H);
|
|
2007
1970
|
if (!G) {
|
|
2008
|
-
|
|
1971
|
+
v(`Failed to create VP ${ve ? "Vertical " : ""}Player instance.`);
|
|
2009
1972
|
return;
|
|
2010
1973
|
}
|
|
2011
|
-
if (
|
|
2012
|
-
const
|
|
2013
|
-
var
|
|
2014
|
-
const
|
|
2015
|
-
if (
|
|
2016
|
-
const
|
|
2017
|
-
|
|
2018
|
-
} else
|
|
2019
|
-
return
|
|
1974
|
+
if (te && U.current && (G.setup(ge), d.current = G, E.current = !0, v(null), u && G.on)) {
|
|
1975
|
+
const oe = () => {
|
|
1976
|
+
var I, D, X;
|
|
1977
|
+
const A = {};
|
|
1978
|
+
if ((D = (I = ge.video) == null ? void 0 : I.playlist) != null && D.videos && ge.video.playlist.videos.length > 0) {
|
|
1979
|
+
const ae = G.videoIndex ?? ((X = G.playlist) == null ? void 0 : X.playlistVideoIndex) ?? 0, B = ge.video.playlist.videos[ae];
|
|
1980
|
+
B && (A.title = B.title, A.file = B.file || B.hlsUrl, A.hlsUrl = B.file || B.hlsUrl, A.thumbnailUrl = B.thumbnailUrl, A.duration = B.duration, A.videoIndex = ae, A.playlistVideoIndex = ae, A.videoId = B.videoId || B.mediaId, A.mediaId = B.mediaId || B.videoId);
|
|
1981
|
+
} else ge.video && (A.title = ge.video.title, A.file = ge.video.file, A.hlsUrl = ge.video.file, A.thumbnailUrl = ge.video.thumbnail, A.videoId = r || C, A.videoIndex = 0, A.playlistVideoIndex = 0, G.getDuration && (A.duration = G.getDuration()));
|
|
1982
|
+
return A;
|
|
2020
1983
|
};
|
|
2021
|
-
let
|
|
1984
|
+
let _e = null;
|
|
2022
1985
|
const Pe = async () => {
|
|
2023
|
-
var
|
|
1986
|
+
var A;
|
|
2024
1987
|
try {
|
|
2025
|
-
|
|
2026
|
-
let
|
|
2027
|
-
const
|
|
2028
|
-
if (
|
|
1988
|
+
_e && clearTimeout(_e), await new Promise((ae) => setTimeout(ae, 100));
|
|
1989
|
+
let I = oe();
|
|
1990
|
+
const D = I.videoId || I.mediaId;
|
|
1991
|
+
if (D && D === z.current)
|
|
2029
1992
|
return;
|
|
2030
|
-
if (
|
|
2031
|
-
|
|
2032
|
-
}, 500),
|
|
1993
|
+
if (_e = window.setTimeout(() => {
|
|
1994
|
+
z.current = null;
|
|
1995
|
+
}, 500), (s == null ? void 0 : s.includes("vertical-player")) && D)
|
|
2033
1996
|
try {
|
|
2034
|
-
const
|
|
2035
|
-
if (
|
|
2036
|
-
const
|
|
2037
|
-
|
|
2038
|
-
...
|
|
2039
|
-
title:
|
|
2040
|
-
description:
|
|
2041
|
-
publishDate:
|
|
2042
|
-
projectId:
|
|
2043
|
-
premium: ((
|
|
2044
|
-
author:
|
|
2045
|
-
tags:
|
|
1997
|
+
const Ee = `https://host.vpplayer.tech/player/ptkzurnx/${D}.json`, B = await fetch(Ee);
|
|
1998
|
+
if (B.ok) {
|
|
1999
|
+
const ne = await B.json();
|
|
2000
|
+
ne && ne.video && (I = {
|
|
2001
|
+
...I,
|
|
2002
|
+
title: ne.video.title || I.title,
|
|
2003
|
+
description: ne.video.description,
|
|
2004
|
+
publishDate: ne.video.publishDate,
|
|
2005
|
+
projectId: ne.projectId || I.projectId,
|
|
2006
|
+
premium: ((A = ne.video.videoLocking) == null ? void 0 : A.isEnabled) || !1,
|
|
2007
|
+
author: ne.video.author,
|
|
2008
|
+
tags: ne.video.tags || []
|
|
2046
2009
|
});
|
|
2047
2010
|
}
|
|
2048
2011
|
} catch {
|
|
2049
2012
|
}
|
|
2050
|
-
|
|
2051
|
-
} catch (
|
|
2052
|
-
console.warn("Error in video-started handler:",
|
|
2013
|
+
z.current = D || null, V(I), u(I);
|
|
2014
|
+
} catch (I) {
|
|
2015
|
+
console.warn("Error in video-started handler:", I);
|
|
2053
2016
|
}
|
|
2054
2017
|
};
|
|
2055
|
-
if (
|
|
2056
|
-
let
|
|
2057
|
-
const
|
|
2058
|
-
if (!
|
|
2059
|
-
|
|
2018
|
+
if (ve) {
|
|
2019
|
+
let A = !1, I = -1;
|
|
2020
|
+
const D = () => {
|
|
2021
|
+
if (!A) {
|
|
2022
|
+
A = !0;
|
|
2060
2023
|
try {
|
|
2061
2024
|
G.on && G.on("vp-video-started", Pe), setTimeout(() => {
|
|
2062
|
-
Pe(),
|
|
2025
|
+
Pe(), I = G.videoIndex ?? 0;
|
|
2063
2026
|
}, 500);
|
|
2064
|
-
} catch (
|
|
2065
|
-
console.error("Error setting up event listeners:",
|
|
2027
|
+
} catch (B) {
|
|
2028
|
+
console.error("Error setting up event listeners:", B);
|
|
2066
2029
|
}
|
|
2067
2030
|
}
|
|
2068
2031
|
};
|
|
2069
|
-
let
|
|
2070
|
-
const
|
|
2032
|
+
let X = 0;
|
|
2033
|
+
const ae = 15, Ee = setInterval(() => {
|
|
2071
2034
|
try {
|
|
2072
|
-
const
|
|
2073
|
-
if (!
|
|
2074
|
-
|
|
2035
|
+
const B = G.videoIndex !== void 0 || G.playlist;
|
|
2036
|
+
if (!A)
|
|
2037
|
+
X++, (B || X >= ae) && D();
|
|
2075
2038
|
else {
|
|
2076
|
-
const
|
|
2077
|
-
|
|
2039
|
+
const ne = G.videoIndex ?? 0;
|
|
2040
|
+
ne !== I && I !== -1 && (I = ne, Pe());
|
|
2078
2041
|
}
|
|
2079
2042
|
} catch {
|
|
2080
2043
|
}
|
|
2081
2044
|
}, 200);
|
|
2082
|
-
|
|
2045
|
+
W.current.push(Ee);
|
|
2083
2046
|
try {
|
|
2084
|
-
G.on && G.on("vp-listen-ready",
|
|
2047
|
+
G.on && G.on("vp-listen-ready", D);
|
|
2085
2048
|
} catch {
|
|
2086
2049
|
}
|
|
2087
2050
|
} else {
|
|
2088
|
-
const
|
|
2089
|
-
var
|
|
2051
|
+
const A = async (I) => {
|
|
2052
|
+
var D, X;
|
|
2090
2053
|
try {
|
|
2091
|
-
const
|
|
2092
|
-
if (!
|
|
2093
|
-
return
|
|
2094
|
-
const
|
|
2095
|
-
if (!
|
|
2096
|
-
return console.warn("Failed to fetch full video config:",
|
|
2097
|
-
const
|
|
2098
|
-
return !
|
|
2099
|
-
videoId:
|
|
2100
|
-
title:
|
|
2101
|
-
description:
|
|
2102
|
-
file:
|
|
2103
|
-
hlsUrl:
|
|
2104
|
-
thumbnailUrl:
|
|
2105
|
-
duration:
|
|
2106
|
-
publishDate:
|
|
2107
|
-
projectId:
|
|
2108
|
-
premium: ((
|
|
2109
|
-
author:
|
|
2110
|
-
tags:
|
|
2054
|
+
const ae = s == null ? void 0 : s.match(/player\/([^/.]+)/), Ee = ae == null ? void 0 : ae[1];
|
|
2055
|
+
if (!Ee || !I)
|
|
2056
|
+
return oe();
|
|
2057
|
+
const B = `https://host.vpplayer.tech/player/${Ee}/${I}.json`, ne = await fetch(B);
|
|
2058
|
+
if (!ne.ok)
|
|
2059
|
+
return console.warn("Failed to fetch full video config:", ne.status), oe();
|
|
2060
|
+
const ue = await ne.json();
|
|
2061
|
+
return !ue || !ue.video ? oe() : {
|
|
2062
|
+
videoId: I,
|
|
2063
|
+
title: ue.video.title,
|
|
2064
|
+
description: ue.video.description,
|
|
2065
|
+
file: ue.video.file,
|
|
2066
|
+
hlsUrl: ue.video.file,
|
|
2067
|
+
thumbnailUrl: ue.video.thumbnail,
|
|
2068
|
+
duration: ue.video.duration,
|
|
2069
|
+
publishDate: ue.video.publishDate,
|
|
2070
|
+
projectId: ue.projectId,
|
|
2071
|
+
premium: ((D = ue.video.videoLocking) == null ? void 0 : D.isEnabled) || !1,
|
|
2072
|
+
author: ue.video.author,
|
|
2073
|
+
tags: ue.video.tags || [],
|
|
2111
2074
|
videoIndex: G.videoIndex ?? 0,
|
|
2112
|
-
playlistVideoIndex: ((
|
|
2075
|
+
playlistVideoIndex: ((X = G.playlist) == null ? void 0 : X.playlistVideoIndex) ?? 0
|
|
2113
2076
|
};
|
|
2114
|
-
} catch (
|
|
2115
|
-
return console.warn("Error fetching full video data:",
|
|
2077
|
+
} catch (ae) {
|
|
2078
|
+
return console.warn("Error fetching full video data:", ae), oe();
|
|
2116
2079
|
}
|
|
2117
2080
|
};
|
|
2118
|
-
G.on("ready", async (
|
|
2081
|
+
G.on("ready", async (I) => {
|
|
2119
2082
|
try {
|
|
2120
|
-
const
|
|
2121
|
-
if (
|
|
2122
|
-
const
|
|
2123
|
-
|
|
2083
|
+
const D = (I == null ? void 0 : I.id) || r || C;
|
|
2084
|
+
if (D) {
|
|
2085
|
+
const X = await A(D);
|
|
2086
|
+
V(X), u(X);
|
|
2124
2087
|
} else {
|
|
2125
|
-
const
|
|
2126
|
-
(
|
|
2088
|
+
const X = oe();
|
|
2089
|
+
(X.title || X.file) && (V(X), u(X));
|
|
2127
2090
|
}
|
|
2128
|
-
} catch (
|
|
2129
|
-
console.warn("Error in ready handler:",
|
|
2091
|
+
} catch (D) {
|
|
2092
|
+
console.warn("Error in ready handler:", D);
|
|
2130
2093
|
}
|
|
2131
|
-
}), G.on("playlistItem", async (
|
|
2094
|
+
}), G.on("playlistItem", async (I) => {
|
|
2132
2095
|
try {
|
|
2133
|
-
const
|
|
2134
|
-
if (
|
|
2135
|
-
const
|
|
2136
|
-
|
|
2096
|
+
const D = I == null ? void 0 : I.id;
|
|
2097
|
+
if (D) {
|
|
2098
|
+
const X = await A(D);
|
|
2099
|
+
V(X), u(X);
|
|
2137
2100
|
}
|
|
2138
|
-
} catch (
|
|
2139
|
-
console.warn("Error in playlistItem handler:",
|
|
2101
|
+
} catch (D) {
|
|
2102
|
+
console.warn("Error in playlistItem handler:", D);
|
|
2140
2103
|
}
|
|
2141
2104
|
});
|
|
2142
2105
|
}
|
|
2143
2106
|
}
|
|
2144
|
-
} catch (
|
|
2145
|
-
if (
|
|
2146
|
-
const
|
|
2147
|
-
|
|
2107
|
+
} catch (le) {
|
|
2108
|
+
if (te) {
|
|
2109
|
+
const we = le instanceof Error ? le.message : String(le);
|
|
2110
|
+
v(we), console.error("VP Player initialization error:", le);
|
|
2148
2111
|
}
|
|
2149
2112
|
}
|
|
2150
2113
|
}, 150);
|
|
2151
2114
|
return () => {
|
|
2152
|
-
|
|
2115
|
+
te = !1, clearTimeout(Fe), W.current.forEach((le) => clearInterval(le)), W.current = [], Y.current.forEach((le) => clearTimeout(le)), Y.current = [], E.current = !1;
|
|
2153
2116
|
};
|
|
2154
2117
|
}, [
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2118
|
+
$,
|
|
2119
|
+
R,
|
|
2120
|
+
H,
|
|
2121
|
+
q,
|
|
2159
2122
|
s
|
|
2160
2123
|
]), Se(() => () => {
|
|
2161
|
-
if (
|
|
2124
|
+
if (d.current) {
|
|
2162
2125
|
try {
|
|
2163
|
-
|
|
2164
|
-
} catch (
|
|
2165
|
-
console.warn(`Failed to destroy player ${
|
|
2126
|
+
d.current.destroy && d.current.destroy();
|
|
2127
|
+
} catch (be) {
|
|
2128
|
+
console.warn(`Failed to destroy player ${H}:`, be);
|
|
2166
2129
|
}
|
|
2167
|
-
|
|
2130
|
+
d.current = null;
|
|
2168
2131
|
}
|
|
2169
|
-
|
|
2170
|
-
const
|
|
2171
|
-
|
|
2172
|
-
}, [
|
|
2173
|
-
playerRef:
|
|
2174
|
-
playerInstanceRef:
|
|
2175
|
-
isScriptLoaded:
|
|
2176
|
-
isLoading:
|
|
2177
|
-
error:
|
|
2132
|
+
E.current = !1;
|
|
2133
|
+
const te = document.getElementById(H);
|
|
2134
|
+
te && (te.innerHTML = "");
|
|
2135
|
+
}, [H]), {
|
|
2136
|
+
playerRef: U,
|
|
2137
|
+
playerInstanceRef: d,
|
|
2138
|
+
isScriptLoaded: $,
|
|
2139
|
+
isLoading: R,
|
|
2140
|
+
error: F || p || q
|
|
2178
2141
|
};
|
|
2179
|
-
},
|
|
2180
|
-
var
|
|
2181
|
-
const { playerRef:
|
|
2142
|
+
}, Qt = ({ playerId: e, videoId: r, version: n, videoUrl: i, projectId: a, playlistId: t, scriptUrl: s, config: l = {}, isReels: c = !1, hiddenClasses: m = [], onClose: u, className: f, onPlaylistData: _, onVideoStarted: g, trackingMetadata: S, onPlayerStart: h, onPlayerPlay: x, onPlayerPause: b, onPlayerResume: P, onPlayerEnd: L, onPlayerProgressEvery10Seconds: N, onPlayerProgressAt20Seconds: j, onPlayerQuartile25: T, onPlayerQuartile50: w, onPlayerQuartile75: K, onPlayerNext: U, onPlayerPrevious: d, onPlayerEvent: E }) => {
|
|
2143
|
+
var F, H, fe, V;
|
|
2144
|
+
const { playerRef: M, playerInstanceRef: W, isScriptLoaded: Y, isLoading: z, error: $ } = Jt({
|
|
2182
2145
|
playerId: e,
|
|
2183
|
-
videoId:
|
|
2184
|
-
version:
|
|
2185
|
-
videoUrl:
|
|
2186
|
-
projectId:
|
|
2187
|
-
playlistId:
|
|
2146
|
+
videoId: r,
|
|
2147
|
+
version: n,
|
|
2148
|
+
videoUrl: i,
|
|
2149
|
+
projectId: a,
|
|
2150
|
+
playlistId: t,
|
|
2188
2151
|
scriptUrl: s,
|
|
2189
2152
|
config: l,
|
|
2190
|
-
|
|
2191
|
-
isReels: y,
|
|
2153
|
+
isReels: c,
|
|
2192
2154
|
onPlaylistData: _,
|
|
2193
|
-
onVideoStarted:
|
|
2194
|
-
trackingMetadata:
|
|
2195
|
-
onPlayerStart:
|
|
2196
|
-
onPlayerPlay:
|
|
2197
|
-
onPlayerPause:
|
|
2198
|
-
onPlayerResume:
|
|
2199
|
-
onPlayerEnd:
|
|
2200
|
-
onPlayerProgressEvery10Seconds:
|
|
2201
|
-
onPlayerProgressAt20Seconds:
|
|
2202
|
-
onPlayerQuartile25:
|
|
2203
|
-
onPlayerQuartile50:
|
|
2204
|
-
onPlayerQuartile75:
|
|
2205
|
-
onPlayerNext:
|
|
2206
|
-
onPlayerPrevious:
|
|
2207
|
-
onPlayerEvent:
|
|
2208
|
-
}), [
|
|
2209
|
-
var Z,
|
|
2210
|
-
|
|
2211
|
-
},
|
|
2212
|
-
return
|
|
2213
|
-
},
|
|
2214
|
-
const [
|
|
2155
|
+
onVideoStarted: g,
|
|
2156
|
+
trackingMetadata: S,
|
|
2157
|
+
onPlayerStart: h,
|
|
2158
|
+
onPlayerPlay: x,
|
|
2159
|
+
onPlayerPause: b,
|
|
2160
|
+
onPlayerResume: P,
|
|
2161
|
+
onPlayerEnd: L,
|
|
2162
|
+
onPlayerProgressEvery10Seconds: N,
|
|
2163
|
+
onPlayerProgressAt20Seconds: j,
|
|
2164
|
+
onPlayerQuartile25: T,
|
|
2165
|
+
onPlayerQuartile50: w,
|
|
2166
|
+
onPlayerQuartile75: K,
|
|
2167
|
+
onPlayerNext: U,
|
|
2168
|
+
onPlayerPrevious: d,
|
|
2169
|
+
onPlayerEvent: E
|
|
2170
|
+
}), [q, C] = de(!0), p = () => c && C(!0), v = () => {
|
|
2171
|
+
var Z, pe;
|
|
2172
|
+
C(!1), (pe = (Z = W.current) == null ? void 0 : Z.play) == null || pe.call(Z), u == null || u();
|
|
2173
|
+
}, o = (H = (F = l == null ? void 0 : l.config) == null ? void 0 : F.size) != null && H.width ? typeof l.config.size.width == "number" ? `${l.config.size.width}px` : l.config.size.width : void 0, y = (V = (fe = l == null ? void 0 : l.config) == null ? void 0 : fe.size) != null && V.height ? typeof l.config.size.height == "number" ? `${l.config.size.height}px` : l.config.size.height : void 0, R = or(e, r);
|
|
2174
|
+
return $ ? Q.jsxs(tr, { type: "error", children: ["An error occurred: ", $] }) : z || !Y ? Q.jsx(tr, { type: "loading", children: "Loading..." }) : Q.jsxs(Q.Fragment, { children: [c && !q ? Q.jsx("div", { onClick: p }) : null, !c && Q.jsx("div", { children: Q.jsx(wr, { id: R, ref: M, width: o || "100%", height: y || "auto", $hiddenClasses: m, className: f }) }, R), c && q && Q.jsx(Ft, { onClick: v, className: f, children: Q.jsx(Dt, { className: f, onClick: (Z) => Z.stopPropagation(), children: Q.jsx("div", { children: Q.jsx(wr, { id: R, ref: M, width: "100%", height: "auto", $hiddenClasses: m, className: f }) }, R) }) })] });
|
|
2175
|
+
}, Lr = Nr(void 0), rn = ({ children: e }) => {
|
|
2176
|
+
const [r, n] = de(!1), [i, a] = de(null), [t, s] = de(null), l = lr((u) => {
|
|
2215
2177
|
try {
|
|
2216
|
-
const
|
|
2217
|
-
|
|
2178
|
+
const f = or(u.playerId, u.videoId);
|
|
2179
|
+
a({ ...u, playerId: f }), n(!0), s(null);
|
|
2218
2180
|
} catch {
|
|
2219
2181
|
s("Failed to show player.");
|
|
2220
2182
|
}
|
|
2221
|
-
}, []), c =
|
|
2222
|
-
|
|
2223
|
-
}, []),
|
|
2183
|
+
}, []), c = lr(() => {
|
|
2184
|
+
n(!1), a(null), s(null);
|
|
2185
|
+
}, []), m = br(() => ({
|
|
2224
2186
|
showPlayer: l,
|
|
2225
2187
|
hidePlayer: c,
|
|
2226
|
-
isPlayerVisible:
|
|
2227
|
-
playerParams:
|
|
2228
|
-
}), [l, c,
|
|
2229
|
-
return
|
|
2230
|
-
},
|
|
2231
|
-
const e =
|
|
2188
|
+
isPlayerVisible: r,
|
|
2189
|
+
playerParams: i
|
|
2190
|
+
}), [l, c, r, i]);
|
|
2191
|
+
return Q.jsxs(Lr.Provider, { value: m, children: [e, t && Q.jsx(tr, { type: "error", children: t }), r && (i == null ? void 0 : i.playerId) && Q.jsx(Qt, { playerId: i.playerId, videoId: i.videoId, projectId: i.projectId, videoUrl: i.videoUrl, version: i.version, playlistId: i.playlistId, scriptUrl: i.scriptUrl, config: i.config, isReels: i.isReels, thumbnailUrl: i.thumbnailUrl, onClose: c, hiddenClasses: i.hiddenClasses || [], className: i.className })] });
|
|
2192
|
+
}, tn = () => {
|
|
2193
|
+
const e = _r(Lr);
|
|
2232
2194
|
if (!e)
|
|
2233
2195
|
throw new Error("useVPPlayer must be used within a VPPlayerProvider");
|
|
2234
2196
|
return e;
|
|
2235
|
-
},
|
|
2197
|
+
}, nn = {
|
|
2236
2198
|
projectId: "vp-player-projectId",
|
|
2237
2199
|
video: {
|
|
2238
2200
|
file: "",
|
|
@@ -2265,17 +2227,17 @@ const Fr = Re.div`
|
|
|
2265
2227
|
shareButton: !0
|
|
2266
2228
|
}
|
|
2267
2229
|
}
|
|
2268
|
-
},
|
|
2230
|
+
}, an = {
|
|
2269
2231
|
config: {
|
|
2270
2232
|
autostartOnLoad: { state: !0, onMobile: !0, onData: !0 },
|
|
2271
2233
|
muted: !0
|
|
2272
2234
|
}
|
|
2273
|
-
},
|
|
2235
|
+
}, on = {
|
|
2274
2236
|
config: {
|
|
2275
2237
|
autoplay: !0,
|
|
2276
2238
|
muted: !0
|
|
2277
2239
|
}
|
|
2278
|
-
},
|
|
2240
|
+
}, Ke = {
|
|
2279
2241
|
video: {
|
|
2280
2242
|
advertising: !0,
|
|
2281
2243
|
ads: {
|
|
@@ -2286,48 +2248,48 @@ const Fr = Re.div`
|
|
|
2286
2248
|
adAnnouncement: { state: !0, timeBeforeAd: 5 },
|
|
2287
2249
|
adsRequireInteraction: !1
|
|
2288
2250
|
}
|
|
2289
|
-
},
|
|
2290
|
-
var
|
|
2251
|
+
}, sn = (e, r, n = "time", i = 0) => {
|
|
2252
|
+
var a;
|
|
2291
2253
|
return {
|
|
2292
|
-
...
|
|
2254
|
+
...Ke,
|
|
2293
2255
|
video: {
|
|
2294
|
-
...
|
|
2256
|
+
...Ke.video,
|
|
2295
2257
|
ads: {
|
|
2296
|
-
...(
|
|
2258
|
+
...(a = Ke.video) == null ? void 0 : a.ads,
|
|
2297
2259
|
adBreaks: [
|
|
2298
2260
|
{
|
|
2299
|
-
adTagUrl:
|
|
2261
|
+
adTagUrl: r,
|
|
2300
2262
|
breakType: e,
|
|
2301
|
-
breakTimingType:
|
|
2302
|
-
breakTimingValue:
|
|
2263
|
+
breakTimingType: n,
|
|
2264
|
+
breakTimingValue: i
|
|
2303
2265
|
}
|
|
2304
2266
|
]
|
|
2305
2267
|
}
|
|
2306
2268
|
}
|
|
2307
2269
|
};
|
|
2308
|
-
},
|
|
2270
|
+
}, ln = "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4", un = "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4", cn = "https://videos.pexels.com/video-files/4678261/4678261-hd_1080_1920_25fps.mp4", dn = "https://images.pexels.com/videos/4678261/pexels-photo-4678261.jpeg?auto=compress&cs=tinysrgb&w=600", fn = "https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/single_ad_samples&ciu_szs=300x250&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ct%3Dlinear&correlator=", pn = "https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/single_ad_samples&ciu_szs=300x250&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ct%3Dskippablelinear&correlator=";
|
|
2309
2271
|
export {
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2272
|
+
fn as AD_TAG_LINEAR_URL,
|
|
2273
|
+
pn as AD_TAG_SKIPPABLE_LINEAR_URL,
|
|
2274
|
+
ln as BIG_BUCK_BUNNY_URL,
|
|
2275
|
+
un as ELEPHANTS_DREAM_URL,
|
|
2276
|
+
Ft as Overlay,
|
|
2277
|
+
dn as PEXELS_THUMBNAIL_URL,
|
|
2278
|
+
cn as PEXELS_VERTICAL_VIDEO_URL,
|
|
2279
|
+
wr as PlayerContainer,
|
|
2280
|
+
Dt as PlayerWrapper,
|
|
2281
|
+
Qt as VPPlayer,
|
|
2282
|
+
rn as VPPlayerProvider,
|
|
2283
|
+
an as baseConfig,
|
|
2284
|
+
Ke as baseConfigWithAds,
|
|
2285
|
+
on as baseConfigWithAutoplay,
|
|
2286
|
+
Gt as buildVPPlayerConfig,
|
|
2287
|
+
nn as defaultVPPlayerConfig,
|
|
2288
|
+
Xt as extractVideoId,
|
|
2289
|
+
sn as getAdConfig,
|
|
2290
|
+
tn as useVPPlayer,
|
|
2291
|
+
Yt as useVPPlayerEvents,
|
|
2292
|
+
Jt as useVPPlayerLogic,
|
|
2293
|
+
Ut as useVPPlayerScript,
|
|
2294
|
+
Wt as useVideoData
|
|
2333
2295
|
};
|