Файловый менеджер - Редактировать - /home/avadvi5/public_html/wp-content/plugins/complianz-gdpr-premium/pro/tcf/build/index.js
Ðазад
(()=>{"use strict";var e,t,s,n,r,o,i,c;!function(e){e.PING="ping",e.GET_TC_DATA="getTCData",e.GET_IN_APP_TC_DATA="getInAppTCData",e.GET_VENDOR_LIST="getVendorList",e.ADD_EVENT_LISTENER="addEventListener",e.REMOVE_EVENT_LISTENER="removeEventListener"}(e||(e={})),function(e){e.STUB="stub",e.LOADING="loading",e.LOADED="loaded",e.ERROR="error"}(t||(t={})),function(e){e.VISIBLE="visible",e.HIDDEN="hidden",e.DISABLED="disabled"}(s||(s={})),function(e){e.TC_LOADED="tcloaded",e.CMP_UI_SHOWN="cmpuishown",e.USER_ACTION_COMPLETE="useractioncomplete"}(n||(n={}));class a{listenerId;callback;next;param;success=!0;constructor(e,t,s,n){Object.assign(this,{callback:e,listenerId:s,param:t,next:n});try{this.respond()}catch(e){this.invokeCallback(null)}}invokeCallback(e){const t=null!==e;"function"==typeof this.next?this.callback(this.next,e,t):this.callback(e,t)}}class l extends a{respond(){this.throwIfParamInvalid(),this.invokeCallback(new m(this.param,this.listenerId))}throwIfParamInvalid(){if(!(void 0===this.param||Array.isArray(this.param)&&this.param.every(Number.isInteger)))throw new Error("Invalid Parameter")}}class p{eventQueue=new Map;queueNumber=0;add(e){return this.eventQueue.set(this.queueNumber,e),this.queueNumber++}remove(e){return this.eventQueue.delete(e)}exec(){this.eventQueue.forEach((e,t)=>{new l(e.callback,e.param,t,e.next)})}clear(){this.queueNumber=0,this.eventQueue.clear()}get size(){return this.eventQueue.size}}class d{static apiVersion="2";static tcfPolicyVersion;static eventQueue=new p;static cmpStatus=t.LOADING;static disabled=!1;static displayStatus=s.HIDDEN;static cmpId;static cmpVersion;static eventStatus;static gdprApplies;static tcModel;static tcString;static reset(){delete this.cmpId,delete this.cmpVersion,delete this.eventStatus,delete this.gdprApplies,delete this.tcModel,delete this.tcString,delete this.tcfPolicyVersion,this.cmpStatus=t.LOADING,this.disabled=!1,this.displayStatus=s.HIDDEN,this.eventQueue.clear()}}class u{cmpId=d.cmpId;cmpVersion=d.cmpVersion;gdprApplies=d.gdprApplies;tcfPolicyVersion=d.tcfPolicyVersion}class h extends u{cmpStatus=t.ERROR}class m extends u{tcString;listenerId;eventStatus;cmpStatus;isServiceSpecific;useNonStandardTexts;publisherCC;purposeOneTreatment;outOfBand;purpose;vendor;specialFeatureOptins;publisher;constructor(e,t){if(super(),this.eventStatus=d.eventStatus,this.cmpStatus=d.cmpStatus,this.listenerId=t,d.gdprApplies){const t=d.tcModel;this.tcString=d.tcString,this.isServiceSpecific=t.isServiceSpecific,this.useNonStandardTexts=t.useNonStandardTexts,this.purposeOneTreatment=t.purposeOneTreatment,this.publisherCC=t.publisherCountryCode,this.outOfBand={allowedVendors:this.createVectorField(t.vendorsAllowed,e),disclosedVendors:this.createVectorField(t.vendorsDisclosed,e)},this.purpose={consents:this.createVectorField(t.purposeConsents),legitimateInterests:this.createVectorField(t.purposeLegitimateInterests)},this.vendor={consents:this.createVectorField(t.vendorConsents,e),legitimateInterests:this.createVectorField(t.vendorLegitimateInterests,e),disclosedVendors:this.createVectorField(t.vendorsDisclosed,e)},this.specialFeatureOptins=this.createVectorField(t.specialFeatureOptins),this.publisher={consents:this.createVectorField(t.publisherConsents),legitimateInterests:this.createVectorField(t.publisherLegitimateInterests),customPurpose:{consents:this.createVectorField(t.publisherCustomConsents),legitimateInterests:this.createVectorField(t.publisherCustomLegitimateInterests)},restrictions:this.createRestrictions(t.publisherRestrictions)}}}createRestrictions(e){const t={};if(e.numRestrictions>0){const s=e.getMaxVendorId();for(let n=1;n<=s;n++){const s=n.toString();e.getRestrictions(n).forEach(e=>{const n=e.purposeId.toString();t[n]||(t[n]={}),t[n][s]=e.restrictionType})}}return t}createVectorField(e,t){return t?t.reduce((t,s)=>(t[String(s)]=e.has(Number(s)),t),{}):[...e].reduce((e,t)=>(e[t[0].toString(10)]=t[1],e),{})}}class g extends m{constructor(e){super(e),delete this.outOfBand}createVectorField(e){return[...e].reduce((e,t)=>e+(t[1]?"1":"0"),"")}createRestrictions(e){const t={};if(e.numRestrictions>0){const s=e.getMaxVendorId();e.getRestrictions().forEach(e=>{t[e.purposeId.toString()]="_".repeat(s)});for(let n=0;n<s;n++){const s=n+1;e.getRestrictions(s).forEach(e=>{const s=e.restrictionType.toString(),r=e.purposeId.toString(),o=t[r].substr(0,n),i=t[r].substr(n+1);t[r]=o+s+i})}}return t}}class f extends u{cmpLoaded=!0;cmpStatus=d.cmpStatus;displayStatus=d.displayStatus;apiVersion=String(d.apiVersion);gvlVersion;constructor(){super(),d.tcModel&&d.tcModel.vendorListVersion&&(this.gvlVersion=+d.tcModel.vendorListVersion)}}class v extends a{respond(){this.invokeCallback(new f)}}class _ extends l{respond(){this.throwIfParamInvalid(),this.invokeCallback(new g(this.param))}}class y extends Error{constructor(e){super(e),this.name="DecodingError"}}class S extends Error{constructor(e){super(e),this.name="EncodingError"}}class I extends Error{constructor(e){super(e),this.name="GVLError"}}class C extends Error{constructor(e,t,s=""){super(`invalid value ${t} passed for ${e} ${s}`),this.name="TCModelError"}}class E{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 S("Invalid bitField");const t=e.length%this.LCM;e+=t?"0".repeat(this.LCM-t):"";let s="";for(let t=0;t<e.length;t+=this.BASIS)s+=this.DICT[parseInt(e.substr(t,this.BASIS),2)];return s}static decode(e){if(!/^[A-Za-z0-9\-_]+$/.test(e))throw new y("Invalidly encoded Base64URL string");let t="";for(let s=0;s<e.length;s++){const n=this.REVERSE_DICT.get(e[s]).toString(2);t+="0".repeat(this.BASIS-n.length)+n}return t}}class b{static langSet=new Set(["AR","BG","BS","CA","CS","CY","DA","DE","EL","EN","ES","ET","EU","FI","FR","GL","HE","HI","HR","HU","ID","IS","IT","JA","KA","KO","LT","LV","MK","MS","MT","NL","NO","PL","PT-BR","PT-PT","RO","RU","SK","SL","SQ","SR-LATN","SR-CYRL","SV","SW","TH","TL","TR","UK","VI","ZH","ZH-HANT"]);has(e){return b.langSet.has(e)}parseLanguage(e){const t=(e=e.toUpperCase()).split("-")[0];if(e.length>=2&&2==t.length){if(b.langSet.has(e))return e;if(b.langSet.has(t))return t;const s=t+"-"+t;if(b.langSet.has(s))return s;for(const s of b.langSet)if(-1!==s.indexOf(e)||-1!==s.indexOf(t))return s}throw new Error(`unsupported language ${e}`)}forEach(e){b.langSet.forEach(e)}get size(){return b.langSet.size}}class L{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 useNonStandardTexts="useNonStandardTexts";static vendorConsents="vendorConsents";static vendorLegitimateInterests="vendorLegitimateInterests";static vendorListVersion="vendorListVersion";static vendorsAllowed="vendorsAllowed";static vendorsDisclosed="vendorsDisclosed";static version="version"}class A{clone(){const e=new this.constructor;return Object.keys(this).forEach(t=>{const s=this.deepClone(this[t]);void 0!==s&&(e[t]=s)}),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 s of e)t.push(this.deepClone(s));return e instanceof Array?t:new e.constructor(t)}{const t={};for(const s in e)e.hasOwnProperty(s)&&(t[s]=this.deepClone(e[s]));return t}}}}!function(e){e[e.NOT_ALLOWED=0]="NOT_ALLOWED",e[e.REQUIRE_CONSENT=1]="REQUIRE_CONSENT",e[e.REQUIRE_LI=2]="REQUIRE_LI"}(r||(r={}));class w extends A{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),s=new w;if(2!==t.length)throw new C("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}${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===r.NOT_ALLOWED||this.restrictionType===r.REQUIRE_CONSENT||this.restrictionType===r.REQUIRE_LI)}isSameAs(e){return this.purposeId===e.purposeId&&this.restrictionType===e.restrictionType}}class z extends A{bitLength=0;map=new Map;gvl_;has(e){return this.map.has(e)}isOkToHave(e,t,s){let n=!0;if(this.gvl?.vendors){const o=this.gvl.vendors[s];if(o)if(e===r.NOT_ALLOWED)n=o.legIntPurposes.includes(t)||o.purposes.includes(t);else if(o.flexiblePurposes.length)switch(e){case r.REQUIRE_CONSENT:n=o.flexiblePurposes.includes(t)&&o.legIntPurposes.includes(t);break;case r.REQUIRE_LI:n=o.flexiblePurposes.includes(t)&&o.purposes.includes(t)}else n=!1;else n=!1}return n}add(e,t){if(this.isOkToHave(t.restrictionType,t.purposeId,e)){const s=t.hash;this.has(s)||(this.map.set(s,new Set),this.bitLength=0),this.map.get(s).add(e)}}restrictPurposeToLegalBasis(e){const t=Array.from(this.gvl.vendorIds),s=e.hash,n=t[t.length-1],r=[...Array(n).keys()].map(e=>e+1);if(this.has(s))for(let e=1;e<=n;e++)this.map.get(s).add(e);else this.map.set(s,new Set(r)),this.bitLength=0}getVendors(e){let t=[];if(e){const s=e.hash;this.has(s)&&(t=Array.from(this.map.get(s)))}else{const e=new Set;this.map.forEach(t=>{t.forEach(t=>{e.add(t)})}),t=Array.from(e)}return t.sort((e,t)=>e-t)}getRestrictionType(e,t){let s;return this.getRestrictions(e).forEach(e=>{e.purposeId===t&&(void 0===s||s>e.restrictionType)&&(s=e.restrictionType)}),s}vendorHasRestriction(e,t){let s=!1;const n=this.getRestrictions(e);for(let e=0;e<n.length&&!s;e++)s=t.isSameAs(n[e]);return s}getMaxVendorId(){let e=0;return this.map.forEach(t=>{e=Math.max(Array.from(t)[t.size-1],e)}),e}getRestrictions(e){const t=[];return this.map.forEach((s,n)=>{e?s.has(e)&&t.push(w.unHash(n)):t.push(w.unHash(n))}),t}getPurposes(){const e=new Set;return this.map.forEach((t,s)=>{e.add(w.unHash(s).purposeId)}),Array.from(e)}remove(e,t){const s=t.hash,n=this.map.get(s);n&&(n.delete(e),0==n.size&&(this.map.delete(s),this.bitLength=0))}set gvl(e){this.gvl_||(this.gvl_=e,this.map.forEach((e,t)=>{const s=w.unHash(t);Array.from(e).forEach(t=>{this.isOkToHave(s.restrictionType,s.purposeId,t)||e.delete(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"}(o||(o={})),function(e){e.CORE="core",e.VENDORS_DISCLOSED="vendorsDisclosed",e.VENDORS_ALLOWED="vendorsAllowed",e.PUBLISHER_TC="publisherTC"}(i||(i={}));class T{static ID_TO_KEY=[i.CORE,i.VENDORS_DISCLOSED,i.VENDORS_ALLOWED,i.PUBLISHER_TC];static KEY_TO_ID={[i.CORE]:0,[i.VENDORS_DISCLOSED]:1,[i.VENDORS_ALLOWED]:2,[i.PUBLISHER_TC]:3}}class V extends A{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 s=Number.isInteger(parseInt(t,10));return s=s&&this.isValidNumber(e[t].id),s=s&&void 0!==e[t].name,s}),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 C("set()",e,"must be positive integer array, positive integer, Set<number>, or IntMap");this.set_.add(e),this.maxId_=Math.max(this.maxId,e),this.bitLength=0}}empty(){this.set_=new Set,this.maxId_=0}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 O{static[L.cmpId]=12;static[L.cmpVersion]=12;static[L.consentLanguage]=12;static[L.consentScreen]=6;static[L.created]=36;static[L.isServiceSpecific]=1;static[L.lastUpdated]=36;static[L.policyVersion]=6;static[L.publisherCountryCode]=12;static[L.publisherLegitimateInterests]=24;static[L.publisherConsents]=24;static[L.purposeConsents]=24;static[L.purposeLegitimateInterests]=24;static[L.purposeOneTreatment]=1;static[L.specialFeatureOptins]=12;static[L.useNonStandardTexts]=1;static[L.vendorListVersion]=12;static[L.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 P{static encode(e,t){let s;if("string"==typeof e&&(e=parseInt(e,10)),s=e.toString(2),s.length>t||e<0)throw new S(`${e} too large to encode into ${t}`);return s.length<t&&(s="0".repeat(t-s.length)+s),s}static decode(e,t){if(t!==e.length)throw new y("invalid bit length");return parseInt(e,2)}}class k{static encode(e,t){return P.encode(Math.round(e.getTime()/100),t)}static decode(e,t){if(t!==e.length)throw new y("invalid bit length");const s=new Date;return s.setTime(100*P.decode(e,t)),s}}class R{static encode(e){return String(Number(e))}static decode(e){return"1"===e}}class D{static encode(e,t){let s="";for(let n=1;n<=t;n++)s+=R.encode(e.has(n));return s}static decode(e,t){if(e.length!==t)throw new y("bitfield encoding length mismatch");const s=new V;for(let n=1;n<=t;n++)R.decode(e[n-1])&&s.set(n);return s.bitLength=e.length,s}}class N{static encode(e,t){const s=(e=e.toUpperCase()).charCodeAt(0)-65,n=e.charCodeAt(1)-65;if(s<0||s>25||n<0||n>25)throw new S(`invalid language code: ${e}`);if(t%2==1)throw new S(`numBits must be even, ${t} is not valid`);return t/=2,P.encode(s,t)+P.encode(n,t)}static decode(e,t){let s;if(t!==e.length||e.length%2)throw new y("invalid bit length for language");{const t=65,n=e.length/2,r=P.decode(e.slice(0,n),n)+t,o=P.decode(e.slice(n),n)+t;s=String.fromCharCode(r)+String.fromCharCode(o)}return s}}class F{static encode(e){let t=P.encode(e.numRestrictions,O.numRestrictions);if(!e.isEmpty()){const s=(t,s)=>{for(let n=t+1;n<=s;n++)if(e.gvl.vendorIds.has(n))return n;return t};e.getRestrictions().forEach(n=>{t+=P.encode(n.purposeId,O.purposeId),t+=P.encode(n.restrictionType,O.restrictionType);const r=e.getVendors(n),o=r.length;let i=0,c=0,a="";for(let e=0;e<o;e++){const t=r[e];if(0===c&&(i++,c=t),e===o-1||r[e+1]>s(t,r[o-1])){const e=!(t===c);a+=R.encode(e),a+=P.encode(c,O.vendorId),e&&(a+=P.encode(t,O.vendorId)),c=0}}t+=P.encode(i,O.numEntries),t+=a})}return t}static decode(e){let t=0;const s=new z,n=P.decode(e.substr(t,O.numRestrictions),O.numRestrictions);t+=O.numRestrictions;for(let r=0;r<n;r++){const n=P.decode(e.substr(t,O.purposeId),O.purposeId);t+=O.purposeId;const r=P.decode(e.substr(t,O.restrictionType),O.restrictionType);t+=O.restrictionType;const o=new w(n,r),i=P.decode(e.substr(t,O.numEntries),O.numEntries);t+=O.numEntries;for(let n=0;n<i;n++){const n=R.decode(e.substr(t,O.anyBoolean));t+=O.anyBoolean;const r=P.decode(e.substr(t,O.vendorId),O.vendorId);if(t+=O.vendorId,n){const n=P.decode(e.substr(t,O.vendorId),O.vendorId);if(t+=O.vendorId,n<r)throw new y(`Invalid RangeEntry: endVendorId ${n} is less than ${r}`);for(let e=r;e<=n;e++)s.add(e,o)}else s.add(r,o)}}return s.bitLength=t,s}}!function(e){e[e.FIELD=0]="FIELD",e[e.RANGE=1]="RANGE"}(c||(c={}));class x{static encode(e){const t=[];let s,n=[],r=P.encode(e.maxId,O.maxId),o="";const i=O.maxId+O.encodingType,a=i+e.maxId,l=2*O.vendorId+O.singleOrRange+O.numEntries;let p=i+O.numEntries;return e.forEach((r,i)=>{o+=R.encode(r),s=e.maxId>l&&p<a,s&&r&&(e.has(i+1)?0===n.length&&(n.push(i),p+=O.singleOrRange,p+=O.vendorId):(n.push(i),p+=O.vendorId,t.push(n),n=[]))}),s?(r+=String(c.RANGE),r+=this.buildRangeEncoding(t)):(r+=String(c.FIELD),r+=o),r}static decode(e,t){let s,n=0;const r=P.decode(e.substr(n,O.maxId),O.maxId);n+=O.maxId;const o=P.decode(e.charAt(n),O.encodingType);if(n+=O.encodingType,o===c.RANGE){if(s=new V,1===t){if("1"===e.substr(n,1))throw new y("Unable to decode default consent=1");n++}const r=P.decode(e.substr(n,O.numEntries),O.numEntries);n+=O.numEntries;for(let t=0;t<r;t++){const t=R.decode(e.charAt(n));n+=O.singleOrRange;const r=P.decode(e.substr(n,O.vendorId),O.vendorId);if(n+=O.vendorId,t){const t=P.decode(e.substr(n,O.vendorId),O.vendorId);n+=O.vendorId;for(let e=r;e<=t;e++)s.set(e)}else s.set(r)}}else{const t=e.substr(n,r);n+=r,s=D.decode(t,r)}return s.bitLength=n,s}static buildRangeEncoding(e){const t=e.length;let s=P.encode(t,O.numEntries);return e.forEach(e=>{const t=1===e.length;s+=R.encode(!t),s+=P.encode(e[0],O.vendorId),t||(s+=P.encode(e[1],O.vendorId))}),s}}function U(){return{[L.version]:P,[L.created]:k,[L.lastUpdated]:k,[L.cmpId]:P,[L.cmpVersion]:P,[L.consentScreen]:P,[L.consentLanguage]:N,[L.vendorListVersion]:P,[L.policyVersion]:P,[L.isServiceSpecific]:R,[L.useNonStandardTexts]:R,[L.specialFeatureOptins]:D,[L.purposeConsents]:D,[L.purposeLegitimateInterests]:D,[L.purposeOneTreatment]:R,[L.publisherCountryCode]:N,[L.vendorConsents]:x,[L.vendorLegitimateInterests]:x,[L.publisherRestrictions]:F,segmentType:P,[L.vendorsDisclosed]:x,[L.vendorsAllowed]:x,[L.publisherConsents]:D,[L.publisherLegitimateInterests]:D,[L.numCustomPurposes]:P,[L.publisherCustomConsents]:D,[L.publisherCustomLegitimateInterests]:D}}class M{1={[i.CORE]:[L.version,L.created,L.lastUpdated,L.cmpId,L.cmpVersion,L.consentScreen,L.consentLanguage,L.vendorListVersion,L.purposeConsents,L.vendorConsents]};2={[i.CORE]:[L.version,L.created,L.lastUpdated,L.cmpId,L.cmpVersion,L.consentScreen,L.consentLanguage,L.vendorListVersion,L.policyVersion,L.isServiceSpecific,L.useNonStandardTexts,L.specialFeatureOptins,L.purposeConsents,L.purposeLegitimateInterests,L.purposeOneTreatment,L.publisherCountryCode,L.vendorConsents,L.vendorLegitimateInterests,L.publisherRestrictions],[i.PUBLISHER_TC]:[L.publisherConsents,L.publisherLegitimateInterests,L.numCustomPurposes,L.publisherCustomConsents,L.publisherCustomLegitimateInterests],[i.VENDORS_ALLOWED]:[L.vendorsAllowed],[i.VENDORS_DISCLOSED]:[L.vendorsDisclosed]}}class H{1=[i.CORE];2=[i.CORE];constructor(e,t){if(2===e.version)if(e.isServiceSpecific)this[2].push(i.PUBLISHER_TC),this[2].push(i.VENDORS_DISCLOSED);else{const s=!(!t||!t.isForVendors);s&&!0!==e[L.supportOOB]||this[2].push(i.VENDORS_DISCLOSED),s&&(e[L.supportOOB]&&e[L.vendorsAllowed].size>0&&this[2].push(i.VENDORS_ALLOWED),this[2].push(i.PUBLISHER_TC))}}}class q{static fieldSequence=new M;static encode(e,t){let s;try{s=this.fieldSequence[String(e.version)][t]}catch(s){throw new S(`Unable to encode version: ${e.version}, segment: ${t}`)}let n="";t!==i.CORE&&(n=P.encode(T.KEY_TO_ID[t],O.segmentType));const r=U();return s.forEach(s=>{const o=e[s],i=r[s];let c=O[s];void 0===c&&this.isPublisherCustom(s)&&(c=Number(e[L.numCustomPurposes]));try{n+=i.encode(o,c)}catch(e){throw new S(`Error encoding ${t}->${s}: ${e.message}`)}}),E.encode(n)}static decode(e,t,s){const n=E.decode(e);let r=0;s===i.CORE&&(t.version=P.decode(n.substr(r,O[L.version]),O[L.version])),s!==i.CORE&&(r+=O.segmentType);const o=this.fieldSequence[String(t.version)][s],c=U();return o.forEach(e=>{const s=c[e];let o=O[e];if(void 0===o&&this.isPublisherCustom(e)&&(o=Number(t[L.numCustomPurposes])),0!==o){const i=n.substr(r,o);if(t[e]=s===x?s.decode(i,t.version):s.decode(i,o),Number.isInteger(o))r+=o;else{if(!Number.isInteger(t[e].bitLength))throw new y(e);r+=t[e].bitLength}}}),t}static isPublisherCustom(e){return 0===e.indexOf("publisherCustom")}}class G{static processor=[e=>e,(e,t)=>{e.publisherRestrictions.gvl=t,e.purposeLegitimateInterests.unset([1,3,4,5,6]);const s=new Map;return s.set("legIntPurposes",e.vendorLegitimateInterests),s.set("purposes",e.vendorConsents),s.forEach((s,n)=>{s.forEach((o,i)=>{if(o){const o=t.vendors[i];if(!o||o.deletedDate)s.unset(i);else if(0===o[n].length)if("legIntPurposes"===n&&0===o.purposes.length&&0===o.legIntPurposes.length&&o.specialPurposes.length>0)s.set(i);else if("legIntPurposes"===n&&o.purposes.length>0&&0===o.legIntPurposes.length&&o.specialPurposes.length>0)s.set(i);else if(e.isServiceSpecific)if(0===o.flexiblePurposes.length)s.unset(i);else{const t=e.publisherRestrictions.getRestrictions(i);let o=!1;for(let e=0,s=t.length;e<s&&!o;e++)o=t[e].restrictionType===r.REQUIRE_CONSENT&&"purposes"===n||t[e].restrictionType===r.REQUIRE_LI&&"legIntPurposes"===n;o||s.unset(i)}else s.unset(i)}})}),e}];static process(e,t){const s=e.gvl;if(!s)throw new S("Unable to encode TCModel without a GVL");if(!s.isReady)throw new S("Unable to encode TCModel tcModel.gvl.readyPromise is not resolved");(e=e.clone()).consentLanguage=s.language.slice(0,2).toUpperCase(),t?.version>0&&t?.version<=this.processor.length?e.version=t.version:e.version=this.processor.length;const n=e.version-1;if(!this.processor[n])throw new S(`Invalid version: ${e.version}`);return this.processor[n](e,s)}}class B{static absCall(e,t,s,n){return new Promise((r,o)=>{const i=new XMLHttpRequest;i.withCredentials=s,i.addEventListener("load",()=>{if(i.readyState==XMLHttpRequest.DONE)if(i.status>=200&&i.status<300){let e=i.response;if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}r(e)}else o(new Error(`HTTP Status: ${i.status} response type: ${i.responseType}`))}),i.addEventListener("error",()=>{o(new Error("error"))}),i.addEventListener("abort",()=>{o(new Error("aborted"))}),null===t?i.open("GET",e,!0):i.open("POST",e,!0),i.responseType="json",i.timeout=n,i.ontimeout=()=>{o(new Error("Timeout "+n+"ms "+e))},i.send(t)})}static post(e,t,s=!1,n=0){return this.absCall(e,JSON.stringify(t),s,n)}static fetch(e,t=!1,s=0){return this.absCall(e,null,t,s)}}class j extends A{static LANGUAGE_CACHE=new Map;static CACHE=new Map;static LATEST_CACHE_KEY=0;static DEFAULT_LANGUAGE="EN";static consentLanguages=new b;static baseUrl_;static set baseUrl(e){if(/^https?:\/\/vendorlist\.consensu\.org\//.test(e))throw new I("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;dataCategories;lang_;cacheLang_;isLatest=!1;constructor(e,t){super();let s=j.baseUrl,n=t?.language;if(n)try{n=j.consentLanguages.parseLanguage(n)}catch(e){throw new I("Error during parsing the language: "+e.message)}if(this.lang_=n||j.DEFAULT_LANGUAGE,this.cacheLang_=n||j.DEFAULT_LANGUAGE,this.isVendorList(e))this.populate(e),this.readyPromise=Promise.resolve();else{if(!s)throw new I("must specify GVL.baseUrl before loading GVL json");if(e>0){const t=e;j.CACHE.has(t)?(this.populate(j.CACHE.get(t)),this.readyPromise=Promise.resolve()):(s+=j.versionedFilename.replace("[VERSION]",String(t)),this.readyPromise=this.fetchJson(s))}else j.CACHE.has(j.LATEST_CACHE_KEY)?(this.populate(j.CACHE.get(j.LATEST_CACHE_KEY)),this.readyPromise=Promise.resolve()):(this.isLatest=!0,this.readyPromise=this.fetchJson(s+j.latestFilename))}}static emptyLanguageCache(e){let t=!1;return null==e&&j.LANGUAGE_CACHE.size>0?(j.LANGUAGE_CACHE=new Map,t=!0):"string"==typeof e&&this.consentLanguages.has(e.toUpperCase())&&(j.LANGUAGE_CACHE.delete(e.toUpperCase()),t=!0),t}static emptyCache(e){let t=!1;return Number.isInteger(e)&&e>=0?(j.CACHE.delete(e),t=!0):void 0===e&&(j.CACHE=new Map,t=!0),t}cacheLanguage(){j.LANGUAGE_CACHE.has(this.cacheLang_)||j.LANGUAGE_CACHE.set(this.cacheLang_,{purposes:this.purposes,specialPurposes:this.specialPurposes,features:this.features,specialFeatures:this.specialFeatures,stacks:this.stacks,dataCategories:this.dataCategories})}async fetchJson(e){try{this.populate(await B.fetch(e))}catch(e){throw new I(e.message)}}getJson(){return{gvlSpecificationVersion:this.gvlSpecificationVersion,vendorListVersion:this.vendorListVersion,tcfPolicyVersion:this.tcfPolicyVersion,lastUpdated:this.lastUpdated,purposes:this.clonePurposes(),specialPurposes:this.cloneSpecialPurposes(),features:this.cloneFeatures(),specialFeatures:this.cloneSpecialFeatures(),stacks:this.cloneStacks(),...this.dataCategories?{dataCategories:this.cloneDataCategories()}:{},vendors:this.cloneVendors()}}cloneSpecialFeatures(){const e={};for(const t of Object.keys(this.specialFeatures))e[t]=j.cloneFeature(this.specialFeatures[t]);return e}cloneFeatures(){const e={};for(const t of Object.keys(this.features))e[t]=j.cloneFeature(this.features[t]);return e}cloneStacks(){const e={};for(const t of Object.keys(this.stacks))e[t]=j.cloneStack(this.stacks[t]);return e}cloneDataCategories(){const e={};for(const t of Object.keys(this.dataCategories))e[t]=j.cloneDataCategory(this.dataCategories[t]);return e}cloneSpecialPurposes(){const e={};for(const t of Object.keys(this.specialPurposes))e[t]=j.clonePurpose(this.specialPurposes[t]);return e}clonePurposes(){const e={};for(const t of Object.keys(this.purposes))e[t]=j.clonePurpose(this.purposes[t]);return e}static clonePurpose(e){return{id:e.id,name:e.name,description:e.description,...e.descriptionLegal?{descriptionLegal:e.descriptionLegal}:{},...e.illustrations?{illustrations:Array.from(e.illustrations)}:{}}}static cloneFeature(e){return{id:e.id,name:e.name,description:e.description,...e.descriptionLegal?{descriptionLegal:e.descriptionLegal}:{},...e.illustrations?{illustrations:Array.from(e.illustrations)}:{}}}static cloneDataCategory(e){return{id:e.id,name:e.name,description:e.description}}static cloneStack(e){return{id:e.id,name:e.name,description:e.description,purposes:Array.from(e.purposes),specialFeatures:Array.from(e.specialFeatures)}}static cloneDataRetention(e){return{..."number"==typeof e.stdRetention?{stdRetention:e.stdRetention}:{},purposes:{...e.purposes},specialPurposes:{...e.specialPurposes}}}static cloneVendorUrls(e){return e.map(e=>({langId:e.langId,privacy:e.privacy,...e.legIntClaim?{legIntClaim:e.legIntClaim}:{}}))}static cloneVendor(e){return{id:e.id,name:e.name,purposes:Array.from(e.purposes),legIntPurposes:Array.from(e.legIntPurposes),flexiblePurposes:Array.from(e.flexiblePurposes),specialPurposes:Array.from(e.specialPurposes),features:Array.from(e.features),specialFeatures:Array.from(e.specialFeatures),...e.overflow?{overflow:{httpGetLimit:e.overflow.httpGetLimit}}:{},..."number"==typeof e.cookieMaxAgeSeconds||null===e.cookieMaxAgeSeconds?{cookieMaxAgeSeconds:e.cookieMaxAgeSeconds}:{},...void 0!==e.usesCookies?{usesCookies:e.usesCookies}:{},...e.policyUrl?{policyUrl:e.policyUrl}:{},...void 0!==e.cookieRefresh?{cookieRefresh:e.cookieRefresh}:{},...void 0!==e.usesNonCookieAccess?{usesNonCookieAccess:e.usesNonCookieAccess}:{},...e.dataRetention?{dataRetention:this.cloneDataRetention(e.dataRetention)}:{},...e.urls?{urls:this.cloneVendorUrls(e.urls)}:{},...e.dataDeclaration?{dataDeclaration:Array.from(e.dataDeclaration)}:{},...e.deviceStorageDisclosureUrl?{deviceStorageDisclosureUrl:e.deviceStorageDisclosureUrl}:{},...e.deletedDate?{deletedDate:e.deletedDate}:{}}}cloneVendors(){const e={};for(const t of Object.keys(this.fullVendorList))e[t]=j.cloneVendor(this.fullVendorList[t]);return e}async changeLanguage(e){let t=e;try{t=j.consentLanguages.parseLanguage(e)}catch(e){throw new I("Error during parsing the language: "+e.message)}const s=e.toUpperCase();if((t.toLowerCase()!==j.DEFAULT_LANGUAGE.toLowerCase()||j.LANGUAGE_CACHE.has(s))&&t!==this.lang_)if(this.lang_=t,j.LANGUAGE_CACHE.has(s)){const e=j.LANGUAGE_CACHE.get(s);for(const t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}else{const e=j.baseUrl+j.languageFilename.replace("[LANG]",this.lang_.toLowerCase());try{await this.fetchJson(e),this.cacheLang_=s,this.cacheLanguage()}catch(e){throw new I("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.dataCategories=e.dataCategories,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&&j.CACHE.set(j.LATEST_CACHE_KEY,this.getJson()),j.CACHE.has(this.vendorListVersion)||j.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 s=this.vendors_[String(t)];return s&&void 0===s.deletedDate&&(s.purposes.forEach(e=>{this.byPurposeVendorMap[String(e)].consent.add(t)}),s.specialPurposes.forEach(e=>{this.bySpecialPurposeVendorMap[String(e)].add(t)}),s.legIntPurposes.forEach(e=>{this.byPurposeVendorMap[String(e)].legInt.add(t)}),s.flexiblePurposes&&s.flexiblePurposes.forEach(e=>{this.byPurposeVendorMap[String(e)].flexible.add(t)}),s.features.forEach(e=>{this.byFeatureVendorMap[String(e)].add(t)}),s.specialFeatures.forEach(e=>{this.bySpecialFeatureVendorMap[String(e)].add(t)}),e[t]=s),e},{})}getFilteredVendors(e,t,s,n){const r=e.charAt(0).toUpperCase()+e.slice(1);let o;const i={};return o="purpose"===e&&s?this["by"+r+"VendorMap"][String(t)][s]:this["by"+(n?"Special":"")+r+"VendorMap"][String(t)],o.forEach(e=>{i[String(e)]=this.vendors[String(e)]}),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(){const e=new j(this.getJson());return this.lang_!==j.DEFAULT_LANGUAGE&&e.changeLanguage(this.lang_),e}static isInstanceOf(e){return"object"==typeof e&&"function"==typeof e.narrowVendorsTo}}class Q extends A{static consentLanguages=j.consentLanguages;isServiceSpecific_=!1;supportOOB_=!0;useNonStandardTexts_=!1;purposeOneTreatment_=!1;publisherCountryCode_="AA";version_=2;consentScreen_=0;policyVersion_=5;consentLanguage_="EN";cmpId_=0;cmpVersion_=0;vendorListVersion_=0;numCustomPurposes_=0;gvl_;created;lastUpdated;specialFeatureOptins=new V;purposeConsents=new V;purposeLegitimateInterests=new V;publisherConsents=new V;publisherLegitimateInterests=new V;publisherCustomConsents=new V;publisherCustomLegitimateInterests=new V;customPurposes;vendorConsents=new V;vendorLegitimateInterests=new V;vendorsDisclosed=new V;vendorsAllowed=new V;publisherRestrictions=new z;constructor(e){super(),e&&(this.gvl=e),this.updated()}set gvl(e){j.isInstanceOf(e)||(e=new j(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 C("cmpId",e);this.cmpId_=e}get cmpId(){return this.cmpId_}set cmpVersion(e){if(e=Number(e),!(Number.isInteger(e)&&e>-1))throw new C("cmpVersion",e);this.cmpVersion_=e}get cmpVersion(){return this.cmpVersion_}set consentScreen(e){if(e=Number(e),!(Number.isInteger(e)&&e>-1))throw new C("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 C("publisherCountryCode",e);this.publisherCountryCode_=e.toUpperCase()}get publisherCountryCode(){return this.publisherCountryCode_}set vendorListVersion(e){if((e=0|Number(e))<0)throw new C("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 C("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 useNonStandardTexts(e){this.useNonStandardTexts_=e}get useNonStandardTexts(){return this.useNonStandardTexts_}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 C("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 ${static encode(e,t){let s,n="";return e=G.process(e,t),s=Array.isArray(t?.segments)?t.segments:new H(e,t)[""+e.version],s.forEach((t,r)=>{let o="";r<s.length-1&&(o="."),n+=q.encode(e,t)+o}),n}static decode(e,t){const s=e.split("."),n=s.length;t||(t=new Q);for(let e=0;e<n;e++){const n=s[e],r=E.decode(n.charAt(0)).substr(0,O.segmentType),o=T.ID_TO_KEY[P.decode(r,O.segmentType).toString()];q.decode(n,t,o)}return t}}class W extends a{respond(){const e=d.tcModel,t=e.vendorListVersion;let s;void 0===this.param&&(this.param=t),s=this.param===t&&e.gvl?e.gvl:new j(this.param),s.readyPromise.then(()=>{this.invokeCallback(s.getJson())})}}class Y extends l{respond(){this.listenerId=d.eventQueue.add({callback:this.callback,param:this.param,next:this.next}),super.respond()}}class K extends a{respond(){this.invokeCallback(d.eventQueue.remove(this.param))}}class J{static[e.PING]=v;static[e.GET_TC_DATA]=l;static[e.GET_IN_APP_TC_DATA]=_;static[e.GET_VENDOR_LIST]=W;static[e.ADD_EVENT_LISTENER]=Y;static[e.REMOVE_EVENT_LISTENER]=K}class Z{static set_=new Set([0,2,void 0,null]);static has(e){return"string"==typeof e&&(e=Number(e)),this.set_.has(e)}}const X="__tcfapi";class ee{callQueue;customCommands;constructor(t){if(t){let s=e.ADD_EVENT_LISTENER;if(t?.[s])throw new Error(`Built-In Custom Commmand for ${s} not allowed: Use ${e.GET_TC_DATA} instead`);if(s=e.REMOVE_EVENT_LISTENER,t?.[s])throw new Error(`Built-In Custom Commmand for ${s} not allowed`);t?.[e.GET_TC_DATA]&&(t[e.ADD_EVENT_LISTENER]=t[e.GET_TC_DATA],t[e.REMOVE_EVENT_LISTENER]=t[e.GET_TC_DATA]),this.customCommands=t}try{this.callQueue=window[X]()||[]}catch(e){this.callQueue=[]}finally{window[X]=this.apiCall.bind(this),this.purgeQueuedCalls()}}apiCall(t,s,n,...r){if("string"!=typeof t)n(null,!1);else if(Z.has(s)){if("function"!=typeof n)throw new Error("invalid callback function");d.disabled?n(new h,!1):this.isCustomCommand(t)||this.isBuiltInCommand(t)?this.isCustomCommand(t)&&!this.isBuiltInCommand(t)?this.customCommands[t](n,...r):t===e.PING?this.isCustomCommand(t)?new J[t](this.customCommands[t],r[0],null,n):new J[t](n,r[0]):void 0===d.tcModel?this.callQueue.push([t,s,n,...r]):this.isCustomCommand(t)&&this.isBuiltInCommand(t)?new J[t](this.customCommands[t],r[0],null,n):new J[t](n,r[0]):n(null,!1)}else n(null,!1)}purgeQueuedCalls(){const e=this.callQueue;this.callQueue=[],e.forEach(e=>{window[X](...e)})}isCustomCommand(e){return this.customCommands&&"function"==typeof this.customCommands[e]}isBuiltInCommand(e){return void 0!==J[e]}}class te{callResponder;isServiceSpecific;numUpdates=0;constructor(e,t,s=!1,n){this.throwIfInvalidInt(e,"cmpId",2),this.throwIfInvalidInt(t,"cmpVersion",0),d.cmpId=e,d.cmpVersion=t,d.tcfPolicyVersion=5,this.isServiceSpecific=!!s,this.callResponder=new ee(n)}throwIfInvalidInt(e,t,s){if(!("number"==typeof e&&Number.isInteger(e)&&e>=s))throw new Error(`Invalid ${t}: ${e}`)}update(e,r=!1){if(d.disabled)throw new Error("CmpApi Disabled");d.cmpStatus=t.LOADED,r?(d.displayStatus=s.VISIBLE,d.eventStatus=n.CMP_UI_SHOWN):void 0===d.tcModel?(d.displayStatus=s.DISABLED,d.eventStatus=n.TC_LOADED):(d.displayStatus=s.HIDDEN,d.eventStatus=n.USER_ACTION_COMPLETE),d.gdprApplies=null!==e,d.gdprApplies?(""===e?(d.tcModel=new Q,d.tcModel.cmpId=d.cmpId,d.tcModel.cmpVersion=d.cmpVersion):d.tcModel=$.decode(e),d.tcModel.isServiceSpecific=this.isServiceSpecific,d.tcfPolicyVersion=Number(d.tcModel.policyVersion),d.tcString=e):d.tcModel=null,0===this.numUpdates?this.callResponder.purgeQueuedCalls():d.eventQueue.exec(),this.numUpdates++}disable(){d.disabled=!0,d.cmpStatus=t.ERROR}}const se=1===cmplz_tcf.isServiceSpecific,ne=["gl","eu","bg","ca","cs","da","de","el","es","et","fi","fr","hr","hu","it","ja","lt","lv","mt","nl","no","pl","pt","ro","ru","sk","sl","sr","sv","tr","zh"],re=ne.length,oe=document.documentElement.lang.length?document.documentElement.lang.toLowerCase():"en";let ie,ce="en";for(let e=0;e<re;e++){const t=ne[e];if("nb-no"===oe){ce="no";break}if(0===oe.indexOf(t)){ce=t;break}}"eu"===ce&&(ce="eus");let ae=[],le=[];const pe=cmplz_tcf.ac_mode,de=null!==document.getElementById("cmplz-tcf-us-vendor-container"),ue=cmplz_tcf.cmp_url+"cmp/vendorlist/additional-consent-providers.csv";let he,me,ge,fe,ve,_e=cmplz_tcf.cmp_url+"cmp/vendorlist/purposes-"+ce+".json";function ye(e){if("undefined"==typeof document)return"";const t="undefined"!=typeof complianz?complianz.prefix:"cmplz_",s=("; "+document.cookie).split("; "+t+e+"=");return 2===s.length?s.pop().split(";").shift():""}function Se(e,t,s){document.addEventListener(e,e=>{e.target.closest(t)&&s(e)})}function Ie(e){return null===e.offsetParent}ne.includes(ce)||(ce="en",_e=cmplz_tcf.cmp_url+"cmp/vendorlist/vendor-list.json");const Ce=new Promise(function(e){he=e}),Ee=new Promise(function(e){me=e}),be=new Promise(function(e){ge=e}),Le=new Promise(function(e){fe=e}),Ae=new Promise(function(e){ve=e}),we=pe?fetch(ue).then(e=>e.text()).then(e=>{const t=e.split("\n");t.shift(),le=t.map(e=>{if(0===e.length)return null;const[t,s,n,r]=function(e){const t=/"(.*?)"|([^,]+)/g,s=[];let n;for(;null!==(n=t.exec(e));)s.push(n[1]||n[2]);return s}(e);return{id:parseInt(t),name:s,policyUrl:n,domains:r,consent:0}}),le=le.filter(e=>null!==e)}).catch(e=>{cmplz_tcf.debug&&console.log("Error loading AC vendors:",e)}):Promise.resolve(),ze=fetch(_e,{method:"GET"}).then(e=>e.json()).then(e=>{ie=e}).catch(e=>{cmplz_tcf.debug&&console.log("Error loading purposes:",e)});Promise.all([we,ze]).then(()=>{ge()}),document.addEventListener("wp_consent_type_defined",function(){he()}),document.addEventListener("cmplz_cookie_warning_loaded",function(){complianz.disable_cookiebanner||fe()}),document.addEventListener("cmplz_revoke",function(e){const t=e.detail;ve(t)}),Ce.then(()=>{}),be.then(()=>{const e=S(),t=window.localStorage.getItem("cmplz_ac_string");j.baseUrl=cmplz_tcf.cmp_url+"cmp/vendorlist",ae=ie.dataCategories;const s=new j(ie);let n=null;s.changeLanguage(ce).then(()=>s.readyPromise).then(()=>{n=s.clone()});let r=new Q(s);r.publisherCountryCode=cmplz_tcf.publisherCountryCode,r.cmpId=332,r.cmpVersion=1,r.isServiceSpecific=se,r.policyVersion=5,r.UseNonStandardStacks=0,r.useNonStandardStacks=!1,r.useNonStandardTexts=!1,r.purposeOneTreatment=!1;const o=new te(332,1,se,{getTCData:(e,s,n)=>{s&&"object"==typeof s&&(t&&(s.addtlConsent=t,s.enableAdvertiserConsentMode=!(0===le.length||void 0===le[0].consent)),r.vendorsDisclosed&&(s.vendorsDisclosed={},Array.from(r.vendorsDisclosed).forEach(e=>{const t=parseInt(e,10);isNaN(t)||(s.vendorsDisclosed[t]=!0)})),s.policyVersion=r.policyVersion||5,s.useNonStandardStacks=r.useNonStandardStacks||!1,s.useNonStandardTexts=r.useNonStandardTexts||!1,s.purposeOneTreatment=r.purposeOneTreatment||!1),e(s,n)}});function i(){d(),function(){r.setAllVendorLegitimateInterests();for(const e in r.gvl.vendors){const t=r.gvl.vendors[e];0===t.legIntPurposes.length&&0===t.specialPurposes.length&&r.vendorLegitimateInterests.unset(t.id)}}(),r.setAllPurposeLegitimateInterests();for(const e in cmplz_tcf.purposes)r.purposeConsents.set(cmplz_tcf.purposes[e]),m("purpose_legitimate_interest",cmplz_tcf.purposes[e]);r.setAllSpecialFeatureOptins();for(const e in cmplz_tcf.specialFeatures)r.specialFeatureOptins.set(cmplz_tcf.specialFeatures[e]),m("specialfeature",cmplz_tcf.specialFeatures[e]);r.setAllPurposeConsents();for(const e in cmplz_tcf.purposes)r.purposeConsents.set(cmplz_tcf.purposes[e]),m("purpose_consent",cmplz_tcf.purposes[e]);r.setAllVendorConsents(),document.querySelectorAll(".cmplz-tcf-input").forEach(e=>{e.checked=!0}),I(r,_()),cmplz_set_cookie("banner-status","dismissed")}function c(e){p(),r.unsetAllPurposeLegitimateInterests(),function(){r.unsetAllVendorLegitimateInterests();for(const e in r.gvl.vendors){const t=r.gvl.vendors[e];0===t.legIntPurposes.length&&0===t.purposes.length&&0===t.flexiblePurposes.length&&0===t.specialFeatures.length&&0!==t.specialPurposes.length&&r.vendorLegitimateInterests.set(t.id)}}(),r.unsetAllSpecialFeatureOptins();for(const e in cmplz_tcf.specialFeatures)r.specialFeatureOptins.unset(cmplz_tcf.specialFeatures[e]),g("specialfeature",cmplz_tcf.specialFeatures[e]);for(const e in cmplz_tcf.purposes)r.purposeConsents.set(cmplz_tcf.purposes[e]),g("purpose_consent",cmplz_tcf.purposes[e]);r.unsetAllVendorConsents(),document.querySelectorAll(".cmplz-tcf-input").forEach(e=>{e.disabled||(e.checked=!1)}),I(r,_()),e&&location.reload()}r.gvl.readyPromise.then(()=>{const s=function(e){let t=Object.values(e).map(e=>e.id),s=y("purposes",e,cmplz_tcf.purposes);t=t.filter(e=>s.includes(e)),s=y("specialPurposes",e,cmplz_tcf.specialPurposes),t=t.filter(e=>s.includes(e)),s=y("features",e,cmplz_tcf.features),t=t.filter(e=>s.includes(e)),s=y("specialFeatures",e,cmplz_tcf.specialFeatures),t=t.filter(e=>s.includes(e));const n=Object.keys(cmplz_tcf.excludedVendors).map(function(e){return cmplz_tcf.excludedVendors[e]});return t=t.filter(e=>!n.includes(e)),t}(r.gvl.getJson().vendors);if(r.gvl.narrowVendorsTo(s),e&&"string"==typeof e&&e.length>0)try{r=$.decode(e,r),r.vendorsDisclosed||(r.vendorsDisclosed=new Set,cmplz_tcf.debug&&console.log("TCF v2.2: Upgraded v2.0 TC String, initialized disclosed vendors")),void 0===r.useNonStandardStacks&&(r.useNonStandardStacks=!1),void 0===r.useNonStandardTexts&&(r.useNonStandardTexts=!1),void 0===r.purposeOneTreatment&&(r.purposeOneTreatment=!1),I(r,_()),le=a(t,le)}catch(e){cmplz_tcf.debug&&(console.error("TCF: Error decoding TC String:",e),console.log("TCF: Clearing invalid TC String, user will need to re-consent")),localStorage.cmplz_tcf_consent&&localStorage.removeItem("cmplz_tcf_consent")}else cmplz_tcf.debug&&console.log("TCF: No stored consent found, waiting for user choice");me()}),Promise.all([Ce,Ee]).then(()=>{if(function(e){const t=document.getElementById("cmplz-tcf-vendor-container");if(null===t)return;t.innerHTML="";const s=document.getElementById("cmplz-tcf-vendor-template").innerHTML,n=w(ie.purposes,cmplz_tcf.purposes),o=w(ie.specialPurposes,cmplz_tcf.specialPurposes),a=w(ie.features,cmplz_tcf.features),p=w(ie.specialFeatures,cmplz_tcf.specialFeatures);v("purpose_consent",n,"statistics"),v("purpose_consent",n,"marketing"),v("purpose_legitimate_interest",n,"statistics"),v("purpose_legitimate_interest",n,"marketing"),v("feature",a,!1),v("specialpurpose",o,!1),v("specialfeature",p,!1),0===p.length&&(document.getElementById("cmplz-tcf-specialfeatures-wrapper").style.display="none");for(const o in e)if(e.hasOwnProperty(o)){let i=s;const c=e[o];r.vendorsDisclosed&&r.vendorsDisclosed.set(c.id);const a=c.purposes.concat(c.legIntPurposes);let l="";for(const e in a)if(a.hasOwnProperty(e)){const t=a[e];let s=!1;for(const e in n)if(n.hasOwnProperty(e)&&n[e].id===t){s=n[e].name;const r=c.dataRetention&&c.dataRetention.hasOwnProperty("stdRetention")?c.dataRetention.stdRetention:null;let o=c.dataRetention&&c.dataRetention.hasOwnProperty(t)?c.dataRetention[t]:r;void 0===o&&(o=cmplz_tcf.undeclared_string),l+='<div class="cmplz-tcf-purpose"><a href="https://cookiedatabase.org/tcf/'+s.replace(/ /g,"-").replace(/\//g,"-").toLowerCase()+'" target="_blank" rel="noopener noreferrer nofollow">'+s+"</a>| "+cmplz_tcf.retention_string+": "+o+"</div>"}}const p=A(c,ae),d=Math.round(c.cookieMaxAgeSeconds/86400);cmplz_tcf.debug&&console.log(c),i=i.replace(/{cookie_retention_seconds}/g,c.cookieMaxAgeSeconds),i=i.replace(/{cookie_retention_days}/g,d),i=i.replace(/{vendor_name}/g,c.name),i=i.replace(/{vendor_categories}/g,p),i=i.replace(/{vendor_id}/g,c.id),i=i.replace(/{purposes}/g,l);let u=!1,h=!1;c.urls.hasOwnProperty(0)&&(u=c.urls[0].privacy,h=c.urls[0].legIntClaim,u&&(i=i.replace(/{privacy_policy}/g,u)),h&&(i=i.replace(/{legitimate_interest}/g,h)));const m=L(c,n);i=i.replace(/{data_retention}/g,m);const g=document.createElement("div");g.innerHTML=i;const f=g.firstChild;f.querySelector(".cmplz-tcf-vendor-input").checked=r.vendorConsents.has(c.id)||r.vendorLegitimateInterests.has(c.id),f.querySelector(".cmplz-tcf-vendor-input").setAttribute("data-vendor_id",c.id),f.querySelector(".cmplz-tcf-consent-input").checked=r.vendorConsents.has(c.id),f.querySelector(".cmplz-tcf-consent-input").setAttribute("data-vendor_id",c.id),0!==c.legIntPurposes.length&&(f.querySelector(".cmplz_tcf_legitimate_interest_checkbox").style.display="block",f.querySelector(".cmplz-tcf-legitimate-interest-input").setAttribute("data-vendor_id",c.id),f.querySelector(".cmplz-tcf-legitimate-interest-input").checked=r.vendorLegitimateInterests.has(c.id)),h||(f.querySelector(".cmplz-tcf-legint-link").style.display="none",f.querySelector(".cmplz-tcf-legint-link").classList.add("not-available")),c.usesNonCookieAccess?g.querySelector(".non-cookie-storage-active").style.display="block":g.querySelector(".non-cookie-storage-inactive").style.display="block",c.cookieRefresh?g.querySelector(".non-cookie-refresh-active").style.display="block":g.querySelector(".non-cookie-refresh-inactive").style.display="block",c.cookieMaxAgeSeconds<=0?g.querySelector(".session-storage").style.display="block":c.cookieMaxAgeSeconds<=86400?g.querySelector(".retention_seconds").style.display="block":g.querySelector(".retention_days").style.display="block";const v=document.createDocumentFragment();f.classList.add("cmplz-vendortype-tcf"),v.appendChild(f),t.appendChild(f)}for(const e in le)if(le.hasOwnProperty(e)){let n=s;const o=le[e];r.vendorsDisclosed&&r.vendorsDisclosed.set(o.id),n=n.replace(/{vendor_name}/g,o.name),n=n.replace(/{vendor_id}/g,o.id),n=n.replace(/{privacy_policy}/g,o.policyUrl),n=n.replace(/{vendor_categories}/g,cmplz_tcf.undeclared_string);const i='<div class="cmplz-data-retention"><strong>'+cmplz_tcf.retention_string+":</strong> "+cmplz_tcf.ac_vendor_retention_string+"</div>";n=n.replace(/{data_retention}/g,i);const c=document.createElement("div");c.innerHTML=n;const a=c.firstChild;a.querySelector(".cmplz-tcf-vendor-input").checked=1===o.consent,a.querySelector(".cmplz-tcf-vendor-input").setAttribute("data-ac_vendor_id",o.id),a.querySelector(".cmplz-tcf-consent-input").checked=1===o.consent,a.querySelector(".cmplz-tcf-consent-input").setAttribute("data-ac_vendor_id",o.id);const l=document.createDocumentFragment();a.classList.add("cmplz-vendortype-ac"),l.appendChild(a),t.appendChild(a)}function d(e){const t=e.querySelector(".cmplz-tcf-consent-input"),s=e.querySelector(".cmplz-tcf-legitimate-interest-input"),n=e.querySelector(".cmplz_tcf_legitimate_interest_checkbox"),r=e.querySelector(".cmplz-tcf-vendor-input"),o=!!t&&t.checked,i=!(!n||Ie(n)||!s)&&s.checked;r.checked=o||i}Se("click",".cmplz-tcf-legitimate-interest-input",function(e){const t=e.target,s=parseInt(t.getAttribute("data-vendor_id")),n=t.closest(".cmplz-tcf-vendor-container");t.checked?r.vendorLegitimateInterests.set(s):r.vendorLegitimateInterests.unset(s),d(n),I(r,!0),cmplz_set_cookie("banner-status","dismissed")}),Se("click",".cmplz-tcf-consent-input",function(e){const t=e.target,s=parseInt(t.getAttribute("data-vendor_id")),n=t.closest(".cmplz-tcf-vendor-container");s&&(t.checked?r.vendorConsents.set(s):r.vendorConsents.unset(s),d(n));const o=parseInt(t.getAttribute("data-ac_vendor_id"));o&&(t.checked?(u(o),n.querySelector(".cmplz-tcf-vendor-input").checked=!0):(l(o),n.querySelector(".cmplz-tcf-vendor-input").checked=!1)),I(r,!0),cmplz_set_cookie("banner-status","dismissed")}),Se("click",".cmplz-tcf-vendor-input",function(e){const t=e.target,s=parseInt(t.getAttribute("data-vendor_id")),n=parseInt(t.getAttribute("data-ac_vendor_id")),o=t.closest(".cmplz-tcf-vendor-container");s?t.checked?(r.vendorConsents.set(s),r.vendorLegitimateInterests.set(s),o.querySelector(".cmplz-tcf-legitimate-interest-input").checked=!0,o.querySelector(".cmplz-tcf-consent-input").checked=!0):(r.vendorConsents.unset(s),r.vendorLegitimateInterests.unset(s),o.querySelector(".cmplz-tcf-legitimate-interest-input").checked=!1,o.querySelector(".cmplz-tcf-consent-input").checked=!1):n&&(t.checked?(u(n),o.querySelector(".cmplz-tcf-consent-input").checked=!0):(l(n),o.querySelector(".cmplz-tcf-consent-input").checked=!1)),I(r,!0),cmplz_set_cookie("banner-status","dismissed")}),Se("click",".cmplz-tcf-toggle-info",function(e){const t=e.target;e.preventDefault(),Ie()?t.style.display="block":t.style.display="none"}),Se("click",".cmplz-tcf-toggle-vendor",function(e){const t=e.target;e.preventDefault();const s=t.closest(".cmplz-tcf-vendor-container").querySelector(".cmplz-tcf-info");Ie(s)?(t.classList.add("cmplz-tcf-rl"),t.classList.remove("cmplz-tcf-rm"),s.style.display="block"):(t.classList.add("cmplz-tcf-rm"),t.classList.remove("cmplz-tcf-rl"),s.style.display="none")}),Se("click","#cmplz-tcf-selectall",function(){for(const t in e)if(e.hasOwnProperty(t)){const s=e[t];r.vendorConsents.set(s.id),document.querySelector("#cmplz-tcf-"+s.id).checked=!0}document.querySelectorAll("[data-vendor_id]").forEach(e=>{e.checked=!0}),i()}),Se("click","#cmplz-tcf-deselectall",function(){for(const t in e)if(e.hasOwnProperty(t)){const s=e[t];r.vendorConsents.unset(s.id),document.querySelector("#cmplz-tcf-"+s.id).checked=!1}c(!0)});const h=new CustomEvent("cmplz_vendor_container_loaded",{detail:complianz.region});document.dispatchEvent(h)}(r.gvl.vendors),"optin"===complianz.consenttype){cmplz_tcf.debug&&console.log(r);const e=new Date;Date.parse(r.created)<e.getTime()-31536e6?I(null,_()):I(r,_())}else cmplz_tcf.debug&&console.log("not an optin tcf region"),I(null,!1)}),Promise.all([Le,Ee,be]).then(()=>{!function(){if(!b(complianz.region))return;if("optin"===complianz.consenttype){const e=E("marketing",!1),t=E("statistics",!1),s=w(w(ie.purposes,cmplz_tcf.purposes),e),n=w(w(ie.purposes,cmplz_tcf.purposes),t),r=w(ie.features,cmplz_tcf.features),o=w(ie.specialPurposes,cmplz_tcf.specialPurposes),i=w(ie.specialFeatures,cmplz_tcf.specialFeatures);0===r.length&&(document.querySelector(".cmplz-tcf .cmplz-features").style.display="none"),0===o.length&&(document.querySelector(".cmplz-tcf .cmplz-specialpurposes").style.display="none"),0===i.length&&(document.querySelector(".cmplz-tcf .cmplz-specialfeatures").style.display="none"),0===n.length&&(document.querySelector(".cmplz-tcf .cmplz-statistics").style.display="none"),document.querySelector(".cmplz-tcf .cmplz-statistics .cmplz-description").innerHTML=z(n),document.querySelector(".cmplz-tcf .cmplz-marketing .cmplz-description").innerHTML=z(s),document.querySelector(".cmplz-tcf .cmplz-features .cmplz-description").innerHTML=z(r),document.querySelector(".cmplz-tcf .cmplz-specialfeatures .cmplz-title").innerHTML=z(i),document.querySelector(".cmplz-tcf .cmplz-specialpurposes .cmplz-title").innerHTML=z(o)}const e=document.querySelectorAll(".cmplz-manage-vendors.tcf");if(e){let t="optin"===complianz.consenttype?r.gvl.vendorIds.size:"";pe&&"optin"===complianz.consenttype&&(t+=le.length),e.forEach(e=>{e.innerHTML=e.innerHTML.replace("{vendor_count}",t)})}const t=document.getElementById("cmplz-tcf-wrapper"),s=document.getElementById("cmplz-tcf-wrapper-nojavascript");t&&(t.style.display="block",s.style.display="none")}()}),Ae.then(e=>{b(complianz.region)&&c(e)}),document.addEventListener("cmplz_fire_categories",function(e){"optin"===complianz.consenttype&&cmplz_in_array("marketing",e.detail.categories)&&i()});const a=(e,t)=>{const s=h(e);t.forEach(e=>{s.includes(e.id)&&(e.consent=1)});const n=new Set(Object.values(r.gvl.vendors).map(e=>e.name));return t.filter(e=>!n.has(e.name))},l=e=>{le.forEach(t=>{parseInt(t.id)===e&&(t.consent=0)})},p=()=>{le.forEach(e=>{e.consent=0})},d=()=>{le.forEach(e=>{e.consent=1})},u=e=>{le.forEach(t=>{parseInt(t.id)===e&&(t.consent=1)})},h=e=>e&&0!==e.length?e.split("~")[1].split(".").map(e=>parseInt(e)):[];function m(e,t){if("purpose_consent"===e){r.purposeConsents.set(t);for(const e in r.gvl.vendors){const s=r.gvl.vendors[e];n.vendors[s.id].purposes.includes(t)&&!s.purposes.includes(t)&&r.gvl.vendors[s.id].purposes.push(t)}}if("purpose_legitimate_interest"===e){r.purposeLegitimateInterests.set(t);for(const e in r.gvl.vendors){const s=r.gvl.vendors[e];n.vendors[s.id].purposes.includes(t)&&!s.purposes.includes(t)&&r.gvl.vendors[s.id].purposes.push(t)}}if("specialfeature"===e){r.specialFeatureOptins.set(t);for(const e in r.gvl.vendors){const s=r.gvl.vendors[e];n.vendors[s.id].specialFeatures.includes(t)&&!s.specialFeatures.includes(t)&&r.gvl.vendors[s.id].specialFeatures.push(t)}}if("feature"===e)for(const e in r.gvl.vendors){const s=r.gvl.vendors[e];n.vendors[s.id].features.includes(t)&&!s.features.includes(t)&&r.gvl.vendors[s.id].features.push(t)}}function g(e,t){if("purpose_consent"===e){r.purposeConsents.unset(t);for(const e in r.gvl.vendors){const s=r.gvl.vendors[e],n=s.purposes.indexOf(t);n>-1&&r.gvl.vendors[s.id].purposes.splice(n,1)}}if("purpose_legitimate_interest"===e){r.purposeLegitimateInterests.unset(t);for(const e in r.gvl.vendors){const s=r.gvl.vendors[e],n=s.legIntPurposes.indexOf(t);n>-1&&r.gvl.vendors[s.id].legIntPurposes.splice(n,1)}}if("specialfeature"===e){r.specialFeatureOptins.unset(t);for(const e in r.gvl.vendors){const s=r.gvl.vendors[e],n=s.specialFeatures.indexOf(t);n>-1&&r.gvl.vendors[s.id].specialFeatures.splice(n,1)}}if("feature"===e)for(const e in r.gvl.vendors){const s=r.gvl.vendors[e],n=s.features.indexOf(t);n>-1&&r.gvl.vendors[s.id].features.splice(n,1)}}function f(e,t,s,n,o){const{name:i,description:c,id:a,illustrations:l}=t,p=l&&l.hasOwnProperty(0)?l[0]:"",d=function(e,t,s){const n=[];for(const e in t)for(const r in s)if(t[e].purposes.includes(s[""+r])){n.push(t[e].id);break}return n}(0,r.gvl.vendors,[a]).length,u=c.split("*").join(", "),h=document.getElementById("cmplz-tcf-type-template").innerHTML.replace(/{type_name}/g,i).replace(/{type_count}/g,d).replace(/{type_description}/g,u).replace(/{type_id}/g,a).replace(/{type_example}/g,p).replace(/{type}/g,e),m=document.createElement("div");m.innerHTML=h;const g=m.firstChild,f=g.querySelector(`.cmplz-tcf-${e}-input`);f.checked=n,f.disabled=o,f.setAttribute(`data-${e}_id`,a),s.appendChild(g)}function v(e,t,s){let n,o=e;!1!==s&&(o=s+"-"+o,n=E(s,!1));const i=document.getElementById("cmplz-tcf-"+o+"s-container");if(null!==i){i.innerHTML="";for(const o in t)if(t.hasOwnProperty(o)){const c=t[o];if(!s||n.includes(c.id)){let t=!1,s=!1;"purpose_consent"===e&&(t=r.purposeConsents.has(c.id)),"purpose_legitimate_interest"===e&&(t=r.purposeLegitimateInterests.has(c.id)),"specialfeature"===e&&(t=r.specialFeatureOptins.has(c.id)),"feature"!==e&&"specialpurpose"!==e||(t=s=!0),f(e,c,i,t,s)}}Se("click",".cmplz-tcf-"+e+"-input",function(t){const s=t.target,n=parseInt(s.getAttribute("data-"+e+"_id")),o=s.checked;document.querySelectorAll("[data-"+e+'_id="'+n+'"]').forEach(e=>{e.checked=o}),"purpose_consent"===e&&r.purposeConsents[o?"set":"unset"](n),"purpose_legitimate_interest"===e&&r.purposeLegitimateInterests[o?"set":"unset"](n),"specialfeature"===e&&r.specialFeatureOptins[o?"set":"unset"](n),o?m(e,n):g(e,n),function(){for(const e in r.gvl.vendors){const t=r.gvl.vendors[e];0===t.legIntPurposes.length&&0===t.specialPurposes.length&&r.vendorLegitimateInterests.unset(t.id),0===t.legIntPurposes.length&&0===t.purposes.length&&0===t.flexiblePurposes.length&&0===t.specialFeatures.length&&0!==t.specialPurposes.length&&r.vendorLegitimateInterests.set(t.id)}}(),I(r,!0),cmplz_set_cookie("banner-status","dismissed")}),Se("click",".cmplz-tcf-toggle",function(e){const t=e.target;e.preventDefault();const s=t.closest("label").querySelector(".cmplz-tcf-type-description");Ie(s)?(t.classList.add("cmplz-tcf-rl"),t.classList.remove("cmplz-tcf-rm"),s.style.display="block"):(t.classList.add("cmplz-tcf-rm"),t.classList.remove("cmplz-tcf-rl"),s.style.display="none")})}}function _(){let e=!0;"dismissed"===ye("banner-status")&&(e=!1);const t=null!==document.getElementById("cmplz-tcf-vendor-container");return e||t}function y(e,t,s){const n=[];for(const r of Object.values(t)){const t=r[e];Object.values(t).every(e=>s.includes(e))&&n.push(r.id)}return n}function S(){const e=ye("policy_id");return(!e||"undefined"!=typeof complianz&&complianz.current_policy_id!==e)&&localStorage.cmplz_tcf_consent&&localStorage.removeItem("cmplz_tcf_consent"),window.localStorage.getItem("cmplz_tcf_consent")}function I(e,t){!function(){if(0===le.length||void 0===le[0].consent)return;let e="1~";const t=le.filter(e=>1===e.consent);0!==t.length?(e+=t.map(e=>e.id).join("."),window.localStorage.setItem("cmplz_ac_string",e)):localStorage.cmplz_ac_string&&localStorage.removeItem("cmplz_ac_string")}();let s=null;e&&(e.created=C(e.lastUpdated),e.lastUpdated=C(e.lastUpdated),e.vendorsDisclosed||(e.vendorsDisclosed=new Set),void 0===e.useNonStandardStacks&&(e.useNonStandardStacks=!1),void 0===e.useNonStandardTexts&&(e.useNonStandardTexts=!1),void 0===e.purposeOneTreatment&&(e.purposeOneTreatment=!1),s=$.encode(e)),o.update(s,t),window.localStorage.setItem("cmplz_tcf_consent",s)}function C(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function E(e,t){return"functional"===e||"preferences"===e?[]:"marketing"===e?t?[1,2,3,4,5,6,7,8,9,10,11]:[1,2,3,4,5,6,10,11]:"statistics"===e?[1,7,8,9]:[]}function b(e){return!!cmplz_in_array(e,complianz.tcf_regions)}function L(e,t){if(!e.dataRetention)return'<div class="cmplz-data-retention"><strong>'+cmplz_tcf.retention_string+":</strong> "+cmplz_tcf.undeclared_string+"</div>";const s=e.dataRetention.stdRetention||cmplz_tcf.undeclared_string;let n='<div class="cmplz-data-retention">';if(n+="<strong>"+cmplz_tcf.retention_string+":</strong> ",s===cmplz_tcf.undeclared_string?n+=s:n+=s+" "+cmplz_tcf.days_string,e.dataRetention.purposes&&Object.keys(e.dataRetention.purposes).length>0){n+="<br><strong>"+cmplz_tcf.purpose_retention_string+":</strong>",n+='<ul class="cmplz-retention-list">';for(const[s,r]of Object.entries(e.dataRetention.purposes)){const e=t.find(e=>e.id===parseInt(s));e&&(n+="<li>"+e.name+": "+r+" "+cmplz_tcf.days_string+"</li>")}n+="</ul>"}return n+="</div>",n}function A(e,t){if(!e.dataDeclaration||0===e.dataDeclaration.length)return cmplz_tcf.undeclared_string;const s=[];for(const n in e.dataDeclaration)if(e.dataDeclaration.hasOwnProperty(n)){const r=e.dataDeclaration[n];for(const e in t)if(t.hasOwnProperty(e)&&t[e].id===r){s.push(t[e].name);break}}return s.length>0?s.join(", "):cmplz_tcf.undeclared_string}function w(e,t){const s=[];for(const n in e)(t.includes(""+e[n].id)||t.includes(e[n].id))&&s.push(e[n]);return s}function z(e){let t="";const s=e.length-1;for(const n in e)e.hasOwnProperty(n)&&(t+=e[n].name,t+=n<s?", ":".");return t}Se("click",".cmplz-manage-consent",function(){const e=S();o.update(e,!0)})});let Te;const Ve=new Promise(function(e){Te=e}),Oe=cmplz_tcf.cmp_url+"cmp/vendorlist/lspa.json";let Pe;Ce.then(()=>{"optout"===complianz.consenttype||de?(fetch(Oe,{method:"GET"}).then(e=>e.json()).then(function(e){Pe=e,Te()}),cmplz_tcf.ccpa_applies?(cmplz_set_cookie("usprivacy","1YN"+cmplz_tcf.lspact,!1),document.addEventListener("cmplz_fire_categories",function(e){let t="1YY"+cmplz_tcf.lspact;cmplz_in_array("marketing",e.detail.categories)&&(t="1YN"+cmplz_tcf.lspact),cmplz_set_cookie("usprivacy",t,!1)})):cmplz_set_cookie("usprivacy","1---"+cmplz_tcf.lspact,!1),Ve.then(()=>{const e=Pe.signatories,t=document.getElementById("cmplz-tcf-us-vendor-container");if(null===t)return;t.innerHTML="";const s=document.getElementById("cmplz-tcf-vendor-template").innerHTML;for(const n in e)if(e.hasOwnProperty(n)){let r=s;const o=e[n];r=r.replace(/{vendor_name}/g,o.signatoryLegalName);let i=!0;-1===o.optoutUrl.indexOf("http")?(i=!1,r=r.replace(/{optout_string}/g,o.optoutUrl)):r=r.replace(/{optout_url}/g,o.optoutUrl);const c=document.createElement("div");c.innerHTML=r;const a=c.firstChild;i?(a.querySelector(".cmplz-tcf-optout-string").style.display="none",a.querySelector(".cmplz-tcf-optout-url").style.display="block"):(a.querySelector(".cmplz-tcf-optout-string").style.display="block",a.querySelector(".cmplz-tcf-optout-url").style.display="none"),document.createDocumentFragment().appendChild(a),t.appendChild(a)}document.querySelector("#cmplz-tcf-wrapper").style.display="block",document.querySelector("#cmplz-tcf-wrapper-nojavascript").style.display="none"})):cmplz_tcf.debug&&console.log("not an optout tcf region or page")}),document.addEventListener("cmplz_dnsmpi_submit",function(){cmplz_tcf.debug&&console.log("fire data deletion request for TCF"),__uspapi("performDeletion",1)})})();
| ver. 1.1 | |
.
| PHP 8.3.30 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка