@mjhls/mjh-framework 1.0.843 → 1.0.844-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 +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-6810812f.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-12b1f200.js → ADlgInfeed-65e48ce7.js} +1 -1
- package/dist/cjs/AccordionPanel.js +6 -6
- package/dist/cjs/AdSlot.js +14 -14
- package/dist/cjs/AdSlotsProvider.js +10 -10
- package/dist/cjs/AlgoliaSearch.js +48 -76
- package/dist/cjs/AlphabeticList.js +8 -8
- package/dist/cjs/ArticleCarousel.js +10 -10
- package/dist/cjs/ArticleProgramLandingPage.js +27 -28
- package/dist/cjs/ArticleSeriesLandingPage.js +24 -24
- package/dist/cjs/ArticleSeriesListing.js +18 -18
- 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 -27
- 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 -26
- 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 -60
- 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 -209
- 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 +31 -32
- 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 -26
- 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 -28
- 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 +62 -64
- 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 +327 -10
- package/dist/cjs/getQuery.js +2 -2
- package/dist/cjs/getRelatedArticle.js +27 -444
- package/dist/cjs/getRootDocGroup.js +6 -6
- package/dist/cjs/getSerializers.js +25 -26
- 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-52c2d039.js → index-a8b50ae3.js} +1141 -544
- 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 +42 -50
- package/dist/cjs/{inherits-bfdb22af.js → inherits-9953db94.js} +8 -8
- 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/{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-9e41b90e.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-519eade4.js → ADlgInfeed-0d359144.js} +1 -1
- package/dist/esm/AccordionPanel.js +6 -6
- package/dist/esm/AdSlot.js +14 -14
- package/dist/esm/AdSlotsProvider.js +10 -10
- package/dist/esm/AlgoliaSearch.js +47 -75
- package/dist/esm/AlphabeticList.js +8 -8
- package/dist/esm/ArticleCarousel.js +10 -10
- package/dist/esm/ArticleProgramLandingPage.js +26 -27
- package/dist/esm/ArticleSeriesLandingPage.js +24 -24
- package/dist/esm/ArticleSeriesListing.js +18 -18
- 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 -27
- 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 -26
- 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 -60
- 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 -365
- 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 +30 -31
- 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 -26
- 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 -27
- 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 +38 -40
- 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 +325 -8
- package/dist/esm/getQuery.js +2 -2
- package/dist/esm/getRelatedArticle.js +27 -444
- package/dist/esm/getRootDocGroup.js +6 -6
- package/dist/esm/getSerializers.js +25 -26
- package/dist/esm/{getTargeting-93bb872d.js → getTargeting-82e86707.js} +11 -11
- package/dist/esm/getTargeting.js +7 -7
- package/dist/esm/{index-4f60bd57.js → index-1ecf523d.js} +1131 -534
- 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-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 +41 -48
- 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/{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 +114 -110
- package/dist/cjs/Auth.js +0 -3648
- package/dist/cjs/index-bd6c9f56.js +0 -211
- package/dist/cjs/main-bc7d4bf8.js +0 -972
- package/dist/cjs/md5-e1ca5797.js +0 -323
- package/dist/cjs/util-f2c1b65b.js +0 -576
- package/dist/esm/Auth.js +0 -3632
- package/dist/esm/index-db3bb315.js +0 -207
- package/dist/esm/main-ae902629.js +0 -961
- package/dist/esm/md5-4e42248e.js +0 -321
- package/dist/esm/util-7700fc59.js +0 -574
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
4
4
|
|
|
5
5
|
var _commonjsHelpers = require('./_commonjsHelpers-06173234.js');
|
|
6
|
-
var _toObject = require('./_to-object-
|
|
7
|
-
var toConsumableArray = require('./toConsumableArray-
|
|
8
|
-
var _extends = require('./extends-
|
|
9
|
-
var inherits$1 = require('./inherits-
|
|
10
|
-
var _typeof$
|
|
6
|
+
var _toObject = require('./_to-object-329a650b.js');
|
|
7
|
+
var toConsumableArray = require('./toConsumableArray-9a3476fe.js');
|
|
8
|
+
var _extends$1 = require('./extends-0a918631.js');
|
|
9
|
+
var inherits$1$1 = require('./inherits-9953db94.js');
|
|
10
|
+
var _typeof$1 = require('./typeof-725500bc.js');
|
|
11
11
|
var React = require('react');
|
|
12
12
|
var React__default = _interopDefault(React);
|
|
13
13
|
var index = require('./index-98e01cb9.js');
|
|
@@ -15,28 +15,27 @@ var PropTypes = require('prop-types');
|
|
|
15
15
|
var PropTypes__default = _interopDefault(PropTypes);
|
|
16
16
|
var Row = _interopDefault(require('react-bootstrap/Row'));
|
|
17
17
|
var Col = _interopDefault(require('react-bootstrap/Col'));
|
|
18
|
-
var moment = require('./moment-
|
|
18
|
+
var moment = require('./moment-575fe24c.js');
|
|
19
19
|
var Router = require('next/router');
|
|
20
20
|
var Router__default = _interopDefault(Router);
|
|
21
21
|
var urlFor = require('./urlFor.js');
|
|
22
22
|
var index$2 = require('./index-96b3db50.js');
|
|
23
|
-
var main = require('./main-
|
|
23
|
+
var main = require('./main-02daeefe.js');
|
|
24
24
|
var entities = require('./entities-310b46ee.js');
|
|
25
|
-
var slicedToArray = require('./slicedToArray-
|
|
25
|
+
var slicedToArray = require('./slicedToArray-8f385299.js');
|
|
26
26
|
var Segment = require('./Segment.js');
|
|
27
27
|
var Beam = require('./Beam.js');
|
|
28
28
|
var AdSlot = require('./AdSlot.js');
|
|
29
29
|
var Button = _interopDefault(require('react-bootstrap/Button'));
|
|
30
|
-
var BlockContent = require('./BlockContent-
|
|
30
|
+
var BlockContent = require('./BlockContent-091a991f.js');
|
|
31
31
|
var index$3 = require('./index-187c967e.js');
|
|
32
32
|
var GroupDeck = require('./GroupDeck.js');
|
|
33
33
|
var reactBootstrap = require('react-bootstrap');
|
|
34
|
-
var index_esm = require('./index.esm-
|
|
35
|
-
var
|
|
36
|
-
var brightcoveReactPlayerLoader_es = require('./brightcove-react-player-loader.es-05029198.js');
|
|
34
|
+
var index_esm = require('./index.esm-90433435.js');
|
|
35
|
+
var brightcoveReactPlayerLoader_es = require('./brightcove-react-player-loader.es-156bd4d6.js');
|
|
37
36
|
var Head = _interopDefault(require('next/head'));
|
|
38
37
|
var SocialShare = require('./SocialShare.js');
|
|
39
|
-
var _objectToArray = require('./_object-to-array-
|
|
38
|
+
var _objectToArray = require('./_object-to-array-5762f850.js');
|
|
40
39
|
var Pagination = _interopDefault(require('react-bootstrap/Pagination'));
|
|
41
40
|
var Figure$1 = _interopDefault(require('react-bootstrap/Figure'));
|
|
42
41
|
|
|
@@ -104,18 +103,21 @@ var Slideshow = function Slideshow(_ref) {
|
|
|
104
103
|
);
|
|
105
104
|
};
|
|
106
105
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
106
|
+
var isArray = Array.isArray;
|
|
107
|
+
var keyList = Object.keys;
|
|
108
|
+
var hasProp = Object.prototype.hasOwnProperty;
|
|
110
109
|
|
|
111
110
|
var fastDeepEqual = function equal(a, b) {
|
|
112
111
|
if (a === b) return true;
|
|
113
112
|
|
|
114
113
|
if (a && b && typeof a == 'object' && typeof b == 'object') {
|
|
115
|
-
|
|
114
|
+
var arrA = isArray(a)
|
|
115
|
+
, arrB = isArray(b)
|
|
116
|
+
, i
|
|
117
|
+
, length
|
|
118
|
+
, key;
|
|
116
119
|
|
|
117
|
-
|
|
118
|
-
if (Array.isArray(a)) {
|
|
120
|
+
if (arrA && arrB) {
|
|
119
121
|
length = a.length;
|
|
120
122
|
if (length != b.length) return false;
|
|
121
123
|
for (i = length; i-- !== 0;)
|
|
@@ -123,29 +125,35 @@ var fastDeepEqual = function equal(a, b) {
|
|
|
123
125
|
return true;
|
|
124
126
|
}
|
|
125
127
|
|
|
128
|
+
if (arrA != arrB) return false;
|
|
126
129
|
|
|
130
|
+
var dateA = a instanceof Date
|
|
131
|
+
, dateB = b instanceof Date;
|
|
132
|
+
if (dateA != dateB) return false;
|
|
133
|
+
if (dateA && dateB) return a.getTime() == b.getTime();
|
|
127
134
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
if (
|
|
135
|
+
var regexpA = a instanceof RegExp
|
|
136
|
+
, regexpB = b instanceof RegExp;
|
|
137
|
+
if (regexpA != regexpB) return false;
|
|
138
|
+
if (regexpA && regexpB) return a.toString() == b.toString();
|
|
131
139
|
|
|
132
|
-
keys =
|
|
140
|
+
var keys = keyList(a);
|
|
133
141
|
length = keys.length;
|
|
134
|
-
|
|
142
|
+
|
|
143
|
+
if (length !== keyList(b).length)
|
|
144
|
+
return false;
|
|
135
145
|
|
|
136
146
|
for (i = length; i-- !== 0;)
|
|
137
|
-
if (!
|
|
147
|
+
if (!hasProp.call(b, keys[i])) return false;
|
|
138
148
|
|
|
139
149
|
for (i = length; i-- !== 0;) {
|
|
140
|
-
|
|
141
|
-
|
|
150
|
+
key = keys[i];
|
|
142
151
|
if (!equal(a[key], b[key])) return false;
|
|
143
152
|
}
|
|
144
153
|
|
|
145
154
|
return true;
|
|
146
155
|
}
|
|
147
156
|
|
|
148
|
-
// true if both NaN, false otherwise
|
|
149
157
|
return a!==a && b!==b;
|
|
150
158
|
};
|
|
151
159
|
|
|
@@ -908,6 +916,579 @@ var tty = {
|
|
|
908
916
|
WriteStream: WriteStream
|
|
909
917
|
};
|
|
910
918
|
|
|
919
|
+
var inherits;
|
|
920
|
+
if (typeof Object.create === 'function'){
|
|
921
|
+
inherits = function inherits(ctor, superCtor) {
|
|
922
|
+
// implementation from standard node.js 'util' module
|
|
923
|
+
ctor.super_ = superCtor;
|
|
924
|
+
ctor.prototype = Object.create(superCtor.prototype, {
|
|
925
|
+
constructor: {
|
|
926
|
+
value: ctor,
|
|
927
|
+
enumerable: false,
|
|
928
|
+
writable: true,
|
|
929
|
+
configurable: true
|
|
930
|
+
}
|
|
931
|
+
});
|
|
932
|
+
};
|
|
933
|
+
} else {
|
|
934
|
+
inherits = function inherits(ctor, superCtor) {
|
|
935
|
+
ctor.super_ = superCtor;
|
|
936
|
+
var TempCtor = function () {};
|
|
937
|
+
TempCtor.prototype = superCtor.prototype;
|
|
938
|
+
ctor.prototype = new TempCtor();
|
|
939
|
+
ctor.prototype.constructor = ctor;
|
|
940
|
+
};
|
|
941
|
+
}
|
|
942
|
+
var inherits$1 = inherits;
|
|
943
|
+
|
|
944
|
+
// Copyright Joyent, Inc. and other Node contributors.
|
|
945
|
+
var formatRegExp = /%[sdj%]/g;
|
|
946
|
+
function format(f) {
|
|
947
|
+
if (!isString(f)) {
|
|
948
|
+
var objects = [];
|
|
949
|
+
for (var i = 0; i < arguments.length; i++) {
|
|
950
|
+
objects.push(inspect(arguments[i]));
|
|
951
|
+
}
|
|
952
|
+
return objects.join(' ');
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
var i = 1;
|
|
956
|
+
var args = arguments;
|
|
957
|
+
var len = args.length;
|
|
958
|
+
var str = String(f).replace(formatRegExp, function(x) {
|
|
959
|
+
if (x === '%%') return '%';
|
|
960
|
+
if (i >= len) return x;
|
|
961
|
+
switch (x) {
|
|
962
|
+
case '%s': return String(args[i++]);
|
|
963
|
+
case '%d': return Number(args[i++]);
|
|
964
|
+
case '%j':
|
|
965
|
+
try {
|
|
966
|
+
return JSON.stringify(args[i++]);
|
|
967
|
+
} catch (_) {
|
|
968
|
+
return '[Circular]';
|
|
969
|
+
}
|
|
970
|
+
default:
|
|
971
|
+
return x;
|
|
972
|
+
}
|
|
973
|
+
});
|
|
974
|
+
for (var x = args[i]; i < len; x = args[++i]) {
|
|
975
|
+
if (isNull(x) || !isObject(x)) {
|
|
976
|
+
str += ' ' + x;
|
|
977
|
+
} else {
|
|
978
|
+
str += ' ' + inspect(x);
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
return str;
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
// Mark that a method should not be used.
|
|
985
|
+
// Returns a modified function which warns once by default.
|
|
986
|
+
// If --no-deprecation is set, then it is a no-op.
|
|
987
|
+
function deprecate(fn, msg) {
|
|
988
|
+
// Allow for deprecating things in the process of starting up.
|
|
989
|
+
if (isUndefined(global.process)) {
|
|
990
|
+
return function() {
|
|
991
|
+
return deprecate(fn, msg).apply(this, arguments);
|
|
992
|
+
};
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
var warned = false;
|
|
996
|
+
function deprecated() {
|
|
997
|
+
if (!warned) {
|
|
998
|
+
{
|
|
999
|
+
console.error(msg);
|
|
1000
|
+
}
|
|
1001
|
+
warned = true;
|
|
1002
|
+
}
|
|
1003
|
+
return fn.apply(this, arguments);
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
return deprecated;
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
var debugs = {};
|
|
1010
|
+
var debugEnviron;
|
|
1011
|
+
function debuglog(set) {
|
|
1012
|
+
if (isUndefined(debugEnviron))
|
|
1013
|
+
debugEnviron = '';
|
|
1014
|
+
set = set.toUpperCase();
|
|
1015
|
+
if (!debugs[set]) {
|
|
1016
|
+
if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) {
|
|
1017
|
+
var pid = 0;
|
|
1018
|
+
debugs[set] = function() {
|
|
1019
|
+
var msg = format.apply(null, arguments);
|
|
1020
|
+
console.error('%s %d: %s', set, pid, msg);
|
|
1021
|
+
};
|
|
1022
|
+
} else {
|
|
1023
|
+
debugs[set] = function() {};
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1026
|
+
return debugs[set];
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
/**
|
|
1030
|
+
* Echos the value of a value. Trys to print the value out
|
|
1031
|
+
* in the best way possible given the different types.
|
|
1032
|
+
*
|
|
1033
|
+
* @param {Object} obj The object to print out.
|
|
1034
|
+
* @param {Object} opts Optional options object that alters the output.
|
|
1035
|
+
*/
|
|
1036
|
+
/* legacy: obj, showHidden, depth, colors*/
|
|
1037
|
+
function inspect(obj, opts) {
|
|
1038
|
+
// default options
|
|
1039
|
+
var ctx = {
|
|
1040
|
+
seen: [],
|
|
1041
|
+
stylize: stylizeNoColor
|
|
1042
|
+
};
|
|
1043
|
+
// legacy...
|
|
1044
|
+
if (arguments.length >= 3) ctx.depth = arguments[2];
|
|
1045
|
+
if (arguments.length >= 4) ctx.colors = arguments[3];
|
|
1046
|
+
if (isBoolean(opts)) {
|
|
1047
|
+
// legacy...
|
|
1048
|
+
ctx.showHidden = opts;
|
|
1049
|
+
} else if (opts) {
|
|
1050
|
+
// got an "options" object
|
|
1051
|
+
_extend(ctx, opts);
|
|
1052
|
+
}
|
|
1053
|
+
// set default options
|
|
1054
|
+
if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
|
|
1055
|
+
if (isUndefined(ctx.depth)) ctx.depth = 2;
|
|
1056
|
+
if (isUndefined(ctx.colors)) ctx.colors = false;
|
|
1057
|
+
if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
|
|
1058
|
+
if (ctx.colors) ctx.stylize = stylizeWithColor;
|
|
1059
|
+
return formatValue(ctx, obj, ctx.depth);
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics
|
|
1063
|
+
inspect.colors = {
|
|
1064
|
+
'bold' : [1, 22],
|
|
1065
|
+
'italic' : [3, 23],
|
|
1066
|
+
'underline' : [4, 24],
|
|
1067
|
+
'inverse' : [7, 27],
|
|
1068
|
+
'white' : [37, 39],
|
|
1069
|
+
'grey' : [90, 39],
|
|
1070
|
+
'black' : [30, 39],
|
|
1071
|
+
'blue' : [34, 39],
|
|
1072
|
+
'cyan' : [36, 39],
|
|
1073
|
+
'green' : [32, 39],
|
|
1074
|
+
'magenta' : [35, 39],
|
|
1075
|
+
'red' : [31, 39],
|
|
1076
|
+
'yellow' : [33, 39]
|
|
1077
|
+
};
|
|
1078
|
+
|
|
1079
|
+
// Don't use 'blue' not visible on cmd.exe
|
|
1080
|
+
inspect.styles = {
|
|
1081
|
+
'special': 'cyan',
|
|
1082
|
+
'number': 'yellow',
|
|
1083
|
+
'boolean': 'yellow',
|
|
1084
|
+
'undefined': 'grey',
|
|
1085
|
+
'null': 'bold',
|
|
1086
|
+
'string': 'green',
|
|
1087
|
+
'date': 'magenta',
|
|
1088
|
+
// "name": intentionally not styling
|
|
1089
|
+
'regexp': 'red'
|
|
1090
|
+
};
|
|
1091
|
+
|
|
1092
|
+
|
|
1093
|
+
function stylizeWithColor(str, styleType) {
|
|
1094
|
+
var style = inspect.styles[styleType];
|
|
1095
|
+
|
|
1096
|
+
if (style) {
|
|
1097
|
+
return '\u001b[' + inspect.colors[style][0] + 'm' + str +
|
|
1098
|
+
'\u001b[' + inspect.colors[style][1] + 'm';
|
|
1099
|
+
} else {
|
|
1100
|
+
return str;
|
|
1101
|
+
}
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
|
|
1105
|
+
function stylizeNoColor(str, styleType) {
|
|
1106
|
+
return str;
|
|
1107
|
+
}
|
|
1108
|
+
|
|
1109
|
+
|
|
1110
|
+
function arrayToHash(array) {
|
|
1111
|
+
var hash = {};
|
|
1112
|
+
|
|
1113
|
+
array.forEach(function(val, idx) {
|
|
1114
|
+
hash[val] = true;
|
|
1115
|
+
});
|
|
1116
|
+
|
|
1117
|
+
return hash;
|
|
1118
|
+
}
|
|
1119
|
+
|
|
1120
|
+
|
|
1121
|
+
function formatValue(ctx, value, recurseTimes) {
|
|
1122
|
+
// Provide a hook for user-specified inspect functions.
|
|
1123
|
+
// Check that value is an object with an inspect function on it
|
|
1124
|
+
if (ctx.customInspect &&
|
|
1125
|
+
value &&
|
|
1126
|
+
isFunction(value.inspect) &&
|
|
1127
|
+
// Filter out the util module, it's inspect function is special
|
|
1128
|
+
value.inspect !== inspect &&
|
|
1129
|
+
// Also filter out any prototype objects using the circular check.
|
|
1130
|
+
!(value.constructor && value.constructor.prototype === value)) {
|
|
1131
|
+
var ret = value.inspect(recurseTimes, ctx);
|
|
1132
|
+
if (!isString(ret)) {
|
|
1133
|
+
ret = formatValue(ctx, ret, recurseTimes);
|
|
1134
|
+
}
|
|
1135
|
+
return ret;
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1138
|
+
// Primitive types cannot have properties
|
|
1139
|
+
var primitive = formatPrimitive(ctx, value);
|
|
1140
|
+
if (primitive) {
|
|
1141
|
+
return primitive;
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1144
|
+
// Look up the keys of the object.
|
|
1145
|
+
var keys = Object.keys(value);
|
|
1146
|
+
var visibleKeys = arrayToHash(keys);
|
|
1147
|
+
|
|
1148
|
+
if (ctx.showHidden) {
|
|
1149
|
+
keys = Object.getOwnPropertyNames(value);
|
|
1150
|
+
}
|
|
1151
|
+
|
|
1152
|
+
// IE doesn't make error fields non-enumerable
|
|
1153
|
+
// http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx
|
|
1154
|
+
if (isError(value)
|
|
1155
|
+
&& (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {
|
|
1156
|
+
return formatError(value);
|
|
1157
|
+
}
|
|
1158
|
+
|
|
1159
|
+
// Some type of object without properties can be shortcutted.
|
|
1160
|
+
if (keys.length === 0) {
|
|
1161
|
+
if (isFunction(value)) {
|
|
1162
|
+
var name = value.name ? ': ' + value.name : '';
|
|
1163
|
+
return ctx.stylize('[Function' + name + ']', 'special');
|
|
1164
|
+
}
|
|
1165
|
+
if (isRegExp(value)) {
|
|
1166
|
+
return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
|
|
1167
|
+
}
|
|
1168
|
+
if (isDate(value)) {
|
|
1169
|
+
return ctx.stylize(Date.prototype.toString.call(value), 'date');
|
|
1170
|
+
}
|
|
1171
|
+
if (isError(value)) {
|
|
1172
|
+
return formatError(value);
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
var base = '', array = false, braces = ['{', '}'];
|
|
1177
|
+
|
|
1178
|
+
// Make Array say that they are Array
|
|
1179
|
+
if (isArray$1(value)) {
|
|
1180
|
+
array = true;
|
|
1181
|
+
braces = ['[', ']'];
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
// Make functions say that they are functions
|
|
1185
|
+
if (isFunction(value)) {
|
|
1186
|
+
var n = value.name ? ': ' + value.name : '';
|
|
1187
|
+
base = ' [Function' + n + ']';
|
|
1188
|
+
}
|
|
1189
|
+
|
|
1190
|
+
// Make RegExps say that they are RegExps
|
|
1191
|
+
if (isRegExp(value)) {
|
|
1192
|
+
base = ' ' + RegExp.prototype.toString.call(value);
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
// Make dates with properties first say the date
|
|
1196
|
+
if (isDate(value)) {
|
|
1197
|
+
base = ' ' + Date.prototype.toUTCString.call(value);
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1200
|
+
// Make error with message first say the error
|
|
1201
|
+
if (isError(value)) {
|
|
1202
|
+
base = ' ' + formatError(value);
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
if (keys.length === 0 && (!array || value.length == 0)) {
|
|
1206
|
+
return braces[0] + base + braces[1];
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1209
|
+
if (recurseTimes < 0) {
|
|
1210
|
+
if (isRegExp(value)) {
|
|
1211
|
+
return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
|
|
1212
|
+
} else {
|
|
1213
|
+
return ctx.stylize('[Object]', 'special');
|
|
1214
|
+
}
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
ctx.seen.push(value);
|
|
1218
|
+
|
|
1219
|
+
var output;
|
|
1220
|
+
if (array) {
|
|
1221
|
+
output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
|
|
1222
|
+
} else {
|
|
1223
|
+
output = keys.map(function(key) {
|
|
1224
|
+
return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
|
|
1225
|
+
});
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
ctx.seen.pop();
|
|
1229
|
+
|
|
1230
|
+
return reduceToSingleString(output, base, braces);
|
|
1231
|
+
}
|
|
1232
|
+
|
|
1233
|
+
|
|
1234
|
+
function formatPrimitive(ctx, value) {
|
|
1235
|
+
if (isUndefined(value))
|
|
1236
|
+
return ctx.stylize('undefined', 'undefined');
|
|
1237
|
+
if (isString(value)) {
|
|
1238
|
+
var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
|
|
1239
|
+
.replace(/'/g, "\\'")
|
|
1240
|
+
.replace(/\\"/g, '"') + '\'';
|
|
1241
|
+
return ctx.stylize(simple, 'string');
|
|
1242
|
+
}
|
|
1243
|
+
if (isNumber(value))
|
|
1244
|
+
return ctx.stylize('' + value, 'number');
|
|
1245
|
+
if (isBoolean(value))
|
|
1246
|
+
return ctx.stylize('' + value, 'boolean');
|
|
1247
|
+
// For some reason typeof null is "object", so special case here.
|
|
1248
|
+
if (isNull(value))
|
|
1249
|
+
return ctx.stylize('null', 'null');
|
|
1250
|
+
}
|
|
1251
|
+
|
|
1252
|
+
|
|
1253
|
+
function formatError(value) {
|
|
1254
|
+
return '[' + Error.prototype.toString.call(value) + ']';
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
|
|
1258
|
+
function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
|
|
1259
|
+
var output = [];
|
|
1260
|
+
for (var i = 0, l = value.length; i < l; ++i) {
|
|
1261
|
+
if (hasOwnProperty(value, String(i))) {
|
|
1262
|
+
output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
|
|
1263
|
+
String(i), true));
|
|
1264
|
+
} else {
|
|
1265
|
+
output.push('');
|
|
1266
|
+
}
|
|
1267
|
+
}
|
|
1268
|
+
keys.forEach(function(key) {
|
|
1269
|
+
if (!key.match(/^\d+$/)) {
|
|
1270
|
+
output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
|
|
1271
|
+
key, true));
|
|
1272
|
+
}
|
|
1273
|
+
});
|
|
1274
|
+
return output;
|
|
1275
|
+
}
|
|
1276
|
+
|
|
1277
|
+
|
|
1278
|
+
function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
|
|
1279
|
+
var name, str, desc;
|
|
1280
|
+
desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
|
|
1281
|
+
if (desc.get) {
|
|
1282
|
+
if (desc.set) {
|
|
1283
|
+
str = ctx.stylize('[Getter/Setter]', 'special');
|
|
1284
|
+
} else {
|
|
1285
|
+
str = ctx.stylize('[Getter]', 'special');
|
|
1286
|
+
}
|
|
1287
|
+
} else {
|
|
1288
|
+
if (desc.set) {
|
|
1289
|
+
str = ctx.stylize('[Setter]', 'special');
|
|
1290
|
+
}
|
|
1291
|
+
}
|
|
1292
|
+
if (!hasOwnProperty(visibleKeys, key)) {
|
|
1293
|
+
name = '[' + key + ']';
|
|
1294
|
+
}
|
|
1295
|
+
if (!str) {
|
|
1296
|
+
if (ctx.seen.indexOf(desc.value) < 0) {
|
|
1297
|
+
if (isNull(recurseTimes)) {
|
|
1298
|
+
str = formatValue(ctx, desc.value, null);
|
|
1299
|
+
} else {
|
|
1300
|
+
str = formatValue(ctx, desc.value, recurseTimes - 1);
|
|
1301
|
+
}
|
|
1302
|
+
if (str.indexOf('\n') > -1) {
|
|
1303
|
+
if (array) {
|
|
1304
|
+
str = str.split('\n').map(function(line) {
|
|
1305
|
+
return ' ' + line;
|
|
1306
|
+
}).join('\n').substr(2);
|
|
1307
|
+
} else {
|
|
1308
|
+
str = '\n' + str.split('\n').map(function(line) {
|
|
1309
|
+
return ' ' + line;
|
|
1310
|
+
}).join('\n');
|
|
1311
|
+
}
|
|
1312
|
+
}
|
|
1313
|
+
} else {
|
|
1314
|
+
str = ctx.stylize('[Circular]', 'special');
|
|
1315
|
+
}
|
|
1316
|
+
}
|
|
1317
|
+
if (isUndefined(name)) {
|
|
1318
|
+
if (array && key.match(/^\d+$/)) {
|
|
1319
|
+
return str;
|
|
1320
|
+
}
|
|
1321
|
+
name = JSON.stringify('' + key);
|
|
1322
|
+
if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
|
|
1323
|
+
name = name.substr(1, name.length - 2);
|
|
1324
|
+
name = ctx.stylize(name, 'name');
|
|
1325
|
+
} else {
|
|
1326
|
+
name = name.replace(/'/g, "\\'")
|
|
1327
|
+
.replace(/\\"/g, '"')
|
|
1328
|
+
.replace(/(^"|"$)/g, "'");
|
|
1329
|
+
name = ctx.stylize(name, 'string');
|
|
1330
|
+
}
|
|
1331
|
+
}
|
|
1332
|
+
|
|
1333
|
+
return name + ': ' + str;
|
|
1334
|
+
}
|
|
1335
|
+
|
|
1336
|
+
|
|
1337
|
+
function reduceToSingleString(output, base, braces) {
|
|
1338
|
+
var length = output.reduce(function(prev, cur) {
|
|
1339
|
+
if (cur.indexOf('\n') >= 0) ;
|
|
1340
|
+
return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
|
|
1341
|
+
}, 0);
|
|
1342
|
+
|
|
1343
|
+
if (length > 60) {
|
|
1344
|
+
return braces[0] +
|
|
1345
|
+
(base === '' ? '' : base + '\n ') +
|
|
1346
|
+
' ' +
|
|
1347
|
+
output.join(',\n ') +
|
|
1348
|
+
' ' +
|
|
1349
|
+
braces[1];
|
|
1350
|
+
}
|
|
1351
|
+
|
|
1352
|
+
return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
|
|
1353
|
+
}
|
|
1354
|
+
|
|
1355
|
+
|
|
1356
|
+
// NOTE: These type checking functions intentionally don't use `instanceof`
|
|
1357
|
+
// because it is fragile and can be easily faked with `Object.create()`.
|
|
1358
|
+
function isArray$1(ar) {
|
|
1359
|
+
return Array.isArray(ar);
|
|
1360
|
+
}
|
|
1361
|
+
|
|
1362
|
+
function isBoolean(arg) {
|
|
1363
|
+
return typeof arg === 'boolean';
|
|
1364
|
+
}
|
|
1365
|
+
|
|
1366
|
+
function isNull(arg) {
|
|
1367
|
+
return arg === null;
|
|
1368
|
+
}
|
|
1369
|
+
|
|
1370
|
+
function isNullOrUndefined(arg) {
|
|
1371
|
+
return arg == null;
|
|
1372
|
+
}
|
|
1373
|
+
|
|
1374
|
+
function isNumber(arg) {
|
|
1375
|
+
return typeof arg === 'number';
|
|
1376
|
+
}
|
|
1377
|
+
|
|
1378
|
+
function isString(arg) {
|
|
1379
|
+
return typeof arg === 'string';
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
function isSymbol(arg) {
|
|
1383
|
+
return typeof arg === 'symbol';
|
|
1384
|
+
}
|
|
1385
|
+
|
|
1386
|
+
function isUndefined(arg) {
|
|
1387
|
+
return arg === void 0;
|
|
1388
|
+
}
|
|
1389
|
+
|
|
1390
|
+
function isRegExp(re) {
|
|
1391
|
+
return isObject(re) && objectToString(re) === '[object RegExp]';
|
|
1392
|
+
}
|
|
1393
|
+
|
|
1394
|
+
function isObject(arg) {
|
|
1395
|
+
return typeof arg === 'object' && arg !== null;
|
|
1396
|
+
}
|
|
1397
|
+
|
|
1398
|
+
function isDate(d) {
|
|
1399
|
+
return isObject(d) && objectToString(d) === '[object Date]';
|
|
1400
|
+
}
|
|
1401
|
+
|
|
1402
|
+
function isError(e) {
|
|
1403
|
+
return isObject(e) &&
|
|
1404
|
+
(objectToString(e) === '[object Error]' || e instanceof Error);
|
|
1405
|
+
}
|
|
1406
|
+
|
|
1407
|
+
function isFunction(arg) {
|
|
1408
|
+
return typeof arg === 'function';
|
|
1409
|
+
}
|
|
1410
|
+
|
|
1411
|
+
function isPrimitive(arg) {
|
|
1412
|
+
return arg === null ||
|
|
1413
|
+
typeof arg === 'boolean' ||
|
|
1414
|
+
typeof arg === 'number' ||
|
|
1415
|
+
typeof arg === 'string' ||
|
|
1416
|
+
typeof arg === 'symbol' || // ES6 symbol
|
|
1417
|
+
typeof arg === 'undefined';
|
|
1418
|
+
}
|
|
1419
|
+
|
|
1420
|
+
function isBuffer(maybeBuf) {
|
|
1421
|
+
return Buffer.isBuffer(maybeBuf);
|
|
1422
|
+
}
|
|
1423
|
+
|
|
1424
|
+
function objectToString(o) {
|
|
1425
|
+
return Object.prototype.toString.call(o);
|
|
1426
|
+
}
|
|
1427
|
+
|
|
1428
|
+
|
|
1429
|
+
function pad(n) {
|
|
1430
|
+
return n < 10 ? '0' + n.toString(10) : n.toString(10);
|
|
1431
|
+
}
|
|
1432
|
+
|
|
1433
|
+
|
|
1434
|
+
var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',
|
|
1435
|
+
'Oct', 'Nov', 'Dec'];
|
|
1436
|
+
|
|
1437
|
+
// 26 Feb 16:19:34
|
|
1438
|
+
function timestamp() {
|
|
1439
|
+
var d = new Date();
|
|
1440
|
+
var time = [pad(d.getHours()),
|
|
1441
|
+
pad(d.getMinutes()),
|
|
1442
|
+
pad(d.getSeconds())].join(':');
|
|
1443
|
+
return [d.getDate(), months[d.getMonth()], time].join(' ');
|
|
1444
|
+
}
|
|
1445
|
+
|
|
1446
|
+
|
|
1447
|
+
// log is just a thin wrapper to console.log that prepends a timestamp
|
|
1448
|
+
function log() {
|
|
1449
|
+
console.log('%s - %s', timestamp(), format.apply(null, arguments));
|
|
1450
|
+
}
|
|
1451
|
+
|
|
1452
|
+
function _extend(origin, add) {
|
|
1453
|
+
// Don't do anything if add isn't an object
|
|
1454
|
+
if (!add || !isObject(add)) return origin;
|
|
1455
|
+
|
|
1456
|
+
var keys = Object.keys(add);
|
|
1457
|
+
var i = keys.length;
|
|
1458
|
+
while (i--) {
|
|
1459
|
+
origin[keys[i]] = add[keys[i]];
|
|
1460
|
+
}
|
|
1461
|
+
return origin;
|
|
1462
|
+
}
|
|
1463
|
+
function hasOwnProperty(obj, prop) {
|
|
1464
|
+
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
1465
|
+
}
|
|
1466
|
+
|
|
1467
|
+
var util = {
|
|
1468
|
+
inherits: inherits$1,
|
|
1469
|
+
_extend: _extend,
|
|
1470
|
+
log: log,
|
|
1471
|
+
isBuffer: isBuffer,
|
|
1472
|
+
isPrimitive: isPrimitive,
|
|
1473
|
+
isFunction: isFunction,
|
|
1474
|
+
isError: isError,
|
|
1475
|
+
isDate: isDate,
|
|
1476
|
+
isObject: isObject,
|
|
1477
|
+
isRegExp: isRegExp,
|
|
1478
|
+
isUndefined: isUndefined,
|
|
1479
|
+
isSymbol: isSymbol,
|
|
1480
|
+
isString: isString,
|
|
1481
|
+
isNumber: isNumber,
|
|
1482
|
+
isNullOrUndefined: isNullOrUndefined,
|
|
1483
|
+
isNull: isNull,
|
|
1484
|
+
isBoolean: isBoolean,
|
|
1485
|
+
isArray: isArray$1,
|
|
1486
|
+
inspect: inspect,
|
|
1487
|
+
deprecate: deprecate,
|
|
1488
|
+
format: format,
|
|
1489
|
+
debuglog: debuglog
|
|
1490
|
+
};
|
|
1491
|
+
|
|
911
1492
|
var require$$2 = {};
|
|
912
1493
|
|
|
913
1494
|
var node = _commonjsHelpers.createCommonjsModule(function (module, exports) {
|
|
@@ -974,7 +1555,7 @@ exports.inspectOpts = Object.keys(process.env).filter(function (key) {
|
|
|
974
1555
|
var fd = parseInt(process.env.DEBUG_FD, 10) || 2;
|
|
975
1556
|
|
|
976
1557
|
if (1 !== fd && 2 !== fd) {
|
|
977
|
-
util.
|
|
1558
|
+
util.deprecate(function(){}, 'except for stderr(2) and stdout(1), any other usage of DEBUG_FD is deprecated. Override debug.log if you want to use a different log function (https://git.io/debug_fd)')();
|
|
978
1559
|
}
|
|
979
1560
|
|
|
980
1561
|
var stream = 1 === fd ? process.stdout :
|
|
@@ -997,7 +1578,7 @@ function useColors() {
|
|
|
997
1578
|
|
|
998
1579
|
exports.formatters.o = function(v) {
|
|
999
1580
|
this.inspectOpts.colors = this.useColors;
|
|
1000
|
-
return util.
|
|
1581
|
+
return util.inspect(v, this.inspectOpts)
|
|
1001
1582
|
.split('\n').map(function(str) {
|
|
1002
1583
|
return str.trim()
|
|
1003
1584
|
}).join(' ');
|
|
@@ -1009,7 +1590,7 @@ exports.formatters.o = function(v) {
|
|
|
1009
1590
|
|
|
1010
1591
|
exports.formatters.O = function(v) {
|
|
1011
1592
|
this.inspectOpts.colors = this.useColors;
|
|
1012
|
-
return util.
|
|
1593
|
+
return util.inspect(v, this.inspectOpts);
|
|
1013
1594
|
};
|
|
1014
1595
|
|
|
1015
1596
|
/**
|
|
@@ -1039,7 +1620,7 @@ function formatArgs(args) {
|
|
|
1039
1620
|
*/
|
|
1040
1621
|
|
|
1041
1622
|
function log() {
|
|
1042
|
-
return stream.write(util.
|
|
1623
|
+
return stream.write(util.format.apply(util, arguments) + '\n');
|
|
1043
1624
|
}
|
|
1044
1625
|
|
|
1045
1626
|
/**
|
|
@@ -1568,239 +2149,199 @@ module.exports = exports['default'];
|
|
|
1568
2149
|
|
|
1569
2150
|
var youTubePlayer = _commonjsHelpers.unwrapExports(dist);
|
|
1570
2151
|
|
|
1571
|
-
function
|
|
1572
|
-
|
|
1573
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
1574
|
-
|
|
1575
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
1576
|
-
|
|
1577
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
2152
|
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
1578
2153
|
|
|
1579
|
-
function
|
|
1580
|
-
|
|
1581
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
1582
|
-
|
|
1583
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
1584
|
-
|
|
1585
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
1586
|
-
|
|
1587
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
2154
|
+
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
|
1588
2155
|
|
|
1589
|
-
function
|
|
1590
|
-
|
|
1591
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
2156
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
1592
2157
|
|
|
1593
|
-
function
|
|
2158
|
+
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
1594
2159
|
|
|
1595
|
-
function
|
|
2160
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
1596
2161
|
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
*
|
|
1600
|
-
*
|
|
1601
|
-
* @param {Object}
|
|
1602
|
-
* @param {Object} props
|
|
2162
|
+
/**
|
|
2163
|
+
* Check whether a `props` change should result in the video being updated.
|
|
2164
|
+
*
|
|
2165
|
+
* @param {Object} prevProps
|
|
2166
|
+
* @param {Object} props
|
|
1603
2167
|
*/
|
|
1604
|
-
|
|
1605
2168
|
function shouldUpdateVideo(prevProps, props) {
|
|
1606
2169
|
// A changing video should always trigger an update
|
|
1607
2170
|
if (prevProps.videoId !== props.videoId) {
|
|
1608
2171
|
return true;
|
|
1609
|
-
}
|
|
1610
|
-
// update.
|
|
1611
|
-
|
|
2172
|
+
}
|
|
1612
2173
|
|
|
2174
|
+
// Otherwise, a change in the start/end time playerVars also requires a player
|
|
2175
|
+
// update.
|
|
1613
2176
|
var prevVars = prevProps.opts.playerVars || {};
|
|
1614
2177
|
var vars = props.opts.playerVars || {};
|
|
2178
|
+
|
|
1615
2179
|
return prevVars.start !== vars.start || prevVars.end !== vars.end;
|
|
1616
2180
|
}
|
|
1617
|
-
/**
|
|
1618
|
-
* Neutralize API options that only require a video update, leaving only options
|
|
1619
|
-
* that require a player reset. The results can then be compared to see if a
|
|
1620
|
-
* player reset is necessary.
|
|
1621
|
-
*
|
|
1622
|
-
* @param {Object} opts
|
|
1623
|
-
*/
|
|
1624
|
-
|
|
1625
2181
|
|
|
2182
|
+
/**
|
|
2183
|
+
* Neutralise API options that only require a video update, leaving only options
|
|
2184
|
+
* that require a player reset. The results can then be compared to see if a
|
|
2185
|
+
* player reset is necessary.
|
|
2186
|
+
*
|
|
2187
|
+
* @param {Object} opts
|
|
2188
|
+
*/
|
|
1626
2189
|
function filterResetOptions(opts) {
|
|
1627
|
-
return
|
|
1628
|
-
playerVars:
|
|
2190
|
+
return _extends({}, opts, {
|
|
2191
|
+
playerVars: _extends({}, opts.playerVars, {
|
|
1629
2192
|
autoplay: 0,
|
|
1630
2193
|
start: 0,
|
|
1631
2194
|
end: 0
|
|
1632
|
-
}
|
|
2195
|
+
})
|
|
1633
2196
|
});
|
|
1634
2197
|
}
|
|
1635
|
-
/**
|
|
1636
|
-
* Check whether a `props` change should result in the player being reset.
|
|
1637
|
-
* The player is reset when the `props.opts` change, except if the only change
|
|
1638
|
-
* is in the `start` and `end` playerVars, because a video update can deal with
|
|
1639
|
-
* those.
|
|
1640
|
-
*
|
|
1641
|
-
* @param {Object} prevProps
|
|
1642
|
-
* @param {Object} props
|
|
1643
|
-
*/
|
|
1644
|
-
|
|
1645
2198
|
|
|
2199
|
+
/**
|
|
2200
|
+
* Check whether a `props` change should result in the player being reset.
|
|
2201
|
+
* The player is reset when the `props.opts` change, except if the only change
|
|
2202
|
+
* is in the `start` and `end` playerVars, because a video update can deal with
|
|
2203
|
+
* those.
|
|
2204
|
+
*
|
|
2205
|
+
* @param {Object} prevProps
|
|
2206
|
+
* @param {Object} props
|
|
2207
|
+
*/
|
|
1646
2208
|
function shouldResetPlayer(prevProps, props) {
|
|
1647
2209
|
return !fastDeepEqual(filterResetOptions(prevProps.opts), filterResetOptions(props.opts));
|
|
1648
2210
|
}
|
|
1649
|
-
/**
|
|
1650
|
-
* Check whether a props change should result in an id or className update.
|
|
1651
|
-
*
|
|
1652
|
-
* @param {Object} prevProps
|
|
1653
|
-
* @param {Object} props
|
|
1654
|
-
*/
|
|
1655
|
-
|
|
1656
2211
|
|
|
2212
|
+
/**
|
|
2213
|
+
* Check whether a props change should result in an id or className update.
|
|
2214
|
+
*
|
|
2215
|
+
* @param {Object} prevProps
|
|
2216
|
+
* @param {Object} props
|
|
2217
|
+
*/
|
|
1657
2218
|
function shouldUpdatePlayer(prevProps, props) {
|
|
1658
2219
|
return prevProps.id !== props.id || prevProps.className !== props.className;
|
|
1659
2220
|
}
|
|
1660
2221
|
|
|
1661
|
-
var YouTube =
|
|
2222
|
+
var YouTube = function (_React$Component) {
|
|
1662
2223
|
_inherits(YouTube, _React$Component);
|
|
1663
2224
|
|
|
1664
|
-
var _super = _createSuper(YouTube);
|
|
1665
|
-
|
|
1666
|
-
/**
|
|
1667
|
-
* Expose PlayerState constants for convenience. These constants can also be
|
|
1668
|
-
* accessed through the global YT object after the YouTube IFrame API is instantiated.
|
|
1669
|
-
* https://developers.google.com/youtube/iframe_api_reference#onStateChange
|
|
1670
|
-
*/
|
|
1671
2225
|
function YouTube(props) {
|
|
1672
|
-
var _this;
|
|
1673
|
-
|
|
1674
2226
|
_classCallCheck(this, YouTube);
|
|
1675
2227
|
|
|
1676
|
-
_this =
|
|
2228
|
+
var _this = _possibleConstructorReturn(this, (YouTube.__proto__ || Object.getPrototypeOf(YouTube)).call(this, props));
|
|
1677
2229
|
|
|
1678
|
-
|
|
2230
|
+
_this.onPlayerReady = function (event) {
|
|
1679
2231
|
return _this.props.onReady(event);
|
|
1680
|
-
}
|
|
2232
|
+
};
|
|
1681
2233
|
|
|
1682
|
-
|
|
2234
|
+
_this.onPlayerError = function (event) {
|
|
1683
2235
|
return _this.props.onError(event);
|
|
1684
|
-
}
|
|
2236
|
+
};
|
|
1685
2237
|
|
|
1686
|
-
|
|
2238
|
+
_this.onPlayerStateChange = function (event) {
|
|
1687
2239
|
_this.props.onStateChange(event);
|
|
1688
|
-
|
|
1689
2240
|
switch (event.data) {
|
|
2241
|
+
|
|
1690
2242
|
case YouTube.PlayerState.ENDED:
|
|
1691
2243
|
_this.props.onEnd(event);
|
|
1692
|
-
|
|
1693
2244
|
break;
|
|
1694
2245
|
|
|
1695
2246
|
case YouTube.PlayerState.PLAYING:
|
|
1696
2247
|
_this.props.onPlay(event);
|
|
1697
|
-
|
|
1698
2248
|
break;
|
|
1699
2249
|
|
|
1700
2250
|
case YouTube.PlayerState.PAUSED:
|
|
1701
2251
|
_this.props.onPause(event);
|
|
1702
|
-
|
|
1703
2252
|
break;
|
|
1704
2253
|
}
|
|
1705
|
-
}
|
|
2254
|
+
};
|
|
1706
2255
|
|
|
1707
|
-
|
|
2256
|
+
_this.onPlayerPlaybackRateChange = function (event) {
|
|
1708
2257
|
return _this.props.onPlaybackRateChange(event);
|
|
1709
|
-
}
|
|
2258
|
+
};
|
|
1710
2259
|
|
|
1711
|
-
|
|
2260
|
+
_this.onPlayerPlaybackQualityChange = function (event) {
|
|
1712
2261
|
return _this.props.onPlaybackQualityChange(event);
|
|
1713
|
-
}
|
|
2262
|
+
};
|
|
1714
2263
|
|
|
1715
|
-
|
|
2264
|
+
_this.createPlayer = function () {
|
|
1716
2265
|
// do not attempt to create a player server-side, it won't work
|
|
1717
|
-
if (typeof document === 'undefined') return;
|
|
1718
|
-
|
|
1719
|
-
var playerOpts =
|
|
2266
|
+
if (typeof document === 'undefined') return;
|
|
2267
|
+
// create player
|
|
2268
|
+
var playerOpts = _extends({}, _this.props.opts, {
|
|
1720
2269
|
// preload the `videoId` video if one is already given
|
|
1721
2270
|
videoId: _this.props.videoId
|
|
1722
2271
|
});
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
2272
|
+
_this.internalPlayer = youTubePlayer(_this.container, playerOpts);
|
|
2273
|
+
// attach event handlers
|
|
1726
2274
|
_this.internalPlayer.on('ready', _this.onPlayerReady);
|
|
1727
|
-
|
|
1728
2275
|
_this.internalPlayer.on('error', _this.onPlayerError);
|
|
1729
|
-
|
|
1730
2276
|
_this.internalPlayer.on('stateChange', _this.onPlayerStateChange);
|
|
1731
|
-
|
|
1732
2277
|
_this.internalPlayer.on('playbackRateChange', _this.onPlayerPlaybackRateChange);
|
|
1733
|
-
|
|
1734
2278
|
_this.internalPlayer.on('playbackQualityChange', _this.onPlayerPlaybackQualityChange);
|
|
1735
|
-
}
|
|
2279
|
+
};
|
|
1736
2280
|
|
|
1737
|
-
|
|
2281
|
+
_this.resetPlayer = function () {
|
|
1738
2282
|
return _this.internalPlayer.destroy().then(_this.createPlayer);
|
|
1739
|
-
}
|
|
2283
|
+
};
|
|
1740
2284
|
|
|
1741
|
-
|
|
2285
|
+
_this.updatePlayer = function () {
|
|
1742
2286
|
_this.internalPlayer.getIframe().then(function (iframe) {
|
|
1743
2287
|
if (_this.props.id) iframe.setAttribute('id', _this.props.id);else iframe.removeAttribute('id');
|
|
1744
2288
|
if (_this.props.className) iframe.setAttribute('class', _this.props.className);else iframe.removeAttribute('class');
|
|
1745
2289
|
});
|
|
1746
|
-
}
|
|
1747
|
-
|
|
1748
|
-
_defineProperty(_assertThisInitialized(_this), "getInternalPlayer", function () {
|
|
1749
|
-
return _this.internalPlayer;
|
|
1750
|
-
});
|
|
2290
|
+
};
|
|
1751
2291
|
|
|
1752
|
-
|
|
2292
|
+
_this.updateVideo = function () {
|
|
1753
2293
|
if (typeof _this.props.videoId === 'undefined' || _this.props.videoId === null) {
|
|
1754
2294
|
_this.internalPlayer.stopVideo();
|
|
1755
|
-
|
|
1756
2295
|
return;
|
|
1757
|
-
}
|
|
1758
|
-
|
|
2296
|
+
}
|
|
1759
2297
|
|
|
2298
|
+
// set queueing options
|
|
1760
2299
|
var autoplay = false;
|
|
1761
2300
|
var opts = {
|
|
1762
2301
|
videoId: _this.props.videoId
|
|
1763
2302
|
};
|
|
1764
|
-
|
|
1765
2303
|
if ('playerVars' in _this.props.opts) {
|
|
1766
2304
|
autoplay = _this.props.opts.playerVars.autoplay === 1;
|
|
1767
|
-
|
|
1768
2305
|
if ('start' in _this.props.opts.playerVars) {
|
|
1769
2306
|
opts.startSeconds = _this.props.opts.playerVars.start;
|
|
1770
2307
|
}
|
|
1771
|
-
|
|
1772
2308
|
if ('end' in _this.props.opts.playerVars) {
|
|
1773
2309
|
opts.endSeconds = _this.props.opts.playerVars.end;
|
|
1774
2310
|
}
|
|
1775
|
-
}
|
|
1776
|
-
|
|
2311
|
+
}
|
|
1777
2312
|
|
|
2313
|
+
// if autoplay is enabled loadVideoById
|
|
1778
2314
|
if (autoplay) {
|
|
1779
2315
|
_this.internalPlayer.loadVideoById(opts);
|
|
1780
|
-
|
|
1781
2316
|
return;
|
|
1782
|
-
}
|
|
1783
|
-
|
|
1784
|
-
|
|
2317
|
+
}
|
|
2318
|
+
// default behaviour just cues the video
|
|
1785
2319
|
_this.internalPlayer.cueVideoById(opts);
|
|
1786
|
-
}
|
|
2320
|
+
};
|
|
1787
2321
|
|
|
1788
|
-
|
|
2322
|
+
_this.refContainer = function (container) {
|
|
1789
2323
|
_this.container = container;
|
|
1790
|
-
}
|
|
2324
|
+
};
|
|
1791
2325
|
|
|
1792
2326
|
_this.container = null;
|
|
1793
2327
|
_this.internalPlayer = null;
|
|
1794
2328
|
return _this;
|
|
1795
2329
|
}
|
|
1796
2330
|
|
|
2331
|
+
/**
|
|
2332
|
+
* Expose PlayerState constants for convenience. These constants can also be
|
|
2333
|
+
* accessed through the global YT object after the YouTube IFrame API is instantiated.
|
|
2334
|
+
* https://developers.google.com/youtube/iframe_api_reference#onStateChange
|
|
2335
|
+
*/
|
|
2336
|
+
|
|
2337
|
+
|
|
1797
2338
|
_createClass(YouTube, [{
|
|
1798
|
-
key:
|
|
2339
|
+
key: 'componentDidMount',
|
|
1799
2340
|
value: function componentDidMount() {
|
|
1800
2341
|
this.createPlayer();
|
|
1801
2342
|
}
|
|
1802
2343
|
}, {
|
|
1803
|
-
key:
|
|
2344
|
+
key: 'componentDidUpdate',
|
|
1804
2345
|
value: function componentDidUpdate(prevProps) {
|
|
1805
2346
|
if (shouldUpdatePlayer(prevProps, this.props)) {
|
|
1806
2347
|
this.updatePlayer();
|
|
@@ -1815,58 +2356,112 @@ var YouTube = /*#__PURE__*/function (_React$Component) {
|
|
|
1815
2356
|
}
|
|
1816
2357
|
}
|
|
1817
2358
|
}, {
|
|
1818
|
-
key:
|
|
2359
|
+
key: 'componentWillUnmount',
|
|
1819
2360
|
value: function componentWillUnmount() {
|
|
1820
|
-
/**
|
|
1821
|
-
* Note: The `youtube-player` package that is used promisifies all
|
|
1822
|
-
* Player API calls, which introduces a delay of a tick before it actually
|
|
1823
|
-
* gets destroyed. Since React attempts to remove the element instantly
|
|
1824
|
-
* this method isn't quick enough to reset the container element.
|
|
2361
|
+
/**
|
|
2362
|
+
* Note: The `youtube-player` package that is used promisifies all Youtube
|
|
2363
|
+
* Player API calls, which introduces a delay of a tick before it actually
|
|
2364
|
+
* gets destroyed. Since React attempts to remove the element instantly
|
|
2365
|
+
* this method isn't quick enough to reset the container element.
|
|
1825
2366
|
*/
|
|
1826
2367
|
this.internalPlayer.destroy();
|
|
1827
2368
|
}
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
*
|
|
1831
|
-
*
|
|
1832
|
-
*
|
|
2369
|
+
|
|
2370
|
+
/**
|
|
2371
|
+
* https://developers.google.com/youtube/iframe_api_reference#onReady
|
|
2372
|
+
*
|
|
2373
|
+
* @param {Object} event
|
|
2374
|
+
* @param {Object} target - player object
|
|
2375
|
+
*/
|
|
2376
|
+
|
|
2377
|
+
|
|
2378
|
+
/**
|
|
2379
|
+
* https://developers.google.com/youtube/iframe_api_reference#onError
|
|
2380
|
+
*
|
|
2381
|
+
* @param {Object} event
|
|
2382
|
+
* @param {Integer} data - error type
|
|
2383
|
+
* @param {Object} target - player object
|
|
2384
|
+
*/
|
|
2385
|
+
|
|
2386
|
+
|
|
2387
|
+
/**
|
|
2388
|
+
* https://developers.google.com/youtube/iframe_api_reference#onStateChange
|
|
2389
|
+
*
|
|
2390
|
+
* @param {Object} event
|
|
2391
|
+
* @param {Integer} data - status change type
|
|
2392
|
+
* @param {Object} target - actual YT player
|
|
2393
|
+
*/
|
|
2394
|
+
|
|
2395
|
+
|
|
2396
|
+
/**
|
|
2397
|
+
* https://developers.google.com/youtube/iframe_api_reference#onPlaybackRateChange
|
|
2398
|
+
*
|
|
2399
|
+
* @param {Object} event
|
|
2400
|
+
* @param {Float} data - playback rate
|
|
2401
|
+
* @param {Object} target - actual YT player
|
|
2402
|
+
*/
|
|
2403
|
+
|
|
2404
|
+
|
|
2405
|
+
/**
|
|
2406
|
+
* https://developers.google.com/youtube/iframe_api_reference#onPlaybackQualityChange
|
|
2407
|
+
*
|
|
2408
|
+
* @param {Object} event
|
|
2409
|
+
* @param {String} data - playback quality
|
|
2410
|
+
* @param {Object} target - actual YT player
|
|
2411
|
+
*/
|
|
2412
|
+
|
|
2413
|
+
|
|
2414
|
+
/**
|
|
2415
|
+
* Initialize the Youtube Player API on the container and attach event handlers
|
|
2416
|
+
*/
|
|
2417
|
+
|
|
2418
|
+
|
|
2419
|
+
/**
|
|
2420
|
+
* Shorthand for destroying and then re-creating the Youtube Player
|
|
2421
|
+
*/
|
|
2422
|
+
|
|
2423
|
+
|
|
2424
|
+
/**
|
|
2425
|
+
* Method to update the id and class of the Youtube Player iframe.
|
|
2426
|
+
* React should update this automatically but since the Youtube Player API
|
|
2427
|
+
* replaced the DIV that is mounted by React we need to do this manually.
|
|
2428
|
+
*/
|
|
2429
|
+
|
|
2430
|
+
|
|
2431
|
+
/**
|
|
2432
|
+
* Call Youtube Player API methods to update the currently playing video.
|
|
2433
|
+
* Depeding on the `opts.playerVars.autoplay` this function uses one of two
|
|
2434
|
+
* Youtube Player API methods to update the video.
|
|
1833
2435
|
*/
|
|
1834
2436
|
|
|
1835
2437
|
}, {
|
|
1836
|
-
key:
|
|
2438
|
+
key: 'render',
|
|
1837
2439
|
value: function render() {
|
|
1838
|
-
return
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
id: this.props.id,
|
|
1842
|
-
|
|
1843
|
-
ref: this.refContainer
|
|
1844
|
-
}));
|
|
2440
|
+
return React__default.createElement(
|
|
2441
|
+
'div',
|
|
2442
|
+
{ className: this.props.containerClassName },
|
|
2443
|
+
React__default.createElement('div', { id: this.props.id, className: this.props.className, ref: this.refContainer })
|
|
2444
|
+
);
|
|
1845
2445
|
}
|
|
1846
2446
|
}]);
|
|
1847
2447
|
|
|
1848
2448
|
return YouTube;
|
|
1849
|
-
}(React__default.Component);
|
|
1850
|
-
|
|
1851
|
-
_defineProperty(YouTube, "PlayerState", {
|
|
1852
|
-
UNSTARTED: -1,
|
|
1853
|
-
ENDED: 0,
|
|
1854
|
-
PLAYING: 1,
|
|
1855
|
-
PAUSED: 2,
|
|
1856
|
-
BUFFERING: 3,
|
|
1857
|
-
CUED: 5
|
|
1858
|
-
});
|
|
2449
|
+
}(React__default.Component);
|
|
1859
2450
|
|
|
1860
2451
|
YouTube.propTypes = {
|
|
1861
2452
|
videoId: PropTypes__default.string,
|
|
2453
|
+
|
|
1862
2454
|
// custom ID for player element
|
|
1863
2455
|
id: PropTypes__default.string,
|
|
2456
|
+
|
|
1864
2457
|
// custom class name for player element
|
|
1865
2458
|
className: PropTypes__default.string,
|
|
1866
2459
|
// custom class name for player container element
|
|
1867
2460
|
containerClassName: PropTypes__default.string,
|
|
2461
|
+
|
|
1868
2462
|
// https://developers.google.com/youtube/iframe_api_reference#Loading_a_Video_Player
|
|
1869
2463
|
opts: PropTypes__default.objectOf(PropTypes__default.any),
|
|
2464
|
+
|
|
1870
2465
|
// event subscriptions
|
|
1871
2466
|
onReady: PropTypes__default.func,
|
|
1872
2467
|
onError: PropTypes__default.func,
|
|
@@ -1878,7 +2473,6 @@ YouTube.propTypes = {
|
|
|
1878
2473
|
onPlaybackQualityChange: PropTypes__default.func
|
|
1879
2474
|
};
|
|
1880
2475
|
YouTube.defaultProps = {
|
|
1881
|
-
videoId: null,
|
|
1882
2476
|
id: null,
|
|
1883
2477
|
className: null,
|
|
1884
2478
|
opts: {},
|
|
@@ -1892,6 +2486,14 @@ YouTube.defaultProps = {
|
|
|
1892
2486
|
onPlaybackRateChange: function onPlaybackRateChange() {},
|
|
1893
2487
|
onPlaybackQualityChange: function onPlaybackQualityChange() {}
|
|
1894
2488
|
};
|
|
2489
|
+
YouTube.PlayerState = {
|
|
2490
|
+
UNSTARTED: -1,
|
|
2491
|
+
ENDED: 0,
|
|
2492
|
+
PLAYING: 1,
|
|
2493
|
+
PAUSED: 2,
|
|
2494
|
+
BUFFERING: 3,
|
|
2495
|
+
CUED: 5
|
|
2496
|
+
};
|
|
1895
2497
|
|
|
1896
2498
|
var YouTubePlayer = function YouTubePlayer(_ref) {
|
|
1897
2499
|
var url = _ref.url,
|
|
@@ -1930,8 +2532,8 @@ var YouTubePlayer = function YouTubePlayer(_ref) {
|
|
|
1930
2532
|
var duration = player.getDuration();
|
|
1931
2533
|
var queue = Math.floor(duration / 10);
|
|
1932
2534
|
var segment = Math.floor(current / queue);
|
|
1933
|
-
Beam.report_beam_video('Ready', main.
|
|
1934
|
-
Segment.report_video_event('Video Ready', main.
|
|
2535
|
+
Beam.report_beam_video('Ready', main.main_16, duration, current, segment);
|
|
2536
|
+
Segment.report_video_event('Video Ready', main.main_16, duration, current, segment);
|
|
1935
2537
|
};
|
|
1936
2538
|
|
|
1937
2539
|
var handlePlayPercent = function handlePlayPercent(player) {
|
|
@@ -1941,8 +2543,8 @@ var YouTubePlayer = function YouTubePlayer(_ref) {
|
|
|
1941
2543
|
var segment = Math.floor(current / queue);
|
|
1942
2544
|
|
|
1943
2545
|
if (!queueProgress.includes(segment)) {
|
|
1944
|
-
Beam.report_beam_video('Segment', main.
|
|
1945
|
-
Segment.report_video_event('Video Segment', main.
|
|
2546
|
+
Beam.report_beam_video('Segment', main.main_16, duration, current, segment);
|
|
2547
|
+
Segment.report_video_event('Video Segment', main.main_16, duration, current, segment);
|
|
1946
2548
|
queueProgress.push(segment);
|
|
1947
2549
|
}
|
|
1948
2550
|
};
|
|
@@ -1955,8 +2557,8 @@ var YouTubePlayer = function YouTubePlayer(_ref) {
|
|
|
1955
2557
|
var queue = Math.floor(duration / 10);
|
|
1956
2558
|
var segment = Math.floor(current / queue);
|
|
1957
2559
|
|
|
1958
|
-
Beam.report_beam_video('Play', main.
|
|
1959
|
-
Segment.report_video_event('Video Play', main.
|
|
2560
|
+
Beam.report_beam_video('Play', main.main_16, duration, current, segment);
|
|
2561
|
+
Segment.report_video_event('Video Play', main.main_16, duration, current, segment);
|
|
1960
2562
|
|
|
1961
2563
|
if (!playReported) {
|
|
1962
2564
|
setPlayReported(true);
|
|
@@ -1975,8 +2577,8 @@ var YouTubePlayer = function YouTubePlayer(_ref) {
|
|
|
1975
2577
|
var queue = Math.floor(duration / 10);
|
|
1976
2578
|
var segment = Math.floor(current / queue);
|
|
1977
2579
|
|
|
1978
|
-
Beam.report_beam_video('End', main.
|
|
1979
|
-
Segment.report_video_event('Video End', main.
|
|
2580
|
+
Beam.report_beam_video('End', main.main_16, duration, current, segment);
|
|
2581
|
+
Segment.report_video_event('Video End', main.main_16, duration, current, segment);
|
|
1980
2582
|
setEndReported(true);
|
|
1981
2583
|
clearInterval(intervalID);
|
|
1982
2584
|
}
|
|
@@ -1989,8 +2591,8 @@ var YouTubePlayer = function YouTubePlayer(_ref) {
|
|
|
1989
2591
|
var queue = Math.floor(duration / 10);
|
|
1990
2592
|
var segment = Math.floor(current / queue);
|
|
1991
2593
|
|
|
1992
|
-
Beam.report_beam_video('Pause', main.
|
|
1993
|
-
Segment.report_video_event('Video Pause', main.
|
|
2594
|
+
Beam.report_beam_video('Pause', main.main_16, duration, current, segment);
|
|
2595
|
+
Segment.report_video_event('Video Pause', main.main_16, duration, current, segment);
|
|
1994
2596
|
};
|
|
1995
2597
|
|
|
1996
2598
|
return React__default.createElement(
|
|
@@ -2158,7 +2760,7 @@ var Media = function Media(_ref) {
|
|
|
2158
2760
|
React__default.createElement('source', { media: '(min-width: 1200px)', srcSet: urlFor({ source: poster, client: client, imageWidth: 1500, imageFit: 'max' }) }),
|
|
2159
2761
|
React__default.createElement('source', { media: '(min-width: 600px)', srcSet: urlFor({ source: poster, client: client, imageWidth: 1000, imageFit: 'max' }) }),
|
|
2160
2762
|
React__default.createElement('source', { media: '(max-width: 600px)', srcSet: urlFor({ source: poster, client: client, imageWidth: 500, imageFit: 'max' }) }),
|
|
2161
|
-
React__default.createElement('img', _extends._extends({ className: 'media-image', style: { maxWidth: '100%' }, src: urlFor({ source: poster, client: client }) }, alt && { alt: alt }))
|
|
2763
|
+
React__default.createElement('img', _extends$1._extends({ className: 'media-image', style: { maxWidth: '100%' }, src: urlFor({ source: poster, client: client }) }, alt && { alt: alt }))
|
|
2162
2764
|
)
|
|
2163
2765
|
),
|
|
2164
2766
|
caption && React__default.createElement(
|
|
@@ -2171,7 +2773,7 @@ var Media = function Media(_ref) {
|
|
|
2171
2773
|
} else if (caption && caption !== '') {
|
|
2172
2774
|
return React__default.createElement(
|
|
2173
2775
|
'a',
|
|
2174
|
-
_extends._extends({}, uploadDoc.downloadMedia ? {
|
|
2776
|
+
_extends$1._extends({}, uploadDoc.downloadMedia ? {
|
|
2175
2777
|
href: uploadDoc.asset.url + '?dl='
|
|
2176
2778
|
} : { href: uploadDoc.asset.url, target: blank ? '_blank' : '_self', rel: 'noopener noreferrer' }, {
|
|
2177
2779
|
style: { paddingLeft: '4px', paddingRight: '4px' },
|
|
@@ -2226,8 +2828,8 @@ var VideoMp4 = function VideoMp4(_ref) {
|
|
|
2226
2828
|
var duration = player.duration;
|
|
2227
2829
|
var queue = Math.floor(duration / 10);
|
|
2228
2830
|
var segment = Math.floor(current / queue);
|
|
2229
|
-
Beam.report_beam_video('Ready', main.
|
|
2230
|
-
Segment.report_video_event('Video Ready', main.
|
|
2831
|
+
Beam.report_beam_video('Ready', main.main_16, duration, current, segment, 'MP4');
|
|
2832
|
+
Segment.report_video_event('Video Ready', main.main_16, duration, current, segment, 'MP4');
|
|
2231
2833
|
};
|
|
2232
2834
|
|
|
2233
2835
|
var handlePlayPercent = function handlePlayPercent(player) {
|
|
@@ -2236,8 +2838,8 @@ var VideoMp4 = function VideoMp4(_ref) {
|
|
|
2236
2838
|
var queue = Math.floor(duration / 10);
|
|
2237
2839
|
var segment = Math.floor(current / queue);
|
|
2238
2840
|
if (!queueProgress.includes(segment)) {
|
|
2239
|
-
Beam.report_beam_video('Segment', main.
|
|
2240
|
-
Segment.report_video_event('Video Segment', main.
|
|
2841
|
+
Beam.report_beam_video('Segment', main.main_16, duration, current, segment, 'MP4');
|
|
2842
|
+
Segment.report_video_event('Video Segment', main.main_16, duration, current, segment, 'MP4');
|
|
2241
2843
|
queueProgress.push(segment);
|
|
2242
2844
|
}
|
|
2243
2845
|
};
|
|
@@ -2249,8 +2851,8 @@ var VideoMp4 = function VideoMp4(_ref) {
|
|
|
2249
2851
|
var duration = player.duration;
|
|
2250
2852
|
var queue = Math.floor(duration / 10);
|
|
2251
2853
|
var segment = Math.floor(current / queue);
|
|
2252
|
-
Beam.report_beam_video('Play', main.
|
|
2253
|
-
Segment.report_video_event('Video Play', main.
|
|
2854
|
+
Beam.report_beam_video('Play', main.main_16, duration, current, segment, 'MP4');
|
|
2855
|
+
Segment.report_video_event('Video Play', main.main_16, duration, current, segment, 'MP4');
|
|
2254
2856
|
|
|
2255
2857
|
if (!playReported) {
|
|
2256
2858
|
event.persist();
|
|
@@ -2270,8 +2872,8 @@ var VideoMp4 = function VideoMp4(_ref) {
|
|
|
2270
2872
|
var queue = Math.floor(duration / 10);
|
|
2271
2873
|
var segment = Math.floor(current / queue);
|
|
2272
2874
|
|
|
2273
|
-
Beam.report_beam_video('End', main.
|
|
2274
|
-
Segment.report_video_event('Video End', main.
|
|
2875
|
+
Beam.report_beam_video('End', main.main_16, duration, current, segment, 'MP4');
|
|
2876
|
+
Segment.report_video_event('Video End', main.main_16, duration, current, segment, 'MP4');
|
|
2275
2877
|
setEndReported(true);
|
|
2276
2878
|
clearInterval(intervalID);
|
|
2277
2879
|
}
|
|
@@ -2283,8 +2885,8 @@ var VideoMp4 = function VideoMp4(_ref) {
|
|
|
2283
2885
|
var duration = player.duration - current;
|
|
2284
2886
|
var queue = Math.floor(duration / 10);
|
|
2285
2887
|
var segment = Math.floor(current / queue);
|
|
2286
|
-
Beam.report_beam_video('Pause', main.
|
|
2287
|
-
Segment.report_video_event('Video Pause', main.
|
|
2888
|
+
Beam.report_beam_video('Pause', main.main_16, duration, current, segment, 'MP4');
|
|
2889
|
+
Segment.report_video_event('Video Pause', main.main_16, duration, current, segment, 'MP4');
|
|
2288
2890
|
};
|
|
2289
2891
|
|
|
2290
2892
|
return React__default.createElement(
|
|
@@ -2345,7 +2947,7 @@ var Video = function Video(_ref) {
|
|
|
2345
2947
|
var onVideoSuccess = function onVideoSuccess(success) {
|
|
2346
2948
|
//console.log('success:', success.ref)
|
|
2347
2949
|
var player = success.ref;
|
|
2348
|
-
if (_typeof$
|
|
2950
|
+
if (_typeof$1._typeof(player.ima3) === 'object' && player.ima3.settings && player.ima3.settings.serverUrl && targeting !== null) {
|
|
2349
2951
|
player.ima3.settings.debug = true;
|
|
2350
2952
|
if (targeting.content_placement && targeting.document_url) {
|
|
2351
2953
|
player.ima3.settings.serverUrl = player.ima3.settings.serverUrl + '&cust_params=' + encodeURIComponent('content_placement=' + targeting.content_placement + '&document_url=' + targeting.document_url);
|
|
@@ -2373,8 +2975,8 @@ var Video = function Video(_ref) {
|
|
|
2373
2975
|
player.pause();
|
|
2374
2976
|
}
|
|
2375
2977
|
|
|
2376
|
-
Beam.report_beam_video('Ready', main.
|
|
2377
|
-
Segment.report_video_event('Video Ready', main.
|
|
2978
|
+
Beam.report_beam_video('Ready', main.main_16, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID);
|
|
2979
|
+
Segment.report_video_event('Video Ready', main.main_16, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID);
|
|
2378
2980
|
});
|
|
2379
2981
|
|
|
2380
2982
|
// play
|
|
@@ -2383,8 +2985,8 @@ var Video = function Video(_ref) {
|
|
|
2383
2985
|
var current = player.currentTime();
|
|
2384
2986
|
var queue = Math.floor(duration / 10);
|
|
2385
2987
|
var segment = Math.floor(current / queue);
|
|
2386
|
-
Beam.report_beam_video('Play', main.
|
|
2387
|
-
Segment.report_video_event('Video Play', main.
|
|
2988
|
+
Beam.report_beam_video('Play', main.main_16, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID);
|
|
2989
|
+
Segment.report_video_event('Video Play', main.main_16, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID);
|
|
2388
2990
|
});
|
|
2389
2991
|
|
|
2390
2992
|
// pause
|
|
@@ -2393,8 +2995,8 @@ var Video = function Video(_ref) {
|
|
|
2393
2995
|
var current = player.currentTime();
|
|
2394
2996
|
var queue = Math.floor(duration / 10);
|
|
2395
2997
|
var segment = Math.floor(current / queue);
|
|
2396
|
-
Beam.report_beam_video('Pause', main.
|
|
2397
|
-
Segment.report_video_event('Video Pause', main.
|
|
2998
|
+
Beam.report_beam_video('Pause', main.main_16, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID);
|
|
2999
|
+
Segment.report_video_event('Video Pause', main.main_16, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID);
|
|
2398
3000
|
});
|
|
2399
3001
|
|
|
2400
3002
|
// end
|
|
@@ -2403,8 +3005,8 @@ var Video = function Video(_ref) {
|
|
|
2403
3005
|
var current = player.currentTime();
|
|
2404
3006
|
var queue = Math.floor(duration / 10);
|
|
2405
3007
|
var segment = Math.floor(current / queue);
|
|
2406
|
-
Beam.report_beam_video('End', main.
|
|
2407
|
-
Segment.report_video_event('Video End', main.
|
|
3008
|
+
Beam.report_beam_video('End', main.main_16, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID);
|
|
3009
|
+
Segment.report_video_event('Video End', main.main_16, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID);
|
|
2408
3010
|
autoplayNextVideo(evt);
|
|
2409
3011
|
});
|
|
2410
3012
|
|
|
@@ -2415,8 +3017,8 @@ var Video = function Video(_ref) {
|
|
|
2415
3017
|
var queue = Math.floor(duration / 10);
|
|
2416
3018
|
var segment = Math.floor(current / queue);
|
|
2417
3019
|
if (!queueProgress.includes(segment)) {
|
|
2418
|
-
Beam.report_beam_video('Segment', main.
|
|
2419
|
-
Segment.report_video_event('Video Segment', main.
|
|
3020
|
+
Beam.report_beam_video('Segment', main.main_16, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID);
|
|
3021
|
+
Segment.report_video_event('Video Segment', main.main_16, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID);
|
|
2420
3022
|
queueProgress.push(segment);
|
|
2421
3023
|
}
|
|
2422
3024
|
});
|
|
@@ -2427,8 +3029,8 @@ var Video = function Video(_ref) {
|
|
|
2427
3029
|
var id = player.ads.ad.id;
|
|
2428
3030
|
var adType = 'Bright Cove: ' + player.ads.ad.type;
|
|
2429
3031
|
|
|
2430
|
-
Beam.report_beam_ad('AD Started', main.
|
|
2431
|
-
Segment.report_ad_event('Video Ad Started', main.
|
|
3032
|
+
Beam.report_beam_ad('AD Started', main.main_16, '', '', '', '', '', adType, duration, id);
|
|
3033
|
+
Segment.report_ad_event('Video Ad Started', main.main_16, duration, adType, accountIDs.brightcove.playerId, accountIDs.brightcove.accountId);
|
|
2432
3034
|
});
|
|
2433
3035
|
|
|
2434
3036
|
// ad ended
|
|
@@ -2436,8 +3038,8 @@ var Video = function Video(_ref) {
|
|
|
2436
3038
|
var duration = player.ads.ad.duration;
|
|
2437
3039
|
var id = player.ads.ad.id;
|
|
2438
3040
|
var adType = 'Bright Cove: ' + player.ads.ad.type;
|
|
2439
|
-
Beam.report_beam_ad('AD Ended', main.
|
|
2440
|
-
Segment.report_ad_event('Video Ad Ended', main.
|
|
3041
|
+
Beam.report_beam_ad('AD Ended', main.main_16, '', '', '', '', '', adType, duration, id);
|
|
3042
|
+
Segment.report_ad_event('Video Ad Ended', main.main_16, duration, adType, accountIDs.brightcove.playerId, accountIDs.brightcove.accountId);
|
|
2441
3043
|
});
|
|
2442
3044
|
};
|
|
2443
3045
|
|
|
@@ -2867,17 +3469,11 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
|
2867
3469
|
|
|
2868
3470
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2869
3471
|
|
|
2870
|
-
function
|
|
3472
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
|
|
2871
3473
|
|
|
2872
|
-
function
|
|
3474
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
|
|
2873
3475
|
|
|
2874
|
-
function
|
|
2875
|
-
|
|
2876
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
2877
|
-
|
|
2878
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
2879
|
-
|
|
2880
|
-
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
3476
|
+
function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
2881
3477
|
|
|
2882
3478
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
2883
3479
|
|
|
@@ -3007,12 +3603,12 @@ function getSDK(url, sdkGlobal) {
|
|
|
3007
3603
|
|
|
3008
3604
|
function getConfig(props$1, defaultProps, showWarning) {
|
|
3009
3605
|
var config = (0, _deepmerge["default"])(defaultProps.config, props$1.config);
|
|
3010
|
-
|
|
3011
|
-
var
|
|
3012
|
-
|
|
3606
|
+
var _iteratorNormalCompletion = true;
|
|
3607
|
+
var _didIteratorError = false;
|
|
3608
|
+
var _iteratorError = undefined;
|
|
3013
3609
|
|
|
3014
3610
|
try {
|
|
3015
|
-
for (_iterator.
|
|
3611
|
+
for (var _iterator = props.DEPRECATED_CONFIG_PROPS[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
3016
3612
|
var p = _step.value;
|
|
3017
3613
|
|
|
3018
3614
|
if (props$1[p]) {
|
|
@@ -3027,9 +3623,18 @@ function getConfig(props$1, defaultProps, showWarning) {
|
|
|
3027
3623
|
}
|
|
3028
3624
|
}
|
|
3029
3625
|
} catch (err) {
|
|
3030
|
-
|
|
3626
|
+
_didIteratorError = true;
|
|
3627
|
+
_iteratorError = err;
|
|
3031
3628
|
} finally {
|
|
3032
|
-
|
|
3629
|
+
try {
|
|
3630
|
+
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
|
|
3631
|
+
_iterator["return"]();
|
|
3632
|
+
}
|
|
3633
|
+
} finally {
|
|
3634
|
+
if (_didIteratorError) {
|
|
3635
|
+
throw _iteratorError;
|
|
3636
|
+
}
|
|
3637
|
+
}
|
|
3033
3638
|
}
|
|
3034
3639
|
|
|
3035
3640
|
return config;
|
|
@@ -3176,16 +3781,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
3176
3781
|
|
|
3177
3782
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
3178
3783
|
|
|
3179
|
-
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
3180
|
-
|
|
3181
3784
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
3182
3785
|
|
|
3183
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
3184
|
-
|
|
3185
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
3186
|
-
|
|
3187
3786
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
3188
3787
|
|
|
3788
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
3789
|
+
|
|
3189
3790
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
3190
3791
|
|
|
3191
3792
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -3194,12 +3795,14 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
3194
3795
|
|
|
3195
3796
|
var SEEK_ON_PLAY_EXPIRY = 5000;
|
|
3196
3797
|
|
|
3197
|
-
var Player =
|
|
3798
|
+
var Player =
|
|
3799
|
+
/*#__PURE__*/
|
|
3800
|
+
function (_Component) {
|
|
3198
3801
|
_inherits(Player, _Component);
|
|
3199
3802
|
|
|
3200
|
-
var _super = _createSuper(Player);
|
|
3201
|
-
|
|
3202
3803
|
function Player() {
|
|
3804
|
+
var _getPrototypeOf2;
|
|
3805
|
+
|
|
3203
3806
|
var _this;
|
|
3204
3807
|
|
|
3205
3808
|
_classCallCheck(this, Player);
|
|
@@ -3208,7 +3811,7 @@ var Player = /*#__PURE__*/function (_Component) {
|
|
|
3208
3811
|
_args[_key] = arguments[_key];
|
|
3209
3812
|
}
|
|
3210
3813
|
|
|
3211
|
-
_this =
|
|
3814
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Player)).call.apply(_getPrototypeOf2, [this].concat(_args)));
|
|
3212
3815
|
|
|
3213
3816
|
_defineProperty(_assertThisInitialized(_this), "mounted", false);
|
|
3214
3817
|
|
|
@@ -3533,7 +4136,7 @@ var Player = /*#__PURE__*/function (_Component) {
|
|
|
3533
4136
|
return null;
|
|
3534
4137
|
}
|
|
3535
4138
|
|
|
3536
|
-
return
|
|
4139
|
+
return _react["default"].createElement(Player, _extends({}, this.props, {
|
|
3537
4140
|
ref: this.ref,
|
|
3538
4141
|
onReady: this.handleReady,
|
|
3539
4142
|
onPlay: this.handlePlay,
|
|
@@ -3594,16 +4197,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
3594
4197
|
|
|
3595
4198
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
3596
4199
|
|
|
3597
|
-
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
3598
|
-
|
|
3599
4200
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
3600
4201
|
|
|
3601
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
3602
|
-
|
|
3603
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
3604
|
-
|
|
3605
4202
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
3606
4203
|
|
|
4204
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
4205
|
+
|
|
3607
4206
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
3608
4207
|
|
|
3609
4208
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -3615,12 +4214,14 @@ var SUPPORTED_PROPS = Object.keys(props.propTypes);
|
|
|
3615
4214
|
function createSinglePlayer(activePlayer) {
|
|
3616
4215
|
var _class, _temp;
|
|
3617
4216
|
|
|
3618
|
-
return _temp = _class =
|
|
4217
|
+
return _temp = _class =
|
|
4218
|
+
/*#__PURE__*/
|
|
4219
|
+
function (_Component) {
|
|
3619
4220
|
_inherits(SinglePlayer, _Component);
|
|
3620
4221
|
|
|
3621
|
-
var _super = _createSuper(SinglePlayer);
|
|
3622
|
-
|
|
3623
4222
|
function SinglePlayer() {
|
|
4223
|
+
var _getPrototypeOf2;
|
|
4224
|
+
|
|
3624
4225
|
var _this;
|
|
3625
4226
|
|
|
3626
4227
|
_classCallCheck(this, SinglePlayer);
|
|
@@ -3629,7 +4230,7 @@ function createSinglePlayer(activePlayer) {
|
|
|
3629
4230
|
args[_key] = arguments[_key];
|
|
3630
4231
|
}
|
|
3631
4232
|
|
|
3632
|
-
_this =
|
|
4233
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(SinglePlayer)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
3633
4234
|
|
|
3634
4235
|
_defineProperty(_assertThisInitialized(_this), "config", (0, utils.getConfig)(_this.props, props.defaultProps, true));
|
|
3635
4236
|
|
|
@@ -3697,12 +4298,12 @@ function createSinglePlayer(activePlayer) {
|
|
|
3697
4298
|
height = _this$props.height,
|
|
3698
4299
|
Wrapper = _this$props.wrapper;
|
|
3699
4300
|
var otherProps = (0, utils.omit)(this.props, SUPPORTED_PROPS, props.DEPRECATED_CONFIG_PROPS);
|
|
3700
|
-
return
|
|
4301
|
+
return _react["default"].createElement(Wrapper, _extends({
|
|
3701
4302
|
style: _objectSpread({}, style, {
|
|
3702
4303
|
width: width,
|
|
3703
4304
|
height: height
|
|
3704
4305
|
})
|
|
3705
|
-
}, otherProps),
|
|
4306
|
+
}, otherProps), _react["default"].createElement(_Player["default"], _extends({}, this.props, {
|
|
3706
4307
|
ref: this.ref,
|
|
3707
4308
|
activePlayer: activePlayer,
|
|
3708
4309
|
config: this.config
|
|
@@ -3748,31 +4349,23 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
3748
4349
|
|
|
3749
4350
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
3750
4351
|
|
|
3751
|
-
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
3752
|
-
|
|
3753
4352
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
3754
4353
|
|
|
3755
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
3756
|
-
|
|
3757
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
3758
|
-
|
|
3759
4354
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
3760
4355
|
|
|
4356
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
4357
|
+
|
|
3761
4358
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
3762
4359
|
|
|
3763
4360
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
3764
4361
|
|
|
3765
4362
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
3766
4363
|
|
|
3767
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) ||
|
|
3768
|
-
|
|
3769
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3770
|
-
|
|
3771
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4364
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
|
|
3772
4365
|
|
|
3773
|
-
function
|
|
4366
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
|
|
3774
4367
|
|
|
3775
|
-
function _iterableToArrayLimit(arr, i) { if (
|
|
4368
|
+
function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
3776
4369
|
|
|
3777
4370
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
3778
4371
|
|
|
@@ -3797,12 +4390,14 @@ function parsePlaylist(url) {
|
|
|
3797
4390
|
return {};
|
|
3798
4391
|
}
|
|
3799
4392
|
|
|
3800
|
-
var YouTube =
|
|
4393
|
+
var YouTube =
|
|
4394
|
+
/*#__PURE__*/
|
|
4395
|
+
function (_Component) {
|
|
3801
4396
|
_inherits(YouTube, _Component);
|
|
3802
4397
|
|
|
3803
|
-
var _super = _createSuper(YouTube);
|
|
3804
|
-
|
|
3805
4398
|
function YouTube() {
|
|
4399
|
+
var _getPrototypeOf2;
|
|
4400
|
+
|
|
3806
4401
|
var _this;
|
|
3807
4402
|
|
|
3808
4403
|
_classCallCheck(this, YouTube);
|
|
@@ -3811,7 +4406,7 @@ var YouTube = /*#__PURE__*/function (_Component) {
|
|
|
3811
4406
|
args[_key] = arguments[_key];
|
|
3812
4407
|
}
|
|
3813
4408
|
|
|
3814
|
-
_this =
|
|
4409
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(YouTube)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
3815
4410
|
|
|
3816
4411
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
3817
4412
|
|
|
@@ -3999,9 +4594,9 @@ var YouTube = /*#__PURE__*/function (_Component) {
|
|
|
3999
4594
|
height: '100%',
|
|
4000
4595
|
display: display
|
|
4001
4596
|
};
|
|
4002
|
-
return
|
|
4597
|
+
return _react["default"].createElement("div", {
|
|
4003
4598
|
style: style
|
|
4004
|
-
},
|
|
4599
|
+
}, _react["default"].createElement("div", {
|
|
4005
4600
|
ref: this.ref
|
|
4006
4601
|
}));
|
|
4007
4602
|
}
|
|
@@ -4057,16 +4652,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
4057
4652
|
|
|
4058
4653
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
4059
4654
|
|
|
4060
|
-
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
4061
|
-
|
|
4062
4655
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
4063
4656
|
|
|
4064
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
4065
|
-
|
|
4066
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
4067
|
-
|
|
4068
4657
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
4069
4658
|
|
|
4659
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
4660
|
+
|
|
4070
4661
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
4071
4662
|
|
|
4072
4663
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -4075,14 +4666,16 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
4075
4666
|
|
|
4076
4667
|
var SDK_URL = 'https://w.soundcloud.com/player/api.js';
|
|
4077
4668
|
var SDK_GLOBAL = 'SC';
|
|
4078
|
-
var MATCH_URL = /(
|
|
4669
|
+
var MATCH_URL = /(soundcloud\.com|snd\.sc)\/.+$/;
|
|
4079
4670
|
|
|
4080
|
-
var SoundCloud =
|
|
4671
|
+
var SoundCloud =
|
|
4672
|
+
/*#__PURE__*/
|
|
4673
|
+
function (_Component) {
|
|
4081
4674
|
_inherits(SoundCloud, _Component);
|
|
4082
4675
|
|
|
4083
|
-
var _super = _createSuper(SoundCloud);
|
|
4084
|
-
|
|
4085
4676
|
function SoundCloud() {
|
|
4677
|
+
var _getPrototypeOf2;
|
|
4678
|
+
|
|
4086
4679
|
var _this;
|
|
4087
4680
|
|
|
4088
4681
|
_classCallCheck(this, SoundCloud);
|
|
@@ -4091,7 +4684,7 @@ var SoundCloud = /*#__PURE__*/function (_Component) {
|
|
|
4091
4684
|
args[_key] = arguments[_key];
|
|
4092
4685
|
}
|
|
4093
4686
|
|
|
4094
|
-
_this =
|
|
4687
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(SoundCloud)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
4095
4688
|
|
|
4096
4689
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
4097
4690
|
|
|
@@ -4212,7 +4805,7 @@ var SoundCloud = /*#__PURE__*/function (_Component) {
|
|
|
4212
4805
|
height: '100%',
|
|
4213
4806
|
display: display
|
|
4214
4807
|
};
|
|
4215
|
-
return
|
|
4808
|
+
return _react["default"].createElement("iframe", {
|
|
4216
4809
|
ref: this.ref,
|
|
4217
4810
|
src: "https://w.soundcloud.com/player/?url=".concat(encodeURIComponent(this.props.url)),
|
|
4218
4811
|
style: style,
|
|
@@ -4274,16 +4867,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
4274
4867
|
|
|
4275
4868
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
4276
4869
|
|
|
4277
|
-
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
4278
|
-
|
|
4279
4870
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
4280
4871
|
|
|
4281
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
4282
|
-
|
|
4283
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
4284
|
-
|
|
4285
4872
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
4286
4873
|
|
|
4874
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
4875
|
+
|
|
4287
4876
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
4288
4877
|
|
|
4289
4878
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -4295,12 +4884,14 @@ var SDK_GLOBAL = 'Vimeo';
|
|
|
4295
4884
|
var MATCH_URL = /vimeo\.com\/.+/;
|
|
4296
4885
|
var MATCH_FILE_URL = /vimeo\.com\/external\/[0-9]+\..+/;
|
|
4297
4886
|
|
|
4298
|
-
var Vimeo =
|
|
4887
|
+
var Vimeo =
|
|
4888
|
+
/*#__PURE__*/
|
|
4889
|
+
function (_Component) {
|
|
4299
4890
|
_inherits(Vimeo, _Component);
|
|
4300
4891
|
|
|
4301
|
-
var _super = _createSuper(Vimeo);
|
|
4302
|
-
|
|
4303
4892
|
function Vimeo() {
|
|
4893
|
+
var _getPrototypeOf2;
|
|
4894
|
+
|
|
4304
4895
|
var _this;
|
|
4305
4896
|
|
|
4306
4897
|
_classCallCheck(this, Vimeo);
|
|
@@ -4309,7 +4900,7 @@ var Vimeo = /*#__PURE__*/function (_Component) {
|
|
|
4309
4900
|
args[_key] = arguments[_key];
|
|
4310
4901
|
}
|
|
4311
4902
|
|
|
4312
|
-
_this =
|
|
4903
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Vimeo)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
4313
4904
|
|
|
4314
4905
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
4315
4906
|
|
|
@@ -4466,7 +5057,7 @@ var Vimeo = /*#__PURE__*/function (_Component) {
|
|
|
4466
5057
|
overflow: 'hidden',
|
|
4467
5058
|
display: display
|
|
4468
5059
|
};
|
|
4469
|
-
return
|
|
5060
|
+
return _react["default"].createElement("div", {
|
|
4470
5061
|
key: this.props.url,
|
|
4471
5062
|
ref: this.ref,
|
|
4472
5063
|
style: style
|
|
@@ -4526,16 +5117,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
4526
5117
|
|
|
4527
5118
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
4528
5119
|
|
|
4529
|
-
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
4530
|
-
|
|
4531
5120
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
4532
5121
|
|
|
4533
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
4534
|
-
|
|
4535
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
4536
|
-
|
|
4537
5122
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
4538
5123
|
|
|
5124
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
5125
|
+
|
|
4539
5126
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
4540
5127
|
|
|
4541
5128
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -4548,12 +5135,14 @@ var SDK_GLOBAL_READY = 'fbAsyncInit';
|
|
|
4548
5135
|
var MATCH_URL = /^https?:\/\/(www\.)?facebook\.com.*\/(video(s)?|watch|story)(\.php?|\/).+$/;
|
|
4549
5136
|
var PLAYER_ID_PREFIX = 'facebook-player-';
|
|
4550
5137
|
|
|
4551
|
-
var Facebook =
|
|
5138
|
+
var Facebook =
|
|
5139
|
+
/*#__PURE__*/
|
|
5140
|
+
function (_Component) {
|
|
4552
5141
|
_inherits(Facebook, _Component);
|
|
4553
5142
|
|
|
4554
|
-
var _super = _createSuper(Facebook);
|
|
4555
|
-
|
|
4556
5143
|
function Facebook() {
|
|
5144
|
+
var _getPrototypeOf2;
|
|
5145
|
+
|
|
4557
5146
|
var _this;
|
|
4558
5147
|
|
|
4559
5148
|
_classCallCheck(this, Facebook);
|
|
@@ -4562,7 +5151,7 @@ var Facebook = /*#__PURE__*/function (_Component) {
|
|
|
4562
5151
|
args[_key] = arguments[_key];
|
|
4563
5152
|
}
|
|
4564
5153
|
|
|
4565
|
-
_this =
|
|
5154
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Facebook)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
4566
5155
|
|
|
4567
5156
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
4568
5157
|
|
|
@@ -4678,7 +5267,7 @@ var Facebook = /*#__PURE__*/function (_Component) {
|
|
|
4678
5267
|
width: '100%',
|
|
4679
5268
|
height: '100%'
|
|
4680
5269
|
};
|
|
4681
|
-
return
|
|
5270
|
+
return _react["default"].createElement("div", {
|
|
4682
5271
|
style: style,
|
|
4683
5272
|
id: this.playerID,
|
|
4684
5273
|
className: "fb-video",
|
|
@@ -4738,16 +5327,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
4738
5327
|
|
|
4739
5328
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
4740
5329
|
|
|
4741
|
-
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
4742
|
-
|
|
4743
5330
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
4744
5331
|
|
|
4745
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
4746
|
-
|
|
4747
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
4748
|
-
|
|
4749
5332
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
4750
5333
|
|
|
5334
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
5335
|
+
|
|
4751
5336
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
4752
5337
|
|
|
4753
5338
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -4758,12 +5343,14 @@ var SDK_URL = 'https://cdn.embed.ly/player-0.1.0.min.js';
|
|
|
4758
5343
|
var SDK_GLOBAL = 'playerjs';
|
|
4759
5344
|
var MATCH_URL = /streamable\.com\/([a-z0-9]+)$/;
|
|
4760
5345
|
|
|
4761
|
-
var Streamable =
|
|
5346
|
+
var Streamable =
|
|
5347
|
+
/*#__PURE__*/
|
|
5348
|
+
function (_Component) {
|
|
4762
5349
|
_inherits(Streamable, _Component);
|
|
4763
5350
|
|
|
4764
|
-
var _super = _createSuper(Streamable);
|
|
4765
|
-
|
|
4766
5351
|
function Streamable() {
|
|
5352
|
+
var _getPrototypeOf2;
|
|
5353
|
+
|
|
4767
5354
|
var _this;
|
|
4768
5355
|
|
|
4769
5356
|
_classCallCheck(this, Streamable);
|
|
@@ -4772,7 +5359,7 @@ var Streamable = /*#__PURE__*/function (_Component) {
|
|
|
4772
5359
|
args[_key] = arguments[_key];
|
|
4773
5360
|
}
|
|
4774
5361
|
|
|
4775
|
-
_this =
|
|
5362
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Streamable)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
4776
5363
|
|
|
4777
5364
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
4778
5365
|
|
|
@@ -4892,7 +5479,7 @@ var Streamable = /*#__PURE__*/function (_Component) {
|
|
|
4892
5479
|
width: '100%',
|
|
4893
5480
|
height: '100%'
|
|
4894
5481
|
};
|
|
4895
|
-
return
|
|
5482
|
+
return _react["default"].createElement("iframe", {
|
|
4896
5483
|
ref: this.ref,
|
|
4897
5484
|
src: "https://streamable.com/o/".concat(id),
|
|
4898
5485
|
frameBorder: "0",
|
|
@@ -4953,16 +5540,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
4953
5540
|
|
|
4954
5541
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
4955
5542
|
|
|
4956
|
-
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
4957
|
-
|
|
4958
5543
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
4959
5544
|
|
|
4960
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
4961
|
-
|
|
4962
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
4963
|
-
|
|
4964
5545
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
4965
5546
|
|
|
5547
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
5548
|
+
|
|
4966
5549
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
4967
5550
|
|
|
4968
5551
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -4973,48 +5556,26 @@ var SDK_URL = 'https://fast.wistia.com/assets/external/E-v1.js';
|
|
|
4973
5556
|
var SDK_GLOBAL = 'Wistia';
|
|
4974
5557
|
var MATCH_URL = /(?:wistia\.com|wi\.st)\/(?:medias|embed)\/(.*)$/;
|
|
4975
5558
|
|
|
4976
|
-
var Wistia =
|
|
5559
|
+
var Wistia =
|
|
5560
|
+
/*#__PURE__*/
|
|
5561
|
+
function (_Component) {
|
|
4977
5562
|
_inherits(Wistia, _Component);
|
|
4978
5563
|
|
|
4979
|
-
var _super = _createSuper(Wistia);
|
|
4980
|
-
|
|
4981
5564
|
function Wistia() {
|
|
5565
|
+
var _getPrototypeOf2;
|
|
5566
|
+
|
|
4982
5567
|
var _this;
|
|
4983
5568
|
|
|
4984
5569
|
_classCallCheck(this, Wistia);
|
|
4985
5570
|
|
|
4986
|
-
for (var _len = arguments.length,
|
|
4987
|
-
|
|
5571
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
5572
|
+
args[_key] = arguments[_key];
|
|
4988
5573
|
}
|
|
4989
5574
|
|
|
4990
|
-
_this =
|
|
5575
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Wistia)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
4991
5576
|
|
|
4992
5577
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
4993
5578
|
|
|
4994
|
-
_defineProperty(_assertThisInitialized(_this), "onPlay", function () {
|
|
4995
|
-
var _this$props;
|
|
4996
|
-
|
|
4997
|
-
return (_this$props = _this.props).onPlay.apply(_this$props, arguments);
|
|
4998
|
-
});
|
|
4999
|
-
|
|
5000
|
-
_defineProperty(_assertThisInitialized(_this), "onPause", function () {
|
|
5001
|
-
var _this$props2;
|
|
5002
|
-
|
|
5003
|
-
return (_this$props2 = _this.props).onPause.apply(_this$props2, arguments);
|
|
5004
|
-
});
|
|
5005
|
-
|
|
5006
|
-
_defineProperty(_assertThisInitialized(_this), "onSeek", function () {
|
|
5007
|
-
var _this$props3;
|
|
5008
|
-
|
|
5009
|
-
return (_this$props3 = _this.props).onSeek.apply(_this$props3, arguments);
|
|
5010
|
-
});
|
|
5011
|
-
|
|
5012
|
-
_defineProperty(_assertThisInitialized(_this), "onEnded", function () {
|
|
5013
|
-
var _this$props4;
|
|
5014
|
-
|
|
5015
|
-
return (_this$props4 = _this.props).onEnded.apply(_this$props4, arguments);
|
|
5016
|
-
});
|
|
5017
|
-
|
|
5018
5579
|
_defineProperty(_assertThisInitialized(_this), "mute", function () {
|
|
5019
5580
|
_this.callPlayer('mute');
|
|
5020
5581
|
});
|
|
@@ -5036,13 +5597,17 @@ var Wistia = /*#__PURE__*/function (_Component) {
|
|
|
5036
5597
|
value: function load(url) {
|
|
5037
5598
|
var _this2 = this;
|
|
5038
5599
|
|
|
5039
|
-
var _this$
|
|
5040
|
-
playing = _this$
|
|
5041
|
-
muted = _this$
|
|
5042
|
-
controls = _this$
|
|
5043
|
-
_onReady = _this$
|
|
5044
|
-
|
|
5045
|
-
|
|
5600
|
+
var _this$props = this.props,
|
|
5601
|
+
playing = _this$props.playing,
|
|
5602
|
+
muted = _this$props.muted,
|
|
5603
|
+
controls = _this$props.controls,
|
|
5604
|
+
_onReady = _this$props.onReady,
|
|
5605
|
+
onPlay = _this$props.onPlay,
|
|
5606
|
+
onPause = _this$props.onPause,
|
|
5607
|
+
onSeek = _this$props.onSeek,
|
|
5608
|
+
onEnded = _this$props.onEnded,
|
|
5609
|
+
config = _this$props.config,
|
|
5610
|
+
onError = _this$props.onError;
|
|
5046
5611
|
(0, utils.getSDK)(SDK_URL, SDK_GLOBAL).then(function () {
|
|
5047
5612
|
window._wq = window._wq || [];
|
|
5048
5613
|
|
|
@@ -5059,28 +5624,19 @@ var Wistia = /*#__PURE__*/function (_Component) {
|
|
|
5059
5624
|
|
|
5060
5625
|
_this2.unbind();
|
|
5061
5626
|
|
|
5062
|
-
_this2.player.bind('play',
|
|
5627
|
+
_this2.player.bind('play', onPlay);
|
|
5063
5628
|
|
|
5064
|
-
_this2.player.bind('pause',
|
|
5629
|
+
_this2.player.bind('pause', onPause);
|
|
5065
5630
|
|
|
5066
|
-
_this2.player.bind('seek',
|
|
5631
|
+
_this2.player.bind('seek', onSeek);
|
|
5067
5632
|
|
|
5068
|
-
_this2.player.bind('end',
|
|
5633
|
+
_this2.player.bind('end', onEnded);
|
|
5069
5634
|
|
|
5070
5635
|
_onReady();
|
|
5071
5636
|
}
|
|
5072
5637
|
});
|
|
5073
5638
|
}, onError);
|
|
5074
5639
|
}
|
|
5075
|
-
}, {
|
|
5076
|
-
key: "unbind",
|
|
5077
|
-
value: function unbind() {
|
|
5078
|
-
this.player.unbind('play', this.onPlay);
|
|
5079
|
-
this.player.unbind('pause', this.onPause);
|
|
5080
|
-
this.player.unbind('seek', this.onSeek);
|
|
5081
|
-
this.player.unbind('end', this.onEnded);
|
|
5082
|
-
} // Proxy methods to prevent listener leaks
|
|
5083
|
-
|
|
5084
5640
|
}, {
|
|
5085
5641
|
key: "play",
|
|
5086
5642
|
value: function play() {
|
|
@@ -5091,6 +5647,19 @@ var Wistia = /*#__PURE__*/function (_Component) {
|
|
|
5091
5647
|
value: function pause() {
|
|
5092
5648
|
this.callPlayer('pause');
|
|
5093
5649
|
}
|
|
5650
|
+
}, {
|
|
5651
|
+
key: "unbind",
|
|
5652
|
+
value: function unbind() {
|
|
5653
|
+
var _this$props2 = this.props,
|
|
5654
|
+
onPlay = _this$props2.onPlay,
|
|
5655
|
+
onPause = _this$props2.onPause,
|
|
5656
|
+
onSeek = _this$props2.onSeek,
|
|
5657
|
+
onEnded = _this$props2.onEnded;
|
|
5658
|
+
this.player.unbind('play', onPlay);
|
|
5659
|
+
this.player.unbind('pause', onPause);
|
|
5660
|
+
this.player.unbind('seek', onSeek);
|
|
5661
|
+
this.player.unbind('end', onEnded);
|
|
5662
|
+
}
|
|
5094
5663
|
}, {
|
|
5095
5664
|
key: "stop",
|
|
5096
5665
|
value: function stop() {
|
|
@@ -5136,7 +5705,7 @@ var Wistia = /*#__PURE__*/function (_Component) {
|
|
|
5136
5705
|
width: '100%',
|
|
5137
5706
|
height: '100%'
|
|
5138
5707
|
};
|
|
5139
|
-
return
|
|
5708
|
+
return _react["default"].createElement("div", {
|
|
5140
5709
|
key: id,
|
|
5141
5710
|
className: className,
|
|
5142
5711
|
style: style
|
|
@@ -5196,16 +5765,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
5196
5765
|
|
|
5197
5766
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
5198
5767
|
|
|
5199
|
-
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
5200
|
-
|
|
5201
5768
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
5202
5769
|
|
|
5203
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
5204
|
-
|
|
5205
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
5206
|
-
|
|
5207
5770
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
5208
5771
|
|
|
5772
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
5773
|
+
|
|
5209
5774
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
5210
5775
|
|
|
5211
5776
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -5218,12 +5783,14 @@ var MATCH_VIDEO_URL = /(?:www\.|go\.)?twitch\.tv\/videos\/(\d+)($|\?)/;
|
|
|
5218
5783
|
var MATCH_CHANNEL_URL = /(?:www\.|go\.)?twitch\.tv\/([a-z0-9_]+)($|\?)/;
|
|
5219
5784
|
var PLAYER_ID_PREFIX = 'twitch-player-';
|
|
5220
5785
|
|
|
5221
|
-
var Twitch =
|
|
5786
|
+
var Twitch =
|
|
5787
|
+
/*#__PURE__*/
|
|
5788
|
+
function (_Component) {
|
|
5222
5789
|
_inherits(Twitch, _Component);
|
|
5223
5790
|
|
|
5224
|
-
var _super = _createSuper(Twitch);
|
|
5225
|
-
|
|
5226
5791
|
function Twitch() {
|
|
5792
|
+
var _getPrototypeOf2;
|
|
5793
|
+
|
|
5227
5794
|
var _this;
|
|
5228
5795
|
|
|
5229
5796
|
_classCallCheck(this, Twitch);
|
|
@@ -5232,7 +5799,7 @@ var Twitch = /*#__PURE__*/function (_Component) {
|
|
|
5232
5799
|
args[_key] = arguments[_key];
|
|
5233
5800
|
}
|
|
5234
5801
|
|
|
5235
|
-
_this =
|
|
5802
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Twitch)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
5236
5803
|
|
|
5237
5804
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
5238
5805
|
|
|
@@ -5353,7 +5920,7 @@ var Twitch = /*#__PURE__*/function (_Component) {
|
|
|
5353
5920
|
width: '100%',
|
|
5354
5921
|
height: '100%'
|
|
5355
5922
|
};
|
|
5356
|
-
return
|
|
5923
|
+
return _react["default"].createElement("div", {
|
|
5357
5924
|
style: style,
|
|
5358
5925
|
id: this.playerID
|
|
5359
5926
|
});
|
|
@@ -5406,15 +5973,11 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
5406
5973
|
|
|
5407
5974
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
5408
5975
|
|
|
5409
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) ||
|
|
5410
|
-
|
|
5411
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
5412
|
-
|
|
5413
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
5976
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
|
|
5414
5977
|
|
|
5415
|
-
function
|
|
5978
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
|
|
5416
5979
|
|
|
5417
|
-
function _iterableToArrayLimit(arr, i) { if (
|
|
5980
|
+
function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
5418
5981
|
|
|
5419
5982
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
5420
5983
|
|
|
@@ -5424,16 +5987,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
5424
5987
|
|
|
5425
5988
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
5426
5989
|
|
|
5427
|
-
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
5428
|
-
|
|
5429
5990
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
5430
5991
|
|
|
5431
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
5432
|
-
|
|
5433
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
5434
|
-
|
|
5435
5992
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
5436
5993
|
|
|
5994
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
5995
|
+
|
|
5437
5996
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
5438
5997
|
|
|
5439
5998
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -5445,12 +6004,14 @@ var SDK_GLOBAL = 'DM';
|
|
|
5445
6004
|
var SDK_GLOBAL_READY = 'dmAsyncInit';
|
|
5446
6005
|
var MATCH_URL = /^(?:(?:https?):)?(?:\/\/)?(?:www\.)?(?:(?:dailymotion\.com(?:\/embed)?\/video)|dai\.ly)\/([a-zA-Z0-9]+)(?:_[\w_-]+)?$/;
|
|
5447
6006
|
|
|
5448
|
-
var DailyMotion =
|
|
6007
|
+
var DailyMotion =
|
|
6008
|
+
/*#__PURE__*/
|
|
6009
|
+
function (_Component) {
|
|
5449
6010
|
_inherits(DailyMotion, _Component);
|
|
5450
6011
|
|
|
5451
|
-
var _super = _createSuper(DailyMotion);
|
|
5452
|
-
|
|
5453
6012
|
function DailyMotion() {
|
|
6013
|
+
var _getPrototypeOf2;
|
|
6014
|
+
|
|
5454
6015
|
var _this;
|
|
5455
6016
|
|
|
5456
6017
|
_classCallCheck(this, DailyMotion);
|
|
@@ -5459,7 +6020,7 @@ var DailyMotion = /*#__PURE__*/function (_Component) {
|
|
|
5459
6020
|
args[_key] = arguments[_key];
|
|
5460
6021
|
}
|
|
5461
6022
|
|
|
5462
|
-
_this =
|
|
6023
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(DailyMotion)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
5463
6024
|
|
|
5464
6025
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
5465
6026
|
|
|
@@ -5588,9 +6149,9 @@ var DailyMotion = /*#__PURE__*/function (_Component) {
|
|
|
5588
6149
|
height: '100%',
|
|
5589
6150
|
display: display
|
|
5590
6151
|
};
|
|
5591
|
-
return
|
|
6152
|
+
return _react["default"].createElement("div", {
|
|
5592
6153
|
style: style
|
|
5593
|
-
},
|
|
6154
|
+
}, _react["default"].createElement("div", {
|
|
5594
6155
|
ref: this.ref
|
|
5595
6156
|
}));
|
|
5596
6157
|
}
|
|
@@ -5648,16 +6209,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
5648
6209
|
|
|
5649
6210
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
5650
6211
|
|
|
5651
|
-
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
5652
|
-
|
|
5653
6212
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
5654
6213
|
|
|
5655
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
5656
|
-
|
|
5657
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
5658
|
-
|
|
5659
6214
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
5660
6215
|
|
|
6216
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
6217
|
+
|
|
5661
6218
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
5662
6219
|
|
|
5663
6220
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -5668,12 +6225,14 @@ var SDK_URL = 'https://widget.mixcloud.com/media/js/widgetApi.js';
|
|
|
5668
6225
|
var SDK_GLOBAL = 'Mixcloud';
|
|
5669
6226
|
var MATCH_URL = /mixcloud\.com\/([^/]+\/[^/]+)/;
|
|
5670
6227
|
|
|
5671
|
-
var Mixcloud =
|
|
6228
|
+
var Mixcloud =
|
|
6229
|
+
/*#__PURE__*/
|
|
6230
|
+
function (_Component) {
|
|
5672
6231
|
_inherits(Mixcloud, _Component);
|
|
5673
6232
|
|
|
5674
|
-
var _super = _createSuper(Mixcloud);
|
|
5675
|
-
|
|
5676
6233
|
function Mixcloud() {
|
|
6234
|
+
var _getPrototypeOf2;
|
|
6235
|
+
|
|
5677
6236
|
var _this;
|
|
5678
6237
|
|
|
5679
6238
|
_classCallCheck(this, Mixcloud);
|
|
@@ -5682,7 +6241,7 @@ var Mixcloud = /*#__PURE__*/function (_Component) {
|
|
|
5682
6241
|
args[_key] = arguments[_key];
|
|
5683
6242
|
}
|
|
5684
6243
|
|
|
5685
|
-
_this =
|
|
6244
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Mixcloud)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
5686
6245
|
|
|
5687
6246
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
5688
6247
|
|
|
@@ -5785,7 +6344,7 @@ var Mixcloud = /*#__PURE__*/function (_Component) {
|
|
|
5785
6344
|
})); // We have to give the iframe a key here to prevent a
|
|
5786
6345
|
// weird dialog appearing when loading a new track
|
|
5787
6346
|
|
|
5788
|
-
return
|
|
6347
|
+
return _react["default"].createElement("iframe", {
|
|
5789
6348
|
key: id,
|
|
5790
6349
|
ref: this.ref,
|
|
5791
6350
|
style: style,
|
|
@@ -5845,33 +6404,23 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
5845
6404
|
|
|
5846
6405
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
5847
6406
|
|
|
5848
|
-
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
5849
|
-
|
|
5850
6407
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
5851
6408
|
|
|
5852
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
5853
|
-
|
|
5854
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
5855
|
-
|
|
5856
6409
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
5857
6410
|
|
|
6411
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
6412
|
+
|
|
5858
6413
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
5859
6414
|
|
|
5860
6415
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
5861
6416
|
|
|
5862
6417
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5863
6418
|
|
|
5864
|
-
function _createForOfIteratorHelper(o) { if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) { var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var it, normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
5865
|
-
|
|
5866
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
5867
|
-
|
|
5868
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
5869
|
-
|
|
5870
6419
|
var IOS = typeof navigator !== 'undefined' && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
|
|
5871
6420
|
var AUDIO_EXTENSIONS = /\.(m4a|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i;
|
|
5872
6421
|
var VIDEO_EXTENSIONS = /\.(mp4|og[gv]|webm|mov|m4v)($|\?)/i;
|
|
5873
6422
|
var HLS_EXTENSIONS = /\.(m3u8)($|\?)/i;
|
|
5874
|
-
var HLS_SDK_URL = 'https://cdn.jsdelivr.net/npm/hls.js@VERSION
|
|
6423
|
+
var HLS_SDK_URL = 'https://cdn.jsdelivr.net/npm/hls.js@VERSION';
|
|
5875
6424
|
var HLS_GLOBAL = 'Hls';
|
|
5876
6425
|
var DASH_EXTENSIONS = /\.(mpd)($|\?)/i;
|
|
5877
6426
|
var DASH_SDK_URL = 'https://cdnjs.cloudflare.com/ajax/libs/dashjs/VERSION/dash.all.min.js';
|
|
@@ -5880,11 +6429,12 @@ var MATCH_DROPBOX_URL = /www\.dropbox\.com\/.+/;
|
|
|
5880
6429
|
|
|
5881
6430
|
function canPlay(url) {
|
|
5882
6431
|
if (url instanceof Array) {
|
|
5883
|
-
var
|
|
5884
|
-
|
|
6432
|
+
var _iteratorNormalCompletion = true;
|
|
6433
|
+
var _didIteratorError = false;
|
|
6434
|
+
var _iteratorError = undefined;
|
|
5885
6435
|
|
|
5886
6436
|
try {
|
|
5887
|
-
for (_iterator.
|
|
6437
|
+
for (var _iterator = url[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
5888
6438
|
var item = _step.value;
|
|
5889
6439
|
|
|
5890
6440
|
if (typeof item === 'string' && canPlay(item)) {
|
|
@@ -5896,9 +6446,18 @@ function canPlay(url) {
|
|
|
5896
6446
|
}
|
|
5897
6447
|
}
|
|
5898
6448
|
} catch (err) {
|
|
5899
|
-
|
|
6449
|
+
_didIteratorError = true;
|
|
6450
|
+
_iteratorError = err;
|
|
5900
6451
|
} finally {
|
|
5901
|
-
|
|
6452
|
+
try {
|
|
6453
|
+
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
|
|
6454
|
+
_iterator["return"]();
|
|
6455
|
+
}
|
|
6456
|
+
} finally {
|
|
6457
|
+
if (_didIteratorError) {
|
|
6458
|
+
throw _iteratorError;
|
|
6459
|
+
}
|
|
6460
|
+
}
|
|
5902
6461
|
}
|
|
5903
6462
|
|
|
5904
6463
|
return false;
|
|
@@ -5922,12 +6481,14 @@ function canEnablePIP(url) {
|
|
|
5922
6481
|
return canPlay(url) && (!!document.pictureInPictureEnabled || supportsWebKitPresentationMode()) && !AUDIO_EXTENSIONS.test(url);
|
|
5923
6482
|
}
|
|
5924
6483
|
|
|
5925
|
-
var FilePlayer =
|
|
6484
|
+
var FilePlayer =
|
|
6485
|
+
/*#__PURE__*/
|
|
6486
|
+
function (_Component) {
|
|
5926
6487
|
_inherits(FilePlayer, _Component);
|
|
5927
6488
|
|
|
5928
|
-
var _super = _createSuper(FilePlayer);
|
|
5929
|
-
|
|
5930
6489
|
function FilePlayer() {
|
|
6490
|
+
var _getPrototypeOf2;
|
|
6491
|
+
|
|
5931
6492
|
var _this;
|
|
5932
6493
|
|
|
5933
6494
|
_classCallCheck(this, FilePlayer);
|
|
@@ -5936,7 +6497,7 @@ var FilePlayer = /*#__PURE__*/function (_Component) {
|
|
|
5936
6497
|
_args[_key] = arguments[_key];
|
|
5937
6498
|
}
|
|
5938
6499
|
|
|
5939
|
-
_this =
|
|
6500
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(FilePlayer)).call.apply(_getPrototypeOf2, [this].concat(_args)));
|
|
5940
6501
|
|
|
5941
6502
|
_defineProperty(_assertThisInitialized(_this), "onReady", function () {
|
|
5942
6503
|
var _this$props;
|
|
@@ -6023,19 +6584,19 @@ var FilePlayer = /*#__PURE__*/function (_Component) {
|
|
|
6023
6584
|
|
|
6024
6585
|
_defineProperty(_assertThisInitialized(_this), "renderSourceElement", function (source, index) {
|
|
6025
6586
|
if (typeof source === 'string') {
|
|
6026
|
-
return
|
|
6587
|
+
return _react["default"].createElement("source", {
|
|
6027
6588
|
key: index,
|
|
6028
6589
|
src: source
|
|
6029
6590
|
});
|
|
6030
6591
|
}
|
|
6031
6592
|
|
|
6032
|
-
return
|
|
6593
|
+
return _react["default"].createElement("source", _extends({
|
|
6033
6594
|
key: index
|
|
6034
6595
|
}, source));
|
|
6035
6596
|
});
|
|
6036
6597
|
|
|
6037
6598
|
_defineProperty(_assertThisInitialized(_this), "renderTrack", function (track, index) {
|
|
6038
|
-
return
|
|
6599
|
+
return _react["default"].createElement("track", _extends({
|
|
6039
6600
|
key: index
|
|
6040
6601
|
}, track));
|
|
6041
6602
|
});
|
|
@@ -6073,10 +6634,6 @@ var FilePlayer = /*#__PURE__*/function (_Component) {
|
|
|
6073
6634
|
key: "componentWillUnmount",
|
|
6074
6635
|
value: function componentWillUnmount() {
|
|
6075
6636
|
this.removeListeners(this.player);
|
|
6076
|
-
|
|
6077
|
-
if (this.hls) {
|
|
6078
|
-
this.hls.destroy();
|
|
6079
|
-
}
|
|
6080
6637
|
}
|
|
6081
6638
|
}, {
|
|
6082
6639
|
key: "addListeners",
|
|
@@ -6207,6 +6764,10 @@ var FilePlayer = /*#__PURE__*/function (_Component) {
|
|
|
6207
6764
|
value: function stop() {
|
|
6208
6765
|
this.player.removeAttribute('src');
|
|
6209
6766
|
|
|
6767
|
+
if (this.hls) {
|
|
6768
|
+
this.hls.destroy();
|
|
6769
|
+
}
|
|
6770
|
+
|
|
6210
6771
|
if (this.dash) {
|
|
6211
6772
|
this.dash.reset();
|
|
6212
6773
|
}
|
|
@@ -6318,7 +6879,7 @@ var FilePlayer = /*#__PURE__*/function (_Component) {
|
|
|
6318
6879
|
width: width === 'auto' ? width : '100%',
|
|
6319
6880
|
height: height === 'auto' ? height : '100%'
|
|
6320
6881
|
};
|
|
6321
|
-
return
|
|
6882
|
+
return _react["default"].createElement(Element, _extends({
|
|
6322
6883
|
ref: this.ref,
|
|
6323
6884
|
src: this.getSource(url),
|
|
6324
6885
|
style: style,
|
|
@@ -6408,16 +6969,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
6408
6969
|
|
|
6409
6970
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
6410
6971
|
|
|
6411
|
-
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
6412
|
-
|
|
6413
6972
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
6414
6973
|
|
|
6415
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
6416
|
-
|
|
6417
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
6418
|
-
|
|
6419
6974
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
6420
6975
|
|
|
6976
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
6977
|
+
|
|
6421
6978
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
6422
6979
|
|
|
6423
6980
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -6426,12 +6983,14 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
6426
6983
|
|
|
6427
6984
|
var ICON_SIZE = '64px';
|
|
6428
6985
|
|
|
6429
|
-
var Preview =
|
|
6986
|
+
var Preview =
|
|
6987
|
+
/*#__PURE__*/
|
|
6988
|
+
function (_Component) {
|
|
6430
6989
|
_inherits(Preview, _Component);
|
|
6431
6990
|
|
|
6432
|
-
var _super = _createSuper(Preview);
|
|
6433
|
-
|
|
6434
6991
|
function Preview() {
|
|
6992
|
+
var _getPrototypeOf2;
|
|
6993
|
+
|
|
6435
6994
|
var _this;
|
|
6436
6995
|
|
|
6437
6996
|
_classCallCheck(this, Preview);
|
|
@@ -6440,7 +6999,7 @@ var Preview = /*#__PURE__*/function (_Component) {
|
|
|
6440
6999
|
args[_key] = arguments[_key];
|
|
6441
7000
|
}
|
|
6442
7001
|
|
|
6443
|
-
_this =
|
|
7002
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Preview)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
6444
7003
|
|
|
6445
7004
|
_defineProperty(_assertThisInitialized(_this), "mounted", false);
|
|
6446
7005
|
|
|
@@ -6538,15 +7097,15 @@ var Preview = /*#__PURE__*/function (_Component) {
|
|
|
6538
7097
|
}
|
|
6539
7098
|
};
|
|
6540
7099
|
|
|
6541
|
-
var defaultPlayIcon =
|
|
7100
|
+
var defaultPlayIcon = _react["default"].createElement("div", {
|
|
6542
7101
|
style: styles.shadow,
|
|
6543
7102
|
className: "react-player__shadow"
|
|
6544
|
-
},
|
|
7103
|
+
}, _react["default"].createElement("div", {
|
|
6545
7104
|
style: styles.playIcon,
|
|
6546
7105
|
className: "react-player__play-icon"
|
|
6547
7106
|
}));
|
|
6548
7107
|
|
|
6549
|
-
return
|
|
7108
|
+
return _react["default"].createElement("div", {
|
|
6550
7109
|
style: styles.preview,
|
|
6551
7110
|
className: "react-player__preview",
|
|
6552
7111
|
onClick: onClick
|
|
@@ -6583,12 +7142,6 @@ var _Player = _interopRequireDefault(Player_1);
|
|
|
6583
7142
|
|
|
6584
7143
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
6585
7144
|
|
|
6586
|
-
function _createForOfIteratorHelper(o) { if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) { var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var it, normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
6587
|
-
|
|
6588
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
6589
|
-
|
|
6590
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
6591
|
-
|
|
6592
7145
|
var PRELOAD_PLAYERS = [{
|
|
6593
7146
|
Player: YouTube_1.YouTube,
|
|
6594
7147
|
configKey: 'youtube',
|
|
@@ -6609,16 +7162,16 @@ var PRELOAD_PLAYERS = [{
|
|
|
6609
7162
|
|
|
6610
7163
|
function renderPreloadPlayers(url, controls, config) {
|
|
6611
7164
|
var players = [];
|
|
6612
|
-
|
|
6613
|
-
var
|
|
6614
|
-
|
|
7165
|
+
var _iteratorNormalCompletion = true;
|
|
7166
|
+
var _didIteratorError = false;
|
|
7167
|
+
var _iteratorError = undefined;
|
|
6615
7168
|
|
|
6616
7169
|
try {
|
|
6617
|
-
for (_iterator.
|
|
7170
|
+
for (var _iterator = PRELOAD_PLAYERS[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
6618
7171
|
var player = _step.value;
|
|
6619
7172
|
|
|
6620
7173
|
if (!player.Player.canPlay(url) && config[player.configKey].preload) {
|
|
6621
|
-
players.push(
|
|
7174
|
+
players.push(_react["default"].createElement(_Player["default"], {
|
|
6622
7175
|
key: player.Player.displayName,
|
|
6623
7176
|
activePlayer: player.Player,
|
|
6624
7177
|
url: player.url,
|
|
@@ -6630,9 +7183,18 @@ function renderPreloadPlayers(url, controls, config) {
|
|
|
6630
7183
|
}
|
|
6631
7184
|
}
|
|
6632
7185
|
} catch (err) {
|
|
6633
|
-
|
|
7186
|
+
_didIteratorError = true;
|
|
7187
|
+
_iteratorError = err;
|
|
6634
7188
|
} finally {
|
|
6635
|
-
|
|
7189
|
+
try {
|
|
7190
|
+
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
|
|
7191
|
+
_iterator["return"]();
|
|
7192
|
+
}
|
|
7193
|
+
} finally {
|
|
7194
|
+
if (_didIteratorError) {
|
|
7195
|
+
throw _iteratorError;
|
|
7196
|
+
}
|
|
7197
|
+
}
|
|
6636
7198
|
}
|
|
6637
7199
|
|
|
6638
7200
|
return players;
|
|
@@ -6756,17 +7318,13 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
6756
7318
|
|
|
6757
7319
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
6758
7320
|
|
|
6759
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) ||
|
|
6760
|
-
|
|
6761
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
7321
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
|
|
6762
7322
|
|
|
6763
|
-
function
|
|
7323
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
|
|
6764
7324
|
|
|
6765
|
-
function _iterableToArray(iter) { if (
|
|
7325
|
+
function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
|
|
6766
7326
|
|
|
6767
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr))
|
|
6768
|
-
|
|
6769
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
7327
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }
|
|
6770
7328
|
|
|
6771
7329
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
6772
7330
|
|
|
@@ -6774,16 +7332,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
6774
7332
|
|
|
6775
7333
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
6776
7334
|
|
|
6777
|
-
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
6778
|
-
|
|
6779
7335
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
6780
7336
|
|
|
6781
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
6782
|
-
|
|
6783
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
6784
|
-
|
|
6785
7337
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
6786
7338
|
|
|
7339
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
7340
|
+
|
|
6787
7341
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
6788
7342
|
|
|
6789
7343
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -6793,12 +7347,14 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
6793
7347
|
var SUPPORTED_PROPS = Object.keys(props.propTypes);
|
|
6794
7348
|
var customPlayers = [];
|
|
6795
7349
|
|
|
6796
|
-
var ReactPlayer =
|
|
7350
|
+
var ReactPlayer =
|
|
7351
|
+
/*#__PURE__*/
|
|
7352
|
+
function (_Component) {
|
|
6797
7353
|
_inherits(ReactPlayer, _Component);
|
|
6798
7354
|
|
|
6799
|
-
var _super = _createSuper(ReactPlayer);
|
|
6800
|
-
|
|
6801
7355
|
function ReactPlayer() {
|
|
7356
|
+
var _getPrototypeOf2;
|
|
7357
|
+
|
|
6802
7358
|
var _this;
|
|
6803
7359
|
|
|
6804
7360
|
_classCallCheck(this, ReactPlayer);
|
|
@@ -6807,7 +7363,7 @@ var ReactPlayer = /*#__PURE__*/function (_Component) {
|
|
|
6807
7363
|
args[_key] = arguments[_key];
|
|
6808
7364
|
}
|
|
6809
7365
|
|
|
6810
|
-
_this =
|
|
7366
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(ReactPlayer)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
6811
7367
|
|
|
6812
7368
|
_defineProperty(_assertThisInitialized(_this), "config", (0, utils.getConfig)(_this.props, props.defaultProps, true));
|
|
6813
7369
|
|
|
@@ -6918,7 +7474,7 @@ var ReactPlayer = /*#__PURE__*/function (_Component) {
|
|
|
6918
7474
|
key: "renderActivePlayer",
|
|
6919
7475
|
value: function renderActivePlayer(url, activePlayer) {
|
|
6920
7476
|
if (!url) return null;
|
|
6921
|
-
return
|
|
7477
|
+
return _react["default"].createElement(_Player4["default"], _extends({}, this.props, {
|
|
6922
7478
|
key: activePlayer.displayName,
|
|
6923
7479
|
ref: this.activePlayerRef,
|
|
6924
7480
|
config: this.config,
|
|
@@ -6955,14 +7511,14 @@ var ReactPlayer = /*#__PURE__*/function (_Component) {
|
|
|
6955
7511
|
var preloadPlayers = (0, _preload["default"])(url, controls, this.config);
|
|
6956
7512
|
var players = [renderedActivePlayer].concat(_toConsumableArray(preloadPlayers)).sort(this.sortPlayers);
|
|
6957
7513
|
|
|
6958
|
-
var preview =
|
|
7514
|
+
var preview = _react["default"].createElement(_Preview["default"], {
|
|
6959
7515
|
url: url,
|
|
6960
7516
|
light: light,
|
|
6961
7517
|
playIcon: playIcon,
|
|
6962
7518
|
onClick: this.handleClickPreview
|
|
6963
7519
|
});
|
|
6964
7520
|
|
|
6965
|
-
return
|
|
7521
|
+
return _react["default"].createElement(Wrapper, _extends({
|
|
6966
7522
|
ref: this.wrapperRef,
|
|
6967
7523
|
style: _objectSpread({}, style, {
|
|
6968
7524
|
width: width,
|
|
@@ -7284,8 +7840,8 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
|
|
|
7284
7840
|
var duration = player.getDuration();
|
|
7285
7841
|
var queue = Math.floor(duration / 10);
|
|
7286
7842
|
var segment = Math.floor(current / queue);
|
|
7287
|
-
Beam.report_beam_video('Ready', main.
|
|
7288
|
-
Segment.report_video_event('Video Ready', main.
|
|
7843
|
+
Beam.report_beam_video('Ready', main.main_16, duration, current, segment);
|
|
7844
|
+
Segment.report_video_event('Video Ready', main.main_16, duration, current, segment);
|
|
7289
7845
|
//autoplay
|
|
7290
7846
|
|
|
7291
7847
|
//Small pause before starting next video
|
|
@@ -7305,8 +7861,8 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
|
|
|
7305
7861
|
var queue = Math.floor(duration / 10);
|
|
7306
7862
|
var segment = Math.floor(current / queue);
|
|
7307
7863
|
|
|
7308
|
-
Beam.report_beam_video('End', main.
|
|
7309
|
-
Segment.report_video_event('Video End', main.
|
|
7864
|
+
Beam.report_beam_video('End', main.main_16, duration, current, segment);
|
|
7865
|
+
Segment.report_video_event('Video End', main.main_16, duration, current, segment);
|
|
7310
7866
|
setEndReported(true);
|
|
7311
7867
|
clearInterval(intervalID);
|
|
7312
7868
|
}
|
|
@@ -7356,8 +7912,8 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
|
|
|
7356
7912
|
var queue = Math.floor(duration / 10);
|
|
7357
7913
|
var segment = Math.floor(current / queue);
|
|
7358
7914
|
if (!queueProgress.includes(segment)) {
|
|
7359
|
-
Beam.report_beam_video('Segment', main.
|
|
7360
|
-
Segment.report_video_event('Video Segment', main.
|
|
7915
|
+
Beam.report_beam_video('Segment', main.main_16, duration, current, segment);
|
|
7916
|
+
Segment.report_video_event('Video Segment', main.main_16, duration, current, segment);
|
|
7361
7917
|
queueProgress.push(segment);
|
|
7362
7918
|
}
|
|
7363
7919
|
};
|
|
@@ -7370,8 +7926,8 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
|
|
|
7370
7926
|
var queue = Math.floor(duration / 10);
|
|
7371
7927
|
var segment = Math.floor(current / queue);
|
|
7372
7928
|
|
|
7373
|
-
Beam.report_beam_video('Play', main.
|
|
7374
|
-
Segment.report_video_event('Video Play', main.
|
|
7929
|
+
Beam.report_beam_video('Play', main.main_16, duration, current, segment);
|
|
7930
|
+
Segment.report_video_event('Video Play', main.main_16, duration, current, segment);
|
|
7375
7931
|
|
|
7376
7932
|
if (!playReported) {
|
|
7377
7933
|
setPlayReported(true);
|
|
@@ -7389,8 +7945,8 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
|
|
|
7389
7945
|
var queue = Math.floor(duration / 10);
|
|
7390
7946
|
var segment = Math.floor(current / queue);
|
|
7391
7947
|
|
|
7392
|
-
Beam.report_beam_video('Pause', main.
|
|
7393
|
-
Segment.report_video_event('Video Pause', main.
|
|
7948
|
+
Beam.report_beam_video('Pause', main.main_16, duration, current, segment);
|
|
7949
|
+
Segment.report_video_event('Video Pause', main.main_16, duration, current, segment);
|
|
7394
7950
|
};
|
|
7395
7951
|
|
|
7396
7952
|
// Youtube Options
|
|
@@ -7508,7 +8064,7 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
|
|
|
7508
8064
|
React__default.createElement(
|
|
7509
8065
|
'div',
|
|
7510
8066
|
{ className: 'vid-text' },
|
|
7511
|
-
Videos[series - 1] && Videos[series - 1].text && React__default.createElement(BlockContent.BlockContent, _extends._extends({ serializers: getSerializers, blocks: Videos[series - 1].text, imageOptions: { w: 320, h: 240, fit: 'max' } }, client.config()))
|
|
8067
|
+
Videos[series - 1] && Videos[series - 1].text && React__default.createElement(BlockContent.BlockContent, _extends$1._extends({ serializers: getSerializers, blocks: Videos[series - 1].text, imageOptions: { w: 320, h: 240, fit: 'max' } }, client.config()))
|
|
7512
8068
|
),
|
|
7513
8069
|
React__default.createElement(
|
|
7514
8070
|
'style',
|
|
@@ -7826,7 +8382,7 @@ var Poll$1 = function Poll(_ref) {
|
|
|
7826
8382
|
);
|
|
7827
8383
|
};
|
|
7828
8384
|
|
|
7829
|
-
var numberOfPaginations = main.
|
|
8385
|
+
var numberOfPaginations = main.main_35 ? 4 : 10;
|
|
7830
8386
|
|
|
7831
8387
|
var Quiz = function Quiz(_ref) {
|
|
7832
8388
|
var quizzes = _ref.quizzes,
|
|
@@ -7946,7 +8502,7 @@ var Quiz = function Quiz(_ref) {
|
|
|
7946
8502
|
var renderPagination = function renderPagination() {
|
|
7947
8503
|
return React__default.createElement(
|
|
7948
8504
|
Pagination,
|
|
7949
|
-
{ className: 'p-0 m-0', size: main.
|
|
8505
|
+
{ className: 'p-0 m-0', size: main.main_35 && 'sm' },
|
|
7950
8506
|
React__default.createElement(Pagination.First, { onClick: function onClick() {
|
|
7951
8507
|
return changePage('first');
|
|
7952
8508
|
}, disabled: currentPage === 1 }),
|
|
@@ -8123,7 +8679,6 @@ var Slideshow$1 = function Slideshow(_ref) {
|
|
|
8123
8679
|
getSerializers = _ref.getSerializers;
|
|
8124
8680
|
|
|
8125
8681
|
var router = Router.useRouter();
|
|
8126
|
-
var carouselRef = React.useRef(null);
|
|
8127
8682
|
var pageNumber = router && router.asPath && router.asPath.split('?page=')[1];
|
|
8128
8683
|
|
|
8129
8684
|
var _useState = React.useState(!pageNumber || isNaN(pageNumber) || pageNumber > slides.length ? 0 : pageNumber - 1),
|
|
@@ -8150,14 +8705,12 @@ var Slideshow$1 = function Slideshow(_ref) {
|
|
|
8150
8705
|
var pageNumber = selectedIndex + 1;
|
|
8151
8706
|
var href = '/view/' + router.query.url + '?page=' + pageNumber;
|
|
8152
8707
|
router.push(router.pathname, pageNumber > 1 ? href : '/view/' + router.query.url, { shallow: true });
|
|
8153
|
-
|
|
8154
|
-
carouselRef.current.scrollIntoView();
|
|
8155
|
-
}
|
|
8708
|
+
setCarouselIndex(selectedIndex);
|
|
8156
8709
|
};
|
|
8157
8710
|
|
|
8158
8711
|
return React__default.createElement(
|
|
8159
8712
|
'div',
|
|
8160
|
-
{
|
|
8713
|
+
{ className: 'mt-3 mb-4' },
|
|
8161
8714
|
React__default.createElement(
|
|
8162
8715
|
reactBootstrap.Carousel,
|
|
8163
8716
|
{ activeIndex: carouselIndex, onSelect: onChangeSlide, interval: null },
|
|
@@ -8170,15 +8723,24 @@ var Slideshow$1 = function Slideshow(_ref) {
|
|
|
8170
8723
|
'a',
|
|
8171
8724
|
{ href: slide.slideshowImage.link && slide.slideshowImage.link, target: slide.slideshowImage.blank ? '_blank' : '_self' },
|
|
8172
8725
|
React__default.createElement(
|
|
8173
|
-
|
|
8174
|
-
|
|
8726
|
+
'div',
|
|
8727
|
+
{ className: 'embed-responsive embed-responsive-slide' },
|
|
8175
8728
|
React__default.createElement(
|
|
8176
|
-
|
|
8729
|
+
index$2.LazyLoad,
|
|
8177
8730
|
null,
|
|
8178
|
-
React__default.createElement(
|
|
8179
|
-
|
|
8180
|
-
|
|
8181
|
-
|
|
8731
|
+
React__default.createElement(
|
|
8732
|
+
'picture',
|
|
8733
|
+
null,
|
|
8734
|
+
React__default.createElement('source', { media: '(min-width: 1200px)', srcSet: urlFor({ source: slide.slideshowImage, client: client, imageWidth: 1500, imageFit: 'max' }) }),
|
|
8735
|
+
React__default.createElement('source', { media: '(min-width: 600px)', srcSet: urlFor({ source: slide.slideshowImage, client: client, imageWidth: 1000, imageFit: 'max' }) }),
|
|
8736
|
+
React__default.createElement('source', { media: '(max-width: 600px)', srcSet: urlFor({ source: slide.slideshowImage, client: client, imageWidth: 500, imageFit: 'max' }) }),
|
|
8737
|
+
React__default.createElement('img', { src: urlFor({ source: slide.slideshowImage, client: client }), alt: slide.slideshowImage.alt || 'slideshow image', className: 'embed-responsive-item' })
|
|
8738
|
+
)
|
|
8739
|
+
),
|
|
8740
|
+
React__default.createElement(
|
|
8741
|
+
'style',
|
|
8742
|
+
{ jsx: 'true' },
|
|
8743
|
+
'\n .embed-responsive-slide::before {\n padding-top: ' + slide.slideshowImage.height / slide.slideshowImage.width * 100 + '%;\n }\n '
|
|
8182
8744
|
)
|
|
8183
8745
|
)
|
|
8184
8746
|
),
|
|
@@ -8266,7 +8828,7 @@ var MultiMedia = function MultiMedia(props) {
|
|
|
8266
8828
|
{ xs: 12, md: 12 / medias.length, key: media._key },
|
|
8267
8829
|
React__default.createElement(
|
|
8268
8830
|
'a',
|
|
8269
|
-
_extends._extends({}, media.upload_doc && media.upload_doc.asset && { href: media.upload_doc.asset.url, target: media.blank ? '_blank' : '_self' }, {
|
|
8831
|
+
_extends$1._extends({}, media.upload_doc && media.upload_doc.asset && { href: media.upload_doc.asset.url, target: media.blank ? '_blank' : '_self' }, {
|
|
8270
8832
|
style: { cursor: media.upload_doc && media.upload_doc.asset && media.upload_doc.asset.url ? 'pointer' : 'default' } }),
|
|
8271
8833
|
React__default.createElement(
|
|
8272
8834
|
'div',
|
|
@@ -8304,12 +8866,12 @@ var MultiMedia = function MultiMedia(props) {
|
|
|
8304
8866
|
};
|
|
8305
8867
|
|
|
8306
8868
|
var InscreenSensor = function (_React$Component) {
|
|
8307
|
-
inherits$1._inherits(InscreenSensor, _React$Component);
|
|
8869
|
+
inherits$1$1._inherits(InscreenSensor, _React$Component);
|
|
8308
8870
|
|
|
8309
8871
|
function InscreenSensor(props) {
|
|
8310
|
-
inherits$1._classCallCheck(this, InscreenSensor);
|
|
8872
|
+
inherits$1$1._classCallCheck(this, InscreenSensor);
|
|
8311
8873
|
|
|
8312
|
-
var _this = inherits$1._possibleConstructorReturn(this, (InscreenSensor.__proto__ || inherits$1._Object$getPrototypeOf(InscreenSensor)).call(this, props));
|
|
8874
|
+
var _this = inherits$1$1._possibleConstructorReturn(this, (InscreenSensor.__proto__ || inherits$1$1._Object$getPrototypeOf(InscreenSensor)).call(this, props));
|
|
8313
8875
|
|
|
8314
8876
|
_this.scrollHandler = function () {
|
|
8315
8877
|
var visible = _this.checkInside();
|
|
@@ -8345,7 +8907,7 @@ var InscreenSensor = function (_React$Component) {
|
|
|
8345
8907
|
return _this;
|
|
8346
8908
|
}
|
|
8347
8909
|
|
|
8348
|
-
inherits$1._createClass(InscreenSensor, [{
|
|
8910
|
+
inherits$1$1._createClass(InscreenSensor, [{
|
|
8349
8911
|
key: 'componentDidMount',
|
|
8350
8912
|
value: function componentDidMount() {
|
|
8351
8913
|
this.visible = this.checkInside();
|
|
@@ -8561,7 +9123,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8561
9123
|
|
|
8562
9124
|
var renderAuthorBiography = function renderAuthorBiography(biography) {
|
|
8563
9125
|
if (biography) {
|
|
8564
|
-
return React__default.createElement(BlockContent.BlockContent, _extends._extends({ serializers: getSerializers, blocks: [biography] }, client.config()));
|
|
9126
|
+
return React__default.createElement(BlockContent.BlockContent, _extends$1._extends({ serializers: getSerializers, blocks: [biography] }, client.config()));
|
|
8565
9127
|
}
|
|
8566
9128
|
};
|
|
8567
9129
|
|
|
@@ -8647,7 +9209,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8647
9209
|
//console.log('useLayoutEffect')
|
|
8648
9210
|
if (!firstLoad) {
|
|
8649
9211
|
setUpArrowClicked(false);
|
|
8650
|
-
if (main.
|
|
9212
|
+
if (main.main_36) {
|
|
8651
9213
|
grabLoadedAds();
|
|
8652
9214
|
} else {
|
|
8653
9215
|
scrollToArticle();
|
|
@@ -8671,7 +9233,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8671
9233
|
//let targeting = getTargeting({ article: activeArticle, cpModificationRequired, position: props.position, prevUrl })
|
|
8672
9234
|
if (pageview) pageview(path);
|
|
8673
9235
|
|
|
8674
|
-
if (!main.
|
|
9236
|
+
if (!main.main_36) {
|
|
8675
9237
|
index.lib_3.getGoogletag().then(function (googletag) {
|
|
8676
9238
|
if (window.googletag && googletag.pubadsReady) {
|
|
8677
9239
|
index.lib_3.refresh();
|
|
@@ -8679,7 +9241,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8679
9241
|
});
|
|
8680
9242
|
}
|
|
8681
9243
|
//Refresh leaderboard ad on mobile
|
|
8682
|
-
if (main.
|
|
9244
|
+
if (main.main_36) {
|
|
8683
9245
|
var leaderboardSlotId = '';
|
|
8684
9246
|
index.lib_3.getGoogletag().then(function (googletag) {
|
|
8685
9247
|
if (window.googletag && googletag.pubadsReady) {
|
|
@@ -8748,7 +9310,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8748
9310
|
React__default.createElement(
|
|
8749
9311
|
'div',
|
|
8750
9312
|
{ className: 'ad-box', style: { textAlign: 'center' } },
|
|
8751
|
-
main.
|
|
9313
|
+
main.main_36 && Ads.map(function (ad, index) {
|
|
8752
9314
|
if (index === 0) {
|
|
8753
9315
|
return React__default.createElement(
|
|
8754
9316
|
'div',
|
|
@@ -8839,7 +9401,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8839
9401
|
React__default.createElement(
|
|
8840
9402
|
'div',
|
|
8841
9403
|
{ className: 'mt-2 mb-2' },
|
|
8842
|
-
React__default.createElement(BlockContent.BlockContent, _extends._extends({
|
|
9404
|
+
React__default.createElement(BlockContent.BlockContent, _extends$1._extends({
|
|
8843
9405
|
serializers: getSerializers,
|
|
8844
9406
|
videoAccountIDs: accountIDs,
|
|
8845
9407
|
blocks: article.text,
|
|
@@ -8870,7 +9432,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
|
|
|
8870
9432
|
React__default.createElement(
|
|
8871
9433
|
'div',
|
|
8872
9434
|
{ className: 'ad-box', style: { textAlign: 'center' } },
|
|
8873
|
-
main.
|
|
9435
|
+
main.main_36 && Articles.length - 1 !== index && Ads.map(function (ad, innerIndex) {
|
|
8874
9436
|
if (innerIndex === 0) {
|
|
8875
9437
|
return React__default.createElement(
|
|
8876
9438
|
'div',
|
|
@@ -8957,7 +9519,7 @@ var FigureImage = React__default.memo(function (_ref2) {
|
|
|
8957
9519
|
React__default.createElement('source', { media: '(min-width: 1200px)', srcSet: urlFor({ source: node, client: client, imageWidth: 1500, imageFit: 'max' }) }),
|
|
8958
9520
|
React__default.createElement('source', { media: '(min-width: 600px)', srcSet: urlFor({ source: node, client: client, imageWidth: 1000, imageFit: 'max' }) }),
|
|
8959
9521
|
React__default.createElement('source', { media: '(max-width: 600px)', srcSet: urlFor({ source: node, client: client, imageWidth: 500, imageFit: 'max' }) }),
|
|
8960
|
-
React__default.createElement('img', _extends._extends({
|
|
9522
|
+
React__default.createElement('img', _extends$1._extends({
|
|
8961
9523
|
style: figureImageStyle,
|
|
8962
9524
|
className: 'figure-image',
|
|
8963
9525
|
src: urlFor({ source: node, client: client }),
|
|
@@ -9133,7 +9695,7 @@ var FigureImage$1 = React__default.memo(function (_ref) {
|
|
|
9133
9695
|
React__default.createElement('source', { media: '(min-width: 1200px)', srcSet: urlFor({ source: image, client: client, imageWidth: 1500, imageFit: 'max' }) }),
|
|
9134
9696
|
React__default.createElement('source', { media: '(min-width: 600px)', srcSet: urlFor({ source: image, client: client, imageWidth: 1000, imageFit: 'max' }) }),
|
|
9135
9697
|
React__default.createElement('source', { media: '(max-width: 600px)', srcSet: urlFor({ source: image, client: client, imageWidth: 500, imageFit: 'max' }) }),
|
|
9136
|
-
React__default.createElement('img', _extends._extends({
|
|
9698
|
+
React__default.createElement('img', _extends$1._extends({
|
|
9137
9699
|
'images-count': imagesCount,
|
|
9138
9700
|
className: 'multi-figure-image',
|
|
9139
9701
|
src: urlFor({ source: image, client: client }),
|
|
@@ -9198,7 +9760,7 @@ var MultiFigure = function MultiFigure(props) {
|
|
|
9198
9760
|
{ xs: 12, md: 12 / images.length, key: index },
|
|
9199
9761
|
image.link ? React__default.createElement(
|
|
9200
9762
|
'a',
|
|
9201
|
-
_extends._extends({}, image.link && { href: image.link, target: image.blank ? '_blank' : '_self' }, { style: { cursor: image.link ? 'pointer' : 'default' } }),
|
|
9763
|
+
_extends$1._extends({}, image.link && { href: image.link, target: image.blank ? '_blank' : '_self' }, { style: { cursor: image.link ? 'pointer' : 'default' } }),
|
|
9202
9764
|
React__default.createElement(
|
|
9203
9765
|
'div',
|
|
9204
9766
|
{ className: 'multi-figure-image-container' },
|
|
@@ -9237,6 +9799,8 @@ var MultiFigure = function MultiFigure(props) {
|
|
|
9237
9799
|
return null;
|
|
9238
9800
|
};
|
|
9239
9801
|
|
|
9802
|
+
var offsetHeightBuffer = 20;
|
|
9803
|
+
|
|
9240
9804
|
var AnchorLinkElement = function AnchorLinkElement(props) {
|
|
9241
9805
|
var articleId = props.articleId,
|
|
9242
9806
|
_props$node = props.node,
|
|
@@ -9247,12 +9811,45 @@ var AnchorLinkElement = function AnchorLinkElement(props) {
|
|
|
9247
9811
|
getSerializers = props.getSerializers;
|
|
9248
9812
|
|
|
9249
9813
|
|
|
9814
|
+
if (typeof window !== 'undefined' && window.history && window.history.scrollRestoration !== 'manual') {
|
|
9815
|
+
window.history.scrollRestoration = 'manual';
|
|
9816
|
+
}
|
|
9817
|
+
|
|
9250
9818
|
var elementId = articleId ? id + '-' + articleId : id;
|
|
9251
9819
|
|
|
9820
|
+
var _useState = React.useState(100),
|
|
9821
|
+
_useState2 = slicedToArray._slicedToArray(_useState, 2),
|
|
9822
|
+
offsetHeight = _useState2[0],
|
|
9823
|
+
setOffsetHeight = _useState2[1];
|
|
9824
|
+
|
|
9825
|
+
React.useEffect(function () {
|
|
9826
|
+
var header = document.querySelector('header');
|
|
9827
|
+
if (header) setOffsetHeight(header.offsetHeight);
|
|
9828
|
+
}, []);
|
|
9829
|
+
|
|
9830
|
+
// useEffect(() => {
|
|
9831
|
+
// const timer = setTimeout(() => {
|
|
9832
|
+
// const hash = window.location.hash
|
|
9833
|
+
// if (hash) {
|
|
9834
|
+
// const elementId = hash.slice(1)
|
|
9835
|
+
// const element = document.getElementById(elementId)
|
|
9836
|
+
// element && element.scrollIntoView()
|
|
9837
|
+
// }
|
|
9838
|
+
// }, 3000)
|
|
9839
|
+
// return () => {
|
|
9840
|
+
// clearTimeout(timer)
|
|
9841
|
+
// }
|
|
9842
|
+
// }, [])
|
|
9843
|
+
|
|
9252
9844
|
return React__default.createElement(
|
|
9253
9845
|
'div',
|
|
9254
9846
|
{ id: elementId },
|
|
9255
|
-
React__default.createElement(BlockContent.BlockContent, { blocks: content, serializers: getSerializers })
|
|
9847
|
+
React__default.createElement(BlockContent.BlockContent, { blocks: content, serializers: getSerializers }),
|
|
9848
|
+
React__default.createElement(
|
|
9849
|
+
'style',
|
|
9850
|
+
{ jsx: 'true' },
|
|
9851
|
+
'\n #' + elementId + '::before {\n display: block;\n content: \' \';\n margin-top: -' + (offsetHeight + offsetHeightBuffer) + 'px;\n height: ' + (offsetHeight + offsetHeightBuffer) + 'px;\n visibility: hidden;\n pointer-events: none;\n }\n '
|
|
9852
|
+
)
|
|
9256
9853
|
);
|
|
9257
9854
|
};
|
|
9258
9855
|
|
|
@@ -9281,7 +9878,7 @@ exports.__esModule = true;
|
|
|
9281
9878
|
|
|
9282
9879
|
|
|
9283
9880
|
|
|
9284
|
-
var _extends3 = _interopRequireDefault(_extends._extends$1);
|
|
9881
|
+
var _extends3 = _interopRequireDefault(_extends$1._extends$1);
|
|
9285
9882
|
|
|
9286
9883
|
|
|
9287
9884
|
|
|
@@ -9289,15 +9886,15 @@ var _objectWithoutProperties3 = _interopRequireDefault(objectWithoutProperties);
|
|
|
9289
9886
|
|
|
9290
9887
|
|
|
9291
9888
|
|
|
9292
|
-
var _classCallCheck3 = _interopRequireDefault(inherits$1.classCallCheck);
|
|
9889
|
+
var _classCallCheck3 = _interopRequireDefault(inherits$1$1.classCallCheck);
|
|
9293
9890
|
|
|
9294
9891
|
|
|
9295
9892
|
|
|
9296
|
-
var _possibleConstructorReturn3 = _interopRequireDefault(inherits$1.possibleConstructorReturn);
|
|
9893
|
+
var _possibleConstructorReturn3 = _interopRequireDefault(inherits$1$1.possibleConstructorReturn);
|
|
9297
9894
|
|
|
9298
9895
|
|
|
9299
9896
|
|
|
9300
|
-
var _inherits3 = _interopRequireDefault(inherits$1.inherits);
|
|
9897
|
+
var _inherits3 = _interopRequireDefault(inherits$1$1.inherits);
|
|
9301
9898
|
|
|
9302
9899
|
|
|
9303
9900
|
|
|
@@ -9594,7 +10191,7 @@ var BlockTable = function BlockTable(props) {
|
|
|
9594
10191
|
return React__default.createElement(
|
|
9595
10192
|
'div',
|
|
9596
10193
|
{ className: 'blockTableCell', style: { width: (100 / row.cells.length).toFixed(2) + '%' } },
|
|
9597
|
-
React__default.createElement(BlockContent.BlockContent, _extends._extends({ blocks: cell.content, serializers: getSerializers }, client.config()))
|
|
10194
|
+
React__default.createElement(BlockContent.BlockContent, _extends$1._extends({ blocks: cell.content, serializers: getSerializers }, client.config()))
|
|
9598
10195
|
);
|
|
9599
10196
|
})
|
|
9600
10197
|
);
|