@mjhls/mjh-framework 1.0.642-iOS-mobile-fix → 1.0.642-multi-doc-group-v2

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 (160) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/AD.js +1 -1
  3. package/dist/cjs/AD300x250.js +5 -5
  4. package/dist/cjs/AD300x250x600.js +5 -5
  5. package/dist/cjs/AD728x90.js +6 -6
  6. package/dist/cjs/ADFloatingFooter.js +4 -4
  7. package/dist/cjs/ADGutter.js +4 -4
  8. package/dist/cjs/ADSkyscraper.js +4 -4
  9. package/dist/cjs/ADSponsoredResources.js +4 -4
  10. package/dist/cjs/ADWebcast.js +4 -4
  11. package/dist/cjs/ADWelcome.js +4 -4
  12. package/dist/cjs/AdSlot.js +4 -4
  13. package/dist/cjs/AdSlotsProvider.js +1 -1
  14. package/dist/cjs/ArticleSeriesListing.js +6 -6
  15. package/dist/cjs/Auth.js +506 -255
  16. package/dist/cjs/{BlockContent-80b15fac.js → BlockContent-88f69acd.js} +1 -1
  17. package/dist/cjs/CMEDeck.js +7 -7
  18. package/dist/cjs/Column2.js +2 -3
  19. package/dist/cjs/Column3.js +7 -8
  20. package/dist/cjs/ConferenceArticleCard.js +13 -29
  21. package/dist/cjs/DeckContent.js +9 -9
  22. package/dist/cjs/DeckQueue.js +9 -10
  23. package/dist/cjs/{Dfp-7a66946e.js → Dfp-b2bc3b97.js} +3 -3
  24. package/dist/cjs/EventsDeck.js +5 -5
  25. package/dist/cjs/ExternalResources.js +9 -9
  26. package/dist/cjs/Feature.js +3 -3
  27. package/dist/cjs/ForbesHero.js +2 -2
  28. package/dist/cjs/GridContent.js +14 -15
  29. package/dist/cjs/GridHero.js +2 -2
  30. package/dist/cjs/GroupDeck.js +1 -1
  31. package/dist/cjs/HamMagazine.js +4 -4
  32. package/dist/cjs/Hero.js +1 -1
  33. package/dist/cjs/HorizontalHero.js +2 -2
  34. package/dist/cjs/IssueContentDeck.js +2 -2
  35. package/dist/cjs/IssueDeck.js +2 -2
  36. package/dist/cjs/IssueLanding.js +10 -10
  37. package/dist/cjs/LeftNav.js +4 -4
  38. package/dist/cjs/MasterDeck.js +11 -11
  39. package/dist/cjs/NavMagazine.js +5 -5
  40. package/dist/cjs/NavNative.js +2 -2
  41. package/dist/cjs/OncliveHero.js +2 -2
  42. package/dist/cjs/OncliveLargeHero.js +2 -2
  43. package/dist/cjs/PartnerDetailListing.js +16 -1213
  44. package/dist/cjs/PublicationDeck.js +2 -2
  45. package/dist/cjs/QueueDeckExpanded.js +12 -12
  46. package/dist/cjs/RecentNews.js +2 -2
  47. package/dist/cjs/RelatedContent.js +2 -32
  48. package/dist/cjs/SideFooter.js +2 -3
  49. package/dist/cjs/{SocialSearchComponent-b52e39a7.js → SocialSearchComponent-bf750093.js} +5 -5
  50. package/dist/cjs/TaxonomyCard.js +2 -2
  51. package/dist/cjs/TemplateNormal.js +6 -7
  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 +5 -5
  57. package/dist/cjs/View.js +67 -40
  58. package/dist/cjs/YahooHero.js +2 -2
  59. package/dist/cjs/YoutubeGroup.js +1 -1
  60. package/dist/cjs/{debounce-32e57002.js → debounce-eb287781.js} +1 -2
  61. package/dist/cjs/{get-5dfcdc33.js → get-68c52cb1.js} +90 -7
  62. package/dist/cjs/getQuery.js +2 -2
  63. package/dist/cjs/getRelatedArticle.js +5 -354
  64. package/dist/cjs/getSerializers.js +8 -8
  65. package/dist/cjs/{index-40bd0e4f.js → index-04c709c4.js} +14 -14
  66. package/dist/cjs/{index-099d45ae.js → index-2d0a4911.js} +4 -6
  67. package/dist/cjs/{index-3294d3bc.js → index-5be2866f.js} +1 -1
  68. package/dist/cjs/{index-39beccb3.js → index-b5eb3ff8.js} +18 -18
  69. package/dist/cjs/{index.es-9110add6.js → index.es-ab3f2690.js} +3 -1
  70. package/dist/cjs/index.js +21 -23
  71. package/dist/cjs/{isSymbol-488934a7.js → isSymbol-04666465.js} +0 -2
  72. package/dist/cjs/{lodash-7fd85bcf.js → lodash-fc2922d0.js} +22 -71
  73. package/dist/cjs/{main-a4cb15bb.js → main-b6c96c8d.js} +67 -36
  74. package/dist/cjs/{moment-575fe24c.js → moment-66a6a284.js} +1 -1
  75. package/dist/cjs/urlFor.js +1 -1
  76. package/dist/esm/AD.js +1 -1
  77. package/dist/esm/AD300x250.js +5 -5
  78. package/dist/esm/AD300x250x600.js +5 -5
  79. package/dist/esm/AD728x90.js +6 -6
  80. package/dist/esm/ADFloatingFooter.js +4 -4
  81. package/dist/esm/ADGutter.js +4 -4
  82. package/dist/esm/ADSkyscraper.js +4 -4
  83. package/dist/esm/ADSponsoredResources.js +4 -4
  84. package/dist/esm/ADWebcast.js +4 -4
  85. package/dist/esm/ADWelcome.js +4 -4
  86. package/dist/esm/AdSlot.js +4 -4
  87. package/dist/esm/AdSlotsProvider.js +1 -1
  88. package/dist/esm/ArticleSeriesListing.js +6 -6
  89. package/dist/esm/Auth.js +501 -250
  90. package/dist/esm/{BlockContent-c409aca5.js → BlockContent-a614acdf.js} +1 -1
  91. package/dist/esm/CMEDeck.js +7 -7
  92. package/dist/esm/Column2.js +2 -3
  93. package/dist/esm/Column3.js +7 -8
  94. package/dist/esm/ConferenceArticleCard.js +13 -29
  95. package/dist/esm/DeckContent.js +9 -9
  96. package/dist/esm/DeckQueue.js +9 -10
  97. package/dist/esm/{Dfp-64ed29cf.js → Dfp-43d61e01.js} +3 -3
  98. package/dist/esm/EventsDeck.js +5 -5
  99. package/dist/esm/ExternalResources.js +9 -9
  100. package/dist/esm/Feature.js +3 -3
  101. package/dist/esm/ForbesHero.js +2 -2
  102. package/dist/esm/GridContent.js +14 -15
  103. package/dist/esm/GridHero.js +2 -2
  104. package/dist/esm/GroupDeck.js +1 -1
  105. package/dist/esm/HamMagazine.js +4 -4
  106. package/dist/esm/Hero.js +1 -1
  107. package/dist/esm/HorizontalHero.js +2 -2
  108. package/dist/esm/IssueContentDeck.js +2 -2
  109. package/dist/esm/IssueDeck.js +2 -2
  110. package/dist/esm/IssueLanding.js +10 -10
  111. package/dist/esm/LeftNav.js +4 -4
  112. package/dist/esm/MasterDeck.js +11 -11
  113. package/dist/esm/NavMagazine.js +5 -5
  114. package/dist/esm/NavNative.js +2 -2
  115. package/dist/esm/OncliveHero.js +2 -2
  116. package/dist/esm/OncliveLargeHero.js +2 -2
  117. package/dist/esm/PartnerDetailListing.js +16 -1212
  118. package/dist/esm/PublicationDeck.js +2 -2
  119. package/dist/esm/QueueDeckExpanded.js +12 -12
  120. package/dist/esm/RecentNews.js +2 -2
  121. package/dist/esm/RelatedContent.js +2 -32
  122. package/dist/esm/SideFooter.js +2 -3
  123. package/dist/esm/{SocialSearchComponent-a45b3379.js → SocialSearchComponent-6d144699.js} +5 -5
  124. package/dist/esm/TaxonomyCard.js +2 -2
  125. package/dist/esm/TemplateNormal.js +6 -7
  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 +5 -5
  131. package/dist/esm/View.js +64 -37
  132. package/dist/esm/YahooHero.js +2 -2
  133. package/dist/esm/YoutubeGroup.js +1 -1
  134. package/dist/esm/{debounce-a0d9abca.js → debounce-1a993acf.js} +2 -2
  135. package/dist/esm/{get-58d2f7cc.js → get-5ee14cda.js} +85 -2
  136. package/dist/esm/getQuery.js +2 -2
  137. package/dist/esm/getRelatedArticle.js +5 -354
  138. package/dist/esm/getSerializers.js +8 -8
  139. package/dist/esm/{index-3849e3fe.js → index-51a80699.js} +18 -18
  140. package/dist/esm/{index-3f4dd6f2.js → index-93ec3c59.js} +4 -6
  141. package/dist/esm/{index-c017d31a.js → index-c3ffdcd7.js} +14 -14
  142. package/dist/esm/{index-ef6d5dcf.js → index-d2f90501.js} +1 -1
  143. package/dist/esm/{index.es-29c1cef5.js → index.es-938a3a58.js} +3 -1
  144. package/dist/esm/index.js +19 -20
  145. package/dist/esm/{isSymbol-47f5ff3b.js → isSymbol-807e927e.js} +1 -1
  146. package/dist/esm/{lodash-ec8c6b48.js → lodash-17fdfebb.js} +22 -71
  147. package/dist/esm/{main-5d1e4bd3.js → main-0465b2a0.js} +65 -34
  148. package/dist/esm/{moment-e2f9b20c.js → moment-12415288.js} +1 -1
  149. package/dist/esm/urlFor.js +1 -1
  150. package/package.json +3 -3
  151. package/dist/cjs/ArticleQueue.js +0 -1689
  152. package/dist/cjs/_arrayMap-3b4a0f75.js +0 -91
  153. package/dist/cjs/index-bd6c9f56.js +0 -211
  154. package/dist/esm/ArticleQueue.js +0 -1684
  155. package/dist/esm/_arrayMap-818441dd.js +0 -87
  156. package/dist/esm/index-db3bb315.js +0 -207
  157. /package/dist/cjs/{ADInfeed-bdb4dc62.js → ADInfeed-eaa6c661.js} +0 -0
  158. /package/dist/cjs/{ADlgInfeed-56376f48.js → ADlgInfeed-f25eb4f7.js} +0 -0
  159. /package/dist/esm/{ADInfeed-34a87706.js → ADInfeed-3c4773f8.js} +0 -0
  160. /package/dist/esm/{ADlgInfeed-2a864f1d.js → ADlgInfeed-5a52301f.js} +0 -0
