/*! Library version: 1.7.0. Commit hash: af73fcb */ var GppModule;(()=>{"use strict";var e={968:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.compute=void 0;const r=n(651),i=n(227),s=n(124),o=n(923);function a(e,{state:t,transformers:n={default:e=>e}}){if(!e||"object"!=typeof e||!e.type)return;let a;switch(e.type){case r.PrivacySignalType.CONSTANT_VALUE:a=(0,s.compute)(e);break;case r.PrivacySignalType.VENDORS:a=(0,i.compute)(e,t);break;case r.PrivacySignalType.PURPOSES:a=(0,o.compute)(e,t)}let d=n.default||(e=>e);return e.transformer&&(d=n[e.transformer]||d),void 0!==e.default&&null==a?d(e.default):d(a)}t.compute=function e(t,n){return Array.isArray(t)?t.map((e=>a(e,n))):t&&"object"==typeof t&&t.type?a(t,n):t&&"object"==typeof t?Object.keys(t).reduce(((r,i)=>(Array.isArray(n.pick)&&!n.pick.includes(i)||(r[i]=e(t[i],n)),r)),{}):void 0}},613:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.create=void 0;const r=n(651),i=n(124),s=n(923),o=n(227);t.create=function(e,t){switch(e){case r.PrivacySignalType.CONSTANT_VALUE:(0,i.validateParams)(t);break;case r.PrivacySignalType.VENDORS:(0,o.validateParams)(t);break;case r.PrivacySignalType.PURPOSES:(0,s.validateParams)(t);break;default:throw new Error(`Invalid privacy signal type: ${e}. Valid types are: ${Object.values(r.PrivacySignalType).join(", ")}`)}return Object.assign({type:e},t)}},349:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});const r=n(635);r.__exportStar(n(968),t),r.__exportStar(n(613),t),r.__exportStar(n(651),t),r.__exportStar(n(603),t)},506:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateParams=t.compute=void 0;const r=n(128);t.compute=function({value:e}){return(0,r.validOrUndefined)(e)},t.validateParams=function(e){if(!("value"in e))throw new Error("Missing required parameter: value");if("boolean"!=typeof e.value&&null!==e.value&&void 0!==e.value)throw new Error("Invalid parameter: value must be a boolean, null, or undefined");if(void 0!==e.transformer&&"string"!=typeof e.transformer)throw new Error("Invalid parameter: transformer must be a string, or undefined")}},710:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},124:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});const r=n(635);r.__exportStar(n(506),t),r.__exportStar(n(710),t)},603:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});const r=n(635);r.__exportStar(n(710),t),r.__exportStar(n(880),t),r.__exportStar(n(784),t)},923:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});const r=n(635);r.__exportStar(n(220),t),r.__exportStar(n(880),t)},220:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateParams=t.compute=void 0,t.compute=function({ids:e},t){return Array.isArray(e)?e.every((e=>{var n,r,i;return!0===(null===(i=null===(r=null===(n=null==t?void 0:t.userStatus)||void 0===n?void 0:n.purposes)||void 0===r?void 0:r[e])||void 0===i?void 0:i.enabled)})):void 0},t.validateParams=function(e){if(!("ids"in e))throw new Error("Missing required parameter: ids");if(!Array.isArray(e.ids))throw new Error("Invalid parameter: ids must be an array of strings");if(e.ids.some((e=>"string"!=typeof e)))throw new Error("Invalid parameter: ids must be an array of strings");if(void 0!==e.transformer&&"string"!=typeof e.transformer)throw new Error("Invalid parameter: transformer must be a string, or undefined")}},880:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},227:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});const r=n(635);r.__exportStar(n(420),t),r.__exportStar(n(784),t)},420:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateParams=t.compute=void 0,t.compute=function({ids:e},t){return Array.isArray(e)?e.every((e=>{var n,r,i;return!0===(null===(i=null===(r=null===(n=null==t?void 0:t.userStatus)||void 0===n?void 0:n.vendors)||void 0===r?void 0:r[e])||void 0===i?void 0:i.enabled)})):void 0},t.validateParams=function(e){if(!("ids"in e))throw new Error("Missing required parameter: ids");if(!Array.isArray(e.ids))throw new Error("Invalid parameter: ids must be an array of strings");if(e.ids.some((e=>"string"!=typeof e)))throw new Error("Invalid parameter: ids must be an array of strings");if(void 0!==e.transformer&&"string"!=typeof e.transformer)throw new Error("Invalid parameter: transformer must be a string, or undefined")}},784:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},651:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});const r=n(635);r.__exportStar(n(552),t),r.__exportStar(n(930),t)},552:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PrivacySignalType=void 0,function(e){e.CONSTANT_VALUE="constant",e.VENDORS="vendors",e.PURPOSES="purposes"}(t.PrivacySignalType||(t.PrivacySignalType={}))},930:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0})},128:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validOrUndefined=void 0,t.validOrUndefined=function(e){return"boolean"==typeof e||null==e?e:void 0}},635:(e,t,n)=>{n.r(t),n.d(t,{__addDisposableResource:()=>U,__assign:()=>s,__asyncDelegator:()=>D,__asyncGenerator:()=>C,__asyncValues:()=>w,__await:()=>P,__awaiter:()=>_,__classPrivateFieldGet:()=>f,__classPrivateFieldIn:()=>G,__classPrivateFieldSet:()=>m,__createBinding:()=>O,__decorate:()=>a,__disposeResources:()=>y,__esDecorate:()=>S,__exportStar:()=>T,__extends:()=>i,__generator:()=>h,__importDefault:()=>M,__importStar:()=>R,__makeTemplateObject:()=>v,__metadata:()=>u,__param:()=>d,__propKey:()=>E,__read:()=>g,__rest:()=>o,__rewriteRelativeImportExtension:()=>L,__runInitializers:()=>c,__setFunctionName:()=>l,__spread:()=>I,__spreadArray:()=>A,__spreadArrays:()=>p,__values:()=>N,default:()=>F});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var s=function(){return s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}function d(e,t){return function(n,r){t(n,r,e)}}function S(e,t,n,r,i,s){function o(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var a,d=r.kind,S="getter"===d?"get":"setter"===d?"set":"value",c=!t&&e?r.static?e:e.prototype:null,E=t||(c?Object.getOwnPropertyDescriptor(c,r.name):{}),l=!1,u=n.length-1;u>=0;u--){var _={};for(var h in r)_[h]="access"===h?{}:r[h];for(var h in r.access)_.access[h]=r.access[h];_.addInitializer=function(e){if(l)throw new TypeError("Cannot add initializers after decoration has completed");s.push(o(e||null))};var O=(0,n[u])("accessor"===d?{get:E.get,set:E.set}:E[S],_);if("accessor"===d){if(void 0===O)continue;if(null===O||"object"!=typeof O)throw new TypeError("Object expected");(a=o(O.get))&&(E.get=a),(a=o(O.set))&&(E.set=a),(a=o(O.init))&&i.unshift(a)}else(a=o(O))&&("field"===d?i.unshift(a):E[S]=a)}c&&Object.defineProperty(c,r.name,E),l=!0}function c(e,t,n){for(var r=arguments.length>2,i=0;i0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,s=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=s.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=s.return)&&n.call(s)}finally{if(i)throw i.error}}return o}function I(){for(var e=[],t=0;t1||a(e,t)}))},t&&(r[e]=t(r[e])))}function a(e,t){try{(n=i[e](t)).value instanceof P?Promise.resolve(n.value.v).then(d,S):c(s[0][2],n)}catch(e){c(s[0][3],e)}var n}function d(e){a("next",e)}function S(e){a("throw",e)}function c(e,t){e(t),s.shift(),s.length&&a(s[0][0],s[0][1])}}function D(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,i){t[r]=e[r]?function(t){return(n=!n)?{value:P(e[r](t)),done:!1}:i?i(t):t}:i}}function w(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=N(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,i,(t=e[n](t)).done,t.value)}))}}}function v(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var V=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function R(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&O(t,e,n);return V(t,e),t}function M(e){return e&&e.__esModule?e:{default:e}}function f(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function m(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n}function G(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function U(e,t,n){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var r,i;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose],n&&(i=r)}if("function"!=typeof r)throw new TypeError("Object not disposable.");i&&(r=function(){try{i.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}var b="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};function y(e){function t(t){e.error=e.hasError?new b(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var n,r=0;return function i(){for(;n=e.stack.pop();)try{if(!n.async&&1===r)return r=0,e.stack.push(n),Promise.resolve().then(i);if(n.dispose){var s=n.dispose.call(n.value);if(n.async)return r|=2,Promise.resolve(s).then(i,(function(e){return t(e),i()}))}else r|=1}catch(e){t(e)}if(1===r)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}function L(e,t){return"string"==typeof e&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,(function(e,n,r,i,s){return n?t?".jsx":".js":!r||i&&s?r+i+"."+s.toLowerCase()+"js":e})):e}const F={__extends:i,__assign:s,__rest:o,__decorate:a,__param:d,__esDecorate:S,__runInitializers:c,__propKey:E,__setFunctionName:l,__metadata:u,__awaiter:_,__generator:h,__createBinding:O,__exportStar:T,__values:N,__read:g,__spread:I,__spreadArrays:p,__spreadArray:A,__await:P,__asyncGenerator:C,__asyncDelegator:D,__asyncValues:w,__makeTemplateObject:v,__importStar:R,__importDefault:M,__classPrivateFieldGet:f,__classPrivateFieldSet:m,__classPrivateFieldIn:G,__addDisposableResource:U,__disposeResources:y,__rewriteRelativeImportExtension:L}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var s=t[r]={exports:{}};return e[r](s,s.exports,n),s.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r,i,s,o,a,d,S,c,E,l,u,_,h,O,T={};function N(){return N=Object.assign?Object.assign.bind():function(e){for(var t=1;tar,cmpUIHiddenHandler:()=>ur,cmpUIShownHandler:()=>lr,getGPPVariables:()=>Tr,getGppString:()=>_r,initGPPCmpApi:()=>Or,updateGPP:()=>Er});class g{constructor(e){this.gppVersion=void 0,this.cmpStatus=void 0,this.cmpDisplayStatus=void 0,this.signalStatus=void 0,this.supportedAPIs=void 0,this.cmpId=void 0,this.sectionList=void 0,this.applicableSections=void 0,this.gppString=void 0,this.parsedSections=void 0,this.gppVersion=e.gppVersion,this.cmpStatus=e.cmpStatus,this.cmpDisplayStatus=e.cmpDisplayStatus,this.signalStatus=e.signalStatus,this.supportedAPIs=e.supportedAPIs,this.cmpId=e.cmpId,this.sectionList=e.gppModel.getSectionIds(),this.applicableSections=e.applicableSections,this.gppString=e.gppModel.encode(),this.parsedSections=e.gppModel.toObject()}}class I{constructor(e,t,n){this.callback=void 0,this.parameter=void 0,this.success=!0,this.cmpApiContext=void 0,this.cmpApiContext=e,Object.assign(this,{callback:t,parameter:n})}execute(){try{return this.respond()}catch(e){return this.invokeCallback(null),null}}invokeCallback(e){var t=null!==e;this.callback&&this.callback(e,t)}}!function(e){e.ADD_EVENT_LISTENER="addEventListener",e.GET_FIELD="getField",e.GET_SECTION="getSection",e.HAS_SECTION="hasSection",e.PING="ping",e.REMOVE_EVENT_LISTENER="removeEventListener"}(r||(r={}));class p{constructor(e,t,n,r){this.eventName=void 0,this.listenerId=void 0,this.data=void 0,this.pingData=void 0,this.eventName=e,this.listenerId=t,this.data=n,this.pingData=r}}i=r.ADD_EVENT_LISTENER,s=r.GET_FIELD,o=r.GET_SECTION,a=r.HAS_SECTION,d=r.PING,S=r.REMOVE_EVENT_LISTENER;class A{}A[i]=class extends I{respond(){var e=this.cmpApiContext.eventQueue.add({callback:this.callback,parameter:this.parameter}),t=new p("listenerRegistered",e,!0,new g(this.cmpApiContext));this.invokeCallback(t)}},A[s]=class extends I{respond(){if(!this.parameter||0===this.parameter.length)throw new Error("
. parameter required");var e=this.parameter.split(".");if(2!=e.length)throw new Error("Field name must be in the format
.");var t=e[0],n=e[1],r=this.cmpApiContext.gppModel.getFieldValue(t,n);this.invokeCallback(r)}},A[o]=class extends I{respond(){if(!this.parameter||0===this.parameter.length)throw new Error("
parameter required");var e=null;this.cmpApiContext.gppModel.hasSection(this.parameter)&&(e=this.cmpApiContext.gppModel.getSection(this.parameter)),this.invokeCallback(e)}},A[a]=class extends I{respond(){if(!this.parameter||0===this.parameter.length)throw new Error("
[.version] parameter required");var e=this.cmpApiContext.gppModel.hasSection(this.parameter);this.invokeCallback(e)}},A[d]=class extends I{respond(){var e=new g(this.cmpApiContext);this.invokeCallback(e)}},A[S]=class extends I{respond(){var e=this.parameter,t=this.cmpApiContext.eventQueue.remove(e),n=new p("listenerRemoved",e,t,new g(this.cmpApiContext));this.invokeCallback(n)}},function(e){e.STUB="stub",e.LOADING="loading",e.LOADED="loaded",e.ERROR="error"}(c||(c={})),function(e){e.VISIBLE="visible",e.HIDDEN="hidden",e.DISABLED="disabled"}(E||(E={})),function(e){e.GPP_LOADED="gpploaded",e.CMP_UI_SHOWN="cmpuishown",e.USER_ACTION_COMPLETE="useractioncomplete"}(l||(l={})),function(e){e.NOT_READY="not ready",e.READY="ready"}(u||(u={}));class P{constructor(e,t){if(this.callQueue=void 0,this.customCommands=void 0,this.cmpApiContext=void 0,this.cmpApiContext=e,t){var n=r.ADD_EVENT_LISTENER;if(null!=t&&t[n])throw new Error("Built-In Custom Commmand for "+n+" not allowed");if(n=r.REMOVE_EVENT_LISTENER,null!=t&&t[n])throw new Error("Built-In Custom Commmand for "+n+" not allowed");this.customCommands=t}try{this.callQueue=window.__gpp()||[]}catch(e){this.callQueue=[]}finally{window.__gpp=this.apiCall.bind(this),this.purgeQueuedCalls()}}apiCall(e,t,n,r){if("string"!=typeof e)t(null,!1);else{if(t&&"function"!=typeof t)throw new Error("invalid callback function");this.isCustomCommand(e)?this.customCommands[e](t,n):this.isBuiltInCommand(e)?new A[e](this.cmpApiContext,t,n).execute():t&&t(null,!1)}}purgeQueuedCalls(){var e=this.callQueue;this.callQueue=[],e.forEach((e=>{window.__gpp(...e)}))}isCustomCommand(e){return this.customCommands&&"function"==typeof this.customCommands[e]}isBuiltInCommand(e){return void 0!==A[e]}}class C{constructor(e){this.eventQueue=new Map,this.queueNumber=1e3,this.cmpApiContext=void 0,this.cmpApiContext=e;try{for(var t=window.__gpp("events")||[],n=0;n{var i=new p(e,r,t,new g(this.cmpApiContext));n.callback(i,!0)}))}clear(){this.queueNumber=1e3,this.eventQueue.clear()}get size(){return this.eventQueue.size}}class D extends Error{constructor(e){super(e),this.name="InvalidFieldError"}}class w{constructor(){this.segments=void 0,this.encodedString=null,this.dirty=!1,this.decoded=!0,this.segments=this.initializeSegments()}hasField(e){this.decoded||(this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!0);for(var t=0;t=1)for(n.push(1);e>=2*n[0];)n.unshift(2*n[0]);for(var r="",i=0;i=s?(r+="1",e-=s):r+="0"}if(r.length>t)throw new V("Numeric value '"+e+"' is too large for a bit string length of '"+t+"'");for(;r.length0;)e+="0";for(;e.length%6>0;)e+="0";return e}}_=f,f.instance=new _;class m{constructor(){}static getInstance(){return this.instance}encode(e,t){for(var n="",r=0;r=1&&(t.push(1),e>=2)){t.push(2);for(var n=2;e>=t[n-1]+t[n-2];)t.push(t[n-1]+t[n-2]),n++}for(var r="1",i=t.length-1;i>=0;i--){var s=t[i];e>=s?(r="1"+r,e-=s):r="0"+r}return r}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<2||e.indexOf("11")!==e.length-2)throw new v("Undecodable FibonacciInteger '"+e+"'");for(var t=0,n=[],r=0;re-t));for(var t=[],n=0,r=0;re.length||t<0||t>n)throw new F("Invalid substring indexes "+t+":"+n+" for string of length "+e.length);return e.substring(t,n)}}class j extends L{constructor(e,t){void 0===t&&(t=!0),super(t),this.setValue(e)}encode(){try{return b.encode(this.value)}catch(e){throw new V(e)}}decode(e){try{this.value=b.decode(e)}catch(e){throw new v(e)}}substring(e,t){try{for(var n=R.decode(x.substring(e,t,t+12)),r=t+12,i=0;ie-t)))}}class H extends L{constructor(e,t,n){void 0===n&&(n=!0),super(n),this.bitStringLength=void 0,this.bitStringLength=e,this.setValue(t)}encode(){try{return R.encode(this.value,this.bitStringLength)}catch(e){throw new V(e)}}decode(e){try{this.value=R.decode(e)}catch(e){throw new v(e)}}substring(e,t){try{return x.substring(e,t,t+this.bitStringLength)}catch(e){throw new F(e)}}}class K{constructor(){this.fields=new Map}containsKey(e){return this.fields.has(e)}put(e,t){this.fields.set(e,t)}get(e){return this.fields.get(e)}getAll(){return new Map(this.fields)}reset(e){this.fields.clear(),e.getAll().forEach(((e,t)=>{this.fields.set(t,e)}))}}!function(e){e.ID="Id",e.VERSION="Version",e.SECTION_IDS="SectionIds"}(O||(O={}));var z,B=[O.ID,O.VERSION,O.SECTION_IDS];class Y{constructor(){this.fields=void 0,this.encodedString=null,this.dirty=!1,this.decoded=!0,this.fields=this.initializeFields()}validate(){}hasField(e){return this.fields.containsKey(e)}getFieldValue(e){if(this.decoded||(this.decodeSegment(this.encodedString,this.fields),this.dirty=!1,this.decoded=!0),this.fields.containsKey(e))return this.fields.get(e).getValue();throw new D("Invalid field: '"+e+"'")}setFieldValue(e,t){if(this.decoded||(this.decodeSegment(this.encodedString,this.fields),this.dirty=!1,this.decoded=!0),!this.fields.containsKey(e))throw new D(e+" not found");this.fields.get(e).setValue(t),this.dirty=!0}toObj(){for(var e={},t=this.getFieldNames(),n=0;n0&&this.decode(e)}getId(){return W.ID}getName(){return W.NAME}getVersion(){return W.VERSION}initializeSegments(){var e=[];return e.push(new k),e}decodeSection(e){var t=this.initializeSegments();if(null!=e&&0!==e.length)for(var n=e.split("."),r=0;rr&&t[r].decode(n[r]);return t}encodeSection(e){for(var t=[],n=0;n0;)e+="0";return e}}Q=ee,ee.instance=new Q;class te{static encode(e){e.sort(((e,t)=>e-t));for(var t=[],n=0;ne-t)))}}class re{constructor(e,t,n){this.key=void 0,this.type=void 0,this.ids=void 0,this.key=e,this.type=t,this.ids=n}getKey(){return this.key}setKey(e){this.key=e}getType(){return this.type}setType(e){this.type=e}getIds(){return this.ids}setIds(e){this.ids=e}}class ie extends L{constructor(e,t,n,r){void 0===r&&(r=!0),super(r),this.keyBitStringLength=void 0,this.typeBitStringLength=void 0,this.keyBitStringLength=e,this.typeBitStringLength=t,this.setValue(n)}encode(){try{var e=this.value,t="";t+=R.encode(e.length,12);for(var n=0;nt)throw new V("Too many values '"+e.length+"'");for(var n="",r=0;rthis.numElements&&(t=t.slice(0,this.numElements)),super.setValue(t)}}class ce{static encode(e,t){for(;e.length=65))throw new V("Unencodable FixedString '"+e+"'");n+=R.encode(e.charCodeAt(r)-65,6)}}return n}static decode(e){if(!/^[0-1]*$/.test(e)||e.length%6!=0)throw new v("Undecodable FixedString '"+e+"'");for(var t="",n=0;n0?this.value[this.value.length-1]:0,t=te.encode(this.value),n=t.length,r=e;if(n<=r)return R.encode(e,16)+"1"+t;for(var i=[],s=0,o=0;oe-t)))}}class ue extends Y{constructor(e){super(),this.base64UrlEncoder=ee.getInstance(),this.bitStringEncoder=m.getInstance(),e&&this.decode(e)}getFieldNames(){return q}initializeFields(){var e=new Date,t=new K;return t.put(z.VERSION.toString(),new H(6,Ne.VERSION)),t.put(z.CREATED.toString(),new ae(e)),t.put(z.LAST_UPDATED.toString(),new ae(e)),t.put(z.CMP_ID.toString(),new H(12,0)),t.put(z.CMP_VERSION.toString(),new H(12,0)),t.put(z.CONSENT_SCREEN.toString(),new H(6,0)),t.put(z.CONSENT_LANGUAGE.toString(),new Ee(2,"EN")),t.put(z.VENDOR_LIST_VERSION.toString(),new H(12,0)),t.put(z.POLICY_VERSION.toString(),new H(6,2)),t.put(z.IS_SERVICE_SPECIFIC.toString(),new se(!1)),t.put(z.USE_NON_STANDARD_STACKS.toString(),new se(!1)),t.put(z.SPECIAL_FEATURE_OPTINS.toString(),new Se([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(z.PURPOSE_CONSENTS.toString(),new Se([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(z.PURPOSE_LEGITIMATE_INTERESTS.toString(),new Se([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(z.PURPOSE_ONE_TREATMENT.toString(),new se(!1)),t.put(z.PUBLISHER_COUNTRY_CODE.toString(),new Ee(2,"AA")),t.put(z.VENDOR_CONSENTS.toString(),new le([])),t.put(z.VENDOR_LEGITIMATE_INTERESTS.toString(),new le([])),t.put(z.PUBLISHER_RESTRICTIONS.toString(),new ie(6,2,[],!1)),t}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new v("Unable to decode TcfEuV2CoreSegment '"+e+"'")}}}class _e extends L{constructor(e,t,n){void 0===n&&(n=!0),super(n),this.getLength=void 0,this.getLength=e,this.setValue(t)}encode(){try{return de.encode(this.value,this.getLength())}catch(e){throw new V(e)}}decode(e){try{this.value=de.decode(e)}catch(e){throw new v(e)}}substring(e,t){try{return x.substring(e,t,t+this.getLength())}catch(e){throw new F(e)}}getValue(){return[...super.getValue()]}setValue(e){for(var t=this.getLength(),n=[...e],r=n.length;rt&&(n=n.slice(0,t)),super.setValue([...n])}}class he extends Y{constructor(e){super(),this.base64UrlEncoder=ee.getInstance(),this.bitStringEncoder=m.getInstance(),e&&this.decode(e)}getFieldNames(){return $}initializeFields(){var e=new K;e.put(z.PUBLISHER_PURPOSES_SEGMENT_TYPE.toString(),new H(3,3)),e.put(z.PUBLISHER_CONSENTS.toString(),new Se([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),e.put(z.PUBLISHER_LEGITIMATE_INTERESTS.toString(),new Se([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1]));var t=new H(6,0);return e.put(z.NUM_CUSTOM_PURPOSES.toString(),t),e.put(z.PUBLISHER_CUSTOM_CONSENTS.toString(),new _e((()=>t.getValue()),[])),e.put(z.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS.toString(),new _e((()=>t.getValue()),[])),e}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new v("Unable to decode TcfEuV2PublisherPurposesSegment '"+e+"'")}}}class Oe extends Y{constructor(e){super(),this.base64UrlEncoder=ee.getInstance(),this.bitStringEncoder=m.getInstance(),e&&this.decode(e)}getFieldNames(){return J}initializeFields(){var e=new K;return e.put(z.VENDORS_ALLOWED_SEGMENT_TYPE.toString(),new H(3,2)),e.put(z.VENDORS_ALLOWED.toString(),new le([])),e}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new v("Unable to decode TcfEuV2VendorsAllowedSegment '"+e+"'")}}}class Te extends Y{constructor(e){super(),this.base64UrlEncoder=ee.getInstance(),this.bitStringEncoder=m.getInstance(),e&&this.decode(e)}getFieldNames(){return Z}initializeFields(){var e=new K;return e.put(z.VENDORS_DISCLOSED_SEGMENT_TYPE.toString(),new H(3,1)),e.put(z.VENDORS_DISCLOSED.toString(),new le([])),e}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new v("Unable to decode TcfEuV2VendorsDisclosedSegment '"+e+"'")}}}class Ne extends w{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Ne.ID}getName(){return Ne.NAME}getVersion(){return Ne.VERSION}initializeSegments(){var e=[];return e.push(new ue),e.push(new he),e.push(new Oe),e.push(new Te),e}decodeSection(e){var t=this.initializeSegments();if(null!=e&&0!==e.length)for(var n=e.split("."),r=0;r="A"&&s<="H")t[0].decode(n[r]);else if(s>="I"&&s<="P")t[3].decode(n[r]);else if(s>="Q"&&s<="X")t[2].decode(n[r]);else{if(!(s>="Y"&&s<="Z"||s>="a"&&s<="f"))throw new v("Unable to decode TcfEuV2 segment '"+i+"'");t[1].decode(n[r])}}}return t}encodeSection(e){var t=[];e.length>=1&&(t.push(e[0].encode()),this.getFieldValue(z.IS_SERVICE_SPECIFIC)?e.length>=2&&t.push(e[1].encode()):e.length>=2&&(t.push(e[2].encode()),e.length>=3&&t.push(e[3].encode())));return t.join(".")}setFieldValue(e,t){if(super.setFieldValue(e,t),e!==z.CREATED&&e!==z.LAST_UPDATED){var n=new Date;super.setFieldValue(z.CREATED,n),super.setFieldValue(z.LAST_UPDATED,n)}}}Ne.ID=2,Ne.VERSION=2,Ne.NAME="tcfeuv2",function(e){e.VERSION="Version",e.CREATED="Created",e.LAST_UPDATED="LastUpdated",e.CMP_ID="CmpId",e.CMP_VERSION="CmpVersion",e.CONSENT_SCREEN="ConsentScreen",e.CONSENT_LANGUAGE="ConsentLanguage",e.VENDOR_LIST_VERSION="VendorListVersion",e.TCF_POLICY_VERSION="TcfPolicyVersion",e.USE_NON_STANDARD_STACKS="UseNonStandardStacks",e.SPECIAL_FEATURE_EXPRESS_CONSENT="SpecialFeatureExpressConsent",e.PUB_PURPOSES_SEGMENT_TYPE="PubPurposesSegmentType",e.PURPOSES_EXPRESS_CONSENT="PurposesExpressConsent",e.PURPOSES_IMPLIED_CONSENT="PurposesImpliedConsent",e.VENDOR_EXPRESS_CONSENT="VendorExpressConsent",e.VENDOR_IMPLIED_CONSENT="VendorImpliedConsent",e.PUB_RESTRICTIONS="PubRestrictions",e.PUB_PURPOSES_EXPRESS_CONSENT="PubPurposesExpressConsent",e.PUB_PURPOSES_IMPLIED_CONSENT="PubPurposesImpliedConsent",e.NUM_CUSTOM_PURPOSES="NumCustomPurposes",e.CUSTOM_PURPOSES_EXPRESS_CONSENT="CustomPurposesExpressConsent",e.CUSTOM_PURPOSES_IMPLIED_CONSENT="CustomPurposesImpliedConsent",e.DISCLOSED_VENDORS_SEGMENT_TYPE="DisclosedVendorsSegmentType",e.DISCLOSED_VENDORS="DisclosedVendors"}(X||(X={}));var ge,Ie=[X.VERSION,X.CREATED,X.LAST_UPDATED,X.CMP_ID,X.CMP_VERSION,X.CONSENT_SCREEN,X.CONSENT_LANGUAGE,X.VENDOR_LIST_VERSION,X.TCF_POLICY_VERSION,X.USE_NON_STANDARD_STACKS,X.SPECIAL_FEATURE_EXPRESS_CONSENT,X.PURPOSES_EXPRESS_CONSENT,X.PURPOSES_IMPLIED_CONSENT,X.VENDOR_EXPRESS_CONSENT,X.VENDOR_IMPLIED_CONSENT,X.PUB_RESTRICTIONS],pe=[X.PUB_PURPOSES_SEGMENT_TYPE,X.PUB_PURPOSES_EXPRESS_CONSENT,X.PUB_PURPOSES_IMPLIED_CONSENT,X.NUM_CUSTOM_PURPOSES,X.CUSTOM_PURPOSES_EXPRESS_CONSENT,X.CUSTOM_PURPOSES_IMPLIED_CONSENT],Ae=[X.DISCLOSED_VENDORS_SEGMENT_TYPE,X.DISCLOSED_VENDORS];class Pe extends Y{constructor(e){super(),this.base64UrlEncoder=f.getInstance(),this.bitStringEncoder=m.getInstance(),e&&this.decode(e)}getFieldNames(){return Ie}initializeFields(){var e=new Date,t=new K;return t.put(X.VERSION.toString(),new H(6,we.VERSION)),t.put(X.CREATED.toString(),new ae(e)),t.put(X.LAST_UPDATED.toString(),new ae(e)),t.put(X.CMP_ID.toString(),new H(12,0)),t.put(X.CMP_VERSION.toString(),new H(12,0)),t.put(X.CONSENT_SCREEN.toString(),new H(6,0)),t.put(X.CONSENT_LANGUAGE.toString(),new Ee(2,"EN")),t.put(X.VENDOR_LIST_VERSION.toString(),new H(12,0)),t.put(X.TCF_POLICY_VERSION.toString(),new H(6,2)),t.put(X.USE_NON_STANDARD_STACKS.toString(),new se(!1)),t.put(X.SPECIAL_FEATURE_EXPRESS_CONSENT.toString(),new Se([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(X.PURPOSES_EXPRESS_CONSENT.toString(),new Se([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(X.PURPOSES_IMPLIED_CONSENT.toString(),new Se([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(X.VENDOR_EXPRESS_CONSENT.toString(),new le([])),t.put(X.VENDOR_IMPLIED_CONSENT.toString(),new le([])),t.put(X.PUB_RESTRICTIONS.toString(),new ie(6,2,[],!1)),t}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new v("Unable to decode TcfCaV1CoreSegment '"+e+"'")}}}class Ce extends Y{constructor(e){super(),this.base64UrlEncoder=f.getInstance(),this.bitStringEncoder=m.getInstance(),e&&this.decode(e)}getFieldNames(){return pe}initializeFields(){var e=new K;e.put(X.PUB_PURPOSES_SEGMENT_TYPE.toString(),new H(3,3)),e.put(X.PUB_PURPOSES_EXPRESS_CONSENT.toString(),new Se([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),e.put(X.PUB_PURPOSES_IMPLIED_CONSENT.toString(),new Se([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1]));var t=new H(6,0);return e.put(X.NUM_CUSTOM_PURPOSES.toString(),t),e.put(X.CUSTOM_PURPOSES_EXPRESS_CONSENT.toString(),new _e((()=>t.getValue()),[])),e.put(X.CUSTOM_PURPOSES_IMPLIED_CONSENT.toString(),new _e((()=>t.getValue()),[])),e}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new v("Unable to decode TcfCaV1PublisherPurposesSegment '"+e+"'")}}}class De extends Y{constructor(e){super(),this.base64UrlEncoder=ee.getInstance(),this.bitStringEncoder=m.getInstance(),e&&this.decode(e)}getFieldNames(){return Ae}initializeFields(){var e=new K;return e.put(X.DISCLOSED_VENDORS_SEGMENT_TYPE.toString(),new H(3,1)),e.put(X.DISCLOSED_VENDORS.toString(),new le([])),e}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new v("Unable to decode HeaderV1CoreSegment '"+e+"'")}}}class we extends w{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return we.ID}getName(){return we.NAME}getVersion(){return we.VERSION}initializeSegments(){var e=[];return e.push(new Pe),e.push(new Ce),e.push(new De),e}decodeSection(e){var t=this.initializeSegments();if(null!=e&&0!==e.length)for(var n=e.split("."),r=0;r="A"&&s<="H")t[0].decode(n[r]);else if(s>="I"&&s<="P")t[2].decode(n[r]);else{if(!(s>="Y"&&s<="Z"||s>="a"&&s<="f"))throw new v("Unable to decode TcfCaV1 segment '"+i+"'");t[1].decode(n[r])}}}return t}encodeSection(e){var t=[];return t.push(e[0].encode()),t.push(e[1].encode()),this.getFieldValue(X.DISCLOSED_VENDORS).length>0&&t.push(e[2].encode()),t.join(".")}setFieldValue(e,t){if(super.setFieldValue(e,t),e!==X.CREATED&&e!==X.LAST_UPDATED){var n=new Date;super.setFieldValue(X.CREATED,n),super.setFieldValue(X.LAST_UPDATED,n)}}}we.ID=5,we.VERSION=1,we.NAME="tcfcav1";class ve{constructor(e,t){this.validator=void 0,this.value=null,this.validator=t||new class{test(e){return!0}},this.setValue(e)}hasValue(){return null!=this.value}getValue(){return this.value}setValue(e){e?this.value=e.charAt(0):e=null}}class Ve{constructor(e,t){this.validator=void 0,this.value=null,this.validator=t||new class{test(e){return!0}},this.setValue(e)}hasValue(){return null!=this.value}getValue(){return this.value}setValue(e){this.value=e}}class Re{constructor(){this.fields=new Map}containsKey(e){return this.fields.has(e)}put(e,t){this.fields.set(e,t)}get(e){return this.fields.get(e)}getAll(){return new Map(this.fields)}reset(e){this.fields.clear(),e.getAll().forEach(((e,t)=>{this.fields.set(t,e)}))}}!function(e){e.VERSION="Version",e.NOTICE="Notice",e.OPT_OUT_SALE="OptOutSale",e.LSPA_COVERED="LspaCovered"}(ge||(ge={}));var Me,fe=[ge.VERSION,ge.NOTICE,ge.OPT_OUT_SALE,ge.LSPA_COVERED];class me extends Y{constructor(e){super(),e&&this.decode(e)}getFieldNames(){return fe}initializeFields(){var e=new class{test(e){return"-"===e||"Y"===e||"N"===e}},t=new Re;return t.put(ge.VERSION,new Ve(Ge.VERSION)),t.put(ge.NOTICE,new ve("-",e)),t.put(ge.OPT_OUT_SALE,new ve("-",e)),t.put(ge.LSPA_COVERED,new ve("-",e)),t}encodeSegment(e){var t="";return t+=e.get(ge.VERSION).getValue(),t+=e.get(ge.NOTICE).getValue(),t+=e.get(ge.OPT_OUT_SALE).getValue(),t+=e.get(ge.LSPA_COVERED).getValue()}decodeSegment(e,t){if(null==e||4!=e.length)throw new v("Unable to decode UspV1CoreSegment '"+e+"'");try{t.get(ge.VERSION).setValue(parseInt(e.substring(0,1))),t.get(ge.NOTICE).setValue(e.charAt(1)),t.get(ge.OPT_OUT_SALE).setValue(e.charAt(2)),t.get(ge.LSPA_COVERED).setValue(e.charAt(3))}catch(t){throw new v("Unable to decode UspV1CoreSegment '"+e+"'")}}}class Ge extends w{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Ge.ID}getName(){return Ge.NAME}getVersion(){return Ge.VERSION}initializeSegments(){var e=[];return e.push(new me),e}decodeSection(e){var t=this.initializeSegments();if(null!=e&&0!==e.length)for(var n=e.split("."),r=0;rr&&t[r].decode(n[r]);return t}encodeSection(e){for(var t=[],n=0;nn)throw new V("Too many values '"+e.length+"'");for(var r="",i=0;it*n)throw new v("Undecodable FixedIntegerList '"+e+"'");if(e.length%t!=0)throw new v("Undecodable FixedIntegerList '"+e+"'");for(;e.lengtht*n&&(e=e.substring(0,t*n));for(var r=[],i=0;ithis.numElements&&(t=t.slice(0,this.numElements)),super.setValue(t)}}class xe extends Y{constructor(e){super(),this.base64UrlEncoder=f.getInstance(),this.bitStringEncoder=m.getInstance(),e&&this.decode(e)}getFieldNames(){return be}initializeFields(){var e=new class{test(e){return e>=0&&e<=2}},t=new class{test(e){return e>=1&&e<=2}},n=new class{test(e){for(var t=0;t2)return!1}return!0}},r=new K;return r.put(Me.VERSION.toString(),new H(6,He.VERSION)),r.put(Me.SHARING_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(Me.SALE_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(Me.SHARING_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(Me.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(Me.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(Me.SENSITIVE_DATA_LIMIT_USE_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(Me.SALE_OPT_OUT.toString(),new H(2,0).withValidator(e)),r.put(Me.SHARING_OPT_OUT.toString(),new H(2,0).withValidator(e)),r.put(Me.TARGETED_ADVERTISING_OPT_OUT.toString(),new H(2,0).withValidator(e)),r.put(Me.SENSITIVE_DATA_PROCESSING.toString(),new Fe(2,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]).withValidator(n)),r.put(Me.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Fe(2,[0,0,0]).withValidator(n)),r.put(Me.PERSONAL_DATA_CONSENTS.toString(),new H(2,0).withValidator(e)),r.put(Me.MSPA_COVERED_TRANSACTION.toString(),new H(2,1).withValidator(t)),r.put(Me.MSPA_OPT_OUT_OPTION_MODE.toString(),new H(2,0).withValidator(e)),r.put(Me.MSPA_SERVICE_PROVIDER_MODE.toString(),new H(2,0).withValidator(e)),r}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new v("Unable to decode UsNatCoreSegment '"+e+"'")}}}class je extends Y{constructor(e){super(),this.base64UrlEncoder=f.getInstance(),this.bitStringEncoder=m.getInstance(),e&&this.decode(e)}getFieldNames(){return ye}initializeFields(){var e=new K;return e.put(Me.GPC_SEGMENT_TYPE.toString(),new H(2,1)),e.put(Me.GPC_SEGMENT_INCLUDED.toString(),new se(!0)),e.put(Me.GPC.toString(),new se(!1)),e}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new v("Unable to decode UsNatGpcSegment '"+e+"'")}}}class He extends w{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return He.ID}getName(){return He.NAME}getVersion(){return He.VERSION}initializeSegments(){var e=[];return e.push(new xe),e.push(new je),e}decodeSection(e){var t=this.initializeSegments();if(null!=e&&0!==e.length){var n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(Me.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(Me.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){var t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&!0===e[1].getFieldValue(Me.GPC_SEGMENT_INCLUDED)&&t.push(e[1].encode())),t.join(".")}}He.ID=7,He.VERSION=1,He.NAME="usnat",function(e){e.VERSION="Version",e.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",e.SHARING_OPT_OUT_NOTICE="SharingOptOutNotice",e.SENSITIVE_DATA_LIMIT_USE_NOTICE="SensitiveDataLimitUseNotice",e.SALE_OPT_OUT="SaleOptOut",e.SHARING_OPT_OUT="SharingOptOut",e.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",e.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",e.PERSONAL_DATA_CONSENTS="PersonalDataConsents",e.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",e.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",e.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",e.GPC_SEGMENT_TYPE="GpcSegmentType",e.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",e.GPC="Gpc"}(Ue||(Ue={}));var Ke,ze=[Ue.VERSION,Ue.SALE_OPT_OUT_NOTICE,Ue.SHARING_OPT_OUT_NOTICE,Ue.SENSITIVE_DATA_LIMIT_USE_NOTICE,Ue.SALE_OPT_OUT,Ue.SHARING_OPT_OUT,Ue.SENSITIVE_DATA_PROCESSING,Ue.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,Ue.PERSONAL_DATA_CONSENTS,Ue.MSPA_COVERED_TRANSACTION,Ue.MSPA_OPT_OUT_OPTION_MODE,Ue.MSPA_SERVICE_PROVIDER_MODE],Be=[Ue.GPC_SEGMENT_TYPE,Ue.GPC];class Ye extends Y{constructor(e){super(),this.base64UrlEncoder=f.getInstance(),this.bitStringEncoder=m.getInstance(),e&&this.decode(e)}getFieldNames(){return ze}initializeFields(){var e=new class{test(e){return e>=0&&e<=2}},t=new class{test(e){return e>=1&&e<=2}},n=new class{test(e){for(var t=0;t2)return!1}return!0}},r=new K;return r.put(Ue.VERSION.toString(),new H(6,We.VERSION)),r.put(Ue.SALE_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(Ue.SHARING_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(Ue.SENSITIVE_DATA_LIMIT_USE_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(Ue.SALE_OPT_OUT.toString(),new H(2,0).withValidator(e)),r.put(Ue.SHARING_OPT_OUT.toString(),new H(2,0).withValidator(e)),r.put(Ue.SENSITIVE_DATA_PROCESSING.toString(),new Fe(2,[0,0,0,0,0,0,0,0,0]).withValidator(n)),r.put(Ue.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Fe(2,[0,0]).withValidator(n)),r.put(Ue.PERSONAL_DATA_CONSENTS.toString(),new H(2,0).withValidator(e)),r.put(Ue.MSPA_COVERED_TRANSACTION.toString(),new H(2,1).withValidator(t)),r.put(Ue.MSPA_OPT_OUT_OPTION_MODE.toString(),new H(2,0).withValidator(e)),r.put(Ue.MSPA_SERVICE_PROVIDER_MODE.toString(),new H(2,0).withValidator(e)),r}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new v("Unable to decode UsCaCoreSegment '"+e+"'")}}}class ke extends Y{constructor(e){super(),this.base64UrlEncoder=f.getInstance(),this.bitStringEncoder=m.getInstance(),e&&this.decode(e)}getFieldNames(){return Be}initializeFields(){var e=new K;return e.put(Ue.GPC_SEGMENT_TYPE.toString(),new H(2,1)),e.put(Ue.GPC_SEGMENT_INCLUDED.toString(),new se(!0)),e.put(Ue.GPC.toString(),new se(!1)),e}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new v("Unable to decode UsCaGpcSegment '"+e+"'")}}}class We extends w{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return We.ID}getName(){return We.NAME}getVersion(){return We.VERSION}initializeSegments(){var e=[];return e.push(new Ye),e.push(new ke),e}decodeSection(e){var t=this.initializeSegments();if(null!=e&&0!==e.length){var n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(Ue.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(Ue.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){var t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&!0===e[1].getFieldValue(Ue.GPC_SEGMENT_INCLUDED)&&t.push(e[1].encode())),t.join(".")}}We.ID=8,We.VERSION=1,We.NAME="usca",function(e){e.VERSION="Version",e.SHARING_NOTICE="SharingNotice",e.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",e.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",e.SALE_OPT_OUT="SaleOptOut",e.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",e.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",e.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",e.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",e.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",e.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"}(Ke||(Ke={}));var Qe,Xe=[Ke.VERSION,Ke.SHARING_NOTICE,Ke.SALE_OPT_OUT_NOTICE,Ke.TARGETED_ADVERTISING_OPT_OUT_NOTICE,Ke.SALE_OPT_OUT,Ke.TARGETED_ADVERTISING_OPT_OUT,Ke.SENSITIVE_DATA_PROCESSING,Ke.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,Ke.MSPA_COVERED_TRANSACTION,Ke.MSPA_OPT_OUT_OPTION_MODE,Ke.MSPA_SERVICE_PROVIDER_MODE];class qe extends Y{constructor(e){super(),this.base64UrlEncoder=f.getInstance(),this.bitStringEncoder=m.getInstance(),e&&this.decode(e)}getFieldNames(){return Xe}initializeFields(){var e=new class{test(e){return e>=0&&e<=2}},t=new class{test(e){return e>=1&&e<=2}},n=new class{test(e){for(var t=0;t2)return!1}return!0}},r=new K;return r.put(Ke.VERSION.toString(),new H(6,$e.VERSION)),r.put(Ke.SHARING_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(Ke.SALE_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(Ke.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(Ke.SALE_OPT_OUT.toString(),new H(2,0).withValidator(e)),r.put(Ke.TARGETED_ADVERTISING_OPT_OUT.toString(),new H(2,0).withValidator(e)),r.put(Ke.SENSITIVE_DATA_PROCESSING.toString(),new Fe(2,[0,0,0,0,0,0,0,0]).withValidator(n)),r.put(Ke.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new H(2,0).withValidator(e)),r.put(Ke.MSPA_COVERED_TRANSACTION.toString(),new H(2,1).withValidator(t)),r.put(Ke.MSPA_OPT_OUT_OPTION_MODE.toString(),new H(2,0).withValidator(e)),r.put(Ke.MSPA_SERVICE_PROVIDER_MODE.toString(),new H(2,0).withValidator(e)),r}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new v("Unable to decode UsVaCoreSegment '"+e+"'")}}}class $e extends w{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return $e.ID}getName(){return $e.NAME}getVersion(){return $e.VERSION}initializeSegments(){var e=[];return e.push(new qe),e}decodeSection(e){var t=this.initializeSegments();if(null!=e&&0!==e.length)for(var n=e.split("."),r=0;rr&&t[r].decode(n[r]);return t}encodeSection(e){for(var t=[],n=0;n=0&&e<=2}},t=new class{test(e){return e>=1&&e<=2}},n=new class{test(e){for(var t=0;t2)return!1}return!0}},r=new K;return r.put(Qe.VERSION.toString(),new H(6,rt.VERSION)),r.put(Qe.SHARING_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(Qe.SALE_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(Qe.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(Qe.SALE_OPT_OUT.toString(),new H(2,0).withValidator(e)),r.put(Qe.TARGETED_ADVERTISING_OPT_OUT.toString(),new H(2,0).withValidator(e)),r.put(Qe.SENSITIVE_DATA_PROCESSING.toString(),new Fe(2,[0,0,0,0,0,0,0]).withValidator(n)),r.put(Qe.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new H(2,0).withValidator(e)),r.put(Qe.MSPA_COVERED_TRANSACTION.toString(),new H(2,1).withValidator(t)),r.put(Qe.MSPA_OPT_OUT_OPTION_MODE.toString(),new H(2,0).withValidator(e)),r.put(Qe.MSPA_SERVICE_PROVIDER_MODE.toString(),new H(2,0).withValidator(e)),r}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new v("Unable to decode UsCoCoreSegment '"+e+"'")}}}class nt extends Y{constructor(e){super(),this.base64UrlEncoder=f.getInstance(),this.bitStringEncoder=m.getInstance(),e&&this.decode(e)}getFieldNames(){return et}initializeFields(){var e=new K;return e.put(Qe.GPC_SEGMENT_TYPE.toString(),new H(2,1)),e.put(Qe.GPC_SEGMENT_INCLUDED.toString(),new se(!0)),e.put(Qe.GPC.toString(),new se(!1)),e}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new v("Unable to decode UsCoGpcSegment '"+e+"'")}}}class rt extends w{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return rt.ID}getName(){return rt.NAME}getVersion(){return rt.VERSION}initializeSegments(){var e=[];return e.push(new tt),e.push(new nt),e}decodeSection(e){var t=this.initializeSegments();if(null!=e&&0!==e.length){var n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(Qe.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(Qe.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){var t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&!0===e[1].getFieldValue(Qe.GPC_SEGMENT_INCLUDED)&&t.push(e[1].encode())),t.join(".")}}rt.ID=10,rt.VERSION=1,rt.NAME="usco",function(e){e.VERSION="Version",e.SHARING_NOTICE="SharingNotice",e.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",e.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",e.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE="SensitiveDataProcessingOptOutNotice",e.SALE_OPT_OUT="SaleOptOut",e.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",e.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",e.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",e.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",e.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",e.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"}(Je||(Je={}));var it,st=[Je.VERSION,Je.SHARING_NOTICE,Je.SALE_OPT_OUT_NOTICE,Je.TARGETED_ADVERTISING_OPT_OUT_NOTICE,Je.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE,Je.SALE_OPT_OUT,Je.TARGETED_ADVERTISING_OPT_OUT,Je.SENSITIVE_DATA_PROCESSING,Je.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,Je.MSPA_COVERED_TRANSACTION,Je.MSPA_OPT_OUT_OPTION_MODE,Je.MSPA_SERVICE_PROVIDER_MODE];class ot extends Y{constructor(e){super(),this.base64UrlEncoder=f.getInstance(),this.bitStringEncoder=m.getInstance(),e&&this.decode(e)}getFieldNames(){return st}initializeFields(){var e=new class{test(e){return e>=0&&e<=2}},t=new class{test(e){return e>=1&&e<=2}},n=new class{test(e){for(var t=0;t2)return!1}return!0}},r=new K;return r.put(Je.VERSION.toString(),new H(6,at.VERSION)),r.put(Je.SHARING_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(Je.SALE_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(Je.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(Je.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(Je.SALE_OPT_OUT.toString(),new H(2,0).withValidator(e)),r.put(Je.TARGETED_ADVERTISING_OPT_OUT.toString(),new H(2,0).withValidator(e)),r.put(Je.SENSITIVE_DATA_PROCESSING.toString(),new Fe(2,[0,0,0,0,0,0,0,0]).withValidator(n)),r.put(Je.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new H(2,0).withValidator(e)),r.put(Je.MSPA_COVERED_TRANSACTION.toString(),new H(2,1).withValidator(t)),r.put(Je.MSPA_OPT_OUT_OPTION_MODE.toString(),new H(2,0).withValidator(e)),r.put(Je.MSPA_SERVICE_PROVIDER_MODE.toString(),new H(2,0).withValidator(e)),r}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new v("Unable to decode UsUtCoreSegment '"+e+"'")}}}class at extends w{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return at.ID}getName(){return at.NAME}getVersion(){return at.VERSION}initializeSegments(){var e=[];return e.push(new ot),e}decodeSection(e){var t=this.initializeSegments();if(null!=e&&0!==e.length)for(var n=e.split("."),r=0;rr&&t[r].decode(n[r]);return t}encodeSection(e){for(var t=[],n=0;n=0&&e<=2}},t=new class{test(e){return e>=1&&e<=2}},n=new class{test(e){for(var t=0;t2)return!1}return!0}},r=new K;return r.put(it.VERSION.toString(),new H(6,ut.VERSION)),r.put(it.SHARING_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(it.SALE_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(it.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(it.SALE_OPT_OUT.toString(),new H(2,0).withValidator(e)),r.put(it.TARGETED_ADVERTISING_OPT_OUT.toString(),new H(2,0).withValidator(e)),r.put(it.SENSITIVE_DATA_PROCESSING.toString(),new Fe(2,[0,0,0,0,0,0,0,0]).withValidator(n)),r.put(it.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Fe(2,[0,0,0]).withValidator(n)),r.put(it.MSPA_COVERED_TRANSACTION.toString(),new H(2,1).withValidator(t)),r.put(it.MSPA_OPT_OUT_OPTION_MODE.toString(),new H(2,0).withValidator(e)),r.put(it.MSPA_SERVICE_PROVIDER_MODE.toString(),new H(2,0).withValidator(e)),r}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new v("Unable to decode UsCtCoreSegment '"+e+"'")}}}class lt extends Y{constructor(e){super(),this.base64UrlEncoder=f.getInstance(),this.bitStringEncoder=m.getInstance(),e&&this.decode(e)}getFieldNames(){return ct}initializeFields(){var e=new K;return e.put(it.GPC_SEGMENT_TYPE.toString(),new H(2,1)),e.put(it.GPC_SEGMENT_INCLUDED.toString(),new se(!0)),e.put(it.GPC.toString(),new se(!1)),e}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new v("Unable to decode UsCtGpcSegment '"+e+"'")}}}class ut extends w{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return ut.ID}getName(){return ut.NAME}getVersion(){return ut.VERSION}initializeSegments(){var e=[];return e.push(new Et),e.push(new lt),e}decodeSection(e){var t=this.initializeSegments();if(null!=e&&0!==e.length){var n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(it.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(it.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){var t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&!0===e[1].getFieldValue(it.GPC_SEGMENT_INCLUDED)&&t.push(e[1].encode())),t.join(".")}}ut.ID=12,ut.VERSION=1,ut.NAME="usct",function(e){e.VERSION="Version",e.PROCESSING_NOTICE="ProcessingNotice",e.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",e.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",e.SALE_OPT_OUT="SaleOptOut",e.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",e.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",e.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",e.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",e.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",e.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",e.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode"}(dt||(dt={}));var _t,ht=[dt.VERSION,dt.PROCESSING_NOTICE,dt.SALE_OPT_OUT_NOTICE,dt.TARGETED_ADVERTISING_OPT_OUT_NOTICE,dt.SALE_OPT_OUT,dt.TARGETED_ADVERTISING_OPT_OUT,dt.SENSITIVE_DATA_PROCESSING,dt.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,dt.ADDITIONAL_DATA_PROCESSING_CONSENT,dt.MSPA_COVERED_TRANSACTION,dt.MSPA_OPT_OUT_OPTION_MODE,dt.MSPA_SERVICE_PROVIDER_MODE];class Ot extends Y{constructor(e){super(),this.base64UrlEncoder=f.getInstance(),this.bitStringEncoder=m.getInstance(),e&&this.decode(e)}getFieldNames(){return ht}initializeFields(){var e=new class{test(e){return e>=0&&e<=2}},t=new class{test(e){return e>=1&&e<=2}},n=new class{test(e){for(var t=0;t2)return!1}return!0}},r=new K;return r.put(dt.VERSION.toString(),new H(6,Tt.VERSION)),r.put(dt.PROCESSING_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(dt.SALE_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(dt.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(dt.SALE_OPT_OUT.toString(),new H(2,0).withValidator(e)),r.put(dt.TARGETED_ADVERTISING_OPT_OUT.toString(),new H(2,0).withValidator(e)),r.put(dt.SENSITIVE_DATA_PROCESSING.toString(),new Fe(2,[0,0,0,0,0,0,0,0]).withValidator(n)),r.put(dt.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Fe(2,[0,0,0]).withValidator(n)),r.put(dt.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new H(2,0).withValidator(e)),r.put(dt.MSPA_COVERED_TRANSACTION.toString(),new H(2,1).withValidator(t)),r.put(dt.MSPA_OPT_OUT_OPTION_MODE.toString(),new H(2,0).withValidator(e)),r.put(dt.MSPA_SERVICE_PROVIDER_MODE.toString(),new H(2,0).withValidator(e)),r}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new v("Unable to decode UsFlCoreSegment '"+e+"'")}}}class Tt extends w{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Tt.ID}getName(){return Tt.NAME}getVersion(){return Tt.VERSION}initializeSegments(){var e=[];return e.push(new Ot),e}decodeSection(e){var t=this.initializeSegments();if(null!=e&&0!==e.length)for(var n=e.split("."),r=0;rr&&t[r].decode(n[r]);return t}encodeSection(e){for(var t=[],n=0;n=0&&e<=2}},t=new class{test(e){return e>=1&&e<=2}},n=new class{test(e){for(var t=0;t2)return!1}return!0}},r=new K;return r.put(_t.VERSION.toString(),new H(6,Pt.VERSION)),r.put(_t.SHARING_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(_t.SALE_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(_t.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(_t.SALE_OPT_OUT.toString(),new H(2,0).withValidator(e)),r.put(_t.TARGETED_ADVERTISING_OPT_OUT.toString(),new H(2,0).withValidator(e)),r.put(_t.SENSITIVE_DATA_PROCESSING.toString(),new Fe(2,[0,0,0,0,0,0,0,0]).withValidator(n)),r.put(_t.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Fe(2,[0,0,0]).withValidator(n)),r.put(_t.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new H(2,0).withValidator(e)),r.put(_t.MSPA_COVERED_TRANSACTION.toString(),new H(2,1).withValidator(t)),r.put(_t.MSPA_OPT_OUT_OPTION_MODE.toString(),new H(2,0).withValidator(e)),r.put(_t.MSPA_SERVICE_PROVIDER_MODE.toString(),new H(2,0).withValidator(e)),r}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new v("Unable to decode UsMtCoreSegment '"+e+"'")}}}class At extends Y{constructor(e){super(),this.base64UrlEncoder=f.getInstance(),this.bitStringEncoder=m.getInstance(),e&&this.decode(e)}getFieldNames(){return It}initializeFields(){var e=new K;return e.put(_t.GPC_SEGMENT_TYPE.toString(),new H(2,1)),e.put(_t.GPC_SEGMENT_INCLUDED.toString(),new se(!0)),e.put(_t.GPC.toString(),new se(!1)),e}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new v("Unable to decode UsMtGpcSegment '"+e+"'")}}}class Pt extends w{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Pt.ID}getName(){return Pt.NAME}getVersion(){return Pt.VERSION}initializeSegments(){var e=[];return e.push(new pt),e.push(new At),e}decodeSection(e){var t=this.initializeSegments();if(null!=e&&0!==e.length){var n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(_t.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(_t.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){var t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&!0===e[1].getFieldValue(_t.GPC_SEGMENT_INCLUDED)&&t.push(e[1].encode())),t.join(".")}}Pt.ID=14,Pt.VERSION=1,Pt.NAME="usmt",function(e){e.VERSION="Version",e.PROCESSING_NOTICE="ProcessingNotice",e.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",e.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",e.SALE_OPT_OUT="SaleOptOut",e.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",e.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",e.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",e.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",e.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",e.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",e.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",e.GPC_SEGMENT_TYPE="GpcSegmentType",e.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",e.GPC="Gpc"}(Nt||(Nt={}));var Ct,Dt=[Nt.VERSION,Nt.PROCESSING_NOTICE,Nt.SALE_OPT_OUT_NOTICE,Nt.TARGETED_ADVERTISING_OPT_OUT_NOTICE,Nt.SALE_OPT_OUT,Nt.TARGETED_ADVERTISING_OPT_OUT,Nt.SENSITIVE_DATA_PROCESSING,Nt.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,Nt.ADDITIONAL_DATA_PROCESSING_CONSENT,Nt.MSPA_COVERED_TRANSACTION,Nt.MSPA_OPT_OUT_OPTION_MODE,Nt.MSPA_SERVICE_PROVIDER_MODE],wt=[Nt.GPC_SEGMENT_TYPE,Nt.GPC];class vt extends Y{constructor(e){super(),this.base64UrlEncoder=f.getInstance(),this.bitStringEncoder=m.getInstance(),e&&this.decode(e)}getFieldNames(){return Dt}initializeFields(){var e=new class{test(e){return e>=0&&e<=2}},t=new class{test(e){return e>=1&&e<=2}},n=new class{test(e){for(var t=0;t2)return!1}return!0}},r=new K;return r.put(Nt.VERSION.toString(),new H(6,Rt.VERSION)),r.put(Nt.PROCESSING_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(Nt.SALE_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(Nt.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(Nt.SALE_OPT_OUT.toString(),new H(2,0).withValidator(e)),r.put(Nt.TARGETED_ADVERTISING_OPT_OUT.toString(),new H(2,0).withValidator(e)),r.put(Nt.SENSITIVE_DATA_PROCESSING.toString(),new Fe(2,[0,0,0,0,0,0,0,0,0,0,0]).withValidator(n)),r.put(Nt.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Fe(2,[0,0,0]).withValidator(n)),r.put(Nt.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new H(2,0).withValidator(e)),r.put(Nt.MSPA_COVERED_TRANSACTION.toString(),new H(2,1).withValidator(t)),r.put(Nt.MSPA_OPT_OUT_OPTION_MODE.toString(),new H(2,0).withValidator(e)),r.put(Nt.MSPA_SERVICE_PROVIDER_MODE.toString(),new H(2,0).withValidator(e)),r}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new v("Unable to decode UsOrCoreSegment '"+e+"'")}}}class Vt extends Y{constructor(e){super(),this.base64UrlEncoder=f.getInstance(),this.bitStringEncoder=m.getInstance(),e&&this.decode(e)}getFieldNames(){return wt}initializeFields(){var e=new K;return e.put(Nt.GPC_SEGMENT_TYPE.toString(),new H(2,1)),e.put(Nt.GPC_SEGMENT_INCLUDED.toString(),new se(!0)),e.put(Nt.GPC.toString(),new se(!1)),e}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new v("Unable to decode UsOrGpcSegment '"+e+"'")}}}class Rt extends w{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Rt.ID}getName(){return Rt.NAME}getVersion(){return Rt.VERSION}initializeSegments(){var e=[];return e.push(new vt),e.push(new Vt),e}decodeSection(e){var t=this.initializeSegments();if(null!=e&&0!==e.length){var n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(Nt.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(Nt.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){var t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&!0===e[1].getFieldValue(Nt.GPC_SEGMENT_INCLUDED)&&t.push(e[1].encode())),t.join(".")}}Rt.ID=15,Rt.VERSION=1,Rt.NAME="usor",function(e){e.VERSION="Version",e.PROCESSING_NOTICE="ProcessingNotice",e.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",e.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",e.SALE_OPT_OUT="SaleOptOut",e.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",e.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",e.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",e.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",e.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",e.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",e.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",e.GPC_SEGMENT_TYPE="GpcSegmentType",e.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",e.GPC="Gpc"}(Ct||(Ct={}));var Mt,ft=[Ct.VERSION,Ct.PROCESSING_NOTICE,Ct.SALE_OPT_OUT_NOTICE,Ct.TARGETED_ADVERTISING_OPT_OUT_NOTICE,Ct.SALE_OPT_OUT,Ct.TARGETED_ADVERTISING_OPT_OUT,Ct.SENSITIVE_DATA_PROCESSING,Ct.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,Ct.ADDITIONAL_DATA_PROCESSING_CONSENT,Ct.MSPA_COVERED_TRANSACTION,Ct.MSPA_OPT_OUT_OPTION_MODE,Ct.MSPA_SERVICE_PROVIDER_MODE],mt=[Ct.GPC_SEGMENT_TYPE,Ct.GPC];class Gt extends Y{constructor(e){super(),this.base64UrlEncoder=f.getInstance(),this.bitStringEncoder=m.getInstance(),e&&this.decode(e)}getFieldNames(){return ft}initializeFields(){var e=new class{test(e){return e>=0&&e<=2}},t=new class{test(e){return e>=1&&e<=2}},n=new class{test(e){for(var t=0;t2)return!1}return!0}},r=new K;return r.put(Ct.VERSION.toString(),new H(6,bt.VERSION)),r.put(Ct.PROCESSING_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(Ct.SALE_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(Ct.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(Ct.SALE_OPT_OUT.toString(),new H(2,0).withValidator(e)),r.put(Ct.TARGETED_ADVERTISING_OPT_OUT.toString(),new H(2,0).withValidator(e)),r.put(Ct.SENSITIVE_DATA_PROCESSING.toString(),new Fe(2,[0,0,0,0,0,0,0,0]).withValidator(n)),r.put(Ct.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new H(2,0).withValidator(e)),r.put(Ct.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new H(2,0).withValidator(e)),r.put(Ct.MSPA_COVERED_TRANSACTION.toString(),new H(2,1).withValidator(t)),r.put(Ct.MSPA_OPT_OUT_OPTION_MODE.toString(),new H(2,0).withValidator(e)),r.put(Ct.MSPA_SERVICE_PROVIDER_MODE.toString(),new H(2,0).withValidator(e)),r}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new v("Unable to decode UsTxCoreSegment '"+e+"'")}}}class Ut extends Y{constructor(e){super(),this.base64UrlEncoder=f.getInstance(),this.bitStringEncoder=m.getInstance(),e&&this.decode(e)}getFieldNames(){return mt}initializeFields(){var e=new K;return e.put(Ct.GPC_SEGMENT_TYPE.toString(),new H(2,1)),e.put(Ct.GPC_SEGMENT_INCLUDED.toString(),new se(!0)),e.put(Ct.GPC.toString(),new se(!1)),e}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new v("Unable to decode UsTxGpcSegment '"+e+"'")}}}class bt extends w{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return bt.ID}getName(){return bt.NAME}getVersion(){return bt.VERSION}initializeSegments(){var e=[];return e.push(new Gt),e.push(new Ut),e}decodeSection(e){var t=this.initializeSegments();if(null!=e&&0!==e.length){var n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(Ct.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(Ct.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){var t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&!0===e[1].getFieldValue(Ct.GPC_SEGMENT_INCLUDED)&&t.push(e[1].encode())),t.join(".")}}bt.ID=16,bt.VERSION=1,bt.NAME="ustx",function(e){e.VERSION="Version",e.PROCESSING_NOTICE="ProcessingNotice",e.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",e.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",e.SALE_OPT_OUT="SaleOptOut",e.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",e.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",e.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",e.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",e.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",e.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",e.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",e.GPC_SEGMENT_TYPE="GpcSegmentType",e.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",e.GPC="Gpc"}(Mt||(Mt={}));var yt,Lt=[Mt.VERSION,Mt.PROCESSING_NOTICE,Mt.SALE_OPT_OUT_NOTICE,Mt.TARGETED_ADVERTISING_OPT_OUT_NOTICE,Mt.SALE_OPT_OUT,Mt.TARGETED_ADVERTISING_OPT_OUT,Mt.SENSITIVE_DATA_PROCESSING,Mt.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,Mt.ADDITIONAL_DATA_PROCESSING_CONSENT,Mt.MSPA_COVERED_TRANSACTION,Mt.MSPA_OPT_OUT_OPTION_MODE,Mt.MSPA_SERVICE_PROVIDER_MODE],Ft=[Mt.GPC_SEGMENT_TYPE,Mt.GPC];class xt extends Y{constructor(e){super(),this.base64UrlEncoder=f.getInstance(),this.bitStringEncoder=m.getInstance(),e&&this.decode(e)}getFieldNames(){return Lt}initializeFields(){var e=new class{test(e){return e>=0&&e<=2}},t=new class{test(e){return e>=1&&e<=2}},n=new class{test(e){for(var t=0;t2)return!1}return!0}},r=new K;return r.put(Mt.VERSION.toString(),new H(6,Ht.VERSION)),r.put(Mt.PROCESSING_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(Mt.SALE_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(Mt.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(Mt.SALE_OPT_OUT.toString(),new H(2,0).withValidator(e)),r.put(Mt.TARGETED_ADVERTISING_OPT_OUT.toString(),new H(2,0).withValidator(e)),r.put(Mt.SENSITIVE_DATA_PROCESSING.toString(),new Fe(2,[0,0,0,0,0,0,0,0,0]).withValidator(n)),r.put(Mt.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Fe(2,[0,0,0,0,0]).withValidator(n)),r.put(Mt.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new H(2,0).withValidator(e)),r.put(Mt.MSPA_COVERED_TRANSACTION.toString(),new H(2,1).withValidator(t)),r.put(Mt.MSPA_OPT_OUT_OPTION_MODE.toString(),new H(2,0).withValidator(e)),r.put(Mt.MSPA_SERVICE_PROVIDER_MODE.toString(),new H(2,0).withValidator(e)),r}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new v("Unable to decode UsDeCoreSegment '"+e+"'")}}}class jt extends Y{constructor(e){super(),this.base64UrlEncoder=f.getInstance(),this.bitStringEncoder=m.getInstance(),e&&this.decode(e)}getFieldNames(){return Ft}initializeFields(){var e=new K;return e.put(Mt.GPC_SEGMENT_TYPE.toString(),new H(2,1)),e.put(Mt.GPC_SEGMENT_INCLUDED.toString(),new se(!0)),e.put(Mt.GPC.toString(),new se(!1)),e}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new v("Unable to decode UsDeGpcSegment '"+e+"'")}}}class Ht extends w{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Ht.ID}getName(){return Ht.NAME}getVersion(){return Ht.VERSION}initializeSegments(){var e=[];return e.push(new xt),e.push(new jt),e}decodeSection(e){var t=this.initializeSegments();if(null!=e&&0!==e.length){var n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(Mt.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(Mt.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){var t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&!0===e[1].getFieldValue(Mt.GPC_SEGMENT_INCLUDED)&&t.push(e[1].encode())),t.join(".")}}Ht.ID=17,Ht.VERSION=1,Ht.NAME="usde",function(e){e.VERSION="Version",e.PROCESSING_NOTICE="ProcessingNotice",e.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",e.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",e.SENSITIVE_DATA_OPT_OUT_NOTICE="SensitiveDataOptOutNotice",e.SALE_OPT_OUT="SaleOptOut",e.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",e.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",e.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",e.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",e.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",e.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",e.GPC_SEGMENT_TYPE="GpcSegmentType",e.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",e.GPC="Gpc"}(yt||(yt={}));var Kt,zt=[yt.VERSION,yt.PROCESSING_NOTICE,yt.SALE_OPT_OUT_NOTICE,yt.TARGETED_ADVERTISING_OPT_OUT_NOTICE,yt.SENSITIVE_DATA_OPT_OUT_NOTICE,yt.SALE_OPT_OUT,yt.TARGETED_ADVERTISING_OPT_OUT,yt.SENSITIVE_DATA_PROCESSING,yt.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,yt.MSPA_COVERED_TRANSACTION,yt.MSPA_OPT_OUT_OPTION_MODE,yt.MSPA_SERVICE_PROVIDER_MODE],Bt=[yt.GPC_SEGMENT_TYPE,yt.GPC];class Yt extends Y{constructor(e){super(),this.base64UrlEncoder=f.getInstance(),this.bitStringEncoder=m.getInstance(),e&&this.decode(e)}getFieldNames(){return zt}initializeFields(){var e=new class{test(e){return e>=0&&e<=2}},t=new class{test(e){return e>=1&&e<=2}},n=new class{test(e){for(var t=0;t2)return!1}return!0}},r=new K;return r.put(yt.VERSION.toString(),new H(6,Wt.VERSION)),r.put(yt.PROCESSING_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(yt.SALE_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(yt.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(yt.SENSITIVE_DATA_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(yt.SALE_OPT_OUT.toString(),new H(2,0).withValidator(e)),r.put(yt.TARGETED_ADVERTISING_OPT_OUT.toString(),new H(2,0).withValidator(e)),r.put(yt.SENSITIVE_DATA_PROCESSING.toString(),new Fe(2,[0,0,0,0,0,0,0,0]).withValidator(n)),r.put(yt.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new H(2,0).withValidator(e)),r.put(yt.MSPA_COVERED_TRANSACTION.toString(),new H(2,1).withValidator(t)),r.put(yt.MSPA_OPT_OUT_OPTION_MODE.toString(),new H(2,0).withValidator(e)),r.put(yt.MSPA_SERVICE_PROVIDER_MODE.toString(),new H(2,0).withValidator(e)),r}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new v("Unable to decode UsIaCoreSegment '"+e+"'")}}}class kt extends Y{constructor(e){super(),this.base64UrlEncoder=f.getInstance(),this.bitStringEncoder=m.getInstance(),e&&this.decode(e)}getFieldNames(){return Bt}initializeFields(){var e=new K;return e.put(yt.GPC_SEGMENT_TYPE.toString(),new H(2,1)),e.put(yt.GPC_SEGMENT_INCLUDED.toString(),new se(!0)),e.put(yt.GPC.toString(),new se(!1)),e}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new v("Unable to decode UsIaGpcSegment '"+e+"'")}}}class Wt extends w{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Wt.ID}getName(){return Wt.NAME}getVersion(){return Wt.VERSION}initializeSegments(){var e=[];return e.push(new Yt),e.push(new kt),e}decodeSection(e){var t=this.initializeSegments();if(null!=e&&0!==e.length){var n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(yt.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(yt.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){var t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&!0===e[1].getFieldValue(yt.GPC_SEGMENT_INCLUDED)&&t.push(e[1].encode())),t.join(".")}}Wt.ID=18,Wt.VERSION=1,Wt.NAME="usia",function(e){e.VERSION="Version",e.PROCESSING_NOTICE="ProcessingNotice",e.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",e.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",e.SALE_OPT_OUT="SaleOptOut",e.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",e.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",e.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",e.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",e.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",e.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",e.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",e.GPC_SEGMENT_TYPE="GpcSegmentType",e.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",e.GPC="Gpc"}(Kt||(Kt={}));var Qt,Xt=[Kt.VERSION,Kt.PROCESSING_NOTICE,Kt.SALE_OPT_OUT_NOTICE,Kt.TARGETED_ADVERTISING_OPT_OUT_NOTICE,Kt.SALE_OPT_OUT,Kt.TARGETED_ADVERTISING_OPT_OUT,Kt.SENSITIVE_DATA_PROCESSING,Kt.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,Kt.ADDITIONAL_DATA_PROCESSING_CONSENT,Kt.MSPA_COVERED_TRANSACTION,Kt.MSPA_OPT_OUT_OPTION_MODE,Kt.MSPA_SERVICE_PROVIDER_MODE],qt=[Kt.GPC_SEGMENT_TYPE,Kt.GPC];class $t extends Y{constructor(e){super(),this.base64UrlEncoder=f.getInstance(),this.bitStringEncoder=m.getInstance(),e&&this.decode(e)}getFieldNames(){return Xt}initializeFields(){var e=new class{test(e){return e>=0&&e<=2}},t=new class{test(e){return e>=1&&e<=2}},n=new class{test(e){for(var t=0;t2)return!1}return!0}},r=new K;return r.put(Kt.VERSION.toString(),new H(6,Zt.VERSION)),r.put(Kt.PROCESSING_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(Kt.SALE_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(Kt.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(Kt.SALE_OPT_OUT.toString(),new H(2,0).withValidator(e)),r.put(Kt.TARGETED_ADVERTISING_OPT_OUT.toString(),new H(2,0).withValidator(e)),r.put(Kt.SENSITIVE_DATA_PROCESSING.toString(),new Fe(2,[0,0,0,0,0,0,0,0]).withValidator(n)),r.put(Kt.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new H(2,0).withValidator(e)),r.put(Kt.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new H(2,0).withValidator(e)),r.put(Kt.MSPA_COVERED_TRANSACTION.toString(),new H(2,1).withValidator(t)),r.put(Kt.MSPA_OPT_OUT_OPTION_MODE.toString(),new H(2,0).withValidator(e)),r.put(Kt.MSPA_SERVICE_PROVIDER_MODE.toString(),new H(2,0).withValidator(e)),r}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new v("Unable to decode UsNeCoreSegment '"+e+"'")}}}class Jt extends Y{constructor(e){super(),this.base64UrlEncoder=f.getInstance(),this.bitStringEncoder=m.getInstance(),e&&this.decode(e)}getFieldNames(){return qt}initializeFields(){var e=new K;return e.put(Kt.GPC_SEGMENT_TYPE.toString(),new H(2,1)),e.put(Kt.GPC_SEGMENT_INCLUDED.toString(),new se(!0)),e.put(Kt.GPC.toString(),new se(!1)),e}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new v("Unable to decode UsNeGpcSegment '"+e+"'")}}}class Zt extends w{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Zt.ID}getName(){return Zt.NAME}getVersion(){return Zt.VERSION}initializeSegments(){var e=[];return e.push(new $t),e.push(new Jt),e}decodeSection(e){var t=this.initializeSegments();if(null!=e&&0!==e.length){var n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(Kt.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(Kt.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){var t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&!0===e[1].getFieldValue(Kt.GPC_SEGMENT_INCLUDED)&&t.push(e[1].encode())),t.join(".")}}Zt.ID=19,Zt.VERSION=1,Zt.NAME="usne",function(e){e.VERSION="Version",e.PROCESSING_NOTICE="ProcessingNotice",e.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",e.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",e.SALE_OPT_OUT="SaleOptOut",e.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",e.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",e.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",e.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",e.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",e.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",e.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",e.GPC_SEGMENT_TYPE="GpcSegmentType",e.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",e.GPC="Gpc"}(Qt||(Qt={}));var en,tn=[Qt.VERSION,Qt.PROCESSING_NOTICE,Qt.SALE_OPT_OUT_NOTICE,Qt.TARGETED_ADVERTISING_OPT_OUT_NOTICE,Qt.SALE_OPT_OUT,Qt.TARGETED_ADVERTISING_OPT_OUT,Qt.SENSITIVE_DATA_PROCESSING,Qt.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,Qt.ADDITIONAL_DATA_PROCESSING_CONSENT,Qt.MSPA_COVERED_TRANSACTION,Qt.MSPA_OPT_OUT_OPTION_MODE,Qt.MSPA_SERVICE_PROVIDER_MODE],nn=[Qt.GPC_SEGMENT_TYPE,Qt.GPC];class rn extends Y{constructor(e){super(),this.base64UrlEncoder=f.getInstance(),this.bitStringEncoder=m.getInstance(),e&&this.decode(e)}getFieldNames(){return tn}initializeFields(){var e=new class{test(e){return e>=0&&e<=2}},t=new class{test(e){return e>=1&&e<=2}},n=new class{test(e){for(var t=0;t2)return!1}return!0}},r=new K;return r.put(Qt.VERSION.toString(),new H(6,on.VERSION)),r.put(Qt.PROCESSING_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(Qt.SALE_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(Qt.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(Qt.SALE_OPT_OUT.toString(),new H(2,0).withValidator(e)),r.put(Qt.TARGETED_ADVERTISING_OPT_OUT.toString(),new H(2,0).withValidator(e)),r.put(Qt.SENSITIVE_DATA_PROCESSING.toString(),new Fe(2,[0,0,0,0,0,0,0,0]).withValidator(n)),r.put(Qt.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Fe(2,[0,0,0]).withValidator(n)),r.put(Qt.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new H(2,0).withValidator(e)),r.put(Qt.MSPA_COVERED_TRANSACTION.toString(),new H(2,1).withValidator(t)),r.put(Qt.MSPA_OPT_OUT_OPTION_MODE.toString(),new H(2,0).withValidator(e)),r.put(Qt.MSPA_SERVICE_PROVIDER_MODE.toString(),new H(2,0).withValidator(e)),r}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new v("Unable to decode UsNhCoreSegment '"+e+"'")}}}class sn extends Y{constructor(e){super(),this.base64UrlEncoder=f.getInstance(),this.bitStringEncoder=m.getInstance(),e&&this.decode(e)}getFieldNames(){return nn}initializeFields(){var e=new K;return e.put(Qt.GPC_SEGMENT_TYPE.toString(),new H(2,1)),e.put(Qt.GPC_SEGMENT_INCLUDED.toString(),new se(!0)),e.put(Qt.GPC.toString(),new se(!1)),e}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new v("Unable to decode UsNhGpcSegment '"+e+"'")}}}class on extends w{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return on.ID}getName(){return on.NAME}getVersion(){return on.VERSION}initializeSegments(){var e=[];return e.push(new rn),e.push(new sn),e}decodeSection(e){var t=this.initializeSegments();if(null!=e&&0!==e.length){var n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(Qt.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(Qt.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){var t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&!0===e[1].getFieldValue(Qt.GPC_SEGMENT_INCLUDED)&&t.push(e[1].encode())),t.join(".")}}on.ID=20,on.VERSION=1,on.NAME="usnh",function(e){e.VERSION="Version",e.PROCESSING_NOTICE="ProcessingNotice",e.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",e.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",e.SALE_OPT_OUT="SaleOptOut",e.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",e.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",e.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",e.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",e.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",e.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",e.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",e.GPC_SEGMENT_TYPE="GpcSegmentType",e.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",e.GPC="Gpc"}(en||(en={}));var an,dn=[en.VERSION,en.PROCESSING_NOTICE,en.SALE_OPT_OUT_NOTICE,en.TARGETED_ADVERTISING_OPT_OUT_NOTICE,en.SALE_OPT_OUT,en.TARGETED_ADVERTISING_OPT_OUT,en.SENSITIVE_DATA_PROCESSING,en.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,en.ADDITIONAL_DATA_PROCESSING_CONSENT,en.MSPA_COVERED_TRANSACTION,en.MSPA_OPT_OUT_OPTION_MODE,en.MSPA_SERVICE_PROVIDER_MODE],Sn=[en.GPC_SEGMENT_TYPE,en.GPC];class cn extends Y{constructor(e){super(),this.base64UrlEncoder=f.getInstance(),this.bitStringEncoder=m.getInstance(),e&&this.decode(e)}getFieldNames(){return dn}initializeFields(){var e=new class{test(e){return e>=0&&e<=2}},t=new class{test(e){return e>=1&&e<=2}},n=new class{test(e){for(var t=0;t2)return!1}return!0}},r=new K;return r.put(en.VERSION.toString(),new H(6,ln.VERSION)),r.put(en.PROCESSING_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(en.SALE_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(en.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(en.SALE_OPT_OUT.toString(),new H(2,0).withValidator(e)),r.put(en.TARGETED_ADVERTISING_OPT_OUT.toString(),new H(2,0).withValidator(e)),r.put(en.SENSITIVE_DATA_PROCESSING.toString(),new Fe(2,[0,0,0,0,0,0,0,0,0,0]).withValidator(n)),r.put(en.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new Fe(2,[0,0,0,0,0]).withValidator(n)),r.put(en.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new H(2,0).withValidator(e)),r.put(en.MSPA_COVERED_TRANSACTION.toString(),new H(2,1).withValidator(t)),r.put(en.MSPA_OPT_OUT_OPTION_MODE.toString(),new H(2,0).withValidator(e)),r.put(en.MSPA_SERVICE_PROVIDER_MODE.toString(),new H(2,0).withValidator(e)),r}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new v("Unable to decode UsNjCoreSegment '"+e+"'")}}}class En extends Y{constructor(e){super(),this.base64UrlEncoder=f.getInstance(),this.bitStringEncoder=m.getInstance(),e&&this.decode(e)}getFieldNames(){return Sn}initializeFields(){var e=new K;return e.put(en.GPC_SEGMENT_TYPE.toString(),new H(2,1)),e.put(en.GPC_SEGMENT_INCLUDED.toString(),new se(!0)),e.put(en.GPC.toString(),new se(!1)),e}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new v("Unable to decode UsNjGpcSegment '"+e+"'")}}}class ln extends w{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return ln.ID}getName(){return ln.NAME}getVersion(){return ln.VERSION}initializeSegments(){var e=[];return e.push(new cn),e.push(new En),e}decodeSection(e){var t=this.initializeSegments();if(null!=e&&0!==e.length){var n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(en.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(en.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){var t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&!0===e[1].getFieldValue(en.GPC_SEGMENT_INCLUDED)&&t.push(e[1].encode())),t.join(".")}}ln.ID=21,ln.VERSION=1,ln.NAME="usnj",function(e){e.VERSION="Version",e.PROCESSING_NOTICE="ProcessingNotice",e.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",e.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",e.SALE_OPT_OUT="SaleOptOut",e.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",e.SENSITIVE_DATA_PROCESSING="SensitiveDataProcessing",e.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS="KnownChildSensitiveDataConsents",e.ADDITIONAL_DATA_PROCESSING_CONSENT="AdditionalDataProcessingConsent",e.MSPA_COVERED_TRANSACTION="MspaCoveredTransaction",e.MSPA_OPT_OUT_OPTION_MODE="MspaOptOutOptionMode",e.MSPA_SERVICE_PROVIDER_MODE="MspaServiceProviderMode",e.GPC_SEGMENT_TYPE="GpcSegmentType",e.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",e.GPC="Gpc"}(an||(an={}));var un=[an.VERSION,an.PROCESSING_NOTICE,an.SALE_OPT_OUT_NOTICE,an.TARGETED_ADVERTISING_OPT_OUT_NOTICE,an.SALE_OPT_OUT,an.TARGETED_ADVERTISING_OPT_OUT,an.SENSITIVE_DATA_PROCESSING,an.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,an.ADDITIONAL_DATA_PROCESSING_CONSENT,an.MSPA_COVERED_TRANSACTION,an.MSPA_OPT_OUT_OPTION_MODE,an.MSPA_SERVICE_PROVIDER_MODE],_n=[an.GPC_SEGMENT_TYPE,an.GPC];class hn extends Y{constructor(e){super(),this.base64UrlEncoder=f.getInstance(),this.bitStringEncoder=m.getInstance(),e&&this.decode(e)}getFieldNames(){return un}initializeFields(){var e=new class{test(e){return e>=0&&e<=2}},t=new class{test(e){return e>=1&&e<=2}},n=new class{test(e){for(var t=0;t2)return!1}return!0}},r=new K;return r.put(an.VERSION.toString(),new H(6,Tn.VERSION)),r.put(an.PROCESSING_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(an.SALE_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(an.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new H(2,0).withValidator(e)),r.put(an.SALE_OPT_OUT.toString(),new H(2,0).withValidator(e)),r.put(an.TARGETED_ADVERTISING_OPT_OUT.toString(),new H(2,0).withValidator(e)),r.put(an.SENSITIVE_DATA_PROCESSING.toString(),new Fe(2,[0,0,0,0,0,0,0,0]).withValidator(n)),r.put(an.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new H(2,0).withValidator(e)),r.put(an.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new H(2,0).withValidator(e)),r.put(an.MSPA_COVERED_TRANSACTION.toString(),new H(2,1).withValidator(t)),r.put(an.MSPA_OPT_OUT_OPTION_MODE.toString(),new H(2,0).withValidator(e)),r.put(an.MSPA_SERVICE_PROVIDER_MODE.toString(),new H(2,0).withValidator(e)),r}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new v("Unable to decode UsTnCoreSegment '"+e+"'")}}}class On extends Y{constructor(e){super(),this.base64UrlEncoder=f.getInstance(),this.bitStringEncoder=m.getInstance(),e&&this.decode(e)}getFieldNames(){return _n}initializeFields(){var e=new K;return e.put(an.GPC_SEGMENT_TYPE.toString(),new H(2,1)),e.put(an.GPC_SEGMENT_INCLUDED.toString(),new se(!0)),e.put(an.GPC.toString(),new se(!1)),e}encodeSegment(e){var t=this.bitStringEncoder.encode(e,this.getFieldNames());return this.base64UrlEncoder.encode(t)}decodeSegment(e,t){null!=e&&0!==e.length||this.fields.reset(t);try{var n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new v("Unable to decode UsTnGpcSegment '"+e+"'")}}}class Tn extends w{constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Tn.ID}getName(){return Tn.NAME}getVersion(){return Tn.VERSION}initializeSegments(){var e=[];return e.push(new hn),e.push(new On),e}decodeSection(e){var t=this.initializeSegments();if(null!=e&&0!==e.length){var n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(an.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(an.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){var t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&!0===e[1].getFieldValue(an.GPC_SEGMENT_INCLUDED)&&t.push(e[1].encode())),t.join(".")}}Tn.ID=22,Tn.VERSION=1,Tn.NAME="ustn";class Nn{}Nn.SECTION_ID_NAME_MAP=new Map([[Ne.ID,Ne.NAME],[we.ID,we.NAME],[Ge.ID,Ge.NAME],[He.ID,He.NAME],[We.ID,We.NAME],[$e.ID,$e.NAME],[rt.ID,rt.NAME],[at.ID,at.NAME],[ut.ID,ut.NAME],[Tt.ID,Tt.NAME],[Pt.ID,Pt.NAME],[Rt.ID,Rt.NAME],[bt.ID,bt.NAME],[Ht.ID,Ht.NAME],[Wt.ID,Wt.NAME],[Zt.ID,Zt.NAME],[on.ID,on.NAME],[ln.ID,ln.NAME],[Tn.ID,Tn.NAME]]),Nn.SECTION_ORDER=[Ne.NAME,we.NAME,Ge.NAME,He.NAME,We.NAME,$e.NAME,rt.NAME,at.NAME,ut.NAME,Tt.NAME,Pt.NAME,Rt.NAME,bt.NAME,Ht.NAME,Wt.NAME,Zt.NAME,on.NAME,ln.NAME,Tn.NAME];class gn{constructor(e){this.sections=new Map,this.encodedString=null,this.decoded=!0,this.dirty=!1,e&&this.decode(e)}setFieldValue(e,t,n){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);var r=null;if(this.sections.has(e)?r=this.sections.get(e):e===we.NAME?(r=new we,this.sections.set(we.NAME,r)):e===Ne.NAME?(r=new Ne,this.sections.set(Ne.NAME,r)):e===Ge.NAME?(r=new Ge,this.sections.set(Ge.NAME,r)):e===He.NAME?(r=new He,this.sections.set(He.NAME,r)):e===We.NAME?(r=new We,this.sections.set(We.NAME,r)):e===$e.NAME?(r=new $e,this.sections.set($e.NAME,r)):e===rt.NAME?(r=new rt,this.sections.set(rt.NAME,r)):e===at.NAME?(r=new at,this.sections.set(at.NAME,r)):e===ut.NAME?(r=new ut,this.sections.set(ut.NAME,r)):e===Tt.NAME?(r=new Tt,this.sections.set(Tt.NAME,r)):e===Pt.NAME?(r=new Pt,this.sections.set(Pt.NAME,r)):e===Rt.NAME?(r=new Rt,this.sections.set(Rt.NAME,r)):e===bt.NAME?(r=new bt,this.sections.set(bt.NAME,r)):e===Ht.NAME?(r=new Ht,this.sections.set(Ht.NAME,r)):e===Wt.NAME?(r=new Wt,this.sections.set(Wt.NAME,r)):e===Zt.NAME?(r=new Zt,this.sections.set(Zt.NAME,r)):e===on.NAME?(r=new on,this.sections.set(on.NAME,r)):e===ln.NAME?(r=new ln,this.sections.set(ln.NAME,r)):e===Tn.NAME&&(r=new Tn,this.sections.set(Tn.NAME,r)),!r)throw new D(e+"."+t+" not found");r.setFieldValue(t,n),this.dirty=!0}setFieldValueBySectionId(e,t,n){this.setFieldValue(Nn.SECTION_ID_NAME_MAP.get(e),t,n)}getFieldValue(e,t){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)?this.sections.get(e).getFieldValue(t):null}getFieldValueBySectionId(e,t){return this.getFieldValue(Nn.SECTION_ID_NAME_MAP.get(e),t)}hasField(e,t){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),!!this.sections.has(e)&&this.sections.get(e).hasField(t)}hasFieldBySectionId(e,t){return this.hasField(Nn.SECTION_ID_NAME_MAP.get(e),t)}hasSection(e){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)}hasSectionId(e){return this.hasSection(Nn.SECTION_ID_NAME_MAP.get(e))}deleteSection(e){!this.decoded&&null!=this.encodedString&&this.encodedString.length>0&&this.decode(this.encodedString),this.sections.delete(e),this.dirty=!0}deleteSectionById(e){this.deleteSection(Nn.SECTION_ID_NAME_MAP.get(e))}clear(){this.sections.clear(),this.encodedString="DBAA",this.decoded=!1,this.dirty=!1}getHeader(){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);var e=new W;return e.setFieldValue("SectionIds",this.getSectionIds()),e.toObj()}getSection(e){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)?this.sections.get(e).toObj():null}getSectionIds(){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);for(var e=[],t=0;t{var o=new XMLHttpRequest;o.withCredentials=n,o.addEventListener("load",(()=>{if(o.readyState==XMLHttpRequest.DONE)if(o.status>=200&&o.status<300){var e=o.response;if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}i(e)}else s(new Error("HTTP Status: "+o.status+" response type: "+o.responseType))})),o.addEventListener("error",(()=>{s(new Error("error"))})),o.addEventListener("abort",(()=>{s(new Error("aborted"))})),null===t?o.open("GET",e,!0):o.open("POST",e,!0),o.responseType="json",o.timeout=r,o.ontimeout=()=>{s(new Error("Timeout "+r+"ms "+e))},o.send(t)}))}static post(e,t,n,r){return void 0===n&&(n=!1),void 0===r&&(r=0),this.absCall(e,JSON.stringify(t),n,r)}static fetch(e,t,n){return void 0===t&&(t=!1),void 0===n&&(n=0),this.absCall(e,null,t,n)}}class wn{constructor(){this.vendors=void 0,this.consentLanguages=new An,this.gvlSpecificationVersion=void 0,this.vendorListVersion=void 0,this.tcfPolicyVersion=void 0,this.lastUpdated=void 0,this.purposes=void 0,this.specialPurposes=void 0,this.features=void 0,this.specialFeatures=void 0,this.stacks=void 0,this.dataCategories=void 0,this.language=wn.DEFAULT_LANGUAGE,this.vendorIds=void 0,this.ready=!1,this.fullVendorList=void 0,this.byPurposeVendorMap=void 0,this.bySpecialPurposeVendorMap=void 0,this.byFeatureVendorMap=void 0,this.bySpecialFeatureVendorMap=void 0,this.baseUrl=void 0,this.languageFilename="purposes-[LANG].json"}static fromVendorList(e){var t=new wn;return t.populate(e),t}static fromUrl(e){return Cn((function*(){var t=e.baseUrl;if(!t||0===t.length)throw new pn("Invalid baseUrl: '"+t+"'");if(/^https?:\/\/vendorlist\.consensu\.org\//.test(t))throw new pn("Invalid baseUrl! You may not pull directly from vendorlist.consensu.org and must provide your own cache");t.length>0&&"/"!==t[t.length-1]&&(t+="/");var n=new wn;if(n.baseUrl=t,e.languageFilename?n.languageFilename=e.languageFilename:n.languageFilename="purposes-[LANG].json",e.version>0){var r=e.versionedFilename;r||(r="archives/vendor-list-v[VERSION].json");var i=t+r.replace("[VERSION]",String(e.version));n.populate(yield Dn.fetch(i))}else{var s=e.latestFilename;s||(s="vendor-list.json");var o=t+s;n.populate(yield Dn.fetch(o))}return n}))()}changeLanguage(e){var t=this;return Cn((function*(){var n=e.toUpperCase();if(!t.consentLanguages.has(n))throw new pn("unsupported language "+e);if(n!==t.language){t.language=n;var r=t.baseUrl+t.languageFilename.replace("[LANG]",e);try{t.populate(yield Dn.fetch(r))}catch(e){throw new pn("unable to load language: "+e.message)}}}))()}getJson(){return JSON.parse(JSON.stringify({gvlSpecificationVersion:this.gvlSpecificationVersion,vendorListVersion:this.vendorListVersion,tcfPolicyVersion:this.tcfPolicyVersion,lastUpdated:this.lastUpdated,purposes:this.purposes,specialPurposes:this.specialPurposes,features:this.features,specialFeatures:this.specialFeatures,stacks:this.stacks,dataCategories:this.dataCategories,vendors:this.fullVendorList}))}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.ready=!0)}mapVendors(e){this.byPurposeVendorMap={},this.bySpecialPurposeVendorMap={},this.byFeatureVendorMap={},this.bySpecialFeatureVendorMap={},Object.keys(this.purposes).forEach((e=>{this.byPurposeVendorMap[e]={legInt:new Set,impCons: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)=>{var n=this.vendors[String(t)];return n&&void 0===n.deletedDate&&(n.purposes.forEach((e=>{this.byPurposeVendorMap[String(e)].consent.add(t)})),n.specialPurposes.forEach((e=>{this.bySpecialPurposeVendorMap[String(e)].add(t)})),n.legIntPurposes&&n.legIntPurposes.forEach((e=>{this.byPurposeVendorMap[String(e)].legInt.add(t)})),n.impConsPurposes&&n.impConsPurposes.forEach((e=>{this.byPurposeVendorMap[String(e)].impCons.add(t)})),n.flexiblePurposes&&n.flexiblePurposes.forEach((e=>{this.byPurposeVendorMap[String(e)].flexible.add(t)})),n.features.forEach((e=>{this.byFeatureVendorMap[String(e)].add(t)})),n.specialFeatures.forEach((e=>{this.bySpecialFeatureVendorMap[String(e)].add(t)})),e[t]=n),e}),{})}getFilteredVendors(e,t,n,r){var i=e.charAt(0).toUpperCase()+e.slice(1),s={};return("purpose"===e&&n?this["by"+i+"VendorMap"][String(t)][n]:this["by"+(r?"Special":"")+i+"VendorMap"][String(t)]).forEach((e=>{s[String(e)]=this.vendors[String(e)]})),s}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)}narrowVendorsTo(e){this.mapVendors(e)}get isReady(){return this.ready}static isInstanceOf(e){return"object"==typeof e&&"function"==typeof e.narrowVendorsTo}}wn.DEFAULT_LANGUAGE="EN";class vn{constructor(e,t,n){this.callResponder=void 0,this.cmpApiContext=void 0,this.cmpApiContext=new In,this.cmpApiContext.cmpId=e,this.cmpApiContext.cmpVersion=t,this.callResponder=new P(this.cmpApiContext,n)}fireEvent(e,t){this.cmpApiContext.eventQueue.exec(e,t)}fireErrorEvent(e){this.cmpApiContext.eventQueue.exec("error",e)}fireSectionChange(e){this.cmpApiContext.eventQueue.exec("sectionChange",e)}getEventStatus(){return this.cmpApiContext.eventStatus}setEventStatus(e){this.cmpApiContext.eventStatus=e}getCmpStatus(){return this.cmpApiContext.cmpStatus}setCmpStatus(e){this.cmpApiContext.cmpStatus=e,this.cmpApiContext.eventQueue.exec("cmpStatus",e)}getCmpDisplayStatus(){return this.cmpApiContext.cmpDisplayStatus}setCmpDisplayStatus(e){this.cmpApiContext.cmpDisplayStatus=e,this.cmpApiContext.eventQueue.exec("cmpDisplayStatus",e)}getSignalStatus(){return this.cmpApiContext.signalStatus}setSignalStatus(e){this.cmpApiContext.signalStatus=e,this.cmpApiContext.eventQueue.exec("signalStatus",e)}getApplicableSections(){return this.cmpApiContext.applicableSections}setApplicableSections(e){this.cmpApiContext.applicableSections=e}getSupportedAPIs(){return this.cmpApiContext.supportedAPIs}setSupportedAPIs(e){this.cmpApiContext.supportedAPIs=e}setGppString(e){this.cmpApiContext.gppModel.decode(e)}getGppString(){return this.cmpApiContext.gppModel.encode()}setSectionString(e,t){this.cmpApiContext.gppModel.decodeSection(e,t)}setSectionStringById(e,t){this.setSectionString(Nn.SECTION_ID_NAME_MAP.get(e),t)}getSectionString(e){return this.cmpApiContext.gppModel.encodeSection(e)}getSectionStringById(e){return this.getSectionString(Nn.SECTION_ID_NAME_MAP.get(e))}setFieldValue(e,t,n){this.cmpApiContext.gppModel.setFieldValue(e,t,n)}setFieldValueBySectionId(e,t,n){this.setFieldValue(Nn.SECTION_ID_NAME_MAP.get(e),t,n)}getFieldValue(e,t){return this.cmpApiContext.gppModel.getFieldValue(e,t)}getFieldValueBySectionId(e,t){return this.getFieldValue(Nn.SECTION_ID_NAME_MAP.get(e),t)}getSection(e){return this.cmpApiContext.gppModel.getSection(e)}getSectionById(e){return this.getSection(Nn.SECTION_ID_NAME_MAP.get(e))}hasSection(e){return this.cmpApiContext.gppModel.hasSection(e)}hasSectionId(e){return this.hasSection(Nn.SECTION_ID_NAME_MAP.get(e))}deleteSection(e){this.cmpApiContext.gppModel.deleteSection(e)}deleteSectionById(e){this.deleteSection(Nn.SECTION_ID_NAME_MAP.get(e))}clear(){this.cmpApiContext.gppModel.clear()}getObject(){return this.cmpApiContext.gppModel.toObject()}getGvlFromVendorList(e){return wn.fromVendorList(e)}getGvlFromUrl(e){return Cn((function*(){return wn.fromUrl(e)}))()}}var Vn,Rn,Mn,fn=n(349),mn="tcfcav1",Gn="tcfeuv2",Un="usca",bn="usco",yn="usct",Ln="usnat",Fn="usp",xn="usut",jn="usva",Hn="usde",Kn="usia",zn="usne",Bn="usnh",Yn="usnj",kn="ustn",Wn="usfl",Qn="usmt",Xn="usor",qn="ustx",$n={[Gn]:2,[mn]:5,[Fn]:6,[Ln]:7,[Un]:8,[jn]:9,[bn]:10,[xn]:11,[yn]:12,[Wn]:13,[Qn]:14,[Xn]:15,[qn]:16,[Hn]:17,[Kn]:18,[zn]:19,[Bn]:20,[Yn]:21,[kn]:22},Jn={[mn]:["Version","Created","LastUpdated","CmpId","CmpVersion","ConsentScreen","ConsentLanguage","VendorListVersion","TcfPolicyVersion","UseNonStandardStacks","SpecialFeatureExpressConsent","PurposesExpressConsent","PurposesImpliedConsent","VendorExpressConsent","VendorImpliedConsent","SegmentType","PubPurposesExpressConsent","PubPurposesImpliedConsent","NumCustomPurposes","CustomPurposesExpressConsent","CustomPurposesImpliedConsent"],[Gn]:["Version","Created","LastUpdated","CmpId","CmpVersion","ConsentScreen","ConsentLanguage","VendorListVersion","PolicyVersion","IsServiceSpecific","UseNonStandardStacks","SpecialFeatureOptins","PurposeConsents","PurposeLegitimateInterests","PurposeOneTreatment","PublisherCountryCode","VendorConsents","VendorLegitimateInterests","PublisherRestrictions","PublisherPurposesSegmentType","PublisherConsents","PublisherLegitimateInterests","NumCustomPurposes","PublisherCustomConsents","PublisherCustomLegitimateInterests","VendorsAllowedSegmentType","VendorsAllowed","VendorsDisclosedSegmentType","VendorsDisclosed"],[Un]:["Version","SaleOptOutNotice","SharingOptOutNotice","SensitiveDataLimitUseNotice","SaleOptOut","SharingOptOut","SensitiveDataProcessing","KnownChildSensitiveDataConsents","PersonalDataConsents","MspaCoveredTransaction","MspaOptOutOptionMode","MspaServiceProviderMode","GpcSegmentType","GpcSegmentIncluded","Gpc"],[bn]:["Version","SharingNotice","SaleOptOutNotice","TargetedAdvertisingOptOutNotice","SaleOptOut","TargetedAdvertisingOptOut","SensitiveDataProcessing","KnownChildSensitiveDataConsents","MspaCoveredTransaction","MspaOptOutOptionMode","MspaServiceProviderMode","GpcSegmentType","GpcSegmentIncluded","Gpc"],[yn]:["Version","SharingNotice","SaleOptOutNotice","TargetedAdvertisingOptOutNotice","TargetedAdvertisingOptOut","SaleOptOut","SensitiveDataProcessing","KnownChildSensitiveDataConsents","MspaCoveredTransaction","MspaOptOutOptionMode","MspaServiceProviderMode","GpcSegmentType","GpcSegmentIncluded","Gpc"],[Ln]:["Version","SharingNotice","SaleOptOutNotice","SharingOptOutNotice","TargetedAdvertisingOptOutNotice","SensitiveDataProcessingOptOutNotice","SensitiveDataLimitUseNotice","SaleOptOut","SharingOptOut","TargetedAdvertisingOptOut","SensitiveDataProcessing","KnownChildSensitiveDataConsents","PersonalDataConsents","MspaCoveredTransaction","MspaOptOutOptionMode","MspaServiceProviderMode","GpcSegmentType","GpcSegmentIncluded","Gpc"],[Fn]:["Version","Notice","OptOutSale","LspaCovered"],[xn]:["Version","SharingNotice","SaleOptOutNotice","TargetedAdvertisingOptOutNotice","SensitiveDataProcessingOptOutNotice","SaleOptOut","TargetedAdvertisingOptOut","SensitiveDataProcessing","KnownChildSensitiveDataConsents","MspaCoveredTransaction","MspaOptOutOptionMode","MspaServiceProviderMode"],[jn]:["Version","SharingNotice","SaleOptOutNotice","TargetedAdvertisingOptOutNotice","SaleOptOut","TargetedAdvertisingOptOut","SensitiveDataProcessing","KnownChildSensitiveDataConsents","MspaCoveredTransaction","MspaOptOutOptionMode","MspaServiceProviderMode"],[Wn]:["Version","ProcessingNotice","SaleOptOutNotice","TargetedAdvertisingOptOutNotice","SaleOptOut","TargetedAdvertisingOptOut","SensitiveDataProcessing","KnownChildSensitiveDataConsents","AdditionalDataProcessingConsent","MspaCoveredTransaction","MspaOptOutOptionMode","MspaServiceProviderMode"],[Qn]:["Version","SharingNotice","SaleOptOutNotice","TargetedAdvertisingOptOutNotice","SaleOptOut","TargetedAdvertisingOptOut","SensitiveDataProcessing","KnownChildSensitiveDataConsents","AdditionalDataProcessingConsent","MspaCoveredTransaction","MspaOptOutOptionMode","MspaServiceProviderMode","GpcSegmentType","GpcSegmentIncluded","Gpc"],[Xn]:["Version","ProcessingNotice","SaleOptOutNotice","TargetedAdvertisingOptOutNotice","SaleOptOut","TargetedAdvertisingOptOut","SensitiveDataProcessing","KnownChildSensitiveDataConsents","AdditionalDataProcessingConsent","MspaCoveredTransaction","MspaOptOutOptionMode","MspaServiceProviderMode","GpcSegmentType","GpcSegmentIncluded","Gpc"],[qn]:["Version","ProcessingNotice","SaleOptOutNotice","TargetedAdvertisingOptOutNotice","SaleOptOut","TargetedAdvertisingOptOut","SensitiveDataProcessing","KnownChildSensitiveDataConsents","AdditionalDataProcessingConsent","MspaCoveredTransaction","MspaOptOutOptionMode","MspaServiceProviderMode","GpcSegmentType","GpcSegmentIncluded","Gpc"]},Zn={gppDefaultStatus:e=>null==e?0:!0===e?1:2,gppReverseDefaultStatus:e=>null==e?0:!0===e?2:1},er=Object.keys(Zn),tr=e=>t=>{var n;if(t instanceof Error?n=t:("string"!=typeof t&&(t=JSON.stringify(t)),n=new Error(t)),!e)throw n;if("function"==typeof e)return e(n);throw n},nr=null,rr=!1,ir=e=>Rn=e,sr=[],or=e=>{sr.forEach((t=>function(e,t){void 0===t&&(t=!1),t?setTimeout(e,0):e()}((()=>{t(e)}),rr)))},ar=e=>{if("function"!=typeof e)return Mn("Didomi - Error in addGPPStringUpdateListener: listener must be a function");var t;sr.push((t=e,function(){try{t(...arguments)}catch(e){Mn("Didomi - Error in addGPPStringUpdateListener: "+e.message)}}))},dr=()=>{nr.getSignalStatus()!==u.READY&&nr.setSignalStatus(u.READY)},Sr=()=>{nr.getCmpDisplayStatus()!==E.HIDDEN&&nr.setCmpDisplayStatus(E.HIDDEN)},cr=()=>{var e;try{e=nr.getGppString()}catch(e){Mn("Didomi - GPP library getGppString method failed with the error: "+e.message)}return e},Er=e=>{var t;if(!Boolean(nr&&"object"==typeof nr))throw new Error("Didomi - GPP API is not initialized");if((e=>"none"===(null==e?void 0:e.regulation))(e))return nr.setGppString("DBAA"),nr.setCmpStatus(c.LOADED),dr(),nr.setSupportedAPIs([]),void nr.setApplicableSections([-1]);var n=[],{vendors:r,purposes:i,consent_string:s}=e,o={state:{userStatus:{vendors:r,purposes:i}},transformers:N({},Zn,{default:Zn.gppDefaultStatus})};null==(t=Vn)||null==(t=t.sections)||t.forEach((e=>{if(e.name===Gn)nr.setSectionString(Gn,null!=s?s:""),nr.setFieldValue(Gn,"CmpVersion",1),n.push(Gn);else{var t=Jn[e.name];if(t){var r,i=e.fields,a=(0,fn.compute)(i,N({},o,{pick:t}));void 0!==a.Gpc&&(a.Gpc=!(0===a.Gpc||2===a.Gpc)),nr.setSectionString(e.name,""),null==(r=Object.keys(a))||r.forEach((t=>{nr.setFieldValue(e.name,t,a[t])})),n.push(e.name)}}})),Sr();var a=cr();a&&(((e,t,n)=>{n!==t&&(or(t),null==e||e.forEach((e=>nr.fireSectionChange(e))),ir(t))})(n,a,Rn),dr())},lr=()=>{nr.getCmpDisplayStatus()!==E.VISIBLE&&nr.setCmpDisplayStatus(E.VISIBLE),nr.getSignalStatus()!==u.NOT_READY&&nr.setSignalStatus(u.NOT_READY)},ur=()=>{Sr(),dr()},_r=()=>Rn,hr=e=>{var t=(e=>{var t=new Set,n=(null==e?void 0:e.sections)||[];for(var r of n)if(r.fields){var i=Object.values(r.fields);null==i||i.forEach((e=>{Array.isArray(e)?e.forEach((e=>{null!=e&&e.transformer&&!er.includes(null==e?void 0:e.transformer)&&t.add(e.transformer)})):Object.prototype.hasOwnProperty.call(e,"transformer")&&!er.includes(e.transformer)&&t.add(e.transformer)}))}return t.size>0?Array.from(t):[]})(e);if(t.length){var n=t.length>1?"Didomi - Invalid transformers names:":"Didomi - Invalid transformer name:",r=(e=>e.map((e=>"object"==typeof e?JSON.stringify(e):String(e))))(t);Mn(n.concat(" ",r.join(", ")))}},Or=e=>{var{gppConfig:t,cmpID:n,cmpVersion:r,yieldToMain:i=!1,onError:s}=e;if(nr=new vn(n,r),rr=i,Vn=t,nr.setCmpStatus(c.LOADED),Rn=nr.getGppString(),"function"==typeof s)Mn=tr(s);else{if(s)throw new Error("Didomi - onError must be a function");Mn=tr()}hr(t)},Tr=()=>{var e={};if(nr){var t=nr.cmpApiContext.gppVersion,n=nr.getObject(),r=Object.keys(n).map((e=>$n[e])),i=r.map((e=>e.toString())).join("_"),s=cr();if(!s)return;for(var o of(e.IABGPP_HDR_Version={type:"string",value:t},e.IABGPP_HDR_Sections={type:"string",value:i},e.IABGPP_HDR_GppString={type:"string",value:s},e.IABGPP_GppSID={type:"string",value:i},r))e["IABGPP_"+o+"_String"]={type:"string",value:nr.getSectionStringById(o)}}return e};GppModule=T})();