@mjhls/mjh-framework 1.0.706 → 1.0.707-beta.1
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 +1 -1
- package/dist/cjs/AD.js +9 -10
- package/dist/cjs/AD300x250.js +24 -25
- package/dist/cjs/AD300x250x600.js +24 -25
- package/dist/cjs/AD728x90.js +27 -28
- package/dist/cjs/ADFloatingFooter.js +26 -27
- package/dist/cjs/ADFooter.js +14 -15
- package/dist/cjs/ADGutter.js +26 -27
- package/dist/cjs/{ADInfeed-54ab0509.js → ADInfeed-30227d30.js} +11 -13
- package/dist/cjs/ADSkyscraper.js +26 -27
- package/dist/cjs/ADSponsoredResources.js +26 -27
- package/dist/cjs/ADWebcast.js +26 -27
- package/dist/cjs/ADWelcome.js +30 -31
- package/dist/cjs/{ADlgInfeed-a1255904.js → ADlgInfeed-8432091c.js} +8 -9
- package/dist/cjs/AccordionPanel.js +29 -31
- package/dist/cjs/AdSlot.js +31 -32
- package/dist/cjs/AdSlotsProvider.js +8 -13
- package/dist/cjs/AlphabeticList.js +24 -25
- package/dist/cjs/ArticleCarousel.js +21 -22
- package/dist/cjs/ArticleSeriesListing.js +57 -58
- package/dist/cjs/Auth.js +534 -820
- package/dist/cjs/{AuthorComponent-5fa89df5.js → AuthorComponent-bb831b74.js} +13 -14
- package/dist/cjs/Beam.js +9 -9
- package/dist/cjs/{BlockContent-eca358e4.js → BlockContent-091a991f.js} +24 -25
- package/dist/cjs/Breadcrumbs.js +27 -29
- package/dist/cjs/BrowseVideosListing.js +39 -40
- package/dist/cjs/CMEDeck.js +78 -78
- package/dist/cjs/Column1.js +11 -14
- package/dist/cjs/Column2.js +32 -35
- package/dist/cjs/Column3.js +55 -58
- package/dist/cjs/ConferenceArticleCard.js +22 -23
- package/dist/cjs/ConferenceBanner-4a16fddc.js +23 -0
- package/dist/cjs/DeckContent.js +94 -98
- package/dist/cjs/DeckQueue.js +86 -90
- package/dist/cjs/{Dfp-a863cf48.js → Dfp-ce7ac168.js} +30 -31
- package/dist/cjs/EventsDeck.js +129 -136
- package/dist/cjs/ExternalResources.js +74 -75
- package/dist/cjs/Feature.js +25 -27
- package/dist/cjs/ForbesHero.js +40 -41
- package/dist/cjs/GridContent.js +177 -181
- package/dist/cjs/GridHero.js +42 -43
- package/dist/cjs/GroupDeck.js +49 -50
- package/dist/cjs/HamMagazine.js +130 -135
- package/dist/cjs/Header.js +11 -13
- package/dist/cjs/Hero.js +12 -13
- package/dist/cjs/HighlightenVideo.js +17 -18
- package/dist/cjs/HorizontalHero.js +25 -26
- package/dist/cjs/IssueContentDeck.js +72 -77
- package/dist/cjs/IssueDeck.js +70 -75
- package/dist/cjs/IssueLanding.js +40 -41
- package/dist/cjs/LeftNav.js +36 -38
- package/dist/cjs/MasterDeck.js +71 -72
- package/dist/cjs/NavDvm.js +75 -80
- package/dist/cjs/{NavFooter-3dcd99a8.js → NavFooter-76c913e3.js} +14 -15
- package/dist/cjs/NavMagazine.js +138 -143
- package/dist/cjs/NavNative.js +115 -123
- package/dist/cjs/NavNormal.js +48 -53
- package/dist/cjs/OncliveHero.js +20 -20
- package/dist/cjs/OncliveLargeHero.js +66 -67
- package/dist/cjs/PageFilter.js +14 -15
- package/dist/cjs/PartnerDetailListing.js +100 -111
- package/dist/cjs/PdfDownload.js +8 -9
- package/dist/cjs/PopUpModal.js +19 -21
- package/dist/cjs/PublicationDeck.js +61 -66
- package/dist/cjs/PublicationLanding.js +74 -78
- package/dist/cjs/QueueDeckExpanded.js +292 -292
- package/dist/cjs/RecentNews.js +23 -24
- package/dist/cjs/RelatedContent.js +24 -25
- package/dist/cjs/RelatedTopicsDropdown.js +21 -24
- package/dist/cjs/RolesDeck.js +27 -32
- package/dist/cjs/Search.js +18 -22
- package/dist/cjs/Segment.js +7 -7
- package/dist/cjs/SetCookie.js +1 -1
- package/dist/cjs/SideFooter.js +35 -36
- package/dist/cjs/SocialIcons.js +9 -10
- package/dist/cjs/{SocialSearchComponent-294bd0ea.js → SocialSearchComponent-56d49a1a.js} +36 -40
- package/dist/cjs/SocialShare.js +29 -31
- package/dist/cjs/TaxonomyCard.js +57 -62
- package/dist/cjs/TaxonomyDescription.js +50 -51
- package/dist/cjs/TemplateNormal.js +72 -73
- package/dist/cjs/ThumbnailCard.js +20 -22
- package/dist/cjs/Ustream.js +26 -27
- package/dist/cjs/VerticalHero.js +17 -18
- package/dist/cjs/VideoSeriesCard.js +31 -32
- package/dist/cjs/VideoSeriesFilter.js +19 -19
- package/dist/cjs/VideoSeriesListing.js +72 -73
- package/dist/cjs/View.js +227 -230
- package/dist/cjs/YahooHero.js +39 -40
- package/dist/cjs/YoutubeGroup.js +64 -65
- package/dist/cjs/{_is-array-63ae4740.js → _is-array-754e012d.js} +6 -6
- package/dist/cjs/{_iter-detect-2613ffa1.js → _iter-detect-60b2f026.js} +2 -2
- package/dist/cjs/{_object-sap-c5bd707d.js → _object-sap-5e74ba08.js} +1 -1
- package/dist/cjs/{_set-species-a8cfdb84.js → _set-species-f92c67c5.js} +4 -4
- package/dist/cjs/{_to-object-821a2927.js → _to-object-329a650b.js} +4 -4
- package/dist/cjs/{asyncToGenerator-2edcb6ad.js → asyncToGenerator-533d476a.js} +8 -8
- package/dist/cjs/{brightcove-react-player-loader.es-a195642e.js → brightcove-react-player-loader.es-156bd4d6.js} +9 -11
- package/dist/cjs/{core.get-iterator-method-b4615fd3.js → core.get-iterator-method-f62321d4.js} +2 -2
- package/dist/cjs/{define-property-aff11f8a.js → define-property-f4d12f4e.js} +1 -1
- package/dist/cjs/{defineProperty-d6fbb280.js → defineProperty-55548b25.js} +1 -1
- package/dist/cjs/{entities-3f9d0f2f.js → entities-310b46ee.js} +1 -1
- package/dist/cjs/{es6.string.iterator-20d42c53.js → es6.string.iterator-cc0bbaa4.js} +2 -2
- package/dist/cjs/{extends-1e24fc8d.js → extends-60837c34.js} +1 -1
- package/dist/cjs/getRelatedArticle.js +13 -424
- package/dist/cjs/getSerializers.js +41 -41
- package/dist/cjs/{getTargeting-497b581d.js → getTargeting-9af0ef69.js} +3 -3
- package/dist/cjs/getTargeting.js +7 -7
- package/dist/cjs/iconBase-68959171.js +3 -0
- package/dist/cjs/{index-4d74ffd6.js → index-3294d3bc.js} +41 -40
- package/dist/cjs/{index-4d37a34d.js → index-427156b6.js} +849 -872
- package/dist/cjs/{index-5ad2b070.js → index-8bf6c863.js} +48 -30
- package/dist/cjs/{index-d48b231c.js → index-be0c82be.js} +25 -31
- package/dist/cjs/{index-80f57cff.js → index-da796b8c.js} +15 -17
- package/dist/cjs/{index.es-f3e47207.js → index.es-9110add6.js} +12 -31
- package/dist/cjs/{index.esm-8123cf40.js → index.esm-4d410430.js} +20 -20
- package/dist/cjs/{index.esm-3b9b8952.js → index.esm-66ffa47a.js} +9 -4
- package/dist/cjs/{index.esm-974f47d9.js → index.esm-90433435.js} +15 -6
- package/dist/cjs/{index.esm-05850a2f.js → index.esm-ff47db6f.js} +12 -5
- package/dist/cjs/index.js +127 -128
- package/dist/cjs/{inherits-2eb23889.js → inherits-c9f99d47.js} +5 -5
- package/dist/cjs/{keys-95c064c9.js → keys-a586b7a0.js} +2 -2
- package/dist/cjs/{lodash-4ef21f0f.js → lodash-fc2922d0.js} +23 -72
- package/dist/cjs/{main-eeffe77b.js → main-03ffa84c.js} +80 -116
- package/dist/cjs/{moment-aca40de1.js → moment-575fe24c.js} +9 -11
- package/dist/cjs/{react-social-icons-af932527.js → react-social-icons-f7f48f71.js} +27 -28
- package/dist/cjs/{slicedToArray-db24842a.js → slicedToArray-8f385299.js} +4 -4
- package/dist/cjs/{smoothscroll-1abb448e.js → smoothscroll-95231a70.js} +1 -1
- package/dist/cjs/{stringify-01cf47f7.js → stringify-7c5aff47.js} +1 -1
- package/dist/cjs/timeDifferenceCalc.js +1 -1
- package/dist/cjs/{toConsumableArray-cf0865fc.js → toConsumableArray-9a3476fe.js} +4 -4
- package/dist/cjs/{typeof-97065d40.js → typeof-725500bc.js} +7 -7
- package/dist/cjs/urlFor.js +2 -2
- package/dist/cjs/{util-6f784d85.js → util-f2c1b65b.js} +1 -1
- package/dist/cjs/{visibility-sensor-8b54af99.js → visibility-sensor-0c45a583.js} +5 -7
- package/dist/cjs/{web.dom.iterable-4480325a.js → web.dom.iterable-a0e279c1.js} +3 -3
- package/dist/esm/AD.js +7 -7
- package/dist/esm/AD300x250.js +21 -21
- package/dist/esm/AD300x250x600.js +21 -21
- package/dist/esm/AD728x90.js +24 -24
- package/dist/esm/ADFloatingFooter.js +23 -23
- package/dist/esm/ADFooter.js +11 -11
- package/dist/esm/ADGutter.js +23 -23
- package/dist/esm/{ADInfeed-18cb6a8b.js → ADInfeed-afa3ab79.js} +7 -7
- package/dist/esm/ADSkyscraper.js +23 -23
- package/dist/esm/ADSponsoredResources.js +23 -23
- package/dist/esm/ADWebcast.js +23 -23
- package/dist/esm/ADWelcome.js +27 -27
- package/dist/esm/{ADlgInfeed-51d02f5d.js → ADlgInfeed-20c39d33.js} +6 -6
- package/dist/esm/AccordionPanel.js +24 -24
- package/dist/esm/AdSlot.js +23 -23
- package/dist/esm/AdSlotsProvider.js +5 -9
- package/dist/esm/AlphabeticList.js +21 -21
- package/dist/esm/ArticleCarousel.js +18 -18
- package/dist/esm/ArticleSeriesListing.js +52 -52
- package/dist/esm/Auth.js +517 -799
- package/dist/esm/{AuthorComponent-c29a0075.js → AuthorComponent-00f13201.js} +11 -11
- package/dist/esm/Beam.js +9 -9
- package/dist/esm/{BlockContent-d8cd739c.js → BlockContent-e9b4ddcf.js} +4 -4
- package/dist/esm/Breadcrumbs.js +17 -17
- package/dist/esm/BrowseVideosListing.js +36 -36
- package/dist/esm/CMEDeck.js +74 -74
- package/dist/esm/Column1.js +5 -5
- package/dist/esm/Column2.js +26 -26
- package/dist/esm/Column3.js +48 -48
- package/dist/esm/ConferenceArticleCard.js +18 -18
- package/dist/esm/{ConferenceBanner-9162d0ca.js → ConferenceBanner-8792ebd2.js} +4 -4
- package/dist/esm/DeckContent.js +76 -76
- package/dist/esm/DeckQueue.js +64 -64
- package/dist/esm/{Dfp-db06d7dc.js → Dfp-14e866d7.js} +20 -20
- package/dist/esm/EventsDeck.js +82 -82
- package/dist/esm/ExternalResources.js +68 -68
- package/dist/esm/Feature.js +18 -18
- package/dist/esm/ForbesHero.js +34 -34
- package/dist/esm/GridContent.js +139 -139
- package/dist/esm/GridHero.js +36 -36
- package/dist/esm/GroupDeck.js +45 -45
- package/dist/esm/HamMagazine.js +104 -104
- package/dist/esm/Header.js +7 -7
- package/dist/esm/Hero.js +9 -9
- package/dist/esm/HighlightenVideo.js +14 -14
- package/dist/esm/HorizontalHero.js +21 -21
- package/dist/esm/IssueContentDeck.js +49 -49
- package/dist/esm/IssueDeck.js +46 -46
- package/dist/esm/IssueLanding.js +37 -37
- package/dist/esm/LeftNav.js +32 -32
- package/dist/esm/MasterDeck.js +65 -65
- package/dist/esm/NavDvm.js +57 -57
- package/dist/esm/{NavFooter-c29526b7.js → NavFooter-e27bd93b.js} +12 -12
- package/dist/esm/NavMagazine.js +114 -114
- package/dist/esm/NavNative.js +91 -91
- package/dist/esm/NavNormal.js +36 -36
- package/dist/esm/OncliveHero.js +17 -16
- package/dist/esm/OncliveLargeHero.js +59 -59
- package/dist/esm/PageFilter.js +12 -12
- package/dist/esm/PartnerDetailListing.js +96 -106
- package/dist/esm/PdfDownload.js +6 -6
- package/dist/esm/PopUpModal.js +14 -14
- package/dist/esm/PublicationDeck.js +38 -38
- package/dist/esm/PublicationLanding.js +50 -50
- package/dist/esm/QueueDeckExpanded.js +272 -272
- package/dist/esm/RecentNews.js +20 -20
- package/dist/esm/RelatedContent.js +19 -19
- package/dist/esm/RelatedTopicsDropdown.js +13 -13
- package/dist/esm/RolesDeck.js +13 -13
- package/dist/esm/Search.js +12 -12
- package/dist/esm/Segment.js +7 -7
- package/dist/esm/SetCookie.js +1 -1
- package/dist/esm/SideFooter.js +31 -31
- package/dist/esm/SocialIcons.js +7 -7
- package/dist/esm/{SocialSearchComponent-c4a19bac.js → SocialSearchComponent-677ed3bd.js} +28 -28
- package/dist/esm/SocialShare.js +25 -25
- package/dist/esm/TaxonomyCard.js +41 -41
- package/dist/esm/TaxonomyDescription.js +45 -45
- package/dist/esm/TemplateNormal.js +66 -66
- package/dist/esm/ThumbnailCard.js +13 -13
- package/dist/esm/Ustream.js +23 -23
- package/dist/esm/VerticalHero.js +13 -13
- package/dist/esm/VideoSeriesCard.js +24 -24
- package/dist/esm/VideoSeriesFilter.js +16 -16
- package/dist/esm/VideoSeriesListing.js +66 -66
- package/dist/esm/View.js +211 -210
- package/dist/esm/YahooHero.js +34 -34
- package/dist/esm/YoutubeGroup.js +49 -49
- package/dist/esm/{_is-array-9383b394.js → _is-array-49698029.js} +6 -6
- package/dist/esm/{_iter-detect-d4d262ee.js → _iter-detect-59409a32.js} +2 -2
- package/dist/esm/{_object-sap-6a003379.js → _object-sap-4d59d5bd.js} +1 -1
- package/dist/esm/{_set-species-0b056cff.js → _set-species-cede29f8.js} +4 -4
- package/dist/esm/{_to-object-9bef3b62.js → _to-object-ded78eb9.js} +5 -5
- package/dist/esm/{asyncToGenerator-acd1cc47.js → asyncToGenerator-7c654f36.js} +8 -8
- package/dist/esm/{brightcove-react-player-loader.es-b43c695a.js → brightcove-react-player-loader.es-83f53e4e.js} +6 -7
- package/dist/esm/{core.get-iterator-method-1b116089.js → core.get-iterator-method-54d2e411.js} +2 -2
- package/dist/esm/{define-property-9a008401.js → define-property-de3fc946.js} +1 -1
- package/dist/esm/{defineProperty-ddd52c29.js → defineProperty-b798470d.js} +1 -1
- package/dist/esm/{entities-932b50cf.js → entities-7cc3bf45.js} +1 -1
- package/dist/esm/{es6.string.iterator-b24a54f2.js → es6.string.iterator-9b2af4a5.js} +3 -3
- package/dist/esm/{extends-c2b1c9d7.js → extends-cc5da797.js} +1 -1
- package/dist/esm/getRelatedArticle.js +13 -424
- package/dist/esm/getSerializers.js +41 -41
- package/dist/esm/{getTargeting-b1a7be54.js → getTargeting-2acdec91.js} +2 -2
- package/dist/esm/getTargeting.js +7 -7
- package/dist/esm/{index-b2d06f45.js → index-20de5762.js} +800 -816
- package/dist/esm/{index-752d1dae.js → index-5f9f807a.js} +10 -10
- package/dist/esm/{index-3f5c03b2.js → index-73819142.js} +25 -31
- package/dist/esm/{index-669ff425.js → index-a9e53f80.js} +43 -24
- package/dist/esm/{index-ccb770c7.js → index-ef6d5dcf.js} +41 -40
- package/dist/esm/{index.es-c6222053.js → index.es-29c1cef5.js} +10 -28
- package/dist/esm/{index.esm-3fdda599.js → index.esm-29e48d38.js} +15 -6
- package/dist/esm/{index.esm-d6f88d94.js → index.esm-b08f4b04.js} +9 -4
- package/dist/esm/{index.esm-a8ff922c.js → index.esm-cf08bf18.js} +12 -5
- package/dist/esm/{index.esm-8016b507.js → index.esm-fd746768.js} +18 -17
- package/dist/esm/index.js +105 -106
- package/dist/esm/{inherits-18d4a779.js → inherits-7ee3e0c1.js} +5 -5
- package/dist/esm/{keys-9bb7939c.js → keys-fc2d4c34.js} +2 -2
- package/dist/esm/{lodash-ad27652f.js → lodash-17fdfebb.js} +23 -72
- package/dist/esm/{main-ad1ecb54.js → main-35ff7b4f.js} +78 -113
- package/dist/esm/{moment-bc12cb97.js → moment-e2f9b20c.js} +9 -11
- package/dist/esm/{react-social-icons-91f9716f.js → react-social-icons-a7d5c5c7.js} +20 -20
- package/dist/esm/{slicedToArray-34468155.js → slicedToArray-7021e5df.js} +4 -4
- package/dist/esm/{smoothscroll-ab6e0238.js → smoothscroll-4b699764.js} +1 -1
- package/dist/esm/{stringify-8a4f19f7.js → stringify-008c8802.js} +1 -1
- package/dist/esm/timeDifferenceCalc.js +1 -1
- package/dist/esm/{toConsumableArray-5212fee7.js → toConsumableArray-725434a0.js} +4 -4
- package/dist/esm/{typeof-64422756.js → typeof-08f2c380.js} +7 -7
- package/dist/esm/urlFor.js +1 -1
- package/dist/esm/{util-3ab476bf.js → util-7700fc59.js} +1 -1
- package/dist/esm/{visibility-sensor-082c757b.js → visibility-sensor-0baa4eea.js} +2 -2
- package/dist/esm/{web.dom.iterable-ca37144a.js → web.dom.iterable-8956f9a5.js} +3 -3
- package/package.json +2 -2
- package/dist/cjs/ConferenceBanner-6c9e718a.js +0 -24
- package/dist/cjs/index-bd6c9f56.js +0 -211
- package/dist/esm/index-db3bb315.js +0 -207
package/dist/cjs/Auth.js
CHANGED
|
@@ -2,35 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var slicedToArray = require('./slicedToArray-db24842a.js');
|
|
8
|
-
var React = require('react');
|
|
9
|
-
var Router = require('next/router');
|
|
10
|
-
var _extends = require('./extends-1e24fc8d.js');
|
|
11
|
-
var reactBootstrap = require('react-bootstrap');
|
|
12
|
-
var useSWR = require('swr');
|
|
13
|
-
var index = require('./index-bd6c9f56.js');
|
|
14
|
-
var Local = require('passport-local');
|
|
15
|
-
var mysql = require('mysql');
|
|
16
|
-
var util = require('./util-6f784d85.js');
|
|
5
|
+
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
6
|
+
|
|
17
7
|
var _commonjsHelpers = require('./_commonjsHelpers-06173234.js');
|
|
18
|
-
require('./
|
|
19
|
-
require('./
|
|
20
|
-
require('./web.dom.iterable-4480325a.js');
|
|
8
|
+
require('./_to-object-329a650b.js');
|
|
9
|
+
require('./es6.string.iterator-cc0bbaa4.js');
|
|
21
10
|
require('./_library-dd23b178.js');
|
|
22
|
-
require('./
|
|
23
|
-
require('./
|
|
24
|
-
require('./_iter-detect-2613ffa1.js');
|
|
11
|
+
require('./_iter-detect-60b2f026.js');
|
|
12
|
+
require('./core.get-iterator-method-f62321d4.js');
|
|
25
13
|
require('./_object-pie-68c5bcbc.js');
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
var React__default =
|
|
30
|
-
var
|
|
31
|
-
var
|
|
32
|
-
var
|
|
33
|
-
var
|
|
14
|
+
var _extends$1 = require('./extends-60837c34.js');
|
|
15
|
+
require('./web.dom.iterable-a0e279c1.js');
|
|
16
|
+
var React = require('react');
|
|
17
|
+
var React__default = _interopDefault(React);
|
|
18
|
+
var Router = require('next/router');
|
|
19
|
+
var Router__default = _interopDefault(Router);
|
|
20
|
+
var stringify = require('./stringify-7c5aff47.js');
|
|
21
|
+
var slicedToArray = require('./slicedToArray-8f385299.js');
|
|
22
|
+
var asyncToGenerator = require('./asyncToGenerator-533d476a.js');
|
|
23
|
+
require('./_set-species-f92c67c5.js');
|
|
24
|
+
var reactBootstrap = require('react-bootstrap');
|
|
25
|
+
var util = require('./util-f2c1b65b.js');
|
|
26
|
+
var useSWR = _interopDefault(require('swr'));
|
|
27
|
+
var Local = _interopDefault(require('passport-local'));
|
|
28
|
+
var mysql = _interopDefault(require('mysql'));
|
|
34
29
|
|
|
35
30
|
var returnFormField = function returnFormField(_ref) {
|
|
36
31
|
var name = _ref.name,
|
|
@@ -69,21 +64,21 @@ var returnFormField = function returnFormField(_ref) {
|
|
|
69
64
|
}
|
|
70
65
|
|
|
71
66
|
if (type == 'text' || type == 'email' || type == 'password' || type == 'number') {
|
|
72
|
-
return React__default
|
|
67
|
+
return React__default.createElement(
|
|
73
68
|
reactBootstrap.Form.Group,
|
|
74
|
-
_extends._extends({}, opts, { controlId: name }),
|
|
75
|
-
React__default
|
|
69
|
+
_extends$1._extends({}, opts, { controlId: name }),
|
|
70
|
+
React__default.createElement(
|
|
76
71
|
reactBootstrap.Form.Label,
|
|
77
72
|
{ kye: name + '_label' },
|
|
78
73
|
label,
|
|
79
|
-
required && React__default
|
|
74
|
+
required && React__default.createElement(
|
|
80
75
|
'span',
|
|
81
76
|
{ style: { color: 'red' } },
|
|
82
77
|
'*'
|
|
83
78
|
)
|
|
84
79
|
),
|
|
85
|
-
React__default
|
|
86
|
-
React__default
|
|
80
|
+
React__default.createElement(reactBootstrap.Form.Control, { key: name + '_' + type, type: type, readOnly: readonly, name: name, placeholder: '', defaultValue: default_value, required: required }),
|
|
81
|
+
React__default.createElement(
|
|
87
82
|
reactBootstrap.Form.Control.Feedback,
|
|
88
83
|
{ key: name + '_feedback', type: 'invalid' },
|
|
89
84
|
errors[name]
|
|
@@ -91,28 +86,28 @@ var returnFormField = function returnFormField(_ref) {
|
|
|
91
86
|
);
|
|
92
87
|
}
|
|
93
88
|
if (type == 'select') {
|
|
94
|
-
return React__default
|
|
89
|
+
return React__default.createElement(
|
|
95
90
|
reactBootstrap.Form.Group,
|
|
96
|
-
_extends._extends({}, opts, { key: name, controlId: name }),
|
|
97
|
-
React__default
|
|
91
|
+
_extends$1._extends({}, opts, { key: name, controlId: name }),
|
|
92
|
+
React__default.createElement(
|
|
98
93
|
reactBootstrap.Form.Label,
|
|
99
94
|
{ key: name + '_' + label },
|
|
100
95
|
label,
|
|
101
|
-
required && React__default
|
|
96
|
+
required && React__default.createElement(
|
|
102
97
|
'span',
|
|
103
98
|
{ key: name + '_required_span', style: { color: 'red' } },
|
|
104
99
|
'*'
|
|
105
100
|
)
|
|
106
101
|
),
|
|
107
|
-
React__default
|
|
102
|
+
React__default.createElement(
|
|
108
103
|
reactBootstrap.Form.Control,
|
|
109
104
|
{ key: name + '_select', as: 'select', name: name, required: required, defaultValue: default_value },
|
|
110
|
-
React__default
|
|
105
|
+
React__default.createElement('option', { value: '', key: name + '_options_empty' }),
|
|
111
106
|
options.map(function (option, index) {
|
|
112
107
|
var value = option.value ? option.value : option;
|
|
113
108
|
var label = option.label ? option.label : option;
|
|
114
109
|
var key = name + '_options_' + index;
|
|
115
|
-
return React__default
|
|
110
|
+
return React__default.createElement(
|
|
116
111
|
'option',
|
|
117
112
|
{ key: key, value: value },
|
|
118
113
|
label
|
|
@@ -123,25 +118,25 @@ var returnFormField = function returnFormField(_ref) {
|
|
|
123
118
|
}
|
|
124
119
|
|
|
125
120
|
if (type == 'radio' || type == 'checkbox') {
|
|
126
|
-
return React__default
|
|
121
|
+
return React__default.createElement(
|
|
127
122
|
reactBootstrap.Form.Group,
|
|
128
123
|
opts,
|
|
129
|
-
React__default
|
|
124
|
+
React__default.createElement(
|
|
130
125
|
reactBootstrap.Form.Label,
|
|
131
126
|
null,
|
|
132
127
|
label,
|
|
133
|
-
required && React__default
|
|
128
|
+
required && React__default.createElement(
|
|
134
129
|
'span',
|
|
135
130
|
{ style: { color: 'red' } },
|
|
136
131
|
'*'
|
|
137
132
|
)
|
|
138
133
|
),
|
|
139
134
|
options.map(function (option, index) {
|
|
140
|
-
return React__default
|
|
135
|
+
return React__default.createElement(
|
|
141
136
|
reactBootstrap.Form.Check,
|
|
142
137
|
{ type: type, key: index, required: required },
|
|
143
|
-
React__default
|
|
144
|
-
React__default
|
|
138
|
+
React__default.createElement(reactBootstrap.Form.Check.Input, { type: type, key: type + '_' + index + '_input', defaultChecked: default_value ? default_value === option.value : false, name: name, id: name + '_' + index, value: option.value, required: required }),
|
|
139
|
+
React__default.createElement(reactBootstrap.Form.Check.Label, { style: { cursor: 'pointer' }, 'for': name + '_' + index, key: type + '_' + index + '_label', dangerouslySetInnerHTML: { __html: option.label } })
|
|
145
140
|
);
|
|
146
141
|
})
|
|
147
142
|
);
|
|
@@ -227,7 +222,7 @@ function useUser() {
|
|
|
227
222
|
redirectTo = _ref.redirectTo,
|
|
228
223
|
redirectIfFound = _ref.redirectIfFound;
|
|
229
224
|
|
|
230
|
-
var _useSWR =
|
|
225
|
+
var _useSWR = useSWR('/api/auth/user', dataHandler),
|
|
231
226
|
data = _useSWR.data,
|
|
232
227
|
error = _useSWR.error;
|
|
233
228
|
|
|
@@ -242,7 +237,7 @@ function useUser() {
|
|
|
242
237
|
redirectTo && !redirectIfFound && !hasUser ||
|
|
243
238
|
// If redirectIfFound is also set, redirect if the user was found
|
|
244
239
|
redirectIfFound && hasUser) {
|
|
245
|
-
Router__default
|
|
240
|
+
Router__default.push(redirectTo);
|
|
246
241
|
}
|
|
247
242
|
}, [redirectTo, redirectIfFound, finished, hasUser]);
|
|
248
243
|
|
|
@@ -348,43 +343,43 @@ var LoginForm = function LoginForm(props) {
|
|
|
348
343
|
loading = _useState4[0],
|
|
349
344
|
setLoading = _useState4[1];
|
|
350
345
|
|
|
351
|
-
return React__default
|
|
346
|
+
return React__default.createElement(
|
|
352
347
|
reactBootstrap.Form,
|
|
353
348
|
{ className: 'login', onSubmit: handleSubmit },
|
|
354
|
-
React__default
|
|
349
|
+
React__default.createElement(
|
|
355
350
|
'h1',
|
|
356
351
|
null,
|
|
357
352
|
'Login'
|
|
358
353
|
),
|
|
359
|
-
React__default
|
|
354
|
+
React__default.createElement('hr', null),
|
|
360
355
|
returnFormField({ name: 'email', label: 'Email', type: 'email', required: true }),
|
|
361
356
|
returnFormField({ name: 'password', label: 'Password', type: 'password', required: true }),
|
|
362
|
-
React__default
|
|
363
|
-
React__default
|
|
357
|
+
React__default.createElement('hr', null),
|
|
358
|
+
React__default.createElement(
|
|
364
359
|
reactBootstrap.Form.Row,
|
|
365
360
|
null,
|
|
366
|
-
React__default
|
|
361
|
+
React__default.createElement(
|
|
367
362
|
reactBootstrap.Form.Group,
|
|
368
363
|
{ as: reactBootstrap.Col },
|
|
369
|
-
React__default
|
|
364
|
+
React__default.createElement(
|
|
370
365
|
'a',
|
|
371
366
|
{ href: '/auth/signup' },
|
|
372
367
|
'I don\'t have an account'
|
|
373
368
|
)
|
|
374
369
|
),
|
|
375
|
-
React__default
|
|
370
|
+
React__default.createElement(
|
|
376
371
|
reactBootstrap.Form.Group,
|
|
377
372
|
{ as: reactBootstrap.Col, className: 'text-right' },
|
|
378
|
-
!loading && React__default
|
|
373
|
+
!loading && React__default.createElement(
|
|
379
374
|
reactBootstrap.Button,
|
|
380
375
|
{ type: 'submit' },
|
|
381
376
|
'Login'
|
|
382
377
|
),
|
|
383
|
-
loading && React__default
|
|
378
|
+
loading && React__default.createElement(
|
|
384
379
|
reactBootstrap.Button,
|
|
385
380
|
{ variant: 'primary', disabled: true },
|
|
386
|
-
React__default
|
|
387
|
-
React__default
|
|
381
|
+
React__default.createElement(reactBootstrap.Spinner, { as: 'span', animation: 'border', role: 'status', 'aria-hidden': 'true', size: 'sm' }),
|
|
382
|
+
React__default.createElement(
|
|
388
383
|
'span',
|
|
389
384
|
{ className: 'sr-only' },
|
|
390
385
|
'Loading...'
|
|
@@ -392,12 +387,12 @@ var LoginForm = function LoginForm(props) {
|
|
|
392
387
|
)
|
|
393
388
|
)
|
|
394
389
|
),
|
|
395
|
-
errorMsg && React__default
|
|
390
|
+
errorMsg && React__default.createElement(
|
|
396
391
|
'p',
|
|
397
392
|
{ className: 'error' },
|
|
398
393
|
errorMsg
|
|
399
394
|
),
|
|
400
|
-
React__default
|
|
395
|
+
React__default.createElement(
|
|
401
396
|
'style',
|
|
402
397
|
{ jsx: 'true'.toString() },
|
|
403
398
|
'\n .login {\n margin: 0 auto;\n padding: 1rem;\n border: 1px solid #ccc;\n border-radius: 4px;\n }\n .error {\n color: red;\n margin: 1rem 0 0;\n }\n '
|
|
@@ -653,29 +648,29 @@ var SignupForm = function SignupForm(props) {
|
|
|
653
648
|
loading = _useState14[0],
|
|
654
649
|
setLoading = _useState14[1];
|
|
655
650
|
|
|
656
|
-
return React__default
|
|
651
|
+
return React__default.createElement(
|
|
657
652
|
reactBootstrap.Form,
|
|
658
653
|
{ className: 'login', id: 'signupForm', onSubmit: handleSubmit },
|
|
659
|
-
React__default
|
|
654
|
+
React__default.createElement(
|
|
660
655
|
'h1',
|
|
661
656
|
null,
|
|
662
657
|
'Sign Up'
|
|
663
658
|
),
|
|
664
|
-
React__default
|
|
659
|
+
React__default.createElement('hr', null),
|
|
665
660
|
returnFormField({ name: 'email', label: 'Email', type: 'email', required: true }),
|
|
666
|
-
React__default
|
|
661
|
+
React__default.createElement(
|
|
667
662
|
reactBootstrap.Form.Row,
|
|
668
663
|
null,
|
|
669
664
|
returnFormField({ name: 'password', label: 'Password', type: 'password', groupType: reactBootstrap.Col, required: true }),
|
|
670
665
|
returnFormField({ name: 'rpassword', label: 'Retype Password', type: 'password', groupType: reactBootstrap.Col, required: true })
|
|
671
666
|
),
|
|
672
|
-
React__default
|
|
667
|
+
React__default.createElement(
|
|
673
668
|
reactBootstrap.Form.Row,
|
|
674
669
|
null,
|
|
675
670
|
returnFormField({ name: 'first_name', label: 'First Name', type: 'text', groupType: reactBootstrap.Col, required: true }),
|
|
676
671
|
returnFormField({ name: 'last_name', label: 'Last Name', type: 'text', groupType: reactBootstrap.Col, required: true })
|
|
677
672
|
),
|
|
678
|
-
React__default
|
|
673
|
+
React__default.createElement(
|
|
679
674
|
reactBootstrap.Form.Row,
|
|
680
675
|
null,
|
|
681
676
|
returnFormField({
|
|
@@ -689,7 +684,7 @@ var SignupForm = function SignupForm(props) {
|
|
|
689
684
|
}),
|
|
690
685
|
countryUS && returnFormField({ name: 'state', label: 'State', type: 'select', required: true, groupType: reactBootstrap.Col, options: states })
|
|
691
686
|
),
|
|
692
|
-
React__default
|
|
687
|
+
React__default.createElement(
|
|
693
688
|
reactBootstrap.Form.Row,
|
|
694
689
|
null,
|
|
695
690
|
countryUS && returnFormField({ name: 'zip', label: 'Working Zip Code', type: 'text', required: true, groupType: reactBootstrap.Col }),
|
|
@@ -736,38 +731,38 @@ var SignupForm = function SignupForm(props) {
|
|
|
736
731
|
required: true,
|
|
737
732
|
options: [{ label: 'By registering you agree to our <a href="/terms" style="color:blue">Terms and Conditions</a> and <a href="/privacy" style="color:blue">Privacy Policy</a> and understand that you will be receiving email communications', value: 'Y' }]
|
|
738
733
|
}),
|
|
739
|
-
React__default
|
|
740
|
-
React__default
|
|
734
|
+
React__default.createElement('hr', null),
|
|
735
|
+
React__default.createElement(
|
|
741
736
|
reactBootstrap.Form.Row,
|
|
742
737
|
null,
|
|
743
|
-
React__default
|
|
738
|
+
React__default.createElement(
|
|
744
739
|
reactBootstrap.Form.Group,
|
|
745
740
|
{ as: reactBootstrap.Col },
|
|
746
|
-
React__default
|
|
741
|
+
React__default.createElement(
|
|
747
742
|
'a',
|
|
748
743
|
{ href: '/auth/login' },
|
|
749
744
|
'I already have an account'
|
|
750
745
|
)
|
|
751
746
|
),
|
|
752
|
-
React__default
|
|
747
|
+
React__default.createElement(
|
|
753
748
|
reactBootstrap.Form.Group,
|
|
754
749
|
{ as: reactBootstrap.Col, className: 'text-right' },
|
|
755
|
-
!loading && React__default
|
|
750
|
+
!loading && React__default.createElement(
|
|
756
751
|
reactBootstrap.Button,
|
|
757
752
|
{ type: 'submit' },
|
|
758
753
|
'Sign Up'
|
|
759
754
|
),
|
|
760
|
-
loading && React__default
|
|
755
|
+
loading && React__default.createElement(
|
|
761
756
|
reactBootstrap.Button,
|
|
762
757
|
{ variant: 'primary', disabled: true },
|
|
763
|
-
React__default
|
|
758
|
+
React__default.createElement(reactBootstrap.Spinner, {
|
|
764
759
|
as: 'span',
|
|
765
760
|
animation: 'border',
|
|
766
761
|
role: 'status',
|
|
767
762
|
'aria-hidden': 'true',
|
|
768
763
|
size: 'sm'
|
|
769
764
|
}),
|
|
770
|
-
React__default
|
|
765
|
+
React__default.createElement(
|
|
771
766
|
'span',
|
|
772
767
|
{ className: 'sr-only' },
|
|
773
768
|
'Loading...'
|
|
@@ -775,12 +770,12 @@ var SignupForm = function SignupForm(props) {
|
|
|
775
770
|
)
|
|
776
771
|
)
|
|
777
772
|
),
|
|
778
|
-
errorMsg && React__default
|
|
773
|
+
errorMsg && React__default.createElement(
|
|
779
774
|
'p',
|
|
780
775
|
{ className: 'error' },
|
|
781
776
|
errorMsg
|
|
782
777
|
),
|
|
783
|
-
React__default
|
|
778
|
+
React__default.createElement(
|
|
784
779
|
'style',
|
|
785
780
|
{ jsx: 'true'.toString() },
|
|
786
781
|
' \n .login {\n margin: 0 auto;\n padding: 1rem;\n border: 1px solid #ccc;\n border-radius: 4px;\n }\n .error {\n color: red;\n margin: 1rem 0 0;\n }\n '
|
|
@@ -1070,32 +1065,32 @@ var SignupForm$1 = function SignupForm(props) {
|
|
|
1070
1065
|
loading = _useState18[0],
|
|
1071
1066
|
setLoading = _useState18[1];
|
|
1072
1067
|
|
|
1073
|
-
return React__default
|
|
1068
|
+
return React__default.createElement(
|
|
1074
1069
|
reactBootstrap.Form,
|
|
1075
1070
|
{ className: 'login', id: 'signupForm', onSubmit: handleSubmit },
|
|
1076
|
-
React__default
|
|
1071
|
+
React__default.createElement(
|
|
1077
1072
|
'h1',
|
|
1078
1073
|
null,
|
|
1079
1074
|
'Profile'
|
|
1080
1075
|
),
|
|
1081
|
-
React__default
|
|
1082
|
-
userData ? React__default
|
|
1083
|
-
React__default
|
|
1076
|
+
React__default.createElement('hr', null),
|
|
1077
|
+
userData ? React__default.createElement(
|
|
1078
|
+
React__default.Fragment,
|
|
1084
1079
|
null,
|
|
1085
1080
|
returnFormField({ name: 'email', label: 'Email', type: 'email', required: true, readonly: true, default_value: userData.email }),
|
|
1086
|
-
React__default
|
|
1081
|
+
React__default.createElement(
|
|
1087
1082
|
reactBootstrap.Form.Row,
|
|
1088
1083
|
null,
|
|
1089
1084
|
returnFormField({ name: 'password', label: 'Password', type: 'password', groupType: reactBootstrap.Col, required: false }),
|
|
1090
1085
|
returnFormField({ name: 'rpassword', label: 'Retype Password', type: 'password', groupType: reactBootstrap.Col, required: false })
|
|
1091
1086
|
),
|
|
1092
|
-
React__default
|
|
1087
|
+
React__default.createElement(
|
|
1093
1088
|
reactBootstrap.Form.Row,
|
|
1094
1089
|
null,
|
|
1095
1090
|
returnFormField({ name: 'first_name', label: 'First Name', type: 'text', groupType: reactBootstrap.Col, required: true, default_value: userData.shared.first_name }),
|
|
1096
1091
|
returnFormField({ name: 'last_name', label: 'Last Name', type: 'text', groupType: reactBootstrap.Col, required: true, default_value: userData.shared.last_name })
|
|
1097
1092
|
),
|
|
1098
|
-
React__default
|
|
1093
|
+
React__default.createElement(
|
|
1099
1094
|
reactBootstrap.Form.Row,
|
|
1100
1095
|
null,
|
|
1101
1096
|
returnFormField({
|
|
@@ -1110,7 +1105,7 @@ var SignupForm$1 = function SignupForm(props) {
|
|
|
1110
1105
|
}),
|
|
1111
1106
|
countryUS && returnFormField({ name: 'state', label: 'State', type: 'select', required: true, groupType: reactBootstrap.Col, options: states, default_value: userData.shared.state })
|
|
1112
1107
|
),
|
|
1113
|
-
React__default
|
|
1108
|
+
React__default.createElement(
|
|
1114
1109
|
reactBootstrap.Form.Row,
|
|
1115
1110
|
null,
|
|
1116
1111
|
countryUS && returnFormField({ name: 'zip', label: 'Working Zip Code', type: 'text', required: true, groupType: reactBootstrap.Col, default_value: userData.shared.zip }),
|
|
@@ -1160,29 +1155,29 @@ var SignupForm$1 = function SignupForm(props) {
|
|
|
1160
1155
|
required: true,
|
|
1161
1156
|
options: [{ label: 'By registering you agree to our <a href="/terms">Terms and Conditions</a> and <a href="/privacy">Privacy Policy</a> and understand that you will be receiving email communications', value: 'Y' }]
|
|
1162
1157
|
}),
|
|
1163
|
-
React__default
|
|
1164
|
-
React__default
|
|
1158
|
+
React__default.createElement('hr', null),
|
|
1159
|
+
React__default.createElement(
|
|
1165
1160
|
reactBootstrap.Form.Row,
|
|
1166
1161
|
null,
|
|
1167
|
-
React__default
|
|
1162
|
+
React__default.createElement(
|
|
1168
1163
|
reactBootstrap.Form.Group,
|
|
1169
1164
|
{ as: reactBootstrap.Col },
|
|
1170
|
-
!loading && React__default
|
|
1165
|
+
!loading && React__default.createElement(
|
|
1171
1166
|
reactBootstrap.Button,
|
|
1172
1167
|
{ type: 'submit' },
|
|
1173
1168
|
'Update'
|
|
1174
1169
|
),
|
|
1175
|
-
loading && React__default
|
|
1170
|
+
loading && React__default.createElement(
|
|
1176
1171
|
reactBootstrap.Button,
|
|
1177
1172
|
{ variant: 'primary', disabled: true },
|
|
1178
|
-
React__default
|
|
1173
|
+
React__default.createElement(reactBootstrap.Spinner, {
|
|
1179
1174
|
as: 'span',
|
|
1180
1175
|
animation: 'border',
|
|
1181
1176
|
role: 'status',
|
|
1182
1177
|
'aria-hidden': 'true',
|
|
1183
1178
|
size: 'sm'
|
|
1184
1179
|
}),
|
|
1185
|
-
React__default
|
|
1180
|
+
React__default.createElement(
|
|
1186
1181
|
'span',
|
|
1187
1182
|
{ className: 'sr-only' },
|
|
1188
1183
|
'Loading...'
|
|
@@ -1190,24 +1185,24 @@ var SignupForm$1 = function SignupForm(props) {
|
|
|
1190
1185
|
)
|
|
1191
1186
|
)
|
|
1192
1187
|
)
|
|
1193
|
-
) : React__default
|
|
1188
|
+
) : React__default.createElement(reactBootstrap.Spinner, {
|
|
1194
1189
|
as: 'span',
|
|
1195
1190
|
animation: 'border',
|
|
1196
1191
|
role: 'status',
|
|
1197
1192
|
'aria-hidden': 'true',
|
|
1198
1193
|
size: 'sm'
|
|
1199
1194
|
}),
|
|
1200
|
-
errorMsg && React__default
|
|
1195
|
+
errorMsg && React__default.createElement(
|
|
1201
1196
|
'p',
|
|
1202
1197
|
{ className: 'error' },
|
|
1203
1198
|
errorMsg
|
|
1204
1199
|
),
|
|
1205
|
-
successMsg && React__default
|
|
1200
|
+
successMsg && React__default.createElement(
|
|
1206
1201
|
'p',
|
|
1207
1202
|
{ className: 'success' },
|
|
1208
1203
|
successMsg
|
|
1209
1204
|
),
|
|
1210
|
-
React__default
|
|
1205
|
+
React__default.createElement(
|
|
1211
1206
|
'style',
|
|
1212
1207
|
{ jsx: 'true'.toString() },
|
|
1213
1208
|
' \n .login {\n margin: 0 auto;\n padding: 1rem;\n border: 1px solid #ccc;\n border-radius: 4px;\n }\n .error {\n color: red;\n margin: 1rem 0 0;\n }\n .success {\n color: green;\n margin: 1rem 0 0;\n }\n '
|
|
@@ -1215,12 +1210,213 @@ var SignupForm$1 = function SignupForm(props) {
|
|
|
1215
1210
|
);
|
|
1216
1211
|
};
|
|
1217
1212
|
|
|
1213
|
+
/*!
|
|
1214
|
+
* cookie
|
|
1215
|
+
* Copyright(c) 2012-2014 Roman Shtylman
|
|
1216
|
+
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
1217
|
+
* MIT Licensed
|
|
1218
|
+
*/
|
|
1219
|
+
|
|
1220
|
+
/**
|
|
1221
|
+
* Module exports.
|
|
1222
|
+
* @public
|
|
1223
|
+
*/
|
|
1224
|
+
|
|
1225
|
+
var parse_1 = parse;
|
|
1226
|
+
var serialize_1 = serialize;
|
|
1227
|
+
|
|
1228
|
+
/**
|
|
1229
|
+
* Module variables.
|
|
1230
|
+
* @private
|
|
1231
|
+
*/
|
|
1232
|
+
|
|
1233
|
+
var decode = decodeURIComponent;
|
|
1234
|
+
var encode = encodeURIComponent;
|
|
1235
|
+
var pairSplitRegExp = /; */;
|
|
1236
|
+
|
|
1237
|
+
/**
|
|
1238
|
+
* RegExp to match field-content in RFC 7230 sec 3.2
|
|
1239
|
+
*
|
|
1240
|
+
* field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]
|
|
1241
|
+
* field-vchar = VCHAR / obs-text
|
|
1242
|
+
* obs-text = %x80-FF
|
|
1243
|
+
*/
|
|
1244
|
+
|
|
1245
|
+
var fieldContentRegExp = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;
|
|
1246
|
+
|
|
1247
|
+
/**
|
|
1248
|
+
* Parse a cookie header.
|
|
1249
|
+
*
|
|
1250
|
+
* Parse the given cookie header string into an object
|
|
1251
|
+
* The object has the various cookies as keys(names) => values
|
|
1252
|
+
*
|
|
1253
|
+
* @param {string} str
|
|
1254
|
+
* @param {object} [options]
|
|
1255
|
+
* @return {object}
|
|
1256
|
+
* @public
|
|
1257
|
+
*/
|
|
1258
|
+
|
|
1259
|
+
function parse(str, options) {
|
|
1260
|
+
if (typeof str !== 'string') {
|
|
1261
|
+
throw new TypeError('argument str must be a string');
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1264
|
+
var obj = {};
|
|
1265
|
+
var opt = options || {};
|
|
1266
|
+
var pairs = str.split(pairSplitRegExp);
|
|
1267
|
+
var dec = opt.decode || decode;
|
|
1268
|
+
|
|
1269
|
+
for (var i = 0; i < pairs.length; i++) {
|
|
1270
|
+
var pair = pairs[i];
|
|
1271
|
+
var eq_idx = pair.indexOf('=');
|
|
1272
|
+
|
|
1273
|
+
// skip things that don't look like key=value
|
|
1274
|
+
if (eq_idx < 0) {
|
|
1275
|
+
continue;
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1278
|
+
var key = pair.substr(0, eq_idx).trim();
|
|
1279
|
+
var val = pair.substr(++eq_idx, pair.length).trim();
|
|
1280
|
+
|
|
1281
|
+
// quoted values
|
|
1282
|
+
if ('"' == val[0]) {
|
|
1283
|
+
val = val.slice(1, -1);
|
|
1284
|
+
}
|
|
1285
|
+
|
|
1286
|
+
// only assign once
|
|
1287
|
+
if (undefined == obj[key]) {
|
|
1288
|
+
obj[key] = tryDecode(val, dec);
|
|
1289
|
+
}
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1292
|
+
return obj;
|
|
1293
|
+
}
|
|
1294
|
+
|
|
1295
|
+
/**
|
|
1296
|
+
* Serialize data into a cookie header.
|
|
1297
|
+
*
|
|
1298
|
+
* Serialize the a name value pair into a cookie string suitable for
|
|
1299
|
+
* http headers. An optional options object specified cookie parameters.
|
|
1300
|
+
*
|
|
1301
|
+
* serialize('foo', 'bar', { httpOnly: true })
|
|
1302
|
+
* => "foo=bar; httpOnly"
|
|
1303
|
+
*
|
|
1304
|
+
* @param {string} name
|
|
1305
|
+
* @param {string} val
|
|
1306
|
+
* @param {object} [options]
|
|
1307
|
+
* @return {string}
|
|
1308
|
+
* @public
|
|
1309
|
+
*/
|
|
1310
|
+
|
|
1311
|
+
function serialize(name, val, options) {
|
|
1312
|
+
var opt = options || {};
|
|
1313
|
+
var enc = opt.encode || encode;
|
|
1314
|
+
|
|
1315
|
+
if (typeof enc !== 'function') {
|
|
1316
|
+
throw new TypeError('option encode is invalid');
|
|
1317
|
+
}
|
|
1318
|
+
|
|
1319
|
+
if (!fieldContentRegExp.test(name)) {
|
|
1320
|
+
throw new TypeError('argument name is invalid');
|
|
1321
|
+
}
|
|
1322
|
+
|
|
1323
|
+
var value = enc(val);
|
|
1324
|
+
|
|
1325
|
+
if (value && !fieldContentRegExp.test(value)) {
|
|
1326
|
+
throw new TypeError('argument val is invalid');
|
|
1327
|
+
}
|
|
1328
|
+
|
|
1329
|
+
var str = name + '=' + value;
|
|
1330
|
+
|
|
1331
|
+
if (null != opt.maxAge) {
|
|
1332
|
+
var maxAge = opt.maxAge - 0;
|
|
1333
|
+
|
|
1334
|
+
if (isNaN(maxAge) || !isFinite(maxAge)) {
|
|
1335
|
+
throw new TypeError('option maxAge is invalid')
|
|
1336
|
+
}
|
|
1337
|
+
|
|
1338
|
+
str += '; Max-Age=' + Math.floor(maxAge);
|
|
1339
|
+
}
|
|
1340
|
+
|
|
1341
|
+
if (opt.domain) {
|
|
1342
|
+
if (!fieldContentRegExp.test(opt.domain)) {
|
|
1343
|
+
throw new TypeError('option domain is invalid');
|
|
1344
|
+
}
|
|
1345
|
+
|
|
1346
|
+
str += '; Domain=' + opt.domain;
|
|
1347
|
+
}
|
|
1348
|
+
|
|
1349
|
+
if (opt.path) {
|
|
1350
|
+
if (!fieldContentRegExp.test(opt.path)) {
|
|
1351
|
+
throw new TypeError('option path is invalid');
|
|
1352
|
+
}
|
|
1353
|
+
|
|
1354
|
+
str += '; Path=' + opt.path;
|
|
1355
|
+
}
|
|
1356
|
+
|
|
1357
|
+
if (opt.expires) {
|
|
1358
|
+
if (typeof opt.expires.toUTCString !== 'function') {
|
|
1359
|
+
throw new TypeError('option expires is invalid');
|
|
1360
|
+
}
|
|
1361
|
+
|
|
1362
|
+
str += '; Expires=' + opt.expires.toUTCString();
|
|
1363
|
+
}
|
|
1364
|
+
|
|
1365
|
+
if (opt.httpOnly) {
|
|
1366
|
+
str += '; HttpOnly';
|
|
1367
|
+
}
|
|
1368
|
+
|
|
1369
|
+
if (opt.secure) {
|
|
1370
|
+
str += '; Secure';
|
|
1371
|
+
}
|
|
1372
|
+
|
|
1373
|
+
if (opt.sameSite) {
|
|
1374
|
+
var sameSite = typeof opt.sameSite === 'string'
|
|
1375
|
+
? opt.sameSite.toLowerCase() : opt.sameSite;
|
|
1376
|
+
|
|
1377
|
+
switch (sameSite) {
|
|
1378
|
+
case true:
|
|
1379
|
+
str += '; SameSite=Strict';
|
|
1380
|
+
break;
|
|
1381
|
+
case 'lax':
|
|
1382
|
+
str += '; SameSite=Lax';
|
|
1383
|
+
break;
|
|
1384
|
+
case 'strict':
|
|
1385
|
+
str += '; SameSite=Strict';
|
|
1386
|
+
break;
|
|
1387
|
+
case 'none':
|
|
1388
|
+
str += '; SameSite=None';
|
|
1389
|
+
break;
|
|
1390
|
+
default:
|
|
1391
|
+
throw new TypeError('option sameSite is invalid');
|
|
1392
|
+
}
|
|
1393
|
+
}
|
|
1394
|
+
|
|
1395
|
+
return str;
|
|
1396
|
+
}
|
|
1397
|
+
|
|
1398
|
+
/**
|
|
1399
|
+
* Try decoding a string using a decoding function.
|
|
1400
|
+
*
|
|
1401
|
+
* @param {string} str
|
|
1402
|
+
* @param {function} decode
|
|
1403
|
+
* @private
|
|
1404
|
+
*/
|
|
1405
|
+
|
|
1406
|
+
function tryDecode(str, decode) {
|
|
1407
|
+
try {
|
|
1408
|
+
return decode(str);
|
|
1409
|
+
} catch (e) {
|
|
1410
|
+
return str;
|
|
1411
|
+
}
|
|
1412
|
+
}
|
|
1413
|
+
|
|
1218
1414
|
var TOKEN_NAME = 'token';
|
|
1219
1415
|
var MAX_AGE = 60 * 60 * 8; // 8 hours
|
|
1220
1416
|
|
|
1221
1417
|
function setTokenCookie(res, token, eKey) {
|
|
1222
1418
|
var cookies_serailized = [];
|
|
1223
|
-
cookies_serailized.push(
|
|
1419
|
+
cookies_serailized.push(serialize_1(TOKEN_NAME, token, {
|
|
1224
1420
|
//maxAge: MAX_AGE, // we want login cookie to expire when browser
|
|
1225
1421
|
//expires: new Date(Date.now() + MAX_AGE * 1000),
|
|
1226
1422
|
//httpOnly: true,
|
|
@@ -1229,7 +1425,7 @@ function setTokenCookie(res, token, eKey) {
|
|
|
1229
1425
|
//sameSite: 'lax',
|
|
1230
1426
|
}));
|
|
1231
1427
|
|
|
1232
|
-
cookies_serailized.push(
|
|
1428
|
+
cookies_serailized.push(serialize_1('eKey', eKey, {
|
|
1233
1429
|
//maxAge: MAX_AGE, // we want login cookie to expire when browser
|
|
1234
1430
|
//expires: new Date(Date.now() + MAX_AGE * 1000),
|
|
1235
1431
|
//httpOnly: true,
|
|
@@ -1243,12 +1439,12 @@ function setTokenCookie(res, token, eKey) {
|
|
|
1243
1439
|
|
|
1244
1440
|
function removeTokenCookie(res) {
|
|
1245
1441
|
var cookies_serailized = [];
|
|
1246
|
-
cookies_serailized.push(
|
|
1442
|
+
cookies_serailized.push(serialize_1(TOKEN_NAME, '', {
|
|
1247
1443
|
maxAge: -1,
|
|
1248
1444
|
expires: new Date(Date.now() - MAX_AGE * 1000),
|
|
1249
1445
|
path: '/'
|
|
1250
1446
|
}));
|
|
1251
|
-
cookies_serailized.push(
|
|
1447
|
+
cookies_serailized.push(serialize_1('eKey', '', {
|
|
1252
1448
|
maxAge: -1,
|
|
1253
1449
|
expires: new Date(Date.now() - MAX_AGE * 1000),
|
|
1254
1450
|
path: '/'
|
|
@@ -1263,7 +1459,7 @@ function parseCookies(req) {
|
|
|
1263
1459
|
|
|
1264
1460
|
// For pages we do need to parse the cookies.
|
|
1265
1461
|
var cookie = req.headers ? req.headers.cookie : null;
|
|
1266
|
-
return
|
|
1462
|
+
return parse_1(cookie || '');
|
|
1267
1463
|
}
|
|
1268
1464
|
|
|
1269
1465
|
function getTokenCookie(req) {
|
|
@@ -1549,59 +1745,6 @@ defineProperties.supportsDescriptors = !!supportsDescriptors;
|
|
|
1549
1745
|
|
|
1550
1746
|
var defineProperties_1 = defineProperties;
|
|
1551
1747
|
|
|
1552
|
-
/* eslint no-invalid-this: 1 */
|
|
1553
|
-
|
|
1554
|
-
var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
|
|
1555
|
-
var slice$1 = Array.prototype.slice;
|
|
1556
|
-
var toStr$3 = Object.prototype.toString;
|
|
1557
|
-
var funcType = '[object Function]';
|
|
1558
|
-
|
|
1559
|
-
var implementation$1 = function bind(that) {
|
|
1560
|
-
var target = this;
|
|
1561
|
-
if (typeof target !== 'function' || toStr$3.call(target) !== funcType) {
|
|
1562
|
-
throw new TypeError(ERROR_MESSAGE + target);
|
|
1563
|
-
}
|
|
1564
|
-
var args = slice$1.call(arguments, 1);
|
|
1565
|
-
|
|
1566
|
-
var bound;
|
|
1567
|
-
var binder = function () {
|
|
1568
|
-
if (this instanceof bound) {
|
|
1569
|
-
var result = target.apply(
|
|
1570
|
-
this,
|
|
1571
|
-
args.concat(slice$1.call(arguments))
|
|
1572
|
-
);
|
|
1573
|
-
if (Object(result) === result) {
|
|
1574
|
-
return result;
|
|
1575
|
-
}
|
|
1576
|
-
return this;
|
|
1577
|
-
} else {
|
|
1578
|
-
return target.apply(
|
|
1579
|
-
that,
|
|
1580
|
-
args.concat(slice$1.call(arguments))
|
|
1581
|
-
);
|
|
1582
|
-
}
|
|
1583
|
-
};
|
|
1584
|
-
|
|
1585
|
-
var boundLength = Math.max(0, target.length - args.length);
|
|
1586
|
-
var boundArgs = [];
|
|
1587
|
-
for (var i = 0; i < boundLength; i++) {
|
|
1588
|
-
boundArgs.push('$' + i);
|
|
1589
|
-
}
|
|
1590
|
-
|
|
1591
|
-
bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);
|
|
1592
|
-
|
|
1593
|
-
if (target.prototype) {
|
|
1594
|
-
var Empty = function Empty() {};
|
|
1595
|
-
Empty.prototype = target.prototype;
|
|
1596
|
-
bound.prototype = new Empty();
|
|
1597
|
-
Empty.prototype = null;
|
|
1598
|
-
}
|
|
1599
|
-
|
|
1600
|
-
return bound;
|
|
1601
|
-
};
|
|
1602
|
-
|
|
1603
|
-
var functionBind = Function.prototype.bind || implementation$1;
|
|
1604
|
-
|
|
1605
1748
|
/* eslint complexity: [2, 18], max-statements: [2, 33] */
|
|
1606
1749
|
var shams = function hasSymbols() {
|
|
1607
1750
|
if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
|
|
@@ -1655,21 +1798,68 @@ var hasSymbols$1 = function hasNativeSymbols() {
|
|
|
1655
1798
|
return shams();
|
|
1656
1799
|
};
|
|
1657
1800
|
|
|
1658
|
-
|
|
1801
|
+
/* eslint no-invalid-this: 1 */
|
|
1659
1802
|
|
|
1660
|
-
var
|
|
1803
|
+
var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
|
|
1804
|
+
var slice$1 = Array.prototype.slice;
|
|
1805
|
+
var toStr$3 = Object.prototype.toString;
|
|
1806
|
+
var funcType = '[object Function]';
|
|
1661
1807
|
|
|
1662
|
-
var $
|
|
1663
|
-
var
|
|
1664
|
-
|
|
1808
|
+
var implementation$1 = function bind(that) {
|
|
1809
|
+
var target = this;
|
|
1810
|
+
if (typeof target !== 'function' || toStr$3.call(target) !== funcType) {
|
|
1811
|
+
throw new TypeError(ERROR_MESSAGE + target);
|
|
1812
|
+
}
|
|
1813
|
+
var args = slice$1.call(arguments, 1);
|
|
1665
1814
|
|
|
1666
|
-
|
|
1667
|
-
var
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1815
|
+
var bound;
|
|
1816
|
+
var binder = function () {
|
|
1817
|
+
if (this instanceof bound) {
|
|
1818
|
+
var result = target.apply(
|
|
1819
|
+
this,
|
|
1820
|
+
args.concat(slice$1.call(arguments))
|
|
1821
|
+
);
|
|
1822
|
+
if (Object(result) === result) {
|
|
1823
|
+
return result;
|
|
1824
|
+
}
|
|
1825
|
+
return this;
|
|
1826
|
+
} else {
|
|
1827
|
+
return target.apply(
|
|
1828
|
+
that,
|
|
1829
|
+
args.concat(slice$1.call(arguments))
|
|
1830
|
+
);
|
|
1831
|
+
}
|
|
1832
|
+
};
|
|
1833
|
+
|
|
1834
|
+
var boundLength = Math.max(0, target.length - args.length);
|
|
1835
|
+
var boundArgs = [];
|
|
1836
|
+
for (var i = 0; i < boundLength; i++) {
|
|
1837
|
+
boundArgs.push('$' + i);
|
|
1838
|
+
}
|
|
1839
|
+
|
|
1840
|
+
bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);
|
|
1841
|
+
|
|
1842
|
+
if (target.prototype) {
|
|
1843
|
+
var Empty = function Empty() {};
|
|
1844
|
+
Empty.prototype = target.prototype;
|
|
1845
|
+
bound.prototype = new Empty();
|
|
1846
|
+
Empty.prototype = null;
|
|
1847
|
+
}
|
|
1848
|
+
|
|
1849
|
+
return bound;
|
|
1671
1850
|
};
|
|
1672
1851
|
|
|
1852
|
+
var functionBind = Function.prototype.bind || implementation$1;
|
|
1853
|
+
|
|
1854
|
+
/* globals
|
|
1855
|
+
Atomics,
|
|
1856
|
+
SharedArrayBuffer,
|
|
1857
|
+
*/
|
|
1858
|
+
|
|
1859
|
+
var undefined$1;
|
|
1860
|
+
|
|
1861
|
+
var $TypeError = TypeError;
|
|
1862
|
+
|
|
1673
1863
|
var $gOPD = Object.getOwnPropertyDescriptor;
|
|
1674
1864
|
if ($gOPD) {
|
|
1675
1865
|
try {
|
|
@@ -1679,9 +1869,7 @@ if ($gOPD) {
|
|
|
1679
1869
|
}
|
|
1680
1870
|
}
|
|
1681
1871
|
|
|
1682
|
-
var throwTypeError = function () {
|
|
1683
|
-
throw new $TypeError();
|
|
1684
|
-
};
|
|
1872
|
+
var throwTypeError = function () { throw new $TypeError(); };
|
|
1685
1873
|
var ThrowTypeError = $gOPD
|
|
1686
1874
|
? (function () {
|
|
1687
1875
|
try {
|
|
@@ -1702,351 +1890,203 @@ var ThrowTypeError = $gOPD
|
|
|
1702
1890
|
var hasSymbols$2 = hasSymbols$1();
|
|
1703
1891
|
|
|
1704
1892
|
var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto
|
|
1705
|
-
|
|
1706
|
-
var
|
|
1893
|
+
var generatorFunction = undefined$1;
|
|
1894
|
+
var asyncFunction = undefined$1;
|
|
1895
|
+
var asyncGenFunction = undefined$1;
|
|
1707
1896
|
|
|
1708
1897
|
var TypedArray = typeof Uint8Array === 'undefined' ? undefined$1 : getProto(Uint8Array);
|
|
1709
1898
|
|
|
1710
1899
|
var INTRINSICS = {
|
|
1711
|
-
'%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
|
|
1712
1900
|
'%Array%': Array,
|
|
1713
1901
|
'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
|
|
1902
|
+
'%ArrayBufferPrototype%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer.prototype,
|
|
1714
1903
|
'%ArrayIteratorPrototype%': hasSymbols$2 ? getProto([][Symbol.iterator]()) : undefined$1,
|
|
1904
|
+
'%ArrayPrototype%': Array.prototype,
|
|
1905
|
+
'%ArrayProto_entries%': Array.prototype.entries,
|
|
1906
|
+
'%ArrayProto_forEach%': Array.prototype.forEach,
|
|
1907
|
+
'%ArrayProto_keys%': Array.prototype.keys,
|
|
1908
|
+
'%ArrayProto_values%': Array.prototype.values,
|
|
1715
1909
|
'%AsyncFromSyncIteratorPrototype%': undefined$1,
|
|
1716
|
-
'%AsyncFunction%':
|
|
1717
|
-
'%
|
|
1718
|
-
'%
|
|
1719
|
-
'%
|
|
1910
|
+
'%AsyncFunction%': asyncFunction,
|
|
1911
|
+
'%AsyncFunctionPrototype%': undefined$1,
|
|
1912
|
+
'%AsyncGenerator%': undefined$1,
|
|
1913
|
+
'%AsyncGeneratorFunction%': asyncGenFunction,
|
|
1914
|
+
'%AsyncGeneratorPrototype%': undefined$1,
|
|
1915
|
+
'%AsyncIteratorPrototype%': undefined$1,
|
|
1720
1916
|
'%Atomics%': typeof Atomics === 'undefined' ? undefined$1 : Atomics,
|
|
1721
|
-
'%BigInt%': typeof BigInt === 'undefined' ? undefined$1 : BigInt,
|
|
1722
1917
|
'%Boolean%': Boolean,
|
|
1918
|
+
'%BooleanPrototype%': Boolean.prototype,
|
|
1723
1919
|
'%DataView%': typeof DataView === 'undefined' ? undefined$1 : DataView,
|
|
1920
|
+
'%DataViewPrototype%': typeof DataView === 'undefined' ? undefined$1 : DataView.prototype,
|
|
1724
1921
|
'%Date%': Date,
|
|
1922
|
+
'%DatePrototype%': Date.prototype,
|
|
1725
1923
|
'%decodeURI%': decodeURI,
|
|
1726
1924
|
'%decodeURIComponent%': decodeURIComponent,
|
|
1727
1925
|
'%encodeURI%': encodeURI,
|
|
1728
1926
|
'%encodeURIComponent%': encodeURIComponent,
|
|
1729
1927
|
'%Error%': Error,
|
|
1928
|
+
'%ErrorPrototype%': Error.prototype,
|
|
1730
1929
|
'%eval%': eval, // eslint-disable-line no-eval
|
|
1731
1930
|
'%EvalError%': EvalError,
|
|
1931
|
+
'%EvalErrorPrototype%': EvalError.prototype,
|
|
1732
1932
|
'%Float32Array%': typeof Float32Array === 'undefined' ? undefined$1 : Float32Array,
|
|
1933
|
+
'%Float32ArrayPrototype%': typeof Float32Array === 'undefined' ? undefined$1 : Float32Array.prototype,
|
|
1733
1934
|
'%Float64Array%': typeof Float64Array === 'undefined' ? undefined$1 : Float64Array,
|
|
1734
|
-
'%
|
|
1735
|
-
'%Function%':
|
|
1736
|
-
'%
|
|
1935
|
+
'%Float64ArrayPrototype%': typeof Float64Array === 'undefined' ? undefined$1 : Float64Array.prototype,
|
|
1936
|
+
'%Function%': Function,
|
|
1937
|
+
'%FunctionPrototype%': Function.prototype,
|
|
1938
|
+
'%Generator%': undefined$1,
|
|
1939
|
+
'%GeneratorFunction%': generatorFunction,
|
|
1940
|
+
'%GeneratorPrototype%': undefined$1,
|
|
1737
1941
|
'%Int8Array%': typeof Int8Array === 'undefined' ? undefined$1 : Int8Array,
|
|
1942
|
+
'%Int8ArrayPrototype%': typeof Int8Array === 'undefined' ? undefined$1 : Int8Array.prototype,
|
|
1738
1943
|
'%Int16Array%': typeof Int16Array === 'undefined' ? undefined$1 : Int16Array,
|
|
1944
|
+
'%Int16ArrayPrototype%': typeof Int16Array === 'undefined' ? undefined$1 : Int8Array.prototype,
|
|
1739
1945
|
'%Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
|
|
1946
|
+
'%Int32ArrayPrototype%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array.prototype,
|
|
1740
1947
|
'%isFinite%': isFinite,
|
|
1741
1948
|
'%isNaN%': isNaN,
|
|
1742
1949
|
'%IteratorPrototype%': hasSymbols$2 ? getProto(getProto([][Symbol.iterator]())) : undefined$1,
|
|
1743
1950
|
'%JSON%': typeof JSON === 'object' ? JSON : undefined$1,
|
|
1951
|
+
'%JSONParse%': typeof JSON === 'object' ? JSON.parse : undefined$1,
|
|
1744
1952
|
'%Map%': typeof Map === 'undefined' ? undefined$1 : Map,
|
|
1745
1953
|
'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$2 ? undefined$1 : getProto(new Map()[Symbol.iterator]()),
|
|
1954
|
+
'%MapPrototype%': typeof Map === 'undefined' ? undefined$1 : Map.prototype,
|
|
1746
1955
|
'%Math%': Math,
|
|
1747
1956
|
'%Number%': Number,
|
|
1957
|
+
'%NumberPrototype%': Number.prototype,
|
|
1748
1958
|
'%Object%': Object,
|
|
1959
|
+
'%ObjectPrototype%': Object.prototype,
|
|
1960
|
+
'%ObjProto_toString%': Object.prototype.toString,
|
|
1961
|
+
'%ObjProto_valueOf%': Object.prototype.valueOf,
|
|
1749
1962
|
'%parseFloat%': parseFloat,
|
|
1750
1963
|
'%parseInt%': parseInt,
|
|
1751
1964
|
'%Promise%': typeof Promise === 'undefined' ? undefined$1 : Promise,
|
|
1965
|
+
'%PromisePrototype%': typeof Promise === 'undefined' ? undefined$1 : Promise.prototype,
|
|
1966
|
+
'%PromiseProto_then%': typeof Promise === 'undefined' ? undefined$1 : Promise.prototype.then,
|
|
1967
|
+
'%Promise_all%': typeof Promise === 'undefined' ? undefined$1 : Promise.all,
|
|
1968
|
+
'%Promise_reject%': typeof Promise === 'undefined' ? undefined$1 : Promise.reject,
|
|
1969
|
+
'%Promise_resolve%': typeof Promise === 'undefined' ? undefined$1 : Promise.resolve,
|
|
1752
1970
|
'%Proxy%': typeof Proxy === 'undefined' ? undefined$1 : Proxy,
|
|
1753
1971
|
'%RangeError%': RangeError,
|
|
1972
|
+
'%RangeErrorPrototype%': RangeError.prototype,
|
|
1754
1973
|
'%ReferenceError%': ReferenceError,
|
|
1974
|
+
'%ReferenceErrorPrototype%': ReferenceError.prototype,
|
|
1755
1975
|
'%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
|
|
1756
1976
|
'%RegExp%': RegExp,
|
|
1977
|
+
'%RegExpPrototype%': RegExp.prototype,
|
|
1757
1978
|
'%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
|
|
1758
1979
|
'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$2 ? undefined$1 : getProto(new Set()[Symbol.iterator]()),
|
|
1980
|
+
'%SetPrototype%': typeof Set === 'undefined' ? undefined$1 : Set.prototype,
|
|
1759
1981
|
'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
|
|
1982
|
+
'%SharedArrayBufferPrototype%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer.prototype,
|
|
1760
1983
|
'%String%': String,
|
|
1761
1984
|
'%StringIteratorPrototype%': hasSymbols$2 ? getProto(''[Symbol.iterator]()) : undefined$1,
|
|
1985
|
+
'%StringPrototype%': String.prototype,
|
|
1762
1986
|
'%Symbol%': hasSymbols$2 ? Symbol : undefined$1,
|
|
1763
|
-
'%
|
|
1987
|
+
'%SymbolPrototype%': hasSymbols$2 ? Symbol.prototype : undefined$1,
|
|
1988
|
+
'%SyntaxError%': SyntaxError,
|
|
1989
|
+
'%SyntaxErrorPrototype%': SyntaxError.prototype,
|
|
1764
1990
|
'%ThrowTypeError%': ThrowTypeError,
|
|
1765
1991
|
'%TypedArray%': TypedArray,
|
|
1992
|
+
'%TypedArrayPrototype%': TypedArray ? TypedArray.prototype : undefined$1,
|
|
1766
1993
|
'%TypeError%': $TypeError,
|
|
1994
|
+
'%TypeErrorPrototype%': $TypeError.prototype,
|
|
1767
1995
|
'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$1 : Uint8Array,
|
|
1996
|
+
'%Uint8ArrayPrototype%': typeof Uint8Array === 'undefined' ? undefined$1 : Uint8Array.prototype,
|
|
1768
1997
|
'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray,
|
|
1998
|
+
'%Uint8ClampedArrayPrototype%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray.prototype,
|
|
1769
1999
|
'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array,
|
|
2000
|
+
'%Uint16ArrayPrototype%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array.prototype,
|
|
1770
2001
|
'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined$1 : Uint32Array,
|
|
2002
|
+
'%Uint32ArrayPrototype%': typeof Uint32Array === 'undefined' ? undefined$1 : Uint32Array.prototype,
|
|
1771
2003
|
'%URIError%': URIError,
|
|
2004
|
+
'%URIErrorPrototype%': URIError.prototype,
|
|
1772
2005
|
'%WeakMap%': typeof WeakMap === 'undefined' ? undefined$1 : WeakMap,
|
|
1773
|
-
'%
|
|
1774
|
-
'%WeakSet%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
var doEval = function doEval(name) {
|
|
1778
|
-
var value;
|
|
1779
|
-
if (name === '%AsyncFunction%') {
|
|
1780
|
-
value = getEvalledConstructor('async function () {}');
|
|
1781
|
-
} else if (name === '%GeneratorFunction%') {
|
|
1782
|
-
value = getEvalledConstructor('function* () {}');
|
|
1783
|
-
} else if (name === '%AsyncGeneratorFunction%') {
|
|
1784
|
-
value = getEvalledConstructor('async function* () {}');
|
|
1785
|
-
} else if (name === '%AsyncGenerator%') {
|
|
1786
|
-
var fn = doEval('%AsyncGeneratorFunction%');
|
|
1787
|
-
if (fn) {
|
|
1788
|
-
value = fn.prototype;
|
|
1789
|
-
}
|
|
1790
|
-
} else if (name === '%AsyncIteratorPrototype%') {
|
|
1791
|
-
var gen = doEval('%AsyncGenerator%');
|
|
1792
|
-
if (gen) {
|
|
1793
|
-
value = getProto(gen.prototype);
|
|
1794
|
-
}
|
|
1795
|
-
}
|
|
1796
|
-
|
|
1797
|
-
INTRINSICS[name] = value;
|
|
1798
|
-
|
|
1799
|
-
return value;
|
|
2006
|
+
'%WeakMapPrototype%': typeof WeakMap === 'undefined' ? undefined$1 : WeakMap.prototype,
|
|
2007
|
+
'%WeakSet%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet,
|
|
2008
|
+
'%WeakSetPrototype%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet.prototype
|
|
1800
2009
|
};
|
|
1801
2010
|
|
|
1802
|
-
var LEGACY_ALIASES = {
|
|
1803
|
-
'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
|
|
1804
|
-
'%ArrayPrototype%': ['Array', 'prototype'],
|
|
1805
|
-
'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
|
|
1806
|
-
'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
|
|
1807
|
-
'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
|
|
1808
|
-
'%ArrayProto_values%': ['Array', 'prototype', 'values'],
|
|
1809
|
-
'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
|
|
1810
|
-
'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
|
|
1811
|
-
'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
|
|
1812
|
-
'%BooleanPrototype%': ['Boolean', 'prototype'],
|
|
1813
|
-
'%DataViewPrototype%': ['DataView', 'prototype'],
|
|
1814
|
-
'%DatePrototype%': ['Date', 'prototype'],
|
|
1815
|
-
'%ErrorPrototype%': ['Error', 'prototype'],
|
|
1816
|
-
'%EvalErrorPrototype%': ['EvalError', 'prototype'],
|
|
1817
|
-
'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
|
|
1818
|
-
'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
|
|
1819
|
-
'%FunctionPrototype%': ['Function', 'prototype'],
|
|
1820
|
-
'%Generator%': ['GeneratorFunction', 'prototype'],
|
|
1821
|
-
'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
|
|
1822
|
-
'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
|
|
1823
|
-
'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
|
|
1824
|
-
'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
|
|
1825
|
-
'%JSONParse%': ['JSON', 'parse'],
|
|
1826
|
-
'%JSONStringify%': ['JSON', 'stringify'],
|
|
1827
|
-
'%MapPrototype%': ['Map', 'prototype'],
|
|
1828
|
-
'%NumberPrototype%': ['Number', 'prototype'],
|
|
1829
|
-
'%ObjectPrototype%': ['Object', 'prototype'],
|
|
1830
|
-
'%ObjProto_toString%': ['Object', 'prototype', 'toString'],
|
|
1831
|
-
'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
|
|
1832
|
-
'%PromisePrototype%': ['Promise', 'prototype'],
|
|
1833
|
-
'%PromiseProto_then%': ['Promise', 'prototype', 'then'],
|
|
1834
|
-
'%Promise_all%': ['Promise', 'all'],
|
|
1835
|
-
'%Promise_reject%': ['Promise', 'reject'],
|
|
1836
|
-
'%Promise_resolve%': ['Promise', 'resolve'],
|
|
1837
|
-
'%RangeErrorPrototype%': ['RangeError', 'prototype'],
|
|
1838
|
-
'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
|
|
1839
|
-
'%RegExpPrototype%': ['RegExp', 'prototype'],
|
|
1840
|
-
'%SetPrototype%': ['Set', 'prototype'],
|
|
1841
|
-
'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
|
|
1842
|
-
'%StringPrototype%': ['String', 'prototype'],
|
|
1843
|
-
'%SymbolPrototype%': ['Symbol', 'prototype'],
|
|
1844
|
-
'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
|
|
1845
|
-
'%TypedArrayPrototype%': ['TypedArray', 'prototype'],
|
|
1846
|
-
'%TypeErrorPrototype%': ['TypeError', 'prototype'],
|
|
1847
|
-
'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
|
|
1848
|
-
'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
|
|
1849
|
-
'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
|
|
1850
|
-
'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
|
|
1851
|
-
'%URIErrorPrototype%': ['URIError', 'prototype'],
|
|
1852
|
-
'%WeakMapPrototype%': ['WeakMap', 'prototype'],
|
|
1853
|
-
'%WeakSetPrototype%': ['WeakSet', 'prototype']
|
|
1854
|
-
};
|
|
1855
2011
|
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
var $concat = functionBind.call(Function.call, Array.prototype.concat);
|
|
1859
|
-
var $spliceApply = functionBind.call(Function.apply, Array.prototype.splice);
|
|
1860
2012
|
var $replace = functionBind.call(Function.call, String.prototype.replace);
|
|
1861
|
-
var $strSlice = functionBind.call(Function.call, String.prototype.slice);
|
|
1862
2013
|
|
|
1863
2014
|
/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
|
|
1864
2015
|
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
1865
2016
|
var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
|
|
1866
2017
|
var stringToPath = function stringToPath(string) {
|
|
1867
|
-
var first = $strSlice(string, 0, 1);
|
|
1868
|
-
var last = $strSlice(string, -1);
|
|
1869
|
-
if (first === '%' && last !== '%') {
|
|
1870
|
-
throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
|
|
1871
|
-
} else if (last === '%' && first !== '%') {
|
|
1872
|
-
throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
|
|
1873
|
-
}
|
|
1874
2018
|
var result = [];
|
|
1875
2019
|
$replace(string, rePropName, function (match, number, quote, subString) {
|
|
1876
|
-
result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
|
|
2020
|
+
result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : (number || match);
|
|
1877
2021
|
});
|
|
1878
2022
|
return result;
|
|
1879
2023
|
};
|
|
1880
2024
|
/* end adaptation */
|
|
1881
2025
|
|
|
1882
2026
|
var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
if (src(LEGACY_ALIASES, intrinsicName)) {
|
|
1886
|
-
alias = LEGACY_ALIASES[intrinsicName];
|
|
1887
|
-
intrinsicName = '%' + alias[0] + '%';
|
|
2027
|
+
if (!(name in INTRINSICS)) {
|
|
2028
|
+
throw new SyntaxError('intrinsic ' + name + ' does not exist!');
|
|
1888
2029
|
}
|
|
1889
2030
|
|
|
1890
|
-
if
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
value = doEval(intrinsicName);
|
|
1894
|
-
}
|
|
1895
|
-
if (typeof value === 'undefined' && !allowMissing) {
|
|
1896
|
-
throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
|
|
1897
|
-
}
|
|
1898
|
-
|
|
1899
|
-
return {
|
|
1900
|
-
alias: alias,
|
|
1901
|
-
name: intrinsicName,
|
|
1902
|
-
value: value
|
|
1903
|
-
};
|
|
2031
|
+
// istanbul ignore if // hopefully this is impossible to test :-)
|
|
2032
|
+
if (typeof INTRINSICS[name] === 'undefined' && !allowMissing) {
|
|
2033
|
+
throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
|
|
1904
2034
|
}
|
|
1905
2035
|
|
|
1906
|
-
|
|
2036
|
+
return INTRINSICS[name];
|
|
1907
2037
|
};
|
|
1908
2038
|
|
|
1909
|
-
var
|
|
2039
|
+
var GetIntrinsic = function GetIntrinsic(name, allowMissing) {
|
|
1910
2040
|
if (typeof name !== 'string' || name.length === 0) {
|
|
1911
|
-
throw new
|
|
2041
|
+
throw new TypeError('intrinsic name must be a non-empty string');
|
|
1912
2042
|
}
|
|
1913
2043
|
if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
|
|
1914
|
-
throw new
|
|
2044
|
+
throw new TypeError('"allowMissing" argument must be a boolean');
|
|
1915
2045
|
}
|
|
1916
2046
|
|
|
1917
2047
|
var parts = stringToPath(name);
|
|
1918
|
-
var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
|
|
1919
|
-
|
|
1920
|
-
var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
|
|
1921
|
-
var intrinsicRealName = intrinsic.name;
|
|
1922
|
-
var value = intrinsic.value;
|
|
1923
|
-
var skipFurtherCaching = false;
|
|
1924
|
-
|
|
1925
|
-
var alias = intrinsic.alias;
|
|
1926
|
-
if (alias) {
|
|
1927
|
-
intrinsicBaseName = alias[0];
|
|
1928
|
-
$spliceApply(parts, $concat([0, 1], alias));
|
|
1929
|
-
}
|
|
1930
|
-
|
|
1931
|
-
for (var i = 1, isOwn = true; i < parts.length; i += 1) {
|
|
1932
|
-
var part = parts[i];
|
|
1933
|
-
var first = $strSlice(part, 0, 1);
|
|
1934
|
-
var last = $strSlice(part, -1);
|
|
1935
|
-
if (
|
|
1936
|
-
(
|
|
1937
|
-
(first === '"' || first === "'" || first === '`')
|
|
1938
|
-
|| (last === '"' || last === "'" || last === '`')
|
|
1939
|
-
)
|
|
1940
|
-
&& first !== last
|
|
1941
|
-
) {
|
|
1942
|
-
throw new $SyntaxError('property names with quotes must have matching quotes');
|
|
1943
|
-
}
|
|
1944
|
-
if (part === 'constructor' || !isOwn) {
|
|
1945
|
-
skipFurtherCaching = true;
|
|
1946
|
-
}
|
|
1947
2048
|
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
if (src(INTRINSICS, intrinsicRealName)) {
|
|
1952
|
-
value = INTRINSICS[intrinsicRealName];
|
|
1953
|
-
} else if (value != null) {
|
|
1954
|
-
if (!(part in value)) {
|
|
1955
|
-
if (!allowMissing) {
|
|
1956
|
-
throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
|
|
1957
|
-
}
|
|
1958
|
-
return void undefined$1;
|
|
1959
|
-
}
|
|
2049
|
+
var value = getBaseIntrinsic('%' + (parts.length > 0 ? parts[0] : '') + '%', allowMissing);
|
|
2050
|
+
for (var i = 1; i < parts.length; i += 1) {
|
|
2051
|
+
if (value != null) {
|
|
1960
2052
|
if ($gOPD && (i + 1) >= parts.length) {
|
|
1961
|
-
var desc = $gOPD(value,
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
// By convention, when a data property is converted to an accessor
|
|
1965
|
-
// property to emulate a data property that does not suffer from
|
|
1966
|
-
// the override mistake, that accessor's getter is marked with
|
|
1967
|
-
// an `originalValue` property. Here, when we detect this, we
|
|
1968
|
-
// uphold the illusion by pretending to see that original data
|
|
1969
|
-
// property, i.e., returning the value rather than the getter
|
|
1970
|
-
// itself.
|
|
1971
|
-
if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
|
|
1972
|
-
value = desc.get;
|
|
1973
|
-
} else {
|
|
1974
|
-
value = value[part];
|
|
2053
|
+
var desc = $gOPD(value, parts[i]);
|
|
2054
|
+
if (!allowMissing && !(parts[i] in value)) {
|
|
2055
|
+
throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
|
|
1975
2056
|
}
|
|
2057
|
+
value = desc ? (desc.get || desc.value) : value[parts[i]];
|
|
1976
2058
|
} else {
|
|
1977
|
-
|
|
1978
|
-
value = value[part];
|
|
1979
|
-
}
|
|
1980
|
-
|
|
1981
|
-
if (isOwn && !skipFurtherCaching) {
|
|
1982
|
-
INTRINSICS[intrinsicRealName] = value;
|
|
2059
|
+
value = value[parts[i]];
|
|
1983
2060
|
}
|
|
1984
2061
|
}
|
|
1985
2062
|
}
|
|
1986
2063
|
return value;
|
|
1987
2064
|
};
|
|
1988
2065
|
|
|
1989
|
-
var
|
|
2066
|
+
var $Function = GetIntrinsic('%Function%');
|
|
2067
|
+
var $apply = $Function.apply;
|
|
2068
|
+
var $call = $Function.call;
|
|
1990
2069
|
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
var $apply = getIntrinsic('%Function.prototype.apply%');
|
|
1995
|
-
var $call = getIntrinsic('%Function.prototype.call%');
|
|
1996
|
-
var $reflectApply = getIntrinsic('%Reflect.apply%', true) || functionBind.call($call, $apply);
|
|
1997
|
-
|
|
1998
|
-
var $gOPD = getIntrinsic('%Object.getOwnPropertyDescriptor%', true);
|
|
1999
|
-
var $defineProperty = getIntrinsic('%Object.defineProperty%', true);
|
|
2000
|
-
var $max = getIntrinsic('%Math.max%');
|
|
2001
|
-
|
|
2002
|
-
if ($defineProperty) {
|
|
2003
|
-
try {
|
|
2004
|
-
$defineProperty({}, 'a', { value: 1 });
|
|
2005
|
-
} catch (e) {
|
|
2006
|
-
// IE 8 has a broken defineProperty
|
|
2007
|
-
$defineProperty = null;
|
|
2008
|
-
}
|
|
2009
|
-
}
|
|
2010
|
-
|
|
2011
|
-
module.exports = function callBind(originalFunction) {
|
|
2012
|
-
var func = $reflectApply(functionBind, $call, arguments);
|
|
2013
|
-
if ($gOPD && $defineProperty) {
|
|
2014
|
-
var desc = $gOPD(func, 'length');
|
|
2015
|
-
if (desc.configurable) {
|
|
2016
|
-
// original length, plus the receiver, minus any additional arguments (after the receiver)
|
|
2017
|
-
$defineProperty(
|
|
2018
|
-
func,
|
|
2019
|
-
'length',
|
|
2020
|
-
{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }
|
|
2021
|
-
);
|
|
2022
|
-
}
|
|
2023
|
-
}
|
|
2024
|
-
return func;
|
|
2070
|
+
var callBind = function callBind() {
|
|
2071
|
+
return functionBind.apply($call, arguments);
|
|
2025
2072
|
};
|
|
2026
2073
|
|
|
2027
|
-
var
|
|
2028
|
-
return
|
|
2074
|
+
var apply = function applyBind() {
|
|
2075
|
+
return functionBind.apply($apply, arguments);
|
|
2029
2076
|
};
|
|
2077
|
+
callBind.apply = apply;
|
|
2030
2078
|
|
|
2031
|
-
|
|
2032
|
-
$defineProperty(module.exports, 'apply', { value: applyBind });
|
|
2033
|
-
} else {
|
|
2034
|
-
module.exports.apply = applyBind;
|
|
2035
|
-
}
|
|
2036
|
-
});
|
|
2037
|
-
callBind.apply;
|
|
2038
|
-
|
|
2039
|
-
var $indexOf = callBind(getIntrinsic('String.prototype.indexOf'));
|
|
2079
|
+
var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));
|
|
2040
2080
|
|
|
2041
2081
|
var callBound = function callBoundIntrinsic(name, allowMissing) {
|
|
2042
|
-
var intrinsic =
|
|
2043
|
-
if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.')
|
|
2082
|
+
var intrinsic = GetIntrinsic(name, !!allowMissing);
|
|
2083
|
+
if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.')) {
|
|
2044
2084
|
return callBind(intrinsic);
|
|
2045
2085
|
}
|
|
2046
2086
|
return intrinsic;
|
|
2047
2087
|
};
|
|
2048
2088
|
|
|
2049
|
-
var $defineProperty =
|
|
2089
|
+
var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
|
|
2050
2090
|
|
|
2051
2091
|
if ($defineProperty) {
|
|
2052
2092
|
try {
|
|
@@ -2088,8 +2128,10 @@ var DefineOwnProperty = function DefineOwnProperty(IsDataDescriptor, SameValue,
|
|
|
2088
2128
|
return true;
|
|
2089
2129
|
};
|
|
2090
2130
|
|
|
2091
|
-
var
|
|
2092
|
-
|
|
2131
|
+
var src = functionBind.call(Function.call, Object.prototype.hasOwnProperty);
|
|
2132
|
+
|
|
2133
|
+
var $TypeError$1 = GetIntrinsic('%TypeError%');
|
|
2134
|
+
var $SyntaxError = GetIntrinsic('%SyntaxError%');
|
|
2093
2135
|
|
|
2094
2136
|
|
|
2095
2137
|
|
|
@@ -2126,14 +2168,14 @@ var predicates = {
|
|
|
2126
2168
|
var assertRecord = function assertRecord(Type, recordType, argumentName, value) {
|
|
2127
2169
|
var predicate = predicates[recordType];
|
|
2128
2170
|
if (typeof predicate !== 'function') {
|
|
2129
|
-
throw new $SyntaxError
|
|
2171
|
+
throw new $SyntaxError('unknown record type: ' + recordType);
|
|
2130
2172
|
}
|
|
2131
2173
|
if (!predicate(Type, value)) {
|
|
2132
2174
|
throw new $TypeError$1(argumentName + ' must be a ' + recordType);
|
|
2133
2175
|
}
|
|
2134
2176
|
};
|
|
2135
2177
|
|
|
2136
|
-
// https://ecma-international.org/ecma-262/5.1/#sec-8
|
|
2178
|
+
// https://www.ecma-international.org/ecma-262/5.1/#sec-8
|
|
2137
2179
|
|
|
2138
2180
|
var Type = function Type(x) {
|
|
2139
2181
|
if (x === null) {
|
|
@@ -2156,19 +2198,16 @@ var Type = function Type(x) {
|
|
|
2156
2198
|
}
|
|
2157
2199
|
};
|
|
2158
2200
|
|
|
2159
|
-
// https://ecma-international.org/ecma-262/
|
|
2201
|
+
// https://www.ecma-international.org/ecma-262/6.0/#sec-tostring
|
|
2160
2202
|
|
|
2161
2203
|
var Type$1 = function Type$1(x) {
|
|
2162
2204
|
if (typeof x === 'symbol') {
|
|
2163
2205
|
return 'Symbol';
|
|
2164
2206
|
}
|
|
2165
|
-
if (typeof x === 'bigint') {
|
|
2166
|
-
return 'BigInt';
|
|
2167
|
-
}
|
|
2168
2207
|
return Type(x);
|
|
2169
2208
|
};
|
|
2170
2209
|
|
|
2171
|
-
// https://ecma-international.org/ecma-262/6.0/#sec-frompropertydescriptor
|
|
2210
|
+
// https://www.ecma-international.org/ecma-262/6.0/#sec-frompropertydescriptor
|
|
2172
2211
|
|
|
2173
2212
|
var FromPropertyDescriptor = function FromPropertyDescriptor(Desc) {
|
|
2174
2213
|
if (typeof Desc === 'undefined') {
|
|
@@ -2199,7 +2238,7 @@ var FromPropertyDescriptor = function FromPropertyDescriptor(Desc) {
|
|
|
2199
2238
|
return obj;
|
|
2200
2239
|
};
|
|
2201
2240
|
|
|
2202
|
-
var $gOPD$1 =
|
|
2241
|
+
var $gOPD$1 = GetIntrinsic('%Object.getOwnPropertyDescriptor%');
|
|
2203
2242
|
if ($gOPD$1) {
|
|
2204
2243
|
try {
|
|
2205
2244
|
$gOPD$1([], 'length');
|
|
@@ -2211,85 +2250,65 @@ if ($gOPD$1) {
|
|
|
2211
2250
|
|
|
2212
2251
|
var getOwnPropertyDescriptor = $gOPD$1;
|
|
2213
2252
|
|
|
2214
|
-
var $Array =
|
|
2253
|
+
var $Array = GetIntrinsic('%Array%');
|
|
2215
2254
|
|
|
2216
2255
|
// eslint-disable-next-line global-require
|
|
2217
2256
|
var toStr$4 = !$Array.isArray && callBound('Object.prototype.toString');
|
|
2218
2257
|
|
|
2219
|
-
// https://ecma-international.org/ecma-262/6.0/#sec-isarray
|
|
2258
|
+
// https://www.ecma-international.org/ecma-262/6.0/#sec-isarray
|
|
2220
2259
|
|
|
2221
2260
|
var IsArray = $Array.isArray || function IsArray(argument) {
|
|
2222
2261
|
return toStr$4(argument) === '[object Array]';
|
|
2223
2262
|
};
|
|
2224
2263
|
|
|
2225
|
-
// https://ecma-international.org/ecma-262/6.0/#sec-ispropertykey
|
|
2264
|
+
// https://www.ecma-international.org/ecma-262/6.0/#sec-ispropertykey
|
|
2226
2265
|
|
|
2227
2266
|
var IsPropertyKey = function IsPropertyKey(argument) {
|
|
2228
2267
|
return typeof argument === 'string' || typeof argument === 'symbol';
|
|
2229
2268
|
};
|
|
2230
2269
|
|
|
2231
|
-
var
|
|
2232
|
-
var
|
|
2233
|
-
var has$1;
|
|
2234
|
-
var $exec;
|
|
2235
|
-
var isRegexMarker;
|
|
2236
|
-
var badStringifier;
|
|
2237
|
-
|
|
2238
|
-
if (hasToStringTag) {
|
|
2239
|
-
has$1 = callBound('Object.prototype.hasOwnProperty');
|
|
2240
|
-
$exec = callBound('RegExp.prototype.exec');
|
|
2241
|
-
isRegexMarker = {};
|
|
2242
|
-
|
|
2243
|
-
var throwRegexMarker = function () {
|
|
2244
|
-
throw isRegexMarker;
|
|
2245
|
-
};
|
|
2246
|
-
badStringifier = {
|
|
2247
|
-
toString: throwRegexMarker,
|
|
2248
|
-
valueOf: throwRegexMarker
|
|
2249
|
-
};
|
|
2270
|
+
var regexExec = RegExp.prototype.exec;
|
|
2271
|
+
var gOPD = Object.getOwnPropertyDescriptor;
|
|
2250
2272
|
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2273
|
+
var tryRegexExecCall = function tryRegexExec(value) {
|
|
2274
|
+
try {
|
|
2275
|
+
var lastIndex = value.lastIndex;
|
|
2276
|
+
value.lastIndex = 0; // eslint-disable-line no-param-reassign
|
|
2255
2277
|
|
|
2256
|
-
|
|
2257
|
-
|
|
2278
|
+
regexExec.call(value);
|
|
2279
|
+
return true;
|
|
2280
|
+
} catch (e) {
|
|
2281
|
+
return false;
|
|
2282
|
+
} finally {
|
|
2283
|
+
value.lastIndex = lastIndex; // eslint-disable-line no-param-reassign
|
|
2284
|
+
}
|
|
2285
|
+
};
|
|
2286
|
+
var toStr$5 = Object.prototype.toString;
|
|
2258
2287
|
var regexClass = '[object RegExp]';
|
|
2288
|
+
var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
|
|
2259
2289
|
|
|
2260
|
-
var isRegex =
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
var descriptor = gOPD(value, 'lastIndex');
|
|
2268
|
-
var hasLastIndexDataProperty = descriptor && has$1(descriptor, 'value');
|
|
2269
|
-
if (!hasLastIndexDataProperty) {
|
|
2270
|
-
return false;
|
|
2271
|
-
}
|
|
2290
|
+
var isRegex = function isRegex(value) {
|
|
2291
|
+
if (!value || typeof value !== 'object') {
|
|
2292
|
+
return false;
|
|
2293
|
+
}
|
|
2294
|
+
if (!hasToStringTag) {
|
|
2295
|
+
return toStr$5.call(value) === regexClass;
|
|
2296
|
+
}
|
|
2272
2297
|
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
}
|
|
2298
|
+
var descriptor = gOPD(value, 'lastIndex');
|
|
2299
|
+
var hasLastIndexDataProperty = descriptor && src(descriptor, 'value');
|
|
2300
|
+
if (!hasLastIndexDataProperty) {
|
|
2301
|
+
return false;
|
|
2278
2302
|
}
|
|
2279
|
-
: function isRegex(value) {
|
|
2280
|
-
// In older browsers, typeof regex incorrectly returns 'function'
|
|
2281
|
-
if (!value || (typeof value !== 'object' && typeof value !== 'function')) {
|
|
2282
|
-
return false;
|
|
2283
|
-
}
|
|
2284
2303
|
|
|
2285
|
-
|
|
2286
|
-
|
|
2304
|
+
return tryRegexExecCall(value);
|
|
2305
|
+
};
|
|
2287
2306
|
|
|
2288
|
-
// http://ecma-international.org/ecma-262/5.1/#sec-9.2
|
|
2307
|
+
// http://www.ecma-international.org/ecma-262/5.1/#sec-9.2
|
|
2289
2308
|
|
|
2290
2309
|
var ToBoolean = function ToBoolean(value) { return !!value; };
|
|
2291
2310
|
|
|
2292
|
-
var $match =
|
|
2311
|
+
var $match = GetIntrinsic('%Symbol.match%', true);
|
|
2293
2312
|
|
|
2294
2313
|
|
|
2295
2314
|
|
|
@@ -2311,27 +2330,6 @@ var IsRegExp = function IsRegExp(argument) {
|
|
|
2311
2330
|
};
|
|
2312
2331
|
|
|
2313
2332
|
var fnToStr = Function.prototype.toString;
|
|
2314
|
-
var reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;
|
|
2315
|
-
var badArrayLike;
|
|
2316
|
-
var isCallableMarker;
|
|
2317
|
-
if (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {
|
|
2318
|
-
try {
|
|
2319
|
-
badArrayLike = Object.defineProperty({}, 'length', {
|
|
2320
|
-
get: function () {
|
|
2321
|
-
throw isCallableMarker;
|
|
2322
|
-
}
|
|
2323
|
-
});
|
|
2324
|
-
isCallableMarker = {};
|
|
2325
|
-
// eslint-disable-next-line no-throw-literal
|
|
2326
|
-
reflectApply(function () { throw 42; }, null, badArrayLike);
|
|
2327
|
-
} catch (_) {
|
|
2328
|
-
if (_ !== isCallableMarker) {
|
|
2329
|
-
reflectApply = null;
|
|
2330
|
-
}
|
|
2331
|
-
}
|
|
2332
|
-
} else {
|
|
2333
|
-
reflectApply = null;
|
|
2334
|
-
}
|
|
2335
2333
|
|
|
2336
2334
|
var constructorRegex = /^\s*class\b/;
|
|
2337
2335
|
var isES6ClassFn = function isES6ClassFunction(value) {
|
|
@@ -2352,42 +2350,26 @@ var tryFunctionObject = function tryFunctionToStr(value) {
|
|
|
2352
2350
|
return false;
|
|
2353
2351
|
}
|
|
2354
2352
|
};
|
|
2355
|
-
var toStr$
|
|
2353
|
+
var toStr$6 = Object.prototype.toString;
|
|
2356
2354
|
var fnClass = '[object Function]';
|
|
2357
2355
|
var genClass = '[object GeneratorFunction]';
|
|
2358
2356
|
var hasToStringTag$1 = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
|
|
2359
|
-
/* globals document: false */
|
|
2360
|
-
var documentDotAll = typeof document === 'object' && typeof document.all === 'undefined' && document.all !== undefined ? document.all : {};
|
|
2361
|
-
|
|
2362
|
-
var isCallable = reflectApply
|
|
2363
|
-
? function isCallable(value) {
|
|
2364
|
-
if (value === documentDotAll) { return true; }
|
|
2365
|
-
if (!value) { return false; }
|
|
2366
|
-
if (typeof value !== 'function' && typeof value !== 'object') { return false; }
|
|
2367
|
-
if (typeof value === 'function' && !value.prototype) { return true; }
|
|
2368
|
-
try {
|
|
2369
|
-
reflectApply(value, null, badArrayLike);
|
|
2370
|
-
} catch (e) {
|
|
2371
|
-
if (e !== isCallableMarker) { return false; }
|
|
2372
|
-
}
|
|
2373
|
-
return !isES6ClassFn(value);
|
|
2374
|
-
}
|
|
2375
|
-
: function isCallable(value) {
|
|
2376
|
-
if (value === documentDotAll) { return true; }
|
|
2377
|
-
if (!value) { return false; }
|
|
2378
|
-
if (typeof value !== 'function' && typeof value !== 'object') { return false; }
|
|
2379
|
-
if (typeof value === 'function' && !value.prototype) { return true; }
|
|
2380
|
-
if (hasToStringTag$1) { return tryFunctionObject(value); }
|
|
2381
|
-
if (isES6ClassFn(value)) { return false; }
|
|
2382
|
-
var strClass = toStr$5.call(value);
|
|
2383
|
-
return strClass === fnClass || strClass === genClass;
|
|
2384
|
-
};
|
|
2385
2357
|
|
|
2386
|
-
|
|
2358
|
+
var isCallable = function isCallable(value) {
|
|
2359
|
+
if (!value) { return false; }
|
|
2360
|
+
if (typeof value !== 'function' && typeof value !== 'object') { return false; }
|
|
2361
|
+
if (typeof value === 'function' && !value.prototype) { return true; }
|
|
2362
|
+
if (hasToStringTag$1) { return tryFunctionObject(value); }
|
|
2363
|
+
if (isES6ClassFn(value)) { return false; }
|
|
2364
|
+
var strClass = toStr$6.call(value);
|
|
2365
|
+
return strClass === fnClass || strClass === genClass;
|
|
2366
|
+
};
|
|
2367
|
+
|
|
2368
|
+
// http://www.ecma-international.org/ecma-262/5.1/#sec-9.11
|
|
2387
2369
|
|
|
2388
2370
|
var IsCallable = isCallable;
|
|
2389
2371
|
|
|
2390
|
-
var $TypeError$2 =
|
|
2372
|
+
var $TypeError$2 = GetIntrinsic('%TypeError%');
|
|
2391
2373
|
|
|
2392
2374
|
|
|
2393
2375
|
|
|
@@ -2416,7 +2398,7 @@ var ToPropertyDescriptor = function ToPropertyDescriptor(Obj) {
|
|
|
2416
2398
|
if (src(Obj, 'get')) {
|
|
2417
2399
|
var getter = Obj.get;
|
|
2418
2400
|
if (typeof getter !== 'undefined' && !IsCallable(getter)) {
|
|
2419
|
-
throw new
|
|
2401
|
+
throw new TypeError('getter must be a function');
|
|
2420
2402
|
}
|
|
2421
2403
|
desc['[[Get]]'] = getter;
|
|
2422
2404
|
}
|
|
@@ -2434,7 +2416,7 @@ var ToPropertyDescriptor = function ToPropertyDescriptor(Obj) {
|
|
|
2434
2416
|
return desc;
|
|
2435
2417
|
};
|
|
2436
2418
|
|
|
2437
|
-
var $TypeError$3 =
|
|
2419
|
+
var $TypeError$3 = GetIntrinsic('%TypeError%');
|
|
2438
2420
|
|
|
2439
2421
|
|
|
2440
2422
|
|
|
@@ -2448,7 +2430,7 @@ var $isEnumerable$1 = callBound('Object.prototype.propertyIsEnumerable');
|
|
|
2448
2430
|
|
|
2449
2431
|
|
|
2450
2432
|
|
|
2451
|
-
// https://ecma-international.org/ecma-262/6.0/#sec-ordinarygetownproperty
|
|
2433
|
+
// https://www.ecma-international.org/ecma-262/6.0/#sec-ordinarygetownproperty
|
|
2452
2434
|
|
|
2453
2435
|
var OrdinaryGetOwnProperty = function OrdinaryGetOwnProperty(O, P) {
|
|
2454
2436
|
if (Type$1(O) !== 'Object') {
|
|
@@ -2474,7 +2456,7 @@ var OrdinaryGetOwnProperty = function OrdinaryGetOwnProperty(O, P) {
|
|
|
2474
2456
|
return ToPropertyDescriptor(getOwnPropertyDescriptor(O, P));
|
|
2475
2457
|
};
|
|
2476
2458
|
|
|
2477
|
-
// https://ecma-international.org/ecma-262/6.0/#sec-isdatadescriptor
|
|
2459
|
+
// https://www.ecma-international.org/ecma-262/6.0/#sec-isdatadescriptor
|
|
2478
2460
|
|
|
2479
2461
|
var IsDataDescriptor = function IsDataDescriptor(Desc) {
|
|
2480
2462
|
if (typeof Desc === 'undefined') {
|
|
@@ -2494,14 +2476,14 @@ var isPrimitive = function isPrimitive(value) {
|
|
|
2494
2476
|
return value === null || (typeof value !== 'function' && typeof value !== 'object');
|
|
2495
2477
|
};
|
|
2496
2478
|
|
|
2497
|
-
var $Object =
|
|
2479
|
+
var $Object = GetIntrinsic('%Object%');
|
|
2498
2480
|
|
|
2499
2481
|
|
|
2500
2482
|
|
|
2501
2483
|
var $preventExtensions = $Object.preventExtensions;
|
|
2502
2484
|
var $isExtensible = $Object.isExtensible;
|
|
2503
2485
|
|
|
2504
|
-
// https://ecma-international.org/ecma-262/6.0/#sec-isextensible-o
|
|
2486
|
+
// https://www.ecma-international.org/ecma-262/6.0/#sec-isextensible-o
|
|
2505
2487
|
|
|
2506
2488
|
var IsExtensible = $preventExtensions
|
|
2507
2489
|
? function IsExtensible(obj) {
|
|
@@ -2515,7 +2497,7 @@ var _isNaN = Number.isNaN || function isNaN(a) {
|
|
|
2515
2497
|
return a !== a;
|
|
2516
2498
|
};
|
|
2517
2499
|
|
|
2518
|
-
// http://ecma-international.org/ecma-262/5.1/#sec-9.12
|
|
2500
|
+
// http://www.ecma-international.org/ecma-262/5.1/#sec-9.12
|
|
2519
2501
|
|
|
2520
2502
|
var SameValue = function SameValue(x, y) {
|
|
2521
2503
|
if (x === y) { // 0 === -0, but they are not identical.
|
|
@@ -2525,7 +2507,7 @@ var SameValue = function SameValue(x, y) {
|
|
|
2525
2507
|
return _isNaN(x) && _isNaN(y);
|
|
2526
2508
|
};
|
|
2527
2509
|
|
|
2528
|
-
var $TypeError$4 =
|
|
2510
|
+
var $TypeError$4 = GetIntrinsic('%TypeError%');
|
|
2529
2511
|
|
|
2530
2512
|
|
|
2531
2513
|
|
|
@@ -2537,7 +2519,7 @@ var $TypeError$4 = getIntrinsic('%TypeError%');
|
|
|
2537
2519
|
|
|
2538
2520
|
|
|
2539
2521
|
|
|
2540
|
-
// https://ecma-international.org/ecma-262/6.0/#sec-createdataproperty
|
|
2522
|
+
// https://www.ecma-international.org/ecma-262/6.0/#sec-createdataproperty
|
|
2541
2523
|
|
|
2542
2524
|
var CreateDataProperty = function CreateDataProperty(O, P, V) {
|
|
2543
2525
|
if (Type$1(O) !== 'Object') {
|
|
@@ -2547,8 +2529,8 @@ var CreateDataProperty = function CreateDataProperty(O, P, V) {
|
|
|
2547
2529
|
throw new $TypeError$4('Assertion failed: IsPropertyKey(P) is not true');
|
|
2548
2530
|
}
|
|
2549
2531
|
var oldDesc = OrdinaryGetOwnProperty(O, P);
|
|
2550
|
-
var extensible =
|
|
2551
|
-
var immutable = oldDesc && (!oldDesc
|
|
2532
|
+
var extensible = oldDesc || IsExtensible(O);
|
|
2533
|
+
var immutable = oldDesc && (!oldDesc.writable || !oldDesc.configurable);
|
|
2552
2534
|
if (immutable || !extensible) {
|
|
2553
2535
|
return false;
|
|
2554
2536
|
}
|
|
@@ -2567,9 +2549,9 @@ var CreateDataProperty = function CreateDataProperty(O, P, V) {
|
|
|
2567
2549
|
);
|
|
2568
2550
|
};
|
|
2569
2551
|
|
|
2570
|
-
var $TypeError$5 =
|
|
2552
|
+
var $TypeError$5 = GetIntrinsic('%TypeError%');
|
|
2571
2553
|
|
|
2572
|
-
// http://ecma-international.org/ecma-262/5.1/#sec-9.10
|
|
2554
|
+
// http://www.ecma-international.org/ecma-262/5.1/#sec-9.10
|
|
2573
2555
|
|
|
2574
2556
|
var CheckObjectCoercible = function CheckObjectCoercible(value, optMessage) {
|
|
2575
2557
|
if (value == null) {
|
|
@@ -2580,11 +2562,11 @@ var CheckObjectCoercible = function CheckObjectCoercible(value, optMessage) {
|
|
|
2580
2562
|
|
|
2581
2563
|
var RequireObjectCoercible = CheckObjectCoercible;
|
|
2582
2564
|
|
|
2583
|
-
var $Object$1 =
|
|
2565
|
+
var $Object$1 = GetIntrinsic('%Object%');
|
|
2584
2566
|
|
|
2585
2567
|
|
|
2586
2568
|
|
|
2587
|
-
// https://ecma-international.org/ecma-262/6.0/#sec-toobject
|
|
2569
|
+
// https://www.ecma-international.org/ecma-262/6.0/#sec-toobject
|
|
2588
2570
|
|
|
2589
2571
|
var ToObject = function ToObject(value) {
|
|
2590
2572
|
RequireObjectCoercible(value);
|
|
@@ -2594,10 +2576,10 @@ var ToObject = function ToObject(value) {
|
|
|
2594
2576
|
var $gOPD$2 = Object.getOwnPropertyDescriptor;
|
|
2595
2577
|
var $getOwnNames = Object.getOwnPropertyNames;
|
|
2596
2578
|
var $getSymbols = Object.getOwnPropertySymbols;
|
|
2597
|
-
var $concat
|
|
2579
|
+
var $concat = callBound('Array.prototype.concat');
|
|
2598
2580
|
var $reduce = callBound('Array.prototype.reduce');
|
|
2599
2581
|
var getAll = $getSymbols ? function (obj) {
|
|
2600
|
-
return $concat
|
|
2582
|
+
return $concat($getOwnNames(obj), $getSymbols(obj));
|
|
2601
2583
|
} : $getOwnNames;
|
|
2602
2584
|
|
|
2603
2585
|
var isES5 = IsCallable($gOPD$2) && IsCallable($getOwnNames);
|
|
@@ -2636,281 +2618,13 @@ var shim = function shimGetOwnPropertyDescriptors() {
|
|
|
2636
2618
|
return polyfill$1;
|
|
2637
2619
|
};
|
|
2638
2620
|
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
defineProperties_1(bound, {
|
|
2621
|
+
defineProperties_1(implementation$2, {
|
|
2642
2622
|
getPolyfill: polyfill,
|
|
2643
2623
|
implementation: implementation$2,
|
|
2644
2624
|
shim: shim
|
|
2645
2625
|
});
|
|
2646
2626
|
|
|
2647
|
-
var object_getownpropertydescriptors =
|
|
2648
|
-
|
|
2649
|
-
/* globals
|
|
2650
|
-
Atomics,
|
|
2651
|
-
SharedArrayBuffer,
|
|
2652
|
-
*/
|
|
2653
|
-
|
|
2654
|
-
var undefined$2;
|
|
2655
|
-
|
|
2656
|
-
var $TypeError$6 = TypeError;
|
|
2657
|
-
|
|
2658
|
-
var $gOPD$3 = Object.getOwnPropertyDescriptor;
|
|
2659
|
-
if ($gOPD$3) {
|
|
2660
|
-
try {
|
|
2661
|
-
$gOPD$3({}, '');
|
|
2662
|
-
} catch (e) {
|
|
2663
|
-
$gOPD$3 = null; // this is IE 8, which has a broken gOPD
|
|
2664
|
-
}
|
|
2665
|
-
}
|
|
2666
|
-
|
|
2667
|
-
var throwTypeError$1 = function () { throw new $TypeError$6(); };
|
|
2668
|
-
var ThrowTypeError$1 = $gOPD$3
|
|
2669
|
-
? (function () {
|
|
2670
|
-
try {
|
|
2671
|
-
// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
|
|
2672
|
-
arguments.callee; // IE 8 does not throw here
|
|
2673
|
-
return throwTypeError$1;
|
|
2674
|
-
} catch (calleeThrows) {
|
|
2675
|
-
try {
|
|
2676
|
-
// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
|
|
2677
|
-
return $gOPD$3(arguments, 'callee').get;
|
|
2678
|
-
} catch (gOPDthrows) {
|
|
2679
|
-
return throwTypeError$1;
|
|
2680
|
-
}
|
|
2681
|
-
}
|
|
2682
|
-
}())
|
|
2683
|
-
: throwTypeError$1;
|
|
2684
|
-
|
|
2685
|
-
var hasSymbols$4 = hasSymbols$1();
|
|
2686
|
-
|
|
2687
|
-
var getProto$1 = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto
|
|
2688
|
-
var generatorFunction = undefined$2;
|
|
2689
|
-
var asyncFunction = undefined$2;
|
|
2690
|
-
var asyncGenFunction = undefined$2;
|
|
2691
|
-
|
|
2692
|
-
var TypedArray$1 = typeof Uint8Array === 'undefined' ? undefined$2 : getProto$1(Uint8Array);
|
|
2693
|
-
|
|
2694
|
-
var INTRINSICS$1 = {
|
|
2695
|
-
'%Array%': Array,
|
|
2696
|
-
'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$2 : ArrayBuffer,
|
|
2697
|
-
'%ArrayBufferPrototype%': typeof ArrayBuffer === 'undefined' ? undefined$2 : ArrayBuffer.prototype,
|
|
2698
|
-
'%ArrayIteratorPrototype%': hasSymbols$4 ? getProto$1([][Symbol.iterator]()) : undefined$2,
|
|
2699
|
-
'%ArrayPrototype%': Array.prototype,
|
|
2700
|
-
'%ArrayProto_entries%': Array.prototype.entries,
|
|
2701
|
-
'%ArrayProto_forEach%': Array.prototype.forEach,
|
|
2702
|
-
'%ArrayProto_keys%': Array.prototype.keys,
|
|
2703
|
-
'%ArrayProto_values%': Array.prototype.values,
|
|
2704
|
-
'%AsyncFromSyncIteratorPrototype%': undefined$2,
|
|
2705
|
-
'%AsyncFunction%': asyncFunction,
|
|
2706
|
-
'%AsyncFunctionPrototype%': undefined$2,
|
|
2707
|
-
'%AsyncGenerator%': undefined$2,
|
|
2708
|
-
'%AsyncGeneratorFunction%': asyncGenFunction,
|
|
2709
|
-
'%AsyncGeneratorPrototype%': undefined$2,
|
|
2710
|
-
'%AsyncIteratorPrototype%': undefined$2,
|
|
2711
|
-
'%Atomics%': typeof Atomics === 'undefined' ? undefined$2 : Atomics,
|
|
2712
|
-
'%Boolean%': Boolean,
|
|
2713
|
-
'%BooleanPrototype%': Boolean.prototype,
|
|
2714
|
-
'%DataView%': typeof DataView === 'undefined' ? undefined$2 : DataView,
|
|
2715
|
-
'%DataViewPrototype%': typeof DataView === 'undefined' ? undefined$2 : DataView.prototype,
|
|
2716
|
-
'%Date%': Date,
|
|
2717
|
-
'%DatePrototype%': Date.prototype,
|
|
2718
|
-
'%decodeURI%': decodeURI,
|
|
2719
|
-
'%decodeURIComponent%': decodeURIComponent,
|
|
2720
|
-
'%encodeURI%': encodeURI,
|
|
2721
|
-
'%encodeURIComponent%': encodeURIComponent,
|
|
2722
|
-
'%Error%': Error,
|
|
2723
|
-
'%ErrorPrototype%': Error.prototype,
|
|
2724
|
-
'%eval%': eval, // eslint-disable-line no-eval
|
|
2725
|
-
'%EvalError%': EvalError,
|
|
2726
|
-
'%EvalErrorPrototype%': EvalError.prototype,
|
|
2727
|
-
'%Float32Array%': typeof Float32Array === 'undefined' ? undefined$2 : Float32Array,
|
|
2728
|
-
'%Float32ArrayPrototype%': typeof Float32Array === 'undefined' ? undefined$2 : Float32Array.prototype,
|
|
2729
|
-
'%Float64Array%': typeof Float64Array === 'undefined' ? undefined$2 : Float64Array,
|
|
2730
|
-
'%Float64ArrayPrototype%': typeof Float64Array === 'undefined' ? undefined$2 : Float64Array.prototype,
|
|
2731
|
-
'%Function%': Function,
|
|
2732
|
-
'%FunctionPrototype%': Function.prototype,
|
|
2733
|
-
'%Generator%': undefined$2,
|
|
2734
|
-
'%GeneratorFunction%': generatorFunction,
|
|
2735
|
-
'%GeneratorPrototype%': undefined$2,
|
|
2736
|
-
'%Int8Array%': typeof Int8Array === 'undefined' ? undefined$2 : Int8Array,
|
|
2737
|
-
'%Int8ArrayPrototype%': typeof Int8Array === 'undefined' ? undefined$2 : Int8Array.prototype,
|
|
2738
|
-
'%Int16Array%': typeof Int16Array === 'undefined' ? undefined$2 : Int16Array,
|
|
2739
|
-
'%Int16ArrayPrototype%': typeof Int16Array === 'undefined' ? undefined$2 : Int8Array.prototype,
|
|
2740
|
-
'%Int32Array%': typeof Int32Array === 'undefined' ? undefined$2 : Int32Array,
|
|
2741
|
-
'%Int32ArrayPrototype%': typeof Int32Array === 'undefined' ? undefined$2 : Int32Array.prototype,
|
|
2742
|
-
'%isFinite%': isFinite,
|
|
2743
|
-
'%isNaN%': isNaN,
|
|
2744
|
-
'%IteratorPrototype%': hasSymbols$4 ? getProto$1(getProto$1([][Symbol.iterator]())) : undefined$2,
|
|
2745
|
-
'%JSON%': typeof JSON === 'object' ? JSON : undefined$2,
|
|
2746
|
-
'%JSONParse%': typeof JSON === 'object' ? JSON.parse : undefined$2,
|
|
2747
|
-
'%Map%': typeof Map === 'undefined' ? undefined$2 : Map,
|
|
2748
|
-
'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$4 ? undefined$2 : getProto$1(new Map()[Symbol.iterator]()),
|
|
2749
|
-
'%MapPrototype%': typeof Map === 'undefined' ? undefined$2 : Map.prototype,
|
|
2750
|
-
'%Math%': Math,
|
|
2751
|
-
'%Number%': Number,
|
|
2752
|
-
'%NumberPrototype%': Number.prototype,
|
|
2753
|
-
'%Object%': Object,
|
|
2754
|
-
'%ObjectPrototype%': Object.prototype,
|
|
2755
|
-
'%ObjProto_toString%': Object.prototype.toString,
|
|
2756
|
-
'%ObjProto_valueOf%': Object.prototype.valueOf,
|
|
2757
|
-
'%parseFloat%': parseFloat,
|
|
2758
|
-
'%parseInt%': parseInt,
|
|
2759
|
-
'%Promise%': typeof Promise === 'undefined' ? undefined$2 : Promise,
|
|
2760
|
-
'%PromisePrototype%': typeof Promise === 'undefined' ? undefined$2 : Promise.prototype,
|
|
2761
|
-
'%PromiseProto_then%': typeof Promise === 'undefined' ? undefined$2 : Promise.prototype.then,
|
|
2762
|
-
'%Promise_all%': typeof Promise === 'undefined' ? undefined$2 : Promise.all,
|
|
2763
|
-
'%Promise_reject%': typeof Promise === 'undefined' ? undefined$2 : Promise.reject,
|
|
2764
|
-
'%Promise_resolve%': typeof Promise === 'undefined' ? undefined$2 : Promise.resolve,
|
|
2765
|
-
'%Proxy%': typeof Proxy === 'undefined' ? undefined$2 : Proxy,
|
|
2766
|
-
'%RangeError%': RangeError,
|
|
2767
|
-
'%RangeErrorPrototype%': RangeError.prototype,
|
|
2768
|
-
'%ReferenceError%': ReferenceError,
|
|
2769
|
-
'%ReferenceErrorPrototype%': ReferenceError.prototype,
|
|
2770
|
-
'%Reflect%': typeof Reflect === 'undefined' ? undefined$2 : Reflect,
|
|
2771
|
-
'%RegExp%': RegExp,
|
|
2772
|
-
'%RegExpPrototype%': RegExp.prototype,
|
|
2773
|
-
'%Set%': typeof Set === 'undefined' ? undefined$2 : Set,
|
|
2774
|
-
'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$4 ? undefined$2 : getProto$1(new Set()[Symbol.iterator]()),
|
|
2775
|
-
'%SetPrototype%': typeof Set === 'undefined' ? undefined$2 : Set.prototype,
|
|
2776
|
-
'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$2 : SharedArrayBuffer,
|
|
2777
|
-
'%SharedArrayBufferPrototype%': typeof SharedArrayBuffer === 'undefined' ? undefined$2 : SharedArrayBuffer.prototype,
|
|
2778
|
-
'%String%': String,
|
|
2779
|
-
'%StringIteratorPrototype%': hasSymbols$4 ? getProto$1(''[Symbol.iterator]()) : undefined$2,
|
|
2780
|
-
'%StringPrototype%': String.prototype,
|
|
2781
|
-
'%Symbol%': hasSymbols$4 ? Symbol : undefined$2,
|
|
2782
|
-
'%SymbolPrototype%': hasSymbols$4 ? Symbol.prototype : undefined$2,
|
|
2783
|
-
'%SyntaxError%': SyntaxError,
|
|
2784
|
-
'%SyntaxErrorPrototype%': SyntaxError.prototype,
|
|
2785
|
-
'%ThrowTypeError%': ThrowTypeError$1,
|
|
2786
|
-
'%TypedArray%': TypedArray$1,
|
|
2787
|
-
'%TypedArrayPrototype%': TypedArray$1 ? TypedArray$1.prototype : undefined$2,
|
|
2788
|
-
'%TypeError%': $TypeError$6,
|
|
2789
|
-
'%TypeErrorPrototype%': $TypeError$6.prototype,
|
|
2790
|
-
'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$2 : Uint8Array,
|
|
2791
|
-
'%Uint8ArrayPrototype%': typeof Uint8Array === 'undefined' ? undefined$2 : Uint8Array.prototype,
|
|
2792
|
-
'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$2 : Uint8ClampedArray,
|
|
2793
|
-
'%Uint8ClampedArrayPrototype%': typeof Uint8ClampedArray === 'undefined' ? undefined$2 : Uint8ClampedArray.prototype,
|
|
2794
|
-
'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$2 : Uint16Array,
|
|
2795
|
-
'%Uint16ArrayPrototype%': typeof Uint16Array === 'undefined' ? undefined$2 : Uint16Array.prototype,
|
|
2796
|
-
'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined$2 : Uint32Array,
|
|
2797
|
-
'%Uint32ArrayPrototype%': typeof Uint32Array === 'undefined' ? undefined$2 : Uint32Array.prototype,
|
|
2798
|
-
'%URIError%': URIError,
|
|
2799
|
-
'%URIErrorPrototype%': URIError.prototype,
|
|
2800
|
-
'%WeakMap%': typeof WeakMap === 'undefined' ? undefined$2 : WeakMap,
|
|
2801
|
-
'%WeakMapPrototype%': typeof WeakMap === 'undefined' ? undefined$2 : WeakMap.prototype,
|
|
2802
|
-
'%WeakSet%': typeof WeakSet === 'undefined' ? undefined$2 : WeakSet,
|
|
2803
|
-
'%WeakSetPrototype%': typeof WeakSet === 'undefined' ? undefined$2 : WeakSet.prototype
|
|
2804
|
-
};
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
var $replace$1 = functionBind.call(Function.call, String.prototype.replace);
|
|
2808
|
-
|
|
2809
|
-
/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
|
|
2810
|
-
var rePropName$1 = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
2811
|
-
var reEscapeChar$1 = /\\(\\)?/g; /** Used to match backslashes in property paths. */
|
|
2812
|
-
var stringToPath$1 = function stringToPath(string) {
|
|
2813
|
-
var result = [];
|
|
2814
|
-
$replace$1(string, rePropName$1, function (match, number, quote, subString) {
|
|
2815
|
-
result[result.length] = quote ? $replace$1(subString, reEscapeChar$1, '$1') : (number || match);
|
|
2816
|
-
});
|
|
2817
|
-
return result;
|
|
2818
|
-
};
|
|
2819
|
-
/* end adaptation */
|
|
2820
|
-
|
|
2821
|
-
var getBaseIntrinsic$1 = function getBaseIntrinsic(name, allowMissing) {
|
|
2822
|
-
if (!(name in INTRINSICS$1)) {
|
|
2823
|
-
throw new SyntaxError('intrinsic ' + name + ' does not exist!');
|
|
2824
|
-
}
|
|
2825
|
-
|
|
2826
|
-
// istanbul ignore if // hopefully this is impossible to test :-)
|
|
2827
|
-
if (typeof INTRINSICS$1[name] === 'undefined' && !allowMissing) {
|
|
2828
|
-
throw new $TypeError$6('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
|
|
2829
|
-
}
|
|
2830
|
-
|
|
2831
|
-
return INTRINSICS$1[name];
|
|
2832
|
-
};
|
|
2833
|
-
|
|
2834
|
-
var GetIntrinsic = function GetIntrinsic(name, allowMissing) {
|
|
2835
|
-
if (typeof name !== 'string' || name.length === 0) {
|
|
2836
|
-
throw new TypeError('intrinsic name must be a non-empty string');
|
|
2837
|
-
}
|
|
2838
|
-
if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
|
|
2839
|
-
throw new TypeError('"allowMissing" argument must be a boolean');
|
|
2840
|
-
}
|
|
2841
|
-
|
|
2842
|
-
var parts = stringToPath$1(name);
|
|
2843
|
-
|
|
2844
|
-
var value = getBaseIntrinsic$1('%' + (parts.length > 0 ? parts[0] : '') + '%', allowMissing);
|
|
2845
|
-
for (var i = 1; i < parts.length; i += 1) {
|
|
2846
|
-
if (value != null) {
|
|
2847
|
-
if ($gOPD$3 && (i + 1) >= parts.length) {
|
|
2848
|
-
var desc = $gOPD$3(value, parts[i]);
|
|
2849
|
-
if (!allowMissing && !(parts[i] in value)) {
|
|
2850
|
-
throw new $TypeError$6('base intrinsic for ' + name + ' exists, but the property is not available.');
|
|
2851
|
-
}
|
|
2852
|
-
// By convention, when a data property is converted to an accessor
|
|
2853
|
-
// property to emulate a data property that does not suffer from
|
|
2854
|
-
// the override mistake, that accessor's getter is marked with
|
|
2855
|
-
// an `originalValue` property. Here, when we detect this, we
|
|
2856
|
-
// uphold the illusion by pretending to see that original data
|
|
2857
|
-
// property, i.e., returning the value rather than the getter
|
|
2858
|
-
// itself.
|
|
2859
|
-
value = desc && 'get' in desc && !('originalValue' in desc.get) ? desc.get : value[parts[i]];
|
|
2860
|
-
} else {
|
|
2861
|
-
value = value[parts[i]];
|
|
2862
|
-
}
|
|
2863
|
-
}
|
|
2864
|
-
}
|
|
2865
|
-
return value;
|
|
2866
|
-
};
|
|
2867
|
-
|
|
2868
|
-
var callBind$1 = _commonjsHelpers.createCommonjsModule(function (module) {
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
var $apply = GetIntrinsic('%Function.prototype.apply%');
|
|
2875
|
-
var $call = GetIntrinsic('%Function.prototype.call%');
|
|
2876
|
-
var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || functionBind.call($call, $apply);
|
|
2877
|
-
|
|
2878
|
-
var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
|
|
2879
|
-
|
|
2880
|
-
if ($defineProperty) {
|
|
2881
|
-
try {
|
|
2882
|
-
$defineProperty({}, 'a', { value: 1 });
|
|
2883
|
-
} catch (e) {
|
|
2884
|
-
// IE 8 has a broken defineProperty
|
|
2885
|
-
$defineProperty = null;
|
|
2886
|
-
}
|
|
2887
|
-
}
|
|
2888
|
-
|
|
2889
|
-
module.exports = function callBind() {
|
|
2890
|
-
return $reflectApply(functionBind, $call, arguments);
|
|
2891
|
-
};
|
|
2892
|
-
|
|
2893
|
-
var applyBind = function applyBind() {
|
|
2894
|
-
return $reflectApply(functionBind, $apply, arguments);
|
|
2895
|
-
};
|
|
2896
|
-
|
|
2897
|
-
if ($defineProperty) {
|
|
2898
|
-
$defineProperty(module.exports, 'apply', { value: applyBind });
|
|
2899
|
-
} else {
|
|
2900
|
-
module.exports.apply = applyBind;
|
|
2901
|
-
}
|
|
2902
|
-
});
|
|
2903
|
-
callBind$1.apply;
|
|
2904
|
-
|
|
2905
|
-
var $indexOf$1 = callBind$1(GetIntrinsic('String.prototype.indexOf'));
|
|
2906
|
-
|
|
2907
|
-
var callBound$1 = function callBoundIntrinsic(name, allowMissing) {
|
|
2908
|
-
var intrinsic = GetIntrinsic(name, !!allowMissing);
|
|
2909
|
-
if (typeof intrinsic === 'function' && $indexOf$1(name, '.prototype.')) {
|
|
2910
|
-
return callBind$1(intrinsic);
|
|
2911
|
-
}
|
|
2912
|
-
return intrinsic;
|
|
2913
|
-
};
|
|
2627
|
+
var object_getownpropertydescriptors = implementation$2;
|
|
2914
2628
|
|
|
2915
2629
|
var isES5$1 = typeof Object.defineProperty === 'function'
|
|
2916
2630
|
&& typeof Object.defineProperties === 'function';
|
|
@@ -2929,14 +2643,14 @@ if (typeof Promise !== 'function') {
|
|
|
2929
2643
|
|
|
2930
2644
|
|
|
2931
2645
|
|
|
2932
|
-
var $slice = callBound
|
|
2933
|
-
var $concat$
|
|
2934
|
-
var $forEach = callBound
|
|
2646
|
+
var $slice = callBound('Array.prototype.slice');
|
|
2647
|
+
var $concat$1 = callBound('Array.prototype.concat');
|
|
2648
|
+
var $forEach = callBound('Array.prototype.forEach');
|
|
2935
2649
|
|
|
2936
|
-
var hasSymbols$
|
|
2650
|
+
var hasSymbols$3 = hasSymbols$1();
|
|
2937
2651
|
|
|
2938
|
-
var kCustomPromisifiedSymbol = hasSymbols$
|
|
2939
|
-
var kCustomPromisifyArgsSymbol = hasSymbols$
|
|
2652
|
+
var kCustomPromisifiedSymbol = hasSymbols$3 ? Symbol('util.promisify.custom') : null;
|
|
2653
|
+
var kCustomPromisifyArgsSymbol = hasSymbols$3 ? Symbol('customPromisifyArgs') : null;
|
|
2940
2654
|
|
|
2941
2655
|
var implementation$3 = function promisify(orig) {
|
|
2942
2656
|
if (typeof orig !== 'function') {
|
|
@@ -2946,7 +2660,7 @@ var implementation$3 = function promisify(orig) {
|
|
|
2946
2660
|
throw error;
|
|
2947
2661
|
}
|
|
2948
2662
|
|
|
2949
|
-
if (hasSymbols$
|
|
2663
|
+
if (hasSymbols$3 && orig[kCustomPromisifiedSymbol]) {
|
|
2950
2664
|
var customFunction = orig[kCustomPromisifiedSymbol];
|
|
2951
2665
|
if (typeof customFunction !== 'function') {
|
|
2952
2666
|
throw new TypeError('The [util.promisify.custom] property must be a function');
|
|
@@ -2968,7 +2682,7 @@ var implementation$3 = function promisify(orig) {
|
|
|
2968
2682
|
var args = $slice(arguments);
|
|
2969
2683
|
var self = this; // eslint-disable-line no-invalid-this
|
|
2970
2684
|
return new Promise(function (resolve, reject) {
|
|
2971
|
-
orig.apply(self, $concat$
|
|
2685
|
+
orig.apply(self, $concat$1(args, function (err) {
|
|
2972
2686
|
var values = arguments.length > 1 ? $slice(arguments, 1) : [];
|
|
2973
2687
|
if (err) {
|
|
2974
2688
|
reject(err);
|
|
@@ -3053,7 +2767,7 @@ function connect() {
|
|
|
3053
2767
|
};
|
|
3054
2768
|
}
|
|
3055
2769
|
|
|
3056
|
-
var connection =
|
|
2770
|
+
var connection = mysql.createConnection(config);
|
|
3057
2771
|
return {
|
|
3058
2772
|
query: function query(sql, args) {
|
|
3059
2773
|
return util.util.promisify(connection.query).call(connection, sql, args);
|
|
@@ -3247,7 +2961,7 @@ var md5 = _commonjsHelpers.createCommonjsModule(function (module) {
|
|
|
3247
2961
|
message = utf8.stringToBytes(message);
|
|
3248
2962
|
else if (isBuffer(message))
|
|
3249
2963
|
message = Array.prototype.slice.call(message, 0);
|
|
3250
|
-
else if (!Array.isArray(message)
|
|
2964
|
+
else if (!Array.isArray(message))
|
|
3251
2965
|
message = message.toString();
|
|
3252
2966
|
// else, assume byte array already
|
|
3253
2967
|
|
|
@@ -4014,7 +3728,7 @@ var user = /*#__PURE__*/Object.freeze({
|
|
|
4014
3728
|
findUser: findUser$1
|
|
4015
3729
|
});
|
|
4016
3730
|
|
|
4017
|
-
var localStrategy = new
|
|
3731
|
+
var localStrategy = new Local.Strategy({
|
|
4018
3732
|
usernameField: 'email',
|
|
4019
3733
|
passwordField: 'password'
|
|
4020
3734
|
}, function (email, password, done) {
|