@@ -1,5 +1,31 @@
1
- import { c as isSymbol_1, a as _root, d as isObject_1, e as _Symbol } from './isSymbol-47f5ff3b.js';
2
- import { a as isArray_1, i as isFunction_1, _ as _arrayMap } from './_arrayMap-818441dd.js';
1
+ import { i as isSymbol_1, a as isObject_1, b as _baseGetTag, _ as _root, c as _Symbol } from './isSymbol-807e927e.js';
2
+
3
+ /**
4
+ * Checks if `value` is classified as an `Array` object.
5
+ *
6
+ * @static
7
+ * @memberOf _
8
+ * @since 0.1.0
9
+ * @category Lang
10
+ * @param {*} value The value to check.
11
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
12
+ * @example
13
+ *
14
+ * _.isArray([1, 2, 3]);
15
+ * // => true
16
+ *
17
+ * _.isArray(document.body.children);
18
+ * // => false
19
+ *
20
+ * _.isArray('abc');
21
+ * // => false
22
+ *
23
+ * _.isArray(_.noop);
24
+ * // => false
25
+ */
26
+ var isArray = Array.isArray;
27
+
28
+ var isArray_1 = isArray;
3
29
 
4
30
  /** Used to match property names within property paths. */
5
31
  var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
@@ -28,6 +54,41 @@ function isKey(value, object) {
28
54
 
29
55
  var _isKey = isKey;
30
56
 
57
+ /** `Object#toString` result references. */
58
+ var asyncTag = '[object AsyncFunction]',
59
+ funcTag = '[object Function]',
60
+ genTag = '[object GeneratorFunction]',
61
+ proxyTag = '[object Proxy]';
62
+
63
+ /**
64
+ * Checks if `value` is classified as a `Function` object.
65
+ *
66
+ * @static
67
+ * @memberOf _
68
+ * @since 0.1.0
69
+ * @category Lang
70
+ * @param {*} value The value to check.
71
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
72
+ * @example
73
+ *
74
+ * _.isFunction(_);
75
+ * // => true
76
+ *
77
+ * _.isFunction(/abc/);
78
+ * // => false
79
+ */
80
+ function isFunction(value) {
81
+ if (!isObject_1(value)) {
82
+ return false;
83
+ }
84
+ // The use of `Object#toString` avoids issues with the `typeof` operator
85
+ // in Safari 9 which returns 'object' for typed arrays and other constructors.
86
+ var tag = _baseGetTag(value);
87
+ return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
88
+ }
89
+
90
+ var isFunction_1 = isFunction;
91
+
31
92
  /** Used to detect overreaching core-js shims. */
32
93
  var coreJsData = _root['__core-js_shared__'];
33
94
 
@@ -753,6 +814,28 @@ var stringToPath = _memoizeCapped(function(string) {
753
814
 
754
815
  var _stringToPath = stringToPath;
755
816
 
817
+ /**
818
+ * A specialized version of `_.map` for arrays without support for iteratee
819
+ * shorthands.
820
+ *
821
+ * @private
822
+ * @param {Array} [array] The array to iterate over.
823
+ * @param {Function} iteratee The function invoked per iteration.
824
+ * @returns {Array} Returns the new mapped array.
825
+ */
826
+ function arrayMap(array, iteratee) {
827
+ var index = -1,
828
+ length = array == null ? 0 : array.length,
829
+ result = Array(length);
830
+
831
+ while (++index < length) {
832
+ result[index] = iteratee(array[index], index, array);
833
+ }
834
+ return result;
835
+ }
836
+
837
+ var _arrayMap = arrayMap;
838
+
756
839
  /** Used as references for various `Number` constants. */
757
840
  var INFINITY = 1 / 0;
758
841
 
@@ -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 && published <= 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 \'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 && published <= 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 }';
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 \'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 }\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 }';
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 { c as createCommonjsModule, u as unwrapExports, a as commonjsGlobal } from './_commonjsHelpers-0c4b6f40.js';
1
+ import './_commonjsHelpers-0c4b6f40.js';
2
2
  import './_to-object-b01e8612.js';
3
3
  import './es6.string.iterator-c199c9ba.js';
4
4
  import './_library-528f1934.js';
@@ -7,358 +7,9 @@ import './core.get-iterator-method-e41daf74.js';
7
7
  import './web.dom.iterable-03c5ba1c.js';
8
8
  import { a as _asyncToGenerator, r as regenerator } from './asyncToGenerator-271a52f3.js';
9
9
  import './_set-species-41cbf140.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
- 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({ encode: function (val) { return val; } }, 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
-
362
13
  var _this = undefined;
363
14
 
364
15
  var getRelatedArticle = function () {
@@ -411,13 +62,13 @@ var getRelatedArticle = function () {
411
62
  conditions = '';
412
63
 
413
64
  if (ctx && url) {
414
- cookies = dist_3(ctx);
65
+ cookies = parseCookies(ctx);
415
66
  prevSlugs = cookies['prevSlugs'];
416
67
 
417
68
  if (!!prevSlugs) {
418
- dist_2(ctx, 'prevSlugs', prevSlugs + ',"' + url + '"', {});
69
+ setCookie(ctx, 'prevSlugs', prevSlugs + ',"' + url + '"', {});
419
70
  conditions = '&& !(url.current in [' + prevSlugs + '])';
420
- } else dist_2(ctx, 'prevSlugs', '"' + url + '"', {});
71
+ } else setCookie(ctx, 'prevSlugs', '"' + url + '"', {});
421
72
  }
422
73
  relatedArticleQuery = getQuery('related', conditions, '', articleCount);
423
74
  _context.next = 12;
@@ -14,18 +14,18 @@ import './web.dom.iterable-03c5ba1c.js';
14
14
  import './typeof-fea75829.js';
15
15
  import './_is-array-ced12663.js';
16
16
  import 'react';
17
- import './index-3f4dd6f2.js';
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-e2f9b20c.js';
21
+ import './moment-12415288.js';
22
22
  import 'next/router';
23
- import './isSymbol-47f5ff3b.js';
24
- import './debounce-a0d9abca.js';
23
+ import './isSymbol-807e927e.js';
24
+ import './debounce-1a993acf.js';
25
25
  import 'react-dom';
26
- import './index-3849e3fe.js';
26
+ import './index-51a80699.js';
27
27
  import './index-5f9f807a.js';
28
- import './main-5d1e4bd3.js';
28
+ import './main-0465b2a0.js';
29
29
  import './entities-7cc3bf45.js';
30
30
  import './stringify-feadff37.js';
31
31
  import './slicedToArray-5fb01661.js';
@@ -33,12 +33,12 @@ import './asyncToGenerator-271a52f3.js';
33
33
  import './_set-species-41cbf140.js';
34
34
  import './beam-c4d8f8f6.js';
35
35
  import './AdSlot.js';
36
- import './BlockContent-c409aca5.js';
36
+ import './BlockContent-a614acdf.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-c017d31a.js';
41
+ export { g as default } from './index-c3ffdcd7.js';
42
42
  import './util-7700fc59.js';
43
43
  import './brightcove-react-player-loader.es-83f53e4e.js';
44
44
  import 'react-bootstrap/Pagination';