try { (function(){const initAmazonApsTag=function(){setupApsCore();setupApstagLegacy();setupQueueExtension();setupCustomPlacementsExtension();setupNativeContentExtension();};function setupApsCore(){window.ez_aps=((accountId=`${window.__ezapid}`)=>{window._aps=window._aps||new Map();if(!_aps.has(accountId)){_aps.set(accountId,{queue:[],store:new Map([['listeners',new Map()]])});} const ez_aps={accountID:accountId,record:function(eventName,eventData){return new Promise((resolve,reject)=>{_aps.get(this.accountID).queue.push(new CustomEvent(eventName,{detail:{...eventData,resolve,reject}}));});},read:function(key){this.record('bootstrap/store/willRead',{name:key});return _aps.get(this.accountID).store.get(key);},run:function(eventName,eventData){const systemListeners=_aps.get('_system')?.store.get('listeners');if(systemListeners?.has(eventName)){this.record(eventName,eventData);}else{this.record('bootstrap/run/willDrop',{name:eventName,detail:eventData});}},react:function(eventName,handler){_aps.get(this.accountID).store.get('listeners').set(eventName,handler);this.record('bootstrap/react/didExecute',{name:eventName});}};ez_aps.record('bootstrap/version/declare',{version:5});return ez_aps;})();} function setupApstagLegacy(){const ez_aps=window.ez_aps;window.ez_apstag=window.ez_apstag||{init:function(config,callback){ez_aps.record('legacy/init/enqueue',{config,callback});},fetchBids:function(bidConfig,callback){ez_aps.record('legacy/fetchBids/enqueue',{bidConfig,callback});},setDisplayBids:function(){ez_aps.run('legacy/setDisplayBids/enqueue',{arguments});},targetingKeys:function(){return ez_aps.read('legacy/targetingKeys')??[];},rpa:function(tokenConfig,callback,setCookie){ez_aps.record('legacy/rpa/enqueue',{tokenConfig,callback,setCookie});},upa:function(tokenConfig,callback,setCookie){ez_aps.record('legacy/upa/enqueue',{tokenConfig,callback,setCookie});},dpa:function(callback){ez_aps.record('legacy/dpa/enqueue',{callback});}};ez_aps.record('bootstrapExtAPStag/version/declare',{version:1});} function setupQueueExtension(){const ez_aps=window.ez_aps;window.ez_apstag={...window.ez_apstag,queue:{push:function(callback){ez_aps.record('legacy/queue/push',{callback});}}};ez_aps.record('bootstrapExtQueue/version/declare',{version:1});} function setupCustomPlacementsExtension(){const ez_aps=window.ez_aps;window.ez_apstag={...window.ez_apstag,customPlacements:function(){return{hint:function(id,isDefault,hintMetadata){ez_aps.record('customPlacement/hint/define',{id,isDefault,hintMetadata});},enable:function(){ez_aps.record('customPlacement/service/enable');},addEventListener:function(eventName,handler){if(eventName==='PlacementResponse'){ez_aps.react('customPlacement/placement/didRespond',handler);}else{throw new Error('Unsupported event type');}}};}};ez_aps.record('bootstrapExtASR/version/declare',{version:1});} function setupNativeContentExtension(){const ez_aps=window.ez_aps;window.ez_apstag={...window.ez_apstag,nativeContent:function(){return{enable:function(){ez_aps.record('nativeCommerceAds/service/enable');},registerHook:function(hookName,handler){if(hookName==='nativeCommerceAds.updateClickUrl'){ez_aps.react('nativeCommerceAds/clickUrl/update',(event)=>{return{status:'completed',value:{url:handler(event?.detail?.url,event?.detail?.element)}};});}else{throw new Error('Unsupported event type');}}};}};ez_aps.record('bootstrapExtNCA/version/declare',{version:1});} function createAndAppendElement(type,attributes,parentElement){const element=document.createElement(type);for(const[attr,value]of Object.entries(attributes)){element.setAttribute(attr,value);} parentElement.parentNode.insertBefore(element,parentElement);} const loadApsTags=function(){if(document.querySelector('link[href="https://aax.amazon-adsystem.com"]')){return;} const firstScript=document.getElementsByTagName('script')[0];const amazonBaseUrl='https://aax.amazon-adsystem.com';const configUrl=`https://config.aps.amazon-adsystem.com/configs/${window.__ezapid}`;const publisherUrl='https://client.aps.amazon-adsystem.com/publisher.js';addResourceHints(firstScript,amazonBaseUrl,configUrl,publisherUrl);addScriptElements(firstScript,configUrl,publisherUrl);initAmazonApsTag();};function addResourceHints(firstScript,amazonBaseUrl,configUrl,publisherUrl){createAndAppendElement('link',{rel:'preconnect',href:amazonBaseUrl},firstScript);createAndAppendElement('link',{rel:'preload',href:configUrl,as:'script',fetchpriority:'high'},firstScript);createAndAppendElement('link',{rel:'preload',href:publisherUrl,as:'script',fetchpriority:'high'},firstScript);} function addScriptElements(firstScript,configUrl,publisherUrl){createAndAppendElement('script',{async:'true',src:configUrl,fetchpriority:'high'},firstScript);createAndAppendElement('script',{async:'true',src:publisherUrl,fetchpriority:'high'},firstScript);} if(window.__ezHttpConsent){window.__ezHttpConsent.setByCat("amazon-aps-consent-placeholder","script",[{async:true}],"select_basic_ads",false,loadApsTags);}else{loadApsTags();}})();var schain_domain='ezoic.ai';var observersList=[];var domain="";if(typeof location.host!='undefined'){domain=location.host;} window.amznVideoResponse={};sellerid="";if(typeof __sellerid!="undefined"){sellerid=__sellerid;} function initializeOrtb2AndAmazon(){let ortb2={site:{name:document.title,cattax:6,cat:[],sectioncat:[],pagecat:(window._ezaq?.page_iab_categories||[]).map(c=>c.toString()),page:location.href,ref:document.referrer,keywords:document.querySelector('meta[name="keywords"]')?.content||"",},};if(window.__ez&&window.__ez.tf&&window.__ez.tf["siteIAB"]=="true"){ortb2.site.cat=(window._ezaq?.site_iab_categories||[]).map(c=>c.toString());} if(window._ezaq?.first_party_signals_page_categories){ortb2.site.pagecat=(window._ezaq?.first_party_signals_page_categories||[]).split(",").map(c=>c.trim());} if(window._ezaq?.first_party_signals_domain_categories){ortb2.site.cat=(window._ezaq?.first_party_signals_domain_categories||[]).split(",").map(c=>c.trim());} if(window._ezaq?.first_party_signals_keywords){ortb2.site.keywords=window._ezaq?.first_party_signals_keywords||ortb2.site.keywords;} if(window._ezaq?.ortb_signals_language){ortb2.site.content=ortb2.site.content||{};ortb2.site.content.language=window._ezaq?.ortb_signals_language;} let siteDomain=typeof _ezaq!=="undefined"?_ezaq.domain:"";if(siteDomain!=""){ortb2.site.domain=siteDomain;} ortb2.site.mobile=1;ortb2.site.privacypolicy=1;ortb2.device=ortb2.device||{};ortb2.device.ua=navigator.userAgent;ortb2.device.dnt=navigator.doNotTrack==="1"?1:0;ortb2.device.devicetype=2;ortb2.device.js=1;if(/mobile/i.test(navigator.userAgent)){ortb2.device.devicetype=4;}else if(/tablet/i.test(navigator.userAgent)){ortb2.device.devicetype=5;} if(window.epbjs&&window.epbjs.libLoaded){ortb2=window.epbjs.getConfig('ortb2')||ortb2;} if(typeof ez_apstag==='undefined'){return;} ez_apstag.init({pubID:__ezapid,adServer:'googletag',videoAdServer:'DFP',schain:{complete:1,ver:'1.0',nodes:[{asi:schain_domain,sid:sellerid,domain:domain,hp:1}]},signals:{ortb2:ortb2},});if(typeof __tcfapi!="undefined"){}else{if(typeof __ezapsVideo!='undefined'){ezapsFetchBids(__ezapsVideo,'video')}}} function getAmazonSlotById(id){if(typeof __ezaps==='undefined'){return;} for(var i=0;i<__ezaps.length;i++){var slot=__ezaps[i];if(typeof slot==='undefined'){continue;} var slotID=slot.slotID;if(typeof slotID!=='undefined'&&slotID==id){var pageAdDiv=document.getElementById(id);if(!pageAdDiv){return slot;} var responsiveSizes=getResponsiveSlotSize(slotID);if(responsiveSizes.length>0){slot.sizes=responsiveSizes;} return slot;}} return false;} var ezrsCache={};function getResponsiveSlotSize(slotID){var clientWidth=document.documentElement.clientWidth;var clientHeight=document.documentElement.clientHeight;if(ezrsCache.clientWidth!=clientWidth||ezrsCache.clientHeight!=clientHeight){ezrsCache={clientWidth:document.documentElement.clientWidth,clientHeight:document.documentElement.clientHeight,slotSizes:{}};} if(typeof ezrsCache.slotSizes[slotID]!=='undefined'){return ezrsCache.slotSizes[slotID];} if(typeof window.ezoResponsiveSizes==='undefined'){return "";} var responsiveSlotTemplate=ezoResponsiveSizes[slotID];if(!responsiveSlotTemplate||responsiveSlotTemplate.length===0){return "";} var sizesCanShow=[];var sizeDirectiveBestFit="";for(var i=0;i=sizeDirectiveBestFit.minWidth&&sizeDirective.minHeight>=sizeDirectiveBestFit.minHeight));if(meetsViewportRequirements&&isLargerRequirementsThatPrev){sizeDirectiveBestFit=sizeDirective;}} if(sizeDirectiveBestFit!==""){sizesCanShow=sizeDirectiveBestFit.sizes;if(sizeDirectiveBestFit.altSizes){sizesCanShow.concat(sizeDirectiveBestFit.altSizes);}}else{sizesCanShow=[0,0];} ezrsCache.slotSizes[slotID]=sizesCanShow;return sizesCanShow;} function ezapsFetchBids(amazonSlots,adType){if(typeof amazonSlots==='undefined'||amazonSlots.length===0){return} if(typeof ez_apstag==='undefined'){return;} ez_apstag.fetchBids({slots:amazonSlots,timeout:2e3},function(bids){setA9DisplayBids(bids);});} function lazyLoadEzapsFetchBids(amazonSlots){if(typeof amazonSlots==='undefined'||amazonSlots.length===0){return} if(typeof observersList!=='undefined'&&observersList.length>0){for(let i=0;i{entries.forEach(function(entry){if(entry.isIntersecting){if(typeof observersList!=='undefined'&&typeof amazonBidLL!=='undefined'){var curIndex=observersList.indexOf(amazonBidLL);if(curIndex>-1){observersList.splice(curIndex,1);} amazonBidLL.disconnect();} if(typeof ez_apstag!=='undefined'){ez_apstag.fetchBids({slots:[getAmazonSlotById(entry.target.id)],timeout:2e3},function(bids){setA9DisplayBids(bids);});}}});},options);var curElement=document.getElementById(amazonSlots[slot].slotID);if(typeof curElement!=='undefined'&&curElement!=null){amazonBidLL.observe(curElement);} if(typeof observersList!=='undefined'&&typeof amazonBidLL!=='undefined'){observersList.push(amazonBidLL);}}} function setA9VideoBids(bids){for(b in bids){var bid=bids[b];window.amznVideoResponse[bid.slotID].params=bid.qsParams;window.amznVideoResponse[bid.slotID].raw=bid;}} function setA9DisplayBids(bids){if(typeof bids==='undefined'||bids.length==0){return;} var keys=apstag.targetingKeys();for(var i=0;itimeout){clearInterval(checkInterval);callback();}},50);} waitForEzaq(initializeOrtb2AndAmazon,5000);} catch(err) {var hREED = function(er) {return function() {reportEzError(er, "/edmontonalberta/calgary.js")}}; typeof reportEzError==="function"?hREED(err):window.addEventListener('reportEzErrorDefined',hREED(err), {once: true}); console.error(err);}