(function(){function kt(c,h,y,b){var R=Ge(Ce(1&b?c.prototype:c),h,y);return 2&b&&typeof R=="function"?function(J){return R.apply(y,J)}:R}function Ge(){return Ge=typeof Reflect!="undefined"&&Reflect.get?Reflect.get.bind():function(c,h,y){var b=Ot(c,h);if(b){var R=Object.getOwnPropertyDescriptor(b,h);return R.get?R.get.call(arguments.length<3?c:y):R.value}},Ge.apply(null,arguments)}function Ot(c,h){for(;!{}.hasOwnProperty.call(c,h)&&(c=Ce(c))!==null;);return c}function st(c,h){var y=Object.keys(c);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(c);h&&(b=b.filter(function(R){return Object.getOwnPropertyDescriptor(c,R).enumerable})),y.push.apply(y,b)}return y}function M(c){for(var h=1;h=0;--O){var S=this.tryEntries[O],F=S.completion;if(S.tryLoc==="root")return C("end");if(S.tryLoc<=this.prev){var H=b.call(S,"catchLoc"),Q=b.call(S,"finallyLoc");if(H&&Q){if(this.prev=0;--C){var O=this.tryEntries[C];if(O.tryLoc<=this.prev&&b.call(O,"finallyLoc")&&this.prev=0;--g){var C=this.tryEntries[g];if(C.finallyLoc===f)return this.complete(C.completion,C.afterLoc),we(C),Z}},catch:function(f){for(var g=this.tryEntries.length-1;g>=0;--g){var C=this.tryEntries[g];if(C.tryLoc===f){var O=C.completion;if(O.type==="throw"){var S=O.arg;we(C)}return S}}throw Error("illegal catch attempt")},delegateYield:function(f,g,C){return this.delegate={iterator:Ie(f),resultName:g,nextLoc:C},this.method==="next"&&(this.arg=c),Z}},h}function Fe(c){return Tt(c)||_t(c)||ct(c)||Vt()}function Vt(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _t(c){if(typeof Symbol!="undefined"&&c[Symbol.iterator]!=null||c["@@iterator"]!=null)return Array.from(c)}function Tt(c){if(Array.isArray(c))return He(c)}function a(c,h,y){return(h=ut(h))in c?Object.defineProperty(c,h,{value:y,enumerable:!0,configurable:!0,writable:!0}):c[h]=y,c}function at(c,h){for(var y=0;y=c.length?{done:!0}:{done:!1,value:c[b++]}},e:function(d){throw d},f:R}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var J,B=!0,$=!1;return{s:function(){y=y.call(c)},n:function(){var d=y.next();return B=d.done,d},e:function(d){$=!0,J=d},f:function(){try{B||y.return==null||y.return()}finally{if($)throw J}}}}function ct(c,h){if(c){if(typeof c=="string")return He(c,h);var y={}.toString.call(c).slice(8,-1);return y==="Object"&&c.constructor&&(y=c.constructor.name),y==="Map"||y==="Set"?Array.from(c):y==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(y)?He(c,h):void 0}}function He(c,h){(h==null||h>c.length)&&(h=c.length);for(var y=0,b=Array(h);y2&&arguments[2]!==void 0?arguments[2]:"";return k(this,s),n=x(this,s,["invalid value ".concat(e," passed for ").concat(t," ").concat(r)]),n.name="TCModelError",n}return j(s,i),A(s)}(Ae(Error)),oe=function(){function i(){k(this,i)}return A(i,null,[{key:"encode",value:function(t){if(!/^[0-1]+$/.test(t))throw new q("Invalid bitField");var e=t.length%this.LCM;t+=e?"0".repeat(this.LCM-e):"";for(var n="",r=0;r=2&&e.length==2){if(X.langSet.has(t))return t;if(X.langSet.has(e))return e;var n=e+"-"+e;if(X.langSet.has(n))return n;var r=je(X.langSet),o;try{for(r.s();!(o=r.n()).done;){var u=o.value;if(u.indexOf(t)!==-1||u.indexOf(e)!==-1)return u}}catch(p){r.e(p)}finally{r.f()}}throw new Error("unsupported language ".concat(t))}},{key:"forEach",value:function(t){X.langSet.forEach(t)}},{key:"size",get:function(){return X.langSet.size}}])}(),Z=X;d(Z,"langSet",new Set(["AR","BG","BS","CA","CS","CY","DA","DE","EL","EN","ES","ET","EU","FI","FR","GL","HE","HR","HU","ID","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"]));var l=A(function i(){k(this,i)});d(l,"cmpId","cmpId"),d(l,"cmpVersion","cmpVersion"),d(l,"consentLanguage","consentLanguage"),d(l,"consentScreen","consentScreen"),d(l,"created","created"),d(l,"supportOOB","supportOOB"),d(l,"isServiceSpecific","isServiceSpecific"),d(l,"lastUpdated","lastUpdated"),d(l,"numCustomPurposes","numCustomPurposes"),d(l,"policyVersion","policyVersion"),d(l,"publisherCountryCode","publisherCountryCode"),d(l,"publisherCustomConsents","publisherCustomConsents"),d(l,"publisherCustomLegitimateInterests","publisherCustomLegitimateInterests"),d(l,"publisherLegitimateInterests","publisherLegitimateInterests"),d(l,"publisherConsents","publisherConsents"),d(l,"publisherRestrictions","publisherRestrictions"),d(l,"purposeConsents","purposeConsents"),d(l,"purposeLegitimateInterests","purposeLegitimateInterests"),d(l,"purposeOneTreatment","purposeOneTreatment"),d(l,"specialFeatureOptins","specialFeatureOptins"),d(l,"useNonStandardTexts","useNonStandardTexts"),d(l,"vendorConsents","vendorConsents"),d(l,"vendorLegitimateInterests","vendorLegitimateInterests"),d(l,"vendorListVersion","vendorListVersion"),d(l,"vendorsAllowed","vendorsAllowed"),d(l,"vendorsDisclosed","vendorsDisclosed"),d(l,"version","version");var ae=function(){function i(){k(this,i)}return A(i,[{key:"clone",value:function(){var t=this,e=new this.constructor;return Object.keys(this).forEach(function(n){var r=t.deepClone(t[n]);r!==void 0&&(e[n]=r)}),e}},{key:"deepClone",value:function(t){var e=Y(t);if(e==="number"||e==="string"||e==="boolean")return t;if(t!==null&&e==="object"){if(typeof t.clone=="function")return t.clone();if(t instanceof Date)return new Date(t.getTime());if(t[Symbol.iterator]!==void 0){var n=[],r=je(t),o;try{for(r.s();!(o=r.n()).done;){var u=o.value;n.push(this.deepClone(u))}}catch(V){r.e(V)}finally{r.f()}return t instanceof Array?n:new t.constructor(n)}else{var p={};for(var I in t)t.hasOwnProperty(I)&&(p[I]=this.deepClone(t[I]));return p}}}}])}(),G;(function(i){i[i.NOT_ALLOWED=0]="NOT_ALLOWED",i[i.REQUIRE_CONSENT=1]="REQUIRE_CONSENT",i[i.REQUIRE_LI=2]="REQUIRE_LI"})(G||(G={}));var ve=function(i){function s(t,e){var n;return k(this,s),n=x(this,s),a(w(n),"purposeId_",void 0),a(w(n),"restrictionType",void 0),t!==void 0&&(n.purposeId=t),e!==void 0&&(n.restrictionType=e),n}return j(s,i),A(s,[{key:"hash",get:function(){if(!this.isValid())throw new Error("cannot hash invalid PurposeRestriction");return"".concat(this.purposeId).concat(ve.hashSeparator).concat(this.restrictionType)}},{key:"purposeId",get:function(){return this.purposeId_},set:function(e){this.purposeId_=e}},{key:"isValid",value:function(){return Number.isInteger(this.purposeId)&&this.purposeId>0&&(this.restrictionType===G.NOT_ALLOWED||this.restrictionType===G.REQUIRE_CONSENT||this.restrictionType===G.REQUIRE_LI)}},{key:"isSameAs",value:function(e){return this.purposeId===e.purposeId&&this.restrictionType===e.restrictionType}}],[{key:"unHash",value:function(e){var n=e.split(this.hashSeparator),r=new ve;if(n.length!==2)throw new ne("hash",e);return r.purposeId=parseInt(n[0],10),r.restrictionType=parseInt(n[1],10),r}}])}(ae),re=ve;d(re,"hashSeparator","-");var ge=function(i){function s(){var t;k(this,s);for(var e=arguments.length,n=new Array(e),r=0;ro.restrictionType)&&(r=o.restrictionType)}),r}},{key:"vendorHasRestriction",value:function(e,n){for(var r=!1,o=this.getRestrictions(e),u=0;u0}},{key:"isSet",value:function(e){var n=!1;return e instanceof Set&&(n=Array.from(e).every(this.isValidNumber)),n}},{key:"set",value:function(e){var n=this;if(Array.isArray(e))e.forEach(function(r){return n.set(r)});else if(this.isSet(e))this.set(Array.from(e));else if(this.isIntMap(e))this.set(Object.keys(e).map(function(r){return Number(r)}));else if(this.isValidNumber(e))this.set_.add(e),this.maxId_=Math.max(this.maxId,e),this.bitLength=0;else throw new ne("set()",e,"must be positive integer array, positive integer, Set, or IntMap")}},{key:"empty",value:function(){this.set_=new Set}},{key:"forEach",value:function(e){for(var n=1;n<=this.maxId;n++)e(this.has(n),n)}},{key:"size",get:function(){return this.set_.size}},{key:"setAll",value:function(e){this.set(e)}}])}(ae),ke,Pe,we,Se,Ie,m,f,g,C,O,S,F,H,Q,ue,se,ce,Qe,v=A(function i(){k(this,i)});ke=l.cmpId,Pe=l.cmpVersion,we=l.consentLanguage,Se=l.consentScreen,Ie=l.created,m=l.isServiceSpecific,f=l.lastUpdated,g=l.policyVersion,C=l.publisherCountryCode,O=l.publisherLegitimateInterests,S=l.publisherConsents,F=l.purposeConsents,H=l.purposeLegitimateInterests,Q=l.purposeOneTreatment,ue=l.specialFeatureOptins,se=l.useNonStandardTexts,ce=l.vendorListVersion,Qe=l.version,d(v,ke,12),d(v,Pe,12),d(v,we,12),d(v,Se,6),d(v,Ie,36),d(v,m,1),d(v,f,36),d(v,g,6),d(v,C,12),d(v,O,24),d(v,S,24),d(v,F,24),d(v,H,24),d(v,Q,1),d(v,ue,12),d(v,se,1),d(v,ce,12),d(v,Qe,6),d(v,"anyBoolean",1),d(v,"encodingType",1),d(v,"maxId",16),d(v,"numCustomPurposes",6),d(v,"numEntries",12),d(v,"numRestrictions",12),d(v,"purposeId",6),d(v,"restrictionType",2),d(v,"segmentType",3),d(v,"singleOrRange",1),d(v,"vendorId",16);var le=function(){function i(){k(this,i)}return A(i,null,[{key:"encode",value:function(t){return String(Number(t))}},{key:"decode",value:function(t){return t==="1"}}])}(),P=function(){function i(){k(this,i)}return A(i,null,[{key:"encode",value:function(t,e){var n;if(typeof t=="string"&&(t=parseInt(t,10)),n=t.toString(2),n.length>e||t<0)throw new q("".concat(t," too large to encode into ").concat(e));return n.length25||o<0||o>25)throw new q("invalid language code: ".concat(t));if(e%2===1)throw new q("numBits must be even, ".concat(e," is not valid"));e=e/2;var u=P.encode(r,e),p=P.encode(o,e);return u+p}},{key:"decode",value:function(t,e){var n;if(e===t.length&&!(t.length%2)){var r=t.length/2,o=P.decode(t.slice(0,r),r)+65,u=P.decode(t.slice(r),r)+65;n=String.fromCharCode(o)+String.fromCharCode(u)}else throw new te("invalid bit length for language");return n}}])}(),lt=function(){function i(){k(this,i)}return A(i,null,[{key:"encode",value:function(t){var e=P.encode(t.numRestrictions,v.numRestrictions);if(!t.isEmpty()){var n=function(o,u){for(var p=o+1;p<=u;p++)if(t.gvl.vendorIds.has(p))return p;return o};t.getRestrictions().forEach(function(r){e+=P.encode(r.purposeId,v.purposeId),e+=P.encode(r.restrictionType,v.restrictionType);for(var o=t.getVendors(r),u=o.length,p=0,I=0,V="",_=0;_n(L,o[u-1])){var N=L!==I;V+=le.encode(N),V+=P.encode(I,v.vendorId),N&&(V+=P.encode(L,v.vendorId)),I=0}}e+=P.encode(p,v.numEntries),e+=V})}return e}},{key:"decode",value:function(t){var e=0,n=new ge,r=P.decode(t.substr(e,v.numRestrictions),v.numRestrictions);e+=v.numRestrictions;for(var o=0;oV&&_0&&this[2].push(D.VENDORS_ALLOWED),this[2].push(D.PUBLISHER_TC))}}),Me=function(){function i(){k(this,i)}return A(i,null,[{key:"encode",value:function(t,e){var n=this,r;try{r=this.fieldSequence[String(t.version)][e]}catch(p){throw new q("Unable to encode version: ".concat(t.version,", segment: ").concat(e))}var o="";e!==D.CORE&&(o=P.encode(he.KEY_TO_ID[e],v.segmentType));var u=Je();return r.forEach(function(p){var I=t[p],V=u[p],_=v[p];_===void 0&&n.isPublisherCustom(p)&&(_=Number(t[l.numCustomPurposes]));try{o+=V.encode(I,_)}catch(L){throw new q("Error encoding ".concat(e,"->").concat(p,": ").concat(L.message))}}),oe.encode(o)}},{key:"decode",value:function(t,e,n){var r=this,o=oe.decode(t),u=0;n===D.CORE&&(e.version=P.decode(o.substr(u,v[l.version]),v[l.version])),n!==D.CORE&&(u+=v.segmentType);var p=this.fieldSequence[String(e.version)][n],I=Je();return p.forEach(function(V){var _=I[V],L=v[V];if(L===void 0&&r.isPublisherCustom(V)&&(L=Number(e[l.numCustomPurposes])),L!==0){var N=o.substr(u,L);if(_===Ve?e[V]=_.decode(N,e.version):e[V]=_.decode(N,L),Number.isInteger(L))u+=L;else if(Number.isInteger(e[V].bitLength))u+=e[V].bitLength;else throw new te(V)}}),e}},{key:"isPublisherCustom",value:function(t){return t.indexOf("publisherCustom")===0}}])}();d(Me,"fieldSequence",new dt);var Ke=function(){function i(){k(this,i)}return A(i,null,[{key:"process",value:function(t,e){var n=t.gvl;if(!n)throw new q("Unable to encode TCModel without a GVL");if(!n.isReady)throw new q("Unable to encode TCModel tcModel.gvl.readyPromise is not resolved");t=t.clone(),t.consentLanguage=n.language.slice(0,2).toUpperCase(),(e==null?void 0:e.version)>0&&(e==null?void 0:e.version)<=this.processor.length?t.version=e.version:t.version=this.processor.length;var r=t.version-1;if(!this.processor[r])throw new q("Invalid version: ".concat(t.version));return this.processor[r](t,n)}}])}();d(Ke,"processor",[function(i){return i},function(i,s){i.publisherRestrictions.gvl=s,i.purposeLegitimateInterests.unset([1,3,4,5,6]);var t=new Map;return t.set("legIntPurposes",i.vendorLegitimateInterests),t.set("purposes",i.vendorConsents),t.forEach(function(e,n){e.forEach(function(r,o){if(r){var u=s.vendors[o];if(!u||u.deletedDate)e.unset(o);else if(u[n].length===0&&!(n==="legIntPurposes"&&u.purposes.length===0&&u.legIntPurposes.length===0&&u.specialPurposes.length>0))if(i.isServiceSpecific)if(u.flexiblePurposes.length===0)e.unset(o);else{for(var p=i.publisherRestrictions.getRestrictions(o),I=!1,V=0,_=p.length;V<_&&!I;V++)I=p[V].restrictionType===G.REQUIRE_CONSENT&&n==="purposes"||p[V].restrictionType===G.REQUIRE_LI&&n==="legIntPurposes";I||e.unset(o)}else e.unset(o)}})}),i.vendorsDisclosed.set(s.vendors),i}]);var ht=function(){function i(){k(this,i)}return A(i,null,[{key:"absCall",value:function(t,e,n,r){return new Promise(function(o,u){var p=new XMLHttpRequest,I=function(){if(p.readyState==XMLHttpRequest.DONE)if(p.status>=200&&p.status<300){var ee=p.response;if(typeof ee=="string")try{ee=JSON.parse(ee)}catch(Le){}o(ee)}else u(new Error("HTTP Status: ".concat(p.status," response type: ").concat(p.responseType)))},V=function(){u(new Error("error"))},_=function(){u(new Error("aborted"))},L=function(){u(new Error("Timeout "+r+"ms "+t))};p.withCredentials=n,p.addEventListener("load",I),p.addEventListener("error",V),p.addEventListener("abort",_),e===null?p.open("GET",t,!0):p.open("POST",t,!0),p.responseType="json",p.timeout=r,p.ontimeout=L,p.send(e)})}},{key:"post",value:function(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return this.absCall(t,JSON.stringify(e),n,r)}},{key:"fetch",value:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return this.absCall(t,null,e,n)}}])}(),T=function(i){function s(t,e){var n;k(this,s),n=x(this,s),a(n,"readyPromise",void 0),a(n,"gvlSpecificationVersion",void 0),a(n,"vendorListVersion",void 0),a(n,"tcfPolicyVersion",void 0),a(n,"lastUpdated",void 0),a(n,"purposes",void 0),a(n,"specialPurposes",void 0),a(n,"features",void 0),a(n,"specialFeatures",void 0),a(n,"isReady_",!1),a(n,"vendors_",void 0),a(n,"vendorIds",void 0),a(n,"fullVendorList",void 0),a(n,"byPurposeVendorMap",void 0),a(n,"bySpecialPurposeVendorMap",void 0),a(n,"byFeatureVendorMap",void 0),a(n,"bySpecialFeatureVendorMap",void 0),a(n,"stacks",void 0),a(n,"dataCategories",void 0),a(n,"lang_",void 0),a(n,"cacheLang_",void 0),a(n,"isLatest",!1);var r=T.baseUrl,o=e==null?void 0:e.language;if(o)try{o=T.consentLanguages.parseLanguage(o)}catch(p){throw new de("Error during parsing the language: "+p.message)}if(n.lang_=o||T.DEFAULT_LANGUAGE,n.cacheLang_=o||T.DEFAULT_LANGUAGE,n.isVendorList(t))n.populate(t),n.readyPromise=Promise.resolve();else{if(!r)throw new de("must specify GVL.baseUrl before loading GVL json");if(t>0){var u=t;T.CACHE.has(u)?(n.populate(T.CACHE.get(u)),n.readyPromise=Promise.resolve()):(r+=T.versionedFilename.replace("[VERSION]",String(u)),n.readyPromise=n.fetchJson(r))}else T.CACHE.has(T.LATEST_CACHE_KEY)?(n.populate(T.CACHE.get(T.LATEST_CACHE_KEY)),n.readyPromise=Promise.resolve()):(n.isLatest=!0,n.readyPromise=n.fetchJson(r+T.latestFilename))}return n}return j(s,i),A(s,[{key:"cacheLanguage",value:function(){T.LANGUAGE_CACHE.has(this.cacheLang_)||T.LANGUAGE_CACHE.set(this.cacheLang_,{purposes:this.purposes,specialPurposes:this.specialPurposes,features:this.features,specialFeatures:this.specialFeatures,stacks:this.stacks,dataCategories:this.dataCategories})}},{key:"fetchJson",value:function(){var t=ot(Ee().mark(function n(r){return Ee().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.prev=0,u.t0=this,u.next=4,ht.fetch(r);case 4:u.t1=u.sent,u.t0.populate.call(u.t0,u.t1),u.next=11;break;case 8:throw u.prev=8,u.t2=u.catch(0),new de(u.t2.message);case 11:case"end":return u.stop()}},n,this,[[0,8]])}));function e(n){return t.apply(this,arguments)}return e}()},{key:"getJson",value:function(){return M(M({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()})}},{key:"cloneSpecialFeatures",value:function(){for(var e={},n=0,r=Object.keys(this.specialFeatures);n0&&e[e.length-1]!=="/"&&(e+="/"),this.baseUrl_=e}},{key:"emptyLanguageCache",value:function(e){var n=!1;return e==null&&T.LANGUAGE_CACHE.size>0?(T.LANGUAGE_CACHE=new Map,n=!0):typeof e=="string"&&this.consentLanguages.has(e.toUpperCase())&&(T.LANGUAGE_CACHE.delete(e.toUpperCase()),n=!0),n}},{key:"emptyCache",value:function(e){var n=!1;return Number.isInteger(e)&&e>=0?(T.CACHE.delete(e),n=!0):e===void 0&&(T.CACHE=new Map,n=!0),n}},{key:"clonePurpose",value:function(e){return M(M({id:e.id,name:e.name,description:e.description},e.descriptionLegal?{descriptionLegal:e.descriptionLegal}:{}),e.illustrations?{illustrations:Array.from(e.illustrations)}:{})}},{key:"cloneFeature",value:function(e){return M(M({id:e.id,name:e.name,description:e.description},e.descriptionLegal?{descriptionLegal:e.descriptionLegal}:{}),e.illustrations?{illustrations:Array.from(e.illustrations)}:{})}},{key:"cloneDataCategory",value:function(e){return{id:e.id,name:e.name,description:e.description}}},{key:"cloneStack",value:function(e){return{id:e.id,name:e.name,description:e.description,purposes:Array.from(e.purposes),specialFeatures:Array.from(e.specialFeatures)}}},{key:"cloneDataRetention",value:function(e){return M(M({},typeof e.stdRetention=="number"?{stdRetention:e.stdRetention}:{}),{},{purposes:M({},e.purposes),specialPurposes:M({},e.specialPurposes)})}},{key:"cloneVendorUrls",value:function(e){return e.map(function(n){return M({langId:n.langId,privacy:n.privacy},n.legIntClaim?{legIntClaim:n.legIntClaim}:{})})}},{key:"cloneVendor",value:function(e){return M(M(M(M(M(M(M(M(M(M(M({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}}:{}),typeof e.cookieMaxAgeSeconds=="number"||e.cookieMaxAgeSeconds===null?{cookieMaxAgeSeconds:e.cookieMaxAgeSeconds}:{}),e.usesCookies!==void 0?{usesCookies:e.usesCookies}:{}),e.policyUrl?{policyUrl:e.policyUrl}:{}),e.cookieRefresh!==void 0?{cookieRefresh:e.cookieRefresh}:{}),e.usesNonCookieAccess!==void 0?{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}:{})}},{key:"isInstanceOf",value:function(e){return Y(e)=="object"&&typeof e.narrowVendorsTo=="function"}}])}(ae),z=T;d(z,"LANGUAGE_CACHE",new Map),d(z,"CACHE",new Map),d(z,"LATEST_CACHE_KEY",0),d(z,"DEFAULT_LANGUAGE","EN"),d(z,"consentLanguages",new Z),d(z,"baseUrl_"),d(z,"latestFilename","vendor-list.json"),d(z,"versionedFilename","archives/vendor-list-v[VERSION].json"),d(z,"languageFilename","purposes-[LANG].json");var Re=function(i){function s(t){var e;return k(this,s),e=x(this,s),a(w(e),"isServiceSpecific_",!1),a(w(e),"supportOOB_",!0),a(w(e),"useNonStandardTexts_",!1),a(w(e),"purposeOneTreatment_",!1),a(w(e),"publisherCountryCode_","AA"),a(w(e),"version_",2),a(w(e),"consentScreen_",0),a(w(e),"policyVersion_",4),a(w(e),"consentLanguage_","EN"),a(w(e),"cmpId_",0),a(w(e),"cmpVersion_",0),a(w(e),"vendorListVersion_",0),a(w(e),"numCustomPurposes_",0),a(w(e),"gvl_",void 0),a(w(e),"created",void 0),a(w(e),"lastUpdated",void 0),a(w(e),"specialFeatureOptins",new K),a(w(e),"purposeConsents",new K),a(w(e),"purposeLegitimateInterests",new K),a(w(e),"publisherConsents",new K),a(w(e),"publisherLegitimateInterests",new K),a(w(e),"publisherCustomConsents",new K),a(w(e),"publisherCustomLegitimateInterests",new K),a(w(e),"customPurposes",void 0),a(w(e),"vendorConsents",new K),a(w(e),"vendorLegitimateInterests",new K),a(w(e),"vendorsDisclosed",new K),a(w(e),"vendorsAllowed",new K),a(w(e),"publisherRestrictions",new ge),t&&(e.gvl=t),e.updated(),e}return j(s,i),A(s,[{key:"gvl",get:function(){return this.gvl_},set:function(e){z.isInstanceOf(e)||(e=new z(e)),this.gvl_=e,this.publisherRestrictions.gvl=e}},{key:"cmpId",get:function(){return this.cmpId_},set:function(e){if(e=Number(e),Number.isInteger(e)&&e>1)this.cmpId_=e;else throw new ne("cmpId",e)}},{key:"cmpVersion",get:function(){return this.cmpVersion_},set:function(e){if(e=Number(e),Number.isInteger(e)&&e>-1)this.cmpVersion_=e;else throw new ne("cmpVersion",e)}},{key:"consentScreen",get:function(){return this.consentScreen_},set:function(e){if(e=Number(e),Number.isInteger(e)&&e>-1)this.consentScreen_=e;else throw new ne("consentScreen",e)}},{key:"consentLanguage",get:function(){return this.consentLanguage_},set:function(e){this.consentLanguage_=e}},{key:"publisherCountryCode",get:function(){return this.publisherCountryCode_},set:function(e){if(/^([A-z]){2}$/.test(e))this.publisherCountryCode_=e.toUpperCase();else throw new ne("publisherCountryCode",e)}},{key:"vendorListVersion",get:function(){return this.gvl?this.gvl.vendorListVersion:this.vendorListVersion_},set:function(e){if(e=Number(e)>>0,e<0)throw new ne("vendorListVersion",e);this.vendorListVersion_=e}},{key:"policyVersion",get:function(){return this.gvl?this.gvl.tcfPolicyVersion:this.policyVersion_},set:function(e){if(this.policyVersion_=parseInt(e,10),this.policyVersion_<0)throw new ne("policyVersion",e)}},{key:"version",get:function(){return this.version_},set:function(e){this.version_=parseInt(e,10)}},{key:"isServiceSpecific",get:function(){return this.isServiceSpecific_},set:function(e){this.isServiceSpecific_=e}},{key:"useNonStandardTexts",get:function(){return this.useNonStandardTexts_},set:function(e){this.useNonStandardTexts_=e}},{key:"supportOOB",get:function(){return this.supportOOB_},set:function(e){this.supportOOB_=e}},{key:"purposeOneTreatment",get:function(){return this.purposeOneTreatment_},set:function(e){this.purposeOneTreatment_=e}},{key:"setAllVendorConsents",value:function(){this.vendorConsents.set(this.gvl.vendors)}},{key:"unsetAllVendorConsents",value:function(){this.vendorConsents.empty()}},{key:"setAllVendorsDisclosed",value:function(){this.vendorsDisclosed.set(this.gvl.vendors)}},{key:"unsetAllVendorsDisclosed",value:function(){this.vendorsDisclosed.empty()}},{key:"setAllVendorsAllowed",value:function(){this.vendorsAllowed.set(this.gvl.vendors)}},{key:"unsetAllVendorsAllowed",value:function(){this.vendorsAllowed.empty()}},{key:"setAllVendorLegitimateInterests",value:function(){this.vendorLegitimateInterests.set(this.gvl.vendors)}},{key:"unsetAllVendorLegitimateInterests",value:function(){this.vendorLegitimateInterests.empty()}},{key:"setAllPurposeConsents",value:function(){this.purposeConsents.set(this.gvl.purposes)}},{key:"unsetAllPurposeConsents",value:function(){this.purposeConsents.empty()}},{key:"setAllPurposeLegitimateInterests",value:function(){this.purposeLegitimateInterests.set(this.gvl.purposes)}},{key:"unsetAllPurposeLegitimateInterests",value:function(){this.purposeLegitimateInterests.empty()}},{key:"setAllSpecialFeatureOptins",value:function(){this.specialFeatureOptins.set(this.gvl.specialFeatures)}},{key:"unsetAllSpecialFeatureOptins",value:function(){this.specialFeatureOptins.empty()}},{key:"setAll",value:function(){this.setAllVendorConsents(),this.setAllPurposeLegitimateInterests(),this.setAllSpecialFeatureOptins(),this.setAllPurposeConsents(),this.setAllVendorLegitimateInterests()}},{key:"unsetAll",value:function(){this.unsetAllVendorConsents(),this.unsetAllPurposeLegitimateInterests(),this.unsetAllSpecialFeatureOptins(),this.unsetAllPurposeConsents(),this.unsetAllVendorLegitimateInterests()}},{key:"numCustomPurposes",get:function(){var e=this.numCustomPurposes_;if(Y(this.customPurposes)=="object"){var n=Object.keys(this.customPurposes).sort(function(r,o){return Number(r)-Number(o)});e=parseInt(n.pop(),10)}return e},set:function(e){if(this.numCustomPurposes_=parseInt(e,10),this.numCustomPurposes_<0)throw new ne("numCustomPurposes",e)}},{key:"updated",value:function(){var e=new Date,n=new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()));this.created=n,this.lastUpdated=n}}])}(ae);d(Re,"consentLanguages",z.consentLanguages);var Ye=function(){function i(){k(this,i)}return A(i,null,[{key:"encode",value:function(t,e){var n="",r;return t=Ke.process(t,e),Array.isArray(e==null?void 0:e.segments)?r=e.segments:r=new pt(t,e)[""+t.version],r.forEach(function(o,u){var p="";u0)for(var r=e.getMaxVendorId(),o=function(){var I=u.toString();e.getRestrictions(u).forEach(function(V){var _=V.purposeId.toString();n[_]||(n[_]={}),n[_][I]=V.restrictionType})},u=1;u<=r;u++)o();return n}},{key:"createVectorField",value:function(e,n){return n?n.reduce(function(r,o){return r[String(o)]=e.has(Number(o)),r},{}):Fe(e).reduce(function(r,o){return r[o[0].toString(10)]=o[1],r},{})}}])}(Ue),gt=function(i){function s(t){var e;return k(this,s),e=x(this,s,[t]),delete e.outOfBand,e}return j(s,i),A(s,[{key:"createVectorField",value:function(e){return Fe(e).reduce(function(n,r){return n+=r[1]?"1":"0",n},"")}},{key:"createRestrictions",value:function(e){var n={};if(e.numRestrictions>0){var r=e.getMaxVendorId();e.getRestrictions().forEach(function(p){n[p.purposeId.toString()]="_".repeat(r)});for(var o=function(I){var V=I+1;e.getRestrictions(V).forEach(function(_){var L=_.restrictionType.toString(),N=_.purposeId.toString(),ee=n[N].substr(0,I),Le=n[N].substr(I+1);n[N]=ee+L+Le})},u=0;u3?o-3:0),p=3;p2&&arguments[2]!==void 0?arguments[2]:!1,n=arguments.length>3?arguments[3]:void 0;k(this,i),a(this,"callResponder",void 0),a(this,"isServiceSpecific",void 0),a(this,"numUpdates",0),this.throwIfInvalidInt(s,"cmpId",2),this.throwIfInvalidInt(t,"cmpVersion",0),E.cmpId=s,E.cmpVersion=t,E.tcfPolicyVersion=4,this.isServiceSpecific=!!e,this.callResponder=new St(n)}return A(i,[{key:"throwIfInvalidInt",value:function(t,e,n){if(!(typeof t=="number"&&Number.isInteger(t)&&t>=n))throw new Error("Invalid ".concat(e,": ").concat(t))}},{key:"update",value:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(E.disabled)throw new Error("CmpApi Disabled");E.cmpStatus=me.LOADED,e?(E.displayStatus=ye.VISIBLE,E.eventStatus=_e.CMP_UI_SHOWN):E.tcModel===void 0?(E.displayStatus=ye.DISABLED,E.eventStatus=_e.TC_LOADED):(E.displayStatus=ye.HIDDEN,E.eventStatus=_e.USER_ACTION_COMPLETE),E.gdprApplies=t!==null,E.gdprApplies?(t===""?(E.tcModel=new Re,E.tcModel.cmpId=E.cmpId,E.tcModel.cmpVersion=E.cmpVersion):E.tcModel=Ye.decode(t),E.tcModel.isServiceSpecific=this.isServiceSpecific,E.tcfPolicyVersion=Number(E.tcModel.policyVersion),E.tcString=t):E.tcModel=null,this.numUpdates===0?this.callResponder.purgeQueuedCalls():E.eventQueue.exec(),this.numUpdates++}},{key:"disable",value:function(){E.disabled=!0,E.cmpStatus=me.ERROR}}])}(),Lt=function(){function i(){k(this,i)}return A(i,[{key:"receiveMessage",value:function(t){var e=typeof t.data=="string",n={};try{e?n=JSON.parse(t.data):n=t.data}catch(V){}if(n&&n.__tcfapiCall){var r=n.__tcfapiCall.callId,o=n.__tcfapiCall.command,u=n.__tcfapiCall.parameter,p=n.__tcfapiCall.version,I=function(_,L){var N={__tcfapiReturn:{returnValue:_,success:L,callId:r,command:o}};t&&t.source&&t.source.postMessage&&t.source.postMessage(e?JSON.stringify(N):N,"*")};window.__tcfapi.apply(window,[o,p,I,u])}else n&&n.hasOwnProperty("OnetrustIABCookies")&&(n.OnetrustIABCookies==="blocked"&&(n.OnetrustIABCookies=null),window.OneTrust.updateConsentFromCookies(n.OnetrustIABCookies))}},{key:"initializeTCF",value:function(){window.removeEventListener("message",window.receiveOTMessage),delete window.receiveOTMessage,(window.attachEvent||window.addEventListener)("message",function(t){return be.receiveMessage(t)},!1)}},{key:"getGVLObject",value:function(t,e,n){if(e){var r=e.substr(e.lastIndexOf("/")+1);z.baseUrl=e.replace("/"+r,""),z.latestFilename=r}return new z(n,{language:t})}},{key:"getTCModelObject",value:function(t){return new Re(t)}},{key:"getTCStringObject",value:function(){return Ye}},{key:"getCmpApi",value:function(t,e,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return new It(t,e,n,r)}},{key:"getPurposeRestriction",value:function(t,e){return new re(t,e)}}])}(),be=new Lt;be.initializeTCF();var At={gvl:be.getGVLObject,tcModel:be.getTCModelObject,tcString:be.getTCStringObject,cmpApi:be.getCmpApi,purposeRestriction:be.getPurposeRestriction};window.otIabModule=U($({},window.otIabModule),{tcfSdkRef:At})})();})(); /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */