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