@mjhls/mjh-framework 1.0.875-v1customDimension → 1.0.875

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 (302) hide show
  1. package/dist/cjs/AD.js +9 -10
  2. package/dist/cjs/AD300x250.js +27 -28
  3. package/dist/cjs/AD300x250x600.js +27 -28
  4. package/dist/cjs/AD728x90.js +30 -31
  5. package/dist/cjs/ADFloatingFooter.js +30 -31
  6. package/dist/cjs/ADFooter.js +12 -13
  7. package/dist/cjs/ADGutter.js +30 -31
  8. package/dist/cjs/{ADInfeed-8c452fcb.js → ADInfeed-326c6278.js} +13 -15
  9. package/dist/cjs/ADSkyscraper.js +30 -31
  10. package/dist/cjs/ADSponsoredResources.js +30 -31
  11. package/dist/cjs/ADWebcast.js +30 -31
  12. package/dist/cjs/ADWelcome.js +31 -32
  13. package/dist/cjs/{ADlgInfeed-7997caf8.js → ADlgInfeed-a14f79ce.js} +10 -11
  14. package/dist/cjs/AccordionPanel.js +27 -29
  15. package/dist/cjs/AdSlot.js +31 -32
  16. package/dist/cjs/AdSlotsProvider.js +15 -17
  17. package/dist/cjs/AlgoliaSearch.js +1103 -1160
  18. package/dist/cjs/AlphabeticList.js +23 -24
  19. package/dist/cjs/ArticleCarousel.js +19 -20
  20. package/dist/cjs/ArticleProgramLandingPage.js +57 -58
  21. package/dist/cjs/ArticleSeriesLandingPage.js +38 -39
  22. package/dist/cjs/ArticleSeriesListing.js +59 -60
  23. package/dist/cjs/Auth.js +283 -287
  24. package/dist/cjs/AuthWrapper.js +334 -1511
  25. package/dist/cjs/{AuthorComponent-39b37d84.js → AuthorComponent-421d5ec1.js} +13 -14
  26. package/dist/cjs/Beam.js +6 -6
  27. package/dist/cjs/{BlockContent-9ebd251f.js → BlockContent-bac780ac.js} +55 -56
  28. package/dist/cjs/Breadcrumbs.js +25 -27
  29. package/dist/cjs/CMEDeck.js +81 -81
  30. package/dist/cjs/Column1.js +11 -14
  31. package/dist/cjs/Column2.js +31 -34
  32. package/dist/cjs/Column3.js +56 -59
  33. package/dist/cjs/ConferenceArticleCard.js +25 -26
  34. package/dist/cjs/ConferenceBanner-4a16fddc.js +23 -0
  35. package/dist/cjs/DeckContent.js +92 -96
  36. package/dist/cjs/DeckQueue.js +86 -90
  37. package/dist/cjs/{Dfp-9be904d5.js → Dfp-57cecb43.js} +32 -33
  38. package/dist/cjs/EventsDeck.js +133 -140
  39. package/dist/cjs/ExternalResources.js +78 -79
  40. package/dist/cjs/Feature.js +26 -28
  41. package/dist/cjs/ForbesHero.js +40 -41
  42. package/dist/cjs/GridContent.js +231 -236
  43. package/dist/cjs/GridHero.js +42 -43
  44. package/dist/cjs/GroupDeck.js +57 -58
  45. package/dist/cjs/HamMagazine.js +127 -132
  46. package/dist/cjs/Header.js +12 -14
  47. package/dist/cjs/Hero.js +15 -16
  48. package/dist/cjs/HighlightenVideo.js +17 -18
  49. package/dist/cjs/HorizontalArticleListing.js +71 -72
  50. package/dist/cjs/HorizontalHero.js +28 -29
  51. package/dist/cjs/IssueContentDeck.js +71 -76
  52. package/dist/cjs/IssueDeck.js +70 -75
  53. package/dist/cjs/IssueLanding.js +64 -65
  54. package/dist/cjs/LeftNav.js +37 -39
  55. package/dist/cjs/MasterDeck.js +70 -71
  56. package/dist/cjs/MediaSeriesLanding.js +987 -1083
  57. package/dist/cjs/NavDvm.js +72 -77
  58. package/dist/cjs/{NavFooter-3dcd99a8.js → NavFooter-76c913e3.js} +14 -15
  59. package/dist/cjs/NavMagazine.js +134 -139
  60. package/dist/cjs/NavNative.js +126 -134
  61. package/dist/cjs/OncliveHero.js +21 -22
  62. package/dist/cjs/OncliveLargeHero.js +70 -71
  63. package/dist/cjs/PageFilter.js +12 -13
  64. package/dist/cjs/PartnerDetailListing.js +114 -2741
  65. package/dist/cjs/PdfDownload.js +9 -10
  66. package/dist/cjs/PopUpModal.js +17 -19
  67. package/dist/cjs/PubSection.js +40 -41
  68. package/dist/cjs/PubToc.js +13 -14
  69. package/dist/cjs/PublicationDeck.js +65 -70
  70. package/dist/cjs/PublicationLanding.js +106 -114
  71. package/dist/cjs/QueueDeckExpanded.js +308 -308
  72. package/dist/cjs/RecentNews.js +22 -23
  73. package/dist/cjs/RelatedContent.js +29 -30
  74. package/dist/cjs/RelatedTopicsDropdown.js +19 -22
  75. package/dist/cjs/RolesDeck.js +27 -32
  76. package/dist/cjs/Search.js +16 -20
  77. package/dist/cjs/Segment.js +4 -4
  78. package/dist/cjs/SeriesListingDeck.js +34 -34
  79. package/dist/cjs/{SeriesSlider-ba0c5d1a.js → SeriesSlider-372e418f.js} +30 -31
  80. package/dist/cjs/SetCookie.js +1 -1
  81. package/dist/cjs/SideFooter.js +34 -35
  82. package/dist/cjs/SocialIcons.js +9 -10
  83. package/dist/cjs/{SocialSearchComponent-4942ddfc.js → SocialSearchComponent-80a2130a.js} +32 -36
  84. package/dist/cjs/SocialShare.js +29 -31
  85. package/dist/cjs/TaxonomyCard.js +61 -66
  86. package/dist/cjs/TaxonomyDescription.js +53 -54
  87. package/dist/cjs/TemplateNormal.js +72 -73
  88. package/dist/cjs/ThumbnailCard.js +24 -26
  89. package/dist/cjs/Ustream.js +27 -28
  90. package/dist/cjs/VerticalHero.js +19 -20
  91. package/dist/cjs/VideoProgramLandingPage.js +72 -76
  92. package/dist/cjs/VideoSeriesCard.js +32 -33
  93. package/dist/cjs/VideoSeriesFilter.js +16 -16
  94. package/dist/cjs/VideoSeriesLandingPage.js +48 -49
  95. package/dist/cjs/VideoSeriesListing.js +76 -77
  96. package/dist/cjs/View.js +250 -256
  97. package/dist/cjs/YahooHero.js +39 -40
  98. package/dist/cjs/YoutubeGroup.js +58 -59
  99. package/dist/cjs/{_is-array-54228b29.js → _is-array-bd978497.js} +6 -6
  100. package/dist/cjs/{_iter-detect-b1df62f0.js → _iter-detect-ee3d4802.js} +7 -7
  101. package/dist/cjs/{_object-pie-083f2dd6.js → _object-pie-68c5bcbc.js} +4 -4
  102. package/dist/cjs/{_object-sap-d1978572.js → _object-sap-fee50a62.js} +1 -1
  103. package/dist/cjs/{_object-to-array-ce86cae7.js → _object-to-array-18379aba.js} +2 -2
  104. package/dist/cjs/{asyncToGenerator-77821af0.js → asyncToGenerator-15014394.js} +30 -30
  105. package/dist/cjs/{brightcove-react-player-loader.es-a195642e.js → brightcove-react-player-loader.es-05029198.js} +6 -7
  106. package/dist/cjs/{core.get-iterator-method-5643aa10.js → core.get-iterator-method-5cb3af28.js} +33 -33
  107. package/dist/cjs/{debounce-d4a2369b.js → debounce-6191c8ee.js} +2 -2
  108. package/dist/cjs/{define-property-e8404b64.js → define-property-530a5e9e.js} +6 -6
  109. package/dist/cjs/{defineProperty-9673846a.js → defineProperty-5ca424cd.js} +1 -1
  110. package/dist/cjs/{entities-df1aed86.js → entities-310b46ee.js} +1 -5
  111. package/dist/cjs/{eq-5fc26c07.js → eq-bb2843ed.js} +1 -1
  112. package/dist/cjs/{extends-7c86182f.js → extends-1d905ddb.js} +7 -7
  113. package/dist/cjs/faundadb.js +5 -5
  114. package/dist/cjs/{get-5839e5b5.js → get-adbb11e3.js} +21 -21
  115. package/dist/cjs/getRelatedArticle.js +16 -16
  116. package/dist/cjs/getRootDocGroup.js +4 -4
  117. package/dist/cjs/getSerializers.js +43 -43
  118. package/dist/cjs/{getTargeting-9d509319.js → getTargeting-9d63325d.js} +2 -2
  119. package/dist/cjs/getTargeting.js +6 -6
  120. package/dist/{esm/iconBase-ccc56b97.js → cjs/iconBase-68959171.js} +8 -2
  121. package/dist/cjs/{index-50be6759.js → index-53e27416.js} +1 -1
  122. package/dist/cjs/{index-58b83e77.js → index-75e4415e.js} +571 -581
  123. package/dist/cjs/{index-f86bb269.js → index-79eed652.js} +6 -6
  124. package/dist/cjs/{index-eadd5035.js → index-96b3db50.js} +15 -17
  125. package/dist/cjs/{index-fc2f1ca2.js → index-98e01cb9.js} +12 -13
  126. package/dist/cjs/{index-d48b231c.js → index-ff69979f.js} +3 -3
  127. package/dist/cjs/{index.es-f3e47207.js → index.es-e9d84959.js} +7 -8
  128. package/dist/cjs/{index.esm-f27f80d9.js → index.esm-05850a2f.js} +1 -1
  129. package/dist/cjs/{index.esm-c1e16606.js → index.esm-44f3e2d0.js} +1 -1
  130. package/dist/cjs/{index.esm-00a6aade.js → index.esm-974f47d9.js} +1 -1
  131. package/dist/cjs/{index.esm-2bb721c8.js → index.esm-bf016399.js} +18 -19
  132. package/dist/cjs/index.js +165 -169
  133. package/dist/cjs/{inherits-de66ea16.js → inherits-1dcf1280.js} +21 -21
  134. package/dist/cjs/{isSymbol-03abbdf0.js → isSymbol-04666465.js} +15 -15
  135. package/dist/cjs/{keys-e982b3fa.js → keys-91f31941.js} +6 -6
  136. package/dist/cjs/{lodash-f0783643.js → lodash-b5e0d5f6.js} +1 -1
  137. package/dist/cjs/{main-f1c77adb.js → main-bc7d4bf8.js} +69 -70
  138. package/dist/cjs/{moment-aca40de1.js → moment-ca3bd9fb.js} +1 -1
  139. package/dist/cjs/{react-social-icons-af932527.js → react-social-icons-f7f48f71.js} +27 -28
  140. package/dist/cjs/{slicedToArray-067dd3bc.js → slicedToArray-0a78cdf3.js} +12 -12
  141. package/dist/cjs/{smoothscroll-99df7f93.js → smoothscroll-5054361f.js} +1 -1
  142. package/dist/cjs/{stringify-f7a37a8d.js → stringify-13405ce2.js} +5 -5
  143. package/dist/cjs/timeDifferenceCalc.js +1 -1
  144. package/dist/cjs/{toConsumableArray-d7797c2b.js → toConsumableArray-39fd0757.js} +7 -7
  145. package/dist/cjs/{toNumber-5e1fac58.js → toNumber-f2f8744b.js} +1 -1
  146. package/dist/cjs/{typeof-567e31ff.js → typeof-3dd6d3df.js} +35 -35
  147. package/dist/cjs/urlFor.js +6 -6
  148. package/dist/cjs/{ustream-api-3819e4aa.js → ustream-api-5619c1fa.js} +4 -4
  149. package/dist/cjs/{util-93a37fd0.js → util-f2c1b65b.js} +1 -12
  150. package/dist/cjs/{visibility-sensor-eb2c5b69.js → visibility-sensor-ad5e3116.js} +5 -7
  151. package/dist/cjs/{web.dom.iterable-d98303e0.js → web.dom.iterable-a9359910.js} +2 -2
  152. package/dist/esm/AD.js +1 -1
  153. package/dist/esm/AD300x250.js +21 -21
  154. package/dist/esm/AD300x250x600.js +21 -21
  155. package/dist/esm/AD728x90.js +23 -23
  156. package/dist/esm/ADFloatingFooter.js +21 -21
  157. package/dist/esm/ADFooter.js +4 -4
  158. package/dist/esm/ADGutter.js +21 -21
  159. package/dist/esm/{ADInfeed-2d1d8175.js → ADInfeed-dbdb0513.js} +6 -6
  160. package/dist/esm/ADSkyscraper.js +21 -21
  161. package/dist/esm/ADSponsoredResources.js +21 -21
  162. package/dist/esm/ADWebcast.js +21 -21
  163. package/dist/esm/ADWelcome.js +18 -18
  164. package/dist/esm/{ADlgInfeed-f9c737bb.js → ADlgInfeed-f1c2c5cd.js} +4 -4
  165. package/dist/esm/AccordionPanel.js +6 -6
  166. package/dist/esm/AdSlot.js +20 -20
  167. package/dist/esm/AdSlotsProvider.js +9 -9
  168. package/dist/esm/AlgoliaSearch.js +552 -608
  169. package/dist/esm/AlphabeticList.js +8 -8
  170. package/dist/esm/ArticleCarousel.js +13 -13
  171. package/dist/esm/ArticleProgramLandingPage.js +48 -48
  172. package/dist/esm/ArticleSeriesLandingPage.js +29 -29
  173. package/dist/esm/ArticleSeriesListing.js +32 -32
  174. package/dist/esm/Auth.js +199 -199
  175. package/dist/esm/AuthWrapper.js +305 -1481
  176. package/dist/esm/{AuthorComponent-11adff02.js → AuthorComponent-2277b67c.js} +1 -1
  177. package/dist/esm/Beam.js +6 -6
  178. package/dist/esm/{BlockContent-1e73bd2c.js → BlockContent-ea93e8f7.js} +34 -34
  179. package/dist/esm/Breadcrumbs.js +5 -5
  180. package/dist/esm/CMEDeck.js +21 -21
  181. package/dist/esm/Column1.js +4 -4
  182. package/dist/esm/Column2.js +19 -19
  183. package/dist/esm/Column3.js +35 -35
  184. package/dist/esm/ConferenceArticleCard.js +10 -10
  185. package/dist/esm/DeckContent.js +46 -46
  186. package/dist/esm/DeckQueue.js +46 -46
  187. package/dist/esm/{Dfp-102f0beb.js → Dfp-d6a5629f.js} +13 -13
  188. package/dist/esm/EventsDeck.js +47 -47
  189. package/dist/esm/ExternalResources.js +46 -46
  190. package/dist/esm/Feature.js +6 -6
  191. package/dist/esm/ForbesHero.js +10 -10
  192. package/dist/esm/GridContent.js +85 -85
  193. package/dist/esm/GridHero.js +11 -11
  194. package/dist/esm/GroupDeck.js +12 -12
  195. package/dist/esm/HamMagazine.js +24 -24
  196. package/dist/esm/Hero.js +7 -7
  197. package/dist/esm/HighlightenVideo.js +2 -2
  198. package/dist/esm/HorizontalArticleListing.js +46 -46
  199. package/dist/esm/HorizontalHero.js +8 -8
  200. package/dist/esm/IssueContentDeck.js +25 -25
  201. package/dist/esm/IssueDeck.js +34 -34
  202. package/dist/esm/IssueLanding.js +53 -53
  203. package/dist/esm/LeftNav.js +20 -20
  204. package/dist/esm/MasterDeck.js +34 -34
  205. package/dist/esm/MediaSeriesLanding.js +337 -430
  206. package/dist/esm/NavDvm.js +14 -14
  207. package/dist/esm/NavMagazine.js +30 -30
  208. package/dist/esm/NavNative.js +30 -30
  209. package/dist/esm/OncliveHero.js +7 -7
  210. package/dist/esm/OncliveLargeHero.js +11 -11
  211. package/dist/esm/PageFilter.js +4 -4
  212. package/dist/esm/PartnerDetailListing.js +63 -2688
  213. package/dist/esm/PdfDownload.js +2 -2
  214. package/dist/esm/PopUpModal.js +4 -4
  215. package/dist/esm/PubSection.js +32 -32
  216. package/dist/esm/PubToc.js +6 -6
  217. package/dist/esm/PublicationDeck.js +27 -27
  218. package/dist/esm/PublicationLanding.js +47 -51
  219. package/dist/esm/QueueDeckExpanded.js +34 -34
  220. package/dist/esm/RecentNews.js +4 -4
  221. package/dist/esm/RelatedContent.js +10 -10
  222. package/dist/esm/RolesDeck.js +12 -12
  223. package/dist/esm/Search.js +6 -6
  224. package/dist/esm/Segment.js +4 -4
  225. package/dist/esm/SeriesListingDeck.js +18 -18
  226. package/dist/esm/{SeriesSlider-06891e36.js → SeriesSlider-ae692d40.js} +5 -5
  227. package/dist/esm/SetCookie.js +1 -1
  228. package/dist/esm/SideFooter.js +13 -13
  229. package/dist/esm/{SocialSearchComponent-3aba5db2.js → SocialSearchComponent-998cb92d.js} +8 -8
  230. package/dist/esm/TaxonomyCard.js +27 -27
  231. package/dist/esm/TaxonomyDescription.js +44 -44
  232. package/dist/esm/TemplateNormal.js +48 -48
  233. package/dist/esm/ThumbnailCard.js +10 -10
  234. package/dist/esm/Ustream.js +11 -11
  235. package/dist/esm/VerticalHero.js +6 -6
  236. package/dist/esm/VideoProgramLandingPage.js +52 -52
  237. package/dist/esm/VideoSeriesCard.js +13 -13
  238. package/dist/esm/VideoSeriesFilter.js +7 -7
  239. package/dist/esm/VideoSeriesLandingPage.js +35 -35
  240. package/dist/esm/VideoSeriesListing.js +33 -33
  241. package/dist/esm/View.js +84 -86
  242. package/dist/esm/YahooHero.js +13 -13
  243. package/dist/esm/YoutubeGroup.js +12 -12
  244. package/dist/esm/{_is-array-8d21b9e3.js → _is-array-8914b83f.js} +6 -6
  245. package/dist/esm/{_iter-detect-98db3b07.js → _iter-detect-13e31915.js} +7 -7
  246. package/dist/esm/{_object-pie-133f504a.js → _object-pie-33c40e79.js} +4 -4
  247. package/dist/esm/{_object-sap-7cee6f84.js → _object-sap-fc9da7e8.js} +1 -1
  248. package/dist/esm/{_object-to-array-2300e51b.js → _object-to-array-ee8f6d98.js} +2 -2
  249. package/dist/esm/{asyncToGenerator-5ef104a7.js → asyncToGenerator-40371743.js} +30 -30
  250. package/dist/esm/{core.get-iterator-method-ea258bb1.js → core.get-iterator-method-0fb60d94.js} +34 -34
  251. package/dist/esm/{debounce-533d9748.js → debounce-89969f66.js} +2 -2
  252. package/dist/esm/define-property-73034847.js +18 -0
  253. package/dist/esm/{defineProperty-8c30428f.js → defineProperty-e66a2c7c.js} +1 -1
  254. package/dist/esm/{entities-6d9154b4.js → entities-7cc3bf45.js} +1 -5
  255. package/dist/esm/{eq-bdcbf886.js → eq-b470f743.js} +1 -1
  256. package/dist/esm/{extends-6d8e3924.js → extends-9a61581c.js} +7 -7
  257. package/dist/esm/faundadb.js +5 -5
  258. package/dist/esm/{get-3c308da4.js → get-1e515072.js} +21 -21
  259. package/dist/esm/getRelatedArticle.js +11 -11
  260. package/dist/esm/getRootDocGroup.js +4 -4
  261. package/dist/esm/getSerializers.js +43 -43
  262. package/dist/esm/{getTargeting-4061f839.js → getTargeting-e6820763.js} +2 -2
  263. package/dist/esm/getTargeting.js +6 -6
  264. package/dist/{cjs/iconBase-be4097c0.js → esm/iconBase-602d52fe.js} +8 -33
  265. package/dist/esm/{index-f0fc23eb.js → index-41a678ea.js} +4 -4
  266. package/dist/esm/{index-79cfd25c.js → index-511bdaa5.js} +6 -6
  267. package/dist/esm/{index-755f2cc2.js → index-5f7e79e7.js} +6 -6
  268. package/dist/esm/{index-98ca9cec.js → index-637e8f49.js} +1 -1
  269. package/dist/esm/{index-3f5c03b2.js → index-f7fdcc91.js} +3 -3
  270. package/dist/esm/{index-7cb41586.js → index-fd89ce38.js} +131 -131
  271. package/dist/esm/{index.esm-f6156a57.js → index.esm-3fdda599.js} +1 -1
  272. package/dist/esm/{index.esm-d4932dea.js → index.esm-a8ff922c.js} +1 -1
  273. package/dist/esm/{index.esm-9b042655.js → index.esm-c6715e80.js} +1 -1
  274. package/dist/esm/{index.esm-37268dca.js → index.esm-ed50151c.js} +2 -2
  275. package/dist/esm/index.js +123 -124
  276. package/dist/esm/{inherits-a6ba2ec4.js → inherits-eeaf6740.js} +18 -18
  277. package/dist/esm/{isSymbol-a7e9aafe.js → isSymbol-1981418f.js} +15 -15
  278. package/dist/esm/{keys-31dcdb31.js → keys-a5ffafe7.js} +6 -6
  279. package/dist/esm/{lodash-f97fd99a.js → lodash-a818d390.js} +1 -1
  280. package/dist/esm/{main-d4165069.js → main-ae902629.js} +53 -53
  281. package/dist/esm/{moment-bc12cb97.js → moment-b6f49411.js} +1 -1
  282. package/dist/esm/{react-social-icons-9be47857.js → react-social-icons-a7d5c5c7.js} +16 -16
  283. package/dist/esm/{slicedToArray-6ebcbfea.js → slicedToArray-9c3bb613.js} +12 -12
  284. package/dist/esm/{smoothscroll-fa4e3f8c.js → smoothscroll-0cd4c7a6.js} +1 -1
  285. package/dist/esm/stringify-ebc16384.js +15 -0
  286. package/dist/esm/timeDifferenceCalc.js +1 -1
  287. package/dist/esm/{toConsumableArray-f7074d7c.js → toConsumableArray-e333293f.js} +7 -7
  288. package/dist/esm/{toNumber-5aeba6e7.js → toNumber-e3dcad26.js} +1 -1
  289. package/dist/esm/{typeof-e9fc0c5d.js → typeof-938ae770.js} +35 -35
  290. package/dist/esm/urlFor.js +4 -4
  291. package/dist/esm/{ustream-api-d3714624.js → ustream-api-d325d196.js} +4 -4
  292. package/dist/esm/{util-8ed16d48.js → util-7700fc59.js} +1 -12
  293. package/dist/esm/{web.dom.iterable-ab4dea5c.js → web.dom.iterable-6b037ff9.js} +2 -2
  294. package/package.json +1 -1
  295. package/dist/cjs/ConferenceBanner-6c9e718a.js +0 -24
  296. package/dist/cjs/defineProperty-e0fb52c5.js +0 -73
  297. package/dist/cjs/typeof-1358762e.js +0 -33
  298. package/dist/esm/define-property-5f1bda73.js +0 -18
  299. package/dist/esm/defineProperty-23a8f8cd.js +0 -68
  300. package/dist/esm/stringify-2b084bee.js +0 -15
  301. package/dist/esm/typeof-2f07d0e8.js +0 -30
  302. package/dist/esm/{brightcove-react-player-loader.es-57a70a56.js → brightcove-react-player-loader.es-e761d404.js} +1 -1
