@mjhls/mjh-framework 1.0.701 → 1.0.702-beta-v1

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 (150) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/AD.js +1 -1
  3. package/dist/cjs/AD300x250.js +5 -3
  4. package/dist/cjs/AD300x250x600.js +5 -3
  5. package/dist/cjs/AD728x90.js +6 -4
  6. package/dist/cjs/ADFloatingFooter.js +4 -2
  7. package/dist/cjs/ADGutter.js +4 -2
  8. package/dist/cjs/ADSkyscraper.js +4 -2
  9. package/dist/cjs/ADSponsoredResources.js +4 -2
  10. package/dist/cjs/ADWebcast.js +4 -2
  11. package/dist/cjs/ADWelcome.js +4 -2
  12. package/dist/cjs/AdSlot.js +14 -3
  13. package/dist/cjs/AdSlotsProvider.js +2 -2
  14. package/dist/cjs/ArticleCarousel.js +1 -1
  15. package/dist/cjs/ArticleSeriesListing.js +4 -4
  16. package/dist/cjs/Auth.js +455 -306
  17. package/dist/cjs/{BlockContent-88f69acd.js → BlockContent-80b15fac.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 +6 -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-390337bf.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 +11 -11
  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 +8 -8
  38. package/dist/cjs/LeftNav.js +4 -2
  39. package/dist/cjs/MasterDeck.js +8 -8
  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 +10 -10
  45. package/dist/cjs/PublicationDeck.js +2 -2
  46. package/dist/cjs/QueueDeckExpanded.js +10 -10
  47. package/dist/cjs/RecentNews.js +2 -2
  48. package/dist/cjs/RelatedContent.js +2 -2
  49. package/dist/cjs/{SocialSearchComponent-75c51b47.js → SocialSearchComponent-56d49a1a.js} +5 -5
  50. package/dist/cjs/TaxonomyCard.js +2 -2
  51. package/dist/cjs/TemplateNormal.js +5 -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 +15 -15
  58. package/dist/cjs/YahooHero.js +2 -2
  59. package/dist/cjs/YoutubeGroup.js +1 -1
  60. package/dist/cjs/getRelatedArticle.js +5 -416
  61. package/dist/cjs/getSerializers.js +6 -6
  62. package/dist/cjs/{index-2d0a4911.js → index-099d45ae.js} +6 -4
  63. package/dist/cjs/{index-5be2866f.js → index-3294d3bc.js} +1 -1
  64. package/dist/cjs/{index-b5eb3ff8.js → index-39beccb3.js} +18 -18
  65. package/dist/cjs/{index-ec02006c.js → index-58dae365.js} +12 -12
  66. package/dist/cjs/{index.es-ab3f2690.js → index.es-9110add6.js} +1 -3
  67. package/dist/cjs/index.js +15 -15
  68. package/dist/cjs/{lodash-fc2922d0.js → lodash-7fd85bcf.js} +71 -22
  69. package/dist/cjs/{main-99536bdc.js → main-03ffa84c.js} +36 -67
  70. package/dist/cjs/{moment-66a6a284.js → moment-575fe24c.js} +1 -1
  71. package/dist/cjs/timeDifferenceCalc.js +1 -1
  72. package/dist/cjs/urlFor.js +1 -1
  73. package/dist/esm/AD.js +1 -1
  74. package/dist/esm/AD300x250.js +5 -3
  75. package/dist/esm/AD300x250x600.js +5 -3
  76. package/dist/esm/AD728x90.js +6 -4
  77. package/dist/esm/ADFloatingFooter.js +4 -2
  78. package/dist/esm/ADGutter.js +4 -2
  79. package/dist/esm/ADSkyscraper.js +4 -2
  80. package/dist/esm/ADSponsoredResources.js +4 -2
  81. package/dist/esm/ADWebcast.js +4 -2
  82. package/dist/esm/ADWelcome.js +4 -2
  83. package/dist/esm/AdSlot.js +15 -4
  84. package/dist/esm/AdSlotsProvider.js +2 -2
  85. package/dist/esm/ArticleCarousel.js +1 -1
  86. package/dist/esm/ArticleSeriesListing.js +4 -4
  87. package/dist/esm/Auth.js +450 -301
  88. package/dist/esm/{BlockContent-a614acdf.js → BlockContent-c409aca5.js} +1 -1
  89. package/dist/esm/BrowseVideosListing.js +1 -1
  90. package/dist/esm/CMEDeck.js +5 -5
  91. package/dist/esm/Column3.js +6 -4
  92. package/dist/esm/ConferenceArticleCard.js +2 -2
  93. package/dist/esm/DeckContent.js +7 -7
  94. package/dist/esm/DeckQueue.js +6 -6
  95. package/dist/esm/{Dfp-8a8fca18.js → Dfp-741c01be.js} +1 -1
  96. package/dist/esm/EventsDeck.js +4 -4
  97. package/dist/esm/ExternalResources.js +7 -7
  98. package/dist/esm/Feature.js +3 -3
  99. package/dist/esm/ForbesHero.js +2 -2
  100. package/dist/esm/GridContent.js +11 -11
  101. package/dist/esm/GridHero.js +2 -2
  102. package/dist/esm/GroupDeck.js +1 -1
  103. package/dist/esm/HamMagazine.js +4 -4
  104. package/dist/esm/Hero.js +1 -1
  105. package/dist/esm/HorizontalHero.js +2 -2
  106. package/dist/esm/IssueContentDeck.js +2 -2
  107. package/dist/esm/IssueDeck.js +2 -2
  108. package/dist/esm/IssueLanding.js +8 -8
  109. package/dist/esm/LeftNav.js +4 -2
  110. package/dist/esm/MasterDeck.js +8 -8
  111. package/dist/esm/NavMagazine.js +4 -4
  112. package/dist/esm/NavNative.js +3 -3
  113. package/dist/esm/OncliveHero.js +2 -2
  114. package/dist/esm/OncliveLargeHero.js +2 -2
  115. package/dist/esm/PartnerDetailListing.js +10 -10
  116. package/dist/esm/PublicationDeck.js +2 -2
  117. package/dist/esm/QueueDeckExpanded.js +10 -10
  118. package/dist/esm/RecentNews.js +2 -2
  119. package/dist/esm/RelatedContent.js +2 -2
  120. package/dist/esm/{SocialSearchComponent-5a9c4628.js → SocialSearchComponent-677ed3bd.js} +5 -5
  121. package/dist/esm/TaxonomyCard.js +2 -2
  122. package/dist/esm/TemplateNormal.js +5 -3
  123. package/dist/esm/ThumbnailCard.js +1 -1
  124. package/dist/esm/Ustream.js +2 -2
  125. package/dist/esm/VerticalHero.js +2 -2
  126. package/dist/esm/VideoSeriesCard.js +2 -2
  127. package/dist/esm/VideoSeriesListing.js +4 -4
  128. package/dist/esm/View.js +15 -15
  129. package/dist/esm/YahooHero.js +2 -2
  130. package/dist/esm/YoutubeGroup.js +1 -1
  131. package/dist/esm/getRelatedArticle.js +5 -416
  132. package/dist/esm/getSerializers.js +6 -6
  133. package/dist/esm/{index-51a80699.js → index-3849e3fe.js} +18 -18
  134. package/dist/esm/{index-93ec3c59.js → index-3f4dd6f2.js} +6 -4
  135. package/dist/esm/{index-50d0fbc7.js → index-7779a6df.js} +12 -12
  136. package/dist/esm/{index-d2f90501.js → index-ef6d5dcf.js} +1 -1
  137. package/dist/esm/{index.es-938a3a58.js → index.es-29c1cef5.js} +1 -3
  138. package/dist/esm/index.js +14 -14
  139. package/dist/esm/{lodash-17fdfebb.js → lodash-ec8c6b48.js} +71 -22
  140. package/dist/esm/{main-e2627831.js → main-35ff7b4f.js} +34 -65
  141. package/dist/esm/{moment-12415288.js → moment-e2f9b20c.js} +1 -1
  142. package/dist/esm/timeDifferenceCalc.js +1 -1
  143. package/dist/esm/urlFor.js +1 -1
  144. package/package.json +3 -3
  145. package/dist/cjs/index-bd6c9f56.js +0 -211
  146. package/dist/esm/index-db3bb315.js +0 -207
  147. /package/dist/cjs/{ADInfeed-f60d8625.js → ADInfeed-38066a36.js} +0 -0
  148. /package/dist/cjs/{ADlgInfeed-a08f8a4b.js → ADlgInfeed-d95c9027.js} +0 -0
  149. /package/dist/esm/{ADInfeed-c7e745f1.js → ADInfeed-7b1b2fcb.js} +0 -0
  150. /package/dist/esm/{ADlgInfeed-6fedd79b.js → ADlgInfeed-2afe92e6.js} +0 -0
@@ -1,4 +1,4 @@
1
- import { c as createCommonjsModule, u as unwrapExports, a as commonjsGlobal } from './_commonjsHelpers-0c4b6f40.js';
1
+ import './_commonjsHelpers-0c4b6f40.js';
2
2
  import './_to-object-ded78eb9.js';
3
3
  import './es6.string.iterator-9b2af4a5.js';
4
4
  import './_library-528f1934.js';
@@ -7,420 +7,9 @@ import './core.get-iterator-method-54d2e411.js';
7
7
  import './web.dom.iterable-8956f9a5.js';
8
8
  import { a as _asyncToGenerator, r as regenerator } from './asyncToGenerator-7c654f36.js';
9
9
  import './_set-species-cede29f8.js';
10
- import { c as cookie } from './index-db3bb315.js';
10
+ import { parseCookies, setCookie } from 'nookies';
11
11
  import getQuery from './getQuery.js';
12
12
 
13
- var defaultParseOptions = {
14
- decodeValues: true,
15
- map: false,
16
- silent: false,
17
- };
18
-
19
- function isNonEmptyString(str) {
20
- return typeof str === "string" && !!str.trim();
21
- }
22
-
23
- function parseString(setCookieValue, options) {
24
- var parts = setCookieValue.split(";").filter(isNonEmptyString);
25
- var nameValue = parts.shift().split("=");
26
- var name = nameValue.shift();
27
- var value = nameValue.join("="); // everything after the first =, joined by a "=" if there was more than one part
28
-
29
- options = options
30
- ? Object.assign({}, defaultParseOptions, options)
31
- : defaultParseOptions;
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
- var cookie = {
43
- name: name, // grab everything before the first =
44
- value: value,
45
- };
46
-
47
- parts.forEach(function (part) {
48
- var sides = part.split("=");
49
- var key = sides.shift().trimLeft().toLowerCase();
50
- var value = sides.join("=");
51
- if (key === "expires") {
52
- cookie.expires = new Date(value);
53
- } else if (key === "max-age") {
54
- cookie.maxAge = parseInt(value, 10);
55
- } else if (key === "secure") {
56
- cookie.secure = true;
57
- } else if (key === "httponly") {
58
- cookie.httpOnly = true;
59
- } else if (key === "samesite") {
60
- cookie.sameSite = value;
61
- } else {
62
- cookie[key] = value;
63
- }
64
- });
65
-
66
- return cookie;
67
- }
68
-
69
- function parse(input, options) {
70
- options = options
71
- ? Object.assign({}, defaultParseOptions, options)
72
- : defaultParseOptions;
73
-
74
- if (!input) {
75
- if (!options.map) {
76
- return [];
77
- } else {
78
- return {};
79
- }
80
- }
81
-
82
- if (input.headers && input.headers["set-cookie"]) {
83
- // fast-path for node.js (which automatically normalizes header names to lower-case
84
- input = input.headers["set-cookie"];
85
- } else if (input.headers) {
86
- // slow-path for other environments - see #25
87
- var sch =
88
- input.headers[
89
- Object.keys(input.headers).find(function (key) {
90
- return key.toLowerCase() === "set-cookie";
91
- })
92
- ];
93
- // warn if called on a request-like object with a cookie header rather than a set-cookie header - see #34, 36
94
- if (!sch && input.headers.cookie && !options.silent) {
95
- console.warn(
96
- "Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."
97
- );
98
- }
99
- input = sch;
100
- }
101
- if (!Array.isArray(input)) {
102
- input = [input];
103
- }
104
-
105
- options = options
106
- ? Object.assign({}, defaultParseOptions, options)
107
- : defaultParseOptions;
108
-
109
- if (!options.map) {
110
- return input.filter(isNonEmptyString).map(function (str) {
111
- return parseString(str, options);
112
- });
113
- } else {
114
- var cookies = {};
115
- return input.filter(isNonEmptyString).reduce(function (cookies, str) {
116
- var cookie = parseString(str, options);
117
- cookies[cookie.name] = cookie;
118
- return cookies;
119
- }, cookies);
120
- }
121
- }
122
-
123
- /*
124
- Set-Cookie header field-values are sometimes comma joined in one string. This splits them without choking on commas
125
- that are within a single set-cookie field-value, such as in the Expires portion.
126
-
127
- This is uncommon, but explicitly allowed - see https://tools.ietf.org/html/rfc2616#section-4.2
128
- Node.js does this for every header *except* set-cookie - see https://github.com/nodejs/node/blob/d5e363b77ebaf1caf67cd7528224b651c86815c1/lib/_http_incoming.js#L128
129
- React Native's fetch does this for *every* header, including set-cookie.
130
-
131
- Based on: https://github.com/google/j2objc/commit/16820fdbc8f76ca0c33472810ce0cb03d20efe25
132
- Credits to: https://github.com/tomball for original and https://github.com/chrusart for JavaScript implementation
133
- */
134
- function splitCookiesString(cookiesString) {
135
- if (Array.isArray(cookiesString)) {
136
- return cookiesString;
137
- }
138
- if (typeof cookiesString !== "string") {
139
- return [];
140
- }
141
-
142
- var cookiesStrings = [];
143
- var pos = 0;
144
- var start;
145
- var ch;
146
- var lastComma;
147
- var nextStart;
148
- var cookiesSeparatorFound;
149
-
150
- function skipWhitespace() {
151
- while (pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))) {
152
- pos += 1;
153
- }
154
- return pos < cookiesString.length;
155
- }
156
-
157
- function notSpecialChar() {
158
- ch = cookiesString.charAt(pos);
159
-
160
- return ch !== "=" && ch !== ";" && ch !== ",";
161
- }
162
-
163
- while (pos < cookiesString.length) {
164
- start = pos;
165
- cookiesSeparatorFound = false;
166
-
167
- while (skipWhitespace()) {
168
- ch = cookiesString.charAt(pos);
169
- if (ch === ",") {
170
- // ',' is a cookie separator if we have later first '=', not ';' or ','
171
- lastComma = pos;
172
- pos += 1;
173
-
174
- skipWhitespace();
175
- nextStart = pos;
176
-
177
- while (pos < cookiesString.length && notSpecialChar()) {
178
- pos += 1;
179
- }
180
-
181
- // currently special character
182
- if (pos < cookiesString.length && cookiesString.charAt(pos) === "=") {
183
- // we found cookies separator
184
- cookiesSeparatorFound = true;
185
- // pos is inside the next cookie, so back up and return it.
186
- pos = nextStart;
187
- cookiesStrings.push(cookiesString.substring(start, lastComma));
188
- start = pos;
189
- } else {
190
- // in param ',' or param separator ';',
191
- // we continue from that comma
192
- pos = lastComma + 1;
193
- }
194
- } else {
195
- pos += 1;
196
- }
197
- }
198
-
199
- if (!cookiesSeparatorFound || pos >= cookiesString.length) {
200
- cookiesStrings.push(cookiesString.substring(start, cookiesString.length));
201
- }
202
- }
203
-
204
- return cookiesStrings;
205
- }
206
-
207
- var setCookie = parse;
208
- var parse_1 = parse;
209
- var parseString_1 = parseString;
210
- var splitCookiesString_1 = splitCookiesString;
211
- setCookie.parse = parse_1;
212
- setCookie.parseString = parseString_1;
213
- setCookie.splitCookiesString = splitCookiesString_1;
214
-
215
- var utils = createCommonjsModule(function (module, exports) {
216
- var __assign = (commonjsGlobal && commonjsGlobal.__assign) || function () {
217
- __assign = Object.assign || function(t) {
218
- for (var s, i = 1, n = arguments.length; i < n; i++) {
219
- s = arguments[i];
220
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
221
- t[p] = s[p];
222
- }
223
- return t;
224
- };
225
- return __assign.apply(this, arguments);
226
- };
227
- 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
- */
255
- function hasSameProperties(a, b) {
256
- var aProps = Object.getOwnPropertyNames(a);
257
- var bProps = Object.getOwnPropertyNames(b);
258
- if (aProps.length !== bProps.length) {
259
- return false;
260
- }
261
- for (var i = 0; i < aProps.length; i++) {
262
- var propName = aProps[i];
263
- if (a[propName] !== b[propName]) {
264
- return false;
265
- }
266
- }
267
- return true;
268
- }
269
- exports.hasSameProperties = hasSameProperties;
270
- /**
271
- * Compare the cookie and return true if the cookies have equivalent
272
- * options and the cookies would be overwritten in the browser storage.
273
- *
274
- * @param a first Cookie for comparison
275
- * @param b second Cookie for comparison
276
- */
277
- function areCookiesEqual(a, b) {
278
- var sameSiteSame = a.sameSite === b.sameSite;
279
- if (typeof a.sameSite === 'string' && typeof b.sameSite === 'string') {
280
- sameSiteSame = a.sameSite.toLowerCase() === b.sameSite.toLowerCase();
281
- }
282
- return (hasSameProperties(__assign(__assign({}, a), { sameSite: undefined }), __assign(__assign({}, b), { sameSite: undefined })) && sameSiteSame);
283
- }
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
- /**
313
- * Parses cookies.
314
- *
315
- * @param ctx NextJS page or API context, express context, null or undefined.
316
- * @param options Options that we pass down to `cookie` library.
317
- */
318
- 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) {
321
- return cookie.parse(ctx.req.headers.cookie, options);
322
- }
323
- if (utils.isBrowser()) {
324
- return cookie.parse(document.cookie, options);
325
- }
326
- return {};
327
- }
328
- exports.parseCookies = parseCookies;
329
- /**
330
- * Sets a cookie.
331
- *
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.
336
- */
337
- 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
- */
351
- var cookies = ctx.res.getHeader('Set-Cookie') || [];
352
- if (typeof cookies === 'string')
353
- cookies = [cookies];
354
- if (typeof cookies === 'number')
355
- 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);
368
- var cookiesToSet_1 = [];
369
- 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);
379
- }
380
- });
381
- cookiesToSet_1.push(cookie.serialize(name, value, options));
382
- // Update the header.
383
- ctx.res.setHeader('Set-Cookie', cookiesToSet_1);
384
- }
385
- // Browser
386
- if (utils.isBrowser()) {
387
- if (options && options.httpOnly) {
388
- throw new Error('Can not set a httpOnly cookie in the browser.');
389
- }
390
- document.cookie = cookie.serialize(name, value, options);
391
- }
392
- return {};
393
- }
394
- exports.setCookie = setCookie$1;
395
- /**
396
- * Destroys a cookie with a particular name.
397
- *
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.
401
- */
402
- 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 }));
408
- }
409
- exports.destroyCookie = destroyCookie;
410
- /* Utility Exports */
411
- exports.default = {
412
- set: setCookie$1,
413
- get: parseCookies,
414
- destroy: destroyCookie,
415
- };
416
-
417
- });
418
-
419
- unwrapExports(dist);
420
- var dist_1 = dist.destroyCookie;
421
- var dist_2 = dist.setCookie;
422
- var dist_3 = dist.parseCookies;
423
-
424
13
  var _this = undefined;
