@mjhls/mjh-framework 1.0.842 → 1.0.844-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +168 -168
- package/dist/cjs/AD.js +1 -1
- package/dist/cjs/AD300x250.js +13 -13
- package/dist/cjs/AD300x250x600.js +13 -13
- package/dist/cjs/AD728x90.js +14 -14
- package/dist/cjs/ADFloatingFooter.js +12 -12
- package/dist/cjs/ADFooter.js +5 -5
- package/dist/cjs/ADGutter.js +12 -12
- package/dist/cjs/{ADInfeed-da3ed24f.js → ADInfeed-9b50464b.js} +1 -1
- package/dist/cjs/ADSkyscraper.js +12 -12
- package/dist/cjs/ADSponsoredResources.js +12 -12
- package/dist/cjs/ADWebcast.js +12 -12
- package/dist/cjs/ADWelcome.js +12 -12
- package/dist/cjs/{ADlgInfeed-d3751164.js → ADlgInfeed-65e48ce7.js} +1 -1
- package/dist/cjs/AccordionPanel.js +6 -6
- package/dist/cjs/AdSlot.js +15 -15
- package/dist/cjs/AdSlotsProvider.js +905 -12
- package/dist/cjs/AlgoliaSearch.js +264 -391
- package/dist/cjs/AlphabeticList.js +8 -8
- package/dist/cjs/ArticleCarousel.js +10 -10
- package/dist/cjs/ArticleProgramLandingPage.js +27 -27
- package/dist/cjs/ArticleSeriesLandingPage.js +24 -24
- package/dist/cjs/ArticleSeriesListing.js +18 -18
- package/dist/cjs/Auth.js +451 -471
- package/dist/cjs/AuthWrapper.js +242 -283
- package/dist/cjs/{AuthorComponent-0c464248.js → AuthorComponent-bb831b74.js} +1 -1
- package/dist/cjs/Beam.js +7 -7
- package/dist/cjs/{BlockContent-bac780ac.js → BlockContent-091a991f.js} +1 -1
- package/dist/cjs/Breadcrumbs.js +5 -5
- package/dist/cjs/CMEDeck.js +14 -14
- package/dist/cjs/Column2.js +8 -8
- package/dist/cjs/Column3.js +16 -16
- package/dist/cjs/ConferenceArticleCard.js +17 -17
- package/dist/cjs/DeckContent.js +31 -31
- package/dist/cjs/DeckQueue.js +19 -19
- package/dist/cjs/{Dfp-ac0c1cc6.js → Dfp-26baccf1.js} +7 -7
- package/dist/cjs/EventsDeck.js +33 -33
- package/dist/cjs/ExternalResources.js +26 -26
- package/dist/cjs/Feature.js +3 -3
- package/dist/cjs/ForbesHero.js +8 -8
- package/dist/cjs/GridContent.js +28 -28
- package/dist/cjs/GridHero.js +8 -8
- package/dist/cjs/GroupDeck.js +8 -8
- package/dist/cjs/HamMagazine.js +25 -25
- package/dist/cjs/Hero.js +1 -1
- package/dist/cjs/HighlightenVideo.js +1 -1
- package/dist/cjs/HorizontalArticleListing.js +25 -25
- package/dist/cjs/HorizontalHero.js +3 -3
- package/dist/cjs/IssueContentDeck.js +8 -8
- package/dist/cjs/IssueDeck.js +10 -10
- package/dist/cjs/IssueLanding.js +59 -59
- package/dist/cjs/KMTracker.js +15 -15
- package/dist/cjs/LeftNav.js +12 -12
- package/dist/cjs/MasterDeck.js +32 -32
- package/dist/cjs/MediaSeriesLanding.js +209 -208
- package/dist/cjs/NavDvm.js +7 -7
- package/dist/cjs/NavMagazine.js +24 -24
- package/dist/cjs/NavNative.js +21 -21
- package/dist/cjs/OncliveHero.js +3 -2
- package/dist/cjs/OncliveLargeHero.js +8 -8
- package/dist/cjs/PageFilter.js +5 -5
- package/dist/cjs/PartnerDetailListing.js +1133 -35
- package/dist/cjs/PdfDownload.js +1 -1
- package/dist/cjs/PopUpModal.js +5 -5
- package/dist/cjs/PubSection.js +20 -20
- package/dist/cjs/PubToc.js +7 -7
- package/dist/cjs/PublicationDeck.js +2 -2
- package/dist/cjs/PublicationLanding.js +36 -36
- package/dist/cjs/QueueDeckExpanded.js +22 -22
- package/dist/cjs/RecentNews.js +1 -1
- package/dist/cjs/RelatedContent.js +30 -30
- package/dist/cjs/RelatedTopicsDropdown.js +10 -10
- package/dist/cjs/Search.js +5 -5
- package/dist/cjs/Segment.js +6 -6
- package/dist/cjs/SeriesListingDeck.js +15 -15
- package/dist/cjs/{SeriesSlider-dad08884.js → SeriesSlider-8bbc989f.js} +11 -11
- package/dist/cjs/SideFooter.js +10 -10
- package/dist/cjs/{SocialSearchComponent-ad15dd61.js → SocialSearchComponent-cea213aa.js} +7 -7
- package/dist/cjs/TaxonomyCard.js +4 -4
- package/dist/cjs/TaxonomyDescription.js +25 -25
- package/dist/cjs/TemplateNormal.js +18 -18
- package/dist/cjs/ThumbnailCard.js +1 -1
- package/dist/cjs/Ustream.js +12 -12
- package/dist/cjs/VerticalHero.js +2 -2
- package/dist/cjs/VideoProgramLandingPage.js +27 -27
- package/dist/cjs/VideoSeriesCard.js +9 -9
- package/dist/cjs/VideoSeriesFilter.js +7 -7
- package/dist/cjs/VideoSeriesLandingPage.js +25 -25
- package/dist/cjs/VideoSeriesListing.js +18 -18
- package/dist/cjs/View.js +63 -63
- package/dist/cjs/YahooHero.js +8 -8
- package/dist/cjs/YoutubeGroup.js +18 -18
- package/dist/cjs/{_is-array-39ff55dd.js → _is-array-754e012d.js} +1 -1
- package/dist/cjs/{_iter-detect-ef35661e.js → _iter-detect-60b2f026.js} +2 -2
- package/dist/cjs/{_object-sap-b231f928.js → _object-sap-5e74ba08.js} +1 -1
- package/dist/cjs/{_object-to-array-c3aeb51d.js → _object-to-array-5762f850.js} +1 -1
- package/dist/cjs/{_to-object-7a3ce269.js → _to-object-329a650b.js} +2 -2
- package/dist/cjs/{asyncToGenerator-8ae2191c.js → asyncToGenerator-140e5f89.js} +5 -5
- package/dist/cjs/{brightcove-react-player-loader.es-05029198.js → brightcove-react-player-loader.es-156bd4d6.js} +3 -4
- package/dist/cjs/{core.get-iterator-method-6cd7682d.js → core.get-iterator-method-f62321d4.js} +2 -2
- package/dist/cjs/{debounce-6191c8ee.js → debounce-529c8d06.js} +1 -1
- package/dist/cjs/{define-property-fc002cec.js → define-property-f4d12f4e.js} +1 -1
- package/dist/cjs/{defineProperty-03c4c82e.js → defineProperty-55548b25.js} +1 -1
- package/dist/cjs/{es6.string.iterator-ab94a594.js → es6.string.iterator-cc0bbaa4.js} +1 -1
- package/dist/cjs/{extends-acc1318d.js → extends-0a918631.js} +1 -1
- package/dist/cjs/faundadb.js +7 -7
- package/dist/cjs/getQuery.js +2 -2
- package/dist/cjs/getRelatedArticle.js +11 -424
- package/dist/cjs/getRootDocGroup.js +6 -6
- package/dist/cjs/getSerializers.js +25 -25
- package/dist/cjs/{getTargeting-98ab97f7.js → getTargeting-021d644c.js} +12 -12
- package/dist/cjs/getTargeting.js +7 -7
- package/dist/cjs/{index-79eed652.js → index-3294d3bc.js} +40 -39
- package/dist/cjs/{index-80802a98.js → index-45f8b70b.js} +540 -531
- package/dist/cjs/{index-ff69979f.js → index-be0c82be.js} +22 -28
- package/dist/cjs/{index-53e27416.js → index-e2e62963.js} +9 -25
- package/dist/cjs/{index.es-e9d84959.js → index.es-9110add6.js} +5 -23
- package/dist/cjs/{index.esm-bf016399.js → index.esm-4d410430.js} +3 -2
- package/dist/cjs/{index.esm-974f47d9.js → index.esm-90433435.js} +15 -6
- package/dist/cjs/{index.esm-44f3e2d0.js → index.esm-e32d3e8e.js} +6 -3
- package/dist/cjs/{index.esm-05850a2f.js → index.esm-ff47db6f.js} +12 -5
- package/dist/cjs/index.js +45 -46
- package/dist/cjs/{inherits-bfdb22af.js → inherits-452ff02c.js} +8 -8
- package/dist/cjs/inherits-8d29278d.js +110 -0
- package/dist/cjs/{keys-62e097ca.js → keys-a586b7a0.js} +2 -2
- package/dist/cjs/{lodash-b5e0d5f6.js → lodash-fc2922d0.js} +30 -127
- package/dist/cjs/main-02daeefe.js +862 -0
- package/dist/cjs/{md5-e1ca5797.js → md5-5039b1a6.js} +1 -1
- package/dist/cjs/{moment-ca3bd9fb.js → moment-575fe24c.js} +8 -10
- package/dist/cjs/{slicedToArray-41819145.js → slicedToArray-8f385299.js} +4 -4
- package/dist/cjs/{stringify-7ccc8524.js → stringify-7c5aff47.js} +1 -1
- package/dist/cjs/timeDifferenceCalc.js +1 -1
- package/dist/cjs/{toConsumableArray-4fdb72e2.js → toConsumableArray-9a3476fe.js} +4 -4
- package/dist/cjs/{toNumber-f2f8744b.js → toNumber-36d1e7e5.js} +4 -39
- package/dist/cjs/{typeof-e83d4a26.js → typeof-725500bc.js} +4 -4
- package/dist/cjs/urlFor.js +1 -1
- package/dist/cjs/{ustream-api-c30d203c.js → ustream-api-d092dc31.js} +4 -4
- package/dist/cjs/{web.dom.iterable-68e3aaf2.js → web.dom.iterable-a0e279c1.js} +2 -2
- package/dist/esm/AD.js +1 -1
- package/dist/esm/AD300x250.js +13 -13
- package/dist/esm/AD300x250x600.js +13 -13
- package/dist/esm/AD728x90.js +14 -14
- package/dist/esm/ADFloatingFooter.js +12 -12
- package/dist/esm/ADFooter.js +5 -5
- package/dist/esm/ADGutter.js +12 -12
- package/dist/esm/{ADInfeed-152d34aa.js → ADInfeed-99535410.js} +1 -1
- package/dist/esm/ADSkyscraper.js +12 -12
- package/dist/esm/ADSponsoredResources.js +12 -12
- package/dist/esm/ADWebcast.js +12 -12
- package/dist/esm/ADWelcome.js +12 -12
- package/dist/esm/{ADlgInfeed-6520a55d.js → ADlgInfeed-0d359144.js} +1 -1
- package/dist/esm/AccordionPanel.js +6 -6
- package/dist/esm/AdSlot.js +15 -15
- package/dist/esm/AdSlotsProvider.js +907 -15
- package/dist/esm/AlgoliaSearch.js +32 -159
- package/dist/esm/AlphabeticList.js +8 -8
- package/dist/esm/ArticleCarousel.js +10 -10
- package/dist/esm/ArticleProgramLandingPage.js +26 -26
- package/dist/esm/ArticleSeriesLandingPage.js +24 -24
- package/dist/esm/ArticleSeriesListing.js +18 -18
- package/dist/esm/Auth.js +445 -465
- package/dist/esm/AuthWrapper.js +242 -283
- package/dist/esm/{AuthorComponent-5cab1f6b.js → AuthorComponent-34b16174.js} +1 -1
- package/dist/esm/Beam.js +7 -7
- package/dist/esm/{BlockContent-ea93e8f7.js → BlockContent-e9b4ddcf.js} +1 -1
- package/dist/esm/Breadcrumbs.js +5 -5
- package/dist/esm/CMEDeck.js +14 -14
- package/dist/esm/Column2.js +8 -8
- package/dist/esm/Column3.js +16 -16
- package/dist/esm/ConferenceArticleCard.js +17 -17
- package/dist/esm/DeckContent.js +31 -31
- package/dist/esm/DeckQueue.js +19 -19
- package/dist/esm/{Dfp-4b94fbd4.js → Dfp-b7236041.js} +7 -7
- package/dist/esm/EventsDeck.js +33 -33
- package/dist/esm/ExternalResources.js +26 -26
- package/dist/esm/Feature.js +3 -3
- package/dist/esm/ForbesHero.js +8 -8
- package/dist/esm/GridContent.js +28 -28
- package/dist/esm/GridHero.js +8 -8
- package/dist/esm/GroupDeck.js +8 -8
- package/dist/esm/HamMagazine.js +25 -25
- package/dist/esm/Hero.js +1 -1
- package/dist/esm/HighlightenVideo.js +1 -1
- package/dist/esm/HorizontalArticleListing.js +25 -25
- package/dist/esm/HorizontalHero.js +3 -3
- package/dist/esm/IssueContentDeck.js +8 -8
- package/dist/esm/IssueDeck.js +10 -10
- package/dist/esm/IssueLanding.js +59 -59
- package/dist/esm/KMTracker.js +15 -15
- package/dist/esm/LeftNav.js +12 -12
- package/dist/esm/MasterDeck.js +32 -32
- package/dist/esm/MediaSeriesLanding.js +365 -364
- package/dist/esm/NavDvm.js +7 -7
- package/dist/esm/NavMagazine.js +24 -24
- package/dist/esm/NavNative.js +21 -21
- package/dist/esm/OncliveHero.js +3 -2
- package/dist/esm/OncliveLargeHero.js +8 -8
- package/dist/esm/PageFilter.js +5 -5
- package/dist/esm/PartnerDetailListing.js +1131 -34
- package/dist/esm/PdfDownload.js +1 -1
- package/dist/esm/PopUpModal.js +5 -5
- package/dist/esm/PubSection.js +20 -20
- package/dist/esm/PubToc.js +7 -7
- package/dist/esm/PublicationDeck.js +2 -2
- package/dist/esm/PublicationLanding.js +36 -36
- package/dist/esm/QueueDeckExpanded.js +22 -22
- package/dist/esm/RecentNews.js +1 -1
- package/dist/esm/RelatedContent.js +30 -30
- package/dist/esm/RelatedTopicsDropdown.js +10 -10
- package/dist/esm/Search.js +5 -5
- package/dist/esm/Segment.js +6 -6
- package/dist/esm/SeriesListingDeck.js +12 -12
- package/dist/esm/{SeriesSlider-5ba2e521.js → SeriesSlider-a866bb21.js} +11 -11
- package/dist/esm/SideFooter.js +10 -10
- package/dist/esm/{SocialSearchComponent-9cc36413.js → SocialSearchComponent-03c3e869.js} +7 -7
- package/dist/esm/TaxonomyCard.js +4 -4
- package/dist/esm/TaxonomyDescription.js +25 -25
- package/dist/esm/TemplateNormal.js +18 -18
- package/dist/esm/ThumbnailCard.js +1 -1
- package/dist/esm/Ustream.js +12 -12
- package/dist/esm/VerticalHero.js +2 -2
- package/dist/esm/VideoProgramLandingPage.js +26 -26
- package/dist/esm/VideoSeriesCard.js +8 -8
- package/dist/esm/VideoSeriesFilter.js +7 -7
- package/dist/esm/VideoSeriesLandingPage.js +24 -24
- package/dist/esm/VideoSeriesListing.js +18 -18
- package/dist/esm/View.js +39 -39
- package/dist/esm/YahooHero.js +8 -8
- package/dist/esm/YoutubeGroup.js +18 -18
- package/dist/esm/{_is-array-328b85b7.js → _is-array-58e95429.js} +1 -1
- package/dist/esm/{_iter-detect-0fa1c752.js → _iter-detect-5d49a330.js} +2 -2
- package/dist/esm/{_object-sap-1b84e2bf.js → _object-sap-964b6feb.js} +1 -1
- package/dist/esm/{_object-to-array-c8f72bf1.js → _object-to-array-7e804fce.js} +1 -1
- package/dist/esm/{_to-object-cedb5b78.js → _to-object-a4107da3.js} +2 -2
- package/dist/esm/{asyncToGenerator-e1a2f43a.js → asyncToGenerator-fc1c2e29.js} +5 -5
- package/dist/esm/{brightcove-react-player-loader.es-e761d404.js → brightcove-react-player-loader.es-83f53e4e.js} +3 -4
- package/dist/esm/{core.get-iterator-method-227107e6.js → core.get-iterator-method-e1de7503.js} +2 -2
- package/dist/esm/{debounce-89969f66.js → debounce-9207d8ee.js} +1 -1
- package/dist/esm/{define-property-2f35af22.js → define-property-8af5f002.js} +1 -1
- package/dist/esm/{defineProperty-eb9699c0.js → defineProperty-94fd8bfc.js} +1 -1
- package/dist/esm/{es6.string.iterator-1577cb76.js → es6.string.iterator-c990c18c.js} +1 -1
- package/dist/esm/{extends-be71a29a.js → extends-6f2fcc99.js} +1 -1
- package/dist/esm/faundadb.js +7 -7
- package/dist/esm/getQuery.js +2 -2
- package/dist/esm/getRelatedArticle.js +11 -424
- package/dist/esm/getRootDocGroup.js +6 -6
- package/dist/esm/getSerializers.js +25 -25
- package/dist/esm/{getTargeting-93bb872d.js → getTargeting-82e86707.js} +11 -11
- package/dist/esm/getTargeting.js +7 -7
- package/dist/esm/{index-f7fdcc91.js → index-73819142.js} +22 -28
- package/dist/esm/{index-637e8f49.js → index-aaa2dae0.js} +10 -25
- package/dist/esm/{index-37848dc4.js → index-ea86ff20.js} +540 -531
- package/dist/esm/{index-511bdaa5.js → index-ef6d5dcf.js} +40 -39
- package/dist/esm/{index.es-a6137319.js → index.es-29c1cef5.js} +5 -23
- package/dist/esm/{index.esm-3fdda599.js → index.esm-29e48d38.js} +15 -6
- package/dist/esm/{index.esm-a8ff922c.js → index.esm-cf08bf18.js} +12 -5
- package/dist/esm/{index.esm-c6715e80.js → index.esm-f8aaeeeb.js} +6 -3
- package/dist/esm/{index.esm-ed50151c.js → index.esm-fd746768.js} +3 -2
- package/dist/esm/index.js +44 -45
- package/dist/esm/inherits-77d5e4fc.js +101 -0
- package/dist/esm/{inherits-2cf82c38.js → inherits-cf8dde54.js} +5 -5
- package/dist/esm/{keys-526daf0a.js → keys-8eda7a5c.js} +2 -2
- package/dist/esm/{lodash-a818d390.js → lodash-17fdfebb.js} +30 -127
- package/dist/esm/main-e4a934b2.js +851 -0
- package/dist/esm/{md5-4e42248e.js → md5-9be0e905.js} +1 -1
- package/dist/esm/{moment-b6f49411.js → moment-e2f9b20c.js} +8 -10
- package/dist/esm/{slicedToArray-f0edf3d6.js → slicedToArray-641f241f.js} +4 -4
- package/dist/esm/{stringify-d1b9276a.js → stringify-4330ccdc.js} +1 -1
- package/dist/esm/timeDifferenceCalc.js +1 -1
- package/dist/esm/{toConsumableArray-81605212.js → toConsumableArray-43aa614d.js} +4 -4
- package/dist/esm/{toNumber-e3dcad26.js → toNumber-2f7a84cd.js} +4 -39
- package/dist/esm/{typeof-ad2c7a21.js → typeof-6435ba1c.js} +4 -4
- package/dist/esm/urlFor.js +1 -1
- package/dist/esm/{ustream-api-cf90f7e6.js → ustream-api-9a50644d.js} +4 -4
- package/dist/esm/{web.dom.iterable-ace8ed30.js → web.dom.iterable-4439f05a.js} +2 -2
- package/package.json +110 -110
- package/dist/cjs/index-bd6c9f56.js +0 -211
- package/dist/cjs/main-bc7d4bf8.js +0 -972
- package/dist/esm/index-db3bb315.js +0 -207
- package/dist/esm/main-ae902629.js +0 -961
|
@@ -172,7 +172,7 @@ var md5 = createCommonjsModule(function (module) {
|
|
|
172
172
|
message = utf8.stringToBytes(message);
|
|
173
173
|
else if (isBuffer(message))
|
|
174
174
|
message = Array.prototype.slice.call(message, 0);
|
|
175
|
-
else if (!Array.isArray(message)
|
|
175
|
+
else if (!Array.isArray(message))
|
|
176
176
|
message = message.toString();
|
|
177
177
|
// else, assume byte array already
|
|
178
178
|
|
|
@@ -2534,7 +2534,8 @@ var moment = createCommonjsModule(function (module, exports) {
|
|
|
2534
2534
|
hooks.createFromInputFallback = deprecate(
|
|
2535
2535
|
'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +
|
|
2536
2536
|
'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +
|
|
2537
|
-
'discouraged. Please refer to
|
|
2537
|
+
'discouraged and will be removed in an upcoming major release. Please refer to ' +
|
|
2538
|
+
'http://momentjs.com/guides/#/warnings/js-date/ for more info.',
|
|
2538
2539
|
function (config) {
|
|
2539
2540
|
config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));
|
|
2540
2541
|
}
|
|
@@ -3719,10 +3720,7 @@ var moment = createCommonjsModule(function (module, exports) {
|
|
|
3719
3720
|
function calendar$1(time, formats) {
|
|
3720
3721
|
// Support for single parameter, formats only overload to the calendar function
|
|
3721
3722
|
if (arguments.length === 1) {
|
|
3722
|
-
if (
|
|
3723
|
-
time = undefined;
|
|
3724
|
-
formats = undefined;
|
|
3725
|
-
} else if (isMomentInput(arguments[0])) {
|
|
3723
|
+
if (isMomentInput(arguments[0])) {
|
|
3726
3724
|
time = arguments[0];
|
|
3727
3725
|
formats = undefined;
|
|
3728
3726
|
} else if (isCalendarSpec(arguments[0])) {
|
|
@@ -4400,7 +4398,7 @@ var moment = createCommonjsModule(function (module, exports) {
|
|
|
4400
4398
|
eras = this.localeData().eras();
|
|
4401
4399
|
for (i = 0, l = eras.length; i < l; ++i) {
|
|
4402
4400
|
// truncate time
|
|
4403
|
-
val = this.
|
|
4401
|
+
val = this.startOf('day').valueOf();
|
|
4404
4402
|
|
|
4405
4403
|
if (eras[i].since <= val && val <= eras[i].until) {
|
|
4406
4404
|
return eras[i].name;
|
|
@@ -4420,7 +4418,7 @@ var moment = createCommonjsModule(function (module, exports) {
|
|
|
4420
4418
|
eras = this.localeData().eras();
|
|
4421
4419
|
for (i = 0, l = eras.length; i < l; ++i) {
|
|
4422
4420
|
// truncate time
|
|
4423
|
-
val = this.
|
|
4421
|
+
val = this.startOf('day').valueOf();
|
|
4424
4422
|
|
|
4425
4423
|
if (eras[i].since <= val && val <= eras[i].until) {
|
|
4426
4424
|
return eras[i].narrow;
|
|
@@ -4440,7 +4438,7 @@ var moment = createCommonjsModule(function (module, exports) {
|
|
|
4440
4438
|
eras = this.localeData().eras();
|
|
4441
4439
|
for (i = 0, l = eras.length; i < l; ++i) {
|
|
4442
4440
|
// truncate time
|
|
4443
|
-
val = this.
|
|
4441
|
+
val = this.startOf('day').valueOf();
|
|
4444
4442
|
|
|
4445
4443
|
if (eras[i].since <= val && val <= eras[i].until) {
|
|
4446
4444
|
return eras[i].abbr;
|
|
@@ -4463,7 +4461,7 @@ var moment = createCommonjsModule(function (module, exports) {
|
|
|
4463
4461
|
dir = eras[i].since <= eras[i].until ? +1 : -1;
|
|
4464
4462
|
|
|
4465
4463
|
// truncate time
|
|
4466
|
-
val = this.
|
|
4464
|
+
val = this.startOf('day').valueOf();
|
|
4467
4465
|
|
|
4468
4466
|
if (
|
|
4469
4467
|
(eras[i].since <= val && val <= eras[i].until) ||
|
|
@@ -5614,7 +5612,7 @@ var moment = createCommonjsModule(function (module, exports) {
|
|
|
5614
5612
|
|
|
5615
5613
|
//! moment.js
|
|
5616
5614
|
|
|
5617
|
-
hooks.version = '2.
|
|
5615
|
+
hooks.version = '2.26.0';
|
|
5618
5616
|
|
|
5619
5617
|
setHookCallback(createLocal);
|
|
5620
5618
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { c as createCommonjsModule, u as unwrapExports } from './_commonjsHelpers-0c4b6f40.js';
|
|
2
|
-
import { a as _core, m as _anObject } from './_to-object-
|
|
3
|
-
import { b as _wks, e as _iterators } from './es6.string.iterator-
|
|
4
|
-
import { _ as _classof, c as core_getIteratorMethod } from './core.get-iterator-method-
|
|
5
|
-
import './web.dom.iterable-
|
|
2
|
+
import { a as _core, m as _anObject } from './_to-object-a4107da3.js';
|
|
3
|
+
import { b as _wks, e as _iterators } from './es6.string.iterator-c990c18c.js';
|
|
4
|
+
import { _ as _classof, c as core_getIteratorMethod } from './core.get-iterator-method-e1de7503.js';
|
|
5
|
+
import './web.dom.iterable-4439f05a.js';
|
|
6
6
|
|
|
7
7
|
var ITERATOR = _wks('iterator');
|
|
8
8
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { u as unwrapExports, c as createCommonjsModule } from './_commonjsHelpers-0c4b6f40.js';
|
|
2
|
-
import { a as _core } from './_to-object-
|
|
2
|
+
import { a as _core } from './_to-object-a4107da3.js';
|
|
3
3
|
|
|
4
4
|
var $JSON = _core.JSON || (_core.JSON = { stringify: JSON.stringify });
|
|
5
5
|
var stringify = function stringify(it) { // eslint-disable-line no-unused-vars
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { c as createCommonjsModule, u as unwrapExports } from './_commonjsHelpers-0c4b6f40.js';
|
|
2
|
-
import { e as _objectDp, o as _propertyDesc, _ as _export, f as _toObject, c as _ctx, h as _toLength, a as _core } from './_to-object-
|
|
3
|
-
import './es6.string.iterator-
|
|
4
|
-
import { _ as _iterDetect, a as _isArrayIter, b as _iterCall } from './_iter-detect-
|
|
5
|
-
import { c as core_getIteratorMethod } from './core.get-iterator-method-
|
|
2
|
+
import { e as _objectDp, o as _propertyDesc, _ as _export, f as _toObject, c as _ctx, h as _toLength, a as _core } from './_to-object-a4107da3.js';
|
|
3
|
+
import './es6.string.iterator-c990c18c.js';
|
|
4
|
+
import { _ as _iterDetect, a as _isArrayIter, b as _iterCall } from './_iter-detect-5d49a330.js';
|
|
5
|
+
import { c as core_getIteratorMethod } from './core.get-iterator-method-e1de7503.js';
|
|
6
6
|
|
|
7
7
|
var _createProperty = function (object, index, value) {
|
|
8
8
|
if (index in object) _objectDp.f(object, index, _propertyDesc(0, value));
|
|
@@ -1,46 +1,11 @@
|
|
|
1
1
|
import { a as isSymbol_1, i as isObject_1 } from './isSymbol-1981418f.js';
|
|
2
2
|
|
|
3
|
-
/** Used to match a single whitespace character. */
|
|
4
|
-
var reWhitespace = /\s/;
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
|
|
8
|
-
* character of `string`.
|
|
9
|
-
*
|
|
10
|
-
* @private
|
|
11
|
-
* @param {string} string The string to inspect.
|
|
12
|
-
* @returns {number} Returns the index of the last non-whitespace character.
|
|
13
|
-
*/
|
|
14
|
-
function trimmedEndIndex(string) {
|
|
15
|
-
var index = string.length;
|
|
16
|
-
|
|
17
|
-
while (index-- && reWhitespace.test(string.charAt(index))) {}
|
|
18
|
-
return index;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
var _trimmedEndIndex = trimmedEndIndex;
|
|
22
|
-
|
|
23
|
-
/** Used to match leading whitespace. */
|
|
24
|
-
var reTrimStart = /^\s+/;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* The base implementation of `_.trim`.
|
|
28
|
-
*
|
|
29
|
-
* @private
|
|
30
|
-
* @param {string} string The string to trim.
|
|
31
|
-
* @returns {string} Returns the trimmed string.
|
|
32
|
-
*/
|
|
33
|
-
function baseTrim(string) {
|
|
34
|
-
return string
|
|
35
|
-
? string.slice(0, _trimmedEndIndex(string) + 1).replace(reTrimStart, '')
|
|
36
|
-
: string;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
var _baseTrim = baseTrim;
|
|
40
|
-
|
|
41
3
|
/** Used as references for various `Number` constants. */
|
|
42
4
|
var NAN = 0 / 0;
|
|
43
5
|
|
|
6
|
+
/** Used to match leading and trailing whitespace. */
|
|
7
|
+
var reTrim = /^\s+|\s+$/g;
|
|
8
|
+
|
|
44
9
|
/** Used to detect bad signed hexadecimal string values. */
|
|
45
10
|
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
|
46
11
|
|
|
@@ -90,7 +55,7 @@ function toNumber(value) {
|
|
|
90
55
|
if (typeof value != 'string') {
|
|
91
56
|
return value === 0 ? value : +value;
|
|
92
57
|
}
|
|
93
|
-
value =
|
|
58
|
+
value = value.replace(reTrim, '');
|
|
94
59
|
var isBinary = reIsBinary.test(value);
|
|
95
60
|
return (isBinary || reIsOctal.test(value))
|
|
96
61
|
? freeParseInt(value.slice(2), isBinary ? 2 : 8)
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { c as createCommonjsModule, u as unwrapExports } from './_commonjsHelpers-0c4b6f40.js';
|
|
2
|
-
import { a as _core, e as _objectDp, n as _objectKeys, p as _objectKeysInternal, q as _enumBugKeys, r as _toIobject, d as _descriptors, s as _toPrimitive, t as _ie8DomDefine, u as _has, o as _propertyDesc, i as _global, v as _shared, j as _fails, w as _uid, _ as _export, k as _hide, m as _anObject, f as _toObject, b as _isObject } from './_to-object-
|
|
3
|
-
import { b as _wks, f as _redefine, c as _setToStringTag, _ as _objectCreate } from './es6.string.iterator-
|
|
2
|
+
import { a as _core, e as _objectDp, n as _objectKeys, p as _objectKeysInternal, q as _enumBugKeys, r as _toIobject, d as _descriptors, s as _toPrimitive, t as _ie8DomDefine, u as _has, o as _propertyDesc, i as _global, v as _shared, j as _fails, w as _uid, _ as _export, k as _hide, m as _anObject, f as _toObject, b as _isObject } from './_to-object-a4107da3.js';
|
|
3
|
+
import { b as _wks, f as _redefine, c as _setToStringTag, _ as _objectCreate } from './es6.string.iterator-c990c18c.js';
|
|
4
4
|
import { _ as _library } from './_library-528f1934.js';
|
|
5
5
|
import { _ as _objectGops, a as _objectPie } from './_object-pie-33c40e79.js';
|
|
6
|
-
import './web.dom.iterable-
|
|
7
|
-
import { _ as _meta, a as _isArray } from './_is-array-
|
|
6
|
+
import './web.dom.iterable-4439f05a.js';
|
|
7
|
+
import { _ as _meta, a as _isArray } from './_is-array-58e95429.js';
|
|
8
8
|
|
|
9
9
|
var f = _wks;
|
|
10
10
|
|
package/dist/esm/urlFor.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
2
|
-
import './_to-object-
|
|
3
|
-
import './_object-sap-
|
|
4
|
-
import { _ as _JSON$stringify } from './stringify-
|
|
5
|
-
import { _ as _Object$keys } from './keys-
|
|
2
|
+
import './_to-object-a4107da3.js';
|
|
3
|
+
import './_object-sap-964b6feb.js';
|
|
4
|
+
import { _ as _JSON$stringify } from './stringify-4330ccdc.js';
|
|
5
|
+
import { _ as _Object$keys } from './keys-8eda7a5c.js';
|
|
6
6
|
|
|
7
7
|
var UstreamEmbed = function () {
|
|
8
8
|
function a(a) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as _toIobject, i as _global, k as _hide } from './_to-object-
|
|
2
|
-
import { a as _iterDefine, e as _iterators, b as _wks } from './es6.string.iterator-
|
|
1
|
+
import { r as _toIobject, i as _global, k as _hide } from './_to-object-a4107da3.js';
|
|
2
|
+
import { a as _iterDefine, e as _iterators, b as _wks } from './es6.string.iterator-c990c18c.js';
|
|
3
3
|
|
|
4
4
|
var _iterStep = function (done, value) {
|
|
5
5
|
return { value: value, done: !!done };
|
package/package.json
CHANGED
|
@@ -1,110 +1,110 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@mjhls/mjh-framework",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Foundation Framework",
|
|
5
|
-
"author": "mjh-framework",
|
|
6
|
-
"license": "MIT",
|
|
7
|
-
"repository": {
|
|
8
|
-
"type": "git",
|
|
9
|
-
"url": "https://github.com/MJHLS/mjh-framework.git"
|
|
10
|
-
},
|
|
11
|
-
"main": "dist/cjs/index.js",
|
|
12
|
-
"module": "dist/esm/index.js",
|
|
13
|
-
"engines": {
|
|
14
|
-
"node": ">=8",
|
|
15
|
-
"npm": ">=5"
|
|
16
|
-
},
|
|
17
|
-
"scripts": {
|
|
18
|
-
"clean": "rimraf dist",
|
|
19
|
-
"test": "cross-env CI=1 react-scripts test --env=jsdom",
|
|
20
|
-
"test:watch": "react-scripts test --env=jsdom",
|
|
21
|
-
"build": "npm run clean && rollup -c",
|
|
22
|
-
"start": "npm run clean && rollup -c -w",
|
|
23
|
-
"prepare": "yarn run build",
|
|
24
|
-
"predeploy": "cd example && yarn install && yarn run build",
|
|
25
|
-
"deploy": "gh-pages -d example/build"
|
|
26
|
-
},
|
|
27
|
-
"peerDependencies": {
|
|
28
|
-
"disqus-react": "^1.0.11",
|
|
29
|
-
"next": "^9.0.0",
|
|
30
|
-
"prop-types": "^15.5.4",
|
|
31
|
-
"react": "^15.0.0 || ^16.0.0",
|
|
32
|
-
"react-bootstrap": "^1.0.0-beta.14",
|
|
33
|
-
"react-dom": "^15.0.0 || ^16.0.0",
|
|
34
|
-
"react-share": "^4.0.1"
|
|
35
|
-
},
|
|
36
|
-
"devDependencies": {
|
|
37
|
-
"@brightcove/react-player-loader": "^1.4.0",
|
|
38
|
-
"@rollup/plugin-json": "^4.0.3",
|
|
39
|
-
"@sanity/block-content-to-react": "^2.0.7",
|
|
40
|
-
"@sanity/image-url": "^0.140.15",
|
|
41
|
-
"@svgr/rollup": "2.4.1",
|
|
42
|
-
"babel-core": "^6.26.3",
|
|
43
|
-
"babel-eslint": "^8.2.5",
|
|
44
|
-
"babel-plugin-external-helpers": "^6.22.0",
|
|
45
|
-
"babel-plugin-transform-runtime": "^6.23.0",
|
|
46
|
-
"babel-preset-env": "^1.7.0",
|
|
47
|
-
"babel-preset-react": "^6.24.1",
|
|
48
|
-
"babel-preset-stage-0": "^6.24.1",
|
|
49
|
-
"cross-env": "^5.1.4",
|
|
50
|
-
"eslint": "^5.0.1",
|
|
51
|
-
"eslint-config-standard": "^11.0.0",
|
|
52
|
-
"eslint-config-standard-react": "^6.0.0",
|
|
53
|
-
"eslint-plugin-import": "^2.13.0",
|
|
54
|
-
"eslint-plugin-node": "^7.0.1",
|
|
55
|
-
"eslint-plugin-promise": "^4.0.0",
|
|
56
|
-
"eslint-plugin-react": "^7.10.0",
|
|
57
|
-
"eslint-plugin-react-hooks": "^2.3.0",
|
|
58
|
-
"eslint-plugin-standard": "^3.1.0",
|
|
59
|
-
"get-youtube-id": "^1.0.1",
|
|
60
|
-
"gh-pages": "^1.2.0",
|
|
61
|
-
"lodash": "^4.17.15",
|
|
62
|
-
"md5": "^2.2.1",
|
|
63
|
-
"moment": "^2.26.0",
|
|
64
|
-
"moment-timezone": "^0.5.31",
|
|
65
|
-
"next": "^9.2.0",
|
|
66
|
-
"react": "^16.12.0",
|
|
67
|
-
"react-bootstrap": "1.4.0",
|
|
68
|
-
"react-device-detect": "^1.11.14",
|
|
69
|
-
"react-dfp": "^0.19.0",
|
|
70
|
-
"react-dom": "^16.12.0",
|
|
71
|
-
"react-icons": "^3.8.0",
|
|
72
|
-
"react-infinite-scroll-component": "^5.0.4",
|
|
73
|
-
"react-lazyload": "^2.6.5",
|
|
74
|
-
"react-player": "^1.15.2",
|
|
75
|
-
"react-scripts": "^1.1.4",
|
|
76
|
-
"react-share": "^4.0.1",
|
|
77
|
-
"react-social-icons": "^4.1.0",
|
|
78
|
-
"react-visibility-sensor": "^5.1.1",
|
|
79
|
-
"react-youtube": "^7.9.0",
|
|
80
|
-
"rimraf": "^3.0.2",
|
|
81
|
-
"rollup": "^2.7.3",
|
|
82
|
-
"rollup-plugin-babel": "3.0.7",
|
|
83
|
-
"rollup-plugin-commonjs": "9.3.4",
|
|
84
|
-
"rollup-plugin-node-builtins": "2.1.2",
|
|
85
|
-
"rollup-plugin-node-resolve": "3.4.0",
|
|
86
|
-
"rollup-plugin-postcss": "1.6.3",
|
|
87
|
-
"rollup-plugin-url": "1.4.0"
|
|
88
|
-
},
|
|
89
|
-
"files": [
|
|
90
|
-
"dist"
|
|
91
|
-
],
|
|
92
|
-
"dependencies": {
|
|
93
|
-
"babel-polyfill": "^6.26.0",
|
|
94
|
-
"cookie": "^0.4.1",
|
|
95
|
-
"disqus-react": "^1.0.11",
|
|
96
|
-
"faunadb": "^4.2.0",
|
|
97
|
-
"js-cookie": "^2.2.1",
|
|
98
|
-
"next-auth": "^3.2.0",
|
|
99
|
-
"next-cookies": "^2.0.3",
|
|
100
|
-
"nookies": "^2.4.0",
|
|
101
|
-
"react-cookies": "^0.1.1",
|
|
102
|
-
"react-instantsearch-dom": "^6.10.3",
|
|
103
|
-
"react-script-tag": "^1.1.2",
|
|
104
|
-
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
105
|
-
"shortid": "^2.2.15",
|
|
106
|
-
"smoothscroll-polyfill": "^0.4.4",
|
|
107
|
-
"striptags": "^3.1.1",
|
|
108
|
-
"superagent": "^5.2.2"
|
|
109
|
-
}
|
|
110
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@mjhls/mjh-framework",
|
|
3
|
+
"version": "1.0.844-beta.0",
|
|
4
|
+
"description": "Foundation Framework",
|
|
5
|
+
"author": "mjh-framework",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/MJHLS/mjh-framework.git"
|
|
10
|
+
},
|
|
11
|
+
"main": "dist/cjs/index.js",
|
|
12
|
+
"module": "dist/esm/index.js",
|
|
13
|
+
"engines": {
|
|
14
|
+
"node": ">=8",
|
|
15
|
+
"npm": ">=5"
|
|
16
|
+
},
|
|
17
|
+
"scripts": {
|
|
18
|
+
"clean": "rimraf dist",
|
|
19
|
+
"test": "cross-env CI=1 react-scripts test --env=jsdom",
|
|
20
|
+
"test:watch": "react-scripts test --env=jsdom",
|
|
21
|
+
"build": "npm run clean && rollup -c",
|
|
22
|
+
"start": "npm run clean && rollup -c -w",
|
|
23
|
+
"prepare": "yarn run build",
|
|
24
|
+
"predeploy": "cd example && yarn install && yarn run build",
|
|
25
|
+
"deploy": "gh-pages -d example/build"
|
|
26
|
+
},
|
|
27
|
+
"peerDependencies": {
|
|
28
|
+
"disqus-react": "^1.0.11",
|
|
29
|
+
"next": "^9.0.0",
|
|
30
|
+
"prop-types": "^15.5.4",
|
|
31
|
+
"react": "^15.0.0 || ^16.0.0",
|
|
32
|
+
"react-bootstrap": "^1.0.0-beta.14",
|
|
33
|
+
"react-dom": "^15.0.0 || ^16.0.0",
|
|
34
|
+
"react-share": "^4.0.1"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@brightcove/react-player-loader": "^1.4.0",
|
|
38
|
+
"@rollup/plugin-json": "^4.0.3",
|
|
39
|
+
"@sanity/block-content-to-react": "^2.0.7",
|
|
40
|
+
"@sanity/image-url": "^0.140.15",
|
|
41
|
+
"@svgr/rollup": "2.4.1",
|
|
42
|
+
"babel-core": "^6.26.3",
|
|
43
|
+
"babel-eslint": "^8.2.5",
|
|
44
|
+
"babel-plugin-external-helpers": "^6.22.0",
|
|
45
|
+
"babel-plugin-transform-runtime": "^6.23.0",
|
|
46
|
+
"babel-preset-env": "^1.7.0",
|
|
47
|
+
"babel-preset-react": "^6.24.1",
|
|
48
|
+
"babel-preset-stage-0": "^6.24.1",
|
|
49
|
+
"cross-env": "^5.1.4",
|
|
50
|
+
"eslint": "^5.0.1",
|
|
51
|
+
"eslint-config-standard": "^11.0.0",
|
|
52
|
+
"eslint-config-standard-react": "^6.0.0",
|
|
53
|
+
"eslint-plugin-import": "^2.13.0",
|
|
54
|
+
"eslint-plugin-node": "^7.0.1",
|
|
55
|
+
"eslint-plugin-promise": "^4.0.0",
|
|
56
|
+
"eslint-plugin-react": "^7.10.0",
|
|
57
|
+
"eslint-plugin-react-hooks": "^2.3.0",
|
|
58
|
+
"eslint-plugin-standard": "^3.1.0",
|
|
59
|
+
"get-youtube-id": "^1.0.1",
|
|
60
|
+
"gh-pages": "^1.2.0",
|
|
61
|
+
"lodash": "^4.17.15",
|
|
62
|
+
"md5": "^2.2.1",
|
|
63
|
+
"moment": "^2.26.0",
|
|
64
|
+
"moment-timezone": "^0.5.31",
|
|
65
|
+
"next": "^9.2.0",
|
|
66
|
+
"react": "^16.12.0",
|
|
67
|
+
"react-bootstrap": "1.4.0",
|
|
68
|
+
"react-device-detect": "^1.11.14",
|
|
69
|
+
"react-dfp": "^0.19.0",
|
|
70
|
+
"react-dom": "^16.12.0",
|
|
71
|
+
"react-icons": "^3.8.0",
|
|
72
|
+
"react-infinite-scroll-component": "^5.0.4",
|
|
73
|
+
"react-lazyload": "^2.6.5",
|
|
74
|
+
"react-player": "^1.15.2",
|
|
75
|
+
"react-scripts": "^1.1.4",
|
|
76
|
+
"react-share": "^4.0.1",
|
|
77
|
+
"react-social-icons": "^4.1.0",
|
|
78
|
+
"react-visibility-sensor": "^5.1.1",
|
|
79
|
+
"react-youtube": "^7.9.0",
|
|
80
|
+
"rimraf": "^3.0.2",
|
|
81
|
+
"rollup": "^2.7.3",
|
|
82
|
+
"rollup-plugin-babel": "3.0.7",
|
|
83
|
+
"rollup-plugin-commonjs": "9.3.4",
|
|
84
|
+
"rollup-plugin-node-builtins": "2.1.2",
|
|
85
|
+
"rollup-plugin-node-resolve": "3.4.0",
|
|
86
|
+
"rollup-plugin-postcss": "1.6.3",
|
|
87
|
+
"rollup-plugin-url": "1.4.0"
|
|
88
|
+
},
|
|
89
|
+
"files": [
|
|
90
|
+
"dist"
|
|
91
|
+
],
|
|
92
|
+
"dependencies": {
|
|
93
|
+
"babel-polyfill": "^6.26.0",
|
|
94
|
+
"cookie": "^0.4.1",
|
|
95
|
+
"disqus-react": "^1.0.11",
|
|
96
|
+
"faunadb": "^4.2.0",
|
|
97
|
+
"js-cookie": "^2.2.1",
|
|
98
|
+
"next-auth": "^3.2.0",
|
|
99
|
+
"next-cookies": "^2.0.3",
|
|
100
|
+
"nookies": "^2.4.0",
|
|
101
|
+
"react-cookies": "^0.1.1",
|
|
102
|
+
"react-instantsearch-dom": "^6.10.3",
|
|
103
|
+
"react-script-tag": "^1.1.2",
|
|
104
|
+
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
105
|
+
"shortid": "^2.2.15",
|
|
106
|
+
"smoothscroll-polyfill": "^0.4.4",
|
|
107
|
+
"striptags": "^3.1.1",
|
|
108
|
+
"superagent": "^5.2.2"
|
|
109
|
+
}
|
|
110
|
+
}
|
|
@@ -1,211 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
/*!
|
|
4
|
-
* cookie
|
|
5
|
-
* Copyright(c) 2012-2014 Roman Shtylman
|
|
6
|
-
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
7
|
-
* MIT Licensed
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Module exports.
|
|
12
|
-
* @public
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
var parse_1 = parse;
|
|
16
|
-
var serialize_1 = serialize;
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Module variables.
|
|
20
|
-
* @private
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
var decode = decodeURIComponent;
|
|
24
|
-
var encode = encodeURIComponent;
|
|
25
|
-
var pairSplitRegExp = /; */;
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* RegExp to match field-content in RFC 7230 sec 3.2
|
|
29
|
-
*
|
|
30
|
-
* field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]
|
|
31
|
-
* field-vchar = VCHAR / obs-text
|
|
32
|
-
* obs-text = %x80-FF
|
|
33
|
-
*/
|
|
34
|
-
|
|
35
|
-
var fieldContentRegExp = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Parse a cookie header.
|
|
39
|
-
*
|
|
40
|
-
* Parse the given cookie header string into an object
|
|
41
|
-
* The object has the various cookies as keys(names) => values
|
|
42
|
-
*
|
|
43
|
-
* @param {string} str
|
|
44
|
-
* @param {object} [options]
|
|
45
|
-
* @return {object}
|
|
46
|
-
* @public
|
|
47
|
-
*/
|
|
48
|
-
|
|
49
|
-
function parse(str, options) {
|
|
50
|
-
if (typeof str !== 'string') {
|
|
51
|
-
throw new TypeError('argument str must be a string');
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
var obj = {};
|
|
55
|
-
var opt = options || {};
|
|
56
|
-
var pairs = str.split(pairSplitRegExp);
|
|
57
|
-
var dec = opt.decode || decode;
|
|
58
|
-
|
|
59
|
-
for (var i = 0; i < pairs.length; i++) {
|
|
60
|
-
var pair = pairs[i];
|
|
61
|
-
var eq_idx = pair.indexOf('=');
|
|
62
|
-
|
|
63
|
-
// skip things that don't look like key=value
|
|
64
|
-
if (eq_idx < 0) {
|
|
65
|
-
continue;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
var key = pair.substr(0, eq_idx).trim();
|
|
69
|
-
var val = pair.substr(++eq_idx, pair.length).trim();
|
|
70
|
-
|
|
71
|
-
// quoted values
|
|
72
|
-
if ('"' == val[0]) {
|
|
73
|
-
val = val.slice(1, -1);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
// only assign once
|
|
77
|
-
if (undefined == obj[key]) {
|
|
78
|
-
obj[key] = tryDecode(val, dec);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
return obj;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* Serialize data into a cookie header.
|
|
87
|
-
*
|
|
88
|
-
* Serialize the a name value pair into a cookie string suitable for
|
|
89
|
-
* http headers. An optional options object specified cookie parameters.
|
|
90
|
-
*
|
|
91
|
-
* serialize('foo', 'bar', { httpOnly: true })
|
|
92
|
-
* => "foo=bar; httpOnly"
|
|
93
|
-
*
|
|
94
|
-
* @param {string} name
|
|
95
|
-
* @param {string} val
|
|
96
|
-
* @param {object} [options]
|
|
97
|
-
* @return {string}
|
|
98
|
-
* @public
|
|
99
|
-
*/
|
|
100
|
-
|
|
101
|
-
function serialize(name, val, options) {
|
|
102
|
-
var opt = options || {};
|
|
103
|
-
var enc = opt.encode || encode;
|
|
104
|
-
|
|
105
|
-
if (typeof enc !== 'function') {
|
|
106
|
-
throw new TypeError('option encode is invalid');
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
if (!fieldContentRegExp.test(name)) {
|
|
110
|
-
throw new TypeError('argument name is invalid');
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
var value = enc(val);
|
|
114
|
-
|
|
115
|
-
if (value && !fieldContentRegExp.test(value)) {
|
|
116
|
-
throw new TypeError('argument val is invalid');
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
var str = name + '=' + value;
|
|
120
|
-
|
|
121
|
-
if (null != opt.maxAge) {
|
|
122
|
-
var maxAge = opt.maxAge - 0;
|
|
123
|
-
|
|
124
|
-
if (isNaN(maxAge) || !isFinite(maxAge)) {
|
|
125
|
-
throw new TypeError('option maxAge is invalid')
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
str += '; Max-Age=' + Math.floor(maxAge);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
if (opt.domain) {
|
|
132
|
-
if (!fieldContentRegExp.test(opt.domain)) {
|
|
133
|
-
throw new TypeError('option domain is invalid');
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
str += '; Domain=' + opt.domain;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
if (opt.path) {
|
|
140
|
-
if (!fieldContentRegExp.test(opt.path)) {
|
|
141
|
-
throw new TypeError('option path is invalid');
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
str += '; Path=' + opt.path;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
if (opt.expires) {
|
|
148
|
-
if (typeof opt.expires.toUTCString !== 'function') {
|
|
149
|
-
throw new TypeError('option expires is invalid');
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
str += '; Expires=' + opt.expires.toUTCString();
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
if (opt.httpOnly) {
|
|
156
|
-
str += '; HttpOnly';
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
if (opt.secure) {
|
|
160
|
-
str += '; Secure';
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
if (opt.sameSite) {
|
|
164
|
-
var sameSite = typeof opt.sameSite === 'string'
|
|
165
|
-
? opt.sameSite.toLowerCase() : opt.sameSite;
|
|
166
|
-
|
|
167
|
-
switch (sameSite) {
|
|
168
|
-
case true:
|
|
169
|
-
str += '; SameSite=Strict';
|
|
170
|
-
break;
|
|
171
|
-
case 'lax':
|
|
172
|
-
str += '; SameSite=Lax';
|
|
173
|
-
break;
|
|
174
|
-
case 'strict':
|
|
175
|
-
str += '; SameSite=Strict';
|
|
176
|
-
break;
|
|
177
|
-
case 'none':
|
|
178
|
-
str += '; SameSite=None';
|
|
179
|
-
break;
|
|
180
|
-
default:
|
|
181
|
-
throw new TypeError('option sameSite is invalid');
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
return str;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
/**
|
|
189
|
-
* Try decoding a string using a decoding function.
|
|
190
|
-
*
|
|
191
|
-
* @param {string} str
|
|
192
|
-
* @param {function} decode
|
|
193
|
-
* @private
|
|
194
|
-
*/
|
|
195
|
-
|
|
196
|
-
function tryDecode(str, decode) {
|
|
197
|
-
try {
|
|
198
|
-
return decode(str);
|
|
199
|
-
} catch (e) {
|
|
200
|
-
return str;
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
var cookie = {
|
|
205
|
-
parse: parse_1,
|
|
206
|
-
serialize: serialize_1
|
|
207
|
-
};
|
|
208
|
-
|
|
209
|
-
exports.cookie = cookie;
|
|
210
|
-
exports.parse_1 = parse_1;
|
|
211
|
-
exports.serialize_1 = serialize_1;
|