@mjhls/mjh-framework 1.0.682 → 1.0.684-beta.0

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 (152) 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 +256 -507
  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 +8 -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 +1213 -15
  45. package/dist/cjs/PublicationDeck.js +1 -1
  46. package/dist/cjs/QueueDeckExpanded.js +256 -18
  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 +3 -3
  57. package/dist/cjs/View.js +486 -119
  58. package/dist/cjs/YahooHero.js +2 -2
  59. package/dist/cjs/YoutubeGroup.js +1 -1
  60. package/dist/cjs/getQuery.js +2 -2
  61. package/dist/cjs/getRelatedArticle.js +354 -5
  62. package/dist/cjs/getSerializers.js +6 -6
  63. package/dist/cjs/{getTargeting-fee8c429.js → getTargeting-9af0ef69.js} +2 -2
  64. package/dist/cjs/getTargeting.js +1 -1
  65. package/dist/cjs/{index-5be2866f.js → index-3294d3bc.js} +1 -1
  66. package/dist/cjs/index-bd6c9f56.js +211 -0
  67. package/dist/cjs/{index-b5eb3ff8.js → index-be0c82be.js} +19 -20
  68. package/dist/cjs/{index-8c9e8ca7.js → index-c49c3b5e.js} +450 -462
  69. package/dist/cjs/{index-2d0a4911.js → index-fa8ed292.js} +27 -34
  70. package/dist/cjs/{index.es-ab3f2690.js → index.es-9110add6.js} +1 -3
  71. package/dist/cjs/index.js +16 -16
  72. package/dist/cjs/{main-b6c96c8d.js → main-a4cb15bb.js} +36 -67
  73. package/dist/cjs/{moment-66a6a284.js → moment-575fe24c.js} +1 -1
  74. package/dist/cjs/timeDifferenceCalc.js +41 -0
  75. package/dist/cjs/urlFor.js +1 -1
  76. package/dist/esm/AD.js +1 -1
  77. package/dist/esm/AD300x250.js +3 -3
  78. package/dist/esm/AD300x250x600.js +3 -3
  79. package/dist/esm/AD728x90.js +4 -4
  80. package/dist/esm/ADFloatingFooter.js +2 -2
  81. package/dist/esm/ADGutter.js +2 -2
  82. package/dist/esm/ADSkyscraper.js +2 -2
  83. package/dist/esm/ADSponsoredResources.js +2 -2
  84. package/dist/esm/ADWebcast.js +2 -2
  85. package/dist/esm/ADWelcome.js +2 -2
  86. package/dist/esm/AdSlot.js +2 -2
  87. package/dist/esm/AdSlotsProvider.js +1 -1
  88. package/dist/esm/ArticleCarousel.js +1 -1
  89. package/dist/esm/ArticleSeriesListing.js +4 -4
  90. package/dist/esm/Auth.js +248 -499
  91. package/dist/esm/{BlockContent-a614acdf.js → BlockContent-e9b4ddcf.js} +1 -1
  92. package/dist/esm/BrowseVideosListing.js +1 -1
  93. package/dist/esm/CMEDeck.js +5 -5
  94. package/dist/esm/Column3.js +4 -4
  95. package/dist/esm/ConferenceArticleCard.js +2 -2
  96. package/dist/esm/DeckContent.js +7 -7
  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 +7 -7
  101. package/dist/esm/Feature.js +3 -3
  102. package/dist/esm/ForbesHero.js +2 -2
  103. package/dist/esm/GridContent.js +10 -10
  104. package/dist/esm/GridHero.js +2 -2
  105. package/dist/esm/GroupDeck.js +1 -1
  106. package/dist/esm/HamMagazine.js +4 -4
  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 -7
  112. package/dist/esm/LeftNav.js +2 -2
  113. package/dist/esm/MasterDeck.js +7 -7
  114. package/dist/esm/NavMagazine.js +4 -4
  115. package/dist/esm/NavNative.js +3 -3
  116. package/dist/esm/OncliveHero.js +2 -2
  117. package/dist/esm/OncliveLargeHero.js +2 -2
  118. package/dist/esm/PartnerDetailListing.js +1210 -13
  119. package/dist/esm/PublicationDeck.js +1 -1
  120. package/dist/esm/QueueDeckExpanded.js +256 -18
  121. package/dist/esm/RecentNews.js +2 -2
  122. package/dist/esm/RelatedContent.js +2 -2
  123. package/dist/esm/{SocialSearchComponent-7f14e0f3.js → SocialSearchComponent-93233334.js} +5 -5
  124. package/dist/esm/TaxonomyCard.js +2 -2
  125. package/dist/esm/TemplateNormal.js +3 -3
  126. package/dist/esm/ThumbnailCard.js +1 -1
  127. package/dist/esm/Ustream.js +2 -2
  128. package/dist/esm/VerticalHero.js +2 -2
  129. package/dist/esm/VideoSeriesCard.js +2 -2
  130. package/dist/esm/VideoSeriesListing.js +3 -3
  131. package/dist/esm/View.js +460 -93
  132. package/dist/esm/YahooHero.js +2 -2
  133. package/dist/esm/YoutubeGroup.js +1 -1
  134. package/dist/esm/getQuery.js +2 -2
  135. package/dist/esm/getRelatedArticle.js +354 -5
  136. package/dist/esm/getSerializers.js +6 -6
  137. package/dist/esm/{index-93ec3c59.js → index-0e45a0b2.js} +27 -34
  138. package/dist/esm/{index-51a80699.js → index-73819142.js} +19 -20
  139. package/dist/esm/{index-5505d4f9.js → index-85783f24.js} +450 -462
  140. package/dist/esm/index-db3bb315.js +207 -0
  141. package/dist/esm/{index-d2f90501.js → index-ef6d5dcf.js} +1 -1
  142. package/dist/esm/{index.es-938a3a58.js → index.es-29c1cef5.js} +1 -3
  143. package/dist/esm/index.js +14 -14
  144. package/dist/esm/{main-0465b2a0.js → main-5d1e4bd3.js} +34 -65
  145. package/dist/esm/{moment-12415288.js → moment-e2f9b20c.js} +1 -1
  146. package/dist/esm/timeDifferenceCalc.js +39 -0
  147. package/dist/esm/urlFor.js +1 -1
  148. package/package.json +1 -1
  149. /package/dist/cjs/{ADInfeed-c676389b.js → ADInfeed-f27bc4b5.js} +0 -0
  150. /package/dist/cjs/{ADlgInfeed-57d63c87.js → ADlgInfeed-8decfd9e.js} +0 -0
  151. /package/dist/esm/{ADInfeed-97b8cea7.js → ADInfeed-1e0ca5e0.js} +0 -0
  152. /package/dist/esm/{ADlgInfeed-3ab91c75.js → ADlgInfeed-979cf0d5.js} +0 -0
@@ -5,9 +5,9 @@ import './core.get-iterator-method-54d2e411.js';
5
5
  import './web.dom.iterable-8956f9a5.js';
6
6
  import React__default from 'react';
7
7
  import 'prop-types';
8
- import { m as moment } from './moment-12415288.js';
8
+ import { m as moment } from './moment-e2f9b20c.js';
9
9
  import 'react-dom';
10
- import { i as imageUrlBuilder } from './index-51a80699.js';
10
+ import { i as imageUrlBuilder } from './index-73819142.js';
11
11
  import { L as LazyLoad } from './index-5f9f807a.js';
12
12
  import { c as clean_html_1 } from './entities-7cc3bf45.js';
13
13
  import './slicedToArray-7021e5df.js';
@@ -10,7 +10,7 @@ import './_is-array-49698029.js';
10
10
  import React__default, { useRef, useState, useEffect } from 'react';
11
11
  import 'prop-types';
12
12
  import 'react-dom';
13
- import { i as imageUrlBuilder } from './index-51a80699.js';
13
+ import { i as imageUrlBuilder } from './index-73819142.js';
14
14
  import { L as LazyLoad } from './index-5f9f807a.js';
15
15
  import { _ as _slicedToArray } from './slicedToArray-7021e5df.js';
16
16
  import { s as smoothscroll, g as getYoutubeId } from './smoothscroll-4b699764.js';
