@mjhls/mjh-framework 1.0.693 → 1.0.694-beta.1

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.
Files changed (156) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/AD.js +1 -1
  3. package/dist/cjs/AD300x250.js +3 -3
  4. package/dist/cjs/AD300x250x600.js +3 -3
  5. package/dist/cjs/AD728x90.js +4 -4
  6. package/dist/cjs/ADFloatingFooter.js +2 -2
  7. package/dist/cjs/ADGutter.js +2 -2
  8. package/dist/cjs/ADSkyscraper.js +2 -2
  9. package/dist/cjs/ADSponsoredResources.js +2 -2
  10. package/dist/cjs/ADWebcast.js +2 -2
  11. package/dist/cjs/ADWelcome.js +2 -2
  12. package/dist/cjs/AdSlot.js +2 -2
  13. package/dist/cjs/AdSlotsProvider.js +1 -1
  14. package/dist/cjs/ArticleCarousel.js +1 -1
  15. package/dist/cjs/ArticleSeriesListing.js +4 -4
  16. package/dist/cjs/Auth.js +250 -301
  17. package/dist/cjs/{BlockContent-88f69acd.js → BlockContent-091a991f.js} +1 -1
  18. package/dist/cjs/BrowseVideosListing.js +1 -1
  19. package/dist/cjs/CMEDeck.js +5 -5
  20. package/dist/cjs/Column3.js +4 -4
  21. package/dist/cjs/ConferenceArticleCard.js +2 -2
  22. package/dist/cjs/DeckContent.js +7 -7
  23. package/dist/cjs/DeckQueue.js +6 -6
  24. package/dist/cjs/{Dfp-b2bc3b97.js → Dfp-f6a18ed2.js} +1 -1
  25. package/dist/cjs/EventsDeck.js +4 -4
  26. package/dist/cjs/ExternalResources.js +7 -7
  27. package/dist/cjs/Feature.js +3 -3
  28. package/dist/cjs/ForbesHero.js +2 -2
  29. package/dist/cjs/GridContent.js +10 -10
  30. package/dist/cjs/GridHero.js +2 -2
  31. package/dist/cjs/GroupDeck.js +1 -1
  32. package/dist/cjs/HamMagazine.js +4 -4
  33. package/dist/cjs/Hero.js +1 -1
  34. package/dist/cjs/HorizontalHero.js +2 -2
  35. package/dist/cjs/IssueContentDeck.js +2 -2
  36. package/dist/cjs/IssueDeck.js +2 -2
  37. package/dist/cjs/IssueLanding.js +7 -7
  38. package/dist/cjs/LeftNav.js +2 -2
  39. package/dist/cjs/MasterDeck.js +7 -7
  40. package/dist/cjs/NavMagazine.js +4 -4
  41. package/dist/cjs/NavNative.js +3 -3
  42. package/dist/cjs/OncliveHero.js +2 -2
  43. package/dist/cjs/OncliveLargeHero.js +2 -2
  44. package/dist/cjs/PartnerDetailListing.js +16 -16
  45. package/dist/cjs/PublicationDeck.js +1 -1
  46. package/dist/cjs/QueueDeckExpanded.js +9 -9
  47. package/dist/cjs/RecentNews.js +2 -2
  48. package/dist/cjs/RelatedContent.js +2 -2
  49. package/dist/cjs/{SocialSearchComponent-6b5e5b47.js → SocialSearchComponent-9cd24578.js} +5 -5
  50. package/dist/cjs/TaxonomyCard.js +2 -2
  51. package/dist/cjs/TemplateNormal.js +3 -3
  52. package/dist/cjs/ThumbnailCard.js +1 -1
  53. package/dist/cjs/Ustream.js +2 -2
  54. package/dist/cjs/VerticalHero.js +2 -2
  55. package/dist/cjs/VideoSeriesCard.js +2 -2
  56. package/dist/cjs/VideoSeriesListing.js +4 -4
  57. package/dist/cjs/View.js +40 -40
  58. package/dist/cjs/YahooHero.js +2 -2
  59. package/dist/cjs/YoutubeGroup.js +1 -1
  60. package/dist/cjs/getRelatedArticle.js +62 -124
  61. package/dist/cjs/getSerializers.js +6 -6
  62. package/dist/cjs/{getTargeting-fee8c429.js → getTargeting-9af0ef69.js} +2 -2
  63. package/dist/cjs/getTargeting.js +1 -1
  64. package/dist/cjs/{index-5be2866f.js → index-3294d3bc.js} +1 -1
  65. package/dist/cjs/{index-59436c13.js → index-a5919bab.js} +462 -474
  66. package/dist/cjs/{index-b5eb3ff8.js → index-be0c82be.js} +19 -20
  67. package/dist/cjs/{index-2d0a4911.js → index-fa8ed292.js} +27 -34
  68. package/dist/cjs/{index.es-ab3f2690.js → index.es-9110add6.js} +1 -3
  69. package/dist/cjs/index.js +93 -16
  70. package/dist/cjs/{main-b6c96c8d.js → main-a4cb15bb.js} +36 -67
  71. package/dist/cjs/{moment-66a6a284.js → moment-575fe24c.js} +1 -1
  72. package/dist/cjs/timeDifferenceCalc.js +1 -1
  73. package/dist/cjs/urlFor.js +1 -1
  74. package/dist/esm/AD.js +1 -1
  75. package/dist/esm/AD300x250.js +4 -4
  76. package/dist/esm/AD300x250x600.js +4 -4
  77. package/dist/esm/AD728x90.js +5 -5
  78. package/dist/esm/ADFloatingFooter.js +3 -3
  79. package/dist/esm/ADGutter.js +3 -3
  80. package/dist/esm/ADSkyscraper.js +3 -3
  81. package/dist/esm/ADSponsoredResources.js +3 -3
  82. package/dist/esm/ADWebcast.js +3 -3
  83. package/dist/esm/ADWelcome.js +3 -3
  84. package/dist/esm/AdSlot.js +3 -3
  85. package/dist/esm/AdSlotsProvider.js +1 -1
  86. package/dist/esm/ArticleCarousel.js +1 -1
  87. package/dist/esm/ArticleSeriesListing.js +4 -4
  88. package/dist/esm/Auth.js +248 -299
  89. package/dist/esm/Beam.js +1 -1
  90. package/dist/esm/{BlockContent-a614acdf.js → BlockContent-e9b4ddcf.js} +1 -1
  91. package/dist/esm/BrowseVideosListing.js +1 -1
  92. package/dist/esm/CMEDeck.js +6 -6
  93. package/dist/esm/Column2.js +1 -1
  94. package/dist/esm/Column3.js +5 -5
  95. package/dist/esm/ConferenceArticleCard.js +2 -2
  96. package/dist/esm/DeckContent.js +8 -8
  97. package/dist/esm/DeckQueue.js +6 -6
  98. package/dist/esm/{Dfp-8a8fca18.js → Dfp-96b49def.js} +1 -1
  99. package/dist/esm/EventsDeck.js +4 -4
  100. package/dist/esm/ExternalResources.js +8 -8
  101. package/dist/esm/Feature.js +3 -3
  102. package/dist/esm/ForbesHero.js +2 -2
  103. package/dist/esm/GridContent.js +11 -11
  104. package/dist/esm/GridHero.js +2 -2
  105. package/dist/esm/GroupDeck.js +1 -1
  106. package/dist/esm/HamMagazine.js +5 -5
  107. package/dist/esm/Hero.js +1 -1
  108. package/dist/esm/HorizontalHero.js +2 -2
  109. package/dist/esm/IssueContentDeck.js +2 -2
  110. package/dist/esm/IssueDeck.js +2 -2
  111. package/dist/esm/IssueLanding.js +8 -8
  112. package/dist/esm/LeftNav.js +3 -3
  113. package/dist/esm/MasterDeck.js +8 -8
  114. package/dist/esm/NavDvm.js +1 -1
  115. package/dist/esm/NavMagazine.js +5 -5
  116. package/dist/esm/NavNative.js +4 -4
  117. package/dist/esm/NavNormal.js +1 -1
  118. package/dist/esm/OncliveHero.js +2 -2
  119. package/dist/esm/OncliveLargeHero.js +2 -2
  120. package/dist/esm/PartnerDetailListing.js +15 -15
  121. package/dist/esm/PublicationDeck.js +1 -1
  122. package/dist/esm/QueueDeckExpanded.js +10 -10
  123. package/dist/esm/RecentNews.js +2 -2
  124. package/dist/esm/RelatedContent.js +2 -2
  125. package/dist/esm/Segment.js +1 -1
  126. package/dist/esm/SideFooter.js +1 -1
  127. package/dist/esm/{SocialSearchComponent-7f14e0f3.js → SocialSearchComponent-93233334.js} +5 -5
  128. package/dist/esm/TaxonomyCard.js +2 -2
  129. package/dist/esm/TemplateNormal.js +4 -4
  130. package/dist/esm/ThumbnailCard.js +1 -1
  131. package/dist/esm/Ustream.js +2 -2
  132. package/dist/esm/VerticalHero.js +2 -2
  133. package/dist/esm/VideoSeriesCard.js +2 -2
  134. package/dist/esm/VideoSeriesFilter.js +1 -1
  135. package/dist/esm/VideoSeriesListing.js +4 -4
  136. package/dist/esm/View.js +14 -14
  137. package/dist/esm/YahooHero.js +2 -2
  138. package/dist/esm/YoutubeGroup.js +1 -1
  139. package/dist/esm/{asyncToGenerator-7c654f36.js → asyncToGenerator-d0f08f8d.js} +1 -1
  140. package/dist/esm/getRelatedArticle.js +63 -125
  141. package/dist/esm/getSerializers.js +7 -7
  142. package/dist/esm/{index-93ec3c59.js → index-0e45a0b2.js} +27 -34
  143. package/dist/esm/{index-51a80699.js → index-73819142.js} +19 -20
  144. package/dist/esm/{index-a2e78632.js → index-aad92b92.js} +462 -474
  145. package/dist/esm/{index-d2f90501.js → index-ef6d5dcf.js} +1 -1
  146. package/dist/esm/{index.es-938a3a58.js → index.es-29c1cef5.js} +1 -3
  147. package/dist/esm/index.js +93 -15
  148. package/dist/esm/{main-0465b2a0.js → main-5d1e4bd3.js} +34 -65
  149. package/dist/esm/{moment-12415288.js → moment-e2f9b20c.js} +1 -1
  150. package/dist/esm/timeDifferenceCalc.js +1 -1
  151. package/dist/esm/urlFor.js +1 -1
  152. package/package.json +1 -1
  153. /package/dist/cjs/{ADInfeed-3410ab3c.js → ADInfeed-2fe7211c.js} +0 -0
  154. /package/dist/cjs/{ADlgInfeed-845aac15.js → ADlgInfeed-14e17b43.js} +0 -0
  155. /package/dist/esm/{ADInfeed-205cb7a9.js → ADInfeed-d46be909.js} +0 -0
  156. /package/dist/esm/{ADlgInfeed-e538f17a.js → ADlgInfeed-5d1bce95.js} +0 -0
@@ -5,7 +5,7 @@ import './_library-528f1934.js';
5
5
  import './_iter-detect-59409a32.js';
6
6
  import './core.get-iterator-method-54d2e411.js';
7
7
  import './web.dom.iterable-8956f9a5.js';
8
- import { a as _asyncToGenerator, r as regenerator } from './asyncToGenerator-7c654f36.js';
8
+ import { _ as _asyncToGenerator, r as regenerator } from './asyncToGenerator-d0f08f8d.js';
9
9
  import './_set-species-cede29f8.js';
10
10
  import { c as cookie } from './index-db3bb315.js';
11
11
  import getQuery from './getQuery.js';
@@ -30,18 +30,9 @@ function parseString(setCookieValue, options) {
30
30
  ? Object.assign({}, defaultParseOptions, options)
31
31
  : defaultParseOptions;
32
32
 
33
- try {
34
- value = options.decodeValues ? decodeURIComponent(value) : value; // decode cookie value
35
- } catch (e) {
36
- console.error(
37
- `set-cookie-parser encountered an error while decoding a cookie with value '${value}'. Set options.decodeValues to false to disable this feature.`,
38
- e
39
- );
40
- }
41
-
42
33
  var cookie = {
43
34
  name: name, // grab everything before the first =
44
- value: value,
35
+ value: options.decodeValues ? decodeURIComponent(value) : value, // decode cookie value
45
36
  };
46
37
 
47
38
  parts.forEach(function (part) {
@@ -212,7 +203,7 @@ setCookie.parse = parse_1;
212
203
  setCookie.parseString = parseString_1;
213
204
  setCookie.splitCookiesString = splitCookiesString_1;
214
205
 
215
- var utils = createCommonjsModule(function (module, exports) {
206
+ var dist = createCommonjsModule(function (module, exports) {
216
207
  var __assign = (commonjsGlobal && commonjsGlobal.__assign) || function () {
217
208
  __assign = Object.assign || function(t) {
218
209
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -225,33 +216,10 @@ var __assign = (commonjsGlobal && commonjsGlobal.__assign) || function () {
225
216
  return __assign.apply(this, arguments);
226
217
  };
227
218
  Object.defineProperty(exports, "__esModule", { value: true });
228
- exports.areCookiesEqual = exports.hasSameProperties = exports.createCookie = exports.isBrowser = void 0;
229
- /**
230
- * Tells whether we are in a browser or server.
231
- */
232
- function isBrowser() {
233
- return typeof window !== 'undefined';
234
- }
235
- exports.isBrowser = isBrowser;
236
- /**
237
- * Create an instance of the Cookie interface
238
- */
239
- function createCookie(name, value, options) {
240
- var sameSite = options.sameSite;
241
- if (sameSite === true) {
242
- sameSite = 'strict';
243
- }
244
- if (sameSite === undefined || sameSite === false) {
245
- sameSite = 'lax';
246
- }
247
- var cookieToSet = __assign(__assign({}, options), { sameSite: sameSite });
248
- delete cookieToSet.encode;
249
- return __assign({ name: name, value: value }, cookieToSet);
250
- }
251
- exports.createCookie = createCookie;
252
- /**
253
- * Tells whether given objects have the same properties.
254
- */
219
+ exports.destroyCookie = exports.setCookie = exports.parseCookies = void 0;
220
+
221
+
222
+ var isBrowser = function () { return typeof window !== 'undefined'; };
255
223
  function hasSameProperties(a, b) {
256
224
  var aProps = Object.getOwnPropertyNames(a);
257
225
  var bProps = Object.getOwnPropertyNames(b);
@@ -266,9 +234,8 @@ function hasSameProperties(a, b) {
266
234
  }
267
235
  return true;
268
236
  }
269
- exports.hasSameProperties = hasSameProperties;
270
237
  /**
271
- * Compare the cookie and return true if the cookies have equivalent
238
+ * Compare the cookie and return true if the cookies has equivalent
272
239
  * options and the cookies would be overwritten in the browser storage.
273
240
  *
274
241
  * @param a first Cookie for comparison
@@ -281,109 +248,71 @@ function areCookiesEqual(a, b) {
281
248
  }
282
249
  return (hasSameProperties(__assign(__assign({}, a), { sameSite: undefined }), __assign(__assign({}, b), { sameSite: undefined })) && sameSiteSame);
283
250
  }
284
- exports.areCookiesEqual = areCookiesEqual;
285
- /* Functions */
286
-
287
- });
288
-
289
- unwrapExports(utils);
290
- var utils_1 = utils.areCookiesEqual;
291
- var utils_2 = utils.hasSameProperties;
292
- var utils_3 = utils.createCookie;
293
- var utils_4 = utils.isBrowser;
294
-
295
- var dist = createCommonjsModule(function (module, exports) {
296
- var __assign = (commonjsGlobal && commonjsGlobal.__assign) || function () {
297
- __assign = Object.assign || function(t) {
298
- for (var s, i = 1, n = arguments.length; i < n; i++) {
299
- s = arguments[i];
300
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
301
- t[p] = s[p];
302
- }
303
- return t;
304
- };
305
- return __assign.apply(this, arguments);
306
- };
307
- Object.defineProperty(exports, "__esModule", { value: true });
308
- exports.destroyCookie = exports.setCookie = exports.parseCookies = void 0;
309
-
310
-
311
-
312
251
  /**
252
+ * Create an instance of the Cookie interface
253
+ *
254
+ * @param name name of the Cookie
255
+ * @param value value of the Cookie
256
+ * @param options Cookie options
257
+ */
258
+ function createCookie(name, value, options) {
259
+ var sameSite = options.sameSite;
260
+ if (sameSite === true) {
261
+ sameSite = 'strict';
262
+ }
263
+ if (sameSite === undefined || sameSite === false) {
264
+ sameSite = 'lax';
265
+ }
266
+ var cookieToSet = __assign(__assign({}, options), { sameSite: sameSite });
267
+ delete cookieToSet.encode;
268
+ return __assign({ name: name, value: value }, cookieToSet);
269
+ }
270
+ /**
271
+ *
313
272
  * Parses cookies.
314
273
  *
315
- * @param ctx NextJS page or API context, express context, null or undefined.
316
- * @param options Options that we pass down to `cookie` library.
274
+ * @param ctx
275
+ * @param options
317
276
  */
318
277
  function parseCookies(ctx, options) {
319
- var _a, _b;
320
- if ((_b = (_a = ctx === null || ctx === void 0 ? void 0 : ctx.req) === null || _a === void 0 ? void 0 : _a.headers) === null || _b === void 0 ? void 0 : _b.cookie) {
278
+ if (ctx && ctx.req && ctx.req.headers && ctx.req.headers.cookie) {
321
279
  return cookie.parse(ctx.req.headers.cookie, options);
322
280
  }
323
- if (utils.isBrowser()) {
281
+ if (isBrowser()) {
324
282
  return cookie.parse(document.cookie, options);
325
283
  }
326
284
  return {};
327
285
  }
328
286
  exports.parseCookies = parseCookies;
329
287
  /**
288
+ *
330
289
  * Sets a cookie.
331
290
  *
332
- * @param ctx NextJS page or API context, express context, null or undefined.
333
- * @param name The name of your cookie.
334
- * @param value The value of your cookie.
335
- * @param options Options that we pass down to `cookie` library.
291
+ * @param ctx
292
+ * @param name
293
+ * @param value
294
+ * @param options
336
295
  */
337
296
  function setCookie$1(ctx, name, value, options) {
338
- var _a, _b;
339
- if (options === void 0) { options = {}; }
340
- // SSR
341
- if (((_a = ctx === null || ctx === void 0 ? void 0 : ctx.res) === null || _a === void 0 ? void 0 : _a.getHeader) && ctx.res.setHeader) {
342
- // Check if response has finished and warn about it.
343
- if ((_b = ctx === null || ctx === void 0 ? void 0 : ctx.res) === null || _b === void 0 ? void 0 : _b.finished) {
344
- console.warn("Not setting \"" + name + "\" cookie. Response has finished.");
345
- console.warn("You should set cookie before res.send()");
346
- return {};
347
- }
348
- /**
349
- * Load existing cookies from the header and parse them.
350
- */
297
+ if (ctx && ctx.res && ctx.res.getHeader && ctx.res.setHeader) {
351
298
  var cookies = ctx.res.getHeader('Set-Cookie') || [];
352
299
  if (typeof cookies === 'string')
353
300
  cookies = [cookies];
354
301
  if (typeof cookies === 'number')
355
302
  cookies = [];
356
- /**
357
- * Parse cookies but ignore values - we've already encoded
358
- * them in the previous call.
359
- */
360
- var parsedCookies = setCookie.parse(cookies, {
361
- decodeValues: false,
362
- });
363
- /**
364
- * We create the new cookie and make sure that none of
365
- * the existing cookies match it.
366
- */
367
- var newCookie_1 = utils.createCookie(name, value, options);
303
+ var parsedCookies = setCookie.parse(cookies);
368
304
  var cookiesToSet_1 = [];
369
305
  parsedCookies.forEach(function (parsedCookie) {
370
- if (!utils.areCookiesEqual(parsedCookie, newCookie_1)) {
371
- /**
372
- * We serialize the cookie back to the original format
373
- * if it isn't the same as the new one.
374
- */
375
- var serializedCookie = cookie.serialize(parsedCookie.name, parsedCookie.value, __assign({
376
- // we prevent reencoding by default, but you might override it
377
- encode: function (val) { return val; } }, parsedCookie));
378
- cookiesToSet_1.push(serializedCookie);
306
+ if (!areCookiesEqual(parsedCookie, createCookie(name, value, options))) {
307
+ cookiesToSet_1.push(cookie.serialize(parsedCookie.name, parsedCookie.value, __assign({}, parsedCookie)));
379
308
  }
380
309
  });
381
310
  cookiesToSet_1.push(cookie.serialize(name, value, options));
382
- // Update the header.
383
- ctx.res.setHeader('Set-Cookie', cookiesToSet_1);
311
+ if (!ctx.res.finished) {
312
+ ctx.res.setHeader('Set-Cookie', cookiesToSet_1);
313
+ }
384
314
  }
385
- // Browser
386
- if (utils.isBrowser()) {
315
+ if (isBrowser()) {
387
316
  if (options && options.httpOnly) {
388
317
  throw new Error('Can not set a httpOnly cookie in the browser.');
389
318
  }
@@ -393,21 +322,30 @@ function setCookie$1(ctx, name, value, options) {
393
322
  }
394
323
  exports.setCookie = setCookie$1;
395
324
  /**
325
+ *
396
326
  * Destroys a cookie with a particular name.
397
327
  *
398
- * @param ctx NextJS page or API context, express context, null or undefined.
399
- * @param name Cookie name.
400
- * @param options Options that we pass down to `cookie` library.
328
+ * @param ctx
329
+ * @param name
330
+ * @param options
401
331
  */
402
332
  function destroyCookie(ctx, name, options) {
403
- /**
404
- * We forward the request destroy to setCookie function
405
- * as it is the same function with modified maxAge value.
406
- */
407
- return setCookie$1(ctx, name, '', __assign(__assign({}, (options || {})), { maxAge: -1 }));
333
+ var opts = __assign(__assign({}, (options || {})), { maxAge: -1 });
334
+ if (ctx && ctx.res && ctx.res.setHeader && ctx.res.getHeader) {
335
+ var cookies = ctx.res.getHeader('Set-Cookie') || [];
336
+ if (typeof cookies === 'string')
337
+ cookies = [cookies];
338
+ if (typeof cookies === 'number')
339
+ cookies = [];
340
+ cookies.push(cookie.serialize(name, '', opts));
341
+ ctx.res.setHeader('Set-Cookie', cookies);
342
+ }
343
+ if (isBrowser()) {
344
+ document.cookie = cookie.serialize(name, '', opts);
345
+ }
346
+ return {};
408
347
  }
409
348
  exports.destroyCookie = destroyCookie;
410
- /* Utility Exports */
411
349
  exports.default = {
412
350
  set: setCookie$1,
413
351
  get: parseCookies,
@@ -14,34 +14,34 @@ import './web.dom.iterable-8956f9a5.js';
14
14
  import './typeof-08f2c380.js';
15
15
  import './_is-array-49698029.js';
16
16
  import 'react';
17
- import './index-93ec3c59.js';
17
+ import './index-0e45a0b2.js';
18
18
  import 'prop-types';
19
19
  import 'react-bootstrap/Row';
20
20
  import 'react-bootstrap/Col';
21
- import './moment-12415288.js';
21
+ import './moment-e2f9b20c.js';
22
22
  import 'next/router';
23
23
  import './isSymbol-807e927e.js';
24
24
  import './debounce-1a993acf.js';
25
25
  import 'react-dom';
26
- import './index-51a80699.js';
26
+ import './index-73819142.js';
27
27
  import './index-5f9f807a.js';
28
- import './main-0465b2a0.js';
28
+ import './main-5d1e4bd3.js';
29
29
  import './entities-7cc3bf45.js';
30
30
  import './stringify-008c8802.js';
31
31
  import './slicedToArray-7021e5df.js';
32
- import './asyncToGenerator-7c654f36.js';
32
+ import './asyncToGenerator-d0f08f8d.js';
33
33
  import './_set-species-cede29f8.js';
34
34
  import './Segment.js';
35
35
  import './Beam.js';
36
36
  import './AdSlot.js';
37
- import './BlockContent-a614acdf.js';
37
+ import './BlockContent-e9b4ddcf.js';
38
38
  import './smoothscroll-4b699764.js';
39
39
  import './GroupDeck.js';
40
40
  import 'react-bootstrap';
41
41
  import './iconBase-602d52fe.js';
42
42
  import './index.esm-29e48d38.js';
43
43
  import 'react-bootstrap/Button';
44
- export { g as default } from './index-a2e78632.js';
44
+ export { g as default } from './index-aad92b92.js';
45
45
  import './util-7700fc59.js';
46
46
  import './brightcove-react-player-loader.es-83f53e4e.js';
47
47
  import 'react-bootstrap/Pagination';
@@ -722,8 +722,6 @@ var DFPManager = Object.assign(new EventEmitter.EventEmitter().setMaxListeners(0
722
722
 
723
723
  return new Promise(function (resolve) {
724
724
  _this3.getGoogletag().then(function (googletag) {
725
- _this3.configureInitialOptions(googletag);
726
-
727
725
  slotsToInitialize.forEach(function (currentSlotId) {
728
726
  registeredSlots[currentSlotId].loading = false;
729
727
  googletag.cmd.push(function () {
@@ -787,25 +785,14 @@ var DFPManager = Object.assign(new EventEmitter.EventEmitter().setMaxListeners(0
787
785
  });
788
786
  });
789
787
  },
790
- // configure those gpt parameters that need to be set before pubsads service
791
- // initialization.
792
- configureInitialOptions: function configureInitialOptions(googletag) {
793
- var _this4 = this;
794
-
795
- googletag.cmd.push(function () {
796
- if (_this4.disableInitialLoadIsEnabled()) {
797
- googletag.pubads().disableInitialLoad();
798
- }
799
- });
800
- },
801
788
  configureOptions: function configureOptions(googletag) {
802
- var _this5 = this;
789
+ var _this4 = this;
803
790
 
804
791
  googletag.cmd.push(function () {
805
792
  var pubadsService = googletag.pubads();
806
- pubadsService.setRequestNonPersonalizedAds(_this5.personalizedAdsEnabled() ? 0 : 1);
793
+ pubadsService.setRequestNonPersonalizedAds(_this4.personalizedAdsEnabled() ? 0 : 1);
807
794
 
808
- var targetingArguments = _this5.getTargetingArguments(); // set global targetting arguments
795
+ var targetingArguments = _this4.getTargetingArguments(); // set global targetting arguments
809
796
 
810
797
 
811
798
  Object.keys(targetingArguments).forEach(function (varName) {
@@ -814,28 +801,34 @@ var DFPManager = Object.assign(new EventEmitter.EventEmitter().setMaxListeners(0
814
801
  }
815
802
  }); // set global adSense attributes
816
803
 
817
- var adSenseAttributes = _this5.getAdSenseAttributes();
804
+ var adSenseAttributes = _this4.getAdSenseAttributes();
818
805
 
819
806
  Object.keys(adSenseAttributes).forEach(function (key) {
820
807
  pubadsService.set(key, adSenseAttributes[key]);
821
808
  });
822
809
 
823
- if (_this5.lazyLoadIsEnabled()) {
824
- var config = _this5.getLazyLoadConfig();
810
+ if (_this4.lazyLoadIsEnabled()) {
811
+ var args = [];
825
812
 
826
- if (config) {
827
- pubadsService.enableLazyLoad(config);
828
- } else {
829
- pubadsService.enableLazyLoad();
813
+ var config = _this4.getLazyLoadConfig();
814
+
815
+ if (config !== null) {
816
+ args.push(config);
830
817
  }
818
+
819
+ pubadsService.enableLazyLoad.call(args);
831
820
  }
832
821
 
833
- if (_this5.singleRequestIsEnabled()) {
822
+ if (_this4.singleRequestIsEnabled()) {
834
823
  pubadsService.enableSingleRequest();
835
824
  }
836
825
 
837
- if (_this5.collapseEmptyDivs === true || _this5.collapseEmptyDivs === false) {
838
- pubadsService.collapseEmptyDivs(_this5.collapseEmptyDivs);
826
+ if (_this4.disableInitialLoadIsEnabled()) {
827
+ pubadsService.disableInitialLoad();
828
+ }
829
+
830
+ if (_this4.collapseEmptyDivs === true || _this4.collapseEmptyDivs === false) {
831
+ pubadsService.collapseEmptyDivs(_this4.collapseEmptyDivs);
839
832
  }
840
833
  });
841
834
  },
@@ -877,10 +870,10 @@ var DFPManager = Object.assign(new EventEmitter.EventEmitter().setMaxListeners(0
877
870
  }
878
871
  },
879
872
  gptRefreshAds: function gptRefreshAds(slots) {
880
- var _this6 = this;
873
+ var _this5 = this;
881
874
 
882
875
  return this.getGoogletag().then(function (googletag) {
883
- _this6.configureOptions(googletag);
876
+ _this5.configureOptions(googletag);
884
877
 
885
878
  googletag.cmd.push(function () {
886
879
  var pubadsService = googletag.pubads();
@@ -891,14 +884,14 @@ var DFPManager = Object.assign(new EventEmitter.EventEmitter().setMaxListeners(0
891
884
  });
892
885
  },
893
886
  reload: function reload() {
894
- var _this7 = this;
887
+ var _this6 = this;
895
888
 
896
889
  return this.destroyGPTSlots.apply(this, arguments).then(function () {
897
- return _this7.load();
890
+ return _this6.load();
898
891
  });
899
892
  },
900
893
  destroyGPTSlots: function destroyGPTSlots() {
901
- var _this8 = this;
894
+ var _this7 = this;
902
895
 
903
896
  for (var _len4 = arguments.length, slotsToDestroy = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
904
897
  slotsToDestroy[_key4] = arguments[_key4];
@@ -918,7 +911,7 @@ var DFPManager = Object.assign(new EventEmitter.EventEmitter().setMaxListeners(0
918
911
  slots.push(slot);
919
912
  }
920
913
 
921
- _this8.getGoogletag().then(function (googletag) {
914
+ _this7.getGoogletag().then(function (googletag) {
922
915
  googletag.cmd.push(function () {
923
916
  if (managerAlreadyInitialized === true) {
924
917
  if (slotsToDestroy.length > 0) {
@@ -941,7 +934,7 @@ var DFPManager = Object.assign(new EventEmitter.EventEmitter().setMaxListeners(0
941
934
  });
942
935
  },
943
936
  registerSlot: function registerSlot(_ref) {
944
- var _this9 = this;
937
+ var _this8 = this;
945
938
 
946
939
  var slotId = _ref.slotId,
947
940
  dfpNetworkId = _ref.dfpNetworkId,
@@ -980,7 +973,7 @@ var DFPManager = Object.assign(new EventEmitter.EventEmitter().setMaxListeners(0
980
973
  gptSlot = slot.gptSlot;
981
974
 
982
975
  if (loading === false && !gptSlot) {
983
- _this9.load(slotId);
976
+ _this8.load(slotId);
984
977
  }
985
978
  }
986
979
  });
@@ -58,35 +58,35 @@ function parseSource(source) {
58
58
  if (typeof source === 'string' && isUrl(source)) {
59
59
  // Someone passed an existing image url?
60
60
  image = {
61
- asset: { _ref: urlToId(source) },
61
+ asset: { _ref: urlToId(source) }
62
62
  };
63
63
  }
64
64
  else if (typeof source === 'string') {
65
65
  // Just an asset id
66
66
  image = {
67
- asset: { _ref: source },
67
+ asset: { _ref: source }
68
68
  };
69
69
  }
70
70
  else if (isRef(source)) {
71
71
  // We just got passed an asset directly
72
72
  image = {
73
- asset: source,
73
+ asset: source
74
74
  };
75
75
  }
76
76
  else if (isAsset(source)) {
77
77
  // If we were passed an image asset document
78
78
  image = {
79
79
  asset: {
80
- _ref: source._id || '',
81
- },
80
+ _ref: source._id || ''
81
+ }
82
82
  };
83
83
  }
84
84
  else if (isAssetStub(source)) {
85
85
  // If we were passed a partial asset (`url`, but no `_id`)
86
86
  image = {
87
87
  asset: {
88
- _ref: urlToId(source.asset.url),
89
- },
88
+ _ref: urlToId(source.asset.url)
89
+ }
90
90
  };
91
91
  }
92
92
  else if (typeof source.asset === 'object') {
@@ -127,7 +127,7 @@ function applyDefaults(image) {
127
127
  left: 0,
128
128
  top: 0,
129
129
  bottom: 0,
130
- right: 0,
130
+ right: 0
131
131
  };
132
132
  }
133
133
  if (!result.hotspot) {
@@ -135,7 +135,7 @@ function applyDefaults(image) {
135
135
  x: 0.5,
136
136
  y: 0.5,
137
137
  height: 1.0,
138
- width: 1.0,
138
+ width: 1.0
139
139
  };
140
140
  }
141
141
  return result;
@@ -182,7 +182,7 @@ exports.SPEC_NAME_TO_URL_NAME_MAPPINGS = [
182
182
  ['crop', 'crop'],
183
183
  ['saturation', 'sat'],
184
184
  ['auto', 'auto'],
185
- ['dpr', 'dpr'],
185
+ ['dpr', 'dpr']
186
186
  ];
187
187
  function urlForImage(options) {
188
188
  var spec = __assign({}, (options || {}));
@@ -201,7 +201,7 @@ function urlForImage(options) {
201
201
  left: cropLeft,
202
202
  top: cropTop,
203
203
  width: Math.round(asset.width - image.crop.right * asset.width - cropLeft),
204
- height: Math.round(asset.height - image.crop.bottom * asset.height - cropTop),
204
+ height: Math.round(asset.height - image.crop.bottom * asset.height - cropTop)
205
205
  };
206
206
  // Compute hot spot rect in terms of pixel coordinates
207
207
  var hotSpotVerticalRadius = (image.hotspot.height * asset.height) / 2;
@@ -212,7 +212,7 @@ function urlForImage(options) {
212
212
  left: hotSpotCenterX - hotSpotHorizontalRadius,
213
213
  top: hotSpotCenterY - hotSpotVerticalRadius,
214
214
  right: hotSpotCenterX + hotSpotHorizontalRadius,
215
- bottom: hotSpotCenterY + hotSpotVerticalRadius,
215
+ bottom: hotSpotCenterY + hotSpotVerticalRadius
216
216
  };
217
217
  // If irrelevant, or if we are requested to: don't perform crop/fit based on
218
218
  // the crop/hotspot.
@@ -294,7 +294,7 @@ function fit(source, spec) {
294
294
  left: Math.round(left),
295
295
  top: Math.round(top_2),
296
296
  width: Math.round(width),
297
- height: Math.round(height),
297
+ height: Math.round(height)
298
298
  };
299
299
  }
300
300
  else {
@@ -316,13 +316,13 @@ function fit(source, spec) {
316
316
  left: Math.max(0, Math.floor(left)),
317
317
  top: Math.max(0, Math.floor(top_3)),
318
318
  width: Math.round(width),
319
- height: Math.round(height),
319
+ height: Math.round(height)
320
320
  };
321
321
  }
322
322
  return {
323
323
  width: imgWidth,
324
324
  height: imgHeight,
325
- rect: cropRect,
325
+ rect: cropRect
326
326
  };
327
327
  }
328
328
 
@@ -375,12 +375,11 @@ function urlBuilder(options) {
375
375
  var client = options;
376
376
  if (isSanityClient(client)) {
377
377
  // Inherit config from client
378
- var _a = client.clientConfig, apiUrl = _a.apiHost, projectId = _a.projectId, dataset = _a.dataset;
379
- var apiHost = apiUrl || 'https://api.sanity.io';
378
+ var _a = client.clientConfig, apiHost = _a.apiHost, projectId = _a.projectId, dataset = _a.dataset;
380
379
  return new ImageUrlBuilder(null, {
381
380
  baseUrl: apiHost.replace(/^https:\/\/api\./, 'https://cdn.'),
382
381
  projectId: projectId,
383
- dataset: dataset,
382
+ dataset: dataset
384
383
  });
385
384
  }
386
385
  // Or just accept the options as given
@@ -393,7 +392,7 @@ var ImageUrlBuilder = /** @class */ (function () {
393
392
  ? __assign(__assign({}, (parent.options || {})), (options || {})) : __assign({}, (options || {})); // Copy options
394
393
  }
395
394
  ImageUrlBuilder.prototype.withOptions = function (options) {
396
- var baseUrl = options.baseUrl || this.options.baseUrl;
395
+ var baseUrl = options.baseUrl || '';
397
396
  var newOptions = { baseUrl: baseUrl };
398
397
  for (var key in options) {
399
398
  if (options.hasOwnProperty(key)) {
@@ -521,7 +520,7 @@ var ImageUrlBuilder = /** @class */ (function () {
521
520
  ImageUrlBuilder.prototype.url = function () {
522
521
  return urlForImage_1$1.default(this.options);
523
522
  };
524
- // Alias for url()
523
+ // Synonym for url()
525
524
  ImageUrlBuilder.prototype.toString = function () {
526
525
  return this.url();
527
526
  };