!function(){"use strict";var e,t={3170:function(e,t,n){var r,i,a,o=n(35466),l=n(46116);n(51394),n(45063),n(34083),n(36191),r="page-embed",i=n(645).EmbedPage,(a=document.getElementById(r))&&i&&l.render(o.createElement(i,null),a)},17714:function(e,t,n){n.d(t,{M:function(){return l}}),n(74517);var r=n(35466),i=n(3074),a=n.n(i);function o(){return(o=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);nshareShare';i+='',this.cornerLayers={topLeft:e,topRight:this.upNextLoaderView?this.upNextLoaderView.html():null,bottomLeft:this.recommendedMedia?this.recommendedMedia.html():null,bottomRight:this.props.inEmbed?i:null},this.setState({displayPlayer:!0},(function(){setTimeout((function(){var e=document.querySelector(".share-video-btn"),t=document.querySelector(".share-options-wrapper"),n=document.querySelector(".share-options-inner");e&&e.addEventListener("click",(function(e){(0,u.addClassname)(document.querySelector(".video-js.vjs-mediacms"),"vjs-visible-share-options")})),t&&t.addEventListener("click",(function(e){e.target!==n&&e.target!==t||(0,u.removeClassname)(document.querySelector(".video-js.vjs-mediacms"),"vjs-visible-share-options")}))}),1e3)}))}}},{key:"componentWillUnmount",value:function(){this.unsetRecommendedMedia()}},{key:"initRecommendedMedia",value:function(){null!==this.recommendedMedia&&(this.props.inEmbed||this.recommendedMedia.init(),this.playerInstance.player.on("fullscreenchange",this.recommendedMedia.onResize),s.PageStore.on("window_resize",this.recommendedMedia.onResize),s.VideoViewerStore.on("changed_viewer_mode",this.recommendedMedia.onResize))}},{key:"unsetRecommendedMedia",value:function(){null!==this.recommendedMedia&&(this.playerInstance.player.off("fullscreenchange",this.recommendedMedia.onResize),s.PageStore.removeListener("window_resize",this.recommendedMedia.onResize),s.VideoViewerStore.removeListener("changed_viewer_mode",this.recommendedMedia.onResize),this.recommendedMedia.destroy())}},{key:"onClickNext",value:function(){var e;s.MediaPageStore.get("playlist-id")?null===(e=s.MediaPageStore.get("playlist-next-media-url"))&&(e=this.props.data.related_media[0].url):this.props.inEmbed||(e=this.props.data.related_media[0].url),window.location.href=e}},{key:"onClickPrevious",value:function(){var e;s.MediaPageStore.get("playlist-id")?null===(e=s.MediaPageStore.get("playlist-previous-media-url"))&&(e=this.props.data.related_media[0].url):this.props.inEmbed||(e=this.props.data.related_media[0].url),window.location.href=e}},{key:"onStateUpdate",value:function(e){s.VideoViewerStore.get("in-theater-mode")!==e.theaterMode&&o.VideoViewerActions.set_viewer_mode(e.theaterMode),s.VideoViewerStore.get("player-volume")!==e.volume&&o.VideoViewerActions.set_player_volume(e.volume),s.VideoViewerStore.get("player-sound-muted")!==e.soundMuted&&o.VideoViewerActions.set_player_sound_muted(e.soundMuted),s.VideoViewerStore.get("video-quality")!==e.quality&&o.VideoViewerActions.set_video_quality(e.quality),s.VideoViewerStore.get("video-playback-speed")!==e.playbackSpeed&&o.VideoViewerActions.set_video_playback_speed(e.playbackSpeed)}},{key:"onPlayerInit",value:function(e,t){this.playerElem=t,this.playerInstance=e,this.upNextLoaderView&&(this.upNextLoaderView.setVideoJsPlayerElem(this.playerInstance.player.el_),this.onUpdateMediaAutoPlay()),this.props.inEmbed||this.playerElem.parentNode.focus(),null!==this.recommendedMedia&&(this.recommendedMedia.initWrappers(this.playerElem.parentNode),this.props.inEmbed&&(this.playerInstance.player.one("pause",this.recommendedMedia.init),this.initRecommendedMedia())),this.playerInstance.player.one("ended",this.onVideoEnd)}},{key:"onVideoRestart",value:function(){null!==this.recommendedMedia&&(this.recommendedMedia.updateDisplayType("inline"),this.props.inEmbed&&this.playerInstance.player.one("pause",this.recommendedMedia.init),this.playerInstance.player.one("ended",this.onVideoEnd))}},{key:"onVideoEnd",value:function(){if(null!==this.recommendedMedia&&(this.props.inEmbed||this.initRecommendedMedia(),this.recommendedMedia.updateDisplayType("full"),this.playerInstance.player.one("playing",this.onVideoRestart)),!this.props.inEmbed&&s.MediaPageStore.get("playlist-id")){var e=document.querySelector(".video-player .more-media"),t=document.querySelector(".video-player .vjs-actions-anim");this.upNextLoaderView.cancelTimer();var n=s.MediaPageStore.get("playlist-next-media-url");return n&&(e&&(e.style.display="none"),t&&(t.style.display="none"),window.location.href=n),void this.upNextLoaderView.hideTimerView()}this.upNextLoaderView&&(s.PageStore.get("media-auto-play")?(this.upNextLoaderView.startTimer(),this.playerInstance.player.one("play",function(){this.upNextLoaderView.cancelTimer()}.bind(this))):this.upNextLoaderView.cancelTimer())}},{key:"onUpdateMediaAutoPlay",value:function(){this.upNextLoaderView&&(s.PageStore.get("media-auto-play")?this.upNextLoaderView.showTimerView(this.playerInstance.isEnded()):this.upNextLoaderView.hideTimerView())}},{key:"render",value:function(){var e=this,t=null,n=null;!this.props.inEmbed&&s.MediaPageStore.get("playlist-id")?(t=s.MediaPageStore.get("playlist-next-media-url"),n=s.MediaPageStore.get("playlist-previous-media-url")):t=this.props.data.related_media.length&&!this.props.inEmbed?this.props.data.related_media[0].url:null;var i=this.props.data.sprites_url?{url:this.props.siteUrl+"/"+this.props.data.sprites_url.replace(/^\//g,""),frame:{width:160,height:90,seconds:10}}:null;return r.createElement("div",{key:(this.props.inEmbed?"embed-":"")+"player-container",className:"player-container"+(this.videoSources.length?"":" player-container-error"),style:this.props.containerStyles,ref:"playerContainer"},r.createElement("div",{className:"player-container-inner",ref:"playerContainerInner",style:this.props.containerStyles},this.state.displayPlayer&&null!==s.MediaPageStore.get("media-load-error-type")?r.createElement(p.hJ,{errorMessage:s.MediaPageStore.get("media-load-error-message")}):null,this.state.displayPlayer&&null==s.MediaPageStore.get("media-load-error-type")?r.createElement("div",{className:"video-player",ref:"videoPlayerWrapper",key:"videoPlayerWrapper"},r.createElement(l.SiteConsumer,null,(function(a){return r.createElement(p.Y7,{playerVolume:e.browserCache.get("player-volume"),playerSoundMuted:e.browserCache.get("player-sound-muted"),videoQuality:e.browserCache.get("video-quality"),videoPlaybackSpeed:parseInt(e.browserCache.get("video-playback-speed"),10),inTheaterMode:e.browserCache.get("in-theater-mode"),siteId:a.id,siteUrl:a.url,info:e.videoInfo,cornerLayers:e.cornerLayers,sources:e.videoSources,poster:e.videoPoster,previewSprite:i,subtitlesInfo:e.props.data.subtitles_info,enableAutoplay:!e.props.inEmbed,inEmbed:e.props.inEmbed,hasTheaterMode:!e.props.inEmbed,hasNextLink:!!t,hasPreviousLink:!!n,errorMessage:s.MediaPageStore.get("media-load-error-message"),onClickNextCallback:e.onClickNext,onClickPreviousCallback:e.onClickPrevious,onStateUpdateCallback:e.onStateUpdate,onPlayerInitCallback:e.onPlayerInit})}))):null))}}])&&h(t.prototype,n),w}(r.PureComponent);function S(e){for(var t=null,n=[],r=location.search.substr(1).split("&"),i=0;i=0&&n.currentTime(S("time")),1==S("autoplay")&&n.play(),void t.disconnect()})).observe(document,{childList:!0,subtree:!0})},56006:function(e,t,n){n(35466),n(98578),n(62546),n(80473),n(56394),n(64669),n(13233),n(62322),n(79006),n(52004),n(28407),n(38288),n(55677),n(92129),n(24655),n(20288),n(54458),n(23675),n(43613),n(20541),n(84234),n(59808)},22947:function(e,t,n){n(52004),n(28407),n(56394),n(38288),n(55677),n(92129),n(24655),n(20288),n(54458),n(23675),n(35466),n(62546),n(98578),n(62322),n(93296),n(92070),n(59808),n(55090),n(50137),n(43613),n(84234),n(80473),n(43899)},36191:function(e,t,n){n(56006),n(29198),n(22947),n(41542)},88727:function(e,t,n){n.d(t,{hJ:function(){return d},Y7:function(){return c}}),n(62322),n(93296),n(56394),n(64669),n(30717),n(55677),n(92129),n(24655),n(76453),n(79006);var r=n(35466),i=n(3074),a=n.n(i),o=n(50137),l=n.n(o),s=n(18009),u=n.n(s);function d(e){return r.createElement("div",{className:"error-container"},r.createElement("div",{className:"error-container-inner"},r.createElement("span",{className:"icon-wrap"},r.createElement("i",{className:"material-icons"},"error_outline")),r.createElement("span",{className:"msg-wrap"},e.errorMessage)))}function c(e){var t=(0,r.useRef)(null),n=null,i={playerVolume:e.playerVolume,playerSoundMuted:e.playerSoundMuted,videoQuality:e.videoQuality,videoPlaybackSpeed:e.videoPlaybackSpeed,inTheaterMode:e.inTheaterMode};function a(){void 0!==e.onClickNextCallback&&e.onClickNextCallback()}function o(){void 0!==e.onClickPreviousCallback&&e.onClickPreviousCallback()}function s(t){i.playerVolume!==t.volume&&(i.playerVolume=t.volume),i.playerSoundMuted!==t.soundMuted&&(i.playerSoundMuted=t.soundMuted),i.videoQuality!==t.quality&&(i.videoQuality=t.quality),i.videoPlaybackSpeed!==t.playbackSpeed&&(i.videoPlaybackSpeed=t.playbackSpeed),i.inTheaterMode!==t.theaterMode&&(i.inTheaterMode=t.theaterMode),void 0!==e.onStateUpdateCallback&&e.onStateUpdateCallback(t)}function d(){if(null===n&&null===e.errorMessage&&(e.inEmbed||(window.removeEventListener("focus",d),document.removeEventListener("visibilitychange",d)),t.current)){e.inEmbed||t.current.focus();var r,c,p,m={on:!1};if(void 0!==e.subtitlesInfo&&null!==e.subtitlesInfo&&e.subtitlesInfo.length){m.languages=[];for(var f=0;fe.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=a)&&Object.keys(r.O).every((function(e){return r.O[e](n[s])}))?n.splice(s--,1):(l=!1,a0&&e[u-1][2]>a;u--)e[u]=e[u-1];e[u]=[n,i,a]},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.j=991,function(){var e={991:0};r.O.j=function(t){return 0===e[t]};var t=function(t,n){var i,a,o=n[0],l=n[1],s=n[2],u=0;for(i in l)r.o(l,i)&&(r.m[i]=l[i]);if(s)var d=s(r);for(t&&t(n);u