@mjhls/mjh-framework 1.0.239 → 1.0.240
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 +174 -174
- package/dist/cjs/AdSlot-c472fff6.js +1192 -0
- package/dist/cjs/DeckContent.js +15 -14
- package/dist/cjs/DeckQueue.js +6 -6
- package/dist/cjs/{Dfp-045b016b.js → Dfp-7a5533f9.js} +1 -1
- package/dist/cjs/{GridContent-21bc198f.js → GridContent-f9e3fff5.js} +8 -8
- package/dist/cjs/GridContent.js +9 -8
- package/dist/cjs/IssueContentDeck.js +1 -1
- package/dist/cjs/IssueDeck.js +1 -1
- package/dist/cjs/MasterDeck.js +332 -14
- package/dist/cjs/{Normal-c89b709d.js → Normal-0497eb61.js} +32 -32
- package/dist/cjs/PublicationDeck.js +1 -1
- package/dist/cjs/QueueDeckExpanded.js +3 -3
- package/dist/cjs/{TaxonomyCard-e3566492.js → TaxonomyCard-b5074d6e.js} +1 -1
- package/dist/cjs/TaxonomyCard.js +2 -2
- package/dist/cjs/TemplateNormal.js +6 -5
- package/dist/cjs/ThumbnailCard.js +1 -1
- package/dist/cjs/VideoSeriesListing.js +3 -3
- package/dist/cjs/{YoutubeGroup-5f480446.js → YoutubeGroup-fd44f8a0.js} +4 -4
- package/dist/cjs/YoutubeGroup.js +1 -1
- package/dist/cjs/{debounce-bbca43c4.js → debounce-783eb233.js} +3 -0
- package/dist/cjs/{get-af2516a4.js → get-1f91592f.js} +1 -1
- package/dist/cjs/{index-be0c82be.js → index-39beccb3.js} +2 -1
- package/dist/cjs/index.js +643 -1355
- package/dist/cjs/{inherits-5b5ca8db.js → inherits-9898af5a.js} +2 -4
- package/dist/cjs/{main-d9a1b014.js → main-0ea1b808.js} +51 -0
- package/dist/cjs/{MasterDeck-f8fbac3c.js → promise-b96c61f8.js} +7 -340
- package/dist/cjs/{toConsumableArray-7e4caf3c.js → toConsumableArray-f05a306f.js} +5 -52
- package/dist/esm/AdSlot-bdd7a629.js +1183 -0
- package/dist/esm/DeckContent.js +20 -19
- package/dist/esm/DeckQueue.js +10 -10
- package/dist/esm/{Dfp-01f14ae3.js → Dfp-71879c9d.js} +5 -5
- package/dist/esm/{GridContent-73c97039.js → GridContent-d4f5457e.js} +9 -9
- package/dist/esm/GridContent.js +14 -13
- package/dist/esm/IssueContentDeck.js +1 -1
- package/dist/esm/IssueDeck.js +1 -1
- package/dist/esm/MasterDeck.js +334 -16
- package/dist/esm/{Normal-fdd55386.js → Normal-e1855047.js} +33 -33
- package/dist/esm/PublicationDeck.js +1 -1
- package/dist/esm/QueueDeckExpanded.js +8 -8
- package/dist/esm/{TaxonomyCard-a7b7ded8.js → TaxonomyCard-ee1a22ae.js} +2 -2
- package/dist/esm/TaxonomyCard.js +4 -4
- package/dist/esm/TemplateNormal.js +10 -9
- package/dist/esm/ThumbnailCard.js +1 -1
- package/dist/esm/{Ustream-62a07a32.js → Ustream-d51b9b11.js} +1 -1
- package/dist/esm/Ustream.js +5 -5
- package/dist/esm/VideoSeriesListing.js +6 -6
- package/dist/esm/{YoutubeGroup-78d93d44.js → YoutubeGroup-1b3eca73.js} +4 -4
- package/dist/esm/YoutubeGroup.js +1 -1
- package/dist/esm/{_to-object-86553f76.js → _to-object-b9b796ec.js} +1 -1
- package/dist/esm/{core.get-iterator-method-709061dc.js → core.get-iterator-method-31c1fb1a.js} +2 -2
- package/dist/esm/{debounce-fa7fbf11.js → debounce-806f886b.js} +3 -1
- package/dist/esm/{extends-7f88fa22.js → extends-dbbe308d.js} +1 -1
- package/dist/esm/{get-8d382479.js → get-b2201dc8.js} +1 -1
- package/dist/esm/{index-73819142.js → index-3849e3fe.js} +2 -1
- package/dist/esm/index.js +649 -1363
- package/dist/esm/{inherits-a82a4471.js → inherits-a75c8a1c.js} +5 -6
- package/dist/esm/{main-eecf7b27.js → main-155ec04f.js} +48 -1
- package/dist/esm/{MasterDeck-238f31d7.js → promise-683a9c54.js} +6 -335
- package/dist/esm/{slicedToArray-eb7eca9e.js → slicedToArray-d0a9593a.js} +3 -3
- package/dist/esm/{toConsumableArray-08d50169.js → toConsumableArray-eb308ede.js} +5 -49
- package/dist/esm/{web.dom.iterable-f05d2f57.js → web.dom.iterable-3be50d6c.js} +2 -2
- package/package.json +102 -101
- package/dist/cjs/AdSlot-1fe1c231.js +0 -69
- package/dist/esm/AdSlot-017b8051.js +0 -64
package/dist/esm/index.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { c as createCommonjsModule,
|
|
2
|
-
import { _ as
|
|
3
|
-
import './web.dom.iterable-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import './
|
|
7
|
-
import
|
|
1
|
+
import { c as createCommonjsModule, a as commonjsGlobal, g as getCjsExportFromNamespace, u as unwrapExports } from './_commonjsHelpers-0c4b6f40.js';
|
|
2
|
+
import { _ as _objectKeys, a as _toObject, b as _core } from './_to-object-b9b796ec.js';
|
|
3
|
+
import './web.dom.iterable-3be50d6c.js';
|
|
4
|
+
import { d as debounce_1 } from './debounce-806f886b.js';
|
|
5
|
+
import { m as main_36, a as main_16, b as main_35 } from './main-155ec04f.js';
|
|
6
|
+
import { _ as _toConsumableArray, a as _Array$from } from './toConsumableArray-eb308ede.js';
|
|
7
|
+
import './core.get-iterator-method-31c1fb1a.js';
|
|
8
|
+
import { _ as _extends$2 } from './extends-dbbe308d.js';
|
|
9
|
+
import { _ as _objectSap, a as _inherits$1, b as _classCallCheck$1, c as _possibleConstructorReturn$1, d as _Object$getPrototypeOf, e as _createClass$1 } from './inherits-a75c8a1c.js';
|
|
8
10
|
import React__default, { useState, useEffect, useRef } from 'react';
|
|
9
11
|
import { l as lib_3, a as lib_1 } from './index-fa84ea96.js';
|
|
10
12
|
import PropTypes from 'prop-types';
|
|
@@ -15,41 +17,39 @@ import 'react-bootstrap/Card';
|
|
|
15
17
|
import { m as moment, I as InfiniteScroll, V as VisibilitySensor } from './visibility-sensor-336093e1.js';
|
|
16
18
|
import Link from 'next/link';
|
|
17
19
|
import Router, { useRouter } from 'next/router';
|
|
18
|
-
import { d as debounce_1 } from './debounce-fa7fbf11.js';
|
|
19
20
|
import 'react-dom';
|
|
20
|
-
import { i as imageUrlBuilder } from './index-
|
|
21
|
+
import { i as imageUrlBuilder } from './index-3849e3fe.js';
|
|
21
22
|
import './index-5f9f807a.js';
|
|
22
|
-
import { m as main_36, a as main_35 } from './main-eecf7b27.js';
|
|
23
23
|
import { h as html_decode_1, c as clean_html_1 } from './entities-7cc3bf45.js';
|
|
24
|
-
import { _ as _slicedToArray } from './slicedToArray-
|
|
25
|
-
import { D as DFPAdSlot } from './AdSlot-
|
|
26
|
-
export { D as AdSlot } from './AdSlot-
|
|
24
|
+
import { _ as _slicedToArray } from './slicedToArray-d0a9593a.js';
|
|
25
|
+
import { _ as _JSON$stringify, a as _asyncToGenerator, r as regenerator, D as DFPAdSlot, B as Beam } from './AdSlot-bdd7a629.js';
|
|
26
|
+
export { D as AdSlot, B as Beam } from './AdSlot-bdd7a629.js';
|
|
27
|
+
import './promise-683a9c54.js';
|
|
27
28
|
export { default as DeckContent } from './DeckContent.js';
|
|
28
|
-
import './get-
|
|
29
|
-
export { A as AD, G as GridContent } from './GridContent-
|
|
29
|
+
import './get-b2201dc8.js';
|
|
30
|
+
export { A as AD, G as GridContent } from './GridContent-d4f5457e.js';
|
|
30
31
|
export { default as DeckQueue } from './DeckQueue.js';
|
|
31
32
|
import 'react-bootstrap/Media';
|
|
32
33
|
export { default as ThumbnailCard } from './ThumbnailCard.js';
|
|
33
|
-
import { B as BlockContent } from './TaxonomyCard-
|
|
34
|
-
export { T as TaxonomyCard } from './TaxonomyCard-
|
|
34
|
+
import { B as BlockContent } from './TaxonomyCard-ee1a22ae.js';
|
|
35
|
+
export { T as TaxonomyCard } from './TaxonomyCard-ee1a22ae.js';
|
|
35
36
|
import GroupDeck from './GroupDeck.js';
|
|
36
37
|
export { default as GroupDeck } from './GroupDeck.js';
|
|
37
|
-
import { g as getYoutubeId } from './YoutubeGroup-
|
|
38
|
-
export { Y as YoutubeGroup } from './YoutubeGroup-
|
|
38
|
+
import { g as getYoutubeId } from './YoutubeGroup-1b3eca73.js';
|
|
39
|
+
export { Y as YoutubeGroup } from './YoutubeGroup-1b3eca73.js';
|
|
39
40
|
import { Spinner as Spinner$1, Container as Container$1, Row as Row$1, Col as Col$1, Figure, Carousel, Table, Button as Button$1, ProgressBar, Card } from 'react-bootstrap';
|
|
40
41
|
export { default as QueueDeckExpanded } from './QueueDeckExpanded.js';
|
|
41
42
|
import { I as IoMdArrowDropdown } from './index.esm-536609db.js';
|
|
42
43
|
export { default as VideoSeriesListing } from './VideoSeriesListing.js';
|
|
43
|
-
|
|
44
|
-
export { M as MasterDeck } from './MasterDeck-238f31d7.js';
|
|
44
|
+
export { default as MasterDeck } from './MasterDeck.js';
|
|
45
45
|
import Button from 'react-bootstrap/Button';
|
|
46
46
|
export { default as PublicationDeck } from './PublicationDeck.js';
|
|
47
47
|
export { default as IssueDeck } from './IssueDeck.js';
|
|
48
48
|
import 'react-bootstrap/Badge';
|
|
49
49
|
export { default as IssueContentDeck } from './IssueContentDeck.js';
|
|
50
50
|
import Spinner from 'react-bootstrap/Spinner';
|
|
51
|
-
import { M as MdPictureAsPdf, T as TemplateNormal } from './Normal-
|
|
52
|
-
export { A as AD728x90, C as Column1, a as Column2, b as Column3, f as HamMagazine, H as Header, L as LeftNav, e as NavDvm, c as NavMagazine, N as NavNative, d as NavNormal, P as PageFilter, S as Search, g as SideFooter, T as TemplateNormal } from './Normal-
|
|
51
|
+
import { M as MdPictureAsPdf, T as TemplateNormal } from './Normal-e1855047.js';
|
|
52
|
+
export { A as AD728x90, C as Column1, a as Column2, b as Column3, f as HamMagazine, H as Header, L as LeftNav, e as NavDvm, c as NavMagazine, N as NavNative, d as NavNormal, P as PageFilter, S as Search, g as SideFooter, T as TemplateNormal } from './Normal-e1855047.js';
|
|
53
53
|
import 'react-bootstrap/ListGroup';
|
|
54
54
|
import Head from 'next/head';
|
|
55
55
|
import Accordion from 'react-bootstrap/Accordion';
|
|
@@ -65,19 +65,8 @@ import Carousel$1 from 'react-bootstrap/Carousel';
|
|
|
65
65
|
import Breadcrumb from 'react-bootstrap/Breadcrumb';
|
|
66
66
|
import DropdownButton from 'react-bootstrap/DropdownButton';
|
|
67
67
|
import Dropdown from 'react-bootstrap/Dropdown';
|
|
68
|
-
import { F as FaLongArrowAltRight } from './Ustream-
|
|
69
|
-
export { U as Ustream } from './Ustream-
|
|
70
|
-
|
|
71
|
-
var $JSON = _core.JSON || (_core.JSON = { stringify: JSON.stringify });
|
|
72
|
-
var stringify = function stringify(it) { // eslint-disable-line no-unused-vars
|
|
73
|
-
return $JSON.stringify.apply($JSON, arguments);
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
var stringify$1 = createCommonjsModule(function (module) {
|
|
77
|
-
module.exports = { "default": stringify, __esModule: true };
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
var _JSON$stringify = unwrapExports(stringify$1);
|
|
68
|
+
import { F as FaLongArrowAltRight } from './Ustream-d51b9b11.js';
|
|
69
|
+
export { U as Ustream } from './Ustream-d51b9b11.js';
|
|
81
70
|
|
|
82
71
|
var momentTimezone = createCommonjsModule(function (module) {
|
|
83
72
|
//! moment-timezone.js
|
|
@@ -1630,12 +1619,12 @@ var latest = {
|
|
|
1630
1619
|
};
|
|
1631
1620
|
|
|
1632
1621
|
var latest$1 = /*#__PURE__*/Object.freeze({
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1622
|
+
__proto__: null,
|
|
1623
|
+
version: version,
|
|
1624
|
+
zones: zones,
|
|
1625
|
+
links: links,
|
|
1626
|
+
countries: countries,
|
|
1627
|
+
'default': latest
|
|
1639
1628
|
});
|
|
1640
1629
|
|
|
1641
1630
|
var require$$1 = getCjsExportFromNamespace(latest$1);
|
|
@@ -2088,813 +2077,6 @@ var EventsDeck = function EventsDeck(_ref) {
|
|
|
2088
2077
|
}
|
|
2089
2078
|
};
|
|
2090
2079
|
|
|
2091
|
-
var runtime = createCommonjsModule(function (module) {
|
|
2092
|
-
/**
|
|
2093
|
-
* Copyright (c) 2014-present, Facebook, Inc.
|
|
2094
|
-
*
|
|
2095
|
-
* This source code is licensed under the MIT license found in the
|
|
2096
|
-
* LICENSE file in the root directory of this source tree.
|
|
2097
|
-
*/
|
|
2098
|
-
|
|
2099
|
-
!(function(global) {
|
|
2100
|
-
|
|
2101
|
-
var Op = Object.prototype;
|
|
2102
|
-
var hasOwn = Op.hasOwnProperty;
|
|
2103
|
-
var undefined$1; // More compressible than void 0.
|
|
2104
|
-
var $Symbol = typeof Symbol === "function" ? Symbol : {};
|
|
2105
|
-
var iteratorSymbol = $Symbol.iterator || "@@iterator";
|
|
2106
|
-
var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
|
|
2107
|
-
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
2108
|
-
var runtime = global.regeneratorRuntime;
|
|
2109
|
-
if (runtime) {
|
|
2110
|
-
{
|
|
2111
|
-
// If regeneratorRuntime is defined globally and we're in a module,
|
|
2112
|
-
// make the exports object identical to regeneratorRuntime.
|
|
2113
|
-
module.exports = runtime;
|
|
2114
|
-
}
|
|
2115
|
-
// Don't bother evaluating the rest of this file if the runtime was
|
|
2116
|
-
// already defined globally.
|
|
2117
|
-
return;
|
|
2118
|
-
}
|
|
2119
|
-
|
|
2120
|
-
// Define the runtime globally (as expected by generated code) as either
|
|
2121
|
-
// module.exports (if we're in a module) or a new, empty object.
|
|
2122
|
-
runtime = global.regeneratorRuntime = module.exports ;
|
|
2123
|
-
|
|
2124
|
-
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
2125
|
-
// If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
|
|
2126
|
-
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
|
|
2127
|
-
var generator = Object.create(protoGenerator.prototype);
|
|
2128
|
-
var context = new Context(tryLocsList || []);
|
|
2129
|
-
|
|
2130
|
-
// The ._invoke method unifies the implementations of the .next,
|
|
2131
|
-
// .throw, and .return methods.
|
|
2132
|
-
generator._invoke = makeInvokeMethod(innerFn, self, context);
|
|
2133
|
-
|
|
2134
|
-
return generator;
|
|
2135
|
-
}
|
|
2136
|
-
runtime.wrap = wrap;
|
|
2137
|
-
|
|
2138
|
-
// Try/catch helper to minimize deoptimizations. Returns a completion
|
|
2139
|
-
// record like context.tryEntries[i].completion. This interface could
|
|
2140
|
-
// have been (and was previously) designed to take a closure to be
|
|
2141
|
-
// invoked without arguments, but in all the cases we care about we
|
|
2142
|
-
// already have an existing method we want to call, so there's no need
|
|
2143
|
-
// to create a new function object. We can even get away with assuming
|
|
2144
|
-
// the method takes exactly one argument, since that happens to be true
|
|
2145
|
-
// in every case, so we don't have to touch the arguments object. The
|
|
2146
|
-
// only additional allocation required is the completion record, which
|
|
2147
|
-
// has a stable shape and so hopefully should be cheap to allocate.
|
|
2148
|
-
function tryCatch(fn, obj, arg) {
|
|
2149
|
-
try {
|
|
2150
|
-
return { type: "normal", arg: fn.call(obj, arg) };
|
|
2151
|
-
} catch (err) {
|
|
2152
|
-
return { type: "throw", arg: err };
|
|
2153
|
-
}
|
|
2154
|
-
}
|
|
2155
|
-
|
|
2156
|
-
var GenStateSuspendedStart = "suspendedStart";
|
|
2157
|
-
var GenStateSuspendedYield = "suspendedYield";
|
|
2158
|
-
var GenStateExecuting = "executing";
|
|
2159
|
-
var GenStateCompleted = "completed";
|
|
2160
|
-
|
|
2161
|
-
// Returning this object from the innerFn has the same effect as
|
|
2162
|
-
// breaking out of the dispatch switch statement.
|
|
2163
|
-
var ContinueSentinel = {};
|
|
2164
|
-
|
|
2165
|
-
// Dummy constructor functions that we use as the .constructor and
|
|
2166
|
-
// .constructor.prototype properties for functions that return Generator
|
|
2167
|
-
// objects. For full spec compliance, you may wish to configure your
|
|
2168
|
-
// minifier not to mangle the names of these two functions.
|
|
2169
|
-
function Generator() {}
|
|
2170
|
-
function GeneratorFunction() {}
|
|
2171
|
-
function GeneratorFunctionPrototype() {}
|
|
2172
|
-
|
|
2173
|
-
// This is a polyfill for %IteratorPrototype% for environments that
|
|
2174
|
-
// don't natively support it.
|
|
2175
|
-
var IteratorPrototype = {};
|
|
2176
|
-
IteratorPrototype[iteratorSymbol] = function () {
|
|
2177
|
-
return this;
|
|
2178
|
-
};
|
|
2179
|
-
|
|
2180
|
-
var getProto = Object.getPrototypeOf;
|
|
2181
|
-
var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
2182
|
-
if (NativeIteratorPrototype &&
|
|
2183
|
-
NativeIteratorPrototype !== Op &&
|
|
2184
|
-
hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
|
|
2185
|
-
// This environment has a native %IteratorPrototype%; use it instead
|
|
2186
|
-
// of the polyfill.
|
|
2187
|
-
IteratorPrototype = NativeIteratorPrototype;
|
|
2188
|
-
}
|
|
2189
|
-
|
|
2190
|
-
var Gp = GeneratorFunctionPrototype.prototype =
|
|
2191
|
-
Generator.prototype = Object.create(IteratorPrototype);
|
|
2192
|
-
GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
|
|
2193
|
-
GeneratorFunctionPrototype.constructor = GeneratorFunction;
|
|
2194
|
-
GeneratorFunctionPrototype[toStringTagSymbol] =
|
|
2195
|
-
GeneratorFunction.displayName = "GeneratorFunction";
|
|
2196
|
-
|
|
2197
|
-
// Helper for defining the .next, .throw, and .return methods of the
|
|
2198
|
-
// Iterator interface in terms of a single ._invoke method.
|
|
2199
|
-
function defineIteratorMethods(prototype) {
|
|
2200
|
-
["next", "throw", "return"].forEach(function(method) {
|
|
2201
|
-
prototype[method] = function(arg) {
|
|
2202
|
-
return this._invoke(method, arg);
|
|
2203
|
-
};
|
|
2204
|
-
});
|
|
2205
|
-
}
|
|
2206
|
-
|
|
2207
|
-
runtime.isGeneratorFunction = function(genFun) {
|
|
2208
|
-
var ctor = typeof genFun === "function" && genFun.constructor;
|
|
2209
|
-
return ctor
|
|
2210
|
-
? ctor === GeneratorFunction ||
|
|
2211
|
-
// For the native GeneratorFunction constructor, the best we can
|
|
2212
|
-
// do is to check its .name property.
|
|
2213
|
-
(ctor.displayName || ctor.name) === "GeneratorFunction"
|
|
2214
|
-
: false;
|
|
2215
|
-
};
|
|
2216
|
-
|
|
2217
|
-
runtime.mark = function(genFun) {
|
|
2218
|
-
if (Object.setPrototypeOf) {
|
|
2219
|
-
Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
|
|
2220
|
-
} else {
|
|
2221
|
-
genFun.__proto__ = GeneratorFunctionPrototype;
|
|
2222
|
-
if (!(toStringTagSymbol in genFun)) {
|
|
2223
|
-
genFun[toStringTagSymbol] = "GeneratorFunction";
|
|
2224
|
-
}
|
|
2225
|
-
}
|
|
2226
|
-
genFun.prototype = Object.create(Gp);
|
|
2227
|
-
return genFun;
|
|
2228
|
-
};
|
|
2229
|
-
|
|
2230
|
-
// Within the body of any async function, `await x` is transformed to
|
|
2231
|
-
// `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
|
|
2232
|
-
// `hasOwn.call(value, "__await")` to determine if the yielded value is
|
|
2233
|
-
// meant to be awaited.
|
|
2234
|
-
runtime.awrap = function(arg) {
|
|
2235
|
-
return { __await: arg };
|
|
2236
|
-
};
|
|
2237
|
-
|
|
2238
|
-
function AsyncIterator(generator) {
|
|
2239
|
-
function invoke(method, arg, resolve, reject) {
|
|
2240
|
-
var record = tryCatch(generator[method], generator, arg);
|
|
2241
|
-
if (record.type === "throw") {
|
|
2242
|
-
reject(record.arg);
|
|
2243
|
-
} else {
|
|
2244
|
-
var result = record.arg;
|
|
2245
|
-
var value = result.value;
|
|
2246
|
-
if (value &&
|
|
2247
|
-
typeof value === "object" &&
|
|
2248
|
-
hasOwn.call(value, "__await")) {
|
|
2249
|
-
return Promise.resolve(value.__await).then(function(value) {
|
|
2250
|
-
invoke("next", value, resolve, reject);
|
|
2251
|
-
}, function(err) {
|
|
2252
|
-
invoke("throw", err, resolve, reject);
|
|
2253
|
-
});
|
|
2254
|
-
}
|
|
2255
|
-
|
|
2256
|
-
return Promise.resolve(value).then(function(unwrapped) {
|
|
2257
|
-
// When a yielded Promise is resolved, its final value becomes
|
|
2258
|
-
// the .value of the Promise<{value,done}> result for the
|
|
2259
|
-
// current iteration. If the Promise is rejected, however, the
|
|
2260
|
-
// result for this iteration will be rejected with the same
|
|
2261
|
-
// reason. Note that rejections of yielded Promises are not
|
|
2262
|
-
// thrown back into the generator function, as is the case
|
|
2263
|
-
// when an awaited Promise is rejected. This difference in
|
|
2264
|
-
// behavior between yield and await is important, because it
|
|
2265
|
-
// allows the consumer to decide what to do with the yielded
|
|
2266
|
-
// rejection (swallow it and continue, manually .throw it back
|
|
2267
|
-
// into the generator, abandon iteration, whatever). With
|
|
2268
|
-
// await, by contrast, there is no opportunity to examine the
|
|
2269
|
-
// rejection reason outside the generator function, so the
|
|
2270
|
-
// only option is to throw it from the await expression, and
|
|
2271
|
-
// let the generator function handle the exception.
|
|
2272
|
-
result.value = unwrapped;
|
|
2273
|
-
resolve(result);
|
|
2274
|
-
}, reject);
|
|
2275
|
-
}
|
|
2276
|
-
}
|
|
2277
|
-
|
|
2278
|
-
var previousPromise;
|
|
2279
|
-
|
|
2280
|
-
function enqueue(method, arg) {
|
|
2281
|
-
function callInvokeWithMethodAndArg() {
|
|
2282
|
-
return new Promise(function(resolve, reject) {
|
|
2283
|
-
invoke(method, arg, resolve, reject);
|
|
2284
|
-
});
|
|
2285
|
-
}
|
|
2286
|
-
|
|
2287
|
-
return previousPromise =
|
|
2288
|
-
// If enqueue has been called before, then we want to wait until
|
|
2289
|
-
// all previous Promises have been resolved before calling invoke,
|
|
2290
|
-
// so that results are always delivered in the correct order. If
|
|
2291
|
-
// enqueue has not been called before, then it is important to
|
|
2292
|
-
// call invoke immediately, without waiting on a callback to fire,
|
|
2293
|
-
// so that the async generator function has the opportunity to do
|
|
2294
|
-
// any necessary setup in a predictable way. This predictability
|
|
2295
|
-
// is why the Promise constructor synchronously invokes its
|
|
2296
|
-
// executor callback, and why async functions synchronously
|
|
2297
|
-
// execute code before the first await. Since we implement simple
|
|
2298
|
-
// async functions in terms of async generators, it is especially
|
|
2299
|
-
// important to get this right, even though it requires care.
|
|
2300
|
-
previousPromise ? previousPromise.then(
|
|
2301
|
-
callInvokeWithMethodAndArg,
|
|
2302
|
-
// Avoid propagating failures to Promises returned by later
|
|
2303
|
-
// invocations of the iterator.
|
|
2304
|
-
callInvokeWithMethodAndArg
|
|
2305
|
-
) : callInvokeWithMethodAndArg();
|
|
2306
|
-
}
|
|
2307
|
-
|
|
2308
|
-
// Define the unified helper method that is used to implement .next,
|
|
2309
|
-
// .throw, and .return (see defineIteratorMethods).
|
|
2310
|
-
this._invoke = enqueue;
|
|
2311
|
-
}
|
|
2312
|
-
|
|
2313
|
-
defineIteratorMethods(AsyncIterator.prototype);
|
|
2314
|
-
AsyncIterator.prototype[asyncIteratorSymbol] = function () {
|
|
2315
|
-
return this;
|
|
2316
|
-
};
|
|
2317
|
-
runtime.AsyncIterator = AsyncIterator;
|
|
2318
|
-
|
|
2319
|
-
// Note that simple async functions are implemented on top of
|
|
2320
|
-
// AsyncIterator objects; they just return a Promise for the value of
|
|
2321
|
-
// the final result produced by the iterator.
|
|
2322
|
-
runtime.async = function(innerFn, outerFn, self, tryLocsList) {
|
|
2323
|
-
var iter = new AsyncIterator(
|
|
2324
|
-
wrap(innerFn, outerFn, self, tryLocsList)
|
|
2325
|
-
);
|
|
2326
|
-
|
|
2327
|
-
return runtime.isGeneratorFunction(outerFn)
|
|
2328
|
-
? iter // If outerFn is a generator, return the full iterator.
|
|
2329
|
-
: iter.next().then(function(result) {
|
|
2330
|
-
return result.done ? result.value : iter.next();
|
|
2331
|
-
});
|
|
2332
|
-
};
|
|
2333
|
-
|
|
2334
|
-
function makeInvokeMethod(innerFn, self, context) {
|
|
2335
|
-
var state = GenStateSuspendedStart;
|
|
2336
|
-
|
|
2337
|
-
return function invoke(method, arg) {
|
|
2338
|
-
if (state === GenStateExecuting) {
|
|
2339
|
-
throw new Error("Generator is already running");
|
|
2340
|
-
}
|
|
2341
|
-
|
|
2342
|
-
if (state === GenStateCompleted) {
|
|
2343
|
-
if (method === "throw") {
|
|
2344
|
-
throw arg;
|
|
2345
|
-
}
|
|
2346
|
-
|
|
2347
|
-
// Be forgiving, per 25.3.3.3.3 of the spec:
|
|
2348
|
-
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
|
|
2349
|
-
return doneResult();
|
|
2350
|
-
}
|
|
2351
|
-
|
|
2352
|
-
context.method = method;
|
|
2353
|
-
context.arg = arg;
|
|
2354
|
-
|
|
2355
|
-
while (true) {
|
|
2356
|
-
var delegate = context.delegate;
|
|
2357
|
-
if (delegate) {
|
|
2358
|
-
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
2359
|
-
if (delegateResult) {
|
|
2360
|
-
if (delegateResult === ContinueSentinel) continue;
|
|
2361
|
-
return delegateResult;
|
|
2362
|
-
}
|
|
2363
|
-
}
|
|
2364
|
-
|
|
2365
|
-
if (context.method === "next") {
|
|
2366
|
-
// Setting context._sent for legacy support of Babel's
|
|
2367
|
-
// function.sent implementation.
|
|
2368
|
-
context.sent = context._sent = context.arg;
|
|
2369
|
-
|
|
2370
|
-
} else if (context.method === "throw") {
|
|
2371
|
-
if (state === GenStateSuspendedStart) {
|
|
2372
|
-
state = GenStateCompleted;
|
|
2373
|
-
throw context.arg;
|
|
2374
|
-
}
|
|
2375
|
-
|
|
2376
|
-
context.dispatchException(context.arg);
|
|
2377
|
-
|
|
2378
|
-
} else if (context.method === "return") {
|
|
2379
|
-
context.abrupt("return", context.arg);
|
|
2380
|
-
}
|
|
2381
|
-
|
|
2382
|
-
state = GenStateExecuting;
|
|
2383
|
-
|
|
2384
|
-
var record = tryCatch(innerFn, self, context);
|
|
2385
|
-
if (record.type === "normal") {
|
|
2386
|
-
// If an exception is thrown from innerFn, we leave state ===
|
|
2387
|
-
// GenStateExecuting and loop back for another invocation.
|
|
2388
|
-
state = context.done
|
|
2389
|
-
? GenStateCompleted
|
|
2390
|
-
: GenStateSuspendedYield;
|
|
2391
|
-
|
|
2392
|
-
if (record.arg === ContinueSentinel) {
|
|
2393
|
-
continue;
|
|
2394
|
-
}
|
|
2395
|
-
|
|
2396
|
-
return {
|
|
2397
|
-
value: record.arg,
|
|
2398
|
-
done: context.done
|
|
2399
|
-
};
|
|
2400
|
-
|
|
2401
|
-
} else if (record.type === "throw") {
|
|
2402
|
-
state = GenStateCompleted;
|
|
2403
|
-
// Dispatch the exception by looping back around to the
|
|
2404
|
-
// context.dispatchException(context.arg) call above.
|
|
2405
|
-
context.method = "throw";
|
|
2406
|
-
context.arg = record.arg;
|
|
2407
|
-
}
|
|
2408
|
-
}
|
|
2409
|
-
};
|
|
2410
|
-
}
|
|
2411
|
-
|
|
2412
|
-
// Call delegate.iterator[context.method](context.arg) and handle the
|
|
2413
|
-
// result, either by returning a { value, done } result from the
|
|
2414
|
-
// delegate iterator, or by modifying context.method and context.arg,
|
|
2415
|
-
// setting context.delegate to null, and returning the ContinueSentinel.
|
|
2416
|
-
function maybeInvokeDelegate(delegate, context) {
|
|
2417
|
-
var method = delegate.iterator[context.method];
|
|
2418
|
-
if (method === undefined$1) {
|
|
2419
|
-
// A .throw or .return when the delegate iterator has no .throw
|
|
2420
|
-
// method always terminates the yield* loop.
|
|
2421
|
-
context.delegate = null;
|
|
2422
|
-
|
|
2423
|
-
if (context.method === "throw") {
|
|
2424
|
-
if (delegate.iterator.return) {
|
|
2425
|
-
// If the delegate iterator has a return method, give it a
|
|
2426
|
-
// chance to clean up.
|
|
2427
|
-
context.method = "return";
|
|
2428
|
-
context.arg = undefined$1;
|
|
2429
|
-
maybeInvokeDelegate(delegate, context);
|
|
2430
|
-
|
|
2431
|
-
if (context.method === "throw") {
|
|
2432
|
-
// If maybeInvokeDelegate(context) changed context.method from
|
|
2433
|
-
// "return" to "throw", let that override the TypeError below.
|
|
2434
|
-
return ContinueSentinel;
|
|
2435
|
-
}
|
|
2436
|
-
}
|
|
2437
|
-
|
|
2438
|
-
context.method = "throw";
|
|
2439
|
-
context.arg = new TypeError(
|
|
2440
|
-
"The iterator does not provide a 'throw' method");
|
|
2441
|
-
}
|
|
2442
|
-
|
|
2443
|
-
return ContinueSentinel;
|
|
2444
|
-
}
|
|
2445
|
-
|
|
2446
|
-
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
2447
|
-
|
|
2448
|
-
if (record.type === "throw") {
|
|
2449
|
-
context.method = "throw";
|
|
2450
|
-
context.arg = record.arg;
|
|
2451
|
-
context.delegate = null;
|
|
2452
|
-
return ContinueSentinel;
|
|
2453
|
-
}
|
|
2454
|
-
|
|
2455
|
-
var info = record.arg;
|
|
2456
|
-
|
|
2457
|
-
if (! info) {
|
|
2458
|
-
context.method = "throw";
|
|
2459
|
-
context.arg = new TypeError("iterator result is not an object");
|
|
2460
|
-
context.delegate = null;
|
|
2461
|
-
return ContinueSentinel;
|
|
2462
|
-
}
|
|
2463
|
-
|
|
2464
|
-
if (info.done) {
|
|
2465
|
-
// Assign the result of the finished delegate to the temporary
|
|
2466
|
-
// variable specified by delegate.resultName (see delegateYield).
|
|
2467
|
-
context[delegate.resultName] = info.value;
|
|
2468
|
-
|
|
2469
|
-
// Resume execution at the desired location (see delegateYield).
|
|
2470
|
-
context.next = delegate.nextLoc;
|
|
2471
|
-
|
|
2472
|
-
// If context.method was "throw" but the delegate handled the
|
|
2473
|
-
// exception, let the outer generator proceed normally. If
|
|
2474
|
-
// context.method was "next", forget context.arg since it has been
|
|
2475
|
-
// "consumed" by the delegate iterator. If context.method was
|
|
2476
|
-
// "return", allow the original .return call to continue in the
|
|
2477
|
-
// outer generator.
|
|
2478
|
-
if (context.method !== "return") {
|
|
2479
|
-
context.method = "next";
|
|
2480
|
-
context.arg = undefined$1;
|
|
2481
|
-
}
|
|
2482
|
-
|
|
2483
|
-
} else {
|
|
2484
|
-
// Re-yield the result returned by the delegate method.
|
|
2485
|
-
return info;
|
|
2486
|
-
}
|
|
2487
|
-
|
|
2488
|
-
// The delegate iterator is finished, so forget it and continue with
|
|
2489
|
-
// the outer generator.
|
|
2490
|
-
context.delegate = null;
|
|
2491
|
-
return ContinueSentinel;
|
|
2492
|
-
}
|
|
2493
|
-
|
|
2494
|
-
// Define Generator.prototype.{next,throw,return} in terms of the
|
|
2495
|
-
// unified ._invoke helper method.
|
|
2496
|
-
defineIteratorMethods(Gp);
|
|
2497
|
-
|
|
2498
|
-
Gp[toStringTagSymbol] = "Generator";
|
|
2499
|
-
|
|
2500
|
-
// A Generator should always return itself as the iterator object when the
|
|
2501
|
-
// @@iterator function is called on it. Some browsers' implementations of the
|
|
2502
|
-
// iterator prototype chain incorrectly implement this, causing the Generator
|
|
2503
|
-
// object to not be returned from this call. This ensures that doesn't happen.
|
|
2504
|
-
// See https://github.com/facebook/regenerator/issues/274 for more details.
|
|
2505
|
-
Gp[iteratorSymbol] = function() {
|
|
2506
|
-
return this;
|
|
2507
|
-
};
|
|
2508
|
-
|
|
2509
|
-
Gp.toString = function() {
|
|
2510
|
-
return "[object Generator]";
|
|
2511
|
-
};
|
|
2512
|
-
|
|
2513
|
-
function pushTryEntry(locs) {
|
|
2514
|
-
var entry = { tryLoc: locs[0] };
|
|
2515
|
-
|
|
2516
|
-
if (1 in locs) {
|
|
2517
|
-
entry.catchLoc = locs[1];
|
|
2518
|
-
}
|
|
2519
|
-
|
|
2520
|
-
if (2 in locs) {
|
|
2521
|
-
entry.finallyLoc = locs[2];
|
|
2522
|
-
entry.afterLoc = locs[3];
|
|
2523
|
-
}
|
|
2524
|
-
|
|
2525
|
-
this.tryEntries.push(entry);
|
|
2526
|
-
}
|
|
2527
|
-
|
|
2528
|
-
function resetTryEntry(entry) {
|
|
2529
|
-
var record = entry.completion || {};
|
|
2530
|
-
record.type = "normal";
|
|
2531
|
-
delete record.arg;
|
|
2532
|
-
entry.completion = record;
|
|
2533
|
-
}
|
|
2534
|
-
|
|
2535
|
-
function Context(tryLocsList) {
|
|
2536
|
-
// The root entry object (effectively a try statement without a catch
|
|
2537
|
-
// or a finally block) gives us a place to store values thrown from
|
|
2538
|
-
// locations where there is no enclosing try statement.
|
|
2539
|
-
this.tryEntries = [{ tryLoc: "root" }];
|
|
2540
|
-
tryLocsList.forEach(pushTryEntry, this);
|
|
2541
|
-
this.reset(true);
|
|
2542
|
-
}
|
|
2543
|
-
|
|
2544
|
-
runtime.keys = function(object) {
|
|
2545
|
-
var keys = [];
|
|
2546
|
-
for (var key in object) {
|
|
2547
|
-
keys.push(key);
|
|
2548
|
-
}
|
|
2549
|
-
keys.reverse();
|
|
2550
|
-
|
|
2551
|
-
// Rather than returning an object with a next method, we keep
|
|
2552
|
-
// things simple and return the next function itself.
|
|
2553
|
-
return function next() {
|
|
2554
|
-
while (keys.length) {
|
|
2555
|
-
var key = keys.pop();
|
|
2556
|
-
if (key in object) {
|
|
2557
|
-
next.value = key;
|
|
2558
|
-
next.done = false;
|
|
2559
|
-
return next;
|
|
2560
|
-
}
|
|
2561
|
-
}
|
|
2562
|
-
|
|
2563
|
-
// To avoid creating an additional object, we just hang the .value
|
|
2564
|
-
// and .done properties off the next function object itself. This
|
|
2565
|
-
// also ensures that the minifier will not anonymize the function.
|
|
2566
|
-
next.done = true;
|
|
2567
|
-
return next;
|
|
2568
|
-
};
|
|
2569
|
-
};
|
|
2570
|
-
|
|
2571
|
-
function values(iterable) {
|
|
2572
|
-
if (iterable) {
|
|
2573
|
-
var iteratorMethod = iterable[iteratorSymbol];
|
|
2574
|
-
if (iteratorMethod) {
|
|
2575
|
-
return iteratorMethod.call(iterable);
|
|
2576
|
-
}
|
|
2577
|
-
|
|
2578
|
-
if (typeof iterable.next === "function") {
|
|
2579
|
-
return iterable;
|
|
2580
|
-
}
|
|
2581
|
-
|
|
2582
|
-
if (!isNaN(iterable.length)) {
|
|
2583
|
-
var i = -1, next = function next() {
|
|
2584
|
-
while (++i < iterable.length) {
|
|
2585
|
-
if (hasOwn.call(iterable, i)) {
|
|
2586
|
-
next.value = iterable[i];
|
|
2587
|
-
next.done = false;
|
|
2588
|
-
return next;
|
|
2589
|
-
}
|
|
2590
|
-
}
|
|
2591
|
-
|
|
2592
|
-
next.value = undefined$1;
|
|
2593
|
-
next.done = true;
|
|
2594
|
-
|
|
2595
|
-
return next;
|
|
2596
|
-
};
|
|
2597
|
-
|
|
2598
|
-
return next.next = next;
|
|
2599
|
-
}
|
|
2600
|
-
}
|
|
2601
|
-
|
|
2602
|
-
// Return an iterator with no values.
|
|
2603
|
-
return { next: doneResult };
|
|
2604
|
-
}
|
|
2605
|
-
runtime.values = values;
|
|
2606
|
-
|
|
2607
|
-
function doneResult() {
|
|
2608
|
-
return { value: undefined$1, done: true };
|
|
2609
|
-
}
|
|
2610
|
-
|
|
2611
|
-
Context.prototype = {
|
|
2612
|
-
constructor: Context,
|
|
2613
|
-
|
|
2614
|
-
reset: function(skipTempReset) {
|
|
2615
|
-
this.prev = 0;
|
|
2616
|
-
this.next = 0;
|
|
2617
|
-
// Resetting context._sent for legacy support of Babel's
|
|
2618
|
-
// function.sent implementation.
|
|
2619
|
-
this.sent = this._sent = undefined$1;
|
|
2620
|
-
this.done = false;
|
|
2621
|
-
this.delegate = null;
|
|
2622
|
-
|
|
2623
|
-
this.method = "next";
|
|
2624
|
-
this.arg = undefined$1;
|
|
2625
|
-
|
|
2626
|
-
this.tryEntries.forEach(resetTryEntry);
|
|
2627
|
-
|
|
2628
|
-
if (!skipTempReset) {
|
|
2629
|
-
for (var name in this) {
|
|
2630
|
-
// Not sure about the optimal order of these conditions:
|
|
2631
|
-
if (name.charAt(0) === "t" &&
|
|
2632
|
-
hasOwn.call(this, name) &&
|
|
2633
|
-
!isNaN(+name.slice(1))) {
|
|
2634
|
-
this[name] = undefined$1;
|
|
2635
|
-
}
|
|
2636
|
-
}
|
|
2637
|
-
}
|
|
2638
|
-
},
|
|
2639
|
-
|
|
2640
|
-
stop: function() {
|
|
2641
|
-
this.done = true;
|
|
2642
|
-
|
|
2643
|
-
var rootEntry = this.tryEntries[0];
|
|
2644
|
-
var rootRecord = rootEntry.completion;
|
|
2645
|
-
if (rootRecord.type === "throw") {
|
|
2646
|
-
throw rootRecord.arg;
|
|
2647
|
-
}
|
|
2648
|
-
|
|
2649
|
-
return this.rval;
|
|
2650
|
-
},
|
|
2651
|
-
|
|
2652
|
-
dispatchException: function(exception) {
|
|
2653
|
-
if (this.done) {
|
|
2654
|
-
throw exception;
|
|
2655
|
-
}
|
|
2656
|
-
|
|
2657
|
-
var context = this;
|
|
2658
|
-
function handle(loc, caught) {
|
|
2659
|
-
record.type = "throw";
|
|
2660
|
-
record.arg = exception;
|
|
2661
|
-
context.next = loc;
|
|
2662
|
-
|
|
2663
|
-
if (caught) {
|
|
2664
|
-
// If the dispatched exception was caught by a catch block,
|
|
2665
|
-
// then let that catch block handle the exception normally.
|
|
2666
|
-
context.method = "next";
|
|
2667
|
-
context.arg = undefined$1;
|
|
2668
|
-
}
|
|
2669
|
-
|
|
2670
|
-
return !! caught;
|
|
2671
|
-
}
|
|
2672
|
-
|
|
2673
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
2674
|
-
var entry = this.tryEntries[i];
|
|
2675
|
-
var record = entry.completion;
|
|
2676
|
-
|
|
2677
|
-
if (entry.tryLoc === "root") {
|
|
2678
|
-
// Exception thrown outside of any try block that could handle
|
|
2679
|
-
// it, so set the completion value of the entire function to
|
|
2680
|
-
// throw the exception.
|
|
2681
|
-
return handle("end");
|
|
2682
|
-
}
|
|
2683
|
-
|
|
2684
|
-
if (entry.tryLoc <= this.prev) {
|
|
2685
|
-
var hasCatch = hasOwn.call(entry, "catchLoc");
|
|
2686
|
-
var hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
2687
|
-
|
|
2688
|
-
if (hasCatch && hasFinally) {
|
|
2689
|
-
if (this.prev < entry.catchLoc) {
|
|
2690
|
-
return handle(entry.catchLoc, true);
|
|
2691
|
-
} else if (this.prev < entry.finallyLoc) {
|
|
2692
|
-
return handle(entry.finallyLoc);
|
|
2693
|
-
}
|
|
2694
|
-
|
|
2695
|
-
} else if (hasCatch) {
|
|
2696
|
-
if (this.prev < entry.catchLoc) {
|
|
2697
|
-
return handle(entry.catchLoc, true);
|
|
2698
|
-
}
|
|
2699
|
-
|
|
2700
|
-
} else if (hasFinally) {
|
|
2701
|
-
if (this.prev < entry.finallyLoc) {
|
|
2702
|
-
return handle(entry.finallyLoc);
|
|
2703
|
-
}
|
|
2704
|
-
|
|
2705
|
-
} else {
|
|
2706
|
-
throw new Error("try statement without catch or finally");
|
|
2707
|
-
}
|
|
2708
|
-
}
|
|
2709
|
-
}
|
|
2710
|
-
},
|
|
2711
|
-
|
|
2712
|
-
abrupt: function(type, arg) {
|
|
2713
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
2714
|
-
var entry = this.tryEntries[i];
|
|
2715
|
-
if (entry.tryLoc <= this.prev &&
|
|
2716
|
-
hasOwn.call(entry, "finallyLoc") &&
|
|
2717
|
-
this.prev < entry.finallyLoc) {
|
|
2718
|
-
var finallyEntry = entry;
|
|
2719
|
-
break;
|
|
2720
|
-
}
|
|
2721
|
-
}
|
|
2722
|
-
|
|
2723
|
-
if (finallyEntry &&
|
|
2724
|
-
(type === "break" ||
|
|
2725
|
-
type === "continue") &&
|
|
2726
|
-
finallyEntry.tryLoc <= arg &&
|
|
2727
|
-
arg <= finallyEntry.finallyLoc) {
|
|
2728
|
-
// Ignore the finally entry if control is not jumping to a
|
|
2729
|
-
// location outside the try/catch block.
|
|
2730
|
-
finallyEntry = null;
|
|
2731
|
-
}
|
|
2732
|
-
|
|
2733
|
-
var record = finallyEntry ? finallyEntry.completion : {};
|
|
2734
|
-
record.type = type;
|
|
2735
|
-
record.arg = arg;
|
|
2736
|
-
|
|
2737
|
-
if (finallyEntry) {
|
|
2738
|
-
this.method = "next";
|
|
2739
|
-
this.next = finallyEntry.finallyLoc;
|
|
2740
|
-
return ContinueSentinel;
|
|
2741
|
-
}
|
|
2742
|
-
|
|
2743
|
-
return this.complete(record);
|
|
2744
|
-
},
|
|
2745
|
-
|
|
2746
|
-
complete: function(record, afterLoc) {
|
|
2747
|
-
if (record.type === "throw") {
|
|
2748
|
-
throw record.arg;
|
|
2749
|
-
}
|
|
2750
|
-
|
|
2751
|
-
if (record.type === "break" ||
|
|
2752
|
-
record.type === "continue") {
|
|
2753
|
-
this.next = record.arg;
|
|
2754
|
-
} else if (record.type === "return") {
|
|
2755
|
-
this.rval = this.arg = record.arg;
|
|
2756
|
-
this.method = "return";
|
|
2757
|
-
this.next = "end";
|
|
2758
|
-
} else if (record.type === "normal" && afterLoc) {
|
|
2759
|
-
this.next = afterLoc;
|
|
2760
|
-
}
|
|
2761
|
-
|
|
2762
|
-
return ContinueSentinel;
|
|
2763
|
-
},
|
|
2764
|
-
|
|
2765
|
-
finish: function(finallyLoc) {
|
|
2766
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
2767
|
-
var entry = this.tryEntries[i];
|
|
2768
|
-
if (entry.finallyLoc === finallyLoc) {
|
|
2769
|
-
this.complete(entry.completion, entry.afterLoc);
|
|
2770
|
-
resetTryEntry(entry);
|
|
2771
|
-
return ContinueSentinel;
|
|
2772
|
-
}
|
|
2773
|
-
}
|
|
2774
|
-
},
|
|
2775
|
-
|
|
2776
|
-
"catch": function(tryLoc) {
|
|
2777
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
2778
|
-
var entry = this.tryEntries[i];
|
|
2779
|
-
if (entry.tryLoc === tryLoc) {
|
|
2780
|
-
var record = entry.completion;
|
|
2781
|
-
if (record.type === "throw") {
|
|
2782
|
-
var thrown = record.arg;
|
|
2783
|
-
resetTryEntry(entry);
|
|
2784
|
-
}
|
|
2785
|
-
return thrown;
|
|
2786
|
-
}
|
|
2787
|
-
}
|
|
2788
|
-
|
|
2789
|
-
// The context.catch method must only be called with a location
|
|
2790
|
-
// argument that corresponds to a known catch block.
|
|
2791
|
-
throw new Error("illegal catch attempt");
|
|
2792
|
-
},
|
|
2793
|
-
|
|
2794
|
-
delegateYield: function(iterable, resultName, nextLoc) {
|
|
2795
|
-
this.delegate = {
|
|
2796
|
-
iterator: values(iterable),
|
|
2797
|
-
resultName: resultName,
|
|
2798
|
-
nextLoc: nextLoc
|
|
2799
|
-
};
|
|
2800
|
-
|
|
2801
|
-
if (this.method === "next") {
|
|
2802
|
-
// Deliberately forget the last sent value so that we don't
|
|
2803
|
-
// accidentally pass it on to the delegate.
|
|
2804
|
-
this.arg = undefined$1;
|
|
2805
|
-
}
|
|
2806
|
-
|
|
2807
|
-
return ContinueSentinel;
|
|
2808
|
-
}
|
|
2809
|
-
};
|
|
2810
|
-
})(
|
|
2811
|
-
// In sloppy mode, unbound `this` refers to the global object, fallback to
|
|
2812
|
-
// Function constructor if we're in global strict mode. That is sadly a form
|
|
2813
|
-
// of indirect eval which violates Content Security Policy.
|
|
2814
|
-
(function() { return this })() || Function("return this")()
|
|
2815
|
-
);
|
|
2816
|
-
});
|
|
2817
|
-
|
|
2818
|
-
/**
|
|
2819
|
-
* Copyright (c) 2014-present, Facebook, Inc.
|
|
2820
|
-
*
|
|
2821
|
-
* This source code is licensed under the MIT license found in the
|
|
2822
|
-
* LICENSE file in the root directory of this source tree.
|
|
2823
|
-
*/
|
|
2824
|
-
|
|
2825
|
-
// This method of obtaining a reference to the global object needs to be
|
|
2826
|
-
// kept identical to the way it is obtained in runtime.js
|
|
2827
|
-
var g = (function() { return this })() || Function("return this")();
|
|
2828
|
-
|
|
2829
|
-
// Use `getOwnPropertyNames` because not all browsers support calling
|
|
2830
|
-
// `hasOwnProperty` on the global `self` object in a worker. See #183.
|
|
2831
|
-
var hadRuntime = g.regeneratorRuntime &&
|
|
2832
|
-
Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0;
|
|
2833
|
-
|
|
2834
|
-
// Save the old regeneratorRuntime in case it needs to be restored later.
|
|
2835
|
-
var oldRuntime = hadRuntime && g.regeneratorRuntime;
|
|
2836
|
-
|
|
2837
|
-
// Force reevalutation of runtime.js.
|
|
2838
|
-
g.regeneratorRuntime = undefined;
|
|
2839
|
-
|
|
2840
|
-
var runtimeModule = runtime;
|
|
2841
|
-
|
|
2842
|
-
if (hadRuntime) {
|
|
2843
|
-
// Restore the original runtime.
|
|
2844
|
-
g.regeneratorRuntime = oldRuntime;
|
|
2845
|
-
} else {
|
|
2846
|
-
// Remove the global property added by runtime.js.
|
|
2847
|
-
try {
|
|
2848
|
-
delete g.regeneratorRuntime;
|
|
2849
|
-
} catch(e) {
|
|
2850
|
-
g.regeneratorRuntime = undefined;
|
|
2851
|
-
}
|
|
2852
|
-
}
|
|
2853
|
-
|
|
2854
|
-
var regenerator = runtimeModule;
|
|
2855
|
-
|
|
2856
|
-
var asyncToGenerator = createCommonjsModule(function (module, exports) {
|
|
2857
|
-
|
|
2858
|
-
exports.__esModule = true;
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
var _promise2 = _interopRequireDefault(promise);
|
|
2863
|
-
|
|
2864
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2865
|
-
|
|
2866
|
-
exports.default = function (fn) {
|
|
2867
|
-
return function () {
|
|
2868
|
-
var gen = fn.apply(this, arguments);
|
|
2869
|
-
return new _promise2.default(function (resolve, reject) {
|
|
2870
|
-
function step(key, arg) {
|
|
2871
|
-
try {
|
|
2872
|
-
var info = gen[key](arg);
|
|
2873
|
-
var value = info.value;
|
|
2874
|
-
} catch (error) {
|
|
2875
|
-
reject(error);
|
|
2876
|
-
return;
|
|
2877
|
-
}
|
|
2878
|
-
|
|
2879
|
-
if (info.done) {
|
|
2880
|
-
resolve(value);
|
|
2881
|
-
} else {
|
|
2882
|
-
return _promise2.default.resolve(value).then(function (value) {
|
|
2883
|
-
step("next", value);
|
|
2884
|
-
}, function (err) {
|
|
2885
|
-
step("throw", err);
|
|
2886
|
-
});
|
|
2887
|
-
}
|
|
2888
|
-
}
|
|
2889
|
-
|
|
2890
|
-
return step("next");
|
|
2891
|
-
});
|
|
2892
|
-
};
|
|
2893
|
-
};
|
|
2894
|
-
});
|
|
2895
|
-
|
|
2896
|
-
var _asyncToGenerator = unwrapExports(asyncToGenerator);
|
|
2897
|
-
|
|
2898
2080
|
var corsProxy$1 = 'https://cors-anywhere.herokuapp.com/';
|
|
2899
2081
|
var itemsPerPage = 10;
|
|
2900
2082
|
|
|
@@ -3735,21 +2917,18 @@ var Slideshow = function Slideshow(_ref) {
|
|
|
3735
2917
|
);
|
|
3736
2918
|
};
|
|
3737
2919
|
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
2920
|
+
// do not edit .js files directly - edit src/index.jst
|
|
2921
|
+
|
|
2922
|
+
|
|
3741
2923
|
|
|
3742
2924
|
var fastDeepEqual = function equal(a, b) {
|
|
3743
2925
|
if (a === b) return true;
|
|
3744
2926
|
|
|
3745
2927
|
if (a && b && typeof a == 'object' && typeof b == 'object') {
|
|
3746
|
-
|
|
3747
|
-
, arrB = isArray(b)
|
|
3748
|
-
, i
|
|
3749
|
-
, length
|
|
3750
|
-
, key;
|
|
2928
|
+
if (a.constructor !== b.constructor) return false;
|
|
3751
2929
|
|
|
3752
|
-
|
|
2930
|
+
var length, i, keys;
|
|
2931
|
+
if (Array.isArray(a)) {
|
|
3753
2932
|
length = a.length;
|
|
3754
2933
|
if (length != b.length) return false;
|
|
3755
2934
|
for (i = length; i-- !== 0;)
|
|
@@ -3757,35 +2936,29 @@ var fastDeepEqual = function equal(a, b) {
|
|
|
3757
2936
|
return true;
|
|
3758
2937
|
}
|
|
3759
2938
|
|
|
3760
|
-
if (arrA != arrB) return false;
|
|
3761
2939
|
|
|
3762
|
-
var dateA = a instanceof Date
|
|
3763
|
-
, dateB = b instanceof Date;
|
|
3764
|
-
if (dateA != dateB) return false;
|
|
3765
|
-
if (dateA && dateB) return a.getTime() == b.getTime();
|
|
3766
2940
|
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
if (
|
|
3770
|
-
if (regexpA && regexpB) return a.toString() == b.toString();
|
|
2941
|
+
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
|
|
2942
|
+
if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
|
|
2943
|
+
if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
|
|
3771
2944
|
|
|
3772
|
-
|
|
2945
|
+
keys = Object.keys(a);
|
|
3773
2946
|
length = keys.length;
|
|
3774
|
-
|
|
3775
|
-
if (length !== keyList(b).length)
|
|
3776
|
-
return false;
|
|
2947
|
+
if (length !== Object.keys(b).length) return false;
|
|
3777
2948
|
|
|
3778
2949
|
for (i = length; i-- !== 0;)
|
|
3779
|
-
if (!
|
|
2950
|
+
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
|
3780
2951
|
|
|
3781
2952
|
for (i = length; i-- !== 0;) {
|
|
3782
|
-
key = keys[i];
|
|
2953
|
+
var key = keys[i];
|
|
2954
|
+
|
|
3783
2955
|
if (!equal(a[key], b[key])) return false;
|
|
3784
2956
|
}
|
|
3785
2957
|
|
|
3786
2958
|
return true;
|
|
3787
2959
|
}
|
|
3788
2960
|
|
|
2961
|
+
// true if both NaN, false otherwise
|
|
3789
2962
|
return a!==a && b!==b;
|
|
3790
2963
|
};
|
|
3791
2964
|
|
|
@@ -4808,7 +3981,7 @@ function formatValue(ctx, value, recurseTimes) {
|
|
|
4808
3981
|
var base = '', array = false, braces = ['{', '}'];
|
|
4809
3982
|
|
|
4810
3983
|
// Make Array say that they are Array
|
|
4811
|
-
if (isArray
|
|
3984
|
+
if (isArray(value)) {
|
|
4812
3985
|
array = true;
|
|
4813
3986
|
braces = ['[', ']'];
|
|
4814
3987
|
}
|
|
@@ -4987,7 +4160,7 @@ function reduceToSingleString(output, base, braces) {
|
|
|
4987
4160
|
|
|
4988
4161
|
// NOTE: These type checking functions intentionally don't use `instanceof`
|
|
4989
4162
|
// because it is fragile and can be easily faked with `Object.create()`.
|
|
4990
|
-
function isArray
|
|
4163
|
+
function isArray(ar) {
|
|
4991
4164
|
return Array.isArray(ar);
|
|
4992
4165
|
}
|
|
4993
4166
|
|
|
@@ -5114,7 +4287,7 @@ var util = {
|
|
|
5114
4287
|
isNullOrUndefined: isNullOrUndefined,
|
|
5115
4288
|
isNull: isNull,
|
|
5116
4289
|
isBoolean: isBoolean,
|
|
5117
|
-
isArray: isArray
|
|
4290
|
+
isArray: isArray,
|
|
5118
4291
|
inspect: inspect,
|
|
5119
4292
|
deprecate: deprecate,
|
|
5120
4293
|
format: format,
|
|
@@ -5781,199 +4954,235 @@ module.exports = exports['default'];
|
|
|
5781
4954
|
|
|
5782
4955
|
var youTubePlayer = unwrapExports(dist);
|
|
5783
4956
|
|
|
5784
|
-
|
|
5785
|
-
|
|
5786
|
-
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
|
4957
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
5787
4958
|
|
|
5788
4959
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5789
4960
|
|
|
5790
|
-
function
|
|
4961
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
4962
|
+
|
|
4963
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
4964
|
+
|
|
4965
|
+
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
4966
|
+
|
|
4967
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
4968
|
+
|
|
4969
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
4970
|
+
|
|
4971
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
4972
|
+
|
|
4973
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
5791
4974
|
|
|
5792
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function
|
|
4975
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
4976
|
+
|
|
4977
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
5793
4978
|
|
|
5794
|
-
|
|
5795
|
-
|
|
5796
|
-
|
|
5797
|
-
|
|
5798
|
-
|
|
4979
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
4980
|
+
|
|
4981
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
4982
|
+
|
|
4983
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
4984
|
+
/**
|
|
4985
|
+
* Check whether a `props` change should result in the video being updated.
|
|
4986
|
+
*
|
|
4987
|
+
* @param {Object} prevProps
|
|
4988
|
+
* @param {Object} props
|
|
5799
4989
|
*/
|
|
4990
|
+
|
|
5800
4991
|
function shouldUpdateVideo(prevProps, props) {
|
|
5801
4992
|
// A changing video should always trigger an update
|
|
5802
4993
|
if (prevProps.videoId !== props.videoId) {
|
|
5803
4994
|
return true;
|
|
5804
|
-
}
|
|
5805
|
-
|
|
5806
|
-
// Otherwise, a change in the start/end time playerVars also requires a player
|
|
4995
|
+
} // Otherwise, a change in the start/end time playerVars also requires a player
|
|
5807
4996
|
// update.
|
|
4997
|
+
|
|
4998
|
+
|
|
5808
4999
|
var prevVars = prevProps.opts.playerVars || {};
|
|
5809
5000
|
var vars = props.opts.playerVars || {};
|
|
5810
|
-
|
|
5811
5001
|
return prevVars.start !== vars.start || prevVars.end !== vars.end;
|
|
5812
5002
|
}
|
|
5813
|
-
|
|
5814
|
-
|
|
5815
|
-
*
|
|
5816
|
-
*
|
|
5817
|
-
*
|
|
5818
|
-
*
|
|
5819
|
-
* @param {Object} opts
|
|
5003
|
+
/**
|
|
5004
|
+
* Neutralize API options that only require a video update, leaving only options
|
|
5005
|
+
* that require a player reset. The results can then be compared to see if a
|
|
5006
|
+
* player reset is necessary.
|
|
5007
|
+
*
|
|
5008
|
+
* @param {Object} opts
|
|
5820
5009
|
*/
|
|
5010
|
+
|
|
5011
|
+
|
|
5821
5012
|
function filterResetOptions(opts) {
|
|
5822
|
-
return
|
|
5823
|
-
playerVars:
|
|
5013
|
+
return _objectSpread({}, opts, {
|
|
5014
|
+
playerVars: _objectSpread({}, opts.playerVars, {
|
|
5824
5015
|
autoplay: 0,
|
|
5825
5016
|
start: 0,
|
|
5826
5017
|
end: 0
|
|
5827
5018
|
})
|
|
5828
5019
|
});
|
|
5829
5020
|
}
|
|
5830
|
-
|
|
5831
|
-
|
|
5832
|
-
*
|
|
5833
|
-
*
|
|
5834
|
-
*
|
|
5835
|
-
*
|
|
5836
|
-
*
|
|
5837
|
-
* @param {Object}
|
|
5838
|
-
* @param {Object} props
|
|
5021
|
+
/**
|
|
5022
|
+
* Check whether a `props` change should result in the player being reset.
|
|
5023
|
+
* The player is reset when the `props.opts` change, except if the only change
|
|
5024
|
+
* is in the `start` and `end` playerVars, because a video update can deal with
|
|
5025
|
+
* those.
|
|
5026
|
+
*
|
|
5027
|
+
* @param {Object} prevProps
|
|
5028
|
+
* @param {Object} props
|
|
5839
5029
|
*/
|
|
5030
|
+
|
|
5031
|
+
|
|
5840
5032
|
function shouldResetPlayer(prevProps, props) {
|
|
5841
5033
|
return !fastDeepEqual(filterResetOptions(prevProps.opts), filterResetOptions(props.opts));
|
|
5842
5034
|
}
|
|
5843
|
-
|
|
5844
|
-
|
|
5845
|
-
*
|
|
5846
|
-
*
|
|
5847
|
-
* @param {Object}
|
|
5848
|
-
* @param {Object} props
|
|
5035
|
+
/**
|
|
5036
|
+
* Check whether a props change should result in an id or className update.
|
|
5037
|
+
*
|
|
5038
|
+
* @param {Object} prevProps
|
|
5039
|
+
* @param {Object} props
|
|
5849
5040
|
*/
|
|
5041
|
+
|
|
5042
|
+
|
|
5850
5043
|
function shouldUpdatePlayer(prevProps, props) {
|
|
5851
5044
|
return prevProps.id !== props.id || prevProps.className !== props.className;
|
|
5852
5045
|
}
|
|
5853
5046
|
|
|
5854
|
-
var YouTube = function (_React$Component) {
|
|
5047
|
+
var YouTube = /*#__PURE__*/function (_React$Component) {
|
|
5855
5048
|
_inherits(YouTube, _React$Component);
|
|
5856
5049
|
|
|
5050
|
+
var _super = _createSuper(YouTube);
|
|
5051
|
+
|
|
5052
|
+
/**
|
|
5053
|
+
* Expose PlayerState constants for convenience. These constants can also be
|
|
5054
|
+
* accessed through the global YT object after the YouTube IFrame API is instantiated.
|
|
5055
|
+
* https://developers.google.com/youtube/iframe_api_reference#onStateChange
|
|
5056
|
+
*/
|
|
5857
5057
|
function YouTube(props) {
|
|
5058
|
+
var _this;
|
|
5059
|
+
|
|
5858
5060
|
_classCallCheck(this, YouTube);
|
|
5859
5061
|
|
|
5860
|
-
|
|
5062
|
+
_this = _super.call(this, props);
|
|
5861
5063
|
|
|
5862
|
-
_this
|
|
5064
|
+
_defineProperty(_assertThisInitialized(_this), "onPlayerReady", function (event) {
|
|
5863
5065
|
return _this.props.onReady(event);
|
|
5864
|
-
};
|
|
5066
|
+
});
|
|
5865
5067
|
|
|
5866
|
-
_this
|
|
5068
|
+
_defineProperty(_assertThisInitialized(_this), "onPlayerError", function (event) {
|
|
5867
5069
|
return _this.props.onError(event);
|
|
5868
|
-
};
|
|
5070
|
+
});
|
|
5869
5071
|
|
|
5870
|
-
_this
|
|
5072
|
+
_defineProperty(_assertThisInitialized(_this), "onPlayerStateChange", function (event) {
|
|
5871
5073
|
_this.props.onStateChange(event);
|
|
5872
|
-
switch (event.data) {
|
|
5873
5074
|
|
|
5075
|
+
switch (event.data) {
|
|
5874
5076
|
case YouTube.PlayerState.ENDED:
|
|
5875
5077
|
_this.props.onEnd(event);
|
|
5078
|
+
|
|
5876
5079
|
break;
|
|
5877
5080
|
|
|
5878
5081
|
case YouTube.PlayerState.PLAYING:
|
|
5879
5082
|
_this.props.onPlay(event);
|
|
5083
|
+
|
|
5880
5084
|
break;
|
|
5881
5085
|
|
|
5882
5086
|
case YouTube.PlayerState.PAUSED:
|
|
5883
5087
|
_this.props.onPause(event);
|
|
5088
|
+
|
|
5884
5089
|
break;
|
|
5885
5090
|
}
|
|
5886
|
-
};
|
|
5091
|
+
});
|
|
5887
5092
|
|
|
5888
|
-
_this
|
|
5093
|
+
_defineProperty(_assertThisInitialized(_this), "onPlayerPlaybackRateChange", function (event) {
|
|
5889
5094
|
return _this.props.onPlaybackRateChange(event);
|
|
5890
|
-
};
|
|
5095
|
+
});
|
|
5891
5096
|
|
|
5892
|
-
_this
|
|
5097
|
+
_defineProperty(_assertThisInitialized(_this), "onPlayerPlaybackQualityChange", function (event) {
|
|
5893
5098
|
return _this.props.onPlaybackQualityChange(event);
|
|
5894
|
-
};
|
|
5099
|
+
});
|
|
5895
5100
|
|
|
5896
|
-
_this
|
|
5101
|
+
_defineProperty(_assertThisInitialized(_this), "createPlayer", function () {
|
|
5897
5102
|
// do not attempt to create a player server-side, it won't work
|
|
5898
|
-
if (typeof document === 'undefined') return;
|
|
5899
|
-
|
|
5900
|
-
var playerOpts =
|
|
5103
|
+
if (typeof document === 'undefined') return; // create player
|
|
5104
|
+
|
|
5105
|
+
var playerOpts = _objectSpread({}, _this.props.opts, {
|
|
5901
5106
|
// preload the `videoId` video if one is already given
|
|
5902
5107
|
videoId: _this.props.videoId
|
|
5903
5108
|
});
|
|
5904
|
-
|
|
5905
|
-
// attach event handlers
|
|
5109
|
+
|
|
5110
|
+
_this.internalPlayer = youTubePlayer(_this.container, playerOpts); // attach event handlers
|
|
5111
|
+
|
|
5906
5112
|
_this.internalPlayer.on('ready', _this.onPlayerReady);
|
|
5113
|
+
|
|
5907
5114
|
_this.internalPlayer.on('error', _this.onPlayerError);
|
|
5115
|
+
|
|
5908
5116
|
_this.internalPlayer.on('stateChange', _this.onPlayerStateChange);
|
|
5117
|
+
|
|
5909
5118
|
_this.internalPlayer.on('playbackRateChange', _this.onPlayerPlaybackRateChange);
|
|
5119
|
+
|
|
5910
5120
|
_this.internalPlayer.on('playbackQualityChange', _this.onPlayerPlaybackQualityChange);
|
|
5911
|
-
};
|
|
5121
|
+
});
|
|
5912
5122
|
|
|
5913
|
-
_this
|
|
5123
|
+
_defineProperty(_assertThisInitialized(_this), "resetPlayer", function () {
|
|
5914
5124
|
return _this.internalPlayer.destroy().then(_this.createPlayer);
|
|
5915
|
-
};
|
|
5125
|
+
});
|
|
5916
5126
|
|
|
5917
|
-
_this
|
|
5127
|
+
_defineProperty(_assertThisInitialized(_this), "updatePlayer", function () {
|
|
5918
5128
|
_this.internalPlayer.getIframe().then(function (iframe) {
|
|
5919
5129
|
if (_this.props.id) iframe.setAttribute('id', _this.props.id);else iframe.removeAttribute('id');
|
|
5920
5130
|
if (_this.props.className) iframe.setAttribute('class', _this.props.className);else iframe.removeAttribute('class');
|
|
5921
5131
|
});
|
|
5922
|
-
};
|
|
5132
|
+
});
|
|
5923
5133
|
|
|
5924
|
-
_this
|
|
5134
|
+
_defineProperty(_assertThisInitialized(_this), "updateVideo", function () {
|
|
5925
5135
|
if (typeof _this.props.videoId === 'undefined' || _this.props.videoId === null) {
|
|
5926
5136
|
_this.internalPlayer.stopVideo();
|
|
5137
|
+
|
|
5927
5138
|
return;
|
|
5928
|
-
}
|
|
5139
|
+
} // set queueing options
|
|
5140
|
+
|
|
5929
5141
|
|
|
5930
|
-
// set queueing options
|
|
5931
5142
|
var autoplay = false;
|
|
5932
5143
|
var opts = {
|
|
5933
5144
|
videoId: _this.props.videoId
|
|
5934
5145
|
};
|
|
5146
|
+
|
|
5935
5147
|
if ('playerVars' in _this.props.opts) {
|
|
5936
5148
|
autoplay = _this.props.opts.playerVars.autoplay === 1;
|
|
5149
|
+
|
|
5937
5150
|
if ('start' in _this.props.opts.playerVars) {
|
|
5938
5151
|
opts.startSeconds = _this.props.opts.playerVars.start;
|
|
5939
5152
|
}
|
|
5153
|
+
|
|
5940
5154
|
if ('end' in _this.props.opts.playerVars) {
|
|
5941
5155
|
opts.endSeconds = _this.props.opts.playerVars.end;
|
|
5942
5156
|
}
|
|
5943
|
-
}
|
|
5157
|
+
} // if autoplay is enabled loadVideoById
|
|
5158
|
+
|
|
5944
5159
|
|
|
5945
|
-
// if autoplay is enabled loadVideoById
|
|
5946
5160
|
if (autoplay) {
|
|
5947
5161
|
_this.internalPlayer.loadVideoById(opts);
|
|
5162
|
+
|
|
5948
5163
|
return;
|
|
5949
|
-
}
|
|
5950
|
-
|
|
5164
|
+
} // default behaviour just cues the video
|
|
5165
|
+
|
|
5166
|
+
|
|
5951
5167
|
_this.internalPlayer.cueVideoById(opts);
|
|
5952
|
-
};
|
|
5168
|
+
});
|
|
5953
5169
|
|
|
5954
|
-
_this
|
|
5170
|
+
_defineProperty(_assertThisInitialized(_this), "refContainer", function (container) {
|
|
5955
5171
|
_this.container = container;
|
|
5956
|
-
};
|
|
5172
|
+
});
|
|
5957
5173
|
|
|
5958
5174
|
_this.container = null;
|
|
5959
5175
|
_this.internalPlayer = null;
|
|
5960
5176
|
return _this;
|
|
5961
5177
|
}
|
|
5962
5178
|
|
|
5963
|
-
/**
|
|
5964
|
-
* Expose PlayerState constants for convenience. These constants can also be
|
|
5965
|
-
* accessed through the global YT object after the YouTube IFrame API is instantiated.
|
|
5966
|
-
* https://developers.google.com/youtube/iframe_api_reference#onStateChange
|
|
5967
|
-
*/
|
|
5968
|
-
|
|
5969
|
-
|
|
5970
5179
|
_createClass(YouTube, [{
|
|
5971
|
-
key:
|
|
5180
|
+
key: "componentDidMount",
|
|
5972
5181
|
value: function componentDidMount() {
|
|
5973
5182
|
this.createPlayer();
|
|
5974
5183
|
}
|
|
5975
5184
|
}, {
|
|
5976
|
-
key:
|
|
5185
|
+
key: "componentDidUpdate",
|
|
5977
5186
|
value: function componentDidUpdate(prevProps) {
|
|
5978
5187
|
if (shouldUpdatePlayer(prevProps, this.props)) {
|
|
5979
5188
|
this.updatePlayer();
|
|
@@ -5988,112 +5197,58 @@ var YouTube = function (_React$Component) {
|
|
|
5988
5197
|
}
|
|
5989
5198
|
}
|
|
5990
5199
|
}, {
|
|
5991
|
-
key:
|
|
5200
|
+
key: "componentWillUnmount",
|
|
5992
5201
|
value: function componentWillUnmount() {
|
|
5993
|
-
/**
|
|
5994
|
-
* Note: The `youtube-player` package that is used promisifies all
|
|
5995
|
-
* Player API calls, which introduces a delay of a tick before it actually
|
|
5996
|
-
* gets destroyed. Since React attempts to remove the element instantly
|
|
5997
|
-
* this method isn't quick enough to reset the container element.
|
|
5202
|
+
/**
|
|
5203
|
+
* Note: The `youtube-player` package that is used promisifies all YouTube
|
|
5204
|
+
* Player API calls, which introduces a delay of a tick before it actually
|
|
5205
|
+
* gets destroyed. Since React attempts to remove the element instantly
|
|
5206
|
+
* this method isn't quick enough to reset the container element.
|
|
5998
5207
|
*/
|
|
5999
5208
|
this.internalPlayer.destroy();
|
|
6000
5209
|
}
|
|
6001
|
-
|
|
6002
|
-
|
|
6003
|
-
*
|
|
6004
|
-
*
|
|
6005
|
-
*
|
|
6006
|
-
* @param {Object} target - player object
|
|
6007
|
-
*/
|
|
6008
|
-
|
|
6009
|
-
|
|
6010
|
-
/**
|
|
6011
|
-
* https://developers.google.com/youtube/iframe_api_reference#onError
|
|
6012
|
-
*
|
|
6013
|
-
* @param {Object} event
|
|
6014
|
-
* @param {Integer} data - error type
|
|
6015
|
-
* @param {Object} target - player object
|
|
6016
|
-
*/
|
|
6017
|
-
|
|
6018
|
-
|
|
6019
|
-
/**
|
|
6020
|
-
* https://developers.google.com/youtube/iframe_api_reference#onStateChange
|
|
6021
|
-
*
|
|
6022
|
-
* @param {Object} event
|
|
6023
|
-
* @param {Integer} data - status change type
|
|
6024
|
-
* @param {Object} target - actual YT player
|
|
6025
|
-
*/
|
|
6026
|
-
|
|
6027
|
-
|
|
6028
|
-
/**
|
|
6029
|
-
* https://developers.google.com/youtube/iframe_api_reference#onPlaybackRateChange
|
|
6030
|
-
*
|
|
6031
|
-
* @param {Object} event
|
|
6032
|
-
* @param {Float} data - playback rate
|
|
6033
|
-
* @param {Object} target - actual YT player
|
|
6034
|
-
*/
|
|
6035
|
-
|
|
6036
|
-
|
|
6037
|
-
/**
|
|
6038
|
-
* https://developers.google.com/youtube/iframe_api_reference#onPlaybackQualityChange
|
|
6039
|
-
*
|
|
6040
|
-
* @param {Object} event
|
|
6041
|
-
* @param {String} data - playback quality
|
|
6042
|
-
* @param {Object} target - actual YT player
|
|
6043
|
-
*/
|
|
6044
|
-
|
|
6045
|
-
|
|
6046
|
-
/**
|
|
6047
|
-
* Initialize the Youtube Player API on the container and attach event handlers
|
|
6048
|
-
*/
|
|
6049
|
-
|
|
6050
|
-
|
|
6051
|
-
/**
|
|
6052
|
-
* Shorthand for destroying and then re-creating the Youtube Player
|
|
6053
|
-
*/
|
|
6054
|
-
|
|
6055
|
-
|
|
6056
|
-
/**
|
|
6057
|
-
* Method to update the id and class of the Youtube Player iframe.
|
|
6058
|
-
* React should update this automatically but since the Youtube Player API
|
|
6059
|
-
* replaced the DIV that is mounted by React we need to do this manually.
|
|
6060
|
-
*/
|
|
6061
|
-
|
|
6062
|
-
|
|
6063
|
-
/**
|
|
6064
|
-
* Call Youtube Player API methods to update the currently playing video.
|
|
6065
|
-
* Depeding on the `opts.playerVars.autoplay` this function uses one of two
|
|
6066
|
-
* Youtube Player API methods to update the video.
|
|
5210
|
+
/**
|
|
5211
|
+
* https://developers.google.com/youtube/iframe_api_reference#onReady
|
|
5212
|
+
*
|
|
5213
|
+
* @param {Object} event
|
|
5214
|
+
* @param {Object} target - player object
|
|
6067
5215
|
*/
|
|
6068
5216
|
|
|
6069
5217
|
}, {
|
|
6070
|
-
key:
|
|
5218
|
+
key: "render",
|
|
6071
5219
|
value: function render() {
|
|
6072
|
-
return React__default.createElement(
|
|
6073
|
-
|
|
6074
|
-
|
|
6075
|
-
|
|
6076
|
-
|
|
5220
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
5221
|
+
className: this.props.containerClassName
|
|
5222
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
5223
|
+
id: this.props.id,
|
|
5224
|
+
className: this.props.className,
|
|
5225
|
+
ref: this.refContainer
|
|
5226
|
+
}));
|
|
6077
5227
|
}
|
|
6078
5228
|
}]);
|
|
6079
5229
|
|
|
6080
5230
|
return YouTube;
|
|
6081
5231
|
}(React__default.Component);
|
|
6082
5232
|
|
|
5233
|
+
_defineProperty(YouTube, "PlayerState", {
|
|
5234
|
+
UNSTARTED: -1,
|
|
5235
|
+
ENDED: 0,
|
|
5236
|
+
PLAYING: 1,
|
|
5237
|
+
PAUSED: 2,
|
|
5238
|
+
BUFFERING: 3,
|
|
5239
|
+
CUED: 5
|
|
5240
|
+
});
|
|
5241
|
+
|
|
6083
5242
|
YouTube.propTypes = {
|
|
6084
5243
|
videoId: PropTypes.string,
|
|
6085
|
-
|
|
6086
5244
|
// custom ID for player element
|
|
6087
5245
|
id: PropTypes.string,
|
|
6088
|
-
|
|
6089
5246
|
// custom class name for player element
|
|
6090
5247
|
className: PropTypes.string,
|
|
6091
5248
|
// custom class name for player container element
|
|
6092
5249
|
containerClassName: PropTypes.string,
|
|
6093
|
-
|
|
6094
5250
|
// https://developers.google.com/youtube/iframe_api_reference#Loading_a_Video_Player
|
|
6095
5251
|
opts: PropTypes.objectOf(PropTypes.any),
|
|
6096
|
-
|
|
6097
5252
|
// event subscriptions
|
|
6098
5253
|
onReady: PropTypes.func,
|
|
6099
5254
|
onError: PropTypes.func,
|
|
@@ -6105,6 +5260,7 @@ YouTube.propTypes = {
|
|
|
6105
5260
|
onPlaybackQualityChange: PropTypes.func
|
|
6106
5261
|
};
|
|
6107
5262
|
YouTube.defaultProps = {
|
|
5263
|
+
videoId: null,
|
|
6108
5264
|
id: null,
|
|
6109
5265
|
className: null,
|
|
6110
5266
|
opts: {},
|
|
@@ -6118,19 +5274,33 @@ YouTube.defaultProps = {
|
|
|
6118
5274
|
onPlaybackRateChange: function onPlaybackRateChange() {},
|
|
6119
5275
|
onPlaybackQualityChange: function onPlaybackQualityChange() {}
|
|
6120
5276
|
};
|
|
6121
|
-
YouTube.PlayerState = {
|
|
6122
|
-
UNSTARTED: -1,
|
|
6123
|
-
ENDED: 0,
|
|
6124
|
-
PLAYING: 1,
|
|
6125
|
-
PAUSED: 2,
|
|
6126
|
-
BUFFERING: 3,
|
|
6127
|
-
CUED: 5
|
|
6128
|
-
};
|
|
6129
5277
|
|
|
6130
5278
|
var YouTubePlayer = function YouTubePlayer(_ref) {
|
|
6131
5279
|
var url = _ref.url;
|
|
6132
5280
|
|
|
6133
|
-
var id = getYoutubeId(url);
|
|
5281
|
+
var id = getYoutubeId(url);
|
|
5282
|
+
|
|
5283
|
+
var _useState = useState(false),
|
|
5284
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
5285
|
+
playReported = _useState2[0],
|
|
5286
|
+
setPlayReported = _useState2[1];
|
|
5287
|
+
|
|
5288
|
+
var _useState3 = useState(false),
|
|
5289
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
5290
|
+
endReported = _useState4[0],
|
|
5291
|
+
setEndReported = _useState4[1];
|
|
5292
|
+
|
|
5293
|
+
var _useState5 = useState(null),
|
|
5294
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
5295
|
+
intervalID = _useState6[0],
|
|
5296
|
+
setIntervalID = _useState6[1];
|
|
5297
|
+
|
|
5298
|
+
var _useState7 = useState(null),
|
|
5299
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
5300
|
+
segmentData = _useState8[0],
|
|
5301
|
+
setSegemntData = _useState8[1];
|
|
5302
|
+
|
|
5303
|
+
var queueProgress = [];
|
|
6134
5304
|
|
|
6135
5305
|
var opts = {
|
|
6136
5306
|
width: '100%',
|
|
@@ -6139,7 +5309,77 @@ var YouTubePlayer = function YouTubePlayer(_ref) {
|
|
|
6139
5309
|
}
|
|
6140
5310
|
};
|
|
6141
5311
|
|
|
6142
|
-
|
|
5312
|
+
useEffect(function () {
|
|
5313
|
+
if (segmentData) {
|
|
5314
|
+
console.log('Video Segment', segmentData);
|
|
5315
|
+
Beam.report_beam_video('Segment', main_16, segmentData.duration, segmentData.current, segmentData.segment);
|
|
5316
|
+
}
|
|
5317
|
+
}, [segmentData]);
|
|
5318
|
+
|
|
5319
|
+
var handlePlayPercent = function handlePlayPercent(player) {
|
|
5320
|
+
var current = player.getCurrentTime();
|
|
5321
|
+
var duration = player.getDuration();
|
|
5322
|
+
var queue = Math.floor(duration / 10);
|
|
5323
|
+
var segment = Math.floor(current / queue);
|
|
5324
|
+
|
|
5325
|
+
if (!queueProgress.includes(segment)) {
|
|
5326
|
+
setSegemntData({
|
|
5327
|
+
current: current,
|
|
5328
|
+
duration: duration,
|
|
5329
|
+
queue: queue,
|
|
5330
|
+
segment: segment
|
|
5331
|
+
});
|
|
5332
|
+
queueProgress.push(segment);
|
|
5333
|
+
}
|
|
5334
|
+
};
|
|
5335
|
+
|
|
5336
|
+
var handleOnPlay = function handleOnPlay(event) {
|
|
5337
|
+
// report play
|
|
5338
|
+
if (!playReported) {
|
|
5339
|
+
console.log('Video Play', event);
|
|
5340
|
+
|
|
5341
|
+
var player = event.target;
|
|
5342
|
+
var current = player.getCurrentTime();
|
|
5343
|
+
var duration = player.getDuration();
|
|
5344
|
+
var queue = Math.floor(duration / 10);
|
|
5345
|
+
var segment = Math.floor(current / queue);
|
|
5346
|
+
|
|
5347
|
+
Beam.report_beam_video('Play', main_16, duration, current, segment);
|
|
5348
|
+
setPlayReported(true);
|
|
5349
|
+
var _intervalID = setInterval(function () {
|
|
5350
|
+
handlePlayPercent(event.target);
|
|
5351
|
+
}, 1000);
|
|
5352
|
+
setIntervalID(_intervalID);
|
|
5353
|
+
}
|
|
5354
|
+
};
|
|
5355
|
+
|
|
5356
|
+
var handleOnEnd = function handleOnEnd(event) {
|
|
5357
|
+
if (!endReported) {
|
|
5358
|
+
console.log('Video End', event);
|
|
5359
|
+
var player = event.target;
|
|
5360
|
+
var current = player.getCurrentTime();
|
|
5361
|
+
var duration = player.getDuration();
|
|
5362
|
+
var queue = Math.floor(duration / 10);
|
|
5363
|
+
var segment = Math.floor(current / queue);
|
|
5364
|
+
|
|
5365
|
+
Beam.report_beam_video('End', main_16, duration, current, segment);
|
|
5366
|
+
setEndReported(true);
|
|
5367
|
+
clearInterval(intervalID);
|
|
5368
|
+
}
|
|
5369
|
+
};
|
|
5370
|
+
|
|
5371
|
+
var handleOnPause = function handleOnPause(event) {
|
|
5372
|
+
console.log('Video Pause');
|
|
5373
|
+
var player = event.target;
|
|
5374
|
+
var current = player.getCurrentTime();
|
|
5375
|
+
var duration = player.getDuration();
|
|
5376
|
+
var queue = Math.floor(duration / 10);
|
|
5377
|
+
var segment = Math.floor(current / queue);
|
|
5378
|
+
|
|
5379
|
+
Beam.report_beam_video('Pause', main_16, duration, current, segment);
|
|
5380
|
+
};
|
|
5381
|
+
|
|
5382
|
+
return React__default.createElement(YouTube, { videoId: id, opts: opts, onPlay: handleOnPlay, onPause: handleOnPause, onEnd: handleOnEnd });
|
|
6143
5383
|
};
|
|
6144
5384
|
|
|
6145
5385
|
var Sidebar = function Sidebar(_ref) {
|
|
@@ -6664,10 +5904,10 @@ function datasetify(elem) {
|
|
|
6664
5904
|
props.push({ name: "data-" + key, value: ds[key] });
|
|
6665
5905
|
}
|
|
6666
5906
|
|
|
6667
|
-
return props.length ? stringify
|
|
5907
|
+
return props.length ? stringify(props) : ""
|
|
6668
5908
|
}
|
|
6669
5909
|
|
|
6670
|
-
function stringify
|
|
5910
|
+
function stringify(list) {
|
|
6671
5911
|
var attributes = [];
|
|
6672
5912
|
list.forEach(function (tuple) {
|
|
6673
5913
|
var name = tuple.name;
|
|
@@ -6703,7 +5943,7 @@ function properties(elem) {
|
|
|
6703
5943
|
props.push({ name: "class", value: elem.className });
|
|
6704
5944
|
}
|
|
6705
5945
|
|
|
6706
|
-
return props.length ? stringify
|
|
5946
|
+
return props.length ? stringify(props) : ""
|
|
6707
5947
|
}
|
|
6708
5948
|
|
|
6709
5949
|
function escapeText(s) {
|
|
@@ -7068,8 +6308,8 @@ var window_1 = win;
|
|
|
7068
6308
|
|
|
7069
6309
|
/*! @name @brightcove/react-player-loader @version 1.4.0 @license Apache-2.0 */
|
|
7070
6310
|
|
|
7071
|
-
function _extends
|
|
7072
|
-
_extends
|
|
6311
|
+
function _extends() {
|
|
6312
|
+
_extends = Object.assign || function (target) {
|
|
7073
6313
|
for (var i = 1; i < arguments.length; i++) {
|
|
7074
6314
|
var source = arguments[i];
|
|
7075
6315
|
|
|
@@ -7083,7 +6323,7 @@ function _extends$1() {
|
|
|
7083
6323
|
return target;
|
|
7084
6324
|
};
|
|
7085
6325
|
|
|
7086
|
-
return _extends
|
|
6326
|
+
return _extends.apply(this, arguments);
|
|
7087
6327
|
}
|
|
7088
6328
|
|
|
7089
6329
|
function _inheritsLoose(subClass, superClass) {
|
|
@@ -7092,7 +6332,7 @@ function _inheritsLoose(subClass, superClass) {
|
|
|
7092
6332
|
subClass.__proto__ = superClass;
|
|
7093
6333
|
}
|
|
7094
6334
|
|
|
7095
|
-
function _assertThisInitialized(self) {
|
|
6335
|
+
function _assertThisInitialized$1(self) {
|
|
7096
6336
|
if (self === void 0) {
|
|
7097
6337
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
7098
6338
|
}
|
|
@@ -7102,8 +6342,8 @@ function _assertThisInitialized(self) {
|
|
|
7102
6342
|
|
|
7103
6343
|
/*! @name @brightcove/player-loader @version 1.7.1 @license Apache-2.0 */
|
|
7104
6344
|
|
|
7105
|
-
function _extends$1
|
|
7106
|
-
_extends$1
|
|
6345
|
+
function _extends$1() {
|
|
6346
|
+
_extends$1 = Object.assign || function (target) {
|
|
7107
6347
|
for (var i = 1; i < arguments.length; i++) {
|
|
7108
6348
|
var source = arguments[i];
|
|
7109
6349
|
|
|
@@ -7117,7 +6357,7 @@ function _extends$1$1() {
|
|
|
7117
6357
|
return target;
|
|
7118
6358
|
};
|
|
7119
6359
|
|
|
7120
|
-
return _extends$1
|
|
6360
|
+
return _extends$1.apply(this, arguments);
|
|
7121
6361
|
}
|
|
7122
6362
|
|
|
7123
6363
|
var version$1 = "1.7.1";
|
|
@@ -7125,7 +6365,7 @@ var version$1 = "1.7.1";
|
|
|
7125
6365
|
/*! @name @brightcove/player-url @version 1.2.0 @license Apache-2.0 */
|
|
7126
6366
|
var version$1$1 = "1.2.0";
|
|
7127
6367
|
|
|
7128
|
-
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
|
|
6368
|
+
var _typeof$1 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
|
|
7129
6369
|
return typeof obj;
|
|
7130
6370
|
} : function (obj) {
|
|
7131
6371
|
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
@@ -7260,7 +6500,7 @@ var brightcovePlayerUrl = function brightcovePlayerUrl(_ref) {
|
|
|
7260
6500
|
|
|
7261
6501
|
var qs = '';
|
|
7262
6502
|
|
|
7263
|
-
if (iframe && queryParams && (typeof queryParams === 'undefined' ? 'undefined' : _typeof(queryParams)) === 'object') {
|
|
6503
|
+
if (iframe && queryParams && (typeof queryParams === 'undefined' ? 'undefined' : _typeof$1(queryParams)) === 'object') {
|
|
7264
6504
|
qs = getQueryString(queryParams);
|
|
7265
6505
|
}
|
|
7266
6506
|
|
|
@@ -7494,7 +6734,7 @@ var wrapResponsive = function wrapResponsive(embedType, embedOptions, el) {
|
|
|
7494
6734
|
el.style.width = '100%';
|
|
7495
6735
|
el.style.height = '100%';
|
|
7496
6736
|
|
|
7497
|
-
var responsive = _extends$1
|
|
6737
|
+
var responsive = _extends$1({
|
|
7498
6738
|
aspectRatio: DEFAULT_ASPECT_RATIO,
|
|
7499
6739
|
iframeHorizontalPlaylist: DEFAULT_IFRAME_HORIZONTAL_PLAYLIST,
|
|
7500
6740
|
maxWidth: DEFAULT_MAX_WIDTH
|
|
@@ -8179,7 +7419,7 @@ var loadPlayer = function loadPlayer(params, resolve, reject) {
|
|
|
8179
7419
|
|
|
8180
7420
|
|
|
8181
7421
|
var brightcovePlayerLoader = function brightcovePlayerLoader(parameters) {
|
|
8182
|
-
var params = _extends$1
|
|
7422
|
+
var params = _extends$1({}, DEFAULTS, parameters);
|
|
8183
7423
|
|
|
8184
7424
|
var Promise = params.Promise,
|
|
8185
7425
|
onSuccess = params.onSuccess,
|
|
@@ -8321,7 +7561,7 @@ function (_React$Component) {
|
|
|
8321
7561
|
_this.refNode = ref;
|
|
8322
7562
|
};
|
|
8323
7563
|
|
|
8324
|
-
_this.loadPlayer = _this.loadPlayer.bind(_assertThisInitialized(_this));
|
|
7564
|
+
_this.loadPlayer = _this.loadPlayer.bind(_assertThisInitialized$1(_this));
|
|
8325
7565
|
return _this;
|
|
8326
7566
|
}
|
|
8327
7567
|
/**
|
|
@@ -8342,7 +7582,7 @@ function (_React$Component) {
|
|
|
8342
7582
|
var userSuccess = this.props.onSuccess;
|
|
8343
7583
|
var userFailure = this.props.onFailure;
|
|
8344
7584
|
|
|
8345
|
-
var options = _extends
|
|
7585
|
+
var options = _extends({}, this.props, {
|
|
8346
7586
|
refNode: this.refNode,
|
|
8347
7587
|
refNodeInsert: 'append',
|
|
8348
7588
|
onSuccess: function onSuccess(_ref) {
|
|
@@ -8651,7 +7891,7 @@ function (_React$Component) {
|
|
|
8651
7891
|
;
|
|
8652
7892
|
|
|
8653
7893
|
_proto.render = function render() {
|
|
8654
|
-
var props = _extends
|
|
7894
|
+
var props = _extends({
|
|
8655
7895
|
className: 'brightcove-react-player-loader'
|
|
8656
7896
|
}, this.props.attrs, {
|
|
8657
7897
|
ref: this.setRefNode
|
|
@@ -9065,11 +8305,17 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
|
9065
8305
|
|
|
9066
8306
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9067
8307
|
|
|
9068
|
-
function
|
|
8308
|
+
function _createForOfIteratorHelper(o) { if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) { var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var it, normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
8309
|
+
|
|
8310
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
9069
8311
|
|
|
9070
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
|
|
8312
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9071
8313
|
|
|
9072
|
-
function
|
|
8314
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
8315
|
+
|
|
8316
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
8317
|
+
|
|
8318
|
+
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
9073
8319
|
|
|
9074
8320
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
9075
8321
|
|
|
@@ -9199,12 +8445,12 @@ function getSDK(url, sdkGlobal) {
|
|
|
9199
8445
|
|
|
9200
8446
|
function getConfig(props$1, defaultProps, showWarning) {
|
|
9201
8447
|
var config = (0, _deepmerge["default"])(defaultProps.config, props$1.config);
|
|
9202
|
-
|
|
9203
|
-
var
|
|
9204
|
-
|
|
8448
|
+
|
|
8449
|
+
var _iterator = _createForOfIteratorHelper(props.DEPRECATED_CONFIG_PROPS),
|
|
8450
|
+
_step;
|
|
9205
8451
|
|
|
9206
8452
|
try {
|
|
9207
|
-
for (
|
|
8453
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
9208
8454
|
var p = _step.value;
|
|
9209
8455
|
|
|
9210
8456
|
if (props$1[p]) {
|
|
@@ -9219,18 +8465,9 @@ function getConfig(props$1, defaultProps, showWarning) {
|
|
|
9219
8465
|
}
|
|
9220
8466
|
}
|
|
9221
8467
|
} catch (err) {
|
|
9222
|
-
|
|
9223
|
-
_iteratorError = err;
|
|
8468
|
+
_iterator.e(err);
|
|
9224
8469
|
} finally {
|
|
9225
|
-
|
|
9226
|
-
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
|
|
9227
|
-
_iterator["return"]();
|
|
9228
|
-
}
|
|
9229
|
-
} finally {
|
|
9230
|
-
if (_didIteratorError) {
|
|
9231
|
-
throw _iteratorError;
|
|
9232
|
-
}
|
|
9233
|
-
}
|
|
8470
|
+
_iterator.f();
|
|
9234
8471
|
}
|
|
9235
8472
|
|
|
9236
8473
|
return config;
|
|
@@ -9377,12 +8614,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
9377
8614
|
|
|
9378
8615
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
9379
8616
|
|
|
9380
|
-
function
|
|
8617
|
+
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
9381
8618
|
|
|
9382
|
-
function
|
|
8619
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
9383
8620
|
|
|
9384
8621
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9385
8622
|
|
|
8623
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
8624
|
+
|
|
8625
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
8626
|
+
|
|
9386
8627
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
9387
8628
|
|
|
9388
8629
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -9391,14 +8632,12 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
9391
8632
|
|
|
9392
8633
|
var SEEK_ON_PLAY_EXPIRY = 5000;
|
|
9393
8634
|
|
|
9394
|
-
var Player =
|
|
9395
|
-
/*#__PURE__*/
|
|
9396
|
-
function (_Component) {
|
|
8635
|
+
var Player = /*#__PURE__*/function (_Component) {
|
|
9397
8636
|
_inherits(Player, _Component);
|
|
9398
8637
|
|
|
9399
|
-
|
|
9400
|
-
var _getPrototypeOf2;
|
|
8638
|
+
var _super = _createSuper(Player);
|
|
9401
8639
|
|
|
8640
|
+
function Player() {
|
|
9402
8641
|
var _this;
|
|
9403
8642
|
|
|
9404
8643
|
_classCallCheck(this, Player);
|
|
@@ -9407,7 +8646,7 @@ function (_Component) {
|
|
|
9407
8646
|
_args[_key] = arguments[_key];
|
|
9408
8647
|
}
|
|
9409
8648
|
|
|
9410
|
-
_this =
|
|
8649
|
+
_this = _super.call.apply(_super, [this].concat(_args));
|
|
9411
8650
|
|
|
9412
8651
|
_defineProperty(_assertThisInitialized(_this), "mounted", false);
|
|
9413
8652
|
|
|
@@ -9732,7 +8971,7 @@ function (_Component) {
|
|
|
9732
8971
|
return null;
|
|
9733
8972
|
}
|
|
9734
8973
|
|
|
9735
|
-
return _react["default"].createElement(Player, _extends({}, this.props, {
|
|
8974
|
+
return /*#__PURE__*/_react["default"].createElement(Player, _extends({}, this.props, {
|
|
9736
8975
|
ref: this.ref,
|
|
9737
8976
|
onReady: this.handleReady,
|
|
9738
8977
|
onPlay: this.handlePlay,
|
|
@@ -9793,12 +9032,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
9793
9032
|
|
|
9794
9033
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
9795
9034
|
|
|
9796
|
-
function
|
|
9035
|
+
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
9797
9036
|
|
|
9798
|
-
function
|
|
9037
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
9799
9038
|
|
|
9800
9039
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9801
9040
|
|
|
9041
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
9042
|
+
|
|
9043
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
9044
|
+
|
|
9802
9045
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
9803
9046
|
|
|
9804
9047
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -9810,14 +9053,12 @@ var SUPPORTED_PROPS = Object.keys(props.propTypes);
|
|
|
9810
9053
|
function createSinglePlayer(activePlayer) {
|
|
9811
9054
|
var _class, _temp;
|
|
9812
9055
|
|
|
9813
|
-
return _temp = _class =
|
|
9814
|
-
/*#__PURE__*/
|
|
9815
|
-
function (_Component) {
|
|
9056
|
+
return _temp = _class = /*#__PURE__*/function (_Component) {
|
|
9816
9057
|
_inherits(SinglePlayer, _Component);
|
|
9817
9058
|
|
|
9818
|
-
|
|
9819
|
-
var _getPrototypeOf2;
|
|
9059
|
+
var _super = _createSuper(SinglePlayer);
|
|
9820
9060
|
|
|
9061
|
+
function SinglePlayer() {
|
|
9821
9062
|
var _this;
|
|
9822
9063
|
|
|
9823
9064
|
_classCallCheck(this, SinglePlayer);
|
|
@@ -9826,7 +9067,7 @@ function createSinglePlayer(activePlayer) {
|
|
|
9826
9067
|
args[_key] = arguments[_key];
|
|
9827
9068
|
}
|
|
9828
9069
|
|
|
9829
|
-
_this =
|
|
9070
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
9830
9071
|
|
|
9831
9072
|
_defineProperty(_assertThisInitialized(_this), "config", (0, utils.getConfig)(_this.props, props.defaultProps, true));
|
|
9832
9073
|
|
|
@@ -9894,12 +9135,12 @@ function createSinglePlayer(activePlayer) {
|
|
|
9894
9135
|
height = _this$props.height,
|
|
9895
9136
|
Wrapper = _this$props.wrapper;
|
|
9896
9137
|
var otherProps = (0, utils.omit)(this.props, SUPPORTED_PROPS, props.DEPRECATED_CONFIG_PROPS);
|
|
9897
|
-
return _react["default"].createElement(Wrapper, _extends({
|
|
9138
|
+
return /*#__PURE__*/_react["default"].createElement(Wrapper, _extends({
|
|
9898
9139
|
style: _objectSpread({}, style, {
|
|
9899
9140
|
width: width,
|
|
9900
9141
|
height: height
|
|
9901
9142
|
})
|
|
9902
|
-
}, otherProps), _react["default"].createElement(_Player["default"], _extends({}, this.props, {
|
|
9143
|
+
}, otherProps), /*#__PURE__*/_react["default"].createElement(_Player["default"], _extends({}, this.props, {
|
|
9903
9144
|
ref: this.ref,
|
|
9904
9145
|
activePlayer: activePlayer,
|
|
9905
9146
|
config: this.config
|
|
@@ -9945,23 +9186,31 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
9945
9186
|
|
|
9946
9187
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
9947
9188
|
|
|
9948
|
-
function
|
|
9189
|
+
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
9949
9190
|
|
|
9950
|
-
function
|
|
9191
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
9951
9192
|
|
|
9952
9193
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9953
9194
|
|
|
9195
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
9196
|
+
|
|
9197
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
9198
|
+
|
|
9954
9199
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
9955
9200
|
|
|
9956
9201
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
9957
9202
|
|
|
9958
9203
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9959
9204
|
|
|
9960
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
|
|
9205
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
9206
|
+
|
|
9207
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9208
|
+
|
|
9209
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
9961
9210
|
|
|
9962
|
-
function
|
|
9211
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
9963
9212
|
|
|
9964
|
-
function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr)
|
|
9213
|
+
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
9965
9214
|
|
|
9966
9215
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
9967
9216
|
|
|
@@ -9986,14 +9235,12 @@ function parsePlaylist(url) {
|
|
|
9986
9235
|
return {};
|
|
9987
9236
|
}
|
|
9988
9237
|
|
|
9989
|
-
var YouTube =
|
|
9990
|
-
/*#__PURE__*/
|
|
9991
|
-
function (_Component) {
|
|
9238
|
+
var YouTube = /*#__PURE__*/function (_Component) {
|
|
9992
9239
|
_inherits(YouTube, _Component);
|
|
9993
9240
|
|
|
9994
|
-
|
|
9995
|
-
var _getPrototypeOf2;
|
|
9241
|
+
var _super = _createSuper(YouTube);
|
|
9996
9242
|
|
|
9243
|
+
function YouTube() {
|
|
9997
9244
|
var _this;
|
|
9998
9245
|
|
|
9999
9246
|
_classCallCheck(this, YouTube);
|
|
@@ -10002,7 +9249,7 @@ function (_Component) {
|
|
|
10002
9249
|
args[_key] = arguments[_key];
|
|
10003
9250
|
}
|
|
10004
9251
|
|
|
10005
|
-
_this =
|
|
9252
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
10006
9253
|
|
|
10007
9254
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
10008
9255
|
|
|
@@ -10190,9 +9437,9 @@ function (_Component) {
|
|
|
10190
9437
|
height: '100%',
|
|
10191
9438
|
display: display
|
|
10192
9439
|
};
|
|
10193
|
-
return _react["default"].createElement("div", {
|
|
9440
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
10194
9441
|
style: style
|
|
10195
|
-
}, _react["default"].createElement("div", {
|
|
9442
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
10196
9443
|
ref: this.ref
|
|
10197
9444
|
}));
|
|
10198
9445
|
}
|
|
@@ -10248,12 +9495,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
10248
9495
|
|
|
10249
9496
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
10250
9497
|
|
|
10251
|
-
function
|
|
9498
|
+
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10252
9499
|
|
|
10253
|
-
function
|
|
9500
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
10254
9501
|
|
|
10255
9502
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10256
9503
|
|
|
9504
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
9505
|
+
|
|
9506
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
9507
|
+
|
|
10257
9508
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
10258
9509
|
|
|
10259
9510
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -10262,16 +9513,14 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
10262
9513
|
|
|
10263
9514
|
var SDK_URL = 'https://w.soundcloud.com/player/api.js';
|
|
10264
9515
|
var SDK_GLOBAL = 'SC';
|
|
10265
|
-
var MATCH_URL = /(soundcloud\.com|snd\.sc)
|
|
9516
|
+
var MATCH_URL = /(?:soundcloud\.com|snd\.sc)\/[^.]+$/;
|
|
10266
9517
|
|
|
10267
|
-
var SoundCloud =
|
|
10268
|
-
/*#__PURE__*/
|
|
10269
|
-
function (_Component) {
|
|
9518
|
+
var SoundCloud = /*#__PURE__*/function (_Component) {
|
|
10270
9519
|
_inherits(SoundCloud, _Component);
|
|
10271
9520
|
|
|
10272
|
-
|
|
10273
|
-
var _getPrototypeOf2;
|
|
9521
|
+
var _super = _createSuper(SoundCloud);
|
|
10274
9522
|
|
|
9523
|
+
function SoundCloud() {
|
|
10275
9524
|
var _this;
|
|
10276
9525
|
|
|
10277
9526
|
_classCallCheck(this, SoundCloud);
|
|
@@ -10280,7 +9529,7 @@ function (_Component) {
|
|
|
10280
9529
|
args[_key] = arguments[_key];
|
|
10281
9530
|
}
|
|
10282
9531
|
|
|
10283
|
-
_this =
|
|
9532
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
10284
9533
|
|
|
10285
9534
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
10286
9535
|
|
|
@@ -10401,7 +9650,7 @@ function (_Component) {
|
|
|
10401
9650
|
height: '100%',
|
|
10402
9651
|
display: display
|
|
10403
9652
|
};
|
|
10404
|
-
return _react["default"].createElement("iframe", {
|
|
9653
|
+
return /*#__PURE__*/_react["default"].createElement("iframe", {
|
|
10405
9654
|
ref: this.ref,
|
|
10406
9655
|
src: "https://w.soundcloud.com/player/?url=".concat(encodeURIComponent(this.props.url)),
|
|
10407
9656
|
style: style,
|
|
@@ -10463,12 +9712,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
10463
9712
|
|
|
10464
9713
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
10465
9714
|
|
|
10466
|
-
function
|
|
9715
|
+
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10467
9716
|
|
|
10468
|
-
function
|
|
9717
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
10469
9718
|
|
|
10470
9719
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10471
9720
|
|
|
9721
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
9722
|
+
|
|
9723
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
9724
|
+
|
|
10472
9725
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
10473
9726
|
|
|
10474
9727
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -10480,14 +9733,12 @@ var SDK_GLOBAL = 'Vimeo';
|
|
|
10480
9733
|
var MATCH_URL = /vimeo\.com\/.+/;
|
|
10481
9734
|
var MATCH_FILE_URL = /vimeo\.com\/external\/[0-9]+\..+/;
|
|
10482
9735
|
|
|
10483
|
-
var Vimeo =
|
|
10484
|
-
/*#__PURE__*/
|
|
10485
|
-
function (_Component) {
|
|
9736
|
+
var Vimeo = /*#__PURE__*/function (_Component) {
|
|
10486
9737
|
_inherits(Vimeo, _Component);
|
|
10487
9738
|
|
|
10488
|
-
|
|
10489
|
-
var _getPrototypeOf2;
|
|
9739
|
+
var _super = _createSuper(Vimeo);
|
|
10490
9740
|
|
|
9741
|
+
function Vimeo() {
|
|
10491
9742
|
var _this;
|
|
10492
9743
|
|
|
10493
9744
|
_classCallCheck(this, Vimeo);
|
|
@@ -10496,7 +9747,7 @@ function (_Component) {
|
|
|
10496
9747
|
args[_key] = arguments[_key];
|
|
10497
9748
|
}
|
|
10498
9749
|
|
|
10499
|
-
_this =
|
|
9750
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
10500
9751
|
|
|
10501
9752
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
10502
9753
|
|
|
@@ -10653,7 +9904,7 @@ function (_Component) {
|
|
|
10653
9904
|
overflow: 'hidden',
|
|
10654
9905
|
display: display
|
|
10655
9906
|
};
|
|
10656
|
-
return _react["default"].createElement("div", {
|
|
9907
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
10657
9908
|
key: this.props.url,
|
|
10658
9909
|
ref: this.ref,
|
|
10659
9910
|
style: style
|
|
@@ -10713,12 +9964,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
10713
9964
|
|
|
10714
9965
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
10715
9966
|
|
|
10716
|
-
function
|
|
9967
|
+
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10717
9968
|
|
|
10718
|
-
function
|
|
9969
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
10719
9970
|
|
|
10720
9971
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10721
9972
|
|
|
9973
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
9974
|
+
|
|
9975
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
9976
|
+
|
|
10722
9977
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
10723
9978
|
|
|
10724
9979
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -10731,14 +9986,12 @@ var SDK_GLOBAL_READY = 'fbAsyncInit';
|
|
|
10731
9986
|
var MATCH_URL = /^https?:\/\/(www\.)?facebook\.com.*\/(video(s)?|watch|story)(\.php?|\/).+$/;
|
|
10732
9987
|
var PLAYER_ID_PREFIX = 'facebook-player-';
|
|
10733
9988
|
|
|
10734
|
-
var Facebook =
|
|
10735
|
-
/*#__PURE__*/
|
|
10736
|
-
function (_Component) {
|
|
9989
|
+
var Facebook = /*#__PURE__*/function (_Component) {
|
|
10737
9990
|
_inherits(Facebook, _Component);
|
|
10738
9991
|
|
|
10739
|
-
|
|
10740
|
-
var _getPrototypeOf2;
|
|
9992
|
+
var _super = _createSuper(Facebook);
|
|
10741
9993
|
|
|
9994
|
+
function Facebook() {
|
|
10742
9995
|
var _this;
|
|
10743
9996
|
|
|
10744
9997
|
_classCallCheck(this, Facebook);
|
|
@@ -10747,7 +10000,7 @@ function (_Component) {
|
|
|
10747
10000
|
args[_key] = arguments[_key];
|
|
10748
10001
|
}
|
|
10749
10002
|
|
|
10750
|
-
_this =
|
|
10003
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
10751
10004
|
|
|
10752
10005
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
10753
10006
|
|
|
@@ -10863,7 +10116,7 @@ function (_Component) {
|
|
|
10863
10116
|
width: '100%',
|
|
10864
10117
|
height: '100%'
|
|
10865
10118
|
};
|
|
10866
|
-
return _react["default"].createElement("div", {
|
|
10119
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
10867
10120
|
style: style,
|
|
10868
10121
|
id: this.playerID,
|
|
10869
10122
|
className: "fb-video",
|
|
@@ -10923,12 +10176,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
10923
10176
|
|
|
10924
10177
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
10925
10178
|
|
|
10926
|
-
function
|
|
10179
|
+
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
10927
10180
|
|
|
10928
|
-
function
|
|
10181
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
10929
10182
|
|
|
10930
10183
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10931
10184
|
|
|
10185
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
10186
|
+
|
|
10187
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
10188
|
+
|
|
10932
10189
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
10933
10190
|
|
|
10934
10191
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -10939,14 +10196,12 @@ var SDK_URL = 'https://cdn.embed.ly/player-0.1.0.min.js';
|
|
|
10939
10196
|
var SDK_GLOBAL = 'playerjs';
|
|
10940
10197
|
var MATCH_URL = /streamable\.com\/([a-z0-9]+)$/;
|
|
10941
10198
|
|
|
10942
|
-
var Streamable =
|
|
10943
|
-
/*#__PURE__*/
|
|
10944
|
-
function (_Component) {
|
|
10199
|
+
var Streamable = /*#__PURE__*/function (_Component) {
|
|
10945
10200
|
_inherits(Streamable, _Component);
|
|
10946
10201
|
|
|
10947
|
-
|
|
10948
|
-
var _getPrototypeOf2;
|
|
10202
|
+
var _super = _createSuper(Streamable);
|
|
10949
10203
|
|
|
10204
|
+
function Streamable() {
|
|
10950
10205
|
var _this;
|
|
10951
10206
|
|
|
10952
10207
|
_classCallCheck(this, Streamable);
|
|
@@ -10955,7 +10210,7 @@ function (_Component) {
|
|
|
10955
10210
|
args[_key] = arguments[_key];
|
|
10956
10211
|
}
|
|
10957
10212
|
|
|
10958
|
-
_this =
|
|
10213
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
10959
10214
|
|
|
10960
10215
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
10961
10216
|
|
|
@@ -11075,7 +10330,7 @@ function (_Component) {
|
|
|
11075
10330
|
width: '100%',
|
|
11076
10331
|
height: '100%'
|
|
11077
10332
|
};
|
|
11078
|
-
return _react["default"].createElement("iframe", {
|
|
10333
|
+
return /*#__PURE__*/_react["default"].createElement("iframe", {
|
|
11079
10334
|
ref: this.ref,
|
|
11080
10335
|
src: "https://streamable.com/o/".concat(id),
|
|
11081
10336
|
frameBorder: "0",
|
|
@@ -11136,12 +10391,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
11136
10391
|
|
|
11137
10392
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
11138
10393
|
|
|
11139
|
-
function
|
|
10394
|
+
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
11140
10395
|
|
|
11141
|
-
function
|
|
10396
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
11142
10397
|
|
|
11143
10398
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
11144
10399
|
|
|
10400
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
10401
|
+
|
|
10402
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
10403
|
+
|
|
11145
10404
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
11146
10405
|
|
|
11147
10406
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -11152,26 +10411,48 @@ var SDK_URL = 'https://fast.wistia.com/assets/external/E-v1.js';
|
|
|
11152
10411
|
var SDK_GLOBAL = 'Wistia';
|
|
11153
10412
|
var MATCH_URL = /(?:wistia\.com|wi\.st)\/(?:medias|embed)\/(.*)$/;
|
|
11154
10413
|
|
|
11155
|
-
var Wistia =
|
|
11156
|
-
/*#__PURE__*/
|
|
11157
|
-
function (_Component) {
|
|
10414
|
+
var Wistia = /*#__PURE__*/function (_Component) {
|
|
11158
10415
|
_inherits(Wistia, _Component);
|
|
11159
10416
|
|
|
11160
|
-
|
|
11161
|
-
var _getPrototypeOf2;
|
|
10417
|
+
var _super = _createSuper(Wistia);
|
|
11162
10418
|
|
|
10419
|
+
function Wistia() {
|
|
11163
10420
|
var _this;
|
|
11164
10421
|
|
|
11165
10422
|
_classCallCheck(this, Wistia);
|
|
11166
10423
|
|
|
11167
|
-
for (var _len = arguments.length,
|
|
11168
|
-
|
|
10424
|
+
for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
10425
|
+
_args[_key] = arguments[_key];
|
|
11169
10426
|
}
|
|
11170
10427
|
|
|
11171
|
-
_this =
|
|
10428
|
+
_this = _super.call.apply(_super, [this].concat(_args));
|
|
11172
10429
|
|
|
11173
10430
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
11174
10431
|
|
|
10432
|
+
_defineProperty(_assertThisInitialized(_this), "onPlay", function () {
|
|
10433
|
+
var _this$props;
|
|
10434
|
+
|
|
10435
|
+
return (_this$props = _this.props).onPlay.apply(_this$props, arguments);
|
|
10436
|
+
});
|
|
10437
|
+
|
|
10438
|
+
_defineProperty(_assertThisInitialized(_this), "onPause", function () {
|
|
10439
|
+
var _this$props2;
|
|
10440
|
+
|
|
10441
|
+
return (_this$props2 = _this.props).onPause.apply(_this$props2, arguments);
|
|
10442
|
+
});
|
|
10443
|
+
|
|
10444
|
+
_defineProperty(_assertThisInitialized(_this), "onSeek", function () {
|
|
10445
|
+
var _this$props3;
|
|
10446
|
+
|
|
10447
|
+
return (_this$props3 = _this.props).onSeek.apply(_this$props3, arguments);
|
|
10448
|
+
});
|
|
10449
|
+
|
|
10450
|
+
_defineProperty(_assertThisInitialized(_this), "onEnded", function () {
|
|
10451
|
+
var _this$props4;
|
|
10452
|
+
|
|
10453
|
+
return (_this$props4 = _this.props).onEnded.apply(_this$props4, arguments);
|
|
10454
|
+
});
|
|
10455
|
+
|
|
11175
10456
|
_defineProperty(_assertThisInitialized(_this), "mute", function () {
|
|
11176
10457
|
_this.callPlayer('mute');
|
|
11177
10458
|
});
|
|
@@ -11193,17 +10474,13 @@ function (_Component) {
|
|
|
11193
10474
|
value: function load(url) {
|
|
11194
10475
|
var _this2 = this;
|
|
11195
10476
|
|
|
11196
|
-
var _this$
|
|
11197
|
-
playing = _this$
|
|
11198
|
-
muted = _this$
|
|
11199
|
-
controls = _this$
|
|
11200
|
-
_onReady = _this$
|
|
11201
|
-
|
|
11202
|
-
|
|
11203
|
-
onSeek = _this$props.onSeek,
|
|
11204
|
-
onEnded = _this$props.onEnded,
|
|
11205
|
-
config = _this$props.config,
|
|
11206
|
-
onError = _this$props.onError;
|
|
10477
|
+
var _this$props5 = this.props,
|
|
10478
|
+
playing = _this$props5.playing,
|
|
10479
|
+
muted = _this$props5.muted,
|
|
10480
|
+
controls = _this$props5.controls,
|
|
10481
|
+
_onReady = _this$props5.onReady,
|
|
10482
|
+
config = _this$props5.config,
|
|
10483
|
+
onError = _this$props5.onError;
|
|
11207
10484
|
(0, utils.getSDK)(SDK_URL, SDK_GLOBAL).then(function () {
|
|
11208
10485
|
window._wq = window._wq || [];
|
|
11209
10486
|
|
|
@@ -11220,19 +10497,28 @@ function (_Component) {
|
|
|
11220
10497
|
|
|
11221
10498
|
_this2.unbind();
|
|
11222
10499
|
|
|
11223
|
-
_this2.player.bind('play', onPlay);
|
|
10500
|
+
_this2.player.bind('play', _this2.onPlay);
|
|
11224
10501
|
|
|
11225
|
-
_this2.player.bind('pause', onPause);
|
|
10502
|
+
_this2.player.bind('pause', _this2.onPause);
|
|
11226
10503
|
|
|
11227
|
-
_this2.player.bind('seek', onSeek);
|
|
10504
|
+
_this2.player.bind('seek', _this2.onSeek);
|
|
11228
10505
|
|
|
11229
|
-
_this2.player.bind('end', onEnded);
|
|
10506
|
+
_this2.player.bind('end', _this2.onEnded);
|
|
11230
10507
|
|
|
11231
10508
|
_onReady();
|
|
11232
10509
|
}
|
|
11233
10510
|
});
|
|
11234
10511
|
}, onError);
|
|
11235
10512
|
}
|
|
10513
|
+
}, {
|
|
10514
|
+
key: "unbind",
|
|
10515
|
+
value: function unbind() {
|
|
10516
|
+
this.player.unbind('play', this.onPlay);
|
|
10517
|
+
this.player.unbind('pause', this.onPause);
|
|
10518
|
+
this.player.unbind('seek', this.onSeek);
|
|
10519
|
+
this.player.unbind('end', this.onEnded);
|
|
10520
|
+
} // Proxy methods to prevent listener leaks
|
|
10521
|
+
|
|
11236
10522
|
}, {
|
|
11237
10523
|
key: "play",
|
|
11238
10524
|
value: function play() {
|
|
@@ -11243,19 +10529,6 @@ function (_Component) {
|
|
|
11243
10529
|
value: function pause() {
|
|
11244
10530
|
this.callPlayer('pause');
|
|
11245
10531
|
}
|
|
11246
|
-
}, {
|
|
11247
|
-
key: "unbind",
|
|
11248
|
-
value: function unbind() {
|
|
11249
|
-
var _this$props2 = this.props,
|
|
11250
|
-
onPlay = _this$props2.onPlay,
|
|
11251
|
-
onPause = _this$props2.onPause,
|
|
11252
|
-
onSeek = _this$props2.onSeek,
|
|
11253
|
-
onEnded = _this$props2.onEnded;
|
|
11254
|
-
this.player.unbind('play', onPlay);
|
|
11255
|
-
this.player.unbind('pause', onPause);
|
|
11256
|
-
this.player.unbind('seek', onSeek);
|
|
11257
|
-
this.player.unbind('end', onEnded);
|
|
11258
|
-
}
|
|
11259
10532
|
}, {
|
|
11260
10533
|
key: "stop",
|
|
11261
10534
|
value: function stop() {
|
|
@@ -11301,7 +10574,7 @@ function (_Component) {
|
|
|
11301
10574
|
width: '100%',
|
|
11302
10575
|
height: '100%'
|
|
11303
10576
|
};
|
|
11304
|
-
return _react["default"].createElement("div", {
|
|
10577
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
11305
10578
|
key: id,
|
|
11306
10579
|
className: className,
|
|
11307
10580
|
style: style
|
|
@@ -11361,12 +10634,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
11361
10634
|
|
|
11362
10635
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
11363
10636
|
|
|
11364
|
-
function
|
|
10637
|
+
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
11365
10638
|
|
|
11366
|
-
function
|
|
10639
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
11367
10640
|
|
|
11368
10641
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
11369
10642
|
|
|
10643
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
10644
|
+
|
|
10645
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
10646
|
+
|
|
11370
10647
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
11371
10648
|
|
|
11372
10649
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -11379,14 +10656,12 @@ var MATCH_VIDEO_URL = /(?:www\.|go\.)?twitch\.tv\/videos\/(\d+)($|\?)/;
|
|
|
11379
10656
|
var MATCH_CHANNEL_URL = /(?:www\.|go\.)?twitch\.tv\/([a-z0-9_]+)($|\?)/;
|
|
11380
10657
|
var PLAYER_ID_PREFIX = 'twitch-player-';
|
|
11381
10658
|
|
|
11382
|
-
var Twitch =
|
|
11383
|
-
/*#__PURE__*/
|
|
11384
|
-
function (_Component) {
|
|
10659
|
+
var Twitch = /*#__PURE__*/function (_Component) {
|
|
11385
10660
|
_inherits(Twitch, _Component);
|
|
11386
10661
|
|
|
11387
|
-
|
|
11388
|
-
var _getPrototypeOf2;
|
|
10662
|
+
var _super = _createSuper(Twitch);
|
|
11389
10663
|
|
|
10664
|
+
function Twitch() {
|
|
11390
10665
|
var _this;
|
|
11391
10666
|
|
|
11392
10667
|
_classCallCheck(this, Twitch);
|
|
@@ -11395,7 +10670,7 @@ function (_Component) {
|
|
|
11395
10670
|
args[_key] = arguments[_key];
|
|
11396
10671
|
}
|
|
11397
10672
|
|
|
11398
|
-
_this =
|
|
10673
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
11399
10674
|
|
|
11400
10675
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
11401
10676
|
|
|
@@ -11516,7 +10791,7 @@ function (_Component) {
|
|
|
11516
10791
|
width: '100%',
|
|
11517
10792
|
height: '100%'
|
|
11518
10793
|
};
|
|
11519
|
-
return _react["default"].createElement("div", {
|
|
10794
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
11520
10795
|
style: style,
|
|
11521
10796
|
id: this.playerID
|
|
11522
10797
|
});
|
|
@@ -11569,11 +10844,15 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
11569
10844
|
|
|
11570
10845
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
11571
10846
|
|
|
11572
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
|
|
10847
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
10848
|
+
|
|
10849
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
11573
10850
|
|
|
11574
|
-
function
|
|
10851
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
11575
10852
|
|
|
11576
|
-
function
|
|
10853
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
10854
|
+
|
|
10855
|
+
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
11577
10856
|
|
|
11578
10857
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11579
10858
|
|
|
@@ -11583,12 +10862,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
11583
10862
|
|
|
11584
10863
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
11585
10864
|
|
|
11586
|
-
function
|
|
10865
|
+
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
11587
10866
|
|
|
11588
|
-
function
|
|
10867
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
11589
10868
|
|
|
11590
10869
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
11591
10870
|
|
|
10871
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
10872
|
+
|
|
10873
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
10874
|
+
|
|
11592
10875
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
11593
10876
|
|
|
11594
10877
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -11600,14 +10883,12 @@ var SDK_GLOBAL = 'DM';
|
|
|
11600
10883
|
var SDK_GLOBAL_READY = 'dmAsyncInit';
|
|
11601
10884
|
var MATCH_URL = /^(?:(?:https?):)?(?:\/\/)?(?:www\.)?(?:(?:dailymotion\.com(?:\/embed)?\/video)|dai\.ly)\/([a-zA-Z0-9]+)(?:_[\w_-]+)?$/;
|
|
11602
10885
|
|
|
11603
|
-
var DailyMotion =
|
|
11604
|
-
/*#__PURE__*/
|
|
11605
|
-
function (_Component) {
|
|
10886
|
+
var DailyMotion = /*#__PURE__*/function (_Component) {
|
|
11606
10887
|
_inherits(DailyMotion, _Component);
|
|
11607
10888
|
|
|
11608
|
-
|
|
11609
|
-
var _getPrototypeOf2;
|
|
10889
|
+
var _super = _createSuper(DailyMotion);
|
|
11610
10890
|
|
|
10891
|
+
function DailyMotion() {
|
|
11611
10892
|
var _this;
|
|
11612
10893
|
|
|
11613
10894
|
_classCallCheck(this, DailyMotion);
|
|
@@ -11616,7 +10897,7 @@ function (_Component) {
|
|
|
11616
10897
|
args[_key] = arguments[_key];
|
|
11617
10898
|
}
|
|
11618
10899
|
|
|
11619
|
-
_this =
|
|
10900
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
11620
10901
|
|
|
11621
10902
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
11622
10903
|
|
|
@@ -11745,9 +11026,9 @@ function (_Component) {
|
|
|
11745
11026
|
height: '100%',
|
|
11746
11027
|
display: display
|
|
11747
11028
|
};
|
|
11748
|
-
return _react["default"].createElement("div", {
|
|
11029
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
11749
11030
|
style: style
|
|
11750
|
-
}, _react["default"].createElement("div", {
|
|
11031
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
11751
11032
|
ref: this.ref
|
|
11752
11033
|
}));
|
|
11753
11034
|
}
|
|
@@ -11805,12 +11086,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
11805
11086
|
|
|
11806
11087
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
11807
11088
|
|
|
11808
|
-
function
|
|
11089
|
+
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
11809
11090
|
|
|
11810
|
-
function
|
|
11091
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
11811
11092
|
|
|
11812
11093
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
11813
11094
|
|
|
11095
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
11096
|
+
|
|
11097
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
11098
|
+
|
|
11814
11099
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
11815
11100
|
|
|
11816
11101
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -11821,14 +11106,12 @@ var SDK_URL = 'https://widget.mixcloud.com/media/js/widgetApi.js';
|
|
|
11821
11106
|
var SDK_GLOBAL = 'Mixcloud';
|
|
11822
11107
|
var MATCH_URL = /mixcloud\.com\/([^/]+\/[^/]+)/;
|
|
11823
11108
|
|
|
11824
|
-
var Mixcloud =
|
|
11825
|
-
/*#__PURE__*/
|
|
11826
|
-
function (_Component) {
|
|
11109
|
+
var Mixcloud = /*#__PURE__*/function (_Component) {
|
|
11827
11110
|
_inherits(Mixcloud, _Component);
|
|
11828
11111
|
|
|
11829
|
-
|
|
11830
|
-
var _getPrototypeOf2;
|
|
11112
|
+
var _super = _createSuper(Mixcloud);
|
|
11831
11113
|
|
|
11114
|
+
function Mixcloud() {
|
|
11832
11115
|
var _this;
|
|
11833
11116
|
|
|
11834
11117
|
_classCallCheck(this, Mixcloud);
|
|
@@ -11837,7 +11120,7 @@ function (_Component) {
|
|
|
11837
11120
|
args[_key] = arguments[_key];
|
|
11838
11121
|
}
|
|
11839
11122
|
|
|
11840
|
-
_this =
|
|
11123
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
11841
11124
|
|
|
11842
11125
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
11843
11126
|
|
|
@@ -11940,7 +11223,7 @@ function (_Component) {
|
|
|
11940
11223
|
})); // We have to give the iframe a key here to prevent a
|
|
11941
11224
|
// weird dialog appearing when loading a new track
|
|
11942
11225
|
|
|
11943
|
-
return _react["default"].createElement("iframe", {
|
|
11226
|
+
return /*#__PURE__*/_react["default"].createElement("iframe", {
|
|
11944
11227
|
key: id,
|
|
11945
11228
|
ref: this.ref,
|
|
11946
11229
|
style: style,
|
|
@@ -12000,23 +11283,33 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
12000
11283
|
|
|
12001
11284
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
12002
11285
|
|
|
12003
|
-
function
|
|
11286
|
+
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
12004
11287
|
|
|
12005
|
-
function
|
|
11288
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
12006
11289
|
|
|
12007
11290
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
12008
11291
|
|
|
11292
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
11293
|
+
|
|
11294
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
11295
|
+
|
|
12009
11296
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
12010
11297
|
|
|
12011
11298
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
12012
11299
|
|
|
12013
11300
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
12014
11301
|
|
|
11302
|
+
function _createForOfIteratorHelper(o) { if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) { var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var it, normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
11303
|
+
|
|
11304
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
11305
|
+
|
|
11306
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
11307
|
+
|
|
12015
11308
|
var IOS = typeof navigator !== 'undefined' && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
|
|
12016
11309
|
var AUDIO_EXTENSIONS = /\.(m4a|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i;
|
|
12017
11310
|
var VIDEO_EXTENSIONS = /\.(mp4|og[gv]|webm|mov|m4v)($|\?)/i;
|
|
12018
11311
|
var HLS_EXTENSIONS = /\.(m3u8)($|\?)/i;
|
|
12019
|
-
var HLS_SDK_URL = 'https://cdn.jsdelivr.net/npm/hls.js@VERSION';
|
|
11312
|
+
var HLS_SDK_URL = 'https://cdn.jsdelivr.net/npm/hls.js@VERSION/dist/hls.min.js';
|
|
12020
11313
|
var HLS_GLOBAL = 'Hls';
|
|
12021
11314
|
var DASH_EXTENSIONS = /\.(mpd)($|\?)/i;
|
|
12022
11315
|
var DASH_SDK_URL = 'https://cdnjs.cloudflare.com/ajax/libs/dashjs/VERSION/dash.all.min.js';
|
|
@@ -12025,12 +11318,11 @@ var MATCH_DROPBOX_URL = /www\.dropbox\.com\/.+/;
|
|
|
12025
11318
|
|
|
12026
11319
|
function canPlay(url) {
|
|
12027
11320
|
if (url instanceof Array) {
|
|
12028
|
-
var
|
|
12029
|
-
|
|
12030
|
-
var _iteratorError = undefined;
|
|
11321
|
+
var _iterator = _createForOfIteratorHelper(url),
|
|
11322
|
+
_step;
|
|
12031
11323
|
|
|
12032
11324
|
try {
|
|
12033
|
-
for (
|
|
11325
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
12034
11326
|
var item = _step.value;
|
|
12035
11327
|
|
|
12036
11328
|
if (typeof item === 'string' && canPlay(item)) {
|
|
@@ -12042,18 +11334,9 @@ function canPlay(url) {
|
|
|
12042
11334
|
}
|
|
12043
11335
|
}
|
|
12044
11336
|
} catch (err) {
|
|
12045
|
-
|
|
12046
|
-
_iteratorError = err;
|
|
11337
|
+
_iterator.e(err);
|
|
12047
11338
|
} finally {
|
|
12048
|
-
|
|
12049
|
-
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
|
|
12050
|
-
_iterator["return"]();
|
|
12051
|
-
}
|
|
12052
|
-
} finally {
|
|
12053
|
-
if (_didIteratorError) {
|
|
12054
|
-
throw _iteratorError;
|
|
12055
|
-
}
|
|
12056
|
-
}
|
|
11339
|
+
_iterator.f();
|
|
12057
11340
|
}
|
|
12058
11341
|
|
|
12059
11342
|
return false;
|
|
@@ -12077,14 +11360,12 @@ function canEnablePIP(url) {
|
|
|
12077
11360
|
return canPlay(url) && (!!document.pictureInPictureEnabled || supportsWebKitPresentationMode()) && !AUDIO_EXTENSIONS.test(url);
|
|
12078
11361
|
}
|
|
12079
11362
|
|
|
12080
|
-
var FilePlayer =
|
|
12081
|
-
/*#__PURE__*/
|
|
12082
|
-
function (_Component) {
|
|
11363
|
+
var FilePlayer = /*#__PURE__*/function (_Component) {
|
|
12083
11364
|
_inherits(FilePlayer, _Component);
|
|
12084
11365
|
|
|
12085
|
-
|
|
12086
|
-
var _getPrototypeOf2;
|
|
11366
|
+
var _super = _createSuper(FilePlayer);
|
|
12087
11367
|
|
|
11368
|
+
function FilePlayer() {
|
|
12088
11369
|
var _this;
|
|
12089
11370
|
|
|
12090
11371
|
_classCallCheck(this, FilePlayer);
|
|
@@ -12093,7 +11374,7 @@ function (_Component) {
|
|
|
12093
11374
|
_args[_key] = arguments[_key];
|
|
12094
11375
|
}
|
|
12095
11376
|
|
|
12096
|
-
_this =
|
|
11377
|
+
_this = _super.call.apply(_super, [this].concat(_args));
|
|
12097
11378
|
|
|
12098
11379
|
_defineProperty(_assertThisInitialized(_this), "onReady", function () {
|
|
12099
11380
|
var _this$props;
|
|
@@ -12180,19 +11461,19 @@ function (_Component) {
|
|
|
12180
11461
|
|
|
12181
11462
|
_defineProperty(_assertThisInitialized(_this), "renderSourceElement", function (source, index) {
|
|
12182
11463
|
if (typeof source === 'string') {
|
|
12183
|
-
return _react["default"].createElement("source", {
|
|
11464
|
+
return /*#__PURE__*/_react["default"].createElement("source", {
|
|
12184
11465
|
key: index,
|
|
12185
11466
|
src: source
|
|
12186
11467
|
});
|
|
12187
11468
|
}
|
|
12188
11469
|
|
|
12189
|
-
return _react["default"].createElement("source", _extends({
|
|
11470
|
+
return /*#__PURE__*/_react["default"].createElement("source", _extends({
|
|
12190
11471
|
key: index
|
|
12191
11472
|
}, source));
|
|
12192
11473
|
});
|
|
12193
11474
|
|
|
12194
11475
|
_defineProperty(_assertThisInitialized(_this), "renderTrack", function (track, index) {
|
|
12195
|
-
return _react["default"].createElement("track", _extends({
|
|
11476
|
+
return /*#__PURE__*/_react["default"].createElement("track", _extends({
|
|
12196
11477
|
key: index
|
|
12197
11478
|
}, track));
|
|
12198
11479
|
});
|
|
@@ -12230,6 +11511,10 @@ function (_Component) {
|
|
|
12230
11511
|
key: "componentWillUnmount",
|
|
12231
11512
|
value: function componentWillUnmount() {
|
|
12232
11513
|
this.removeListeners(this.player);
|
|
11514
|
+
|
|
11515
|
+
if (this.hls) {
|
|
11516
|
+
this.hls.destroy();
|
|
11517
|
+
}
|
|
12233
11518
|
}
|
|
12234
11519
|
}, {
|
|
12235
11520
|
key: "addListeners",
|
|
@@ -12360,10 +11645,6 @@ function (_Component) {
|
|
|
12360
11645
|
value: function stop() {
|
|
12361
11646
|
this.player.removeAttribute('src');
|
|
12362
11647
|
|
|
12363
|
-
if (this.hls) {
|
|
12364
|
-
this.hls.destroy();
|
|
12365
|
-
}
|
|
12366
|
-
|
|
12367
11648
|
if (this.dash) {
|
|
12368
11649
|
this.dash.reset();
|
|
12369
11650
|
}
|
|
@@ -12475,7 +11756,7 @@ function (_Component) {
|
|
|
12475
11756
|
width: width === 'auto' ? width : '100%',
|
|
12476
11757
|
height: height === 'auto' ? height : '100%'
|
|
12477
11758
|
};
|
|
12478
|
-
return _react["default"].createElement(Element, _extends({
|
|
11759
|
+
return /*#__PURE__*/_react["default"].createElement(Element, _extends({
|
|
12479
11760
|
ref: this.ref,
|
|
12480
11761
|
src: this.getSource(url),
|
|
12481
11762
|
style: style,
|
|
@@ -12565,12 +11846,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
12565
11846
|
|
|
12566
11847
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
12567
11848
|
|
|
12568
|
-
function
|
|
11849
|
+
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
12569
11850
|
|
|
12570
|
-
function
|
|
11851
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
12571
11852
|
|
|
12572
11853
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
12573
11854
|
|
|
11855
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
11856
|
+
|
|
11857
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
11858
|
+
|
|
12574
11859
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
12575
11860
|
|
|
12576
11861
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -12579,14 +11864,12 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
12579
11864
|
|
|
12580
11865
|
var ICON_SIZE = '64px';
|
|
12581
11866
|
|
|
12582
|
-
var Preview =
|
|
12583
|
-
/*#__PURE__*/
|
|
12584
|
-
function (_Component) {
|
|
11867
|
+
var Preview = /*#__PURE__*/function (_Component) {
|
|
12585
11868
|
_inherits(Preview, _Component);
|
|
12586
11869
|
|
|
12587
|
-
|
|
12588
|
-
var _getPrototypeOf2;
|
|
11870
|
+
var _super = _createSuper(Preview);
|
|
12589
11871
|
|
|
11872
|
+
function Preview() {
|
|
12590
11873
|
var _this;
|
|
12591
11874
|
|
|
12592
11875
|
_classCallCheck(this, Preview);
|
|
@@ -12595,7 +11878,7 @@ function (_Component) {
|
|
|
12595
11878
|
args[_key] = arguments[_key];
|
|
12596
11879
|
}
|
|
12597
11880
|
|
|
12598
|
-
_this =
|
|
11881
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
12599
11882
|
|
|
12600
11883
|
_defineProperty(_assertThisInitialized(_this), "mounted", false);
|
|
12601
11884
|
|
|
@@ -12693,15 +11976,15 @@ function (_Component) {
|
|
|
12693
11976
|
}
|
|
12694
11977
|
};
|
|
12695
11978
|
|
|
12696
|
-
var defaultPlayIcon = _react["default"].createElement("div", {
|
|
11979
|
+
var defaultPlayIcon = /*#__PURE__*/_react["default"].createElement("div", {
|
|
12697
11980
|
style: styles.shadow,
|
|
12698
11981
|
className: "react-player__shadow"
|
|
12699
|
-
}, _react["default"].createElement("div", {
|
|
11982
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
12700
11983
|
style: styles.playIcon,
|
|
12701
11984
|
className: "react-player__play-icon"
|
|
12702
11985
|
}));
|
|
12703
11986
|
|
|
12704
|
-
return _react["default"].createElement("div", {
|
|
11987
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
12705
11988
|
style: styles.preview,
|
|
12706
11989
|
className: "react-player__preview",
|
|
12707
11990
|
onClick: onClick
|
|
@@ -12738,6 +12021,12 @@ var _Player = _interopRequireDefault(Player_1);
|
|
|
12738
12021
|
|
|
12739
12022
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
12740
12023
|
|
|
12024
|
+
function _createForOfIteratorHelper(o) { if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) { var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var it, normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
12025
|
+
|
|
12026
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
12027
|
+
|
|
12028
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
12029
|
+
|
|
12741
12030
|
var PRELOAD_PLAYERS = [{
|
|
12742
12031
|
Player: YouTube_1.YouTube,
|
|
12743
12032
|
configKey: 'youtube',
|
|
@@ -12758,16 +12047,16 @@ var PRELOAD_PLAYERS = [{
|
|
|
12758
12047
|
|
|
12759
12048
|
function renderPreloadPlayers(url, controls, config) {
|
|
12760
12049
|
var players = [];
|
|
12761
|
-
|
|
12762
|
-
var
|
|
12763
|
-
|
|
12050
|
+
|
|
12051
|
+
var _iterator = _createForOfIteratorHelper(PRELOAD_PLAYERS),
|
|
12052
|
+
_step;
|
|
12764
12053
|
|
|
12765
12054
|
try {
|
|
12766
|
-
for (
|
|
12055
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
12767
12056
|
var player = _step.value;
|
|
12768
12057
|
|
|
12769
12058
|
if (!player.Player.canPlay(url) && config[player.configKey].preload) {
|
|
12770
|
-
players.push(_react["default"].createElement(_Player["default"], {
|
|
12059
|
+
players.push( /*#__PURE__*/_react["default"].createElement(_Player["default"], {
|
|
12771
12060
|
key: player.Player.displayName,
|
|
12772
12061
|
activePlayer: player.Player,
|
|
12773
12062
|
url: player.url,
|
|
@@ -12779,18 +12068,9 @@ function renderPreloadPlayers(url, controls, config) {
|
|
|
12779
12068
|
}
|
|
12780
12069
|
}
|
|
12781
12070
|
} catch (err) {
|
|
12782
|
-
|
|
12783
|
-
_iteratorError = err;
|
|
12071
|
+
_iterator.e(err);
|
|
12784
12072
|
} finally {
|
|
12785
|
-
|
|
12786
|
-
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
|
|
12787
|
-
_iterator["return"]();
|
|
12788
|
-
}
|
|
12789
|
-
} finally {
|
|
12790
|
-
if (_didIteratorError) {
|
|
12791
|
-
throw _iteratorError;
|
|
12792
|
-
}
|
|
12793
|
-
}
|
|
12073
|
+
_iterator.f();
|
|
12794
12074
|
}
|
|
12795
12075
|
|
|
12796
12076
|
return players;
|
|
@@ -12914,13 +12194,17 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
12914
12194
|
|
|
12915
12195
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
12916
12196
|
|
|
12917
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
|
|
12197
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
12198
|
+
|
|
12199
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
12200
|
+
|
|
12201
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
12918
12202
|
|
|
12919
|
-
function
|
|
12203
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
|
|
12920
12204
|
|
|
12921
|
-
function
|
|
12205
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
12922
12206
|
|
|
12923
|
-
function
|
|
12207
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
12924
12208
|
|
|
12925
12209
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
12926
12210
|
|
|
@@ -12928,12 +12212,16 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
12928
12212
|
|
|
12929
12213
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
12930
12214
|
|
|
12931
|
-
function
|
|
12215
|
+
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
12932
12216
|
|
|
12933
|
-
function
|
|
12217
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
12934
12218
|
|
|
12935
12219
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
12936
12220
|
|
|
12221
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
12222
|
+
|
|
12223
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
12224
|
+
|
|
12937
12225
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
12938
12226
|
|
|
12939
12227
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -12943,14 +12231,12 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
12943
12231
|
var SUPPORTED_PROPS = Object.keys(props.propTypes);
|
|
12944
12232
|
var customPlayers = [];
|
|
12945
12233
|
|
|
12946
|
-
var ReactPlayer =
|
|
12947
|
-
/*#__PURE__*/
|
|
12948
|
-
function (_Component) {
|
|
12234
|
+
var ReactPlayer = /*#__PURE__*/function (_Component) {
|
|
12949
12235
|
_inherits(ReactPlayer, _Component);
|
|
12950
12236
|
|
|
12951
|
-
|
|
12952
|
-
var _getPrototypeOf2;
|
|
12237
|
+
var _super = _createSuper(ReactPlayer);
|
|
12953
12238
|
|
|
12239
|
+
function ReactPlayer() {
|
|
12954
12240
|
var _this;
|
|
12955
12241
|
|
|
12956
12242
|
_classCallCheck(this, ReactPlayer);
|
|
@@ -12959,7 +12245,7 @@ function (_Component) {
|
|
|
12959
12245
|
args[_key] = arguments[_key];
|
|
12960
12246
|
}
|
|
12961
12247
|
|
|
12962
|
-
_this =
|
|
12248
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
12963
12249
|
|
|
12964
12250
|
_defineProperty(_assertThisInitialized(_this), "config", (0, utils.getConfig)(_this.props, props.defaultProps, true));
|
|
12965
12251
|
|
|
@@ -13070,7 +12356,7 @@ function (_Component) {
|
|
|
13070
12356
|
key: "renderActivePlayer",
|
|
13071
12357
|
value: function renderActivePlayer(url, activePlayer) {
|
|
13072
12358
|
if (!url) return null;
|
|
13073
|
-
return _react["default"].createElement(_Player4["default"], _extends({}, this.props, {
|
|
12359
|
+
return /*#__PURE__*/_react["default"].createElement(_Player4["default"], _extends({}, this.props, {
|
|
13074
12360
|
key: activePlayer.displayName,
|
|
13075
12361
|
ref: this.activePlayerRef,
|
|
13076
12362
|
config: this.config,
|
|
@@ -13107,14 +12393,14 @@ function (_Component) {
|
|
|
13107
12393
|
var preloadPlayers = (0, _preload["default"])(url, controls, this.config);
|
|
13108
12394
|
var players = [renderedActivePlayer].concat(_toConsumableArray(preloadPlayers)).sort(this.sortPlayers);
|
|
13109
12395
|
|
|
13110
|
-
var preview = _react["default"].createElement(_Preview["default"], {
|
|
12396
|
+
var preview = /*#__PURE__*/_react["default"].createElement(_Preview["default"], {
|
|
13111
12397
|
url: url,
|
|
13112
12398
|
light: light,
|
|
13113
12399
|
playIcon: playIcon,
|
|
13114
12400
|
onClick: this.handleClickPreview
|
|
13115
12401
|
});
|
|
13116
12402
|
|
|
13117
|
-
return _react["default"].createElement(Wrapper, _extends({
|
|
12403
|
+
return /*#__PURE__*/_react["default"].createElement(Wrapper, _extends({
|
|
13118
12404
|
ref: this.wrapperRef,
|
|
13119
12405
|
style: _objectSpread({}, style, {
|
|
13120
12406
|
width: width,
|
|
@@ -14462,16 +13748,16 @@ var RelatedTopicsDropdown = function RelatedTopicsDropdown(_ref) {
|
|
|
14462
13748
|
_ref$className = _ref.className,
|
|
14463
13749
|
className = _ref$className === undefined ? '' : _ref$className;
|
|
14464
13750
|
|
|
14465
|
-
/*
|
|
14466
|
-
Props accepted - parentTaxonomy(required, object), subTaxonomy(required, array), page(optional), exclude(optional), variant(optional), className(optional)
|
|
14467
|
-
example:
|
|
14468
|
-
<RelatedTopicDropdown
|
|
14469
|
-
page='/clinical'
|
|
14470
|
-
exclude="clinical"
|
|
14471
|
-
className='mb-3'
|
|
14472
|
-
parentTaxonomy={props.parentTaxonomy}
|
|
14473
|
-
subTaxonomies={props.subTaxonomies}
|
|
14474
|
-
/>
|
|
13751
|
+
/*
|
|
13752
|
+
Props accepted - parentTaxonomy(required, object), subTaxonomy(required, array), page(optional), exclude(optional), variant(optional), className(optional)
|
|
13753
|
+
example:
|
|
13754
|
+
<RelatedTopicDropdown
|
|
13755
|
+
page='/clinical'
|
|
13756
|
+
exclude="clinical"
|
|
13757
|
+
className='mb-3'
|
|
13758
|
+
parentTaxonomy={props.parentTaxonomy}
|
|
13759
|
+
subTaxonomies={props.subTaxonomies}
|
|
13760
|
+
/>
|
|
14475
13761
|
*/
|
|
14476
13762
|
if (subTaxonomies.length === 0 && parentTaxonomy) {
|
|
14477
13763
|
if (parentTaxonomy.identifier == exclude) {
|
|
@@ -14509,19 +13795,19 @@ var RelatedTopicsDropdown = function RelatedTopicsDropdown(_ref) {
|
|
|
14509
13795
|
}
|
|
14510
13796
|
};
|
|
14511
13797
|
|
|
14512
|
-
/*
|
|
14513
|
-
This dropdown is used inside Article body to display related content placement pages
|
|
14514
|
-
sample usage: <ArticleDetailDropdown contentPlacement={content_placement} exclude={['News',]} />
|
|
14515
|
-
|
|
14516
|
-
in article query, need to add '...' to content_placement to retreive additional info needed
|
|
14517
|
-
|
|
14518
|
-
'content_placement': taxonomyMapping[]-> {
|
|
14519
|
-
...,
|
|
14520
|
-
'ancestor': parent->parent->identifier,
|
|
14521
|
-
'parent': parent->identifier,
|
|
14522
|
-
'path': identifier
|
|
14523
|
-
}
|
|
14524
|
-
|
|
13798
|
+
/*
|
|
13799
|
+
This dropdown is used inside Article body to display related content placement pages
|
|
13800
|
+
sample usage: <ArticleDetailDropdown contentPlacement={content_placement} exclude={['News',]} />
|
|
13801
|
+
|
|
13802
|
+
in article query, need to add '...' to content_placement to retreive additional info needed
|
|
13803
|
+
|
|
13804
|
+
'content_placement': taxonomyMapping[]-> {
|
|
13805
|
+
...,
|
|
13806
|
+
'ancestor': parent->parent->identifier,
|
|
13807
|
+
'parent': parent->identifier,
|
|
13808
|
+
'path': identifier
|
|
13809
|
+
}
|
|
13810
|
+
|
|
14525
13811
|
*/
|
|
14526
13812
|
|
|
14527
13813
|
var ArticleDetailDropdown = function ArticleDetailDropdown(props) {
|
|
@@ -15192,34 +14478,34 @@ var YahooHero = function YahooHero(props) {
|
|
|
15192
14478
|
);
|
|
15193
14479
|
};
|
|
15194
14480
|
|
|
15195
|
-
/*
|
|
15196
|
-
Sample query
|
|
15197
|
-
let references = ''
|
|
15198
|
-
if(article.taxonomyMapping.length > 0){
|
|
15199
|
-
article.taxonomyMapping.forEach((ref, index) => {
|
|
15200
|
-
references = references + `references('${ref._ref}') `
|
|
15201
|
-
if(index+1 !== article.taxonomyMapping.length){
|
|
15202
|
-
references = references + ` && `
|
|
15203
|
-
}
|
|
15204
|
-
})
|
|
15205
|
-
}
|
|
15206
|
-
|
|
15207
|
-
const relatedArticlesQuery = `*[!(_id in path("drafts.**")) && _type == "article" && title !='${article.title}' && defined(title) && is_visible == true && ( references('article.documentGroup._id') || ${references} ) && published <= '${today}'] | order(published desc) [0...4] {
|
|
15208
|
-
...,
|
|
15209
|
-
title,
|
|
15210
|
-
summary,
|
|
15211
|
-
thumbnail,
|
|
15212
|
-
url,
|
|
15213
|
-
published,
|
|
15214
|
-
authorMapping[]->,
|
|
15215
|
-
contentCategory->
|
|
15216
|
-
}`
|
|
15217
|
-
const relatedArticles = await client.fetch(relatedArticlesQuery)
|
|
15218
|
-
|
|
15219
|
-
Sample usage
|
|
15220
|
-
<RelatedContent dataRecord={props.relatedArticles} client={client} showAuthor showPublished reverse/>
|
|
15221
|
-
|
|
15222
|
-
|
|
14481
|
+
/*
|
|
14482
|
+
Sample query
|
|
14483
|
+
let references = ''
|
|
14484
|
+
if(article.taxonomyMapping.length > 0){
|
|
14485
|
+
article.taxonomyMapping.forEach((ref, index) => {
|
|
14486
|
+
references = references + `references('${ref._ref}') `
|
|
14487
|
+
if(index+1 !== article.taxonomyMapping.length){
|
|
14488
|
+
references = references + ` && `
|
|
14489
|
+
}
|
|
14490
|
+
})
|
|
14491
|
+
}
|
|
14492
|
+
|
|
14493
|
+
const relatedArticlesQuery = `*[!(_id in path("drafts.**")) && _type == "article" && title !='${article.title}' && defined(title) && is_visible == true && ( references('article.documentGroup._id') || ${references} ) && published <= '${today}'] | order(published desc) [0...4] {
|
|
14494
|
+
...,
|
|
14495
|
+
title,
|
|
14496
|
+
summary,
|
|
14497
|
+
thumbnail,
|
|
14498
|
+
url,
|
|
14499
|
+
published,
|
|
14500
|
+
authorMapping[]->,
|
|
14501
|
+
contentCategory->
|
|
14502
|
+
}`
|
|
14503
|
+
const relatedArticles = await client.fetch(relatedArticlesQuery)
|
|
14504
|
+
|
|
14505
|
+
Sample usage
|
|
14506
|
+
<RelatedContent dataRecord={props.relatedArticles} client={client} showAuthor showPublished reverse/>
|
|
14507
|
+
|
|
14508
|
+
|
|
15223
14509
|
*/
|
|
15224
14510
|
var RelatedContent = function RelatedContent(props) {
|
|
15225
14511
|
var client = props.client,
|
|
@@ -15286,21 +14572,21 @@ var RelatedContent = function RelatedContent(props) {
|
|
|
15286
14572
|
);
|
|
15287
14573
|
};
|
|
15288
14574
|
|
|
15289
|
-
/*
|
|
15290
|
-
Example usage - targetedonc.com/latest-conference
|
|
15291
|
-
const query = `*[!(_id in path("drafts.**")) && _type == "article" && defined(title) && is_visible == true && published <= '${today}' && references('b49d36b8-aa56-4183-a2bc-1568c229fb72') ] | order(published desc) [$from...$to] {
|
|
15292
|
-
...,
|
|
15293
|
-
title,
|
|
15294
|
-
summary,
|
|
15295
|
-
thumbnail,
|
|
15296
|
-
url,
|
|
15297
|
-
published,
|
|
15298
|
-
documentGroup->,
|
|
15299
|
-
contentCategory->,
|
|
15300
|
-
'pageNumber': ${currentPage}
|
|
15301
|
-
}`
|
|
15302
|
-
|
|
15303
|
-
const posts = await client.fetch(query, params)
|
|
14575
|
+
/*
|
|
14576
|
+
Example usage - targetedonc.com/latest-conference
|
|
14577
|
+
const query = `*[!(_id in path("drafts.**")) && _type == "article" && defined(title) && is_visible == true && published <= '${today}' && references('b49d36b8-aa56-4183-a2bc-1568c229fb72') ] | order(published desc) [$from...$to] {
|
|
14578
|
+
...,
|
|
14579
|
+
title,
|
|
14580
|
+
summary,
|
|
14581
|
+
thumbnail,
|
|
14582
|
+
url,
|
|
14583
|
+
published,
|
|
14584
|
+
documentGroup->,
|
|
14585
|
+
contentCategory->,
|
|
14586
|
+
'pageNumber': ${currentPage}
|
|
14587
|
+
}`
|
|
14588
|
+
|
|
14589
|
+
const posts = await client.fetch(query, params)
|
|
15304
14590
|
*/
|
|
15305
14591
|
|
|
15306
14592
|
var ConferenceArticleCard = function ConferenceArticleCard(props) {
|