!function(){"use strict";var e=function(){return e=Object.assign||function(e){for(var t,n=1,s=arguments.length;n0&&r[r.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]n)throw new TypeError;for(var s=Math.floor(Math.random()*(n+1-t))+t,r="",i=0;i2&&"string"==typeof e[2]&&e[2].length>0?e[2]:null)+"-disqus"}}catch(e){t=u.location.hostname}return 0===t.indexOf("www.")&&(t=t.replace("www.","")),t}(),d=!1,0!==Object.keys(C).length)return[3,5];(h=new URL("https://"+I+"/websiteconfig")).searchParams.set("o",w),h.searchParams.set("w",l),n.label=1;case 1:return n.trys.push([1,4,,5]),[4,fetch(h.toString())];case 2:if(!(g=n.sent()).ok)throw new Error;return[4,g.json()];case 3:return m=n.sent(),t.websiteID=m.tagData.w,t.contentEnabled=m.tagData.ce,t.mobileContentEnabled=m.tagData.me,[2,{siteInfo:t,bundleData:m.bundleData,messageWall:m.messageWall,checksum:m.checksum}];case 4:return n.sent(),[3,5];case 5:if(l&&l in C)b=C[l],t.websiteID=null!==(e=b.w)&&void 0!==e?e:b.website_id,t.contentEnabled=null!==(s=b.ce)&&void 0!==s?s:b.content_enabled,t.mobileContentEnabled=null!==(r=b.me)&&void 0!==r?r:b.mobile_content_enabled,d=!0;else for(v in C)(l.indexOf(v.toLowerCase())>-1||u.location.hostname.indexOf(v.toLowerCase())>-1)&&(d=!0,b=C[v],t.websiteID=null!==(i=b.w)&&void 0!==i?i:b.website_id,t.contentEnabled=null!==(o=b.ce)&&void 0!==o?o:b.content_enabled,t.mobileContentEnabled=null!==(a=b.me)&&void 0!==a?a:b.mobile_content_enabled);if(d)return[2,{siteInfo:t}];if(f(1)){if(y={domain:l,orgID:parseInt(w)},_=void 0,window.TextEncoder)_=(new window.TextEncoder).encode(JSON.stringify(y)).buffer;else{for(S=unescape(encodeURIComponent(JSON.stringify(y))),L=new Uint8Array(S.length),A=0;A2&&void 0!==arguments[2]?arguments[2]:""}`),this.name="TCModelError"}}class F{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 k("Invalid bitField");const t=e.length%this.LCM;e+=t?"0".repeat(this.LCM-t):"";let n="";for(let t=0;t{const n=this.deepClone(this[t]);void 0!==n&&(e[t]=n)})),e}deepClone(e){const t=typeof e;if("number"===t||"string"===t||"boolean"===t)return e;if(null!==e&&"object"===t){if("function"==typeof e.clone)return e.clone();if(e instanceof Date)return new Date(e.getTime());if(void 0!==e[Symbol.iterator]){const t=[];for(const n of e)t.push(this.deepClone(n));return e instanceof Array?t:new e.constructor(t)}{const t={};for(const n in e)e.hasOwnProperty(n)&&(t[n]=this.deepClone(e[n]));return t}}}}class H extends B{root=null;getRoot(){return this.root}isEmpty(){return!this.root}add(e){const t={value:e,left:null,right:null};let n;if(this.isEmpty())this.root=t;else for(n=this.root;;)if(en.value))break;if(null===n.right){n.right=t;break}n=n.right}}get(){const e=[];let t=this.root;for(;t;)if(t.left){let n=t.left;for(;n.right&&n.right!=t;)n=n.right;n.right==t?(n.right=null,e.push(t.value),t=t.right):(n.right=t,t=t.left)}else e.push(t.value),t=t.right;return e}contains(e){let t=!1,n=this.root;for(;n;){if(n.value===e){t=!0;break}e>n.value?n=n.right:e0&&void 0!==arguments[0]?arguments[0]:this.root;for(;t;)t.left?t=t.left:(e=t.value,t=null);return e}max(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.root;for(;t;)t.right?t=t.right:(e=t.value,t=null);return e}remove(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.root,n=null,s="left";for(;t;)if(et.value)n=t,t=t.right,s="right";else{if(t.left||t.right)if(t.left)if(t.right){const e=this.min(t.right);this.remove(e,t.right),t.value=e}else n?n[s]=t.left:this.root=t.left;else n?n[s]=t.right:this.root=t.right;else n?n[s]=null:this.root=null;t=null}}static build(e){if(e&&0!==e.length){if(1===e.length){const t=new H;return t.add(e[0]),t}{const t=e.length>>1,n=new H;n.add(e[t]);const s=n.getRoot();if(s){if(t+10){const n=H.build(e.slice(0,t-1));s.left=n?n.getRoot():null}}return n}}return null}}class j{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 j.langSet.has(e)}forEach(e){j.langSet.forEach(e)}get size(){return j.langSet.size}}class G{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"}!function(e){e[e.NOT_ALLOWED=0]="NOT_ALLOWED",e[e.REQUIRE_CONSENT=1]="REQUIRE_CONSENT",e[e.REQUIRE_LI=2]="REQUIRE_LI"}(T||(T={}));class W extends B{static hashSeparator="-";purposeId_;restrictionType;constructor(e,t){super(),void 0!==e&&(this.purposeId=e),void 0!==t&&(this.restrictionType=t)}static unHash(e){const t=e.split(this.hashSeparator),n=new W;if(2!==t.length)throw new M("hash",e);return n.purposeId=parseInt(t[0],10),n.restrictionType=parseInt(t[1],10),n}get hash(){if(!this.isValid())throw new Error("cannot hash invalid PurposeRestriction");return`${this.purposeId}${W.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===T.NOT_ALLOWED||this.restrictionType===T.REQUIRE_CONSENT||this.restrictionType===T.REQUIRE_LI)}isSameAs(e){return this.purposeId===e.purposeId&&this.restrictionType===e.restrictionType}}class z extends B{bitLength=0;map=new Map;gvl_;has(e){return this.map.has(e)}isOkToHave(e,t,n){let s=!0;if(this.gvl?.vendors){const r=this.gvl.vendors[n];if(r)if(e===T.NOT_ALLOWED)s=r.legIntPurposes.includes(t)||r.purposes.includes(t);else if(r.flexiblePurposes.length)switch(e){case T.REQUIRE_CONSENT:s=r.flexiblePurposes.includes(t)&&r.legIntPurposes.includes(t);break;case T.REQUIRE_LI:s=r.flexiblePurposes.includes(t)&&r.purposes.includes(t)}else s=!1;else s=!1}return s}add(e,t){if(this.isOkToHave(t.restrictionType,t.purposeId,e)){const n=t.hash;this.has(n)||(this.map.set(n,new H),this.bitLength=0),this.map.get(n).add(e)}}restrictPurposeToLegalBasis(e){const t=this.gvl.vendorIds,n=e.hash,s=function(){let e;for(e of t);return e}(),r=[...Array(s).keys()].map((e=>e+1));for(let e=1;e<=s;e++)this.has(n)||(this.map.set(n,H.build(r)),this.bitLength=0),this.map.get(n).add(e)}getVendors(e){let t=[];if(e){const n=e.hash;this.has(n)&&(t=this.map.get(n).get())}else{const e=new Set;this.map.forEach((t=>{t.get().forEach((t=>{e.add(t)}))})),t=Array.from(e)}return t}getRestrictionType(e,t){let n;return this.getRestrictions(e).forEach((e=>{e.purposeId===t&&(void 0===n||n>e.restrictionType)&&(n=e.restrictionType)})),n}vendorHasRestriction(e,t){let n=!1;const s=this.getRestrictions(e);for(let e=0;e{e=Math.max(t.max(),e)})),e}getRestrictions(e){const t=[];return this.map.forEach(((n,s)=>{e?n.contains(e)&&t.push(W.unHash(s)):t.push(W.unHash(s))})),t}getPurposes(){const e=new Set;return this.map.forEach(((t,n)=>{e.add(W.unHash(n).purposeId)})),Array.from(e)}remove(e,t){const n=t.hash,s=this.map.get(n);s&&(s.remove(e),s.isEmpty()&&(this.map.delete(n),this.bitLength=0))}set gvl(e){this.gvl_||(this.gvl_=e,this.map.forEach(((e,t)=>{const n=W.unHash(t);e.get().forEach((t=>{this.isOkToHave(n.restrictionType,n.purposeId,t)||e.remove(t)}))})))}get gvl(){return this.gvl_}isEmpty(){return 0===this.map.size}get numRestrictions(){return this.map.size}}!function(e){e.COOKIE="cookie",e.WEB="web",e.APP="app"}(V||(V={})),function(e){e.CORE="core",e.VENDORS_DISCLOSED="vendorsDisclosed",e.VENDORS_ALLOWED="vendorsAllowed",e.PUBLISHER_TC="publisherTC"}(R||(R={}));class ${static ID_TO_KEY=[R.CORE,R.VENDORS_DISCLOSED,R.VENDORS_ALLOWED,R.PUBLISHER_TC];static KEY_TO_ID={[R.CORE]:0,[R.VENDORS_DISCLOSED]:1,[R.VENDORS_ALLOWED]:2,[R.PUBLISHER_TC]:3}}class q extends B{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((e=>this.unset(e))):"object"==typeof e?this.unset(Object.keys(e).map((e=>Number(e)))):(this.set_.delete(Number(e)),this.bitLength=0,e===this.maxId&&(this.maxId_=0,this.set_.forEach((e=>{this.maxId_=Math.max(this.maxId,e)}))))}isIntMap(e){let t="object"==typeof e;return t=t&&Object.keys(e).every((t=>{let n=Number.isInteger(parseInt(t,10));return n=n&&this.isValidNumber(e[t].id),n=n&&void 0!==e[t].name,n})),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((e=>this.set(e)));else if(this.isSet(e))this.set(Array.from(e));else if(this.isIntMap(e))this.set(Object.keys(e).map((e=>Number(e))));else{if(!this.isValidNumber(e))throw new M("set()",e,"must be positive integer array, positive integer, Set, or IntMap");this.set_.add(e),this.maxId_=Math.max(this.maxId,e),this.bitLength=0}}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)}}class J{static[G.cmpId]=12;static[G.cmpVersion]=12;static[G.consentLanguage]=12;static[G.consentScreen]=6;static[G.created]=36;static[G.isServiceSpecific]=1;static[G.lastUpdated]=36;static[G.policyVersion]=6;static[G.publisherCountryCode]=12;static[G.publisherLegitimateInterests]=24;static[G.publisherConsents]=24;static[G.purposeConsents]=24;static[G.purposeLegitimateInterests]=24;static[G.purposeOneTreatment]=1;static[G.specialFeatureOptins]=12;static[G.useNonStandardStacks]=1;static[G.vendorListVersion]=12;static[G.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}class Q{static encode(e){return String(Number(e))}static decode(e){return"1"===e}}class K{static encode(e,t){let n;if("string"==typeof e&&(e=parseInt(e,10)),n=e.toString(2),n.length>t||e<0)throw new k(`${e} too large to encode into ${t}`);return n.length25||s<0||s>25)throw new k(`invalid language code: ${e}`);if(t%2==1)throw new k(`numBits must be even, ${t} is not valid`);t/=2;return K.encode(n,t)+K.encode(s,t)}static decode(e,t){let n;if(t!==e.length||e.length%2)throw new N("invalid bit length for language");{const t=65,s=e.length/2,r=K.decode(e.slice(0,s),s)+t,i=K.decode(e.slice(s),s)+t;n=String.fromCharCode(r)+String.fromCharCode(i)}return n}}class ee{static encode(e){let t=K.encode(e.numRestrictions,J.numRestrictions);return e.isEmpty()||e.getRestrictions().forEach((n=>{t+=K.encode(n.purposeId,J.purposeId),t+=K.encode(n.restrictionType,J.restrictionType);const s=e.getVendors(n),r=s.length;let i=0,o=0,a="";for(let t=0;t{for(;++e<=c&&!l.has(e););return e};if(t===r-1||s[t+1]>u(n)){const e=!(n===o);a+=Q.encode(e),a+=K.encode(o,J.vendorId),e&&(a+=K.encode(n,J.vendorId)),o=0}}t+=K.encode(i,J.numEntries),t+=a})),t}static decode(e){let t=0;const n=new z,s=K.decode(e.substr(t,J.numRestrictions),J.numRestrictions);t+=J.numRestrictions;for(let r=0;r{if(i+=Q.encode(r),n=e.maxId>c&&l{const t=1===e.length;n+=Q.encode(!t),n+=K.encode(e[0],J.vendorId),t||(n+=K.encode(e[1],J.vendorId))})),n}}function ne(){return{[G.version]:K,[G.created]:Y,[G.lastUpdated]:Y,[G.cmpId]:K,[G.cmpVersion]:K,[G.consentScreen]:K,[G.consentLanguage]:Z,[G.vendorListVersion]:K,[G.policyVersion]:K,[G.isServiceSpecific]:Q,[G.useNonStandardStacks]:Q,[G.specialFeatureOptins]:X,[G.purposeConsents]:X,[G.purposeLegitimateInterests]:X,[G.purposeOneTreatment]:Q,[G.publisherCountryCode]:Z,[G.vendorConsents]:te,[G.vendorLegitimateInterests]:te,[G.publisherRestrictions]:ee,segmentType:K,[G.vendorsDisclosed]:te,[G.vendorsAllowed]:te,[G.publisherConsents]:X,[G.publisherLegitimateInterests]:X,[G.numCustomPurposes]:K,[G.publisherCustomConsents]:X,[G.publisherCustomLegitimateInterests]:X}}class se{1={[R.CORE]:[G.version,G.created,G.lastUpdated,G.cmpId,G.cmpVersion,G.consentScreen,G.consentLanguage,G.vendorListVersion,G.purposeConsents,G.vendorConsents]};2={[R.CORE]:[G.version,G.created,G.lastUpdated,G.cmpId,G.cmpVersion,G.consentScreen,G.consentLanguage,G.vendorListVersion,G.policyVersion,G.isServiceSpecific,G.useNonStandardStacks,G.specialFeatureOptins,G.purposeConsents,G.purposeLegitimateInterests,G.purposeOneTreatment,G.publisherCountryCode,G.vendorConsents,G.vendorLegitimateInterests,G.publisherRestrictions],[R.PUBLISHER_TC]:[G.publisherConsents,G.publisherLegitimateInterests,G.numCustomPurposes,G.publisherCustomConsents,G.publisherCustomLegitimateInterests],[R.VENDORS_ALLOWED]:[G.vendorsAllowed],[R.VENDORS_DISCLOSED]:[G.vendorsDisclosed]}}class re{1=[R.CORE];2=[R.CORE];constructor(e,t){if(2===e.version)if(e.isServiceSpecific)this[2].push(R.PUBLISHER_TC);else{const n=!(!t||!t.isForVendors);n&&!0!==e[G.supportOOB]||this[2].push(R.VENDORS_DISCLOSED),n&&(e[G.supportOOB]&&e[G.vendorsAllowed].size>0&&this[2].push(R.VENDORS_ALLOWED),this[2].push(R.PUBLISHER_TC))}}}class ie{static fieldSequence=new se;static encode(e,t){let n;try{n=this.fieldSequence[String(e.version)][t]}catch(n){throw new k(`Unable to encode version: ${e.version}, segment: ${t}`)}let s="";t!==R.CORE&&(s=K.encode($.KEY_TO_ID[t],J.segmentType));const r=ne();return n.forEach((n=>{const i=e[n],o=r[n];let a=J[n];void 0===a&&this.isPublisherCustom(n)&&(a=Number(e[G.numCustomPurposes]));try{s+=o.encode(i,a)}catch(e){throw new k(`Error encoding ${t}->${n}: ${e.message}`)}})),F.encode(s)}static decode(e,t,n){const s=F.decode(e);let r=0;n===R.CORE&&(t.version=K.decode(s.substr(r,J[G.version]),J[G.version])),n!==R.CORE&&(r+=J.segmentType);const i=this.fieldSequence[String(t.version)][n],o=ne();return i.forEach((e=>{const n=o[e];let i=J[e];if(void 0===i&&this.isPublisherCustom(e)&&(i=Number(t[G.numCustomPurposes])),0!==i){const o=s.substr(r,i);if(t[e]=n===te?n.decode(o,t.version):n.decode(o,i),Number.isInteger(i))r+=i;else{if(!Number.isInteger(t[e].bitLength))throw new N(e);r+=t[e].bitLength}}})),t}static isPublisherCustom(e){return 0===e.indexOf("publisherCustom")}}class oe{static processor=[e=>e,(e,t)=>{e.publisherRestrictions.gvl=t,e.purposeLegitimateInterests.unset(1);const n=new Map;return n.set("legIntPurposes",e.vendorLegitimateInterests),n.set("purposes",e.vendorConsents),n.forEach(((n,s)=>{n.forEach(((r,i)=>{if(r){const r=t.vendors[i];if(!r||r.deletedDate)n.unset(i);else if(0===r[s].length)if("legIntPurposes"===s&&0===r.purposes.length&&0===r.legIntPurposes.length&&r.specialPurposes.length>0);else if(e.isServiceSpecific)if(0===r.flexiblePurposes.length)n.unset(i);else{const t=e.publisherRestrictions.getRestrictions(i);let r=!1;for(let e=0,n=t.length;e0&&t?.version<=this.processor.length?e.version=t.version:e.version=this.processor.length;const s=e.version-1;if(!this.processor[s])throw new k(`Invalid version: ${e.version}`);return this.processor[s](e,n)}}class ae{static absCall(e,t,n,s){return new Promise(((r,i)=>{const o=new XMLHttpRequest;o.withCredentials=n,o.addEventListener("load",(()=>{if(o.readyState==XMLHttpRequest.DONE)if(o.status>=200&&o.status<300){let e=o.response;if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}r(e)}else i(new Error(`HTTP Status: ${o.status} response type: ${o.responseType}`))})),o.addEventListener("error",(()=>{i(new Error("error"))})),o.addEventListener("abort",(()=>{i(new Error("aborted"))})),null===t?o.open("GET",e,!0):o.open("POST",e,!0),o.responseType="json",o.timeout=s,o.ontimeout=()=>{i(new Error("Timeout "+s+"ms "+e))},o.send(t)}))}static post(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return this.absCall(e,JSON.stringify(t),n,s)}static fetch(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return this.absCall(e,null,t,n)}}class ce extends B{static LANGUAGE_CACHE=new Map;static CACHE=new Map;static LATEST_CACHE_KEY=0;static DEFAULT_LANGUAGE="EN";static consentLanguages=new j;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=ce.baseUrl;if(this.lang_=ce.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){const n=e;ce.CACHE.has(n)?(this.populate(ce.CACHE.get(n)),this.readyPromise=Promise.resolve()):(t+=ce.versionedFilename.replace("[VERSION]",String(n)),this.readyPromise=this.fetchJson(t))}else ce.CACHE.has(ce.LATEST_CACHE_KEY)?(this.populate(ce.CACHE.get(ce.LATEST_CACHE_KEY)),this.readyPromise=Promise.resolve()):(this.isLatest=!0,this.readyPromise=this.fetchJson(t+ce.latestFilename))}}static emptyLanguageCache(e){let t=!1;return void 0===e&&ce.LANGUAGE_CACHE.size>0?(ce.LANGUAGE_CACHE=new Map,t=!0):"string"==typeof e&&this.consentLanguages.has(e.toUpperCase())&&(ce.LANGUAGE_CACHE.delete(e.toUpperCase()),t=!0),t}static emptyCache(e){let t=!1;return Number.isInteger(e)&&e>=0?(ce.CACHE.delete(e),t=!0):void 0===e&&(ce.CACHE=new Map,t=!0),t}cacheLanguage(){ce.LANGUAGE_CACHE.has(this.lang_)||ce.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 ae.fetch(e))}catch(e){throw new U(e.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){const t=e.toUpperCase();if(!ce.consentLanguages.has(t))throw new U(`unsupported language ${e}`);if(t!==this.lang_)if(this.lang_=t,ce.LANGUAGE_CACHE.has(t)){const e=ce.LANGUAGE_CACHE.get(t);for(const t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}else{const t=ce.baseUrl+ce.languageFilename.replace("[LANG]",e);try{await this.fetchJson(t),this.cacheLanguage()}catch(e){throw new U("unable to load language: "+e.message)}}}get language(){return this.lang_}isVendorList(e){return void 0!==e&&void 0!==e.vendors}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,"string"==typeof this.lastUpdated&&(this.lastUpdated=new Date(this.lastUpdated)),this.vendors_=e.vendors,this.fullVendorList=e.vendors,this.mapVendors(),this.isReady_=!0,this.isLatest&&ce.CACHE.set(ce.LATEST_CACHE_KEY,this.getJson()),ce.CACHE.has(this.vendorListVersion)||ce.CACHE.set(this.vendorListVersion,this.getJson())),this.cacheLanguage()}mapVendors(e){this.byPurposeVendorMap={},this.bySpecialPurposeVendorMap={},this.byFeatureVendorMap={},this.bySpecialFeatureVendorMap={},Object.keys(this.purposes).forEach((e=>{this.byPurposeVendorMap[e]={legInt:new Set,consent:new Set,flexible:new Set}})),Object.keys(this.specialPurposes).forEach((e=>{this.bySpecialPurposeVendorMap[e]=new Set})),Object.keys(this.features).forEach((e=>{this.byFeatureVendorMap[e]=new Set})),Object.keys(this.specialFeatures).forEach((e=>{this.bySpecialFeatureVendorMap[e]=new Set})),Array.isArray(e)||(e=Object.keys(this.fullVendorList).map((e=>+e))),this.vendorIds=new Set(e),this.vendors_=e.reduce(((e,t)=>{const n=this.vendors_[String(t)];return n&&void 0===n.deletedDate&&(n.purposes.forEach((e=>{this.byPurposeVendorMap[String(e)].consent.add(t)})),n.specialPurposes.forEach((e=>{this.bySpecialPurposeVendorMap[String(e)].add(t)})),n.legIntPurposes.forEach((e=>{this.byPurposeVendorMap[String(e)].legInt.add(t)})),n.flexiblePurposes&&n.flexiblePurposes.forEach((e=>{this.byPurposeVendorMap[String(e)].flexible.add(t)})),n.features.forEach((e=>{this.byFeatureVendorMap[String(e)].add(t)})),n.specialFeatures.forEach((e=>{this.bySpecialFeatureVendorMap[String(e)].add(t)})),e[t]=n),e}),{})}getFilteredVendors(e,t,n,s){const r=e.charAt(0).toUpperCase()+e.slice(1);let i;const o={};return i="purpose"===e&&n?this["by"+r+"VendorMap"][String(t)][n]:this["by"+(s?"Special":"")+r+"VendorMap"][String(t)],i.forEach((e=>{o[String(e)]=this.vendors[String(e)]})),o}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(){const e=new ce(this.getJson());return this.lang_!==ce.DEFAULT_LANGUAGE&&e.changeLanguage(this.lang_),e}static isInstanceOf(e){return"object"==typeof e&&"function"==typeof e.narrowVendorsTo}}class le extends B{static consentLanguages=ce.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 q;purposeConsents=new q;purposeLegitimateInterests=new q;publisherConsents=new q;publisherLegitimateInterests=new q;publisherCustomConsents=new q;publisherCustomLegitimateInterests=new q;customPurposes;vendorConsents=new q;vendorLegitimateInterests=new q;vendorsDisclosed=new q;vendorsAllowed=new q;publisherRestrictions=new z;constructor(e){super(),e&&(this.gvl=e),this.updated()}set gvl(e){ce.isInstanceOf(e)||(e=new ce(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))throw new M("cmpId",e);this.cmpId_=e}get cmpId(){return this.cmpId_}set cmpVersion(e){if(e=Number(e),!(Number.isInteger(e)&&e>-1))throw new M("cmpVersion",e);this.cmpVersion_=e}get cmpVersion(){return this.cmpVersion_}set consentScreen(e){if(e=Number(e),!(Number.isInteger(e)&&e>-1))throw new M("consentScreen",e);this.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))throw new M("publisherCountryCode",e);this.publisherCountryCode_=e.toUpperCase()}get publisherCountryCode(){return this.publisherCountryCode_}set vendorListVersion(e){if((e=Number(e)>>0)<0)throw new M("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 M("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("object"==typeof this.customPurposes){const t=Object.keys(this.customPurposes).sort(((e,t)=>Number(e)-Number(t)));e=parseInt(t.pop(),10)}return e}set numCustomPurposes(e){if(this.numCustomPurposes_=parseInt(e,10),this.numCustomPurposes_<0)throw new M("numCustomPurposes",e)}updated(){const e=new Date,t=new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()));this.created=t,this.lastUpdated=t}}class ue{static encode(e,t){let n,s="";return e=oe.process(e,t),n=Array.isArray(t?.segments)?t.segments:new re(e,t)[""+e.version],n.forEach(((t,r)=>{let i="";rt&&(t=s)}return t/100}function je(e,t){if(void 0===t&&(t={}),!e)return null;var n=0,s=1,r=He(t);return 1===r||(Object.values(t).length&&r<1&&(n=r,s=1-r),Object.keys(e).sort().forEach((function(r){var i=e[r];t[r]={min:Math.trunc(100*n),max:Math.trunc(100*(n+i*s))},n+=i*s}))),t}function Ge(){return t(this,void 0,void 0,(function(){var e,t,s,r,i,o,a,c,l,d,p;return n(this,(function(n){switch(n.label){case 0:return e="latest",t="BT_BUNDLE_VERSION",s="BT_DIGEST_VERSION",[4,x()];case 1:return r=n.sent(),i=r.siteInfo,o=r.bundleData,!Pe[i.websiteID]&&(null==o?void 0:o.bundles)&&(Pe[i.websiteID]=o),a=function(e,t,n){if(void 0===n&&(n="latest"),!e)return null;if(!t||"object"!=typeof t||Object.keys(t).length<=0)return null;var s={},r=t[e],i=t[0],o=t.global;if((null==r?void 0:r.bundles)&&(s=je(r.bundles)),(null==i?void 0:i.bundles)&&(s=je(i.bundles,s)),(null==o?void 0:o.bundles)&&(s=je(o.bundles,s)),Object.keys(s).length<=0)return null;var a=He(s);return a<1&&(s[n]={min:Math.trunc(100*a),max:100}),s}(i.websiteID,Pe,e),window.__bt_tag_d&&(window.__bt_tag_d.probabilities=a),!a||Object.keys(a).length<=0?[2,void 0]:(c=Pe[i.websiteID]||Pe[0]||Pe.global)?(l=c.digest,u.localStorage.getItem(s)!=String(l)&&(u.localStorage.setItem(s,String(l)),u.localStorage.removeItem(t)),(d=u.localStorage.getItem(t))||(p=v(100),d=function(e,t){if("number"!=typeof e||e<0||e>100)return null;if(!t||"object"!=typeof t)return null;for(var n=Object.keys(t),s=0;se)return r}return null}(p,a)||e,u.localStorage.setItem(t,d)),[2,d===e?void 0:d]):[2]}}))}))}Pe={};var We="BT_AM_SOFTWALL_RENDERED",ze="BT_AM_SOFTWALL_RECOVERED",$e=new Proxy(new URLSearchParams(window.location.search),{get:function(e,t){return e.get(t)}});function qe(){return t(this,void 0,void 0,(function(){var e;return n(this,(function(t){return(e=Boolean(localStorage.getItem(We)))?[2,e]:[2,Je().then((function(){return Boolean(localStorage.getItem(We))}))]}))}))}function Je(){return t(this,void 0,void 0,(function(){var e;return n(this,(function(t){return $e.ignore_cache?[2]:(e=$e.bt_env||"prod",[2,fetch("https://"+I+"/mw/state?bt_env="+e).then((function(e){return e.json()})).then((function(e){var t=e||{},n=t.renderDate,s=t.recoveryType;window.__bt_intrnl.recoveryUserAttr=window.__bt_intrnl.recoveryUserAttr||{mwRendered:!1,recoveryType:void 0},n&&(sessionStorage.setItem(We,"true"),localStorage.setItem(We,new Date(n).toUTCString()),window.__bt_intrnl.recoveryUserAttr.mwRendered=!0),s&&(localStorage.setItem(ze,s),window.__bt_intrnl.recoveryUserAttr.recoveryType=s)})).catch((function(){return null}))])}))}))}var Qe=x().then((function(e){var t,n=e.siteInfo.websiteID,s={"org":{"enabled":false, "logo":"", "name":"", "view":"", "single_click_enabled":false, "page_views_to_render":"0", "premium_bypass_mode_enabled":false, "hard_message_wall_mode_enabled":false, "allow_render_to_aa_users":false, "landing_text_en":"", "cta_button_color":"", "font_type":""}, "websites":{}, "script":"https://btmessage.com/script/wall.js?o=5176273905647616"},r=function(e,t){var n;return null===(n=e.websites)||void 0===n?void 0:n[t]}(s,n);t=function(e,t){var n=e.org;return null!=t?t:n}(s,null!=r?r:e.messageWall);var i=t.enabled,o=t.enabled&&t.allow_render_to_aa_users,a=s.script;return window.__bt_tag_am={settings:t},{canLoadAM:i,canLoadMWToAA:o,amScript:a}})).catch((function(e){return{canLoadAM:!1,canLoadMWToAA:!1,amScript:""}}));function Ke(){return t(this,void 0,void 0,(function(){return n(this,(function(e){return[2,new Promise((function(e){var t=Fe("timing.ABDetection"),n="BT_AA_DETECTION",s=JSON.parse(u.localStorage.getItem(n));s&&s.ab&&s.acceptable&&(t({cached:!0}),e(s)),Promise.all([a(),c()]).then((function(r){var i={ab:r[0],acceptable:r[1]};u.localStorage.setItem(n,JSON.stringify(i)),window.__bt_intrnl.aaDetectionResults=i,!(s&&s.ab&&s.acceptable)||i.ab&&i.acceptable||(u.__bt_intrnl.stopFlag=!0),t({cached:!1}),e(i)}))}))]}))}))}function Ye(e){if(e){var t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src=e,t.crossOrigin="anonymous",(window.document.head||window.document.body||window.document.documentElement).appendChild(t)}}function Xe(e){var t=e.eventName,n=e.payload||{bubbles:!1,cancelable:!1,detail:void 0};if(window.CustomEvent)try{var s=new window.CustomEvent(t,n);return void window.dispatchEvent(s)}catch(e){}var r=document.createEvent("CustomEvent");r.initCustomEvent(t,n.bubbles,n.cancelable,n.detail),window.dispatchEvent(r)}u.__bt_intrnl=u.__bt_intrnl||{traceID:O.traceID,pvSent:!!h("BT_pvSent"),stopFlag:!1,timings:Me,aaDetectionResults:null,recoveryUserAttr:null},window.__bt_intrnl=u.__bt_intrnl;try{!function(){t(this,void 0,void 0,(function(){var e,s,r,i,o,a,c,l,d,h,v,f,b,I;return n(this,(function(S){switch(S.label){case 0:return Ue&&(De("timing.navigationStart",{timestamp:ke},{severity:1}),De("timing.tagScriptLoaded",{eventDurationMS:Math.round(Ne.duration),timestamp:xe},{severity:1})),[4,Promise.all([Ke(),qe(),x()])];case 1:return e=S.sent(),s=e[0],r=e[1],i=e[2],o=i.siteInfo,a=i.checksum,Xe({eventName:"BTAADetection",payload:{detail:s}}),window.__bt_already_invoked||!o.websiteID?[2]:(window.__bt_already_invoked=!0,Be(),[4,Qe]);case 2:return c=S.sent(),l=c.canLoadAM,d=c.canLoadMWToAA,h=c.amScript,f=r&&l,s.ab?window.disableUponit?[3,5]:(function(e){(u.location.href.indexOf("bt_debug=true")>=0||"true"==u.localStorage.getItem("bt_debug"))&&(e.contentEnabled="true"==u.localStorage.getItem("forceContent")||e.contentEnabled,e.mobileContentEnabled="true"==u.localStorage.getItem("forceMobileContent")||e.mobileContentEnabled)}(o),o.websiteID&&o.contentEnabled&&(!(I="function"==typeof window.bt_isMobileCustom?window.bt_isMobileCustom():/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(navigator.userAgent||navigator.vendor||window.opera)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test((navigator.userAgent||navigator.vendor||window.opera).substr(0,4)))||I&&o.mobileContentEnabled)?s.acceptable?[4,Ge()]:[3,4]:[3,5]):[3,5];case 3:return b=S.sent(),v=!d,d&&(f=!0,window.__bt_recovery=function(){Ye(m(y,o.websiteID,_,b))},window.__bt_am_already_invoked=!1),[3,5];case 4:l&&(f=!0),S.label=5;case 5:if(u.__bt_intrnl.pvSent||(u.__bt_intrnl.pvSent=!0,g("BT_pvSent","true"),function(e,s,r,i){t(this,void 0,void 0,(function(){var t,o,a,c;return n(this,(function(n){switch(n.label){case 0:return(t={})[Ee]=O.traceID,t[be]=e.siteInfo.websiteID,t[we]=w,t[_e]=E,e.checksum&&(t[Oe]=e.checksum),i&&(t[Se]=i),t[ye]=s,t[Le]=window.innerWidth+"x"+window.innerHeight,t.pageURL=p.href,t[Ae]=O.sessionID,s&&(t[Ce]=0,t[Ie]=r),[4,Promise.all([pe(),ge()])];case 1:return o=n.sent(),a=o[0],c=o[1],null!==a&&(t[Te]=a),null!==c&&(t[Ve]=c),[4,(l=Re("/pv",t),new Promise((function(e,t){var n=new window.XMLHttpRequest;n.open("GET",l,!0),n.onerror=function(){console.log("Error in get request for "+l),t()},n.onload=function(){e(n.responseText)},n.send()})))];case 2:return n.sent(),[2]}var l}))}))}({siteInfo:o,checksum:a},s.ab,s.acceptable,b)),v)Ye(m(y,o.websiteID,_,b));else try{Xe({eventName:"AcceptableAdsInit",payload:{detail:!1}}),Xe({eventName:"uponitInit",payload:{detail:!1}})}catch(e){}return f&&Ye(h),[2]}}))}))}()}catch(e){}}();