@mjhls/mjh-framework 1.0.696-deck-ad-v1 → 1.0.696
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/dist/cjs/AD.js +1 -1
- package/dist/cjs/AD300x250.js +3 -3
- package/dist/cjs/AD300x250x600.js +3 -3
- package/dist/cjs/AD728x90.js +4 -4
- package/dist/cjs/ADFloatingFooter.js +2 -2
- package/dist/cjs/ADGutter.js +2 -2
- package/dist/cjs/ADSkyscraper.js +2 -2
- package/dist/cjs/ADSponsoredResources.js +2 -2
- package/dist/cjs/ADWebcast.js +2 -2
- package/dist/cjs/ADWelcome.js +2 -2
- package/dist/cjs/AdSlot.js +2 -2
- package/dist/cjs/AdSlotsProvider.js +1 -1
- package/dist/cjs/ArticleCarousel.js +1 -1
- package/dist/cjs/ArticleSeriesListing.js +4 -4
- package/dist/cjs/Auth.js +300 -249
- package/dist/cjs/{BlockContent-80b15fac.js → BlockContent-88f69acd.js} +1 -1
- package/dist/cjs/BrowseVideosListing.js +1 -1
- package/dist/cjs/CMEDeck.js +5 -16
- package/dist/cjs/Column3.js +4 -4
- package/dist/cjs/ConferenceArticleCard.js +2 -2
- package/dist/cjs/DeckContent.js +8 -10
- package/dist/cjs/DeckQueue.js +7 -13
- package/dist/cjs/{Dfp-390337bf.js → Dfp-b2bc3b97.js} +1 -1
- package/dist/cjs/EventsDeck.js +4 -4
- package/dist/cjs/ExternalResources.js +7 -7
- package/dist/cjs/Feature.js +3 -3
- package/dist/cjs/ForbesHero.js +2 -2
- package/dist/cjs/GridContent.js +12 -14
- package/dist/cjs/GridHero.js +2 -2
- package/dist/cjs/GroupDeck.js +1 -1
- package/dist/cjs/HamMagazine.js +4 -4
- package/dist/cjs/Hero.js +1 -1
- package/dist/cjs/HorizontalHero.js +2 -2
- package/dist/cjs/IssueContentDeck.js +2 -2
- package/dist/cjs/IssueDeck.js +2 -2
- package/dist/cjs/IssueLanding.js +8 -8
- package/dist/cjs/LeftNav.js +2 -2
- package/dist/cjs/MasterDeck.js +8 -8
- package/dist/cjs/NavMagazine.js +4 -4
- package/dist/cjs/NavNative.js +3 -3
- package/dist/cjs/OncliveHero.js +2 -2
- package/dist/cjs/OncliveLargeHero.js +2 -2
- package/dist/cjs/PartnerDetailListing.js +10 -10
- package/dist/cjs/PublicationDeck.js +2 -2
- package/dist/cjs/QueueDeckExpanded.js +13 -24
- package/dist/cjs/RecentNews.js +2 -2
- package/dist/cjs/RelatedContent.js +2 -2
- package/dist/cjs/{SocialSearchComponent-9cd24578.js → SocialSearchComponent-6b5e5b47.js} +5 -5
- package/dist/cjs/TaxonomyCard.js +2 -2
- package/dist/cjs/TemplateNormal.js +3 -3
- package/dist/cjs/ThumbnailCard.js +1 -1
- package/dist/cjs/Ustream.js +2 -2
- package/dist/cjs/VerticalHero.js +2 -2
- package/dist/cjs/VideoSeriesCard.js +2 -2
- package/dist/cjs/VideoSeriesListing.js +4 -4
- package/dist/cjs/View.js +13 -13
- package/dist/cjs/YahooHero.js +2 -2
- package/dist/cjs/YoutubeGroup.js +1 -1
- package/dist/cjs/getRelatedArticle.js +124 -62
- package/dist/cjs/getSerializers.js +6 -6
- package/dist/cjs/{index-099d45ae.js → index-2d0a4911.js} +4 -6
- package/dist/cjs/{index-3294d3bc.js → index-5be2866f.js} +1 -1
- package/dist/cjs/{index-39beccb3.js → index-b5eb3ff8.js} +18 -18
- package/dist/cjs/{index-f1006c06.js → index-c0bfab13.js} +12 -12
- package/dist/cjs/{index.es-9110add6.js → index.es-ab3f2690.js} +3 -1
- package/dist/cjs/index.js +12 -12
- package/dist/cjs/{lodash-7fd85bcf.js → lodash-fc2922d0.js} +22 -71
- package/dist/cjs/{main-a4cb15bb.js → main-b6c96c8d.js} +67 -36
- package/dist/cjs/{moment-575fe24c.js → moment-66a6a284.js} +1 -1
- package/dist/cjs/timeDifferenceCalc.js +1 -1
- package/dist/cjs/urlFor.js +1 -1
- package/dist/esm/AD.js +1 -1
- package/dist/esm/AD300x250.js +3 -3
- package/dist/esm/AD300x250x600.js +3 -3
- package/dist/esm/AD728x90.js +4 -4
- package/dist/esm/ADFloatingFooter.js +2 -2
- package/dist/esm/ADGutter.js +2 -2
- package/dist/esm/ADSkyscraper.js +2 -2
- package/dist/esm/ADSponsoredResources.js +2 -2
- package/dist/esm/ADWebcast.js +2 -2
- package/dist/esm/ADWelcome.js +2 -2
- package/dist/esm/AdSlot.js +2 -2
- package/dist/esm/AdSlotsProvider.js +1 -1
- package/dist/esm/ArticleCarousel.js +1 -1
- package/dist/esm/ArticleSeriesListing.js +4 -4
- package/dist/esm/Auth.js +300 -249
- package/dist/esm/{BlockContent-c409aca5.js → BlockContent-a614acdf.js} +1 -1
- package/dist/esm/BrowseVideosListing.js +1 -1
- package/dist/esm/CMEDeck.js +5 -16
- package/dist/esm/Column3.js +4 -4
- package/dist/esm/ConferenceArticleCard.js +2 -2
- package/dist/esm/DeckContent.js +8 -10
- package/dist/esm/DeckQueue.js +7 -13
- package/dist/esm/{Dfp-741c01be.js → Dfp-8a8fca18.js} +1 -1
- package/dist/esm/EventsDeck.js +4 -4
- package/dist/esm/ExternalResources.js +7 -7
- package/dist/esm/Feature.js +3 -3
- package/dist/esm/ForbesHero.js +2 -2
- package/dist/esm/GridContent.js +12 -14
- package/dist/esm/GridHero.js +2 -2
- package/dist/esm/GroupDeck.js +1 -1
- package/dist/esm/HamMagazine.js +4 -4
- package/dist/esm/Hero.js +1 -1
- package/dist/esm/HorizontalHero.js +2 -2
- package/dist/esm/IssueContentDeck.js +2 -2
- package/dist/esm/IssueDeck.js +2 -2
- package/dist/esm/IssueLanding.js +8 -8
- package/dist/esm/LeftNav.js +2 -2
- package/dist/esm/MasterDeck.js +8 -8
- package/dist/esm/NavMagazine.js +4 -4
- package/dist/esm/NavNative.js +3 -3
- package/dist/esm/OncliveHero.js +2 -2
- package/dist/esm/OncliveLargeHero.js +2 -2
- package/dist/esm/PartnerDetailListing.js +10 -10
- package/dist/esm/PublicationDeck.js +2 -2
- package/dist/esm/QueueDeckExpanded.js +13 -24
- package/dist/esm/RecentNews.js +2 -2
- package/dist/esm/RelatedContent.js +2 -2
- package/dist/esm/{SocialSearchComponent-93233334.js → SocialSearchComponent-7f14e0f3.js} +5 -5
- package/dist/esm/TaxonomyCard.js +2 -2
- package/dist/esm/TemplateNormal.js +3 -3
- package/dist/esm/ThumbnailCard.js +1 -1
- package/dist/esm/Ustream.js +2 -2
- package/dist/esm/VerticalHero.js +2 -2
- package/dist/esm/VideoSeriesCard.js +2 -2
- package/dist/esm/VideoSeriesListing.js +4 -4
- package/dist/esm/View.js +13 -13
- package/dist/esm/YahooHero.js +2 -2
- package/dist/esm/YoutubeGroup.js +1 -1
- package/dist/esm/getRelatedArticle.js +124 -62
- package/dist/esm/getSerializers.js +6 -6
- package/dist/esm/{index-3849e3fe.js → index-51a80699.js} +18 -18
- package/dist/esm/{index-dd276ca9.js → index-754010eb.js} +12 -12
- package/dist/esm/{index-3f4dd6f2.js → index-93ec3c59.js} +4 -6
- package/dist/esm/{index-ef6d5dcf.js → index-d2f90501.js} +1 -1
- package/dist/esm/{index.es-29c1cef5.js → index.es-938a3a58.js} +3 -1
- package/dist/esm/index.js +12 -12
- package/dist/esm/{lodash-ec8c6b48.js → lodash-17fdfebb.js} +22 -71
- package/dist/esm/{main-5d1e4bd3.js → main-0465b2a0.js} +65 -34
- package/dist/esm/{moment-e2f9b20c.js → moment-12415288.js} +1 -1
- package/dist/esm/timeDifferenceCalc.js +1 -1
- package/dist/esm/urlFor.js +1 -1
- package/package.json +3 -3
- /package/dist/cjs/{ADInfeed-1959e5c2.js → ADInfeed-3410ab3c.js} +0 -0
- /package/dist/cjs/{ADlgInfeed-b0e018e0.js → ADlgInfeed-845aac15.js} +0 -0
- /package/dist/esm/{ADInfeed-37246853.js → ADInfeed-205cb7a9.js} +0 -0
- /package/dist/esm/{ADlgInfeed-ae537002.js → ADlgInfeed-e538f17a.js} +0 -0
|
@@ -30,9 +30,18 @@ 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
|
+
|
|
33
42
|
var cookie = {
|
|
34
43
|
name: name, // grab everything before the first =
|
|
35
|
-
value:
|
|
44
|
+
value: value,
|
|
36
45
|
};
|
|
37
46
|
|
|
38
47
|
parts.forEach(function (part) {
|
|
@@ -203,7 +212,7 @@ setCookie.parse = parse_1;
|
|
|
203
212
|
setCookie.parseString = parseString_1;
|
|
204
213
|
setCookie.splitCookiesString = splitCookiesString_1;
|
|
205
214
|
|
|
206
|
-
var
|
|
215
|
+
var utils = createCommonjsModule(function (module, exports) {
|
|
207
216
|
var __assign = (commonjsGlobal && commonjsGlobal.__assign) || function () {
|
|
208
217
|
__assign = Object.assign || function(t) {
|
|
209
218
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -216,10 +225,33 @@ var __assign = (commonjsGlobal && commonjsGlobal.__assign) || function () {
|
|
|
216
225
|
return __assign.apply(this, arguments);
|
|
217
226
|
};
|
|
218
227
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
219
|
-
exports.
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
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
|
+
*/
|
|
223
255
|
function hasSameProperties(a, b) {
|
|
224
256
|
var aProps = Object.getOwnPropertyNames(a);
|
|
225
257
|
var bProps = Object.getOwnPropertyNames(b);
|
|
@@ -234,8 +266,9 @@ function hasSameProperties(a, b) {
|
|
|
234
266
|
}
|
|
235
267
|
return true;
|
|
236
268
|
}
|
|
269
|
+
exports.hasSameProperties = hasSameProperties;
|
|
237
270
|
/**
|
|
238
|
-
* Compare the cookie and return true if the cookies
|
|
271
|
+
* Compare the cookie and return true if the cookies have equivalent
|
|
239
272
|
* options and the cookies would be overwritten in the browser storage.
|
|
240
273
|
*
|
|
241
274
|
* @param a first Cookie for comparison
|
|
@@ -248,71 +281,109 @@ function areCookiesEqual(a, b) {
|
|
|
248
281
|
}
|
|
249
282
|
return (hasSameProperties(__assign(__assign({}, a), { sameSite: undefined }), __assign(__assign({}, b), { sameSite: undefined })) && sameSiteSame);
|
|
250
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
|
+
|
|
251
312
|
/**
|
|
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
|
-
*
|
|
272
313
|
* Parses cookies.
|
|
273
314
|
*
|
|
274
|
-
* @param ctx
|
|
275
|
-
* @param options
|
|
315
|
+
* @param ctx NextJS page or API context, express context, null or undefined.
|
|
316
|
+
* @param options Options that we pass down to `cookie` library.
|
|
276
317
|
*/
|
|
277
318
|
function parseCookies(ctx, options) {
|
|
278
|
-
|
|
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) {
|
|
279
321
|
return cookie.parse(ctx.req.headers.cookie, options);
|
|
280
322
|
}
|
|
281
|
-
if (isBrowser()) {
|
|
323
|
+
if (utils.isBrowser()) {
|
|
282
324
|
return cookie.parse(document.cookie, options);
|
|
283
325
|
}
|
|
284
326
|
return {};
|
|
285
327
|
}
|
|
286
328
|
exports.parseCookies = parseCookies;
|
|
287
329
|
/**
|
|
288
|
-
*
|
|
289
330
|
* Sets a cookie.
|
|
290
331
|
*
|
|
291
|
-
* @param ctx
|
|
292
|
-
* @param name
|
|
293
|
-
* @param value
|
|
294
|
-
* @param options
|
|
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.
|
|
295
336
|
*/
|
|
296
337
|
function setCookie$1(ctx, name, value, options) {
|
|
297
|
-
|
|
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
|
+
*/
|
|
298
351
|
var cookies = ctx.res.getHeader('Set-Cookie') || [];
|
|
299
352
|
if (typeof cookies === 'string')
|
|
300
353
|
cookies = [cookies];
|
|
301
354
|
if (typeof cookies === 'number')
|
|
302
355
|
cookies = [];
|
|
303
|
-
|
|
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);
|
|
304
368
|
var cookiesToSet_1 = [];
|
|
305
369
|
parsedCookies.forEach(function (parsedCookie) {
|
|
306
|
-
if (!areCookiesEqual(parsedCookie,
|
|
307
|
-
|
|
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);
|
|
308
379
|
}
|
|
309
380
|
});
|
|
310
381
|
cookiesToSet_1.push(cookie.serialize(name, value, options));
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
}
|
|
382
|
+
// Update the header.
|
|
383
|
+
ctx.res.setHeader('Set-Cookie', cookiesToSet_1);
|
|
314
384
|
}
|
|
315
|
-
|
|
385
|
+
// Browser
|
|
386
|
+
if (utils.isBrowser()) {
|
|
316
387
|
if (options && options.httpOnly) {
|
|
317
388
|
throw new Error('Can not set a httpOnly cookie in the browser.');
|
|
318
389
|
}
|
|
@@ -322,30 +393,21 @@ function setCookie$1(ctx, name, value, options) {
|
|
|
322
393
|
}
|
|
323
394
|
exports.setCookie = setCookie$1;
|
|
324
395
|
/**
|
|
325
|
-
*
|
|
326
396
|
* Destroys a cookie with a particular name.
|
|
327
397
|
*
|
|
328
|
-
* @param ctx
|
|
329
|
-
* @param name
|
|
330
|
-
* @param options
|
|
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.
|
|
331
401
|
*/
|
|
332
402
|
function destroyCookie(ctx, name, options) {
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
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 {};
|
|
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 }));
|
|
347
408
|
}
|
|
348
409
|
exports.destroyCookie = destroyCookie;
|
|
410
|
+
/* Utility Exports */
|
|
349
411
|
exports.default = {
|
|
350
412
|
set: setCookie$1,
|
|
351
413
|
get: parseCookies,
|
|
@@ -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-
|
|
17
|
+
import './index-93ec3c59.js';
|
|
18
18
|
import 'prop-types';
|
|
19
19
|
import 'react-bootstrap/Row';
|
|
20
20
|
import 'react-bootstrap/Col';
|
|
21
|
-
import './moment-
|
|
21
|
+
import './moment-12415288.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-
|
|
26
|
+
import './index-51a80699.js';
|
|
27
27
|
import './index-5f9f807a.js';
|
|
28
|
-
import './main-
|
|
28
|
+
import './main-0465b2a0.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-
|
|
37
|
+
import './BlockContent-a614acdf.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-
|
|
44
|
+
export { g as default } from './index-754010eb.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 ||
|
|
396
|
+
var baseUrl = options.baseUrl || this.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
|
-
//
|
|
524
|
+
// Alias for url()
|
|
525
525
|
ImageUrlBuilder.prototype.toString = function () {
|
|
526
526
|
return this.url();
|
|
527
527
|
};
|
|
@@ -4,21 +4,21 @@ import { _ as _extends } from './extends-cc5da797.js';
|
|
|
4
4
|
import { _ as _inherits$1, a as _classCallCheck$1, b as _possibleConstructorReturn$1, c as _Object$getPrototypeOf, d as _createClass$1 } from './inherits-7ee3e0c1.js';
|
|
5
5
|
import { _ as _typeof$1 } from './typeof-08f2c380.js';
|
|
6
6
|
import React__default, { useState, useEffect, useRef, useLayoutEffect, useCallback } from 'react';
|
|
7
|
-
import { l as lib_3 } from './index-
|
|
7
|
+
import { l as lib_3 } from './index-93ec3c59.js';
|
|
8
8
|
import PropTypes from 'prop-types';
|
|
9
9
|
import Row from 'react-bootstrap/Row';
|
|
10
10
|
import Col from 'react-bootstrap/Col';
|
|
11
|
-
import { m as moment } from './moment-
|
|
11
|
+
import { m as moment } from './moment-12415288.js';
|
|
12
12
|
import Router, { useRouter } from 'next/router';
|
|
13
|
-
import { i as imageUrlBuilder } from './index-
|
|
13
|
+
import { i as imageUrlBuilder } from './index-51a80699.js';
|
|
14
14
|
import { L as LazyLoad } from './index-5f9f807a.js';
|
|
15
|
-
import { b as main_16, c as
|
|
15
|
+
import { b as main_16, c as main_38, m as main_39 } from './main-0465b2a0.js';
|
|
16
16
|
import { h as html_decode_1 } from './entities-7cc3bf45.js';
|
|
17
17
|
import { _ as _slicedToArray } from './slicedToArray-7021e5df.js';
|
|
18
18
|
import Segment from './Segment.js';
|
|
19
19
|
import Beam from './Beam.js';
|
|
20
20
|
import DFPAdSlot from './AdSlot.js';
|
|
21
|
-
import { B as BlockContent } from './BlockContent-
|
|
21
|
+
import { B as BlockContent } from './BlockContent-a614acdf.js';
|
|
22
22
|
import { g as getYoutubeId } from './smoothscroll-4b699764.js';
|
|
23
23
|
import GroupDeck from './GroupDeck.js';
|
|
24
24
|
import { Carousel, Table, Figure as Figure$1, Button, ProgressBar, Card, Row as Row$1, Col as Col$1 } from 'react-bootstrap';
|
|
@@ -7507,7 +7507,7 @@ var Poll = function Poll(_ref) {
|
|
|
7507
7507
|
);
|
|
7508
7508
|
};
|
|
7509
7509
|
|
|
7510
|
-
var numberOfPaginations =
|
|
7510
|
+
var numberOfPaginations = main_38 ? 4 : 10;
|
|
7511
7511
|
|
|
7512
7512
|
var Quiz = function Quiz(_ref) {
|
|
7513
7513
|
var quizzes = _ref.quizzes,
|
|
@@ -7620,7 +7620,7 @@ var Quiz = function Quiz(_ref) {
|
|
|
7620
7620
|
var renderPagination = function renderPagination() {
|
|
7621
7621
|
return React__default.createElement(
|
|
7622
7622
|
Pagination,
|
|
7623
|
-
{ className: 'p-0 m-0', size:
|
|
7623
|
+
{ className: 'p-0 m-0', size: main_38 && 'sm' },
|
|
7624
7624
|
React__default.createElement(Pagination.First, { onClick: function onClick() {
|
|
7625
7625
|
return changePage('first');
|
|
7626
7626
|
}, disabled: currentPage === 1 }),
|
|
@@ -8243,7 +8243,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8243
8243
|
useLayoutEffect(function () {
|
|
8244
8244
|
//console.log('useLayoutEffect')
|
|
8245
8245
|
if (!firstLoad) {
|
|
8246
|
-
if (
|
|
8246
|
+
if (main_39) {
|
|
8247
8247
|
grabLoadedAds();
|
|
8248
8248
|
} else {
|
|
8249
8249
|
scrollToArticle();
|
|
@@ -8267,7 +8267,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8267
8267
|
//let targeting = getTargeting({ article: activeArticle, cpModificationRequired, position: props.position, prevUrl })
|
|
8268
8268
|
if (pageview) pageview(path);
|
|
8269
8269
|
|
|
8270
|
-
if (!
|
|
8270
|
+
if (!main_39) {
|
|
8271
8271
|
lib_3.getGoogletag().then(function (googletag) {
|
|
8272
8272
|
if (window.googletag && googletag.pubadsReady) {
|
|
8273
8273
|
lib_3.refresh();
|
|
@@ -8275,7 +8275,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8275
8275
|
});
|
|
8276
8276
|
}
|
|
8277
8277
|
//Refresh leaderboard ad on mobile
|
|
8278
|
-
if (
|
|
8278
|
+
if (main_39) {
|
|
8279
8279
|
var leaderboardSlotId = '';
|
|
8280
8280
|
lib_3.getGoogletag().then(function (googletag) {
|
|
8281
8281
|
if (window.googletag && googletag.pubadsReady) {
|
|
@@ -8336,7 +8336,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8336
8336
|
React__default.createElement(
|
|
8337
8337
|
'div',
|
|
8338
8338
|
{ className: 'ad-box', style: { textAlign: 'center' } },
|
|
8339
|
-
|
|
8339
|
+
main_39 && Ads.map(function (ad, index) {
|
|
8340
8340
|
if (index === 0) {
|
|
8341
8341
|
return React__default.createElement(
|
|
8342
8342
|
'div',
|
|
@@ -8457,7 +8457,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8457
8457
|
React__default.createElement(
|
|
8458
8458
|
'div',
|
|
8459
8459
|
{ className: 'ad-box', style: { textAlign: 'center' } },
|
|
8460
|
-
|
|
8460
|
+
main_39 && Articles.length - 1 !== index && Ads.map(function (ad, innerIndex) {
|
|
8461
8461
|
if (innerIndex === 0) {
|
|
8462
8462
|
return React__default.createElement(
|
|
8463
8463
|
'div',
|
|
@@ -821,15 +821,13 @@ var DFPManager = Object.assign(new EventEmitter.EventEmitter().setMaxListeners(0
|
|
|
821
821
|
});
|
|
822
822
|
|
|
823
823
|
if (_this5.lazyLoadIsEnabled()) {
|
|
824
|
-
var args = [];
|
|
825
|
-
|
|
826
824
|
var config = _this5.getLazyLoadConfig();
|
|
827
825
|
|
|
828
|
-
if (config
|
|
829
|
-
|
|
826
|
+
if (config) {
|
|
827
|
+
pubadsService.enableLazyLoad(config);
|
|
828
|
+
} else {
|
|
829
|
+
pubadsService.enableLazyLoad();
|
|
830
830
|
}
|
|
831
|
-
|
|
832
|
-
pubadsService.enableLazyLoad.call(args);
|
|
833
831
|
}
|
|
834
832
|
|
|
835
833
|
if (_this5.singleRequestIsEnabled()) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as createCommonjsModule, a as commonjsGlobal, g as getCjsExportFromNamespace } from './_commonjsHelpers-0c4b6f40.js';
|
|
2
|
-
import { m as moment } from './moment-
|
|
2
|
+
import { m as moment } from './moment-12415288.js';
|
|
3
3
|
|
|
4
4
|
var momentTimezone = createCommonjsModule(function (module) {
|
|
5
5
|
//! moment-timezone.js
|
|
@@ -263,6 +263,9 @@ var InfiniteScroll = /** @class */ (function (_super) {
|
|
|
263
263
|
_this.dragging = false;
|
|
264
264
|
if (_this.state.pullToRefreshThresholdBreached) {
|
|
265
265
|
_this.props.refreshFunction && _this.props.refreshFunction();
|
|
266
|
+
_this.setState({
|
|
267
|
+
pullToRefreshThresholdBreached: false,
|
|
268
|
+
});
|
|
266
269
|
}
|
|
267
270
|
requestAnimationFrame(function () {
|
|
268
271
|
// this._infScroll
|
|
@@ -369,7 +372,6 @@ var InfiniteScroll = /** @class */ (function (_super) {
|
|
|
369
372
|
// update state when new data was sent in
|
|
370
373
|
this.setState({
|
|
371
374
|
showLoader: false,
|
|
372
|
-
pullToRefreshThresholdBreached: false,
|
|
373
375
|
});
|
|
374
376
|
};
|
|
375
377
|
InfiniteScroll.prototype.isElementAtBottom = function (target, scrollThreshold) {
|
package/dist/esm/index.js
CHANGED
|
@@ -14,22 +14,22 @@ 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-
|
|
17
|
+
import './index-93ec3c59.js';
|
|
18
18
|
import 'prop-types';
|
|
19
19
|
import 'react-bootstrap/Container';
|
|
20
20
|
import 'react-bootstrap/Row';
|
|
21
21
|
import 'react-bootstrap/Col';
|
|
22
22
|
import 'react-bootstrap/Card';
|
|
23
|
-
import './moment-
|
|
23
|
+
import './moment-12415288.js';
|
|
24
24
|
import 'next/router';
|
|
25
25
|
import './isSymbol-807e927e.js';
|
|
26
26
|
import './debounce-1a993acf.js';
|
|
27
|
-
import './index.es-
|
|
27
|
+
import './index.es-938a3a58.js';
|
|
28
28
|
import 'react-dom';
|
|
29
29
|
import './visibility-sensor-0baa4eea.js';
|
|
30
|
-
import './index-
|
|
30
|
+
import './index-51a80699.js';
|
|
31
31
|
import './index-5f9f807a.js';
|
|
32
|
-
import './main-
|
|
32
|
+
import './main-0465b2a0.js';
|
|
33
33
|
import './entities-7cc3bf45.js';
|
|
34
34
|
import './stringify-008c8802.js';
|
|
35
35
|
import './slicedToArray-7021e5df.js';
|
|
@@ -38,10 +38,10 @@ import './_set-species-cede29f8.js';
|
|
|
38
38
|
export { default as Segment } from './Segment.js';
|
|
39
39
|
export { default as Beam } from './Beam.js';
|
|
40
40
|
export { default as AdSlot } from './AdSlot.js';
|
|
41
|
-
import './ADInfeed-
|
|
41
|
+
import './ADInfeed-205cb7a9.js';
|
|
42
42
|
export { default as DeckContent } from './DeckContent.js';
|
|
43
|
-
import './lodash-
|
|
44
|
-
import './ADlgInfeed-
|
|
43
|
+
import './lodash-17fdfebb.js';
|
|
44
|
+
import './ADlgInfeed-e538f17a.js';
|
|
45
45
|
import './getContentCategory-15dcc413.js';
|
|
46
46
|
import './get-5ee14cda.js';
|
|
47
47
|
export { default as AD } from './AD.js';
|
|
@@ -50,7 +50,7 @@ export { default as GridContent } from './GridContent.js';
|
|
|
50
50
|
export { default as DeckQueue } from './DeckQueue.js';
|
|
51
51
|
import 'react-bootstrap/Media';
|
|
52
52
|
export { default as ThumbnailCard } from './ThumbnailCard.js';
|
|
53
|
-
import './BlockContent-
|
|
53
|
+
import './BlockContent-a614acdf.js';
|
|
54
54
|
import './react-social-icons-a7d5c5c7.js';
|
|
55
55
|
export { default as TaxonomyCard } from './TaxonomyCard.js';
|
|
56
56
|
export { default as RolesDeck } from './RolesDeck.js';
|
|
@@ -76,10 +76,10 @@ import './defineProperty-b798470d.js';
|
|
|
76
76
|
export { default as EventsDeck } from './EventsDeck.js';
|
|
77
77
|
import 'react-bootstrap/Spinner';
|
|
78
78
|
import 'react-bootstrap/Form';
|
|
79
|
-
import './index-
|
|
79
|
+
import './index-d2f90501.js';
|
|
80
80
|
import './js.cookie-6874175c.js';
|
|
81
81
|
export { default as CMEDeck } from './CMEDeck.js';
|
|
82
|
-
export { g as getSerializers } from './index-
|
|
82
|
+
export { g as getSerializers } from './index-754010eb.js';
|
|
83
83
|
import './util-7700fc59.js';
|
|
84
84
|
import './brightcove-react-player-loader.es-83f53e4e.js';
|
|
85
85
|
import 'react-bootstrap/Pagination';
|
|
@@ -110,7 +110,7 @@ import './NavFooter-e27bd93b.js';
|
|
|
110
110
|
import './index.esm-fd746768.js';
|
|
111
111
|
export { default as SocialIcons } from './SocialIcons.js';
|
|
112
112
|
import 'react-bootstrap/FormControl';
|
|
113
|
-
import './SocialSearchComponent-
|
|
113
|
+
import './SocialSearchComponent-7f14e0f3.js';
|
|
114
114
|
export { default as NavMagazine } from './NavMagazine.js';
|
|
115
115
|
export { NavNative } from './NavNative.js';
|
|
116
116
|
export { default as Search } from './Search.js';
|