(()=>{function de(r,e){r.forEach(({src:t,category:s})=>{if(!s||s==="STRICTLY_NECESSARY_COOKIES"||e[s])return;let o=[...document.querySelectorAll("script[src]")].find(n=>n.getAttribute("src")===t);if(o){let n=document.createElement("script");n.type="text/plain",n.className=`blocked-${s}`,n.setAttribute("data-src",t),n.setAttribute("data-cookie-category",s),o.parentNode.replaceChild(n,o)}})}function we(r){r.forEach(({src:e,category:t})=>{let s=[...document.querySelectorAll("script[src]")].find(o=>o.getAttribute("src")===e);if(s){let o=document.createElement("script");o.type="text/plain",o.className=`blocked-${t}`,o.setAttribute("data-src",e),o.setAttribute("data-cookie-category",t),s.parentNode.replaceChild(o,s)}})}function ue(r){document.querySelectorAll('script[type="text/plain"][data-src]').forEach(e=>{let t=e.getAttribute("data-src"),s=e.getAttribute("data-cookie-category");if(r[s]){let o=document.createElement("script");o.src=t,o.setAttribute("data-cookie-category",s),e.parentNode.replaceChild(o,e)}})}var he="cc-modal-cookies-banner",fe="captainConsentPending",A="cc_consent",k="https://cc-platform-api-prod.fly.dev",Q="ONLY_SETTINGS",Ne="BANNER_LINEAL",me=["STRICTLY_NECESSARY_COOKIES","UNCLASSIFIED_COOKIES"],M="DO_NOT_SELL_PERSONAL_INFORMATION",ke="cc-modal-cookies-banner-settings",ge="captain-compliance-modal-overlay";async function Re(){let e="b78ff47b-b2c0-4d72-bbb4-b49b6278eab5"||document.currentScript.getAttribute("access-token");return await(await fetch(`${k}/banner/banner-token?access-token=${e}`)).json()}async function Se(r){let e=await fetch(`${k}/bannerModeStyle/by-mode/${r}`);return e?await e.json():null}async function Ve(r){let e=await fetch(`${k}/report/find-last-report?scannerId=${r}`);return e?await e.json():null}async function De(){return await(await fetch(`${k}/cookies/cookie-types`)).json()}async function Pe(r){return await(await fetch(`${k}/banner/tracking?id=${r}`)).json()}async function Ue(){return await(await fetch(`${k}/banner/get-cookies`,{method:"GET",credentials:"include"})).json()}async function Fe(r){return await(await fetch(`${k}/bannerTagTracking`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({gtmData:r})})).json()}async function X(r,e){await fetch(`${k}/bannerTracking/banner/${r}`,{method:"PUT",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({status:e})})}var I=class extends Error{constructor(e){super(e),this.name="DecodingError"}};var _=class extends Error{constructor(e){super(e),this.name="EncodingError"}};var U=class extends Error{constructor(e){super(e),this.name="GVLError"}};var O=class extends Error{constructor(e,t,s=""){super(`invalid value ${t} passed for ${e} ${s}`),this.name="TCModelError"}};var F=class{static DICT="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";static REVERSE_DICT=new Map([["A",0],["B",1],["C",2],["D",3],["E",4],["F",5],["G",6],["H",7],["I",8],["J",9],["K",10],["L",11],["M",12],["N",13],["O",14],["P",15],["Q",16],["R",17],["S",18],["T",19],["U",20],["V",21],["W",22],["X",23],["Y",24],["Z",25],["a",26],["b",27],["c",28],["d",29],["e",30],["f",31],["g",32],["h",33],["i",34],["j",35],["k",36],["l",37],["m",38],["n",39],["o",40],["p",41],["q",42],["r",43],["s",44],["t",45],["u",46],["v",47],["w",48],["x",49],["y",50],["z",51],["0",52],["1",53],["2",54],["3",55],["4",56],["5",57],["6",58],["7",59],["8",60],["9",61],["-",62],["_",63]]);static BASIS=6;static LCM=24;static encode(e){if(!/^[0-1]+$/.test(e))throw new _("Invalid bitField");let t=e.length%this.LCM;e+=t?"0".repeat(this.LCM-t):"";let s="";for(let o=0;o{let o=this.deepClone(this[s]);o!==void 0&&(e[s]=o)}),e}deepClone(e){let t=typeof e;if(t==="number"||t==="string"||t==="boolean")return e;if(e!==null&&t==="object"){if(typeof e.clone=="function")return e.clone();if(e instanceof Date)return new Date(e.getTime());if(e[Symbol.iterator]!==void 0){let s=[];for(let o of e)s.push(this.deepClone(o));return e instanceof Array?s:new e.constructor(s)}else{let s={};for(let o in e)e.hasOwnProperty(o)&&(s[o]=this.deepClone(e[o]));return s}}}};var j=class r extends T{root=null;getRoot(){return this.root}isEmpty(){return!this.root}add(e){let t={value:e,left:null,right:null},s;if(this.isEmpty())this.root=t;else for(s=this.root;;)if(es.value)if(s.right===null){s.right=t;break}else s=s.right;else break}get(){let e=[],t=this.root;for(;t;)if(!t.left)e.push(t.value),t=t.right;else{let s=t.left;for(;s.right&&s.right!=t;)s=s.right;s.right==t?(s.right=null,e.push(t.value),t=t.right):(s.right=t,t=t.left)}return e}contains(e){let t=!1,s=this.root;for(;s;)if(s.value===e){t=!0;break}else e>s.value?s=s.right:et.value)s=t,t=t.right,o="right";else{if(!t.left&&!t.right)s?s[o]=null:this.root=null;else if(!t.left)s?s[o]=t.right:this.root=t.right;else if(!t.right)s?s[o]=t.left:this.root=t.left;else{let n=this.min(t.right);this.remove(n,t.right),t.value=n}t=null}}static build(e){if(!e||e.length===0)return null;if(e.length===1){let t=new r;return t.add(e[0]),t}else{let t=e.length>>1,s=new r;s.add(e[t]);let o=s.getRoot();if(o){if(t+10){let n=r.build(e.slice(0,t-1));o.left=n?n.getRoot():null}}return s}}};var Z=class r{static langSet=new Set(["BG","CA","CS","DA","DE","EL","EN","ES","ET","FI","FR","HR","HU","IT","JA","LT","LV","MT","NL","NO","PL","PT","RO","RU","SK","SL","SV","TR","ZH"]);has(e){return r.langSet.has(e)}forEach(e){r.langSet.forEach(e)}get size(){return r.langSet.size}};var c=class{static cmpId="cmpId";static cmpVersion="cmpVersion";static consentLanguage="consentLanguage";static consentScreen="consentScreen";static created="created";static supportOOB="supportOOB";static isServiceSpecific="isServiceSpecific";static lastUpdated="lastUpdated";static numCustomPurposes="numCustomPurposes";static policyVersion="policyVersion";static publisherCountryCode="publisherCountryCode";static publisherCustomConsents="publisherCustomConsents";static publisherCustomLegitimateInterests="publisherCustomLegitimateInterests";static publisherLegitimateInterests="publisherLegitimateInterests";static publisherConsents="publisherConsents";static publisherRestrictions="publisherRestrictions";static purposeConsents="purposeConsents";static purposeLegitimateInterests="purposeLegitimateInterests";static purposeOneTreatment="purposeOneTreatment";static specialFeatureOptins="specialFeatureOptins";static useNonStandardStacks="useNonStandardStacks";static vendorConsents="vendorConsents";static vendorLegitimateInterests="vendorLegitimateInterests";static vendorListVersion="vendorListVersion";static vendorsAllowed="vendorsAllowed";static vendorsDisclosed="vendorsDisclosed";static version="version"};var w;(function(r){r[r.NOT_ALLOWED=0]="NOT_ALLOWED",r[r.REQUIRE_CONSENT=1]="REQUIRE_CONSENT",r[r.REQUIRE_LI=2]="REQUIRE_LI"})(w||(w={}));var V=class r extends T{static hashSeparator="-";purposeId_;restrictionType;constructor(e,t){super(),e!==void 0&&(this.purposeId=e),t!==void 0&&(this.restrictionType=t)}static unHash(e){let t=e.split(this.hashSeparator),s=new r;if(t.length!==2)throw new O("hash",e);return s.purposeId=parseInt(t[0],10),s.restrictionType=parseInt(t[1],10),s}get hash(){if(!this.isValid())throw new Error("cannot hash invalid PurposeRestriction");return`${this.purposeId}${r.hashSeparator}${this.restrictionType}`}get purposeId(){return this.purposeId_}set purposeId(e){this.purposeId_=e}isValid(){return Number.isInteger(this.purposeId)&&this.purposeId>0&&(this.restrictionType===w.NOT_ALLOWED||this.restrictionType===w.REQUIRE_CONSENT||this.restrictionType===w.REQUIRE_LI)}isSameAs(e){return this.purposeId===e.purposeId&&this.restrictionType===e.restrictionType}};var B=class extends T{bitLength=0;map=new Map;gvl_;has(e){return this.map.has(e)}isOkToHave(e,t,s){let o=!0;if(this.gvl?.vendors){let n=this.gvl.vendors[s];if(n)if(e===w.NOT_ALLOWED)o=n.legIntPurposes.includes(t)||n.purposes.includes(t);else if(n.flexiblePurposes.length)switch(e){case w.REQUIRE_CONSENT:o=n.flexiblePurposes.includes(t)&&n.legIntPurposes.includes(t);break;case w.REQUIRE_LI:o=n.flexiblePurposes.includes(t)&&n.purposes.includes(t);break}else o=!1;else o=!1}return o}add(e,t){if(this.isOkToHave(t.restrictionType,t.purposeId,e)){let s=t.hash;this.has(s)||(this.map.set(s,new j),this.bitLength=0),this.map.get(s).add(e)}}restrictPurposeToLegalBasis(e){let t=this.gvl.vendorIds,s=e.hash,o=function(){let a;for(a of t);return a}(),n=[...Array(o).keys()].map(a=>a+1);for(let a=1;a<=o;a++)this.has(s)||(this.map.set(s,j.build(n)),this.bitLength=0),this.map.get(s).add(a)}getVendors(e){let t=[];if(e){let s=e.hash;this.has(s)&&(t=this.map.get(s).get())}else{let s=new Set;this.map.forEach(o=>{o.get().forEach(n=>{s.add(n)})}),t=Array.from(s)}return t}getRestrictionType(e,t){let s;return this.getRestrictions(e).forEach(o=>{o.purposeId===t&&(s===void 0||s>o.restrictionType)&&(s=o.restrictionType)}),s}vendorHasRestriction(e,t){let s=!1,o=this.getRestrictions(e);for(let n=0;n{e=Math.max(t.max(),e)}),e}getRestrictions(e){let t=[];return this.map.forEach((s,o)=>{e?s.contains(e)&&t.push(V.unHash(o)):t.push(V.unHash(o))}),t}getPurposes(){let e=new Set;return this.map.forEach((t,s)=>{e.add(V.unHash(s).purposeId)}),Array.from(e)}remove(e,t){let s=t.hash,o=this.map.get(s);o&&(o.remove(e),o.isEmpty()&&(this.map.delete(s),this.bitLength=0))}set gvl(e){this.gvl_||(this.gvl_=e,this.map.forEach((t,s)=>{let o=V.unHash(s);t.get().forEach(a=>{this.isOkToHave(o.restrictionType,o.purposeId,a)||t.remove(a)})}))}get gvl(){return this.gvl_}isEmpty(){return this.map.size===0}get numRestrictions(){return this.map.size}};var $e;(function(r){r.COOKIE="cookie",r.WEB="web",r.APP="app"})($e||($e={}));var E;(function(r){r.CORE="core",r.VENDORS_DISCLOSED="vendorsDisclosed",r.VENDORS_ALLOWED="vendorsAllowed",r.PUBLISHER_TC="publisherTC"})(E||(E={}));var G=class{static ID_TO_KEY=[E.CORE,E.VENDORS_DISCLOSED,E.VENDORS_ALLOWED,E.PUBLISHER_TC];static KEY_TO_ID={[E.CORE]:0,[E.VENDORS_DISCLOSED]:1,[E.VENDORS_ALLOWED]:2,[E.PUBLISHER_TC]:3}};var y=class extends T{bitLength=0;maxId_=0;set_=new Set;*[Symbol.iterator](){for(let e=1;e<=this.maxId;e++)yield[e,this.has(e)]}values(){return this.set_.values()}get maxId(){return this.maxId_}has(e){return this.set_.has(e)}unset(e){Array.isArray(e)?e.forEach(t=>this.unset(t)):typeof e=="object"?this.unset(Object.keys(e).map(t=>Number(t))):(this.set_.delete(Number(e)),this.bitLength=0,e===this.maxId&&(this.maxId_=0,this.set_.forEach(t=>{this.maxId_=Math.max(this.maxId,t)})))}isIntMap(e){let t=typeof e=="object";return t=t&&Object.keys(e).every(s=>{let o=Number.isInteger(parseInt(s,10));return o=o&&this.isValidNumber(e[s].id),o=o&&e[s].name!==void 0,o}),t}isValidNumber(e){return parseInt(e,10)>0}isSet(e){let t=!1;return e instanceof Set&&(t=Array.from(e).every(this.isValidNumber)),t}set(e){if(Array.isArray(e))e.forEach(t=>this.set(t));else if(this.isSet(e))this.set(Array.from(e));else if(this.isIntMap(e))this.set(Object.keys(e).map(t=>Number(t)));else if(this.isValidNumber(e))this.set_.add(e),this.maxId_=Math.max(this.maxId,e),this.bitLength=0;else throw new O("set()",e,"must be positive integer array, positive integer, Set, or IntMap")}empty(){this.set_=new Set}forEach(e){for(let t=1;t<=this.maxId;t++)e(this.has(t),t)}get size(){return this.set_.size}setAll(e){this.set(e)}};var p=class{static[c.cmpId]=12;static[c.cmpVersion]=12;static[c.consentLanguage]=12;static[c.consentScreen]=6;static[c.created]=36;static[c.isServiceSpecific]=1;static[c.lastUpdated]=36;static[c.policyVersion]=6;static[c.publisherCountryCode]=12;static[c.publisherLegitimateInterests]=24;static[c.publisherConsents]=24;static[c.purposeConsents]=24;static[c.purposeLegitimateInterests]=24;static[c.purposeOneTreatment]=1;static[c.specialFeatureOptins]=12;static[c.useNonStandardStacks]=1;static[c.vendorListVersion]=12;static[c.version]=6;static anyBoolean=1;static encodingType=1;static maxId=16;static numCustomPurposes=6;static numEntries=12;static numRestrictions=12;static purposeId=6;static restrictionType=2;static segmentType=3;static singleOrRange=1;static vendorId=16};var L=class{static encode(e){return String(Number(e))}static decode(e){return e==="1"}};var h=class{static encode(e,t){let s;if(typeof e=="string"&&(e=parseInt(e,10)),s=e.toString(2),s.length>t||e<0)throw new _(`${e} too large to encode into ${t}`);return s.length25||n<0||n>25)throw new _(`invalid language code: ${e}`);if(t%2===1)throw new _(`numBits must be even, ${t} is not valid`);t=t/2;let a=h.encode(o,t),i=h.encode(n,t);return a+i}static decode(e,t){let s;if(t===e.length&&!(e.length%2)){let n=e.length/2,a=h.decode(e.slice(0,n),n)+65,i=h.decode(e.slice(n),n)+65;s=String.fromCharCode(a)+String.fromCharCode(i)}else throw new I("invalid bit length for language");return s}};var ee=class{static encode(e){let t=h.encode(e.numRestrictions,p.numRestrictions);return e.isEmpty()||e.getRestrictions().forEach(s=>{t+=h.encode(s.purposeId,p.purposeId),t+=h.encode(s.restrictionType,p.restrictionType);let o=e.getVendors(s),n=o.length,a=0,i=0,l="";for(let u=0;u{for(;++S<=m&&!f.has(S););return S};if(u===n-1||o[u+1]>g(d)){let S=d!==i;l+=L.encode(S),l+=h.encode(i,p.vendorId),S&&(l+=h.encode(d,p.vendorId)),i=0}}t+=h.encode(a,p.numEntries),t+=l}),t}static decode(e){let t=0,s=new B,o=h.decode(e.substr(t,p.numRestrictions),p.numRestrictions);t+=p.numRestrictions;for(let n=0;n{n+=L.encode(m),a=e.maxId>u&&d{let n=o.length===1;s+=L.encode(!n),s+=h.encode(o[0],p.vendorId),n||(s+=h.encode(o[1],p.vendorId))}),s}};function Ee(){return{[c.version]:h,[c.created]:z,[c.lastUpdated]:z,[c.cmpId]:h,[c.cmpVersion]:h,[c.consentScreen]:h,[c.consentLanguage]:J,[c.vendorListVersion]:h,[c.policyVersion]:h,[c.isServiceSpecific]:L,[c.useNonStandardStacks]:L,[c.specialFeatureOptins]:N,[c.purposeConsents]:N,[c.purposeLegitimateInterests]:N,[c.purposeOneTreatment]:L,[c.publisherCountryCode]:J,[c.vendorConsents]:D,[c.vendorLegitimateInterests]:D,[c.publisherRestrictions]:ee,segmentType:h,[c.vendorsDisclosed]:D,[c.vendorsAllowed]:D,[c.publisherConsents]:N,[c.publisherLegitimateInterests]:N,[c.numCustomPurposes]:h,[c.publisherCustomConsents]:N,[c.publisherCustomLegitimateInterests]:N}}var te=class{1={[E.CORE]:[c.version,c.created,c.lastUpdated,c.cmpId,c.cmpVersion,c.consentScreen,c.consentLanguage,c.vendorListVersion,c.purposeConsents,c.vendorConsents]};2={[E.CORE]:[c.version,c.created,c.lastUpdated,c.cmpId,c.cmpVersion,c.consentScreen,c.consentLanguage,c.vendorListVersion,c.policyVersion,c.isServiceSpecific,c.useNonStandardStacks,c.specialFeatureOptins,c.purposeConsents,c.purposeLegitimateInterests,c.purposeOneTreatment,c.publisherCountryCode,c.vendorConsents,c.vendorLegitimateInterests,c.publisherRestrictions],[E.PUBLISHER_TC]:[c.publisherConsents,c.publisherLegitimateInterests,c.numCustomPurposes,c.publisherCustomConsents,c.publisherCustomLegitimateInterests],[E.VENDORS_ALLOWED]:[c.vendorsAllowed],[E.VENDORS_DISCLOSED]:[c.vendorsDisclosed]}};var se=class{1=[E.CORE];2=[E.CORE];constructor(e,t){if(e.version===2)if(e.isServiceSpecific)this[2].push(E.PUBLISHER_TC);else{let s=!!(t&&t.isForVendors);(!s||e[c.supportOOB]===!0)&&this[2].push(E.VENDORS_DISCLOSED),s&&(e[c.supportOOB]&&e[c.vendorsAllowed].size>0&&this[2].push(E.VENDORS_ALLOWED),this[2].push(E.PUBLISHER_TC))}}};var W=class{static fieldSequence=new te;static encode(e,t){let s;try{s=this.fieldSequence[String(e.version)][t]}catch{throw new _(`Unable to encode version: ${e.version}, segment: ${t}`)}let o="";t!==E.CORE&&(o=h.encode(G.KEY_TO_ID[t],p.segmentType));let n=Ee();return s.forEach(a=>{let i=e[a],l=n[a],u=p[a];u===void 0&&this.isPublisherCustom(a)&&(u=Number(e[c.numCustomPurposes]));try{o+=l.encode(i,u)}catch(d){throw new _(`Error encoding ${t}->${a}: ${d.message}`)}}),F.encode(o)}static decode(e,t,s){let o=F.decode(e),n=0;s===E.CORE&&(t.version=h.decode(o.substr(n,p[c.version]),p[c.version])),s!==E.CORE&&(n+=p.segmentType);let a=this.fieldSequence[String(t.version)][s],i=Ee();return a.forEach(l=>{let u=i[l],d=p[l];if(d===void 0&&this.isPublisherCustom(l)&&(d=Number(t[c.numCustomPurposes])),d!==0){let m=o.substr(n,d);if(u===D?t[l]=u.decode(m,t.version):t[l]=u.decode(m,d),Number.isInteger(d))n+=d;else if(Number.isInteger(t[l].bitLength))n+=t[l].bitLength;else throw new I(l)}}),t}static isPublisherCustom(e){return e.indexOf("publisherCustom")===0}};var oe=class{static processor=[e=>e,(e,t)=>{e.publisherRestrictions.gvl=t,e.purposeLegitimateInterests.unset(1);let s=new Map;return s.set("legIntPurposes",e.vendorLegitimateInterests),s.set("purposes",e.vendorConsents),s.forEach((o,n)=>{o.forEach((a,i)=>{if(a){let l=t.vendors[i];if(!l||l.deletedDate)o.unset(i);else if(l[n].length===0&&!(n==="legIntPurposes"&&l.purposes.length===0&&l.legIntPurposes.length===0&&l.specialPurposes.length>0))if(e.isServiceSpecific)if(l.flexiblePurposes.length===0)o.unset(i);else{let u=e.publisherRestrictions.getRestrictions(i),d=!1;for(let m=0,f=u.length;m0&&t?.version<=this.processor.length?e.version=t.version:e.version=this.processor.length;let o=e.version-1;if(!this.processor[o])throw new _(`Invalid version: ${e.version}`);return this.processor[o](e,s)}};var re=class{static absCall(e,t,s,o){return new Promise((n,a)=>{let i=new XMLHttpRequest,l=()=>{if(i.readyState==XMLHttpRequest.DONE)if(i.status>=200&&i.status<300){let f=i.response;if(typeof f=="string")try{f=JSON.parse(f)}catch{}n(f)}else a(new Error(`HTTP Status: ${i.status} response type: ${i.responseType}`))},u=()=>{a(new Error("error"))},d=()=>{a(new Error("aborted"))},m=()=>{a(new Error("Timeout "+o+"ms "+e))};i.withCredentials=s,i.addEventListener("load",l),i.addEventListener("error",u),i.addEventListener("abort",d),t===null?i.open("GET",e,!0):i.open("POST",e,!0),i.responseType="json",i.timeout=o,i.ontimeout=m,i.send(t)})}static post(e,t,s=!1,o=0){return this.absCall(e,JSON.stringify(t),s,o)}static fetch(e,t=!1,s=0){return this.absCall(e,null,t,s)}};var P=class r extends T{static LANGUAGE_CACHE=new Map;static CACHE=new Map;static LATEST_CACHE_KEY=0;static DEFAULT_LANGUAGE="EN";static consentLanguages=new Z;static baseUrl_;static set baseUrl(e){if(/^https?:\/\/vendorlist\.consensu\.org\//.test(e))throw new U("Invalid baseUrl! You may not pull directly from vendorlist.consensu.org and must provide your own cache");e.length>0&&e[e.length-1]!=="/"&&(e+="/"),this.baseUrl_=e}static get baseUrl(){return this.baseUrl_}static latestFilename="vendor-list.json";static versionedFilename="archives/vendor-list-v[VERSION].json";static languageFilename="purposes-[LANG].json";readyPromise;gvlSpecificationVersion;vendorListVersion;tcfPolicyVersion;lastUpdated;purposes;specialPurposes;features;specialFeatures;isReady_=!1;vendors_;vendorIds;fullVendorList;byPurposeVendorMap;bySpecialPurposeVendorMap;byFeatureVendorMap;bySpecialFeatureVendorMap;stacks;lang_;isLatest=!1;constructor(e){super();let t=r.baseUrl;if(this.lang_=r.DEFAULT_LANGUAGE,this.isVendorList(e))this.populate(e),this.readyPromise=Promise.resolve();else{if(!t)throw new U("must specify GVL.baseUrl before loading GVL json");if(e>0){let s=e;r.CACHE.has(s)?(this.populate(r.CACHE.get(s)),this.readyPromise=Promise.resolve()):(t+=r.versionedFilename.replace("[VERSION]",String(s)),this.readyPromise=this.fetchJson(t))}else r.CACHE.has(r.LATEST_CACHE_KEY)?(this.populate(r.CACHE.get(r.LATEST_CACHE_KEY)),this.readyPromise=Promise.resolve()):(this.isLatest=!0,this.readyPromise=this.fetchJson(t+r.latestFilename))}}static emptyLanguageCache(e){let t=!1;return e===void 0&&r.LANGUAGE_CACHE.size>0?(r.LANGUAGE_CACHE=new Map,t=!0):typeof e=="string"&&this.consentLanguages.has(e.toUpperCase())&&(r.LANGUAGE_CACHE.delete(e.toUpperCase()),t=!0),t}static emptyCache(e){let t=!1;return Number.isInteger(e)&&e>=0?(r.CACHE.delete(e),t=!0):e===void 0&&(r.CACHE=new Map,t=!0),t}cacheLanguage(){r.LANGUAGE_CACHE.has(this.lang_)||r.LANGUAGE_CACHE.set(this.lang_,{purposes:this.purposes,specialPurposes:this.specialPurposes,features:this.features,specialFeatures:this.specialFeatures,stacks:this.stacks})}async fetchJson(e){try{this.populate(await re.fetch(e))}catch(t){throw new U(t.message)}}getJson(){return JSON.parse(JSON.stringify({gvlSpecificationVersion:this.gvlSpecificationVersion,vendorListVersion:this.vendorListVersion,tcfPolicyVersion:this.tcfPolicyVersion,lastUpdated:this.lastUpdated,purposes:this.purposes,specialPurposes:this.specialPurposes,features:this.features,specialFeatures:this.specialFeatures,stacks:this.stacks,vendors:this.fullVendorList}))}async changeLanguage(e){let t=e.toUpperCase();if(r.consentLanguages.has(t)){if(t!==this.lang_)if(this.lang_=t,r.LANGUAGE_CACHE.has(t)){let s=r.LANGUAGE_CACHE.get(t);for(let o in s)s.hasOwnProperty(o)&&(this[o]=s[o])}else{let s=r.baseUrl+r.languageFilename.replace("[LANG]",e);try{await this.fetchJson(s),this.cacheLanguage()}catch(o){throw new U("unable to load language: "+o.message)}}}else throw new U(`unsupported language ${e}`)}get language(){return this.lang_}isVendorList(e){return e!==void 0&&e.vendors!==void 0}populate(e){this.purposes=e.purposes,this.specialPurposes=e.specialPurposes,this.features=e.features,this.specialFeatures=e.specialFeatures,this.stacks=e.stacks,this.isVendorList(e)&&(this.gvlSpecificationVersion=e.gvlSpecificationVersion,this.tcfPolicyVersion=e.tcfPolicyVersion,this.vendorListVersion=e.vendorListVersion,this.lastUpdated=e.lastUpdated,typeof this.lastUpdated=="string"&&(this.lastUpdated=new Date(this.lastUpdated)),this.vendors_=e.vendors,this.fullVendorList=e.vendors,this.mapVendors(),this.isReady_=!0,this.isLatest&&r.CACHE.set(r.LATEST_CACHE_KEY,this.getJson()),r.CACHE.has(this.vendorListVersion)||r.CACHE.set(this.vendorListVersion,this.getJson())),this.cacheLanguage()}mapVendors(e){this.byPurposeVendorMap={},this.bySpecialPurposeVendorMap={},this.byFeatureVendorMap={},this.bySpecialFeatureVendorMap={},Object.keys(this.purposes).forEach(t=>{this.byPurposeVendorMap[t]={legInt:new Set,consent:new Set,flexible:new Set}}),Object.keys(this.specialPurposes).forEach(t=>{this.bySpecialPurposeVendorMap[t]=new Set}),Object.keys(this.features).forEach(t=>{this.byFeatureVendorMap[t]=new Set}),Object.keys(this.specialFeatures).forEach(t=>{this.bySpecialFeatureVendorMap[t]=new Set}),Array.isArray(e)||(e=Object.keys(this.fullVendorList).map(t=>+t)),this.vendorIds=new Set(e),this.vendors_=e.reduce((t,s)=>{let o=this.vendors_[String(s)];return o&&o.deletedDate===void 0&&(o.purposes.forEach(n=>{this.byPurposeVendorMap[String(n)].consent.add(s)}),o.specialPurposes.forEach(n=>{this.bySpecialPurposeVendorMap[String(n)].add(s)}),o.legIntPurposes.forEach(n=>{this.byPurposeVendorMap[String(n)].legInt.add(s)}),o.flexiblePurposes&&o.flexiblePurposes.forEach(n=>{this.byPurposeVendorMap[String(n)].flexible.add(s)}),o.features.forEach(n=>{this.byFeatureVendorMap[String(n)].add(s)}),o.specialFeatures.forEach(n=>{this.bySpecialFeatureVendorMap[String(n)].add(s)}),t[s]=o),t},{})}getFilteredVendors(e,t,s,o){let n=e.charAt(0).toUpperCase()+e.slice(1),a,i={};return e==="purpose"&&s?a=this["by"+n+"VendorMap"][String(t)][s]:a=this["by"+(o?"Special":"")+n+"VendorMap"][String(t)],a.forEach(l=>{i[String(l)]=this.vendors[String(l)]}),i}getVendorsWithConsentPurpose(e){return this.getFilteredVendors("purpose",e,"consent")}getVendorsWithLegIntPurpose(e){return this.getFilteredVendors("purpose",e,"legInt")}getVendorsWithFlexiblePurpose(e){return this.getFilteredVendors("purpose",e,"flexible")}getVendorsWithSpecialPurpose(e){return this.getFilteredVendors("purpose",e,void 0,!0)}getVendorsWithFeature(e){return this.getFilteredVendors("feature",e)}getVendorsWithSpecialFeature(e){return this.getFilteredVendors("feature",e,void 0,!0)}get vendors(){return this.vendors_}narrowVendorsTo(e){this.mapVendors(e)}get isReady(){return this.isReady_}clone(){let e=new r(this.getJson());return this.lang_!==r.DEFAULT_LANGUAGE&&e.changeLanguage(this.lang_),e}static isInstanceOf(e){return typeof e=="object"&&typeof e.narrowVendorsTo=="function"}};var K=class extends T{static consentLanguages=P.consentLanguages;isServiceSpecific_=!1;supportOOB_=!0;useNonStandardStacks_=!1;purposeOneTreatment_=!1;publisherCountryCode_="AA";version_=2;consentScreen_=0;policyVersion_=2;consentLanguage_="EN";cmpId_=0;cmpVersion_=0;vendorListVersion_=0;numCustomPurposes_=0;gvl_;created;lastUpdated;specialFeatureOptins=new y;purposeConsents=new y;purposeLegitimateInterests=new y;publisherConsents=new y;publisherLegitimateInterests=new y;publisherCustomConsents=new y;publisherCustomLegitimateInterests=new y;customPurposes;vendorConsents=new y;vendorLegitimateInterests=new y;vendorsDisclosed=new y;vendorsAllowed=new y;publisherRestrictions=new B;constructor(e){super(),e&&(this.gvl=e),this.updated()}set gvl(e){P.isInstanceOf(e)||(e=new P(e)),this.gvl_=e,this.publisherRestrictions.gvl=e}get gvl(){return this.gvl_}set cmpId(e){if(e=Number(e),Number.isInteger(e)&&e>1)this.cmpId_=e;else throw new O("cmpId",e)}get cmpId(){return this.cmpId_}set cmpVersion(e){if(e=Number(e),Number.isInteger(e)&&e>-1)this.cmpVersion_=e;else throw new O("cmpVersion",e)}get cmpVersion(){return this.cmpVersion_}set consentScreen(e){if(e=Number(e),Number.isInteger(e)&&e>-1)this.consentScreen_=e;else throw new O("consentScreen",e)}get consentScreen(){return this.consentScreen_}set consentLanguage(e){this.consentLanguage_=e}get consentLanguage(){return this.consentLanguage_}set publisherCountryCode(e){if(/^([A-z]){2}$/.test(e))this.publisherCountryCode_=e.toUpperCase();else throw new O("publisherCountryCode",e)}get publisherCountryCode(){return this.publisherCountryCode_}set vendorListVersion(e){if(e=Number(e)>>0,e<0)throw new O("vendorListVersion",e);this.vendorListVersion_=e}get vendorListVersion(){return this.gvl?this.gvl.vendorListVersion:this.vendorListVersion_}set policyVersion(e){if(this.policyVersion_=parseInt(e,10),this.policyVersion_<0)throw new O("policyVersion",e)}get policyVersion(){return this.gvl?this.gvl.tcfPolicyVersion:this.policyVersion_}set version(e){this.version_=parseInt(e,10)}get version(){return this.version_}set isServiceSpecific(e){this.isServiceSpecific_=e}get isServiceSpecific(){return this.isServiceSpecific_}set useNonStandardStacks(e){this.useNonStandardStacks_=e}get useNonStandardStacks(){return this.useNonStandardStacks_}set supportOOB(e){this.supportOOB_=e}get supportOOB(){return this.supportOOB_}set purposeOneTreatment(e){this.purposeOneTreatment_=e}get purposeOneTreatment(){return this.purposeOneTreatment_}setAllVendorConsents(){this.vendorConsents.set(this.gvl.vendors)}unsetAllVendorConsents(){this.vendorConsents.empty()}setAllVendorsDisclosed(){this.vendorsDisclosed.set(this.gvl.vendors)}unsetAllVendorsDisclosed(){this.vendorsDisclosed.empty()}setAllVendorsAllowed(){this.vendorsAllowed.set(this.gvl.vendors)}unsetAllVendorsAllowed(){this.vendorsAllowed.empty()}setAllVendorLegitimateInterests(){this.vendorLegitimateInterests.set(this.gvl.vendors)}unsetAllVendorLegitimateInterests(){this.vendorLegitimateInterests.empty()}setAllPurposeConsents(){this.purposeConsents.set(this.gvl.purposes)}unsetAllPurposeConsents(){this.purposeConsents.empty()}setAllPurposeLegitimateInterests(){this.purposeLegitimateInterests.set(this.gvl.purposes)}unsetAllPurposeLegitimateInterests(){this.purposeLegitimateInterests.empty()}setAllSpecialFeatureOptins(){this.specialFeatureOptins.set(this.gvl.specialFeatures)}unsetAllSpecialFeatureOptins(){this.specialFeatureOptins.empty()}setAll(){this.setAllVendorConsents(),this.setAllPurposeLegitimateInterests(),this.setAllSpecialFeatureOptins(),this.setAllPurposeConsents(),this.setAllVendorLegitimateInterests()}unsetAll(){this.unsetAllVendorConsents(),this.unsetAllPurposeLegitimateInterests(),this.unsetAllSpecialFeatureOptins(),this.unsetAllPurposeConsents(),this.unsetAllVendorLegitimateInterests()}get numCustomPurposes(){let e=this.numCustomPurposes_;if(typeof this.customPurposes=="object"){let t=Object.keys(this.customPurposes).sort((s,o)=>Number(s)-Number(o));e=parseInt(t.pop(),10)}return e}set numCustomPurposes(e){if(this.numCustomPurposes_=parseInt(e,10),this.numCustomPurposes_<0)throw new O("numCustomPurposes",e)}updated(){let e=new Date,t=new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()));this.created=t,this.lastUpdated=t}};var ne=class{static encode(e,t){let s="",o;return e=oe.process(e,t),Array.isArray(t?.segments)?o=t.segments:o=new se(e,t)[""+e.version],o.forEach((n,a)=>{let i="";a{!0},Ze=(...r)=>{!0};P.baseUrl=Xe;var Be=()=>{if(!document.querySelector('iframe[name="__tcfapiLocator"]')){let r=document.createElement("iframe");r.setAttribute("name","__tcfapiLocator"),r.style.display="none",document?.body?document?.body?.appendChild(r):window.addEventListener("DOMContentLoaded",()=>{document?.body?.appendChild(r)})}},ce=async r=>{let e=new K(new P);await e.gvl.readyPromise,e.cmpId=473,e.cmpVersion=1,e.consentScreen=0,e.consentLanguage="ES",e.vendorListVersion=e.gvl.vendorListVersion;for(let s=1;s<=10;s++)e.purposeConsents.set(s,r),e.vendorConsents.set(s,r);let t=ne.encode(e);document.cookie=`euconsent-v2=${t}; path=/; SameSite=Lax`,localStorage.setItem("euconsent-v2",t),localStorage.setItem("consentAccepted",String(r)),window.__tcString=t},Ge=()=>{ie("\u23F3 Registrando __tcfapi"),window.__tcfapi=(r,e,t,s)=>{ie("\u{1F9EA} __tcfapi called:",{command:r,version:e,parameter:s});let o=localStorage.getItem("euconsent-v2")||"",n=localStorage.getItem("consentAccepted")==="true";if(r==="ping"){ie("\u2705 Responding to ping"),t({gdprAppliesGlobally:!1,cmpLoaded:!0,cmpStatus:o?"loaded":"stub"},!0);return}if(r==="getTCData"||r==="addEventListener"){ie("\u2705 Responding to",r),t({tcString:o,cmpId:123,cmpVersion:1,gdprApplies:!0,eventStatus:o?"tcloaded":"cmpuishown",cmpStatus:o?"loaded":"stub",purpose:{consent:{1:n,2:n,3:n,4:n,5:n}}},!0);return}Ze("\u274C Unknown command:",r),t(null,!1)}};Be();Ge();console.log("TCF API initialized \u{1F680}");function tt(r){let e=r.querySelectorAll(".privacy-label"),t=n=>{n.currentTarget.classList.toggle("active"),n.currentTarget.parentElement.nextElementSibling.querySelector("p").classList.toggle("active"),n.currentTarget.parentElement.nextElementSibling.style.maxHeight?n.currentTarget.parentElement.nextElementSibling.style.maxHeight=null:n.currentTarget.parentElement.nextElementSibling.style.maxHeight=n.currentTarget.parentElement.nextElementSibling.scrollHeight+"px"};e.forEach(n=>{n.addEventListener("click",t)});let s=r.getElementById("DO_NOT_SELL_PERSONAL_INFORMATION"),o=r.getElementById("TARGETING_COOKIES");s&&o&&(s.addEventListener("change",function(){this.checked&&(o.checked=!1,o.removeAttribute("checked"),Ie(o,!1))}),o.addEventListener("change",function(){this.checked&&(s.checked=!1,s.removeAttribute("checked"),Ie(s,!1))}))}function Ke(r,e){window.dataLayer=window.dataLayer||[],window.gtag=window.gtag||function(){dataLayer.push(arguments)},window.dataLayer.push({event:r,captainComplianceConsent:{...e}}),gtag("consent","update",{analytics_storage:e.selectedCookies.PERFORMANCE_COOKIES?"granted":"denied",ad_storage:e.selectedCookies.TARGETING_COOKIES?"granted":"denied",ad_user_data:e.selectedCookies.TARGETING_COOKIES?"granted":"denied",ad_personalization:e.selectedCookies.TARGETING_COOKIES?"granted":"denied",functionality_storage:e.selectedCookies.FUNCTIONALITY_COOKIES?"granted":"denied",security_storage:e.selectedCookies.STRICTLY_NECESSARY_COOKIES?"granted":"denied"})}function st(r){return r?.length?(r||[]).every(({display:e})=>!e):!1}function ot(r,e,t){let s,o,n,a="unset",i=t===Ne?"0px":"10px";return e==="top"?s=i:e==="bottom"?o=i:e==="middle"&&(s="50%"),r==="left"?n=i:r==="right"?a=i:r==="middle"&&(n="50%"),{top:s,bottom:o,left:n,right:a}}function rt(r,e){let t,s="0px";return e==="middle"&&(t="-50%"),r==="middle"&&(s="50%"),{vertical:t,horizontal:s}}function ae(r,e){let t=document.createElement("template");t.innerHTML=r.trim();let s=t.content.querySelector("style");s?e.appendChild(s):console.warn("Provided CSS string doesn't contain a valid `;ae(q,n),ae(s,n),ae(t,n),ae(o,n)}function it(r,e){return(r||[]).find(({cookieTypeId:s})=>s===e)||{display:!0,checked:!1}}function ct(r,e){let t=(()=>{try{let i=Y(`${A}_preference`);return i?JSON.parse(i):null}catch{return null}})(),s=t?.selectedCookies||{},o=r.sort((i,l)=>i.order!==void 0||l.order!==void 0?(i.order??1/0)-(l.order??1/0):0).reduce((i,{key:l,name:u,id:d})=>{let m=it(e,d);if(l==="UNCLASSIFIED_COOKIES"||!m?.display)return i;let f=s[l]??m?.checked,g=l==="STRICTLY_NECESSARY_COOKIES",C=[g||f?"checked":"",g?"disabled checked":""].filter(Boolean).join(" "),v=`

${u.replace("cookies","")}

`;return i+v},""),n=t?.notSellPersonalInfo?"checked":"",a=`

Do Not Sell or Share My Personal Information

`;return o+a}function at(){let r=document.createElement("div");r.classList.add("captain-compliance-modal-container"),r.style.display="block";let e=r.attachShadow({mode:"open"});return document.body.appendChild(r),e}function lt(r,e,t,s,o,n,a,i,l){let u=r.displayLogo&&!!r.image,d=st(t),m=ct(e,t);i.innerHTML+=n,i.innerHTML+=l?"":a,parseFloat(r.overlay)>0&&(i.innerHTML+=`
`),o&&!l&&(i.innerHTML+=o);let f=i.querySelector("#captain-compliance-modal-bn-body_content_icon_id"),g=i.querySelector("#captain-compliance-modal-settings-body_content_switch_list_id"),S=i.querySelector("#cc-modal-cookie-settings"),C=i.querySelector("#captain-compliance-modal-bn-body_content_text_title_id"),v=i.querySelector("#captain-compliance-modal-bn-body_content_text_description_id"),b=i.querySelector("#captain-compliance-modal-bn-body_footer_transparency_id");b&&s.active?b.href=`https://${s.cname}.cookietransparency.com`:b&&b.remove(),C&&r.title.length?C.textContent=r.title:C&&C.remove(),v&&r.description.length?v.textContent=r.description:v&&v.remove(),g&&!d?g.innerHTML+=m:g&&S&&(g.remove(),S.remove()),f&&u?f.src=r.image:f&&f.remove()}function Ye(r){return Object.keys(r.firstParty).reduce((s,o)=>me.includes(o)?s:[...s,...r.firstParty[o].data,...r.thirdParty[o].data],[]).map(({name:s,domain:o,path:n,regex:a})=>({name:s,domain:o,path:n,regex:a}))}function pt(r,e){return e.reduce((t,{key:s})=>r.getElementById(s)?.checked||me.includes(s)?[...t,s]:t,[])}function dt(r,e){let t={...r};return e.forEach(s=>{delete t.firstParty[s],delete t.thirdParty[s]}),t}function je(r,e,t){var s=new Date,o=s.getTime(),n;typeof t=="number"&&!isNaN(t)?n=o+1e3*60*60*24*t:n=o+1e3*60*60*24*30,s.setTime(n),document.cookie=`${A}_${r}=${e}; Expires=`+s.toUTCString()+"; Path=/;"}function Ce(r,e,t,s){s||(r.getElementById(he).style.display="none"),je(e,"ok",t)}function He(r,e,t){r.querySelectorAll(`.${e}`).forEach(o=>{o.onclick=function(){t()}})}function ze(r,e,t){let s=dt(r,e);ye(Ye(s),t)}function ut(r,e,t,s){let o=pt(r,e);ze(t,o,s)}function ht(r,e,t){return()=>{t||(r.style.display="none"),e.style.visibility="visible"}}function le(r,e,t){let s=t??Y(`${A}_preference`);if(!s)return;let o;try{o=typeof s=="object"?s:JSON.parse(s)}catch(a){console.error("Error parsing cookie preferences:",a);return}let n=o.selectedCookies||{};o?.notSellPersonalInfo&&(n[M]=!0),[...e,{key:M}].forEach(({key:a})=>{let i=r.getElementById(a);if(!i)return;let l=a==="STRICTLY_NECESSARY_COOKIES",u=l||n?.[a]||!1;ft(i,u,l),Ie(i,u)})}function ft(r,e,t){r.checked=e,e?r.setAttribute("checked",""):r.removeAttribute("checked"),t?r.setAttribute("disabled",""):r.removeAttribute("disabled")}function Ie(r,e){r.closest(".captain-compliance-modal-settings-body_content_switch_list_item_preset")?.querySelector("label")?.classList.toggle("active",e)}async function pe(r,e){let t=await Fe(r),s={...r,id:t.id};je("preference",JSON.stringify(s),e),Ke("captainComplianceConsent",s)}function mt(r,e,t,s,o,n,a,i){let{scannerId:l,id:u}=t,d=s?.webLink||"https://captaincompliance.com/solutions/cookie-consent-manager/",m=o.getElementById(he),f=o.getElementById(ke),g=o.getElementById("cc-cookie-simple-button_id"),S=o.getElementById(ge),C=ht(m,f,a);g&&(g.onclick=function(){s.mode===Q&&f?f.style.visibility="visible":m&&(m.style.display="block",m.style.visibility="visible",sessionStorage.removeItem(A)),g.style.visibility="hidden"},He(o,"cc-modal-logo-footer-compliance",()=>window.open(d,"_blank")));let v=o.getElementById("cc-modal-close-all");v&&(v.onclick=function(){let x=_e(`${A}_${l}`),R=m?.classList.contains("cc-trigger-from-third-party");x&&m&&!R&&(m.style.display="block"),s.mode===Q&&(g.style.visibility="visible"),f&&(f.style.visibility="hidden",le(o,e))});let b=o.getElementById("cc-modal-allow-selection");b&&(b.onclick=function(){Ce(o,l,s.dueDays,a),X(u,"PARTIALLY_ALLOWED"),f.style.visibility="hidden",ut(o,e,r,s?.callbackUrl);let x=e.reduce((qe,{key:xe})=>{let Qe=o.getElementById(xe)?.checked??!1;return{...qe,[xe]:Qe}},{}),R=o.getElementById(M);S&&(S.style.visibility="hidden");let We=R?.checked??!1,Te={status:"PARTIALLY_ALLOWED",scannerId:l,bannerId:u,geoInfo:n,notSellPersonalInfo:We,selectedCookies:x,scripts:i,callbackUrl:s?.callbackUrl||""};ue(x),ce(!0),pe(Te,s.dueDays),le(o,e,Te)});let $=o.getElementById("cc-modal-allow-all");$&&($.onclick=function(){let x={STRICTLY_NECESSARY_COOKIES:!0,TARGETING_COOKIES:!0,FUNCTIONALITY_COOKIES:!0,PERFORMANCE_COOKIES:!0,UNCLASSIFIED_COOKIES:!0};ue(x),Ce(o,l,s.dueDays,a),X(u,"ALLOWED"),ye([]);let R={status:"ALLOWED",scannerId:l,bannerId:u,geoInfo:n,notSellPersonalInfo:!1,selectedCookies:x,scripts:i,callbackUrl:""};S&&(S.style.visibility="hidden"),ce(!0),pe(R,s.dueDays),le(o,e,R)});let q=o.getElementById("cc-modal-reject-all");q&&(q.onclick=function(){let x={STRICTLY_NECESSARY_COOKIES:!1,TARGETING_COOKIES:!1,FUNCTIONALITY_COOKIES:!1,PERFORMANCE_COOKIES:!1,UNCLASSIFIED_COOKIES:!1};de(i,x),Ce(o,l,s.dueDays,a),X(u,"REJECTED"),ye(Ye(r),s?.callbackUrl);let R={status:"REJECTED",scannerId:l,bannerId:u,geoInfo:n,notSellPersonalInfo:!1,selectedCookies:x,scripts:i,callbackUrl:s?.callbackUrl||""};S&&(S.style.visibility="hidden"),ce(!1),pe(R,s.dueDays),le(o,e,R)});let Ae=o.getElementById("cc-cookie-simple-button-close_id");Ae&&(Ae.onclick=function(){m.style.display="none",g.style.visibility="visible",sessionStorage.setItem(A,"true")});let Oe=document.getElementById("id-open-settings-cc");Oe?Oe.addEventListener("click",()=>{a||m?.classList?.add("cc-trigger-from-third-party"),C()}):document.body.addEventListener("click",function(x){x.target&&x.target.id==="id-open-settings-cc"&&(a||m?.classList?.add("cc-trigger-from-third-party"),C())}),He(o,"captain-compliance-open-settings",C)}async function gt(r){await new Promise(o=>setTimeout(o,3e3));let e=Y(`${A}_preference`),s=(e?JSON.parse(e):{}).callbackUrl||"";await Je(r,s)}async function St(r,e){try{let t=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cookieList:r})});if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);return console.log("Cookie list sent"),!0}catch(t){throw console.error("Error sending cookie list to endpoint:",t),t}}async function Je(r,e){let t=new RegExp(`${A}_\\d+`),s=document.cookie.split(";"),o=await Ue(),n=o.cookies?Object.keys(o.cookies):[],a=[];r.forEach(i=>{let l=i.name;a.push(l),[...s,...n].forEach(u=>{let[d]=u.trim().split("="),m=d.startsWith(l)&&d.length>=l.length,f=i.regex?new RegExp(i.regex).test(d):m;if(!t.test(d)&&f){let g=`${d}=; expires=Thu, 01 Jan 1970 00:00:01 GMT;`;if(document.cookie=`${g}`,document.cookie=`${g} path=/;`,document.cookie=`${g} path=/; domain=${i.domain}`,document.cookie=`${g} path=/; domain=${i.domain}; secure`,document.cookie=`${g} path=/; domain=${i.domain}; SameSite=None; Secure`,!_e(d)){let C=new Date;C.setTime(C.getTime()+-1*24*60*60*1e3);let v="; expires="+C.toGMTString();document.cookie=`${d}=${v}; path=/;`}}})}),e&&await St(r.map(i=>({name:i.name,domain:i.domain,regex:i.regex})),e)}function be(){let r=new RegExp(`^${A}_(\\d+)$`);if(!document.cookie.split(";").some(o=>{let n=o.trim().split("=")[0];return n&&r.test(n)}))return;let t=localStorage.getItem(fe),s=t?JSON.parse(t):[];gt(s)}function _e(r){return document.cookie.split(";").every(e=>e.trim().startsWith(`${r}=`)===!1)}function ye(r,e){Je(r,e),localStorage.setItem(fe,JSON.stringify(r))}function Et(r,e){return!(r&&!r.active&&!r.region.isGlobal||!_e(`${A}_${e.scannerId}`))}function Ct(){return window.location.hostname.replace("www.","")}function It(r){try{return new URL(r).hostname.replace("www.","")}catch{return"Invalid URL"}}function Y(r){let e=document.cookie.split("; ");for(let t of e){let[s,o]=t.split("=");if(s===r)return decodeURIComponent(o)}return null}function Le(){let r=Y(`${A}_preference`);if(r)try{let e=JSON.parse(r);Ke("captainComplianceConsent",e)}catch{return}}function yt(r,e,t,s){return{html:e.html||r.html,css:e.css||r.styles,miniHtml:e.miniHtml||t.html,miniCss:e.miniCss||t.styles,settingsHtml:e.settingsHtml||s.html,settingsCss:e.settingsCss||s.styles}}function ve(r){if(!r&&!Y(`${A}_preference`))return;let e=Y(`${A}_preference`),t;try{t=typeof e=="object"?e:JSON.parse(e)}catch(n){console.error("Error parsing cookie preferences:",n);return}let s=t?.scripts;if((!r||!Array.isArray(r)||r.length===0)&&(!s||!Array.isArray(s)||s.length===0))return;let o=r||s;if(!t?.selectedCookies){we(o);return}de(o,t.selectedCookies)}async function bt(){let r=navigator.globalPrivacyControl===!0,e=await Re(),t=Ct(),s=It(e.banner.scanner.domain);if(t!==s&&!!1){console.log("%cSORRY THIS IS NOT THE ALLOWED DOMAIN","color: red; font-size: 20px");return}let{bannerConfiguration:o,bannerDisplays:n,banner:a,report:i,geoInfo:l,bannerModeStyle:u,scripts:d}=e,m={country:l.country,countryCode:l.countryCode,region:l.region,regionName:l.regionName,city:l.city,timezone:l.timezone},f=await Ve(a.scannerId);if(f){console.log("renderModal",d),ve(d);let g=await De(),S=at();if(r){console.log("%cGPC Signal","color: blue; font-size: 15px"),ze(f.reportInformation.cookies,["STRICTLY_NECESSARY_COOKIES","UNCLASSIFIED_COOKIES"]);let $={status:"GPC_SIGNAL",scannerId:a.scannerId,bannerId:a.id,notSellPersonalInfo:!0,geoInfo:m,selectedCookies:{STRICTLY_NECESSARY_COOKIES:!0,TARGETING_COOKIES:!0,FUNCTIONALITY_COOKIES:!1,PERFORMANCE_COOKIES:!1,UNCLASSIFIED_COOKIES:!0}};pe($,o.dueDays)}let C=await Se("SETTINGS"),v=await Se("ICON"),b=yt(u,o,v,C);Pe(a.id),lt(o,g,n,i,b.html,b.settingsHtml,b.miniHtml,S,r),nt(o,a,b.css,b.settingsCss,b.miniCss,S,r),mt(f.reportInformation.cookies,g,a,o,S,m,r,d),tt(S)}}(function(){let r=history.pushState,e=history.replaceState;function t(s){console.log(`Navigated to: ${s}`),be(),Le()}history.pushState=function(...s){r.apply(this,s),t(window.location.href)},history.replaceState=function(...s){e.apply(this,s),t(window.location.href)},window.addEventListener("popstate",function(){t(window.location.href)})})();(function(){function r(){console.log("All content loaded successfully."),be(),Le(),ve()}document.readyState==="complete"?r():window.addEventListener("load",r),console.log("Content load listener initialized.")})();window.addEventListener("beforeunload",function(){be(),Le(),ve()});bt();})();