@mjhls/mjh-framework 1.0.859-segment-targeting-v3 → 1.0.860-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 (293) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/AD.js +9 -10
  3. package/dist/cjs/AD300x250.js +16 -19
  4. package/dist/cjs/AD300x250x600.js +16 -19
  5. package/dist/cjs/AD728x90.js +17 -20
  6. package/dist/cjs/ADFloatingFooter.js +18 -21
  7. package/dist/cjs/ADFooter.js +11 -14
  8. package/dist/cjs/ADGutter.js +18 -21
  9. package/dist/cjs/{ADInfeed-7cd00f5d.js → ADInfeed-7c09edba.js} +10 -12
  10. package/dist/cjs/ADSkyscraper.js +18 -21
  11. package/dist/cjs/ADSponsoredResources.js +18 -21
  12. package/dist/cjs/ADWebcast.js +18 -21
  13. package/dist/cjs/ADWelcome.js +22 -25
  14. package/dist/cjs/{ADlgInfeed-0c68c2d8.js → ADlgInfeed-2e7effc7.js} +7 -8
  15. package/dist/cjs/AccordionPanel.js +25 -29
  16. package/dist/cjs/AdSlot.js +20 -23
  17. package/dist/cjs/AdSlotsProvider.js +907 -18
  18. package/dist/cjs/AlgoliaSearch.js +849 -959
  19. package/dist/cjs/AlphabeticList.js +21 -24
  20. package/dist/cjs/ArticleCarousel.js +15 -18
  21. package/dist/cjs/ArticleProgramLandingPage.js +34 -37
  22. package/dist/cjs/ArticleSeriesLandingPage.js +30 -33
  23. package/dist/cjs/ArticleSeriesListing.js +46 -49
  24. package/dist/cjs/Auth.js +1203 -245
  25. package/dist/cjs/AuthWrapper.js +41 -124
  26. package/dist/cjs/{AuthorComponent-ac8972ce.js → AuthorComponent-02e827ae.js} +13 -14
  27. package/dist/cjs/Beam.js +5 -7
  28. package/dist/cjs/{BlockContent-8b494587.js → BlockContent-091a991f.js} +24 -25
  29. package/dist/cjs/Breadcrumbs.js +24 -28
  30. package/dist/cjs/CMEDeck.js +71 -73
  31. package/dist/cjs/Column1.js +11 -14
  32. package/dist/cjs/Column2.js +25 -30
  33. package/dist/cjs/Column3.js +41 -46
  34. package/dist/cjs/ConferenceArticleCard.js +20 -18
  35. package/dist/cjs/ConferenceBanner-4a16fddc.js +23 -0
  36. package/dist/cjs/DeckContent.js +83 -89
  37. package/dist/cjs/DeckQueue.js +77 -82
  38. package/dist/cjs/{Dfp-391fd124.js → Dfp-14d2455c.js} +25 -28
  39. package/dist/cjs/EventsDeck.js +127 -136
  40. package/dist/cjs/ExternalResources.js +58 -61
  41. package/dist/cjs/Feature.js +26 -25
  42. package/dist/cjs/ForbesHero.js +37 -40
  43. package/dist/cjs/GridContent.js +214 -221
  44. package/dist/cjs/GridHero.js +38 -41
  45. package/dist/cjs/GroupDeck.js +52 -55
  46. package/dist/cjs/HamMagazine.js +121 -128
  47. package/dist/cjs/Header.js +12 -14
  48. package/dist/cjs/Hero.js +12 -10
  49. package/dist/cjs/HighlightenVideo.js +16 -17
  50. package/dist/cjs/HorizontalArticleListing.js +48 -51
  51. package/dist/cjs/HorizontalHero.js +26 -24
  52. package/dist/cjs/IssueContentDeck.js +68 -75
  53. package/dist/cjs/IssueDeck.js +66 -73
  54. package/dist/cjs/IssueLanding.js +40 -43
  55. package/dist/cjs/LeftNav.js +27 -31
  56. package/dist/cjs/MasterDeck.js +60 -63
  57. package/dist/cjs/MediaSeriesLanding.js +792 -741
  58. package/dist/cjs/NavDvm.js +68 -75
  59. package/dist/cjs/{NavFooter-3dcd99a8.js → NavFooter-76c913e3.js} +14 -15
  60. package/dist/cjs/NavMagazine.js +121 -128
  61. package/dist/cjs/NavNative.js +113 -123
  62. package/dist/cjs/OncliveHero.js +20 -17
  63. package/dist/cjs/OncliveLargeHero.js +66 -69
  64. package/dist/cjs/PageFilter.js +11 -14
  65. package/dist/cjs/PartnerDetailListing.js +1179 -84
  66. package/dist/cjs/PdfDownload.js +8 -9
  67. package/dist/cjs/PopUpModal.js +16 -20
  68. package/dist/cjs/PubSection.js +27 -30
  69. package/dist/cjs/PubToc.js +12 -15
  70. package/dist/cjs/PublicationDeck.js +62 -64
  71. package/dist/cjs/PublicationLanding.js +118 -124
  72. package/dist/cjs/QueueDeckExpanded.js +293 -295
  73. package/dist/cjs/RecentNews.js +19 -20
  74. package/dist/cjs/RelatedContent.js +25 -23
  75. package/dist/cjs/RelatedTopicsDropdown.js +19 -22
  76. package/dist/cjs/RolesDeck.js +27 -32
  77. package/dist/cjs/Search.js +15 -21
  78. package/dist/cjs/Segment.js +25 -15
  79. package/dist/cjs/SeriesListingDeck.js +31 -33
  80. package/dist/cjs/{SeriesSlider-0d3bf265.js → SeriesSlider-94af9fcb.js} +34 -35
  81. package/dist/cjs/SideFooter.js +28 -31
  82. package/dist/cjs/SocialIcons.js +9 -10
  83. package/dist/cjs/{SocialSearchComponent-19548e2a.js → SocialSearchComponent-650f6101.js} +35 -39
  84. package/dist/cjs/SocialShare.js +29 -31
  85. package/dist/cjs/TaxonomyCard.js +58 -61
  86. package/dist/cjs/TaxonomyDescription.js +33 -36
  87. package/dist/cjs/TemplateNormal.js +43 -46
  88. package/dist/cjs/ThumbnailCard.js +20 -19
  89. package/dist/cjs/Ustream.js +26 -29
  90. package/dist/cjs/VerticalHero.js +18 -16
  91. package/dist/cjs/VideoProgramLandingPage.js +51 -57
  92. package/dist/cjs/VideoSeriesCard.js +26 -27
  93. package/dist/cjs/VideoSeriesFilter.js +14 -16
  94. package/dist/cjs/VideoSeriesLandingPage.js +35 -38
  95. package/dist/cjs/VideoSeriesListing.js +63 -66
  96. package/dist/cjs/View.js +216 -228
  97. package/dist/cjs/YahooHero.js +33 -36
  98. package/dist/cjs/YoutubeGroup.js +54 -57
  99. package/dist/cjs/{_is-array-754e012d.js → _is-array-aa52fa1e.js} +9 -9
  100. package/dist/cjs/{_iter-detect-60b2f026.js → _iter-detect-05795553.js} +6 -7
  101. package/dist/cjs/_object-sap-171b9ea5.js +16 -0
  102. package/dist/cjs/{_object-to-array-5762f850.js → _object-to-array-9bac8737.js} +4 -4
  103. package/dist/cjs/{asyncToGenerator-140e5f89.js → asyncToGenerator-df19209d.js} +65 -67
  104. package/dist/cjs/{brightcove-react-player-loader.es-5c98aec7.js → brightcove-react-player-loader.es-156bd4d6.js} +8 -10
  105. package/dist/cjs/{_to-object-329a650b.js → core.get-iterator-method-f3c44602.js} +239 -3
  106. package/dist/cjs/{define-property-f4d12f4e.js → define-property-21887c62.js} +3 -3
  107. package/dist/cjs/{defineProperty-55548b25.js → defineProperty-77a37684.js} +1 -1
  108. package/dist/cjs/{extends-0a918631.js → extends-eed4f016.js} +8 -8
  109. package/dist/cjs/faundadb.js +5 -7
  110. package/dist/cjs/getQuery.js +2 -2
  111. package/dist/cjs/getRelatedArticle.js +135 -73
  112. package/dist/cjs/getRootDocGroup.js +4 -6
  113. package/dist/cjs/getSerializers.js +23 -25
  114. package/dist/cjs/{getTargeting-a9a871f0.js → getTargeting-8874437b.js} +3 -3
  115. package/dist/cjs/getTargeting.js +5 -7
  116. package/dist/cjs/iconBase-68959171.js +3 -0
  117. package/dist/cjs/{index-6367b7bf.js → index-3294d3bc.js} +17 -16
  118. package/dist/cjs/{index-9d365128.js → index-96b3db50.js} +10 -12
  119. package/dist/cjs/{index-2cf30c83.js → index-98e01cb9.js} +8 -9
  120. package/dist/cjs/{index-b5eb3ff8.js → index-be0c82be.js} +19 -20
  121. package/dist/cjs/{index-efd6512d.js → index-cdcc0b5e.js} +963 -968
  122. package/dist/cjs/{index.es-f3e47207.js → index.es-9110add6.js} +12 -31
  123. package/dist/cjs/{index.esm-3ffa049c.js → index.esm-4d410430.js} +20 -20
  124. package/dist/cjs/{index.esm-974f47d9.js → index.esm-90433435.js} +15 -6
  125. package/dist/cjs/{index.esm-44f3e2d0.js → index.esm-e32d3e8e.js} +6 -3
  126. package/dist/cjs/{index.esm-05850a2f.js → index.esm-ff47db6f.js} +12 -5
  127. package/dist/cjs/index.js +72 -79
  128. package/dist/cjs/{inherits-0c7830c5.js → inherits-12d44cca.js} +13 -14
  129. package/dist/cjs/inherits-8d29278d.js +110 -0
  130. package/dist/cjs/{keys-a586b7a0.js → keys-d207942e.js} +4 -4
  131. package/dist/cjs/{lodash-7fd85bcf.js → lodash-fc2922d0.js} +22 -71
  132. package/dist/cjs/{main-7b5e57b0.js → main-02daeefe.js} +54 -90
  133. package/dist/cjs/{md5-e1ca5797.js → md5-5039b1a6.js} +1 -1
  134. package/dist/cjs/{moment-ca3bd9fb.js → moment-575fe24c.js} +8 -10
  135. package/dist/cjs/{react-social-icons-07939b41.js → react-social-icons-f7f48f71.js} +11 -12
  136. package/dist/cjs/{slicedToArray-8f385299.js → slicedToArray-f6d4eaa8.js} +7 -9
  137. package/dist/cjs/{stringify-7c5aff47.js → stringify-bbc68047.js} +2 -2
  138. package/dist/cjs/timeDifferenceCalc.js +1 -1
  139. package/dist/cjs/{toConsumableArray-9a3476fe.js → toConsumableArray-c9b8a0d0.js} +8 -10
  140. package/dist/cjs/{typeof-9d7f610f.js → typeof-5f52cf64.js} +73 -74
  141. package/dist/cjs/urlFor.js +21 -4
  142. package/dist/cjs/{ustream-api-d092dc31.js → ustream-api-9ebe112f.js} +4 -4
  143. package/dist/cjs/{visibility-sensor-eb2c5b69.js → visibility-sensor-ad5e3116.js} +5 -7
  144. package/dist/cjs/{web.dom.iterable-a0e279c1.js → web.dom.iterable-e34bf324.js} +8 -9
  145. package/dist/esm/AD.js +7 -7
  146. package/dist/esm/AD300x250.js +14 -16
  147. package/dist/esm/AD300x250x600.js +14 -16
  148. package/dist/esm/AD728x90.js +15 -17
  149. package/dist/esm/ADFloatingFooter.js +16 -18
  150. package/dist/esm/ADFooter.js +9 -11
  151. package/dist/esm/ADGutter.js +16 -18
  152. package/dist/esm/{ADInfeed-77da0e2a.js → ADInfeed-bfd129d9.js} +8 -8
  153. package/dist/esm/ADSkyscraper.js +16 -18
  154. package/dist/esm/ADSponsoredResources.js +16 -18
  155. package/dist/esm/ADWebcast.js +16 -18
  156. package/dist/esm/ADWelcome.js +20 -22
  157. package/dist/esm/{ADlgInfeed-d3e3000f.js → ADlgInfeed-0489335b.js} +5 -5
  158. package/dist/esm/AccordionPanel.js +20 -22
  159. package/dist/esm/AdSlot.js +12 -14
  160. package/dist/esm/AdSlotsProvider.js +906 -16
  161. package/dist/esm/AlgoliaSearch.js +245 -354
  162. package/dist/esm/AlphabeticList.js +19 -21
  163. package/dist/esm/ArticleCarousel.js +13 -15
  164. package/dist/esm/ArticleProgramLandingPage.js +32 -34
  165. package/dist/esm/ArticleSeriesLandingPage.js +28 -30
  166. package/dist/esm/ArticleSeriesListing.js +43 -45
  167. package/dist/esm/Auth.js +1187 -225
  168. package/dist/esm/AuthWrapper.js +39 -121
  169. package/dist/esm/{AuthorComponent-8ffd4679.js → AuthorComponent-e6f95c2f.js} +11 -11
  170. package/dist/esm/Beam.js +5 -7
  171. package/dist/esm/{BlockContent-d05b5b23.js → BlockContent-e9b4ddcf.js} +4 -4
  172. package/dist/esm/Breadcrumbs.js +14 -16
  173. package/dist/esm/CMEDeck.js +68 -70
  174. package/dist/esm/Column1.js +9 -9
  175. package/dist/esm/Column2.js +23 -25
  176. package/dist/esm/Column3.js +39 -41
  177. package/dist/esm/ConferenceArticleCard.js +18 -15
  178. package/dist/esm/{ConferenceBanner-9162d0ca.js → ConferenceBanner-8792ebd2.js} +4 -4
  179. package/dist/esm/DeckContent.js +79 -81
  180. package/dist/esm/DeckQueue.js +73 -74
  181. package/dist/esm/{Dfp-2f9796e1.js → Dfp-f867d061.js} +13 -15
  182. package/dist/esm/EventsDeck.js +102 -104
  183. package/dist/esm/ExternalResources.js +53 -55
  184. package/dist/esm/Feature.js +20 -17
  185. package/dist/esm/ForbesHero.js +31 -33
  186. package/dist/esm/GridContent.js +183 -185
  187. package/dist/esm/GridHero.js +32 -34
  188. package/dist/esm/GroupDeck.js +40 -42
  189. package/dist/esm/HamMagazine.js +96 -98
  190. package/dist/esm/Header.js +8 -8
  191. package/dist/esm/Hero.js +10 -7
  192. package/dist/esm/HighlightenVideo.js +14 -14
  193. package/dist/esm/HorizontalArticleListing.js +46 -48
  194. package/dist/esm/HorizontalHero.js +24 -21
  195. package/dist/esm/IssueContentDeck.js +56 -58
  196. package/dist/esm/IssueDeck.js +60 -62
  197. package/dist/esm/IssueLanding.js +38 -40
  198. package/dist/esm/LeftNav.js +23 -25
  199. package/dist/esm/MasterDeck.js +57 -59
  200. package/dist/esm/MediaSeriesLanding.js +518 -464
  201. package/dist/esm/NavDvm.js +51 -53
  202. package/dist/esm/{NavFooter-c29526b7.js → NavFooter-e27bd93b.js} +12 -12
  203. package/dist/esm/NavMagazine.js +98 -100
  204. package/dist/esm/NavNative.js +88 -90
  205. package/dist/esm/OncliveHero.js +18 -14
  206. package/dist/esm/OncliveLargeHero.js +55 -57
  207. package/dist/esm/PageFilter.js +9 -11
  208. package/dist/esm/PartnerDetailListing.js +1178 -83
  209. package/dist/esm/PdfDownload.js +6 -6
  210. package/dist/esm/PopUpModal.js +11 -13
  211. package/dist/esm/PubSection.js +25 -27
  212. package/dist/esm/PubToc.js +10 -12
  213. package/dist/esm/PublicationDeck.js +54 -51
  214. package/dist/esm/PublicationLanding.js +77 -79
  215. package/dist/esm/QueueDeckExpanded.js +259 -261
  216. package/dist/esm/RecentNews.js +17 -17
  217. package/dist/esm/RelatedContent.js +20 -17
  218. package/dist/esm/RelatedTopicsDropdown.js +11 -11
  219. package/dist/esm/RolesDeck.js +25 -25
  220. package/dist/esm/Search.js +10 -12
  221. package/dist/esm/Segment.js +25 -15
  222. package/dist/esm/SeriesListingDeck.js +26 -28
  223. package/dist/esm/{SeriesSlider-7d89f4d9.js → SeriesSlider-0371fc11.js} +25 -25
  224. package/dist/esm/SideFooter.js +25 -27
  225. package/dist/esm/SocialIcons.js +7 -7
  226. package/dist/esm/{SocialSearchComponent-47815365.js → SocialSearchComponent-d7dec0c2.js} +29 -29
  227. package/dist/esm/SocialShare.js +25 -25
  228. package/dist/esm/TaxonomyCard.js +54 -52
  229. package/dist/esm/TaxonomyDescription.js +28 -30
  230. package/dist/esm/TemplateNormal.js +40 -42
  231. package/dist/esm/ThumbnailCard.js +13 -10
  232. package/dist/esm/Ustream.js +24 -26
  233. package/dist/esm/VerticalHero.js +16 -13
  234. package/dist/esm/VideoProgramLandingPage.js +44 -46
  235. package/dist/esm/VideoSeriesCard.js +21 -21
  236. package/dist/esm/VideoSeriesFilter.js +11 -13
  237. package/dist/esm/VideoSeriesLandingPage.js +28 -30
  238. package/dist/esm/VideoSeriesListing.js +60 -62
  239. package/dist/esm/View.js +199 -207
  240. package/dist/esm/YahooHero.js +28 -30
  241. package/dist/esm/YoutubeGroup.js +39 -41
  242. package/dist/esm/{_is-array-58e95429.js → _is-array-4df618a6.js} +1 -1
  243. package/dist/esm/{_iter-detect-5d49a330.js → _iter-detect-130ee549.js} +1 -2
  244. package/dist/esm/{_object-sap-964b6feb.js → _object-sap-8b8ea5a9.js} +1 -1
  245. package/dist/esm/{_object-to-array-7e804fce.js → _object-to-array-c54dd835.js} +1 -1
  246. package/dist/esm/{asyncToGenerator-fc1c2e29.js → asyncToGenerator-7bf8bc4d.js} +3 -5
  247. package/dist/esm/{brightcove-react-player-loader.es-4abff0b1.js → brightcove-react-player-loader.es-83f53e4e.js} +6 -7
  248. package/dist/esm/{_to-object-a4107da3.js → core.get-iterator-method-86d4db69.js} +230 -1
  249. package/dist/esm/{define-property-8af5f002.js → define-property-6d26cb48.js} +1 -1
  250. package/dist/esm/{defineProperty-94fd8bfc.js → defineProperty-d7d9b577.js} +1 -1
  251. package/dist/esm/{extends-6f2fcc99.js → extends-5b1796d4.js} +1 -1
  252. package/dist/esm/faundadb.js +5 -7
  253. package/dist/esm/getQuery.js +2 -2
  254. package/dist/esm/getRelatedArticle.js +130 -68
  255. package/dist/esm/getRootDocGroup.js +4 -6
  256. package/dist/esm/getSerializers.js +23 -25
  257. package/dist/esm/{getTargeting-bd800589.js → getTargeting-277c801e.js} +2 -2
  258. package/dist/esm/getTargeting.js +5 -7
  259. package/dist/esm/{index-f7fb1e25.js → index-41a678ea.js} +3 -3
  260. package/dist/esm/{index-6c12bdd5.js → index-5f7e79e7.js} +4 -4
  261. package/dist/esm/{index-51a80699.js → index-73819142.js} +19 -20
  262. package/dist/esm/{index-c00b0bbb.js → index-ef6d5dcf.js} +17 -16
  263. package/dist/esm/{index-23415831.js → index-fe008ffe.js} +914 -909
  264. package/dist/esm/{index.es-c6222053.js → index.es-29c1cef5.js} +10 -28
  265. package/dist/esm/{index.esm-3fdda599.js → index.esm-29e48d38.js} +15 -6
  266. package/dist/esm/{index.esm-a8ff922c.js → index.esm-cf08bf18.js} +12 -5
  267. package/dist/esm/{index.esm-c6715e80.js → index.esm-f8aaeeeb.js} +6 -3
  268. package/dist/esm/{index.esm-8ee5ff72.js → index.esm-fd746768.js} +18 -17
  269. package/dist/esm/index.js +64 -68
  270. package/dist/esm/{inherits-75d45541.js → inherits-2409637d.js} +4 -5
  271. package/dist/esm/inherits-77d5e4fc.js +101 -0
  272. package/dist/esm/{keys-8eda7a5c.js → keys-69989821.js} +2 -2
  273. package/dist/esm/{lodash-ec8c6b48.js → lodash-17fdfebb.js} +22 -71
  274. package/dist/esm/{main-747e7d25.js → main-e4a934b2.js} +52 -87
  275. package/dist/esm/{md5-4e42248e.js → md5-9be0e905.js} +1 -1
  276. package/dist/esm/{moment-b6f49411.js → moment-e2f9b20c.js} +8 -10
  277. package/dist/esm/{react-social-icons-3822f1ce.js → react-social-icons-a7d5c5c7.js} +5 -5
  278. package/dist/esm/{slicedToArray-641f241f.js → slicedToArray-67a08c9c.js} +2 -4
  279. package/dist/esm/{stringify-4330ccdc.js → stringify-70b72959.js} +1 -1
  280. package/dist/esm/timeDifferenceCalc.js +1 -1
  281. package/dist/esm/{toConsumableArray-43aa614d.js → toConsumableArray-32282905.js} +2 -4
  282. package/dist/esm/{typeof-af9c50d8.js → typeof-c05a82ba.js} +4 -5
  283. package/dist/esm/urlFor.js +19 -2
  284. package/dist/esm/{ustream-api-9a50644d.js → ustream-api-4c4fe0ba.js} +4 -4
  285. package/dist/esm/{visibility-sensor-f40c2564.js → visibility-sensor-72fd8f8b.js} +2 -2
  286. package/dist/esm/{web.dom.iterable-4439f05a.js → web.dom.iterable-f8f967cd.js} +1 -2
  287. package/package.json +1 -1
  288. package/dist/cjs/ConferenceBanner-6c9e718a.js +0 -24
  289. package/dist/cjs/_object-sap-5e74ba08.js +0 -16
  290. package/dist/cjs/core.get-iterator-method-f62321d4.js +0 -39
  291. package/dist/cjs/es6.string.iterator-cc0bbaa4.js +0 -210
  292. package/dist/esm/core.get-iterator-method-e1de7503.js +0 -36
  293. package/dist/esm/es6.string.iterator-c990c18c.js +0 -201
