(("undefined"!=typeof self?self:this).webpackJsonp__wix_communities_blog_ooi=("undefined"!=typeof self?self:this).webpackJsonp__wix_communities_blog_ooi||[]).push([[2286],{24916:e=>{function t(e,t){e.onload=function(){this.onerror=this.onload=null,t(null,e)},e.onerror=function(){this.onerror=this.onload=null,t(new Error("Failed to load "+this.src),e)}}function s(e,t){e.onreadystatechange=function(){"complete"!=this.readyState&&"loaded"!=this.readyState||(this.onreadystatechange=null,t(null,e))}}e.exports=function(e,i,r){var o=document.head||document.getElementsByTagName("head")[0],n=document.createElement("script");"function"==typeof i&&(r=i,i={}),i=i||{},r=r||function(){},n.type=i.type||"text/javascript",n.charset=i.charset||"utf8",n.async=!("async"in i)||!!i.async,n.src=e,i.attrs&&function(e,t){for(var s in t)e.setAttribute(s,t[s])}(n,i.attrs),i.text&&(n.text=""+i.text),("onload"in n?t:s)(n,r),n.onload||t(n,r),o.appendChild(n)}},62286:(e,t,s)=>{"use strict";s.d(t,{D:()=>we});var i=s(60751),r=s(97598);const{string:o,bool:n,number:a,array:l,oneOfType:h,shape:p,object:d,func:u,node:c}=r,y={url:h([o,l,d]),playing:n,loop:n,controls:n,volume:a,muted:n,playbackRate:a,width:h([o,a]),height:h([o,a]),style:d,progressInterval:a,playsinline:n,pip:n,light:h([n,o]),playIcon:c,previewTabIndex:a,previewAriaLabel:o,wrapper:h([o,u,p({render:u.isRequired})]),config:p({soundcloud:p({options:d,preload:n}),youtube:p({playerVars:d,embedOptions:d,preload:n}),facebook:p({appId:o,version:o,playerId:o}),dailymotion:p({params:d,preload:n}),vimeo:p({playerOptions:d,preload:n}),file:p({attributes:d,tracks:l,forceVideo:n,forceAudio:n,forceHLS:n,forceDASH:n,hlsOptions:d,hlsVersion:o,dashVersion:o}),wistia:p({options:d}),mixcloud:p({options:d}),twitch:p({options:d,playerId:o})}),onReady:u,onStart:u,onPlay:u,onPause:u,onBuffer:u,onBufferEnd:u,onEnded:u,onError:u,onDuration:u,onSeek:u,onProgress:u,onEnablePIP:u,onDisablePIP:u},m={playing:!1,loop:!1,controls:!1,volume:null,muted:!1,playbackRate:1,width:"640px",height:"360px",style:{},progressInterval:1e3,playsinline:!1,pip:!1,light:!1,wrapper:"div",previewTabIndex:0,previewAriaLabel:"",config:{soundcloud:{options:{visual:!0,buying:!1,liking:!1,download:!1,sharing:!1,show_comments:!1,show_playcount:!1}},youtube:{playerVars:{playsinline:1,showinfo:0,rel:0,iv_load_policy:3,modestbranding:1},embedOptions:{},preload:!1},facebook:{appId:"1309697205772819",version:"v3.3",playerId:null},dailymotion:{params:{api:1,"endscreen-enable":!1},preload:!1},vimeo:{playerOptions:{autopause:!1,byline:!1,portrait:!1,title:!1},preload:!1},file:{attributes:{},tracks:[],forceVideo:!1,forceAudio:!1,forceHLS:!1,forceDASH:!1,hlsOptions:{},hlsVersion:"0.13.1",dashVersion:"2.9.2"},wistia:{options:{}},mixcloud:{options:{hide_cover:1}},twitch:{options:{},playerId:null}},onReady(){},onStart(){},onPlay(){},onPause(){},onBuffer(){},onBufferEnd(){},onEnded(){},onError(){},onDuration(){},onSeek(){},onProgress(){},onEnablePIP(){},onDisablePIP(){}},f=["soundcloudConfig","youtubeConfig","facebookConfig","dailymotionConfig","vimeoConfig","fileConfig","wistiaConfig"];var P=s(24916),g=s(16252);const b=/[?&#](?:start|t)=([0-9hms]+)/,w=/[?&#]end=([0-9hms]+)/,v=/(\d+)(h|m|s)/g,E=/^\d+$/;function k(e,t){const s=e.match(t);if(s){const e=s[1];if(e.match(v))return function(e){let t=0,s=v.exec(e);for(;null!==s;){const[,i,r]=s;"h"===r&&(t+=60*parseInt(i,10)*60),"m"===r&&(t+=60*parseInt(i,10)),"s"===r&&(t+=parseInt(i,10)),s=v.exec(e)}return t}(e);if(E.test(e))return parseInt(e)}}function L(e){return k(e,b)}function I(e){return k(e,w)}function S(){return Math.random().toString(36).substr(2,5)}const T={};function R(e,t,s=null,i=(()=>!0),r=P){return window[t]&&i(window[t])?Promise.resolve(window[t]):new Promise(((i,o)=>{if(T[e])return void T[e].push({resolve:i,reject:o});T[e]=[{resolve:i,reject:o}];const n=t=>{T[e].forEach((e=>e.resolve(t)))};if(s){const e=window[s];window[s]=function(){e&&e(),n(window[t])}}r(e,(i=>{i?(T[e].forEach((e=>e.reject(i))),T[e]=null):s||n(window[t])}))}))}function D(e,t,s){let i=g.merge(g.cloneDeep(t.config),g.cloneDeep(e.config));for(const t of f)if(e[t]){const r=t.replace(/Config$/,"");if(i=g.merge(i,{[r]:e[t]}),s){const e=`ReactPlayer: %c${t} %cis deprecated, please use the config prop instead \u2013 ${"https://github.com/CookPete/react-player#config-prop"}`;console.warn(e,"font-weight: bold","")}}return i}function C(e,...t){if(!this.player||!this.player[e]){let t=`ReactPlayer: ${this.constructor.displayName} player could not call %c${e}%c \u2013 `;return this.player?this.player[e]||(t+="The method was not available"):t+="The player was not available",console.warn(t,"font-weight: bold",""),null}return this.player[e](...t)}function x(e){return null!==e&&"object"==typeof e}function V(e,t){if("function"==typeof e&&"function"==typeof t)return!0;if((0,i.isValidElement)(e)&&(0,i.isValidElement)(t))return!0;if(e instanceof Array&&t instanceof Array){if(e.length!==t.length)return!1;for(let s=0;s!==e.length;s++)if(!V(e[s],t[s]))return!1;return!0}if(x(e)&&x(t)){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const s of Object.keys(e))if(!V(e[s],t[s]))return!1;return!0}return e===t}function A(e){return"undefined"!=typeof window&&void 0!==window.MediaStream&&e instanceof window.MediaStream}class O extends i.Component{constructor(){super(...arguments),this.mounted=!1,this.isReady=!1,this.isPlaying=!1,this.isLoading=!0,this.loadOnReady=null,this.startOnPlay=!0,this.seekOnPlay=null,this.onDurationCalled=!1,this.getInternalPlayer=e=>this.player?this.player[e]:null,this.progress=()=>{if(this.props.url&&this.player&&this.isReady){const e=this.getCurrentTime()||0,t=this.getSecondsLoaded(),s=this.getDuration();if(s){const i={playedSeconds:e,played:e/s};null!==t&&(i.loadedSeconds=t,i.loaded=t/s),i.playedSeconds===this.prevPlayed&&i.loadedSeconds===this.prevLoaded||this.props.onProgress(i),this.prevPlayed=i.playedSeconds,this.prevLoaded=i.loadedSeconds}}this.progressTimeout=setTimeout(this.progress,this.props.progressFrequency||this.props.progressInterval)},this.handleReady=()=>{if(!this.mounted)return;this.isReady=!0,this.isLoading=!1;const{onReady:e,playing:t,volume:s,muted:i}=this.props;e(),i||null===s||this.player.setVolume(s),this.loadOnReady?(this.player.load(this.loadOnReady,!0),this.loadOnReady=null):t&&this.player.play(),this.handleDurationCheck()},this.handlePlay=()=>{this.isPlaying=!0,this.isLoading=!1;const{onStart:e,onPlay:t,playbackRate:s}=this.props;this.startOnPlay&&(this.player.setPlaybackRate&&1!==s&&this.player.setPlaybackRate(s),e(),this.startOnPlay=!1),t(),this.seekOnPlay&&(this.seekTo(this.seekOnPlay),this.seekOnPlay=null),this.handleDurationCheck()},this.handlePause=e=>{this.isPlaying=!1,this.isLoading||this.props.onPause(e)},this.handleEnded=()=>{const{activePlayer:e,loop:t,onEnded:s}=this.props;e.loopOnEnded&&t&&this.seekTo(0),t||(this.isPlaying=!1,s())},this.handleError=(...e)=>{this.isLoading=!1,this.props.onError(...e)},this.handleDurationCheck=()=>{clearTimeout(this.durationCheckTimeout);const e=this.getDuration();e?this.onDurationCalled||(this.props.onDuration(e),this.onDurationCalled=!0):this.durationCheckTimeout=setTimeout(this.handleDurationCheck,100)},this.handleLoaded=()=>{this.isLoading=!1},this.ref=e=>{e&&(this.player=e)}}componentDidMount(){this.mounted=!0,this.player.load(this.props.url),this.progress()}componentWillUnmount(){clearTimeout(this.progressTimeout),clearTimeout(this.durationCheckTimeout),this.isReady&&this.player.stop(),this.player.disablePIP&&this.player.disablePIP(),this.mounted=!1}componentDidUpdate(e){const{url:t,playing:s,volume:i,muted:r,playbackRate:o,pip:n,loop:a,activePlayer:l}=this.props;if(!V(e.url,t)){if(this.isLoading&&!l.forceLoad)return console.warn(`ReactPlayer: the attempt to load ${t} is being deferred until the player has loaded`),void(this.loadOnReady=t);this.isLoading=!0,this.startOnPlay=!0,this.onDurationCalled=!1,this.player.load(t,this.isReady)}e.playing||!s||this.isPlaying||this.player.play(),e.playing&&!s&&this.isPlaying&&this.player.pause(),!e.pip&&n&&this.player.enablePIP&&this.player.enablePIP(),e.pip&&!n&&this.player.disablePIP&&this.player.disablePIP(),e.volume!==i&&null!==i&&this.player.setVolume(i),e.muted!==r&&(r?this.player.mute():(this.player.unmute(),null!==i&&setTimeout((()=>this.player.setVolume(i))))),e.playbackRate!==o&&this.player.setPlaybackRate&&this.player.setPlaybackRate(o),e.loop!==a&&this.player.setLoop&&this.player.setLoop(a)}getDuration(){return this.isReady?this.player.getDuration():null}getCurrentTime(){return this.isReady?this.player.getCurrentTime():null}getSecondsLoaded(){return this.isReady?this.player.getSecondsLoaded():null}seekTo(e,t){if(!this.isReady&&0!==e)return this.seekOnPlay=e,void setTimeout((()=>{this.seekOnPlay=null}),5e3);if(t?"fraction"===t:e>0&&e<1){const t=this.player.getDuration();return t?void this.player.seekTo(t*e):void console.warn("ReactPlayer: could not seek using fraction \u2013\xa0duration not yet available")}this.player.seekTo(e)}render(){const e=this.props.activePlayer;return e?i.createElement(e,{...this.props,ref:this.ref,onReady:this.handleReady,onPlay:this.handlePlay,onPause:this.handlePause,onEnded:this.handleEnded,onLoaded:this.handleLoaded,onError:this.handleError}):null}}O.displayName="Player",O.propTypes=y,O.defaultProps=m;const j="undefined"!=typeof navigator&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,_=/\.(m4a|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i,N=/\.(mp4|og[gv]|webm|mov|m4v)($|\?)/i,M=/\.(m3u8)($|\?)/i,B=/\.(mpd)($|\?)/i,$=/www\.dropbox\.com\/.+/;function U(e){if(e instanceof Array){for(const t of e){if("string"==typeof t&&U(t))return!0;if(U(t.src))return!0}return!1}return!!A(e)||(_.test(e)||N.test(e)||M.test(e)||B.test(e))}function F(e){return e||(e=document.createElement("video")),e.webkitSupportsPresentationMode&&"function"==typeof e.webkitSetPresentationMode&&!/iPhone|iPod/.test(navigator.userAgent)}class H extends i.Component{constructor(){super(...arguments),this.onReady=(...e)=>this.props.onReady(...e),this.onPlay=(...e)=>this.props.onPlay(...e),this.onBuffer=(...e)=>this.props.onBuffer(...e),this.onBufferEnd=(...e)=>this.props.onBufferEnd(...e),this.onPause=(...e)=>this.props.onPause(...e),this.onEnded=(...e)=>this.props.onEnded(...e),this.onError=(...e)=>this.props.onError(...e),this.onEnablePIP=(...e)=>this.props.onEnablePIP(...e),this.onDisablePIP=e=>{const{onDisablePIP:t,playing:s}=this.props;t(e),s&&this.play()},this.onPresentationModeChange=e=>{if(this.player&&F(this.player)){const{webkitPresentationMode:t}=this.player;"picture-in-picture"===t?this.onEnablePIP(e):"inline"===t&&this.onDisablePIP(e)}},this.onSeek=e=>{this.props.onSeek(e.target.currentTime)},this.mute=()=>{this.player.muted=!0},this.unmute=()=>{this.player.muted=!1},this.renderSourceElement=(e,t)=>"string"==typeof e?i.createElement("source",{key:t,src:e}):i.createElement("source",{key:t,...e}),this.renderTrack=(e,t)=>i.createElement("track",{key:t,...e}),this.ref=e=>{this.player&&(this.prevPlayer=this.player),this.player=e}}componentDidMount(){this.addListeners(this.player),j&&this.player.load()}componentDidUpdate(e){this.shouldUseAudio(this.props)!==this.shouldUseAudio(e)&&(this.removeListeners(this.prevPlayer),this.addListeners(this.player))}componentWillUnmount(){this.removeListeners(this.player),this.hls&&this.hls.destroy()}addListeners(e){const{playsinline:t}=this.props;e.addEventListener("canplay",this.onReady),e.addEventListener("play",this.onPlay),e.addEventListener("waiting",this.onBuffer),e.addEventListener("playing",this.onBufferEnd),e.addEventListener("pause",this.onPause),e.addEventListener("seeked",this.onSeek),e.addEventListener("ended",this.onEnded),e.addEventListener("error",this.onError),e.addEventListener("enterpictureinpicture",this.onEnablePIP),e.addEventListener("leavepictureinpicture",this.onDisablePIP),e.addEventListener("webkitpresentationmodechanged",this.onPresentationModeChange),t&&(e.setAttribute("playsinline",""),e.setAttribute("webkit-playsinline",""),e.setAttribute("x5-playsinline",""))}removeListeners(e){e.removeEventListener("canplay",this.onReady),e.removeEventListener("play",this.onPlay),e.removeEventListener("waiting",this.onBuffer),e.removeEventListener("playing",this.onBufferEnd),e.removeEventListener("pause",this.onPause),e.removeEventListener("seeked",this.onSeek),e.removeEventListener("ended",this.onEnded),e.removeEventListener("error",this.onError),e.removeEventListener("enterpictureinpicture",this.onEnablePIP),e.removeEventListener("leavepictureinpicture",this.onDisablePIP),e.removeEventListener("webkitpresentationmodechanged",this.onPresentationModeChange)}shouldUseAudio(e){return!e.config.file.forceVideo&&(!e.config.file.attributes.poster&&(_.test(e.url)||e.config.file.forceAudio))}shouldUseHLS(e){return M.test(e)&&!j||this.props.config.file.forceHLS}shouldUseDASH(e){return B.test(e)||this.props.config.file.forceDASH}load(e){const{hlsVersion:t,dashVersion:s}=this.props.config.file;if(this.shouldUseHLS(e)&&R("https://cdn.jsdelivr.net/npm/hls.js@VERSION/dist/hls.min.js".replace("VERSION",t),"Hls").then((t=>{this.hls=new t(this.props.config.file.hlsOptions),this.hls.on(t.Events.ERROR,((e,s)=>{this.props.onError(e,s,this.hls,t)})),this.hls.loadSource(e),this.hls.attachMedia(this.player)})),this.shouldUseDASH(e)&&R("https://cdnjs.cloudflare.com/ajax/libs/dashjs/VERSION/dash.all.min.js".replace("VERSION",s),"dashjs").then((t=>{this.dash=t.MediaPlayer().create(),this.dash.initialize(this.player,e,this.props.playing),this.dash.on("error",this.props.onError),this.dash.getDebug().setLogToBrowserConsole(!1)})),e instanceof Array)this.player.load();else if(A(e))try{this.player.srcObject=e}catch{this.player.src=window.URL.createObjectURL(e)}}play(){const e=this.player.play();e&&e.catch(this.props.onError)}pause(){this.player.pause()}stop(){this.player.removeAttribute("src"),this.dash&&this.dash.reset()}seekTo(e){this.player.currentTime=e}setVolume(e){this.player.volume=e}enablePIP(){this.player.requestPictureInPicture&&document.pictureInPictureElement!==this.player?this.player.requestPictureInPicture():F(this.player)&&"picture-in-picture"!==this.player.webkitPresentationMode&&this.player.webkitSetPresentationMode("picture-in-picture")}disablePIP(){document.exitPictureInPicture&&document.pictureInPictureElement===this.player?document.exitPictureInPicture():F(this.player)&&"inline"!==this.player.webkitPresentationMode&&this.player.webkitSetPresentationMode("inline")}setPlaybackRate(e){this.player.playbackRate=e}getDuration(){if(!this.player)return null;const{duration:e,seekable:t}=this.player;return e===1/0&&t.length>0?t.end(t.length-1):e}getCurrentTime(){return this.player?this.player.currentTime:null}getSecondsLoaded(){if(!this.player)return null;const{buffered:e}=this.player;if(0===e.length)return 0;const t=e.end(e.length-1),s=this.getDuration();return t>s?s:t}getSource(e){const t=this.shouldUseHLS(e),s=this.shouldUseDASH(e);if(!(e instanceof Array||A(e)||t||s))return $.test(e)?e.replace("www.dropbox.com","dl.dropboxusercontent.com"):e}render(){const{url:e,playing:t,loop:s,controls:r,muted:o,config:n,width:a,height:l}=this.props,h=this.shouldUseAudio(this.props),p=h?"audio":"video",d={width:"auto"===a?a:"100%",height:"auto"===l?l:"100%"};return h||(d.display="block"),i.createElement(p,{ref:this.ref,src:this.getSource(e),style:d,preload:"auto",autoPlay:t||void 0,controls:r,muted:o,loop:s,...n.file.attributes},e instanceof Array&&e.map(this.renderSourceElement),n.file.tracks.map(this.renderTrack))}}H.displayName="FilePlayer",H.canPlay=U,H.canEnablePIP=function(e){return U(e)&&(!!document.pictureInPictureEnabled||F())&&!_.test(e)};const q=/^(?:(?:https?):)?(?:\/\/)?(?:www\.)?(?:(?:dailymotion\.com(?:\/embed)?\/video)|dai\.ly)\/([a-zA-Z0-9]+)(?:_[\w_-]+)?$/;class W extends i.Component{constructor(){super(...arguments),this.callPlayer=C,this.onDurationChange=()=>{const e=this.getDuration();this.props.onDuration(e)},this.mute=()=>{this.callPlayer("setMuted",!0)},this.unmute=()=>{this.callPlayer("setMuted",!1)},this.ref=e=>{this.container=e}}load(e){const{controls:t,config:s,onError:i,playing:r}=this.props,[,o]=e.match(q);this.player?this.player.load(o,{start:L(e),autoplay:r}):R("https://api.dmcdn.net/all.js","DM","dmAsyncInit",(e=>e.player)).then((r=>{if(!this.container)return;const n=r.player;this.player=new n(this.container,{width:"100%",height:"100%",video:o,params:{controls:t,autoplay:this.props.playing,mute:this.props.muted,start:L(e),origin:window.location.origin,...s.dailymotion.params},events:{apiready:this.props.onReady,seeked:()=>this.props.onSeek(this.player.currentTime),video_end:this.props.onEnded,durationchange:this.onDurationChange,pause:this.props.onPause,playing:this.props.onPlay,waiting:this.props.onBuffer,error:e=>i(e)}})}),i)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e){this.callPlayer("seek",e)}setVolume(e){this.callPlayer("setVolume",e)}getDuration(){return this.player.duration||null}getCurrentTime(){return this.player.currentTime}getSecondsLoaded(){return this.player.bufferedTime}render(){const{display:e}=this.props,t={width:"100%",height:"100%",display:e};return i.createElement("div",{style:t},i.createElement("div",{ref:this.ref}))}}W.displayName="DailyMotion",W.canPlay=e=>q.test(e),W.loopOnEnded=!0;const Y="https://connect.facebook.net/en_US/sdk.js",z="fbAsyncInit",G=/^https?:\/\/(www\.)?facebook\.com.*\/(video(s)?|watch|story)(\.php?|\/).+$/;class K extends i.Component{constructor(){super(...arguments),this.callPlayer=C,this.playerID=this.props.config.facebook.playerId||`facebook-player-${S()}`,this.mute=()=>{this.callPlayer("mute")},this.unmute=()=>{this.callPlayer("unmute")}}load(e,t){t?R(Y,"FB",z).then((e=>e.XFBML.parse())):R(Y,"FB",z).then((e=>{e.init({appId:this.props.config.facebook.appId,xfbml:!0,version:this.props.config.facebook.version}),e.Event.subscribe("xfbml.render",(e=>{this.props.onLoaded()})),e.Event.subscribe("xfbml.ready",(e=>{"video"===e.type&&e.id===this.playerID&&(this.player=e.instance,this.player.subscribe("startedPlaying",this.props.onPlay),this.player.subscribe("paused",this.props.onPause),this.player.subscribe("finishedPlaying",this.props.onEnded),this.player.subscribe("startedBuffering",this.props.onBuffer),this.player.subscribe("finishedBuffering",this.props.onBufferEnd),this.player.subscribe("error",this.props.onError),this.props.muted||this.callPlayer("unmute"),this.props.onReady(),document.getElementById(this.playerID).querySelector("iframe").style.visibility="visible")}))}))}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e){this.callPlayer("seek",e)}setVolume(e){this.callPlayer("setVolume",e)}getDuration(){return this.callPlayer("getDuration")}getCurrentTime(){return this.callPlayer("getCurrentPosition")}getSecondsLoaded(){return null}render(){return i.createElement("div",{style:{width:"100%",height:"100%"},id:this.playerID,className:"fb-video","data-href":this.props.url,"data-autoplay":this.props.playing?"true":"false","data-allowfullscreen":"true","data-controls":this.props.controls?"true":"false","data-width":"16000px","data-height":"9000px"})}}K.displayName="Facebook",K.canPlay=e=>G.test(e),K.loopOnEnded=!0;const J=/mixcloud\.com\/([^/]+\/[^/]+)/;class Z extends i.Component{constructor(){super(...arguments),this.callPlayer=C,this.duration=null,this.currentTime=null,this.secondsLoaded=null,this.mute=()=>{},this.unmute=()=>{},this.ref=e=>{this.iframe=e}}load(e){R("https://widget.mixcloud.com/media/js/widgetApi.js","Mixcloud").then((e=>{this.player=e.PlayerWidget(this.iframe),this.player.ready.then((()=>{this.player.events.play.on(this.props.onPlay),this.player.events.pause.on(this.props.onPause),this.player.events.ended.on(this.props.onEnded),this.player.events.error.on(this.props.error),this.player.events.progress.on(((e,t)=>{this.currentTime=e,this.duration=t})),this.props.onReady()}))}),this.props.onError)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e){this.callPlayer("seek",e)}setVolume(e){}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return null}render(){const{url:e,config:t}=this.props,s=e.match(J)[1],r=function(e){return Object.keys(e).map((t=>`${t}=${e[t]}`)).join("&")}({...t.mixcloud.options,feed:`/${s}/`});return i.createElement("iframe",{key:s,ref:this.ref,style:{width:"100%",height:"100%"},src:`https://www.mixcloud.com/widget/iframe/?${r}`,frameBorder:"0"})}}Z.displayName="Mixcloud",Z.canPlay=e=>J.test(e),Z.loopOnEnded=!0;const X=/(?:soundcloud\.com|snd\.sc)\/[^.]+$/;class Q extends i.Component{constructor(){super(...arguments),this.callPlayer=C,this.duration=null,this.currentTime=null,this.fractionLoaded=null,this.mute=()=>{this.setVolume(0)},this.unmute=()=>{null!==this.props.volume&&this.setVolume(this.props.volume)},this.ref=e=>{this.iframe=e}}load(e,t){R("https://w.soundcloud.com/player/api.js","SC").then((s=>{if(!this.iframe)return;const{PLAY:i,PLAY_PROGRESS:r,PAUSE:o,FINISH:n,ERROR:a}=s.Widget.Events;t||(this.player=s.Widget(this.iframe),this.player.bind(i,this.props.onPlay),this.player.bind(o,this.props.onPause),this.player.bind(r,(e=>{this.currentTime=e.currentPosition/1e3,this.fractionLoaded=e.loadedProgress})),this.player.bind(n,(()=>this.props.onEnded())),this.player.bind(a,(e=>this.props.onError(e)))),this.player.load(e,{...this.props.config.soundcloud.options,callback:()=>{this.player.getDuration((e=>{this.duration=e/1e3,this.props.onReady()}))}})}))}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e){this.callPlayer("seekTo",1e3*e)}setVolume(e){this.callPlayer("setVolume",100*e)}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return this.fractionLoaded*this.duration}render(){const{display:e}=this.props,t={width:"100%",height:"100%",display:e};return i.createElement("iframe",{ref:this.ref,src:`https://w.soundcloud.com/player/?url=${encodeURIComponent(this.props.url)}`,style:t,frameBorder:0,allow:"autoplay"})}}Q.displayName="SoundCloud",Q.canPlay=e=>X.test(e),Q.loopOnEnded=!0;const ee=/streamable\.com\/([a-z0-9]+)$/;class te extends i.Component{constructor(){super(...arguments),this.callPlayer=C,this.duration=null,this.currentTime=null,this.secondsLoaded=null,this.mute=()=>{this.callPlayer("mute")},this.unmute=()=>{this.callPlayer("unmute")},this.ref=e=>{this.iframe=e}}load(e){R("https://cdn.embed.ly/player-0.1.0.min.js","playerjs").then((e=>{this.iframe&&(this.player=new e.Player(this.iframe),this.player.setLoop(this.props.loop),this.player.on("ready",this.props.onReady),this.player.on("play",this.props.onPlay),this.player.on("pause",this.props.onPause),this.player.on("seeked",this.props.onSeek),this.player.on("ended",this.props.onEnded),this.player.on("error",this.props.onError),this.player.on("timeupdate",(({duration:e,seconds:t})=>{this.duration=e,this.currentTime=t})),this.player.on("buffered",(({percent:e})=>{this.duration&&(this.secondsLoaded=this.duration*e)})),this.props.muted&&this.player.mute())}),this.props.onError)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e){this.callPlayer("setCurrentTime",e)}setVolume(e){this.callPlayer("setVolume",100*e)}setLoop(e){this.callPlayer("setLoop",e)}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return this.secondsLoaded}render(){const e=this.props.url.match(ee)[1];return i.createElement("iframe",{ref:this.ref,src:`https://streamable.com/o/${e}`,frameBorder:"0",scrolling:"no",style:{width:"100%",height:"100%"},allowFullScreen:!0})}}te.displayName="Streamable",te.canPlay=e=>ee.test(e);const se=/(?:www\.|go\.)?twitch\.tv\/videos\/(\d+)($|\?)/,ie=/(?:www\.|go\.)?twitch\.tv\/([a-z0-9_]+)($|\?)/;class re extends i.Component{constructor(){super(...arguments),this.callPlayer=C,this.playerID=this.props.config.twitch.playerId||`twitch-player-${S()}`,this.mute=()=>{this.callPlayer("setMuted",!0)},this.unmute=()=>{this.callPlayer("setMuted",!1)}}load(e,t){const{playsinline:s,onError:i,config:r,controls:o}=this.props,n=ie.test(e),a=n?e.match(ie)[1]:e.match(se)[1];t?n?this.player.setChannel(a):this.player.setVideo("v"+a):R("https://player.twitch.tv/js/embed/v1.js","Twitch").then((e=>{this.player=new e.Player(this.playerID,{video:n?"":a,channel:n?a:"",height:"100%",width:"100%",playsinline:s,autoplay:this.props.playing,muted:this.props.muted,controls:!!n||o,...r.twitch.options});const{READY:t,PLAYING:i,PAUSE:l,ENDED:h,ONLINE:p,OFFLINE:d}=e.Player;this.player.addEventListener(t,this.props.onReady),this.player.addEventListener(i,this.props.onPlay),this.player.addEventListener(l,this.props.onPause),this.player.addEventListener(h,this.props.onEnded),this.player.addEventListener(p,this.props.onLoaded),this.player.addEventListener(d,this.props.onLoaded)}),i)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){this.callPlayer("pause")}seekTo(e){this.callPlayer("seek",e)}setVolume(e){this.callPlayer("setVolume",e)}getDuration(){return this.callPlayer("getDuration")}getCurrentTime(){return this.callPlayer("getCurrentTime")}getSecondsLoaded(){return null}render(){return i.createElement("div",{style:{width:"100%",height:"100%"},id:this.playerID,loading:"lazy"})}}re.displayName="Twitch",re.canPlay=e=>se.test(e)||ie.test(e),re.loopOnEnded=!0;const oe=/vimeo\.com\/.+/,ne=/vimeo\.com\/external\/[0-9]+\..+/;class ae extends i.Component{constructor(){super(...arguments),this.callPlayer=C,this.duration=null,this.currentTime=null,this.secondsLoaded=null,this.mute=()=>{this.setVolume(0)},this.unmute=()=>{null!==this.props.volume&&this.setVolume(this.props.volume)},this.ref=e=>{this.container=e}}load(e){this.duration=null,R("https://player.vimeo.com/api/player.js","Vimeo").then((t=>{this.container&&(this.player=new t.Player(this.container,{url:e,autoplay:this.props.playing,muted:this.props.muted,loop:this.props.loop,playsinline:this.props.playsinline,controls:this.props.controls,...this.props.config.vimeo.playerOptions}),this.player.ready().then((()=>{const e=this.container.querySelector("iframe");e.style.width="100%",e.style.height="100%"})).catch(this.props.onError),this.player.on("loaded",(()=>{this.props.onReady(),this.refreshDuration()})),this.player.on("play",(()=>{this.props.onPlay(),this.refreshDuration()})),this.player.on("pause",this.props.onPause),this.player.on("seeked",(e=>this.props.onSeek(e.seconds))),this.player.on("ended",this.props.onEnded),this.player.on("error",this.props.onError),this.player.on("timeupdate",(({seconds:e})=>{this.currentTime=e})),this.player.on("progress",(({seconds:e})=>{this.secondsLoaded=e})))}),this.props.onError)}refreshDuration(){this.player.getDuration().then((e=>{this.duration=e}))}play(){const e=this.callPlayer("play");e&&e.catch(this.props.onError)}pause(){this.callPlayer("pause")}stop(){this.callPlayer("unload")}seekTo(e){this.callPlayer("setCurrentTime",e)}setVolume(e){this.callPlayer("setVolume",e)}setLoop(e){this.callPlayer("setLoop",e)}setPlaybackRate(e){this.callPlayer("setPlaybackRate",e)}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return this.secondsLoaded}render(){const{display:e}=this.props,t={width:"100%",height:"100%",overflow:"hidden",display:e};return i.createElement("div",{key:this.props.url,ref:this.ref,style:t})}}ae.displayName="Vimeo",ae.forceLoad=!0,ae.canPlay=e=>!ne.test(e)&&oe.test(e);const le=/(?:wistia\.com|wi\.st)\/(?:medias|embed)\/(.*)$/;class he extends i.Component{constructor(){super(...arguments),this.callPlayer=C,this.onPlay=(...e)=>this.props.onPlay(...e),this.onPause=(...e)=>this.props.onPause(...e),this.onSeek=(...e)=>this.props.onSeek(...e),this.onEnded=(...e)=>this.props.onEnded(...e),this.mute=()=>{this.callPlayer("mute")},this.unmute=()=>{this.callPlayer("unmute")}}getID(e){return e&&e.match(le)[1]}load(e){const{playing:t,muted:s,controls:i,onReady:r,config:o,onError:n}=this.props;R("https://fast.wistia.com/assets/external/E-v1.js","Wistia").then((()=>{window._wq=window._wq||[],window._wq.push({id:this.getID(e),options:{autoPlay:t,silentAutoPlay:"allow",muted:s,controlsVisibleOnLoad:i,...o.wistia.options},onReady:e=>{this.player=e,this.unbind(),this.player.bind("play",this.onPlay),this.player.bind("pause",this.onPause),this.player.bind("seek",this.onSeek),this.player.bind("end",this.onEnded),r()}})}),n)}unbind(){this.player.unbind("play",this.onPlay),this.player.unbind("pause",this.onPause),this.player.unbind("seek",this.onSeek),this.player.unbind("end",this.onEnded)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){this.unbind(),this.callPlayer("remove")}seekTo(e){this.callPlayer("time",e)}setVolume(e){this.callPlayer("volume",e)}setPlaybackRate(e){this.callPlayer("playbackRate",e)}getDuration(){return this.callPlayer("duration")}getCurrentTime(){return this.callPlayer("time")}getSecondsLoaded(){return null}render(){const e=this.getID(this.props.url),t=`wistia_embed wistia_async_${e}`;return i.createElement("div",{key:e,className:t,style:{width:"100%",height:"100%"}})}}he.displayName="Wistia",he.canPlay=e=>le.test(e),he.loopOnEnded=!0;const pe=/(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|shorts\/|watch\?.+&v=))((\w|-){11})|youtube\.com\/playlist\?list=/,de=/list=([a-zA-Z0-9_-]+)/;function ue(e){if(de.test(e)){const[,t]=e.match(de);return{listType:"playlist",list:t}}return{}}class ce extends i.Component{constructor(){super(...arguments),this.callPlayer=C,this.onStateChange=({data:e})=>{const{onPlay:t,onPause:s,onBuffer:i,onBufferEnd:r,onEnded:o,onReady:n,loop:a}=this.props,{PLAYING:l,PAUSED:h,BUFFERING:p,ENDED:d,CUED:u}=window.YT.PlayerState;if(e===l&&(t(),r()),e===h&&s(),e===p&&i(),e===d){const e=!!this.callPlayer("getPlaylist");a&&!e&&this.play(),o()}e===u&&n()},this.mute=()=>{this.callPlayer("mute")},this.unmute=()=>{this.callPlayer("unMute")},this.ref=e=>{this.container=e}}load(e,t){const{playing:s,muted:i,playsinline:r,controls:o,loop:n,config:a,onError:l}=this.props,{playerVars:h,embedOptions:p}=a.youtube,d=e&&e.match(pe)[1];if(t)return de.test(e)?void this.player.loadPlaylist(ue(e)):void this.player.cueVideoById?.({videoId:d,startSeconds:L(e)||h.start,endSeconds:I(e)||h.end});R("https://www.youtube.com/iframe_api","YT","onYouTubeIframeAPIReady",(e=>e.loaded)).then((t=>{this.container&&(this.player=new t.Player(this.container,{width:"100%",height:"100%",videoId:d,playerVars:{autoplay:s?1:0,mute:i?1:0,controls:o?1:0,start:L(e),end:I(e),origin:window.location.origin,playsinline:r,...ue(e),...h},events:{onReady:()=>{n&&this.player.setLoop(!0),this.props.onReady()},onStateChange:this.onStateChange,onError:e=>l(e.data)},...p}))}),l)}play(){this.callPlayer("playVideo")}pause(){this.callPlayer("pauseVideo")}stop(){document.body.contains(this.callPlayer("getIframe"))&&this.callPlayer("stopVideo")}seekTo(e){this.callPlayer("seekTo",e),this.props.playing||this.pause()}setVolume(e){this.callPlayer("setVolume",100*e)}setPlaybackRate(e){this.callPlayer("setPlaybackRate",e)}setLoop(e){this.callPlayer("setLoop",e)}getDuration(){return this.callPlayer("getDuration")}getCurrentTime(){return this.callPlayer("getCurrentTime")}getSecondsLoaded(){return this.callPlayer("getVideoLoadedFraction")*this.getDuration()}render(){const{display:e}=this.props,t={width:"100%",height:"100%",display:e};return i.createElement("div",{style:t},i.createElement("div",{ref:this.ref,loading:"lazy"}))}}ce.displayName="YouTube",ce.canPlay=e=>pe.test(e);const ye=[ce,Q,ae,K,te,he,re,W,Z,H],me=[{Player:ce,configKey:"youtube",url:"https://www.youtube.com/watch?v=GlCmAC4MHek"},{Player:Q,configKey:"soundcloud",url:"https://soundcloud.com/seucheu/john-cage-433-8-bit-version"},{Player:ae,configKey:"vimeo",url:"https://vimeo.com/300970506"},{Player:W,configKey:"dailymotion",url:"http://www.dailymotion.com/video/xqdpyk"}];const fe="64px";class Pe extends i.Component{constructor(e){super(e),this.mounted=!1,this.state={image:"string"==typeof e.light?e.light:null}}componentDidMount(){this.mounted=!0,this.fetchImage(this.props)}componentDidUpdate(e){const{url:t,light:s}=this.props;e.url===t&&e.light===s||this.fetchImage(this.props)}componentWillUnmount(){this.mounted=!1}fetchImage({url:e,light:t}){if("string"!=typeof t)return this.setState({image:null}),window.fetch(`https://noembed.com/embed?url=${e}`).then((e=>e.json())).then((e=>{if(e.thumbnail_url&&this.mounted){const t=e.thumbnail_url.replace("height=100","height=480");this.setState({image:t})}}));this.setState({image:t})}render(){const{onClick:e,playIcon:t,previewTabIndex:s,previewAriaLabel:r}=this.props,{image:o}=this.state,n={display:"flex",alignItems:"center",justifyContent:"center"},a={preview:{width:"100%",height:"100%",backgroundImage:o?`url(${o.startsWith("data:")?`"${o}"`:o})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",border:"none",padding:0,...n},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:fe,width:fe,height:fe,...n},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},l=i.createElement("div",{style:a.shadow,className:"react-player__shadow"},i.createElement("div",{style:a.playIcon,className:"react-player__play-icon"}));return i.createElement("button",{type:"button",style:a.preview,className:"react-player__preview",onClick:e,tabIndex:s,...r?{"aria-label":r}:{}},t||l)}}const ge=Object.keys(y);let be=[];class we extends i.Component{constructor(e){super(e),this.handleClickPreview=()=>{this.setState({showPreview:!1})},this.showPreview=()=>{this.setState({showPreview:!0})},this.getDuration=()=>this.player?this.player.getDuration():null,this.getCurrentTime=()=>this.player?this.player.getCurrentTime():null,this.getSecondsLoaded=()=>this.player?this.player.getSecondsLoaded():null,this.getInternalPlayer=(e="player")=>this.player?this.player.getInternalPlayer(e):null,this.seekTo=(e,t)=>{if(!this.player)return null;this.player.seekTo(e,t)},this.handleReady=()=>{this.props.onReady?.()},this.wrapperRef=e=>{this.wrapper=e},this.activePlayerRef=e=>{this.player=e},this.config=D(e,m,!0),this.state={showPreview:!!e.light}}componentDidMount(){if(this.props.progressFrequency){const e="ReactPlayer: %cprogressFrequency%c is deprecated, please use %cprogressInterval%c instead";console.warn(e,"font-weight: bold","","font-weight: bold","")}}shouldComponentUpdate(e,t){return!V(this.props,e)||!V(this.state,t)}componentDidUpdate(e){const{light:t}=this.props;this.config=D(this.props,m),!e.light&&t&&this.setState({showPreview:!0}),e.light&&!t&&this.setState({showPreview:!1})}getActivePlayer(e){const t=[...be,...ye];for(const s of t)if(s.canPlay(e))return s;return H}renderActivePlayer(e,t){return e?i.createElement(O,{...this.props,key:t.displayName,ref:this.activePlayerRef,config:this.config,activePlayer:t,onReady:this.handleReady}):null}sortPlayers(e,t){return e&&t?e.key{be.push(e)},we.removeCustomPlayers=()=>{be=[]},we.displayName="ReactPlayer",we.propTypes=y,we.defaultProps=m,we.canPlay=e=>{const t=[...be,...ye];for(const s of t)if(s.canPlay(e))return!0;return!1},we.canEnablePIP=e=>{const t=[...be,...ye];for(const s of t)if(s.canEnablePIP&&s.canEnablePIP(e))return!0;return!1}}}]); //# sourceMappingURL=2286.chunk.min.js.map