(()=>{var e={212:(e,t,n)=>{var o=n(15428),i=/^\s+/;e.exports=function(e){return e?e.slice(0,o(e)+1).replace(i,""):e}},5353:(e,t,n)=>{var o=n(9185),i=n(73224),r=n(12746),a=Math.max,s=Math.min;e.exports=function(e,t,n){var c,l,d,u,m,p,f=0,h=!1,g=!1,b=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function w(t){var n=c,o=l;return c=l=void 0,f=t,u=e.apply(o,n)}function y(e){var n=e-p;return void 0===p||n>=t||n<0||g&&e-f>=d}function v(){var e=i();if(y(e))return x(e);m=setTimeout(v,function(e){var n=t-(e-p);return g?s(n,d-(e-f)):n}(e))}function x(e){return m=void 0,b&&c?w(e):(c=l=void 0,u)}function E(){var e=i(),n=y(e);if(c=arguments,l=this,p=e,n){if(void 0===m)return function(e){return f=e,m=setTimeout(v,t),h?w(e):u}(p);if(g)return clearTimeout(m),m=setTimeout(v,t),w(p)}return void 0===m&&(m=setTimeout(v,t)),u}return t=r(t)||0,o(n)&&(h=!!n.leading,d=(g="maxWait"in n)?a(r(n.maxWait)||0,t):d,b="trailing"in n?!!n.trailing:b),E.cancel=function(){void 0!==m&&clearTimeout(m),f=0,c=p=l=m=void 0},E.flush=function(){return void 0===m?u:x(i())},E}},9185:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},12746:(e,t,n)=>{var o=n(212),i=n(9185),r=n(68110),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(r(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=o(e);var n=s.test(e);return n||c.test(e)?l(e.slice(2),n?2:8):a.test(e)?NaN:+e}},15428:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},22750:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},27335:(e,t,n)=>{var o=n(50613),i=Object.prototype,r=i.hasOwnProperty,a=i.toString,s=o?o.toStringTag:void 0;e.exports=function(e){var t=r.call(e,s),n=e[s];try{e[s]=void 0;var o=!0}catch(e){}var i=a.call(e);return o&&(t?e[s]=n:delete e[s]),i}},38036:(e,t,n)=>{var o=n(50613),i=n(27335),r=n(44082),a=o?o.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?i(e):r(e)}},42273:(e,t,n)=>{var o=n(88716),i="object"==typeof self&&self&&self.Object===Object&&self,r=o||i||Function("return this")();e.exports=r},44082:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},50613:(e,t,n)=>{var o=n(42273).Symbol;e.exports=o},68110:(e,t,n)=>{var o=n(38036),i=n(22750);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==o(e)}},73224:(e,t,n)=>{var o=n(42273);e.exports=function(){return o.Date.now()}},79378:(e,t,n)=>{var o=n(5353),i=n(9185);e.exports=function(e,t,n){var r=!0,a=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return i(n)&&(r="leading"in n?!!n.leading:r,a="trailing"in n?!!n.trailing:a),o(e,t,{leading:r,maxWait:t,trailing:a})}},88716:(e,t,n)=>{var o="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=o}},t={};function n(o){var i=t[o];if(void 0!==i)return i.exports;var r=t[o]={exports:{}};return e[o](r,r.exports,n),r.exports}n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),(()=>{"use strict";const e="home improvement",t="money",o="/home-improvement",i="/money",r="esi_puid",a="js-comment",s="js-comment-count",c=(e,t=null)=>{const n=`; ${document.cookie}`.split(`; ${e}=`);return 2===n.length?decodeURIComponent(n.pop().split(";").shift()):t};const l=(e,t=null)=>{var n,o;const i=`; ${document.cookie}`.split(`; ${e}=`);return 2===i.length?decodeURIComponent(null!==(n=null===(o=i.pop())||void 0===o?void 0:o.split(";").shift())&&void 0!==n?n:""):t};function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function u(e){var t=function(e,t){if("object"!=d(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=d(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==d(t)?t:t+""}function m(e,t,n){return(t=u(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function f(e){for(var t=1;t(((e,t={})=>{const n=JSON.stringify(t,null,2),o=n.split("\n").reduce((e,t)=>t.length>=e?t.length:e,0),i=e.length,r=Math.max(i,o),a=` ${e.padEnd(r)} `,s=n.split("\n").map(e=>` ${e.padEnd(r)} `),c=s.length>1?`%c${s.slice(0,1)}\n%c${s.slice(1,-1).join("\n")}\n%c${s.slice(-1)}\n`:`%c${s[0]}\n`,l=s.length>1?["font-family:monospace; background: #333; color: #eee; padding-top: 5px;","font-family:monospace; background: #333; color: #eee;","font-family:monospace; background: #333; color: #eee; padding-bottom: 10px; border-radius: 0 0 6px 6px"]:["font-family:monospace; background: #333; color: #eee; padding-top: 5px; padding-bottom: 10px; border-radius: 0 0 6px 6px"];console.log(`%c${a}\n${c}`,"font-family:monospace; background: #333; color: #eee; border-bottom: 1px solid #666; padding: 5px 0; border-radius: 6px 6px 0 0",...l)})(`CustomEvent: ${e}`,t),new CustomEvent("analytics-trigger",{detail:{data:f({},t),eventName:e}})),g=(e,t)=>{return n=h(e,t),void document.body.dispatchEvent(n);var n},b=(e={})=>g("load_more_comments",e);let w,y;const v=()=>{if("undefined"==typeof window)return"prod"!=={NODE_ENV:"production",npm_config_domain:""}.SERVER;if("undefined"!=typeof window&&void 0===w){var e;const t=new URLSearchParams(null===(e=window)||void 0===e||null===(e=e.location)||void 0===e?void 0:e.search);w=t.has("__DEBUG__")}return w||"true"===l("__DEBUG__")},x=()=>{var e;return void 0===y&&(y=!0===(null===(e=window.JSGlobals)||void 0===e||null===(e=e.featureFlags)||void 0===e?void 0:e.feat__sentry)),y},E=(...e)=>{v()&&console.group(...e)},_=(...e)=>{v()&&console.groupEnd(...e)},j=(...e)=>{v()&&console.log(...e)},k=(...e)=>{var t;const n=v(),o=x();n&&console.error(...e),o&&(null===(t=window.Sentry)||void 0===t||t.captureException(...e))},S=["Registration is a free and easy way to support our truly independent journalism"];const $=(e,t)=>{const n=document.getElementById("loginButton"),o=document.getElementById("registerLink");o&&o.setAttribute("href",function(e,t){if(!e&&!t)return"/register";const n=new URLSearchParams;return e&&n.append("regSourceMethod",e),t&&n.append("regSourceSection",t),`/register?${n.toString()}`}(e,t)),localStorage.setItem("returnUrl",window.location.href),localStorage.setItem("regSourceMethod",e),localStorage.setItem("regSourceSection",t),n&&n.click()},O=(e,{async:t=!0,defer:n=document.location.search.includes("___FORCE_DEFER___"),parent:o=document.body,attributes:i}={})=>{window.JSGlobals=window.JSGlobals||{};const r=window.JSGlobals.loadedJS=[];return new Promise((a,s)=>{const c=(e instanceof Array?e:[e]).map(e=>r.includes(e)?Promise.resolve():new Promise((a,s)=>{const c=((e,{id:t,async:n,defer:o,ok:i,error:r,attributes:a})=>{const s=document.createElement("script");return s.onload=i,s.onerror=r,t&&"undefined"!==t&&(s.id=t),n&&!o&&s.setAttribute("async",""),o&&s.setAttribute("defer",""),a&&a.forEach(([e,t])=>{s.setAttribute(e,t)}),s.src=e,s})(e,{async:t,defer:n,ok:a,error:s,attributes:i});o.appendChild(c),r.push(e)}));return Promise.all(c).then(a,s)})};let C=0;const T=e=>{C++,j(`Commenting: Reauthenticating, attempt ${C}`),window.vf.session.logout().then(window.vf.session.login.cookie(l(r)||"")).then(()=>{e&&setTimeout(e,500)})},I=(e,t)=>{(async(e,t)=>{const n=new FormData;return Object.keys(t).forEach(e=>{n.append(e,t[e])}),await fetch(e,{method:"POST",mode:"same-origin",cache:"no-cache",credentials:"same-origin",body:n})})(`/internal-api/comments/nickname/submit?__amp_source_origin=${window.location.origin}`,{nickname:e}).then(e=>{if(200!==e.status)return e.json().then(({message:e})=>{t({success:!1,errorMessage:e})});t({success:!0})}).catch(e=>{t({success:!1,errorMessage:e.message})})},L=()=>{const[e]=document.getElementsByClassName("vf-post-form"),t=e.firstElementChild;t instanceof HTMLDivElement&&(t.style.display="none");const n=(e=>{const t=document.createElement("div"),n=document.createElement("h2"),o=document.createElement("p"),i=document.createElement("div"),r=document.createElement("input"),a=document.createElement("button");return t.id="add-nickname-form",n.innerHTML="We have noticed you don't have a commenting name yet.",o.innerHTML="Your commenting name is what people will see when you make any comments across Independent articles. Please don't use anything rude or anything that could identify you.",r.setAttribute("placeholder","Commenting name"),r.setAttribute("pattern","^[A-Za-z0-9]{3,40}$"),r.required=!0,a.innerHTML="SUBMIT",a.disabled=!0,t.appendChild(n),t.appendChild(o),t.appendChild(i),i.appendChild(r),i.appendChild(a),a.addEventListener("click",({target:t})=>{if(t instanceof HTMLInputElement&&t.disabled)return!1;e(r.value.trim())}),r.addEventListener("keypress",e=>{var t;(t=e.key.charCodeAt(0))>64&&t<91||t>96&&t<123||8===t||t>=48&&t<=57||e.preventDefault()}),r.addEventListener("input",e=>{a.disabled=e.target instanceof HTMLInputElement&&!e.target.checkValidity()}),t})(o=>{I(o,({success:o,errorMessage:i})=>{o?(e.removeChild(n),t instanceof HTMLDivElement&&(t.style.display="block"),T()):alert(i)})});e.appendChild(n)},P=()=>{window.vf.context.get("user").then(e=>{e&&("guest"===e.user_privilege||l(r)!==e.social_login_id?T(()=>{C<10&&P()}):"anonymous"===e.name.toLowerCase()&&(j("Commenting: User has not set nickname, initialising nickname form"),L()))})},R=()=>{var e;null===(e=document.getElementById("comments"))||void 0===e||e.addEventListener("click",({target:e})=>{var t;e instanceof HTMLElement&&(e.className.split(" ").some(e=>e.startsWith("vf-content-actions__like")||e.startsWith("vf-content-actions__dislike"))?((e={})=>{g("vote_comment_click",e)})({}):["Flag","Flagged"].includes(null===(t=e.innerText)||void 0===t?void 0:t.trim())?((e={})=>{g("flag_comment_click",e)})({}):e.closest(".vf-load-more__button")&&b())})},M=()=>l("loggedIn"),A=e=>{[...document.getElementsByClassName(a)].forEach(t=>{if(t instanceof HTMLElement){const n=t.querySelector(`.${s}`);t.dataset.count=e.toString()||"0",n&&(n.innerHTML=e.toString()||"")}})},B=()=>{R(),window.vf.$prepublish((e,t,...n)=>{if(console.log(`Commenting: channel = ${e}; event = ${t};`),"commenting"===e&&"loaded"===t){try{(()=>{const e=document.getElementById("comments"),t=(null==e?void 0:e.offsetHeight)||0,n=new URLSearchParams(document.location.search).get("__vfz");if(t>600&&!n){null==e||e.classList.add("height-limited");const t=document.createElement("button");t.className="show-more",t.innerHTML="See more comments",null==e||e.appendChild(t);const n=()=>{null==e||e.removeChild(t),null==e||e.classList.remove("height-limited"),null==e||e.removeEventListener("click",n),b()};null==e||e.addEventListener("click",n)}})()}catch(e){k("Commenting: Error in initViafora()->limitCommentingHeight()",e)}try{[...document.getElementsByClassName(a)].forEach(e=>{if(e instanceof HTMLElement){const t=e.querySelector(`.${s}`),n=e.querySelector(".js-comment-plural"),o=parseInt(e.dataset.count||"");t&&n&&(t.innerHTML=o>0?o.toString():'',n.innerHTML=1===o?"Comment":"Comments")}})}catch(e){k("Commenting: Error in initViafora()->changeCTA()",e)}M()?P():window.vf.context.get("user").then(e=>{var t;0!==e.id&&(null===(t=window.viafoura)||void 0===t||t.session.logout())})}if("comment"===e&&"created"===t&&((e={})=>{g("comment",e)})({}),"authentication"===e&&"required"===t){var o,i;const[e]=null!==(o=window.JSGlobals.sections)&&void 0!==o?o:[];return $("Commenting",null!==(i=e.sourcePath)&&void 0!==i?i:""),!1}return{channel:e,event:t,args:n}}),window.vf.$subscribe("authentication","logout",()=>{var e;e="/user/logout",location.href=e})},D=()=>!!document.getElementById("comments"),N=async()=>{if(!l(r)&&M()){const e=await fetch("/api/puid"),t=await e.json();((e,t,n)=>{const o=new Date;if(n){const e=n.days?24*n.days*60*60*1e3:60*n.hours*60*1e3;o.setTime(o.getTime()+e)}const i=[];i.push(`${e}=${encodeURIComponent(t)}`),i.push("path=/"),i.push("secure"),n&&i.push(`expires=${o.toGMTString()}`),document.cookie=i.join(";")})(r,t.uid,{days:365})}},F=async()=>{D&&((async()=>{var e;const{endpoint:t,section_uuid:n}=window.JSGlobals.viafoura||{},o=(null===(e=window.digitalData.article_original_source_id)||void 0===e?void 0:e.replace("b",""))||window.digitalData.article_id_root,i={method:"POST",headers:{accept:"application/json","content-type":"application/json"},body:JSON.stringify([o])};try{var r;const e=await fetch(`${t}/v4/livecomments/${n}/content-containers/comment-count-and-status/by-container-ids`,i);return(null===(r=(await e.json())[0])||void 0===r?void 0:r.commentCount)||0}catch(e){console.error(e)}return 0})().then(A),await N(),window.vfQ=window.vfQ||[],window.vfQ.push(B),O("//cdn.viafoura.net/entry/index.js"))},U=async()=>{document.getElementsByClassName("fb-post").length>0&&await O("https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v11.0")},G=()=>{var e;const{url:t}=(null===(e=window.JSGlobals)||void 0===e?void 0:e.heyFlow)||{};t?t&&O(t):console.error("No heyFlow URL is found",{cause:window.JSGlobals?"heyFlow object is missing or does not contain a URL":"JSGlobals is undefined"})},H=async()=>{document.getElementsByClassName("instagram-media").length>0&&await O("https://www.instagram.com/embed.js")},J=()=>{const e=document.querySelectorAll("[data-parallax]");e.length&&window.addEventListener("scroll",function(){e.forEach(e=>{var t;const n=e.getBoundingClientRect().top;if(!n||n>window.innerHeight)return;const o=null!==(t=e.dataset.parallax)&&void 0!==t?t:"",i=(e=>{const t=window.innerHeight;let n=0;for(let t=e;t;t=t.offsetParent)n+=t.offsetTop;return nQ(e,"name",{value:t,configurable:!0});function K(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""}Y(K,"upperFirst");const Z=Y((e,t)=>{throw new Error(`Value for ${e} must be greater or equal to ${t}`)},"handleError");function X(e){return e<1&&Z("minWidth",1),`(min-width: ${e}px)`}function ee(e){return e<2&&Z("maxWidth",2),`(max-width: ${e-1}px)`}function te(e){return Object.entries(e).sort(([,e],[,t])=>e>t?1:-1)}function ne(e){return te(e).reduce((e,[t,n],o,i)=>{const r=i[o+1],a=X(n),s=r&&ee(r[1]),c=ee(n);if(r&&n===r[1])throw new Error(`Duplicate width value of ${n} detected for ${t} and ${r[0]}`);return e=z(z({},e),{},{[t]:a,[`max${K(t)}`]:c,[`only${K(t)}`]:r?`${a} and ${s}`:a})},{})}Y(X,"minWidth"),Y(ee,"maxWidth"),Y(te,"sortSizesAscending"),Y(ne,"generateMediaQueryRules");const oe=ne({mobile:360,tablet:768,laptop:1e3,desktop:1250}),{mobile:ie,maxMobile:re,onlyMobile:ae,tablet:se,maxTablet:ce,onlyTablet:le,laptop:de,maxLaptop:ue,onlyLaptop:me,desktop:pe,maxDesktop:fe,onlyDesktop:he}=oe;Symbol.toStringTag;let ge=!1;const be=async()=>{window.matchMedia(de).matches&&!ge&&(await O(["//cdn.mediavoice.com/nativeads/script/esi/esi-rr-collection.js"]),ge=!0)},we=async()=>{document.getElementsByClassName("reddit-embed-bq").length>0&&await O("https://embed.reddit.com/widgets.js")},ye="taboola-mid-article-thumbnails",ve="taboola-mid-article-thumbnails-us-premium",xe=()=>{var e;return!(null===(e=window.JSGlobals)||void 0===e||!e.isBulletin)};function Ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function _e(e){for(var t=1;t{const{host:e,pathname:t}=window.location;return`//${e}${t}`},Te=()=>{window._taboola=window._taboola||[];const{article:e,section:t,sectionName:n}=window.JSGlobals,o=!!e,i=!!t,r=[],a=xe(),{sectionUnits:s=[],pageType:c}=window.JSGlobals.taboola||{};if(e&&c){const t=a?"photo":c;window._taboola.push({[t]:"auto",url:Ce()});const n=document.getElementById("stickyFooterContainer");window._taboola.push({listenTo:"visible",handler:e=>{e.detail.placement.includes("Below Article Thumbnails | Card 19")&&n&&(n.style.display="none")}}),(e=>{var t;const{user_status:n,uid:o}=window.digitalData;var i;window._taboola.push({unified_id:o,user_type:(i=n,{premium:"subscriber",registered:"registered",anonymous:"guest"}[i]||"other"),paywall:null!==(t=e.premium)&&void 0!==t&&t&&"premium"!==n})})(e),e.premium&&window._taboola.push({premium:!0})}if(i){const e="News"===n?je:ke;window._taboola.push({[e]:"auto"}),s.forEach(t=>{delete t.category,(e===je&&t.pageType===je||e===ke&&t.pageType===ke)&&r.push(t)}),r.push(...$e)}o&&(r.push(...Oe),r.push(...Se),a&&r.push(...(()=>{const e="true"===l("feat__bulletin_taboola_feed"),t={mode:"thumbnails-mid-b",placement:e?"Bulletin Article Feed":"Bulletin Mid Article Thumbnails",target_type:"mix"};return[_e(_e({},t),{},{container:"taboola-bulletin-mid-article-thumbnails"}),...e?[_e(_e({},t),{},{container:"taboola-bulletin-mid-article-thumbnails-two"})]:[]]})())),r.forEach(e=>(e=>{if(e.container){const t=document.getElementById(e.container);t&&"none"!==window.getComputedStyle(t).getPropertyValue("display")&&window._taboola.push(e)}})(e)),window._taboola.push({flush:!0})},Ie=async()=>{var e,t;const n=(()=>{var e;const{publisherId:t,publisherIdIndyBest:n}=window.JSGlobals.taboola||{};return null!==(e=window.location.pathname)&&void 0!==e&&e.includes("indybest")?n:t})();await O([`//cdn.taboola.com/libtrc/${n}/loader.js`]),null===(e=window)||void 0===e||null===(e=e.performance)||void 0===e||null===(t=e.mark)||void 0===t||t.call(e,"tbl_ic")},Le=async()=>{document.getElementsByClassName("tiktok-media").length>0&&await O("https://www.tiktok.com/embed.js")},Pe="https://clicks.trx-hub.com/xid/esimedia_t58ukgmjkf95_theindependent",Re="social",Me="search",Ae="independent",Be={[Me]:[/google\.com$/i,/bing\.com$/i,/yahoo\.com$/i,/baidu\.com$/i,/yandex\.com$/i,/duckduckgo\.com$/i,/ask\.com$/i,/ecosia\.org$/i,/aol\.(com|co\.uk)$/i,/archive\.org$/i,/brave\.com$/i,/petal_search$/i],[Re]:[/pinterest\.com$/i,/instagram\.com$/i,/facebook\.com$/i,/tiktok\.com$/i,/twitter\.com$/i],[Ae]:[/independent/i]},De=()=>{document.getElementsByClassName("twitter-post").length>0&&(window.twttr=function(e,t,n){let o,i=e.getElementsByTagName(t)[0],r=window.twttr||{};return e.getElementById(n)||(o=e.createElement(t),o.id=n,o.src="https://platform.twitter.com/widgets.js",i.parentNode.insertBefore(o,i),r._e=[],r.ready=function(e){r._e.push(e)}),r}(document,"script","twitter-wjs"))},Ne=(e,t)=>{if(!e.get("q")&&!t.url)throw new Error("The url is required but was not provided");const{url:n,articleUrl:o,articleId:i,author:r,tags:a,section:s,category:c,subCategory:l,updatedDateTime:d,productName:u,campaign:m,position:p,term:f,locationUserAgent:h,locationReferrer:g,locationUtmSource:b,fbclid:w,gclid:y}=t,v=g?function(e){if(!e)return null;try{const{hostname:t}=new URL(e);return t}catch(t){return e}}(g):"",x=g&&function(e){if(!e)return null;try{const{hostname:t}=new URL(e),[n]=Object.entries(Be).find(([e,n])=>n.some(e=>e.test(t)));return n}catch(e){return console.warn(e),null}}(g)||b||g&&""!==g&&"others"||"",E=(t,n,o)=>{n?e.set(t,n):e.has(t)||e.append(t,o||"N/A")};return n&&e.set("q",n),E("p",o),E("article_id",i),E("author",r),E("tag",a),E("section",s),E("category",c),E("sub_category",l),E("updated_time",d),E("utm_content",u),E("utm_campaign",m),E("utm_term",p?`${f||"B"}-${p}`:f),E("utm_medium",h),E("ref",v),E("utm_source",x,"direct"),E("fbclid",w),E("gclid",y),e};function Fe(e,t){if((n=e)&&"string"==typeof n&&n.includes(Pe)){const n=new URL(e),o=new URLSearchParams(n.search),i=Ne(o,t);return`${n.origin}${n.pathname}?${i.toString()}`}var n;return e}const Ue=()=>{const e=navigator.userAgent,t=navigator.maxTouchPoints||0;return/mobile|iphone/i.test(e)?"mobile":/android/i.test(e)||/ipad/i.test(e)||/macintosh/i.test(e)&&t>0||/windows nt/i.test(e)&&(/surface/i.test(e)||/tablet/i.test(e))?"tablet":"desktop"},Ge=document.documentElement;let He=!1;const Je=()=>Ge.classList.contains("indy-ready"),qe=e=>{He||(He=!0,e())},We=e=>{((e,t)=>{if(!e)return;let n=e.classList.toString();const o=new MutationObserver(i=>{for(const r of i)if("class"===r.attributeName){const i=e.classList.toString();if(i!==n){t(o),n=i;break}}});o.observe(e,{attributes:!0})})(Ge,()=>{Je()&&qe(e)})};var Ve={maxInProgress:5,failFast:!1,nextCheck:function(e,t){return Promise.resolve(e.amountStartedDate.now()-Ke,Xe=e=>{const t=Ze();j(`finished ${e} load @ ${t}, duration ${t-Ye[e]}`),delete Ye[e]},et=e=>Object.keys(e).map(t=>async()=>{const n=e[t];if(n){(e=>{const t=Ze();Ye[e]=t,j(`starting ${e} load @ ${t}`)})(t);try{if("function"==typeof n)await n(),Xe(t);else if(await n.method(),Xe(t),n.dependents){E(`${t} deps`),await Qe(et(n.dependents)),_()}}catch(e){console.warn(`Error caught in ${t}()`),console.error(e)}}}),tt=async e=>{for(let t=0;t{if(!window.JSGlobals.taboola)return;Se.map(e=>document.getElementById(e.container)).length&&((()=>{const e=Ce();localStorage.setItem("subscription-cause",e)})(),await(async()=>{await Ie(),Te()})())}),initComments:nt.userComments&&!at&&F},{polar:!rt&&(()=>{be(),window.addEventListener("resize",W(be,500))}),parallax:J,redditEmbed:we,tiktokEmbed:Le,instagramEmbed:H,facebookSDK:U,twitterWidgets:De,persistentPlayer:()=>{const e="true"===c("subscriber"),t=document.querySelector(".article-liveblog");if(e&&t){let e;const t=function(){window.matchMedia("(min-width: 1000px)").matches?e=(()=>{const e=document.querySelector(".video-hero-wrapper"),t="sticky-video";let n;const o=()=>{window.matchMedia("(min-width: 930px)").matches&&(n=new IntersectionObserver(e=>{e.forEach(e=>{e.intersectionRatio<.5&&e.boundingClientRect.top<0?e.target.classList.add(t):e.target.classList.remove(t)})},{threshold:.5}),n.observe(e))};return window.addEventListener("orientationchange",o),{dispose(){n&&n.unobserve(e),window.removeEventListener("orientationchange",o)}}})():e&&e.dispose()};window.addEventListener("orientationchange",t),window.addEventListener("resize",q(t,100)),t()}else(()=>{var e;const t=document.querySelector(".video-top-container.video"),n=document.querySelector(".video-hero-wrapper"),o=document.querySelector("#video-popout-close"),i=null===(e=document.getElementById("video_holder"))||void 0===e||null===(e=e.firstElementChild)||void 0===e||null===(e=e.firstElementChild)||void 0===e?void 0:e.id;let r=2e4;(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<620&&(r=1e4);const a="sticky",s=new IntersectionObserver(e=>{e.forEach(e=>{e.intersectionRatio<.5&&e.boundingClientRect.top<0?(n.style.height=`${n.clientHeight}px`,e.target.classList.add(a)):(n.style.height=null,e.target.classList.remove(a))})},{threshold:.5});s.observe(t),o&&(o.addEventListener("click",()=>{t.classList.add("closed")}),o.classList.contains("sensitive")?o.classList.add("shown"):setTimeout(()=>{o.classList.add("shown")},r)),"undefined"!=typeof jwplayer&&i&&(jwplayer(i).on("autostartNotAllowed",({error:e,reason:t,type:n})=>{j("jwplayer autostartNotAllowed",e,t,n)}),jwplayer(i).on("error",({code:e,message:t,sourceError:n,type:o})=>{j("jwplayer error",e,t,n,o)}),jwplayer(i).on("warning",({code:e,message:t,sourceError:n,type:o})=>{j("jwplayer warning",e,t,n,o)}))})()}},{heyFlow:it&&((t=>{var n,i,r,a;if(!t)return console.warn("Invalid article object."),!1;const s=null!==(n=null===(i=t.sections)||void 0===i?void 0:i.includes(e))&&void 0!==n&&n,c=null!==(r=null===(a=t.hierarchy)||void 0===a?void 0:a.some(({path:e})=>e.startsWith(o)))&&void 0!==r&&r;return s||c})(nt.article)||(e=>{var n,o,r,a;if(!e)return console.warn("Invalid article object."),!1;const s=null!==(n=null===(o=e.sections)||void 0===o?void 0:o.includes(t))&&void 0!==n&&n,c=null!==(r=null===(a=e.hierarchy)||void 0===a?void 0:a.some(({path:e})=>e.startsWith(i)))&&void 0!==r&&r;return s||c})(nt.article))&&G},{trackonomicsAffiliateLinks:()=>{const e=document.querySelectorAll(`a[href^="${Pe}"]`),t=document.referrer||null,n=new URLSearchParams(window.location.search).get("utm_source");null==e||e.forEach(e=>{const o=Fe(e.getAttribute("href"),{locationUserAgent:Ue(),locationReferrer:t,locationUtmSource:n});e.setAttribute("href",o)})},trackonomics:()=>{var e,t;const n=null===(e=JSGlobals)||void 0===e?void 0:e.article,o=null===(t=JSGlobals)||void 0===t||null===(t=t.trackonomics)||void 0===t?void 0:t.customerId;if(n&&o){const e=`https://cdn-magiclinks.trackonomics.net/client/static/v2/${o}.js`,t=[["id","funnel-relay-installer"],["data-property-id","PROPERTY_ID"],["data-customer-id",o]];try{O(e,{attributes:t,defer:!0})}catch(e){console.error("Failed to load the Trackonomics script:",e)}}}}];var ct;ct=async()=>await tt(st),Je()?ct():(We(ct),(e=>{setTimeout(()=>qe(e),3e3)})(ct))})()})();