@aigamo/nostalgic-diva 1.19.2 → 1.19.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AudioPlayer-BMxdg9dp.js +35 -0
- package/dist/AudioPlayer-BMxdg9dp.js.map +1 -0
- package/dist/AudioPlayer-CgUxIJwa.cjs +2 -0
- package/dist/AudioPlayer-CgUxIJwa.cjs.map +1 -0
- package/dist/DailymotionPlayer-B4M9j0Lx.js +65 -0
- package/dist/DailymotionPlayer-B4M9j0Lx.js.map +1 -0
- package/dist/DailymotionPlayer-BdI4qcvJ.cjs +2 -0
- package/dist/DailymotionPlayer-BdI4qcvJ.cjs.map +1 -0
- package/dist/NiconicoPlayer-C1bgzaCT.cjs +2 -0
- package/dist/NiconicoPlayer-C1bgzaCT.cjs.map +1 -0
- package/dist/NiconicoPlayer-Cx3hGYsw.js +36 -0
- package/dist/NiconicoPlayer-Cx3hGYsw.js.map +1 -0
- package/dist/SoundCloudPlayer-BiFTnxn9.cjs +2 -0
- package/dist/SoundCloudPlayer-BiFTnxn9.cjs.map +1 -0
- package/dist/SoundCloudPlayer-C8QVPCXH.js +43 -0
- package/dist/SoundCloudPlayer-C8QVPCXH.js.map +1 -0
- package/dist/TwitchPlayer-C9D_eEaj.js +40 -0
- package/dist/TwitchPlayer-C9D_eEaj.js.map +1 -0
- package/dist/TwitchPlayer-DdhZD1Bh.cjs +2 -0
- package/dist/TwitchPlayer-DdhZD1Bh.cjs.map +1 -0
- package/dist/VimeoPlayer-DfBZwtd9.cjs +2 -0
- package/dist/VimeoPlayer-DfBZwtd9.cjs.map +1 -0
- package/dist/VimeoPlayer-UnKk2VAq.js +43 -0
- package/dist/VimeoPlayer-UnKk2VAq.js.map +1 -0
- package/dist/YouTubePlayer-CeTkdcOO.cjs +2 -0
- package/dist/YouTubePlayer-CeTkdcOO.cjs.map +1 -0
- package/dist/YouTubePlayer-bNmEJD02.js +39 -0
- package/dist/YouTubePlayer-bNmEJD02.js.map +1 -0
- package/dist/ensureScriptLoaded-CkK_-Amf.cjs +2 -0
- package/dist/ensureScriptLoaded-CkK_-Amf.cjs.map +1 -0
- package/dist/ensureScriptLoaded-HHnKf-aZ.js +24 -0
- package/dist/ensureScriptLoaded-HHnKf-aZ.js.map +1 -0
- package/dist/index.cjs.js +2 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +1232 -767
- package/dist/index.es.js.map +1 -1
- package/package.json +5 -5
- package/dist/AudioPlayer-CWI95ZSf.cjs +0 -2
- package/dist/AudioPlayer-CWI95ZSf.cjs.map +0 -1
- package/dist/AudioPlayer-Rgj403rr.js +0 -30
- package/dist/AudioPlayer-Rgj403rr.js.map +0 -1
- package/dist/DailymotionPlayer-CqYR3YjJ.cjs +0 -2
- package/dist/DailymotionPlayer-CqYR3YjJ.cjs.map +0 -1
- package/dist/DailymotionPlayer-DKnJvBrE.js +0 -60
- package/dist/DailymotionPlayer-DKnJvBrE.js.map +0 -1
- package/dist/NiconicoPlayer-BWepjJRp.js +0 -34
- package/dist/NiconicoPlayer-BWepjJRp.js.map +0 -1
- package/dist/NiconicoPlayer-DK-XPLSb.cjs +0 -2
- package/dist/NiconicoPlayer-DK-XPLSb.cjs.map +0 -1
- package/dist/PlayerContainer-CxyDj9x4.js +0 -690
- package/dist/PlayerContainer-CxyDj9x4.js.map +0 -1
- package/dist/PlayerContainer-LUwekvvj.cjs +0 -17
- package/dist/PlayerContainer-LUwekvvj.cjs.map +0 -1
- package/dist/SoundCloudPlayer-CIo1SPsW.js +0 -32
- package/dist/SoundCloudPlayer-CIo1SPsW.js.map +0 -1
- package/dist/SoundCloudPlayer-D1-SE7fO.cjs +0 -2
- package/dist/SoundCloudPlayer-D1-SE7fO.cjs.map +0 -1
- package/dist/TwitchPlayer-C-Zg7RPI.cjs +0 -2
- package/dist/TwitchPlayer-C-Zg7RPI.cjs.map +0 -1
- package/dist/TwitchPlayer-CipxSXDX.js +0 -33
- package/dist/TwitchPlayer-CipxSXDX.js.map +0 -1
- package/dist/VimeoPlayer-B2ew922s.cjs +0 -2
- package/dist/VimeoPlayer-B2ew922s.cjs.map +0 -1
- package/dist/VimeoPlayer-C-0MryDy.js +0 -32
- package/dist/VimeoPlayer-C-0MryDy.js.map +0 -1
- package/dist/YouTubePlayer-DXq_8Mrm.js +0 -35
- package/dist/YouTubePlayer-DXq_8Mrm.js.map +0 -1
- package/dist/YouTubePlayer-RHJqDD5s.cjs +0 -2
- package/dist/YouTubePlayer-RHJqDD5s.cjs.map +0 -1
- package/dist/ensureScriptLoaded-Bd04DRhn.js +0 -26
- package/dist/ensureScriptLoaded-Bd04DRhn.js.map +0 -1
- package/dist/ensureScriptLoaded-TVFV277C.cjs +0 -2
- package/dist/ensureScriptLoaded-TVFV277C.cjs.map +0 -1
|
@@ -1,690 +0,0 @@
|
|
|
1
|
-
import { useCallback as e, useEffect as t, useRef as n, useState as r } from "react";
|
|
2
|
-
//#region \0rolldown/runtime.js
|
|
3
|
-
var i = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), a = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
|
|
4
|
-
if (typeof require < "u") return require.apply(this, arguments);
|
|
5
|
-
throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
|
|
6
|
-
}), o = /* @__PURE__ */ function(e) {
|
|
7
|
-
return e[e.Trace = 0] = "Trace", e[e.Debug = 1] = "Debug", e[e.Information = 2] = "Information", e[e.Warning = 3] = "Warning", e[e.Error = 4] = "Error", e[e.Critical = 5] = "Critical", e[e.None = 6] = "None", e;
|
|
8
|
-
}({}), s = new class {
|
|
9
|
-
title = "nostalgic-diva";
|
|
10
|
-
createMessage(e) {
|
|
11
|
-
return `[${this.title}] ${e}`;
|
|
12
|
-
}
|
|
13
|
-
debug(e, ...t) {
|
|
14
|
-
console.debug(this.createMessage(e), ...t);
|
|
15
|
-
}
|
|
16
|
-
error(e, ...t) {
|
|
17
|
-
console.error(this.createMessage(e), ...t);
|
|
18
|
-
}
|
|
19
|
-
warn(e, ...t) {
|
|
20
|
-
console.warn(this.createMessage(e), ...t);
|
|
21
|
-
}
|
|
22
|
-
isEnabled() {
|
|
23
|
-
return !0;
|
|
24
|
-
}
|
|
25
|
-
log(e, t, ...n) {
|
|
26
|
-
switch (e) {
|
|
27
|
-
case o.Debug:
|
|
28
|
-
this.debug(t, ...n);
|
|
29
|
-
break;
|
|
30
|
-
case o.Warning:
|
|
31
|
-
this.warn(t, ...n);
|
|
32
|
-
break;
|
|
33
|
-
case o.Error:
|
|
34
|
-
this.error(t, ...n);
|
|
35
|
-
break;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}(), c = new class {
|
|
39
|
-
async attach() {}
|
|
40
|
-
async detach() {}
|
|
41
|
-
async loadVideo(e) {}
|
|
42
|
-
async play() {}
|
|
43
|
-
async pause() {}
|
|
44
|
-
async setCurrentTime(e) {}
|
|
45
|
-
async setVolume(e) {}
|
|
46
|
-
async setMuted(e) {}
|
|
47
|
-
async setPlaybackRate(e) {}
|
|
48
|
-
async getDuration() {
|
|
49
|
-
return 0;
|
|
50
|
-
}
|
|
51
|
-
async getCurrentTime() {
|
|
52
|
-
return 0;
|
|
53
|
-
}
|
|
54
|
-
async getVolume() {
|
|
55
|
-
return 0;
|
|
56
|
-
}
|
|
57
|
-
async getMuted() {
|
|
58
|
-
return !1;
|
|
59
|
-
}
|
|
60
|
-
async getPlaybackRate() {
|
|
61
|
-
return 0;
|
|
62
|
-
}
|
|
63
|
-
supports(e) {
|
|
64
|
-
return !1;
|
|
65
|
-
}
|
|
66
|
-
}(), l = /* @__PURE__ */ i(((e) => {
|
|
67
|
-
var t = a("react"), n = Symbol.for("react.element"), r = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, o = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = {
|
|
68
|
-
key: !0,
|
|
69
|
-
ref: !0,
|
|
70
|
-
__self: !0,
|
|
71
|
-
__source: !0
|
|
72
|
-
};
|
|
73
|
-
function c(e, t, r) {
|
|
74
|
-
var a, c = {}, l = null, u = null;
|
|
75
|
-
for (a in r !== void 0 && (l = "" + r), t.key !== void 0 && (l = "" + t.key), t.ref !== void 0 && (u = t.ref), t) i.call(t, a) && !s.hasOwnProperty(a) && (c[a] = t[a]);
|
|
76
|
-
if (e && e.defaultProps) for (a in t = e.defaultProps, t) c[a] === void 0 && (c[a] = t[a]);
|
|
77
|
-
return {
|
|
78
|
-
$$typeof: n,
|
|
79
|
-
type: e,
|
|
80
|
-
key: l,
|
|
81
|
-
ref: u,
|
|
82
|
-
props: c,
|
|
83
|
-
_owner: o.current
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
e.Fragment = r, e.jsx = c, e.jsxs = c;
|
|
87
|
-
})), u = /* @__PURE__ */ i(((e) => {
|
|
88
|
-
process.env.NODE_ENV !== "production" && (function() {
|
|
89
|
-
var t = a("react"), n = Symbol.for("react.element"), r = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), c = Symbol.for("react.provider"), l = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), m = Symbol.for("react.lazy"), h = Symbol.for("react.offscreen"), g = Symbol.iterator, _ = "@@iterator";
|
|
90
|
-
function v(e) {
|
|
91
|
-
if (typeof e != "object" || !e) return null;
|
|
92
|
-
var t = g && e[g] || e[_];
|
|
93
|
-
return typeof t == "function" ? t : null;
|
|
94
|
-
}
|
|
95
|
-
var y = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
96
|
-
function b(e) {
|
|
97
|
-
ee("error", e, [...arguments].slice(1));
|
|
98
|
-
}
|
|
99
|
-
function ee(e, t, n) {
|
|
100
|
-
var r = y.ReactDebugCurrentFrame.getStackAddendum();
|
|
101
|
-
r !== "" && (t += "%s", n = n.concat([r]));
|
|
102
|
-
var i = n.map(function(e) {
|
|
103
|
-
return String(e);
|
|
104
|
-
});
|
|
105
|
-
i.unshift("Warning: " + t), Function.prototype.apply.call(console[e], console, i);
|
|
106
|
-
}
|
|
107
|
-
var x = !1, S = !1, C = !1, w = !1, te = !1, ne = Symbol.for("react.module.reference");
|
|
108
|
-
function re(e) {
|
|
109
|
-
return !!(typeof e == "string" || typeof e == "function" || e === i || e === s || te || e === o || e === d || e === f || w || e === h || x || S || C || typeof e == "object" && e && (e.$$typeof === m || e.$$typeof === p || e.$$typeof === c || e.$$typeof === l || e.$$typeof === u || e.$$typeof === ne || e.getModuleId !== void 0));
|
|
110
|
-
}
|
|
111
|
-
function ie(e, t, n) {
|
|
112
|
-
var r = e.displayName;
|
|
113
|
-
if (r) return r;
|
|
114
|
-
var i = t.displayName || t.name || "";
|
|
115
|
-
return i === "" ? n : n + "(" + i + ")";
|
|
116
|
-
}
|
|
117
|
-
function T(e) {
|
|
118
|
-
return e.displayName || "Context";
|
|
119
|
-
}
|
|
120
|
-
function E(e) {
|
|
121
|
-
if (e == null) return null;
|
|
122
|
-
if (typeof e.tag == "number" && b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function") return e.displayName || e.name || null;
|
|
123
|
-
if (typeof e == "string") return e;
|
|
124
|
-
switch (e) {
|
|
125
|
-
case i: return "Fragment";
|
|
126
|
-
case r: return "Portal";
|
|
127
|
-
case s: return "Profiler";
|
|
128
|
-
case o: return "StrictMode";
|
|
129
|
-
case d: return "Suspense";
|
|
130
|
-
case f: return "SuspenseList";
|
|
131
|
-
}
|
|
132
|
-
if (typeof e == "object") switch (e.$$typeof) {
|
|
133
|
-
case l: return T(e) + ".Consumer";
|
|
134
|
-
case c: return T(e._context) + ".Provider";
|
|
135
|
-
case u: return ie(e, e.render, "ForwardRef");
|
|
136
|
-
case p:
|
|
137
|
-
var t = e.displayName || null;
|
|
138
|
-
return t === null ? E(e.type) || "Memo" : t;
|
|
139
|
-
case m:
|
|
140
|
-
var n = e, a = n._payload, h = n._init;
|
|
141
|
-
try {
|
|
142
|
-
return E(h(a));
|
|
143
|
-
} catch {
|
|
144
|
-
return null;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
return null;
|
|
148
|
-
}
|
|
149
|
-
var D = Object.assign, O = 0, k, A, j, M, N, ae, oe;
|
|
150
|
-
function se() {}
|
|
151
|
-
se.__reactDisabledLog = !0;
|
|
152
|
-
function ce() {
|
|
153
|
-
if (O === 0) {
|
|
154
|
-
k = console.log, A = console.info, j = console.warn, M = console.error, N = console.group, ae = console.groupCollapsed, oe = console.groupEnd;
|
|
155
|
-
var e = {
|
|
156
|
-
configurable: !0,
|
|
157
|
-
enumerable: !0,
|
|
158
|
-
value: se,
|
|
159
|
-
writable: !0
|
|
160
|
-
};
|
|
161
|
-
Object.defineProperties(console, {
|
|
162
|
-
info: e,
|
|
163
|
-
log: e,
|
|
164
|
-
warn: e,
|
|
165
|
-
error: e,
|
|
166
|
-
group: e,
|
|
167
|
-
groupCollapsed: e,
|
|
168
|
-
groupEnd: e
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
|
-
O++;
|
|
172
|
-
}
|
|
173
|
-
function le() {
|
|
174
|
-
if (O--, O === 0) {
|
|
175
|
-
var e = {
|
|
176
|
-
configurable: !0,
|
|
177
|
-
enumerable: !0,
|
|
178
|
-
writable: !0
|
|
179
|
-
};
|
|
180
|
-
Object.defineProperties(console, {
|
|
181
|
-
log: D({}, e, { value: k }),
|
|
182
|
-
info: D({}, e, { value: A }),
|
|
183
|
-
warn: D({}, e, { value: j }),
|
|
184
|
-
error: D({}, e, { value: M }),
|
|
185
|
-
group: D({}, e, { value: N }),
|
|
186
|
-
groupCollapsed: D({}, e, { value: ae }),
|
|
187
|
-
groupEnd: D({}, e, { value: oe })
|
|
188
|
-
});
|
|
189
|
-
}
|
|
190
|
-
O < 0 && b("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
191
|
-
}
|
|
192
|
-
var P = y.ReactCurrentDispatcher, F;
|
|
193
|
-
function I(e, t, n) {
|
|
194
|
-
if (F === void 0) try {
|
|
195
|
-
throw Error();
|
|
196
|
-
} catch (e) {
|
|
197
|
-
var r = e.stack.trim().match(/\n( *(at )?)/);
|
|
198
|
-
F = r && r[1] || "";
|
|
199
|
-
}
|
|
200
|
-
return "\n" + F + e;
|
|
201
|
-
}
|
|
202
|
-
var L = !1, R = new (typeof WeakMap == "function" ? WeakMap : Map)();
|
|
203
|
-
function z(e, t) {
|
|
204
|
-
if (!e || L) return "";
|
|
205
|
-
var n = R.get(e);
|
|
206
|
-
if (n !== void 0) return n;
|
|
207
|
-
var r;
|
|
208
|
-
L = !0;
|
|
209
|
-
var i = Error.prepareStackTrace;
|
|
210
|
-
Error.prepareStackTrace = void 0;
|
|
211
|
-
var a = P.current;
|
|
212
|
-
P.current = null, ce();
|
|
213
|
-
try {
|
|
214
|
-
if (t) {
|
|
215
|
-
var o = function() {
|
|
216
|
-
throw Error();
|
|
217
|
-
};
|
|
218
|
-
if (Object.defineProperty(o.prototype, "props", { set: function() {
|
|
219
|
-
throw Error();
|
|
220
|
-
} }), typeof Reflect == "object" && Reflect.construct) {
|
|
221
|
-
try {
|
|
222
|
-
Reflect.construct(o, []);
|
|
223
|
-
} catch (e) {
|
|
224
|
-
r = e;
|
|
225
|
-
}
|
|
226
|
-
Reflect.construct(e, [], o);
|
|
227
|
-
} else {
|
|
228
|
-
try {
|
|
229
|
-
o.call();
|
|
230
|
-
} catch (e) {
|
|
231
|
-
r = e;
|
|
232
|
-
}
|
|
233
|
-
e.call(o.prototype);
|
|
234
|
-
}
|
|
235
|
-
} else {
|
|
236
|
-
try {
|
|
237
|
-
throw Error();
|
|
238
|
-
} catch (e) {
|
|
239
|
-
r = e;
|
|
240
|
-
}
|
|
241
|
-
e();
|
|
242
|
-
}
|
|
243
|
-
} catch (t) {
|
|
244
|
-
if (t && r && typeof t.stack == "string") {
|
|
245
|
-
for (var s = t.stack.split("\n"), c = r.stack.split("\n"), l = s.length - 1, u = c.length - 1; l >= 1 && u >= 0 && s[l] !== c[u];) u--;
|
|
246
|
-
for (; l >= 1 && u >= 0; l--, u--) if (s[l] !== c[u]) {
|
|
247
|
-
if (l !== 1 || u !== 1) do
|
|
248
|
-
if (l--, u--, u < 0 || s[l] !== c[u]) {
|
|
249
|
-
var d = "\n" + s[l].replace(" at new ", " at ");
|
|
250
|
-
return e.displayName && d.includes("<anonymous>") && (d = d.replace("<anonymous>", e.displayName)), typeof e == "function" && R.set(e, d), d;
|
|
251
|
-
}
|
|
252
|
-
while (l >= 1 && u >= 0);
|
|
253
|
-
break;
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
} finally {
|
|
257
|
-
L = !1, P.current = a, le(), Error.prepareStackTrace = i;
|
|
258
|
-
}
|
|
259
|
-
var f = e ? e.displayName || e.name : "", p = f ? I(f) : "";
|
|
260
|
-
return typeof e == "function" && R.set(e, p), p;
|
|
261
|
-
}
|
|
262
|
-
function ue(e, t, n) {
|
|
263
|
-
return z(e, !1);
|
|
264
|
-
}
|
|
265
|
-
function de(e) {
|
|
266
|
-
var t = e.prototype;
|
|
267
|
-
return !!(t && t.isReactComponent);
|
|
268
|
-
}
|
|
269
|
-
function B(e, t, n) {
|
|
270
|
-
if (e == null) return "";
|
|
271
|
-
if (typeof e == "function") return z(e, de(e));
|
|
272
|
-
if (typeof e == "string") return I(e);
|
|
273
|
-
switch (e) {
|
|
274
|
-
case d: return I("Suspense");
|
|
275
|
-
case f: return I("SuspenseList");
|
|
276
|
-
}
|
|
277
|
-
if (typeof e == "object") switch (e.$$typeof) {
|
|
278
|
-
case u: return ue(e.render);
|
|
279
|
-
case p: return B(e.type, t, n);
|
|
280
|
-
case m:
|
|
281
|
-
var r = e, i = r._payload, a = r._init;
|
|
282
|
-
try {
|
|
283
|
-
return B(a(i), t, n);
|
|
284
|
-
} catch {}
|
|
285
|
-
}
|
|
286
|
-
return "";
|
|
287
|
-
}
|
|
288
|
-
var V = Object.prototype.hasOwnProperty, H = {}, U = y.ReactDebugCurrentFrame;
|
|
289
|
-
function W(e) {
|
|
290
|
-
if (e) {
|
|
291
|
-
var t = e._owner, n = B(e.type, e._source, t ? t.type : null);
|
|
292
|
-
U.setExtraStackFrame(n);
|
|
293
|
-
} else U.setExtraStackFrame(null);
|
|
294
|
-
}
|
|
295
|
-
function fe(e, t, n, r, i) {
|
|
296
|
-
var a = Function.call.bind(V);
|
|
297
|
-
for (var o in e) if (a(e, o)) {
|
|
298
|
-
var s = void 0;
|
|
299
|
-
try {
|
|
300
|
-
if (typeof e[o] != "function") {
|
|
301
|
-
var c = Error((r || "React class") + ": " + n + " type `" + o + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[o] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
302
|
-
throw c.name = "Invariant Violation", c;
|
|
303
|
-
}
|
|
304
|
-
s = e[o](t, o, r, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
305
|
-
} catch (e) {
|
|
306
|
-
s = e;
|
|
307
|
-
}
|
|
308
|
-
s && !(s instanceof Error) && (W(i), b("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", r || "React class", n, o, typeof s), W(null)), s instanceof Error && !(s.message in H) && (H[s.message] = !0, W(i), b("Failed %s type: %s", n, s.message), W(null));
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
var pe = Array.isArray;
|
|
312
|
-
function G(e) {
|
|
313
|
-
return pe(e);
|
|
314
|
-
}
|
|
315
|
-
function me(e) {
|
|
316
|
-
return typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
317
|
-
}
|
|
318
|
-
function he(e) {
|
|
319
|
-
try {
|
|
320
|
-
return K(e), !1;
|
|
321
|
-
} catch {
|
|
322
|
-
return !0;
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
function K(e) {
|
|
326
|
-
return "" + e;
|
|
327
|
-
}
|
|
328
|
-
function q(e) {
|
|
329
|
-
if (he(e)) return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", me(e)), K(e);
|
|
330
|
-
}
|
|
331
|
-
var J = y.ReactCurrentOwner, ge = {
|
|
332
|
-
key: !0,
|
|
333
|
-
ref: !0,
|
|
334
|
-
__self: !0,
|
|
335
|
-
__source: !0
|
|
336
|
-
}, Y, _e, ve = {};
|
|
337
|
-
function ye(e) {
|
|
338
|
-
if (V.call(e, "ref")) {
|
|
339
|
-
var t = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
340
|
-
if (t && t.isReactWarning) return !1;
|
|
341
|
-
}
|
|
342
|
-
return e.ref !== void 0;
|
|
343
|
-
}
|
|
344
|
-
function be(e) {
|
|
345
|
-
if (V.call(e, "key")) {
|
|
346
|
-
var t = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
347
|
-
if (t && t.isReactWarning) return !1;
|
|
348
|
-
}
|
|
349
|
-
return e.key !== void 0;
|
|
350
|
-
}
|
|
351
|
-
function xe(e, t) {
|
|
352
|
-
if (typeof e.ref == "string" && J.current && t && J.current.stateNode !== t) {
|
|
353
|
-
var n = E(J.current.type);
|
|
354
|
-
ve[n] || (b("Component \"%s\" contains the string ref \"%s\". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref", E(J.current.type), e.ref), ve[n] = !0);
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
function Se(e, t) {
|
|
358
|
-
var n = function() {
|
|
359
|
-
Y || (Y = !0, b("%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://reactjs.org/link/special-props)", t));
|
|
360
|
-
};
|
|
361
|
-
n.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
362
|
-
get: n,
|
|
363
|
-
configurable: !0
|
|
364
|
-
});
|
|
365
|
-
}
|
|
366
|
-
function Ce(e, t) {
|
|
367
|
-
var n = function() {
|
|
368
|
-
_e || (_e = !0, b("%s: `ref` 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://reactjs.org/link/special-props)", t));
|
|
369
|
-
};
|
|
370
|
-
n.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
371
|
-
get: n,
|
|
372
|
-
configurable: !0
|
|
373
|
-
});
|
|
374
|
-
}
|
|
375
|
-
var we = function(e, t, r, i, a, o, s) {
|
|
376
|
-
var c = {
|
|
377
|
-
$$typeof: n,
|
|
378
|
-
type: e,
|
|
379
|
-
key: t,
|
|
380
|
-
ref: r,
|
|
381
|
-
props: s,
|
|
382
|
-
_owner: o
|
|
383
|
-
};
|
|
384
|
-
return c._store = {}, Object.defineProperty(c._store, "validated", {
|
|
385
|
-
configurable: !1,
|
|
386
|
-
enumerable: !1,
|
|
387
|
-
writable: !0,
|
|
388
|
-
value: !1
|
|
389
|
-
}), Object.defineProperty(c, "_self", {
|
|
390
|
-
configurable: !1,
|
|
391
|
-
enumerable: !1,
|
|
392
|
-
writable: !1,
|
|
393
|
-
value: i
|
|
394
|
-
}), Object.defineProperty(c, "_source", {
|
|
395
|
-
configurable: !1,
|
|
396
|
-
enumerable: !1,
|
|
397
|
-
writable: !1,
|
|
398
|
-
value: a
|
|
399
|
-
}), Object.freeze && (Object.freeze(c.props), Object.freeze(c)), c;
|
|
400
|
-
};
|
|
401
|
-
function Te(e, t, n, r, i) {
|
|
402
|
-
var a, o = {}, s = null, c = null;
|
|
403
|
-
for (a in n !== void 0 && (q(n), s = "" + n), be(t) && (q(t.key), s = "" + t.key), ye(t) && (c = t.ref, xe(t, i)), t) V.call(t, a) && !ge.hasOwnProperty(a) && (o[a] = t[a]);
|
|
404
|
-
if (e && e.defaultProps) {
|
|
405
|
-
var l = e.defaultProps;
|
|
406
|
-
for (a in l) o[a] === void 0 && (o[a] = l[a]);
|
|
407
|
-
}
|
|
408
|
-
if (s || c) {
|
|
409
|
-
var u = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
410
|
-
s && Se(o, u), c && Ce(o, u);
|
|
411
|
-
}
|
|
412
|
-
return we(e, s, c, i, r, J.current, o);
|
|
413
|
-
}
|
|
414
|
-
var X = y.ReactCurrentOwner, Ee = y.ReactDebugCurrentFrame;
|
|
415
|
-
function Z(e) {
|
|
416
|
-
if (e) {
|
|
417
|
-
var t = e._owner, n = B(e.type, e._source, t ? t.type : null);
|
|
418
|
-
Ee.setExtraStackFrame(n);
|
|
419
|
-
} else Ee.setExtraStackFrame(null);
|
|
420
|
-
}
|
|
421
|
-
var De = !1;
|
|
422
|
-
function Q(e) {
|
|
423
|
-
return typeof e == "object" && !!e && e.$$typeof === n;
|
|
424
|
-
}
|
|
425
|
-
function Oe() {
|
|
426
|
-
if (X.current) {
|
|
427
|
-
var e = E(X.current.type);
|
|
428
|
-
if (e) return "\n\nCheck the render method of `" + e + "`.";
|
|
429
|
-
}
|
|
430
|
-
return "";
|
|
431
|
-
}
|
|
432
|
-
function ke(e) {
|
|
433
|
-
if (e !== void 0) {
|
|
434
|
-
var t = e.fileName.replace(/^.*[\\\/]/, ""), n = e.lineNumber;
|
|
435
|
-
return "\n\nCheck your code at " + t + ":" + n + ".";
|
|
436
|
-
}
|
|
437
|
-
return "";
|
|
438
|
-
}
|
|
439
|
-
var Ae = {};
|
|
440
|
-
function je(e) {
|
|
441
|
-
var t = Oe();
|
|
442
|
-
if (!t) {
|
|
443
|
-
var n = typeof e == "string" ? e : e.displayName || e.name;
|
|
444
|
-
n && (t = "\n\nCheck the top-level render call using <" + n + ">.");
|
|
445
|
-
}
|
|
446
|
-
return t;
|
|
447
|
-
}
|
|
448
|
-
function Me(e, t) {
|
|
449
|
-
if (!(!e._store || e._store.validated || e.key != null)) {
|
|
450
|
-
e._store.validated = !0;
|
|
451
|
-
var n = je(t);
|
|
452
|
-
if (!Ae[n]) {
|
|
453
|
-
Ae[n] = !0;
|
|
454
|
-
var r = "";
|
|
455
|
-
e && e._owner && e._owner !== X.current && (r = " It was passed a child from " + E(e._owner.type) + "."), Z(e), b("Each child in a list should have a unique \"key\" prop.%s%s See https://reactjs.org/link/warning-keys for more information.", n, r), Z(null);
|
|
456
|
-
}
|
|
457
|
-
}
|
|
458
|
-
}
|
|
459
|
-
function Ne(e, t) {
|
|
460
|
-
if (typeof e == "object") {
|
|
461
|
-
if (G(e)) for (var n = 0; n < e.length; n++) {
|
|
462
|
-
var r = e[n];
|
|
463
|
-
Q(r) && Me(r, t);
|
|
464
|
-
}
|
|
465
|
-
else if (Q(e)) e._store && (e._store.validated = !0);
|
|
466
|
-
else if (e) {
|
|
467
|
-
var i = v(e);
|
|
468
|
-
if (typeof i == "function" && i !== e.entries) for (var a = i.call(e), o; !(o = a.next()).done;) Q(o.value) && Me(o.value, t);
|
|
469
|
-
}
|
|
470
|
-
}
|
|
471
|
-
}
|
|
472
|
-
function Pe(e) {
|
|
473
|
-
var t = e.type;
|
|
474
|
-
if (!(t == null || typeof t == "string")) {
|
|
475
|
-
var n;
|
|
476
|
-
if (typeof t == "function") n = t.propTypes;
|
|
477
|
-
else if (typeof t == "object" && (t.$$typeof === u || t.$$typeof === p)) n = t.propTypes;
|
|
478
|
-
else return;
|
|
479
|
-
if (n) {
|
|
480
|
-
var r = E(t);
|
|
481
|
-
fe(n, e.props, "prop", r, e);
|
|
482
|
-
} else t.PropTypes !== void 0 && !De && (De = !0, b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", E(t) || "Unknown"));
|
|
483
|
-
typeof t.getDefaultProps == "function" && !t.getDefaultProps.isReactClassApproved && b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
484
|
-
}
|
|
485
|
-
}
|
|
486
|
-
function Fe(e) {
|
|
487
|
-
for (var t = Object.keys(e.props), n = 0; n < t.length; n++) {
|
|
488
|
-
var r = t[n];
|
|
489
|
-
if (r !== "children" && r !== "key") {
|
|
490
|
-
Z(e), b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", r), Z(null);
|
|
491
|
-
break;
|
|
492
|
-
}
|
|
493
|
-
}
|
|
494
|
-
e.ref !== null && (Z(e), b("Invalid attribute `ref` supplied to `React.Fragment`."), Z(null));
|
|
495
|
-
}
|
|
496
|
-
var Ie = {};
|
|
497
|
-
function $(e, t, r, a, o, s) {
|
|
498
|
-
var c = re(e);
|
|
499
|
-
if (!c) {
|
|
500
|
-
var l = "";
|
|
501
|
-
(e === void 0 || typeof e == "object" && e && Object.keys(e).length === 0) && (l += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
502
|
-
var u = ke(o);
|
|
503
|
-
u ? l += u : l += Oe();
|
|
504
|
-
var d;
|
|
505
|
-
e === null ? d = "null" : G(e) ? d = "array" : e !== void 0 && e.$$typeof === n ? (d = "<" + (E(e.type) || "Unknown") + " />", l = " Did you accidentally export a JSX literal instead of a component?") : d = typeof e, b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", d, l);
|
|
506
|
-
}
|
|
507
|
-
var f = Te(e, t, r, o, s);
|
|
508
|
-
if (f == null) return f;
|
|
509
|
-
if (c) {
|
|
510
|
-
var p = t.children;
|
|
511
|
-
if (p !== void 0) if (a) if (G(p)) {
|
|
512
|
-
for (var m = 0; m < p.length; m++) Ne(p[m], e);
|
|
513
|
-
Object.freeze && Object.freeze(p);
|
|
514
|
-
} else b("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
515
|
-
else Ne(p, e);
|
|
516
|
-
}
|
|
517
|
-
if (V.call(t, "key")) {
|
|
518
|
-
var h = E(e), g = Object.keys(t).filter(function(e) {
|
|
519
|
-
return e !== "key";
|
|
520
|
-
}), _ = g.length > 0 ? "{key: someKey, " + g.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
521
|
-
Ie[h + _] || (b("A props object containing a \"key\" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />", _, h, g.length > 0 ? "{" + g.join(": ..., ") + ": ...}" : "{}", h), Ie[h + _] = !0);
|
|
522
|
-
}
|
|
523
|
-
return e === i ? Fe(f) : Pe(f), f;
|
|
524
|
-
}
|
|
525
|
-
function Le(e, t, n) {
|
|
526
|
-
return $(e, t, n, !0);
|
|
527
|
-
}
|
|
528
|
-
function Re(e, t, n) {
|
|
529
|
-
return $(e, t, n, !1);
|
|
530
|
-
}
|
|
531
|
-
var ze = Re, Be = Le;
|
|
532
|
-
e.Fragment = i, e.jsx = ze, e.jsxs = Be;
|
|
533
|
-
})();
|
|
534
|
-
})), d = /* @__PURE__ */ i(((e, t) => {
|
|
535
|
-
process.env.NODE_ENV === "production" ? t.exports = l() : t.exports = u();
|
|
536
|
-
}));
|
|
537
|
-
//#endregion
|
|
538
|
-
//#region src/components/useFirstMountState.ts
|
|
539
|
-
function f() {
|
|
540
|
-
let e = n(!0);
|
|
541
|
-
return e.current ? (e.current = !1, !0) : e.current;
|
|
542
|
-
}
|
|
543
|
-
//#endregion
|
|
544
|
-
//#region src/components/usePreviousDistinct.ts
|
|
545
|
-
var p = (e, t) => e === t;
|
|
546
|
-
function m(e, t = p) {
|
|
547
|
-
let r = n(), i = n(e);
|
|
548
|
-
return !f() && !t(i.current, e) && (r.current = i.current, i.current = e), r.current;
|
|
549
|
-
}
|
|
550
|
-
//#endregion
|
|
551
|
-
//#region src/controllers/PlayerControllerImpl.ts
|
|
552
|
-
var h = class {
|
|
553
|
-
constructor(e, t, n) {
|
|
554
|
-
this.logger = e, this.player = t, this.options = n, this.logger.log(o.Debug, "ctor");
|
|
555
|
-
}
|
|
556
|
-
supports(e) {
|
|
557
|
-
return this[e] !== void 0;
|
|
558
|
-
}
|
|
559
|
-
}, g = class e {
|
|
560
|
-
static nextId = 1;
|
|
561
|
-
id;
|
|
562
|
-
impl;
|
|
563
|
-
constructor(t, n, r, i, a) {
|
|
564
|
-
this.logger = t, this.type = n, this.player = r, this.options = i, this.controllerFactory = a, this.id = e.nextId++;
|
|
565
|
-
}
|
|
566
|
-
createMessage(e) {
|
|
567
|
-
return `${this.type}#${this.id} ${e}`;
|
|
568
|
-
}
|
|
569
|
-
debug(e, ...t) {
|
|
570
|
-
this.logger.log(o.Debug, this.createMessage(e), ...t);
|
|
571
|
-
}
|
|
572
|
-
error(e, ...t) {
|
|
573
|
-
this.logger.log(o.Error, this.createMessage(e), ...t);
|
|
574
|
-
}
|
|
575
|
-
async attach(e) {
|
|
576
|
-
if (this.debug("attach", e), this.impl) {
|
|
577
|
-
this.debug("player is already attached");
|
|
578
|
-
return;
|
|
579
|
-
}
|
|
580
|
-
this.debug("Attaching player..."), this.impl = new this.controllerFactory(this.logger, this.player, this.options), await this.impl.attach(e), this.debug("player attached");
|
|
581
|
-
}
|
|
582
|
-
createPlayerNotAttachedError() {
|
|
583
|
-
return this.error("player is not attached"), /* @__PURE__ */ Error("player is not attached");
|
|
584
|
-
}
|
|
585
|
-
createCommandNotSupportedError(e) {
|
|
586
|
-
return /* @__PURE__ */ Error(`${e} is not supported`);
|
|
587
|
-
}
|
|
588
|
-
async detach() {
|
|
589
|
-
if (this.debug("detach"), this.impl === void 0) throw this.createPlayerNotAttachedError();
|
|
590
|
-
await this.impl.detach(), this.impl = void 0;
|
|
591
|
-
}
|
|
592
|
-
async loadVideo(e) {
|
|
593
|
-
if (this.debug("loadVideo", e), this.impl === void 0) throw this.createPlayerNotAttachedError();
|
|
594
|
-
if (this.impl.loadVideo === void 0) throw this.createCommandNotSupportedError("loadVideo");
|
|
595
|
-
this.debug("Loading video..."), await this.impl.loadVideo(e), this.debug("video loaded", e);
|
|
596
|
-
}
|
|
597
|
-
play() {
|
|
598
|
-
if (this.debug("play"), this.impl === void 0) throw this.createPlayerNotAttachedError();
|
|
599
|
-
if (this.impl.play === void 0) throw this.createCommandNotSupportedError("play");
|
|
600
|
-
return this.impl.play();
|
|
601
|
-
}
|
|
602
|
-
pause() {
|
|
603
|
-
if (this.debug("pause"), this.impl === void 0) throw this.createPlayerNotAttachedError();
|
|
604
|
-
if (this.impl.pause === void 0) throw this.createCommandNotSupportedError("pause");
|
|
605
|
-
return this.impl.pause();
|
|
606
|
-
}
|
|
607
|
-
setCurrentTime(e) {
|
|
608
|
-
if (this.debug("setCurrentTime", e), this.impl === void 0) throw this.createPlayerNotAttachedError();
|
|
609
|
-
if (this.impl.setCurrentTime === void 0) throw this.createCommandNotSupportedError("setCurrentTime");
|
|
610
|
-
return this.impl.setCurrentTime(e);
|
|
611
|
-
}
|
|
612
|
-
setVolume(e) {
|
|
613
|
-
if (this.debug("setVolume", e), this.impl === void 0) throw this.createPlayerNotAttachedError();
|
|
614
|
-
if (this.impl.setVolume === void 0) throw this.createCommandNotSupportedError("setVolume");
|
|
615
|
-
return this.impl.setVolume(e);
|
|
616
|
-
}
|
|
617
|
-
setMuted(e) {
|
|
618
|
-
if (this.debug("setMuted", e), this.impl === void 0) throw this.createPlayerNotAttachedError();
|
|
619
|
-
if (this.impl.setMuted === void 0) throw this.createCommandNotSupportedError("setMuted");
|
|
620
|
-
return this.impl.setMuted(e);
|
|
621
|
-
}
|
|
622
|
-
setPlaybackRate(e) {
|
|
623
|
-
if (this.debug("setPlaybackRate", e), this.impl === void 0) throw this.createPlayerNotAttachedError();
|
|
624
|
-
if (this.impl.setPlaybackRate === void 0) throw this.createCommandNotSupportedError("setPlaybackRate");
|
|
625
|
-
return this.impl.setPlaybackRate(e);
|
|
626
|
-
}
|
|
627
|
-
getDuration() {
|
|
628
|
-
if (this.debug("getDuration"), this.impl === void 0) throw this.createPlayerNotAttachedError();
|
|
629
|
-
if (this.impl.getDuration === void 0) throw this.createCommandNotSupportedError("getDuration");
|
|
630
|
-
return this.impl.getDuration();
|
|
631
|
-
}
|
|
632
|
-
getCurrentTime() {
|
|
633
|
-
if (this.debug("getCurrentTime"), this.impl === void 0) throw this.createPlayerNotAttachedError();
|
|
634
|
-
if (this.impl.getCurrentTime === void 0) throw this.createCommandNotSupportedError("getCurrentTime");
|
|
635
|
-
return this.impl.getCurrentTime();
|
|
636
|
-
}
|
|
637
|
-
getVolume() {
|
|
638
|
-
if (this.debug("getVolume"), this.impl === void 0) throw this.createPlayerNotAttachedError();
|
|
639
|
-
if (this.impl.getVolume === void 0) throw this.createCommandNotSupportedError("getVolume");
|
|
640
|
-
return this.impl.getVolume();
|
|
641
|
-
}
|
|
642
|
-
getMuted() {
|
|
643
|
-
if (this.debug("getMuted"), this.impl === void 0) throw this.createPlayerNotAttachedError();
|
|
644
|
-
if (this.impl.getMuted === void 0) throw this.createCommandNotSupportedError("getMuted");
|
|
645
|
-
return this.impl.getMuted();
|
|
646
|
-
}
|
|
647
|
-
getPlaybackRate() {
|
|
648
|
-
if (this.debug("getPlaybackRate"), this.impl === void 0) throw this.createPlayerNotAttachedError();
|
|
649
|
-
if (this.impl.getPlaybackRate === void 0) throw this.createCommandNotSupportedError("getPlaybackRate");
|
|
650
|
-
return this.impl.getPlaybackRate();
|
|
651
|
-
}
|
|
652
|
-
supports(e) {
|
|
653
|
-
if (this.impl === void 0) throw this.createPlayerNotAttachedError();
|
|
654
|
-
return this.impl.supports(e);
|
|
655
|
-
}
|
|
656
|
-
}, _ = d(), v = ({ logger: i, type: a, loadScript: s, playerFactory: l, onControllerChange: u, videoId: d, options: f, controllerFactory: p, children: h }) => {
|
|
657
|
-
i.log(o.Debug, "PlayerContainer");
|
|
658
|
-
let v = n(d), y = n(void 0), [b, ee] = r(), [x, S] = r(c), C = e((e) => {
|
|
659
|
-
S(e), u?.(e);
|
|
660
|
-
}, [u]);
|
|
661
|
-
t(() => {
|
|
662
|
-
(s?.() ?? Promise.resolve()).then(() => l(y.current, v.current)).then((e) => ee(e));
|
|
663
|
-
}, [s, l]), t(() => {
|
|
664
|
-
if (b === void 0) return;
|
|
665
|
-
let e = new g(i, a, b, f, p);
|
|
666
|
-
return e.attach(v.current).then(() => C(e)), () => {
|
|
667
|
-
e.detach().finally(() => C(c));
|
|
668
|
-
};
|
|
669
|
-
}, [
|
|
670
|
-
i,
|
|
671
|
-
a,
|
|
672
|
-
s,
|
|
673
|
-
b,
|
|
674
|
-
f,
|
|
675
|
-
p,
|
|
676
|
-
C
|
|
677
|
-
]);
|
|
678
|
-
let w = m(d);
|
|
679
|
-
return t(() => {
|
|
680
|
-
w !== void 0 && x.loadVideo(d);
|
|
681
|
-
}, [
|
|
682
|
-
w,
|
|
683
|
-
d,
|
|
684
|
-
x
|
|
685
|
-
]), /* @__PURE__ */ (0, _.jsx)(_.Fragment, { children: h(y, v.current) });
|
|
686
|
-
};
|
|
687
|
-
//#endregion
|
|
688
|
-
export { c as a, d as i, g as n, o, h as r, s, v as t };
|
|
689
|
-
|
|
690
|
-
//# sourceMappingURL=PlayerContainer-CxyDj9x4.js.map
|