@mjhls/mjh-framework 1.0.240 → 1.0.241
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 +174 -174
- package/dist/cjs/DeckContent.js +9 -9
- package/dist/cjs/DeckQueue.js +1 -1
- package/dist/cjs/{GridContent-f9e3fff5.js → GridContent-463c504f.js} +2 -2
- package/dist/cjs/GridContent.js +2 -2
- package/dist/cjs/IssueContentDeck.js +1 -1
- package/dist/cjs/IssueDeck.js +1 -1
- package/dist/cjs/MasterDeck.js +9 -9
- package/dist/cjs/{Normal-0497eb61.js → Normal-0f06cc52.js} +29 -29
- package/dist/cjs/PublicationDeck.js +1 -1
- package/dist/cjs/QueueDeckExpanded.js +1 -1
- package/dist/cjs/{TaxonomyCard-b5074d6e.js → TaxonomyCard-e3566492.js} +1 -1
- package/dist/cjs/TaxonomyCard.js +2 -2
- package/dist/cjs/TemplateNormal.js +1 -1
- package/dist/cjs/ThumbnailCard.js +1 -1
- package/dist/cjs/VideoSeriesListing.js +1 -1
- package/dist/cjs/{YoutubeGroup-fd44f8a0.js → YoutubeGroup-5f480446.js} +4 -4
- package/dist/cjs/YoutubeGroup.js +1 -1
- package/dist/cjs/{index-39beccb3.js → index-be0c82be.js} +1 -2
- package/dist/cjs/index.js +728 -768
- package/dist/esm/DeckContent.js +9 -9
- package/dist/esm/DeckQueue.js +1 -1
- package/dist/esm/{GridContent-d4f5457e.js → GridContent-2a48fb19.js} +1 -1
- package/dist/esm/GridContent.js +2 -2
- package/dist/esm/IssueContentDeck.js +1 -1
- package/dist/esm/IssueDeck.js +1 -1
- package/dist/esm/MasterDeck.js +9 -9
- package/dist/esm/{Normal-e1855047.js → Normal-aa76b53c.js} +29 -29
- package/dist/esm/PublicationDeck.js +1 -1
- package/dist/esm/QueueDeckExpanded.js +1 -1
- package/dist/esm/{TaxonomyCard-ee1a22ae.js → TaxonomyCard-2d0ab635.js} +1 -1
- package/dist/esm/TaxonomyCard.js +2 -2
- package/dist/esm/TemplateNormal.js +1 -1
- package/dist/esm/ThumbnailCard.js +1 -1
- package/dist/esm/VideoSeriesListing.js +1 -1
- package/dist/esm/{YoutubeGroup-1b3eca73.js → YoutubeGroup-78d93d44.js} +4 -4
- package/dist/esm/YoutubeGroup.js +1 -1
- package/dist/esm/{index-3849e3fe.js → index-73819142.js} +1 -2
- package/dist/esm/index.js +732 -772
- package/package.json +103 -102
package/dist/esm/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { _ as _toConsumableArray, a as _Array$from } from './toConsumableArray-e
|
|
|
7
7
|
import './core.get-iterator-method-31c1fb1a.js';
|
|
8
8
|
import { _ as _extends$2 } from './extends-dbbe308d.js';
|
|
9
9
|
import { _ as _objectSap, a as _inherits$1, b as _classCallCheck$1, c as _possibleConstructorReturn$1, d as _Object$getPrototypeOf, e as _createClass$1 } from './inherits-a75c8a1c.js';
|
|
10
|
-
import React__default, { useState,
|
|
10
|
+
import React__default, { useState, useRef, useEffect } from 'react';
|
|
11
11
|
import { l as lib_3, a as lib_1 } from './index-fa84ea96.js';
|
|
12
12
|
import PropTypes from 'prop-types';
|
|
13
13
|
import Container from 'react-bootstrap/Container';
|
|
@@ -18,7 +18,7 @@ import { m as moment, I as InfiniteScroll, V as VisibilitySensor } from './visib
|
|
|
18
18
|
import Link from 'next/link';
|
|
19
19
|
import Router, { useRouter } from 'next/router';
|
|
20
20
|
import 'react-dom';
|
|
21
|
-
import { i as imageUrlBuilder } from './index-
|
|
21
|
+
import { i as imageUrlBuilder } from './index-73819142.js';
|
|
22
22
|
import './index-5f9f807a.js';
|
|
23
23
|
import { h as html_decode_1, c as clean_html_1 } from './entities-7cc3bf45.js';
|
|
24
24
|
import { _ as _slicedToArray } from './slicedToArray-d0a9593a.js';
|
|
@@ -27,16 +27,16 @@ export { D as AdSlot, B as Beam } from './AdSlot-bdd7a629.js';
|
|
|
27
27
|
import './promise-683a9c54.js';
|
|
28
28
|
export { default as DeckContent } from './DeckContent.js';
|
|
29
29
|
import './get-b2201dc8.js';
|
|
30
|
-
export { A as AD, G as GridContent } from './GridContent-
|
|
30
|
+
export { A as AD, G as GridContent } from './GridContent-2a48fb19.js';
|
|
31
31
|
export { default as DeckQueue } from './DeckQueue.js';
|
|
32
32
|
import 'react-bootstrap/Media';
|
|
33
33
|
export { default as ThumbnailCard } from './ThumbnailCard.js';
|
|
34
|
-
import { B as BlockContent } from './TaxonomyCard-
|
|
35
|
-
export { T as TaxonomyCard } from './TaxonomyCard-
|
|
34
|
+
import { B as BlockContent } from './TaxonomyCard-2d0ab635.js';
|
|
35
|
+
export { T as TaxonomyCard } from './TaxonomyCard-2d0ab635.js';
|
|
36
36
|
import GroupDeck from './GroupDeck.js';
|
|
37
37
|
export { default as GroupDeck } from './GroupDeck.js';
|
|
38
|
-
import { g as getYoutubeId } from './YoutubeGroup-
|
|
39
|
-
export { Y as YoutubeGroup } from './YoutubeGroup-
|
|
38
|
+
import { g as getYoutubeId } from './YoutubeGroup-78d93d44.js';
|
|
39
|
+
export { Y as YoutubeGroup } from './YoutubeGroup-78d93d44.js';
|
|
40
40
|
import { Spinner as Spinner$1, Container as Container$1, Row as Row$1, Col as Col$1, Figure, Carousel, Table, Button as Button$1, ProgressBar, Card } from 'react-bootstrap';
|
|
41
41
|
export { default as QueueDeckExpanded } from './QueueDeckExpanded.js';
|
|
42
42
|
import { I as IoMdArrowDropdown } from './index.esm-536609db.js';
|
|
@@ -48,8 +48,8 @@ export { default as IssueDeck } from './IssueDeck.js';
|
|
|
48
48
|
import 'react-bootstrap/Badge';
|
|
49
49
|
export { default as IssueContentDeck } from './IssueContentDeck.js';
|
|
50
50
|
import Spinner from 'react-bootstrap/Spinner';
|
|
51
|
-
import { M as MdPictureAsPdf, T as TemplateNormal } from './Normal-
|
|
52
|
-
export { A as AD728x90, C as Column1, a as Column2, b as Column3, f as HamMagazine, H as Header, L as LeftNav, e as NavDvm, c as NavMagazine, N as NavNative, d as NavNormal, P as PageFilter, S as Search, g as SideFooter, T as TemplateNormal } from './Normal-
|
|
51
|
+
import { M as MdPictureAsPdf, T as TemplateNormal } from './Normal-aa76b53c.js';
|
|
52
|
+
export { A as AD728x90, C as Column1, a as Column2, b as Column3, f as HamMagazine, H as Header, L as LeftNav, e as NavDvm, c as NavMagazine, N as NavNative, d as NavNormal, P as PageFilter, S as Search, g as SideFooter, T as TemplateNormal } from './Normal-aa76b53c.js';
|
|
53
53
|
import 'react-bootstrap/ListGroup';
|
|
54
54
|
import Head from 'next/head';
|
|
55
55
|
import Accordion from 'react-bootstrap/Accordion';
|
|
@@ -1634,10 +1634,166 @@ var moment = module.exports = momentTimezone;
|
|
|
1634
1634
|
moment.tz.load(require$$1);
|
|
1635
1635
|
});
|
|
1636
1636
|
|
|
1637
|
+
var js_cookie = createCommonjsModule(function (module, exports) {
|
|
1638
|
+
(function (factory) {
|
|
1639
|
+
var registeredInModuleLoader;
|
|
1640
|
+
{
|
|
1641
|
+
module.exports = factory();
|
|
1642
|
+
registeredInModuleLoader = true;
|
|
1643
|
+
}
|
|
1644
|
+
if (!registeredInModuleLoader) {
|
|
1645
|
+
var OldCookies = window.Cookies;
|
|
1646
|
+
var api = window.Cookies = factory();
|
|
1647
|
+
api.noConflict = function () {
|
|
1648
|
+
window.Cookies = OldCookies;
|
|
1649
|
+
return api;
|
|
1650
|
+
};
|
|
1651
|
+
}
|
|
1652
|
+
}(function () {
|
|
1653
|
+
function extend () {
|
|
1654
|
+
var i = 0;
|
|
1655
|
+
var result = {};
|
|
1656
|
+
for (; i < arguments.length; i++) {
|
|
1657
|
+
var attributes = arguments[ i ];
|
|
1658
|
+
for (var key in attributes) {
|
|
1659
|
+
result[key] = attributes[key];
|
|
1660
|
+
}
|
|
1661
|
+
}
|
|
1662
|
+
return result;
|
|
1663
|
+
}
|
|
1664
|
+
|
|
1665
|
+
function decode (s) {
|
|
1666
|
+
return s.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent);
|
|
1667
|
+
}
|
|
1668
|
+
|
|
1669
|
+
function init (converter) {
|
|
1670
|
+
function api() {}
|
|
1671
|
+
|
|
1672
|
+
function set (key, value, attributes) {
|
|
1673
|
+
if (typeof document === 'undefined') {
|
|
1674
|
+
return;
|
|
1675
|
+
}
|
|
1676
|
+
|
|
1677
|
+
attributes = extend({
|
|
1678
|
+
path: '/'
|
|
1679
|
+
}, api.defaults, attributes);
|
|
1680
|
+
|
|
1681
|
+
if (typeof attributes.expires === 'number') {
|
|
1682
|
+
attributes.expires = new Date(new Date() * 1 + attributes.expires * 864e+5);
|
|
1683
|
+
}
|
|
1684
|
+
|
|
1685
|
+
// We're using "expires" because "max-age" is not supported by IE
|
|
1686
|
+
attributes.expires = attributes.expires ? attributes.expires.toUTCString() : '';
|
|
1687
|
+
|
|
1688
|
+
try {
|
|
1689
|
+
var result = JSON.stringify(value);
|
|
1690
|
+
if (/^[\{\[]/.test(result)) {
|
|
1691
|
+
value = result;
|
|
1692
|
+
}
|
|
1693
|
+
} catch (e) {}
|
|
1694
|
+
|
|
1695
|
+
value = converter.write ?
|
|
1696
|
+
converter.write(value, key) :
|
|
1697
|
+
encodeURIComponent(String(value))
|
|
1698
|
+
.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);
|
|
1699
|
+
|
|
1700
|
+
key = encodeURIComponent(String(key))
|
|
1701
|
+
.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)
|
|
1702
|
+
.replace(/[\(\)]/g, escape);
|
|
1703
|
+
|
|
1704
|
+
var stringifiedAttributes = '';
|
|
1705
|
+
for (var attributeName in attributes) {
|
|
1706
|
+
if (!attributes[attributeName]) {
|
|
1707
|
+
continue;
|
|
1708
|
+
}
|
|
1709
|
+
stringifiedAttributes += '; ' + attributeName;
|
|
1710
|
+
if (attributes[attributeName] === true) {
|
|
1711
|
+
continue;
|
|
1712
|
+
}
|
|
1713
|
+
|
|
1714
|
+
// Considers RFC 6265 section 5.2:
|
|
1715
|
+
// ...
|
|
1716
|
+
// 3. If the remaining unparsed-attributes contains a %x3B (";")
|
|
1717
|
+
// character:
|
|
1718
|
+
// Consume the characters of the unparsed-attributes up to,
|
|
1719
|
+
// not including, the first %x3B (";") character.
|
|
1720
|
+
// ...
|
|
1721
|
+
stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];
|
|
1722
|
+
}
|
|
1723
|
+
|
|
1724
|
+
return (document.cookie = key + '=' + value + stringifiedAttributes);
|
|
1725
|
+
}
|
|
1726
|
+
|
|
1727
|
+
function get (key, json) {
|
|
1728
|
+
if (typeof document === 'undefined') {
|
|
1729
|
+
return;
|
|
1730
|
+
}
|
|
1731
|
+
|
|
1732
|
+
var jar = {};
|
|
1733
|
+
// To prevent the for loop in the first place assign an empty array
|
|
1734
|
+
// in case there are no cookies at all.
|
|
1735
|
+
var cookies = document.cookie ? document.cookie.split('; ') : [];
|
|
1736
|
+
var i = 0;
|
|
1737
|
+
|
|
1738
|
+
for (; i < cookies.length; i++) {
|
|
1739
|
+
var parts = cookies[i].split('=');
|
|
1740
|
+
var cookie = parts.slice(1).join('=');
|
|
1741
|
+
|
|
1742
|
+
if (!json && cookie.charAt(0) === '"') {
|
|
1743
|
+
cookie = cookie.slice(1, -1);
|
|
1744
|
+
}
|
|
1745
|
+
|
|
1746
|
+
try {
|
|
1747
|
+
var name = decode(parts[0]);
|
|
1748
|
+
cookie = (converter.read || converter)(cookie, name) ||
|
|
1749
|
+
decode(cookie);
|
|
1750
|
+
|
|
1751
|
+
if (json) {
|
|
1752
|
+
try {
|
|
1753
|
+
cookie = JSON.parse(cookie);
|
|
1754
|
+
} catch (e) {}
|
|
1755
|
+
}
|
|
1756
|
+
|
|
1757
|
+
jar[name] = cookie;
|
|
1758
|
+
|
|
1759
|
+
if (key === name) {
|
|
1760
|
+
break;
|
|
1761
|
+
}
|
|
1762
|
+
} catch (e) {}
|
|
1763
|
+
}
|
|
1764
|
+
|
|
1765
|
+
return key ? jar[key] : jar;
|
|
1766
|
+
}
|
|
1767
|
+
|
|
1768
|
+
api.set = set;
|
|
1769
|
+
api.get = function (key) {
|
|
1770
|
+
return get(key, false /* read as raw */);
|
|
1771
|
+
};
|
|
1772
|
+
api.getJSON = function (key) {
|
|
1773
|
+
return get(key, true /* read as json */);
|
|
1774
|
+
};
|
|
1775
|
+
api.remove = function (key, attributes) {
|
|
1776
|
+
set(key, '', extend(attributes, {
|
|
1777
|
+
expires: -1
|
|
1778
|
+
}));
|
|
1779
|
+
};
|
|
1780
|
+
|
|
1781
|
+
api.defaults = {};
|
|
1782
|
+
|
|
1783
|
+
api.withConverter = init;
|
|
1784
|
+
|
|
1785
|
+
return api;
|
|
1786
|
+
}
|
|
1787
|
+
|
|
1788
|
+
return init(function () {});
|
|
1789
|
+
}));
|
|
1790
|
+
});
|
|
1791
|
+
|
|
1637
1792
|
var clientId = process.env.CVENT_CLIENT_ID;
|
|
1638
1793
|
var clientSecret = process.env.CVENT_CLIENT_SECRET;
|
|
1639
1794
|
var corsProxy = 'https://cors-anywhere.herokuapp.com/';
|
|
1640
1795
|
var currentTime = momentTimezone$1().toISOString();
|
|
1796
|
+
var itemsPerPage = 10;
|
|
1641
1797
|
|
|
1642
1798
|
var EventsDeck = function EventsDeck(_ref) {
|
|
1643
1799
|
var _ref$autoScroll = _ref.autoScroll,
|
|
@@ -1668,8 +1824,8 @@ var EventsDeck = function EventsDeck(_ref) {
|
|
|
1668
1824
|
|
|
1669
1825
|
var _useState7 = useState(null),
|
|
1670
1826
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
1671
|
-
|
|
1672
|
-
|
|
1827
|
+
nextPageLink = _useState8[0],
|
|
1828
|
+
setNextPageLink = _useState8[1];
|
|
1673
1829
|
|
|
1674
1830
|
var _useState9 = useState(true),
|
|
1675
1831
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
@@ -1678,17 +1834,14 @@ var EventsDeck = function EventsDeck(_ref) {
|
|
|
1678
1834
|
|
|
1679
1835
|
var _useState11 = useState(1),
|
|
1680
1836
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
1681
|
-
|
|
1682
|
-
|
|
1837
|
+
currentPage = _useState12[0],
|
|
1838
|
+
setCurrentPage = _useState12[1];
|
|
1839
|
+
|
|
1840
|
+
var currentPageRef = useRef(currentPage);
|
|
1683
1841
|
|
|
1684
|
-
var
|
|
1685
|
-
|
|
1686
|
-
currentPage = _useState14[0],
|
|
1687
|
-
setCurrentPage = _useState14[1];
|
|
1842
|
+
var getEvents = function getEvents(params) {
|
|
1843
|
+
var url = params.url;
|
|
1688
1844
|
|
|
1689
|
-
var getEvents = function getEvents() {
|
|
1690
|
-
var itemsPerPage = 10;
|
|
1691
|
-
var url = corsProxy + 'https://api-platform.cvent.com/event/v1/events/filter?limit=' + itemsPerPage;
|
|
1692
1845
|
fetch(url, {
|
|
1693
1846
|
headers: {
|
|
1694
1847
|
Accept: 'application/json',
|
|
@@ -1701,18 +1854,17 @@ var EventsDeck = function EventsDeck(_ref) {
|
|
|
1701
1854
|
return response.json();
|
|
1702
1855
|
}).then(function (events) {
|
|
1703
1856
|
setIsLoading(false);
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1857
|
+
if (events.data && events.data.length > 0) {
|
|
1858
|
+
var newData = events.data.map(function (item) {
|
|
1859
|
+
return _extends$2({}, item, {
|
|
1860
|
+
pageNumber: currentPage
|
|
1861
|
+
});
|
|
1707
1862
|
});
|
|
1708
|
-
});
|
|
1709
|
-
console.log(events.paging);
|
|
1710
|
-
if (newData.length > 0) {
|
|
1711
1863
|
setData(function (prevData) {
|
|
1712
1864
|
return [].concat(_toConsumableArray(prevData), _toConsumableArray(newData));
|
|
1713
1865
|
});
|
|
1714
|
-
|
|
1715
|
-
setScrolling(true);
|
|
1866
|
+
setNextPageLink(events.paging._links.next ? events.paging._links.next.href : null);
|
|
1867
|
+
newData.length === itemsPerPage ? setScrolling(true) : setScrolling(false);
|
|
1716
1868
|
} else {
|
|
1717
1869
|
setScrolling(false);
|
|
1718
1870
|
}
|
|
@@ -1721,83 +1873,59 @@ var EventsDeck = function EventsDeck(_ref) {
|
|
|
1721
1873
|
|
|
1722
1874
|
useEffect(function () {
|
|
1723
1875
|
// load initial data
|
|
1724
|
-
if (accessToken &&
|
|
1725
|
-
|
|
1876
|
+
if (accessToken && currentPage === 1) {
|
|
1877
|
+
var initailUrl = 'https://api-platform.cvent.com/event/v1/events/filter?limit=' + itemsPerPage;
|
|
1878
|
+
getEvents({ url: initailUrl });
|
|
1726
1879
|
}
|
|
1727
|
-
}, [accessToken,
|
|
1880
|
+
}, [accessToken, currentPage, filter]);
|
|
1881
|
+
|
|
1882
|
+
useEffect(function () {
|
|
1883
|
+
// load more events
|
|
1884
|
+
if (accessToken && nextPageLink && currentPage !== 1 && currentPage !== currentPageRef.current) {
|
|
1885
|
+
getEvents({ url: nextPageLink });
|
|
1886
|
+
}
|
|
1887
|
+
}, [currentPage]);
|
|
1728
1888
|
|
|
1729
1889
|
useEffect(function () {
|
|
1730
1890
|
// reset state when filter changes
|
|
1731
1891
|
setIsLoading(true);
|
|
1732
1892
|
setData([]);
|
|
1733
|
-
setPage(1);
|
|
1734
1893
|
setCurrentPage(1);
|
|
1894
|
+
currentPageRef.current = 1;
|
|
1735
1895
|
}, [filter]);
|
|
1736
1896
|
|
|
1737
1897
|
useEffect(function () {
|
|
1738
1898
|
// get access token
|
|
1739
|
-
var
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
},
|
|
1746
|
-
method: 'POST',
|
|
1747
|
-
body: 'grant_type=client_credentials&client_id=' + clientId
|
|
1748
|
-
}).then(function (response) {
|
|
1749
|
-
return response.json();
|
|
1750
|
-
}).then(function (json) {
|
|
1751
|
-
return setAccessToken(json.access_token);
|
|
1752
|
-
}).catch(function (e) {
|
|
1753
|
-
return console.log(e);
|
|
1754
|
-
});
|
|
1755
|
-
}, []);
|
|
1756
|
-
|
|
1757
|
-
var loadMore = debounce_1(function () {
|
|
1758
|
-
setPage(function (prevPage) {
|
|
1759
|
-
return prevPage + 1;
|
|
1760
|
-
});
|
|
1761
|
-
}, 0);
|
|
1762
|
-
|
|
1763
|
-
useEffect(function () {
|
|
1764
|
-
// load more events
|
|
1765
|
-
page !== 1 && page !== currentPage && loadMoreEvents();
|
|
1766
|
-
}, [page]);
|
|
1767
|
-
|
|
1768
|
-
var loadMoreEvents = function loadMoreEvents() {
|
|
1769
|
-
console.log(nextPagingToken, 'nextPagingToken');
|
|
1770
|
-
if (nextPagingToken) {
|
|
1771
|
-
var url = corsProxy + 'https://api-platform.cvent.com/event/v1/events/filter?token=' + nextPagingToken;
|
|
1899
|
+
var cventAccessToken = js_cookie.get('cvent_access_token');
|
|
1900
|
+
if (cventAccessToken) {
|
|
1901
|
+
setAccessToken(cventAccessToken);
|
|
1902
|
+
} else {
|
|
1903
|
+
var encodedData = window.btoa(clientId + ':' + clientSecret);
|
|
1904
|
+
var url = corsProxy + 'https://api-platform.cvent.com/ea/oauth2/token';
|
|
1772
1905
|
fetch(url, {
|
|
1773
1906
|
headers: {
|
|
1774
|
-
|
|
1775
|
-
'
|
|
1776
|
-
Authorization: 'Bearer ' + accessToken
|
|
1907
|
+
'Content-Type': 'application/x-www-form-urlencoded',
|
|
1908
|
+
Authorization: 'Basic ' + encodedData
|
|
1777
1909
|
},
|
|
1778
|
-
|
|
1779
|
-
|
|
1910
|
+
method: 'POST',
|
|
1911
|
+
body: 'grant_type=client_credentials&client_id=' + clientId
|
|
1780
1912
|
}).then(function (response) {
|
|
1781
1913
|
return response.json();
|
|
1782
|
-
}).then(function (
|
|
1783
|
-
var
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
console.log(events.paging);
|
|
1789
|
-
if (newData.length > 0) {
|
|
1790
|
-
setData(function (prevData) {
|
|
1791
|
-
return [].concat(_toConsumableArray(prevData), _toConsumableArray(newData));
|
|
1792
|
-
});
|
|
1793
|
-
setNextPagingToken(events.paging.nextToken ? events.paging.nextToken : null);
|
|
1794
|
-
setScrolling(true);
|
|
1795
|
-
} else {
|
|
1796
|
-
setScrolling(false);
|
|
1797
|
-
}
|
|
1914
|
+
}).then(function (json) {
|
|
1915
|
+
var inOneHour = new Date(new Date().getTime() + 60 * 60 * 1000);
|
|
1916
|
+
js_cookie.set('cvent_access_token', json.access_token, { expires: inOneHour });
|
|
1917
|
+
setAccessToken(json.access_token);
|
|
1918
|
+
}).catch(function (e) {
|
|
1919
|
+
return console.log(e);
|
|
1798
1920
|
});
|
|
1799
1921
|
}
|
|
1800
|
-
};
|
|
1922
|
+
}, []);
|
|
1923
|
+
|
|
1924
|
+
var loadMore = debounce_1(function () {
|
|
1925
|
+
setCurrentPage(function (prevCurrentPage) {
|
|
1926
|
+
return prevCurrentPage + 1;
|
|
1927
|
+
});
|
|
1928
|
+
}, 0);
|
|
1801
1929
|
|
|
1802
1930
|
var changePageNumber = function changePageNumber(pageNumber) {
|
|
1803
1931
|
if (seoPaginate) {
|
|
@@ -1805,7 +1933,6 @@ var EventsDeck = function EventsDeck(_ref) {
|
|
|
1805
1933
|
var qrIndex = path.indexOf('?');
|
|
1806
1934
|
var pathname = router.pathname;
|
|
1807
1935
|
var queryString = '';
|
|
1808
|
-
|
|
1809
1936
|
if (qrIndex > 0) {
|
|
1810
1937
|
path = path.substring(1, qrIndex);
|
|
1811
1938
|
|
|
@@ -1830,10 +1957,10 @@ var EventsDeck = function EventsDeck(_ref) {
|
|
|
1830
1957
|
|
|
1831
1958
|
pageNumber = parseInt(pageNumber);
|
|
1832
1959
|
|
|
1833
|
-
if (
|
|
1960
|
+
if (pageNumber !== currentPageRef.current) {
|
|
1834
1961
|
lib_3.refresh();
|
|
1835
1962
|
|
|
1836
|
-
|
|
1963
|
+
currentPageRef.current = pageNumber;
|
|
1837
1964
|
if (path[0] !== '/') {
|
|
1838
1965
|
path = '/' + path;
|
|
1839
1966
|
}
|
|
@@ -2078,7 +2205,7 @@ var EventsDeck = function EventsDeck(_ref) {
|
|
|
2078
2205
|
};
|
|
2079
2206
|
|
|
2080
2207
|
var corsProxy$1 = 'https://cors-anywhere.herokuapp.com/';
|
|
2081
|
-
var itemsPerPage = 10;
|
|
2208
|
+
var itemsPerPage$1 = 10;
|
|
2082
2209
|
|
|
2083
2210
|
var CMEDeck = function CMEDeck(_ref) {
|
|
2084
2211
|
var getData = function () {
|
|
@@ -2130,7 +2257,7 @@ var CMEDeck = function CMEDeck(_ref) {
|
|
|
2130
2257
|
});
|
|
2131
2258
|
|
|
2132
2259
|
setIsLoading(false);
|
|
2133
|
-
newData.length === itemsPerPage ? setScrolling(true) : setScrolling(false);
|
|
2260
|
+
newData.length === itemsPerPage$1 ? setScrolling(true) : setScrolling(false);
|
|
2134
2261
|
setData(function (prevData) {
|
|
2135
2262
|
return [].concat(_toConsumableArray(prevData), _toConsumableArray(newData));
|
|
2136
2263
|
});
|
|
@@ -2190,7 +2317,7 @@ var CMEDeck = function CMEDeck(_ref) {
|
|
|
2190
2317
|
data = _useState8[0],
|
|
2191
2318
|
setData = _useState8[1];
|
|
2192
2319
|
|
|
2193
|
-
var _useState9 = useState(router && router.query && router.query.page ? (parseInt(router.query.page) - 1) * itemsPerPage : 0),
|
|
2320
|
+
var _useState9 = useState(router && router.query && router.query.page ? (parseInt(router.query.page) - 1) * itemsPerPage$1 : 0),
|
|
2194
2321
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
2195
2322
|
from = _useState10[0],
|
|
2196
2323
|
setFrom = _useState10[1];
|
|
@@ -2200,7 +2327,7 @@ var CMEDeck = function CMEDeck(_ref) {
|
|
|
2200
2327
|
|
|
2201
2328
|
useEffect(function () {
|
|
2202
2329
|
// load initial data
|
|
2203
|
-
getData({ from: from, limit: itemsPerPage });
|
|
2330
|
+
getData({ from: from, limit: itemsPerPage$1 });
|
|
2204
2331
|
}, []);
|
|
2205
2332
|
|
|
2206
2333
|
var changePageNumber = function changePageNumber(pageNumber) {
|
|
@@ -2255,7 +2382,7 @@ var CMEDeck = function CMEDeck(_ref) {
|
|
|
2255
2382
|
|
|
2256
2383
|
var loadMore = debounce_1(function () {
|
|
2257
2384
|
setFrom(function (prevFrom) {
|
|
2258
|
-
return prevFrom + itemsPerPage;
|
|
2385
|
+
return prevFrom + itemsPerPage$1;
|
|
2259
2386
|
});
|
|
2260
2387
|
setCurrentPage(function (prevCurrentPage) {
|
|
2261
2388
|
return prevCurrentPage + 1;
|
|
@@ -2265,7 +2392,7 @@ var CMEDeck = function CMEDeck(_ref) {
|
|
|
2265
2392
|
useEffect(function () {
|
|
2266
2393
|
if (currentPageRef.current !== currentPage && fromeRef.current !== from) {
|
|
2267
2394
|
fromeRef.current = from;
|
|
2268
|
-
getData({ from: from, limit: itemsPerPage });
|
|
2395
|
+
getData({ from: from, limit: itemsPerPage$1 });
|
|
2269
2396
|
}
|
|
2270
2397
|
}, [currentPage]);
|
|
2271
2398
|
|
|
@@ -2917,18 +3044,21 @@ var Slideshow = function Slideshow(_ref) {
|
|
|
2917
3044
|
);
|
|
2918
3045
|
};
|
|
2919
3046
|
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
3047
|
+
var isArray = Array.isArray;
|
|
3048
|
+
var keyList = Object.keys;
|
|
3049
|
+
var hasProp = Object.prototype.hasOwnProperty;
|
|
2923
3050
|
|
|
2924
3051
|
var fastDeepEqual = function equal(a, b) {
|
|
2925
3052
|
if (a === b) return true;
|
|
2926
3053
|
|
|
2927
3054
|
if (a && b && typeof a == 'object' && typeof b == 'object') {
|
|
2928
|
-
|
|
3055
|
+
var arrA = isArray(a)
|
|
3056
|
+
, arrB = isArray(b)
|
|
3057
|
+
, i
|
|
3058
|
+
, length
|
|
3059
|
+
, key;
|
|
2929
3060
|
|
|
2930
|
-
|
|
2931
|
-
if (Array.isArray(a)) {
|
|
3061
|
+
if (arrA && arrB) {
|
|
2932
3062
|
length = a.length;
|
|
2933
3063
|
if (length != b.length) return false;
|
|
2934
3064
|
for (i = length; i-- !== 0;)
|
|
@@ -2936,29 +3066,35 @@ var fastDeepEqual = function equal(a, b) {
|
|
|
2936
3066
|
return true;
|
|
2937
3067
|
}
|
|
2938
3068
|
|
|
3069
|
+
if (arrA != arrB) return false;
|
|
2939
3070
|
|
|
3071
|
+
var dateA = a instanceof Date
|
|
3072
|
+
, dateB = b instanceof Date;
|
|
3073
|
+
if (dateA != dateB) return false;
|
|
3074
|
+
if (dateA && dateB) return a.getTime() == b.getTime();
|
|
2940
3075
|
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
if (
|
|
3076
|
+
var regexpA = a instanceof RegExp
|
|
3077
|
+
, regexpB = b instanceof RegExp;
|
|
3078
|
+
if (regexpA != regexpB) return false;
|
|
3079
|
+
if (regexpA && regexpB) return a.toString() == b.toString();
|
|
2944
3080
|
|
|
2945
|
-
keys =
|
|
3081
|
+
var keys = keyList(a);
|
|
2946
3082
|
length = keys.length;
|
|
2947
|
-
|
|
3083
|
+
|
|
3084
|
+
if (length !== keyList(b).length)
|
|
3085
|
+
return false;
|
|
2948
3086
|
|
|
2949
3087
|
for (i = length; i-- !== 0;)
|
|
2950
|
-
if (!
|
|
3088
|
+
if (!hasProp.call(b, keys[i])) return false;
|
|
2951
3089
|
|
|
2952
3090
|
for (i = length; i-- !== 0;) {
|
|
2953
|
-
|
|
2954
|
-
|
|
3091
|
+
key = keys[i];
|
|
2955
3092
|
if (!equal(a[key], b[key])) return false;
|
|
2956
3093
|
}
|
|
2957
3094
|
|
|
2958
3095
|
return true;
|
|
2959
3096
|
}
|
|
2960
3097
|
|
|
2961
|
-
// true if both NaN, false otherwise
|
|
2962
3098
|
return a!==a && b!==b;
|
|
2963
3099
|
};
|
|
2964
3100
|
|
|
@@ -3981,7 +4117,7 @@ function formatValue(ctx, value, recurseTimes) {
|
|
|
3981
4117
|
var base = '', array = false, braces = ['{', '}'];
|
|
3982
4118
|
|
|
3983
4119
|
// Make Array say that they are Array
|
|
3984
|
-
if (isArray(value)) {
|
|
4120
|
+
if (isArray$1(value)) {
|
|
3985
4121
|
array = true;
|
|
3986
4122
|
braces = ['[', ']'];
|
|
3987
4123
|
}
|
|
@@ -4160,7 +4296,7 @@ function reduceToSingleString(output, base, braces) {
|
|
|
4160
4296
|
|
|
4161
4297
|
// NOTE: These type checking functions intentionally don't use `instanceof`
|
|
4162
4298
|
// because it is fragile and can be easily faked with `Object.create()`.
|
|
4163
|
-
function isArray(ar) {
|
|
4299
|
+
function isArray$1(ar) {
|
|
4164
4300
|
return Array.isArray(ar);
|
|
4165
4301
|
}
|
|
4166
4302
|
|
|
@@ -4287,7 +4423,7 @@ var util = {
|
|
|
4287
4423
|
isNullOrUndefined: isNullOrUndefined,
|
|
4288
4424
|
isNull: isNull,
|
|
4289
4425
|
isBoolean: isBoolean,
|
|
4290
|
-
isArray: isArray,
|
|
4426
|
+
isArray: isArray$1,
|
|
4291
4427
|
inspect: inspect,
|
|
4292
4428
|
deprecate: deprecate,
|
|
4293
4429
|
format: format,
|
|
@@ -4954,235 +5090,199 @@ module.exports = exports['default'];
|
|
|
4954
5090
|
|
|
4955
5091
|
var youTubePlayer = unwrapExports(dist);
|
|
4956
5092
|
|
|
4957
|
-
function
|
|
5093
|
+
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; }; }();
|
|
4958
5094
|
|
|
4959
|
-
function
|
|
5095
|
+
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; };
|
|
4960
5096
|
|
|
4961
|
-
function
|
|
4962
|
-
|
|
4963
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
4964
|
-
|
|
4965
|
-
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); }; }
|
|
4966
|
-
|
|
4967
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
4968
|
-
|
|
4969
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
4970
|
-
|
|
4971
|
-
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; } }
|
|
4972
|
-
|
|
4973
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
4974
|
-
|
|
4975
|
-
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); }
|
|
5097
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
4976
5098
|
|
|
4977
|
-
function
|
|
5099
|
+
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; }
|
|
4978
5100
|
|
|
4979
|
-
function
|
|
5101
|
+
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; }
|
|
4980
5102
|
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
*
|
|
4986
|
-
*
|
|
4987
|
-
* @param {Object} prevProps
|
|
4988
|
-
* @param {Object} props
|
|
5103
|
+
/**
|
|
5104
|
+
* Check whether a `props` change should result in the video being updated.
|
|
5105
|
+
*
|
|
5106
|
+
* @param {Object} prevProps
|
|
5107
|
+
* @param {Object} props
|
|
4989
5108
|
*/
|
|
4990
|
-
|
|
4991
5109
|
function shouldUpdateVideo(prevProps, props) {
|
|
4992
5110
|
// A changing video should always trigger an update
|
|
4993
5111
|
if (prevProps.videoId !== props.videoId) {
|
|
4994
5112
|
return true;
|
|
4995
|
-
}
|
|
4996
|
-
// update.
|
|
4997
|
-
|
|
5113
|
+
}
|
|
4998
5114
|
|
|
5115
|
+
// Otherwise, a change in the start/end time playerVars also requires a player
|
|
5116
|
+
// update.
|
|
4999
5117
|
var prevVars = prevProps.opts.playerVars || {};
|
|
5000
5118
|
var vars = props.opts.playerVars || {};
|
|
5119
|
+
|
|
5001
5120
|
return prevVars.start !== vars.start || prevVars.end !== vars.end;
|
|
5002
5121
|
}
|
|
5003
|
-
/**
|
|
5004
|
-
* Neutralize API options that only require a video update, leaving only options
|
|
5005
|
-
* that require a player reset. The results can then be compared to see if a
|
|
5006
|
-
* player reset is necessary.
|
|
5007
|
-
*
|
|
5008
|
-
* @param {Object} opts
|
|
5009
|
-
*/
|
|
5010
|
-
|
|
5011
5122
|
|
|
5123
|
+
/**
|
|
5124
|
+
* Neutralise API options that only require a video update, leaving only options
|
|
5125
|
+
* that require a player reset. The results can then be compared to see if a
|
|
5126
|
+
* player reset is necessary.
|
|
5127
|
+
*
|
|
5128
|
+
* @param {Object} opts
|
|
5129
|
+
*/
|
|
5012
5130
|
function filterResetOptions(opts) {
|
|
5013
|
-
return
|
|
5014
|
-
playerVars:
|
|
5131
|
+
return _extends({}, opts, {
|
|
5132
|
+
playerVars: _extends({}, opts.playerVars, {
|
|
5015
5133
|
autoplay: 0,
|
|
5016
5134
|
start: 0,
|
|
5017
5135
|
end: 0
|
|
5018
5136
|
})
|
|
5019
5137
|
});
|
|
5020
5138
|
}
|
|
5021
|
-
/**
|
|
5022
|
-
* Check whether a `props` change should result in the player being reset.
|
|
5023
|
-
* The player is reset when the `props.opts` change, except if the only change
|
|
5024
|
-
* is in the `start` and `end` playerVars, because a video update can deal with
|
|
5025
|
-
* those.
|
|
5026
|
-
*
|
|
5027
|
-
* @param {Object} prevProps
|
|
5028
|
-
* @param {Object} props
|
|
5029
|
-
*/
|
|
5030
|
-
|
|
5031
5139
|
|
|
5140
|
+
/**
|
|
5141
|
+
* Check whether a `props` change should result in the player being reset.
|
|
5142
|
+
* The player is reset when the `props.opts` change, except if the only change
|
|
5143
|
+
* is in the `start` and `end` playerVars, because a video update can deal with
|
|
5144
|
+
* those.
|
|
5145
|
+
*
|
|
5146
|
+
* @param {Object} prevProps
|
|
5147
|
+
* @param {Object} props
|
|
5148
|
+
*/
|
|
5032
5149
|
function shouldResetPlayer(prevProps, props) {
|
|
5033
5150
|
return !fastDeepEqual(filterResetOptions(prevProps.opts), filterResetOptions(props.opts));
|
|
5034
5151
|
}
|
|
5035
|
-
/**
|
|
5036
|
-
* Check whether a props change should result in an id or className update.
|
|
5037
|
-
*
|
|
5038
|
-
* @param {Object} prevProps
|
|
5039
|
-
* @param {Object} props
|
|
5040
|
-
*/
|
|
5041
|
-
|
|
5042
5152
|
|
|
5153
|
+
/**
|
|
5154
|
+
* Check whether a props change should result in an id or className update.
|
|
5155
|
+
*
|
|
5156
|
+
* @param {Object} prevProps
|
|
5157
|
+
* @param {Object} props
|
|
5158
|
+
*/
|
|
5043
5159
|
function shouldUpdatePlayer(prevProps, props) {
|
|
5044
5160
|
return prevProps.id !== props.id || prevProps.className !== props.className;
|
|
5045
5161
|
}
|
|
5046
5162
|
|
|
5047
|
-
var YouTube =
|
|
5163
|
+
var YouTube = function (_React$Component) {
|
|
5048
5164
|
_inherits(YouTube, _React$Component);
|
|
5049
5165
|
|
|
5050
|
-
var _super = _createSuper(YouTube);
|
|
5051
|
-
|
|
5052
|
-
/**
|
|
5053
|
-
* Expose PlayerState constants for convenience. These constants can also be
|
|
5054
|
-
* accessed through the global YT object after the YouTube IFrame API is instantiated.
|
|
5055
|
-
* https://developers.google.com/youtube/iframe_api_reference#onStateChange
|
|
5056
|
-
*/
|
|
5057
5166
|
function YouTube(props) {
|
|
5058
|
-
var _this;
|
|
5059
|
-
|
|
5060
5167
|
_classCallCheck(this, YouTube);
|
|
5061
5168
|
|
|
5062
|
-
_this =
|
|
5169
|
+
var _this = _possibleConstructorReturn(this, (YouTube.__proto__ || Object.getPrototypeOf(YouTube)).call(this, props));
|
|
5063
5170
|
|
|
5064
|
-
|
|
5171
|
+
_this.onPlayerReady = function (event) {
|
|
5065
5172
|
return _this.props.onReady(event);
|
|
5066
|
-
}
|
|
5173
|
+
};
|
|
5067
5174
|
|
|
5068
|
-
|
|
5175
|
+
_this.onPlayerError = function (event) {
|
|
5069
5176
|
return _this.props.onError(event);
|
|
5070
|
-
}
|
|
5177
|
+
};
|
|
5071
5178
|
|
|
5072
|
-
|
|
5179
|
+
_this.onPlayerStateChange = function (event) {
|
|
5073
5180
|
_this.props.onStateChange(event);
|
|
5074
|
-
|
|
5075
5181
|
switch (event.data) {
|
|
5182
|
+
|
|
5076
5183
|
case YouTube.PlayerState.ENDED:
|
|
5077
5184
|
_this.props.onEnd(event);
|
|
5078
|
-
|
|
5079
5185
|
break;
|
|
5080
5186
|
|
|
5081
5187
|
case YouTube.PlayerState.PLAYING:
|
|
5082
5188
|
_this.props.onPlay(event);
|
|
5083
|
-
|
|
5084
5189
|
break;
|
|
5085
5190
|
|
|
5086
5191
|
case YouTube.PlayerState.PAUSED:
|
|
5087
5192
|
_this.props.onPause(event);
|
|
5088
|
-
|
|
5089
5193
|
break;
|
|
5090
5194
|
}
|
|
5091
|
-
}
|
|
5195
|
+
};
|
|
5092
5196
|
|
|
5093
|
-
|
|
5197
|
+
_this.onPlayerPlaybackRateChange = function (event) {
|
|
5094
5198
|
return _this.props.onPlaybackRateChange(event);
|
|
5095
|
-
}
|
|
5199
|
+
};
|
|
5096
5200
|
|
|
5097
|
-
|
|
5201
|
+
_this.onPlayerPlaybackQualityChange = function (event) {
|
|
5098
5202
|
return _this.props.onPlaybackQualityChange(event);
|
|
5099
|
-
}
|
|
5203
|
+
};
|
|
5100
5204
|
|
|
5101
|
-
|
|
5205
|
+
_this.createPlayer = function () {
|
|
5102
5206
|
// do not attempt to create a player server-side, it won't work
|
|
5103
|
-
if (typeof document === 'undefined') return;
|
|
5104
|
-
|
|
5105
|
-
var playerOpts =
|
|
5207
|
+
if (typeof document === 'undefined') return;
|
|
5208
|
+
// create player
|
|
5209
|
+
var playerOpts = _extends({}, _this.props.opts, {
|
|
5106
5210
|
// preload the `videoId` video if one is already given
|
|
5107
5211
|
videoId: _this.props.videoId
|
|
5108
5212
|
});
|
|
5109
|
-
|
|
5110
|
-
|
|
5111
|
-
|
|
5213
|
+
_this.internalPlayer = youTubePlayer(_this.container, playerOpts);
|
|
5214
|
+
// attach event handlers
|
|
5112
5215
|
_this.internalPlayer.on('ready', _this.onPlayerReady);
|
|
5113
|
-
|
|
5114
5216
|
_this.internalPlayer.on('error', _this.onPlayerError);
|
|
5115
|
-
|
|
5116
5217
|
_this.internalPlayer.on('stateChange', _this.onPlayerStateChange);
|
|
5117
|
-
|
|
5118
5218
|
_this.internalPlayer.on('playbackRateChange', _this.onPlayerPlaybackRateChange);
|
|
5119
|
-
|
|
5120
5219
|
_this.internalPlayer.on('playbackQualityChange', _this.onPlayerPlaybackQualityChange);
|
|
5121
|
-
}
|
|
5220
|
+
};
|
|
5122
5221
|
|
|
5123
|
-
|
|
5222
|
+
_this.resetPlayer = function () {
|
|
5124
5223
|
return _this.internalPlayer.destroy().then(_this.createPlayer);
|
|
5125
|
-
}
|
|
5224
|
+
};
|
|
5126
5225
|
|
|
5127
|
-
|
|
5226
|
+
_this.updatePlayer = function () {
|
|
5128
5227
|
_this.internalPlayer.getIframe().then(function (iframe) {
|
|
5129
5228
|
if (_this.props.id) iframe.setAttribute('id', _this.props.id);else iframe.removeAttribute('id');
|
|
5130
5229
|
if (_this.props.className) iframe.setAttribute('class', _this.props.className);else iframe.removeAttribute('class');
|
|
5131
5230
|
});
|
|
5132
|
-
}
|
|
5231
|
+
};
|
|
5133
5232
|
|
|
5134
|
-
|
|
5233
|
+
_this.updateVideo = function () {
|
|
5135
5234
|
if (typeof _this.props.videoId === 'undefined' || _this.props.videoId === null) {
|
|
5136
5235
|
_this.internalPlayer.stopVideo();
|
|
5137
|
-
|
|
5138
5236
|
return;
|
|
5139
|
-
}
|
|
5140
|
-
|
|
5237
|
+
}
|
|
5141
5238
|
|
|
5239
|
+
// set queueing options
|
|
5142
5240
|
var autoplay = false;
|
|
5143
5241
|
var opts = {
|
|
5144
5242
|
videoId: _this.props.videoId
|
|
5145
5243
|
};
|
|
5146
|
-
|
|
5147
5244
|
if ('playerVars' in _this.props.opts) {
|
|
5148
5245
|
autoplay = _this.props.opts.playerVars.autoplay === 1;
|
|
5149
|
-
|
|
5150
5246
|
if ('start' in _this.props.opts.playerVars) {
|
|
5151
5247
|
opts.startSeconds = _this.props.opts.playerVars.start;
|
|
5152
5248
|
}
|
|
5153
|
-
|
|
5154
5249
|
if ('end' in _this.props.opts.playerVars) {
|
|
5155
5250
|
opts.endSeconds = _this.props.opts.playerVars.end;
|
|
5156
5251
|
}
|
|
5157
|
-
}
|
|
5158
|
-
|
|
5252
|
+
}
|
|
5159
5253
|
|
|
5254
|
+
// if autoplay is enabled loadVideoById
|
|
5160
5255
|
if (autoplay) {
|
|
5161
5256
|
_this.internalPlayer.loadVideoById(opts);
|
|
5162
|
-
|
|
5163
5257
|
return;
|
|
5164
|
-
}
|
|
5165
|
-
|
|
5166
|
-
|
|
5258
|
+
}
|
|
5259
|
+
// default behaviour just cues the video
|
|
5167
5260
|
_this.internalPlayer.cueVideoById(opts);
|
|
5168
|
-
}
|
|
5261
|
+
};
|
|
5169
5262
|
|
|
5170
|
-
|
|
5263
|
+
_this.refContainer = function (container) {
|
|
5171
5264
|
_this.container = container;
|
|
5172
|
-
}
|
|
5265
|
+
};
|
|
5173
5266
|
|
|
5174
5267
|
_this.container = null;
|
|
5175
5268
|
_this.internalPlayer = null;
|
|
5176
5269
|
return _this;
|
|
5177
5270
|
}
|
|
5178
5271
|
|
|
5272
|
+
/**
|
|
5273
|
+
* Expose PlayerState constants for convenience. These constants can also be
|
|
5274
|
+
* accessed through the global YT object after the YouTube IFrame API is instantiated.
|
|
5275
|
+
* https://developers.google.com/youtube/iframe_api_reference#onStateChange
|
|
5276
|
+
*/
|
|
5277
|
+
|
|
5278
|
+
|
|
5179
5279
|
_createClass(YouTube, [{
|
|
5180
|
-
key:
|
|
5280
|
+
key: 'componentDidMount',
|
|
5181
5281
|
value: function componentDidMount() {
|
|
5182
5282
|
this.createPlayer();
|
|
5183
5283
|
}
|
|
5184
5284
|
}, {
|
|
5185
|
-
key:
|
|
5285
|
+
key: 'componentDidUpdate',
|
|
5186
5286
|
value: function componentDidUpdate(prevProps) {
|
|
5187
5287
|
if (shouldUpdatePlayer(prevProps, this.props)) {
|
|
5188
5288
|
this.updatePlayer();
|
|
@@ -5197,58 +5297,112 @@ var YouTube = /*#__PURE__*/function (_React$Component) {
|
|
|
5197
5297
|
}
|
|
5198
5298
|
}
|
|
5199
5299
|
}, {
|
|
5200
|
-
key:
|
|
5300
|
+
key: 'componentWillUnmount',
|
|
5201
5301
|
value: function componentWillUnmount() {
|
|
5202
|
-
/**
|
|
5203
|
-
* Note: The `youtube-player` package that is used promisifies all
|
|
5204
|
-
* Player API calls, which introduces a delay of a tick before it actually
|
|
5205
|
-
* gets destroyed. Since React attempts to remove the element instantly
|
|
5206
|
-
* this method isn't quick enough to reset the container element.
|
|
5302
|
+
/**
|
|
5303
|
+
* Note: The `youtube-player` package that is used promisifies all Youtube
|
|
5304
|
+
* Player API calls, which introduces a delay of a tick before it actually
|
|
5305
|
+
* gets destroyed. Since React attempts to remove the element instantly
|
|
5306
|
+
* this method isn't quick enough to reset the container element.
|
|
5207
5307
|
*/
|
|
5208
5308
|
this.internalPlayer.destroy();
|
|
5209
5309
|
}
|
|
5210
|
-
|
|
5211
|
-
|
|
5212
|
-
*
|
|
5213
|
-
*
|
|
5214
|
-
*
|
|
5310
|
+
|
|
5311
|
+
/**
|
|
5312
|
+
* https://developers.google.com/youtube/iframe_api_reference#onReady
|
|
5313
|
+
*
|
|
5314
|
+
* @param {Object} event
|
|
5315
|
+
* @param {Object} target - player object
|
|
5316
|
+
*/
|
|
5317
|
+
|
|
5318
|
+
|
|
5319
|
+
/**
|
|
5320
|
+
* https://developers.google.com/youtube/iframe_api_reference#onError
|
|
5321
|
+
*
|
|
5322
|
+
* @param {Object} event
|
|
5323
|
+
* @param {Integer} data - error type
|
|
5324
|
+
* @param {Object} target - player object
|
|
5325
|
+
*/
|
|
5326
|
+
|
|
5327
|
+
|
|
5328
|
+
/**
|
|
5329
|
+
* https://developers.google.com/youtube/iframe_api_reference#onStateChange
|
|
5330
|
+
*
|
|
5331
|
+
* @param {Object} event
|
|
5332
|
+
* @param {Integer} data - status change type
|
|
5333
|
+
* @param {Object} target - actual YT player
|
|
5334
|
+
*/
|
|
5335
|
+
|
|
5336
|
+
|
|
5337
|
+
/**
|
|
5338
|
+
* https://developers.google.com/youtube/iframe_api_reference#onPlaybackRateChange
|
|
5339
|
+
*
|
|
5340
|
+
* @param {Object} event
|
|
5341
|
+
* @param {Float} data - playback rate
|
|
5342
|
+
* @param {Object} target - actual YT player
|
|
5343
|
+
*/
|
|
5344
|
+
|
|
5345
|
+
|
|
5346
|
+
/**
|
|
5347
|
+
* https://developers.google.com/youtube/iframe_api_reference#onPlaybackQualityChange
|
|
5348
|
+
*
|
|
5349
|
+
* @param {Object} event
|
|
5350
|
+
* @param {String} data - playback quality
|
|
5351
|
+
* @param {Object} target - actual YT player
|
|
5352
|
+
*/
|
|
5353
|
+
|
|
5354
|
+
|
|
5355
|
+
/**
|
|
5356
|
+
* Initialize the Youtube Player API on the container and attach event handlers
|
|
5357
|
+
*/
|
|
5358
|
+
|
|
5359
|
+
|
|
5360
|
+
/**
|
|
5361
|
+
* Shorthand for destroying and then re-creating the Youtube Player
|
|
5362
|
+
*/
|
|
5363
|
+
|
|
5364
|
+
|
|
5365
|
+
/**
|
|
5366
|
+
* Method to update the id and class of the Youtube Player iframe.
|
|
5367
|
+
* React should update this automatically but since the Youtube Player API
|
|
5368
|
+
* replaced the DIV that is mounted by React we need to do this manually.
|
|
5369
|
+
*/
|
|
5370
|
+
|
|
5371
|
+
|
|
5372
|
+
/**
|
|
5373
|
+
* Call Youtube Player API methods to update the currently playing video.
|
|
5374
|
+
* Depeding on the `opts.playerVars.autoplay` this function uses one of two
|
|
5375
|
+
* Youtube Player API methods to update the video.
|
|
5215
5376
|
*/
|
|
5216
5377
|
|
|
5217
5378
|
}, {
|
|
5218
|
-
key:
|
|
5379
|
+
key: 'render',
|
|
5219
5380
|
value: function render() {
|
|
5220
|
-
return
|
|
5221
|
-
|
|
5222
|
-
|
|
5223
|
-
id: this.props.id,
|
|
5224
|
-
|
|
5225
|
-
ref: this.refContainer
|
|
5226
|
-
}));
|
|
5381
|
+
return React__default.createElement(
|
|
5382
|
+
'div',
|
|
5383
|
+
{ className: this.props.containerClassName },
|
|
5384
|
+
React__default.createElement('div', { id: this.props.id, className: this.props.className, ref: this.refContainer })
|
|
5385
|
+
);
|
|
5227
5386
|
}
|
|
5228
5387
|
}]);
|
|
5229
5388
|
|
|
5230
5389
|
return YouTube;
|
|
5231
5390
|
}(React__default.Component);
|
|
5232
5391
|
|
|
5233
|
-
_defineProperty(YouTube, "PlayerState", {
|
|
5234
|
-
UNSTARTED: -1,
|
|
5235
|
-
ENDED: 0,
|
|
5236
|
-
PLAYING: 1,
|
|
5237
|
-
PAUSED: 2,
|
|
5238
|
-
BUFFERING: 3,
|
|
5239
|
-
CUED: 5
|
|
5240
|
-
});
|
|
5241
|
-
|
|
5242
5392
|
YouTube.propTypes = {
|
|
5243
5393
|
videoId: PropTypes.string,
|
|
5394
|
+
|
|
5244
5395
|
// custom ID for player element
|
|
5245
5396
|
id: PropTypes.string,
|
|
5397
|
+
|
|
5246
5398
|
// custom class name for player element
|
|
5247
5399
|
className: PropTypes.string,
|
|
5248
5400
|
// custom class name for player container element
|
|
5249
5401
|
containerClassName: PropTypes.string,
|
|
5402
|
+
|
|
5250
5403
|
// https://developers.google.com/youtube/iframe_api_reference#Loading_a_Video_Player
|
|
5251
5404
|
opts: PropTypes.objectOf(PropTypes.any),
|
|
5405
|
+
|
|
5252
5406
|
// event subscriptions
|
|
5253
5407
|
onReady: PropTypes.func,
|
|
5254
5408
|
onError: PropTypes.func,
|
|
@@ -5260,7 +5414,6 @@ YouTube.propTypes = {
|
|
|
5260
5414
|
onPlaybackQualityChange: PropTypes.func
|
|
5261
5415
|
};
|
|
5262
5416
|
YouTube.defaultProps = {
|
|
5263
|
-
videoId: null,
|
|
5264
5417
|
id: null,
|
|
5265
5418
|
className: null,
|
|
5266
5419
|
opts: {},
|
|
@@ -5274,6 +5427,14 @@ YouTube.defaultProps = {
|
|
|
5274
5427
|
onPlaybackRateChange: function onPlaybackRateChange() {},
|
|
5275
5428
|
onPlaybackQualityChange: function onPlaybackQualityChange() {}
|
|
5276
5429
|
};
|
|
5430
|
+
YouTube.PlayerState = {
|
|
5431
|
+
UNSTARTED: -1,
|
|
5432
|
+
ENDED: 0,
|
|
5433
|
+
PLAYING: 1,
|
|
5434
|
+
PAUSED: 2,
|
|
5435
|
+
BUFFERING: 3,
|
|
5436
|
+
CUED: 5
|
|
5437
|
+
};
|
|
5277
5438
|
|
|
5278
5439
|
var YouTubePlayer = function YouTubePlayer(_ref) {
|
|
5279
5440
|
var url = _ref.url;
|
|
@@ -6308,8 +6469,8 @@ var window_1 = win;
|
|
|
6308
6469
|
|
|
6309
6470
|
/*! @name @brightcove/react-player-loader @version 1.4.0 @license Apache-2.0 */
|
|
6310
6471
|
|
|
6311
|
-
function _extends() {
|
|
6312
|
-
_extends = Object.assign || function (target) {
|
|
6472
|
+
function _extends$1() {
|
|
6473
|
+
_extends$1 = Object.assign || function (target) {
|
|
6313
6474
|
for (var i = 1; i < arguments.length; i++) {
|
|
6314
6475
|
var source = arguments[i];
|
|
6315
6476
|
|
|
@@ -6323,7 +6484,7 @@ function _extends() {
|
|
|
6323
6484
|
return target;
|
|
6324
6485
|
};
|
|
6325
6486
|
|
|
6326
|
-
return _extends.apply(this, arguments);
|
|
6487
|
+
return _extends$1.apply(this, arguments);
|
|
6327
6488
|
}
|
|
6328
6489
|
|
|
6329
6490
|
function _inheritsLoose(subClass, superClass) {
|
|
@@ -6332,7 +6493,7 @@ function _inheritsLoose(subClass, superClass) {
|
|
|
6332
6493
|
subClass.__proto__ = superClass;
|
|
6333
6494
|
}
|
|
6334
6495
|
|
|
6335
|
-
function _assertThisInitialized
|
|
6496
|
+
function _assertThisInitialized(self) {
|
|
6336
6497
|
if (self === void 0) {
|
|
6337
6498
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
6338
6499
|
}
|
|
@@ -6342,8 +6503,8 @@ function _assertThisInitialized$1(self) {
|
|
|
6342
6503
|
|
|
6343
6504
|
/*! @name @brightcove/player-loader @version 1.7.1 @license Apache-2.0 */
|
|
6344
6505
|
|
|
6345
|
-
function _extends$1() {
|
|
6346
|
-
_extends$1 = Object.assign || function (target) {
|
|
6506
|
+
function _extends$1$1() {
|
|
6507
|
+
_extends$1$1 = Object.assign || function (target) {
|
|
6347
6508
|
for (var i = 1; i < arguments.length; i++) {
|
|
6348
6509
|
var source = arguments[i];
|
|
6349
6510
|
|
|
@@ -6357,7 +6518,7 @@ function _extends$1() {
|
|
|
6357
6518
|
return target;
|
|
6358
6519
|
};
|
|
6359
6520
|
|
|
6360
|
-
return _extends$1.apply(this, arguments);
|
|
6521
|
+
return _extends$1$1.apply(this, arguments);
|
|
6361
6522
|
}
|
|
6362
6523
|
|
|
6363
6524
|
var version$1 = "1.7.1";
|
|
@@ -6365,7 +6526,7 @@ var version$1 = "1.7.1";
|
|
|
6365
6526
|
/*! @name @brightcove/player-url @version 1.2.0 @license Apache-2.0 */
|
|
6366
6527
|
var version$1$1 = "1.2.0";
|
|
6367
6528
|
|
|
6368
|
-
var _typeof
|
|
6529
|
+
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
|
|
6369
6530
|
return typeof obj;
|
|
6370
6531
|
} : function (obj) {
|
|
6371
6532
|
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
@@ -6500,7 +6661,7 @@ var brightcovePlayerUrl = function brightcovePlayerUrl(_ref) {
|
|
|
6500
6661
|
|
|
6501
6662
|
var qs = '';
|
|
6502
6663
|
|
|
6503
|
-
if (iframe && queryParams && (typeof queryParams === 'undefined' ? 'undefined' : _typeof
|
|
6664
|
+
if (iframe && queryParams && (typeof queryParams === 'undefined' ? 'undefined' : _typeof(queryParams)) === 'object') {
|
|
6504
6665
|
qs = getQueryString(queryParams);
|
|
6505
6666
|
}
|
|
6506
6667
|
|
|
@@ -6734,7 +6895,7 @@ var wrapResponsive = function wrapResponsive(embedType, embedOptions, el) {
|
|
|
6734
6895
|
el.style.width = '100%';
|
|
6735
6896
|
el.style.height = '100%';
|
|
6736
6897
|
|
|
6737
|
-
var responsive = _extends$1({
|
|
6898
|
+
var responsive = _extends$1$1({
|
|
6738
6899
|
aspectRatio: DEFAULT_ASPECT_RATIO,
|
|
6739
6900
|
iframeHorizontalPlaylist: DEFAULT_IFRAME_HORIZONTAL_PLAYLIST,
|
|
6740
6901
|
maxWidth: DEFAULT_MAX_WIDTH
|
|
@@ -7419,7 +7580,7 @@ var loadPlayer = function loadPlayer(params, resolve, reject) {
|
|
|
7419
7580
|
|
|
7420
7581
|
|
|
7421
7582
|
var brightcovePlayerLoader = function brightcovePlayerLoader(parameters) {
|
|
7422
|
-
var params = _extends$1({}, DEFAULTS, parameters);
|
|
7583
|
+
var params = _extends$1$1({}, DEFAULTS, parameters);
|
|
7423
7584
|
|
|
7424
7585
|
var Promise = params.Promise,
|
|
7425
7586
|
onSuccess = params.onSuccess,
|
|
@@ -7561,7 +7722,7 @@ function (_React$Component) {
|
|
|
7561
7722
|
_this.refNode = ref;
|
|
7562
7723
|
};
|
|
7563
7724
|
|
|
7564
|
-
_this.loadPlayer = _this.loadPlayer.bind(_assertThisInitialized
|
|
7725
|
+
_this.loadPlayer = _this.loadPlayer.bind(_assertThisInitialized(_this));
|
|
7565
7726
|
return _this;
|
|
7566
7727
|
}
|
|
7567
7728
|
/**
|
|
@@ -7582,7 +7743,7 @@ function (_React$Component) {
|
|
|
7582
7743
|
var userSuccess = this.props.onSuccess;
|
|
7583
7744
|
var userFailure = this.props.onFailure;
|
|
7584
7745
|
|
|
7585
|
-
var options = _extends({}, this.props, {
|
|
7746
|
+
var options = _extends$1({}, this.props, {
|
|
7586
7747
|
refNode: this.refNode,
|
|
7587
7748
|
refNodeInsert: 'append',
|
|
7588
7749
|
onSuccess: function onSuccess(_ref) {
|
|
@@ -7891,7 +8052,7 @@ function (_React$Component) {
|
|
|
7891
8052
|
;
|
|
7892
8053
|
|
|
7893
8054
|
_proto.render = function render() {
|
|
7894
|
-
var props = _extends({
|
|
8055
|
+
var props = _extends$1({
|
|
7895
8056
|
className: 'brightcove-react-player-loader'
|
|
7896
8057
|
}, this.props.attrs, {
|
|
7897
8058
|
ref: this.setRefNode
|
|
@@ -8305,17 +8466,11 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
|
8305
8466
|
|
|
8306
8467
|
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; }
|
|
8307
8468
|
|
|
8308
|
-
function
|
|
8309
|
-
|
|
8310
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8311
|
-
|
|
8312
|
-
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."); }
|
|
8313
|
-
|
|
8314
|
-
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); }
|
|
8469
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
|
|
8315
8470
|
|
|
8316
|
-
function
|
|
8471
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
|
|
8317
8472
|
|
|
8318
|
-
function _iterableToArrayLimit(arr, i) { if (
|
|
8473
|
+
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; }
|
|
8319
8474
|
|
|
8320
8475
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
8321
8476
|
|
|
@@ -8445,12 +8600,12 @@ function getSDK(url, sdkGlobal) {
|
|
|
8445
8600
|
|
|
8446
8601
|
function getConfig(props$1, defaultProps, showWarning) {
|
|
8447
8602
|
var config = (0, _deepmerge["default"])(defaultProps.config, props$1.config);
|
|
8448
|
-
|
|
8449
|
-
var
|
|
8450
|
-
|
|
8603
|
+
var _iteratorNormalCompletion = true;
|
|
8604
|
+
var _didIteratorError = false;
|
|
8605
|
+
var _iteratorError = undefined;
|
|
8451
8606
|
|
|
8452
8607
|
try {
|
|
8453
|
-
for (_iterator.
|
|
8608
|
+
for (var _iterator = props.DEPRECATED_CONFIG_PROPS[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
8454
8609
|
var p = _step.value;
|
|
8455
8610
|
|
|
8456
8611
|
if (props$1[p]) {
|
|
@@ -8465,9 +8620,18 @@ function getConfig(props$1, defaultProps, showWarning) {
|
|
|
8465
8620
|
}
|
|
8466
8621
|
}
|
|
8467
8622
|
} catch (err) {
|
|
8468
|
-
|
|
8623
|
+
_didIteratorError = true;
|
|
8624
|
+
_iteratorError = err;
|
|
8469
8625
|
} finally {
|
|
8470
|
-
|
|
8626
|
+
try {
|
|
8627
|
+
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
|
|
8628
|
+
_iterator["return"]();
|
|
8629
|
+
}
|
|
8630
|
+
} finally {
|
|
8631
|
+
if (_didIteratorError) {
|
|
8632
|
+
throw _iteratorError;
|
|
8633
|
+
}
|
|
8634
|
+
}
|
|
8471
8635
|
}
|
|
8472
8636
|
|
|
8473
8637
|
return config;
|
|
@@ -8614,16 +8778,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
8614
8778
|
|
|
8615
8779
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
8616
8780
|
|
|
8617
|
-
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); }; }
|
|
8618
|
-
|
|
8619
8781
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
8620
8782
|
|
|
8621
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
8622
|
-
|
|
8623
|
-
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; } }
|
|
8624
|
-
|
|
8625
8783
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
8626
8784
|
|
|
8785
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
8786
|
+
|
|
8627
8787
|
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); }
|
|
8628
8788
|
|
|
8629
8789
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -8632,12 +8792,14 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
8632
8792
|
|
|
8633
8793
|
var SEEK_ON_PLAY_EXPIRY = 5000;
|
|
8634
8794
|
|
|
8635
|
-
var Player =
|
|
8795
|
+
var Player =
|
|
8796
|
+
/*#__PURE__*/
|
|
8797
|
+
function (_Component) {
|
|
8636
8798
|
_inherits(Player, _Component);
|
|
8637
8799
|
|
|
8638
|
-
var _super = _createSuper(Player);
|
|
8639
|
-
|
|
8640
8800
|
function Player() {
|
|
8801
|
+
var _getPrototypeOf2;
|
|
8802
|
+
|
|
8641
8803
|
var _this;
|
|
8642
8804
|
|
|
8643
8805
|
_classCallCheck(this, Player);
|
|
@@ -8646,7 +8808,7 @@ var Player = /*#__PURE__*/function (_Component) {
|
|
|
8646
8808
|
_args[_key] = arguments[_key];
|
|
8647
8809
|
}
|
|
8648
8810
|
|
|
8649
|
-
_this =
|
|
8811
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Player)).call.apply(_getPrototypeOf2, [this].concat(_args)));
|
|
8650
8812
|
|
|
8651
8813
|
_defineProperty(_assertThisInitialized(_this), "mounted", false);
|
|
8652
8814
|
|
|
@@ -8971,7 +9133,7 @@ var Player = /*#__PURE__*/function (_Component) {
|
|
|
8971
9133
|
return null;
|
|
8972
9134
|
}
|
|
8973
9135
|
|
|
8974
|
-
return
|
|
9136
|
+
return _react["default"].createElement(Player, _extends({}, this.props, {
|
|
8975
9137
|
ref: this.ref,
|
|
8976
9138
|
onReady: this.handleReady,
|
|
8977
9139
|
onPlay: this.handlePlay,
|
|
@@ -9032,16 +9194,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
9032
9194
|
|
|
9033
9195
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
9034
9196
|
|
|
9035
|
-
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); }; }
|
|
9036
|
-
|
|
9037
9197
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
9038
9198
|
|
|
9039
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9040
|
-
|
|
9041
|
-
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; } }
|
|
9042
|
-
|
|
9043
9199
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
9044
9200
|
|
|
9201
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9202
|
+
|
|
9045
9203
|
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); }
|
|
9046
9204
|
|
|
9047
9205
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -9053,12 +9211,14 @@ var SUPPORTED_PROPS = Object.keys(props.propTypes);
|
|
|
9053
9211
|
function createSinglePlayer(activePlayer) {
|
|
9054
9212
|
var _class, _temp;
|
|
9055
9213
|
|
|
9056
|
-
return _temp = _class =
|
|
9214
|
+
return _temp = _class =
|
|
9215
|
+
/*#__PURE__*/
|
|
9216
|
+
function (_Component) {
|
|
9057
9217
|
_inherits(SinglePlayer, _Component);
|
|
9058
9218
|
|
|
9059
|
-
var _super = _createSuper(SinglePlayer);
|
|
9060
|
-
|
|
9061
9219
|
function SinglePlayer() {
|
|
9220
|
+
var _getPrototypeOf2;
|
|
9221
|
+
|
|
9062
9222
|
var _this;
|
|
9063
9223
|
|
|
9064
9224
|
_classCallCheck(this, SinglePlayer);
|
|
@@ -9067,7 +9227,7 @@ function createSinglePlayer(activePlayer) {
|
|
|
9067
9227
|
args[_key] = arguments[_key];
|
|
9068
9228
|
}
|
|
9069
9229
|
|
|
9070
|
-
_this =
|
|
9230
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(SinglePlayer)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
9071
9231
|
|
|
9072
9232
|
_defineProperty(_assertThisInitialized(_this), "config", (0, utils.getConfig)(_this.props, props.defaultProps, true));
|
|
9073
9233
|
|
|
@@ -9135,12 +9295,12 @@ function createSinglePlayer(activePlayer) {
|
|
|
9135
9295
|
height = _this$props.height,
|
|
9136
9296
|
Wrapper = _this$props.wrapper;
|
|
9137
9297
|
var otherProps = (0, utils.omit)(this.props, SUPPORTED_PROPS, props.DEPRECATED_CONFIG_PROPS);
|
|
9138
|
-
return
|
|
9298
|
+
return _react["default"].createElement(Wrapper, _extends({
|
|
9139
9299
|
style: _objectSpread({}, style, {
|
|
9140
9300
|
width: width,
|
|
9141
9301
|
height: height
|
|
9142
9302
|
})
|
|
9143
|
-
}, otherProps),
|
|
9303
|
+
}, otherProps), _react["default"].createElement(_Player["default"], _extends({}, this.props, {
|
|
9144
9304
|
ref: this.ref,
|
|
9145
9305
|
activePlayer: activePlayer,
|
|
9146
9306
|
config: this.config
|
|
@@ -9186,31 +9346,23 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
9186
9346
|
|
|
9187
9347
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
9188
9348
|
|
|
9189
|
-
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); }; }
|
|
9190
|
-
|
|
9191
9349
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
9192
9350
|
|
|
9193
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9194
|
-
|
|
9195
|
-
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; } }
|
|
9196
|
-
|
|
9197
9351
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
9198
9352
|
|
|
9353
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9354
|
+
|
|
9199
9355
|
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); }
|
|
9200
9356
|
|
|
9201
9357
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
9202
9358
|
|
|
9203
9359
|
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; }
|
|
9204
9360
|
|
|
9205
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) ||
|
|
9206
|
-
|
|
9207
|
-
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."); }
|
|
9208
|
-
|
|
9209
|
-
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); }
|
|
9361
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
|
|
9210
9362
|
|
|
9211
|
-
function
|
|
9363
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
|
|
9212
9364
|
|
|
9213
|
-
function _iterableToArrayLimit(arr, i) { if (
|
|
9365
|
+
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; }
|
|
9214
9366
|
|
|
9215
9367
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
9216
9368
|
|
|
@@ -9235,12 +9387,14 @@ function parsePlaylist(url) {
|
|
|
9235
9387
|
return {};
|
|
9236
9388
|
}
|
|
9237
9389
|
|
|
9238
|
-
var YouTube =
|
|
9390
|
+
var YouTube =
|
|
9391
|
+
/*#__PURE__*/
|
|
9392
|
+
function (_Component) {
|
|
9239
9393
|
_inherits(YouTube, _Component);
|
|
9240
9394
|
|
|
9241
|
-
var _super = _createSuper(YouTube);
|
|
9242
|
-
|
|
9243
9395
|
function YouTube() {
|
|
9396
|
+
var _getPrototypeOf2;
|
|
9397
|
+
|
|
9244
9398
|
var _this;
|
|
9245
9399
|
|
|
9246
9400
|
_classCallCheck(this, YouTube);
|
|
@@ -9249,7 +9403,7 @@ var YouTube = /*#__PURE__*/function (_Component) {
|
|
|
9249
9403
|
args[_key] = arguments[_key];
|
|
9250
9404
|
}
|
|
9251
9405
|
|
|
9252
|
-
_this =
|
|
9406
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(YouTube)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
9253
9407
|
|
|
9254
9408
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
9255
9409
|
|
|
@@ -9437,9 +9591,9 @@ var YouTube = /*#__PURE__*/function (_Component) {
|
|
|
9437
9591
|
height: '100%',
|
|
9438
9592
|
display: display
|
|
9439
9593
|
};
|
|
9440
|
-
return
|
|
9594
|
+
return _react["default"].createElement("div", {
|
|
9441
9595
|
style: style
|
|
9442
|
-
},
|
|
9596
|
+
}, _react["default"].createElement("div", {
|
|
9443
9597
|
ref: this.ref
|
|
9444
9598
|
}));
|
|
9445
9599
|
}
|
|
@@ -9495,16 +9649,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
9495
9649
|
|
|
9496
9650
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
9497
9651
|
|
|
9498
|
-
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); }; }
|
|
9499
|
-
|
|
9500
9652
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
9501
9653
|
|
|
9502
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9503
|
-
|
|
9504
|
-
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; } }
|
|
9505
|
-
|
|
9506
9654
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
9507
9655
|
|
|
9656
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9657
|
+
|
|
9508
9658
|
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); }
|
|
9509
9659
|
|
|
9510
9660
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -9513,14 +9663,16 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
9513
9663
|
|
|
9514
9664
|
var SDK_URL = 'https://w.soundcloud.com/player/api.js';
|
|
9515
9665
|
var SDK_GLOBAL = 'SC';
|
|
9516
|
-
var MATCH_URL = /(
|
|
9666
|
+
var MATCH_URL = /(soundcloud\.com|snd\.sc)\/.+$/;
|
|
9517
9667
|
|
|
9518
|
-
var SoundCloud =
|
|
9668
|
+
var SoundCloud =
|
|
9669
|
+
/*#__PURE__*/
|
|
9670
|
+
function (_Component) {
|
|
9519
9671
|
_inherits(SoundCloud, _Component);
|
|
9520
9672
|
|
|
9521
|
-
var _super = _createSuper(SoundCloud);
|
|
9522
|
-
|
|
9523
9673
|
function SoundCloud() {
|
|
9674
|
+
var _getPrototypeOf2;
|
|
9675
|
+
|
|
9524
9676
|
var _this;
|
|
9525
9677
|
|
|
9526
9678
|
_classCallCheck(this, SoundCloud);
|
|
@@ -9529,7 +9681,7 @@ var SoundCloud = /*#__PURE__*/function (_Component) {
|
|
|
9529
9681
|
args[_key] = arguments[_key];
|
|
9530
9682
|
}
|
|
9531
9683
|
|
|
9532
|
-
_this =
|
|
9684
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(SoundCloud)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
9533
9685
|
|
|
9534
9686
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
9535
9687
|
|
|
@@ -9650,7 +9802,7 @@ var SoundCloud = /*#__PURE__*/function (_Component) {
|
|
|
9650
9802
|
height: '100%',
|
|
9651
9803
|
display: display
|
|
9652
9804
|
};
|
|
9653
|
-
return
|
|
9805
|
+
return _react["default"].createElement("iframe", {
|
|
9654
9806
|
ref: this.ref,
|
|
9655
9807
|
src: "https://w.soundcloud.com/player/?url=".concat(encodeURIComponent(this.props.url)),
|
|
9656
9808
|
style: style,
|
|
@@ -9712,16 +9864,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
9712
9864
|
|
|
9713
9865
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
9714
9866
|
|
|
9715
|
-
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); }; }
|
|
9716
|
-
|
|
9717
9867
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
9718
9868
|
|
|
9719
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9720
|
-
|
|
9721
|
-
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; } }
|
|
9722
|
-
|
|
9723
9869
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
9724
9870
|
|
|
9871
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9872
|
+
|
|
9725
9873
|
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); }
|
|
9726
9874
|
|
|
9727
9875
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -9733,12 +9881,14 @@ var SDK_GLOBAL = 'Vimeo';
|
|
|
9733
9881
|
var MATCH_URL = /vimeo\.com\/.+/;
|
|
9734
9882
|
var MATCH_FILE_URL = /vimeo\.com\/external\/[0-9]+\..+/;
|
|
9735
9883
|
|
|
9736
|
-
var Vimeo =
|
|
9884
|
+
var Vimeo =
|
|
9885
|
+
/*#__PURE__*/
|
|
9886
|
+
function (_Component) {
|
|
9737
9887
|
_inherits(Vimeo, _Component);
|
|
9738
9888
|
|
|
9739
|
-
var _super = _createSuper(Vimeo);
|
|
9740
|
-
|
|
9741
9889
|
function Vimeo() {
|
|
9890
|
+
var _getPrototypeOf2;
|
|
9891
|
+
|
|
9742
9892
|
var _this;
|
|
9743
9893
|
|
|
9744
9894
|
_classCallCheck(this, Vimeo);
|
|
@@ -9747,7 +9897,7 @@ var Vimeo = /*#__PURE__*/function (_Component) {
|
|
|
9747
9897
|
args[_key] = arguments[_key];
|
|
9748
9898
|
}
|
|
9749
9899
|
|
|
9750
|
-
_this =
|
|
9900
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Vimeo)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
9751
9901
|
|
|
9752
9902
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
9753
9903
|
|
|
@@ -9904,7 +10054,7 @@ var Vimeo = /*#__PURE__*/function (_Component) {
|
|
|
9904
10054
|
overflow: 'hidden',
|
|
9905
10055
|
display: display
|
|
9906
10056
|
};
|
|
9907
|
-
return
|
|
10057
|
+
return _react["default"].createElement("div", {
|
|
9908
10058
|
key: this.props.url,
|
|
9909
10059
|
ref: this.ref,
|
|
9910
10060
|
style: style
|
|
@@ -9964,16 +10114,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
9964
10114
|
|
|
9965
10115
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
9966
10116
|
|
|
9967
|
-
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); }; }
|
|
9968
|
-
|
|
9969
10117
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
9970
10118
|
|
|
9971
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
9972
|
-
|
|
9973
|
-
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; } }
|
|
9974
|
-
|
|
9975
10119
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
9976
10120
|
|
|
10121
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10122
|
+
|
|
9977
10123
|
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); }
|
|
9978
10124
|
|
|
9979
10125
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -9986,12 +10132,14 @@ var SDK_GLOBAL_READY = 'fbAsyncInit';
|
|
|
9986
10132
|
var MATCH_URL = /^https?:\/\/(www\.)?facebook\.com.*\/(video(s)?|watch|story)(\.php?|\/).+$/;
|
|
9987
10133
|
var PLAYER_ID_PREFIX = 'facebook-player-';
|
|
9988
10134
|
|
|
9989
|
-
var Facebook =
|
|
10135
|
+
var Facebook =
|
|
10136
|
+
/*#__PURE__*/
|
|
10137
|
+
function (_Component) {
|
|
9990
10138
|
_inherits(Facebook, _Component);
|
|
9991
10139
|
|
|
9992
|
-
var _super = _createSuper(Facebook);
|
|
9993
|
-
|
|
9994
10140
|
function Facebook() {
|
|
10141
|
+
var _getPrototypeOf2;
|
|
10142
|
+
|
|
9995
10143
|
var _this;
|
|
9996
10144
|
|
|
9997
10145
|
_classCallCheck(this, Facebook);
|
|
@@ -10000,7 +10148,7 @@ var Facebook = /*#__PURE__*/function (_Component) {
|
|
|
10000
10148
|
args[_key] = arguments[_key];
|
|
10001
10149
|
}
|
|
10002
10150
|
|
|
10003
|
-
_this =
|
|
10151
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Facebook)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
10004
10152
|
|
|
10005
10153
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
10006
10154
|
|
|
@@ -10116,7 +10264,7 @@ var Facebook = /*#__PURE__*/function (_Component) {
|
|
|
10116
10264
|
width: '100%',
|
|
10117
10265
|
height: '100%'
|
|
10118
10266
|
};
|
|
10119
|
-
return
|
|
10267
|
+
return _react["default"].createElement("div", {
|
|
10120
10268
|
style: style,
|
|
10121
10269
|
id: this.playerID,
|
|
10122
10270
|
className: "fb-video",
|
|
@@ -10176,16 +10324,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
10176
10324
|
|
|
10177
10325
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
10178
10326
|
|
|
10179
|
-
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); }; }
|
|
10180
|
-
|
|
10181
10327
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
10182
10328
|
|
|
10183
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10184
|
-
|
|
10185
|
-
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; } }
|
|
10186
|
-
|
|
10187
10329
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
10188
10330
|
|
|
10331
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10332
|
+
|
|
10189
10333
|
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); }
|
|
10190
10334
|
|
|
10191
10335
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -10196,12 +10340,14 @@ var SDK_URL = 'https://cdn.embed.ly/player-0.1.0.min.js';
|
|
|
10196
10340
|
var SDK_GLOBAL = 'playerjs';
|
|
10197
10341
|
var MATCH_URL = /streamable\.com\/([a-z0-9]+)$/;
|
|
10198
10342
|
|
|
10199
|
-
var Streamable =
|
|
10343
|
+
var Streamable =
|
|
10344
|
+
/*#__PURE__*/
|
|
10345
|
+
function (_Component) {
|
|
10200
10346
|
_inherits(Streamable, _Component);
|
|
10201
10347
|
|
|
10202
|
-
var _super = _createSuper(Streamable);
|
|
10203
|
-
|
|
10204
10348
|
function Streamable() {
|
|
10349
|
+
var _getPrototypeOf2;
|
|
10350
|
+
|
|
10205
10351
|
var _this;
|
|
10206
10352
|
|
|
10207
10353
|
_classCallCheck(this, Streamable);
|
|
@@ -10210,7 +10356,7 @@ var Streamable = /*#__PURE__*/function (_Component) {
|
|
|
10210
10356
|
args[_key] = arguments[_key];
|
|
10211
10357
|
}
|
|
10212
10358
|
|
|
10213
|
-
_this =
|
|
10359
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Streamable)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
10214
10360
|
|
|
10215
10361
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
10216
10362
|
|
|
@@ -10330,7 +10476,7 @@ var Streamable = /*#__PURE__*/function (_Component) {
|
|
|
10330
10476
|
width: '100%',
|
|
10331
10477
|
height: '100%'
|
|
10332
10478
|
};
|
|
10333
|
-
return
|
|
10479
|
+
return _react["default"].createElement("iframe", {
|
|
10334
10480
|
ref: this.ref,
|
|
10335
10481
|
src: "https://streamable.com/o/".concat(id),
|
|
10336
10482
|
frameBorder: "0",
|
|
@@ -10391,16 +10537,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
10391
10537
|
|
|
10392
10538
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
10393
10539
|
|
|
10394
|
-
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); }; }
|
|
10395
|
-
|
|
10396
10540
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
10397
10541
|
|
|
10398
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10399
|
-
|
|
10400
|
-
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; } }
|
|
10401
|
-
|
|
10402
10542
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
10403
10543
|
|
|
10544
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10545
|
+
|
|
10404
10546
|
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); }
|
|
10405
10547
|
|
|
10406
10548
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -10411,48 +10553,26 @@ var SDK_URL = 'https://fast.wistia.com/assets/external/E-v1.js';
|
|
|
10411
10553
|
var SDK_GLOBAL = 'Wistia';
|
|
10412
10554
|
var MATCH_URL = /(?:wistia\.com|wi\.st)\/(?:medias|embed)\/(.*)$/;
|
|
10413
10555
|
|
|
10414
|
-
var Wistia =
|
|
10556
|
+
var Wistia =
|
|
10557
|
+
/*#__PURE__*/
|
|
10558
|
+
function (_Component) {
|
|
10415
10559
|
_inherits(Wistia, _Component);
|
|
10416
10560
|
|
|
10417
|
-
var _super = _createSuper(Wistia);
|
|
10418
|
-
|
|
10419
10561
|
function Wistia() {
|
|
10562
|
+
var _getPrototypeOf2;
|
|
10563
|
+
|
|
10420
10564
|
var _this;
|
|
10421
10565
|
|
|
10422
10566
|
_classCallCheck(this, Wistia);
|
|
10423
10567
|
|
|
10424
|
-
for (var _len = arguments.length,
|
|
10425
|
-
|
|
10568
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
10569
|
+
args[_key] = arguments[_key];
|
|
10426
10570
|
}
|
|
10427
10571
|
|
|
10428
|
-
_this =
|
|
10572
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Wistia)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
10429
10573
|
|
|
10430
10574
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
10431
10575
|
|
|
10432
|
-
_defineProperty(_assertThisInitialized(_this), "onPlay", function () {
|
|
10433
|
-
var _this$props;
|
|
10434
|
-
|
|
10435
|
-
return (_this$props = _this.props).onPlay.apply(_this$props, arguments);
|
|
10436
|
-
});
|
|
10437
|
-
|
|
10438
|
-
_defineProperty(_assertThisInitialized(_this), "onPause", function () {
|
|
10439
|
-
var _this$props2;
|
|
10440
|
-
|
|
10441
|
-
return (_this$props2 = _this.props).onPause.apply(_this$props2, arguments);
|
|
10442
|
-
});
|
|
10443
|
-
|
|
10444
|
-
_defineProperty(_assertThisInitialized(_this), "onSeek", function () {
|
|
10445
|
-
var _this$props3;
|
|
10446
|
-
|
|
10447
|
-
return (_this$props3 = _this.props).onSeek.apply(_this$props3, arguments);
|
|
10448
|
-
});
|
|
10449
|
-
|
|
10450
|
-
_defineProperty(_assertThisInitialized(_this), "onEnded", function () {
|
|
10451
|
-
var _this$props4;
|
|
10452
|
-
|
|
10453
|
-
return (_this$props4 = _this.props).onEnded.apply(_this$props4, arguments);
|
|
10454
|
-
});
|
|
10455
|
-
|
|
10456
10576
|
_defineProperty(_assertThisInitialized(_this), "mute", function () {
|
|
10457
10577
|
_this.callPlayer('mute');
|
|
10458
10578
|
});
|
|
@@ -10474,13 +10594,17 @@ var Wistia = /*#__PURE__*/function (_Component) {
|
|
|
10474
10594
|
value: function load(url) {
|
|
10475
10595
|
var _this2 = this;
|
|
10476
10596
|
|
|
10477
|
-
var _this$
|
|
10478
|
-
playing = _this$
|
|
10479
|
-
muted = _this$
|
|
10480
|
-
controls = _this$
|
|
10481
|
-
_onReady = _this$
|
|
10482
|
-
|
|
10483
|
-
|
|
10597
|
+
var _this$props = this.props,
|
|
10598
|
+
playing = _this$props.playing,
|
|
10599
|
+
muted = _this$props.muted,
|
|
10600
|
+
controls = _this$props.controls,
|
|
10601
|
+
_onReady = _this$props.onReady,
|
|
10602
|
+
onPlay = _this$props.onPlay,
|
|
10603
|
+
onPause = _this$props.onPause,
|
|
10604
|
+
onSeek = _this$props.onSeek,
|
|
10605
|
+
onEnded = _this$props.onEnded,
|
|
10606
|
+
config = _this$props.config,
|
|
10607
|
+
onError = _this$props.onError;
|
|
10484
10608
|
(0, utils.getSDK)(SDK_URL, SDK_GLOBAL).then(function () {
|
|
10485
10609
|
window._wq = window._wq || [];
|
|
10486
10610
|
|
|
@@ -10497,28 +10621,19 @@ var Wistia = /*#__PURE__*/function (_Component) {
|
|
|
10497
10621
|
|
|
10498
10622
|
_this2.unbind();
|
|
10499
10623
|
|
|
10500
|
-
_this2.player.bind('play',
|
|
10624
|
+
_this2.player.bind('play', onPlay);
|
|
10501
10625
|
|
|
10502
|
-
_this2.player.bind('pause',
|
|
10626
|
+
_this2.player.bind('pause', onPause);
|
|
10503
10627
|
|
|
10504
|
-
_this2.player.bind('seek',
|
|
10628
|
+
_this2.player.bind('seek', onSeek);
|
|
10505
10629
|
|
|
10506
|
-
_this2.player.bind('end',
|
|
10630
|
+
_this2.player.bind('end', onEnded);
|
|
10507
10631
|
|
|
10508
10632
|
_onReady();
|
|
10509
10633
|
}
|
|
10510
10634
|
});
|
|
10511
10635
|
}, onError);
|
|
10512
10636
|
}
|
|
10513
|
-
}, {
|
|
10514
|
-
key: "unbind",
|
|
10515
|
-
value: function unbind() {
|
|
10516
|
-
this.player.unbind('play', this.onPlay);
|
|
10517
|
-
this.player.unbind('pause', this.onPause);
|
|
10518
|
-
this.player.unbind('seek', this.onSeek);
|
|
10519
|
-
this.player.unbind('end', this.onEnded);
|
|
10520
|
-
} // Proxy methods to prevent listener leaks
|
|
10521
|
-
|
|
10522
10637
|
}, {
|
|
10523
10638
|
key: "play",
|
|
10524
10639
|
value: function play() {
|
|
@@ -10529,6 +10644,19 @@ var Wistia = /*#__PURE__*/function (_Component) {
|
|
|
10529
10644
|
value: function pause() {
|
|
10530
10645
|
this.callPlayer('pause');
|
|
10531
10646
|
}
|
|
10647
|
+
}, {
|
|
10648
|
+
key: "unbind",
|
|
10649
|
+
value: function unbind() {
|
|
10650
|
+
var _this$props2 = this.props,
|
|
10651
|
+
onPlay = _this$props2.onPlay,
|
|
10652
|
+
onPause = _this$props2.onPause,
|
|
10653
|
+
onSeek = _this$props2.onSeek,
|
|
10654
|
+
onEnded = _this$props2.onEnded;
|
|
10655
|
+
this.player.unbind('play', onPlay);
|
|
10656
|
+
this.player.unbind('pause', onPause);
|
|
10657
|
+
this.player.unbind('seek', onSeek);
|
|
10658
|
+
this.player.unbind('end', onEnded);
|
|
10659
|
+
}
|
|
10532
10660
|
}, {
|
|
10533
10661
|
key: "stop",
|
|
10534
10662
|
value: function stop() {
|
|
@@ -10574,7 +10702,7 @@ var Wistia = /*#__PURE__*/function (_Component) {
|
|
|
10574
10702
|
width: '100%',
|
|
10575
10703
|
height: '100%'
|
|
10576
10704
|
};
|
|
10577
|
-
return
|
|
10705
|
+
return _react["default"].createElement("div", {
|
|
10578
10706
|
key: id,
|
|
10579
10707
|
className: className,
|
|
10580
10708
|
style: style
|
|
@@ -10634,16 +10762,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
10634
10762
|
|
|
10635
10763
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
10636
10764
|
|
|
10637
|
-
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); }; }
|
|
10638
|
-
|
|
10639
10765
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
10640
10766
|
|
|
10641
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10642
|
-
|
|
10643
|
-
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; } }
|
|
10644
|
-
|
|
10645
10767
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
10646
10768
|
|
|
10769
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10770
|
+
|
|
10647
10771
|
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); }
|
|
10648
10772
|
|
|
10649
10773
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -10656,12 +10780,14 @@ var MATCH_VIDEO_URL = /(?:www\.|go\.)?twitch\.tv\/videos\/(\d+)($|\?)/;
|
|
|
10656
10780
|
var MATCH_CHANNEL_URL = /(?:www\.|go\.)?twitch\.tv\/([a-z0-9_]+)($|\?)/;
|
|
10657
10781
|
var PLAYER_ID_PREFIX = 'twitch-player-';
|
|
10658
10782
|
|
|
10659
|
-
var Twitch =
|
|
10783
|
+
var Twitch =
|
|
10784
|
+
/*#__PURE__*/
|
|
10785
|
+
function (_Component) {
|
|
10660
10786
|
_inherits(Twitch, _Component);
|
|
10661
10787
|
|
|
10662
|
-
var _super = _createSuper(Twitch);
|
|
10663
|
-
|
|
10664
10788
|
function Twitch() {
|
|
10789
|
+
var _getPrototypeOf2;
|
|
10790
|
+
|
|
10665
10791
|
var _this;
|
|
10666
10792
|
|
|
10667
10793
|
_classCallCheck(this, Twitch);
|
|
@@ -10670,7 +10796,7 @@ var Twitch = /*#__PURE__*/function (_Component) {
|
|
|
10670
10796
|
args[_key] = arguments[_key];
|
|
10671
10797
|
}
|
|
10672
10798
|
|
|
10673
|
-
_this =
|
|
10799
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Twitch)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
10674
10800
|
|
|
10675
10801
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
10676
10802
|
|
|
@@ -10791,7 +10917,7 @@ var Twitch = /*#__PURE__*/function (_Component) {
|
|
|
10791
10917
|
width: '100%',
|
|
10792
10918
|
height: '100%'
|
|
10793
10919
|
};
|
|
10794
|
-
return
|
|
10920
|
+
return _react["default"].createElement("div", {
|
|
10795
10921
|
style: style,
|
|
10796
10922
|
id: this.playerID
|
|
10797
10923
|
});
|
|
@@ -10844,15 +10970,11 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
10844
10970
|
|
|
10845
10971
|
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; }
|
|
10846
10972
|
|
|
10847
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) ||
|
|
10848
|
-
|
|
10849
|
-
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."); }
|
|
10850
|
-
|
|
10851
|
-
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); }
|
|
10973
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
|
|
10852
10974
|
|
|
10853
|
-
function
|
|
10975
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
|
|
10854
10976
|
|
|
10855
|
-
function _iterableToArrayLimit(arr, i) { if (
|
|
10977
|
+
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; }
|
|
10856
10978
|
|
|
10857
10979
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
10858
10980
|
|
|
@@ -10862,16 +10984,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
10862
10984
|
|
|
10863
10985
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
10864
10986
|
|
|
10865
|
-
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); }; }
|
|
10866
|
-
|
|
10867
10987
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
10868
10988
|
|
|
10869
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10870
|
-
|
|
10871
|
-
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; } }
|
|
10872
|
-
|
|
10873
10989
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
10874
10990
|
|
|
10991
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10992
|
+
|
|
10875
10993
|
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); }
|
|
10876
10994
|
|
|
10877
10995
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -10883,12 +11001,14 @@ var SDK_GLOBAL = 'DM';
|
|
|
10883
11001
|
var SDK_GLOBAL_READY = 'dmAsyncInit';
|
|
10884
11002
|
var MATCH_URL = /^(?:(?:https?):)?(?:\/\/)?(?:www\.)?(?:(?:dailymotion\.com(?:\/embed)?\/video)|dai\.ly)\/([a-zA-Z0-9]+)(?:_[\w_-]+)?$/;
|
|
10885
11003
|
|
|
10886
|
-
var DailyMotion =
|
|
11004
|
+
var DailyMotion =
|
|
11005
|
+
/*#__PURE__*/
|
|
11006
|
+
function (_Component) {
|
|
10887
11007
|
_inherits(DailyMotion, _Component);
|
|
10888
11008
|
|
|
10889
|
-
var _super = _createSuper(DailyMotion);
|
|
10890
|
-
|
|
10891
11009
|
function DailyMotion() {
|
|
11010
|
+
var _getPrototypeOf2;
|
|
11011
|
+
|
|
10892
11012
|
var _this;
|
|
10893
11013
|
|
|
10894
11014
|
_classCallCheck(this, DailyMotion);
|
|
@@ -10897,7 +11017,7 @@ var DailyMotion = /*#__PURE__*/function (_Component) {
|
|
|
10897
11017
|
args[_key] = arguments[_key];
|
|
10898
11018
|
}
|
|
10899
11019
|
|
|
10900
|
-
_this =
|
|
11020
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(DailyMotion)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
10901
11021
|
|
|
10902
11022
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
10903
11023
|
|
|
@@ -11026,9 +11146,9 @@ var DailyMotion = /*#__PURE__*/function (_Component) {
|
|
|
11026
11146
|
height: '100%',
|
|
11027
11147
|
display: display
|
|
11028
11148
|
};
|
|
11029
|
-
return
|
|
11149
|
+
return _react["default"].createElement("div", {
|
|
11030
11150
|
style: style
|
|
11031
|
-
},
|
|
11151
|
+
}, _react["default"].createElement("div", {
|
|
11032
11152
|
ref: this.ref
|
|
11033
11153
|
}));
|
|
11034
11154
|
}
|
|
@@ -11086,16 +11206,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
11086
11206
|
|
|
11087
11207
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
11088
11208
|
|
|
11089
|
-
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); }; }
|
|
11090
|
-
|
|
11091
11209
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
11092
11210
|
|
|
11093
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
11094
|
-
|
|
11095
|
-
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; } }
|
|
11096
|
-
|
|
11097
11211
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
11098
11212
|
|
|
11213
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
11214
|
+
|
|
11099
11215
|
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); }
|
|
11100
11216
|
|
|
11101
11217
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -11106,12 +11222,14 @@ var SDK_URL = 'https://widget.mixcloud.com/media/js/widgetApi.js';
|
|
|
11106
11222
|
var SDK_GLOBAL = 'Mixcloud';
|
|
11107
11223
|
var MATCH_URL = /mixcloud\.com\/([^/]+\/[^/]+)/;
|
|
11108
11224
|
|
|
11109
|
-
var Mixcloud =
|
|
11225
|
+
var Mixcloud =
|
|
11226
|
+
/*#__PURE__*/
|
|
11227
|
+
function (_Component) {
|
|
11110
11228
|
_inherits(Mixcloud, _Component);
|
|
11111
11229
|
|
|
11112
|
-
var _super = _createSuper(Mixcloud);
|
|
11113
|
-
|
|
11114
11230
|
function Mixcloud() {
|
|
11231
|
+
var _getPrototypeOf2;
|
|
11232
|
+
|
|
11115
11233
|
var _this;
|
|
11116
11234
|
|
|
11117
11235
|
_classCallCheck(this, Mixcloud);
|
|
@@ -11120,7 +11238,7 @@ var Mixcloud = /*#__PURE__*/function (_Component) {
|
|
|
11120
11238
|
args[_key] = arguments[_key];
|
|
11121
11239
|
}
|
|
11122
11240
|
|
|
11123
|
-
_this =
|
|
11241
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Mixcloud)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
11124
11242
|
|
|
11125
11243
|
_defineProperty(_assertThisInitialized(_this), "callPlayer", utils.callPlayer);
|
|
11126
11244
|
|
|
@@ -11223,7 +11341,7 @@ var Mixcloud = /*#__PURE__*/function (_Component) {
|
|
|
11223
11341
|
})); // We have to give the iframe a key here to prevent a
|
|
11224
11342
|
// weird dialog appearing when loading a new track
|
|
11225
11343
|
|
|
11226
|
-
return
|
|
11344
|
+
return _react["default"].createElement("iframe", {
|
|
11227
11345
|
key: id,
|
|
11228
11346
|
ref: this.ref,
|
|
11229
11347
|
style: style,
|
|
@@ -11283,33 +11401,23 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
11283
11401
|
|
|
11284
11402
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
11285
11403
|
|
|
11286
|
-
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); }; }
|
|
11287
|
-
|
|
11288
11404
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
11289
11405
|
|
|
11290
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
11291
|
-
|
|
11292
|
-
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; } }
|
|
11293
|
-
|
|
11294
11406
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
11295
11407
|
|
|
11408
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
11409
|
+
|
|
11296
11410
|
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); }
|
|
11297
11411
|
|
|
11298
11412
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
11299
11413
|
|
|
11300
11414
|
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; }
|
|
11301
11415
|
|
|
11302
|
-
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; } } }; }
|
|
11303
|
-
|
|
11304
|
-
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); }
|
|
11305
|
-
|
|
11306
|
-
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; }
|
|
11307
|
-
|
|
11308
11416
|
var IOS = typeof navigator !== 'undefined' && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
|
|
11309
11417
|
var AUDIO_EXTENSIONS = /\.(m4a|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i;
|
|
11310
11418
|
var VIDEO_EXTENSIONS = /\.(mp4|og[gv]|webm|mov|m4v)($|\?)/i;
|
|
11311
11419
|
var HLS_EXTENSIONS = /\.(m3u8)($|\?)/i;
|
|
11312
|
-
var HLS_SDK_URL = 'https://cdn.jsdelivr.net/npm/hls.js@VERSION
|
|
11420
|
+
var HLS_SDK_URL = 'https://cdn.jsdelivr.net/npm/hls.js@VERSION';
|
|
11313
11421
|
var HLS_GLOBAL = 'Hls';
|
|
11314
11422
|
var DASH_EXTENSIONS = /\.(mpd)($|\?)/i;
|
|
11315
11423
|
var DASH_SDK_URL = 'https://cdnjs.cloudflare.com/ajax/libs/dashjs/VERSION/dash.all.min.js';
|
|
@@ -11318,11 +11426,12 @@ var MATCH_DROPBOX_URL = /www\.dropbox\.com\/.+/;
|
|
|
11318
11426
|
|
|
11319
11427
|
function canPlay(url) {
|
|
11320
11428
|
if (url instanceof Array) {
|
|
11321
|
-
var
|
|
11322
|
-
|
|
11429
|
+
var _iteratorNormalCompletion = true;
|
|
11430
|
+
var _didIteratorError = false;
|
|
11431
|
+
var _iteratorError = undefined;
|
|
11323
11432
|
|
|
11324
11433
|
try {
|
|
11325
|
-
for (_iterator.
|
|
11434
|
+
for (var _iterator = url[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
11326
11435
|
var item = _step.value;
|
|
11327
11436
|
|
|
11328
11437
|
if (typeof item === 'string' && canPlay(item)) {
|
|
@@ -11334,9 +11443,18 @@ function canPlay(url) {
|
|
|
11334
11443
|
}
|
|
11335
11444
|
}
|
|
11336
11445
|
} catch (err) {
|
|
11337
|
-
|
|
11446
|
+
_didIteratorError = true;
|
|
11447
|
+
_iteratorError = err;
|
|
11338
11448
|
} finally {
|
|
11339
|
-
|
|
11449
|
+
try {
|
|
11450
|
+
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
|
|
11451
|
+
_iterator["return"]();
|
|
11452
|
+
}
|
|
11453
|
+
} finally {
|
|
11454
|
+
if (_didIteratorError) {
|
|
11455
|
+
throw _iteratorError;
|
|
11456
|
+
}
|
|
11457
|
+
}
|
|
11340
11458
|
}
|
|
11341
11459
|
|
|
11342
11460
|
return false;
|
|
@@ -11360,12 +11478,14 @@ function canEnablePIP(url) {
|
|
|
11360
11478
|
return canPlay(url) && (!!document.pictureInPictureEnabled || supportsWebKitPresentationMode()) && !AUDIO_EXTENSIONS.test(url);
|
|
11361
11479
|
}
|
|
11362
11480
|
|
|
11363
|
-
var FilePlayer =
|
|
11481
|
+
var FilePlayer =
|
|
11482
|
+
/*#__PURE__*/
|
|
11483
|
+
function (_Component) {
|
|
11364
11484
|
_inherits(FilePlayer, _Component);
|
|
11365
11485
|
|
|
11366
|
-
var _super = _createSuper(FilePlayer);
|
|
11367
|
-
|
|
11368
11486
|
function FilePlayer() {
|
|
11487
|
+
var _getPrototypeOf2;
|
|
11488
|
+
|
|
11369
11489
|
var _this;
|
|
11370
11490
|
|
|
11371
11491
|
_classCallCheck(this, FilePlayer);
|
|
@@ -11374,7 +11494,7 @@ var FilePlayer = /*#__PURE__*/function (_Component) {
|
|
|
11374
11494
|
_args[_key] = arguments[_key];
|
|
11375
11495
|
}
|
|
11376
11496
|
|
|
11377
|
-
_this =
|
|
11497
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(FilePlayer)).call.apply(_getPrototypeOf2, [this].concat(_args)));
|
|
11378
11498
|
|
|
11379
11499
|
_defineProperty(_assertThisInitialized(_this), "onReady", function () {
|
|
11380
11500
|
var _this$props;
|
|
@@ -11461,19 +11581,19 @@ var FilePlayer = /*#__PURE__*/function (_Component) {
|
|
|
11461
11581
|
|
|
11462
11582
|
_defineProperty(_assertThisInitialized(_this), "renderSourceElement", function (source, index) {
|
|
11463
11583
|
if (typeof source === 'string') {
|
|
11464
|
-
return
|
|
11584
|
+
return _react["default"].createElement("source", {
|
|
11465
11585
|
key: index,
|
|
11466
11586
|
src: source
|
|
11467
11587
|
});
|
|
11468
11588
|
}
|
|
11469
11589
|
|
|
11470
|
-
return
|
|
11590
|
+
return _react["default"].createElement("source", _extends({
|
|
11471
11591
|
key: index
|
|
11472
11592
|
}, source));
|
|
11473
11593
|
});
|
|
11474
11594
|
|
|
11475
11595
|
_defineProperty(_assertThisInitialized(_this), "renderTrack", function (track, index) {
|
|
11476
|
-
return
|
|
11596
|
+
return _react["default"].createElement("track", _extends({
|
|
11477
11597
|
key: index
|
|
11478
11598
|
}, track));
|
|
11479
11599
|
});
|
|
@@ -11511,10 +11631,6 @@ var FilePlayer = /*#__PURE__*/function (_Component) {
|
|
|
11511
11631
|
key: "componentWillUnmount",
|
|
11512
11632
|
value: function componentWillUnmount() {
|
|
11513
11633
|
this.removeListeners(this.player);
|
|
11514
|
-
|
|
11515
|
-
if (this.hls) {
|
|
11516
|
-
this.hls.destroy();
|
|
11517
|
-
}
|
|
11518
11634
|
}
|
|
11519
11635
|
}, {
|
|
11520
11636
|
key: "addListeners",
|
|
@@ -11645,6 +11761,10 @@ var FilePlayer = /*#__PURE__*/function (_Component) {
|
|
|
11645
11761
|
value: function stop() {
|
|
11646
11762
|
this.player.removeAttribute('src');
|
|
11647
11763
|
|
|
11764
|
+
if (this.hls) {
|
|
11765
|
+
this.hls.destroy();
|
|
11766
|
+
}
|
|
11767
|
+
|
|
11648
11768
|
if (this.dash) {
|
|
11649
11769
|
this.dash.reset();
|
|
11650
11770
|
}
|
|
@@ -11756,7 +11876,7 @@ var FilePlayer = /*#__PURE__*/function (_Component) {
|
|
|
11756
11876
|
width: width === 'auto' ? width : '100%',
|
|
11757
11877
|
height: height === 'auto' ? height : '100%'
|
|
11758
11878
|
};
|
|
11759
|
-
return
|
|
11879
|
+
return _react["default"].createElement(Element, _extends({
|
|
11760
11880
|
ref: this.ref,
|
|
11761
11881
|
src: this.getSource(url),
|
|
11762
11882
|
style: style,
|
|
@@ -11846,16 +11966,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
11846
11966
|
|
|
11847
11967
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
11848
11968
|
|
|
11849
|
-
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); }; }
|
|
11850
|
-
|
|
11851
11969
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
11852
11970
|
|
|
11853
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
11854
|
-
|
|
11855
|
-
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; } }
|
|
11856
|
-
|
|
11857
11971
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
11858
11972
|
|
|
11973
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
11974
|
+
|
|
11859
11975
|
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); }
|
|
11860
11976
|
|
|
11861
11977
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -11864,12 +11980,14 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
11864
11980
|
|
|
11865
11981
|
var ICON_SIZE = '64px';
|
|
11866
11982
|
|
|
11867
|
-
var Preview =
|
|
11983
|
+
var Preview =
|
|
11984
|
+
/*#__PURE__*/
|
|
11985
|
+
function (_Component) {
|
|
11868
11986
|
_inherits(Preview, _Component);
|
|
11869
11987
|
|
|
11870
|
-
var _super = _createSuper(Preview);
|
|
11871
|
-
|
|
11872
11988
|
function Preview() {
|
|
11989
|
+
var _getPrototypeOf2;
|
|
11990
|
+
|
|
11873
11991
|
var _this;
|
|
11874
11992
|
|
|
11875
11993
|
_classCallCheck(this, Preview);
|
|
@@ -11878,7 +11996,7 @@ var Preview = /*#__PURE__*/function (_Component) {
|
|
|
11878
11996
|
args[_key] = arguments[_key];
|
|
11879
11997
|
}
|
|
11880
11998
|
|
|
11881
|
-
_this =
|
|
11999
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Preview)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
11882
12000
|
|
|
11883
12001
|
_defineProperty(_assertThisInitialized(_this), "mounted", false);
|
|
11884
12002
|
|
|
@@ -11976,15 +12094,15 @@ var Preview = /*#__PURE__*/function (_Component) {
|
|
|
11976
12094
|
}
|
|
11977
12095
|
};
|
|
11978
12096
|
|
|
11979
|
-
var defaultPlayIcon =
|
|
12097
|
+
var defaultPlayIcon = _react["default"].createElement("div", {
|
|
11980
12098
|
style: styles.shadow,
|
|
11981
12099
|
className: "react-player__shadow"
|
|
11982
|
-
},
|
|
12100
|
+
}, _react["default"].createElement("div", {
|
|
11983
12101
|
style: styles.playIcon,
|
|
11984
12102
|
className: "react-player__play-icon"
|
|
11985
12103
|
}));
|
|
11986
12104
|
|
|
11987
|
-
return
|
|
12105
|
+
return _react["default"].createElement("div", {
|
|
11988
12106
|
style: styles.preview,
|
|
11989
12107
|
className: "react-player__preview",
|
|
11990
12108
|
onClick: onClick
|
|
@@ -12021,12 +12139,6 @@ var _Player = _interopRequireDefault(Player_1);
|
|
|
12021
12139
|
|
|
12022
12140
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
12023
12141
|
|
|
12024
|
-
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; } } }; }
|
|
12025
|
-
|
|
12026
|
-
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); }
|
|
12027
|
-
|
|
12028
|
-
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; }
|
|
12029
|
-
|
|
12030
12142
|
var PRELOAD_PLAYERS = [{
|
|
12031
12143
|
Player: YouTube_1.YouTube,
|
|
12032
12144
|
configKey: 'youtube',
|
|
@@ -12047,16 +12159,16 @@ var PRELOAD_PLAYERS = [{
|
|
|
12047
12159
|
|
|
12048
12160
|
function renderPreloadPlayers(url, controls, config) {
|
|
12049
12161
|
var players = [];
|
|
12050
|
-
|
|
12051
|
-
var
|
|
12052
|
-
|
|
12162
|
+
var _iteratorNormalCompletion = true;
|
|
12163
|
+
var _didIteratorError = false;
|
|
12164
|
+
var _iteratorError = undefined;
|
|
12053
12165
|
|
|
12054
12166
|
try {
|
|
12055
|
-
for (_iterator.
|
|
12167
|
+
for (var _iterator = PRELOAD_PLAYERS[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
12056
12168
|
var player = _step.value;
|
|
12057
12169
|
|
|
12058
12170
|
if (!player.Player.canPlay(url) && config[player.configKey].preload) {
|
|
12059
|
-
players.push(
|
|
12171
|
+
players.push(_react["default"].createElement(_Player["default"], {
|
|
12060
12172
|
key: player.Player.displayName,
|
|
12061
12173
|
activePlayer: player.Player,
|
|
12062
12174
|
url: player.url,
|
|
@@ -12068,9 +12180,18 @@ function renderPreloadPlayers(url, controls, config) {
|
|
|
12068
12180
|
}
|
|
12069
12181
|
}
|
|
12070
12182
|
} catch (err) {
|
|
12071
|
-
|
|
12183
|
+
_didIteratorError = true;
|
|
12184
|
+
_iteratorError = err;
|
|
12072
12185
|
} finally {
|
|
12073
|
-
|
|
12186
|
+
try {
|
|
12187
|
+
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
|
|
12188
|
+
_iterator["return"]();
|
|
12189
|
+
}
|
|
12190
|
+
} finally {
|
|
12191
|
+
if (_didIteratorError) {
|
|
12192
|
+
throw _iteratorError;
|
|
12193
|
+
}
|
|
12194
|
+
}
|
|
12074
12195
|
}
|
|
12075
12196
|
|
|
12076
12197
|
return players;
|
|
@@ -12194,17 +12315,13 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
12194
12315
|
|
|
12195
12316
|
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); }
|
|
12196
12317
|
|
|
12197
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) ||
|
|
12198
|
-
|
|
12199
|
-
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."); }
|
|
12318
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
|
|
12200
12319
|
|
|
12201
|
-
function
|
|
12320
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
|
|
12202
12321
|
|
|
12203
|
-
function _iterableToArray(iter) { if (
|
|
12322
|
+
function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
|
|
12204
12323
|
|
|
12205
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr))
|
|
12206
|
-
|
|
12207
|
-
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; }
|
|
12324
|
+
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; } }
|
|
12208
12325
|
|
|
12209
12326
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
12210
12327
|
|
|
@@ -12212,16 +12329,12 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
|
|
|
12212
12329
|
|
|
12213
12330
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
12214
12331
|
|
|
12215
|
-
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); }; }
|
|
12216
|
-
|
|
12217
12332
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
12218
12333
|
|
|
12219
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
12220
|
-
|
|
12221
|
-
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; } }
|
|
12222
|
-
|
|
12223
12334
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
12224
12335
|
|
|
12336
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
12337
|
+
|
|
12225
12338
|
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); }
|
|
12226
12339
|
|
|
12227
12340
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
@@ -12231,12 +12344,14 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
12231
12344
|
var SUPPORTED_PROPS = Object.keys(props.propTypes);
|
|
12232
12345
|
var customPlayers = [];
|
|
12233
12346
|
|
|
12234
|
-
var ReactPlayer =
|
|
12347
|
+
var ReactPlayer =
|
|
12348
|
+
/*#__PURE__*/
|
|
12349
|
+
function (_Component) {
|
|
12235
12350
|
_inherits(ReactPlayer, _Component);
|
|
12236
12351
|
|
|
12237
|
-
var _super = _createSuper(ReactPlayer);
|
|
12238
|
-
|
|
12239
12352
|
function ReactPlayer() {
|
|
12353
|
+
var _getPrototypeOf2;
|
|
12354
|
+
|
|
12240
12355
|
var _this;
|
|
12241
12356
|
|
|
12242
12357
|
_classCallCheck(this, ReactPlayer);
|
|
@@ -12245,7 +12360,7 @@ var ReactPlayer = /*#__PURE__*/function (_Component) {
|
|
|
12245
12360
|
args[_key] = arguments[_key];
|
|
12246
12361
|
}
|
|
12247
12362
|
|
|
12248
|
-
_this =
|
|
12363
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(ReactPlayer)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
12249
12364
|
|
|
12250
12365
|
_defineProperty(_assertThisInitialized(_this), "config", (0, utils.getConfig)(_this.props, props.defaultProps, true));
|
|
12251
12366
|
|
|
@@ -12356,7 +12471,7 @@ var ReactPlayer = /*#__PURE__*/function (_Component) {
|
|
|
12356
12471
|
key: "renderActivePlayer",
|
|
12357
12472
|
value: function renderActivePlayer(url, activePlayer) {
|
|
12358
12473
|
if (!url) return null;
|
|
12359
|
-
return
|
|
12474
|
+
return _react["default"].createElement(_Player4["default"], _extends({}, this.props, {
|
|
12360
12475
|
key: activePlayer.displayName,
|
|
12361
12476
|
ref: this.activePlayerRef,
|
|
12362
12477
|
config: this.config,
|
|
@@ -12393,14 +12508,14 @@ var ReactPlayer = /*#__PURE__*/function (_Component) {
|
|
|
12393
12508
|
var preloadPlayers = (0, _preload["default"])(url, controls, this.config);
|
|
12394
12509
|
var players = [renderedActivePlayer].concat(_toConsumableArray(preloadPlayers)).sort(this.sortPlayers);
|
|
12395
12510
|
|
|
12396
|
-
var preview =
|
|
12511
|
+
var preview = _react["default"].createElement(_Preview["default"], {
|
|
12397
12512
|
url: url,
|
|
12398
12513
|
light: light,
|
|
12399
12514
|
playIcon: playIcon,
|
|
12400
12515
|
onClick: this.handleClickPreview
|
|
12401
12516
|
});
|
|
12402
12517
|
|
|
12403
|
-
return
|
|
12518
|
+
return _react["default"].createElement(Wrapper, _extends({
|
|
12404
12519
|
ref: this.wrapperRef,
|
|
12405
12520
|
style: _objectSpread({}, style, {
|
|
12406
12521
|
width: width,
|
|
@@ -13374,161 +13489,6 @@ var Breadcrumbs = function Breadcrumbs(_ref) {
|
|
|
13374
13489
|
|
|
13375
13490
|
var Breadcrumbs$1 = React__default.memo(Breadcrumbs);
|
|
13376
13491
|
|
|
13377
|
-
var js_cookie = createCommonjsModule(function (module, exports) {
|
|
13378
|
-
(function (factory) {
|
|
13379
|
-
var registeredInModuleLoader;
|
|
13380
|
-
{
|
|
13381
|
-
module.exports = factory();
|
|
13382
|
-
registeredInModuleLoader = true;
|
|
13383
|
-
}
|
|
13384
|
-
if (!registeredInModuleLoader) {
|
|
13385
|
-
var OldCookies = window.Cookies;
|
|
13386
|
-
var api = window.Cookies = factory();
|
|
13387
|
-
api.noConflict = function () {
|
|
13388
|
-
window.Cookies = OldCookies;
|
|
13389
|
-
return api;
|
|
13390
|
-
};
|
|
13391
|
-
}
|
|
13392
|
-
}(function () {
|
|
13393
|
-
function extend () {
|
|
13394
|
-
var i = 0;
|
|
13395
|
-
var result = {};
|
|
13396
|
-
for (; i < arguments.length; i++) {
|
|
13397
|
-
var attributes = arguments[ i ];
|
|
13398
|
-
for (var key in attributes) {
|
|
13399
|
-
result[key] = attributes[key];
|
|
13400
|
-
}
|
|
13401
|
-
}
|
|
13402
|
-
return result;
|
|
13403
|
-
}
|
|
13404
|
-
|
|
13405
|
-
function decode (s) {
|
|
13406
|
-
return s.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent);
|
|
13407
|
-
}
|
|
13408
|
-
|
|
13409
|
-
function init (converter) {
|
|
13410
|
-
function api() {}
|
|
13411
|
-
|
|
13412
|
-
function set (key, value, attributes) {
|
|
13413
|
-
if (typeof document === 'undefined') {
|
|
13414
|
-
return;
|
|
13415
|
-
}
|
|
13416
|
-
|
|
13417
|
-
attributes = extend({
|
|
13418
|
-
path: '/'
|
|
13419
|
-
}, api.defaults, attributes);
|
|
13420
|
-
|
|
13421
|
-
if (typeof attributes.expires === 'number') {
|
|
13422
|
-
attributes.expires = new Date(new Date() * 1 + attributes.expires * 864e+5);
|
|
13423
|
-
}
|
|
13424
|
-
|
|
13425
|
-
// We're using "expires" because "max-age" is not supported by IE
|
|
13426
|
-
attributes.expires = attributes.expires ? attributes.expires.toUTCString() : '';
|
|
13427
|
-
|
|
13428
|
-
try {
|
|
13429
|
-
var result = JSON.stringify(value);
|
|
13430
|
-
if (/^[\{\[]/.test(result)) {
|
|
13431
|
-
value = result;
|
|
13432
|
-
}
|
|
13433
|
-
} catch (e) {}
|
|
13434
|
-
|
|
13435
|
-
value = converter.write ?
|
|
13436
|
-
converter.write(value, key) :
|
|
13437
|
-
encodeURIComponent(String(value))
|
|
13438
|
-
.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);
|
|
13439
|
-
|
|
13440
|
-
key = encodeURIComponent(String(key))
|
|
13441
|
-
.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)
|
|
13442
|
-
.replace(/[\(\)]/g, escape);
|
|
13443
|
-
|
|
13444
|
-
var stringifiedAttributes = '';
|
|
13445
|
-
for (var attributeName in attributes) {
|
|
13446
|
-
if (!attributes[attributeName]) {
|
|
13447
|
-
continue;
|
|
13448
|
-
}
|
|
13449
|
-
stringifiedAttributes += '; ' + attributeName;
|
|
13450
|
-
if (attributes[attributeName] === true) {
|
|
13451
|
-
continue;
|
|
13452
|
-
}
|
|
13453
|
-
|
|
13454
|
-
// Considers RFC 6265 section 5.2:
|
|
13455
|
-
// ...
|
|
13456
|
-
// 3. If the remaining unparsed-attributes contains a %x3B (";")
|
|
13457
|
-
// character:
|
|
13458
|
-
// Consume the characters of the unparsed-attributes up to,
|
|
13459
|
-
// not including, the first %x3B (";") character.
|
|
13460
|
-
// ...
|
|
13461
|
-
stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];
|
|
13462
|
-
}
|
|
13463
|
-
|
|
13464
|
-
return (document.cookie = key + '=' + value + stringifiedAttributes);
|
|
13465
|
-
}
|
|
13466
|
-
|
|
13467
|
-
function get (key, json) {
|
|
13468
|
-
if (typeof document === 'undefined') {
|
|
13469
|
-
return;
|
|
13470
|
-
}
|
|
13471
|
-
|
|
13472
|
-
var jar = {};
|
|
13473
|
-
// To prevent the for loop in the first place assign an empty array
|
|
13474
|
-
// in case there are no cookies at all.
|
|
13475
|
-
var cookies = document.cookie ? document.cookie.split('; ') : [];
|
|
13476
|
-
var i = 0;
|
|
13477
|
-
|
|
13478
|
-
for (; i < cookies.length; i++) {
|
|
13479
|
-
var parts = cookies[i].split('=');
|
|
13480
|
-
var cookie = parts.slice(1).join('=');
|
|
13481
|
-
|
|
13482
|
-
if (!json && cookie.charAt(0) === '"') {
|
|
13483
|
-
cookie = cookie.slice(1, -1);
|
|
13484
|
-
}
|
|
13485
|
-
|
|
13486
|
-
try {
|
|
13487
|
-
var name = decode(parts[0]);
|
|
13488
|
-
cookie = (converter.read || converter)(cookie, name) ||
|
|
13489
|
-
decode(cookie);
|
|
13490
|
-
|
|
13491
|
-
if (json) {
|
|
13492
|
-
try {
|
|
13493
|
-
cookie = JSON.parse(cookie);
|
|
13494
|
-
} catch (e) {}
|
|
13495
|
-
}
|
|
13496
|
-
|
|
13497
|
-
jar[name] = cookie;
|
|
13498
|
-
|
|
13499
|
-
if (key === name) {
|
|
13500
|
-
break;
|
|
13501
|
-
}
|
|
13502
|
-
} catch (e) {}
|
|
13503
|
-
}
|
|
13504
|
-
|
|
13505
|
-
return key ? jar[key] : jar;
|
|
13506
|
-
}
|
|
13507
|
-
|
|
13508
|
-
api.set = set;
|
|
13509
|
-
api.get = function (key) {
|
|
13510
|
-
return get(key, false /* read as raw */);
|
|
13511
|
-
};
|
|
13512
|
-
api.getJSON = function (key) {
|
|
13513
|
-
return get(key, true /* read as json */);
|
|
13514
|
-
};
|
|
13515
|
-
api.remove = function (key, attributes) {
|
|
13516
|
-
set(key, '', extend(attributes, {
|
|
13517
|
-
expires: -1
|
|
13518
|
-
}));
|
|
13519
|
-
};
|
|
13520
|
-
|
|
13521
|
-
api.defaults = {};
|
|
13522
|
-
|
|
13523
|
-
api.withConverter = init;
|
|
13524
|
-
|
|
13525
|
-
return api;
|
|
13526
|
-
}
|
|
13527
|
-
|
|
13528
|
-
return init(function () {});
|
|
13529
|
-
}));
|
|
13530
|
-
});
|
|
13531
|
-
|
|
13532
13492
|
var SetCookie = function SetCookie(key, value) {
|
|
13533
13493
|
js_cookie.set(key, value, { expires: 1, sameSite: 'none', secure: true });
|
|
13534
13494
|
};
|
|
@@ -13748,16 +13708,16 @@ var RelatedTopicsDropdown = function RelatedTopicsDropdown(_ref) {
|
|
|
13748
13708
|
_ref$className = _ref.className,
|
|
13749
13709
|
className = _ref$className === undefined ? '' : _ref$className;
|
|
13750
13710
|
|
|
13751
|
-
/*
|
|
13752
|
-
Props accepted - parentTaxonomy(required, object), subTaxonomy(required, array), page(optional), exclude(optional), variant(optional), className(optional)
|
|
13753
|
-
example:
|
|
13754
|
-
<RelatedTopicDropdown
|
|
13755
|
-
page='/clinical'
|
|
13756
|
-
exclude="clinical"
|
|
13757
|
-
className='mb-3'
|
|
13758
|
-
parentTaxonomy={props.parentTaxonomy}
|
|
13759
|
-
subTaxonomies={props.subTaxonomies}
|
|
13760
|
-
/>
|
|
13711
|
+
/*
|
|
13712
|
+
Props accepted - parentTaxonomy(required, object), subTaxonomy(required, array), page(optional), exclude(optional), variant(optional), className(optional)
|
|
13713
|
+
example:
|
|
13714
|
+
<RelatedTopicDropdown
|
|
13715
|
+
page='/clinical'
|
|
13716
|
+
exclude="clinical"
|
|
13717
|
+
className='mb-3'
|
|
13718
|
+
parentTaxonomy={props.parentTaxonomy}
|
|
13719
|
+
subTaxonomies={props.subTaxonomies}
|
|
13720
|
+
/>
|
|
13761
13721
|
*/
|
|
13762
13722
|
if (subTaxonomies.length === 0 && parentTaxonomy) {
|
|
13763
13723
|
if (parentTaxonomy.identifier == exclude) {
|
|
@@ -13795,19 +13755,19 @@ var RelatedTopicsDropdown = function RelatedTopicsDropdown(_ref) {
|
|
|
13795
13755
|
}
|
|
13796
13756
|
};
|
|
13797
13757
|
|
|
13798
|
-
/*
|
|
13799
|
-
This dropdown is used inside Article body to display related content placement pages
|
|
13800
|
-
sample usage: <ArticleDetailDropdown contentPlacement={content_placement} exclude={['News',]} />
|
|
13801
|
-
|
|
13802
|
-
in article query, need to add '...' to content_placement to retreive additional info needed
|
|
13803
|
-
|
|
13804
|
-
'content_placement': taxonomyMapping[]-> {
|
|
13805
|
-
...,
|
|
13806
|
-
'ancestor': parent->parent->identifier,
|
|
13807
|
-
'parent': parent->identifier,
|
|
13808
|
-
'path': identifier
|
|
13809
|
-
}
|
|
13810
|
-
|
|
13758
|
+
/*
|
|
13759
|
+
This dropdown is used inside Article body to display related content placement pages
|
|
13760
|
+
sample usage: <ArticleDetailDropdown contentPlacement={content_placement} exclude={['News',]} />
|
|
13761
|
+
|
|
13762
|
+
in article query, need to add '...' to content_placement to retreive additional info needed
|
|
13763
|
+
|
|
13764
|
+
'content_placement': taxonomyMapping[]-> {
|
|
13765
|
+
...,
|
|
13766
|
+
'ancestor': parent->parent->identifier,
|
|
13767
|
+
'parent': parent->identifier,
|
|
13768
|
+
'path': identifier
|
|
13769
|
+
}
|
|
13770
|
+
|
|
13811
13771
|
*/
|
|
13812
13772
|
|
|
13813
13773
|
var ArticleDetailDropdown = function ArticleDetailDropdown(props) {
|
|
@@ -14478,34 +14438,34 @@ var YahooHero = function YahooHero(props) {
|
|
|
14478
14438
|
);
|
|
14479
14439
|
};
|
|
14480
14440
|
|
|
14481
|
-
/*
|
|
14482
|
-
Sample query
|
|
14483
|
-
let references = ''
|
|
14484
|
-
if(article.taxonomyMapping.length > 0){
|
|
14485
|
-
article.taxonomyMapping.forEach((ref, index) => {
|
|
14486
|
-
references = references + `references('${ref._ref}') `
|
|
14487
|
-
if(index+1 !== article.taxonomyMapping.length){
|
|
14488
|
-
references = references + ` && `
|
|
14489
|
-
}
|
|
14490
|
-
})
|
|
14491
|
-
}
|
|
14492
|
-
|
|
14493
|
-
const relatedArticlesQuery = `*[!(_id in path("drafts.**")) && _type == "article" && title !='${article.title}' && defined(title) && is_visible == true && ( references('article.documentGroup._id') || ${references} ) && published <= '${today}'] | order(published desc) [0...4] {
|
|
14494
|
-
...,
|
|
14495
|
-
title,
|
|
14496
|
-
summary,
|
|
14497
|
-
thumbnail,
|
|
14498
|
-
url,
|
|
14499
|
-
published,
|
|
14500
|
-
authorMapping[]->,
|
|
14501
|
-
contentCategory->
|
|
14502
|
-
}`
|
|
14503
|
-
const relatedArticles = await client.fetch(relatedArticlesQuery)
|
|
14504
|
-
|
|
14505
|
-
Sample usage
|
|
14506
|
-
<RelatedContent dataRecord={props.relatedArticles} client={client} showAuthor showPublished reverse/>
|
|
14507
|
-
|
|
14508
|
-
|
|
14441
|
+
/*
|
|
14442
|
+
Sample query
|
|
14443
|
+
let references = ''
|
|
14444
|
+
if(article.taxonomyMapping.length > 0){
|
|
14445
|
+
article.taxonomyMapping.forEach((ref, index) => {
|
|
14446
|
+
references = references + `references('${ref._ref}') `
|
|
14447
|
+
if(index+1 !== article.taxonomyMapping.length){
|
|
14448
|
+
references = references + ` && `
|
|
14449
|
+
}
|
|
14450
|
+
})
|
|
14451
|
+
}
|
|
14452
|
+
|
|
14453
|
+
const relatedArticlesQuery = `*[!(_id in path("drafts.**")) && _type == "article" && title !='${article.title}' && defined(title) && is_visible == true && ( references('article.documentGroup._id') || ${references} ) && published <= '${today}'] | order(published desc) [0...4] {
|
|
14454
|
+
...,
|
|
14455
|
+
title,
|
|
14456
|
+
summary,
|
|
14457
|
+
thumbnail,
|
|
14458
|
+
url,
|
|
14459
|
+
published,
|
|
14460
|
+
authorMapping[]->,
|
|
14461
|
+
contentCategory->
|
|
14462
|
+
}`
|
|
14463
|
+
const relatedArticles = await client.fetch(relatedArticlesQuery)
|
|
14464
|
+
|
|
14465
|
+
Sample usage
|
|
14466
|
+
<RelatedContent dataRecord={props.relatedArticles} client={client} showAuthor showPublished reverse/>
|
|
14467
|
+
|
|
14468
|
+
|
|
14509
14469
|
*/
|
|
14510
14470
|
var RelatedContent = function RelatedContent(props) {
|
|
14511
14471
|
var client = props.client,
|
|
@@ -14572,21 +14532,21 @@ var RelatedContent = function RelatedContent(props) {
|
|
|
14572
14532
|
);
|
|
14573
14533
|
};
|
|
14574
14534
|
|
|
14575
|
-
/*
|
|
14576
|
-
Example usage - targetedonc.com/latest-conference
|
|
14577
|
-
const query = `*[!(_id in path("drafts.**")) && _type == "article" && defined(title) && is_visible == true && published <= '${today}' && references('b49d36b8-aa56-4183-a2bc-1568c229fb72') ] | order(published desc) [$from...$to] {
|
|
14578
|
-
...,
|
|
14579
|
-
title,
|
|
14580
|
-
summary,
|
|
14581
|
-
thumbnail,
|
|
14582
|
-
url,
|
|
14583
|
-
published,
|
|
14584
|
-
documentGroup->,
|
|
14585
|
-
contentCategory->,
|
|
14586
|
-
'pageNumber': ${currentPage}
|
|
14587
|
-
}`
|
|
14588
|
-
|
|
14589
|
-
const posts = await client.fetch(query, params)
|
|
14535
|
+
/*
|
|
14536
|
+
Example usage - targetedonc.com/latest-conference
|
|
14537
|
+
const query = `*[!(_id in path("drafts.**")) && _type == "article" && defined(title) && is_visible == true && published <= '${today}' && references('b49d36b8-aa56-4183-a2bc-1568c229fb72') ] | order(published desc) [$from...$to] {
|
|
14538
|
+
...,
|
|
14539
|
+
title,
|
|
14540
|
+
summary,
|
|
14541
|
+
thumbnail,
|
|
14542
|
+
url,
|
|
14543
|
+
published,
|
|
14544
|
+
documentGroup->,
|
|
14545
|
+
contentCategory->,
|
|
14546
|
+
'pageNumber': ${currentPage}
|
|
14547
|
+
}`
|
|
14548
|
+
|
|
14549
|
+
const posts = await client.fetch(query, params)
|
|
14590
14550
|
*/
|
|
14591
14551
|
|
|
14592
14552
|
var ConferenceArticleCard = function ConferenceArticleCard(props) {
|