@mjhls/mjh-framework 1.0.840-beta.0 → 1.0.840-seomanager-v1

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