@mjhls/mjh-framework 1.0.238 → 1.0.239
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +174 -174
- package/dist/cjs/DeckContent.js +9 -9
- package/dist/cjs/DeckQueue.js +1 -1
- package/dist/cjs/{GridContent-53e78cbf.js → GridContent-21bc198f.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-91c6ad85.js → MasterDeck-f8fbac3c.js} +9 -9
- package/dist/cjs/MasterDeck.js +2 -2
- package/dist/cjs/{Normal-a94a1ec8.js → Normal-c89b709d.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 +515 -527
- package/dist/esm/DeckContent.js +9 -9
- package/dist/esm/DeckQueue.js +1 -1
- package/dist/esm/{GridContent-f5bc4d75.js → GridContent-73c97039.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-5dd97a66.js → MasterDeck-238f31d7.js} +9 -9
- package/dist/esm/MasterDeck.js +2 -2
- package/dist/esm/{Normal-357f00d1.js → Normal-fdd55386.js} +31 -31
- package/dist/esm/PublicationDeck.js +1 -1
- package/dist/esm/QueueDeckExpanded.js +1 -1
- package/dist/esm/{TaxonomyCard-f74512cb.js → TaxonomyCard-a7b7ded8.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 +519 -531
- package/package.json +101 -101
package/dist/cjs/index.js
CHANGED
|
@@ -25,7 +25,7 @@ var Router = require('next/router');
|
|
|
25
25
|
var Router__default = _interopDefault(Router);
|
|
26
26
|
var debounce = require('./debounce-bbca43c4.js');
|
|
27
27
|
require('react-dom');
|
|
28
|
-
var index$1 = require('./index-
|
|
28
|
+
var index$1 = require('./index-be0c82be.js');
|
|
29
29
|
require('./index-fa0fb52c.js');
|
|
30
30
|
var main = require('./main-d9a1b014.js');
|
|
31
31
|
var entities = require('./entities-310b46ee.js');
|
|
@@ -33,25 +33,25 @@ var slicedToArray = require('./slicedToArray-e38fb29d.js');
|
|
|
33
33
|
var AdSlot = require('./AdSlot-1fe1c231.js');
|
|
34
34
|
var DeckContent = require('./DeckContent.js');
|
|
35
35
|
require('./get-af2516a4.js');
|
|
36
|
-
var GridContent = require('./GridContent-
|
|
36
|
+
var GridContent = require('./GridContent-21bc198f.js');
|
|
37
37
|
var DeckQueue = require('./DeckQueue.js');
|
|
38
38
|
require('react-bootstrap/Media');
|
|
39
39
|
var ThumbnailCard = require('./ThumbnailCard.js');
|
|
40
|
-
var TaxonomyCard = require('./TaxonomyCard-
|
|
40
|
+
var TaxonomyCard = require('./TaxonomyCard-e3566492.js');
|
|
41
41
|
var GroupDeck = require('./GroupDeck.js');
|
|
42
|
-
var YoutubeGroup = require('./YoutubeGroup-
|
|
42
|
+
var YoutubeGroup = require('./YoutubeGroup-5f480446.js');
|
|
43
43
|
var reactBootstrap = require('react-bootstrap');
|
|
44
44
|
var QueueDeckExpanded = require('./QueueDeckExpanded.js');
|
|
45
45
|
var index_esm = require('./index.esm-340d3792.js');
|
|
46
46
|
var VideoSeriesListing = require('./VideoSeriesListing.js');
|
|
47
|
-
var MasterDeck = require('./MasterDeck-
|
|
47
|
+
var MasterDeck = require('./MasterDeck-f8fbac3c.js');
|
|
48
48
|
var Button = _interopDefault(require('react-bootstrap/Button'));
|
|
49
49
|
var PublicationDeck = require('./PublicationDeck.js');
|
|
50
50
|
var IssueDeck = require('./IssueDeck.js');
|
|
51
51
|
require('react-bootstrap/Badge');
|
|
52
52
|
var IssueContentDeck = require('./IssueContentDeck.js');
|
|
53
53
|
var Spinner = _interopDefault(require('react-bootstrap/Spinner'));
|
|
54
|
-
var TemplateNormal = require('./Normal-
|
|
54
|
+
var TemplateNormal = require('./Normal-c89b709d.js');
|
|
55
55
|
require('react-bootstrap/ListGroup');
|
|
56
56
|
var Head = _interopDefault(require('next/head'));
|
|
57
57
|
var Accordion = _interopDefault(require('react-bootstrap/Accordion'));
|
|
@@ -3736,18 +3736,21 @@ var Slideshow = function Slideshow(_ref) {
|
|
|
3736
3736
|
);
|
|
3737
3737
|
};
|
|
3738
3738
|
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3739
|
+
var isArray = Array.isArray;
|
|
3740
|
+
var keyList = Object.keys;
|
|
3741
|
+
var hasProp = Object.prototype.hasOwnProperty;
|
|
3742
3742
|
|
|
3743
3743
|
var fastDeepEqual = function equal(a, b) {
|
|
3744
3744
|
if (a === b) return true;
|
|
3745
3745
|
|
|
3746
3746
|
if (a && b && typeof a == 'object' && typeof b == 'object') {
|
|
3747
|
-
|
|
3747
|
+
var arrA = isArray(a)
|
|
3748
|
+
, arrB = isArray(b)
|
|
3749
|
+
, i
|
|
3750
|
+
, length
|
|
3751
|
+
, key;
|
|
3748
3752
|
|
|
3749
|
-
|
|
3750
|
-
if (Array.isArray(a)) {
|
|
3753
|
+
if (arrA && arrB) {
|
|
3751
3754
|
length = a.length;
|
|
3752
3755
|
if (length != b.length) return false;
|
|
3753
3756
|
for (i = length; i-- !== 0;)
|
|
@@ -3755,29 +3758,35 @@ var fastDeepEqual = function equal(a, b) {
|
|
|
3755
3758
|
return true;
|
|
3756
3759
|
}
|
|
3757
3760
|
|
|
3761
|
+
if (arrA != arrB) return false;
|
|
3758
3762
|
|
|
3763
|
+
var dateA = a instanceof Date
|
|
3764
|
+
, dateB = b instanceof Date;
|
|
3765
|
+
if (dateA != dateB) return false;
|
|
3766
|
+
if (dateA && dateB) return a.getTime() == b.getTime();
|
|
3759
3767
|
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
if (
|
|
3768
|
+
var regexpA = a instanceof RegExp
|
|
3769
|
+
, regexpB = b instanceof RegExp;
|
|
3770
|
+
if (regexpA != regexpB) return false;
|
|
3771
|
+
if (regexpA && regexpB) return a.toString() == b.toString();
|
|
3763
3772
|
|
|
3764
|
-
keys =
|
|
3773
|
+
var keys = keyList(a);
|
|
3765
3774
|
length = keys.length;
|
|
3766
|
-
|
|
3775
|
+
|
|
3776
|
+
if (length !== keyList(b).length)
|
|
3777
|
+
return false;
|
|
3767
3778
|
|
|
3768
3779
|
for (i = length; i-- !== 0;)
|
|
3769
|
-
if (!
|
|
3780
|
+
if (!hasProp.call(b, keys[i])) return false;
|
|
3770
3781
|
|
|
3771
3782
|
for (i = length; i-- !== 0;) {
|
|
3772
|
-
|
|
3773
|
-
|
|
3783
|
+
key = keys[i];
|
|
3774
3784
|
if (!equal(a[key], b[key])) return false;
|
|
3775
3785
|
}
|
|
3776
3786
|
|
|
3777
3787
|
return true;
|
|
3778
3788
|
}
|
|
3779
3789
|
|
|
3780
|
-
// true if both NaN, false otherwise
|
|
3781
3790
|
return a!==a && b!==b;
|
|
3782
3791
|
};
|
|
3783
3792
|
|
|
@@ -4800,7 +4809,7 @@ function formatValue(ctx, value, recurseTimes) {
|
|
|
4800
4809
|
var base = '', array = false, braces = ['{', '}'];
|
|
4801
4810
|
|
|
4802
4811
|
// Make Array say that they are Array
|
|
4803
|
-
if (isArray(value)) {
|
|
4812
|
+
if (isArray$1(value)) {
|
|
4804
4813
|
array = true;
|
|
4805
4814
|
braces = ['[', ']'];
|
|
4806
4815
|
}
|
|
@@ -4979,7 +4988,7 @@ function reduceToSingleString(output, base, braces) {
|
|
|
4979
4988
|
|
|
4980
4989
|
// NOTE: These type checking functions intentionally don't use `instanceof`
|
|
4981
4990
|
// because it is fragile and can be easily faked with `Object.create()`.
|
|
4982
|
-
function isArray(ar) {
|
|
4991
|
+
function isArray$1(ar) {
|
|
4983
4992
|
return Array.isArray(ar);
|
|
4984
4993
|
}
|
|
4985
4994
|
|
|
@@ -5106,7 +5115,7 @@ var util = {
|
|
|
5106
5115
|
isNullOrUndefined: isNullOrUndefined,
|
|
5107
5116
|
isNull: isNull,
|
|
5108
5117
|
isBoolean: isBoolean,
|
|
5109
|
-
isArray: isArray,
|
|
5118
|
+
isArray: isArray$1,
|
|
5110
5119
|
inspect: inspect,
|
|
5111
5120
|
deprecate: deprecate,
|
|
5112
5121
|
format: format,
|
|
@@ -5773,235 +5782,199 @@ module.exports = exports['default'];
|
|
|
5773
5782
|
|
|
5774
5783
|
var youTubePlayer = _commonjsHelpers.unwrapExports(dist);
|
|
5775
5784
|
|
|
5776
|
-
function
|
|
5785
|
+
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; }; }();
|
|
5777
5786
|
|
|
5778
|
-
function
|
|
5787
|
+
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; };
|
|
5779
5788
|
|
|
5780
|
-
function
|
|
5781
|
-
|
|
5782
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
5783
|
-
|
|
5784
|
-
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); }; }
|
|
5785
|
-
|
|
5786
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
5787
|
-
|
|
5788
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
5789
|
-
|
|
5790
|
-
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; } }
|
|
5791
|
-
|
|
5792
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
5793
|
-
|
|
5794
|
-
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); }
|
|
5795
|
-
|
|
5796
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
5789
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5797
5790
|
|
|
5798
|
-
function
|
|
5791
|
+
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; }
|
|
5799
5792
|
|
|
5800
|
-
function
|
|
5793
|
+
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; }
|
|
5801
5794
|
|
|
5802
|
-
|
|
5803
|
-
|
|
5804
|
-
*
|
|
5805
|
-
*
|
|
5806
|
-
* @param {Object}
|
|
5807
|
-
* @param {Object} props
|
|
5795
|
+
/**
|
|
5796
|
+
* Check whether a `props` change should result in the video being updated.
|
|
5797
|
+
*
|
|
5798
|
+
* @param {Object} prevProps
|
|
5799
|
+
* @param {Object} props
|
|
5808
5800
|
*/
|
|
5809
|
-
|
|
5810
5801
|
function shouldUpdateVideo(prevProps, props) {
|
|
5811
5802
|
// A changing video should always trigger an update
|
|
5812
5803
|
if (prevProps.videoId !== props.videoId) {
|
|
5813
5804
|
return true;
|
|
5814
|
-
}
|
|
5815
|
-
// update.
|
|
5816
|
-
|
|
5805
|
+
}
|
|
5817
5806
|
|
|
5807
|
+
// Otherwise, a change in the start/end time playerVars also requires a player
|
|
5808
|
+
// update.
|
|
5818
5809
|
var prevVars = prevProps.opts.playerVars || {};
|
|
5819
5810
|
var vars = props.opts.playerVars || {};
|
|
5811
|
+
|
|
5820
5812
|
return prevVars.start !== vars.start || prevVars.end !== vars.end;
|
|
5821
5813
|
}
|
|
5822
|
-
/**
|
|
5823
|
-
* Neutralize API options that only require a video update, leaving only options
|
|
5824
|
-
* that require a player reset. The results can then be compared to see if a
|
|
5825
|
-
* player reset is necessary.
|
|
5826
|
-
*
|
|
5827
|
-
* @param {Object} opts
|
|
5828
|
-
*/
|
|
5829
|
-
|
|
5830
5814
|
|
|
5815
|
+
/**
|
|
5816
|
+
* Neutralise API options that only require a video update, leaving only options
|
|
5817
|
+
* that require a player reset. The results can then be compared to see if a
|
|
5818
|
+
* player reset is necessary.
|
|
5819
|
+
*
|
|
5820
|
+
* @param {Object} opts
|
|
5821
|
+
*/
|
|
5831
5822
|
function filterResetOptions(opts) {
|
|
5832
|
-
return
|
|
5833
|
-
playerVars:
|
|
5823
|
+
return _extends({}, opts, {
|
|
5824
|
+
playerVars: _extends({}, opts.playerVars, {
|
|
5834
5825
|
autoplay: 0,
|
|
5835
5826
|
start: 0,
|
|
5836
5827
|
end: 0
|
|
5837
5828
|
})
|
|
5838
5829
|
});
|
|
5839
5830
|
}
|
|
5840
|
-
/**
|
|
5841
|
-
* Check whether a `props` change should result in the player being reset.
|
|
5842
|
-
* The player is reset when the `props.opts` change, except if the only change
|
|
5843
|
-
* is in the `start` and `end` playerVars, because a video update can deal with
|
|
5844
|
-
* those.
|
|
5845
|
-
*
|
|
5846
|
-
* @param {Object} prevProps
|
|
5847
|
-
* @param {Object} props
|
|
5848
|
-
*/
|
|
5849
|
-
|
|
5850
5831
|
|
|
5832
|
+
/**
|
|
5833
|
+
* Check whether a `props` change should result in the player being reset.
|
|
5834
|
+
* The player is reset when the `props.opts` change, except if the only change
|
|
5835
|
+
* is in the `start` and `end` playerVars, because a video update can deal with
|
|
5836
|
+
* those.
|
|
5837
|
+
*
|
|
5838
|
+
* @param {Object} prevProps
|
|
5839
|
+
* @param {Object} props
|
|
5840
|
+
*/
|
|
5851
5841
|
function shouldResetPlayer(prevProps, props) {
|
|
5852
5842
|
return !fastDeepEqual(filterResetOptions(prevProps.opts), filterResetOptions(props.opts));
|
|
5853
5843
|
}
|
|
5854
|
-
/**
|
|
5855
|
-
* Check whether a props change should result in an id or className update.
|
|
5856
|
-
*
|
|
5857
|
-
* @param {Object} prevProps
|
|
5858
|
-
* @param {Object} props
|
|
5859
|
-
*/
|
|
5860
|
-
|
|
5861
5844
|
|
|
5845
|
+
/**
|
|
5846
|
+
* Check whether a props change should result in an id or className update.
|
|
5847
|
+
*
|
|
5848
|
+
* @param {Object} prevProps
|
|
5849
|
+
* @param {Object} props
|
|
5850
|
+
*/
|
|
5862
5851
|
function shouldUpdatePlayer(prevProps, props) {
|
|
5863
5852
|
return prevProps.id !== props.id || prevProps.className !== props.className;
|
|
5864
5853
|
}
|
|
5865
5854
|
|
|
5866
|
-
var YouTube =
|
|
5855
|
+
var YouTube = function (_React$Component) {
|
|
5867
5856
|
_inherits(YouTube, _React$Component);
|
|
5868
5857
|
|
|
5869
|
-
var _super = _createSuper(YouTube);
|
|
5870
|
-
|
|
5871
|
-
/**
|
|
5872
|
-
* Expose PlayerState constants for convenience. These constants can also be
|
|
5873
|
-
* accessed through the global YT object after the YouTube IFrame API is instantiated.
|
|
5874
|
-
* https://developers.google.com/youtube/iframe_api_reference#onStateChange
|
|
5875
|
-
*/
|
|
5876
5858
|
function YouTube(props) {
|
|
5877
|
-
var _this;
|
|
5878
|
-
|
|
5879
5859
|
_classCallCheck(this, YouTube);
|
|
5880
5860
|
|
|
5881
|
-
_this =
|
|
5861
|
+
var _this = _possibleConstructorReturn(this, (YouTube.__proto__ || Object.getPrototypeOf(YouTube)).call(this, props));
|
|
5882
5862
|
|
|
5883
|
-
|
|
5863
|
+
_this.onPlayerReady = function (event) {
|
|
5884
5864
|
return _this.props.onReady(event);
|
|
5885
|
-
}
|
|
5865
|
+
};
|
|
5886
5866
|
|
|
5887
|
-
|
|
5867
|
+
_this.onPlayerError = function (event) {
|
|
5888
5868
|
return _this.props.onError(event);
|
|
5889
|
-
}
|
|
5869
|
+
};
|
|
5890
5870
|
|
|
5891
|
-
|
|
5871
|
+
_this.onPlayerStateChange = function (event) {
|
|
5892
5872
|
_this.props.onStateChange(event);
|
|
5893
|
-
|
|
5894
5873
|
switch (event.data) {
|
|
5874
|
+
|
|
5895
5875
|
case YouTube.PlayerState.ENDED:
|
|
5896
5876
|
_this.props.onEnd(event);
|
|
5897
|
-
|
|
5898
5877
|
break;
|
|
5899
5878
|
|
|
5900
5879
|
case YouTube.PlayerState.PLAYING:
|
|
5901
5880
|
_this.props.onPlay(event);
|
|
5902
|
-
|
|
5903
5881
|
break;
|
|
5904
5882
|
|
|
5905
5883
|
case YouTube.PlayerState.PAUSED:
|
|
5906
5884
|
_this.props.onPause(event);
|
|
5907
|
-
|
|
5908
5885
|
break;
|
|
5909
5886
|
}
|
|
5910
|
-
}
|
|
5887
|
+
};
|
|
5911
5888
|
|
|
5912
|
-
|
|
5889
|
+
_this.onPlayerPlaybackRateChange = function (event) {
|
|
5913
5890
|
return _this.props.onPlaybackRateChange(event);
|
|
5914
|
-
}
|
|
5891
|
+
};
|
|
5915
5892
|
|
|
5916
|
-
|
|
5893
|
+
_this.onPlayerPlaybackQualityChange = function (event) {
|
|
5917
5894
|
return _this.props.onPlaybackQualityChange(event);
|
|
5918
|
-
}
|
|
5895
|
+
};
|
|
5919
5896
|
|
|
5920
|
-
|
|
5897
|
+
_this.createPlayer = function () {
|
|
5921
5898
|
// do not attempt to create a player server-side, it won't work
|
|
5922
|
-
if (typeof document === 'undefined') return;
|
|
5923
|
-
|
|
5924
|
-
var playerOpts =
|
|
5899
|
+
if (typeof document === 'undefined') return;
|
|
5900
|
+
// create player
|
|
5901
|
+
var playerOpts = _extends({}, _this.props.opts, {
|
|
5925
5902
|
// preload the `videoId` video if one is already given
|
|
5926
5903
|
videoId: _this.props.videoId
|
|
5927
5904
|
});
|
|
5928
|
-
|
|
5929
|
-
|
|
5930
|
-
|
|
5905
|
+
_this.internalPlayer = youTubePlayer(_this.container, playerOpts);
|
|
5906
|
+
// attach event handlers
|
|
5931
5907
|
_this.internalPlayer.on('ready', _this.onPlayerReady);
|
|
5932
|
-
|
|
5933
5908
|
_this.internalPlayer.on('error', _this.onPlayerError);
|
|
5934
|
-
|
|
5935
5909
|
_this.internalPlayer.on('stateChange', _this.onPlayerStateChange);
|
|
5936
|
-
|
|
5937
5910
|
_this.internalPlayer.on('playbackRateChange', _this.onPlayerPlaybackRateChange);
|
|
5938
|
-
|
|
5939
5911
|
_this.internalPlayer.on('playbackQualityChange', _this.onPlayerPlaybackQualityChange);
|
|
5940
|
-
}
|
|
5912
|
+
};
|
|
5941
5913
|
|
|
5942
|
-
|
|
5914
|
+
_this.resetPlayer = function () {
|
|
5943
5915
|
return _this.internalPlayer.destroy().then(_this.createPlayer);
|
|
5944
|
-
}
|
|
5916
|
+
};
|
|
5945
5917
|
|
|
5946
|
-
|
|
5918
|
+
_this.updatePlayer = function () {
|
|
5947
5919
|
_this.internalPlayer.getIframe().then(function (iframe) {
|
|
5948
5920
|
if (_this.props.id) iframe.setAttribute('id', _this.props.id);else iframe.removeAttribute('id');
|
|
5949
5921
|
if (_this.props.className) iframe.setAttribute('class', _this.props.className);else iframe.removeAttribute('class');
|
|
5950
5922
|
});
|
|
5951
|
-
}
|
|
5923
|
+
};
|
|
5952
5924
|
|
|
5953
|
-
|
|
5925
|
+
_this.updateVideo = function () {
|
|
5954
5926
|
if (typeof _this.props.videoId === 'undefined' || _this.props.videoId === null) {
|
|
5955
5927
|
_this.internalPlayer.stopVideo();
|
|
5956
|
-
|
|
5957
5928
|
return;
|
|
5958
|
-
}
|
|
5959
|
-
|
|
5929
|
+
}
|
|
5960
5930
|
|
|
5931
|
+
// set queueing options
|
|
5961
5932
|
var autoplay = false;
|
|
5962
5933
|
var opts = {
|
|
5963
5934
|
videoId: _this.props.videoId
|
|
5964
5935
|
};
|
|
5965
|
-
|
|
5966
5936
|
if ('playerVars' in _this.props.opts) {
|
|
5967
5937
|
autoplay = _this.props.opts.playerVars.autoplay === 1;
|
|
5968
|
-
|
|
5969
5938
|
if ('start' in _this.props.opts.playerVars) {
|
|
5970
5939
|
opts.startSeconds = _this.props.opts.playerVars.start;
|
|
5971
5940
|
}
|
|
5972
|
-
|
|
5973
5941
|
if ('end' in _this.props.opts.playerVars) {
|
|
5974
5942
|
opts.endSeconds = _this.props.opts.playerVars.end;
|
|
5975
5943
|
}
|
|
5976
|
-
}
|
|
5977
|
-
|
|
5944
|
+
}
|
|
5978
5945
|
|
|
5946
|
+
// if autoplay is enabled loadVideoById
|
|
5979
5947
|
if (autoplay) {
|
|
5980
5948
|
_this.internalPlayer.loadVideoById(opts);
|
|
5981
|
-
|
|
5982
5949
|
return;
|
|
5983
|
-
}
|
|
5984
|
-
|
|
5985
|
-
|
|
5950
|
+
}
|
|
5951
|
+
// default behaviour just cues the video
|
|
5986
5952
|
_this.internalPlayer.cueVideoById(opts);
|
|
5987
|
-
}
|
|
5953
|
+
};
|
|
5988
5954
|
|
|
5989
|
-
|
|
5955
|
+
_this.refContainer = function (container) {
|
|
5990
5956
|
_this.container = container;
|
|
5991
|
-
}
|
|
5957
|
+
};
|
|
5992
5958
|
|
|
5993
5959
|
_this.container = null;
|
|
5994
5960
|
_this.internalPlayer = null;
|
|
5995
5961
|
return _this;
|
|
5996
5962
|
}
|
|
5997
5963
|
|
|
5964
|
+
/**
|
|
5965
|
+
* Expose PlayerState constants for convenience. These constants can also be
|
|
5966
|
+
* accessed through the global YT object after the YouTube IFrame API is instantiated.
|
|
5967
|
+
* https://developers.google.com/youtube/iframe_api_reference#onStateChange
|
|
5968
|
+
*/
|
|
5969
|
+
|
|
5970
|
+
|
|
5998
5971
|
_createClass(YouTube, [{
|
|
5999
|
-
key:
|
|
5972
|
+
key: 'componentDidMount',
|
|
6000
5973
|
value: function componentDidMount() {
|
|
6001
5974
|
this.createPlayer();
|
|
6002
5975
|
}
|
|
6003
5976
|
}, {
|
|
6004
|
-
key:
|
|
5977
|
+
key: 'componentDidUpdate',
|
|
6005
5978
|
value: function componentDidUpdate(prevProps) {
|
|
6006
5979
|
if (shouldUpdatePlayer(prevProps, this.props)) {
|
|
6007
5980
|
this.updatePlayer();
|
|
@@ -6016,58 +5989,112 @@ var YouTube = /*#__PURE__*/function (_React$Component) {
|
|
|
6016
5989
|
}
|
|
6017
5990
|
}
|
|
6018
5991
|
}, {
|
|
6019
|
-
key:
|
|
5992
|
+
key: 'componentWillUnmount',
|
|
6020
5993
|
value: function componentWillUnmount() {
|
|
6021
|
-
/**
|
|
6022
|
-
* Note: The `youtube-player` package that is used promisifies all
|
|
6023
|
-
* Player API calls, which introduces a delay of a tick before it actually
|
|
6024
|
-
* gets destroyed. Since React attempts to remove the element instantly
|
|
6025
|
-
* this method isn't quick enough to reset the container element.
|
|
5994
|
+
/**
|
|
5995
|
+
* Note: The `youtube-player` package that is used promisifies all Youtube
|
|
5996
|
+
* Player API calls, which introduces a delay of a tick before it actually
|
|
5997
|
+
* gets destroyed. Since React attempts to remove the element instantly
|
|
5998
|
+
* this method isn't quick enough to reset the container element.
|
|
6026
5999
|
*/
|
|
6027
6000
|
this.internalPlayer.destroy();
|
|
6028
6001
|
}
|
|
6029
|
-
|
|
6030
|
-
|
|
6031
|
-
*
|
|
6032
|
-
*
|
|
6033
|
-
*
|
|
6002
|
+
|
|
6003
|
+
/**
|
|
6004
|
+
* https://developers.google.com/youtube/iframe_api_reference#onReady
|
|
6005
|
+
*
|
|
6006
|
+
* @param {Object} event
|
|
6007
|
+
* @param {Object} target - player object
|
|
6008
|
+
*/
|
|
6009
|
+
|
|
6010
|
+
|
|
6011
|
+
/**
|
|
6012
|
+
* https://developers.google.com/youtube/iframe_api_reference#onError
|
|
6013
|
+
*
|
|
6014
|
+
* @param {Object} event
|
|
6015
|
+
* @param {Integer} data - error type
|
|
6016
|
+
* @param {Object} target - player object
|
|
6017
|
+
*/
|
|
6018
|
+
|
|
6019
|
+
|
|
6020
|
+
/**
|
|
6021
|
+
* https://developers.google.com/youtube/iframe_api_reference#onStateChange
|
|
6022
|
+
*
|
|
6023
|
+
* @param {Object} event
|
|
6024
|
+
* @param {Integer} data - status change type
|
|
6025
|
+
* @param {Object} target - actual YT player
|
|
6026
|
+
*/
|
|
6027
|
+
|
|
6028
|
+
|
|
6029
|
+
/**
|
|
6030
|
+
* https://developers.google.com/youtube/iframe_api_reference#onPlaybackRateChange
|
|
6031
|
+
*
|
|
6032
|
+
* @param {Object} event
|
|
6033
|
+
* @param {Float} data - playback rate
|
|
6034
|
+
* @param {Object} target - actual YT player
|
|
6035
|
+
*/
|
|
6036
|
+
|
|
6037
|
+
|
|
6038
|
+
/**
|
|
6039
|
+
* https://developers.google.com/youtube/iframe_api_reference#onPlaybackQualityChange
|
|
6040
|
+
*
|
|
6041
|
+
* @param {Object} event
|
|
6042
|
+
* @param {String} data - playback quality
|
|
6043
|
+
* @param {Object} target - actual YT player
|
|
6044
|
+
*/
|
|
6045
|
+
|
|
6046
|
+
|
|
6047
|
+
/**
|
|
6048
|
+
* Initialize the Youtube Player API on the container and attach event handlers
|
|
6049
|
+
*/
|
|
6050
|
+
|
|
6051
|
+
|
|
6052
|
+
/**
|
|
6053
|
+
* Shorthand for destroying and then re-creating the Youtube Player
|
|
6054
|
+
*/
|
|
6055
|
+
|
|
6056
|
+
|
|
6057
|
+
/**
|
|
6058
|
+
* Method to update the id and class of the Youtube Player iframe.
|
|
6059
|
+
* React should update this automatically but since the Youtube Player API
|
|
6060
|
+
* replaced the DIV that is mounted by React we need to do this manually.
|
|
6061
|
+
*/
|
|
6062
|
+
|
|
6063
|
+
|
|
6064
|
+
/**
|
|
6065
|
+
* Call Youtube Player API methods to update the currently playing video.
|
|
6066
|
+
* Depeding on the `opts.playerVars.autoplay` this function uses one of two
|
|
6067
|
+
* Youtube Player API methods to update the video.
|
|
6034
6068
|
*/
|
|
6035
6069
|
|
|
6036
6070
|
}, {
|
|
6037
|
-
key:
|
|
6071
|
+
key: 'render',
|
|
6038
6072
|
value: function render() {
|
|
6039
|
-
return
|
|
6040
|
-
|
|
6041
|
-
|
|
6042
|
-
id: this.props.id,
|
|
6043
|
-
|
|
6044
|
-
ref: this.refContainer
|
|
6045
|
-
}));
|
|
6073
|
+
return React__default.createElement(
|
|
6074
|
+
'div',
|
|
6075
|
+
{ className: this.props.containerClassName },
|
|
6076
|
+
React__default.createElement('div', { id: this.props.id, className: this.props.className, ref: this.refContainer })
|
|
6077
|
+
);
|
|
6046
6078
|
}
|
|
6047
6079
|
}]);
|
|
6048
6080
|
|
|
6049
6081
|
return YouTube;
|
|
6050
6082
|
}(React__default.Component);
|
|
6051
6083
|
|
|
6052
|
-
_defineProperty(YouTube, "PlayerState", {
|
|
6053
|
-
UNSTARTED: -1,
|
|
6054
|
-
ENDED: 0,
|
|
6055
|
-
PLAYING: 1,
|
|
6056
|
-
PAUSED: 2,
|
|
6057
|
-
BUFFERING: 3,
|
|
6058
|
-
CUED: 5
|
|
6059
|
-
});
|
|
6060
|
-
|
|
6061
6084
|
YouTube.propTypes = {
|
|
6062
6085
|
videoId: PropTypes.string,
|
|
6086
|
+
|
|
6063
6087
|
// custom ID for player element
|
|
6064
6088
|
id: PropTypes.string,
|
|
6089
|
+
|
|
6065
6090
|
// custom class name for player element
|
|
6066
6091
|
className: PropTypes.string,
|
|
6067
6092
|
// custom class name for player container element
|
|
6068
6093
|
containerClassName: PropTypes.string,
|
|
6094
|
+
|
|
6069
6095
|
// https://developers.google.com/youtube/iframe_api_reference#Loading_a_Video_Player
|
|
6070
6096
|
opts: PropTypes.objectOf(PropTypes.any),
|
|
6097
|
+
|
|
6071
6098
|
// event subscriptions
|
|
6072
6099
|
onReady: PropTypes.func,
|
|
6073
6100
|
onError: PropTypes.func,
|
|
@@ -6079,7 +6106,6 @@ YouTube.propTypes = {
|
|
|
6079
6106
|
onPlaybackQualityChange: PropTypes.func
|
|
6080
6107
|
};
|
|
6081
6108
|
YouTube.defaultProps = {
|
|
6082
|
-
videoId: null,
|
|
6083
6109
|
id: null,
|
|
6084
6110
|
className: null,
|
|
6085
6111
|
opts: {},
|
|
@@ -6093,6 +6119,14 @@ YouTube.defaultProps = {
|
|
|
6093
6119
|
onPlaybackRateChange: function onPlaybackRateChange() {},
|
|
6094
6120
|
onPlaybackQualityChange: function onPlaybackQualityChange() {}
|
|
6095
6121
|
};
|
|
6122
|
+
YouTube.PlayerState = {
|
|
6123
|
+
UNSTARTED: -1,
|
|
6124
|
+
ENDED: 0,
|
|
6125
|
+
PLAYING: 1,
|
|
6126
|
+
PAUSED: 2,
|
|
6127
|
+
BUFFERING: 3,
|
|
6128
|
+
CUED: 5
|
|
6129
|
+
};
|
|
6096
6130
|
|
|
6097
6131
|
var YouTubePlayer = function YouTubePlayer(_ref) {
|
|
6098
6132
|
var url = _ref.url;
|
|
@@ -7035,8 +7069,8 @@ var window_1 = win;
|
|
|
7035
7069
|
|
|
7036
7070
|
/*! @name @brightcove/react-player-loader @version 1.4.0 @license Apache-2.0 */
|
|
7037
7071
|
|
|
7038
|
-
function _extends() {
|
|
7039
|
-
_extends = Object.assign || function (target) {
|
|
7072
|
+
function _extends$1() {
|
|
7073
|
+
_extends$1 = Object.assign || function (target) {
|
|
7040
7074
|
for (var i = 1; i < arguments.length; i++) {
|
|
7041
7075
|
var source = arguments[i];
|
|
7042
7076
|
|
|
@@ -7050,7 +7084,7 @@ function _extends() {
|
|
|
7050
7084
|
return target;
|
|
7051
7085
|
};
|
|
7052
7086
|
|
|
7053
|
-
return _extends.apply(this, arguments);
|
|
7087
|
+
return _extends$1.apply(this, arguments);
|
|
7054
7088
|
}
|
|
7055
7089
|
|
|
7056
7090
|
function _inheritsLoose(subClass, superClass) {
|
|
@@ -7059,7 +7093,7 @@ function _inheritsLoose(subClass, superClass) {
|
|
|
7059
7093
|
subClass.__proto__ = superClass;
|
|
7060
7094
|
}
|
|
7061
7095
|
|
|
7062
|
-
function _assertThisInitialized
|
|
7096
|
+
function _assertThisInitialized(self) {
|
|
7063
7097
|
if (self === void 0) {
|
|
7064
7098
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
7065
7099
|
}
|
|
@@ -7069,8 +7103,8 @@ function _assertThisInitialized$1(self) {
|
|
|
7069
7103
|
|
|
7070
7104
|
/*! @name @brightcove/player-loader @version 1.7.1 @license Apache-2.0 */
|
|
7071
7105
|
|
|
7072
|
-
function _extends$1() {
|
|
7073
|
-
_extends$1 = Object.assign || function (target) {
|
|
7106
|
+
function _extends$1$1() {
|
|
7107
|
+
_extends$1$1 = Object.assign || function (target) {
|
|
7074
7108
|
for (var i = 1; i < arguments.length; i++) {
|
|
7075
7109
|
var source = arguments[i];
|
|
7076
7110
|
|
|
@@ -7084,7 +7118,7 @@ function _extends$1() {
|
|
|
7084
7118
|
return target;
|
|
7085
7119
|
};
|
|
7086
7120
|
|
|
7087
|
-
return _extends$1.apply(this, arguments);
|
|
7121
|
+
return _extends$1$1.apply(this, arguments);
|
|
7088
7122
|
}
|
|
7089
7123
|
|
|
7090
7124
|
var version$1 = "1.7.1";
|
|
@@ -7092,7 +7126,7 @@ var version$1 = "1.7.1";
|
|
|
7092
7126
|
/*! @name @brightcove/player-url @version 1.2.0 @license Apache-2.0 */
|
|
7093
7127
|
var version$1$1 = "1.2.0";
|
|
7094
7128
|
|
|
7095
|
-
var _typeof
|
|
7129
|
+
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
|
|
7096
7130
|
return typeof obj;
|
|
7097
7131
|
} : function (obj) {
|
|
7098
7132
|
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
@@ -7227,7 +7261,7 @@ var brightcovePlayerUrl = function brightcovePlayerUrl(_ref) {
|
|
|
7227
7261
|
|
|
7228
7262
|
var qs = '';
|
|
7229
7263
|
|
|
7230
|
-
if (iframe && queryParams && (typeof queryParams === 'undefined' ? 'undefined' : _typeof
|
|
7264
|
+
if (iframe && queryParams && (typeof queryParams === 'undefined' ? 'undefined' : _typeof(queryParams)) === 'object') {
|
|
7231
7265
|
qs = getQueryString(queryParams);
|
|
7232
7266
|
}
|
|
7233
7267
|
|
|
@@ -7461,7 +7495,7 @@ var wrapResponsive = function wrapResponsive(embedType, embedOptions, el) {
|
|
|
7461
7495
|
el.style.width = '100%';
|
|
7462
7496
|
el.style.height = '100%';
|
|
7463
7497
|
|
|
7464
|
-
var responsive = _extends$1({
|
|
7498
|
+
var responsive = _extends$1$1({
|
|
7465
7499
|
aspectRatio: DEFAULT_ASPECT_RATIO,
|
|
7466
7500
|
iframeHorizontalPlaylist: DEFAULT_IFRAME_HORIZONTAL_PLAYLIST,
|
|
7467
7501
|
maxWidth: DEFAULT_MAX_WIDTH
|
|
@@ -8146,7 +8180,7 @@ var loadPlayer = function loadPlayer(params, resolve, reject) {
|
|
|
8146
8180
|
|
|
8147
8181
|
|
|
8148
8182
|
var brightcovePlayerLoader = function brightcovePlayerLoader(parameters) {
|
|
8149
|
-
var params = _extends$1({}, DEFAULTS, parameters);
|
|
8183
|
+
var params = _extends$1$1({}, DEFAULTS, parameters);
|
|
8150
8184
|
|
|
8151
8185
|
var Promise = params.Promise,
|
|
8152
8186
|
onSuccess = params.onSuccess,
|
|
@@ -8288,7 +8322,7 @@ function (_React$Component) {
|
|
|
8288
8322
|
_this.refNode = ref;
|
|
8289
8323
|
};
|
|
8290
8324
|
|
|
8291
|
-
_this.loadPlayer = _this.loadPlayer.bind(_assertThisInitialized
|
|
8325
|
+
_this.loadPlayer = _this.loadPlayer.bind(_assertThisInitialized(_this));
|
|
8292
8326
|
return _this;
|
|
8293
8327
|
}
|
|
8294
8328
|
/**
|
|
@@ -8309,7 +8343,7 @@ function (_React$Component) {
|
|
|
8309
8343
|
var userSuccess = this.props.onSuccess;
|
|
8310
8344
|
var userFailure = this.props.onFailure;
|
|
8311
8345
|
|
|
8312
|
-
var options = _extends({}, this.props, {
|
|
8346
|
+
var options = _extends$1({}, this.props, {
|
|
8313
8347
|
refNode: this.refNode,
|
|
8314
8348
|
refNodeInsert: 'append',
|
|
8315
8349
|
onSuccess: function onSuccess(_ref) {
|
|
@@ -8618,7 +8652,7 @@ function (_React$Component) {
|
|
|
8618
8652
|
;
|
|
8619
8653
|
|
|
8620
8654
|
_proto.render = function render() {
|
|
8621
|
-
var props = _extends({
|
|
8655
|
+
var props = _extends$1({
|
|
8622
8656
|
className: 'brightcove-react-player-loader'
|
|
8623
8657
|
}, this.props.attrs, {
|
|
8624
8658
|
ref: this.setRefNode
|
|
@@ -9032,17 +9066,11 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
|
9032
9066
|
|
|
9033
9067
|
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; }
|
|
9034
9068
|
|
|
9035
|
-
function
|
|
9036
|
-
|
|
9037
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
9069
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
|
|
9038
9070
|
|
|
9039
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance
|
|
9071
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
|
|
9040
9072
|
|
|
9041
|
-
function
|
|
9042
|
-
|
|
9043
|
-
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; }
|
|
9044
|
-
|
|
9045
|
-
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
9073
|
+
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; }
|
|
9046
9074
|
|
|
9047
9075
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
9048
9076
|
|
|
@@ -9172,12 +9200,12 @@ function getSDK(url, sdkGlobal) {
|
|
|
9172
9200
|
|
|
9173
9201
|
function getConfig(props$1, defaultProps, showWarning) {
|
|
9174
9202
|
var config = (0, _deepmerge["default"])(defaultProps.config, props$1.config);
|
|
9175
|
-
|
|
9176
|
-
var
|
|
9177
|
-
|
|
9203
|
+
var _iteratorNormalCompletion = true;
|
|
9204
|
+
var _didIteratorError = false;
|
|
9205
|
+
var _iteratorError = undefined;
|
|
9178
9206
|
|
|
9179
9207
|
try {
|
|
9180
|
-
for (_iterator.
|
|
9208
|
+
for (var _iterator = props.DEPRECATED_CONFIG_PROPS[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
9181
9209
|
var p = _step.value;
|
|
9182
9210
|
|
|
9183
9211
|
if (props$1[p]) {
|
|
@@ -9192,9 +9220,18 @@ function getConfig(props$1, defaultProps, showWarning) {
|
|
|
9192
9220
|
}
|
|
9193
9221
|
}
|
|
9194
9222
|
} catch (err) {
|
|
9195
|
-
|
|
9223
|
+
_didIteratorError = true;
|
|
9224
|
+
_iteratorError = err;
|
|
9196
9225
|
} finally {
|
|
9197
|
-
|
|
9226
|
+
try {
|
|
9227
|
+
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
|
|
9228
|
+
_iterator["return"]();
|
|
9229
|
+
}
|
|
9230
|
+
} finally {
|
|
9231
|
+
if (_didIteratorError) {
|
|
9232
|
+
throw _iteratorError;
|
|
9233
|
+
}
|
|
9234
|
+
}
|
|
9198
9235
|
}
|
|
9199
9236
|
|
|
9200
9237
|
return config;
|
|
@@ -9341,16 +9378,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
9341
9378
|
|
|
9342
9379
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
9343
9380
|
|
|
9344
|
-
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); }; }
|
|
9345
|
-
|
|
9346
9381
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
9347
9382
|
|
|
9348
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9349
|
-
|
|
9350
|
-
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; } }
|
|
9351
|
-
|
|
9352
9383
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
9353
9384
|
|
|
9385
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9386
|
+
|
|
9354
9387
|
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); }
|
|
9355
9388
|
|
|
9356
9389
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -9359,12 +9392,14 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
9359
9392
|
|
|
9360
9393
|
var SEEK_ON_PLAY_EXPIRY = 5000;
|
|
9361
9394
|
|
|
9362
|
-
var Player =
|
|
9395
|
+
var Player =
|
|
9396
|
+
/*#__PURE__*/
|
|
9397
|
+
function (_Component) {
|
|
9363
9398
|
_inherits(Player, _Component);
|
|
9364
9399
|
|
|
9365
|
-
var _super = _createSuper(Player);
|
|
9366
|
-
|
|
9367
9400
|
function Player() {
|
|
9401
|
+
var _getPrototypeOf2;
|
|
9402
|
+
|
|
9368
9403
|
var _this;
|
|
9369
9404
|
|
|
9370
9405
|
_classCallCheck(this, Player);
|
|
@@ -9373,7 +9408,7 @@ var Player = /*#__PURE__*/function (_Component) {
|
|
|
9373
9408
|
_args[_key] = arguments[_key];
|
|
9374
9409
|
}
|
|
9375
9410
|
|
|
9376
|
-
_this =
|
|
9411
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Player)).call.apply(_getPrototypeOf2, [this].concat(_args)));
|
|
9377
9412
|
|
|
9378
9413
|
_defineProperty(_assertThisInitialized(_this), "mounted", false);
|
|
9379
9414
|
|
|
@@ -9698,7 +9733,7 @@ var Player = /*#__PURE__*/function (_Component) {
|
|
|
9698
9733
|
return null;
|
|
9699
9734
|
}
|
|
9700
9735
|
|
|
9701
|
-
return
|
|
9736
|
+
return _react["default"].createElement(Player, _extends({}, this.props, {
|
|
9702
9737
|
ref: this.ref,
|
|
9703
9738
|
onReady: this.handleReady,
|
|
9704
9739
|
onPlay: this.handlePlay,
|
|
@@ -9759,16 +9794,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
9759
9794
|
|
|
9760
9795
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
9761
9796
|
|
|
9762
|
-
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); }; }
|
|
9763
|
-
|
|
9764
9797
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
9765
9798
|
|
|
9766
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9767
|
-
|
|
9768
|
-
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; } }
|
|
9769
|
-
|
|
9770
9799
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
9771
9800
|
|
|
9801
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9802
|
+
|
|
9772
9803
|
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); }
|
|
9773
9804
|
|
|
9774
9805
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -9780,12 +9811,14 @@ var SUPPORTED_PROPS = Object.keys(props.propTypes);
|
|
|
9780
9811
|
function createSinglePlayer(activePlayer) {
|
|
9781
9812
|
var _class, _temp;
|
|
9782
9813
|
|
|
9783
|
-
return _temp = _class =
|
|
9814
|
+
return _temp = _class =
|
|
9815
|
+
/*#__PURE__*/
|
|
9816
|
+
function (_Component) {
|
|
9784
9817
|
_inherits(SinglePlayer, _Component);
|
|
9785
9818
|
|
|
9786
|
-
var _super = _createSuper(SinglePlayer);
|
|
9787
|
-
|
|
9788
9819
|
function SinglePlayer() {
|
|
9820
|
+
var _getPrototypeOf2;
|
|
9821
|
+
|
|
9789
9822
|
var _this;
|
|
9790
9823
|
|
|
9791
9824
|
_classCallCheck(this, SinglePlayer);
|
|
@@ -9794,7 +9827,7 @@ function createSinglePlayer(activePlayer) {
|
|
|
9794
9827
|
args[_key] = arguments[_key];
|
|
9795
9828
|
}
|
|
9796
9829
|
|
|
9797
|
-
_this =
|
|
9830
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(SinglePlayer)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
9798
9831
|
|
|
9799
9832
|
_defineProperty(_assertThisInitialized(_this), "config", (0, utils.getConfig)(_this.props, props.defaultProps, true));
|
|
9800
9833
|
|
|
@@ -9862,12 +9895,12 @@ function createSinglePlayer(activePlayer) {
|
|
|
9862
9895
|
height = _this$props.height,
|
|
9863
9896
|
Wrapper = _this$props.wrapper;
|
|
9864
9897
|
var otherProps = (0, utils.omit)(this.props, SUPPORTED_PROPS, props.DEPRECATED_CONFIG_PROPS);
|
|
9865
|
-
return
|
|
9898
|
+
return _react["default"].createElement(Wrapper, _extends({
|
|
9866
9899
|
style: _objectSpread({}, style, {
|
|
9867
9900
|
width: width,
|
|
9868
9901
|
height: height
|
|
9869
9902
|
})
|
|
9870
|
-
}, otherProps),
|
|
9903
|
+
}, otherProps), _react["default"].createElement(_Player["default"], _extends({}, this.props, {
|
|
9871
9904
|
ref: this.ref,
|
|
9872
9905
|
activePlayer: activePlayer,
|
|
9873
9906
|
config: this.config
|
|
@@ -9913,31 +9946,23 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
9913
9946
|
|
|
9914
9947
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
9915
9948
|
|
|
9916
|
-
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); }; }
|
|
9917
|
-
|
|
9918
9949
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
9919
9950
|
|
|
9920
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9921
|
-
|
|
9922
|
-
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; } }
|
|
9923
|
-
|
|
9924
9951
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
9925
9952
|
|
|
9953
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9954
|
+
|
|
9926
9955
|
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); }
|
|
9927
9956
|
|
|
9928
9957
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
9929
9958
|
|
|
9930
9959
|
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; }
|
|
9931
9960
|
|
|
9932
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) ||
|
|
9933
|
-
|
|
9934
|
-
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."); }
|
|
9935
|
-
|
|
9936
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
9961
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
|
|
9937
9962
|
|
|
9938
|
-
function
|
|
9963
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
|
|
9939
9964
|
|
|
9940
|
-
function _iterableToArrayLimit(arr, i) { if (
|
|
9965
|
+
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; }
|
|
9941
9966
|
|
|
9942
9967
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
9943
9968
|
|
|
@@ -9962,12 +9987,14 @@ function parsePlaylist(url) {
|
|
|
9962
9987
|
return {};
|
|
9963
9988
|
}
|
|
9964
9989
|
|
|
9965
|
-
var YouTube =
|
|
9990
|
+
var YouTube =
|
|
9991
|
+
/*#__PURE__*/
|
|
9992
|
+
function (_Component) {
|
|
9966
9993
|
_inherits(YouTube, _Component);
|
|
9967
9994
|
|
|
9968
|
-
var _super = _createSuper(YouTube);
|
|
9969
|
-
|
|
9970
9995
|
function YouTube() {
|
|
9996
|
+
var _getPrototypeOf2;
|
|
9997
|
+
|
|
9971
9998
|
var _this;
|
|
9972
9999
|
|
|
9973
10000
|
_classCallCheck(this, YouTube);
|
|
@@ -9976,7 +10003,7 @@ var YouTube = /*#__PURE__*/function (_Component) {
|
|
|
9976
10003
|
args[_key] = arguments[_key];
|
|
9977
10004
|
}
|
|
9978
10005
|
|
|
9979
|
-
_this =
|
|
10006
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(YouTube)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
9980
10007
|
|
|
9981
10008
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
9982
10009
|
|
|
@@ -10164,9 +10191,9 @@ var YouTube = /*#__PURE__*/function (_Component) {
|
|
|
10164
10191
|
height: '100%',
|
|
10165
10192
|
display: display
|
|
10166
10193
|
};
|
|
10167
|
-
return
|
|
10194
|
+
return _react["default"].createElement("div", {
|
|
10168
10195
|
style: style
|
|
10169
|
-
},
|
|
10196
|
+
}, _react["default"].createElement("div", {
|
|
10170
10197
|
ref: this.ref
|
|
10171
10198
|
}));
|
|
10172
10199
|
}
|
|
@@ -10222,16 +10249,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
10222
10249
|
|
|
10223
10250
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
10224
10251
|
|
|
10225
|
-
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); }; }
|
|
10226
|
-
|
|
10227
10252
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
10228
10253
|
|
|
10229
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10230
|
-
|
|
10231
|
-
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; } }
|
|
10232
|
-
|
|
10233
10254
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
10234
10255
|
|
|
10256
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10257
|
+
|
|
10235
10258
|
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); }
|
|
10236
10259
|
|
|
10237
10260
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -10240,14 +10263,16 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
10240
10263
|
|
|
10241
10264
|
var SDK_URL = 'https://w.soundcloud.com/player/api.js';
|
|
10242
10265
|
var SDK_GLOBAL = 'SC';
|
|
10243
|
-
var MATCH_URL = /(
|
|
10266
|
+
var MATCH_URL = /(soundcloud\.com|snd\.sc)\/.+$/;
|
|
10244
10267
|
|
|
10245
|
-
var SoundCloud =
|
|
10268
|
+
var SoundCloud =
|
|
10269
|
+
/*#__PURE__*/
|
|
10270
|
+
function (_Component) {
|
|
10246
10271
|
_inherits(SoundCloud, _Component);
|
|
10247
10272
|
|
|
10248
|
-
var _super = _createSuper(SoundCloud);
|
|
10249
|
-
|
|
10250
10273
|
function SoundCloud() {
|
|
10274
|
+
var _getPrototypeOf2;
|
|
10275
|
+
|
|
10251
10276
|
var _this;
|
|
10252
10277
|
|
|
10253
10278
|
_classCallCheck(this, SoundCloud);
|
|
@@ -10256,7 +10281,7 @@ var SoundCloud = /*#__PURE__*/function (_Component) {
|
|
|
10256
10281
|
args[_key] = arguments[_key];
|
|
10257
10282
|
}
|
|
10258
10283
|
|
|
10259
|
-
_this =
|
|
10284
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(SoundCloud)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
10260
10285
|
|
|
10261
10286
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
10262
10287
|
|
|
@@ -10377,7 +10402,7 @@ var SoundCloud = /*#__PURE__*/function (_Component) {
|
|
|
10377
10402
|
height: '100%',
|
|
10378
10403
|
display: display
|
|
10379
10404
|
};
|
|
10380
|
-
return
|
|
10405
|
+
return _react["default"].createElement("iframe", {
|
|
10381
10406
|
ref: this.ref,
|
|
10382
10407
|
src: "https://w.soundcloud.com/player/?url=".concat(encodeURIComponent(this.props.url)),
|
|
10383
10408
|
style: style,
|
|
@@ -10439,16 +10464,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
10439
10464
|
|
|
10440
10465
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
10441
10466
|
|
|
10442
|
-
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); }; }
|
|
10443
|
-
|
|
10444
10467
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
10445
10468
|
|
|
10446
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10447
|
-
|
|
10448
|
-
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; } }
|
|
10449
|
-
|
|
10450
10469
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
10451
10470
|
|
|
10471
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10472
|
+
|
|
10452
10473
|
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); }
|
|
10453
10474
|
|
|
10454
10475
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -10460,12 +10481,14 @@ var SDK_GLOBAL = 'Vimeo';
|
|
|
10460
10481
|
var MATCH_URL = /vimeo\.com\/.+/;
|
|
10461
10482
|
var MATCH_FILE_URL = /vimeo\.com\/external\/[0-9]+\..+/;
|
|
10462
10483
|
|
|
10463
|
-
var Vimeo =
|
|
10484
|
+
var Vimeo =
|
|
10485
|
+
/*#__PURE__*/
|
|
10486
|
+
function (_Component) {
|
|
10464
10487
|
_inherits(Vimeo, _Component);
|
|
10465
10488
|
|
|
10466
|
-
var _super = _createSuper(Vimeo);
|
|
10467
|
-
|
|
10468
10489
|
function Vimeo() {
|
|
10490
|
+
var _getPrototypeOf2;
|
|
10491
|
+
|
|
10469
10492
|
var _this;
|
|
10470
10493
|
|
|
10471
10494
|
_classCallCheck(this, Vimeo);
|
|
@@ -10474,7 +10497,7 @@ var Vimeo = /*#__PURE__*/function (_Component) {
|
|
|
10474
10497
|
args[_key] = arguments[_key];
|
|
10475
10498
|
}
|
|
10476
10499
|
|
|
10477
|
-
_this =
|
|
10500
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Vimeo)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
10478
10501
|
|
|
10479
10502
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
10480
10503
|
|
|
@@ -10631,7 +10654,7 @@ var Vimeo = /*#__PURE__*/function (_Component) {
|
|
|
10631
10654
|
overflow: 'hidden',
|
|
10632
10655
|
display: display
|
|
10633
10656
|
};
|
|
10634
|
-
return
|
|
10657
|
+
return _react["default"].createElement("div", {
|
|
10635
10658
|
key: this.props.url,
|
|
10636
10659
|
ref: this.ref,
|
|
10637
10660
|
style: style
|
|
@@ -10691,16 +10714,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
10691
10714
|
|
|
10692
10715
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
10693
10716
|
|
|
10694
|
-
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); }; }
|
|
10695
|
-
|
|
10696
10717
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
10697
10718
|
|
|
10698
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10699
|
-
|
|
10700
|
-
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; } }
|
|
10701
|
-
|
|
10702
10719
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
10703
10720
|
|
|
10721
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10722
|
+
|
|
10704
10723
|
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); }
|
|
10705
10724
|
|
|
10706
10725
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -10713,12 +10732,14 @@ var SDK_GLOBAL_READY = 'fbAsyncInit';
|
|
|
10713
10732
|
var MATCH_URL = /^https?:\/\/(www\.)?facebook\.com.*\/(video(s)?|watch|story)(\.php?|\/).+$/;
|
|
10714
10733
|
var PLAYER_ID_PREFIX = 'facebook-player-';
|
|
10715
10734
|
|
|
10716
|
-
var Facebook =
|
|
10735
|
+
var Facebook =
|
|
10736
|
+
/*#__PURE__*/
|
|
10737
|
+
function (_Component) {
|
|
10717
10738
|
_inherits(Facebook, _Component);
|
|
10718
10739
|
|
|
10719
|
-
var _super = _createSuper(Facebook);
|
|
10720
|
-
|
|
10721
10740
|
function Facebook() {
|
|
10741
|
+
var _getPrototypeOf2;
|
|
10742
|
+
|
|
10722
10743
|
var _this;
|
|
10723
10744
|
|
|
10724
10745
|
_classCallCheck(this, Facebook);
|
|
@@ -10727,7 +10748,7 @@ var Facebook = /*#__PURE__*/function (_Component) {
|
|
|
10727
10748
|
args[_key] = arguments[_key];
|
|
10728
10749
|
}
|
|
10729
10750
|
|
|
10730
|
-
_this =
|
|
10751
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Facebook)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
10731
10752
|
|
|
10732
10753
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
10733
10754
|
|
|
@@ -10843,7 +10864,7 @@ var Facebook = /*#__PURE__*/function (_Component) {
|
|
|
10843
10864
|
width: '100%',
|
|
10844
10865
|
height: '100%'
|
|
10845
10866
|
};
|
|
10846
|
-
return
|
|
10867
|
+
return _react["default"].createElement("div", {
|
|
10847
10868
|
style: style,
|
|
10848
10869
|
id: this.playerID,
|
|
10849
10870
|
className: "fb-video",
|
|
@@ -10903,16 +10924,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
10903
10924
|
|
|
10904
10925
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
10905
10926
|
|
|
10906
|
-
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); }; }
|
|
10907
|
-
|
|
10908
10927
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
10909
10928
|
|
|
10910
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10911
|
-
|
|
10912
|
-
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; } }
|
|
10913
|
-
|
|
10914
10929
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
10915
10930
|
|
|
10931
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10932
|
+
|
|
10916
10933
|
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); }
|
|
10917
10934
|
|
|
10918
10935
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -10923,12 +10940,14 @@ var SDK_URL = 'https://cdn.embed.ly/player-0.1.0.min.js';
|
|
|
10923
10940
|
var SDK_GLOBAL = 'playerjs';
|
|
10924
10941
|
var MATCH_URL = /streamable\.com\/([a-z0-9]+)$/;
|
|
10925
10942
|
|
|
10926
|
-
var Streamable =
|
|
10943
|
+
var Streamable =
|
|
10944
|
+
/*#__PURE__*/
|
|
10945
|
+
function (_Component) {
|
|
10927
10946
|
_inherits(Streamable, _Component);
|
|
10928
10947
|
|
|
10929
|
-
var _super = _createSuper(Streamable);
|
|
10930
|
-
|
|
10931
10948
|
function Streamable() {
|
|
10949
|
+
var _getPrototypeOf2;
|
|
10950
|
+
|
|
10932
10951
|
var _this;
|
|
10933
10952
|
|
|
10934
10953
|
_classCallCheck(this, Streamable);
|
|
@@ -10937,7 +10956,7 @@ var Streamable = /*#__PURE__*/function (_Component) {
|
|
|
10937
10956
|
args[_key] = arguments[_key];
|
|
10938
10957
|
}
|
|
10939
10958
|
|
|
10940
|
-
_this =
|
|
10959
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Streamable)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
10941
10960
|
|
|
10942
10961
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
10943
10962
|
|
|
@@ -11057,7 +11076,7 @@ var Streamable = /*#__PURE__*/function (_Component) {
|
|
|
11057
11076
|
width: '100%',
|
|
11058
11077
|
height: '100%'
|
|
11059
11078
|
};
|
|
11060
|
-
return
|
|
11079
|
+
return _react["default"].createElement("iframe", {
|
|
11061
11080
|
ref: this.ref,
|
|
11062
11081
|
src: "https://streamable.com/o/".concat(id),
|
|
11063
11082
|
frameBorder: "0",
|
|
@@ -11118,16 +11137,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
11118
11137
|
|
|
11119
11138
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
11120
11139
|
|
|
11121
|
-
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); }; }
|
|
11122
|
-
|
|
11123
11140
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
11124
11141
|
|
|
11125
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
11126
|
-
|
|
11127
|
-
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; } }
|
|
11128
|
-
|
|
11129
11142
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
11130
11143
|
|
|
11144
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
11145
|
+
|
|
11131
11146
|
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); }
|
|
11132
11147
|
|
|
11133
11148
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -11138,48 +11153,26 @@ var SDK_URL = 'https://fast.wistia.com/assets/external/E-v1.js';
|
|
|
11138
11153
|
var SDK_GLOBAL = 'Wistia';
|
|
11139
11154
|
var MATCH_URL = /(?:wistia\.com|wi\.st)\/(?:medias|embed)\/(.*)$/;
|
|
11140
11155
|
|
|
11141
|
-
var Wistia =
|
|
11156
|
+
var Wistia =
|
|
11157
|
+
/*#__PURE__*/
|
|
11158
|
+
function (_Component) {
|
|
11142
11159
|
_inherits(Wistia, _Component);
|
|
11143
11160
|
|
|
11144
|
-
var _super = _createSuper(Wistia);
|
|
11145
|
-
|
|
11146
11161
|
function Wistia() {
|
|
11162
|
+
var _getPrototypeOf2;
|
|
11163
|
+
|
|
11147
11164
|
var _this;
|
|
11148
11165
|
|
|
11149
11166
|
_classCallCheck(this, Wistia);
|
|
11150
11167
|
|
|
11151
|
-
for (var _len = arguments.length,
|
|
11152
|
-
|
|
11168
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
11169
|
+
args[_key] = arguments[_key];
|
|
11153
11170
|
}
|
|
11154
11171
|
|
|
11155
|
-
_this =
|
|
11172
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Wistia)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
11156
11173
|
|
|
11157
11174
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
11158
11175
|
|
|
11159
|
-
_defineProperty(_assertThisInitialized(_this), "onPlay", function () {
|
|
11160
|
-
var _this$props;
|
|
11161
|
-
|
|
11162
|
-
return (_this$props = _this.props).onPlay.apply(_this$props, arguments);
|
|
11163
|
-
});
|
|
11164
|
-
|
|
11165
|
-
_defineProperty(_assertThisInitialized(_this), "onPause", function () {
|
|
11166
|
-
var _this$props2;
|
|
11167
|
-
|
|
11168
|
-
return (_this$props2 = _this.props).onPause.apply(_this$props2, arguments);
|
|
11169
|
-
});
|
|
11170
|
-
|
|
11171
|
-
_defineProperty(_assertThisInitialized(_this), "onSeek", function () {
|
|
11172
|
-
var _this$props3;
|
|
11173
|
-
|
|
11174
|
-
return (_this$props3 = _this.props).onSeek.apply(_this$props3, arguments);
|
|
11175
|
-
});
|
|
11176
|
-
|
|
11177
|
-
_defineProperty(_assertThisInitialized(_this), "onEnded", function () {
|
|
11178
|
-
var _this$props4;
|
|
11179
|
-
|
|
11180
|
-
return (_this$props4 = _this.props).onEnded.apply(_this$props4, arguments);
|
|
11181
|
-
});
|
|
11182
|
-
|
|
11183
11176
|
_defineProperty(_assertThisInitialized(_this), "mute", function () {
|
|
11184
11177
|
_this.callPlayer('mute');
|
|
11185
11178
|
});
|
|
@@ -11201,13 +11194,17 @@ var Wistia = /*#__PURE__*/function (_Component) {
|
|
|
11201
11194
|
value: function load(url) {
|
|
11202
11195
|
var _this2 = this;
|
|
11203
11196
|
|
|
11204
|
-
var _this$
|
|
11205
|
-
playing = _this$
|
|
11206
|
-
muted = _this$
|
|
11207
|
-
controls = _this$
|
|
11208
|
-
_onReady = _this$
|
|
11209
|
-
|
|
11210
|
-
|
|
11197
|
+
var _this$props = this.props,
|
|
11198
|
+
playing = _this$props.playing,
|
|
11199
|
+
muted = _this$props.muted,
|
|
11200
|
+
controls = _this$props.controls,
|
|
11201
|
+
_onReady = _this$props.onReady,
|
|
11202
|
+
onPlay = _this$props.onPlay,
|
|
11203
|
+
onPause = _this$props.onPause,
|
|
11204
|
+
onSeek = _this$props.onSeek,
|
|
11205
|
+
onEnded = _this$props.onEnded,
|
|
11206
|
+
config = _this$props.config,
|
|
11207
|
+
onError = _this$props.onError;
|
|
11211
11208
|
(0, utils.getSDK)(SDK_URL, SDK_GLOBAL).then(function () {
|
|
11212
11209
|
window._wq = window._wq || [];
|
|
11213
11210
|
|
|
@@ -11224,28 +11221,19 @@ var Wistia = /*#__PURE__*/function (_Component) {
|
|
|
11224
11221
|
|
|
11225
11222
|
_this2.unbind();
|
|
11226
11223
|
|
|
11227
|
-
_this2.player.bind('play',
|
|
11224
|
+
_this2.player.bind('play', onPlay);
|
|
11228
11225
|
|
|
11229
|
-
_this2.player.bind('pause',
|
|
11226
|
+
_this2.player.bind('pause', onPause);
|
|
11230
11227
|
|
|
11231
|
-
_this2.player.bind('seek',
|
|
11228
|
+
_this2.player.bind('seek', onSeek);
|
|
11232
11229
|
|
|
11233
|
-
_this2.player.bind('end',
|
|
11230
|
+
_this2.player.bind('end', onEnded);
|
|
11234
11231
|
|
|
11235
11232
|
_onReady();
|
|
11236
11233
|
}
|
|
11237
11234
|
});
|
|
11238
11235
|
}, onError);
|
|
11239
11236
|
}
|
|
11240
|
-
}, {
|
|
11241
|
-
key: "unbind",
|
|
11242
|
-
value: function unbind() {
|
|
11243
|
-
this.player.unbind('play', this.onPlay);
|
|
11244
|
-
this.player.unbind('pause', this.onPause);
|
|
11245
|
-
this.player.unbind('seek', this.onSeek);
|
|
11246
|
-
this.player.unbind('end', this.onEnded);
|
|
11247
|
-
} // Proxy methods to prevent listener leaks
|
|
11248
|
-
|
|
11249
11237
|
}, {
|
|
11250
11238
|
key: "play",
|
|
11251
11239
|
value: function play() {
|
|
@@ -11256,6 +11244,19 @@ var Wistia = /*#__PURE__*/function (_Component) {
|
|
|
11256
11244
|
value: function pause() {
|
|
11257
11245
|
this.callPlayer('pause');
|
|
11258
11246
|
}
|
|
11247
|
+
}, {
|
|
11248
|
+
key: "unbind",
|
|
11249
|
+
value: function unbind() {
|
|
11250
|
+
var _this$props2 = this.props,
|
|
11251
|
+
onPlay = _this$props2.onPlay,
|
|
11252
|
+
onPause = _this$props2.onPause,
|
|
11253
|
+
onSeek = _this$props2.onSeek,
|
|
11254
|
+
onEnded = _this$props2.onEnded;
|
|
11255
|
+
this.player.unbind('play', onPlay);
|
|
11256
|
+
this.player.unbind('pause', onPause);
|
|
11257
|
+
this.player.unbind('seek', onSeek);
|
|
11258
|
+
this.player.unbind('end', onEnded);
|
|
11259
|
+
}
|
|
11259
11260
|
}, {
|
|
11260
11261
|
key: "stop",
|
|
11261
11262
|
value: function stop() {
|
|
@@ -11301,7 +11302,7 @@ var Wistia = /*#__PURE__*/function (_Component) {
|
|
|
11301
11302
|
width: '100%',
|
|
11302
11303
|
height: '100%'
|
|
11303
11304
|
};
|
|
11304
|
-
return
|
|
11305
|
+
return _react["default"].createElement("div", {
|
|
11305
11306
|
key: id,
|
|
11306
11307
|
className: className,
|
|
11307
11308
|
style: style
|
|
@@ -11361,16 +11362,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
11361
11362
|
|
|
11362
11363
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
11363
11364
|
|
|
11364
|
-
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
11365
|
-
|
|
11366
11365
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
11367
11366
|
|
|
11368
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
11369
|
-
|
|
11370
|
-
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; } }
|
|
11371
|
-
|
|
11372
11367
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
11373
11368
|
|
|
11369
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
11370
|
+
|
|
11374
11371
|
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); }
|
|
11375
11372
|
|
|
11376
11373
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -11383,12 +11380,14 @@ var MATCH_VIDEO_URL = /(?:www\.|go\.)?twitch\.tv\/videos\/(\d+)($|\?)/;
|
|
|
11383
11380
|
var MATCH_CHANNEL_URL = /(?:www\.|go\.)?twitch\.tv\/([a-z0-9_]+)($|\?)/;
|
|
11384
11381
|
var PLAYER_ID_PREFIX = 'twitch-player-';
|
|
11385
11382
|
|
|
11386
|
-
var Twitch =
|
|
11383
|
+
var Twitch =
|
|
11384
|
+
/*#__PURE__*/
|
|
11385
|
+
function (_Component) {
|
|
11387
11386
|
_inherits(Twitch, _Component);
|
|
11388
11387
|
|
|
11389
|
-
var _super = _createSuper(Twitch);
|
|
11390
|
-
|
|
11391
11388
|
function Twitch() {
|
|
11389
|
+
var _getPrototypeOf2;
|
|
11390
|
+
|
|
11392
11391
|
var _this;
|
|
11393
11392
|
|
|
11394
11393
|
_classCallCheck(this, Twitch);
|
|
@@ -11397,7 +11396,7 @@ var Twitch = /*#__PURE__*/function (_Component) {
|
|
|
11397
11396
|
args[_key] = arguments[_key];
|
|
11398
11397
|
}
|
|
11399
11398
|
|
|
11400
|
-
_this =
|
|
11399
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Twitch)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
11401
11400
|
|
|
11402
11401
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
11403
11402
|
|
|
@@ -11518,7 +11517,7 @@ var Twitch = /*#__PURE__*/function (_Component) {
|
|
|
11518
11517
|
width: '100%',
|
|
11519
11518
|
height: '100%'
|
|
11520
11519
|
};
|
|
11521
|
-
return
|
|
11520
|
+
return _react["default"].createElement("div", {
|
|
11522
11521
|
style: style,
|
|
11523
11522
|
id: this.playerID
|
|
11524
11523
|
});
|
|
@@ -11571,15 +11570,11 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
11571
11570
|
|
|
11572
11571
|
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; }
|
|
11573
11572
|
|
|
11574
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) ||
|
|
11573
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
|
|
11575
11574
|
|
|
11576
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance
|
|
11575
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
|
|
11577
11576
|
|
|
11578
|
-
function
|
|
11579
|
-
|
|
11580
|
-
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; }
|
|
11581
|
-
|
|
11582
|
-
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
11577
|
+
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; }
|
|
11583
11578
|
|
|
11584
11579
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11585
11580
|
|
|
@@ -11589,16 +11584,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
11589
11584
|
|
|
11590
11585
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
11591
11586
|
|
|
11592
|
-
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); }; }
|
|
11593
|
-
|
|
11594
11587
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
11595
11588
|
|
|
11596
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
11597
|
-
|
|
11598
|
-
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; } }
|
|
11599
|
-
|
|
11600
11589
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
11601
11590
|
|
|
11591
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
11592
|
+
|
|
11602
11593
|
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); }
|
|
11603
11594
|
|
|
11604
11595
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -11610,12 +11601,14 @@ var SDK_GLOBAL = 'DM';
|
|
|
11610
11601
|
var SDK_GLOBAL_READY = 'dmAsyncInit';
|
|
11611
11602
|
var MATCH_URL = /^(?:(?:https?):)?(?:\/\/)?(?:www\.)?(?:(?:dailymotion\.com(?:\/embed)?\/video)|dai\.ly)\/([a-zA-Z0-9]+)(?:_[\w_-]+)?$/;
|
|
11612
11603
|
|
|
11613
|
-
var DailyMotion =
|
|
11604
|
+
var DailyMotion =
|
|
11605
|
+
/*#__PURE__*/
|
|
11606
|
+
function (_Component) {
|
|
11614
11607
|
_inherits(DailyMotion, _Component);
|
|
11615
11608
|
|
|
11616
|
-
var _super = _createSuper(DailyMotion);
|
|
11617
|
-
|
|
11618
11609
|
function DailyMotion() {
|
|
11610
|
+
var _getPrototypeOf2;
|
|
11611
|
+
|
|
11619
11612
|
var _this;
|
|
11620
11613
|
|
|
11621
11614
|
_classCallCheck(this, DailyMotion);
|
|
@@ -11624,7 +11617,7 @@ var DailyMotion = /*#__PURE__*/function (_Component) {
|
|
|
11624
11617
|
args[_key] = arguments[_key];
|
|
11625
11618
|
}
|
|
11626
11619
|
|
|
11627
|
-
_this =
|
|
11620
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(DailyMotion)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
11628
11621
|
|
|
11629
11622
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
11630
11623
|
|
|
@@ -11753,9 +11746,9 @@ var DailyMotion = /*#__PURE__*/function (_Component) {
|
|
|
11753
11746
|
height: '100%',
|
|
11754
11747
|
display: display
|
|
11755
11748
|
};
|
|
11756
|
-
return
|
|
11749
|
+
return _react["default"].createElement("div", {
|
|
11757
11750
|
style: style
|
|
11758
|
-
},
|
|
11751
|
+
}, _react["default"].createElement("div", {
|
|
11759
11752
|
ref: this.ref
|
|
11760
11753
|
}));
|
|
11761
11754
|
}
|
|
@@ -11813,16 +11806,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
11813
11806
|
|
|
11814
11807
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
11815
11808
|
|
|
11816
|
-
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); }; }
|
|
11817
|
-
|
|
11818
11809
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
11819
11810
|
|
|
11820
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
11821
|
-
|
|
11822
|
-
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; } }
|
|
11823
|
-
|
|
11824
11811
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
11825
11812
|
|
|
11813
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
11814
|
+
|
|
11826
11815
|
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); }
|
|
11827
11816
|
|
|
11828
11817
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -11833,12 +11822,14 @@ var SDK_URL = 'https://widget.mixcloud.com/media/js/widgetApi.js';
|
|
|
11833
11822
|
var SDK_GLOBAL = 'Mixcloud';
|
|
11834
11823
|
var MATCH_URL = /mixcloud\.com\/([^/]+\/[^/]+)/;
|
|
11835
11824
|
|
|
11836
|
-
var Mixcloud =
|
|
11825
|
+
var Mixcloud =
|
|
11826
|
+
/*#__PURE__*/
|
|
11827
|
+
function (_Component) {
|
|
11837
11828
|
_inherits(Mixcloud, _Component);
|
|
11838
11829
|
|
|
11839
|
-
var _super = _createSuper(Mixcloud);
|
|
11840
|
-
|
|
11841
11830
|
function Mixcloud() {
|
|
11831
|
+
var _getPrototypeOf2;
|
|
11832
|
+
|
|
11842
11833
|
var _this;
|
|
11843
11834
|
|
|
11844
11835
|
_classCallCheck(this, Mixcloud);
|
|
@@ -11847,7 +11838,7 @@ var Mixcloud = /*#__PURE__*/function (_Component) {
|
|
|
11847
11838
|
args[_key] = arguments[_key];
|
|
11848
11839
|
}
|
|
11849
11840
|
|
|
11850
|
-
_this =
|
|
11841
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Mixcloud)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
11851
11842
|
|
|
11852
11843
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
11853
11844
|
|
|
@@ -11950,7 +11941,7 @@ var Mixcloud = /*#__PURE__*/function (_Component) {
|
|
|
11950
11941
|
})); // We have to give the iframe a key here to prevent a
|
|
11951
11942
|
// weird dialog appearing when loading a new track
|
|
11952
11943
|
|
|
11953
|
-
return
|
|
11944
|
+
return _react["default"].createElement("iframe", {
|
|
11954
11945
|
key: id,
|
|
11955
11946
|
ref: this.ref,
|
|
11956
11947
|
style: style,
|
|
@@ -12010,33 +12001,23 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
12010
12001
|
|
|
12011
12002
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
12012
12003
|
|
|
12013
|
-
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); }; }
|
|
12014
|
-
|
|
12015
12004
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
12016
12005
|
|
|
12017
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
12018
|
-
|
|
12019
|
-
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; } }
|
|
12020
|
-
|
|
12021
12006
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
12022
12007
|
|
|
12008
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
12009
|
+
|
|
12023
12010
|
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); }
|
|
12024
12011
|
|
|
12025
12012
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
12026
12013
|
|
|
12027
12014
|
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; }
|
|
12028
12015
|
|
|
12029
|
-
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; } } }; }
|
|
12030
|
-
|
|
12031
|
-
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); }
|
|
12032
|
-
|
|
12033
|
-
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; }
|
|
12034
|
-
|
|
12035
12016
|
var IOS = typeof navigator !== 'undefined' && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
|
|
12036
12017
|
var AUDIO_EXTENSIONS = /\.(m4a|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i;
|
|
12037
12018
|
var VIDEO_EXTENSIONS = /\.(mp4|og[gv]|webm|mov|m4v)($|\?)/i;
|
|
12038
12019
|
var HLS_EXTENSIONS = /\.(m3u8)($|\?)/i;
|
|
12039
|
-
var HLS_SDK_URL = 'https://cdn.jsdelivr.net/npm/hls.js@VERSION
|
|
12020
|
+
var HLS_SDK_URL = 'https://cdn.jsdelivr.net/npm/hls.js@VERSION';
|
|
12040
12021
|
var HLS_GLOBAL = 'Hls';
|
|
12041
12022
|
var DASH_EXTENSIONS = /\.(mpd)($|\?)/i;
|
|
12042
12023
|
var DASH_SDK_URL = 'https://cdnjs.cloudflare.com/ajax/libs/dashjs/VERSION/dash.all.min.js';
|
|
@@ -12045,11 +12026,12 @@ var MATCH_DROPBOX_URL = /www\.dropbox\.com\/.+/;
|
|
|
12045
12026
|
|
|
12046
12027
|
function canPlay(url) {
|
|
12047
12028
|
if (url instanceof Array) {
|
|
12048
|
-
var
|
|
12049
|
-
|
|
12029
|
+
var _iteratorNormalCompletion = true;
|
|
12030
|
+
var _didIteratorError = false;
|
|
12031
|
+
var _iteratorError = undefined;
|
|
12050
12032
|
|
|
12051
12033
|
try {
|
|
12052
|
-
for (_iterator.
|
|
12034
|
+
for (var _iterator = url[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
12053
12035
|
var item = _step.value;
|
|
12054
12036
|
|
|
12055
12037
|
if (typeof item === 'string' && canPlay(item)) {
|
|
@@ -12061,9 +12043,18 @@ function canPlay(url) {
|
|
|
12061
12043
|
}
|
|
12062
12044
|
}
|
|
12063
12045
|
} catch (err) {
|
|
12064
|
-
|
|
12046
|
+
_didIteratorError = true;
|
|
12047
|
+
_iteratorError = err;
|
|
12065
12048
|
} finally {
|
|
12066
|
-
|
|
12049
|
+
try {
|
|
12050
|
+
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
|
|
12051
|
+
_iterator["return"]();
|
|
12052
|
+
}
|
|
12053
|
+
} finally {
|
|
12054
|
+
if (_didIteratorError) {
|
|
12055
|
+
throw _iteratorError;
|
|
12056
|
+
}
|
|
12057
|
+
}
|
|
12067
12058
|
}
|
|
12068
12059
|
|
|
12069
12060
|
return false;
|
|
@@ -12087,12 +12078,14 @@ function canEnablePIP(url) {
|
|
|
12087
12078
|
return canPlay(url) && (!!document.pictureInPictureEnabled || supportsWebKitPresentationMode()) && !AUDIO_EXTENSIONS.test(url);
|
|
12088
12079
|
}
|
|
12089
12080
|
|
|
12090
|
-
var FilePlayer =
|
|
12081
|
+
var FilePlayer =
|
|
12082
|
+
/*#__PURE__*/
|
|
12083
|
+
function (_Component) {
|
|
12091
12084
|
_inherits(FilePlayer, _Component);
|
|
12092
12085
|
|
|
12093
|
-
var _super = _createSuper(FilePlayer);
|
|
12094
|
-
|
|
12095
12086
|
function FilePlayer() {
|
|
12087
|
+
var _getPrototypeOf2;
|
|
12088
|
+
|
|
12096
12089
|
var _this;
|
|
12097
12090
|
|
|
12098
12091
|
_classCallCheck(this, FilePlayer);
|
|
@@ -12101,7 +12094,7 @@ var FilePlayer = /*#__PURE__*/function (_Component) {
|
|
|
12101
12094
|
_args[_key] = arguments[_key];
|
|
12102
12095
|
}
|
|
12103
12096
|
|
|
12104
|
-
_this =
|
|
12097
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(FilePlayer)).call.apply(_getPrototypeOf2, [this].concat(_args)));
|
|
12105
12098
|
|
|
12106
12099
|
_defineProperty(_assertThisInitialized(_this), "onReady", function () {
|
|
12107
12100
|
var _this$props;
|
|
@@ -12188,19 +12181,19 @@ var FilePlayer = /*#__PURE__*/function (_Component) {
|
|
|
12188
12181
|
|
|
12189
12182
|
_defineProperty(_assertThisInitialized(_this), "renderSourceElement", function (source, index) {
|
|
12190
12183
|
if (typeof source === 'string') {
|
|
12191
|
-
return
|
|
12184
|
+
return _react["default"].createElement("source", {
|
|
12192
12185
|
key: index,
|
|
12193
12186
|
src: source
|
|
12194
12187
|
});
|
|
12195
12188
|
}
|
|
12196
12189
|
|
|
12197
|
-
return
|
|
12190
|
+
return _react["default"].createElement("source", _extends({
|
|
12198
12191
|
key: index
|
|
12199
12192
|
}, source));
|
|
12200
12193
|
});
|
|
12201
12194
|
|
|
12202
12195
|
_defineProperty(_assertThisInitialized(_this), "renderTrack", function (track, index) {
|
|
12203
|
-
return
|
|
12196
|
+
return _react["default"].createElement("track", _extends({
|
|
12204
12197
|
key: index
|
|
12205
12198
|
}, track));
|
|
12206
12199
|
});
|
|
@@ -12238,10 +12231,6 @@ var FilePlayer = /*#__PURE__*/function (_Component) {
|
|
|
12238
12231
|
key: "componentWillUnmount",
|
|
12239
12232
|
value: function componentWillUnmount() {
|
|
12240
12233
|
this.removeListeners(this.player);
|
|
12241
|
-
|
|
12242
|
-
if (this.hls) {
|
|
12243
|
-
this.hls.destroy();
|
|
12244
|
-
}
|
|
12245
12234
|
}
|
|
12246
12235
|
}, {
|
|
12247
12236
|
key: "addListeners",
|
|
@@ -12372,6 +12361,10 @@ var FilePlayer = /*#__PURE__*/function (_Component) {
|
|
|
12372
12361
|
value: function stop() {
|
|
12373
12362
|
this.player.removeAttribute('src');
|
|
12374
12363
|
|
|
12364
|
+
if (this.hls) {
|
|
12365
|
+
this.hls.destroy();
|
|
12366
|
+
}
|
|
12367
|
+
|
|
12375
12368
|
if (this.dash) {
|
|
12376
12369
|
this.dash.reset();
|
|
12377
12370
|
}
|
|
@@ -12483,7 +12476,7 @@ var FilePlayer = /*#__PURE__*/function (_Component) {
|
|
|
12483
12476
|
width: width === 'auto' ? width : '100%',
|
|
12484
12477
|
height: height === 'auto' ? height : '100%'
|
|
12485
12478
|
};
|
|
12486
|
-
return
|
|
12479
|
+
return _react["default"].createElement(Element, _extends({
|
|
12487
12480
|
ref: this.ref,
|
|
12488
12481
|
src: this.getSource(url),
|
|
12489
12482
|
style: style,
|
|
@@ -12573,16 +12566,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
12573
12566
|
|
|
12574
12567
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
12575
12568
|
|
|
12576
|
-
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); }; }
|
|
12577
|
-
|
|
12578
12569
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
12579
12570
|
|
|
12580
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
12581
|
-
|
|
12582
|
-
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; } }
|
|
12583
|
-
|
|
12584
12571
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
12585
12572
|
|
|
12573
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
12574
|
+
|
|
12586
12575
|
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); }
|
|
12587
12576
|
|
|
12588
12577
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -12591,12 +12580,14 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
12591
12580
|
|
|
12592
12581
|
var ICON_SIZE = '64px';
|
|
12593
12582
|
|
|
12594
|
-
var Preview =
|
|
12583
|
+
var Preview =
|
|
12584
|
+
/*#__PURE__*/
|
|
12585
|
+
function (_Component) {
|
|
12595
12586
|
_inherits(Preview, _Component);
|
|
12596
12587
|
|
|
12597
|
-
var _super = _createSuper(Preview);
|
|
12598
|
-
|
|
12599
12588
|
function Preview() {
|
|
12589
|
+
var _getPrototypeOf2;
|
|
12590
|
+
|
|
12600
12591
|
var _this;
|
|
12601
12592
|
|
|
12602
12593
|
_classCallCheck(this, Preview);
|
|
@@ -12605,7 +12596,7 @@ var Preview = /*#__PURE__*/function (_Component) {
|
|
|
12605
12596
|
args[_key] = arguments[_key];
|
|
12606
12597
|
}
|
|
12607
12598
|
|
|
12608
|
-
_this =
|
|
12599
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Preview)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
12609
12600
|
|
|
12610
12601
|
_defineProperty(_assertThisInitialized(_this), "mounted", false);
|
|
12611
12602
|
|
|
@@ -12703,15 +12694,15 @@ var Preview = /*#__PURE__*/function (_Component) {
|
|
|
12703
12694
|
}
|
|
12704
12695
|
};
|
|
12705
12696
|
|
|
12706
|
-
var defaultPlayIcon =
|
|
12697
|
+
var defaultPlayIcon = _react["default"].createElement("div", {
|
|
12707
12698
|
style: styles.shadow,
|
|
12708
12699
|
className: "react-player__shadow"
|
|
12709
|
-
},
|
|
12700
|
+
}, _react["default"].createElement("div", {
|
|
12710
12701
|
style: styles.playIcon,
|
|
12711
12702
|
className: "react-player__play-icon"
|
|
12712
12703
|
}));
|
|
12713
12704
|
|
|
12714
|
-
return
|
|
12705
|
+
return _react["default"].createElement("div", {
|
|
12715
12706
|
style: styles.preview,
|
|
12716
12707
|
className: "react-player__preview",
|
|
12717
12708
|
onClick: onClick
|
|
@@ -12748,12 +12739,6 @@ var _Player = _interopRequireDefault(Player_1);
|
|
|
12748
12739
|
|
|
12749
12740
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
12750
12741
|
|
|
12751
|
-
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; } } }; }
|
|
12752
|
-
|
|
12753
|
-
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); }
|
|
12754
|
-
|
|
12755
|
-
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; }
|
|
12756
|
-
|
|
12757
12742
|
var PRELOAD_PLAYERS = [{
|
|
12758
12743
|
Player: YouTube_1.YouTube,
|
|
12759
12744
|
configKey: 'youtube',
|
|
@@ -12774,16 +12759,16 @@ var PRELOAD_PLAYERS = [{
|
|
|
12774
12759
|
|
|
12775
12760
|
function renderPreloadPlayers(url, controls, config) {
|
|
12776
12761
|
var players = [];
|
|
12777
|
-
|
|
12778
|
-
var
|
|
12779
|
-
|
|
12762
|
+
var _iteratorNormalCompletion = true;
|
|
12763
|
+
var _didIteratorError = false;
|
|
12764
|
+
var _iteratorError = undefined;
|
|
12780
12765
|
|
|
12781
12766
|
try {
|
|
12782
|
-
for (_iterator.
|
|
12767
|
+
for (var _iterator = PRELOAD_PLAYERS[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
12783
12768
|
var player = _step.value;
|
|
12784
12769
|
|
|
12785
12770
|
if (!player.Player.canPlay(url) && config[player.configKey].preload) {
|
|
12786
|
-
players.push(
|
|
12771
|
+
players.push(_react["default"].createElement(_Player["default"], {
|
|
12787
12772
|
key: player.Player.displayName,
|
|
12788
12773
|
activePlayer: player.Player,
|
|
12789
12774
|
url: player.url,
|
|
@@ -12795,9 +12780,18 @@ function renderPreloadPlayers(url, controls, config) {
|
|
|
12795
12780
|
}
|
|
12796
12781
|
}
|
|
12797
12782
|
} catch (err) {
|
|
12798
|
-
|
|
12783
|
+
_didIteratorError = true;
|
|
12784
|
+
_iteratorError = err;
|
|
12799
12785
|
} finally {
|
|
12800
|
-
|
|
12786
|
+
try {
|
|
12787
|
+
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
|
|
12788
|
+
_iterator["return"]();
|
|
12789
|
+
}
|
|
12790
|
+
} finally {
|
|
12791
|
+
if (_didIteratorError) {
|
|
12792
|
+
throw _iteratorError;
|
|
12793
|
+
}
|
|
12794
|
+
}
|
|
12801
12795
|
}
|
|
12802
12796
|
|
|
12803
12797
|
return players;
|
|
@@ -12921,17 +12915,13 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
12921
12915
|
|
|
12922
12916
|
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); }
|
|
12923
12917
|
|
|
12924
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) ||
|
|
12918
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
|
|
12925
12919
|
|
|
12926
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance
|
|
12920
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
|
|
12927
12921
|
|
|
12928
|
-
function
|
|
12922
|
+
function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
|
|
12929
12923
|
|
|
12930
|
-
function
|
|
12931
|
-
|
|
12932
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
12933
|
-
|
|
12934
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
12924
|
+
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; } }
|
|
12935
12925
|
|
|
12936
12926
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
12937
12927
|
|
|
@@ -12939,16 +12929,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
12939
12929
|
|
|
12940
12930
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
12941
12931
|
|
|
12942
|
-
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); }; }
|
|
12943
|
-
|
|
12944
12932
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
12945
12933
|
|
|
12946
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
12947
|
-
|
|
12948
|
-
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; } }
|
|
12949
|
-
|
|
12950
12934
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
12951
12935
|
|
|
12936
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
12937
|
+
|
|
12952
12938
|
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); }
|
|
12953
12939
|
|
|
12954
12940
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -12958,12 +12944,14 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
12958
12944
|
var SUPPORTED_PROPS = Object.keys(props.propTypes);
|
|
12959
12945
|
var customPlayers = [];
|
|
12960
12946
|
|
|
12961
|
-
var ReactPlayer =
|
|
12947
|
+
var ReactPlayer =
|
|
12948
|
+
/*#__PURE__*/
|
|
12949
|
+
function (_Component) {
|
|
12962
12950
|
_inherits(ReactPlayer, _Component);
|
|
12963
12951
|
|
|
12964
|
-
var _super = _createSuper(ReactPlayer);
|
|
12965
|
-
|
|
12966
12952
|
function ReactPlayer() {
|
|
12953
|
+
var _getPrototypeOf2;
|
|
12954
|
+
|
|
12967
12955
|
var _this;
|
|
12968
12956
|
|
|
12969
12957
|
_classCallCheck(this, ReactPlayer);
|
|
@@ -12972,7 +12960,7 @@ var ReactPlayer = /*#__PURE__*/function (_Component) {
|
|
|
12972
12960
|
args[_key] = arguments[_key];
|
|
12973
12961
|
}
|
|
12974
12962
|
|
|
12975
|
-
_this =
|
|
12963
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(ReactPlayer)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
12976
12964
|
|
|
12977
12965
|
_defineProperty(_assertThisInitialized(_this), "config", (0, utils.getConfig)(_this.props, props.defaultProps, true));
|
|
12978
12966
|
|
|
@@ -13083,7 +13071,7 @@ var ReactPlayer = /*#__PURE__*/function (_Component) {
|
|
|
13083
13071
|
key: "renderActivePlayer",
|
|
13084
13072
|
value: function renderActivePlayer(url, activePlayer) {
|
|
13085
13073
|
if (!url) return null;
|
|
13086
|
-
return
|
|
13074
|
+
return _react["default"].createElement(_Player4["default"], _extends({}, this.props, {
|
|
13087
13075
|
key: activePlayer.displayName,
|
|
13088
13076
|
ref: this.activePlayerRef,
|
|
13089
13077
|
config: this.config,
|
|
@@ -13120,14 +13108,14 @@ var ReactPlayer = /*#__PURE__*/function (_Component) {
|
|
|
13120
13108
|
var preloadPlayers = (0, _preload["default"])(url, controls, this.config);
|
|
13121
13109
|
var players = [renderedActivePlayer].concat(_toConsumableArray(preloadPlayers)).sort(this.sortPlayers);
|
|
13122
13110
|
|
|
13123
|
-
var preview =
|
|
13111
|
+
var preview = _react["default"].createElement(_Preview["default"], {
|
|
13124
13112
|
url: url,
|
|
13125
13113
|
light: light,
|
|
13126
13114
|
playIcon: playIcon,
|
|
13127
13115
|
onClick: this.handleClickPreview
|
|
13128
13116
|
});
|
|
13129
13117
|
|
|
13130
|
-
return
|
|
13118
|
+
return _react["default"].createElement(Wrapper, _extends({
|
|
13131
13119
|
ref: this.wrapperRef,
|
|
13132
13120
|
style: _objectSpread({}, style, {
|
|
13133
13121
|
width: width,
|
|
@@ -14475,16 +14463,16 @@ var RelatedTopicsDropdown = function RelatedTopicsDropdown(_ref) {
|
|
|
14475
14463
|
_ref$className = _ref.className,
|
|
14476
14464
|
className = _ref$className === undefined ? '' : _ref$className;
|
|
14477
14465
|
|
|
14478
|
-
/*
|
|
14479
|
-
Props accepted - parentTaxonomy(required, object), subTaxonomy(required, array), page(optional), exclude(optional), variant(optional), className(optional)
|
|
14480
|
-
example:
|
|
14481
|
-
<RelatedTopicDropdown
|
|
14482
|
-
page='/clinical'
|
|
14483
|
-
exclude="clinical"
|
|
14484
|
-
className='mb-3'
|
|
14485
|
-
parentTaxonomy={props.parentTaxonomy}
|
|
14486
|
-
subTaxonomies={props.subTaxonomies}
|
|
14487
|
-
/>
|
|
14466
|
+
/*
|
|
14467
|
+
Props accepted - parentTaxonomy(required, object), subTaxonomy(required, array), page(optional), exclude(optional), variant(optional), className(optional)
|
|
14468
|
+
example:
|
|
14469
|
+
<RelatedTopicDropdown
|
|
14470
|
+
page='/clinical'
|
|
14471
|
+
exclude="clinical"
|
|
14472
|
+
className='mb-3'
|
|
14473
|
+
parentTaxonomy={props.parentTaxonomy}
|
|
14474
|
+
subTaxonomies={props.subTaxonomies}
|
|
14475
|
+
/>
|
|
14488
14476
|
*/
|
|
14489
14477
|
if (subTaxonomies.length === 0 && parentTaxonomy) {
|
|
14490
14478
|
if (parentTaxonomy.identifier == exclude) {
|
|
@@ -14522,19 +14510,19 @@ var RelatedTopicsDropdown = function RelatedTopicsDropdown(_ref) {
|
|
|
14522
14510
|
}
|
|
14523
14511
|
};
|
|
14524
14512
|
|
|
14525
|
-
/*
|
|
14526
|
-
This dropdown is used inside Article body to display related content placement pages
|
|
14527
|
-
sample usage: <ArticleDetailDropdown contentPlacement={content_placement} exclude={['News',]} />
|
|
14528
|
-
|
|
14529
|
-
in article query, need to add '...' to content_placement to retreive additional info needed
|
|
14530
|
-
|
|
14531
|
-
'content_placement': taxonomyMapping[]-> {
|
|
14532
|
-
...,
|
|
14533
|
-
'ancestor': parent->parent->identifier,
|
|
14534
|
-
'parent': parent->identifier,
|
|
14535
|
-
'path': identifier
|
|
14536
|
-
}
|
|
14537
|
-
|
|
14513
|
+
/*
|
|
14514
|
+
This dropdown is used inside Article body to display related content placement pages
|
|
14515
|
+
sample usage: <ArticleDetailDropdown contentPlacement={content_placement} exclude={['News',]} />
|
|
14516
|
+
|
|
14517
|
+
in article query, need to add '...' to content_placement to retreive additional info needed
|
|
14518
|
+
|
|
14519
|
+
'content_placement': taxonomyMapping[]-> {
|
|
14520
|
+
...,
|
|
14521
|
+
'ancestor': parent->parent->identifier,
|
|
14522
|
+
'parent': parent->identifier,
|
|
14523
|
+
'path': identifier
|
|
14524
|
+
}
|
|
14525
|
+
|
|
14538
14526
|
*/
|
|
14539
14527
|
|
|
14540
14528
|
var ArticleDetailDropdown = function ArticleDetailDropdown(props) {
|
|
@@ -15205,34 +15193,34 @@ var YahooHero = function YahooHero(props) {
|
|
|
15205
15193
|
);
|
|
15206
15194
|
};
|
|
15207
15195
|
|
|
15208
|
-
/*
|
|
15209
|
-
Sample query
|
|
15210
|
-
let references = ''
|
|
15211
|
-
if(article.taxonomyMapping.length > 0){
|
|
15212
|
-
article.taxonomyMapping.forEach((ref, index) => {
|
|
15213
|
-
references = references + `references('${ref._ref}') `
|
|
15214
|
-
if(index+1 !== article.taxonomyMapping.length){
|
|
15215
|
-
references = references + ` && `
|
|
15216
|
-
}
|
|
15217
|
-
})
|
|
15218
|
-
}
|
|
15219
|
-
|
|
15220
|
-
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] {
|
|
15221
|
-
...,
|
|
15222
|
-
title,
|
|
15223
|
-
summary,
|
|
15224
|
-
thumbnail,
|
|
15225
|
-
url,
|
|
15226
|
-
published,
|
|
15227
|
-
authorMapping[]->,
|
|
15228
|
-
contentCategory->
|
|
15229
|
-
}`
|
|
15230
|
-
const relatedArticles = await client.fetch(relatedArticlesQuery)
|
|
15231
|
-
|
|
15232
|
-
Sample usage
|
|
15233
|
-
<RelatedContent dataRecord={props.relatedArticles} client={client} showAuthor showPublished reverse/>
|
|
15234
|
-
|
|
15235
|
-
|
|
15196
|
+
/*
|
|
15197
|
+
Sample query
|
|
15198
|
+
let references = ''
|
|
15199
|
+
if(article.taxonomyMapping.length > 0){
|
|
15200
|
+
article.taxonomyMapping.forEach((ref, index) => {
|
|
15201
|
+
references = references + `references('${ref._ref}') `
|
|
15202
|
+
if(index+1 !== article.taxonomyMapping.length){
|
|
15203
|
+
references = references + ` && `
|
|
15204
|
+
}
|
|
15205
|
+
})
|
|
15206
|
+
}
|
|
15207
|
+
|
|
15208
|
+
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] {
|
|
15209
|
+
...,
|
|
15210
|
+
title,
|
|
15211
|
+
summary,
|
|
15212
|
+
thumbnail,
|
|
15213
|
+
url,
|
|
15214
|
+
published,
|
|
15215
|
+
authorMapping[]->,
|
|
15216
|
+
contentCategory->
|
|
15217
|
+
}`
|
|
15218
|
+
const relatedArticles = await client.fetch(relatedArticlesQuery)
|
|
15219
|
+
|
|
15220
|
+
Sample usage
|
|
15221
|
+
<RelatedContent dataRecord={props.relatedArticles} client={client} showAuthor showPublished reverse/>
|
|
15222
|
+
|
|
15223
|
+
|
|
15236
15224
|
*/
|
|
15237
15225
|
var RelatedContent = function RelatedContent(props) {
|
|
15238
15226
|
var client = props.client,
|
|
@@ -15299,21 +15287,21 @@ var RelatedContent = function RelatedContent(props) {
|
|
|
15299
15287
|
);
|
|
15300
15288
|
};
|
|
15301
15289
|
|
|
15302
|
-
/*
|
|
15303
|
-
Example usage - targetedonc.com/latest-conference
|
|
15304
|
-
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] {
|
|
15305
|
-
...,
|
|
15306
|
-
title,
|
|
15307
|
-
summary,
|
|
15308
|
-
thumbnail,
|
|
15309
|
-
url,
|
|
15310
|
-
published,
|
|
15311
|
-
documentGroup->,
|
|
15312
|
-
contentCategory->,
|
|
15313
|
-
'pageNumber': ${currentPage}
|
|
15314
|
-
}`
|
|
15315
|
-
|
|
15316
|
-
const posts = await client.fetch(query, params)
|
|
15290
|
+
/*
|
|
15291
|
+
Example usage - targetedonc.com/latest-conference
|
|
15292
|
+
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] {
|
|
15293
|
+
...,
|
|
15294
|
+
title,
|
|
15295
|
+
summary,
|
|
15296
|
+
thumbnail,
|
|
15297
|
+
url,
|
|
15298
|
+
published,
|
|
15299
|
+
documentGroup->,
|
|
15300
|
+
contentCategory->,
|
|
15301
|
+
'pageNumber': ${currentPage}
|
|
15302
|
+
}`
|
|
15303
|
+
|
|
15304
|
+
const posts = await client.fetch(query, params)
|
|
15317
15305
|
*/
|
|
15318
15306
|
|
|
15319
15307
|
var ConferenceArticleCard = function ConferenceArticleCard(props) {
|