25 Ridiculously Cool Tech Gadgets to Buy (in 2025)
{void 0!==window.adthrive.logError&&”function”==typeof window.adthrive.logError&&window.adthrive.logError(e,t,i)}))}call(e,t,i,…n){const s=[`%c${t}::${i} `],o=[“color: #999; font-weight: bold;”];n.length>0&&”string”==typeof n[0]&&s.push(n.shift()),o.push(…n);try{Function.prototype.apply.call(e,console,[s.join(“”),…o])}catch(e){return void console.error(e)}}},w=(e,t)=>null==e||e!=e?t:e,O=e=>{const t=e.offsetHeight,i=e.offsetWidth,n=e.getBoundingClientRect(),s=document.body,o=document.documentElement,r=window.pageYOffset||o.scrollTop||s.scrollTop,a=window.pageXOffset||o.scrollLeft||s.scrollLeft,l=o.clientTop||s.clientTop||0,c=o.clientLeft||s.clientLeft||0,d=Math.round(n.top+r-l),u=Math.round(n.left+a-c);return{top:d,left:u,bottom:d+t,right:u+i,width:i,height:t}},x=e=>{let t={};const i=((e=window.location.search)=>{const t=0===e.indexOf(“?”)?1:0;return e.slice(t).split(“&”).reduce(((e,t)=>{const[i,n]=t.split(“=”);return e.set(i,n),e}),new Map)})().get(e);if(i)try{const n=decodeURIComponent(i).replace(/+/g,””);t=JSON.parse(n),C.event(“ExperimentOverridesUtil”,”getExperimentOverrides”,e,t)}catch(e){}return t},A=b(((e=navigator.userAgent)=>/Windows NT|Macintosh/i.test(e))),E=b((()=>{const e=navigator.userAgent,t=/Tablet|iPad|Playbook|Nook|webOS|Kindle|Android (?!.*Mobile).*Safari|CrOS/i.test(e);return/Mobi|iP(hone|od)|Opera Mini/i.test(e)&&!t})),P=(e,t,i=document)=>{const n=((e=document)=>{const t=e.querySelectorAll(“article”);if(0===t.length)return null;const i=Array.from(t).reduce(((e,t)=>t.offsetHeight>e.offsetHeight?t:e));return i&&i.offsetHeight>1.5*window.innerHeight?i:null})(i),s=n?[n]:[],o=[];e.forEach((e=>{const n=Array.from(i.querySelectorAll(e.elementSelector)).slice(0,e.skip);var r;(r=e.elementSelector,r.includes(“,”)?r.split(“,”):[r]).forEach((r=>{const a=i.querySelectorAll(r);for(let i=0;ie.isEqualNode(r))))continue;const l=r&&r.parentElement;l&&l!==document.body?s.push(l):s.push(r),-1===n.indexOf(r)&&o.push({dynamicAd:e,element:r})}}))}));const r=((e=document)=>(e===document?document.body:e).getBoundingClientRect().top)(i),a=o.sort(((e,t)=>e.element.getBoundingClientRect().top-r-(t.element.getBoundingClientRect().top-r)));return[s,a]};class k{}const D=e=>null!=e&&!(“number”==typeof e&&isNaN(e)),R=(t,i,n,s,o=!0)=>{const r=”adthrive_abgroup”,a=M.readInternalLocalStorage(r);if(null!==a){const e=a[t];var l;const i=null!=(l=a[`${t}_weight`])?l:null;if(D(e))return[e,i]}const c=e({},a,{[t]:i,[`${t}_weight`]:n});return s?M.setExpirableInternalLocalStorage(r,c,{expiry:s,resetOnRead:o}):M.setInternalLocalStorage(r,c),[i,n]},I=[“mcmpfreqrec”];const M=new class extends k{init(e){this._gdpr=”true”===e.gdpr,this._shouldQueue=this._gdpr}clearQueue(e){e&&(this._shouldQueue=!1,this._sessionStorageHandlerQueue.forEach((e=>{this.setSessionStorage(e.key,e.value)})),this._localStorageHandlerQueue.forEach((e=>{if(“adthrive_abgroup”===e.key){const t=Object.keys(e.value)[0],i=e.value[t],n=e.value[`${t}_weight`];R(t,i,n,{value:24,unit:”hours”})}else e.expiry?”internal”===e.type?this.setExpirableInternalLocalStorage(e.key,e.value,{expiry:e.expiry,resetOnRead:e.resetOnRead}):this.setExpirableExternalLocalStorage(e.key,e.value,{expiry:e.expiry,resetOnRead:e.resetOnRead}):”internal”===e.type?this.setInternalLocalStorage(e.key,e.value):this.setExternalLocalStorage(e.key,e.value)})),this._cookieHandlerQueue.forEach((e=>{“internal”===e.type?this.setInternalCookie(e.key,e.value):this.setExternalCookie(e.key,e.value)}))),this._sessionStorageHandlerQueue=[],this._localStorageHandlerQueue=[],this._cookieHandlerQueue=[]}readInternalCookie(e){return this._verifyInternalKey(e),this._readCookie(e)}readExternalCookie(e){return this._readCookie(e)}readInternalLocalStorage(e){return this._verifyInternalKey(e),this._readFromLocalStorage(e)}readExternalLocalStorage(e){return this._readFromLocalStorage(e)}readSessionStorage(e){const t=window.sessionStorage.getItem(e);if(!t)return null;try{return JSON.parse(t)}catch(e){return t}}deleteCookie(e){document.cookie=`${e}=; SameSite=None; Secure; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/`}deleteLocalStorage(e){window.localStorage.removeItem(e)}deleteSessionStorage(e){window.sessionStorage.removeItem(e)}setInternalCookie(e,t,i){this._verifyInternalKey(e),this._setCookieValue(“internal”,e,t,i)}setExternalCookie(e,t,i){this._setCookieValue(“external”,e,t,i)}setInternalLocalStorage(e,t){if(this._verifyInternalKey(e),this._gdpr&&this._shouldQueue){const i={key:e,value:t,type:”internal”};this._localStorageHandlerQueue.push(i)}else{const i=”string”==typeof t?t:JSON.stringify(t);window.localStorage.setItem(e,i)}}setExternalLocalStorage(e,t){if(this._gdpr&&this._shouldQueue){const i={key:e,value:t,type:”external”};this._localStorageHandlerQueue.push(i)}else{const i=”string”==typeof t?t:JSON.stringify(t);window.localStorage.setItem(e,i)}}setExpirableInternalLocalStorage(e,t,i){this._verifyInternalKey(e);try{var n;const o=null!=(n=null==i?void 0:i.expiry)?n:{value:400,unit:”days”};var s;const r=null!=(s=null==i?void 0:i.resetOnRead)&&s;if(this._gdpr&&this._shouldQueue){const i={key:e,value:t,type:”internal”,expires:this._getExpiryDate(o),expiry:o,resetOnRead:r};this._localStorageHandlerQueue.push(i)}else{const i={value:t,type:”internal”,expires:this._getExpiryDate(o),expiry:o,resetOnRead:r};window.localStorage.setItem(e,JSON.stringify(i))}}catch(e){console.error(e)}}setExpirableExternalLocalStorage(e,t,i){try{var n;const o=null!=(n=null==i?void 0:i.expiry)?n:{value:400,unit:”days”};var s;const r=null!=(s=null==i?void 0:i.resetOnRead)&&s;if(this._gdpr&&this._shouldQueue){const i={key:e,value:JSON.stringify(t),type:”external”,expires:this._getExpiryDate(o),expiry:o,resetOnRead:r};this._localStorageHandlerQueue.push(i)}else{const i={value:t,type:”external”,expires:this._getExpiryDate(o),expiry:o,resetOnRead:r};window.localStorage.setItem(e,JSON.stringify(i))}}catch(e){console.error(e)}}setSessionStorage(e,t){if(this._gdpr&&this._shouldQueue){const i={key:e,value:t};this._sessionStorageHandlerQueue.push(i)}else{const i=”string”==typeof t?t:JSON.stringify(t);window.sessionStorage.setItem(e,i)}}_getExpiryDate({value:e,unit:t}){const i=new Date;return”milliseconds”===t?i.setTime(i.getTime()+e):”seconds”==t?i.setTime(i.getTime()+1e3*e):”minutes”===t?i.setTime(i.getTime()+60*e*1e3):”hours”===t?i.setTime(i.getTime()+60*e*60*1e3):”days”===t?i.setTime(i.getTime()+24*e*60*60*1e3):”months”===t&&i.setTime(i.getTime()+30*e*24*60*60*1e3),i.toUTCString()}_resetExpiry(e){return e.expires=this._getExpiryDate(e.expiry),e}_readCookie(e){const t=document.cookie.split(“; “).find((t=>t.split(“=”)[0]===e));if(!t)return null;const i=t.split(“=”)[1];if(i)try{return JSON.parse(decodeURIComponent(i))}catch(e){return decodeURIComponent(i)}return null}_readFromLocalStorage(e){const t=window.localStorage.getItem(e);if(!t)return null;try{const n=JSON.parse(t),s=n.expires&&(new Date).getTime()>new Date(n.expires).getTime();if(“adthrive_abgroup”===e&&n.created)return window.localStorage.removeItem(e),null;if(n.resetOnRead&&n.expires&&!s){const t=this._resetExpiry(n);var i;return window.localStorage.setItem(e,JSON.stringify(n)),null!=(i=t.value)?i:t}if(s)return window.localStorage.removeItem(e),null;if(!n.hasOwnProperty(“value”))return n;try{return JSON.parse(n.value)}catch(e){return n.value}}catch(e){return t}}_setCookieValue(e,t,i,n){try{if(this._gdpr&&this._shouldQueue){const n={key:t,value:i,type:e};this._cookieHandlerQueue.push(n)}else{var s;const e=this._getExpiryDate(null!=(s=null==n?void 0:n.expiry)?s:{value:400,unit:”days”});var o;const a=null!=(o=null==n?void 0:n.sameSite)?o:”None”;var r;const l=null==(r=null==n?void 0:n.secure)||r,c=”object”==typeof i?JSON.stringify(i):i;document.cookie=`${t}=${c}; SameSite=${a}; ${l?”Secure;”:””} expires=${e}; path=/`}}catch(e){}}_verifyInternalKey(e){const t=e.startsWith(“adthrive_”),i=e.startsWith(“adt_”);if(!t&&!i&&!I.includes(e))throw new Error(‘When reading an internal cookie, the key must start with “adthrive_” or “adt_” or be part of the allowed legacy keys.’)}constructor(…e){super(…e),this.name=”BrowserStorage”,this.disable=!1,this.gdprPurposes=[1],this._sessionStorageHandlerQueue=[],this._localStorageHandlerQueue=[],this._cookieHandlerQueue=[],this._shouldQueue=!1}},T=(e,t,i)=>{switch(t){case c.AdDensity:return((e,t)=>{const i=e.adDensityEnabled,n=e.adDensityLayout.pageOverrides.find((e=>!!document.querySelector(e.pageSelector)&&(e[t].onePerViewport||”number”==typeof e[t].adDensity)));return!i||!n})(e,i);case c.StickyOutstream:return(e=>{var t,i,n;const s=null==(n=e.videoPlayers)||null==(i=n.partners)||null==(t=i.stickyOutstream)?void 0:t.blockedPageSelectors;return!s||!document.querySelector(s)})(e);case c.Interstitial:return(e=>{const t=e.adOptions.interstitialBlockedPageSelectors;return!t||!document.querySelector(t)})(e);default:return!0}},L=t=>{try{return{valid:!0,elements:document.querySelectorAll(t)}}catch(t){return e({valid:!1},t)}},V=e=>””===e?{valid:!0}:L(e),N=(e,t)=>{if(!e)return!1;const i=!!e.enabled,n=null==e.dateStart||Date.now()>=e.dateStart,s=null==e.dateEnd||Date.now(){const t=e.reduce(((e,t)=>t.weight?t.weight+e:e),0);return e.length>0&&e.every((e=>{const t=e.value,i=e.weight;return!(null==t||”number”==typeof t&&isNaN(t)||!i)}))&&100===t})(e.variants);return c||C.error(“SiteTest”,”validateSiteExperiment”,”experiment presented invalid choices for key:”,e.key,e.variants),i&&n&&s&&o&&l&&c},j=[“siteId”,”siteName”,”adOptions”,”breakpoints”,”adUnits”];window.adthrive.windowPerformance=window.adthrive.windowPerformance||new class{resetTimeOrigin(){this._timeOrigin=window.performance.now()}now(){try{return Math.round(window.performance.now()-this._timeOrigin)}catch(e){return 0}}constructor(){this._timeOrigin=0}};const H=window.adthrive.windowPerformance,F=H.now.bind(H);class G{}class z extends G{get(){if(this._probability1)throw new Error(`Invalid probability: ${this._probability}`);return Math.random(){this.isRolloutEnabled(e)&&void 0!==t.featureRolloutId&&this._enabledFeatureRolloutIds.push(t.featureRolloutId)}))}constructor(e){super(),this._featureRollouts=e,this._setEnabledFeatureRolloutIds()}}class W{get enabled(){return!!this._clsGlobalData&&!!this._clsGlobalData.siteAds&&((e,t=j)=>{if(!e)return!1;for(let i=0;i/iP(hone|od|ad)/i.test(e))()&&e.isRolloutEnabled(“iOS-Resolution”)}getTargetDensity(e){return this.shouldHalveIOSDensity()?e/2:e}get removeVideoTitleWrapper(){return this._clsGlobalData.siteAds.adOptions.removeVideoTitleWrapper}constructor(){this._clsGlobalData=window.adthriveCLS}}class q{static getScrollTop(){return(window.pageYOffset||document.documentElement.scrollTop)-(document.documentElement.clientTop||0)}static getScrollBottom(){return this.getScrollTop()+(document.documentElement.clientHeight||0)}static shufflePlaylist(e){let t,i,n=e.length;for(;0!==n;)i=Math.floor(Math.random()*e.length),n-=1,t=e[n],e[n]=e[i],e[i]=t;return e}static isMobileLandscape(){return window.matchMedia(“(orientation: landscape) and (max-height: 480px)”).matches}static playerViewable(e){const t=e.getBoundingClientRect();return this.isMobileLandscape()?window.innerHeight>t.top+t.height/2&&t.top+t.height/2>0:window.innerHeight>t.top+t.height/2}static createQueryString(e){return Object.keys(e).map((t=>`${t}=${e[t]}`)).join(“&”)}static createEncodedQueryString(e){return Object.keys(e).map((t=>`${t}=${encodeURIComponent(e[t])}`)).join(“&”)}static setMobileLocation(e){return”top-left”===(e=e||”bottom-right”)?e=”adthrive-collapse-top-left”:”top-right”===e?e=”adthrive-collapse-top-right”:”bottom-left”===e?e=”adthrive-collapse-bottom-left”:”bottom-right”===e?e=”adthrive-collapse-bottom-right”:”top-center”===e&&(e=E()?”adthrive-collapse-top-center”:”adthrive-collapse-bottom-right”),e}static addMaxResolutionQueryParam(e){const t=`max_resolution=${E()?”320″:”1280″}`,[i,n]=String(e).split(“?”);return`${i}?${n?n+`&${t}`:t}`}}class Q{constructor(e){this._clsOptions=e,this.removeVideoTitleWrapper=w(this._clsOptions.siteAds.adOptions.removeVideoTitleWrapper,!1);const t=this._clsOptions.siteAds.videoPlayers;this.footerSelector=w(t&&t.footerSelector,””),this.players=w(t&&t.players.map((e=>(e.mobileLocation=q.setMobileLocation(e.mobileLocation),e))),[]),this.relatedSettings=t&&t.contextual}}class K{constructor(e){this.mobileStickyPlayerOnPage=!1,this.playlistPlayerAdded=!1,this.relatedPlayerAdded=!1,this.footerSelector=””,this.removeVideoTitleWrapper=!1,this.videoAdOptions=new Q(e),this.players=this.videoAdOptions.players,this.relatedSettings=this.videoAdOptions.relatedSettings,this.removeVideoTitleWrapper=this.videoAdOptions.removeVideoTitleWrapper,this.footerSelector=this.videoAdOptions.footerSelector}}class J{setExperimentKey(e=!1){this._clsOptions.setExperiment(this.abgroup,this.result,e)}constructor(){this._clsOptions=new W,this.shouldUseCoreExperimentsConfig=!1}}class Y extends J{get result(){return this._result}run(){return new z(.1).get()}constructor(){super(),this._result=!1,this._choices=[{choice:!0},{choice:!1}],this.key=”RemoveLargeSize”,this.abgroup=”smhd100″,this._result=this.run(),this.setExperimentKey()}}function X(e,t,i,n){var s,o=arguments.length,r=o=0;a–)(s=e[a])&&(r=(o3?s(t,i,r):s(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r}function Z(e,t){if(“object”==typeof Reflect&&”function”==typeof Reflect.metadata)return Reflect.metadata(e,t)}”function”==typeof SuppressedError&&SuppressedError;const ee=(e,t,i,n,s,o)=>{const r=Math.round(o-s),a=[],l=[];a.push(“(“,i.map((()=>”%o”)).join(“, “),”)”),l.push(…i),void 0!==n&&(a.push(” => %o”),l.push(n)),a.push(` %c(${r}ms)`),l.push(“color: #999;”)},te=(e,t,i)=>{const n=void 0!==i.get?i.get:i.value;return function(…i){try{const s=F(),o=n.apply(this,i);if(o instanceof Promise)return o.then((e=>{const t=F();return ee(0,0,i,e,s,t),Promise.resolve(e)})).catch((i=>{throw i.logged||(C.error(e,t,i),i.logged=!0),i}));{const e=F();return ee(0,0,i,o,s,e),o}}catch(i){throw i.logged||(C.error(e,t,i),i.logged=!0),i}}},ie=(t,i=!1)=>n=>{const s=Object.getOwnPropertyNames(n.prototype).filter((e=>i||0!==e.indexOf(“_”))).map((e=>[e,Object.getOwnPropertyDescriptor(n.prototype,e)]));for(const[i,o]of s)void 0!==o&&”function”==typeof o.value?n.prototype[i]=te(t,i,o):void 0!==o&&void 0!==o.get&&”function”==typeof o.get&&Object.defineProperty(n.prototype,i,e({},o,{get:te(t,i,o)}))};class ne extends J{get result(){return this._result}run(){return new z(this.weight).get()}constructor(e){super(),this._result=!1,this.key=”ParallaxAdsExperiment”,this.abgroup=”parallax”,this._choices=[{choice:!0},{choice:!1}],this.weight=.5;!!E()&&e.largeFormatsMobile&&(this._result=this.run(),this.setExperimentKey())}}ne=X([ie(“ParallaxAdsExperiment”),Z(“design:type”,Function),Z(“design:paramtypes”,[“undefined”==typeof AdTypes?Object:AdTypes])],ne);class se extends J{get result(){return this._result}run(){return new z(1).get()}constructor(){super(),this._result=!1,this._choices=[{choice:!0},{choice:!1}],this.key=”mrsf”,this.abgroup=”mrsf”,E()&&(this._result=this.run(),this.setExperimentKey())}}const oe=[[728,90],[300,250],[300,600],[320,50],[970,250],[160,600],[300,1050],[336,280],[970,90],[300,50],[320,100],[468,60],[250,250],[120,240],[1,1],[300,300],[552,334],[300,420],[728,250],[320,300],[300,390]],re=[[300,600],[160,600]],ae=new Map([[d.Footer,1],[d.Header,2],[d.Sidebar,3],[d.Content,4],[d.Recipe,5],[“Sidebar_sticky”,6],[“Below Post”,7]]),le=(e,t)=>{const{location:i,sticky:n}=e;if(i===d.Recipe&&t){const{recipeMobile:e,recipeDesktop:i}=t;if(E()&&(null==e?void 0:e.enabled))return!0;if(!E()&&(null==i?void 0:i.enabled))return!0}return i===d.Footer||n},ce=(e,t)=>{const i=t.adUnits,n=(e=>!!e.adTypes&&new ne(e.adTypes).result)(t),s=new Y,o=new se;return i.filter((e=>void 0!==e.dynamic&&e.dynamic.enabled)).map((i=>{const r=i.location.replace(/s+/g,”_”),a=”Sidebar”===r?0:2;return{auctionPriority:ae.get(r)||8,location:r,sequence:w(i.sequence,1),sizes:(l=i.adSizes,oe.filter((([e,t])=>l.some((([i,n])=>e===i&&t===n))))).filter((t=>((e,[t,i],n,s,o)=>{const{location:r,sequence:a}=e;if(r===d.Footer)return!(“phone”===n&&320===t&&100===i);if(r===d.Header)return!(i>100&&s.result);if(r===d.Recipe)return!(o.result&&”phone”===n&&(300===t&&390===i||320===t&&300===i));if(r===d.Sidebar){const t=e.adSizes.some((([,e])=>e300;return!(!n||t)||9===a||(a&&a”special”===e.key)).reduce(((e,t)=>e.concat(…t.value)),[]),lazy:w(i.dynamic.lazy,!1),lazyMax:w(i.dynamic.lazyMax,a),lazyMaxDefaulted:0!==i.dynamic.lazyMax&&!i.dynamic.lazyMax,name:i.name};var l}))},de=(e,t)=>{const i=(e=>{let t=e.clientWidth;if(getComputedStyle){const i=getComputedStyle(e,null);t-=parseFloat(i.paddingLeft||”0″)+parseFloat(i.paddingRight||”0″)}return t})(t),n=e.sticky&&e.location===d.Sidebar;return e.sizes.filter((t=>{const s=!e.autosize||(t[0]<=i||t[0]`${he(e)}-${e.sequence}`;function me(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&”undefined”!=typeof document){var n=document.head||document.getElementsByTagName(“head”)[0],s=document.createElement(“style”);s.type=”text/css”,”top”===i&&n.firstChild?n.insertBefore(s,n.firstChild):n.appendChild(s),s.styleSheet?s.styleSheet.cssText=e:s.appendChild(document.createTextNode(e))}}const _e=e=>e.some((e=>null!==document.querySelector(e)));class ge extends J{get result(){return this._result}run(){return new z(1).get()}constructor(){super(),this._result=!1,this._choices=[{choice:!0},{choice:!1}],this.key=”RemoveRecipeCap”,this.abgroup=”rrc”,this._result=this.run(),this.setExperimentKey()}}class ye extends G{static fromArray(e,t){return new ye(e.map((([e,t])=>({choice:e,weight:t}))),t)}addChoice(e,t){this._choices.push({choice:e,weight:t})}get(){const e=(t=0,i=100,Math.random()*(i-t)+t);var t,i;let n=0;for(const{choice:t,weight:i}of this._choices)if(n+=i,n>=e)return t;return this._default}get totalWeight(){return this._choices.reduce(((e,{weight:t})=>e+t),0)}constructor(e=[],t){super(),this._choices=e,this._default=t}}const fe=()=>(e,t,i)=>{const n=i.value;n&&(i.value=function(…e){const t=(e=>{if(null===e)return null;const t=e.map((({choice:e})=>e));return(e=>{let t=5381,i=e.length;for(;i;)t=33*t^e.charCodeAt(–i);return t>>>0})(JSON.stringify(t)).toString(16)})(this._choices),i=this._expConfigABGroup?this._expConfigABGroup:this.abgroup,s=i?i.toLowerCase():this.key?this.key.toLowerCase():””,o=t?`${s}_${t}`:s,r=this.localStoragePrefix?`${this.localStoragePrefix}-${o}`:o,a=M.readInternalLocalStorage(“adthrive_branch”);!1===(a&&a.enabled)&&M.deleteLocalStorage(r);const l=(()=>n.apply(this,e))(),c=(d=this._choices,u=l,null!=(p=null==(h=d.find((({choice:e})=>e===u)))?void 0:h.weight)?p:null);var d,u,h,p;const[m,_]=R(r,l,c,{value:24,unit:”hours”});return this._stickyResult=m,this._stickyWeight=_,m})};class ve{get enabled(){return void 0!==this.experimentConfig}_isValidResult(e,t=()=>!0){return t()&&D(e)}}class Se extends ve{_isValidResult(e){return super._isValidResult(e,(()=>this._resultValidator(e)||”control”===e))}run(){if(!this.enabled)return C.error(“CLSWeightedChoiceSiteExperiment”,”run”,”() => %o”,”No experiment config found. Defaulting to control.”),”control”;if(!this._mappedChoices||0===this._mappedChoices.length)return C.error(“CLSWeightedChoiceSiteExperiment”,”run”,”() => %o”,”No experiment variants found. Defaulting to control.”),”control”;const e=new ye(this._mappedChoices).get();return this._isValidResult(e)?e:(C.error(“CLSWeightedChoiceSiteExperiment”,”run”,”() => %o”,”Invalid result from experiment choices. Defaulting to control.”),”control”)}constructor(…e){super(…e),this._resultValidator=()=>!0}}class be{getSiteExperimentByKey(e){const t=this.siteExperiments.filter((t=>t.key.toLowerCase()===e.toLowerCase()))[0],i=x(“at_site_features”),n=(s=(null==t?void 0:t.variants[1])?null==t?void 0:t.variants[1].value:null==t?void 0:t.variants[0].value,o=i[e],typeof s==typeof o);var s,o;return t&&i[e]&&n&&(t.variants=[{displayName:”test”,value:i[e],weight:100,id:0}]),t}constructor(e){var t,i;this.siteExperiments=[],this._clsOptions=e,this._device=E()?”mobile”:”desktop”,this.siteExperiments=null!=(i=null==(t=this._clsOptions.siteAds.siteExperiments)?void 0:t.filter((e=>{const t=e.key,i=N(e,this._device),n=T(this._clsOptions.siteAds,t,this._device);return i&&n})))?i:[]}}class Ce extends Se{get result(){return this._result}run(){if(!this.enabled)return C.error(“CLSAdLayoutSiteExperiment”,”run”,”() => %o”,”No experiment config found. Defaulting to empty class name.”),””;const e=new ye(this._mappedChoices).get();return this._isValidResult(e)?e:(C.error(“CLSAdLayoutSiteExperiment”,”run”,”() => %o”,”Invalid result from experiment choices. Defaulting to empty class name.”),””)}_mapChoices(){return this._choices.map((({weight:e,value:t})=>({weight:e,choice:t})))}constructor(e){super(),this._choices=[],this._mappedChoices=[],this._result=””,this._resultValidator=e=>”string”==typeof e,this.key=c.AdLayout,this.abgroup=c.AdLayout,this._clsSiteExperiments=new be(e),this.experimentConfig=this._clsSiteExperiments.getSiteExperimentByKey(this.key),this.enabled&&this.experimentConfig&&(this._choices=this.experimentConfig.variants,this._mappedChoices=this._mapChoices(),this._result=this.run(),e.setWeightedChoiceExperiment(this.abgroup,this._result,!0))}}X([fe(),Z(“design:type”,Function),Z(“design:paramtypes”,[]),Z(“design:returntype”,void 0)],Ce.prototype,”run”,null);class we extends Se{get result(){return this._result}run(){if(!this.enabled)return C.error(“CLSTargetAdDensitySiteExperiment”,”run”,”() => %o”,”No experiment config found. Defaulting to control.”),”control”;const e=new ye(this._mappedChoices).get();return this._isValidResult(e)?e:(C.error(“CLSTargetAdDensitySiteExperiment”,”run”,”() => %o”,”Invalid result from experiment choices. Defaulting to control.”),”control”)}_mapChoices(){return this._choices.map((({weight:e,value:t})=>({weight:e,choice:”number”==typeof t?(t||0)/100:”control”})))}constructor(e){super(),this._choices=[],this._mappedChoices=[],this._result=”control”,this._resultValidator=e=>”number”==typeof e,this.key=c.AdDensity,this.abgroup=c.AdDensity,this._clsSiteExperiments=new be(e),this.experimentConfig=this._clsSiteExperiments.getSiteExperimentByKey(this.key),this.enabled&&this.experimentConfig&&(this._choices=this.experimentConfig.variants,this._mappedChoices=this._mapChoices(),this._result=this.run(),e.setWeightedChoiceExperiment(this.abgroup,this._result,!0))}}X([fe(),Z(“design:type”,Function),Z(“design:paramtypes”,[]),Z(“design:returntype”,void 0)],we.prototype,”run”,null);class Oe extends J{get result(){return this._result}run(){return new z(this.weight).get()}constructor(){super(),this._result=!1,this.abgroup=”scae”,this.key=”StickyContainerAds”,this._choices=[{choice:!0},{choice:!1}],this.weight=.99,this._result=this.run(),this.setExperimentKey()}}Oe=X([ie(“StickyContainerAdsExperiment”),Z(“design:type”,Function),Z(“design:paramtypes”,[])],Oe);class xe extends J{get result(){return this._result}run(){return new z(this.weight).get()}constructor(){super(),this._result=!1,this.abgroup=”scre”,this.key=”StickyContainerRecipe”,this._choices=[{choice:!0},{choice:!1}],this.weight=.99,this._result=this.run(),this.setExperimentKey()}}xe=X([ie(“StickyContainerRecipeExperiment”),Z(“design:type”,Function),Z(“design:paramtypes”,[])],xe);const Ae=”250px”;class Ee{start(){try{var e,t;(e=>{const t=document.body,i=`adthrive-device-${e}`;if(!t.classList.contains(i))try{t.classList.add(i)}catch(e){C.error(“BodyDeviceClassComponent”,”init”,{message:e.message});const t=”classList”in document.createElement(“_”);C.error(“BodyDeviceClassComponent”,”init.support”,{support:t})}})(this._device);const s=new Ce(this._clsOptions);if(s.enabled){const e=s.result,t=e.startsWith(“.”)?e.substring(1):e;if((e=>/^[-_a-zA-Z]+[-_a-zA-Z0-9]*$/.test(e))(t))try{document.body.classList.add(t)}catch(e){C.error(“ClsDynamicAdsInjector”,”start”,`Uncaught CSS Class error: ${e}`)}else C.error(“ClsDynamicAdsInjector”,”start”,`Invalid class name: ${t}`)}const o=ce(this._device,this._clsOptions.siteAds).filter((e=>this._locationEnabled(e))).filter((e=>{return t=e,i=this._device,t.devices.includes(i);var t,i})).filter((e=>{return 0===(t=e).pageSelector.length||null!==document.querySelector(t.pageSelector);var t})),r=this.inject(o);var i,n;if(null==(t=this._clsOptions.siteAds.adOptions.stickyContainerConfig)||null==(e=t.content)?void 0:e.enabled)if(this._stickyContainerAdsExperiment.result&&!_e(this._clsOptions.siteAds.adOptions.stickyContainerConfig.blockedSelectors||[]))me(`n .adthrive-device-phone .adthrive-sticky-content {n height: 450px !important;n margin-bottom: 100px !important;n }n .adthrive-content.adthrive-sticky {n position: -webkit-sticky;n position: sticky !important;n top: 42px !important;n margin-top: 42px !important;n }n .adthrive-content.adthrive-sticky:after {n content: “— Advertisement. Scroll down to continue. —”;n font-size: 10pt;n margin-top: 5px;n margin-bottom: 5px;n display:block;n color: #888;n }n .adthrive-sticky-container {n position: relative;n display: flex;n flex-direction: column;n justify-content: flex-start;n align-items: center;n min-height:${(null==(n=this._clsOptions.siteAds.adOptions.stickyContainerConfig)||null==(i=n.content)?void 0:i.minHeight)||400}px !important;n margin: 10px 0 10px 0;n background-color: #FAFAFA;n padding-bottom:0px;n }n `);r.forEach((e=>this._clsOptions.setInjectedSlots(e)))}catch(e){C.error(“ClsDynamicAdsInjector”,”start”,e)}}inject(e,t=document){this._densityDevice=”desktop”===this._device?u.Desktop:u.Mobile,this._overrideDefaultAdDensitySettingsWithSiteExperiment();const i=this._clsOptions.siteAds,n=w(i.adDensityEnabled,!0),s=i.adDensityLayout&&n,o=e.filter((e=>s?e.location!==d.Content:e)),r=e.filter((e=>s?e.location===d.Content:null));return[…o.length?this._injectNonDensitySlots(o,t):[],…r.length?this._injectDensitySlots(r,t):[]]}_injectNonDensitySlots(e,t=document){var i;const n=[],s=[];if(this._stickyContainerRecipeExperiment.result&&e.some((e=>e.location===d.Recipe&&e.sticky))&&!_e((null==(i=this._clsOptions.siteAds.adOptions.stickyContainerConfig)?void 0:i.blockedSelectors)||[])){var o,r;const e=this._clsOptions.siteAds.adOptions.stickyContainerConfig;(e=>{me(`n .adthrive-recipe.adthrive-sticky {n position: -webkit-sticky;n position: sticky !important;n top: 42px !important;n margin-top: 42px !important;n }n .adthrive-recipe-sticky-container {n position: relative;n display: flex;n flex-direction: column;n justify-content: flex-start;n align-items: center;n min-height:${e||400}px !important;n margin: 10px 0 10px 0;n background-color: #FAFAFA;n padding-bottom:0px;n }n `)})(“phone”===this._device?null==e||null==(o=e.recipeMobile)?void 0:o.minHeight:null==e||null==(r=e.recipeDesktop)?void 0:r.minHeight)}for(const i of e)this._insertNonDensityAds(i,n,s,t);return s.forEach((({location:e,element:t})=>{t.style.minHeight=this.locationToMinHeight[e]})),n}_injectDensitySlots(e,t=document){try{this._calculateMainContentHeightAndAllElements(e,t)}catch(e){return[]}const{onePerViewport:i,targetAll:n,targetDensityUnits:s,combinedMax:o,numberOfUnits:r}=this._getDensitySettings(e,t);return this._absoluteMinimumSpacingByDevice=i?window.innerHeight:this._absoluteMinimumSpacingByDevice,r?(this._adInjectionMap.filterUsed(),this._findElementsForAds(r,i,n,o,s,t),this._insertAds()):[]}_overrideDefaultAdDensitySettingsWithSiteExperiment(){var e;if(null==(e=this._clsTargetAdDensitySiteExperiment)?void 0:e.enabled){const e=this._clsTargetAdDensitySiteExperiment.result;”number”==typeof e&&(this._clsOptions.siteAds.adDensityEnabled=!0,this._clsOptions.siteAds.adDensityLayout[this._densityDevice].adDensity=e)}}_getDensitySettings(e,t=document){const i=this._clsOptions.siteAds.adDensityLayout,n=this._determineOverrides(i.pageOverrides),s=n.length?n[0]:i[this._densityDevice],o=this._clsOptions.getTargetDensity(s.adDensity),r=s.onePerViewport,a=this._shouldTargetAllEligible(o),l=this._getTargetDensityUnits(o,a),c=this._getCombinedMax(e,t),d=Math.min(this._totalAvailableElements.length,l,…c>0?[c]:[]);return this._pubLog={onePerViewport:r,targetDensity:o,targetDensityUnits:l,combinedMax:c},{onePerViewport:r,targetAll:a,targetDensityUnits:l,combinedMax:c,numberOfUnits:d}}_determineOverrides(e){return e.filter((e=>{const t=V(e.pageSelector);return””===e.pageSelector||t.elements&&t.elements.length})).map((e=>e[this._densityDevice]))}_shouldTargetAllEligible(e){return e===this._densityMax}_getTargetDensityUnits(e,t){return t?this._totalAvailableElements.length:Math.floor(e*this._mainContentHeight/(1-e)/this._minDivHeight)-this._recipeCount}_getCombinedMax(e,t=document){return w(e.filter((e=>{let i;try{i=t.querySelector(e.elementSelector)}catch(e){}return i})).map((e=>Number(e.max)+Number(e.lazyMaxDefaulted?0:e.lazyMax))).sort(((e,t)=>t-e))[0],0)}_elementLargerThanMainContent(e){return e.offsetHeight>=this._mainContentHeight&&this._totalAvailableElements.length>1}_elementDisplayNone(e){const t=window.getComputedStyle(e,null).display;return t&&”none”===t||”none”===e.style.display}_isBelowMaxes(e,t){return this._adInjectionMap.map.length<e&&this._adInjectionMap.map.length{for(const{dynamicAd:t,element:r}of this._totalAvailableElements)if(this._logDensityInfo(r,t.elementSelector,e),!(!i&&this._elementLargerThanMainContent(r)||this._elementDisplayNone(r))){if(!this._isBelowMaxes(n,s))break;this._checkElementSpacing({dynamicAd:t,element:r,insertEvery:e,targetAll:i,target:o})}!this._usedAbsoluteMinimum&&this._smallerIncrementAttempts0){const{bottom:e}=O(u);if(ee.name===p))&&(r+=1);const m=this.getDynamicElementId(h),_=he(e),g=pe(e),y=[e.location===d.Sidebar&&e.sticky&&e.sequence&&e.sequence{const o=Number(i.sequence)+s,r=i.max,a=i.lazy&&o>r;i.sequence=o,i.lazy=a;const l=this._addContentAd(t,i,n);l&&(i.used=!0,e.push(l))})),e}_getInsertEvery(e,t,i){let n=this._absoluteMinimumSpacingByDevice;return this._moreAvailableElementsThanUnitsToInject(i,e)?(this._usedAbsoluteMinimum=!1,n=this._useWiderSpacing(i,e)):(this._usedAbsoluteMinimum=!0,n=this._useSmallestSpacing(t)),t&&window.innerHeight>n?window.innerHeight:n}_useWiderSpacing(e,t){return this._mainContentHeight/Math.min(e,t)}_useSmallestSpacing(e){return e&&window.innerHeight>this._absoluteMinimumSpacingByDevice?window.innerHeight:this._absoluteMinimumSpacingByDevice}_moreAvailableElementsThanUnitsToInject(e,t){return this._totalAvailableElements.length>e||this._totalAvailableElements.length>t}_logDensityInfo(e,t,i){const{onePerViewport:n,targetDensity:s,targetDensityUnits:o,combinedMax:r}=this._pubLog;this._totalAvailableElements.length}_checkElementSpacing({dynamicAd:t,element:i,insertEvery:n,targetAll:s,target:o=document}){(this._isFirstAdInjected()||this._hasProperSpacing(i,t,s,n))&&this._markSpotForContentAd(i,e({},t),o)}_isFirstAdInjected(){return!this._adInjectionMap.map.length}_markSpotForContentAd(e,t,i=document){const n=”beforebegin”===t.position||”afterbegin”===t.position;this._adInjectionMap.add(e,this._getElementCoords(e,n),t,i),this._adInjectionMap.sort()}_hasProperSpacing(e,t,i,n){const s=”beforebegin”===t.position||”afterbegin”===t.position,o=”beforeend”===t.position||”afterbegin”===t.position,r=i||this._isElementFarEnoughFromOtherAdElements(e,n,s),a=o||this._isElementNotInRow(e,s),l=-1===e.id.indexOf(`AdThrive_${d.Below_Post}`);return r&&a&&l}_isElementFarEnoughFromOtherAdElements(e,t,i){const n=this._getElementCoords(e,i);let s=!1;for(let e=0;ei&&(!o||n+t{const[n,s]=P(e,t,i);if(0===n.length)throw Error(“No Main Content Elements Found”);return[Array.from(n).reduce(((e,t)=>t.offsetHeight>e.offsetHeight?t:e))||document.body,s]})(e,this._adInjectionMap,t);this._mainContentDiv=i,this._totalAvailableElements=n,this._mainContentHeight=((e,t=”div #comments, section .comments”)=>{const i=e.querySelector(t);return i?e.offsetHeight-i.offsetHeight:e.offsetHeight})(this._mainContentDiv)}_getElementCoords(e,t=!1){const i=e.getBoundingClientRect();return(t?i.top:i.bottom)+window.scrollY}_addContentAd(e,t,i=document){var n,s;let o=null;const r=he(t),a=pe(t),l=(null==(s=this._clsOptions.siteAds.adOptions.stickyContainerConfig)||null==(n=s.content)?void 0:n.enabled)&&this._stickyContainerAdsExperiment.result?”adthrive-sticky-container”:””,c=this.addAd(e,this.getDynamicElementId(t),t.position,[l,r,a,…t.classNames]);if(c){const e=de(t,c);if(e.length){c.style.minHeight=this.locationToMinHeight[t.location];o={clsDynamicAd:t,dynamicAd:t,element:c,sizes:e,name:`${t.location}_${t.sequence}`,infinite:i!==document}}}return o}getDynamicElementId(e){return`AdThrive_${e.location}_${e.sequence}_${this._device}`}getElements(e,t=document){return t.querySelectorAll(e)}addAd(e,t,i,n=[]){if(!document.getElementById(t)){const s=`]]>`;e.insertAdjacentHTML(i,s)}return document.getElementById(t)}_repeatDynamicAds(t){const i=[],n=this._removeRecipeCapExperiment.result&&t.location===d.Recipe?99:this.locationMaxLazySequence.get(t.location),s=t.lazy?w(n,0):0,o=t.max,r=t.lazyMax,a=0===s&&t.lazy?o+r:Math.min(Math.max(s-t.sequence+1,0),o+r),l=Math.max(o,a);for(let n=0;n=o;i.push(e({},t,{sequence:s,lazy:r}))}}return i}_locationEnabled(e){const t=this._clsOptions.enabledLocations.includes(e.location),i=this._clsOptions.disableAds&&this._clsOptions.disableAds.all||document.body.classList.contains(“adthrive-disable-all”),n=!document.body.classList.contains(“adthrive-disable-content”)&&!this._clsOptions.disableAds.reasons.has(“content_plugin”);return t&&!i&&n}constructor(e,t){this._clsOptions=e,this._adInjectionMap=t,this._recipeCount=0,this._mainContentHeight=0,this._mainContentDiv=null,this._totalAvailableElements=[],this._minDivHeight=250,this._densityDevice=u.Desktop,this._pubLog={onePerViewport:!1,targetDensity:0,targetDensityUnits:0,combinedMax:0},this._densityMax=.99,this._smallerIncrementAttempts=0,this._absoluteMinimumSpacingByDevice=250,this._usedAbsoluteMinimum=!1,this._infPageEndOffset=0,this.locationMaxLazySequence=new Map([[d.Recipe,5]]),this.locationToMinHeight={Below_Post:Ae,Content:Ae,Recipe:Ae,Sidebar:Ae};const{tablet:i,desktop:n}=this._clsOptions.siteAds.breakpoints;this._device=((e,t)=>{const i=window.innerWidth;return i>=t?”desktop”:i>=e?”tablet”:”phone”})(i,n),this._config=new ue(e),this._clsOptions.enabledLocations=this._config.enabledLocations,this._clsTargetAdDensitySiteExperiment=this._clsOptions.siteAds.siteExperiments?new we(this._clsOptions):null,this._stickyContainerAdsExperiment=new Oe,this._stickyContainerRecipeExperiment=new xe,this._removeRecipeCapExperiment=new ge}}function Pe(e,t){if(null==e)return{};var i,n,s={},o=Object.keys(e);for(n=0;n=0||(s[i]=e[i]);return s}class ke{get enabled(){return!0}}class De extends ke{setPotentialPlayersMap(){const e=this._videoConfig.players||[],t=this._filterPlayerMap(),i=e.filter((e=>”stationaryRelated”===e.type&&e.enabled));return t.stationaryRelated=i,this._potentialPlayerMap=t,this._potentialPlayerMap}_filterPlayerMap(){const e=this._videoConfig.players,t={stickyRelated:[],stickyPlaylist:[],stationaryRelated:[]};return e&&e.length?e.filter((e=>{var t;return null==(t=e.devices)?void 0:t.includes(this._device)})).reduce(((e,t)=>(e[t.type]||(C.event(this._component,”constructor”,”Unknown Video Player Type detected”,t.type),e[t.type]=[]),t.enabled&&e[t.type].push(t),e)),t):t}_checkPlayerSelectorOnPage(e){const t=this._potentialPlayerMap[e].map((e=>({player:e,playerElement:this._getPlacementElement(e)})));return t.length?t[0]:{player:null,playerElement:null}}_getOverrideElement(e,t,i){if(e&&t){const n=document.createElement(“div”);t.insertAdjacentElement(e.position,n),i=n}else{const{player:e,playerElement:t}=this._checkPlayerSelectorOnPage(“stickyPlaylist”);if(e&&t){const n=document.createElement(“div”);t.insertAdjacentElement(e.position,n),i=n}}return i}_shouldOverrideElement(e){const t=e.getAttribute(“override-embed”);return”true”===t||”false”===t?”true”===t:!!this._videoConfig.relatedSettings&&this._videoConfig.relatedSettings.overrideEmbedLocation}_checkPageSelector(e,t,i=[]){if(e&&t&&0===i.length){return!(“/”===window.location.pathname)&&C.event(“VideoUtils”,”getPlacementElement”,new Error(`PSNF: ${e} does not exist on the page`)),!1}return!0}_getElementSelector(e,t,i){return t&&t.length>i?t[i]:(C.event(“VideoUtils”,”getPlacementElement”,new Error(`ESNF: ${e} does not exist on the page`)),null)}_getPlacementElement(e){const{pageSelector:t,elementSelector:i,skip:n}=e,s=V(t),{valid:o,elements:r}=s,a=Pe(s,[“valid”,”elements”]),l=L(i),{valid:c,elements:d}=l,u=Pe(l,[“valid”,”elements”]);if(“”!==t&&!o)return C.error(“VideoUtils”,”getPlacementElement”,new Error(`${t} is not a valid selector`),a),null;if(!c)return C.error(“VideoUtils”,”getPlacementElement”,new Error(`${i} is not a valid selector`),u),null;if(!this._checkPageSelector(t,o,r))return null;return this._getElementSelector(i,d,n)||null}_getEmbeddedPlayerType(e){let t=e.getAttribute(“data-player-type”);return t&&”default”!==t||(t=this._videoConfig.relatedSettings?this._videoConfig.relatedSettings.defaultPlayerType:”static”),this._stickyRelatedOnPage&&(t=”static”),t}_getMediaId(e){const t=e.getAttribute(“data-video-id”);return!!t&&(this._relatedMediaIds.push(t),t)}_createRelatedPlayer(e,t,i,n){“collapse”===t?this._createCollapsePlayer(e,i):”static”===t&&this._createStaticPlayer(e,i,n)}_createCollapsePlayer(t,i){const{player:n,playerElement:s}=this._checkPlayerSelectorOnPage(“stickyRelated”),o=n||this._potentialPlayerMap.stationaryRelated[0];if(o&&o.playerId){this._shouldOverrideElement(i)&&(i=this._getOverrideElement(n,s,i)),i=document.querySelector(`#cls-video-container-${t} > div`)||i,this._createStickyRelatedPlayer(e({},o,{mediaId:t}),i)}else C.error(this._component,”_createCollapsePlayer”,”No video player found”)}_createStaticPlayer(t,i,n){if(this._potentialPlayerMap.stationaryRelated.length&&this._potentialPlayerMap.stationaryRelated[0].playerId){const s=this._potentialPlayerMap.stationaryRelated[0];this._createStationaryRelatedPlayer(e({},s,{mediaOrPlaylistId:t}),i,n)}else C.error(this._component,”_createStaticPlayer”,”No video player found”)}_shouldRunAutoplayPlayers(){return!(!this._isVideoAllowedOnPage()||!this._potentialPlayerMap.stickyRelated.length&&!this._potentialPlayerMap.stickyPlaylist.length)}_determineAutoplayPlayers(){const e=this._component,t=”VideoManagerComponent”===e,i=this._context;if(this._stickyRelatedOnPage)return void C.event(e,”stickyRelatedOnPage”,t&&{device:i&&i.device,isDesktop:this._device}||{});const{player:n,playerElement:s}=this._checkPlayerSelectorOnPage(“stickyPlaylist”);n&&n.playerId&&n.playlistId&&s?this._createPlaylistPlayer(n,s):Math.random(){C.event(e,”noStickyPlaylist”,t&&{vendor:”none”,device:i&&i.device,isDesktop:this._device}||{})}),1e3)}_initializeRelatedPlayers(e){const t=new Map;for(let i=0;ie-t))}filterUsed(){this._map=this._map.filter((({dynamicAd:e})=>!e.used))}reset(){this._map=[]}constructor(){this._map=[]}}class Me extends Ie{}try{(()=>{const e=new W;e&&e.enabled&&(new Ee(e,new Me).start(),new Re(new K(e),e).init())})()}catch(e){C.error(“CLS”,”pluginsertion-iife”,e),window.adthriveCLS&&(window.adthriveCLS.injectedFromPlugin=!1)}}(); <![CDATA[!function(){window.advanced_ads_ready_queue=window.advanced_ads_ready_queue||[],advanced_ads_ready_queue.push=window.advanced_ads_ready;for(var d=0,a=advanced_ads_ready_queue.length;d 0 || rocketlazy_count > 0){ lazyLoadInstance.update(); } } ); var b = document.getElementsByTagName(“body”)[0]; var config = { childList: true, subtree: true }; observer.observe(b, config); } }, false);]]><![CDATA[function lazyLoadThumb(e){var t='‘,a=’]]>
Source