@mjhls/mjh-framework 1.0.790 → 1.0.791-auth-test
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 +170 -170
- package/dist/cjs/AD.js +1 -1
- package/dist/cjs/AD300x250.js +15 -15
- package/dist/cjs/AD300x250x600.js +15 -15
- package/dist/cjs/AD728x90.js +16 -16
- package/dist/cjs/ADFloatingFooter.js +14 -14
- package/dist/cjs/ADFooter.js +5 -5
- package/dist/cjs/ADGutter.js +14 -14
- package/dist/cjs/{ADInfeed-1e53d7db.js → ADInfeed-e7aecdf9.js} +1 -1
- package/dist/cjs/ADSkyscraper.js +14 -14
- package/dist/cjs/ADSponsoredResources.js +14 -14
- package/dist/cjs/ADWebcast.js +14 -14
- package/dist/cjs/ADWelcome.js +14 -14
- package/dist/cjs/{ADlgInfeed-2494fd17.js → ADlgInfeed-0941023e.js} +1 -1
- package/dist/cjs/AccordionPanel.js +5 -5
- package/dist/cjs/AdSlot.js +16 -16
- package/dist/cjs/AdSlotsProvider.js +10 -10
- package/dist/cjs/AlphabeticList.js +9 -9
- package/dist/cjs/ArticleCarousel.js +11 -11
- package/dist/cjs/ArticleProgramLandingPage.js +25 -25
- package/dist/cjs/ArticleSeriesLandingPage.js +24 -24
- package/dist/cjs/ArticleSeriesListing.js +17 -17
- package/dist/cjs/Auth.js +206 -468
- package/dist/cjs/AuthWrapper.js +2948 -0
- package/dist/cjs/{AuthorComponent-5fa89df5.js → AuthorComponent-c21aac7f.js} +1 -1
- package/dist/cjs/Beam.js +7 -7
- package/dist/cjs/{BlockContent-eca358e4.js → BlockContent-36e54d77.js} +34 -34
- package/dist/cjs/Breadcrumbs.js +5 -5
- package/dist/cjs/CMEDeck.js +14 -14
- package/dist/cjs/Column2.js +11 -11
- package/dist/cjs/Column3.js +20 -20
- package/dist/cjs/ConferenceArticleCard.js +16 -16
- package/dist/cjs/DeckContent.js +31 -31
- package/dist/cjs/DeckQueue.js +21 -21
- package/dist/cjs/{Dfp-6d140494.js → Dfp-3f0ed4c8.js} +8 -8
- package/dist/cjs/EventsDeck.js +36 -36
- package/dist/cjs/ExternalResources.js +26 -26
- package/dist/cjs/Feature.js +3 -3
- package/dist/cjs/ForbesHero.js +7 -7
- package/dist/cjs/GridContent.js +30 -30
- package/dist/cjs/GridHero.js +7 -7
- package/dist/cjs/GroupDeck.js +9 -9
- package/dist/cjs/HamMagazine.js +21 -21
- package/dist/cjs/Hero.js +1 -1
- package/dist/cjs/HorizontalArticleListing.js +25 -25
- package/dist/cjs/HorizontalHero.js +1 -1
- package/dist/cjs/IssueContentDeck.js +7 -7
- package/dist/cjs/IssueDeck.js +10 -10
- package/dist/cjs/IssueLanding.js +49 -49
- package/dist/cjs/KMTracker.js +15 -15
- package/dist/cjs/LeftNav.js +14 -14
- package/dist/cjs/MasterDeck.js +32 -32
- package/dist/cjs/MediaSeriesLanding.js +409 -400
- package/dist/cjs/NavDvm.js +7 -7
- package/dist/cjs/NavMagazine.js +21 -21
- package/dist/cjs/NavNative.js +26 -26
- package/dist/cjs/NavNormal.js +7 -7
- package/dist/cjs/OncliveHero.js +1 -1
- package/dist/cjs/OncliveLargeHero.js +7 -7
- package/dist/cjs/PageFilter.js +5 -5
- package/dist/cjs/PartnerDetailListing.js +29 -29
- package/dist/cjs/PopUpModal.js +5 -5
- package/dist/cjs/PubSection.js +20 -20
- package/dist/cjs/PubToc.js +7 -7
- package/dist/cjs/PublicationDeck.js +2 -2
- package/dist/cjs/PublicationLanding.js +49 -49
- package/dist/cjs/QueueDeckExpanded.js +22 -22
- package/dist/cjs/RecentNews.js +1 -1
- package/dist/cjs/RelatedContent.js +29 -29
- package/dist/cjs/RelatedTopicsDropdown.js +10 -10
- package/dist/cjs/Search.js +5 -5
- package/dist/cjs/Segment.js +6 -6
- package/dist/cjs/SeriesListingDeck.js +12 -12
- package/dist/cjs/{SeriesSlider-49577417.js → SeriesSlider-c022ce04.js} +12 -12
- package/dist/cjs/SideFooter.js +13 -13
- package/dist/cjs/{SocialSearchComponent-45c54bed.js → SocialSearchComponent-31afe61f.js} +6 -6
- package/dist/cjs/TaxonomyCard.js +5 -5
- package/dist/cjs/TaxonomyDescription.js +25 -25
- package/dist/cjs/TemplateNormal.js +19 -19
- package/dist/cjs/ThumbnailCard.js +1 -1
- package/dist/cjs/Ustream.js +7 -7
- package/dist/cjs/VerticalHero.js +1 -1
- package/dist/cjs/VideoProgramLandingPage.js +25 -25
- package/dist/cjs/VideoSeriesCard.js +8 -8
- package/dist/cjs/VideoSeriesFilter.js +7 -7
- package/dist/cjs/VideoSeriesLandingPage.js +24 -24
- package/dist/cjs/VideoSeriesListing.js +17 -17
- package/dist/cjs/View.js +40 -40
- package/dist/cjs/YahooHero.js +7 -7
- package/dist/cjs/YoutubeGroup.js +19 -19
- package/dist/cjs/{_is-array-63ae4740.js → _is-array-6128bd56.js} +1 -1
- package/dist/cjs/{_iter-detect-2613ffa1.js → _iter-detect-55a5657a.js} +8 -8
- package/dist/cjs/{_object-pie-68c5bcbc.js → _object-pie-083f2dd6.js} +4 -4
- package/dist/cjs/{_object-sap-c5bd707d.js → _object-sap-a175b4a9.js} +1 -1
- package/dist/cjs/{_object-to-array-bec5fcf2.js → _object-to-array-8fe5a54f.js} +2 -2
- package/dist/cjs/{_to-object-821a2927.js → _to-object-6de10e57.js} +4 -4
- package/dist/cjs/{asyncToGenerator-b6a175bf.js → asyncToGenerator-58c289d9.js} +30 -30
- package/dist/cjs/{core.get-iterator-method-b4615fd3.js → core.get-iterator-method-f474eacc.js} +2 -2
- package/dist/cjs/{debounce-529c8d06.js → debounce-d4a2369b.js} +2 -2
- package/dist/cjs/{define-property-aff11f8a.js → define-property-c88be878.js} +6 -6
- package/dist/cjs/{defineProperty-d6fbb280.js → defineProperty-0cb76d99.js} +1 -1
- package/dist/cjs/empty-7d04c64b.js +5 -0
- package/dist/cjs/{eq-bb2843ed.js → eq-5fc26c07.js} +1 -1
- package/dist/cjs/{es6.string.iterator-20d42c53.js → es6.string.iterator-c2573ffd.js} +5 -5
- package/dist/cjs/{extends-1e24fc8d.js → extends-29bdbc6d.js} +8 -7
- package/dist/cjs/faundadb.js +1637 -0
- package/dist/cjs/{get-adbb11e3.js → get-5839e5b5.js} +21 -21
- package/dist/cjs/getRelatedArticle.js +11 -9
- package/dist/cjs/getRootDocGroup.js +6 -6
- package/dist/cjs/getSerializers.js +25 -25
- package/dist/cjs/{getTargeting-497b581d.js → getTargeting-45b91c88.js} +11 -11
- package/dist/cjs/getTargeting.js +8 -8
- package/dist/cjs/{index-d450e2d5.js → index-d9eab30b.js} +341 -92
- package/dist/cjs/{index-d48b231c.js → index-efca863c.js} +5 -5
- package/dist/cjs/{index-4d74ffd6.js → index-f86bb269.js} +4 -4
- package/dist/cjs/index.js +37 -37
- package/dist/cjs/{inherits-2eb23889.js → inherits-c2065b95.js} +22 -19
- package/dist/cjs/inheritsLoose-b17eb2a8.js +18 -0
- package/dist/cjs/{isSymbol-04666465.js → isSymbol-03abbdf0.js} +15 -15
- package/dist/cjs/keys-7f2c2108.js +25 -0
- package/dist/cjs/{lodash-4ef21f0f.js → lodash-f0783643.js} +57 -9
- package/dist/cjs/{main-dc082238.js → main-025fdc78.js} +184 -109
- package/dist/cjs/{slicedToArray-db24842a.js → slicedToArray-5d1bc3b3.js} +14 -14
- package/dist/cjs/stringify-c9ac1214.js +17 -0
- package/dist/cjs/{toConsumableArray-cf0865fc.js → toConsumableArray-ddb70795.js} +9 -9
- package/dist/cjs/{toNumber-36d1e7e5.js → toNumber-5e1fac58.js} +40 -5
- package/dist/cjs/{typeof-97065d40.js → typeof-88a668c5.js} +34 -34
- package/dist/cjs/urlFor.js +1 -1
- package/dist/cjs/{web.dom.iterable-4480325a.js → web.dom.iterable-46657b5c.js} +2 -2
- package/dist/esm/AD.js +1 -1
- package/dist/esm/AD300x250.js +15 -15
- package/dist/esm/AD300x250x600.js +15 -15
- package/dist/esm/AD728x90.js +16 -16
- package/dist/esm/ADFloatingFooter.js +14 -14
- package/dist/esm/ADFooter.js +5 -5
- package/dist/esm/ADGutter.js +14 -14
- package/dist/esm/{ADInfeed-94817c40.js → ADInfeed-e1e18f87.js} +1 -1
- package/dist/esm/ADSkyscraper.js +14 -14
- package/dist/esm/ADSponsoredResources.js +14 -14
- package/dist/esm/ADWebcast.js +14 -14
- package/dist/esm/ADWelcome.js +14 -14
- package/dist/esm/{ADlgInfeed-6124ee3c.js → ADlgInfeed-c6d2831b.js} +1 -1
- package/dist/esm/AccordionPanel.js +5 -5
- package/dist/esm/AdSlot.js +16 -16
- package/dist/esm/AdSlotsProvider.js +10 -10
- package/dist/esm/AlphabeticList.js +9 -9
- package/dist/esm/ArticleCarousel.js +11 -11
- package/dist/esm/ArticleProgramLandingPage.js +25 -25
- package/dist/esm/ArticleSeriesLandingPage.js +24 -24
- package/dist/esm/ArticleSeriesListing.js +17 -17
- package/dist/esm/Auth.js +207 -469
- package/dist/esm/AuthWrapper.js +2942 -0
- package/dist/esm/{AuthorComponent-c7ff069f.js → AuthorComponent-5ae7409f.js} +1 -1
- package/dist/esm/Beam.js +7 -7
- package/dist/esm/{BlockContent-d8cd739c.js → BlockContent-52cf21c5.js} +34 -34
- package/dist/esm/Breadcrumbs.js +5 -5
- package/dist/esm/CMEDeck.js +14 -14
- package/dist/esm/Column2.js +11 -11
- package/dist/esm/Column3.js +20 -20
- package/dist/esm/ConferenceArticleCard.js +16 -16
- package/dist/esm/DeckContent.js +31 -31
- package/dist/esm/DeckQueue.js +21 -21
- package/dist/esm/{Dfp-313e4ebe.js → Dfp-a304d96c.js} +8 -8
- package/dist/esm/EventsDeck.js +36 -36
- package/dist/esm/ExternalResources.js +26 -26
- package/dist/esm/Feature.js +3 -3
- package/dist/esm/ForbesHero.js +7 -7
- package/dist/esm/GridContent.js +30 -30
- package/dist/esm/GridHero.js +7 -7
- package/dist/esm/GroupDeck.js +9 -9
- package/dist/esm/HamMagazine.js +21 -21
- package/dist/esm/Hero.js +1 -1
- package/dist/esm/HorizontalArticleListing.js +25 -25
- package/dist/esm/HorizontalHero.js +1 -1
- package/dist/esm/IssueContentDeck.js +7 -7
- package/dist/esm/IssueDeck.js +10 -10
- package/dist/esm/IssueLanding.js +49 -49
- package/dist/esm/KMTracker.js +15 -15
- package/dist/esm/LeftNav.js +14 -14
- package/dist/esm/MasterDeck.js +32 -32
- package/dist/esm/MediaSeriesLanding.js +405 -396
- package/dist/esm/NavDvm.js +7 -7
- package/dist/esm/NavMagazine.js +21 -21
- package/dist/esm/NavNative.js +26 -26
- package/dist/esm/NavNormal.js +7 -7
- package/dist/esm/OncliveHero.js +1 -1
- package/dist/esm/OncliveLargeHero.js +7 -7
- package/dist/esm/PageFilter.js +5 -5
- package/dist/esm/PartnerDetailListing.js +29 -29
- package/dist/esm/PopUpModal.js +5 -5
- package/dist/esm/PubSection.js +20 -20
- package/dist/esm/PubToc.js +7 -7
- package/dist/esm/PublicationDeck.js +2 -2
- package/dist/esm/PublicationLanding.js +49 -49
- package/dist/esm/QueueDeckExpanded.js +22 -22
- package/dist/esm/RecentNews.js +1 -1
- package/dist/esm/RelatedContent.js +29 -29
- package/dist/esm/RelatedTopicsDropdown.js +10 -10
- package/dist/esm/Search.js +5 -5
- package/dist/esm/Segment.js +6 -6
- package/dist/esm/SeriesListingDeck.js +12 -12
- package/dist/esm/{SeriesSlider-291e1c9e.js → SeriesSlider-8414085b.js} +12 -12
- package/dist/esm/SideFooter.js +13 -13
- package/dist/esm/{SocialSearchComponent-c3216d1a.js → SocialSearchComponent-116b1d5d.js} +6 -6
- package/dist/esm/TaxonomyCard.js +5 -5
- package/dist/esm/TaxonomyDescription.js +25 -25
- package/dist/esm/TemplateNormal.js +19 -19
- package/dist/esm/ThumbnailCard.js +1 -1
- package/dist/esm/Ustream.js +7 -7
- package/dist/esm/VerticalHero.js +1 -1
- package/dist/esm/VideoProgramLandingPage.js +25 -25
- package/dist/esm/VideoSeriesCard.js +8 -8
- package/dist/esm/VideoSeriesFilter.js +7 -7
- package/dist/esm/VideoSeriesLandingPage.js +24 -24
- package/dist/esm/VideoSeriesListing.js +17 -17
- package/dist/esm/View.js +40 -40
- package/dist/esm/YahooHero.js +7 -7
- package/dist/esm/YoutubeGroup.js +19 -19
- package/dist/esm/{_is-array-674f71ec.js → _is-array-3e99e06e.js} +1 -1
- package/dist/esm/{_iter-detect-48516cd3.js → _iter-detect-7e5e5ce2.js} +8 -8
- package/dist/esm/{_object-pie-33c40e79.js → _object-pie-133f504a.js} +4 -4
- package/dist/esm/{_object-sap-fd3054d0.js → _object-sap-f353c2a9.js} +1 -1
- package/dist/esm/{_object-to-array-8f409e54.js → _object-to-array-0f197f89.js} +2 -2
- package/dist/esm/{_to-object-97770c52.js → _to-object-b50e61c3.js} +4 -4
- package/dist/esm/{asyncToGenerator-585841c0.js → asyncToGenerator-7f8f9219.js} +30 -30
- package/dist/esm/{core.get-iterator-method-d1d5ed02.js → core.get-iterator-method-133dfacd.js} +2 -2
- package/dist/esm/{debounce-9207d8ee.js → debounce-533d9748.js} +2 -2
- package/dist/esm/{define-property-ec6d528d.js → define-property-fe54dc9f.js} +6 -6
- package/dist/esm/{defineProperty-ea516b15.js → defineProperty-f5ff6f5a.js} +1 -1
- package/dist/esm/empty-81a1dbdc.js +3 -0
- package/dist/esm/{eq-b470f743.js → eq-bdcbf886.js} +1 -1
- package/dist/esm/{es6.string.iterator-aa6068a3.js → es6.string.iterator-bc33758b.js} +5 -5
- package/dist/esm/{extends-31d65aba.js → extends-60e0e1c6.js} +8 -8
- package/dist/esm/faundadb.js +1631 -0
- package/dist/esm/{get-1e515072.js → get-3c308da4.js} +21 -21
- package/dist/esm/getRelatedArticle.js +11 -9
- package/dist/esm/getRootDocGroup.js +6 -6
- package/dist/esm/getSerializers.js +25 -25
- package/dist/esm/{getTargeting-2d402d66.js → getTargeting-d0d71a56.js} +11 -11
- package/dist/esm/getTargeting.js +8 -8
- package/dist/esm/{index-3f5c03b2.js → index-0dbff1d1.js} +5 -5
- package/dist/esm/{index-f4fe5a50.js → index-20026f92.js} +340 -90
- package/dist/esm/{index-ccb770c7.js → index-79cfd25c.js} +4 -4
- package/dist/esm/index.js +37 -37
- package/dist/esm/{inherits-5906fbea.js → inherits-a41fe93f.js} +20 -20
- package/dist/esm/inheritsLoose-8f901617.js +16 -0
- package/dist/esm/{isSymbol-1981418f.js → isSymbol-a7e9aafe.js} +15 -15
- package/dist/esm/{keys-a0b0c7a4.js → keys-7a3adabf.js} +6 -6
- package/dist/esm/{lodash-ad27652f.js → lodash-f97fd99a.js} +57 -9
- package/dist/esm/{main-1450d277.js → main-b5c5aac1.js} +178 -103
- package/dist/esm/{slicedToArray-cdeaee08.js → slicedToArray-be2f7a22.js} +14 -14
- package/dist/esm/stringify-59c8f690.js +15 -0
- package/dist/esm/{toConsumableArray-fa2dcda7.js → toConsumableArray-6d9a4616.js} +9 -9
- package/dist/esm/{toNumber-2f7a84cd.js → toNumber-5aeba6e7.js} +40 -5
- package/dist/esm/{typeof-e9cea9e8.js → typeof-a286cf0c.js} +34 -34
- package/dist/esm/urlFor.js +1 -1
- package/dist/esm/{web.dom.iterable-035980f3.js → web.dom.iterable-4109ff68.js} +2 -2
- package/package.json +111 -108
- package/dist/cjs/keys-95c064c9.js +0 -25
- package/dist/cjs/stringify-01cf47f7.js +0 -17
- package/dist/esm/stringify-d4839bab.js +0 -15
|
@@ -0,0 +1,2948 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var slicedToArray = require('./slicedToArray-5d1bc3b3.js');
|
|
4
|
+
var _commonjsHelpers = require('./_commonjsHelpers-06173234.js');
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var reactBootstrap = require('react-bootstrap');
|
|
7
|
+
var inheritsLoose = require('./inheritsLoose-b17eb2a8.js');
|
|
8
|
+
var styleInject_es = require('./style-inject.es-dcee06b6.js');
|
|
9
|
+
require('./web.dom.iterable-46657b5c.js');
|
|
10
|
+
require('./es6.string.iterator-c2573ffd.js');
|
|
11
|
+
require('./_to-object-6de10e57.js');
|
|
12
|
+
require('./core.get-iterator-method-f474eacc.js');
|
|
13
|
+
|
|
14
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
15
|
+
|
|
16
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
17
|
+
|
|
18
|
+
var logger = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
19
|
+
|
|
20
|
+
Object.defineProperty(exports, "__esModule", {
|
|
21
|
+
value: true
|
|
22
|
+
});
|
|
23
|
+
exports.setLogger = setLogger;
|
|
24
|
+
exports.proxyLogger = proxyLogger;
|
|
25
|
+
exports.default = void 0;
|
|
26
|
+
var _logger = {
|
|
27
|
+
error(code) {
|
|
28
|
+
for (var _len = arguments.length, message = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
29
|
+
message[_key - 1] = arguments[_key];
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
console.error("[next-auth][error][".concat(code.toLowerCase(), "]"), "\nhttps://next-auth.js.org/errors#".concat(code.toLowerCase()), ...message);
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
warn(code) {
|
|
36
|
+
for (var _len2 = arguments.length, message = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
37
|
+
message[_key2 - 1] = arguments[_key2];
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
console.warn("[next-auth][warn][".concat(code.toLowerCase(), "]"), "\nhttps://next-auth.js.org/warnings#".concat(code.toLowerCase()), ...message);
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
debug(code) {
|
|
44
|
+
var _process, _process$env;
|
|
45
|
+
|
|
46
|
+
if (!((_process = process) !== null && _process !== void 0 && (_process$env = _process.env) !== null && _process$env !== void 0 && _process$env._NEXTAUTH_DEBUG)) return;
|
|
47
|
+
|
|
48
|
+
for (var _len3 = arguments.length, message = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
|
|
49
|
+
message[_key3 - 1] = arguments[_key3];
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
console.log("[next-auth][debug][".concat(code.toLowerCase(), "]"), ...message);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
function setLogger() {
|
|
58
|
+
var newLogger = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
59
|
+
if (newLogger.error) _logger.error = newLogger.error;
|
|
60
|
+
if (newLogger.warn) _logger.warn = newLogger.warn;
|
|
61
|
+
if (newLogger.debug) _logger.debug = newLogger.debug;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
var _default = _logger;
|
|
65
|
+
exports.default = _default;
|
|
66
|
+
|
|
67
|
+
function proxyLogger() {
|
|
68
|
+
var logger = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _logger;
|
|
69
|
+
var basePath = arguments.length > 1 ? arguments[1] : undefined;
|
|
70
|
+
|
|
71
|
+
try {
|
|
72
|
+
if (typeof window === 'undefined') {
|
|
73
|
+
return logger;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
var clientLogger = {};
|
|
77
|
+
|
|
78
|
+
var _loop = function _loop(level) {
|
|
79
|
+
clientLogger[level] = function (code) {
|
|
80
|
+
for (var _len4 = arguments.length, message = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
|
|
81
|
+
message[_key4 - 1] = arguments[_key4];
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
_logger[level](code, ...message);
|
|
85
|
+
|
|
86
|
+
var url = "".concat(basePath, "/_log");
|
|
87
|
+
var body = new URLSearchParams({
|
|
88
|
+
level,
|
|
89
|
+
code,
|
|
90
|
+
message: JSON.stringify(message.map(m => {
|
|
91
|
+
if (m instanceof Error) {
|
|
92
|
+
return {
|
|
93
|
+
name: m.name,
|
|
94
|
+
message: m.message,
|
|
95
|
+
stack: m.stack
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
return m;
|
|
100
|
+
}))
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
if (navigator.sendBeacon) {
|
|
104
|
+
return navigator.sendBeacon(url, body);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
return fetch(url, {
|
|
108
|
+
method: 'POST',
|
|
109
|
+
headers: {
|
|
110
|
+
'Content-Type': 'application/json'
|
|
111
|
+
},
|
|
112
|
+
body
|
|
113
|
+
});
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
for (var level in logger) {
|
|
118
|
+
_loop(level);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
return clientLogger;
|
|
122
|
+
} catch (_unused) {
|
|
123
|
+
return _logger;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
_commonjsHelpers.unwrapExports(logger);
|
|
129
|
+
logger.setLogger;
|
|
130
|
+
logger.proxyLogger;
|
|
131
|
+
|
|
132
|
+
var parseUrl_1 = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
133
|
+
|
|
134
|
+
Object.defineProperty(exports, "__esModule", {
|
|
135
|
+
value: true
|
|
136
|
+
});
|
|
137
|
+
exports.default = parseUrl;
|
|
138
|
+
|
|
139
|
+
function parseUrl(url) {
|
|
140
|
+
var defaultHost = 'http://localhost:3000';
|
|
141
|
+
var defaultPath = '/api/auth';
|
|
142
|
+
|
|
143
|
+
if (!url) {
|
|
144
|
+
url = "".concat(defaultHost).concat(defaultPath);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
var protocol = url.startsWith('http:') ? 'http' : 'https';
|
|
148
|
+
url = url.replace(/^https?:\/\//, '').replace(/\/$/, '');
|
|
149
|
+
var [_host, ..._path] = url.split('/');
|
|
150
|
+
var baseUrl = _host ? "".concat(protocol, "://").concat(_host) : defaultHost;
|
|
151
|
+
var basePath = _path.length > 0 ? "/".concat(_path.join('/')) : defaultPath;
|
|
152
|
+
return {
|
|
153
|
+
baseUrl,
|
|
154
|
+
basePath
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
_commonjsHelpers.unwrapExports(parseUrl_1);
|
|
160
|
+
|
|
161
|
+
var client$1 = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
162
|
+
|
|
163
|
+
Object.defineProperty(exports, "__esModule", {
|
|
164
|
+
value: true
|
|
165
|
+
});
|
|
166
|
+
exports.useSession = useSession;
|
|
167
|
+
exports.getSession = getSession;
|
|
168
|
+
exports.getProviders = getProviders;
|
|
169
|
+
exports.signIn = signIn;
|
|
170
|
+
exports.signOut = signOut;
|
|
171
|
+
exports.setOptions = setOptions;
|
|
172
|
+
exports.Provider = Provider;
|
|
173
|
+
exports.default = void 0;
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
var _logger2 = _interopRequireWildcard(logger);
|
|
178
|
+
|
|
179
|
+
var _parseUrl = _interopRequireDefault(parseUrl_1);
|
|
180
|
+
|
|
181
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
182
|
+
|
|
183
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
184
|
+
|
|
185
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
186
|
+
|
|
187
|
+
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; }
|
|
188
|
+
|
|
189
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
190
|
+
|
|
191
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
192
|
+
|
|
193
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
194
|
+
|
|
195
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
196
|
+
|
|
197
|
+
var __NEXTAUTH = {
|
|
198
|
+
baseUrl: (0, _parseUrl.default)(process.env.NEXTAUTH_URL || process.env.VERCEL_URL).baseUrl,
|
|
199
|
+
basePath: (0, _parseUrl.default)(process.env.NEXTAUTH_URL).basePath,
|
|
200
|
+
baseUrlServer: (0, _parseUrl.default)(process.env.NEXTAUTH_URL_INTERNAL || process.env.NEXTAUTH_URL || process.env.VERCEL_URL).baseUrl,
|
|
201
|
+
basePathServer: (0, _parseUrl.default)(process.env.NEXTAUTH_URL_INTERNAL || process.env.NEXTAUTH_URL).basePath,
|
|
202
|
+
keepAlive: 0,
|
|
203
|
+
clientMaxAge: 0,
|
|
204
|
+
_clientLastSync: 0,
|
|
205
|
+
_clientSyncTimer: null,
|
|
206
|
+
_eventListenersAdded: false,
|
|
207
|
+
_clientSession: undefined,
|
|
208
|
+
_getSession: () => {}
|
|
209
|
+
};
|
|
210
|
+
var logger$1 = (0, _logger2.proxyLogger)(_logger2.default, __NEXTAUTH.basePath);
|
|
211
|
+
var broadcast = BroadcastChannel();
|
|
212
|
+
|
|
213
|
+
if (typeof window !== 'undefined' && !__NEXTAUTH._eventListenersAdded) {
|
|
214
|
+
__NEXTAUTH._eventListenersAdded = true;
|
|
215
|
+
broadcast.receive(() => __NEXTAUTH._getSession({
|
|
216
|
+
event: 'storage'
|
|
217
|
+
}));
|
|
218
|
+
document.addEventListener('visibilitychange', () => {
|
|
219
|
+
!document.hidden && __NEXTAUTH._getSession({
|
|
220
|
+
event: 'visibilitychange'
|
|
221
|
+
});
|
|
222
|
+
}, false);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
var SessionContext = (0, React__default['default'].createContext)();
|
|
226
|
+
|
|
227
|
+
function useSession(session) {
|
|
228
|
+
var context = (0, React__default['default'].useContext)(SessionContext);
|
|
229
|
+
if (context) return context;
|
|
230
|
+
return _useSessionHook(session);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
function _useSessionHook(session) {
|
|
234
|
+
var [data, setData] = (0, React__default['default'].useState)(session);
|
|
235
|
+
var [loading, setLoading] = (0, React__default['default'].useState)(!data);
|
|
236
|
+
(0, React__default['default'].useEffect)(() => {
|
|
237
|
+
__NEXTAUTH._getSession = _asyncToGenerator(function* () {
|
|
238
|
+
var {
|
|
239
|
+
event = null
|
|
240
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
241
|
+
|
|
242
|
+
try {
|
|
243
|
+
var triggredByEvent = event !== null;
|
|
244
|
+
var triggeredByStorageEvent = event === 'storage';
|
|
245
|
+
var clientMaxAge = __NEXTAUTH.clientMaxAge;
|
|
246
|
+
var clientLastSync = parseInt(__NEXTAUTH._clientLastSync);
|
|
247
|
+
|
|
248
|
+
var currentTime = _now();
|
|
249
|
+
|
|
250
|
+
var clientSession = __NEXTAUTH._clientSession;
|
|
251
|
+
|
|
252
|
+
if (!triggeredByStorageEvent && clientSession !== undefined) {
|
|
253
|
+
if (clientMaxAge === 0 && triggredByEvent !== true) {
|
|
254
|
+
return;
|
|
255
|
+
} else if (clientMaxAge > 0 && clientSession === null) {
|
|
256
|
+
return;
|
|
257
|
+
} else if (clientMaxAge > 0 && currentTime < clientLastSync + clientMaxAge) {
|
|
258
|
+
return;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
if (clientSession === undefined) {
|
|
263
|
+
__NEXTAUTH._clientSession = null;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
__NEXTAUTH._clientLastSync = _now();
|
|
267
|
+
var newClientSessionData = yield getSession({
|
|
268
|
+
triggerEvent: !triggeredByStorageEvent
|
|
269
|
+
});
|
|
270
|
+
__NEXTAUTH._clientSession = newClientSessionData;
|
|
271
|
+
setData(newClientSessionData);
|
|
272
|
+
setLoading(false);
|
|
273
|
+
} catch (error) {
|
|
274
|
+
logger$1.error('CLIENT_USE_SESSION_ERROR', error);
|
|
275
|
+
setLoading(false);
|
|
276
|
+
}
|
|
277
|
+
});
|
|
278
|
+
|
|
279
|
+
__NEXTAUTH._getSession();
|
|
280
|
+
});
|
|
281
|
+
return [data, loading];
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
function getSession(_x) {
|
|
285
|
+
return _getSession2.apply(this, arguments);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
function _getSession2() {
|
|
289
|
+
_getSession2 = _asyncToGenerator(function* (ctx) {
|
|
290
|
+
var _ctx$triggerEvent;
|
|
291
|
+
|
|
292
|
+
var session = yield _fetchData('session', ctx);
|
|
293
|
+
|
|
294
|
+
if ((_ctx$triggerEvent = ctx === null || ctx === void 0 ? void 0 : ctx.triggerEvent) !== null && _ctx$triggerEvent !== void 0 ? _ctx$triggerEvent : true) {
|
|
295
|
+
broadcast.post({
|
|
296
|
+
event: 'session',
|
|
297
|
+
data: {
|
|
298
|
+
trigger: 'getSession'
|
|
299
|
+
}
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
return session;
|
|
304
|
+
});
|
|
305
|
+
return _getSession2.apply(this, arguments);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
function getCsrfToken(_x2) {
|
|
309
|
+
return _getCsrfToken.apply(this, arguments);
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
function _getCsrfToken() {
|
|
313
|
+
_getCsrfToken = _asyncToGenerator(function* (ctx) {
|
|
314
|
+
var _yield$_fetchData;
|
|
315
|
+
|
|
316
|
+
return (_yield$_fetchData = yield _fetchData('csrf', ctx)) === null || _yield$_fetchData === void 0 ? void 0 : _yield$_fetchData.csrfToken;
|
|
317
|
+
});
|
|
318
|
+
return _getCsrfToken.apply(this, arguments);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
function getProviders() {
|
|
322
|
+
return _getProviders.apply(this, arguments);
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
function _getProviders() {
|
|
326
|
+
_getProviders = _asyncToGenerator(function* () {
|
|
327
|
+
return _fetchData('providers');
|
|
328
|
+
});
|
|
329
|
+
return _getProviders.apply(this, arguments);
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
function signIn(_x3) {
|
|
333
|
+
return _signIn.apply(this, arguments);
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
function _signIn() {
|
|
337
|
+
_signIn = _asyncToGenerator(function* (provider) {
|
|
338
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
339
|
+
var authorizationParams = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
340
|
+
var {
|
|
341
|
+
callbackUrl = window.location,
|
|
342
|
+
redirect = true
|
|
343
|
+
} = options;
|
|
344
|
+
|
|
345
|
+
var baseUrl = _apiBaseUrl();
|
|
346
|
+
|
|
347
|
+
var providers = yield getProviders();
|
|
348
|
+
|
|
349
|
+
if (!(provider in providers)) {
|
|
350
|
+
window.location = "".concat(baseUrl, "/signin?callbackUrl=").concat(encodeURIComponent(callbackUrl));
|
|
351
|
+
return;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
var isCredentials = providers[provider].type === 'credentials';
|
|
355
|
+
var isEmail = providers[provider].type === 'email';
|
|
356
|
+
var canRedirectBeDisabled = isCredentials || isEmail;
|
|
357
|
+
var signInUrl = isCredentials ? "".concat(baseUrl, "/callback/").concat(provider) : "".concat(baseUrl, "/signin/").concat(provider);
|
|
358
|
+
var fetchOptions = {
|
|
359
|
+
method: 'post',
|
|
360
|
+
headers: {
|
|
361
|
+
'Content-Type': 'application/x-www-form-urlencoded'
|
|
362
|
+
},
|
|
363
|
+
body: new URLSearchParams(_objectSpread(_objectSpread({}, options), {}, {
|
|
364
|
+
csrfToken: yield getCsrfToken(),
|
|
365
|
+
callbackUrl,
|
|
366
|
+
json: true
|
|
367
|
+
}))
|
|
368
|
+
};
|
|
369
|
+
|
|
370
|
+
var _signInUrl = "".concat(signInUrl, "?").concat(new URLSearchParams(authorizationParams));
|
|
371
|
+
|
|
372
|
+
var res = yield fetch(_signInUrl, fetchOptions);
|
|
373
|
+
var data = yield res.json();
|
|
374
|
+
|
|
375
|
+
if (redirect || !canRedirectBeDisabled) {
|
|
376
|
+
var _data$url;
|
|
377
|
+
|
|
378
|
+
var url = (_data$url = data.url) !== null && _data$url !== void 0 ? _data$url : callbackUrl;
|
|
379
|
+
window.location = url;
|
|
380
|
+
if (url.includes('#')) window.location.reload();
|
|
381
|
+
return;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
var error = new URL(data.url).searchParams.get('error');
|
|
385
|
+
|
|
386
|
+
if (res.ok) {
|
|
387
|
+
yield __NEXTAUTH._getSession({
|
|
388
|
+
event: 'storage'
|
|
389
|
+
});
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
return {
|
|
393
|
+
error,
|
|
394
|
+
status: res.status,
|
|
395
|
+
ok: res.ok,
|
|
396
|
+
url: error ? null : data.url
|
|
397
|
+
};
|
|
398
|
+
});
|
|
399
|
+
return _signIn.apply(this, arguments);
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
function signOut() {
|
|
403
|
+
return _signOut.apply(this, arguments);
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
function _signOut() {
|
|
407
|
+
_signOut = _asyncToGenerator(function* () {
|
|
408
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
409
|
+
var {
|
|
410
|
+
callbackUrl = window.location,
|
|
411
|
+
redirect = true
|
|
412
|
+
} = options;
|
|
413
|
+
|
|
414
|
+
var baseUrl = _apiBaseUrl();
|
|
415
|
+
|
|
416
|
+
var fetchOptions = {
|
|
417
|
+
method: 'post',
|
|
418
|
+
headers: {
|
|
419
|
+
'Content-Type': 'application/x-www-form-urlencoded'
|
|
420
|
+
},
|
|
421
|
+
body: new URLSearchParams({
|
|
422
|
+
csrfToken: yield getCsrfToken(),
|
|
423
|
+
callbackUrl,
|
|
424
|
+
json: true
|
|
425
|
+
})
|
|
426
|
+
};
|
|
427
|
+
var res = yield fetch("".concat(baseUrl, "/signout"), fetchOptions);
|
|
428
|
+
var data = yield res.json();
|
|
429
|
+
broadcast.post({
|
|
430
|
+
event: 'session',
|
|
431
|
+
data: {
|
|
432
|
+
trigger: 'signout'
|
|
433
|
+
}
|
|
434
|
+
});
|
|
435
|
+
|
|
436
|
+
if (redirect) {
|
|
437
|
+
var _data$url2;
|
|
438
|
+
|
|
439
|
+
var url = (_data$url2 = data.url) !== null && _data$url2 !== void 0 ? _data$url2 : callbackUrl;
|
|
440
|
+
window.location = url;
|
|
441
|
+
if (url.includes('#')) window.location.reload();
|
|
442
|
+
return;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
yield __NEXTAUTH._getSession({
|
|
446
|
+
event: 'storage'
|
|
447
|
+
});
|
|
448
|
+
return data;
|
|
449
|
+
});
|
|
450
|
+
return _signOut.apply(this, arguments);
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
function setOptions() {
|
|
454
|
+
var {
|
|
455
|
+
baseUrl,
|
|
456
|
+
basePath,
|
|
457
|
+
clientMaxAge,
|
|
458
|
+
keepAlive
|
|
459
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
460
|
+
if (baseUrl) __NEXTAUTH.baseUrl = baseUrl;
|
|
461
|
+
if (basePath) __NEXTAUTH.basePath = basePath;
|
|
462
|
+
if (clientMaxAge) __NEXTAUTH.clientMaxAge = clientMaxAge;
|
|
463
|
+
|
|
464
|
+
if (keepAlive) {
|
|
465
|
+
__NEXTAUTH.keepAlive = keepAlive;
|
|
466
|
+
if (typeof window === 'undefined') return;
|
|
467
|
+
|
|
468
|
+
if (__NEXTAUTH._clientSyncTimer !== null) {
|
|
469
|
+
clearTimeout(__NEXTAUTH._clientSyncTimer);
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
__NEXTAUTH._clientSyncTimer = setTimeout(_asyncToGenerator(function* () {
|
|
473
|
+
if (!__NEXTAUTH._clientSession) return;
|
|
474
|
+
yield __NEXTAUTH._getSession({
|
|
475
|
+
event: 'timer'
|
|
476
|
+
});
|
|
477
|
+
}), keepAlive * 1000);
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
function Provider(_ref3) {
|
|
482
|
+
var {
|
|
483
|
+
children,
|
|
484
|
+
session,
|
|
485
|
+
options
|
|
486
|
+
} = _ref3;
|
|
487
|
+
setOptions(options);
|
|
488
|
+
return (0, React__default['default'].createElement)(SessionContext.Provider, {
|
|
489
|
+
value: useSession(session)
|
|
490
|
+
}, children);
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
function _fetchData(_x4) {
|
|
494
|
+
return _fetchData2.apply(this, arguments);
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
function _fetchData2() {
|
|
498
|
+
_fetchData2 = _asyncToGenerator(function* (path) {
|
|
499
|
+
var {
|
|
500
|
+
ctx,
|
|
501
|
+
req = ctx === null || ctx === void 0 ? void 0 : ctx.req
|
|
502
|
+
} = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
503
|
+
|
|
504
|
+
try {
|
|
505
|
+
var baseUrl = yield _apiBaseUrl();
|
|
506
|
+
var options = req ? {
|
|
507
|
+
headers: {
|
|
508
|
+
cookie: req.headers.cookie
|
|
509
|
+
}
|
|
510
|
+
} : {};
|
|
511
|
+
var res = yield fetch("".concat(baseUrl, "/").concat(path), options);
|
|
512
|
+
var data = yield res.json();
|
|
513
|
+
return Object.keys(data).length > 0 ? data : null;
|
|
514
|
+
} catch (error) {
|
|
515
|
+
logger$1.error('CLIENT_FETCH_ERROR', path, error);
|
|
516
|
+
return null;
|
|
517
|
+
}
|
|
518
|
+
});
|
|
519
|
+
return _fetchData2.apply(this, arguments);
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
function _apiBaseUrl() {
|
|
523
|
+
if (typeof window === 'undefined') {
|
|
524
|
+
if (!process.env.NEXTAUTH_URL) {
|
|
525
|
+
logger$1.warn('NEXTAUTH_URL', 'NEXTAUTH_URL environment variable not set');
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
return "".concat(__NEXTAUTH.baseUrlServer).concat(__NEXTAUTH.basePathServer);
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
return __NEXTAUTH.basePath;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
function _now() {
|
|
535
|
+
return Math.floor(Date.now() / 1000);
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
function BroadcastChannel() {
|
|
539
|
+
var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'nextauth.message';
|
|
540
|
+
return {
|
|
541
|
+
receive(onReceive) {
|
|
542
|
+
if (typeof window === 'undefined') return;
|
|
543
|
+
window.addEventListener('storage', function () {
|
|
544
|
+
var _ref4 = _asyncToGenerator(function* (event) {
|
|
545
|
+
if (event.key !== name) return;
|
|
546
|
+
var message = JSON.parse(event.newValue);
|
|
547
|
+
if ((message === null || message === void 0 ? void 0 : message.event) !== 'session' || !(message !== null && message !== void 0 && message.data)) return;
|
|
548
|
+
onReceive(message);
|
|
549
|
+
});
|
|
550
|
+
|
|
551
|
+
return function (_x5) {
|
|
552
|
+
return _ref4.apply(this, arguments);
|
|
553
|
+
};
|
|
554
|
+
}());
|
|
555
|
+
},
|
|
556
|
+
|
|
557
|
+
post(message) {
|
|
558
|
+
if (typeof localStorage === 'undefined') return;
|
|
559
|
+
localStorage.setItem(name, JSON.stringify(_objectSpread(_objectSpread({}, message), {}, {
|
|
560
|
+
timestamp: _now()
|
|
561
|
+
})));
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
};
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
var _default = {
|
|
568
|
+
getSession,
|
|
569
|
+
getCsrfToken,
|
|
570
|
+
getProviders,
|
|
571
|
+
useSession,
|
|
572
|
+
signIn,
|
|
573
|
+
signOut,
|
|
574
|
+
Provider,
|
|
575
|
+
setOptions,
|
|
576
|
+
options: setOptions,
|
|
577
|
+
session: getSession,
|
|
578
|
+
providers: getProviders,
|
|
579
|
+
csrfToken: getCsrfToken,
|
|
580
|
+
signin: signIn,
|
|
581
|
+
signout: signOut
|
|
582
|
+
};
|
|
583
|
+
exports.default = _default;
|
|
584
|
+
});
|
|
585
|
+
|
|
586
|
+
_commonjsHelpers.unwrapExports(client$1);
|
|
587
|
+
client$1.useSession;
|
|
588
|
+
client$1.getSession;
|
|
589
|
+
client$1.getProviders;
|
|
590
|
+
client$1.signIn;
|
|
591
|
+
client$1.signOut;
|
|
592
|
+
client$1.setOptions;
|
|
593
|
+
client$1.Provider;
|
|
594
|
+
|
|
595
|
+
var client = client$1.default;
|
|
596
|
+
|
|
597
|
+
/*
|
|
598
|
+
|
|
599
|
+
Based off glamor's StyleSheet, thanks Sunil ❤️
|
|
600
|
+
|
|
601
|
+
high performance StyleSheet for css-in-js systems
|
|
602
|
+
|
|
603
|
+
- uses multiple style tags behind the scenes for millions of rules
|
|
604
|
+
- uses `insertRule` for appending in production for *much* faster performance
|
|
605
|
+
|
|
606
|
+
// usage
|
|
607
|
+
|
|
608
|
+
import { StyleSheet } from '@emotion/sheet'
|
|
609
|
+
|
|
610
|
+
let styleSheet = new StyleSheet({ key: '', container: document.head })
|
|
611
|
+
|
|
612
|
+
styleSheet.insert('#box { border: 1px solid red; }')
|
|
613
|
+
- appends a css rule into the stylesheet
|
|
614
|
+
|
|
615
|
+
styleSheet.flush()
|
|
616
|
+
- empties the stylesheet of all its contents
|
|
617
|
+
|
|
618
|
+
*/
|
|
619
|
+
// $FlowFixMe
|
|
620
|
+
function sheetForTag(tag) {
|
|
621
|
+
if (tag.sheet) {
|
|
622
|
+
// $FlowFixMe
|
|
623
|
+
return tag.sheet;
|
|
624
|
+
} // this weirdness brought to you by firefox
|
|
625
|
+
|
|
626
|
+
/* istanbul ignore next */
|
|
627
|
+
|
|
628
|
+
|
|
629
|
+
for (var i = 0; i < document.styleSheets.length; i++) {
|
|
630
|
+
if (document.styleSheets[i].ownerNode === tag) {
|
|
631
|
+
// $FlowFixMe
|
|
632
|
+
return document.styleSheets[i];
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
function createStyleElement(options) {
|
|
638
|
+
var tag = document.createElement('style');
|
|
639
|
+
tag.setAttribute('data-emotion', options.key);
|
|
640
|
+
|
|
641
|
+
if (options.nonce !== undefined) {
|
|
642
|
+
tag.setAttribute('nonce', options.nonce);
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
tag.appendChild(document.createTextNode(''));
|
|
646
|
+
return tag;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
var StyleSheet =
|
|
650
|
+
/*#__PURE__*/
|
|
651
|
+
function () {
|
|
652
|
+
function StyleSheet(options) {
|
|
653
|
+
this.isSpeedy = options.speedy === undefined ? process.env.NODE_ENV === 'production' : options.speedy;
|
|
654
|
+
this.tags = [];
|
|
655
|
+
this.ctr = 0;
|
|
656
|
+
this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets
|
|
657
|
+
|
|
658
|
+
this.key = options.key;
|
|
659
|
+
this.container = options.container;
|
|
660
|
+
this.before = null;
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
var _proto = StyleSheet.prototype;
|
|
664
|
+
|
|
665
|
+
_proto.insert = function insert(rule) {
|
|
666
|
+
// the max length is how many rules we have per style tag, it's 65000 in speedy mode
|
|
667
|
+
// it's 1 in dev because we insert source maps that map a single rule to a location
|
|
668
|
+
// and you can only have one source map per style tag
|
|
669
|
+
if (this.ctr % (this.isSpeedy ? 65000 : 1) === 0) {
|
|
670
|
+
var _tag = createStyleElement(this);
|
|
671
|
+
|
|
672
|
+
var before;
|
|
673
|
+
|
|
674
|
+
if (this.tags.length === 0) {
|
|
675
|
+
before = this.before;
|
|
676
|
+
} else {
|
|
677
|
+
before = this.tags[this.tags.length - 1].nextSibling;
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
this.container.insertBefore(_tag, before);
|
|
681
|
+
this.tags.push(_tag);
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
var tag = this.tags[this.tags.length - 1];
|
|
685
|
+
|
|
686
|
+
if (this.isSpeedy) {
|
|
687
|
+
var sheet = sheetForTag(tag);
|
|
688
|
+
|
|
689
|
+
try {
|
|
690
|
+
// this is a really hot path
|
|
691
|
+
// we check the second character first because having "i"
|
|
692
|
+
// as the second character will happen less often than
|
|
693
|
+
// having "@" as the first character
|
|
694
|
+
var isImportRule = rule.charCodeAt(1) === 105 && rule.charCodeAt(0) === 64; // this is the ultrafast version, works across browsers
|
|
695
|
+
// the big drawback is that the css won't be editable in devtools
|
|
696
|
+
|
|
697
|
+
sheet.insertRule(rule, // we need to insert @import rules before anything else
|
|
698
|
+
// otherwise there will be an error
|
|
699
|
+
// technically this means that the @import rules will
|
|
700
|
+
// _usually_(not always since there could be multiple style tags)
|
|
701
|
+
// be the first ones in prod and generally later in dev
|
|
702
|
+
// this shouldn't really matter in the real world though
|
|
703
|
+
// @import is generally only used for font faces from google fonts and etc.
|
|
704
|
+
// so while this could be technically correct then it would be slower and larger
|
|
705
|
+
// for a tiny bit of correctness that won't matter in the real world
|
|
706
|
+
isImportRule ? 0 : sheet.cssRules.length);
|
|
707
|
+
} catch (e) {
|
|
708
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
709
|
+
console.warn("There was a problem inserting the following rule: \"" + rule + "\"", e);
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
} else {
|
|
713
|
+
tag.appendChild(document.createTextNode(rule));
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
this.ctr++;
|
|
717
|
+
};
|
|
718
|
+
|
|
719
|
+
_proto.flush = function flush() {
|
|
720
|
+
// $FlowFixMe
|
|
721
|
+
this.tags.forEach(function (tag) {
|
|
722
|
+
return tag.parentNode.removeChild(tag);
|
|
723
|
+
});
|
|
724
|
+
this.tags = [];
|
|
725
|
+
this.ctr = 0;
|
|
726
|
+
};
|
|
727
|
+
|
|
728
|
+
return StyleSheet;
|
|
729
|
+
}();
|
|
730
|
+
|
|
731
|
+
function stylis_min (W) {
|
|
732
|
+
function M(d, c, e, h, a) {
|
|
733
|
+
for (var m = 0, b = 0, v = 0, n = 0, q, g, x = 0, K = 0, k, u = k = q = 0, l = 0, r = 0, I = 0, t = 0, B = e.length, J = B - 1, y, f = '', p = '', F = '', G = '', C; l < B;) {
|
|
734
|
+
g = e.charCodeAt(l);
|
|
735
|
+
l === J && 0 !== b + n + v + m && (0 !== b && (g = 47 === b ? 10 : 47), n = v = m = 0, B++, J++);
|
|
736
|
+
|
|
737
|
+
if (0 === b + n + v + m) {
|
|
738
|
+
if (l === J && (0 < r && (f = f.replace(N, '')), 0 < f.trim().length)) {
|
|
739
|
+
switch (g) {
|
|
740
|
+
case 32:
|
|
741
|
+
case 9:
|
|
742
|
+
case 59:
|
|
743
|
+
case 13:
|
|
744
|
+
case 10:
|
|
745
|
+
break;
|
|
746
|
+
|
|
747
|
+
default:
|
|
748
|
+
f += e.charAt(l);
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
g = 59;
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
switch (g) {
|
|
755
|
+
case 123:
|
|
756
|
+
f = f.trim();
|
|
757
|
+
q = f.charCodeAt(0);
|
|
758
|
+
k = 1;
|
|
759
|
+
|
|
760
|
+
for (t = ++l; l < B;) {
|
|
761
|
+
switch (g = e.charCodeAt(l)) {
|
|
762
|
+
case 123:
|
|
763
|
+
k++;
|
|
764
|
+
break;
|
|
765
|
+
|
|
766
|
+
case 125:
|
|
767
|
+
k--;
|
|
768
|
+
break;
|
|
769
|
+
|
|
770
|
+
case 47:
|
|
771
|
+
switch (g = e.charCodeAt(l + 1)) {
|
|
772
|
+
case 42:
|
|
773
|
+
case 47:
|
|
774
|
+
a: {
|
|
775
|
+
for (u = l + 1; u < J; ++u) {
|
|
776
|
+
switch (e.charCodeAt(u)) {
|
|
777
|
+
case 47:
|
|
778
|
+
if (42 === g && 42 === e.charCodeAt(u - 1) && l + 2 !== u) {
|
|
779
|
+
l = u + 1;
|
|
780
|
+
break a;
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
break;
|
|
784
|
+
|
|
785
|
+
case 10:
|
|
786
|
+
if (47 === g) {
|
|
787
|
+
l = u + 1;
|
|
788
|
+
break a;
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
l = u;
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
break;
|
|
800
|
+
|
|
801
|
+
case 91:
|
|
802
|
+
g++;
|
|
803
|
+
|
|
804
|
+
case 40:
|
|
805
|
+
g++;
|
|
806
|
+
|
|
807
|
+
case 34:
|
|
808
|
+
case 39:
|
|
809
|
+
for (; l++ < J && e.charCodeAt(l) !== g;) {
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
if (0 === k) break;
|
|
815
|
+
l++;
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
k = e.substring(t, l);
|
|
819
|
+
0 === q && (q = (f = f.replace(ca, '').trim()).charCodeAt(0));
|
|
820
|
+
|
|
821
|
+
switch (q) {
|
|
822
|
+
case 64:
|
|
823
|
+
0 < r && (f = f.replace(N, ''));
|
|
824
|
+
g = f.charCodeAt(1);
|
|
825
|
+
|
|
826
|
+
switch (g) {
|
|
827
|
+
case 100:
|
|
828
|
+
case 109:
|
|
829
|
+
case 115:
|
|
830
|
+
case 45:
|
|
831
|
+
r = c;
|
|
832
|
+
break;
|
|
833
|
+
|
|
834
|
+
default:
|
|
835
|
+
r = O;
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
k = M(c, r, k, g, a + 1);
|
|
839
|
+
t = k.length;
|
|
840
|
+
0 < A && (r = X(O, f, I), C = H(3, k, r, c, D, z, t, g, a, h), f = r.join(''), void 0 !== C && 0 === (t = (k = C.trim()).length) && (g = 0, k = ''));
|
|
841
|
+
if (0 < t) switch (g) {
|
|
842
|
+
case 115:
|
|
843
|
+
f = f.replace(da, ea);
|
|
844
|
+
|
|
845
|
+
case 100:
|
|
846
|
+
case 109:
|
|
847
|
+
case 45:
|
|
848
|
+
k = f + '{' + k + '}';
|
|
849
|
+
break;
|
|
850
|
+
|
|
851
|
+
case 107:
|
|
852
|
+
f = f.replace(fa, '$1 $2');
|
|
853
|
+
k = f + '{' + k + '}';
|
|
854
|
+
k = 1 === w || 2 === w && L('@' + k, 3) ? '@-webkit-' + k + '@' + k : '@' + k;
|
|
855
|
+
break;
|
|
856
|
+
|
|
857
|
+
default:
|
|
858
|
+
k = f + k, 112 === h && (k = (p += k, ''));
|
|
859
|
+
} else k = '';
|
|
860
|
+
break;
|
|
861
|
+
|
|
862
|
+
default:
|
|
863
|
+
k = M(c, X(c, f, I), k, h, a + 1);
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
F += k;
|
|
867
|
+
k = I = r = u = q = 0;
|
|
868
|
+
f = '';
|
|
869
|
+
g = e.charCodeAt(++l);
|
|
870
|
+
break;
|
|
871
|
+
|
|
872
|
+
case 125:
|
|
873
|
+
case 59:
|
|
874
|
+
f = (0 < r ? f.replace(N, '') : f).trim();
|
|
875
|
+
if (1 < (t = f.length)) switch (0 === u && (q = f.charCodeAt(0), 45 === q || 96 < q && 123 > q) && (t = (f = f.replace(' ', ':')).length), 0 < A && void 0 !== (C = H(1, f, c, d, D, z, p.length, h, a, h)) && 0 === (t = (f = C.trim()).length) && (f = '\x00\x00'), q = f.charCodeAt(0), g = f.charCodeAt(1), q) {
|
|
876
|
+
case 0:
|
|
877
|
+
break;
|
|
878
|
+
|
|
879
|
+
case 64:
|
|
880
|
+
if (105 === g || 99 === g) {
|
|
881
|
+
G += f + e.charAt(l);
|
|
882
|
+
break;
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
default:
|
|
886
|
+
58 !== f.charCodeAt(t - 1) && (p += P(f, q, g, f.charCodeAt(2)));
|
|
887
|
+
}
|
|
888
|
+
I = r = u = q = 0;
|
|
889
|
+
f = '';
|
|
890
|
+
g = e.charCodeAt(++l);
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
switch (g) {
|
|
895
|
+
case 13:
|
|
896
|
+
case 10:
|
|
897
|
+
47 === b ? b = 0 : 0 === 1 + q && 107 !== h && 0 < f.length && (r = 1, f += '\x00');
|
|
898
|
+
0 < A * Y && H(0, f, c, d, D, z, p.length, h, a, h);
|
|
899
|
+
z = 1;
|
|
900
|
+
D++;
|
|
901
|
+
break;
|
|
902
|
+
|
|
903
|
+
case 59:
|
|
904
|
+
case 125:
|
|
905
|
+
if (0 === b + n + v + m) {
|
|
906
|
+
z++;
|
|
907
|
+
break;
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
default:
|
|
911
|
+
z++;
|
|
912
|
+
y = e.charAt(l);
|
|
913
|
+
|
|
914
|
+
switch (g) {
|
|
915
|
+
case 9:
|
|
916
|
+
case 32:
|
|
917
|
+
if (0 === n + m + b) switch (x) {
|
|
918
|
+
case 44:
|
|
919
|
+
case 58:
|
|
920
|
+
case 9:
|
|
921
|
+
case 32:
|
|
922
|
+
y = '';
|
|
923
|
+
break;
|
|
924
|
+
|
|
925
|
+
default:
|
|
926
|
+
32 !== g && (y = ' ');
|
|
927
|
+
}
|
|
928
|
+
break;
|
|
929
|
+
|
|
930
|
+
case 0:
|
|
931
|
+
y = '\\0';
|
|
932
|
+
break;
|
|
933
|
+
|
|
934
|
+
case 12:
|
|
935
|
+
y = '\\f';
|
|
936
|
+
break;
|
|
937
|
+
|
|
938
|
+
case 11:
|
|
939
|
+
y = '\\v';
|
|
940
|
+
break;
|
|
941
|
+
|
|
942
|
+
case 38:
|
|
943
|
+
0 === n + b + m && (r = I = 1, y = '\f' + y);
|
|
944
|
+
break;
|
|
945
|
+
|
|
946
|
+
case 108:
|
|
947
|
+
if (0 === n + b + m + E && 0 < u) switch (l - u) {
|
|
948
|
+
case 2:
|
|
949
|
+
112 === x && 58 === e.charCodeAt(l - 3) && (E = x);
|
|
950
|
+
|
|
951
|
+
case 8:
|
|
952
|
+
111 === K && (E = K);
|
|
953
|
+
}
|
|
954
|
+
break;
|
|
955
|
+
|
|
956
|
+
case 58:
|
|
957
|
+
0 === n + b + m && (u = l);
|
|
958
|
+
break;
|
|
959
|
+
|
|
960
|
+
case 44:
|
|
961
|
+
0 === b + v + n + m && (r = 1, y += '\r');
|
|
962
|
+
break;
|
|
963
|
+
|
|
964
|
+
case 34:
|
|
965
|
+
case 39:
|
|
966
|
+
0 === b && (n = n === g ? 0 : 0 === n ? g : n);
|
|
967
|
+
break;
|
|
968
|
+
|
|
969
|
+
case 91:
|
|
970
|
+
0 === n + b + v && m++;
|
|
971
|
+
break;
|
|
972
|
+
|
|
973
|
+
case 93:
|
|
974
|
+
0 === n + b + v && m--;
|
|
975
|
+
break;
|
|
976
|
+
|
|
977
|
+
case 41:
|
|
978
|
+
0 === n + b + m && v--;
|
|
979
|
+
break;
|
|
980
|
+
|
|
981
|
+
case 40:
|
|
982
|
+
if (0 === n + b + m) {
|
|
983
|
+
if (0 === q) switch (2 * x + 3 * K) {
|
|
984
|
+
case 533:
|
|
985
|
+
break;
|
|
986
|
+
|
|
987
|
+
default:
|
|
988
|
+
q = 1;
|
|
989
|
+
}
|
|
990
|
+
v++;
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
break;
|
|
994
|
+
|
|
995
|
+
case 64:
|
|
996
|
+
0 === b + v + n + m + u + k && (k = 1);
|
|
997
|
+
break;
|
|
998
|
+
|
|
999
|
+
case 42:
|
|
1000
|
+
case 47:
|
|
1001
|
+
if (!(0 < n + m + v)) switch (b) {
|
|
1002
|
+
case 0:
|
|
1003
|
+
switch (2 * g + 3 * e.charCodeAt(l + 1)) {
|
|
1004
|
+
case 235:
|
|
1005
|
+
b = 47;
|
|
1006
|
+
break;
|
|
1007
|
+
|
|
1008
|
+
case 220:
|
|
1009
|
+
t = l, b = 42;
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
break;
|
|
1013
|
+
|
|
1014
|
+
case 42:
|
|
1015
|
+
47 === g && 42 === x && t + 2 !== l && (33 === e.charCodeAt(t + 2) && (p += e.substring(t, l + 1)), y = '', b = 0);
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
0 === b && (f += y);
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
K = x;
|
|
1023
|
+
x = g;
|
|
1024
|
+
l++;
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
t = p.length;
|
|
1028
|
+
|
|
1029
|
+
if (0 < t) {
|
|
1030
|
+
r = c;
|
|
1031
|
+
if (0 < A && (C = H(2, p, r, d, D, z, t, h, a, h), void 0 !== C && 0 === (p = C).length)) return G + p + F;
|
|
1032
|
+
p = r.join(',') + '{' + p + '}';
|
|
1033
|
+
|
|
1034
|
+
if (0 !== w * E) {
|
|
1035
|
+
2 !== w || L(p, 2) || (E = 0);
|
|
1036
|
+
|
|
1037
|
+
switch (E) {
|
|
1038
|
+
case 111:
|
|
1039
|
+
p = p.replace(ha, ':-moz-$1') + p;
|
|
1040
|
+
break;
|
|
1041
|
+
|
|
1042
|
+
case 112:
|
|
1043
|
+
p = p.replace(Q, '::-webkit-input-$1') + p.replace(Q, '::-moz-$1') + p.replace(Q, ':-ms-input-$1') + p;
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
E = 0;
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
return G + p + F;
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
function X(d, c, e) {
|
|
1054
|
+
var h = c.trim().split(ia);
|
|
1055
|
+
c = h;
|
|
1056
|
+
var a = h.length,
|
|
1057
|
+
m = d.length;
|
|
1058
|
+
|
|
1059
|
+
switch (m) {
|
|
1060
|
+
case 0:
|
|
1061
|
+
case 1:
|
|
1062
|
+
var b = 0;
|
|
1063
|
+
|
|
1064
|
+
for (d = 0 === m ? '' : d[0] + ' '; b < a; ++b) {
|
|
1065
|
+
c[b] = Z(d, c[b], e).trim();
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
break;
|
|
1069
|
+
|
|
1070
|
+
default:
|
|
1071
|
+
var v = b = 0;
|
|
1072
|
+
|
|
1073
|
+
for (c = []; b < a; ++b) {
|
|
1074
|
+
for (var n = 0; n < m; ++n) {
|
|
1075
|
+
c[v++] = Z(d[n] + ' ', h[b], e).trim();
|
|
1076
|
+
}
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1081
|
+
return c;
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
function Z(d, c, e) {
|
|
1085
|
+
var h = c.charCodeAt(0);
|
|
1086
|
+
33 > h && (h = (c = c.trim()).charCodeAt(0));
|
|
1087
|
+
|
|
1088
|
+
switch (h) {
|
|
1089
|
+
case 38:
|
|
1090
|
+
return c.replace(F, '$1' + d.trim());
|
|
1091
|
+
|
|
1092
|
+
case 58:
|
|
1093
|
+
return d.trim() + c.replace(F, '$1' + d.trim());
|
|
1094
|
+
|
|
1095
|
+
default:
|
|
1096
|
+
if (0 < 1 * e && 0 < c.indexOf('\f')) return c.replace(F, (58 === d.charCodeAt(0) ? '' : '$1') + d.trim());
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1099
|
+
return d + c;
|
|
1100
|
+
}
|
|
1101
|
+
|
|
1102
|
+
function P(d, c, e, h) {
|
|
1103
|
+
var a = d + ';',
|
|
1104
|
+
m = 2 * c + 3 * e + 4 * h;
|
|
1105
|
+
|
|
1106
|
+
if (944 === m) {
|
|
1107
|
+
d = a.indexOf(':', 9) + 1;
|
|
1108
|
+
var b = a.substring(d, a.length - 1).trim();
|
|
1109
|
+
b = a.substring(0, d).trim() + b + ';';
|
|
1110
|
+
return 1 === w || 2 === w && L(b, 1) ? '-webkit-' + b + b : b;
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
if (0 === w || 2 === w && !L(a, 1)) return a;
|
|
1114
|
+
|
|
1115
|
+
switch (m) {
|
|
1116
|
+
case 1015:
|
|
1117
|
+
return 97 === a.charCodeAt(10) ? '-webkit-' + a + a : a;
|
|
1118
|
+
|
|
1119
|
+
case 951:
|
|
1120
|
+
return 116 === a.charCodeAt(3) ? '-webkit-' + a + a : a;
|
|
1121
|
+
|
|
1122
|
+
case 963:
|
|
1123
|
+
return 110 === a.charCodeAt(5) ? '-webkit-' + a + a : a;
|
|
1124
|
+
|
|
1125
|
+
case 1009:
|
|
1126
|
+
if (100 !== a.charCodeAt(4)) break;
|
|
1127
|
+
|
|
1128
|
+
case 969:
|
|
1129
|
+
case 942:
|
|
1130
|
+
return '-webkit-' + a + a;
|
|
1131
|
+
|
|
1132
|
+
case 978:
|
|
1133
|
+
return '-webkit-' + a + '-moz-' + a + a;
|
|
1134
|
+
|
|
1135
|
+
case 1019:
|
|
1136
|
+
case 983:
|
|
1137
|
+
return '-webkit-' + a + '-moz-' + a + '-ms-' + a + a;
|
|
1138
|
+
|
|
1139
|
+
case 883:
|
|
1140
|
+
if (45 === a.charCodeAt(8)) return '-webkit-' + a + a;
|
|
1141
|
+
if (0 < a.indexOf('image-set(', 11)) return a.replace(ja, '$1-webkit-$2') + a;
|
|
1142
|
+
break;
|
|
1143
|
+
|
|
1144
|
+
case 932:
|
|
1145
|
+
if (45 === a.charCodeAt(4)) switch (a.charCodeAt(5)) {
|
|
1146
|
+
case 103:
|
|
1147
|
+
return '-webkit-box-' + a.replace('-grow', '') + '-webkit-' + a + '-ms-' + a.replace('grow', 'positive') + a;
|
|
1148
|
+
|
|
1149
|
+
case 115:
|
|
1150
|
+
return '-webkit-' + a + '-ms-' + a.replace('shrink', 'negative') + a;
|
|
1151
|
+
|
|
1152
|
+
case 98:
|
|
1153
|
+
return '-webkit-' + a + '-ms-' + a.replace('basis', 'preferred-size') + a;
|
|
1154
|
+
}
|
|
1155
|
+
return '-webkit-' + a + '-ms-' + a + a;
|
|
1156
|
+
|
|
1157
|
+
case 964:
|
|
1158
|
+
return '-webkit-' + a + '-ms-flex-' + a + a;
|
|
1159
|
+
|
|
1160
|
+
case 1023:
|
|
1161
|
+
if (99 !== a.charCodeAt(8)) break;
|
|
1162
|
+
b = a.substring(a.indexOf(':', 15)).replace('flex-', '').replace('space-between', 'justify');
|
|
1163
|
+
return '-webkit-box-pack' + b + '-webkit-' + a + '-ms-flex-pack' + b + a;
|
|
1164
|
+
|
|
1165
|
+
case 1005:
|
|
1166
|
+
return ka.test(a) ? a.replace(aa, ':-webkit-') + a.replace(aa, ':-moz-') + a : a;
|
|
1167
|
+
|
|
1168
|
+
case 1e3:
|
|
1169
|
+
b = a.substring(13).trim();
|
|
1170
|
+
c = b.indexOf('-') + 1;
|
|
1171
|
+
|
|
1172
|
+
switch (b.charCodeAt(0) + b.charCodeAt(c)) {
|
|
1173
|
+
case 226:
|
|
1174
|
+
b = a.replace(G, 'tb');
|
|
1175
|
+
break;
|
|
1176
|
+
|
|
1177
|
+
case 232:
|
|
1178
|
+
b = a.replace(G, 'tb-rl');
|
|
1179
|
+
break;
|
|
1180
|
+
|
|
1181
|
+
case 220:
|
|
1182
|
+
b = a.replace(G, 'lr');
|
|
1183
|
+
break;
|
|
1184
|
+
|
|
1185
|
+
default:
|
|
1186
|
+
return a;
|
|
1187
|
+
}
|
|
1188
|
+
|
|
1189
|
+
return '-webkit-' + a + '-ms-' + b + a;
|
|
1190
|
+
|
|
1191
|
+
case 1017:
|
|
1192
|
+
if (-1 === a.indexOf('sticky', 9)) break;
|
|
1193
|
+
|
|
1194
|
+
case 975:
|
|
1195
|
+
c = (a = d).length - 10;
|
|
1196
|
+
b = (33 === a.charCodeAt(c) ? a.substring(0, c) : a).substring(d.indexOf(':', 7) + 1).trim();
|
|
1197
|
+
|
|
1198
|
+
switch (m = b.charCodeAt(0) + (b.charCodeAt(7) | 0)) {
|
|
1199
|
+
case 203:
|
|
1200
|
+
if (111 > b.charCodeAt(8)) break;
|
|
1201
|
+
|
|
1202
|
+
case 115:
|
|
1203
|
+
a = a.replace(b, '-webkit-' + b) + ';' + a;
|
|
1204
|
+
break;
|
|
1205
|
+
|
|
1206
|
+
case 207:
|
|
1207
|
+
case 102:
|
|
1208
|
+
a = a.replace(b, '-webkit-' + (102 < m ? 'inline-' : '') + 'box') + ';' + a.replace(b, '-webkit-' + b) + ';' + a.replace(b, '-ms-' + b + 'box') + ';' + a;
|
|
1209
|
+
}
|
|
1210
|
+
|
|
1211
|
+
return a + ';';
|
|
1212
|
+
|
|
1213
|
+
case 938:
|
|
1214
|
+
if (45 === a.charCodeAt(5)) switch (a.charCodeAt(6)) {
|
|
1215
|
+
case 105:
|
|
1216
|
+
return b = a.replace('-items', ''), '-webkit-' + a + '-webkit-box-' + b + '-ms-flex-' + b + a;
|
|
1217
|
+
|
|
1218
|
+
case 115:
|
|
1219
|
+
return '-webkit-' + a + '-ms-flex-item-' + a.replace(ba, '') + a;
|
|
1220
|
+
|
|
1221
|
+
default:
|
|
1222
|
+
return '-webkit-' + a + '-ms-flex-line-pack' + a.replace('align-content', '').replace(ba, '') + a;
|
|
1223
|
+
}
|
|
1224
|
+
break;
|
|
1225
|
+
|
|
1226
|
+
case 973:
|
|
1227
|
+
case 989:
|
|
1228
|
+
if (45 !== a.charCodeAt(3) || 122 === a.charCodeAt(4)) break;
|
|
1229
|
+
|
|
1230
|
+
case 931:
|
|
1231
|
+
case 953:
|
|
1232
|
+
if (!0 === la.test(d)) return 115 === (b = d.substring(d.indexOf(':') + 1)).charCodeAt(0) ? P(d.replace('stretch', 'fill-available'), c, e, h).replace(':fill-available', ':stretch') : a.replace(b, '-webkit-' + b) + a.replace(b, '-moz-' + b.replace('fill-', '')) + a;
|
|
1233
|
+
break;
|
|
1234
|
+
|
|
1235
|
+
case 962:
|
|
1236
|
+
if (a = '-webkit-' + a + (102 === a.charCodeAt(5) ? '-ms-' + a : '') + a, 211 === e + h && 105 === a.charCodeAt(13) && 0 < a.indexOf('transform', 10)) return a.substring(0, a.indexOf(';', 27) + 1).replace(ma, '$1-webkit-$2') + a;
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1239
|
+
return a;
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
function L(d, c) {
|
|
1243
|
+
var e = d.indexOf(1 === c ? ':' : '{'),
|
|
1244
|
+
h = d.substring(0, 3 !== c ? e : 10);
|
|
1245
|
+
e = d.substring(e + 1, d.length - 1);
|
|
1246
|
+
return R(2 !== c ? h : h.replace(na, '$1'), e, c);
|
|
1247
|
+
}
|
|
1248
|
+
|
|
1249
|
+
function ea(d, c) {
|
|
1250
|
+
var e = P(c, c.charCodeAt(0), c.charCodeAt(1), c.charCodeAt(2));
|
|
1251
|
+
return e !== c + ';' ? e.replace(oa, ' or ($1)').substring(4) : '(' + c + ')';
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
function H(d, c, e, h, a, m, b, v, n, q) {
|
|
1255
|
+
for (var g = 0, x = c, w; g < A; ++g) {
|
|
1256
|
+
switch (w = S[g].call(B, d, x, e, h, a, m, b, v, n, q)) {
|
|
1257
|
+
case void 0:
|
|
1258
|
+
case !1:
|
|
1259
|
+
case !0:
|
|
1260
|
+
case null:
|
|
1261
|
+
break;
|
|
1262
|
+
|
|
1263
|
+
default:
|
|
1264
|
+
x = w;
|
|
1265
|
+
}
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
if (x !== c) return x;
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1271
|
+
function T(d) {
|
|
1272
|
+
switch (d) {
|
|
1273
|
+
case void 0:
|
|
1274
|
+
case null:
|
|
1275
|
+
A = S.length = 0;
|
|
1276
|
+
break;
|
|
1277
|
+
|
|
1278
|
+
default:
|
|
1279
|
+
if ('function' === typeof d) S[A++] = d;else if ('object' === typeof d) for (var c = 0, e = d.length; c < e; ++c) {
|
|
1280
|
+
T(d[c]);
|
|
1281
|
+
} else Y = !!d | 0;
|
|
1282
|
+
}
|
|
1283
|
+
|
|
1284
|
+
return T;
|
|
1285
|
+
}
|
|
1286
|
+
|
|
1287
|
+
function U(d) {
|
|
1288
|
+
d = d.prefix;
|
|
1289
|
+
void 0 !== d && (R = null, d ? 'function' !== typeof d ? w = 1 : (w = 2, R = d) : w = 0);
|
|
1290
|
+
return U;
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1293
|
+
function B(d, c) {
|
|
1294
|
+
var e = d;
|
|
1295
|
+
33 > e.charCodeAt(0) && (e = e.trim());
|
|
1296
|
+
V = e;
|
|
1297
|
+
e = [V];
|
|
1298
|
+
|
|
1299
|
+
if (0 < A) {
|
|
1300
|
+
var h = H(-1, c, e, e, D, z, 0, 0, 0, 0);
|
|
1301
|
+
void 0 !== h && 'string' === typeof h && (c = h);
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1304
|
+
var a = M(O, e, c, 0, 0);
|
|
1305
|
+
0 < A && (h = H(-2, a, e, e, D, z, a.length, 0, 0, 0), void 0 !== h && (a = h));
|
|
1306
|
+
V = '';
|
|
1307
|
+
E = 0;
|
|
1308
|
+
z = D = 1;
|
|
1309
|
+
return a;
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
var ca = /^\0+/g,
|
|
1313
|
+
N = /[\0\r\f]/g,
|
|
1314
|
+
aa = /: */g,
|
|
1315
|
+
ka = /zoo|gra/,
|
|
1316
|
+
ma = /([,: ])(transform)/g,
|
|
1317
|
+
ia = /,\r+?/g,
|
|
1318
|
+
F = /([\t\r\n ])*\f?&/g,
|
|
1319
|
+
fa = /@(k\w+)\s*(\S*)\s*/,
|
|
1320
|
+
Q = /::(place)/g,
|
|
1321
|
+
ha = /:(read-only)/g,
|
|
1322
|
+
G = /[svh]\w+-[tblr]{2}/,
|
|
1323
|
+
da = /\(\s*(.*)\s*\)/g,
|
|
1324
|
+
oa = /([\s\S]*?);/g,
|
|
1325
|
+
ba = /-self|flex-/g,
|
|
1326
|
+
na = /[^]*?(:[rp][el]a[\w-]+)[^]*/,
|
|
1327
|
+
la = /stretch|:\s*\w+\-(?:conte|avail)/,
|
|
1328
|
+
ja = /([^-])(image-set\()/,
|
|
1329
|
+
z = 1,
|
|
1330
|
+
D = 1,
|
|
1331
|
+
E = 0,
|
|
1332
|
+
w = 1,
|
|
1333
|
+
O = [],
|
|
1334
|
+
S = [],
|
|
1335
|
+
A = 0,
|
|
1336
|
+
R = null,
|
|
1337
|
+
Y = 0,
|
|
1338
|
+
V = '';
|
|
1339
|
+
B.use = T;
|
|
1340
|
+
B.set = U;
|
|
1341
|
+
void 0 !== W && U(W);
|
|
1342
|
+
return B;
|
|
1343
|
+
}
|
|
1344
|
+
|
|
1345
|
+
var weakMemoize = function weakMemoize(func) {
|
|
1346
|
+
// $FlowFixMe flow doesn't include all non-primitive types as allowed for weakmaps
|
|
1347
|
+
var cache = new WeakMap();
|
|
1348
|
+
return function (arg) {
|
|
1349
|
+
if (cache.has(arg)) {
|
|
1350
|
+
// $FlowFixMe
|
|
1351
|
+
return cache.get(arg);
|
|
1352
|
+
}
|
|
1353
|
+
|
|
1354
|
+
var ret = func(arg);
|
|
1355
|
+
cache.set(arg, ret);
|
|
1356
|
+
return ret;
|
|
1357
|
+
};
|
|
1358
|
+
};
|
|
1359
|
+
|
|
1360
|
+
// https://github.com/thysultan/stylis.js/tree/master/plugins/rule-sheet
|
|
1361
|
+
// inlined to avoid umd wrapper and peerDep warnings/installing stylis
|
|
1362
|
+
// since we use stylis after closure compiler
|
|
1363
|
+
var delimiter = '/*|*/';
|
|
1364
|
+
var needle = delimiter + '}';
|
|
1365
|
+
|
|
1366
|
+
function toSheet(block) {
|
|
1367
|
+
if (block) {
|
|
1368
|
+
Sheet.current.insert(block + '}');
|
|
1369
|
+
}
|
|
1370
|
+
}
|
|
1371
|
+
|
|
1372
|
+
var Sheet = {
|
|
1373
|
+
current: null
|
|
1374
|
+
};
|
|
1375
|
+
var ruleSheet = function ruleSheet(context, content, selectors, parents, line, column, length, ns, depth, at) {
|
|
1376
|
+
switch (context) {
|
|
1377
|
+
// property
|
|
1378
|
+
case 1:
|
|
1379
|
+
{
|
|
1380
|
+
switch (content.charCodeAt(0)) {
|
|
1381
|
+
case 64:
|
|
1382
|
+
{
|
|
1383
|
+
// @import
|
|
1384
|
+
Sheet.current.insert(content + ';');
|
|
1385
|
+
return '';
|
|
1386
|
+
}
|
|
1387
|
+
// charcode for l
|
|
1388
|
+
|
|
1389
|
+
case 108:
|
|
1390
|
+
{
|
|
1391
|
+
// charcode for b
|
|
1392
|
+
// this ignores label
|
|
1393
|
+
if (content.charCodeAt(2) === 98) {
|
|
1394
|
+
return '';
|
|
1395
|
+
}
|
|
1396
|
+
}
|
|
1397
|
+
}
|
|
1398
|
+
|
|
1399
|
+
break;
|
|
1400
|
+
}
|
|
1401
|
+
// selector
|
|
1402
|
+
|
|
1403
|
+
case 2:
|
|
1404
|
+
{
|
|
1405
|
+
if (ns === 0) return content + delimiter;
|
|
1406
|
+
break;
|
|
1407
|
+
}
|
|
1408
|
+
// at-rule
|
|
1409
|
+
|
|
1410
|
+
case 3:
|
|
1411
|
+
{
|
|
1412
|
+
switch (ns) {
|
|
1413
|
+
// @font-face, @page
|
|
1414
|
+
case 102:
|
|
1415
|
+
case 112:
|
|
1416
|
+
{
|
|
1417
|
+
Sheet.current.insert(selectors[0] + content);
|
|
1418
|
+
return '';
|
|
1419
|
+
}
|
|
1420
|
+
|
|
1421
|
+
default:
|
|
1422
|
+
{
|
|
1423
|
+
return content + (at === 0 ? delimiter : '');
|
|
1424
|
+
}
|
|
1425
|
+
}
|
|
1426
|
+
}
|
|
1427
|
+
|
|
1428
|
+
case -2:
|
|
1429
|
+
{
|
|
1430
|
+
content.split(needle).forEach(toSheet);
|
|
1431
|
+
}
|
|
1432
|
+
}
|
|
1433
|
+
};
|
|
1434
|
+
var removeLabel = function removeLabel(context, content) {
|
|
1435
|
+
if (context === 1 && // charcode for l
|
|
1436
|
+
content.charCodeAt(0) === 108 && // charcode for b
|
|
1437
|
+
content.charCodeAt(2) === 98 // this ignores label
|
|
1438
|
+
) {
|
|
1439
|
+
return '';
|
|
1440
|
+
}
|
|
1441
|
+
};
|
|
1442
|
+
|
|
1443
|
+
var isBrowser$2 = typeof document !== 'undefined';
|
|
1444
|
+
var rootServerStylisCache = {};
|
|
1445
|
+
var getServerStylisCache = isBrowser$2 ? undefined : weakMemoize(function () {
|
|
1446
|
+
var getCache = weakMemoize(function () {
|
|
1447
|
+
return {};
|
|
1448
|
+
});
|
|
1449
|
+
var prefixTrueCache = {};
|
|
1450
|
+
var prefixFalseCache = {};
|
|
1451
|
+
return function (prefix) {
|
|
1452
|
+
if (prefix === undefined || prefix === true) {
|
|
1453
|
+
return prefixTrueCache;
|
|
1454
|
+
}
|
|
1455
|
+
|
|
1456
|
+
if (prefix === false) {
|
|
1457
|
+
return prefixFalseCache;
|
|
1458
|
+
}
|
|
1459
|
+
|
|
1460
|
+
return getCache(prefix);
|
|
1461
|
+
};
|
|
1462
|
+
});
|
|
1463
|
+
|
|
1464
|
+
var createCache = function createCache(options) {
|
|
1465
|
+
if (options === undefined) options = {};
|
|
1466
|
+
var key = options.key || 'css';
|
|
1467
|
+
var stylisOptions;
|
|
1468
|
+
|
|
1469
|
+
if (options.prefix !== undefined) {
|
|
1470
|
+
stylisOptions = {
|
|
1471
|
+
prefix: options.prefix
|
|
1472
|
+
};
|
|
1473
|
+
}
|
|
1474
|
+
|
|
1475
|
+
var stylis = new stylis_min(stylisOptions);
|
|
1476
|
+
|
|
1477
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1478
|
+
// $FlowFixMe
|
|
1479
|
+
if (/[^a-z-]/.test(key)) {
|
|
1480
|
+
throw new Error("Emotion key must only contain lower case alphabetical characters and - but \"" + key + "\" was passed");
|
|
1481
|
+
}
|
|
1482
|
+
}
|
|
1483
|
+
|
|
1484
|
+
var inserted = {}; // $FlowFixMe
|
|
1485
|
+
|
|
1486
|
+
var container;
|
|
1487
|
+
|
|
1488
|
+
if (isBrowser$2) {
|
|
1489
|
+
container = options.container || document.head;
|
|
1490
|
+
var nodes = document.querySelectorAll("style[data-emotion-" + key + "]");
|
|
1491
|
+
Array.prototype.forEach.call(nodes, function (node) {
|
|
1492
|
+
var attrib = node.getAttribute("data-emotion-" + key); // $FlowFixMe
|
|
1493
|
+
|
|
1494
|
+
attrib.split(' ').forEach(function (id) {
|
|
1495
|
+
inserted[id] = true;
|
|
1496
|
+
});
|
|
1497
|
+
|
|
1498
|
+
if (node.parentNode !== container) {
|
|
1499
|
+
container.appendChild(node);
|
|
1500
|
+
}
|
|
1501
|
+
});
|
|
1502
|
+
}
|
|
1503
|
+
|
|
1504
|
+
var _insert;
|
|
1505
|
+
|
|
1506
|
+
if (isBrowser$2) {
|
|
1507
|
+
stylis.use(options.stylisPlugins)(ruleSheet);
|
|
1508
|
+
|
|
1509
|
+
_insert = function insert(selector, serialized, sheet, shouldCache) {
|
|
1510
|
+
var name = serialized.name;
|
|
1511
|
+
Sheet.current = sheet;
|
|
1512
|
+
|
|
1513
|
+
if (process.env.NODE_ENV !== 'production' && serialized.map !== undefined) {
|
|
1514
|
+
var map = serialized.map;
|
|
1515
|
+
Sheet.current = {
|
|
1516
|
+
insert: function insert(rule) {
|
|
1517
|
+
sheet.insert(rule + map);
|
|
1518
|
+
}
|
|
1519
|
+
};
|
|
1520
|
+
}
|
|
1521
|
+
|
|
1522
|
+
stylis(selector, serialized.styles);
|
|
1523
|
+
|
|
1524
|
+
if (shouldCache) {
|
|
1525
|
+
cache.inserted[name] = true;
|
|
1526
|
+
}
|
|
1527
|
+
};
|
|
1528
|
+
} else {
|
|
1529
|
+
stylis.use(removeLabel);
|
|
1530
|
+
var serverStylisCache = rootServerStylisCache;
|
|
1531
|
+
|
|
1532
|
+
if (options.stylisPlugins || options.prefix !== undefined) {
|
|
1533
|
+
stylis.use(options.stylisPlugins); // $FlowFixMe
|
|
1534
|
+
|
|
1535
|
+
serverStylisCache = getServerStylisCache(options.stylisPlugins || rootServerStylisCache)(options.prefix);
|
|
1536
|
+
}
|
|
1537
|
+
|
|
1538
|
+
var getRules = function getRules(selector, serialized) {
|
|
1539
|
+
var name = serialized.name;
|
|
1540
|
+
|
|
1541
|
+
if (serverStylisCache[name] === undefined) {
|
|
1542
|
+
serverStylisCache[name] = stylis(selector, serialized.styles);
|
|
1543
|
+
}
|
|
1544
|
+
|
|
1545
|
+
return serverStylisCache[name];
|
|
1546
|
+
};
|
|
1547
|
+
|
|
1548
|
+
_insert = function _insert(selector, serialized, sheet, shouldCache) {
|
|
1549
|
+
var name = serialized.name;
|
|
1550
|
+
var rules = getRules(selector, serialized);
|
|
1551
|
+
|
|
1552
|
+
if (cache.compat === undefined) {
|
|
1553
|
+
// in regular mode, we don't set the styles on the inserted cache
|
|
1554
|
+
// since we don't need to and that would be wasting memory
|
|
1555
|
+
// we return them so that they are rendered in a style tag
|
|
1556
|
+
if (shouldCache) {
|
|
1557
|
+
cache.inserted[name] = true;
|
|
1558
|
+
}
|
|
1559
|
+
|
|
1560
|
+
if ( // using === development instead of !== production
|
|
1561
|
+
// because if people do ssr in tests, the source maps showing up would be annoying
|
|
1562
|
+
process.env.NODE_ENV === 'development' && serialized.map !== undefined) {
|
|
1563
|
+
return rules + serialized.map;
|
|
1564
|
+
}
|
|
1565
|
+
|
|
1566
|
+
return rules;
|
|
1567
|
+
} else {
|
|
1568
|
+
// in compat mode, we put the styles on the inserted cache so
|
|
1569
|
+
// that emotion-server can pull out the styles
|
|
1570
|
+
// except when we don't want to cache it which was in Global but now
|
|
1571
|
+
// is nowhere but we don't want to do a major right now
|
|
1572
|
+
// and just in case we're going to leave the case here
|
|
1573
|
+
// it's also not affecting client side bundle size
|
|
1574
|
+
// so it's really not a big deal
|
|
1575
|
+
if (shouldCache) {
|
|
1576
|
+
cache.inserted[name] = rules;
|
|
1577
|
+
} else {
|
|
1578
|
+
return rules;
|
|
1579
|
+
}
|
|
1580
|
+
}
|
|
1581
|
+
};
|
|
1582
|
+
}
|
|
1583
|
+
|
|
1584
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1585
|
+
// https://esbench.com/bench/5bf7371a4cd7e6009ef61d0a
|
|
1586
|
+
var commentStart = /\/\*/g;
|
|
1587
|
+
var commentEnd = /\*\//g;
|
|
1588
|
+
stylis.use(function (context, content) {
|
|
1589
|
+
switch (context) {
|
|
1590
|
+
case -1:
|
|
1591
|
+
{
|
|
1592
|
+
while (commentStart.test(content)) {
|
|
1593
|
+
commentEnd.lastIndex = commentStart.lastIndex;
|
|
1594
|
+
|
|
1595
|
+
if (commentEnd.test(content)) {
|
|
1596
|
+
commentStart.lastIndex = commentEnd.lastIndex;
|
|
1597
|
+
continue;
|
|
1598
|
+
}
|
|
1599
|
+
|
|
1600
|
+
throw new Error('Your styles have an unterminated comment ("/*" without corresponding "*/").');
|
|
1601
|
+
}
|
|
1602
|
+
|
|
1603
|
+
commentStart.lastIndex = 0;
|
|
1604
|
+
break;
|
|
1605
|
+
}
|
|
1606
|
+
}
|
|
1607
|
+
});
|
|
1608
|
+
stylis.use(function (context, content, selectors) {
|
|
1609
|
+
switch (context) {
|
|
1610
|
+
case -1:
|
|
1611
|
+
{
|
|
1612
|
+
var flag = 'emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason';
|
|
1613
|
+
var unsafePseudoClasses = content.match(/(:first|:nth|:nth-last)-child/g);
|
|
1614
|
+
|
|
1615
|
+
if (unsafePseudoClasses && cache.compat !== true) {
|
|
1616
|
+
unsafePseudoClasses.forEach(function (unsafePseudoClass) {
|
|
1617
|
+
var ignoreRegExp = new RegExp(unsafePseudoClass + ".*\\/\\* " + flag + " \\*\\/");
|
|
1618
|
+
var ignore = ignoreRegExp.test(content);
|
|
1619
|
+
|
|
1620
|
+
if (unsafePseudoClass && !ignore) {
|
|
1621
|
+
console.error("The pseudo class \"" + unsafePseudoClass + "\" is potentially unsafe when doing server-side rendering. Try changing it to \"" + unsafePseudoClass.split('-child')[0] + "-of-type\".");
|
|
1622
|
+
}
|
|
1623
|
+
});
|
|
1624
|
+
}
|
|
1625
|
+
|
|
1626
|
+
break;
|
|
1627
|
+
}
|
|
1628
|
+
}
|
|
1629
|
+
});
|
|
1630
|
+
}
|
|
1631
|
+
|
|
1632
|
+
var cache = {
|
|
1633
|
+
key: key,
|
|
1634
|
+
sheet: new StyleSheet({
|
|
1635
|
+
key: key,
|
|
1636
|
+
container: container,
|
|
1637
|
+
nonce: options.nonce,
|
|
1638
|
+
speedy: options.speedy
|
|
1639
|
+
}),
|
|
1640
|
+
nonce: options.nonce,
|
|
1641
|
+
inserted: inserted,
|
|
1642
|
+
registered: {},
|
|
1643
|
+
insert: _insert
|
|
1644
|
+
};
|
|
1645
|
+
return cache;
|
|
1646
|
+
};
|
|
1647
|
+
|
|
1648
|
+
var isBrowser$1 = typeof document !== 'undefined';
|
|
1649
|
+
function getRegisteredStyles(registered, registeredStyles, classNames) {
|
|
1650
|
+
var rawClassName = '';
|
|
1651
|
+
classNames.split(' ').forEach(function (className) {
|
|
1652
|
+
if (registered[className] !== undefined) {
|
|
1653
|
+
registeredStyles.push(registered[className]);
|
|
1654
|
+
} else {
|
|
1655
|
+
rawClassName += className + " ";
|
|
1656
|
+
}
|
|
1657
|
+
});
|
|
1658
|
+
return rawClassName;
|
|
1659
|
+
}
|
|
1660
|
+
var insertStyles = function insertStyles(cache, serialized, isStringTag) {
|
|
1661
|
+
var className = cache.key + "-" + serialized.name;
|
|
1662
|
+
|
|
1663
|
+
if ( // we only need to add the styles to the registered cache if the
|
|
1664
|
+
// class name could be used further down
|
|
1665
|
+
// the tree but if it's a string tag, we know it won't
|
|
1666
|
+
// so we don't have to add it to registered cache.
|
|
1667
|
+
// this improves memory usage since we can avoid storing the whole style string
|
|
1668
|
+
(isStringTag === false || // we need to always store it if we're in compat mode and
|
|
1669
|
+
// in node since emotion-server relies on whether a style is in
|
|
1670
|
+
// the registered cache to know whether a style is global or not
|
|
1671
|
+
// also, note that this check will be dead code eliminated in the browser
|
|
1672
|
+
isBrowser$1 === false && cache.compat !== undefined) && cache.registered[className] === undefined) {
|
|
1673
|
+
cache.registered[className] = serialized.styles;
|
|
1674
|
+
}
|
|
1675
|
+
|
|
1676
|
+
if (cache.inserted[serialized.name] === undefined) {
|
|
1677
|
+
var stylesForSSR = '';
|
|
1678
|
+
var current = serialized;
|
|
1679
|
+
|
|
1680
|
+
do {
|
|
1681
|
+
var maybeStyles = cache.insert("." + className, current, cache.sheet, true);
|
|
1682
|
+
|
|
1683
|
+
if (!isBrowser$1 && maybeStyles !== undefined) {
|
|
1684
|
+
stylesForSSR += maybeStyles;
|
|
1685
|
+
}
|
|
1686
|
+
|
|
1687
|
+
current = current.next;
|
|
1688
|
+
} while (current !== undefined);
|
|
1689
|
+
|
|
1690
|
+
if (!isBrowser$1 && stylesForSSR.length !== 0) {
|
|
1691
|
+
return stylesForSSR;
|
|
1692
|
+
}
|
|
1693
|
+
}
|
|
1694
|
+
};
|
|
1695
|
+
|
|
1696
|
+
/* eslint-disable */
|
|
1697
|
+
// Inspired by https://github.com/garycourt/murmurhash-js
|
|
1698
|
+
// Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86
|
|
1699
|
+
function murmur2(str) {
|
|
1700
|
+
// 'm' and 'r' are mixing constants generated offline.
|
|
1701
|
+
// They're not really 'magic', they just happen to work well.
|
|
1702
|
+
// const m = 0x5bd1e995;
|
|
1703
|
+
// const r = 24;
|
|
1704
|
+
// Initialize the hash
|
|
1705
|
+
var h = 0; // Mix 4 bytes at a time into the hash
|
|
1706
|
+
|
|
1707
|
+
var k,
|
|
1708
|
+
i = 0,
|
|
1709
|
+
len = str.length;
|
|
1710
|
+
|
|
1711
|
+
for (; len >= 4; ++i, len -= 4) {
|
|
1712
|
+
k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;
|
|
1713
|
+
k =
|
|
1714
|
+
/* Math.imul(k, m): */
|
|
1715
|
+
(k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16);
|
|
1716
|
+
k ^=
|
|
1717
|
+
/* k >>> r: */
|
|
1718
|
+
k >>> 24;
|
|
1719
|
+
h =
|
|
1720
|
+
/* Math.imul(k, m): */
|
|
1721
|
+
(k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^
|
|
1722
|
+
/* Math.imul(h, m): */
|
|
1723
|
+
(h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
|
|
1724
|
+
} // Handle the last few bytes of the input array
|
|
1725
|
+
|
|
1726
|
+
|
|
1727
|
+
switch (len) {
|
|
1728
|
+
case 3:
|
|
1729
|
+
h ^= (str.charCodeAt(i + 2) & 0xff) << 16;
|
|
1730
|
+
|
|
1731
|
+
case 2:
|
|
1732
|
+
h ^= (str.charCodeAt(i + 1) & 0xff) << 8;
|
|
1733
|
+
|
|
1734
|
+
case 1:
|
|
1735
|
+
h ^= str.charCodeAt(i) & 0xff;
|
|
1736
|
+
h =
|
|
1737
|
+
/* Math.imul(h, m): */
|
|
1738
|
+
(h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
|
|
1739
|
+
} // Do a few final mixes of the hash to ensure the last few
|
|
1740
|
+
// bytes are well-incorporated.
|
|
1741
|
+
|
|
1742
|
+
|
|
1743
|
+
h ^= h >>> 13;
|
|
1744
|
+
h =
|
|
1745
|
+
/* Math.imul(h, m): */
|
|
1746
|
+
(h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
|
|
1747
|
+
return ((h ^ h >>> 15) >>> 0).toString(36);
|
|
1748
|
+
}
|
|
1749
|
+
|
|
1750
|
+
var unitlessKeys = {
|
|
1751
|
+
animationIterationCount: 1,
|
|
1752
|
+
borderImageOutset: 1,
|
|
1753
|
+
borderImageSlice: 1,
|
|
1754
|
+
borderImageWidth: 1,
|
|
1755
|
+
boxFlex: 1,
|
|
1756
|
+
boxFlexGroup: 1,
|
|
1757
|
+
boxOrdinalGroup: 1,
|
|
1758
|
+
columnCount: 1,
|
|
1759
|
+
columns: 1,
|
|
1760
|
+
flex: 1,
|
|
1761
|
+
flexGrow: 1,
|
|
1762
|
+
flexPositive: 1,
|
|
1763
|
+
flexShrink: 1,
|
|
1764
|
+
flexNegative: 1,
|
|
1765
|
+
flexOrder: 1,
|
|
1766
|
+
gridRow: 1,
|
|
1767
|
+
gridRowEnd: 1,
|
|
1768
|
+
gridRowSpan: 1,
|
|
1769
|
+
gridRowStart: 1,
|
|
1770
|
+
gridColumn: 1,
|
|
1771
|
+
gridColumnEnd: 1,
|
|
1772
|
+
gridColumnSpan: 1,
|
|
1773
|
+
gridColumnStart: 1,
|
|
1774
|
+
msGridRow: 1,
|
|
1775
|
+
msGridRowSpan: 1,
|
|
1776
|
+
msGridColumn: 1,
|
|
1777
|
+
msGridColumnSpan: 1,
|
|
1778
|
+
fontWeight: 1,
|
|
1779
|
+
lineHeight: 1,
|
|
1780
|
+
opacity: 1,
|
|
1781
|
+
order: 1,
|
|
1782
|
+
orphans: 1,
|
|
1783
|
+
tabSize: 1,
|
|
1784
|
+
widows: 1,
|
|
1785
|
+
zIndex: 1,
|
|
1786
|
+
zoom: 1,
|
|
1787
|
+
WebkitLineClamp: 1,
|
|
1788
|
+
// SVG-related properties
|
|
1789
|
+
fillOpacity: 1,
|
|
1790
|
+
floodOpacity: 1,
|
|
1791
|
+
stopOpacity: 1,
|
|
1792
|
+
strokeDasharray: 1,
|
|
1793
|
+
strokeDashoffset: 1,
|
|
1794
|
+
strokeMiterlimit: 1,
|
|
1795
|
+
strokeOpacity: 1,
|
|
1796
|
+
strokeWidth: 1
|
|
1797
|
+
};
|
|
1798
|
+
|
|
1799
|
+
function memoize(fn) {
|
|
1800
|
+
var cache = {};
|
|
1801
|
+
return function (arg) {
|
|
1802
|
+
if (cache[arg] === undefined) cache[arg] = fn(arg);
|
|
1803
|
+
return cache[arg];
|
|
1804
|
+
};
|
|
1805
|
+
}
|
|
1806
|
+
|
|
1807
|
+
var ILLEGAL_ESCAPE_SEQUENCE_ERROR = "You have illegal escape sequence in your template literal, most likely inside content's property value.\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \"content: '\\00d7';\" should become \"content: '\\\\00d7';\".\nYou can read more about this here:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences";
|
|
1808
|
+
var UNDEFINED_AS_OBJECT_KEY_ERROR = "You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).";
|
|
1809
|
+
var hyphenateRegex = /[A-Z]|^ms/g;
|
|
1810
|
+
var animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;
|
|
1811
|
+
|
|
1812
|
+
var isCustomProperty = function isCustomProperty(property) {
|
|
1813
|
+
return property.charCodeAt(1) === 45;
|
|
1814
|
+
};
|
|
1815
|
+
|
|
1816
|
+
var isProcessableValue = function isProcessableValue(value) {
|
|
1817
|
+
return value != null && typeof value !== 'boolean';
|
|
1818
|
+
};
|
|
1819
|
+
|
|
1820
|
+
var processStyleName = memoize(function (styleName) {
|
|
1821
|
+
return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, '-$&').toLowerCase();
|
|
1822
|
+
});
|
|
1823
|
+
|
|
1824
|
+
var processStyleValue = function processStyleValue(key, value) {
|
|
1825
|
+
switch (key) {
|
|
1826
|
+
case 'animation':
|
|
1827
|
+
case 'animationName':
|
|
1828
|
+
{
|
|
1829
|
+
if (typeof value === 'string') {
|
|
1830
|
+
return value.replace(animationRegex, function (match, p1, p2) {
|
|
1831
|
+
cursor = {
|
|
1832
|
+
name: p1,
|
|
1833
|
+
styles: p2,
|
|
1834
|
+
next: cursor
|
|
1835
|
+
};
|
|
1836
|
+
return p1;
|
|
1837
|
+
});
|
|
1838
|
+
}
|
|
1839
|
+
}
|
|
1840
|
+
}
|
|
1841
|
+
|
|
1842
|
+
if (unitlessKeys[key] !== 1 && !isCustomProperty(key) && typeof value === 'number' && value !== 0) {
|
|
1843
|
+
return value + 'px';
|
|
1844
|
+
}
|
|
1845
|
+
|
|
1846
|
+
return value;
|
|
1847
|
+
};
|
|
1848
|
+
|
|
1849
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1850
|
+
var contentValuePattern = /(attr|calc|counters?|url)\(/;
|
|
1851
|
+
var contentValues = ['normal', 'none', 'counter', 'open-quote', 'close-quote', 'no-open-quote', 'no-close-quote', 'initial', 'inherit', 'unset'];
|
|
1852
|
+
var oldProcessStyleValue = processStyleValue;
|
|
1853
|
+
var msPattern = /^-ms-/;
|
|
1854
|
+
var hyphenPattern = /-(.)/g;
|
|
1855
|
+
var hyphenatedCache = {};
|
|
1856
|
+
|
|
1857
|
+
processStyleValue = function processStyleValue(key, value) {
|
|
1858
|
+
if (key === 'content') {
|
|
1859
|
+
if (typeof value !== 'string' || contentValues.indexOf(value) === -1 && !contentValuePattern.test(value) && (value.charAt(0) !== value.charAt(value.length - 1) || value.charAt(0) !== '"' && value.charAt(0) !== "'")) {
|
|
1860
|
+
console.error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"" + value + "\"'`");
|
|
1861
|
+
}
|
|
1862
|
+
}
|
|
1863
|
+
|
|
1864
|
+
var processed = oldProcessStyleValue(key, value);
|
|
1865
|
+
|
|
1866
|
+
if (processed !== '' && !isCustomProperty(key) && key.indexOf('-') !== -1 && hyphenatedCache[key] === undefined) {
|
|
1867
|
+
hyphenatedCache[key] = true;
|
|
1868
|
+
console.error("Using kebab-case for css properties in objects is not supported. Did you mean " + key.replace(msPattern, 'ms-').replace(hyphenPattern, function (str, _char) {
|
|
1869
|
+
return _char.toUpperCase();
|
|
1870
|
+
}) + "?");
|
|
1871
|
+
}
|
|
1872
|
+
|
|
1873
|
+
return processed;
|
|
1874
|
+
};
|
|
1875
|
+
}
|
|
1876
|
+
|
|
1877
|
+
var shouldWarnAboutInterpolatingClassNameFromCss = true;
|
|
1878
|
+
|
|
1879
|
+
function handleInterpolation(mergedProps, registered, interpolation, couldBeSelectorInterpolation) {
|
|
1880
|
+
if (interpolation == null) {
|
|
1881
|
+
return '';
|
|
1882
|
+
}
|
|
1883
|
+
|
|
1884
|
+
if (interpolation.__emotion_styles !== undefined) {
|
|
1885
|
+
if (process.env.NODE_ENV !== 'production' && interpolation.toString() === 'NO_COMPONENT_SELECTOR') {
|
|
1886
|
+
throw new Error('Component selectors can only be used in conjunction with babel-plugin-emotion.');
|
|
1887
|
+
}
|
|
1888
|
+
|
|
1889
|
+
return interpolation;
|
|
1890
|
+
}
|
|
1891
|
+
|
|
1892
|
+
switch (typeof interpolation) {
|
|
1893
|
+
case 'boolean':
|
|
1894
|
+
{
|
|
1895
|
+
return '';
|
|
1896
|
+
}
|
|
1897
|
+
|
|
1898
|
+
case 'object':
|
|
1899
|
+
{
|
|
1900
|
+
if (interpolation.anim === 1) {
|
|
1901
|
+
cursor = {
|
|
1902
|
+
name: interpolation.name,
|
|
1903
|
+
styles: interpolation.styles,
|
|
1904
|
+
next: cursor
|
|
1905
|
+
};
|
|
1906
|
+
return interpolation.name;
|
|
1907
|
+
}
|
|
1908
|
+
|
|
1909
|
+
if (interpolation.styles !== undefined) {
|
|
1910
|
+
var next = interpolation.next;
|
|
1911
|
+
|
|
1912
|
+
if (next !== undefined) {
|
|
1913
|
+
// not the most efficient thing ever but this is a pretty rare case
|
|
1914
|
+
// and there will be very few iterations of this generally
|
|
1915
|
+
while (next !== undefined) {
|
|
1916
|
+
cursor = {
|
|
1917
|
+
name: next.name,
|
|
1918
|
+
styles: next.styles,
|
|
1919
|
+
next: cursor
|
|
1920
|
+
};
|
|
1921
|
+
next = next.next;
|
|
1922
|
+
}
|
|
1923
|
+
}
|
|
1924
|
+
|
|
1925
|
+
var styles = interpolation.styles + ";";
|
|
1926
|
+
|
|
1927
|
+
if (process.env.NODE_ENV !== 'production' && interpolation.map !== undefined) {
|
|
1928
|
+
styles += interpolation.map;
|
|
1929
|
+
}
|
|
1930
|
+
|
|
1931
|
+
return styles;
|
|
1932
|
+
}
|
|
1933
|
+
|
|
1934
|
+
return createStringFromObject(mergedProps, registered, interpolation);
|
|
1935
|
+
}
|
|
1936
|
+
|
|
1937
|
+
case 'function':
|
|
1938
|
+
{
|
|
1939
|
+
if (mergedProps !== undefined) {
|
|
1940
|
+
var previousCursor = cursor;
|
|
1941
|
+
var result = interpolation(mergedProps);
|
|
1942
|
+
cursor = previousCursor;
|
|
1943
|
+
return handleInterpolation(mergedProps, registered, result, couldBeSelectorInterpolation);
|
|
1944
|
+
} else if (process.env.NODE_ENV !== 'production') {
|
|
1945
|
+
console.error('Functions that are interpolated in css calls will be stringified.\n' + 'If you want to have a css call based on props, create a function that returns a css call like this\n' + 'let dynamicStyle = (props) => css`color: ${props.color}`\n' + 'It can be called directly with props or interpolated in a styled call like this\n' + "let SomeComponent = styled('div')`${dynamicStyle}`");
|
|
1946
|
+
}
|
|
1947
|
+
|
|
1948
|
+
break;
|
|
1949
|
+
}
|
|
1950
|
+
|
|
1951
|
+
case 'string':
|
|
1952
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1953
|
+
var matched = [];
|
|
1954
|
+
var replaced = interpolation.replace(animationRegex, function (match, p1, p2) {
|
|
1955
|
+
var fakeVarName = "animation" + matched.length;
|
|
1956
|
+
matched.push("const " + fakeVarName + " = keyframes`" + p2.replace(/^@keyframes animation-\w+/, '') + "`");
|
|
1957
|
+
return "${" + fakeVarName + "}";
|
|
1958
|
+
});
|
|
1959
|
+
|
|
1960
|
+
if (matched.length) {
|
|
1961
|
+
console.error('`keyframes` output got interpolated into plain string, please wrap it with `css`.\n\n' + 'Instead of doing this:\n\n' + [].concat(matched, ["`" + replaced + "`"]).join('\n') + '\n\nYou should wrap it with `css` like this:\n\n' + ("css`" + replaced + "`"));
|
|
1962
|
+
}
|
|
1963
|
+
}
|
|
1964
|
+
|
|
1965
|
+
break;
|
|
1966
|
+
} // finalize string values (regular strings and functions interpolated into css calls)
|
|
1967
|
+
|
|
1968
|
+
|
|
1969
|
+
if (registered == null) {
|
|
1970
|
+
return interpolation;
|
|
1971
|
+
}
|
|
1972
|
+
|
|
1973
|
+
var cached = registered[interpolation];
|
|
1974
|
+
|
|
1975
|
+
if (process.env.NODE_ENV !== 'production' && couldBeSelectorInterpolation && shouldWarnAboutInterpolatingClassNameFromCss && cached !== undefined) {
|
|
1976
|
+
console.error('Interpolating a className from css`` is not recommended and will cause problems with composition.\n' + 'Interpolating a className from css`` will be completely unsupported in a future major version of Emotion');
|
|
1977
|
+
shouldWarnAboutInterpolatingClassNameFromCss = false;
|
|
1978
|
+
}
|
|
1979
|
+
|
|
1980
|
+
return cached !== undefined && !couldBeSelectorInterpolation ? cached : interpolation;
|
|
1981
|
+
}
|
|
1982
|
+
|
|
1983
|
+
function createStringFromObject(mergedProps, registered, obj) {
|
|
1984
|
+
var string = '';
|
|
1985
|
+
|
|
1986
|
+
if (Array.isArray(obj)) {
|
|
1987
|
+
for (var i = 0; i < obj.length; i++) {
|
|
1988
|
+
string += handleInterpolation(mergedProps, registered, obj[i], false);
|
|
1989
|
+
}
|
|
1990
|
+
} else {
|
|
1991
|
+
for (var _key in obj) {
|
|
1992
|
+
var value = obj[_key];
|
|
1993
|
+
|
|
1994
|
+
if (typeof value !== 'object') {
|
|
1995
|
+
if (registered != null && registered[value] !== undefined) {
|
|
1996
|
+
string += _key + "{" + registered[value] + "}";
|
|
1997
|
+
} else if (isProcessableValue(value)) {
|
|
1998
|
+
string += processStyleName(_key) + ":" + processStyleValue(_key, value) + ";";
|
|
1999
|
+
}
|
|
2000
|
+
} else {
|
|
2001
|
+
if (_key === 'NO_COMPONENT_SELECTOR' && process.env.NODE_ENV !== 'production') {
|
|
2002
|
+
throw new Error('Component selectors can only be used in conjunction with babel-plugin-emotion.');
|
|
2003
|
+
}
|
|
2004
|
+
|
|
2005
|
+
if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null || registered[value[0]] === undefined)) {
|
|
2006
|
+
for (var _i = 0; _i < value.length; _i++) {
|
|
2007
|
+
if (isProcessableValue(value[_i])) {
|
|
2008
|
+
string += processStyleName(_key) + ":" + processStyleValue(_key, value[_i]) + ";";
|
|
2009
|
+
}
|
|
2010
|
+
}
|
|
2011
|
+
} else {
|
|
2012
|
+
var interpolated = handleInterpolation(mergedProps, registered, value, false);
|
|
2013
|
+
|
|
2014
|
+
switch (_key) {
|
|
2015
|
+
case 'animation':
|
|
2016
|
+
case 'animationName':
|
|
2017
|
+
{
|
|
2018
|
+
string += processStyleName(_key) + ":" + interpolated + ";";
|
|
2019
|
+
break;
|
|
2020
|
+
}
|
|
2021
|
+
|
|
2022
|
+
default:
|
|
2023
|
+
{
|
|
2024
|
+
if (process.env.NODE_ENV !== 'production' && _key === 'undefined') {
|
|
2025
|
+
console.error(UNDEFINED_AS_OBJECT_KEY_ERROR);
|
|
2026
|
+
}
|
|
2027
|
+
|
|
2028
|
+
string += _key + "{" + interpolated + "}";
|
|
2029
|
+
}
|
|
2030
|
+
}
|
|
2031
|
+
}
|
|
2032
|
+
}
|
|
2033
|
+
}
|
|
2034
|
+
}
|
|
2035
|
+
|
|
2036
|
+
return string;
|
|
2037
|
+
}
|
|
2038
|
+
|
|
2039
|
+
var labelPattern = /label:\s*([^\s;\n{]+)\s*;/g;
|
|
2040
|
+
var sourceMapPattern;
|
|
2041
|
+
|
|
2042
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2043
|
+
sourceMapPattern = /\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//;
|
|
2044
|
+
} // this is the cursor for keyframes
|
|
2045
|
+
// keyframes are stored on the SerializedStyles object as a linked list
|
|
2046
|
+
|
|
2047
|
+
|
|
2048
|
+
var cursor;
|
|
2049
|
+
var serializeStyles = function serializeStyles(args, registered, mergedProps) {
|
|
2050
|
+
if (args.length === 1 && typeof args[0] === 'object' && args[0] !== null && args[0].styles !== undefined) {
|
|
2051
|
+
return args[0];
|
|
2052
|
+
}
|
|
2053
|
+
|
|
2054
|
+
var stringMode = true;
|
|
2055
|
+
var styles = '';
|
|
2056
|
+
cursor = undefined;
|
|
2057
|
+
var strings = args[0];
|
|
2058
|
+
|
|
2059
|
+
if (strings == null || strings.raw === undefined) {
|
|
2060
|
+
stringMode = false;
|
|
2061
|
+
styles += handleInterpolation(mergedProps, registered, strings, false);
|
|
2062
|
+
} else {
|
|
2063
|
+
if (process.env.NODE_ENV !== 'production' && strings[0] === undefined) {
|
|
2064
|
+
console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);
|
|
2065
|
+
}
|
|
2066
|
+
|
|
2067
|
+
styles += strings[0];
|
|
2068
|
+
} // we start at 1 since we've already handled the first arg
|
|
2069
|
+
|
|
2070
|
+
|
|
2071
|
+
for (var i = 1; i < args.length; i++) {
|
|
2072
|
+
styles += handleInterpolation(mergedProps, registered, args[i], styles.charCodeAt(styles.length - 1) === 46);
|
|
2073
|
+
|
|
2074
|
+
if (stringMode) {
|
|
2075
|
+
if (process.env.NODE_ENV !== 'production' && strings[i] === undefined) {
|
|
2076
|
+
console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);
|
|
2077
|
+
}
|
|
2078
|
+
|
|
2079
|
+
styles += strings[i];
|
|
2080
|
+
}
|
|
2081
|
+
}
|
|
2082
|
+
|
|
2083
|
+
var sourceMap;
|
|
2084
|
+
|
|
2085
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2086
|
+
styles = styles.replace(sourceMapPattern, function (match) {
|
|
2087
|
+
sourceMap = match;
|
|
2088
|
+
return '';
|
|
2089
|
+
});
|
|
2090
|
+
} // using a global regex with .exec is stateful so lastIndex has to be reset each time
|
|
2091
|
+
|
|
2092
|
+
|
|
2093
|
+
labelPattern.lastIndex = 0;
|
|
2094
|
+
var identifierName = '';
|
|
2095
|
+
var match; // https://esbench.com/bench/5b809c2cf2949800a0f61fb5
|
|
2096
|
+
|
|
2097
|
+
while ((match = labelPattern.exec(styles)) !== null) {
|
|
2098
|
+
identifierName += '-' + // $FlowFixMe we know it's not null
|
|
2099
|
+
match[1];
|
|
2100
|
+
}
|
|
2101
|
+
|
|
2102
|
+
var name = murmur2(styles) + identifierName;
|
|
2103
|
+
|
|
2104
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2105
|
+
// $FlowFixMe SerializedStyles type doesn't have toString property (and we don't want to add it)
|
|
2106
|
+
return {
|
|
2107
|
+
name: name,
|
|
2108
|
+
styles: styles,
|
|
2109
|
+
map: sourceMap,
|
|
2110
|
+
next: cursor,
|
|
2111
|
+
toString: function toString() {
|
|
2112
|
+
return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
|
|
2113
|
+
}
|
|
2114
|
+
};
|
|
2115
|
+
}
|
|
2116
|
+
|
|
2117
|
+
return {
|
|
2118
|
+
name: name,
|
|
2119
|
+
styles: styles,
|
|
2120
|
+
next: cursor
|
|
2121
|
+
};
|
|
2122
|
+
};
|
|
2123
|
+
|
|
2124
|
+
var isBrowser = typeof document !== 'undefined';
|
|
2125
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
2126
|
+
|
|
2127
|
+
var EmotionCacheContext = /*#__PURE__*/React.createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case
|
|
2128
|
+
// because this module is primarily intended for the browser and node
|
|
2129
|
+
// but it's also required in react native and similar environments sometimes
|
|
2130
|
+
// and we could have a special build just for that
|
|
2131
|
+
// but this is much easier and the native packages
|
|
2132
|
+
// might use a different theme context in the future anyway
|
|
2133
|
+
typeof HTMLElement !== 'undefined' ? createCache() : null);
|
|
2134
|
+
var ThemeContext = /*#__PURE__*/React.createContext({});
|
|
2135
|
+
var CacheProvider = EmotionCacheContext.Provider;
|
|
2136
|
+
|
|
2137
|
+
var withEmotionCache = function withEmotionCache(func) {
|
|
2138
|
+
var render = function render(props, ref) {
|
|
2139
|
+
return /*#__PURE__*/React.createElement(EmotionCacheContext.Consumer, null, function (cache) {
|
|
2140
|
+
return func(props, cache, ref);
|
|
2141
|
+
});
|
|
2142
|
+
}; // $FlowFixMe
|
|
2143
|
+
|
|
2144
|
+
|
|
2145
|
+
return /*#__PURE__*/React.forwardRef(render);
|
|
2146
|
+
};
|
|
2147
|
+
|
|
2148
|
+
if (!isBrowser) {
|
|
2149
|
+
var BasicProvider = /*#__PURE__*/function (_React$Component) {
|
|
2150
|
+
inheritsLoose._inheritsLoose(BasicProvider, _React$Component);
|
|
2151
|
+
|
|
2152
|
+
function BasicProvider(props, context, updater) {
|
|
2153
|
+
var _this;
|
|
2154
|
+
|
|
2155
|
+
_this = _React$Component.call(this, props, context, updater) || this;
|
|
2156
|
+
_this.state = {
|
|
2157
|
+
value: createCache()
|
|
2158
|
+
};
|
|
2159
|
+
return _this;
|
|
2160
|
+
}
|
|
2161
|
+
|
|
2162
|
+
var _proto = BasicProvider.prototype;
|
|
2163
|
+
|
|
2164
|
+
_proto.render = function render() {
|
|
2165
|
+
return /*#__PURE__*/React.createElement(EmotionCacheContext.Provider, this.state, this.props.children(this.state.value));
|
|
2166
|
+
};
|
|
2167
|
+
|
|
2168
|
+
return BasicProvider;
|
|
2169
|
+
}(React.Component);
|
|
2170
|
+
|
|
2171
|
+
withEmotionCache = function withEmotionCache(func) {
|
|
2172
|
+
return function (props) {
|
|
2173
|
+
return /*#__PURE__*/React.createElement(EmotionCacheContext.Consumer, null, function (context) {
|
|
2174
|
+
if (context === null) {
|
|
2175
|
+
return /*#__PURE__*/React.createElement(BasicProvider, null, function (newContext) {
|
|
2176
|
+
return func(props, newContext);
|
|
2177
|
+
});
|
|
2178
|
+
} else {
|
|
2179
|
+
return func(props, context);
|
|
2180
|
+
}
|
|
2181
|
+
});
|
|
2182
|
+
};
|
|
2183
|
+
};
|
|
2184
|
+
}
|
|
2185
|
+
|
|
2186
|
+
// thus we only need to replace what is a valid character for JS, but not for CSS
|
|
2187
|
+
|
|
2188
|
+
var sanitizeIdentifier = function sanitizeIdentifier(identifier) {
|
|
2189
|
+
return identifier.replace(/\$/g, '-');
|
|
2190
|
+
};
|
|
2191
|
+
|
|
2192
|
+
var typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';
|
|
2193
|
+
var labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__';
|
|
2194
|
+
var createEmotionProps = function createEmotionProps(type, props) {
|
|
2195
|
+
if (process.env.NODE_ENV !== 'production' && typeof props.css === 'string' && // check if there is a css declaration
|
|
2196
|
+
props.css.indexOf(':') !== -1) {
|
|
2197
|
+
throw new Error("Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/css' like this: css`" + props.css + "`");
|
|
2198
|
+
}
|
|
2199
|
+
|
|
2200
|
+
var newProps = {};
|
|
2201
|
+
|
|
2202
|
+
for (var key in props) {
|
|
2203
|
+
if (hasOwnProperty.call(props, key)) {
|
|
2204
|
+
newProps[key] = props[key];
|
|
2205
|
+
}
|
|
2206
|
+
}
|
|
2207
|
+
|
|
2208
|
+
newProps[typePropName] = type; // TODO: check if this still works with all of those different JSX functions
|
|
2209
|
+
|
|
2210
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2211
|
+
var error = new Error();
|
|
2212
|
+
|
|
2213
|
+
if (error.stack) {
|
|
2214
|
+
// chrome
|
|
2215
|
+
var match = error.stack.match(/at (?:Object\.|Module\.|)(?:jsx|createEmotionProps).*\n\s+at (?:Object\.|)([A-Z][A-Za-z$]+) /);
|
|
2216
|
+
|
|
2217
|
+
if (!match) {
|
|
2218
|
+
// safari and firefox
|
|
2219
|
+
match = error.stack.match(/.*\n([A-Z][A-Za-z$]+)@/);
|
|
2220
|
+
}
|
|
2221
|
+
|
|
2222
|
+
if (match) {
|
|
2223
|
+
newProps[labelPropName] = sanitizeIdentifier(match[1]);
|
|
2224
|
+
}
|
|
2225
|
+
}
|
|
2226
|
+
}
|
|
2227
|
+
|
|
2228
|
+
return newProps;
|
|
2229
|
+
};
|
|
2230
|
+
|
|
2231
|
+
var render = function render(cache, props, theme, ref) {
|
|
2232
|
+
var cssProp = theme === null ? props.css : props.css(theme); // so that using `css` from `emotion` and passing the result to the css prop works
|
|
2233
|
+
// not passing the registered cache to serializeStyles because it would
|
|
2234
|
+
// make certain babel optimisations not possible
|
|
2235
|
+
|
|
2236
|
+
if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) {
|
|
2237
|
+
cssProp = cache.registered[cssProp];
|
|
2238
|
+
}
|
|
2239
|
+
|
|
2240
|
+
var type = props[typePropName];
|
|
2241
|
+
var registeredStyles = [cssProp];
|
|
2242
|
+
var className = '';
|
|
2243
|
+
|
|
2244
|
+
if (typeof props.className === 'string') {
|
|
2245
|
+
className = getRegisteredStyles(cache.registered, registeredStyles, props.className);
|
|
2246
|
+
} else if (props.className != null) {
|
|
2247
|
+
className = props.className + " ";
|
|
2248
|
+
}
|
|
2249
|
+
|
|
2250
|
+
var serialized = serializeStyles(registeredStyles);
|
|
2251
|
+
|
|
2252
|
+
if (process.env.NODE_ENV !== 'production' && serialized.name.indexOf('-') === -1) {
|
|
2253
|
+
var labelFromStack = props[labelPropName];
|
|
2254
|
+
|
|
2255
|
+
if (labelFromStack) {
|
|
2256
|
+
serialized = serializeStyles([serialized, 'label:' + labelFromStack + ';']);
|
|
2257
|
+
}
|
|
2258
|
+
}
|
|
2259
|
+
|
|
2260
|
+
var rules = insertStyles(cache, serialized, typeof type === 'string');
|
|
2261
|
+
className += cache.key + "-" + serialized.name;
|
|
2262
|
+
var newProps = {};
|
|
2263
|
+
|
|
2264
|
+
for (var key in props) {
|
|
2265
|
+
if (hasOwnProperty.call(props, key) && key !== 'css' && key !== typePropName && (process.env.NODE_ENV === 'production' || key !== labelPropName)) {
|
|
2266
|
+
newProps[key] = props[key];
|
|
2267
|
+
}
|
|
2268
|
+
}
|
|
2269
|
+
|
|
2270
|
+
newProps.ref = ref;
|
|
2271
|
+
newProps.className = className;
|
|
2272
|
+
var ele = /*#__PURE__*/React.createElement(type, newProps);
|
|
2273
|
+
|
|
2274
|
+
if (!isBrowser && rules !== undefined) {
|
|
2275
|
+
var _ref;
|
|
2276
|
+
|
|
2277
|
+
var serializedNames = serialized.name;
|
|
2278
|
+
var next = serialized.next;
|
|
2279
|
+
|
|
2280
|
+
while (next !== undefined) {
|
|
2281
|
+
serializedNames += ' ' + next.name;
|
|
2282
|
+
next = next.next;
|
|
2283
|
+
}
|
|
2284
|
+
|
|
2285
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("style", (_ref = {}, _ref["data-emotion-" + cache.key] = serializedNames, _ref.dangerouslySetInnerHTML = {
|
|
2286
|
+
__html: rules
|
|
2287
|
+
}, _ref.nonce = cache.sheet.nonce, _ref)), ele);
|
|
2288
|
+
}
|
|
2289
|
+
|
|
2290
|
+
return ele;
|
|
2291
|
+
}; // eslint-disable-next-line no-undef
|
|
2292
|
+
|
|
2293
|
+
|
|
2294
|
+
var Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {
|
|
2295
|
+
if (typeof props.css === 'function') {
|
|
2296
|
+
return /*#__PURE__*/React.createElement(ThemeContext.Consumer, null, function (theme) {
|
|
2297
|
+
return render(cache, props, theme, ref);
|
|
2298
|
+
});
|
|
2299
|
+
}
|
|
2300
|
+
|
|
2301
|
+
return render(cache, props, null, ref);
|
|
2302
|
+
});
|
|
2303
|
+
|
|
2304
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2305
|
+
Emotion.displayName = 'EmotionCssPropInternal';
|
|
2306
|
+
}
|
|
2307
|
+
|
|
2308
|
+
function css$1() {
|
|
2309
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
2310
|
+
args[_key] = arguments[_key];
|
|
2311
|
+
}
|
|
2312
|
+
|
|
2313
|
+
return serializeStyles(args);
|
|
2314
|
+
}
|
|
2315
|
+
|
|
2316
|
+
var jsx = function jsx(type, props) {
|
|
2317
|
+
var args = arguments;
|
|
2318
|
+
|
|
2319
|
+
if (props == null || !hasOwnProperty.call(props, 'css')) {
|
|
2320
|
+
// $FlowFixMe
|
|
2321
|
+
return React.createElement.apply(undefined, args);
|
|
2322
|
+
}
|
|
2323
|
+
|
|
2324
|
+
var argsLength = args.length;
|
|
2325
|
+
var createElementArgArray = new Array(argsLength);
|
|
2326
|
+
createElementArgArray[0] = Emotion;
|
|
2327
|
+
createElementArgArray[1] = createEmotionProps(type, props);
|
|
2328
|
+
|
|
2329
|
+
for (var i = 2; i < argsLength; i++) {
|
|
2330
|
+
createElementArgArray[i] = args[i];
|
|
2331
|
+
} // $FlowFixMe
|
|
2332
|
+
|
|
2333
|
+
|
|
2334
|
+
return React.createElement.apply(null, createElementArgArray);
|
|
2335
|
+
};
|
|
2336
|
+
|
|
2337
|
+
var warnedAboutCssPropForGlobal = false;
|
|
2338
|
+
var Global = /* #__PURE__ */withEmotionCache(function (props, cache) {
|
|
2339
|
+
if (process.env.NODE_ENV !== 'production' && !warnedAboutCssPropForGlobal && ( // check for className as well since the user is
|
|
2340
|
+
// probably using the custom createElement which
|
|
2341
|
+
// means it will be turned into a className prop
|
|
2342
|
+
// $FlowFixMe I don't really want to add it to the type since it shouldn't be used
|
|
2343
|
+
props.className || props.css)) {
|
|
2344
|
+
console.error("It looks like you're using the css prop on Global, did you mean to use the styles prop instead?");
|
|
2345
|
+
warnedAboutCssPropForGlobal = true;
|
|
2346
|
+
}
|
|
2347
|
+
|
|
2348
|
+
var styles = props.styles;
|
|
2349
|
+
|
|
2350
|
+
if (typeof styles === 'function') {
|
|
2351
|
+
return /*#__PURE__*/React.createElement(ThemeContext.Consumer, null, function (theme) {
|
|
2352
|
+
var serialized = serializeStyles([styles(theme)]);
|
|
2353
|
+
return /*#__PURE__*/React.createElement(InnerGlobal, {
|
|
2354
|
+
serialized: serialized,
|
|
2355
|
+
cache: cache
|
|
2356
|
+
});
|
|
2357
|
+
});
|
|
2358
|
+
}
|
|
2359
|
+
|
|
2360
|
+
var serialized = serializeStyles([styles]);
|
|
2361
|
+
return /*#__PURE__*/React.createElement(InnerGlobal, {
|
|
2362
|
+
serialized: serialized,
|
|
2363
|
+
cache: cache
|
|
2364
|
+
});
|
|
2365
|
+
});
|
|
2366
|
+
|
|
2367
|
+
// maintain place over rerenders.
|
|
2368
|
+
// initial render from browser, insertBefore context.sheet.tags[0] or if a style hasn't been inserted there yet, appendChild
|
|
2369
|
+
// initial client-side render from SSR, use place of hydrating tag
|
|
2370
|
+
var InnerGlobal = /*#__PURE__*/function (_React$Component) {
|
|
2371
|
+
inheritsLoose._inheritsLoose(InnerGlobal, _React$Component);
|
|
2372
|
+
|
|
2373
|
+
function InnerGlobal(props, context, updater) {
|
|
2374
|
+
return _React$Component.call(this, props, context, updater) || this;
|
|
2375
|
+
}
|
|
2376
|
+
|
|
2377
|
+
var _proto = InnerGlobal.prototype;
|
|
2378
|
+
|
|
2379
|
+
_proto.componentDidMount = function componentDidMount() {
|
|
2380
|
+
this.sheet = new StyleSheet({
|
|
2381
|
+
key: this.props.cache.key + "-global",
|
|
2382
|
+
nonce: this.props.cache.sheet.nonce,
|
|
2383
|
+
container: this.props.cache.sheet.container
|
|
2384
|
+
}); // $FlowFixMe
|
|
2385
|
+
|
|
2386
|
+
var node = document.querySelector("style[data-emotion-" + this.props.cache.key + "=\"" + this.props.serialized.name + "\"]");
|
|
2387
|
+
|
|
2388
|
+
if (node !== null) {
|
|
2389
|
+
this.sheet.tags.push(node);
|
|
2390
|
+
}
|
|
2391
|
+
|
|
2392
|
+
if (this.props.cache.sheet.tags.length) {
|
|
2393
|
+
this.sheet.before = this.props.cache.sheet.tags[0];
|
|
2394
|
+
}
|
|
2395
|
+
|
|
2396
|
+
this.insertStyles();
|
|
2397
|
+
};
|
|
2398
|
+
|
|
2399
|
+
_proto.componentDidUpdate = function componentDidUpdate(prevProps) {
|
|
2400
|
+
if (prevProps.serialized.name !== this.props.serialized.name) {
|
|
2401
|
+
this.insertStyles();
|
|
2402
|
+
}
|
|
2403
|
+
};
|
|
2404
|
+
|
|
2405
|
+
_proto.insertStyles = function insertStyles$1() {
|
|
2406
|
+
if (this.props.serialized.next !== undefined) {
|
|
2407
|
+
// insert keyframes
|
|
2408
|
+
insertStyles(this.props.cache, this.props.serialized.next, true);
|
|
2409
|
+
}
|
|
2410
|
+
|
|
2411
|
+
if (this.sheet.tags.length) {
|
|
2412
|
+
// if this doesn't exist then it will be null so the style element will be appended
|
|
2413
|
+
var element = this.sheet.tags[this.sheet.tags.length - 1].nextElementSibling;
|
|
2414
|
+
this.sheet.before = element;
|
|
2415
|
+
this.sheet.flush();
|
|
2416
|
+
}
|
|
2417
|
+
|
|
2418
|
+
this.props.cache.insert("", this.props.serialized, this.sheet, false);
|
|
2419
|
+
};
|
|
2420
|
+
|
|
2421
|
+
_proto.componentWillUnmount = function componentWillUnmount() {
|
|
2422
|
+
this.sheet.flush();
|
|
2423
|
+
};
|
|
2424
|
+
|
|
2425
|
+
_proto.render = function render() {
|
|
2426
|
+
if (!isBrowser) {
|
|
2427
|
+
var serialized = this.props.serialized;
|
|
2428
|
+
var serializedNames = serialized.name;
|
|
2429
|
+
var serializedStyles = serialized.styles;
|
|
2430
|
+
var next = serialized.next;
|
|
2431
|
+
|
|
2432
|
+
while (next !== undefined) {
|
|
2433
|
+
serializedNames += ' ' + next.name;
|
|
2434
|
+
serializedStyles += next.styles;
|
|
2435
|
+
next = next.next;
|
|
2436
|
+
}
|
|
2437
|
+
|
|
2438
|
+
var shouldCache = this.props.cache.compat === true;
|
|
2439
|
+
var rules = this.props.cache.insert("", {
|
|
2440
|
+
name: serializedNames,
|
|
2441
|
+
styles: serializedStyles
|
|
2442
|
+
}, this.sheet, shouldCache);
|
|
2443
|
+
|
|
2444
|
+
if (!shouldCache) {
|
|
2445
|
+
var _ref;
|
|
2446
|
+
|
|
2447
|
+
return /*#__PURE__*/React.createElement("style", (_ref = {}, _ref["data-emotion-" + this.props.cache.key] = serializedNames, _ref.dangerouslySetInnerHTML = {
|
|
2448
|
+
__html: rules
|
|
2449
|
+
}, _ref.nonce = this.props.cache.sheet.nonce, _ref));
|
|
2450
|
+
}
|
|
2451
|
+
}
|
|
2452
|
+
|
|
2453
|
+
return null;
|
|
2454
|
+
};
|
|
2455
|
+
|
|
2456
|
+
return InnerGlobal;
|
|
2457
|
+
}(React.Component);
|
|
2458
|
+
|
|
2459
|
+
var keyframes = function keyframes() {
|
|
2460
|
+
var insertable = css$1.apply(void 0, arguments);
|
|
2461
|
+
var name = "animation-" + insertable.name; // $FlowFixMe
|
|
2462
|
+
|
|
2463
|
+
return {
|
|
2464
|
+
name: name,
|
|
2465
|
+
styles: "@keyframes " + name + "{" + insertable.styles + "}",
|
|
2466
|
+
anim: 1,
|
|
2467
|
+
toString: function toString() {
|
|
2468
|
+
return "_EMO_" + this.name + "_" + this.styles + "_EMO_";
|
|
2469
|
+
}
|
|
2470
|
+
};
|
|
2471
|
+
};
|
|
2472
|
+
|
|
2473
|
+
var classnames = function classnames(args) {
|
|
2474
|
+
var len = args.length;
|
|
2475
|
+
var i = 0;
|
|
2476
|
+
var cls = '';
|
|
2477
|
+
|
|
2478
|
+
for (; i < len; i++) {
|
|
2479
|
+
var arg = args[i];
|
|
2480
|
+
if (arg == null) continue;
|
|
2481
|
+
var toAdd = void 0;
|
|
2482
|
+
|
|
2483
|
+
switch (typeof arg) {
|
|
2484
|
+
case 'boolean':
|
|
2485
|
+
break;
|
|
2486
|
+
|
|
2487
|
+
case 'object':
|
|
2488
|
+
{
|
|
2489
|
+
if (Array.isArray(arg)) {
|
|
2490
|
+
toAdd = classnames(arg);
|
|
2491
|
+
} else {
|
|
2492
|
+
toAdd = '';
|
|
2493
|
+
|
|
2494
|
+
for (var k in arg) {
|
|
2495
|
+
if (arg[k] && k) {
|
|
2496
|
+
toAdd && (toAdd += ' ');
|
|
2497
|
+
toAdd += k;
|
|
2498
|
+
}
|
|
2499
|
+
}
|
|
2500
|
+
}
|
|
2501
|
+
|
|
2502
|
+
break;
|
|
2503
|
+
}
|
|
2504
|
+
|
|
2505
|
+
default:
|
|
2506
|
+
{
|
|
2507
|
+
toAdd = arg;
|
|
2508
|
+
}
|
|
2509
|
+
}
|
|
2510
|
+
|
|
2511
|
+
if (toAdd) {
|
|
2512
|
+
cls && (cls += ' ');
|
|
2513
|
+
cls += toAdd;
|
|
2514
|
+
}
|
|
2515
|
+
}
|
|
2516
|
+
|
|
2517
|
+
return cls;
|
|
2518
|
+
};
|
|
2519
|
+
|
|
2520
|
+
function merge(registered, css, className) {
|
|
2521
|
+
var registeredStyles = [];
|
|
2522
|
+
var rawClassName = getRegisteredStyles(registered, registeredStyles, className);
|
|
2523
|
+
|
|
2524
|
+
if (registeredStyles.length < 2) {
|
|
2525
|
+
return className;
|
|
2526
|
+
}
|
|
2527
|
+
|
|
2528
|
+
return rawClassName + css(registeredStyles);
|
|
2529
|
+
}
|
|
2530
|
+
|
|
2531
|
+
var ClassNames = withEmotionCache(function (props, context) {
|
|
2532
|
+
return /*#__PURE__*/React.createElement(ThemeContext.Consumer, null, function (theme) {
|
|
2533
|
+
var rules = '';
|
|
2534
|
+
var serializedHashes = '';
|
|
2535
|
+
var hasRendered = false;
|
|
2536
|
+
|
|
2537
|
+
var css = function css() {
|
|
2538
|
+
if (hasRendered && process.env.NODE_ENV !== 'production') {
|
|
2539
|
+
throw new Error('css can only be used during render');
|
|
2540
|
+
}
|
|
2541
|
+
|
|
2542
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
2543
|
+
args[_key] = arguments[_key];
|
|
2544
|
+
}
|
|
2545
|
+
|
|
2546
|
+
var serialized = serializeStyles(args, context.registered);
|
|
2547
|
+
|
|
2548
|
+
if (isBrowser) {
|
|
2549
|
+
insertStyles(context, serialized, false);
|
|
2550
|
+
} else {
|
|
2551
|
+
var res = insertStyles(context, serialized, false);
|
|
2552
|
+
|
|
2553
|
+
if (res !== undefined) {
|
|
2554
|
+
rules += res;
|
|
2555
|
+
}
|
|
2556
|
+
}
|
|
2557
|
+
|
|
2558
|
+
if (!isBrowser) {
|
|
2559
|
+
serializedHashes += " " + serialized.name;
|
|
2560
|
+
}
|
|
2561
|
+
|
|
2562
|
+
return context.key + "-" + serialized.name;
|
|
2563
|
+
};
|
|
2564
|
+
|
|
2565
|
+
var cx = function cx() {
|
|
2566
|
+
if (hasRendered && process.env.NODE_ENV !== 'production') {
|
|
2567
|
+
throw new Error('cx can only be used during render');
|
|
2568
|
+
}
|
|
2569
|
+
|
|
2570
|
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
2571
|
+
args[_key2] = arguments[_key2];
|
|
2572
|
+
}
|
|
2573
|
+
|
|
2574
|
+
return merge(context.registered, css, classnames(args));
|
|
2575
|
+
};
|
|
2576
|
+
|
|
2577
|
+
var content = {
|
|
2578
|
+
css: css,
|
|
2579
|
+
cx: cx,
|
|
2580
|
+
theme: theme
|
|
2581
|
+
};
|
|
2582
|
+
var ele = props.children(content);
|
|
2583
|
+
hasRendered = true;
|
|
2584
|
+
|
|
2585
|
+
if (!isBrowser && rules.length !== 0) {
|
|
2586
|
+
var _ref;
|
|
2587
|
+
|
|
2588
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("style", (_ref = {}, _ref["data-emotion-" + context.key] = serializedHashes.substring(1), _ref.dangerouslySetInnerHTML = {
|
|
2589
|
+
__html: rules
|
|
2590
|
+
}, _ref.nonce = context.sheet.nonce, _ref)), ele);
|
|
2591
|
+
}
|
|
2592
|
+
|
|
2593
|
+
return ele;
|
|
2594
|
+
});
|
|
2595
|
+
});
|
|
2596
|
+
|
|
2597
|
+
var core_esm = /*#__PURE__*/Object.freeze({
|
|
2598
|
+
__proto__: null,
|
|
2599
|
+
ClassNames: ClassNames,
|
|
2600
|
+
Global: Global,
|
|
2601
|
+
createElement: jsx,
|
|
2602
|
+
jsx: jsx,
|
|
2603
|
+
keyframes: keyframes,
|
|
2604
|
+
CacheProvider: CacheProvider,
|
|
2605
|
+
ThemeContext: ThemeContext,
|
|
2606
|
+
get withEmotionCache () { return withEmotionCache; },
|
|
2607
|
+
css: css$1
|
|
2608
|
+
});
|
|
2609
|
+
|
|
2610
|
+
var skeleton = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
2611
|
+
|
|
2612
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2613
|
+
value: true
|
|
2614
|
+
});
|
|
2615
|
+
exports.default = Skeleton;
|
|
2616
|
+
exports.skeletonStyles = exports.skeletonKeyframes = exports.defaultHighlightColor = exports.defaultBaseColor = void 0;
|
|
2617
|
+
|
|
2618
|
+
_interopRequireDefault(React__default['default']);
|
|
2619
|
+
|
|
2620
|
+
|
|
2621
|
+
|
|
2622
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2623
|
+
|
|
2624
|
+
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; }
|
|
2625
|
+
|
|
2626
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
2627
|
+
|
|
2628
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2629
|
+
|
|
2630
|
+
function _templateObject() {
|
|
2631
|
+
var data = _taggedTemplateLiteral(["\n 0% {\n background-position: -200px 0;\n }\n ", "\n 100% {\n background-position: calc(200px + 100%) 0;\n }\n"]);
|
|
2632
|
+
|
|
2633
|
+
_templateObject = function _templateObject() {
|
|
2634
|
+
return data;
|
|
2635
|
+
};
|
|
2636
|
+
|
|
2637
|
+
return data;
|
|
2638
|
+
}
|
|
2639
|
+
|
|
2640
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
2641
|
+
|
|
2642
|
+
var defaultBaseColor = "#eee";
|
|
2643
|
+
exports.defaultBaseColor = defaultBaseColor;
|
|
2644
|
+
var defaultHighlightColor = "#f5f5f5";
|
|
2645
|
+
exports.defaultHighlightColor = defaultHighlightColor;
|
|
2646
|
+
|
|
2647
|
+
var skeletonKeyframes = function skeletonKeyframes(duration, delay) {
|
|
2648
|
+
return (0, core_esm.keyframes)(_templateObject(), delay > 0 ? "".concat(Math.floor(1 / (duration + delay) * duration * 100), "% {\n background-position: calc(200px + 100%) 0;\n }") : undefined);
|
|
2649
|
+
};
|
|
2650
|
+
|
|
2651
|
+
exports.skeletonKeyframes = skeletonKeyframes;
|
|
2652
|
+
var skeletonStyles =
|
|
2653
|
+
/*#__PURE__*/
|
|
2654
|
+
(0, core_esm.css)("background-color:", defaultBaseColor, ";background-image:linear-gradient( 90deg,", defaultBaseColor, ",", defaultHighlightColor, ",", defaultBaseColor, " );background-size:200px 100%;background-repeat:no-repeat;border-radius:4px;display:inline-block;line-height:1;width:100%;;label:skeletonStyles;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9za2VsZXRvbi5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF1QmlDIiwiZmlsZSI6Ii4uL3NyYy9za2VsZXRvbi5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBSZWFjdCBmcm9tIFwicmVhY3RcIjtcbmltcG9ydCB7IGNzcywga2V5ZnJhbWVzIH0gZnJvbSBcIkBlbW90aW9uL2NvcmVcIjtcblxuZXhwb3J0IGNvbnN0IGRlZmF1bHRCYXNlQ29sb3IgPSBcIiNlZWVcIjtcblxuZXhwb3J0IGNvbnN0IGRlZmF1bHRIaWdobGlnaHRDb2xvciA9IFwiI2Y1ZjVmNVwiO1xuXG5leHBvcnQgY29uc3Qgc2tlbGV0b25LZXlmcmFtZXMgPSAoZHVyYXRpb24sIGRlbGF5KSA9PiBrZXlmcmFtZXNgXG4gIDAlIHtcbiAgICBiYWNrZ3JvdW5kLXBvc2l0aW9uOiAtMjAwcHggMDtcbiAgfVxuICAke1xuICAgIGRlbGF5ID4gMFxuICAgICAgPyBgJHtNYXRoLmZsb29yKCgxIC8gKGR1cmF0aW9uICsgZGVsYXkpKSAqIGR1cmF0aW9uICogMTAwKX0lIHtcbiAgICBiYWNrZ3JvdW5kLXBvc2l0aW9uOiBjYWxjKDIwMHB4ICsgMTAwJSkgMDtcbiAgfWBcbiAgICAgIDogdW5kZWZpbmVkXG4gIH1cbiAgMTAwJSB7XG4gICAgYmFja2dyb3VuZC1wb3NpdGlvbjogY2FsYygyMDBweCArIDEwMCUpIDA7XG4gIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBza2VsZXRvblN0eWxlcyA9IGNzc2BcbiAgYmFja2dyb3VuZC1jb2xvcjogJHtkZWZhdWx0QmFzZUNvbG9yfTtcbiAgYmFja2dyb3VuZC1pbWFnZTogbGluZWFyLWdyYWRpZW50KFxuICAgIDkwZGVnLFxuICAgICR7ZGVmYXVsdEJhc2VDb2xvcn0sXG4gICAgJHtkZWZhdWx0SGlnaGxpZ2h0Q29sb3J9LFxuICAgICR7ZGVmYXVsdEJhc2VDb2xvcn1cbiAgKTtcbiAgYmFja2dyb3VuZC1zaXplOiAyMDBweCAxMDAlO1xuICBiYWNrZ3JvdW5kLXJlcGVhdDogbm8tcmVwZWF0O1xuICBib3JkZXItcmFkaXVzOiA0cHg7XG4gIGRpc3BsYXk6IGlubGluZS1ibG9jaztcbiAgbGluZS1oZWlnaHQ6IDE7XG4gIHdpZHRoOiAxMDAlO1xuYDtcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gU2tlbGV0b24oe1xuICBjb3VudCxcbiAgZHVyYXRpb24sXG4gIHdpZHRoLFxuICB3cmFwcGVyOiBXcmFwcGVyLFxuICBoZWlnaHQsXG4gIGNpcmNsZSxcbiAgZGVsYXksXG4gIHN0eWxlOiBjdXN0b21TdHlsZSxcbiAgY2xhc3NOYW1lOiBjdXN0b21DbGFzc05hbWVcbn0pIHtcbiAgY29uc3QgZWxlbWVudHMgPSBbXTtcblxuICBmb3IgKGxldCBpID0gMDsgaSA8IGNvdW50OyBpKyspIHtcbiAgICBsZXQgc3R5bGUgPSB7fTtcblxuICAgIGlmICh3aWR0aCAhPT0gbnVsbCkge1xuICAgICAgc3R5bGUud2lkdGggPSB3aWR0aDtcbiAgICB9XG5cbiAgICBpZiAoaGVpZ2h0ICE9PSBudWxsKSB7XG4gICAgICBzdHlsZS5oZWlnaHQgPSBoZWlnaHQ7XG4gICAgfVxuXG4gICAgaWYgKHdpZHRoICE9PSBudWxsICYmIGhlaWdodCAhPT0gbnVsbCAmJiBjaXJjbGUpIHtcbiAgICAgIHN0eWxlLmJvcmRlclJhZGl1cyA9IFwiNTAlXCI7XG4gICAgfVxuXG4gICAgbGV0IGNsYXNzTmFtZSA9IFwicmVhY3QtbG9hZGluZy1za2VsZXRvblwiO1xuICAgIGlmIChjdXN0b21DbGFzc05hbWUpIHtcbiAgICAgIGNsYXNzTmFtZSArPSBcIiBcIiArIGN1c3RvbUNsYXNzTmFtZTtcbiAgICB9XG5cbiAgICBlbGVtZW50cy5wdXNoKFxuICAgICAgPHNwYW5cbiAgICAgICAga2V5PXtpfVxuICAgICAgICBjbGFzc05hbWU9e2NsYXNzTmFtZX1cbiAgICAgICAgY3NzPXtjc3NgXG4gICAgICAgICAgJHtza2VsZXRvblN0eWxlc31cbiAgICAgICAgICBhbmltYXRpb246ICR7c2tlbGV0b25LZXlmcmFtZXMoZHVyYXRpb24sIGRlbGF5KX0gJHtkdXJhdGlvbiArXG4gICAgICAgICAgZGVsYXl9cyBlYXNlLWluLW91dCBpbmZpbml0ZVxuICAgICAgICBgfVxuICAgICAgICBzdHlsZT17e1xuICAgICAgICAgIC4uLmN1c3RvbVN0eWxlLFxuICAgICAgICAgIC4uLnN0eWxlXG4gICAgICAgIH19XG4gICAgICA+XG4gICAgICAgICZ6d25qO1xuICAgICAgPC9zcGFuPlxuICAgICk7XG4gIH1cblxuICByZXR1cm4gKFxuICAgIDxzcGFuPlxuICAgICAge1dyYXBwZXJcbiAgICAgICAgPyBlbGVtZW50cy5tYXAoKGVsZW1lbnQsIGkpID0+IChcbiAgICAgICAgICAgIDxXcmFwcGVyIGtleT17aX0+XG4gICAgICAgICAgICAgIHtlbGVtZW50fVxuICAgICAgICAgICAgICAmenduajtcbiAgICAgICAgICAgIDwvV3JhcHBlcj5cbiAgICAgICAgICApKVxuICAgICAgICA6IGVsZW1lbnRzfVxuICAgIDwvc3Bhbj5cbiAgKTtcbn1cblxuU2tlbGV0b24uZGVmYXVsdFByb3BzID0ge1xuICBjb3VudDogMSxcbiAgZHVyYXRpb246IDEuMixcbiAgd2lkdGg6IG51bGwsXG4gIHdyYXBwZXI6IG51bGwsXG4gIGhlaWdodDogbnVsbCxcbiAgY2lyY2xlOiBmYWxzZSxcbiAgZGVsYXk6IDBcbn07XG4iXX0= */"));
|
|
2655
|
+
exports.skeletonStyles = skeletonStyles;
|
|
2656
|
+
|
|
2657
|
+
function Skeleton(_ref) {
|
|
2658
|
+
var count = _ref.count,
|
|
2659
|
+
duration = _ref.duration,
|
|
2660
|
+
width = _ref.width,
|
|
2661
|
+
Wrapper = _ref.wrapper,
|
|
2662
|
+
height = _ref.height,
|
|
2663
|
+
circle = _ref.circle,
|
|
2664
|
+
delay = _ref.delay,
|
|
2665
|
+
customStyle = _ref.style,
|
|
2666
|
+
customClassName = _ref.className;
|
|
2667
|
+
var elements = [];
|
|
2668
|
+
|
|
2669
|
+
for (var i = 0; i < count; i++) {
|
|
2670
|
+
var style = {};
|
|
2671
|
+
|
|
2672
|
+
if (width !== null) {
|
|
2673
|
+
style.width = width;
|
|
2674
|
+
}
|
|
2675
|
+
|
|
2676
|
+
if (height !== null) {
|
|
2677
|
+
style.height = height;
|
|
2678
|
+
}
|
|
2679
|
+
|
|
2680
|
+
if (width !== null && height !== null && circle) {
|
|
2681
|
+
style.borderRadius = "50%";
|
|
2682
|
+
}
|
|
2683
|
+
|
|
2684
|
+
var className = "react-loading-skeleton";
|
|
2685
|
+
|
|
2686
|
+
if (customClassName) {
|
|
2687
|
+
className += " " + customClassName;
|
|
2688
|
+
}
|
|
2689
|
+
|
|
2690
|
+
elements.push((0, core_esm.jsx)("span", {
|
|
2691
|
+
key: i,
|
|
2692
|
+
className: className,
|
|
2693
|
+
css:
|
|
2694
|
+
/*#__PURE__*/
|
|
2695
|
+
(0, core_esm.css)(skeletonStyles, " animation:", skeletonKeyframes(duration, delay), " ", duration + delay, "s ease-in-out infinite;label:Skeleton;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9za2VsZXRvbi5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUE0RWdCIiwiZmlsZSI6Ii4uL3NyYy9za2VsZXRvbi5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBSZWFjdCBmcm9tIFwicmVhY3RcIjtcbmltcG9ydCB7IGNzcywga2V5ZnJhbWVzIH0gZnJvbSBcIkBlbW90aW9uL2NvcmVcIjtcblxuZXhwb3J0IGNvbnN0IGRlZmF1bHRCYXNlQ29sb3IgPSBcIiNlZWVcIjtcblxuZXhwb3J0IGNvbnN0IGRlZmF1bHRIaWdobGlnaHRDb2xvciA9IFwiI2Y1ZjVmNVwiO1xuXG5leHBvcnQgY29uc3Qgc2tlbGV0b25LZXlmcmFtZXMgPSAoZHVyYXRpb24sIGRlbGF5KSA9PiBrZXlmcmFtZXNgXG4gIDAlIHtcbiAgICBiYWNrZ3JvdW5kLXBvc2l0aW9uOiAtMjAwcHggMDtcbiAgfVxuICAke1xuICAgIGRlbGF5ID4gMFxuICAgICAgPyBgJHtNYXRoLmZsb29yKCgxIC8gKGR1cmF0aW9uICsgZGVsYXkpKSAqIGR1cmF0aW9uICogMTAwKX0lIHtcbiAgICBiYWNrZ3JvdW5kLXBvc2l0aW9uOiBjYWxjKDIwMHB4ICsgMTAwJSkgMDtcbiAgfWBcbiAgICAgIDogdW5kZWZpbmVkXG4gIH1cbiAgMTAwJSB7XG4gICAgYmFja2dyb3VuZC1wb3NpdGlvbjogY2FsYygyMDBweCArIDEwMCUpIDA7XG4gIH1cbmA7XG5cbmV4cG9ydCBjb25zdCBza2VsZXRvblN0eWxlcyA9IGNzc2BcbiAgYmFja2dyb3VuZC1jb2xvcjogJHtkZWZhdWx0QmFzZUNvbG9yfTtcbiAgYmFja2dyb3VuZC1pbWFnZTogbGluZWFyLWdyYWRpZW50KFxuICAgIDkwZGVnLFxuICAgICR7ZGVmYXVsdEJhc2VDb2xvcn0sXG4gICAgJHtkZWZhdWx0SGlnaGxpZ2h0Q29sb3J9LFxuICAgICR7ZGVmYXVsdEJhc2VDb2xvcn1cbiAgKTtcbiAgYmFja2dyb3VuZC1zaXplOiAyMDBweCAxMDAlO1xuICBiYWNrZ3JvdW5kLXJlcGVhdDogbm8tcmVwZWF0O1xuICBib3JkZXItcmFkaXVzOiA0cHg7XG4gIGRpc3BsYXk6IGlubGluZS1ibG9jaztcbiAgbGluZS1oZWlnaHQ6IDE7XG4gIHdpZHRoOiAxMDAlO1xuYDtcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gU2tlbGV0b24oe1xuICBjb3VudCxcbiAgZHVyYXRpb24sXG4gIHdpZHRoLFxuICB3cmFwcGVyOiBXcmFwcGVyLFxuICBoZWlnaHQsXG4gIGNpcmNsZSxcbiAgZGVsYXksXG4gIHN0eWxlOiBjdXN0b21TdHlsZSxcbiAgY2xhc3NOYW1lOiBjdXN0b21DbGFzc05hbWVcbn0pIHtcbiAgY29uc3QgZWxlbWVudHMgPSBbXTtcblxuICBmb3IgKGxldCBpID0gMDsgaSA8IGNvdW50OyBpKyspIHtcbiAgICBsZXQgc3R5bGUgPSB7fTtcblxuICAgIGlmICh3aWR0aCAhPT0gbnVsbCkge1xuICAgICAgc3R5bGUud2lkdGggPSB3aWR0aDtcbiAgICB9XG5cbiAgICBpZiAoaGVpZ2h0ICE9PSBudWxsKSB7XG4gICAgICBzdHlsZS5oZWlnaHQgPSBoZWlnaHQ7XG4gICAgfVxuXG4gICAgaWYgKHdpZHRoICE9PSBudWxsICYmIGhlaWdodCAhPT0gbnVsbCAmJiBjaXJjbGUpIHtcbiAgICAgIHN0eWxlLmJvcmRlclJhZGl1cyA9IFwiNTAlXCI7XG4gICAgfVxuXG4gICAgbGV0IGNsYXNzTmFtZSA9IFwicmVhY3QtbG9hZGluZy1za2VsZXRvblwiO1xuICAgIGlmIChjdXN0b21DbGFzc05hbWUpIHtcbiAgICAgIGNsYXNzTmFtZSArPSBcIiBcIiArIGN1c3RvbUNsYXNzTmFtZTtcbiAgICB9XG5cbiAgICBlbGVtZW50cy5wdXNoKFxuICAgICAgPHNwYW5cbiAgICAgICAga2V5PXtpfVxuICAgICAgICBjbGFzc05hbWU9e2NsYXNzTmFtZX1cbiAgICAgICAgY3NzPXtjc3NgXG4gICAgICAgICAgJHtza2VsZXRvblN0eWxlc31cbiAgICAgICAgICBhbmltYXRpb246ICR7c2tlbGV0b25LZXlmcmFtZXMoZHVyYXRpb24sIGRlbGF5KX0gJHtkdXJhdGlvbiArXG4gICAgICAgICAgZGVsYXl9cyBlYXNlLWluLW91dCBpbmZpbml0ZVxuICAgICAgICBgfVxuICAgICAgICBzdHlsZT17e1xuICAgICAgICAgIC4uLmN1c3RvbVN0eWxlLFxuICAgICAgICAgIC4uLnN0eWxlXG4gICAgICAgIH19XG4gICAgICA+XG4gICAgICAgICZ6d25qO1xuICAgICAgPC9zcGFuPlxuICAgICk7XG4gIH1cblxuICByZXR1cm4gKFxuICAgIDxzcGFuPlxuICAgICAge1dyYXBwZXJcbiAgICAgICAgPyBlbGVtZW50cy5tYXAoKGVsZW1lbnQsIGkpID0+IChcbiAgICAgICAgICAgIDxXcmFwcGVyIGtleT17aX0+XG4gICAgICAgICAgICAgIHtlbGVtZW50fVxuICAgICAgICAgICAgICAmenduajtcbiAgICAgICAgICAgIDwvV3JhcHBlcj5cbiAgICAgICAgICApKVxuICAgICAgICA6IGVsZW1lbnRzfVxuICAgIDwvc3Bhbj5cbiAgKTtcbn1cblxuU2tlbGV0b24uZGVmYXVsdFByb3BzID0ge1xuICBjb3VudDogMSxcbiAgZHVyYXRpb246IDEuMixcbiAgd2lkdGg6IG51bGwsXG4gIHdyYXBwZXI6IG51bGwsXG4gIGhlaWdodDogbnVsbCxcbiAgY2lyY2xlOiBmYWxzZSxcbiAgZGVsYXk6IDBcbn07XG4iXX0= */")),
|
|
2696
|
+
style: _objectSpread({}, customStyle, {}, style)
|
|
2697
|
+
}, "\u200C"));
|
|
2698
|
+
}
|
|
2699
|
+
|
|
2700
|
+
return (0, core_esm.jsx)("span", null, Wrapper ? elements.map(function (element, i) {
|
|
2701
|
+
return (0, core_esm.jsx)(Wrapper, {
|
|
2702
|
+
key: i
|
|
2703
|
+
}, element, "\u200C");
|
|
2704
|
+
}) : elements);
|
|
2705
|
+
}
|
|
2706
|
+
|
|
2707
|
+
Skeleton.defaultProps = {
|
|
2708
|
+
count: 1,
|
|
2709
|
+
duration: 1.2,
|
|
2710
|
+
width: null,
|
|
2711
|
+
wrapper: null,
|
|
2712
|
+
height: null,
|
|
2713
|
+
circle: false,
|
|
2714
|
+
delay: 0
|
|
2715
|
+
};
|
|
2716
|
+
});
|
|
2717
|
+
|
|
2718
|
+
_commonjsHelpers.unwrapExports(skeleton);
|
|
2719
|
+
skeleton.skeletonStyles;
|
|
2720
|
+
skeleton.skeletonKeyframes;
|
|
2721
|
+
skeleton.defaultHighlightColor;
|
|
2722
|
+
skeleton.defaultBaseColor;
|
|
2723
|
+
|
|
2724
|
+
var skeletonTheme = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
2725
|
+
|
|
2726
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2727
|
+
value: true
|
|
2728
|
+
});
|
|
2729
|
+
exports.default = void 0;
|
|
2730
|
+
|
|
2731
|
+
var _react = _interopRequireWildcard(React__default['default']);
|
|
2732
|
+
|
|
2733
|
+
|
|
2734
|
+
|
|
2735
|
+
|
|
2736
|
+
|
|
2737
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
2738
|
+
|
|
2739
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
2740
|
+
|
|
2741
|
+
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
2742
|
+
|
|
2743
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
2744
|
+
|
|
2745
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
2746
|
+
|
|
2747
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
2748
|
+
|
|
2749
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
2750
|
+
|
|
2751
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
2752
|
+
|
|
2753
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
2754
|
+
|
|
2755
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
2756
|
+
|
|
2757
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
2758
|
+
|
|
2759
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2760
|
+
|
|
2761
|
+
var SkeletonTheme =
|
|
2762
|
+
/*#__PURE__*/
|
|
2763
|
+
function (_Component) {
|
|
2764
|
+
_inherits(SkeletonTheme, _Component);
|
|
2765
|
+
|
|
2766
|
+
function SkeletonTheme() {
|
|
2767
|
+
_classCallCheck(this, SkeletonTheme);
|
|
2768
|
+
|
|
2769
|
+
return _possibleConstructorReturn(this, _getPrototypeOf(SkeletonTheme).apply(this, arguments));
|
|
2770
|
+
}
|
|
2771
|
+
|
|
2772
|
+
_createClass(SkeletonTheme, [{
|
|
2773
|
+
key: "render",
|
|
2774
|
+
value: function render() {
|
|
2775
|
+
var _this$props = this.props,
|
|
2776
|
+
color = _this$props.color,
|
|
2777
|
+
highlightColor = _this$props.highlightColor,
|
|
2778
|
+
children = _this$props.children;
|
|
2779
|
+
var themeStyles =
|
|
2780
|
+
/*#__PURE__*/
|
|
2781
|
+
(0, core_esm.css)(".react-loading-skeleton{background-color:", color, ";background-image:linear-gradient( 90deg,", color, ",", highlightColor, ",", color, " );};label:SkeletonTheme;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9za2VsZXRvbi10aGVtZS5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFZMkIiLCJmaWxlIjoiLi4vc3JjL3NrZWxldG9uLXRoZW1lLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFJlYWN0LCB7IENvbXBvbmVudCB9IGZyb20gXCJyZWFjdFwiO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSBcIkBlbW90aW9uL2NvcmVcIjtcbmltcG9ydCB7IGRlZmF1bHRCYXNlQ29sb3IsIGRlZmF1bHRIaWdobGlnaHRDb2xvciB9IGZyb20gXCIuL3NrZWxldG9uXCI7XG5cbmV4cG9ydCBkZWZhdWx0IGNsYXNzIFNrZWxldG9uVGhlbWUgZXh0ZW5kcyBDb21wb25lbnQge1xuICBzdGF0aWMgZGVmYXVsdFByb3BzID0ge1xuICAgIGNvbG9yOiBkZWZhdWx0QmFzZUNvbG9yLFxuICAgIGhpZ2hsaWdodENvbG9yOiBkZWZhdWx0SGlnaGxpZ2h0Q29sb3JcbiAgfTtcblxuICByZW5kZXIoKSB7XG4gICAgY29uc3QgeyBjb2xvciwgaGlnaGxpZ2h0Q29sb3IsIGNoaWxkcmVuIH0gPSB0aGlzLnByb3BzO1xuICAgIGNvbnN0IHRoZW1lU3R5bGVzID0gY3NzYFxuICAgICAgLnJlYWN0LWxvYWRpbmctc2tlbGV0b24ge1xuICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiAke2NvbG9yfTtcbiAgICAgICAgYmFja2dyb3VuZC1pbWFnZTogbGluZWFyLWdyYWRpZW50KFxuICAgICAgICAgIDkwZGVnLFxuICAgICAgICAgICR7Y29sb3J9LFxuICAgICAgICAgICR7aGlnaGxpZ2h0Q29sb3J9LFxuICAgICAgICAgICR7Y29sb3J9XG4gICAgICAgICk7XG4gICAgICB9XG4gICAgYDtcbiAgICByZXR1cm4gPGRpdiBjc3M9e3RoZW1lU3R5bGVzfT57Y2hpbGRyZW59PC9kaXY+O1xuICB9XG59XG4iXX0= */"));
|
|
2782
|
+
return (0, core_esm.jsx)("div", {
|
|
2783
|
+
css: themeStyles
|
|
2784
|
+
}, children);
|
|
2785
|
+
}
|
|
2786
|
+
}]);
|
|
2787
|
+
|
|
2788
|
+
return SkeletonTheme;
|
|
2789
|
+
}(_react.Component);
|
|
2790
|
+
|
|
2791
|
+
exports.default = SkeletonTheme;
|
|
2792
|
+
|
|
2793
|
+
_defineProperty(SkeletonTheme, "defaultProps", {
|
|
2794
|
+
color: skeleton.defaultBaseColor,
|
|
2795
|
+
highlightColor: skeleton.defaultHighlightColor
|
|
2796
|
+
});
|
|
2797
|
+
});
|
|
2798
|
+
|
|
2799
|
+
_commonjsHelpers.unwrapExports(skeletonTheme);
|
|
2800
|
+
|
|
2801
|
+
var lib = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
2802
|
+
|
|
2803
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2804
|
+
value: true
|
|
2805
|
+
});
|
|
2806
|
+
Object.defineProperty(exports, "default", {
|
|
2807
|
+
enumerable: true,
|
|
2808
|
+
get: function get() {
|
|
2809
|
+
return _skeleton.default;
|
|
2810
|
+
}
|
|
2811
|
+
});
|
|
2812
|
+
Object.defineProperty(exports, "SkeletonTheme", {
|
|
2813
|
+
enumerable: true,
|
|
2814
|
+
get: function get() {
|
|
2815
|
+
return _skeletonTheme.default;
|
|
2816
|
+
}
|
|
2817
|
+
});
|
|
2818
|
+
|
|
2819
|
+
var _skeleton = _interopRequireDefault(skeleton);
|
|
2820
|
+
|
|
2821
|
+
var _skeletonTheme = _interopRequireDefault(skeletonTheme);
|
|
2822
|
+
|
|
2823
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2824
|
+
});
|
|
2825
|
+
|
|
2826
|
+
var Skeleton = _commonjsHelpers.unwrapExports(lib);
|
|
2827
|
+
|
|
2828
|
+
var css = ".AuthWrapper-module_loginBox__3l-BE {\n position: absolute;\n top: 0;\n left: 50%;\n margin-top: 4rem;\n border: 1px solid #eee;\n padding: 2rem 1rem;\n transform: translateX(-50%);\n width: 350px;\n max-width: 90vw;\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";
|
|
2829
|
+
var styles = { "loginBox": "AuthWrapper-module_loginBox__3l-BE", "loginBox_title": "AuthWrapper-module_loginBox_title__12rGD", "bar": "AuthWrapper-module_bar__1dafn" };
|
|
2830
|
+
styleInject_es.styleInject(css);
|
|
2831
|
+
|
|
2832
|
+
var AuthWrapper = function AuthWrapper(_ref) {
|
|
2833
|
+
var children = _ref.children,
|
|
2834
|
+
needAuth = _ref.needAuth,
|
|
2835
|
+
_ref$formUrl = _ref.formUrl,
|
|
2836
|
+
formUrl = _ref$formUrl === undefined ? '' : _ref$formUrl;
|
|
2837
|
+
|
|
2838
|
+
var _nextAuth$useSession = client.useSession(),
|
|
2839
|
+
_nextAuth$useSession2 = slicedToArray._slicedToArray(_nextAuth$useSession, 2),
|
|
2840
|
+
session = _nextAuth$useSession2[0],
|
|
2841
|
+
loading = _nextAuth$useSession2[1];
|
|
2842
|
+
|
|
2843
|
+
var _useState = React.useState(null),
|
|
2844
|
+
_useState2 = slicedToArray._slicedToArray(_useState, 2),
|
|
2845
|
+
callbackUrl = _useState2[0],
|
|
2846
|
+
setCallbackUrl = _useState2[1];
|
|
2847
|
+
|
|
2848
|
+
var _useState3 = React.useState(),
|
|
2849
|
+
_useState4 = slicedToArray._slicedToArray(_useState3, 2),
|
|
2850
|
+
email = _useState4[0],
|
|
2851
|
+
setEmail = _useState4[1];
|
|
2852
|
+
|
|
2853
|
+
var _useState5 = React.useState(),
|
|
2854
|
+
_useState6 = slicedToArray._slicedToArray(_useState5, 2),
|
|
2855
|
+
password = _useState6[0],
|
|
2856
|
+
setPassword = _useState6[1];
|
|
2857
|
+
|
|
2858
|
+
React.useEffect(function () {
|
|
2859
|
+
setCallbackUrl(window.location.href);
|
|
2860
|
+
}, []);
|
|
2861
|
+
|
|
2862
|
+
if (session || !needAuth) {
|
|
2863
|
+
return React__default['default'].createElement(
|
|
2864
|
+
'div',
|
|
2865
|
+
null,
|
|
2866
|
+
children
|
|
2867
|
+
);
|
|
2868
|
+
}
|
|
2869
|
+
|
|
2870
|
+
if (!loading) {
|
|
2871
|
+
return React__default['default'].createElement(
|
|
2872
|
+
'div',
|
|
2873
|
+
{ style: { position: 'relative', minHeight: '300px', paddingTop: '2rem' } },
|
|
2874
|
+
React__default['default'].createElement(
|
|
2875
|
+
'div',
|
|
2876
|
+
{ style: { display: 'flex' } },
|
|
2877
|
+
React__default['default'].createElement(
|
|
2878
|
+
'div',
|
|
2879
|
+
null,
|
|
2880
|
+
React__default['default'].createElement(Skeleton, { reactangle: true, height: 120, width: 120 })
|
|
2881
|
+
),
|
|
2882
|
+
React__default['default'].createElement(
|
|
2883
|
+
'div',
|
|
2884
|
+
{ style: { maxWidth: '76%', minWidth: '76%', marginLeft: '2rem' } },
|
|
2885
|
+
React__default['default'].createElement(Skeleton, { count: 4 })
|
|
2886
|
+
)
|
|
2887
|
+
),
|
|
2888
|
+
React__default['default'].createElement('br', null),
|
|
2889
|
+
React__default['default'].createElement(Skeleton, { count: 8 }),
|
|
2890
|
+
callbackUrl && React__default['default'].createElement(
|
|
2891
|
+
'div',
|
|
2892
|
+
{ className: styles.loginBox },
|
|
2893
|
+
React__default['default'].createElement(
|
|
2894
|
+
'div',
|
|
2895
|
+
{ className: styles.loginBox_title },
|
|
2896
|
+
React__default['default'].createElement(
|
|
2897
|
+
'b',
|
|
2898
|
+
null,
|
|
2899
|
+
'Log in to view.'
|
|
2900
|
+
)
|
|
2901
|
+
),
|
|
2902
|
+
React__default['default'].createElement(
|
|
2903
|
+
reactBootstrap.Form,
|
|
2904
|
+
{ onSubmit: function onSubmit(e) {
|
|
2905
|
+
return e.preventDefault();
|
|
2906
|
+
} },
|
|
2907
|
+
React__default['default'].createElement(
|
|
2908
|
+
reactBootstrap.Form.Group,
|
|
2909
|
+
{ controlId: 'email' },
|
|
2910
|
+
React__default['default'].createElement(reactBootstrap.Form.Control, { type: 'email', onChange: function onChange(e) {
|
|
2911
|
+
return setEmail(e.target.value);
|
|
2912
|
+
}, placeholder: 'Email' })
|
|
2913
|
+
),
|
|
2914
|
+
React__default['default'].createElement(
|
|
2915
|
+
reactBootstrap.Form.Group,
|
|
2916
|
+
{ controlId: 'password' },
|
|
2917
|
+
React__default['default'].createElement(reactBootstrap.Form.Control, { type: 'password', onChange: function onChange(e) {
|
|
2918
|
+
return setPassword(e.target.value);
|
|
2919
|
+
}, placeholder: 'Password' })
|
|
2920
|
+
),
|
|
2921
|
+
React__default['default'].createElement(
|
|
2922
|
+
'button',
|
|
2923
|
+
{ className: 'btn btn-primary btn-block', onClick: function onClick() {
|
|
2924
|
+
return client.signIn('credentials', { email: email, password: password, callbackUrl: callbackUrl });
|
|
2925
|
+
} },
|
|
2926
|
+
'Sign in'
|
|
2927
|
+
)
|
|
2928
|
+
),
|
|
2929
|
+
React__default['default'].createElement(
|
|
2930
|
+
'p',
|
|
2931
|
+
{ className: 'mt-2 mb-0' },
|
|
2932
|
+
'Don\'t have an account?',
|
|
2933
|
+
' ',
|
|
2934
|
+
React__default['default'].createElement(
|
|
2935
|
+
'a',
|
|
2936
|
+
{ style: { color: 'blue', textDecoration: 'underline' }, href: formUrl, target: '_blank', rel: 'noopener' },
|
|
2937
|
+
'Register here'
|
|
2938
|
+
),
|
|
2939
|
+
'.'
|
|
2940
|
+
)
|
|
2941
|
+
)
|
|
2942
|
+
);
|
|
2943
|
+
} else {
|
|
2944
|
+
return null;
|
|
2945
|
+
}
|
|
2946
|
+
};
|
|
2947
|
+
|
|
2948
|
+
module.exports = AuthWrapper;
|