!function(){function r(l){var u=t(l+"Locator");return null!==u&&function(e,t,r,i){var n,a,o=w(),s=function(e){var t=e?e.data:{};if("string"==typeof t)try{t=JSON.parse(t)}catch(e){t={}}var i=l+"Return";t[i]&&t[i].callId===o&&(removeEventListener("message",s),r(t[i].returnValue,t[i].success))};window.addEventListener("message",s,!1);var d=((a={})[[l+"Call"]]=((n={command:e,callId:o,parameter:i})[[void 0!==i?"version":"parameter"]]=t,n),a);u.postMessage(JSON.stringify(d),"*")}}var e,v="googima",C="TYPE_API",_="TYPE_SCHEDULE",n="jw-flag-ads-googleima",u="jw-flag-ads-vpaid",c="jw-flag-ads-vpaid-controls",p="playing",I="adError",g="adItem",E="adStarted",a="viewable",o="external",i=o,s="instream",d="article",l=((e={})[[s]]=1,e[["banner"]]=2,e[[d]]=3,e[["feed"]]=4,e[["floating"]]=5,e[["interstitial"]]=5,e[["slider"]]=5,e),h=new RegExp(/^[^/]*:\/\/\/?([^\/]*)/);var t=function(e){for(var t=window;t;){try{if(t.frames[e])break}catch(e){}t=t===window.top?null:t.parent}return t},f=new RegExp(/^[^:\/?#]+:?\/\/[^\/?#]+/);function m(){var t=0p&&(c=c.substring(0,p)),o=o.replace(l,encodeURIComponent(c))}else o=o.replace(l,"")}if(r.title&&-1===o.indexOf("vid_t=")){var g=r.title.substring(0,100).replace(/[^\x00-\x7F]/g,"");o+=function(e){return-1!==e.indexOf("?")?"&":"?"}(o)+"vid_t="+encodeURIComponent(g)}return-1!==o.indexOf("__gdpr__")||-1!==o.indexOf("__gdpr_consent__")?m().then(function(e){var t=e.gdprApplies,i=e.consentData;return o.replace("__gdpr__",t?1:0).replace("__gdpr_consent__",i)}).catch(function(){return o}):Promise.resolve(o)}function L(e,t,i,r){var n=T(e,i,r),a=t.getVastErrorCode?t.getVastErrorCode():t.code,o=t.getErrorCode?t.getErrorCode():t.adErrorCode;return Object.assign(n,{message:"Ad Error: "+(t.getMessage?t.getMessage():t.message),code:100<=a&&a<=1008?a:900,adErrorCode:o<1e4?o+2e4:o||60900}),void 0!==t.id&&(n.id=t.id),void 0!==t.placement&&(n.placement=t.placement),t.getInnerError&&(n.sourceError=t.getInnerError()),void 0!==t.tag&&(n.tag=t.tag),n}function T(e,t,i){var r=1\n \n \n JWP\n \n \n \n\n"}(l,s.custom.nurl)),s.cacheKey=l,s.custParams=((d={})[["vpb_"+u+"_key"]]=l,d[["vpb_"+u+"_bid"]]=$e(p.buckets,n.price).toFixed(2),d)}return s}}return{result:ze,code:void 0!==t.nbr?t.nbr+400:We[ze]}})}};var nt={requestBids:function(e,l,i,t){var u=e.id,c=t.getURLParts(),r=function(e,t,i,r){return["https://an.facebook.com/v2/placementbid.json?&placementids[]="+e,"&playerwidth="+t,"&playerheight="+i,"&adformats[]="+ne,"&SDK[]="+ae,"&pageurl="+encodeURIComponent(r.url),"$random="+Math.random()*Math.pow(10,18)].join("")}(u,l.playerWidth,l.playerHeight,c);return function(e,t,i,r){return!!r&&(e===le||t&&i===te)}(l.mediationLayerAdServer,l.floorPriceCents,l.floorPriceCurrency||te,r)?new Promise(function(e){var t=new XMLHttpRequest;t.onreadystatechange=function(){4===this.readyState&&(e(this),t=null)},t.open("GET",r),t.withCredentials=!0,t.send(null),i.then(function(){t&&(t.abort(),t=null)})}).then(function(e){if(200!==e.status)return{result:Ne,message:"Invalid response (status "+e.status+")"};var t=JSON.parse(e.responseText),i=t.errors,r=t.request_id;if(i&&i.length)return{result:Ve,code:function(t){var e=Xe.filter(function(e){return 0<=t.indexOf(e.message)})[0];return e?e.code:Je}(i[0]),requestId:r};var n=t.bids;if(!n||!n[u]||!n[u][0])return{result:ze,requestId:r};var a=n[u][0],o=a.bid_price_cents,s=a.bid_id;if(l.mediationLayerAdServer===le||l.mediationLayerAdServer===pe)return{result:Ue,tag:l.tag,custParams:{jwFANBidPrice:$e(l.buckets,o/100).toFixed(2),jwFANBidID:s},requestId:r};var d={result:Ue,priceInCents:o,priceCurrency:a.bid_price_currency,requestId:r};return o>=l.floorPriceCents&&(d.tag=function(e,t,i,r,n){return["https://an.facebook.com/v1/instream/vast.xml?placementid="+e,"&playerwidth="+i,"&playerheight="+r,"&SDK[]="+ae,"&bidid="+t,"&pageurl="+encodeURIComponent(n.url)].join("")}(u,s,l.playerWidth,l.playerHeight,c)),d}).catch(function(e){return{result:Ne,message:"FAN header bidding failed: "+e}}):Promise.resolve({result:Ve})}},at=null;function ot(t){return null===at&&(at=Promise.resolve(window.apstag).then(function(e){return e&&e.init&&e.fetchBids?e:Ze(["file"===document.location.protocol?"https:":"",re].join(""),t).then(function(){return window.apstag})}).catch(function(e){throw at=null,e})),at}var st=null,dt=null;function lt(e,t){if(null===dt){var i=Ke(),r=st||window.SpotX;if(r&&r.DirectAdOS)return dt=Promise.resolve({SpotX:r,loadingTime:0});var n=["file"===document.location.protocol?"https:":"",se,e,".js"].join("");(dt="function"==typeof require?function(i){return new Promise(function(e,t){setTimeout(t,ee),require([i],e,t)}).catch(function(){return Promise.reject({message:be})})}(n).then(function(e){return{SpotX:st=e,loadingTime:Ke()-i}}).catch(function(){return ut(n,i,t)}):ut(n,i,t)).catch(function(){dt=null})}return dt}function ut(e,t,i){return Ze(e,i).then(function(){return{SpotX:window.SpotX,loadingTime:Ke()-t}})}var ct=void 0;var pt={postAuctionHandler:function(e){return e.scriptLoadingTime=ct,e},requestBids:function(e,l,t,i){if(!e.id)return Promise.resolve({result:Ve,code:302});var r={placement:l.placement,hide_skin:!0,no_vpaid_ads:!1},n={channel_id:e.id,slot:l.playerContainer,content_width:l.playerWidth,content_height:l.playerHeight,player_vendor:"SpotXJW",player_vendor_id:l.playerId,ad_volume:l.adVolume,ad_mute:l.mute?1:0,autoplay:l.autoplay,blocked_autoplay_override_mode:l.autoplayAdsMuted,start_delay:Ye(l.offset)},a=Object.assign(r,e.optionalParams,n);return e.passFloorPrice&&l.floorPriceCents&&(a.price_floor=l.floorPriceCents/100),l.jwpseg&&(a.custom=a.custom||{},a.custom.jwpseg=l.jwpseg),lt(e.id,i).then(function(e){var t=e.SpotX,i=e.loadingTime;ct=i;var r=new t.DirectAdOS(a),n=Ke();return r.getAdServerKVPs().then(function(e){return{response:e,bidNetworkStartTime:n}})}).then(function(e){var t=e.response,i=e.bidNetworkStartTime,r=Ke()-i,n=t.spotx_ad_key,a={spotx_bid:$e(l.buckets,t.spotx_bid).toFixed(2),spotx_ad_key:n},o=100*parseFloat(t.spotx_bid),s={result:Ue,priceInCents:o,custParams:a,scriptLoadingTime:ct,bidNetworkResponseTime:r};if(l.mediationLayerAdServer===le)return s;var d=["file:"===document.location.protocol?"https:":"",de,n].join("");return Object.assign(s,{tag:d,tagKey:n})}).catch(function(t){var e=Ge.filter(function(e){return e.message===t.message})[0];return e?{result:e.result||Ve,code:e.code,scriptLoadingTime:ct}:{result:Ne,message:"SpotX header bidding failed: "+t,scriptLoadingTime:ct}})}},gt=null;function ht(t,i){return null===gt&&(gt=Promise.resolve(window.indexapi).then(function(e){return e||Ze(["file"===document.location.protocol?"https:":"",t||oe].join(""),i).then(function(){return window.indexapi})}).catch(function(e){throw gt=null,e})),gt}function ft(n,a,o){var s=n.filter(function(e){return e&&e.result===Ue&&e.adm&&e.cacheKey});return 0===s.length?Promise.resolve({bids:n}):new Promise(function(t){function i(e){return function(){t({result:e,code:this.status,time:Ke()-r|0}),n=null}}var e=s.map(function(e){return{type:"xml",ttlseconds:(e.custom||{}).exp||86400,value:o.getTrackingPixelURLs?function(e,t){var i=t.parseXML(e.adm);if(null===i)return e.adm;for(var r=t.getTrackingPixelURLs(e.name,e.cacheKey),n=r.impression,a=r.error,o=i.querySelectorAll("InLine,Wrapper"),s=0;s=o.floorPriceCents&&(null===g||t.priceInCents>g.priceInCents)&&(g=t),t}).catch(function(e){return Object.assign({},i,{result:Ne,code:550,message:e,timeForBidResponse:Ke()-n|0})});return l&&i.type===me?(c[r]=e).then(function(t){return null===p&&(p=Promise.all(c).then(function(e){return null!==g?e:ft(e,s,d).then(function(e){var t=e.bids,i=e.time;return a.timeForVPBCache=i,t})})),p.then(function(e){return e[r]}).catch(function(e){return Object.assign(t,{result:Ne,code:590,message:e})})}):e});return Promise.all(i).then(function(e){if(u&&g)return g.winner=!0,{bidders:e,result:g};if(l){var t=e.reduce(function(e,t){return t.result===Ue?Object.assign(e||{},t.custParams):e},null),i={bidders:e};return null!==t&&(i.result={tag:o.tag,custParams:t}),i}return{bidders:e}}).then(function(i){return i.bidders=i.bidders.map(function(e){e.code=e.code||We[e.result];var t=yt[e.type||e.name];return"function"==typeof t.postAuctionHandler?t.postAuctionHandler(e,i.result):e}),Object.assign(t,i.bidders),i})}({bidders:this.bidders,eventProps:this.eventProps,settings:this.settings,onCancel:this.onCancel,utils:this.utils})),this._bidRequest},wt.prototype.stop=function(){var t=this;clearTimeout(this._currentTimeout),this._onCancelTrigger({result:qe}),this._bidRequest=null,this._currentTimeout=null,this._onCancelTrigger=null,this.onCancel=new Promise(function(e){t._onCancelTrigger=e})},wt.prototype.getEventObject=function(){var e=this.settings.mediationLayerAdServer,t={bidsVersion:"0.2.17",mediationLayerAdServer:e,bidders:[].concat(this.bidders),bidTimeout:this.settings.bidTimeout};e!==ue&&e!==pe||(t.floorPriceCents=+this.settings.floorPriceCents||0);var i=this.settings.floorPriceCurrency;return i&&(t.floorPriceCurrency=i),void 0!==this.eventProps.timeForVPBCache&&(t.timeForVPBCache=this.eventProps.timeForVPBCache),t},wt.prototype.then=function(e){return this._bidRequest?this._bidRequest.then(e,e):null},wt.prototype.timeout=function(){clearTimeout(this._currentTimeout),this._currentTimeout=setTimeout(this._onCancelTrigger,this.settings.bidTimeout,{result:He})},wt);function wt(){var e=0=e.position?this.playbackProxy.duration=e.duration:this.playbackProxy.duration=1/0},Ct.prototype.resize=function(){var e=this.currentAd,t=this.adsLoaderManager.adsManager;if(t){var i=e&&!e.isLinear(),r=this.player.getSafeRegion(i);if(i){var n=e.getHeight();n=this.player.getFullscreen()?r.height/2:Math.max(100,n+10),this.debugConsoleLog("[JW DEBUG] Resize adsManager",r.width,n,this.getViewMode()),t.resize(r.width,n,this.getViewMode()),this.view.resizeNonLinear(n)}else this.debugConsoleLog("[JW DEBUG] Resize adsManager",r.width,r.height,this.getViewMode()),t.resize(r.width,r.height,this.getViewMode()),this.view.resizeLinear()}},Ct.prototype.setState=function(e,t){if(e.isLinear()){var i=T(this,e);i.newstate=t,null!==this.reason&&(i[t===p?"playReason":"pauseReason"]=this.reason,this.reason=null),this.instreamProvider.trigger("state",i)}},Ct.prototype.progressInterval=function(e,l){var u=this;if(clearInterval(this.progressIntervalId),l){var c=e.getAdId(),p=-1,g=this.options.admessage||"",h=this.options.podmessage||"",f=new RegExp("__AD_POD_CURRENT__","g"),m=new RegExp("__AD_POD_LENGTH__","g");this.progressIntervalId=setInterval(function(){if(u.currentAd&&u.currentAd.getAdId()===c){var e=l.getRemainingTime();if(!(isNaN(e)||e<=0)&&p!==e){p=e;var t=u.currentAd.getDuration(),i=t-e,r=Math.round(t-i);if(u.blockingInstreamPlayer){var n=g.replace(/(\b)xx(s?\b)/g,"$1"+r+"$2"),a=u.currentAd.getAdPodInfo(),o=a.getTotalAds();if(1:not(div),.jw-plugin-googima.jw-ad-instream .jw-ads-view>div:not(:empty){height:100%;width:100%}.jw-plugin-googima{overflow:hidden;display:block;visibility:hidden;pointer-events:none;opacity:0}.jw-plugin-googima.jw-ad-instream{visibility:visible;display:block;pointer-events:all;opacity:1}.jw-plugin-googima.jw-ad-linear{top:0;left:0;bottom:0}.jw-plugin-googima.jw-ad-non-linear{top:auto}.jw-plugin-googima .jw-ads-view{position:absolute;width:100%;height:100%}.jwplayer.jw-flag-ads-googleima.jw-flag-touch .jw-controlbar{font-size:1em}.jwplayer.jw-flag-ads-googleima.jw-flag-touch .jw-display-icon-display,.jwplayer.jw-flag-ads-googleima.jw-flag-touch .jw-display-icon-display .jw-icon-display{pointer-events:none}.jwplayer.jw-flag-ads-googleima .jw-controlbar{background:0 0!important;pointer-events:none}.jwplayer.jw-flag-ads-googleima .jw-controlbar .jw-icon{pointer-events:all}.jwplayer.jw-flag-ads-googleima .jw-controls-backdrop{display:none}.jwplayer.jw-flag-ads-googleima.jw-ie .jw-slider-volume,.jwplayer.jw-flag-ads-googleima.jw-ie .jw-svg-icon{background:rgba(0,0,0,.25);border-radius:3px}.jwplayer.jw-flag-ads-googleima.jw-ie .jw-slider-volume{margin:0 10px}@supports (filter:drop-shadow(0 0 3px #000)){.jwplayer.jw-flag-ads-googleima.jw-ie .jw-slider-volume,.jwplayer.jw-flag-ads-googleima.jw-ie .jw-svg-icon{background:0 0;border-radius:0}.jwplayer.jw-flag-ads-googleima.jw-ie .jw-slider-volume{margin:0}}.jwplayer.jw-flag-ads-googleima .jw-controlbar .jw-svg-icon{fill:#fff;filter:drop-shadow(0 0 3px #000)}.jwplayer.jw-flag-ads-googleima .jw-spacer,.jwplayer.jw-flag-ads-googleima .jw-text{order:1}.jwplayer.jw-flag-ads-googleima .jw-controlbar .jw-text{text-shadow:0 0 3px #000}.jwplayer.jw-flag-ads-googleima.jw-flag-small-player.jw-flag-ads.jw-state-playing.jw-flag-touch:not(.jw-flag-ads-vpaid) .jw-controls .jw-controlbar{pointer-events:none}.jwplayer.jw-flag-ads-googleima.jw-flag-small-player .jw-controlbar{flex-flow:column-reverse nowrap;height:100%;max-height:none}.jwplayer.jw-flag-ads-googleima.jw-flag-small-player .jw-button-container{align-items:flex-end;flex-wrap:wrap;margin-bottom:7px}.jwplayer.jw-flag-ads-googleima.jw-flag-small-player .jw-controlbar .jw-icon{height:30px}.jwplayer.jw-flag-ads-googleima.jw-flag-small-player .jw-text{align-self:flex-start;margin:16px 0 0 16px;order:-1;width:100%}"),(window.jwplayerPluginJsonp||window.jwplayer().registerPlugin)(v,"8.1",function(s,n,e){var t=this,o=s.utils,a=s.getConfig(),d=new N(n||{},o),l=null,u=0;F(o).catch(o.noop);var c=s._,i=a.key,p=new z(e,s.id,o),g=new Q(o,s.Events,p),h=new _t(s,p.getAdDiv()),f=null;function m(e,t,i,r){try{return e.getCompanionAds(t,i,r)}catch(e){return[]}}function v(e){var t=new google.ima.CompanionAdSelectionSettings;t.sizeCriteria=google.ima.CompanionAdSelectionSettings.SizeCriteria.IGNORE;var i=d.companiondiv||{width:300,height:250},r=function(e){for(var t=[],i=0;i=e.startOn&&(u-e.startOn)%e.frequency==0;return t||i}()||!n||"string"!=typeof n&&!Object.keys(n).length)return d.adschedule=null,void F(o).then(function(){h.prepare(l)}).catch(o.noop);if(h.reset(),(f=new Pt(r,d,s,g,p,h,l)).on("all",function(e,t){return s.trigger(e,t)}),f.init(t,i).then(function(e){s.trigger("adsManager",{adsManager:e,videoElement:l})}).catch(o.noop),f.on(E,function(){return v(f.currentAd)}),i.preloadAds){var a=s.getConfig().autostart;!1===a||"viewable"===a&&0===s.getViewable()?f.requestAds(t,i):s.once("autostartNotAllowed",function(){f.requestAds(t,i)},f)}s.once("beforePlay",function(e){f.beforePlay(e),f.requestAds(t,i)},f).on("beforeComplete",function(){return f.beforeComplete()},f).on("time",function(e){return f.time(e)},f).on("resize",function(){return f.resize()},f).on("fullscreen",function(){return f.resize()},f)}this.version="8.7.2",this.bidsVersion="0.2.17",s.utils.extend(this,s.Events),s.pauseAd=function(e,t){f&&(e?f.pause(t||{}):f.resume(t||{}))},s.playAd=function(e){var t=o.extend({},n);delete t.ad,delete t.tag,delete t.schedule,delete t.adschedule,s._.isArray(e)?t.tag=e[0]:t.tag=e,t.adPosition=S(s);var i=new N(t,o);i.setLocalizationOptions(a.localization.advertising);var r=f?f.blockingInstreamPlayer:null;r&&(r.noResume=!0),w({},C,i),f&&(f.beforePlay(null),f.requestAds(C,i))},s.skipAd=function(){h&&h.skipAd()},s.on("ready",function(){a.localization=s.getConfig().localization,d.setLocalizationOptions(a.localization.advertising),l=l||s.createInstream().getMediaElement(),F().catch(function(e){e.message.match(/Failed to load/)&&P("Ad playback blocked by an ad blocker",2e4)}),A.catch(function(e){P(e.message,60002)});var e=document.body,t=function(){e.removeEventListener("mouseup",t),e.removeEventListener("touchend",t),h.initializeDisplay()};e.addEventListener("mouseup",t,!1),e.addEventListener("touchend",t,!1)},this).on("playlistItem",function(e){u++,d.resetBidsResponse(),w(e,_,d)},this).on("playlistComplete",function(){b()},this).on("cast",function(e){e.active&&b()},this).on("mute",function(e){var t=e.mute;g.mute(t)},this).on("destroyPlugin",function(){t.destroy()},this).on("remove",r,this);var A=J(o,i,n);A.catch(o.noop);var P=function(e,t){r(),s.trigger(I,L(null,{message:e,adErrorCode:t,id:"-1",placement:j(a),tag:""}))};this.destroy=y,this.adsDebugMode=function(){d.debug=!0,f&&(f.debugConsoleLog=function(){var e;(e=console).log.apply(e,arguments)})}})}();