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