@@ -8,9 +8,9 @@ var getQuery = function getQuery(type) {
8
8
 
9
9
  switch (type) {
10
10
  case 'related':
11
- return '*[\n _type == "article"\n && defined(title)\n && defined(url)\n && !(_id in path("drafts.**"))\n && is_visible == true\n && defined(published) \n && dateTime(published) <= dateTime(now())\n && passwordLock!=true\n && taxonomyMapping[]._ref in $taxonomy\n && taxonomyMapping[].disableAds != \'true\'\n && contentCategory->.name != \'Poll\'\n && contentCategory->.name != \'Slideshows\'\n && contentCategory->.disableAds != \'true\'\n && ExcludeFromInfiniteScroll !=true\n && url.current != $url\n && !defined(body[].videos)\n ' + conditions + '\n ]| order(published desc)[' + (articleCount ? articleCount : '$index') + ']{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n ...,\n passwordLock,\n password,\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography },\n body[] {\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n }\n },\n \'content_placement\': taxonomyMapping[]-> {\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier,\n disableAds\n },\n documentGroup-> {\n name,\n thumbnail,\n parent->{...,parent->},\n \'path\': identifier.current\n },\n documentGroupMapping[]-> {\n name,\n thumbnail,\n parent->{...,parent->},\n \'path\': identifier.current\n },\n \'issue\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.issueGroup._ref][0] {\n name,\n \'path\': identifier.current,\n \'publication\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.parent._ref][0] {\n name,\n \'path\': identifier.current\n },\n \'url\' : pdf.asset-> url\n }\n }';
11
+ return '*[\n _type == "article"\n && defined(title)\n && defined(url)\n && !(_id in path("drafts.**"))\n && is_visible == true\n && defined(published) \n && dateTime(published) <= dateTime(now())\n && passwordLock!=true\n && taxonomyMapping[]._ref in $taxonomy\n && taxonomyMapping[].disableAds != \'true\'\n && contentCategory->.name != \'Poll\'\n && contentCategory->.name != \'Slideshows\'\n && contentCategory->.disableAds != \'true\'\n && ExcludeFromInfiniteScroll !=true\n && url.current != $url\n && !defined(body[].videos)\n ' + conditions + '\n ]| order(published desc)[' + (articleCount ? articleCount : '$index') + ']{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n ...,\n passwordLock,\n password,\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography },\n body[] {\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n }\n },\n \'content_placement\': taxonomyMapping[]-> {\n _id,\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier,\n disableAds\n },\n documentGroup-> {\n name,\n thumbnail,\n parent->{...,parent->},\n \'path\': identifier.current\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n \'path\': identifier.current\n },\n \'issue\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.issueGroup._ref][0] {\n name,\n \'path\': identifier.current,\n \'publication\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.parent._ref][0] {\n name,\n \'path\': identifier.current\n },\n \'url\' : pdf.asset-> url\n }\n }';
12
12
  case 'article':
13
- return '*[\n _type == "article"\n && !(_id in path("drafts.**"))\n && defined(title)\n && defined(url)\n && url.current == $url\n ' + conditions + '\n ][0]{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n ...,\n passwordLock,\n password,\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography },\n body[] {\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n },\n medias[]{\n ...,\n upload_doc {\n _type,\n asset-> \n } \n },\n articles[]{\n ...,\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography },\n }\n },\n \'content_placement\': taxonomyMapping[]-> {\n ...,\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier\n },\n documentGroup-> {\n name,\n thumbnail,\n parent->{...,parent->},\n \'path\': identifier.current\n },\n documentGroupMapping[]-> {\n name,\n thumbnail,\n parent->{...,parent->},\n \'path\': identifier.current\n },\n \'category\':contentCategory->{\n name,\n disableAds\n },\n \'issue\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.issueGroup._ref][0] {\n name,\n volume,\n \'issueNumber\': number,\n \'articleSource\': source,\n \'path\': identifier.current,\n \'publication\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.parent._ref][0] {\n name,\n \'path\': identifier.current\n },\n \'url\' : pdf.asset-> url\n }\n\n }';
13
+ return '*[\n _type == "article"\n && !(_id in path("drafts.**"))\n && defined(title)\n && defined(url)\n && url.current == $url\n ' + conditions + '\n ][0]{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n ...,\n passwordLock,\n password,\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography },\n body[] {\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n },\n medias[]{\n ...,\n upload_doc {\n _type,\n asset-> \n } \n },\n articles[]{\n ...,\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography },\n text[]{\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n },\n }\n }\n },\n \'content_placement\': taxonomyMapping[]-> {\n ...,\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier\n },\n documentGroup-> {\n name,\n thumbnail,\n parent->{...,parent->},\n \'path\': identifier.current\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n \'path\': identifier.current\n },\n \'category\':contentCategory->{\n name,\n disableAds\n },\n \'issue\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.issueGroup._ref][0] {\n name,\n volume,\n \'issueNumber\': number,\n \'articleSource\': source,\n \'path\': identifier.current,\n \'publication\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.parent._ref][0] {\n name,\n \'path\': identifier.current\n },\n \'url\' : pdf.asset-> url\n }\n\n }';
14
14
  case 'publication':
15
15
  return '*[_type == \'publication\'\n && identifier.current == $publication\n ' + conditions + '][0] {\n ' + params + '\n ...,\n \'issues\': *[_type == \'publication\'\n && is_visible\n && references(^._id)\n && defined(identifier)] {\n ...,\n pdf{asset->}\n } | order(year desc, month desc)\n }';
16
16
  case 'issue':
@@ -1,4 +1,4 @@
1
- import './_commonjsHelpers-0c4b6f40.js';
1
+ import { c as createCommonjsModule, u as unwrapExports, a as commonjsGlobal } from './_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,9 +7,358 @@ 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 { parseCookies, setCookie } from 'nookies';
10
+ import { c as cookie } from './index-db3bb315.js';
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
+ var cookie = {
34
+ name: name, // grab everything before the first =
35
+ value: options.decodeValues ? decodeURIComponent(value) : value, // decode cookie value
36
+ };
37
+
38
+ parts.forEach(function (part) {
39
+ var sides = part.split("=");
40
+ var key = sides.shift().trimLeft().toLowerCase();
41
+ var value = sides.join("=");
42
+ if (key === "expires") {
43
+ cookie.expires = new Date(value);
44
+ } else if (key === "max-age") {
45
+ cookie.maxAge = parseInt(value, 10);
46
+ } else if (key === "secure") {
47
+ cookie.secure = true;
48
+ } else if (key === "httponly") {
49
+ cookie.httpOnly = true;
50
+ } else if (key === "samesite") {
51
+ cookie.sameSite = value;
52
+ } else {
53
+ cookie[key] = value;
54
+ }
55
+ });
56
+
57
+ return cookie;
58
+ }
59
+
60
+ function parse(input, options) {
61
+ options = options
62
+ ? Object.assign({}, defaultParseOptions, options)
63
+ : defaultParseOptions;
64
+
65
+ if (!input) {
66
+ if (!options.map) {
67
+ return [];
68
+ } else {
69
+ return {};
70
+ }
71
+ }
72
+
73
+ if (input.headers && input.headers["set-cookie"]) {
74
+ // fast-path for node.js (which automatically normalizes header names to lower-case
75
+ input = input.headers["set-cookie"];
76
+ } else if (input.headers) {
77
+ // slow-path for other environments - see #25
78
+ var sch =
79
+ input.headers[
80
+ Object.keys(input.headers).find(function (key) {
81
+ return key.toLowerCase() === "set-cookie";
82
+ })
83
+ ];
84
+ // warn if called on a request-like object with a cookie header rather than a set-cookie header - see #34, 36
85
+ if (!sch && input.headers.cookie && !options.silent) {
86
+ console.warn(
87
+ "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."
88
+ );
89
+ }
90
+ input = sch;
91
+ }
92
+ if (!Array.isArray(input)) {
93
+ input = [input];
94
+ }
95
+
96
+ options = options
97
+ ? Object.assign({}, defaultParseOptions, options)
98
+ : defaultParseOptions;
99
+
100
+ if (!options.map) {
101
+ return input.filter(isNonEmptyString).map(function (str) {
102
+ return parseString(str, options);
103
+ });
104
+ } else {
105
+ var cookies = {};
106
+ return input.filter(isNonEmptyString).reduce(function (cookies, str) {
107
+ var cookie = parseString(str, options);
108
+ cookies[cookie.name] = cookie;
109
+ return cookies;
110
+ }, cookies);
111
+ }
112
+ }
113
+
114
+ /*
115
+ Set-Cookie header field-values are sometimes comma joined in one string. This splits them without choking on commas
116
+ that are within a single set-cookie field-value, such as in the Expires portion.
117
+
118
+ This is uncommon, but explicitly allowed - see https://tools.ietf.org/html/rfc2616#section-4.2
119
+ Node.js does this for every header *except* set-cookie - see https://github.com/nodejs/node/blob/d5e363b77ebaf1caf67cd7528224b651c86815c1/lib/_http_incoming.js#L128
120
+ React Native's fetch does this for *every* header, including set-cookie.
121
+
122
+ Based on: https://github.com/google/j2objc/commit/16820fdbc8f76ca0c33472810ce0cb03d20efe25
123
+ Credits to: https://github.com/tomball for original and https://github.com/chrusart for JavaScript implementation
124
+ */
125
+ function splitCookiesString(cookiesString) {
126
+ if (Array.isArray(cookiesString)) {
127
+ return cookiesString;
128
+ }
129
+ if (typeof cookiesString !== "string") {
130
+ return [];
131
+ }
132
+
133
+ var cookiesStrings = [];
134
+ var pos = 0;
135
+ var start;
136
+ var ch;
137
+ var lastComma;
138
+ var nextStart;
139
+ var cookiesSeparatorFound;
140
+
141
+ function skipWhitespace() {
142
+ while (pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))) {
143
+ pos += 1;
144
+ }
145
+ return pos < cookiesString.length;
146
+ }
147
+
148
+ function notSpecialChar() {
149
+ ch = cookiesString.charAt(pos);
150
+
151
+ return ch !== "=" && ch !== ";" && ch !== ",";
152
+ }
153
+
154
+ while (pos < cookiesString.length) {
155
+ start = pos;
156
+ cookiesSeparatorFound = false;
157
+
158
+ while (skipWhitespace()) {
159
+ ch = cookiesString.charAt(pos);
160
+ if (ch === ",") {
161
+ // ',' is a cookie separator if we have later first '=', not ';' or ','
162
+ lastComma = pos;
163
+ pos += 1;
164
+
165
+ skipWhitespace();
166
+ nextStart = pos;
167
+
168
+ while (pos < cookiesString.length && notSpecialChar()) {
169
+ pos += 1;
170
+ }
171
+
172
+ // currently special character
173
+ if (pos < cookiesString.length && cookiesString.charAt(pos) === "=") {
174
+ // we found cookies separator
175
+ cookiesSeparatorFound = true;
176
+ // pos is inside the next cookie, so back up and return it.
177
+ pos = nextStart;
178
+ cookiesStrings.push(cookiesString.substring(start, lastComma));
179
+ start = pos;
180
+ } else {
181
+ // in param ',' or param separator ';',
182
+ // we continue from that comma
183
+ pos = lastComma + 1;
184
+ }
185
+ } else {
186
+ pos += 1;
187
+ }
188
+ }
189
+
190
+ if (!cookiesSeparatorFound || pos >= cookiesString.length) {
191
+ cookiesStrings.push(cookiesString.substring(start, cookiesString.length));
192
+ }
193
+ }
194
+
195
+ return cookiesStrings;
196
+ }
197
+
198
+ var setCookie = parse;
199
+ var parse_1 = parse;
200
+ var parseString_1 = parseString;
201
+ var splitCookiesString_1 = splitCookiesString;
202
+ setCookie.parse = parse_1;
203
+ setCookie.parseString = parseString_1;
204
+ setCookie.splitCookiesString = splitCookiesString_1;
205
+
206
+ var dist = createCommonjsModule(function (module, exports) {
207
+ var __assign = (commonjsGlobal && commonjsGlobal.__assign) || function () {
208
+ __assign = Object.assign || function(t) {
209
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
210
+ s = arguments[i];
211
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
212
+ t[p] = s[p];
213
+ }
214
+ return t;
215
+ };
216
+ return __assign.apply(this, arguments);
217
+ };
218
+ Object.defineProperty(exports, "__esModule", { value: true });
219
+ exports.destroyCookie = exports.setCookie = exports.parseCookies = void 0;
220
+
221
+
222
+ var isBrowser = function () { return typeof window !== 'undefined'; };
223
+ function hasSameProperties(a, b) {
224
+ var aProps = Object.getOwnPropertyNames(a);
225
+ var bProps = Object.getOwnPropertyNames(b);
226
+ if (aProps.length !== bProps.length) {
227
+ return false;
228
+ }
229
+ for (var i = 0; i < aProps.length; i++) {
230
+ var propName = aProps[i];
231
+ if (a[propName] !== b[propName]) {
232
+ return false;
233
+ }
234
+ }
235
+ return true;
236
+ }
237
+ /**
238
+ * Compare the cookie and return true if the cookies has equivalent
239
+ * options and the cookies would be overwritten in the browser storage.
240
+ *
241
+ * @param a first Cookie for comparison
242
+ * @param b second Cookie for comparison
243
+ */
244
+ function areCookiesEqual(a, b) {
245
+ var sameSiteSame = a.sameSite === b.sameSite;
246
+ if (typeof a.sameSite === 'string' && typeof b.sameSite === 'string') {
247
+ sameSiteSame = a.sameSite.toLowerCase() === b.sameSite.toLowerCase();
248
+ }
249
+ return (hasSameProperties(__assign(__assign({}, a), { sameSite: undefined }), __assign(__assign({}, b), { sameSite: undefined })) && sameSiteSame);
250
+ }
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
+ *
272
+ * Parses cookies.
273
+ *
274
+ * @param ctx
275
+ * @param options
276
+ */
277
+ function parseCookies(ctx, options) {
278
+ if (ctx && ctx.req && ctx.req.headers && ctx.req.headers.cookie) {
279
+ return cookie.parse(ctx.req.headers.cookie, options);
280
+ }
281
+ if (isBrowser()) {
282
+ return cookie.parse(document.cookie, options);
283
+ }
284
+ return {};
285
+ }
286
+ exports.parseCookies = parseCookies;
287
+ /**
288
+ *
289
+ * Sets a cookie.
290
+ *
291
+ * @param ctx
292
+ * @param name
293
+ * @param value
294
+ * @param options
295
+ */
296
+ function setCookie$1(ctx, name, value, options) {
297
+ if (ctx && ctx.res && ctx.res.getHeader && ctx.res.setHeader) {
298
+ var cookies = ctx.res.getHeader('Set-Cookie') || [];
299
+ if (typeof cookies === 'string')
300
+ cookies = [cookies];
301
+ if (typeof cookies === 'number')
302
+ cookies = [];
303
+ var parsedCookies = setCookie.parse(cookies);
304
+ var cookiesToSet_1 = [];
305
+ parsedCookies.forEach(function (parsedCookie) {
306
+ if (!areCookiesEqual(parsedCookie, createCookie(name, value, options))) {
307
+ cookiesToSet_1.push(cookie.serialize(parsedCookie.name, parsedCookie.value, __assign({}, parsedCookie)));
308
+ }
309
+ });
310
+ cookiesToSet_1.push(cookie.serialize(name, value, options));
311
+ if (!ctx.res.finished) {
312
+ ctx.res.setHeader('Set-Cookie', cookiesToSet_1);
313
+ }
314
+ }
315
+ if (isBrowser()) {
316
+ if (options && options.httpOnly) {
317
+ throw new Error('Can not set a httpOnly cookie in the browser.');
318
+ }
319
+ document.cookie = cookie.serialize(name, value, options);
320
+ }
321
+ return {};
322
+ }
323
+ exports.setCookie = setCookie$1;
324
+ /**
325
+ *
326
+ * Destroys a cookie with a particular name.
327
+ *
328
+ * @param ctx
329
+ * @param name
330
+ * @param options
331
+ */
332
+ function destroyCookie(ctx, name, options) {
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 {};
347
+ }
348
+ exports.destroyCookie = destroyCookie;
349
+ exports.default = {
350
+ set: setCookie$1,
351
+ get: parseCookies,
352
+ destroy: destroyCookie,
353
+ };
354
+
355
+ });
356
+
357
+ unwrapExports(dist);
358
+ var dist_1 = dist.destroyCookie;
359
+ var dist_2 = dist.setCookie;
360
+ var dist_3 = dist.parseCookies;
361
+
13
362
  var _this = undefined;