@@ -1,886 +1,15 @@
1
1
  'use strict';
2
2
 
3
- var slicedToArray$1 = require('./slicedToArray-067dd3bc.js');
3
+ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
4
+
4
5
  var _commonjsHelpers = require('./_commonjsHelpers-06173234.js');
5
- var _typeof = require('./typeof-1358762e.js');
6
- var defineProperty = require('./defineProperty-e0fb52c5.js');
6
+ require('./core.get-iterator-method-5cb3af28.js');
7
+ require('./web.dom.iterable-a9359910.js');
7
8
  var React = require('react');
9
+ var React__default = _interopDefault(React);
10
+ var slicedToArray = require('./slicedToArray-0a78cdf3.js');
8
11
  var reactBootstrap = require('react-bootstrap');
9
12
  var styleInject_es = require('./style-inject.es-dcee06b6.js');
10
- require('./web.dom.iterable-d98303e0.js');
11
- require('./core.get-iterator-method-5643aa10.js');
12
-
13
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
14
-
15
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
16
-
17
- var interopRequireDefault = _commonjsHelpers.createCommonjsModule(function (module) {
18
- function _interopRequireDefault(obj) {
19
- return obj && obj.__esModule ? obj : {
20
- "default": obj
21
- };
22
- }
23
-
24
- module.exports = _interopRequireDefault;
25
- module.exports["default"] = module.exports, module.exports.__esModule = true;
26
- });
27
-
28
- _commonjsHelpers.unwrapExports(interopRequireDefault);
29
-
30
- var runtime_1 = _commonjsHelpers.createCommonjsModule(function (module) {
31
- /**
32
- * Copyright (c) 2014-present, Facebook, Inc.
33
- *
34
- * This source code is licensed under the MIT license found in the
35
- * LICENSE file in the root directory of this source tree.
36
- */
37
-
38
- var runtime = (function (exports) {
39
-
40
- var Op = Object.prototype;
41
- var hasOwn = Op.hasOwnProperty;
42
- var undefined$1; // More compressible than void 0.
43
- var $Symbol = typeof Symbol === "function" ? Symbol : {};
44
- var iteratorSymbol = $Symbol.iterator || "@@iterator";
45
- var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
46
- var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
47
-
48
- function define(obj, key, value) {
49
- Object.defineProperty(obj, key, {
50
- value: value,
51
- enumerable: true,
52
- configurable: true,
53
- writable: true
54
- });
55
- return obj[key];
56
- }
57
- try {
58
- // IE 8 has a broken Object.defineProperty that only works on DOM objects.
59
- define({}, "");
60
- } catch (err) {
61
- define = function(obj, key, value) {
62
- return obj[key] = value;
63
- };
64
- }
65
-
66
- function wrap(innerFn, outerFn, self, tryLocsList) {
67
- // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
68
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
69
- var generator = Object.create(protoGenerator.prototype);
70
- var context = new Context(tryLocsList || []);
71
-
72
- // The ._invoke method unifies the implementations of the .next,
73
- // .throw, and .return methods.
74
- generator._invoke = makeInvokeMethod(innerFn, self, context);
75
-
76
- return generator;
77
- }
78
- exports.wrap = wrap;
79
-
80
- // Try/catch helper to minimize deoptimizations. Returns a completion
81
- // record like context.tryEntries[i].completion. This interface could
82
- // have been (and was previously) designed to take a closure to be
83
- // invoked without arguments, but in all the cases we care about we
84
- // already have an existing method we want to call, so there's no need
85
- // to create a new function object. We can even get away with assuming
86
- // the method takes exactly one argument, since that happens to be true
87
- // in every case, so we don't have to touch the arguments object. The
88
- // only additional allocation required is the completion record, which
89
- // has a stable shape and so hopefully should be cheap to allocate.
90
- function tryCatch(fn, obj, arg) {
91
- try {
92
- return { type: "normal", arg: fn.call(obj, arg) };
93
- } catch (err) {
94
- return { type: "throw", arg: err };
95
- }
96
- }
97
-
98
- var GenStateSuspendedStart = "suspendedStart";
99
- var GenStateSuspendedYield = "suspendedYield";
100
- var GenStateExecuting = "executing";
101
- var GenStateCompleted = "completed";
102
-
103
- // Returning this object from the innerFn has the same effect as
104
- // breaking out of the dispatch switch statement.
105
- var ContinueSentinel = {};
106
-
107
- // Dummy constructor functions that we use as the .constructor and
108
- // .constructor.prototype properties for functions that return Generator
109
- // objects. For full spec compliance, you may wish to configure your
110
- // minifier not to mangle the names of these two functions.
111
- function Generator() {}
112
- function GeneratorFunction() {}
113
- function GeneratorFunctionPrototype() {}
114
-
115
- // This is a polyfill for %IteratorPrototype% for environments that
116
- // don't natively support it.
117
- var IteratorPrototype = {};
118
- IteratorPrototype[iteratorSymbol] = function () {
119
- return this;
120
- };
121
-
122
- var getProto = Object.getPrototypeOf;
123
- var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
124
- if (NativeIteratorPrototype &&
125
- NativeIteratorPrototype !== Op &&
126
- hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
127
- // This environment has a native %IteratorPrototype%; use it instead
128
- // of the polyfill.
129
- IteratorPrototype = NativeIteratorPrototype;
130
- }
131
-
132
- var Gp = GeneratorFunctionPrototype.prototype =
133
- Generator.prototype = Object.create(IteratorPrototype);
134
- GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
135
- GeneratorFunctionPrototype.constructor = GeneratorFunction;
136
- GeneratorFunction.displayName = define(
137
- GeneratorFunctionPrototype,
138
- toStringTagSymbol,
139
- "GeneratorFunction"
140
- );
141
-
142
- // Helper for defining the .next, .throw, and .return methods of the
143
- // Iterator interface in terms of a single ._invoke method.
144
- function defineIteratorMethods(prototype) {
145
- ["next", "throw", "return"].forEach(function(method) {
146
- define(prototype, method, function(arg) {
147
- return this._invoke(method, arg);
148
- });
149
- });
150
- }
151
-
152
- exports.isGeneratorFunction = function(genFun) {
153
- var ctor = typeof genFun === "function" && genFun.constructor;
154
- return ctor
155
- ? ctor === GeneratorFunction ||
156
- // For the native GeneratorFunction constructor, the best we can
157
- // do is to check its .name property.
158
- (ctor.displayName || ctor.name) === "GeneratorFunction"
159
- : false;
160
- };
161
-
162
- exports.mark = function(genFun) {
163
- if (Object.setPrototypeOf) {
164
- Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
165
- } else {
166
- genFun.__proto__ = GeneratorFunctionPrototype;
167
- define(genFun, toStringTagSymbol, "GeneratorFunction");
168
- }
169
- genFun.prototype = Object.create(Gp);
170
- return genFun;
171
- };
172
-
173
- // Within the body of any async function, `await x` is transformed to
174
- // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
175
- // `hasOwn.call(value, "__await")` to determine if the yielded value is
176
- // meant to be awaited.
177
- exports.awrap = function(arg) {
178
- return { __await: arg };
179
- };
180
-
181
- function AsyncIterator(generator, PromiseImpl) {
182
- function invoke(method, arg, resolve, reject) {
183
- var record = tryCatch(generator[method], generator, arg);
184
- if (record.type === "throw") {
185
- reject(record.arg);
186
- } else {
187
- var result = record.arg;
188
- var value = result.value;
189
- if (value &&
190
- typeof value === "object" &&
191
- hasOwn.call(value, "__await")) {
192
- return PromiseImpl.resolve(value.__await).then(function(value) {
193
- invoke("next", value, resolve, reject);
194
- }, function(err) {
195
- invoke("throw", err, resolve, reject);
196
- });
197
- }
198
-
199
- return PromiseImpl.resolve(value).then(function(unwrapped) {
200
- // When a yielded Promise is resolved, its final value becomes
201
- // the .value of the Promise<{value,done}> result for the
202
- // current iteration.
203
- result.value = unwrapped;
204
- resolve(result);
205
- }, function(error) {
206
- // If a rejected Promise was yielded, throw the rejection back
207
- // into the async generator function so it can be handled there.
208
- return invoke("throw", error, resolve, reject);
209
- });
210
- }
211
- }
212
-
213
- var previousPromise;
214
-
215
- function enqueue(method, arg) {
216
- function callInvokeWithMethodAndArg() {
217
- return new PromiseImpl(function(resolve, reject) {
218
- invoke(method, arg, resolve, reject);
219
- });
220
- }
221
-
222
- return previousPromise =
223
- // If enqueue has been called before, then we want to wait until
224
- // all previous Promises have been resolved before calling invoke,
225
- // so that results are always delivered in the correct order. If
226
- // enqueue has not been called before, then it is important to
227
- // call invoke immediately, without waiting on a callback to fire,
228
- // so that the async generator function has the opportunity to do
229
- // any necessary setup in a predictable way. This predictability
230
- // is why the Promise constructor synchronously invokes its
231
- // executor callback, and why async functions synchronously
232
- // execute code before the first await. Since we implement simple
233
- // async functions in terms of async generators, it is especially
234
- // important to get this right, even though it requires care.
235
- previousPromise ? previousPromise.then(
236
- callInvokeWithMethodAndArg,
237
- // Avoid propagating failures to Promises returned by later
238
- // invocations of the iterator.
239
- callInvokeWithMethodAndArg
240
- ) : callInvokeWithMethodAndArg();
241
- }
242
-
243
- // Define the unified helper method that is used to implement .next,
244
- // .throw, and .return (see defineIteratorMethods).
245
- this._invoke = enqueue;
246
- }
247
-
248
- defineIteratorMethods(AsyncIterator.prototype);
249
- AsyncIterator.prototype[asyncIteratorSymbol] = function () {
250
- return this;
251
- };
252
- exports.AsyncIterator = AsyncIterator;
253
-
254
- // Note that simple async functions are implemented on top of
255
- // AsyncIterator objects; they just return a Promise for the value of
256
- // the final result produced by the iterator.
257
- exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
258
- if (PromiseImpl === void 0) PromiseImpl = Promise;
259
-
260
- var iter = new AsyncIterator(
261
- wrap(innerFn, outerFn, self, tryLocsList),
262
- PromiseImpl
263
- );
264
-
265
- return exports.isGeneratorFunction(outerFn)
266
- ? iter // If outerFn is a generator, return the full iterator.
267
- : iter.next().then(function(result) {
268
- return result.done ? result.value : iter.next();
269
- });
270
- };
271
-
272
- function makeInvokeMethod(innerFn, self, context) {
273
- var state = GenStateSuspendedStart;
274
-
275
- return function invoke(method, arg) {
276
- if (state === GenStateExecuting) {
277
- throw new Error("Generator is already running");
278
- }
279
-
280
- if (state === GenStateCompleted) {
281
- if (method === "throw") {
282
- throw arg;
283
- }
284
-
285
- // Be forgiving, per 25.3.3.3.3 of the spec:
286
- // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
287
- return doneResult();
288
- }
289
-
290
- context.method = method;
291
- context.arg = arg;
292
-
293
- while (true) {
294
- var delegate = context.delegate;
295
- if (delegate) {
296
- var delegateResult = maybeInvokeDelegate(delegate, context);
297
- if (delegateResult) {
298
- if (delegateResult === ContinueSentinel) continue;
299
- return delegateResult;
300
- }
301
- }
302
-
303
- if (context.method === "next") {
304
- // Setting context._sent for legacy support of Babel's
305
- // function.sent implementation.
306
- context.sent = context._sent = context.arg;
307
-
308
- } else if (context.method === "throw") {
309
- if (state === GenStateSuspendedStart) {
310
- state = GenStateCompleted;
311
- throw context.arg;
312
- }
313
-
314
- context.dispatchException(context.arg);
315
-
316
- } else if (context.method === "return") {
317
- context.abrupt("return", context.arg);
318
- }
319
-
320
- state = GenStateExecuting;
321
-
322
- var record = tryCatch(innerFn, self, context);
323
- if (record.type === "normal") {
324
- // If an exception is thrown from innerFn, we leave state ===
325
- // GenStateExecuting and loop back for another invocation.
326
- state = context.done
327
- ? GenStateCompleted
328
- : GenStateSuspendedYield;
329
-
330
- if (record.arg === ContinueSentinel) {
331
- continue;
332
- }
333
-
334
- return {
335
- value: record.arg,
336
- done: context.done
337
- };
338
-
339
- } else if (record.type === "throw") {
340
- state = GenStateCompleted;
341
- // Dispatch the exception by looping back around to the
342
- // context.dispatchException(context.arg) call above.
343
- context.method = "throw";
344
- context.arg = record.arg;
345
- }
346
- }
347
- };
348
- }
349
-
350
- // Call delegate.iterator[context.method](context.arg) and handle the
351
- // result, either by returning a { value, done } result from the
352
- // delegate iterator, or by modifying context.method and context.arg,
353
- // setting context.delegate to null, and returning the ContinueSentinel.
354
- function maybeInvokeDelegate(delegate, context) {
355
- var method = delegate.iterator[context.method];
356
- if (method === undefined$1) {
357
- // A .throw or .return when the delegate iterator has no .throw
358
- // method always terminates the yield* loop.
359
- context.delegate = null;
360
-
361
- if (context.method === "throw") {
362
- // Note: ["return"] must be used for ES3 parsing compatibility.
363
- if (delegate.iterator["return"]) {
364
- // If the delegate iterator has a return method, give it a
365
- // chance to clean up.
366
- context.method = "return";
367
- context.arg = undefined$1;
368
- maybeInvokeDelegate(delegate, context);
369
-
370
- if (context.method === "throw") {
371
- // If maybeInvokeDelegate(context) changed context.method from
372
- // "return" to "throw", let that override the TypeError below.
373
- return ContinueSentinel;
374
- }
375
- }
376
-
377
- context.method = "throw";
378
- context.arg = new TypeError(
379
- "The iterator does not provide a 'throw' method");
380
- }
381
-
382
- return ContinueSentinel;
383
- }
384
-
385
- var record = tryCatch(method, delegate.iterator, context.arg);
386
-
387
- if (record.type === "throw") {
388
- context.method = "throw";
389
- context.arg = record.arg;
390
- context.delegate = null;
391
- return ContinueSentinel;
392
- }
393
-
394
- var info = record.arg;
395
-
396
- if (! info) {
397
- context.method = "throw";
398
- context.arg = new TypeError("iterator result is not an object");
399
- context.delegate = null;
400
- return ContinueSentinel;
401
- }
402
-
403
- if (info.done) {
404
- // Assign the result of the finished delegate to the temporary
405
- // variable specified by delegate.resultName (see delegateYield).
406
- context[delegate.resultName] = info.value;
407
-
408
- // Resume execution at the desired location (see delegateYield).
409
- context.next = delegate.nextLoc;
410
-
411
- // If context.method was "throw" but the delegate handled the
412
- // exception, let the outer generator proceed normally. If
413
- // context.method was "next", forget context.arg since it has been
414
- // "consumed" by the delegate iterator. If context.method was
415
- // "return", allow the original .return call to continue in the
416
- // outer generator.
417
- if (context.method !== "return") {
418
- context.method = "next";
419
- context.arg = undefined$1;
420
- }
421
-
422
- } else {
423
- // Re-yield the result returned by the delegate method.
424
- return info;
425
- }
426
-
427
- // The delegate iterator is finished, so forget it and continue with
428
- // the outer generator.
429
- context.delegate = null;
430
- return ContinueSentinel;
431
- }
432
-
433
- // Define Generator.prototype.{next,throw,return} in terms of the
434
- // unified ._invoke helper method.
435
- defineIteratorMethods(Gp);
436
-
437
- define(Gp, toStringTagSymbol, "Generator");
438
-
439
- // A Generator should always return itself as the iterator object when the
440
- // @@iterator function is called on it. Some browsers' implementations of the
441
- // iterator prototype chain incorrectly implement this, causing the Generator
442
- // object to not be returned from this call. This ensures that doesn't happen.
443
- // See https://github.com/facebook/regenerator/issues/274 for more details.
444
- Gp[iteratorSymbol] = function() {
445
- return this;
446
- };
447
-
448
- Gp.toString = function() {
449
- return "[object Generator]";
450
- };
451
-
452
- function pushTryEntry(locs) {
453
- var entry = { tryLoc: locs[0] };
454
-
455
- if (1 in locs) {
456
- entry.catchLoc = locs[1];
457
- }
458
-
459
- if (2 in locs) {
460
- entry.finallyLoc = locs[2];
461
- entry.afterLoc = locs[3];
462
- }
463
-
464
- this.tryEntries.push(entry);
465
- }
466
-
467
- function resetTryEntry(entry) {
468
- var record = entry.completion || {};
469
- record.type = "normal";
470
- delete record.arg;
471
- entry.completion = record;
472
- }
473
-
474
- function Context(tryLocsList) {
475
- // The root entry object (effectively a try statement without a catch
476
- // or a finally block) gives us a place to store values thrown from
477
- // locations where there is no enclosing try statement.
478
- this.tryEntries = [{ tryLoc: "root" }];
479
- tryLocsList.forEach(pushTryEntry, this);
480
- this.reset(true);
481
- }
482
-
483
- exports.keys = function(object) {
484
- var keys = [];
485
- for (var key in object) {
486
- keys.push(key);
487
- }
488
- keys.reverse();
489
-
490
- // Rather than returning an object with a next method, we keep
491
- // things simple and return the next function itself.
492
- return function next() {
493
- while (keys.length) {
494
- var key = keys.pop();
495
- if (key in object) {
496
- next.value = key;
497
- next.done = false;
498
- return next;
499
- }
500
- }
501
-
502
- // To avoid creating an additional object, we just hang the .value
503
- // and .done properties off the next function object itself. This
504
- // also ensures that the minifier will not anonymize the function.
505
- next.done = true;
506
- return next;
507
- };
508
- };
509
-
510
- function values(iterable) {
511
- if (iterable) {
512
- var iteratorMethod = iterable[iteratorSymbol];
513
- if (iteratorMethod) {
514
- return iteratorMethod.call(iterable);
515
- }
516
-
517
- if (typeof iterable.next === "function") {
518
- return iterable;
519
- }
520
-
521
- if (!isNaN(iterable.length)) {
522
- var i = -1, next = function next() {
523
- while (++i < iterable.length) {
524
- if (hasOwn.call(iterable, i)) {
525
- next.value = iterable[i];
526
- next.done = false;
527
- return next;
528
- }
529
- }
530
-
531
- next.value = undefined$1;
532
- next.done = true;
533
-
534
- return next;
535
- };
536
-
537
- return next.next = next;
538
- }
539
- }
540
-
541
- // Return an iterator with no values.
542
- return { next: doneResult };
543
- }
544
- exports.values = values;
545
-
546
- function doneResult() {
547
- return { value: undefined$1, done: true };
548
- }
549
-
550
- Context.prototype = {
551
- constructor: Context,
552
-
553
- reset: function(skipTempReset) {
554
- this.prev = 0;
555
- this.next = 0;
556
- // Resetting context._sent for legacy support of Babel's
557
- // function.sent implementation.
558
- this.sent = this._sent = undefined$1;
559
- this.done = false;
560
- this.delegate = null;
561
-
562
- this.method = "next";
563
- this.arg = undefined$1;
564
-
565
- this.tryEntries.forEach(resetTryEntry);
566
-
567
- if (!skipTempReset) {
568
- for (var name in this) {
569
- // Not sure about the optimal order of these conditions:
570
- if (name.charAt(0) === "t" &&
571
- hasOwn.call(this, name) &&
572
- !isNaN(+name.slice(1))) {
573
- this[name] = undefined$1;
574
- }
575
- }
576
- }
577
- },
578
-
579
- stop: function() {
580
- this.done = true;
581
-
582
- var rootEntry = this.tryEntries[0];
583
- var rootRecord = rootEntry.completion;
584
- if (rootRecord.type === "throw") {
585
- throw rootRecord.arg;
586
- }
587
-
588
- return this.rval;
589
- },
590
-
591
- dispatchException: function(exception) {
592
- if (this.done) {
593
- throw exception;
594
- }
595
-
596
- var context = this;
597
- function handle(loc, caught) {
598
- record.type = "throw";
599
- record.arg = exception;
600
- context.next = loc;
601
-
602
- if (caught) {
603
- // If the dispatched exception was caught by a catch block,
604
- // then let that catch block handle the exception normally.
605
- context.method = "next";
606
- context.arg = undefined$1;
607
- }
608
-
609
- return !! caught;
610
- }
611
-
612
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
613
- var entry = this.tryEntries[i];
614
- var record = entry.completion;
615
-
616
- if (entry.tryLoc === "root") {
617
- // Exception thrown outside of any try block that could handle
618
- // it, so set the completion value of the entire function to
619
- // throw the exception.
620
- return handle("end");
621
- }
622
-
623
- if (entry.tryLoc <= this.prev) {
624
- var hasCatch = hasOwn.call(entry, "catchLoc");
625
- var hasFinally = hasOwn.call(entry, "finallyLoc");
626
-
627
- if (hasCatch && hasFinally) {
628
- if (this.prev < entry.catchLoc) {
629
- return handle(entry.catchLoc, true);
630
- } else if (this.prev < entry.finallyLoc) {
631
- return handle(entry.finallyLoc);
632
- }
633
-
634
- } else if (hasCatch) {
635
- if (this.prev < entry.catchLoc) {
636
- return handle(entry.catchLoc, true);
637
- }
638
-
639
- } else if (hasFinally) {
640
- if (this.prev < entry.finallyLoc) {
641
- return handle(entry.finallyLoc);
642
- }
643
-
644
- } else {
645
- throw new Error("try statement without catch or finally");
646
- }
647
- }
648
- }
649
- },
650
-
651
- abrupt: function(type, arg) {
652
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
653
- var entry = this.tryEntries[i];
654
- if (entry.tryLoc <= this.prev &&
655
- hasOwn.call(entry, "finallyLoc") &&
656
- this.prev < entry.finallyLoc) {
657
- var finallyEntry = entry;
658
- break;
659
- }
660
- }
661
-
662
- if (finallyEntry &&
663
- (type === "break" ||
664
- type === "continue") &&
665
- finallyEntry.tryLoc <= arg &&
666
- arg <= finallyEntry.finallyLoc) {
667
- // Ignore the finally entry if control is not jumping to a
668
- // location outside the try/catch block.
669
- finallyEntry = null;
670
- }
671
-
672
- var record = finallyEntry ? finallyEntry.completion : {};
673
- record.type = type;
674
- record.arg = arg;
675
-
676
- if (finallyEntry) {
677
- this.method = "next";
678
- this.next = finallyEntry.finallyLoc;
679
- return ContinueSentinel;
680
- }
681
-
682
- return this.complete(record);
683
- },
684
-
685
- complete: function(record, afterLoc) {
686
- if (record.type === "throw") {
687
- throw record.arg;
688
- }
689
-
690
- if (record.type === "break" ||
691
- record.type === "continue") {
692
- this.next = record.arg;
693
- } else if (record.type === "return") {
694
- this.rval = this.arg = record.arg;
695
- this.method = "return";
696
- this.next = "end";
697
- } else if (record.type === "normal" && afterLoc) {
698
- this.next = afterLoc;
699
- }
700
-
701
- return ContinueSentinel;
702
- },
703
-
704
- finish: function(finallyLoc) {
705
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
706
- var entry = this.tryEntries[i];
707
- if (entry.finallyLoc === finallyLoc) {
708
- this.complete(entry.completion, entry.afterLoc);
709
- resetTryEntry(entry);
710
- return ContinueSentinel;
711
- }
712
- }
713
- },
714
-
715
- "catch": function(tryLoc) {
716
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
717
- var entry = this.tryEntries[i];
718
- if (entry.tryLoc === tryLoc) {
719
- var record = entry.completion;
720
- if (record.type === "throw") {
721
- var thrown = record.arg;
722
- resetTryEntry(entry);
723
- }
724
- return thrown;
725
- }
726
- }
727
-
728
- // The context.catch method must only be called with a location
729
- // argument that corresponds to a known catch block.
730
- throw new Error("illegal catch attempt");
731
- },
732
-
733
- delegateYield: function(iterable, resultName, nextLoc) {
734
- this.delegate = {
735
- iterator: values(iterable),
736
- resultName: resultName,
737
- nextLoc: nextLoc
738
- };
739
-
740
- if (this.method === "next") {
741
- // Deliberately forget the last sent value so that we don't
742
- // accidentally pass it on to the delegate.
743
- this.arg = undefined$1;
744
- }
745
-
746
- return ContinueSentinel;
747
- }
748
- };
749
-
750
- // Regardless of whether this script is executing as a CommonJS module
751
- // or not, return the runtime object so that we can declare the variable
752
- // regeneratorRuntime in the outer scope, which allows this module to be
753
- // injected easily by `bin/regenerator --include-runtime script.js`.
754
- return exports;
755
-
756
- }(
757
- // If this script is executing as a CommonJS module, use module.exports
758
- // as the regeneratorRuntime namespace. Otherwise create a new empty
759
- // object. Either way, the resulting object will be used to initialize
760
- // the regeneratorRuntime variable at the top of this file.
761
- module.exports
762
- ));
763
-
764
- try {
765
- regeneratorRuntime = runtime;
766
- } catch (accidentalStrictMode) {
767
- // This module should not be running in strict mode, so the above
768
- // assignment should always work unless something is misconfigured. Just
769
- // in case runtime.js accidentally runs in strict mode, we can escape
770
- // strict mode using a global Function call. This could conceivably fail
771
- // if a Content Security Policy forbids using Function, but in that case
772
- // the proper solution is to fix the accidental strict mode problem. If
773
- // you've misconfigured your bundler to force strict mode and applied a
774
- // CSP to forbid Function, and you're not willing to fix either of those
775
- // problems, please detail your unique predicament in a GitHub issue.
776
- Function("r", "regeneratorRuntime = r")(runtime);
777
- }
778
- });
779
-
780
- var regenerator = runtime_1;
781
-
782
- var arrayWithHoles = _commonjsHelpers.createCommonjsModule(function (module) {
783
- function _arrayWithHoles(arr) {
784
- if (Array.isArray(arr)) return arr;
785
- }
786
-
787
- module.exports = _arrayWithHoles;
788
- module.exports["default"] = module.exports, module.exports.__esModule = true;
789
- });
790
-
791
- _commonjsHelpers.unwrapExports(arrayWithHoles);
792
-
793
- var iterableToArrayLimit = _commonjsHelpers.createCommonjsModule(function (module) {
794
- function _iterableToArrayLimit(arr, i) {
795
- var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
796
-
797
- if (_i == null) return;
798
- var _arr = [];
799
- var _n = true;
800
- var _d = false;
801
-
802
- var _s, _e;
803
-
804
- try {
805
- for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
806
- _arr.push(_s.value);
807
-
808
- if (i && _arr.length === i) break;
809
- }
810
- } catch (err) {
811
- _d = true;
812
- _e = err;
813
- } finally {
814
- try {
815
- if (!_n && _i["return"] != null) _i["return"]();
816
- } finally {
817
- if (_d) throw _e;
818
- }
819
- }
820
-
821
- return _arr;
822
- }
823
-
824
- module.exports = _iterableToArrayLimit;
825
- module.exports["default"] = module.exports, module.exports.__esModule = true;
826
- });
827
-
828
- _commonjsHelpers.unwrapExports(iterableToArrayLimit);
829
-
830
- var arrayLikeToArray = _commonjsHelpers.createCommonjsModule(function (module) {
831
- function _arrayLikeToArray(arr, len) {
832
- if (len == null || len > arr.length) len = arr.length;
833
-
834
- for (var i = 0, arr2 = new Array(len); i < len; i++) {
835
- arr2[i] = arr[i];
836
- }
837
-
838
- return arr2;
839
- }
840
-
841
- module.exports = _arrayLikeToArray;
842
- module.exports["default"] = module.exports, module.exports.__esModule = true;
843
- });
844
-
845
- _commonjsHelpers.unwrapExports(arrayLikeToArray);
846
-
847
- var unsupportedIterableToArray = _commonjsHelpers.createCommonjsModule(function (module) {
848
- function _unsupportedIterableToArray(o, minLen) {
849
- if (!o) return;
850
- if (typeof o === "string") return arrayLikeToArray(o, minLen);
851
- var n = Object.prototype.toString.call(o).slice(8, -1);
852
- if (n === "Object" && o.constructor) n = o.constructor.name;
853
- if (n === "Map" || n === "Set") return Array.from(o);
854
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
855
- }
856
-
857
- module.exports = _unsupportedIterableToArray;
858
- module.exports["default"] = module.exports, module.exports.__esModule = true;
859
- });
860
-
861
- _commonjsHelpers.unwrapExports(unsupportedIterableToArray);
862
-
863
- var nonIterableRest = _commonjsHelpers.createCommonjsModule(function (module) {
864
- function _nonIterableRest() {
865
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
866
- }
867
-
868
- module.exports = _nonIterableRest;
869
- module.exports["default"] = module.exports, module.exports.__esModule = true;
870
- });
871
-
872
- _commonjsHelpers.unwrapExports(nonIterableRest);
873
-
874
- var slicedToArray = _commonjsHelpers.createCommonjsModule(function (module) {
875
- function _slicedToArray(arr, i) {
876
- return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
877
- }
878
-
879
- module.exports = _slicedToArray;
880
- module.exports["default"] = module.exports, module.exports.__esModule = true;
881
- });
882
-
883
- _commonjsHelpers.unwrapExports(slicedToArray);
884
13
 
