1!function(e,i,t,o){var l={video:void 0,imageId:void 0,imageUrl:void 0,smartToken:void 0,hasAdvertising:!0,pub:void 0,sharingLink:"",embedPlatform:void 0,playerPlatform:"WEB",shouldSendEvents:!0,pageContentType:"",project:"",playOnViewable:!1,videoRedirect:!0,relatedRSS:"",file:"",image:"",title:"",description:"",mute:!1,autostart:!1,nextupoffset:"85%",repeat:!1,abouttext:"",aboutlink:"",playbackRateControls:!1,playbackRates:[.25,.75,1,1.25],controls:!0,localization:{},aspectratio:"16:9",height:360,width:"100%",displaytitle:!1,displaydescription:!1,stretching:"uniform",nextUpDisplay:!0,qualityLabels:{1000:"High",500:"Medium",300:"Low",64:"Audio"},preload:"auto",flashplayer:"//ssl.p.jwpcdn.com/player/v/8.3.0/jwplayer.flash.swf",hlsjsdefault:!0,skin:{controlbar:{text:"#F2F2F2",icons:"rgba(255,255,255,0.8)",iconsActive:"#FFFFFF",background:"rgba(54, 55, 56, 0.5)"},timeslider:{rail:"rgba(0,0,0,0.6)",progress:"#4f13c6"},menus:{text:"rgba(255, 255, 255, 0.8)",textActive:"#FFFFFF",background:"rgba(54, 55, 56, 0.7)"},tooltips:{text:"#000000",background:"rgba(199, 194, 194, 0.94)"},playlist:{background:"#222222",text:"#F2F2F2",playing:"#E8E8E8",playingShadow:"#252525",duration:"#E8E8E8",durationBackground:"rgba(0,0,0,.6)",durationShadow:"#252525",scroll:"#7DB5E9"}},logo:{file:"",hide:!0,link:"",margin:"10",position:"top-right"},sharing:{sites:["facebook","twitter","googleplus","email","interest","linkedin"]},ga:{},intl:{pt:{nextUp:"A seguir"}},onReady:function(){},onPlay:function(){},onFirstPlay:function(){},onPause:function(){},onIdle:function(){},onComplete:function(){},onError:function(e){},onSeek:function(e){},onTime:function(e){},onPlaylistComplete:function(e){},onPlaylistItem:function(e){},onAdPlay:function(e){},onAdImpression:function(e){},onAdComplete:function(e){},onAdPause:function(e){},onVisualQuality:function(e){},onViewable:function(e){},onTime:function(e){}};e.fn.iolplayer=function(t){if("string"==typeof t){var o,l=arguments;return this.each(function(){var i=e.data(this,"iolplayer");i instanceof a&&"function"==typeof i[t]&&(o=i[t].apply(i,Array.prototype.slice.call(l,1)))}),void 0!==o?o:this}var r=function(e){if(!e.video||0==e.video.length)return"No sources available";e.autostart&&(e.mute=!0);return}(t);if("object"!=typeof t||r)t||(console.log("JW: Player Options are empty."),e(this).data("iolplayer-error","JW: Player Options are empty.")),e(this).data("iolplayer-error","JW: "+r);else{var n=i.navigator.userAgent,s=!!n.match(/iPad/i)||!!n.match(/iPhone/i),p=!!n.match(/WebKit/i);if(s&&p&&!n.match(/CriOS/i)){var y=this;i.setTimeout(function(){e(y).data("iolplayer",new a(y,t))},1e3)}else e(this).data("iolplayer",new a(this,t))}};var a=function(t,o){if(this.iolJWPlayer={},e("head").append('<link rel="stylesheet" type="text/css" href="https://cdn.iol.pt/js/utils/JW8/assets/style/iol.player.min.css?v2.4.1">'),this.iolJWPlayer.playerElement=e(t),this.iolJWPlayer.options=e.extend(!0,{},l,o),this.iolJWPlayer.options.imageId&&!this.iolJWPlayer.options.imageUrl){var a=i.innerWidth>=1024?1300:2*i.innerWidth;this.iolJWPlayer.options.imageWidth=Number.isInteger(this.iolJWPlayer.options.width)?this.iolJWPlayer.options.width:a,this.iolJWPlayer.options.imageUrl="https://www.iol.pt/multimedia/oratvi/multimedia/imagem/id/"+this.iolJWPlayer.options.imageId+"/"+this.iolJWPlayer.options.imageWidth}if(["nit","embed","beachcam"].includes(this.iolJWPlayer.options.project.toLowerCase()))this.initIOLPlayer();else{var r=this.getUser(),n=this;this.canAccessToMultimedia(function(){n.validateCookie(r)})}};a.prototype={validateCookie:function(i){var t=e.cookie("jwiol");t&&(e.cookie("jwiol_i")!==i.i&&(t=""));if(t)this.iolJWPlayer.playerTK=`?wmsAuthSign=${t}`,this.initIOLPlayer();else{var o=this,l=(this.iolJWPlayer.options.project.toLowerCase(),`https://services.iol.pt/matrix?userId=${o.iolJWPlayer.user.uname}`);e.ajax({url:l,async:!1,contentType:"text/plain",success:function(t){o.iolJWPlayer.playerTK=`?wmsAuthSign=${t}`;var l=new Date,a=new Date;a.setTime(a.getTime()+72e6),e.cookie("jwiol",t,{expires:a,domain:"iol.pt",path:"/"}),e.cookie("jwiol_i",i.i,{expires:a,domain:"iol.pt",path:"/"}),e.cookie("jwiol_c",l,{expires:a,domain:"iol.pt",path:"/"}),o.initIOLPlayer()},error:function(e){}})}},canAccessToMultimedia:function(i){if("onlive"!==this.iolJWPlayer.options.video[0].liveType.toLowerCase()){this.iolJWPlayer.user||this.getUser();var t="vod"===this.iolJWPlayer.options.video[0].liveType.toLowerCase()?"vod":"live",o=this.iolJWPlayer.options.user?this.iolJWPlayer.options.user:this.iolJWPlayer.user.uid,l=this;e.ajax({url:`https://services.iol.pt/direitos/rights/${t}?id=${this.iolJWPlayer.options.video[0].id}&host=${this.iolJWPlayer.options.project}`,type:"GET",dataType:"json",headers:{userid:o},error:function(e,t,o){var a=e.responseJSON;if(a&&a.code){var r="Lamentamos mas ocorreu um erro.",n="https://cdn.iol.pt/js/utils/JW8/assets/img/error_smile.jpg",s="(000)";switch(a.code){case"100":r="Lamentamos mas não existem direitos de transmissão via internet no país onde se encontra.",n="https://cdn.iol.pt/js/utils/JW8/assets/img/geoblock.jpg",s="(geoblock-100)";break;case"101":r="Lamentamos mas não existem direitos de transmissão via internet para este programa",n="https://cdn.iol.pt/js/utils/JW8/assets/img/geoblock.jpg",s="(geoblock-101)";break;case"200":r='Subscreva o TVI Player Internacional para poder ver este conteúdo. \n Clique <a href="https://tviplayer.iol.pt/subscricao">aqui</a> para conhecer todas as vantagens. \n Se já tem uma subscrição, por favor, clique <a href="#/iol/login">aqui</a> para efetuar login.',n="https://cdn.iol.pt/js/utils/JW8/assets/img/error.jpg",s="(prd-200)";break;case"201":r='Subscreva o TVI Player Internacional para poder ver este conteúdo.\n Clique <a href="https://tviplayer.iol.pt/subscricao">aqui</a> para conhecer todas as vantagens.',n="https://cdn.iol.pt/js/utils/JW8/assets/img/error.jpg",s="(prd-201)";break;case"300":r="Lamentamos mas o vídeo não está disponível.",n="https://cdn.iol.pt/js/utils/JW8/assets/img/error_smile.jpg",s="(block-300)"}var p=`<div id="iolplayer-blocked" style="background: url('${n}') center/cover;">\n <div class="iolplayer-blocked-text">\n ${r} <small style="font-size: 10px;">${s}</small>\n </div>\n </div>`;l.iolJWPlayer.playerElement.html(p)}else i()},success:function(e){i()}})}else i()},initIOLPlayer:function(){if(!this.iolJWPlayer.options.video)return!1;this.iolJWPlayer.isPlaylist=this.iolJWPlayer.options.video.length>1,this.iolJWPlayer.playerDivId="iolplayer_"+Date.now(),this.iolJWPlayer.playlistDivId="iolplaylist_"+Date.now(),this.iolJWPlayer.playerElement.html(`<div id='${this.iolJWPlayer.playerDivId}' class='iolplayer_instance'></div><div id='${this.iolJWPlayer.playlistDivId}' class='iolplaylist-wrapper' style='display:none;'></div>`),this.iolJWPlayer.playlistElement=e(`#${this.iolJWPlayer.playlistDivId}`),this.showIOLPlayer(this.iolJWPlayer.playerDivId,this.iolJWPlayer.options.showPreroll)},showIOLPlayer:function(){var e=this.getRelated();e&&(this.iolJWPlayer.options.related=e);var i=this.getPlaylist();i&&(this.iolJWPlayer.options.playlist=i),this.iolJWPlayer.firstPlay=!0,this.iolJWPlayer.adPlaying=!1,this.iolJWPlayer.tvAdPlaying=!1,this.iolJWPlayer.liveMidNum=0,this.iolJWPlayer.isStoppable=this.isAStoppableVideo(),this.iolJWPlayer.consentString="",this.iolJWPlayer.playerInstance=jwplayer(this.iolJWPlayer.playerDivId),t.location.host.includes("localhost")||t.location.host.includes("dev.")||t.location.host.includes("stage.")?(console.info("IOLPlayer: DEV MODE"),this.obtainAdvertisingAndSetup()):this.waitForQuantcast()},waitForQuantcast(){i.__tcfapi?i.__tcfapi("addEventListener",2,(e,t)=>{t&&e.tcString&&(this.iolJWPlayer.consentString=e.tcString,this.obtainAdvertisingAndSetup(),i.__tcfapi("removeEventListener",2,e=>
1{e&&console.info("IOLPlayer: Quantcast listener removed")},e.listenerId))}):(console.error("IOLPlayer: Quantcast not loaded"),this.obtainAdvertisingAndSetup())},obtainAdvertisingAndSetup:function(){this.iolJWPlayer.options.advertising=this.getAdvertising(),"DIRETO"===this.iolJWPlayer.options.video[0].liveType&&"beachcam"!==this.iolJWPlayer.options.project.toLowerCase()&&this.loadLiveAdvertising(this.iolJWPlayer.options.video[0].channel),this.iolJWPlayer.playerInstance.setup(this.iolJWPlayer.options),this.setIOLPlayerEvents()},isAStoppableVideo:function(){for(var e=0;e<this.iolJWPlayer.options.video.length;e++)if(/beachcam/.test(this.iolJWPlayer.options.video[e].videoUrl))return this.iolJWPlayer.options.preload="metadata",{name:"beachcam",time:3e5}},getRelated:function(){var e={};if("tvi"!==this.iolJWPlayer.options.project&&"nit"!==this.iolJWPlayer.options.project||this.iolJWPlayer.options.relatedRSS)return this.iolJWPlayer.options.relatedRSS?(e.file=this.iolJWPlayer.options.relatedRSS,e.onclick="link",e.oncomplete="none",e):"VIDEO"===this.iolJWPlayer.options.pageContentType&&this.iolJWPlayer.options.project?(e.file=`https://front-api.iol.pt/api/v1/recomended?project=${this.iolJWPlayer.options.project.toLowerCase()}&mid=${this.iolJWPlayer.options.video[0].id}`,e.onclick="link",e.oncomplete=this.iolJWPlayer.options.videoRedirect?"none":"show",e):"ARTICLE"===this.iolJWPlayer.options.pageContentType&&!this.iolJWPlayer.isPlaylist&&this.iolJWPlayer.options.project?(e.file=`https://front-api.iol.pt/api/v1/recomended?project=${this.iolJWPlayer.options.project.toLowerCase()}&mid=${this.iolJWPlayer.options.video[0].id}`,e.onclick="link",e.oncomplete="show",this.iolJWPlayer.options.nextUpDisplay=!1,e):void 0},getPlaylist:function(){var e={};if(!this.iolJWPlayer.isPlaylist)return this.iolJWPlayer.options.file=this.iolJWPlayer.options.video[0].videoUrl+(["nit","embed","beachcam"].includes(this.iolJWPlayer.options.project.toLowerCase())?"":this.iolJWPlayer.playerTK),void(this.iolJWPlayer.options.image=this.iolJWPlayer.options.imageUrl?this.iolJWPlayer.options.imageUrl:this.iolJWPlayer.options.video[0].cover);e.playlist=[];for(var i=0;i<this.iolJWPlayer.options.video.length;i++)e.playlist.push({description:decodeURI(this.iolJWPlayer.options.video[i].description),tags:this.iolJWPlayer.options.video[i].tags,image:this.iolJWPlayer.options.video[i].cover,title:decodeURI(this.iolJWPlayer.options.video[i].title),sources:[{file:this.iolJWPlayer.options.video[i].videoUrl+("nit"===["nit","embed","beachcam"].includes(this.iolJWPlayer.options.project.toLowerCase())?"":this.iolJWPlayer.playerTK)}],duration:this.iolJWPlayer.options.video[i].duration});return e},getAdvertising:function(){var e=new Object,t=this.iolJWPlayer.playerInstance&&this.iolJWPlayer.playerInstance.getPlaylistIndex()?this.iolJWPlayer.playerInstance.getPlaylistIndex():0;if(this.iolJWPlayer.options.pub){var o=i.encodeURIComponent(i.location.href),l="720x576",a=this.iolJWPlayer.consentString?`&gdpr=1&gdpr_consent=${this.iolJWPlayer.consentString}`:"",r=`https://pubads.g.doubleclick.net/gampad/ads?sz=${l}&iu=/${this.iolJWPlayer.options.pub}&ciu_szs&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&url=${o}&description_url=${o}&vpos=preroll${a}&correlator=${Math.floor(1e5*Math.random())+1}&ad_rule=0`,n=`https://pubads.g.doubleclick.net/gampad/ads?sz=${l}&iu=${this.iolJWPlayer.options.pub}&ciu_szs&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&url=${o}${a}&vpos=midroll`,s=`https://pubads.g.doubleclick.net/gampad/ads?sz=${l}&iu=${this.iolJWPlayer.options.pub}&ciu_szs&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&url=${o}&vpos=postroll${a}&correlator=${Math.floor(1e5*Math.random())+1}`;e.client="googima",e.admessage="Esta publicidade termina em xx segundos.",e.vpaidcontrols=!0,e.schedule={preroll:{offset:"pre",tag:r}},this.iolJWPlayer.isPlaylist||"embed"===this.iolJWPlayer.options.project.toLowerCase()||(e.schedule.postroll={offset:"post",tag:s});var p=this.iolJWPlayer.options.video[t].duration;return p>600&&p<=1200?e.schedule.midroll_1={offset:p/2,tag:`${n}&mridx=1&correlator=${Math.floor(1e5*Math.random())+1}`}:p>1200&&p<=1800?(e.schedule.midroll_1={offset:p/3,tag:`${n}&mridx=1&correlator=${Math.floor(1e5*Math.random())+1}`},e.schedule.midroll_2={offset:p/3*2,tag:`${n}&mridx=2&correlator=${Math.floor(1e5*Math.random())+1}`}):p>1800&&(e.schedule.midroll_1={offset:p/4,tag:`${n}&mridx=1&correlator=${Math.floor(1e5*Math.random())+1}`},e.schedule.midroll_2={offset:p/4*2,tag:`${n}&mridx=2&correlator=${Math.floor(1e5*Math.random())+1}`},e.schedule.midroll_3={offset:p/4*3,tag:`${n}&mridx=3&correlator=${Math.floor(1e5*Math.random())+1}`}),e.companiondiv={id:"MPU1",width:300,height:250},e}},loadLiveAdvertising:function(e){if(this.iolJWPlayer.options.pub&&this.iolJWPlayer.consentString){var i=atmosphere,t=new atmosphere.AtmosphereRequest;t.url="https://newrt.iol.pt/pubsub/pubcontrol",t.connectTimeout=5e3,t.reconnectInterval=5e3,t.timeout=6e5,t.trackMessageLength=!0,t.enableXDR=!0,t.shared=!0,t.maxReconnectOnClose=20,t.transport="websocket",t.fallbackTransport="long-polling";var o=this;t.onMessage=function(i){var t=i.responseBody;t=JSON.parse(t),console.log(t),200===i.status&&t.canal===e&&("PUB"!==t.estado||o.iolJWPlayer.adPlaying||(o.iolJWPlayer.adPlaying=!0,o.iolJWPlayer.tvAdPlaying?o.iolJWPlayer.playerInstance.playAd(o.getLiveMidR
1oll()):setTimeout(()=>{o.iolJWPlayer.tvAdPlaying&&o.iolJWPlayer.playerInstance.playAd(o.getLiveMidRoll())},35e3),o.iolJWPlayer.tvAdPlaying=!0),"PRG"===t.estado&&(o.iolJWPlayer.tvAdPlaying=!1))},i.subscribe(t)}},getLiveMidRoll(){var e=i.encodeURIComponent(i.location.href),t=this.iolJWPlayer.consentString?`&gdpr=1&gdpr_consent=${this.iolJWPlayer.consentString}`:"",o=`https://pubads.g.doubleclick.net/gampad/ads?sz=720x576&iu=${this.iolJWPlayer.options.pub}&ciu_szs&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&description_url=${e}&url=${e}${t}&vpos=midroll`,l=Math.floor(1e5*Math.random())+1;return`${o}&liveMid=true&mridx=${this.iolJWPlayer.liveMidNum++}&correlator=${l}`},setIOLPlayerEvents:function(){var t=this;this.iolJWPlayer.playerInstance.on("relatedReady",function(e){t.iolJWPlayer.relatedPlugin=jwplayer().getPlugin("related"),t.iolJWPlayer.relatedPlugin.on("play",function(e){var t=`recomendados jw ${e.auto?"auto":"click"}`;try{IOLAnalytics.setInternalOrigin(t,!0)}catch(e){i.iol_analytics?i.iol_analytics.setInternalOrigin(t,!0):console.log("analytics module not loaded")}})}),this.iolJWPlayer.playerInstance.on("ready",function(o){e(".jw-nextup").on("click",function(){try{IOLAn
1alytics.setInternalOrigin("playlist overlay",!1)}catch(e){i.iol_analytics?i.iol_analytics.setInternalOrigin("playlist overlay",!1):console.log("analytics module not loaded")}}),t.iolJWPlayer.options.onReady.call(this,o)}),this.iolJWPlayer.playerInstance.on("setupError",function(e){}),this.iolJWPlayer.playerInstance.on("adRequest",function(e){t.iolJWPlayer.adPlaying=!0}),this.iolJWPlayer.playerInstance.on("adPlay",function(e){t.iolJWPlayer.options.onAdPlay.call(this,e)}),this.iolJWPlayer.playerInstance.on("adImpression",function(e){t.sendGAEvent("JW Player Ad Impression","Impression",e.adposition),t.iolJWPlayer.options.onAdImpression.call(this,e)}),this.iolJWPlayer.playerInstance.on("adPause",function(e){t.iolJWPlayer.options.onAdPause.call(this,e)}),this.iolJWPlayer.playerInstance.on("adComplete",function(e){t.iolJWPlayer.adPlaying=!1,t.sendGAEvent("JW Player Ad Complete","Complete",e.adposition),e.tag.includes("liveMid=true")&&t.iolJWPlayer.tvAdPlaying&&t.iolJWPlayer.consentString&&t.iolJWPlayer.tvAdPlaying&&t.iolJWPlayer.playerInstance.playAd(t.getLiveMidRoll()),t.iolJWPlayer.options.onAdComplete.call(this,e)}),this.iolJWPlayer.playerInstance.on("adClick",function(e){t.sendGAEvent("JW Player Ad Click","Click",e.adposition),t.iolJWPlayer.options.onAdClick.call(this,e)}),this.iolJWPlayer.playerInstance.on("adError",function(e){t.iolJWPlayer.adPlaying=!1,t.sendGAEvent("JW Player Ad Error",e.message,e.adposition),t.iolJWPlayer.options.onAdComplete.call(this,e)}),this.iolJWPlayer.playerInstance.on("buffer",function(e){}),this.iolJWPlayer.playerInstance.on("play",function(e){var o=t.iolJWPlayer.playerInstance?t.iolJWPlayer.playerInstance.getPlaylistIndex():0,l=t.iolJWPlayer.options.embedPlatform?t.iolJWPlayer.options.embedPlatform:"Video";if(t.iolJWPlayer.firstPlay&&["INCONTENT VIDEO","Video"].includes(l)){if(t.iolJWPlayer.isPlaylist&&("related-interaction"===e.playReason||"playlist"===e.playReason)){var a="interaction"===e.playReason?"overlay":"related-interaction"===e.playReason?"related":"auto";try{IOLAnalytics.setInternalOrigin(`playlist ${a}`,!1)}catch(e){i.iol_analytics?i.iol_analytics.setInternalOrigin(`playlist ${a}`,!1):console.log("analytics module not loaded")}}if(t.sendGAEvent("JW Player Video Plays","Play",l),t.sendGAEvent("Play Programa","Play",l),t.iolJWPlayer.options.smartToken){var r="https://mais-vistos-producer.iol.pt/mais-vistos-producer?token="+(Array.isArray(t.iolJWPlayer.options.smartToken)?t.iolJWPlayer.options.smartToken[o]:t.iolJWPlayer.options.smartToken);t.iolJWPlayer.playerElement.append("<img class='smarttop' style='display:none;' src='"+r+"' height='1' width='1'/>")}t.iolJWPlayer.firstPlay=!1,t.iolJWPlayer.options.onFirstPlay.call(this,e)}t.iolJWPlayer.isStoppable&&setTimeout(function(){t.iolJWPlayer.playerInstance.stop()},t.iolJWPlayer.isStoppable.time),t.iolJWPlayer.options.onPlay.call(this,e)}),this.iolJWPlayer.playerInstance.on("pause",function(e){t.iolJWPlayer.options.onPause.call(this,e)}),this.iolJWPlayer.playerInstance.on("idle",function(e){t.iolJWPlayer.options.onIdle.call(this,e)}),this.iolJWPlayer.playerInstance.on("seek",function(e){t.iolJWPlayer.options.onSeek.call(this,e)}),this.iolJWPlayer.playerInstance.on("playAttemptFailed",function(e){}),this.iolJWPlayer.playerInstance.on("time",function(e){t.iolJWPlayer.options.onTime.call(this,e)}),this.iolJWPlayer.playerInstance.on("complete",function(e){t.iolJWPlayer.playerInstance&&t.iolJWPlayer.playerInstance.getPlaylistIndex();var i=t.iolJWPlayer.options.embedPlatform?t.iolJWPlayer.options.embedPlatform:"Video";["INCONTENT VIDEO","Video"].includes(i)&&t.sendGAEvent("JW Player Video Completes","Complete",i),t.iolJWPlayer.options.onComplete.call(this,e)}),this.iolJWPlayer.playerInstance.on("error",function(e){t.iolJWPlayer.playerInstance&&t.iolJWPlayer.playerInstance.getPlaylistIndex();var i=t.iolJWPlayer.options.embedPlatform?t.iolJWPlayer.options.embedPlatform:"Video";["INCONTENT VIDEO","Video"].includes(i)&&t.sendGAEvent("JW Player Video Error",e.message,i),t.iolJWPlayer.options.onError.call(this,e)}),this.iolJWPlayer.playerInstance.on("visualQuality",function(e){t.sendGAEvent("JW Player Visual Quality",e.mode,e.level.height+" | "+e.level.bitrate),t.iolJWPlayer.options.onVisualQuality.call(this,e)}),this.iolJWPlayer.playerInstance.on("viewable",function(e){0===e.viewable?t.iolJWPlayer.playerInstance.pauseAd(!0):t.iolJWPlayer.playerInstance.pauseAd(!1),t.iolJWPlayer.options.playOnViewable&&(0===e.viewable?t.iolJWPlayer.playerInstance.pause():t.iolJWPlayer.playerInstance.play())}),this.iolJWPlayer.playerInstance.on("playlistItem",function(e){t.iolJWPlayer.firstPlay=!0,t.iolJWPlayer.options.onPlaylistItem.call(this,e)}),this.iolJWPlayer.playerInstance.on("playlistComplete",function(e){t.openRelated(),t.iolJWPlayer.options.onPlaylistComplete.call(this,e)})},sendGAEvent:function(e,t,o){var l=this.iolJWPlayer.playerInstance.version.split("+")[0],a=this.iolJWPlayer.playerInstance&&this.iolJWPlayer.playerInstance.getPlaylistIndex()?this.iolJWPlayer.playerInstance.getPlaylistIndex():0;
1this.iolJWPlayer.options.shouldSendEvents&&("undefined"!=typeof dataLayer?i.iol_analytics?this.sendGAEventByIOLAnalytics(e,t,o,l,a):this.sendGAEventByDataLayer(e,t,o,l,a):"undefined"!=typeof ga&&ga("send","event",e,o,t))},sendGAEventByDataLayer:function(e,i,t,o,l){dataLayer.push({"versao player":`JW_${o}|IOL_2.4.1`,eventCategory:e,eventLabel:t,eventAction:i,Programa_Id:decodeURIComponent(this.iolJWPlayer.options.video[l].program.id),Programa_Nome:decodeURIComponent(this.iolJWPlayer.options.video[l].program.name),Temporada_Id:decodeURIComponent(this.iolJWPlayer.options.video[l].program.season),Episodio_Id:decodeURIComponent(this.iolJWPlayer.options.video[l].program.ep),Multimedia_Id:decodeURIComponent(this.iolJWPlayer.options.video[l].id),Titulo:this.limitEncodedText(this.iolJWPlayer.options.video[l].title,150),Videoplay_Simultaneo:"S",Tipo:this.iolJWPlayer.options.video[l].videoType,Live:this.iolJWPlayer.options.video[l].liveType,AdUnit:this.iolJWPlayer.options.pub,Video_Play:1,Plataforma:this.iolJWPlayer.options.playerPlatform,event:"gaEvent"}),dataLayer.push({"versao player":""})},sendGAEventByIOLAnalytics:function(e,t,o,l,a){let r=i.iol_analytics;r.sendEvent(e,o,t,"gaEvent",r.createDataLayerObject("Video",decodeURIComponent(this.iolJWPlayer.options.video[a].title),decodeURIComponent(this.iolJWPlayer.options.video[a].id),decodeURIComponent(this.iolJWPlayer.options.video[a].program.ep),decodeURIComponent(this.iolJWPlayer.options.video[a].program.name),"","","S",this.iolJWPlayer.options.video[a].videoType,this.iolJWPlayer.options.video[a].liveType,`JW_${l}|IOL_2.4.1`,this.iolJWPlayer.options.playerPlatform,this.iolJWPlayer.options.pub,"",!1)),r.sendEvent("","","","",void 0,{"versao player":""})},limitEncodedText:function(e){var i=e.normalize("NFD").replace(/[\u0300-\u036f]/g,"");if((i=encodeURIComponent(i)).length>150)for(i=i.substring(0,150);!this.isAValidEncodedText(i);)i=this.limitEncodedTextdText(i);return decodeURIComponent(i)},isAValidEncodedText:function(e){try{return decodeURIComponent(e),!0}catch(e){return!1}},limitEncodedTextdText:function(e){return e.substring(0,e.lastIndexOf("%"))},sendMonitoringEvent:function(t,o){var l=this.iolJWPlayer.playerInstance?this.iolJWPlayer.playerInstance.version.split("+")[0]:"Error",a=navigator.userAgent,r=i.location.href,n=this.iolJWPlayer.playerInstance?this.iolJWPlayer.playerInstance.getVisualQuality():void 0,s=this.iolJWPlayer.playerInstance&&this.iolJWPlayer.playerInstance.getPlaylistIndex()?this.iolJWPlayer.playerInstance.getPlaylistIndex():0;this.iolJWPlayer.user||this.getUser();var p={message:`INFO | ${t}`,host:`${r}`,"user-agent":`${a}`,_u:this.iolJWPlayer.user.uname,_file:this.iolJWPlayer.options.video[s].videoUrl,_bufferState:o.bufferState?o.bufferState:"",_network:{downlink:navigator.connection.downlink,effectiveType:navigator.connection.effectiveType},_resolution:n?{mode:n.mode,height:n.level.height}:"",_version:`JW_${l}|IOL_2.4.1`};p._ip=this.iolJWPlayer.user.IPCode,p._countryCode=this.iolJWPlayer.user.IPCountryCode,e.ajax({type:"POST",url:"https://services.iol.pt/pevents",data:JSON.stringify(p),contentType:"application/json",dataType:"json"})},sendMonitoringErrorEvent:function(e,t,o){var l=this.iolJWPlayer.playerInstance?this.iolJWPlayer.playerInstance.version.split("+")[0]:"Error",a=navigator.userAgent,r=i.location.href,n=this.iolJWPlayer.playerInstance?this.iolJWPlayer.playerInstance.getVisualQuality():void 0,s=this.iolJWPlayer.playerInstance&&this.iolJWPlayer.playerInstance.getPlaylistIndex()?this.iolJWPlayer.playerInstance.getPlaylistIndex():0;this.iolJWPlayer.user||this.getUser();var p={message:`${e} | ${t.message}`,host:`${r}`,"user-agent":`${a}`,_code:t.code?`${t.code}`:"",_type:t.type?`${t.type}`:"",_u:this.iolJWPlayer.user.uname,_file:this.iolJWPlayer.options.video[s].videoUrl,_sourceError:t.sourceError?{type:`${t.sourceError.type}`,details:`${t.sourceError.details}`,fatal:`${t.sourceError.fatal}`,url:`${t.sourceError.url}`}:"",_bufferState:t.bufferState?t.bufferState:"",_network:{downlink:navigator.connection.downlink,effectiveType:navigator.connection.effectiveType},_resolution:n?{mode:n.mode,level:n.level}:"",_version:`JW_${l}|IOL_2.4.1`};p._ip=this.iolJWPlayer.user.IPCode,p._countryCode=this.iolJWPlayer.user.IPCountryCode,this.errorValidation(p,o)},errorValidation:function(i,t){var o=e.cookie("jwiol_c"),l=this.iolJWPlayer.playerInstance&&this.iolJWPlayer.playerInstance.getPlaylistIndex()?this.iolJWPlayer.playerInstance.getPlaylistIndex():0;if(o){var a=Date.parse(o);((new Date).getTime()-a)/1e3/3600>20&&(i._mcdError="errorExpired",e.ajax({type:"POST",url:"https://services.iol.pt/pevents",data:JSON.stringify(i),contentType:"application/json",dataType:"json"}),t&&t(i._mcdError))}"DIRETO"==this.iolJWPlayer.options.video[l].liveType&&"232403"==i._code?this.getErrorDetails(i,t):(i._mcdError="errorDefault",e.ajax({type:"POST",url:"https://services.iol.pt/pevents",data:JSON.stringify(i),contentType:"application/json",dataType:"json"}),t&&t(i._mcdError))},getErrorDetails:function(i,t){var o=this.iolJWPlayer.playerInstance&&this.iolJWPlayer.playerInstance.getPlaylistIndex()?this.iolJWPlayer.playerInstance.getPlaylistIndex():0;e.get(`https://services.iol.pt/videoMonitoring?canal=${this.iolJWPlayer.options.video[o].channel}&countrycode=${i._countryCode}
1`,function(o){o=JSON.parse(o),i._mcdError=o.error,i._mcdDetails=o.programa,e.ajax({type:"POST",url:"https://services.iol.pt/pevents",data:JSON.stringify(i),contentType:"application/json",dataType:"json"}),t&&t(i._mcdError)}).fail(function(){i._mcdError="errorFailed",e.ajax({type:"POST",url:"https://services.iol.pt/pevents",data:JSON.stringify(i),contentType:"application/json",dataType:"json"}),t&&t(i._mcdError)})},getUser:function(){var i={u:"",id:"id"};this.iolJWPlayer.user={};var t=localStorage.getItem("userx1"),o=localStorage.getItem("x1user");null!=t&&(sl=JSON.parse(t),i.u=sl.userName?sl.userName:"",i.id=sl.id?sl.id:""),null!=o&&(sl=JSON.parse(o),i.u=sl.userName?sl.userName:"",i.id=sl.id?sl.id:""),this.iolJWPlayer.user.uname=i.u,this.iolJWPlayer.user.uid=i.id;var l=this;return e.ajax({url:"https://services.iol.pt/getgcc/ipdetails",type:"get",async:!1,success:function(e){e=e.split("|"),l.iolJWPlayer.user.IPCode=e[0],l.iolJWPlayer.user.IPCountryCode=e[1],i.i=btoa(e[0])},error:function(){console.log("error")}}),i},jwplayer:function(){return this.iolJWPlayer.playerInstance},play:function(){return jwplayer(this.iolJWPlayer.playerDivId).play()},pause:function(){return jwplayer(this.iolJWPlayer.playerDivId).pause()},stop:function(){return jwplayer(this.iolJWPlayer.playerDivId).stop()},change:function(e){return jwplayer(this.iolJWPlayer.playerDivId).playlistItem(e)},mute:function(){return jwplayer(this.iolJWPlayer.playerDivId).setMute(!0)},unmute:function(){return jwplayer(this.iolJWPlayer.playerDivId).setMute(!1)},openRelated:function(){jwplayer(this.iolJWPlayer.playerDivId).getPlugin("related").open()},getPosition:function(){return jwplayer(this.iolJWPlayer.playerDivId).getPosition()},getState:function(){return jwplayer(this.iolJWPlayer.playerDivId).getState()},seek:function(e){return jwplayer(this.iolJWPlayer.playerDivId).seek(e)}}}(jQuery,window,document);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.