1const tuCookieHideName="tu-geoip-hide",tuCookieLocationName="tu-geoip-location",tuCookieModeName="tu-geoip-mode",tuDebug=termageddon_usercentrics_obj.debug==="true",tuPSLHide=termageddon_usercentrics_obj.psl_hide==="true",tuGeoMode="hosted",tuToggle="div#usercentrics-root,aside#usercentrics-cmp-ui";tuDebug&&console.log("UC: Hosted geolocation script initialized"),window.addEventListener("UC_UI_INITIALIZED",function(){const n=t=>{const e=`; ${document.cookie}`.split(`; ${t}=`);if(e.length===2)return e.pop().split(";").shift()},u=t=>new Proxy(new URLSearchParams(window.location.search),{get:(e,l)=>e.get(l)})[t],o=(t,c,e)=>{var l="";if(e){var f=new Date;f.setTime(f.getTime()+e*24*60*60*1e3),l="; expires="+f.toUTCString()}document.cookie=t+"="+(c||"")+l+"; path=/"};o("tu-geoip","",-1),o("tu-geoip-ajax","",-1);const a=t=>{document.querySelectorAll(t).forEach(c=>c.style.display="")},d=t=>{document.querySelectorAll(t).forEach(c=>c.style.display="none")},r=t=>{if(t){if(tuDebug&&console.log("UC: Hiding consent widget"),tuPSLHide&&d("#usercentrics-psl, .usercentrics-psl"),d(tuToggle),UC_UI.areAllConsentsAccepted())return}else return tuDebug&&console.log("UC: Showing consent widget"),tuPSLHide&&a("#usercentrics-psl, .usercentrics-psl"),a(tuToggle),UC_UI.isConsentRequired()?UC_UI.showFirstLayer():UC_UI.closeCMP();UC_UI.acceptAllConsents().then(()=>{tuDebug&&console.log("UC: All consents have been accepted."),UC_UI.closeCMP().then(()=>{tuDebug&&console.log("UC: CMP Widget has been closed.")}
1)})};if(typeof UC_UI>"u")return console.error("Usercentrics not loaded");const s=u("enable-usercentrics")==="",i=u("termageddon-usercentrics-debug"),_=termageddon_usercentrics_obj.geo_debug_fixtures||{},h=i?_[i]:null,p=!!(h&&typeof h=="object");i&&!p&&console.warn("UC: Unknown debug location '"+i+"'. Valid keys:",Object.keys(_));const y=n(tuCookieHideName),b=n(tuCookieModeName);if(y!=null&&b===tuGeoMode&&!tuDebug&&!p){r(y==="true");return}{const t=(e,l,f)=>{if(l&&o(tuCookieLocationName,JSON.stringify(e),365),s)return tuDebug&&console.log("UC: Enabling due to query parameter override.","Showing Usercentrics"),r(!1);const g=shouldHideForGeo(e,termageddon_usercentrics_obj.geo_locations||{});tuDebug&&console.log("UC: Decision computed",{hide:g.hide,reason:g.reason,geo:e,matches:g.matches}),f&&(o(tuCookieHideName,g.hide?"true":"false"),o(tuCookieModeName,tuGeoMode)),r(g.hide)};if(p)return console.log("UC: Using geo debug override",h),t(h,!1,!1);const c=n(tuCookieLocationName);if(c&&b===tuGeoMode&&!tuDebug)try{const e=JSON.parse(decodeURIComponent(c));if(e&&typeof e=="object"&&e.country)return tuDebug&&console.log("UC: Using cached geo cookie",e),t(e,!1,!0)}catch(e){tuDebug&&console.log("UC: Failed to parse geo cookie, refetching",e)}tuDebug&&console.log("UC: Fetching geolocation from hosted API"),fetch(termageddon_usercentrics_obj.geo_api_url,{method:"GET",headers:{"X-Tm-Key":termageddon_usercentrics_obj.geo_api_key}}).then(e=>{if(!e.ok)throw new Error("HTTP "+e.status);return e.json()}).then(e=>{if(!e||typeof e!="object"||!e.country)throw new Error("Invalid geo response");const l={country:e.country,region_code:e.region_code||null,city:e.city||null};t(l,!0,!0)}).catch(e=>{console.error("Usercentrics: Geolocation lookup failed. Showing widget as a default.",e),r(!1)});return}});function shouldHideForGeo(n,u){const o={hide:!0,reason:"Invalid or missing geolocation data",matches:{}};if(!n||!n.country)return o;let a=null,d=null;for(const r of Object.keys(u)){const s=u[r];if(!s){o.matches[r]={located_in:!1,enabled:!1};continue}let i=!1;switch(s.type){case"country_in_list":i=Array.isArray(s.codes)&&s.codes.indexOf(n.country)!==-1;break;case"country":i=s.code===n.country;break;case"us_state":i=n.country==="US"&&!!n.region_code&&n.region_code===s.region_code;break;default:i=!1}o.matches[r]={located_in:i,enabled:!!s.enabled},i&&(!s.enabled&&!a&&(a=r),s.enabled&&!d&&(d=r))}return a?(o.hide=!0,o.reason='Located in "'+a+'" but this region is disabled in settings'):d?(o.hide=!1,o.reason='Located in "'+d+'" which is enabled'):(o.hide=!0,o.reason="Not located in any configured region"),o}
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.