14
363
 
15
364
  var getRelatedArticle = function () {
@@ -69,13 +418,13 @@ var getRelatedArticle = function () {
69
418
  conditions = '';
70
419
 
71
420
  if (ctx && url) {
72
- cookies = parseCookies(ctx);
421
+ cookies = dist_3(ctx);
73
422
  prevSlugs = cookies['prevSlugs'];
74
423
 
75
424
  if (!!prevSlugs) {
76
- setCookie(ctx, 'prevSlugs', prevSlugs + ',"' + url + '"', {});
425
+ dist_2(ctx, 'prevSlugs', prevSlugs + ',"' + url + '"', {});
77
426
  conditions = '&& !(url.current in [' + prevSlugs + '])';
78
- } else setCookie(ctx, 'prevSlugs', '"' + url + '"', {});
427
+ } else dist_2(ctx, 'prevSlugs', '"' + url + '"', {});
79
428
  }
80
429
  relatedArticleQuery = getQuery('related', conditions, '', articleCount);
81
430
  _context.next = 12;
@@ -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-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';
@@ -33,12 +33,12 @@ import './asyncToGenerator-7c654f36.js';
33
33
  import './_set-species-cede29f8.js';
34
34
  import './beam-681a9749.js';
35
35
  import './AdSlot.js';
36
- import './BlockContent-a614acdf.js';
36
+ import './BlockContent-e9b4ddcf.js';
37
37
  import './smoothscroll-4b699764.js';
38
38
  import './GroupDeck.js';
39
39
  import 'react-bootstrap';
40
40
  import 'react-bootstrap/Button';
41
- export { g as default } from './index-5505d4f9.js';
41
+ export { g as default } from './index-85783f24.js';
42
42
  import './util-7700fc59.js';
43
43
  import './brightcove-react-player-loader.es-83f53e4e.js';
44
44
  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
  });