@@ -13,6 +13,22 @@ var _defined = function (it) {
13
13
  return it;
14
14
  };
15
15
 
16
+ // true -> String#at
17
+ // false -> String#codePointAt
18
+ var _stringAt = function (TO_STRING) {
19
+ return function (that, pos) {
20
+ var s = String(_defined(that));
21
+ var i = _toInteger(pos);
22
+ var l = s.length;
23
+ var a, b;
24
+ if (i < 0 || i >= l) return TO_STRING ? '' : undefined;
25
+ a = s.charCodeAt(i);
26
+ return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
27
+ ? TO_STRING ? s.charAt(i) : a
28
+ : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
29
+ };
30
+ };
31
+
16
32
  var _global = createCommonjsModule(function (module) {
17
33
  // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
18
34
  var global = module.exports = typeof window != 'undefined' && window.Math == Math
@@ -197,6 +213,10 @@ $export.U = 64; // safe
197
213
  $export.R = 128; // real proto method for `library`
198
214
  var _export = $export;
199
215
 
216
+ var _redefine = _hide;
217
+
218
+ var _iterators = {};
219
+
200
220
  var toString = {}.toString;
201
221
 
202
222
  var _cof = function (it) {
@@ -309,10 +329,219 @@ var _objectKeys = Object.keys || function keys(O) {
309
329
  return _objectKeysInternal(O, _enumBugKeys);
310
330
  };
311
331
 
332
+ var _objectDps = _descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
333
+ _anObject(O);
334
+ var keys = _objectKeys(Properties);
335
+ var length = keys.length;
336
+ var i = 0;
337
+ var P;
338
+ while (length > i) _objectDp.f(O, P = keys[i++], Properties[P]);
339
+ return O;
340
+ };
341
+
342
+ var document$1 = _global.document;
343
+ var _html = document$1 && document$1.documentElement;
344
+
345
+ // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
346
+
347
+
348
+
349
+ var IE_PROTO$1 = _sharedKey('IE_PROTO');
350
+ var Empty = function () { /* empty */ };
351
+ var PROTOTYPE$1 = 'prototype';
352
+
353
+ // Create object with fake `null` prototype: use iframe Object with cleared prototype
354
+ var createDict = function () {
355
+ // Thrash, waste and sodomy: IE GC bug
356
+ var iframe = _domCreate('iframe');
357
+ var i = _enumBugKeys.length;
358
+ var lt = '<';
359
+ var gt = '>';
360
+ var iframeDocument;
361
+ iframe.style.display = 'none';
362
+ _html.appendChild(iframe);
363
+ iframe.src = 'javascript:'; // eslint-disable-line no-script-url
364
+ // createDict = iframe.contentWindow.Object;
365
+ // html.removeChild(iframe);
366
+ iframeDocument = iframe.contentWindow.document;
367
+ iframeDocument.open();
368
+ iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
369
+ iframeDocument.close();
370
+ createDict = iframeDocument.F;
371
+ while (i--) delete createDict[PROTOTYPE$1][_enumBugKeys[i]];
372
+ return createDict();
373
+ };
374
+
375
+ var _objectCreate = Object.create || function create(O, Properties) {
376
+ var result;
377
+ if (O !== null) {
378
+ Empty[PROTOTYPE$1] = _anObject(O);
379
+ result = new Empty();
380
+ Empty[PROTOTYPE$1] = null;
381
+ // add "__proto__" for Object.getPrototypeOf polyfill
382
+ result[IE_PROTO$1] = O;
383
+ } else result = createDict();
384
+ return Properties === undefined ? result : _objectDps(result, Properties);
385
+ };
386
+
387
+ var _wks = createCommonjsModule(function (module) {
388
+ var store = _shared('wks');
389
+
390
+ var Symbol = _global.Symbol;
391
+ var USE_SYMBOL = typeof Symbol == 'function';
392
+
393
+ var $exports = module.exports = function (name) {
394
+ return store[name] || (store[name] =
395
+ USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : _uid)('Symbol.' + name));
396
+ };
397
+
398
+ $exports.store = store;
399
+ });
400
+
401
+ var def = _objectDp.f;
402
+
403
+ var TAG = _wks('toStringTag');
404
+
405
+ var _setToStringTag = function (it, tag, stat) {
406
+ if (it && !_has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
407
+ };
408
+
409
+ var IteratorPrototype = {};
410
+
411
+ // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
412
+ _hide(IteratorPrototype, _wks('iterator'), function () { return this; });
413
+
414
+ var _iterCreate = function (Constructor, NAME, next) {
415
+ Constructor.prototype = _objectCreate(IteratorPrototype, { next: _propertyDesc(1, next) });
416
+ _setToStringTag(Constructor, NAME + ' Iterator');
417
+ };
418
+
312
419
  // 7.1.13 ToObject(argument)
313
420
 
314
421
  var _toObject = function (it) {
315
422
  return Object(_defined(it));
316
423
  };
317
424
 
318
- export { _toInteger as A, _sharedKey as B, _export as _, _core as a, _isObject as b, _ctx as c, _descriptors as d, _objectDp as e, _toObject as f, _iobject as g, _toLength as h, _global as i, _fails as j, _hide as k, _aFunction as l, _anObject as m, _objectKeys as n, _propertyDesc as o, _objectKeysInternal as p, _enumBugKeys as q, _toIobject as r, _toPrimitive as s, _ie8DomDefine as t, _has as u, _shared as v, _uid as w, _cof as x, _domCreate as y, _defined as z };
425
+ // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
426
+
427
+
428
+ var IE_PROTO$2 = _sharedKey('IE_PROTO');
429
+ var ObjectProto = Object.prototype;
430
+
431
+ var _objectGpo = Object.getPrototypeOf || function (O) {
432
+ O = _toObject(O);
433
+ if (_has(O, IE_PROTO$2)) return O[IE_PROTO$2];
434
+ if (typeof O.constructor == 'function' && O instanceof O.constructor) {
435
+ return O.constructor.prototype;
436
+ } return O instanceof Object ? ObjectProto : null;
437
+ };
438
+
439
+ var ITERATOR = _wks('iterator');
440
+ var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`
441
+ var FF_ITERATOR = '@@iterator';
442
+ var KEYS = 'keys';
443
+ var VALUES = 'values';
444
+
445
+ var returnThis = function () { return this; };
446
+
447
+ var _iterDefine = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
448
+ _iterCreate(Constructor, NAME, next);
449
+ var getMethod = function (kind) {
450
+ if (!BUGGY && kind in proto) return proto[kind];
451
+ switch (kind) {
452
+ case KEYS: return function keys() { return new Constructor(this, kind); };
453
+ case VALUES: return function values() { return new Constructor(this, kind); };
454
+ } return function entries() { return new Constructor(this, kind); };
455
+ };
456
+ var TAG = NAME + ' Iterator';
457
+ var DEF_VALUES = DEFAULT == VALUES;
458
+ var VALUES_BUG = false;
459
+ var proto = Base.prototype;
460
+ var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
461
+ var $default = $native || getMethod(DEFAULT);
462
+ var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
463
+ var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
464
+ var methods, key, IteratorPrototype;
465
+ // Fix native
466
+ if ($anyNative) {
467
+ IteratorPrototype = _objectGpo($anyNative.call(new Base()));
468
+ if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
469
+ // Set @@toStringTag to native iterators
470
+ _setToStringTag(IteratorPrototype, TAG, true);
471
+ }
472
+ }
473
+ // fix Array#{values, @@iterator}.name in V8 / FF
474
+ if (DEF_VALUES && $native && $native.name !== VALUES) {
475
+ VALUES_BUG = true;
476
+ $default = function values() { return $native.call(this); };
477
+ }
478
+ // Define iterator
479
+ if (( FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
480
+ _hide(proto, ITERATOR, $default);
481
+ }
482
+ // Plug for library
483
+ _iterators[NAME] = $default;
484
+ _iterators[TAG] = returnThis;
485
+ if (DEFAULT) {
486
+ methods = {
487
+ values: DEF_VALUES ? $default : getMethod(VALUES),
488
+ keys: IS_SET ? $default : getMethod(KEYS),
489
+ entries: $entries
490
+ };
491
+ if (FORCED) for (key in methods) {
492
+ if (!(key in proto)) _redefine(proto, key, methods[key]);
493
+ } else _export(_export.P + _export.F * (BUGGY || VALUES_BUG), NAME, methods);
494
+ }
495
+ return methods;
496
+ };
497
+
498
+ var $at = _stringAt(true);
499
+
500
+ // 21.1.3.27 String.prototype[@@iterator]()
501
+ _iterDefine(String, 'String', function (iterated) {
502
+ this._t = String(iterated); // target
503
+ this._i = 0; // next index
504
+ // 21.1.5.2.1 %StringIteratorPrototype%.next()
505
+ }, function () {
506
+ var O = this._t;
507
+ var index = this._i;
508
+ var point;
509
+ if (index >= O.length) return { value: undefined, done: true };
510
+ point = $at(O, index);
511
+ this._i += point.length;
512
+ return { value: point, done: false };
513
+ });
514
+
515
+ // getting tag from 19.1.3.6 Object.prototype.toString()
516
+
517
+ var TAG$1 = _wks('toStringTag');
518
+ // ES3 wrong here
519
+ var ARG = _cof(function () { return arguments; }()) == 'Arguments';
520
+
521
+ // fallback for IE11 Script Access Denied error
522
+ var tryGet = function (it, key) {
523
+ try {
524
+ return it[key];
525
+ } catch (e) { /* empty */ }
526
+ };
527
+
528
+ var _classof = function (it) {
529
+ var O, T, B;
530
+ return it === undefined ? 'Undefined' : it === null ? 'Null'
531
+ // @@toStringTag case
532
+ : typeof (T = tryGet(O = Object(it), TAG$1)) == 'string' ? T
533
+ // builtinTag case
534
+ : ARG ? _cof(O)
535
+ // ES3 arguments fallback
536
+ : (B = _cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
537
+ };
538
+
539
+ var ITERATOR$1 = _wks('iterator');
540
+
541
+ var core_getIteratorMethod = _core.getIteratorMethod = function (it) {
542
+ if (it != undefined) return it[ITERATOR$1]
543
+ || it['@@iterator']
544
+ || _iterators[_classof(it)];
545
+ };
546
+
547
+ export { _toPrimitive as A, _ie8DomDefine as B, _has as C, _shared as D, _uid as E, _redefine as F, _cof as G, _domCreate as H, _html as I, _export as _, _core as a, _isObject as b, _objectCreate as c, _ctx as d, _descriptors as e, _iterDefine as f, _objectDp as g, _wks as h, _toObject as i, _iobject as j, _toLength as k, _global as l, _fails as m, _hide as n, _setToStringTag as o, _classof as p, _aFunction as q, _objectGpo as r, _anObject as s, _objectKeys as t, _propertyDesc as u, core_getIteratorMethod as v, _iterators as w, _objectKeysInternal as x, _enumBugKeys as y, _toIobject as z };
@@ -1,5 +1,5 @@
1
1
  import { c as createCommonjsModule, u as unwrapExports } from './_commonjsHelpers-0c4b6f40.js';
2
- import { _ as _export, e as _objectDp, d as _descriptors, a as _core } from './_to-object-a4107da3.js';
2
+ import { _ as _export, g as _objectDp, e as _descriptors, a as _core } from './core.get-iterator-method-86d4db69.js';
3
3
 
4
4
  // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
5
5
  _export(_export.S + _export.F * !_descriptors, 'Object', { defineProperty: _objectDp.f });
@@ -1,5 +1,5 @@
1
1
  import { c as createCommonjsModule, u as unwrapExports } from './_commonjsHelpers-0c4b6f40.js';
2
- import { d as defineProperty$1 } from './define-property-8af5f002.js';
2
+ import { d as defineProperty$1 } from './define-property-6d26cb48.js';
3
3
 
4
4
  var defineProperty = createCommonjsModule(function (module, exports) {
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { c as createCommonjsModule, u as unwrapExports } from './_commonjsHelpers-0c4b6f40.js';
2
- import { j as _fails, f as _toObject, g as _iobject, n as _objectKeys, d as _descriptors, _ as _export, a as _core } from './_to-object-a4107da3.js';
2
+ import { m as _fails, i as _toObject, j as _iobject, t as _objectKeys, e as _descriptors, _ as _export, a as _core } from './core.get-iterator-method-86d4db69.js';
3
3
  import { _ as _objectGops, a as _objectPie } from './_object-pie-33c40e79.js';
4
4
 
5
5
  // 19.1.2.1 Object.assign(target, source, ...)
@@ -1,12 +1,10 @@
1
1
  import './_commonjsHelpers-0c4b6f40.js';
2
- import './_to-object-a4107da3.js';
3
- import './es6.string.iterator-c990c18c.js';
2
+ import './core.get-iterator-method-86d4db69.js';
4
3
  import './_library-528f1934.js';
5
- import './_iter-detect-5d49a330.js';
6
- import './core.get-iterator-method-e1de7503.js';
7
- import './web.dom.iterable-4439f05a.js';
8
- import { a as _asyncToGenerator, r as regenerator } from './asyncToGenerator-fc1c2e29.js';
9
- import { m as md5 } from './md5-4e42248e.js';
4
+ import './_iter-detect-130ee549.js';
5
+ import './web.dom.iterable-f8f967cd.js';
6
+ import { a as _asyncToGenerator, r as regenerator } from './asyncToGenerator-7bf8bc4d.js';
7
+ import { m as md5 } from './md5-9be0e905.js';
10
8
 
11
9
  var encrypt = function () {
12
10
  var _ref = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(password) {
@@ -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, showSocialShare },\n body[] {\n ...,\n slides[]{\n ...,\n slideshowImage{\n ...,\n "width": asset->.metadata.dimensions.width,\n "height": asset->.metadata.dimensions.height,\n }\n },\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n }\n },\n \'category\':contentCategory->{\n name,\n disableAds\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 showSocialShare\n },\n documentGroup-> {\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n \'path\': identifier.current,\n adTargetingURL\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n \'path\': identifier.current,\n adTargetingURL\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, showSocialShare },\n body[] {\n ...,\n slides[]{\n ...,\n slideshowImage{\n ...,\n "width": asset->.metadata.dimensions.width,\n "height": asset->.metadata.dimensions.height,\n }\n },\n upload_doc {\n _type,\n asset->\n },\n poster {\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 showSocialShare\n },\n documentGroup-> {\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n \'path\': identifier.current,\n adTargetingURL\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n \'path\': identifier.current,\n adTargetingURL\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 && is_visible != false\n && url.current == $url\n ' + conditions + '\n ][0]{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n ...,\n passwordLock,\n password,\n issueGroup-> { _id, name, identifier, parent-> },\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography, showSocialShare },\n body[] {\n ...,\n slides[]{\n ...,\n slideshowImage{\n ...,\n "width": asset->.metadata.dimensions.width,\n "height": asset->.metadata.dimensions.height,\n }\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, showSocialShare },\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 showSocialShare\n },\n documentGroup-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n isSeries,\n showSocialShare,\n \'path\': identifier.current,\n adTargetingURL\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\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 && is_visible != false\n && url.current == $url\n ' + conditions + '\n ][0]{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n ...,\n passwordLock,\n password,\n issueGroup-> { _id, name, identifier, parent-> },\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography, showSocialShare },\n body[] {\n ...,\n slides[]{\n ...,\n slideshowImage{\n ...,\n "width": asset->.metadata.dimensions.width,\n "height": asset->.metadata.dimensions.height,\n }\n },\n upload_doc {\n _type,\n asset->\n },\n poster {\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, showSocialShare },\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 showSocialShare\n },\n documentGroup-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n isSeries,\n showSocialShare,\n \'path\': identifier.current,\n adTargetingURL\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\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 taxonomyMapping[]->,\n pdf{asset->},\n } | order(year desc, month desc)\n }';
16
16
  case 'issue':
@@ -1,11 +1,9 @@
1
1
  import { c as createCommonjsModule, u as unwrapExports, a as commonjsGlobal } from './_commonjsHelpers-0c4b6f40.js';
2
- import './_to-object-a4107da3.js';
3
- import './es6.string.iterator-c990c18c.js';
2
+ import './core.get-iterator-method-86d4db69.js';
4
3
  import './_library-528f1934.js';
5
- import './_iter-detect-5d49a330.js';
6
- import './core.get-iterator-method-e1de7503.js';
7
- import './web.dom.iterable-4439f05a.js';
8
- import { a as _asyncToGenerator, r as regenerator } from './asyncToGenerator-fc1c2e29.js';
4
+ import './_iter-detect-130ee549.js';
5
+ import './web.dom.iterable-f8f967cd.js';
6
+ import { a as _asyncToGenerator, r as regenerator } from './asyncToGenerator-7bf8bc4d.js';
9
7
  import { c as cookie } from './index-db3bb315.js';
10
8
  import getQuery from './getQuery.js';
11
9
 
@@ -29,9 +27,20 @@ function parseString(setCookieValue, options) {
29
27
  ? Object.assign({}, defaultParseOptions, options)
30
28
  : defaultParseOptions;
31
29
 
30
+ try {
31
+ value = options.decodeValues ? decodeURIComponent(value) : value; // decode cookie value
32
+ } catch (e) {
33
+ console.error(
34
+ "set-cookie-parser encountered an error while decoding a cookie with value '" +
35
+ value +
36
+ "'. Set options.decodeValues to false to disable this feature.",
37
+ e
38
+ );
39
+ }
40
+
32
41
  var cookie = {
33
42
  name: name, // grab everything before the first =
34
- value: options.decodeValues ? decodeURIComponent(value) : value, // decode cookie value
43
+ value: value,
35
44
  };
36
45
 
37
46
  parts.forEach(function (part) {
@@ -202,7 +211,7 @@ setCookie.parse = parse_1;
202
211
  setCookie.parseString = parseString_1;
203
212
  setCookie.splitCookiesString = splitCookiesString_1;
204
213
 
205
- var dist = createCommonjsModule(function (module, exports) {
214
+ var utils = createCommonjsModule(function (module, exports) {
206
215
  var __assign = (commonjsGlobal && commonjsGlobal.__assign) || function () {
207
216
  __assign = Object.assign || function(t) {
208
217
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -215,10 +224,33 @@ var __assign = (commonjsGlobal && commonjsGlobal.__assign) || function () {
215
224
  return __assign.apply(this, arguments);
216
225
  };
217
226
  Object.defineProperty(exports, "__esModule", { value: true });
218
- exports.destroyCookie = exports.setCookie = exports.parseCookies = void 0;
219
-
220
-
221
- var isBrowser = function () { return typeof window !== 'undefined'; };
227
+ exports.areCookiesEqual = exports.hasSameProperties = exports.createCookie = exports.isBrowser = void 0;
228
+ /**
229
+ * Tells whether we are in a browser or server.
230
+ */
231
+ function isBrowser() {
232
+ return typeof window !== 'undefined';
233
+ }
234
+ exports.isBrowser = isBrowser;
235
+ /**
236
+ * Create an instance of the Cookie interface
237
+ */
238
+ function createCookie(name, value, options) {
239
+ var sameSite = options.sameSite;
240
+ if (sameSite === true) {
241
+ sameSite = 'strict';
242
+ }
243
+ if (sameSite === undefined || sameSite === false) {
244
+ sameSite = 'lax';
245
+ }
246
+ var cookieToSet = __assign(__assign({}, options), { sameSite: sameSite });
247
+ delete cookieToSet.encode;
248
+ return __assign({ name: name, value: value }, cookieToSet);
249
+ }
250
+ exports.createCookie = createCookie;
251
+ /**
252
+ * Tells whether given objects have the same properties.
253
+ */
222
254
  function hasSameProperties(a, b) {
223
255
  var aProps = Object.getOwnPropertyNames(a);
224
256
  var bProps = Object.getOwnPropertyNames(b);
@@ -233,8 +265,9 @@ function hasSameProperties(a, b) {
233
265
  }
234
266
  return true;
235
267
  }
268
+ exports.hasSameProperties = hasSameProperties;
236
269
  /**
237
- * Compare the cookie and return true if the cookies has equivalent
270
+ * Compare the cookie and return true if the cookies have equivalent
238
271
  * options and the cookies would be overwritten in the browser storage.
239
272
  *
240
273
  * @param a first Cookie for comparison
@@ -247,71 +280,109 @@ function areCookiesEqual(a, b) {
247
280
  }
248
281
  return (hasSameProperties(__assign(__assign({}, a), { sameSite: undefined }), __assign(__assign({}, b), { sameSite: undefined })) && sameSiteSame);
249
282
  }
283
+ exports.areCookiesEqual = areCookiesEqual;
284
+ /* Functions */
285
+
286
+ });
287
+
288
+ unwrapExports(utils);
289
+ var utils_1 = utils.areCookiesEqual;
290
+ var utils_2 = utils.hasSameProperties;
291
+ var utils_3 = utils.createCookie;
292
+ var utils_4 = utils.isBrowser;
293
+
294
+ var dist = createCommonjsModule(function (module, exports) {
295
+ var __assign = (commonjsGlobal && commonjsGlobal.__assign) || function () {
296
+ __assign = Object.assign || function(t) {
297
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
298
+ s = arguments[i];
299
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
300
+ t[p] = s[p];
301
+ }
302
+ return t;
303
+ };
304
+ return __assign.apply(this, arguments);
305
+ };
306
+ Object.defineProperty(exports, "__esModule", { value: true });
307
+ exports.destroyCookie = exports.setCookie = exports.parseCookies = void 0;
308
+
309
+
310
+
250
311
  /**
251
- * Create an instance of the Cookie interface
252
- *
253
- * @param name name of the Cookie
254
- * @param value value of the Cookie
255
- * @param options Cookie options
256
- */
257
- function createCookie(name, value, options) {
258
- var sameSite = options.sameSite;
259
- if (sameSite === true) {
260
- sameSite = 'strict';
261
- }
262
- if (sameSite === undefined || sameSite === false) {
263
- sameSite = 'lax';
264
- }
265
- var cookieToSet = __assign(__assign({}, options), { sameSite: sameSite });
266
- delete cookieToSet.encode;
267
- return __assign({ name: name, value: value }, cookieToSet);
268
- }
269
- /**
270
- *
271
312
  * Parses cookies.
272
313
  *
273
- * @param ctx
274
- * @param options
314
+ * @param ctx NextJS page or API context, express context, null or undefined.
315
+ * @param options Options that we pass down to `cookie` library.
275
316
  */
276
317
  function parseCookies(ctx, options) {
277
- if (ctx && ctx.req && ctx.req.headers && ctx.req.headers.cookie) {
318
+ var _a, _b;
319
+ if ((_b = (_a = ctx === null || ctx === void 0 ? void 0 : ctx.req) === null || _a === void 0 ? void 0 : _a.headers) === null || _b === void 0 ? void 0 : _b.cookie) {
278
320
  return cookie.parse(ctx.req.headers.cookie, options);
279
321
  }
280
- if (isBrowser()) {
322
+ if (utils.isBrowser()) {
281
323
  return cookie.parse(document.cookie, options);
282
324
  }
283
325
  return {};
284
326
  }
285
327
  exports.parseCookies = parseCookies;
286
328
  /**
287
- *
288
329
  * Sets a cookie.
289
330
  *
290
- * @param ctx
291
- * @param name
292
- * @param value
293
- * @param options
331
+ * @param ctx NextJS page or API context, express context, null or undefined.
332
+ * @param name The name of your cookie.
333
+ * @param value The value of your cookie.
334
+ * @param options Options that we pass down to `cookie` library.
294
335
  */
295
336
  function setCookie$1(ctx, name, value, options) {
296
- if (ctx && ctx.res && ctx.res.getHeader && ctx.res.setHeader) {
337
+ var _a, _b;
338
+ if (options === void 0) { options = {}; }
339
+ // SSR
340
+ if (((_a = ctx === null || ctx === void 0 ? void 0 : ctx.res) === null || _a === void 0 ? void 0 : _a.getHeader) && ctx.res.setHeader) {
341
+ // Check if response has finished and warn about it.
342
+ if ((_b = ctx === null || ctx === void 0 ? void 0 : ctx.res) === null || _b === void 0 ? void 0 : _b.finished) {
343
+ console.warn("Not setting \"" + name + "\" cookie. Response has finished.");
344
+ console.warn("You should set cookie before res.send()");
345
+ return {};
346
+ }
347
+ /**
348
+ * Load existing cookies from the header and parse them.
349
+ */
297
350
  var cookies = ctx.res.getHeader('Set-Cookie') || [];
298
351
  if (typeof cookies === 'string')
299
352
  cookies = [cookies];
300
353
  if (typeof cookies === 'number')
301
354
  cookies = [];
302
- var parsedCookies = setCookie.parse(cookies);
355
+ /**
356
+ * Parse cookies but ignore values - we've already encoded
357
+ * them in the previous call.
358
+ */
359
+ var parsedCookies = setCookie.parse(cookies, {
360
+ decodeValues: false,
361
+ });
362
+ /**
363
+ * We create the new cookie and make sure that none of
364
+ * the existing cookies match it.
365
+ */
366
+ var newCookie_1 = utils.createCookie(name, value, options);
303
367
  var cookiesToSet_1 = [];
304
368
  parsedCookies.forEach(function (parsedCookie) {
305
- if (!areCookiesEqual(parsedCookie, createCookie(name, value, options))) {
306
- cookiesToSet_1.push(cookie.serialize(parsedCookie.name, parsedCookie.value, __assign({ encode: function (val) { return val; } }, parsedCookie)));
369
+ if (!utils.areCookiesEqual(parsedCookie, newCookie_1)) {
370
+ /**
371
+ * We serialize the cookie back to the original format
372
+ * if it isn't the same as the new one.
373
+ */
374
+ var serializedCookie = cookie.serialize(parsedCookie.name, parsedCookie.value, __assign({
375
+ // we prevent reencoding by default, but you might override it
376
+ encode: function (val) { return val; } }, parsedCookie));
377
+ cookiesToSet_1.push(serializedCookie);
307
378
  }
308
379
  });
309
380
  cookiesToSet_1.push(cookie.serialize(name, value, options));
310
- if (!ctx.res.finished) {
311
- ctx.res.setHeader('Set-Cookie', cookiesToSet_1);
312
- }
381
+ // Update the header.
382
+ ctx.res.setHeader('Set-Cookie', cookiesToSet_1);
313
383
  }
314
- if (isBrowser()) {
384
+ // Browser
385
+ if (utils.isBrowser()) {
315
386
  if (options && options.httpOnly) {
316
387
  throw new Error('Can not set a httpOnly cookie in the browser.');
317
388
  }
@@ -321,30 +392,21 @@ function setCookie$1(ctx, name, value, options) {
321
392
  }
322
393
  exports.setCookie = setCookie$1;
323
394
  /**
324
- *
325
395
  * Destroys a cookie with a particular name.
326
396
  *
327
- * @param ctx
328
- * @param name
329
- * @param options
397
+ * @param ctx NextJS page or API context, express context, null or undefined.
398
+ * @param name Cookie name.
399
+ * @param options Options that we pass down to `cookie` library.
330
400
  */
331
401
  function destroyCookie(ctx, name, options) {
332
- var opts = __assign(__assign({}, (options || {})), { maxAge: -1 });
333
- if (ctx && ctx.res && ctx.res.setHeader && ctx.res.getHeader) {
334
- var cookies = ctx.res.getHeader('Set-Cookie') || [];
335
- if (typeof cookies === 'string')
336
- cookies = [cookies];
337
- if (typeof cookies === 'number')
338
- cookies = [];
339
- cookies.push(cookie.serialize(name, '', opts));
340
- ctx.res.setHeader('Set-Cookie', cookies);
341
- }
342
- if (isBrowser()) {
343
- document.cookie = cookie.serialize(name, '', opts);
344
- }
345
- return {};
402
+ /**
403
+ * We forward the request destroy to setCookie function
404
+ * as it is the same function with modified maxAge value.
405
+ */
406
+ return setCookie$1(ctx, name, '', __assign(__assign({}, (options || {})), { maxAge: -1 }));
346
407
  }
347
408
  exports.destroyCookie = destroyCookie;
409
+ /* Utility Exports */
348
410
  exports.default = {
349
411
  set: setCookie$1,
350
412
  get: parseCookies,
@@ -1,11 +1,9 @@
1
1
  import './_commonjsHelpers-0c4b6f40.js';
2
- import './_to-object-a4107da3.js';
3
- import './es6.string.iterator-c990c18c.js';
2
+ import './core.get-iterator-method-86d4db69.js';
4
3
  import './_library-528f1934.js';
5
- import './_iter-detect-5d49a330.js';
6
- import './core.get-iterator-method-e1de7503.js';
7
- import './web.dom.iterable-4439f05a.js';
8
- import { a as _asyncToGenerator, r as regenerator } from './asyncToGenerator-fc1c2e29.js';
4
+ import './_iter-detect-130ee549.js';
5
+ import './web.dom.iterable-f8f967cd.js';
6
+ import { a as _asyncToGenerator, r as regenerator } from './asyncToGenerator-7bf8bc4d.js';
9
7
 
10
8
  var _this = undefined;
11
9