PageSourceSearch

https://www.elledecoration.co.uk/_assets/moapt/2.491.0/moapt-bundle-hdm.js

js elledecoration.co.uk collected 2026-09-24 18:28:53 UTC 206,190 bytes, 1 lines download raw bytes

1(()=>{"use strict";const e={d:(t,n)=>{if(Array.isArray(n))for(var i=0;i<n.length;){var o=n[i++],a=n[i++];e.o(t,o)?0===a&&i++:0===a?Object.defineProperty(t,o,{enumerable:!0,value:n[i++]}):Object.defineProperty(t,o,{enumerable:!0,get:a})}else for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:(e,t)=>Object.hasOwn(e,t),r:e=>{Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}};(()=>{let t;globalThis.importScripts&&(t=globalThis.location+"");const n=globalThis.document;if(!t&&n&&("SCRIPT"===n.currentScript?.tagName.toUpperCase()&&(t=n.currentScript.src),!t)){const e=n.getElementsByTagName("script");if(e.length){let n=e.length-1;for(;n>-1&&(!t||!/^http(s?):/.test(t));)t=e[n--].src}}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),e.p=t})();var t={};e.r(t),e.d(t,{Cookies:()=>j,Events:()=>Y,MD5:()=>st,appendDiv:()=>X,applyChinaAdLabel:()=>ge,arrayFromNodes:()=>Pt,assign:()=>x,awaitIabReady:()=>E,checkAllowedHostnames:()=>wt,checkOptOutConsentAndLocale:()=>nt,collapseTransporter:()=>ue,convertToSnakeCase:()=>mt,createJourneyPlacementGuard:()=>Ht,detectHeadlessBrowser:()=>bt,enableAdhesionForDisplay:()=>Yt,filterOutCollidingElements:()=>rt,getAmazonHctx:()=>me,getBoundingClientRect:()=>ot,getBreakpoint:()=>J,getCLSDebugTarget:()=>ut,getCWVLoaf:()=>_t,getClickId:()=>gt,getConnectionSpeed:()=>St,getConsentStatus:()=>Me,getCountry:()=>we,getDebugMode:()=>Le,getDisplay:()=>oe,getDisplayType:()=>Kt,getEnhancedGalleryDivIdV2:()=>Rt,getEnhancedGalleryTypeIdV2:()=>Ot,getHFID:()=>pe,getHRST:()=>U,getJSONLDData:()=>H,getLazyLoadBufferMultiplier:()=>Ct,getMosbCookie:()=>Mt,getNodePath:()=>pt,getOrSetAbSession:()=>Wt,getParam:()=>Ae,getSailthruCookie:()=>K,getSailthruVisitor:()=>W,getSlug:()=>ye,getTemplate:()=>ie,getToolKVP:()=>he,getUserLocation:()=>F,getUtmVal:()=>ve,getValue:()=>$,getViewport:()=>be,handleAdhesion:()=>re,has:()=>N,hasAccountCcpaOptOut:()=>ke,hasAdBlocker:()=>_e,hasCMP:()=>ze,hasConsent:()=>De,hasDeclinedConsent:()=>Pe,hasGPCSet:()=>Ee,hasGppOptOut:()=>Te,hasHearstPlayer:()=>xe,hasSearchQuery:()=>Re,hasVideo:()=>Oe,hasWatchNext:()=>Be,hideAdDiv:()=>te,hideAllAdSlots:()=>Ne,isAffiliate:()=>jt,isAutos:()=>Dt,isBlockBot:()=>He,isBot:()=>$e,isContentBlockedByJAM:()=>Gt,isContentPassEnabled:()=>Ge,isContentPassSubscriber:()=>je,isDNT:()=>Ue,isDda:()=>Je,isEaselPage:()=>ae,isElementAfter:()=>$t,isEnhancedGalleryOverlayV2:()=>xt,isFeedTemplate:()=>At,isImmersiveFeedTemplate:()=>It,isImmersiveOpen:()=>zt,isImmersiveUrlOverride:()=>vt,isIncentivesLandingPage:()=>V,isJourneyActive:()=>Bt,isJourneyBypassActive:()=>Nt,isLegacy:()=>R,isLiftTraffic:()=>Qe,isListicleAdCadenceToggleEnabled:()=>q,isLuxury:()=>Ut,isMgu:()=>Ze,isMobileSafari:()=>Ve,isNonProdUrl:()=>qe,isParameterPresent:()=>Se,isPaywalledFully:()=>Ke,isSensitiveContent:()=>We,isSponsored:()=>Ye,isUKSite:()=>Xe,isUSSiteAndIntlUser:()=>tt,isUSSiteAndUser:()=>et,isUSUserLocation:()=>fe,isUserSignedIn:()=>ce,lazyLoadAllAds:()=>it,load:()=>de,loadScriptCallback:()=>dt,log:()=>P,mediaOSVersion:()=>O,memoGetConnectionSpeed:()=>Lt,memoGetParam:()=>Ie,memoGetValue:()=>G,memoize:()=>B,millisecondsConvertall:()=>ft,once:()=>Ft,overrideValidElements:()=>Et,performance:()=>lt,raf:()=>se,removeAttribute:()=>ne,removeDuplicateEmptyAdContainers:()=>ee,replaceMacros:()=>le,setCookieDeprecationLabel:()=>yt,shouldInsertTopAd:()=>Vt,shouldShowPrivacyBanner:()=>qt,shouldSuppressScript:()=>kt,startIabReadyWait:()=>M,throttle:()=>ht,useSite:()=>Fe,waitForGPP:()=>C,waitForHTMLElement:()=>Tt,waitForTCF:()=>_,whenAvail:()=>ct});var n={};e.r(n),e.d(n,{addAdSlot:()=>on,addKV:()=>an,addVideoKV:()=>rn,assignContentId:()=>dn,bidFinish:()=>cn,bidStart:()=>pn,checkBidsComplete:()=>ln,checkScriptsComplete:()=>sn,clearAllKVs:()=>gn,deleteKV:()=>un,deleteVideoKV:()=>mn,getAdUnit:()=>wn,getBidderSlotIndex:()=>fn,getBidderSlotSizes:()=>yn,getDefinedSlots:()=>Cn,getLoadGroup:()=>hn,getPermutiveSegments:()=>bn,getRefDomain:()=>ti,getRenderedSlots:()=>An,getSlotById:()=>vn,getSlotPlacement:()=>In,getSlotsByLoadGroup:()=>Sn,getUndefinedSlots:()=>Ln,hasAdZone:()=>kn,hasExistingVideoKVEntry:()=>_n,hideUndefinedSlots:()=>Tn,isB2BDemo:()=>Mn,isBlockedDomain:()=>En,isGptApiReady:()=>Dn,observeAdSlots:()=>Pn,purgeAdSlot:()=>xn,purgeAdSlotsByContentId:()=>Bn,purgeAdSlotsByDivIdPattern:()=>Nn,purgeAdSlotsByPrefix:()=>Hn,purgeVideoBids:()=>$n,refreshBidders:()=>Gn,removeAdhesionAds:()=>Fn,removeValueFromKey:()=>jn,resizeAdIframe:()=>zn,scriptFinish:()=>Un,scriptSkip:()=>Vn,scriptStart:()=>qn,setBidderSlotTargeting:()=>Zn,setEnvironmentForAdhesion:()=>Wn,setPageKV:()=>Qn,setPermutiveKV:()=>Yn,setSlotTargeting:()=>Jn,trackAdhesionClose:()=>Kn,unobserveAdSlot:()=>Rn,unobserveAdSlotsByContentId:()=>On,videoBidFinish:()=>Xn,videoBidStart:()=>ei});const i="breaker-ad",o="vertical-ad",a=["a83c7445-53b3-4cc1-b87b-03f1b16c36e2","00bc5b59-034b-455b-bcf9-5a503d346422"],r=["0002","0003","0005","0006","0008","0009","0010","0011","0012","0013","001
15","0016","0017","0018","0019","0021","0023","0024","0025","0026","0029","0031","0032","0033","0034","0035","0036","0038","0040","0041","0042","0046","0047","0048","0051","0052","0055","0056","0057","0058","0060","0061","0062","0063","0068","0069","0070","0071","0073","0077","0078","0079","0081","0082","0083","0084","0086","0087","0088","0089","0091","0093","0094","0095","0097","0098","0099","0100","0102","0103","0104","0106","0108","0110","0111","0112","0113","0116","0117","0118","0119","0120","0123","0126","0127","0128","0129","0130","0131","0132","0133","0136","0137","0138","0139","0140","0141","0143","0145","0146","0148","0150","0151","0152","0153","0155","0156","0158","0159","0163","0164","0166","0168","0169","0170","0172","0173","0174","0175","0177","0178","0179","0180","0181","0184","0185","0186","0187","0188","0189","0190","0191","0192","0193","0194","0195","0196","0197","0198","0199","0200","0201","0202","0203","0204","0205","0206","0207","0208","0210"],d=["autoweek","caranddriver","roadandtrack","motortrend","hotrod"],s="QbaNt35oFX",l="UID2-X-P-MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE6xFwjoRLcLaVSJSPvABnYKxKyWy3RbaQllBbg11OMZoMYh/lFQnBpLYwvQrt/7x+zpN7U7YoqxQGMMV92lRGog==",c=["sex.cosmopolitan.com"],p={adRequestSlotTrigger:["gpt_lb_0"],geoWhitelist:{HDM:["US"],HMIES:["ES"],HMIIT:["IT"],HMIUK:["GB"]},noFlyAdvertisers:[4614194397,5129809119,4652390563,53029402,75956602,72109282,5808753293,5010663722,4406955819,4464603051,4654668465,4936133706,188460802,5640151892,5649597980,5649802740,5649597086,110239642,194732362,5508332564,69805402,5090263192,4947090624,81464722,4855555657,4438713559]},g=["286","287","288","289","290","291","292","293","294","295","296","297","298","299","300","301","302","303","304","305","306","307","308","309","310","311","312","313","314","315","316","317","318","323","453","454","455","456","457","458","459","460","461"],u={advertiserIds:[],creativeTemplateIds:[12082937],excludeBackfill:!1},m=["1c699de5"],w=[12451309,12448771,12502441,12524516],f={gallery:{m:{default:[{after:window?.gptLayer?.adConfig?.mobileCadenceOverride||2,id:"slideshow-ad-breaker-{i}",template:"slideshow-ad-breaker-template",type:i}],mgu:[{after:1,id:"slideshow-ad-breaker-{i}",template:"slideshow-ad-breaker-template",type:i}]}},listicle:{d:{default:[{after:3,id:"listicle-ad-breaker-{i}",reserve:0,template:"listicle-ad-breaker-template",type:i},{after:0,id:"listicle-ad-rail-{i}",reserve:1,template:"listicle-ad-rail-template",type:o}],mgu:[{after:2,id:"listicle-ad-breaker-{i}",reserve:0,template:"listicle-ad-breaker-template",type:i},{after:0,id:"listicle-ad-rail-{i}",reserve:1,template:"listicle-ad-rail-template",type:o}]},m:{default:[{after:window?.gptLayer?.adConfig?.mobileCadenceOverride||2,id:"listicle-ad-breaker-{i}",template:"listicle-ad-breaker-template",type:i}],mgu:[{after:1,id:"listicle-ad-breaker-{i}",template:"listicle-ad-breaker-template",type:i}]}},longform:{d:{default:[{after:1e3,id:"gpt-leaderboard-ad",once:!0,reserve:200,template:"longform-breaker-template",type:i},{after:2500,id:"article-ad-breaker-leaderboard-{i}",reserve:200,template:"longform-breaker-template",type:i}]},m:{default:[{after:1e3,id:"gpt-ad-vertical-top-mobile",once:!0,reserve:200,template:"longform-breaker-template",type:i},{after:2500,id:"ad-article-breaker-mobile-{i}",reserve:200,template:"longform-breaker-template",type:i}]}},luxury:{d:{default:[{after:3500,id:"article-ad-breaker-leaderboard-{i}",reserve:1500,template:"article-ad-breaker-template",type:i}]},m:{default:[{after:300,id:"gpt-ad-vertical-top-mobile",once:!0,template:"article-mobile-ad-breaker-template",type:i},{after:1700,id:"ad-article-breaker-mobile-{i}",reserve:200,template:"article-mobile-ad-breaker-template",type:i}]}},recipe:{d:{default:[{after:1500,id:"article-ad-breaker-leaderboard-{i}",template:"article-ad-breaker-template",type:i},{after:0,id:"ad-article-rail-{i}",template:"article-ad-rail-template",type:o}]},m:{default:[{after:250,id:"ad-article-breaker-mobile-{i}",reserve:250,template:"article-mobile-ad-breaker-template",type:i}]}},standard:{d:{default:[{after:3500,id:"article-ad-breaker-leaderboard-{i}",reserve:1500,template:"article-ad-breaker-template",type:i},{after:0,id:"ad-article-rail-{i}",template:"article-ad-rail-template",type:o}]},m:{default:[{after:300,id:"gpt-ad-vertical-top-mobile",once:!0,template:"article-mobile-ad-breaker-template",type:i},{after:1700,id:"ad-article-breaker-mobile-{i}",reserve:200,template:"article-mobile-ad-breaker-template",type:i}]}}},y={IX:{bidMethod:"addIndexBid",bidderCode:"ix",kv:"hb_pb_ix",vendorId:10},KAR:{bidMethod:"addKargoBid",bidderCode:"kargo",condition:()=>"m"===gptLayer.breakpoint&&gptLayer.utils.isUSUserLocation(),kv:"hb_pb_kargo",vendorId:972}
1,MAG:{bidMethod:"addMagniteBid",bidderCode:"magnite",kv:"hb_pb_magnite",vendorId:52},MAGPBS:{bidMethod:"addMagnitePrebidServerBid",bidderCode:"mgnipbs",condition:()=>!0===gptLayer.adConfig?.settings?.pbBeta,kv:"hb_pb_mgnipbs",vendorId:52},MSFT:{bidMethod:"addMicrosoftBid",bidderCode:"msft",kv:"hb_pb_msft",vendorId:1126},TDS:{bidMethod:"addTeadsBid",bidderCode:"teads",kv:"hb_pb_teads",vendorId:132},TPL:{bidMethod:"addTripleLiftBid",bidderCode:"triplelift",kv:"hb_pb_triplelift",vendorId:28},TTD:{bidMethod:"addTheTradeDeskBid",bidderCode:"ttd",kv:"hb_pb_ttd",vendorId:21}},h={article2article:{d:{firstAds:{minElements:2,minGapAddition:1500,minGapMultiply:0},firstAdsWithLede:{minElements:1,minGapAddition:1500,minGapMultiply:0,minusLedeHeight:!0},requiredLeftSpace:{addition:700,multiply:0},restAds:{minElements:2,minGapAddition:700,minGapMultiply:1}},m:{firstAds:{minElements:2,minGapAddition:500,minGapMultiply:0},firstAdsWithLede:{minElements:2,minGapAddition:500,minGapMultiply:0},requiredLeftSpace:{addition:0,multiply:0},restAds:{minElements:2,minGapAddition:0,minGapMultiply:1.25,minGapMultiplyLI:1.01}}},longform:{d:{firstAds:{minElements:2,minGapAddition:1500,minGapMultiply:0},firstAdsWithLede:{minElements:1,minGapAddition:1500,minGapMultiply:0,minusLedeHeight:!0},requiredLeftSpace:{addition:700,multiply:0},restAds:{minElements:2,minGapAddition:700,minGapMultiply:1}},m:{firstAds:{minElements:2,minGapAddition:500,minGapMultiply:0},firstAdsWithLede:{minElements:1,minGapAddition:200,minGapMultiply:0},requiredLeftSpace:{addition:0,multiply:0},restAds:{minElements:2,minGapAddition:0,minGapMultiply:1.25,minGapMultiplyLI:1.01}}},luxury:{d:{firstAds:{minElements:2,minGapAddition:1500,minGapMultiply:0},firstAdsWithLede:{minElements:1,minGapAddition:1500,minGapMultiply:0,minusLedeHeight:!0},requiredLeftSpace:{addition:700,multiply:0},restAds:{minElements:2,minGapAddition:700,minGapMultiply:1}},m:{firstAds:{minElements:2,minGapAddition:500,minGapMultiply:0},firstAdsWithLede:{minElements:1,minGapAddition:200,minGapMultiply:0},requiredLeftSpace:{addition:0,multiply:0},restAds:{minElements:2,minGapAddition:0,minGapMultiply:1.25,minGapMultiplyLI:1.01}}},standard:{d:{firstAds:{minElements:2,minGapAddition:1500,minGapMultiply:0},firstAdsWithLede:{minElements:1,minGapAddition:1500,minGapMultiply:0,minusLedeHeight:!0},requiredLeftSpace:{addition:700,multiply:0},restAds:{minElements:2,minGapAddition:700,minGapMultiply:1}},m:{firstAds:{minElements:2,minGapAddition:500,minGapMultiply:0},firstAdsWithLede:{minElements:1,minGapAddition:200,minGapMultiply:0},requiredLeftSpace:{addition:0,multiply:0},restAds:{minElements:2,minGapAddition:0,minGapMultiply:1.01,minGapMultiplyLI:1.01}}}},b=["elle","harpersbazaar","elledecor","veranda","esquire","townandcountrymag","fujingaho","richessemag","25ans","elledecoration"],A={Homepage:"homepage_hds"};const I=()=>{const e=U("article.wordCount",0);return e>=750?"Very Long":e>=400?"Long":e>=150?"Medium":e>0?"Short":"n/a"};function v(e){return!!e&&("ready"===e.signalStatus||"loaded"===e.cmpStatus&&(Boolean(e.gppString)||/OTGPPConsent/.test(document.cookie)))}function S(e){return"loaded"===e?.cmpStatus}function L({isApiReady:e,ping:t,onEvent:n,success:i,timeout:o,fail:a}){const r=Date.now();let d,s=!1;const l=e=>{s||(s=!0,d&&clearInterval(d),e?i():a&&a())},c=()=>{const n=Date.now()-r>o;if(e())try{t(e=>{e?l(!0):n&&l(!1)})}catch{n&&l(!1)}else n&&l(!1)};return c(),s||n?.(l,c),s||(d=setInterval(c,100)),()=>l(!1)}const C=(e,t=1e4,n)=>L({fail:n,isApiReady:()=>"function"==typeof window.__gpp,onEvent:(e,t)=>{try{window.__gpp("addEventListener",n=>{n?.pingData&&v(n.pingData)?e(!0):"signalStatus"!==n?.eventName||"ready"!==n?.data?t():e(!0)})}catch{}},ping:e=>{window.__gpp("ping",t=>{e(v(t))})},success:e,timeout:t}),_=(e,t=1e4,n)=>L({fail:n,isApiReady:()=>"function"==typeof window.__tcfapi,onEvent:(e,t)=>{try{window.__tcfapi("addEventListener",2,(n,i)=>{!i||"tcloaded"!==n?.eventStatus&&"useractioncomplete"!==n?.eventStatus&&!S(n)?t():e(!0)})}catch{}},ping:e=>{window.__tcfapi("ping",2,t=>{e(S(t))})},success:e,timeout:t});let k,T;function M({gdpr:e,usSiteAndUser:t,timeout:n=3e4}={}){return k||(k=new Promise(i=>{e?T=_(()=>i({path:"tcf",timedOut:!1}),n,()=>i({path:"tcf",timedOut:!0})):t?T=C(()=>i({path:"gpp",timedOut:!1}),n,()=>i({path:"gpp",timedOut:!0})):i({path:null,timedOut:!1})}),k)}function E({gdpr:e,usSiteAndUser:t,timeout:n=5e3}={}){const i=M({gdpr:e,usSiteAndUser:t});return Promise.race([i,new Promise(i=>{setTimeout(()=>{T?.(),i({path:e?"tcf":t?"gpp":null,timedOut:!0})},n)})])}const D=window?.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"background: #27323A; color: #A3F7BF":"background: #A3F7BF; color: #27323A";function P(e,t,n){const i={evt:t,msg:n,name:e,ts:Date.now()-window?.gptLayer?.timerStart||0},o="fre-events"===e;Le()&&console.log("%c%s",D,`${(i.ts/1e3).toFixed(2)}s - [${o?"ANLYT":"ADS"}] - ${i.name} - ${i.evt} - `,"string"==typeof i.msg?i.msg.substring(0,750):i.msg),o||window?.gptLayer?.adDebug?.push(i)}const{CURRENT_SITE:R}=window,O=()=>{const{ver:e=""}=window.__FRE??{};return`nextfre-${e}`},x=(e,...t)=>{const n=Object(e);
1return t.forEach(e=>{null!=e&&Object.keys(e).forEach(t=>{n[t]=e[t]})}),n},B=function(e){const t={};return function(...n){const i=n.join(",");return t[i]||(t[i]=e(...n)),t[i]}},N=(...e)=>Object.prototype.hasOwnProperty.call(...e),H=()=>{const e=document.querySelector('script[type="application/ld+json"]');if(!e)return{};try{const t=JSON.parse(e.textContent);return Array.isArray(t)?t[0]:t}catch(e){return P("Utils","getJSONLDData - invalid JSON-LD",e),{}}},$=(e,t,n,i,o)=>{for(e=e&&e.split?e.split("."):[e],i=0;i<e.length;i++)t=t?t[e[i]]:o;return t===o||""===t||null===t?n:t},G=B($),j={domain:()=>document.domain||window.location.hostname,get(e,t){for(let n=document.cookie.split(";"),i=0;i<n.length;i++){const o=n[i].replace(/^\s+/,""),[a,...r]=o.split("="),d=r.join("=");if(a===e)return t?d:decodeURIComponent(d)}return""},set(e,t,n){let i=`${e}=${t}`;if(void 0!==n){const e=Date.now()+60*n*1e3;i+=`; expires=${new Date(e).toUTCString()}`}return document.cookie=`${i}; path=/`,this.get(e)===t},test(e){return!!this.get(e)}};function z(e,t){e.missingValues||(e.missingValues=[]),e.missingValues.includes(t)||e.missingValues.push(t),e.logMissingValues=function(e){const t=$("missingValues",e,[]);return t.length?()=>{console.warn("logMissingValues - missing: ",t.sort())}:()=>{}}(e)}function U(e,t){const n=$("HRST.immersiveContentId",window,""),i=n?window.HRST[n]:window.HRST,o=$(e,i,null);return o||z(i,e),o||t}function V(e,t){return"incentives"===t||"incentives-landing"===e}function q(e){if(!0===e||1===e)return!0;if("string"==typeof e){const t=e.trim().toLowerCase();return"1"===t||"true"===t}return!1}function F(){let e,t;try{let n=j.get("location_data");n=n?JSON.parse(n):{};const{country_code:i,geo_region:o}=n;e=i?i.toUpperCase():void 0,t=o?o.toUpperCase():void 0}catch(e){P("Utils","getUserLocation - location_data cookie error",e)}return{country:e,region:t}}const K=()=>j.get("sailthru_hid");async function W(){return new Promise((e,t)=>{window?.Sailthru?.integration("getCurrentUser",{onError:e=>{P("hem","getSailthruVisitor - error",e),t(e)},onSuccess:t=>{P("hem","getSailthruVisitor - success",t),e(t)}})})}const Y={fire(e,t,n){const i=new CustomEvent(t,{detail:n});e.dispatchEvent(i)},listen(e,t,n,i){i&&"object"==typeof i||(i=!1);const o=t.split(" ");for(let t=0;t<o.length;t++)e.addEventListener(o[t],n,i)},remove(e,t,n){const i=t.split(" ");for(let t=0;t<i.length;t++)e.removeEventListener(i[t],n)}},Q={m:0,t:760,d:980},Z={...Q,d:1024},J=e=>{let t=e||Q;!e&&window?.gptLayer?.isHDS&&(t=Z);const n=$("HRST.immersiveContentId",window)&&document.getElementById("immersive-drawer")?.offsetWidth||window.innerWidth;let i;return Object.keys(t).forEach(e=>{const o=t[e];n>=o&&(i=e)}),i},X=(e,t,n,i)=>{const o=e.split(" ");for(let e=0;e<o.length;e++){const a=document.createElement("div");a.id=t,a.className="gpt-adslot noskim",n&&Object.keys(n).forEach(e=>a.setAttribute(e,n[e])),P("moaptAdInsert - appendDiv",`divs[${e}].${o[e]} - ad.${t} - elm`,document.getElementById(o[e]));const r=document.getElementById(o[e]);if(r)return r.appendChild(a),i?.(a),!0}return!1},ee=e=>{const t=e=>0===e.childElementCount&&""===e.textContent.trim(),n=Pt(`[id="${e}"]`);if(n.length<=1)return 0;const i=n.find(e=>!t(e))||n[0];let o=0;for(const e of n)e!==i&&t(e)&&(e.remove(),o+=1);return o},te=(e,t)=>{let n=document.querySelector(e);if(!n)return!1;const i=new RegExp(t,"i");for(;!n.className.match(i);)if(n=n.parentNode,"BODY"===n.nodeName)return!1;return n.style.display="none",!0},ne=(e,t)=>{const n=document.getElementById(e);n&&n.removeAttribute(t)},ie=()=>$("HRST.article.template",window,""),oe=()=>$("HRST.article.display",window,""),ae=()=>document.querySelectorAll(".easel-ad").length>0,re=(e,t)=>{const n=document.getElementById(t);P("handleAdhesion",`eventName: ${e} - id: ${t} - adAdhesionContainer`,n),n&&Y.fire(window,e,{slotId:t})},de=(e,t)=>{const n=document.createElement("script");n.src=e,n.addEventListener("load",t),document.body.appendChild(n)},se=e=>window.requestAnimationFrame?window.requestAnimationFrame(e):window.setTimeout(e,1e3/60),le=e=>{const t={breakpoint:J(),template:ie()};return Object.keys(t).forEach(n=>{e=e.replace(`{${n}}`,t[n])}),e},ce=()=>"authorized"===j.get("mylo_status"),pe=()=>{const e=j.get("_HFID");if(e){const[t,n]=e.replace(/_|-/g,"").split(":");return`${t.toUpperCase()}${n}`.substring(0,150)}return""},ge=e=>{let t=document.querySelector(`#${e} iframe`);if(!t)return!1;t=t.contentDocument.querySelector("body");const n=document.createElement("div");return n.style="position: absolute; right: 0px; bottom: 0px; z-index: 10000",n.innerHTML='<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="31px" height="15px" viewBox="0 0 31 15" enable-background="new 0 0 31 15" xml:space="preserve"> <image id="image0" width="31" height="15" x="0" y="0" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB8AAAAPCAQAAAC2cdwpAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QA/4ePzL8AAAAHdElNRQfjCA4QBQ4KQoVMAAABE0lEQVQoz2NkaGCgADBhCj2IeBCBLvY8YacFA8NRh+cJqOIsCGavAoR++sLKfq7Ghx8MDAwMlz4s/MDAEC8gIX/vQa+CkAA7B0TVmx/tLxgYGBgYEY7/X4/pkmMHrQ8wMDxPkJBHFX/xUHIBmu0MDH0Lix9gGrHTQliiamb7CwaGow5KChBtWByPC4gJ3L0hwtGrwMCAcDzM+URol5BgYIhygL
1B//oCxXrxo30GUdlTn4gx53OCog5U9qghjI5r2SgkGhjc/cBkAC2kIQMQRPNkYS/z+CYlLUgDcdg+HuzdwKxOWQE9vKNrjBdg4tl3Arf3Xj3sPEDxEIoJqX/jh7oQjOH0+64LUDWSP9cKNYqQsxwEAcVNWmc4OW+YAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTktMDgtMTRUMTY6MDU6MTQrMDM6MDB/t/nCAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE5LTA4LTE0VDE2OjA1OjE0KzAzOjAwDupBfgAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAAASUVORK5CYII=" /></svg>',t.appendChild(n),!0},ue=()=>{if("d"!==J())return!1;const e=document.querySelectorAll(".feed-transporter .transporter-simple-item");for(let t=0;t<e.length;t++)e[t].style.clear="none",e[t].style.marginBottom="3%",e[t].style.marginRight=t%3==2?"0%":"2%";return!0},me=()=>{const e=$("HRST.article.contextualTags.hctx",window,"");return r.map(e=>`cm_${e}`).filter(t=>e.includes(t))},we=()=>{const e=j.get("location_data");if(e)try{return JSON.parse(e).country_code}catch(e){return!1}return!1},fe=()=>{const e=$("HRST.adConfig.isUSUserLocation",window,void 0);return"boolean"==typeof e?e:"US"===we()},ye=e=>{if($("HRST.article.template",window,"").match(/homepage/i))return"homepage";const t=e?e.split("/"):document.location.pathname.split("/");for(let e=t.length;e>0;e--)if(t[e])return t[e];return!1},he=()=>{const e=U("article.template",""),t=U("article.display",""),n=U("landing.type","");return"homepage"===e.toLowerCase()?"homepage":n?"landing":/long-form|longform/.test(t)?"article-longform":e},be=()=>{const e=[],t=document.documentElement.clientWidth;Object.entries({desktop_w:1280,desktop:980,tablet_w:768,tablet:640,mobile_w:480,mobile:0}).every(([n,i])=>!(t>=i)||(e.push(n),!1));const n=t>=980?"large":"small";return e.push(n),e},Ae=(e,t="",n=window.location.href)=>{try{const i=new URL(n);return i.searchParams.get(e)?i.searchParams.get(e):t}catch(i){const o=new RegExp(`[&?]${e}=?([^&]*)?`).exec(n);return null===o?t:void 0===o[1]||o[1]}},Ie=B(Ae),ve=(e,t)=>{const n=`utm_${e}`,i=Ae(n,"",t);if(i)return i;try{const t=j.get("gpt_utm");if(t){const i=JSON.parse(t);return i[n]||i[e]||""}}catch(t){P("Utils",`getUtmVal - error parsing gpt_utm cookie for ${e}`,t)}return""};function Se(e){return null!==new URL(window.location.href).searchParams.get(e)}const Le=()=>{const e=Ie("ads_debug")||j.get("ads_debug");let t=!1;return"true"===e&&(t=!0),j.set("ads_debug",e,"true"===e?60:-1),t};let Ce;const _e=()=>Ce||(void 0!==window.abd?Promise.resolve(window.abd):(window.abd=!1,document.body?(Ce=new Promise(e=>{const t=document.createElement("div");t.innerHTML="&nbsp;",t.id="AdBanner",t.className="adBan",document.body.appendChild(t),setTimeout(()=>{window.abd=0===t.offsetHeight,t.remove(),e(window.abd)},250)}),Ce):(P("hasAdBlocker","message","no document.body - skipping check"),Promise.resolve(window.abd)))),ke=()=>window.HRST?.mylo?!(!window.HRST.mylo.ccpa_optout&&!window.cmpUtils?.getAccountSession?.()?.optOut):!!window.DO_NOT_SELL,Te=()=>{if(!!window.CMP_GPP_OPTOUT)return!0;const e=j.get("hdm_cmp"),t=e?JSON.parse(e):"";return!!t&&(t?.gpp?.optOut??!1)};function Me(){if(!!!j.get("OptanonAlertBoxClosed"))return"na";const e=j.get("hdm_cmp");if(e)try{const{haveConsent:t}=JSON.parse(e);if(t)return"oi";if(!t)return"oo"}catch(e){}return"na"}const Ee=()=>{const e=!(!navigator||!navigator.globalPrivacyControl);return e&&j.set("OneTrustWPCCPAGoogleOptOut","true",525600),e},De=()=>!!(!window.GDPR||window.GDPR&&window.CMP_CONSENT),Pe=()=>!!window.CMP_WITHDRAWN,Re=(e=window.location.href,t=document.referrer)=>{const n=new URL(e),i=t?new URL(t):null;return n.searchParams.has("q")||!!i&&i.searchParams.has("q")},Oe=()=>!!document.querySelector('.hearstPlayer, .embed--gopher, .embed-youtube, [data-embed="youtube"], [data-embed="embed-video"], .video-player'),xe=()=>!!($("HRST.site.video",window,!1)||window.hearstPlayer||document.querySelector('script[src*="player.js"]')),Be=()=>!!document.querySelector("#eoc-playlist-template, .end-of-content-playlist, .hearstPlayer, .glimmerPlayer"),Ne=()=>{const e=document.querySelectorAll(".ad-gpt-breaker-container, .breaker-ad, .leaderboard-ad, .gpt-breaker-container, #gpt-leaderboard-ad");for(let t=0;t<e.length;t++)e[t].style.display="none"},He=()=>!!new RegExp(["EvincedBot","MAZBot"].join("|"),"i").test(navigator.userAgent),$e=()=>!!new RegExp(["adbot","adsbot","applebot","Baiuspider","Bingbot","BitSightBot","ComplianceBot","DuckDuckBot","EchoboxBot","Exabot","Googlebot","Google Page Speed","HeadlessChrome","moatbot","PetalBot","PhantomJS","P
1ingdom","PTST","ScooperBot","SiteAuditBot","Slurp","Sogou","Yahoo Ad","YandexBot"].join("|"),"i").test(navigator.userAgent),Ge=()=>!!window?.HRST?.flags?.["content-pass.enable"]||!(!window.cp||!window.cp?.default?.propertyId),je=()=>"1"===j.get("_cpauthhint"),ze=()=>!!$("HRST.adConfig.modules.oneTrust.domainId",window),Ue=()=>!!ze()&&!!(window.CMP_WITHDRAWN||Te()||Ee()),Ve=()=>/iP(ad|od|hone)/i.test(window.navigator.userAgent)&&/WebKit/i.test(window.navigator.userAgent)&&!/(CriOS|FxiOS|OPiOS|mercury)/i.test(window.navigator.userAgent),qe=(e=window.location.origin,t=window.HRST?.preview,n=window.__SITE?.domain)=>"https://sex.cosmopolitan.com"!==e&&(n!==e||!0===t),Fe=e=>{"string"==typeof e&&(e=[e]);const t=$("HRST.adConfig.site",window,""),n=$("HRST.article.section.prefix",window,"");return!!e.includes(t)||!!e.includes(`${t}/${n}`)},Ke=()=>{if(window.JOURNEY_INFO){if("completed"===window.JOURNEY_INFO.status&&"full"===window.JOURNEY_INFO.blocked)return!0}else if(window.JOURNEY_BLOCKED)return!0;return!1},We=()=>{const e=window.location.pathname;return["sex"].some(t=>new RegExp(t).test(e))},Ye=()=>{if(""!==$("HRST.article.sponsor",window,"")){if(""!==$("HRST.article.sponsor.name",window,"")){let e=$("HRST.article.sponsor.expirationDate",window,$("HRST.article.sponsor.expiration_date",window,""));if(""!==e){e=e.split("-");const t=parseInt(e[2],10),n=parseInt(e[0],10)-1,i=parseInt(e[1],10)+1;if(e=new Date(t,n,i).getTime(),e<Date.now())return!1}return!0}if("None"===$("HRST.article.sponsor.program",window,"")||""===$("HRST.article.sponsor.program",window,""))return!1}return!1},Qe=(e,t)=>{if(!e||Ye())return!1;try{if(e.test(ve("campaign",t))||e.test(j.get("gpt_src"))||e.test(Ae("src","",t)))return!0}catch(e){return!1}return!1},Ze=(e=window.location.href)=>Qe(/^(mgu|arb)/i,e),Je=(e=window.location.href)=>Qe(/^(dda)/i,e),Xe=()=>"HMIUK"===$("HRST.adConfig.bu",window,""),et=()=>!("HDM"!==$("HRST.adConfig.bu",window,"")||!fe()),tt=()=>"HDM"===$("HRST.adConfig.bu",window,"")&&!fe(),nt=()=>{const e=Ee(),t=Te(),n=et();let i=!0;return i=!t&&!e&&n,P("Utils","checkOptOutConsent",`GPPOO: ${t} - GPC: ${e} - US: ${n} = HC: ${i}`),i},it=()=>{let e=!1;return J().match(/m|t/i)&&(Ze()||"article"!==$("HRST.article.template",window,""))&&(e=!0),"HDM"!==window.HRST.adConfig.bu||fe()||(e=!0),Ve()&&(e=!0),e};function ot(e,t){return new Promise(n=>{const i=new IntersectionObserver(([e])=>{t&&t(e.boundingClientRect),n(e.boundingClientRect),i.disconnect()});i.observe(e)})}const at=600;async function rt(e=[],t=[]){const n=t.filter(e=>e instanceof HTMLElement);if(!n.length)return[];const i=e.map(async e=>e instanceof HTMLElement?await ot(e):Promise.resolve(null)),o=(await Promise.all(i)).filter(e=>null!==e);if(!o.length)return n;const a=document.documentElement.clientWidth,r=n.map(async e=>({element:e,rect:await ot(e)}));return(await Promise.all(r)).filter(({element:e,rect:t})=>{if(!t)return!1;const n=t.bottom+50,i=t.bottom+50+100,r=0,d=a;return!o.some(e=>!(e.left>d||e.right<r||e.top>i||e.bottom+at<n))}).map(({element:e})=>e)}const dt=(e,t,n={})=>{let i,o=document.getElementsByTagName("script");const a=o[0];for(i=0;i<o.length;i++)if(o[i].src===e&&o[i].readyState&&/loaded|complete/.test(o[i].readyState))try{return void t()}catch(e){}o=document.createElement("script"),o.type="text/javascript",o.async=!0,o.src=e,o.onerror=()=>{o.addEventListener&&(o.readyState="loaded")},o.onreadystatechange=()=>{if(!o.readyState||"complete"===o.readyState||"loaded"===o.readyState){o.onload=o.onreadystatechange,o.onreadystatechange=null,o.addEventListener&&(o.readyState="loaded");try{t.call(o)}catch(e){}}},o.onload=o.onreadystatechange,Object.keys(n).forEach(e=>{o.setAttribute(e,n[e])}),a.parentNode.insertBefore(o,a)},st=(e,t)=>{function n(e,t){return e<<t|e>>>32-t}function i(e,t){var n,i,o,a,r;return o=2147483648&e,a=2147483648&t,r=(1073741823&e)+(1073741823&t),(n=1073741824&e)&(i=1073741824&t)?2147483648^r^o^a:n|i?1073741824&r?3221225472^r^o^a:1073741824^r^o^a:r^o^a}function o(e,t,o,a,r,d,s){return e=i(e,i(i(function(e,t,n){return e&t|~e&n}(t,o,a),r),s)),i(n(e,d),t)}function a(e,t,o,a,r,d,s){return e=i(e,i(i(function(e,t,n){return e&n|t&~n}(t,o,a),r),s)),i(n(e,d),t)}function r(e,t,o,a,r,d,s){return e=i(e,i(i(function(e,t,n){return e^t^n}(t,o,a),r),s)),i(n(e,d),t)}function d(e,t,o,a,r,d,s){return e=i(e,i(i(function(e,t,n){return t^(e|~n)}(t,o,a),r),s)),i(n(e,d),t)}function s(e){var t,n="",i="";for(t=0;3>=t;t++)n+=(i="0"+(e>>>8*t&255).toString(16)).substr(i.length-2,2);return n}void 0===t&&(t=""),void 0===e&&(e=1e10*Math.random()+"||"+window.location.href+"||"+(new Date).getTime()+"||"+t);var l,c,p,g,u,m,w,f,y,h=Array();for(e=function(e){e=e.replace(/\r\n/g,"\n");for(var t="",n=0;n<e.length;n++){var i=e.charCodeAt(n);128>i?t+=String.fromCharCode(i):i>127&&2048>i?(t+=String.fromCharCode(i>>6|192),t+=String.fromCharCode(63&i|128)):(t+=String.fromCharCode(i>>12|224),t+=String.fromCharCode(i>>6&63|128),t+=String.fromCharCode(63&i|128))}return t}(e),h=function(e){for(var t,n=e.length,i=n+8,o=16*((i-i%64)/64+1),a=Array(o-1),r=0,d=0;n>d;)r=d%4*8,a[t=(d-d%4)/4]=a[t]|e.charCodeAt(d)<<r,d++;return r=d%4*8,a[t=(d-d%4)/4]=a[t]|128<<r,a[o-2]=n<<3,a[o-1]=n>>>29,a}(e),m=1732584193,w=4023233417,f=2562383102,y=271733878,l=0;l<h.length;l+=16)c=m,p=w,g=f,u=y,m=o(m,w,f,y,h[l+0],7,3614090360),y=o(y,m,w,f,h[l+1],12,3905402710),f=
1o(f,y,m,w,h[l+2],17,606105819),w=o(w,f,y,m,h[l+3],22,3250441966),m=o(m,w,f,y,h[l+4],7,4118548399),y=o(y,m,w,f,h[l+5],12,1200080426),f=o(f,y,m,w,h[l+6],17,2821735955),w=o(w,f,y,m,h[l+7],22,4249261313),m=o(m,w,f,y,h[l+8],7,1770035416),y=o(y,m,w,f,h[l+9],12,2336552879),f=o(f,y,m,w,h[l+10],17,4294925233),w=o(w,f,y,m,h[l+11],22,2304563134),m=o(m,w,f,y,h[l+12],7,1804603682),y=o(y,m,w,f,h[l+13],12,4254626195),f=o(f,y,m,w,h[l+14],17,2792965006),m=a(m,w=o(w,f,y,m,h[l+15],22,1236535329),f,y,h[l+1],5,4129170786),y=a(y,m,w,f,h[l+6],9,3225465664),f=a(f,y,m,w,h[l+11],14,643717713),w=a(w,f,y,m,h[l+0],20,3921069994),m=a(m,w,f,y,h[l+5],5,3593408605),y=a(y,m,w,f,h[l+10],9,38016083),f=a(f,y,m,w,h[l+15],14,3634488961),w=a(w,f,y,m,h[l+4],20,3889429448),m=a(m,w,f,y,h[l+9],5,568446438),y=a(y,m,w,f,h[l+14],9,3275163606),f=a(f,y,m,w,h[l+3],14,4107603335),w=a(w,f,y,m,h[l+8],20,1163531501),m=a(m,w,f,y,h[l+13],5,2850285829),y=a(y,m,w,f,h[l+2],9,4243563512),f=a(f,y,m,w,h[l+7],14,1735328473),m=r(m,w=a(w,f,y,m,h[l+12],20,2368359562),f,y,h[l+5],4,4294588738),y=r(y,m,w,f,h[l+8],11,2272392833),f=r(f,y,m,w,h[l+11],16,1839030562),w=r(w,f,y,m,h[l+14],23,4259657740),m=r(m,w,f,y,h[l+1],4,2763975236),y=r(y,m,w,f,h[l+4],11,1272893353),f=r(f,y,m,w,h[l+7],16,4139469664),w=r(w,f,y,m,h[l+10],23,3200236656),m=r(m,w,f,y,h[l+13],4,681279174),y=r(y,m,w,f,h[l+0],11,3936430074),f=r(f,y,m,w,h[l+3],16,3572445317),w=r(w,f,y,m,h[l+6],23,76029189),m=r(m,w,f,y,h[l+9],4,3654602809),y=r(y,m,w,f,h[l+12],11,3873151461),f=r(f,y,m,w,h[l+15],16,530742520),m=d(m,w=r(w,f,y,m,h[l+2],23,3299628645),f,y,h[l+0],6,4096336452),y=d(y,m,w,f,h[l+7],10,1126891415),f=d(f,y,m,w,h[l+14],15,2878612391),w=d(w,f,y,m,h[l+5],21,4237533241),m=d(m,w,f,y,h[l+12],6,1700485571),y=d(y,m,w,f,h[l+3],10,2399980690),f=d(f,y,m,w,h[l+10],15,4293915773),w=d(w,f,y,m,h[l+1],21,2240044497),m=d(m,w,f,y,h[l+8],6,1873313359),y=d(y,m,w,f,h[l+15],10,4264355552),f=d(f,y,m,w,h[l+6],15,2734768916),w=d(w,f,y,m,h[l+13],21,1309151649),m=d(m,w,f,y,h[l+4],6,4149444226),y=d(y,m,w,f,h[l+11],10,3174756917),f=d(f,y,m,w,h[l+2],15,718787259),w=d(w,f,y,m,h[l+9],21,3951481745),m=i(m,c),w=i(w,p),f=i(f,g),y=i(y,u);return(s(m)+s(w)+s(f)+s(y)).toLowerCase()},lt=window.performance&&window.performance.mark?window.performance:{mark:()=>{}},ct=(e,t,n=2e4)=>{let i=0;const o=()=>{window[e]||$(`HRST.${e}`,window)?t():i<n?(i+=10,window.setTimeout(()=>{o()},10)):Ne()};o()};function pt(e){try{let t=e.nodeName.toLowerCase();return"body"===t?"html>body":e.id?`${t}#${e.id}`:(e.className&&e.className.length&&(t+=`.${[...e.classList.values()].join(".")}`),`${pt(e.parentElement)}>${t}`)}catch(e){return"(error)"}}const gt=()=>{const e="_ga_clk",t=["fbclid","gclid","msclkid"];let n=(()=>{for(const e of t){const t=Ae(e);if(t)return{hid:st(t),id:t,type:e}}return null})()||(()=>{const t=j.get(e);try{return t?JSON.parse(t):null}catch(e){return null}})();return n?(j.set(e,JSON.stringify(n),30),n):{}},ut=e=>{if(!e.length)return!1;const t=e.reduce((e,t)=>e&&e.value>t.value?e:t);if(t&&t.sources){const e=t.sources.reduce((e,t)=>e.node&&e.previousRect.width*e.previousRect.height>t.previousRect.width*t.previousRect.height?e:t);if(e)return pt(e.node)}return!1},mt=e=>e.toLowerCase().replaceAll(" ","_"),wt=()=>{const{hostname:e}=document.location,t=new RegExp("docker|localhost|127.0.0.1|next.fre.loc|hearstapps|legacy|next-fre|fre-stage|nsfw-stage|www-stage|translate.goog|translated.turbopages.org");return!(!$("HRST.adConfig.siteList",window,[]).includes(e)&&!t.test(e))},ft=(e,t)=>{switch(e){case"days":return parseInt(t/24/60/60/1e3);case"minutes":return parseInt(t/60/1e3);default:return!1}},yt=(e,t)=>{"cookieDeprecationLabel"in navigator?navigator.cookieDeprecationLabel.getValue().then(n=>{window[e][t]=n}):window[e][t]=""},ht=(e,t)=>{let n=Date.now();return()=>{n+t-Date.now()<0&&(e(),n=Date.now())}},bt=()=>{const e=document.createElement("canvas");return!!(!e.getContext||!e.getContext("webgl"))},At=()=>!!["cars-for-sale","collection","content-type","homepage","section","tag","compare","compare-template","trims"].includes(ie().toLowerCase()),It=()=>{const e=$("HRST.landing.experience",window,"");return/^immersive$/.test(e)};function vt(){const e=new URLSearchParams(window.location.search),t=e?.get("source");if(!/\//.test(t))return!1;const{pathname:n}=window.location;return!!t&&t!==n}function St(){return $("navigator.connection.effectiveType",window,"na")}const Lt=B(St);function Ct(e){switch(e){case"slow-2g":case"2g":return.5;case"3g":return.75;default:return 1}}function _t(e,t=""){return!e||Array.isArray(e)&&!e?.length?null:e.reduce((e,{blockingDuration:t,scripts:n})=>(e+=`${t}`,n?.forEach((t={},n)=>{const i=n+1,o=t?.startTime,a=o+t?.duration;e+=`,invoker_${i}_${t?.invoker},start_${i}_${o},end_${i}_${a}`}),e+="|"),`load_state_${t},`)}const kt=()=>!!/googlebot/i.test(navigator.userAgent);function Tt(e,t,n){const i=setInterval(()=>{const t=document.querySelector(e);t&&(clearInterval(i),n(t))},100);setTimeout(()=>{clearInterval(i),n(void 0)},t)}const Mt=()=>j.get("mosb");
1function Et(){return G("HRST.adConfig.settings.validElementsOverride",window,!1)}const Dt=()=>Fe(d);function Pt(e){return Array.prototype.slice.call(document.querySelectorAll(e))}function Rt(){const e=$("HRST.datalayer.galleryDisplayType",window,"");let t="";return"filmstrip"===e?t="film_":"spotlight"===e&&(t="spot_"),t}function Ot(){const e=$("HRST.datalayer.galleryDisplayType",window,"");let t="";return"filmstrip"===e?t="filmstrip-":"spotlight"===e&&(t="spotlight-"),t}function xt(){return null!==$("HRST.datalayer.galleryDisplayType",window,null)}function Bt(){return!!window.JOURNEY_INFO}function Nt(){const e=window.JOURNEY_INFO;return"completed"===e?.status&&!1===e?.blocked}function Ht(){if(!Bt()||Nt())return()=>!1;const e=window.gptLayer?.excludedAdIds;return e?.size?t=>e.has(t):()=>!1}function $t(e,t){const n=document.getElementById(e),i=document.getElementById(t);return!(!n||!i)&&!!(n.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_FOLLOWING)}function Gt(){const e=window.JOURNEY_INFO?.blocked;return"partial"===e||"full"===e||!0===e}const jt=()=>$("HRST.commerce.hasProduct",window,!1)||$("HRST.commerce.afflinks_enabled",window),zt=e=>e&&!!window.HRST?.[e],Ut=()=>Fe(b);function Vt(){const e="m"===J(),t=Ze();if(!e||t)return!1;if("horoscopes"===$("HRST.article.section.prefix",window,"")&&"daily"===$("HRST.article.subSection.prefix",window,""))return!0;if(Ut())return!1;const n="Short"===I(),i=$("HRST.article.display",window,""),o=["longform-article","standard-article"].includes(i);return n&&o}function qt(){const e=$("HRST.adConfig.settings.privacyBanner.dateActiveDefault",window,"")||"2026-02-10T10:00:00-05:00",t=$("HRST.adConfig.settings.privacyBanner.dateActive",window,"")||e,n=$("HRST.adConfig.bu",window,""),i=j.get("hdm_privacy_disclosure");return"HDM"===n&&(!!fe()&&(!(new Date(t)>new Date)&&(!i||i!==t)))}function Ft(e,t){let n;return function(...i){return e&&(n=e.apply(t||this,i),e=null),n}}function Kt(e,t=!1){return $("HRST.flags",window)?.["fre.design-system.new-components"]&&A[e]||(t?void 0:e)}const Wt=()=>{window.gptLayer.ab=window.gptLayer.ab||{};const e=window.gptLayer.ab.session||j.get("gpt_session_ab")||`s${Math.ceil(10*Math.random()).toString()}`;return window.gptLayer.ab.session=e,e};function Yt(){const e=$("HRST.adConfig.settings.adhesion",window,!1),t=window?.gptLayer.isMgu;return t?"HDM"===$("HRST.adConfig.bu",window,""):e}const Qt=/collapseadcontainer|jcpblankpixel/i,Zt=["gpt_gal_x"],Jt=[".leaderboard-ad",".breaker-ad",".vertical-ad",".ad-container",".gpt-breaker-container","#article-marketplace-horizontal","#gpt-leaderboard-ad",".mobile-adhesion-unit","#adAdhesion",".standard-article-vertical-ad",".vehicle-category-vert
1ical-ad"];function Xt(e){return e.classList.add("ad-container-collapsed"),e.style.height="0",e.style.minHeight="0",e.style.padding="0",e.style.margin="0",e.style.visibility="hidden",e.style.opacity="0",e.style.display="none",gptLayer.log("collapseContainer","elm: ",e),e.previousElementSibling?.classList?.contains("ad-disclaimer")&&e.parentElement&&(e.parentElement.classList.add("ad-container-parent-collapsed"),e.parentElement.style.display="none",gptLayer.log("collapseContainer","elm.parentElement: ",e.parentElement),gptLayer.log("collapseContainer","elm.parentElement.previousElementSibling: ",e.parentElement.previousElementSibling)),function(e){const t=e?.id,n=t?document.getElementById(`${t}-wrapper`):null;n&&(gptLayer.log("collapseContainersContainer","elm: ",n),n.style.minHeight="0")}(e),!0}function en(e,t){if(Qt.test(e)){lt.mark("hdm-collapseAdContainer-start");const e=document.querySelector(`#${t}`);let n=e;if(Zt.indexOf(t)>-1)Xt(n);else{const t=e?.closest(".mobile-adhesion-unit");if(t)n=t;else{n=e.closest(Jt.join(","))||e}Xt(n)}gptLayer.log("collapseAdContainer","divId",t),gptLayer.log("collapseAdContainer","adContainer",n),lt.mark("hdm-collapseAdContainer-end")}return!0}const tn=[];function nn(){const e=[];return tn.forEach(t=>{const n=$(`gptLayer.ab.${t}`,window,"");n&&e.push({experimentName:t,variantName:n})}),e}function on(e,t){const{adSize:n,au3:i,defined:o,divId:a,kv:r,loadGroup:d,outofpage:s,refresh:l,sfConfig:c,fallbackAdRequest:p}=e;t=t||e.contentId||$("HRST.metadata.contentId",window,"no-id"),window.gptLayer.adSlots[a]={adSize:n,...void 0!==i&&{au3:i},contentId:t,...p&&{fallbackAdRequest:p},kv:r,loadGroup:d,...void 0!==s&&{outofpage:s},...void 0!==l&&{refresh:l},...void 0!==o&&{defined:o},...void 0!==c&&{sfConfig:c}}}function an(e,t,n){return!(!t||"object"==typeof t&&0===t.length)&&(window.gptLayer.kv=window.gptLayer.kv||{},window.gptLayer.kv[e]=window.gptLayer.kv[e]||[],Array.isArray(t)||(t=[t]),t.forEach(t=>{null!=t&&""!==t&&""!==(t=(t=String(t)).replace(/[^\w\s-.\\/]/gi,""))&&(window.gptLayer.kv[e].includes(t)||window.gptLayer.kv[e].push(t))}),n&&window.gptLayer.utils.addVideoKV(e,t),!0)}function rn(e,t){return!(!t||"object"==typeof t&&0===t.length)&&("vehicle-category-rankings"===window.gptLayer.template&&_n(e,["mak","mod"])?void 0:(window.gptLayer.videoKVP=window.gptLayer.videoKVP||{},window.gptLayer.videoKVP[e]=window.gptLayer.videoKVP[e]||[],Array.isArray(t)||(t=[t]),t.forEach(t=>{null!=t&&""!==t&&""!==(t=(t=String(t)).replace(/[^\w\s-.:\\/]/gi,""))&&(window.gptLayer.videoKVP[e].includes(t)||window.gptLayer.videoKVP[e].push(t))}),!0))}function dn(e){Object.entries(window.gptLayer.adSlots).forEach(([t,n])=>{n.contentId||(window.gptLayer[t].contentId=e)})}function sn(){window.gptLayer.adScripts.all=window.gptLayer.adScripts.all||{};let e=!0;return Object.values(window.gptLayer.adScripts.all).forEach(t=>{"complete"!==t.status&&(e=!1)}),!0===e&&Y.fire(window,"ad.scripts.complete",{}),e}function ln(e){window.gptLayer.adScripts[e]=window.gptLayer.adScripts[e]||{};let t=!0;if(Object.values(window.gptLayer.adScripts[e]).forEach(e=>{"complete"!==e.status&&(t=!1)}),!0===t){!0===sn()?Y.fire(window,`ad.bidders.complete.${e}`,{}):Y.listen(window,"ad.scripts.complete",()=>{Y.fire(window,`ad.bidders.complete.${e}`,{})},{once:!0})}return t}function cn(e,t){return window.gptLayer.adScripts[e]||Object.keys(window.gptLayer.adScripts).forEach(t=>{t.includes(e)&&(e=t)}),!(!window.gptLayer.adScripts[e]||!window.gptLayer.adScripts[e][t])&&(window.gptLayer.adScripts[e][t].status="complete",P(t,"bid.success",`${t} success`),ln(e),!0)}function pn(e,t){e&&(window.gptLayer.adScripts[e]=window.gptLayer.adScripts[e]||{},window.gptLayer.adScripts[e][t]={}),P(t,"bid.request",`${t} request`)}function gn(){window.gptLayer.kv={},delete window.gptLayer.kv}function un(e,t){window.gptLayer.kv=window.gptLayer.kv||{},delete window.gptLayer.kv[e],t&&mn(e)}function mn(e){window.gptLayer.videoKVP=window.gptLayer.videoKVP||{},delete window.gptLayer.videoKVP[e]}function wn(){let e=$("HRST.article.section.prefix",window,"novalue");const t=$("HRST.article.template",window,""),n=$("HRST.adConfig.settings.forceDNT",window,!1);let i=window.HRST.adConfig.zone.match(/(.*)\//i)[1],o=!("GB"!==we()||!/hdm-/.test(i));return $("HRST.adConfig.disableUkRewrite",window,!1)&&(o=!1),o&&(i=i.replace("hdm-","hdmuk-")),Ue()||n?i+=".dnt":!Ze()&&!0!==$("HRST.adConfig.alwaysARB",window,!1)||o?window.GDPR&&!o&&(i+="HDM"===$("HRST.adConfig.bu",window,"")?".gdpr":""):i+=".mgu",t.match(/homepage/i)&&(e="homepage"),i+=i.match(/\.(gdpr)/i)?"/":`/${e}/`,window.gptLayer.utils.isB2BDemo()&&(i="/36117602/hearst-b2b-website/"),i}function fn(e){const t=[],n=["gpt_outofpage"];for(let i=0;i<e.length;i++){const o=e[i].getSlotElementId();
1n.includes(o)||t.push(o)}return t.sort(),t.join("-")}function yn(e){const t=[[300,50],[300,250],[320,50],[728,90],[970,250]];"d"===J()&&t.push([160,600],[300,600]);const n=JSON.stringify(t),i=[];return e.getSizes().forEach(e=>{if("fluid"!==e){const t=e.getWidth();let o=e.getHeight();o=10*Math.floor(o/10);const a=[t,o],r=JSON.stringify(a);if(n.indexOf(r)>-1)if(i.length>0)for(let e=0;e<i.length&&r!==JSON.stringify(i[e]);e++){i.push(a);break}else i.push(a)}}),i}function hn(e){return!!window.gptLayer.adSlots[e]&&window.gptLayer.adSlots[e].loadGroup}function bn(){const e=window.localStorage.getItem("_pdfps");if(!e)return[];const t=[],n=JSON.parse(e);for(let e=0;e<n.length;e++)-1===t.indexOf(n[e])&&t.push(n[e].toString());return t}function An(){const e=[];return Object.entries(window.gptLayer.adSlots).forEach(([t,n])=>{n.rendered&&e.push(t)}),e}function In(e,t,n){try{const e=window.gptLayer?.slots?.[n]?.getConfig("targeting")?.targeting?.slot,i=Array.isArray(e)?e[0]:e;if(i&&window.HRST?.adConfig?.bidders?.[t]?.[i])return window.HRST.adConfig.bidders[t][i]}catch(e){P("gptFunctions - getSlotPlacement","error",e)}return!1}function vn(e){return!!window.gptLayer.slots[e]&&window.gptLayer.slots[e]}function Sn(e,t){const n=[],i=Rt(),o=xt();return Object.entries(window.gptLayer.adSlots).forEach(([a,r])=>{if(o){if(r.loadGroup===e&&a.includes(i)){const e=vn(a);e&&n.push(e)}}else if(r.loadGroup===e&&r.contentId===t){const e=vn(a);e&&n.push(e)}}),n}function Ln(e){const t=window.gptLayer?.adSlots;if(!t)return[];const n=[];return Object.entries(t).forEach(([t,i])=>{i.defined||i.contentId!==e||/outofpage/.test(t)||n.push(t)}),P("gptFunctions - getUndefinedSlots","contentId",e),P("gptFunctions - getUndefinedSlots","slots",n),n}function Cn(){const e=[],t=[];return Object.entries(window.gptLayer.adSlots).forEach(([n,i])=>{if(i.defined){e.push(i);const o=vn(n);t.push(o)}}),[e,t]}function _n(e,t=["mak","mod"],n=1){return t.includes(e)&&window.gptLayer.videoKVP&&window.gptLayer.videoKVP[e]&&Array.isArray(window.gptLayer.videoKVP[e])&&window.gptLayer.videoKVP[e].length>=n}function kn(){const e=$("HRST.adConfig.zone",window,"");return"string"==typeof e&&e.includes("/")}function Tn(e){Ln(e).forEach(e=>en("collapseadcontainer",e))}function Mn(){const e=window.gptLayer.utils.getParam("token");return/^b2bwebsite_/i.test(e)}function En(){return c.includes(document.location.hostname)}function Dn(...e){const t=window.googletag;return!!t&&e.every(e=>"function"==typeof t[e])}function Pn(e){const t=window.gptLayer;if(!t)return;const n=Ln(e),i="cars-for-sale"===t.template;for(let e=0;e<n.length;e++){const o=n[e];P("gptFunctions - observeAdSlots",`adId: ${o} - smartLoad[${e}]`,n[e]);const a=/gpt_(feed_)?lb_(a|b|[0-9]+(?:_[0-9]+)?|mbox2)|gpt_(feed_)?gal_(a|b|x|faq)/i.test(o),r=!a&&/gpt_(feed_)?gal_(\d+)/i.test(o)&&o?.replace(/^\D+/g,""),d=`gpt_${t.immersiveDivIdLabel}lb_`,s=r&&!n?.includes(`${d}${r}`);if(a||s||"gpt_pairing"===o||i){const e=document.querySelector(`#${o}`);e&&t.viewPortObserver.observe(e)}"gpt_lb_pf"===n[e]&&setTimeout(function(){const e=document.querySelector("#gpt_lb_pf");e&&window.gptLayer&&t.viewPortObserver.observe(e)},3e3),/gpt_film_/i.test(o)&&setTimeout(function(){const e=document.querySelector(`#${o}`);e&&window.gptLayer&&t.viewPortObserver.observe(e)},100)}}function Rn(e){if("all"===e)window.gptLayer.viewPortObserver.disconnect();else{const t=document.querySelector(`#${e}`);t&&(P("gptFunctions - unobserveAdSlot","adSlotId",e),window.gptLayer.viewPortObserver.unobserve(t))}}function On(e){const t=Ln(e);P("gptFunctions - unobserveAdSlotsByContentId","unloadedAds",t),t.forEach(e=>{Rn(e)})}function xn(e){if(window.gptLayer.adSlots[e]){if(P("gptFunctions - purgeAdSlot",`gptLayer.adSlots[${e}]`,window.gptLayer.adSlots[e]),Dn("destroySlots","pubads")){window.gptLayer.adSlots[e].rendered&&googletag.pubads().clear([window.gptLayer.slots[e]]);P("gptFunctions - purgeAdSlot",googletag.destroySlots([window.gptLayer.slots[e]])?`gptLayer.adSlots[${e}] destroyed`:`gptLayer.adSlots[${e}] NOT destroyed`,window.gptLayer.adSlots[e])}else P("gptFunctions - purgeAdSlot",`gptLayer.adSlots[${e}] gpt unavailable - skipped destroySlots`,!0);Rn(e),delete window.gptLayer.slots[e],delete window.gptLayer.adSlots[e]}}function Bn(e){P("gptFunctions - purgeAdSlotsByContentId","contentId",e),Object.entries(window.gptLayer.adSlots).forEac
1h(([t,n])=>{n.contentId===e&&(P("gptFunctions - purgeAdSlotsByContentId","divId",t),xn(t))})}function Nn(e){e instanceof RegExp&&(P("gptFunctions - purgeAdSlotsByDivIdPattern","divIdPattern",e.toString()),Object.entries(window.gptLayer.adSlots).forEach(([t,n])=>{e.test(t)&&(P("gptFunctions - purgeAdSlotsByDivIdPattern","divId",t),n&&xn(t))}))}function Hn(e){P("gptFunctions - purgeAdSlotsByPrefix","prefix",e),Object.entries(window.gptLayer.adSlots).forEach(([t])=>{t.includes(e)&&(P("gptFunctions - purgeAdSlotsByPrefix","divId",t),xn(t))})}function $n(){const e=/^amzn|^hb_/;return window.gptLayer.videoKVP=window.gptLayer.videoKVP||{},Object.keys(window.gptLayer.videoKVP).forEach(t=>{e.test(t)&&delete window.gptLayer.videoKVP[t]}),!0}function Gn(e,t){if(Object.values(window.gptLayer.adScripts).forEach(e=>{e.refresh&&(e.status="")}),void 0!==window.amznA9)try{window.amznA9.run(e,t)}catch(e){}if(void 0!==window.APN)try{window.APN.run(e)}catch(e){}if(void 0!==window.IAS)try{window.IAS.request(window.IAS.make(e))}catch(e){}return!0}function jn(e,t){window.gptLayer.kv=window.gptLayer.kv||{};const n=window.gptLayer.kv[t];return!!n&&(window.gptLayer.kv[t]=n.filter(t=>!t.toString().includes(e)),window.gptLayer.kv[t])}function zn(e,t,n){if(e||t||n)try{const i=document.querySelector(`#${e} div`);i&&(i.style.height=n,i.style.width=t,i.style.display="block");const o=document.querySelector(`#${e} iframe`);o&&(o.style.height=n,o.style.width=t,o.style.display="block")}catch(e){}}function Un(e){return!!window.gptLayer.adScripts.all[e]&&(window.gptLayer.adScripts.all[e].status="complete",P(e,"script.success",`${e} success`),sn(),!0)}function Vn(e){P(e,"script.skip",`${e} skipped`)}function qn(e){window.gptLayer.adScripts.all=window.gptLayer.adScripts.all||{},window.gptLayer.adScripts.all[e]={},P(e,"script.load",`${e} started`)}function Fn(){Object.keys(window.gptLayer.slots).forEach(e=>{if(/^gpt_.*adhesion$/.test(e)){const t=window.gptLayer.slots[e],n=t.getSlotElementId(),i=document.querySelector(`#${n}`).closest(".mobile-adhesion-unit");i&&(i.style.display="none",i.remove()),googletag.destroySlots([t]),delete window.gptLayer.slots[e],delete window.gptLayer.adSlots[e]}})}function Kn(e="mobile_adhesion"){window.gptLayer?.adhesionClosed||(window.gptLayer&&(window.gptLayer.adhesionClosed=!0),window.dispatchEvent(new CustomEvent("ad-adhesion-close",{detail:{primaryUx:e}})))}function Wn(e,t,n){try{const i="autos"===e?5e3:0,o=document.querySelector(`#${t}`),a=o.querySelector("iframe");let r=0;if(a){const e=document.querySelector("main").nextElementSibling,t=e.className;e&&!/adhesion-added/.test(t)&&(e.classList.add("adhesion-added"),r=parseFloat(window.getComputedStyle(e,null).getPropertyValue("padding-bottom")),e.style.paddingBottom=`${r+n}px`);const a=o.closest(".mobile-adhesion-unit");if(a){const t=a.querySelector(".mobile-adhesion-unit-close-button");t&&setTimeout(()=>{t.style.display="block",t.style.visibility="visible",t.addEventListener("click",()=>(Kn(),t&&(t.style.display="none"),e&&(e.style.paddingBottom=`${r}px`),Fn(),!0),{once:!0})},i)}}a&&1!==a.clientHeight||(o.closest(".mobile-adhesion-unit").style.display="none")}catch(e){}}function Yn(){un("permutive");return an("permutive",bn(),!0),!0}function Qn(){Yn(),nn().forEach(({experimentName:e,variantName:t})=>{an("ab",`${e}_${t}`,!0)}),window.googletag.setConfig({targeting:window.gptLayer.kv})}function Zn(e){const t=e.getSlotElementId();if(void 0!==window.amznA9&&void 0!==window.apstag)try{window.apstag.setDisplayBids()}catch(e){}if(void 0!==window.pbjs)try{window.pbjs.setTargetingForGPTAsync([t])}catch(e){}}function Jn(e,t){Array.isArray(e)||(e=[e]),e.forEach(e=>{const n=e.getSlotElementId(),i={};if(window.gptLayer.adSlots?.[n]?.kv&&Object.entries(window.gptLayer.adSlots?.[n]?.kv).forEach(([n,o])=>{if("load"===n)if(t)o="jump",P("moaptAdLoader","defineAdSlots - skipped (jump link)",t);else if(e.getConfig("targeting")?.targeting?.load?.includes("inview"))return;i[n]="slot"===n?Array.isArray(o)?o:[o]:o}),!Dt()){i.adid=n;const t=e.getConfig("targeting").targeting.avb??[];
1if(-1===t.indexOf("inviewrefresh")){const n=window.gptLayer.getAVB(e)||window.gptLayer.getAVBdefault(e);n&&-1===t.indexOf(n)&&t.push(n)}i.avb=t}Object.keys(i).length>0&&e.setConfig({targeting:i}),function(){if(void 0!==window.__iasPET)try{window.__iasPET.setTargetingForGPT()}catch(e){}}(),Zn(e)})}function Xn(e){window.gptLayer.videoBids[e].status="complete",P(e,"videoBid.success",`${e} success`)}function ei(e){window.gptLayer.videoBids[e]={},P(e,"videoBid.load",`${e} started`)}const ti=()=>{let e=window.gptLayer.utils.Cookies.get("gpt_refdomain");if(e)return window.gptLayer.utils.Cookies.set("gpt_refdomain",e,30),e;const t=document.referrer;if(t){if(t.split("/").length>1&&([,,e]=t.split("/"),document.location.hostname===e))return""}else{const t={AppleNews:"apple.news",FB:"www.facebook.com/inapp",GooglePlus:"plus.url.google.com/inapp",Pinterest:"www.pinterest.com/inapp",Twitter:"t.co/inapp",Yahoo:"www.yahoo.com/inapp"},n=Object.entries(t).find(e=>new RegExp(e[0],"i").test(navigator.userAgent));e=n?n[1]:e}return e&&window.gptLayer.utils.Cookies.set("gpt_refdomain",e,30),e};function ni(e){let t=!1;return e.forEach(e=>{e()&&(t=!0)}),t}function ii(e){try{return lt.measure("duration",e)}catch(e){return void P("measureSinceMark","error",e)}}function oi(e,t){try{return t(),!0}catch(t){return P(e,"error",t),!1}}function ai(e,t=[]){Y.listen(window,"cmp.consent.change",()=>{lt.mark("ads-setAdsToggleConsentListener-consent-change");const n=ii("ads-run-consent-set");P("setAdsToggleConsentListener","measure",n),n&&n.duration<1e3?P("setAdsToggleConsentListener","message","duration too short - exit"):ni(t)||(P("setAdsToggleConsentListener","message","continue"),oi("setAdsToggleConsentListener",()=>{window.gptLayer.utils.clearAllKVs(),function(){const[e,t]=Cn();!!(Dn("destroySlots")&&e&&t)&&(window.googletag.destroySlots(t),e?.forEach(e=>{e.defined=!1,e.rendered=!1}))}();e.loadAdsInParallel(!0)}))})}function ri(e,t,n=[]){P("fireInitialConsentAction","initCallback",e),P("fireInitialConsentAction","adsOrAnalyticsCallback",t),P("fireInitialConsentAction","breakConditions",n),oi("fireInitialConsentAction - initCallback",e);const i=()=>oi("fireInitialConsentAction - adsOrAnalyticsCallback",t);if(!ni(n))return window.GDPR?void(!window.GDPR||window.CMP_CONSENT||window.CMP_WITHDRAWN?(P("fireInitialConsentAction","fallback","run callback"),i()):P("fireInitialConsentAction","GDPR","no consent - stop")):(P("fireInitialConsentAction","not GDPR","run callback"),void i())}function di(){let e=[];function t(e,n,i,o=!0){return!0!==e[n]||window.CMP_GPP_OPTOUT||window.CMP_GPC_SET?(o&&Y.listen(window,"cmp.consent.change",()=>(t(e,n,i,!1),!1),{once:!0}),!1):(gptLayer.log("checkVendorConsent","vendor consent",e[n]),i())}function n(e,n){const i=(i,o)=>{if(o&&("tcloaded"===i.eventStatus||"useractioncomplete"===i.eventStatus)){const o=i?.vendor?.consents||{};window.__tcfapi("removeEventListener",2,()=>{},i.listenerId),o&&t(o,e,n)}};window.__tcfapi("ping",2,()=>{window.__tcfapi("addEventListener",2,i)})}window.getCMPConsent=window.getCMPConsent||((t,i,o,a=!0)=>{const r=Ee(),d=Te(),s=()=>{a&&Y.listen(window,"cmp.consent.change",()=>{window.getCMPConsent(t,i,o,!1)},{once:!0})},l=!window.GDPR&&!d&&!r;if(!i)return"function"==typeof o&&o(!!l||window.CMP_CONSENT),s(),!0;switch(t){case"category":try{if(l||window.CMP_CONSENT_GROUPS.indexOf(i)>-1)return gptLayer.log("getCMPConsent",`category '${i}' consent`,!0),o&&o(),!0;s();break}catch(e){return!1}case"vendor":return l?o():(void 0===window.__tcfapi?e.push([i,o]):n(i,o),!0);default:return!1}return!1}),window.GDPR&&function t(){void 0===window.__tcfapi?setTimeout(t,100):e.length&&(e.forEach(e=>{Array.isArray(e)&&n(...e)}),e=[])}()}let si=!1,li=!1,ci=!1,pi=!1,gi=!1;function ui(){si||(si=!0,lt.mark("cmp-script-loaded"),lt.measure("cmp_wrapper_latency",{end:"cmp-script-loaded",start:0}),lt.mark("cmp-initialized"),lt.mark("cmp_initialized"))}function mi(){return void 0!==window.__tcfapi||void 0!==window.__gpp}function wi(e,t){try{lt.measure(e,{start:t})}catch{}}function fi(){li||(li=!0,lt.mark("consent-resolved"),lt.mark("consent_resolved"),wi("cmp_init_to_consent","cmp-initialized"))}function yi({whitelist:e=[],refreshInterval:t=3e4,adhesionRefreshInterval:n=3e4,platform:i=""}){if("d"===gptLayer.breakpoint&&"gallery"===gptLayer.template||"HMIJP"===gptLayer.adConfig.bu&&"m"!==gptLayer.breakpoint||gptLayer.utils.isBot()||/disableAdRefresh/.test(document.location.search))return!1;lt.mark(`${i}-inviewrefresh-start`);const o="autos"===i&&"d"!==gptLayer.breakpoint,a=["gpt_spot_adhesion","gpt_film_adhesion"];return function(){const i={};function r(r){if(gptLayer.noRefresh)return!1;const d=r.getSlotElementId();let s=!1,l=!1,c=t;const p=document.getElementById(d).querySelector("iframe"),g=p.clientHeight,u=p.clientWidth;for(let t=0;t<e.length;t++)e[t][0]===u&&e[t][1]===g&&(s=!0);return("gpt_adhesion"===d||a.includes(d))&&(c=n,s=!0,l=!0),!(!s||gptLayer.noRefresh)&&(i[d]=setTimeout(()=>{"visible"!==document.visibilityState||gptLayer.noRefresh||function(e,t){const n=e.getAdUnitPath(),i=e.getSlotElementId(),a=e.getTargetingMap(),r=e.getSizes(),d=document.querySelector(`#${i}`)?.querySelector("iframe"),s=[];if(!d)return!1;let l=d.clientHeight;const c=d.clientWidth;for(let e=0;e<r.length;e++){let n=!0;if("fluid"!==r[e]||t||(n=!1),o&&("fluid"===r[e]?(s.push(["fluid"]),n=!1):(t=!0,n=!0)),n){const n=r[e].getWidth(),i=r[e].getHeight();(c===n&&l===i||t)&&(s.push([n,i]),970===n&&90===i&&s.push([728,90]))}}0!==s.length&&googletag.cmd.push(()=>{const t=document.querySelector(`#${i}`).parentNode.clientHeight;t>l&&(l=t),"gpt_adhesion"===i&&(l=50),document.querySelector(`#${i}`).parentNode.style.minHeight=`${l}px`,googletag.destroySlots([e]);const o=googletag.defineSlot(n,s,i);gptLayer.slots[i]=o,a.avb="inviewrefresh",a.load="inview",o.setConfig({targeting:a}),o.addService(googletag.pubads()),googletag.display(i),gptLayer.refresh([o],!0)})}(r,l),i[d]=null},c),!0)}function d(e){const t=e.getSlotElementId();clearTimeout(i[t]),i[t]=null}e.push([160,600],[300,50],[320,50],[300,250],[300,400],[300,600],[728,90],[970,90]),googletag.cmd.push(()=>{googletag.pubads().addEventListener("slotVisibilityChanged",e=>{const{slot:t,inViewPercentage:n}=e,o=t.getSlotElementId();n>=50&&!i[o]&&r(t),n<50&&i[o]&&d(t)})}),Y.listen(window,"app.pauseAdRefresh",e=>
1{gptLayer.log("app.pauseAdRefresh","e",e),Object.keys(i).forEach(e=>{clearTimeout(i[e]),i[e]=null})}),Y.listen(window,"app.startAdRefreshTimer",e=>{gptLayer.log("app.startAdRefreshTimer","e",e);const{slotId:t}=e.detail;if(!t)return!1;Object.keys(i).forEach(e=>{e.includes(t)&&(d(gptLayer.slots[e]),r(gptLayer.slots[e]))})}),Y.listen(window,"app.refreshVisibleSlots",()=>{gptLayer.log("app.refreshVisibleSlots","triggered","Forcing visibility recheck"),googletag.cmd.push(()=>{Object.keys(i).forEach(e=>{const t=gptLayer.slots[e];if(!t)return;const n=document.getElementById(e);if(!n)return;const o=n.getBoundingClientRect(),a=window.innerHeight||document.documentElement.clientHeight,s=window.innerWidth||document.documentElement.clientWidth;if(!(o.top<a&&o.bottom>0&&o.left<s&&o.right>0))return;const l=Math.max(o.top,0),c=Math.min(o.bottom,a),p=Math.max(o.left,0),g=Math.min(o.right,s),u=Math.max(0,c-l)*Math.max(0,g-p),m=o.height*o.width,w=m>0?u/m*100:0;w>=50&&!i[e]&&(console.log(`[app.refreshVisibleSlots] Starting timer for slot: ${e}`),r(t)),w<50&&i[e]&&(console.log(`[app.refreshVisibleSlots] Clearing timer for slot: ${e}`),d(t))})})})}(),lt.mark(`${i}-inviewrefresh-end`),!0}function hi(e){return new Promise((t,n)=>{if(!e)return P("hem","getSailthruPromise","skip sync due to a missing sailthru cookie"),t({});if("do-not-track"===e)return P("hem","getSailthruPromise","skip sync due to a GDPR do-not-track signal"),t({});const{isOptOutParameterPresent:i,isOptOutInSailthru:o}=Ai();if(Te()||!i||o)return P("hem","getSailthruPromise","skip sync due to consent signal or gpp opt out"),t({});const a=Ie("GID"),r=Ie("user_email"),d=a||r;if(d)return P("hem","getSailthruPromise",`data is present - ${d}`),t({sha256:d});P("hem","getSailthruPromise","data is not present, get it from sailthru"),function(e){if(window?.Sailthru?.integration)return P("hem","getSailthruEmailHash","sailthru is ready"),bi(e);P("hem","getSailthruEmailHash","sailthru is not ready, please wait"),window.addEventListener("SAILTHRU_LOADED",()=>(P("hem","getSailthruEmailHash","SAILTHRU_LOADED event occurred"),bi(e)))}(t)})}function bi(e){W().then(t=>(P("hem","getSailthruEmailHash - successfully retrieved data",t),e({sha256:t?.emailHash})),()=>(P("hem","getSailthruEmailHash - failed to retrieve data"),e({})))}function Ai(){return{isOptOutInSailthru:"y"===Ie("oo")?.toLowerCase(),isOptOutParameterPresent:Se("oo")}}function Ii(){const e=K(),t=new Promise(e=>{function t(){const t=$("HRST.mylo.email_hash",window,"");return t&&P("hem","getMyloPromise","mylo data is present"),e(t||{})}if("unauthorized"===j.get("mylo_status"))return P("hem","getMyloPromise","visitor is unauthorized"),e({});const{isOptOutParameterPresent:n,isOptOutInSailthru:i}=Ai();return!n||i?(P("hem","getMyloPromise","skip sync due to consent signal or gpp opt out"),e({})):window.HRST.mylo?t():void(window.onMyloReady?window.onMyloReady.push(t):window.onMyloReady=[t])}),n=hi(e);return Promise.allSettled([t,n]).then(e=>{e.forEach(e=>{const t=e?.value?.sha256;t&&window?._ga?.userProps&&!window._ga.userProps.eHsh&&(window._ga.userProps.eHsh=t,window?.gtag("set","user_properties",window?._ga.userProps))})}),[t,n]}function vi(){function e(){P("liveramp","loadATS","liveramp logic is starting");const{geoWhitelist:e,pid:t,wrapper:n}=G("HRST.adConfig.modules.liveramp",window,{geoWhitelist:[],pid:0,wrapper:""});if(!e.includes(gptLayer.utils.getCountry())||!t||!n||G("ADSFREE",window,"")||kt())return P("liveramp","loadATS","early return"),!1;const i=[],o=e=>{const t={id:Object.values(e),placementID:13603,type:"emailHashes"};window?.atsenvelopemodule?.setAdditionalData(t),P("liveramp","sendATSData","data sync is done")};const[a,r]=Ii();[a,r].forEach(e=>{e.then(e=>Object.keys(e||{})?.length?(P("liveramp","loadATS - a data requirement has been resolved",e),function(e){if(void 0!==window?.atsenvelopemodule?.setAdditionalData)return P("liveramp","initLiveRamp","LiveRamp already initialized, not initializing again"),void o(e);i.push(e),window.addEventListener("envelopeModuleReady",()=>{P("liveramp","initLiveRamp","LiveRamp finished initializing"),i.forEac
1h(e=>{o(e),i.shift()})},{once:!0})}(e),!1):(P("liveramp","loadATS - data was not returned"),!1)).catch(()=>{})}),P("liveramp","loading Liveramp script");const d=`https://launchpad-wrapper.privacymanager.io/${n}/launchpad-liveramp.js`;return gptLayer.utils.loadScriptCallback(d),!0}window.getCMPConsent("vendor",97,()=>{e()})}const Si=["AF","AL","DZ","AS","AD","AO","AI","AQ","AG","AM","AW","AZ","BH","BD","BB","BY","BZ","BJ","BM","BT","BO","BA","BW","BR","IO","VG","BN","BG","BF","BI","CV","KH","CM","BQ","KY","CF","TD","CN","CC","KM","CK","CI","HR","CW","CY","CZ","CD","DJ","DM","DO","EG","SV","GQ","ER","EE","SZ","ET","FK","FO","FJ","FI","GF","PF","GA","GE","GH","GI","GR","GL","GD","GP","GU","GT","GG","GN","GW","GY","HT","HN","HU","IS","ID","IQ","IM","IL","JM","JE","JO","KZ","KE","KI","XK","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MG","MW","MV","ML","MT","MH","MQ","MR","MU","YT","FM","MD","MC","MN","ME","MS","MA","MZ","MM","NA","NR","NP","NC","NI","NE","NG","NU","NF","MK","MP","OM","PK","PW","PS","PA","PG","PY","PN","QA","CG","RE","RW","BL","SH","KN","LC","MF","PM","VC","WS","SM","ST","SN","RS","SC","SL","SX","SK","SI","SB","SO","SS","LK","SD","SR","SJ","TJ","TZ","BS","GM","TL","TG","TO","TT","TN","TR","TM","TC","TV","VI","UG","UA","UY","UZ","VU","VE","VN","WF","EH","YE","ZM","ZW"],Li=e=>e&&Si.includes(e);function Ci(){window.getCMPConsent("vendor",815,()=>{(()=>{const e=$("HRST.adConfig.modules.blockthrough.id",window,"");!!e&&("videohub"!==$("HRST.article.template",window,"")&&("d"===J()&&(!window.GDPR&&!Li(we())&&(performance.mark("BT loader - start"),dt(`https://btloader.com/tag?o=${e}&upapi=true`,()=>{performance.mark("BT loader - end")})))))})()})}function _i(e,t){lt.mark("brandmetrics-start"),window._brandmetrics=window._brandmetrics||[];dt(`https://cdn.brandmetrics.com/tag/${e}/${t}.js`,()=>{lt.mark("brandmetrics-end"),"longform-article"===$("HRST.article.display",window,"")||At()||Ye()||function(){const{adRequestSlotTrigger:e,noFlyAdvertisers:t}=p,n=[];function i(o){const{advertiserId:a,id:r}=o.detail;
1if(n.push(a),e.includes(r)){t.some(e=>n.includes(e))||window._brandmetrics.push({cmd:"_loadsurvey"}),window.removeEventListener("adRendered",i)}}window.addEventListener("adRendered",i)}()})}function ki(){if(kt()||Ze()||Je())return!1;const e=$("HRST.adConfig.modules.brandMetrics.accountId",window,""),t=$("HRST.adConfig.modules.brandMetrics.siteId",window,"");return!!(function(){const{geoWhitelist:e}=p,t=we(),n=$("HRST.adConfig.bu",window,"");return Boolean(e[n]?.includes(t))}()&&e&&t)&&(gptLayer.log("brandMetrics","loadBrandMetrics - start",`accountId - ${e}, siteId - ${t}`),window.getCMPConsent("vendor","422",()=>{_i(e,t)}),!0)}function Ti(e,t,n){if(!window.JOURNEY_INFO)return an("has","jam_na"),e(n),!0;const i=(i,o)=>{"full"===i?Tn(n):"partial"===i?t&&t(n):(an("has",`jam_${o}`),e(n))};if("completed"===window.JOURNEY_INFO.status)return i(window.JOURNEY_INFO.blocked,0),!0;const o=Date.now();let a;const r=({detail:{blocked:e}})=>{Y.remove(window,"journey-info",r),clearTimeout(a);const t=100*Math.ceil((Date.now()-o)/100);i(e,t)};return Y.listen(window,"journey-info",r),a=setTimeout(()=>{r({detail:{blocked:!1}}),Y.fire(window,"journey-timeout"),window.JOURNEY_INFO.ads=!0},1500),!0}const Mi=[["947161027","105347698","391176308","919547501"],["128670566","816180195","517595932","806040764"],["948674624","295376760","284223216","722560870"],["271103616","694157744","569403475","128970229"],["011753838","757946102","409822443","777326280"],["271711147","816756097","056788288","261683045"],["584097080","250727962","586732585","690341757"]],Ei=["fr","ias-kw"];function Di(){!0===window.getCMPConsent("category","C0003")&&function(){const e=G("HRST.adConfig.modules.ias.pubId",window,"");if(P("IAS","Integral Ad Science - pubId",e),!e)return!1;const t=G("HRST.adConfig.modules.ias.geoWhitelist",window,[]);if(t.length>0){const e=we();if(!t.includes(e))return!1}lt.mark("ias-start"),"HMIIT"===$("gptLayer.adConfig.bu",window,"")&&qn("IAS"),window.__iasPET=window.__iasPET||{},window.__iasPET.queue=window.__iasPET.queue||[],window.__iasPET.pubId=e,window.IAS={callback:()=>{try{window.__iasPET.setTargetingForGPT();const e=window.googletag.getConfig("targeting")?.targeting||{};Ei.forEach(t=>{const n=e[t];n&&rn(t,n)});const t=e["ias-kw"]||[];if(t.includes("IAS_SET")&&!t.includes("IAS_UNSCORED_PG")){const{isSafe:e,isVerySafe:n}=function(e){let t=!0,n=!0;return e.forEach(e=>{const i=e.replace(/^IAS_|_PG$/g,"");Mi.forEach(e=>{e.slice(1).includes(i)&&(t=!1),e.includes(i)&&(n=!1)})}),{isSafe:t,isVerySafe:n}}(t);e&&an("has","ias_safe",!0),n&&an("has","ias_safe_verylow",!0)}Un("IAS")}catch(e){}},make:e=>{const t=[];return Object.values(e).forEach(e=>{const n=e.getSizes().map(e=>e.getWidth&&e.getHeight?[e.getWidth(),e.getHeight()]:[1,1]);t.push({adSlotId:e.getSlotElementId(),adUnitPath:e.getAdUnitPath(),size:n})}),t},request:e=>{window.__iasPET.queue.push({adSlots:e,dataHandler:window.IAS.callback})}},dt("https://cdn.adsafeprotected.com/iasPET.1.js",()=>{lt.mark("ias-end")})}()}let Pi=!1;function Ri(){if(kt())return!1;const e=function(){if(!Pi||!["ES","IT","NL"].includes(we()))return!1;const e=G("HRST.adConfig.modules.marfeel.accountId",window,!1);return!!e&&(window.marfeel=window.marfeel||{cmd:[]},e)}();if(gptLayer.log("marfeel","load - hasMarfeel",e),!e)return!1;function t(e,t){const n=document.createElement("script");n.src=e,t?n.type="module":(n.async=!0,n.type="text/javascript",n.setAttribute("nomodule",""));const i=document.getElementsByTagName("script")[0];i.parentNode.insertBefore(n,i)}lt.mark("marfeel-start");const n={adsTrackingFromClient:!0},i=window.location.hostname.startsWith("www")?window.location.hostname.replace(/(www-stage)|(www)/,""):"";return i&&(n.cookieDomain=i),function(e,n,i){!function(e,n,i){e.marfeel=e.marfeel||{},e.marfeel.cmd=e.marfeel.cmd||[],e.marfeel.config=i,e.marfeel.config.accountId=n;const o="https://sdk.mrf.io/statics";t(`${o}/marfeel-sdk.js?id=${n}`,!0),t(`${o}/marfeel-sdk.es5.js?id=${n}`,!1)}(e,n,i),lt.mark("marfeel-end")}(window,e,n),!0}const Oi=e=>{let t=window.HRST;e&&window.HRST?.[e]&&(t=window.HRST[e]);const n=$("article",t,{});let i;if("collection"===$("HRST.landing.type",window,""))i=$("HRST.landing.value.url",window,ye());else if("object"==typeof n.collection){const e=[];for(let t=0;t<n.collection.length;t++)e.push(n.collection[t].url);e.length>0&&(i=e)}else i=n.collection;return i},xi=/^video_\d+:\d+$/;const Bi=e=>{if("string"!=typeof e)return;const t=`video_${e.trim().replace(/x/gi,":")}`;xi.test(t)&&(window.gptLayer.videoKVP?.has&&(window.gptLayer.videoKVP.has=window.gptLayer.videoKVP.has.filter(e=>!xi.test(e))),rn("has",t))};function Ni(){const{pubId:e}=G("HRST.adConfig.modules.optout",window,{});if(!window.CMP_WITHDRAWN||!e)return!1;lt.mark("optout-start"),window.ootag=window.ootag||{},window.ootag.queue=window.ootag.queue||[],window.ootag.queue.push(function(){window.ootag.initializeOo({consentTimeOutMS:500,noRequestsOnPageLoad:1,onlyNoConsent:1,publisher:e})}
1),window.ootag.queue.push(function(){const e=G("HRST.article.id",window,""),t=Oi()?.join(","),n=G("HRST.article.section.prefix",window,""),i=G("HRST.article.subSection.prefix",window,"");e&&window.ootag.addParameter("artid",e),t&&window.ootag.addParameter("clc",t),n&&window.ootag.addParameter("sect",n),i&&window.ootag.addParameter("sub",i)});const t=G("HRST.adConfig.site",window,"");function n(){const e=Object.keys(gptLayer.adSlots).filter(e=>(e.startsWith("gpt_gal")||e.startsWith("gpt_lb"))&&!gptLayer.adSlots[e].optOutDefined);if(0===e.length)return!1;e.forEach(e=>{window.ootag.queue.push(function(){window.ootag.defineSlot({adSlot:`${t}_${e}`,emptyCallback:e=>{!function(e){const t=e.targetId,n=gptLayer.adSlots[t];if(!n)return!1;const{contentId:i}=n;gptLayer.callAdSlotsById(t,i)}(e)},id:e,targetId:e})}),gptLayer.adSlots[e].optOutDefined=!0}),window.ootag.queue.push(function(){window.ootag.refreshSpecificSlots(e)})}return dt("https://cdn.optoutadvertising.com/script/ootag.v2.min.js",()=>{n(),lt.mark("optout-end")}),Y.listen(window,"app.adApiUpdate",n),!0}function Hi(){const e={geoWhitelist:{US:["AT","AU","BE","BG","CA","CH","CZ","DK","DE","EE","IE","EL","ES","FR","GB","HR","IS","IT","CY","LI","LT","LU","LV","HU","MT","NL","NO","PL","PT","RO","SI","SK","FI","SE","US","UK"]},getDate(e){if(!e.year)return null;const t=`00${e.month}`.slice(-2),n=`00${e.day}`.slice(-2),i=`00${e.hour}`.slice(-2),o=`00${e.minute}`.slice(-2);return`${e.year}-${t}-${n}T${i}:${o}:00-05:00`},getMeta(e){const t=document.querySelector(`meta[name="${e}"]`);return t?t.getAttribute("content"):null},projectId:"0272ac85-5199-4024-a555-397c3d825d95"};if(kt())return!1;const t=G("HRST.adConfig.modules.permutive.geoWhitelist",window,null);if(t){const n=we();if(n&&-1===e.geoWhitelist[t].indexOf(n))return!1}const{apiKey:n,workspaceId:i}=G("HRST.adConfig.modules.permutive",window,{}),{projectId:o}=e;if(!i)return!1;lt.mark("permutive-start"),P("permutive","permutive - init"),function(e,t){if(!e){e=e||{},window.permutive=e,e.q=[],e.config={}||{},e.config.apiKey=t,e.config.environment=e.config.environment||"production";for(let t=["addon","identify","track","trigger","query","segment","segments","ready","on","once","user","consent"],n=0;n<t.length;n++){const i=t[n];e[i]=function(t){return function(){const n=Array.prototype.slice.call(arguments,0);e.q.push({functionName:t,arguments:n})}}(i)}}}(window.permutive,n);const a=[],r=j.get("_HFID");r&&a.push({id:r,priority:0,tag:"HDMUserId"});const d=j.get("_perhip");d&&a.push({id:d,priority:1,tag:"HDMIR"}),a.length>0&&window.permutive.identify(a);let s=G("jamData.site",window,null);s=null!==s?s.split(".")[2]:null;let l=G("jamData.year",window,null);l=null!==l?parseInt(l,10):null;const c=G("HRST.article.template",window,"");let p=H();function g(e){let t=0,n=e.match(/(\d*)D/),i=e.match(/(\d*)H/),o=e.match(/(\d*)M/);return n&&(t+=1440*parseInt(n[1],10)),i&&(t+=60*parseInt(i[1],10)),o&&(t+=parseInt(o[1],10)),t>0?t:null}function u(){if("recipe"!==c||!p.recipeYield)return null;let e=parseInt(p.recipeYield,10);return isNaN(e)?null:e}function m(){return"recipe"===c&&p.prepTime?g(p.prepTime):null}function w(){return"recipe"===c&&p.totalTime?g(p.totalTime):null}function f(){if("recipe"!==c||!p.recipeIngredient)return null;let e=[];for(let t=0;t<p.recipeIngredient.length;t++){let n=p.recipeIngredient[t].match(/<p>(.*)<\/p>/);n?e.push(n[1]):e.push(p.recipeIngredient[t])}return e.length>0?e:null}function y(){if("recipe"!==c)return null;let e=[];if(p.recipeCategory)for(let t=0;t<p.recipeCategory.length;t++)e.push(p.recipeCategory[t]);if(p.recipeInstructions){const t=["air fryer","instant pot","pressure cooker","food processor","slow cooker","crock pot","rice cooker","stand mixer","hand mixer","blender","immersion blender","grill","ice cream maker","microwave","waffle iron","waffle maker","coffee maker","toaster"];for(let n=0;n<t.length;n++){RegExp(t[n],"i").test(p.recipeInstructions)&&e.push(t[n])}}return e.length>0?e:null}function h(e){const t=G(`${e?`HRST.${e}`:"HRST"}.article.contextualTags.verity.iab.v3`,window,null);if(!t)return null;try{const e=[];for(let n of t){let t=`${n.category}`,i=n.parent;for(;i;)t=`${i.category}|${t}`,i=i.parent;e.push(t)}return function(e){const t=[];e.sort();for(let n of e){let i=!1;for(let t of e)if(n!==t&&t.includes(n)){i=!0;break}i||t.push(n)}for(let e=0;e<t.length;e++){let n=t[e].split("|");n[0]=`par:${n[0]||"null"}`,n[1]=`chi:${n[1]||"null"}`,n[2]=`grc:${n[2]||"null"}`,n[3]=`ggc:${n[3]||"null"}`,t[e]=n.join("|")}return t.join("|-|")}(e)}catch(e){P("verity","data - error",e)}}function b(e){let t=G(`${e?`HRST.${e}`:"HRST"}.article.contextualTags.verity.keywords`,window,null);return t?(Array.isArray(t)||(t=Object.values(t)),t.join("|")):null}const A={};function I(t){const n=t?`HRST.${t}`:"HRST";for(const e of Object.keys(A))delete A[e];const i=G(`${n}.article.author.name`,window,null),o=G(`${n}.article.section.name`,window,null);let a=G(`${n}.article.themes`,window,[]),r=e.getMeta("keywords");r&&(r=r.replace(", ",","),a=a.concat(r.split(",")));const d=function(){const e=[];
1if("collection"===G(`${n}.landing.type`,window,"")){const t=document.location.pathname.split("/")[document.location.pathname.split("/").length-2];e.push(G("HRST.landing.value.url",window,t))}else{const t=G(`${n}.article.collection`,window,[]);for(let n=0;n<t.length;n++)e.push(t[n].url)}return e}();Object.assign(A,{article:{authors:i?[i]:null,clc:d.length>0?d:null,description:e.getMeta("description"),gumgum:{category:h(t),keywords:b(t)},id:G(`${n}.article.id`,window,null),keywords:a.length>0?a:null,publishedAt:e.getDate(G(`${n}.article.publishDate`,window,{})),sections:o?[o]:null,subsection:G(`${n}.article.subSection.name`,window,null),title:G(`${n}.article.title`,window,null)},autos:{bodyStyle:G("jamData.type",window,null),fuelType:G("jamData.fuel",window,null),make:G("jamData.make",window,null),model:G("jamData.model",window,null),purchaseType:s,year:l},contentId:G(`${n}.metadata.contentId`,window,null),product:{ptx:G(`${n}.article.contextualTags.ptx`,window,null)},recipe:{category:y(),ingredients:f(),prepTime:m(),servingSize:u(),totalTime:w()},type:G(`${n}.article.template`,window,null)})}function v(){!function(e,t){const n="https://api.permutive.com/ctx/v1/segment?k="+e,i=new window.XMLHttpRequest;i.open("POST",n,!0),i.onreadystatechange=function(){if(4===i.readyState&&200===i.status){let e;try{e=JSON.parse(i.responseText)}catch(e){return}window.permutive.addon("contextual",e);const t=e.gam||[];t.push("rts"),un("prmtvctx",!0),an("prmtvctx",t,!0)}},i.send(JSON.stringify({pageProperties:function(e){try{const t={client:{domain:window.location.hostname,referrer:document.referrer,title:document.title,type:"web",url:document.URL,user_agent:navigator.userAgent}};return"object"!=typeof e||Array.isArray(e)?t:Object.assign({},e,t)}catch(e){return{}}}(t),url:document.URL}))}(n,A),window.permutive.addon("web",{page:A})}function S(){return window.permutive.track("GroceryOrderButton",{article:{authors:$("article.authors",A,null),clc:$("article.clc",A,null),description:$("article.description",A,null),id:$("article.id",A,null),keywords:$("article.keywords",A,null),publishedAt:$("article.publishedAt",A,null),sections:$("article.sections",A,null),subsection:$("article.subsection",A,null),title:$("article.title",A,null)},recipe:{category:y(),ingredients:f(),prepTime:m(),servingSize:u(),totalTime:w()},type:$("type",A,null)}),!0}function L(e){e||(e=document.querySelector(".chicory-button-container button")),e&&e.addEventListener("click",S)}I(),vt()||v(),Y.listen(window,"fre-send-event",e=>{const{detail:{eventType:t,id:n,wasUrlOverride:i}}=e;"immersive_article_open"===t&&(I(n),v()),"immersive_article_close"===t&&i&&(I(),v())}),Y.listen(window,"cmp.consent.submit",()=>{window.permutive.track("OptOut",{client:{domain:document.location.hostname.replace("www.","")},optOut:!0},{error:e=>{P("permutive","consent submit error - ",e)},success:e=>{window.permutive.consent({opt_in:!1}),P("permutive","consent submit success",e)}})}),dt(`https://${o}.edge.permutive.app/${i}-web.js`),document.querySelector("body").addEventListener("click",e=>{const t=e.target.closest("a");t&&t.matches("a.product-btn-link, a.product-image-link, .product-links")&&function(e){const t=e.getAttribute("data-product-url")||e.getAttribute("data-vars-ga-outbound-link")||e.getAttribute("data-href")||null,
1n=new URL(t).host,i=e.getAttribute("data-vars-ga-product-id")||null,o=e.getAttribute("data-vars-ga-product-brand")||e.getAttribute("data-brand")||e.getAttribute("data-vars-ga-product-sem3-brand")||null,a=e.getAttribute("data-category")||e.getAttribute("data-vars-ga-product-sem3-category")||"";let r=e.getAttribute("data-price")||e.getAttribute("data-vars-ga-product-price")||null;const d=G("HRST.adConfig.modules.permutive.currency",window,"");r&&(r=r.match(/[\d,.]+/i)?r.match(/[\d,.]+/i)[0]:r,/,/.test(r)&&!/\./.test(r)&&(r=r.replace(",",".")),r=parseFloat(r)),window.permutive.track("AffiliateLinkClick",{affiliate:n,article:{sections:$("article.sections",A,null),subsection:$("article.subsection",A,null),title:$("article.title",A,null)},href:t,product:{brand:o,categories:[a],id:i,price:{currency:d,value:r},ptx:$("product.ptx",A,null)},type:$("type",A,null)})}(t)});const C=document.querySelector(".chicory-button-container button");return C?L(C):window.addEventListener("chicoryLoaded",()=>{L()}),Fe(["caranddriver"])&&function(){const e="shoppingTools.0441002";function t(){const t=JSON.parse(localStorage.getItem(e)??"false");if(!t)return!1;const n=t?.page?.describeYourVehicle?.data?.[0];if(!n)return!1;return{tradeId:t.leadID,...n}}Y.listen(window,"app.tradeintool-submit",n=>{const{pageName:i}=n.detail;"describeYourVehicle"===i&&setTimeout(()=>{const{make:e,mileage:n,model:i,series:o,style:a,tradeId:r,year:d,zip:s}=t();window.permutive.track("CarTradeEvent1",{autos:{make:e||null,mileage:parseInt(n,10)||null,model:i||null,modelSeries:o||null,modelStyle:a||null,tradeID:r||null,year:parseInt(d,10)||null,zip:s||null}})},1e3),"yourInfo"===i&&setTimeout(()=>{const{futureMake:n,futureModel:i,purchaseType:o}=function(){const t=JSON.parse(localStorage.getItem(e)??"false");if(!t)return!1;const n=t?.page?.resultsPage?.data?.[0]?.vehicleOfInterest;if(!n)return!1;const{make:i,model:o,carType:a}=n;return{futureMake:i,futureModel:o,purchaseType:a}}(),{make:a,mileage:r,model:d,series:s,style:l,tradeId:c,year:p,zip:g}=t();window.permutive.track("CarTradeEvent2",{autos:{futureCar:{make:n||null,model:i||null,purchaseType:o||null},make:a||null,mileage:parseInt(r,10)||null,model:d||null,modelSeries:s||null,modelStyle:l||null,tradeID:c||null,year:parseInt(p,10)||null,zip:g||null}})},3e3)})}(),lt.mark("permutive-end"),!0}function $i(){window.getCMPConsent("vendor","412",function(){const e=G("HRST.adConfig.modules.piano.queryId",window,null),t=G("HRST.adConfig.modules.piano.js",window,"");if(!t||kt())return!1;lt.mark("piano-dmp-start"),window.cX=window.cX||{},window.cX.callQueue=window.cX.callQueue||[],window.cX.options=window.cX.options||{},window.cX.options.campaignReporting=!0;const n=`https://csm.cxpublic.com/${t}.js`,i="cxSegments";function o(){const e=function(){let e=[];return"object"==typeof window.localStorage&&"function"==typeof window.localStorage.getItem&&null!==localStorage.getItem(i)&&localStorage.getItem(i).length>0&&(e=localStorage.getItem(i).split(",")),e}();e.length>0&&gptLayer.utils.addKV("cxsegments",e,!0)}return window.cX.callQueue.push(["getUserSegmentIds",{callback:e=>{e&&"object"==typeof window.localStorage&&"function"==typeof window.localStorage.getItem&&localStorage.setItem(i,e.join(",")),o(),lt.mark("piano-dmp-end")},persistedQueryId:e}]),dt(n),!0})}const{AD_BUNDLE_PATH:Gi,AD_BUNDLE_VERSION:ji,BIDDER_HOST_LOCAL:zi}={ACTIONIQ_ANALYTICS_VERSION:"3.1.0",AD_BUNDLE_PATH:"2.491.0",AD_BUNDLE_VERSION:"2.491.0",BIDDER_HOST:"https://static-assets.hearstapps.com",BIDDER_HOST_LOCAL:"http://127.0.0.1:8080/",BIDDER_PREBID_VERSION_AUTOS:"10.29.1",BIDDER_PREBID_VERSION_AUTOS_BETA:"10.29.1",BIDDER_PREBID_VERSION_HDM:"10.29.1",BIDDER_PREBID_VERSION_HDM_BETA:"10.29.1"},Ui=()=>"dev"===ji?`${zi}${Gi}/`:`/_assets/moapt/${Gi}/`,{BIDDER_PREBID_VERSION_AUTOS:Vi,BIDDER_PREBID_VERSION_AUTOS_BETA:qi,BIDDER_PREBID_VERSION_HDM:Fi,BIDDER_PREBID_VERSION_HDM_BETA:Ki}={ACTIONIQ_ANALYTICS_VERSION:"3.1.0",AD_BUNDLE_PATH:"2.491.0",AD_BUNDLE_VERSION:"2.491.0",BIDDER_HOST:"https://static-assets.hearstapps.com",BIDDER_HOST_LOCAL:"http://127.0.0.1:8080/",BIDDER_PREBID_VERSION_AUTOS:"10.29.1",BIDDER_PREBID_VERSION_AUTOS_BETA:"10.29.1",BIDDER_PREBID_VERSION_HDM:"10.29.1",BIDDER_PREBID_VERSION_HDM_BETA:"10.29.1"};e.p=Ui();function Wi(){window.getCMPConsent("category","C0004",()=>{if(!fe())return!1;const e=$("HRST.adConfig.modules.transunion.key",window,"");if(!e)return!1;let t;const n=`https://fid.agkn.com/f?apiKey=${e}`;!async function(){const[e,i]=Ii(),o=await(a=function(e){return new Promise(t=>{let n=e.length,i=!1;const o=e=>{if(e&&!i)return i=!0,void t(e);n-=1,i||0!==n||t("")};
1e.forEach(e=>e.then(e=>o(e?.sha256)).catch(()=>o("")))})}([e,i]),r=2e3,d="",Promise.race([a,new Promise(e=>{setTimeout(()=>e(d),r)})]));var a,r,d;const s=o?`${n}&e=${encodeURIComponent(o)}`:n,l=await fetch(s,{headers:{Accept:"application/json"},method:"GET"});t=await l.json(),performance.mark("Transunion - end"),window.optable=window.optable||{cmd:[]},window.optable.cmd.push(()=>window.optable.resolveTU(t))}()})}const Yi=B(function(){return(HRST?.article?.contextualTags?.verity?.iab?.v3||[]).map(e=>e?.id).filter(e=>e&&!g.includes(e))});function Qi(){const e=Fe(d)?"autos":"hdm";if(Li(we()))return void P("moaptAdBidders","prebid was disabled due to location",gptLayer);lt.mark(`${e}-bidder-amazon-start`),P("moaptAdBidders","started",gptLayer);let t=window.HRST?.immersiveContentId,n=window.HRST[t];t||(t=$("HRST.metadata.contentId",window,"no-id"),n=window.HRST);const i=$("gptLayer.adConfig.bidders.AMZN",window,!1),o=$("gptLayer.adConfig.bidders.AMZNNCA",window,!1);window.getCMPConsent("vendor",793,function(){if(!i||We()||gptLayer.ab.noBid||a.includes(t))return;!function(){if(o&&et()){const e=((e=i)=>{window._aps||(window._aps=new Map),window._aps.has(e)||window._aps.set(e,{queue:[],store:new Map([["listeners",new Map]])});let t={accountID:e,react:function(e,t){window._aps.get(this.accountID).store.get("listeners").set(e,t),this.record("bootstrap/react/didExecute",{name:e})},read:function(e){return this.record("bootstrap/store/willRead",{name:e}),window._aps.get(this.accountID).store.get(e)},record:function(e,t){return new Promise((n,i)=>{window._aps.get(this.accountID).queue.push(new CustomEvent(e,{detail:{...t,reject:i,resolve:n}}))})},run:function(e,t){window._aps.get("_system")?.store.get("listeners").has(e)?this.record(e,t):this.record("bootstrap/run/willDrop",{detail:t,name:e})}};return t.record("bootstrap/version/declare",{version:5}),t})();((t=e)=>{window.apstag=window.apstag||{dpa:function(e){t.record("legacy/dpa/enqueue",{callback:e})},fetchBids:function(e,n){t.record("legacy/fetchBids/enqueue",{bidConfig:e,callback:n})},init:function(e,n){t.record("legacy/init/enqueue",{callback:n,config:e})},rpa:function(e,n,i){t.record("legacy/rpa/enqueue",{callback:n,setCookie:i,tokenConfig:e})},setDisplayBids:function(){t.run("legacy/setDisplayBids/enqueue",{arguments})},targetingKeys:function(){return t.read("legacy/targetingKeys")??[]},upa:function(e,n,i){t.record("legacy/upa/enqueue",{callback:n,setCookie:i,tokenConfig:e})}},t.record("bootstrapExtAPStag/version/declare",{version:1})})(),((t=e)=>{window.apstag={...window.apstag,queue:{push:function(e){t.record("legacy/queue/push",{callback:e})}}},t.record("bootstrapExtQueue/version/declare",{version:1})})(),((t=e)=>{window.apstag={...window.apstag,nativeContent:function(){return{enable:function(){t.record("nativeCommerceAds/service/enable")},registerHook:function(e,n){if("nativeCommerceAds.updateClickUrl"!==e)throw new Error("Unsupported event type");t.react("nativeCommerceAds/clickUrl/update",e=>({status:"completed",value:{url:n(e?.detail?.url,e?.detail?.element)}}))}}}},t.record("bootstrapExtNCA/version/declare",{version:1})})()}else{if(window.apstag)return!1;function t(e,t){window.apstag._Q.push([e,t])}window.apstag={_Q:[],fetchBids(...e){t("f",e)},init(...e){t("i",e)},setDisplayBids(){}}}}();const e=Yi(),r=e.map(e=>({id:e})),d=$("article.section.prefix",n,""),s=$("article.subSection.prefix",n,""),l=$("article.adCategory.prefix",n,""),c=me(),p={};d&&(p.section=d),s&&(p["sub-section"]=s),l&&(p.category=l),c.length>0&&(p.hctx=c),apstag.init({adServer:"googletag",deals:!0,params:{si_section:$("article.section.name",n,"")},pubID:i,signals:{ortb2:{site:{cat:e,cattax:7,content:{data:[{ext:{segtax:7},name:"verity",segment:r}]},page:!1,pagecat:e,sectioncat:e,...Object.keys(p).length&&{ext:{data:p}},...o&&et()&&{page:document.location.origin+document.location.pathname,publisher:{id:o}}}}},videoAdServer:"googletag"});const g={buildConfig:e=>{g.config=[];for(let t=0;t<e.length;t++){const n=e[t].getSlotElementId(),i=yn(e[t]);0!==i.length&&g.config.push({sizes:i,slotID:n,slotName:vn(n).getAdUnitPath()})}},getVideoBids:e=>{apstag.fetchBids({slots:[{mediaType:"video",slotID:"videoSlot"}],timeout:e},e=>
1{e.forEach(e=>{e.helpers.targetingKeys.forEach(t=>{rn(t,e.targeting[t])})}),Xn("AMZN")})},handleBids:e=>{un("amznbid"),e.forEach(e=>{g.bids[e.slotID]={},e.helpers.targetingKeys.forEach(t=>{g.bids[e.slotID][t]=e.targeting[t]})})},run:(e,t)=>(pn(fn(e),"AMZN"),un("amznbid"),g.buildConfig(e),g.bids=g.bids||{},"gallery"===$("article.template",n,"")&&"d"===gptLayer.breakpoint&&(g.bids={}),0!==g.config.length&&(apstag.fetchBids({slots:g.config,timeout:t},e=>{let t=[];for(let n=0;n<e.length;n++)t.push(e[n].slotID);t.sort(),t=t.join("-"),g.handleBids(e),cn(t,"AMZN")}),!0))};window.amznA9=g}),lt.mark(`${e}-bidder-amazon-end`)}const Zi=(e,t)=>{const n=$("HRST.adConfig.adNetwork",window,"");if(!n)return!1;let i=n;const o=$("HRST.landing.type",window,""),a=U("article.template",""),r=U("article.tags",[]),d=U("datalayer.automotive.tagsets",[]);let s=J();const l=V(a,o),c=!!o||l;s="t"===s?"m":s;const p="d"===s?"dfp":"mob",g=$("jamData.isCPO",window,!1),u=$("jamData.isRecall",window,!1),m=Ji(e)||!c&&!$("jamData.make",window,"")&&!$("jamData.model",window,"")&&!/^(compare-template|compare|trims)$/.test(a),w="gallery"===a||Xi()||"vehicle-gallery"===a,f=/homepage/i.test(a),y=r.includes("parts-accessories"),h=eo(t)||!y&&0===d.length,b="cars-for-sale"===a;w&&(i+="gallery.");const A=[{when:f,suffix:"home."},{when:y,suffix:"aftermarket."},{when:g,suffix:"cpo."},{when:b,suffix:b&&"new-cars"===$("HRST.article.display",window,"")?"new.":"used."},{when:u,suffix:"enth."},{when:m,suffix:"enth."},{when:h,suffix:"new."}].find(e=>e.when);return i+=A?A.suffix:"used.",i+=p,Ze()&&!Ue()&&(i=`${n}${p}.mgu`),Ue()?(i=`${i}.dnt`,i):window.GDPR?n+"gdpr":i},Ji=e=>{const t=e||$("jamData.make",window,"");return["astonmartin","bentley","bugatti","caterham","ferrari","koenigsegg","lamborghini","lotus","maybach","mclaren","morgan","pagani","rinspeed","rollsroyce","spyker"].indexOf(t)>-1},Xi=()=>{const e=$("HRST.article.section.prefix",window,""),t=$("HRST.article.metadata.listicleAdCadence",window,"");let n=!1;return(!At()&&"photos"===e||q(t)&&"0"!==t)&&(n="gallery"),n},eo=e=>{if(e){return e-(new Date).getFullYear()>-2}return!0===$("jamData.isNew",window,"")||!$("jamData.year",window,"")};function to(e){const t=e.getConfig("targeting").targeting;return t?.load?.includes("inview")?"refresh_":""}function no(e){return{id:e.getSlotElementId(),refreshPrefix:to(e)}}function io(e){const{adUnitCodes:t,auctionEnd:n,timestamp:i}=e||{};if(!Array.isArray(t)||!n||!i)return;const o=Math.max(0,i-performance.timeOrigin),a=n-i;t.forEach(e=>{const t=vn(e),n=t?to(t):"";performance.measure(`prebid_auction_duration_${n}${e}`,{duration:a,start:o})})}function oo(e,t=!1){performance.mark(`gam_request_${t?"refresh_":""}${e}`),t||gi||(gi=!0,lt.mark("gam_first_request"),wi("cmp_gpp_ready_to_gam_first_request","cmp_gpp_ready"),wi("cmp_tcf_ready_to_gam_first_request","cmp_tcf_ready"))}function ao(){const e=Fe(d)?"autos":"hdm";if(Li(we()))return void P("moaptAdBidders","prebid was disabled due to location",gptLayer);lt.mark(`${e}-bidder-prebid-start`),P("moaptAdBidders","started",gptLayer);const t=window.gptLayer.adConfig.bidders||{};let n=window.HRST?.immersiveContentId,i=window.HRST[n];n||(n=$("HRST.metadata.contentId",window,"no-id"),i=window.HRST),function(){if($("gptLayer.ab.noBid",window,!1))return;const n=window.pbjs||{};n.que=n.que||[];const o=[];window.getCMPConsent("vendor",91,()=>{o.push({name:"criteo"})}),window.getCMPConsent("vendor",131,()=>{o.push({name:"id5Id",params:{externalModuleUrl:"https://cdn.id5-sync.com/api/1.0/id5PrebidModule.js",partner:1750},storage:{expires:90,name:"id5id",refreshInSeconds:7200,type:"html5"}})}),window.getCMPConsent("vendor",97,()=>{o.push({name:"identityLink",params:{pid:"13603"},storage:{expires:30,name:"idl_env",refreshInSeconds:1800,type:"cookie"}}),o.push({name:"pairId",params:{liveramp:{storageKey:"_lr_pairId"}}})}),window.getCMPConsent("vendor",21,()=>{o.push({name:"unifiedId",params:{url:"//match.adsrvr.org/track/rid?ttd_pid=qwkgvub&fmt=json"},storage:{expires:60,name:"pbjs-unifiedid",type:"cookie"}}),o.push({name:"uid2",params:{serverPublicKey:l,subscriptionId:s}})}),!0===window.getCMPConsent("category","C0004")&&o.push({name:"sharedId",storage:{expires:30,name:"_sharedID",type:"cookie"}});const a=[],r=$("HRST.adConfig.modules.optable.slug",window,!1);!0===window.getCMPConsent("category","C0004")&&r&&(window.optable=window.optable||{cmd:[]},a.push({name:"optable",params:{adserverTargeting:!0,handleRtd:(e,t,n)=>window.optable.cmd.push(()=>window.optable.rtd.handleRtd(e,t,n)),host:"na.edge.optable.co",instance:"mag",node:"hearst-mag",site:r,waitForIt:!0}})),window.getCMPConsent("vendor",361,()=>{a.push({maxSegs:500,name:"permutive",params:{acBidders:["msft","ix"]},waitForIt:!0})}),n.que.push(()=>{const e={cache:{ignoreBidderCacheKey:!0,url:"https://prebid-server.rubiconproject.com/cache"},consistentTIDs:!1,enableSendAllBids:!0,enableTIDs:!0,priceGranularity:{buckets:[{increment:.05,max:
15,min:0},{increment:.1,max:20,min:5},{increment:.25,max:50,min:20}]},realTimeData:{auctionDelay:200,dataProviders:a},useBidCache:!1,userSync:{auctionDelay:200,syncDelay:3e3,syncEnabled:!0,syncsPerBidder:5,topics:{},userIds:o}};window.GDPR&&(e.consentManagement={gdpr:{cmpApi:"iab",defaultGdprScope:!0,timeout:2e3}}),et()&&(e.consentManagement={gpp:{cmpApi:"iab",timeout:2e3}}),n.setConfig(e),n.bidderSettings={standard:{storageAllowed:!0}},n.onEvent("auctionEnd",e=>{io(e);let t=(e.adUnitsCodes||[]).sort().join("-");(e.bidderRequests||[]).forEach(e=>{const n=function(e){const t=Object.entries(y).find(([t,n])=>e===n.bidderCode);return t?t[0]:null}(e.bidderCode);n&&!/video/.test(t)&&(cn(t,n),un(y[n].kv))})})});const d={addIndexBid:e=>{const t=d.getAdUnitID(e,"IX");if(!t)return!1;return{bidder:"ix",params:{siteId:t}}},addKargoBid:e=>{const t=d.getAdUnitID(e,"KAR");if(!t)return!1;return{bidder:"kargo",params:{placementId:t}}},addMagniteBid:e=>{const n=d.getAdUnitID(e,"MAG");if(!n)return!1;const{accountId:i,siteId:o}=t.MAG,a=/_a|_[0-9]/.test(e)?"atf":null,r={accountId:i,siteId:o,zoneId:n};null!==a&&(r.position=a);return{bidder:"magnite",params:r}},addMicrosoftBid:e=>{const t=d.getAdUnitID(e,"MSFT");if(!t)return!1;return{bidder:"msft",params:{placement_id:t}}},addTeadsBid:e=>{const n=d.getAdUnitID(e,"TDS");if(!n)return!1;const i="d"===gptLayer.breakpoint&&/gpt_gal/.test(e)?"pageIdDesktop300":"pageId";return{bidder:"teads",params:{pageId:t.TDS[i],placementId:n}}},addTheTradeDeskBid:()=>{const{supplySourceId:e,siteId:n}=t.TTD;if(!e||!n)return!1;return{bidder:"ttd",params:{publisherId:"1",siteId:n,supplySourceId:e}}},addTripleLiftBid:e=>{const t=d.getAdUnitID(e,"TPL");if(!t)return!1;return{bidder:"triplelift",params:{floor:.01,inventoryCode:t}}},addVideoBid:({accountId:e,inv:t,placementId:n,siteId:i,supplySourceId:o,type:a,zoneId:r})=>{const s={IX:{bidder:"ix",params:{siteId:i}},KAR:{bidder:"kargo",params:{placementId:n}},MAG:{bidder:"magnite",params:{accountId:e,siteId:i,zoneId:r}},MSFT:{bidder:"msft",params:{placement_id:n}},TPL:{bidder:"triplelift",params:{inventoryCode:t}},TTD:{bidder:"ttd",params:{publisherId:"1",siteId:i,supplySourceId:o}}};d.videoBids.push(s[a])},getAdUnitID:(e,t)=>{const n=In(0,t,e);if(n)return P("moaptAdBidders - Prebid","getAdUnitId - found - placementId",n),n},mediaTypes:(e,t)=>{let n,i;return t?(n=2,i=[2]):(n=1,i=[3]),{video:{api:[1,2,7],context:"instream",linearity:1,maxduration:16,mimes:["application/javascript","video/mp4"],minduration:6,placement:1,playbackmethod:i,playerSize:[[640,360]],plcmt:n,pos:"3"===e?1:3,protocols:[1,2,3,4,5,6,7,8,11,12,13,14],skip:1,skipafter:5,skipmin:0,startdelay:0}}},paramsKeywords:({adId:t,playerId:n})=>{const o=vn(t);return{adid:t,avb:"hdm"===e?gptLayer.getAVB(o,t):"",avbVideo:"hdm"===e?gptLayer.getVideoAVB(n):"",cat:$("article.adCategory.prefix",i,""),hctx:$("article.contextualTags.hctx",i,[]),permutive:bn(),prmtvctx:$("gptLayer.kv.prmtvctx",window,[]),sect:$("article.section.prefix",i,""),sub:$("article.subSection.prefix",i,""),template:he(),tla:Zi()||wn().split("/")[2]}},run:async e=>{const i=[];P("Prebid","Run","Started");const o=fn(e);for(let n=0;n<e.length;n++){const a=e[n],r=a.getSlotElementId(),s=yn(a);if(s.length>0){let e=/gpt_(feed_)?(gal|lb)_a/.test(r)?1:3;/gpt_(feed_)?gal_[0-9]/.test(r)&&(e=6);const n={banner:{pos:e,sizes:s}},a=`${vn(r).getAdUnitPath()}/${r}`,{avb:l,cat:c,hctx:p,permutive:g,prmtvctx:u,sect:m,sub:w,tla:f}=d.paramsKeywords({adId:r}),h={bids:[],code:r,mediaTypes:n,ortb2Imp:{ext:{data:{avb:l,cat:c,hctx:p,permutive:g,prmtvctx:u,sect:m,sub:w,tla:f},gpid:a}}},b=[];Object.keys(y).forEach(e=>{const n=y[e],i=t[e],a=!n.condition||n.condition();i&&a&&b.push(new Promise(t=>{window.getCMPConsent("vendor",n.vendorId,()=>{const i=d[n.bidMethod](r);i&&(pn(o,e),un(n.kv),h.bids.push(i)),t()})}))}),await Promise.all(b),h.bids.length>0&&i.push(h)}}i.length>0&&n.que.push(()=>{d.setIABCategories(),n.requestBids({adUnits:i})}),P("Prebid","Run","Done")},runVideo:(e,t,i)=>{const o=[],{videoBids:a}=d,r={};if(a.forEach(e=>{r[3]||(r[3]=[]),r[3].push(e)}),r[3]?.length){const n=`${wn()}videoAdUnit`,{avbVideo:a,cat:s,hctx:l,permutive:c,prmtvctx:p,sect:g,sub:u,tla:m}=d.paramsKeywords({playerId:e});o.push({bids:r[3],code:"videoAdUnit",mediaTypes:d.mediaTypes(t,i),ortb2Imp:{ext:{data:{avb:a,cat:s,hctx:l,permutive:c,prmtvctx:p,sect:g,sub:u,tla:m},gpid:n}}})}n.que.push(()=>{d.setIABCategories(),n.requestBids({adUnits:o,bidsBackHandler:e=>{let t={};if(0===Object.keys(e||{}
1)?.length&&Ae("force_header_bidding",!1)){const e=Math.floor(100*Math.random());t.hb_adids=`id_${e}`,t.hb_bidder=`bidder_data_${e}`,Object.entries(t).forEach(([e,t])=>{rn(e,t)})}Object.values(e||{}).forEach(e=>{const i=e.bids;for(let e=0;e<i.length;e++){const{adUnitCode:o}=i[e];if(t=n.getAdserverTargetingForAdUnitCode(o),0===Object.keys(t||{})?.length&&Ae("force_header_bidding",!1)){const e=Math.floor(100*Math.random());t.hb_adids=`id_${e}`,t.hb_bidder=`bidder_data_${e}`}Object.entries(t).forEach(([e,t])=>{rn(e,t)})}});const i=[];Object.keys(y).forEach(e=>{i.push(e)}),Object.keys(gptLayer.videoBids).forEach(e=>{i.includes(e)&&Xn(e)})}})})},setIABCategories:()=>{const e=Yi();if(e.length){const t=[];e.forEach(e=>{t.push({id:e})}),n.setConfig({ortb2:{site:{cat:e,cattax:7,content:{data:[{ext:{segtax:7},name:"verity",segment:t}]},pagecat:e,sectioncat:e}}})}},videoBids:[]},c=j.get("_sharedID");c&&localStorage.setItem("_sharedID",c),window.APN=d,window.pbjs=n}(),lt.mark(`${e}-bidder-prebid-end`)}function ro(){const e=Fe(d)?"autos":"hdm";if(Li(we()))return void P("moaptAdBidders","prebid was disabled due to location",gptLayer);lt.mark(`${e}-bidder-prebid-start`),P("moaptAdBidders","started",gptLayer);const t=window.gptLayer.adConfig.bidders||{};let n=window.HRST?.immersiveContentId,i=window.HRST[n];n||(n=$("HRST.metadata.contentId",window,"no-id"),i=window.HRST),function(){if($("gptLayer.ab.noBid",window,!1))return;const n=window.pbjs||{};n.que=n.que||[];const o=[];window.getCMPConsent("vendor",91,()=>{o.push({name:"criteo"})}),window.getCMPConsent("vendor",131,()=>{o.push({name:"id5Id",params:{externalModuleUrl:"https://cdn.id5-sync.com/api/1.0/id5PrebidModule.js",partner:1750},storage:{expires:90,name:"id5id",refreshInSeconds:7200,type:"html5"}})}),window.getCMPConsent("vendor",97,()=>{o.push({name:"identityLink",params:{pid:"13603"},storage:{expires:30,name:"idl_env",refreshInSeconds:1800,type:"cookie"}}),o.push({name:"pairId",params:{liveramp:{storageKey:"_lr_pairId"}}})}),window.getCMPConsent("vendor",21,()=>{o.push({name:"unifiedId",params:{url:"//match.adsrvr.org/track/rid?ttd_pid=qwkgvub&fmt=json"},storage:{expires:60,name:"pbjs-unifiedid",type:"cookie"}}),o.push({name:"uid2",params:{serverPublicKey:l,subscriptionId:s}})}),!0===window.getCMPConsent("category","C0004")&&o.push({name:"sharedId",storage:{expires:30,name:"_sharedID",type:"cookie"}});const a=[],r=$("HRST.adConfig.modules.optable.slug",window,!1);!0===window.getCMPConsent("category","C0004")&&r&&(window.optable=window.optable||{cmd:[]},a.push({name:"optable",params:{adserverTargeting:!0,handleRtd:(e,t,n)=>window.optable.cmd.push(()=>window.optable.rtd.handleRtd(e,t,n)),host:"na.edge.optable.co",instance:"mag",node:"hearst-mag",site:r,waitForIt:!0}})),window.getCMPConsent("vendor",361,()=>{a.push({maxSegs:500,name:"permutive",params:{acBidders:["msft","ix"]},waitForIt:!0})}),n.que.push(()=>{const e={cache:{ignoreBidderCacheKey:!0,url:"https://prebid-server.rubiconproject.com/cache"},consistentTIDs:!1,enableSendAllBids:!0,enableTIDs:!0,priceGranularity:{buckets:[{increment:.05,max:5,min:0},{increment:.1,max:20,min:5},{increment:.25,max:50,min:20}]},realTimeData:{auctionDelay:200,dataProviders:a},targetingControls:{addTargetingKeys:["SOURCE"]},useBidCache:!1,userSync:{auctionDelay:200,syncDelay:3e3,syncEnabled:!0,syncsPerBidder:5,topics:{},userIds:o}};if(window.GDPR&&(e.consentManagement={gdpr:{cmpApi:"iab",defaultGdprScope:!0,timeout:2e3}}),et()&&(e.consentManagement={gpp:{cmpApi:"iab",timeout:2e3}}),t.MAGPBS){const{accountId:n,wrapperName:i}=t.MAGPBS;e.s2sConfig=[{accountId:n,allowUnknownBidderCodes:!0,bidders:["mgnipbs"],coopSync:!0,defaultTtl:300,defaultVendor:"rubicon",enabled:!0,endpoint:"https://prebid-server.rubiconproject.com/openrtb2/auction",extPrebid:{bidders:{mgnipbs:{wrappername:i}},cache:{vastxml:{returnCreative:!1}}}}]}n.setConfig(e),n.bidderSettings={standard:{storageAllowed:!0}},n.onEvent("auctionEnd",e=>{io(e);let t=(e.adUnitsCodes||[]).sort().join("-");(e.bidderRequests||[]).forEach(e=>{const n=function(e){const t=Object.entries(y).find(([t,n])=>e===n.bidderCode);return t?t[0]:null}
1(e.bidderCode);n&&!/video/.test(t)&&(cn(t,n),un(y[n].kv))})})});const d={addIndexBid:e=>{const t=d.getAdUnitID(e,"IX");if(!t)return!1;return{bidder:"ix",params:{siteId:t}}},addKargoBid:e=>{const t=d.getAdUnitID(e,"KAR");if(!t)return!1;return{bidder:"kargo",params:{placementId:t}}},addMagniteBid:e=>{const n=d.getAdUnitID(e,"MAG");if(!n)return!1;const{accountId:i,siteId:o}=t.MAG,a=/_a|_[0-9]/.test(e)?"atf":null,r={accountId:i,siteId:o,zoneId:n};null!==a&&(r.position=a);return{bidder:"magnite",params:r}},addMagnitePrebidServerBid:e=>{const t=d.getAdUnitID(e,"MAGPBS");if(!t)return!1;return{bidder:"mgnipbs",params:{placement:t}}},addMicrosoftBid:e=>{const t=d.getAdUnitID(e,"MSFT");if(!t)return!1;return{bidder:"msft",params:{placement_id:t}}},addTeadsBid:e=>{const n=d.getAdUnitID(e,"TDS");if(!n)return!1;const i="d"===gptLayer.breakpoint&&/gpt_gal/.test(e)?"pageIdDesktop300":"pageId";return{bidder:"teads",params:{pageId:t.TDS[i],placementId:n}}},addTheTradeDeskBid:()=>{const{supplySourceId:e,siteId:n}=t.TTD;if(!e||!n)return!1;return{bidder:"ttd",params:{publisherId:"1",siteId:n,supplySourceId:e}}},addTripleLiftBid:e=>{const t=d.getAdUnitID(e,"TPL");if(!t)return!1;return{bidder:"triplelift",params:{floor:.01,inventoryCode:t}}},addVideoBid:({accountId:e,inv:t,placementId:n,siteId:i,supplySourceId:o,type:a,zoneId:r})=>{const s={IX:{bidder:"ix",params:{siteId:i}},KAR:{bidder:"kargo",params:{placementId:n}},MAG:{bidder:"magnite",params:{accountId:e,siteId:i,zoneId:r}},MAGPBS:{bidder:"mgnipbs",params:{placement:n}},MSFT:{bidder:"msft",params:{placement_id:n}},TPL:{bidder:"triplelift",params:{inventoryCode:t}},TTD:{bidder:"ttd",params:{publisherId:"1",siteId:i,supplySourceId:o}}};d.videoBids.push(s[a])},getAdUnitID:(e,t)=>{const n=In(0,t,e);if(n)return P("moaptAdBidders - Prebid","getAdUnitId - found - placementId",n),n},mediaTypes:(e,t)=>{let n,i;return t?(n=2,i=[2]):(n=1,i=[3]),{video:{api:[1,2,7],context:"instream",linearity:1,maxduration:16,mimes:["application/javascript","video/mp4"],minduration:6,placement:1,playbackmethod:i,playerSize:[[640,360]],plcmt:n,pos:"3"===e?1:3,protocols:[1,2,3,4,5,6,7,8,11,12,13,14],skip:1,skipafter:5,skipmin:0,startdelay:0}}},paramsKeywords:({adId:t,playerId:n})=>{const o=vn(t);return{adid:t,avb:"hdm"===e?gptLayer.getAVB(o,t):"",avbVideo:"hdm"===e?gptLayer.getVideoAVB(n):"",cat:$("article.adCategory.prefix",i,""),hctx:$("article.contextualTags.hctx",i,[]),permutive:bn(),prmtvctx:$("gptLayer.kv.prmtvctx",window,[]),sect:$("article.section.prefix",i,""),sub:$("article.subSection.prefix",i,""),template:he(),tla:Zi()||wn().split("/")[2]}},run:async e=>{const i=[];P("Prebid","Run","Started");const o=fn(e);for(let n=0;n<e.length;n++){const a=e[n],r=a.getSlotElementId(),s=yn(a);if(s.length>0){let e=/gpt_(feed_)?(gal|lb)_a/.test(r)?1:3;/gpt_(feed_)?gal_[0-9]/.test(r)&&(e=6);const n={banner:{pos:e,sizes:s}},a=`${vn(r).getAdUnitPath()}/${r}`,{avb:l,cat:c,hctx:p,permutive:g,prmtvctx:u,sect:m,sub:w,tla:f}=d.paramsKeywords({adId:r}),h={bids:[],code:r,mediaTypes:n,ortb2Imp:{ext:{data:{avb:l,cat:c,hctx:p,permutive:g,prmtvctx:u,sect:m,sub:w,tla:f},gpid:a}}},b=[];Object.keys(y).forEach(e=>{const n=y[e],i=t[e],a=!n.condition||n.condition();i&&a&&b.push(new Promise(t=>{window.getCMPConsent("vendor",n.vendorId,()=>{const i=d[n.bidMethod](r);i&&(pn(o,e),un(n.kv),h.bids.push(i)),t()})}))}),await Promise.all(b),h.bids.length>0&&i.push(h)}}i.length>0&&n.que.push(()=>{d.setIABCategories(),n.requestBids({adUnits:i})}),P("Prebid","Run","Done")},runVideo:(e,t,i)=>{const o=[],{videoBids:a}=d,r={};if(a.forEach(e=>{r[3]||(r[3]=[]),r[3].push(e)}),r[3]?.length){const n=`${wn()}videoAdUnit`,{avbVideo:a,cat:s,hctx:l,permutive:c,prmtvctx:p,sect:g,sub:u,tla:m}=d.paramsKeywords({playerId:e});o.push({bids:r[3],code:"videoAdUnit",mediaTypes:d.mediaTypes(t,i),ortb2Imp:{ext:{data:{avb:a,cat:s,hctx:l,permutive:c,prmtvctx:p,sect:g,sub:u,tla:m},gpid:n}}})}n.que.push(()=>{d.setIABCategories(),n.requestBids({adUnits:o,bidsBackHandler:e=>{let t={};if(0===Object.keys(e||{})?.length&&Ae("force_header_bidding",!1)){const e=Math.floor(100*Math.random());t.hb_adids=`id_${e}`,t.hb_bidder=`bidder_data_${e}`,Object.entries(t).forEach(([e,t])=>{rn(e,t)})}Object.values(e||{}
1).forEach(e=>{const i=e.bids;for(let e=0;e<i.length;e++){const{adUnitCode:o}=i[e];if(t=n.getAdserverTargetingForAdUnitCode(o),0===Object.keys(t||{})?.length&&Ae("force_header_bidding",!1)){const e=Math.floor(100*Math.random());t.hb_adids=`id_${e}`,t.hb_bidder=`bidder_data_${e}`}Object.entries(t).forEach(([e,t])=>{rn(e,t)})}});const i=[];Object.keys(y).forEach(e=>{i.push(e)}),Object.keys(gptLayer.videoBids).forEach(e=>{i.includes(e)&&Xn(e)})}})})},setIABCategories:()=>{const e=Yi();if(e.length){const t=[];e.forEach(e=>{t.push({id:e})}),n.setConfig({ortb2:{site:{cat:e,cattax:7,content:{data:[{ext:{segtax:7},name:"verity",segment:t}]},pagecat:e,sectioncat:e}}})}},videoBids:[]},c=j.get("_sharedID");c&&localStorage.setItem("_sharedID",c),window.APN=d,window.pbjs=n}(),lt.mark(`${e}-bidder-prebid-end`)}function so(){const e=Fe(d)?"autos":"hdm";if(Li(we()))return void gptLayer.log("moaptAdBidders","prebid was disabled due to location",gptLayer);lt.mark(`${e}-bidder-video-start`),gptLayer.log("moaptAdBidders","started",gptLayer);const t=window.gptLayer.adConfig.bidders||{};gptLayer.getVideoBids=(e,n,i,o)=>{gptLayer.utils.purgeVideoBids(),gptLayer.videoBids=[],e&&(n=e.detail.embedId,i=e.detail.role,o=e.detail.isAutoplaySlot),window.getCMPConsent("vendor",793,()=>{window.amznA9&&t.AMZN&&(gptLayer.utils.videoBidStart("AMZN"),window.amznA9.getVideoBids(gptLayer.timeout))}),window.getCMPConsent("vendor",972,()=>{if(t?.KAR?.v&&gptLayer.utils.isUSUserLocation()&&"m"===gptLayer.breakpoint){gptLayer.utils.videoBidStart("KAR");const e=t.KAR.v;window.APN.addVideoBid({placementId:e,type:"KAR"})}}),window.getCMPConsent("vendor",10,()=>{t.IX&&t.IX.v&&(gptLayer.utils.videoBidStart("IX"),window.APN.addVideoBid({playerId:n,siteId:t.IX.v,type:"IX"}))}),window.getCMPConsent("vendor",52,()=>{const e=t.MAG;e&&e.siteId&&e.accountId&&e.v&&(gptLayer.utils.videoBidStart("MAG"),window.APN.addVideoBid({accountId:e.accountId,playerId:n,siteId:e.siteId,type:"MAG",zoneId:e.v}))}),window.getCMPConsent("vendor",1126,()=>{const e=t.MSFT?.["dt-instream"]&&t.MSFT?.["m-instream"],i=t.MSFT;if(e){gptLayer.utils.videoBidStart("MSFT");const e="d"===gptLayer.breakpoint?t.MSFT["dt-instream"]:t.MSFT["m-instream"];window.APN.addVideoBid({placementId:e,type:"MSFT"})}else i?.v&&(gptLayer.utils.videoBidStart("MSFT"),window.APN.addVideoBid({placementId:i.v,playerId:n,type:"MSFT"}))}),window.getCMPConsent("vendor",28,()=>{const e=t.TPL;e&&e.v&&(gptLayer.utils.videoBidStart("TPL"),window.APN.addVideoBid({inv:e.v,playerId:n,type:"TPL"}))}),window.getCMPConsent("vendor",21,()=>{const e=t.TTD;e&&e.supplySourceId&&e.siteId&&(gptLayer.utils.videoBidStart("TTD"),window.APN.addVideoBid({playerId:n,siteId:e.siteId,supplySourceId:e.supplySourceId,type:"TTD"}))}),window.APN.videoBids.length&&window.APN.runVideo(n,i,o),function e(){return Object.values(gptLayer.videoBids).every(t=>"complete"===t.status||(setTimeout(e,50),!1))&&gptLayer.utils.Events.fire(window,"app.video.bidder-complete",{}),!0}()},!gptLayer.ab.noBid&&gptLayer.utils.Events.listen(window,"app.video.bidder-request",e=>{window.APN.videoBids=[],gptLayer.getVideoBids(e)}),lt.mark(`${e}-bidder-video-end`)}function lo(){const e=Fe(d)?"autos":"hdm";if(Li(we()))return void gptLayer.log("moaptAdBidders","prebid was disabled due to location",gptLayer);lt.mark(`${e}-bidder-video-start`),gptLayer.log("moaptAdBidders","started",gptLayer);const t=window.gptLayer.adConfig.bidders||{};gptLayer.getVideoBids=(e,n,i,o)=>{gptLayer.utils.purgeVideoBids(),gptLayer.videoBids=[],e&&(n=e.detail.embedId,i=e.detail.role,o=e.detail.isAutoplaySlot),window.getCMPConsent("vendor",793,()=>{window.amznA9&&t.AMZN&&(gptLayer.utils.videoBidStart("AMZN"),window.amznA9.getVideoBids(gptLayer.timeout))}),window.getCMPConsent("vendor",972,()=>{if(t?.KAR?.v&&gptLayer.utils.isUSUserLocation()&&"m"===gptLayer.breakpoint){gptLayer.utils.videoBidStart("KAR");const e=t.KAR.v;window.APN.addVideoBid({placementId:e,type:"KAR"})}}),window.getCMPConsent("vendor",10,()=>{t.IX&&t.IX.v&&(gptLayer.utils.videoBidStart("IX"),window.APN.addVideoBid({playerId:n,siteId:t.IX.v,type:"IX"}))}),window.getCMPConsent("vendor",52,()=>{const e=t.MAG;e&&e.siteId&&e.accountId&&e.v&&(gptLayer.utils.videoBidStart("MAG"),window.APN.addVideoBid({accountId:e.accountId,playerId:n,siteId:e.siteId,type:"MAG",zoneId:e.v}))}),window.getCMPConsent("vendor",52,()=>{const e=t.MAGPBS;e&&e.v&&(gptLayer.utils.videoBidStart("MAGPBS"),window.APN.addVideoBid({placementId:e.v,playerId:n,type:"MAGPBS"}))}),window.getCMPConsent("vendor",1126,()=>{const e=t.MSFT?.["dt-instream"]&&t.MSFT?.["m-instream"],i=t.MSFT;if(e){gptLayer.utils.videoBidStart("MSFT");const e="d"===gptLayer.breakpoint?t.MSFT["dt-instream"]:t.MSFT["m-instream"];window.APN.addVideoBid({placementId:e,type:"MSFT"})}else i?.v&&(gptLayer.utils.videoBidStart("MSFT"),window.APN.addVideoBid({placementId:i.v,playerId:n,type:"MSFT"}))}),window.getCMPConsent("vendor",28,()=>{const e=t.TPL;e&&e.v&&(gptLayer.utils.videoBidStart("TPL"),window.APN.addVideoBid({inv:e.v,playerId:n,type:"TPL"}))}),window.getCMPConsent("vendor",21,()=>{const e=t.TTD;e&&e.supplySourceId&&e.siteId&&(gptLayer.utils.videoBidStart("TTD"),window.APN.addVideoBid({playerId:n,siteId:e.siteId,supplySourceId:e.supplySourceId,type:"TTD"}))}),window.APN.videoBids.length&&window.APN.runVideo(n,i,o),function e(){return Object.values(gptLayer.videoBids).every(t=>"complete"===t.status||(setTimeout(e,50),!1))&&gptLayer.utils.Events.fire(window,"app.video.bidder-complete",{}),!0}()},!gptLayer.ab.noBid&&gptLayer.utils.Events.listen(window,"app.video.bidder-request",e=>{window.APN.videoBids=[],gptLayer.getVideoBids(e)}),lt.mark(`${e}-bidder-video-end`)}const co=/^\/(archive|giveaways|sweeps|horoscopes)/i;function po(){function e(){const e=qe(),t=gptLayer.utils.getValue("HRST",window),n=gptLayer.utils.getValue("HRST.adConfig.modules.sailthru",window,{}),{ids:i,skipLoadChecks:o}=n;if(P("sailthru","runSailthru - sailThruIds",i),!i)return!1;const a=e?i?.feature??i?.production:i?.production;return P("sailthru","runSailthru","we have a sailthru id for this brand"),t&&a&&!kt()?!o&&function(e,t){return gptLayer.isSponsored||gptLayer.isMgu||t||document.location.pathname.match(co)||gptLayer.utils.getValue("article.type",e,"").match(/product/i)||gptLayer.utils.getValue("article.display",e,"").match(/product/i)||"videohub"===gptLayer.utils.getValue("article.template",e,"")}(t,e)?(P("sailthru","runSailthru","condition has been met for an early return"),!1):(P("sailthru","runSailthru","sailthru is being loaded"),dt("//ak.sail-horizon.com/spm/spm.v1.min.js",()=>{Sailthru.init({customerId:a}),P("sailthru","runSailthru","sailthru has initialized"),window.dispatchEvent(new CustomEvent("SAILTHRU_LOADED"))}),!0):(P("sailthru","runSailthru","condition has been met for an early return"),!1)}gptLayer.utils.getValue("HRST.adConfig.modules.sailthru.bypassConsent",window,null)?e():window.getCMPConsent("category","C0004",e)}const go=["b2bwebsite","hademo"],uo=["gpt_lb_a"],mo=["native-onsite-driver-nod-ad-card","suggestive-selling-grid"],wo={b2bwebsite_superhero_animation:[1,2],b2bwebsite_superhero_fullframe_image:[1,2],b2bwebsite_superhero_fullframe_video:[1,2],b2bwebsite_superhero_gallery:[1,2],b2bwebsite_superhero_video_player_embed:[1,2],b2bwebsite_superhero_interactive_slider:[1,2],b2bwebsite_superhero_quiz:[1,2],b2bwebsite_superhero_dynamic:[1,2],b2bwebsite_superhero_click_to_play:[1,2],b2bwebsite_superhero_hotspot:[1,2],b2bwebsite_superhero_pharma_scrolling_isi:[1,2],b2bwebsite_superhero_product_carousel:[1,2],b2bwebsite_shoppable_video:[1,2],b2bwebsite_product_carousel_ad:[1,2],b2bwebsite_3d_collection_cube:[1,2],b2bwebsite_miniscroller_image:["gpt_lb_0"],b2bwebsite_miniscroller_video:["gpt_lb_0"],b2bwebsite_miniscroller_reactive:["gpt_lb_0"],b2bwebsite_megahero_dynamic:[1,600],b2bwebsite_megahero_fullframeimage:[1,600],b2bwebsite_megahero_fullframevideo:["listicle-ad-breaker-0"],b2bwebsite_megahero_gallery:["listicle-ad-breaker-0"],b2bwebsite_megahero_hotspot:[1,2],hademo_brandvod:["article-ad-breaker-leaderboard-0","ad-article-breaker-mobile-0"],hademo_megahero:["article-ad-breaker-leaderboard-0","ad-article-breaker-mobile-0"],hademo_nativeassembly_image:["article-ad-breaker-leaderboard-0","ad-article-breaker-mobile-0"],hademo_nativeassembly_video:["article-ad-breaker-leaderboard-0","ad-article-breaker-mobile-0"],hademo_superhero:["article-ad-breaker-leaderboard-0","ad-article-breaker-mobile-0"],hademo_superheronative_image:["article-ad-breaker-leaderboard-0","ad-article-breaker-mobile-0"],hademo_superheronative_video:["article-ad-breaker-leaderboard-0","ad-article-breaker-mobile-0"],hademo_nod:["native-onsite-driver-nod-ad-card"],hademo_suggestive_selling:["suggestive-selling-grid"]};let fo=null,yo=!1;const ho=()=>{const e=Dt()?Ae("jamtest",""):Ae("token",""),t=go.some(t=>e.toLowerCase().startsWith(t));if(P("scrollToAdSlot - getAdSlotId","hasTestQueryParam",t),!t)return null;const n=$("HRST.adConfig.settings.adSlotDemoMapping",window,"");P("scrollToAdSlot - getAdSlotId","adConfigOverrides",n);const i=n[e]||wo[e];if(P("scrollToAdSlot - getAdSlotId","adSizeOrIdArray",i),!Array.isArray(i)||0===i.length)return null;let o;return"number"==typeof i[0]?o=((e,t)=>{const n=Object.keys(e||{}).sort((e,t)=>
1"gpt_lb_a"===e?-1:"gpt_lb_a"===t?1:"gpt_gal_a"===e?-1:"gpt_gal_a"===t?1:e.localeCompare(t));P("scrollToAdSlot - getIdFromAdSize","sortedAdSlotsKeys",n);const i=(n||[]).find(n=>e[n]?.adSize?.some(e=>{return Array.isArray(e)&&(n=e,i=t,n?.[0]===i?.[0]&&n?.[1]===i?.[1]);var n,i}));return P("scrollToAdSlot - getIdFromAdSize","matchingAdSlotKey",i),i})(window?.gptLayer?.adSlots,i):(o=i.find(e=>document.getElementById(e)),P("scrollToAdSlot - getAdSlotId","checked div IDs",i)),P("scrollToAdSlot - getAdSlotId","divId",o),o||null};const bo=()=>{const e=ho();if(P("scrollToAdSlot - scrollToAdSlotHandler","adElementId",e),!e||uo.includes(e))return null;const t=document.getElementById(e);if(P("scrollToAdSlot - scrollToAdSlotHandler","el",t),!t)return null;const n=!mo.includes(e),i=n&&t.parentElement||t;P("scrollToAdSlot - scrollToAdSlotHandler","useParentElement",n),P("scrollToAdSlot - scrollToAdSlotHandler","targetEl",i);const{top:o}=i.getBoundingClientRect(),a=function(){const e=document.querySelector('[data-tracking-id="topNav"]');if(!e)return Dt()?200:150;let t=0;const n=window.getComputedStyle(e).getPropertyValue("position");"sticky"!==n&&"-webkit-sticky"!==n&&"fixed"!==n||(t+=e.offsetHeight);let i=e.nextElementSibling;for(;i&&!i.classList.contains("oop-ad")&&"main-content"!==i.id;){const e=window.getComputedStyle(i).getPropertyValue("position");"sticky"!==e&&"-webkit-sticky"!==e&&"fixed"!==e||(t+=i.offsetHeight),i=i.nextElementSibling}return P("scrollToAdSlot - getStickyNavHeight","totalHeight",t),Math.round(t)}(),r=o+window.scrollY-a;return P("scrollToAdSlot - scrollToAdSlotHandler",`targetPosition: ${r} = top: ${o} + window.scrollY: ${window.scrollY} - stickyNavHeight: ${a}`),yo||(fo||function(){const e=document.createElement("div");e.id="processing-overlay",e.className="processing-cover processing-cover-visible",e.style.cssText="\n\t\tposition: fixed;\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tright: 0;\n\t\tbottom: 0;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tbackground: rgba(0,0,0,0.7) url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pgo8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPgo8c3ZnIHdpZHRoPSI0MHB4IiBoZWlnaHQ9IjQwcHgiIHZpZXdCb3g9IjAgMCA0MCA0MCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3BhY2U9InByZXNlcnZlIiBzdHlsZT0iZmlsbC1ydWxlOmV2ZW5vZGQ7Y2xpcC1ydWxlOmV2ZW5vZGQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEuNDE0MjE7IiB4PSIwcHgiIHk9IjBweCI+CiAgICA8ZGVmcz4KICAgICAgICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPjwhW0NEQVRBWwogICAgICAgICAgICBALXdlYmtpdC1rZXlmcmFtZXMgc3BpbiB7CiAgICAgICAgICAgICAgZnJvbSB7CiAgICAgICAgICAgICAgICAtd2Via2l0LXRyYW5zZm9ybTogcm90YXRlKDBkZWcpCiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIHRvIHsKICAgICAgICAgICAgICAgIC13ZWJraXQtdHJhbnNmb3JtOiByb3RhdGUoLTM1OWRlZykKICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgQGtleWZyYW1lcyBzcGluIHsKICAgICAgICAgICAgICBmcm9tIHsKICAgICAgICAgICAgICAgIHRyYW5zZm9ybTogcm90YXRlKDBkZWcpCiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIHRvIHsKICAgICAgICAgICAgICAgIHRyYW5zZm9ybTogcm90YXRlKC0zNTlkZWcpCiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHN2ZyB7CiAgICAgICAgICAgICAgICAtd2Via2l0LXRyYW5zZm9ybS1vcmlnaW46IDUwJSA1MCU7CiAgICAgICAgICAgICAgICAtd2Via2l0LWFuaW1hdGlvbjogc3BpbiAxLjVzIGxpbmVhciBpbmZpbml0ZTsKICAgICAgICAgICAgICAgIC13ZWJraXQtYmFja2ZhY2UtdmlzaWJpbGl0eTogaGlkZGVuOwogICAgICAgICAgICAgICAgYW5pbWF0aW9uOiBzcGluIDEuNXMgbGluZWFyIGluZmluaXRlOwogICAgICAgICAgICB9CiAgICAgICAgXV0+PC9zdHlsZT4KICAgIDwvZGVmcz4KICAgIDxnIGlkPSJvdXRlciI+CiAgICAgICAgPGc+CiAgICAgICAgICAgIDxwYXRoIGQ9Ik0yMCwwQzIyLjIwNTgsMCAyMy45OTM5LDEuNzg4MTMgMjMuOTkzOSwzLjk5MzlDMjMuOTkzOSw2LjE5OTY4IDIyLjIwNTgsNy45ODc4MSAyMCw3Ljk4NzgxQzE3Ljc5NDIsNy45ODc4MSAxNi4wMDYxLDYuMTk5NjggMTYuMDA2MSwzLjk5MzlDMTYuMDA2MSwxLjc4ODEzIDE3Ljc5NDIsMCAyMCwwWiIgc3R5bGU9ImZpbGw6YmxhY2s7Ii8+CiAgICAgICAgPC9nPgogICAgICAgIDxnPgogICAgICAgICAgICA8cGF0aCBkPSJNNS44NTc4Niw1Ljg1Nzg2QzcuNDE3NTgsNC4yOTgxNSA5Ljk0NjM4LDQuMjk4MTUgMTEuNTA2MSw1Ljg1Nzg2QzEzLjA2NTgsNy40MTc1OCAxMy4wNjU4LDkuOTQ2MzggMTEuNTA2MSwxMS41MDYxQzkuOTQ2MzgsMTMuMDY1OCA3LjQxNzU4LDEzLjA2NTggNS44NTc4NiwxMS41MDYxQzQuMjk4MTUsOS45NDYzOCA0LjI5ODE1LDcuNDE3NTggNS44NTc4Niw1Ljg1Nzg2WiIgc3R5bGU9ImZpbGw6cmdiKDIxMCwyMTAsMjEwKTsiLz4KICAgICAgICA8L2c+CiAgICAgICAgPGc+CiAgICAgICAgICAgIDxwYXRoIGQ9Ik0yMCwzMi4wMTIyQzIyLjIwNTgsMzIuMDEyMiAyMy45OTM5LDMzLjgwMDMgMjMuOTkzOSwzNi4wMDYxQzIzLjk5MzksMzguMjExOSAyMi4yMDU4LDQwIDIwLDQwQzE3Ljc5NDIsNDAgMTYuMDA2MSwzOC4yMTE5IDE2LjAwNjEsMzYuMDA2MUMxNi4wMDYxLDMzLjgwMDMgMTcuNzk0MiwzMi4wMTIyIDIwLDMyLjAxMjJaIiBzdHlsZT0iZmlsbDpyZ2IoMTMwLDEzMCwxMzApOyIvPgogICAgICAgIDwvZz4KICAgICAgICA8Zz4KICAgICAgICAgICAgPHBhdGggZD0iTTI4LjQ5MzksMjguNDkzOUMzMC4wNTM2LDI2LjkzNDIgMzIuNTgyNCwyNi45MzQyIDM0LjE0MjEsMjguNDkzOUMzNS43MDE5LDMwLjA1MzYgMzUuNzAxOSwzMi41ODI0IDM0LjE0MjEsMzQuMTQyMUMzMi41ODI0LDM1LjcwMTkgMzAuMDUzNiwzNS43MDE5IDI4LjQ5MzksMzQuMTQyMUMyNi45MzQyLDMyLjU4MjQgMjYuOTM0MiwzMC4wNTM2IDI4LjQ5MzksMjguNDkzOVoiIHN0eWxlPSJmaWxsOnJnYigxMDEsMTAxLDEwMSk7Ii8+CiAgICAgICAgPC9nPgogICAgICAgIDxnPgogICAgICAgICAgICA8cGF0aCBkPSJNMy45OTM5LDE2LjAwNjFDNi4xOTk2OCwxNi4wMDYxIDcuOTg3ODEsMTcuNzk0MiA3Ljk4NzgxLDIwQzcuOTg3ODEsMjIuMjA1OCA2LjE5OTY4LDIzLjk5MzkgMy45OTM5LDIzLjk
15MzlDMS43ODgxMywyMy45OTM5IDAsMjIuMjA1OCAwLDIwQzAsMTcuNzk0MiAxLjc4ODEzLDE2LjAwNjEgMy45OTM5LDE2LjAwNjFaIiBzdHlsZT0iZmlsbDpyZ2IoMTg3LDE4NywxODcpOyIvPgogICAgICAgIDwvZz4KICAgICAgICA8Zz4KICAgICAgICAgICAgPHBhdGggZD0iTTUuODU3ODYsMjguNDkzOUM3LjQxNzU4LDI2LjkzNDIgOS45NDYzOCwyNi45MzQyIDExLjUwNjEsMjguNDkzOUMxMy4wNjU4LDMwLjA1MzYgMTMuMDY1OCwzMi41ODI0IDExLjUwNjEsMzQuMTQyMUM5Ljk0NjM4LDM1LjcwMTkgNy40MTc1OCwzNS43MDE5IDUuODU3ODYsMzQuMTQyMUM0LjI5ODE1LDMyLjU4MjQgNC4yOTgxNSwzMC4wNTM2IDUuODU3ODYsMjguNDkzOVoiIHN0eWxlPSJmaWxsOnJnYigxNjQsMTY0LDE2NCk7Ii8+CiAgICAgICAgPC9nPgogICAgICAgIDxnPgogICAgICAgICAgICA8cGF0aCBkPSJNMzYuMDA2MSwxNi4wMDYxQzM4LjIxMTksMTYuMDA2MSA0MCwxNy43OTQyIDQwLDIwQzQwLDIyLjIwNTggMzguMjExOSwyMy45OTM5IDM2LjAwNjEsMjMuOTkzOUMzMy44MDAzLDIzLjk5MzkgMzIuMDEyMiwyMi4yMDU4IDMyLjAxMjIsMjBDMzIuMDEyMiwxNy43OTQyIDMzLjgwMDMsMTYuMDA2MSAzNi4wMDYxLDE2LjAwNjFaIiBzdHlsZT0iZmlsbDpyZ2IoNzQsNzQsNzQpOyIvPgogICAgICAgIDwvZz4KICAgICAgICA8Zz4KICAgICAgICAgICAgPHBhdGggZD0iTTI4LjQ5MzksNS44NTc4NkMzMC4wNTM2LDQuMjk4MTUgMzIuNTgyNCw0LjI5ODE1IDM0LjE0MjEsNS44NTc4NkMzNS43MDE5LDcuNDE3NTggMzUuNzAxOSw5Ljk0NjM4IDM0LjE0MjEsMTEuNTA2MUMzMi41ODI0LDEzLjA2NTggMzAuMDUzNiwxMy4wNjU4IDI4LjQ5MzksMTEuNTA2MUMyNi45MzQyLDkuOTQ2MzggMjYuOTM0Miw3LjQxNzU4IDI4LjQ5MzksNS44NTc4NloiIHN0eWxlPSJmaWxsOnJnYig1MCw1MCw1MCk7Ii8+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4K') center no-repeat;\n\t\tz-index: 5000000;\n\t\tvisibility: visible;\n\t\topacity: 1;\n\t\ttransition: opacity 1s linear;\n\t",document.body.appendChild(e),fo=e,P("scrollToAdSlot - loadProcessingCover","cover",e)}(),setTimeout(()=>{P("scrollToAdSlot - scrollToAdSlotHandler","scroll to targetPosition",r),fo.className="processing-cover processing-cover-hidden",fo.style.cssText="overflow: hidden; visibility: hidden; opacity: 0; transition: visibility 0s 1s, opacity 1s linear;",setTimeout(()=>{fo.remove()},3e3),window.scrollTo({behavior:"smooth",top:r}),yo=!0},3e3)),Y.remove(window,"adScriptsDone",bo),!0};function Ao(){window.gptLayer.launchKVPDebugger=function(){const e=["hctx","ias-kw"],t=document.createElement("div");Object.assign(t.style,{backgroundColor:"#ffc",borderTop:"1px solid #ccc",bottom:"0",boxShadow:"0 -5px 5px rgba(0, 0, 0, 0.1)",fontFamily:"sans-serif",fontSize:"0.75rem",left:"0",maxHeight:"40%",opacity:"0.95",overflowY:"auto",padding:"20px",position:"fixed",width:"100%",zIndex:"99999999"});const n=document.createElement("div");Object.assign(n.style,{color:"#ff0000",cursor:"pointer",float:"right",position:"sticky",right:"0",top:"0"}),n.innerText="X",n.onclick=function(){document.body.removeChild(t)};const i=document.createElement("div");i.id="key-container",fetch("https://adtech-services-prod-public.s3.amazonaws.com/public/context_targeting_keys.json").then(e=>{if(!e.ok)throw new Error(`Network response was not ok: ${e.statusText}`);return e.json()}).then(o=>{!function(o){e.forEach((e,t)=>{const n=document.createElement("div");n.id=`key-${e}`,n.classList.add("key-table-container");const a={marginBottom:"0.3rem",marginTop:0===t?"0":"0.5rem"},r=document.createElement("h2");if(r.textContent=`${e}`,r.classList.add("key-table-header"),Object.assign(r.style,a),n.appendChild(r),window.googletag){const t=window.googletag.getConfig("targeting").targeting[e]??[];if(0===t.length){const e=document.createElement("div");e.classList.add("error-message"),e.textContent="No key-values found",n.appendChild(e)}else{t.sort();const i=document.createElement("table");i.classList.add("key-table"),t.forEach(t=>{const a=document.createElement("tr");a.classList.add("key-table-row");const r=o?.[e]?.[t]||"N/A",d=document.createElement("td");d.classList.add("key-display-name"),Object.assign(d.style,{borderBottom:"1px solid #DFDFDF",paddingBottom:"2px",paddingRight:"8px"}),d.textContent=`${r}`,a.append(d);const s=document.createElement("td");s.classList.add("key-value"),Object.assign(s.style,{borderBottom:"1px solid #DFDFDF",fontStyle:"italic",paddingBottom:"2px"}),s.textContent=`(${t})`,a.appendChild(s),i.appendChild(a),n.appendChild(i)})}}else{const e=document.createElement("div");e.textContent="Error - googletag is not defined",n.appendChild(e)}i.append(n)}),t.appendChild(n),t.appendChild(i),document.body.appendChild(t)}(o)}).catch(e=>{console.error("Failed to fetch JSON data:",e)})}}const{AD_BUNDLE_VERSION:Io}={ACTIONIQ_ANALYTICS_VERSION:"3.1.0",AD_BUNDLE_PATH:"2.491.0",AD_BUNDLE_VERSION:"2.491.0",BIDDER_HOST:"https://static-assets.hearstapps.com",BIDDER_HOST_LOCAL:"http://127.0.0.1:8080/",BIDDER_PREBID_VERSION_AUTOS:"10.29.1",BIDDER_PREBID_VERSION_AUTOS_BETA:"10.29.1",BIDDER_PREBID_VERSION_HDM:"10.29.1",BIDDER_PREBID_VERSION_HDM_BETA:"10.29.1"};const vo={d:980,m:0,t:600};function So(){window.dispatchEvent(new Event("disable-sticky")),window.gptLayer&&(window.gptLayer.stickyVideoOff=!0)}const Lo=["click","pointerdown"];function Co(e){for(const t of e.addedNodes)if(t.nodeType===Node.ELEMENT_NODE)return!0;return!1}function _o({closeSelector:e,onClose:t,frameSelector:n,frameDiscoveryMs:i=5e3}){const o=new Set,a=[],r=n=>{const i=n.target.closest?.(e);i&&t(i)},d=e=>
1{e&&!o.has(e)&&(o.add(e),Lo.forEach(t=>e.addEventListener(t,r,!0)))},s=e=>{try{d(e.contentDocument)}catch(e){}},l=new WeakSet,c=()=>{document.querySelectorAll(n).forEach(e=>{if(!l.has(e)){l.add(e);const t=()=>s(e);e.addEventListener("load",t),a.push({frame:e,onFrameLoad:t})}s(e)})};d(document);let p=null;return n&&(c(),p=new MutationObserver(e=>{e.some(Co)&&c()}),p.observe(document.body,{childList:!0,subtree:!0}),setTimeout(()=>p.disconnect(),i)),()=>{p?.disconnect(),o.forEach(e=>{Lo.forEach(t=>e.removeEventListener(t,r,!0))}),o.clear(),a.forEach(({frame:e,onFrameLoad:t})=>{e.removeEventListener("load",t)}),a.length=0}}const ko=new Map;function To(e){const t=Math.round(e);window.gptLayer&&(window.gptLayer.kargoAdhesionHeight=t),window.dispatchEvent(new CustomEvent("kargo-adhesion-height",{detail:{height:t}}))}function Mo(){return document.querySelector(".kargo-ad-hover")||document.querySelector(".kargo-ad-v5")}function Eo(e){const t=document.querySelector(`#${e}`);if(!t)return;ko.get(e)?.();let n=null,i=null,o=null,a=null,r=null,d=null;const s=()=>{clearTimeout(r),r=null,i?.(),i=null,o?.disconnect(),o=null,a?.disconnect(),a=null,d?.(),d=null};ko.set(e,s);const l=e=>{(function(e){return e.ownerDocument!==document||!!e.closest(".kargo-ad-hover, .kargo-ad-v5")||!e.closest('[data-external-id*="kargo-ad"]')})(e)&&(P("handleKargoAdhesion","Kargo adhesion closed"),Kn("mobile_adhesion_kargo"),c())},c=()=>{s(),n&&(n.style.display="none"),n=null;const e=t.closest(".mobile-adhesion-unit");e&&(e.style.display="none"),To(0)},p=e=>{clearTimeout(r),r=null,n=e,i?.(),i=function(e){let t=null,n=null;const i=()=>Number(window.gptLayer?.kargoAdhesionHeight)||0,o=()=>{const t=e.firstElementChild,n=Math.round(e.getBoundingClientRect().height),i=t?Math.round(t.getBoundingClientRect().height):0;return Math.max(n,i)},a=e=>{e<0||e!==i()&&To(e)},r=e=>{clearTimeout(t),e>0?t=setTimeout(()=>a(e),250):i()>0&&(t=setTimeout(()=>a(0),250))},d=new ResizeObserver(()=>{r(o())}),s=()=>{const t=e.firstElementChild;t!==n&&(n&&d.unobserve(n),n=t,t&&d.observe(t))},l=new MutationObserver(()=>{s(),r(o())});return d.observe(e),s(),l.observe(e,{childList:!0}),r(o()),()=>{clearTimeout(t),d.disconnect(),l.disconnect(),n=null}}(e),o?.disconnect(),o=new MutationObserver(()=>{if(!n||document.documentElement.contains(n))return;i?.(),i=null,n=null;const e=Mo();e?p(e):(clearTimeout(r),r=setTimeout(()=>{const e=Mo();e?p(e):c()},500))}),o.observe(document.body,{childList:!0,subtree:!0}),d?.(),d=_o({closeSelector:'[class*="kargo-hover-close"], [class~="kargo-close"]',frameSelector:".kargo-ad-hover iframe, .kargo-ad-v5 iframe",onClose:l})},g=Mo();g?p(g):(a=new MutationObserver(()=>{const e=Mo();e&&(a?.disconnect(),a=null,p(e))}),a.observe(document.body,{childList:!0,subtree:!0}),setTimeout(()=>{a?.disconnect(),a=null},5e3))}let Do=null;function Po(){window.gptLayer&&(Do?.(),Do=_o({closeSelector:'[class*="close" i], [id*="close" i], [aria-label*="close" i]',frameDiscoveryMs:3e4,frameSelector:'iframe[id^="ad_is_"][id$="_ifr"]',onClose:e=>{(function(e){return!(e.closest('[id^="aad_is_"], .gg-static-content')||e.ownerDocument===document&&!e.closest('[id^="ad_is_"], [id^="mad_is_"], [data-gg-moat], .gg-static-unit'))})(e)&&(P("handleGumGumAdhesion","GumGum adhesion closed"),Kn("mobile_adhesion_gumgum"),setTimeout(()=>{const e=document.querySelector(".mobile-adhesion-unit");e&&(e.style.display="none")},0))}}))}function Ro(e){if(!function(e){const{creativeTemplateIds:t,excludeBackfill:n,advertiserIds:i}=u;return!(!t.includes(e.respInfo?.creativeTemplateId)&&(!n||e.lineItemId||e.creativeId)&&!i.includes(e.advertiserId)&&!document.querySelector(`#${e.divId}`)?.closest(".ad-container-collapsed"))}(e))return!1;const t=gptLayer.slots[e.divId];return!!t&&(googletag.destroySlots([t]),delete gptLayer.slots[e.divId],delete gptLayer.adSlots[e.divId],P("excludeSlotFromIAS","Destroyed slot excluded from IAS",e.divId),!0)}function Oo(){lt.mark("shared-header-start"),P("sharedAdHeader","started",!0),"hidden"===document.visibilityState&&lt.mark("shared-page-hidden");const e=Fe(d)?"autos":"hdm";gptLayer.a2a={currentId:$("HRST.currentId",window,""),experience:"article2article"===$("HRST.landing.experience",window,""),firstArticleId:0===window.HRST?.[window.HRST.currentId]?.article?.a2aIndex?window.HRST.currentId:"",firstArticleLoaded:!1,firstArticleStaticAds:!1,initialLoad:!0,readMoreClicked:!1},gptLayer.cmpGpcSet=Ee(),gptLayer.cmpGppOptOut=Te(),gptLayer.display=oe(),gptLayer.immersiveDivIdLabel=It()?"feed_":"",gptLayer.isB2BDemo=Mn(),gptLayer.isEasel=ae(),gptLayer.isMgu=Ze(),gptLayer.isSponsored=Ye(),gptLayer.template=ie(),gptLayer.viewport=be(),yt("gptLayer","cookieDeprecationLabel"),gptLayer.ab=gptLayer.ab||{},Wt();(/(mgu.*_na|mgu_fb_ga|arb.*_na|arb_fb_ga|^vpd_)/i.test(ve("campaign"))||/(mgu.*_na|mgu_fb_ga|arb.*_na|arb_fb_ga)/i.test(Ae("src"))||/^(noads)$/i.test(Ae("token"))||"videohub"===gptLayer.template||He()||gptLayer.utils.isContentPassSubscriber())&&(gptLayer.ab.noAds=!0,gptLayer.ab.noBid=!0,Ne(),ue());(/^(nobidders)$/i.test(Ae("token"))||gptLayer.isB2BDemo||gptLayer.isSponsored||gptLayer.cmpGppOptOut||gptLayer.cmpGpcSet||window.GDPR&&window.CMP_WITHDRAWN||!gptLayer.adConfig?.bidders)&&(gptLayer.ab.noBid=!0),function(){if(gptLayer.ab.noAds)return;window.googletag=window.googletag||{},googletag.cmd=googletag.cmd||[],dt("https://securepubads.g.doubleclick.net/tag/js/gpt.js",()=>{lt.mark("shared-header-gpt-script-loaded")}),lt.mark("shared-header-gpt-script-inserted");const t=t=>{const n=function(e){return{adUnitId:e.slot.getAdUnitPath(),advertiserId:e.advertiserId,creativeCode:e.slot.getHtml(),creativeId:e.creativeId,creativeSize:e.size?`${e.size[0]}x${e.size[1]}`:"",divId:e.slot.getSlotElementId(),lineItemId:e.lineItemId,respInfo:e.slot.getResponseInformation(),targeting:e.slot.getTargetingMap()}}(t);if(gptLayer.log("GAM","ad",n),gptLayer.adSlots[n.divId]&&(gptLayer.adSlots[n.divId].rendered=!0),function(e){const{advertiserId:t,creativeCode:n,creativeId:i,divId:o,lineItemId:a,creativeSize:r,respInfo:d,targeting:s}=e,l=new CustomEvent("adRendered",{detail:{advertiserId:t,creativeCode:n,creativeId:i,id:o,lineItemId:a,respInfo:d,size:r,targeting:s}});/gpt/.test(e.divId)&&window.dispatchEvent(l)}(n),/gpt_(adhesion|film_adhesion|spot_adhesion)/i.test(n.divId)&&(Wn(e,n.divId,t.size?t.size[1]:0),Eo(n.divId),Po()),en(n.creativeCode,n.divId),Ro(n),function(e){if(/gpt_shopping/i.test(e))try{const t=document.getElementById(e);t.querySelector("iframe")||(t.closest(".breaker-ad").style.display="none")}catch(e){}}(n.divId),n.creativeId||n.lineItemId||"gpt_outofpage"===n.divId||!gptLayer.adSlots[n.divId]?.fallbackAdRequest||gptLayer.adSlots[n.divId]?.fallbackAdRequest(),!n.lineItemId||"d"===gptLayer.breakpoint&&"gallery"===gptLayer.template||an("rb",n.lineItemId.toString(),!0),"gpt_lb_pf"===n.divId&&"1x1"===n.creativeSize){const e=document.querySelector("#gpt_lb_pf");e&&(e.style.display="none")}if("HMICN"===gptLayer.adConfig.bu)try{/oop/.test(n.divId)||ge(n.divId)}catch(e){}var i;!function(e){if(["1x2","1x450","300x400","300x450"].includes(e.creativeSize)){const t=/<!--creativeHeight:(.*)-->/,n=e.creativeCode.match(t);n&&gptLayer.utils.resizeAdIframe(e.divId,"100%",`${n[1]}px`)}}(n),function(e){if("1x600"!==e.creativeSize)return;const t={adDiv:document.querySelector(`#${e.divId}`),disclaimerHeight:64,height:"600px",navHeightAdjust:24,startHeight:{d:"600px",m:"100dvh",t:"600px"},width:"100%"};if(t.adDiv&&(t.adContainer=t.adDiv.parentElement,t.adParent=t.adContainer.parentElement,t.adParent)){const n=gptLayer.utils.getBreakp
1oint(vo);/t|d/.test(n)?t.height=t.startHeight[n]:(t.adDisclaimer=t.adParent.querySelector(".ad-disclaimer"),t.adDisclaimer&&t.adDisclaimer.offsetHeight&&(t.disTopHeight=t.adDisclaimer.offsetHeight,t.disBtmHeight=t.adDisclaimer.offsetHeight,t.disclaimerHeight=t.disTopHeight+t.disBtmHeight,t.height=`calc(${t.startHeight[n]} - ${t.disclaimerHeight}px)`)),P("slotRenderEnded","ad1x600",t),gptLayer.utils.resizeAdIframe(e.divId,t.width,t.height)}}(n),i=n.creativeCode,/noRefresh/i.test(i)&&(gptLayer.noRefresh=!0),function(e){/stickyVideoOff/i.test(e)&&(void 0===window.videoPlayerManager?gptLayer.utils.Events.listen(window,"video_player_initialized",So,{once:!0}):So())}(n.creativeCode),function(e){/stickyRightAdsOff/i.test(e)&&window.dispatchEvent(new CustomEvent("ad-stickiness",{detail:{force:!0}}))}(n.creativeCode),P("sharedAdHeader","ad.respInfo.creativeTemplateId",n.respInfo?.creativeTemplateId),(w.includes(n.respInfo?.creativeTemplateId)||m.includes(function(e){const t=e?.creativeCode?.match(/https?:\/\/ads\.celtra\.com\/([^/]+)\/\w+\.js/i);return t?t[1]:null}(n)))&&function(e,t){try{const n=document.getElementById(e).parentElement.previousElementSibling;n&&n.classList.contains("ad-disclaimer")&&(n.textContent=t)}catch(t){P("error","handleAdLabelUpdate",`Error updating ad label for ${e}:`)}}(n.divId,"Paid content")};googletag.cmd.push(()=>{googletag.pubads().addEventListener("slotRenderEnded",function e(t){const{id:n}=no(t.slot);n.includes("gpt")&&(googletag.pubads().removeEventListener("slotRenderEnded",e),performance.measure("pageload_to_first_ad"))})}),googletag.cmd.push(()=>{googletag.pubads().addEventListener("slotResponseReceived",function(e){const{id:t,refreshPrefix:n}=no(e.slot);t.includes("gpt")&&performance.measure(`gam_request_to_response_${n}${t}`,`gam_request_${n}${t}`)})}),googletag.cmd.push(()=>{googletag.pubads().addEventListener("slotRenderEnded",function(e){const{id:t,refreshPrefix:n}=no(e.slot);t.includes("gpt")&&performance.measure(`gam_request_to_render_${n}${t}`,`gam_request_${n}${t}`)})}),googletag.cmd.push(()=>{googletag.pubads().addEventListener("impressionViewable",function(e){const{id:t,refreshPrefix:n}=no(e.slot);t.includes("gpt")&&performance.measure(`gam_request_to_viewable_${n}${t}`,`gam_request_${n}${t}`)})});googletag.cmd.push(()=>{const e={adsenseAttributes:{page_url:window.location.href},centering:!0,collapseDiv:"ON_NO_FILL",disableInitialLoad:!0,singleRequest:!0};googletag.setConfig(e),googletag.pubads().addEventListener("slotRenderEnded",t);const n={childDirectedTreatment:!1};(gptLayer.cmpGppOptOut||gptLayer.cmpGpcSet)&&(n.restrictDataProcessing=!0,n.nonPersonalizedAds=!0),googletag.pubads().setPrivacySettings(n)})}(),ci||(ci=!0,googletag.cmd.push(()=>{googletag.pubads().addEventListener("slotRenderEnded",function e(){googletag.pubads().removeEventListener("slotRenderEnded",e),wi("consent_to_first_ad","consent-resolved")})})),lt.mark("shared-header-end")}const xo=e=>t=>{((e,t)=>{const n=j.get("_pc_cmp_consent",""),i=$("HRST.flags",window,{});i["fre.piano.pay-or-ok"]&&i["fre.piano.int"]&&("pending"===n||!n)&&document.querySelector(".tp-iframe-wrapper > iframe")?Y.listen(window,"app.piano.pay-or-ok.accepted app.piano.pay-or-ok.pay",()=>{e(t)}):e(t)})(e,t)},Bo=(["a.product-image-link","a.product-links.clickable-image-link",".slide-media-product > a","a.product-img-link","a.clickable-image-product-link"].join(", "),["includePianoData","trackInSimpleAnalytics"]);function No(){return!!window?.HRST?.flags?.["fre.piano.int"]}const Ho=({eventName:e,eventParameters:t={}})=>{const{subs:n,subxReg:i}=t?.includePianoData&&No()&&function(){const e={};No()&&($("tp.customVariables.paywall_shown",window,!1)&&(e.pywlPrvwBlr=1),e.subxReg=$("__PIANO__.analyticsData.subxReg",window),e.subs=$("__PIANO__.analyticsData.subs",window));return e}()||{},o={...void 0!==n&&{subs:n},...void 0!==i&&{subxReg:i}},a=(e=>Object.fromEntries(Object.entries(e||{}).filter(([e])=>!Bo.includes(e))))(t),r={send_to:"hdm_ga4",..._ga.evtProps,...a,...o};var d;d=["event",e,r],_ga.pageviewFired?Array.isArray(d)&&gtag(...d):_ga.gaQueue.push(d),P("fre-events",`sendGA4Event - ${e}`,a)},$o=(e,t)=>{"function"!=typeof window?.cmpUtils?.log?P("gdpr-mismatch",e,t):window.cmpUtils.log("gdpr-mismatch",e,t)},Go=e=>{try{return Ho({eventName:"gdpr_detection_mismatch",eventParameters:{errorMessage:e}}),!0}catch(t){const n=(({eventName:e,eventParameters:t={}})=>{const n=["event",e,{send_to:"hdm_ga4",...t}];return"function"==typeof window?.gtag?(window.gtag(...n),!0):!!Array.isArray(window?.dataLayer)&&(window.dataLayer.push(n),!0)})({eventName:"gdpr_detection_mismatch",eventParameters:{errorMessage:e}});return $o("dispatch failed",{didFallbackDispatch:n,error:t}),n}},jo=()=>{try{const e=window.googletag?.pubads?.().getSlots?.()||[];return e[0]?.getAdUnitPath?.()||"-"}catch(e){return $o("ad unit path lookup failed",e),"-"}},zo=e=>`${e||""}`.trim().toUpperCase(),Uo=e=>null==e||""===e?"-":`${e}`,Vo=({source:e="wrapper"}={})=>
1{if(!0===window._gdprMismatchReported)return!1;const t=!!window.GDPR,n=(()=>{const e=window?.cmpUtils?.locale?.otGeo;return zo(e?.country)?e:window?.Optanon?.getGeolocationData?.()||{}})(),i=(e=>{const t=zo(e?.country);if(!t)return"unknown";const n=window.HRST?.adConfig?.modules?.oneTrust?.gdprLocales;return Array.isArray(n)?n.includes(t):"unknown"})(n);if("firstAdRequest"===e&&!t&&!0!==i)return!1;let o="";if("unknown"===i)o=(({fastlyGDPR:e,oneTrustGDPR:t,source:n})=>"unknown"===t?"firstAdRequest"===n&&"function"!=typeof window.__tcfapi?"tcfMissingAtFirstAdRequest":"otMissing":e?"fastlyOnly":"otOnly")({fastlyGDPR:t,oneTrustGDPR:i,source:e});else{if(t===i)return!1;o=t?"fastlyOnly":"otOnly"}const a=(({otGeo:e={},reason:t,source:n="wrapper"}={})=>["v1","reporter:adsAndAnalytics",`source:${Uo(n)}`,`reason:${Uo(t)}`,`site:${Uo(window?.location?.hostname)}`,`adUnit:${Uo(jo())}`,`fastlyCountry:${Uo(zo(we()))}`,`otCountry:${Uo(zo(e?.country))}`,`otState:${Uo(e?.state)}`].join("|"))({otGeo:n,reason:o,source:e});$o("payload",a);return!!Go(a)&&(window._gdprMismatchReported=!0,!0)};function qo(e){const{previewContentCount:t}=window.JOURNEY_INFO||{blocked:""};let n=document.querySelector(".journey-gate")||document.querySelector("journey-inline-blocker");const i=document.querySelectorAll('[data-journey-blur="partial"]');if(!n&&t){const e="[data-journey-content],[data-journey-body=longform-article]>[data-journey-content],[data-journey-body=recipe] [data-journey-recipe-introduction] [data-journey-content],[data-journey-body=standard-article]>[data-journey-content]",i=document.querySelectorAll(e);i.length>t&&(n=i[t])}const o=[...n?[n]:[],...Array.from(i)];return 0===o.length?1/0:Math.min(...o.map(t=>function(e,t){for(let n=0;n<t.length;n++){const i=t[n],o=e.compareDocumentPosition(i);if(o&Node.DOCUMENT_POSITION_FOLLOWING||o&Node.DOCUMENT_POSITION_CONTAINED_BY)return n}return 1/0}(t,e)))}function Fo(e=""){if("d"!==J())return!1;if(!e.startsWith("gpt_gal_"))return!1;const t=e.split("_").pop();return"a"===t||"b"===t||!Number.isNaN(Number(t))}const Ko=new Set(["outofpage","pf","b","adhesion"]);function Wo(e){zt(e)&&gptLayer.utils.clearAllKVs();const t=U("article.template",""),n=Array.from(document.querySelectorAll('div[id^="gpt_"]')),i=n.map(e=>e.id);let o=1/0;switch(t){case"article":case"recipe":o=qo(n);break;case"gallery":case"listicle":o=function(e){if("listicle"!==e&&"gallery"!==e)return 1/0;const{previewBlockerSlidePosition:t}=window.JOURNEY_INFO||{blocked:""},n=J(),i=Ze()?"mgu":"default";let o=f[e]?.[n]?.[i]?.[0]?.after;return"listicle"===e&&q(U("article.metadata.listicleAdCadence",""))&&"number"==typeof o&&(o+=1),o?t>o?t-(o??0):0:(gptLayer.log("findSlideBasedStartPoint","is missing config"),gptLayer.log("findSlideBasedStartPoint","template",e),gptLayer.log("findSlideBasedStartPoint","breakpoint",n),gptLayer.log("findSlideBasedStartPoint","trafficType",i),1/0)}(t)}if(o===1/0)return new Set;const a=new Set(i.slice(o));for(const e of[...a])Fo(e)&&a.delete(e);const r="d"===J()?new Set([...Ko,"a"]):Ko;for(const e of[...a]){const t=e.split("_").pop();r.has(t)&&a.delete(e)}return gptLayer.log("getExcludedAdIds","result",{excludedIds:Array.from(a),numExcluded:a.size,startIndex:o}),a}function Yo(e=!1,t=!1){lt.mark("hdm-loader-start"),gptLayer.log("moaptAdLoader","started",gptLayer),gptLayer.getPageKVs=e=>{gptLayer.log("moaptAdLoader","getPageKVs - contentId",e),zt(e)&&gptLayer.utils.clearAllKVs();const t=U("article",{}),n=$("id",t,"").replace(/\./g,"_");Ye()&&an("spn_artid",n,!0),an("artid",n,!0),an("contentID",e,!0),an("dtype",Kt($("display",t,"")),!0),an("page",gptLayer.utils.getSlug(`${document.location.hostname}${document.location.pathname}`),!0),an("sect",$("section.prefix",t,""),!0),an("sub",$("subSection.prefix",t,""),!0),an("type",$("type",t,""),!0),document.location.hostname.match(/stage|hdmtech/i)?an("site","stage",!0):"sex.cosmopolitan.com"===document.location.hostname?an("site","sex.cosmopolitan",!0):an("site",gptLayer.adConfig.site,!0);const i=Ae("token")?.split("|")||[],o=i.includes("disablestagingads"),a=i.filter(e=>e&&"disablestagingads"!==e);
1qe()&&!o&&an("token","stagingads",!0),a.forEach(e=>an("token",e,!0)),(()=>{const{hid:e,type:t}=gt();e&&an("clid",`${t}-${e}`,!0)})(),(()=>{const e="gpt_utm";let t={};try{const n=j.get(e);n&&(t=JSON.parse(n))}catch(e){t={}}const n=["gad_source","gad_campaignid","gbraid","utm_campaign","utm_medium","utm_source"].reduce((e,n)=>{const i=Ae(n)||t[n];return i&&(an(n,i,!0),e[n]=i),e},{});n.utm_campaign&&(n.campaign=n.utm_campaign),n.utm_source&&(n.source=n.utm_source),n.utm_medium&&(n.medium=n.utm_medium),0!==Object.keys(n).length&&j.set(e,JSON.stringify(n),30)})(),(()=>{const e=ve("campaign");if(!e)return;const t=[{pattern:/^ign/i,value:"ign"},{pattern:/^dda/i,value:"dda"},{pattern:/^mgu.*_prog(_|$)/i,value:"mgua"},{pattern:/^mgu.*_comm(_|$)/i,value:"mguc"},{pattern:/^mgu/i,value:"mgu"}].find(({pattern:t})=>t.test(e));t&&an("pt",t.value,!0)})(),K()&&an("has","st",!0),an("refdomain",ti(),!0),an("refer",((e=document.referrer,t=window.location.hostname,n=navigator)=>{const i=j.get("gpt_soc"),o=/facebook\.com|t\.co|pinterest\.com|plus\.url\.google\.com/i.test(e),a=/FB|Twitter|Pinterest|GooglePlus/i.test(n),r=/socialflow/i.test(document.location.search);return i||o||a||r?(j.set("gpt_soc","social",30),j.set("gpt_soc","social",30),"social"):e&&e.split("/",3)[2].indexOf(t)>-1?"int":"ext"})(),!0),function(){let e=$("canonicalUrl",t,"");if(!e){const t=document.getElementsByTagName("link");for(let n=0;n<t.length;n++)"canonical"===t[n].getAttribute("rel")&&(e=t[n].href)}!!e&&(e=e.split("/")[2].replace("www.",""),an("orgpub",e,!0))}(),(()=>{window.gptLayer.ab=window.gptLayer.ab||{},an("ab",$("gptLayer.ab.rnd",window,!1)||(window.gptLayer.ab.rnd=Math.ceil(10*Math.random()).toString()),!0);let e=$("gptLayer.ab.rndSop",window,!1)||(window.gptLayer.ab.rndSop=Math.ceil(100*Math.random()).toString());e=String(e).padStart(3,"0"),an("ab",`sop${e}`,!0);const t=Wt();window.getCMPConsent("category","C0004",function(){j.set("gpt_session_ab",t,30)}),an("ab",t,!0);const n=G("HRST.abTestingFullStack",window,[]);n&&Array.isArray(n)&&n.forEach(e=>{const[t,n]=e.split(":");an("ab",`ofs.${t}.${n}`)})})(),an("cat",$("adCategory.prefix",t,""));const r=$("themes",t,[]);for(let e=0;e<r.length;e++)r[e]&&an("cat",r[e].toLowerCase(),!0);an("tool",gptLayer.utils.getToolKVP(e),!0),(()=>{if(Oe()&&an("has","video",!0),Ye()&&an("has","sponsorship",!0),window.gptLayer.isEasel&&an("has","easel",!0),window.JOURNEY_INFO){const{blocked:e}=window.JOURNEY_INFO;"partial"!==e&&"full"!==e||an("has","paywall",!0)}const e=[[".gallery-grids","productwidget"],[".product-btn-link, .body-btn-link","productbutton"],[".embed-poll","poll"],["#HMQuiz-root","quiz"],['[data-embed="poll"]',"poll"]];for(let t=0;t<e.length;t++)document.querySelector(e[t][0])&&an("has",e[t][1],!0);an("has",O(),!0),an("has",function(){const e=window.doNotTrack||navigator.msDoNotTrack||navigator.doNotTrack;return"1"===e||"yes"===e?"dnt":"nodnt"}(),!0),an("has",function(){if($("HRST.mylo.subscriptions",window,[]).length)return"mylo-sub";const e=j.get("_HFID");return/mylo/i.test(e)?"mylo-nosub":"nomylo-nosub"}(),!0),new RegExp(["adwallet"].join("|"),"i").test(navigator.userAgent)||(bt()?(an("has","nogpu",!0),an("has","bot",!0)):$e()&&an("has","bot",!0)),"immersive"===$("HRST.landing.experience",window,"")&&an("has","immersive-experience",!0),an("has",`ccdl-${$("gptLayer.cookieDeprecationLabel",window,"na")}`,!0),an("has",`net_${Lt()}`,!0)})(),(()=>{const e=$("HRST.article.contextualTags.hctx",window,[]);e.length>0&&an("hctx",e,!0)})(),(()=>{const e=$("HRST.article.contextualTags.ptx",window,[]);e.length>0&&an("ptx",e,!0)})(),an("viewport",gptLayer.utils.getViewport(),!0),an("clc",Oi(e),!0),an("program",Object.prototype.hasOwnProperty.call(t,"sponsor")?t.sponsor.program?t.sponsor.program.toLowerCase():""===$("HRST.landing.sponsor",window,"")?"":$("HRST.landing.sponsor.program",window,"")?$("HRST.landing.sponsor.program",window,"").toLowerCase():"":"",!0);an("pageurl",document.location.hostname+document.location.pathname,!0)},gptLayer.refresh=(e,t=!1)=>{if(Ke())return;if(0===e.length)return;gptLayer.log("loadScripts","script.load","Refresh bidders started"),gptLayer.refreshStart=Date.now(),googletag.pubads().set("page_url",window.location.href),gptLayer.lastAdCallTimestamp=Date.now();const n=()=>
1{if(gptLayer.utils.deleteKV("load"),gptLayer.utils.setPageKV(),Jn(e),googletag.pubads().clear(e),e.forEach(e=>{const n=e.getSlotElementId();gptLayer.log("GAM","ad.request",`Request: ${n}`),oo(n,t)}),googletag.pubads().refresh(e),gptLayer.isInitialLoad){lt.mark("hdm-request-ads-initial");try{Vo({source:"firstAdRequest"})}catch(e){gptLayer.log("moaptAdLoader","trackGdprMismatch failed",e)}}gptLayer.isInitialLoad=!1,gptLayer.utils.removeValueFromKey("jam_","has")},i=gptLayer.isInitialLoad?gptLayer.timeout:gptLayer.refreshTimeout;gptLayer.log("loadScripts","refreshBidders","Before"),gptLayer.log("loadScripts","script.load","Refresh bidders started"),lt.mark("hdm-bidders-start"),Gn(e,i),gptLayer.log("loadScripts","refreshBidders","After");const o=gptLayer.utils.getBidderSlotIndex(e);let a;function r(){clearTimeout(a),lt.mark("hdm-bidders-complete"),gptLayer.log("loadScripts","script.success",`All bids received ${Date.now()-gptLayer.refreshStart}ms`),n()}Y.listen(window,`ad.bidders.complete.${o}`,r,{once:!0}),a=setTimeout(()=>{lt.mark("hdm-bidders-timeout"),lt.mark("hdm-bidders-complete"),Y.remove(window,`ad.bidders.complete.${o}`,r),gptLayer.log("loadScripts","script.error","Bidder timeout reached"),n()},i)},gptLayer.defineAdSlotsById=(e,t,n)=>{gptLayer.log("moaptAdLoader","defineAdSlots - contentId",t);const i=Array.isArray(e)?e:[e];googletag.cmd.push(()=>{lt.mark("hdm-insert-defining-ad-slots"),gptLayer.log("moaptAdLoader","defineAdSlots - contentId",t),gptLayer.log("moaptAdLoader","defineAdSlots - gptLayer.adSlots",{...gptLayer.adSlots});const e=Ht();i.forEach(i=>{const o=gptLayer.utils.getAdUnit(),a=gptLayer.adSlots[i];if(!a)return;const r=`${o}${a.au3}`;let d;if((n=>n&&n.contentId===t&&!n.defined&&!e(i))(a)&&(a.outofpage?d=googletag.defineOutOfPageSlot(r,i):(d=googletag.defineSlot(r,a.adSize,i),gptLayer.log("moaptAdLoader",`defineAdSlots - ${i} - slot`,d)),d)){gptLayer.slots[i]=d,Jn(d,n),d.addService(googletag.pubads());const e={adUnit:r,divId:i,slotSizes:a.adSize};gptLayer.log("GAM","ad.define",JSON.stringify(e)),gptLayer.adSlots[i].defined=!0}})})},gptLayer.defineAdSlots=(e,t,n)=>{gptLayer.log("moaptAdLoader","defineAdSlots - contentId",t),googletag.cmd.push(()=>{lt.mark("hdm-insert-defining-ad-slots"),gptLayer.log("moaptAdLoader","defineAdSlots - loadGroup",e),gptLayer.log("moaptAdLoader","defineAdSlots - contentId",t),gptLayer.log("moaptAdLoader","defineAdSlots - gptLayer.adSlots",{...gptLayer.adSlots});const i=Ht();Object.entries(gptLayer.adSlots).forEach(([o,a])=>{const r=`${gptLayer.utils.getAdUnit()}${a.au3}`;let d;if(a.loadGroup===e&&a.contentId===t&&!gptLayer.adSlots[o]?.defined){if(a.outofpage)d=googletag.defineOutOfPageSlot(r,o);else{if(i(o))return void gptLayer.log("moaptAdLoader","slot prohibited - divId",o);d=googletag.defineSlot(r,a.adSize,o)}if(d){gptLayer.slots[o]=d,Jn(d,n),d.addService(googletag.pubads());const e={adUnit:r,divId:o,slotSizes:a.adSize};gptLayer.log("GAM","ad.define",JSON.stringify(e)),gptLayer.adSlots[o].defined=!0}}})})},gptLayer.callAdSlotsById=(e,t)=>{gptLayer.log("moaptAdLoader","callAdSlotById - contentId",t);const n=Array.isArray(e)?e:[e],i=Ht();googletag.cmd.push(()=>{gptLayer.log("GAM","ad.init",`Init ${e} ads`),gptLayer.defineAdSlotsById(e,t),gptLayer.utils.setPageKV(t),gptLayer.enabled||function(){if(Object.prototype.hasOwnProperty.call(gptLayer.kv,"idl")){let e=gptLayer.kv.idl[0];e=e.replace(/_|-/g,""),googletag.pubads().setPublisherProvidedId(e)}const e=gptLayer.utils.getHFID();e&&googletag.pubads().setPublisherProvidedId(e),googletag.enableServices(),gptLayer.enabled=!0}(),lt.mark("hdm-insert-displaying-ad-slots");const o=[];n.forEach(e=>{if((e=>{const n=gptLayer.adSlots[e];return n&&n.contentId===t&&!i(e)})(e)){googletag.display(e),gptLayer.log("GAM","ad.display",`Display: ${e}`);const t=vn(e);t&&o.push(t)}}),o.length>0&&(gptLayer.refresh(o),gptLayer.lastAdCallTimestamp=Date.now())})},gptLayer.callAdSlots=(e,t,n,i)=>{if(i)return!1;gptLayer.log("moaptAdLoader","callAdSlots - contentId",t),googletag.cmd.push(()=>{if(gptLayer.log("GAM","ad.init",`Init ${e} ads`),"imm"===e&&(gptLayer.immRequested=!0),gptLayer.defineAdSlots(e,t,n
1),gptLayer.utils.setPageKV(t),!gptLayer.enabled){if(Object.prototype.hasOwnProperty.call(gptLayer.kv,"idl")){let e=gptLayer.kv.idl[0];e=e.replace(/_|-/g,""),googletag.pubads().setPublisherProvidedId(e)}const e=gptLayer.utils.getHFID();e&&googletag.pubads().setPublisherProvidedId(e),googletag.enableServices(),gptLayer.enabled=!0}lt.mark("hdm-insert-displaying-ad-slots");const i=Ht();Object.entries(gptLayer.adSlots).forEach(([n,o])=>{if(o.loadGroup===e&&o.contentId===t){if(i(n))return;googletag.display(n),gptLayer.log("GAM","ad.display",`Display: ${n}`)}});const o=gptLayer.utils.getSlotsByLoadGroup(e,t);o.length>0&&(gptLayer.refresh(o),gptLayer.lastAdCallTimestamp=Date.now())})};let n=!1;const i=()=>{n||(n=!0,gptLayer.utils.Events.fire(window,"adScriptsDone",{}),window.gptLayer.adScriptsDone=!0,gptLayer.log("moaptAdLoader","loadImmAds - adScriptsDone",window.gptLayer.adScriptsDone))},o={},a=e=>{o[`${e}_imm`]||(gptLayer.log("moaptAdLoader","loadImmAds - contentId",e),gptLayer.callAdSlots("imm",e,!1,t),o[`${e}_imm`]=!0),i()};function r(r){if(document.location.pathname.match(/\/privacy-policy|\/about-our-ads|\/oba-policy/i)||gptLayer.ab.noAds)return gptLayer.utils.hideAllAdSlots(),gptLayer.log("GAM","ad.error","Kill switch detected"),gptLayer.utils.Events.fire(window,"adScriptsDone",{}),void(window.gptLayer.adScriptsDone=!0);gptLayer.log("moaptAdLoader","loadAds - contentId",r);const d=["email","verify","src","cm_lm"];for(let e=0;e<d.length;e++){if(gptLayer.utils.getParam(d[e]).match(/^[-a-z0-9~!$%^&*_=+}{'?]+(\.[-a-z0-9~!$%^&*_=+}{'?]+)*@([a-z0-9_][-a-z0-9_]*(\.[-a-z0-9_]+)*\.(aero|arpa|biz|com|coop|edu|gov|info|int|mil|museum|name|net|org|pro|travel|mobi|[a-z][a-z])|([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}))(:[0-9]{1,5})?$/i)||document.location.href.match(/email%3D/i))return void gptLayer.log("GAM","ad.error","PII detected")}gptLayer.log("GAM","ad.begin","GAM execution started"),gptLayer.getPageKVs(r);const s="HMIJP"===gptLayer.adConfig.bu,l=()=>{s?setTimeout(()=>a(r),250):a(r)};gptLayer.adPlacementsInserted?l():Y.listen(window,"adsLoadedIntoPlacements",()=>{l()},{once:!0}),e&&gptLayer.viewPortObserver?.disconnect();let c="photo-snap-gallery"===gptLayer.template?document.querySelector('[data-track-type="photo-snap-wrapper"]'):null;window.HRST?.immersiveContentId&&(c=document.querySelector(`[data-current-article="${window.HRST.immersiveContentId}"]`)),gptLayer.log("GAM","observerRoot",c);const p={root:c,rootMargin:`${gptLayer.ab.buffer}px`,threshold:0};if(gptLayer.viewPortObserver=new IntersectionObserver(e=>{gptLayer.excludedAdIds&&(gptLayer.excludedAdIds=Wo(r));let n=gptLayer.excludedAdIds||new Set;e.forEach(e=>{if(e.isIntersecting){const a=e.target.id;if(n.has(a))gptLayer.utils.unobserveAdSlot(a),en("collapseadcontainer",a);else{const n=gptLayer.utils.getLoadGroup(a);Object.prototype.hasOwnProperty.call(o,`${r}_${n}`)||(gptLayer.callAdSlots(n,r,gptLayer?.skipScroll,t),o[`${r}_${n}`]=!0,"imm"===n&&i()),gptLayer.utils.unobserveAdSlot(e.target.id)}}})},p),Ke()){gptLayer.viewPortObserver.disconnect();gptLayer.utils.getUndefinedSlots(r).forEach(e=>en("collapseadcontainer",e))}else{const e=!0===n?"adsLoadedIntoPlacements adsLoadedIntoPlacements-dynamic app.adApiUpdate":"adScriptsDone adsLoadedIntoPlacements app.adApiUpdate";Y.listen(window,e,()=>{setTimeout(gptLayer.utils.raf(()=>{gptLayer.utils.observeAdSlots(r)}),0)}),gptLayer.utils.raf(()=>{gptLayer.utils.observeAdSlots(r)})}gptLayer.utils.Events.listen(window,"app.nextContentLoaded",e=>{const t=e.detail,n=t["HRST.article"],i=t["HRST.datalayer"];window.HRST.nextContent=window.HRST.nextContent||{},n&&(window.HRST.nextContent.article=n),i&&(window.HRST.nextContent.datalayer=i),googletag.cmd.push(()=>{googletag.pubads().set("page_url",window.location.href)})}),function(){if(gptLayer.isSponsored)return!1;gptLayer._limitBreakersAbort&&gptLayer._limitBreakersAbort.abort(),gptLayer._limitBreakersAbort=new AbortController;const e=[];function t(e){if(gptLayer.slots[e]){const t=document.querySelector(`#${e}`);if(t){const n=t.clientHeight,i=t.querySelector("iframe");
1i&&(i.src="about:blank"),t.style.minHeight=`${n}px`,t.style.backgroundColor="#f5f5f5",googletag.destroySlots([gptLayer.slots[e]]),gptLayer.slots[e]=null,delete gptLayer.slots[e],t.replaceChildren()}}}window.addEventListener("adRendered",n=>{!function(n){if(!/^gpt_(feed_)?lb_\d+(?:_\d+)?$/.test(n))return!1;const i=`gpt_${gptLayer.immersiveDivIdLabel}lb_`,o=`gpt_${gptLayer.immersiveDivIdLabel}gal_`,a=n.replace(i,"");for(e.includes(a)||e.push(a);e.length>6;){const n=e.shift();t(`${i}${n}`),t(`${o}${n}`)}}(n.detail.id)},{signal:gptLayer._limitBreakersAbort.signal})}()}let d=window.HRST?.immersiveContentId;d||(d=$("HRST.metadata.contentId",window,"no-id")),gptLayer.log("moaptAdLoader","contentId",d),Ti(xo(r),xo(function(e){const t=()=>{const n=Wo(e);gptLayer.excludedAdIds=n,Y.remove(window,"adsLoadedIntoPlacements",t),r(e)};gptLayer.adPlacementsInserted?t():Y.listen(window,"adsLoadedIntoPlacements",t),Y.listen(window,"adsLoadedIntoPlacements-dynamic",()=>{gptLayer.excludedAdIds=Wo(e)})}),d),lt.mark("hdm-loader-end")}const Qo={};class Zo{constructor(e){this.placements=e,this.index=0,this.iteration=0}static getId(e){return Qo[e.id]=Qo[e.id]||0,e.id.replace("{i}",Qo[e.id]++)}static formElement(e){const t=document.createElement("div"),n=Zo.getId(e),i=document.getElementById(e.template),o=null===i?'<div id="{id}"></div>':i.innerText;return t.innerHTML=o.replace("{id}",n),t.firstElementChild}getNextPlacement(){for(let e=0;e<this.placements.length;e++){const e=x({},this.placements[this.index]),t=this.iteration;if(this.index+=1,this.index>=this.placements.length&&(this.index=0,this.iteration+=1),!(e.once&&t>0))return{...e,id:Zo.getId(e),reserve:e.reserve||0}}return null}}let Jo=350;let Xo=!1;const ea=e=>(e.classList.contains("journey-gate")&&(Xo=!ce()),Xo?0:"P"===e.nodeName?e.innerText.length:"DIV"===e.nodeName&&(e.className.match(/embed/)||"embed"in e.dataset||"spec"in e.dataset)?(e=>{const t=e.getAttribute("data-align")||"center",n=e.getAttribute("data-size")||"medium";let i=1,o=1;return"center"!==t&&(i=-1),"small"===n?o=.5:"large"===n&&(o=1.5),Jo*i*o})(e):0),ta=(e,t,n)=>{let i=0;for(let o=t+1;o<e.length;o++)if(i+=e[o],i>=n)return!0;return!1},na=(e,t)=>{t.embedCharacterCount&&(Jo=t.embedCharacterCount);const n=[],i=e.map(e=>ea(e)),o=new Zo(t.placements);let a=0,r=o.getNextPlacement();return i.forEach((e,t)=>{for(a+=e;r&&a>=r.after&&ta(i,t,r.reserve);)n.push({index:+t,placement:r}),a=0,r=o.getNextPlacement()}),n},ia=700,oa=1500,aa={"listicle-body-content":{d:{firstAds:{minElements:1,minGapAddition:oa,minGapMultiply:0},firstAdsWithLede:{minElements:1,minGapAddition:oa,minGapMultiply:0,minusLedeHeight:!0},requiredLeftSpace:{addition:0,multiply:1},restAds:{minElements:1,minGapAddition:ia,minGapMultiply:1}},m:{firstAds:{minElements:1,minGapAddition:0,minGapMultiply:0},firstAdsWithLede:{minElements:1,minGapAddition:0,minGapMultiply:1},requiredLeftSpace:{addition:0,multiply:1},restAds:{minElements:1,minGapAddition:0,minGapMultiply:1}}},"longform-body":{d:{firstAds:{minElements:2,minGapAddition:0,minGapMultiply:1},firstAdsWithLede:{minElements:2,minGapAddition:0,minGapMultiply:1,minusLedeHeight:!0},requiredLeftSpace:{addition:0,multiply:1},restAds:{minElements:2,minGapAddition:0,minGapMultiply:1}},m:{firstAds:{minElements:2,minGapAddition:500,minGapMultiply:0},firstAdsWithLede:{minElements:1,minGapAddition:200,minGapMultiply:0,minusLedeHeight:!0},requiredLeftSpace:{addition:0,multiply:1},restAds:{minElements:2,minGapAddition:0,minGapMultiply:1.25,minGapMultiplyLI:1.01}}},recipe:{d:{firstAds:{minElements:2,minGapAddition:500,minGapMultiply:1},firstAdsWithLede:{minElements:1,minGapAddition:200,minGapMultiply:1,minusLedeHeight:!0},requiredLeftSpace:{addition:ia,multiply:1},restAds:{minElements:1,minGapAddition:ia,minGapMultiply:1}},m:{firstAds:{minElements:2,minGapAddition:0,minGapMultiply:1},firstAdsWithLede:{minElements:1,minGapAddition:0,minGapMultiply:1,minusLedeHeight:!0},requiredLeftSpace:{addition:0,multiply:1},restAds:{minElements:2,minGapAddition:0,minGapMultiply:1.25,minGapMultiplyLI:1.01}}},"review-body-content":{d:{firstAds:{minElements:2,minGapAddition:900,minGapMultiply:0},firstAdsWithLede:{minElements:1,minGapAddition:900,minGapMultiply:0},requiredLeftSpace:{addition:ia,multiply:0},restAds:{minElements:2,minGapAddition:850,minGapMultiply:1}},m:{firstAds:{minElements:2,minGapAddition:500,minGapMultiply:0},firstAdsWithLede:{minElements:1,minGapAddition:200,minGapMultiply:0},requiredLeftSpace:{addition:0,multiply:1},restAds:{minElements:2,minGapAddition:0,minGapMultiply:1.25,minGapMultiplyLI:1.01}}},"slide-container":{m:{firstAds:{minElements:1,minGapAddition:0,minGapMultiply:0},firstAdsWithLede:{minElements:1,minGapAddition:0,minGapMultiply:1},requiredLeftSpace:{addition:0,multiply:1},restAds:{minElements:1,minGapAddition:0,minGapMultiply:1}}},"standard-body-content":{d:{firstAds:{minElements:2,minGapAddition:oa,minGapMultiply:0},firstAdsWithLede:{minElements:1,minGapAddition:oa,minGapMultiply:0,minusLedeHeight:!0},requiredLeftSpace:{addition:ia,multiply:0},restAds:{minElements:2,minGapAddition:ia,minGapMultiply:1}},m:{firstAds:{minElements:2,minGapAddition:500,minGapMultiply:0},firstAdsWithLede:{minElements:1,minGapAddition:200,minGapMultiply:0},requiredLeftSpace:{addition:0,multiply:1},restAds:{minElements:2,minGapAddition:0,minGapMultiply:1.01,minGapMultiplyLI:1.01}}},"vehicle-category-rankings-body-content":{d:{firstAds:{minElements:1,minGapAddition:oa,minGapMultiply:0},firstAdsWithLede:{minElements:1,minGapAddition:oa,minGapMultiply:0,minusLedeHeight:!0},requiredLeftSpace:{addition:0,multiply:1},restAds:{minElements:1,minGapAddition:ia,minGapMultiply:1}},m:{firstAds:{minElements:1,minGapAddition:0,minGapMultiply:0},firstAdsWithLede:{minElements:1,minGapAddition:0,minGapMultiply:1},requiredLeftSpace:{addition:0,multiply:1},restAds:{minElements:1,minGapAddition:0,minGapMultiply:1}}}}
1,ra=Object.keys(aa),da=".left-right-image-lede",sa=[".text-over-lede",".text-under-lede",da].join(", "),la=e=>e.classList.contains("embed")||"embed"in e.dataset,ca=e=>"adExclude"in e.dataset&&window.matchMedia(e.dataset.adExclude).matches,pa=["P","UL","OL"],ga=["P","LI"],ua=e=>(Et()?ga:pa).includes(e.nodeName)||la(e)||e.classList.contains("listicle-slide")||e.classList.contains("slideshow-slide")||e.classList.contains("embedded-gallery-slide");let ma=!1;const wa=(e,t,n=[])=>{if(e.classList.contains("journey-gate")&&(ma=!ce()),ma)return 0;if(la(e)&&(e=>{let t=e.nextElementSibling;if(t&&"STYLE"===t.nodeName&&(t=null),t&&e.offsetTop+e.offsetHeight>t.offsetTop+t.offsetHeight)return!0;const n=window.getComputedStyle(e).getPropertyValue("float")||"";return"left"===n||"right"===n})(e))return ca(e)?0:-e.offsetHeight;if(n?.length){const i=e?.dataset?.nodeId,o=i!==n[n.length-1]?0:window.innerHeight;return t?e.scrollHeight+o:e.offsetHeight+o}return t?e.scrollHeight:e.offsetHeight},fa=(e,t,n)=>{const{index:i}=e,{ledeHeight:o,listData:a,screenHeight:r}=t,d=a?.[i]?.isListItem;if(!d&&a?.[i+1]?.isListItem)return!1;const s=e.el?.dataset?.nodeId;if(s?.includes(".slide.0"))return!1;const{el:l,placement:c,gapPixels:p,gapElements:g,isFirstAds:u}=e;let m=n.restAds;u&&(m=0===o?n.firstAds:n.firstAdsWithLede);const{minGapMultiply:w,minGapMultiplyLI:f=1.01,minGapAddition:y,minElements:h,minusLedeHeight:b=!1}=m;let A=(d?f:w)*r+y;return A-=b?o:0,ua(l)&&(0===c.after||p>=A&&g>=h)&&(!d||((e,t)=>{const n=t?.[e]||{};if(!n.isListItem||n.hasEmbed)return!1;const i=Array.from({length:3},(e,t)=>t+1),o=i.some(n=>{const i=t?.[e-n],o=t?.[e+n];return 3===n?!o?.isListItem||o?.hasEmbed:!i?.isListItem||i?.hasEmbed||!o?.isListItem||o?.hasEmbed}),a=!t?.[e+1]?.isListItem&&!i.some(n=>{const i=t?.[e-n];return 3!==n&&(!i?.isListItem||i.hasEmbed)});return!o||a})(i,a))},ya=(e,t,n,i=[])=>{const{index:o}=e,{elements:a,heights:r,screenHeight:d,shouldReduceAdSpacing:s}=t,{requiredLeftSpace:l}=n,c=a[o],p=c?.dataset?.nodeId,g=p&&i?.includes(p),u=g||s?0:l.multiply,m=g?0:l.addition;return r.reduce((e,t,n)=>e+(n>o&&ua(a[n])?t:0),0)>u*d+m},ha=(e,t,n,i=!0,o=[])=>{const a=[],r=new Zo(n.placements),d=Et(),s=n?.hasTruncatedElements,{heights:l,listData:c}=t.reduce((e,t)=>{e.heights.push(wa(t,s,o));const n=d&&"LI"===t?.nodeName;return e.listData.push({hasEmbed:n&&[...t?.children||[]].some(e=>{la(e)}),isListItem:n}),e},{heights:[],listData:[]}),p=(()=>{const e=J(),t=[".content-lede-image, .content-lede-loop, .content-lede-video, .header-media, .content-lead-image, .content-lead"],n={"longform-article":{d:sa,m:sa,t:sa},"standard-article":{m:da,t:da}},i=n[window?.gptLayer?.display]?.[e];i&&t.push(i);const o=document.querySelector(t.join(", "));return o?o.offsetHeight:0})(),g=window.innerHeight,u=n.targetConfig||(e=>{const t=J();if("recipe"===window?.HRST?.article?.template)return aa.recipe["d"===t?"d":"m"];let n={d:{},m:{}};return ra.forEach(t=>{e.classList.contains(t)&&(n=aa[t])}),e.classList.contains("slide-container")&&!e.classList.contains("new-tablet-disabled")&&!document.getElementsByTagName("html")[0].classList.contains("no-tablet")||"d"!==t?n.m:n.d})(e),m=Vt(),w={elements:t,heights:l,ledeHeight:p,listData:c,screenHeight:g,shouldReduceAdSpacing:m};let f=r.getNextPlacement(),y=0,h=0,b=i;return l.forEach((e,n)=>{const i=t[n];y+=e,h+=ua(i)&&e>0?1:0;let d={el:i,gapElements:h,gapPixels:y,index:n,isFirstAds:b,placement:f};for(;fa(d,w,u)&&ya(d,w,u,o)&&!ca(d.el);)a.push({index:+n,placement:f}),y=0,h=0,b=!1,f=r.getNextPlacement(),d={el:i,gapElements:h,gapPixels:y,index:n,isFirstAds:b,placement:f}}),a},ba=(e,t,n)=>{const i=[],o=e.length,a=new Zo(t.placements,n);let r=a.getNextPlacement(),d=0;return"gallery"===t.type&&(i.push({index:-1,placement:r}),r=a.getNextPlacement()),e.forEach((e,t)=>{for(d++;d>=r.after&&!(r.reserve>o-(t+1));)i.push({index:t,placement:r}),d=0,r=a.getNextPlacement()}),i},Aa=(e,t,n)=>{let i=0;for(let o=t+1;o<e.length;o++)if(i+=e[o],i>=n)return!0;return!1},Ia=(e,t)=>{const n=[],i=e.map(e=>(e=>{const t=e.querySelectorAll("div[data-ads-spec-row]");return t&&t.length?t.length:0})(e)),o=new Zo(t.placements);let a=0,r=o.getNextPlacement();
1return i.forEach((e,t)=>{for(a+=e;r&&a>=r.after&&Aa(i,t,r.reserve);)n.push({index:+t,placement:r}),a=0,r=o.getNextPlacement()}),n},va={generate:(e,t)=>{switch(e){case"specRows":return Ia(t.elements,t.config);case"character":return na(t.elements,t.config);case"screen":return ha(t.container,t.elements,t.config,t.insertFirstAd,t.aboveExclusionZoneDataNodeIds);case"slide":return ba(t.elements,t.config,t.startIteration);default:return[]}}},Sa=e=>e instanceof HTMLElement&&"STYLE"!==e.nodeName&&null!==e.offsetParent,La=e=>{try{const t=Array.from(e.querySelectorAll(".embedded-gallery-grid .embedded-gallery-slide"));if(P("getEmbeddedGallerySlides","totalSlides",t.length),!t.length)return P("getEmbeddedGallerySlides","warning","No embedded gallery slides found"),[];const n=e.querySelector(".embedded-gallery-grid"),i="m"===J()?1:(e=>{try{const t=window.getComputedStyle(e).gridTemplateColumns;if(P("getGalleryColumnCount","gridTemplateColumns",t),!t||"none"===t||["repeat(","[","auto-fit","auto-fill"].some(e=>t.includes(e)))return P("getGalleryColumnCount","unreliable",{reason:"Complex grid definition detected, skip ads in this gallery",value:t}),null;const n=t.split(" ").filter(e=>""!==e).length;return n?(P("getGalleryColumnCount","result",{columnCount:n}),n):(P("getGalleryColumnCount","unreliable","Column count out of range, skip ads in this gallery"),null)}catch(e){return P("getGalleryColumnCount","error",{message:e.message,stack:e.stack?.substring(0,200)}),null}})(n);if(!i)return P("getEmbeddedGallerySlides","skipped",{reason:"Grid parsing unreliable, skipping ads in gallery"}),[];const o=t.filter((e,t)=>t%i===0);return P("getEmbeddedGallerySlides","result",{firstSlidesCount:o.length,numColumns:i,slideIndices:o.map(e=>t.indexOf(e))}),o}catch(e){return P("getEmbeddedGallerySlides","error",{message:e?.message,stack:e?.stack?.substring(0,200)}),[]}};let Ca=[],_a=0;const ka=(e,t)=>new Promise(n=>{requestAnimationFrame(()=>n(e(...t)))}),Ta=(e,t,n)=>e.insertBefore(t,n),Ma=(e,t)=>e.appendChild(t),Ea=({aboveExclusionZoneDataNodeIds:e=[],config:t,containers:n,elements:i})=>{const o=t.calculateMethod||"screen",a=va.generate(o,{aboveExclusionZoneDataNodeIds:e,config:t,container:n,elements:i});return Ca=[],a.map(({placement:{type:e,id:t,after:n},index:o})=>({id:t,type:e,...n&&{el:i[o+1]}}))},Da=[{extract:e=>La(e),matches:e=>"embed-gallery"===e?.dataset?.embed,name:"embedded-gallery"},{extract:e=>{const t=e?.childNodes||[];return Array.from(t).filter(e=>"LI"===e?.nodeName)},matches:e=>e?.nodeName&&["UL","OL"].includes(e.nodeName),name:"list"},{extract:e=>[e],matches:()=>!0,name:"default"}];const Pa=B(function(){const e=window?.HRST?.flags?.["fre.prevent-article-switch"];if(!e){const[,...e]=Da;return e}return Da}),Ra=e=>{const t=e.selector||".article-body-content",n=e.container||document.querySelector(t);if(null===n)return Promise.reject(new Error("container does not exist"));const i=[].slice.call(n.childNodes).filter(Sa),o=Et()?i.reduce((e,t)=>{const n=(e=>{const t=Pa().find(t=>t.matches(e)),n=t.extract(e);return P("processElement","handlerResult",{handlerName:t.name,resultCount:n.length}),n})(t);return e.push(...n),e},[]):i,a=Ea({config:e,containers:n,elements:o});let r;const d=new Promise(e=>{r=e});a.onReady=r,Ca.push(d);const s=window.adPlacementRegistry;if(s){s.onReady||(window.adPlacementRegistry.onReady=r);(Array.isArray(s)?s:[s]).forEach(e=>e&&e.constructor===Function&&e(a))}return window.adPlacementRegistry=a,window.HRST?.immersiveContentId?Promise.resolve(Ca):Promise.all(Ca)},Oa=(e,t,n,i)=>{const o=e.container||document.querySelector(t);let a="screen";a=e.method||a;const r=_a;let d=[].slice.call(document.querySelectorAll(n));d="gallery"!==e.type||Ze()?d.slice(r):d.slice(r,r+32);const s=va.generate(a,{config:e,container:o,elements:d,insertFirstAd:!i});return Ca=[],s.forEach((e,t)=>{const n=e.index+1,i=d[n];if(_a=r+n,0===t&&-1===e.index){if(o.previousSibling.className===e.placement.el.className)return;const t=[o.parentNode,e.placement.el,o];return void Ca.push(ka(Ta,t))}if(i){const t=[o,e.placement.el,i];Ca.push(ka(Ta,t))}else Ca.push(ka(Ma,[o,e.placement.el]))}),Promise.all(Ca)},xa=async(e,t=!1)=>
1{switch(e.type){case"recipe":{const t=await(async e=>{const t=e?.skipDirections,n=t?[".recipe-body-content"]:[".directions > li:has(> ol)",".recipe-body-content"].join(", "),i=document.querySelector("#recipe-introduction"),o=document.querySelectorAll(n),a=[i,...Array.from(o)].filter(Boolean);if(!a.length)return Promise.reject(new Error("containers do not exist"));const r=Array.from(o).flatMap(e=>Array.from(e?.childNodes||[])),d=[].slice.call(i?.childNodes||[]).filter(Sa),s=[].slice.call(r).filter(Sa),l=d.concat(s.reduce((e,t)=>(t?.nodeName&&!["UL","OL"].includes(t.nodeName)?e.push(t):(t?.childNodes||[]).forEach(t=>{"LI"===t?.nodeName&&e.push(t)}),e),[])),c=Array.from(document.querySelectorAll('[data-ad-exclusion-zone="true"]')),p=await("d"===J()?rt(c,l):l),g=d.map(e=>e?.dataset.nodeId).filter(Boolean),u=Ea({aboveExclusionZoneDataNodeIds:g,config:e,containers:a,elements:p});let m;const w=new Promise(e=>{m=e});u.onReady=m,Ca.push(w);const f=window.adPlacementRegistry;f&&(f.onReady||(window.adPlacementRegistry.onReady=m),(Array.isArray(f)?f:[f]).forEach(e=>e&&e.constructor===Function&&e(u)));return window.adPlacementRegistry=u,window.HRST?.immersiveContentId?Promise.resolve(Ca):Promise.all(Ca)})(e);return t}case"article":return Ra(e);case"listicle":case"photo-snap-gallery":return Oa(e,".listicle-body-content",".listicle-slide");case"gallery":return Oa(e,".slide-container",".slideshow-slide",t);case"vehicle-category-rankings":return Oa(e,".vehicle-category-rankings-body-content",".vehicle-category-rankings-card");case"author":case"search":case"Homepage":case"Section":case"collection":case"visual-search":return(({type:e,callback:t,adContainerSelector:n,numberOfPages:i,itemsNumber:o})=>new Promise(a=>{const r=(o-(i-1)*("search"===e?40:32))/8|0,d=!0;if(document.querySelectorAll(n).length>=r)a(t(document.querySelectorAll(n),d));else{const e=new MutationObserver(()=>{document.querySelectorAll(n).length>=r&&(e.disconnect(),a(t(document.querySelectorAll(n),d)))});e.observe(document.querySelectorAll('div [data-id="SearchResultsWrapper"]>section')[1],{childList:!0})}}))(e);case"search-result-page":return(({adsContainer:e,callback:t})=>new Promise(n=>{document.querySelectorAll(e).length>0&&n(t())}))(e)}return Promise.resolve()},Ba={d:[[300,250],[300,400]],m:[[160,600],[300,250],[300,400],[300,600],[320,50],[320,480],"fluid"],t:[[160,600],[300,250],[300,400],[300,600],[320,50],[320,480],[728,90],"fluid"]},Na={d:[[300,100],[300,300]],m:[[1,2],[300,100],[300,300],[320,100]],t:[[1,2],[300,100],[300,300],[320,100]]},Ha={d:[[1,2],[728,90],[970,90],[970,250]],m:[[1,2],[160,600],[300,250],[300,400],[300,600],[320,50],[320,480],"fluid"],t:[[1,2],[160,600],[300,250],[300,400],[300,600],[320,50],[320,480],[728,90],"fluid"]},$a={d:[[728,250],"fluid"],m:[[300,100],[300,300],[320,100]],t:[[300,100],[300,300],[320,100]]},Ga={d:[[1,2],[1,600],[728,90],[970,90],[970,250],"fluid"],m:[[1,2],[1,600],[160,600],[300,250],[300,400],[300,600],[320,50],[320,480],"fluid"],t:[[1,2],[1,600],[160,600],[300,250],[300,400],[300,600],[320,50],[320,480],[728,90],"fluid"]},ja={d:[],m:[],t:[]},za=[[160,600],[300,250],[300,400],[300,600]],Ua=[[300,100],[300,300]],Va={d:[[160,600],[300,250],[300,400],[300,600]],m:[[1,2],[1,600],[160,600],[300,250],[300,400],[300,600],[320,50],[320,480],"fluid"],t:[[1,2],[1,600],[160,600],[300,250],[300,400],[300,600],[320,50],[320,480],"fluid"]},qa={d:[[300,100],[300,300]],m:[],t:[]},Fa={d:[[1,2],[1,6],[728,90],[970,90],[970,250],"fluid"],m:[[1,2],[1,6],[160,600],[300,250],[300,400],[300,600],[320,50],[320,480],"fluid"],t:[[1,2],[1,6],[160,600],[300,250],[300,400],[300,600],[320,50],[320,480],[728,90],"fluid"]},Ka={d:[],m:[],t:[]},Wa={d:[[160,600],[300,100],[300,250],[300,300],[300,400],[300,600]],m:[[1,2],[1,5],[1,600],[160,600],[300,250],[300,400],[300,600],[320,50],[320,480],"fluid"],t:[[1,2],[1,5],[1,600],[160,600],[300,250],[300,400],[300,600],[320,50],[320,480],[728,90],"fluid"]},Ya={d:[],m:[[300,100],[300,300],[320,100]],t:[[300,100],[300,300],[320,100]]},Qa=[[1,2],[728,90],[970,90],[970,250],"fluid"],Za=[[728,250]],Ja={d:[],m:[[300,250],[320,50]],t:[]},Xa=["gpt-ad-vertical-top"],er=["gpt-ad-vertical-top-mobile","slideshow-ad-breaker-0","gpt-ad-vertical-top","adslot-2-top-mpu"],tr=[...new Set([...Xa,...er])];function nr(){lt.mark("hdm-insert-start"),gptLayer.log("moaptAdInsert","started",gptLayer);let e=window.HRST?.immersiveContentId,t=window.HRST[e];e||(e=$("HRST.metadata.contentId",window,"no-id"),t=window.HRST),gptLayer.log("moaptAdInsert","hrstByContentId",t);const n=window.HRST[e]?.immersiveContainer||!1;
1gptLayer.log("moaptAdInsert","immersiveContainer",n);const i=J(),o=$("article.template",t,""),a=$("article.display",t,"");gptLayer.log("moaptAdInsert","breakpoint",i),gptLayer.log("moaptAdInsert","template",o),gptLayer.log("moaptAdInsert","display",a);const r=gptLayer.isMgu||$("HRST.adConfig.highDensityAdMode",window,!1),d=$("article.hideBreakerAds",t,!1),s=$("article.hideMainAd",t,!1),l=$("HRST.commerce.hasProduct",window,!1);function c(){if("d"!==i)return!1;if(n&&!gptLayer.a2a.experience)return!1;const t=`gpt_${gptLayer.immersiveDivIdLabel}lb_a`;return X("gpt-leaderboard-ad",t,null,()=>{let n="",i="";gptLayer.immRequested?(i="smart_lb_a",n="smart"):(i="imm",n="imm");let d=Qa;r&&(d=d.concat(Za)),"article"===o&&"longform-article"===a&&d.push([1,600]);const s={adSize:d,au3:"atf",divId:t,kv:{load:n,position:"atf",slot:"d-la"},loadGroup:i};gptLayer.log("moaptAdInsert - insertTopLeaderboard",`ad.${t}`,s),gptLayer.utils.addAdSlot(s,e)}),!0}function p(){if(n&&!gptLayer.a2a.experience)return!1;const e=`gpt_${gptLayer.immersiveDivIdLabel}gal_a`,t="d"!==i?er:Xa;return X(t.join(" "),e,null,()=>{g(e,"moaptAdInsert - insertTopGallery"),t.forEach(ee)}),!0}function g(t,n){let o="",a="";gptLayer.immRequested?(o=`smart_${gptLayer.immersiveDivIdLabel}gal_a`,a="smart"):(o="imm",a="imm");let d=Wa[i];r&&(d=d.concat(Ya[i]));const s={adSize:d,au3:"atf",divId:t,kv:{load:a,position:"atf",slot:"d"===i?"d-ga":"m-ga"},loadGroup:o};"gpt_gal_a"===t&&Vt()&&(s.kv.tag="forced_mob_ad"),gptLayer.log(n,`ad.${t}`,s),gptLayer.utils.addAdSlot(s,e)}function u(t){if(d)return!1;gptLayer.log("moaptAdInsert - insertBreakers","items",t);const s=t||Pt('[data-slot-type="breaker-rr"], [data-slot-type="breaker"]');gptLayer.log("moaptAdInsert - insertBreakers","moAds",s);tr.forEach(e=>((e,t)=>{if(e&&0!==e.length)for(let n=e.length-1;n>=0;n--)e[n].id!==t?e[n].querySelector&&e[n].querySelector(`#${t}`)&&e.splice(n,1):e.splice(n,1)})(s,e));for(let t=0;t<s.length;t++){const{id:d}=s[t];gptLayer.log("moaptAdInsert - insertBreakers","id",d);const c=n?/(ad|article)-breaker|breaker-(mobile|leaderboard)/i:/(ad|article)-breaker|(feed|breaker)-(mobile|leaderboard)/i;let p,g;const u=d.match(/^gpt-ad-feed-leaderboard-(\d+)(?:-(\d+))?$/);if(u){const e=Number(u[1]),t=u[2];g=e,p=t?`${e}_${t}`:`${e}`}else{const e=d.split("-");p=e[e.length-1],g=Number(p)}let m,w=!0,f=[],y=`smart${t}`,h=null,b="";if("longform-article"!==a||"gpt-leaderboard-ad"!==d&&"gpt-ad-vertical-top-mobile"!==d||(w=!1),w&&c.test(d)&&!gptLayer.adSlots[`gpt_lb_${p}`]){m=`gpt_lb_${p}`,y=`smart${p}`,b="d"===i?"d-brk":"m-brk",f=[...Ga[i]],r&&(f=f.concat(ja[i])),!l||"standard-article"!==a&&"listicle"!==o||f.push([1,450]);const e=$("HRST.adConfig.settings.mob300x600Freq",window,1);"m"!==i||Number.isFinite(g)&&g%e===0||(f=f.filter(e=>!(Array.isArray(e)&&(300===e[0]||160===e[0])&&600===e[1]))),"photo-snap-gallery"===o&&(f=f.filter(e=>!(Array.isArray(e)&&1===e[0]&&(2===e[1]||600===e[1]))))}else w&&(d.includes("vertical")||d.includes("rail"))&&!gptLayer.adSlots[`gpt_gal_${p}`]?(b="d-brkrr",("d"!==i||d.includes("bottom")||d.includes("mobile"))&&(w=!1),w&&(m=`gpt_gal_${p}`,y=`smart${p}`,f=za,r&&(f=f.concat(Ua)))):w=!1;gptLayer.log("moaptAdInsert - insertBreakers",`divId - ${m}`,{adSize:f,cont:w,divId:m,id:d}),w&&f.length>0&&X(d,m,null,()=>{const t={adSize:f,au3:"breaker",divId:m,kv:{load:"smart",position:"breaker",slot:b},loadGroup:y};h&&(t.fallbackAdRequest=h),gptLayer.log("moaptAdInsert - insertBreakers",`ad.${m}`,t),gptLayer.utils.addAdSlot(t,e)})}return t&&Y.fire(window,"adsLoadedIntoPlacements",{}),!0}function m(t,n,o,a){let d=Ba[i];r&&(d=d.concat(Na[i]));const s={adSize:d,au3:"btf",divId:t,kv:{load:n,position:"btf",slot:"d"===i?"d-gb":"m-gb"},loadGroup:o};gptLayer.log(a,`ad.${t}`,s),gptLayer.utils.addAdSlot(s,e)}function w(e,t){if(n)return;const i=`gpt_${gptLayer.immersiveDivIdLabel}gal_b`;X("gpt-ad-vertical-bottom adslot-4-bottom-mpu",i,null,()=>{m(i,e,t,"moaptAdInsert - insertBottomGallery")})}function y(t,n,a,d){let s=Ha[i];r&&(s=s.concat($a[i])),"photo-snap-gallery"===o&&(s=s.filter(e=>!(Array.isArray(e)&&1===e[0]&&2===e[1])));const l={adSize:s,au3:"btf",divId:t,kv:{load:n,position:"btf",slot:"d"===i?"d-lb":"m-lb"},loadGroup:a};gptLayer.log(d,`ad.${t}`,l),gptLayer.utils.addAdSlot(l,e)}function b(e,t){if(n)return;const i=`gpt_${gptLayer.immersiveDivIdLabel}lb_b`;X("gpt-ad-leaderboard-bottom adslot-3-bottom-leaderboard",i,null,()=>{y(i,e,t,"moaptAdInsert - insertBottomLeaderboard")})}function A(){gptLayer.log("moaptAdInsert - loadStaticAdsIntoPlacements","contentId",e),function(){if(!n)try{if($("HRST.adConfig.settings.bigPanelAd.enabled",window,!1)&&i.match(/m|t/i)){const t="gpt_bigpanel";X("gpt-ad-tmu",t,null,()=>{const n={adSize:[[320,180]],au3:"atf",divId:t,kv:{load:"imm",position:"bigpanel"},loadGroup:"imm"};gptLayer.log("moaptAdInsert - insertBigPanel",`ad.${t}`,n),gptLayer.utils.addAdSlot(n,e)})}}catch(e){}}(),"longform-article"!==a&&(c(),p()),["longform-article","standard-article"].includes(a)&&function(){if("m"!==i)return!1;if(n&&!gptLayer.a2a.experience)return!1;const t=`gpt_${gptLayer.immersiveDivIdLabel}gal_x`;X("mobile-sponsored-top-ad",t,null,()=>{const n={adSize:Ja[i],au3:"atf",divId:t,kv:{load:"imm",position:"atf"},loadGroup:"imm"};gptLayer.log("moaptAdInsert - insertGptGalXForConfiguredSponsors",`ad.${t}`,n),gptLayer.utils.addAdSlot(n,e)})}(),function(){if(n)return;const t="gpt_lb_pf";X("article-marketplace-horizontal",t,null,()=>{let n=Fa[i];r&&(n=n.concat(Ka[i])),"photo-snap-gallery"===o&&(n=n.filter(e=>!(Array.isArray(e)&&1===e[0]&&2===e[1])),n=n.filter(e=>!(Array.isArray(e)&&1===e[0]&&6===e[1])));const a={adSize:n,au3:"breaker",divId:t,kv:{load:"smart",position:"breaker",slot:"d"===i?"d-brk":"m-brk"},loadGroup:"smart_pf"};gptLayer.log("moaptAdInsert - insertPageFooterAd",`ad.${t}`,a),gptLayer.utils.addAdSlot(a,e)})}(),function(){if(n)return;const t="gpt_outofpage";X("gpt-ad-oop-1",t,null,()=>{const n={load:"imm",position:"oop"};qt()&&(n.has=["prvbnr"]);const i={au3:"atf",divId:t,kv:n,loadGroup:"imm",outofpage:1};gptLayer.log("moaptAdInsert - insertOutOfPageAd",`ad.${t}`,i),gptLayer.utils.addAdSlot(i,e)})}(),function(){if(n&&!gptLayer.a2a.experience)return;if("d"===i)return;if(Ye())return;if(!Yt())return;const t="gpt_adhesion";X("adAdhesion",t,null,()=>{const n={adSize:[[300,50],[320,50]],au3:"adhesion",divId:t,kv:{position:"adhesion",slot:"m-adh"},loadGroup:"imm"};gptLayer.log("moaptAdInsert - insertMobileAdhesion",`ad.${t}`,n),gptLayer.utils.addAdSlot(n,e)})}(),it()?w("smartbotgal","smartbotgal"):w("imm","imm"),it()?b("smartbotlb","smartbotlb"):b("imm","imm"),gptLayer.adPlacementsInserted=!0,Y.fire(window,"adsLoadedIntoPlacements",{})}function I(){gptLayer.log("moaptAdInsert - loadDynamicAdsIntoPlacements","contentId",e),"longform-article"===a&&(c(),p()),"d"!==i&&/(standard|luxury)-article/.test(a)&&p(),u(),gptLayer.adPlacementsInsertedDynamic=!0,Y.fire(window,"adsLoadedIntoPlacements-dynamic",{}),o.indexOf("recipe")>-1&&window?.HRST?.article?.themes?.includes("Recipe v1.5")&&function(){const t=tt();function n(){const t=window.document.getElementById("chicory_premium_pairings_unit");if(t?.childNodes.length)return;const n=document.querySelector(".ingredients-body"),i="gpt_pairing",o="ingredients";n&&(n.id=o),t?.remove(),X(o,i,null,()=>{const t=window.document.getElementById(i);t.style.paddingTop="25px",t.style.marginBottom="1.875rem";const n={adSize:[[300,250]],au3:"breaker",divId:i,kv:{load:"smart",position:"breaker"},loadGroup:"smart_pairing"};gptLayer.utils.addAdSlot(n,e),window.dispatchEvent(new CustomEvent("app.adApiUpdate",{detail:{skipPlacementInitialization:!0}}))})}gptLayer.noChicoryPairingAd||t?(gptLayer.noChicoryPairingAd||t)&&n():window.addEventListener("chicory_no_premium_pairing_ad",()=>{n()})}()}function v(t,l){let c;if(gptLayer.log("moaptAdInsert - insertAds","lazyload",t),gptLayer.log("moaptAdInsert - insertAds","container",l),gptLayer.log("moaptAdInsert - insertAds","contentId",e),function(){const e=o.indexOf("recipe")>-1&&window?.HRST?.article?.themes?.includes("Recipe v1.5");
1if(o.indexOf("article")<0&&!e)return;if(s||!d||n||e||p(),d)return;const t={placements:[],type:"article"};switch(a){case"theater":default:return;case"recipe":t.placements="d"===i?[...f.recipe.d.default]:[...f.recipe.m.default],t.type="recipe",t.hasTruncatedElements=!0,t.skipDirections="d"===i;break;case"standard-article":t.placements="d"===i?[...f.standard.d.default]:[...f.standard.m.default];break;case"long-form-article":case"longform-article":t.selector=".longform-body",t.placements="d"===i?[...f.longform.d.default]:[...f.longform.m.default];break;case"luxury-article":t.placements="d"===i?[...f.luxury.d.default]:[...f.luxury.m.default]}if(gptLayer.a2a.experience)switch(a){case"standard-article":case"long-form-article":case"longform-article":t.targetConfig="d"===i?h.article2article.d:h.article2article.m;break;default:return}if(r)switch(a){case"theater":default:return;case"recipe":break;case"standard-article":t.targetConfig="d"===i?h.standard.d:h.standard.m;break;case"long-form-article":case"longform-article":t.targetConfig="d"===i?h.longform.d:h.longform.m}gptLayer.log("Ad Insertion","ad.insert - config initial",{...t}),l&&(t.container=l,("long-form-article"===a||"longform-article"===a||"standard-article"===a&&"d"!==i)&&t.placements.shift()),gptLayer.log("Ad Insertion","ad.insert - config final",{...t}),c=xa(t),gptLayer.log("Ad Insertion","ad.insert - promise",c)}(),function(){if("listicle"!==o&&"photo-snap-gallery"!==o||d)return;const e=window?.HRST?.datalayer?.placeAdsByScreen;gptLayer.log("listicleAdInsertion","short slide detected - placeAdsByScreen",!!e),gptLayer.log("listicleAdInsertion","template",o),c=Promise.resolve()}(),function(){if("gallery"!==o||"d"===i||d)return;const e={placements:f.gallery.m[r?"mgu":"default"],type:"gallery"};l&&(e.container=l),c=xa(e,t||!1)}(),c){const i=!t&&!l||n?I:u;c.then(()=>{gptLayer.log("Ad Insertion","ad.insert - then - contentId",e),i()}).catch(e=>{gptLayer.log("Ad Insertion","ad.insert - error",e)})}}function S(e=!1){e?function(){const e=document.querySelector(".vertical-ad .ad-container:empty"),t=e?.id||e?.closest("[id]")?.id;if("gpt-ad-vertical-bottom"===t){const e=`gpt_${gptLayer.immersiveDivIdLabel}gal_b`;!function(e){if(!gptLayer.adSlots[e])return;const t=document.getElementById(e);if(t?.isConnected)return;xn(e)}(e),gptLayer.adSlots[e]||X(t,e,null,()=>{m(e,"smart",`smart_${gptLayer.immersiveDivIdLabel}gal_b`,"moaptAdInsert - insertDenseModuleArticleAds")})}document.querySelectorAll('[id^="gpt-ad-leaderboard-bottom-"]').forEach(e=>{const{id:t}=e,n=t.match(/^gpt-ad-leaderboard-bottom-(\d+)$/);if(!n)return;const i=Number(n[1]),o=`gpt_${gptLayer.immersiveDivIdLabel}lb_b_${i}`;gptLayer.adSlots[o]||X(t,o,null,()=>{y(o,"smart",`smart_${gptLayer.immersiveDivIdLabel}lb_b_${i}`,"moaptAdInsert - insertDenseModuleArticleAds")})})}():function(){const e=Pt('[data-slot-type="breaker-rr"], [data-slot-type="breaker"]');e.length&&u(e);const t=document.querySelectorAll(".vertical-ad .ad-container:empty");if(!t.length)return;t.forEach(e=>{const t=e.id||e.closest("[id]")?.id;if(!t)return;if("gpt-ad-vertical-top"===t){const e=`gpt_${gptLayer.immersiveDivIdLabel}gal_a`;if(gptLayer.adSlots[e])return;return void X(t,e,null,()=>{g(e,"moaptAdInsert - insertDenseModuleFeedAds")})}const n=t.match(/^gpt-ad-feed-vertical-(\d+)$/);if(!n)return;const o=Number(n[1]),a="d"===i?`gpt_${gptLayer.immersiveDivIdLabel}gal_${o}`:`gpt_${gptLayer.immersiveDivIdLabel}lb_${o}`;gptLayer.adSlots[a]||X(t,a,null,()=>{L(a,o,"moaptAdInsert - insertDenseModuleFeedAds")})})}()}function L(t,n,o){let a=Va[i];r&&(a=a.concat(qa[i]));const d={adSize:a,au3:"breaker",divId:t,kv:{load:"smart",position:"breaker",slot:"d"===i?"d-brkrr":"m-brk"},loadGroup:`smart${gptLayer.immersiveDivIdLabel}${n}`};gptLayer.log(o,`ad.${t}`,d),gptLayer.utils.addAdSlot(d,e)}function C(){if(n)return;if(!At())return;const t=document.querySelectorAll('[id^="gpt-ad-feed-leaderboard"]');for(let n=0;n<t.length;n++){const{id:o}=t[n],a=o.match(/^gpt-ad-feed-leaderboard-(\d+)(?:-(\d+))?$/),d=a?Number(a[1]):parseFloat(o.replace(/[^\d.]/g,"")),s=a?.[2]?`_${a[2]}`:"",l=`gpt_${gptLayer.immersiveDivIdLabel}lb_${d}${s}`;
1X(o,l,null,()=>{let t=Ga[i];r&&(t=t.concat(ja[i]));const n={adSize:t,au3:"breaker",divId:l,kv:{load:"smart",position:"breaker",slot:"d"===i?"d-brk":"m-brk"},loadGroup:`smart${gptLayer.immersiveDivIdLabel}${d}${s}`};gptLayer.log("moaptAdInsert - insertFeedAds",`ad.${l}`,n),gptLayer.utils.addAdSlot(n,e)})}const o=document.querySelectorAll('[id^="gpt-ad-feed-vertical"]');for(let e=0;e<o.length;e++){const{id:t}=o[e],n=parseFloat(t.replace(/[^\d.]/g,"")),a="d"===i?`gpt_${gptLayer.immersiveDivIdLabel}gal_${n}`:`gpt_${gptLayer.immersiveDivIdLabel}lb_${n}`;X(t,a,null,()=>{L(a,n,"moaptAdInsert - insertFeedAds")})}}function _(){("d"===i?["gpt-leaderboard-ad","gpt-ad-vertical-top"]:["gpt-ad-vertical-top-mobile"]).reduce((e,t)=>()=>function(e,t){const n=new MutationObserver(i=>{for(const o of i){const i=o.target.querySelector(`#${e}`);gptLayer.log("moaptAdInsert","adContainerObserver - adDiv",i),"childList"===o.type&&i&&(gptLayer.log("moaptAdInsert","adContainerObserver - *** HIT *** - adDiv",i),gptLayer.log("moaptAdInsert","adContainerObserver - *** HIT *** - mutation",o),gptLayer.log("moaptAdInsert","adContainerObserver - *** HIT *** - disconnected",!0),n.disconnect(),t&&t())}});n.observe(document.body,{childList:!0,subtree:!0}),setTimeout(()=>{gptLayer.log("moaptAdInsert",`adContainerObserver - ${e} - disconnected`,!0),n.disconnect()},3e3),gptLayer.log("moaptAdInsert",`adContainerObserver - ${e} - observing`,!0)}(t,e),()=>{gptLayer.log("moaptAdInsert","insertA2aTopAds - loadStaticAdsIntoPlacements",!0),A(),gptLayer.a2a.firstArticleStaticAds=!0})()}return gptLayer.log("moaptAdInsert","pageHasProduct",l),function(){const e=document.createElement("style");e.innerText=".gpt-adslot > div { margin: auto; }",document.querySelector("head").appendChild(e)}(),gptLayer.isEasel||(gptLayer.a2a.experience&&(gptLayer.log("moaptAdInsert","a2a - HRST",{...window.HRST}),gptLayer.log("moaptAdInsert","a2a - gptLayer.a2a",gptLayer.a2a)),gptLayer.a2a.experience&&gptLayer.a2a.initialLoad?(gptLayer.a2a.currentId=window.HRST.currentId,window.HRST?.[window.HRST.currentId]?.article?.loaded?_():Y.listen(window,"fre-send-event",e=>{const{detail:{data:{id:t},event:n,eventType:i}}=e;gptLayer.log("moaptAdInsert","fre-send-event - e",e),n&&!/^fre.a2a/.test(n)||(gptLayer.log("moaptAdInsert","fre-send-event - fre.a2a - event",{event:n,eventType:i,id:t}),/^fre.a2a.first-article-loaded$/.test(n)&&_())},{once:!0}),gptLayer.a2a.initialLoad=!1):(A(),n?(gptLayer.log("moaptAdInsert - checkSectionAndInsertAds","immersive container present",n),v(!1,n)):(gptLayer.log("moaptAdInsert - checkSectionAndInsertAds","normal flow",!0),v()))),C(),function(){if(!gptLayer.isEasel)return;document.querySelectorAll(".easel-ad").forEach((e,t)=>{const n=`gpt_easel_${t}`;e.id=n,e.className=`${e.className} gpt-adslot noskim`.trim();const i={adSize:[[1,2]],au3:"breaker",divId:n,kv:{position:"breaker"},loadGroup:"imm"};gptLayer.log("moaptAdInsert - insertFeedAds",`ad.${n}`,i),gptLayer.utils.addAdSlot(i)}),gptLayer.adPlacementsInserted=!0,Y.fire(window,"adsLoadedIntoPlacements",{})}(),/author|search/i.test(o)&&I(),window.addEventListener("app.adApiUpdate",function(e){if(gptLayer.log("moaptAdInsert - app.adApiUpdate","lazyloadInsertion - evt",e),e.detail?.shouldRefreshBreakerAds)return t=e.detail.page,Nn(/^gpt_lb_\d+(?:_\d+)?$/),window.gptLayer.utils.clearAllKVs(),window.gptLayer.getPageKVs(),void setTimeout(()=>{"search"===t?u():C(),Yo()},0);var t;e.detail?.numberOfPages&&e.detail?.itemsNumber?function(e,t){if(n)return;xa({adContainerSelector:".breaker-ad .ad-container:empty",callback:u,itemsNumber:t,numberOfPages:e,type:o})}(e.detail.numberOfPages,e.detail.itemsNumber):e.detail?.denseModuleAds?S(e.detail?.isArticle):e.detail?.skipPlacementInitialization||v(!0)}),lt.mark("hdm-insert-end"),!0}const ir=$("HRST.adConfig.settings.pbBeta",window,!1),or={loadAdStack:(e=!1)=>{lt.mark("hdm-ads-loadAdStack-start"),e||Y.listen(window,"fre-send-event",e=>{const{data:t,event:n,eventType:i,id:o}=e?.detail||{};if(i&&/^immersive_/.test(i)&&o){const e=t||o;P("fre-send-event","***************************************",!0),P("fre-send-event","***************************************",!0),P("fre-send-event",`event - ${i} - contentId`,e),P("fre-send-event","***************************************",!0),P("fre-send-event","***************************************",!0),"immersive_article_open"===i&&setTimeout(()=>{const t=document.querySelector("[data-floating-ui-portal] [data-current-article] .article-body");
1P("fre-send-event","immersive_article_open - overlay",t),t&&(P("fre-send-event","immersive_article_open - window.HRST.immersiveContentId",window.HRST.immersiveContentId),P("fre-send-event",`immersive_article_open - window.HRST[${e}]`,window.HRST[e]),window.HRST[e].immersiveContainer=t,nr(),En()||(Qi(),ir?(ro(),lo()):(ao(),so())),Yo())},1e3),"immersive_article_close"===i&&(P("fre-send-event",`immersive_article_close - window.HRST[${e}]`,window.HRST[e]),Bn(e),window.gptLayer.utils.clearAllKVs(),window.gptLayer.getPageKVs?.())}if(/^fre.a2a.read-more-button$/.test(n)){const{id:e}=t;let n;P("fre-send-event",`a2a - read-more - window.HRST[${e}]`,window.HRST[e]),window.gptLayer.a2a.currentId!==e&&(n=window.gptLayer.a2a.currentId,P("fre-send-event","a2a - read-more - contentIdToDisable",n),P("fre-send-event",`a2a - read-more - window.HRST[${n}]`,window.HRST[n]),Bn(n),window.gptLayer.utils.clearAllKVs()),window.HRST.immersiveContentId=window.HRST?.currentId||e,window.gptLayer.a2a.currentId=window.HRST.immersiveContentId;const i=document.querySelectorAll(`[data-cid="${e}"] .article-body`);P("fre-send-event","a2a - read-more - contentContainers",i),window.HRST[e].immersiveContainer=i[1],window.gptLayer.a2a.readMoreClicked=!0,setTimeout(()=>{nr(),En()||(Qi(),ir?(ro(),lo()):(ao(),so())),Yo()},1e3)}}),window.getCMPConsent("vendor",943,()=>{Pi=!0,Ri()}),function(e=!1){switch(Ie("permutive")){case"onpageload":e?window.getCMPConsent("vendor",361,Hi):Y.listen(window,"load",()=>{window.getCMPConsent("vendor",361,Hi)});break;case"onadload":{let e=!1;Y.listen(window,"adRendered",()=>{!1===e&&(e=!0,window.getCMPConsent("vendor",361,Hi))});break}case"nopermutive":break;default:window.getCMPConsent("vendor",361,Hi)}}(e),$i(),vi(),function(){let e=!0;function t(){let t=G("HRST.adConfig.modules.optable.slug",window,null);if(P("optable","optable - run",t),!t)return!1;const n=G("HRST.adConfig.modules.optable.geoWhitelist",window,[]);if(n.length>0){const e=we();if(!n.includes(e)&&!/optabledebug/i.test(window.location.search))return!1}if(lt.mark("optable-start"),qe()&&(t="dev-catchall"),window.optable=window.optable||{cmd:[]},window.optable.site=t,e){const e={HDM:"https://hearst.solutions.cdn.optable.co/public-assets/hearst-sdk.js",HMIUK:"https://hearstuk.solutions.cdn.eu.optable.co/public-assets/hearstuk-sdk.js"}[G("HRST.adConfig.bu",window,"")];if(!e)return!1;dt(e,()=>{setTimeout(()=>{Y.fire(window,"optable.loaded")},1e3),lt.mark("optable-end")})}return window.optable.cmd.push(function(){if(window.optable.instance){e||window.optable.instance.targeting();const t=window.optable.instance.targetingKeyValuesFromCache();Object.entries(t).forEach(e=>{an(e[0],e[1],!0)}),e=!1}}),!0}window.getCMPConsent("category","C0004",()=>{vt()||t(),Y.listen(window,"fre-send-event",e=>{const{detail:{eventType:n,wasUrlOverride:i}}=e;"immersive_article_open"===n&&t(),"immersive_article_close"===n&&i&&t()})})}(),Wi(),function(){if(window.heroHost)return;lt.mark("hdm-hero-ads-start"),gptLayer.log("heroAds","started",!0);const e={createListeners:()=>{Y.listen(window,"message",t=>{const n=t.origin||t.originalEvent.origin;n.indexOf("googlesyndication")>-1&&t.data.task&&"nauloaded"===t.data.task&&t.data.adUnit.indexOf("36117602")>-1&&(gptLayer.log("heroAds",`createListeners - origin: ${n} - e: `,t),e.handleAdMessage(t,n))})},elms:{ad:{},body:document.body||document.getElementsByTagName("body")[0]},getIframe(e){if(!e)return!1;let t=!1;const n=document.getElementsByTagName("iframe");for(let i=0;i<n.length;i++)if(n[i].contentWindow===e){t=n[i];break}return gptLayer.log("heroAds","getIframe - frame",t),t},handleAdMessage(t,n){const{data:i,source:o}=t,{height:a}=i;gptLayer.log("heroAds","handleAdMessage - data",i),a&&(e.elms.ad.source=o,e.elms.ad.origin=n,e.elms.ad.iframe=e.getIframe(e.elms.ad.source),e.elms.ad.cont=e.elms.ad.iframe.parentElement,e.elms.ad.height=a,e.elms.ad.iframe.style.height=`${a}px`,e.elms.ad.cont.style.height=`${a}px`),gptLayer.log("heroAds","handleAdMessage - ad.elms.ad",e.elms.ad)},init(){e.createListeners(),lt.mark("hdm-hero-ads-end")}};e.init(),window.heroHost=e}(),function(){if(window.hiImpHost)return;lt.mark("hdm-high-impact-ads-start"),gptLayer.log("highImpactAds","started",!0);const e={addIntersectionObserver(t){window.IntersectionObserver&&new IntersectionObserver(t=>{t.forEach(t=>{!t.isIntersecting&&t.boundingClientRect.top<=0&&(gptLayer.log("highImpactAds","addIntersectionObserver - observer - display",t),e.displayAd()),t.isIntersecting&&t.boundingClientRect.top<=0&&(gptLayer.log("highImpactAds","addIntersectionObserver - observer - remove",t),e.removeAd())})},{root:null,rootMargin:"0px",threshold:.25}
1).observe(t)},addMutationObserver(){window.MutationObserver&&new MutationObserver(t=>{t.forEach(t=>{gptLayer.log("highImpactAds","addMutationObserver - mutation",t),!e.elms.ad.closed&&t.target&&e.updatePosition(e.elms.ad.adhesion,t.target)})}).observe(e.elms.topNav.nav,{attributes:!0})},addResizeObserver(){(e.elms.topNav.nav||window.ResizeObserver)&&new ResizeObserver(t=>{t.forEach(t=>{gptLayer.log("highImpactAds","addResizeObserver - entry",t),t.target&&e.updatePosition(e.elms.ad.adhesion,t.target)})}).observe(e.elms.topNav.nav)},conf:{autoCloseInSecs:30},createListeners:()=>{Y.listen(window,"message",t=>{const n=t.origin||t.originalEvent.origin;n.indexOf("googlesyndication")>-1&&t.data.task&&"hiadloaded"===t.data.task&&t.data.adUnit.indexOf("36117602")>-1&&(gptLayer.log("highImpactAds",`createListeners - origin: ${n} - e: `,t),e.handleAdMessage(t,n),t.source.postMessage({msg:"received",task:"hiadhost"},n))})},displayAd(){e.elms.ad.viewed||(gptLayer.log("highImpactAds","displayAd - ad.elms.ad.wrapper",e.elms.ad.wrapper),e.elms.body.appendChild(e.elms.ad.wrapper),e.elms.ad.viewed=!0,Y.listen(e.elms.ad.adhesion,"click",e.trackClick),e.elms.ad.adhesionCloseBtn=e.elms.ad.adhesion.querySelector(".hiad-adhesion-ad-close"),Y.listen(e.elms.ad.adhesionCloseBtn,"click",e.trackClick),e.startCountDownToClose(e.conf.autoCloseInSecs))},elms:{ad:{closed:!1,uxElm:"hiad-adhesion-ad",viewed:!1},body:document.body||document.getElementsByTagName("body")[0],topNav:{nav:document.querySelector('[data-tracking-id="topNav"]'),position:"sticky"}},getIframe(e){if(!e)return!1;let t=!1;const n=document.getElementsByTagName("iframe");for(let i=0;i<n.length;i++)if(n[i].contentWindow===e){t=n[i];break}return gptLayer.log("highImpactAds","getIframe - frame",t),t},handleAdMessage(t,n){gptLayer.log("highImpactAds","handleAdMessage - data",t.data),e.elms.ad.source=t.source,e.elms.ad.origin=n,e.elms.ad.wrapper=document.createElement("div"),e.elms.ad.wrapper.id="hiad-wrapper",e.elms.ad.wrapper.innerHTML=t.data.elms.style+t.data.elms.adhesion,[e.elms.ad.style,e.elms.ad.adhesion]=e.elms.ad.wrapper.childNodes;const i=e.elms.ad.adhesion.getAttribute("href");i&&e.elms.ad.adhesion.setAttribute("href",decodeURIComponent(i)),e.elms.ad.adhesion.style.top=`${e.elms.topNav.nav?e.elms.topNav.nav.offsetHeight:0}px`,e.elms.ad.iframe=e.getIframe(e.elms.ad.source),e.elms.ad.cont=e.elms.ad.iframe.parentElement,gptLayer.log("highImpactAds","handleAdMessage - ad.elms.ad",e.elms.ad),e.addMutationObserver(),e.addIntersectionObserver(e.elms.ad.cont),e.addResizeObserver()},init(){e.createListeners(),lt.mark("hdm-high-impact-ads-end")},removeAd(){e.elms.ad.closed||(gptLayer.log("highImpactAds","removeAd - ad.elms.ad.adhesion",e.elms.ad.adhesion),e.elms.ad.adhesion.removeEventListener("click",e.trackClick),e.elms.ad.adhesionCloseBtn.removeEventListener("click",e.trackClick),e.elms.ad.wrapper.remove(),e.elms.ad.closed=!0)},startCountDownToClose(t){e.elms.ad.closed||setTimeout(()=>{e.removeAd()},1e3*t)},trackClick(t){if(t.stopPropagation(),!e.elms.ad.source&&!e.elms.ad.origin)return;let{elms:{ad:{uxElm:n}}}=e;gptLayer.log("highImpactAds","trackClick - e",t),"BUTTON"===t.target.nodeName&&(t.preventDefault(),n=t.target.className,e.removeAd());const i={action:"click",primaryUx:n,task:"hiadevent"};e.elms.ad.source.postMessage(i,e.elms.ad.origin)},updatePosition(t,n){if(!t&&!n)return;const i=getComputedStyle(n);if(!i)return;const{elms:{topNav:{position:o}}}=e;let a=0,r=0;r=i.getPropertyValue("position"),a=r===o?n.offsetHeight:0,gptLayer.log("highImpactAds","updatePosition",`position: ${o} - newPosition: ${r} - pos: ${a}`),t&&t.style&&(t.style.top=`${a}px`)}};e.init(),window.hiImpHost=e}(),ki(),Di(),po(),Ao(),yi({adhesionRefreshInterval:3e4,keysToClear:[],platform:"hdm",refreshInterval:3e4,whitelist:[]});const t=({path:t,timedOut:n})=>{!function(e,t=!1){if(!pi){if(pi=!0,"gpp"===e||"tcf"===e){const n=t?`cmp_${e}_timeout`:`cmp_${e}_ready`;lt.mark(n),wi(t?`consent_to_cmp_${e}_timeout`:`consent_to_cmp_${e}_ready`,"consent_resolved")}!t&&e&&lt.mark("cmp_iab_ready")}}(t,n),lt.mark(n?"hdm-ads-cmp-timeout-for-ads":"hdm-ads-cmp-ready-for-ads"),or.loadGamTag(e)};window.GDPR?E({gdpr:!0,timeout:5e3,usSiteAndUser:et()}).then(e=>{or.loadBidders(),t(e)}):(or.loadBidders(),E({gdpr:!1,timeout:5e3,usSiteAndUser:et()}).then(t)),Y.listen(window,"adScriptsDone",bo),lt.mark("hdm-ads-loadAdStack-end")},loadAdsInParallel:(e=!1)=>
1{oi("hdm-ads - loadAdStack",()=>or.loadAdStack(e))},loadBidders:()=>{En()||(Qi(),ir?(ro(),lo()):(ao(),so()))},loadGamTag:e=>{$("HRST.adConfig.modules.optout.pubId",window,"")&&window.CMP_WITHDRAWN?(Yo(e,!0),Ni()):Yo(e,!1),function(){function e(){if(kt())return!1;if("recipe"!==$("HRST.article.template",window,""))return!1;if(!et())return!1;const e=document.querySelector(".ingredients-body");if(e){lt.mark("chicory-start");const t=document.createElement("div");t.classList.add("chicory-order-ingredients"),e.appendChild(t);const n=document.createElement("style");n.innerHTML="\n\t\t\t\t.chicory-button-container button {\n\t\t\t\t\tbackground-color: #000000;\n\t\t\t\t\tborder: none;\n\t\t\t\t\tcolor: #ffffff;\n\t\t\t\t\tfont-family: GTHaptikBlack,Helvetica,Arial,Sans-serif;\n\t\t\t\t\tfont-size: 0.75rem;\n\t\t\t\t\tletter-spacing: 0.06em;\n\t\t\t\t\ttext-transform: uppercase;\n\t\t\t\t\tpadding: 0.625rem;\n\t\t\t\t\tfont-weight: bold;\n\t\t\t\t}\n\t\t\t";const i=document.querySelector(".jump-to-recipe");if(i){const e=window.getComputedStyle(i);n.innerHTML=`\n\t\t\t\t\t.chicory-button-container button {\n\t\t\t\t\t\tbackground-color: ${e.getPropertyValue("background-color")};\n\t\t\t\t\t\tborder: ${e.getPropertyValue("border")};\n\t\t\t\t\t\tcolor: ${e.getPropertyValue("color")};\n\t\t\t\t\t\tfont-family: ${e.getPropertyValue("font-family")};\n\t\t\t\t\t\tfont-size: ${e.getPropertyValue("font-size")};\n\t\t\t\t\t\tletter-spacing: ${e.getPropertyValue("letter-spacing")};\n\t\t\t\t\t\ttext-transform: ${e.getPropertyValue("text-transform")};\n\t\t\t\t\t\tpadding: ${e.getPropertyValue("padding")};\n\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\tfont-weight: ${e.getPropertyValue("font-weight")};\n\t\t\t\t\t}\n\t\t\t\t\t.chicory-button-container button:hover {\n\t\t\t\t\t\topacity: 75%;\n\t\t\t\t\t}\n\t\t\t\t`}if(document.head.appendChild(n),Ye())window.CHICORY_NO_ADS=!0;else{const t=document.createElement("div");t.id="chicory_premium_pairings_unit",t.style.paddingTop="25px",t.style.marginBottom="1.875rem",e.append(t)}window.ChicoryConfig={inlineAdsEnabled:!1};const o=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&(dt("//www.chicoryapp.com/widget_v2/",()=>{setTimeout(()=>{Y.fire(window,"chicoryLoaded")},1e3),window.addEventListener("chicory_no_premium_pairing_ad",()=>{window.gptLayer.noChicoryPairingAd=!0})}),o.unobserve(t))})},{root:null,rootMargin:"1000px",threshold:0});o.observe(t)}return lt.mark("chicory-end"),!0}window.getCMPConsent("category","C0004",()=>{Ti(e)})}(),Ci()},loadInitStack:()=>{lt.mark("hdm-ads-loadInitStack-start"),di(),_e(),function(){const e=$("gptLayer.adConfig.bidders.AMZN",window,!1),t=$("gptLayer.adConfig.bidders.AMZNNCA",window,!1);$("gptLayer.ab.noBid",window,!1)||(Li(we())?P("amazonA9","amazon was disabled due to location",gptLayer):(performance.mark("hdm-amazon-library-start"),P("amazonA9","started",!0),t&&et()?(dt(`https://config.aps.amazon-adsystem.com/configs/${e}`,()=>{performance.mark("hdm-amazon-nca-config-loaded"),P("amazonA9","loaded","nca-config")}),dt("https://client.aps.amazon-adsystem.com/publisher.js",()=>{performance.mark("hdm-amazon-nca-publisher-loaded"),P("amazonA9","loaded","nca-publisher")})):dt("//c.amazon-adsystem.com/aax2/apstag.js",()=>{performance.mark("hdm-amazon-library-loaded"),P("amazonA9","loaded",!0)})))}(),nr(),lt.mark("hdm-ads-loadInitStack-end")},loadPreconsentStack:()=>{lt.mark("hdm-ads-loadPreconsentStack-start"),window.gptLayer||(lt.mark("hdm-gpt-layer-start"),window.gptLayer={adConfig:$("HRST.adConfig",window,{}),adDebug:[],adScripts:[],adScriptsDone:!1,adSlots:{},gcmDefaultsSet:!1,isHDS:$("HRST.article.isHDS",window,!1),isInitialLoad:!0,log:P,slots:{},timerStart:Date.now(),utils:{},videoBids:[]},x(window.gptLayer.utils,t),x(window.gptLayer.utils,n),window.gptLayer.utils.setVideoAspectRatioHas=Bi,window.gptLayer.utils.getValue=window.gptLayer.utils.memoGetValue,function(e){const t=$("gptLayer.adConfig.adBundle",window,{});t?window.gptLayer.adConfig.adBundle=Array.isArray(t)?{version:e}:{...t,version:e}:window.gptLayer.adConfig={adBundle:{version:e}}}(Io),function(){if(window?.cmpUtils?.gcmDefaultsSet)return!1;const e=new Date;window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)},window.gtag("js",e);let t="granted",n={};(window.GDPR||ke())&&(t="denied"),et()&&(n={region:["US"]});const i={ad_personalization:t,ad_storage:t,ad_user_data:t,analytics_storage:t,functionality_storage:t,personalization_storage:t,security_storage:t,wait_for_update:500,...n};window.gtag("consent","default",i),window.gptLayer.gcmDefaultsSet=!0,window.gptLayer.log("gptLayer - setGoogleConsentModeDefaults","defaults",i)}(),Object.defineProperty(window.gptLayer,"experiments",{configurable:!0,enumerable:!0,get:()=>nn()}),window.gptLayer.log("gptLayer - exposeNonOptimizelyExperiments","initialized",!0),lt.mark("hdm-gpt-layer-end")),Oo(),function(){if(lt.mark("hdm-header-start"),P("hdmAdHeader","started",!0),void 0===window.HRST&&!window.gptLayer)return;gptLayer.breakpoint=J(),gptLayer.ab=gptLayer.ab||{};const e=Lt(),t=Ct(e);gptLayer.ab.buffer=Math.round(1500*t),"photo-snap-gallery"===gptLayer.template&&(gptLayer.ab.buffer=2*gptLayer.ab.buffer),an("ab",`px_${gptLayer.breakpoint}_${gptLayer.ab.buffer}_${e}`);let n="";switch(gptLayer.template){case"article":n="a";break;case"gallery":n="g";break;case"listicle":n="l";break;default:n="o"}gptLayer.timeout="HMIIT"===gptLayer.adConfig.bu?1500:1e3,gptLayer.refreshTimeout=1e3,an("ab",`t_${gptLayer.breakpoint}_${n}_${gptLayer.timeout}`),Object.prototype.hasOwnProperty.call(HRST,"viewability")&&(i=
1HRST.viewability||{},gptLayer.avb=Object.fromEntries(Object.entries(i).map(([e,t])=>(0==(t=5*Math.floor(Math.round(t/5)))&&(t="zero"),[e,t])))),gptLayer.getAVB=(e,t)=>{if(gptLayer.noads||!gptLayer.avb)return!1;const n="object"==typeof e?e.getAdUnitPath():e,i="object"==typeof e?e.getSlotElementId():t;let o="300x250";"d"===gptLayer.breakpoint&&/_lb/.test(i)&&(o="728x90");const a=Object.entries(gptLayer.avb).find(e=>{let t=`${n}|${gptLayer.breakpoint}`;return t=3===e[0].split("|").length?`${t}|${o}`:t,e[0]===t});return!!a&&a[1].toString()},gptLayer.getVideoAVB=e=>{if(gptLayer.noads)return!1;let t={};return gptLayer.avb&&(e||(e=Object.keys(gptLayer.avb).find(e=>!/36117602/.test(e))),t=gptLayer.avb[e]),!!t&&t.toString()},gptLayer.getAVBdefault=e=>{if(gptLayer.noads)return!1;const t=e.getConfig("targeting").targeting.position?.toString(),n=e.getSlotElementId();let i=`${gptLayer.template}-${gptLayer.breakpoint}-${t}`;"d"===gptLayer.breakpoint&&t&&/atf|btf/i.test(t)&&(/gpt_(feed_)?lb/.test(n)&&(i+="-h"),/gpt_(feed_)?gal/.test(n)&&(i+="-v"));const[,o]=Object.entries({"(article|listicle)-d-atf-h":"40","(article|listicle)-d-atf-v":"60","(article|listicle)-d-breaker":"65","(article|listicle)-d-btf-h":"10","(article|listicle)-d-btf-v":"20","(article|listicle)-d-mnetbreaker":"45","(homepage|landing)-(m|t)-atf":"30","(homepage|landing)-(m|t)-btf":"20","(homepage|landing)-d-atf-h":"45","(homepage|landing)-d-atf-v":"45","(homepage|landing)-d-btf-h":"25","(homepage|landing)-d-btf-v":"20","article-(m|t)-atf":"60","article-(m|t)-breaker":"65","article-(m|t)-btf":"5","gallery-(m|t)-atf":"50","gallery-(m|t)-breaker":"50","gallery-(m|t)-btf":"5","gallery-d-atf-h":"45","gallery-d-atf-v":"70","gallery-d-btf-h":"5","gallery-d-btf-v":"5","gallery-d-mnetbreaker":"15","listicle-(m|t)-breaker":"55","listicle-(m|t)-btf":"15",".*":"30"}).find(e=>{const t=new RegExp(e[0],"i");return i.match(t)});return o},lt.mark("hdm-header-end");var i}(),function(){const t=Fe(d)?"autos":"hdm";if($("gptLayer.ab.noBid",window,!1))return;if(Li(we()))return void P("prebid","prebid was disabled due to location",gptLayer);performance.mark(`${t}-prebid-library-start`),P("prebid","started",!0);const n="autos"===t?Vi:Fi,i="autos"===t?qi:Ki,o=$("HRST.adConfig.settings.pbBeta",window,!1)?`${e.p}moapt-bidder-pb-${t}-beta.${i}.js`:`${e.p}moapt-bidder-pb-${t}.${n}.js`;dt(o,()=>{performance.mark(`${t}-prebid-library-loaded`),P("prebid","loaded",!0)})}(),lt.mark("hdm-ads-loadPreconsentStack-end")}};function ar(e){if(lt.mark("hdm-ads-run"+(e?"-deferred":"")),kn()){if(wt()){or.loadPreconsentStack(),function(){if(si)return;if(mi())return void ui();const e=Date.now(),t=setInterval(()=>{mi()?(clearInterval(t),ui()):Date.now()-e>2e4&&clearInterval(t)},100)}(),M({gdpr:window.GDPR,usSiteAndUser:et()});const e=Ge(),t=je(),n=()=>e&&!window.CMP_CONSENT,i=()=>e&&t;if(P("ads - run","HRST",{...window.HRST}),window.cmpUtils&&P("ads - run","cmpUtils",{...window.cmpUtils}),window.cmpUtils&&window.cmpUtils.bypassed)P("ads - run","cmp already present and ready",{...window.cmpUtils}),ri(or.loadInitStack,or.loadAdsInParallel,[n,i]),ai(or,[i]);else if(window.cmpUtils&&window.cmpUtils?.consentInfo?.consentGroups)lt.mark("ads-run-consent-set"),fi(),P("ads - run","cmp consent set - cmpUtils",{...window.cmpUtils}),ri(or.loadInitStack,or.loadAdsInParallel,[n,i]),ai(or,[i]);else{const e=Ft(()=>{lt.mark("ads-run-consent-set"),fi(),P("ads - run","cmp waited for consent - cmpUtils",{...window.cmpUtils}),ri(or.loadInitStack,or.loadAdsInParallel,[n,i]),ai(or,[i])});Y.listen(window,"cmp.consent.set cmp.consent.bypassed",e,{once:!0})}}}else P("ads - run","message","no zone in adConfig - skipping ad stack")}window.HRST?ar():window.__HRST_DATA__?(window.HRST=JSON.parse(window.__HRST_DATA__.textContent),ar()):window.addEventListener("HRST",ar,{once:!0})})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.