@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
|
@@ -630,7 +630,7 @@ if (typeof window !== "undefined") {
|
|
|
630
630
|
|
|
631
631
|
var window_1 = win;
|
|
632
632
|
|
|
633
|
-
/*! @name @brightcove/react-player-loader @version 1.4.
|
|
633
|
+
/*! @name @brightcove/react-player-loader @version 1.4.0 @license Apache-2.0 */
|
|
634
634
|
|
|
635
635
|
function _extends() {
|
|
636
636
|
_extends = Object.assign || function (target) {
|
|
@@ -664,7 +664,7 @@ function _assertThisInitialized(self) {
|
|
|
664
664
|
return self;
|
|
665
665
|
}
|
|
666
666
|
|
|
667
|
-
/*! @name @brightcove/player-loader @version 1.
|
|
667
|
+
/*! @name @brightcove/player-loader @version 1.7.1 @license Apache-2.0 */
|
|
668
668
|
|
|
669
669
|
function _extends$1() {
|
|
670
670
|
_extends$1 = Object.assign || function (target) {
|
|
@@ -684,7 +684,7 @@ function _extends$1() {
|
|
|
684
684
|
return _extends$1.apply(this, arguments);
|
|
685
685
|
}
|
|
686
686
|
|
|
687
|
-
var version = "1.
|
|
687
|
+
var version = "1.7.1";
|
|
688
688
|
|
|
689
689
|
/*! @name @brightcove/player-url @version 1.2.0 @license Apache-2.0 */
|
|
690
690
|
var version$1 = "1.2.0";
|
|
@@ -1001,7 +1001,6 @@ var createInPageEmbed = function createInPageEmbed(params) {
|
|
|
1001
1001
|
deliveryConfigId: 'data-delivery-config-id',
|
|
1002
1002
|
playlistId: 'data-playlist-id',
|
|
1003
1003
|
playlistVideoId: 'data-playlist-video-id',
|
|
1004
|
-
poster: 'poster',
|
|
1005
1004
|
videoId: 'data-video-id'
|
|
1006
1005
|
};
|
|
1007
1006
|
var tagName = embedOptions && embedOptions.tagName || EMBED_TAG_NAME_VIDEOJS;
|
package/dist/cjs/{core.get-iterator-method-6cd7682d.js → core.get-iterator-method-f62321d4.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var _toObject = require('./_to-object-
|
|
4
|
-
var es6_string_iterator = require('./es6.string.iterator-
|
|
3
|
+
var _toObject = require('./_to-object-329a650b.js');
|
|
4
|
+
var es6_string_iterator = require('./es6.string.iterator-cc0bbaa4.js');
|
|
5
5
|
|
|
6
6
|
// getting tag from 19.1.3.6 Object.prototype.toString()
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var _commonjsHelpers = require('./_commonjsHelpers-06173234.js');
|
|
4
|
-
var _toObject = require('./_to-object-
|
|
4
|
+
var _toObject = require('./_to-object-329a650b.js');
|
|
5
5
|
|
|
6
6
|
// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
|
|
7
7
|
_toObject._export(_toObject._export.S + _toObject._export.F * !_toObject._descriptors, 'Object', { defineProperty: _toObject._objectDp.f });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var _commonjsHelpers = require('./_commonjsHelpers-06173234.js');
|
|
4
|
-
var defineProperty$1 = require('./define-property-
|
|
4
|
+
var defineProperty$1 = require('./define-property-f4d12f4e.js');
|
|
5
5
|
|
|
6
6
|
var defineProperty = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var _commonjsHelpers = require('./_commonjsHelpers-06173234.js');
|
|
4
|
-
var _toObject = require('./_to-object-
|
|
4
|
+
var _toObject = require('./_to-object-329a650b.js');
|
|
5
5
|
var _objectPie = require('./_object-pie-68c5bcbc.js');
|
|
6
6
|
|
|
7
7
|
// 19.1.2.1 Object.assign(target, source, ...)
|
package/dist/cjs/faundadb.js
CHANGED
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
require('./_commonjsHelpers-06173234.js');
|
|
6
|
-
require('./_to-object-
|
|
7
|
-
require('./es6.string.iterator-
|
|
6
|
+
require('./_to-object-329a650b.js');
|
|
7
|
+
require('./es6.string.iterator-cc0bbaa4.js');
|
|
8
8
|
require('./_library-dd23b178.js');
|
|
9
|
-
require('./_iter-detect-
|
|
10
|
-
require('./core.get-iterator-method-
|
|
11
|
-
require('./web.dom.iterable-
|
|
12
|
-
var asyncToGenerator = require('./asyncToGenerator-
|
|
13
|
-
var md5 = require('./md5-
|
|
9
|
+
require('./_iter-detect-60b2f026.js');
|
|
10
|
+
require('./core.get-iterator-method-f62321d4.js');
|
|
11
|
+
require('./web.dom.iterable-a0e279c1.js');
|
|
12
|
+
var asyncToGenerator = require('./asyncToGenerator-140e5f89.js');
|
|
13
|
+
var md5 = require('./md5-5039b1a6.js');
|
|
14
14
|
|
|
15
15
|
var encrypt = function () {
|
|
16
16
|
var _ref = asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.mark(function _callee(password) {
|
package/dist/cjs/getQuery.js
CHANGED
|
@@ -10,9 +10,9 @@ var getQuery = function getQuery(type) {
|
|
|
10
10
|
|
|
11
11
|
switch (type) {
|
|
12
12
|
case 'related':
|
|
13
|
-
return '*[\n _type == "article"\n && defined(title)\n && defined(url)\n && !(_id in path("drafts.**"))\n && is_visible == true\n && defined(published) \n && dateTime(published) <= dateTime(now())\n && passwordLock!=true\n && taxonomyMapping[]._ref in $taxonomy\n && taxonomyMapping[].disableAds != \'true\'\n && contentCategory->.name != \'Poll\'\n && contentCategory->.name != \'Slideshows\'\n && contentCategory->.disableAds != \'true\'\n && ExcludeFromInfiniteScroll !=true\n && url.current != $url\n && !defined(body[].videos)\n ' + conditions + '\n ]| order(published desc)[' + (articleCount ? articleCount : '$index') + ']{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n ...,\n passwordLock,\n password,\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography, showSocialShare },\n body[] {\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n }\n },\n \'content_placement\': taxonomyMapping[]-> {\n _id,\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier,\n disableAds,\n showSocialShare\n },\n documentGroup-> {\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n \'path\': identifier.current\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n \'path\': identifier.current\n },\n \'issue\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.issueGroup._ref][0] {\n name,\n \'path\': identifier.current,\n \'publication\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.parent._ref][0] {\n name,\n \'path\': identifier.current\n },\n \'url\' : pdf.asset-> url\n }\n }';
|
|
13
|
+
return '*[\n _type == "article"\n && defined(title)\n && defined(url)\n && !(_id in path("drafts.**"))\n && is_visible == true\n && defined(published) \n && dateTime(published) <= dateTime(now())\n && passwordLock!=true\n && taxonomyMapping[]._ref in $taxonomy\n && taxonomyMapping[].disableAds != \'true\'\n && contentCategory->.name != \'Poll\'\n && contentCategory->.name != \'Slideshows\'\n && contentCategory->.disableAds != \'true\'\n && ExcludeFromInfiniteScroll !=true\n && url.current != $url\n && !defined(body[].videos)\n ' + conditions + '\n ]| order(published desc)[' + (articleCount ? articleCount : '$index') + ']{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n ...,\n passwordLock,\n password,\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography, showSocialShare },\n body[] {\n ...,\n slides[]{\n ...,\n slideshowImage{\n ...,\n "width": asset->.metadata.dimensions.width,\n "height": asset->.metadata.dimensions.height,\n }\n },\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n }\n },\n \'content_placement\': taxonomyMapping[]-> {\n _id,\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier,\n disableAds,\n showSocialShare\n },\n documentGroup-> {\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n \'path\': identifier.current\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n \'path\': identifier.current\n },\n \'issue\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.issueGroup._ref][0] {\n name,\n \'path\': identifier.current,\n \'publication\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.parent._ref][0] {\n name,\n \'path\': identifier.current\n },\n \'url\' : pdf.asset-> url\n }\n }';
|
|
14
14
|
case 'article':
|
|
15
|
-
return '*[\n _type == "article"\n && !(_id in path("drafts.**"))\n && defined(title)\n && defined(url)\n && is_visible != false\n && url.current == $url\n ' + conditions + '\n ][0]{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n ...,\n passwordLock,\n password,\n issueGroup-> { _id, name, identifier, parent-> },\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography, showSocialShare },\n body[] {\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n },\n medias[]{\n ...,\n upload_doc {\n _type,\n asset-> \n } \n },\n articles[]{\n ...,\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography, showSocialShare },\n text[]{\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n },\n }\n }\n },\n \'content_placement\': taxonomyMapping[]-> {\n ...,\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier,\n showSocialShare\n },\n documentGroup-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n isSeries,\n showSocialShare,\n \'path\': identifier.current\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n \'path\': identifier.current\n },\n \'category\':contentCategory->{\n name,\n disableAds\n },\n \'issue\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.issueGroup._ref][0] {\n name,\n volume,\n \'issueNumber\': number,\n \'articleSource\': source,\n \'path\': identifier.current,\n \'publication\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.parent._ref][0] {\n name,\n \'path\': identifier.current\n },\n \'url\' : pdf.asset-> url\n }\n\n }';
|
|
15
|
+
return '*[\n _type == "article"\n && !(_id in path("drafts.**"))\n && defined(title)\n && defined(url)\n && is_visible != false\n && url.current == $url\n ' + conditions + '\n ][0]{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n ...,\n passwordLock,\n password,\n issueGroup-> { _id, name, identifier, parent-> },\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography, showSocialShare },\n body[] {\n ...,\n slides[]{\n ...,\n slideshowImage{\n ...,\n "width": asset->.metadata.dimensions.width,\n "height": asset->.metadata.dimensions.height,\n }\n },\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n },\n medias[]{\n ...,\n upload_doc {\n _type,\n asset-> \n } \n },\n articles[]{\n ...,\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography, showSocialShare },\n text[]{\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n },\n }\n }\n },\n \'content_placement\': taxonomyMapping[]-> {\n ...,\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier,\n showSocialShare\n },\n documentGroup-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n isSeries,\n showSocialShare,\n \'path\': identifier.current\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n \'path\': identifier.current\n },\n \'category\':contentCategory->{\n name,\n disableAds\n },\n \'issue\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.issueGroup._ref][0] {\n name,\n volume,\n \'issueNumber\': number,\n \'articleSource\': source,\n \'path\': identifier.current,\n \'publication\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.parent._ref][0] {\n name,\n \'path\': identifier.current\n },\n \'url\' : pdf.asset-> url\n }\n\n }';
|
|
16
16
|
case 'publication':
|
|
17
17
|
return '*[_type == \'publication\'\n && identifier.current == $publication\n ' + conditions + '][0] {\n ' + params + '\n ...,\n \'issues\': *[_type == \'publication\'\n && is_visible\n && references(^._id)\n && defined(identifier)] {\n ...,\n taxonomyMapping[]->,\n pdf{asset->},\n } | order(year desc, month desc)\n }';
|
|
18
18
|
case 'issue':
|
|
@@ -1,429 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
require('./_to-object-
|
|
5
|
-
require('./es6.string.iterator-
|
|
3
|
+
require('./_commonjsHelpers-06173234.js');
|
|
4
|
+
require('./_to-object-329a650b.js');
|
|
5
|
+
require('./es6.string.iterator-cc0bbaa4.js');
|
|
6
6
|
require('./_library-dd23b178.js');
|
|
7
|
-
require('./_iter-detect-
|
|
8
|
-
require('./core.get-iterator-method-
|
|
9
|
-
require('./web.dom.iterable-
|
|
10
|
-
var asyncToGenerator = require('./asyncToGenerator-
|
|
11
|
-
var
|
|
7
|
+
require('./_iter-detect-60b2f026.js');
|
|
8
|
+
require('./core.get-iterator-method-f62321d4.js');
|
|
9
|
+
require('./web.dom.iterable-a0e279c1.js');
|
|
10
|
+
var asyncToGenerator = require('./asyncToGenerator-140e5f89.js');
|
|
11
|
+
var nookies = require('nookies');
|
|
12
12
|
var getQuery = require('./getQuery.js');
|
|
13
13
|
|
|
14
|
-
var defaultParseOptions = {
|
|
15
|
-
decodeValues: true,
|
|
16
|
-
map: false,
|
|
17
|
-
silent: false,
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
function isNonEmptyString(str) {
|
|
21
|
-
return typeof str === "string" && !!str.trim();
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
function parseString(setCookieValue, options) {
|
|
25
|
-
var parts = setCookieValue.split(";").filter(isNonEmptyString);
|
|
26
|
-
var nameValue = parts.shift().split("=");
|
|
27
|
-
var name = nameValue.shift();
|
|
28
|
-
var value = nameValue.join("="); // everything after the first =, joined by a "=" if there was more than one part
|
|
29
|
-
|
|
30
|
-
options = options
|
|
31
|
-
? Object.assign({}, defaultParseOptions, options)
|
|
32
|
-
: defaultParseOptions;
|
|
33
|
-
|
|
34
|
-
try {
|
|
35
|
-
value = options.decodeValues ? decodeURIComponent(value) : value; // decode cookie value
|
|
36
|
-
} catch (e) {
|
|
37
|
-
console.error(
|
|
38
|
-
"set-cookie-parser encountered an error while decoding a cookie with value '" +
|
|
39
|
-
value +
|
|
40
|
-
"'. Set options.decodeValues to false to disable this feature.",
|
|
41
|
-
e
|
|
42
|
-
);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
var cookie = {
|
|
46
|
-
name: name, // grab everything before the first =
|
|
47
|
-
value: value,
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
parts.forEach(function (part) {
|
|
51
|
-
var sides = part.split("=");
|
|
52
|
-
var key = sides.shift().trimLeft().toLowerCase();
|
|
53
|
-
var value = sides.join("=");
|
|
54
|
-
if (key === "expires") {
|
|
55
|
-
cookie.expires = new Date(value);
|
|
56
|
-
} else if (key === "max-age") {
|
|
57
|
-
cookie.maxAge = parseInt(value, 10);
|
|
58
|
-
} else if (key === "secure") {
|
|
59
|
-
cookie.secure = true;
|
|
60
|
-
} else if (key === "httponly") {
|
|
61
|
-
cookie.httpOnly = true;
|
|
62
|
-
} else if (key === "samesite") {
|
|
63
|
-
cookie.sameSite = value;
|
|
64
|
-
} else {
|
|
65
|
-
cookie[key] = value;
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
return cookie;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
function parse(input, options) {
|
|
73
|
-
options = options
|
|
74
|
-
? Object.assign({}, defaultParseOptions, options)
|
|
75
|
-
: defaultParseOptions;
|
|
76
|
-
|
|
77
|
-
if (!input) {
|
|
78
|
-
if (!options.map) {
|
|
79
|
-
return [];
|
|
80
|
-
} else {
|
|
81
|
-
return {};
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
if (input.headers && input.headers["set-cookie"]) {
|
|
86
|
-
// fast-path for node.js (which automatically normalizes header names to lower-case
|
|
87
|
-
input = input.headers["set-cookie"];
|
|
88
|
-
} else if (input.headers) {
|
|
89
|
-
// slow-path for other environments - see #25
|
|
90
|
-
var sch =
|
|
91
|
-
input.headers[
|
|
92
|
-
Object.keys(input.headers).find(function (key) {
|
|
93
|
-
return key.toLowerCase() === "set-cookie";
|
|
94
|
-
})
|
|
95
|
-
];
|
|
96
|
-
// warn if called on a request-like object with a cookie header rather than a set-cookie header - see #34, 36
|
|
97
|
-
if (!sch && input.headers.cookie && !options.silent) {
|
|
98
|
-
console.warn(
|
|
99
|
-
"Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."
|
|
100
|
-
);
|
|
101
|
-
}
|
|
102
|
-
input = sch;
|
|
103
|
-
}
|
|
104
|
-
if (!Array.isArray(input)) {
|
|
105
|
-
input = [input];
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
options = options
|
|
109
|
-
? Object.assign({}, defaultParseOptions, options)
|
|
110
|
-
: defaultParseOptions;
|
|
111
|
-
|
|
112
|
-
if (!options.map) {
|
|
113
|
-
return input.filter(isNonEmptyString).map(function (str) {
|
|
114
|
-
return parseString(str, options);
|
|
115
|
-
});
|
|
116
|
-
} else {
|
|
117
|
-
var cookies = {};
|
|
118
|
-
return input.filter(isNonEmptyString).reduce(function (cookies, str) {
|
|
119
|
-
var cookie = parseString(str, options);
|
|
120
|
-
cookies[cookie.name] = cookie;
|
|
121
|
-
return cookies;
|
|
122
|
-
}, cookies);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
/*
|
|
127
|
-
Set-Cookie header field-values are sometimes comma joined in one string. This splits them without choking on commas
|
|
128
|
-
that are within a single set-cookie field-value, such as in the Expires portion.
|
|
129
|
-
|
|
130
|
-
This is uncommon, but explicitly allowed - see https://tools.ietf.org/html/rfc2616#section-4.2
|
|
131
|
-
Node.js does this for every header *except* set-cookie - see https://github.com/nodejs/node/blob/d5e363b77ebaf1caf67cd7528224b651c86815c1/lib/_http_incoming.js#L128
|
|
132
|
-
React Native's fetch does this for *every* header, including set-cookie.
|
|
133
|
-
|
|
134
|
-
Based on: https://github.com/google/j2objc/commit/16820fdbc8f76ca0c33472810ce0cb03d20efe25
|
|
135
|
-
Credits to: https://github.com/tomball for original and https://github.com/chrusart for JavaScript implementation
|
|
136
|
-
*/
|
|
137
|
-
function splitCookiesString(cookiesString) {
|
|
138
|
-
if (Array.isArray(cookiesString)) {
|
|
139
|
-
return cookiesString;
|
|
140
|
-
}
|
|
141
|
-
if (typeof cookiesString !== "string") {
|
|
142
|
-
return [];
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
var cookiesStrings = [];
|
|
146
|
-
var pos = 0;
|
|
147
|
-
var start;
|
|
148
|
-
var ch;
|
|
149
|
-
var lastComma;
|
|
150
|
-
var nextStart;
|
|
151
|
-
var cookiesSeparatorFound;
|
|
152
|
-
|
|
153
|
-
function skipWhitespace() {
|
|
154
|
-
while (pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))) {
|
|
155
|
-
pos += 1;
|
|
156
|
-
}
|
|
157
|
-
return pos < cookiesString.length;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
function notSpecialChar() {
|
|
161
|
-
ch = cookiesString.charAt(pos);
|
|
162
|
-
|
|
163
|
-
return ch !== "=" && ch !== ";" && ch !== ",";
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
while (pos < cookiesString.length) {
|
|
167
|
-
start = pos;
|
|
168
|
-
cookiesSeparatorFound = false;
|
|
169
|
-
|
|
170
|
-
while (skipWhitespace()) {
|
|
171
|
-
ch = cookiesString.charAt(pos);
|
|
172
|
-
if (ch === ",") {
|
|
173
|
-
// ',' is a cookie separator if we have later first '=', not ';' or ','
|
|
174
|
-
lastComma = pos;
|
|
175
|
-
pos += 1;
|
|
176
|
-
|
|
177
|
-
skipWhitespace();
|
|
178
|
-
nextStart = pos;
|
|
179
|
-
|
|
180
|
-
while (pos < cookiesString.length && notSpecialChar()) {
|
|
181
|
-
pos += 1;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
// currently special character
|
|
185
|
-
if (pos < cookiesString.length && cookiesString.charAt(pos) === "=") {
|
|
186
|
-
// we found cookies separator
|
|
187
|
-
cookiesSeparatorFound = true;
|
|
188
|
-
// pos is inside the next cookie, so back up and return it.
|
|
189
|
-
pos = nextStart;
|
|
190
|
-
cookiesStrings.push(cookiesString.substring(start, lastComma));
|
|
191
|
-
start = pos;
|
|
192
|
-
} else {
|
|
193
|
-
// in param ',' or param separator ';',
|
|
194
|
-
// we continue from that comma
|
|
195
|
-
pos = lastComma + 1;
|
|
196
|
-
}
|
|
197
|
-
} else {
|
|
198
|
-
pos += 1;
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
if (!cookiesSeparatorFound || pos >= cookiesString.length) {
|
|
203
|
-
cookiesStrings.push(cookiesString.substring(start, cookiesString.length));
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
return cookiesStrings;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
var setCookie = parse;
|
|
211
|
-
var parse_1 = parse;
|
|
212
|
-
var parseString_1 = parseString;
|
|
213
|
-
var splitCookiesString_1 = splitCookiesString;
|
|
214
|
-
setCookie.parse = parse_1;
|
|
215
|
-
setCookie.parseString = parseString_1;
|
|
216
|
-
setCookie.splitCookiesString = splitCookiesString_1;
|
|
217
|
-
|
|
218
|
-
var utils = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
219
|
-
var __assign = (_commonjsHelpers.commonjsGlobal && _commonjsHelpers.commonjsGlobal.__assign) || function () {
|
|
220
|
-
__assign = Object.assign || function(t) {
|
|
221
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
222
|
-
s = arguments[i];
|
|
223
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
224
|
-
t[p] = s[p];
|
|
225
|
-
}
|
|
226
|
-
return t;
|
|
227
|
-
};
|
|
228
|
-
return __assign.apply(this, arguments);
|
|
229
|
-
};
|
|
230
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
231
|
-
exports.areCookiesEqual = exports.hasSameProperties = exports.createCookie = exports.isBrowser = void 0;
|
|
232
|
-
/**
|
|
233
|
-
* Tells whether we are in a browser or server.
|
|
234
|
-
*/
|
|
235
|
-
function isBrowser() {
|
|
236
|
-
return typeof window !== 'undefined';
|
|
237
|
-
}
|
|
238
|
-
exports.isBrowser = isBrowser;
|
|
239
|
-
/**
|
|
240
|
-
* Create an instance of the Cookie interface
|
|
241
|
-
*/
|
|
242
|
-
function createCookie(name, value, options) {
|
|
243
|
-
var sameSite = options.sameSite;
|
|
244
|
-
if (sameSite === true) {
|
|
245
|
-
sameSite = 'strict';
|
|
246
|
-
}
|
|
247
|
-
if (sameSite === undefined || sameSite === false) {
|
|
248
|
-
sameSite = 'lax';
|
|
249
|
-
}
|
|
250
|
-
var cookieToSet = __assign(__assign({}, options), { sameSite: sameSite });
|
|
251
|
-
delete cookieToSet.encode;
|
|
252
|
-
return __assign({ name: name, value: value }, cookieToSet);
|
|
253
|
-
}
|
|
254
|
-
exports.createCookie = createCookie;
|
|
255
|
-
/**
|
|
256
|
-
* Tells whether given objects have the same properties.
|
|
257
|
-
*/
|
|
258
|
-
function hasSameProperties(a, b) {
|
|
259
|
-
var aProps = Object.getOwnPropertyNames(a);
|
|
260
|
-
var bProps = Object.getOwnPropertyNames(b);
|
|
261
|
-
if (aProps.length !== bProps.length) {
|
|
262
|
-
return false;
|
|
263
|
-
}
|
|
264
|
-
for (var i = 0; i < aProps.length; i++) {
|
|
265
|
-
var propName = aProps[i];
|
|
266
|
-
if (a[propName] !== b[propName]) {
|
|
267
|
-
return false;
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
return true;
|
|
271
|
-
}
|
|
272
|
-
exports.hasSameProperties = hasSameProperties;
|
|
273
|
-
/**
|
|
274
|
-
* Compare the cookie and return true if the cookies have equivalent
|
|
275
|
-
* options and the cookies would be overwritten in the browser storage.
|
|
276
|
-
*
|
|
277
|
-
* @param a first Cookie for comparison
|
|
278
|
-
* @param b second Cookie for comparison
|
|
279
|
-
*/
|
|
280
|
-
function areCookiesEqual(a, b) {
|
|
281
|
-
var sameSiteSame = a.sameSite === b.sameSite;
|
|
282
|
-
if (typeof a.sameSite === 'string' && typeof b.sameSite === 'string') {
|
|
283
|
-
sameSiteSame = a.sameSite.toLowerCase() === b.sameSite.toLowerCase();
|
|
284
|
-
}
|
|
285
|
-
return (hasSameProperties(__assign(__assign({}, a), { sameSite: undefined }), __assign(__assign({}, b), { sameSite: undefined })) && sameSiteSame);
|
|
286
|
-
}
|
|
287
|
-
exports.areCookiesEqual = areCookiesEqual;
|
|
288
|
-
/* Functions */
|
|
289
|
-
|
|
290
|
-
});
|
|
291
|
-
|
|
292
|
-
_commonjsHelpers.unwrapExports(utils);
|
|
293
|
-
var utils_1 = utils.areCookiesEqual;
|
|
294
|
-
var utils_2 = utils.hasSameProperties;
|
|
295
|
-
var utils_3 = utils.createCookie;
|
|
296
|
-
var utils_4 = utils.isBrowser;
|
|
297
|
-
|
|
298
|
-
var dist = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
299
|
-
var __assign = (_commonjsHelpers.commonjsGlobal && _commonjsHelpers.commonjsGlobal.__assign) || function () {
|
|
300
|
-
__assign = Object.assign || function(t) {
|
|
301
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
302
|
-
s = arguments[i];
|
|
303
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
304
|
-
t[p] = s[p];
|
|
305
|
-
}
|
|
306
|
-
return t;
|
|
307
|
-
};
|
|
308
|
-
return __assign.apply(this, arguments);
|
|
309
|
-
};
|
|
310
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
311
|
-
exports.destroyCookie = exports.setCookie = exports.parseCookies = void 0;
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
/**
|
|
316
|
-
* Parses cookies.
|
|
317
|
-
*
|
|
318
|
-
* @param ctx NextJS page or API context, express context, null or undefined.
|
|
319
|
-
* @param options Options that we pass down to `cookie` library.
|
|
320
|
-
*/
|
|
321
|
-
function parseCookies(ctx, options) {
|
|
322
|
-
var _a, _b;
|
|
323
|
-
if ((_b = (_a = ctx === null || ctx === void 0 ? void 0 : ctx.req) === null || _a === void 0 ? void 0 : _a.headers) === null || _b === void 0 ? void 0 : _b.cookie) {
|
|
324
|
-
return index$6.cookie.parse(ctx.req.headers.cookie, options);
|
|
325
|
-
}
|
|
326
|
-
if (utils.isBrowser()) {
|
|
327
|
-
return index$6.cookie.parse(document.cookie, options);
|
|
328
|
-
}
|
|
329
|
-
return {};
|
|
330
|
-
}
|
|
331
|
-
exports.parseCookies = parseCookies;
|
|
332
|
-
/**
|
|
333
|
-
* Sets a cookie.
|
|
334
|
-
*
|
|
335
|
-
* @param ctx NextJS page or API context, express context, null or undefined.
|
|
336
|
-
* @param name The name of your cookie.
|
|
337
|
-
* @param value The value of your cookie.
|
|
338
|
-
* @param options Options that we pass down to `cookie` library.
|
|
339
|
-
*/
|
|
340
|
-
function setCookie$1(ctx, name, value, options) {
|
|
341
|
-
var _a, _b;
|
|
342
|
-
if (options === void 0) { options = {}; }
|
|
343
|
-
// SSR
|
|
344
|
-
if (((_a = ctx === null || ctx === void 0 ? void 0 : ctx.res) === null || _a === void 0 ? void 0 : _a.getHeader) && ctx.res.setHeader) {
|
|
345
|
-
// Check if response has finished and warn about it.
|
|
346
|
-
if ((_b = ctx === null || ctx === void 0 ? void 0 : ctx.res) === null || _b === void 0 ? void 0 : _b.finished) {
|
|
347
|
-
console.warn("Not setting \"" + name + "\" cookie. Response has finished.");
|
|
348
|
-
console.warn("You should set cookie before res.send()");
|
|
349
|
-
return {};
|
|
350
|
-
}
|
|
351
|
-
/**
|
|
352
|
-
* Load existing cookies from the header and parse them.
|
|
353
|
-
*/
|
|
354
|
-
var cookies = ctx.res.getHeader('Set-Cookie') || [];
|
|
355
|
-
if (typeof cookies === 'string')
|
|
356
|
-
cookies = [cookies];
|
|
357
|
-
if (typeof cookies === 'number')
|
|
358
|
-
cookies = [];
|
|
359
|
-
/**
|
|
360
|
-
* Parse cookies but ignore values - we've already encoded
|
|
361
|
-
* them in the previous call.
|
|
362
|
-
*/
|
|
363
|
-
var parsedCookies = setCookie.parse(cookies, {
|
|
364
|
-
decodeValues: false,
|
|
365
|
-
});
|
|
366
|
-
/**
|
|
367
|
-
* We create the new cookie and make sure that none of
|
|
368
|
-
* the existing cookies match it.
|
|
369
|
-
*/
|
|
370
|
-
var newCookie_1 = utils.createCookie(name, value, options);
|
|
371
|
-
var cookiesToSet_1 = [];
|
|
372
|
-
parsedCookies.forEach(function (parsedCookie) {
|
|
373
|
-
if (!utils.areCookiesEqual(parsedCookie, newCookie_1)) {
|
|
374
|
-
/**
|
|
375
|
-
* We serialize the cookie back to the original format
|
|
376
|
-
* if it isn't the same as the new one.
|
|
377
|
-
*/
|
|
378
|
-
var serializedCookie = index$6.cookie.serialize(parsedCookie.name, parsedCookie.value, __assign({
|
|
379
|
-
// we prevent reencoding by default, but you might override it
|
|
380
|
-
encode: function (val) { return val; } }, parsedCookie));
|
|
381
|
-
cookiesToSet_1.push(serializedCookie);
|
|
382
|
-
}
|
|
383
|
-
});
|
|
384
|
-
cookiesToSet_1.push(index$6.cookie.serialize(name, value, options));
|
|
385
|
-
// Update the header.
|
|
386
|
-
ctx.res.setHeader('Set-Cookie', cookiesToSet_1);
|
|
387
|
-
}
|
|
388
|
-
// Browser
|
|
389
|
-
if (utils.isBrowser()) {
|
|
390
|
-
if (options && options.httpOnly) {
|
|
391
|
-
throw new Error('Can not set a httpOnly cookie in the browser.');
|
|
392
|
-
}
|
|
393
|
-
document.cookie = index$6.cookie.serialize(name, value, options);
|
|
394
|
-
}
|
|
395
|
-
return {};
|
|
396
|
-
}
|
|
397
|
-
exports.setCookie = setCookie$1;
|
|
398
|
-
/**
|
|
399
|
-
* Destroys a cookie with a particular name.
|
|
400
|
-
*
|
|
401
|
-
* @param ctx NextJS page or API context, express context, null or undefined.
|
|
402
|
-
* @param name Cookie name.
|
|
403
|
-
* @param options Options that we pass down to `cookie` library.
|
|
404
|
-
*/
|
|
405
|
-
function destroyCookie(ctx, name, options) {
|
|
406
|
-
/**
|
|
407
|
-
* We forward the request destroy to setCookie function
|
|
408
|
-
* as it is the same function with modified maxAge value.
|
|
409
|
-
*/
|
|
410
|
-
return setCookie$1(ctx, name, '', __assign(__assign({}, (options || {})), { maxAge: -1 }));
|
|
411
|
-
}
|
|
412
|
-
exports.destroyCookie = destroyCookie;
|
|
413
|
-
/* Utility Exports */
|
|
414
|
-
exports.default = {
|
|
415
|
-
set: setCookie$1,
|
|
416
|
-
get: parseCookies,
|
|
417
|
-
destroy: destroyCookie,
|
|
418
|
-
};
|
|
419
|
-
|
|
420
|
-
});
|
|
421
|
-
|
|
422
|
-
_commonjsHelpers.unwrapExports(dist);
|
|
423
|
-
var dist_1 = dist.destroyCookie;
|
|
424
|
-
var dist_2 = dist.setCookie;
|
|
425
|
-
var dist_3 = dist.parseCookies;
|
|
426
|
-
|
|
427
14
|
var _this = undefined;
|
|
428
15
|
|
|
429
16
|
var getRelatedArticle = function () {
|
|
@@ -500,13 +87,13 @@ var getRelatedArticle = function () {
|
|
|
500
87
|
|
|
501
88
|
|
|
502
89
|
if (ctx && url) {
|
|
503
|
-
cookies =
|
|
90
|
+
cookies = nookies.parseCookies(ctx);
|
|
504
91
|
prevSlugs = cookies['prevSlugs'];
|
|
505
92
|
|
|
506
93
|
if (!!prevSlugs) {
|
|
507
|
-
if (!prevSlugs.includes(url))
|
|
94
|
+
if (!prevSlugs.includes(url)) nookies.setCookie(ctx, 'prevSlugs', prevSlugs + ',"' + url + '"', {});
|
|
508
95
|
filters = filters + ' && !(url.current in [' + prevSlugs + '])';
|
|
509
|
-
} else
|
|
96
|
+
} else nookies.setCookie(ctx, 'prevSlugs', '"' + url + '"', {});
|
|
510
97
|
}
|
|
511
98
|
|
|
512
99
|
query = getQuery('related', filters, '', articleCount).replace('&& taxonomyMapping[]._ref in $taxonomy', '');
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
require('./_commonjsHelpers-06173234.js');
|
|
4
|
-
require('./_to-object-
|
|
5
|
-
require('./es6.string.iterator-
|
|
4
|
+
require('./_to-object-329a650b.js');
|
|
5
|
+
require('./es6.string.iterator-cc0bbaa4.js');
|
|
6
6
|
require('./_library-dd23b178.js');
|
|
7
|
-
require('./_iter-detect-
|
|
8
|
-
require('./core.get-iterator-method-
|
|
9
|
-
require('./web.dom.iterable-
|
|
10
|
-
var asyncToGenerator = require('./asyncToGenerator-
|
|
7
|
+
require('./_iter-detect-60b2f026.js');
|
|
8
|
+
require('./core.get-iterator-method-f62321d4.js');
|
|
9
|
+
require('./web.dom.iterable-a0e279c1.js');
|
|
10
|
+
var asyncToGenerator = require('./asyncToGenerator-140e5f89.js');
|
|
11
11
|
|
|
12
12
|
var _this = undefined;
|
|
13
13
|
|