window.aps=window.aps||{}; window.googletag=window.googletag||{}; window.pbjs=window.pbjs||{}; window.HDN=window.HDN||{}; window.debugSGA=window.debugSGA||false; window.APSpageUrl=window.APSpageUrl||""; window.responsiveAds=window.responsiveAds||function(){}; (function(){aps.cmd=[]; aps.juiceLog=[]; aps.modules={}; aps.events=[]; aps.event={}; aps.app_events={}; aps.logtype={}; aps.implementSRA=true; aps.juiceErrors=""; function getPageUrl(){var returnUrl; var parentAPSPageURL; var parentPageUrl; try{parentAPSPageURL=parent.APSpageUrl; parentPageUrl=parent.window.location.host+parent.window.location.pathname+parent.window.location.search }catch(e){aps.juiceErrors="juice service error - unable to get parent information\n" }try{returnUrl=parentAPSPageURL||APSpageUrl||parentPageUrl||window.location.host+window.location.pathname+window.location.search }catch(e){returnUrl=window.location.host+window.location.pathname+window.location.search; aps.juiceErrors+="juice serve error - getting JuicePageUrl\n" }return returnUrl }function cleanUrl(returnUrl){if(returnUrl.toLowerCase().indexOf("http://")==0){returnUrl=returnUrl.substr(7,returnUrl.length) }if(returnUrl.toLowerCase().indexOf("https://")==0){returnUrl=returnUrl.substr(8,returnUrl.length) }if(returnUrl.length>300){returnUrl=returnUrl.substr(0,300) }var queryStr=""; if(returnUrl.indexOf("?")!=-1){queryStr=returnUrl.substr(returnUrl.indexOf("?"),returnUrl.length); returnUrl=returnUrl.substr(0,returnUrl.indexOf("?")) }if(returnUrl.charAt(returnUrl.length-1)=="/"){returnUrl=returnUrl.slice(0,-1) }return returnUrl+queryStr }window.JuicePageUrl=cleanUrl(getPageUrl()); if(typeof definedTags=="undefined"){window.loadAd_UrlLocation=(debugSGA)?"https://dev.gagnier.info/":"https://aps.hearstnp.com/"; var url=loadAd_UrlLocation+((debugSGA)?getsource:"SRO/GetJS?url=")+escape(JuicePageUrl.toLowerCase()); var scr=document.createElement("script"); scr.src=url; scr.id="AdsConfigJavaScript"; var node=document.getElementsByTagName("html")[0].children; node[(node.length>1)?1:0].appendChild(scr) }aps.waitForDefinedTags=function(func){if(typeof definedTags=="object"){eval(func)() }else{aps.alreadyWaiting=aps.alreadyWaiting||false; aps.waitingForDefinedTags=aps.waitingForDefinedTags||[]; if(aps.waitingForDefinedTags.indexOf(func)>-1){return }aps.waitingForDefinedTags.push(func); if(typeof definedTags=="undefined"){aps.registerEvent(aps.event.on_ad_definition_loaded,function(){eval(func)() }); if(!aps.alreadyWaiting){aps.logInfo("waiting for Ad Definition",true); aps.alreadyWaiting=true }}}}; googletag.cmd=googletag.cmd||[]; pbjs.que=pbjs.que||[]; pbjs.bidderSettings=pbjs.bidderSettings||{}; HDN.dataLayer=HDN.dataLayer||{}; HDN.dataLayer.ads=HDN.dataLayer.ads||{}; HDN.dataLayer.privacy=HDN.dataLayer.privacy||{}; aps.pageWidth=window.screen.width||top.window.innerWidth||window.width||-1; window.DESKTOP=1; window.MOBILE=2; window.TABLET=3; if(navigator.userAgent.indexOf("iPad")>-1){window.current_device=TABLET }else{if(navigator.userAgent.indexOf("iPhone")>-1){window.current_device=MOBILE }else{if(navigator.userAgent.indexOf("Android")>-1){window.current_device=MOBILE }else{if(document.querySelectorAll("meta[name=viewport]").length>0){try{var pw; var metat=document.querySelectorAll("meta[name=viewport]")[0].content.split(","); for(var i=0; i'+time+" : "+logs[i].m+""; html+=msg }var w=window.open("","wnd"); w.document.body.innerHTML=html }; aps.formatDateTime=function(timeStamp){var h=(timeStamp.getHours()<10?"0":"")+timeStamp.getHours(); var m=(timeStamp.getMinutes()<10?"0":"")+timeStamp.getMinutes(); var s=(timeStamp.getSeconds()<10?"0":"")+timeStamp.getSeconds(); var ms=timeStamp.getMilliseconds(); return h+":"+m+":"+s+": "+ms }; aps.getAdMetrics=function(code){var def=aps.adPerformanceMetrics[code]; if(typeof(def)=="undefined"){def={lineItemId:0,creativeId:0,DomId:code,hearstPlaceAd:0,googleDisplay:0,rendered:0,impressionViewable:0,refreshCalled:0,isEmpty:true,size:"",totalRenders:0,totalImpressions:0,pageInfo:aps.performanceMetrics}; aps.adPerformanceMetrics[code]=def }return def }; aps.registerModule=function(name){aps.modules[name]={}; return aps.modules[name] }; aps.getThirdPartyMetrics=function(name){var def=aps.performanceMetrics.ThirdParty[name]; if(typeof(def)=="undefined"){def={start:0,stop:0,runtime:0,refresh_start:0,refresh_stop:0,refresh_runtime:0}; aps.performanceMetrics.ThirdParty[name]=def }return def }; aps.startThirdParty=function(name){aps.getThirdPartyMetrics(name).start=aps.getTimeElapsed() }; aps.stopThirdParty=function(name){var def=aps.getThirdPartyMetrics(name); def.stop=aps.getTimeElapsed(); def.runtime=(def.stop-def.start).toFixed(2) }; aps.startThirdPartyRefresh=function(name){aps.getThirdPartyMetrics(name).refresh_start=aps.getTimeElapsed() }; aps.stopThirdPartyRefresh=function(name){var def=aps.getThirdPartyMetrics(name); def.refresh_stop=aps.getTimeElapsed(); def.refresh_runtime=(def.refresh_stop-def.refresh_start).toFixed(2) }; aps.performanceMetrics.JuiceScriptLoading=aps.getTimeElapsed(); aps.desktopOrMobile=function(desktopValue,mobileValue){return(aps.cfg.bid.current_device==DESKTOP)?desktopValue:mobileValue }; aps.performanceMetrics.SRA=aps.implementSRA?"true":"false"; aps.logInfo("start of juice script loading",true); try{if(HDN.dataLayer.content.displayTemplate=="ard"){aps.cfg.dfp.batchSRA.enabled=true; if(aps.cfg.bid.current_device==MOBILE){aps.cfg.dfp.batchSRA.userInteractFor=0; aps.cfg.dfp.batchSRA.atfFirst=false }}}catch(ex){}try{if(HDN.dataLayer.content.displayTemplate=="phd"){aps.cfg.dfp.batchSRA.enabled=true; aps.cfg.stp.nextTimeout=1500; if(aps.cfg.bid.current_device==MOBILE){aps.cfg.dfp.batchSRA.userInteractFor=0; aps.cfg.dfp.batchSRA.atfFirst=false }}}catch(ex){}try{if(HDN.dataLayer.ads.adMode=="arb"){aps.cfg.dfp.arbitrage.enabled=true; aps.logInfo("Enabling Arbitrage Mode") }}catch(ex){}aps.startStep=function(){var nextStep=aps.cfg.stp.at+2; if(aps.cfg.stp.at==-1&&aps.cfg.stp[0]==undefined){aps.cfg.stp[0]=JSON.parse(JSON.stringify(aps.cfg.stp.def)) }if(aps.cfg.stp[nextStep]==undefined){aps.cfg.stp[nextStep]=JSON.parse(JSON.stringify(aps.cfg.stp.def)); aps.cfg.stp[nextStep].timeout=aps.cfg.stp.nextTimeout; if(!aps.cfg.bid.a9.enabled){aps.cfg.stp[nextStep].a9.bidsReceived=true }}if(aps.cfg.stp.at==-1||(aps.cfg.stp[aps.cfg.stp.at].adRendered&&(aps.cfg.dfp.waiting.length>0||aps.cfg.dfp.batchSRA.enabled))){aps.cfg.stp.at++; aps.logInfo("Starting step "+aps.cfg.stp.at); return true }else{return false }}; aps.waitStartStep=function(){if(aps.cfg.dfp.waiting.length>0){if(aps.startStep()){defineTags(definedTags) }else{setTimeout(function(){aps.waitStartStep() },500) }}}; aps.nextBatchSRA=function(){if(typeof definedTags=="undefined"){aps.waitForDefinedTags(function(){defineTags(definedTags) }) }else{if((!aps.cfg.dfp.batchSRA.enabled||aps.cfg.dfp.batchSRA.auto&&aps.cfg.dfp.batchSRA.waitingNext)||(aps.cfg.dfp.batchSRA.userInteractFor>(aps.cfg.stp.at+1))){if(aps.startStep()){window.defineTags(definedTags) }}else{aps.logInfo("Batch SRA : waiting for scroll") }}}; aps.onScroll=function(){if(aps.cfg.dfp.batchSRA.hasScrolled){return }if(aps.cfg.dfp.batchSRA.userInteractFor==(aps.cfg.stp.at+1)){aps.logInfo("Batch SRA : Scrolled"); aps.cfg.dfp.batchSRA.auto=true; if(aps.cfg.dfp.batchSRA.waitingNext||aps.cfg.dfp.batchSRA.userInteractFor==0){if(aps.cfg.dfp.batchSRA.userInteractFor==0){aps.cfg.dfp.batchSRA.waitingNext=true }aps.nextBatchSRA(); aps.cfg.dfp.batchSRA.hasScrolled=true }}}; try{if(HDN.jwplayers){for(var pl in HDN.jwplayers){if(!pl.mute&&!pl.startenabled){aps.cfg.vid.mode="ctp" }}}}catch(e){}if(document.location.pathname.indexOf("/sponsored/")!==-1){aps.logInfo("*Disabling bidders - sponsored content"); aps.cfg.bid.enabled=false }if(aps.cfg.vid.enabled){document.addEventListener("hdn.jwplayer",function(e){aps.logInfo("VideoEvent: "+e.details.eventAction); console.log(e.details); if(e.details.eventAction=="Video Progress 75%"){aps.logInfo("Requesting new video bids"); aps.cfg.vid.tagUrl=""; aps.startStep(); aps.fireEvent(aps.event.on_request_new_video_ads,{}) }},false) }if(aps.cfg.dfp.batchSRA.enabled){aps.logInfo("Batch SRA : listening to Scroll event"); if(window.addEventListener){window.addEventListener("scroll",aps.onScroll,false); window.addEventListener("click",aps.onScroll,false) }else{if(window.attachEvent){window.attachEvent("onscroll",aps.onScroll); window.attachEvent("onclick",aps.onScroll) }}}})();(function(){aps.refreshAvailable=false; aps.pageKVPsByDomID=[]; aps.hearstPlaceAdHasUpdatedKVPS=false; aps.current_page_kvps={}; aps.adScripts=aps.adScripts||{}; aps.queuedWaitCount=aps.queuedWaitCount||0; aps.queuedScriptCount=aps.queuedScriptCount||0; aps.adScriptsLoaded=false; aps.queryStringObj=null; aps.serveAds=true; aps.slotsSetup=false; aps.faceBookInstantArticle=(JuicePageUrl.indexOf("juicemode=fbinstant")!==-1); aps.shouldPlaceAd=function(adCode){return true }; aps.shouldRunThirdParty=function(modulecode){return true }; aps.loadGoogleService=function(async){window.onJuiceEvent_LoadingGPT&&window.onJuiceEvent_LoadingGPT(); if(!aps.googleLoaded){var gads=document.createElement("script"); if(async){gads.async=true }gads.type="text/javascript"; gads.src="https://securepubads.g.doubleclick.net/tag/js/gpt.js"; var node=document.getElementsByTagName("script")[0]; node.parentNode.insertBefore(gads,node) }}; aps.gcontext={}; aps.gcontext._setTargeting=function(kvpKey,kvpValue){if(kvpKey!=""){aps.current_page_kvps[kvpKey]=kvpValue; googletag.cmd.push(function(){googletag.pubads().setTargeting(kvpKey,kvpValue) }) }}; aps.gcontext.pubads=function(){this.setTargeting=function(kvpKey,kvpVal,logmsg){logmsg=logmsg||null; if(aps.slotsSetup){aps.gcontext._setTargeting(kvpKey,kvpVal); if(logmsg!=null){aps.logInfo(logmsg) }}else{aps.registerEvent(aps.event.on_end_define_tags,function(parms){aps.gcontext._setTargeting(kvpKey,kvpVal); if(logmsg!=null){aps.logInfo(logmsg) }}) }}; this.clearTargeting=function(kvpKey){aps.current_page_kvps[kvpKey]=null; googletag.pubads().clearTargeting(kvpKey) }; return this }; aps.runWhenSlotsReady=function(fn){if(aps.slotsSetup){fn() }else{aps.registerEvent(aps.event.on_end_define_tags,function(parms){fn() }) }}; aps.getQueryParameterByName=function(key){if(aps.qeueryStringObj==null){aps.qeueryStringObj=aps.queryStringToJSON() }var qobj=aps.qeueryStringObj; var keyToUse=key.replace("[]",""); if(!qobj.hasOwnProperty(keyToUse)){return null }if(key.indexOf("[]")==-1){return qobj[keyToUse] }if(typeof qobj[keyToUse]==="string"){var retval=[]; retval.push(qobj[keyToUse]); return retval }return qobj[keyToUse] }; aps.queryStringToJSON=function(){var str=location.search.slice(1); var pairs=str.split("&"); var result={}; pairs.forEach(function(pair){pair=pair.split("="); var name=pair[0]; var value=pair[1]; if(name.length){if(result[name]!==undefined){if(!result[name].push){result[name]=[result[name]] }result[name].push(value||"") }else{result[name]=value||"" }}}); return(result) }; aps.initialUpdatePageLevelKVPS=function(apsContext){if(!aps.hearstPlaceAdHasUpdatedKVPS){aps.hearstPlaceAdHasUpdatedKVPS=true; aps.logInfo("calling updatePageLevelKVPS from hpa"); top.aps.updatePageLevelKVPS(apsContext) }}; aps.updatePageLevelKVPS=function(apsContext){var found=false; for(var i=0; i0){var arFixedMappings=[]; var arViewports=[]; var viewPortIDX={}; for(var i=0; i0){for(var i=0; i=2)?arguments[1]:divID; aps.codesByDomID[divID]=code }; aps.isDivIDUniqueForAdPlacement=function(fname,divID){if(typeof(aps.codesByDomID[divID])!="undefined"){if(aps.codesByDomID[divID]=="passthrough"){return true }aps.logWarning("A duplicate div id was specified ("+divID+") for "+fname+". The call was ignored."); return false }return true }; aps.logPageKVPsforDiv=function(divID){aps.pageKVPsByDomID[divID]={}; var pageKVPs=aps.current_page_kvps; var divKVPS=aps.pageKVPsByDomID[divID]; for(var keyVal in pageKVPs){if(!pageKVPs.hasOwnProperty(keyVal)){continue }divKVPS[keyVal]=pageKVPs[keyVal] }}; window.setDfpSearchValues=function(apsContext){if(typeof(aps)!="undefined"&&aps!=null){aps.key=aps.key||""; aps.values=aps.values||""; try{apsContext.pubads().setTargeting(aps.key,aps.values) }catch(e){}}}; aps.run_once=function(fn,context){var result; return function(){if(fn){result=fn.apply(context||this,arguments); fn=null }return result } }; aps.contentLoaded=function(win,fn){var done=false,top=true,doc=win.document,root=doc.documentElement,add=doc.addEventListener?"addEventListener":"attachEvent",rem=doc.addEventListener?"removeEventListener":"detachEvent",pre=doc.addEventListener?"":"on",init=function(e){if(e.type=="readystatechange"&&doc.readyState!="complete"){return }(e.type=="load"?win:doc)[rem](pre+e.type,init,false); if(!done&&(done=true)){fn.call(win,e.type||e) }},poll=function(){try{root.doScroll("left") }catch(e){setTimeout(poll,50); return }init("poll") }; if(doc.readyState=="complete"){fn.call(win,"lazy") }else{if(doc.createEventObject&&root.doScroll){try{top=!win.frameElement }catch(e){}if(top){poll() }}doc[add](pre+"DOMContentLoaded",init,false); doc[add](pre+"readystatechange",init,false); win[add](pre+"load",init,false) }}; aps.getChildElementByNameAndTag=function(elm,name,tagName){var nodes=elm.childNodes; for(var i=0; iaps.pageWidth){continue }if(widthfound==30000){widthfound=split }if(widthfound==split){if(parseInt(map[1])>0&&parseInt(map[2])>0){willDisplay=true }}}return willDisplay }; aps.setAdSize=function(ad){var availables=["320x50","300x250","300x600","400x300","640x480","728x90","970x90","970x250","501x501","001x001","620x366","325x508","325x204","336x280","160x600","320x100"]; var sizes=[]; var widthfound=30000; var doNotServe=["DTBK_AP951","MW_1_TEXT","MW_2_TEXT","MW_3_TEXT"]; if(doNotServe.indexOf(ad.code)>-1){aps.logInfo("Skippig ad:"+ad.code); return sizes }for(var j=0; japs.pageWidth){continue }if(widthfound==30000){widthfound=split }if(widthfound==split){var adSize=map[1]+"x"+map[2]; if(availables.indexOf(adSize)>-1){sizes.push([parseInt(map[1]),parseInt(map[2])]) }}}return sizes } })();(function(){var b=this; b.getHostName=function(d){var c=d.match(/:\/\/(www[0-9]?\.)?(.[^/:]+)/i); if(c!=null&&c.length>2&&typeof c[2]==="string"&&c[2].length>0){return c[2] }else{return null }}; b.getDomain=function(f){var d=b.getHostName(f); var c=d; if(d!=null){var e=d.split(".").reverse(); if(e!=null&&e.length>1){c=e[1]+"."+e[0]; if(e.length>2&&e[2].toLowerCase()=="m"){c="m."+c }}}return c }; if(typeof(aps.current_domain)=="undefined"){try{aps.current_domain=b.getDomain(document.URL) }catch(a){aps.logException("unable to resolve domain name",a); aps.current_domain="undefined" }}aps.cfg.bid.current_domain=aps.current_domain; if(aps.cfg.bid.current_domain.indexOf("m.")==0){aps.cfg.bid.current_domain=aps.cfg.bid.current_domain.substr(2) }if(aps.cfg.bid.current_domain=="ctinsider.com"){googletag.cmd.push(function(){aps.gcontext.pubads().setTargeting("sect","ctinsider") }) }aps.cfg.dfp.batchSRA.maxSlots=30 })();(function(){if(document.location.hostname.match(/((homeguides|smallbusiness|work|healthyeating|livehealthy)\.(chron|sfgate)\.com)/)){return }var d={"beaumontenterprise.com":"75e9ad4b5f1f1f3de38dea085cc34f079b9d8243999d3b30d70a543f2c3ae813","sfgate.com":"1cbbeea35302b334c17ec7de41048b19077c3452b8825fa3017876cf49d877c2","chron.com":"b8d94fd702b39f91830ea26eb261a1dd7eb3f9d18e86f88c83f7a317f3115379","mysanantonio.com":"3c81fd9605d796d254c7bdc62001ec2c520515c7c306b66b713a4421f7343766","seattlepi.com":"a3e9f57e66bb33f8f8995e6866a7eace83bca9720ee52bb2d8ab18fb8dddae94","sfchronicle.com":"a5e03e178aaf9b41b3fc69428362339bd7ba9a606118acee43f6169a1f7f9847","houstonchronicle.com":"48a6940997d234b7add9af8ed2b41694654edaeb6e7b5827579702d25182700b","expressnews.com":"d65ba7cd6a96847162fb556c3a5dc7b7e66de309481ec4e558b4e9dc40515858","timesunion.com":"f999472effec7a1ef427ab8ed55df47b4d250f60f376ce71f7293b353026f514","ctpost.com":"1118fad26ca4bcdf2a99fdee52724e3c512a258c149cbd8e6c4084c13040e86a","stamfordadvocate.com":"2df4f16391dbd310915a08bd62897dde4902fe30a7c29dcb2b80ba04345df633","nhregister.com":"2370d2dc32ab1b0d0894de8f024e2764a55756c723edb12fa7d7b6b221922fba","newstimes.com":"68fab42777221c69e8d127d9ba7a8b29e0ba95aae66e6166eb070c330ac04c0f","greenwichtime.com":"4a6fb4d137bab5bdc207d09d4b1acfc191dbad1e9e0e3190ca676d3730195d06","thehour.com":"049118934d099a757a2987317f05327a8ccd5a7c1501feaf8e4639fadbdb8936","ctinsider.com":"21b81f81bd7fa576db043ec887848073bbc6eafc46d9f8bec5240163093e2d46","registercitizen.com":"3377ba9d7d5061bf618f4ae6d3900e0067f913f99748fc366b7cb1542e6a96b2","middletownpress.com":"4f1f32e75691195dd027c417eed6c56d8a37e7ed729eb57c8ecd8abf8d5f420b","thetelegraph.com":"bf557221a53f15d39c7bce3aeed56dd6c13e57b3eba48f8e4fd2d54af42f0122","ourmidland.com":"37af6c3aa88542ced759eb5a9c478617d1b50eeae32789a669e3facca42eb56a","myjournalcourier.com":"5497becf77524b62bee5a589030b1e2163d34a60b7d960cdc976afc12b64d623","michigansthumb.com":"601647fe4d84d12a565e709dc7e944d38db91923d65d9bb6865788234f41893d","theintelligencer.com":"aadf36ee0d8d0f2765013057eb1bad1a552f9377dfc4b532d9b698df9a655884","manisteenews.com":"a2031afbd2e08a959fa777db882a99b7cc56d1dbff61d9d2d56c20a89c6d8b7e","bigrapidsnews.com":"7c907dba0dac340d4f0b3879a3d1699f0bf19e2a95b06945aa3b31cfde002c09","recordpatriot.com":"d4c71cee77592309f10e62ab4ce1a4d995719a82a77932eee5fc18a7948e2f41","lakecountystar.com":"2a7c7fb608092db498480edf2068123ffcd679d5ce9e8819760338386e1350e4","theheraldreview.com":"1655d53ab46f5391a09e189a8cf86f8e22098886ea6a2ae727b112087a05cbd0","yourconroenews.com":"aa3912f9cfd7f1fafd025dbd846d2383acce1b3574061b2c9508d43d5cc653da","lmtonline.com":"ffd0921bb88989b2dc6bac92611425966d93e8be7cf154e95fd27ae95db26375","mrt.com":"08621a723e4a1cd4ba4c25f46ce953173b9b3cffad4ec0bfb9b0e5d22bc22bc8","myplainview.com":"b49696bc422c346e4f4282e32cfc324d782f32b9c9d0fec6751d29dc0862bf61","theridgefieldpress.com":"053f373cd281b81bb04913797ec13da4438c7cc4596fc29e382ce5a1a93ce32d","westport-news.com":"55e354cf58c712583585324c15d758cd2b9801c0ce839fb6020d8835a63c0502","ncadvertiser.com":"eaff3ad2730aea1b010a2434dad485aef8e1a473f8977f048e5888c27a0a8b15","fairfieldcitizenonline.com":"ddbcce19fd54ba6f20d8e3bedb35cfea7887e9579c34d38307b3f3fa3f659ab0","wiltonbulletin.com":"7ef8a69225bec566b6a15690bd94081ed7898400ff9a8c68ac05ee924c2c2ce3","darientimes.com":"f0790e5c63dd390570f98d8b20ad18ee2666f8184dc03434de1c60fb823ff71c","trumbulltimes.com":"909616d5d05133cda02800bf40834036448deeea436efebe0d39fcb3f3f4bec8","sheltonherald.com":"2ea54058f6365a6a2bcb4ecda879ff406900d5b274c1e1ed6e2f0e746ad5068f","milfordmirror.com":"0f7190eb184e8a5af5171a9ea07a792b5a193725ebdb8a2c55a30ff187802fef","newmilfordspectrum.com":"34fda7a5dec281cc4ac526c9c1609ee8a6223ae799760c638c3b92d86751b2c5","southeasttexas.com":"1ca0a738d5cf7bb8ce1434d5522573d7f6894098e4706151b2882420b6bb6c62","gametimect.com":"c5a3ed040f3b98d6d9877a09dc7f00f3ba126d6f10836272b84a07be9ced5df7","connecticutmag.com":"6daa3d7e6b8778d504883db9545f72adfc4df9ba624ae5ac79af0dda7e1f98a3","shorelinetimes.com":"91a7025281ac9294e20e8cdd7b9c5d6414f44d887193db48097942a2404a9d1d","countytimes.com":"26a8bb30dec1f24c1e7bd51988a30cdaf1a32c615057fa4a092fedd8d19b6005","westhartfordnews.com":"5de2ce5445b39d5609215833a7fa6410f027135902d458f6751d115c11c33634","dolphin-news.com":"041a5d17decdae44358ae2eca8065b501b5a4936882e2188a3d41470b64eb47d","ctpostchronicle.com":"645700f07ec80b72131b2a6fc97f8f43da5820ce68bd559b0b507dfdf08f9f6a","ctbulletin.com":"26a8bb30dec1f24c1e7bd51988a30cdaf1a32c615057fa4a092fedd8d19b6005","greenstate.com":"412163cc8d602f027626c2ffab24515bd8f6ff426d0d4096330b64d8e7681e03","canyonnews.com":"593c0a648b760954871854fb60be6dfc252fd7387de8bcb568ebf2cd5449f3d8","sellitlaredo.com":"a86e9a199fadcfd738a0fa46b3fa9381cbb92bdc9b7a75b7fa222e143eaac6b9",}; var b=d[aps.cfg.bid.current_domain]||""; if(b!=""){aps.logInfo("The Media Trust: Loading"); var a=document.getElementsByTagName("script")[0]; var c=document.createElement("script"); c.async=1; c.src="https://scripts.webcontentassessor.com/scripts/"+b; a.parentNode.insertBefore(c,a) }})();(function(){aps.divIDPostfix="ju1c3-TWFobmEgTWFobmE="; aps.scriptName="googleAsync"; aps.leaderboardLineItemID=null; aps.page=null; aps.slotsByDivID=[]; aps.interstitialAdDefs=[]; aps.adsByCode=[]; aps.codesByDomID=[]; aps.domIsLoaded=false; aps.dynamicSlots=[]; aps.refreshableSlots=[]; aps.normalAdSlots=[]; aps.dynamicAdSlots=[]; aps.dfpInititalization=false; aps.callsByDomID=[]; aps.renderInfo=[]; aps.isIFrameDynamicPage=(top!=self); aps.refreshWaitCounter=0; aps.refreshWaitScripts={}; aps.disabledWaitScripts={}; aps.refreshViewableOnly=false; aps.videoAdTag=null; aps.perf_sec="video"; aps.logInfo("loading async google",true); aps.loadGoogleService(true); if(aps.cfg.bid.enabled){googletag.cmd.push(function(){googletag.pubads().disableInitialLoad(); googletag.pubads().setPrivacySettings({childDirectedTreatment:false}) }) }googletag.cmd.push(function(){aps.logInfo("google ready",true); aps.performanceMetrics.GoogleLoaded=aps.getTimeElapsed(); aps.performanceMetrics.matchedUrl=aps.juiceMatchedUrl; googletag.pubads().collapseEmptyDivs(); googletag.pubads().enableSingleRequest(); googletag.enableServices() }); aps.unQueueCommands=function(){for(var a=0; a0){var d=googletag.pubads().getSlots(); if(!aps.cfg.stp[0].dfpCalled&&!aps.cfg.dfp.arbitrage.enabled){for(var k=0; k-1){var k=d[l]; var m=(aps.videoAdTag==null)?null:aps.videoAdTag.code; if(m==e){j.push(k); aps.cfg.stp[aps.cfg.stp.at].divids.push(e) }else{var c=document.getElementById(e); if(c==null){aps.adsByCode[e].batchRequest="done"; k.requestStatus="destroyed"; h.push(k); aps.cfg.dfp.uncalledAds.push(k); g=(g=="")?e:g+", "+e; for(var f=0; f0){aps.logInfo("Div(s) "+g+" not on page : destroyed"); googletag.destroySlots(h) }}}aps.updatePageLevelKVPS(aps.gcontext); aps.logInfo("prebid set targeting",true); pbjs.setTargetingForGPTAsync(aps.cfg.stp[aps.cfg.stp.at].divids); if(typeof(apstag)!="undefined"){apstag.setDisplayBids() }aps.fireEvent(aps.event.on_before_enable_google_services); aps.logInfo("Calling DFP: "+aps.cfg.stp[aps.cfg.stp.at].divids,true); googletag.pubads().refresh(j); aps.fireEvent(aps.event.on_ad_refresh_call,{gslots:j}); aps.cfg.stp[aps.cfg.stp.at].dfpCalled=true; aps.logInfo("googleServices done",true); if(!aps.cfg.stp[aps.cfg.stp.at].adRendered){aps.cfg.stp[aps.cfg.stp.at].adRendered=true; for(var f=0; f0||h.length>0)){if(j.length==0){aps.cfg.dfp.batchSRA.waitingNext=true; aps.logInfo("Batch SRA : next step"); aps.nextBatchSRA() }else{aps.cfg.dfp.batchSRA.waitingNext=true; if(aps.cfg.dfp.batchSRA.auto){aps.logInfo("Batch SRA : waiting to next step in "+aps.cfg.dfp.batchSRA.delay+" ms"); setTimeout(function(){aps.nextBatchSRA() },aps.cfg.dfp.batchSRA.delay) }else{aps.nextBatchSRA() }}}}; window.defineTags=function(g){if(aps.cfg.stp.at==-1){aps.nextBatchSRA(); return }if(!aps.serveAds){return }if(aps.cfg.stp.at==1&&aps.cfg.dfp.arbitrage.enabled&&typeof(aps.cfg.dfp.ads.ARB)=="undefined"){aps.logInfo("Arbitrage - waiting ads to be loaded"); return }aps.cfg.stp[aps.cfg.stp.at].stepStarted=true; if(aps.cfg.dfp.batchSRA.enabled){aps.logInfo("Batch SRA mode - step : "+aps.cfg.stp.at) }aps.logInfo("defineTags",true); if(aps.cfg.stp.at==0){aps.loadAsyncScripts(); aps.page=g; aps.page_kvps=g.kvps; googletag.cmd.push(function(){try{var k=JSON.parse(GetCookie("location_data")); if(k.is_eu){aps.cfg.disablePersonalisation=true }}catch(i){}if(aps.cfg.disablePersonalisation){aps.logInfo("disabling personalizedAds"); googletag.pubads().setRequestNonPersonalizedAds(1) }googletag.pubads().addEventListener("slotRenderEnded",function(m){if(typeof m.slot.getSlotId!="undefined"){if(typeof m.slot.getSlotId().getDomId!="undefined"){hearstUpdateSlotRenderInfo(m); aps.adRenderCallback&&aps.adRenderCallback(m) }var l=m.slot.getSlotId().m; if(l=="MAD"){if(m.size[0]!=320||m.size[1]!=50){aps.logInfo("Fixing: MAD having wrong size: "+m.size); var o=document.getElementById("MAD").firstChild; o.style.width="320px"; o.style.height="50px" }}if(!aps.cfg.stp[aps.cfg.stp.at].adRendered){aps.cfg.stp[aps.cfg.stp.at].adRendered=true; for(var n=0; n1){m.impressionViewable=aps.getTimeElapsedFromStamp(m.refreshCalled) }else{m.impressionViewable=aps.getTimeElapsed() }l.impressionViewable=true; aps.fireEvent(aps.event.on_ad_impression_viewable,{code:n}) }}}) }) }var f=0; var h={}; aps.cfg.stp[aps.cfg.stp.at].ads=aps.cfg.stp[aps.cfg.stp.at].ads||[]; window.onJuiceEvent_StartDefineTags&&window.onJuiceEvent_StartDefineTags(); aps.fireEvent(aps.event.on_begin_define_tags); aps.logInfo("defining tags started",true); if(aps.performanceMetrics.DefineTags==0){aps.performanceMetrics.DefineTags=aps.getTimeElapsed(); aps.performanceMetrics.adUnit=g.adUnit; aps.performanceMetrics.networkCode=g.networkCode }aps.definedTagArr=aps.definedTagArr||{}; for(var d=0; d-1){a.interstitial=true; a.refreshable=true }if(a.interstitial){aps.interstitialAdDefs[a.code]=a; a.callInterstitial=a.callInterstitial||false; if(!a.callInterstitial){continue }}var j=null; if(a.code=="MAD"&&window.current_device==MOBILE&&(aps.cfg.dfp.arbitrage.enabled||aps.cfg.dfp.multi.enabled)){a.batchRequest="" }if(a.batchRequest=="done"||a.batchRequest=="called"||a.batchRequest=="requested"){continue }else{var b=false; if(aps.cfg.dfp.waiting.filter(function(i){return i==a.code }).length>0){aps.cfg.dfp.waiting=aps.cfg.dfp.waiting.filter(function(i){return i!=a.code }); b=true }else{if(a.interstitial&&a.callInterstitial){b=true }else{if(a.batchRequest=="refresh"){b=true }else{if(!aps.toBeDisplayed(a)){aps.logInfo(a.code+" will not show on this device - *skipped*"); a.exclude=true; b=false }else{if(!aps.cfg.dfp.batchSRA.enabled&&!aps.cfg.dfp.arbitrage.enabled&&aps.cfg.stp.at==0){b=true }else{if(aps.cfg.stp.at>0&&document.getElementById(a.code)==null){b=false; aps.logInfo(a.code+" - DIV not on page - *skipped*"); a.exclude=true }else{if(aps.cfg.dfp.batchSRA.enabled){if(aps.cfg.stp.at==0&&aps.cfg.dfp.batchSRA.atfFirst){if(a.position=="atf"||a.position=="oop"){b=true }}else{if(f0){if(aps.cfg.dfp.arbitrage.ads[aps.cfg.stp.at].indexOf(a.code)>=0||a.code=="MAD"){b=true }}}}else{if(aps.cfg.dfp.multi.enabled){if(aps.cfg.stp.at==0&&a.code.indexOf(aps.cfg.dfp.multi.type)==-1&&!a.video){b=true }else{if(aps.cfg.stp.at>0){if(aps.cfg.dfp.multi.ads[aps.cfg.stp.at].indexOf(a.code)>=0){b=true }}}}}}}}}}}}if(b){h[a.code]=a; a.adSizeDefined=[a.width,a.height]; aps.logInfo(a.code+" slot defined"); aps.definedTagArr[a.code]=a; a.batchRequest="requested"; f++; aps.cfg.stp[aps.cfg.stp.at].adsToRequest.push(a) }}}if(f==0){aps.logInfo("No more slots to process"); return }googletag.cmd.push(function(){setDfpSearchValues(aps.gcontext) }); aps.logInfo("start bidding",true); aps.fireEvent(aps.event.on_start_bidding,{slots:h}); googletag.cmd.push(function(){aps.cfg.bid.pb.adUnitIds[aps.cfg.stp.at]=aps.cfg.bid.pb.adUnitIds[aps.cfg.stp.at]||[]; for(var k=0; k-1){aps.cfg.bid.enabled=false }if(!aps.cfg.bid.enabled){googletag.cmd.push(function(){aps.enableGoogleServices(0) }) }}; window.hearstUpdateSlotRenderInfo=function(n){var s=n.slot||null; var t=n.slot.getSlotId().getDomId()||null; var p=n.lineItemId||null; if(p==null&&n.yieldGroupIds!=null){p=n.yieldGroupIds[0] }var j=n.creativeId||null; var m=n.isEmpty; var c=n.size||null; var g=n.advertiserId||null; var i=n.companyIds||[]; var d="banner"; try{d=s.getTargetingMap().hb_format[0]||"banner"; if(d=="native"&&s.getHtml().indexOf("Prebid Native")==-1){d="banner" }}catch(l){}if(m){var k=n.slot.getSlotElementId(); var b=document.querySelectorAll("#"+k)[0]; if(b.dataset.slug=="Advertisement"){aps.logInfo(k+" - slot empty: hiding div"); b.style.display="none" }}var h=aps.getAdMetrics(t); h.lineItemId=p; h.creativeId=j; h.isEmpty=m; h.totalRenders++; if(aps.performanceMetrics.FirstAdRendered==0){aps.performanceMetrics.FirstAdRendered=aps.getTimeElapsed() }if(h.totalRenders>1){h.rendered=aps.getTimeElapsedFromStamp(h.refreshCalled) }else{h.rendered=aps.getTimeElapsed() }if(c!=null){h.size=c[0]+" x "+c[1] }var f=(g==null)?"No ad":"Direct"; if(typeof(aps.cfg.advertisers[g])!="undefined"){f=aps.cfg.advertisers[g] }if(n.yieldGroupIds!=null){f="ExB/"+f; try{if(typeof(i[0])!="undefined"){f="ExB/"+aps.cfg.advertisers[i[0]] }}catch(l){}}aps.cfg.dfp.rnd[t]=n; var a=aps.getAdDefinitionByCode(aps.codesByDomID[t])||{code:"",creativeURL:""}; if(a){a.renderCount++; a.isLoading=false; a.refreshable=true; aps.logInfo(a.code+" *IMP* "+f+" "+p+" div "+t+" ["+d+"]"); aps.logInfo(a.code+" ["+f+" : "+p+"] rendered into div "+t) }try{a.creativeURL=s.getContentUrl() }catch(l){a.creativeURL="" }aps.fireEvent(aps.event.on_ad_rendered,{adDefinition:a,newid:t,lineitem:p,size:c,isEmpty:m}); if(c!=null&&aps.leaderboardLineItemID==null){if(c[0]==300){aps.leaderboardLineItemID=p }}aps.renderInfo[t]={lineItem:p,creative:j,isEmpty:m,size:c,advertiser:f,advertiserId:g||n.yieldGroupIds}; if(a.isDynamic==true){var r=a.oldDivID; var q=a.newDivID; var u=(c!=null)?c[0]:0; var o=(c!=null)?c[1]:0; setTimeout(function(){aps.fireEvent(aps.event.on_dynamic_ad_rendered,{oldid:r,newid:q,cx:u,cy:o}); window.onJuiceEvent_DynamicAdRendered&&window.onJuiceEvent_DynamicAdRendered(r,q,u,o) },5) }}; window.hearstGetVideoAdTagSize=function(a){var f=""; if(a.sizeMappings!=undefined&&a.sizeMappings.length>0){var d=[]; for(var c=0; c1&&parseInt(b[2],10)>4){d.push(parseInt(b[1],10)+"x"+parseInt(b[2],10)) }}f="?sz="+d.join("%7C") }else{f="?sz="+encodeURIComponent(a.width+"x"+a.height) }return f }; window.hearstGetVideoAdTag=function(b){if(aps.videoAdTag==null){aps.logInfo("hearstGetVideoAdTag called with no video tag defined : ignoring "); return null }var a=aps.videoAdTag; if(typeof(a)=="undefined"){aps.logInfo("hearstGetVideoAdTag called with non-defined ad slot "+b+" : ignoring "); return null }if(a.video==false){aps.logInfo("hearstGetVideoAdTag called non video defined ad slot "+b); return null }aps.fireEvent(aps.event.on_hearst_place_ad,{adDefinition:a}); var g=hearstGetVideoAdTagSize(a); var h="https://pubads.g.doubleclick.net/gampad/ads"; h+=g; h+="&iu="+encodeURIComponent(definedTags.networkCode+"/"+definedTags.adUnit); h+="&url="+encodeURIComponent(top.location.protocol+"//"+JuicePageUrl); h+="&impl=s"; h+="&gdfp_req=1"; h+="&env=vp"; h+="&output=xml_vast3"; h+="&page_type="+aps.page_type2; h+="&unviewed_position_start=1"; h+="&description_url="+encodeURIComponent(top.location.protocol+"//"+JuicePageUrl); h+="&vpos=preroll"; h+="&ad_safe=medium"; if(a.companion_units!=null&&a.companion_units!=""){h+="&ciu_szs="+encodeURIComponent(a.companion_units) }else{h+="&ciu_szs=" }var c=""; c+="distributor_domain="; if(aps.current_domain.indexOf("m.")==0){c+=aps.current_domain.substr(2) }else{c+=aps.current_domain }c+="&perf_sec="+aps.perf_sec; c+="&page_type2="+aps.page_type2; c+="&page_type3="+(encodeURIComponent(aps.getVideoTagPageType3(b))); c+="&pageurl="+encodeURIComponent(top.location.protocol+"//"+JuicePageUrl); c+="&referrer="+encodeURIComponent(document.referrer); c+="&urlhash="+aps.performanceMetrics.urlHash; c+="&pw=__player-width__&ph=__player-height__"; c+=(aps.cfg.vid.tagUrl=="")?"":"&"+aps.cfg.vid.tagUrl; for(var d=0; d-1){a.interstitial=true }if(a.interstitial){aps.logInfo("hearstPlaceAd "+b); return }if(!a.interstitial&&!a.rm){if(divID!=null){aps.logInfo("hearstPlaceAd calling hearstPlaceDynamicAd "+b+" divid "+divID); hearstPlaceDynamicAd(b,divID); return }else{if(!a.oop){d=true }}}if(!aps.isDivIDUniqueForAdPlacement("hearstPlaceAd",b)){return }aps.logInfo("hearstPlaceAd "+b); aps.MarkDivIDAsUnique(b); aps.callsByDomID[b]=0; if(document.getElementById(b)==null){aps.logInfo("hearstPlaceAd called with div not on page: "+b) }if(b.indexOf("SSHOW")==0){d=false }if(d){aps.refreshableSlots.push(b) }if(document.getElementById(b)!=null){try{aps.cmd.push(function(){aps.waitForScriptsToLoad(); aps.initialUpdatePageLevelKVPS(aps.gcontext); aps.logPageKVPsforDiv(b); aps.fireEvent(aps.event.on_before_display_ad,{adDefinition:a,slot:aps.slotsByDivID[a.newDivID]}); aps.getAdMetrics(b).googleDisplay=aps.getTimeElapsed() }) }catch(c){aps.logException("hearstPlaceAd exception for "+b,c) }}}; aps.markInterstitialAsRefreshable=function(b){if(b=="GO300"){return }if(aps.isAdCodeRefreshable(b)){return }var a=aps.getAdDefinitionByCode(b); if(!a.interstitial){return }aps.refreshableSlots.push(b) }; aps.isAdCodeRefreshable=function(a){for(var b=0; b-1){return true }return false }; aps.refreshSlotsWithWaitCounter=function(c,b){if(aps.refreshWaitCounter>0){var a=0; self.refreshCheck=setInterval(function(){if(a>50){if(a>50){aps.logError("hearstRefreshAds wait - timed out waiting for a script"); aps.disableFailedWaitScripts() }aps.refreshWaitCounter=0 }if(aps.refreshWaitCounter<=0){window.clearInterval(self.refreshCheck); aps.logInfo("hearstRefreshAds wait complete : "+a+" iterations"); aps.logInfo(b); googletag.cmd.push(function(){if(aps.cfg.bid.enabled){aps.logInfo("prebid set targeting",true); pbjs.setTargetingForGPTAsync(); if(typeof(apstag)!="undefined"){apstag.setDisplayBids() }}googletag.pubads().refresh(c); aps.fireEvent(aps.event.on_ad_refresh_call,{gslots:c}) }) }a++ },50) }else{aps.logInfo(b); googletag.cmd.push(function(){aps.logInfo("prebid set targeting",true); pbjs.setTargetingForGPTAsync(); if(typeof(apstag)!="undefined"){apstag.setDisplayBids() }googletag.pubads().refresh(c); aps.fireEvent(aps.event.on_ad_refresh_call,{gslots:c}) }) }}; window.hearstRefreshAds=function(){var a=(arguments.length==1)?arguments[0]:aps.refreshableSlots; var o=[]; var n=this; var m=""; var k=[]; var l=[]; var g=0; if(typeof definedTags=="undefined"){aps.logInfo("Tags not received, delaying 0.5s"); setTimeout(function(){hearstRefreshAds(a) },500); return }aps.logInfo("hearstRefreshAds called: "+a.join(", ")); if(!aps.refreshAvailable){aps.logInfo("hearstRefreshAds called premature : rejected"); return }var h=[]; for(var d=0; d-1){aps.logInfo("skipping refresh of "+b.code+" . This ad is not displaying on this device"); continue }if(!b.refreshable){aps.getDataLayerInterstitial(); if(aps.cfg.dfp.dataLayerInterstials.length>0&&aps.cfg.dfp.dataLayerInterstitialRefreshables.indexOf(b.code)>-1&&b.renderCount>1){b.refreshable=true }}if(b.isLoading==true){aps.logInfo("skipping refresh of "+b.code+" . It has not completed last request."); g++ }else{if(!b.refreshable){aps.logInfo("skipping refresh of "+b.code+" . It's not a refreshable ad.") }else{if(b.renderCount<=1){aps.logInfo("skipping refresh of "+b.code+" . It has never rendered.") }else{if(aps.refreshViewableOnly&&!b.impressionViewable){aps.logInfo("skipping refresh of "+b.code+" . It is not viewable.") }else{aps.logInfo("refreshing "+b.code); b.impressionViewable=false; k.push(b.code) }}}}}if(k.length<=0){aps.logInfo("No ads are in refreshable state - skipping refresh"); return }aps.updatePageLevelKVPS(aps.gcontext); aps.fireEvent(aps.event.on_update_page_level_targeting); aps.fireEvent(aps.event.on_before_refresh_ads); a=k; for(c=0; c0){aps.cfg.dfp.waiting=aps.cfg.dfp.waiting.concat(l); aps.cfg.dfp.iswaiting=true; aps.waitStartStep() }}; window.hearstRefreshInterstitialAds=function(a){var f=[]; var b=[]; aps.logInfo("hearstRefreshInterstitialAds called: "+a.join(", ")); if(typeof definedTags=="undefined"){aps.logInfo("Tags not received, delaying 0.5s"); setTimeout(function(){hearstRefreshInterstitialAds(a) },500); return }if(!aps.refreshAvailable){aps.logInfo("hearstRefreshInterstitialAds called premature : rejected"); return false }for(var d=0; d0){aps.cfg.dfp.waiting=aps.cfg.dfp.waiting.concat(f); aps.cfg.dfp.iswaiting=true; aps.waitStartStep() }}; aps.contentLoaded(window,aps.domLoaded) })();(function(){window.treg=window.treg||{}; window.treg.cmd=window.treg.cmd||[]; aps.cfg.tregReady=false; window.treg.cmd.push(function(){window.treg.realm.events.register("realm.Oidc.refreshLogicComplete",function(a){if(!aps.cfg.tregReady){aps.logInfo("Treg ready") }aps.cfg.tregReady=true }) }) })();aps.cfg.bid.disableNative=true;(function(){aps.topWindow=(aps.scriptName=="googleAsync")?window:top; aps.topAps=aps.topWindow.aps; aps.initialUpdatePageLevelKVPS=function(a){if(!aps.hearstPlaceAdHasUpdatedKVPS){aps.hearstPlaceAdHasUpdatedKVPS=true; aps.logInfo("calling updatePageLevelKVPS from hpa"); aps.topAps.updatePageLevelKVPS(a) }} })();(function(){aps.hash=aps.hash||{}; aps.codec=aps.codec||{}; aps.bitArray={bitSlice:function(b,d,c){b=aps.bitArray._shiftRight(b.slice(d/32),32-(d&31)).slice(1); return(c===undefined)?b:aps.bitArray.clamp(b,c-d) },extract:function(b,d,c){var f,e=Math.floor((-d-c)&31); if((d+c-1^d)&-32){f=(b[d/32|0]<<(32-e))^(b[d/32+1|0]>>>e) }else{f=b[d/32|0]>>>e }return f&((1<0&&d){b[c-1]=aps.bitArray.partial(d,b[c-1]&2147483648>>(d-1),1) }return b },partial:function(b,c,a){if(b===32){return c }return(a?c|0:c<<(32-b))+b*1099511627776 },getPartial:function(a){return Math.round(a/1099511627776)||32 },equal:function(c,d){if(aps.bitArray.bitLength(c)!==aps.bitArray.bitLength(d)){return false }var f=0,e; for(e=0; e=32; g-=32){f.push(c); c=0 }if(g===0){return f.concat(b) }for(d=0; d>>g); c=b[d]<<(32-g) }e=b.length?b[b.length-1]:0; h=aps.bitArray.getPartial(e); f.push(aps.bitArray.partial(g+h&31,(g+h>32)?c:f.pop(),1)); return f },_xor4:function(a,b){return[a[0]^b[0],a[1]^b[1],a[2]^b[2],a[3]^b[3]] },byteswapM:function(b){var c,e,d=65280; for(c=0; c>>24)|((e>>>8)&d)|((e&d)<<8)|(e<<24) }return b }}; aps.codec.hex={fromBits:function(a){var c="",b; for(b=0; b>>8>>>8>>>8); e<<=8 }return decodeURIComponent(escape(d)) },toBits:function(c){c=unescape(encodeURIComponent(c)); var b=[],a,d=0; for(a=0; a9007199254740991){throw ("Cannot hash more than 2^53 - 1 bits") }if(typeof Uint32Array!=="undefined"){var d=new Uint32Array(a); var g=0; for(f=512+k-((512+k)&511); f<=h; f+=512){this._block(d.subarray(16*g,16*(g+1))); g+=1 }a.splice(0,16*g) }else{for(f=512+k-((512+k)&511); f<=h; f+=512){this._block(a.splice(0,16)) }}return this },finalize:function(){var d,a=this._buffer,c=this._h; a=aps.bitArray.concat(a,[aps.bitArray.partial(1,1)]); for(d=a.length+2; d&15; d++){a.push(0) }a.push(Math.floor(this._length/4294967296)); a.push(this._length|0); while(a.length){this._block(a.splice(0,16)) }this.reset(); return c },_init:[],_key:[],_precompute:function(){var c=0,e=2,a,d; function b(f){return(f-Math.floor(f))*4294967296|0 }for(; c<64; e++){d=true; for(a=2; a*a<=e; a++){if(e%a===0){d=false; break }}if(d){if(c<8){this._init[c]=b(Math.pow(e,1/2)) }this._key[c]=b(Math.pow(e,1/3)); c++ }}},_block:function(t){var q,s,c,d,e=this._h,r=this._key,f=e[0],g=e[1],j=e[2],l=e[3],m=e[4],n=e[5],o=e[6],p=e[7]; for(q=0; q<64; q++){if(q<16){s=t[q] }else{c=t[(q+1)&15]; d=t[(q+14)&15]; s=t[q&15]=((c>>>7^c>>>18^c>>>3^c<<25^c<<14)+(d>>>17^d>>>19^d>>>10^d<<15^d<<13)+t[q&15]+t[(q+9)&15])|0 }s=(s+p+(m>>>6^m>>>11^m>>>25^m<<26^m<<21^m<<7)+(o^m&(n^o))+r[q]); p=o; o=n; n=m; m=l+s|0; l=j; j=g; g=f; f=(s+((g&j)^(l&(g^j)))+(g>>>2^g>>>13^g>>>22^g<<30^g<<19^g<<10))|0 }e[0]=e[0]+f|0; e[1]=e[1]+g|0; e[2]=e[2]+j|0; e[3]=e[3]+l|0; e[4]=e[4]+m|0; e[5]=e[5]+n|0; e[6]=e[6]+o|0; e[7]=e[7]+p|0 }} })();(function(){aps.waitForScriptsToLoad=function(){}; aps.scriptLoaderStarted=false; aps.requiredGPTScriptCount=aps.requiredGPTScriptCount||0; aps.loadAsyncScripts=function(){if(aps.topWindow!=self){return }aps.logInfo("loadingAsyncScripts: "+aps.queuedScriptCount); aps.performanceMetrics.TotalThirdPartyScripts=aps.queuedScriptCount; for(var a in aps.adScripts){if(aps.adScripts.hasOwnProperty(a)){aps.queueAsyncScript(aps.adScripts[a]) }}aps.scriptLoaderStarted=true; aps.testAsyncWaitFunctions(); aps.initializeScriptLoadChecking() }; aps.queueAsyncScript=function(a){a.loadstart=new Date(); if(a.testFunction!=null){return }var b=a; a.callback=function(){if(!b.complete){b.loadend=new Date(); b.complete=true; aps.logInfo(b.name+" loaded : "+(b.loadend-b.loadstart)); aps.fireEvent(aps.event.on_script_loaded,{scriptDetails:b}) }}; aps._loadScript2(a) }; aps.testAsyncWaitFunctions=function(){for(var b in aps.adScripts){if(aps.adScripts.hasOwnProperty(b)){if(aps.adScripts[b].testFunction!=null&&aps.adScripts[b].complete==false){if(aps.adScripts[b].testFunction()===true){var a=aps.adScripts[b]; a.loadend=new Date(); a.complete=true; aps.logInfo(a.name+" loaded : "+(a.loadend-a.loadstart)); aps.fireEvent(aps.event.on_script_loaded,{scriptDetails:aps.adScripts[b]}) }}}}}; aps._testAsyncStatus=function(){var a=aps.adScripts; aps.testAsyncWaitFunctions(); var c=0; for(var b in aps.adScripts){if(aps.adScripts.hasOwnProperty(b)){if(aps.adScripts[b].complete&&aps.adScripts[b].requiredForGPT){c++ }}}if(c==aps.requiredGPTScriptCount){aps.adScriptsLoaded=true }return aps.adScriptsLoaded }; aps.initializeScriptLoadChecking=function(){var c=this; var b=0; var a=aps.adScripts; aps.adScriptsLoaded=false; aps.logInfo("initializeScriptLoadChecking"); c.loadCheck=function(){if(b>50){aps.logError("ScriptLoadChecking timed out waiting for a script"); aps.adScriptsLoaded=true }else{aps._testAsyncStatus() }if(aps.adScriptsLoaded==true){aps.logInfo("ScriptLoadChecking complete : "+b+" iterations"); aps.performanceMetrics.ThirdPartyScriptsLoaded=aps.getTimeElapsed(); window.clearInterval(c.loadCheck); aps.fireEvent(aps.event.on_third_party_complete); googletag.cmd.push(function(){aps.unQueueCommands() }) }else{b++; setTimeout(c.loadCheck,50) }}; setTimeout(c.loadCheck,50) }; aps.queueScriptAsync=function(d,e,c,a){var b={name:d,scriptID:null,path:e,testFunction:null,complete:false,loadstart:null,loadend:null,appCallback:a,requiredForGPT:c}; aps.adScripts[d]=b; aps.queuedScriptCount++; aps.queuedWaitCount++; if(c){aps.requiredGPTScriptCount++ }if(aps.scriptLoaderStarted){aps.queueAsyncScript(b) }return b }; aps.queueScriptAsyncID=function(e,c,f,d,a){var b={name:e,scriptID:c,path:f,testFunction:null,complete:false,loadstart:null,loadend:null,appCallback:a,requiredForGPT:d}; aps.adScripts[e]=b; aps.queuedScriptCount++; aps.queuedWaitCount++; if(d){aps.requiredGPTScriptCount++ }if(aps.scriptLoaderStarted){aps.queueAsyncScript(b) }return b }; aps.queueWaitFunction=function(b,c){var a={name:b,scriptID:null,path:null,testFunction:c,complete:false,loadstart:null,loadend:null,appCallback:null,requiredForGPT:true}; aps.adScripts[b]=a; aps.queuedWaitCount++; aps.requiredGPTScriptCount++; if(aps.scriptLoaderStarted){aps.queueAsyncScript(a) }return a }; aps._loadScript2=function(a){var c=a.path; if(!c||!(typeof c==="string")){return }var b=document.createElement("script"); b.type="text/javascript"; b.async=true; if(a.scriptID!=null){b.id=a.scriptID }if(b.addEventListener){b.addEventListener("load",function(){try{a.callback.apply(a) }catch(d){aps.logException("_loadScript2",d) }if(a.appCallback!=null){a.appCallback.apply(a) }},false) }else{b.onreadystatechange=function(){if(b.readyState in {loaded:1,complete:1}){b.onreadystatechange=null; console.log(oCallback); try{a.callback.apply(a) }catch(d){aps.logException("_loadScript2",d) }if(a.appCallback!=null){a.appCallback.apply(a) }}} }b.src=c; document.getElementsByTagName("head")[0].appendChild(b) } })();(function(){if(document.location.hostname.match(/((homeguides|smallbusiness|work|healthyeating|livehealthy)\.(chron|sfgate)\.com)/)){if(document.cookie.split(";").filter(function(a){return a.indexOf("region=EU")>=0 }).length==1){aps.logInfo("region EU detected, disabling personalized ads"); aps.cfg.disablePersonalisation=true; if(document.location.href.indexOf("gdpr=true")>-1){aps.cfg.bid.enableGDPR=true }}}else{if(document.location.href.indexOf("?is_eu=1")>-1){aps.logInfo("region EU (test) detected, disabling personalized ads"); aps.cfg.disablePersonalisation=true }}})();(function(){var b=this; b.StripAndPreserveQuerystringVars=function(e,d){if(typeof(e)=="undefined"){return"" }var c=e.split("&"); var f=[]; c.forEach(function(g){g=g.split("="); if(d.indexOf(g[0])!=-1){f.push(g[0]+"="+g[1]) }}); if(f.length>0){return"?"+f.join("&") }return"" }; b.setPageTargettedUrl=function(d,c,f){var g=c.split("?"); var e=""; if(f.length==0){e=g[0] }else{e=g[0]+b.StripAndPreserveQuerystringVars(g[1],f) }aps.gcontext.pubads().setTargeting(d,e); aps.logInfo("page kvp: "+d+"="+e) }; b.setPageTargettedUrl("PageUrl",JuicePageUrl,["Testpage","Cmpid","Ipid"]); var a=document.referrer.replace(/^(http(?:s)?:\/\/)/,"").split("/")[0]; b.setPageTargettedUrl("referrer",a,[]) })();(function(){var b=this; b.aps=aps; b.refreshed=[]; b.codeFromSlot=function(d){for(var c in aps.slotsByDivID){if(aps.slotsByDivID.hasOwnProperty(c)){if(aps.slotsByDivID[c]==d){return aps.codesByDomID[c] }}}return"undefined" }; b.setSlotTargeting=function(n,c){var m=(typeof(b.refreshed[c])=="undefined")?"":"_R"; var k=""; if(aps.faceBookInstantArticle){aps.page_type2="instant article" }else{if(typeof(aps.topWindow.omni_SSVariant)!="undefined"){k="_"+aps.topWindow.omni_SSVariant }try{var i=b.getOmniContentType(); if(aps.page_type2!=i){aps.page_type2=b.getOmniContentType(); aps.cfg.dfp.pageType2Set=false }}catch(d){}}aps.cfg.dfp.pageType2Set=aps.cfg.dfp.pageType2Set||false; if(!aps.cfg.dfp.pageType2Set){aps.gcontext.pubads().setTargeting("page_type2",aps.page_type2); aps.cfg.dfp.pageType2Set=true }n.setTargeting("page_type2",aps.page_type2); n.setTargeting("page_type3",c+"_"+aps.page_type2+k); b.refreshed[c]=true; try{if(!aps.cfg.adtest){aps.cfg.adtest={}; aps.cfg.adtestparam=b.getQueryParam("adtest"); if(aps.cfg.adtestparam){aps.cfg.adtestparam=decodeURI(aps.cfg.adtestparam).split("|"); for(var j=0; j1){return C.toLowerCase().replace(/^(.)|\s(.)/g,function(D){return D.toUpperCase() }) }}}; if(typeof(omni_blogID)!="undefined"){o=omni_blogID }if(typeof(omni_blogauthor)!="undefined"){e=B(omni_blogauthor) }if(typeof(omni_blogauthortype)!="undefined"){c.AuthorType=omni_blogauthortype }if(typeof(omni_blogposttitle)!="undefined"){d=(omni_blogposttitle.toLowerCase()=="page not found"); w=omni_blogposttitle; if(w.charAt(w.length-1)==" "){w=w.substr(0,w.length-1) }}if(typeof(omni_blogname)!="undefined"){g=omni_blogname }if(typeof(omni_blogcategory2)!="undefined"){c.Category=omni_blogcategory2 }if(c.Category.length>0){if(typeof(omni_blogcategory)!="undefined"){c.SuperCategory=omni_blogcategory }}else{if(typeof(omni_blogcategory)!="undefined"){c.Category=omni_blogcategory }}if(typeof(omni_blogusage)!="undefined"){c.Usage=omni_blogusage }if(typeof(omni_section)!="undefined"){c.Section=omni_section }if(typeof(omni_voices)!="undefined"){c.Voice=omni_voices }this.abParseURL=function(){var F=l; if(F.indexOf("#")>-1){F=F.split("#")[0] }var D=F.indexOf("?")+1; var E=F.indexOf(".com")+5; k=F.substr(0,E); if(D>0){q=F.substring(D); A=F.substring(0,D-1) }else{A=F }z=A; A=A.substr(E); if(A.charAt(A.length-1)=="/"){A=A.substr(0,A.length-1) }var C=new Array(); C=A.split("/"); x=C[0]; y=C[C.length-1]; if(x==y){y="index" }if(top.document.location.hostname=="insidescoopsf.sfgate.com"){x="insidescoop" }return x+":"+y }; this.abAssignSections=function(){if(c.SuperCategory.length>0){i=c.SuperCategory; s=c.SuperCategory; t=s+":"+c.Category; u=t+":blogs"; v=u+":"+g.toLowerCase() }else{i=c.Category; s=c.Category; t=s+":blogs"; u=t+":"+g.toLowerCase(); v=u; if(c.Voice.length>0){v=v+":"+c.Voice.toLowerCase() }}n=v.replace(/:/g,",") }; p="Blogs-"+abParseURL(); if(c.Category==""){abCategorizeBlog(x,c) }abAssignSections(); if(w==""||w==g){w="Blog index page" }if(c.Section.length>0){g=g+":"+c.Section }w=g+":"+w; o=g+"--"+o; h=c.AuthorType; g=g+"("+c.AuthorType+")"; w=w+"("+c.AuthorType+")"; w=w.replace(/'/g,""); m=w; if(e){if(e.indexOf(",")!=-1){e=e.substring(0,e.indexOf(",")) }}if(d){return"undefined" }else{return j }}; aps.page_type2="undefined"; if(aps.faceBookInstantArticle){aps.page_type2="instant article" }else{try{aps.page_type2=b.getOmniContentType() }catch(a){}}aps.performanceMetrics.page_type2=aps.page_type2; aps.logInfo("page_type2: "+aps.page_type2) })();(function(){if(document.location.pathname.toLowerCase().indexOf("were-you-seen")>-1){aps.gcontext.pubads().setTargeting("type","seen"); aps.logInfo("page kvp: type: seen") }})();(function(){if(APSpageUrl){if(APSpageUrl.indexOf("staging.richie")==0||APSpageUrl.indexOf("richie")==0||APSpageUrl.indexOf("papp")==0){googletag.cmd.push(function(){try{googletag.pubads().set("page_url",JuicePageUrl); aps.logInfo("Richie app: Setting page_url to "+JuicePageUrl) }catch(a){}}); aps.logInfo("Richie app: disabling modules"); if(document.location.href.indexOf("?appId=")==-1){aps.cfg.bid.enabled=false }aps.cfg.excludeModules=["nlp","ab_testing","blueconic","PublisherProvidedId"] }}})();(function(){aps.registerEvent(aps.event.on_dom_loaded,function(a){var b=aps.getQueryParameterByName("juiceconsole"); if(b!=null){setTimeout(function(){var c=document.createElement("script"); c.src="//mis.hearstnp.com/juice/Bookmarklets/debug.js"+"?bustcache="+new Date().getTime(); document.body.appendChild(c) },parseInt(b,10)) }var b=aps.getQueryParameterByName("hnp-debug"); if(b!=null){setTimeout(function(){var c=document.createElement("script"); c.src="//mis.hearstnp.com/juice/Bookmarklets/hnp-debug.js"+"?bustcache="+new Date().getTime(); document.body.appendChild(c) },parseInt(b,10)) }}) })();(function(){aps.specifiedAdSlots={}; aps.usingSelectiveAdSlotLoading=false; aps.selectiveAdSlotCookieName="Ju13ceSelectiveAdsList"; aps.shouldPlaceAd=function(c){if(!aps.usingSelectiveAdSlotLoading){return true }return(typeof(aps.specifiedAdSlots[c])!="undefined") }; aps.saveSelectiveLoadingAdSlotList=function(){var c=[aps.selectiveAdSlotCookieName,"=",JSON.stringify(aps.specifiedAdSlots),"; domain=.",window.location.host.toString(),"; path=/;"].join(""); document.cookie=c }; aps.clearSelectiveLoadingAdSlots=function(){aps.specifiedAdSlots={}; aps.saveSelectiveLoadingAdSlotList() }; aps.addSlotToSelectiveLoadingList=function(c){aps.specifiedAdSlots[c]=true; aps.saveSelectiveLoadingAdSlotList() }; aps.removeSlotFromSelectiveLoadingList=function(c){if(typeof(aps.specifiedAdSlots[c])!="undefined"){delete aps.specifiedAdSlots[c]; aps.saveSelectiveLoadingAdSlotList() }}; var b=aps.getQueryParameterByName("sadslot[]"); if(b!=null){aps.usingSelectiveAdSlotLoading=true; for(var a=0; a-1){return false }if(!aps.usingSelective3rdLoading){return true }return(typeof(aps.specified3rdParties[c])!="undefined") }; aps.add3rdToSelectiveLoadingList=function(c){aps.specified3rdParties[c]=true }; var a=aps.getQueryParameterByName("sad3rd[]"); if(a!=null){aps.usingSelective3rdLoading=true; for(var b=0; b-1||aps.cfg.bid.disableMobile){return }}if(aps.shouldRunThirdParty("a9")&&aps.cfg.bid.enabled&&aps.current_domain!="greenstate.com"){!function(e,c,h,j,k,d,f){if(c[e]){return }function i(g,l){c[e]._Q.push([g,l]) }c[e]={init:function(){i("i",arguments) },fetchBids:function(){i("f",arguments) },setDisplayBids:function(){},_Q:[]}; d=h.createElement(j); d.async=!0; d.src=k; f=h.getElementsByTagName(j)[0]; f.parentNode.insertBefore(d,f) }("apstag",window,document,"script","https://c.amazon-adsystem.com/aax2/apstag.js"); if(aps.cfg.bid.excludedDomains.indexOf(aps.current_domain)>-1){aps.logInfo("Domain excluded from bidders (A9): "+aps.current_domain) }else{if(aps.cfg.disablePersonalisation&&!aps.cfg.bid.enableGDPR){return }aps.cfg.bid.a9.partners["1ayvuv4"]="AppNexus"; aps.cfg.bid.a9.partners["2kotmo"]="DistrictM"; aps.cfg.bid.a9.partners["1gqg3k"]="Oath"; aps.cfg.bid.a9.partners["bgbtvk"]="OpenX"; aps.cfg.bid.a9.partners["1m2fm68"]="Pubmatic"; aps.cfg.bid.a9.partners["t7ludc"]="Rubicon"; aps.cfg.bid.a9.validSections={"":"home page","Homepage":"home page","news":"news","entertainment":"entertainment","sports":"sports","burningman":"burningman","realestate":"real estate","obituaries":"obituaries","bayarea":"local news","seen-events":"seen","neighborhood":"local news","food":"food","lifestyle":"living","life":"living","business":"business","local":"local news","ontheblock":"real estate","politics":"news","homestyle":"real estate","living":"living","california-wildfires":"local news","seen-saratoga":"seen","comics-and-games":"entertainment","technology":"technology","education":"education","seen":"seen","expensive-san-francisco":"local news","2018":"local news","2019":"local news","weather":"local news","national":"news","homes":"real estate","photogallery":"news","style":"living","search":"other","science":"news","houseoftheweek":"real estate","music":"entertainment","sfhistory":"local news","nation":"news","readmore":"other","49ers":"sports","portal":"subsciption","crime":"local news","client":"entertainment","warriors":"sports","chris-mcginnis":"travel","raiders":"sports","chronicle_vault":"entertainment","art":"entertainment","real-estate":"real estate","insidescoop":"food","mommyfiles":"living","seattlenews":"local news","beer":"food","access.aspx?product=newedition&from=http:":"subsciption","travel":"travel","giants":"sports","galleries":"news","home":"real estate","opinion":"local news","jobs":"jobs","houston":"local news","education_clone_6643_20180713151626":"local news","dearabby":"entertainment","beauty":"living","outdoors":"travel","subscribe-new-offers":"subsciption","earthquakes":"local news","cars":"autos","chronicle-history":"local news","capitol":"local news","tablehopping":"food","photos":"news","latestnews":"news","mlb":"sports","horoscope":"entertainment","new-haven":"local news","fiesta":"local news","collegesports":"sports","blogs":"other","preps":"sports","auto":"autos","originalpets":"living","lifestyles":"living","athletics":"sports","weird":"news","wine":"food","games":"entertainment","comics":"entertainment","columns":"local news","getaways":"travel","us":"news","rodeo":"entertainment",}; aps.cfg.bid.a9.config.pubID="3070"; aps.cfg.bid.a9.config.adServer="googletag"; aps.cfg.bid.a9.config.bidTimeout=aps.cfg.stp.def.timeout||2500; var a=document.location.href.split("/")||["","",""]; var b=""; if(aps.cfg.bid.a9.validSections[a[3]]==undefined){b="other" }else{b=aps.cfg.bid.a9.validSections[a[3]] }switch(a[2]){case"education.seattlepi.com":b="Education"; break; case"healthyeating.sfgate.com":b="Healthy Eating"; break; case"homeguides.sfgate.com":b="Home Guides"; break; case"livehealthy.chron.com":b="Live Healthy"; break; case"pyme.lavoztx.com":b="Pyme"; break; case"smallbusiness.chron.com":b="Small Business"; break; case"work.chron.com":b="Work"; break }aps.cfg.bid.a9.config.params={}; aps.cfg.bid.a9.config.params.si_section=b; aps.cfg.bid.a9.config.us_privacy=(aps.cfg.doNotSell)?"1YYY":"1---"; aps.cfg.bid.a9.apstag=apstag; aps.cfg.bid.a9.checkInitCalled=function(){if(!aps.cfg.bid.a9.initCalled){aps.cfg.bid.a9.initCalled=true; aps.logInfo("init A9"); apstag.init(aps.cfg.bid.a9.config) }}; if(aps.current_domain=="gametimect.com"){aps.cfg.bid.a9.config.blockedBidders=["1m2fm68","bgbtvk","1ayvuv4","t7ludc","1sq5vcw","2kotmo","1238um8","kbyu4g","1juiv40","fw5c00","1fepczk","xnfchs","1x5zdhc","70ibr4","16j2cqo","orsc8w","1oacd8g","acdgcg","19uxhc0","s3ngu8","1rm7hts","1gqg3k"] }aps.registerEvent(aps.event.on_before_refresh_ads,function(c){aps.logInfo("A9 updateSlotsKVPs"); aps.startThirdPartyRefresh("A9"); aps.logInfo("Start A9 refresh"); aps.cfg.stp[aps.cfg.stp.at].a9.bidsReceived=false; apstag.fetchBids({slots:aps.cfg.bid.a9.adUnits[aps.cfg.stp.at],timeout:aps.cfg.stp[aps.cfg.stp.at].timeout},function(d){var e=googletag.pubads().getSlots(); aps.cfg.bid.a9.handleDisplayBids(d,e) }); aps.stopThirdPartyRefresh("A9") }); aps.registerEvent(aps.event.on_start_bidding,function(c){aps.cfg.bid.a9.adUnits[aps.cfg.stp.at]=aps.cfg.bid.a9.buildAdSlots(c.slots); aps.cfg.bid.a9.getDisplayBids(aps.cfg.bid.a9.adUnits[aps.cfg.stp.at]); if(aps.cfg.bid.a9.videoAdUnits.length==0){aps.cfg.bid.a9.videoAdUnits=aps.cfg.bid.a9.buildDisplaySlots(c.slots); aps.cfg.bid.a9.getVideoBids() }}); googletag.cmd.push(function(){googletag.pubads().addEventListener("slotRenderEnded",function(c){c.slot.setTargeting("amznbid",""); c.slot.setTargeting("amzniid","") }) }); aps.cfg.bid.a9.keySlots=function(c){return c.reduce(function(d,e){var f=e.getSlotElementId(); d[f]=e; return d },{}) }; aps.cfg.bid.a9.handleDisplayBids=function(c){aps.logInfo("A9 bids received"); aps.cfg.stp[aps.cfg.stp.at].a9.bidsReceived=true; c.forEach(function(d){if(d.amznbid!="2"){aps.logInfo(d.slotID+" *BID* A9/"+(aps.cfg.bid.a9.partners[d.amznp]||"A9")+" "+d.amznbid+" [banner]"); aps.cfg.bid.a9.bids.push({slotid:d.slotID,bid:d.amznbid,bidder:aps.cfg.bid.a9.partners[d.amznp]||"A9"}) }}); if(aps.cfg.bid.detectAllBids&&(aps.cfg.stp[aps.cfg.stp.at].pb.biddersDone.length>=(aps.cfg.stp[aps.cfg.stp.at].pb.calledBidders.length-aps.cfg.bid.lessBidder))){aps.logInfo("all bids received",true); googletag.cmd.push(function(){aps.enableGoogleServices(0) }) }}; aps.cfg.bid.a9.buildAdSlots=function(f){var e=[]; for(var g in f){var c=aps.definedTagArr[g]; if(c.code=="APflex"&&aps.current_domain!="timesunion.com"){continue }if(c.batchRequest!="requested"){continue }if(aps.cfg.bid.a9.excludedSlots.indexOf(c.code)>-1||aps.cfg.bid.excludedSlots.indexOf(c.code)>-1){aps.logInfo("A9: Skipping "+c.code); continue }if(c.code=="A951"&&document.location.href.indexOf("https://www.sfgate.com/realestate/")==0){aps.logInfo("A9: Skipping A951 on realestate"); continue }if(!c.video){var d={}; d.slotID=c.code; d.slotName="/"+definedTags.networkCode+"/"+definedTags.adUnit+"/"+c.code; d.sizes=aps.setAdSize(c); if(d.sizes.length>0){e.push(d) }}}return e }; aps.cfg.bid.a9.getDisplayBids=function(c){if(aps.cfg.disablePersonalisation&&!aps.cfg.bid.enableGDPR){return }c=c||[]; if(c.length==0){return }if(!(aps.cfg.bid.disableMobile&&(aps.current_domain.indexOf("m.")==0))){aps.a9Requesting=c; aps.cfg.stp[aps.cfg.stp.at].a9.bidsReceived=false; aps.cfg.bid.a9.checkInitCalled(); aps.logInfo("calling A9 display"); apstag.fetchBids({slots:aps.a9Requesting,timeout:aps.cfg.bid.a9.config.bidTimeout},function(d){aps.cfg.bid.a9.handleDisplayBids(d) }) }}; aps.cfg.bid.a9.buildDisplaySlots=function(f){var e=[]; for(var c=0; c0){googletag.cmd.push(function(){aps.cfg.bid.a9.checkInitCalled(); aps.logInfo("calling A9 video"); apstag.fetchBids({slots:aps.cfg.bid.a9.videoAdUnits,timeout:aps.cfg.bid.a9.config.bidTimeout},function(c){aps.cfg.bid.a9.handleVideoBids(c) }) }) }}; aps.cfg.bid.a9.handleVideoBids=function(c){aps.logInfo("A9 video bid received: "+c.length); if(c.length>0){aps.cfg.vid.tagUrl+=c[0].qsParams; aps.logInfo(c[0].slotID+" *BID* A9/"+(aps.cfg.bid.a9.partners[c[0].amznp]||"A9")+" "+c[0].qsParams+" [video]"); aps.cfg.bid.a9.bids.push({slotid:c[0].slotID,bid:c[0].amznbid,bidder:aps.cfg.bid.a9.partners[c[0].amznp]||"A9"}) }}; aps.registerEvent(aps.event.on_request_new_video_ads,function(){aps.cfg.bid.a9.getVideoBids() }) }}})();(function(){aps.registerEvent(aps.event.on_before_enable_google_services,function(c){var a=!1; if(aps.current_domain=="expressnews.com"||aps.current_domain=="houstonchronicle.com"){try{if(GetCookie("hrstctok")!=null){a=1 }}catch(b){}}else{if(aps.current_domain=="sfchronicle.com"){try{if(JSON.parse(sessionStorage.getItem("sync-subscriberPlans-status"))["hasActivePlans"]==true){a=1 }}catch(b){}}}if(a){googletag.cmd.push(function(){aps.logInfo("user authenticated"); aps.gcontext.pubads().setTargeting("category","premuser") }) }}) })();(function(){var a=""; switch(aps.current_domain){case"houstonchronicle.com":case"chron.com":a="hou"; break; case"expressnews.com":case"mysanantonio.com.com":a="sa"; break; case"sfchronicle.com":case"sfgate.com":a="sf"; break; case"timesunion.com":a="tu"; break; default:return; break }aps.registerEvent(aps.event.on_before_enable_google_services,function(h){var d=false; var l=false; var j=[]; try{if(typeof(localStorage)!=undefined){var f=JSON.parse(localStorage.getItem("hnp_subs")); var b=1; var e=null; if(f!=null){for(var g in f){if(f.hasOwnProperty(g)){e=f[g]; if(e.hasOwnProperty("sub_status_"+b)){var i=a; if(e["sub_status_"+b]=="Active"){i=i+"_a_" }else{i=i+"_ex_" }i=i+e["sub_product_"+b]+"_"; i=i+e["sub_product_code_"+b]; j.push(i) }}b++ }}}}catch(c){}var k=a+"_na"; if(j.length>=1){k=j.join(",") }googletag.cmd.push(function(){aps.logInfo("swgt = "+k); aps.gcontext.pubads().setTargeting("swgt",k) }) }) })();(function(){window.onHearstLogBadScript=function(c,a){window.bad_scripts=window.bad_scripts||[]; var b=c.split(" ")[0]; window.bad_scripts.push(b); console.log("Script with a problem: "+b); console.log("line nuember: "+a) } })();!function(){var b=function(Q,S){function U(c,d){return c<>>32-d }function W(h,i){var j,k,l,m,n; return l=2147483648&h,m=2147483648&i,j=1073741824&h,k=1073741824&i,n=(1073741823&h)+(1073741823&i),j&k?2147483648^n^l^m:j|k?1073741824&n?3221225472^n^l^m:1073741824^n^l^m:n^l^m }function Y(d,e,f){return d&e|~d&f }function aa(d,e,f){return d&f|e&~f }function ac(d,e,f){return d^e^f }function ae(d,e,f){return e^(d|~f) }function ag(c,d,e,k,l,m,n){return c=W(c,W(W(Y(d,e,k),l),n)),W(U(c,m),d) }function ai(c,d,f,k,l,m,n){return c=W(c,W(W(aa(d,f,k),l),n)),W(U(c,m),d) }function ak(c,d,g,k,l,m,n){return c=W(c,W(W(ac(d,g,k),l),n)),W(U(c,m),d) }function am(c,d,h,k,l,m,n){return c=W(c,W(W(ae(d,h,k),l),n)),W(U(c,m),d) }function ao(j){for(var k,l=j.length,m=l+8,n=(m-m%64)/64,o=16*(n+1),p=Array(o-1),q=0,r=0; l>r; ){k=(r-r%4)/4,q=r%4*8,p[k]=p[k]|j.charCodeAt(r)<>>29,p }function aq(f){var g,h,i="",j=""; for(h=0; 3>=h; h++){g=f>>>8*h&255,j="0"+g.toString(16),i+=j.substr(j.length-2,2) }return i }function at(e){e=e.replace(/\r\n/g,"\n"); for(var f="",g=0; gh?f+=String.fromCharCode(h):h>127&&2048>h?(f+=String.fromCharCode(h>>6|192),f+=String.fromCharCode(63&h|128)):(f+=String.fromCharCode(h>>12|224),f+=String.fromCharCode(h>>6&63|128),f+=String.fromCharCode(63&h|128)) }return f }void 0===S&&(S=""),void 0===Q&&(Q=10000000000*Math.random()+"||"+window.location.href+"||"+(new Date).getTime()+"||"+S); var av,ax,ay,az,aA,aB,aC,aD,aE,aF=Array(),aG=7,R=12,T=17,V=22,X=5,Z=9,ab=14,ad=20,af=4,ah=11,aj=16,al=23,an=6,ap=10,ar=15,au=21; for(Q=at(Q),aF=ao(Q),aB=1732584193,aC=4023233417,aD=2562383102,aE=271733878,av=0; av-1){return }window.ntvConfig=window.ntvConfig||{}; window.ntvConfig.keyValues=window.ntvConfig.keyValues||{}; aps.cfg.permutive.ntvConfig=localStorage.getItem("_pnativo"); if(aps.cfg.permutive.ntvConfig){window.ntvConfig.keyValues.permutive=aps.cfg.permutive.ntvConfig }aps.setPermutiveValue=function(arrToTest){retValue=null; if(!arrToTest.length){arrToTest=[arrToTest] }for(var i=0; iaps.cfg.permutive.maxItems){aps.logInfo("Permutive: "+aps.cfg.permutive.ids.length+" audiences found"); aps.cfg.permutive.ids=aps.cfg.permutive.ids.slice(0,aps.cfg.permutive.maxItems) }aps.gcontext.pubads().setTargeting("permutive",aps.cfg.permutive.ids); aps.logInfo("Permutive (from local storage): "+aps.cfg.permutive.ids) }}else{if(aps.cfg.permutive.ids.length>aps.cfg.permutive.maxItems){aps.logInfo("Permutive: "+aps.cfg.permutive.ids.length+" audiences found") }aps.logInfo("Permutive: "+aps.cfg.permutive.ids) }}) })();(function(){if(aps.shouldRunThirdParty("lotame")){if(aps.cfg.dfp.arbitrage.enabled){return }aps.lotame={}; aps.lotame.usesLightning={"theridgefieldpress.com":13946,"beaumontenterprise.com":4478,"lmtonline.com":4503,"seattlepi.com":4492,"sfchronicle.com":4496,"thetelegraph.com":13847,}; if(typeof aps.lotame.usesLightning[aps.cfg.bid.current_domain]!="undefined"){aps.cfg.lotame=aps.lotame; aps.cfg.lotame.maxItems=100; aps.cfg.lotame.ids=[]; aps.logInfo(aps.cfg.bid.current_domain+" uses Lotame Lightning"); aps.lotame.callback=function(i){googletag.cmd.push(function(){aps.gcontext.pubads().setTargeting("lotame",i.getAudienceString(",",aps.cfg.lotame.maxItems)); aps.cfg.lotame.ids=i.getAudienceString(",",aps.cfg.lotame.maxItems).split(","); aps.logInfo("lotame: "+aps.cfg.lotame.ids) }) }; aps.lotame.tagInput={config:{clientId:aps.lotame.usesLightning[aps.cfg.bid.current_domain],audienceLocalStorage:"lotame_hearstnp",onProfileReady:aps.lotame.callback,}}; aps.registerEvent(aps.event.on_before_enable_google_services,function(l){if(aps.cfg.lotame.ids.length==0){var j=localStorage.getItem("lotame_hearstnp")||""; var i=j.split(","); for(var k=0; k-1){var s=document.cookie.indexOf("=",p); if(s>0){o=false; s++; var q=document.cookie.indexOf(";",s); q=q>0?q:document.cookie.length; l=document.cookie.slice(s,q) }}var n=false,m; if(o){p=document.cookie.indexOf("_cc_id"); if(p>-1){var t=document.cookie.indexOf("=",p); if(t>0){n=true; t++; var r=document.cookie.indexOf(";",t); r=r>0?r:document.cookie.length; m=document.cookie.slice(t,r) }}}var k="https://ad"+l; k=k+"/5/c="+i+"/pe=y/callback="+j; if(n){k=k+"/pid="+m }aps.logInfo("lotame url: "+k); return k }; if(c!==""){aps.startThirdParty("lotame"); window.extractPid=function(i){var j=i.Profile.pid; aps.logInfo("lotame extractPid: "+i.Profile.pid); googletag.cmd.push(function(){aps.gcontext.pubads().setTargeting("lpid",j) }); getAudId=function(n,l,m){if(!n){return }for(var k=0; k=m){break }}}; aps.cfg.dfp.lotameIds=[]; getAudId(i.Profile.Audiences.Audience,"lotame",100); getAudId(i.Profile.Audiences.ThirdPartyAudience,"lotame",100-aps.cfg.dfp.lotameIds.length); aps.logInfo("lotame: "+aps.cfg.dfp.lotameIds); googletag.cmd.push(function(){aps.gcontext.pubads().setTargeting("lotame",aps.cfg.dfp.lotameIds) }); aps.stopThirdParty("lotame") }; var g=e.get_cc_extr_url(c,"extractPid"); aps.queueScriptAsync("lotame ",g,true,null) }}})();(function(){if(aps.shouldRunThirdParty("blueconic")){var a=this; aps.registerEvent(aps.event.on_update_page_level_targeting,function(d){if(typeof localStorage.bcDFPTargetingParams!=="undefined"){aps.logInfo("Blueconic segments detected"); try{var b=window.JSON.parse(localStorage.bcDFPTargetingParams); if(b[0]["key"]=="audiences"&&b[0]["value"].length>0){aps.gcontext.pubads().setTargeting("bc_audiences",b[0]["value"]); aps.logInfo("Blueconic data: "+localStorage.bcDFPTargetingParams) }else{aps.logInfo("Empty blueconic segment detected") }}catch(c){aps.logInfo("error parsing blueconic data") }}else{aps.logInfo("Blueconic segments not detected") }}) }})();(function(){if(aps.shouldRunThirdParty("PublisherProvidedId")){googletag.cmd.push(function(){var d="; "+document.cookie; var c=d.split("; BCSessionID="); if(c.length==2){var b=c.pop().split(";").shift(); var a=aps.codec.hex.fromBits(aps.hash.sha256.hash(b)); aps.logInfo("PublisherProvidedId: "+b+" hash: "+a); googletag.pubads().setPublisherProvidedId(a) }else{aps.logInfo("PublisherProvidedId: BCSessionID not detected") }}) }})();(function(){if(aps.shouldRunThirdParty("nlp")){aps.getHDNnlpWithId=function(q,o){var p=[]; try{var j=HDN.dataLayer.content["keyNlp"+q]; for(var n=0; n0){d.push("a_"+k) }k=aps.getHDNnlpWithId("ConsumerGood","g"); if(k.length>0){d.push(k) }k=aps.getHDNnlpWithId("Event","e"); if(k.length>0){d.push(k) }k=aps.getHDNnlpWithId("Location","l"); if(k.length>0){d.push(k) }k=aps.getHDNnlpWithId("Organization","o"); if(k.length>0){d.push(k) }k=aps.getHDNnlpWithId("Person","p"); if(k.length>0){d.push(k) }k=aps.getHDNnlpWithId("Unknown","u"); if(k.length>0){d.push(k) }k=aps.getHDNnlpWithId("WorkOfArt","w"); if(k.length>0){d.push(k) }googletag.cmd.push(function(){aps.gcontext.pubads().setTargeting("nlp_entities",d) }); aps.logInfo("nlp_entities: "+d.toString()) }catch(e){aps.logInfo("nlp_categories: exception") }}})();(function(){if(aps.shouldRunThirdParty("perf_sec")){var a=this; a.getWCMPath=function(){if(typeof window.omni_channelPath=="undefined"){return null }var c=window.omni_channelPath.toLowerCase(); c=c.replace(new RegExp(" :: ","g"),":"); var b=(window.location.search.indexOf("articleComments")!==-1); if(omni_className=="article"||omni_className=="slideshow"){c=c+":"+omni_className; if(b){c=c+" comments" }}return c }; a.getGSAPath=function(){if(window.location.search.indexOf("/search/")!==-1){return"search" }return null }; a.getWordpressPath=function(){if(typeof window.omni_blogname=="undefined"){return null }var b=window.omni_blogcategory.toLowerCase(); if(typeof window.omni_blogcategory2!="undefined"){if(window.omni_blogcategory2!=""){b=b+":blog:"+window.omni_blogcategory2 }}b=b+":"+window.omni_blogname; return b }; aps.startThirdParty("perf_sec"); aps.queueWaitFunction("perf_sec_check",function(){var b=null; b=a.getWCMPath(); b=(b!=null)?b:a.getGSAPath(); b=(b!=null)?b:a.getWordpressPath(); if(b!=null){aps.perf_sec=b; googletag.cmd.push(function(){aps.logInfo("perf_sec: "+b); aps.gcontext.pubads().setTargeting("perf_sec",b) }); aps.stopThirdParty("perf_sec") }return(b!=null) }) }})();(function(){aps.cfg.dfp.abtestvar=""; if(aps.shouldRunThirdParty("ab_testing")){var a=this; a.setNPABTEST=function(){try{aps.cfg.dfp.abtestvar=window.HDN.dataLayer.abtest.experimentId.join()+"," }catch(b){}if(aps.cfg.dfp.abtestvar==""){aps.cfg.dfp.abtestvar=aps.abtest||aps.npabtest||"" }if(aps.cfg.dfp.abtestvar!=""){googletag.cmd.push(function(){aps.logInfo("npabtest : "+aps.cfg.dfp.abtestvar); aps.gcontext.pubads().setTargeting("ab",aps.cfg.dfp.abtestvar) }) }else{aps.logInfo("npabtest not detected.") }}; aps.setNPABTEST=a.setNPABTEST; aps.registerEvent(aps.event.on_before_enable_google_services,function(b){a.setNPABTEST() }) }})();(function () { /* prebid.js v3.25.0 Updated : 2020-07-13 */ !function(u){var s=window.pbjsChunk;window.pbjsChunk=function(e,t,n){for(var r,o,i,a=0,c=[];a>t/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e)},t.getBidIdParameter=function(e,t){if(t&&t[e])return t[e];return""},t.tryAppendQueryString=function(e,t,n){if(n)return e+t+"="+encodeURIComponent(n)+"&";return e},t.parseQueryStringParameters=function(e){var t="";for(var n in e)e.hasOwnProperty(n)&&(t+=n+"="+encodeURIComponent(e[n])+"&");return t=t.replace(/&$/,"")},t.transformAdServerTargetingObj=function(t){return t&&0';return n+=''},t.createTrackPixelIframeHtml=de,t.getValueString=fe,t.uniques=le,t.flatten=pe,t.getBidRequest=function(n,e){return n?(e.some(function(e){var t=s()(e.bids,function(t){return["bidId","adId","bid_id"].some(function(e){return t[e]===n})});return t&&(r=t),t}),r):void 0;var r},t.getKeys=ge,t.getValue=ye,t.getKeyByValue=function(e,t){for(var n in e)if(e.hasOwnProperty(n)&&e[n]===t)return n},t.getBidderCodes=function(){return(0t[n]?-1:0}},t.parseQS=je,t.formatQS=we,t.parseUrl=function(e,t){var n=document.createElement("a");t&&"noDecodeWholeURL"in t&&t.noDecodeWholeURL?n.href=e:n.href=decodeURIComponent(e);var r=t&&"decodeSearchAsString"in t&&t.decodeSearchAsString;return{href:n.href,protocol:(n.protocol||"").replace(/:$/,""),hostname:n.hostname,port:+n.port,pathname:n.pathname.replace(/^(?!\/)/,"/"),search:r?n.search:k.parseQS(n.search||""),hash:(n.hash||"").replace(/^#/,""),host:n.host||window.location.host}},t.buildUrl=function(e){return(e.protocol||"http")+"://"+(e.host||e.hostname+(e.port?":".concat(e.port):""))+(e.pathname||"")+(e.search?"?".concat(k.formatQS(e.search||"")):"")+(e.hash?"#".concat(e.hash):"")},t.deepEqual=Ce,t.mergeDeep=xe;var r=n(3),o=n(167),i=n.n(o),a=n(168),c=n.n(a),u=n(11),s=n.n(u),d=n(12),f=n.n(d),l=n(182);n.d(t,"deepAccess",function(){return l.a});var p=n(183);function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}(e,t)||b(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e){return function(e){if(Array.isArray(e))return v(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||b(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,t){if(e){if("string"==typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v(e,t):void 0}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n