425
14
 
426
15
  var getRelatedArticle = function () {
@@ -497,13 +86,13 @@ var getRelatedArticle = function () {
497
86
 
498
87
 
499
88
  if (ctx && url) {
500
- cookies = dist_3(ctx);
89
+ cookies = parseCookies(ctx);
501
90
  prevSlugs = cookies['prevSlugs'];
502
91
 
503
92
  if (!!prevSlugs) {
504
- dist_2(ctx, 'prevSlugs', prevSlugs + ',"' + url + '"', {});
93
+ setCookie(ctx, 'prevSlugs', prevSlugs + ',"' + url + '"', {});
505
94
  filters = '&& !(url.current in [' + prevSlugs + '])';
506
- } else dist_2(ctx, 'prevSlugs', '"' + url + '"', {});
95
+ } else setCookie(ctx, 'prevSlugs', '"' + url + '"', {});
507
96
  }
508
97
 
509
98
  query = getQuery('related', filters, '', articleCount).replace('&& taxonomyMapping[]._ref in $taxonomy', '');
@@ -14,18 +14,18 @@ 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-3f4dd6f2.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-3849e3fe.js';
27
27
  import './index-5f9f807a.js';
28
- import './main-e2627831.js';
28
+ import './main-35ff7b4f.js';
29
29
  import './entities-7cc3bf45.js';
30
30
  import './stringify-008c8802.js';
31
31
  import './slicedToArray-7021e5df.js';
@@ -34,14 +34,14 @@ 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-c409aca5.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-50d0fbc7.js';
44
+ export { g as default } from './index-7779a6df.js';
45
45
  import './util-7700fc59.js';
46
46
  import './brightcove-react-player-loader.es-83f53e4e.js';
47
47
  import 'react-bootstrap/Pagination';
@@ -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
 
@@ -380,7 +380,7 @@ function urlBuilder(options) {
380
380
  return new ImageUrlBuilder(null, {
381
381
  baseUrl: apiHost.replace(/^https:\/\/api\./, 'https://cdn.'),
382
382
  projectId: projectId,
383
- dataset: dataset,
383
+ dataset: dataset
384
384
  });
385
385
  }
386
386
  // Or just accept the options as given
@@ -393,7 +393,7 @@ var ImageUrlBuilder = /** @class */ (function () {
393
393
  ? __assign(__assign({}, (parent.options || {})), (options || {})) : __assign({}, (options || {})); // Copy options
394
394
  }
395
395
  ImageUrlBuilder.prototype.withOptions = function (options) {
396
- var baseUrl = options.baseUrl || this.options.baseUrl;
396
+ var baseUrl = options.baseUrl || '';
397
397
  var newOptions = { baseUrl: baseUrl };
398
398
  for (var key in options) {
399
399
  if (options.hasOwnProperty(key)) {
@@ -521,7 +521,7 @@ var ImageUrlBuilder = /** @class */ (function () {
521
521
  ImageUrlBuilder.prototype.url = function () {
522
522
  return urlForImage_1$1.default(this.options);
523
523
  };
524
- // Alias for url()
524
+ // Synonym for url()
525
525
  ImageUrlBuilder.prototype.toString = function () {
526
526
  return this.url();
527
527
  };
@@ -821,13 +821,15 @@ var DFPManager = Object.assign(new EventEmitter.EventEmitter().setMaxListeners(0
821
821
  });
822
822
 
823
823
  if (_this5.lazyLoadIsEnabled()) {
824
+ var args = [];
825
+
824
826
  var config = _this5.getLazyLoadConfig();
825
827
 
826
- if (config) {
827
- pubadsService.enableLazyLoad(config);
828
- } else {
829
- pubadsService.enableLazyLoad();
828
+ if (config !== null) {
829
+ args.push(config);
830
830
  }
831
+
832
+ pubadsService.enableLazyLoad.call(args);
831
833
  }
832
834
 
833
835
  if (_this5.singleRequestIsEnabled()) {