@mjhls/mjh-framework 1.0.193 → 1.0.194
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 +1 -1
- package/dist/index.es.js +221 -238
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +220 -237
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -769,6 +769,8 @@ var DFPManager = Object.assign(new EventEmitter.EventEmitter().setMaxListeners(0
|
|
|
769
769
|
|
|
770
770
|
return new Promise(function (resolve) {
|
|
771
771
|
_this3.getGoogletag().then(function (googletag) {
|
|
772
|
+
_this3.configureInitialOptions(googletag);
|
|
773
|
+
|
|
772
774
|
slotsToInitialize.forEach(function (currentSlotId) {
|
|
773
775
|
registeredSlots[currentSlotId].loading = false;
|
|
774
776
|
googletag.cmd.push(function () {
|
|
@@ -832,14 +834,25 @@ var DFPManager = Object.assign(new EventEmitter.EventEmitter().setMaxListeners(0
|
|
|
832
834
|
});
|
|
833
835
|
});
|
|
834
836
|
},
|
|
835
|
-
|
|
837
|
+
// configure those gpt parameters that need to be set before pubsads service
|
|
838
|
+
// initialization.
|
|
839
|
+
configureInitialOptions: function configureInitialOptions(googletag) {
|
|
836
840
|
var _this4 = this;
|
|
837
841
|
|
|
842
|
+
googletag.cmd.push(function () {
|
|
843
|
+
if (_this4.disableInitialLoadIsEnabled()) {
|
|
844
|
+
googletag.pubads().disableInitialLoad();
|
|
845
|
+
}
|
|
846
|
+
});
|
|
847
|
+
},
|
|
848
|
+
configureOptions: function configureOptions(googletag) {
|
|
849
|
+
var _this5 = this;
|
|
850
|
+
|
|
838
851
|
googletag.cmd.push(function () {
|
|
839
852
|
var pubadsService = googletag.pubads();
|
|
840
|
-
pubadsService.setRequestNonPersonalizedAds(
|
|
853
|
+
pubadsService.setRequestNonPersonalizedAds(_this5.personalizedAdsEnabled() ? 0 : 1);
|
|
841
854
|
|
|
842
|
-
var targetingArguments =
|
|
855
|
+
var targetingArguments = _this5.getTargetingArguments(); // set global targetting arguments
|
|
843
856
|
|
|
844
857
|
|
|
845
858
|
Object.keys(targetingArguments).forEach(function (varName) {
|
|
@@ -848,16 +861,16 @@ var DFPManager = Object.assign(new EventEmitter.EventEmitter().setMaxListeners(0
|
|
|
848
861
|
}
|
|
849
862
|
}); // set global adSense attributes
|
|
850
863
|
|
|
851
|
-
var adSenseAttributes =
|
|
864
|
+
var adSenseAttributes = _this5.getAdSenseAttributes();
|
|
852
865
|
|
|
853
866
|
Object.keys(adSenseAttributes).forEach(function (key) {
|
|
854
867
|
pubadsService.set(key, adSenseAttributes[key]);
|
|
855
868
|
});
|
|
856
869
|
|
|
857
|
-
if (
|
|
870
|
+
if (_this5.lazyLoadIsEnabled()) {
|
|
858
871
|
var args = [];
|
|
859
872
|
|
|
860
|
-
var config =
|
|
873
|
+
var config = _this5.getLazyLoadConfig();
|
|
861
874
|
|
|
862
875
|
if (config !== null) {
|
|
863
876
|
args.push(config);
|
|
@@ -866,16 +879,12 @@ var DFPManager = Object.assign(new EventEmitter.EventEmitter().setMaxListeners(0
|
|
|
866
879
|
pubadsService.enableLazyLoad.call(args);
|
|
867
880
|
}
|
|
868
881
|
|
|
869
|
-
if (
|
|
882
|
+
if (_this5.singleRequestIsEnabled()) {
|
|
870
883
|
pubadsService.enableSingleRequest();
|
|
871
884
|
}
|
|
872
885
|
|
|
873
|
-
if (
|
|
874
|
-
pubadsService.
|
|
875
|
-
}
|
|
876
|
-
|
|
877
|
-
if (_this4.collapseEmptyDivs === true || _this4.collapseEmptyDivs === false) {
|
|
878
|
-
pubadsService.collapseEmptyDivs(_this4.collapseEmptyDivs);
|
|
886
|
+
if (_this5.collapseEmptyDivs === true || _this5.collapseEmptyDivs === false) {
|
|
887
|
+
pubadsService.collapseEmptyDivs(_this5.collapseEmptyDivs);
|
|
879
888
|
}
|
|
880
889
|
});
|
|
881
890
|
},
|
|
@@ -917,10 +926,10 @@ var DFPManager = Object.assign(new EventEmitter.EventEmitter().setMaxListeners(0
|
|
|
917
926
|
}
|
|
918
927
|
},
|
|
919
928
|
gptRefreshAds: function gptRefreshAds(slots) {
|
|
920
|
-
var
|
|
929
|
+
var _this6 = this;
|
|
921
930
|
|
|
922
931
|
return this.getGoogletag().then(function (googletag) {
|
|
923
|
-
|
|
932
|
+
_this6.configureOptions(googletag);
|
|
924
933
|
|
|
925
934
|
googletag.cmd.push(function () {
|
|
926
935
|
var pubadsService = googletag.pubads();
|
|
@@ -931,14 +940,14 @@ var DFPManager = Object.assign(new EventEmitter.EventEmitter().setMaxListeners(0
|
|
|
931
940
|
});
|
|
932
941
|
},
|
|
933
942
|
reload: function reload() {
|
|
934
|
-
var
|
|
943
|
+
var _this7 = this;
|
|
935
944
|
|
|
936
945
|
return this.destroyGPTSlots.apply(this, arguments).then(function () {
|
|
937
|
-
return
|
|
946
|
+
return _this7.load();
|
|
938
947
|
});
|
|
939
948
|
},
|
|
940
949
|
destroyGPTSlots: function destroyGPTSlots() {
|
|
941
|
-
var
|
|
950
|
+
var _this8 = this;
|
|
942
951
|
|
|
943
952
|
for (var _len4 = arguments.length, slotsToDestroy = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
944
953
|
slotsToDestroy[_key4] = arguments[_key4];
|
|
@@ -958,7 +967,7 @@ var DFPManager = Object.assign(new EventEmitter.EventEmitter().setMaxListeners(0
|
|
|
958
967
|
slots.push(slot);
|
|
959
968
|
}
|
|
960
969
|
|
|
961
|
-
|
|
970
|
+
_this8.getGoogletag().then(function (googletag) {
|
|
962
971
|
googletag.cmd.push(function () {
|
|
963
972
|
if (managerAlreadyInitialized === true) {
|
|
964
973
|
if (slotsToDestroy.length > 0) {
|
|
@@ -981,7 +990,7 @@ var DFPManager = Object.assign(new EventEmitter.EventEmitter().setMaxListeners(0
|
|
|
981
990
|
});
|
|
982
991
|
},
|
|
983
992
|
registerSlot: function registerSlot(_ref) {
|
|
984
|
-
var
|
|
993
|
+
var _this9 = this;
|
|
985
994
|
|
|
986
995
|
var slotId = _ref.slotId,
|
|
987
996
|
dfpNetworkId = _ref.dfpNetworkId,
|
|
@@ -1020,7 +1029,7 @@ var DFPManager = Object.assign(new EventEmitter.EventEmitter().setMaxListeners(0
|
|
|
1020
1029
|
gptSlot = slot.gptSlot;
|
|
1021
1030
|
|
|
1022
1031
|
if (loading === false && !gptSlot) {
|
|
1023
|
-
|
|
1032
|
+
_this9.load(slotId);
|
|
1024
1033
|
}
|
|
1025
1034
|
}
|
|
1026
1035
|
});
|
|
@@ -7948,6 +7957,7 @@ exports.SPEC_NAME_TO_URL_NAME_MAPPINGS = [
|
|
|
7948
7957
|
['quality', 'q'],
|
|
7949
7958
|
['fit', 'fit'],
|
|
7950
7959
|
['crop', 'crop'],
|
|
7960
|
+
['saturation', 'sat'],
|
|
7951
7961
|
['auto', 'auto'],
|
|
7952
7962
|
['dpr', 'dpr']
|
|
7953
7963
|
];
|
|
@@ -7984,9 +7994,9 @@ function urlForImage(options) {
|
|
|
7984
7994
|
// If irrelevant, or if we are requested to: don't perform crop/fit based on
|
|
7985
7995
|
// the crop/hotspot.
|
|
7986
7996
|
if (!(spec.rect || spec.focalPoint || spec.ignoreImageParams || spec.crop)) {
|
|
7987
|
-
spec = __assign({}, spec, fit({ crop: crop, hotspot: hotspot }, spec));
|
|
7997
|
+
spec = __assign(__assign({}, spec), fit({ crop: crop, hotspot: hotspot }, spec));
|
|
7988
7998
|
}
|
|
7989
|
-
return specToImageUrl(__assign({}, spec, { asset: asset }));
|
|
7999
|
+
return specToImageUrl(__assign(__assign({}, spec), { asset: asset }));
|
|
7990
8000
|
}
|
|
7991
8001
|
exports.default = urlForImage;
|
|
7992
8002
|
// eslint-disable-next-line complexity
|
|
@@ -8008,7 +8018,7 @@ function specToImageUrl(spec) {
|
|
|
8008
8018
|
}
|
|
8009
8019
|
if (spec.focalPoint) {
|
|
8010
8020
|
params.push("fp-x=" + spec.focalPoint.x);
|
|
8011
|
-
params.push("fp-
|
|
8021
|
+
params.push("fp-y=" + spec.focalPoint.y);
|
|
8012
8022
|
}
|
|
8013
8023
|
var flip = [spec.flipHorizontal && 'h', spec.flipVertical && 'v'].filter(Boolean).join('');
|
|
8014
8024
|
if (flip) {
|
|
@@ -8142,7 +8152,8 @@ function urlBuilder(options) {
|
|
|
8142
8152
|
var client = options;
|
|
8143
8153
|
if (isSanityClient(client)) {
|
|
8144
8154
|
// Inherit config from client
|
|
8145
|
-
var _a = client.clientConfig,
|
|
8155
|
+
var _a = client.clientConfig, apiUrl = _a.apiHost, projectId = _a.projectId, dataset = _a.dataset;
|
|
8156
|
+
var apiHost = apiUrl || 'https://api.sanity.io';
|
|
8146
8157
|
return new ImageUrlBuilder(null, {
|
|
8147
8158
|
baseUrl: apiHost.replace(/^https:\/\/api\./, 'https://cdn.'),
|
|
8148
8159
|
projectId: projectId,
|
|
@@ -8156,7 +8167,7 @@ exports.default = urlBuilder;
|
|
|
8156
8167
|
var ImageUrlBuilder = /** @class */ (function () {
|
|
8157
8168
|
function ImageUrlBuilder(parent, options) {
|
|
8158
8169
|
this.options = parent
|
|
8159
|
-
? __assign({}, (parent.options || {}), (options || {})) : __assign({}, (options || {})); // Copy options
|
|
8170
|
+
? __assign(__assign({}, (parent.options || {})), (options || {})) : __assign({}, (options || {})); // Copy options
|
|
8160
8171
|
}
|
|
8161
8172
|
ImageUrlBuilder.prototype.withOptions = function (options) {
|
|
8162
8173
|
var baseUrl = options.baseUrl || '';
|
|
@@ -8273,6 +8284,10 @@ var ImageUrlBuilder = /** @class */ (function () {
|
|
|
8273
8284
|
}
|
|
8274
8285
|
return this.withOptions({ crop: value });
|
|
8275
8286
|
};
|
|
8287
|
+
// Saturation
|
|
8288
|
+
ImageUrlBuilder.prototype.saturation = function (saturation) {
|
|
8289
|
+
return this.withOptions({ saturation: saturation });
|
|
8290
|
+
};
|
|
8276
8291
|
ImageUrlBuilder.prototype.auto = function (value) {
|
|
8277
8292
|
if (validAutoModes.indexOf(value) === -1) {
|
|
8278
8293
|
throw new Error("Invalid auto mode \"" + value + "\"");
|
|
@@ -8289,10 +8304,12 @@ var ImageUrlBuilder = /** @class */ (function () {
|
|
|
8289
8304
|
};
|
|
8290
8305
|
return ImageUrlBuilder;
|
|
8291
8306
|
}());
|
|
8307
|
+
exports.ImageUrlBuilder = ImageUrlBuilder;
|
|
8292
8308
|
|
|
8293
8309
|
});
|
|
8294
8310
|
|
|
8295
8311
|
unwrapExports(builder);
|
|
8312
|
+
var builder_1 = builder.ImageUrlBuilder;
|
|
8296
8313
|
|
|
8297
8314
|
var node = createCommonjsModule(function (module) {
|
|
8298
8315
|
var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
|
|
@@ -17349,21 +17366,18 @@ var Slideshow = function Slideshow(_ref) {
|
|
|
17349
17366
|
);
|
|
17350
17367
|
};
|
|
17351
17368
|
|
|
17352
|
-
|
|
17353
|
-
|
|
17354
|
-
|
|
17369
|
+
// do not edit .js files directly - edit src/index.jst
|
|
17370
|
+
|
|
17371
|
+
|
|
17355
17372
|
|
|
17356
17373
|
var fastDeepEqual = function equal(a, b) {
|
|
17357
17374
|
if (a === b) return true;
|
|
17358
17375
|
|
|
17359
17376
|
if (a && b && typeof a == 'object' && typeof b == 'object') {
|
|
17360
|
-
|
|
17361
|
-
, arrB = isArray$1(b)
|
|
17362
|
-
, i
|
|
17363
|
-
, length
|
|
17364
|
-
, key;
|
|
17377
|
+
if (a.constructor !== b.constructor) return false;
|
|
17365
17378
|
|
|
17366
|
-
|
|
17379
|
+
var length, i, keys;
|
|
17380
|
+
if (Array.isArray(a)) {
|
|
17367
17381
|
length = a.length;
|
|
17368
17382
|
if (length != b.length) return false;
|
|
17369
17383
|
for (i = length; i-- !== 0;)
|
|
@@ -17371,35 +17385,29 @@ var fastDeepEqual = function equal(a, b) {
|
|
|
17371
17385
|
return true;
|
|
17372
17386
|
}
|
|
17373
17387
|
|
|
17374
|
-
if (arrA != arrB) return false;
|
|
17375
17388
|
|
|
17376
|
-
var dateA = a instanceof Date
|
|
17377
|
-
, dateB = b instanceof Date;
|
|
17378
|
-
if (dateA != dateB) return false;
|
|
17379
|
-
if (dateA && dateB) return a.getTime() == b.getTime();
|
|
17380
17389
|
|
|
17381
|
-
|
|
17382
|
-
|
|
17383
|
-
if (
|
|
17384
|
-
if (regexpA && regexpB) return a.toString() == b.toString();
|
|
17390
|
+
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
|
|
17391
|
+
if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
|
|
17392
|
+
if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
|
|
17385
17393
|
|
|
17386
|
-
|
|
17394
|
+
keys = Object.keys(a);
|
|
17387
17395
|
length = keys.length;
|
|
17388
|
-
|
|
17389
|
-
if (length !== keyList(b).length)
|
|
17390
|
-
return false;
|
|
17396
|
+
if (length !== Object.keys(b).length) return false;
|
|
17391
17397
|
|
|
17392
17398
|
for (i = length; i-- !== 0;)
|
|
17393
|
-
if (!
|
|
17399
|
+
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
|
17394
17400
|
|
|
17395
17401
|
for (i = length; i-- !== 0;) {
|
|
17396
|
-
key = keys[i];
|
|
17402
|
+
var key = keys[i];
|
|
17403
|
+
|
|
17397
17404
|
if (!equal(a[key], b[key])) return false;
|
|
17398
17405
|
}
|
|
17399
17406
|
|
|
17400
17407
|
return true;
|
|
17401
17408
|
}
|
|
17402
17409
|
|
|
17410
|
+
// true if both NaN, false otherwise
|
|
17403
17411
|
return a!==a && b!==b;
|
|
17404
17412
|
};
|
|
17405
17413
|
|
|
@@ -18644,7 +18652,7 @@ function formatValue(ctx, value, recurseTimes) {
|
|
|
18644
18652
|
var base = '', array = false, braces = ['{', '}'];
|
|
18645
18653
|
|
|
18646
18654
|
// Make Array say that they are Array
|
|
18647
|
-
if (isArray$
|
|
18655
|
+
if (isArray$1(value)) {
|
|
18648
18656
|
array = true;
|
|
18649
18657
|
braces = ['[', ']'];
|
|
18650
18658
|
}
|
|
@@ -18823,7 +18831,7 @@ function reduceToSingleString(output, base, braces) {
|
|
|
18823
18831
|
|
|
18824
18832
|
// NOTE: These type checking functions intentionally don't use `instanceof`
|
|
18825
18833
|
// because it is fragile and can be easily faked with `Object.create()`.
|
|
18826
|
-
function isArray$
|
|
18834
|
+
function isArray$1(ar) {
|
|
18827
18835
|
return Array.isArray(ar);
|
|
18828
18836
|
}
|
|
18829
18837
|
|
|
@@ -18950,7 +18958,7 @@ var util = {
|
|
|
18950
18958
|
isNullOrUndefined: isNullOrUndefined,
|
|
18951
18959
|
isNull: isNull,
|
|
18952
18960
|
isBoolean: isBoolean,
|
|
18953
|
-
isArray: isArray$
|
|
18961
|
+
isArray: isArray$1,
|
|
18954
18962
|
inspect: inspect,
|
|
18955
18963
|
deprecate: deprecate,
|
|
18956
18964
|
format: format,
|
|
@@ -19617,201 +19625,237 @@ module.exports = exports['default'];
|
|
|
19617
19625
|
|
|
19618
19626
|
var youTubePlayer = unwrapExports(dist);
|
|
19619
19627
|
|
|
19620
|
-
|
|
19621
|
-
|
|
19622
|
-
var _extends$1 = 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; };
|
|
19628
|
+
function _typeof$1(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$1 = function _typeof(obj) { return typeof obj; }; } else { _typeof$1 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$1(obj); }
|
|
19623
19629
|
|
|
19624
19630
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19625
19631
|
|
|
19626
|
-
function
|
|
19632
|
+
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); } }
|
|
19633
|
+
|
|
19634
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
19635
|
+
|
|
19636
|
+
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); }; }
|
|
19637
|
+
|
|
19638
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof$1(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
19639
|
+
|
|
19640
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
19641
|
+
|
|
19642
|
+
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; } }
|
|
19643
|
+
|
|
19644
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
19645
|
+
|
|
19646
|
+
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); }
|
|
19647
|
+
|
|
19648
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
19649
|
+
|
|
19650
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
19627
19651
|
|
|
19628
|
-
function
|
|
19652
|
+
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; }
|
|
19629
19653
|
|
|
19630
|
-
|
|
19631
|
-
|
|
19632
|
-
*
|
|
19633
|
-
*
|
|
19634
|
-
* @param {Object}
|
|
19654
|
+
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; }
|
|
19655
|
+
/**
|
|
19656
|
+
* Check whether a `props` change should result in the video being updated.
|
|
19657
|
+
*
|
|
19658
|
+
* @param {Object} prevProps
|
|
19659
|
+
* @param {Object} props
|
|
19635
19660
|
*/
|
|
19661
|
+
|
|
19636
19662
|
function shouldUpdateVideo(prevProps, props) {
|
|
19637
19663
|
// A changing video should always trigger an update
|
|
19638
19664
|
if (prevProps.videoId !== props.videoId) {
|
|
19639
19665
|
return true;
|
|
19640
|
-
}
|
|
19641
|
-
|
|
19642
|
-
// Otherwise, a change in the start/end time playerVars also requires a player
|
|
19666
|
+
} // Otherwise, a change in the start/end time playerVars also requires a player
|
|
19643
19667
|
// update.
|
|
19668
|
+
|
|
19669
|
+
|
|
19644
19670
|
var prevVars = prevProps.opts.playerVars || {};
|
|
19645
19671
|
var vars = props.opts.playerVars || {};
|
|
19646
|
-
|
|
19647
19672
|
return prevVars.start !== vars.start || prevVars.end !== vars.end;
|
|
19648
19673
|
}
|
|
19649
|
-
|
|
19650
|
-
|
|
19651
|
-
*
|
|
19652
|
-
*
|
|
19653
|
-
*
|
|
19654
|
-
*
|
|
19655
|
-
* @param {Object} opts
|
|
19674
|
+
/**
|
|
19675
|
+
* Neutralize API options that only require a video update, leaving only options
|
|
19676
|
+
* that require a player reset. The results can then be compared to see if a
|
|
19677
|
+
* player reset is necessary.
|
|
19678
|
+
*
|
|
19679
|
+
* @param {Object} opts
|
|
19656
19680
|
*/
|
|
19681
|
+
|
|
19682
|
+
|
|
19657
19683
|
function filterResetOptions(opts) {
|
|
19658
|
-
return
|
|
19659
|
-
playerVars:
|
|
19684
|
+
return _objectSpread({}, opts, {
|
|
19685
|
+
playerVars: _objectSpread({}, opts.playerVars, {
|
|
19660
19686
|
autoplay: 0,
|
|
19661
19687
|
start: 0,
|
|
19662
19688
|
end: 0
|
|
19663
19689
|
})
|
|
19664
19690
|
});
|
|
19665
19691
|
}
|
|
19666
|
-
|
|
19667
|
-
|
|
19668
|
-
*
|
|
19669
|
-
*
|
|
19670
|
-
*
|
|
19671
|
-
*
|
|
19672
|
-
*
|
|
19673
|
-
* @param {Object}
|
|
19674
|
-
* @param {Object} props
|
|
19692
|
+
/**
|
|
19693
|
+
* Check whether a `props` change should result in the player being reset.
|
|
19694
|
+
* The player is reset when the `props.opts` change, except if the only change
|
|
19695
|
+
* is in the `start` and `end` playerVars, because a video update can deal with
|
|
19696
|
+
* those.
|
|
19697
|
+
*
|
|
19698
|
+
* @param {Object} prevProps
|
|
19699
|
+
* @param {Object} props
|
|
19675
19700
|
*/
|
|
19701
|
+
|
|
19702
|
+
|
|
19676
19703
|
function shouldResetPlayer(prevProps, props) {
|
|
19677
19704
|
return !fastDeepEqual(filterResetOptions(prevProps.opts), filterResetOptions(props.opts));
|
|
19678
19705
|
}
|
|
19679
|
-
|
|
19680
|
-
|
|
19681
|
-
*
|
|
19682
|
-
*
|
|
19683
|
-
* @param {Object}
|
|
19684
|
-
* @param {Object} props
|
|
19706
|
+
/**
|
|
19707
|
+
* Check whether a props change should result in an id or className update.
|
|
19708
|
+
*
|
|
19709
|
+
* @param {Object} prevProps
|
|
19710
|
+
* @param {Object} props
|
|
19685
19711
|
*/
|
|
19712
|
+
|
|
19713
|
+
|
|
19686
19714
|
function shouldUpdatePlayer(prevProps, props) {
|
|
19687
19715
|
return prevProps.id !== props.id || prevProps.className !== props.className;
|
|
19688
19716
|
}
|
|
19689
19717
|
|
|
19690
|
-
var YouTube = function (_React$Component) {
|
|
19718
|
+
var YouTube = /*#__PURE__*/function (_React$Component) {
|
|
19691
19719
|
_inherits(YouTube, _React$Component);
|
|
19692
19720
|
|
|
19721
|
+
var _super = _createSuper(YouTube);
|
|
19722
|
+
|
|
19723
|
+
/**
|
|
19724
|
+
* Expose PlayerState constants for convenience. These constants can also be
|
|
19725
|
+
* accessed through the global YT object after the YouTube IFrame API is instantiated.
|
|
19726
|
+
* https://developers.google.com/youtube/iframe_api_reference#onStateChange
|
|
19727
|
+
*/
|
|
19693
19728
|
function YouTube(props) {
|
|
19729
|
+
var _this;
|
|
19730
|
+
|
|
19694
19731
|
_classCallCheck(this, YouTube);
|
|
19695
19732
|
|
|
19696
|
-
|
|
19733
|
+
_this = _super.call(this, props);
|
|
19697
19734
|
|
|
19698
|
-
_this
|
|
19735
|
+
_defineProperty(_assertThisInitialized(_this), "onPlayerReady", function (event) {
|
|
19699
19736
|
return _this.props.onReady(event);
|
|
19700
|
-
};
|
|
19737
|
+
});
|
|
19701
19738
|
|
|
19702
|
-
_this
|
|
19739
|
+
_defineProperty(_assertThisInitialized(_this), "onPlayerError", function (event) {
|
|
19703
19740
|
return _this.props.onError(event);
|
|
19704
|
-
};
|
|
19741
|
+
});
|
|
19705
19742
|
|
|
19706
|
-
_this
|
|
19743
|
+
_defineProperty(_assertThisInitialized(_this), "onPlayerStateChange", function (event) {
|
|
19707
19744
|
_this.props.onStateChange(event);
|
|
19708
|
-
switch (event.data) {
|
|
19709
19745
|
|
|
19746
|
+
switch (event.data) {
|
|
19710
19747
|
case YouTube.PlayerState.ENDED:
|
|
19711
19748
|
_this.props.onEnd(event);
|
|
19749
|
+
|
|
19712
19750
|
break;
|
|
19713
19751
|
|
|
19714
19752
|
case YouTube.PlayerState.PLAYING:
|
|
19715
19753
|
_this.props.onPlay(event);
|
|
19754
|
+
|
|
19716
19755
|
break;
|
|
19717
19756
|
|
|
19718
19757
|
case YouTube.PlayerState.PAUSED:
|
|
19719
19758
|
_this.props.onPause(event);
|
|
19759
|
+
|
|
19720
19760
|
break;
|
|
19721
19761
|
|
|
19722
19762
|
default:
|
|
19723
19763
|
}
|
|
19724
|
-
};
|
|
19764
|
+
});
|
|
19725
19765
|
|
|
19726
|
-
_this
|
|
19766
|
+
_defineProperty(_assertThisInitialized(_this), "onPlayerPlaybackRateChange", function (event) {
|
|
19727
19767
|
return _this.props.onPlaybackRateChange(event);
|
|
19728
|
-
};
|
|
19768
|
+
});
|
|
19729
19769
|
|
|
19730
|
-
_this
|
|
19770
|
+
_defineProperty(_assertThisInitialized(_this), "onPlayerPlaybackQualityChange", function (event) {
|
|
19731
19771
|
return _this.props.onPlaybackQualityChange(event);
|
|
19732
|
-
};
|
|
19772
|
+
});
|
|
19733
19773
|
|
|
19734
|
-
_this
|
|
19774
|
+
_defineProperty(_assertThisInitialized(_this), "createPlayer", function () {
|
|
19735
19775
|
// do not attempt to create a player server-side, it won't work
|
|
19736
|
-
if (typeof document === 'undefined') return;
|
|
19737
|
-
|
|
19738
|
-
var playerOpts =
|
|
19776
|
+
if (typeof document === 'undefined') return; // create player
|
|
19777
|
+
|
|
19778
|
+
var playerOpts = _objectSpread({}, _this.props.opts, {
|
|
19739
19779
|
// preload the `videoId` video if one is already given
|
|
19740
19780
|
videoId: _this.props.videoId
|
|
19741
19781
|
});
|
|
19742
|
-
|
|
19743
|
-
// attach event handlers
|
|
19782
|
+
|
|
19783
|
+
_this.internalPlayer = youTubePlayer(_this.container, playerOpts); // attach event handlers
|
|
19784
|
+
|
|
19744
19785
|
_this.internalPlayer.on('ready', _this.onPlayerReady);
|
|
19786
|
+
|
|
19745
19787
|
_this.internalPlayer.on('error', _this.onPlayerError);
|
|
19788
|
+
|
|
19746
19789
|
_this.internalPlayer.on('stateChange', _this.onPlayerStateChange);
|
|
19790
|
+
|
|
19747
19791
|
_this.internalPlayer.on('playbackRateChange', _this.onPlayerPlaybackRateChange);
|
|
19792
|
+
|
|
19748
19793
|
_this.internalPlayer.on('playbackQualityChange', _this.onPlayerPlaybackQualityChange);
|
|
19749
|
-
};
|
|
19794
|
+
});
|
|
19750
19795
|
|
|
19751
|
-
_this
|
|
19796
|
+
_defineProperty(_assertThisInitialized(_this), "resetPlayer", function () {
|
|
19752
19797
|
return _this.internalPlayer.destroy().then(_this.createPlayer);
|
|
19753
|
-
};
|
|
19798
|
+
});
|
|
19754
19799
|
|
|
19755
|
-
_this
|
|
19800
|
+
_defineProperty(_assertThisInitialized(_this), "updatePlayer", function () {
|
|
19756
19801
|
_this.internalPlayer.getIframe().then(function (iframe) {
|
|
19757
19802
|
if (_this.props.id) iframe.setAttribute('id', _this.props.id);else iframe.removeAttribute('id');
|
|
19758
19803
|
if (_this.props.className) iframe.setAttribute('class', _this.props.className);else iframe.removeAttribute('class');
|
|
19759
19804
|
});
|
|
19760
|
-
};
|
|
19805
|
+
});
|
|
19761
19806
|
|
|
19762
|
-
_this
|
|
19807
|
+
_defineProperty(_assertThisInitialized(_this), "updateVideo", function () {
|
|
19763
19808
|
if (typeof _this.props.videoId === 'undefined' || _this.props.videoId === null) {
|
|
19764
19809
|
_this.internalPlayer.stopVideo();
|
|
19810
|
+
|
|
19765
19811
|
return;
|
|
19766
|
-
}
|
|
19812
|
+
} // set queueing options
|
|
19813
|
+
|
|
19767
19814
|
|
|
19768
|
-
// set queueing options
|
|
19769
19815
|
var autoplay = false;
|
|
19770
19816
|
var opts = {
|
|
19771
19817
|
videoId: _this.props.videoId
|
|
19772
19818
|
};
|
|
19819
|
+
|
|
19773
19820
|
if ('playerVars' in _this.props.opts) {
|
|
19774
19821
|
autoplay = _this.props.opts.playerVars.autoplay === 1;
|
|
19822
|
+
|
|
19775
19823
|
if ('start' in _this.props.opts.playerVars) {
|
|
19776
19824
|
opts.startSeconds = _this.props.opts.playerVars.start;
|
|
19777
19825
|
}
|
|
19826
|
+
|
|
19778
19827
|
if ('end' in _this.props.opts.playerVars) {
|
|
19779
19828
|
opts.endSeconds = _this.props.opts.playerVars.end;
|
|
19780
19829
|
}
|
|
19781
|
-
}
|
|
19830
|
+
} // if autoplay is enabled loadVideoById
|
|
19831
|
+
|
|
19782
19832
|
|
|
19783
|
-
// if autoplay is enabled loadVideoById
|
|
19784
19833
|
if (autoplay) {
|
|
19785
19834
|
_this.internalPlayer.loadVideoById(opts);
|
|
19835
|
+
|
|
19786
19836
|
return;
|
|
19787
|
-
}
|
|
19788
|
-
|
|
19837
|
+
} // default behaviour just cues the video
|
|
19838
|
+
|
|
19839
|
+
|
|
19789
19840
|
_this.internalPlayer.cueVideoById(opts);
|
|
19790
|
-
};
|
|
19841
|
+
});
|
|
19791
19842
|
|
|
19792
|
-
_this
|
|
19843
|
+
_defineProperty(_assertThisInitialized(_this), "refContainer", function (container) {
|
|
19793
19844
|
_this.container = container;
|
|
19794
|
-
};
|
|
19845
|
+
});
|
|
19795
19846
|
|
|
19796
19847
|
_this.container = null;
|
|
19797
19848
|
_this.internalPlayer = null;
|
|
19798
19849
|
return _this;
|
|
19799
19850
|
}
|
|
19800
19851
|
|
|
19801
|
-
/**
|
|
19802
|
-
* Expose PlayerState constants for convenience. These constants can also be
|
|
19803
|
-
* accessed through the global YT object after the YouTube IFrame API is instantiated.
|
|
19804
|
-
* https://developers.google.com/youtube/iframe_api_reference#onStateChange
|
|
19805
|
-
*/
|
|
19806
|
-
|
|
19807
|
-
|
|
19808
19852
|
_createClass(YouTube, [{
|
|
19809
|
-
key:
|
|
19853
|
+
key: "componentDidMount",
|
|
19810
19854
|
value: function componentDidMount() {
|
|
19811
19855
|
this.createPlayer();
|
|
19812
19856
|
}
|
|
19813
19857
|
}, {
|
|
19814
|
-
key:
|
|
19858
|
+
key: "componentDidUpdate",
|
|
19815
19859
|
value: function componentDidUpdate(prevProps) {
|
|
19816
19860
|
if (shouldUpdatePlayer(prevProps, this.props)) {
|
|
19817
19861
|
this.updatePlayer();
|
|
@@ -19826,112 +19870,58 @@ var YouTube = function (_React$Component) {
|
|
|
19826
19870
|
}
|
|
19827
19871
|
}
|
|
19828
19872
|
}, {
|
|
19829
|
-
key:
|
|
19873
|
+
key: "componentWillUnmount",
|
|
19830
19874
|
value: function componentWillUnmount() {
|
|
19831
|
-
/**
|
|
19832
|
-
* Note: The `youtube-player` package that is used promisifies all
|
|
19833
|
-
* Player API calls, which introduces a delay of a tick before it actually
|
|
19834
|
-
* gets destroyed. Since React attempts to remove the element instantly
|
|
19835
|
-
* this method isn't quick enough to reset the container element.
|
|
19875
|
+
/**
|
|
19876
|
+
* Note: The `youtube-player` package that is used promisifies all YouTube
|
|
19877
|
+
* Player API calls, which introduces a delay of a tick before it actually
|
|
19878
|
+
* gets destroyed. Since React attempts to remove the element instantly
|
|
19879
|
+
* this method isn't quick enough to reset the container element.
|
|
19836
19880
|
*/
|
|
19837
19881
|
this.internalPlayer.destroy();
|
|
19838
19882
|
}
|
|
19839
|
-
|
|
19840
|
-
|
|
19841
|
-
*
|
|
19842
|
-
*
|
|
19843
|
-
*
|
|
19844
|
-
* @param {Object} target - player object
|
|
19845
|
-
*/
|
|
19846
|
-
|
|
19847
|
-
|
|
19848
|
-
/**
|
|
19849
|
-
* https://developers.google.com/youtube/iframe_api_reference#onError
|
|
19850
|
-
*
|
|
19851
|
-
* @param {Object} event
|
|
19852
|
-
* @param {Integer} data - error type
|
|
19853
|
-
* @param {Object} target - player object
|
|
19854
|
-
*/
|
|
19855
|
-
|
|
19856
|
-
|
|
19857
|
-
/**
|
|
19858
|
-
* https://developers.google.com/youtube/iframe_api_reference#onStateChange
|
|
19859
|
-
*
|
|
19860
|
-
* @param {Object} event
|
|
19861
|
-
* @param {Integer} data - status change type
|
|
19862
|
-
* @param {Object} target - actual YT player
|
|
19863
|
-
*/
|
|
19864
|
-
|
|
19865
|
-
|
|
19866
|
-
/**
|
|
19867
|
-
* https://developers.google.com/youtube/iframe_api_reference#onPlaybackRateChange
|
|
19868
|
-
*
|
|
19869
|
-
* @param {Object} event
|
|
19870
|
-
* @param {Float} data - playback rate
|
|
19871
|
-
* @param {Object} target - actual YT player
|
|
19872
|
-
*/
|
|
19873
|
-
|
|
19874
|
-
|
|
19875
|
-
/**
|
|
19876
|
-
* https://developers.google.com/youtube/iframe_api_reference#onPlaybackQualityChange
|
|
19877
|
-
*
|
|
19878
|
-
* @param {Object} event
|
|
19879
|
-
* @param {String} data - playback quality
|
|
19880
|
-
* @param {Object} target - actual YT player
|
|
19881
|
-
*/
|
|
19882
|
-
|
|
19883
|
-
|
|
19884
|
-
/**
|
|
19885
|
-
* Initialize the Youtube Player API on the container and attach event handlers
|
|
19886
|
-
*/
|
|
19887
|
-
|
|
19888
|
-
|
|
19889
|
-
/**
|
|
19890
|
-
* Shorthand for destroying and then re-creating the Youtube Player
|
|
19891
|
-
*/
|
|
19892
|
-
|
|
19893
|
-
|
|
19894
|
-
/**
|
|
19895
|
-
* Method to update the id and class of the Youtube Player iframe.
|
|
19896
|
-
* React should update this automatically but since the Youtube Player API
|
|
19897
|
-
* replaced the DIV that is mounted by React we need to do this manually.
|
|
19898
|
-
*/
|
|
19899
|
-
|
|
19900
|
-
|
|
19901
|
-
/**
|
|
19902
|
-
* Call Youtube Player API methods to update the currently playing video.
|
|
19903
|
-
* Depeding on the `opts.playerVars.autoplay` this function uses one of two
|
|
19904
|
-
* Youtube Player API methods to update the video.
|
|
19883
|
+
/**
|
|
19884
|
+
* https://developers.google.com/youtube/iframe_api_reference#onReady
|
|
19885
|
+
*
|
|
19886
|
+
* @param {Object} event
|
|
19887
|
+
* @param {Object} target - player object
|
|
19905
19888
|
*/
|
|
19906
19889
|
|
|
19907
19890
|
}, {
|
|
19908
|
-
key:
|
|
19891
|
+
key: "render",
|
|
19909
19892
|
value: function render() {
|
|
19910
|
-
return React__default.createElement(
|
|
19911
|
-
|
|
19912
|
-
|
|
19913
|
-
|
|
19914
|
-
|
|
19893
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
19894
|
+
className: this.props.containerClassName
|
|
19895
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
19896
|
+
id: this.props.id,
|
|
19897
|
+
className: this.props.className,
|
|
19898
|
+
ref: this.refContainer
|
|
19899
|
+
}));
|
|
19915
19900
|
}
|
|
19916
19901
|
}]);
|
|
19917
19902
|
|
|
19918
19903
|
return YouTube;
|
|
19919
19904
|
}(React__default.Component);
|
|
19920
19905
|
|
|
19906
|
+
_defineProperty(YouTube, "PlayerState", {
|
|
19907
|
+
UNSTARTED: -1,
|
|
19908
|
+
ENDED: 0,
|
|
19909
|
+
PLAYING: 1,
|
|
19910
|
+
PAUSED: 2,
|
|
19911
|
+
BUFFERING: 3,
|
|
19912
|
+
CUED: 5
|
|
19913
|
+
});
|
|
19914
|
+
|
|
19921
19915
|
YouTube.propTypes = {
|
|
19922
19916
|
videoId: PropTypes.string,
|
|
19923
|
-
|
|
19924
19917
|
// custom ID for player element
|
|
19925
19918
|
id: PropTypes.string,
|
|
19926
|
-
|
|
19927
19919
|
// custom class name for player element
|
|
19928
19920
|
className: PropTypes.string,
|
|
19929
19921
|
// custom class name for player container element
|
|
19930
19922
|
containerClassName: PropTypes.string,
|
|
19931
|
-
|
|
19932
19923
|
// https://developers.google.com/youtube/iframe_api_reference#Loading_a_Video_Player
|
|
19933
19924
|
opts: PropTypes.objectOf(PropTypes.any),
|
|
19934
|
-
|
|
19935
19925
|
// event subscriptions
|
|
19936
19926
|
onReady: PropTypes.func,
|
|
19937
19927
|
onError: PropTypes.func,
|
|
@@ -19943,6 +19933,7 @@ YouTube.propTypes = {
|
|
|
19943
19933
|
onPlaybackQualityChange: PropTypes.func
|
|
19944
19934
|
};
|
|
19945
19935
|
YouTube.defaultProps = {
|
|
19936
|
+
videoId: null,
|
|
19946
19937
|
id: null,
|
|
19947
19938
|
className: null,
|
|
19948
19939
|
opts: {},
|
|
@@ -19956,14 +19947,6 @@ YouTube.defaultProps = {
|
|
|
19956
19947
|
onPlaybackRateChange: function onPlaybackRateChange() {},
|
|
19957
19948
|
onPlaybackQualityChange: function onPlaybackQualityChange() {}
|
|
19958
19949
|
};
|
|
19959
|
-
YouTube.PlayerState = {
|
|
19960
|
-
UNSTARTED: -1,
|
|
19961
|
-
ENDED: 0,
|
|
19962
|
-
PLAYING: 1,
|
|
19963
|
-
PAUSED: 2,
|
|
19964
|
-
BUFFERING: 3,
|
|
19965
|
-
CUED: 5
|
|
19966
|
-
};
|
|
19967
19950
|
|
|
19968
19951
|
var YouTubePlayer$1 = function YouTubePlayer(_ref) {
|
|
19969
19952
|
var url = _ref.url;
|
|
@@ -20625,7 +20608,7 @@ function checksum(str) {
|
|
|
20625
20608
|
return hash;
|
|
20626
20609
|
}
|
|
20627
20610
|
|
|
20628
|
-
function _typeof$
|
|
20611
|
+
function _typeof$2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$2 = function _typeof(obj) { return typeof obj; }; } else { _typeof$2 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$2(obj); }
|
|
20629
20612
|
|
|
20630
20613
|
|
|
20631
20614
|
|
|
@@ -20636,7 +20619,7 @@ var isDefined = function isDefined(val) {
|
|
|
20636
20619
|
|
|
20637
20620
|
var mergeSerializers = function mergeSerializers(defaultSerializers, userSerializers) {
|
|
20638
20621
|
return Object.keys(defaultSerializers).reduce(function (acc, key) {
|
|
20639
|
-
var type = _typeof$
|
|
20622
|
+
var type = _typeof$2(defaultSerializers[key]);
|
|
20640
20623
|
|
|
20641
20624
|
if (type === 'function') {
|
|
20642
20625
|
acc[key] = isDefined(userSerializers[key]) ? userSerializers[key] : defaultSerializers[key];
|
|
@@ -21809,8 +21792,8 @@ var window_1 = win;
|
|
|
21809
21792
|
|
|
21810
21793
|
/*! @name @brightcove/react-player-loader @version 1.4.0 @license Apache-2.0 */
|
|
21811
21794
|
|
|
21812
|
-
function _extends$
|
|
21813
|
-
_extends$
|
|
21795
|
+
function _extends$1() {
|
|
21796
|
+
_extends$1 = Object.assign || function (target) {
|
|
21814
21797
|
for (var i = 1; i < arguments.length; i++) {
|
|
21815
21798
|
var source = arguments[i];
|
|
21816
21799
|
|
|
@@ -21824,7 +21807,7 @@ function _extends$2() {
|
|
|
21824
21807
|
return target;
|
|
21825
21808
|
};
|
|
21826
21809
|
|
|
21827
|
-
return _extends$
|
|
21810
|
+
return _extends$1.apply(this, arguments);
|
|
21828
21811
|
}
|
|
21829
21812
|
|
|
21830
21813
|
function _inheritsLoose(subClass, superClass) {
|
|
@@ -21833,7 +21816,7 @@ function _inheritsLoose(subClass, superClass) {
|
|
|
21833
21816
|
subClass.__proto__ = superClass;
|
|
21834
21817
|
}
|
|
21835
21818
|
|
|
21836
|
-
function _assertThisInitialized(self) {
|
|
21819
|
+
function _assertThisInitialized$1(self) {
|
|
21837
21820
|
if (self === void 0) {
|
|
21838
21821
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
21839
21822
|
}
|
|
@@ -21866,7 +21849,7 @@ var version$1 = "1.7.1";
|
|
|
21866
21849
|
/*! @name @brightcove/player-url @version 1.2.0 @license Apache-2.0 */
|
|
21867
21850
|
var version$1$1 = "1.2.0";
|
|
21868
21851
|
|
|
21869
|
-
var _typeof$
|
|
21852
|
+
var _typeof$3 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
|
|
21870
21853
|
return typeof obj;
|
|
21871
21854
|
} : function (obj) {
|
|
21872
21855
|
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
@@ -22001,7 +21984,7 @@ var brightcovePlayerUrl = function brightcovePlayerUrl(_ref) {
|
|
|
22001
21984
|
|
|
22002
21985
|
var qs = '';
|
|
22003
21986
|
|
|
22004
|
-
if (iframe && queryParams && (typeof queryParams === 'undefined' ? 'undefined' : _typeof$
|
|
21987
|
+
if (iframe && queryParams && (typeof queryParams === 'undefined' ? 'undefined' : _typeof$3(queryParams)) === 'object') {
|
|
22005
21988
|
qs = getQueryString$1(queryParams);
|
|
22006
21989
|
}
|
|
22007
21990
|
|
|
@@ -23062,7 +23045,7 @@ function (_React$Component) {
|
|
|
23062
23045
|
_this.refNode = ref;
|
|
23063
23046
|
};
|
|
23064
23047
|
|
|
23065
|
-
_this.loadPlayer = _this.loadPlayer.bind(_assertThisInitialized(_this));
|
|
23048
|
+
_this.loadPlayer = _this.loadPlayer.bind(_assertThisInitialized$1(_this));
|
|
23066
23049
|
return _this;
|
|
23067
23050
|
}
|
|
23068
23051
|
/**
|
|
@@ -23083,7 +23066,7 @@ function (_React$Component) {
|
|
|
23083
23066
|
var userSuccess = this.props.onSuccess;
|
|
23084
23067
|
var userFailure = this.props.onFailure;
|
|
23085
23068
|
|
|
23086
|
-
var options = _extends$
|
|
23069
|
+
var options = _extends$1({}, this.props, {
|
|
23087
23070
|
refNode: this.refNode,
|
|
23088
23071
|
refNodeInsert: 'append',
|
|
23089
23072
|
onSuccess: function onSuccess(_ref) {
|
|
@@ -23392,7 +23375,7 @@ function (_React$Component) {
|
|
|
23392
23375
|
;
|
|
23393
23376
|
|
|
23394
23377
|
_proto.render = function render() {
|
|
23395
|
-
var props = _extends$
|
|
23378
|
+
var props = _extends$1({
|
|
23396
23379
|
className: 'brightcove-react-player-loader'
|
|
23397
23380
|
}, this.props.attrs, {
|
|
23398
23381
|
ref: this.setRefNode
|
|
@@ -28490,7 +28473,7 @@ var Slideshow$1 = function Slideshow(_ref) {
|
|
|
28490
28473
|
{ className: 'p-2' },
|
|
28491
28474
|
slide.slideshowImage.caption && React__default.createElement(
|
|
28492
28475
|
'h3',
|
|
28493
|
-
|
|
28476
|
+
{ style: { padding: '0px' } },
|
|
28494
28477
|
slide.slideshowImage.caption
|
|
28495
28478
|
),
|
|
28496
28479
|
slide.description && React__default.createElement(BlockContent, { blocks: slide.description, serializers: getSerializers$1(serializerArguments) })
|
|
@@ -28849,7 +28832,7 @@ var Breadcrumbs = function Breadcrumbs(_ref) {
|
|
|
28849
28832
|
React__default.createElement(
|
|
28850
28833
|
Breadcrumb.Item,
|
|
28851
28834
|
{ active: true },
|
|
28852
|
-
currentPath
|
|
28835
|
+
currentPath.indexOf('?page') !== -1 ? currentPath.slice(NaN, currentPath.indexOf('?page')) : currentPath
|
|
28853
28836
|
),
|
|
28854
28837
|
React__default.createElement(
|
|
28855
28838
|
'style',
|