maestro-react-player
Version:
A React component for playing a variety of URLs, including file paths, YouTube, Facebook, Twitch, SoundCloud, Streamable, Vimeo, Wistia and DailyMotion
1 lines • 156 kB
JavaScript
var renderReactPlayer=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=13)}([function(e,t,n){"use strict";e.exports=n(14)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e){var t=e.match(P);if(t){var n=t[1];if(n.match(C))return i(n);if(E.test(n))return parseInt(n,10)}return 0}function i(e){for(var t=0,n=C.exec(e);null!==n;){var r=n,o=m(r,3),a=o[1],i=o[2];"h"===i&&(t+=60*parseInt(a,10)*60),"m"===i&&(t+=60*parseInt(a,10)),"s"===i&&(t+=parseInt(a,10)),n=C.exec(e)}return t}function l(){return Math.random().toString(36).substr(2,5)}function u(e){return Object.keys(e).map(function(t){return t+"="+e[t]}).join("&")}function c(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){return!0};return window[t]&&r(window[t])?Promise.resolve(window[t]):new Promise(function(r,o){if(n){var a=window[n];window[n]=function(){a&&a(),r(window[t])}}(0,g.default)(e,function(e){e&&o(e),n||r(window[t])})})}function s(e,t,n){var r=(0,k.default)(t.config,e.config),a=!0,i=!1,l=void 0;try{for(var u,c=w.DEPRECATED_CONFIG_PROPS[Symbol.iterator]();!(a=(u=c.next()).done);a=!0){var s=u.value;if(e[s]){var f=s.replace(/Config$/,"");if(r=(0,k.default)(r,o({},f,e[s])),n){var p="ReactPlayer: %c"+s+" %cis deprecated, please use the config prop instead – https://github.com/CookPete/react-player#config-prop";console.warn(p,"font-weight: bold","")}}}}catch(e){i=!0,l=e}finally{try{!a&&c.return&&c.return()}finally{if(i)throw l}}return r}function f(e){for(var t,n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var a=(t=[]).concat.apply(t,r),i={},l=Object.keys(e),u=!0,c=!1,s=void 0;try{for(var f,p=l[Symbol.iterator]();!(u=(f=p.next()).done);u=!0){var d=f.value;-1===a.indexOf(d)&&(i[d]=e[d])}}catch(e){c=!0,s=e}finally{try{!u&&p.return&&p.return()}finally{if(c)throw s}}return i}function p(e){var t;if(!this.player||!this.player[e]){var n="ReactPlayer: "+this.constructor.displayName+" player could not call %c"+e+"%c – ";return this.player?this.player[e]||(n+="The method was not available"):n+="The player was not available",console.warn(n,"font-weight: bold",""),null}for(var r=arguments.length,o=Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];return(t=this.player)[e].apply(t,o)}function d(e){return null!==e&&"object"===(void 0===e?"undefined":h(e))}function y(e,t){if("function"==typeof e&&"function"==typeof t)return!0;if(e instanceof Array&&t instanceof Array){if(e.length!==t.length)return!1;for(var n=0;n!==e.length;n++)if(!y(e[n],t[n]))return!1;return!0}if(d(e)&&d(t)){if(Object.keys(e).length!==Object.keys(t).length)return!1;var r=!0,o=!1,a=void 0;try{for(var i,l=Object.keys(e)[Symbol.iterator]();!(r=(i=l.next()).done);r=!0){var u=i.value;if(!y(e[u],t[u]))return!1}}catch(e){o=!0,a=e}finally{try{!r&&l.return&&l.return()}finally{if(o)throw a}}return!0}return e===t}Object.defineProperty(t,"__esModule",{value:!0});var h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m=function(){function e(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&l.return&&l.return()}finally{if(o)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();t.parseStartTime=a,t.randomString=l,t.queryString=u,t.getSDK=c,t.getConfig=s,t.omit=f,t.callPlayer=p,t.isObject=d,t.isEqual=y;var v=n(30),g=r(v),b=n(31),k=r(b),w=n(4),P=/[?&#](?:start|t)=([0-9hms]+)/,C=/(\d+)(h|m|s)/g,E=/^\d+$/},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e){var t,n;return n=t=function(t){function n(){var e,t,r,i;o(this,n);for(var l=arguments.length,u=Array(l),c=0;c<l;c++)u[c]=arguments[c];return t=r=a(this,(e=n.__proto__||Object.getPrototypeOf(n)).call.apply(e,[this].concat(u))),r.ref=function(e){r.player=e},i=t,a(r,i)}return i(n,t),c(n,[{key:"shouldComponentUpdate",value:function(e){return!(0,d.isEqual)(this.props,e)}},{key:"componentWillUpdate",value:function(e){this.config=(0,d.getConfig)(e,p.defaultProps)}},{key:"render",value:function(){if(!e.canPlay(this.props.url))return null;var t=this.props,n=t.style,r=t.width,o=t.height,a=t.wrapper,i=(0,d.omit)(this.props,m,p.DEPRECATED_CONFIG_PROPS);return f.default.createElement(a,u({style:u({},n,{width:r,height:o})},i),f.default.createElement(h.default,u({},this.props,{ref:this.ref,activePlayer:e,config:(0,d.getConfig)(this.props,p.defaultProps)})))}}]),n}(s.Component),t.displayName=e.displayName+"Player",t.propTypes=p.propTypes,t.defaultProps=p.defaultProps,t.canPlay=e.canPlay,n}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();t.default=l;var s=n(0),f=r(s),p=n(4),d=n(1),y=n(5),h=r(y),m=Object.keys(p.propTypes);e.exports=t.default},function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEPRECATED_CONFIG_PROPS=t.defaultProps=t.propTypes=void 0;var r=n(26),o=function(e){return e&&e.__esModule?e:{default:e}}(r),a=o.default.string,i=o.default.bool,l=o.default.number,u=o.default.array,c=o.default.oneOfType,s=o.default.shape,f=o.default.object,p=o.default.func;t.propTypes={url:c([a,u]),playing:i,loop:i,controls:i,volume:l,muted:i,playbackRate:l,width:c([a,l]),height:c([a,l]),style:f,progressInterval:l,playsinline:i,wrapper:c([a,p]),config:s({soundcloud:s({options:f}),youtube:s({playerVars:f,preload:i}),facebook:s({appId:a}),dailymotion:s({params:f,preload:i}),vimeo:s({iframeParams:f,preload:i}),file:s({attributes:f,tracks:u,forceAudio:i,forceHLS:i,forceDASH:i,hlsOptions:f}),wistia:s({options:f}),mixcloud:s({options:f}),twitch:s({options:f})}),onReady:p,onStart:p,onPlay:p,onPause:p,onBuffer:p,onEnded:p,onError:p,onDuration:p,onSeek:p,onProgress:p},t.defaultProps={playing:!1,loop:!1,controls:!1,volume:null,muted:!1,playbackRate:1,width:"640px",height:"360px",style:{},progressInterval:1e3,playsinline:!1,wrapper:"div",config:{soundcloud:{options:{visual:!0,buying:!1,liking:!1,download:!1,sharing:!1,show_comments:!1,show_playcount:!1}},youtube:{playerVars:{autoplay:0,playsinline:1,showinfo:0,rel:0,iv_load_policy:3,modestbranding:1},preload:!1},facebook:{appId:"1309697205772819"},dailymotion:{params:{api:1,"endscreen-enable":!1},preload:!1},vimeo:{playerOptions:{autopause:!1,autoplay:!1,byline:!1,portrait:!1,title:!1},preload:!1},file:{attributes:{},tracks:[],forceAudio:!1,forceHLS:!1,forceDASH:!1,hlsOptions:{}},wistia:{options:{}},mixcloud:{options:{hide_cover:1}},twitch:{options:{}}},onReady:function(){},onStart:function(){},onPlay:function(){},onPause:function(){},onBuffer:function(){},onEnded:function(){},onError:function(){},onDuration:function(){},onSeek:function(){},onProgress:function(){}},t.DEPRECATED_CONFIG_PROPS=["soundcloudConfig","youtubeConfig","facebookConfig","dailymotionConfig","vimeoConfig","fileConfig","wistiaConfig"]},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(0),c=function(e){return e&&e.__esModule?e:{default:e}}(u),s=n(4),f=function(e){function t(){var e,n,a,i;r(this,t);for(var l=arguments.length,u=Array(l),c=0;c<l;c++)u[c]=arguments[c];return n=a=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),a.mounted=!1,a.isReady=!1,a.isPlaying=!1,a.isLoading=!0,a.startOnPlay=!0,a.seekOnPlay=null,a.onDurationCalled=!1,a.getInternalPlayer=function(e){return a.player?a.player[e]:null},a.progress=function(){if(a.props.url&&a.player&&a.isReady){var e=a.getCurrentTime()||0,t=a.getSecondsLoaded(),n=a.getDuration();if(n){var r={playedSeconds:e,played:e/n};null!==t&&(r.loadedSeconds=t,r.loaded=t/n),r.played===a.prevPlayed&&r.loaded===a.prevLoaded||a.props.onProgress(r),a.prevPlayed=r.played,a.prevLoaded=r.loaded}}a.progressTimeout=setTimeout(a.progress,a.props.progressFrequency||a.props.progressInterval)},a.onReady=function(){if(a.mounted){a.isReady=!0,a.isLoading=!1;var e=a.props,t=e.onReady,n=e.playing,r=e.volume,o=e.muted;t(),(o||null!==r)&&a.player.setVolume(o?0:r),n&&a.player.play(),a.onDurationCheck()}},a.onPlay=function(){a.isPlaying=!0,a.isLoading=!1;var e=a.props,t=e.onStart,n=e.onPlay,r=e.playbackRate;a.startOnPlay&&(a.player.setPlaybackRate&&a.player.setPlaybackRate(r),t(),a.startOnPlay=!1),n(),a.seekOnPlay&&(a.seekTo(a.seekOnPlay),a.seekOnPlay=null),a.onDurationCheck()},a.onPause=function(e){a.isPlaying=!1,a.isLoading||a.props.onPause(e)},a.onEnded=function(){var e=a.props,t=e.activePlayer,n=e.loop,r=e.onEnded;t.loopOnEnded&&n&&a.seekTo(0),n||(a.isPlaying=!1),r()},a.onDurationCheck=function(){clearTimeout(a.durationCheckTimeout);var e=a.getDuration();e?a.onDurationCalled||(a.props.onDuration(e),a.onDurationCalled=!0):a.durationCheckTimeout=setTimeout(a.onDurationCheck,100)},a.ref=function(e){e&&(a.player=e)},i=n,o(a,i)}return a(t,e),l(t,[{key:"componentDidMount",value:function(){this.mounted=!0,this.player.load(this.props.url),this.progress()}},{key:"componentWillUnmount",value:function(){clearTimeout(this.progressTimeout),this.isReady&&this.player.stop(),this.mounted=!1}},{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.url,r=t.playing,o=t.volume,a=t.muted,i=t.playbackRate;n!==e.url&&(this.isLoading=!0,this.startOnPlay=!0,this.onDurationCalled=!1,this.player.load(e.url,this.isReady)),r||!e.playing||this.isPlaying||this.player.play(),r&&!e.playing&&this.isPlaying&&this.player.pause(),null!==e.volume&&(o===e.volume||e.muted||this.player.setVolume(e.volume),a!==e.muted&&this.player.setVolume(e.muted?0:e.volume)),i!==e.playbackRate&&this.player.setPlaybackRate&&this.player.setPlaybackRate(e.playbackRate)}},{key:"getDuration",value:function(){return this.isReady?this.player.getDuration():null}},{key:"getCurrentTime",value:function(){return this.isReady?this.player.getCurrentTime():null}},{key:"getSecondsLoaded",value:function(){return this.isReady?this.player.getSecondsLoaded():null}},{key:"seekTo",value:function(e){var t=this;if(!this.isReady&&0!==e)return this.seekOnPlay=e,void setTimeout(function(){t.seekOnPlay=null},5e3);if(e>0&&e<1){var n=this.player.getDuration();return n?void this.player.seekTo(n*e):void console.warn("ReactPlayer: could not seek using fraction – duration not yet available")}this.player.seekTo(e)}},{key:"render",value:function(){var e=this.props.activePlayer;return c.default.createElement(e,i({},this.props,{ref:this.ref,onReady:this.onReady,onPlay:this.onPlay,onPause:this.onPause,onEnded:this.onEnded}))}}]),t}(u.Component);f.displayName="Player",f.propTypes=s.propTypes,f.defaultProps=s.defaultProps,t.default=f,e.exports=t.default},function(e,t,n){"use strict";function r(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var o=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,l,u=r(e),c=1;c<arguments.length;c++){n=Object(arguments[c]);for(var s in n)a.call(n,s)&&(u[s]=n[s]);if(o){l=o(n);for(var f=0;f<l.length;f++)i.call(n,l[f])&&(u[l[f]]=n[l[f]])}}return u}},function(e,t,n){"use strict";var r={};e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.YouTube=void 0;var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(0),s=r(c),f=n(1),p=n(2),d=r(p),y="YT",h=/(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})/,m=t.YouTube=function(e){function t(){var e,n,r,i;o(this,t);for(var l=arguments.length,u=Array(l),c=0;c<l;c++)u[c]=arguments[c];return n=r=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.callPlayer=f.callPlayer,r.onStateChange=function(e){var t=e.data,n=r.props,o=n.onPlay,a=n.onPause,i=n.onBuffer,l=n.onEnded,u=n.onReady,c=window[y].PlayerState,s=c.PLAYING,f=c.PAUSED,p=c.BUFFERING,d=c.ENDED,h=c.CUED;t===s&&o(),t===f&&a(),t===p&&i(),t===d&&l(),t===h&&u()},r.ref=function(e){r.container=e},i=n,a(r,i)}return i(t,e),u(t,[{key:"load",value:function(e,t){var n=this,r=this.props,o=r.playsinline,a=r.controls,i=r.config,u=r.onError,c=e&&e.match(h)[1];if(t)return void this.player.cueVideoById({videoId:c,startSeconds:(0,f.parseStartTime)(e)});(0,f.getSDK)("https://www.youtube.com/iframe_api",y,"onYouTubeIframeAPIReady",function(e){return e.loaded}).then(function(t){n.container&&(n.player=new t.Player(n.container,{width:"100%",height:"100%",videoId:c,playerVars:l({controls:a?1:0,start:(0,f.parseStartTime)(e),origin:window.location.origin,playsinline:o},i.youtube.playerVars),events:{onReady:n.props.onReady,onStateChange:n.onStateChange,onError:function(e){return u(e.data)}}}))},u)}},{key:"play",value:function(){this.callPlayer("playVideo")}},{key:"pause",value:function(){this.callPlayer("pauseVideo")}},{key:"stop",value:function(){document.body.contains(this.callPlayer("getIframe"))&&this.callPlayer("stopVideo")}},{key:"seekTo",value:function(e){this.callPlayer("seekTo",e)}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",100*e)}},{key:"setPlaybackRate",value:function(e){this.callPlayer("setPlaybackRate",e)}},{key:"getDuration",value:function(){return this.callPlayer("getDuration")}},{key:"getCurrentTime",value:function(){return this.callPlayer("getCurrentTime")}},{key:"getSecondsLoaded",value:function(){return this.callPlayer("getVideoLoadedFraction")*this.getDuration()}},{key:"render",value:function(){var e=l({width:"100%",height:"100%"},this.props.style);return s.default.createElement("div",{style:e},s.default.createElement("div",{ref:this.ref}))}}]),t}(c.Component);m.displayName="YouTube",m.canPlay=function(e){return h.test(e)},m.loopOnEnded=!0,t.default=(0,d.default)(m)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.SoundCloud=void 0;var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(0),s=r(c),f=n(1),p=n(2),d=r(p),y=/(soundcloud\.com|snd\.sc)\/.+$/,h=t.SoundCloud=function(e){function t(){var e,n,r,i;o(this,t);for(var l=arguments.length,u=Array(l),c=0;c<l;c++)u[c]=arguments[c];return n=r=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.callPlayer=f.callPlayer,r.duration=null,r.currentTime=null,r.fractionLoaded=null,r.ref=function(e){r.iframe=e},i=n,a(r,i)}return i(t,e),u(t,[{key:"load",value:function(e,t){var n=this;(0,f.getSDK)("https://w.soundcloud.com/player/api.js","SC").then(function(r){if(n.iframe){var o=r.Widget.Events,a=o.PLAY,i=o.PLAY_PROGRESS,u=o.PAUSE,c=o.FINISH,s=o.ERROR;t||(n.player=r.Widget(n.iframe),n.player.bind(a,n.props.onPlay),n.player.bind(u,n.props.onPause),n.player.bind(i,function(e){n.currentTime=e.currentPosition/1e3,n.fractionLoaded=e.loadedProgress}),n.player.bind(c,function(){return n.props.onEnded()}),n.player.bind(s,function(e){return n.props.onError(e)})),n.player.load(e,l({},n.props.config.soundcloud.options,{callback:function(){n.player.getDuration(function(e){n.duration=e/1e3,n.props.onReady()})}}))}})}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){}},{key:"seekTo",value:function(e){this.callPlayer("seekTo",1e3*e)}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",100*e)}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"getSecondsLoaded",value:function(){return this.fractionLoaded*this.duration}},{key:"render",value:function(){var e=l({width:"100%",height:"100%"},this.props.style);return s.default.createElement("iframe",{ref:this.ref,src:"https://w.soundcloud.com/player/?url="+encodeURIComponent(this.props.url),style:e,frameBorder:0})}}]),t}(c.Component);h.displayName="SoundCloud",h.canPlay=function(e){return y.test(e)},h.loopOnEnded=!0,t.default=(0,d.default)(h)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Vimeo=void 0;var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(0),s=r(c),f=n(1),p=n(2),d=r(p),y=/vimeo\.com\/.+/,h=/vimeo\.com\/external\/.+\.mp4/,m=t.Vimeo=function(e){function t(){var e,n,r,i;o(this,t);for(var l=arguments.length,u=Array(l),c=0;c<l;c++)u[c]=arguments[c];return n=r=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.callPlayer=f.callPlayer,r.duration=null,r.currentTime=null,r.secondsLoaded=null,r.ref=function(e){r.container=e},i=n,a(r,i)}return i(t,e),u(t,[{key:"load",value:function(e){var t=this;this.duration=null,(0,f.getSDK)("https://player.vimeo.com/api/player.js","Vimeo").then(function(n){t.container&&(t.player=new n.Player(t.container,l({},t.props.config.vimeo.playerOptions,{url:e,loop:t.props.loop})),t.player.ready().then(function(){var e=t.container.querySelector("iframe");e.style.width="100%",e.style.height="100%"}).catch(t.props.onError),t.player.on("loaded",function(){t.props.onReady(),t.player.getDuration().then(function(e){t.duration=e})}),t.player.on("play",t.props.onPlay),t.player.on("pause",t.props.onPause),t.player.on("seeked",function(e){return t.props.onSeek(e.seconds)}),t.player.on("ended",t.props.onEnded),t.player.on("error",t.props.onError),t.player.on("timeupdate",function(e){var n=e.seconds;t.currentTime=n}),t.player.on("progress",function(e){var n=e.seconds;t.secondsLoaded=n}))},this.props.onError)}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){this.callPlayer("unload")}},{key:"seekTo",value:function(e){this.callPlayer("setCurrentTime",e)}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",e)}},{key:"getDuration",value:function(){return this.duration}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"getSecondsLoaded",value:function(){return this.secondsLoaded}},{key:"render",value:function(){var e=l({width:"100%",height:"100%",overflow:"hidden",backgroundColor:"black"},this.props.style);return s.default.createElement("div",{key:this.props.url,ref:this.ref,style:e})}}]),t}(c.Component);m.displayName="Vimeo",m.canPlay=function(e){return!h.test(e)&&y.test(e)},t.default=(0,d.default)(m)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.DailyMotion=void 0;var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(0),s=r(c),f=n(1),p=n(2),d=r(p),y=/dailymotion\.com\/(video|hub)\/([^_]+)[^#]*(#video=([^_&]+))?/,h=t.DailyMotion=function(e){function t(){var e,n,r,i;o(this,t);for(var l=arguments.length,u=Array(l),c=0;c<l;c++)u[c]=arguments[c];return n=r=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.callPlayer=f.callPlayer,r.onDurationChange=function(){var e=r.getDuration();r.props.onDuration(e)},r.ref=function(e){r.container=e},i=n,a(r,i)}return i(t,e),u(t,[{key:"parseId",value:function(e){var t=e.match(y);return t[4]||t[2]}},{key:"load",value:function(e){var t=this,n=this.props,r=n.controls,o=n.config,a=n.onError,i=n.playing,u=this.parseId(e);if(this.player)return void this.player.load(u,{start:(0,f.parseStartTime)(e),autoplay:i});(0,f.getSDK)("https://api.dmcdn.net/all.js","DM","dmAsyncInit",function(e){return e.player}).then(function(n){if(t.container){var i=n.player;t.player=new i(t.container,{width:"100%",height:"100%",video:u,params:l({controls:r,autoplay:t.props.playing,start:(0,f.parseStartTime)(e),origin:window.location.origin},o.dailymotion.params),events:{apiready:t.props.onReady,seeked:function(){return t.props.onSeek(t.player.currentTime)},video_end:t.props.onEnded,durationchange:t.onDurationChange,pause:t.props.onPause,playing:t.props.onPlay,waiting:t.props.onBuffer,error:function(e){return a(e)}}})}},a)}},{key:"play",value:function(){this.callPlayer("play")}},{key:"pause",value:function(){this.callPlayer("pause")}},{key:"stop",value:function(){}},{key:"seekTo",value:function(e){this.callPlayer("seek",e)}},{key:"setVolume",value:function(e){this.callPlayer("setVolume",e)}},{key:"getDuration",value:function(){return this.player.duration||null}},{key:"getCurrentTime",value:function(){return this.player.currentTime}},{key:"getSecondsLoaded",value:function(){return this.player.bufferedTime}},{key:"render",value:function(){var e=l({width:"100%",height:"100%",backgroundColor:"black"},this.props.style);return s.default.createElement("div",{style:e},s.default.createElement("div",{ref:this.ref}))}}]),t}(c.Component);h.displayName="DailyMotion",h.canPlay=function(e){return y.test(e)},h.loopOnEnded=!0,t.default=(0,d.default)(h)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function l(e){if(e instanceof Array){var t=!0,n=!1,r=void 0;try{for(var o,a=e[Symbol.iterator]();!(t=(o=a.next()).done);t=!0){var i=o.value;if("string"==typeof i&&l(i))return!0;if(l(i.src))return!0}}catch(e){n=!0,r=e}finally{try{!t&&a.return&&a.return()}finally{if(n)throw r}}return!1}return m.test(e)||v.test(e)||g.test(e)||b.test(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.FilePlayer=void 0;var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(0),f=r(s),p=n(1),d=n(2),y=r(d),h="undefined"!=typeof navigator&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,m=/\.(m4a|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i,v=/\.(mp4|og[gv]|webm|mov|m4v)($|\?)/i,g=/\.(m3u8)($|\?)/i,b=/\.(mpd)($|\?)/i,k=t.FilePlayer=function(e){function t(){var e,n,r,i;o(this,t);for(var l=arguments.length,c=Array(l),s=0;s<l;s++)c[s]=arguments[s];return n=r=a(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(c))),r.onSeek=function(e){r.props.onSeek(e.target.currentTime)},r.renderSource=function(e,t){return"string"==typeof e?f.default.createElement("source",{key:t,src:e}):f.default.createElement("source",u({key:t},e))},r.renderTrack=function(e,t){return f.default.createElement("track",u({key:t},e))},r.ref=function(e){r.player=e},i=n,a(r,i)}return i(t,e),c(t,[{key:"componentDidMount",value:function(){this.addListeners(),h&&this.player.load()}},{key:"componentWillReceiveProps",value:function(e){this.shouldUseAudio(this.props)!==this.shouldUseAudio(e)&&this.removeListeners()}},{key:"componentDidUpdate",value:function(e){this.shouldUseAudio(this.props)!==this.shouldUseAudio(e)&&this.addListeners()}},{key:"componentWillUnmount",value:function(){this.removeListeners()}},{key:"addListeners",value:function(){var e=this.props,t=e.onReady,n=e.onPlay,r=e.onPause,o=e.onEnded,a=e.onError,i=e.playsinline;this.player.addEventListener("canplay",t),this.player.addEventListener("play",n),this.player.addEventListener("pause",r),this.player.addEventListener("seeked",this.onSeek),this.player.addEventListener("ended",o),this.player.addEventListener("error",a),i&&(this.player.setAttribute("playsinline",""),this.player.setAttribute("webkit-playsinline",""))}},{key:"removeListeners",value:function(){var e=this.props,t=e.onReady,n=e.onPlay,r=e.onPause,o=e.onEnded,a=e.onError;this.player.removeEventListener("canplay",t),this.player.removeEventListener("play",n),this.player.removeEventListener("pause",r),this.player.removeEventListener("seeked",this.onSeek),this.player.removeEventListener("ended",o),this.player.removeEventListener("error",a)}},{key:"shouldUseAudio",value:function(e){return m.test(e.url)||e.config.file.forceAudio}},{key:"shouldUseHLS",value:function(e){return g.test(e)&&!h||this.props.config.file.forceHLS}},{key:"shouldUseDASH",value:function(e){return b.test(e)||this.props.config.file.forceDASH}},{key:"load",value:function(e){var t=this;this.shouldUseHLS(e)&&(0,p.getSDK)("https://cdnjs.cloudflare.com/ajax/libs/hls.js/0.8.9/hls.min.js","Hls").then(function(n){t.hls=new n(t.props.config.file.hlsOptions),t.hls.on(n.Events.ERROR,function(e,r){t.props.onError(e,r,t.hls,n)}),t.hls.loadSource(e),t.hls.attachMedia(t.player)}),this.shouldUseDASH(e)&&(0,p.getSDK)("https://cdnjs.cloudflare.com/ajax/libs/dashjs/2.6.5/dash.all.min.js","dashjs").then(function(n){t.dash=n.MediaPlayer().create(),t.dash.initialize(t.player,e,t.props.playing),t.dash.getDebug().setLogToBrowserConsole(!1)})}},{key:"play",value:function(){var e=this.player.play();e&&e.catch(this.props.onError)}},{key:"pause",value:function(){this.player.pause()}},{key:"stop",value:function(){this.player.removeAttribute("src"),this.hls&&this.hls.destroy(),this.dash&&this.dash.reset()}},{key:"seekTo",value:function(e){this.player.currentTime=e}},{key:"setVolume",value:function(e){this.player.volume=e}},{key:"setPlaybackRate",value:function(e){this.player.playbackRate=e}},{key:"getDuration",value:function(){return this.player.duration}},{key:"getCurrentTime",value:function(){return this.player.currentTime}},{key:"getSecondsLoaded",value:function(){return 0===this.player.buffered.length?0:this.player.buffered.end(0)}},{key:"render",value:function(){var e=this.props,t=e.url,n=e.loop,r=e.controls,o=e.config,a=e.width,i=e.height,l=this.shouldUseAudio(this.props),c=this.shouldUseHLS(t),s=this.shouldUseDASH(t),p=l?"audio":"video",d=t instanceof Array||c||s?void 0:t,y={width:a&&"auto"!==a?"100%":a,height:i&&"auto"!==i?"100%":i};return f.default.createElement(p,u({ref:this.ref,src:d,style:y,preload:"auto",controls:r,loop:n},o.file.attributes),t instanceof Array&&t.map(this.renderSource),o.file.tracks.map(this.renderTrack))}}]),t}(s.Component);k.displayName="FilePlayer",k.canPlay=l,t.default=(0,y.default)(k)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){(0,l.render)(i.default.createElement(c.default,t),e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var a=n(0),i=r(a),l=n(15),u=n(25),c=r(u);e.exports=t.default},function(e,t,n){"use strict";function r(e){for(var t=arguments.length-1,n="Minified React error #"+e+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);throw t=Error(n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."),t.name="Invariant Violation",t.framesToPop=1,t}function o(e,t,n){this.props=e,this.context=t,this.refs=k,this.updater=n||O}function a(e,t,n){this.props=e,this.context=t,this.refs=k,this.updater=n||O}function i(){}function l(e,t,n){this.props=e,this.context=t,this.refs=k,this.updater=n||O}function u(e,t,n){var r,o={},a=null,i=null;if(null!=t)for(r in void 0!==t.ref&&(i=t.ref),void 0!==t.key&&(a=""+t.key),t)I.call(t,r)&&!j.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(1===l)o.children=n;else if(1<l){for(var u=Array(l),c=0;c<l;c++)u[c]=arguments[c+2];o.children=u}if(e&&e.defaultProps)for(r in l=e.defaultProps)void 0===o[r]&&(o[r]=l[r]);return{$$typeof:C,type:e,key:a,ref:i,props:o,_owner:D.current}}function c(e){return"object"===(void 0===e?"undefined":g(e))&&null!==e&&e.$$typeof===C}function s(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,function(e){return t[e]})}function f(e,t,n,r){if(A.length){var o=A.pop();return o.result=e,o.keyPrefix=t,o.func=n,o.context=r,o.count=0,o}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function p(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>A.length&&A.push(e)}function d(e,t,n,o){var a=void 0===e?"undefined":g(e);"undefined"!==a&&"boolean"!==a||(e=null);var i=!1;if(null===e)i=!0;else switch(a){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case C:case E:case T:case _:i=!0}}if(i)return n(o,e,""===t?"."+y(e,0):t),1;if(i=0,t=""===t?".":t+":",Array.isArray(e))for(var l=0;l<e.length;l++){a=e[l];var u=t+y(a,l);i+=d(a,u,n,o)}else if(null===e||void 0===e?u=null:(u=x&&e[x]||e["@@iterator"],u="function"==typeof u?u:null),"function"==typeof u)for(e=u.call(e),l=0;!(a=e.next()).done;)a=a.value,u=t+y(a,l++),i+=d(a,u,n,o);else"object"===a&&(n=""+e,r("31","[object Object]"===n?"object with keys {"+Object.keys(e).join(", ")+"}":n,""));return i}function y(e,t){return"object"===(void 0===e?"undefined":g(e))&&null!==e&&null!=e.key?s(e.key):t.toString(36)}function h(e,t){e.func.call(e.context,t,e.count++)}function m(e,t,n){var r=e.result,o=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?v(e,r,n,w.thatReturnsArgument):null!=e&&(c(e)&&(t=o+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(M,"$&/")+"/")+n,e={$$typeof:C,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}),r.push(e))}function v(e,t,n,r,o){var a="";null!=n&&(a=(""+n).replace(M,"$&/")+"/"),t=f(t,a,r,o),null==e||d(e,"",m,t),p(t)}var g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b=n(6),k=n(7),w=n(3),P="function"==typeof Symbol&&Symbol.for,C=P?Symbol.for("react.element"):60103,E=P?Symbol.for("react.call"):60104,T=P?Symbol.for("react.return"):60105,_=P?Symbol.for("react.portal"):60106,S=P?Symbol.for("react.fragment"):60107,x="function"==typeof Symbol&&Symbol.iterator,O={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}};o.prototype.isReactComponent={},o.prototype.setState=function(e,t){"object"!==(void 0===e?"undefined":g(e))&&"function"!=typeof e&&null!=e&&r("85"),this.updater.enqueueSetState(this,e,t,"setState")},o.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},i.prototype=o.prototype;var N=a.prototype=new i;N.constructor=a,b(N,o.prototype),N.isPureReactComponent=!0;var R=l.prototype=new i;R.constructor=l,b(R,o.prototype),R.unstable_isAsyncReactComponent=!0,R.render=function(){return this.props.children};var D={current:null},I=Object.prototype.hasOwnProperty,j={key:!0,ref:!0,__self:!0,__source:!0},M=/\/+/g,A=[],L={Children:{map:function(e,t,n){if(null==e)return e;var r=[];return v(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;t=f(null,null,t,n),null==e||d(e,"",h,t),p(t)},count:function(e){return null==e?0:d(e,"",w.thatReturnsNull,null)},toArray:function(e){var t=[];return v(e,t,null,w.thatReturnsArgument),t},only:function(e){return c(e)||r("143"),e}},Component:o,PureComponent:a,unstable_AsyncComponent:l,Fragment:S,createElement:u,cloneElement:function(e,t,n){var r=b({},e.props),o=e.key,a=e.ref,i=e._owner;if(null!=t){if(void 0!==t.ref&&(a=t.ref,i=D.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(u in t)I.call(t,u)&&!j.hasOwnProperty(u)&&(r[u]=void 0===t[u]&&void 0!==l?l[u]:t[u])}var u=arguments.length-2;if(1===u)r.children=n;else if(1<u){l=Array(u);for(var c=0;c<u;c++)l[c]=arguments[c+2];r.children=l}return{$$typeof:C,type:e.type,key:o,ref:a,props:r,_owner:i}},createFactory:function(e){var t=u.bind(null,e);return t.type=e,t},isValidElement:c,version:"16.2.0",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:D,assign:b}},F=Object.freeze({default:L}),U=F&&L||F;e.exports=U.default?U.default:U},function(e,t,n){"use strict";function r(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(e){console.error(e)}}r(),e.exports=n(16)},function(e,t,n){"use strict";function r(e){for(var t=arguments.length-1,n="Minified React error #"+e+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);throw t=Error(n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."),t.name="Invariant Violation",t.framesToPop=1,t}function o(e,t){return(e&t)===t}function a(e,t){if(Nn.hasOwnProperty(e)||2<e.length&&("o"===e[0]||"O"===e[0])&&("n"===e[1]||"N"===e[1]))return!1;if(null===t)return!0;switch(void 0===t?"undefined":bn(t)){case"boolean":return Nn.hasOwnProperty(e)?e=!0:(t=i(e))?e=t.hasBooleanValue||t.hasStringBooleanValue||t.hasOverloadedBooleanValue:(e=e.toLowerCase().slice(0,5),e="data-"===e||"aria-"===e),e;case"undefined":case"number":case"string":case"object":return!0;default:return!1}}function i(e){return Dn.hasOwnProperty(e)?Dn[e]:null}function l(e){return e[1].toUpperCase()}function u(e,t,n,r,o,a,i,l,u){Wn._hasCaughtError=!1,Wn._caughtError=null;var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){Wn._caughtError=e,Wn._hasCaughtError=!0}}function c(){if(Wn._hasRethrowError){var e=Wn._rethrowError;throw Wn._rethrowError=null,Wn._hasRethrowError=!1,e}}function s(){if($n)for(var e in qn){var t=qn[e],n=$n.indexOf(e);if(-1<n||r("96",e),!Gn[n]){t.extractEvents||r("97",e),Gn[n]=t,n=t.eventTypes;for(var o in n){var a=void 0,i=n[o],l=t,u=o;Yn.hasOwnProperty(u)&&r("99",u),Yn[u]=i;var c=i.phasedRegistrationNames;if(c){for(a in c)c.hasOwnProperty(a)&&f(c[a],l,u);a=!0}else i.registrationName?(f(i.registrationName,l,u),a=!0):a=!1;a||r("98",o,e)}}}}function f(e,t,n){Qn[e]&&r("100",e),Qn[e]=t,Xn[e]=t.eventTypes[n].dependencies}function p(e){$n&&r("101"),$n=Array.prototype.slice.call(e),s()}function d(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var o=e[t];qn.hasOwnProperty(t)&&qn[t]===o||(qn[t]&&r("102",t),qn[t]=o,n=!0)}n&&s()}function y(e,t,n,r){t=e.type||"unknown-event",e.currentTarget=tr(r),Wn.invokeGuardedCallbackAndCatchFirstError(t,n,void 0,e),e.currentTarget=null}function h(e,t){return null==t&&r("30"),null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function m(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}function v(e,t){if(e){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var o=0;o<n.length&&!e.isPropagationStopped();o++)y(e,t,n[o],r[o]);else n&&y(e,t,n,r);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}function g(e){return v(e,!0)}function b(e){return v(e,!1)}function k(e,t){var n=e.stateNode;if(!n)return null;var o=Jn(n);if(!o)return null;n=o[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":(o=!o.disabled)||(e=e.type,o=!("button"===e||"input"===e||"select"===e||"textarea"===e)),e=!o;break e;default:e=!1}return e?null:(n&&"function"!=typeof n&&r("231",t,void 0===n?"undefined":bn(n)),n)}function w(e,t,n,r){for(var o,a=0;a<Gn.length;a++){var i=Gn[a];i&&(i=i.extractEvents(e,t,n,r))&&(o=h(o,i))}return o}function P(e){e&&(nr=h(nr,e))}function C(e){var t=nr;nr=null,t&&(e?m(t,g):m(t,b),nr&&r("95"),Wn.rethrowCaughtError())}function E(e){if(e[ir])return e[ir];for(var t=[];!e[ir];){if(t.push(e),!e.parentNode)return null;e=e.parentNode}var n=void 0,r=e[ir];if(5===r.tag||6===r.tag)return r;for(;e&&(r=e[ir]);e=t.pop())n=r;return n}function T(e){if(5===e.tag||6===e.tag)return e.stateNode;r("33")}function _(e){return e[lr]||null}function S(e){do{e=e.return}while(e&&5!==e.tag);return e||null}function x(e,t,n){for(var r=[];e;)r.push(e),e=S(e);for(e=r.length;0<e--;)t(r[e],"captured",n);for(e=0;e<r.length;e++)t(r[e],"bubbled",n)}function O(e,t,n){(t=k(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=h(n._dispatchListeners,t),n._dispatchInstances=h(n._dispatchInstances,e))}function N(e){e&&e.dispatchConfig.phasedRegistrationNames&&x(e._targetInst,O,e)}function R(e){if(e&&e.dispatchConfig.phasedRegistrationNames){var t=e._targetInst;t=t?S(t):null,x(t,O,e)}}function D(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=k(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=h(n._dispatchListeners,t),n._dispatchInstances=h(n._dispatchInstances,e))}function I(e){e&&e.dispatchConfig.registrationName&&D(e._targetInst,null,e)}function j(e){m(e,N)}function M(e,t,n,r){if(n&&r)e:{for(var o=n,a=r,i=0,l=o;l;l=S(l))i++;l=0;for(var u=a;u;u=S(u))l++;for(;0<i-l;)o=S(o),i--;for(;0<l-i;)a=S(a),l--;for(;i--;){if(o===a||o===a.alternate)break e;o=S(o),a=S(a)}o=null}else o=null;for(a=o,o=[];n&&n!==a&&(null===(i=n.alternate)||i!==a);)o.push(n),n=S(n);for(n=[];r&&r!==a&&(null===(i=r.alternate)||i!==a);)n.push(r),r=S(r);for(r=0;r<o.length;r++)D(o[r],"bubbled",e);for(e=n.length;0<e--;)D(n[e],"captured",t)}function A(){return!sr&&wn.canUseDOM&&(sr="textContent"in document.documentElement?"textContent":"innerText"),sr}function L(){if(fr._fallbackText)return fr._fallbackText;var e,t,n=fr._startText,r=n.length,o=F(),a=o.length;for(e=0;e<r&&n[e]===o[e];e++);var i=r-e;for(t=1;t<=i&&n[r-t]===o[a-t];t++);return fr._fallbackText=o.slice(e,1<t?1-t:void 0),fr._fallbackText}function F(){return"value"in fr._root?fr._root.value:fr._root[A()]}function U(e,t,n,r){this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface;for(var o in e)e.hasOwnProperty(o)&&((t=e[o])?this[o]=t(n):"target"===o?this.target=r:this[o]=n[o]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?Cn.thatReturnsTrue:Cn.thatReturnsFalse,this.isPropagationStopped=Cn.thatReturnsFalse,this}function H(e,t,n,r){if(this.eventPool.length){var o=this.eventPool.pop();return this.call(o,e,t,n,r),o}return new this(e,t,n,r)}function V(e){e instanceof this||r("223"),e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function z(e){e.eventPool=[],e.getPooled=H,e.release=V}function B(e,t,n,r){return U.call(this,e,t,n,r)}function K(e,t,n,r){return U.call(this,e,t,n,r)}function W(e,t){switch(e){case"topKeyUp":return-1!==yr.indexOf(t.keyCode);case"topKeyDown":return 229!==t.keyCode;case"topKeyPress":case"topMouseDown":case"topBlur":return!0;default:return!1}}function $(e){return e=e.detail,"object"===(void 0===e?"undefined":bn(e))&&"data"in e?e.data:null}function q(e,t){switch(e){case"topCompositionEnd":return $(t);case"topKeyPress":return 32!==t.which?null:(Er=!0,Pr);case"topTextInput":return e=t.data,e===Pr&&Er?null:e;default:return null}}function G(e,t){if(Tr)return"topCompositionEnd"===e||!hr&&W(e,t)?(e=L(),fr._root=null,fr._startText=null,fr._fallbackText=null,Tr=!1,e):null;switch(e){case"topPaste":return null;case"topKeyPress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"topCompositionEnd":return wr?null:t.data;default:return null}}function Y(e){if(e=er(e)){Sr&&"function"==typeof Sr.restoreControlledState||r("194");var t=Jn(e.stateNode);Sr.restoreControlledState(e.stateNode,e.type,t)}}function Q(e){xr?Or?Or.push(e):Or=[e]:xr=e}function X(){if(xr){var e=xr,t=Or;if(Or=xr=null,Y(e),t)for(e=0;e<t.length;e++)Y(t[e])}}function Z(e,t){return e(t)}function J(e,t){if(Dr)return Z(e,t);Dr=!0;try{return Z(e,t)}finally{Dr=!1,X()}}function ee(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Ir[e.type]:"textarea"===t}function te(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}function ne(e,t){if(!wn.canUseDOM||t&&!("addEventListener"in document))return!1;t="on"+e;var n=t in document;return n||(n=document.createElement("div"),n.setAttribute(t,"return;"),n="function"==typeof n[t]),!n&&br&&"wheel"===e&&(n=document.implementation.hasFeature("Events.wheel","3.0")),n}function re(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function oe(e){var t=re(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"function"==typeof n.get&&"function"==typeof n.set)return Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:!0,get:function(){return n.get.call(this)},set:function(e){r=""+e,n.set.call(this,e)}}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}function ae(e){e._valueTracker||(e._valueTracker=oe(e))}function ie(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=re(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function le(e,t,n){return e=U.getPooled(jr.change,e,t,n),e.type="change",Q(n),j(e),e}function ue(e){P(e),C(!1)}function ce(e){if(ie(T(e)))return e}function se(e,t){if("topChange"===e)return t}function fe(){Mr&&(Mr.detachEvent("onpropertychange",pe),Ar=Mr=null)}function pe(e){"value"===e.propertyName&&ce(Ar)&&(e=le(Ar,e,te(e)),J(ue,e))}function de(e,t,n){"topFocus"===e?(fe(),Mr=t,Ar=n,Mr.attachEvent("onpropertychange",pe)):"topBlur"===e&&fe()}function ye(e){if("topSelectionChange"===e||"topKeyUp"===e||"topKeyDown"===e)return ce(Ar)}function he(e,t){if("topClick"===e)return ce(t)}function me(e,t){if("topInput"===e||"topChange"===e)return ce(t)}function ve(e,t,n,r){return U.call(this,e,t,n,r)}function ge(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Ur[e])&&!!t[e]}function be(){return ge}function ke(e,t,n,r){return U.call(this,e,t,n,r)}function we(e){return e=e.type,"string"==typeof e?e:"function"==typeof e?e.displayName||e.name:null}function Pe(e){var t=e;if(e.alternate)for(;t.return;)t=t.return;else{if(0!=(2&t.effectTag))return 1;for(;t.return;)if(t=t.return,0!=(2&t.effectTag))return 1}return 3===t.tag?2:3}function Ce(e){return!!(e=e._reactInternalFiber)&&2===Pe(e)}function Ee(e){2!==Pe(e)&&r("188")}function Te(e){var t=e.alternate;if(!t)return t=Pe(e),3===t&&r("188"),1===t?null:e;for(var n=e,o=t;;){var a=n.return,i=a?a.alternate:null;if(!a||!i)break;if(a.child===i.child){for(var l=a.child;l;){if(l===n)return Ee(a),e;if(l===o)return Ee(a),t;l=l.sibling}r("188")}if(n.return!==o.return)n=a,o=i;else{l=!1;for(var u=a.child;u;){if(u===n){l=!0,n=a,o=i;break}if(u===o){l=!0,o=a,n=i;break}u=u.sibling}if(!l){for(u=i.child;u;){if(u===n){l=!0,n=i,o=a;break}if(u===o){l=!0,o=i,n=a;break}u