window._cbv_strategies=window._cbv_strategies||[],window._cbv_strategies.push(HtmlVideoStrategy);var isDebug=/debug/.test(window.location.search);function getDomain(){return/chartbeatTest/.test(window.location.search)?"test.uol.com.br":"uol.com.br"}var _sf_async_config=window._sf_async_config=window._sf_async_config||{};function HtmlVideoStrategy(t){this.player_=t,this.ready_=!1,this.currentAdPosition_=void 0,this.videoPlayed_=!1,this.viewStartTime_=(new Date).getTime(),this.videoStartTime_=void 0,this.subscribeEvents_()}function loadChartbeat(){var t=document.createElement("script"),e=document.getElementsByTagName("script")[0];t.type="text/javascript",t.async=!0,t.src="//static.chartbeat.com/js/chartbeat_video.js",e.parentNode.insertBefore(t,e)}_sf_async_config.uid=61085,_sf_async_config.domain=getDomain(),_sf_async_config.flickerControl=!1,_sf_async_config.useCanonical=!0,_sf_async_config.sections="Total UOL Conteúdo,UOL - Home",_sf_async_config.authors="UOL",_sf_async_config.autoDetect=!1,HtmlVideoStrategy.ContentType={AD:"ad",CONTENT:"ct"},HtmlVideoStrategy.AdPosition={PREROLL:"a1",MIDROLL:"a2",POSTROLL:"a3",OVERLAY:"a4",SPECIAL:"a5"},HtmlVideoStrategy.VideoState={UNPLAYED:"s1",PLAYED:"s2",STOPPED:"s3",COMPLETED:"s4"},HtmlVideoStrategy.prototype.subscribeEvents_=function(){window.playerElement.readyState>2&&this.onPlaybackReady_(),window.playerElement.currentTime>0&&!window.playerElement.paused&&!window.playerElement.ended&&this.onVideoPlay_(),window.playerElement.addEventListener("canplay",this.bind_(this.onPlaybackReady_,this)),window.playerElement.addEventListener("playing",this.bind_(this.onVideoPlay_,this))},HtmlVideoStrategy.prototype.bind_=function(t,e){return function(){t.call(e)}},HtmlVideoStrategy.prototype.onPlaybackReady_=function(){this.ready_=!0},HtmlVideoStrategy.prototype.onVideoPlay_=function(){this.videoStartTime_=(new Date).getTime(),this.videoPlayed_=!0},HtmlVideoStrategy.prototype.isReady=function(){return this.ready_},HtmlVideoStrategy.prototype.getTitle=function(){return window.playerElement.attributes.title&&window.playerElement.attributes.title.value||""},HtmlVideoStrategy.prototype.getVideoPath=function(){return mediaID=window.playerHome.mediaId,mediaID},HtmlVideoStrategy.prototype.getContentType=function(){return window.playerHome&&playerHome.isPlayingAd()?HtmlVideoStrategy.ContentType.AD:HtmlVideoStrategy.ContentType.CONTENT},HtmlVideoStrategy.prototype.getAdPosition=function(){return""},HtmlVideoStrategy.prototype.getTotalDuration=function(){const t=window.playerElement.duration;return this.getTimeInSeconds_(t)},HtmlVideoStrategy.prototype.getState=function(){return this.videoPlayed_?!window.playerElement||window.playerElement.paused?HtmlVideoStrategy.VideoState.STOPPED:window.playerElement.ended?HtmlVideoStrategy.VideoState.COMPLETED:HtmlVideoStrategy.VideoState.PLAYED:HtmlVideoStrategy.VideoState.UNPLAYED},HtmlVideoStrategy.prototype.timeElapsed_=function(t){if(void 0===t)return 0;return(new Date).getTime()-t},HtmlVideoStrategy.prototype.onEmbedCodeChanged_=function(){this.currentAdPosition_=void 0,this.adStartTime_=void 0},HtmlVideoStrategy.prototype.getCurrentPlayTime=function(){const t=window.playerElement.currentTime;return this.getTimeInSeconds_(t)},HtmlVideoStrategy.prototype.getBitrate=function(){return-1},HtmlVideoStrategy.prototype.getThumbnailPath=function(){return window.playerElement.attributes.poster&&window.playerElement.attributes.poster.value||""},HtmlVideoStrategy.prototype.getPlayerType=function(){},HtmlVideoStrategy.prototype.getViewStartTime=function(){return isNaN(this.viewStartTime_)?0:this.timeElapsed_(this.viewStartTime_)},HtmlVideoStrategy.prototype.getViewPlayTime=function(){return this.videoPlayed_?this.timeElapsed_(this.viewStartTime_):-1},HtmlVideoStrategy.prototype.getViewAdPlayTime=function(){return-1},HtmlVideoStrategy.prototype.getTimeInSeconds_=function(t){return-1===t||isNaN(t)?-1:1e3*t},HtmlVideoStrategy.verify=function(){return window.playerHome.mediaId&&window.playerElement},loadChartbeat();