885
14
  var logger = _commonjsHelpers.createCommonjsModule(function (module, exports) {
886
15
 
@@ -890,25 +19,39 @@ Object.defineProperty(exports, "__esModule", {
890
19
  exports.setLogger = setLogger;
891
20
  exports.proxyLogger = proxyLogger;
892
21
  exports.default = void 0;
893
- const _logger = {
894
- error(code, ...message) {
895
- console.error(`[next-auth][error][${code.toLowerCase()}]`, `\nhttps://next-auth.js.org/errors#${code.toLowerCase()}`, ...message);
22
+ var _logger = {
23
+ error(code) {
24
+ for (var _len = arguments.length, message = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
25
+ message[_key - 1] = arguments[_key];
26
+ }
27
+
28
+ console.error("[next-auth][error][".concat(code.toLowerCase(), "]"), "\nhttps://next-auth.js.org/errors#".concat(code.toLowerCase()), ...message);
896
29
  },
897
30
 
898
- warn(code, ...message) {
899
- console.warn(`[next-auth][warn][${code.toLowerCase()}]`, `\nhttps://next-auth.js.org/warnings#${code.toLowerCase()}`, ...message);
31
+ warn(code) {
32
+ for (var _len2 = arguments.length, message = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
33
+ message[_key2 - 1] = arguments[_key2];
34
+ }
35
+
36
+ console.warn("[next-auth][warn][".concat(code.toLowerCase(), "]"), "\nhttps://next-auth.js.org/warnings#".concat(code.toLowerCase()), ...message);
900
37
  },
901
38
 
902
- debug(code, ...message) {
39
+ debug(code) {
903
40
  var _process, _process$env;
904
41
 
905
42
  if (!((_process = process) !== null && _process !== void 0 && (_process$env = _process.env) !== null && _process$env !== void 0 && _process$env._NEXTAUTH_DEBUG)) return;
906
- console.log(`[next-auth][debug][${code.toLowerCase()}]`, ...message);
43
+
44
+ for (var _len3 = arguments.length, message = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
45
+ message[_key3 - 1] = arguments[_key3];
46
+ }
47
+
48
+ console.log("[next-auth][debug][".concat(code.toLowerCase(), "]"), ...message);
907
49
  }
908
50
 
909
51
  };
910
52
 
911
- function setLogger(newLogger = {}) {
53
+ function setLogger() {
54
+ var newLogger = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
912
55
  if (newLogger.error) _logger.error = newLogger.error;
913
56
  if (newLogger.warn) _logger.warn = newLogger.warn;
914
57
  if (newLogger.debug) _logger.debug = newLogger.debug;
@@ -917,20 +60,27 @@ function setLogger(newLogger = {}) {
917
60
  var _default = _logger;
918
61
  exports.default = _default;
919
62
 
920
- function proxyLogger(logger = _logger, basePath) {
63
+ function proxyLogger() {
64
+ var logger = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _logger;
65
+ var basePath = arguments.length > 1 ? arguments[1] : undefined;
66
+
921
67
  try {
922
- if (typeof window === "undefined") {
68
+ if (typeof window === 'undefined') {
923
69
  return logger;
924
70
  }
925
71
 
926
- const clientLogger = {};
72
+ var clientLogger = {};
73
+
74
+ var _loop = function _loop(level) {
75
+ clientLogger[level] = function (code) {
76
+ for (var _len4 = arguments.length, message = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
77
+ message[_key4 - 1] = arguments[_key4];
78
+ }
927
79
 
928
- for (const level in logger) {
929
- clientLogger[level] = (code, ...message) => {
930
80
  _logger[level](code, ...message);
931
81
 
932
- const url = `${basePath}/_log`;
933
- const body = new URLSearchParams({
82
+ var url = "".concat(basePath, "/_log");
83
+ var body = new URLSearchParams({
934
84
  level,
935
85
  code,
936
86
  message: JSON.stringify(message.map(m => {
@@ -951,13 +101,17 @@ function proxyLogger(logger = _logger, basePath) {
951
101
  }
952
102
 
953
103
  return fetch(url, {
954
- method: "POST",
104
+ method: 'POST',
955
105
  headers: {
956
- "Content-Type": "application/json"
106
+ 'Content-Type': 'application/json'
957
107
  },
958
108
  body
959
109
  });
960
110
  };
111
+ };
112
+
113
+ for (var level in logger) {
114
+ _loop(level);
961
115
  }
962
116
 
963
117
  return clientLogger;
@@ -968,8 +122,8 @@ function proxyLogger(logger = _logger, basePath) {
968
122
  });
969
123
 
970
124
  _commonjsHelpers.unwrapExports(logger);
971
- logger.setLogger;
972
- logger.proxyLogger;
125
+ var logger_1 = logger.setLogger;
126
+ var logger_2 = logger.proxyLogger;
973
127
 
974
128
  var parseUrl_1 = _commonjsHelpers.createCommonjsModule(function (module, exports) {
975
129
 
@@ -979,18 +133,18 @@ Object.defineProperty(exports, "__esModule", {
979
133
  exports.default = parseUrl;
980
134
 
981
135
  function parseUrl(url) {
982
- const defaultHost = 'http://localhost:3000';
983
- const defaultPath = '/api/auth';
136
+ var defaultHost = 'http://localhost:3000';
137
+ var defaultPath = '/api/auth';
984
138
 
985
139
  if (!url) {
986
- url = `${defaultHost}${defaultPath}`;
140
+ url = "".concat(defaultHost).concat(defaultPath);
987
141
  }
988
142
 
989
- const protocol = url.startsWith('http:') ? 'http' : 'https';
143
+ var protocol = url.startsWith('http:') ? 'http' : 'https';
990
144
  url = url.replace(/^https?:\/\//, '').replace(/\/$/, '');
991
- const [_host, ..._path] = url.split('/');
992
- const baseUrl = _host ? `${protocol}://${_host}` : defaultHost;
993
- const basePath = _path.length > 0 ? `/${_path.join('/')}` : defaultPath;
145
+ var [_host, ..._path] = url.split('/');
146
+ var baseUrl = _host ? "".concat(protocol, "://").concat(_host) : defaultHost;
147
+ var basePath = _path.length > 0 ? "/".concat(_path.join('/')) : defaultPath;
994
148
  return {
995
149
  baseUrl,
996
150
  basePath
@@ -1000,46 +154,41 @@ function parseUrl(url) {
1000
154
 
1001
155
  _commonjsHelpers.unwrapExports(parseUrl_1);
1002
156
 
1003
- var client$1 = _commonjsHelpers.createCommonjsModule(function (module, exports) {
1004
-
1005
-
1006
-
1007
-
157
+ var client = _commonjsHelpers.createCommonjsModule(function (module, exports) {
1008
158
 
1009
159
  Object.defineProperty(exports, "__esModule", {
1010
160
  value: true
1011
161
  });
1012
162
  exports.useSession = useSession;
1013
- exports.session = exports.getSession = getSession;
1014
- exports.csrfToken = exports.getCsrfToken = getCsrfToken;
1015
- exports.providers = exports.getProviders = getProviders;
1016
- exports.signin = exports.signIn = signIn;
1017
- exports.signout = exports.signOut = signOut;
1018
- exports.options = exports.setOptions = setOptions;
163
+ exports.getSession = getSession;
164
+ exports.getProviders = getProviders;
165
+ exports.signIn = signIn;
166
+ exports.signOut = signOut;
167
+ exports.setOptions = setOptions;
1019
168
  exports.Provider = Provider;
1020
169
  exports.default = void 0;
1021
170
 
1022
- var _regenerator = interopRequireDefault(regenerator);
1023
171
 
1024
- var _defineProperty2 = interopRequireDefault(defineProperty.defineProperty);
1025
172
 
1026
- var _asyncToGenerator2 = interopRequireDefault(defineProperty.asyncToGenerator);
173
+ var _logger2 = _interopRequireWildcard(logger);
1027
174
 
1028
- var _slicedToArray2 = interopRequireDefault(slicedToArray);
175
+ var _parseUrl = _interopRequireDefault(parseUrl_1);
1029
176
 
177
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1030
178
 
179
+ function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
1031
180
 
1032
- var _logger2 = _interopRequireWildcard(logger);
181
+ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
1033
182
 
1034
- var _parseUrl = interopRequireDefault(parseUrl_1);
183
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
1035
184
 
1036
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
185
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
1037
186
 
1038
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof._typeof_1(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
187
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1039
188
 
1040
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
189
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
1041
190
 
1042
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
191
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
1043
192
 
1044
193
  var __NEXTAUTH = {
1045
194
  baseUrl: (0, _parseUrl.default)(process.env.NEXTAUTH_URL || process.env.VERCEL_URL).baseUrl,
@@ -1052,131 +201,76 @@ var __NEXTAUTH = {
1052
201
  _clientSyncTimer: null,
1053
202
  _eventListenersAdded: false,
1054
203
  _clientSession: undefined,
1055
- _getSession: function _getSession() {}
204
+ _getSession: () => {}
1056
205
  };
1057
206
  var logger$1 = (0, _logger2.proxyLogger)(_logger2.default, __NEXTAUTH.basePath);
1058
207
  var broadcast = BroadcastChannel();
1059
208
 
1060
- if (typeof window !== "undefined" && !__NEXTAUTH._eventListenersAdded) {
209
+ if (typeof window !== 'undefined' && !__NEXTAUTH._eventListenersAdded) {
1061
210
  __NEXTAUTH._eventListenersAdded = true;
1062
- broadcast.receive(function () {
1063
- return __NEXTAUTH._getSession({
1064
- event: "storage"
1065
- });
1066
- });
1067
- document.addEventListener("visibilitychange", function () {
211
+ broadcast.receive(() => __NEXTAUTH._getSession({
212
+ event: 'storage'
213
+ }));
214
+ document.addEventListener('visibilitychange', () => {
1068
215
  !document.hidden && __NEXTAUTH._getSession({
1069
- event: "visibilitychange"
216
+ event: 'visibilitychange'
1070
217
  });
1071
218
  }, false);
1072
219
  }
1073
220
 
1074
- var SessionContext = (0, React__default['default'].createContext)();
221
+ var SessionContext = (0, React__default.createContext)();
1075
222
 
1076
223
  function useSession(session) {
1077
- var context = (0, React__default['default'].useContext)(SessionContext);
224
+ var context = (0, React__default.useContext)(SessionContext);
1078
225
  if (context) return context;
1079
226
  return _useSessionHook(session);
1080
227
  }
1081
228
 
1082
229
  function _useSessionHook(session) {
1083
- var _useState = (0, React__default['default'].useState)(session),
1084
- _useState2 = (0, _slicedToArray2.default)(_useState, 2),
1085
- data = _useState2[0],
1086
- setData = _useState2[1];
1087
-
1088
- var _useState3 = (0, React__default['default'].useState)(!data),
1089
- _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
1090
- loading = _useState4[0],
1091
- setLoading = _useState4[1];
1092
-
1093
- (0, React__default['default'].useEffect)(function () {
1094
- __NEXTAUTH._getSession = (0, _asyncToGenerator2.default)(_regenerator.default.mark(function _callee() {
1095
- var _ref2,
1096
- _ref2$event,
1097
- event,
1098
- triggredByEvent,
1099
- triggeredByStorageEvent,
1100
- clientMaxAge,
1101
- clientLastSync,
1102
- currentTime,
1103
- clientSession,
1104
- newClientSessionData,
1105
- _args = arguments;
1106
-
1107
- return _regenerator.default.wrap(function _callee$(_context) {
1108
- while (1) {
1109
- switch (_context.prev = _context.next) {
1110
- case 0:
1111
- _ref2 = _args.length > 0 && _args[0] !== undefined ? _args[0] : {}, _ref2$event = _ref2.event, event = _ref2$event === void 0 ? null : _ref2$event;
1112
- _context.prev = 1;
1113
- triggredByEvent = event !== null;
1114
- triggeredByStorageEvent = event === "storage";
1115
- clientMaxAge = __NEXTAUTH.clientMaxAge;
1116
- clientLastSync = parseInt(__NEXTAUTH._clientLastSync);
1117
- currentTime = _now();
1118
- clientSession = __NEXTAUTH._clientSession;
1119
-
1120
- if (!(!triggeredByStorageEvent && clientSession !== undefined)) {
1121
- _context.next = 19;
1122
- break;
1123
- }
1124
-
1125
- if (!(clientMaxAge === 0 && triggredByEvent !== true)) {
1126
- _context.next = 13;
1127
- break;
1128
- }
1129
-
1130
- return _context.abrupt("return");
1131
-
1132
- case 13:
1133
- if (!(clientMaxAge > 0 && clientSession === null)) {
1134
- _context.next = 17;
1135
- break;
1136
- }
1137
-
1138
- return _context.abrupt("return");
1139
-
1140
- case 17:
1141
- if (!(clientMaxAge > 0 && currentTime < clientLastSync + clientMaxAge)) {
1142
- _context.next = 19;
1143
- break;
1144
- }
1145
-
1146
- return _context.abrupt("return");
1147
-
1148
- case 19:
1149
- if (clientSession === undefined) {
1150
- __NEXTAUTH._clientSession = null;
1151
- }
1152
-
1153
- __NEXTAUTH._clientLastSync = _now();
1154
- _context.next = 23;
1155
- return getSession({
1156
- triggerEvent: !triggeredByStorageEvent
1157
- });
1158
-
1159
- case 23:
1160
- newClientSessionData = _context.sent;
1161
- __NEXTAUTH._clientSession = newClientSessionData;
1162
- setData(newClientSessionData);
1163
- setLoading(false);
1164
- _context.next = 33;
1165
- break;
1166
-
1167
- case 29:
1168
- _context.prev = 29;
1169
- _context.t0 = _context["catch"](1);
1170
- logger$1.error("CLIENT_USE_SESSION_ERROR", _context.t0);
1171
- setLoading(false);
1172
-
1173
- case 33:
1174
- case "end":
1175
- return _context.stop();
230
+ var [data, setData] = (0, React__default.useState)(session);
231
+ var [loading, setLoading] = (0, React__default.useState)(!data);
232
+ (0, React__default.useEffect)(() => {
233
+ __NEXTAUTH._getSession = _asyncToGenerator(function* () {
234
+ var {
235
+ event = null
236
+ } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
237
+
238
+ try {
239
+ var triggredByEvent = event !== null;
240
+ var triggeredByStorageEvent = event === 'storage';
241
+ var clientMaxAge = __NEXTAUTH.clientMaxAge;
242
+ var clientLastSync = parseInt(__NEXTAUTH._clientLastSync);
243
+
244
+ var currentTime = _now();
245
+
246
+ var clientSession = __NEXTAUTH._clientSession;
247
+
248
+ if (!triggeredByStorageEvent && clientSession !== undefined) {
249
+ if (clientMaxAge === 0 && triggredByEvent !== true) {
250
+ return;
251
+ } else if (clientMaxAge > 0 && clientSession === null) {
252
+ return;
253
+ } else if (clientMaxAge > 0 && currentTime < clientLastSync + clientMaxAge) {
254
+ return;
1176
255
  }
1177
256
  }
1178
- }, _callee, null, [[1, 29]]);
1179
- }));
257
+
258
+ if (clientSession === undefined) {
259
+ __NEXTAUTH._clientSession = null;
260
+ }
261
+
262
+ __NEXTAUTH._clientLastSync = _now();
263
+ var newClientSessionData = yield getSession({
264
+ triggerEvent: !triggeredByStorageEvent
265
+ });
266
+ __NEXTAUTH._clientSession = newClientSessionData;
267
+ setData(newClientSessionData);
268
+ setLoading(false);
269
+ } catch (error) {
270
+ logger$1.error('CLIENT_USE_SESSION_ERROR', error);
271
+ setLoading(false);
272
+ }
273
+ });
1180
274
 
1181
275
  __NEXTAUTH._getSession();
1182
276
  });
@@ -1188,38 +282,22 @@ function getSession(_x) {
1188
282
  }
1189
283
 
1190
284
  function _getSession2() {
1191
- _getSession2 = (0, _asyncToGenerator2.default)(_regenerator.default.mark(function _callee4(ctx) {
285
+ _getSession2 = _asyncToGenerator(function* (ctx) {
1192
286
  var _ctx$triggerEvent;
1193
287
 
1194
- var session;
1195
- return _regenerator.default.wrap(function _callee4$(_context4) {
1196
- while (1) {
1197
- switch (_context4.prev = _context4.next) {
1198
- case 0:
1199
- _context4.next = 2;
1200
- return _fetchData("session", ctx);
1201
-
1202
- case 2:
1203
- session = _context4.sent;
1204
-
1205
- if ((_ctx$triggerEvent = ctx === null || ctx === void 0 ? void 0 : ctx.triggerEvent) !== null && _ctx$triggerEvent !== void 0 ? _ctx$triggerEvent : true) {
1206
- broadcast.post({
1207
- event: "session",
1208
- data: {
1209
- trigger: "getSession"
1210
- }
1211
- });
1212
- }
1213
-
1214
- return _context4.abrupt("return", session);
288
+ var session = yield _fetchData('session', ctx);
1215
289
 
1216
- case 5:
1217
- case "end":
1218
- return _context4.stop();
290
+ if ((_ctx$triggerEvent = ctx === null || ctx === void 0 ? void 0 : ctx.triggerEvent) !== null && _ctx$triggerEvent !== void 0 ? _ctx$triggerEvent : true) {
291
+ broadcast.post({
292
+ event: 'session',
293
+ data: {
294
+ trigger: 'getSession'
1219
295
  }
1220
- }
1221
- }, _callee4);
1222
- }));
296
+ });
297
+ }
298
+
299
+ return session;
300
+ });
1223
301
  return _getSession2.apply(this, arguments);
1224
302
  }
1225
303
 
@@ -1228,50 +306,11 @@ function getCsrfToken(_x2) {
1228
306
  }
1229
307
 
1230
308
  function _getCsrfToken() {
1231
- _getCsrfToken = (0, _asyncToGenerator2.default)(_regenerator.default.mark(function _callee5(ctx) {
309
+ _getCsrfToken = _asyncToGenerator(function* (ctx) {
1232
310
  var _yield$_fetchData;
1233
311
 
1234
- return _regenerator.default.wrap(function _callee5$(_context5) {
1235
- while (1) {
1236
- switch (_context5.prev = _context5.next) {
1237
- case 0:
1238
- _context5.next = 2;
1239
- return _fetchData("csrf", ctx);
1240
-
1241
- case 2:
1242
- _context5.t1 = _yield$_fetchData = _context5.sent;
1243
- _context5.t0 = _context5.t1 === null;
1244
-
1245
- if (_context5.t0) {
1246
- _context5.next = 6;
1247
- break;
1248
- }
1249
-
1250
- _context5.t0 = _yield$_fetchData === void 0;
1251
-
1252
- case 6:
1253
- if (!_context5.t0) {
1254
- _context5.next = 10;
1255
- break;
1256
- }
1257
-
1258
- _context5.t2 = void 0;
1259
- _context5.next = 11;
1260
- break;
1261
-
1262
- case 10:
1263
- _context5.t2 = _yield$_fetchData.csrfToken;
1264
-
1265
- case 11:
1266
- return _context5.abrupt("return", _context5.t2);
1267
-
1268
- case 12:
1269
- case "end":
1270
- return _context5.stop();
1271
- }
1272
- }
1273
- }, _callee5);
1274
- }));
312
+ return (_yield$_fetchData = yield _fetchData('csrf', ctx)) === null || _yield$_fetchData === void 0 ? void 0 : _yield$_fetchData.csrfToken;
313
+ });
1275
314
  return _getCsrfToken.apply(this, arguments);
1276
315
  }
1277
316
 
@@ -1280,24 +319,9 @@ function getProviders() {
1280
319
  }
1281
320
 
1282
321
  function _getProviders() {
1283
- _getProviders = (0, _asyncToGenerator2.default)(_regenerator.default.mark(function _callee6() {
1284
- return _regenerator.default.wrap(function _callee6$(_context6) {
1285
- while (1) {
1286
- switch (_context6.prev = _context6.next) {
1287
- case 0:
1288
- _context6.next = 2;
1289
- return _fetchData("providers");
1290
-
1291
- case 2:
1292
- return _context6.abrupt("return", _context6.sent);
1293
-
1294
- case 3:
1295
- case "end":
1296
- return _context6.stop();
1297
- }
1298
- }
1299
- }, _callee6);
1300
- }));
322
+ _getProviders = _asyncToGenerator(function* () {
323
+ return _fetchData('providers');
324
+ });
1301
325
  return _getProviders.apply(this, arguments);
1302
326
  }
1303
327
 
@@ -1306,138 +330,68 @@ function signIn(_x3) {
1306
330
  }
1307
331
 
1308
332
  function _signIn() {
1309
- _signIn = (0, _asyncToGenerator2.default)(_regenerator.default.mark(function _callee7(provider) {
1310
- var options,
1311
- authorizationParams,
1312
- _options$callbackUrl,
333
+ _signIn = _asyncToGenerator(function* (provider) {
334
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
335
+ var authorizationParams = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
336
+ var {
337
+ callbackUrl = window.location,
338
+ redirect = true
339
+ } = options;
340
+
341
+ var baseUrl = _apiBaseUrl();
342
+
343
+ var providers = yield getProviders();
344
+
345
+ if (!(provider in providers)) {
346
+ window.location = "".concat(baseUrl, "/signin?callbackUrl=").concat(encodeURIComponent(callbackUrl));
347
+ return;
348
+ }
349
+
350
+ var isCredentials = providers[provider].type === 'credentials';
351
+ var isEmail = providers[provider].type === 'email';
352
+ var canRedirectBeDisabled = isCredentials || isEmail;
353
+ var signInUrl = isCredentials ? "".concat(baseUrl, "/callback/").concat(provider) : "".concat(baseUrl, "/signin/").concat(provider);
354
+ var fetchOptions = {
355
+ method: 'post',
356
+ headers: {
357
+ 'Content-Type': 'application/x-www-form-urlencoded'
358
+ },
359
+ body: new URLSearchParams(_objectSpread(_objectSpread({}, options), {}, {
360
+ csrfToken: yield getCsrfToken(),
1313
361
  callbackUrl,
1314
- _options$redirect,
1315
- redirect,
1316
- baseUrl,
1317
- providers,
1318
- isCredentials,
1319
- isEmail,
1320
- isSupportingReturn,
1321
- signInUrl,
1322
- _signInUrl,
1323
- res,
1324
- data,
1325
- _data$url,
1326
- url,
1327
- error,
1328
- _args7 = arguments;
1329
-
1330
- return _regenerator.default.wrap(function _callee7$(_context7) {
1331
- while (1) {
1332
- switch (_context7.prev = _context7.next) {
1333
- case 0:
1334
- options = _args7.length > 1 && _args7[1] !== undefined ? _args7[1] : {};
1335
- authorizationParams = _args7.length > 2 && _args7[2] !== undefined ? _args7[2] : {};
1336
- _options$callbackUrl = options.callbackUrl, callbackUrl = _options$callbackUrl === void 0 ? window.location.href : _options$callbackUrl, _options$redirect = options.redirect, redirect = _options$redirect === void 0 ? true : _options$redirect;
1337
- baseUrl = _apiBaseUrl();
1338
- _context7.next = 6;
1339
- return getProviders();
1340
-
1341
- case 6:
1342
- providers = _context7.sent;
1343
-
1344
- if (providers) {
1345
- _context7.next = 9;
1346
- break;
1347
- }
362
+ json: true
363
+ }))
364
+ };
1348
365
 
1349
- return _context7.abrupt("return", window.location.replace("".concat(baseUrl, "/error")));
366
+ var _signInUrl = "".concat(signInUrl, "?").concat(new URLSearchParams(authorizationParams));
1350
367
 
1351
- case 9:
1352
- if (provider in providers) {
1353
- _context7.next = 11;
1354
- break;
1355
- }
368
+ var res = yield fetch(_signInUrl, fetchOptions);
369
+ var data = yield res.json();
1356
370
 
1357
- return _context7.abrupt("return", window.location.replace("".concat(baseUrl, "/signin?callbackUrl=").concat(encodeURIComponent(callbackUrl))));
1358
-
1359
- case 11:
1360
- isCredentials = providers[provider].type === "credentials";
1361
- isEmail = providers[provider].type === "email";
1362
- isSupportingReturn = isCredentials || isEmail;
1363
- signInUrl = isCredentials ? "".concat(baseUrl, "/callback/").concat(provider) : "".concat(baseUrl, "/signin/").concat(provider);
1364
- _signInUrl = "".concat(signInUrl, "?").concat(new URLSearchParams(authorizationParams));
1365
- _context7.t0 = fetch;
1366
- _context7.t1 = _signInUrl;
1367
- _context7.t2 = {
1368
- "Content-Type": "application/x-www-form-urlencoded"
1369
- };
1370
- _context7.t3 = URLSearchParams;
1371
- _context7.t4 = _objectSpread;
1372
- _context7.t5 = _objectSpread({}, options);
1373
- _context7.t6 = {};
1374
- _context7.next = 25;
1375
- return getCsrfToken();
1376
-
1377
- case 25:
1378
- _context7.t7 = _context7.sent;
1379
- _context7.t8 = callbackUrl;
1380
- _context7.t9 = {
1381
- csrfToken: _context7.t7,
1382
- callbackUrl: _context7.t8,
1383
- json: true
1384
- };
1385
- _context7.t10 = (0, _context7.t4)(_context7.t5, _context7.t6, _context7.t9);
1386
- _context7.t11 = new _context7.t3(_context7.t10);
1387
- _context7.t12 = {
1388
- method: "post",
1389
- headers: _context7.t2,
1390
- body: _context7.t11
1391
- };
1392
- _context7.next = 33;
1393
- return (0, _context7.t0)(_context7.t1, _context7.t12);
1394
-
1395
- case 33:
1396
- res = _context7.sent;
1397
- _context7.next = 36;
1398
- return res.json();
1399
-
1400
- case 36:
1401
- data = _context7.sent;
1402
-
1403
- if (!(redirect || !isSupportingReturn)) {
1404
- _context7.next = 42;
1405
- break;
1406
- }
371
+ if (redirect || !canRedirectBeDisabled) {
372
+ var _data$url;
1407
373
 
1408
- url = (_data$url = data.url) !== null && _data$url !== void 0 ? _data$url : callbackUrl;
1409
- window.location.replace(url);
1410
- if (url.includes("#")) window.location.reload();
1411
- return _context7.abrupt("return");
374
+ var url = (_data$url = data.url) !== null && _data$url !== void 0 ? _data$url : callbackUrl;
375
+ window.location = url;
376
+ if (url.includes('#')) window.location.reload();
377
+ return;
378
+ }
1412
379
 
1413
- case 42:
1414
- error = new URL(data.url).searchParams.get("error");
380
+ var error = new URL(data.url).searchParams.get('error');
1415
381
 
1416
- if (!res.ok) {
1417
- _context7.next = 46;
1418
- break;
1419
- }
382
+ if (res.ok) {
383
+ yield __NEXTAUTH._getSession({
384
+ event: 'storage'
385
+ });
386
+ }
1420
387
 
1421
- _context7.next = 46;
1422
- return __NEXTAUTH._getSession({
1423
- event: "storage"
1424
- });
1425
-
1426
- case 46:
1427
- return _context7.abrupt("return", {
1428
- error: error,
1429
- status: res.status,
1430
- ok: res.ok,
1431
- url: error ? null : data.url
1432
- });
1433
-
1434
- case 47:
1435
- case "end":
1436
- return _context7.stop();
1437
- }
1438
- }
1439
- }, _callee7);
1440
- }));
388
+ return {
389
+ error,
390
+ status: res.status,
391
+ ok: res.ok,
392
+ url: error ? null : data.url
393
+ };
394
+ });
1441
395
  return _signIn.apply(this, arguments);
1442
396
  }
1443
397
 
@@ -1446,147 +400,88 @@ function signOut() {
1446
400
  }
1447
401
 
1448
402
  function _signOut() {
1449
- _signOut = (0, _asyncToGenerator2.default)(_regenerator.default.mark(function _callee8() {
1450
- var options,
1451
- _options$callbackUrl2,
403
+ _signOut = _asyncToGenerator(function* () {
404
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
405
+ var {
406
+ callbackUrl = window.location,
407
+ redirect = true
408
+ } = options;
409
+
410
+ var baseUrl = _apiBaseUrl();
411
+
412
+ var fetchOptions = {
413
+ method: 'post',
414
+ headers: {
415
+ 'Content-Type': 'application/x-www-form-urlencoded'
416
+ },
417
+ body: new URLSearchParams({
418
+ csrfToken: yield getCsrfToken(),
1452
419
  callbackUrl,
1453
- _options$redirect2,
1454
- redirect,
1455
- baseUrl,
1456
- fetchOptions,
1457
- res,
1458
- data,
1459
- _data$url2,
1460
- url,
1461
- _args8 = arguments;
1462
-
1463
- return _regenerator.default.wrap(function _callee8$(_context8) {
1464
- while (1) {
1465
- switch (_context8.prev = _context8.next) {
1466
- case 0:
1467
- options = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : {};
1468
- _options$callbackUrl2 = options.callbackUrl, callbackUrl = _options$callbackUrl2 === void 0 ? window.location.href : _options$callbackUrl2, _options$redirect2 = options.redirect, redirect = _options$redirect2 === void 0 ? true : _options$redirect2;
1469
- baseUrl = _apiBaseUrl();
1470
- _context8.t0 = {
1471
- "Content-Type": "application/x-www-form-urlencoded"
1472
- };
1473
- _context8.t1 = URLSearchParams;
1474
- _context8.next = 7;
1475
- return getCsrfToken();
1476
-
1477
- case 7:
1478
- _context8.t2 = _context8.sent;
1479
- _context8.t3 = callbackUrl;
1480
- _context8.t4 = {
1481
- csrfToken: _context8.t2,
1482
- callbackUrl: _context8.t3,
1483
- json: true
1484
- };
1485
- _context8.t5 = new _context8.t1(_context8.t4);
1486
- fetchOptions = {
1487
- method: "post",
1488
- headers: _context8.t0,
1489
- body: _context8.t5
1490
- };
1491
- _context8.next = 14;
1492
- return fetch("".concat(baseUrl, "/signout"), fetchOptions);
1493
-
1494
- case 14:
1495
- res = _context8.sent;
1496
- _context8.next = 17;
1497
- return res.json();
1498
-
1499
- case 17:
1500
- data = _context8.sent;
1501
- broadcast.post({
1502
- event: "session",
1503
- data: {
1504
- trigger: "signout"
1505
- }
1506
- });
1507
-
1508
- if (!redirect) {
1509
- _context8.next = 24;
1510
- break;
1511
- }
1512
-
1513
- url = (_data$url2 = data.url) !== null && _data$url2 !== void 0 ? _data$url2 : callbackUrl;
1514
- window.location.replace(url);
1515
- if (url.includes("#")) window.location.reload();
1516
- return _context8.abrupt("return");
420
+ json: true
421
+ })
422
+ };
423
+ var res = yield fetch("".concat(baseUrl, "/signout"), fetchOptions);
424
+ var data = yield res.json();
425
+ broadcast.post({
426
+ event: 'session',
427
+ data: {
428
+ trigger: 'signout'
429
+ }
430
+ });
1517
431
 
1518
- case 24:
1519
- _context8.next = 26;
1520
- return __NEXTAUTH._getSession({
1521
- event: "storage"
1522
- });
432
+ if (redirect) {
433
+ var _data$url2;
1523
434
 
1524
- case 26:
1525
- return _context8.abrupt("return", data);
435
+ var url = (_data$url2 = data.url) !== null && _data$url2 !== void 0 ? _data$url2 : callbackUrl;
436
+ window.location = url;
437
+ if (url.includes('#')) window.location.reload();
438
+ return;
439
+ }
1526
440
 
1527
- case 27:
1528
- case "end":
1529
- return _context8.stop();
1530
- }
1531
- }
1532
- }, _callee8);
1533
- }));
441
+ yield __NEXTAUTH._getSession({
442
+ event: 'storage'
443
+ });
444
+ return data;
445
+ });
1534
446
  return _signOut.apply(this, arguments);
1535
447
  }
1536
448
 
1537
449
  function setOptions() {
1538
- var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
1539
- baseUrl = _ref3.baseUrl,
1540
- basePath = _ref3.basePath,
1541
- clientMaxAge = _ref3.clientMaxAge,
1542
- keepAlive = _ref3.keepAlive;
1543
-
450
+ var {
451
+ baseUrl,
452
+ basePath,
453
+ clientMaxAge,
454
+ keepAlive
455
+ } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1544
456
  if (baseUrl) __NEXTAUTH.baseUrl = baseUrl;
1545
457
  if (basePath) __NEXTAUTH.basePath = basePath;
1546
458
  if (clientMaxAge) __NEXTAUTH.clientMaxAge = clientMaxAge;
1547
459
 
1548
460
  if (keepAlive) {
1549
461
  __NEXTAUTH.keepAlive = keepAlive;
1550
- if (typeof window === "undefined") return;
462
+ if (typeof window === 'undefined') return;
1551
463
 
1552
464
  if (__NEXTAUTH._clientSyncTimer !== null) {
1553
465
  clearTimeout(__NEXTAUTH._clientSyncTimer);
1554
466
  }
1555
467
 
1556
- __NEXTAUTH._clientSyncTimer = setTimeout((0, _asyncToGenerator2.default)(_regenerator.default.mark(function _callee2() {
1557
- return _regenerator.default.wrap(function _callee2$(_context2) {
1558
- while (1) {
1559
- switch (_context2.prev = _context2.next) {
1560
- case 0:
1561
- if (__NEXTAUTH._clientSession) {
1562
- _context2.next = 2;
1563
- break;
1564
- }
1565
-
1566
- return _context2.abrupt("return");
1567
-
1568
- case 2:
1569
- _context2.next = 4;
1570
- return __NEXTAUTH._getSession({
1571
- event: "timer"
1572
- });
1573
-
1574
- case 4:
1575
- case "end":
1576
- return _context2.stop();
1577
- }
1578
- }
1579
- }, _callee2);
1580
- })), keepAlive * 1000);
468
+ __NEXTAUTH._clientSyncTimer = setTimeout(_asyncToGenerator(function* () {
469
+ if (!__NEXTAUTH._clientSession) return;
470
+ yield __NEXTAUTH._getSession({
471
+ event: 'timer'
472
+ });
473
+ }), keepAlive * 1000);
1581
474
  }
1582
475
  }
1583
476
 
1584
- function Provider(_ref5) {
1585
- var children = _ref5.children,
1586
- session = _ref5.session,
1587
- options = _ref5.options;
477
+ function Provider(_ref3) {
478
+ var {
479
+ children,
480
+ session,
481
+ options
482
+ } = _ref3;
1588
483
  setOptions(options);
1589
- return (0, React__default['default'].createElement)(SessionContext.Provider, {
484
+ return (0, React__default.createElement)(SessionContext.Provider, {
1590
485
  value: useSession(session)
1591
486
  }, children);
1592
487
  }
@@ -1596,74 +491,34 @@ function _fetchData(_x4) {
1596
491
  }
1597
492
 
1598
493
  function _fetchData2() {
1599
- _fetchData2 = (0, _asyncToGenerator2.default)(_regenerator.default.mark(function _callee9(path) {
1600
- var _ref7,
1601
- ctx,
1602
- _ref7$req,
1603
- req,
1604
- baseUrl,
1605
- options,
1606
- res,
1607
- data,
1608
- _args9 = arguments;
1609
-
1610
- return _regenerator.default.wrap(function _callee9$(_context9) {
1611
- while (1) {
1612
- switch (_context9.prev = _context9.next) {
1613
- case 0:
1614
- _ref7 = _args9.length > 1 && _args9[1] !== undefined ? _args9[1] : {}, ctx = _ref7.ctx, _ref7$req = _ref7.req, req = _ref7$req === void 0 ? ctx === null || ctx === void 0 ? void 0 : ctx.req : _ref7$req;
1615
- _context9.prev = 1;
1616
- _context9.next = 4;
1617
- return _apiBaseUrl();
1618
-
1619
- case 4:
1620
- baseUrl = _context9.sent;
1621
- options = req ? {
1622
- headers: {
1623
- cookie: req.headers.cookie
1624
- }
1625
- } : {};
1626
- _context9.next = 8;
1627
- return fetch("".concat(baseUrl, "/").concat(path), options);
1628
-
1629
- case 8:
1630
- res = _context9.sent;
1631
- _context9.next = 11;
1632
- return res.json();
1633
-
1634
- case 11:
1635
- data = _context9.sent;
1636
-
1637
- if (res.ok) {
1638
- _context9.next = 14;
1639
- break;
1640
- }
1641
-
1642
- throw data;
1643
-
1644
- case 14:
1645
- return _context9.abrupt("return", Object.keys(data).length > 0 ? data : null);
494
+ _fetchData2 = _asyncToGenerator(function* (path) {
495
+ var {
496
+ ctx,
497
+ req = ctx === null || ctx === void 0 ? void 0 : ctx.req
498
+ } = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1646
499
 
1647
- case 17:
1648
- _context9.prev = 17;
1649
- _context9.t0 = _context9["catch"](1);
1650
- logger$1.error("CLIENT_FETCH_ERROR", path, _context9.t0);
1651
- return _context9.abrupt("return", null);
1652
-
1653
- case 21:
1654
- case "end":
1655
- return _context9.stop();
500
+ try {
501
+ var baseUrl = yield _apiBaseUrl();
502
+ var options = req ? {
503
+ headers: {
504
+ cookie: req.headers.cookie
1656
505
  }
1657
- }
1658
- }, _callee9, null, [[1, 17]]);
1659
- }));
506
+ } : {};
507
+ var res = yield fetch("".concat(baseUrl, "/").concat(path), options);
508
+ var data = yield res.json();
509
+ return Object.keys(data).length > 0 ? data : null;
510
+ } catch (error) {
511
+ logger$1.error('CLIENT_FETCH_ERROR', path, error);
512
+ return null;
513
+ }
514
+ });
1660
515
  return _fetchData2.apply(this, arguments);
1661
516
  }
1662
517
 
1663
518
  function _apiBaseUrl() {
1664
- if (typeof window === "undefined") {
519
+ if (typeof window === 'undefined') {
1665
520
  if (!process.env.NEXTAUTH_URL) {
1666
- logger$1.warn("NEXTAUTH_URL", "NEXTAUTH_URL environment variable not set");
521
+ logger$1.warn('NEXTAUTH_URL', 'NEXTAUTH_URL environment variable not set');
1667
522
  }
1668
523
 
1669
524
  return "".concat(__NEXTAUTH.baseUrlServer).concat(__NEXTAUTH.basePathServer);
@@ -1677,68 +532,43 @@ function _now() {
1677
532
  }
1678
533
 
1679
534
  function BroadcastChannel() {
1680
- var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "nextauth.message";
535
+ var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'nextauth.message';
1681
536
  return {
1682
- receive: function receive(onReceive) {
1683
- if (typeof window === "undefined") return;
1684
- window.addEventListener("storage", function () {
1685
- var _ref6 = (0, _asyncToGenerator2.default)(_regenerator.default.mark(function _callee3(event) {
1686
- var message;
1687
- return _regenerator.default.wrap(function _callee3$(_context3) {
1688
- while (1) {
1689
- switch (_context3.prev = _context3.next) {
1690
- case 0:
1691
- if (!(event.key !== name)) {
1692
- _context3.next = 2;
1693
- break;
1694
- }
1695
-
1696
- return _context3.abrupt("return");
1697
-
1698
- case 2:
1699
- message = JSON.parse(event.newValue);
1700
-
1701
- if (!((message === null || message === void 0 ? void 0 : message.event) !== "session" || !(message !== null && message !== void 0 && message.data))) {
1702
- _context3.next = 5;
1703
- break;
1704
- }
1705
-
1706
- return _context3.abrupt("return");
1707
-
1708
- case 5:
1709
- onReceive(message);
1710
-
1711
- case 6:
1712
- case "end":
1713
- return _context3.stop();
1714
- }
1715
- }
1716
- }, _callee3);
1717
- }));
537
+ receive(onReceive) {
538
+ if (typeof window === 'undefined') return;
539
+ window.addEventListener('storage', function () {
540
+ var _ref4 = _asyncToGenerator(function* (event) {
541
+ if (event.key !== name) return;
542
+ var message = JSON.parse(event.newValue);
543
+ if ((message === null || message === void 0 ? void 0 : message.event) !== 'session' || !(message !== null && message !== void 0 && message.data)) return;
544
+ onReceive(message);
545
+ });
1718
546
 
1719
547
  return function (_x5) {
1720
- return _ref6.apply(this, arguments);
548
+ return _ref4.apply(this, arguments);
1721
549
  };
1722
550
  }());
1723
551
  },
1724
- post: function post(message) {
1725
- if (typeof localStorage === "undefined") return;
552
+
553
+ post(message) {
554
+ if (typeof localStorage === 'undefined') return;
1726
555
  localStorage.setItem(name, JSON.stringify(_objectSpread(_objectSpread({}, message), {}, {
1727
556
  timestamp: _now()
1728
557
  })));
1729
558
  }
559
+
1730
560
  };
1731
561
  }
1732
562
 
1733
563
  var _default = {
1734
- getSession: getSession,
1735
- getCsrfToken: getCsrfToken,
1736
- getProviders: getProviders,
1737
- useSession: useSession,
1738
- signIn: signIn,
1739
- signOut: signOut,
1740
- Provider: Provider,
1741
- setOptions: setOptions,
564
+ getSession,
565
+ getCsrfToken,
566
+ getProviders,
567
+ useSession,
568
+ signIn,
569
+ signOut,
570
+ Provider,
571
+ setOptions,
1742
572
  options: setOptions,
1743
573
  session: getSession,
1744
574
  providers: getProviders,
@@ -1749,23 +579,16 @@ var _default = {
1749
579
  exports.default = _default;
1750
580
  });
1751
581
 
1752
- _commonjsHelpers.unwrapExports(client$1);
1753
- client$1.useSession;
1754
- client$1.session;
1755
- client$1.getSession;
1756
- client$1.csrfToken;
1757
- client$1.getCsrfToken;
1758
- client$1.providers;
1759
- client$1.getProviders;
1760
- client$1.signin;
1761
- client$1.signIn;
1762
- client$1.signout;
1763
- client$1.signOut;
1764
- client$1.options;
1765
- client$1.setOptions;
1766
- client$1.Provider;
1767
-
1768
- var client = client$1.default;
582
+ _commonjsHelpers.unwrapExports(client);
583
+ var client_1 = client.useSession;
584
+ var client_2 = client.getSession;
585
+ var client_3 = client.getProviders;
586
+ var client_4 = client.signIn;
587
+ var client_5 = client.signOut;
588
+ var client_6 = client.setOptions;
589
+ var client_7 = client.Provider;
590
+
591
+ var client$1 = client.default;
1769
592
 
1770
593
  var css = ".AuthWrapper-module_loginBox__3l-BE {\n margin-bottom: 2rem;\n width: 350px;\n max-width: 90vw;\n margin-left: auto;\n margin-right: auto;\n /* box-shadow: 2px 5px 12px rgba(0, 0, 0, 0.15); */\n background: #fff;\n z-index: 1;\n}\n.AuthWrapper-module_loginBox_title__12rGD {\n margin-bottom: 2rem;\n text-align: center;\n}\n.AuthWrapper-module_bar__1dafn {\n background: #eee;\n margin-left: unset;\n margin-right: unset;\n}\n.AuthWrapper-module_bar__1dafn:nth-child(1) {\n float: left;\n border-right: 1rem solid #fff;\n background: rgb(245, 245, 245);\n height: 10rem;\n width: 25%;\n margin-left: auto;\n margin-right: auto;\n margin-bottom: 2rem;\n}\n.AuthWrapper-module_bar__1dafn:nth-child(2n) {\n width: 97%;\n height: 1.5rem;\n margin-bottom: 0.25rem;\n}\n.AuthWrapper-module_bar__1dafn.AuthWrapper-module_bar__1dafn:nth-child(3n) {\n width: 96%;\n height: 1.5rem;\n margin-bottom: 1.5rem;\n}\n.AuthWrapper-module_bar__1dafn.AuthWrapper-module_bar__1dafn:nth-child(4n) {\n width: 72%;\n height: 1.5rem;\n margin-bottom: 0.25rem;\n}\n.AuthWrapper-module_bar__1dafn.AuthWrapper-module_bar__1dafn:nth-child(5n) {\n width: 88%;\n height: 1.5rem;\n margin-bottom: 0.25rem;\n}\n\n.AuthWrapper-module_iframe__2wDJW {\n margin-top: -3rem;\n border: none;\n width: 100%;\n height: 1900px;\n}";
1771
594
  var styles = { "loginBox": "AuthWrapper-module_loginBox__3l-BE", "loginBox_title": "AuthWrapper-module_loginBox_title__12rGD", "bar": "AuthWrapper-module_bar__1dafn", "iframe": "AuthWrapper-module_iframe__2wDJW" };
@@ -1777,28 +600,28 @@ var AuthWrapper = function AuthWrapper(_ref) {
1777
600
  _ref$formUrl = _ref.formUrl,
1778
601
  formUrl = _ref$formUrl === undefined ? '' : _ref$formUrl;
1779
602
 
1780
- var _nextAuth$useSession = client.useSession(),
1781
- _nextAuth$useSession2 = slicedToArray$1._slicedToArray(_nextAuth$useSession, 2),
603
+ var _nextAuth$useSession = client$1.useSession(),
604
+ _nextAuth$useSession2 = slicedToArray._slicedToArray(_nextAuth$useSession, 2),
1782
605
  session = _nextAuth$useSession2[0],
1783
606
  loading = _nextAuth$useSession2[1];
1784
607
 
1785
608
  var _useState = React.useState(null),
1786
- _useState2 = slicedToArray$1._slicedToArray(_useState, 2),
609
+ _useState2 = slicedToArray._slicedToArray(_useState, 2),
1787
610
  callbackUrl = _useState2[0],
1788
611
  setCallbackUrl = _useState2[1];
1789
612
 
1790
613
  var _useState3 = React.useState(),
1791
- _useState4 = slicedToArray$1._slicedToArray(_useState3, 2),
614
+ _useState4 = slicedToArray._slicedToArray(_useState3, 2),
1792
615
  email = _useState4[0],
1793
616
  setEmail = _useState4[1];
1794
617
 
1795
618
  var _useState5 = React.useState(false),
1796
- _useState6 = slicedToArray$1._slicedToArray(_useState5, 2),
619
+ _useState6 = slicedToArray._slicedToArray(_useState5, 2),
1797
620
  showForm = _useState6[0],
1798
621
  setShowForm = _useState6[1];
1799
622
 
1800
623
  var _useState7 = React.useState(),
1801
- _useState8 = slicedToArray$1._slicedToArray(_useState7, 2),
624
+ _useState8 = slicedToArray._slicedToArray(_useState7, 2),
1802
625
  password = _useState8[0],
1803
626
  setPassword = _useState8[1];
1804
627
 
@@ -1807,7 +630,7 @@ var AuthWrapper = function AuthWrapper(_ref) {
1807
630
  }, []);
1808
631
 
1809
632
  if (session || !needAuth) {
1810
- return React__default['default'].createElement(
633
+ return React__default.createElement(
1811
634
  'div',
1812
635
  null,
1813
636
  children
@@ -1815,55 +638,55 @@ var AuthWrapper = function AuthWrapper(_ref) {
1815
638
  }
1816
639
 
1817
640
  if (!loading) {
1818
- return React__default['default'].createElement(
641
+ return React__default.createElement(
1819
642
  'div',
1820
643
  { style: { position: 'relative', minHeight: '300px', paddingTop: '2rem' } },
1821
- callbackUrl && React__default['default'].createElement(
644
+ callbackUrl && React__default.createElement(
1822
645
  'div',
1823
646
  null,
1824
- !showForm && React__default['default'].createElement(
647
+ !showForm && React__default.createElement(
1825
648
  'div',
1826
649
  { className: styles.loginBox },
1827
- React__default['default'].createElement(
650
+ React__default.createElement(
1828
651
  'div',
1829
652
  { className: styles.loginBox_title },
1830
- React__default['default'].createElement(
653
+ React__default.createElement(
1831
654
  'b',
1832
655
  null,
1833
656
  'Please log in to view this content.'
1834
657
  )
1835
658
  ),
1836
- React__default['default'].createElement(
659
+ React__default.createElement(
1837
660
  reactBootstrap.Form,
1838
661
  { onSubmit: function onSubmit(e) {
1839
662
  return e.preventDefault();
1840
663
  } },
1841
- React__default['default'].createElement(
664
+ React__default.createElement(
1842
665
  reactBootstrap.Form.Group,
1843
666
  { controlId: 'email' },
1844
- React__default['default'].createElement(reactBootstrap.Form.Control, { type: 'email', onChange: function onChange(e) {
667
+ React__default.createElement(reactBootstrap.Form.Control, { type: 'email', onChange: function onChange(e) {
1845
668
  return setEmail(e.target.value);
1846
669
  }, placeholder: 'Email' })
1847
670
  ),
1848
- React__default['default'].createElement(
671
+ React__default.createElement(
1849
672
  reactBootstrap.Form.Group,
1850
673
  { controlId: 'password' },
1851
- React__default['default'].createElement(reactBootstrap.Form.Control, { type: 'password', onChange: function onChange(e) {
674
+ React__default.createElement(reactBootstrap.Form.Control, { type: 'password', onChange: function onChange(e) {
1852
675
  return setPassword(e.target.value);
1853
676
  }, placeholder: 'Password' })
1854
677
  ),
1855
- React__default['default'].createElement(
678
+ React__default.createElement(
1856
679
  'button',
1857
680
  { className: 'btn btn-primary btn-block', onClick: function onClick() {
1858
- return client.signIn('credentials', { email: email, password: password, callbackUrl: callbackUrl });
681
+ return client$1.signIn('credentials', { email: email, password: password, callbackUrl: callbackUrl });
1859
682
  } },
1860
683
  'Sign in'
1861
684
  )
1862
685
  ),
1863
- React__default['default'].createElement(
686
+ React__default.createElement(
1864
687
  'button',
1865
688
  { className: 'btn btn-primary btn-block mt-3' },
1866
- React__default['default'].createElement(
689
+ React__default.createElement(
1867
690
  'a',
1868
691
  { style: { textDecoration: 'underline' }, onClick: function onClick() {
1869
692
  return setShowForm(!showForm);
@@ -1871,13 +694,13 @@ var AuthWrapper = function AuthWrapper(_ref) {
1871
694
  'Register Now'
1872
695
  )
1873
696
  ),
1874
- React__default['default'].createElement(
697
+ React__default.createElement(
1875
698
  'p',
1876
699
  { className: 'mt-1', style: { fontSize: '.8em', textAlign: 'center' } },
1877
- React__default['default'].createElement(
700
+ React__default.createElement(
1878
701
  'em',
1879
702
  null,
1880
- React__default['default'].createElement(
703
+ React__default.createElement(
1881
704
  'a',
1882
705
  { href: '/forgotpassword', style: { color: 'blue', textDecoration: 'underline' } },
1883
706
  'Forgot your password? '
@@ -1885,7 +708,7 @@ var AuthWrapper = function AuthWrapper(_ref) {
1885
708
  )
1886
709
  )
1887
710
  ),
1888
- showForm && React__default['default'].createElement('iframe', { className: styles.iframe, src: formUrl })
711
+ showForm && React__default.createElement('iframe', { className: styles.iframe, src: formUrl })
1889
712
  )
1890
713
  );
1891
714
  } else {