@mjhls/mjh-framework 1.0.245 → 1.0.246
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 +171 -171
- package/dist/cjs/DeckContent.js +9 -9
- package/dist/cjs/DeckQueue.js +1 -1
- package/dist/cjs/{GridContent-f9e3fff5.js → GridContent-463c504f.js} +2 -2
- package/dist/cjs/GridContent.js +2 -2
- package/dist/cjs/IssueContentDeck.js +1 -1
- package/dist/cjs/IssueDeck.js +1 -1
- package/dist/cjs/MasterDeck.js +9 -9
- package/dist/cjs/{Normal-0497eb61.js → Normal-18cef899.js} +31 -31
- package/dist/cjs/PublicationDeck.js +1 -1
- package/dist/cjs/QueueDeckExpanded.js +1 -1
- package/dist/cjs/{TaxonomyCard-b5074d6e.js → TaxonomyCard-e3566492.js} +1 -1
- package/dist/cjs/TaxonomyCard.js +2 -2
- package/dist/cjs/TemplateNormal.js +1 -1
- package/dist/cjs/ThumbnailCard.js +1 -1
- package/dist/cjs/VideoSeriesListing.js +1 -1
- package/dist/cjs/{YoutubeGroup-fd44f8a0.js → YoutubeGroup-5f480446.js} +4 -4
- package/dist/cjs/YoutubeGroup.js +1 -1
- package/dist/cjs/{index-39beccb3.js → index-be0c82be.js} +1 -2
- package/dist/cjs/index.js +514 -526
- package/dist/esm/DeckContent.js +9 -9
- package/dist/esm/DeckQueue.js +1 -1
- package/dist/esm/{GridContent-d4f5457e.js → GridContent-2a48fb19.js} +1 -1
- package/dist/esm/GridContent.js +2 -2
- package/dist/esm/IssueContentDeck.js +1 -1
- package/dist/esm/IssueDeck.js +1 -1
- package/dist/esm/MasterDeck.js +9 -9
- package/dist/esm/{Normal-e1855047.js → Normal-4c82c9c2.js} +31 -31
- package/dist/esm/PublicationDeck.js +1 -1
- package/dist/esm/QueueDeckExpanded.js +1 -1
- package/dist/esm/{TaxonomyCard-ee1a22ae.js → TaxonomyCard-2d0ab635.js} +1 -1
- package/dist/esm/TaxonomyCard.js +2 -2
- package/dist/esm/TemplateNormal.js +1 -1
- package/dist/esm/ThumbnailCard.js +1 -1
- package/dist/esm/VideoSeriesListing.js +1 -1
- package/dist/esm/{YoutubeGroup-1b3eca73.js → YoutubeGroup-78d93d44.js} +4 -4
- package/dist/esm/YoutubeGroup.js +1 -1
- package/dist/esm/{index-3849e3fe.js → index-73819142.js} +1 -2
- package/dist/esm/index.js +517 -529
- package/package.json +103 -103
package/dist/esm/index.js
CHANGED
|
@@ -18,7 +18,7 @@ import { m as moment, I as InfiniteScroll, V as VisibilitySensor } from './visib
|
|
|
18
18
|
import Link from 'next/link';
|
|
19
19
|
import Router, { useRouter } from 'next/router';
|
|
20
20
|
import 'react-dom';
|
|
21
|
-
import { i as imageUrlBuilder } from './index-
|
|
21
|
+
import { i as imageUrlBuilder } from './index-73819142.js';
|
|
22
22
|
import './index-5f9f807a.js';
|
|
23
23
|
import { h as html_decode_1, c as clean_html_1 } from './entities-7cc3bf45.js';
|
|
24
24
|
import { _ as _slicedToArray } from './slicedToArray-d0a9593a.js';
|
|
@@ -27,16 +27,16 @@ export { D as AdSlot, B as Beam } from './AdSlot-bdd7a629.js';
|
|
|
27
27
|
import './promise-683a9c54.js';
|
|
28
28
|
export { default as DeckContent } from './DeckContent.js';
|
|
29
29
|
import './get-b2201dc8.js';
|
|
30
|
-
export { A as AD, G as GridContent } from './GridContent-
|
|
30
|
+
export { A as AD, G as GridContent } from './GridContent-2a48fb19.js';
|
|
31
31
|
export { default as DeckQueue } from './DeckQueue.js';
|
|
32
32
|
import 'react-bootstrap/Media';
|
|
33
33
|
export { default as ThumbnailCard } from './ThumbnailCard.js';
|
|
34
|
-
import { B as BlockContent } from './TaxonomyCard-
|
|
35
|
-
export { T as TaxonomyCard } from './TaxonomyCard-
|
|
34
|
+
import { B as BlockContent } from './TaxonomyCard-2d0ab635.js';
|
|
35
|
+
export { T as TaxonomyCard } from './TaxonomyCard-2d0ab635.js';
|
|
36
36
|
import GroupDeck from './GroupDeck.js';
|
|
37
37
|
export { default as GroupDeck } from './GroupDeck.js';
|
|
38
|
-
import { g as getYoutubeId } from './YoutubeGroup-
|
|
39
|
-
export { Y as YoutubeGroup } from './YoutubeGroup-
|
|
38
|
+
import { g as getYoutubeId } from './YoutubeGroup-78d93d44.js';
|
|
39
|
+
export { Y as YoutubeGroup } from './YoutubeGroup-78d93d44.js';
|
|
40
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';
|
|
41
41
|
export { default as QueueDeckExpanded } from './QueueDeckExpanded.js';
|
|
42
42
|
import { I as IoMdArrowDropdown } from './index.esm-536609db.js';
|
|
@@ -48,8 +48,8 @@ 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-4c82c9c2.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-4c82c9c2.js';
|
|
53
53
|
import 'react-bootstrap/ListGroup';
|
|
54
54
|
import Head from 'next/head';
|
|
55
55
|
import Accordion from 'react-bootstrap/Accordion';
|
|
@@ -3044,18 +3044,21 @@ var Slideshow = function Slideshow(_ref) {
|
|
|
3044
3044
|
);
|
|
3045
3045
|
};
|
|
3046
3046
|
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3047
|
+
var isArray = Array.isArray;
|
|
3048
|
+
var keyList = Object.keys;
|
|
3049
|
+
var hasProp = Object.prototype.hasOwnProperty;
|
|
3050
3050
|
|
|
3051
3051
|
var fastDeepEqual = function equal(a, b) {
|
|
3052
3052
|
if (a === b) return true;
|
|
3053
3053
|
|
|
3054
3054
|
if (a && b && typeof a == 'object' && typeof b == 'object') {
|
|
3055
|
-
|
|
3055
|
+
var arrA = isArray(a)
|
|
3056
|
+
, arrB = isArray(b)
|
|
3057
|
+
, i
|
|
3058
|
+
, length
|
|
3059
|
+
, key;
|
|
3056
3060
|
|
|
3057
|
-
|
|
3058
|
-
if (Array.isArray(a)) {
|
|
3061
|
+
if (arrA && arrB) {
|
|
3059
3062
|
length = a.length;
|
|
3060
3063
|
if (length != b.length) return false;
|
|
3061
3064
|
for (i = length; i-- !== 0;)
|
|
@@ -3063,29 +3066,35 @@ var fastDeepEqual = function equal(a, b) {
|
|
|
3063
3066
|
return true;
|
|
3064
3067
|
}
|
|
3065
3068
|
|
|
3069
|
+
if (arrA != arrB) return false;
|
|
3066
3070
|
|
|
3071
|
+
var dateA = a instanceof Date
|
|
3072
|
+
, dateB = b instanceof Date;
|
|
3073
|
+
if (dateA != dateB) return false;
|
|
3074
|
+
if (dateA && dateB) return a.getTime() == b.getTime();
|
|
3067
3075
|
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
if (
|
|
3076
|
+
var regexpA = a instanceof RegExp
|
|
3077
|
+
, regexpB = b instanceof RegExp;
|
|
3078
|
+
if (regexpA != regexpB) return false;
|
|
3079
|
+
if (regexpA && regexpB) return a.toString() == b.toString();
|
|
3071
3080
|
|
|
3072
|
-
keys =
|
|
3081
|
+
var keys = keyList(a);
|
|
3073
3082
|
length = keys.length;
|
|
3074
|
-
|
|
3083
|
+
|
|
3084
|
+
if (length !== keyList(b).length)
|
|
3085
|
+
return false;
|
|
3075
3086
|
|
|
3076
3087
|
for (i = length; i-- !== 0;)
|
|
3077
|
-
if (!
|
|
3088
|
+
if (!hasProp.call(b, keys[i])) return false;
|
|
3078
3089
|
|
|
3079
3090
|
for (i = length; i-- !== 0;) {
|
|
3080
|
-
|
|
3081
|
-
|
|
3091
|
+
key = keys[i];
|
|
3082
3092
|
if (!equal(a[key], b[key])) return false;
|
|
3083
3093
|
}
|
|
3084
3094
|
|
|
3085
3095
|
return true;
|
|
3086
3096
|
}
|
|
3087
3097
|
|
|
3088
|
-
// true if both NaN, false otherwise
|
|
3089
3098
|
return a!==a && b!==b;
|
|
3090
3099
|
};
|
|
3091
3100
|
|
|
@@ -4108,7 +4117,7 @@ function formatValue(ctx, value, recurseTimes) {
|
|
|
4108
4117
|
var base = '', array = false, braces = ['{', '}'];
|
|
4109
4118
|
|
|
4110
4119
|
// Make Array say that they are Array
|
|
4111
|
-
if (isArray(value)) {
|
|
4120
|
+
if (isArray$1(value)) {
|
|
4112
4121
|
array = true;
|
|
4113
4122
|
braces = ['[', ']'];
|
|
4114
4123
|
}
|
|
@@ -4287,7 +4296,7 @@ function reduceToSingleString(output, base, braces) {
|
|
|
4287
4296
|
|
|
4288
4297
|
// NOTE: These type checking functions intentionally don't use `instanceof`
|
|
4289
4298
|
// because it is fragile and can be easily faked with `Object.create()`.
|
|
4290
|
-
function isArray(ar) {
|
|
4299
|
+
function isArray$1(ar) {
|
|
4291
4300
|
return Array.isArray(ar);
|
|
4292
4301
|
}
|
|
4293
4302
|
|
|
@@ -4414,7 +4423,7 @@ var util = {
|
|
|
4414
4423
|
isNullOrUndefined: isNullOrUndefined,
|
|
4415
4424
|
isNull: isNull,
|
|
4416
4425
|
isBoolean: isBoolean,
|
|
4417
|
-
isArray: isArray,
|
|
4426
|
+
isArray: isArray$1,
|
|
4418
4427
|
inspect: inspect,
|
|
4419
4428
|
deprecate: deprecate,
|
|
4420
4429
|
format: format,
|
|
@@ -5081,235 +5090,199 @@ module.exports = exports['default'];
|
|
|
5081
5090
|
|
|
5082
5091
|
var youTubePlayer = unwrapExports(dist);
|
|
5083
5092
|
|
|
5084
|
-
function
|
|
5093
|
+
var _createClass = function () { 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
5085
5094
|
|
|
5086
|
-
function
|
|
5095
|
+
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; };
|
|
5087
5096
|
|
|
5088
|
-
function
|
|
5089
|
-
|
|
5090
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
5091
|
-
|
|
5092
|
-
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); }; }
|
|
5093
|
-
|
|
5094
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
5095
|
-
|
|
5096
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
5097
|
-
|
|
5098
|
-
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; } }
|
|
5099
|
-
|
|
5100
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
5101
|
-
|
|
5102
|
-
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); }
|
|
5103
|
-
|
|
5104
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
5097
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5105
5098
|
|
|
5106
|
-
function
|
|
5099
|
+
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
5107
5100
|
|
|
5108
|
-
function
|
|
5101
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
5109
5102
|
|
|
5110
|
-
|
|
5111
|
-
|
|
5112
|
-
*
|
|
5113
|
-
*
|
|
5114
|
-
* @param {Object}
|
|
5115
|
-
* @param {Object} props
|
|
5103
|
+
/**
|
|
5104
|
+
* Check whether a `props` change should result in the video being updated.
|
|
5105
|
+
*
|
|
5106
|
+
* @param {Object} prevProps
|
|
5107
|
+
* @param {Object} props
|
|
5116
5108
|
*/
|
|
5117
|
-
|
|
5118
5109
|
function shouldUpdateVideo(prevProps, props) {
|
|
5119
5110
|
// A changing video should always trigger an update
|
|
5120
5111
|
if (prevProps.videoId !== props.videoId) {
|
|
5121
5112
|
return true;
|
|
5122
|
-
}
|
|
5123
|
-
// update.
|
|
5124
|
-
|
|
5113
|
+
}
|
|
5125
5114
|
|
|
5115
|
+
// Otherwise, a change in the start/end time playerVars also requires a player
|
|
5116
|
+
// update.
|
|
5126
5117
|
var prevVars = prevProps.opts.playerVars || {};
|
|
5127
5118
|
var vars = props.opts.playerVars || {};
|
|
5119
|
+
|
|
5128
5120
|
return prevVars.start !== vars.start || prevVars.end !== vars.end;
|
|
5129
5121
|
}
|
|
5130
|
-
/**
|
|
5131
|
-
* Neutralize API options that only require a video update, leaving only options
|
|
5132
|
-
* that require a player reset. The results can then be compared to see if a
|
|
5133
|
-
* player reset is necessary.
|
|
5134
|
-
*
|
|
5135
|
-
* @param {Object} opts
|
|
5136
|
-
*/
|
|
5137
|
-
|
|
5138
5122
|
|
|
5123
|
+
/**
|
|
5124
|
+
* Neutralise API options that only require a video update, leaving only options
|
|
5125
|
+
* that require a player reset. The results can then be compared to see if a
|
|
5126
|
+
* player reset is necessary.
|
|
5127
|
+
*
|
|
5128
|
+
* @param {Object} opts
|
|
5129
|
+
*/
|
|
5139
5130
|
function filterResetOptions(opts) {
|
|
5140
|
-
return
|
|
5141
|
-
playerVars:
|
|
5131
|
+
return _extends({}, opts, {
|
|
5132
|
+
playerVars: _extends({}, opts.playerVars, {
|
|
5142
5133
|
autoplay: 0,
|
|
5143
5134
|
start: 0,
|
|
5144
5135
|
end: 0
|
|
5145
5136
|
})
|
|
5146
5137
|
});
|
|
5147
5138
|
}
|
|
5148
|
-
/**
|
|
5149
|
-
* Check whether a `props` change should result in the player being reset.
|
|
5150
|
-
* The player is reset when the `props.opts` change, except if the only change
|
|
5151
|
-
* is in the `start` and `end` playerVars, because a video update can deal with
|
|
5152
|
-
* those.
|
|
5153
|
-
*
|
|
5154
|
-
* @param {Object} prevProps
|
|
5155
|
-
* @param {Object} props
|
|
5156
|
-
*/
|
|
5157
|
-
|
|
5158
5139
|
|
|
5140
|
+
/**
|
|
5141
|
+
* Check whether a `props` change should result in the player being reset.
|
|
5142
|
+
* The player is reset when the `props.opts` change, except if the only change
|
|
5143
|
+
* is in the `start` and `end` playerVars, because a video update can deal with
|
|
5144
|
+
* those.
|
|
5145
|
+
*
|
|
5146
|
+
* @param {Object} prevProps
|
|
5147
|
+
* @param {Object} props
|
|
5148
|
+
*/
|
|
5159
5149
|
function shouldResetPlayer(prevProps, props) {
|
|
5160
5150
|
return !fastDeepEqual(filterResetOptions(prevProps.opts), filterResetOptions(props.opts));
|
|
5161
5151
|
}
|
|
5162
|
-
/**
|
|
5163
|
-
* Check whether a props change should result in an id or className update.
|
|
5164
|
-
*
|
|
5165
|
-
* @param {Object} prevProps
|
|
5166
|
-
* @param {Object} props
|
|
5167
|
-
*/
|
|
5168
|
-
|
|
5169
5152
|
|
|
5153
|
+
/**
|
|
5154
|
+
* Check whether a props change should result in an id or className update.
|
|
5155
|
+
*
|
|
5156
|
+
* @param {Object} prevProps
|
|
5157
|
+
* @param {Object} props
|
|
5158
|
+
*/
|
|
5170
5159
|
function shouldUpdatePlayer(prevProps, props) {
|
|
5171
5160
|
return prevProps.id !== props.id || prevProps.className !== props.className;
|
|
5172
5161
|
}
|
|
5173
5162
|
|
|
5174
|
-
var YouTube =
|
|
5163
|
+
var YouTube = function (_React$Component) {
|
|
5175
5164
|
_inherits(YouTube, _React$Component);
|
|
5176
5165
|
|
|
5177
|
-
var _super = _createSuper(YouTube);
|
|
5178
|
-
|
|
5179
|
-
/**
|
|
5180
|
-
* Expose PlayerState constants for convenience. These constants can also be
|
|
5181
|
-
* accessed through the global YT object after the YouTube IFrame API is instantiated.
|
|
5182
|
-
* https://developers.google.com/youtube/iframe_api_reference#onStateChange
|
|
5183
|
-
*/
|
|
5184
5166
|
function YouTube(props) {
|
|
5185
|
-
var _this;
|
|
5186
|
-
|
|
5187
5167
|
_classCallCheck(this, YouTube);
|
|
5188
5168
|
|
|
5189
|
-
_this =
|
|
5169
|
+
var _this = _possibleConstructorReturn(this, (YouTube.__proto__ || Object.getPrototypeOf(YouTube)).call(this, props));
|
|
5190
5170
|
|
|
5191
|
-
|
|
5171
|
+
_this.onPlayerReady = function (event) {
|
|
5192
5172
|
return _this.props.onReady(event);
|
|
5193
|
-
}
|
|
5173
|
+
};
|
|
5194
5174
|
|
|
5195
|
-
|
|
5175
|
+
_this.onPlayerError = function (event) {
|
|
5196
5176
|
return _this.props.onError(event);
|
|
5197
|
-
}
|
|
5177
|
+
};
|
|
5198
5178
|
|
|
5199
|
-
|
|
5179
|
+
_this.onPlayerStateChange = function (event) {
|
|
5200
5180
|
_this.props.onStateChange(event);
|
|
5201
|
-
|
|
5202
5181
|
switch (event.data) {
|
|
5182
|
+
|
|
5203
5183
|
case YouTube.PlayerState.ENDED:
|
|
5204
5184
|
_this.props.onEnd(event);
|
|
5205
|
-
|
|
5206
5185
|
break;
|
|
5207
5186
|
|
|
5208
5187
|
case YouTube.PlayerState.PLAYING:
|
|
5209
5188
|
_this.props.onPlay(event);
|
|
5210
|
-
|
|
5211
5189
|
break;
|
|
5212
5190
|
|
|
5213
5191
|
case YouTube.PlayerState.PAUSED:
|
|
5214
5192
|
_this.props.onPause(event);
|
|
5215
|
-
|
|
5216
5193
|
break;
|
|
5217
5194
|
}
|
|
5218
|
-
}
|
|
5195
|
+
};
|
|
5219
5196
|
|
|
5220
|
-
|
|
5197
|
+
_this.onPlayerPlaybackRateChange = function (event) {
|
|
5221
5198
|
return _this.props.onPlaybackRateChange(event);
|
|
5222
|
-
}
|
|
5199
|
+
};
|
|
5223
5200
|
|
|
5224
|
-
|
|
5201
|
+
_this.onPlayerPlaybackQualityChange = function (event) {
|
|
5225
5202
|
return _this.props.onPlaybackQualityChange(event);
|
|
5226
|
-
}
|
|
5203
|
+
};
|
|
5227
5204
|
|
|
5228
|
-
|
|
5205
|
+
_this.createPlayer = function () {
|
|
5229
5206
|
// do not attempt to create a player server-side, it won't work
|
|
5230
|
-
if (typeof document === 'undefined') return;
|
|
5231
|
-
|
|
5232
|
-
var playerOpts =
|
|
5207
|
+
if (typeof document === 'undefined') return;
|
|
5208
|
+
// create player
|
|
5209
|
+
var playerOpts = _extends({}, _this.props.opts, {
|
|
5233
5210
|
// preload the `videoId` video if one is already given
|
|
5234
5211
|
videoId: _this.props.videoId
|
|
5235
5212
|
});
|
|
5236
|
-
|
|
5237
|
-
|
|
5238
|
-
|
|
5213
|
+
_this.internalPlayer = youTubePlayer(_this.container, playerOpts);
|
|
5214
|
+
// attach event handlers
|
|
5239
5215
|
_this.internalPlayer.on('ready', _this.onPlayerReady);
|
|
5240
|
-
|
|
5241
5216
|
_this.internalPlayer.on('error', _this.onPlayerError);
|
|
5242
|
-
|
|
5243
5217
|
_this.internalPlayer.on('stateChange', _this.onPlayerStateChange);
|
|
5244
|
-
|
|
5245
5218
|
_this.internalPlayer.on('playbackRateChange', _this.onPlayerPlaybackRateChange);
|
|
5246
|
-
|
|
5247
5219
|
_this.internalPlayer.on('playbackQualityChange', _this.onPlayerPlaybackQualityChange);
|
|
5248
|
-
}
|
|
5220
|
+
};
|
|
5249
5221
|
|
|
5250
|
-
|
|
5222
|
+
_this.resetPlayer = function () {
|
|
5251
5223
|
return _this.internalPlayer.destroy().then(_this.createPlayer);
|
|
5252
|
-
}
|
|
5224
|
+
};
|
|
5253
5225
|
|
|
5254
|
-
|
|
5226
|
+
_this.updatePlayer = function () {
|
|
5255
5227
|
_this.internalPlayer.getIframe().then(function (iframe) {
|
|
5256
5228
|
if (_this.props.id) iframe.setAttribute('id', _this.props.id);else iframe.removeAttribute('id');
|
|
5257
5229
|
if (_this.props.className) iframe.setAttribute('class', _this.props.className);else iframe.removeAttribute('class');
|
|
5258
5230
|
});
|
|
5259
|
-
}
|
|
5231
|
+
};
|
|
5260
5232
|
|
|
5261
|
-
|
|
5233
|
+
_this.updateVideo = function () {
|
|
5262
5234
|
if (typeof _this.props.videoId === 'undefined' || _this.props.videoId === null) {
|
|
5263
5235
|
_this.internalPlayer.stopVideo();
|
|
5264
|
-
|
|
5265
5236
|
return;
|
|
5266
|
-
}
|
|
5267
|
-
|
|
5237
|
+
}
|
|
5268
5238
|
|
|
5239
|
+
// set queueing options
|
|
5269
5240
|
var autoplay = false;
|
|
5270
5241
|
var opts = {
|
|
5271
5242
|
videoId: _this.props.videoId
|
|
5272
5243
|
};
|
|
5273
|
-
|
|
5274
5244
|
if ('playerVars' in _this.props.opts) {
|
|
5275
5245
|
autoplay = _this.props.opts.playerVars.autoplay === 1;
|
|
5276
|
-
|
|
5277
5246
|
if ('start' in _this.props.opts.playerVars) {
|
|
5278
5247
|
opts.startSeconds = _this.props.opts.playerVars.start;
|
|
5279
5248
|
}
|
|
5280
|
-
|
|
5281
5249
|
if ('end' in _this.props.opts.playerVars) {
|
|
5282
5250
|
opts.endSeconds = _this.props.opts.playerVars.end;
|
|
5283
5251
|
}
|
|
5284
|
-
}
|
|
5285
|
-
|
|
5252
|
+
}
|
|
5286
5253
|
|
|
5254
|
+
// if autoplay is enabled loadVideoById
|
|
5287
5255
|
if (autoplay) {
|
|
5288
5256
|
_this.internalPlayer.loadVideoById(opts);
|
|
5289
|
-
|
|
5290
5257
|
return;
|
|
5291
|
-
}
|
|
5292
|
-
|
|
5293
|
-
|
|
5258
|
+
}
|
|
5259
|
+
// default behaviour just cues the video
|
|
5294
5260
|
_this.internalPlayer.cueVideoById(opts);
|
|
5295
|
-
}
|
|
5261
|
+
};
|
|
5296
5262
|
|
|
5297
|
-
|
|
5263
|
+
_this.refContainer = function (container) {
|
|
5298
5264
|
_this.container = container;
|
|
5299
|
-
}
|
|
5265
|
+
};
|
|
5300
5266
|
|
|
5301
5267
|
_this.container = null;
|
|
5302
5268
|
_this.internalPlayer = null;
|
|
5303
5269
|
return _this;
|
|
5304
5270
|
}
|
|
5305
5271
|
|
|
5272
|
+
/**
|
|
5273
|
+
* Expose PlayerState constants for convenience. These constants can also be
|
|
5274
|
+
* accessed through the global YT object after the YouTube IFrame API is instantiated.
|
|
5275
|
+
* https://developers.google.com/youtube/iframe_api_reference#onStateChange
|
|
5276
|
+
*/
|
|
5277
|
+
|
|
5278
|
+
|
|
5306
5279
|
_createClass(YouTube, [{
|
|
5307
|
-
key:
|
|
5280
|
+
key: 'componentDidMount',
|
|
5308
5281
|
value: function componentDidMount() {
|
|
5309
5282
|
this.createPlayer();
|
|
5310
5283
|
}
|
|
5311
5284
|
}, {
|
|
5312
|
-
key:
|
|
5285
|
+
key: 'componentDidUpdate',
|
|
5313
5286
|
value: function componentDidUpdate(prevProps) {
|
|
5314
5287
|
if (shouldUpdatePlayer(prevProps, this.props)) {
|
|
5315
5288
|
this.updatePlayer();
|
|
@@ -5324,58 +5297,112 @@ var YouTube = /*#__PURE__*/function (_React$Component) {
|
|
|
5324
5297
|
}
|
|
5325
5298
|
}
|
|
5326
5299
|
}, {
|
|
5327
|
-
key:
|
|
5300
|
+
key: 'componentWillUnmount',
|
|
5328
5301
|
value: function componentWillUnmount() {
|
|
5329
|
-
/**
|
|
5330
|
-
* Note: The `youtube-player` package that is used promisifies all
|
|
5331
|
-
* Player API calls, which introduces a delay of a tick before it actually
|
|
5332
|
-
* gets destroyed. Since React attempts to remove the element instantly
|
|
5333
|
-
* this method isn't quick enough to reset the container element.
|
|
5302
|
+
/**
|
|
5303
|
+
* Note: The `youtube-player` package that is used promisifies all Youtube
|
|
5304
|
+
* Player API calls, which introduces a delay of a tick before it actually
|
|
5305
|
+
* gets destroyed. Since React attempts to remove the element instantly
|
|
5306
|
+
* this method isn't quick enough to reset the container element.
|
|
5334
5307
|
*/
|
|
5335
5308
|
this.internalPlayer.destroy();
|
|
5336
5309
|
}
|
|
5337
|
-
|
|
5338
|
-
|
|
5339
|
-
*
|
|
5340
|
-
*
|
|
5341
|
-
*
|
|
5310
|
+
|
|
5311
|
+
/**
|
|
5312
|
+
* https://developers.google.com/youtube/iframe_api_reference#onReady
|
|
5313
|
+
*
|
|
5314
|
+
* @param {Object} event
|
|
5315
|
+
* @param {Object} target - player object
|
|
5316
|
+
*/
|
|
5317
|
+
|
|
5318
|
+
|
|
5319
|
+
/**
|
|
5320
|
+
* https://developers.google.com/youtube/iframe_api_reference#onError
|
|
5321
|
+
*
|
|
5322
|
+
* @param {Object} event
|
|
5323
|
+
* @param {Integer} data - error type
|
|
5324
|
+
* @param {Object} target - player object
|
|
5325
|
+
*/
|
|
5326
|
+
|
|
5327
|
+
|
|
5328
|
+
/**
|
|
5329
|
+
* https://developers.google.com/youtube/iframe_api_reference#onStateChange
|
|
5330
|
+
*
|
|
5331
|
+
* @param {Object} event
|
|
5332
|
+
* @param {Integer} data - status change type
|
|
5333
|
+
* @param {Object} target - actual YT player
|
|
5334
|
+
*/
|
|
5335
|
+
|
|
5336
|
+
|
|
5337
|
+
/**
|
|
5338
|
+
* https://developers.google.com/youtube/iframe_api_reference#onPlaybackRateChange
|
|
5339
|
+
*
|
|
5340
|
+
* @param {Object} event
|
|
5341
|
+
* @param {Float} data - playback rate
|
|
5342
|
+
* @param {Object} target - actual YT player
|
|
5343
|
+
*/
|
|
5344
|
+
|
|
5345
|
+
|
|
5346
|
+
/**
|
|
5347
|
+
* https://developers.google.com/youtube/iframe_api_reference#onPlaybackQualityChange
|
|
5348
|
+
*
|
|
5349
|
+
* @param {Object} event
|
|
5350
|
+
* @param {String} data - playback quality
|
|
5351
|
+
* @param {Object} target - actual YT player
|
|
5352
|
+
*/
|
|
5353
|
+
|
|
5354
|
+
|
|
5355
|
+
/**
|
|
5356
|
+
* Initialize the Youtube Player API on the container and attach event handlers
|
|
5357
|
+
*/
|
|
5358
|
+
|
|
5359
|
+
|
|
5360
|
+
/**
|
|
5361
|
+
* Shorthand for destroying and then re-creating the Youtube Player
|
|
5362
|
+
*/
|
|
5363
|
+
|
|
5364
|
+
|
|
5365
|
+
/**
|
|
5366
|
+
* Method to update the id and class of the Youtube Player iframe.
|
|
5367
|
+
* React should update this automatically but since the Youtube Player API
|
|
5368
|
+
* replaced the DIV that is mounted by React we need to do this manually.
|
|
5369
|
+
*/
|
|
5370
|
+
|
|
5371
|
+
|
|
5372
|
+
/**
|
|
5373
|
+
* Call Youtube Player API methods to update the currently playing video.
|
|
5374
|
+
* Depeding on the `opts.playerVars.autoplay` this function uses one of two
|
|
5375
|
+
* Youtube Player API methods to update the video.
|
|
5342
5376
|
*/
|
|
5343
5377
|
|
|
5344
5378
|
}, {
|
|
5345
|
-
key:
|
|
5379
|
+
key: 'render',
|
|
5346
5380
|
value: function render() {
|
|
5347
|
-
return
|
|
5348
|
-
|
|
5349
|
-
|
|
5350
|
-
id: this.props.id,
|
|
5351
|
-
|
|
5352
|
-
ref: this.refContainer
|
|
5353
|
-
}));
|
|
5381
|
+
return React__default.createElement(
|
|
5382
|
+
'div',
|
|
5383
|
+
{ className: this.props.containerClassName },
|
|
5384
|
+
React__default.createElement('div', { id: this.props.id, className: this.props.className, ref: this.refContainer })
|
|
5385
|
+
);
|
|
5354
5386
|
}
|
|
5355
5387
|
}]);
|
|
5356
5388
|
|
|
5357
5389
|
return YouTube;
|
|
5358
5390
|
}(React__default.Component);
|
|
5359
5391
|
|
|
5360
|
-
_defineProperty(YouTube, "PlayerState", {
|
|
5361
|
-
UNSTARTED: -1,
|
|
5362
|
-
ENDED: 0,
|
|
5363
|
-
PLAYING: 1,
|
|
5364
|
-
PAUSED: 2,
|
|
5365
|
-
BUFFERING: 3,
|
|
5366
|
-
CUED: 5
|
|
5367
|
-
});
|
|
5368
|
-
|
|
5369
5392
|
YouTube.propTypes = {
|
|
5370
5393
|
videoId: PropTypes.string,
|
|
5394
|
+
|
|
5371
5395
|
// custom ID for player element
|
|
5372
5396
|
id: PropTypes.string,
|
|
5397
|
+
|
|
5373
5398
|
// custom class name for player element
|
|
5374
5399
|
className: PropTypes.string,
|
|
5375
5400
|
// custom class name for player container element
|
|
5376
5401
|
containerClassName: PropTypes.string,
|
|
5402
|
+
|
|
5377
5403
|
// https://developers.google.com/youtube/iframe_api_reference#Loading_a_Video_Player
|
|
5378
5404
|
opts: PropTypes.objectOf(PropTypes.any),
|
|
5405
|
+
|
|
5379
5406
|
// event subscriptions
|
|
5380
5407
|
onReady: PropTypes.func,
|
|
5381
5408
|
onError: PropTypes.func,
|
|
@@ -5387,7 +5414,6 @@ YouTube.propTypes = {
|
|
|
5387
5414
|
onPlaybackQualityChange: PropTypes.func
|
|
5388
5415
|
};
|
|
5389
5416
|
YouTube.defaultProps = {
|
|
5390
|
-
videoId: null,
|
|
5391
5417
|
id: null,
|
|
5392
5418
|
className: null,
|
|
5393
5419
|
opts: {},
|
|
@@ -5401,6 +5427,14 @@ YouTube.defaultProps = {
|
|
|
5401
5427
|
onPlaybackRateChange: function onPlaybackRateChange() {},
|
|
5402
5428
|
onPlaybackQualityChange: function onPlaybackQualityChange() {}
|
|
5403
5429
|
};
|
|
5430
|
+
YouTube.PlayerState = {
|
|
5431
|
+
UNSTARTED: -1,
|
|
5432
|
+
ENDED: 0,
|
|
5433
|
+
PLAYING: 1,
|
|
5434
|
+
PAUSED: 2,
|
|
5435
|
+
BUFFERING: 3,
|
|
5436
|
+
CUED: 5
|
|
5437
|
+
};
|
|
5404
5438
|
|
|
5405
5439
|
var YouTubePlayer = function YouTubePlayer(_ref) {
|
|
5406
5440
|
var url = _ref.url;
|
|
@@ -6435,8 +6469,8 @@ var window_1 = win;
|
|
|
6435
6469
|
|
|
6436
6470
|
/*! @name @brightcove/react-player-loader @version 1.4.0 @license Apache-2.0 */
|
|
6437
6471
|
|
|
6438
|
-
function _extends() {
|
|
6439
|
-
_extends = Object.assign || function (target) {
|
|
6472
|
+
function _extends$1() {
|
|
6473
|
+
_extends$1 = Object.assign || function (target) {
|
|
6440
6474
|
for (var i = 1; i < arguments.length; i++) {
|
|
6441
6475
|
var source = arguments[i];
|
|
6442
6476
|
|
|
@@ -6450,7 +6484,7 @@ function _extends() {
|
|
|
6450
6484
|
return target;
|
|
6451
6485
|
};
|
|
6452
6486
|
|
|
6453
|
-
return _extends.apply(this, arguments);
|
|
6487
|
+
return _extends$1.apply(this, arguments);
|
|
6454
6488
|
}
|
|
6455
6489
|
|
|
6456
6490
|
function _inheritsLoose(subClass, superClass) {
|
|
@@ -6459,7 +6493,7 @@ function _inheritsLoose(subClass, superClass) {
|
|
|
6459
6493
|
subClass.__proto__ = superClass;
|
|
6460
6494
|
}
|
|
6461
6495
|
|
|
6462
|
-
function _assertThisInitialized
|
|
6496
|
+
function _assertThisInitialized(self) {
|
|
6463
6497
|
if (self === void 0) {
|
|
6464
6498
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
6465
6499
|
}
|
|
@@ -6469,8 +6503,8 @@ function _assertThisInitialized$1(self) {
|
|
|
6469
6503
|
|
|
6470
6504
|
/*! @name @brightcove/player-loader @version 1.7.1 @license Apache-2.0 */
|
|
6471
6505
|
|
|
6472
|
-
function _extends$1() {
|
|
6473
|
-
_extends$1 = Object.assign || function (target) {
|
|
6506
|
+
function _extends$1$1() {
|
|
6507
|
+
_extends$1$1 = Object.assign || function (target) {
|
|
6474
6508
|
for (var i = 1; i < arguments.length; i++) {
|
|
6475
6509
|
var source = arguments[i];
|
|
6476
6510
|
|
|
@@ -6484,7 +6518,7 @@ function _extends$1() {
|
|
|
6484
6518
|
return target;
|
|
6485
6519
|
};
|
|
6486
6520
|
|
|
6487
|
-
return _extends$1.apply(this, arguments);
|
|
6521
|
+
return _extends$1$1.apply(this, arguments);
|
|
6488
6522
|
}
|
|
6489
6523
|
|
|
6490
6524
|
var version$1 = "1.7.1";
|
|
@@ -6492,7 +6526,7 @@ var version$1 = "1.7.1";
|
|
|
6492
6526
|
/*! @name @brightcove/player-url @version 1.2.0 @license Apache-2.0 */
|
|
6493
6527
|
var version$1$1 = "1.2.0";
|
|
6494
6528
|
|
|
6495
|
-
var _typeof
|
|
6529
|
+
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
|
|
6496
6530
|
return typeof obj;
|
|
6497
6531
|
} : function (obj) {
|
|
6498
6532
|
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
@@ -6627,7 +6661,7 @@ var brightcovePlayerUrl = function brightcovePlayerUrl(_ref) {
|
|
|
6627
6661
|
|
|
6628
6662
|
var qs = '';
|
|
6629
6663
|
|
|
6630
|
-
if (iframe && queryParams && (typeof queryParams === 'undefined' ? 'undefined' : _typeof
|
|
6664
|
+
if (iframe && queryParams && (typeof queryParams === 'undefined' ? 'undefined' : _typeof(queryParams)) === 'object') {
|
|
6631
6665
|
qs = getQueryString(queryParams);
|
|
6632
6666
|
}
|
|
6633
6667
|
|
|
@@ -6861,7 +6895,7 @@ var wrapResponsive = function wrapResponsive(embedType, embedOptions, el) {
|
|
|
6861
6895
|
el.style.width = '100%';
|
|
6862
6896
|
el.style.height = '100%';
|
|
6863
6897
|
|
|
6864
|
-
var responsive = _extends$1({
|
|
6898
|
+
var responsive = _extends$1$1({
|
|
6865
6899
|
aspectRatio: DEFAULT_ASPECT_RATIO,
|
|
6866
6900
|
iframeHorizontalPlaylist: DEFAULT_IFRAME_HORIZONTAL_PLAYLIST,
|
|
6867
6901
|
maxWidth: DEFAULT_MAX_WIDTH
|
|
@@ -7546,7 +7580,7 @@ var loadPlayer = function loadPlayer(params, resolve, reject) {
|
|
|
7546
7580
|
|
|
7547
7581
|
|
|
7548
7582
|
var brightcovePlayerLoader = function brightcovePlayerLoader(parameters) {
|
|
7549
|
-
var params = _extends$1({}, DEFAULTS, parameters);
|
|
7583
|
+
var params = _extends$1$1({}, DEFAULTS, parameters);
|
|
7550
7584
|
|
|
7551
7585
|
var Promise = params.Promise,
|
|
7552
7586
|
onSuccess = params.onSuccess,
|
|
@@ -7688,7 +7722,7 @@ function (_React$Component) {
|
|
|
7688
7722
|
_this.refNode = ref;
|
|
7689
7723
|
};
|
|
7690
7724
|
|
|
7691
|
-
_this.loadPlayer = _this.loadPlayer.bind(_assertThisInitialized
|
|
7725
|
+
_this.loadPlayer = _this.loadPlayer.bind(_assertThisInitialized(_this));
|
|
7692
7726
|
return _this;
|
|
7693
7727
|
}
|
|
7694
7728
|
/**
|
|
@@ -7709,7 +7743,7 @@ function (_React$Component) {
|
|
|
7709
7743
|
var userSuccess = this.props.onSuccess;
|
|
7710
7744
|
var userFailure = this.props.onFailure;
|
|
7711
7745
|
|
|
7712
|
-
var options = _extends({}, this.props, {
|
|
7746
|
+
var options = _extends$1({}, this.props, {
|
|
7713
7747
|
refNode: this.refNode,
|
|
7714
7748
|
refNodeInsert: 'append',
|
|
7715
7749
|
onSuccess: function onSuccess(_ref) {
|
|
@@ -8018,7 +8052,7 @@ function (_React$Component) {
|
|
|
8018
8052
|
;
|
|
8019
8053
|
|
|
8020
8054
|
_proto.render = function render() {
|
|
8021
|
-
var props = _extends({
|
|
8055
|
+
var props = _extends$1({
|
|
8022
8056
|
className: 'brightcove-react-player-loader'
|
|
8023
8057
|
}, this.props.attrs, {
|
|
8024
8058
|
ref: this.setRefNode
|
|
@@ -8432,17 +8466,11 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
|
8432
8466
|
|
|
8433
8467
|
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; }
|
|
8434
8468
|
|
|
8435
|
-
function
|
|
8436
|
-
|
|
8437
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8469
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
|
|
8438
8470
|
|
|
8439
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance
|
|
8471
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
|
|
8440
8472
|
|
|
8441
|
-
function
|
|
8442
|
-
|
|
8443
|
-
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; }
|
|
8444
|
-
|
|
8445
|
-
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; }
|
|
8473
|
+
function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { 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; }
|
|
8446
8474
|
|
|
8447
8475
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
8448
8476
|
|
|
@@ -8572,12 +8600,12 @@ function getSDK(url, sdkGlobal) {
|
|
|
8572
8600
|
|
|
8573
8601
|
function getConfig(props$1, defaultProps, showWarning) {
|
|
8574
8602
|
var config = (0, _deepmerge["default"])(defaultProps.config, props$1.config);
|
|
8575
|
-
|
|
8576
|
-
var
|
|
8577
|
-
|
|
8603
|
+
var _iteratorNormalCompletion = true;
|
|
8604
|
+
var _didIteratorError = false;
|
|
8605
|
+
var _iteratorError = undefined;
|
|
8578
8606
|
|
|
8579
8607
|
try {
|
|
8580
|
-
for (_iterator.
|
|
8608
|
+
for (var _iterator = props.DEPRECATED_CONFIG_PROPS[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
8581
8609
|
var p = _step.value;
|
|
8582
8610
|
|
|
8583
8611
|
if (props$1[p]) {
|
|
@@ -8592,9 +8620,18 @@ function getConfig(props$1, defaultProps, showWarning) {
|
|
|
8592
8620
|
}
|
|
8593
8621
|
}
|
|
8594
8622
|
} catch (err) {
|
|
8595
|
-
|
|
8623
|
+
_didIteratorError = true;
|
|
8624
|
+
_iteratorError = err;
|
|
8596
8625
|
} finally {
|
|
8597
|
-
|
|
8626
|
+
try {
|
|
8627
|
+
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
|
|
8628
|
+
_iterator["return"]();
|
|
8629
|
+
}
|
|
8630
|
+
} finally {
|
|
8631
|
+
if (_didIteratorError) {
|
|
8632
|
+
throw _iteratorError;
|
|
8633
|
+
}
|
|
8634
|
+
}
|
|
8598
8635
|
}
|
|
8599
8636
|
|
|
8600
8637
|
return config;
|
|
@@ -8741,16 +8778,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
8741
8778
|
|
|
8742
8779
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
8743
8780
|
|
|
8744
|
-
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); }; }
|
|
8745
|
-
|
|
8746
8781
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
8747
8782
|
|
|
8748
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
8749
|
-
|
|
8750
|
-
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; } }
|
|
8751
|
-
|
|
8752
8783
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
8753
8784
|
|
|
8785
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
8786
|
+
|
|
8754
8787
|
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); }
|
|
8755
8788
|
|
|
8756
8789
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -8759,12 +8792,14 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
8759
8792
|
|
|
8760
8793
|
var SEEK_ON_PLAY_EXPIRY = 5000;
|
|
8761
8794
|
|
|
8762
|
-
var Player =
|
|
8795
|
+
var Player =
|
|
8796
|
+
/*#__PURE__*/
|
|
8797
|
+
function (_Component) {
|
|
8763
8798
|
_inherits(Player, _Component);
|
|
8764
8799
|
|
|
8765
|
-
var _super = _createSuper(Player);
|
|
8766
|
-
|
|
8767
8800
|
function Player() {
|
|
8801
|
+
var _getPrototypeOf2;
|
|
8802
|
+
|
|
8768
8803
|
var _this;
|
|
8769
8804
|
|
|
8770
8805
|
_classCallCheck(this, Player);
|
|
@@ -8773,7 +8808,7 @@ var Player = /*#__PURE__*/function (_Component) {
|
|
|
8773
8808
|
_args[_key] = arguments[_key];
|
|
8774
8809
|
}
|
|
8775
8810
|
|
|
8776
|
-
_this =
|
|
8811
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Player)).call.apply(_getPrototypeOf2, [this].concat(_args)));
|
|
8777
8812
|
|
|
8778
8813
|
_defineProperty(_assertThisInitialized(_this), "mounted", false);
|
|
8779
8814
|
|
|
@@ -9098,7 +9133,7 @@ var Player = /*#__PURE__*/function (_Component) {
|
|
|
9098
9133
|
return null;
|
|
9099
9134
|
}
|
|
9100
9135
|
|
|
9101
|
-
return
|
|
9136
|
+
return _react["default"].createElement(Player, _extends({}, this.props, {
|
|
9102
9137
|
ref: this.ref,
|
|
9103
9138
|
onReady: this.handleReady,
|
|
9104
9139
|
onPlay: this.handlePlay,
|
|
@@ -9159,16 +9194,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
9159
9194
|
|
|
9160
9195
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
9161
9196
|
|
|
9162
|
-
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); }; }
|
|
9163
|
-
|
|
9164
9197
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
9165
9198
|
|
|
9166
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9167
|
-
|
|
9168
|
-
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; } }
|
|
9169
|
-
|
|
9170
9199
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
9171
9200
|
|
|
9201
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9202
|
+
|
|
9172
9203
|
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); }
|
|
9173
9204
|
|
|
9174
9205
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -9180,12 +9211,14 @@ var SUPPORTED_PROPS = Object.keys(props.propTypes);
|
|
|
9180
9211
|
function createSinglePlayer(activePlayer) {
|
|
9181
9212
|
var _class, _temp;
|
|
9182
9213
|
|
|
9183
|
-
return _temp = _class =
|
|
9214
|
+
return _temp = _class =
|
|
9215
|
+
/*#__PURE__*/
|
|
9216
|
+
function (_Component) {
|
|
9184
9217
|
_inherits(SinglePlayer, _Component);
|
|
9185
9218
|
|
|
9186
|
-
var _super = _createSuper(SinglePlayer);
|
|
9187
|
-
|
|
9188
9219
|
function SinglePlayer() {
|
|
9220
|
+
var _getPrototypeOf2;
|
|
9221
|
+
|
|
9189
9222
|
var _this;
|
|
9190
9223
|
|
|
9191
9224
|
_classCallCheck(this, SinglePlayer);
|
|
@@ -9194,7 +9227,7 @@ function createSinglePlayer(activePlayer) {
|
|
|
9194
9227
|
args[_key] = arguments[_key];
|
|
9195
9228
|
}
|
|
9196
9229
|
|
|
9197
|
-
_this =
|
|
9230
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(SinglePlayer)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
9198
9231
|
|
|
9199
9232
|
_defineProperty(_assertThisInitialized(_this), "config", (0, utils.getConfig)(_this.props, props.defaultProps, true));
|
|
9200
9233
|
|
|
@@ -9262,12 +9295,12 @@ function createSinglePlayer(activePlayer) {
|
|
|
9262
9295
|
height = _this$props.height,
|
|
9263
9296
|
Wrapper = _this$props.wrapper;
|
|
9264
9297
|
var otherProps = (0, utils.omit)(this.props, SUPPORTED_PROPS, props.DEPRECATED_CONFIG_PROPS);
|
|
9265
|
-
return
|
|
9298
|
+
return _react["default"].createElement(Wrapper, _extends({
|
|
9266
9299
|
style: _objectSpread({}, style, {
|
|
9267
9300
|
width: width,
|
|
9268
9301
|
height: height
|
|
9269
9302
|
})
|
|
9270
|
-
}, otherProps),
|
|
9303
|
+
}, otherProps), _react["default"].createElement(_Player["default"], _extends({}, this.props, {
|
|
9271
9304
|
ref: this.ref,
|
|
9272
9305
|
activePlayer: activePlayer,
|
|
9273
9306
|
config: this.config
|
|
@@ -9313,31 +9346,23 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
9313
9346
|
|
|
9314
9347
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
9315
9348
|
|
|
9316
|
-
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); }; }
|
|
9317
|
-
|
|
9318
9349
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
9319
9350
|
|
|
9320
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9321
|
-
|
|
9322
|
-
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; } }
|
|
9323
|
-
|
|
9324
9351
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
9325
9352
|
|
|
9353
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9354
|
+
|
|
9326
9355
|
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); }
|
|
9327
9356
|
|
|
9328
9357
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
9329
9358
|
|
|
9330
9359
|
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; }
|
|
9331
9360
|
|
|
9332
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) ||
|
|
9333
|
-
|
|
9334
|
-
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."); }
|
|
9335
|
-
|
|
9336
|
-
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); }
|
|
9361
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
|
|
9337
9362
|
|
|
9338
|
-
function
|
|
9363
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
|
|
9339
9364
|
|
|
9340
|
-
function _iterableToArrayLimit(arr, i) { if (
|
|
9365
|
+
function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { 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; }
|
|
9341
9366
|
|
|
9342
9367
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
9343
9368
|
|
|
@@ -9362,12 +9387,14 @@ function parsePlaylist(url) {
|
|
|
9362
9387
|
return {};
|
|
9363
9388
|
}
|
|
9364
9389
|
|
|
9365
|
-
var YouTube =
|
|
9390
|
+
var YouTube =
|
|
9391
|
+
/*#__PURE__*/
|
|
9392
|
+
function (_Component) {
|
|
9366
9393
|
_inherits(YouTube, _Component);
|
|
9367
9394
|
|
|
9368
|
-
var _super = _createSuper(YouTube);
|
|
9369
|
-
|
|
9370
9395
|
function YouTube() {
|
|
9396
|
+
var _getPrototypeOf2;
|
|
9397
|
+
|
|
9371
9398
|
var _this;
|
|
9372
9399
|
|
|
9373
9400
|
_classCallCheck(this, YouTube);
|
|
@@ -9376,7 +9403,7 @@ var YouTube = /*#__PURE__*/function (_Component) {
|
|
|
9376
9403
|
args[_key] = arguments[_key];
|
|
9377
9404
|
}
|
|
9378
9405
|
|
|
9379
|
-
_this =
|
|
9406
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(YouTube)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
9380
9407
|
|
|
9381
9408
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
9382
9409
|
|
|
@@ -9564,9 +9591,9 @@ var YouTube = /*#__PURE__*/function (_Component) {
|
|
|
9564
9591
|
height: '100%',
|
|
9565
9592
|
display: display
|
|
9566
9593
|
};
|
|
9567
|
-
return
|
|
9594
|
+
return _react["default"].createElement("div", {
|
|
9568
9595
|
style: style
|
|
9569
|
-
},
|
|
9596
|
+
}, _react["default"].createElement("div", {
|
|
9570
9597
|
ref: this.ref
|
|
9571
9598
|
}));
|
|
9572
9599
|
}
|
|
@@ -9622,16 +9649,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
9622
9649
|
|
|
9623
9650
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
9624
9651
|
|
|
9625
|
-
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); }; }
|
|
9626
|
-
|
|
9627
9652
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
9628
9653
|
|
|
9629
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9630
|
-
|
|
9631
|
-
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; } }
|
|
9632
|
-
|
|
9633
9654
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
9634
9655
|
|
|
9656
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9657
|
+
|
|
9635
9658
|
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); }
|
|
9636
9659
|
|
|
9637
9660
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -9640,14 +9663,16 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
9640
9663
|
|
|
9641
9664
|
var SDK_URL = 'https://w.soundcloud.com/player/api.js';
|
|
9642
9665
|
var SDK_GLOBAL = 'SC';
|
|
9643
|
-
var MATCH_URL = /(
|
|
9666
|
+
var MATCH_URL = /(soundcloud\.com|snd\.sc)\/.+$/;
|
|
9644
9667
|
|
|
9645
|
-
var SoundCloud =
|
|
9668
|
+
var SoundCloud =
|
|
9669
|
+
/*#__PURE__*/
|
|
9670
|
+
function (_Component) {
|
|
9646
9671
|
_inherits(SoundCloud, _Component);
|
|
9647
9672
|
|
|
9648
|
-
var _super = _createSuper(SoundCloud);
|
|
9649
|
-
|
|
9650
9673
|
function SoundCloud() {
|
|
9674
|
+
var _getPrototypeOf2;
|
|
9675
|
+
|
|
9651
9676
|
var _this;
|
|
9652
9677
|
|
|
9653
9678
|
_classCallCheck(this, SoundCloud);
|
|
@@ -9656,7 +9681,7 @@ var SoundCloud = /*#__PURE__*/function (_Component) {
|
|
|
9656
9681
|
args[_key] = arguments[_key];
|
|
9657
9682
|
}
|
|
9658
9683
|
|
|
9659
|
-
_this =
|
|
9684
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(SoundCloud)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
9660
9685
|
|
|
9661
9686
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
9662
9687
|
|
|
@@ -9777,7 +9802,7 @@ var SoundCloud = /*#__PURE__*/function (_Component) {
|
|
|
9777
9802
|
height: '100%',
|
|
9778
9803
|
display: display
|
|
9779
9804
|
};
|
|
9780
|
-
return
|
|
9805
|
+
return _react["default"].createElement("iframe", {
|
|
9781
9806
|
ref: this.ref,
|
|
9782
9807
|
src: "https://w.soundcloud.com/player/?url=".concat(encodeURIComponent(this.props.url)),
|
|
9783
9808
|
style: style,
|
|
@@ -9839,16 +9864,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
9839
9864
|
|
|
9840
9865
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
9841
9866
|
|
|
9842
|
-
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); }; }
|
|
9843
|
-
|
|
9844
9867
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
9845
9868
|
|
|
9846
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9847
|
-
|
|
9848
|
-
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; } }
|
|
9849
|
-
|
|
9850
9869
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
9851
9870
|
|
|
9871
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9872
|
+
|
|
9852
9873
|
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); }
|
|
9853
9874
|
|
|
9854
9875
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -9860,12 +9881,14 @@ var SDK_GLOBAL = 'Vimeo';
|
|
|
9860
9881
|
var MATCH_URL = /vimeo\.com\/.+/;
|
|
9861
9882
|
var MATCH_FILE_URL = /vimeo\.com\/external\/[0-9]+\..+/;
|
|
9862
9883
|
|
|
9863
|
-
var Vimeo =
|
|
9884
|
+
var Vimeo =
|
|
9885
|
+
/*#__PURE__*/
|
|
9886
|
+
function (_Component) {
|
|
9864
9887
|
_inherits(Vimeo, _Component);
|
|
9865
9888
|
|
|
9866
|
-
var _super = _createSuper(Vimeo);
|
|
9867
|
-
|
|
9868
9889
|
function Vimeo() {
|
|
9890
|
+
var _getPrototypeOf2;
|
|
9891
|
+
|
|
9869
9892
|
var _this;
|
|
9870
9893
|
|
|
9871
9894
|
_classCallCheck(this, Vimeo);
|
|
@@ -9874,7 +9897,7 @@ var Vimeo = /*#__PURE__*/function (_Component) {
|
|
|
9874
9897
|
args[_key] = arguments[_key];
|
|
9875
9898
|
}
|
|
9876
9899
|
|
|
9877
|
-
_this =
|
|
9900
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Vimeo)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
9878
9901
|
|
|
9879
9902
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
9880
9903
|
|
|
@@ -10031,7 +10054,7 @@ var Vimeo = /*#__PURE__*/function (_Component) {
|
|
|
10031
10054
|
overflow: 'hidden',
|
|
10032
10055
|
display: display
|
|
10033
10056
|
};
|
|
10034
|
-
return
|
|
10057
|
+
return _react["default"].createElement("div", {
|
|
10035
10058
|
key: this.props.url,
|
|
10036
10059
|
ref: this.ref,
|
|
10037
10060
|
style: style
|
|
@@ -10091,16 +10114,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
10091
10114
|
|
|
10092
10115
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
10093
10116
|
|
|
10094
|
-
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); }; }
|
|
10095
|
-
|
|
10096
10117
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
10097
10118
|
|
|
10098
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10099
|
-
|
|
10100
|
-
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; } }
|
|
10101
|
-
|
|
10102
10119
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
10103
10120
|
|
|
10121
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10122
|
+
|
|
10104
10123
|
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); }
|
|
10105
10124
|
|
|
10106
10125
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -10113,12 +10132,14 @@ var SDK_GLOBAL_READY = 'fbAsyncInit';
|
|
|
10113
10132
|
var MATCH_URL = /^https?:\/\/(www\.)?facebook\.com.*\/(video(s)?|watch|story)(\.php?|\/).+$/;
|
|
10114
10133
|
var PLAYER_ID_PREFIX = 'facebook-player-';
|
|
10115
10134
|
|
|
10116
|
-
var Facebook =
|
|
10135
|
+
var Facebook =
|
|
10136
|
+
/*#__PURE__*/
|
|
10137
|
+
function (_Component) {
|
|
10117
10138
|
_inherits(Facebook, _Component);
|
|
10118
10139
|
|
|
10119
|
-
var _super = _createSuper(Facebook);
|
|
10120
|
-
|
|
10121
10140
|
function Facebook() {
|
|
10141
|
+
var _getPrototypeOf2;
|
|
10142
|
+
|
|
10122
10143
|
var _this;
|
|
10123
10144
|
|
|
10124
10145
|
_classCallCheck(this, Facebook);
|
|
@@ -10127,7 +10148,7 @@ var Facebook = /*#__PURE__*/function (_Component) {
|
|
|
10127
10148
|
args[_key] = arguments[_key];
|
|
10128
10149
|
}
|
|
10129
10150
|
|
|
10130
|
-
_this =
|
|
10151
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Facebook)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
10131
10152
|
|
|
10132
10153
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
10133
10154
|
|
|
@@ -10243,7 +10264,7 @@ var Facebook = /*#__PURE__*/function (_Component) {
|
|
|
10243
10264
|
width: '100%',
|
|
10244
10265
|
height: '100%'
|
|
10245
10266
|
};
|
|
10246
|
-
return
|
|
10267
|
+
return _react["default"].createElement("div", {
|
|
10247
10268
|
style: style,
|
|
10248
10269
|
id: this.playerID,
|
|
10249
10270
|
className: "fb-video",
|
|
@@ -10303,16 +10324,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
10303
10324
|
|
|
10304
10325
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
10305
10326
|
|
|
10306
|
-
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); }; }
|
|
10307
|
-
|
|
10308
10327
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
10309
10328
|
|
|
10310
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10311
|
-
|
|
10312
|
-
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; } }
|
|
10313
|
-
|
|
10314
10329
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
10315
10330
|
|
|
10331
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10332
|
+
|
|
10316
10333
|
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); }
|
|
10317
10334
|
|
|
10318
10335
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -10323,12 +10340,14 @@ var SDK_URL = 'https://cdn.embed.ly/player-0.1.0.min.js';
|
|
|
10323
10340
|
var SDK_GLOBAL = 'playerjs';
|
|
10324
10341
|
var MATCH_URL = /streamable\.com\/([a-z0-9]+)$/;
|
|
10325
10342
|
|
|
10326
|
-
var Streamable =
|
|
10343
|
+
var Streamable =
|
|
10344
|
+
/*#__PURE__*/
|
|
10345
|
+
function (_Component) {
|
|
10327
10346
|
_inherits(Streamable, _Component);
|
|
10328
10347
|
|
|
10329
|
-
var _super = _createSuper(Streamable);
|
|
10330
|
-
|
|
10331
10348
|
function Streamable() {
|
|
10349
|
+
var _getPrototypeOf2;
|
|
10350
|
+
|
|
10332
10351
|
var _this;
|
|
10333
10352
|
|
|
10334
10353
|
_classCallCheck(this, Streamable);
|
|
@@ -10337,7 +10356,7 @@ var Streamable = /*#__PURE__*/function (_Component) {
|
|
|
10337
10356
|
args[_key] = arguments[_key];
|
|
10338
10357
|
}
|
|
10339
10358
|
|
|
10340
|
-
_this =
|
|
10359
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Streamable)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
10341
10360
|
|
|
10342
10361
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
10343
10362
|
|
|
@@ -10457,7 +10476,7 @@ var Streamable = /*#__PURE__*/function (_Component) {
|
|
|
10457
10476
|
width: '100%',
|
|
10458
10477
|
height: '100%'
|
|
10459
10478
|
};
|
|
10460
|
-
return
|
|
10479
|
+
return _react["default"].createElement("iframe", {
|
|
10461
10480
|
ref: this.ref,
|
|
10462
10481
|
src: "https://streamable.com/o/".concat(id),
|
|
10463
10482
|
frameBorder: "0",
|
|
@@ -10518,16 +10537,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
10518
10537
|
|
|
10519
10538
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
10520
10539
|
|
|
10521
|
-
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); }; }
|
|
10522
|
-
|
|
10523
10540
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
10524
10541
|
|
|
10525
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10526
|
-
|
|
10527
|
-
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; } }
|
|
10528
|
-
|
|
10529
10542
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
10530
10543
|
|
|
10544
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10545
|
+
|
|
10531
10546
|
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); }
|
|
10532
10547
|
|
|
10533
10548
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -10538,48 +10553,26 @@ var SDK_URL = 'https://fast.wistia.com/assets/external/E-v1.js';
|
|
|
10538
10553
|
var SDK_GLOBAL = 'Wistia';
|
|
10539
10554
|
var MATCH_URL = /(?:wistia\.com|wi\.st)\/(?:medias|embed)\/(.*)$/;
|
|
10540
10555
|
|
|
10541
|
-
var Wistia =
|
|
10556
|
+
var Wistia =
|
|
10557
|
+
/*#__PURE__*/
|
|
10558
|
+
function (_Component) {
|
|
10542
10559
|
_inherits(Wistia, _Component);
|
|
10543
10560
|
|
|
10544
|
-
var _super = _createSuper(Wistia);
|
|
10545
|
-
|
|
10546
10561
|
function Wistia() {
|
|
10562
|
+
var _getPrototypeOf2;
|
|
10563
|
+
|
|
10547
10564
|
var _this;
|
|
10548
10565
|
|
|
10549
10566
|
_classCallCheck(this, Wistia);
|
|
10550
10567
|
|
|
10551
|
-
for (var _len = arguments.length,
|
|
10552
|
-
|
|
10568
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
10569
|
+
args[_key] = arguments[_key];
|
|
10553
10570
|
}
|
|
10554
10571
|
|
|
10555
|
-
_this =
|
|
10572
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Wistia)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
10556
10573
|
|
|
10557
10574
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
10558
10575
|
|
|
10559
|
-
_defineProperty(_assertThisInitialized(_this), "onPlay", function () {
|
|
10560
|
-
var _this$props;
|
|
10561
|
-
|
|
10562
|
-
return (_this$props = _this.props).onPlay.apply(_this$props, arguments);
|
|
10563
|
-
});
|
|
10564
|
-
|
|
10565
|
-
_defineProperty(_assertThisInitialized(_this), "onPause", function () {
|
|
10566
|
-
var _this$props2;
|
|
10567
|
-
|
|
10568
|
-
return (_this$props2 = _this.props).onPause.apply(_this$props2, arguments);
|
|
10569
|
-
});
|
|
10570
|
-
|
|
10571
|
-
_defineProperty(_assertThisInitialized(_this), "onSeek", function () {
|
|
10572
|
-
var _this$props3;
|
|
10573
|
-
|
|
10574
|
-
return (_this$props3 = _this.props).onSeek.apply(_this$props3, arguments);
|
|
10575
|
-
});
|
|
10576
|
-
|
|
10577
|
-
_defineProperty(_assertThisInitialized(_this), "onEnded", function () {
|
|
10578
|
-
var _this$props4;
|
|
10579
|
-
|
|
10580
|
-
return (_this$props4 = _this.props).onEnded.apply(_this$props4, arguments);
|
|
10581
|
-
});
|
|
10582
|
-
|
|
10583
10576
|
_defineProperty(_assertThisInitialized(_this), "mute", function () {
|
|
10584
10577
|
_this.callPlayer('mute');
|
|
10585
10578
|
});
|
|
@@ -10601,13 +10594,17 @@ var Wistia = /*#__PURE__*/function (_Component) {
|
|
|
10601
10594
|
value: function load(url) {
|
|
10602
10595
|
var _this2 = this;
|
|
10603
10596
|
|
|
10604
|
-
var _this$
|
|
10605
|
-
playing = _this$
|
|
10606
|
-
muted = _this$
|
|
10607
|
-
controls = _this$
|
|
10608
|
-
_onReady = _this$
|
|
10609
|
-
|
|
10610
|
-
|
|
10597
|
+
var _this$props = this.props,
|
|
10598
|
+
playing = _this$props.playing,
|
|
10599
|
+
muted = _this$props.muted,
|
|
10600
|
+
controls = _this$props.controls,
|
|
10601
|
+
_onReady = _this$props.onReady,
|
|
10602
|
+
onPlay = _this$props.onPlay,
|
|
10603
|
+
onPause = _this$props.onPause,
|
|
10604
|
+
onSeek = _this$props.onSeek,
|
|
10605
|
+
onEnded = _this$props.onEnded,
|
|
10606
|
+
config = _this$props.config,
|
|
10607
|
+
onError = _this$props.onError;
|
|
10611
10608
|
(0, utils.getSDK)(SDK_URL, SDK_GLOBAL).then(function () {
|
|
10612
10609
|
window._wq = window._wq || [];
|
|
10613
10610
|
|
|
@@ -10624,28 +10621,19 @@ var Wistia = /*#__PURE__*/function (_Component) {
|
|
|
10624
10621
|
|
|
10625
10622
|
_this2.unbind();
|
|
10626
10623
|
|
|
10627
|
-
_this2.player.bind('play',
|
|
10624
|
+
_this2.player.bind('play', onPlay);
|
|
10628
10625
|
|
|
10629
|
-
_this2.player.bind('pause',
|
|
10626
|
+
_this2.player.bind('pause', onPause);
|
|
10630
10627
|
|
|
10631
|
-
_this2.player.bind('seek',
|
|
10628
|
+
_this2.player.bind('seek', onSeek);
|
|
10632
10629
|
|
|
10633
|
-
_this2.player.bind('end',
|
|
10630
|
+
_this2.player.bind('end', onEnded);
|
|
10634
10631
|
|
|
10635
10632
|
_onReady();
|
|
10636
10633
|
}
|
|
10637
10634
|
});
|
|
10638
10635
|
}, onError);
|
|
10639
10636
|
}
|
|
10640
|
-
}, {
|
|
10641
|
-
key: "unbind",
|
|
10642
|
-
value: function unbind() {
|
|
10643
|
-
this.player.unbind('play', this.onPlay);
|
|
10644
|
-
this.player.unbind('pause', this.onPause);
|
|
10645
|
-
this.player.unbind('seek', this.onSeek);
|
|
10646
|
-
this.player.unbind('end', this.onEnded);
|
|
10647
|
-
} // Proxy methods to prevent listener leaks
|
|
10648
|
-
|
|
10649
10637
|
}, {
|
|
10650
10638
|
key: "play",
|
|
10651
10639
|
value: function play() {
|
|
@@ -10656,6 +10644,19 @@ var Wistia = /*#__PURE__*/function (_Component) {
|
|
|
10656
10644
|
value: function pause() {
|
|
10657
10645
|
this.callPlayer('pause');
|
|
10658
10646
|
}
|
|
10647
|
+
}, {
|
|
10648
|
+
key: "unbind",
|
|
10649
|
+
value: function unbind() {
|
|
10650
|
+
var _this$props2 = this.props,
|
|
10651
|
+
onPlay = _this$props2.onPlay,
|
|
10652
|
+
onPause = _this$props2.onPause,
|
|
10653
|
+
onSeek = _this$props2.onSeek,
|
|
10654
|
+
onEnded = _this$props2.onEnded;
|
|
10655
|
+
this.player.unbind('play', onPlay);
|
|
10656
|
+
this.player.unbind('pause', onPause);
|
|
10657
|
+
this.player.unbind('seek', onSeek);
|
|
10658
|
+
this.player.unbind('end', onEnded);
|
|
10659
|
+
}
|
|
10659
10660
|
}, {
|
|
10660
10661
|
key: "stop",
|
|
10661
10662
|
value: function stop() {
|
|
@@ -10701,7 +10702,7 @@ var Wistia = /*#__PURE__*/function (_Component) {
|
|
|
10701
10702
|
width: '100%',
|
|
10702
10703
|
height: '100%'
|
|
10703
10704
|
};
|
|
10704
|
-
return
|
|
10705
|
+
return _react["default"].createElement("div", {
|
|
10705
10706
|
key: id,
|
|
10706
10707
|
className: className,
|
|
10707
10708
|
style: style
|
|
@@ -10761,16 +10762,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
10761
10762
|
|
|
10762
10763
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
10763
10764
|
|
|
10764
|
-
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); }; }
|
|
10765
|
-
|
|
10766
10765
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
10767
10766
|
|
|
10768
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10769
|
-
|
|
10770
|
-
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; } }
|
|
10771
|
-
|
|
10772
10767
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
10773
10768
|
|
|
10769
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10770
|
+
|
|
10774
10771
|
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); }
|
|
10775
10772
|
|
|
10776
10773
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -10783,12 +10780,14 @@ var MATCH_VIDEO_URL = /(?:www\.|go\.)?twitch\.tv\/videos\/(\d+)($|\?)/;
|
|
|
10783
10780
|
var MATCH_CHANNEL_URL = /(?:www\.|go\.)?twitch\.tv\/([a-z0-9_]+)($|\?)/;
|
|
10784
10781
|
var PLAYER_ID_PREFIX = 'twitch-player-';
|
|
10785
10782
|
|
|
10786
|
-
var Twitch =
|
|
10783
|
+
var Twitch =
|
|
10784
|
+
/*#__PURE__*/
|
|
10785
|
+
function (_Component) {
|
|
10787
10786
|
_inherits(Twitch, _Component);
|
|
10788
10787
|
|
|
10789
|
-
var _super = _createSuper(Twitch);
|
|
10790
|
-
|
|
10791
10788
|
function Twitch() {
|
|
10789
|
+
var _getPrototypeOf2;
|
|
10790
|
+
|
|
10792
10791
|
var _this;
|
|
10793
10792
|
|
|
10794
10793
|
_classCallCheck(this, Twitch);
|
|
@@ -10797,7 +10796,7 @@ var Twitch = /*#__PURE__*/function (_Component) {
|
|
|
10797
10796
|
args[_key] = arguments[_key];
|
|
10798
10797
|
}
|
|
10799
10798
|
|
|
10800
|
-
_this =
|
|
10799
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Twitch)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
10801
10800
|
|
|
10802
10801
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
10803
10802
|
|
|
@@ -10918,7 +10917,7 @@ var Twitch = /*#__PURE__*/function (_Component) {
|
|
|
10918
10917
|
width: '100%',
|
|
10919
10918
|
height: '100%'
|
|
10920
10919
|
};
|
|
10921
|
-
return
|
|
10920
|
+
return _react["default"].createElement("div", {
|
|
10922
10921
|
style: style,
|
|
10923
10922
|
id: this.playerID
|
|
10924
10923
|
});
|
|
@@ -10971,15 +10970,11 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
10971
10970
|
|
|
10972
10971
|
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; }
|
|
10973
10972
|
|
|
10974
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) ||
|
|
10973
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
|
|
10975
10974
|
|
|
10976
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance
|
|
10975
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
|
|
10977
10976
|
|
|
10978
|
-
function
|
|
10979
|
-
|
|
10980
|
-
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; }
|
|
10981
|
-
|
|
10982
|
-
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; }
|
|
10977
|
+
function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { 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; }
|
|
10983
10978
|
|
|
10984
10979
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
10985
10980
|
|
|
@@ -10989,16 +10984,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
10989
10984
|
|
|
10990
10985
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
10991
10986
|
|
|
10992
|
-
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); }; }
|
|
10993
|
-
|
|
10994
10987
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
10995
10988
|
|
|
10996
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10997
|
-
|
|
10998
|
-
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; } }
|
|
10999
|
-
|
|
11000
10989
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
11001
10990
|
|
|
10991
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10992
|
+
|
|
11002
10993
|
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); }
|
|
11003
10994
|
|
|
11004
10995
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -11010,12 +11001,14 @@ var SDK_GLOBAL = 'DM';
|
|
|
11010
11001
|
var SDK_GLOBAL_READY = 'dmAsyncInit';
|
|
11011
11002
|
var MATCH_URL = /^(?:(?:https?):)?(?:\/\/)?(?:www\.)?(?:(?:dailymotion\.com(?:\/embed)?\/video)|dai\.ly)\/([a-zA-Z0-9]+)(?:_[\w_-]+)?$/;
|
|
11012
11003
|
|
|
11013
|
-
var DailyMotion =
|
|
11004
|
+
var DailyMotion =
|
|
11005
|
+
/*#__PURE__*/
|
|
11006
|
+
function (_Component) {
|
|
11014
11007
|
_inherits(DailyMotion, _Component);
|
|
11015
11008
|
|
|
11016
|
-
var _super = _createSuper(DailyMotion);
|
|
11017
|
-
|
|
11018
11009
|
function DailyMotion() {
|
|
11010
|
+
var _getPrototypeOf2;
|
|
11011
|
+
|
|
11019
11012
|
var _this;
|
|
11020
11013
|
|
|
11021
11014
|
_classCallCheck(this, DailyMotion);
|
|
@@ -11024,7 +11017,7 @@ var DailyMotion = /*#__PURE__*/function (_Component) {
|
|
|
11024
11017
|
args[_key] = arguments[_key];
|
|
11025
11018
|
}
|
|
11026
11019
|
|
|
11027
|
-
_this =
|
|
11020
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(DailyMotion)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
11028
11021
|
|
|
11029
11022
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
11030
11023
|
|
|
@@ -11153,9 +11146,9 @@ var DailyMotion = /*#__PURE__*/function (_Component) {
|
|
|
11153
11146
|
height: '100%',
|
|
11154
11147
|
display: display
|
|
11155
11148
|
};
|
|
11156
|
-
return
|
|
11149
|
+
return _react["default"].createElement("div", {
|
|
11157
11150
|
style: style
|
|
11158
|
-
},
|
|
11151
|
+
}, _react["default"].createElement("div", {
|
|
11159
11152
|
ref: this.ref
|
|
11160
11153
|
}));
|
|
11161
11154
|
}
|
|
@@ -11213,16 +11206,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
11213
11206
|
|
|
11214
11207
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
11215
11208
|
|
|
11216
|
-
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); }; }
|
|
11217
|
-
|
|
11218
11209
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
11219
11210
|
|
|
11220
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
11221
|
-
|
|
11222
|
-
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; } }
|
|
11223
|
-
|
|
11224
11211
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
11225
11212
|
|
|
11213
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
11214
|
+
|
|
11226
11215
|
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); }
|
|
11227
11216
|
|
|
11228
11217
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -11233,12 +11222,14 @@ var SDK_URL = 'https://widget.mixcloud.com/media/js/widgetApi.js';
|
|
|
11233
11222
|
var SDK_GLOBAL = 'Mixcloud';
|
|
11234
11223
|
var MATCH_URL = /mixcloud\.com\/([^/]+\/[^/]+)/;
|
|
11235
11224
|
|
|
11236
|
-
var Mixcloud =
|
|
11225
|
+
var Mixcloud =
|
|
11226
|
+
/*#__PURE__*/
|
|
11227
|
+
function (_Component) {
|
|
11237
11228
|
_inherits(Mixcloud, _Component);
|
|
11238
11229
|
|
|
11239
|
-
var _super = _createSuper(Mixcloud);
|
|
11240
|
-
|
|
11241
11230
|
function Mixcloud() {
|
|
11231
|
+
var _getPrototypeOf2;
|
|
11232
|
+
|
|
11242
11233
|
var _this;
|
|
11243
11234
|
|
|
11244
11235
|
_classCallCheck(this, Mixcloud);
|
|
@@ -11247,7 +11238,7 @@ var Mixcloud = /*#__PURE__*/function (_Component) {
|
|
|
11247
11238
|
args[_key] = arguments[_key];
|
|
11248
11239
|
}
|
|
11249
11240
|
|
|
11250
|
-
_this =
|
|
11241
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Mixcloud)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
11251
11242
|
|
|
11252
11243
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
11253
11244
|
|
|
@@ -11350,7 +11341,7 @@ var Mixcloud = /*#__PURE__*/function (_Component) {
|
|
|
11350
11341
|
})); // We have to give the iframe a key here to prevent a
|
|
11351
11342
|
// weird dialog appearing when loading a new track
|
|
11352
11343
|
|
|
11353
|
-
return
|
|
11344
|
+
return _react["default"].createElement("iframe", {
|
|
11354
11345
|
key: id,
|
|
11355
11346
|
ref: this.ref,
|
|
11356
11347
|
style: style,
|
|
@@ -11410,33 +11401,23 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
11410
11401
|
|
|
11411
11402
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
11412
11403
|
|
|
11413
|
-
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); }; }
|
|
11414
|
-
|
|
11415
11404
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
11416
11405
|
|
|
11417
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
11418
|
-
|
|
11419
|
-
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; } }
|
|
11420
|
-
|
|
11421
11406
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
11422
11407
|
|
|
11408
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
11409
|
+
|
|
11423
11410
|
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); }
|
|
11424
11411
|
|
|
11425
11412
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
11426
11413
|
|
|
11427
11414
|
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; }
|
|
11428
11415
|
|
|
11429
|
-
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; } } }; }
|
|
11430
|
-
|
|
11431
|
-
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); }
|
|
11432
|
-
|
|
11433
|
-
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; }
|
|
11434
|
-
|
|
11435
11416
|
var IOS = typeof navigator !== 'undefined' && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
|
|
11436
11417
|
var AUDIO_EXTENSIONS = /\.(m4a|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i;
|
|
11437
11418
|
var VIDEO_EXTENSIONS = /\.(mp4|og[gv]|webm|mov|m4v)($|\?)/i;
|
|
11438
11419
|
var HLS_EXTENSIONS = /\.(m3u8)($|\?)/i;
|
|
11439
|
-
var HLS_SDK_URL = 'https://cdn.jsdelivr.net/npm/hls.js@VERSION
|
|
11420
|
+
var HLS_SDK_URL = 'https://cdn.jsdelivr.net/npm/hls.js@VERSION';
|
|
11440
11421
|
var HLS_GLOBAL = 'Hls';
|
|
11441
11422
|
var DASH_EXTENSIONS = /\.(mpd)($|\?)/i;
|
|
11442
11423
|
var DASH_SDK_URL = 'https://cdnjs.cloudflare.com/ajax/libs/dashjs/VERSION/dash.all.min.js';
|
|
@@ -11445,11 +11426,12 @@ var MATCH_DROPBOX_URL = /www\.dropbox\.com\/.+/;
|
|
|
11445
11426
|
|
|
11446
11427
|
function canPlay(url) {
|
|
11447
11428
|
if (url instanceof Array) {
|
|
11448
|
-
var
|
|
11449
|
-
|
|
11429
|
+
var _iteratorNormalCompletion = true;
|
|
11430
|
+
var _didIteratorError = false;
|
|
11431
|
+
var _iteratorError = undefined;
|
|
11450
11432
|
|
|
11451
11433
|
try {
|
|
11452
|
-
for (_iterator.
|
|
11434
|
+
for (var _iterator = url[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
11453
11435
|
var item = _step.value;
|
|
11454
11436
|
|
|
11455
11437
|
if (typeof item === 'string' && canPlay(item)) {
|
|
@@ -11461,9 +11443,18 @@ function canPlay(url) {
|
|
|
11461
11443
|
}
|
|
11462
11444
|
}
|
|
11463
11445
|
} catch (err) {
|
|
11464
|
-
|
|
11446
|
+
_didIteratorError = true;
|
|
11447
|
+
_iteratorError = err;
|
|
11465
11448
|
} finally {
|
|
11466
|
-
|
|
11449
|
+
try {
|
|
11450
|
+
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
|
|
11451
|
+
_iterator["return"]();
|
|
11452
|
+
}
|
|
11453
|
+
} finally {
|
|
11454
|
+
if (_didIteratorError) {
|
|
11455
|
+
throw _iteratorError;
|
|
11456
|
+
}
|
|
11457
|
+
}
|
|
11467
11458
|
}
|
|
11468
11459
|
|
|
11469
11460
|
return false;
|
|
@@ -11487,12 +11478,14 @@ function canEnablePIP(url) {
|
|
|
11487
11478
|
return canPlay(url) && (!!document.pictureInPictureEnabled || supportsWebKitPresentationMode()) && !AUDIO_EXTENSIONS.test(url);
|
|
11488
11479
|
}
|
|
11489
11480
|
|
|
11490
|
-
var FilePlayer =
|
|
11481
|
+
var FilePlayer =
|
|
11482
|
+
/*#__PURE__*/
|
|
11483
|
+
function (_Component) {
|
|
11491
11484
|
_inherits(FilePlayer, _Component);
|
|
11492
11485
|
|
|
11493
|
-
var _super = _createSuper(FilePlayer);
|
|
11494
|
-
|
|
11495
11486
|
function FilePlayer() {
|
|
11487
|
+
var _getPrototypeOf2;
|
|
11488
|
+
|
|
11496
11489
|
var _this;
|
|
11497
11490
|
|
|
11498
11491
|
_classCallCheck(this, FilePlayer);
|
|
@@ -11501,7 +11494,7 @@ var FilePlayer = /*#__PURE__*/function (_Component) {
|
|
|
11501
11494
|
_args[_key] = arguments[_key];
|
|
11502
11495
|
}
|
|
11503
11496
|
|
|
11504
|
-
_this =
|
|
11497
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(FilePlayer)).call.apply(_getPrototypeOf2, [this].concat(_args)));
|
|
11505
11498
|
|
|
11506
11499
|
_defineProperty(_assertThisInitialized(_this), "onReady", function () {
|
|
11507
11500
|
var _this$props;
|
|
@@ -11588,19 +11581,19 @@ var FilePlayer = /*#__PURE__*/function (_Component) {
|
|
|
11588
11581
|
|
|
11589
11582
|
_defineProperty(_assertThisInitialized(_this), "renderSourceElement", function (source, index) {
|
|
11590
11583
|
if (typeof source === 'string') {
|
|
11591
|
-
return
|
|
11584
|
+
return _react["default"].createElement("source", {
|
|
11592
11585
|
key: index,
|
|
11593
11586
|
src: source
|
|
11594
11587
|
});
|
|
11595
11588
|
}
|
|
11596
11589
|
|
|
11597
|
-
return
|
|
11590
|
+
return _react["default"].createElement("source", _extends({
|
|
11598
11591
|
key: index
|
|
11599
11592
|
}, source));
|
|
11600
11593
|
});
|
|
11601
11594
|
|
|
11602
11595
|
_defineProperty(_assertThisInitialized(_this), "renderTrack", function (track, index) {
|
|
11603
|
-
return
|
|
11596
|
+
return _react["default"].createElement("track", _extends({
|
|
11604
11597
|
key: index
|
|
11605
11598
|
}, track));
|
|
11606
11599
|
});
|
|
@@ -11638,10 +11631,6 @@ var FilePlayer = /*#__PURE__*/function (_Component) {
|
|
|
11638
11631
|
key: "componentWillUnmount",
|
|
11639
11632
|
value: function componentWillUnmount() {
|
|
11640
11633
|
this.removeListeners(this.player);
|
|
11641
|
-
|
|
11642
|
-
if (this.hls) {
|
|
11643
|
-
this.hls.destroy();
|
|
11644
|
-
}
|
|
11645
11634
|
}
|
|
11646
11635
|
}, {
|
|
11647
11636
|
key: "addListeners",
|
|
@@ -11772,6 +11761,10 @@ var FilePlayer = /*#__PURE__*/function (_Component) {
|
|
|
11772
11761
|
value: function stop() {
|
|
11773
11762
|
this.player.removeAttribute('src');
|
|
11774
11763
|
|
|
11764
|
+
if (this.hls) {
|
|
11765
|
+
this.hls.destroy();
|
|
11766
|
+
}
|
|
11767
|
+
|
|
11775
11768
|
if (this.dash) {
|
|
11776
11769
|
this.dash.reset();
|
|
11777
11770
|
}
|
|
@@ -11883,7 +11876,7 @@ var FilePlayer = /*#__PURE__*/function (_Component) {
|
|
|
11883
11876
|
width: width === 'auto' ? width : '100%',
|
|
11884
11877
|
height: height === 'auto' ? height : '100%'
|
|
11885
11878
|
};
|
|
11886
|
-
return
|
|
11879
|
+
return _react["default"].createElement(Element, _extends({
|
|
11887
11880
|
ref: this.ref,
|
|
11888
11881
|
src: this.getSource(url),
|
|
11889
11882
|
style: style,
|
|
@@ -11973,16 +11966,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
11973
11966
|
|
|
11974
11967
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
11975
11968
|
|
|
11976
|
-
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); }; }
|
|
11977
|
-
|
|
11978
11969
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
11979
11970
|
|
|
11980
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
11981
|
-
|
|
11982
|
-
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; } }
|
|
11983
|
-
|
|
11984
11971
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
11985
11972
|
|
|
11973
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
11974
|
+
|
|
11986
11975
|
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); }
|
|
11987
11976
|
|
|
11988
11977
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -11991,12 +11980,14 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
11991
11980
|
|
|
11992
11981
|
var ICON_SIZE = '64px';
|
|
11993
11982
|
|
|
11994
|
-
var Preview =
|
|
11983
|
+
var Preview =
|
|
11984
|
+
/*#__PURE__*/
|
|
11985
|
+
function (_Component) {
|
|
11995
11986
|
_inherits(Preview, _Component);
|
|
11996
11987
|
|
|
11997
|
-
var _super = _createSuper(Preview);
|
|
11998
|
-
|
|
11999
11988
|
function Preview() {
|
|
11989
|
+
var _getPrototypeOf2;
|
|
11990
|
+
|
|
12000
11991
|
var _this;
|
|
12001
11992
|
|
|
12002
11993
|
_classCallCheck(this, Preview);
|
|
@@ -12005,7 +11996,7 @@ var Preview = /*#__PURE__*/function (_Component) {
|
|
|
12005
11996
|
args[_key] = arguments[_key];
|
|
12006
11997
|
}
|
|
12007
11998
|
|
|
12008
|
-
_this =
|
|
11999
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Preview)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
12009
12000
|
|
|
12010
12001
|
_defineProperty(_assertThisInitialized(_this), "mounted", false);
|
|
12011
12002
|
|
|
@@ -12103,15 +12094,15 @@ var Preview = /*#__PURE__*/function (_Component) {
|
|
|
12103
12094
|
}
|
|
12104
12095
|
};
|
|
12105
12096
|
|
|
12106
|
-
var defaultPlayIcon =
|
|
12097
|
+
var defaultPlayIcon = _react["default"].createElement("div", {
|
|
12107
12098
|
style: styles.shadow,
|
|
12108
12099
|
className: "react-player__shadow"
|
|
12109
|
-
},
|
|
12100
|
+
}, _react["default"].createElement("div", {
|
|
12110
12101
|
style: styles.playIcon,
|
|
12111
12102
|
className: "react-player__play-icon"
|
|
12112
12103
|
}));
|
|
12113
12104
|
|
|
12114
|
-
return
|
|
12105
|
+
return _react["default"].createElement("div", {
|
|
12115
12106
|
style: styles.preview,
|
|
12116
12107
|
className: "react-player__preview",
|
|
12117
12108
|
onClick: onClick
|
|
@@ -12148,12 +12139,6 @@ var _Player = _interopRequireDefault(Player_1);
|
|
|
12148
12139
|
|
|
12149
12140
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
12150
12141
|
|
|
12151
|
-
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; } } }; }
|
|
12152
|
-
|
|
12153
|
-
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); }
|
|
12154
|
-
|
|
12155
|
-
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; }
|
|
12156
|
-
|
|
12157
12142
|
var PRELOAD_PLAYERS = [{
|
|
12158
12143
|
Player: YouTube_1.YouTube,
|
|
12159
12144
|
configKey: 'youtube',
|
|
@@ -12174,16 +12159,16 @@ var PRELOAD_PLAYERS = [{
|
|
|
12174
12159
|
|
|
12175
12160
|
function renderPreloadPlayers(url, controls, config) {
|
|
12176
12161
|
var players = [];
|
|
12177
|
-
|
|
12178
|
-
var
|
|
12179
|
-
|
|
12162
|
+
var _iteratorNormalCompletion = true;
|
|
12163
|
+
var _didIteratorError = false;
|
|
12164
|
+
var _iteratorError = undefined;
|
|
12180
12165
|
|
|
12181
12166
|
try {
|
|
12182
|
-
for (_iterator.
|
|
12167
|
+
for (var _iterator = PRELOAD_PLAYERS[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
12183
12168
|
var player = _step.value;
|
|
12184
12169
|
|
|
12185
12170
|
if (!player.Player.canPlay(url) && config[player.configKey].preload) {
|
|
12186
|
-
players.push(
|
|
12171
|
+
players.push(_react["default"].createElement(_Player["default"], {
|
|
12187
12172
|
key: player.Player.displayName,
|
|
12188
12173
|
activePlayer: player.Player,
|
|
12189
12174
|
url: player.url,
|
|
@@ -12195,9 +12180,18 @@ function renderPreloadPlayers(url, controls, config) {
|
|
|
12195
12180
|
}
|
|
12196
12181
|
}
|
|
12197
12182
|
} catch (err) {
|
|
12198
|
-
|
|
12183
|
+
_didIteratorError = true;
|
|
12184
|
+
_iteratorError = err;
|
|
12199
12185
|
} finally {
|
|
12200
|
-
|
|
12186
|
+
try {
|
|
12187
|
+
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
|
|
12188
|
+
_iterator["return"]();
|
|
12189
|
+
}
|
|
12190
|
+
} finally {
|
|
12191
|
+
if (_didIteratorError) {
|
|
12192
|
+
throw _iteratorError;
|
|
12193
|
+
}
|
|
12194
|
+
}
|
|
12201
12195
|
}
|
|
12202
12196
|
|
|
12203
12197
|
return players;
|
|
@@ -12321,17 +12315,13 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
12321
12315
|
|
|
12322
12316
|
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); }
|
|
12323
12317
|
|
|
12324
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) ||
|
|
12318
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
|
|
12325
12319
|
|
|
12326
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance
|
|
12320
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
|
|
12327
12321
|
|
|
12328
|
-
function
|
|
12322
|
+
function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
|
|
12329
12323
|
|
|
12330
|
-
function
|
|
12331
|
-
|
|
12332
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
12333
|
-
|
|
12334
|
-
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; }
|
|
12324
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }
|
|
12335
12325
|
|
|
12336
12326
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
12337
12327
|
|
|
@@ -12339,16 +12329,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
12339
12329
|
|
|
12340
12330
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
12341
12331
|
|
|
12342
|
-
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); }; }
|
|
12343
|
-
|
|
12344
12332
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
12345
12333
|
|
|
12346
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
12347
|
-
|
|
12348
|
-
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; } }
|
|
12349
|
-
|
|
12350
12334
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
12351
12335
|
|
|
12336
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
12337
|
+
|
|
12352
12338
|
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); }
|
|
12353
12339
|
|
|
12354
12340
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -12358,12 +12344,14 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
12358
12344
|
var SUPPORTED_PROPS = Object.keys(props.propTypes);
|
|
12359
12345
|
var customPlayers = [];
|
|
12360
12346
|
|
|
12361
|
-
var ReactPlayer =
|
|
12347
|
+
var ReactPlayer =
|
|
12348
|
+
/*#__PURE__*/
|
|
12349
|
+
function (_Component) {
|
|
12362
12350
|
_inherits(ReactPlayer, _Component);
|
|
12363
12351
|
|
|
12364
|
-
var _super = _createSuper(ReactPlayer);
|
|
12365
|
-
|
|
12366
12352
|
function ReactPlayer() {
|
|
12353
|
+
var _getPrototypeOf2;
|
|
12354
|
+
|
|
12367
12355
|
var _this;
|
|
12368
12356
|
|
|
12369
12357
|
_classCallCheck(this, ReactPlayer);
|
|
@@ -12372,7 +12360,7 @@ var ReactPlayer = /*#__PURE__*/function (_Component) {
|
|
|
12372
12360
|
args[_key] = arguments[_key];
|
|
12373
12361
|
}
|
|
12374
12362
|
|
|
12375
|
-
_this =
|
|
12363
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(ReactPlayer)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
12376
12364
|
|
|
12377
12365
|
_defineProperty(_assertThisInitialized(_this), "config", (0, utils.getConfig)(_this.props, props.defaultProps, true));
|
|
12378
12366
|
|
|
@@ -12483,7 +12471,7 @@ var ReactPlayer = /*#__PURE__*/function (_Component) {
|
|
|
12483
12471
|
key: "renderActivePlayer",
|
|
12484
12472
|
value: function renderActivePlayer(url, activePlayer) {
|
|
12485
12473
|
if (!url) return null;
|
|
12486
|
-
return
|
|
12474
|
+
return _react["default"].createElement(_Player4["default"], _extends({}, this.props, {
|
|
12487
12475
|
key: activePlayer.displayName,
|
|
12488
12476
|
ref: this.activePlayerRef,
|
|
12489
12477
|
config: this.config,
|
|
@@ -12520,14 +12508,14 @@ var ReactPlayer = /*#__PURE__*/function (_Component) {
|
|
|
12520
12508
|
var preloadPlayers = (0, _preload["default"])(url, controls, this.config);
|
|
12521
12509
|
var players = [renderedActivePlayer].concat(_toConsumableArray(preloadPlayers)).sort(this.sortPlayers);
|
|
12522
12510
|
|
|
12523
|
-
var preview =
|
|
12511
|
+
var preview = _react["default"].createElement(_Preview["default"], {
|
|
12524
12512
|
url: url,
|
|
12525
12513
|
light: light,
|
|
12526
12514
|
playIcon: playIcon,
|
|
12527
12515
|
onClick: this.handleClickPreview
|
|
12528
12516
|
});
|
|
12529
12517
|
|
|
12530
|
-
return
|
|
12518
|
+
return _react["default"].createElement(Wrapper, _extends({
|
|
12531
12519
|
ref: this.wrapperRef,
|
|
12532
12520
|
style: _objectSpread({}, style, {
|
|
12533
12521
|
width: width,
|
|
@@ -13845,16 +13833,16 @@ var RelatedTopicsDropdown = function RelatedTopicsDropdown(_ref) {
|
|
|
13845
13833
|
_ref$className = _ref.className,
|
|
13846
13834
|
className = _ref$className === undefined ? '' : _ref$className;
|
|
13847
13835
|
|
|
13848
|
-
/*
|
|
13849
|
-
Props accepted - parentTaxonomy(required, object), subTaxonomy(required, array), page(optional), exclude(optional), variant(optional), className(optional)
|
|
13850
|
-
example:
|
|
13851
|
-
<RelatedTopicDropdown
|
|
13852
|
-
page='/clinical'
|
|
13853
|
-
exclude="clinical"
|
|
13854
|
-
className='mb-3'
|
|
13855
|
-
parentTaxonomy={props.parentTaxonomy}
|
|
13856
|
-
subTaxonomies={props.subTaxonomies}
|
|
13857
|
-
/>
|
|
13836
|
+
/*
|
|
13837
|
+
Props accepted - parentTaxonomy(required, object), subTaxonomy(required, array), page(optional), exclude(optional), variant(optional), className(optional)
|
|
13838
|
+
example:
|
|
13839
|
+
<RelatedTopicDropdown
|
|
13840
|
+
page='/clinical'
|
|
13841
|
+
exclude="clinical"
|
|
13842
|
+
className='mb-3'
|
|
13843
|
+
parentTaxonomy={props.parentTaxonomy}
|
|
13844
|
+
subTaxonomies={props.subTaxonomies}
|
|
13845
|
+
/>
|
|
13858
13846
|
*/
|
|
13859
13847
|
if (subTaxonomies.length === 0 && parentTaxonomy) {
|
|
13860
13848
|
if (parentTaxonomy.identifier == exclude) {
|
|
@@ -13892,19 +13880,19 @@ var RelatedTopicsDropdown = function RelatedTopicsDropdown(_ref) {
|
|
|
13892
13880
|
}
|
|
13893
13881
|
};
|
|
13894
13882
|
|
|
13895
|
-
/*
|
|
13896
|
-
This dropdown is used inside Article body to display related content placement pages
|
|
13897
|
-
sample usage: <ArticleDetailDropdown contentPlacement={content_placement} exclude={['News',]} />
|
|
13898
|
-
|
|
13899
|
-
in article query, need to add '...' to content_placement to retreive additional info needed
|
|
13900
|
-
|
|
13901
|
-
'content_placement': taxonomyMapping[]-> {
|
|
13902
|
-
...,
|
|
13903
|
-
'ancestor': parent->parent->identifier,
|
|
13904
|
-
'parent': parent->identifier,
|
|
13905
|
-
'path': identifier
|
|
13906
|
-
}
|
|
13907
|
-
|
|
13883
|
+
/*
|
|
13884
|
+
This dropdown is used inside Article body to display related content placement pages
|
|
13885
|
+
sample usage: <ArticleDetailDropdown contentPlacement={content_placement} exclude={['News',]} />
|
|
13886
|
+
|
|
13887
|
+
in article query, need to add '...' to content_placement to retreive additional info needed
|
|
13888
|
+
|
|
13889
|
+
'content_placement': taxonomyMapping[]-> {
|
|
13890
|
+
...,
|
|
13891
|
+
'ancestor': parent->parent->identifier,
|
|
13892
|
+
'parent': parent->identifier,
|
|
13893
|
+
'path': identifier
|
|
13894
|
+
}
|
|
13895
|
+
|
|
13908
13896
|
*/
|
|
13909
13897
|
|
|
13910
13898
|
var ArticleDetailDropdown = function ArticleDetailDropdown(props) {
|
|
@@ -14737,34 +14725,34 @@ var GridHero = function GridHero(props) {
|
|
|
14737
14725
|
);
|
|
14738
14726
|
};
|
|
14739
14727
|
|
|
14740
|
-
/*
|
|
14741
|
-
Sample query
|
|
14742
|
-
let references = ''
|
|
14743
|
-
if(article.taxonomyMapping.length > 0){
|
|
14744
|
-
article.taxonomyMapping.forEach((ref, index) => {
|
|
14745
|
-
references = references + `references('${ref._ref}') `
|
|
14746
|
-
if(index+1 !== article.taxonomyMapping.length){
|
|
14747
|
-
references = references + ` && `
|
|
14748
|
-
}
|
|
14749
|
-
})
|
|
14750
|
-
}
|
|
14751
|
-
|
|
14752
|
-
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] {
|
|
14753
|
-
...,
|
|
14754
|
-
title,
|
|
14755
|
-
summary,
|
|
14756
|
-
thumbnail,
|
|
14757
|
-
url,
|
|
14758
|
-
published,
|
|
14759
|
-
authorMapping[]->,
|
|
14760
|
-
contentCategory->
|
|
14761
|
-
}`
|
|
14762
|
-
const relatedArticles = await client.fetch(relatedArticlesQuery)
|
|
14763
|
-
|
|
14764
|
-
Sample usage
|
|
14765
|
-
<RelatedContent dataRecord={props.relatedArticles} client={client} showAuthor showPublished reverse/>
|
|
14766
|
-
|
|
14767
|
-
|
|
14728
|
+
/*
|
|
14729
|
+
Sample query
|
|
14730
|
+
let references = ''
|
|
14731
|
+
if(article.taxonomyMapping.length > 0){
|
|
14732
|
+
article.taxonomyMapping.forEach((ref, index) => {
|
|
14733
|
+
references = references + `references('${ref._ref}') `
|
|
14734
|
+
if(index+1 !== article.taxonomyMapping.length){
|
|
14735
|
+
references = references + ` && `
|
|
14736
|
+
}
|
|
14737
|
+
})
|
|
14738
|
+
}
|
|
14739
|
+
|
|
14740
|
+
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] {
|
|
14741
|
+
...,
|
|
14742
|
+
title,
|
|
14743
|
+
summary,
|
|
14744
|
+
thumbnail,
|
|
14745
|
+
url,
|
|
14746
|
+
published,
|
|
14747
|
+
authorMapping[]->,
|
|
14748
|
+
contentCategory->
|
|
14749
|
+
}`
|
|
14750
|
+
const relatedArticles = await client.fetch(relatedArticlesQuery)
|
|
14751
|
+
|
|
14752
|
+
Sample usage
|
|
14753
|
+
<RelatedContent dataRecord={props.relatedArticles} client={client} showAuthor showPublished reverse/>
|
|
14754
|
+
|
|
14755
|
+
|
|
14768
14756
|
*/
|
|
14769
14757
|
var RelatedContent = function RelatedContent(props) {
|
|
14770
14758
|
var client = props.client,
|
|
@@ -14831,21 +14819,21 @@ var RelatedContent = function RelatedContent(props) {
|
|
|
14831
14819
|
);
|
|
14832
14820
|
};
|
|
14833
14821
|
|
|
14834
|
-
/*
|
|
14835
|
-
Example usage - targetedonc.com/latest-conference
|
|
14836
|
-
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] {
|
|
14837
|
-
...,
|
|
14838
|
-
title,
|
|
14839
|
-
summary,
|
|
14840
|
-
thumbnail,
|
|
14841
|
-
url,
|
|
14842
|
-
published,
|
|
14843
|
-
documentGroup->,
|
|
14844
|
-
contentCategory->,
|
|
14845
|
-
'pageNumber': ${currentPage}
|
|
14846
|
-
}`
|
|
14847
|
-
|
|
14848
|
-
const posts = await client.fetch(query, params)
|
|
14822
|
+
/*
|
|
14823
|
+
Example usage - targetedonc.com/latest-conference
|
|
14824
|
+
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] {
|
|
14825
|
+
...,
|
|
14826
|
+
title,
|
|
14827
|
+
summary,
|
|
14828
|
+
thumbnail,
|
|
14829
|
+
url,
|
|
14830
|
+
published,
|
|
14831
|
+
documentGroup->,
|
|
14832
|
+
contentCategory->,
|
|
14833
|
+
'pageNumber': ${currentPage}
|
|
14834
|
+
}`
|
|
14835
|
+
|
|
14836
|
+
const posts = await client.fetch(query, params)
|
|
14849
14837
|
*/
|
|
14850
14838
|
|
|
14851
14839
|
var ConferenceArticleCard = function ConferenceArticleCard(props) {
|