(function(){var ea={scope:{},getGlobal:function(c){return"undefined"!=typeof window&&window===c?c:"undefined"!=typeof global?global:c}};ea.global=ea.getGlobal(this);ea.initSymbol=function(){ea.global.Symbol||(ea.global.Symbol=ea.Symbol);ea.initSymbol=function(){}};ea.symbolCounter_=0;ea.Symbol=function(c){return"jscomp_symbol_"+c+ea.symbolCounter_++};ea.initSymbolIterator=function(){ea.initSymbol();ea.global.Symbol.iterator||(ea.global.Symbol.iterator=ea.global.Symbol("iterator"));ea.initSymbolIterator=function(){}};
ea.makeIterator=function(c){ea.initSymbolIterator();if(c[ea.global.Symbol.iterator])return c[ea.global.Symbol.iterator]();if(!(c instanceof Array||"string"==typeof c||c instanceof String))throw new TypeError(c+" is not iterable");var f=0;return{next:function(){return f==c.length?{done:!0}:{done:!1,value:c[f++]}}}};ea.arrayFromIterator=function(c){for(var f,l=[];!(f=c.next()).done;)l.push(f.value);return l};ea.arrayFromIterable=function(c){return c instanceof Array?c:ea.arrayFromIterator(ea.makeIterator(c))};
ea.arrayFromArguments=function(c){for(var f=[],l=0;l<c.length;l++)f.push(c[l]);return f};ea.inherits=function(c,f){function l(){}l.prototype=f.prototype;c.prototype=new l;c.prototype.constructor=c;for(var p in f)if(ea.global.Object.defineProperties){var C=ea.global.Object.getOwnPropertyDescriptor(f,p);void 0!==C&&ea.global.Object.defineProperty(c,p,C)}else c[p]=f[p]};var ua={};
function Aa(c){for(var f=window.frameElement,l=window;f;)f=f.ownerDocument,l=f.defaultView,(c||function(){})(f),f=l.frameElement;return l}function Ba(c,f){var l=f||document,p=c.split("/").join("\\/");return Array.prototype.map.call(l.querySelectorAll(p),function(c){return c})}ua.eachDocument=Aa;ua.find=Ba;ua.findRecursiveUp=function(c){var f=Ba(c);Aa(function(l){f=f.concat(Ba(c,l))});return f};var Ca={};function Ga(c,f,l,p){(function(C){var J=this,F=arguments;c[f]=function(){var c;p&&(c=C.apply(J,F));l.apply(J,F);p||(c=C.apply(J,F));return c}})(c[f])}Ca.hookBefore=function(c,f,l){Ga(c,f,l,!0)};Ca.hookAfter=function(c,f,l){Ga(c,f,l,!1)};(function(){function c(){}function f(){}function l(){function b(){var b=window.frameElement,a=window;for(n=0;b;)n++,a=b.ownerDocument.defaultView,b=a.frameElement;return a}function d(b){return new RegExp("[\\[]"+b+"[\\]]","gi")}function a(b){return encodeURIComponent(b).replace(/[!'()*]/g,function(b){return"%"+b.charCodeAt(0).toString(16)})}function k(b,d,n){if(-1===b.indexOf(d))return b;var B=b.substr(b.indexOf(d),b.indexOf("]",b.indexOf(d))-b.indexOf(d)+1),c=0<=B.indexOf("|")?parseInt(B.split("|")[1].slice(0,
-1),10):0;b=0===c?b.replace(B,a(n)):b.replace(B,a(n.substr(0,c)));0<=b.indexOf(d)&&(b=k(b,d,n));return b}var B={},x={timeOffset:0,assetUri:"",pageUri:"",pageTitle:"",techVersion:"",videoData:{}},c={},n=0;B.errorCode=function(b,k){if(!k)return b;c.ERRORCODE=a(k);return b.replace(d("(errorcode)"),a(k))};B.w=function(g){if(!g)return g;var m;if(m=x.timeOffset){var B=new Date(null);B.setSeconds(m);m=B.toISOString().substr(11,8)+".000"}else m=!1;c.CONTENTPLAYHEAD=a(m||"00:00:00.000");g=g.replace(d("(contentplayhead)"),
a(m||"00:00:00.000"));if(m=x.assetUri)g=g.replace(d("(asseturi)"),a(m)),g=k(g,"[ASSETURI",m),c.ASSETURI=a(m);if(m=x.pageUri)g=g.replace(d("(pageuri)"),a(m)),g=k(g,"[PAGEURI",m),c.PAGEURI=a(m);if(m=x.pageTitle)g=g.replace(d("(pagetitle)"),a(m)),c.PAGETITLE=a(m);if(m=x.techVersion)g=g.replace(d("(techversion|sdk_version)"),a(m)),c.TECHVERSION=a(m);m=d("(cachebusting|cache_?buster|rand(om|num))");B=a(Math.round(1E8*Math.random()));c.CACHEBUSTING=B;c.CACHEBUSTER=B;g=g.replace(m,B);B=new Date;m=B.toISOString();
B=B.getTimezoneOffset()/60;B=B.toString().split("");2===B.length&&B.splice(1,0,"0");B=B.join("");m=m.replace("Z",B);c.TIMESTAMP=a(m);g=g.replace(d("(timestamp)"),a(m));m="Unknown OS";-1!=navigator.appVersion.indexOf("Win")&&(m="Windows");-1!=navigator.appVersion.indexOf("Mac")&&(m="MacOS");-1!=navigator.appVersion.indexOf("X11")&&(m="UNIX");-1!=navigator.appVersion.indexOf("Linux")&&(m="Linux");g=g.replace(d("(USERAGENT)"),a(navigator.userAgent));g=g.replace(d("(OS)"),m);g=g.replace(d("(os_version|OSVERSION)"),
"unknown");c.USERAGENT=a(navigator.userAgent);c.OS=m;c.OSVERSION="unknown";b();c.FRAMEDEPTH=n;g=g.replace(d("(FRAMEDEPTH)"),n);if(m=x.videoData)g=g.replace(d("(dimension)"),a(m.width+"x"+m.height)),g=g.replace(d("(player_width|PLAYERWIDTH)"),a(m.width)),g=g.replace(d("(player_height|PLAYERHEIGHT)"),a(m.height)),c.PLAYERWIDTH=a(m.width),c.PLAYERHEIGHT=a(m.height);m=b().innerWidth||b().document.documentElement.clientWidth||b().document.body.clientWidth;B=b().innerHeight||b().document.documentElement.clientHeight||
b().document.body.clientHeight;c.SCREENRES=a(m+"x"+B);g=g.replace(d("(screen_res|screenres)"),a(m+"x"+B));m=e.eb();c.ALLOWINSWIPE=a(m);g=g.replace(d("(ALLOWINSWIPE)"),m);m=e.eb();c.FIF=a(m);g=g.replace(d("(FIF)"),m);return g.trim()};B.getCurrentModel=function(){var b={};Object.keys(c).forEach(function(a){b["["+a+"]"]=c[a]});return b};B.setValueFor=function(b,a){x[b]=a;c[b.toUpperCase()]&&(c[b.toUpperCase()]=a)};(function(){var a=b().location.href,d=b().document.title;window.Fc&&(a=window.context.location.href,
d=window.context.Rc);B.setValueFor("pageUri",a);B.setValueFor("pageTitle",d);B.setValueFor("techVersion",[I.IDENTIFIER,I.API_VERSION,I.API_BUILD].join("|"))})();return B}function p(b,d,a){function k(b,a){var d={};f.prototype.apply(this);var k=function(b,a){var d=-1!==String(b).indexOf("onTrack")?a:null,d=null===d?b:"AdVideo"+(d[0].toUpperCase()+d.slice(1));"AdVideoResume"===d&&(d="AdVideoPlay");"AdVideoImpression"===d&&(d="AdImpression");"AdVideoSkip"===d&&(d="AdSkipped");this.dispatchEvent(d,a)}.bind(this);
d.adManager=b;d.handshakeVersion=function(){return"2.0"};d.initAd=function(a,d,g,B,n,c){if(c&&c.rules)for(a=c.rules.length-1;0<=a;a--)e.gb(c.rules[a])&&b.addRuleToRuleSet(c.rules[a]);isNaN(B)||(e.ba=function(){return B});if(c&&c.desiredMimeTypes){var x=JSON.parse(JSON.stringify(e.tb));a=Object.keys(x);var E=c.desiredMimeTypes.join(" "),y={};a.filter(function(b){return-1<E.indexOf(x[b].typeString)}).forEach(function(b){y[b]=x[b]});e.za=function(){var b=document.createElement("video"),a={},d;for(d in y)y.hasOwnProperty(d)&&
(y[d].result=b.canPlayType(y[d].typeString),""!==y[d].result&&(a[d]=y[d]));return a}}b.registerGlobalEventDispatcher(k)};d.startAd=function(){b.start()};d.stopAd=function(){b.destroy()};d.skipAd=function(){this.dispatchEvent("AdSkipped");b.skipAd()}.bind(this);d.resizeAd=function(d,k,g){a.style.width=parseInt(d,10)+"px";a.style.height=parseInt(k,10)+"px";b.resize(d,k,g)};d.pauseAd=function(){b.pauseAd()};d.resumeAd=function(){b.resumeAd()};d.expandAd=function(){};d.collapseAd=function(){};d.setAdVolume=
function(a){b.setAdVolume(a)};d.getAdVolume=function(){return b.getAdVolume()};d.getAdMutedState=function(){return b.getAdMutedState()};d.getSlot=function(){return b.getSlot()};d.getVideoSlot=function(){return b.getVideoSlot()};d.getPlayerSlot=function(){return B.getParent()};d.subscribe=function(b,a,d){this.addEventListener(a,b,d);return b}.bind(this);d.unsubscribe=function(b,a){this.removeEventListener(a,b)}.bind(this);return d}var B;if(!b.getAttribute("data-ois-instance-id")){b.setAttribute("data-ois-instance-id",
h.length);var c=null;d.displaySlot&&d.displaySlot.nodeType&&(c=d.displaySlot);"string"===typeof d.displaySlot&&(c=e.find(d.displaySlot)[0]||null);B=new S(b,c);var c=new F(d),fa=new J(B,c),n=new k(fa,b),g={adManager:fa,config:c};q.forEach(function(a){a(n,b,d,g)});h.push({fa:n,element:b,ec:d,adManager:fa,v:c});(a||Function)()}return h[b.getAttribute("data-ois-instance-id")].fa}function C(b){function d(b){var a=0,d=0;try{if(b.offsetParent)for(a=b.offsetLeft,d=b.offsetTop;(b=b.offsetParent)&&"BODY"!==
b.tagName.toUpperCase();)a+=b.offsetLeft,d+=b.offsetTop}catch(k){}return{left:a,top:d}}var a={i:{width:0,height:0,left:0,top:0},f:{width:0,height:0,left:0,top:0},R:!1,A:0,Oa:0,Pa:0,Na:0},k=[],B="ois_"+e.Ua().split("-").join(""),c,fa;this.K=function(){"undefined"==typeof fa&&(fa=window.self===window.top?window.self:window.top);if("undefined"==typeof c)try{c=fa.document}catch(e){c=window.document}a.i={width:c.documentElement.clientWidth||fa.innerWidth||c.body.clientWidth,height:c.documentElement.clientHeight||
fa.innerHeight||c.body.clientHeight,left:fa.scrollX||c.documentElement.scrollLeft||c.body.scrollLeft,top:fa.scrollY||c.documentElement.scrollTop||c.body.scrollTop};var n=d(b);if(window.self!==window.top)try{var g;a:{var m=top.document.getElementsByTagName("iframe"),h;for(h in m)try{if(m[h].contentWindow[B]){g=m[h];break a}}catch(e){}g=void 0}var y=d(g);n.left+=y.left;n.top+=y.top}catch(e){}a.f={width:b.offsetWidth,height:b.offsetHeight,left:n.left,top:n.top};a.i.left>=a.f.left+a.f.width||a.i.top>=
a.f.top+a.f.height||a.f.left>=a.i.left+a.i.width||a.f.top>=a.i.top+a.i.height?(a.A=0,a.R=!1):0>=a.f.width||0>=a.f.height?(a.A=0,a.R=!1):a.f.left>=a.i.left&&a.f.top>=a.i.top&&a.f.left+a.f.width<=a.i.left+a.i.width&&a.f.top+a.f.height<=a.i.top+a.i.height?(a.A=100,a.R=!0):(n=a.f.width,g=a.f.height,a.f.left<a.i.left?n=a.f.width-(a.i.left-a.f.left):a.f.left+a.f.width>a.i.width+a.i.left&&(n=a.i.width-(a.f.left-a.i.left)),a.f.top<a.i.top?g=a.f.height-(a.i.top-a.f.top):a.f.top+a.f.height>a.i.height+a.i.top&&
(g=a.i.height-(a.f.top-a.i.top)),a.A=Math.floor(n*g/(a.f.width*a.f.height)*100),0<a.A&&(a.R=!0));1==a.R?(a.Oa+=.25,a.Pa=.25):a.Pa=0;a.Na+=.25;k.push(a.R);return a};window[B]=B}function J(b,d){function a(){w.b(1010);w.b(1020);w.b(1030);w.b("AdCompanionsDetected");w.b("AdLoaded");w.b("AdSlotStarted",h);w.b("AdSlotComplete",h);w.b("START_LINEAR",h);w.b("START_NONLINEAR",h);w.b("AdStopped",h);b.b("CONTROLS_ON",h);b.b("CONTROLS_OFF",h);b.g("play,pause,ended,timeupdate,volumechange,error,durationchange",
fa)}function k(){f=b.h("currentSrc");r=b.h("currentSrcType");e.B(b.h("currentSrc"))&&(d.Tc=e.tc(b.h("currentSrc")));t.log(101,f)}function B(){return f?b.h("currentSrc")==f:!0}function c(a){a="object"===typeof a?a.info:a;!1!==a&&(a=!0);t.log(100,a);b.setControls(a)}function fa(a){"timeupdate"!=a.type&&t.log(101,a.type);switch(a.type){case 1030:var y=b.h("currentTime");0!=y&&B()&&(aa=Number(Number(y).toFixed(1)));n(!1);c(!1);g(!0);break;case 1020:n()?z&&m():(f&&0<f.length&&b.ja({url:f,type:r},null==
aa||0==aa||z?!1:aa,z),z&&m(),n(!0),c(!0),g(!1))}if(!0===g())switch(a.type){case "play":case "error":if(!u&&"error"===a.type&&(t.log(102,b.h("error")),w&&!w.da())){w.pa(!1,401);break}if(a=q.aa(0))k(),f&&b.M(),w.startAd(a);!0===u&&(u=!1,k(),g(!1))}else switch(a.type){case "error":t.log(102,a.type,b.h("src"));!w||B()&&!w.da()||w.da()||w.pa();break;case "timeupdate":a=b.h("duration");y=b.h("currentTime");!g()&&y>d.overlayDelay&&y<a-5&&B()&&(q.vc(a),a=q.aa(y))&&("fixedroll"==a.type&&(k(),w.startAd(a)),
"overlay"!=a.type||e.La&&null===b.getVideoSlot().getAttribute("webkit-playsinline")||w.startAd(a));a=b.h("duration");y=b.h("currentTime");y<a&&y>a-1&&B()&&e.I&&(q.Qb(a)?(E=1,(a=q.aa(a))?(k(),w.startAd(a)):(w.da()&&w.ea(),m())):Ka=!0);break;case "ended":if(!e.I&&B()&&(z=!0,(a=q.aa(b.h("duration")))?(k(),w.startAd(a)):(w.da()&&w.ea(),m()),b.M()),B()&&e.I&&1==E)E=2;else if(B()&&e.I&&2==E||Ka)m(),E=3}}function n(b){if(void 0!=b)ca=b;else return ca}function g(b){if(void 0!=b)y=b;else return y}function m(){t.log(104);
b.M();if(d.onFinish)d.onFinish();a()}function h(a){if(X[a.type])X[a.type](a);switch(a.type){case "AdSlotStarted":b.ob(!0);break;case "AdSlotComplete":b.ob(!1);break;case "AdStopped":q.bc()&&h({type:"BLOCK_DONE"})}}var y=!0,ca=!1,X={},w,q,f,r,aa=null,z=!1,E=!1,Ka=!1,u=!0,l=new e.j.s;this.registerGlobalEventDispatcher=l.registerGlobalEventDispatcher;this.destroy=function(){w&&(t.log(105),w.ea(),a())};this.start=function(){var a=b.h("currentSrc");/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)&&
g()&&!a?fa({type:"play"}):b.O()};this.onAdLoadCompleteCallback=function(b){w&&w.a("AdLoaded",e.D(b)?b:function(){})};this.setControllerEvents=function(b){X=b};this.Nb=function(){return b.Nb()};this.pauseAd=function(){w.pauseAd()};this.resumeAd=function(){w.resumeAd()};this.resize=function(a,d,k){var g=document.createEvent("HTMLEvents");g.initEvent("resize",!0,!1);b.getVideoSlot().dispatchEvent(g);w.resizeAd(a,d,k)};this.addRuleToRuleSet=function(b){w.addRuleToRuleSet(b)};this.removeRules=function(b){return w.removeRules(b)};
this.setAutoplay=function(b){w.setAutoplay(b)};this.startLinear=function(b){w.startLinear(b)};this.setVpaidAd=function(b){w.setVpaidAd(b)};this.triggerEvent=function(b,a){l.triggerEvent(b,a)};this.clickThrough=function(){w.clickThrough()};this.trackingController=function(){return w.trackingController()};this.skipAd=function(){w.skipAd()};this.setAdVolume=function(b){w.setAdVolume(b)};this.getAdVolume=function(){return w.getAdVolume()};this.getAdMutedState=function(){return w.getAdMutedState()};this.startAd=
function(b){w.startAd(b)};this.getAdConfig=function(){return w.getAdConfig()};this.isVPAID=function(){return w.isVPAID()};this.getSlot=function(){return w.getSlot()};this.getVideoSlot=function(){return w.getVideoSlot()};this.startAds=function(b){w.startAds(b)};this.trackErrorAndRestartAd=function(b){w.pa(!0);q.reset();(b=q.aa(b||0))&&"fixedroll"==b.type&&(1<b.tag.length&&0===b.urls.length&&(b.urls.unshift(b.tag),b.limit=b.urls.length),w.ea())};t.log(109,I.API_VERSION);q=new P(d);w=new G(b,d);w.registerGlobalEventDispatcher(l.C);
b.registerGlobalEventDispatcher(l.C);w.a(1010,c);w.a(1020,fa);w.a(1030,fa);w.a("AdCompanionsDetected",function(b){t.log(103);if(d.onCompanion)d.onCompanion(b.info);d.companionCallback&&d.companionCallback(b.info)});w.a("AdSlotStarted",h);w.a("AdSlotComplete",h);w.a("START_LINEAR",h);w.a("START_NONLINEAR",h);w.a("AdStopped",h);b.a("CONTROLS_ON",h);b.a("CONTROLS_OFF",h);b.m("play,pause,ended,timeupdate,volumechange,error,durationchange",fa)}function F(b){function d(){for(var b in n)"undefined"!==typeof g[b]&&
(g[b]=a(n[b],g.ga[b]))}function a(b,d){switch(typeof d){case "number":return!b||isNaN(parseInt(b,10))?d:parseInt(b,10);case "object":for(var k in d)b[k]=b[k]?a(b[k],d[k]):d[k];break;default:if(void 0===b||null===b)return d}return b}function k(){4==m.readyState&&(200==m.status?B():g.H&&g.H(g))}function B(){g.oa({});if(g.onConfigLoaded)g.onConfigLoaded(g)}function c(){g.H&&g.H(g)}var fa={key:"",adResponse:"",preroll:"",midroll:"",postroll:"",overlay:"",fixedroll:"",fixedrolls:[],overlayDelay:5,overlayDuration:15,
minDurationForMidrolls:100,customControls:!1,urlhandler:"",blockInsecureURL:!0,maxWrapperDepth:10,prefetchBuffets:!1,adVerification:{meetrics:!1},skipButtonPosition:"top",skipButtonText:"Skip this Ad",styles:{colorScheme:{backgroundColor:"rgba(0,0,0,.8)",color:"#ffffff"},fontStyle:{textAlign:"left",fontFamily:"Arial,sans,Verdana",fontSize:"12px",lineHeight:"20px"},dialogBox:{width:"200px",padding:"7px",border:"1px solid #ffffff",borderRadius:"3px"},buttonStyle:{width:"80px",height:"25px",margin:"2px",
marginTop:"9px",border:"1px solid #ffffff",borderRadius:"3px",lineHeight:"0px",textAlign:"center"}},onCompanion:null,companionCallback:null,onTrack:function(){},onFinish:null,vpaidSingleVideoSlotMode:!0,vb:"",vastExtensions:{},lb:!0},n=b,g=this;g.ga=fa;var m;this.Lb=function(){return g};this.oa=function(b){n=b;d();e.cb(b)&&(g.onConfigLoaded=b.onConfigLoaded,g.H=b.H,g.jb(b.externalConfigXml))};this.jb=function(b){b=e.urlEnrichment.w(b);m=window.XDomainRequest?new window.XDomainRequest:new XMLHttpRequest;
window.XDomainRequest?(m.onload=B,m.onerror=c,m.open("GET",b)):(m.open("GET",b,!0),m.onreadystatechange=k);m.send()};this.H=this.onConfigLoaded=null;this.id="test";(function(){g.ga=fa;for(var b in g.ga)g[b]=g.ga[b]})();d();e.cb(b)&&(g.onConfigLoaded=b.onConfigLoaded,g.H=b.H,g.jb(b.externalConfigXml))}function R(){function b(b){var d=a.filter(function(a){return a.hasOwnProperty(b)});if(!(1>=d.length)){var k=a.filter(function(a){return!a.hasOwnProperty(b)}),d=d.map(function(a){return a[b]}).join("|");
if(-1===d.indexOf("true")||-1===d.indexOf("false")){var c={};c[b]=d;k.push(c)}a=k}}var d=new e.j.s;e.Ob();var a=[],k={};this.a=d.a;this.b=d.b;this.registerGlobalEventDispatcher=d.registerGlobalEventDispatcher;this.addRule=function(d){if("type"===Object.keys(d).shift()||"format"===Object.keys(d).shift())a.push(d);else return b("type"),b("format"),b("scalable"),b("maintainaspectratio"),a=a.concat([d]).reduce(function(b,a,d){var k=Object.keys(a).shift();k in b.keys?b.result[b.keys[k]]=a:(b.keys[k]=d,
b.result.push(a));return b},{result:[],keys:{}}).result,this};this.removeRule=function(b){a=a.filter(function(a){return Object.keys(a).shift()!==b})};this.U=function(){b("type");b("format");b("scalable");b("maintainaspectratio");return a};this.ib=function(){k=e.za();a.push({delivery:"progressive"});k=e.za();for(var b in k)k.hasOwnProperty(b)&&a.push({type:k[b].Fa});a.push({type:e.na});a.push({format:window.ois.MediaFileFormat.WIDE});a.push({width:5E3});a.push({bitrate:e.ba()||5E3});a.push({apiFramework:"VPAID"})};
this.ib()}function S(b,d){function a(a){"play"!==a.type||b.commercial||(f=!1);"pause"!==a.type||b.commercial||(f=!0)}function k(){aa.m(b,"timeupdate,ended",c);if(!1===X){t.log(805);aa.g(b,"timeupdate,ended",c);fa(y);b.load();w();var a=b.play();void 0!==a&&a.then(function(){},function(){});ca=!1}}function c(a){"timeupdate"===a.type&&0<b.seekable.length&&(X=!0,b.seekable.end(0)>=b.duration&&6E3!==b.duration&&100!==b.duration&&(t.log(803,b.duration),b.currentTime=b.duration,aa.g(b,"timeupdate",c)));
"ended"===a.type&&(t.log(804,a.type),fa(y),b.load(),w(),a=b.play(),void 0!==a&&a.then(function(){},function(){}),aa.g(b,"ended",c),ca=!1)}function x(){try{b.seekable.end(0)>=h&&0<b.currentTime&&(b.currentTime=h,aa.g(b,"timeupdate",x),t.log(801,h))}catch(a){t.log(802,a)}}function fa(a){a=e.Z(a);if(e.wb)for(var d=b.getElementsByTagName("source"),k=a.split("."),g,k=k[k.length-1],c=0;c<d.length;c++)if(g=d[c].src.split("."),g=g[g.length-1],g===k){d[c].src=a;return}b.src=a}function n(b,a){var d=null;window.getComputedStyle?
d=parseFloat(window.getComputedStyle(b,"").getPropertyValue(a)):b.currentStyle&&(d=parseFloat(b.currentStyle[a]));return d?d.toFixed(2)+"px":null}function g(b){z.triggerEvent(5010,b.type||void 0)}function m(){b.muted&&!1===r?(r=!0,z.triggerEvent(5020,!0)):b.muted||!0!==r||(r=!1,z.triggerEvent(5020,!1))}var h,y,ca=!1,X=!1,w,q,f,r=!1,aa,z=new e.j.s;this.h=function(a){if(a)switch(a){case "currentTime":return b.currentTime;case "duration":return b.duration;case "currentSrc":return b.currentSrc;case "currentSrcType":return"-unused-";
case "src":return b.src;case "controls":return b.controls;case "paused":return b.paused;case "volume":return b.volume;case "error":return b.error;default:return null}return{currentTime:b.currentTime,duration:b.duration,currentSrc:b.currentSrc,src:b.src,controls:b.controls,paused:b.paused,volume:b.volume,error:b.error}};this.ob=function(a){b&&(b.commercial=a)};this.l=function(a){if(a)switch(a){case "width":return Math.round(b.getBoundingClientRect().width);case "height":return Math.round(b.getBoundingClientRect().height);
case "top":return Math.round(b.getBoundingClientRect().top-document.body.getBoundingClientRect().top);case "left":return Math.round(b.getBoundingClientRect().left-document.body.getBoundingClientRect().left);default:return null}return{width:Math.round(b.getBoundingClientRect().width),height:Math.round(b.getBoundingClientRect().height),top:Math.round(b.getBoundingClientRect().top-document.body.getBoundingClientRect().top),left:Math.round(b.getBoundingClientRect().left-document.body.getBoundingClientRect().left)}};
this.M=function(){var a=b.pause();void 0!==a&&a.then(function(){},function(){})};this.O=function(){if(!f){var a=b.play();void 0!==a&&a.then(function(){},function(){})}};this.ja=function(a,d,g){t.log(806,a,d,g);y=e.gb(a)?a.url:a;q||(b.width||b.style.width||(b.style.width=n(b,"width")||"100%"),b.height||b.style.height||(b.style.height=n(b,"height")||"100%"),q=!0);e.I&&ca?k():(fa(y),b.load(),d&&(h=d,aa.m(b,"timeupdate",x)),g||(a=b.play(),void 0!==a&&a.then(function(){},function(){})))};this.oc=function(b,
a){t.log(807,b);ca=b;w=a};this.setControls=function(a){b.controls=a};this.getParent=function(){return d||b.parentNode};this.mb=function(){aa.g(b,"click",void 0)};this.m=function(a,d){aa.m(b,a,d)};this.g=function(a,d){aa.g(b,a,d)};this.getVideoSlot=function(){return b};this.a=z.a;this.b=z.b;this.registerGlobalEventDispatcher=z.registerGlobalEventDispatcher;this.destroy=function(){aa.g(b,"mousedown",void 0);aa.g(b,"timeupdate",x);aa.g(b,"volumechange",m);aa.g(b,"timeupdate,ended",c);aa.g(window,"resize,orientationchange",
g);aa.g(document,"mozfullscreenchange,webkitfullscreenchange",g);aa.g(b,"pause play",a)};aa=new e.j.Event;aa.m(window,"resize,orientationchange",g);aa.m(document,"mozfullscreenchange,webkitfullscreenchange",g);b.muted&&(r=!0);aa.m(b,"volumechange",m);aa.m(b,"pause play",a)}function T(b){function d(){fa.triggerEvent("AdStopped",void 0)}function a(b,a,d){m||(m=b);h||(h=a);y||(y=d)}function k(b){q=b?new window[r](m,h,X,y,g):new I.extensions[w](m,h,X,y,g);e.D(q.a)&&(q.a("PAUSEAD",ca),q.a("RESUMEAD",ca));
x.push(q)}var c,x=[],fa=new e.j.s,n,g=this,m,h,y,ca,X,w,q,f,t,r,z;this.a=fa.a;this.b=fa.b;this.ca=function(b,d,g){a(b,d,g);if(c&&!(1>c.length))for(b=0;b<c.length;b++)X=c[b],w=X.attributes[0].value,I.extensions[w]?k(!1):(f=h.v.vastExtensions,t=Object.getOwnPropertyNames(f),t.forEach(function(b){r=f[b].className||b;z=f[b].src;r===w&&(window[r]&&"function"===typeof window[r]?k(!0):z&&(b=e.createElement("script",{type:"text/javascript"}),document.head.appendChild(b),b.addEventListener("load",function(){k(!0)},
!1),b.src=z))}))};this.destroy=function(){if(0<x.length)for(var b=0;b<x.length;b++)x[b].destroy&&x[b].destroy();n&&n.b("AdStopped",d);ca=y=h=m=!1};this.onResize=function(){if(0<x.length)for(var a=0;a<x.length;a++)x[a].setViewport({width:b.l("width"),height:b.l("height")})};this.setup=function(b,a,k){c=b;ca=a;n=k;n.a("AdStopped",d);return g}}function G(b,d){function a(b){if(!A)return!1;if((b="fixedroll"===b?A.Aa():A.ia())&&b.StaticResource){var a=b.attributes.apiFramework?b.attributes.apiFramework:
"UNKNOWN";if(-1!=e.na.indexOf(b.resourceAttributes.creativeType.toLowerCase())&&"VPAID"==a.toUpperCase())return t.log(V),!0}else if(b&&b.apiFramework&&"VPAID"==b.apiFramework.toUpperCase())return!0;return!1}function k(){clearInterval(P);W=!1;P=setInterval(function(){N.Rb();var b=(new Date).getTime();void 0==G&&(G=b);b=parseInt(b-G,10)/1E3;A.qb(b);b>parseInt(d.overlayDuration,10)&&l()},250);W=!0;M.ya()}function c(b){ha=b.info;M&&(b.info?M.Sa():M.callUnmuteTracker());ga("AdVolumeChange",{isMuted:b.info})}
function x(a){a.info&&"fullscreen"===a.info&&M.callTracker("fullscreen");a.info&&"exitFullscreen"===a.info&&M.callTracker("exitFullscreen");L&&L.resizeAd(b.l("width"),b.l("height"),void 0);la.onResize()}function h(b){var a=b.type;"pause"===a&&b.target.currentTime>=b.target.duration||("play"===a&&0<b.target.currentTime&&(a="resume"),b=L?!0:!1,M&&!b&&M.callTracker(a))}function n(a){p();A=new Z(d,b);A.wc(ia);N=new O(b,A);N.a("AdClickThru",y);N.a("AdClickThruReject",y);N.a(2020,y);N.registerGlobalEventDispatcher(Y.C);
A.a(3010,y);A.a(3020,y);A.a(3030,y);A.a(3035,y);A.a(3050,y);A.a(3040,y);A.a(7E3,y);A.registerGlobalEventDispatcher(function(b){"AdTagSkipDetected"===b&&(J=!0,t.log(5100))});A.registerGlobalEventDispatcher(Y.C);b.m("play",h);b.m("pause",h);b.a(5020,c);b.a(5010,x);ga("AdSlotStart");"fixedroll"===F?A.hb(C.urls.shift(),C.responseXML):"overlay"===F&&a&&(null!==ka?(ka.nonLinearsTracker.impression=[],ka.gotLinear=!1,ka.companion=[],ka.companionsAsString=null,A.cc(ka),ka=null):A.hb(a))}function g(){y({type:"RESUMEAD"})}
function m(){M&&M.Fb();E()}function pa(d){ga(1030);a("fixedroll")?ja?L&&L.resumeAd():(L.startAd(),v=ja=!0,b.g("ended",E)):(b.oc(sa,r),b.ja(A.Ba(),d,!1),b.m("loadeddata",function wa(){b.g("loadeddata",wa);ga("AdStarted")}),sa=!1,r());qa||(qa=!0,ga("AdSlotStarted"));ga("START_LINEAR")}function y(c){t.log(201,c.type);M||(M=new U(b,d,A,F),M.registerGlobalEventDispatcher(Y.C),M.a("AdCapped"));M.Ha(A);switch(c.type){case "PAUSEAD":if(!W&&!v)break;S=!0;ga("AdPaused",!0);L?L.pauseAd():(b.M(),b.m("play",g));
ga(1010,!0);N.Va();break;case "RESUMEAD":S=!1;ga("AdPlaying",!0);L&&(L.resumeAd(),ga("onTrack","play"));if(S||b.h("paused"))b.g("play",g),b.O();N&&N.Gb();ga(1010,!1);b.setControls(!1);break;case 3010:M.Ha(A);c="fixedroll"===F?A.Aa():A.ia();a("fixedroll")||ga("AdLoaded",A.c());var B=A.J(),n=B.icons&&0<B.icons.length;A.c()&&B&&n&&(t.log(5050),Y.triggerEvent(4300,B.icons));ga("AdMediaSelected",c);f();"overlay"===F&&A.c().gotNonLinear?(N.Wb(),c=A.Mb(),D(c),N.nc(c),a("overlay")&&q("overlay"),k(),ga("START_NONLINEAR")):
"fixedroll"==F&&A.Ba()?(N.ca(),N.Ga(),J&&N.Xb(),N.a("SKIP",m),a("fixedroll")&&(N.Vb(),q("fixedroll"),ra&&L.nb(ra),b.g("ended",E),L.a("AdLoaded",function xa(){L&&(L.b("AdLoaded",xa),ta&&(L.startAd(),ja=!0))})),ta&&pa()):"fixedroll"!==F&&"overlay"!==F||X(200);la.ca(N,A,M);break;case "AdClickThru":ba();break;case "AdClickThruReject":b.setControls(!1);b.O();break;case 3020:B=!1;c.info&&(B=c.info.silent);B||(t.log(202,c.info),Y.triggerEvent("AdError",c.info||c.type));ca(c.info||c.type);B||u();break;case 2020:t.log(203);
M.Cb();l();break;case 3030:ka=c.info;break;case 3035:la.setup(c.info,y,ya);break;case 3050:M.callCustomTracker(c.info,"cappedImpression");break;case 3040:M.xa(302);break;case 7E3:X(303)}}function ca(b){var a=b.errorCode||b;b=b.errorURLTemplates;t.log(202,a);M&&M.xa({info:{errorCode:a,errorURLTemplates:b}})}function X(b){ca(b);Y.triggerEvent("AdSlotComplete");l()}function w(b){t.log(950,b.type);switch(b.type){case 6010:null!==M&&M.xa(901);L&&(L.b(6010,w),L=null);E();break;case 6020:ga(1030);break;
case 6030:ga(1020);break;case 6040:case 6050:E();break;case 6060:ba(b.info)}}function q(a){L=new K;L.a(6010,w);L.a(6020,w);L.a(6030,w);L.a(6040,w);L.a(6050,w);L.a(6060,w);L.a("AdVideoComplete",w);L.a(6070,c);L.registerGlobalEventDispatcher(Y.C);"overlay"===a?L.ca(A.ia(),N,b,M,A):L.Ub(A.Aa(),N,b,M,A)}function f(){var b=A.c().creatives.filter(function(b){return"companion"===b.type}).shift();b&&ga("AdCompanionsDetected",b)}function r(){clearInterval(oa);v=!1;b.m("ended",E);oa=setInterval(function(){var a=
(new Date).getTime();void 0==H&&(H=a);var a=b.h("currentTime"),d=b.h("duration");M&&M.handleTracking();Number.isFinite(d)&&A&&(A.qb(d-a),A.totalTime!==d&&A.mc(d))},250);v=!0}function aa(){if(A&&A.Bb()){t.log(5003);N&&N.destroy();N=new O(b,A);N.a("AdClickThru",y);N.a("AdClickThruReject",y);N.a(2020,y);N.registerGlobalEventDispatcher(Y.C);la.destroy();if(L){L.stopAd();setTimeout(function(){L=null;ja=!1;A.ka()},500);return}A.ka();return!0}return!1}function z(){M&&(!1===M.Ta()?setTimeout(z,16):(M.b("AdCapped"),
M=null,u()))}function E(){b.g("ended",E);L&&(L.b(6050,E),L=null,ja=!1);M?(M.handleTracking(),z()):u()}function u(){!N&&!A&!v||(clearInterval(oa),v=!1,ga("AdStopped"),aa()||(N&&N.destroy(),A&&A.destroy(),N=I.Ja=null,A=I.Ia=null,la&&la.destroy(),qa=!1,ga("AdSlotStopped"),ga("AdSlotComplete"),ga(1020)))}function l(){t.log(204,F);t.log(5005);p();e.urlEnrichment.setValueFor("errorCode","");if(L)L.stopAd();else if("overlay"==F||W)t.log(205,F),d.ta&&(d.overlayDuration=d.ta,delete d.ta),clearInterval(P),
W=!1,G=void 0,N.kc(),A.destroy(),N=I.Ja=null,A=I.Ia=null,e.ra&&ga(1010,!0);else if("fixedroll"===F){var b=function(){!1===M.Ta()?setTimeout(b,16):(ga("AdSlotComplete"),ga(1020))};clearInterval(oa);v=!1;H=void 0;N&&N.destroy();A&&A.destroy();N=I.Ja=null;A=I.Ia=null;la&&la.destroy();b()}}function p(){N&&(N.b("AdClickThru"),N.b("AdClickThruReject"),N.b(2020));A&&(A.b(3010),A.b(3020),A.b(3030),A.b(3035),A.b(3050),A.b(3040),A.b(7E3),A.G());b.g("play",h);b.g("pause",h);b.g("ended",E);b.b(5020,c);b.b(5010,
x)}function ga(b,a){Y.triggerEvent(b,a)}function D(b){b&&b.attributes&&b.attributes.minSuggestedDuration&&15<e.V(b.attributes.minSuggestedDuration)&&e.V(b.attributes.minSuggestedDuration)>d.overlayDuration&&(d.ta=d.overlayDuration,d.overlayDuration=e.V(b.attributes.minSuggestedDuration))}function ba(a){var d="_blank";window.envBlocked&&(d="_self");M.Ra();var k=A.J();if("fixedroll"===F&&(k.videoClickThroughURLTemplate||a)){a=a||k.videoClickThroughURLTemplate;if(!a||0===a.length||0===a.trim().length){g();
return}d=window.open(a,d);null!==d&&"undefined"!==typeof d&&(ga(1010,!0),N.Va())}else"overlay"===F&&(A.c().nonLinearsVideoclicks.url||a)&&(a=a||A.c().nonLinearsVideoclicks.url,window.open(a,d));b.setControls(!1);ga("AdClickThru",!0)}var Y=new e.j.s,M,N,A,L,oa,H,v=!1,P,G,W=!1,C,F,ka=null,J=!1,S,sa=!1,ia=new R,la=new T(b),ya=this,ta=!0,qa=!1,ra=null,ja=!1,ha;this.startLinear=function(b){pa(b)};this.startAd=function(b){F=(C=b)&&b.type?b.type:!1;return C?("fixedroll"===F?(!0===W&&l(),sa=!0,n()):"overlay"===
F&&C.urls[0]&&n(C.urls[0]),!0):!1};this.a=Y.a;this.b=Y.b;this.registerGlobalEventDispatcher=Y.registerGlobalEventDispatcher;this.G=Y.G;this.pa=function(b,a){var d=a||400;try{t.log(202,d),Y.triggerEvent("AdError",{errorCode:d}),ca(d)}catch(k){}b||E()};this.ea=function(){b&&b.destroy();E()};this.da=function(){return W};this.pauseAd=function(){y({type:"PAUSEAD"})};this.resumeAd=function(){y({type:"RESUMEAD"})};this.setAutoplay=function(b){ta=b};this.addRuleToRuleSet=function(b){ia&&ia.addRule(b)};this.removeRules=
function(b){if(ia)return ia.removeRule(b)};this.setVpaidAd=function(b){ra=b};this.setAdVolume=function(b){L&&L.setAdVolume(b)};this.getAdVolume=function(){return L?L.getAdVolume():b.h("volume")};this.getAdMutedState=function(){return ha};this.clickThrough=function(){if(!(A&&A.c()&&A.c().variant&&"commercial"!==A.c().variant&&"sponsored"!==A.c().variant||.5>b.h("currentTime"))){if("fixedroll"===F){var a=A.J().videoClickThroughURLTemplate;if(!a||0===a.length||0===a.trim().length)return}y({type:"PAUSEAD"});
ba()}};this.trackingController=function(){M||(M=new U(b,d,A,"fixedroll"),M.registerGlobalEventDispatcher(Y.C),M.a("AdCapped"));M.Ha(A);return M};this.resizeAd=function(b,a,d){L&&L.resizeAd(b,a,d)};this.skipAd=function(){L?L.skipAd():m()};this.getAdConfig=function(){return C};this.isVPAID=function(){return L?!0:!1};this.getVideoSlot=function(){return L?L.getVideoSlot():b.getVideoSlot()};this.getSlot=function(){return L?L.getSlot():document.createElement("div")};this.startAds=function(b){A||(F="unknown",
n());F="fixedroll";A.lc(b);A.ka()}}function Z(b,d){function a(b){t.log(301,b.type);m&&m.c()&&(ca=m.c());switch(b.type){case 4200:k(4200,b.info);break;case 7E3:pa.triggerEvent(7E3);break;case "AdTagParsed":k("AdTagParsed",b.info);if(ca.ads.length>aa&&ca.ads[aa].errorCode){k(3020,ca.ads[aa]);break}(b=g())?b&&r.fileURL&&(ca.ads[aa].creatives.filter(function(b){return"linear"===b.type}).shift().supportedMediaFiles=f.Ca(),k(3010)):(ca.ads[aa].errorCode=403,k(3020,ca.ads[aa]));break;case 4030:X=!0;w++;
c(ca.Zc);break;case "VAST-error":b.info&&b.info.rc||k(3020,b.info);break;case 4040:k(3030,e.clone(ca));break;case 4050:k(3035,ca.extensions);break;case 4100:k(3050,b.info)}}function k(b,a){pa.triggerEvent(b,a)}function c(b){var a;window.XDomainRequest?(t.log(303),a=new window.XDomainRequest):(t.log(304),a=new XMLHttpRequest);y=a;e.urlEnrichment.setValueFor("videoData",d.l());b=e.urlEnrichment.w(b);window.XDomainRequest?(y.onload=h,y.onerror=n,y.open("GET",b)):(y.open("GET",b,!0),e.qc(b)&&(y.withCredentials=
!0),y.onreadystatechange=x);y.send()}function x(){4==y.readyState&&(200==y.status?h():n())}function h(){var b=y.responseText;!1===X?(m=new W,m.registerGlobalEventDispatcher(pa.C),m.a("AdTagParsed",a),m.a("VAST-error",a),m.a(4030,a),m.a(4040,a),m.a(4050,a),m.a(4100,a),m.a(7E3,a)):!0===X&&(X=!1);m.kb(b)}function n(){k(3020,300)}function g(){f=new I.MediaSelector(z,q);f.Hb().sc();if(0<f.Ca().length){var b=f.Ca(),a=e.ba()||5E3,d=[],d=b.filter(function(b){return b.apiFramework&&"VPAID"===b.apiFramework.toUpperCase()}),
b=0<d.length?d:b,b=b.reduce(function(b,d){return Math.abs(d.bitrate-a)<Math.abs(b.bitrate-a)?d:b});b.fileURL=e.Z(b.fileURL);r.url=b.fileURL;r.type=b.mimeType;r.index=0;e.extend(r,b);"string"===typeof r.fileURL&&(e.urlEnrichment.setValueFor("assetUri",r.fileURL),r.fileURL=e.urlEnrichment.w(r.fileURL));return!0}e.urlEnrichment.setValueFor("assetUri",null);r.url=null;return!1}var m=null,pa=new e.j.s,y,ca={ads:[],videoClicks:{},tracker:[],linear:[],nonLinearsVideoclicks:{},nonLinearsTracker:[],nonLinears:[],
extensions:[],companion:[],companionsAsString:null,asString:null,duration:null,gotLinear:!1,gotNonLinear:!1,isCombi:!1,Mc:[]},X=!1,w=0,q=new R,f=null,r={url:null,index:null,type:null},aa=0,z=this;this.wc=function(b){q=b};this.U=function(){return q.U()};this.v=b;this.la=void 0;this.totalTime=ca.duration;this.hb=function(k,g){m=new W(b);m.a("AdTagParsed",a);m.a(4200,a);m.a("VAST-error",a);e.urlEnrichment.setValueFor("videoData",d.l());window.macroModel=e.urlEnrichment.getCurrentModel;m.gc(g?null:k,
g)};this.ia=function(){return this.c().creatives.filter(function(b){return"nonlinear"===b.type}).shift()};this.J=function(){return this.c().creatives.filter(function(b){return"linear"===b.type}).shift()};this.Mb=function(){return this.ia()};this.Aa=function(){return r};this.Ba=function(){return r.fileURL};this.qb=function(b){this.totalTime=ca.duration;this.la=ca.duration-b;k("AdRemainingTimeChange")};this.mc=function(b){this.totalTime=b;k("AdDurationChange")};this.cc=function(b){ca=e.clone(b);k(3010)};
this.destroy=function(){t.log(5006);null!==m&&(m.b("VAST-error"),m.b("AdTagParsed"),m.b(4030),m.b(4040),m.b(4100),m.b(7E3),m.G(),m=null);pa=null};this.a=pa.a;this.b=pa.b;this.registerGlobalEventDispatcher=pa.registerGlobalEventDispatcher;this.G=pa.G;this.c=function(){return ca.ads[aa]};this.lc=function(b){aa=-1;ca.ads=b};this.ka=function(){aa++;a({type:"AdTagParsed",info:ca})};this.Bb=function(){return aa<ca.ads.length-1}}function O(b,d){function a(){var a=b.l();aa="display:block;position:absolute;overflow:hidden;text-align:center;font-family:Arial,sans,Verdana;opacity:1;";
r="display:block;position:absolute;overflow:hidden;width:15px;height:15px;top:0px;left:"+a.width+"px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAALUlEQVQY02P4TyRgABMEAIpCbBpQ5JAV4GWjmwR3Ey6rSVJIlNUkeYZg8BADADDRv0FliZd9AAAAAElFTkSuQmCC) 50% 50% no-repeat;"}function k(a){var d=b.l("width"),k=b.l("height");if(f.width===d&&f.height===k)return a;t.log(401);a.P=parseInt(a.width,10);a.L=parseInt(a.height,10);a.ratio=a.P/a.L;f.width=d;f.height=k;"true"===a.scalable&&
"true"===a.maintainAspectRatio?a.P/d>=a.L/(k/5)?(a.P=d,a.L=a.P/a.ratio):(a.L=k/5,a.P=a.L*a.ratio):"true"===a.scalable&&"false"===a.maintainAspectRatio&&(a.L=k/5,a.P=d);a.width=Math.floor(a.P);a.height=Math.floor(a.L);return a}function c(a,d){var k=b.l();a.style.width=d.width+"px";a.style.height=d.height+"px";a.style.top=k.top+(k.height-d.height)+"px";a.style.left=k.left+(k.width/2-d.width/2)+"px"}function x(){return e.createElement("div",{id:"closeButton"+Math.round(1E6*Math.random()),style:r})}function h(){z&&
(D=b.h("duration"),p=b.h("currentTime"),1>=D&&(D=d.c().duration),z.update(p,D))}function n(){t.log(402);q.triggerEvent("AdClickThru",void 0)}function g(){u.onmousedown=function(){t.log(403);q.triggerEvent(2020,void 0)}}function m(){u.style.left=parseInt(E.style.width,10)-15+"px"}function pa(){if(E){var a=k(I);I=a;if(M){var a=E,d=b.l();a.style.width=d.width+"px";a.style.height=d.height+"px";a.style.top=d.top;a.style.left=d.left}else c(E,a);m()}}function y(){d.v.styles.closeButtonStyle&&e.sa(u,d.v.styles.closeButtonStyle)}
function ca(){setTimeout(function(){Y&&Y.setViewport(b.l());z&&z.setViewport(b.l());pa()},50)}function X(){q.triggerEvent("SKIP",void 0)}var w=b.getParent(),q=new e.j.s,f={},r,aa,z,E,u,I,l={},p,D,ba,Y,M=!1,N=new C(b.getParent());this.ca=function(){t.log(404);a();u=x();y();b.a(5010,ca)};this.Vb=function(){ba=e.createElement("div",{id:"vpaidSlot"+Math.round(1E6*Math.random()),style:"position:absolute;width:100%;height:100%;display:none"});(b.getParent().querySelector("video")||b.getParent()).insertAdjacentElement("afterend",
ba);var a=b.l();["left","top","width","height"].forEach(function(b){var d=a[b];if("left"===b||"top"===b)d=0;ba.style[b]=""+d+"px"})};this.Wb=function(){t.log(405);f={width:0,height:0};a();b.a(5010,ca)};this.Xb=function(){z=new v(w,d);z.setViewport(b.l());z.hide();z.a("SKIP",X)};this.Rb=function(){pa()};this.Ga=function(){d.a("AdRemainingTimeChange",h)};this.nc=function(a){e.ra&&!d.v.customControls&&b.setControls(!1);var Y=k(a.attributes),N=e.createElement("div",{id:"overlay"+Math.round(1E6*Math.random()),
style:aa}),h=null,fa;fa=b.l();I=Y;c(N,Y);if(a.StaticResource){var Y=a.resourceAttributes.creativeType.toLowerCase(),z=a.attributes.apiFramework?a.attributes.apiFramework:"UNKNOWN";-1!=e.na.indexOf(Y)&&"VPAID"==z.toUpperCase()?(M=!0,ba=e.createElement("div",{id:"vpaidSlot"+Math.round(1E6*Math.random()),style:"width:100%;height:100%"}),N.style.top=0,N.style.left=0,N.style.width=fa.width+"px",N.style.height=fa.height+"px",N.style.display="none",N.appendChild(ba)):(-1!=e.na.indexOf(Y)?h=e.createElement("script",
{src:a.StaticResource}):0<=Y.search(/^image|jpeg|gif|png/i)&&(h=e.createElement("img",{src:a.StaticResource,style:"width:100%;height:100%"})),null!=h&&N.appendChild(h))}else a.IFrameResource?(fa=e.createElement("div",{style:"position:absolute;width:100%;height:100%;background-color:rgba(0,0,0,0)"}),h=e.createElement("iframe",{id:"nonLinearIFrame",src:a.IFrameResource,style:"width:100%;height:100%"}),N.appendChild(fa),N.appendChild(h)):a.HTMLResource&&(h=e.createElement("div",{style:"width:100%;height:100%"}),
h.innerHTML=a.HTMLResource,N.appendChild(h));E=N;u=x();y();m();E.appendChild(u);w.appendChild(E);E.firstChild.addEventListener("mousedown",n,!1);g()};this.kc=function(){e.ra&&!d.v.customControls&&b.setControls(!0);try{w.removeChild(E)}catch(a){t.log(406)}b.b(5010)};this.destroy=function(){b.b(5010);d.b("AdRemainingTimeChange");z&&z.destroy();ba&&w.removeChild(ba);Y&&Y.destroy();q=null;b.mb()};this.Za=function(){return ba};this.$a=function(){b.l()};this.sb=function(){E?(E.removeChild(u),E.firstChild.removeEventListener("mousedown",
n,!1),E.style.display="block"):(b.mb(),ba.style.display="block")};this.dc=function(a){var d=["left","top","width","height"],k=b.l();E&&(M?d.forEach(function(b){E.style[b]=""+k[b]+"px"}):a?(Object.getOwnPropertyNames(l).length||d.forEach(function(b){l[b]=E.style[b]}),d.forEach(function(b){E.style[b]=""+k[b]+"px"})):d.forEach(function(b){E.style[b]=l[b]}))};this.Da=function(){return b.getParent()};this.K=function(){return N.K()};this.Va=function(){z&&z.hide()};this.Gb=function(){z&&z.show()};this.a=
q.a;this.b=q.b;this.registerGlobalEventDispatcher=q.registerGlobalEventDispatcher}function v(b,d){function a(){x.triggerEvent("SKIP")}function k(b){if(n.parent){var a=parseInt(window.getComputedStyle(n,null).getPropertyValue("height"),10),d="top"===c.skipButtonPosition?0:b.top+b.height-a,k=parseInt(window.getComputedStyle(n,null).getPropertyValue("width"),10);b="left"===m?0:b.width-k;n.style.width=k+"px";n.style.height=a+"px";n.style.top=d+"px";n.style.left=b+"px"}}var c=d.v,x=new e.j.s,h={},n,g=
c.styles,m,pa=!1;this.update=function(b,a){if(!pa){var k=e.fc(d.Ba().skipoffset,a);b>=k&&(this.show(),pa=!0)}};this.show=function(){n.style.display="block";k(h)};this.hide=function(){n.style.display="none"};this.destroy=function(){b.removeChild(n)};this.setViewport=function(b){h=b;k(h)};this.a=x.a;this.b=x.b;n=function(){var d=e.createElement("div",{id:"adSkipButton"+Math.round(1E6*Math.random()),style:"position:absolute;overflow:hidden;display:none;cursor:pointer;white-space: nowrap"});d.innerHTML=
"&nbsp;"+c.skipButtonText+"&nbsp;";e.sa(d,g.colorScheme);e.sa(d,g.fontStyle);m=d.style.textAlign="right"===g.fontStyle.textAlign?"left":"right";d.addEventListener(e.$b?"touchstart":"mousedown",a,!1);b&&b.appendChild(d);return d}()}function P(b){function d(b,a){function d(){for(var b=k.createElement(arguments[0]),a=1;a<arguments.length;a++){var g=arguments[a];if(g.split)g=k.createTextNode(g);else if("[object Object]"===Object.prototype.toString.call(g)){Object.keys(g).forEach(function(a){return b.setAttribute(a,
g[a])});continue}else if("[object Array]"===Object.prototype.toString.call(g)){g.forEach(function(a){b.appendChild(a)});continue}b.appendChild(g)}return b}var k=document.implementation.createDocument(null,"VAST",null);k.documentElement.setAttribute("version","3.0");b.map(function(b,c){var B=d("Ad",c<a?{sequence:c+1,fallbackOnNoAd:!0,fallbackType:"waterfall",allowMultipleAds:!1}:{},d("Wrapper",d("VASTAdTagURI",b)));k.documentElement.appendChild(B)});return k}function a(b,a){var d="";"string"==typeof b&&
(b={urls:[b]});if("string"==typeof b.urls||"string"==typeof b.tag)d=b.urls||b.tag,b.urls=[d];b.offset=a;return b}function k(a){if(b.overlay){for(var d=[],k=0;k<b.fixedrolls.length;k++){var c={urls:[b.overlay],offset:b.fixedrolls[k].offset+b.overlayDelay,limit:1,count:1,interval:-1,type:"overlay",requested:!1};c.offset<a&&d.push(c)}for(k=0;k<d.length;k++)b.fixedrolls.push(d[k]);b.fixedrolls.some(function(b){return 0==b.offset})||b.fixedrolls.push({urls:[b.overlay],offset:b.overlayDelay,limit:1,count:1,
interval:-1,type:"overlay",requested:!1})}}function c(){b.fixedrolls.sort(function(b,a){return b.offset>a.offset?1:b.offset<a.offset?-1:0})}var x=!1;this.vc=function(a){if(!x){for(var d=0;d<b.fixedrolls.length;d++){var g=b.fixedrolls[d];"string"==typeof g.offset&&(g.offset=parseInt(g.offset,10)/100*a)}d=[];for(g=0;g<b.fixedrolls.length;g++){var m=b.fixedrolls[g];if(5<=m.interval)for(var h=m.offset+m.interval;h<a-5;){var y=e.clone(m);y.offset=h;d.push(y);h+=m.interval}}b.fixedrolls=b.fixedrolls.concat(d);
if(a<b.minDurationForMidrolls){for(d=0;d<b.fixedrolls.length;d++)g=b.fixedrolls[d],0<g.offset&&g.offset<a&&b.fixedrolls.splice(d,1);t.log(602)}k(a);c();x=!0}};this.aa=function(a){a:{for(var d=0;d<b.fixedrolls.length;d++){var k=b.fixedrolls[d],c=a-k.offset;if(k.offset<=a&&2>=c&&!k.requested){k.requested=!0;a=k;break a}}a=!1}return a};this.reset=function(){for(var a=0;a<b.fixedrolls.length;a++)b.fixedrolls[a].requested=!1};this.bc=function(){return!0===b.fixedrolls[b.fixedrolls.length-1].requested};
this.Qb=function(a){return b.fixedrolls[b.fixedrolls.length-1].offset==a&&!1===b.fixedrolls[b.fixedrolls.length-1].requested};(function(){b.fixedrolls||(b.fixedrolls=[]);b.adResponse?b.fixedrolls.push({offset:0,responseXML:b.adResponse}):b.preroll&&(b.preroll=a(b.preroll,0),b.fixedrolls.push(b.preroll));b.midroll&&(b.midroll=a(b.midroll,"50%"),b.fixedrolls.push(b.midroll));b.postroll&&(b.postroll=a(b.postroll,"100%"),b.fixedrolls.push(b.postroll));b.overlay&&e.clone(b.overlay);for(var k=0;k<b.fixedrolls.length;k++){var c=
b.fixedrolls[k];if("string"==typeof c||0>parseInt(c.offset,10))t.log(601,c.offset);else{"object"==typeof c.tag&&(c.urls=c.tag);var g="";if("string"==typeof c.tag||"string"==typeof c.urls)g=c.tag||c.urls,c.urls=[g];if(c.count){g=c.urls[0];c.urls=[];for(var B=0;B<c.count;B++)c.urls.push(g.replace("[count]",B+1))}else c.count=1;"object"!=typeof c||"object"!=typeof c.urls||c.limit||(c.limit=c.urls.length);c.interval||(c.interval=-1);c.urls&&1<c.urls.length&&!c.responseXML&&(c.responseXML=d(c.urls,c.limit));
c.urls||(c.urls=[]);c.requested=!1;c.type="fixedroll"}}})()}function U(b,d,a,k){function c(b,a,d){if(b&&!isNaN(a)&&!isNaN(d)&&f)for(var k in b){var g=0===k.indexOf("progress-"),B=b[k].uc,m=g?parseFloat(k.split("progress-")[1]):NaN;g&&-1<k.indexOf("%")&&(m*=d/100);g&&!B&&m<=a&&(n(b[k],k,{}),b[k].uc=!0)}}function x(b,a,k){b&&a&&d.onTrack&&e.D(d.onTrack)&&(d.onTrack(b,a,k?k:""),h(k)&&(d.onTrack("capped",a),q.triggerEvent("AdCapped",void 0)));q.triggerEvent("onTrack",b)}function h(b){var a=e.isArray(b)?
Number(b[0]):Number(b);b="1010 1020 1030 1040 1050 1060 1070 2030".split(" ").some(function(b){return b==a});var d=["100","101","300","303","310"].some(function(b){return b==a});return b||d}function n(b,a,c){if(-1!==["impression","creativeView","start","error"].indexOf(a)||f)if(f||(f=!0),-1!==["start"].indexOf(a)&&(u=!0),-1===["mute","unmute"].indexOf(a)||u)if(-1===["complete","error"].indexOf(a)||r||(r=!0),-1!==["complete","error"].indexOf(a)||!r){var B=w.some(function(b){return b===a});B&&y[a]||
("progress"!==a&&(x(a,k,c),B&&(y[a]=d.lb?!0:!1)),b&&("progress"!==a&&t.log(701,a),g.$(b,a,c)))}}var g=this,m=a&&a.c()&&0<a.c().creatives.length?a.J().trackingEvents:[],q=new e.j.s,y={},ca=0,X=0,w="close closeLinear skip impression creativeView start firstQuartile midpoint thirdQuartile complete".split(" "),f=!1,r=!1,u=!1,aa=0;g.createTracker=function(b){var k,c;0!==(b.url||"").length&&(a&&e.urlEnrichment.setValueFor("timeOffset",a.totalTime-a.la),c=e.urlEnrichment.w(b.url),c=e.Z(c),(b.trackEvent&&
"error"===b.trackEvent||b.trackEvent&&"adPodErrorTracker"===b.trackEvent)&&b.info&&(c=e.urlEnrichment.errorCode(c,isNaN(b.info)?b.info.errorCode:b.info)),"https:"!==window.location.protocol||"https:"===window.location.protocol&&0!==(c+"").indexOf("http://")||!d.blockInsecureURL)&&(k=new Image,k.onload=g.createTrackerDone.bind(b,c),k.onerror=g.createTrackerDone.bind(b,c),aa++,k.src=c)};g.createTrackerDone=function(){aa--};g.$=function(b,a,d){for(var k=0;k<b.length;k++)"string"===typeof b[k]&&g.createTracker({url:e.Z(b[k]),
trackEvent:a,info:d})};g.Eb=function(){a&&a.c()&&a.c().errorURLTemplatesAdPod&&a.c().errorURLTemplatesAdPod.map(function(b){"preImpression"!==b.triggerOn||b.tracked||(b.tracked=!0,g.$(b.errorURLTemplates,"adPodErrorTracker",b.errorCode))})};g.Db=function(){a&&a.c()&&a.c().errorURLTemplatesAdPod&&a.c().errorURLTemplatesAdPod.map(function(b){"postComplete"!==b.triggerOn||b.tracked||(b.tracked=!0,g.$(b.errorURLTemplates,"adPodErrorTracker",b.errorCode))})};g.Tb=function(){return a&&a.c()&&a.c().errorURLTemplatesAdPod?
0<a.c().errorURLTemplatesAdPod.filter(function(b){return"postComplete"===b.triggerOn&&!b.tracked}).length:!1};g.Sa=function(){n(m.mute,"mute")};g.callUnmuteTracker=function(){n(m.unmute,"unmute")};g.xa=function(b){var d,k,c=!1;b&&b.info&&(k=b.info.errorURLTemplates,d=b.info.errorCode,c=b.info.rc);if(a&&a.c()&&a.c().errorURLTemplates||k)c?g.$(k||a.c().errorURLTemplates,"error",d||b):n(k||a.c().errorURLTemplates,"error",d||b)};g.Fb=function(){n(m.skip,"skip")};g.Cb=function(){n(m.close,"close")};g.Ra=
function(){n(a.J().videoClickTrackingURLTemplates,"clickTracking")};g.ya=function(){t.log(701,"Impression, CreativeView");g.Eb();a&&a.c()&&n(a.c().impressionURLTemplates,"impression");n(m.creativeView,"creativeView")};g.callTracker=function(b){n(m[b],b)};g.Hc=function(b){b.split("|").forEach(function(b){n(m[b.toLowerCase()],b)})};g.callCustomTracker=function(b,a){var c=[];e.isArray(b)?c=b:c.push(b);var B=w.some(function(b){return b===a});B&&y[a]||("progress"!==a&&(x(a,k),B&&(y[a]=d.lb?!0:!1)),c&&
("progress"!==a&&t.log(701,a),g.$(c,a,void 0)))};g.Ta=function(){return 0>=aa&&!g.Tb()};g.Ha=function(b){k="fixedroll";m=(a=b)&&b.c()&&0<a.c().creatives.length?b.J().trackingEvents:[];r=!1};g.handleTracking=function(a){var e;a="fixedroll"===k?b.h("currentTime"):a;var x="fixedroll"===k?b.h("duration"):parseInt(d.overlayDuration,10);a=+(Math.round(a+"e+1")+"e-1");x=+(Math.round(x+"e+1")+"e-1");X=a;"fixedroll"===k&&(ca+.3<X&&(ca=X,n(m.timeupdate,"timeupdate")),c(m,a,x));if(!(isNaN(x)||!isNaN(x)&&0>=
x)){if(a>=x)e="complete";else if(a>=x/(4/3))e="thirdQuartile";else if(a>=x/2)e="midpoint";else if(a>=x/4)e="firstQuartile";else if(a)g.ya(),n(m.start,"start");else return;w.some(function(b){return b===e})&&y[e]||!e||(n(m[e],e),"complete"===e&&g.Db())}};g.a=q.a;g.b=q.b;g.registerGlobalEventDispatcher=q.registerGlobalEventDispatcher;return g}function W(b){function d(b){var a=["flv","flash"],d=["rtmp"];b&&b.ads&&b.ads.map(function(b){b.creatives.map(function(b){b.mediaFiles&&(b.mediaFiles=b.mediaFiles.filter(function(b){var k=
0===a.filter(function(a){return-1<(b.mimeType||"").toLowerCase().indexOf(a)}).length,c=0===d.filter(function(a){return-1<(b.fileURL||"").toLowerCase().indexOf(a)}).length;return k&&c}))})})}function a(b){c.triggerEvent("VAST-error",b)}function k(b){g=x.c();switch(b.type){case "AdTagParsed":(g=x.c())&&g.bb&&g.bb.length&&(t.log(5050),c.triggerEvent(4300,g.bb));c.triggerEvent("AdTagParsed",g);break;case 4030:c.triggerEvent(4030);break;case "VAST-error":1020===b.info&&c.triggerEvent(7E3);c.triggerEvent("VAST-error",
b.info);break;case 4040:c.triggerEvent(4040);break;case 4100:c.triggerEvent(4100);break;case 4200:t.log(5052);c.triggerEvent(4200,b.info);break;case "AdTagSkipDetected":c.triggerEvent("AdTagSkipDetected",b.info)}}var c=new e.j.s,x=new window.VASTParser,h=null,n=null,g=null,m=null,q=null;x.addURLTemplateFilter(e.urlEnrichment.w);this.a=c.a;this.b=c.b;this.registerGlobalEventDispatcher=c.registerGlobalEventDispatcher;this.G=c.G;this.ka=function(){};this.c=function(){return q};this.gc=function(k,g){var m=
{withCredentials:!0};m.blockInsecureURL=b.blockInsecureURL;m.maxWrapperDepth=b.maxWrapperDepth;m.prefetchBuffets=b.prefetchBuffets;b.urlhandler&&(m.urlhandler=window[b.urlhandler]);!k&&g&&(m.response=g);x.addEventListener("VAST-error",a);x.parse(k,m,function(b,k){if(b)c.triggerEvent("VAST-error"),x.removeEventListener("VAST-error",a);else if(!b&&k){q=k;var g=q.ads.filter(function(b){return!1===b.fetched});(function(b){var a=g.length,d=0;if(0===a)return b();for(var k=0;k<g.length;k++){var c=g[k],B=
q.ads.indexOf(c);c.fetch(function(k){0<k.ads.length&&(q.ads[B]=k.ads[0]);d++;d>=a&&b()})}})(function(){d(q);c.triggerEvent("AdTagParsed",q)})}},[])};this.kb=function(b){h=b;var a;a:{a=h;try{if(window.DOMParser)m=(new DOMParser).parseFromString(a,"application/xml");else{var d=new ActiveXObject("Microsoft.XMLDOM");d.async=!1;d.loadXML(a);m=d}}catch(g){a=!1;break a}a=!0}a?(n=m.getElementsByTagName("VAST")[0].getAttribute("version"),n=null!==n&&""!==n&&n.length?n.charAt(0):""):c.triggerEvent("VAST-error");
if(!x){a=null;switch(n){case "2":a=I.Ac;break;case "3":a=I.Bc;break;default:c.triggerEvent("VAST-error",102)}a&&(x=null,x=new a,x.a("AdTagParsed",k),x.a("VAST-error",k),x.a(4030,k),x.a(4040,k),x.a(4050,k),x.a(4100,k),x.a(4200,k),x.a("AdTagSkipDetected",k))}x.kb(b)}}function K(){function b(){J=e.createElement("iframe",{style:"width:0;height:0;top:0;left:0;position:absolute;overflow:hidden;border:none; visibility:hidden;"});J.onload=d;R.insertBefore(J,R.firstChild)}function d(){J.ua=(J.contentDocument||
J.contentWindow.document).getElementsByTagName("body")[0];J.Ic=J.ua.parentNode.parentNode;var b=e.createElement("script",{type:"text/javascript"});b.innerHTML="var inDapIF = true;";J.ua.appendChild(b);Z=e.createElement("div",{id:ya,style:"position:absolute;width:100%;height:100%;top:0;left:0; background:rgba(0,0,0,1); display:none;"});R.appendChild(Z);Z=document.getElementById(ya)||R.ownerDocument.getElementById(ya);T=e.createElement("video",{id:qa,style:"position:absolute;width:100%;height:100%;top:0;left:0;display:none;"});
R.appendChild(T);T=document.getElementById(qa)||R.ownerDocument.getElementById(qa);S=e.createElement("div",{id:ta,style:"position:absolute;width:100%;height:100%;top:0;left:0;overflow:hidden;"});R.appendChild(S);S=document.getElementById(ta)||R.ownerDocument.getElementById(ta);O=new D(T,ra,Z,ha,wa.v.vpaidSingleVideoSlotMode);-1<V.indexOf(".swf")||(b=e.createElement("script",{src:e.urlEnrichment.w(V)}),b.onload=function(){k()},b.onerror=function(){v(6010)},J.ua.appendChild(b))}function a(){var b="normal",
a=JSON.stringify(wa.U());-1<V.indexOf("cdn.spotxcdn.com")&&(-1<a.indexOf(r.MediaFileFormat.VERTICAL)||-1<a.indexOf(r.MediaFileFormat.SQUARE))&&(b="dynamic");return b}function k(){if(!Q){var b=J.contentWindow.getVPAIDAd;if(e.D(b))Q=b();else return}if(c(Q)){t.log(961,Q.handshakeVersion("2.0"));-1==="1.1,2.0".indexOf(Q.handshakeVersion("2.0"))&&v(6010);var b={AdParameters:ka},d={slot:S,videoSlot:O.Ya(),videoSlotCanAutoPlay:!0,source:V};x();C=new H;C.pc(function(){t.log(1E3);v(6010)});var k=function(b){if(!b)return!1;
var a=b.style.width;b=/scale|transform/gi.test(b.style.cssText);return!!parseInt(a,10)&&-1===a.indexOf("%")&&!b},g,ba;k(S)?(g=parseInt(S.style.width,10),ba=parseInt(S.style.height,10)):k(R)?(g=parseInt(R.style.width,10),ba=parseInt(R.style.height,10)):k(R.parentNode)&&(g=parseInt(R.parentNode.style.width,10),ba=parseInt(R.parentNode.style.height,10));var A=ha.getVideoSlot();k(A)?(g=parseInt(A.style.width,10),ba=parseInt(A.style.height,10)):k(A.parentNode)&&(g=parseInt(A.parentNode.style.width,10),
ba=parseInt(A.parentNode.style.height,10));Ta=a();xa.initAd(g,ba,Ta,300,b,d)}else t.log(962)}function c(b){for(var a="handshakeVersion initAd startAd stopAd skipAd resizeAd pauseAd resumeAd expandAd collapseAd subscribe unsubscribe getAdLinear".split(" "),d=0;d<a.length;d++)if(!e.D(b[a[d]]))return!1;return!0}function x(){var b={AdStarted:h,AdStopped:n,AdSkipped:g,AdLoaded:m,AdLinearChange:q,AdSizeChange:y,AdExpandedChange:f,AdSkippableStateChange:X,AdDurationChange:w,AdRemainingTimeChange:u,AdVolumeChange:I,
AdImpression:l,AdClickThru:aa,AdInteraction:z,AdVideoStart:E,AdVideoFirstQuartile:p,AdVideoMidpoint:U,AdVideoThirdQuartile:K,AdVideoComplete:ga,AdUserAcceptInvitation:F,AdUserMinimize:ba,AdUserClose:Y,AdPaused:M,AdPlaying:N,AdError:A,AdLog:L},a;for(a in b)Q.subscribe(b[a],a,xa)}function h(){t.log(967);da.callTracker("creativeView");Q.getAdLinear()&&(O.show(),T.volume=ha.h("volume"),P=T.volume);v("AdStarted")}function n(){clearTimeout(Fa);if(Q){var b={AdStarted:h,AdStopped:n,AdSkipped:g,AdLoaded:m,
AdLinearChange:q,AdSizeChange:y,AdExpandedChange:f,AdSkippableStateChange:X,AdDurationChange:w,AdRemainingTimeChange:u,AdVolumeChange:I,AdImpression:l,AdClickThru:aa,AdInteraction:z,AdVideoStart:E,AdVideoFirstQuartile:p,AdVideoMidpoint:U,AdVideoThirdQuartile:K,AdVideoComplete:ga,AdUserAcceptInvitation:F,AdUserMinimize:ba,AdUserClose:Y,AdPaused:M,AdPlaying:N,AdError:A,AdLog:L},a;for(a in b)Q.unsubscribe(b[a],a)}t.log(966);O.hide();"nonLinear"===Da&&ha.h("paused")&&ha.O();v(6050)}function g(){t.log(965);
da.callTracker("skip");xa.stopAd()}function m(){ja&&ja.sb();t.log(964);C.log("onadloaded");v("AdLoaded",wa.c())}function q(){t.log(951,Q.getAdLinear());Q.getAdLinear()?(ha.M(),O.show()):(O.hide(),ha.O())}function y(){t.log(952,Q.getAdWidth(),Q.getAdHeight())}function f(){t.log(953,Q.getAdExpanded());ja.dc(Q.getAdExpanded());Q.getAdExpanded()?(ha.M(),da.callTracker("expand")):(ha.O(),da.callTracker("collapse"))}function X(){t.log(954,Q.getAdSkippableState());v("AdSkippableStateChange",Q.getAdSkippableState())}
function w(){t.log(955,Q.getAdDuration())}function u(){t.log(956,Q.getAdRemainingTime())}function I(){t.log(957,Q.getAdVolume());0<Q.getAdVolume()&&0===P?(da.callUnmuteTracker(),P=Q.getAdVolume()):0===Q.getAdVolume()&&0<P&&(P=0,da.Sa())}function l(){t.log(963);da.ya()}function aa(b,a,d){t.log(968,b,a,d);d||!d&&!b?(Sa=e.Zb(b)?b:void 0,S.addEventListener("mousedown",oa,!1),O.m("play",oa),O.pause(),t.log(402),O&&O.setControls(!0),v(6060,Sa)):da.Ra()}function z(b){t.log(972,b);da.callTracker("interaction")}
function E(){t.log(973);da.callTracker("start")}function p(){t.log(974);da.callTracker("firstQuartile")}function U(){t.log(975);da.callTracker("midpoint")}function K(){t.log(976);da.callTracker("thirdQuartile")}function ga(){t.log(977);da.callTracker("complete");clearTimeout(Fa);Fa=setTimeout(function(){L("Force stop after video completion.");xa.stopAd()},2E3)}function F(){t.log(978);da.callTracker("acceptInvitation")}function ba(){t.log(979);da.callTracker("collapse")}function Y(){t.log(981);da.callTracker("close");
v(6040)}function M(){t.log(980);C.log("onadpaused");G||da.callTracker("pause");v("AdPaused");G=!0}function N(){t.log(982);C.log("onadplaying");G&&da.callTracker("resume");v("AdPlaying");G=!1}function A(b){t.log(958,b);v(6010,b)}function L(b){t.log(959,b)}function oa(){if(O){O.g("play",oa);var b=O.play();void 0!==b&&b.then(function(){},function(){})}S.removeEventListener("mousedown",oa,!1)}function v(b,a){W.triggerEvent(b,a)}var P,W=new e.j.s,C;P=void 0;var G=!1,J,V,ka,S,R,T,O,Z,ya="videoSlotBackground"+
Math.round(1E6*Math.random()),ta="vpaidSlot"+Math.round(1E6*Math.random()),qa="videoSlot"+Math.round(1E6*Math.random()),ra,ja,ha,da,Da,wa,Sa,xa=this,Ta="normal",Fa=null,Q;this.ca=function(a,d,k,c,g){V=a.StaticResource;ka=a.adParameters;ja=d;ha=k;da=c;R=d.Za();ra=ha.getVideoSlot();wa=g;G=!1;d.Da();b();Da="nonLinear"};this.Ub=function(a,d,k,c,g){t.log(1001,g.v.vpaidSingleVideoSlotMode);V=a.fileURL;ka=a.adParameters;ja=d;ha=k;da=c;R=d.Za();ra=ha.getVideoSlot();wa=g;G=!1;d.Da();b();Da="linear"};this.initAd=
function(b,a,d,k,c,g){G=!1;t.log(1002,b,a,d,k,c,g);Q.initAd(b,a,d,k,c,g)};this.startAd=function(){t.log(1003);Q&&(ja.sb(),Q.startAd())};this.pauseAd=function(){t.log(1004);Q&&Q.pauseAd&&Q.pauseAd()};this.resumeAd=function(){t.log(1006);Q&&Q.resumeAd&&Q.resumeAd()};this.stopAd=function(){t.log(1008);clearTimeout(Fa);Q&&Q.stopAd()};this.setAdVolume=function(b){t.log(1009,b);Q&&Q.setAdVolume&&Q.setAdVolume(b)};this.getAdVolume=function(){return Q&&Q.setAdVolume?Q.getAdVolume():-1};this.resizeAd=function(b,
a,d){t.log(1010,b,a,d);Q&&(O&&"linear"===Da?(Q.resizeAd(b,a,d),R.style.cssText+="width:"+parseInt(b,10)+"px;height:"+parseInt(a,10)+"px;"):Q.resizeAd(b,a,d))};this.expandAd=function(){t.log(1011);Q.expandAd()};this.collapseAd=function(){t.log(1012);Q.collapseAd()};this.skipAd=function(){t.log(1013);Q.getAdSkippableState()&&Q.skipAd()};this.Ga=function(){t.log("Called dead code updateCountdown() in VPAIDBridge#639")};this.nb=function(b){b&&(t.log(1015),Q=b,O?k():setTimeout(this.nb.bind(this,b),50))};
this.getSlot=function(){return S};this.getVideoSlot=function(){return O.Ya()};this.a=W.a;this.b=W.b;this.registerGlobalEventDispatcher=W.registerGlobalEventDispatcher}function H(){function b(b,c){d.forEach(function(e){"INITAD"===e.event&&(e.active=!0,e.W=c,e.Y=b,e.o=window.setTimeout(function(){d.forEach(function(b){"INITAD"===b.event&&b.active&&(b.active=!1,window.clearTimeout(b.o),a.map(function(a){if(a.time>=b.W&&a.time<=b.W+b.timeout)return a}).some(function(a){return a.event===b.ha?!0:!1})||
b.Y())})},e.timeout))})}var d=[{active:!1,event:"INITAD",ha:"ONADLOADED",timeout:4E3,o:null,W:null,Y:null},{active:!1,event:"RESIZEAD",ha:"ONADSIZECHANGED",timeout:1E3,o:null,W:null,Y:null},{active:!1,event:"PAUSEAD",ha:"ONADPAUSED",timeout:100,o:null,W:null,Y:null},{active:!1,event:"RESUMEAD",ha:"ONADPLAYING",timeout:100,o:null,W:null,Y:null}],a=[];this.log=function(b){a.push({time:(new Date).getTime(),event:b.toUpperCase()})};this.pc=function(d){var c=(new Date).getTime();b(d,c);a.push({time:c,
event:"INITAD"})}}function D(b,d,a,k,c){var x=new e.j.s,h,n,g;this.l=function(b){if(c)return k.l(b);if(b)switch(b){case "width":return e.getWidth(g);case "height":return e.getHeight(g);case "top":return g.offsetTop;case "left":return g.offsetLeft;default:return null}return{width:e.getWidth(g),height:e.getHeight(g),top:g.offsetTop,left:g.offsetLeft}};this.show=function(){c||(g.style.display="block",a.style.display="block",d.style.visibility="hidden")};this.hide=function(){c||(d.style.visibility="visible",
g.style.display="none",a.style.display="none")};this.Ga=function(){};this.pause=function(){g.pause()};this.play=function(){var b=g.play();void 0!==b&&b.then(function(){},function(){})};this.setControls=function(b){c?k.setControls(b):g.controls=b};this.m=function(b,a){n.m(g,b,a)};this.g=function(b,a){n.g(g,b,a)};this.a=x.a;this.b=x.b;this.Ya=function(){return h};this.getSlot=function(){return g};(function(){n=new e.j.Event;c?(g=d,a.parentNode.removeChild(a),b.parentNode.removeChild(b),h=new u(g),h=
e.extend(h,{rb:function(b){k.ja({url:b})},setControls:function(b){k.setControls(b)},pb:function(b){k.ja({url:k.h.currentSrc},b)},load:function(){},play:function(){k.O()},pause:function(){k.M()}})):(g=b,h=new u(g))})()}function u(b){function d(b,a,d,k){var c=Object.getOwnPropertyDescriptor(b,a);if(c&&c.configurable){var g;if(c.get||c.set)g=c;else{var B=c.value;g={get:function(){return B},set:function(b){B=b}}}var e=d?function(){return d.call(this,a,g)}:g.get,m=k?function(b){k.call(this,a,b,g)}:g.set;
Object.defineProperty(b,a,{get:g.get?e:void 0,set:g.set?m:void 0,enumerable:c.enumerable,configurable:!0})}}function a(b){if("ownerDocument"==b)return document.createElement("iframe").ownerDocument;g[b]=X[b];return g[b]}function k(b,a){for(var d=m,k=d.length,c=!1;0<=--k;)if(d[k]===b){c=!0;break}if(!c&&"style"!==b){g[b]=a;switch(b){case "src":f.rb(a);return;case "controls":f.setControls(a);return;case "currentTime":f.pb(a);return}X[b]=g[b]}}function c(){for(var b=n,a=b.length;0<=--a;)g[b[a]]=X[b[a]]}
function x(b){y.ic(b.type,b);c()}var h="loadstart emptied canplaythrough ended ratechange progress stalled playing durationchange volumechange suspend loadedmetadata waiting timeupdate abort loadeddata seeking play error canplay seeked pause".split(" "),n="type ownerDocument nodeType tagName error crossOrigin buffered currentTime paused played autoplay controller muted videoTracks height poster src networkState readyState duration defaultPlaybackrate seekable loop controls defaultMuted textTracks videoWidth currentSrc preload seeking startDate playbackRate ended mediaGroup volume audioTracks width videoHeight".split(" "),
g={},m="error crossOrigin buffered paused played autoplay controller videoTracks height networkState readyState duration defaultPlaybackrate seekable loop defaultMuted textTracks videoWidth currentSrc preload seeking startDate playbackRate ended mediaGroup audioTracks width videoHeight".split(" "),q,y,f=this,X;this.setAttribute=function(b,a){"type"!==b&&"src"!==b&&-1===b.indexOf("data-")||X.setAttribute(b,a)};this.getElementsByTagName=function(b){return X.getElementsByTagName(b)};this.getAttribute=
function(b){return X.getAttribute(b)};this.removeAttribute=function(b){return X.removeAttribute(b)};this.rb=function(b){X.src=b};this.setControls=function(b){X.controls=!!b};this.pb=function(b){X.currentTime=b};this.play=function(){var b=X.play();void 0!==b&&b.then(function(){},function(){})};this.pause=function(){X.pause()};this.load=function(){X.load()};this.canPlayType=function(b){return X.canPlayType(b)};this.tagName=b.tagName;this.getBoundingClientRect=function(){return b.getBoundingClientRect()};
this.destroy=function(){q.g(X,h.join(","),x)};this.addEventListener=function(b,a){X.parentNode.querySelector('[id^="vpaidSlot"] > [id^="vpaidSlot"] > ias-ad')&&["touchstart","touchstart","click"].indexOf(-1<(b+"").toLowerCase())&&X.parentNode.querySelector('[id^="vpaidSlot"] > [id^="vpaidSlot"] > iframe').contentWindow.document.body.addEventListener(b,a);y.a(b,a)};this.removeEventListener=function(b,a){y.jc(b,a)};this.dispatchEvent=function(b){X.dispatchEvent(b)};this.getComputedStyle=function(b){return window.getComputedStyle(X,
b||null)};this.appendChild=function(){};this.removeChild=function(){};this.Yb="goog_596272282";(function(){X=b;y=new e.j.s;q=new e.j.Event;q.m(X,h.join(","),x);c();for(var m=n,r=m.length;0<=--r;)f[m[r]]=g[m[r]];f.style={};m=n;for(r=m.length;0<=--r;)d(f,m[r],a,k);d(f,"style",a,k);X.setAttribute("data-proxyTag",this.Yb)})()}c.prototype.debug=!1;c.prototype.log=function(){return null};window.InstreamapiDebug=c;var V={level:0,method:"AdControl",Pc:"NonLinear VPAID detected."},I={extensions:{},view:{}};
f.prototype={constructor:f,apply:function(b){b.addEventListener=f.prototype.addEventListener;b.ab=f.prototype.ab;b.removeEventListener=f.prototype.removeEventListener;b.dispatchEvent=f.prototype.dispatchEvent},addEventListener:function(b,d){this.F||(this.F={});var a=this.F;a[b]||(a[b]=[]);-1===a[b].indexOf(d)&&a[b].push(d)},ab:function(b,d){if(!this.F)return!1;var a=this.F;return a[b]||-1===a[b].indexOf(d)?!1:!0},removeEventListener:function(b,d){if(this.F){var a=this.F[b];if(a){var k=a.indexOf(d);
-1!==k&&a.splice(k,1)}}},dispatchEvent:function(b){if(this.F){var d=this.F[b];if(d){for(var a=d.length,k=[],c=0,c=0;c<a;c++)k[c]=d[c];for(d=0;d<a;d++)(k[d]||function(){}).apply(this,[].slice.call(arguments))}}}};var e=function(b){b.tb={mp4:{typeExtension:"mp4",typeString:"video/mp4",Fa:"video/mp4|video/x-mp4"},ogv:{typeExtension:"ogv",typeString:"video/ogg",Fa:"video/ogg"},webm:{typeExtension:"webm",typeString:"video/webm",Fa:"video/webm"}};b.na="application/javascript|application/x-javascript|text/javascript";
b.Jc="application/x-shockwave-flash";b.urlEnrichment=new l;b.Lc=function(){return[I.IDENTIFIER,I.API_VERSION,I.API_BUILD].join("|")};b.gb=function(b){return"[object Object]"===Object.prototype.toString.call(b)};b.isArray=function(b){return"[object Array]"===Object.prototype.toString.call(b)};b.Zb=function(b){return"[object String]"===Object.prototype.toString.call(b)};b.D=function(b){return"[object Function]"===Object.prototype.toString.call(b)};b.B=function(b){return""!=b&&null!=b&&void 0!=b};b.Nc=
function(b){return"string"===typeof b&&b.length?Number(b):!1};b.Oc=function(b){b&&b.trim&&(b=b.trim());return!!b&&-1===["http://","https://"].indexOf(b)};b.Sc=function(b){var a={};b.split("?")[1].split("&").forEach(function(b){b=b.split("=");a[decodeURIComponent(b[0])]=decodeURIComponent(b[1])||null});return a};b.za=function(){var b=document.createElement("video"),a=[],k=e.tb,c={},x;for(x in k)k.hasOwnProperty(x)&&(k[x].result=b.canPlayType(k[x].typeString),a.push(k[x].typeExtension+":"+k[x].result),
""!==k[x].result&&(c[x]=k[x]));t.log(901,a.join(", "));return c};b.tc=function(b){var a="";/\?/.test(b)&&(b=b.split("?"),b=b[0]);var k=b.split("."),k=k[k.length-1];["mp4","ogv","webm"].forEach(function(b){k===b&&(a=b)});return a};b.ba=function(){return b.La?500:b.Ab?1E3:b.zb?1700:0};b.unique=function(b){return b.reduce(function(b,d){0>b.indexOf(d)&&b.push(d);return b},[])};b.clone=function(d){if(!d||"object"!=typeof d)return d;var a=new d.constructor,k;for(k in d)d.hasOwnProperty(k)&&(a[k]=b.clone(d[k]));
return a};b.extend=function(b,a){for(var k in a)a.hasOwnProperty(k)&&(b[k]=a[k]);return b};b.$b="ontouchstart"in window||"ontouchstart"in document.documentElement;b.Ma=!1;b.u=navigator.userAgent;b.wb=/MSIE/.test(b.u);b.Ec=/Opera/.test(b.u);b.xb=/mobile/i.test(b.u);b.Ka=/android/i.test(b.u);b.Uc=function(){["HTC Sensation","HTC Sense"].forEach(function(d){(new RegExp(d,"i")).test(b.u)&&(b.Ma=!0)})}();b.I=b.Ka&&/mobile/i.test(b.u)&&!(/chrome/i.test(b.u)&&/Mobile Safari/.test(b.u))&&!b.Ma;b.Ab=b.I||
/iPad/i.test(b.u);b.zb=/TV/.test(b.u);b.ra=/iP(hone|ad|od)/i.test(b.u);b.La=b.I||/iP(hone|od)/i.test(b.u);b.Cc=b.Ka&&/chrome/i.test(b.u);b.yb=/Mobile Safari/.test(b.u);b.Dc=!/chrome/i.test(b.u)&&/android/i.test(b.u)&&/safari/i.test(b.u)&&(!b.xb||b.yb);b.cb=function(b){return!!b.externalConfigXml};b.j=function(){};b.j.s=function(){var b=[],a=null;this.C=function(b,d){if(null!==a)for(var c=0;c<a.length;c++)a[c](b,d)};this.registerGlobalEventDispatcher=function(b){null===a&&(a=[]);a.push(b)};this.G=
function(){a=null};this.a=function(a,c){b.push({event:a,listener:c})};this.b=function(a){for(var c=0;c<b.length;c++)b[c].event===a&&b.splice(c,1)};this.jc=function(a,c){for(var e=0;e<b.length;e++){var h=c?b[e].listener===c:!0;b[e].event===a&&h&&b.splice(e,1)}};this.triggerEvent=function(a,c){this.C(a,c);for(var e=0;e<b.length;e++){var h=b[e];h.event===a&&"function"===typeof h.listener&&h.listener({type:a,info:c})}};this.ic=function(a,c){for(var e=0;e<b.length;e++){var h=b[e];h.event===a&&"function"===
typeof h.listener&&h.listener(c)}}};b.j.Event=function(){var b=[];this.m=function(a,k,c){if(a){k=k.split(",");for(var e=0;e<k.length;e++)"function"===typeof a.addEventListener?a.addEventListener(k[e],c,!1):"function"===typeof a.attachEvent&&a.attachEvent("on"+k[e],c),b.push({target:a,Wa:k[e],Sb:c})}};this.g=function(a,k,c){if(c)if(k=k.split(","),"all"===k[0])for(k=0;k<b.length;k++)b[k].target===a&&b[k].Sb===c&&("function"===typeof a.removeEventListener?a.removeEventListener(b[k].Wa,c):"function"===
typeof a.detachEvent&&a.detachEvent("on"+b[k].Wa,c),b.splice(k,1));else{for(var e=0;e<k.length;e++)"function"===typeof a.removeEventListener?a.removeEventListener(k[e],c):"function"===typeof a.detachEvent&&a.detachEvent("on"+k[e],c);b=[]}}};b.qa=function(d){function a(){h.triggerEvent("timeupdate",{id:k,data:e})}var k,c,e=null,h=new b.j.s;this.start=function(){k=setInterval(a,c)};this.stop=function(){clearInterval(k)};this.__defineSetter__("data",function(b){e=b});this.a=h.a;this.b=h.b;c=d};b.createElement=
function(d,a){var c;try{c=document.createElement(d)}catch(e){c=document.createElement("<"+d+">")}if(a){"id"in a||c.setAttribute("id",b.Ua());for(var h in a)a.hasOwnProperty(h)&&c.setAttribute(h,a[h])}return c};b.sa=function(b,a){if(b)for(var c in a)b.style[c]=a[c]};b.wa=function(d,a){return b.B(d)?d.getElementsByTagName(a):[]};b.S=function(d,a){if(b.B(d))return d.getElementsByTagName(a)[0]};b.T=function(d){if(!d||!d.childNodes[0])return!1;for(var a=d.childNodes.length,c="",e="",h=!1;a--;)if(4===d.childNodes[a].nodeType){e=
b.trim(d.childNodes[a].nodeValue);break}else 3===d.childNodes[a].nodeType&&(c=b.trim(d.childNodes[a].nodeValue));1<d.childNodes.length&&(e=d.textContent);""!==e?h=e:""!==c&&(h=c);return h};b.Kb=function(b){if(!b)return!1;for(var a={},c=0;c<b.attributes.length;c++)a[b.attributes[c].name]=b.attributes[c].value;return a};b.trim=function(b){return b.replace(/^\s+|\s+$/g,"")};b.ma=function(d,a){var c=d,e;for(e in a)a.hasOwnProperty(e)&&b.B(a[e])&&(c=c.replace(String(e),String(a[e])));return c};b.Ua=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,
function(b){var a=16*Math.random()|0;return("x"==b?a:a&3|8).toString(16)}).toUpperCase()};b.V=function(b){var a=0,c=b.split(".")[0],c=b.split(":").reverse();for(b=0;b<c.length;b++)a+=parseInt(c[b]*Math.pow(60,b),10);return a};b.fc=function(d,a){if(!d)return d;var c=!(!d||-1===d.indexOf("%")),e=parseInt(d,10),h;return a&&c?("string"===typeof a?h=b.V(a.split(".")[0]):isNaN(a)||(h=parseInt(a,10)),h&&!isNaN(e)?e/100*h:"IGNORE"):isNaN(d)?b.V(d.split(".")[0]):d};b.qc=function(d){return b.B(d)?0<["doubleclick",
"smartclip.net","adtech","userreport.com"].filter(function(b){return-1<d.indexOf(b)}).length:!1};b.Ob=function(){var b=window,a=document,b={innerWidth:[b.innerWidth,a.body.clientWidth,a.documentElement.clientWidth],innerHeight:[b.innerHeight,a.body.clientHeight,a.documentElement.clientHeight],scrollX:[b.scrollX,a.documentElement.scrollLeft,a.body.scrollLeft],scrollY:[b.scrollY,a.documentElement.scrollTop,a.body.scrollTop]},c;for(c in b)if(b.hasOwnProperty(c)){for(a=0;a<b[c].length;a++)"number"!==
typeof b[c][a]&&(b[c].splice(a,1),a--);b[c]=b[c][0]}};b.getWidth=function(b){return!b||b&&!b.getBoundingClientRect?-1:b.getBoundingClientRect().width};b.getHeight=function(b){return!b||b&&!b.getBoundingClientRect?-1:b.getBoundingClientRect().height};b.isDocumentInFullScreenMode=function(){return document.Ib&&null!==document.Ib||document.mozFullScreen||document.webkitIsFullScreen};b.Wc=function(b){for(var a=window.frameElement,c=window;a;)(b||function(){})(a),c=a.ownerDocument.defaultView,a=c.frameElement;
return c};b.fb=function(){return window!==top};b.eb=function(){return!b.fb()||b.fb()&&null!==window.frameElement};b.Z=function(b){if(0===b.indexOf("//")){var a=location.protocol;"file:"===a&&(a="https:");b=a+b}return b};return b}(e||{}),t=new c,h=[],q=[];e.find=function(b,d){return Array.prototype.map.call((d||document).querySelectorAll(b),function(b){return b})};e.D=function(b){var d=Object.prototype.toString.call(b);return"[object Function]"===d||"function"===typeof b&&"[object RegExp]"!==d||"undefined"!==
typeof window&&(b===window.setTimeout||b===window.alert||b===window.confirm||b===window.prompt)};e.ac=function(b){return e.D(b.canPlayType)&&e.D(b.play)};var r=window.ois=function d(a,c,B){if(e.D(a))return h.forEach(function(d){a(d.fa,d.element,d.ec,{adManager:d.adManager,config:d.Qc})}),q.push(a);if("number"===typeof a||"undefined"===typeof a)return h[a||0].fa;if(a.nodeType)return null!==a.getAttribute("data-ois-instance-id")?(B=h[a.getAttribute("data-ois-instance-id")],c&&B.v.oa(c),B.fa):c?p(a,
c,B):null;if(e.ac(a))return a.nodeType="ois",d(a,c,B);if("string"===typeof a){var x=e.find(a)[0];return x&&d(x,c,B)}return null};r(function(d,a,c,B){var x=B.adManager,q=B.v;d.load=function(){};d.shutdown=function(){x.destroy();delete h[a.getAttribute("data-ois-instance-id")];a.removeAttribute("data-ois-instance-id")};d.registerVASTExtension=function(a,d){window[a]=d;var c=q.Lb();c.vastExtensions[a]=!0;q.oa(c)};d.utils=e;return d});r(function(d){function a(c,k){d.unsubscribe(a,"AdTagParsed");if((!k||
0!==k.ads.length)&&k){for(var g=n=0;g<k.ads.length;g++){var e=k.ads[g].creatives.filter(function(a){return"linear"===a.type}).shift();e&&!e.errorCode&&(n+=e.duration?e.duration:20)}0===n&&(n=-1)}}function c(){"commercial"===d.getVariant()&&q!==this.duration&&0<n&&(n=n-q+this.duration)}var e=null,h=-1,q=-1,n=-1,g=-1,m=null;d.subscribe(function(){m=d.getVideoSlot();m.addEventListener("loadedmetadata",c)},"AdSlotStart");d.subscribe(function(){d.subscribe(a,"AdTagParsed");m&&m.removeEventListener("loadedmetadata",
c)},"AdSlotComplete");d.subscribe(function(a,d){e=new Date;q=d.creatives.filter(function(a){return"linear"===a.type}).shift().duration;this.dispatchEvent("AdDurationChange")},"AdLoaded");d.subscribe(function(){var a=(new Date-e)/1E3;h=q-a;var c=d.Pb();-1<c&&(g=c-a);this.dispatchEvent("AdRemainingTimeChange")},"AdVideoTimeupdate");d.subscribe(a,"AdTagParsed");d.getAdRemainingTime=function(){return h};d.getAdDuration=function(){return q};d.Kc=function(){return g};d.Pb=function(){return n}});r(function(d,
a,c,e){function h(a,d,c){var k="undefined"!=typeof XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");k.open("GET",a,!0);k.onreadystatechange=function(){4===k.readyState&&(200===k.status?(d||Function)(k.responseXML):(c||Function)(k.status))};k.send(null)}function q(a){var c={};if((a=a.getElementsByTagName("OIS"))&&a[0]){for(var k=a[0].children.length-1;0<=k;k--){var e=a[0].children[k];c[e.tagName]=e.textContent}g.oa(c);m=!0;f&&d.startAd()}}function n(){m=!0;f&&d.startAd()}var g=
e.v,m=!1,f=!1,y=d.startAd;d.startAd=function(){f=!0;m&&y.apply(d,[].slice.call(arguments))};(function(){var a=c.configXML;a?h(a,q,n):m=!0})();return d});I.API_VERSION="3.0.1";I.API_BUILD="004663";I.IDENTIFIER="OISHTML5VE";I.MediaSelector=function(d,a){function c(a){return"boolean"===typeof a?a:"string"===typeof a&&"true"===a?!0:!1}function h(a){return"string"===typeof a?a.toLowerCase():a}function x(a){var d=!0;g.forEach(function(g){var m;a:{for(m in g)break a;m=void 0}m=h(m);g=h(g[m]);if(e.B(m)&&
e.B(g))switch(m){case "delivery":case "type":case "format":case "mimeType":case "apiframework":"type"===m&&(m="mimeType");"mimeType"===m&&(g=g.split("|"));a.hasOwnProperty(m)&&-1===g.indexOf(a[m].toLowerCase())&&(d=!1);break;case "bitrate":case "width":a.hasOwnProperty(m)&&parseInt(a[m],10)>parseInt(g,10)&&(d=!1);break;case "scalable":case "maintainaspectratio":a.hasOwnProperty(m)&&c(a[m])!==c(g)&&(d=!1)}});return d}function q(){m&&(f=m.filter(function(a){return x(a)}))}var n=new e.j.s,g=a.U(),m=
d.c()&&0<d.c().creatives.length&&d.J().mediaFiles,f=[];this.a=n.a;this.b=n.b;this.registerGlobalEventDispatcher=n.registerGlobalEventDispatcher;this.sc=function(){f.sort(function(a,d){return parseInt(a.bitrate,10)>parseInt(d.bitrate,10)?1:parseInt(a.bitrate,10)<parseInt(d.bitrate,10)?-1:0})};this.Hb=function(){a.removeRule("bitrate");a.addRule({bitrate:e.ba()||5E3});a.ib();g=a.U();q();1>f.length&&(a.removeRule("bitrate"),a.removeRule("format"),g=a.U(),q());return this};this.Ca=function(){return f}};
I.extensions.CustomTrackingEvents=function(d,a,c,h,x){function q(a){switch(a.info){case "creativeView":r.start()}}var n,g,m=this,f=[],y=new e.j.s,r;this.Jb=function(){var a=Math.round(100*(g.totalTime-g.la))/100,c=d.K().A||void 0;return{"[sc_systemDomain]":"undefined","[sc_viewtime]":a,"[sc_percentvisible]":c,"[uif_adslot]":"linear"}};this.setViewport=function(){};this.destroy=function(){};this.a=y.a;this.b=y.b;(function(){d.$a();g=a;n=h;n.a("onTrack",q);var e=new I.extensions.CustomTrackingEvents.Parser;
c&&(f=e.parse(c));r=new I.extensions.CustomTrackingEvents.CustomTrackingEventHandler(d.K,f,m,n);x.a("AdStopped",r.destroy)})()};I.extensions.CustomTrackingEvents.Parser=function(){this.parse=function(d){var a,c=[];d=e.wa(d,"Tracking");for(var h=0;h<d.length;h++){var x=d[h];a=e.Kb(x);x=e.T(x);a=e.extend({},a);"viewableImpression"===a.event&&(a.offset=a.offset?1E3*e.V(a.offset):2E3,a.visibility=a.visibility?parseInt(a.visibility,10):50);a.url=x;c.push(a)}return c}};I.extensions.CustomTrackingEvents.CustomTrackingEventHandler=
function(d,a,c,h){function x(a){a=a.info.data;d().A>a.visibility?a.N++:a.N=0;if(250*a.N/1E3>=a.offset/1E3){if(e.B(a.url)){var m=e.urlEnrichment.w(e.ma(a.url,c.Jb()));h.callCustomTracker(m,"viewableImpression")}a.o.b("timeupdate",x);a.o.stop()}}function q(){try{a.forEach(function(a){a.o.b("timeupdate",x);a.o.stop()})}catch(d){}}var n;this.start=function(){a=a.filter(function(a){return"viewableImpression"===a.event});d&&a.length&&a.forEach(function(a){n=new e.qa(250);n.data=a;a.o=n;a.N=0;n.a("timeupdate",
x);n.start()})};this.destroy=function(){q()}};window.ois(function(d,a){function c(a,k){function g(){a.apply(this,arguments);d.unsubscribe(g,k)}d.subscribe(g,k)}function h(a){a=a.target.getAttribute("data-program");a=m[a];for(var d=0;d<a.clickTracking.length;d++)(new Image).src=e.urlEnrichment.w(a.clickTracking[d]);window.open(a.clickThrough,"_blank")}function x(){if(n){for(var a in m){var d=m[a],c=document.createElement("img"),k;for(k in d.attributes)d.attributes[k]&&c.setAttribute(k,d.attributes[k]);
c.setAttribute("data-program",a);c.style.pointerEvents="auto";c.style.cursor="pointer";c.style.zIndex="10";c.addEventListener("click",h);n.appendChild(c);(new Image).src=e.urlEnrichment.w(d.zc)}n.style.display="block"}}function q(){n&&n.parentNode.removeChild(n)}Number.isFinite=Number.isFinite||function(a){return"number"===typeof a&&isFinite(a)};var n=null,g=[],m={},f={Ea:0,X:0,va:0,Gc:0};(function(){c(function(d,c){g=c;n=document.createElement("div");n.setAttribute("style","position:absolute;width:100%;height:100%;top:0;left:0;display:none;pointer-events:none;");
a.parentNode.appendChild(n);for(var k=g.length-1;0<=k;k--){var e=g[k],h=e.program||"unknown-"+k;if(!m[h]){var B={attributes:{},style:{}};B.style.width=parseInt(e.width,10)+"px";B.style.height=parseInt(e.height,10)+"px";B.style.position="absolute";var x=parseInt(e.yPosition,10);Number.isFinite(x)?0<=x?B.style.top=x+"px":B.style.bottom=Math.abs(x)+"px":(B.style.top="top"===e.yPosition?0:"initial",B.style.bottom="bottom"===e.yPosition?0:"initial");x=parseInt(e.xPosition,10);Number.isFinite(x)?0<=x?B.style.left=
x+"px":B.style.right=Math.abs(x)+"px":"left"===e.xPosition?"top"===e.yPosition?(B.style.left=f.Ea+"px",f.Ea+=parseInt(e.width,10)):"bottom"===e.yPosition?(B.style.left=f.va+"px",f.va+=parseInt(e.width,10)):B.style.left=0:"right"===e.xPosition?"top"===e.yPosition?(B.style.right=f.X+"px",f.X+=parseInt(e.width,10)):"bottom"===e.yPosition?(B.style.right=f.Qa+"px",f.Qa+=parseInt(e.width,10)):B.style.right=0:(B.style.top=0,B.style.right=f.X+"px",f.X+=parseInt(e.width,10));B.attributes.style=JSON.stringify(B.style);
B.attributes.style=B.attributes.style.substring(1,JSON.stringify(B.style).length-1);B.attributes.style=B.attributes.style.replace(/\"/ig,"").replace(/\,/ig,";")+";";B.attributes.src=e.staticResource;B.clickThrough=e.iconClickThroughURLTemplate;B.clickTracking=e.iconClickTrackingURLTemplates;B.zc=e.iconViewTrackingURLTemplate;B.offset=(new Date("01/01/1970 "+e.offset)).getSeconds()||0;B.duration=(new Date("01/01/1970 "+e.duration)).getSeconds()||-1;m[h]=B}}},4300);c(x,"AdImpression");c(q,"AdStopped")})()});
window.ois.MediaFileFormat={WIDE:"wide",SQUARE:"square",VERTICAL:"vertical"};window.ois(function(d,a){function c(a,k){function g(){a.apply(this,arguments);d.unsubscribe(g,k)}d.subscribe(g,k)}function h(c){if(!d.adManager.isVPAID()&&r[f]&&(c=c.creatives.filter(function(a){return"linear"===a.type}).shift().supportedMediaFiles.filter(function(a){return a.attributes?a.attributes.format===f:!0}),c.length)){var k=function(){a.removeEventListener("loadedmetadata",k,!1);0>m&&(m=0);a.currentTime=m;void 0===
x&&B&&a.pause()},g=e.ba()||5E3;if(c=c.reduce(function(a,d){return Math.abs(d.bitrate-g)<Math.abs(a.bitrate-g)?d:a})){var m=a.currentTime-.5,B=a.paused,n=a.webkitDisplayingFullscreen||!1;a.src=e.Z(c.fileURL);a.addEventListener("loadedmetadata",k,!1);a.load();if(!y){var x=a.play();void 0!==x&&x.then(function(){var d=a.webkitDisplayingFullscreen||!1;(B||n!=d)&&a.pause()},function(){t.log("MediaElement: The play() request failed.")})}}}}function x(d,c){m=setTimeout(x,20);var k;k=a.getBoundingClientRect().width/
a.getBoundingClientRect().height;k=1<k?window.ois.MediaFileFormat.WIDE:1>k?window.ois.MediaFileFormat.VERTICAL:window.ois.MediaFileFormat.SQUARE;k!==f&&(f=k,h(c))}function q(){y=!1}function n(){y=!0}function g(){clearTimeout(m);a.removeEventListener("webkitbeginfullscreen",q);a.removeEventListener("webkitendfullscreen",n)}var m=0,f,y=!1,r={Yc:!1,Vc:!1,Xc:!1};a.addEventListener("webkitbeginfullscreen",q);a.addEventListener("webkitendfullscreen",n);c(function(a,d){d&&d.ads&&d.ads.length&&d.ads.forEach(function(a){var d=
a.creatives.filter(function(a){return"linear"===a.type}).shift();!a.errorCode&&0<a.creatives.length&&d.mediaFiles.forEach(function(a){var d=parseInt(a.width,10)/parseInt(a.height,10);a.attributes||(a.attributes={});1<d?(a.attributes.format=window.ois.MediaFileFormat.WIDE,r.wide=!0):1>d?(a.attributes.format=window.ois.MediaFileFormat.VERTICAL,r.vertical=!0):(a.attributes.format=window.ois.MediaFileFormat.SQUARE,r.square=!0)})})},"AdTagParsed");c(x,"AdLoaded");c(g,"AdSlotComplete");c(g,"AdError")});
I.extensions.SCAdVisibility=function(d,a,c,h,x){function q(a){switch(a.info){case "creativeView":n(),p.start()}}function n(){y.forEach(function(a){var d=new e.qa(a.interval);d.data=a;a.o=d;d.a("timeupdate",m);d.start();m({info:{data:a}})})}function g(){y.forEach(function(a){a.o.b("timeupdate",m);a.o.stop()})}function m(a){if(a=a.info.data.url)a=e.createElement("img",{src:f(a),style:"display:none;",onerror:"this.parentNode.removeChild(this);",onload:"this.parentNode.removeChild(this);"}),d.Da().appendChild(a)}
function f(a){var c=d.K().A||void 0;isNaN(c)?(a=e.ma(a,{"[sc_percentvisible]":"JSINJECTIONERROR"}),g()):a=e.ma(a,w.Xa());return e.urlEnrichment.w(a)}var y,r,t,w=this,u,l=new e.j.s,p;this.Xa=function(){var a=t.v.vb,c=Math.round(100*(t.totalTime-t.la))/100,k=d.K().A||void 0;return{"[sc_systemDomain]":a?a:"undefined","[sc_viewtime]":c,"[sc_percentvisible]":k,"[uif_adslot]":"linear"}};this.setViewport=function(){};this.destroy=function(){g()};this.a=l.a;this.b=l.b;(function(){d.$a();t=a;r=h;r.a("onTrack",
q);var g=new I.extensions.SCAdVisibility.Parser;y=g.parse(c);u=g.hc(c);p=new I.extensions.SCAdVisibility.ViewableImpressionHandler(d.K,u,w,r);x.a("AdStopped",p.destroy)})()};I.extensions.SCAdVisibility.Parser=function(){this.parse=function(d){var a=[];d=e.wa(d,"Tracking");for(var c=0;c<d.length;c++)d[c]&&a.push({interval:parseInt(e.T(e.S(d[c],"Interval")),10),url:e.T(e.S(d[c],"URL"))});return a};this.hc=function(d){var a,c,h,x,q=[];a=e.wa(d,"BooleanView");if(!e.B(a))return q;for(var n=0;n<a.length;n++)if(a[n]){d=
{};if(c=e.S(a[n],"ViewConditions"))h=parseInt(e.T(e.S(c,"ViewThreshold")),10),x=parseInt(e.T(e.S(c,"ViewTime")),10);c=e.T(e.S(a[n],"ViewURL"));d.xc=isNaN(h)?50:h;d.yc=isNaN(x)?2E3:x;d.ub=c.length?c:"";q.push(d)}return q}};I.extensions.SCAdVisibility.ViewableImpressionHandler=function(d,a,c,h){function x(a){a=a.info.data;d().A>a.xc?a.N++:a.N=0;if(250*a.N/1E3>=a.yc/1E3){if(e.B(a.ub)){var m=e.urlEnrichment.w(e.ma(a.ub,c.Xa()));h.callCustomTracker(m,"viewableImpression")}a.o.b("timeupdate",x);a.o.stop()}}
function q(){try{a.forEach(function(a){a.o.b("timeupdate",x);a.o.stop()})}catch(d){}}var n;this.start=function(){d&&a.length&&a.forEach(function(a){n=new e.qa(250);n.data=a;a.o=n;a.N=0;n.a("timeupdate",x);n.start()})};this.destroy=function(){q()}};(function(){function d(){this.attributes={};this.children=[]}function a(){this.id=null;this.height=this.width=0;this.companionClickThroughURLTemplate=this.iframeResource=this.htmlResource=this.staticResource=this.type=null;this.trackingEvents={}}function c(){this.program=
null;this.yPosition=this.xPosition=this.width=this.height=0;this.offset=this.apiFramework=null;this.duration=0;this.iconClickThroughURLTemplate=this.iframeResource=this.htmlResource=this.staticResource=this.type=null;this.iconClickTrackingURLTemplates=[];this.iconViewTrackingURLTemplate=null}function e(){this.viewableImpression=this.flashResource=this.javascriptResource=this.vendor=null}function h(){this.fileURL=this.id=null;this.deliveryType="progressive";this.codec=this.mimeType=null;this.height=
this.width=this.maxBitrate=this.minBitrate=this.bitrate=0;this.maintainAspectRatio=this.scalable=this.apiFramework=null}function q(a){a=void 0===a?{}:a;this.id=a.id||null;this.adId=a.adId||null;this.sequence=a.sequence||null;this.apiFramework=a.apiFramework||null;this.trackingEvents={}}function n(a){a=void 0===a?{}:a;q.call(this,a);this.type="linear";this.duration=0;this.skipDelay=null;this.mediaFiles=[];this.videoClickThroughURLTemplate=null;this.videoClickTrackingURLTemplates=[];this.videoCustomClickURLTemplates=
[];this.adParameters=null;this.icons=[]}function g(a){a=void 0===a?{}:a;q.call(this,a);this.type="nonlinear";this.variations=[];this.videoClickTrackingURLTemplates=[]}function m(a){a=void 0===a?{}:a;q.call(this,a);this.type="companion";this.variations=[];this.videoClickTrackingURLTemplates=[]}function f(){this.survey=this.pricing=this.advertiser=this.description=this.title=this.system=this.sequence=this.id=this.url=null;this.errorURLTemplates=[];this.impressionURLTemplates=[];this.creatives=[];this.extensions=
[];this.adVerifications=[];this.wrappers=[];this.fetch=function(){};this.fetched=!1}function y(){this.id=null;this.expandedHeight=this.expandedWidth=this.height=this.width=0;this.maintainAspectRatio=this.scalable=!0;this.minSuggestedDuration=0;this.apiFramework="static";this.nonlinearClickThroughURLTemplate=this.iframeResource=this.htmlResource=this.staticResource=this.type=null;this.nonlinearClickTrackingURLTemplates=[];this.adParameters=null}function r(){this.value=this.name=null;this.attributes=
{};this.children=[]}function t(a){var d=[];d.forEach.call(d.slice.call(arguments,1),function(d){if(d)for(var c in d)({}).hasOwnProperty.call(d,c)&&(a[c]="object"===typeof a[c]&&"object"===typeof d[c]&&null!==d[c]?t(a[c],d[c]):d[c])});return a}function w(){this.ads=[];this.errorURLTemplates=[]}function u(){}function I(){}function l(){}function p(){}function z(){this.maxWrapperDepth=10;this.blockInsecureURL=!1;this.currentWrapperDepth=0;this.URLTemplateFilters=[];this.wrapperCallbackHandlers=[];K.EventDispatcher.prototype.apply(this)}
var E={scope:{},getGlobal:function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global?global:a}};E.global=E.getGlobal(this);E.initSymbol=function(){E.global.Symbol||(E.global.Symbol=E.Symbol);E.initSymbol=function(){}};E.symbolCounter_=0;E.Symbol=function(a){return"jscomp_symbol_"+a+E.symbolCounter_++};E.initSymbolIterator=function(){E.initSymbol();E.global.Symbol.iterator||(E.global.Symbol.iterator=E.global.Symbol("iterator"));E.initSymbolIterator=function(){}};E.makeIterator=
function(a){E.initSymbolIterator();if(a[E.global.Symbol.iterator])return a[E.global.Symbol.iterator]();if(!(a instanceof Array||"string"==typeof a||a instanceof String))throw new TypeError(a+" is not iterable");var d=0;return{next:function(){return d==a.length?{done:!0}:{done:!1,value:a[d++]}}}};E.arrayFromIterator=function(a){for(var d,c=[];!(d=a.next()).done;)c.push(d.value);return c};E.arrayFromIterable=function(a){return a instanceof Array?a:E.arrayFromIterator(E.makeIterator(a))};E.arrayFromArguments=
function(a){for(var d=[],c=0;c<a.length;c++)d.push(a[c]);return d};E.inherits=function(a,d){function c(){}c.prototype=d.prototype;a.prototype=new c;a.prototype.constructor=a;for(var k in d)if(E.global.Object.defineProperties){var g=E.global.Object.getOwnPropertyDescriptor(d,k);void 0!==g&&E.global.Object.defineProperty(a,k,g)}else a[k]=d[k]};Object.defineProperties(a.prototype,{hasCreatives:{configurable:!0,enumerable:!0,get:function(){return this.staticResource||this.htmlResource||this.iframeResource}}});
E.inherits(n,q);E.inherits(g,q);E.inherits(m,q);Object.defineProperties(f.prototype,{hasError:{configurable:!0,enumerable:!0,get:function(){return!isNaN(this.errorCode)}}});var D={isSecureURL:function(a){return"https:"===window.location.protocol&&0!==(a+"").indexOf("http://")||"https:"!==window.location.protocol}},U={};U.extend=t;var H={resolveAdTagURI:function(a,d){if(0===a.indexOf("//")){var c=location.protocol;"file:"===c&&(c="https:");return c+a}return-1===a.indexOf("://")?d.slice(0,d.lastIndexOf("/"))+
"/"+a:a}},ga={stringToXML:function(a){if("string"===typeof a===!1)return a;var d=null;window.DOMParser?d=(new DOMParser).parseFromString(a,"text/xml"):(d=new ActiveXObject("Microsoft.XMLDOM"),d.loadXML(a));return d}};u.prototype.xdr=function(){return window.XDomainRequest?new window.XDomainRequest:null};u.supported=function(){return!!(new u).xdr()};u.prototype.get=function(a,d,c){if("function"!==typeof window.ActiveXObject)c();else{var k=new window.ActiveXObject("b");k.async=!1;xdr=this.xdr();xdr.open("GET",
a);xdr.timeout=d.timeout||0;xdr.withCredentials=!1!==d.withCredentials;xdr.onprogress=function(){};xdr.onload=function(){k.loadXML(xdr.responseText);c(null,k)};xdr.send()}};I.prototype.xhr=function(){var a=new window.XMLHttpRequest;return"withCredentials"in a?a:null};I.supported=function(){return!!(new I).xhr()};I.prototype.get=function(a,d,c){try{var k=this,g=this.xhr();g.open("GET",a);g.timeout=d.timeout||0;g.withCredentials=!1!==d.withCredentials;g.overrideMimeType&&g.overrideMimeType("text/xml");
g.onreadystatechange=function(){if(4===g.readyState)if(200===g.status){var e=g.responseXML;!e&&g.responseText&&(e=ga.stringToXML(g.responseText));e?c(null,e):(g.statusText="Response contains neither 'responseXML' nor 'responseText'",c(Error("XHRURLHandler: "+g.statusText)))}else 0===g.status&&g.withCredentials?(e=JSON.parse(JSON.stringify(d)),e.withCredentials=!1,k.get(a,e,c)):c(Error("XHRURLHandler: "+g.statusText))};g.send()}catch(e){c(e)}};l.prototype.get=function(a,d,c){var k=c,g=d;c||("function"===
typeof d&&(k=d),g={});if(!k)return null;d=g.urlhandler;if(g.response)k(null,ga.stringToXML(g.response));else return d&&d.supported()?(new d).get(a,g,k):I.supported()?(new I).get(a,g,k):u.supported()?(new u).get(a,g,k):k();return null};var K={};p.prototype={constructor:p,apply:function(a){a.addEventListener=p.prototype.addEventListener;a.hasEventListener=p.prototype.hasEventListener;a.removeEventListener=p.prototype.removeEventListener;a.dispatchEvent=p.prototype.dispatchEvent},addEventListener:function(a,
d){this._listeners||(this._listeners={});var c=this._listeners;c[a]||(c[a]=[]);-1===c[a].indexOf(d)&&c[a].push(d)},hasEventListener:function(a,d){if(!this._listeners)return!1;var c=this._listeners;return c[a]&&-1!==c[a].indexOf(d)?!0:!1},removeEventListener:function(a,d){if(this._listeners){var c=this._listeners[a];if(c){var k=c.indexOf(d);-1!==k&&c.splice(k,1)}}},dispatchEvent:function(a){if(this._listeners){var d=this._listeners[a];if(d){for(var c=d.length,k=[],g=0,g=0;g<c;g++)k[g]=d[g];for(d=0;d<
c;d++)(k[d]||function(){}).apply(this,[].slice.call(arguments,1))}}}};K.EventDispatcher=p;z.prototype.trackError=function(a,d,c,k){this.dispatchEvent("VAST-error",{response:JSON.parse(JSON.stringify(a)),errorCode:c,errorURLTemplates:d,silent:k})};z.prototype.addURLTemplateFilter=function(a){"function"===typeof a&&this.URLTemplateFilters.push(a)};z.prototype.removeURLTemplateFilter=function(){return this.URLTemplateFilters.pop()};z.prototype.countURLTemplateFilters=function(){return this.URLTemplateFilters.length};
z.prototype.clearUrlTemplateFilters=function(){this.URLTemplateFilters=[]};z.prototype.addWrapperCallbackHandler=function(a){"function"===typeof a&&this.wrapperCallbackHandlers.push(a)};z.prototype.removeWrapperCallbackHandler=function(){return this.wrapperCallbackHandlers.pop()};z.prototype.countWrapperCallbackHandlers=function(){return this.wrapperCallbackHandlers.length};z.prototype.clearWrapperCallbackHandlers=function(){this.wrapperCallbackHandlers=[]};z.prototype.parseXPosition=function(a){return-1!==
["left","right"].indexOf(a)?a:parseInt(a,10)||0};z.prototype.parseYPosition=function(a){return-1!==["top","bottom"].indexOf(a)?a:parseInt(a,10)||0};z.prototype.parseNodeText=function(a){return a&&(a.textContent||a.text||"").trim()};z.prototype.copyNodeAttribute=function(a,d,c){(d=d.getAttribute(a))&&c.setAttribute(a,d)};z.prototype.parseDuration=function(a){if(!a)return-1;if(isNaN(parseFloat(a))&&isFinite(a))return parseInt(a,10);var d=a.split(":");if(3!==d.length)return-1;var c=d[2].split(".");a=
parseInt(c[0],10);2===c.length&&(a+=parseFloat("0."+c[1]));c=parseInt(60*d[1],10);d=parseInt(3600*d[0],10);return isNaN(d)||isNaN(c)||isNaN(a)||3600<c||60<a?-1:d+c+a};z.prototype.parseBoolean=function(a,d){return-1<["true","1"].indexOf((a+"").toLowerCase())?!0:-1<["false","0"].indexOf((a+"").toLowerCase())?!1:d||!1};z.prototype.childByName=function(a,d){for(var c=0;c<a.childNodes.length;c++){var k=a.childNodes.item(c);if(k.nodeName===d)return k}return null};z.prototype.childsByName=function(a,d){for(var c=
[],k=0;k<a.childNodes.length;k++){var g=a.childNodes.item(k);g.nodeName===d&&c.push(g)}return c};z.prototype.parseNextWrapperURL=function(a){var d=null,c=this.childByName(a,"VASTAdTagURI");c?d=this.parseNodeText(c):(c=this.childByName(a,"VASTAdTagURL"))&&(d=this.parseNodeText(this.childByName(c,"URL")));return d};z.prototype.parseWrapperElement=function(a){var d=this.parseInLineElement(a);d.nextWrapperURL=this.parseNextWrapperURL(a);d.videoClickTrackingURLTemplates||(d.videoClickTrackingURLTemplates=
[]);d.videoCustomClickURLTemplates||(d.videoCustomClickURLTemplates=[]);a=d.creatives;for(var c=0;c<a.length;c++){var k=a[c],g=null;if("linear"===k.type||"nonlinear"===k.type)if(g=k)g.trackingEvents&&(d.trackingEvents||(d.trackingEvents={}),d.trackingEvents[g.type]=g.trackingEvents),g.videoClickTrackingURLTemplates&&(d.videoClickTrackingURLTemplates=g.videoClickTrackingURLTemplates.concat(d.videoClickTrackingURLTemplates)),g.videoClickThroughURLTemplate&&(d.videoClickThroughURLTemplate=g.videoClickThroughURLTemplate),
g.videoCustomClickURLTemplates&&(d.videoCustomClickURLTemplates=g.videoCustomClickURLTemplates.concat(d.videoCustomClickURLTemplates))}return d.nextWrapperURL?d:null};z.prototype.parseSkipOffset=function(a,d){var c=null;(c=d.getAttribute("skipoffset"))?"%"===c.charAt(c.length-1)&&-1!==a.duration?(percent=parseInt(c,10),c=percent/100*a.duration):c=this.parseDuration(c):c=null;return c};z.prototype.parseVideoClicks=function(a){var d={videoClickTrackingURLTemplates:[],videoCustomClickURLTemplates:[]};
if(a=this.childByName(a,"VideoClicks")){d.videoClickThroughURLTemplate=this.parseNodeText(this.childByName(a,"ClickThrough"));for(var c=this.childsByName(a,"ClickTracking"),k=0;k<c.length;k++)d.videoClickTrackingURLTemplates.push(this.parseNodeText(c[k]));a=this.childsByName(a,"CustomClick");for(c=0;c<a.length;c++)d.videoCustomClickURLTemplates.push(this.parseNodeText(a[c]))}return d};z.prototype.parseTrackingEvents=function(a){var d={};a=this.childsByName(a,"TrackingEvents");for(var c=0;c<a.length;c++)for(var k=
this.childsByName(a[c],"Tracking"),g=0;g<k.length;g++){var e=k[g],h=e.getAttribute("event"),m=this.parseNodeText(e);if(h&&m){if("progress"===h){e=e.getAttribute("offset");if(!e)continue;h="%"===e.charAt(e.length-1)?"progress-"+e:"progress-"+Math.round(this.parseDuration(e))}d[h]||(d[h]=[]);d[h].push(m)}}return d};z.prototype.parseMediaFileScalable=function(a){return(a=a.getAttribute("scalable"))&&"string"===typeof a&&(a=a.toLowerCase(),"false"===a)?!1:!0};z.prototype.parseMediaFileMaintainAspectRatio=
function(a){return(a=a.getAttribute("maintainAspectRatio"))&&"string"===typeof a&&(a=a.toLowerCase(),"false"===a)?!1:!0};z.prototype.parseMediaFiles=function(a){var d=[];a=this.childsByName(a,"MediaFiles");for(var c=0;c<a.length;c++)for(var k=this.childsByName(a[c],"MediaFile"),g=0;g<k.length;g++){var e=k[g],m=new h;m.id=e.getAttribute("id");m.fileURL=this.parseNodeText(e);m.deliveryType=e.getAttribute("delivery");m.codec=e.getAttribute("codec");m.mimeType=e.getAttribute("type");m.apiFramework=e.getAttribute("apiFramework");
m.bitrate=parseInt(e.getAttribute("bitrate")||0,10);m.minBitrate=parseInt(e.getAttribute("minBitrate")||0,10);m.maxBitrate=parseInt(e.getAttribute("maxBitrate")||0,10);m.width=parseInt(e.getAttribute("width")||0,10);m.height=parseInt(e.getAttribute("height")||0,10);m.scalable=this.parseMediaFileScalable(e);m.maintainAspectRatio=this.parseMediaFileMaintainAspectRatio(e);d.push(m)}return d};z.prototype.parseIcons=function(a){var d=[];if(a=this.childByName(a,"Icons")){a=this.childsByName(a,"Icon");for(var g=
0;g<a.length;g++){var e=a[g],m=new c;m.program=e.getAttribute("program");m.height=parseInt(e.getAttribute("height"),10)||0;m.width=parseInt(e.getAttribute("width"),10)||0;m.xPosition=this.parseXPosition(e.getAttribute("xPosition"));m.yPosition=this.parseYPosition(e.getAttribute("yPosition"));m.apiFramework=e.getAttribute("apiFramework");m.offset=this.parseDuration(e.getAttribute("offset"));m.duration=this.parseDuration(e.getAttribute("duration"));var m=U.extend(m,this.parseResourceAdType(e)),h=this.childByName(e,
"IconClicks");if(h){m.iconClickThroughURLTemplate=this.parseNodeText(this.childByName(h,"IconClickThrough"));for(var h=this.childsByName(h,"IconClickTracking"),n=0;n<h.length;n++)m.iconClickTrackingURLTemplates.push(this.parseNodeText(h[n]))}m.iconViewTrackingURLTemplate=this.parseNodeText(this.childByName(e,"IconViewTracking"));d.push(m)}}return d};z.prototype.parseCreativeLinearElement=function(a,d){d=void 0===d?{}:d;var c=new n(d);c.duration=this.parseDuration(this.parseNodeText(this.childByName(a,
"Duration")));c.skipDelay=this.parseSkipOffset(c,a);var k=this.parseVideoClicks(a);c.videoClickThroughURLTemplate=k.videoClickThroughURLTemplate;c.videoClickTrackingURLTemplates=c.videoClickTrackingURLTemplates.concat(k.videoClickTrackingURLTemplates);c.videoCustomClickURLTemplates=c.videoCustomClickURLTemplates.concat(k.videoCustomClickURLTemplates);c.trackingEvents=this.parseTrackingEvents(a);c.mediaFiles=c.mediaFiles.concat(this.parseMediaFiles(a));c.icons=c.icons.concat(this.parseIcons(a));if(k=
this.childByName(a,"AdParameters"))for(c.adParameters=this.parseNodeText(k),k=0;k<c.mediaFiles.length;k++)c.mediaFiles[k].adParameters=c.adParameters;return c};z.prototype.parseResourceAdType=function(a){for(var d={},c=this.childsByName(a,"HTMLResource"),k=0;k<c.length;k++){var g=c[k];d.type=g.getAttribute("creativeType")||"text/html";d.htmlResource=this.parseNodeText(g)}c=this.childsByName(a,"IFrameResource");for(k=0;k<c.length;k++)g=c[k],d.type=g.getAttribute("creativeType")||0,d.iframeResource=
this.parseNodeText(g);a=this.childsByName(a,"StaticResource");for(c=0;c<a.length;c++)k=a[c],d.type=k.getAttribute("creativeType")||0,d.staticResource=this.parseNodeText(k);return d};z.prototype.parseNonLinear=function(a,d){d=void 0===d?{}:d;var c=new g(d);c.trackingEvents=this.parseTrackingEvents(a);for(var k=this.childsByName(a,"NonLinear"),e=0;e<k.length;e++){var m=k[e],h=new y;h.id=m.getAttribute("id")||null;h.width=m.getAttribute("width");h.height=m.getAttribute("height");h.expandedWidth=m.getAttribute("expandedWidth");
h.expandedHeight=m.getAttribute("expandedHeight");h.scalable=this.parseBoolean(m.getAttribute("scalable"));h.maintainAspectRatio=this.parseBoolean(m.getAttribute("maintainAspectRatio"));h.minSuggestedDuration=m.getAttribute("minSuggestedDuration");h.apiFramework=m.getAttribute("apiFramework");var h=U.extend(h,this.parseResourceAdType(m)),n=this.childByName(m,"AdParameters");n&&(h.adParameters=this.parseNodeText(n));h.nonlinearClickThroughURLTemplate=this.parseNodeText(this.childByName(m,"NonLinearClickThrough"));
m=E.makeIterator(this.childsByName(m,"NonLinearClickTracking"));for(n=m.next();!n.done;n=m.next())h.nonlinearClickTrackingURLTemplates.push(this.parseNodeText(n.value));c.variations.push(h)}return c};z.prototype.parseCompanionAd=function(d,c){c=void 0===c?{}:c;for(var k=new m(c),g=this.childsByName(d,"Companion"),e=0;e<g.length;e++){var h=g[e],n=new a;n.id=h.getAttribute("id")||null;n.width=h.getAttribute("width");n.height=h.getAttribute("height");n.companionClickTrackingURLTemplates=[];for(var n=
U.extend(n,this.parseResourceAdType(h)),B=this.childsByName(h,"TrackingEvents"),x=0;x<B.length;x++)for(var q=this.childsByName(B[x],"Tracking"),w=0;w<q.length;w++){var y=q[w],f=y.getAttribute("event"),y=this.parseNodeText(y);f&&y&&(n.trackingEvents[f]||(n.trackingEvents[f]=[]),n.trackingEvents[f].push(y))}B=E.makeIterator(this.childsByName(h,"CompanionClickTracking"));for(x=B.next();!x.done;x=B.next())n.companionClickTrackingURLTemplates.push(this.parseNodeText(x.value));n.companionClickThroughURLTemplate=
this.parseNodeText(this.childByName(h,"CompanionClickThrough"));n.companionClickTrackingURLTemplate=this.parseNodeText(this.childByName(h,"CompanionClickTracking"));k.variations.push(n)}return k};z.prototype.parseCreativeAdIdAttribute=function(a){if(!a.hasAttributes())return null;a=Array.prototype.slice.call(a.attributes);for(var d=0;d<a.length;d++){var c=a[d];if(c&&c.name){var k=c.value;if("adid"===c.name.toLowerCase())return k}}return null};z.prototype.parseCreativeElement=function(a,d){for(var c=
this.childsByName(d,"Creative"),k=0;k<c.length;k++)for(var g=c[k],e=g.childNodes,g={id:g.getAttribute("id")||null,adId:this.parseCreativeAdIdAttribute(g),sequence:parseInt(g.getAttribute("sequence"),10),apiFramework:g.getAttribute("apiFramework")||null},m=0;m<e.length;m++){var h=e.item(m),n=null;switch(h.nodeName){case "Linear":n=this.parseCreativeLinearElement(h,g);break;case "NonLinearAds":n=this.parseNonLinear(h,g);break;case "CompanionAds":n=this.parseCompanionAd(h,g)}n&&a.creatives.push(n)}};
z.prototype.parseExtensionChild=function(a,d){for(var c=d.childNodes,k=0;k<c.length;k++){var g=c.item(k),e=this.parseNodeText(g);if("#comment"!==g.nodeName&&""!==e||g.attributes){var m=new r;m.name=g.nodeName;m.value=e;if(g.attributes)for(var e=g.attributes,h=0;h<e.length;h++){var n=e.item(h);m.attributes[n.nodeName]=n.nodeValue}g.childNodes&&0<g.childNodes.length&&this.parseExtensionChild(m.children,g);a.push(m)}}};z.prototype.parseExtension=function(a,c){for(var k=0;k<c.length;k++){var g=c[k],e=
new d;if(g.attributes)for(var m=g.attributes,h=0;h<m.length;h++){var n=m.item(h);e.attributes[n.nodeName]=n.nodeValue}this.parseExtensionChild(e.children,g);a.push(e)}};z.prototype.parseAdVerifications=function(a,d){for(var c=0;c<d.length;c++){var k=d[c],g=new e,m={};g.vendor=k.getAttribute("vendor")||null;var h=this.childByName(k,"JavaScriptResource");if(h&&(m.url=this.parseNodeText(h),m.apiFramework=h.getAttribute("apiFramework")||"VPAID",g.javascriptResource=m,(k=this.childByName(k,"AdParameters"))&&
k.hasChildNodes()))for(var n in k.childNodes)m=k.childNodes[n],m.nodeType===Node.ELEMENT_NODE&&(g.adParameters||(g.adParameters={}),g.adParameters[m.nodeName]=this.parseNodeText(m));a.push(g)}};z.prototype.parseInLineElement=function(a){var d=new f;d.id=a.getAttribute("id")||null;d.sequence=parseInt(a.getAttribute("sequence"),10);d.fallbackType=a.getAttribute("fallbackType")||"replace";d.fallbackOnNoAd=this.parseBoolean(a.getAttribute("fallbackOnNoAd"),!1);d.followAdditionalWrappers=this.parseBoolean(a.getAttribute("followAdditionalWrappers"),
!0);d.allowMultipleAds=this.parseBoolean(a.getAttribute("allowMultipleAds"),!1);a=a.childNodes;for(var c=0;c<a.length;c++){var k=a.item(c);switch(k.nodeName){case "Error":(k=this.parseNodeText(k))&&k.length&&d.errorURLTemplates.push(k);break;case "Impression":d.impressionURLTemplates.push(this.parseNodeText(k));break;case "AdVerifications":this.parseAdVerifications(d.adVerifications,this.childsByName(k,"Verification"));break;case "Creatives":this.parseCreativeElement(d,k);break;case "Extensions":this.parseExtension(d.extensions,
this.childsByName(k,"Extension"));break;case "AdSystem":d.system={value:this.parseNodeText(k),version:k.getAttribute("version")||null};break;case "AdTitle":d.title=this.parseNodeText(k);break;case "Description":d.description=this.parseNodeText(k);break;case "Advertiser":d.advertiser=this.parseNodeText(k);break;case "Pricing":d.pricing={value:this.parseNodeText(k),model:k.getAttribute("model")||null,currency:k.getAttribute("currency")||null};break;case "Survey":d.survey=this.parseNodeText(k)}}return d};
z.prototype.parseAdElement=function(a){for(var d=a.childNodes,c=0;c<d.length;c++){var k=d.item(c);if("Wrapper"===k.nodeName||"InLine"===k.nodeName){this.copyNodeAttribute("id",a,k);this.copyNodeAttribute("sequence",a,k);this.copyNodeAttribute("fallbackOnNoAd",a,k);this.copyNodeAttribute("fallbackType",a,k);this.copyNodeAttribute("followAdditionalWrappers",a,k);this.copyNodeAttribute("allowMultipleAds",a,k);if("Wrapper"===k.nodeName)return this.parseWrapperElement(k);if("InLine"===k.nodeName)return this.parseInLineElement(k)}}return null};
z.prototype.mergeWrapperAdData=function(a,d){a.wrappers=d.wrappers.concat(a.wrappers);a.errorURLTemplates=d.errorURLTemplates.concat(a.errorURLTemplates);a.impressionURLTemplates=d.impressionURLTemplates.concat(a.impressionURLTemplates);a.extensions=d.extensions.concat(a.extensions);a.adVerifications=d.adVerifications.concat(a.adVerifications);a.sequence=d.sequence;a.fallbackType=d.fallbackType;a.fallbackOnNoAd=d.fallbackOnNoAd||this.parseBoolean(a.fallbackOnNoAd,!1);a.followAdditionalWrappers=d.followAdditionalWrappers||
this.parseBoolean(a.followAdditionalWrappers,!0);a.allowMultipleAds=d.allowMultipleAds||this.parseBoolean(a.allowMultipleAds,!1);var c=d.creatives.filter(function(a){return"companion"===a.type}).shift(),k=a.creatives.filter(function(a){return"companion"===a.type}).shift();c&&k?k.variations=c.variations.concat(k.variations):c&&!k&&(k=new m,k.variations=c.variations.concat(k.variations),a.creatives.push(k));d.trackingEvents&&a.creatives.map(function(a){d.trackingEvents[a.type]&&Object.keys(d.trackingEvents[a.type]).map(function(c){a.trackingEvents[c]||
(a.trackingEvents[c]=[]);a.trackingEvents[c]=a.trackingEvents[c].concat(d.trackingEvents[a.type][c])})});a.creatives.map(function(a){d.creatives.map(function(d){a.icons=(a.icons||[]).concat(d.icons||[])})});d.videoClickTrackingURLTemplates&&a.creatives.map(function(a){"linear"===a.type&&(a.videoClickTrackingURLTemplates=a.videoClickTrackingURLTemplates.concat(d.videoClickTrackingURLTemplates))});d.videoClickThroughURLTemplate&&a.creatives.map(function(a){"linear"!==a.type||a.videoClickThroughURLTemplate||
(a.videoClickThroughURLTemplate=d.videoClickThroughURLTemplate)})};z.prototype.urlResponseHandler=function(a,d,c,k,g,e){function m(){for(var a=x.ads.length-1;0<=a;a--){var c=x.ads[a];if(c.nextWrapperURL){a=JSON.parse(JSON.stringify(c));c.VASTAdTagURI=d[1];c.wrappers.push(a);for(c=n.wrapperCallbackHandlers.length-1;0<=c;c--)(0,n.wrapperCallbackHandlers[c])(a,n.currentWrapperDepth);return}}h();0===B?0===x.ads.length?(n.trackError(x,x.errorURLTemplates,303),k(g,x)):(x.ads.filter(function(a){return!n.isBrokenAd(a)}).map(function(a){a.creatives.map(function(d){var c=
0<(d.mediaFiles||[]).filter(function(a){return!D.isSecureURL(a.fileURL)}).length;d=0<(d.variations||[]).filter(function(a){return!D.isSecureURL(a.fileURL)}).length;n.blockInsecureURL&&(c||d)&&(a.errorCode=405)})}),x.ads.map(function(a){var d=void 0;n.hasValidCreatives(a)||(d=400);n.isBrokenAd(a)&&(d=303);!isNaN(d)&&isNaN(a.errorCode)&&a.fetched&&(a.errorCode=d)}),n.handleFallbackOnNoAdFlag(x.ads),c=x.ads.filter(function(a){return!1===a.fetched&&!a.hasError}),0===x.ads.filter(function(a){return a.hasError&&
a.fallbackOnNoAd}).length&&(c=[]),a=function(){n.deleteNeedlessBuffetAds(x.ads);x.ads.map(function(a){a.hasError&&(a.creatives=[])});x.ads.sort(n.bySequence);1===x.ads.length&&x.ads[0].errorCode&&(0===x.errorURLTemplates.length?n.trackError(x,x.ads[0].errorURLTemplates,x.ads[0].errorCode):n.trackError(x,x.errorURLTemplates,x.ads[0].errorCode),x.ads.splice(0,1));k(g,x)},0<c.length?(c=c.shift(),a=x.ads.indexOf(c),c.fetch(function(a,d){0<d.ads.length&&(x.ads[a]=d.ads[0]);m()}.bind(n,a))):a()):k(g,x)}
function h(){0!==x.ads.length&&(x.ads.map(function(a){x.errorURLTemplates.map(function(d){-1===a.errorURLTemplates.indexOf(d)&&a.errorURLTemplates.push(d)})}),x.errorURLTemplates=[])}var n=this,B=this.currentWrapperDepth++;if(g)return k(g);delete c.response;var x=new w;if(!e||!e.documentElement||"VAST"!==e.documentElement.nodeName)return k();for(var q=0;q<e.documentElement.childNodes.length;q++){var y=e.documentElement.childNodes.item(q);"Error"===y.nodeName&&x.errorURLTemplates.push(this.parseNodeText(y))}for(q=
0;q<e.documentElement.childNodes.length;q++)y=e.documentElement.childNodes.item(q),"Ad"===y.nodeName&&((y=this.parseAdElement(y))?(y.url=y.nextWrapperURL?H.resolveAdTagURI(y.nextWrapperURL,a):a,y.fetched=!0,x.ads.push(y)):this.trackError(x,x.errorURLTemplates,101));e=x.ads.length;for(q={$jscomp$this$5:void 0};e--;)q.$jscomp$this$5=this,y=x.ads[e],y.nextWrapperURL&&(function(k){return function(g){if(d.length-1>=k.$jscomp$this$5.maxWrapperDepth||g.nextWrapperURL in d)g.errorCode=302,delete g.nextWrapperURL;
else if(g.followAdditionalWrappers){a&&(g.nextWrapperURL=H.resolveAdTagURI(g.nextWrapperURL,a));var e=function(a,c){delete g.nextWrapperURL;if(a)return g.errorCode=a.errorCode||301,a.message&&-1!==a.message.indexOf("Invalid URL")&&(g.errorCode=303),m();c&&c.errorURLTemplates&&(x.errorURLTemplates=x.errorURLTemplates.concat(c.errorURLTemplates));if(c&&0!==c.ads.length){var e=x.ads.indexOf(g);x.ads.splice(e,1);c.ads.map(function(a){return function(c){a.$jscomp$this$5.mergeWrapperAdData(c,g);c.VASTAdTagURI=
d[1];x.ads.splice(++e,0,c)}}(k))}else g.creatives=[];return m()},h=0<x.ads.filter(function(a){return!isNaN(a.sequence)}).length;isNaN(g.sequence)&&!c.prefetchBuffets&&h?(e=new w,g.fetched=!1,g.fetchURL=g.nextWrapperURL,delete g.nextWrapperURL,g.fetch=function(a){return function(k){a.$jscomp$this$5.parse(g.fetchURL,c,function(d,c){if(0<c.ads.length)c.ads.map(function(a){return function(d){a.$jscomp$this$5.mergeWrapperAdData(d,g);d.VASTAdTagURI=g.url}}(a));else{var e=new f;e.errorURLTemplates=g.errorURLTemplates.concat(c.errorURLTemplates);
e.errorCode=303;e.sequence=g.sequence;e.fetched=!0;e.fallbackOnNoAd=!0;c.ads.push(e)}k(c)},d)}}(k),e.ads.push(g)):k.$jscomp$this$5.parse(g.nextWrapperURL,c,e.bind(k.$jscomp$this$5),d)}else delete g.nextWrapperURL,k.$jscomp$this$5.isBrokenAd(g)&&isNaN(g.errorCode)&&(g.errorCode=303)}}(q)(y),q={$jscomp$this$5:q.$jscomp$this$5});return m()};z.prototype.handleFallbackOnNoAdFlag=function(a){var d=this;a.sort(this.bySequence);var c=a.filter(function(a){return isNaN(a.sequence)&&!d.isBrokenAd(a)}),k=a.filter(function(a){return d.isBrokenAd(a)&&
a.fallbackOnNoAd&&a.sequence&&!a.replaced}),g=a.filter(function(a){return a.fallbackOnNoAd&&a.sequence});if(0!==g.length){var e=parseInt(g[g.length-1].sequence,10);if(0===k.length)return this.deleteNeedlessBuffetAds(a);k.forEach(function(d){var k=c.shift();if(k){var g=a.indexOf(d);k.sequence=d.sequence+.1;d.fallbackType&&"waterfall"===d.fallbackType&&(g=a.indexOf(k),k.sequence=e++);d.replaced=!0;a.splice(g,k)}})}};z.prototype.deleteNeedlessBuffetAds=function(a){if(0!==a.length&&!isNaN(a[0].sequence))for(var d=
a.length;d--;)isNaN(a[d].sequence)&&a.splice(d,1)};z.prototype.bySequence=function(a,d){return a.sequence-d.sequence||(a.sequence||Infinity)-(d.sequence||Infinity)||0};z.prototype.hasValidCreatives=function(a){return 0<a.creatives.filter(function(a,d,c){d=a.mediaFiles&&0<a.mediaFiles.length;var k=a.variations&&0<a.variations.length;return 0<c.length&&(d||k)?k&&!d?0<a.variations.filter(function(a){return!0===a.hasCreative}).length:!0:!1}).length};z.prototype.isBrokenAd=function(a){return!a||a.hasError||
a.fetched&&!this.hasValidCreatives(a)};z.prototype.getClosestIndexOfNextValidAd=function(a,d){var c=this,k=Infinity;a.map(function(a,g){var e=Math.abs(k-d),m=Math.abs(g-d);!c.isBrokenAd(a)&&m<e&&g!==d&&(k=g)});return Infinity===k?-1:k};z.prototype.parse=function(a,d,c,k){d=void 0===d?{}:d;k=void 0===k?[]:k;var g=a;c=void 0===c?function(){}:c;var e=d;"function"===typeof d&&(c=d,e={});this.blockInsecureURL=e.blockInsecureURL||!1;this.maxWrapperDepth=e.maxWrapperDepth||10;for(d=this.URLTemplateFilters.length-
1;0<=d;d--)g=(0,this.URLTemplateFilters[d])(a);k.push(g);this.blockInsecureURL&&!D.isSecureURL(g)?c({errorCode:310,errorMessage:"Mixed Content: This request has been blocked; the ad-request must be served over HTTPS."},null):(new l).get(g,e,this.urlResponseHandler.bind(this,a,k,e,c))};window.VASTParser=z})()})();var Ha={};function Ja(c){return encodeURIComponent(c).replace(/[!'()*]/g,function(c){return"%"+c.charCodeAt(0).toString(16)})}function Ma(c,f){return Array(Math.max((void 0===f?2:f)-String(c).length+1,0)).join(0)+c}
function Na(c,f){f=void 0===f?{}:f;for(var l=[],p=ea.makeIterator(["ASSETURI","CONTENTPLAYHEAD"]),C=p.next();!C.done;C=p.next())C=C.value,f[C]=Ja(f[C]);null===f.ERRORCODE||/^[0-9]{3}$/.test(f.ERRORCODE)||(f.ERRORCODE=900);f.CACHEBUSTING=Ma(Math.round(1E8*Math.random()),8).toString();f.TIMESTAMP=Ja((new Date).toISOString());f.RANDOM=f.random=f.CACHEBUSTING;for(p=0;p<c.length;p++)if(C=c[p]){for(var J=ea.makeIterator(Object.entries(f)),F=J.next();!F.done;F=J.next())var R=ea.makeIterator(F.value),F=R.next().value,
R=R.next().value,S="%%"+F+"%%",T=F,C=C.replace("["+F+"]",R),C=C.replace(S,R),C=C.replace(T,R);l.push(C)}return l}Ha.encodeURIComponentRFC3986=Ja;Ha.pad=Ma;Ha.resolveURLTemplates=Na;Ha.track=function(c,f){for(var l=Na(c,f),p=0;p<l.length;p++){var C=l[p];window&&((new Image).src=C)}};var Oa={listVersions:function(c,f){for(var l=[c.getVersion()],p=f.length-1;0<=p;p--){var C=f[p];C.getVersion&&l.push(C.getVersion())}console.log(l)}};var Pa={},Qa,Ua=window.getComputedStyle(document.documentElement,""),Va=(Array.prototype.slice.call(Ua).join("").match(/-(moz|webkit|ms)-/)||""===Ua.OLink&&["","o"])[1],Wa="WebKit|Moz|MS|O".match(new RegExp("("+Va+")","i"))[1];Qa={js:Va[0].toUpperCase()+Va.substr(1),dom:Wa,css:"-"+Va+"-",lowercase:Va};Pa.prefix=Qa;var Xa={};function Ya(c){var f=[];f.forEach.call(f.slice.call(arguments,1),function(f){if(f)for(var p in f)({}).hasOwnProperty.call(f,p)&&(c[p]="object"===typeof c[p]&&"object"===typeof f[p]&&null!==f[p]?Ya(c[p],f[p]):f[p])});return c}Xa.extend=Ya;var Za={PublisherConfig:function(c){var f={adRequest:"",adResponse:"",timeText:"",headerText:"Advertisement",skipText:"",skipOffset:-1,uiLayout:"minimal",volume:.75,visibilityThreshold:50,behaviourMatrix:{},featureMatrix:{},prefetching:!1,onCappedCallback:function(){},onStartCallback:function(){},onEndCallback:function(){},onEventCallback:function(){},onPrefetchCompleteCallback:function(){},onClickThruCallback:function(){},minElementHeight:30,forceCollapseOnShutdown:!0,parentProspectorValue:null},
l={flash:{enabled:!1,source:""},layout:{enabled:!0,source:[]},endingScreen:{enabled:!0,source:""},bestFit:{enabled:!0},formats:{wide:!0,square:!0,vertical:!0},formatChange:{inline:["wide","vertical","square"],fullscreen:["wide","vertical"]}},p={init:{collapsed:!0,paused:!0,muted:!0},onScreen:{collapsed:!1,paused:!1,muted:!0},offScreen:{collapsed:!1,paused:!0,muted:!0},complete:{collapsed:!0,paused:!1,muted:!0},onClick:{collapsed:!1,paused:!0,muted:!0},mouseOver:{collapsed:!1,paused:!1,muted:!0},mouseOut:{collapsed:!1,
paused:!1,muted:!0}},C={};return function(c){c.behaviourMatrix=Xa.extend(p,c.behaviourMatrix);c.behaviourMatrix.init.muted=!0;c.featureMatrix=Xa.extend(l,c.featureMatrix);return C=Xa.extend(f,c)}(c)}};var cb={BaseAPI:function(c,f,l){function p(){}var C=f.debug||!1,J={utils:{},model:{},controller:{},view:{}};J.publisherConfig=new Za.PublisherConfig(f);J.elements=null;J.debug=(C?console.log:p||p).bind(console,"[SmartPlay (4.12.0-gb8fd472)]");J.info=(2<=C?console.info:p||p).bind(console,"[SmartPlay Info (4.12.0-gb8fd472)]");J.getVersion=function(){return"4.12.0-gb8fd472"};J.shutdown=function(){(f.onShutdown||p)(c);J.elements.iframe.parentNode&&c.removeChild(J.elements.iframe);J.elements.backdrop.parentNode&&
c.removeChild(J.elements.backdrop);delete l[c.getAttribute("data-smartPlay-instance-id")];c.removeAttribute("data-smartPlay-instance-id");J.elements.nodes&&0<J.elements.nodes.length&&J.elements.nodes[0].style.removeProperty("transition");c.id&&-1!==c.id.indexOf("sc-")&&c.parentNode&&c.parentNode.removeChild(c)};(function(){c.style.transition=c.style[Pa.prefix.js+"Transition"]="height 0.5s";c.style.position="relative";c.style.overflow="hidden";var f=c.id.replace(/\W+/g,"-");c.insertAdjacentHTML("beforeend",
'<div id="'+f+'-backdrop" style="width: 100%; height: inherit; position: absolute; border: 0; margin: 0; top: 0; left: 0;;pointer-events: none;"></div>');c.insertAdjacentHTML("beforeend",'<iframe id="'+f+'-frame" frameborder="0" scrolling="no" style="width: 100%; height: inherit; position: absolute; border: 0; margin: 0; top: 0; left: 0;"></iframe>');J.elements={iframe:c.querySelector("#"+f+"-frame"),backdrop:c.querySelector("#"+f+"-backdrop")};J.elements.iframeDocument=J.elements.iframe.contentDocument;
J.elements.iframeDocument.open().write("<!doctype html><html><head></head><body></body></html>");J.elements.iframeDocument.close()})();return J}};(window.ElementLocator=function db(f,l){function p(f,e){return"undefined"===typeof f?e:f}function C(){}function J(f){for(var e=[];f.parentNode;)if(null!==f.getAttribute("id")){e.unshift("#"+f.getAttribute("id"));break}else{if(f===f.ownerDocument.documentElement)e.unshift(f.tagName.toLowerCase());else{for(var t=f,h=1,h=1;t.previousElementSibling;h++)t=t.previousElementSibling;e.unshift(f.tagName.toLowerCase()+":nth-child("+h+")")}f=f.parentNode}return e.join(">")}function F(){if(!H)return null;var f=
Array.prototype.slice.call(u.querySelectorAll("img")),e={};Array.prototype.slice.call(u.querySelectorAll("p")).forEach(function(f){var h=J(f.parentNode);e[h]=e[h]||{a:0,height:0};e[h].a+=1;e[h].height+=f.getBoundingClientRect().height;e[h].node=f.parentNode});f.forEach(function(f){for(var h=f;h.parentNode;){var q=J(h.parentNode);if(e[q]){e[q].a+=1;e[q].height+=f.getBoundingClientRect().height;break}h=h.parentNode}});return(f=Object.keys(e).sort(function(f,h){return e[h].height-e[f].height}))&&0<f.length?
e[f[0]]:null}function R(f,e){var t=f.getBoundingClientRect(),h=e.getBoundingClientRect();return t.top<h.top?-1:t.top>h.top?1:0}function S(){var f=F();V("located content block",f);var e=0,t=null,h=["div","p","section"].map(function(a){return 0<W.length?a+W.split("/").join("\\/"):a}),q=u.body.getBoundingClientRect(),r=u;f&&(r=f.node);f=Array.prototype.slice.call(r.querySelectorAll(h.join(",")));[].sort.call(f,R);if(0<W.length&&1===f.length)return V("only located one element based on",W,"stopping further checks"),
f[0];U&&(O=D+O,D=0);h=[];V("elements found in the content block",f);for(r=0;r<f.length;r++){var b=f[r].getBoundingClientRect(),b=f[r].offsetTop||b.top-q.top,d=f[r].offsetWidth;d<=v?V("skipping element",f[r],"because it does not match height or is smaller than",v):b>D&&b<D+O&&(V(f[r],"in close inspection"),d>=e&&(e=d,h.push(f[r]),V("selected",f[r],e,d)))}0<h.length&&(t=h[Math.floor(h.length/2)],V("suitableElements collected",h,"and in the end",t,"selected"));return t}var T={},G=p(l,{}),Z=p(f,db.b),
O=p(G.scanPixelsBelowViewport,600),v=p(G.minimumElementWidth,320),P=p(G.elementFloat,"none"),U=p(G.allowInViewport,!1),W=p(G.elementSelector,""),K=p(G.insertPosition,"afterend"),H=p(G.locateContent,!0),D=0,u=document,V=(p(G.debug,!1)?console.log:C||C).bind(console,"[ElementLocator (unversioned-dev)]");T.c=function(){return"unversioned-dev"};(function(){for(var f=window.frameElement,e=window;f;)e=f.ownerDocument.defaultView,f=e.frameElement;u=e.document;D=u.documentElement.clientHeight;(f=S())?(e=
u.createElement("div"),e.setAttribute("id",Z),e.style.cssFloat=P,f.insertAdjacentHTML?f.insertAdjacentHTML(K,e.outerHTML):f.appendChild(e),T.element=f,T.container=u.querySelector("#"+e.getAttribute("id")),T.containerId=e.getAttribute("id")):(V("could not locate a suitable element, bailing"),V("innerHeight",D,"options",l))})();return T}).b=window.ElementLocator.generateRandomID=function(){return"sc-"+Math.random().toString(36).substring(7)};var eb={onDocumentReady:function(c,f){var l=f||document;if("interactive"===l.readyState||"complete"===l.readyState)c.call();else{var p=setTimeout(function(){p=0;c.call()},2E3);l.onreadystatechange=function(){"interactive"===l.readyState&&p&&(clearTimeout(p),c.call())}}}};var fb={},gb=[],hb=[],jb=window.SmartPlay=function ib(f,l,p){function C(f,l,p){if(!f.getAttribute("data-smartPlay-instance-id")){f.setAttribute("data-smartPlay-instance-id",gb.length);var C=new cb.BaseAPI(f,l,gb);gb.push({api:C,element:f,config:l});eb.onDocumentReady(function(){hb.forEach(function(p){p(C,f,l)});C.listVersions=Oa.listVersions.bind(this,C,hb);(p||function(){})(C,f)},f.ownerDocument)}return gb[parseInt(f.getAttribute("data-smartPlay-instance-id"),10)].api}function J(f){var l=Object.prototype.toString.call(f);
return"[object Function]"===l||"function"===typeof f&&"[object RegExp]"!==l}return function(){if(J(f))return eb.onDocumentReady(function(){-1===hb.indexOf(f)&&gb.forEach(function(l){f(l.api,l.element,l.config)})}),hb.push(f);if("number"===typeof f||"undefined"===typeof f)return gb[f||0]?gb[f||0].api:null;if(f.nodeType)return null!==f.getAttribute("data-smartPlay-instance-id")?(gb[f.getAttribute("data-smartPlay-instance-id")]||{api:null}).api:l?C(f,l,p):null;if("string"===typeof f&&0<f.length){var F=
f;-1===F.lastIndexOf("#",0)&&-1===F.lastIndexOf(".",0)&&(F+=", #"+F+", ."+F);return(F=ua.findRecursiveUp(F)[0])&&ib(F,l,p)}if(J(ElementLocator)){(F=l)||(F={elementLocator:{}});F.elementLocator?F.elementLocator.debug=F.debug:F.elementLocator={debug:F.debug};var R=new ElementLocator(ElementLocator.generateRandomID(),F.elementLocator);if(R.element)return F.locatedElement=R.element,ib(R.container,F,p)}return null}()};fb.smartPlay=jb;function mb(){this.states=[]}mb.prototype.addState=function(c){c.valid&&(c.initialize(),this.states.push(c))};mb.prototype.removeState=function(c){this.states=this.states.filter(function(f){return f.id===c?(f.destroy(),!1):!0})};mb.prototype.removeAllStates=function(){for(var c=this.states.length-1;0<=c;c--)this.states[c].destroy();this.states=[]};mb.prototype.getState=function(c){return this.states.filter(function(f){return f.id===c?!0:!1}).shift()};
mb.prototype.isActive=function(c){return(this.getState(c)||{}).active||!1};var nb={};function ob(c){var f=[];for(c=c.parentNode;c;){var l=c.ownerDocument,p=null;l&&(p=l.defaultView);p&&p.frameElement&&(f.unshift(p.frameElement),f=ob(p.frameElement).concat(f));f.unshift(c);c=c.parentNode}return f.splice(2)}nb.elementParentNodes=ob;nb.parentNodes=function(c,f){var l=ob(c),p=l.length-1;for(isNumber(f)?p=f:isString(f)&&ua.findRecursiveUp(f);0<=p;p--)if(l[p].getBoundingClientRect().height>minHeight)return l.splice(p+1);return[]};var pb={};function qb(){return!!window._smartclip_amp}pb.isAmp=qb;pb.isAmpObserveIntersection=function(){return qb()&&!(!window.context||!window.context.observeIntersection)};function rb(c){this.id=c.id||Math.random().toString(36).substring(7);this.options=c;for(var f in this.options)this.options.hasOwnProperty(f)&&"function"===typeof this.options[f]&&(this.options[f]=[this.options[f]]);this.valid=!0;this.active=!1}rb.prototype.callMethods=function(c){if(c)for(var f=c.length,l=[].slice.call(arguments),p=0;p<f;p++)if(!c[p].apply(this,l))return!1;return!0};rb.prototype.destroy=function(){};rb.prototype.initialize=function(){};
rb.prototype.enter=function(){this.callMethods(this.options.canEnter)&&(this.callMethods(this.options.onFirstRun),this.callMethods(this.options.onEnter),this.options.onFirstRun=[],this.active=!0)};rb.prototype.exit=function(){this.callMethods(this.options.canLeave)&&(this.callMethods(this.options.onLeave),this.active=!1)};var sb={},tb=null;function ub(){return pb.isAmp()||window!==top}sb.isIF=ub;sb.isFIF=function(){return!pb.isAmp()&&ub()&&null!==window.frameElement};sb.topLevelWindow=function(c){if(!pb.isAmp())return window;var f=window.frameElement,l=window;if(!c&&tb)return tb;for(;f;)(c||function(){})(f),l=f.ownerDocument.defaultView,f=l.frameElement;return tb=l};fb.smartPlay(function(c){c.utils=c.utils||{};c.utils.topLevelWindow=sb.topLevelWindow.bind(c);c.utils.getTopBoundingClientRect=function(c){var l=c.getBoundingClientRect(),l={bottom:l.bottom,height:l.height,left:l.left,right:l.right,top:l.top,width:l.width};c=c.ownerDocument.defaultView;for(c=c.frameElement;null!==c;){var p=c.getBoundingClientRect();l.left+=p.left;l.top+=p.top;l.right=l.left+l.width;l.bottom=l.top+l.height;c=c.ownerDocument.defaultView;c=c.frameElement}return l};c.utils.isIF=sb.isIF.bind(c);
c.utils.isFIF=sb.isFIF.bind(c);c.utils.browserInfo=function(){var c=navigator.userAgent,l,p=c.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[],C={browser:null,version:0};if(/trident/i.test(p[1]))return l=/\brv[ :]+(\d+)/g.exec(c)||[],C.browser="MSIE",C.version=parseInt(l[1]||0,10),C;if("Chrome"===p[1]&&(l=c.match(/\b(OPR|Edge)\/(\d+)/),null!==l))return C.browser=l.slice(1).join(" ").replace("OPR","Opera"),C;p=p[2]?[p[1],p[2]]:[navigator.appName,navigator.appVersion,"-?"];
l=c.match(/version\/(\d+)/i);null!==l&&p.splice(1,1,l[1]);C.browser=p[0];C.version=parseInt(p[1],10);return C}();c.utils.isAmp=pb.isAmp.bind(c);c.utils.isAmpObserveIntersection=pb.isAmpObserveIntersection.bind(c)});var vb={Visibility:function(c,f,l){function p(l){var p;l||(l=f.utils.getTopBoundingClientRect(c));F.top=l.top;F.left=l.left;F.bottom=l.top+F.height;F.right=l.left+F.width;var C=window.top;f.utils.isAmp()&&(l=window.context.initialIntersection.rootBounds,C={innerHeight:l.height,innerWidth:l.width});l=C.innerHeight;p=C.innerWidth;var G=F,C=0,Z=G.width*G.height;l=((G.right<p?G.right:p)-(0<G.left?G.left:0))*((G.bottom<l?G.bottom:l)-(0<G.top?G.top:0));0<l&&(C=l/Z);J.visibility=100*C}function C(){f.utils.isAmpObserveIntersection()&&
window.context.observeIntersection(function(c){c.forEach(function(c){p(c.boundingClientRect)})})}var J={visibility:0,distance:Infinity},F={width:l.width,height:l.height};J.update=function(c){c&&(F={width:c.width,height:c.height});f.utils.isAmp()||p()};f.utils.isAmp()&&C();return J}};function wb(c,f,l){rb.call(this,l);this.visibilityModel=new vb.Visibility(c,f,f.size);this.topLevelWindow=f.utils.topLevelWindow();this.api=f}ea.inherits(wb,rb);
wb.prototype.initialize=function(){var c=this;rb.prototype.initialize.call(this);this.valid&&(this.visibilityModel.update(this.api.size),this.updateTimeout=setInterval(function(){c.visibilityModel.update(c.api.size);c.api.environmentVars.visibilityPercent=c.visibilityModel.visibility;c.visibilityModel.visibility>=(c.options.requiredVisibility||50)?c.enter():c.exit()},this.options.reportInterval||50))};
wb.prototype.destroy=function(){this.updateTimeout&&(clearInterval(this.updateTimeout),this.updateTimeout=null)};fb.smartPlay(function(c,f,l){function p(){if(c.elements.nodes&&0<c.elements.nodes.length){var f=c.elements.nodes[0].style.overflow;c.elements.nodes[0].style.overflow="hidden";c.elements.nodes[0].style.height="0px";setTimeout(function(){c.elements.nodes[0].style.overflow=f},500)}}function C(c){var f=window.getComputedStyle(c);c=parseFloat(f.marginTop)+parseFloat(f.marginBottom);f=parseFloat(f.paddingTop)+parseFloat(f.paddingBottom);return c+f}function J(){var l=0;if(c.elements.nodes&&!(c.elements.nodes&&
1>c.elements.nodes.length))for(var p=c.elements.nodes.length-1;0<=p;p--){var K=c.elements.nodes[p],H=K.childNodes,D=K.getAttribute("sc-size");if(!D||parseInt(D,10)!==c.size.height){for(var D=window.getComputedStyle(K,":before"),u=C(K),l=l+u,u=H.length-1;0<=u;u--){var v=H[u];if(v.nodeType===Node.ELEMENT_NODE&&-1===c.elements.nodes.indexOf(v)&&v!==f)var I=C(v),l=l+Math.ceil(v.getBoundingClientRect().height+I)}D.content&&(l+=parseInt(D.lineHeight,10));K.style.height=c.size.height+l+"px";K.setAttribute("sc-size",
c.size.height)}}}function F(p){p=(p||f).getBoundingClientRect();var v=c.utils.topLevelWindow()||window,K=v.msMatchMedia||v.MozMatchMedia||v.WebkitMatchMedia||v.matchMedia,v=16/9;"undefined"!==typeof K&&c.environmentVars&&(K("(orientation: portrait)").matches&&c.environmentVars.hasVerticalAds?v=.5625:K("(orientation: portrait)").matches&&c.environmentVars.hasSquareAds&&(v=1));var H=K=p.width;H>=l.minAdWidth&&H<=l.maxAdWidth||(p.width>l.maxAdWidth?K=l.maxAdWidth:p.width<l.minAdWidth&&(K=0));return{width:Math.round(K),
height:Math.round(K/v)}}function R(){v=context.onResizeDenied(function(f,l){c.info("AMP denied the resize to",f,l)});P=context.onResizeSuccess(function(f,l){c.info("AMP successfully resized to",f,l)})}function S(){O=setInterval(function(){c.canExpand()&&c.resize()},1E3/15)}var T={};c.controller=c.controller||{};c.controller.sizeManager=T;var G=new mb;c.size={width:0,height:0};var Z=!1,O=null;T.collapseContainer=function(l){l=l||pb.isAmp()||!1;if(Z||l)f.style.height="0px",pb.isAmp()&&(c.info("AMP",
"collapseContainer","requestResize",c.size.width),context.requestResize(0,0)),p(),Z=!1};T.expandContainer=function(l){if(!Z||l){f.style.height=c.size.height+"px";pb.isAmp()&&c.canExpand&&(c.info("AMP","expandContainer","requestResize",c.size),context.requestResize(c.size.width,c.size.height));if(c.elements.nodes&&1<c.elements.nodes.length){var p=c.elements.nodes[0].style.overflow;c.elements.nodes[0].style.overflow="hidden";setTimeout(function(){c.elements.nodes[0].style.overflow=p},500)}J();Z=!0}};
c.resize=function(){var l=F();if(c.size.width!==l.width||c.size.height!==l.height)pb.isAmp()&&(c.info("AMP","requestResize",l),context.requestResize(l.width,l.height)),c.size=l,c.environmentVars.size=c.size,c.elements.iframe.style.width=l.width+"px",c.elements.iframe.style.height=l.height+"px",c.elements.backdrop.style.width=l.width+"px",c.elements.backdrop.style.height=l.height+"px",f.style.height=l.height+"px"};var v=null,P=null;Ca.hookBefore(c,"shutdown",function(){G.removeAllStates();if(c.elements.nodes&&
c.elements.nodes.length)for(var f=c.elements.nodes.length-1;0<=f;f--){var l=c.elements.nodes[f];l.style.cssText=l.getAttribute("data-smartplay-cssText")}clearInterval(O);O=null;c.utils.isAmp()&&(v&&v(),P&&P())});(function(){var p=c.publisherConfig,v=f.getBoundingClientRect(),K=f;1>=v.width&&(v=nb.parentNodes(f,p.minElementHeight))&&0<v.length&&(c.debug("found",v,"using",v[0],"as size reference"),K=v[0]);K=c.size=F(K);1>K.width?(l.prefetching=p.prefetching=!1,setTimeout(function(){c.shutdown()},100),
c.debug("could not fit into",l.minAdWidth,"calling shutdown")):(c.elements.iframe.style.width=K.width+"px",c.elements.iframe.style.height=K.height+"px",c.elements.backdrop.style.width=K.width+"px",c.elements.backdrop.style.height=K.height+"px",G.addState(new wb(f,c,{requiredVisibility:1,canEnter:c.isReady,onFirstRun:function(){}})),c.utils.isAmp()&&R(),S())})()});function zb(c,f,l){rb.call(this,l);this.element=f.utils.topLevelWindow()}ea.inherits(zb,rb);zb.prototype.initialize=function(){var c=this;rb.prototype.initialize.call(this);this.element.addEventListener("touchmove",function(){c.enter()},!1);this.element.addEventListener("touchend",function(){c.exit()},!1);this.element.addEventListener("touchcancel",function(){c.exit()},!1)};function Ab(c,f){rb.call(this,f);this.element=c}ea.inherits(Ab,rb);Ab.prototype.initialize=function(){var c=this;rb.prototype.initialize.call(this);this.element.addEventListener("mouseover",function(){c.enter()},!1);this.element.addEventListener("mouseout",function(){c.exit()},!1)};ea.initSymbol();Symbol();
function Bb(c,f,l){rb.call(this,l);this.api=f;"undefined"!==typeof document.hidden?(this.hidden="hidden",this.visibilityChange="visibilitychange"):"undefined"!==typeof document.mozHidden?(this.hidden="mozHidden",this.visibilityChange="mozvisibilitychange"):"undefined"!==typeof document.msHidden?(this.hidden="msHidden",this.visibilityChange="msvisibilitychange"):"undefined"!==typeof document.webkitHidden&&(this.hidden="webkitHidden",this.visibilityChange="webkitvisibilitychange");if("undefined"===
typeof document.addEventListener||"undefined"===typeof this.hidden)f.debug("Page Visibility API unsupported."),this.valid=!1;this.visibilityChangeHandler=this.handleVisibilityChange.bind(this)}ea.inherits(Bb,rb);Bb.prototype.handleVisibilityChange=function(){document[this.hidden]?this.enter():this.exit()};Bb.prototype.initialize=function(){rb.prototype.initialize.call(this);this.valid&&document.addEventListener(this.visibilityChange,this.visibilityChangeHandler,!1)};
Bb.prototype.destroy=function(){document.removeEventListener(this.visibilityChange,this.visibilityChangeHandler,!1)};var Cb={};
fb.smartPlay(function(c){c.model=c.model||{};c.model.EnvironmentVars=function(){var c={},l=this;l.observe=function(p,C){c.hasOwnProperty(p)?(c[p].observers.push(C),null!==c[p].value&&C(c[p].value)):(l.hasOwnProperty(p)&&!c.hasOwnProperty(p)?c[p]={value:l[p],observers:[C]}:c[p]={value:null,observers:[C]},Object.defineProperty(l,p,{set:function(l){c[p].value!==l&&(c[p].value=l,c[p].observers.forEach(function(l){l(c[p].value)}))},get:function(){return c[p].value},enumerable:!0,configurable:!0}))};l.disconnect=
function(p,C){l.hasOwnProperty(p)&&(c[p].observers=[],Object.defineProperty(l,p,{set:void 0}),!0===C&&(delete c[p],delete l[p]))};l.remove=function(p){l.hasOwnProperty(p)&&(l.disconnect(p),delete c[p],delete l[p])};return l}});Cb.ENGINE_HTML5="HTML5";var Db={CampaignOverrideConfig:function(c,f){function l(f){f.children.filter(function(f){if(c.publisherConfig.hasOwnProperty(f.name)&&f.value&&0===f.children.length)c.publisherConfig[f.name]=f.value;else if(0<f.children.length){var l=f.name;f.children.filter(function(f){if(c.publisherConfig[l].hasOwnProperty(f.name)&&f.attributes)for(var p=ea.makeIterator(Object.keys(f.attributes)),C=p.next();!C.done;C=p.next())C=C.value,c.publisherConfig[l][f.name][C]="true"===f.attributes[C];else f.attributes&&
(c.publisherConfig[l][f.name]=f.attributes)})}})}f.subscribe(function(c,f){if(f&&f.extensions&&0<f.extensions.length)for(var J=0;J<f.extensions.length;J++){var F=f.extensions[J];"SmartPlayConfig"===F.attributes.name&&l(F)}},"AdLoaded")}};fb.smartPlay(function(c){function f(c,f){function l(){c.apply(this,arguments);J.unsubscribe(l,f)}J.subscribe(l,f)}function l(f,l){var p=l.ads.filter(function(c){return!c.errorCode})||[],T=p.filter(function(c){return 0<c.creatives[0].mediaFiles.filter(function(c){return c.attributes?c.attributes.format===ois.MediaFileFormat.VERTICAL:c.width<c.height}).length}),p=p.filter(function(c){return 0<c.creatives[0].mediaFiles.filter(function(c){return c.attributes?c.attributes.format===ois.MediaFileFormat.SQUARE:
c.width===c.height}).length});J&&J.adManager&&J.removeRules&&J.adManager.removeRules("format");J.adManager.addRuleToRuleSet({format:ois.MediaFileFormat.WIDE});T.length&&C.featureMatrix.formats.vertical&&(c.environmentVars.hasVerticalAds=!0,c.info(">> SizeBasedFormat.js::getMediaFileFormats() -- setVertical to true"),J.adManager.addRuleToRuleSet({format:ois.MediaFileFormat.VERTICAL}));p.length&&C.featureMatrix.formats.square&&(c.environmentVars.hasSquareAds=!0,J.adManager.addRuleToRuleSet({format:ois.MediaFileFormat.SQUARE}))}
var p={};c.controller=c.controller||{};c.controller.sizeBasedFormat=p;var C={},J=null;p.setVPAIDAd=function(c){J=c;C.featureMatrix.bestFit.enabled&&f(l,"AdTagParsed")};C=c.publisherConfig});function Eb(c,f,l){wb.call(this,c,f,l);this.originalCreateTracker=null;this.collectedTrackers=[];this.shudownCalled=!1;this.api=f;this.options=l;f.publisherConfig.prefetching||(this.valid=!1)}ea.inherits(Eb,wb);
Eb.prototype.oisTrackerCollector=function(c,f,l,p){var C=p.adManager;(function(){var f=this;this.originalCreateTracker=C.trackingController().createTracker;C.trackingController().createTracker=function(c){c.trackEvent&&"error"===c.trackEvent&&f.collectedTrackers.push(c)};c.subscribe(function(){C.trackingController().createTracker=f.originalCreateTracker},"AdStarted")}).apply(this)};
Eb.prototype.fireCollectedTrackers=function(){for(var c=0;c<this.collectedTrackers.length;c++)this.originalCreateTracker(this.collectedTrackers[c]);this.collectedTrackers=[]};Eb.prototype.shudownOverride=function(){this.shudownCalled=!0;this.visibilityModel.visibility>=(this.options.requiredVisibility||50)&&(this.fireCollectedTrackers(),this.originalShutdown())};Eb.prototype.destroy=function(){wb.prototype.destroy.call(this)};
Eb.prototype.onVisible=function(){this.fireCollectedTrackers();this.shudownCalled&&this.originalShutdown()};Eb.prototype.enter=function(){wb.prototype.enter.call(this);this.onVisible()};Eb.prototype.initialize=function(){wb.prototype.initialize.call(this);this.valid&&(this.api.publisherConfig.prefetching&&(this.originalShutdown=this.api.shutdown,this.api.shutdown=this.shudownOverride.bind(this)),ois(this.oisTrackerCollector.bind(this)))};fb.smartPlay(function(c){c.model=c.model||{};c.model.PlayerInterface=function(){return{dom:{nodes:[{tag:"div",attributes:{id:"slots-wrapper"},nodes:[{tag:"video",attributes:{id:"video-slot","class":"back-color",preload:"auto","data-bind":"volume: volume, click: triggerClickThrough",src:""}},{tag:"div",attributes:{id:"click-slot","class":"","data-bind":"click: triggerClickThrough, hidden: isVPAID",style:"width: 100%; height: 100%; position: absolute; top: 0; left: 0"}}]},{tag:"div",attributes:{id:"replay-ui",
"class":"minimal paused",style:"display: none;","data-bind":"class: playState"},nodes:[{tag:"div",attributes:{id:"buttonbar","class":"front-hl-color"},nodes:[{tag:"div",attributes:{style:"display: table-row"},nodes:[{tag:"div",attributes:{"class":"button click-through back-color left","data-bind":"click: triggerClickThrough"},nodes:[{tag:"div",nodes:[{tag:"span",attributes:{"class":"scmp-web"}}]}]},{tag:"div",attributes:{"class":"button click-through back-color","data-bind":"click: toggleRePlay"},
nodes:[{tag:"div",nodes:[{tag:"span",attributes:{"class":"scmp-play"}}]}]}]}]},{tag:"div",attributes:{id:"controlbar","class":"front-hl-color"},nodes:[{tag:"div",attributes:{style:"display: table-row"},nodes:[{tag:"div",attributes:{id:"progress"},nodes:[{tag:"div",attributes:{id:"progress-bg","class":"back-std-color light"}},{tag:"div",attributes:{id:"progress-bar","class":"back-hl-color","data-bind":"style: percentCloseTimeout"}}]}]}]}]},{tag:"div",attributes:{id:"player-ui","class":"paused",style:"display: none;",
"data-bind":"class: playState"},nodes:[{tag:"div",attributes:{id:"header","class":"front-std-color text-shadow"},nodes:[{tag:"div",attributes:{id:"countdown","data-bind":"innerHTML: headerText, style: validDuration"}}]},{tag:"div",attributes:{id:"big-play","class":"button front-hl-color text-shadow","data-bind":"click: togglePlay"},nodes:[{tag:"span",attributes:{"class":"scmp-big-play"}}]},{tag:"div",attributes:{id:"skipbar","class":"front-hl-color"},nodes:[{tag:"div",attributes:{style:"display: table-row"},
nodes:[{tag:"div",attributes:{id:"skip","class":"button back-color front-hl-color","data-bind":"click: skip"},nodes:[{tag:"div",attributes:{"data-bind":"innerHTML: skipText"}},{tag:"div",attributes:{"class":"wrapper"},nodes:[{tag:"span",attributes:{"class":"skip-close scmp-plus rotate-45"}},{tag:"canvas",attributes:{width:"28",height:"28","class":"skip-countdown enabled"}}]}]},{tag:"div",attributes:{id:"play-ios","class":"button back-color","data-bind":"click: togglePlay"},nodes:[{tag:"div",nodes:[{tag:"span",
attributes:{"class":"scmp-play"}}]}]},{tag:"div",attributes:{"class":"button click-through back-color","data-bind":"click: triggerClickThrough"},nodes:[{tag:"div",nodes:[{tag:"span",attributes:{"class":"scmp-web"}}]}]}]}]},{tag:"div",attributes:{id:"controlbar","class":"back-color front-hl-color"},nodes:[{tag:"div",attributes:{style:"display: table-row"},nodes:[{tag:"div",attributes:{id:"play","class":"button","data-bind":"click: togglePlay"},nodes:[{tag:"div",nodes:[{tag:"span",attributes:{"class":"scmp-play"}}]}]},
{tag:"div",attributes:{id:"progress"},nodes:[{tag:"div",attributes:{id:"progress-bg","class":"back-std-color light"}},{tag:"div",attributes:{id:"progress-loaded","class":"back-std-color","data-bind":"style: percentLoaded"}},{tag:"div",attributes:{id:"progress-bar","class":"button back-hl-color","data-bind":"click: seek, style: percentPlayed"}}]},{tag:"div",attributes:{id:"progress-text","data-bind":"style: validTimeText"},nodes:[{tag:"span",attributes:{"class":"front-hl-color","data-bind":"innerHTML: timeText, style: validDuration"}}]},
{tag:"div",attributes:{id:"sound"},nodes:[{tag:"div",attributes:{id:"volume-increase","class":"button","data-bind":"click: volumeChange"},nodes:[{tag:"span",attributes:{"class":"scmp-plus"}}]},{tag:"div",attributes:{id:"volume-level","class":"button","data-bind":"click: toggleMute"},nodes:[{tag:"span",attributes:{"class":"scmp-volume-0-mute scmp-volume-25 scmp-volume-50 scmp-volume-75 scmp-volume-100","data-bind":"class: volumeLevel"}}]},{tag:"div",attributes:{id:"volume-decrease","class":"button",
"data-bind":"click: volumeChange"},nodes:[{tag:"span",attributes:{"class":"scmp-minus"}}]}]}]}]}]}],attributes:{"class":"back-color",style:"margin: 0; padding: 0; width: 100%; height: 100%;","data-bind":"class: uiLayout"}}}}});Number.isFinite=Number.isFinite||function(c){return"number"===typeof c&&isFinite(c)};Object.entries||(Object.entries=function(c){for(var f=Object.keys(c),l=f.length,p=Array(l);l--;)p[l]=[f[l],c[f[l]]];return p});function Fb(c,f){this.view=c;this.color=f;this.skipUI=this.view.querySelector("#skip");this.canvas=this.view.querySelector("#skip canvas");this.outerRadius=this.canvas.width/2;this.innerRadius=this.outerRadius-5;this.ctx=this.canvas.getContext("2d")}
Fb.prototype.countdown=function(c){var f=-1*Math.PI/2,l=this.innerRadius-2;c=Math.min(Math.max(0,1-c||1),1);this.ctx.clearRect(0,0,this.canvas.width,this.canvas.width);this.ctx.beginPath();this.ctx.arc(this.outerRadius,this.outerRadius,l,f,2*Math.PI*c+f,!1);this.ctx.strokeStyle=this.color;this.ctx.lineCap="butt";this.ctx.lineWidth=2;this.ctx.stroke();this.ctx.closePath()};Fb.prototype.activate=function(){this.skipUI.classList.add("active")};
Fb.prototype.deactivate=function(){this.skipUI.classList.remove("active");this.skipUI.classList.remove("enabled");this.countdown(0)};Fb.prototype.enable=function(){this.skipUI.classList.add("enabled")};Fb.prototype.getSeconds=function(c){c=Number.isFinite(c)?[c]:c.split(":");for(var f=0,l=1;0<c.length;)f+=l*parseInt(c.pop(),10),l*=60;return f};fb.smartPlay(function(c){c.controller=c.controller||{};c.controller.Player=function(){function f(a,b){var d=b||document.head,c=document.createElement("link");c.setAttribute("href",a);c.setAttribute("type","text/css");c.setAttribute("rel","stylesheet");d.appendChild(c)}function l(a,b){var d=b||document.body;a.nodes.forEach(function(a){var b=document.createElement(a.tag),c;for(c in a.attributes)("src"!==c||"src"===c&&V.prefetching)&&b.setAttribute(c,a.attributes[c]);a.content&&b.insertAdjacentHTML("beforeend",
a.content);a.nodes&&0<a.nodes.length&&l(a,b);d.appendChild(b)});for(var c in a.attributes)a.attributes[c]&&d.setAttribute(c,a.attributes[c])}function p(){var a=H.querySelector(".overlay #player-ui #controlbar");a&&a.classList.remove("active")}function C(){var a=H.querySelector(".overlay #player-ui #controlbar");a&&a.classList.add("active");clearTimeout(b);b=setTimeout(p,5E3)}function J(){H.querySelector("#volume-level > span").setAttribute("class","scmp-volume-0-mute")}function F(){function a(a){var b=
a;-1<a.indexOf("[")&&(b=a.replace(/\[currentTime\]/gi,parseInt(u.currentTime,10)).replace(/\[remainingTime\]/gi,parseInt(u.duration-u.currentTime,10)).replace(/\[duration\]/gi,parseInt(u.duration,10)).replace(/\[slotCurrentTime\]/gi,parseInt(e.getSlotDuration()-e.getSlotRemainingTime(),10)).replace(/\[slotRemainingTime\]/gi,parseInt(e.getSlotRemainingTime(),10)).replace(/\[slotDuration\]/gi,parseInt(e.getSlotDuration(),10)));return b}if(!(u.paused||(u.currentTime=I.currentTime||e.getAdDuration()-
e.getAdRemainingTime(),u.currentTime>u.duration))){Number.isFinite(u.duration)&&0<u.duration&&Number.isFinite(u.currentTime)&&(u.validDuration="visibility: visible");""!==V.timeText&&(u.validTimeText="display: table-cell");if(Number.isFinite(V.skipOffset)&&-1<V.skipOffset){var b=u.currentTime/V.skipOffset;Number.isFinite(b)&&"commercial"===u.variant&&(t.activate(),1>b?t.countdown(b):t.enable())}u.timeText=a(V.timeText);u.headerText=a(V.headerText);"commercial"===u.variant&&(u.percentPlayed="width: "+
100*(e.getSlotDuration()-e.getSlotRemainingTime())/e.getSlotDuration()+"%")}}function R(){J();for(var a=25;a<=100*u.volume;)H.querySelector("#volume-level > span").classList.add("scmp-volume-"+a),a+=25}function S(){var a=c.utils.getTopBoundingClientRect(c.elements.iframe);u.size&&u.size.width===parseInt(a.width,10)&&u.size.height===parseInt(a.height,10)||(u.size={width:parseInt(a.width,10),height:parseInt(a.height,10)})}function T(a,b,d){b.addEventListener(a,d);q.push({event:a,element:b,listener:d})}
function G(a,b,c){u.observe(c,function(c){a?(a.setAttribute&&a.setAttribute(b,c),a[b]=c):d("Couldn't deliver update for "+b+" set "+c+". Target not present.")});r.push({element:a,attribute:b,property:c})}function Z(a,b){for(var d=b.split(" ").join("").split(","),c=0;c<d.length;c++){var e=d[c].split(":"),h=e[0],e=e[1];"function"===typeof K[e]?T(h,a,K[e]):G(a,h,e)}}function O(){r.forEach(function(a){u.disconnect(a.property,!0)});q.forEach(function(a){a.element&&a.element.removeEventListener&&a.element.removeEventListener(a.event,
a.listener)});r=q=[]}function v(){u.videoSlot=I=H.querySelector("#video-slot");u.slot=H.querySelector("#display-slot");I.addEventListener("timeupdate",function(){u.currentTime=this.currentTime});I.addEventListener("loadedmetadata",function(){u.duration=this.duration});I.addEventListener("durationchange",function(){u.duration=this.duration});I.addEventListener("progress",function(){4===this.readyState&&(u.percentLoaded="width: "+100*this.buffered.end(0)/u.duration+"%")});I.addEventListener("volumechange",
function(){u.muted||R()});"overlay"===V.uiLayout&&T("mousemove",I,C);T("resize",H.defaultView,S);for(var a=H.querySelectorAll("[data-bind]"),b=0;b<a.length;b++)a[b].getAttribute("data-bind")&&0<a[b].getAttribute("data-bind").length&&Z(a[b],a[b].getAttribute("data-bind"))}function P(a){if(!a)return[!1,!1,{}];var b=a.apiFramework&&"VPAID"===a.apiFramework.toUpperCase(),d=a.adParameters;a=a.mimeType&&"application/x-shockwave-flash"===a.mimeType.toLowerCase();return[b,a,d]}function U(){function a(){d("[VPAID Event] AdVideoPause",
arguments);u.isVPAID&&(u.paused=!0,u.playState="paused")}G(e,"adVolume","volume");u.VPAIDHooks=[];e.subscribe(function(a,b){d("[VPAID Custom Event] AdMediaSelected",b);var h=ea.makeIterator(P(b)),f=h.next().value;h.next();h.next();f&&(u.isVPAID=!0,c.canInteract()||e.adManager.setAutoplay(!1),u.uiLayout&&0>u.uiLayout.indexOf("none")&&H.body.classList.add("none"))},"AdMediaSelected");e.subscribe(function(a,b){c.info("[VPAID Custom Event] AdTagParsed",b)},"AdTagParsed");e.subscribe(function(a,b){d("[VPAID Event] AdLoaded",
b,e.getVariant());u.variant&&u.variant!==e.getVariant()&&u.videoSlot.setAttribute("src",("file"===location.protocol?"https":location.protocol)+"//cdn.smartclip.net/assets/9999999/test/black.mp4");u.variant=e.getVariant();u.currentAd=b;-1<["commercial","sponsored"].indexOf(e.getVariant())&&u.replayModel.push(b);V.skipOffset=null!==b.creatives[0].skipDelay?t.getSeconds(b.creatives[0].skipDelay):u.originalSkipOffset},"AdLoaded");e.subscribe(function(){u.pausedByUser||(d("[VPAID Event] AdStarted",arguments,
I.currentTime),H.body.classList.remove("opener","commercial","bumper","sponsored","closer"),H.body.classList.add(u.variant),t.deactivate(),u.adSkipped=!1,clearInterval(h),h=setInterval(F,250),u.pausedByUser=!1,u.isVPAID&&(u.playState="playing",u.paused=!1),e&&u.muted&&e.setAdVolume(0),u.currentAd&&u.currentAd.creatives[0]&&(u.videoClicks={videoClickThroughURLTemplate:u.currentAd.creatives[0].videoClickThroughURLTemplate,videoClickTrackingURLTemplates:u.currentAd.creatives[0].videoClickTrackingURLTemplates}),
u.urlEnrichmentModel=e.utils.urlEnrichment.getCurrentModel()||{})},"AdStarted");e.subscribe(function(){d("[VPAID Event] AdVideoComplete",arguments);V.behaviourMatrix.complete.collapsed||(c.iOSExitFullscreen(),K.pausePlayback(),2<=I.readyState&&(I.currentTime=0),u.pausedByUser=!0)},"AdSlotComplete");e.subscribe(function(){d("[VPAID Event] AdStopped",arguments);V.skipOffset=u.originalSkipOffset;t.deactivate();u.currentAd=null},"AdStopped");e.subscribe(function(){u.duration=I.duration||e.getAdDuration()},
"AdDurationChange");e.subscribe(a,"AdPaused");e.subscribe(a,"AdVideoPause");e.subscribe(function(){d("[VPAID Event] AdSlotStarted",arguments);u.isVPAID&&(u.paused=!1,u.playState="playing");u.adSkipped=!1;!u.HTML5VPAIDStarted&&u.isVPAID&&V.prefetching&&c.canInteract()&&(u.HTML5VPAIDStarted=!0,e.adManager.startLinear(),e.adManager.triggerEvent("AdStarted"))},"AdSlotStarted");e.subscribe(function(){d("[VPAID Event] AdVideoResume",arguments);u.isVPAID&&(u.paused=!1,u.playState="playing")},"AdPlaying");
e.subscribe(function(){d("[VPAID Event] AdVolumeChange",arguments);u.volume=e.adVolume;K.volumeChange()},"AdVolumeChange");e.subscribe(function(){d("[VPAID Event] AdSkippableStateChange",arguments);t.activate();t.enable()},"AdSkippableStateChange")}function W(){u.playState=u.videoSlot.paused?"paused":"playing";u.paused=u.videoSlot.paused}var K=this,H=null,D={},u={},V={},I=null,e=null,t=null,h=0,q=[],r=[],b=0,d=c.debug;Ca.hookBefore(c,"shutdown",function(){O()});K.skip=K.skip=function(){d("[VPAIDInterface] In skipAd()");
e.skipAd();u.adSkipped=!0;t.deactivate()};K.pausePlayback=function(){u.paused||(d("[VPAIDInterface] In pauseAd()"),e.pauseAd(),u.paused=!0,I.removeAttribute("controls"))};K.resumePlayback=function(){u.paused&&!0!==c.environmentVars.pausedByUser&&(d("[VPAIDInterface] In resumeAd()"),e.resumeAd(),u.paused=!1)};K.toggleRePlay=K.toggleRePlay=function(){var a=u.replayModel.map(function(a){return{creatives:a.creatives.slice(0).map(function(a){a.trackingEvents={};return a}),extensions:a.extensions,impressionURLTemplates:[],
errorURLTemplates:[],sequence:a.sequence,variant:a.variant,info:a.info}});c.info("replayModel ads",a);u.replayModel=[];e.adManager.startAds(a)};K.togglePlay=K.togglePlay=function(){var a=c.elements.iframeDocument.body;a.querySelector(".ios:not(.unlocked) #play-ios .scmp-play")?(a.classList.add("unlocked"),u.toggleMuteByUser=!0,K.unmute(),e.resumeAd()):(u.paused?(u.pausedByUser=!1,K.resumePlayback()):(u.pausedByUser=!0,K.pausePlayback()),u.toggleMuteByUser||K.unmute())};K.triggerClickThrough=K.triggerClickThrough=
function(){var a=u.videoClicks&&u.videoClicks.videoClickThroughURLTemplate,b=u.videoClicks&&u.videoClicks.videoClickTrackingURLTemplates;if(u.isInApp){try{V.onClickThruCallback(u.videoClicks.videoClickThroughURLTemplate||null,!0)}catch(d){c.debug("onClickThruCallback failure",d)}c.pauseAd()}else a&&b?(Ha.track(u.videoClicks.videoClickTrackingURLTemplates,u.urlEnrichmentModel),window.open(u.videoClicks.videoClickThroughURLTemplate,"_blank")):e.adManager.clickThrough()};K.seek=K.seek=function(){};K.volumeChange=
K.volumeChange=function(a){var b=u.volume;u.volume=.25*Math.round(b/.25);null===a?R():void 0!==a&&("volume-increase"===a.target.id?(b+=.25,1<b&&(b=1)):"volume-decrease"===a.target.id&&(b-=.25,0>b&&(b=0)),u.volume=b,I.muted&&"volume-increase"===a.target.id?K.unmute():I.muted?(R(),setTimeout(function(){J()},1E3)):R())};K.mute=function(){J();u.muted=!0;I.muted=!0;I.setAttribute("muted",!0);e&&e.setAdVolume(0)};K.unmute=function(){R();u.muted=!1;I.muted=!1;I.removeAttribute("muted");e&&e.setAdVolume(u.volume)};
K.toggleMute=K.toggleMute=function(){u.toggleMuteByUser=!0;I.muted?K.unmute():K.mute()};K.initView=function(a,b){D=a;H=b;f("data:text/css;base64,LmJhY2stY29sb3J7YmFja2dyb3VuZC1jb2xvcjpyZ2JhKDMsMiwxLC44KTt0ZXh0LXNoYWRvdzpub25lIWltcG9ydGFudH0uYmFjay1zdGQtY29sb3J7YmFja2dyb3VuZC1jb2xvcjojYmViZWJlfS5mcm9udC1zdGQtY29sb3J7Y29sb3I6I2Y1ZjVmNX0uYmFjay1obC1jb2xvcntiYWNrZ3JvdW5kLWNvbG9yOiNmNWY1ZjV9LmZyb250LWhsLWNvbG9ye2NvbG9yOiNmNWY1ZjV9LnRleHQtc2hhZG93e3RleHQtc2hhZG93OjAgMCA2cHggIzVjNWM1Y30qey13ZWJraXQtYm94LXNpemluZzpib3JkZXItYm94Oy1tb3otYm94LXNpemluZzpib3JkZXItYm94O2JveC1zaXppbmc6Ym9yZGVyLWJveDtmb250LWZhbWlseTpWZXJkYW5hLEFyaWFsLEhlbHZldGljYSxzYW5zLXNlcmlmO2ZvbnQtc3R5bGU6bm9ybWFsO2ZvbnQtdmFyaWFudDpub3JtYWw7Zm9udC13ZWlnaHQ6NDAwO2ZvbnQtc3RyZXRjaDpub3JtYWw7Zm9udC1zaXplOjFlbTt0ZXh0LXNoYWRvdzppbmhlcml0O2xpbmUtaGVpZ2h0Om5vcm1hbDstd2Via2l0LWZvbnQtc21vb3RoaW5nOmFudGlhbGlhc2VkOy1tb3otb3N4LWZvbnQtc21vb3RoaW5nOmdyYXlzY2FsZX1ib2R5e3dpZHRoOjEwMCU7aGVpZ2h0OjEwMCU7bWFyZ2luOjA7cGFkZGluZzowO3Bvc2l0aW9uOmFic29sdXRlO292ZXJmbG93OmhpZGRlbn0uYnV0dG9ue3BvaW50ZXItZXZlbnRzOmF1dG87Y3Vyc29yOnBvaW50ZXI7LXdlYmtpdC11c2VyLXNlbGVjdDpub25lOy1tb3otdXNlci1zZWxlY3Q6bm9uZTstbXMtdXNlci1zZWxlY3Q6bm9uZTt1c2VyLXNlbGVjdDpub25lfSNwbGF5ZXItdWl7ZGlzcGxheTpibG9jayFpbXBvcnRhbnR9I3BsYXllci11aS5lbmRlZHtkaXNwbGF5Om5vbmUhaW1wb3J0YW50fSNyZXBsYXktdWl7ZGlzcGxheTpub25lIWltcG9ydGFudH0jcmVwbGF5LXVpLmVuZGVke2Rpc3BsYXk6YmxvY2shaW1wb3J0YW50fSNkaXNwbGF5LXNsb3QsI3Nsb3RzLXdyYXBwZXIsI3ZpZGVvLXNsb3R7d2lkdGg6MTAwJSFpbXBvcnRhbnQ7aGVpZ2h0OjEwMCUhaW1wb3J0YW50O3Bvc2l0aW9uOmFic29sdXRlO3RvcDowO2xlZnQ6MH1kaXZbaWQqPXZwYWlkU2xvdF17ei1pbmRleDppbml0aWFsIWltcG9ydGFudH0jaGVhZGVye3Bvc2l0aW9uOmFic29sdXRlO3RvcDowO3dpZHRoOjEwMCU7cGFkZGluZzozcHggMTRweH0jY291bnRkb3due2Zsb2F0OmxlZnQ7bGluZS1oZWlnaHQ6MjhweDtmb250Oi44ZW0gVmVyZGFuYTt2aXNpYmlsaXR5OmhpZGRlbjttYXJnaW4tdG9wOjRweH0jY2xvc2V7ZmxvYXQ6cmlnaHR9LnJvdGF0ZS00NXstd2Via2l0LXRyYW5zZm9ybTpyb3RhdGUoNDVkZWcpOy1tb3otdHJhbnNmb3JtOnJvdGF0ZSg0NWRlZyk7LW1zLXRyYW5zZm9ybTpyb3RhdGUoNDVkZWcpOy1vLXRyYW5zZm9ybTpyb3RhdGUoNDVkZWcpO3RyYW5zZm9ybTpyb3RhdGUoNDVkZWcpfSNiaWctcGxheXtwb3NpdGlvbjphYnNvbHV0ZTttYXJnaW46YXV0bztsZWZ0OjA7cmlnaHQ6MDt0b3A6MDtib3R0b206MDt3aWR0aDo5NHB4O2hlaWdodDo3NXB4O3Zpc2liaWxpdHk6dmlzaWJsZTt0ZXh0LWFsaWduOmNlbnRlcjtsaW5lLWhlaWdodDo3NXB4fSNidXR0b25iYXIsI2NvbnRyb2xiYXIsI3NraXBiYXJ7cG9zaXRpb246YWJzb2x1dGU7d2lkdGg6MTAwJTtkaXNwbGF5OnRhYmxlO2JvdHRvbTowO21hcmdpbi1sZWZ0OjB9I3NraXBiYXJ7Ym90dG9tOjYwcHg7Zm9udC1zaXplOi44ZW07dGV4dC1hbGlnbjpjZW50ZXI7cG9pbnRlci1ldmVudHM6bm9uZX0jYnV0dG9uYmFye2JvdHRvbTo1MCU7LXdlYmtpdC10cmFuc2Zvcm06dHJhbnNsYXRlWSgxLjhlbSk7LW1vei10cmFuc2Zvcm06dHJhbnNsYXRlWSgxLjhlbSk7LW1zLXRyYW5zZm9ybTp0cmFuc2xhdGVZKDEuOGVtKTstby10cmFuc2Zvcm06dHJhbnNsYXRlWSgxLjhlbSk7dHJhbnNmb3JtOnRyYW5zbGF0ZVkoMS44ZW0pO2ZvbnQtc2l6ZToxLjJlbTtsaW5lLWhlaWdodDo3NXB4O3BvaW50ZXItZXZlbnRzOm5vbmV9I3BsYXktaW9zLCNza2lwLC5jbGljay10aHJvdWdoe3Bvc2l0aW9uOnJlbGF0aXZlO3BhZGRpbmc6MCAxNHB4O2ZvbnQtc2l6ZTouOGVtO2Rpc3BsYXk6bm9uZTtmbG9hdDpyaWdodDt3aWR0aDo2MHB4fSNyZXBsYXktdWkgLmJ1dHRvbntkaXNwbGF5OmJsb2NrO3dpZHRoOjI1JX0jcmVwbGF5LXVpIC5idXR0b24gZGl2e3RleHQtYWxpZ246Y2VudGVyfSNyZXBsYXktdWkgLmJ1dHRvbiBbY2xhc3NePXNjbXAtXXtmb250LXNpemU6NGVtO2xpbmUtaGVpZ2h0OjEuM2VtfSNyZXBsYXktdWkgLmJ1dHRvbi5jbGljay10aHJvdWdoLmxlZnR7ZmxvYXQ6bGVmdH0jc2tpcC5hY3RpdmV7ZGlzcGxheTp0YWJsZS1jZWxsO3BvaW50ZXItZXZlbnRzOm5vbmV9I3NraXAuZW5hYmxlZHtwb2ludGVyLWV2ZW50czphdXRvfSNza2lwIC53cmFwcGVye3Bvc2l0aW9uOnJlbGF0aXZlO3dpZHRoOjI4cHh9LmlvcyAjc2tpcCAud3JhcHBlcntoZWlnaHQ6MzZweH0jc2tpcD5kaXZ7bGluZS1oZWlnaHQ6MjhweDt0ZXh0LWFsaWduOnJpZ2h0O2Rpc3BsYXk6aW5saW5lO2Zsb2F0OnJpZ2h0fSNza2lwIC5za2lwLWNsb3Nle3Bvc2l0aW9uOnJlbGF0aXZlO3JpZ2h0OjZweDt0b3A6LTVweDtkaXNwbGF5Om5vbmV9I3NraXAuZW5hYmxlZCAuc2tpcC1jbG9zZXtkaXNwbGF5OmJsb2NrfSNza2lwIC5za2lwLWNvdW50ZG93bntwb3NpdGlvbjpyZWxhdGl2ZTt3aWR0aDoyOHB4O2hlaWdodDoyOHB4O2Rpc3BsYXk6YmxvY2s7LXdlYmtpdC10cmFuc2Zvcm06c2NhbGVYKC0xKTstbW96LXRyYW5zZm9ybTpzY2FsZVgoLTEpOy1tcy10cmFuc2Zvcm06c2NhbGVYKC0xKTstby10cmFuc2Zvcm06c2NhbGVYKC0xKTt0cmFuc2Zvcm06c2NhbGVYKC0xKX0uaW9zICNza2lwIC5za2lwLWNvdW50ZG93bnt0b3A6NHB4fSNza2lwLmVuYWJsZWQgLnNraXAtY291bnRkb3due2Rpc3BsYXk6bm9uZX0ucGxheWluZyAjYmlnLXBsYXl7ZGlzcGxheTpub25lfSNwbGF5e2Rpc3BsYXk6dGFibGUtY2VsbDtwYWRkaW5nOjAgMTRweDtwb3NpdGlvbjpyZWxhdGl2ZTt3aWR0aDoyOHB4fSNwbGF5PmRpdntmbG9hdDpsZWZ0fSNwcm9ncmVzc3tkaXNwbGF5OnRhYmxlLWNlbGw7cG9zaXRpb246cmVsYXRpdmU7d2lkdGg6YXV0b31ib2R5Om5vdCguY29tbWVyY2lhbCkgI2hlYWRlcixib2R5Om5vdCguY29tbWVyY2lhbCkgI3Byb2dyZXNzLGJvZHk6bm90KC5jb21tZXJjaWFsKSAjc2tpcGJhciAuY2xpY2stdGhyb3VnaHtkaXNwbGF5Om5vbmV9Ym9keS5pbi1hcHAgI3NraXBiYXIgLmNsaWNrLXRocm91Z2h7ZGlzcGxheTpibG9ja30jcHJvZ3Jlc3MtYmd7cG9zaXRpb246YWJzb2x1dGU7ZmxvYXQ6bGVmdDttYXJnaW4tdG9wOjEwcHg7dmlzaWJpbGl0eTp2aXNpYmxlO3dpZHRoOjEwMCU7aGVpZ2h0OjhweDt0b3A6MDtvcGFjaXR5Oi44fSNwcm9ncmVzcy1sb2FkZWR7cG9zaXRpb246YWJzb2x1dGU7ZmxvYXQ6bGVmdDttYXJnaW4tdG9wOjEwcHg7d2lkdGg6MCU7aGVpZ2h0OjhweDt0b3A6MDtvcGFjaXR5OjA7LXdlYmtpdC10cmFuc2l0aW9uOndpZHRoIC40cyBsaW5lYXI7LW1vei10cmFuc2l0aW9uOndpZHRoIC40cyBsaW5lYXI7LW1zLXRyYW5zaXRpb246d2lkdGggLjRzIGxpbmVhcjstby10cmFuc2l0aW9uOndpZHRoIC40cyBsaW5lYXI7dHJhbnNpdGlvbjp3aWR0aCAuNHMgbGluZWFyfSNwcm9ncmVzcy1iYXJ7Y3Vyc29yOnBvaW50ZXI7cG9zaXRpb246YWJzb2x1dGU7ZmxvYXQ6bGVmdDttYXJnaW4tdG9wOjEwcHg7d2lkdGg6MCU7aGVpZ2h0OjhweDt0b3A6MDstd2Via2l0LXRyYW5zaXRpb246d2lkdGggLjRzIGxpbmVhcjstbW96LXRyYW5zaXRpb246d2lkdGggLjRzIGxpbmVhcjstbXMtdHJhbnNpdGlvbjp3aWR0aCAuNHMgbGluZWFyOy1vLXRyYW5zaXRpb246d2lkdGggLjRzIGxpbmVhcjt0cmFuc2l0aW9uOndpZHRoIC40cyBsaW5lYXJ9I3Byb2dyZXNzLXRleHQgc3BhbnttYXJnaW4tcmlnaHQ6NHB4O3Bvc2l0aW9uOnJlbGF0aXZlO2Zsb2F0OmxlZnQ7Zm9udDouOGVtIFZlcmRhbmE7bGluZS1oZWlnaHQ6MjhweDtkaXNwbGF5OmlubGluZTt0ZXh0LWFsaWduOmNlbnRlcjttYXJnaW46MDtjdXJzb3I6ZGVmYXVsdDt2aXNpYmlsaXR5OmhpZGRlbjt3aGl0ZS1zcGFjZTpub3dyYXB9I3Byb2dyZXNzLXRleHQsI3NvdW5ke2Rpc3BsYXk6dGFibGUtY2VsbDtwYWRkaW5nOjAgMTRweDt3aWR0aDoxMTBweH0jcHJvZ3Jlc3MtdGV4dHtkaXNwbGF5Om5vbmU7d2lkdGg6MXB4fSNzb3VuZHtwYWRkaW5nLWxlZnQ6MH0jc291bmQ+ZGl2W2lkKj12b2x1bWVde2Zsb2F0OnJpZ2h0O3BhZGRpbmctbGVmdDo0cHh9I3ZvbHVtZS1sZXZlbHttYXJnaW46MCA2cHggMCAxMnB4O3dpZHRoOjI2cHh9Lm1pbmltYWwgI2NvbnRyb2xiYXJ7YmFja2dyb3VuZC1jb2xvcjp0cmFuc3BhcmVudH0ubWluaW1hbCAjcGxheSwubWluaW1hbCAjcHJvZ3Jlc3MtdGV4dCwubWluaW1hbCAjdm9sdW1lLWRlY3JlYXNlLC5taW5pbWFsICN2b2x1bWUtaW5jcmVhc2V7ZGlzcGxheTpub25lIWltcG9ydGFudH0jcmVwbGF5LXVpICNwcm9ncmVzcywubWluaW1hbCAjcHJvZ3Jlc3N7d2lkdGg6MTAwJTtoZWlnaHQ6MjhweH0jcmVwbGF5LXVpICNwcm9ncmVzcy1iZywubWluaW1hbCAjcHJvZ3Jlc3MtYmd7bWFyZ2luLXRvcDoyNXB4O2hlaWdodDozcHg7b3BhY2l0eTowfSNyZXBsYXktdWkgI3Byb2dyZXNzLWJhciwjcmVwbGF5LXVpICNwcm9ncmVzcy1sb2FkZWQsLm1pbmltYWwgI3Byb2dyZXNzLWJhciwubWluaW1hbCAjcHJvZ3Jlc3MtbG9hZGVke21hcmdpbi10b3A6MjVweDtoZWlnaHQ6M3B4Oy13ZWJraXQtYm94LXNoYWRvdzoxcHggMXB4IDZweCAjNWM1YzVjOy1tb3otYm94LXNoYWRvdzoxcHggMXB4IDZweCAjNWM1YzVjO2JveC1zaGFkb3c6MXB4IDFweCA2cHggIzVjNWM1Y30jcmVwbGF5LXVpICNwcm9ncmVzcy1iYXJ7LXdlYmtpdC10cmFuc2l0aW9uOndpZHRoIDNzIGxpbmVhcjstbW96LXRyYW5zaXRpb246d2lkdGggM3MgbGluZWFyOy1tcy10cmFuc2l0aW9uOndpZHRoIDNzIGxpbmVhcjstby10cmFuc2l0aW9uOndpZHRoIDNzIGxpbmVhcjt0cmFuc2l0aW9uOndpZHRoIDNzIGxpbmVhcjt3aWR0aDoxMDAlfS5taW5pbWFsICNzb3VuZHtwb3NpdGlvbjphYnNvbHV0ZTtyaWdodDo4cHg7Ym90dG9tOjhweDtwYWRkaW5nOjA7dGV4dC1zaGFkb3c6MCAwIDZweCAjNWM1YzVjfS5vdmVybGF5ICNjb250cm9sYmFye2JvdHRvbTotMzNweDstd2Via2l0LXRyYW5zaXRpb246Ym90dG9tIC4zcyBlYXNlLW91dDstbW96LXRyYW5zaXRpb246Ym90dG9tIC4zcyBlYXNlLW91dDstbXMtdHJhbnNpdGlvbjpib3R0b20gLjNzIGVhc2Utb3V0Oy1vLXRyYW5zaXRpb246Ym90dG9tIC4zcyBlYXNlLW91dDt0cmFuc2l0aW9uOmJvdHRvbSAuM3MgZWFzZS1vdXR9Lm92ZXJsYXkgI2NvbnRyb2xiYXIuYWN0aXZle2JvdHRvbTowfS5pb3MgI3NraXBiYXJ7Ym90dG9tOjMycHh9LmlvcyAjcGxheS1pb3MsLmlvcyAuY2xpY2stdGhyb3VnaHtkaXNwbGF5OnRhYmxlLWNlbGx9LmlvcyAuY2xpY2stdGhyb3VnaHtkaXNwbGF5OnRhYmxlLWNlbGx9Lmlvczpub3QoLnVubG9ja2VkKSAjcGxheS1pb3MgLnNjbXAtcGxheTpiZWZvcmV7Y29udGVudDoiXGUzOTMifS5pb3MgI2NvbnRyb2xiYXIgI3BsYXksLmlvcyAjY29udHJvbGJhciAjcHJvZ3Jlc3MtdGV4dCwuaW9zICNjb250cm9sYmFyICNzb3VuZCwuaW9zLnVubG9ja2VkICNiaWctcGxheXtkaXNwbGF5Om5vbmUhaW1wb3J0YW50fS5pb3MtbmF0aXZlICNwbGF5LWlvc3tkaXNwbGF5Om5vbmV9Lmlvcy1uYXRpdmUgLmNsaWNrLXRocm91Z2h7ZGlzcGxheTpibG9ja30ubm9uZSAjY29udHJvbGJhcntkaXNwbGF5Om5vbmV9Ym9keSBkaXZbaWQqPWFkQ291bnRkb3duXSxib2R5IGRpdltpZCo9YWRTa2lwQnV0dG9uXSxib2R5IGRpdltpZCo9Y2xpY2tUaHJvdWdoRGlhbG9nQm94XXtkaXNwbGF5Om5vbmUhaW1wb3J0YW50fUBmb250LWZhY2V7Zm9udC1mYW1pbHk6c21hcnRjbGlwLU11bHRpcGxheWVyLUljb25zO3NyYzp1cmwoZGF0YTphcHBsaWNhdGlvbi94LWZvbnQtd29mZjtjaGFyc2V0PXV0Zi04O2Jhc2U2NCxkMDlHUmdBQkFBQUFBQWVRQUFzQUFBQUFES2dBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQlBVeTh5QUFBQkNBQUFBRUFBQUFCZ0R4SUhRbU50WVhBQUFBRklBQUFBVmdBQUFIeTMzYlNKWjJGemNBQUFBYUFBQUFBSUFBQUFDQUFBQUJCbmJIbG1BQUFCcUFBQUErY0FBQWNzSXd2c0gyaGxZV1FBQUFXUUFBQUFNUUFBQURZS0JIcGVhR2hsWVFBQUJjUUFBQUFlQUFBQUpBZ3RCRTlvYlhSNEFBQUY1QUFBQUJ3QUFBQTRMMEFBTUd4dlkyRUFBQVlBQUFBQUhnQUFBQjRNS2dxZWJXRjRjQUFBQmlBQUFBQVlBQUFBSUFBVEFIcHVZVzFsQUFBR09BQUFBVXdBQUFMb2MzY3RHSEJ2YzNRQUFBZUVBQUFBREFBQUFDQUFBd0FBZU5wallHWit6emlCZ1pXQmdXa20weGtHQm9aK0NNMzRtc0dZa1pNQkZUQUtvQWt3T0RBd3ZOSmtQdkQvQUlNRDh3RVFqNEVSU1ZhQmdRRUFkZFlMWUhqYVkyQmdZR2FBWUJrR1Jpak5ER1NCYUJhR0JDQXR3aUFBRkdFQmlpazg3bjg4K1JuankxT3Z1RjlwL3YvNy96OERDRUJFR1lDaVhLL1V3YUtNL3gvTGxNb1VTYkdKMlluK0YzMENOUThEQUFCdTZCMitBQUFBQVFBQi8vOEFEM2phclZYUGI5dFVISCsvN05la3NWUDd4UTViVmllT0ZhZGQwNVRHK2RFeDJtVU1HbGhicmRCV3FDMXFLbTA5MEJUVWFreEZURUlWSENjaDBQZ0RlbVU3TWk2VVNia2dPT3d3Zmx6R0xranN3aGx0dXhTWHI5MFdKdEhDSnRVdjl2UHo5OWZuKzMzdjh3M0NhUDhpQ05WT2hjdW4vY2JDUjUxK2lCeDBEcjJGMWhIS1pkMjhXNjZOMEVxNVNJSzNhaWxwVVNPaEVxNWlKNzhueFdYM1g3TEJBNFE0SVlPSVo5MEI3R1RkaWxhdW5zYWdBQUpEQzBYMGc0ak9WZFgyc3JxZTlXeFZWWHZVbnVGZTArd2Q3dUY2NUVaVUEra2dYQ0RKcSttQmpLWmxCdEpjaTl3TTdheDAyZ3B0Q3YzOUJhNS9Jc2VrUjVjVklaVExqN2lJUkRvN0kxUjJPUWNGZTN4cXJsaWNteHEzWVFFVzgwc3JRME1yUy9NOW5NL3hEdkJkdXZyUjFSTE04YmpWbUpqdTY1dWVhRmdkZkQ0MHRpWW1KNnpRcnJEMjNscUI4L3NTZXl3VVhGZkVZNWxSMWhYZGJrZTdHTWE3MVVXSXRxR21jWFFTeW00NGVlNVVhdm1LbDZ4NUJzZi9VWXYyVEt1MS8vUEhEc29Genp5cFVqOE1CVU1wSkxFV3ZZSk0xSThHVVJWdzZCUjJoY3R4SW5NaVdLNVVxOExBWnRMa2NqaFl6cTFWenhENG1xU2U1Z1MzeGxxNTg1OWZ2L1B6K3R0dkpCSlJad2FQNFRVbGNtTTFvL3UzTGpWTHg2TEpDeXZkdHYrVC83QmZsMkw4NVRlYjMzNzlaYk41ZTJFQjJ6Q3dFd2N6VXgrWm5QTWYrSCs4bXFMYXNlYW4rQmRGM0xyWEdvdEhDZFVHdnYvaDdJdUZ1TUxqbWkvd2pIOHp1QkZGeG83UGx1ZzdlL2lmQ1QydTVUVzI1STVkQitEdmg4Q3owM2djcnlyUkwxWnR6Zi9xMGdJQU55ZGJWc2IvMFg5WTBLUll4emtBdnVVL2FMZnhjWUNOL29ZOTYvOEdzRThRZ1AwWnZoZExBT3p6OFNnbCt2UGZBZXorZUF4Zy83bHp1KzEvSE83N1RwdkJ6aU9CTGdMaXJFcU1oRVc4MGdnSnFFU0JIR0lFRHdNNW5HeVJWSXE0RDJmbGJwd3cwOWdvQXR1cU5hOVVQWU1EbFJIc2xjd2s4RWJGUnNLRUErSzlnRDBMVWsvSWhrb0pXdDY2TmpsNWJXdDVmeDZZN2YyZE1hR2NuSDZwVjRySkc0cUlkcnhiR1BWU3BuRUZUdEVHazZ5emR1VmlnY28wMWQyZE9qSHFFb25JbmF4VHg5WnJyOC9TOXBQT2dubTdMalRNV2FlOHFJaGNJWWVaSkpSMnBJdlZ2a2xmYUM2ZktpOFdKTFlCa1NZaTBhUkpKWnBxdUc0amxlb1dyelRYUnpIRm1VRkg3UFdjdlpvNHNMQzFzaHNrYldqMmJ1YWVyU1hNMDdoVXJXaDJxUnFVaHY3cWIwSW9SZmlid2NuSGkrRUNBd3hCNnVHa0hLU3dGd3ZYR1NKMTRCMFNSdUI5MTZjRDBaQlFhRHN3MkFheWtFejRHandDcW9aOFhRVytwdEVRbXZxbkF4NVpqeU4zajZDTGJSeGxrd3A3RkdsQXpzOGg3OENNL3orcDNGTkR2Ly9NUFhUM0R5dm9vY2REZEllQndKc0h4VU9IT2Y0TGpIbENWUUI0Mm1OZ1pHQmdZUFE1Ky95dDJ0SjRmcHV2RE53c0RDQncyZVpMRjRMK2Y0QWxtL2tBa012QndBUVNCUUNUYkExK0FBQUFlTnBqWUdSZ1lEN3cvd0FEQTBzREF4Q3daRE13TXFBQ1BnQmcwUU9HQUFCNDJtTmhRQUFtSUdaeEFHSVEzY0FnRGNTaVlEWVdEQUF3dkFHZkFBQUFBQUFLQUJRQUhnRElBUW9CYWdIRUFrNENoQUtnQXhvRGFnT1dBQUI0Mm1OZ1pHQmc0R09vWUdCaEFBRW1CalFBQUEzdkFJNTQycTJRTzA3RFFCUkY3K1RESnlnVUtTaElNd1d0clh4UUZoQXB2OElGS2RKUjJNbkVzbkRHMGRndXNnRW9LT2xaQlNWN29LTmtMZHc0YndrWmFheno3cnZ2enBNQmRQQUhoZFBwNEVsWW9WdDlqNmVHUzdVU3JsUC9FbTZncTE2RW03akJoL0FGOWFad0MvZnFXN2pOaVRjbXFNWTFxd2VzaFJWR1REMXhEYmZxV2JoTy9VZTRnWkY2Rlc3aURwL0NGOVMxY0F1UDZsZTRqU3U4NTd2UUZlczAyWHRCbVJiSlBnMFB4bm1MZFdaejVOZ2hoRVBCTlZJazJNTkRnSkpjVkZYSzdnR0dEZzhMZWpKWTVJTmVmNlRIcFlzbmljMzFiQmZOTVVBUGZTNnFNZWEwUTR3SjUrbWxNdU1iRWVaYlp3eTI3Qm1ZbFhGNWtsbmQ5NGRZVmZFNTdjZHd6UmdmdzdQdmZQYkFwWW5MTkhSWXNoRlhaa2FjL1pWcFpnc2RHMnRjV0ppTmpnNmFZVUdXV1IvVHlsSHdqOFdjc3RWa3lOcGdReTFpbHBhY2dQZm85ZjhCeG1pUHYzamFZMkJtd0FzQUFIMEFCQT09KSBmb3JtYXQoJ3dvZmYnKTtmb250LXdlaWdodDo0MDA7Zm9udC1zdHlsZTpub3JtYWx9W2NsYXNzKj0iIHNjbXAtIl0sW2NsYXNzXj1zY21wLV17Zm9udC1mYW1pbHk6c21hcnRjbGlwLU11bHRpcGxheWVyLUljb25zO3NwZWFrOm5vbmU7Zm9udC1zdHlsZTpub3JtYWw7Zm9udC13ZWlnaHQ6NDAwO2ZvbnQtdmFyaWFudDpub3JtYWw7dGV4dC10cmFuc2Zvcm06bm9uZTtsaW5lLWhlaWdodDoyOHB4O2ZvbnQtc2l6ZToyMnB4fS5hbmRyb2lkIFtjbGFzcyo9IiBzY21wLSJdLC5hbmRyb2lkIFtjbGFzc149c2NtcC1dLC5pb3MgW2NsYXNzKj0iIHNjbXAtIl0sLmlvcyBbY2xhc3NePXNjbXAtXXtsaW5lLWhlaWdodDozNnB4O2ZvbnQtc2l6ZToyN3B4fVtjbGFzcyo9IiBzY21wLSJdOmJlZm9yZSxbY2xhc3NePXNjbXAtXTpiZWZvcmV7dmVydGljYWwtYWxpZ246dG9wfS5zY21wY2ItY29udHJvbGJhcj5kaXYgZGl2e2hlaWdodDoyOHB4O2xpbmUtaGVpZ2h0OjI4cHh9LnNjbXAtYmlnLXBsYXk6YmVmb3JlLC5zY21wLXBsYXk6YmVmb3Jle2NvbnRlbnQ6IlxlNjAxIn0uc2NtcC1iaWctcGxheTpiZWZvcmV7Zm9udC1zaXplOjNlbTtsaW5lLWhlaWdodDo2NnB4fS5wbGF5aW5nIC5zY21wLWJpZy1wbGF5e3Zpc2liaWxpdHk6aGlkZGVufS5wbGF5aW5nIC5zY21wLXBsYXk6YmVmb3JlLC5zY21wLXBhdXNlOmJlZm9yZXtjb250ZW50OiJcZTYwMCJ9LnNjbXAtcGx1czpiZWZvcmV7Y29udGVudDoiXGVhMGEiO2ZvbnQtc2l6ZTo2MCV9LnNjbXAtbWludXM6YmVmb3Jle2NvbnRlbnQ6IlxlYTBiIjtmb250LXNpemU6NjAlfS5zY21wLXZvbHVtZS0wLW11dGU6YmVmb3Jle2NvbnRlbnQ6IlxlMzkzIn0uc2NtcC12b2x1bWUtMjU6YmVmb3Jle2NvbnRlbnQ6IlxlYTI5In0uc2NtcC12b2x1bWUtNTA6YmVmb3Jle2NvbnRlbnQ6IlxlYTI4In0uc2NtcC12b2x1bWUtNzU6YmVmb3Jle2NvbnRlbnQ6IlxlYTI3In0uc2NtcC12b2x1bWUtMTAwOmJlZm9yZXtjb250ZW50OiJcZTM4ZiJ9LnNjbXAtd2ViOmJlZm9yZXtjb250ZW50OiJcZTljYSI7Zm9udC1zaXplOjg1JX12aWRlbzo6LXdlYmtpdC1tZWRpYS1jb250cm9scyx2aWRlbzo6LXdlYmtpdC1tZWRpYS1jb250cm9scy1jb250YWluZXIsdmlkZW86Oi13ZWJraXQtbWVkaWEtY29udHJvbHMtcGFuZWwtY29udGFpbmVyLHZpZGVvOjotd2Via2l0LW1lZGlhLWNvbnRyb2xzLXBsYXktYnV0dG9uLHZpZGVvOjotd2Via2l0LW1lZGlhLWNvbnRyb2xzLXN0YXJ0LXBsYXliYWNrLWJ1dHRvbntkaXNwbGF5Om5vbmUhaW1wb3J0YW50fVtpZCo9dnBhaWRTbG90XT52aWRlb3twb3NpdGlvbjphYnNvbHV0ZX0=",b.head);for(var d=Array.isArray(V.featureMatrix.layout.source)?V.featureMatrix.layout.source:[V.featureMatrix.layout.source],c=0;c<d.length;c++){var e=d[c];if(0===e.indexOf("//")){var h=location.protocol;"file:"===h&&(h="https:");e=h+e}f(e,b.head)}d=V.borderStyle;b.defaultView.frameElement.style.boxSizing="border-box";b.defaultView.frameElement.style.border=
d;l(D.dom,b.body);v();/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)&&"overlay"===V.uiLayout&&(V.uiLayout="minimal");d=Array.prototype.slice.call(H.body.classList).join(" ");u.uiLayout=d+" "+V.uiLayout;u.skipText=V.skipText;u.pausedByUser=!1;u.volume=.25*Math.round(V.volume/.25);R();u.videoSlot.addEventListener("playing",W);u.videoSlot.addEventListener("pause",W);t=new Fb(H,"#F5F5F5");u.originalSkipOffset=V.skipOffset;S();u.playerReady=!0};K.setVPAIDAd=function(a){d("setVPAIDAd",a);e=a;U()};
u=c.environmentVars;V=c.publisherConfig;u.replayModel=[];return K}});var Gb={sortObject:function(c,f){return Object.keys(c).sort(f).reduce(function(f,p){f[p]=c[p];return f},{})}};function Hb(c){this.behaviourMatrix=c;this.handlers={}}Hb.prototype.registerBehaviourHandler=function(c,f){this.handlers[c]||(this.handlers[c]=[]);this.handlers[c].push(f)};Hb.prototype.callMethods=function(c){if(c)for(var f=c.length,l=0;l<f;l++)if(!c[l].apply(this,[].slice.call(arguments).slice(1)))return!1;return!0};
Hb.prototype.executeBehavioursForState=function(c){var f=Gb.sortObject(this.behaviourMatrix[c],function(c){return"muted"===c?-1:0}),l;for(l in f)f.hasOwnProperty(l)&&this.callMethods(this.handlers[l],c,f[l])};Hb.prototype.removeAllHandlers=function(){this.handlers=[]};fb.smartPlay(function(c,f,l){function p(a,b){function d(){a.apply(this,arguments);D.unsubscribe(d,b)}D.subscribe(d,b)}function C(){c.iOSExitFullscreen();P.forceCollapseOnShutdown&&U.collapseContainer();D.shutdown();c.shutdown()}function J(){try{P.onPrefetchCompleteCallback(c,f),P.onPrefetchCompleteCallback=function(){}}catch(a){c.debug("onPrefetchCompleteCallback failure",a)}}function F(){try{P.onStartCallback(c,f),P.onStartCallback=function(){}}catch(a){c.debug("onStartCallback failure",a)}}function R(){try{P.onCappedCallback(c,
f),P.onCappedCallback=function(){}}catch(a){c.debug("onCappedCallback failure",a)}}function S(){var a=0,b=!1,d=!1,k;for(k in fb.smartPlay.EVENT)D.subscribe(function(a,b){var d=v.currentAd||{},k=D.adManager.getAdConfig(),e={type:a,issuer:"smartclip",timestamp:(new Date).getTime()},h={event:e,info:b&&b.info?b.info:{}};"object"===typeof k&&(h.info.offset=k.offset);"object"===typeof d&&d.hasOwnProperty("creatives")&&d.hasOwnProperty("info")&&(h.info=d.info,h.info.variant=D.getVariant().toUpperCase(),
h.info.duration=d.creatives[0]&&d.creatives[0].duration?d.creatives[0].duration:20,h.info.adId=d.id,h.info.title=d.title||"unknown",h.info.vendorURL=d.VASTAdTagURI||"inline",h.info.wrapperTags=d.wrappers||[]);b&&b.errorCode&&(h.errorCode=b.errorCode,h.info.errorCode=b.errorCode);v.adInfo=h;try{P.onEventCallback(c,f,e)}catch(n){c.debug("[API:callEventCallback] onEventCallback failure",n)}},fb.smartPlay.EVENT[k]);D.subscribe(function(){q.executeBehavioursForState("onClick")});D.subscribe(function(){e=
!0;0<a&&!t&&(P.featureMatrix.endingScreen.enabled=!1);P.featureMatrix.endingScreen.enabled&&(v.paused=!0,v.pausedByUser=!1,v.playState="ended",isFinite(v.videoSlot.duration)&&(v.videoSlot.currentTime=v.videoSlot.duration));q.executeBehavioursForState("complete")},"AdSlotComplete");D.subscribe(function(){0<a&&!t&&R();try{P.onEndCallback(c,f)}catch(b){c.debug("onEndCallback failure",b)}P.featureMatrix.endingScreen.enabled||D.stopAd()},"AdSlotComplete");D.subscribe(function(){c.info("current behaviourMatrix",
P.behaviourMatrix);c.info("userAgent",navigator.userAgent);t=!0;I&&U.expandContainer();c.resize()},"AdStarted");P.prefetching||p(function(){c.elements.iframeDocument.body.classList.add("started")},"AdSlotStarted");D.subscribe(function(){a++},"AdCapped");p(function(){P.prefetching&&v.isVPAID&&(b=!0,J())},"AdLoaded");p(function(){!d&&P.prefetching&&b&&(d=!0,F())},"AdImpression");p(function(){!d&&I&&(d=!0,F())},"AdStarted")}function T(){P.prefetching?(p(function(){q.executeBehavioursForState("init");
c.utils.isAmp()&&(c.info("calling amp renderStart",c.size),context.renderStart(c.size),f.style.visibility="visible");try{P.onPrefetchCompleteCallback(c,f)}catch(a){c.debug("onPrefetchCompleteCallback failure",a)}c.elements.iframeDocument.body.classList.add("started");I?setTimeout(function(){c.environmentVars.paused=!0;q.executeBehavioursForState("onScreen")},16):(H.pausePlayback(),c.environmentVars.paused=!0)},"AdStarted"),setTimeout(function(){D.startAd()},100)):q.executeBehavioursForState("init")}
function G(){D.resizeAd(v.size.width,v.size.height,"normal")}function Z(){function a(){b.play();this.removeEventListener("touchmove",a)}if(53<=function(){var a=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);return a?parseInt(a[2],10):!1})v.videoSlot.muted=!0;else{var b=document.createElement("video"),d=document.createElement("source");Object.defineProperty(v.videoSlot,"src",{get:function(){return v.videoSource},set:function(a){a&&0!==a.length&&(v.videoSource=a,v.videoSlot.setAttribute("src",
a))},enumerable:!0,configurable:!0});d.type="video/mp4";d.src=("file:"===location.protocol?"https:":location.protocol)+"//cdn.smartclip.net/assets/9999999/test/black.mp4";b.appendChild(d);c.utils.topLevelWindow().addEventListener("touchmove",a,!1);f.addEventListener("touchmove",a,!1)}}function O(){function a(){function b(){v.videoSlot.removeEventListener("play",b);v.videoSlot.removeEventListener("error",b);D.unsubscribe(b,"AdLoaded");D.unsubscribe(b,"AdStarted");clearTimeout(d)}var d=setTimeout(function(){c.debug("ad did not load, shutting down");
C()},2500);v.videoSlot.addEventListener("play",b);v.videoSlot.addEventListener("error",b);p(b,"AdLoaded");p(b,"AdStarted")}if(!r&&!b){var d=D.startAd;D.startAd=function(){v.isVPAID||a();D.startAd=d;d()}}}var v=c.environmentVars=new c.model.EnvironmentVars,P=c.publisherConfig,U=c.controller.sizeManager,W=c.controller.sizeBasedFormat,K=new c.model.PlayerInterface,H=new c.controller.Player(c),D=null,u=new mb,V=!1,I=!1,e=!1,t=!1,h=!1,q=null,r=/iPhone|iPad|iPod/i.test(navigator.userAgent),b=/(Android)/i.test(navigator.userAgent),
d=r&&!/Safari/.test(navigator.userAgent),a=r||b,k=/SCMobileSDK\//.test(navigator.userAgent);v.engine=Cb.ENGINE_HTML5;c.getEngine=function(){return v.engine};c.canInteract=function(){return V&&I&&!e};c.canExpand=function(){return c.canInteract&&t};c.isReady=function(){return V&&!e&&("complete"===f.ownerDocument.readyState||"interactive"===f.ownerDocument.readyState)};c.iOSExitFullscreen=function(){r&&v.videoSlot&&v.videoSlot.webkitDisplayingFullscreen&&v.videoSlot.webkitExitFullScreen()};Ca.hookBefore(c,
"shutdown",function(){u.removeAllStates()});c.forceShutdown=C;(function(){u.addState(new Ab(c.elements.iframe,{canEnter:function(){return c.canInteract()&&!a},canLeave:function(){return c.canInteract()&&!a},onEnter:function(){h=!0;q.executeBehavioursForState("mouseOver")},onLeave:function(){h=!1;q.executeBehavioursForState("mouseOut")}}))})();(function(){k||u.addState(new Eb(f,c,{get requiredVisibility(){return parseInt(P.visibilityThreshold,10)||50},canEnter:function(){return V&&!I},canLeave:function(){return V&&
I},reportInterval:50}));u.addState(new wb(f,c,{get requiredVisibility(){return parseInt(P.visibilityThreshold,10)||50},reportInterval:50,canEnter:function(){return V&&!I&&!e},canLeave:function(){return V&&I&&!e},onEnter:function(){I=v.isVisible=!0;q.executeBehavioursForState("onScreen");t||(v.isVPAID&&P.prefetching?(D.adManager.startLinear(),D.adManager.triggerEvent("AdStarted")):D.startAd())},onLeave:function(){I=v.isVisible=!1;q.executeBehavioursForState("offScreen")}}))})();(function(){u.addState(new zb(f,
c,{canEnter:function(){return!r&&c.canInteract()&&!v.videoSlot.playing},onEnter:function(){t?D.resumeAd():D.startAd()}}))})();(function(){u.addState(new Bb(f,c,{canEnter:function(){return c.canInteract()},canLeave:function(){return c.canInteract()&&!v.pausedByUser},onEnter:function(){H.pausePlayback()},onLeave:function(){H.resumePlayback()}}))})();(function(){q=new Hb(P.behaviourMatrix);q.registerBehaviourHandler("muted",function(b,d){c.info("muted handler",b,d,"adStarted",t,"completed",e,v,"isMobile",
a);v.toggleMuteByUser||r&&v.videoSlot.webkitDisplayingFullscreen||(!d&&v.muted&&H.unmute(),d&&!v.muted&&H.mute())});q.registerBehaviourHandler("collapsed",function(a,b){function d(){U.collapseContainer("init"===a);D.stopAd();setTimeout(C,500)}c.info("collapsed handler",a,b,"adStarted",t,"completed",e,v);if(b&&"complete"!==a)U.collapseContainer("init"===a);else if("complete"!==a){if(("onScreen"===a||"offScreen"===a||"init"===a)&&!t)return;U.expandContainer("init"===a)}var k=t&&e;if("complete"!==a||
b||k)if("complete"===a&&v.isVPAID)setTimeout(function(){v.percentCloseTimeout="width: 0";d()},10);else if("complete"===a&&b){if(P.featureMatrix.endingScreen.enabled&&"ended"===v.playState&&!1===v.adSkipped){var g=function(){function a(){v.videoSlot.removeEventListener("play",a);clearTimeout(void 0);e=!1;h&&q.executeBehavioursForState("mouseOver")}v.videoSlot.addEventListener("play",a);D.subscribe(a,"AdSlotStarted")};setTimeout(function(){v.percentCloseTimeout="width: 0";g()},10)}}else"complete"!==
a||b||(v.percentCloseTimeout="width: 0",D.subscribe(function(){e=!1;h&&q.executeBehavioursForState("mouseOver")},"AdSlotStarted"));else d()});q.registerBehaviourHandler("paused",function(a,b){c.info("paused handler",a,b,"adStarted",t,"completed",e,v);!t||e||v.pausedByUser||r&&v.videoSlot.webkitDisplayingFullscreen||(b?H.pausePlayback():(P.prefetching&&t&&I&&F(),H.resumePlayback()))})})();v.observe("playerReady",function(){var b=P.adRequest.html||P.adRequest.flash||P.adRequest;P.adResponse&&0<P.adResponse.length&&
(b={responseXML:P.adResponse});D=ois(v.videoSlot,{preroll:b,playerConfig:l,clickThroughDialogEnabled:!1,skipButtonText:""});v.videoSlot.removeAttribute("data-ois-instance-id");b=P.environmentVars||{};b.rules=[];"2.0"===D.handshakeVersion()&&(D.initAd(c.size.width,c.size.height,"normal",b.desiredBitrate||NaN,{},b),V=!0,H.setVPAIDAd(D),new Db.CampaignOverrideConfig(c,D),a&&P.featureMatrix.bestFit.enabled?W.setVPAIDAd(D):P.featureMatrix.bestFit.enabled=!1,S(),D.resizeAd(c.size.width,c.size.height),T());
v.observe("size",G)});(function(){H.initView(K,c.elements.iframeDocument);c.utils.isAmp()&&(f.style.visibility="invisible");Object.defineProperty(v.videoSlot,"playing",{get:function(){return!!(0<this.currentTime&&!this.paused&&!this.ended&&2<this.readyState)}});r&&(c.elements.iframeDocument.body.classList.add("ios"),v.videoSlot.addEventListener("webkitendfullscreen",function(){v.pausedByUser=!0},!1),v.videoSlot.addEventListener("webkitbeginfullscreen",function(){v.pausedByUser=!1},!1),v.videoSlot.setAttribute("playsinline",
"true"),v.videoSlot.setAttribute("webkit-playsinline","true"),d&&(c.elements.iframeDocument.body.classList.add("ios-native"),Object.defineProperty(v.videoSlot,"controls",{get:function(){return!1},set:function(){},enumerable:!0,configurable:!0})));Object.defineProperty(v.videoSlot,"src",{get:function(){return v.videoSource},set:function(a){a&&0!==a.length&&(v.videoSource=a,v.videoSlot.setAttribute("src",a))},enumerable:!0,configurable:!0});b&&c.elements.iframeDocument.body.classList.add("android");
O();b&&Z()})();return c});fb.smartPlay(function(c){function f(c,f){function p(){c.apply(this,arguments);l.unsubscribe(p,f)}l.subscribe(p,f)}var l=null,p=!1;Object.defineProperty(c,"adInfo",{set:void 0,get:function(){return c.environmentVars.adInfo},enumerable:!0,configurable:!0});Object.defineProperty(c,"adCompanions",{set:void 0,get:function(){return c.environmentVars.currentAd.creatives.filter(function(c){return"companion"===c.type})},enumerable:!0,configurable:!0});Object.defineProperty(c,"adExtensions",{set:void 0,get:function(){return c.environmentVars.currentAd.extensions},
enumerable:!0,configurable:!0});c.playAd=function(){l&&(c.environmentVars.pausedByUser=!1,p?l.resumeAd():l.startAd())};c.pauseAd=function(){l&&(c.environmentVars.pausedByUser=!0,l.pauseAd())};c.clickThrough=function(){l&&l.adManager.clickThrough()};c.unmuteAd=function(){c.environmentVars.muted=!1;c.environmentVars.videoSlot.muted=!1;c.environmentVars.videoSlot.removeAttribute("muted");l&&l.setAdVolume(c.environmentVars.volume)};c.getAdInfo=function(){return c.environmentVars.adInfo};c.handshakeVersion=
function(f){if(l)return f&&(c.environmentVars.isInApp=!0,c.elements.iframeDocument.body.classList.add("in-app")),c.getVersion()};c.clickThruAccept=function(){l&&c.environmentVars.isInApp&&c.environmentVars.videoClicks&&c.environmentVars.videoClicks.videoClickTrackingURLTemplates&&Ha.track(c.environmentVars.videoClicks.videoClickTrackingURLTemplates,c.environmentVars.urlEnrichmentModel)};c.clickThruRejected=function(){l&&c.environmentVars.isInApp&&c.playAd()};c.environmentVars.observe("playerReady",
function(){var C=parseInt(c.environmentVars.videoSlot.getAttribute("data-ois-instance-id"),10);(l=ois(C))&&f(function(){p=!0},"AdStarted")});return c});fb.smartPlay.EVENT={ON_AD_CLICKED:"AdClickThru",ON_AD_ERROR:"AdError",ON_AD_FINISHED:"AdStopped",ON_AD_LINEARITY_CHANGE:"AdLinearChange",ON_AD_MANIFEST_LOADED:"AdTagParsed",ON_AD_PLAYBACK_FINISHED:"AdVideoComplete",ON_AD_SCHEDULED:"AdLoaded",ON_AD_SKIPPED:"AdSkipped",ON_AD_STARTED:"AdStarted",ON_AD_FIRST_QUARTILE:"AdVideoFirstQuartile",ON_AD_IMPRESSION:"AdImpression",ON_AD_MID_POINT:"AdVideoMidpoint",ON_AD_PAUSED:"AdPaused",ON_AD_PLAYBACK_START:"AdVideoStart",ON_AD_PLAYING:"AdPlaying",ON_AD_THIRD_QUARTILE:"AdVideoThirdQuartile",
ON_AD_SLOT_START:"AdSlotStart",ON_AD_SLOT_STARTED:"AdSlotStarted",ON_AD_SLOT_FINISHED:"AdSlotStopped",ON_AD_SLOT_COMPLETE:"AdSlotComplete",ON_COMPANIONS_DETECTED:"AdCompanionsDetected",ON_EXTENSIONS_DETECTED:"AdExtensionsDetected"};(function(){function c(){}function f(){}function l(){function b(){var a=window.frameElement,b=window;for(n=0;a;)n++,b=a.ownerDocument.defaultView,a=b.frameElement;return b}function d(a){return new RegExp("[\\[]"+a+"[\\]]","gi")}function a(a){return encodeURIComponent(a).replace(/[!'()*]/g,function(a){return"%"+a.charCodeAt(0).toString(16)})}function c(b,d,e){if(-1===b.indexOf(d))return b;var h=b.substr(b.indexOf(d),b.indexOf("]",b.indexOf(d))-b.indexOf(d)+1),n=0<=h.indexOf("|")?parseInt(h.split("|")[1].slice(0,
-1),10):0;b=0===n?b.replace(h,a(e)):b.replace(h,a(e.substr(0,n)));0<=b.indexOf(d)&&(b=c(b,d,e));return b}var h={},f={timeOffset:0,assetUri:"",pageUri:"",pageTitle:"",techVersion:"",videoData:{}},q={},n=0;h.errorCode=function(b,c){if(!c)return b;q.ERRORCODE=a(c);return b.replace(d("(errorcode)"),a(c))};h.w=function(g){if(!g)return g;var h;if(h=f.timeOffset){var B=new Date(null);B.setSeconds(h);h=B.toISOString().substr(11,8)+".000"}else h=!1;q.CONTENTPLAYHEAD=a(h||"00:00:00.000");g=g.replace(d("(contentplayhead)"),
a(h||"00:00:00.000"));if(h=f.assetUri)g=g.replace(d("(asseturi)"),a(h)),g=c(g,"[ASSETURI",h),q.ASSETURI=a(h);if(h=f.pageUri)g=g.replace(d("(pageuri)"),a(h)),g=c(g,"[PAGEURI",h),q.PAGEURI=a(h);if(h=f.pageTitle)g=g.replace(d("(pagetitle)"),a(h)),q.PAGETITLE=a(h);if(h=f.techVersion)g=g.replace(d("(techversion|sdk_version)"),a(h)),q.TECHVERSION=a(h);h=d("(cachebusting|cache_?buster|rand(om|num))");B=a(Math.round(1E8*Math.random()));q.CACHEBUSTING=B;q.CACHEBUSTER=B;g=g.replace(h,B);B=new Date;h=B.toISOString();
B=B.getTimezoneOffset()/60;B=B.toString().split("");2===B.length&&B.splice(1,0,"0");B=B.join("");h=h.replace("Z",B);q.TIMESTAMP=a(h);g=g.replace(d("(timestamp)"),a(h));h="Unknown OS";-1!=navigator.appVersion.indexOf("Win")&&(h="Windows");-1!=navigator.appVersion.indexOf("Mac")&&(h="MacOS");-1!=navigator.appVersion.indexOf("X11")&&(h="UNIX");-1!=navigator.appVersion.indexOf("Linux")&&(h="Linux");g=g.replace(d("(USERAGENT)"),a(navigator.userAgent));g=g.replace(d("(OS)"),h);g=g.replace(d("(os_version|OSVERSION)"),
"unknown");q.USERAGENT=a(navigator.userAgent);q.OS=h;q.OSVERSION="unknown";b();q.FRAMEDEPTH=n;g=g.replace(d("(FRAMEDEPTH)"),n);if(h=f.videoData)g=g.replace(d("(dimension)"),a(h.width+"x"+h.height)),g=g.replace(d("(player_width|PLAYERWIDTH)"),a(h.width)),g=g.replace(d("(player_height|PLAYERHEIGHT)"),a(h.height)),q.PLAYERWIDTH=a(h.width),q.PLAYERHEIGHT=a(h.height);h=b().innerWidth||b().document.documentElement.clientWidth||b().document.body.clientWidth;B=b().innerHeight||b().document.documentElement.clientHeight||
b().document.body.clientHeight;q.SCREENRES=a(h+"x"+B);g=g.replace(d("(screen_res|screenres)"),a(h+"x"+B));h=e.eb();q.ALLOWINSWIPE=a(h);g=g.replace(d("(ALLOWINSWIPE)"),h);h=e.eb();q.FIF=a(h);g=g.replace(d("(FIF)"),h);return g.trim()};h.getCurrentModel=function(){var a={};Object.keys(q).forEach(function(b){a["["+b+"]"]=q[b]});return a};h.setValueFor=function(a,b){f[a]=b;q[a.toUpperCase()]&&(q[a.toUpperCase()]=b)};(function(){var a=b().location.href,d=b().document.title;window.Fc&&(a=window.context.location.href,
d=window.context.Rc);h.setValueFor("pageUri",a);h.setValueFor("pageTitle",d);h.setValueFor("techVersion",[I.IDENTIFIER,I.API_VERSION,I.API_BUILD].join("|"))})();return h}function p(b,d,a){function c(a,b){var d={};f.prototype.apply(this);var k=function(a,b){var d=-1!==String(a).indexOf("onTrack")?b:null,d=null===d?a:"AdVideo"+(d[0].toUpperCase()+d.slice(1));"AdVideoResume"===d&&(d="AdVideoPlay");"AdVideoImpression"===d&&(d="AdImpression");"AdVideoSkip"===d&&(d="AdSkipped");this.dispatchEvent(d,b)}.bind(this);
d.adManager=a;d.handshakeVersion=function(){return"2.0"};d.initAd=function(b,d,c,g,h,n){if(n&&n.rules)for(b=n.rules.length-1;0<=b;b--)e.gb(n.rules[b])&&a.addRuleToRuleSet(n.rules[b]);isNaN(g)||(e.ba=function(){return g});if(n&&n.desiredMimeTypes){var f=JSON.parse(JSON.stringify(e.tb));b=Object.keys(f);var x=n.desiredMimeTypes.join(" "),q={};b.filter(function(a){return-1<x.indexOf(f[a].typeString)}).forEach(function(a){q[a]=f[a]});e.za=function(){var a=document.createElement("video"),b={},d;for(d in q)q.hasOwnProperty(d)&&
(q[d].result=a.canPlayType(q[d].typeString),""!==q[d].result&&(b[d]=q[d]));return b}}a.registerGlobalEventDispatcher(k)};d.startAd=function(){a.start()};d.stopAd=function(){a.destroy()};d.skipAd=function(){this.dispatchEvent("AdSkipped");a.skipAd()}.bind(this);d.resizeAd=function(d,c,k){b.style.width=parseInt(d,10)+"px";b.style.height=parseInt(c,10)+"px";a.resize(d,c,k)};d.pauseAd=function(){a.pauseAd()};d.resumeAd=function(){a.resumeAd()};d.expandAd=function(){};d.collapseAd=function(){};d.setAdVolume=
function(b){a.setAdVolume(b)};d.getAdVolume=function(){return a.getAdVolume()};d.getAdMutedState=function(){return a.getAdMutedState()};d.getSlot=function(){return a.getSlot()};d.getVideoSlot=function(){return a.getVideoSlot()};d.getPlayerSlot=function(){return B.getParent()};d.subscribe=function(a,b,d){this.addEventListener(b,a,d);return a}.bind(this);d.unsubscribe=function(a,b){this.removeEventListener(b,a)}.bind(this);return d}var B;if(!b.getAttribute("data-ois-instance-id")){b.setAttribute("data-ois-instance-id",
h.length);var x=null;d.displaySlot&&d.displaySlot.nodeType&&(x=d.displaySlot);"string"===typeof d.displaySlot&&(x=e.find(d.displaySlot)[0]||null);B=new S(b,x);var x=new F(d),r=new J(B,x),n=new c(r,b),g={adManager:r,config:x};q.forEach(function(a){a(n,b,d,g)});h.push({fa:n,element:b,ec:d,adManager:r,v:x});(a||Function)()}return h[b.getAttribute("data-ois-instance-id")].fa}function C(b){function d(a){var b=0,d=0;try{if(a.offsetParent)for(b=a.offsetLeft,d=a.offsetTop;(a=a.offsetParent)&&"BODY"!==a.tagName.toUpperCase();)b+=
a.offsetLeft,d+=a.offsetTop}catch(c){}return{left:b,top:d}}var a={i:{width:0,height:0,left:0,top:0},f:{width:0,height:0,left:0,top:0},R:!1,A:0,Oa:0,Pa:0,Na:0},c=[],h="ois_"+e.Ua().split("-").join(""),f,q;this.K=function(){"undefined"==typeof q&&(q=window.self===window.top?window.self:window.top);if("undefined"==typeof f)try{f=q.document}catch(e){f=window.document}a.i={width:f.documentElement.clientWidth||q.innerWidth||f.body.clientWidth,height:f.documentElement.clientHeight||q.innerHeight||f.body.clientHeight,
left:q.scrollX||f.documentElement.scrollLeft||f.body.scrollLeft,top:q.scrollY||f.documentElement.scrollTop||f.body.scrollTop};var n=d(b);if(window.self!==window.top)try{var g;a:{var m=top.document.getElementsByTagName("iframe"),r;for(r in m)try{if(m[r].contentWindow[h]){g=m[r];break a}}catch(e){}g=void 0}var y=d(g);n.left+=y.left;n.top+=y.top}catch(e){}a.f={width:b.offsetWidth,height:b.offsetHeight,left:n.left,top:n.top};a.i.left>=a.f.left+a.f.width||a.i.top>=a.f.top+a.f.height||a.f.left>=a.i.left+
a.i.width||a.f.top>=a.i.top+a.i.height?(a.A=0,a.R=!1):0>=a.f.width||0>=a.f.height?(a.A=0,a.R=!1):a.f.left>=a.i.left&&a.f.top>=a.i.top&&a.f.left+a.f.width<=a.i.left+a.i.width&&a.f.top+a.f.height<=a.i.top+a.i.height?(a.A=100,a.R=!0):(n=a.f.width,g=a.f.height,a.f.left<a.i.left?n=a.f.width-(a.i.left-a.f.left):a.f.left+a.f.width>a.i.width+a.i.left&&(n=a.i.width-(a.f.left-a.i.left)),a.f.top<a.i.top?g=a.f.height-(a.i.top-a.f.top):a.f.top+a.f.height>a.i.height+a.i.top&&(g=a.i.height-(a.f.top-a.i.top)),a.A=
Math.floor(n*g/(a.f.width*a.f.height)*100),0<a.A&&(a.R=!0));1==a.R?(a.Oa+=.25,a.Pa=.25):a.Pa=0;a.Na+=.25;c.push(a.R);return a};window[h]=h}function J(b,d){function a(){w.b(1010);w.b(1020);w.b(1030);w.b("AdCompanionsDetected");w.b("AdLoaded");w.b("AdSlotStarted",r);w.b("AdSlotComplete",r);w.b("START_LINEAR",r);w.b("START_NONLINEAR",r);w.b("AdStopped",r);b.b("CONTROLS_ON",r);b.b("CONTROLS_OFF",r);b.g("play,pause,ended,timeupdate,volumechange,error,durationchange",q)}function c(){D=b.h("currentSrc");
v=b.h("currentSrcType");e.B(b.h("currentSrc"))&&(d.Tc=e.tc(b.h("currentSrc")));t.log(101,D)}function h(){return D?b.h("currentSrc")==D:!0}function f(a){a="object"===typeof a?a.info:a;!1!==a&&(a=!0);t.log(100,a);b.setControls(a)}function q(a){"timeupdate"!=a.type&&t.log(101,a.type);switch(a.type){case 1030:var y=b.h("currentTime");0!=y&&h()&&(H=Number(Number(y).toFixed(1)));n(!1);f(!1);g(!0);break;case 1020:n()?z&&m():(D&&0<D.length&&b.ja({url:D,type:v},null==H||0==H||z?!1:H,z),z&&m(),n(!0),f(!0),
g(!1))}if(!0===g())switch(a.type){case "play":case "error":if(!C&&"error"===a.type&&(t.log(102,b.h("error")),w&&!w.da())){w.pa(!1,401);break}if(a=p.aa(0))c(),D&&b.M(),w.startAd(a);!0===C&&(C=!1,c(),g(!1))}else switch(a.type){case "error":t.log(102,a.type,b.h("src"));!w||h()&&!w.da()||w.da()||w.pa();break;case "timeupdate":a=b.h("duration");y=b.h("currentTime");!g()&&y>d.overlayDelay&&y<a-5&&h()&&(p.vc(a),a=p.aa(y))&&("fixedroll"==a.type&&(c(),w.startAd(a)),"overlay"!=a.type||e.La&&null===b.getVideoSlot().getAttribute("webkit-playsinline")||
w.startAd(a));a=b.h("duration");y=b.h("currentTime");y<a&&y>a-1&&h()&&e.I&&(p.Qb(a)?(E=1,(a=p.aa(a))?(c(),w.startAd(a)):(w.da()&&w.ea(),m())):K=!0);break;case "ended":if(!e.I&&h()&&(z=!0,(a=p.aa(b.h("duration")))?(c(),w.startAd(a)):(w.da()&&w.ea(),m()),b.M()),h()&&e.I&&1==E)E=2;else if(h()&&e.I&&2==E||K)m(),E=3}}function n(a){if(void 0!=a)l=a;else return l}function g(a){if(void 0!=a)y=a;else return y}function m(){t.log(104);b.M();if(d.onFinish)d.onFinish();a()}function r(a){if(u[a.type])u[a.type](a);
switch(a.type){case "AdSlotStarted":b.ob(!0);break;case "AdSlotComplete":b.ob(!1);break;case "AdStopped":p.bc()&&r({type:"BLOCK_DONE"})}}var y=!0,l=!1,u={},w,p,D,v,H=null,z=!1,E=!1,K=!1,C=!0,U=new e.j.s;this.registerGlobalEventDispatcher=U.registerGlobalEventDispatcher;this.destroy=function(){w&&(t.log(105),w.ea(),a())};this.start=function(){var a=b.h("currentSrc");/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)&&g()&&!a?q({type:"play"}):b.O()};this.onAdLoadCompleteCallback=function(a){w&&w.a("AdLoaded",
e.D(a)?a:function(){})};this.setControllerEvents=function(a){u=a};this.Nb=function(){return b.Nb()};this.pauseAd=function(){w.pauseAd()};this.resumeAd=function(){w.resumeAd()};this.resize=function(a,d,c){var k=document.createEvent("HTMLEvents");k.initEvent("resize",!0,!1);b.getVideoSlot().dispatchEvent(k);w.resizeAd(a,d,c)};this.addRuleToRuleSet=function(a){w.addRuleToRuleSet(a)};this.removeRules=function(a){return w.removeRules(a)};this.setAutoplay=function(a){w.setAutoplay(a)};this.startLinear=
function(a){w.startLinear(a)};this.setVpaidAd=function(a){w.setVpaidAd(a)};this.triggerEvent=function(a,b){U.triggerEvent(a,b)};this.clickThrough=function(){w.clickThrough()};this.trackingController=function(){return w.trackingController()};this.skipAd=function(){w.skipAd()};this.setAdVolume=function(a){w.setAdVolume(a)};this.getAdVolume=function(){return w.getAdVolume()};this.getAdMutedState=function(){return w.getAdMutedState()};this.startAd=function(a){w.startAd(a)};this.getAdConfig=function(){return w.getAdConfig()};
this.isVPAID=function(){return w.isVPAID()};this.getSlot=function(){return w.getSlot()};this.getVideoSlot=function(){return w.getVideoSlot()};this.startAds=function(a){w.startAds(a)};this.trackErrorAndRestartAd=function(a){w.pa(!0);p.reset();(a=p.aa(a||0))&&"fixedroll"==a.type&&(1<a.tag.length&&0===a.urls.length&&(a.urls.unshift(a.tag),a.limit=a.urls.length),w.ea())};t.log(109,I.API_VERSION);p=new P(d);w=new G(b,d);w.registerGlobalEventDispatcher(U.C);b.registerGlobalEventDispatcher(U.C);w.a(1010,
f);w.a(1020,q);w.a(1030,q);w.a("AdCompanionsDetected",function(a){t.log(103);if(d.onCompanion)d.onCompanion(a.info);d.companionCallback&&d.companionCallback(a.info)});w.a("AdSlotStarted",r);w.a("AdSlotComplete",r);w.a("START_LINEAR",r);w.a("START_NONLINEAR",r);w.a("AdStopped",r);b.a("CONTROLS_ON",r);b.a("CONTROLS_OFF",r);b.m("play,pause,ended,timeupdate,volumechange,error,durationchange",q)}function F(b){function d(){for(var b in n)"undefined"!==typeof g[b]&&(g[b]=a(n[b],g.ga[b]))}function a(b,d){switch(typeof d){case "number":return!b||
isNaN(parseInt(b,10))?d:parseInt(b,10);case "object":for(var c in d)b[c]=b[c]?a(b[c],d[c]):d[c];break;default:if(void 0===b||null===b)return d}return b}function c(){4==m.readyState&&(200==m.status?h():g.H&&g.H(g))}function h(){g.oa({});if(g.onConfigLoaded)g.onConfigLoaded(g)}function f(){g.H&&g.H(g)}var q={key:"",adResponse:"",preroll:"",midroll:"",postroll:"",overlay:"",fixedroll:"",fixedrolls:[],overlayDelay:5,overlayDuration:15,minDurationForMidrolls:100,customControls:!1,urlhandler:"",blockInsecureURL:!0,
maxWrapperDepth:10,prefetchBuffets:!1,adVerification:{meetrics:!1},skipButtonPosition:"top",skipButtonText:"Skip this Ad",styles:{colorScheme:{backgroundColor:"rgba(0,0,0,.8)",color:"#ffffff"},fontStyle:{textAlign:"left",fontFamily:"Arial,sans,Verdana",fontSize:"12px",lineHeight:"20px"},dialogBox:{width:"200px",padding:"7px",border:"1px solid #ffffff",borderRadius:"3px"},buttonStyle:{width:"80px",height:"25px",margin:"2px",marginTop:"9px",border:"1px solid #ffffff",borderRadius:"3px",lineHeight:"0px",
textAlign:"center"}},onCompanion:null,companionCallback:null,onTrack:function(){},onFinish:null,vpaidSingleVideoSlotMode:!0,vb:"",vastExtensions:{},lb:!0},n=b,g=this;g.ga=q;var m;this.Lb=function(){return g};this.oa=function(a){n=a;d();e.cb(a)&&(g.onConfigLoaded=a.onConfigLoaded,g.H=a.H,g.jb(a.externalConfigXml))};this.jb=function(a){a=e.urlEnrichment.w(a);m=window.XDomainRequest?new window.XDomainRequest:new XMLHttpRequest;window.XDomainRequest?(m.onload=h,m.onerror=f,m.open("GET",a)):(m.open("GET",
a,!0),m.onreadystatechange=c);m.send()};this.H=this.onConfigLoaded=null;this.id="test";(function(){g.ga=q;for(var a in g.ga)g[a]=g.ga[a]})();d();e.cb(b)&&(g.onConfigLoaded=b.onConfigLoaded,g.H=b.H,g.jb(b.externalConfigXml))}function R(){function b(b){var d=a.filter(function(a){return a.hasOwnProperty(b)});if(!(1>=d.length)){var c=a.filter(function(a){return!a.hasOwnProperty(b)}),d=d.map(function(a){return a[b]}).join("|");if(-1===d.indexOf("true")||-1===d.indexOf("false")){var k={};k[b]=d;c.push(k)}a=
c}}var d=new e.j.s;e.Ob();var a=[],c={};this.a=d.a;this.b=d.b;this.registerGlobalEventDispatcher=d.registerGlobalEventDispatcher;this.addRule=function(d){if("type"===Object.keys(d).shift()||"format"===Object.keys(d).shift())a.push(d);else return b("type"),b("format"),b("scalable"),b("maintainaspectratio"),a=a.concat([d]).reduce(function(a,b,d){var c=Object.keys(b).shift();c in a.keys?a.result[a.keys[c]]=b:(a.keys[c]=d,a.result.push(b));return a},{result:[],keys:{}}).result,this};this.removeRule=function(b){a=
a.filter(function(a){return Object.keys(a).shift()!==b})};this.U=function(){b("type");b("format");b("scalable");b("maintainaspectratio");return a};this.ib=function(){c=e.za();a.push({delivery:"progressive"});c=e.za();for(var b in c)c.hasOwnProperty(b)&&a.push({type:c[b].Fa});a.push({type:e.na});a.push({format:window.ois.MediaFileFormat.WIDE});a.push({width:5E3});a.push({bitrate:e.ba()||5E3});a.push({apiFramework:"VPAID"})};this.ib()}function S(b,d){function a(a){"play"!==a.type||b.commercial||(D=
!1);"pause"!==a.type||b.commercial||(D=!0)}function c(){v.m(b,"timeupdate,ended",h);if(!1===u){t.log(805);v.g(b,"timeupdate,ended",h);q(y);b.load();w();var a=b.play();void 0!==a&&a.then(function(){},function(){});l=!1}}function h(a){"timeupdate"===a.type&&0<b.seekable.length&&(u=!0,b.seekable.end(0)>=b.duration&&6E3!==b.duration&&100!==b.duration&&(t.log(803,b.duration),b.currentTime=b.duration,v.g(b,"timeupdate",h)));"ended"===a.type&&(t.log(804,a.type),q(y),b.load(),w(),a=b.play(),void 0!==a&&a.then(function(){},
function(){}),v.g(b,"ended",h),l=!1)}function f(){try{b.seekable.end(0)>=r&&0<b.currentTime&&(b.currentTime=r,v.g(b,"timeupdate",f),t.log(801,r))}catch(a){t.log(802,a)}}function q(a){a=e.Z(a);if(e.wb)for(var d=b.getElementsByTagName("source"),c=a.split("."),k,c=c[c.length-1],g=0;g<d.length;g++)if(k=d[g].src.split("."),k=k[k.length-1],k===c){d[g].src=a;return}b.src=a}function n(a,b){var d=null;window.getComputedStyle?d=parseFloat(window.getComputedStyle(a,"").getPropertyValue(b)):a.currentStyle&&(d=
parseFloat(a.currentStyle[b]));return d?d.toFixed(2)+"px":null}function g(a){z.triggerEvent(5010,a.type||void 0)}function m(){b.muted&&!1===I?(I=!0,z.triggerEvent(5020,!0)):b.muted||!0!==I||(I=!1,z.triggerEvent(5020,!1))}var r,y,l=!1,u=!1,w,p,D,I=!1,v,z=new e.j.s;this.h=function(a){if(a)switch(a){case "currentTime":return b.currentTime;case "duration":return b.duration;case "currentSrc":return b.currentSrc;case "currentSrcType":return"-unused-";case "src":return b.src;case "controls":return b.controls;
case "paused":return b.paused;case "volume":return b.volume;case "error":return b.error;default:return null}return{currentTime:b.currentTime,duration:b.duration,currentSrc:b.currentSrc,src:b.src,controls:b.controls,paused:b.paused,volume:b.volume,error:b.error}};this.ob=function(a){b&&(b.commercial=a)};this.l=function(a){if(a)switch(a){case "width":return Math.round(b.getBoundingClientRect().width);case "height":return Math.round(b.getBoundingClientRect().height);case "top":return Math.round(b.getBoundingClientRect().top-
document.body.getBoundingClientRect().top);case "left":return Math.round(b.getBoundingClientRect().left-document.body.getBoundingClientRect().left);default:return null}return{width:Math.round(b.getBoundingClientRect().width),height:Math.round(b.getBoundingClientRect().height),top:Math.round(b.getBoundingClientRect().top-document.body.getBoundingClientRect().top),left:Math.round(b.getBoundingClientRect().left-document.body.getBoundingClientRect().left)}};this.M=function(){var a=b.pause();void 0!==
a&&a.then(function(){},function(){})};this.O=function(){if(!D){var a=b.play();void 0!==a&&a.then(function(){},function(){})}};this.ja=function(a,d,g){t.log(806,a,d,g);y=e.gb(a)?a.url:a;p||(b.width||b.style.width||(b.style.width=n(b,"width")||"100%"),b.height||b.style.height||(b.style.height=n(b,"height")||"100%"),p=!0);e.I&&l?c():(q(y),b.load(),d&&(r=d,v.m(b,"timeupdate",f)),g||(a=b.play(),void 0!==a&&a.then(function(){},function(){})))};this.oc=function(a,b){t.log(807,a);l=a;w=b};this.setControls=
function(a){b.controls=a};this.getParent=function(){return d||b.parentNode};this.mb=function(){v.g(b,"click",void 0)};this.m=function(a,d){v.m(b,a,d)};this.g=function(a,d){v.g(b,a,d)};this.getVideoSlot=function(){return b};this.a=z.a;this.b=z.b;this.registerGlobalEventDispatcher=z.registerGlobalEventDispatcher;this.destroy=function(){v.g(b,"mousedown",void 0);v.g(b,"timeupdate",f);v.g(b,"volumechange",m);v.g(b,"timeupdate,ended",h);v.g(window,"resize,orientationchange",g);v.g(document,"mozfullscreenchange,webkitfullscreenchange",
g);v.g(b,"pause play",a)};v=new e.j.Event;v.m(window,"resize,orientationchange",g);v.m(document,"mozfullscreenchange,webkitfullscreenchange",g);b.muted&&(I=!0);v.m(b,"volumechange",m);v.m(b,"pause play",a)}function T(b){function d(){q.triggerEvent("AdStopped",void 0)}function a(a,b,d){m||(m=a);r||(r=b);y||(y=d)}function c(a){u=a?new window[D](m,r,t,y,g):new I.extensions[w](m,r,t,y,g);e.D(u.a)&&(u.a("PAUSEAD",l),u.a("RESUMEAD",l));f.push(u)}var h,f=[],q=new e.j.s,n,g=this,m,r,y,l,t,w,u,p,v,D,z;this.a=
q.a;this.b=q.b;this.ca=function(b,d,g){a(b,d,g);if(h&&!(1>h.length))for(b=0;b<h.length;b++)t=h[b],w=t.attributes[0].value,I.extensions[w]?c(!1):(p=r.v.vastExtensions,v=Object.getOwnPropertyNames(p),v.forEach(function(a){D=p[a].className||a;z=p[a].src;D===w&&(window[D]&&"function"===typeof window[D]?c(!0):z&&(a=e.createElement("script",{type:"text/javascript"}),document.head.appendChild(a),a.addEventListener("load",function(){c(!0)},!1),a.src=z))}))};this.destroy=function(){if(0<f.length)for(var a=
0;a<f.length;a++)f[a].destroy&&f[a].destroy();n&&n.b("AdStopped",d);l=y=r=m=!1};this.onResize=function(){if(0<f.length)for(var a=0;a<f.length;a++)f[a].setViewport({width:b.l("width"),height:b.l("height")})};this.setup=function(a,b,c){h=a;l=b;n=c;n.a("AdStopped",d);return g}}function G(b,d){function a(a){if(!A)return!1;if((a="fixedroll"===a?A.Aa():A.ia())&&a.StaticResource){var b=a.attributes.apiFramework?a.attributes.apiFramework:"UNKNOWN";if(-1!=e.na.indexOf(a.resourceAttributes.creativeType.toLowerCase())&&
"VPAID"==b.toUpperCase())return t.log(V),!0}else if(a&&a.apiFramework&&"VPAID"==a.apiFramework.toUpperCase())return!0;return!1}function c(){clearInterval(Ra);za=!1;Ra=setInterval(function(){N.Rb();var a=(new Date).getTime();void 0==Ia&&(Ia=a);a=parseInt(a-Ia,10)/1E3;A.qb(a);a>parseInt(d.overlayDuration,10)&&P()},250);za=!0;M.ya()}function h(a){ha=a.info;M&&(a.info?M.Sa():M.callUnmuteTracker());F("AdVolumeChange",{isMuted:a.info})}function f(a){a.info&&"fullscreen"===a.info&&M.callTracker("fullscreen");
a.info&&"exitFullscreen"===a.info&&M.callTracker("exitFullscreen");L&&L.resizeAd(b.l("width"),b.l("height"),void 0);la.onResize()}function q(a){var b=a.type;"pause"===b&&a.target.currentTime>=a.target.duration||("play"===b&&0<a.target.currentTime&&(b="resume"),a=L?!0:!1,M&&!a&&M.callTracker(b))}function n(a){G();A=new Z(d,b);A.wc(ia);N=new O(b,A);N.a("AdClickThru",y);N.a("AdClickThruReject",y);N.a(2020,y);N.registerGlobalEventDispatcher(Y.C);A.a(3010,y);A.a(3020,y);A.a(3030,y);A.a(3035,y);A.a(3050,
y);A.a(3040,y);A.a(7E3,y);A.registerGlobalEventDispatcher(function(a){"AdTagSkipDetected"===a&&(va=!0,t.log(5100))});A.registerGlobalEventDispatcher(Y.C);b.m("play",q);b.m("pause",q);b.a(5020,h);b.a(5010,f);F("AdSlotStart");"fixedroll"===na?A.hb(Ea.urls.shift(),Ea.responseXML):"overlay"===na&&a&&(null!==ka?(ka.nonLinearsTracker.impression=[],ka.gotLinear=!1,ka.companion=[],ka.companionsAsString=null,A.cc(ka),ka=null):A.hb(a))}function g(){y({type:"RESUMEAD"})}function m(){M&&M.Fb();E()}function r(d){F(1030);
a("fixedroll")?ja?L&&L.resumeAd():(L.startAd(),S=ja=!0,b.g("ended",E)):(b.oc(sa,v),b.ja(A.Ba(),d,!1),b.m("loadeddata",function wa(){b.g("loadeddata",wa);F("AdStarted")}),sa=!1,v());qa||(qa=!0,F("AdSlotStarted"));F("START_LINEAR")}function y(e){t.log(201,e.type);M||(M=new U(b,d,A,na),M.registerGlobalEventDispatcher(Y.C),M.a("AdCapped"));M.Ha(A);switch(e.type){case "PAUSEAD":if(!za&&!S)break;ma=!0;F("AdPaused",!0);L?L.pauseAd():(b.M(),b.m("play",g));F(1010,!0);N.Va();break;case "RESUMEAD":ma=!1;F("AdPlaying",
!0);L&&(L.resumeAd(),F("onTrack","play"));if(ma||b.h("paused"))b.g("play",g),b.O();N&&N.Gb();F(1010,!1);b.setControls(!1);break;case 3010:M.Ha(A);e="fixedroll"===na?A.Aa():A.ia();a("fixedroll")||F("AdLoaded",A.c());var h=A.J(),f=h.icons&&0<h.icons.length;A.c()&&h&&f&&(t.log(5050),Y.triggerEvent(4300,h.icons));F("AdMediaSelected",e);D();"overlay"===na&&A.c().gotNonLinear?(N.Wb(),e=A.Mb(),J(e),N.nc(e),a("overlay")&&p("overlay"),c(),F("START_NONLINEAR")):"fixedroll"==na&&A.Ba()?(N.ca(),N.Ga(),va&&N.Xb(),
N.a("SKIP",m),a("fixedroll")&&(N.Vb(),p("fixedroll"),ra&&L.nb(ra),b.g("ended",E),L.a("AdLoaded",function xa(){L&&(L.b("AdLoaded",xa),ta&&(L.startAd(),ja=!0))})),ta&&r()):"fixedroll"!==na&&"overlay"!==na||u(200);la.ca(N,A,M);break;case "AdClickThru":ba();break;case "AdClickThruReject":b.setControls(!1);b.O();break;case 3020:h=!1;e.info&&(h=e.info.silent);h||(t.log(202,e.info),Y.triggerEvent("AdError",e.info||e.type));l(e.info||e.type);h||C();break;case 2020:t.log(203);M.Cb();P();break;case 3030:ka=
e.info;break;case 3035:la.setup(e.info,y,ya);break;case 3050:M.callCustomTracker(e.info,"cappedImpression");break;case 3040:M.xa(302);break;case 7E3:u(303)}}function l(a){var b=a.errorCode||a;a=a.errorURLTemplates;t.log(202,b);M&&M.xa({info:{errorCode:b,errorURLTemplates:a}})}function u(a){l(a);Y.triggerEvent("AdSlotComplete");P()}function w(a){t.log(950,a.type);switch(a.type){case 6010:null!==M&&M.xa(901);L&&(L.b(6010,w),L=null);E();break;case 6020:F(1030);break;case 6030:F(1020);break;case 6040:case 6050:E();
break;case 6060:ba(a.info)}}function p(a){L=new K;L.a(6010,w);L.a(6020,w);L.a(6030,w);L.a(6040,w);L.a(6050,w);L.a(6060,w);L.a("AdVideoComplete",w);L.a(6070,h);L.registerGlobalEventDispatcher(Y.C);"overlay"===a?L.ca(A.ia(),N,b,M,A):L.Ub(A.Aa(),N,b,M,A)}function D(){var a=A.c().creatives.filter(function(a){return"companion"===a.type}).shift();a&&F("AdCompanionsDetected",a)}function v(){clearInterval(oa);S=!1;b.m("ended",E);oa=setInterval(function(){var a=(new Date).getTime();void 0==W&&(W=a);var a=
b.h("currentTime"),d=b.h("duration");M&&M.handleTracking();Number.isFinite(d)&&A&&(A.qb(d-a),A.totalTime!==d&&A.mc(d))},250);S=!0}function H(){if(A&&A.Bb()){t.log(5003);N&&N.destroy();N=new O(b,A);N.a("AdClickThru",y);N.a("AdClickThruReject",y);N.a(2020,y);N.registerGlobalEventDispatcher(Y.C);la.destroy();if(L){L.stopAd();setTimeout(function(){L=null;ja=!1;A.ka()},500);return}A.ka();return!0}return!1}function z(){M&&(!1===M.Ta()?setTimeout(z,16):(M.b("AdCapped"),M=null,C()))}function E(){b.g("ended",
E);L&&(L.b(6050,E),L=null,ja=!1);M?(M.handleTracking(),z()):C()}function C(){!N&&!A&!S||(clearInterval(oa),S=!1,F("AdStopped"),H()||(N&&N.destroy(),A&&A.destroy(),N=I.Ja=null,A=I.Ia=null,la&&la.destroy(),qa=!1,F("AdSlotStopped"),F("AdSlotComplete"),F(1020)))}function P(){t.log(204,na);t.log(5005);G();e.urlEnrichment.setValueFor("errorCode","");if(L)L.stopAd();else if("overlay"==na||za)t.log(205,na),d.ta&&(d.overlayDuration=d.ta,delete d.ta),clearInterval(Ra),za=!1,Ia=void 0,N.kc(),A.destroy(),N=I.Ja=
null,A=I.Ia=null,e.ra&&F(1010,!0);else if("fixedroll"===na){var a=function(){!1===M.Ta()?setTimeout(a,16):(F("AdSlotComplete"),F(1020))};clearInterval(oa);S=!1;W=void 0;N&&N.destroy();A&&A.destroy();N=I.Ja=null;A=I.Ia=null;la&&la.destroy();a()}}function G(){N&&(N.b("AdClickThru"),N.b("AdClickThruReject"),N.b(2020));A&&(A.b(3010),A.b(3020),A.b(3030),A.b(3035),A.b(3050),A.b(3040),A.b(7E3),A.G());b.g("play",q);b.g("pause",q);b.g("ended",E);b.b(5020,h);b.b(5010,f)}function F(a,b){Y.triggerEvent(a,b)}
function J(a){a&&a.attributes&&a.attributes.minSuggestedDuration&&15<e.V(a.attributes.minSuggestedDuration)&&e.V(a.attributes.minSuggestedDuration)>d.overlayDuration&&(d.ta=d.overlayDuration,d.overlayDuration=e.V(a.attributes.minSuggestedDuration))}function ba(a){var d="_blank";window.envBlocked&&(d="_self");M.Ra();var c=A.J();if("fixedroll"===na&&(c.videoClickThroughURLTemplate||a)){a=a||c.videoClickThroughURLTemplate;if(!a||0===a.length||0===a.trim().length){g();return}d=window.open(a,d);null!==
d&&"undefined"!==typeof d&&(F(1010,!0),N.Va())}else"overlay"===na&&(A.c().nonLinearsVideoclicks.url||a)&&(a=a||A.c().nonLinearsVideoclicks.url,window.open(a,d));b.setControls(!1);F("AdClickThru",!0)}var Y=new e.j.s,M,N,A,L,oa,W,S=!1,Ra,Ia,za=!1,Ea,na,ka=null,va=!1,ma,sa=!1,ia=new R,la=new T(b),ya=this,ta=!0,qa=!1,ra=null,ja=!1,ha;this.startLinear=function(a){r(a)};this.startAd=function(a){na=(Ea=a)&&a.type?a.type:!1;return Ea?("fixedroll"===na?(!0===za&&P(),sa=!0,n()):"overlay"===na&&Ea.urls[0]&&
n(Ea.urls[0]),!0):!1};this.a=Y.a;this.b=Y.b;this.registerGlobalEventDispatcher=Y.registerGlobalEventDispatcher;this.G=Y.G;this.pa=function(a,b){var d=b||400;try{t.log(202,d),Y.triggerEvent("AdError",{errorCode:d}),l(d)}catch(c){}a||E()};this.ea=function(){b&&b.destroy();E()};this.da=function(){return za};this.pauseAd=function(){y({type:"PAUSEAD"})};this.resumeAd=function(){y({type:"RESUMEAD"})};this.setAutoplay=function(a){ta=a};this.addRuleToRuleSet=function(a){ia&&ia.addRule(a)};this.removeRules=
function(a){if(ia)return ia.removeRule(a)};this.setVpaidAd=function(a){ra=a};this.setAdVolume=function(a){L&&L.setAdVolume(a)};this.getAdVolume=function(){return L?L.getAdVolume():b.h("volume")};this.getAdMutedState=function(){return ha};this.clickThrough=function(){if(!(A&&A.c()&&A.c().variant&&"commercial"!==A.c().variant&&"sponsored"!==A.c().variant||.5>b.h("currentTime"))){if("fixedroll"===na){var a=A.J().videoClickThroughURLTemplate;if(!a||0===a.length||0===a.trim().length)return}y({type:"PAUSEAD"});
ba()}};this.trackingController=function(){M||(M=new U(b,d,A,"fixedroll"),M.registerGlobalEventDispatcher(Y.C),M.a("AdCapped"));M.Ha(A);return M};this.resizeAd=function(a,b,d){L&&L.resizeAd(a,b,d)};this.skipAd=function(){L?L.skipAd():m()};this.getAdConfig=function(){return Ea};this.isVPAID=function(){return L?!0:!1};this.getVideoSlot=function(){return L?L.getVideoSlot():b.getVideoSlot()};this.getSlot=function(){return L?L.getSlot():document.createElement("div")};this.startAds=function(a){A||(na="unknown",
n());na="fixedroll";A.lc(a);A.ka()}}function Z(b,d){function a(a){t.log(301,a.type);m&&m.c()&&(l=m.c());switch(a.type){case 4200:c(4200,a.info);break;case 7E3:r.triggerEvent(7E3);break;case "AdTagParsed":c("AdTagParsed",a.info);if(l.ads.length>H&&l.ads[H].errorCode){c(3020,l.ads[H]);break}(a=g())?a&&D.fileURL&&(l.ads[H].creatives.filter(function(a){return"linear"===a.type}).shift().supportedMediaFiles=v.Ca(),c(3010)):(l.ads[H].errorCode=403,c(3020,l.ads[H]));break;case 4030:u=!0;w++;h(l.Zc);break;
case "VAST-error":a.info&&a.info.rc||c(3020,a.info);break;case 4040:c(3030,e.clone(l));break;case 4050:c(3035,l.extensions);break;case 4100:c(3050,a.info)}}function c(a,b){r.triggerEvent(a,b)}function h(a){var b;window.XDomainRequest?(t.log(303),b=new window.XDomainRequest):(t.log(304),b=new XMLHttpRequest);y=b;e.urlEnrichment.setValueFor("videoData",d.l());a=e.urlEnrichment.w(a);window.XDomainRequest?(y.onload=q,y.onerror=n,y.open("GET",a)):(y.open("GET",a,!0),e.qc(a)&&(y.withCredentials=!0),y.onreadystatechange=
f);y.send()}function f(){4==y.readyState&&(200==y.status?q():n())}function q(){var b=y.responseText;!1===u?(m=new W,m.registerGlobalEventDispatcher(r.C),m.a("AdTagParsed",a),m.a("VAST-error",a),m.a(4030,a),m.a(4040,a),m.a(4050,a),m.a(4100,a),m.a(7E3,a)):!0===u&&(u=!1);m.kb(b)}function n(){c(3020,300)}function g(){v=new I.MediaSelector(z,p);v.Hb().sc();if(0<v.Ca().length){var a=v.Ca(),b=e.ba()||5E3,d=[],d=a.filter(function(a){return a.apiFramework&&"VPAID"===a.apiFramework.toUpperCase()}),a=0<d.length?
d:a,a=a.reduce(function(a,d){return Math.abs(d.bitrate-b)<Math.abs(a.bitrate-b)?d:a});a.fileURL=e.Z(a.fileURL);D.url=a.fileURL;D.type=a.mimeType;D.index=0;e.extend(D,a);"string"===typeof D.fileURL&&(e.urlEnrichment.setValueFor("assetUri",D.fileURL),D.fileURL=e.urlEnrichment.w(D.fileURL));return!0}e.urlEnrichment.setValueFor("assetUri",null);D.url=null;return!1}var m=null,r=new e.j.s,y,l={ads:[],videoClicks:{},tracker:[],linear:[],nonLinearsVideoclicks:{},nonLinearsTracker:[],nonLinears:[],extensions:[],
companion:[],companionsAsString:null,asString:null,duration:null,gotLinear:!1,gotNonLinear:!1,isCombi:!1,Mc:[]},u=!1,w=0,p=new R,v=null,D={url:null,index:null,type:null},H=0,z=this;this.wc=function(a){p=a};this.U=function(){return p.U()};this.v=b;this.la=void 0;this.totalTime=l.duration;this.hb=function(c,k){m=new W(b);m.a("AdTagParsed",a);m.a(4200,a);m.a("VAST-error",a);e.urlEnrichment.setValueFor("videoData",d.l());window.macroModel=e.urlEnrichment.getCurrentModel;m.gc(k?null:c,k)};this.ia=function(){return this.c().creatives.filter(function(a){return"nonlinear"===
a.type}).shift()};this.J=function(){return this.c().creatives.filter(function(a){return"linear"===a.type}).shift()};this.Mb=function(){return this.ia()};this.Aa=function(){return D};this.Ba=function(){return D.fileURL};this.qb=function(a){this.totalTime=l.duration;this.la=l.duration-a;c("AdRemainingTimeChange")};this.mc=function(a){this.totalTime=a;c("AdDurationChange")};this.cc=function(a){l=e.clone(a);c(3010)};this.destroy=function(){t.log(5006);null!==m&&(m.b("VAST-error"),m.b("AdTagParsed"),m.b(4030),
m.b(4040),m.b(4100),m.b(7E3),m.G(),m=null);r=null};this.a=r.a;this.b=r.b;this.registerGlobalEventDispatcher=r.registerGlobalEventDispatcher;this.G=r.G;this.c=function(){return l.ads[H]};this.lc=function(a){H=-1;l.ads=a};this.ka=function(){H++;a({type:"AdTagParsed",info:l})};this.Bb=function(){return H<l.ads.length-1}}function O(b,d){function a(){var a=b.l();H="display:block;position:absolute;overflow:hidden;text-align:center;font-family:Arial,sans,Verdana;opacity:1;";I="display:block;position:absolute;overflow:hidden;width:15px;height:15px;top:0px;left:"+
a.width+"px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAALUlEQVQY02P4TyRgABMEAIpCbBpQ5JAV4GWjmwR3Ey6rSVJIlNUkeYZg8BADADDRv0FliZd9AAAAAElFTkSuQmCC) 50% 50% no-repeat;"}function c(a){var d=b.l("width"),k=b.l("height");if(D.width===d&&D.height===k)return a;t.log(401);a.P=parseInt(a.width,10);a.L=parseInt(a.height,10);a.ratio=a.P/a.L;D.width=d;D.height=k;"true"===a.scalable&&"true"===a.maintainAspectRatio?a.P/d>=a.L/(k/5)?(a.P=d,a.L=a.P/a.ratio):(a.L=k/5,a.P=a.L*
a.ratio):"true"===a.scalable&&"false"===a.maintainAspectRatio&&(a.L=k/5,a.P=d);a.width=Math.floor(a.P);a.height=Math.floor(a.L);return a}function h(a,d){var c=b.l();a.style.width=d.width+"px";a.style.height=d.height+"px";a.style.top=c.top+(c.height-d.height)+"px";a.style.left=c.left+(c.width/2-d.width/2)+"px"}function f(){return e.createElement("div",{id:"closeButton"+Math.round(1E6*Math.random()),style:I})}function q(){z&&(G=b.h("duration"),F=b.h("currentTime"),1>=G&&(G=d.c().duration),z.update(F,
G))}function n(){t.log(402);p.triggerEvent("AdClickThru",void 0)}function g(){K.onmousedown=function(){t.log(403);p.triggerEvent(2020,void 0)}}function m(){K.style.left=parseInt(E.style.width,10)-15+"px"}function r(){if(E){var a=c(P);P=a;if(M){var a=E,d=b.l();a.style.width=d.width+"px";a.style.height=d.height+"px";a.style.top=d.top;a.style.left=d.left}else h(E,a);m()}}function y(){d.v.styles.closeButtonStyle&&e.sa(K,d.v.styles.closeButtonStyle)}function l(){setTimeout(function(){Y&&Y.setViewport(b.l());
z&&z.setViewport(b.l());r()},50)}function u(){p.triggerEvent("SKIP",void 0)}var w=b.getParent(),p=new e.j.s,D={},I,H,z,E,K,P,U={},F,G,ba,Y,M=!1,N=new C(b.getParent());this.ca=function(){t.log(404);a();K=f();y();b.a(5010,l)};this.Vb=function(){ba=e.createElement("div",{id:"vpaidSlot"+Math.round(1E6*Math.random()),style:"position:absolute;width:100%;height:100%;display:none"});(b.getParent().querySelector("video")||b.getParent()).insertAdjacentElement("afterend",ba);var a=b.l();["left","top","width",
"height"].forEach(function(b){var d=a[b];if("left"===b||"top"===b)d=0;ba.style[b]=""+d+"px"})};this.Wb=function(){t.log(405);D={width:0,height:0};a();b.a(5010,l)};this.Xb=function(){z=new v(w,d);z.setViewport(b.l());z.hide();z.a("SKIP",u)};this.Rb=function(){r()};this.Ga=function(){d.a("AdRemainingTimeChange",q)};this.nc=function(a){e.ra&&!d.v.customControls&&b.setControls(!1);var q=c(a.attributes),r=e.createElement("div",{id:"overlay"+Math.round(1E6*Math.random()),style:H}),l=null,z;z=b.l();P=q;
h(r,q);if(a.StaticResource){var q=a.resourceAttributes.creativeType.toLowerCase(),Y=a.attributes.apiFramework?a.attributes.apiFramework:"UNKNOWN";-1!=e.na.indexOf(q)&&"VPAID"==Y.toUpperCase()?(M=!0,ba=e.createElement("div",{id:"vpaidSlot"+Math.round(1E6*Math.random()),style:"width:100%;height:100%"}),r.style.top=0,r.style.left=0,r.style.width=z.width+"px",r.style.height=z.height+"px",r.style.display="none",r.appendChild(ba)):(-1!=e.na.indexOf(q)?l=e.createElement("script",{src:a.StaticResource}):
0<=q.search(/^image|jpeg|gif|png/i)&&(l=e.createElement("img",{src:a.StaticResource,style:"width:100%;height:100%"})),null!=l&&r.appendChild(l))}else a.IFrameResource?(z=e.createElement("div",{style:"position:absolute;width:100%;height:100%;background-color:rgba(0,0,0,0)"}),l=e.createElement("iframe",{id:"nonLinearIFrame",src:a.IFrameResource,style:"width:100%;height:100%"}),r.appendChild(z),r.appendChild(l)):a.HTMLResource&&(l=e.createElement("div",{style:"width:100%;height:100%"}),l.innerHTML=a.HTMLResource,
r.appendChild(l));E=r;K=f();y();m();E.appendChild(K);w.appendChild(E);E.firstChild.addEventListener("mousedown",n,!1);g()};this.kc=function(){e.ra&&!d.v.customControls&&b.setControls(!0);try{w.removeChild(E)}catch(a){t.log(406)}b.b(5010)};this.destroy=function(){b.b(5010);d.b("AdRemainingTimeChange");z&&z.destroy();ba&&w.removeChild(ba);Y&&Y.destroy();p=null;b.mb()};this.Za=function(){return ba};this.$a=function(){b.l()};this.sb=function(){E?(E.removeChild(K),E.firstChild.removeEventListener("mousedown",
n,!1),E.style.display="block"):(b.mb(),ba.style.display="block")};this.dc=function(a){var d=["left","top","width","height"],c=b.l();E&&(M?d.forEach(function(a){E.style[a]=""+c[a]+"px"}):a?(Object.getOwnPropertyNames(U).length||d.forEach(function(a){U[a]=E.style[a]}),d.forEach(function(a){E.style[a]=""+c[a]+"px"})):d.forEach(function(a){E.style[a]=U[a]}))};this.Da=function(){return b.getParent()};this.K=function(){return N.K()};this.Va=function(){z&&z.hide()};this.Gb=function(){z&&z.show()};this.a=
p.a;this.b=p.b;this.registerGlobalEventDispatcher=p.registerGlobalEventDispatcher}function v(b,d){function a(){f.triggerEvent("SKIP")}function c(a){if(n.parent){var b=parseInt(window.getComputedStyle(n,null).getPropertyValue("height"),10),d="top"===h.skipButtonPosition?0:a.top+a.height-b,k=parseInt(window.getComputedStyle(n,null).getPropertyValue("width"),10);a="left"===m?0:a.width-k;n.style.width=k+"px";n.style.height=b+"px";n.style.top=d+"px";n.style.left=a+"px"}}var h=d.v,f=new e.j.s,q={},n,g=
h.styles,m,r=!1;this.update=function(a,b){if(!r){var c=e.fc(d.Ba().skipoffset,b);a>=c&&(this.show(),r=!0)}};this.show=function(){n.style.display="block";c(q)};this.hide=function(){n.style.display="none"};this.destroy=function(){b.removeChild(n)};this.setViewport=function(a){q=a;c(q)};this.a=f.a;this.b=f.b;n=function(){var d=e.createElement("div",{id:"adSkipButton"+Math.round(1E6*Math.random()),style:"position:absolute;overflow:hidden;display:none;cursor:pointer;white-space: nowrap"});d.innerHTML=
"&nbsp;"+h.skipButtonText+"&nbsp;";e.sa(d,g.colorScheme);e.sa(d,g.fontStyle);m=d.style.textAlign="right"===g.fontStyle.textAlign?"left":"right";d.addEventListener(e.$b?"touchstart":"mousedown",a,!1);b&&b.appendChild(d);return d}()}function P(b){function d(a,b){function d(){for(var a=c.createElement(arguments[0]),b=1;b<arguments.length;b++){var k=arguments[b];if(k.split)k=c.createTextNode(k);else if("[object Object]"===Object.prototype.toString.call(k)){Object.keys(k).forEach(function(b){return a.setAttribute(b,
k[b])});continue}else if("[object Array]"===Object.prototype.toString.call(k)){k.forEach(function(b){a.appendChild(b)});continue}a.appendChild(k)}return a}var c=document.implementation.createDocument(null,"VAST",null);c.documentElement.setAttribute("version","3.0");a.map(function(a,k){var e=d("Ad",k<b?{sequence:k+1,fallbackOnNoAd:!0,fallbackType:"waterfall",allowMultipleAds:!1}:{},d("Wrapper",d("VASTAdTagURI",a)));c.documentElement.appendChild(e)});return c}function a(a,b){var d="";"string"==typeof a&&
(a={urls:[a]});if("string"==typeof a.urls||"string"==typeof a.tag)d=a.urls||a.tag,a.urls=[d];a.offset=b;return a}function c(a){if(b.overlay){for(var d=[],k=0;k<b.fixedrolls.length;k++){var e={urls:[b.overlay],offset:b.fixedrolls[k].offset+b.overlayDelay,limit:1,count:1,interval:-1,type:"overlay",requested:!1};e.offset<a&&d.push(e)}for(k=0;k<d.length;k++)b.fixedrolls.push(d[k]);b.fixedrolls.some(function(a){return 0==a.offset})||b.fixedrolls.push({urls:[b.overlay],offset:b.overlayDelay,limit:1,count:1,
interval:-1,type:"overlay",requested:!1})}}function h(){b.fixedrolls.sort(function(a,b){return a.offset>b.offset?1:a.offset<b.offset?-1:0})}var f=!1;this.vc=function(a){if(!f){for(var d=0;d<b.fixedrolls.length;d++){var g=b.fixedrolls[d];"string"==typeof g.offset&&(g.offset=parseInt(g.offset,10)/100*a)}d=[];for(g=0;g<b.fixedrolls.length;g++){var m=b.fixedrolls[g];if(5<=m.interval)for(var q=m.offset+m.interval;q<a-5;){var r=e.clone(m);r.offset=q;d.push(r);q+=m.interval}}b.fixedrolls=b.fixedrolls.concat(d);
if(a<b.minDurationForMidrolls){for(d=0;d<b.fixedrolls.length;d++)g=b.fixedrolls[d],0<g.offset&&g.offset<a&&b.fixedrolls.splice(d,1);t.log(602)}c(a);h();f=!0}};this.aa=function(a){a:{for(var d=0;d<b.fixedrolls.length;d++){var c=b.fixedrolls[d],k=a-c.offset;if(c.offset<=a&&2>=k&&!c.requested){c.requested=!0;a=c;break a}}a=!1}return a};this.reset=function(){for(var a=0;a<b.fixedrolls.length;a++)b.fixedrolls[a].requested=!1};this.bc=function(){return!0===b.fixedrolls[b.fixedrolls.length-1].requested};
this.Qb=function(a){return b.fixedrolls[b.fixedrolls.length-1].offset==a&&!1===b.fixedrolls[b.fixedrolls.length-1].requested};(function(){b.fixedrolls||(b.fixedrolls=[]);b.adResponse?b.fixedrolls.push({offset:0,responseXML:b.adResponse}):b.preroll&&(b.preroll=a(b.preroll,0),b.fixedrolls.push(b.preroll));b.midroll&&(b.midroll=a(b.midroll,"50%"),b.fixedrolls.push(b.midroll));b.postroll&&(b.postroll=a(b.postroll,"100%"),b.fixedrolls.push(b.postroll));b.overlay&&e.clone(b.overlay);for(var c=0;c<b.fixedrolls.length;c++){var k=
b.fixedrolls[c];if("string"==typeof k||0>parseInt(k.offset,10))t.log(601,k.offset);else{"object"==typeof k.tag&&(k.urls=k.tag);var g="";if("string"==typeof k.tag||"string"==typeof k.urls)g=k.tag||k.urls,k.urls=[g];if(k.count){g=k.urls[0];k.urls=[];for(var h=0;h<k.count;h++)k.urls.push(g.replace("[count]",h+1))}else k.count=1;"object"!=typeof k||"object"!=typeof k.urls||k.limit||(k.limit=k.urls.length);k.interval||(k.interval=-1);k.urls&&1<k.urls.length&&!k.responseXML&&(k.responseXML=d(k.urls,k.limit));
k.urls||(k.urls=[]);k.requested=!1;k.type="fixedroll"}}})()}function U(b,d,a,c){function h(a,b,d){if(a&&!isNaN(b)&&!isNaN(d)&&D)for(var c in a){var k=0===c.indexOf("progress-"),g=a[c].uc,e=k?parseFloat(c.split("progress-")[1]):NaN;k&&-1<c.indexOf("%")&&(e*=d/100);k&&!g&&e<=b&&(n(a[c],c,{}),a[c].uc=!0)}}function f(a,b,c){a&&b&&d.onTrack&&e.D(d.onTrack)&&(d.onTrack(a,b,c?c:""),q(c)&&(d.onTrack("capped",b),r.triggerEvent("AdCapped",void 0)));r.triggerEvent("onTrack",a)}function q(a){var b=e.isArray(a)?
Number(a[0]):Number(a);a="1010 1020 1030 1040 1050 1060 1070 2030".split(" ").some(function(a){return a==b});var d=["100","101","300","303","310"].some(function(a){return a==b});return a||d}function n(a,b,e){if(-1!==["impression","creativeView","start","error"].indexOf(b)||D)if(D||(D=!0),-1!==["start"].indexOf(b)&&(I=!0),-1===["mute","unmute"].indexOf(b)||I)if(-1===["complete","error"].indexOf(b)||v||(v=!0),-1!==["complete","error"].indexOf(b)||!v){var h=w.some(function(a){return a===b});h&&l[b]||
("progress"!==b&&(f(b,c,e),h&&(l[b]=d.lb?!0:!1)),a&&("progress"!==b&&t.log(701,b),g.$(a,b,e)))}}var g=this,m=a&&a.c()&&0<a.c().creatives.length?a.J().trackingEvents:[],r=new e.j.s,l={},u=0,p=0,w="close closeLinear skip impression creativeView start firstQuartile midpoint thirdQuartile complete".split(" "),D=!1,v=!1,I=!1,H=0;g.createTracker=function(b){var c,k;0!==(b.url||"").length&&(a&&e.urlEnrichment.setValueFor("timeOffset",a.totalTime-a.la),k=e.urlEnrichment.w(b.url),k=e.Z(k),(b.trackEvent&&"error"===
b.trackEvent||b.trackEvent&&"adPodErrorTracker"===b.trackEvent)&&b.info&&(k=e.urlEnrichment.errorCode(k,isNaN(b.info)?b.info.errorCode:b.info)),"https:"!==window.location.protocol||"https:"===window.location.protocol&&0!==(k+"").indexOf("http://")||!d.blockInsecureURL)&&(c=new Image,c.onload=g.createTrackerDone.bind(b,k),c.onerror=g.createTrackerDone.bind(b,k),H++,c.src=k)};g.createTrackerDone=function(){H--};g.$=function(a,b,d){for(var c=0;c<a.length;c++)"string"===typeof a[c]&&g.createTracker({url:e.Z(a[c]),
trackEvent:b,info:d})};g.Eb=function(){a&&a.c()&&a.c().errorURLTemplatesAdPod&&a.c().errorURLTemplatesAdPod.map(function(a){"preImpression"!==a.triggerOn||a.tracked||(a.tracked=!0,g.$(a.errorURLTemplates,"adPodErrorTracker",a.errorCode))})};g.Db=function(){a&&a.c()&&a.c().errorURLTemplatesAdPod&&a.c().errorURLTemplatesAdPod.map(function(a){"postComplete"!==a.triggerOn||a.tracked||(a.tracked=!0,g.$(a.errorURLTemplates,"adPodErrorTracker",a.errorCode))})};g.Tb=function(){return a&&a.c()&&a.c().errorURLTemplatesAdPod?
0<a.c().errorURLTemplatesAdPod.filter(function(a){return"postComplete"===a.triggerOn&&!a.tracked}).length:!1};g.Sa=function(){n(m.mute,"mute")};g.callUnmuteTracker=function(){n(m.unmute,"unmute")};g.xa=function(b){var d,c,k=!1;b&&b.info&&(c=b.info.errorURLTemplates,d=b.info.errorCode,k=b.info.rc);if(a&&a.c()&&a.c().errorURLTemplates||c)k?g.$(c||a.c().errorURLTemplates,"error",d||b):n(c||a.c().errorURLTemplates,"error",d||b)};g.Fb=function(){n(m.skip,"skip")};g.Cb=function(){n(m.close,"close")};g.Ra=
function(){n(a.J().videoClickTrackingURLTemplates,"clickTracking")};g.ya=function(){t.log(701,"Impression, CreativeView");g.Eb();a&&a.c()&&n(a.c().impressionURLTemplates,"impression");n(m.creativeView,"creativeView")};g.callTracker=function(a){n(m[a],a)};g.Hc=function(a){a.split("|").forEach(function(a){n(m[a.toLowerCase()],a)})};g.callCustomTracker=function(a,b){var h=[];e.isArray(a)?h=a:h.push(a);var m=w.some(function(a){return a===b});m&&l[b]||("progress"!==b&&(f(b,c),m&&(l[b]=d.lb?!0:!1)),h&&
("progress"!==b&&t.log(701,b),g.$(h,b,void 0)))};g.Ta=function(){return 0>=H&&!g.Tb()};g.Ha=function(b){c="fixedroll";m=(a=b)&&b.c()&&0<a.c().creatives.length?b.J().trackingEvents:[];v=!1};g.handleTracking=function(a){var e;a="fixedroll"===c?b.h("currentTime"):a;var f="fixedroll"===c?b.h("duration"):parseInt(d.overlayDuration,10);a=+(Math.round(a+"e+1")+"e-1");f=+(Math.round(f+"e+1")+"e-1");p=a;"fixedroll"===c&&(u+.3<p&&(u=p,n(m.timeupdate,"timeupdate")),h(m,a,f));if(!(isNaN(f)||!isNaN(f)&&0>=f)){if(a>=
f)e="complete";else if(a>=f/(4/3))e="thirdQuartile";else if(a>=f/2)e="midpoint";else if(a>=f/4)e="firstQuartile";else if(a)g.ya(),n(m.start,"start");else return;w.some(function(a){return a===e})&&l[e]||!e||(n(m[e],e),"complete"===e&&g.Db())}};g.a=r.a;g.b=r.b;g.registerGlobalEventDispatcher=r.registerGlobalEventDispatcher;return g}function W(b){function d(a){var b=["flv","flash"],d=["rtmp"];a&&a.ads&&a.ads.map(function(a){a.creatives.map(function(a){a.mediaFiles&&(a.mediaFiles=a.mediaFiles.filter(function(a){var c=
0===b.filter(function(b){return-1<(a.mimeType||"").toLowerCase().indexOf(b)}).length,k=0===d.filter(function(b){return-1<(a.fileURL||"").toLowerCase().indexOf(b)}).length;return c&&k}))})})}function a(a){h.triggerEvent("VAST-error",a)}function c(a){g=f.c();switch(a.type){case "AdTagParsed":(g=f.c())&&g.bb&&g.bb.length&&(t.log(5050),h.triggerEvent(4300,g.bb));h.triggerEvent("AdTagParsed",g);break;case 4030:h.triggerEvent(4030);break;case "VAST-error":1020===a.info&&h.triggerEvent(7E3);h.triggerEvent("VAST-error",
a.info);break;case 4040:h.triggerEvent(4040);break;case 4100:h.triggerEvent(4100);break;case 4200:t.log(5052);h.triggerEvent(4200,a.info);break;case "AdTagSkipDetected":h.triggerEvent("AdTagSkipDetected",a.info)}}var h=new e.j.s,f=new window.VASTParser,q=null,n=null,g=null,m=null,r=null;f.addURLTemplateFilter(e.urlEnrichment.w);this.a=h.a;this.b=h.b;this.registerGlobalEventDispatcher=h.registerGlobalEventDispatcher;this.G=h.G;this.ka=function(){};this.c=function(){return r};this.gc=function(c,k){var g=
{withCredentials:!0};g.blockInsecureURL=b.blockInsecureURL;g.maxWrapperDepth=b.maxWrapperDepth;g.prefetchBuffets=b.prefetchBuffets;b.urlhandler&&(g.urlhandler=window[b.urlhandler]);!c&&k&&(g.response=k);f.addEventListener("VAST-error",a);f.parse(c,g,function(b,c){if(b)h.triggerEvent("VAST-error"),f.removeEventListener("VAST-error",a);else if(!b&&c){r=c;var k=r.ads.filter(function(a){return!1===a.fetched});(function(a){var b=k.length,d=0;if(0===b)return a();for(var c=0;c<k.length;c++){var g=k[c],h=
r.ads.indexOf(g);g.fetch(function(c){0<c.ads.length&&(r.ads[h]=c.ads[0]);d++;d>=b&&a()})}})(function(){d(r);h.triggerEvent("AdTagParsed",r)})}},[])};this.kb=function(a){q=a;var b;a:{b=q;try{if(window.DOMParser)m=(new DOMParser).parseFromString(b,"application/xml");else{var d=new ActiveXObject("Microsoft.XMLDOM");d.async=!1;d.loadXML(b);m=d}}catch(g){b=!1;break a}b=!0}b?(n=m.getElementsByTagName("VAST")[0].getAttribute("version"),n=null!==n&&""!==n&&n.length?n.charAt(0):""):h.triggerEvent("VAST-error");
if(!f){b=null;switch(n){case "2":b=I.Ac;break;case "3":b=I.Bc;break;default:h.triggerEvent("VAST-error",102)}b&&(f=null,f=new b,f.a("AdTagParsed",c),f.a("VAST-error",c),f.a(4030,c),f.a(4040,c),f.a(4050,c),f.a(4100,c),f.a(4200,c),f.a("AdTagSkipDetected",c))}f.kb(a)}}function K(){function b(){R=e.createElement("iframe",{style:"width:0;height:0;top:0;left:0;position:absolute;overflow:hidden;border:none; visibility:hidden;"});R.onload=d;ma.insertBefore(R,ma.firstChild)}function d(){R.ua=(R.contentDocument||
R.contentWindow.document).getElementsByTagName("body")[0];R.Ic=R.ua.parentNode.parentNode;var a=e.createElement("script",{type:"text/javascript"});a.innerHTML="var inDapIF = true;";R.ua.appendChild(a);la=e.createElement("div",{id:ya,style:"position:absolute;width:100%;height:100%;top:0;left:0; background:rgba(0,0,0,1); display:none;"});ma.appendChild(la);la=document.getElementById(ya)||ma.ownerDocument.getElementById(ya);sa=e.createElement("video",{id:qa,style:"position:absolute;width:100%;height:100%;top:0;left:0;display:none;"});
ma.appendChild(sa);sa=document.getElementById(qa)||ma.ownerDocument.getElementById(qa);va=e.createElement("div",{id:ta,style:"position:absolute;width:100%;height:100%;top:0;left:0;overflow:hidden;"});ma.appendChild(va);va=document.getElementById(ta)||ma.ownerDocument.getElementById(ta);ia=new D(sa,ra,la,ha,wa.v.vpaidSingleVideoSlotMode);-1<Z.indexOf(".swf")||(a=e.createElement("script",{src:e.urlEnrichment.w(Z)}),a.onload=function(){c()},a.onerror=function(){J(6010)},R.ua.appendChild(a))}function a(){var a=
"normal",b=JSON.stringify(wa.U());-1<Z.indexOf("cdn.spotxcdn.com")&&(-1<b.indexOf(r.MediaFileFormat.VERTICAL)||-1<b.indexOf(r.MediaFileFormat.SQUARE))&&(a="dynamic");return a}function c(){if(!Q){var b=R.contentWindow.getVPAIDAd;if(e.D(b))Q=b();else return}if(h(Q)){t.log(961,Q.handshakeVersion("2.0"));-1==="1.1,2.0".indexOf(Q.handshakeVersion("2.0"))&&J(6010);var b={AdParameters:ka},d={slot:va,videoSlot:ia.Ya(),videoSlotCanAutoPlay:!0,source:Z};f();S=new H;S.pc(function(){t.log(1E3);J(6010)});var k=
function(a){if(!a)return!1;var b=a.style.width;a=/scale|transform/gi.test(a.style.cssText);return!!parseInt(b,10)&&-1===b.indexOf("%")&&!a},g,m;k(va)?(g=parseInt(va.style.width,10),m=parseInt(va.style.height,10)):k(ma)?(g=parseInt(ma.style.width,10),m=parseInt(ma.style.height,10)):k(ma.parentNode)&&(g=parseInt(ma.parentNode.style.width,10),m=parseInt(ma.parentNode.style.height,10));var q=ha.getVideoSlot();k(q)?(g=parseInt(q.style.width,10),m=parseInt(q.style.height,10)):k(q.parentNode)&&(g=parseInt(q.parentNode.style.width,
10),m=parseInt(q.parentNode.style.height,10));Ta=a();xa.initAd(g,m,Ta,300,b,d)}else t.log(962)}function h(a){for(var b="handshakeVersion initAd startAd stopAd skipAd resizeAd pauseAd resumeAd expandAd collapseAd subscribe unsubscribe getAdLinear".split(" "),d=0;d<b.length;d++)if(!e.D(a[b[d]]))return!1;return!0}function f(){var a={AdStarted:q,AdStopped:n,AdSkipped:g,AdLoaded:m,AdLinearChange:l,AdSizeChange:y,AdExpandedChange:u,AdSkippableStateChange:p,AdDurationChange:w,AdRemainingTimeChange:v,AdVolumeChange:I,
AdImpression:K,AdClickThru:P,AdInteraction:z,AdVideoStart:E,AdVideoFirstQuartile:C,AdVideoMidpoint:U,AdVideoThirdQuartile:G,AdVideoComplete:F,AdUserAcceptInvitation:V,AdUserMinimize:ba,AdUserClose:Y,AdPaused:M,AdPlaying:N,AdError:A,AdLog:L},b;for(b in a)Q.subscribe(a[b],b,xa)}function q(){t.log(967);da.callTracker("creativeView");Q.getAdLinear()&&(ia.show(),sa.volume=ha.h("volume"),W=sa.volume);J("AdStarted")}function n(){clearTimeout(Fa);if(Q){var a={AdStarted:q,AdStopped:n,AdSkipped:g,AdLoaded:m,
AdLinearChange:l,AdSizeChange:y,AdExpandedChange:u,AdSkippableStateChange:p,AdDurationChange:w,AdRemainingTimeChange:v,AdVolumeChange:I,AdImpression:K,AdClickThru:P,AdInteraction:z,AdVideoStart:E,AdVideoFirstQuartile:C,AdVideoMidpoint:U,AdVideoThirdQuartile:G,AdVideoComplete:F,AdUserAcceptInvitation:V,AdUserMinimize:ba,AdUserClose:Y,AdPaused:M,AdPlaying:N,AdError:A,AdLog:L},b;for(b in a)Q.unsubscribe(a[b],b)}t.log(966);ia.hide();"nonLinear"===Da&&ha.h("paused")&&ha.O();J(6050)}function g(){t.log(965);
da.callTracker("skip");xa.stopAd()}function m(){ja&&ja.sb();t.log(964);S.log("onadloaded");J("AdLoaded",wa.c())}function l(){t.log(951,Q.getAdLinear());Q.getAdLinear()?(ha.M(),ia.show()):(ia.hide(),ha.O())}function y(){t.log(952,Q.getAdWidth(),Q.getAdHeight())}function u(){t.log(953,Q.getAdExpanded());ja.dc(Q.getAdExpanded());Q.getAdExpanded()?(ha.M(),da.callTracker("expand")):(ha.O(),da.callTracker("collapse"))}function p(){t.log(954,Q.getAdSkippableState());J("AdSkippableStateChange",Q.getAdSkippableState())}
function w(){t.log(955,Q.getAdDuration())}function v(){t.log(956,Q.getAdRemainingTime())}function I(){t.log(957,Q.getAdVolume());0<Q.getAdVolume()&&0===W?(da.callUnmuteTracker(),W=Q.getAdVolume()):0===Q.getAdVolume()&&0<W&&(W=0,da.Sa())}function K(){t.log(963);da.ya()}function P(a,b,d){t.log(968,a,b,d);d||!d&&!a?(Sa=e.Zb(a)?a:void 0,va.addEventListener("mousedown",oa,!1),ia.m("play",oa),ia.pause(),t.log(402),ia&&ia.setControls(!0),J(6060,Sa)):da.Ra()}function z(a){t.log(972,a);da.callTracker("interaction")}
function E(){t.log(973);da.callTracker("start")}function C(){t.log(974);da.callTracker("firstQuartile")}function U(){t.log(975);da.callTracker("midpoint")}function G(){t.log(976);da.callTracker("thirdQuartile")}function F(){t.log(977);da.callTracker("complete");clearTimeout(Fa);Fa=setTimeout(function(){L("Force stop after video completion.");xa.stopAd()},2E3)}function V(){t.log(978);da.callTracker("acceptInvitation")}function ba(){t.log(979);da.callTracker("collapse")}function Y(){t.log(981);da.callTracker("close");
J(6040)}function M(){t.log(980);S.log("onadpaused");T||da.callTracker("pause");J("AdPaused");T=!0}function N(){t.log(982);S.log("onadplaying");T&&da.callTracker("resume");J("AdPlaying");T=!1}function A(a){t.log(958,a);J(6010,a)}function L(a){t.log(959,a)}function oa(){if(ia){ia.g("play",oa);var a=ia.play();void 0!==a&&a.then(function(){},function(){})}va.removeEventListener("mousedown",oa,!1)}function J(a,b){O.triggerEvent(a,b)}var W,O=new e.j.s,S;W=void 0;var T=!1,R,Z,ka,va,ma,sa,ia,la,ya="videoSlotBackground"+
Math.round(1E6*Math.random()),ta="vpaidSlot"+Math.round(1E6*Math.random()),qa="videoSlot"+Math.round(1E6*Math.random()),ra,ja,ha,da,Da,wa,Sa,xa=this,Ta="normal",Fa=null,Q;this.ca=function(a,d,c,k,g){Z=a.StaticResource;ka=a.adParameters;ja=d;ha=c;da=k;ma=d.Za();ra=ha.getVideoSlot();wa=g;T=!1;d.Da();b();Da="nonLinear"};this.Ub=function(a,d,c,k,g){t.log(1001,g.v.vpaidSingleVideoSlotMode);Z=a.fileURL;ka=a.adParameters;ja=d;ha=c;da=k;ma=d.Za();ra=ha.getVideoSlot();wa=g;T=!1;d.Da();b();Da="linear"};this.initAd=
function(a,b,d,c,k,g){T=!1;t.log(1002,a,b,d,c,k,g);Q.initAd(a,b,d,c,k,g)};this.startAd=function(){t.log(1003);Q&&(ja.sb(),Q.startAd())};this.pauseAd=function(){t.log(1004);Q&&Q.pauseAd&&Q.pauseAd()};this.resumeAd=function(){t.log(1006);Q&&Q.resumeAd&&Q.resumeAd()};this.stopAd=function(){t.log(1008);clearTimeout(Fa);Q&&Q.stopAd()};this.setAdVolume=function(a){t.log(1009,a);Q&&Q.setAdVolume&&Q.setAdVolume(a)};this.getAdVolume=function(){return Q&&Q.setAdVolume?Q.getAdVolume():-1};this.resizeAd=function(a,
b,d){t.log(1010,a,b,d);Q&&(ia&&"linear"===Da?(Q.resizeAd(a,b,d),ma.style.cssText+="width:"+parseInt(a,10)+"px;height:"+parseInt(b,10)+"px;"):Q.resizeAd(a,b,d))};this.expandAd=function(){t.log(1011);Q.expandAd()};this.collapseAd=function(){t.log(1012);Q.collapseAd()};this.skipAd=function(){t.log(1013);Q.getAdSkippableState()&&Q.skipAd()};this.Ga=function(){t.log("Called dead code updateCountdown() in VPAIDBridge#639")};this.nb=function(a){a&&(t.log(1015),Q=a,ia?c():setTimeout(this.nb.bind(this,a),
50))};this.getSlot=function(){return va};this.getVideoSlot=function(){return ia.Ya()};this.a=O.a;this.b=O.b;this.registerGlobalEventDispatcher=O.registerGlobalEventDispatcher}function H(){function b(b,c){d.forEach(function(h){"INITAD"===h.event&&(h.active=!0,h.W=c,h.Y=b,h.o=window.setTimeout(function(){d.forEach(function(b){"INITAD"===b.event&&b.active&&(b.active=!1,window.clearTimeout(b.o),a.map(function(a){if(a.time>=b.W&&a.time<=b.W+b.timeout)return a}).some(function(a){return a.event===b.ha?!0:
!1})||b.Y())})},h.timeout))})}var d=[{active:!1,event:"INITAD",ha:"ONADLOADED",timeout:4E3,o:null,W:null,Y:null},{active:!1,event:"RESIZEAD",ha:"ONADSIZECHANGED",timeout:1E3,o:null,W:null,Y:null},{active:!1,event:"PAUSEAD",ha:"ONADPAUSED",timeout:100,o:null,W:null,Y:null},{active:!1,event:"RESUMEAD",ha:"ONADPLAYING",timeout:100,o:null,W:null,Y:null}],a=[];this.log=function(b){a.push({time:(new Date).getTime(),event:b.toUpperCase()})};this.pc=function(d){var c=(new Date).getTime();b(d,c);a.push({time:c,
event:"INITAD"})}}function D(b,d,a,c,h){var f=new e.j.s,q,n,g;this.l=function(a){if(h)return c.l(a);if(a)switch(a){case "width":return e.getWidth(g);case "height":return e.getHeight(g);case "top":return g.offsetTop;case "left":return g.offsetLeft;default:return null}return{width:e.getWidth(g),height:e.getHeight(g),top:g.offsetTop,left:g.offsetLeft}};this.show=function(){h||(g.style.display="block",a.style.display="block",d.style.visibility="hidden")};this.hide=function(){h||(d.style.visibility="visible",
g.style.display="none",a.style.display="none")};this.Ga=function(){};this.pause=function(){g.pause()};this.play=function(){var a=g.play();void 0!==a&&a.then(function(){},function(){})};this.setControls=function(a){h?c.setControls(a):g.controls=a};this.m=function(a,b){n.m(g,a,b)};this.g=function(a,b){n.g(g,a,b)};this.a=f.a;this.b=f.b;this.Ya=function(){return q};this.getSlot=function(){return g};(function(){n=new e.j.Event;h?(g=d,a.parentNode.removeChild(a),b.parentNode.removeChild(b),q=new u(g),q=
e.extend(q,{rb:function(a){c.ja({url:a})},setControls:function(a){c.setControls(a)},pb:function(a){c.ja({url:c.h.currentSrc},a)},load:function(){},play:function(){c.O()},pause:function(){c.M()}})):(g=b,q=new u(g))})()}function u(b){function d(a,b,d,c){var k=Object.getOwnPropertyDescriptor(a,b);if(k&&k.configurable){var g;if(k.get||k.set)g=k;else{var h=k.value;g={get:function(){return h},set:function(a){h=a}}}var e=d?function(){return d.call(this,b,g)}:g.get,f=c?function(a){c.call(this,b,a,g)}:g.set;
Object.defineProperty(a,b,{get:g.get?e:void 0,set:g.set?f:void 0,enumerable:k.enumerable,configurable:!0})}}function a(a){if("ownerDocument"==a)return document.createElement("iframe").ownerDocument;g[a]=p[a];return g[a]}function c(a,b){for(var d=m,k=d.length,h=!1;0<=--k;)if(d[k]===a){h=!0;break}if(!h&&"style"!==a){g[a]=b;switch(a){case "src":u.rb(b);return;case "controls":u.setControls(b);return;case "currentTime":u.pb(b);return}p[a]=g[a]}}function h(){for(var a=n,b=a.length;0<=--b;)g[a[b]]=p[a[b]]}
function f(a){l.ic(a.type,a);h()}var q="loadstart emptied canplaythrough ended ratechange progress stalled playing durationchange volumechange suspend loadedmetadata waiting timeupdate abort loadeddata seeking play error canplay seeked pause".split(" "),n="type ownerDocument nodeType tagName error crossOrigin buffered currentTime paused played autoplay controller muted videoTracks height poster src networkState readyState duration defaultPlaybackrate seekable loop controls defaultMuted textTracks videoWidth currentSrc preload seeking startDate playbackRate ended mediaGroup volume audioTracks width videoHeight".split(" "),
g={},m="error crossOrigin buffered paused played autoplay controller videoTracks height networkState readyState duration defaultPlaybackrate seekable loop defaultMuted textTracks videoWidth currentSrc preload seeking startDate playbackRate ended mediaGroup audioTracks width videoHeight".split(" "),r,l,u=this,p;this.setAttribute=function(a,b){"type"!==a&&"src"!==a&&-1===a.indexOf("data-")||p.setAttribute(a,b)};this.getElementsByTagName=function(a){return p.getElementsByTagName(a)};this.getAttribute=
function(a){return p.getAttribute(a)};this.removeAttribute=function(a){return p.removeAttribute(a)};this.rb=function(a){p.src=a};this.setControls=function(a){p.controls=!!a};this.pb=function(a){p.currentTime=a};this.play=function(){var a=p.play();void 0!==a&&a.then(function(){},function(){})};this.pause=function(){p.pause()};this.load=function(){p.load()};this.canPlayType=function(a){return p.canPlayType(a)};this.tagName=b.tagName;this.getBoundingClientRect=function(){return b.getBoundingClientRect()};
this.destroy=function(){r.g(p,q.join(","),f)};this.addEventListener=function(a,b){p.parentNode.querySelector('[id^="vpaidSlot"] > [id^="vpaidSlot"] > ias-ad')&&["touchstart","touchstart","click"].indexOf(-1<(a+"").toLowerCase())&&p.parentNode.querySelector('[id^="vpaidSlot"] > [id^="vpaidSlot"] > iframe').contentWindow.document.body.addEventListener(a,b);l.a(a,b)};this.removeEventListener=function(a,b){l.jc(a,b)};this.dispatchEvent=function(a){p.dispatchEvent(a)};this.getComputedStyle=function(a){return window.getComputedStyle(p,
a||null)};this.appendChild=function(){};this.removeChild=function(){};this.Yb="goog_596272282";(function(){p=b;l=new e.j.s;r=new e.j.Event;r.m(p,q.join(","),f);h();for(var m=n,t=m.length;0<=--t;)u[m[t]]=g[m[t]];u.style={};m=n;for(t=m.length;0<=--t;)d(u,m[t],a,c);d(u,"style",a,c);p.setAttribute("data-proxyTag",this.Yb)})()}c.prototype.debug=!1;c.prototype.log=function(){return null};window.InstreamapiDebug=c;var V={level:0,method:"AdControl",Pc:"NonLinear VPAID detected."},I={extensions:{},view:{}};
f.prototype={constructor:f,apply:function(b){b.addEventListener=f.prototype.addEventListener;b.ab=f.prototype.ab;b.removeEventListener=f.prototype.removeEventListener;b.dispatchEvent=f.prototype.dispatchEvent},addEventListener:function(b,d){this.F||(this.F={});var a=this.F;a[b]||(a[b]=[]);-1===a[b].indexOf(d)&&a[b].push(d)},ab:function(b,d){if(!this.F)return!1;var a=this.F;return a[b]||-1===a[b].indexOf(d)?!1:!0},removeEventListener:function(b,d){if(this.F){var a=this.F[b];if(a){var c=a.indexOf(d);
-1!==c&&a.splice(c,1)}}},dispatchEvent:function(b){if(this.F){var d=this.F[b];if(d){for(var a=d.length,c=[],h=0,h=0;h<a;h++)c[h]=d[h];for(d=0;d<a;d++)(c[d]||function(){}).apply(this,[].slice.call(arguments))}}}};var e=function(b){b.tb={mp4:{typeExtension:"mp4",typeString:"video/mp4",Fa:"video/mp4|video/x-mp4"},ogv:{typeExtension:"ogv",typeString:"video/ogg",Fa:"video/ogg"},webm:{typeExtension:"webm",typeString:"video/webm",Fa:"video/webm"}};b.na="application/javascript|application/x-javascript|text/javascript";
b.Jc="application/x-shockwave-flash";b.urlEnrichment=new l;b.Lc=function(){return[I.IDENTIFIER,I.API_VERSION,I.API_BUILD].join("|")};b.gb=function(b){return"[object Object]"===Object.prototype.toString.call(b)};b.isArray=function(b){return"[object Array]"===Object.prototype.toString.call(b)};b.Zb=function(b){return"[object String]"===Object.prototype.toString.call(b)};b.D=function(b){return"[object Function]"===Object.prototype.toString.call(b)};b.B=function(b){return""!=b&&null!=b&&void 0!=b};b.Nc=
function(b){return"string"===typeof b&&b.length?Number(b):!1};b.Oc=function(b){b&&b.trim&&(b=b.trim());return!!b&&-1===["http://","https://"].indexOf(b)};b.Sc=function(b){var a={};b.split("?")[1].split("&").forEach(function(b){b=b.split("=");a[decodeURIComponent(b[0])]=decodeURIComponent(b[1])||null});return a};b.za=function(){var b=document.createElement("video"),a=[],c=e.tb,h={},f;for(f in c)c.hasOwnProperty(f)&&(c[f].result=b.canPlayType(c[f].typeString),a.push(c[f].typeExtension+":"+c[f].result),
""!==c[f].result&&(h[f]=c[f]));t.log(901,a.join(", "));return h};b.tc=function(b){var a="";/\?/.test(b)&&(b=b.split("?"),b=b[0]);var c=b.split("."),c=c[c.length-1];["mp4","ogv","webm"].forEach(function(b){c===b&&(a=b)});return a};b.ba=function(){return b.La?500:b.Ab?1E3:b.zb?1700:0};b.unique=function(b){return b.reduce(function(a,b){0>a.indexOf(b)&&a.push(b);return a},[])};b.clone=function(d){if(!d||"object"!=typeof d)return d;var a=new d.constructor,c;for(c in d)d.hasOwnProperty(c)&&(a[c]=b.clone(d[c]));
return a};b.extend=function(b,a){for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b};b.$b="ontouchstart"in window||"ontouchstart"in document.documentElement;b.Ma=!1;b.u=navigator.userAgent;b.wb=/MSIE/.test(b.u);b.Ec=/Opera/.test(b.u);b.xb=/mobile/i.test(b.u);b.Ka=/android/i.test(b.u);b.Uc=function(){["HTC Sensation","HTC Sense"].forEach(function(d){(new RegExp(d,"i")).test(b.u)&&(b.Ma=!0)})}();b.I=b.Ka&&/mobile/i.test(b.u)&&!(/chrome/i.test(b.u)&&/Mobile Safari/.test(b.u))&&!b.Ma;b.Ab=b.I||
/iPad/i.test(b.u);b.zb=/TV/.test(b.u);b.ra=/iP(hone|ad|od)/i.test(b.u);b.La=b.I||/iP(hone|od)/i.test(b.u);b.Cc=b.Ka&&/chrome/i.test(b.u);b.yb=/Mobile Safari/.test(b.u);b.Dc=!/chrome/i.test(b.u)&&/android/i.test(b.u)&&/safari/i.test(b.u)&&(!b.xb||b.yb);b.cb=function(b){return!!b.externalConfigXml};b.j=function(){};b.j.s=function(){var b=[],a=null;this.C=function(b,d){if(null!==a)for(var c=0;c<a.length;c++)a[c](b,d)};this.registerGlobalEventDispatcher=function(b){null===a&&(a=[]);a.push(b)};this.G=
function(){a=null};this.a=function(a,c){b.push({event:a,listener:c})};this.b=function(a){for(var c=0;c<b.length;c++)b[c].event===a&&b.splice(c,1)};this.jc=function(a,c){for(var h=0;h<b.length;h++){var e=c?b[h].listener===c:!0;b[h].event===a&&e&&b.splice(h,1)}};this.triggerEvent=function(a,c){this.C(a,c);for(var h=0;h<b.length;h++){var e=b[h];e.event===a&&"function"===typeof e.listener&&e.listener({type:a,info:c})}};this.ic=function(a,c){for(var h=0;h<b.length;h++){var e=b[h];e.event===a&&"function"===
typeof e.listener&&e.listener(c)}}};b.j.Event=function(){var b=[];this.m=function(a,c,h){if(a){c=c.split(",");for(var e=0;e<c.length;e++)"function"===typeof a.addEventListener?a.addEventListener(c[e],h,!1):"function"===typeof a.attachEvent&&a.attachEvent("on"+c[e],h),b.push({target:a,Wa:c[e],Sb:h})}};this.g=function(a,c,h){if(h)if(c=c.split(","),"all"===c[0])for(c=0;c<b.length;c++)b[c].target===a&&b[c].Sb===h&&("function"===typeof a.removeEventListener?a.removeEventListener(b[c].Wa,h):"function"===
typeof a.detachEvent&&a.detachEvent("on"+b[c].Wa,h),b.splice(c,1));else{for(var e=0;e<c.length;e++)"function"===typeof a.removeEventListener?a.removeEventListener(c[e],h):"function"===typeof a.detachEvent&&a.detachEvent("on"+c[e],h);b=[]}}};b.qa=function(d){function a(){f.triggerEvent("timeupdate",{id:c,data:e})}var c,h,e=null,f=new b.j.s;this.start=function(){c=setInterval(a,h)};this.stop=function(){clearInterval(c)};this.__defineSetter__("data",function(a){e=a});this.a=f.a;this.b=f.b;h=d};b.createElement=
function(d,a){var c;try{c=document.createElement(d)}catch(h){c=document.createElement("<"+d+">")}if(a){"id"in a||c.setAttribute("id",b.Ua());for(var e in a)a.hasOwnProperty(e)&&c.setAttribute(e,a[e])}return c};b.sa=function(b,a){if(b)for(var c in a)b.style[c]=a[c]};b.wa=function(d,a){return b.B(d)?d.getElementsByTagName(a):[]};b.S=function(d,a){if(b.B(d))return d.getElementsByTagName(a)[0]};b.T=function(d){if(!d||!d.childNodes[0])return!1;for(var a=d.childNodes.length,c="",h="",e=!1;a--;)if(4===d.childNodes[a].nodeType){h=
b.trim(d.childNodes[a].nodeValue);break}else 3===d.childNodes[a].nodeType&&(c=b.trim(d.childNodes[a].nodeValue));1<d.childNodes.length&&(h=d.textContent);""!==h?e=h:""!==c&&(e=c);return e};b.Kb=function(b){if(!b)return!1;for(var a={},c=0;c<b.attributes.length;c++)a[b.attributes[c].name]=b.attributes[c].value;return a};b.trim=function(b){return b.replace(/^\s+|\s+$/g,"")};b.ma=function(d,a){var c=d,h;for(h in a)a.hasOwnProperty(h)&&b.B(a[h])&&(c=c.replace(String(h),String(a[h])));return c};b.Ua=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,
function(b){var a=16*Math.random()|0;return("x"==b?a:a&3|8).toString(16)}).toUpperCase()};b.V=function(b){var a=0,c=b.split(".")[0],c=b.split(":").reverse();for(b=0;b<c.length;b++)a+=parseInt(c[b]*Math.pow(60,b),10);return a};b.fc=function(d,a){if(!d)return d;var c=!(!d||-1===d.indexOf("%")),h=parseInt(d,10),e;return a&&c?("string"===typeof a?e=b.V(a.split(".")[0]):isNaN(a)||(e=parseInt(a,10)),e&&!isNaN(h)?h/100*e:"IGNORE"):isNaN(d)?b.V(d.split(".")[0]):d};b.qc=function(d){return b.B(d)?0<["doubleclick",
"smartclip.net","adtech","userreport.com"].filter(function(a){return-1<d.indexOf(a)}).length:!1};b.Ob=function(){var b=window,a=document,b={innerWidth:[b.innerWidth,a.body.clientWidth,a.documentElement.clientWidth],innerHeight:[b.innerHeight,a.body.clientHeight,a.documentElement.clientHeight],scrollX:[b.scrollX,a.documentElement.scrollLeft,a.body.scrollLeft],scrollY:[b.scrollY,a.documentElement.scrollTop,a.body.scrollTop]},c;for(c in b)if(b.hasOwnProperty(c)){for(a=0;a<b[c].length;a++)"number"!==
typeof b[c][a]&&(b[c].splice(a,1),a--);b[c]=b[c][0]}};b.getWidth=function(b){return!b||b&&!b.getBoundingClientRect?-1:b.getBoundingClientRect().width};b.getHeight=function(b){return!b||b&&!b.getBoundingClientRect?-1:b.getBoundingClientRect().height};b.isDocumentInFullScreenMode=function(){return document.Ib&&null!==document.Ib||document.mozFullScreen||document.webkitIsFullScreen};b.Wc=function(b){for(var a=window.frameElement,c=window;a;)(b||function(){})(a),c=a.ownerDocument.defaultView,a=c.frameElement;
return c};b.fb=function(){return window!==top};b.eb=function(){return!b.fb()||b.fb()&&null!==window.frameElement};b.Z=function(b){if(0===b.indexOf("//")){var a=location.protocol;"file:"===a&&(a="https:");b=a+b}return b};return b}(e||{}),t=new c,h=[],q=[];e.find=function(b,c){return Array.prototype.map.call((c||document).querySelectorAll(b),function(a){return a})};e.D=function(b){var c=Object.prototype.toString.call(b);return"[object Function]"===c||"function"===typeof b&&"[object RegExp]"!==c||"undefined"!==
typeof window&&(b===window.setTimeout||b===window.alert||b===window.confirm||b===window.prompt)};e.ac=function(b){return e.D(b.canPlayType)&&e.D(b.play)};var r=window.ois=function d(a,c,f){if(e.D(a))return h.forEach(function(c){a(c.fa,c.element,c.ec,{adManager:c.adManager,config:c.Qc})}),q.push(a);if("number"===typeof a||"undefined"===typeof a)return h[a||0].fa;if(a.nodeType)return null!==a.getAttribute("data-ois-instance-id")?(f=h[a.getAttribute("data-ois-instance-id")],c&&f.v.oa(c),f.fa):c?p(a,
c,f):null;if(e.ac(a))return a.nodeType="ois",d(a,c,f);if("string"===typeof a){var r=e.find(a)[0];return r&&d(r,c,f)}return null};r(function(c,a,k,f){var q=f.adManager,r=f.v;c.load=function(){};c.shutdown=function(){q.destroy();delete h[a.getAttribute("data-ois-instance-id")];a.removeAttribute("data-ois-instance-id")};c.registerVASTExtension=function(a,c){window[a]=c;var d=r.Lb();d.vastExtensions[a]=!0;r.oa(d)};c.utils=e;return c});r(function(c){function a(h,e){c.unsubscribe(a,"AdTagParsed");if((!e||
0!==e.ads.length)&&e){for(var g=n=0;g<e.ads.length;g++){var k=e.ads[g].creatives.filter(function(a){return"linear"===a.type}).shift();k&&!k.errorCode&&(n+=k.duration?k.duration:20)}0===n&&(n=-1)}}function h(){"commercial"===c.getVariant()&&q!==this.duration&&0<n&&(n=n-q+this.duration)}var e=null,f=-1,q=-1,n=-1,g=-1,m=null;c.subscribe(function(){m=c.getVideoSlot();m.addEventListener("loadedmetadata",h)},"AdSlotStart");c.subscribe(function(){c.subscribe(a,"AdTagParsed");m&&m.removeEventListener("loadedmetadata",
h)},"AdSlotComplete");c.subscribe(function(a,c){e=new Date;q=c.creatives.filter(function(a){return"linear"===a.type}).shift().duration;this.dispatchEvent("AdDurationChange")},"AdLoaded");c.subscribe(function(){var a=(new Date-e)/1E3;f=q-a;var h=c.Pb();-1<h&&(g=h-a);this.dispatchEvent("AdRemainingTimeChange")},"AdVideoTimeupdate");c.subscribe(a,"AdTagParsed");c.getAdRemainingTime=function(){return f};c.getAdDuration=function(){return q};c.Kc=function(){return g};c.Pb=function(){return n}});r(function(c,
a,h,e){function f(a,c,d){var h="undefined"!=typeof XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");h.open("GET",a,!0);h.onreadystatechange=function(){4===h.readyState&&(200===h.status?(c||Function)(h.responseXML):(d||Function)(h.status))};h.send(null)}function q(a){var h={};if((a=a.getElementsByTagName("OIS"))&&a[0]){for(var e=a[0].children.length-1;0<=e;e--){var k=a[0].children[e];h[k.tagName]=k.textContent}g.oa(h);m=!0;r&&c.startAd()}}function n(){m=!0;r&&c.startAd()}var g=
e.v,m=!1,r=!1,l=c.startAd;c.startAd=function(){r=!0;m&&l.apply(c,[].slice.call(arguments))};(function(){var a=h.configXML;a?f(a,q,n):m=!0})();return c});I.API_VERSION="3.0.1";I.API_BUILD="004663";I.IDENTIFIER="OISHTML5VE";I.MediaSelector=function(c,a){function h(a){return"boolean"===typeof a?a:"string"===typeof a&&"true"===a?!0:!1}function f(a){return"string"===typeof a?a.toLowerCase():a}function q(a){var c=!0;g.forEach(function(d){var g;a:{for(g in d)break a;g=void 0}g=f(g);d=f(d[g]);if(e.B(g)&&
e.B(d))switch(g){case "delivery":case "type":case "format":case "mimeType":case "apiframework":"type"===g&&(g="mimeType");"mimeType"===g&&(d=d.split("|"));a.hasOwnProperty(g)&&-1===d.indexOf(a[g].toLowerCase())&&(c=!1);break;case "bitrate":case "width":a.hasOwnProperty(g)&&parseInt(a[g],10)>parseInt(d,10)&&(c=!1);break;case "scalable":case "maintainaspectratio":a.hasOwnProperty(g)&&h(a[g])!==h(d)&&(c=!1)}});return c}function r(){m&&(l=m.filter(function(a){return q(a)}))}var n=new e.j.s,g=a.U(),m=
c.c()&&0<c.c().creatives.length&&c.J().mediaFiles,l=[];this.a=n.a;this.b=n.b;this.registerGlobalEventDispatcher=n.registerGlobalEventDispatcher;this.sc=function(){l.sort(function(a,c){return parseInt(a.bitrate,10)>parseInt(c.bitrate,10)?1:parseInt(a.bitrate,10)<parseInt(c.bitrate,10)?-1:0})};this.Hb=function(){a.removeRule("bitrate");a.addRule({bitrate:e.ba()||5E3});a.ib();g=a.U();r();1>l.length&&(a.removeRule("bitrate"),a.removeRule("format"),g=a.U(),r());return this};this.Ca=function(){return l}};
I.extensions.CustomTrackingEvents=function(c,a,h,f,q){function r(a){switch(a.info){case "creativeView":u.start()}}var n,g,m=this,l=[],p=new e.j.s,u;this.Jb=function(){var a=Math.round(100*(g.totalTime-g.la))/100,h=c.K().A||void 0;return{"[sc_systemDomain]":"undefined","[sc_viewtime]":a,"[sc_percentvisible]":h,"[uif_adslot]":"linear"}};this.setViewport=function(){};this.destroy=function(){};this.a=p.a;this.b=p.b;(function(){c.$a();g=a;n=f;n.a("onTrack",r);var e=new I.extensions.CustomTrackingEvents.Parser;
h&&(l=e.parse(h));u=new I.extensions.CustomTrackingEvents.CustomTrackingEventHandler(c.K,l,m,n);q.a("AdStopped",u.destroy)})()};I.extensions.CustomTrackingEvents.Parser=function(){this.parse=function(c){var a,h=[];c=e.wa(c,"Tracking");for(var f=0;f<c.length;f++){var q=c[f];a=e.Kb(q);q=e.T(q);a=e.extend({},a);"viewableImpression"===a.event&&(a.offset=a.offset?1E3*e.V(a.offset):2E3,a.visibility=a.visibility?parseInt(a.visibility,10):50);a.url=q;h.push(a)}return h}};I.extensions.CustomTrackingEvents.CustomTrackingEventHandler=
function(c,a,h,f){function q(a){a=a.info.data;c().A>a.visibility?a.N++:a.N=0;if(250*a.N/1E3>=a.offset/1E3){if(e.B(a.url)){var m=e.urlEnrichment.w(e.ma(a.url,h.Jb()));f.callCustomTracker(m,"viewableImpression")}a.o.b("timeupdate",q);a.o.stop()}}function r(){try{a.forEach(function(a){a.o.b("timeupdate",q);a.o.stop()})}catch(c){}}var n;this.start=function(){a=a.filter(function(a){return"viewableImpression"===a.event});c&&a.length&&a.forEach(function(a){n=new e.qa(250);n.data=a;a.o=n;a.N=0;n.a("timeupdate",
q);n.start()})};this.destroy=function(){r()}};window.ois(function(c,a){function h(a,e){function g(){a.apply(this,arguments);c.unsubscribe(g,e)}c.subscribe(g,e)}function f(a){a=a.target.getAttribute("data-program");a=m[a];for(var c=0;c<a.clickTracking.length;c++)(new Image).src=e.urlEnrichment.w(a.clickTracking[c]);window.open(a.clickThrough,"_blank")}function q(){if(n){for(var a in m){var c=m[a],d=document.createElement("img"),h;for(h in c.attributes)c.attributes[h]&&d.setAttribute(h,c.attributes[h]);
d.setAttribute("data-program",a);d.style.pointerEvents="auto";d.style.cursor="pointer";d.style.zIndex="10";d.addEventListener("click",f);n.appendChild(d);(new Image).src=e.urlEnrichment.w(c.zc)}n.style.display="block"}}function r(){n&&n.parentNode.removeChild(n)}Number.isFinite=Number.isFinite||function(a){return"number"===typeof a&&isFinite(a)};var n=null,g=[],m={},l={Ea:0,X:0,va:0,Gc:0};(function(){h(function(c,d){g=d;n=document.createElement("div");n.setAttribute("style","position:absolute;width:100%;height:100%;top:0;left:0;display:none;pointer-events:none;");
a.parentNode.appendChild(n);for(var h=g.length-1;0<=h;h--){var e=g[h],k=e.program||"unknown-"+h;if(!m[k]){var f={attributes:{},style:{}};f.style.width=parseInt(e.width,10)+"px";f.style.height=parseInt(e.height,10)+"px";f.style.position="absolute";var q=parseInt(e.yPosition,10);Number.isFinite(q)?0<=q?f.style.top=q+"px":f.style.bottom=Math.abs(q)+"px":(f.style.top="top"===e.yPosition?0:"initial",f.style.bottom="bottom"===e.yPosition?0:"initial");q=parseInt(e.xPosition,10);Number.isFinite(q)?0<=q?f.style.left=
q+"px":f.style.right=Math.abs(q)+"px":"left"===e.xPosition?"top"===e.yPosition?(f.style.left=l.Ea+"px",l.Ea+=parseInt(e.width,10)):"bottom"===e.yPosition?(f.style.left=l.va+"px",l.va+=parseInt(e.width,10)):f.style.left=0:"right"===e.xPosition?"top"===e.yPosition?(f.style.right=l.X+"px",l.X+=parseInt(e.width,10)):"bottom"===e.yPosition?(f.style.right=l.Qa+"px",l.Qa+=parseInt(e.width,10)):f.style.right=0:(f.style.top=0,f.style.right=l.X+"px",l.X+=parseInt(e.width,10));f.attributes.style=JSON.stringify(f.style);
f.attributes.style=f.attributes.style.substring(1,JSON.stringify(f.style).length-1);f.attributes.style=f.attributes.style.replace(/\"/ig,"").replace(/\,/ig,";")+";";f.attributes.src=e.staticResource;f.clickThrough=e.iconClickThroughURLTemplate;f.clickTracking=e.iconClickTrackingURLTemplates;f.zc=e.iconViewTrackingURLTemplate;f.offset=(new Date("01/01/1970 "+e.offset)).getSeconds()||0;f.duration=(new Date("01/01/1970 "+e.duration)).getSeconds()||-1;m[k]=f}}},4300);h(q,"AdImpression");h(r,"AdStopped")})()});
window.ois.MediaFileFormat={WIDE:"wide",SQUARE:"square",VERTICAL:"vertical"};window.ois(function(c,a){function h(a,e){function g(){a.apply(this,arguments);c.unsubscribe(g,e)}c.subscribe(g,e)}function f(h){if(!c.adManager.isVPAID()&&u[l]&&(h=h.creatives.filter(function(a){return"linear"===a.type}).shift().supportedMediaFiles.filter(function(a){return a.attributes?a.attributes.format===l:!0}),h.length)){var g=function(){a.removeEventListener("loadedmetadata",g,!1);0>q&&(q=0);a.currentTime=q;void 0===
r&&m&&a.pause()},k=e.ba()||5E3;if(h=h.reduce(function(a,c){return Math.abs(c.bitrate-k)<Math.abs(a.bitrate-k)?c:a})){var q=a.currentTime-.5,m=a.paused,n=a.webkitDisplayingFullscreen||!1;a.src=e.Z(h.fileURL);a.addEventListener("loadedmetadata",g,!1);a.load();if(!p){var r=a.play();void 0!==r&&r.then(function(){var c=a.webkitDisplayingFullscreen||!1;(m||n!=c)&&a.pause()},function(){t.log("MediaElement: The play() request failed.")})}}}}function q(c,d){m=setTimeout(q,20);var h;h=a.getBoundingClientRect().width/
a.getBoundingClientRect().height;h=1<h?window.ois.MediaFileFormat.WIDE:1>h?window.ois.MediaFileFormat.VERTICAL:window.ois.MediaFileFormat.SQUARE;h!==l&&(l=h,f(d))}function r(){p=!1}function n(){p=!0}function g(){clearTimeout(m);a.removeEventListener("webkitbeginfullscreen",r);a.removeEventListener("webkitendfullscreen",n)}var m=0,l,p=!1,u={Yc:!1,Vc:!1,Xc:!1};a.addEventListener("webkitbeginfullscreen",r);a.addEventListener("webkitendfullscreen",n);h(function(a,c){c&&c.ads&&c.ads.length&&c.ads.forEach(function(a){var c=
a.creatives.filter(function(a){return"linear"===a.type}).shift();!a.errorCode&&0<a.creatives.length&&c.mediaFiles.forEach(function(a){var c=parseInt(a.width,10)/parseInt(a.height,10);a.attributes||(a.attributes={});1<c?(a.attributes.format=window.ois.MediaFileFormat.WIDE,u.wide=!0):1>c?(a.attributes.format=window.ois.MediaFileFormat.VERTICAL,u.vertical=!0):(a.attributes.format=window.ois.MediaFileFormat.SQUARE,u.square=!0)})})},"AdTagParsed");h(q,"AdLoaded");h(g,"AdSlotComplete");h(g,"AdError")});
I.extensions.SCAdVisibility=function(c,a,h,f,q){function r(a){switch(a.info){case "creativeView":n(),K.start()}}function n(){p.forEach(function(a){var c=new e.qa(a.interval);c.data=a;a.o=c;c.a("timeupdate",m);c.start();m({info:{data:a}})})}function g(){p.forEach(function(a){a.o.b("timeupdate",m);a.o.stop()})}function m(a){if(a=a.info.data.url)a=e.createElement("img",{src:l(a),style:"display:none;",onerror:"this.parentNode.removeChild(this);",onload:"this.parentNode.removeChild(this);"}),c.Da().appendChild(a)}
function l(a){var h=c.K().A||void 0;isNaN(h)?(a=e.ma(a,{"[sc_percentvisible]":"JSINJECTIONERROR"}),g()):a=e.ma(a,D.Xa());return e.urlEnrichment.w(a)}var p,u,t,D=this,v,H=new e.j.s,K;this.Xa=function(){var a=t.v.vb,h=Math.round(100*(t.totalTime-t.la))/100,e=c.K().A||void 0;return{"[sc_systemDomain]":a?a:"undefined","[sc_viewtime]":h,"[sc_percentvisible]":e,"[uif_adslot]":"linear"}};this.setViewport=function(){};this.destroy=function(){g()};this.a=H.a;this.b=H.b;(function(){c.$a();t=a;u=f;u.a("onTrack",
r);var e=new I.extensions.SCAdVisibility.Parser;p=e.parse(h);v=e.hc(h);K=new I.extensions.SCAdVisibility.ViewableImpressionHandler(c.K,v,D,u);q.a("AdStopped",K.destroy)})()};I.extensions.SCAdVisibility.Parser=function(){this.parse=function(c){var a=[];c=e.wa(c,"Tracking");for(var h=0;h<c.length;h++)c[h]&&a.push({interval:parseInt(e.T(e.S(c[h],"Interval")),10),url:e.T(e.S(c[h],"URL"))});return a};this.hc=function(c){var a,h,f,q,r=[];a=e.wa(c,"BooleanView");if(!e.B(a))return r;for(var n=0;n<a.length;n++)if(a[n]){c=
{};if(h=e.S(a[n],"ViewConditions"))f=parseInt(e.T(e.S(h,"ViewThreshold")),10),q=parseInt(e.T(e.S(h,"ViewTime")),10);h=e.T(e.S(a[n],"ViewURL"));c.xc=isNaN(f)?50:f;c.yc=isNaN(q)?2E3:q;c.ub=h.length?h:"";r.push(c)}return r}};I.extensions.SCAdVisibility.ViewableImpressionHandler=function(c,a,h,f){function q(a){a=a.info.data;c().A>a.xc?a.N++:a.N=0;if(250*a.N/1E3>=a.yc/1E3){if(e.B(a.ub)){var m=e.urlEnrichment.w(e.ma(a.ub,h.Xa()));f.callCustomTracker(m,"viewableImpression")}a.o.b("timeupdate",q);a.o.stop()}}
function r(){try{a.forEach(function(a){a.o.b("timeupdate",q);a.o.stop()})}catch(c){}}var n;this.start=function(){c&&a.length&&a.forEach(function(a){n=new e.qa(250);n.data=a;a.o=n;a.N=0;n.a("timeupdate",q);n.start()})};this.destroy=function(){r()}};(function(){function c(){this.attributes={};this.children=[]}function a(){this.id=null;this.height=this.width=0;this.companionClickThroughURLTemplate=this.iframeResource=this.htmlResource=this.staticResource=this.type=null;this.trackingEvents={}}function h(){this.program=
null;this.yPosition=this.xPosition=this.width=this.height=0;this.offset=this.apiFramework=null;this.duration=0;this.iconClickThroughURLTemplate=this.iframeResource=this.htmlResource=this.staticResource=this.type=null;this.iconClickTrackingURLTemplates=[];this.iconViewTrackingURLTemplate=null}function e(){this.viewableImpression=this.flashResource=this.javascriptResource=this.vendor=null}function f(){this.fileURL=this.id=null;this.deliveryType="progressive";this.codec=this.mimeType=null;this.height=
this.width=this.maxBitrate=this.minBitrate=this.bitrate=0;this.maintainAspectRatio=this.scalable=this.apiFramework=null}function q(a){a=void 0===a?{}:a;this.id=a.id||null;this.adId=a.adId||null;this.sequence=a.sequence||null;this.apiFramework=a.apiFramework||null;this.trackingEvents={}}function r(a){a=void 0===a?{}:a;q.call(this,a);this.type="linear";this.duration=0;this.skipDelay=null;this.mediaFiles=[];this.videoClickThroughURLTemplate=null;this.videoClickTrackingURLTemplates=[];this.videoCustomClickURLTemplates=
[];this.adParameters=null;this.icons=[]}function g(a){a=void 0===a?{}:a;q.call(this,a);this.type="nonlinear";this.variations=[];this.videoClickTrackingURLTemplates=[]}function m(a){a=void 0===a?{}:a;q.call(this,a);this.type="companion";this.variations=[];this.videoClickTrackingURLTemplates=[]}function l(){this.survey=this.pricing=this.advertiser=this.description=this.title=this.system=this.sequence=this.id=this.url=null;this.errorURLTemplates=[];this.impressionURLTemplates=[];this.creatives=[];this.extensions=
[];this.adVerifications=[];this.wrappers=[];this.fetch=function(){};this.fetched=!1}function p(){this.id=null;this.expandedHeight=this.expandedWidth=this.height=this.width=0;this.maintainAspectRatio=this.scalable=!0;this.minSuggestedDuration=0;this.apiFramework="static";this.nonlinearClickThroughURLTemplate=this.iframeResource=this.htmlResource=this.staticResource=this.type=null;this.nonlinearClickTrackingURLTemplates=[];this.adParameters=null}function u(){this.value=this.name=null;this.attributes=
{};this.children=[]}function t(a){var c=[];c.forEach.call(c.slice.call(arguments,1),function(c){if(c)for(var d in c)({}).hasOwnProperty.call(c,d)&&(a[d]="object"===typeof a[d]&&"object"===typeof c[d]&&null!==c[d]?t(a[d],c[d]):c[d])});return a}function D(){this.ads=[];this.errorURLTemplates=[]}function v(){}function I(){}function H(){}function K(){}function z(){this.maxWrapperDepth=10;this.blockInsecureURL=!1;this.currentWrapperDepth=0;this.URLTemplateFilters=[];this.wrapperCallbackHandlers=[];F.EventDispatcher.prototype.apply(this)}
var E={scope:{},getGlobal:function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global?global:a}};E.global=E.getGlobal(this);E.initSymbol=function(){E.global.Symbol||(E.global.Symbol=E.Symbol);E.initSymbol=function(){}};E.symbolCounter_=0;E.Symbol=function(a){return"jscomp_symbol_"+a+E.symbolCounter_++};E.initSymbolIterator=function(){E.initSymbol();E.global.Symbol.iterator||(E.global.Symbol.iterator=E.global.Symbol("iterator"));E.initSymbolIterator=function(){}};E.makeIterator=
function(a){E.initSymbolIterator();if(a[E.global.Symbol.iterator])return a[E.global.Symbol.iterator]();if(!(a instanceof Array||"string"==typeof a||a instanceof String))throw new TypeError(a+" is not iterable");var c=0;return{next:function(){return c==a.length?{done:!0}:{done:!1,value:a[c++]}}}};E.arrayFromIterator=function(a){for(var c,d=[];!(c=a.next()).done;)d.push(c.value);return d};E.arrayFromIterable=function(a){return a instanceof Array?a:E.arrayFromIterator(E.makeIterator(a))};E.arrayFromArguments=
function(a){for(var c=[],d=0;d<a.length;d++)c.push(a[d]);return c};E.inherits=function(a,c){function d(){}d.prototype=c.prototype;a.prototype=new d;a.prototype.constructor=a;for(var h in c)if(E.global.Object.defineProperties){var e=E.global.Object.getOwnPropertyDescriptor(c,h);void 0!==e&&E.global.Object.defineProperty(a,h,e)}else a[h]=c[h]};Object.defineProperties(a.prototype,{hasCreatives:{configurable:!0,enumerable:!0,get:function(){return this.staticResource||this.htmlResource||this.iframeResource}}});
E.inherits(r,q);E.inherits(g,q);E.inherits(m,q);Object.defineProperties(l.prototype,{hasError:{configurable:!0,enumerable:!0,get:function(){return!isNaN(this.errorCode)}}});var P={isSecureURL:function(a){return"https:"===window.location.protocol&&0!==(a+"").indexOf("http://")||"https:"!==window.location.protocol}},C={};C.extend=t;var U={resolveAdTagURI:function(a,c){if(0===a.indexOf("//")){var d=location.protocol;"file:"===d&&(d="https:");return d+a}return-1===a.indexOf("://")?c.slice(0,c.lastIndexOf("/"))+
"/"+a:a}},G={stringToXML:function(a){if("string"===typeof a===!1)return a;var c=null;window.DOMParser?c=(new DOMParser).parseFromString(a,"text/xml"):(c=new ActiveXObject("Microsoft.XMLDOM"),c.loadXML(a));return c}};v.prototype.xdr=function(){return window.XDomainRequest?new window.XDomainRequest:null};v.supported=function(){return!!(new v).xdr()};v.prototype.get=function(a,c,d){if("function"!==typeof window.ActiveXObject)d();else{var h=new window.ActiveXObject("b");h.async=!1;xdr=this.xdr();xdr.open("GET",
a);xdr.timeout=c.timeout||0;xdr.withCredentials=!1!==c.withCredentials;xdr.onprogress=function(){};xdr.onload=function(){h.loadXML(xdr.responseText);d(null,h)};xdr.send()}};I.prototype.xhr=function(){var a=new window.XMLHttpRequest;return"withCredentials"in a?a:null};I.supported=function(){return!!(new I).xhr()};I.prototype.get=function(a,c,d){try{var h=this,e=this.xhr();e.open("GET",a);e.timeout=c.timeout||0;e.withCredentials=!1!==c.withCredentials;e.overrideMimeType&&e.overrideMimeType("text/xml");
e.onreadystatechange=function(){if(4===e.readyState)if(200===e.status){var g=e.responseXML;!g&&e.responseText&&(g=G.stringToXML(e.responseText));g?d(null,g):(e.statusText="Response contains neither 'responseXML' nor 'responseText'",d(Error("XHRURLHandler: "+e.statusText)))}else 0===e.status&&e.withCredentials?(g=JSON.parse(JSON.stringify(c)),g.withCredentials=!1,h.get(a,g,d)):d(Error("XHRURLHandler: "+e.statusText))};e.send()}catch(g){d(g)}};H.prototype.get=function(a,c,d){var h=d,e=c;d||("function"===
typeof c&&(h=c),e={});if(!h)return null;c=e.urlhandler;if(e.response)h(null,G.stringToXML(e.response));else return c&&c.supported()?(new c).get(a,e,h):I.supported()?(new I).get(a,e,h):v.supported()?(new v).get(a,e,h):h();return null};var F={};K.prototype={constructor:K,apply:function(a){a.addEventListener=K.prototype.addEventListener;a.hasEventListener=K.prototype.hasEventListener;a.removeEventListener=K.prototype.removeEventListener;a.dispatchEvent=K.prototype.dispatchEvent},addEventListener:function(a,
c){this._listeners||(this._listeners={});var d=this._listeners;d[a]||(d[a]=[]);-1===d[a].indexOf(c)&&d[a].push(c)},hasEventListener:function(a,c){if(!this._listeners)return!1;var d=this._listeners;return d[a]&&-1!==d[a].indexOf(c)?!0:!1},removeEventListener:function(a,c){if(this._listeners){var d=this._listeners[a];if(d){var h=d.indexOf(c);-1!==h&&d.splice(h,1)}}},dispatchEvent:function(a){if(this._listeners){var c=this._listeners[a];if(c){for(var d=c.length,h=[],e=0,e=0;e<d;e++)h[e]=c[e];for(c=0;c<
d;c++)(h[c]||function(){}).apply(this,[].slice.call(arguments,1))}}}};F.EventDispatcher=K;z.prototype.trackError=function(a,c,d,h){this.dispatchEvent("VAST-error",{response:JSON.parse(JSON.stringify(a)),errorCode:d,errorURLTemplates:c,silent:h})};z.prototype.addURLTemplateFilter=function(a){"function"===typeof a&&this.URLTemplateFilters.push(a)};z.prototype.removeURLTemplateFilter=function(){return this.URLTemplateFilters.pop()};z.prototype.countURLTemplateFilters=function(){return this.URLTemplateFilters.length};
z.prototype.clearUrlTemplateFilters=function(){this.URLTemplateFilters=[]};z.prototype.addWrapperCallbackHandler=function(a){"function"===typeof a&&this.wrapperCallbackHandlers.push(a)};z.prototype.removeWrapperCallbackHandler=function(){return this.wrapperCallbackHandlers.pop()};z.prototype.countWrapperCallbackHandlers=function(){return this.wrapperCallbackHandlers.length};z.prototype.clearWrapperCallbackHandlers=function(){this.wrapperCallbackHandlers=[]};z.prototype.parseXPosition=function(a){return-1!==
["left","right"].indexOf(a)?a:parseInt(a,10)||0};z.prototype.parseYPosition=function(a){return-1!==["top","bottom"].indexOf(a)?a:parseInt(a,10)||0};z.prototype.parseNodeText=function(a){return a&&(a.textContent||a.text||"").trim()};z.prototype.copyNodeAttribute=function(a,c,d){(c=c.getAttribute(a))&&d.setAttribute(a,c)};z.prototype.parseDuration=function(a){if(!a)return-1;if(isNaN(parseFloat(a))&&isFinite(a))return parseInt(a,10);var c=a.split(":");if(3!==c.length)return-1;var d=c[2].split(".");a=
parseInt(d[0],10);2===d.length&&(a+=parseFloat("0."+d[1]));d=parseInt(60*c[1],10);c=parseInt(3600*c[0],10);return isNaN(c)||isNaN(d)||isNaN(a)||3600<d||60<a?-1:c+d+a};z.prototype.parseBoolean=function(a,c){return-1<["true","1"].indexOf((a+"").toLowerCase())?!0:-1<["false","0"].indexOf((a+"").toLowerCase())?!1:c||!1};z.prototype.childByName=function(a,c){for(var d=0;d<a.childNodes.length;d++){var h=a.childNodes.item(d);if(h.nodeName===c)return h}return null};z.prototype.childsByName=function(a,c){for(var d=
[],h=0;h<a.childNodes.length;h++){var e=a.childNodes.item(h);e.nodeName===c&&d.push(e)}return d};z.prototype.parseNextWrapperURL=function(a){var c=null,d=this.childByName(a,"VASTAdTagURI");d?c=this.parseNodeText(d):(d=this.childByName(a,"VASTAdTagURL"))&&(c=this.parseNodeText(this.childByName(d,"URL")));return c};z.prototype.parseWrapperElement=function(a){var c=this.parseInLineElement(a);c.nextWrapperURL=this.parseNextWrapperURL(a);c.videoClickTrackingURLTemplates||(c.videoClickTrackingURLTemplates=
[]);c.videoCustomClickURLTemplates||(c.videoCustomClickURLTemplates=[]);a=c.creatives;for(var d=0;d<a.length;d++){var h=a[d],e=null;if("linear"===h.type||"nonlinear"===h.type)if(e=h)e.trackingEvents&&(c.trackingEvents||(c.trackingEvents={}),c.trackingEvents[e.type]=e.trackingEvents),e.videoClickTrackingURLTemplates&&(c.videoClickTrackingURLTemplates=e.videoClickTrackingURLTemplates.concat(c.videoClickTrackingURLTemplates)),e.videoClickThroughURLTemplate&&(c.videoClickThroughURLTemplate=e.videoClickThroughURLTemplate),
e.videoCustomClickURLTemplates&&(c.videoCustomClickURLTemplates=e.videoCustomClickURLTemplates.concat(c.videoCustomClickURLTemplates))}return c.nextWrapperURL?c:null};z.prototype.parseSkipOffset=function(a,c){var d=null;(d=c.getAttribute("skipoffset"))?"%"===d.charAt(d.length-1)&&-1!==a.duration?(percent=parseInt(d,10),d=percent/100*a.duration):d=this.parseDuration(d):d=null;return d};z.prototype.parseVideoClicks=function(a){var c={videoClickTrackingURLTemplates:[],videoCustomClickURLTemplates:[]};
if(a=this.childByName(a,"VideoClicks")){c.videoClickThroughURLTemplate=this.parseNodeText(this.childByName(a,"ClickThrough"));for(var d=this.childsByName(a,"ClickTracking"),h=0;h<d.length;h++)c.videoClickTrackingURLTemplates.push(this.parseNodeText(d[h]));a=this.childsByName(a,"CustomClick");for(d=0;d<a.length;d++)c.videoCustomClickURLTemplates.push(this.parseNodeText(a[d]))}return c};z.prototype.parseTrackingEvents=function(a){var c={};a=this.childsByName(a,"TrackingEvents");for(var d=0;d<a.length;d++)for(var h=
this.childsByName(a[d],"Tracking"),e=0;e<h.length;e++){var g=h[e],k=g.getAttribute("event"),f=this.parseNodeText(g);if(k&&f){if("progress"===k){g=g.getAttribute("offset");if(!g)continue;k="%"===g.charAt(g.length-1)?"progress-"+g:"progress-"+Math.round(this.parseDuration(g))}c[k]||(c[k]=[]);c[k].push(f)}}return c};z.prototype.parseMediaFileScalable=function(a){return(a=a.getAttribute("scalable"))&&"string"===typeof a&&(a=a.toLowerCase(),"false"===a)?!1:!0};z.prototype.parseMediaFileMaintainAspectRatio=
function(a){return(a=a.getAttribute("maintainAspectRatio"))&&"string"===typeof a&&(a=a.toLowerCase(),"false"===a)?!1:!0};z.prototype.parseMediaFiles=function(a){var c=[];a=this.childsByName(a,"MediaFiles");for(var d=0;d<a.length;d++)for(var h=this.childsByName(a[d],"MediaFile"),e=0;e<h.length;e++){var g=h[e],k=new f;k.id=g.getAttribute("id");k.fileURL=this.parseNodeText(g);k.deliveryType=g.getAttribute("delivery");k.codec=g.getAttribute("codec");k.mimeType=g.getAttribute("type");k.apiFramework=g.getAttribute("apiFramework");
k.bitrate=parseInt(g.getAttribute("bitrate")||0,10);k.minBitrate=parseInt(g.getAttribute("minBitrate")||0,10);k.maxBitrate=parseInt(g.getAttribute("maxBitrate")||0,10);k.width=parseInt(g.getAttribute("width")||0,10);k.height=parseInt(g.getAttribute("height")||0,10);k.scalable=this.parseMediaFileScalable(g);k.maintainAspectRatio=this.parseMediaFileMaintainAspectRatio(g);c.push(k)}return c};z.prototype.parseIcons=function(a){var c=[];if(a=this.childByName(a,"Icons")){a=this.childsByName(a,"Icon");for(var d=
0;d<a.length;d++){var e=a[d],g=new h;g.program=e.getAttribute("program");g.height=parseInt(e.getAttribute("height"),10)||0;g.width=parseInt(e.getAttribute("width"),10)||0;g.xPosition=this.parseXPosition(e.getAttribute("xPosition"));g.yPosition=this.parseYPosition(e.getAttribute("yPosition"));g.apiFramework=e.getAttribute("apiFramework");g.offset=this.parseDuration(e.getAttribute("offset"));g.duration=this.parseDuration(e.getAttribute("duration"));var g=C.extend(g,this.parseResourceAdType(e)),f=this.childByName(e,
"IconClicks");if(f){g.iconClickThroughURLTemplate=this.parseNodeText(this.childByName(f,"IconClickThrough"));for(var f=this.childsByName(f,"IconClickTracking"),q=0;q<f.length;q++)g.iconClickTrackingURLTemplates.push(this.parseNodeText(f[q]))}g.iconViewTrackingURLTemplate=this.parseNodeText(this.childByName(e,"IconViewTracking"));c.push(g)}}return c};z.prototype.parseCreativeLinearElement=function(a,c){c=void 0===c?{}:c;var d=new r(c);d.duration=this.parseDuration(this.parseNodeText(this.childByName(a,
"Duration")));d.skipDelay=this.parseSkipOffset(d,a);var h=this.parseVideoClicks(a);d.videoClickThroughURLTemplate=h.videoClickThroughURLTemplate;d.videoClickTrackingURLTemplates=d.videoClickTrackingURLTemplates.concat(h.videoClickTrackingURLTemplates);d.videoCustomClickURLTemplates=d.videoCustomClickURLTemplates.concat(h.videoCustomClickURLTemplates);d.trackingEvents=this.parseTrackingEvents(a);d.mediaFiles=d.mediaFiles.concat(this.parseMediaFiles(a));d.icons=d.icons.concat(this.parseIcons(a));if(h=
this.childByName(a,"AdParameters"))for(d.adParameters=this.parseNodeText(h),h=0;h<d.mediaFiles.length;h++)d.mediaFiles[h].adParameters=d.adParameters;return d};z.prototype.parseResourceAdType=function(a){for(var c={},d=this.childsByName(a,"HTMLResource"),h=0;h<d.length;h++){var e=d[h];c.type=e.getAttribute("creativeType")||"text/html";c.htmlResource=this.parseNodeText(e)}d=this.childsByName(a,"IFrameResource");for(h=0;h<d.length;h++)e=d[h],c.type=e.getAttribute("creativeType")||0,c.iframeResource=
this.parseNodeText(e);a=this.childsByName(a,"StaticResource");for(d=0;d<a.length;d++)h=a[d],c.type=h.getAttribute("creativeType")||0,c.staticResource=this.parseNodeText(h);return c};z.prototype.parseNonLinear=function(a,c){c=void 0===c?{}:c;var d=new g(c);d.trackingEvents=this.parseTrackingEvents(a);for(var h=this.childsByName(a,"NonLinear"),e=0;e<h.length;e++){var k=h[e],f=new p;f.id=k.getAttribute("id")||null;f.width=k.getAttribute("width");f.height=k.getAttribute("height");f.expandedWidth=k.getAttribute("expandedWidth");
f.expandedHeight=k.getAttribute("expandedHeight");f.scalable=this.parseBoolean(k.getAttribute("scalable"));f.maintainAspectRatio=this.parseBoolean(k.getAttribute("maintainAspectRatio"));f.minSuggestedDuration=k.getAttribute("minSuggestedDuration");f.apiFramework=k.getAttribute("apiFramework");var f=C.extend(f,this.parseResourceAdType(k)),q=this.childByName(k,"AdParameters");q&&(f.adParameters=this.parseNodeText(q));f.nonlinearClickThroughURLTemplate=this.parseNodeText(this.childByName(k,"NonLinearClickThrough"));
k=E.makeIterator(this.childsByName(k,"NonLinearClickTracking"));for(q=k.next();!q.done;q=k.next())f.nonlinearClickTrackingURLTemplates.push(this.parseNodeText(q.value));d.variations.push(f)}return d};z.prototype.parseCompanionAd=function(c,d){d=void 0===d?{}:d;for(var h=new m(d),e=this.childsByName(c,"Companion"),g=0;g<e.length;g++){var k=e[g],f=new a;f.id=k.getAttribute("id")||null;f.width=k.getAttribute("width");f.height=k.getAttribute("height");f.companionClickTrackingURLTemplates=[];for(var f=
C.extend(f,this.parseResourceAdType(k)),q=this.childsByName(k,"TrackingEvents"),r=0;r<q.length;r++)for(var n=this.childsByName(q[r],"Tracking"),l=0;l<n.length;l++){var p=n[l],u=p.getAttribute("event"),p=this.parseNodeText(p);u&&p&&(f.trackingEvents[u]||(f.trackingEvents[u]=[]),f.trackingEvents[u].push(p))}q=E.makeIterator(this.childsByName(k,"CompanionClickTracking"));for(r=q.next();!r.done;r=q.next())f.companionClickTrackingURLTemplates.push(this.parseNodeText(r.value));f.companionClickThroughURLTemplate=
this.parseNodeText(this.childByName(k,"CompanionClickThrough"));f.companionClickTrackingURLTemplate=this.parseNodeText(this.childByName(k,"CompanionClickTracking"));h.variations.push(f)}return h};z.prototype.parseCreativeAdIdAttribute=function(a){if(!a.hasAttributes())return null;a=Array.prototype.slice.call(a.attributes);for(var c=0;c<a.length;c++){var d=a[c];if(d&&d.name){var h=d.value;if("adid"===d.name.toLowerCase())return h}}return null};z.prototype.parseCreativeElement=function(a,c){for(var d=
this.childsByName(c,"Creative"),h=0;h<d.length;h++)for(var e=d[h],g=e.childNodes,e={id:e.getAttribute("id")||null,adId:this.parseCreativeAdIdAttribute(e),sequence:parseInt(e.getAttribute("sequence"),10),apiFramework:e.getAttribute("apiFramework")||null},k=0;k<g.length;k++){var f=g.item(k),q=null;switch(f.nodeName){case "Linear":q=this.parseCreativeLinearElement(f,e);break;case "NonLinearAds":q=this.parseNonLinear(f,e);break;case "CompanionAds":q=this.parseCompanionAd(f,e)}q&&a.creatives.push(q)}};
z.prototype.parseExtensionChild=function(a,c){for(var d=c.childNodes,h=0;h<d.length;h++){var e=d.item(h),g=this.parseNodeText(e);if("#comment"!==e.nodeName&&""!==g||e.attributes){var k=new u;k.name=e.nodeName;k.value=g;if(e.attributes)for(var g=e.attributes,f=0;f<g.length;f++){var q=g.item(f);k.attributes[q.nodeName]=q.nodeValue}e.childNodes&&0<e.childNodes.length&&this.parseExtensionChild(k.children,e);a.push(k)}}};z.prototype.parseExtension=function(a,h){for(var e=0;e<h.length;e++){var g=h[e],k=
new c;if(g.attributes)for(var f=g.attributes,q=0;q<f.length;q++){var m=f.item(q);k.attributes[m.nodeName]=m.nodeValue}this.parseExtensionChild(k.children,g);a.push(k)}};z.prototype.parseAdVerifications=function(a,c){for(var d=0;d<c.length;d++){var h=c[d],g=new e,k={};g.vendor=h.getAttribute("vendor")||null;var f=this.childByName(h,"JavaScriptResource");if(f&&(k.url=this.parseNodeText(f),k.apiFramework=f.getAttribute("apiFramework")||"VPAID",g.javascriptResource=k,(h=this.childByName(h,"AdParameters"))&&
h.hasChildNodes()))for(var q in h.childNodes)k=h.childNodes[q],k.nodeType===Node.ELEMENT_NODE&&(g.adParameters||(g.adParameters={}),g.adParameters[k.nodeName]=this.parseNodeText(k));a.push(g)}};z.prototype.parseInLineElement=function(a){var c=new l;c.id=a.getAttribute("id")||null;c.sequence=parseInt(a.getAttribute("sequence"),10);c.fallbackType=a.getAttribute("fallbackType")||"replace";c.fallbackOnNoAd=this.parseBoolean(a.getAttribute("fallbackOnNoAd"),!1);c.followAdditionalWrappers=this.parseBoolean(a.getAttribute("followAdditionalWrappers"),
!0);c.allowMultipleAds=this.parseBoolean(a.getAttribute("allowMultipleAds"),!1);a=a.childNodes;for(var d=0;d<a.length;d++){var h=a.item(d);switch(h.nodeName){case "Error":(h=this.parseNodeText(h))&&h.length&&c.errorURLTemplates.push(h);break;case "Impression":c.impressionURLTemplates.push(this.parseNodeText(h));break;case "AdVerifications":this.parseAdVerifications(c.adVerifications,this.childsByName(h,"Verification"));break;case "Creatives":this.parseCreativeElement(c,h);break;case "Extensions":this.parseExtension(c.extensions,
this.childsByName(h,"Extension"));break;case "AdSystem":c.system={value:this.parseNodeText(h),version:h.getAttribute("version")||null};break;case "AdTitle":c.title=this.parseNodeText(h);break;case "Description":c.description=this.parseNodeText(h);break;case "Advertiser":c.advertiser=this.parseNodeText(h);break;case "Pricing":c.pricing={value:this.parseNodeText(h),model:h.getAttribute("model")||null,currency:h.getAttribute("currency")||null};break;case "Survey":c.survey=this.parseNodeText(h)}}return c};
z.prototype.parseAdElement=function(a){for(var c=a.childNodes,d=0;d<c.length;d++){var h=c.item(d);if("Wrapper"===h.nodeName||"InLine"===h.nodeName){this.copyNodeAttribute("id",a,h);this.copyNodeAttribute("sequence",a,h);this.copyNodeAttribute("fallbackOnNoAd",a,h);this.copyNodeAttribute("fallbackType",a,h);this.copyNodeAttribute("followAdditionalWrappers",a,h);this.copyNodeAttribute("allowMultipleAds",a,h);if("Wrapper"===h.nodeName)return this.parseWrapperElement(h);if("InLine"===h.nodeName)return this.parseInLineElement(h)}}return null};
z.prototype.mergeWrapperAdData=function(a,c){a.wrappers=c.wrappers.concat(a.wrappers);a.errorURLTemplates=c.errorURLTemplates.concat(a.errorURLTemplates);a.impressionURLTemplates=c.impressionURLTemplates.concat(a.impressionURLTemplates);a.extensions=c.extensions.concat(a.extensions);a.adVerifications=c.adVerifications.concat(a.adVerifications);a.sequence=c.sequence;a.fallbackType=c.fallbackType;a.fallbackOnNoAd=c.fallbackOnNoAd||this.parseBoolean(a.fallbackOnNoAd,!1);a.followAdditionalWrappers=c.followAdditionalWrappers||
this.parseBoolean(a.followAdditionalWrappers,!0);a.allowMultipleAds=c.allowMultipleAds||this.parseBoolean(a.allowMultipleAds,!1);var d=c.creatives.filter(function(a){return"companion"===a.type}).shift(),h=a.creatives.filter(function(a){return"companion"===a.type}).shift();d&&h?h.variations=d.variations.concat(h.variations):d&&!h&&(h=new m,h.variations=d.variations.concat(h.variations),a.creatives.push(h));c.trackingEvents&&a.creatives.map(function(a){c.trackingEvents[a.type]&&Object.keys(c.trackingEvents[a.type]).map(function(d){a.trackingEvents[d]||
(a.trackingEvents[d]=[]);a.trackingEvents[d]=a.trackingEvents[d].concat(c.trackingEvents[a.type][d])})});a.creatives.map(function(a){c.creatives.map(function(c){a.icons=(a.icons||[]).concat(c.icons||[])})});c.videoClickTrackingURLTemplates&&a.creatives.map(function(a){"linear"===a.type&&(a.videoClickTrackingURLTemplates=a.videoClickTrackingURLTemplates.concat(c.videoClickTrackingURLTemplates))});c.videoClickThroughURLTemplate&&a.creatives.map(function(a){"linear"!==a.type||a.videoClickThroughURLTemplate||
(a.videoClickThroughURLTemplate=c.videoClickThroughURLTemplate)})};z.prototype.urlResponseHandler=function(a,c,d,h,e,g){function k(){for(var a=r.ads.length-1;0<=a;a--){var d=r.ads[a];if(d.nextWrapperURL){a=JSON.parse(JSON.stringify(d));d.VASTAdTagURI=c[1];d.wrappers.push(a);for(d=q.wrapperCallbackHandlers.length-1;0<=d;d--)(0,q.wrapperCallbackHandlers[d])(a,q.currentWrapperDepth);return}}f();0===m?0===r.ads.length?(q.trackError(r,r.errorURLTemplates,303),h(e,r)):(r.ads.filter(function(a){return!q.isBrokenAd(a)}).map(function(a){a.creatives.map(function(c){var d=
0<(c.mediaFiles||[]).filter(function(a){return!P.isSecureURL(a.fileURL)}).length;c=0<(c.variations||[]).filter(function(a){return!P.isSecureURL(a.fileURL)}).length;q.blockInsecureURL&&(d||c)&&(a.errorCode=405)})}),r.ads.map(function(a){var c=void 0;q.hasValidCreatives(a)||(c=400);q.isBrokenAd(a)&&(c=303);!isNaN(c)&&isNaN(a.errorCode)&&a.fetched&&(a.errorCode=c)}),q.handleFallbackOnNoAdFlag(r.ads),d=r.ads.filter(function(a){return!1===a.fetched&&!a.hasError}),0===r.ads.filter(function(a){return a.hasError&&
a.fallbackOnNoAd}).length&&(d=[]),a=function(){q.deleteNeedlessBuffetAds(r.ads);r.ads.map(function(a){a.hasError&&(a.creatives=[])});r.ads.sort(q.bySequence);1===r.ads.length&&r.ads[0].errorCode&&(0===r.errorURLTemplates.length?q.trackError(r,r.ads[0].errorURLTemplates,r.ads[0].errorCode):q.trackError(r,r.errorURLTemplates,r.ads[0].errorCode),r.ads.splice(0,1));h(e,r)},0<d.length?(d=d.shift(),a=r.ads.indexOf(d),d.fetch(function(a,c){0<c.ads.length&&(r.ads[a]=c.ads[0]);k()}.bind(q,a))):a()):h(e,r)}
function f(){0!==r.ads.length&&(r.ads.map(function(a){r.errorURLTemplates.map(function(c){-1===a.errorURLTemplates.indexOf(c)&&a.errorURLTemplates.push(c)})}),r.errorURLTemplates=[])}var q=this,m=this.currentWrapperDepth++;if(e)return h(e);delete d.response;var r=new D;if(!g||!g.documentElement||"VAST"!==g.documentElement.nodeName)return h();for(var n=0;n<g.documentElement.childNodes.length;n++){var p=g.documentElement.childNodes.item(n);"Error"===p.nodeName&&r.errorURLTemplates.push(this.parseNodeText(p))}for(n=
0;n<g.documentElement.childNodes.length;n++)p=g.documentElement.childNodes.item(n),"Ad"===p.nodeName&&((p=this.parseAdElement(p))?(p.url=p.nextWrapperURL?U.resolveAdTagURI(p.nextWrapperURL,a):a,p.fetched=!0,r.ads.push(p)):this.trackError(r,r.errorURLTemplates,101));g=r.ads.length;for(n={$jscomp$this$5:void 0};g--;)n.$jscomp$this$5=this,p=r.ads[g],p.nextWrapperURL&&(function(h){return function(e){if(c.length-1>=h.$jscomp$this$5.maxWrapperDepth||e.nextWrapperURL in c)e.errorCode=302,delete e.nextWrapperURL;
else if(e.followAdditionalWrappers){a&&(e.nextWrapperURL=U.resolveAdTagURI(e.nextWrapperURL,a));var g=function(a,d){delete e.nextWrapperURL;if(a)return e.errorCode=a.errorCode||301,a.message&&-1!==a.message.indexOf("Invalid URL")&&(e.errorCode=303),k();d&&d.errorURLTemplates&&(r.errorURLTemplates=r.errorURLTemplates.concat(d.errorURLTemplates));if(d&&0!==d.ads.length){var g=r.ads.indexOf(e);r.ads.splice(g,1);d.ads.map(function(a){return function(d){a.$jscomp$this$5.mergeWrapperAdData(d,e);d.VASTAdTagURI=
c[1];r.ads.splice(++g,0,d)}}(h))}else e.creatives=[];return k()},f=0<r.ads.filter(function(a){return!isNaN(a.sequence)}).length;isNaN(e.sequence)&&!d.prefetchBuffets&&f?(g=new D,e.fetched=!1,e.fetchURL=e.nextWrapperURL,delete e.nextWrapperURL,e.fetch=function(a){return function(h){a.$jscomp$this$5.parse(e.fetchURL,d,function(c,d){if(0<d.ads.length)d.ads.map(function(a){return function(c){a.$jscomp$this$5.mergeWrapperAdData(c,e);c.VASTAdTagURI=e.url}}(a));else{var g=new l;g.errorURLTemplates=e.errorURLTemplates.concat(d.errorURLTemplates);
g.errorCode=303;g.sequence=e.sequence;g.fetched=!0;g.fallbackOnNoAd=!0;d.ads.push(g)}h(d)},c)}}(h),g.ads.push(e)):h.$jscomp$this$5.parse(e.nextWrapperURL,d,g.bind(h.$jscomp$this$5),c)}else delete e.nextWrapperURL,h.$jscomp$this$5.isBrokenAd(e)&&isNaN(e.errorCode)&&(e.errorCode=303)}}(n)(p),n={$jscomp$this$5:n.$jscomp$this$5});return k()};z.prototype.handleFallbackOnNoAdFlag=function(a){var c=this;a.sort(this.bySequence);var d=a.filter(function(a){return isNaN(a.sequence)&&!c.isBrokenAd(a)}),h=a.filter(function(a){return c.isBrokenAd(a)&&
a.fallbackOnNoAd&&a.sequence&&!a.replaced}),e=a.filter(function(a){return a.fallbackOnNoAd&&a.sequence});if(0!==e.length){var g=parseInt(e[e.length-1].sequence,10);if(0===h.length)return this.deleteNeedlessBuffetAds(a);h.forEach(function(c){var h=d.shift();if(h){var e=a.indexOf(c);h.sequence=c.sequence+.1;c.fallbackType&&"waterfall"===c.fallbackType&&(e=a.indexOf(h),h.sequence=g++);c.replaced=!0;a.splice(e,h)}})}};z.prototype.deleteNeedlessBuffetAds=function(a){if(0!==a.length&&!isNaN(a[0].sequence))for(var c=
a.length;c--;)isNaN(a[c].sequence)&&a.splice(c,1)};z.prototype.bySequence=function(a,c){return a.sequence-c.sequence||(a.sequence||Infinity)-(c.sequence||Infinity)||0};z.prototype.hasValidCreatives=function(a){return 0<a.creatives.filter(function(a,c,d){c=a.mediaFiles&&0<a.mediaFiles.length;var h=a.variations&&0<a.variations.length;return 0<d.length&&(c||h)?h&&!c?0<a.variations.filter(function(a){return!0===a.hasCreative}).length:!0:!1}).length};z.prototype.isBrokenAd=function(a){return!a||a.hasError||
a.fetched&&!this.hasValidCreatives(a)};z.prototype.getClosestIndexOfNextValidAd=function(a,c){var d=this,h=Infinity;a.map(function(a,e){var g=Math.abs(h-c),k=Math.abs(e-c);!d.isBrokenAd(a)&&k<g&&e!==c&&(h=e)});return Infinity===h?-1:h};z.prototype.parse=function(a,c,d,h){c=void 0===c?{}:c;h=void 0===h?[]:h;var e=a;d=void 0===d?function(){}:d;var g=c;"function"===typeof c&&(d=c,g={});this.blockInsecureURL=g.blockInsecureURL||!1;this.maxWrapperDepth=g.maxWrapperDepth||10;for(c=this.URLTemplateFilters.length-
1;0<=c;c--)e=(0,this.URLTemplateFilters[c])(a);h.push(e);this.blockInsecureURL&&!P.isSecureURL(e)?d({errorCode:310,errorMessage:"Mixed Content: This request has been blocked; the ad-request must be served over HTTPS."},null):(new H).get(e,g,this.urlResponseHandler.bind(this,a,h,g,d))};window.VASTParser=z})()})();window.ois(function(c,f,l,p){function C(c,f){return Object.keys(c).filter(function(l){return f(l,c[l])}).reduce(function(f,l){return f[l]=c[l],f},{})}function J(c,f){if("Videoplaza"===f.attributes.name||"SXP"===f.attributes.name)return 1<=f.children.filter(function(f){if("AdInfo"===f.name&&f.attributes.hasOwnProperty("customaid")){var l=f.attributes.customaid;f.children.filter(function(f){if("Companions"===f.name)for(var p={b:void 0},v=0;v<f.children.length;p={b:p.b},v++){var P=f.children[v];p.b=
{zone:P.attributes.zone,id:P.attributes.id};if(P=c.creatives.filter(function(c){return"companion"===c.type}).shift())P.variations.filter(function(c){return function(f){return f.id===c.b.id}}(p)).shift().zone=p.b.zone,P.customaid=l.replace(/(^.*\[|\].*$)/g,"")}})}return!1}).length}function F(c){return Array.prototype.map.call(document.querySelectorAll(c.split("/").join("\\/")),function(c){return c})}c.subscribe(function(c,f){for(var l={a:void 0},G=0;G<f.variations.length;l={a:l.a},G++){var J=f.variations[G],
O=document.createElement("iframe");O.src=J.iframeResource;O.width=J.width;O.height=J.height;O.frameBorder=0;O.setAttribute("scrolling","no");O.setAttribute("margin","0");O.setAttribute("allowtransparency","true");l.a=C(J.trackingEvents,function(c){return-1!==["creativeView","impression","start"].indexOf(c)});O.onload=function(c){return function(){var f=p.adManager.trackingController(),l;for(l in c.a)({}).hasOwnProperty.call(c.a,l)&&f.callCustomTracker(c.a[l],"Companion"+l)}}(l);if(f.customaid){var v=
document.createElement("script");v.src=f.customaid;document.body.appendChild(v)}(J=F("#"+J.zone).shift())&&J.appendChild(O)}},"AdCompanionsDetected");c.subscribe(function(c,f){f&&f.extensions&&0<f.extensions.length&&f.extensions.filter(J.bind(this,f))},"AdLoaded")});
window.ois(function(c,f,l,p){function C(c,f){var l=f.extensions.filter(function(l){return"Videoplaza"===l.attributes.name||"SXP"===l.attributes.name?1<=l.children.filter(function(e){if("AdInfo"===e.name){f.info=f.info||{};for(var l in e.attributes)"variant"===l?f.variant=O[e.attributes[l].toUpperCase()]:f.info[l]=e.attributes[l];f.variant||(f.variant=T.NORMAL);if(f.variant.toUpperCase()===c.toUpperCase())return!0}return!1}).length:!1});f.variant&&f.variant!==T.NORMAL?l=1<=l.length:(f.variant=T.NORMAL,
l=f.variant.toUpperCase()===c.toUpperCase()?!0:!1);return l}function J(c){for(var f=U=0;f<c.length;f++){var l=c[f].creatives.filter(function(c){return"linear"===c.type}).shift();l&&!l.errorCode&&(U+=l.duration?l.duration:20)}0===U&&(U=-1)}function F(f,l){function v(a,b){b.info=b.info||{};b.info.c=a.toLowerCase();b.info.f=a.toLowerCase();b.info.g=a.toLowerCase();switch(a.toLowerCase()){case T.OPENER:l.ads.unshift(b);break;case T.CLOSER:l.ads.push(b);break;case T.PREBUMPER:var c=l.ads.findIndex(C.bind(this,
T.BUMPER));if(-1!==c){if(0===c&&(c=l.ads.findIndex(C.bind(this,T.NORMAL)),-1===c))break;l.ads.splice(c,0,b)}}}c.unsubscribe(F,"AdTagParsed");if(0!==l.ads.length){var H=l.ads.filter(C.bind(this,T.NORMAL));l.ads.filter(C.bind(this,T.BUMPER));J(H);var e=p.adManager.getAdConfig(),t={hls:"application/x-mpegURL",progressive:"video/mp4",dash:"application/dash+xml",webm:"video/webm",ogg:"video/ogg"};if(l.ads.filter(function(a){return!a.hasError}).shift()){for(var h in T){var q=T[h];if(e[q]){var r=JSON.parse(JSON.stringify(Z));
r.variant=q;r.id=q;for(var b in e[q])if(t.hasOwnProperty(b)){var d=JSON.parse(JSON.stringify(G));d.fileURL=e[q][b];d.mimeType=t[b];r.creatives[0].mediaFiles.push(d);v(q,r)}}}var a=0,k=0,B=l.ads.length;l.ads.forEach(function(b,c){k++;b.sequence=""+(c+1);b.info=b.info||{};b.info.currentClip=k;b.info.totalClips=B;b.info.currentCommercial=-1;b.info.totalCommercials=H.length;b.info.totalCommercialsDuration=U;b.variant&&b.variant!==T.NORMAL||(a++,b.info.currentCommercial=a)})}}}function R(){c.getVariant()===
T.NORMAL&&P!==parseInt(this.duration,10)&&0<U&&(U=U-P+this.duration)}function S(){c.getVariant()===T.NORMAL&&(K=isNaN(K)?0:K,W=U-(K+H.currentTime))}var T=c.VARIANTS={PREBUMPER:"bumper",OPENER:"opener",CLOSER:"closer",NORMAL:"commercial",BUMPER:"sponsored"},G={apiFramework:null,bitrate:731,codec:null,deliveryType:"progressive",fileURL:"",height:360,id:null,maintainAspectRatio:!0,maxBitrate:0,mimeType:"video/mp4",minBitrate:0,scalable:!0,width:640},Z={creatives:[{adParameters:null,duration:20,icons:[],
mediaFiles:[],skipDelay:null,trackingEvents:{},type:"linear",videoClickThroughURLTemplate:"",videoClickTrackingURLTemplates:[],videoCustomClickURLTemplates:[]}],errorURLTemplates:[],extensions:[],id:"xxx",impressionURLTemplates:[],sequence:"0",info:{currentCommercial:-1,totalCommercials:-1,totalCommercialsDuration:-1,offset:0}},O={NORMAL:T.NORMAL,BUMPER:T.BUMPER},v=null,P=-1,U=-1,W=-1,K=-1,H=null;c.subscribe(F,"AdTagParsed");c.subscribe(function(c,f){v=f;P=f.creatives[0].duration},"AdLoaded");c.subscribe(function(f,
l){c.getVariant()===T.NORMAL&&l&&!l.errorCode&&(K+=H.duration)},"AdStopped");c.subscribe(function(){K=0;W=U;H=c.getVideoSlot();H.addEventListener("loadedmetadata",R);H.addEventListener("timeupdate",S)},"AdSlotStart");c.subscribe(function(){c.subscribe(F,"AdTagParsed");H&&(H.removeEventListener("loadedmetadata",R),H.removeEventListener("timeupdate",S))},"AdSlotComplete");c.getVariant=function(){return v&&v.variant?v.variant:T.NORMAL};c.getSlotRemainingTime=function(){return W};c.getSlotDuration=function(){return U};
Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(c,f){if(null==this)throw new TypeError('"this" is null or not defined');var l=Object(this),p=l.length>>>0;if("function"!==typeof c)throw new TypeError("predicate must be a function");for(var e=0;e<p;){if(c.call(f,l[e],e,l))return e;e++}return-1}})});(window.ElementLocator=function Ib(f,l){function p(f,e){return"undefined"===typeof f?e:f}function C(){}function J(f){for(var e=[];f.parentNode;)if(null!==f.getAttribute("id")){e.unshift("#"+f.getAttribute("id"));break}else{if(f===f.ownerDocument.documentElement)e.unshift(f.tagName.toLowerCase());else{for(var l=f,h=1,h=1;l.previousElementSibling;h++)l=l.previousElementSibling;e.unshift(f.tagName.toLowerCase()+":nth-child("+h+")")}f=f.parentNode}return e.join(">")}function F(){if(!H)return null;var f=
Array.prototype.slice.call(u.querySelectorAll("img")),e={};Array.prototype.slice.call(u.querySelectorAll("p")).forEach(function(f){var h=J(f.parentNode);e[h]=e[h]||{a:0,height:0};e[h].a+=1;e[h].height+=f.getBoundingClientRect().height;e[h].node=f.parentNode});f.forEach(function(f){for(var h=f;h.parentNode;){var q=J(h.parentNode);if(e[q]){e[q].a+=1;e[q].height+=f.getBoundingClientRect().height;break}h=h.parentNode}});return(f=Object.keys(e).sort(function(f,h){return e[h].height-e[f].height}))&&0<f.length?
e[f[0]]:null}function R(f,e){var l=f.getBoundingClientRect(),h=e.getBoundingClientRect();return l.top<h.top?-1:l.top>h.top?1:0}function S(){var f=F();V("located content block",f);var e=0,l=null,h=["div","p","section"].map(function(a){return 0<W.length?a+W.split("/").join("\\/"):a}),q=u.body.getBoundingClientRect(),r=u;f&&(r=f.node);f=Array.prototype.slice.call(r.querySelectorAll(h.join(",")));[].sort.call(f,R);if(0<W.length&&1===f.length)return V("only located one element based on",W,"stopping further checks"),
f[0];U&&(O=D+O,D=0);h=[];V("elements found in the content block",f);for(r=0;r<f.length;r++){var b=f[r].getBoundingClientRect(),b=f[r].offsetTop||b.top-q.top,d=f[r].offsetWidth;d<=v?V("skipping element",f[r],"because it does not match height or is smaller than",v):b>D&&b<D+O&&(V(f[r],"in close inspection"),d>=e&&(e=d,h.push(f[r]),V("selected",f[r],e,d)))}0<h.length&&(l=h[Math.floor(h.length/2)],V("suitableElements collected",h,"and in the end",l,"selected"));return l}var T={},G=p(l,{}),Z=p(f,Ib.b),
O=p(G.scanPixelsBelowViewport,600),v=p(G.minimumElementWidth,320),P=p(G.elementFloat,"none"),U=p(G.allowInViewport,!1),W=p(G.elementSelector,""),K=p(G.insertPosition,"afterend"),H=p(G.locateContent,!0),D=0,u=document,V=(p(G.debug,!1)?console.log:C||C).bind(console,"[ElementLocator (unversioned-dev)]");T.c=function(){return"unversioned-dev"};(function(){for(var f=window.frameElement,e=window;f;)e=f.ownerDocument.defaultView,f=e.frameElement;u=e.document;D=u.documentElement.clientHeight;(f=S())?(e=
u.createElement("div"),e.setAttribute("id",Z),e.style.cssFloat=P,f.insertAdjacentHTML?f.insertAdjacentHTML(K,e.outerHTML):f.appendChild(e),T.element=f,T.container=u.querySelector("#"+e.getAttribute("id")),T.containerId=e.getAttribute("id")):(V("could not locate a suitable element, bailing"),V("innerHeight",D,"options",l))})();return T}).b=window.ElementLocator.generateRandomID=function(){return"sc-"+Math.random().toString(36).substring(7)};(function(c,f,l,p){function C(a,b,c){return setTimeout(T(a,c),b)}function J(a,b,c){return Array.isArray(a)?(F(a,c[b],c),!0):!1}function F(a,b,c){var d;if(a)if(a.forEach)a.forEach(b,c);else if(a.length!==p)for(d=0;d<a.length;)b.call(c,a[d],d,a),d++;else for(d in a)a.hasOwnProperty(d)&&b.call(c,a[d],d,a)}function R(a,b,d){var h="DEPRECATED METHOD: "+b+"\n"+d+" AT \n";return function(){var b=Error("get-stack-trace"),b=b&&b.stack?b.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,
"{anonymous}()@"):"Unknown Stack Trace",d=c.console&&(c.console.warn||c.console.log);d&&d.call(c.console,h,b);return a.apply(this,arguments)}}function S(a,b,c){b=b.prototype;var d;d=a.prototype=Object.create(b);d.constructor=a;d._super=b;c&&M(d,c)}function T(a,b){return function(){return a.apply(b,arguments)}}function G(a,b){return"function"==typeof a?a.apply(b?b[0]||p:p,b):a}function Z(a,b,c){F(P(b),function(b){a.addEventListener(b,c,!1)})}function O(a,b,c){F(P(b),function(b){a.removeEventListener(b,
c,!1)})}function v(a,b){for(;a;){if(a==b)return!0;a=a.parentNode}return!1}function P(a){return a.trim().split(/\s+/g)}function U(a,b,c){if(a.indexOf&&!c)return a.indexOf(b);for(var d=0;d<a.length;){if(c&&a[d][c]==b||!c&&a[d]===b)return d;d++}return-1}function W(a){return Array.prototype.slice.call(a,0)}function K(a,b,c){for(var d=[],h=[],e=0;e<a.length;){var g=b?a[e][b]:a[e];0>U(h,g)&&d.push(a[e]);h[e]=g;e++}c&&(d=b?d.sort(function(a,c){return a[b]>c[b]}):d.sort());return d}function H(a,b){for(var c,
d=b[0].toUpperCase()+b.slice(1),h=0;h<ga.length;){c=(c=ga[h])?c+d:b;if(c in a)return c;h++}return p}function D(a){a=a.ownerDocument||a;return a.defaultView||a.parentWindow||c}function u(a,b){var c=this;this.manager=a;this.callback=b;this.element=a.element;this.target=a.options.inputTarget;this.domHandler=function(b){G(a.options.enable,[a])&&c.handler(b)};this.init()}function V(a){var c=a.options.inputClass;return new (c?c:yb?d:Ra?k:lb?x:b)(a,I)}function I(a,b,c){var d,g,k=c.pointers.length,f=c.changedPointers.length;
d=b&1&&0===k-f;c.isFirst=!!d;c.isFinal=!!(b&12&&0===k-f);d&&(a.session={});c.eventType=b;b=a.session;k=c.pointers;f=k.length;b.firstInput||(b.firstInput=e(c));1<f&&!b.firstMultiple?b.firstMultiple=e(c):1===f&&(b.firstMultiple=!1);d=b.firstInput;g=(f=b.firstMultiple)?f.center:d.center;var m=c.center=t(k);c.timeStamp=Y();c.deltaTime=c.timeStamp-d.timeStamp;c.angle=r(g,m);c.distance=q(g,m);d=c.center;g=b.offsetDelta||{};var m=b.prevDelta||{},l=b.prevInput||{};if(1===c.eventType||4===l.eventType)m=b.prevDelta=
{x:l.deltaX||0,y:l.deltaY||0},g=b.offsetDelta={x:d.x,y:d.y};c.deltaX=m.x+(d.x-g.x);c.deltaY=m.y+(d.y-g.y);c.offsetDirection=h(c.deltaX,c.deltaY);g=c.deltaTime;d=c.deltaX/g||0;g=c.deltaY/g||0;c.overallVelocityX=d;c.overallVelocityY=g;c.overallVelocity=ba(d)>ba(g)?d:g;f?(d=f.pointers,d=q(k[0],k[1],za)/q(d[0],d[1],za)):d=1;c.scale=d;f?(f=f.pointers,k=r(k[1],k[0],za)+r(f[1],f[0],za)):k=0;c.rotation=k;c.maxPointers=b.prevInput?c.pointers.length>b.prevInput.maxPointers?c.pointers.length:b.prevInput.maxPointers:
c.pointers.length;g=b.lastInterval||c;k=c.timeStamp-g.timeStamp;8!=c.eventType&&(25<k||g.velocity===p)?(d=c.deltaX-g.deltaX,g=c.deltaY-g.deltaY,m=d/k||0,l=g/k||0,k=m,f=l,m=ba(m)>ba(l)?m:l,d=h(d,g),b.lastInterval=c):(m=g.velocity,k=g.velocityX,f=g.velocityY,d=g.direction);c.velocity=m;c.velocityX=k;c.velocityY=f;c.direction=d;b=a.element;v(c.srcEvent.target,b)&&(b=c.srcEvent.target);c.target=b;a.emit("hammer.input",c);a.recognize(c);a.session.prevInput=c}function e(a){for(var b=[],c=0;c<a.pointers.length;)b[c]=
{clientX:La(a.pointers[c].clientX),clientY:La(a.pointers[c].clientY)},c++;return{timeStamp:Y(),pointers:b,center:t(b),deltaX:a.deltaX,deltaY:a.deltaY}}function t(a){var b=a.length;if(1===b)return{x:La(a[0].clientX),y:La(a[0].clientY)};for(var c=0,d=0,h=0;h<b;)c+=a[h].clientX,d+=a[h].clientY,h++;return{x:La(c/b),y:La(d/b)}}function h(a,b){return a===b?1:ba(a)>=ba(b)?0>a?2:4:0>b?8:16}function q(a,b,c){c||(c=Ia);var d=b[c[0]]-a[c[0]];a=b[c[1]]-a[c[1]];return Math.sqrt(d*d+a*a)}function r(a,b,c){c||(c=
Ia);return 180*Math.atan2(b[c[1]]-a[c[1]],b[c[0]]-a[c[0]])/Math.PI}function b(){this.evEl=na;this.evWin=ka;this.pressed=!1;u.apply(this,arguments)}function d(){this.evEl=sa;this.evWin=ia;u.apply(this,arguments);this.store=this.manager.session.pointerEvents=[]}function a(){this.evTarget="touchstart";this.evWin="touchstart touchmove touchend touchcancel";this.started=!1;u.apply(this,arguments)}function k(){this.evTarget=ta;this.targetIds={};u.apply(this,arguments)}function B(a,b){var c=W(a.touches),
d=this.targetIds;if(b&3&&1===c.length)return d[c[0].identifier]=!0,[c,c];var h,e=W(a.changedTouches),g=[],k=this.target;h=c.filter(function(a){return v(a.target,k)});if(1===b)for(c=0;c<h.length;)d[h[c].identifier]=!0,c++;for(c=0;c<e.length;)d[e[c].identifier]&&g.push(e[c]),b&12&&delete d[e[c].identifier],c++;if(g.length)return[K(h.concat(g),"identifier",!0),g]}function x(){u.apply(this,arguments);var a=T(this.handler,this);this.touch=new k(this.manager,a);this.mouse=new b(this.manager,a);this.primaryTouch=
null;this.lastTouches=[]}function fa(a){a=a.changedPointers[0];if(a.identifier===this.primaryTouch){var b={x:a.clientX,y:a.clientY};this.lastTouches.push(b);var c=this.lastTouches;setTimeout(function(){var a=c.indexOf(b);-1<a&&c.splice(a,1)},2500)}}function n(a,b){this.manager=a;this.set(b)}function g(a){if(-1<a.indexOf("none"))return"none";var b=-1<a.indexOf("pan-x"),c=-1<a.indexOf("pan-y");return b&&c?"none":b||c?b?"pan-x":"pan-y":-1<a.indexOf("manipulation")?"manipulation":"auto"}function m(a){this.options=
M({},this.defaults,a||{});this.id=L++;this.manager=null;a=this.options.enable;this.options.enable=a===p?!0:a;this.state=1;this.simultaneous={};this.requireFail=[]}function pa(a){return a&16?"cancel":a&8?"end":a&4?"move":a&2?"start":""}function y(a){return 16==a?"down":8==a?"up":2==a?"left":4==a?"right":""}function ca(a,b){var c=b.manager;return c?c.get(a):a}function X(){m.apply(this,arguments)}function w(){X.apply(this,arguments);this.pY=this.pX=null}function $a(){X.apply(this,arguments)}function ab(){m.apply(this,
arguments);this._input=this._timer=null}function bb(){X.apply(this,arguments)}function aa(){X.apply(this,arguments)}function z(){m.apply(this,arguments);this.pCenter=this.pTime=!1;this._input=this._timer=null;this.count=0}function E(a,b){b=b||{};var c=b.recognizers;b.recognizers=c===p?E.defaults.preset:c;return new Ka(a,b)}function Ka(a,b){this.options=M({},E.defaults,b||{});this.options.inputTarget=this.options.inputTarget||a;this.handlers={};this.session={};this.recognizers=[];this.oldCssProps=
{};this.element=a;this.input=V(this);this.touchAction=new n(this,this.options.touchAction);kb(this,!0);F(this.options.recognizers,function(a){var b=this.add(new a[0](a[1]));a[2]&&b.recognizeWith(a[2]);a[3]&&b.requireFailure(a[3])},this)}function kb(a,b){var c=a.element;if(c.style){var d;F(a.options.cssProps,function(h,e){d=H(c.style,e);b?(a.oldCssProps[d]=c.style[d],c.style[d]=h):c.style[d]=a.oldCssProps[d]||""});b||(a.oldCssProps={})}}function xb(a,b){var c=f.createEvent("Event");c.initEvent(a,!0,
!0);c.gesture=b;b.target.dispatchEvent(c)}var ga=" webkit Moz MS ms o".split(" ");l=f.createElement("div");var La=Math.round,ba=Math.abs,Y=Date.now,M;M="function"!==typeof Object.assign?function(a){if(a===p||null===a)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(a),c=1;c<arguments.length;c++){var d=arguments[c];if(d!==p&&null!==d)for(var h in d)d.hasOwnProperty(h)&&(b[h]=d[h])}return b}:Object.assign;var N=R(function(a,b,c){for(var d=Object.keys(b),h=0;h<d.length;){if(!c||
c&&a[d[h]]===p)a[d[h]]=b[d[h]];h++}return a},"extend","Use `assign`."),A=R(function(a,b){return N(a,b,!0)},"merge","Use `assign`."),L=1,oa=/mobile|tablet|ip(ad|hone|od)|android/i,lb="ontouchstart"in c,yb=H(c,"PointerEvent")!==p,Ra=lb&&oa.test(navigator.userAgent),Ia=["x","y"],za=["clientX","clientY"];u.prototype={handler:function(){},init:function(){this.evEl&&Z(this.element,this.evEl,this.domHandler);this.evTarget&&Z(this.target,this.evTarget,this.domHandler);this.evWin&&Z(D(this.element),this.evWin,
this.domHandler)},destroy:function(){this.evEl&&O(this.element,this.evEl,this.domHandler);this.evTarget&&O(this.target,this.evTarget,this.domHandler);this.evWin&&O(D(this.element),this.evWin,this.domHandler)}};var Ea={mousedown:1,mousemove:2,mouseup:4},na="mousedown",ka="mousemove mouseup";S(b,u,{handler:function(a){var b=Ea[a.type];b&1&&0===a.button&&(this.pressed=!0);b&2&&1!==a.which&&(b=4);this.pressed&&(b&4&&(this.pressed=!1),this.callback(this.manager,b,{pointers:[a],changedPointers:[a],pointerType:"mouse",
srcEvent:a}))}});var va={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},ma={2:"touch",3:"pen",4:"mouse",5:"kinect"},sa="pointerdown",ia="pointermove pointerup pointercancel";c.MSPointerEvent&&!c.PointerEvent&&(sa="MSPointerDown",ia="MSPointerMove MSPointerUp MSPointerCancel");S(d,u,{handler:function(a){var b=this.store,c=!1,d=a.type.toLowerCase().replace("ms",""),d=va[d],h=ma[a.pointerType]||a.pointerType,e="touch"==h,g=U(b,a.pointerId,"pointerId");d&1&&(0===a.button||e)?0>
g&&(b.push(a),g=b.length-1):d&12&&(c=!0);0>g||(b[g]=a,this.callback(this.manager,d,{pointers:b,changedPointers:[a],pointerType:h,srcEvent:a}),c&&b.splice(g,1))}});var la={touchstart:1,touchmove:2,touchend:4,touchcancel:8};S(a,u,{handler:function(a){var b=la[a.type];1===b&&(this.started=!0);if(this.started){var c;c=W(a.touches);var d=W(a.changedTouches);b&12&&(c=K(c.concat(d),"identifier",!0));c=[c,d];b&12&&0===c[0].length-c[1].length&&(this.started=!1);this.callback(this.manager,b,{pointers:c[0],
changedPointers:c[1],pointerType:"touch",srcEvent:a})}}});var ya={touchstart:1,touchmove:2,touchend:4,touchcancel:8},ta="touchstart touchmove touchend touchcancel";S(k,u,{handler:function(a){var b=ya[a.type],c=B.call(this,a,b);c&&this.callback(this.manager,b,{pointers:c[0],changedPointers:c[1],pointerType:"touch",srcEvent:a})}});S(x,u,{handler:function(a,b,c){var d="touch"==c.pointerType,h="mouse"==c.pointerType;if(!(h&&c.sourceCapabilities&&c.sourceCapabilities.firesTouchEvents)){if(d)b&1?(this.primaryTouch=
c.changedPointers[0].identifier,fa.call(this,c)):b&12&&fa.call(this,c);else{if(d=h)a:{for(var d=c.srcEvent.clientX,h=c.srcEvent.clientY,e=0;e<this.lastTouches.length;e++){var g=this.lastTouches[e],k=Math.abs(h-g.y);if(25>=Math.abs(d-g.x)&&25>=k){d=!0;break a}}d=!1}if(d)return}this.callback(a,b,c)}},destroy:function(){this.touch.destroy();this.mouse.destroy()}});var qa=H(l.style,"touchAction"),ra=qa!==p,ja=function(){if(!ra)return!1;var a={},b=c.CSS&&c.CSS.supports;"auto;manipulation;pan-y;pan-x;pan-x pan-y;none".split(";").forEach(function(d){a[d]=
b?c.CSS.supports("touch-action",d):!0});return a}();n.prototype={set:function(a){"compute"==a&&(a=this.compute());ra&&this.manager.element.style&&ja[a]&&(this.manager.element.style[qa]=a);this.actions=a.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var a=[];F(this.manager.recognizers,function(b){G(b.options.enable,[b])&&(a=a.concat(b.getTouchAction()))});return g(a.join(" "))},preventDefaults:function(a){var b=a.srcEvent,c=a.offsetDirection;
if(this.manager.session.prevented)b.preventDefault();else{var d=this.actions,h=-1<d.indexOf("none")&&!ja.none,e=-1<d.indexOf("pan-y")&&!ja["pan-y"],d=-1<d.indexOf("pan-x")&&!ja["pan-x"];if(h){var g=2>a.distance,k=250>a.deltaTime;if(1===a.pointers.length&&g&&k)return}if(!d||!e)if(h||e&&c&6||d&&c&24)return this.preventSrc(b)}},preventSrc:function(a){this.manager.session.prevented=!0;a.preventDefault()}};m.prototype={defaults:{},set:function(a){M(this.options,a);this.manager&&this.manager.touchAction.update();
return this},recognizeWith:function(a){if(J(a,"recognizeWith",this))return this;var b=this.simultaneous;a=ca(a,this);b[a.id]||(b[a.id]=a,a.recognizeWith(this));return this},dropRecognizeWith:function(a){if(J(a,"dropRecognizeWith",this))return this;a=ca(a,this);delete this.simultaneous[a.id];return this},requireFailure:function(a){if(J(a,"requireFailure",this))return this;var b=this.requireFail;a=ca(a,this);-1===U(b,a)&&(b.push(a),a.requireFailure(this));return this},dropRequireFailure:function(a){if(J(a,
"dropRequireFailure",this))return this;a=ca(a,this);a=U(this.requireFail,a);-1<a&&this.requireFail.splice(a,1);return this},hasRequireFailures:function(){return 0<this.requireFail.length},canRecognizeWith:function(a){return!!this.simultaneous[a.id]},emit:function(a){function b(d){c.manager.emit(d,a)}var c=this,d=this.state;8>d&&b(c.options.event+pa(d));b(c.options.event);a.additionalEvent&&b(a.additionalEvent);8<=d&&b(c.options.event+pa(d))},tryEmit:function(a){if(this.canEmit())return this.emit(a);
this.state=32},canEmit:function(){for(var a=0;a<this.requireFail.length;){if(!(this.requireFail[a].state&33))return!1;a++}return!0},recognize:function(a){a=M({},a);G(this.options.enable,[this,a])?(this.state&56&&(this.state=1),this.state=this.process(a),this.state&30&&this.tryEmit(a)):(this.reset(),this.state=32)},process:function(){},getTouchAction:function(){},reset:function(){}};S(X,m,{defaults:{pointers:1},attrTest:function(a){var b=this.options.pointers;return 0===b||a.pointers.length===b},process:function(a){var b=
this.state,c=a.eventType,d=b&6;a=this.attrTest(a);return d&&(c&8||!a)?b|16:d||a?c&4?b|8:b&2?b|4:2:32}});S(w,X,{defaults:{event:"pan",threshold:10,pointers:1,direction:30},getTouchAction:function(){var a=this.options.direction,b=[];a&6&&b.push("pan-y");a&24&&b.push("pan-x");return b},directionTest:function(a){var b=this.options,c=!0,d=a.distance,h=a.direction,e=a.deltaX,g=a.deltaY;h&b.direction||(b.direction&6?(h=0===e?1:0>e?2:4,c=e!=this.pX,d=Math.abs(a.deltaX)):(h=0===g?1:0>g?8:16,c=g!=this.pY,d=
Math.abs(a.deltaY)));a.direction=h;return c&&d>b.threshold&&h&b.direction},attrTest:function(a){return X.prototype.attrTest.call(this,a)&&(this.state&2||!(this.state&2)&&this.directionTest(a))},emit:function(a){this.pX=a.deltaX;this.pY=a.deltaY;var b=y(a.direction);b&&(a.additionalEvent=this.options.event+b);this._super.emit.call(this,a)}});S($a,X,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return["none"]},attrTest:function(a){return this._super.attrTest.call(this,a)&&
(Math.abs(a.scale-1)>this.options.threshold||this.state&2)},emit:function(a){1!==a.scale&&(a.additionalEvent=this.options.event+(1>a.scale?"in":"out"));this._super.emit.call(this,a)}});S(ab,m,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return["auto"]},process:function(a){var b=this.options,c=a.pointers.length===b.pointers,d=a.distance<b.threshold,h=a.deltaTime>b.time;this._input=a;if(!d||!c||a.eventType&12&&!h)this.reset();else if(a.eventType&1)this.reset(),
this._timer=C(function(){this.state=8;this.tryEmit()},b.time,this);else if(a.eventType&4)return 8;return 32},reset:function(){clearTimeout(this._timer)},emit:function(a){8===this.state&&(a&&a.eventType&4?this.manager.emit(this.options.event+"up",a):(this._input.timeStamp=Y(),this.manager.emit(this.options.event,this._input)))}});S(bb,X,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return["none"]},attrTest:function(a){return this._super.attrTest.call(this,a)&&(Math.abs(a.rotation)>
this.options.threshold||this.state&2)}});S(aa,X,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return w.prototype.getTouchAction.call(this)},attrTest:function(a){var b=this.options.direction,c;b&30?c=a.overallVelocity:b&6?c=a.overallVelocityX:b&24&&(c=a.overallVelocityY);return this._super.attrTest.call(this,a)&&b&a.offsetDirection&&a.distance>this.options.threshold&&a.maxPointers==this.options.pointers&&ba(c)>this.options.velocity&&a.eventType&
4},emit:function(a){var b=y(a.offsetDirection);b&&this.manager.emit(this.options.event+b,a);this.manager.emit(this.options.event,a)}});S(z,m,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return["manipulation"]},process:function(a){var b=this.options,c=a.pointers.length===b.pointers,d=a.distance<b.threshold,h=a.deltaTime<b.time;this.reset();if(a.eventType&1&&0===this.count)return this.failTimeout();if(d&&h&&c){if(4!=a.eventType)return this.failTimeout();
c=this.pTime?a.timeStamp-this.pTime<b.interval:!0;d=!this.pCenter||q(this.pCenter,a.center)<b.posThreshold;this.pTime=a.timeStamp;this.pCenter=a.center;this.count=d&&c?this.count+1:1;this._input=a;if(0===this.count%b.taps)return this.hasRequireFailures()?(this._timer=C(function(){this.state=8;this.tryEmit()},b.interval,this),2):8}return 32},failTimeout:function(){this._timer=C(function(){this.state=32},this.options.interval,this);return 32},reset:function(){clearTimeout(this._timer)},emit:function(){8==
this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}});E.VERSION="2.0.7";E.defaults={domEvents:!1,touchAction:"compute",enable:!0,inputTarget:null,inputClass:null,preset:[[bb,{enable:!1}],[$a,{enable:!1},["rotate"]],[aa,{direction:6}],[w,{direction:6},["swipe"]],[z],[z,{event:"doubletap",taps:2},["tap"]],[ab]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};Ka.prototype=
{set:function(a){M(this.options,a);a.touchAction&&this.touchAction.update();a.inputTarget&&(this.input.destroy(),this.input.target=a.inputTarget,this.input.init());return this},stop:function(a){this.session.stopped=a?2:1},recognize:function(a){var b=this.session;if(!b.stopped){this.touchAction.preventDefaults(a);var c,d=this.recognizers,h=b.curRecognizer;if(!h||h&&h.state&8)h=b.curRecognizer=null;for(var e=0;e<d.length;)c=d[e],2===b.stopped||h&&c!=h&&!c.canRecognizeWith(h)?c.reset():c.recognize(a),
!h&&c.state&14&&(h=b.curRecognizer=c),e++}},get:function(a){if(a instanceof m)return a;for(var b=this.recognizers,c=0;c<b.length;c++)if(b[c].options.event==a)return b[c];return null},add:function(a){if(J(a,"add",this))return this;var b=this.get(a.options.event);b&&this.remove(b);this.recognizers.push(a);a.manager=this;this.touchAction.update();return a},remove:function(a){if(J(a,"remove",this))return this;if(a=this.get(a)){var b=this.recognizers;a=U(b,a);-1!==a&&(b.splice(a,1),this.touchAction.update())}return this},
on:function(a,b){if(a!==p&&b!==p){var c=this.handlers;F(P(a),function(a){c[a]=c[a]||[];c[a].push(b)});return this}},off:function(a,b){if(a!==p){var c=this.handlers;F(P(a),function(a){b?c[a]&&c[a].splice(U(c[a],b),1):delete c[a]});return this}},emit:function(a,b){this.options.domEvents&&xb(a,b);var c=this.handlers[a]&&this.handlers[a].slice();if(c&&c.length){b.type=a;b.preventDefault=function(){b.srcEvent.preventDefault()};for(var d=0;d<c.length;)c[d](b),d++}},destroy:function(){this.element&&kb(this,
!1);this.handlers={};this.session={};this.input.destroy();this.element=null}};M(E,{INPUT_START:1,INPUT_MOVE:2,INPUT_END:4,INPUT_CANCEL:8,STATE_POSSIBLE:1,STATE_BEGAN:2,STATE_CHANGED:4,STATE_ENDED:8,STATE_RECOGNIZED:8,STATE_CANCELLED:16,STATE_FAILED:32,DIRECTION_NONE:1,DIRECTION_LEFT:2,DIRECTION_RIGHT:4,DIRECTION_UP:8,DIRECTION_DOWN:16,DIRECTION_HORIZONTAL:6,DIRECTION_VERTICAL:24,DIRECTION_ALL:30,Manager:Ka,Input:u,TouchAction:n,TouchInput:k,MouseInput:b,PointerEventInput:d,TouchMouseInput:x,SingleTouchInput:a,
Recognizer:m,AttrRecognizer:X,Tap:z,Pan:w,Swipe:aa,Pinch:$a,Rotate:bb,Press:ab,on:Z,off:O,each:F,merge:A,extend:N,assign:M,inherit:S,bindFn:T,prefixed:H});("undefined"!==typeof c?c:"undefined"!==typeof self?self:{}).Hammer=E})(window,document,"Hammer");
(function(){function c(c,f){var l={},p=Infinity,v=void 0;l.isSticky=!1;l.isStickyTop=!1;l.isStickyBottom=!1;l.$placeHolder=!1;l.init=function(){p=Infinity;l.isSticky=!1;v=setInterval(l.onScroll,16)};l.onChange=function(){};l.onStartScroll=function(){};l.addPlaceHolder=function(){var c=G.elements.iframe.contentWindow.document.body.querySelector("video");l.$placeHolder=document.createElement("canvas");l.$placeHolder.width=G.size.width;l.$placeHolder.height=G.size.height;l.$placeHolder.style.cssText=
"position:absolute;";l.$placeHolder.getContext("2d").drawImage(c,0,0,G.size.width,G.size.height);c=G.elements.backdrop.parentNode.style.transitionDuration;G.elements.backdrop.parentNode.style.transitionDuration="0s";G.elements.backdrop.parentNode.style.paddingBottom=parseInt(S.$placeHolder.height,10)-parseInt(G.size.height,10)+"px";G.elements.backdrop.parentNode.style.transitionDuration=c;G.elements.backdrop.insertAdjacentElement("afterend",l.$placeHolder)};l.removePlaceHolder=function(){l.$placeHolder&&
(l.$placeHolder.parentNode.removeChild(l.$placeHolder),G.elements.backdrop.parentNode.style.paddingBottom="0px");l.$placeHolder=!1};l.enter=function(){f.style.position="fixed";l.$placeHolder||l.addPlaceHolder();Z?(G.elements.iframe.style.left=c.getBoundingClientRect().left+"px",l.isStickyTop?(f.style.top=0,f.style.bottom="auto"):(f.style.bottom=0,f.style.top="auto")):(G.elements.iframe.style.top="auto",G.elements.iframe.style.left="auto",G.elements.iframe.style.bottom=R.sticky.marginBottom,G.elements.iframe.style.right=
R.sticky.marginRight)};l.leave=function(){f.style.transition="none";f.style.position="relative";f.style.top="auto";f.style.bottom="auto";G.elements.iframe.style.left="auto";G.elements.iframe.style.right="auto"};l.onScroll=function(){var f=c.getBoundingClientRect().top,e=c.getBoundingClientRect().bottom,t=document.documentElement.clientHeight;p!==f&&(p=f,l.onStartScroll(),!l.isSticky&&("top"===R.sticky.position||"both"===R.sticky.position)&&0>=f&&!l.isStickyTop||("bottom"===R.sticky.position||"both"===
R.sticky.position)&&e>=t&&!l.isStickyBottom?(l.isSticky=!0,l.isStickyTop=0>=f,l.isStickyBottom=!l.isStickyTop,l.enter()):("bottom"===R.sticky.position||"both"===R.sticky.position)&&e<t&&l.isStickyBottom&&(l.isSticky=!1,l.isStickyTop=!1,l.isStickyBottom=!1,l.leave()),l.onChange(l.isSticky))};l.shutdown=function(){clearInterval(v)};l.init();return l}function f(c,f,l){function p(){e||(v.onSwipeFinal(),e=!0)}var v={},C=void 0,e=!1;v.isShuttingDown=!1;v.isEnabled=!0;v.enable=function(){v.isEnabled=!0};
v.disable=function(){v.isEnabled=!1};v.init=function(){C=new Hammer(c);C.on("tap",function(c){v.onTap(c)});C.on("panleft panright",v.onSwipe);C.on("panend",v.onSwipeEnd);e=!1;v.isShuttingDown=!1};v.resetPosition=function(){v.isShuttingDown||(f.style.transition="none",f.style.transform="translateX(0)")};v.onTap=function(){};v.onSwipeFinal=function(){};v.onSwipe=function(c){if(v.isEnabled&&S.isSticky&&(v.isShuttingDown||(f.style.transition="none",f.style.transform="translateX("+c.deltaX+"px)"),l/100*
66<Math.abs(c.deltaX))){f.addEventListener("transitionend",p);v.isShuttingDown=!0;f.style.transition="transform .5s ease-in-out";var h=window.innerWidth;f.style.transform=0<c.deltaX?"translateX("+h+"px)":"translateX("+-h+"px)"}};v.onSwipeEnd=function(){v.isShuttingDown||(f.style.transition="transform .5s ease-in-out",f.style.transform="translateX(0)")};v.shutdown=function(){W&&(W.style.zIndex="auto",W.style.overflow="auto");f&&(f.style.transform="translateX(0)",f.style.transition="transform .5s ease-in-out");
C.off("tap");C.off("panleft panright");C.off("panend");f&&f.removeEventListener("transitionend",p)};v.init();return v}function l(){var l={},p=void 0;W=G.elements.iframe.parentNode;O=G.publisherConfig.behaviourMatrix.offScreen.paused;v=G.publisherConfig.behaviourMatrix.offScreen.muted;P=G.elements.iframe.contentDocument.body.style.background;U=G.size.width+"px";l.init=function(){if(R.sticky.enabled){S=new c(G.elements.backdrop,G.elements.iframe);W.style.zIndex=9999;W.style.textAlign="start";W.style.overflow=
"visible";var l=G.elements.iframe.contentWindow.document.body.querySelector("#click-slot");l&&(l.style.cursor="pointer");S.onStartScroll=function(){p&&(p.resetPosition(),p.disable())};S.onChange=function(c){!Z&&c&&(500<G.size.width&&(G.elements.backdrop.parentNode.style.transitionDuration="0s",G.elements.backdrop.parentNode.style.width=c?"500px":U),S.$placeHolder&&(G.elements.backdrop.parentNode.style.transitionDuration="0s",G.elements.backdrop.parentNode.style.paddingBottom=parseInt(S.$placeHolder.height,
10)-parseInt(G.size.height,10)+"px"),J(c));c?(G.publisherConfig.behaviourMatrix.offScreen.paused=!1,G.publisherConfig.visibilityThreshold=-1,G.publisherConfig.requiredVisibility=-1,T.getAdVolume()&&!G.environmentVars.muted&&(G.publisherConfig.behaviourMatrix.offScreen.muted=!1,G.publisherConfig.behaviourMatrix.onScreen.muted=!1)):(G.publisherConfig.behaviourMatrix.offScreen.paused=!0,G.publisherConfig.behaviourMatrix.offScreen.muted=!0);p&&p.enable()}}R.swipeable.enabled&&(G.elements.iframe.contentDocument.body.style.background=
"transparent",p=new f(G.elements.iframe.contentWindow.document.body.querySelector("#slots-wrapper"),G.elements.iframe.contentDocument.body,W.getBoundingClientRect().width),p.onSwipeFinal=function(){T.skipAd()})};l.shutdown=function(){G.publisherConfig.behaviourMatrix.offScreen.paused=O;G.publisherConfig.behaviourMatrix.offScreen.muted=v;G.elements.iframe.contentDocument.body.style.background=P;G.elements.backdrop.parentNode.style.width="";G.elements.backdrop.parentNode.style.height="";G.elements.iframe.style.left=
"auto";J(!1);p&&p.shutdown();S&&(S.leave(),S.shutdown())};l.init();return l}function p(){var c=void 0;F.extensions.map(function(f){"SmartPlayConfig"===f.attributes.name&&f.children.map(function(f){"featureMatrix"===f.name&&f.children.map(function(f){c||(c={});c[f.name]=f.attributes})})});return C(c)}function C(c){if(c){c.sticky||(c.sticky={});c.sticky.enabled="true"===(c.sticky.enabled+"").toLowerCase();c.swipeable.enabled="true"===(c.swipeable.enabled+"").toLowerCase();T.adManager.isVPAID()&&(c.swipeable.enabled=
!1);Z||(c.swipeable.enabled=!1);c.sticky.marginBottom=parseInt(c.sticky.marginBottom,10);c.sticky.marginBottom=(Number.isFinite(c.sticky.marginBottom)?c.sticky.marginBottom:100)+"px";c.sticky.marginRight=parseInt(c.sticky.marginRight,10);c.sticky.marginRight=(Number.isFinite(c.sticky.marginRight)?c.sticky.marginRight:30)+"px";switch((c.sticky.position+"").toLowerCase()){case "bottom":c.sticky.position="bottom";break;case "both":c.sticky.position="both";break;default:c.sticky.position="top"}return c}}
function J(c){var f=G.elements.iframeDocument.querySelector("#skip");c?(G.publisherConfig.skipOffset&&0>G.publisherConfig.skipOffset&&(G.publisherConfig.skipOffset=6),f.classList.add("active")):f.classList.remove("active")}var F=void 0,R,S=void 0,T,G,Z=/mobile/i.test(navigator.userAgent),O=void 0,v=void 0,P=void 0,U=void 0,W=void 0;window.ois(function(c){var f=void 0;T=c;T.subscribe(function(){S&&S.removePlaceHolder();f&&f.shutdown()},"AdStopped");T.subscribe(function(c,f){F=f;R=p()},"AdLoaded");
T.subscribe(function(){R&&window.SmartPlay(function(c){G=c;f=new l})},"AdVideoStart")})})();window.ois(function(c){function f(c,f){v=f;O=[];O=l();O=O.concat(p());O=O.filter(function(c){return 0<c.javascriptResource.url.length});0!==O.length&&(J(),F())}function l(){return v&&v.adVerifications?v.adVerifications.filter(function(c){return"meetrics"===(c.vendor+"").toLowerCase()&&c.javascriptResource&&0<(c.javascriptResource.url+"").length}):[]}function p(){var c=[];v&&v.extensions&&v.extensions.map(function(f){"smartadverifications"===(f.attributes.name+"").toLowerCase()&&f.children.map(function(f){"meetrics"===
(f.attributes.vendor+"").toLowerCase()&&c.push({vendor:f.attributes.vendor,javascriptResource:{url:f.value}})})});return c}function C(){T("AdSizeChange")}function J(){Z.map(function(f){return c.subscribe(T,f)});c.getVideoSlot().addEventListener("fullscreenchange",C);c.getVideoSlot().addEventListener("mozfullscreenchange",C);c.getVideoSlot().addEventListener("webkitfullscreenchange",C)}function F(){O.map(function(c,f){var l=c.javascriptResource.url,p="";0===(l+"").toLowerCase().indexOf("//")&&(p="file:"===
location.protocol?"https:":location.protocol);R(p+l,f)})}function R(c,f){var l=document.createElement("iframe");l.style.cssText="width:0;height:0;top:0;left:0;position:absolute;overflow:hidden;border:none; visibility:hidden";l.id="adverificationloaderframe"+f;document.body.appendChild(l);l.contentWindow.document.write('<script src="'+c+'">\x3c/script>');isNaN(O[f].c)&&(O[f].c=5);(function H(){l&&l.contentWindow.vendorAdapter&&l.contentWindow.vendorAdapter.getAPI&&"function"===typeof l.contentWindow.vendorAdapter.getAPI?
(O[f].f=l,O[f].contentWindow=l.contentWindow,S(f)):0<O[f].c--&&setTimeout(H,100)})()}function S(f){var l=O[f];l.api=l.contentWindow.vendorAdapter.getAPI();l.b=l.api.handshakeVersion("1.0.0");0!==l.b.indexOf("1.")?(console.warn(">> Meetrics.js::initAdVerificationAdapter() - adapter",f,"has handshake",l.b,"does not match ours","1.0.0"),l.isValidHandshake=!1):(l.isValidHandshake=!0,l.api.subscribe("VendorReady",function(){l.api.getInstructions()}),f=c.getSlot(),c.adManager.isVPAID()||document.body.appendChild(f),
l.api.initService({vendorData:{},slots:{slot:f,videoSlot:c.getPlayerSlot()},timeout:500}))}function T(f){var l={type:f,timestamp:(new Date).getTime(),data:{adData:{viewMode:"normal",adWidth:c.utils.getWidth(),adVolume:c.getAdMutedState()?0:c.getAdVolume(),adSkippableState:!1,adRemainingTime:c.getAdRemainingTime(),remainingTime:c.getAdRemainingTime(),adLinear:"linear"===(v.creatives[0].type||"").toLowerCase(),adHeight:c.utils.getHeight(),adExpanded:!1,adDuration:c.getAdDuration()},eventData:{}}};switch(f){case "AdInteraction":l.data.eventData.Id=
"";break;case "AdError":l.data.eventData.message="";break;case "AdClickThru":l.data.eventData.url="";l.data.eventData.Id="";l.data.eventData.playerHandles="";break;case "AdStopped":G()}O.map(function(c){c.a||(c.a=[]);c.api&&c.isValidHandshake?(0<c.a.length&&(c.a.map(function(f){c.api.update(f)}),c.a=[]),c.api.update(l)):c.a.push(l)})}function G(){c.getVideoSlot()&&(c.getVideoSlot().removeEventListener("fullscreenchange",C),c.getVideoSlot().removeEventListener("mozfullscreenchange",C),c.getVideoSlot().removeEventListener("webkitfullscreenchange",
C));Z.map(function(f){c.unsubscribe(T,f)})}var Z="AdLoaded AdStarted AdStopped AdSkipped AdSkippableStateChange AdSizeChange AdLinearChange AdDurationChange AdExpandedChange AdRemainingTimeChange AdVolumeChange AdImpression AdVideoStart AdVideoFirstQuartile AdVideoMidpoint AdVideoThirdQuartile AdVideoComplete AdClickThru AdInteraction AdUserAcceptInvitation AdUserMinimize AdUserClose AdPaused AdPlaying AdLog AdError".split(" "),O=void 0,v=void 0;c.getVideoSlot&&c.subscribe(f,"AdLoaded")});window.ois(function(c,f,l,p){function C(c,f){p.config.adVerification.meetrics&&(v=[],W=f,P=J())&&(T(),F())}function J(){if(W&&W.adVerifications)return W.adVerifications.filter(function(c){return"meetrics"===(c.vendor+"").toLowerCase()&&c.javascriptResource&&0<(c.javascriptResource.url+"").length})[0]}function F(){var c=P.javascriptResource.url+"&meetricsDebug=true",f=document.createElement("iframe");f.style="width:0;height:0;top:0;left:0;position:absolute;overflow:hidden;border:none; visibility:hidden";
f.id="adverificationloaderframe";document.body.appendChild(f);f.contentWindow.document.write('<script src="'+c+'">\x3c/script>');var l=setInterval(function(){f.contentWindow&&f.contentWindow.vendorAdapter&&f.contentWindow.vendorAdapter.getAPI&&"function"===typeof f.contentWindow.vendorAdapter.getAPI&&(clearInterval(l),U=f.contentWindow.vendorAdapter.getAPI(),R())},20)}function R(){var f=U.handshakeVersion("1.0.0");console.info(">> Meetrics.js::initAdVerificationAdapter() - handshakeVersion:",f);0!==
f.indexOf("1.")?Z():(U.subscribe("VendorReady",function(){U.getInstructions()}),f=c.getSlot(),c.adManager.isVPAID()||document.body.appendChild(f),U.initService({vendorData:{},slots:{slot:f,videoSlot:c.getVideoSlot()},timeout:500}),c.getVideoSlot().addEventListener("fullscreenchange",S),c.getVideoSlot().addEventListener("mozfullscreenchange",S),c.getVideoSlot().addEventListener("webkitfullscreenchange",S))}function S(){G("AdSizeChange")}function T(){O.map(function(f){return c.subscribe(G,f)})}function G(f,
l){var p={type:f,timestamp:(new Date).getTime(),data:{adData:{viewMode:"normal",adWidth:c.utils.getWidth(),adVolume:c.getAdVolume(),adSkippableState:!1,adRemainingTime:c.getAdRemainingTime(),remainingTime:c.getAdRemainingTime(),adLinear:"linear"===(W.creatives[0].type||"").toLowerCase(),adHeight:c.utils.getHeight(),adExpanded:!1,adDuration:c.getAdDuration()},eventData:{}}};switch(f){case "AdInteraction":p.data.eventData.Id="";break;case "AdError":p.data.eventData.message="";break;case "AdClickThru":p.data.eventData.url=
"";p.data.eventData.Id="";p.data.eventData.playerHandles="";break;case "AdStopped":Z()}"AdRemainingTimeChange"!==f&&"AdDurationChange"!==f&&console.warn(">> Meetrics.js::()",p,l);U?(0<v.length&&(v.map(function(c){U.update(c)}),v=[]),U.update(p)):v.push(p)}function Z(){console.info(">> Meetrics.js::dispose()");O.map(function(f){c.unsubscribe(G,f)});v=[];U=P=null}var O="AdLoaded AdStarted AdStopped AdSkipped AdSkippableStateChange AdSizeChange AdLinearChange AdDurationChange AdExpandedChange AdRemainingTimeChange AdVolumeChange AdImpression AdVideoStart AdVideoFirstQuartile AdVideoMidpoint AdVideoThirdQuartile AdVideoComplete AdClickThru AdInteraction AdUserAcceptInvitation AdUserMinimize AdUserClose AdPaused AdPlaying AdLog AdError".split(" "),
v=void 0,P=void 0,U=void 0,W=void 0;c.getVideoSlot&&c.subscribe(C,"AdLoaded")});window.ois(function(c){function f(c,f){Z=f;O=[];O=l();O=O.concat(p());0!==O.length&&(J(),F())}function l(){return Z&&Z.adVerifications?Z.adVerifications.filter(function(c){return"moat"===(c.vendor+"").toLowerCase()&&c.javascriptResource&&0<(c.javascriptResource.url+"").length&&c.adParameters&&C(c.adParameters)}):[]}function p(){var c=[];Z&&Z.extensions&&Z.extensions.map(function(f){"smartadverifications"===(f.attributes.name+"").toLowerCase()&&f.children.map(function(f){if("moat"===(f.attributes.vendor+
"").toLowerCase()){var l=f.children.map(function(c){if("AdParameters"===c.name){var f={};c.children.map(function(c){f[c.name]=c.value});return f}}).filter(function(c){return c&&C(c)})[0],p=f.children.map(function(c){if("JavaScriptResource"===c.name)return c.value}).filter(function(c){return!!c})[0];l&&p&&c.push({vendor:f.attributes.vendor,javascriptResource:{url:p},adParameters:l})}})});return c}function C(c){var f=["PartnerCode","Advertiser","Campaign","LineItem","Creative"];return f.filter(function(f){return c[f]&&
0<(c[f]+"").length}).length===f.length}function J(){G.map(function(f){return c.subscribe(S,f)})}function F(){O.map(function(c,f){var l=c.javascriptResource.url,p="";0===(l+"").toLowerCase().indexOf("//")&&(p="file:"===location.protocol?"https:":location.protocol);R(p+l,f)})}function R(f,l){var p=document.createElement("iframe");p.style.cssText="width:0;height:0;top:0;left:0;position:absolute;overflow:hidden;border:none; visibility:hidden";p.id="adverificationMoat"+l;document.body.appendChild(p);p.contentWindow.document.write('<script src="'+
f+'">\x3c/script>');(function K(){if(p&&p.contentWindow.initMoatTracking){O[l].c=p;O[l].contentWindow=p.contentWindow;var f=c.getPlayerSlot();O[l].b=O[l].contentWindow.initMoatTracking(f,{level1:O[l].adParameters.Advertiser,level2:O[l].adParameters.Campaign,level3:O[l].adParameters.LineItem,level4:O[l].adParameters.Creative,slicer1:O[l].adParameters.Site,slicer2:O[l].adParameters.Placement},Z.creatives[0].duration,O[l].adParameters.PartnerCode,void 0)}else setTimeout(K,100)})()}function S(f){var l=
{type:f,adVolume:c.getAdMutedState()?0:c.getAdVolume()};O.map(function(c){c.a||(c.a=[]);c.b?(0<c.a.length&&(c.a.map(function(f){c.b.dispatchEvent(f)}),c.a=[]),c.b.dispatchEvent(l)):c.a.push(l)});"AdVideoComplete"===f&&T()}function T(){G.map(function(f){c.unsubscribe(S,f)});O=null}var G="AdStopped AdVideoStart AdVideoFirstQuartile AdVideoMidpoint AdVideoThirdQuartile AdVideoComplete AdPaused AdPlaying AdVolumeChange".split(" "),Z=void 0,O=[];c.getVideoSlot&&c.subscribe(f,"AdLoaded")});(function(){function c(){this.attributes={};this.children=[]}function f(){this.id=null;this.height=this.width=0;this.companionClickThroughURLTemplate=this.iframeResource=this.htmlResource=this.staticResource=this.type=null;this.trackingEvents={}}function l(){this.program=null;this.yPosition=this.xPosition=this.width=this.height=0;this.offset=this.apiFramework=null;this.duration=0;this.iconClickThroughURLTemplate=this.iframeResource=this.htmlResource=this.staticResource=this.type=null;this.iconClickTrackingURLTemplates=
[];this.iconViewTrackingURLTemplate=null}function p(){this.viewableImpression=this.flashResource=this.javascriptResource=this.vendor=null}function C(){this.fileURL=this.id=null;this.deliveryType="progressive";this.codec=this.mimeType=null;this.height=this.width=this.maxBitrate=this.minBitrate=this.bitrate=0;this.maintainAspectRatio=this.scalable=this.apiFramework=null}function J(c){c=void 0===c?{}:c;this.id=c.id||null;this.adId=c.adId||null;this.sequence=c.sequence||null;this.apiFramework=c.apiFramework||
null;this.trackingEvents={}}function F(c){c=void 0===c?{}:c;J.call(this,c);this.type="linear";this.duration=0;this.skipDelay=null;this.mediaFiles=[];this.videoClickThroughURLTemplate=null;this.videoClickTrackingURLTemplates=[];this.videoCustomClickURLTemplates=[];this.adParameters=null;this.icons=[]}function R(c){c=void 0===c?{}:c;J.call(this,c);this.type="nonlinear";this.variations=[];this.videoClickTrackingURLTemplates=[]}function S(c){c=void 0===c?{}:c;J.call(this,c);this.type="companion";this.variations=
[];this.videoClickTrackingURLTemplates=[]}function T(){this.survey=this.pricing=this.advertiser=this.description=this.title=this.system=this.sequence=this.id=this.url=null;this.errorURLTemplates=[];this.impressionURLTemplates=[];this.creatives=[];this.extensions=[];this.adVerifications=[];this.wrappers=[];this.fetch=function(){};this.fetched=!1}function G(){this.id=null;this.expandedHeight=this.expandedWidth=this.height=this.width=0;this.maintainAspectRatio=this.scalable=!0;this.minSuggestedDuration=
0;this.apiFramework="static";this.nonlinearClickThroughURLTemplate=this.iframeResource=this.htmlResource=this.staticResource=this.type=null;this.nonlinearClickTrackingURLTemplates=[];this.adParameters=null}function Z(){this.value=this.name=null;this.attributes={};this.children=[]}function O(c){var e=[];e.forEach.call(e.slice.call(arguments,1),function(e){if(e)for(var b in e)({}).hasOwnProperty.call(e,b)&&(c[b]="object"===typeof c[b]&&"object"===typeof e[b]&&null!==e[b]?O(c[b],e[b]):e[b])});return c}
function v(){this.ads=[];this.errorURLTemplates=[]}function P(){}function U(){}function W(){}function K(){}function H(){this.maxWrapperDepth=10;this.blockInsecureURL=!1;this.currentWrapperDepth=0;this.URLTemplateFilters=[];this.wrapperCallbackHandlers=[];t.EventDispatcher.prototype.apply(this)}var D={scope:{},getGlobal:function(c){return"undefined"!=typeof window&&window===c?c:"undefined"!=typeof global?global:c}};D.global=D.getGlobal(this);D.initSymbol=function(){D.global.Symbol||(D.global.Symbol=
D.Symbol);D.initSymbol=function(){}};D.symbolCounter_=0;D.Symbol=function(c){return"jscomp_symbol_"+c+D.symbolCounter_++};D.initSymbolIterator=function(){D.initSymbol();D.global.Symbol.iterator||(D.global.Symbol.iterator=D.global.Symbol("iterator"));D.initSymbolIterator=function(){}};D.makeIterator=function(c){D.initSymbolIterator();if(c[D.global.Symbol.iterator])return c[D.global.Symbol.iterator]();if(!(c instanceof Array||"string"==typeof c||c instanceof String))throw new TypeError(c+" is not iterable");
var e=0;return{next:function(){return e==c.length?{done:!0}:{done:!1,value:c[e++]}}}};D.arrayFromIterator=function(c){for(var e,f=[];!(e=c.next()).done;)f.push(e.value);return f};D.arrayFromIterable=function(c){return c instanceof Array?c:D.arrayFromIterator(D.makeIterator(c))};D.arrayFromArguments=function(c){for(var e=[],f=0;f<c.length;f++)e.push(c[f]);return e};D.inherits=function(c,e){function f(){}f.prototype=e.prototype;c.prototype=new f;c.prototype.constructor=c;for(var b in e)if(D.global.Object.defineProperties){var d=
D.global.Object.getOwnPropertyDescriptor(e,b);void 0!==d&&D.global.Object.defineProperty(c,b,d)}else c[b]=e[b]};Object.defineProperties(f.prototype,{hasCreatives:{configurable:!0,enumerable:!0,get:function(){return this.staticResource||this.htmlResource||this.iframeResource}}});D.inherits(F,J);D.inherits(R,J);D.inherits(S,J);Object.defineProperties(T.prototype,{hasError:{configurable:!0,enumerable:!0,get:function(){return!isNaN(this.errorCode)}}});var u={isSecureURL:function(c){return"https:"===window.location.protocol&&
0!==(c+"").indexOf("http://")||"https:"!==window.location.protocol}},V={};V.extend=O;var I={resolveAdTagURI:function(c,e){if(0===c.indexOf("//")){var f=location.protocol;"file:"===f&&(f="https:");return f+c}return-1===c.indexOf("://")?e.slice(0,e.lastIndexOf("/"))+"/"+c:c}},e={stringToXML:function(c){if("string"===typeof c===!1)return c;var e=null;window.DOMParser?e=(new DOMParser).parseFromString(c,"text/xml"):(e=new ActiveXObject("Microsoft.XMLDOM"),e.loadXML(c));return e}};P.prototype.xdr=function(){return window.XDomainRequest?
new window.XDomainRequest:null};P.supported=function(){return!!(new P).xdr()};P.prototype.get=function(c,e,f){if("function"!==typeof window.ActiveXObject)f();else{var b=new window.ActiveXObject("b");b.async=!1;xdr=this.xdr();xdr.open("GET",c);xdr.timeout=e.timeout||0;xdr.withCredentials=!1!==e.withCredentials;xdr.onprogress=function(){};xdr.onload=function(){b.loadXML(xdr.responseText);f(null,b)};xdr.send()}};U.prototype.xhr=function(){var c=new window.XMLHttpRequest;return"withCredentials"in c?c:
null};U.supported=function(){return!!(new U).xhr()};U.prototype.get=function(c,f,l){try{var b=this,d=this.xhr();d.open("GET",c);d.timeout=f.timeout||0;d.withCredentials=!1!==f.withCredentials;d.overrideMimeType&&d.overrideMimeType("text/xml");d.onreadystatechange=function(){if(4===d.readyState)if(200===d.status){var a=d.responseXML;!a&&d.responseText&&(a=e.stringToXML(d.responseText));a?l(null,a):(d.statusText="Response contains neither 'responseXML' nor 'responseText'",l(Error("XHRURLHandler: "+
d.statusText)))}else 0===d.status&&d.withCredentials?(a=JSON.parse(JSON.stringify(f)),a.withCredentials=!1,b.get(c,a,l)):l(Error("XHRURLHandler: "+d.statusText))};d.send()}catch(a){l(a)}};W.prototype.get=function(c,f,l){var b=l,d=f;l||("function"===typeof f&&(b=f),d={});if(!b)return null;f=d.urlhandler;if(d.response)b(null,e.stringToXML(d.response));else return f&&f.supported()?(new f).get(c,d,b):U.supported()?(new U).get(c,d,b):P.supported()?(new P).get(c,d,b):b();return null};var t={};K.prototype=
{constructor:K,apply:function(c){c.addEventListener=K.prototype.addEventListener;c.hasEventListener=K.prototype.hasEventListener;c.removeEventListener=K.prototype.removeEventListener;c.dispatchEvent=K.prototype.dispatchEvent},addEventListener:function(c,e){this._listeners||(this._listeners={});var f=this._listeners;f[c]||(f[c]=[]);-1===f[c].indexOf(e)&&f[c].push(e)},hasEventListener:function(c,e){if(!this._listeners)return!1;var f=this._listeners;return f[c]&&-1!==f[c].indexOf(e)?!0:!1},removeEventListener:function(c,
e){if(this._listeners){var f=this._listeners[c];if(f){var b=f.indexOf(e);-1!==b&&f.splice(b,1)}}},dispatchEvent:function(c){if(this._listeners){var e=this._listeners[c];if(e){for(var f=e.length,b=[],d=0,d=0;d<f;d++)b[d]=e[d];for(e=0;e<f;e++)(b[e]||function(){}).apply(this,[].slice.call(arguments,1))}}}};t.EventDispatcher=K;H.prototype.trackError=function(c,e,f,b){this.dispatchEvent("VAST-error",{response:JSON.parse(JSON.stringify(c)),errorCode:f,errorURLTemplates:e,silent:b})};H.prototype.addURLTemplateFilter=
function(c){"function"===typeof c&&this.URLTemplateFilters.push(c)};H.prototype.removeURLTemplateFilter=function(){return this.URLTemplateFilters.pop()};H.prototype.countURLTemplateFilters=function(){return this.URLTemplateFilters.length};H.prototype.clearUrlTemplateFilters=function(){this.URLTemplateFilters=[]};H.prototype.addWrapperCallbackHandler=function(c){"function"===typeof c&&this.wrapperCallbackHandlers.push(c)};H.prototype.removeWrapperCallbackHandler=function(){return this.wrapperCallbackHandlers.pop()};
H.prototype.countWrapperCallbackHandlers=function(){return this.wrapperCallbackHandlers.length};H.prototype.clearWrapperCallbackHandlers=function(){this.wrapperCallbackHandlers=[]};H.prototype.parseXPosition=function(c){return-1!==["left","right"].indexOf(c)?c:parseInt(c,10)||0};H.prototype.parseYPosition=function(c){return-1!==["top","bottom"].indexOf(c)?c:parseInt(c,10)||0};H.prototype.parseNodeText=function(c){return c&&(c.textContent||c.text||"").trim()};H.prototype.copyNodeAttribute=function(c,
e,f){(e=e.getAttribute(c))&&f.setAttribute(c,e)};H.prototype.parseDuration=function(c){if(!c)return-1;if(isNaN(parseFloat(c))&&isFinite(c))return parseInt(c,10);var e=c.split(":");if(3!==e.length)return-1;var f=e[2].split(".");c=parseInt(f[0],10);2===f.length&&(c+=parseFloat("0."+f[1]));f=parseInt(60*e[1],10);e=parseInt(3600*e[0],10);return isNaN(e)||isNaN(f)||isNaN(c)||3600<f||60<c?-1:e+f+c};H.prototype.parseBoolean=function(c,e){return-1<["true","1"].indexOf((c+"").toLowerCase())?!0:-1<["false",
"0"].indexOf((c+"").toLowerCase())?!1:e||!1};H.prototype.childByName=function(c,e){for(var f=0;f<c.childNodes.length;f++){var b=c.childNodes.item(f);if(b.nodeName===e)return b}return null};H.prototype.childsByName=function(c,e){for(var f=[],b=0;b<c.childNodes.length;b++){var d=c.childNodes.item(b);d.nodeName===e&&f.push(d)}return f};H.prototype.parseNextWrapperURL=function(c){var e=null,f=this.childByName(c,"VASTAdTagURI");f?e=this.parseNodeText(f):(f=this.childByName(c,"VASTAdTagURL"))&&(e=this.parseNodeText(this.childByName(f,
"URL")));return e};H.prototype.parseWrapperElement=function(c){var e=this.parseInLineElement(c);e.nextWrapperURL=this.parseNextWrapperURL(c);e.videoClickTrackingURLTemplates||(e.videoClickTrackingURLTemplates=[]);e.videoCustomClickURLTemplates||(e.videoCustomClickURLTemplates=[]);c=e.creatives;for(var f=0;f<c.length;f++){var b=c[f],d=null;if("linear"===b.type||"nonlinear"===b.type)if(d=b)d.trackingEvents&&(e.trackingEvents||(e.trackingEvents={}),e.trackingEvents[d.type]=d.trackingEvents),d.videoClickTrackingURLTemplates&&
(e.videoClickTrackingURLTemplates=d.videoClickTrackingURLTemplates.concat(e.videoClickTrackingURLTemplates)),d.videoClickThroughURLTemplate&&(e.videoClickThroughURLTemplate=d.videoClickThroughURLTemplate),d.videoCustomClickURLTemplates&&(e.videoCustomClickURLTemplates=d.videoCustomClickURLTemplates.concat(e.videoCustomClickURLTemplates))}return e.nextWrapperURL?e:null};H.prototype.parseSkipOffset=function(c,e){var f=null;(f=e.getAttribute("skipoffset"))?"%"===f.charAt(f.length-1)&&-1!==c.duration?
(percent=parseInt(f,10),f=percent/100*c.duration):f=this.parseDuration(f):f=null;return f};H.prototype.parseVideoClicks=function(c){var e={videoClickTrackingURLTemplates:[],videoCustomClickURLTemplates:[]};if(c=this.childByName(c,"VideoClicks")){e.videoClickThroughURLTemplate=this.parseNodeText(this.childByName(c,"ClickThrough"));for(var f=this.childsByName(c,"ClickTracking"),b=0;b<f.length;b++)e.videoClickTrackingURLTemplates.push(this.parseNodeText(f[b]));c=this.childsByName(c,"CustomClick");for(f=
0;f<c.length;f++)e.videoCustomClickURLTemplates.push(this.parseNodeText(c[f]))}return e};H.prototype.parseTrackingEvents=function(c){var e={};c=this.childsByName(c,"TrackingEvents");for(var f=0;f<c.length;f++)for(var b=this.childsByName(c[f],"Tracking"),d=0;d<b.length;d++){var a=b[d],k=a.getAttribute("event"),l=this.parseNodeText(a);if(k&&l){if("progress"===k){a=a.getAttribute("offset");if(!a)continue;k="%"===a.charAt(a.length-1)?"progress-"+a:"progress-"+Math.round(this.parseDuration(a))}e[k]||(e[k]=
[]);e[k].push(l)}}return e};H.prototype.parseMediaFileScalable=function(c){return(c=c.getAttribute("scalable"))&&"string"===typeof c&&(c=c.toLowerCase(),"false"===c)?!1:!0};H.prototype.parseMediaFileMaintainAspectRatio=function(c){return(c=c.getAttribute("maintainAspectRatio"))&&"string"===typeof c&&(c=c.toLowerCase(),"false"===c)?!1:!0};H.prototype.parseMediaFiles=function(c){var e=[];c=this.childsByName(c,"MediaFiles");for(var f=0;f<c.length;f++)for(var b=this.childsByName(c[f],"MediaFile"),d=0;d<
b.length;d++){var a=b[d],k=new C;k.id=a.getAttribute("id");k.fileURL=this.parseNodeText(a);k.deliveryType=a.getAttribute("delivery");k.codec=a.getAttribute("codec");k.mimeType=a.getAttribute("type");k.apiFramework=a.getAttribute("apiFramework");k.bitrate=parseInt(a.getAttribute("bitrate")||0,10);k.minBitrate=parseInt(a.getAttribute("minBitrate")||0,10);k.maxBitrate=parseInt(a.getAttribute("maxBitrate")||0,10);k.width=parseInt(a.getAttribute("width")||0,10);k.height=parseInt(a.getAttribute("height")||
0,10);k.scalable=this.parseMediaFileScalable(a);k.maintainAspectRatio=this.parseMediaFileMaintainAspectRatio(a);e.push(k)}return e};H.prototype.parseIcons=function(c){var e=[];if(c=this.childByName(c,"Icons")){c=this.childsByName(c,"Icon");for(var f=0;f<c.length;f++){var b=c[f],d=new l;d.program=b.getAttribute("program");d.height=parseInt(b.getAttribute("height"),10)||0;d.width=parseInt(b.getAttribute("width"),10)||0;d.xPosition=this.parseXPosition(b.getAttribute("xPosition"));d.yPosition=this.parseYPosition(b.getAttribute("yPosition"));
d.apiFramework=b.getAttribute("apiFramework");d.offset=this.parseDuration(b.getAttribute("offset"));d.duration=this.parseDuration(b.getAttribute("duration"));var d=V.extend(d,this.parseResourceAdType(b)),a=this.childByName(b,"IconClicks");if(a){d.iconClickThroughURLTemplate=this.parseNodeText(this.childByName(a,"IconClickThrough"));for(var a=this.childsByName(a,"IconClickTracking"),k=0;k<a.length;k++)d.iconClickTrackingURLTemplates.push(this.parseNodeText(a[k]))}d.iconViewTrackingURLTemplate=this.parseNodeText(this.childByName(b,
"IconViewTracking"));e.push(d)}}return e};H.prototype.parseCreativeLinearElement=function(c,e){e=void 0===e?{}:e;var f=new F(e);f.duration=this.parseDuration(this.parseNodeText(this.childByName(c,"Duration")));f.skipDelay=this.parseSkipOffset(f,c);var b=this.parseVideoClicks(c);f.videoClickThroughURLTemplate=b.videoClickThroughURLTemplate;f.videoClickTrackingURLTemplates=f.videoClickTrackingURLTemplates.concat(b.videoClickTrackingURLTemplates);f.videoCustomClickURLTemplates=f.videoCustomClickURLTemplates.concat(b.videoCustomClickURLTemplates);
f.trackingEvents=this.parseTrackingEvents(c);f.mediaFiles=f.mediaFiles.concat(this.parseMediaFiles(c));f.icons=f.icons.concat(this.parseIcons(c));if(b=this.childByName(c,"AdParameters"))for(f.adParameters=this.parseNodeText(b),b=0;b<f.mediaFiles.length;b++)f.mediaFiles[b].adParameters=f.adParameters;return f};H.prototype.parseResourceAdType=function(c){for(var e={},f=this.childsByName(c,"HTMLResource"),b=0;b<f.length;b++){var d=f[b];e.type=d.getAttribute("creativeType")||"text/html";e.htmlResource=
this.parseNodeText(d)}f=this.childsByName(c,"IFrameResource");for(b=0;b<f.length;b++)d=f[b],e.type=d.getAttribute("creativeType")||0,e.iframeResource=this.parseNodeText(d);c=this.childsByName(c,"StaticResource");for(f=0;f<c.length;f++)b=c[f],e.type=b.getAttribute("creativeType")||0,e.staticResource=this.parseNodeText(b);return e};H.prototype.parseNonLinear=function(c,e){e=void 0===e?{}:e;var f=new R(e);f.trackingEvents=this.parseTrackingEvents(c);for(var b=this.childsByName(c,"NonLinear"),d=0;d<b.length;d++){var a=
b[d],k=new G;k.id=a.getAttribute("id")||null;k.width=a.getAttribute("width");k.height=a.getAttribute("height");k.expandedWidth=a.getAttribute("expandedWidth");k.expandedHeight=a.getAttribute("expandedHeight");k.scalable=this.parseBoolean(a.getAttribute("scalable"));k.maintainAspectRatio=this.parseBoolean(a.getAttribute("maintainAspectRatio"));k.minSuggestedDuration=a.getAttribute("minSuggestedDuration");k.apiFramework=a.getAttribute("apiFramework");var k=V.extend(k,this.parseResourceAdType(a)),l=
this.childByName(a,"AdParameters");l&&(k.adParameters=this.parseNodeText(l));k.nonlinearClickThroughURLTemplate=this.parseNodeText(this.childByName(a,"NonLinearClickThrough"));a=D.makeIterator(this.childsByName(a,"NonLinearClickTracking"));for(l=a.next();!l.done;l=a.next())k.nonlinearClickTrackingURLTemplates.push(this.parseNodeText(l.value));f.variations.push(k)}return f};H.prototype.parseCompanionAd=function(c,e){e=void 0===e?{}:e;for(var l=new S(e),b=this.childsByName(c,"Companion"),d=0;d<b.length;d++){var a=
b[d],k=new f;k.id=a.getAttribute("id")||null;k.width=a.getAttribute("width");k.height=a.getAttribute("height");k.companionClickTrackingURLTemplates=[];for(var k=V.extend(k,this.parseResourceAdType(a)),p=this.childsByName(a,"TrackingEvents"),t=0;t<p.length;t++)for(var u=this.childsByName(p[t],"Tracking"),n=0;n<u.length;n++){var g=u[n],m=g.getAttribute("event"),g=this.parseNodeText(g);m&&g&&(k.trackingEvents[m]||(k.trackingEvents[m]=[]),k.trackingEvents[m].push(g))}p=D.makeIterator(this.childsByName(a,
"CompanionClickTracking"));for(t=p.next();!t.done;t=p.next())k.companionClickTrackingURLTemplates.push(this.parseNodeText(t.value));k.companionClickThroughURLTemplate=this.parseNodeText(this.childByName(a,"CompanionClickThrough"));k.companionClickTrackingURLTemplate=this.parseNodeText(this.childByName(a,"CompanionClickTracking"));l.variations.push(k)}return l};H.prototype.parseCreativeAdIdAttribute=function(c){if(!c.hasAttributes())return null;c=Array.prototype.slice.call(c.attributes);for(var e=
0;e<c.length;e++){var f=c[e];if(f&&f.name){var b=f.value;if("adid"===f.name.toLowerCase())return b}}return null};H.prototype.parseCreativeElement=function(c,e){for(var f=this.childsByName(e,"Creative"),b=0;b<f.length;b++)for(var d=f[b],a=d.childNodes,d={id:d.getAttribute("id")||null,adId:this.parseCreativeAdIdAttribute(d),sequence:parseInt(d.getAttribute("sequence"),10),apiFramework:d.getAttribute("apiFramework")||null},k=0;k<a.length;k++){var l=a.item(k),p=null;switch(l.nodeName){case "Linear":p=
this.parseCreativeLinearElement(l,d);break;case "NonLinearAds":p=this.parseNonLinear(l,d);break;case "CompanionAds":p=this.parseCompanionAd(l,d)}p&&c.creatives.push(p)}};H.prototype.parseExtensionChild=function(c,e){for(var f=e.childNodes,b=0;b<f.length;b++){var d=f.item(b),a=this.parseNodeText(d);if("#comment"!==d.nodeName&&""!==a||d.attributes){var k=new Z;k.name=d.nodeName;k.value=a;if(d.attributes)for(var a=d.attributes,l=0;l<a.length;l++){var p=a.item(l);k.attributes[p.nodeName]=p.nodeValue}d.childNodes&&
0<d.childNodes.length&&this.parseExtensionChild(k.children,d);c.push(k)}}};H.prototype.parseExtension=function(e,f){for(var l=0;l<f.length;l++){var b=f[l],d=new c;if(b.attributes)for(var a=b.attributes,k=0;k<a.length;k++){var p=a.item(k);d.attributes[p.nodeName]=p.nodeValue}this.parseExtensionChild(d.children,b);e.push(d)}};H.prototype.parseAdVerifications=function(c,e){for(var f=0;f<e.length;f++){var b=e[f],d=new p,a={};d.vendor=b.getAttribute("vendor")||null;var k=this.childByName(b,"JavaScriptResource");
if(k&&(a.url=this.parseNodeText(k),a.apiFramework=k.getAttribute("apiFramework")||"VPAID",d.javascriptResource=a,(b=this.childByName(b,"AdParameters"))&&b.hasChildNodes()))for(var l in b.childNodes)a=b.childNodes[l],a.nodeType===Node.ELEMENT_NODE&&(d.adParameters||(d.adParameters={}),d.adParameters[a.nodeName]=this.parseNodeText(a));c.push(d)}};H.prototype.parseInLineElement=function(c){var e=new T;e.id=c.getAttribute("id")||null;e.sequence=parseInt(c.getAttribute("sequence"),10);e.fallbackType=c.getAttribute("fallbackType")||
"replace";e.fallbackOnNoAd=this.parseBoolean(c.getAttribute("fallbackOnNoAd"),!1);e.followAdditionalWrappers=this.parseBoolean(c.getAttribute("followAdditionalWrappers"),!0);e.allowMultipleAds=this.parseBoolean(c.getAttribute("allowMultipleAds"),!1);c=c.childNodes;for(var f=0;f<c.length;f++){var b=c.item(f);switch(b.nodeName){case "Error":(b=this.parseNodeText(b))&&b.length&&e.errorURLTemplates.push(b);break;case "Impression":e.impressionURLTemplates.push(this.parseNodeText(b));break;case "AdVerifications":this.parseAdVerifications(e.adVerifications,
this.childsByName(b,"Verification"));break;case "Creatives":this.parseCreativeElement(e,b);break;case "Extensions":this.parseExtension(e.extensions,this.childsByName(b,"Extension"));break;case "AdSystem":e.system={value:this.parseNodeText(b),version:b.getAttribute("version")||null};break;case "AdTitle":e.title=this.parseNodeText(b);break;case "Description":e.description=this.parseNodeText(b);break;case "Advertiser":e.advertiser=this.parseNodeText(b);break;case "Pricing":e.pricing={value:this.parseNodeText(b),
model:b.getAttribute("model")||null,currency:b.getAttribute("currency")||null};break;case "Survey":e.survey=this.parseNodeText(b)}}return e};H.prototype.parseAdElement=function(c){for(var e=c.childNodes,f=0;f<e.length;f++){var b=e.item(f);if("Wrapper"===b.nodeName||"InLine"===b.nodeName){this.copyNodeAttribute("id",c,b);this.copyNodeAttribute("sequence",c,b);this.copyNodeAttribute("fallbackOnNoAd",c,b);this.copyNodeAttribute("fallbackType",c,b);this.copyNodeAttribute("followAdditionalWrappers",c,
b);this.copyNodeAttribute("allowMultipleAds",c,b);if("Wrapper"===b.nodeName)return this.parseWrapperElement(b);if("InLine"===b.nodeName)return this.parseInLineElement(b)}}return null};H.prototype.mergeWrapperAdData=function(c,e){c.wrappers=e.wrappers.concat(c.wrappers);c.errorURLTemplates=e.errorURLTemplates.concat(c.errorURLTemplates);c.impressionURLTemplates=e.impressionURLTemplates.concat(c.impressionURLTemplates);c.extensions=e.extensions.concat(c.extensions);c.adVerifications=e.adVerifications.concat(c.adVerifications);
c.sequence=e.sequence;c.fallbackType=e.fallbackType;c.fallbackOnNoAd=e.fallbackOnNoAd||this.parseBoolean(c.fallbackOnNoAd,!1);c.followAdditionalWrappers=e.followAdditionalWrappers||this.parseBoolean(c.followAdditionalWrappers,!0);c.allowMultipleAds=e.allowMultipleAds||this.parseBoolean(c.allowMultipleAds,!1);var f=e.creatives.filter(function(b){return"companion"===b.type}).shift(),b=c.creatives.filter(function(b){return"companion"===b.type}).shift();f&&b?b.variations=f.variations.concat(b.variations):
f&&!b&&(b=new S,b.variations=f.variations.concat(b.variations),c.creatives.push(b));e.trackingEvents&&c.creatives.map(function(b){e.trackingEvents[b.type]&&Object.keys(e.trackingEvents[b.type]).map(function(a){b.trackingEvents[a]||(b.trackingEvents[a]=[]);b.trackingEvents[a]=b.trackingEvents[a].concat(e.trackingEvents[b.type][a])})});c.creatives.map(function(b){e.creatives.map(function(a){b.icons=(b.icons||[]).concat(a.icons||[])})});e.videoClickTrackingURLTemplates&&c.creatives.map(function(b){"linear"===
b.type&&(b.videoClickTrackingURLTemplates=b.videoClickTrackingURLTemplates.concat(e.videoClickTrackingURLTemplates))});e.videoClickThroughURLTemplate&&c.creatives.map(function(b){"linear"!==b.type||b.videoClickThroughURLTemplate||(b.videoClickThroughURLTemplate=e.videoClickThroughURLTemplate)})};H.prototype.urlResponseHandler=function(c,e,f,b,d,a){function k(){for(var a=n.ads.length-1;0<=a;a--){var c=n.ads[a];if(c.nextWrapperURL){a=JSON.parse(JSON.stringify(c));c.VASTAdTagURI=e[1];c.wrappers.push(a);
for(c=p.wrapperCallbackHandlers.length-1;0<=c;c--)(0,p.wrapperCallbackHandlers[c])(a,p.currentWrapperDepth);return}}l();0===t?0===n.ads.length?(p.trackError(n,n.errorURLTemplates,303),b(d,n)):(n.ads.filter(function(a){return!p.isBrokenAd(a)}).map(function(a){a.creatives.map(function(b){var c=0<(b.mediaFiles||[]).filter(function(a){return!u.isSecureURL(a.fileURL)}).length;b=0<(b.variations||[]).filter(function(a){return!u.isSecureURL(a.fileURL)}).length;p.blockInsecureURL&&(c||b)&&(a.errorCode=405)})}),
n.ads.map(function(a){var b=void 0;p.hasValidCreatives(a)||(b=400);p.isBrokenAd(a)&&(b=303);!isNaN(b)&&isNaN(a.errorCode)&&a.fetched&&(a.errorCode=b)}),p.handleFallbackOnNoAdFlag(n.ads),c=n.ads.filter(function(a){return!1===a.fetched&&!a.hasError}),0===n.ads.filter(function(a){return a.hasError&&a.fallbackOnNoAd}).length&&(c=[]),a=function(){p.deleteNeedlessBuffetAds(n.ads);n.ads.map(function(a){a.hasError&&(a.creatives=[])});n.ads.sort(p.bySequence);1===n.ads.length&&n.ads[0].errorCode&&(0===n.errorURLTemplates.length?
p.trackError(n,n.ads[0].errorURLTemplates,n.ads[0].errorCode):p.trackError(n,n.errorURLTemplates,n.ads[0].errorCode),n.ads.splice(0,1));b(d,n)},0<c.length?(c=c.shift(),a=n.ads.indexOf(c),c.fetch(function(a,b){0<b.ads.length&&(n.ads[a]=b.ads[0]);k()}.bind(p,a))):a()):b(d,n)}function l(){0!==n.ads.length&&(n.ads.map(function(a){n.errorURLTemplates.map(function(b){-1===a.errorURLTemplates.indexOf(b)&&a.errorURLTemplates.push(b)})}),n.errorURLTemplates=[])}var p=this,t=this.currentWrapperDepth++;if(d)return b(d);
delete f.response;var n=new v;if(!a||!a.documentElement||"VAST"!==a.documentElement.nodeName)return b();for(var g=0;g<a.documentElement.childNodes.length;g++){var m=a.documentElement.childNodes.item(g);"Error"===m.nodeName&&n.errorURLTemplates.push(this.parseNodeText(m))}for(g=0;g<a.documentElement.childNodes.length;g++)m=a.documentElement.childNodes.item(g),"Ad"===m.nodeName&&((m=this.parseAdElement(m))?(m.url=m.nextWrapperURL?I.resolveAdTagURI(m.nextWrapperURL,c):c,m.fetched=!0,n.ads.push(m)):this.trackError(n,
n.errorURLTemplates,101));a=n.ads.length;for(g={$jscomp$this$5:void 0};a--;)g.$jscomp$this$5=this,m=n.ads[a],m.nextWrapperURL&&(function(a){return function(b){if(e.length-1>=a.$jscomp$this$5.maxWrapperDepth||b.nextWrapperURL in e)b.errorCode=302,delete b.nextWrapperURL;else if(b.followAdditionalWrappers){c&&(b.nextWrapperURL=I.resolveAdTagURI(b.nextWrapperURL,c));var d=function(c,d){delete b.nextWrapperURL;if(c)return b.errorCode=c.errorCode||301,c.message&&-1!==c.message.indexOf("Invalid URL")&&
(b.errorCode=303),k();d&&d.errorURLTemplates&&(n.errorURLTemplates=n.errorURLTemplates.concat(d.errorURLTemplates));if(d&&0!==d.ads.length){var f=n.ads.indexOf(b);n.ads.splice(f,1);d.ads.map(function(a){return function(c){a.$jscomp$this$5.mergeWrapperAdData(c,b);c.VASTAdTagURI=e[1];n.ads.splice(++f,0,c)}}(a))}else b.creatives=[];return k()},g=0<n.ads.filter(function(a){return!isNaN(a.sequence)}).length;isNaN(b.sequence)&&!f.prefetchBuffets&&g?(d=new v,b.fetched=!1,b.fetchURL=b.nextWrapperURL,delete b.nextWrapperURL,
b.fetch=function(a){return function(c){a.$jscomp$this$5.parse(b.fetchURL,f,function(d,e){if(0<e.ads.length)e.ads.map(function(a){return function(c){a.$jscomp$this$5.mergeWrapperAdData(c,b);c.VASTAdTagURI=b.url}}(a));else{var f=new T;f.errorURLTemplates=b.errorURLTemplates.concat(e.errorURLTemplates);f.errorCode=303;f.sequence=b.sequence;f.fetched=!0;f.fallbackOnNoAd=!0;e.ads.push(f)}c(e)},e)}}(a),d.ads.push(b)):a.$jscomp$this$5.parse(b.nextWrapperURL,f,d.bind(a.$jscomp$this$5),e)}else delete b.nextWrapperURL,
a.$jscomp$this$5.isBrokenAd(b)&&isNaN(b.errorCode)&&(b.errorCode=303)}}(g)(m),g={$jscomp$this$5:g.$jscomp$this$5});return k()};H.prototype.handleFallbackOnNoAdFlag=function(c){var e=this;c.sort(this.bySequence);var f=c.filter(function(a){return isNaN(a.sequence)&&!e.isBrokenAd(a)}),b=c.filter(function(a){return e.isBrokenAd(a)&&a.fallbackOnNoAd&&a.sequence&&!a.replaced}),d=c.filter(function(a){return a.fallbackOnNoAd&&a.sequence});if(0!==d.length){var a=parseInt(d[d.length-1].sequence,10);if(0===
b.length)return this.deleteNeedlessBuffetAds(c);b.forEach(function(b){var d=f.shift();if(d){var e=c.indexOf(b);d.sequence=b.sequence+.1;b.fallbackType&&"waterfall"===b.fallbackType&&(e=c.indexOf(d),d.sequence=a++);b.replaced=!0;c.splice(e,d)}})}};H.prototype.deleteNeedlessBuffetAds=function(c){if(0!==c.length&&!isNaN(c[0].sequence))for(var e=c.length;e--;)isNaN(c[e].sequence)&&c.splice(e,1)};H.prototype.bySequence=function(c,e){return c.sequence-e.sequence||(c.sequence||Infinity)-(e.sequence||Infinity)||
0};H.prototype.hasValidCreatives=function(c){return 0<c.creatives.filter(function(c,e,b){e=c.mediaFiles&&0<c.mediaFiles.length;var d=c.variations&&0<c.variations.length;return 0<b.length&&(e||d)?d&&!e?0<c.variations.filter(function(a){return!0===a.hasCreative}).length:!0:!1}).length};H.prototype.isBrokenAd=function(c){return!c||c.hasError||c.fetched&&!this.hasValidCreatives(c)};H.prototype.getClosestIndexOfNextValidAd=function(c,e){var f=this,b=Infinity;c.map(function(c,a){var h=Math.abs(b-e),l=Math.abs(a-
e);!f.isBrokenAd(c)&&l<h&&a!==e&&(b=a)});return Infinity===b?-1:b};H.prototype.parse=function(c,e,f,b){e=void 0===e?{}:e;b=void 0===b?[]:b;var d=c;f=void 0===f?function(){}:f;var a=e;"function"===typeof e&&(f=e,a={});this.blockInsecureURL=a.blockInsecureURL||!1;this.maxWrapperDepth=a.maxWrapperDepth||10;for(e=this.URLTemplateFilters.length-1;0<=e;e--)d=(0,this.URLTemplateFilters[e])(c);b.push(d);this.blockInsecureURL&&!u.isSecureURL(d)?f({errorCode:310,errorMessage:"Mixed Content: This request has been blocked; the ad-request must be served over HTTPS."},
null):(new W).get(d,a,this.urlResponseHandler.bind(this,c,b,a,f))};window.VASTParser=H})();})();
