@react-scrollytelling/video 0.0.1 → 0.1.0
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/index.cjs.js +10 -10
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +329 -259
- package/dist/index.es.js.map +1 -1
- package/dist/src/components/Video.d.ts +18 -1
- package/dist/src/components/Video.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import K, { useRef as ke, useEffect as vr, useState as pr, useCallback as ne, useImperativeHandle as gr } from "react";
|
|
2
|
+
import { useRafThrottle as yr } from "@react-scrollytelling/core";
|
|
3
|
+
var ae = { exports: {} }, L = {};
|
|
3
4
|
/**
|
|
4
5
|
* @license React
|
|
5
6
|
* react-jsx-runtime.production.min.js
|
|
@@ -9,25 +10,25 @@ var Z = { exports: {} }, A = {};
|
|
|
9
10
|
* This source code is licensed under the MIT license found in the
|
|
10
11
|
* LICENSE file in the root directory of this source tree.
|
|
11
12
|
*/
|
|
12
|
-
var
|
|
13
|
-
function
|
|
14
|
-
if (
|
|
15
|
-
return
|
|
16
|
-
|
|
17
|
-
var
|
|
18
|
-
function
|
|
19
|
-
var
|
|
20
|
-
|
|
21
|
-
for (
|
|
22
|
-
|
|
23
|
-
if (
|
|
24
|
-
for (
|
|
25
|
-
|
|
26
|
-
return { $$typeof:
|
|
13
|
+
var je;
|
|
14
|
+
function hr() {
|
|
15
|
+
if (je)
|
|
16
|
+
return L;
|
|
17
|
+
je = 1;
|
|
18
|
+
var w = K, y = Symbol.for("react.element"), C = Symbol.for("react.fragment"), b = Object.prototype.hasOwnProperty, m = w.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, O = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
19
|
+
function P(h, s, S) {
|
|
20
|
+
var c, R = {}, E = null, k = null;
|
|
21
|
+
S !== void 0 && (E = "" + S), s.key !== void 0 && (E = "" + s.key), s.ref !== void 0 && (k = s.ref);
|
|
22
|
+
for (c in s)
|
|
23
|
+
b.call(s, c) && !O.hasOwnProperty(c) && (R[c] = s[c]);
|
|
24
|
+
if (h && h.defaultProps)
|
|
25
|
+
for (c in s = h.defaultProps, s)
|
|
26
|
+
R[c] === void 0 && (R[c] = s[c]);
|
|
27
|
+
return { $$typeof: y, type: h, key: E, ref: k, props: R, _owner: m.current };
|
|
27
28
|
}
|
|
28
|
-
return
|
|
29
|
+
return L.Fragment = C, L.jsx = P, L.jsxs = P, L;
|
|
29
30
|
}
|
|
30
|
-
var
|
|
31
|
+
var M = {};
|
|
31
32
|
/**
|
|
32
33
|
* @license React
|
|
33
34
|
* react-jsx-runtime.development.js
|
|
@@ -37,27 +38,27 @@ var I = {};
|
|
|
37
38
|
* This source code is licensed under the MIT license found in the
|
|
38
39
|
* LICENSE file in the root directory of this source tree.
|
|
39
40
|
*/
|
|
40
|
-
var
|
|
41
|
-
function
|
|
42
|
-
return
|
|
43
|
-
var
|
|
44
|
-
function
|
|
41
|
+
var xe;
|
|
42
|
+
function Rr() {
|
|
43
|
+
return xe || (xe = 1, process.env.NODE_ENV !== "production" && function() {
|
|
44
|
+
var w = K, y = Symbol.for("react.element"), C = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), O = Symbol.for("react.profiler"), P = Symbol.for("react.provider"), h = Symbol.for("react.context"), s = Symbol.for("react.forward_ref"), S = Symbol.for("react.suspense"), c = Symbol.for("react.suspense_list"), R = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), k = Symbol.for("react.offscreen"), U = Symbol.iterator, I = "@@iterator";
|
|
45
|
+
function $(e) {
|
|
45
46
|
if (e === null || typeof e != "object")
|
|
46
47
|
return null;
|
|
47
|
-
var r =
|
|
48
|
+
var r = U && e[U] || e[I];
|
|
48
49
|
return typeof r == "function" ? r : null;
|
|
49
50
|
}
|
|
50
|
-
var
|
|
51
|
-
function
|
|
51
|
+
var _ = w.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
52
|
+
function d(e) {
|
|
52
53
|
{
|
|
53
54
|
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
|
|
54
55
|
t[n - 1] = arguments[n];
|
|
55
|
-
|
|
56
|
+
De("error", e, t);
|
|
56
57
|
}
|
|
57
58
|
}
|
|
58
|
-
function
|
|
59
|
+
function De(e, r, t) {
|
|
59
60
|
{
|
|
60
|
-
var n =
|
|
61
|
+
var n = _.ReactDebugCurrentFrame, i = n.getStackAddendum();
|
|
61
62
|
i !== "" && (r += "%s", t = t.concat([i]));
|
|
62
63
|
var u = t.map(function(o) {
|
|
63
64
|
return String(o);
|
|
@@ -65,63 +66,63 @@ function cr() {
|
|
|
65
66
|
u.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, u);
|
|
66
67
|
}
|
|
67
68
|
}
|
|
68
|
-
var
|
|
69
|
-
|
|
70
|
-
function
|
|
71
|
-
return !!(typeof e == "string" || typeof e == "function" || e ===
|
|
69
|
+
var Fe = !1, Ae = !1, Ie = !1, $e = !1, We = !1, oe;
|
|
70
|
+
oe = Symbol.for("react.module.reference");
|
|
71
|
+
function Ye(e) {
|
|
72
|
+
return !!(typeof e == "string" || typeof e == "function" || e === b || e === O || We || e === m || e === S || e === c || $e || e === k || Fe || Ae || Ie || typeof e == "object" && e !== null && (e.$$typeof === E || e.$$typeof === R || e.$$typeof === P || e.$$typeof === h || e.$$typeof === s || // This needs to include all possible module reference object
|
|
72
73
|
// types supported by any Flight configuration anywhere since
|
|
73
74
|
// we don't know which Flight build this will end up being used
|
|
74
75
|
// with.
|
|
75
|
-
e.$$typeof ===
|
|
76
|
+
e.$$typeof === oe || e.getModuleId !== void 0));
|
|
76
77
|
}
|
|
77
|
-
function
|
|
78
|
+
function Ve(e, r, t) {
|
|
78
79
|
var n = e.displayName;
|
|
79
80
|
if (n)
|
|
80
81
|
return n;
|
|
81
82
|
var i = r.displayName || r.name || "";
|
|
82
83
|
return i !== "" ? t + "(" + i + ")" : t;
|
|
83
84
|
}
|
|
84
|
-
function
|
|
85
|
+
function ie(e) {
|
|
85
86
|
return e.displayName || "Context";
|
|
86
87
|
}
|
|
87
|
-
function
|
|
88
|
+
function T(e) {
|
|
88
89
|
if (e == null)
|
|
89
90
|
return null;
|
|
90
|
-
if (typeof e.tag == "number" &&
|
|
91
|
+
if (typeof e.tag == "number" && d("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
91
92
|
return e.displayName || e.name || null;
|
|
92
93
|
if (typeof e == "string")
|
|
93
94
|
return e;
|
|
94
95
|
switch (e) {
|
|
95
|
-
case
|
|
96
|
+
case b:
|
|
96
97
|
return "Fragment";
|
|
97
|
-
case
|
|
98
|
+
case C:
|
|
98
99
|
return "Portal";
|
|
99
|
-
case
|
|
100
|
+
case O:
|
|
100
101
|
return "Profiler";
|
|
101
|
-
case
|
|
102
|
+
case m:
|
|
102
103
|
return "StrictMode";
|
|
103
|
-
case
|
|
104
|
+
case S:
|
|
104
105
|
return "Suspense";
|
|
105
|
-
case
|
|
106
|
+
case c:
|
|
106
107
|
return "SuspenseList";
|
|
107
108
|
}
|
|
108
109
|
if (typeof e == "object")
|
|
109
110
|
switch (e.$$typeof) {
|
|
110
|
-
case
|
|
111
|
+
case h:
|
|
111
112
|
var r = e;
|
|
112
|
-
return
|
|
113
|
-
case
|
|
113
|
+
return ie(r) + ".Consumer";
|
|
114
|
+
case P:
|
|
114
115
|
var t = e;
|
|
115
|
-
return
|
|
116
|
-
case
|
|
117
|
-
return
|
|
118
|
-
case
|
|
116
|
+
return ie(t._context) + ".Provider";
|
|
117
|
+
case s:
|
|
118
|
+
return Ve(e, e.render, "ForwardRef");
|
|
119
|
+
case R:
|
|
119
120
|
var n = e.displayName || null;
|
|
120
|
-
return n !== null ? n :
|
|
121
|
-
case
|
|
121
|
+
return n !== null ? n : T(e.type) || "Memo";
|
|
122
|
+
case E: {
|
|
122
123
|
var i = e, u = i._payload, o = i._init;
|
|
123
124
|
try {
|
|
124
|
-
return
|
|
125
|
+
return T(o(u));
|
|
125
126
|
} catch (a) {
|
|
126
127
|
return null;
|
|
127
128
|
}
|
|
@@ -129,18 +130,18 @@ function cr() {
|
|
|
129
130
|
}
|
|
130
131
|
return null;
|
|
131
132
|
}
|
|
132
|
-
var
|
|
133
|
-
function
|
|
133
|
+
var j = Object.assign, W = 0, ue, se, le, fe, ce, de, ve;
|
|
134
|
+
function pe() {
|
|
134
135
|
}
|
|
135
|
-
|
|
136
|
-
function
|
|
136
|
+
pe.__reactDisabledLog = !0;
|
|
137
|
+
function Le() {
|
|
137
138
|
{
|
|
138
|
-
if (
|
|
139
|
-
|
|
139
|
+
if (W === 0) {
|
|
140
|
+
ue = console.log, se = console.info, le = console.warn, fe = console.error, ce = console.group, de = console.groupCollapsed, ve = console.groupEnd;
|
|
140
141
|
var e = {
|
|
141
142
|
configurable: !0,
|
|
142
143
|
enumerable: !0,
|
|
143
|
-
value:
|
|
144
|
+
value: pe,
|
|
144
145
|
writable: !0
|
|
145
146
|
};
|
|
146
147
|
Object.defineProperties(console, {
|
|
@@ -153,77 +154,77 @@ function cr() {
|
|
|
153
154
|
groupEnd: e
|
|
154
155
|
});
|
|
155
156
|
}
|
|
156
|
-
|
|
157
|
+
W++;
|
|
157
158
|
}
|
|
158
159
|
}
|
|
159
|
-
function
|
|
160
|
+
function Me() {
|
|
160
161
|
{
|
|
161
|
-
if (
|
|
162
|
+
if (W--, W === 0) {
|
|
162
163
|
var e = {
|
|
163
164
|
configurable: !0,
|
|
164
165
|
enumerable: !0,
|
|
165
166
|
writable: !0
|
|
166
167
|
};
|
|
167
168
|
Object.defineProperties(console, {
|
|
168
|
-
log:
|
|
169
|
-
value:
|
|
169
|
+
log: j({}, e, {
|
|
170
|
+
value: ue
|
|
170
171
|
}),
|
|
171
|
-
info:
|
|
172
|
-
value:
|
|
172
|
+
info: j({}, e, {
|
|
173
|
+
value: se
|
|
173
174
|
}),
|
|
174
|
-
warn:
|
|
175
|
-
value:
|
|
175
|
+
warn: j({}, e, {
|
|
176
|
+
value: le
|
|
176
177
|
}),
|
|
177
|
-
error:
|
|
178
|
-
value:
|
|
178
|
+
error: j({}, e, {
|
|
179
|
+
value: fe
|
|
179
180
|
}),
|
|
180
|
-
group:
|
|
181
|
-
value:
|
|
181
|
+
group: j({}, e, {
|
|
182
|
+
value: ce
|
|
182
183
|
}),
|
|
183
|
-
groupCollapsed:
|
|
184
|
-
value:
|
|
184
|
+
groupCollapsed: j({}, e, {
|
|
185
|
+
value: de
|
|
185
186
|
}),
|
|
186
|
-
groupEnd:
|
|
187
|
-
value:
|
|
187
|
+
groupEnd: j({}, e, {
|
|
188
|
+
value: ve
|
|
188
189
|
})
|
|
189
190
|
});
|
|
190
191
|
}
|
|
191
|
-
|
|
192
|
+
W < 0 && d("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
192
193
|
}
|
|
193
194
|
}
|
|
194
|
-
var
|
|
195
|
-
function
|
|
195
|
+
var G = _.ReactCurrentDispatcher, z;
|
|
196
|
+
function N(e, r, t) {
|
|
196
197
|
{
|
|
197
|
-
if (
|
|
198
|
+
if (z === void 0)
|
|
198
199
|
try {
|
|
199
200
|
throw Error();
|
|
200
201
|
} catch (i) {
|
|
201
202
|
var n = i.stack.trim().match(/\n( *(at )?)/);
|
|
202
|
-
|
|
203
|
+
z = n && n[1] || "";
|
|
203
204
|
}
|
|
204
205
|
return `
|
|
205
|
-
` +
|
|
206
|
+
` + z + e;
|
|
206
207
|
}
|
|
207
208
|
}
|
|
208
|
-
var
|
|
209
|
+
var H = !1, q;
|
|
209
210
|
{
|
|
210
|
-
var
|
|
211
|
-
|
|
211
|
+
var Ue = typeof WeakMap == "function" ? WeakMap : Map;
|
|
212
|
+
q = new Ue();
|
|
212
213
|
}
|
|
213
|
-
function
|
|
214
|
-
if (!e ||
|
|
214
|
+
function ge(e, r) {
|
|
215
|
+
if (!e || H)
|
|
215
216
|
return "";
|
|
216
217
|
{
|
|
217
|
-
var t =
|
|
218
|
+
var t = q.get(e);
|
|
218
219
|
if (t !== void 0)
|
|
219
220
|
return t;
|
|
220
221
|
}
|
|
221
222
|
var n;
|
|
222
|
-
|
|
223
|
+
H = !0;
|
|
223
224
|
var i = Error.prepareStackTrace;
|
|
224
225
|
Error.prepareStackTrace = void 0;
|
|
225
226
|
var u;
|
|
226
|
-
u =
|
|
227
|
+
u = G.current, G.current = null, Le();
|
|
227
228
|
try {
|
|
228
229
|
if (r) {
|
|
229
230
|
var o = function() {
|
|
@@ -236,98 +237,98 @@ function cr() {
|
|
|
236
237
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
237
238
|
try {
|
|
238
239
|
Reflect.construct(o, []);
|
|
239
|
-
} catch (
|
|
240
|
-
n =
|
|
240
|
+
} catch (p) {
|
|
241
|
+
n = p;
|
|
241
242
|
}
|
|
242
243
|
Reflect.construct(e, [], o);
|
|
243
244
|
} else {
|
|
244
245
|
try {
|
|
245
246
|
o.call();
|
|
246
|
-
} catch (
|
|
247
|
-
n =
|
|
247
|
+
} catch (p) {
|
|
248
|
+
n = p;
|
|
248
249
|
}
|
|
249
250
|
e.call(o.prototype);
|
|
250
251
|
}
|
|
251
252
|
} else {
|
|
252
253
|
try {
|
|
253
254
|
throw Error();
|
|
254
|
-
} catch (
|
|
255
|
-
n =
|
|
255
|
+
} catch (p) {
|
|
256
|
+
n = p;
|
|
256
257
|
}
|
|
257
258
|
e();
|
|
258
259
|
}
|
|
259
|
-
} catch (
|
|
260
|
-
if (
|
|
261
|
-
for (var a =
|
|
260
|
+
} catch (p) {
|
|
261
|
+
if (p && n && typeof p.stack == "string") {
|
|
262
|
+
for (var a = p.stack.split(`
|
|
262
263
|
`), v = n.stack.split(`
|
|
263
|
-
`),
|
|
264
|
-
|
|
265
|
-
for (;
|
|
266
|
-
if (a[
|
|
267
|
-
if (
|
|
264
|
+
`), l = a.length - 1, f = v.length - 1; l >= 1 && f >= 0 && a[l] !== v[f]; )
|
|
265
|
+
f--;
|
|
266
|
+
for (; l >= 1 && f >= 0; l--, f--)
|
|
267
|
+
if (a[l] !== v[f]) {
|
|
268
|
+
if (l !== 1 || f !== 1)
|
|
268
269
|
do
|
|
269
|
-
if (
|
|
270
|
+
if (l--, f--, f < 0 || a[l] !== v[f]) {
|
|
270
271
|
var g = `
|
|
271
|
-
` + a[
|
|
272
|
-
return e.displayName && g.includes("<anonymous>") && (g = g.replace("<anonymous>", e.displayName)), typeof e == "function" &&
|
|
272
|
+
` + a[l].replace(" at new ", " at ");
|
|
273
|
+
return e.displayName && g.includes("<anonymous>") && (g = g.replace("<anonymous>", e.displayName)), typeof e == "function" && q.set(e, g), g;
|
|
273
274
|
}
|
|
274
|
-
while (
|
|
275
|
+
while (l >= 1 && f >= 0);
|
|
275
276
|
break;
|
|
276
277
|
}
|
|
277
278
|
}
|
|
278
279
|
} finally {
|
|
279
|
-
|
|
280
|
+
H = !1, G.current = u, Me(), Error.prepareStackTrace = i;
|
|
280
281
|
}
|
|
281
|
-
var
|
|
282
|
-
return typeof e == "function" &&
|
|
282
|
+
var F = e ? e.displayName || e.name : "", x = F ? N(F) : "";
|
|
283
|
+
return typeof e == "function" && q.set(e, x), x;
|
|
283
284
|
}
|
|
284
|
-
function
|
|
285
|
-
return
|
|
285
|
+
function Ne(e, r, t) {
|
|
286
|
+
return ge(e, !1);
|
|
286
287
|
}
|
|
287
|
-
function
|
|
288
|
+
function qe(e) {
|
|
288
289
|
var r = e.prototype;
|
|
289
290
|
return !!(r && r.isReactComponent);
|
|
290
291
|
}
|
|
291
|
-
function
|
|
292
|
+
function B(e, r, t) {
|
|
292
293
|
if (e == null)
|
|
293
294
|
return "";
|
|
294
295
|
if (typeof e == "function")
|
|
295
|
-
return
|
|
296
|
+
return ge(e, qe(e));
|
|
296
297
|
if (typeof e == "string")
|
|
297
|
-
return
|
|
298
|
+
return N(e);
|
|
298
299
|
switch (e) {
|
|
299
|
-
case
|
|
300
|
-
return
|
|
301
|
-
case
|
|
302
|
-
return
|
|
300
|
+
case S:
|
|
301
|
+
return N("Suspense");
|
|
302
|
+
case c:
|
|
303
|
+
return N("SuspenseList");
|
|
303
304
|
}
|
|
304
305
|
if (typeof e == "object")
|
|
305
306
|
switch (e.$$typeof) {
|
|
306
|
-
case
|
|
307
|
-
return
|
|
308
|
-
case
|
|
309
|
-
return
|
|
310
|
-
case
|
|
307
|
+
case s:
|
|
308
|
+
return Ne(e.render);
|
|
309
|
+
case R:
|
|
310
|
+
return B(e.type, r, t);
|
|
311
|
+
case E: {
|
|
311
312
|
var n = e, i = n._payload, u = n._init;
|
|
312
313
|
try {
|
|
313
|
-
return
|
|
314
|
+
return B(u(i), r, t);
|
|
314
315
|
} catch (o) {
|
|
315
316
|
}
|
|
316
317
|
}
|
|
317
318
|
}
|
|
318
319
|
return "";
|
|
319
320
|
}
|
|
320
|
-
var
|
|
321
|
-
function
|
|
321
|
+
var Y = Object.prototype.hasOwnProperty, ye = {}, he = _.ReactDebugCurrentFrame;
|
|
322
|
+
function J(e) {
|
|
322
323
|
if (e) {
|
|
323
|
-
var r = e._owner, t =
|
|
324
|
-
|
|
324
|
+
var r = e._owner, t = B(e.type, e._source, r ? r.type : null);
|
|
325
|
+
he.setExtraStackFrame(t);
|
|
325
326
|
} else
|
|
326
|
-
|
|
327
|
+
he.setExtraStackFrame(null);
|
|
327
328
|
}
|
|
328
|
-
function
|
|
329
|
+
function Be(e, r, t, n, i) {
|
|
329
330
|
{
|
|
330
|
-
var u = Function.call.bind(
|
|
331
|
+
var u = Function.call.bind(Y);
|
|
331
332
|
for (var o in e)
|
|
332
333
|
if (u(e, o)) {
|
|
333
334
|
var a = void 0;
|
|
@@ -337,70 +338,70 @@ function cr() {
|
|
|
337
338
|
throw v.name = "Invariant Violation", v;
|
|
338
339
|
}
|
|
339
340
|
a = e[o](r, o, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
340
|
-
} catch (
|
|
341
|
-
a =
|
|
341
|
+
} catch (l) {
|
|
342
|
+
a = l;
|
|
342
343
|
}
|
|
343
|
-
a && !(a instanceof Error) && (
|
|
344
|
+
a && !(a instanceof Error) && (J(i), d("%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).", n || "React class", t, o, typeof a), J(null)), a instanceof Error && !(a.message in ye) && (ye[a.message] = !0, J(i), d("Failed %s type: %s", t, a.message), J(null));
|
|
344
345
|
}
|
|
345
346
|
}
|
|
346
347
|
}
|
|
347
|
-
var
|
|
348
|
-
function
|
|
349
|
-
return
|
|
348
|
+
var Je = Array.isArray;
|
|
349
|
+
function X(e) {
|
|
350
|
+
return Je(e);
|
|
350
351
|
}
|
|
351
|
-
function
|
|
352
|
+
function Ke(e) {
|
|
352
353
|
{
|
|
353
354
|
var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
354
355
|
return t;
|
|
355
356
|
}
|
|
356
357
|
}
|
|
357
|
-
function
|
|
358
|
+
function Ge(e) {
|
|
358
359
|
try {
|
|
359
|
-
return
|
|
360
|
+
return Re(e), !1;
|
|
360
361
|
} catch (r) {
|
|
361
362
|
return !0;
|
|
362
363
|
}
|
|
363
364
|
}
|
|
364
|
-
function
|
|
365
|
+
function Re(e) {
|
|
365
366
|
return "" + e;
|
|
366
367
|
}
|
|
367
|
-
function
|
|
368
|
-
if (
|
|
369
|
-
return
|
|
368
|
+
function be(e) {
|
|
369
|
+
if (Ge(e))
|
|
370
|
+
return d("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ke(e)), Re(e);
|
|
370
371
|
}
|
|
371
|
-
var
|
|
372
|
+
var V = _.ReactCurrentOwner, ze = {
|
|
372
373
|
key: !0,
|
|
373
374
|
ref: !0,
|
|
374
375
|
__self: !0,
|
|
375
376
|
__source: !0
|
|
376
|
-
},
|
|
377
|
-
|
|
378
|
-
function
|
|
379
|
-
if (
|
|
377
|
+
}, me, Ee, Z;
|
|
378
|
+
Z = {};
|
|
379
|
+
function He(e) {
|
|
380
|
+
if (Y.call(e, "ref")) {
|
|
380
381
|
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
381
382
|
if (r && r.isReactWarning)
|
|
382
383
|
return !1;
|
|
383
384
|
}
|
|
384
385
|
return e.ref !== void 0;
|
|
385
386
|
}
|
|
386
|
-
function
|
|
387
|
-
if (
|
|
387
|
+
function Xe(e) {
|
|
388
|
+
if (Y.call(e, "key")) {
|
|
388
389
|
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
389
390
|
if (r && r.isReactWarning)
|
|
390
391
|
return !1;
|
|
391
392
|
}
|
|
392
393
|
return e.key !== void 0;
|
|
393
394
|
}
|
|
394
|
-
function
|
|
395
|
-
if (typeof e.ref == "string" &&
|
|
396
|
-
var t =
|
|
397
|
-
|
|
395
|
+
function Ze(e, r) {
|
|
396
|
+
if (typeof e.ref == "string" && V.current && r && V.current.stateNode !== r) {
|
|
397
|
+
var t = T(V.current.type);
|
|
398
|
+
Z[t] || (d('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', T(V.current.type), e.ref), Z[t] = !0);
|
|
398
399
|
}
|
|
399
400
|
}
|
|
400
|
-
function
|
|
401
|
+
function Qe(e, r) {
|
|
401
402
|
{
|
|
402
403
|
var t = function() {
|
|
403
|
-
|
|
404
|
+
me || (me = !0, d("%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)", r));
|
|
404
405
|
};
|
|
405
406
|
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
406
407
|
get: t,
|
|
@@ -408,10 +409,10 @@ function cr() {
|
|
|
408
409
|
});
|
|
409
410
|
}
|
|
410
411
|
}
|
|
411
|
-
function
|
|
412
|
+
function er(e, r) {
|
|
412
413
|
{
|
|
413
414
|
var t = function() {
|
|
414
|
-
|
|
415
|
+
Ee || (Ee = !0, d("%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)", r));
|
|
415
416
|
};
|
|
416
417
|
t.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
417
418
|
get: t,
|
|
@@ -419,10 +420,10 @@ function cr() {
|
|
|
419
420
|
});
|
|
420
421
|
}
|
|
421
422
|
}
|
|
422
|
-
var
|
|
423
|
+
var rr = function(e, r, t, n, i, u, o) {
|
|
423
424
|
var a = {
|
|
424
425
|
// This tag allows us to uniquely identify this as a React Element
|
|
425
|
-
$$typeof:
|
|
426
|
+
$$typeof: y,
|
|
426
427
|
// Built-in properties that belong on the element
|
|
427
428
|
type: e,
|
|
428
429
|
key: r,
|
|
@@ -448,41 +449,41 @@ function cr() {
|
|
|
448
449
|
value: i
|
|
449
450
|
}), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
|
|
450
451
|
};
|
|
451
|
-
function
|
|
452
|
+
function tr(e, r, t, n, i) {
|
|
452
453
|
{
|
|
453
454
|
var u, o = {}, a = null, v = null;
|
|
454
|
-
t !== void 0 && (
|
|
455
|
+
t !== void 0 && (be(t), a = "" + t), Xe(r) && (be(r.key), a = "" + r.key), He(r) && (v = r.ref, Ze(r, i));
|
|
455
456
|
for (u in r)
|
|
456
|
-
|
|
457
|
+
Y.call(r, u) && !ze.hasOwnProperty(u) && (o[u] = r[u]);
|
|
457
458
|
if (e && e.defaultProps) {
|
|
458
|
-
var
|
|
459
|
-
for (u in
|
|
460
|
-
o[u] === void 0 && (o[u] =
|
|
459
|
+
var l = e.defaultProps;
|
|
460
|
+
for (u in l)
|
|
461
|
+
o[u] === void 0 && (o[u] = l[u]);
|
|
461
462
|
}
|
|
462
463
|
if (a || v) {
|
|
463
|
-
var
|
|
464
|
-
a &&
|
|
464
|
+
var f = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
465
|
+
a && Qe(o, f), v && er(o, f);
|
|
465
466
|
}
|
|
466
|
-
return
|
|
467
|
+
return rr(e, a, v, i, n, V.current, o);
|
|
467
468
|
}
|
|
468
469
|
}
|
|
469
|
-
var
|
|
470
|
-
function
|
|
470
|
+
var Q = _.ReactCurrentOwner, _e = _.ReactDebugCurrentFrame;
|
|
471
|
+
function D(e) {
|
|
471
472
|
if (e) {
|
|
472
|
-
var r = e._owner, t =
|
|
473
|
-
|
|
473
|
+
var r = e._owner, t = B(e.type, e._source, r ? r.type : null);
|
|
474
|
+
_e.setExtraStackFrame(t);
|
|
474
475
|
} else
|
|
475
|
-
|
|
476
|
+
_e.setExtraStackFrame(null);
|
|
476
477
|
}
|
|
477
|
-
var
|
|
478
|
-
|
|
479
|
-
function
|
|
480
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
478
|
+
var ee;
|
|
479
|
+
ee = !1;
|
|
480
|
+
function re(e) {
|
|
481
|
+
return typeof e == "object" && e !== null && e.$$typeof === y;
|
|
481
482
|
}
|
|
482
|
-
function
|
|
483
|
+
function Te() {
|
|
483
484
|
{
|
|
484
|
-
if (
|
|
485
|
-
var e =
|
|
485
|
+
if (Q.current) {
|
|
486
|
+
var e = T(Q.current.type);
|
|
486
487
|
if (e)
|
|
487
488
|
return `
|
|
488
489
|
|
|
@@ -491,13 +492,13 @@ Check the render method of \`` + e + "`.";
|
|
|
491
492
|
return "";
|
|
492
493
|
}
|
|
493
494
|
}
|
|
494
|
-
function
|
|
495
|
+
function nr(e) {
|
|
495
496
|
return "";
|
|
496
497
|
}
|
|
497
|
-
var
|
|
498
|
-
function
|
|
498
|
+
var Oe = {};
|
|
499
|
+
function ar(e) {
|
|
499
500
|
{
|
|
500
|
-
var r =
|
|
501
|
+
var r = Te();
|
|
501
502
|
if (!r) {
|
|
502
503
|
var t = typeof e == "string" ? e : e.displayName || e.name;
|
|
503
504
|
t && (r = `
|
|
@@ -507,39 +508,39 @@ Check the top-level render call using <` + t + ">.");
|
|
|
507
508
|
return r;
|
|
508
509
|
}
|
|
509
510
|
}
|
|
510
|
-
function
|
|
511
|
+
function Pe(e, r) {
|
|
511
512
|
{
|
|
512
513
|
if (!e._store || e._store.validated || e.key != null)
|
|
513
514
|
return;
|
|
514
515
|
e._store.validated = !0;
|
|
515
|
-
var t =
|
|
516
|
-
if (
|
|
516
|
+
var t = ar(r);
|
|
517
|
+
if (Oe[t])
|
|
517
518
|
return;
|
|
518
|
-
|
|
519
|
+
Oe[t] = !0;
|
|
519
520
|
var n = "";
|
|
520
|
-
e && e._owner && e._owner !==
|
|
521
|
+
e && e._owner && e._owner !== Q.current && (n = " It was passed a child from " + T(e._owner.type) + "."), D(e), d('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), D(null);
|
|
521
522
|
}
|
|
522
523
|
}
|
|
523
|
-
function
|
|
524
|
+
function we(e, r) {
|
|
524
525
|
{
|
|
525
526
|
if (typeof e != "object")
|
|
526
527
|
return;
|
|
527
|
-
if (
|
|
528
|
+
if (X(e))
|
|
528
529
|
for (var t = 0; t < e.length; t++) {
|
|
529
530
|
var n = e[t];
|
|
530
|
-
|
|
531
|
+
re(n) && Pe(n, r);
|
|
531
532
|
}
|
|
532
|
-
else if (
|
|
533
|
+
else if (re(e))
|
|
533
534
|
e._store && (e._store.validated = !0);
|
|
534
535
|
else if (e) {
|
|
535
|
-
var i =
|
|
536
|
+
var i = $(e);
|
|
536
537
|
if (typeof i == "function" && i !== e.entries)
|
|
537
538
|
for (var u = i.call(e), o; !(o = u.next()).done; )
|
|
538
|
-
|
|
539
|
+
re(o.value) && Pe(o.value, r);
|
|
539
540
|
}
|
|
540
541
|
}
|
|
541
542
|
}
|
|
542
|
-
function
|
|
543
|
+
function or(e) {
|
|
543
544
|
{
|
|
544
545
|
var r = e.type;
|
|
545
546
|
if (r == null || typeof r == "string")
|
|
@@ -547,103 +548,172 @@ Check the top-level render call using <` + t + ">.");
|
|
|
547
548
|
var t;
|
|
548
549
|
if (typeof r == "function")
|
|
549
550
|
t = r.propTypes;
|
|
550
|
-
else if (typeof r == "object" && (r.$$typeof ===
|
|
551
|
+
else if (typeof r == "object" && (r.$$typeof === s || // Note: Memo only checks outer props here.
|
|
551
552
|
// Inner props are checked in the reconciler.
|
|
552
|
-
r.$$typeof ===
|
|
553
|
+
r.$$typeof === R))
|
|
553
554
|
t = r.propTypes;
|
|
554
555
|
else
|
|
555
556
|
return;
|
|
556
557
|
if (t) {
|
|
557
|
-
var n =
|
|
558
|
-
|
|
559
|
-
} else if (r.PropTypes !== void 0 && !
|
|
560
|
-
|
|
561
|
-
var i =
|
|
562
|
-
|
|
558
|
+
var n = T(r);
|
|
559
|
+
Be(t, e.props, "prop", n, e);
|
|
560
|
+
} else if (r.PropTypes !== void 0 && !ee) {
|
|
561
|
+
ee = !0;
|
|
562
|
+
var i = T(r);
|
|
563
|
+
d("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", i || "Unknown");
|
|
563
564
|
}
|
|
564
|
-
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved &&
|
|
565
|
+
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && d("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
565
566
|
}
|
|
566
567
|
}
|
|
567
|
-
function
|
|
568
|
+
function ir(e) {
|
|
568
569
|
{
|
|
569
570
|
for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
|
|
570
571
|
var n = r[t];
|
|
571
572
|
if (n !== "children" && n !== "key") {
|
|
572
|
-
|
|
573
|
+
D(e), d("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), D(null);
|
|
573
574
|
break;
|
|
574
575
|
}
|
|
575
576
|
}
|
|
576
|
-
e.ref !== null && (
|
|
577
|
+
e.ref !== null && (D(e), d("Invalid attribute `ref` supplied to `React.Fragment`."), D(null));
|
|
577
578
|
}
|
|
578
579
|
}
|
|
579
|
-
var
|
|
580
|
-
function
|
|
580
|
+
var Se = {};
|
|
581
|
+
function Ce(e, r, t, n, i, u) {
|
|
581
582
|
{
|
|
582
|
-
var o =
|
|
583
|
+
var o = Ye(e);
|
|
583
584
|
if (!o) {
|
|
584
585
|
var a = "";
|
|
585
586
|
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (a += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
586
|
-
var v =
|
|
587
|
-
v ? a += v : a +=
|
|
588
|
-
var
|
|
589
|
-
e === null ?
|
|
587
|
+
var v = nr();
|
|
588
|
+
v ? a += v : a += Te();
|
|
589
|
+
var l;
|
|
590
|
+
e === null ? l = "null" : X(e) ? l = "array" : e !== void 0 && e.$$typeof === y ? (l = "<" + (T(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : l = typeof e, d("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", l, a);
|
|
590
591
|
}
|
|
591
|
-
var
|
|
592
|
-
if (
|
|
593
|
-
return
|
|
592
|
+
var f = tr(e, r, t, i, u);
|
|
593
|
+
if (f == null)
|
|
594
|
+
return f;
|
|
594
595
|
if (o) {
|
|
595
596
|
var g = r.children;
|
|
596
597
|
if (g !== void 0)
|
|
597
598
|
if (n)
|
|
598
|
-
if (
|
|
599
|
-
for (var
|
|
600
|
-
|
|
599
|
+
if (X(g)) {
|
|
600
|
+
for (var F = 0; F < g.length; F++)
|
|
601
|
+
we(g[F], e);
|
|
601
602
|
Object.freeze && Object.freeze(g);
|
|
602
603
|
} else
|
|
603
|
-
|
|
604
|
+
d("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
604
605
|
else
|
|
605
|
-
|
|
606
|
+
we(g, e);
|
|
606
607
|
}
|
|
607
|
-
if (
|
|
608
|
-
var
|
|
609
|
-
return
|
|
610
|
-
}),
|
|
611
|
-
if (!
|
|
612
|
-
var
|
|
613
|
-
|
|
608
|
+
if (Y.call(r, "key")) {
|
|
609
|
+
var x = T(e), p = Object.keys(r).filter(function(dr) {
|
|
610
|
+
return dr !== "key";
|
|
611
|
+
}), te = p.length > 0 ? "{key: someKey, " + p.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
612
|
+
if (!Se[x + te]) {
|
|
613
|
+
var cr = p.length > 0 ? "{" + p.join(": ..., ") + ": ...}" : "{}";
|
|
614
|
+
d(`A props object containing a "key" prop is being spread into JSX:
|
|
614
615
|
let props = %s;
|
|
615
616
|
<%s {...props} />
|
|
616
617
|
React keys must be passed directly to JSX without using spread:
|
|
617
618
|
let props = %s;
|
|
618
|
-
<%s key={someKey} {...props} />`,
|
|
619
|
+
<%s key={someKey} {...props} />`, te, x, cr, x), Se[x + te] = !0;
|
|
619
620
|
}
|
|
620
621
|
}
|
|
621
|
-
return e ===
|
|
622
|
+
return e === b ? ir(f) : or(f), f;
|
|
622
623
|
}
|
|
623
624
|
}
|
|
624
|
-
function
|
|
625
|
-
return
|
|
625
|
+
function ur(e, r, t) {
|
|
626
|
+
return Ce(e, r, t, !0);
|
|
626
627
|
}
|
|
627
|
-
function
|
|
628
|
-
return
|
|
628
|
+
function sr(e, r, t) {
|
|
629
|
+
return Ce(e, r, t, !1);
|
|
629
630
|
}
|
|
630
|
-
var
|
|
631
|
-
|
|
632
|
-
}()),
|
|
631
|
+
var lr = sr, fr = ur;
|
|
632
|
+
M.Fragment = b, M.jsx = lr, M.jsxs = fr;
|
|
633
|
+
}()), M;
|
|
633
634
|
}
|
|
634
|
-
process.env.NODE_ENV === "production" ?
|
|
635
|
-
var
|
|
636
|
-
const
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
635
|
+
process.env.NODE_ENV === "production" ? ae.exports = hr() : ae.exports = Rr();
|
|
636
|
+
var A = ae.exports;
|
|
637
|
+
const _r = ({
|
|
638
|
+
src: w,
|
|
639
|
+
srcWebm: y,
|
|
640
|
+
width: C,
|
|
641
|
+
height: b,
|
|
642
|
+
thumbnail: m,
|
|
643
|
+
ratio: O = 0,
|
|
644
|
+
className: P,
|
|
645
|
+
loadingOverlay: h
|
|
646
|
+
}) => {
|
|
647
|
+
const s = ke(null);
|
|
648
|
+
return vr(() => {
|
|
649
|
+
s.current && s.current.setRatio(O);
|
|
650
|
+
}, [O]), /* @__PURE__ */ A.jsx(
|
|
651
|
+
br,
|
|
652
|
+
{
|
|
653
|
+
ref: s,
|
|
654
|
+
width: C,
|
|
655
|
+
height: b,
|
|
656
|
+
src: w,
|
|
657
|
+
srcWebm: y,
|
|
658
|
+
className: P,
|
|
659
|
+
thumbnail: m,
|
|
660
|
+
loadingOverlay: h
|
|
661
|
+
}
|
|
662
|
+
);
|
|
663
|
+
}, br = K.memo(
|
|
664
|
+
K.forwardRef(
|
|
665
|
+
({ src: w, srcWebm: y, width: C, height: b, thumbnail: m, className: O, loadingOverlay: P }, h) => {
|
|
666
|
+
const s = ke(null), [S, c] = pr(!0), R = ne((I) => {
|
|
667
|
+
const $ = s.current;
|
|
668
|
+
if (!$)
|
|
669
|
+
return;
|
|
670
|
+
const _ = $.duration;
|
|
671
|
+
isNaN(_) || requestAnimationFrame(() => {
|
|
672
|
+
$.currentTime = Math.round(I * _ * 100) / 100, console.log("setRatio", I, Math.round(I * _ * 100) / 100);
|
|
673
|
+
});
|
|
674
|
+
}, []), E = yr(R);
|
|
675
|
+
gr(
|
|
676
|
+
h,
|
|
677
|
+
() => ({
|
|
678
|
+
setRatio: E
|
|
679
|
+
}),
|
|
680
|
+
[E]
|
|
681
|
+
);
|
|
682
|
+
const k = ne(() => {
|
|
683
|
+
console.log("waiting"), c(!0);
|
|
684
|
+
}, []), U = ne(() => {
|
|
685
|
+
console.log("can play"), c(!1);
|
|
686
|
+
}, []);
|
|
687
|
+
return /* @__PURE__ */ A.jsxs("div", { style: { position: "relative", width: "100%", height: "100%" }, children: [
|
|
688
|
+
/* @__PURE__ */ A.jsxs(
|
|
689
|
+
"video",
|
|
690
|
+
{
|
|
691
|
+
ref: s,
|
|
692
|
+
width: C,
|
|
693
|
+
height: b,
|
|
694
|
+
className: O,
|
|
695
|
+
muted: !0,
|
|
696
|
+
disablePictureInPicture: !0,
|
|
697
|
+
disableRemotePlayback: !0,
|
|
698
|
+
playsInline: !0,
|
|
699
|
+
controls: !1,
|
|
700
|
+
preload: "auto",
|
|
701
|
+
onWaiting: k,
|
|
702
|
+
onCanPlay: U,
|
|
703
|
+
poster: m,
|
|
704
|
+
children: [
|
|
705
|
+
y && /* @__PURE__ */ A.jsx("source", { src: m ? y : `${y}#t=0.1`, type: "video/webm" }),
|
|
706
|
+
/* @__PURE__ */ A.jsx("source", { src: m ? w : `${w}#t=0.1`, type: "video/mp4" })
|
|
707
|
+
]
|
|
708
|
+
}
|
|
709
|
+
),
|
|
710
|
+
/* @__PURE__ */ A.jsx("div", { style: { position: "absolute", inset: 0 }, children: S && P })
|
|
711
|
+
] });
|
|
712
|
+
}
|
|
713
|
+
)
|
|
645
714
|
);
|
|
646
715
|
export {
|
|
647
|
-
|
|
716
|
+
_r as Video,
|
|
717
|
+
br as VideoWithImperativeHandle
|
|
648
718
|
};
|
|
649
719
|
//# sourceMappingURL=index.es.js.map
|