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