var OX=OX||function(f,i){var c={},b,j,h,l,a={},n,k,e="OX_sd";var m=function(){var o=0;return function(){if(o){return}g();o=1}}();function g(){var p,o;if(!k.isFramed()){p=k.getCookie(e);if(parseInt(p)){p++}else{p=1}o=new Date(k.now()+1200000).toGMTString();k.cookie(e,p,o);n._requestArgs.sd=p}}function d(s,q){var o,x,w,p={},u={},t,v,r;if(s.vars){for(var y in s.vars){if(s.vars.hasOwnProperty(y)){p["c."+escape(y)]=s.vars[y]}}s.vars=null}if(s.gw){t=s.gw;s.gw=null}if(""){u.oxns=""}if(j){u.ju=j}if(h){u.jr=h}u.cb=k.rand();v=k.merge([s,u,p,k.contextArgs()]);r=k.serialize(v);o=k.template(k.Templates.GW_URL,{gw:t||b,v:"1.0",r:q,q:r});x=k.ensureRightProtocol(o);w=k.template(k.Templates.SCRIPT,{src:o,id:"ox_"+q+"_"+k.rand()});k.write(w)}n=function(p){var o=new OX.AdRequest(p,{url:j=j||k.detectPageURL(),ref:h=h||k.detectRefererURL(),gw:b});c[o.get("o")]=o;return o};n._customVars={};n._requestArgs={};n.addHook=function(p,o){if(!a[o]){a[o]=[]}a[o].push(p)};n.addVariable=function(q,s,r,p){var o=n._customVars,t=(r||"c")+"."+q;if(p||!o[t]){o[t]=[]}o[t].push(s)};n.appendTag=function(o){k.write(o)};n.dflt=function(q,r,o){var p=c[q];p&&p.dflt(r,o)};n.ifrmHTML=function(q,r,o){var p=c[q];p&&p.ifrmHTML(r,o)};n.frameCreatives=function(o){l=o};n.getFramed=function(){return l};n.getHooksByType=function(o){return a[o]};n.init=function(){k=OX.utils;m()};n.load=function(o){n(o).load()};n.requestAd=function(o){n(o).fetchAds()};n.recordAction=function(o){d(o,n.Resources.RAJ)};n.recordSegments=function(q){var o,r={};if(q.expires){o=Date.parse(q.expires);if(o<new Date()){return}}for(var p in q){if(q.hasOwnProperty(p)){switch(p){case"add":r.as=q[p];break;case"del":r.ds=q[p];break;default:r[p]=q[p]}}}d(r,n.Resources.RSJ)};n.renderCreative=function(o){k.write(o)};n.setGateway=function(o){b=k.ensureRightProtocol(o)};n.setPageURL=function(o){j=o};n.setRefererURL=function(o){h=o};n.Hooks={ON_AD_REQUEST:1,ON_AD_RESPONSE:2,ON_ADUNIT_CREATED:3,ON_ADUNIT_INITIALIZED:4,ON_ADUNIT_RENDER_START:5,ON_ADUNIT_RENDER_FINISH:6,ON_AD_RENDER_START:7,ON_AD_RENDER_FINISH:8,ON_AD_DEFAULTED:9,ON_AD_NOT_DEFAULTED:10,ON_AD_REQUEST_ERROR:11};n.Modes={IMMEDIATE:1,DEFERRED:2};n.RemoteCacheModes={STORE_AD:1,RETRIEVE_AD:2,RETRIEVE_AD_CACHE_MISS:3};n.Resources={ACJ:"acj",RAJ:"raj",RDF:"rdf",RR:"rr",RI:"ri",RSJ:"rsj",RE:"re"};n.GeoLocationSources={GPS:1,IP_ADDRESS:2,USER_REGISTRATION:3};n.shareFrameContents=false;return n}(window,document);
OX.utils=OX.utils||function(d,e,g){var j,b="w",c=true,i="BI",h="BI_TS",a=1000000;function f(l,k){if(l.attachEvent){l.attachEvent("onload",k)}else{l.onload=k}}j={IMAGE_BEACON_TEMPLATE:"<div style='position:absolute;left:0px;top:0px;visibility:hidden;'><img src='{src}'/></div>",PIXEL_IFRAME_TEMPLATE:"<iframe src='{src}' width='0' height='0' style='display:none;'></iframe>",append:function(l,k){l.parentNode.insertBefore(k,l.nextSibling);return k},attachListener:function(m,k,l){if(m.addEventListener){m.addEventListener(k,l,false)}else{if(m.attachEvent){m.attachEvent("on"+k,l)}}},beacon:function(k){var l=j.ensureRightProtocol(k);(new Image()).src=l},getImgBeacon:function(k){var l=j.ensureRightProtocol(k);return j.template(j.IMAGE_BEACON_TEMPLATE,{src:l})},loadPixels:function(n){var k,m,l;if(n){k=j.template(j.PIXEL_IFRAME_TEMPLATE,{src:n});l=j.create(k);if(m=e.body){m.appendChild(l)}}},browserIDKey:function(){return i},appendBrowserIdToPixelUrl:function(m,k){if(m&&k){var l=j.serialize({bi:k});m+="&"+l}return m},fetchBrowserId:function(){if(OX.browser_id){browser_id_array=OX.browser_id.get();if(browser_id_array&&browser_id_array.length===2){return browser_id_array[0]}}},loadBrowserIdPixels:function(k){if(OX.tp_bi&&k&&OX.tp_bi.sync){OX.tp_bi.sync(k)}},contextArgs:function(){var o=j.detectWindowDims(),q={res:screen.width+"x"+screen.height+"x"+screen.colorDepth,plg:j.detectPlugins(),ch:e.charset||e.characterSet,tz:(new Date()).getTimezoneOffset()},p=e.getElementsByTagName("meta"),s;if(o){q.ws=o[0]+"x"+o[1]}q.ifr=j.inIframe()?1:0;if(q.ifr){try{tWin=d.top;tDoc=d.top.document;tDims=j.detectWindowDimensions(tWin,tDoc);if(tDims){q.tws=tDims.width+"x"+tDims.height}}catch(m){}}else{q.tws=q.ws}for(var n=0;n<p.length;n++){s=p[n];if(s.name&&s.name==="viewport"){q.vmt=1;break}}if(OX.browser_id){var l=OX.browser_id.get();if(l&&l.length===2){q.bi=l[0];q.ba=l[1]}}else{j.store.remove(i);j.store.remove(h)}if(OX.tp_xdi_tapad){OX.tp_xdi_tapad.sync()}if(OX.tp_presync_criteo){var r=OX.tp_presync_criteo.get();q["tp.presync.criteo"]=r.id;q["tp.presync.criteo.status"]=r.status}if(OX.tp_presync_mediamath){var k=OX.tp_presync_mediamath.get();q["tp.presync.mediamath"]=k.id;q["tp.presync.mediamath.status"]=k.status}return q},create:function(l){var k=e.createElement("div");k.innerHTML=l;return k.firstChild},cookie:function(m,n,k){if(c){var l=m+"=";l+=(n||"")+";path=/;";if(j.defined(k)){l+="expires="+k+";"}try{e.cookie=l}catch(o){}}},createScript:function(l){var k=e.createElement("script");k.type="text/javascript";l.id&&(k.id=l.id);l.src&&(k.src=l.src);return k},defined:function(k){return typeof k!="undefined"},detectWindowDims:function(){var m=e.documentElement,k=d.innerWidth,l=d.innerHeight;k=j.defined(k)?k:m.clientWidth;l=j.defined(l)?l:m.clientHeight;if(j.defined(k)&&j.defined(l)){return[k,l]}},detectWindowDimensions:function(p,o){var n=o.documentElement,l=o.getElementsByTagName("body")[0],m=p.innerWidth||n.clientWidth||l.clientWidth,k=p.innerHeight||n.clientHeight||l.clientHeight;return{width:m,height:k}},detectPlugins:function(){var m,l="OX_plg",n="ShockwaveFlash.ShockwaveFlash",k={swf:{activex:[n,n+".3",n+".4",n+".5",n+".6",n+".7"],plugin:/flash/gim},sl:{activex:["AgControl.AgControl"],plugin:/silverlight/gim},pdf:{activex:["acroPDF.PDF.1","PDF.PdfCtrl.1","PDF.PdfCtrl.4","PDF.PdfCtrl.5","PDF.PdfCtrl.6"],plugin:/adobe\s?acrobat/gim},qt:{activex:["QuickTime.QuickTime","QuickTime.QuickTime.4"],plugin:/quicktime/gim},wmp:{activex:["WMPlayer.OCX"],plugin:/(windows\smedia)|(Microsoft)/gim},shk:{activex:["SWCtl.SWCtl","SWCt1.SWCt1.7","SWCt1.SWCt1.8","SWCt1.SWCt1.9",n+".1"],plugin:/shockwave/gim},rp:{activex:["RealPlayer","rmocx.RealPlayer G2 Control.1"],plugin:/realplayer/gim}};return function(){var r,s,q="",o=[];if(m){return m}try{if(e.cookie){r=e.cookie.split((escape(l)+"="));if(2<=r.length){s=r[1].split(";");if(s[0]){if(s[0].indexOf("|")>=0){return unescape(s[0].split("|").join(","))}}}}}catch(w){}for(var v in k){if(k.hasOwnProperty(v)){if(d.ActiveXObject){for(var u=0;u<k[v].activex.length;++u){try{ActiveXObject(k[v].activex[u]);o.push(v);break}catch(w){}}}else{for(var t=0;t<g.plugins.length;++t){if(g.plugins[t].name.match(k[v].plugin)){o.push(v);break}}}}}if(d.postMessage){o.push("pm")}m=q=o.join(",");j.cookie(l,o.join("|"));return q}}(),detectPageURL:function(){var k;try{k=top.location.href}catch(l){}return k||j.detectRefererURL()},detectProtocol:function(){return location.protocol},detectRefererURL:function(){var k=e.referrer;try{k=top.document.referrer}catch(n){if(parent){try{k=parent.document.referrer}catch(m){}}}if(!k&&opener){try{k=opener.location.href}catch(l){}}return k||""},each:function(n,o){if(j.isArray(n)){for(var m=0;m<n.length;m++){o(n[m],m)}}else{for(var l in n){if(n.hasOwnProperty(l)){o(l,n[l])}}}},ensureRightProtocol:function(l){var k;if(l){k=l.indexOf("//");if(k!=5&&k!=6){l="http://"+l}return(j.detectProtocol()=="https:")?l.replace("http:","https:"):l}},get:function(k){return e.getElementById(k)},getCookie:function(k){try{var l=e.cookie.split(k+"=");if(l.length==2){return l[1].split(";")[0]}}catch(m){}},getMedium:function(){return b},setMedium:function(k){b=k},ieVersion:(function(){var n=0,k,l;if(g){try{k=g.userAgent;if(g.appName=="Microsoft Internet Explorer"){l=new RegExp("MSIE ([0-9]{1,}[\\.0-9]{0,})");if(l.exec(k)!=null){n=parseFloat(RegExp.$1)}}else{if(g.appName=="Netscape"){l=new RegExp("Trident/.*rv:([0-9]{1,}[\\.0-9]{0,})");if(l.exec(k)!=null){n=parseFloat(RegExp.$1)}}}}catch(m){}return n}})(),intersection:function(o,n){var l={},m,k=[];if(!j.isValidArray(o)||!j.isValidArray(n)){return k}for(m=0;m<o.length;m++){l[o[m]]=true}for(m=0;m<n.length;m++){if(l[n[m]]){k.push(n[m])}}return k},isArray:function(k){return Object.prototype.toString.call(k)==="[object Array]"},isFramed:function(){return d.self!=d.top},isFriendlyFramed:function(){if(!j.isFramed()){return false}try{d.parent.document.getElementsByTagName("body");return true}catch(k){return false}},isUnfriendlyFramed:function(){return j.isFramed()&&!j.isFriendlyFramed()},isIE:0,lastScript:function(){var k=e.getElementsByTagName("script");return k[k.length-1]},merge:function(n){var k,o;if(j.isArray(n)){k={};for(var m=0;m<n.length;m++){o=n[m];for(var l in o){if(o.hasOwnProperty(l)){k[l]=o[l]}}}}return k},now:function(){return(new Date()).getTime()},postMessage:function(k){j.attachListener(d,"message",k)},createFrameElement:function(l,m,k){var o;try{o=(j.isIE&&l)?e.createElement('<iframe name="'+l+'">'):e.createElement("iframe")}catch(n){o=e.createElement("iframe")}if(l){o.setAttribute("id",l);o.setAttribute("name",l)}o.setAttribute("width",m);o.setAttribute("height",k);o.setAttribute("frameSpacing","0");o.setAttribute("frameBorder","no");o.setAttribute("scrolling","no");return o},produceFrame:function(k){var r,l,q='javascript:window["contents"]',x,z=k.hookNode,m=k.name,o=k.width,A=k.height,n=k.onStart,p=k.onFinish,u=k.onSuccess,t=m+"_contents",y=j.template(j.Templates.IFRAME_DOC,{title:k.title||"OpenX",head:k.headHTML,body:k.bodyHTML});r=j.createFrameElement(m,o,A);if(k.replace){j.replace(z,r)}else{z.innerHTML="";z.appendChild(r)}l=(j.isIE&&(j.ieVersion<11))||d.opera;if(l){r.src=q}if(l){try{p&&f(r,p);r.contentWindow.contents=y;n&&n();r.src=q}catch(s){var w=r;r=j.createFrameElement(m,o,A);d[t]=y;q=j.template(j.Templates.IFRAME_JS_URI,{contentsVar:t,domain:e.domain});p&&f(r,p);r.src=q;n&&n();j.replace(w,r)}}else{try{x=r.contentWindow||r.contentDocument;if(x.document){x=x.document}p&&f(r,p);if(x){x.open("text/html","replace");n&&n();x.write(y);x.close()}}catch(v){if(!k.isRetry){k.hookNode=r;k.replace=true;k.isRetry=true;d.setTimeout(function(){j.produceFrame(k)},0)}}}u&&u(r)},rand:function(){return Math.floor(Math.random()*9999999999)+""},remove:function(k){k.parentNode.removeChild(k)},replace:function(l,k){l.parentNode.replaceChild(k,l);return k},replaceOrRemove:function(k,m,l){if(!k){m&&j.remove(m)}else{if(m){return j.replace(m,k)}else{return j.append(l,k)}}},serialize:function(l){var n="",m;if(typeof l==="object"){for(var k in l){if(l.hasOwnProperty(k)){m=l[k];if(j.defined(m)&&(m!==null)){if(j.isArray(m)){m=m.join(",")}n+=k+"="+escape(m)+"&"}}}}if(n.length>1){n=n.substr(0,n.length-1)}return n},store:function(){var p="1",q=630720000000,n="|",s,k,r,m={};try{s=localStorage;s.setItem(p,p);s.removeItem(p);k=1}catch(o){if(g.cookieEnabled&&c){r=1}}function l(w,v){var y="OX_"+w,u,t;if(k){t=s.getItem(y);v&&s.removeItem(y)}else{if(r){t=j.getCookie(y);v&&j.cookie(y)}else{t=m[y];v&&(delete m[y])}}if(t){u=t.split(n);for(var x=0;x<u.length;x++){u[x]=unescape(u[x])}if(u.length===1){return u[0]}else{return u}}}return{put:function(v,z){var x="OX_"+v,y,t,u;if(j.isArray(z)){t=[];for(var w=0;w<z.length;w++){t.push(escape(z[w]))}y=t.join(n)}else{y=escape(z)}if(k){s.setItem(x,y);return true}else{if(r){u=new Date(j.now()+q).toGMTString();j.cookie(x,y,u);return true}else{m[x]=y;return false}}},get:function(t){return l(t)},remove:function(t){return l(t,1)}}}(),template:function(u,p,l,q){p=p||{};var n="",m=false,s="",k,l=l||"{",q=q||"}",t,o;for(var r=0;r<u.length;r++){k=u.charAt(r);if(!m&&k===l){m=true}else{if(m&&k===q){t=p[n];if(j.defined(t)&&t!==null){o=t}else{o=""}s+=o;m=false;n=""}else{if(m){n+=k}else{s+=k}}}}return s},Templates:{SCRIPT:"<script type='text/javascript' id='{id}' src='{src}' onerror='{err}'><\/script>",IFRAME_DOC:"<!DOCTYPE html><html><head><title>{title}</title><base target='_top'/>{head}</head><body style='margin:0;padding:0'>{body}</body></html>",GW_URL:"{gw}/{v}/{r}?{q}",IFRAME_JS_URI:"javascript:document.open();document.domain='{domain}';document.write(window.parent['{contentsVar}']);window.parent['{contentsVar}']=null;setTimeout('document.close()',5000)"},write:function(k){(e.readyState!=="complete"&&e.readyState!=="interactive")&&e.write(k)},isCookieEnabled:function(){return g.cookieEnabled&&c},isValidDIM:function(k){if(k>a){return false}else{if(isNaN(k)){return false}}return true},isEmpty:function(k){for(var l in k){if(k.hasOwnProperty(l)){return false}}return true},isSubset:function(l,k){var n,m;if(!j.isValidArray(l)||!j.isValidArray(k)){return false}if(l.length<k.length){return false}for(n=0;n<k.length;n++){for(m=0;m<l.length;m++){if(k[n]===l[m]){break}if(m===l.length-1){return false}}}return true},isValidArray:function(k){return k&&j.isArray(k)&&k.length!==0},inIframe:function(){return d.self!==d.top},getPosition:function(m){var l,k;if(!m){return null}if(m.tagName==="SCRIPT"){k=e.createElement("div");j.append(m,k);l=k.getBoundingClientRect();j.remove(k)}else{l=m.getBoundingClientRect()}return{top:Math.round(l.top),left:Math.round(l.left)}},getPositionById:function(l,m){var k=l.getElementById(m);return j.getPosition(k)},getAdPosition:function(n,o){var l,k,q=d,p=d.document;if(d.parent!=d.top){return null}try{n=d.frameElement?d.frameElement:n;if(j.inIframe()){q=d.parent;p=d.parent.document}l=j.detectWindowDimensions(q,p);if(!j.isValidDIM(l.width)||!j.isValidDIM(l.height)){return null}if(o){k=j.getPositionById(p,n);if(k==null){return null}}else{k=j.getPosition(n)}if(!j.isValidDIM(k.left)||!j.isValidDIM(k.top)){return null}return{browserDims:l,adUnitStartPos:k}}catch(m){return null}}};if(j.ieVersion){j.isIE=1}return j}(window,document,navigator);
/*@cc_on OX.utils.isIE=1;@*/;
OX.AdRequest=OX.AdRequest||function(S,H){var V=OX.utils,O="OX_remote_cache_token",e=S&&S.remoteCacheToken,e=e||S&&S.useLocalRemoteCacheToken&&V.getCookie(O),e=e||V.rand(),M,l={},z,x=false,h,q,m={},f={},C,g,Q,D,u={},W=false,y={o:e},s={mode:null,auid:null,record_tmpl:null,ad_units:[]},d="net_latency",E="user_latency",w,L=5,p=-1,A=-1,J=2048,B="OX_"+e,v=B+"_onAdRequestError",N="ox_"+OX.Resources.ACJ+"_"+e,j=this,T=OX.Hooks,K=OX.Modes,F=OX.RemoteCacheModes;function t(){return(y.rm>0)&&(y.rd>0)&&(y.rc<y.rm)}function c(){if((y.rd>0)&&(y.rm>0)&&(!y.rc)){y.rc=0}}function r(){var k=j.createAdRequestURL(),Y=y.rc&&("_"+y.rc),X=N+(Y||""),i=V.createScript({id:X,src:k});V.attachListener(i,"error",function(){window[v]()});return i}function a(aa,Z){var k=f[aa]||[],X=OX.getHooksByType(aa)||[],ac=X.concat(k),ab;if(ac){for(var Y=0;Y<ac.length;Y++){ab=ac[Y];ab.apply(this,Z)}}}function P(){y.rc++;setTimeout(function(){j.refreshAds()},1000*y.rd)}function I(k){var i;if(k){i=document.createComment(" "+k.replace(/--/g,"- -"))}g=V.replaceOrRemove(i,g,C)}function o(){var k="ma",i="js";V.setMedium(k);M=M.replace(/\/m?w$/,"/"+k);y.sp=i;delete y.ju;delete y.jr}function G(k,i,Z){var Y=new XMLHttpRequest(),aa=k.split("?");try{aa[1]=aa[1].replace(/(^|&)callback=[^&]*$/,"");aa[1]=aa[1].replace(/(^|&)callback=.*?&/,"$1")}catch(X){}Y.open("POST",aa[0]);Y.setRequestHeader("Content-Type","application/x-www-form-urlencoded");Y.onreadystatechange=function(){if(this.readyState===4){if(this.status===200){i&&i(JSON.parse(this.responseText))}else{W=false;u={};delete y.openrtb;Z&&Z()}}};Y.send(aa[1])}function b(){var Z,ad,Y,k,ac,aa="",ab=[];if(true&&!y.be){Z=y.auid||[];for(var X=0;X<Z.length;X++){ad=Z[X];Y=l[ad];k=Y.get("anchor");if(!k&&s.mode===K.IMMEDIATE){k=V.lastScript()}ac=V.getAdPosition(k,false);if(ac){aa=ac.browserDims.width+"x"+ac.browserDims.height;ab.push(ac.adUnitStartPos.left+","+ac.adUnitStartPos.top)}else{ab.push("")}}j.setBrowserDims(aa);j.setAdUnitLocation(ab.join("|"))}}j.addAdUnit=function(X){var k=j.getOrCreateAdUnit(X),i;if(!y.auid){y.auid=[]}y.auid.push(X)};j.addContentTopic=function(i){y.tid=y.tid||[];y.tid.push(i)};j.addHook=function(k,i){if(!f[i]){f[i]=[]}f[i].push(k)};j.addPage=function(i){y.pgid=y.pgid||[];y.pgid.push(i)};j.addVariable=function(k,Y,X,i){var Z=(X||"c")+"."+k;if(i||!m[Z]){m[Z]=[]}m[Z].push(Y)};j.createAdRequestURL=function(){var X,k,i,Y,aa="ai=401d1236-af66-4a9a-92db-e9e9a79d192c";c();b();if(!V.isEmpty(u)){try{y.openrtb=JSON.stringify(u)}catch(Z){}}k=V.merge([y,m,V.contextArgs(),OX._customVars,OX._requestArgs]);aa&&(aa+="&");aa+=V.serialize(k);i=j.getLatencyStringByKey(d);if(i){aa+="&nl="+escape(i)}Y=j.getLatencyStringByKey(E);if(Y){aa+="&ul="+encodeURIComponent(Y)}if(Q){aa+="&r="+escape(Q)}X=V.template(V.Templates.GW_URL,{gw:M,v:"1.0",r:OX.Resources.ACJ,q:aa});if(!V.isEmpty(u)&&X.length>J){W=true}w=X;return X};j.dflt=function(X,i){var k=l[X];k&&k.dflt(i)};j.ifrmHTML=function(X,i){var k=l[X];k&&k.set("iframe_html",i)};j.disableFeature=function(i){y.df=y.df||[];y.df.push(i)};j.disableMarket=function(){j.disableFeature("m")};j.disableSegmentation=function(){y.ns=1};j.enableFeature=function(i){y.ef=y.ef||[];y.ef.push(i)};j.enableExperiment=function(i){y.ee=i};j.enableControlGroup=function(i){y.ec=i};j.enableMarket=function(){j.enableFeature("m")};j.enableSegmentation=function(){y.ns=null};j.flagStoreRemoteCachedAd=function(i){y.o=i||e;y.cache=F.STORE_AD};j.setRemoteCacheToken=function(i){y.o=i;y.cache=F.RETRIEVE_AD_CACHE_MISS};j.setRequestStart=function(){p=new Date().getTime()};j.setRequestEnd=function(i){if(p<0){return}A=new Date().getTime();if(i.ads&&i.ads.oxt){var Z=i.ads.oxt;var Y=(A-p);if(Z&&Y>Z){try{var X=j.getNetworkLatency();if(X){j.storeLatencyByKey(d,Math.round(X-Z))}j.storeLatencyByKey(E,Math.round(Y-Z))}catch(k){}}}};j.getPerformanceMetrics=function(){return{startTime:p,endTime:A,networkLatency:j.getNetworkLatency()}};j.getNetworkLatency=(function(){var i=0;var k=w;return function(){if(i&&k===w){return i}k=w;if(window&&window.performance&&window.performance.getEntriesByType){var Z=window.performance.getEntriesByType("resource");var Y;for(var X=Z.length-1;X>=0;X--){Y=Z[X];if(Y.name===k){i=Y.duration;return Y.duration}}}}})();j.storeLatencyByKey=function(i,k){var X=j.getLatencyListByKey(i);X.push(k);if(X.length>L){X=X.slice(-L)}V.store.put(i,X.toString())};j.getLatencyListByKey=function(k){var Z=V.store.get(k);if(Z){var ab=Z.split(",");if(ab&&V.isArray(ab)){var Y=[];for(var X=0;X<L;++X){var aa=parseInt(ab[X],10);if(aa>0){Y.push(aa)}}return Y}}return[]};j.getLatencyStringByKey=function(i){var X=j.getLatencyListByKey(i),k;if(X.length>0){k=X.toString()}return k};j.fetchAds=function(){var k,i;j.setRequestStart();a(T.ON_AD_REQUEST,[j]);k=j.createAdRequestURL();if(W){G(k,window[B],j.fetchAds)}else{i=V.template(V.Templates.SCRIPT,{src:k,id:N,err:v+"()"});V.write(i)}};j.fetchAdsComplete=function(){switch(s.mode){case K.IMMEDIATE:j.showAdUnit(s.auid);break;case K.DEFERRED:for(var i in l){if(l.hasOwnProperty(i)){if(l[i].get("anchor")){j.showAdUnit(i)}}}break;default:}t()&&P()};j.frameCreatives=function(i){z=i};j.getOrCreateAdUnit=function(i){if(!l[i]){l[i]=new OX.AdUnit(i,j.get("o"));s.ad_units.push(l[i]);a(T.ON_ADUNIT_CREATED,[l[i]])}return l[i]};j.get=function(i){return s.hasOwnProperty(i)?s[i]:y[i]};j.getQueryArgs=function(){return y};j.getProperties=function(){return s};j.isResponseEmpty=function(){var k,i;if(!(D&&D.ads&&D.ads.adunits&&(k=D.ads.adunits[0])&&(i=k.chain)&&i.length)){return true}else{return false}};j.getRecordTemplate=function(){if(D&&D.ads){return D.ads.record_tmpl}return""};j.loadAdResponse=function(X){var Z=X.ads,ab=X.ads.adunits,k,aa;C=C||V.get(N);D=X;I(s.debug=Z.debug);for(var Y=0;Y<ab.length;Y++){k=ab[Y];if(k.refresh_delay){y.rd=k.refresh_delay}if(k.refresh_max){y.rm=k.refresh_max}c();if(t()){z=1}aa=function(i){a(T.ON_ADUNIT_INITIALIZED,[i])};j.getOrCreateAdUnit(k.auid).load({adunit:k,rt:Z.record_tmpl,oninit:aa,chain:Z.chain,perf_id:Z.perf_id})}};j.load=function(){var k,X,i=j.createAdRequestURL();j.setRequestStart();a(T.ON_AD_REQUEST,[j]);z=1;if(W){G(i,window[B],j.load)}else{k=r();X=document.head||document.body;if(X){X.appendChild(k);C=k}else{C=V.append(V.lastScript(),k)}}};j.refreshAds=function(){var k,i=j.createAdRequestURL();a(T.ON_AD_REQUEST,[j]);if(W){G(i,window[B],j.load)}else{k=r();C=V.replace(C,k)}};j.setAdUnitFallback=function(k,i){j.getOrCreateAdUnit(k).set("fallback",i)};j.setAdUnitImpBeacon=function(k,i){j.getOrCreateAdUnit(k).set("imp_beacon",i)};j.setAdUnitMarketFloor=function(k,i){j.getOrCreateAdUnit(k);y.aumf=y.aumf||[];y.aumf.push(k+":"+i)};j.setAdUnitNGFloor=function(k,i){j.getOrCreateAdUnit(k);y.aungf=y.aungf||[];y.aungf.push(k+":"+i)};j.setAdUnitSlotId=function(k,i){j.getOrCreateAdUnit(k).set("anchor",V.get(i))};j.setAnchorTarget=function(i){y.tg=i};j.setBrowserDims=function(i){y.dims=i};j.setAdUnitLocation=function(i){y.adxy=i};j.setClickRedirectURL=function(i){Q=i};j.setGateway=function(i){M=V.ensureRightProtocol(i)};j.setMode=function(i){s.mode=i};j.setPageURL=function(i){y.ju=V.ensureRightProtocol(i)};j.setRefererURL=function(i){y.jr=i};j.setRefreshDelay=function(i){y.rd=i};j.setRefreshMax=function(i){y.rm=i};j.setTest=function(i){y.test=i?"true":null};j.setUserID=function(i){y.xid=i};j.setBidderEligibility=function(i){y.be=i?1:0};j.setBidderExperimentVersion=function(i){y.expVer=i};j.setPrefetch=function(i){y.prf=i?1:0};j.setBidderConfiguration=function(i){y.bc=i};j.setBidderTimeout=function(i){y.bt=i};j.setCacheEnabled=function(i){y.ce=i?1:0};j.setCoords=function(i){if(i.latitude&&i.longitude){y.lat=i.latitude;y.lon=i.longitude;y.lt=i.source||OX.GeoLocationSources.GPS}};j.setAdSizes=function(i){y.aus=y.aus?y.aus+"|":"";y.aus=y.aus+i.join(",")};j.setAppName=function(i){if(i){y["app.name"]=i;o()}};j.setAppBundleID=function(i){if(i){y["app.bundle"]=i;o()}};j.setAppStoreURL=function(i){if(i){y.url=V.ensureRightProtocol(i);o()}};j.setAPIFrameworks=function(i){if(i.toString()){y.af=i.toString();o()}};j.addDeviceID=function(X,Y){var i={"did.ia":"did.iat","did.adid":"did.adid.enabled"},k;if(X.type&&X.id){k=(Y||"did.")+X.type;y[k]=X.id;if(X.id==="00000000-0000-0000-0000-000000000000"){X.tracking=false}if(i.hasOwnProperty(k)&&X.hasOwnProperty("tracking")){y[i[k]]=!!X.tracking}o()}};j.setAdvertisingID=function(i,k){y.ifa=i;if(i==="00000000-0000-0000-0000-000000000000"){k=true}if(V.defined(k)){y.lmt=(k)?1:0}};j.setOpenRTBParameters=function(k){var i;if(Object.prototype.toString.call(k)==="[object Object]"){u=k}else{if(typeof k==="string"){try{i=JSON.parse(k);this.setOpenRTBParameters(i)}catch(X){}}}};j.addOpenRTBParameter=function(ab,ac){var aa=ab.split("."),Y=u,ad,X,k;for(var Z=0;Z<aa.length;Z++){ad=aa[Z];if(Z===aa.length-1){Y[ad]=ac;break}X=ad.match(/(\w+)\[(\d+)\]/);if(X){ad=X[1];k=X[2];Y[ad]=Y[ad]||[];Y[ad][k]=Y[ad][k]||{};Y=Y[ad][k]}else{Y[ad]=Y[ad]||{};Y=Y[ad]}}};j.showAdUnit=function(X){var k=l[X],i;if(k){i=function(){if(V.getMedium()==="ma"&&!k.get("anchor")){return 0}if(x){return 0}if(k.get("framed")){return 1}if(V.defined(z)){return z}return !!OX.getFramed()}();k.render({framed:i,onAdUnitRenderStart:function(){a(T.ON_ADUNIT_RENDER_START,[k])},onAdUnitRenderFinish:function(){a(T.ON_ADUNIT_RENDER_FINISH,[k])},onAdRenderStart:function(){a(T.ON_AD_RENDER_START,[k])},onAdRenderFinish:function(Z,aa,Y){a(T.ON_AD_RENDER_FINISH,[Z,aa,Y])},onAdDefaulted:function(Z,aa,Y){a(T.ON_AD_DEFAULTED,[Z,aa,Y])},onAdNotDefaulted:function(Z,aa,Y){a(T.ON_AD_NOT_DEFAULTED,[Z,aa,Y])},shareFrameContents:OX.shareFrameContents,shouldCenterAd:(V.getMedium()==="ma")})}};window[v]=function(){a(T.ON_AD_REQUEST_ERROR,[j])};window[B]=function(i){if(y.cache===F.STORE_AD){if(S.useLocalRemoteCacheToken&&!S.remotelyCacheAd){V.cookie(O,y.o)}}else{if(y.cache===F.RETRIEVE_AD_CACHE_MISS&&S.useLocalRemoteCacheToken&&!S.remoteCacheToken){V.cookie(O)}j.loadAdResponse(i);j.setRequestEnd(i);a(T.ON_AD_RESPONSE,[j]);j.fetchAdsComplete()}};y.callback=B;j.setGateway(S&&S.gw||H.gw);j.setPageURL(S&&S.url||H.url);j.setRefererURL(S&&S.ref||H.ref);if(!window.postMessage){j.disableFeature("c")}if(S){j.setMode(K.IMMEDIATE);s.auid=S.auid;S.auid&&j.addAdUnit(s.auid);S.tid&&j.addContentTopic(S.tid);S.aumf&&j.setAdUnitMarketFloor(s.auid,S.aumf);S.aungf&&j.setAdUnitNGFloor(s.auid,S.aungf);S.tg&&j.setAnchorTarget(S.tg);S.imp_beacon&&j.setAdUnitImpBeacon(s.auid,S.imp_beacon);S.slot_id&&j.setAdUnitSlotId(s.auid,S.slot_id);if(S.fallback){j.setAdUnitFallback(s.auid,S.fallback);j.addHook(function(){j.showAdUnit(s.auid)},T.ON_AD_REQUEST_ERROR)}S.test&&j.setTest(S.test);S.userid&&j.setUserID(S.userid);S.r&&j.setClickRedirectURL(S.r);S.rd&&j.setRefreshDelay(S.rd);S.rm&&j.setRefreshMax(S.rm);S.md&&j.disableMarket();S.ns&&j.disableSegmentation();S.coords&&j.setCoords(S.coords);S.openrtb&&j.setOpenRTBParameters(S.openrtb);S.appName&&j.setAppName(S.appName);S.appBundle&&j.setAppBundleID(S.appBundle);S.appStoreURL&&j.setAppStoreURL(S.appStoreURL);S.af&&j.setAPIFrameworks(S.af);S.ifa&&j.setAdvertisingID(S.ifa,S.lmt);if(S.deviceIDs){for(var U=0;U<S.deviceIDs.length;U++){j.addDeviceID(S.deviceIDs[U])}}if(S.remotelyCacheAd){j.flagStoreRemoteCachedAd(S.remoteCacheToken)}if(S.remoteCacheToken&&!S.remotelyCacheAd){j.setRemoteCacheToken(S.remoteCacheToken)}if(S.useLocalRemoteCacheToken&&!y.cache){var n=V.getCookie(O);if(n){j.setRemoteCacheToken(n)}else{j.flagStoreRemoteCachedAd()}}if(S.vars){for(var R in S.vars){S.vars.hasOwnProperty(R)&&j.addVariable(R,S.vars[R])}}if(S.ef){for(var U=0;U<S.ef.length;U++){j.enableFeature(S.ef[U])}}if(S.df){for(var U=0;U<S.df.length;U++){j.disableFeature(S.df[U])}}if(V.defined(S.frameCreatives)){z=S.frameCreatives}S.forceUnframed&&(x=true);S.onResponse&&j.addHook(S.onResponse,T.ON_AD_RESPONSE);S.onAdUnitRender&&j.addHook(S.onAdUnitRender,T.ON_ADUNIT_RENDER_START);S.onAdUnitLoaded&&j.addHook(S.onAdUnitLoaded,T.ON_ADUNIT_RENDER_FINISH)}else{j.setMode(K.DEFERRED)}};
OX.AdUnit=OX.AdUnit||function(Z,l){var ab=OX.utils,c=OX.Hooks,j=this,E=OX.Resources,aa=Z,K=l,Y,T,t,R,m,M,I,u={adunit_id:Z,anchor:null,rm_anchor:null},x=false,O="dflt",s="dflt",h="loaded",d="flash",D="rich_media",a="ox_"+K+"_"+aa,o=parseInt("2500")||2500,ac=0,L="<script type='text/javascript'>var OX_swfobject = window.parent.OX.swfobject(window, document, navigator);<\/script>",A,k=a+"_ch_{i}",B=ab.IMAGE_BEACON_TEMPLATE,P="<script type='text/javascript'>(new Image()).src='{src}'{suffix}<\/script>",z="<script type='text/javascript'>(function() {attachListener(window, 'message', dflt);function dflt(e) {if (e.data === '#data#') {signalDefaultTo(window.parent);var frames = window.parent.frames;for (var i = 0; i < frames.length; i++) {signalDefaultTo(frames[i]);}window.frameElement.style.display = 'none';}}function signalDefaultTo(win) {try {win.OX.dflt('#rid#','#auid#',#index#);} catch(e) {var msg = JSON.stringify({action : '#data#',params : ['#rid#','#auid#',#index#]});win.postMessage(msg, '*');}}function attachListener(target, type, listener) {if (target.addEventListener) {target.addEventListener(type, listener, false);} else {target.attachEvent('on' + type, listener);}}})();<\/script>",C="<script type='text/javascript'>window.onload = function() {var html = document.documentElement.innerHTML;window.parent.OX.ifrmHTML('[rid]', '[auid]', html);};<\/script>",H="position: fixed; top: 50%; left: 50%; margin-left: -{leftMargin}px !important; margin-top: -{topMargin}px !important;",Q="<div id='{divID}' style='width: 100%; height: 100%;'>",w="</div>";var N=function(ad){this.renderStrategy=ad};N.prototype.render=function(ad){return this.renderStrategy(ad)};function y(af,ag,ae){var ad=false,ah;ab.attachListener(document,"readystatechange",function(){var ai=document.getElementById(af);if(document.readyState==="complete"&&ai&&!ad){ai.setAttribute("style",ab.template(H,{leftMargin:ag/2,topMargin:ae/2}))}});if(window.mraid){ah=mraid.addEventListener;mraid.addEventListener=function(){ad=true;ah.apply(mraid,arguments);mraid.addEventListener=ah}}}function G(af){var ae=A,ah={medium:ab.getMedium(),rtype:E.RI,txn_state:af.ts},ag="PostGazette";if(ag){ae+="&bs={bs}";ah.bs=ag}return ab.template(ae,ah)}function V(ad){r(ad)}function r(ae){var ag=u.fallback,af,ad,ah=function(){ae.onAdRenderFinish(j,Y,0);ae.onAdUnitRenderFinish()};if(Y&&Y.html&&(j.get("type")!==d)){af=G(Y);ad=J(B,{src:af});if(!j.get("is_fallback")){Y.html=Y.html+ad}}if(j.get("is_fallback")){ag=u.fallback||(Y&&Y.html)}else{if(Y&&Y.html){ag=Y.html+(u.imp_beacon||"")}}if(ag){if(ag===u.fallback&&ab.getMedium()==="ma"){W()}ae.onAdUnitRenderStart();if(ae.framed){X(ag,a,j.get("type")===d?L:"",j.get("width")||j.get("primary_width"),j.get("height")||j.get("primary_height"),ae.onAdRenderStart,ah,ae.shareFrameContents)}else{ae.onAdRenderStart();v(ag);ah()}}}function U(ad){I=ab.now();M=ad;M.onAdUnitRenderStart();e(0)}function n(ae){var ad,af;if(Y&&Y.html){ad=ab.template(A,{medium:ab.getMedium(),rtype:E.RR,txn_state:Y.ts});af=J(B,{src:ad});if(!j.get("is_fallback")){Y.html=af+Y.html}}r(ae)}function e(ai){var ak="",af="",ao="",aj="",ae,al,am,ah="",ag,an="",ad=u.chain,ap=ab.template(k,{i:ai});Y=ad[ai];T=ai;if(!M.renderTest){am=ab.template(A,{medium:ab.getMedium(),rtype:E.RR,txn_state:Y.ts});if(x&&(ai<ad.length-1)){am+="&cts=";ah=" + new Date().getTime();"}af=J(P,{src:am,suffix:ah})}if(ai<ad.length-1){F();ak=ab.template(z,{data:O,rid:K,auid:aa,index:ai},"#","#");Y.dflting=1;ae=g(ai);al=function(){ae();M.onAdRenderFinish(j,Y,ai)}}else{if(j.get("type")===d){ak=L}else{if(!M.renderTest){ag=G(Y);ao=J(P,{src:ag,suffix:an})}}if(j.get("is_fallback")){aj=u.fallback||(Y&&Y.html);af="";ao=""}else{if(Y&&Y.html){aj=Y.html+(u.imp_beacon||"")}}al=function(){M.onAdRenderFinish(j,Y,ai);M.onAdUnitRenderFinish()}}X(af+(aj||Y.html)+ao,ap,ak,Y.width,Y.height,M.onAdRenderStart,al,M.shareFrameContents)}function S(){return(ab.now()-I)>u.chain_timeout}function g(ad){return function(){window.setTimeout(function(){var ag=u.chain[ad],ae=ad+1,af;ag[h]=1;if(ag.hasOwnProperty(s)){if(S()){ae=u.chain.length-1}e(ae)}else{M.onAdNotDefaulted(j,ag,ad);if(!M.renderTest){af=G(Y);if(x){af+="&cte="+ab.now()}ab.beacon(af)}M.onAdUnitRenderFinish()}},ac)}}function X(ag,ad,ah,am,af,an,ai,ao){var al=(u.pre_html||"")+ag+(u.post_html||""),aj="",ae,ak;if(ao){aj=ab.template(C,{rid:K,auid:aa},"[","]")}ae=(u.head_html||"")+ah+aj;if(ab.isUnfriendlyFramed()&&j.get("type")===D){q(ad,am,af,ae,al,an,ai)}else{f(ad,am,af,ae,al,an,ai)}j.set("iframe_id",ad)}function q(ad,ak,af,aj,ag,al,ai){i(ah,ae);function ah(am){window.parent.postMessage(JSON.stringify({action:"render_ad",params:[ad,ak,af,aj,ag]}),"*");al();ab.attachListener(window,"message",function(an){if(an.source===am.contentWindow&&an.data===ad){ai()}})}function ae(){if(u.chain&&u.chain.length>T+1){e(T+1)}else{f(ad,ak,af,aj,ag,al,ai)}}}function f(ak,ae,ai,ah,ad,af,aj){var ag;if(ab.isFriendlyFramed()&&j.get("type")===D){if(!u.rm_anchor){u.rm_anchor=document.createElement("div");ab.append(window.frameElement,u.rm_anchor)}ag=u.rm_anchor;window.frameElement.style.display="none"}else{if(!u.anchor){u.anchor=document.createElement("div");if(!document.body&&ab.isFramed()){ab.write("<body style='margin:0;padding:0'></body>");document.body.appendChild(u.anchor)}else{ab.append(ab.lastScript(),u.anchor)}}ag=u.anchor}ab.produceFrame({hookNode:ag,replace:true,name:ak,width:ae,height:ai,headHTML:ah,bodyHTML:ad,onStart:af,onFinish:aj,onSuccess:function(al){if(ag===u.rm_anchor){u.rm_anchor=al}else{u.anchor=al}}})}function i(ak,ai){var af=document.referrer,ah=af.split("/"),ae=ah[0]+"//"+ah[2],ad=ae+"/ox_buster.html",aj,ag;aj=ab.createFrameElement("",0,0);aj.style.display="none";aj.src=ad;document.body.appendChild(aj);ab.attachListener(window,"message",function(al){if(al.source===aj.contentWindow){ag=true}});ab.attachListener(aj,"load",function(){setTimeout(function(){ag?ak(aj):ai()},100)});i=function(am,al){ag?am(aj):al()}}function v(ad){var af=(u.pre_html||"")+ad+(u.post_html||""),ae=af;if(!document.body&&ab.isFramed()){ae="<body style='margin:0;padding:0'>"+af+"</body>"}ab.write(ae)}function F(){ab.attachListener(window,"message",function(ad){try{var af=JSON.parse(ad.data);if(af.action===O){OX.dflt.apply(OX,af.params)}}catch(ae){}});F=function(){}}function b(ad){var ae=ab.template(A,{medium:ab.getMedium(),rtype:E.RDF,txn_state:ad.ts});if(x){ae+="&cte="+ab.now()}ab.beacon(ae)}var p=[{beaconURLs:[],beaconsRendered:false,shouldDefer:function(){return(window.mraid&&typeof mraid.isViewable==="function"&&!mraid.isViewable())},defer:function(ad){var ae=this;ae.beaconURLs.push(ad);mraid.addEventListener("viewableChange",function(ag){if(!ae.beaconsRendered&&ag){for(var af=0;af<ae.beaconURLs.length;af++){ab.beacon(ae.beaconURLs[af])}ae.beaconsRendered=true}})}},{shouldDefer:function(){return typeof trackImpressionHelper==="function"},defer:function(ad){var ae=trackImpressionHelper;trackImpressionHelper=function(){ab.beacon(ad);ae()}}},{shouldDefer:function(){return(window.admob&&typeof admob.isAdMobSdk==="function"&&admob.isAdMobSdk())},defer:function(ad){admob.events.addEventListener("onshow",(function(){var ae=false;return function(){if(!ae&&admob.opener.isOverlayShowing()){ab.beacon(ad);ae=true}}})())}}];function J(ag,aj,ak,ah){var ae=aj.src,ad="",ai;for(var af=0;af<p.length;af++){ai=p[af];if(ai.shouldDefer()){ai.defer(ae);return ad}}ad=ab.template(ag,aj,ak,ah);return ad}function W(){if(typeof trackImpressionHelper==="function"){trackImpressionHelper=function(){}}}j.dflt=function(ae){var af=u.chain[ae],ad=ae+1;if(af[s]){return}af[s]=1;b(Y);M.onAdDefaulted(j,af,ae);if(ab.isUnfriendlyFramed()&&af.type===D){window.parent.postMessage(JSON.stringify({action:"restore_busted_frame"}),"*")}else{if(ab.isFriendlyFramed()&&af.type===D){window.frameElement.style.display=""}}if(!M.renderTest){if(af.hasOwnProperty(h)){if(S()){ad=u.chain.length-1}e(ad)}}};j.get=function(ad){return u.hasOwnProperty(ad)?u[ad]:(Y&&Y[ad])};j.set=function(ad,ae){u[ad]=ae};j.getProperties=function(){return ab.merge([u,Y])};j.load=function(af){var ae=af.adunit,ag;A=af.rt;u.perf_id=af.perf_id;for(var ad in ae){if(ae.hasOwnProperty(ad)){u[ad]=ae[ad]}}if(u.size){ag=u.size.split("x");u.primary_width=ag[0];u.primary_height=ag[1]}u.chain_timeout=u.chain_timeout||o;if(af.chain){if(u.chain&&u.chain.length>0){if(u.chain.length>1){OX.addHook(function(aj){var ai=true;if(ai){var ah=OX.utils.fetchBrowserId();var ak=OX.utils.appendBrowserIdToPixelUrl("http://us-u.openx.net/w/1.0/pd?plm=6&ph=2968c969-f170-4578-9198-942acd4c7a77",ah);OX.utils.loadPixels(ak)}},c.ON_ADUNIT_RENDER_FINISH);t=new N(U)}else{Y=u.chain&&u.chain[0];t=new N(n)}}else{t=new N(V)}}else{Y=u.chain&&u.chain[0];t=new N(r)}R=1;m=0;af.oninit&&af.oninit(j)};j.render=function(ae){var aj,ak,ad=j.get("height"),ag=j.get("width"),af=j.get("pre_html")||"",ah=j.get("post_html")||"";if(ae.shouldCenterAd){ak="ox_ctr_"+ab.rand();af=ab.template(Q,{divID:ak})+af;ah+=ab.template(w);j.set("pre_html",af);j.set("post_html",ah);y(ak,ag,ad)}if(ab.isFramed()){try{aj=ab.detectWindowDimensions(window,document);if(aj.height<ad){window.frameElement.height=ad;window.frameElement.style.height=ad+"px"}if(aj.width<ag){window.frameElement.width=ag;window.frameElement.style.width=ag+"px"}}catch(ai){}}if(m){return}j.set("framed",ae.framed);if(!R){t=new N(V)}t.render(ae);m=1}};
/*! SWFObject v2.2 <http://code.google.com/p/swfobject/> is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> */
;OX.swfobject=function(N,j,t){var P=OX.utils.defined,r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",N=N||window,j=j||document,t=t||navigator,T=false,U=[h],o=[],M=[],H=[],l,Q,D,B,I=false,a=false,n,F,m=true,L=function(){var aa=P(j.getElementById)&&P(j.getElementsByTagName)&&P(j.createElement),ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(P(t.plugins)&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(P(t.mimeTypes)&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(P(N.ActiveXObject)){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!L.w3){return}if((P(j.readyState)&&j.readyState=="complete")||(!P(j.readyState)&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!I){if(P(j.addEventListener)){j.addEventListener("DOMContentLoaded",f,false)}if(L.ie&&L.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(N==top){(function(){if(I){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(L.wk){(function(){if(I){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(I){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}I=true;var X=U.length;for(var Y=0;Y<X;Y++){U[Y]()}}function J(X){if(I){X()}else{U[U.length]=X}}function s(Y){if(P(N.addEventListener)){N.addEventListener("load",Y,false)}else{if(P(j.addEventListener)){j.addEventListener("load",Y,false)}else{if(P(N.attachEvent)){i(N,"onload",Y)}else{if(typeof N.onload=="function"){var X=N.onload;N.onload=function(){X();Y()}}else{N.onload=Y}}}}}function h(){if(T){V()}else{G()}}function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);aa.setAttribute("type",q);aa.setAttribute("style","display:none;");var Z=X.appendChild(aa);if(Z){var Y=0;(function(){if(P(Z.GetVariable)){var ab=Z.GetVariable("$version");if(ab){ab=ab.split(" ")[1].split(",");L.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}else{if(Y<10){Y++;setTimeout(arguments.callee,10);return}}X.removeChild(aa);Z=null;G()})()}else{G()}}function G(){var ag=o.length;if(ag>0){for(var af=0;af<ag;af++){var Y=o[af].id;var ab=o[af].callbackFn;var aa={success:false,id:Y};if(L.pv[0]>0){var ae=c(Y);if(ae){if(E(o[af].swfVersion)&&!(L.wk&&L.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad<ac;ad++){if(X[ad].getAttribute("name").toLowerCase()!="movie"){ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value")}}O(ai,ah,Y,ab)}else{p(ae);if(ab){ab(aa)}}}}}else{w(Y,true);if(ab){var Z=z(Y);if(Z&&P(Z.SetVariable)){aa.success=true;aa.ref=Z}ab(aa)}}}}}function z(aa){var X=null;var Y=c(aa);if(Y&&Y.nodeName=="OBJECT"){if(P(Y.SetVariable)){X=Y}else{var Z=Y.getElementsByTagName(r)[0];if(Z){X=Z}}}return X}function A(){return !a&&E("6.0.65")&&(L.win||L.mac)&&!(L.wk&&L.wk<312)}function O(aa,ab,X,Z){a=true;D=Z||null;B={success:false,id:X};var ae=c(X);if(ae){if(ae.nodeName=="OBJECT"){l=g(ae);Q=null}else{l=ae;Q=X}aa.id=R;if(!P(aa.width)||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){aa.width="310"}if(!P(aa.height)||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){aa.height="137"}j.title=j.title.slice(0,47)+" - Flash Player Installation";var ad=L.ie&&L.win?"ActiveX":"PlugIn",ac="MMredirectURL="+N.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;if(P(ab.flashvars)){ab.flashvars+="&"+ac}else{ab.flashvars=ac}if(L.ie&&L.win&&ae.readyState!=4){var Y=C("div");X+="SWFObjectNew";Y.setAttribute("id",X);ae.parentNode.insertBefore(Y,ae);ae.style.display="none";(function(){if(ae.readyState==4){ae.parentNode.removeChild(ae)}else{setTimeout(arguments.callee,10)}})()}u(aa,ab,X)}}function p(Y){if(L.ie&&L.win&&Y.readyState!=4){var X=C("div");Y.parentNode.insertBefore(X,Y);X.parentNode.replaceChild(g(Y),X);Y.style.display="none";(function(){if(Y.readyState==4){Y.parentNode.removeChild(Y)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.replaceChild(g(Y),Y)}}function g(ab){var aa=C("div");if(L.win&&L.ie){aa.innerHTML=ab.innerHTML}else{var Y=ab.getElementsByTagName(r)[0];if(Y){var ad=Y.childNodes;if(ad){var X=ad.length;for(var Z=0;Z<X;Z++){if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8)){aa.appendChild(ad[Z].cloneNode(true))}}}}}return aa}function u(ai,ag,Y){var X,aa=c(Y);if(L.wk&&L.wk<312){return X}if(aa){if(!P(ai.id)){ai.id=Y}if(L.ie&&L.win){var ah="";for(var ae in ai){if(ai[ae]!=Object.prototype[ae]){if(ae.toLowerCase()=="data"){ag.movie=ai[ae]}else{if(ae.toLowerCase()=="styleclass"){ah+=' class="'+ai[ae]+'"'}else{if(ae.toLowerCase()!="classid"){ah+=" "+ae+'="'+ai[ae]+'"'}}}}}var af="";for(var ad in ag){if(ag[ad]!=Object.prototype[ad]){af+='<param name="'+ad+'" value="'+ag[ad]+'" />'}}aa.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</object>";M[M.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(L.ie&&L.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);H[H.length]=[Z,X,Y]}function E(Z){var Y=L.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(L.ie&&L.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;F=null}if(!n||F!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(L.ie&&L.win&&P(j.styleSheets)&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}F=X}if(L.ie&&L.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&P(j.createTextNode)){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(I&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function K(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&P(encodeURIComponent)?encodeURIComponent(Y):Y}var d=function(){if(L.ie&&L.win){window.attachEvent("onunload",function(){var ac=H.length;for(var ab=0;ab<ac;ab++){H[ab][0].detachEvent(H[ab][1],H[ab][2])}var Z=M.length;for(var aa=0;aa<Z;aa++){y(M[aa])}for(var Y in L){L[Y]=null}L=null;for(var X in OX_swfobject){OX_swfobject[X]=null}OX_swfobject=null})}}();return{registerObject:function(ab,X,aa,Z){if(L.w3&&ab&&X){var Y={};Y.id=ab;Y.swfVersion=X;Y.expressInstall=aa;Y.callbackFn=Z;o[o.length]=Y;w(ab,false)}else{if(Z){Z({success:false,id:ab})}}},getObjectById:function(X){if(L.w3){return z(X)}},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:false,id:ah};if(L.w3&&!(L.wk&&L.wk<312)&&ab&&ah&&ae&&ag&&Y){w(ah,false);J(function(){ae+="";ag+="";var aj={};if(af&&typeof af===r){for(var al in af){aj[al]=af[al]}}aj.data=ab;aj.width=ae;aj.height=ag;var am={};if(ad&&typeof ad===r){for(var ak in ad){am[ak]=ad[ak]}}if(Z&&typeof Z===r){for(var ai in Z){if(P(am.flashvars)){am.flashvars+="&"+ai+"="+escape(Z[ai])}else{am.flashvars=ai+"="+escape(Z[ai])}}}if(E(Y)){var an=u(aj,am,ah);if(aj.id==ah){w(ah,true)}X.success=true;X.ref=an}else{if(aa&&A()){aj.data=aa;O(aj,am,ah,ac);return}else{w(ah,true)}}if(ac){ac(X)}})}else{if(ac){ac(X)}}},switchOffAutoHideShow:function(){m=false},ua:L,getFlashPlayerVersion:function(){return{major:L.pv[0],minor:L.pv[1],release:L.pv[2]}},hasFlashPlayerVersion:E,createSWF:function(Z,Y,X){if(L.w3){return u(Z,Y,X)}else{return undefined}},showExpressInstall:function(Z,aa,X,Y){if(L.w3&&A()){O(Z,aa,X,Y)}},removeSWF:function(X){if(L.w3){y(X)}},createCSS:function(aa,Z,Y,X){if(L.w3){v(aa,Z,Y,X)}},addDomLoadEvent:J,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;if(Z){if(/\?/.test(Z)){Z=Z.split("?")[1]}if(aa==null){return K(Z)}var Y=Z.split("&");for(var X=0;X<Y.length;X++){if(Y[X].substring(0,Y[X].indexOf("="))==aa){return K(Y[X].substring((Y[X].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var X=c(R);if(X&&l){X.parentNode.replaceChild(l,X);if(Q){w(Q,true);if(L.ie&&L.win){l.style.display="block"}}if(D){D(B)}}a=false}}}};var OX_swfobject=OX_swfobject||OX.swfobject(window,document,navigator);
OX.ud=OX.ud||{};OX.browser_id=OX.browser_id||function(){var h=OX.utils,i=h.browserIDKey(),a="OX_u",b=60*60*24*180,d=".",e,c=false;function g(){var l=new Date().getTime();var k="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){var m=(l+Math.random()*16)%16|0;l=Math.floor(l/16);return(n=="x"?m:(m&3|8)).toString(16)});return k}function j(){return h.getCookie(a)!=undefined}function f(k,l){if(k.length!=3){return true}var m=parseInt(k[2]);return isNaN(m)||(m+b<l)}e={get:function(){if(j()){return undefined}var k=h.store.get(i),m=[],l=Math.round(h.now()/1000);currTimeStr=l.toString();if(k){m=k.split(d)}if(f(m,l)){new_bi=g();if(h.store.put(i,[new_bi,currTimeStr,currTimeStr].join(d))){return[new_bi,currTimeStr]}}else{if(h.store.put(i,[m[0],m[1],currTimeStr].join(d))){return[m[0],m[1]]}}}};return e}();"use strict";OX.tp_bi=OX.tp_bi||function(){var b=[["liveramp","idsync.rlcdn.com/396836.gif?partner_uid=","e508c905-ddce-4732-92a4-0b0f5b72a28f"],["comscore","ads.scorecardresearch.com/p?c1=9&c2=13554685&c3=2&rn=[TIMESTAMP]&cs_xi=","16b43347-54eb-4af6-9a28-e449f503d935"]];var k=OX.utils,i="{ep}?{arg}",j="us-u.openx.net",n="w",c="1.0/cm",o="BI",f="/",a="comscore,liveramp",h="[TIMESTAMP]",e="BI_TS",d=60*60*24*15,g;var m=function(){var q=k.store.get(e);var p=Math.round(k.now()/1000);if(q){return parseInt(q)+d<p}return true};var l=function(q){if(q){var p=Math.round(k.now()/1000);k.store.put(e,p)}};g={sync:function(p){if(!p||!j||j==="undefined"){return}var w=false;for(var r=0;r<b.length;r++){if(m()&&a.indexOf(b[r][0])!=-1){w=true;var u=k.ensureRightProtocol(b[r][1]);u=u.replace(h,k.now());var t=b[r][2];var s=[j,n,c].join(f);var v=k.serialize({id:t,bi:p,r:u});var q=k.template(i,{ep:s,arg:v});(new Image()).src=k.ensureRightProtocol(q)}}l(w)}};return g}();
 !function(){OX.init();OX.setGateway("http://pittpostgazette-d.openx.net/w");var b=true;var a=OX.utils.fetchBrowserId();var h=OX.utils.appendBrowserIdToPixelUrl("http://us-u.openx.net/w/1.0/pd?plm=6&ph=2968c969-f170-4578-9198-942acd4c7a77",a);if(b){OX.utils.attachListener(window,"load",function(){OX.utils.loadPixels(h);OX.utils.loadBrowserIdPixels(a)})}var f;while(window.OX_cmds&&(f=OX_cmds.shift())){if(typeof f==="function"){f()}}var g=window.OX_reporter_cmds;if(!g){try{g=window.top.OX_reporter_cmds}catch(e){}}for(var c in g){if(typeof g[c]==="function"){g[c](window)}}var d;while(window.OX_ads&&(d=OX_ads.shift())){d.hasOwnProperty("slot_id")?OX.load(d):OX.requestAd(d)}}(); window.OXHBConfig = {}; OXHBConfig = { "oxns" : "OX", "host" : "pittpostgazette-d.openx.net", "medium" : "w", "expVer" : "", "ad_position_detection_enabled" : true, "siteName" : "PostGazette", "js_cookies_enabled" : true, "passthrough_args" : "ai=401d1236-af66-4a9a-92db-e9e9a79d192c", "has_pixels" : true, "pixel_url" : "http://us-u.openx.net/w/1.0/pd?plm=6&ph=2968c969-f170-4578-9198-942acd4c7a77", "chain_timing_enabled" : false, "browser_id" : true, "chain_timeout" : "2500", "xdi_tapad" : false }; OXHBConfig.DFP_mapping = {"timeout": 2500, "max_bucket": 2000, "hb_ver": "2.0", "prefetch": {"auid": 538288143, "slots": [["728x90", "300x250", "728x90", "300x250", "300x250", "300x250", "300x250"]]}, "ms": true, "/6785150": {"300x600": 538771293, "728x90": 538771293, "320x50": 538771293, "300x250": 538771293, "160x600": 538771293}};
/*! hb-sdk v2.0.22-18 */
var oxhbjs=function(e){function t(n){if(i[n])return i[n].exports;var r=i[n]={exports:{},id:n,loaded:!1};return e[n].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var i={};return t.m=e,t.c=i,t.p="",t(0)}([function(e,t,i){i(6);var n=(i(1),i(47),i(16),i(3),i(42));e.exports=n},function(e,t,i){var n=function(){for(var e=arguments[0],t=Array.prototype.slice.call(arguments,1),i=0,n=t.length;i<n;i++)for(var r=t[i],o=Object.keys(r),a=0,s=o.length;a<s;a++){var d=o[a],c=r[d];"undefined"!=typeof c&&(e[d]=c)}return e};e.exports=n.apply(this,[{},i(17),i(7),i(33),i(32),i(19),i(35),i(12),i(23),i(37),i(34)])},function(e,t,i){var n=i(25);e.exports=new n},function(e,t,i){var n=i(1),r={MAX_BUCKET:2e3,TIER_1:1e3,TIER_2:5e3,MAX_BUCKET_MULTIPLIER:10,TIMEOUT:2500,FAILSAFE_TIMEOUT_BUFFER:1e3,SUPPORTED_AD_UNIT_SIZES:{300:["250","600","1050"],320:["480","50"],728:["90"],768:["1024"],160:["600"],970:["90","250"],468:["60"],120:["600"],480:["320"],336:["280"],1024:["768"]},OX_DFP_HEIGHT_DELTA:5,SLOT_STATUS:{BYPASS:1,READY:2,REQUESTED:3,TIMED_OUT:8,REFRESHING:9,DIL_REFRESH_SKIP:10,RESPONDED:4,DISPLAYING:5,DISPLAYED:6,CREATED:7},REQUEST_STATUS:{READY:2,REQUESTED:3,RESPONDED:4,TIMEOUT:5},BID_EXPIRATION_THRESHOLD:27e4,SI_BEACON_DEBOUNCE_WAIT_MS:5e3,BID_ID_PREFIX:"hb-bid-",RELEASE_CANDIDATE_EXCEPTION_REPORT_PATH_TEMPLATE:'//{host}/{medium}/1.0/exc?ee={experimentVersion}&trc="{errorString}"&timestamp={timestamp}',EXCEPTION_REPORT_PATH_TEMPLATE:'//{host}/{medium}/1.0/exc?trc="{errorString}"&timestamp={timestamp}',EXCEPTION_REPORT_TEMPLATE:"[{context}] [{siteUrl}] {stackTrace}",TARGETING_MAP_SEARCH_PREFIXES:["ox","meta"],BC_BIDDER_TYPES:{STANDARD_BIDDER:"hb_2",API_BIDDER:"hb_2api",PREFETCH_BIDDER:"hb_2prf",PREFETCH_WITH_DEFINED_SLOTS_BIDDER:"hb_2prfds",SLOT_CACHING_BIDDER:"hb_2sc"},JSONP_RESPONSE_HANDLER_PREFIX:"ox_jsonp_handler_",AUCTION_TYPES:{STANDARD:"standard",PREFETCH:"prefetch",SLOT_CACHE:"slot_cache",SLOT_CACHE_FALLBACK:"slot_cache_fallback"},AD_REQUEST_GATEWAY_ENDPOINTS:["/br?"],HANDLER_FN_CALL:"parse_hb_br_"};r.SLOT_STATUS=n.keyMirror(r.SLOT_STATUS),e.exports=r},function(e,t,i){var n=i(1).keyMirror,r={DEBUG:null,ERROR:null,WARN:null,START_AUCTION:null,AUCTION_START:null,AUCTION_BID_REQUESTED:null,BIDS_REQUESTED:null,AUCTION_BID_RECEIVED:null,SLOT_CACHED_BID_REQUESTS_RECEIVED:null,BID_RECEIVED:null,BID_RENDERED:null,AUCTION_POST_BID_RECEIVED:null,END_AUCTION:null,AUCTION_END:null,AUCTION_COMPLETE:null,GET_POST_BIDS:null,BID_ON_FLIGHT:null,AUCTION_TIMEOUT_START:null,BID_EXPIRED:null,BIDDER_ADAPTOR_ERROR:null};e.exports=n(r)},function(e,t,i){function n(e,t,i,n){var s,d={context:e.context||void 0,escalate:e.escalate||!1,scope:e.scope||this},c={context:d.context,siteUrl:window.location.href,stackTrace:""};try{t.call(d.scope)}catch(u){if(c.stackTrace=u.stack,s=a.template(o.EXCEPTION_REPORT_TEMPLATE,c),d.escalate||r(s),i&&i.call(d.scope,u,s),d.escalate)throw u}finally{if(n)return n.call(d.scope)}}function r(e){var t={host:c&&c.host,medium:c&&c.medium,errorString:encodeURIComponent(e)||"",timestamp:+new Date,experimentVersion:c&&c.expVer};if(c){var i=c.expVer?o.RELEASE_CANDIDATE_EXCEPTION_REPORT_PATH_TEMPLATE:o.EXCEPTION_REPORT_PATH_TEMPLATE;a.beacon(a.template(i,t))}else d.emit(s.WARN,"gatewayExceptionCall: bidder config host is not configured!")}var o=i(3),a=i(19),s=i(4),d=i(2),c=window.OXHBConfig;e.exports={tryCatch:n,gatewayExceptionCall:r}},function(e,t,i){function n(){f._each(w(function(e){return e.isUsingDiv&&!e.used}),function(e){e.isUsingDiv=void 0})}function r(e,t){var i=0,n=0;if(!t||!t.expectedBidsByBidder||!t.expectedBidsByDivId)return void S.emit(h.WARN,"updateAuctionFromSsMetaRequestConfig failed.",t);if(t.completed)return void S.emit(h.WARN,"updateAuctionFromSsMetaRequestConfig called after auction completed.",t);if(f._each(e.slots,function(e){t.expectedBidsByDivId[e.div]||(t.expectedBidsByDivId[e.div]=0),f._each(e.bids,function(r,o){t.expectedBidsByBidder[o]||(t.expectedBidsByBidder[o]=0),t.expectedBidsByBidder[o]++,t.expectedBidsByDivId[e.div]++,n++,i++})}),i!==n)throw new Error("updateExpectedBids found auction with different expected bids by divId and by Bidder.");l.expectedBids=i}function o(e,t,i,n,r){var o;if(!e.timestamp)return!1;if(e.div!==t){var a=f.domElById(e.div);if(a&&!e.prefetched)return!1}return!!f.isSubset(i,[e.getSize()])&&(!(!n&&!e.cpm)&&(e.bidderCode===r&&(o=e.timestamp<f.dateNow()-m.BID_EXPIRATION_THRESHOLD,!(e.rendered||o||e.used||e.isUsingDiv))))}function a(e,t){return A(e)?(e.timestamp=new Date,y.push(e),E[e.id]=e,e.exp&&(e.ttlTimer=setTimeout(function(){P(e.id)},+e.exp)),void s(e,t)):void S.emit(h.ERROR,"addBid could not add bid, required fields: bidderCode, auction_id, div, adunit",e)}function s(e,t){p.tryCatch({escalate:!0},function(){var i=T&&T[e.auction_id];if(t=void 0!==t&&t,t&&(i&&i.type===m.AUCTION_TYPES.SLOT_CACHE||!i)){var n=B[e.div],r=n&&n.length;if(n&&r>0){var o=n[r-1];if(o){for(;o&&o.completed;)n.pop(),o=n[r-1];o&&o.expectedBidsByDivId[e.div]<1&&S.emit(h.ERROR("Cached Bids: Auction div accounting error.  Some auctions get more bids than they are expecting.")),e.auction_id=o&&o.id,i=o,o&&0===o.expectedBidsByDivId[e.div]&&B[e.div].pop()}}}if(!(i&&i.completed||!i)){if(i.returnedBids++,i.expectedBidsByBidder[e.bidderCode]--,i.expectedBidsByDivId[e.div]--,0===i.expectedBidsByDivId[e.div]&&B[e.div])for(var a=0;a<B[e.div].length;a++){var s=B[e.div][a];if(s&&s.id===i.id){B[e.div].splice(a,1);break}}S.emit(h.BID_RECEIVED,e,t),i.returnedBids==i.expectedBids&&C(i)}},function(e,t){S.emit(h.ERROR,"updateBidAuctionAndReturnToBaseBidder exception: ",e)})}function d(e,t){return e.cpm>t.cpm?-1:e.cpm<t.cpm?1:e.prefetched&&!t.prefetched?-1:t.prefetched&&!e.prefetched?1:0}var c,u,l,f=i(1),p=i(5),g=i(30),h=i(4),m=i(3),v=i(9),_={},y=[],E={},T={},B={},S=i(2);t.addAdapter=function(e,t){S.emit(h.DEBUG,"Adding "+t+" adapter",e),e&&t&&f.isFn(e.callBids)&&("ssmeta"===t?c=e:"prefetch"===t?u=e:_[t]=e)},t.reset=function(){c=void 0,_={},y=[],E={},delete i.c[9],v=i(9)},t.clearMatchedButUnusedBids=n,t.fetchBids=function(e,t,i,y){if(_=y||_,!e)return void S.emit(h.ERROR,"fetchBids failed, no config.");if(t&&!f.isFn(t)&&(S.emit(h.WARN,"fetchBids called with improper callback"),t=null),i&&!f.isInteger(i)&&(S.emit(h.WARN,"fetchBids called with improper timeout"),i=null),!c&&_=={})return void S.emit(h.WARN,"fetchBids called with no adapters");n();var E=g.createAuction(e.type,t),A={};if(T[E.id]=E,l=E,c)p.tryCatch({escalate:!0},function(){e.params=e.params||{},e.params.auction_id=E.id,r(e,E),c.callBids(e)},function(e,t){S.emit(h.BIDDER_ADAPTOR_ERROR,"Bidder: ssmeta caused an error.",e)});else if(e.type===m.AUCTION_TYPES.SLOT_CACHE)u.callBids(E.id);else{for(var b in _)if(_.hasOwnProperty(b)){var D=(_[b],[]),R={params:e.params[b]};E.expectedBidsByBidder[b]=0;for(var O in e.slots)if(e.slots.hasOwnProperty(O)&&e.slots[O].bids&&e.slots[O].bids[b]){var I,P=e.slots[O],N={};if(N.div=P.div,N.adunit=P.adunit,N.sizes=P.sizes,N.params={},e.params&&e.params[b])for(I in e.params[b])e.params[b].hasOwnProperty(I)&&(N.params[I]=e.params[b][I]);for(I in P.bids[b])P.bids[b].hasOwnProperty(I)&&(N.params[I]=P.bids[b][I]);P.targetingMap&&(N.targetingMap=P.targetingMap),P.floor&&(N.floor=P.floor),D.push(N),E.expectedBidsByBidder[b]++,E.expectedBids++}D.length>0&&(R.bids=D,R.auction_id=E.id,R.bidderCode=b,R.type=e.type,R.timeLimit=e.timeLimit,e.pageTargeting&&(R.pageTargeting=e.pageTargeting),A[b]=R)}0!==E.expectedBids&&(S.emit(h.DEBUG,"fetchBids::bids in bidPool:",f._map(w(),function(e){return e.used?"USED":e.id+"|"+e.isUsingDiv}).join(", ")),f._each(_,function(t,i){function n(e){var t={};e&&e.divs&&e.divs.length&&(t=e.divs&&e.divs.reduce(function(t,i,n){return t[i]={div:i,oxAdUnitId:parseInt(e.slots[n],10),sizes:f.normalizeSizes(e.sizes[n])},t},{})),A[i].bids=A[i].bids.reduce(function(e,i){return t[i.div]&&t[i.div].oxAdUnitId===i.params.adunitid&&f.isSubset(t[i.div].sizes,i.sizes)||e.push(i),e},[]),f._each(A[i].bids,function(e){B[e.div].pop()}),c(_[i],A[i])}function r(){c(_[i],A[i])}function c(e,t){f._each(e.callBids(t),function(e){e.then(function(e){f._each(e,function(e){a(e,!1)})})})}var u=[];A[i]&&f._each(A[i].bids,function(t){var n;E.expectedBidsByDivId[t.div]||(E.expectedBidsByDivId[t.div]=0),E.expectedBidsByDivId[t.div]++,E.type===m.AUCTION_TYPES.SLOT_CACHE_FALLBACK&&(B[t.div]=B[t.div]||[],B[t.div].push(E));var r=w(function(n){return o(n,t.div,t.sizes,e.noFillsAllowed,i)});S.emit(h.DEBUG,"fetchBids::cachedBids:",i,t.div,f._map(r,function(e){return e.id}).join(", ")),r.length>0?(r.sort(d),n=r[0],n.auction_id=E.id,n.isUsingDiv=t.div,n.prefetched&&(n.div=t.div,n.prefetched=!1),S.emit(h.DEBUG,"Unused bid "+n.id+" is being used for "+t.div),setTimeout(function(){s(n,!0)},0)):u.push(t)}),u.length&&p.tryCatch({escalate:!0},function(){A[i].bids=u,S.emit(h.BIDS_REQUESTED,A[i]),"openx"===i?e.type===m.AUCTION_TYPES.SLOT_CACHE_FALLBACK?v.getSlotCache(window.OXHBConfig.host,window.OXHBConfig.medium,window.location.href).then(n,r):c(_[i],A[i]):_[i].callBids(A[i])},function(e,t){S.emit(h.BIDDER_ADAPTOR_ERROR,"Bidder:"+i+" caused an error.",e)})}))}return 0===E.expectedBids?(e.type!==m.AUCTION_TYPES.PREFETCH&&e.type!==m.AUCTION_TYPES.SLOT_CACHE&&S.emit(h.WARN,"fetchBids called with invalid params or no valid bid requests",e),setTimeout(function(){C(E)},0),E):(S.emit(h.AUCTION_START,E),E.startTime=new Date,i&&setTimeout(function(){E.ended||x(E.id)},1*i),E)},t.getAuctions=function(){var e=[];for(var t in T)T.hasOwnProperty(t)&&e.push(T[t]);return e},t.getAuctionByAuctionId=function(e){return e?T[e]:null},t.setExpectedBids=function(e,t){if(!(l&&l.expectedBidsByBidder&&f.isStr(e)&&f.isInteger(t)))return void S.emit(h.WARN,"setExpectedBidsCount failed.",e);if(l.completed)return void S.emit(h.WARN,"setExpectedBidsCount called after auction completed.",e);var i=0;l.expectedBidsByBidder[e]=1*t;for(var n in l.expectedBidsByBidder)l.expectedBidsByBidder.hasOwnProperty(n)&&(i+=l.expectedBidsByBidder[n]);l.expectedBids=i};var A=function(e){return e&&e.bidderCode&&e.auction_id&&e.div},w=function(e){for(var t=[],i=0;i<y.length;i++)e&&!e(y[i])||t.push(y[i]);return t},b=function(e){return w(function(t){return t.auction_id==e})},D=function(e){return w(function(t){return t.div==e})},R=function(e){return w(function(t){return t.adunit==e})},O=function(e){return w(function(t){e=f.normalizeSizes(e);for(var i=0;i<e.length;i++)if(e[i]==t.getSize())return!0;return!1})},I=function(e){return E[e]},P=function(e){var t=0,i=y.length,n=E[e];if(!n)return null;for(delete E[e],S.emit(h.BID_EXPIRED,n);t<i;t++)if(e===y[t].id)return y.splice(t,1),n};t.getBidById=I,t.getBids=w,t.getBidsByAuctionId=b,t.getBidsByDiv=D,t.getBidsByAdunit=R,t.getBidsBySizes=O,t.deleteBidById=P,t.addBid=a,t.renderBid=function(e,t){var i=!1;if(!e||!f.isStr(e)||!t)return S.emit(h.ERROR,"renderBid called with improper arguments",e,t),i;var n=E[e];return n?n.rendered?(S.emit(h.ERROR,"renderBid called but bid already rendered.",e),i):void p.tryCatch({escalate:!0},function(){i=!0,n.renderBid&&f.isFn(n.renderBid)?n.renderBid(t):f.renderCreative(n.ad,t,n.height,n.width,n.id),n.rendered=i,S.emit(h.BID_RENDERED,n)},function(e,t){i=!1,S.emit(h.ERROR,"renderBid failed to render.",e)},function(){return i}):(S.emit(h.ERROR,"renderBid called but could not find bid.",e),i)};var x=function(e){if(!e||!f.isStr(e))return void S.emit(h.ERROR,"endAuction called with improper argument",e);var t=T[e];return t?(t.ended&&S.emit(h.WARN,"endAuction called but auction has already ended.",e),t.ended=!0,t.endTime=new Date,void S.emit(h.AUCTION_END,t)):void S.emit(h.ERROR,"endAuction called but could not find auction.",e)};t.endAuction=x;var C=function(e){e.completed=!0,e.complete_time=new Date,e.ended||(e.callback&&e.callback(b(e.id)),x(e.id)),S.emit(h.AUCTION_COMPLETE,e)}},function(e,t){var i="Array",n="String",r="Function",o=Object.prototype.toString;t.isSubset=function(e,t){var i,n;if(!this.isValidArray(e)||!this.isValidArray(t))return!1;if(e.length<t.length)return!1;for(i=0;i<t.length;i++)for(n=0;n<e.length&&t[i]!==e[n];n++)if(n===e.length-1)return!1;return!0},t.isA=function(e,t){return o.call(e)==="[object "+t+"]"},t.isFn=function(e){return this.isA(e,r)},t.isDefined=function(e){return"undefined"!=typeof e},t.isStr=function(e){return this.isA(e,n)},t.isArray=function(e){return this.isA(e,i)},t.isValidArray=function(e){return e&&this.isArray(e)&&0!==e.length},t.isNumeric=function(e){return!this.isArray(e)&&e-parseFloat(e)+1>=0},t.isInteger=function(e){return this.isNumeric(e)&&e%1===0},t.isEmpty=function(e){if(!e)return!0;if(this.isArray(e)||this.isStr(e))return e.length<=0;for(var t in e)if(hasOwnProperty.call(e,t))return!1;return!0}},function(e,t,i){function n(e){var t=E.bm;t||(t=1);var i,n=1e3*e/t,r=Math.min(n,f);return r>0&&r<25&&(r=25),i=n<p?5*Math.round(r/50):n<g?10*Math.round(r/100):50*Math.round(r/500),i+""}function r(){var e=window.OXHBConfig;return e&&e.oxns&&"OX"!==e.oxns?window[e.oxns]:window.OX}function o(e,t,i){var n,r={medium:window.OXHBConfig.medium,rtype:t,txn_state:i};return"ri"===t&&(e+="&bs={bs}",r.bs=window.OXHBConfig&&window.OXHBConfig.siteName),n=a(e,r),h.getImgBeacon(n)}function a(e,t){return window.OXHBConfig&&window.OXHBConfig.expVer&&(e+="&ee={ee}",s(t,window.OXHBConfig&&window.OXHBConfig.expVer)),h._each(v.AD_REQUEST_GATEWAY_ENDPOINTS,function(i){new RegExp(i).test(e)&&(e+="&bc={bc}",d(t))}),h.template(e,t)}function s(e,t){e.ee=t}function d(e){e.bc=window.OXHBConfig&&window.OXHBConfig._bidderConfiguration}function c(e,t,i,n,r,o,a){_.addBid(u(e,t,i,n,o,a),!!r)}function u(e,t,i,r,a,s){var d,c,u=i&&i.get("chain_revenue"),l=i&&i.get("pub_rev"),f=Date.now();if(i&&(u||l)){d=m.createBid(1);var p,g,h,_=i.get("chain"),T=_&&_.length&&_[_.length-1],B=_&&_[0],S=T&&T.tbd,A=u||T&&T.pub_rev;c=T?T.ts:"",d.transactionState=c,d.ad_id=i.get("ad_id"),d.adUnit=i,d.perf_id=i.get("perf_id"),d.perfMetrics=a,d.cpm=Number(A)/1e3,d.secondPrice=Number(A)/1e3,d.secondPriceBucket=n(d.secondPrice,E.bm),S&&(d.firstPrice=Number(S)/1e3,d.firstPriceBucket=n(d.firstPrice,E.bm)),d.deal_id=T?T.deal_id:void 0,d.pmp=1===i.get("auct_win_is_deal"),p=T?T.html||T.ad_url:"",g=o(r,"rr",c),h=o(r,"ri",c),d.ad=g+p+h,d.adUrl=i.get("ad_url"),d.width=i.get("width")||B&&B.width,d.height=i.get("height")||B&&B.height,d.renderBid=function(e){var t=document.createElement("div");e.appendChild(t),d.adUnit.set("anchor",t),d.adUnit.render({framed:1,onAdUnitRenderStart:function(){},onAdUnitRenderFinish:function(){},onAdRenderStart:function(){},onAdRenderFinish:function(e,t,i){},onAdDefaulted:function(e,t,i){},onAdNotDefaulted:function(e,t,i){},shareFrameContents:y.shareFrameContents})},d.noFill=!1,d.exp=v.BID_EXPIRATION_THRESHOLD}else d=m.createBid(2),d.cpm=0,d.secondPrice=0,d.secondPriceBucket=n(d.secondPrice,E.bm),d.noFill=!0;return d.div=t,d.auction_id=e,d.bidderCode="openx",d.bidRequestStartTs=s,d.bidResponseReceivedTs=f,d}var l,f,p,g,h=i(1),m=i(11),v=i(3),_=i(6),y=r(),E=window.OXHBConfig&&window.OXHBConfig.DFP_mapping||{};l=E.max_bucket||v.MAX_BUCKET,p=v.TIER_1,g=v.TIER_2,f=l*v.MAX_BUCKET_MULTIPLIER,e.exports={addBid:c,buildBid:u,getOX:r,getRequestUrl:a}},function(e,t,i){function n(e,t,i){return r?r:r=new Promise(function(n,r){var s=l.SI.RESPONSE_HANDLER_PREFIX+u++,d={},c="//"+e+"/"+t+"/1.0/si?ju={ju}&jsonp={jsonp}&si_opt={si_opt}";d.ju=encodeURIComponent(i),d.jsonp=s,d.si_opt=l.SI.GET_REQUEST,window[s]=n,o.loadScript(a.getRequestUrl(c,d),void 0,r)})["catch"](function(e){r=void 0,c.emit(d.DEBUG,"Gateway SI Call:",e)})}var r,o=i(10),a=i(8),s=i(3),d=i(4),c=i(2),u=1,l={SI:{RESPONSE_HANDLER_PREFIX:s.JSONP_RESPONSE_HANDLER_PREFIX+"si_",GET_REQUEST:"get"}};e.exports={GATEWAY:l,getSlotCache:n}},function(e,t,i){var n=i(4),r=i(2);t.loadScript=function(e,t,i){r.emit(n.DEBUG,"Adapter loadScript:",e);var o=document.createElement("script");o.type="text/javascript",o.async=!0,t&&"function"==typeof t&&(o.readyState?o.onreadystatechange=function(){"loaded"!=o.readyState&&"complete"!=o.readyState||(o.onreadystatechange=null,t())}:o.onload=function(){t()}),i&&"function"==typeof i&&(o.onerror=i),o.src=e;var a=document.getElementsByTagName("head");a=a.length?a:document.getElementsByTagName("body"),a.length&&(a=a[0],a.insertBefore(o,a.firstChild))}},function(e,t,i){function n(e,t){function i(){return s.STATUS_CODES[u]}function n(){return o.emit(r.DEBUG,"Bid Status: ",i(),this),u}function d(){return this.width+"x"+this.height}var c=a.getUniqueIdentifierStr(),u=e||0;this.bidderCode="",this.width=0,this.height=0,this.cpm=0,this.statusMessage=i(),this.adId=c,this.id=c,this.exp=t||s.BID_EXPIRATION_THRESHOLD,this.seq_no=1,this.timestamp,this.getSize=d,this.getStatusCode=n,this.incrementAttemptMetric=function(){this.seq_no+=1}}var r=i(4),o=i(2),a=i(1),s=i(26);t.createBid=function(e,t){return new n(e,t)}},function(e,t,i){var n=(i(20),i(7)),r=Object.prototype.hasOwnProperty,o=(Array.prototype.slice,function(){var e=0;return function(){return e++,e}}());t.addEventHandler=function(e,t,i){e.addEventListener?e.addEventListener(t,i,!1):e.attachEvent&&e.attachEvent("on"+t,i)},t.contains=function(e,t){if(n.isEmpty(e))return!1;if(n.isFn(e.indexOf))return e.indexOf(t)!==-1;for(var i=e.length;i--;)if(e[i]===t)return!0;return!1},"function"!=typeof Object.create&&(Object.create=function(){var e=function(){};return function(t){if(arguments.length>1)throw Error("Second argument not supported");if("object"!=typeof t)throw TypeError("Argument must be an object");e.prototype=t;var i=new e;return e.prototype=null,i}}()),"function"!=typeof Function.prototype.bind&&(Function.prototype.bind=function(e){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var t=Array.prototype.slice.call(arguments,1),i=this,n=function(){},r=function(){return i.apply(this instanceof n?this:e,t.concat(Array.prototype.slice.call(arguments)))};return this.prototype&&(n.prototype=this.prototype),r.prototype=new n,r}),t["extends"]=function(e,t){function i(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);null===t?e.prototype=Object.create(t):(i.prototype=t.prototype,e.prototype=new i)},t.getUniqueIdentifierStr=function(){return o()+Math.random().toString(16).substr(2)},t.intersection=function(e,t){var i,n={},r=[],o=!!e&&e.length,a=!!t&&t.length;for(i=0;i<o;i++)n[e[i]]=!0;for(i=0;i<a;i++)n[t[i]]&&r.push(t[i]);return r},t.keyMirror=function(e){var t=Object.keys(e),i={};return t.forEach(function(e){i[e]=e}),i},t.replaceTokenInString=function(e,t,i){return this._each(t,function(t,n){t=void 0===t?"":t;var r=i+n.toUpperCase()+i,o=new RegExp(r,"g");e=e.replace(o,t)}),e},t._each=function(e,t){if(!n.isEmpty(e)){if(n.isFn(e.forEach))return e.forEach(t,this);var i=0,o=e.length;if(o>0)for(;i<o;i++)t(e[i],i,e);else for(i in e)r.call(e,i)&&t.call(this,e[i],i)}},t._keys=function(e){if(e!==Object(e))throw new TypeError("utils.keys called on a non object");var t,i=[];for(t in e)e.hasOwnProperty(t)&&i.push(t);return i},t._map=function(e,t){if(n.isEmpty(e))return[];if(n.isFn(e.map))return e.map(t);var i=[];return this._each(e,function(n,r){i.push(t(n,r,e))}),i}},function(e,t,i){function n(e){function t(e){var t,i={};for(var n in e)e.hasOwnProperty(n)&&(t=e[n],n.indexOf("/")!==-1&&(n=n.toLowerCase()),i[n]=t);return i}S=e.max_bucket||O.MAX_BUCKET,w=O.TIER_1,b=O.TIER_2,A=S*O.MAX_BUCKET_MULTIPLIER;var i=this;if(this.metadata={slots:[],slotsByDivId:{},slotsBySlotId:{},pageTargeting:{},syncRendering:!1,singleRequest:!!e.force_sra_order,disableInitialLoad:!1},this.mapping=t(e),this.hbSdkStartTs=Date.now(),P.setConfig(window.OXHBConfig,this.mapping),this.caf=N,this.config=window.OXHBConfig,e.experiment&&(this.experiment=new U(e.experiment),this.experiment.inExperiment))for(var n in this.experiment.mapping)this.experiment.mapping.hasOwnProperty(n)&&(window.OXHBConfig.DFP_mapping[n]=this.experiment.mapping[n],i.mapping[n]=this.experiment.mapping[n]);i.allowCacheNoFills(!0),window.addEventListener("message",B),x.on(I.BID_RECEIVED,function(e,t){i.onBidReceived.call(i,e,t)})}function r(e){return this.metadata.slotsByDivId[e]}function o(e){var t=this;e||(e=this.metadata.slots),D._each(e,function(e){t.fireOxMetricForSlot(e)})}function a(e){var t=this;return e.skipBoBeacon?void(e.skipBoBeacon=!1):void(e.isTimedOut()||D._each(e.bids,function(i){P.fireSingleBoBeacon(i,e.metrics,t.hbSdkStartTs)}))}function s(e){return e&&(window.OXHBConfig&&(window.OXHBConfig._bidderConfiguration=e),this.bcBidderType=e),this.bcBidderType}function d(e,t){var i={},n=!1;if(t||(t=[]),!D.isEmpty(e)){var r={};for(var o in e)e.hasOwnProperty(o)&&(r[o.toLowerCase()]=e[o]);D._each(t,function(e){e=e.toLowerCase(),r[e]&&(i[e]=r[e],n=!0)})}return n&&i}function c(e){var t=e&&e.length;if(t<=0)return!1;var i,n;for(i=0;i<t;i++)switch(n=e[i],n.status){case C.REQUESTED:case C.READY:case C.CREATED:return x.emit(I.DEBUG,"Not Ready to request AdServer due to Slot "+n.div+" status: "+n.status),!1}return!0}function u(e,t){var i=this.newAuctionConfig(O.AUCTION_TYPES.STANDARD);return this.attemptAuction(e,i,t)}function l(e,t,i){var n,r=this,o=[];if(D._each(e,function(e){if(e.status===C.DIL_REFRESH_SKIP)return e.status=C.RESPONDED,void(e.skipBoBeacon=!0);if(e.status!==C.CREATED&&e.status!==C.READY&&e.status!==C.BYPASS||r.performAdServerMapping(e),e.status===C.READY){if(e.inFlight)return e.status=C.REQUESTED,void o.push(e);o.push(e),r.addSlotForAuction(e,t)}}),n=r.createAuction(t),!(o.length<=0))return f.call(r,n,o,r.mapping.timeout,i),n}function f(e,t,i,n){var r=this;n?e.setToTimeout=function(){setTimeout(r.createTimeoutForSlots(e,t),i),r._beforeDisplayAuction.setToTimeout=null}:setTimeout(r.createTimeoutForSlots(e,t),i)}function p(e){var t=this;if(e){x.emit(I.DEBUG,"creating a "+e.type+" auction");var i,n,r,o,a,s=e.slots&&e.slots.length,c=t.mapping;if(!s&&e.type!==O.AUCTION_TYPES.SLOT_CACHE)return a='createAuction: No eligible bids for auction type "'+e.type+'"',void(e.type===O.AUCTION_TYPES.PREFETCH?(R.gatewayExceptionCall("["+t.bidderType()+"] "+a),x.emit(I.ERROR,a)):x.emit(I.DEBUG,a));if(c&&c.params&&(e.params=c.params),t.experiment&&t.experiment.isParticipating&&(e.params.openx||(e.params.openx={}),e.params.openx.experiment=t.experiment.id),c.ssmeta_endpoint&&(e.params.ssmeta_endpoint=c.ssmeta_endpoint),e.timeLimit=c.timeout||O.TIMEOUT,e.pageTargeting=d(t.metadata.pageTargeting,c.keys),e.noFillsAllowed=t._noFillsAllowed,x.emit(I.DEBUG,"Creating Auction",e),R.tryCatch({context:t.bidderType()},function(){n=N.fetchBids(e,function(e){t.onAuctionComplete.call(t,e)})}),n)for(o=0;o<s;o++)i=e.slots[o],r=t.metadata.slotsByDivId[i.div],n.expectedBidsByDivId[i.div]&&r&&r.status===C.READY&&(r.setStartMetricsFromAuction(n),r.status=C.REQUESTED,r.inFlight=n.id);return n}}function g(e,t){var i={div:e.div,adunit:e.zone,sizes:e.supportedSizes,bids:{openx:{adunitid:e.auid}}},n=e.slot;n&&n.getTargetingMap&&(i.targetingMap=d(n.getTargetingMap(),this.mapping.keys)),e.metaConfig&&(i.bids=e.metaConfig),this.mapping.single_request||i.targetingMap||(i.targetingMap={}),e.floor&&(i.floor=e.floor),t.slots.push(i)}function h(e){return{type:e||O.AUCTION_TYPES.STANDARD,params:{},slots:[]}}function m(e,t){var i=this;i.requestAdServer()}function v(e,t){var i,n=this;return i=D._map(t,function(e){return e.setAsTimeoutStarted(),{dfpSlot:e,auction_id:e.inFlight}}),function(){D._each(i,function(e){var t=e.dfpSlot,i=N.getAuctionByAuctionId(t.inFlight)||{};t.status===C.REQUESTED&&i.expectedBidsByDivId&&i.expectedBidsByDivId[t.div]>0&&(x.emit(I.WARN,"Slot "+t.div+" has timed out!!"),t.setAsTimedOut())}),e&&!e.ended&&(x.emit(I.WARN,"Auction has timed out.",e,t),N.endAuction(e.id)),n.requestAdServer(e&&e.id)}}function _(){}function y(e){var t=this;t.createAuction()}function E(e,t){var i,n=this,r=n.metadata.slotsByDivId[e.div];if(r&&(r.inFlight&&(i=N.getAuctionByAuctionId(r.inFlight)),t&&(e.cacheUseTimestamp=new Date),r.isTimedOut()&&P.fireSingleBoBeacon(e,r.metrics),r.status===C.REQUESTED||r.status===C.RESPONDED)){if(e.width&&e.height)r.sizeString=e.getSize(),n.mapping.size_override&&(r.sizeString=n.mapping.size_override[r.sizeString]||r.sizeString),r.sizeKey="ox"+r.sizeString;else if(r.sizeString){var o=r.sizeString.split("x");e.width=Number(o[0]),e.height=Number(o[1])}(!r.winningBid||!r.winningBid.cpm||r.winningBid.cpm<e.cpm)&&(r.winningBid=e,r.bucket=r.getPrice(),r.ad=e.ad),r.bids.push(e),(!i||i.returnedBids===i.expectedBids||i.expectedBidsByDivId[e.div]<=0)&&(r.status=C.RESPONDED,r.inFlight=null,n.requestAdServer(i&&i.id))}}function T(e){x.emit(I.DEBUG,"ALLOWING CACHE NO FILLS SETTING: ",e),this._noFillsAllowed=e}function B(e){if(e&&e.data&&"OX"===e.data.type){var t,i,n=e.data.targetingMap.oxb;if("string"==typeof n)t=n.split(O.BID_ID_PREFIX)[1];else if(n instanceof Array)for(var r=0;r<n.length;r++){var o=n[r];o.indexOf(O.BID_ID_PREFIX)!==-1&&(t=o.split(O.BID_ID_PREFIX)[1])}if(!t)return;i=N.getBidById(t),i&&e.source.postMessage({oxAdHtml:i.ad,oxbValue:n,width:i.width,height:i.height,type:"OX"},"*")}}var S,A,w,b,D=i(1),R=i(5),O=i(3),I=i(4),P=i(16),x=i(2),C=O.SLOT_STATUS,N=i(6),U=i(27);n.prototype.bidderType=s,n.prototype.createAuction=p,n.prototype.createTimeoutForSlots=v,n.prototype.onAuctionComplete=m,n.prototype.addSlotForAuction=g,n.prototype.requestAdServer=_,n.prototype.newAuctionConfig=h,n.prototype.requestSlotToAuction=y,n.prototype.onBidReceived=E,n.prototype.requestSlotsToAuction=u,n.prototype.areSlotsReadyForAdServer=c,n.prototype.fireOxMetricForSlot=a,n.prototype.fireOxMetrics=o,n.prototype.allowCacheNoFills=T,n.prototype.attemptAuction=l,n.prototype._filterTargetingMap=d,n.prototype._getSlotByDiv=r,e.exports=n},function(e,t,i){function n(e){var t,i=c.getNormalizedWindowDims(),n=e.slot,r=[],o=n.getSizes(i.width,i.height);if(!o||0===o.length)return f.emit(l.WARN,"DFPSizesToOXSizes: No size specified on slot.",n),r;for(var a=0;a<o.length;a++)t=o[a],t&&t.getWidth&&t.getHeight&&r.push(t.getWidth()+"x"+t.getHeight());return r}function r(e,t){for(var i=[],n=t||{},r=0;r<e.length;r++){var o=e[r];i.push(n[o]||o)}return i}function o(e,t){var i,n,r,o,a;if("object"!=typeof e)return e;i=e["default"];var s=c._keys(t);if(s.length>0)e:for(var d=s.length-1;d>=0;d--)if(r=s[d],a=e[r])if(c.isArray(t[r])){for(var u in t[r])if(n=a[t[r][u]])break e}else o=t[r],n=a[o];return n||i}function a(e){return 0===e.indexOf("/")?e.substring(1):"/"+e}function s(e){var t={};return c._each(e,function(e,i){"sizes"!=i&&(t[i]=e)}),t}function d(e,t,i){var n=e.status===p.BYPASS||e.status===p.CREATED,r=t.disable_dilpf&&i&&i.disableInitialLoad;return n&&r}var c=i(1),u=i(3),l=i(4),f=i(2),p=u.SLOT_STATUS;u.OX_DFP_HEIGHT_DELTA,u.SUPPORTED_AD_UNIT_SIZES,i(5);e.exports=function(e,t,i,u){var g,h,m,v,_,y,E=e.slot,T=e.zone;if(u||(e.size=n(e)),0===e.size.length)return f.emit(l.WARN,"Returning early from _performDFPMapping because slot does not have a size."),e.noSize=!0,void(e.status=p.BYPASS);for(e.noSize=!1,h=T.toLowerCase()+"/";(y=h.lastIndexOf("/"))>0&&!g;)if(h=h.substring(0,y),m=t[h]||t[a(h)])switch(v=c.intersection(r(e.size,t.size_override),m.sizes),t.version){case"2.0":v.length>0?(g=o(m.oxAdUnitId,E.getTargetingMap()),e.sizeKey="oxb",e.sizeString=v[0],e.supportedSizes=v):e.noSize=!0;break;case"META":if(v.length>0){e.sizeString=v[0],e.supportedSizes=v,e.metaConfig=e.metaConfig||s(m),g=!0;continue}e.noSize=!0;break;default:for(var B=0;B<e.size.length;B++)if(_=e.size[B],g=o(m[_],E.getTargetingMap())){e.sizeKey="ox"+_,e.sizeString=_,e.supportedSizes=r(e.size,t.size_override);break}}return g?(e.auid=g,void(d(e,t,i)?e.status=p.BYPASS:e.status=p.READY)):void(e.status=p.BYPASS)}},function(e,t,i){function n(e,t,i,n,d,c,u,l,f){d||(d=a.CREATED);var p={zone:e,div:i,dfpDisplayed:0,status:d,rendered:0,size:r.normalizeSizes(t),sizeString:c,metrics:{},targetingMap:u||{},bids:[],winningBid:void 0,refreshCount:0,setAsRenderedIfUnsupported:function(){!this.noSize&&r.domElById(this.div)||(this.rendered=!0)}};return n||(n={isApi:!0,setTargeting:function(e,t){},getTargeting:function(){return{}},getTargetingMap:function(){return p.targetingMap},getSizes:function(){return[]}},p.bucket="t",p.ad=""),p.setTargeting=function(e,t){p.slot&&!p.slot.isApi&&p.slot.setTargeting(e,t)},p.getTargeting=function(e){return p.slot&&!p.slot.isApi?p.slot.getTargeting(e):[]},p.slot=n,p.getOxTargetingKey=function(){switch(l){case"2.0":return"oxb";case"META":return"oxb";default:return p.sizeKey}},p.getOxTargetingValue=function(e){var t,i=e&&e.type||"secondPrice",n=p.getPrice(i),r=p.winningBid&&p.winningBid.width&&p.winningBid.height?p.winningBid.getSize():p.slot.sizeString;switch(r=f&&f[r]?f[r]:r,p.winningBid?(p.bucket=n,p.sizeKey="ox"+p.sizeString,t=[p.getPrice(i)],p.winningBid.pmp&&t.push("pmp"+p.winningBid.secondPriceBucket),p.winningBid.deal_id&&t.push(p.winningBid.deal_id),p.winningBid.id&&t.push(o.BID_ID_PREFIX+p.winningBid.id)):(p.bucket="t",t=["t"]),t=t.join(","),l){case"2.0":case"META":return p.sizeString+"_"+t;default:return t}},p.getPrice=function(e){var t,i=p.winningBid;return i?(e||(e="secondPrice",i.firstPrice&&!s.bid_boost_enabled&&(e="firstPrice")),t={firstPrice:""+(i.firstPriceBucket||0),secondPrice:""+i.secondPriceBucket},t[e]):"t"},p.setAsTimedOut=function(){p.status=a.TIMED_OUT,p.inFlight=null,p.bucket=p.bids.length?p.bucket:"t",this.hasBidByBidderCode("openx")||(p.metrics.timedOut=!0)},p.reset=function(){p.metrics={},p.bids=[],p.ad="",p.cpm=0,p.winningBid=void 0},p.setStartMetricsFromAuction=function(e){p.metrics.startTime=e.startTime},p.setAsTimeoutStarted=function(){p.metrics.timeoutStarted||(p.metrics.timeoutStarted=new Date)},p.isTimedOut=function(){return p.metrics.timedOut},p.hasBidByBidderCode=function(e){var t=!1;return r._each(p.bids,function(i){i.bidderCode===e&&(t=!0)}),t},p}var r=i(1),o=i(3),a=o.SLOT_STATUS,s=window.OXHBConfig&&window.OXHBConfig.DFP_mapping||{};e.exports=n},function(e,t,i){function n(){var e={};return window.performance&&window.performance.timing&&window.performance.timing.domContentLoadedEventEnd&&(e.domLoadedTs=window.performance.timing.domContentLoadedEventEnd),e}var r=i(1),o=i(8),a=window.OXHBConfig||{},s=a.DFP_mapping||{},d={getBidResult:function(e,t){return e.noFill?"0":t.timedOut?"t":"p"},bidNeedsBoBeacon:function(e){return"openx"===e.bidderCode},fireSingleBoBeacon:function(e,t,i){var c=0;if(a.host&&a.medium&&e&&d.bidNeedsBoBeacon(e)){t.timeoutStarted&&t.startTime&&(c=t.timeoutStarted-t.startTime),e.cacheUseTimestamp&&e.timestamp&&(c=e.cacheUseTimestamp-e.timestamp),(c<0||!c)&&(c=0);var u={},l="http://"+a.host+"/"+a.medium+"/1.0/bo?bd={bd}&br={br}&bp={bp}&bt={bt}&ts={ts}&bs={bs}&ca={ca}&bsq={bsq}";return e&&e.transactionState&&(u.bd=e.timestamp-t.startTime,u.br=d.getBidResult(e,t),u.bp=String(1e3*e.cpm),u.bt=s.timeout+c,u.ts=e.transactionState,u.bs=a.siteName,u.bsq=e.seq_no,e.perf_id&&e.perfMetrics&&e.perfMetrics.networkLatency&&(u.pfid=e.perf_id,u.nl=Math.round(e.perfMetrics.networkLatency),l+="&pfid={pfid}&nl={nl}"),(s.collect_slot_info||s.use_slot_info)&&(u.bidStartTs=t.startTime.getTime()/1e3,u.bidReceivedTs=e.timestamp.getTime()/1e3,u.sdkLoadTs=i/1e3,u.dlTs=n().domLoadedTs/1e3,l+="&bidstartts={bidStartTs}&bidreceivedts={bidReceivedTs}&sdkloadts={sdkLoadTs}&dlts={dlTs}",e.bidRequestStartTs&&(u.brStartTs=e.bidRequestStartTs/1e3,u.brReceivedTs=e.bidResponseReceivedTs/1e3,l+="&brstartts={brStartTs}&brreceivedts={brReceivedTs}")),u.ca=e.cacheUseTimestamp?1:0,(1===e.seq_no||2===e.seq_no&&e.cacheUseTimestamp)&&(r.beacon(o.getRequestUrl(l,u)),e.incrementAttemptMetric&&e.incrementAttemptMetric())),u}},setConfig:function(e,t){a=e||a,s=t||s}};e.exports=d},function(e,t){function i(e){return Array.prototype.slice.call(e)}function n(e){return e.reduce(function(e,t){return Array.isArray(t)?e=e.concat(n(t)):e.push(t),e},[])}Array.prototype.reduce||Object.defineProperty(Array.prototype,"reduce",{value:function(e){if(null===this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof e)throw new TypeError(e+" is not a function");var t,i=Object(this),n=i.length>>>0,r=0;if(2==arguments.length)t=arguments[1];else{for(;r<n&&!(r in i);)r++;if(r>=n)throw new TypeError("Reduce of empty array with no initial value");
t=i[r++]}for(;r<n;)r in i&&(t=e(t,i[r],r,i)),r++;return t}}),Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),e.exports={flatten:n,toArray:i}},function(e,t){function i(e,t,i){var n,r,o,a,s,d,c,u=function(e){if(!i.searchKeys)return!1;var t,n,r=i.searchKeys,o=i.searchKeys.length;for(n=0;n<o;n++)if(t=r[n],e.indexOf(t)!==-1)return!0;return!1};for(n in e)if(e.hasOwnProperty(n)&&u(n))if(r=n,e[r]instanceof Array){for(o=e[r].length,a=0;a<o;a++)if(s=e[r][a],s.indexOf(i.bidIdPrefix)!==-1){d=s.split(i.bidIdPrefix)[1];break}}else if("string"==typeof e[r]&&(s=e[r],d=s.split(i.bidIdPrefix)[1]))break;if(d)for(var l in t)if(t.hasOwnProperty(l)&&t[l].winningBid&&t[l].winningBid.id===d){c=t[l];break}return{bidId:d,dfpSlot:c}}e.exports={getBidIdAndDfpSlotFromTargetingMap:i}},function(e,t){function i(e){var t=s(e);(new Image).src=t}function n(e){return"undefined"!=typeof e}function r(){return location.protocol}function o(){var e;if(window.AMP_LISTENING&&window.context&&window.context.canonicalUrl)return window.context.canonicalUrl;try{e=top.location.href}catch(t){}return e||a()}function a(){var e=document.referrer;try{e=top.document.referrer}catch(t){if(parent)try{e=parent.document.referrer}catch(i){}}if(!e&&opener)try{e=opener.location.href}catch(n){}return e||""}function s(e){var t;if(e)return t=e.indexOf("//"),5!=t&&6!=t&&(e="http://"+e),"https:"==r()?e.replace("http:","https:"):e}function d(e,t,i,r){t=t||{};var o,a,s,d="",c=!1,u="";i=i||"{",r=r||"}";for(var l=0;l<e.length;l++)o=e.charAt(l),c||o!==i?c&&o===r?(a=t[d],s=n(a)&&null!==a?a:"",u+=s,c=!1,d=""):c?d+=o:u+=o:c=!0;return u}function c(e){var t="<div style='position:absolute;left:0px;top:0px;visibility:hidden;'><img src='{src}'/></div>",i=s(e);return d(t,{src:i})}function u(e){try{var t=document.cookie.split(e+"=");if(2==t.length)return t[1].split(";")[0]}catch(i){}}function l(e,t,i){var r=e+"=";if(r+=(t||"")+";path=/;",n(i)){var o=new Date;o.setTime(o.getTime()+i),r+="expires="+o.toUTCString()+";"}try{document.cookie=r}catch(a){}}e.exports={beacon:i,defined:n,detectProtocol:r,ensureRightProtocol:s,template:d,getImgBeacon:c,detectPageURL:o,detectRefererURL:a,getCookie:u,setCookie:l}},function(e,t){e.exports={"function":"function",undefined:"undefined",object:"object",string:"string",number:"number"}},function(e,t,i){function n(e){function t(e,i,n){var o,a,s=x.slots,d=s.length,c=i&&i.length,u=(P.newAuctionConfig(_.AUCTION_TYPES.STANDARD),function(e){return x.disableInitialLoad&&!!e.dfpDisplayed&&e.status!==S.DISPLAYED}),l=function(e){return!x.disableInitialLoad&&!!e.dfpDisplayed&&!e.rendered},f=function(){return function(){for(e(i,n),a=0;a<d-1;a++)s[a].status=S.DISPLAYED,s[a].setAsRenderedIfUnsupported()}},p=function(e,i,n){return function(){return t(e,i,n)}};for(r.call(P),a=0;a<d;a++)if(u(s[a])||l(s[a]))return i=h.isArray(i)?i.slice():i,void setTimeout(p(e,i,n),250);for((!i||i&&i.length>1)&&(P.metadata.singleRequest=!0),P.allowCacheNoFills(!1),a=0;a<d;a++)s[a].proxyDisplay=0;if(i&&i.length>0){for(s=[],a=0;a<c;a++){var g=i[a],m=g&&g.getSlotId(),v=m&&m.getId();v||B.emit(T.DEBUG,"Slots are not defined in the beginning"),o=x.slotsBySlotId["google_ads_iframe_"+v],o&&s.push(o)}d=s.length}for(a=0;a<d;a++)s[a].refreshCount+=1,1===s[a].refreshCount&&x.disableInitialLoad&&(s[a].winningBid&&s[a].winningBid.id||s[a].isTimedOut())&&(s[a].status=S.DIL_REFRESH_SKIP);for(a=0;a<d;a++)o=s[a],o.status!==S.DIL_REFRESH_SKIP&&(o.status!==S.READY&&o.status!==S.BYPASS&&(o.sizeKey||o.metaConfig)?(o.status=S.READY,o.setTargeting(o.getOxTargetingKey(),"r"),o.bucket="r",o.reset()):(o.status=S.BYPASS,o.bucket="t"),o.getTargeting(o.getOxTargetingKey()+"_2").length>0&&o.setTargeting(o.getOxTargetingKey()+"_2","r"),o.getTargeting(o.getOxTargetingKey()+"1").length>0&&o.setTargeting(o.getOxTargetingKey()+"1","r"),o.rendered=!1);for(a=d-1;a>=0;a--)if(o=s[a],o.dfpDisplayed){o.proxyDisplay=f(o.slot);break}var y=P.requestSlotsToAuction(s);y||P.requestAdServer()}function i(e){var t,i;m.tryCatch({context:P.bidderType()},function(){t=e.slot.getSlotElementId(),i=x.slotsByDivId[t],i.rendered=1,B.emit(T.DEBUG,"GPT slotRendered is called for div:"+i.div,e),i.dfpDisplayed||(i.dfpDisplayed=1,i.status=S.DISPLAYED),i.bids&&h._each(i.bids,function(e){(!i.winningBid||i.winningBid&&i.winningBid.id===e.id)&&(e.used=!0)})},function(e,t){B.emit(T.ERROR,"onGptSlotRendered: unexpected error",e)})}function n(e,t,i,n){n&&P.addSlot.call(P,e,t,i,n)}function o(e,t,i){B.emit(T.DEBUG,"GPT defineOutOfPageSlot is called."),P.addSlot.call(P,e,[],t,i)}function a(i,n,r){B.emit(T.DEBUG,"GPT Refresh is called. Slots: ",i);var o=this,a=!1,s=(e.timeout||_.TIMEOUT)*(P.numberOfActiveRefreshTimers+1)+1e4,d=function(){a||(a=!0,r.apply(o,arguments))};return U?(B.emit(T.WARNING,"[Fail-safe timer] was triggered in this session! Releasing early."),void r.apply(o,arguments)):(r.delayed=!0,P.numberOfActiveRefreshTimers++,setTimeout(function(){if(P.numberOfActiveRefreshTimers--,!a){var e={context:P.bidderType(),siteUrl:window.location.href,stackTrace:"[Fail-safe timer] _onGptRefresh has been triggered!"};B.emit(T.ERROR,e.stackTrace),m.gatewayExceptionCall(h.template(_.EXCEPTION_REPORT_TEMPLATE,e)),a=!0,U=!0,r.apply(o,arguments)}},s),void t(d,i,n))}function s(t,i){B.emit(T.DEBUG,"GPT Display is called for div: "+t);var n=this,r=arguments,o=x.slotsByDivId[t],a=!1,s=(e.timeout||_.TIMEOUT)+_.FAILSAFE_TIMEOUT_BUFFER,d=function(){return o&&o.dfpDisplayed&&o.status===S.DISPLAYED};return!o||o.dfpDisplayed||o.slot.isApi?void i.apply(n,arguments):U?(B.emit(T.WARNING,"[Fail-safe timer] was triggered in this session! Releasing early."),void i.apply(n,arguments)):(setTimeout(function(){if(!a){var e={context:P.bidderType(),siteUrl:window.location.href,stackTrace:"[Fail-safe timer] _onGptDisplay has been triggered!"};B.emit(T.ERROR,"GPT Display timeout is called for div: "+t),B.emit(T.ERROR,e.stackTrace),m.gatewayExceptionCall(h.template(_.EXCEPTION_REPORT_TEMPLATE,e)),a=!0,U=!0,i.apply(n,r)}},s),d()&&P.fireOxMetricForSlot(o),x.syncRendering||!o||d()||o.slot.isApi?void i.apply(n,r):(e&&(e.collect_slot_info||e.use_slot_info)&&(N.push(o),I&&(clearTimeout(I),I=void 0),I=setTimeout(function(){var e="http://{host}/{medium}/1.0/si?ju={href}&ts={ts}&slotid={slots}&divid={divs}&si_sz={sizes}&si_hit={cacheHit}&si_under={underfill}&si_over={overfill}";l(N).then(function(t){B.emit(T.DEBUG,"SI beacon sent"),h.beacon(v.getRequestUrl(e,t))},function(){m.gatewayExceptionCall("["+b._bidderConfiguration+"] ["+window.location.href+"] Not sending SI beacon due to no eligible slots")})},_.SI_BEACON_DEBOUNCE_WAIT_MS)),o.dfpDisplayed=1,i.delayed=!0,o.proxyDisplay=function(){a||(a=!0,i.apply(n,r))},P.requestSlotToAuction(o)))}function d(){return B.emit(T.DEBUG,"GPT enableServices is called."),x.syncRendering?void B.emit(T.DEBUG,"syncRendering is enabled."):void(P._beforeDisplayAuction||(P._beforeDisplayAuction=P.requestSlotsToAuction(P.metadata.slots,!0)))}function c(e){B.emit(T.DEBUG,"GPT enableSingleRequest is called."),e&&(B.emit(T.DEBUG,"isSingleRequestEnabled is true."),P.metadata.singleRequest=!0)}function u(){B.emit(T.DEBUG,"GPT enableSyncRendering is called."),P.metadata.syncRendering=!0}function f(){B.emit(T.DEBUG,"GPT disableInitialLoad is called."),P.metadata.disableInitialLoad=!0}function y(e,t){P.metadata.pageTargeting[e]=t}function A(e){delete P.metadata.pageTargeting[e]}function w(){var e=D(window.navigator.userAgent);if(e&&"ie"===e.name&&e.version<=10)return void B.emit(T.WARN,"Skipping proxy. Browser is <= IE10");B.emit(T.DEBUG,"GPT loaded - Proxying GPT Calls");var t=C.pubads();t.refresh=p.before(t.refresh,function(e,t){P.metadata.syncRendering||a.call(this,t[0],t[1],e)}),C.display=p.before(C.display,function(e,t){P.metadata.syncRendering||s.call(this,t[0],e)}),P.mapping.disable_es||(C.enableServices=p.before(C.enableServices,d)),C.defineSlot=p.after(C.defineSlot,function(e,t,i){n.call(this,t[0],t[1],t[2],i)}),C.defineOutOfPageSlot=p.after(C.defineOutOfPageSlot,function(e,t,i){o.call(this,t[0],t[1],i)}),t.enableSyncRendering=p.after(t.enableSyncRendering,u),t.enableSingleRequest=p.after(t.enableSingleRequest,function(e,t,i){c.call(this,i)}),t.disableInitialLoad=p.before(t.disableInitialLoad,f),t.setTargeting=p.before(t.setTargeting,function(e,t){y(t[0],t[1])}),t.clearTargeting=p.before(t.clearTargeting,function(e,t){A(t[0])}),C.pubads().addEventListener("slotRenderEnded",i)}function R(){return E(!1,P.metadata.slotsBySlotId)}function O(){function e(){return 0===C.pubads().getSlots().length}return B.emit(T.DEBUG,"Proxy Bidder initialize"),h.isArray(C.cmd)?void C.cmd.splice(0,0,w):void(e()&&C.cmd.push(function(){e()&&w()}))}g.call(this,e),this.bidderType(_.BC_BIDDER_TYPES.STANDARD_BIDDER),window.googletag=window.googletag||{},window.googletag.cmd=window.googletag.cmd||[];var I,P=this,x=this.metadata,C=window.googletag,N=[],U=!1;this.showAd=R.apply(this),this.init=O,this._beforeDisplayAuction=null,this.numberOfActiveRefreshTimers=0,this._requestRefresh=t,this._onGptSlotRendered=i,this._onGptDefineSlot=n,this._onGptDefineOutOfPageSlot=o,this._onGptRefresh=a,this._onGptDisplay=s,this._onGptEnableServices=d,this._onGptEnableSingleRequest=c,this._onGptEnableSyncRendering=u,this._onGptDisableInitialLoad=f,this._onGptPageLevelSetTargeting=y,this._onGptPageLevelClearTargeting=A,this._doProxyGpt=w}function r(){B.emit(T.DEBUG,"SLOTS LENGTH: ",this.metadata.slots.length),h._each(this.metadata.slots,function(e){B.emit(T.DEBUG,e.div,e.status)})}function o(){function e(e){return(e.status!==S.BYPASS||"t"===e.bucket)&&(e.status!==S.DISPLAYED&&e.status!==S.DISPLAYING&&(!!e.sizeString&&((!e.slot||!e.slot.isApi)&&!!e.bucket)))}var t=this;h._each(t.metadata.slots,function(i){e(i)&&(i.winningBid&&i.winningBid.firstPrice?t.mapping.bid_boost_enabled?(B.emit(T.DEBUG,"New top bid is on, setting keys"),i.setTargeting(i.getOxTargetingKey(),i.getOxTargetingValue({type:"secondPrice"})),i.setTargeting(i.getOxTargetingKey()+"1",i.getOxTargetingValue({type:"firstPrice"})),B.emit(T.DEBUG,"Slot "+i.div+" "+i.status+"  has setTargeting to "+[i.getOxTargetingKey(),i.getOxTargetingValue({type:"secondPrice"})]+" and "+[i.getOxTargetingKey()+"1",i.getOxTargetingValue({type:"firstPrice"})])):(B.emit(T.DEBUG,"Original top bid behavior, setting keys"),i.setTargeting(i.getOxTargetingKey(),i.getOxTargetingValue({type:"firstPrice"})),i.setTargeting(i.getOxTargetingKey()+"_2",i.getOxTargetingValue({type:"secondPrice"})),B.emit(T.DEBUG,"Slot "+i.div+" "+i.status+"  has setTargeting to "+[i.getOxTargetingKey(),i.getOxTargetingValue({type:"firstPrice"})]+" and "+[i.getOxTargetingKey()+"_2",i.getOxTargetingValue({type:"secondPrice"})])):(i.setTargeting(i.getOxTargetingKey(),i.getOxTargetingValue({type:"secondPrice"})),B.emit(T.DEBUG,"Slot "+i.div+" "+i.status+"  has setTargeting to "+[i.getOxTargetingKey(),i.getOxTargetingValue({type:"secondPrice"})]),i.getTargeting(i.getOxTargetingKey()+"_2").length>0&&i.setTargeting(i.getOxTargetingKey()+"_2",i.getOxTargetingValue({type:"secondPrice"}))))})}function a(){var e=this;B.emit(T.DEBUG,"=== DISPLAYING SLOTS ===");var t,i,n,r=this.metadata.slots.length,o=function(t){return function(){t.proxyDisplay&&t.proxyDisplay(),e.fireOxMetricForSlot(t),t.setAsRenderedIfUnsupported(),B.emit(T.DEBUG,"Slot "+t.div+" is DISPLAYED"),t.status=S.DISPLAYED}};for(t=0;t<r;t++)i=this.metadata.slots[t],n=i.status,n!==S.RESPONDED&&n!==S.BYPASS&&n!==S.TIMED_OUT||!i.dfpDisplayed||(i.status=S.DISPLAYING,B.emit(T.DEBUG,"Slot "+i.div+" is DISPLAYING"),setTimeout(o(i),0))}function s(e){return y(e,this.mapping,this.metadata,!1)}function d(e){var t,i=this;i._beforeDisplayAuction&&i._beforeDisplayAuction.setToTimeout&&i._beforeDisplayAuction.setToTimeout(),t=i.requestSlotsToAuction(i.metadata.slots),t||e.status!==S.BYPASS&&e.status!==S.RESPONDED&&e.status!==S.TIMED_OUT||i.requestAdServer()}function c(){if(B.emit(T.DEBUG,"Attempting to Request Ad Server"),!this.metadata.syncRendering&&(r.call(this),!this.metadata.singleRequest||this.areSlotsReadyForAdServer(this.metadata.slots)))return o.call(this),a.call(this),!0}function u(e,t,i,n){var r,o=this,a=new A(e,t,i,n,S.CREATED,null,null,o.mapping.version,o.mapping.size_override);return r=n.getSlotId().getId(),o.metadata.slotsByDivId[i]=a,o.metadata.slotsBySlotId["google_ads_iframe_"+r]=a,o.metadata.slots.push(a),B.emit(T.DEBUG,"GPT.defineSlot called => added slot div: "+i+" zone: "+e),a}function l(e){var t,i,n=(window.OX_dfp_ads||[],{}),r=[],o={},a=[],s=[];return h._each(e,function(e){for(var t=0,n=e.bids.length;t<n;t++){var d=e.bids[t];if(d.transactionState){i=d.transactionState;break}}e.auid&&(o[e.slot.getSlotElementId()]=0,r.push(e.slot.getSlotElementId()),a.push(e.auid),s.push(h.normalizeSizes(e.size).join(",")))}),new Promise(function(e,d){return 0!==a.length&&window.location.href?void w.getSlotCache(b.host,b.medium,window.location.href).then(function(d){d&&d.divs?(t=f(o,d.divs),n.overfill=t.overfill,n.underfill=t.underfill):n.overfill=n.underfill=0,n.cacheHit=!!d,n.host=b.host,n.medium=b.medium,n.href=window.location.href,n.ts=i,n.slots=a.join(","),n.divs=r.join(","),n.sizes=s.join("|"),e(n)}):(B.emit(T.WARN,"Not sending SI beacon due to no eligible slots"),void d())})}function f(e,t){for(var i=Object.keys(e),n=0,r=0,o=0;o<t.length;o++){var a=decodeURIComponent(t[o]);a&&(0===e[a]?e[a]=1:r++)}return n=i.length-i.reduce(function(t,i){return t+e[i]},0),{overfill:r,underfill:n}}var p=i(36),g=i(13),h=i(1),m=i(5),v=i(8),_=i(3),y=i(14),E=i(22),T=i(4),B=i(2),S=_.SLOT_STATUS,A=i(15),w=i(9),b=window.OXHBConfig||{},D=i(31).detectBrowser;h["extends"](n,g),n.prototype.requestAdServer=c,n.prototype.requestSlotToAuction=d,n.prototype.performAdServerMapping=s,n.prototype.addSlot=u,n.prototype._setTargetingForSlots=o,n.prototype._displaySlots=a,e.exports=n},function(e,t,i){function n(e,t){return function(i,n,s){e&&(i=i.replace("_ad_container",""));var d,c,u,l,f,p,g,h,m=!0;if(d=t[i],n&&!d&&(h=a.getBidIdAndDfpSlotFromTargetingMap(n,t,{searchKeys:o.TARGETING_MAP_SEARCH_PREFIXES,bidIdPrefix:o.BID_ID_PREFIX}),p=h.bidId,d=h.dfpSlot),p=p||d&&d.winningBid&&d.winningBid.id,r.getBidById(p)&&(m=r.getBidById(p).rendered),p&&!m&&(e||!d||"s"!==d.bucket)&&(c=d&&document.getElementById(d.div),!c&&s&&s.frameElement&&(c=s.frameElement.parentNode),c)){if(u=c.childNodes,l=u.length,!e)for(g=0;g<l;g++)f=u[g],f.style&&(f.style.display="none");return r.renderBid(p,c),d&&d.setTargeting(d.getOxTargetingKey(),"s"),!0}}}var r=i(6),o=i(3),a=i(18);e.exports=n},function(e,t,i){var n=i(7);t.getParameterByName=function(e){var t="[\\?&]"+e+"=([^&#]*)",i=new RegExp(t),n=i.exec(window.location.search);return null===n?"":decodeURIComponent(n[1].replace(/\+/g," "))},t.buildQueryString=function(e){var t=[],i=function(e,i){t.push([e,encodeURIComponent(i)].join("="))};for(var r in e)if(e.hasOwnProperty(r)){var o=e[r];if(n.isArray(o))for(var a=r+"[]",s=0;s<o.length;s++)i(a,o[s]);else i(r,o)}return t.join("&")},t.transformAdServerTargetingObj=function(e){var t="";if(!e)return"";for(var i in e)e.hasOwnProperty(i)&&(t+=i+"="+encodeURIComponent(e[i])+"&");return t},t.tryAppendQueryString=function(e,t,i){return i?e+=t+"="+encodeURIComponent(i)+"&":e}},function(e,t,i){(function(t,n){/*!
	 * @overview es6-promise - a tiny implementation of Promises/A+.
	 * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
	 * @license   Licensed under MIT license
	 *            See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
	 * @version   4.1.1
	 */
!function(t,i){e.exports=i()}(this,function(){"use strict";function e(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)}function r(e){return"function"==typeof e}function o(e){W=e}function a(e){Q=e}function s(){return function(){return t.nextTick(f)}}function d(){return"undefined"!=typeof K?function(){K(f)}:l()}function c(){var e=0,t=new Z(f),i=document.createTextNode("");return t.observe(i,{characterData:!0}),function(){i.data=e=++e%2}}function u(){var e=new MessageChannel;return e.port1.onmessage=f,function(){return e.port2.postMessage(0)}}function l(){var e=setTimeout;return function(){return e(f,1)}}function f(){for(var e=0;e<V;e+=2){var t=ie[e],i=ie[e+1];t(i),ie[e]=void 0,ie[e+1]=void 0}V=0}function p(){try{var e=i(46);return K=e.runOnLoop||e.runOnContext,d()}catch(t){return l()}}function g(e,t){var i=arguments,n=this,r=new this.constructor(m);void 0===r[re]&&U(r);var o=n._state;return o?!function(){var e=i[o-1];Q(function(){return x(o,r,e,n._result)})}():R(n,r,e,t),r}function h(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var i=new t(m);return A(i,e),i}function m(){}function v(){return new TypeError("You cannot resolve a promise with itself")}function _(){return new TypeError("A promises callback cannot return that same promise.")}function y(e){try{return e.then}catch(t){return de.error=t,de}}function E(e,t,i,n){try{e.call(t,i,n)}catch(r){return r}}function T(e,t,i){Q(function(e){var n=!1,r=E(i,t,function(i){n||(n=!0,t!==i?A(e,i):b(e,i))},function(t){n||(n=!0,D(e,t))},"Settle: "+(e._label||" unknown promise"));!n&&r&&(n=!0,D(e,r))},e)}function B(e,t){t._state===ae?b(e,t._result):t._state===se?D(e,t._result):R(t,void 0,function(t){return A(e,t)},function(t){return D(e,t)})}function S(e,t,i){t.constructor===e.constructor&&i===g&&t.constructor.resolve===h?B(e,t):i===de?(D(e,de.error),de.error=null):void 0===i?b(e,t):r(i)?T(e,t,i):b(e,t)}function A(t,i){t===i?D(t,v()):e(i)?S(t,i,y(i)):b(t,i)}function w(e){e._onerror&&e._onerror(e._result),O(e)}function b(e,t){e._state===oe&&(e._result=t,e._state=ae,0!==e._subscribers.length&&Q(O,e))}function D(e,t){e._state===oe&&(e._state=se,e._result=t,Q(w,e))}function R(e,t,i,n){var r=e._subscribers,o=r.length;e._onerror=null,r[o]=t,r[o+ae]=i,r[o+se]=n,0===o&&e._state&&Q(O,e)}function O(e){var t=e._subscribers,i=e._state;if(0!==t.length){for(var n=void 0,r=void 0,o=e._result,a=0;a<t.length;a+=3)n=t[a],r=t[a+i],n?x(i,n,r,o):r(o);e._subscribers.length=0}}function I(){this.error=null}function P(e,t){try{return e(t)}catch(i){return ce.error=i,ce}}function x(e,t,i,n){var o=r(i),a=void 0,s=void 0,d=void 0,c=void 0;if(o){if(a=P(i,n),a===ce?(c=!0,s=a.error,a.error=null):d=!0,t===a)return void D(t,_())}else a=n,d=!0;t._state!==oe||(o&&d?A(t,a):c?D(t,s):e===ae?b(t,a):e===se&&D(t,a))}function C(e,t){try{t(function(t){A(e,t)},function(t){D(e,t)})}catch(i){D(e,i)}}function N(){return ue++}function U(e){e[re]=ue++,e._state=void 0,e._result=void 0,e._subscribers=[]}function L(e,t){this._instanceConstructor=e,this.promise=new e(m),this.promise[re]||U(this.promise),q(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?b(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),0===this._remaining&&b(this.promise,this._result))):D(this.promise,M())}function M(){return new Error("Array Methods must be provided an Array")}function F(e){return new L(this,e).promise}function z(e){var t=this;return new t(q(e)?function(i,n){for(var r=e.length,o=0;o<r;o++)t.resolve(e[o]).then(i,n)}:function(e,t){return t(new TypeError("You must pass an array to race."))})}function k(e){var t=this,i=new t(m);return D(i,e),i}function H(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function X(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function G(e){this[re]=N(),this._result=this._state=void 0,this._subscribers=[],m!==e&&("function"!=typeof e&&H(),this instanceof G?C(this,e):X())}function Y(){var e=void 0;if("undefined"!=typeof n)e=n;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var i=e.Promise;if(i){var r=null;try{r=Object.prototype.toString.call(i.resolve())}catch(t){}if("[object Promise]"===r&&!i.cast)return}e.Promise=G}var j=void 0;j=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var q=j,V=0,K=void 0,W=void 0,Q=function(e,t){ie[V]=e,ie[V+1]=t,V+=2,2===V&&(W?W(f):ne())},$="undefined"!=typeof window?window:void 0,J=$||{},Z=J.MutationObserver||J.WebKitMutationObserver,ee="undefined"==typeof self&&"undefined"!=typeof t&&"[object process]"==={}.toString.call(t),te="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,ie=new Array(1e3),ne=void 0;ne=ee?s():Z?c():te?u():void 0===$?p():l();var re=Math.random().toString(36).substring(16),oe=void 0,ae=1,se=2,de=new I,ce=new I,ue=0;return L.prototype._enumerate=function(e){for(var t=0;this._state===oe&&t<e.length;t++)this._eachEntry(e[t],t)},L.prototype._eachEntry=function(e,t){var i=this._instanceConstructor,n=i.resolve;if(n===h){var r=y(e);if(r===g&&e._state!==oe)this._settledAt(e._state,t,e._result);else if("function"!=typeof r)this._remaining--,this._result[t]=e;else if(i===G){var o=new i(m);S(o,e,r),this._willSettleAt(o,t)}else this._willSettleAt(new i(function(t){return t(e)}),t)}else this._willSettleAt(n(e),t)},L.prototype._settledAt=function(e,t,i){var n=this.promise;n._state===oe&&(this._remaining--,e===se?D(n,i):this._result[t]=i),0===this._remaining&&b(n,this._result)},L.prototype._willSettleAt=function(e,t){var i=this;R(e,void 0,function(e){return i._settledAt(ae,t,e)},function(e){return i._settledAt(se,t,e)})},G.all=F,G.race=z,G.resolve=h,G.reject=k,G._setScheduler=o,G._setAsap=a,G._asap=Q,G.prototype={constructor:G,then:g,"catch":function(e){return this.then(null,e)}},G.polyfill=Y,G.Promise=G,G})}).call(t,i(44),function(){return this}())},function(e,t,i){"use strict";function n(e,t,i){this.fn=e,this.context=t,this.once=i||!1}function r(){}var o="function"!=typeof Object.create&&"~";r.prototype._events=void 0,r.prototype.listeners=function(e,t){var i=o?o+e:e,n=this._events&&this._events[i];if(t)return!!n;if(!n)return[];if(n.fn)return[n.fn];for(var r=0,a=n.length,s=new Array(a);r<a;r++)s[r]=n[r].fn;return s},r.prototype.emit=function(e,t,i,n,r,a){var s=o?o+e:e;if(!this._events||!this._events[s])return!1;var d,c,u=this._events[s],l=arguments.length;if("function"==typeof u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),l){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,i),!0;case 4:return u.fn.call(u.context,t,i,n),!0;case 5:return u.fn.call(u.context,t,i,n,r),!0;case 6:return u.fn.call(u.context,t,i,n,r,a),!0}for(c=1,d=new Array(l-1);c<l;c++)d[c-1]=arguments[c];u.fn.apply(u.context,d)}else{var f,p=u.length;for(c=0;c<p;c++)switch(u[c].once&&this.removeListener(e,u[c].fn,void 0,!0),l){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,t);break;case 3:u[c].fn.call(u[c].context,t,i);break;default:if(!d)for(f=1,d=new Array(l-1);f<l;f++)d[f-1]=arguments[f];u[c].fn.apply(u[c].context,d)}}return!0},r.prototype.on=function(e,t,i){var r=new n(t,i||this),a=o?o+e:e;return this._events||(this._events=o?{}:Object.create(null)),this._events[a]?this._events[a].fn?this._events[a]=[this._events[a],r]:this._events[a].push(r):this._events[a]=r,this},r.prototype.once=function(e,t,i){var r=new n(t,i||this,(!0)),a=o?o+e:e;return this._events||(this._events=o?{}:Object.create(null)),this._events[a]?this._events[a].fn?this._events[a]=[this._events[a],r]:this._events[a].push(r):this._events[a]=r,this},r.prototype.removeListener=function(e,t,i,n){var r=o?o+e:e;if(!this._events||!this._events[r])return this;var a=this._events[r],s=[];if(t)if(a.fn)(a.fn!==t||n&&!a.once||i&&a.context!==i)&&s.push(a);else for(var d=0,c=a.length;d<c;d++)(a[d].fn!==t||n&&!a[d].once||i&&a[d].context!==i)&&s.push(a[d]);return s.length?this._events[r]=1===s.length?s[0]:s:delete this._events[r],this},r.prototype.removeAllListeners=function(e){return this._events?(e?delete this._events[o?o+e:e]:this._events=o?{}:Object.create(null),this):this},r.prototype.off=r.prototype.removeListener,r.prototype.addListener=r.prototype.on,r.prototype.setMaxListeners=function(){return this},r.prefixed=o,e.exports=r},function(e,t){e.exports={BID_EXPIRATION_THRESHOLD:6e4,STATUS_CODES:{0:"Pending",1:"Bid available",2:"Bid returned empty or error response",3:"Bid timed out"}}},function(e,t,i){function n(e){function t(e){var t=o();return r.setCookie("OX_ee",e+":"+t),t}function i(e,t){var i,n=t||5381;for(i=0;i<e.length;i++){var r=e.charCodeAt(i);n=(n<<5)+n+r}return n=4294967295&n}function n(e,t,n){return Math.abs(i(e,n))%t/t}function a(e){return(+e).toFixed(20).replace(/^-?\d*\.?|0+$/g,"").length}var s,d,c,u,l=e.id,f=l+"_control",p=Math.pow(10,a(e.participation_threshold)+2),g=e.random_generator_hash,h=r.getCookie("OX_ee"),m=h&&h.split(":");return m?u=m&&m[0]!==l?t(l):m[1]:(u=t(l),r.setCookie("OX_ee",l+":"+u)),c=n(u+l,p,g)<=e.participation_threshold,d=n(u+f,p,g)<=.5,c&&(s=d?f:l),{id:s,userId:u,isParticipating:c,inControl:c&&d,inExperiment:c&&!d,mapping:e.mapping}}var r=i(1),o=i(45);e.exports=n},function(e,t,i){var n=i(1).keyMirror,r={ERROR:null};e.exports=n(r)},function(e,t,i){var n,r=i(1),o=i(5),a=i(11),s=i(6),d=i(4),c=i(2);i(10);n=i(41);var u=function(e){function t(e){c.emit(d.DEBUG,"OpenRTB Config:",e);var t,o,a,s,g={ext:{partners:{}},site:{},device:{}},h=[],m={},v=e.params.ssmeta_endpoint;if(!v)return void c.emit(d.WARN,"SSMeta: no endpoint defined");if(e&&e.slots){for(var y=0;y<e.slots.length;y++){t=e.slots[y],a=t.bids;var w={banner:{},ext:{partners:{},global:{}}},b=i(t.sizes);w.id=t.div,w.secure=E,b.length>1&&(w.banner.format=b),w.banner.w=b[0].w,w.banner.h=b[0].h,w.ext.global.adunitpath=t.adunit,S[t.div]=t.adunit,m[t.div]={};for(s in a)a.hasOwnProperty(s)&&(o=a[s],m[t.div][s]=n.NO_BID_RETURNED,w.ext.partners[s]=o);h.push(w)}if(0===h.length)return void c.emit(d.WARN,"SSMeta: no valid imp objects could be created");if(g.id=r.getUniqueIdentifierStr(),g.imp=h,g.cur=e.params.currency||n.OPENRTB_CURRENCY,g.at=e.params.at||n.OPENRTB_AUCTION_TYPE,e.params)for(s in e.params)e.params.hasOwnProperty(s)&&e.params[s].sellerid&&(g.ext.partners[s]=e.params[s]);g.site.page=r.detectPageURL(),g.site.ref=r.detectRefererURL(),g.user={ext:{}},_=r.getBrowserDimensions(),_&&(g.device.w=_.width,g.device.h=_.height),g.device.ua=navigator.userAgent}var D=function(){r._each(A,function(e,t){g.user.ext[t]={buyeruid:e}}),c.emit(d.DEBUG,"OpenRTB Request:",g),f(v,JSON.stringify(g),function(t){u(t,e.params.auction_id,m)},function(t){l(e.params.auction_id,m)})};return e.params.openx&&e.params.openx.sellerid&&p(e.params.openx.sellerid),T>0?(c.emit(d.DEBUG,"Delaying OpenRTB Request to get user ids",T),void B.push(D)):void D()}function i(e){return e=r.normalizeSizes(e),r._map(e,function(e){var t=e.split("x");return{w:1*t[0],h:1*t[1]}})}function u(e,t,i){c.emit(d.DEBUG,"OpenRTB Response:",e);var n,r,u,f;if(e.seatbid)for(var p=0;p<e.seatbid.length;p++){r=e.seatbid[p],u=r.seat.toLowerCase();for(var g=0;g<r.bid.length;g++){n=r.bid[g];var h=a.createBid(1);h.bidderCode=u,h.cpm=n.price,h.width=n.w,h.height=n.h,h.ad=n.adm,h.div=n.impid,h.adunit=S[n.impid],h.auction_id=t,n.dealid&&(h.deal_id=n.dealid,h.pmp=1),n.exp&&(h.exp=1e3*n.exp),i[n.impid][u]=h,f=s.addBid.bind(this,h),o.tryCatch({context:"SS-Meta Adapter"},f)}}l(t,i)}function l(e,t){var i;for(var r in t)if(t.hasOwnProperty(r))for(var d in t[r])if(t[r].hasOwnProperty(d)&&t[r][d]===n.NO_BID_RETURNED){var c=a.createBid(2);c.bidderCode=d,c.div=r,c.adunit=S[r],c.auction_id=e,c.cpm=0,c.noFill=!0,i=s.addBid.bind(this,c),o.tryCatch({context:"SS-Meta Adapter"},i)}}function f(e,t,i,n){var r=new XMLHttpRequest;r.open("POST",e),r.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),r.withCredentials=!0,r.onreadystatechange=function(){4===this.readyState&&(200===this.status?i&&i(JSON.parse(this.responseText)):204===this.status?i&&i({}):n&&n())},r.send(t)}function p(e){var t;if(n.ENABLE_OPENX_PD&&!v(n.OPENX_PD_NAME)){var i=r.createNewFrameElement(name,0,0);i.src=r.detectProtocol()+"//"+n.OPENX_PD_ENDPOINT+e,(t=document.body)?(c.emit(d.DEBUG,"Making OX pd call."),T++,i.onload=function(){c.emit(d.DEBUG,"OpenX pd iframe loaded",i),m("1",!1,n.OPENX_PD_NAME)},t.appendChild(i)):c.emit(d.WARN,"Cant make OX PD Call, no body.")}}function g(){r._each(n.USER_SYNCS,function(e,t){var i=v(t);i?(A[t]=i,T--,c.emit(d.DEBUG,"User ID found in cookie for "+t,i)):(c.emit(d.DEBUG,"Making request for user id.",t),window[e.callback_name]=function(e){c.emit(d.DEBUG,"User ID returned for "+t,e),m(e.id,e.ttl,t)},e.getId())}),setTimeout(function(){h(!0)},n.USER_SYNC_TIMEOUT)}function h(e){if(B.length&&(T<=0||e))for(c.emit(d.DEBUG,"User syncing completed",A),T=0;B.length;)B.pop()()}function m(e,t,i){return A[i]=e,T--,h(),t=t?6e4*t:n.USER_SYNC_TTL,r.setCookie("muid-"+i,e,t)}function v(e){return r.getCookie("muid-"+e)}var _,y,E="http:"==r.detectProtocol()?0:1,T=r._keys(n.USER_SYNCS).length,B=[],S={},A={};return e&&e.meta_endpoint&&(y=e.meta_endpoint),g(),{callBids:t}};e.exports=u},function(e,t,i){var n=i(1),r=i(3),o=function(e,t){var i=n.getUniqueIdentifierStr();this.type=e||r.AUCTION_TYPES.STANDARD,this.startTime=new Date,this.callback=t,this.expectedBidsByBidder={},this.expectedBidsByDivId={},this.expectedBids=0,this.returnedBids=0,this.ended=0,this.completed=!1,this.id=i};t.createAuction=function(e,t){return new o(e,t)}},function(e,t){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e){if(!e)return null;var t=[["edge",/Edge\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)$/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+)\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/]];return t.map(function(t){if(t[1].test(e)){var i=t[1].exec(e),n=i&&i[1].split(/[._]/).slice(0,3);return n&&n.length<3&&Array.prototype.push.apply(n,1==n.length?[0,0]:[0]),{name:t[0],version:parseFloat(n.join("."))}}}).filter(Boolean).shift()}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}();t.detectBrowser=n;t.BrowserChecker=function(){function e(){i(this,e),this.browserMap={}}return r(e,[{key:"addIncludedBrowser",value:function(e){e&&e.name&&(this.browserMap[e.name]=e)}},{key:"check",value:function(e){if(!e||!e.name)return!1;var t=this.browserMap[e.name]||void 0;return!!t&&(!t.earliestVersion||t.earliestVersion&&e.version>=t.earliestVersion)&&(!t.latestVersion||t.latestVersion&&e.version<=t.latestVersion)}}]),e}(),t.Browser=function(){function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;i(this,e),this.name=t,this.earliestVersion=n,this.latestVersion=r}return r(e,[{key:"setEarliestVersion",value:function(e){"number"==typeof e&&(this.earliestVersion=e)}},{key:"setLatestVersion",value:function(e){"number"==typeof e&&(this.latestVersion=e)}}]),e}()},function(e,t){t.dateNow=function(){return(new Date).getTime()}},function(e,t,i){function n(e){return document.getElementById(e)}i(12);t.getNormalizedWindowDims=function(e,t){e||(e=window),t||(t=document);var i=t.documentElement,n=t.body,r=e.innerWidth||i.clientWidth||n.clientWidth,o=e.innerHeight||i.clientHeight||n.clientHeight;return{width:r,height:o}},t.renderCreative=function(e,t,i,n,s){var d,c,u='javascript:window["contents"]',l=s+"_contents",f="<!DOCTYPE html><html><head><base target='_top'/></head><body style='margin:0;padding:0'>"+e+"</body></html>",p=r(s,n,i);if(d=a&&a<11||window.opera,d&&(p.src=u),t.appendChild(p),d)try{p.contentWindow.contents=f,p.src=u}catch(g){var h=p;p=r(s,n,i),window[l]=f,u="javascript:document.open();document.domain='"+document.domain+"';document.write(window.parent['"+l+"']);window.parent['"+l+"']=null;setTimeout('document.close()',5000)",p.src=u,o(h,p)}else c=p.contentWindow||p.contentDocument,c.document&&(c=c.document),c&&(c.open("text/html","replace"),c.write(f),c.close());return!0};var r=function(e,t,i){var n;try{n=a&&e?document.createElement('<iframe name="'+e+'">'):document.createElement("iframe")}catch(r){n=document.createElement("iframe")}return n.setAttribute("width",t),n.setAttribute("height",i),n.setAttribute("frameSpacing","0"),n.setAttribute("frameBorder","no"),n.setAttribute("scrolling","no"),e&&(n.setAttribute("id",e),n.setAttribute("name",e)),n},o=function(e,t){return e.parentNode.replaceChild(t,e),t},a=function(){var e,t,i=0;if(navigator){try{e=navigator.userAgent,"Microsoft Internet Explorer"==navigator.appName?(t=new RegExp("MSIE ([0-9]{1,}[\\.0-9]{0,})"),null!==t.exec(e)&&(i=parseFloat(RegExp.$1))):"Netscape"==navigator.appName&&(t=new RegExp("Trident/.*rv:([0-9]{1,}[\\.0-9]{0,})"),null!==t.exec(e)&&(i=parseFloat(RegExp.$1)))}catch(n){}return i}}();t.domElById=n,t.createNewFrameElement=r},function(e,t,i){function n(e,t){return o.isArray(e)||(e.params&&(t.params&&t.params.openx&&(e.params.openx=t.params.openx),t.params=e.params,!t.ssmeta_endpoint&&e.params.ssmeta_endpoint&&(t.ssmeta_endpoint=e.params.ssmeta_endpoint)),e=r._map(e.slots||[],function(e){return[e.adunit,e.sizes,e.div,e.targetingMap,e.bids]})),e}var r=i(12),o=i(7);e.exports={metaConfigToSlotArray:n}},function(e,t){function i(){return window.parent==window.top}function n(e,t){return e.parentNode.insertBefore(t,e.nextSibling),t}function r(e){e.parentNode.removeChild(e)}function o(e,t){var i=t.documentElement,n=t.getElementsByTagName("body")[0],r=e.innerWidth||i.clientWidth||n.clientWidth,o=e.innerHeight||i.clientHeight||n.clientHeight;return{width:r,height:o}}function a(e){return!isNaN(e)&&e<1e6}function s(){return window.self!==window.top}function d(e){var t,i;return e?("SCRIPT"===e.tagName?(i=document.createElement("div"),n(e,i),t=i.getBoundingClientRect(),r(i)):t=e.getBoundingClientRect(),{top:Math.round(t.top),left:Math.round(t.left)}):null}function c(){var e,t=window,i=window.document;try{return s()&&(t=window.parent,i=window.parent.document),e=o(t,i),e&&a(e.width)&&a(e.height)?e:null}catch(n){return null}}function u(e){var t,i;if(!e)return null;try{return i=s()?window.parent.document:window.document,t=d(i.getElementById(e)),t&&a(t.left)&&a(t.top)?t:null}catch(n){return null}}e.exports={isPagePosAvailable:i,getBrowserDimensions:c,getAdPosition:u}},function(e,t,i){function n(e,t,i){i||(i={mode:"before"});var n=function(){function n(){u=!0,c=e.apply(this,arguments)}function d(){var e=r.toArray(arguments);s.tryCatch({scope:this,context:"[Utils::Proxy]"},function(){t.call(this,n,e,c)},function(e,t){a.emit(o.ERROR,e)})}var c,u=!1;if("before"===i.mode&&d.apply(this,arguments),u||n.delayed||n.apply(this,arguments),"after"===i.mode){var l=Array.prototype.slice.call(arguments);d.apply(this,l)}return c};return n}var r=i(17),o=i(28),a=i(2),s=i(5);e.exports={before:function(){return n.apply(this,arguments)},after:function(){var e=r.toArray(arguments);return e.push({mode:"after"}),n.apply(this,e)}}},function(e,t,i){function n(e){var t,i,n,r={},o=[];if(!d.isArray(e))return o;for(i=0;i<e.length;i++)t=e[i],r[t.width+"x"+t.height]=!0;for(n in r)r.hasOwnProperty(n)&&o.push(n);return o}function r(e){if(d.isArray(e)&&2===e.length&&!isNaN(e[0])&&!isNaN(e[1]))return e[0]+"x"+e[1]}function o(e){var t,i=[];if(typeof e===s.string){var n=e.split(","),o=/^(\d)+x(\d)+$/i;if(n)for(var a in n)n.hasOwnProperty(a)&&n[a].match(o)&&i.push(n[a])}else if(typeof e===s.object){var d=e.length;if(d>0)if(2===d&&typeof e[0]===s.number&&"number"==typeof e[1])i.push(r(e));else for(var c=0;c<d;c++)i.push(r(e[c]))}var u=i.length;if(u>0&&(t="size="+i[0],u>1)){t+="&promo_sizes=";for(var l=1;l<u;l++)t+=i[l]+=",";t&&","===t.charAt(t.length-1)&&(t=t.slice(0,t.length-1))}return t}function a(e){var t=[];if(typeof e===s.string){var i=e.replace(" ","").split(","),n=/^(\d)+x(\d)+$/i;if(i)for(var o in i)i.hasOwnProperty(o)&&i[o].match(n)&&t.push(i[o])}else if(typeof e===s.object){var a=e.length;if(a>0)if(2===a&&typeof e[0]===s.number&&typeof e[1]===s.number)t.push(r(e));else{if(typeof e[0]===s.string)return e;for(var d=0;d<a;d++)t.push(r(e[d]))}}return t}var s=i(20),d=i(7);e.exports={getChainSizes:n,parseGPTSingleSizeArray:r,parseSizesInput:o,normalizeSizes:a}},function(e,t,i){function n(e){function t(t){var i,n=t[0],r=t[1],a=t[1][0],s=t[2],d=t[3]||{},u=t[4],l=t[5];return i=new h(n,r,s,null,o.CREATED,a,d,e.version,e.size_override),u&&(i.metaConfig=u),l&&c.isNumeric(l)&&(i.floor=parseFloat(l)),T.performAdServerMapping(i),y.slotsByDivId[i.div]=i,y.slots.push(i),i}function i(e,i){var n,r,o=e.length,a=[];for(n=0;n<o;n++)a.push(t(e[n]));return(r=T.requestSlotsToAuction(a))?(A[r.id]=a,void(S[r.id]=i)):void i()}function n(){if(window.googletag){var e,t,i,n,o,a=window.googletag.pubads().getSlots();for(n=0;n<a.length;n++)e=a[n],t=e.getSlotId(),i=y.slotsByDivId[e.getSlotElementId()],i||(o=f.getBidIdAndDfpSlotFromTargetingMap(e.getTargetingMap(),y.slotsByDivId,{searchKeys:r.TARGETING_MAP_SEARCH_PREFIXES,bidIdPrefix:r.BID_ID_PREFIX}),i=o.dfpSlot),i&&(i.slot=e,y.slotsBySlotId["google_ads_iframe_"+t.getId()]=i)}}function m(e){var t=y.slotsByDivId[e];if(!t)throw g.emit(p.ERROR,"Div ID "+e+" is invalid"),"Div ID "+e+" is invalid";return t}function v(e){T.metadata.singleRequest&&!this.areSlotsReadyForAdServer(T.metadata.slots)||T.areSlotsReadyForAdServer(A[e])&&(S[e]&&(A[e]&&T.fireOxMetrics(A[e]),S[e](T.getPriceMap()),delete S[e]),delete A[e])}function _(e){return d(e,T.mapping,T.metadata,!0)}s.call(this,e),this.bidderType(r.BC_BIDDER_TYPES.API_BIDDER);var y,E,T=this,B=function(){"oxDone"in window&&window.oxDone()},S={},A={};T.performAdServerMapping=_,T.requestAdServer=v,T._mapApiZones=n,T._findSlotByDivId=m,T._addDfpSlotAsApi=t,T._addAndRequestSlotsToAuction=i,T.init=function(){var e=window.OX_dfp_options||window.OX_bidder_options,t=window.OX_dfp_ads||window.OX_bidder_ads,n=B;if(y=T.metadata,E=a(!1,y.slotsBySlotId),g.emit(p.DEBUG,"API Bidder initialize"),e){if(e.bidderType&&this.bidderType(e.bidderType),e.disableInitialLoad)return void g.emit(p.DEBUG,"API Bidder disabling initial auction");e.callback&&(n=e.callback)}t=c.metaConfigToSlotArray(t,T.mapping),i(t,n)},T.showAd=function(e){return n(),E.apply(T,arguments)},T.addSlots=function(e,t){i(e,t)},T.getPriceMap=function(){var e,t,i={},n=y.slotsByDivId;for(e in n)if(n.hasOwnProperty(e))if(t=n[e])if(t.getOxTargetingValue&&t.getOxTargetingValue(),t.sizeString){if(i[e]={size:t.sizeString,ad:"",bid_id:void 0,cpm:void 0,price:"t"},t.winningBid){i[e].ad=t.winningBid.ad,i[e].bid_id=t.winningBid.id,t.winningBid.firstPrice?this.mapping.bid_boost_enabled?(i[e].cpm=t.winningBid.secondPrice,i[e].price=""+t.winningBid.secondPriceBucket,i[e].firstPrice=t.winningBid.firstPriceBucket):(i[e].cpm=t.winningBid.firstPrice,i[e].price=""+t.winningBid.firstPriceBucket,i[e].secondPrice=t.winningBid.secondPriceBucket):(i[e].cpm=t.winningBid.secondPrice,i[e].price=""+t.winningBid.secondPriceBucket);var r=l.getBidById(t.winningBid.id);r&&r.deal_id&&(i[e].deal_id=r.deal_id)}}else i[e]={size:"none",price:"0",cpm:"0.0",ad:"",bid_id:null};else g.emit(p.ERROR,"getPriceMap: div does not have an associated slot"),u.gatewayExceptionCall("[ApiBidder::getPriceMap] div does not have an associated slot");return i},T.refresh=function(e,t){if(0!==Object.keys(S).length)return void setTimeout(function(){T.refresh(e,t&&t.slice())},250);T.allowCacheNoFills(!1),n();var i,r,a,s,d,c,f,h=y.slots,m=!!t&&t.length;if(t)if(h=[],m=t.length,window.googletag)for(l.clearMatchedButUnusedBids(),f=0;f<m;f++)c=void 0,r=t[f],a=r&&r.getSlotId(),c=a&&a.getId(),c?"google_ads_iframe_"+c in y.slotsBySlotId&&h.push(y.slotsBySlotId["google_ads_iframe_"+c]):(g.emit(p.ERROR,"refresh: Unexpected error while retrieving slot ID"),u.gatewayExceptionCall("[API Bidder::refresh] unexpected error retrieving slot ID"));else for(f=0;f<m;f++)c=t[f],y.slotsByDivId[c]&&h.push(y.slotsByDivId[c]);for(s=h.length,f=0;f<s;f++)i=h[f],i.status!==o.READY&&i.status!==o.BYPASS&&(i.sizeKey||i.metaConfig)?i.status=o.READY:i.status=o.BYPASS,i.bucket="t",i.reset();return(d=T.requestSlotsToAuction(h))?(A[d.id]=h,void(S[d.id]=e)):void e()},T.getSize=function(e){var t=y&&y.slotsByDivId[e],i=(T.mapping.size_override||{},"none");return t?i=t.sizeString||i:(g.emit(p.WARN,'getSize: Unexpected error returning dfp size string, returning "none".',e),u.gatewayExceptionCall('getSize: Unexpected error returning dfp size string, returning "none". div called for getSize: '+e)),i},T.getPrice=function(e){var t,i="0";return u.tryCatch({context:T.bidderType()},function(){t=y.slotsByDivId[e],i=t.getPrice()},function(t){g.emit(p.WARN,"getPrice: Unexpected error return dfp bucket.",e,t),u.gatewayExceptionCall("getPrice: Unexpected error return dfp bucket. div called for getPrice: "+e)}),i},T.getSecondPrice=function(e){var t=m(e);return t&&t.winningBid&&t.winningBid.secondPriceBucket},T.getFirstPrice=function(e){var t=m(e);return t&&t.winningBid&&t.winningBid.firstPriceBucket},T.getOxTargetingKey=function(e){var t=m(e);return t.getOxTargetingKey()},T.getOxTargetingValue=function(e){var t=m(e),i=t.getOxTargetingValue();return i},T.setOxTargeting=function(e){var t,i,n,r=e&&e.length;u.tryCatch({context:T.bidderType()},function(){for(e||(e=window.googletag.pubads().getSlots(),r=e&&e.length),t=0;t<r;t++)i=e[t].getSlotElementId(),n=y&&y.slotsByDivId[i],n&&e[t].setTargeting(n.getOxTargetingKey(),n.getOxTargetingValue())},function(e,t){g.emit(p.ERROR,"Unexpected error in setOxTargeting",e)})},T.getBidId=function(e){try{var t=y.slotsByDivId[e];return t.winningBid&&t.winningBid.id}catch(i){return null}},T.getBids=function(e,t){g.emit(p.DEBUG,"API Bidder starting initial auction");var n=c.metaConfigToSlotArray(e,T.mapping);i(n,t)}}var r=i(3),o=r.SLOT_STATUS,a=i(22),s=i(13),d=i(14),c=i(1),u=i(5),l=i(6),f=i(18),p=i(4),g=i(2),h=i(15);c["extends"](n,s),e.exports=n},function(e,t,i){var n=i(21),r=i(38),o=i(43);e.exports={createApiBidder:function(e){return new r(e)},createPrefetchBidder:function(e){return new o(e)},createProxyBidder:function(e){return new n(e)}}},function(e,t,i){var n=i(1),r=i(5);e.exports=function(e){var t;if(e.oxhbjsCmds&&n.isArray(e.oxhbjsCmds)){for(t=0;t<e.oxhbjsCmds.length;t++)n.isFn(e.oxhbjsCmds[t])&&e.oxhbjsCmds[t]();e.oxhbjsCmds={push:function(e){r.tryCatch({context:"initializeCommandQueue"},e,void 0,function(){return 0})}}}}},function(e,t){var i={OPENRTB_CURRENCY:["USD"],OPENRTB_AUCTION_TYPE:501,NO_BID_RETURNED:1,USER_SYNC_TIMEOUT:1e3,USER_SYNC_TTL:36e5,OPENX_PD_ENDPOINT:"us-u.openx.net/w/1.0/pd?ph=",OPENX_PD_NAME:"oxpd",ENABLE_OPENX_PD:!0,USER_SYNCS:{}};e.exports=i},function(e,t,i){i(24).polyfill();var n,r=i(5),o=i(39),a=i(40),s={init:function(){function e(){var e=!!(t.prefetch&&t.prefetch.auid&&t.prefetch.slots.length),n=i&&i.prefetch,a=!!t.use_slot_info;return r&&!n?o.createApiBidder(t):(a&&(i||(i=window.OX_dfp_options={}),window.OX_dfp_ads=[]),n||e||a?o.createPrefetchBidder(t):o.createProxyBidder(t))}var t=window.OXHBConfig.DFP_mapping,i=window.OX_dfp_options||window.OX_bidder_options,r=window.OX_dfp_ads||window.OX_bidder_ads;n=e(),n.init(),s.__debug&&(s.__debug.bidder=n)},showAd:function(){var e=arguments;r.tryCatch({context:n.bidderType()},function(){n.showAd.apply(this,e)})},refresh:function(){return n.refresh&&n.refresh.apply(this,arguments)},getSize:function(){return n.getSize&&n.getSize.apply(n,arguments)},getPrice:function(){return n.getPrice&&n.getPrice.apply(n,arguments)},getPriceMap:function(){return n.getPriceMap&&n.getPriceMap.apply(n,arguments)},getSecondPrice:function(){return n.getSecondPrice&&n.getSecondPrice.apply(n,arguments)},getFirstPrice:function(){return n.getFirstPrice&&n.getFirstPrice.apply(n,arguments)},getBids:function(){return n.getBids&&n.getBids.apply(n,arguments)},getBidId:function(){return n.getBidId&&n.getBidId.apply(n,arguments)},setOxTargeting:function(){return n.setOxTargeting&&n.setOxTargeting.apply(n,arguments)},addSlots:function(){return n.addSlots&&n.addSlots.apply(n,arguments)},getOxTargetingKey:function(){return n.getOxTargetingKey&&n.getOxTargetingKey.apply(n,arguments)},getOxTargetingValue:function(){return n.getOxTargetingValue&&n.getOxTargetingValue.apply(n,arguments)},getVersion:function(){return"2.0.22-18"}};window.OXHBConfig&&window.OXHBConfig.oxns&&window[window.OXHBConfig.oxns]&&(window[window.OXHBConfig.oxns].dfp_bidder=s),s.init(),a(window),e.exports=s},function(e,t,i){function n(e){function t(e){var t=e[0],i=e[1],n=e[1][0],r=e[2],o=e[3]||{},a=e[4],s=y.metadata.slotsByDivId[r];return s||(s=new f(t,i,r,null,d.CREATED,n,o,y.mapping.version),a&&(s.metaConfig=a),y.metadata.slotsByDivId[r]=s,y.metadata.slots.push(s)),s}function i(){function e(e){return c(e,y.mapping,y.metadata,!0)}var i,n,r=window.OX_dfp_ads,u=y.newAuctionConfig(s.AUCTION_TYPES.PREFETCH);r=a.metaConfigToSlotArray(r,y.mapping);var l=r&&r.length;for(n=0;n<l;n++){var f=r[n];i=t(f),e(i),i.status===d.READY&&o.prototype.addSlotForAuction.call(y,i,u)}return u}function n(){var e,t,i=window.OX_dfp_slots||y.mapping.prefetch&&y.mapping.prefetch.slots,n=y.mapping.prefetch&&y.mapping.prefetch.auid,r=i&&i.length,a=y.newAuctionConfig(s.AUCTION_TYPES.PREFETCH);for(t=0;t<r;t++)e={div:String(t),supportedSizes:i[t],auid:n},o.prototype.addSlotForAuction.call(y,e,a);return a}function p(){E=B?y.newAuctionConfig(s.AUCTION_TYPES.SLOT_CACHE):T?i():n(),y._beforeDisplayAuction=y.createAuction(E),y._beforeDisplayAuction&&(y._beforeDisplayAuction.setToTimeout=function(){var e=y.metadata.slots.slice();a._each(e,function(e){e.setStartMetricsFromAuction(y._beforeDisplayAuction)}),T?setTimeout(y.createTimeoutForSlots(y._beforeDisplayAuction,e),y.mapping.timeout):a._each(e,function(e){e.setAsTimeoutStarted()}),y._beforeDisplayAuction.setToTimeout=null},S=y._beforeDisplayAuction.startTime.getTime())}function g(e,t){var i=a.dateNow()-s.BID_EXPIRATION_THRESHOLD,n=!1;return S<i?void l.emit(u.WARN,"Ads are after the current threshold (4.5 min)"):(y.hasPreDefinedSlots?a._each(t.slots,function(t){t.div!==e.div||t.matchedDiv||(t.matchedDiv=e.div,e.matchedDiv=t.div,n=!0)}):a._each(t.slots,function(t){!a.isSubset(e.supportedSizes||e.size,t.sizes)||t.matchedDiv||y.metadata.slotsByDivId[t.div]||(t.matchedDiv=e.div,e.matchedDiv=t.div,n=!0)}),n||l.emit(u.WARN,"No pre-bid matches found for dfpSlot:",e),n)}function h(e,t,i,n){var o=y.metadata.slotsByDivId[i];return o?(o.slot=n,o.size=t,o.zone=e,o.div=i,void(y.metadata.slotsBySlotId["google_ads_iframe_"+n.getSlotId().getId()]=o)):r.prototype.addSlot.apply(y,arguments)}function m(e){var t;return y._beforeDisplayAuction&&!y._beforeDisplayAuction.completed&&a._each(e,function(e){e.inFlight||(e.status!==d.CREATED&&e.status!==d.READY&&e.status!==d.BYPASS||y.performAdServerMapping(e),g(e,E)&&(e.inFlight=y._beforeDisplayAuction.id))}),t=y._beforeDisplayAuction&&!y._beforeDisplayAuction.completed&&y.mapping.use_slot_info?this.newAuctionConfig(s.AUCTION_TYPES.SLOT_CACHE_FALLBACK):this.newAuctionConfig(s.AUCTION_TYPES.STANDARD),this.attemptAuction(e,t)}function v(e,t){var i=y.metadata.slotsByDivId[e.div];if(!i){var n=Number(e.div),r=E.slots[n];if(r){if((!e.width||!e.height)&&r.sizes&&r.sizes.length>0){
var o=r.sizes[0].split("x");e.width=Number(o[0]),e.height=Number(o[1])}e.prefetched=!0,r.matchedDiv&&(y._beforeDisplayAuction.expectedBidsByDivId[r.matchedDiv]=y._beforeDisplayAuction.expectedBidsByDivId[e.div],e.div=r.matchedDiv)}}return w.apply(this,arguments)}function _(){l.emit(u.DEBUG,"Prefetch Bidder initialized"),p(),A()}r.call(this,e);var y=this,E=null,T=window.OX_dfp_options&&window.OX_dfp_options.prefetch&&window.OX_dfp_ads;this.hasPreDefinedSlots=T&&window.OX_dfp_ads.length>0;var B=e&&e.use_slot_info,S=null,A=this.init,w=this.onBidReceived;B?this.bidderType(s.BC_BIDDER_TYPES.SLOT_CACHING_BIDDER):T?this.bidderType(s.BC_BIDDER_TYPES.PREFETCH_WITH_DEFINED_SLOTS_BIDDER):this.bidderType(s.BC_BIDDER_TYPES.PREFETCH_BIDDER),this.init=_,this.addSlot=h,this.requestSlotsToAuction=m,this.onBidReceived=v,this._makeApiPrefetchSlot=t,this._createPrefetchAuctionConfigFromApi=i,this._createPrefetchAuctionConfigFromMapping=n,this._doPrefetchAuction=p}var r=i(21),o=i(13),a=i(1),s=(i(5),i(3)),d=s.SLOT_STATUS,c=i(14),u=i(4),l=(i(6),i(2)),f=i(15);a["extends"](n,r),e.exports=n},function(e,t){function i(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function r(e){if(u===setTimeout)return setTimeout(e,0);if((u===i||!u)&&setTimeout)return u=setTimeout,setTimeout(e,0);try{return u(e,0)}catch(t){try{return u.call(null,e,0)}catch(t){return u.call(this,e,0)}}}function o(e){if(l===clearTimeout)return clearTimeout(e);if((l===n||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(e);try{return l(e)}catch(t){try{return l.call(null,e)}catch(t){return l.call(this,e)}}}function a(){h&&p&&(h=!1,p.length?g=p.concat(g):m=-1,g.length&&s())}function s(){if(!h){var e=r(a);h=!0;for(var t=g.length;t;){for(p=g,g=[];++m<t;)p&&p[m].run();m=-1,t=g.length}p=null,h=!1,o(e)}}function d(e,t){this.fun=e,this.array=t}function c(){}var u,l,f=e.exports={};!function(){try{u="function"==typeof setTimeout?setTimeout:i}catch(e){u=i}try{l="function"==typeof clearTimeout?clearTimeout:n}catch(e){l=n}}();var p,g=[],h=!1,m=-1;f.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)t[i-1]=arguments[i];g.push(new d(e,t)),1!==g.length||h||r(s)},d.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=c,f.addListener=c,f.once=c,f.off=c,f.removeListener=c,f.removeAllListeners=c,f.emit=c,f.prependListener=c,f.prependOnceListener=c,f.listeners=function(e){return[]},f.binding=function(e){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(e){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},function(e,t){t=e.exports=function(){for(var e,i="",n=0;n<32;n++)e=16*t.random()|0,n>4&&n<21&&!(n%4)&&(i+="-"),i+=(12===n?4:16===n?3&e|8:e).toString(16);return i};var i=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/;t.isUUID=function(e){return i.test(e)},t.random=function(){return Math.random()}},function(e,t){},function(e,t,i){var n=i(4),r=i(2),o=i(49),a=i(29),s=i(50),d=i(6),c=window.OXHBConfig&&window.OXHBConfig.DFP_mapping||{};if(r.emit(n.DEBUG,"Adding Adapters"),"META"===c.version)d.addAdapter(a(),"ssmeta");else{if(d.addAdapter(o(),"openx"),d.addAdapter(s(),"prefetch"),c.contextual_demand===!0){var u=i(48);d.addAdapter(u("openx_contextual"),"openx_contextual")}}},function(e,t,i){var n=i(11),r=i(6),o=i(10),a=i(23),s=i(5);e.exports=function(e){function t(t,i,o){var a=n.createBid(o.no_bid?2:1);if(a.bidderCode=e,a.div=t.div,a.adunit=t.adunit,a.auction_id=i,!a.no_bid){var d=o.size.split("x");a.cpm=parseFloat(o.bid),a.ad=o.adcode,a.width=d[0],a.height=d[1]}s.tryCatch({context:"Context Adapter"},function(){r.addBid(a)})}function i(e){for(var i,n=e.auction_id,r=e.bids,s=[],c="OXMNcallback"+n,u=0;u<r.length;u++){var l=r[u].params,f=r[u].sizes[0];i=l.cid,s.push(l.placementId+"|"+f)}var p=a.buildQueryString({cid:i,request:s,callback:c});window[c]=function(e){for(var i=0;i<r.length;i++){var o=r[i].params,a=e[o.placementId];t(r[i],n,a)}},o.loadScript(d+"?"+p)}var d=location.protocol+"//contextual.media.net/mnethbadapter.js";"https:"===location.protocol;return{callBids:i}}},function(e,t,i){var n=i(1),r=i(5),o=(i(51),i(10),i(4)),a=i(2),s=i(8),d=i(3),c=window.OXHBConfig,u=function(e){function t(e){var t,i=[],r=[],u=e.pageTargeting,l=[],g=[];return n._each(e.bids,function(d){return d.params.adunitid&&d.sizes?(d.params.gateway&&(t=d.params.gateway),void(c.DFP_mapping.single_request&&n.isEmpty(d.targetingMap)?i.push(d):r.push(d))):(a.emit(o.WARN,"OpenX: invalid bid request.",d),void l.push(Promise.resolve([s.buildBid(e.auction_id,d.div)])))}),f?(g=p(i,r,u,{gateway:t,isPrefetch:e.type===d.AUCTION_TYPES.PREFETCH},e.auction_id,e.timeLimit),g.concat(l)):(a.emit(o.WARN,"OpenX: OX not in window and no jstag_url"),n._map(e.bids,function(t){return Promise.resolve(s.buildBid(e.auction_id,t.div))}))}function i(e,t,i,d,u){var p,g,h=n._map(e,function(e){return new Promise(function(u){function h(){m=m||{},a.emit(o.BIDDER_ADAPTOR_ERROR,"Bid request caused an error.",e),u([s.buildBid(d,e.div,void 0,m.getRecordTemplate&&m.getRecordTemplate(),m.getPerformanceMetrics&&m.getPerformanceMetrics())])}var m;r.tryCatch({context:"OpenX Adapter"},function(){function r(t){o||(o=!0,u([s.buildBid(d,e.div,t,m.getRecordTemplate&&m.getRecordTemplate(),m.getPerformanceMetrics&&m.getPerformanceMetrics())]))}var o=!1;m=f(),m.setBidderEligibility(!0),m.setPrefetch(i.isPrefetch),m.addAdUnit(e.params.adunitid),m.setAdSizes(n.normalizeSizes(e.sizes)),m.setBidderConfiguration(c._bidderConfiguration),c.expVer&&m.enableExperiment(c.expVer),c.DFP_mapping&&c.DFP_mapping.timeout&&m.setBidderTimeout(c.DFP_mapping.timeout),e.floor&&m.setAdUnitMarketFloor(e.params.adunitid,e.floor),e.params.experiment&&m.enableExperiment(e.params.experiment),c.ad_position_detection_enabled&&n.isPagePosAvailable()&&(g=n.getBrowserDimensions(),p=n.getAdPosition(e.div),g&&p&&(m.setBrowserDims(g.width+"x"+g.height),m.setAdUnitLocation(p.left+","+p.top))),l(m,e.targetingMap),l(m,t),m.setPageURL(n.detectPageURL()),m.addHook(r,f.Hooks.ON_ADUNIT_INITIALIZED),m.addHook(r,f.Hooks.ON_AD_RESPONSE),m.addHook(h,f.Hooks.ON_AD_REQUEST_ERROR),e.startTime=n.dateNow(),m.load()},function(e,t){h()})})});return h}function u(e,t,i,d,u){var p=[];return new Promise(function(u){function g(e){return n._map(e,function(e){return s.buildBid(d,e.div)})}r.tryCatch({context:"OpenX Adapter"},function(){var h,m,v,_,y=0,E=f(),T=[],B=[],S=[],A=new RegExp("/^[|]+$/");for(E.setBidderEligibility(!0),E.setBidderConfiguration(c._bidderConfiguration),E.setPrefetch(i.isPrefetch),c.expVer&&E.enableExperiment(c.expVer),c.DFP_mapping&&c.DFP_mapping.timeout&&E.setBidderTimeout(c.DFP_mapping.timeout),n._each(e,function(e){e.floor&&E.setAdUnitMarketFloor(e.params.adunitid,e.floor)}),l(E,t),E.addHook(function(e){var t={auid:e.get("auid"),chain_timeout:e.get("chain_timeout"),chain_revenue:e.get("chain_revenue"),actual_auid:e.get("auid"),chain:e.get("chain")},i={adunit:t,rt:E.getRecordTemplate(),oninit:void 0,chain:1};T.push(i),y++},f.Hooks.ON_ADUNIT_INITIALIZED),E.addHook(function(t){var i,c,l,f,g=0;r.tryCatch({context:"OpenX Adapter"},function(){var t;for(i=0;i<T.length;i++){var o=E.getOrCreateAdUnit(""+i);o.load(T[i]),B.push(o)}for(i=e.length-1;i>=0;i--)r.tryCatch({context:"OpenX Adapter"},function(){for(t=e[i],l=!1,c=B.length-1;c>=0;c--){f=B[c];var r=n.getChainSizes(f.get("chain")),o=n.normalizeSizes(t.sizes);if(e[i].params.adunitid==f.get("auid")&&n.isSubset(o,r)){p.push(s.buildBid(d,t.div,f,E.getRecordTemplate(),E.getPerformanceMetrics&&E.getPerformanceMetrics(),void 0)),g++,B.splice(c,1),l=!0;break}}l||p.push(s.buildBid(d,t.div,void 0,E.getRecordTemplate&&E.getRecordTemplate(),E.getPerformanceMetrics&&E.getPerformanceMetrics()))},function(e,n){r.tryCatch({context:"OpenX Adapter"},function(){g!==i+1&&(p.push(s.buildBid(d,t.div,void 0,E.getRecordTemplate&&E.getRecordTemplate(),E.getPerformanceMetrics&&E.getPerformanceMetrics(),void 0)),g++)})})},function(t,i){a.emit(o.BIDDER_ADAPTOR_ERROR,"Batched request caused an error.",e)}),u(p)},f.Hooks.ON_AD_RESPONSE),E.addHook(function(){var t=g(e);u(t)},f.Hooks.ON_AD_REQUEST_ERROR),h=0;h<e.length;h++)E.addAdUnit(e[h].params.adunitid),E.setAdSizes(n.normalizeSizes(e[h].sizes)),e[h].startTime=n.dateNow();if(c.ad_position_detection_enabled&&n.isPagePosAvailable()){for(m=n.getBrowserDimensions(),h=0;h<e.length;h++)_=n.getAdPosition(e[h].div),_?S.push(_.left+","+_.top):S.push("");v=S.join("|"),m&&!A.test(v)&&(E.setBrowserDims(m.width+"x"+m.height),E.setAdUnitLocation(v))}E.load()},function(t,i){a.emit(o.BIDDER_ADAPTOR_ERROR,"Batched request caused an error.",e),u(g(e))})})}function l(e,t){if(e&&t)for(var i in t)if(t.hasOwnProperty(i))if(n.isArray(t[i]))for(var r in t[i])t[i].hasOwnProperty(r)&&e.addVariable(i,t[i][r]);else e.addVariable(i,t[i])}var f=s.getOX(),p=function(e,t,n,r,o,a){var s=[];return r.gateway&&(r.gateway.indexOf("/w")<0&&(r.gateway=r.gateway+"/w"),f.setGateway(r.gateway)),e.length&&s.push(u(e,n,r,o,a)),t.length&&(s=s.concat(i(t,n,r,o,a))),s};return{callBids:t}};e.exports=u},function(e,t,i){var n=i(1),r=i(5),o=i(10),a=(i(11),i(4)),s=i(2),d=i(3),c=i(8),u=window.OXHBConfig,l=1,f=0,p=function(){function e(e){var n=d.JSONP_RESPONSE_HANDLER_PREFIX+"br_"+l++,r=window.location.href;if(i=Date.now(),r&&u){window[n]=function(i){t(i,e)};var a={},s="//"+u.host+"/"+u.medium+"/1.0/br?ju={ju}&jsonp={jsonp}";a.ju=r,a.jsonp=n,o.loadScript(c.getRequestUrl(s,a))}}function t(e,t){var o,d,u=OX();return s.emit(a.DEBUG,"Prefetch Adapter callbids",window.OX_dfp_options),e?(o=e.ads&&e.ads.record_tmpl,d=e.ads&&e.ads.chain,void n._each(e.ads.adunits,function(n,a){if(e.divs[a]){f++;var s=u.getOrCreateAdUnit(f+"");s.load({adunit:n,rt:o,chain:d}),r.tryCatch({context:"Prefetch Adapter"},function(){c.addBid(t,decodeURIComponent(e.divs[a]),s,o,!0,void 0,i)})}})):void s.emit(a.DEBUG,"Prefetch Adapter: cache miss")}var i;return{callBids:e}};e.exports=p},function(e,t,i){var n=i(6),r={};t.pbCallbackMap=r,t.getPlacementIdByCBIdentifer=function(e){return r[e]},t.setExpectedBidsCount=function(e,t){n.setExpectedBids(e,t)},t.addBidResponse=function(e,t,i,r){i.div=e,i.auction_id=t,n.addBid(i,r)}}]);


