PageSourceSearch

https://cscript-cdn-use.concordia.ca/loader.js

js concordia.ca collected 2026-10-01 08:31:23 UTC 187,820 bytes, 1 lines download raw bytes

1(()=>{var e={2505(e,t,n){e.exports=n(8015)},5592(e,t,n){"use strict";var i=n(9516),s=n(7522),r=n(3948),o=n(9106),a=n(9615),c=n(2012),l=n(4202),d=n(4896),u=n(5845),S=n(8563),E=n(5656),h=n(5721);e.exports=function(e){return new Promise(function(t,n){var g,_=e.data,p=e.headers,T=e.responseType,O=i.hasOwnProperty(e,"withXSRFToken")?e.withXSRFToken:void 0;function N(){e.cancelToken&&e.cancelToken.unsubscribe(g),e.signal&&e.signal.removeEventListener("abort",g)}i.isFormData(_)&&i.isStandardBrowserEnv()&&delete p["Content-Type"];var I=new XMLHttpRequest;if(e.auth){var C=e.auth.username||"",A=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";p.Authorization="Basic "+btoa(C+":"+A)}var P=a(e.baseURL,e.url,e.allowAbsoluteUrls);function w(){if(I){var i="getAllResponseHeaders"in I?c(I.getAllResponseHeaders()):null,r={data:T&&"text"!==T&&"json"!==T?I.response:I.responseText,status:I.status,statusText:I.statusText,headers:i,config:e,request:I};s(function(e){t(e),N()},function(e){n(e),N()},r),I=null}}if(I.open(e.method.toUpperCase(),o(P,e.params,e.paramsSerializer),!0),I.timeout=e.timeout,"onloadend"in I?I.onloadend=w:I.onreadystatechange=function(){I&&4===I.readyState&&(0!==I.status||I.responseURL&&0===I.responseURL.indexOf("file:"))&&setTimeout(w)},I.onabort=function(){I&&(n(new u("Request aborted",u.ECONNABORTED,e,I)),I=null)},I.onerror=function(){n(new u("Network Error",u.ERR_NETWORK,e,I)),I=null},I.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",i=e.transitional||d;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new u(t,i.clarifyTimeoutError?u.ETIMEDOUT:u.ECONNABORTED,e,I)),I=null},i.isStandardBrowserEnv()&&(i.isFunction(O)&&(O=O(e)),!0===O||!1!==O&&l(P))){var D=e.xsrfHeaderName&&e.xsrfCookieName&&r.read(e.xsrfCookieName);D&&(p[e.xsrfHeaderName]=D)}"setRequestHeader"in I&&i.forEach(p,function(e,t){void 0===_&&"content-type"===t.toLowerCase()?delete p[t]:I.setRequestHeader(t,e)}),i.isUndefined(e.withCredentials)||(I.withCredentials=!!e.withCredentials),T&&"json"!==T&&(I.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&I.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&I.upload&&I.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(g=function(t){I&&(n(!t||t.type?new S(null,e,I):t),I.abort(),I=null)},e.cancelToken&&e.cancelToken.subscribe(g),e.signal&&(e.signal.aborted?g():e.signal.addEventListener("abort",g))),_||!1===_||0===_||""===_||(_=null);var f=E(P);f&&-1===h.protocols.indexOf(f)?n(new u("Unsupported protocol "+f+":",u.ERR_BAD_REQUEST,e)):I.send(_)})}},8015(e,t,n){"use strict";var i=n(9516),s=n(9012),r=n(5155),o=n(5343),a=n(7412),c=n(4298),l=function e(t){var n=new r(t),a=s(r.prototype.request,n);return i.extend(a,r.prototype,n),i.extend(a,n),a.create=function(n){return e(o(t,n))},a}(a);l.Axios=r,l.CanceledError=n(8563),l.CancelToken=n(3191),l.isCancel=n(3864),l.VERSION=n(9641).version,l.toFormData=n(6440),l.AxiosError=n(5845),l.Cancel=l.CanceledError,l.all=function(e){return Promise.all(e)},l.spread=n(7980),l.isAxiosError=n(5019),l.formToJSON=function(e){return c(i.isHTMLForm(e)?new FormData(e):e)},e.exports=l,e.exports.default=l},3191(e,t,n){"use strict";var i=n(8563);function s(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;this.promise.then(function(e){if(n._listeners){for(var t=n._listeners.length;t-- >0;)n._listeners[t](e);n._listeners=null}}),this.promise.then=function(e){var t,i=new Promise(function(e){n.subscribe(e),t=e}).then(e);return i.cancel=function(){n.unsubscribe(t)},i},e(function(e,s,r){n.reason||(n.reason=new i(e,s,r),t(n.reason))})}s.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},s.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},s.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},s.source=function(){var e;return{token:new s(function(t){e=t}),cancel:e}},e.exports=s},8563(e,t,n){"use strict";var i=n(5845);function s(e,t,n){i.call(this,null==e?"canceled":e,i.ERR_CANCELED,t,n),this.name="CanceledError"}n(9516).inherits(s,i,{__CANCEL__:!0}),e.exports=s},3864(e){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}}
1,5155(e,t,n){"use strict";var i=n(9516),s=n(9106),r=n(3471),o=n(4490),a=n(5343),c=n(9615),l=n(4841),d=l.validators;function u(e){this.defaults=e,this.interceptors={request:new r,response:new r}}u.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=a(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var n=t.transitional;void 0!==n&&l.assertOptions(n,{silentJSONParsing:d.transitional(d.boolean),forcedJSONParsing:d.transitional(d.boolean),clarifyTimeoutError:d.transitional(d.boolean)},!1);var s=t.paramsSerializer;null!=s&&(i.isFunction(s)?t.paramsSerializer={serialize:s}:l.assertOptions(s,{encode:d.function,serialize:d.function},!0));var r=[],c=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(c=c&&e.synchronous,r.unshift(e.fulfilled,e.rejected))});var u,S=[];if(this.interceptors.response.forEach(function(e){S.push(e.fulfilled,e.rejected)}),!c){var E=[o,void 0];for(Array.prototype.unshift.apply(E,r),E=E.concat(S),u=Promise.resolve(t);E.length;)u=u.then(E.shift(),E.shift());return u}for(var h=t;r.length;){var g=r.shift(),_=r.shift();try{h=g(h)}catch(e){_(e);break}}try{u=o(h)}catch(e){return Promise.reject(e)}for(;S.length;)u=u.then(S.shift(),S.shift());return u},u.prototype.getUri=function(e){e=a(this.defaults,e);var t=c(e.baseURL,e.url,e.allowAbsoluteUrls);return s(t,e.params,e.paramsSerializer)}
1,i.forEach(["delete","get","head","options"],function(e){u.prototype[e]=function(t,n){return this.request(a(n||{},{method:e,url:t,data:(n||{}).data}))}}),i.forEach(["post","put","patch"],function(e){function t(t){return function(n,i,s){return this.request(a(s||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}u.prototype[e]=t(),u.prototype[e+"Form"]=t(!0)}),e.exports=u},5845(e,t,n){"use strict";var i=n(9516),s=n(5235);function r(e){var t=Object.create(null);return t.value=e,t}var o="[Circular]";function a(e,t,n,s){var r;return function(e,t){return"string"==typeof e&&t[e.toLowerCase()]}(n,t)?"[REDACTED ****]":i.isArray(e)?-1!==s.indexOf(e)?o:(s.push(e),r=[],i.forEach(e,function(e,n){r[n]=a(e,t,n,s)}),s.pop(),r):i.isPlainObject(e)?-1!==s.indexOf(e)?o:(s.push(e),r={},i.forEach(e,function(e,n){r[n]=a(e,t,n,s)}),s.pop(),r):e}function c(e){return e?a(e,function(e){var t=(e&&i.isArray(e.redact)&&e.redact.length?e.redact:null)||s,n={};return i.forEach(t,function(e){"string"==typeof e&&(n[e.toLowerCase()]=!0)}),n}(e),void 0,[]):e}function l(e,t,n,i,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),i&&(this.request=i),s&&(this.response=s)}i.inherits(l,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:c(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var d=l.prototype,u=Object.create(null);["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL","ERR_FORM_DATA_DEPTH_EXCEEDED"].forEach(function(e){u[e]=r(e)}),Object.defineProperties(l,u),Object.defineProperty(d,"isAxiosError",r(!0)),l.from=function(e,t,n,s,r,o){var a=Object.create(d);return i.toFlatObject(e,a,function(e){return e!==Error.prototype}),l.call(a,e.message,t,n,s,r),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a},e.exports=l},3471(e,t,n){"use strict";var i=n(9516);function s(){this.handlers=[]}s.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},s.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},s.prototype.clear=function(){this.handlers&&(this.handlers=[])},s.prototype.forEach=function(e){i.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=s},9615(e,t,n){"use strict";var i=n(9137),s=n(4680);e.exports=function(e,t,n){var r=!i(t);return e&&(r||!1===n)?s(e,t):t}},4490(e,t,n){"use strict";var i=n(9516),s=n(2881),r=n(3864),o=n(7412),a=n(8563),c=n(7018),l=n(5380);function d(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new a}e.exports=function(e){d(e),e.headers=e.headers||{},e.data=s.call(e,e.data,e.headers,null,e.transformRequest),c(e.headers,"Accept"),c(e.headers,"Content-Type");var t=i.hasOwnProperty(e.headers,"common")&&e.headers.common?e.headers.common:{},n=e.method&&i.hasOwnProperty(e.headers,e.method)&&e.headers[e.method]?e.headers[e.method]:{};return e.headers=i.merge(t,n,e.headers),i.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),i.forEach(e.headers,function(t,n){e.headers[n]=l(t)}),(e.adapter||o.adapter)(e).then(function(t){return d(e),t.data=s.call(e,t.data,t.headers,t.status,e.transformResponse),t},function(t){return r(t)||(d(e),t&&t.response&&(t.response.data=s.call(e,t.response.data,t.response.headers,t.response.status,e.transformResponse))),Promise.reject(t)})}},5343(e,t,n){"use strict";var i=n(9516);e.exports=function(e,t){t=t||{};var n=Object.create(null);function s(e,t){return i.hasOwnProperty(e,t)?e[t]:void 0}function r(e,t){return i.hasOwnProperty(e,t)}function o(e,t){return i.isPlainObject(e)&&i.isPlainObject(t)?i.merge(e,t):i.isEmptyObject(t)?i.merge({},e):i.isPlainObject(t)?i.merge({},t):i.isArray(t)?t.slice():t}function a(n){return r(t,n)&&!i.isUndefined(t[n])?o(s(e,n),t[n]):r(e,n)&&!i.isUndefined(e[n])?o(void 0,e[n]):void 0}function c(e){if(r(t,e)&&!i.isUndefined(t[e]))return o(void 0,t[e])}function l(n){return r(t,n)&&!i.isUndefined(t[n])?o(void 0,t[n]):r(e,n)&&!i.isUndefined(e[n])?o(void 0,e[n]):void 0}function d(n){return r(t,n)?o(s(e,n),t[n]):r(e,n)?o(void 0,e[n]):void 0}var u={url:c,method:c,data:c,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,allowedSocketPaths:l,responseEncoding:l,validateStatus:d};
1return i.forEach(Object.keys(e).concat(Object.keys(t)),function(e){if("__proto__"!==e&&"constructor"!==e&&"prototype"!==e){var t=i.hasOwnProperty(u,e)?u[e]:a,s=t(e);i.isUndefined(s)&&t!==d||(n[e]=s)}}),n}},7522(e,t,n){"use strict";var i=n(5845);e.exports=function(e,t,n){var s=n.config.validateStatus;n.status&&s&&!s(n.status)?t(new i("Request failed with status code "+n.status,[i.ERR_BAD_REQUEST,i.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}},2881(e,t,n){"use strict";var i=n(9516),s=n(7412);e.exports=function(e,t,n,r){var o=this||s;return i.forEach(r,function(i){e=i.call(o,e,t,n)}),e}},7412(e,t,n){"use strict";var i=n(9516),s=n(7018),r=n(5845),o=n(4896),a=n(6440),c=n(6069),l=n(5721),d=n(4298),u=n(5235),S={"Content-Type":"application/x-www-form-urlencoded"};function E(e,t){!i.isUndefined(e)&&i.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var h,g={transitional:o,adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(h=n(5592)),h),transformRequest:[function(e,t){s(t,"Accept"),s(t,"Content-Type");var n,r=t&&t["Content-Type"]||"",o=r.indexOf("application/json")>-1,l=i.isObject(e);if(l&&i.isHTMLForm(e)&&(e=new FormData(e)),i.isFormData(e))return o?JSON.stringify(d(e)):e;if(i.isArrayBuffer(e)||i.isBuffer(e)||i.isStream(e)||i.isFile(e)||i.isBlob(e))return e;if(i.isArrayBufferView(e))return e.buffer;if(i.isURLSearchParams(e))return E(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();
1if(l){var u=i.hasOwnProperty(this,"formSerializer")?this.formSerializer:void 0,S=i.hasOwnProperty(this,"env")?this.env:void 0;if(-1!==r.indexOf("application/x-www-form-urlencoded"))return c(e,u).toString();if((n=i.isFileList(e))||r.indexOf("multipart/form-data")>-1){var h=S&&S.FormData;return a(n?{"files[]":e}:e,h&&new h,u)}}return l||o?(E(t,"application/json"),function(e){if(i.isString(e))try{return(0,JSON.parse)(e),i.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||g.transitional,n=t&&t.forcedJSONParsing,s="json"===this.responseType;if(e&&i.isString(e)&&(n&&!this.responseType||s)){var o=!(t&&t.silentJSONParsing)&&s;try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw r.from(e,r.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,redact:u.slice(),env:{FormData:l.classes.FormData,Blob:l.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};i.forEach(["delete","get","head"],function(e){g.headers[e]={}}),i.forEach(["post","put","patch"],function(e){g.headers[e]=i.merge
1(S)}),e.exports=g},4896(e){"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},786(e,t,n){e.exports=n(1894)},9641(e){e.exports={version:"0.32.0"}},170(e,t,n){"use strict";var i=n(6440);function s(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'\(\)~]|%20/g,function(e){return t[e]})}function r(e,t){this._pairs=[],e&&i(e,this,t)}var o=r.prototype;o.append=function(e,t){this._pairs.push([e,t])},o.toString=function(e){var t=e?function(t){return e.call(this,t,s)}:s;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")},e.exports=r},9012(e){"use strict";e.exports=function(e,t){return function(){return e.apply(t,arguments)}}},9106(e,t,n){"use strict";var i=n(9516),s=n(170);function r(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var o=e.indexOf("#");-1!==o&&(e=e.slice(0,o));var a,c=n&&n.encode||r,l=n&&n.serialize;return(a=l?l(t,n):i.isURLSearchParams(t)?t.toString():new s(t,n).toString(c))&&(e+=(-1===e.indexOf("?")?"?":"&")+a),e}},4680(e){"use strict";e.exports=function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}},3948(e,t,n){"use strict";var i=n(9516);e.exports=i.isStandardBrowserEnv()?{write:function(e,t,n,s,r,o){var a=[];a.push(e+"="+encodeURIComponent(t)),i.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),i.isString(s)&&a.push("path="+s),i.isString(r)&&a.push("domain="+r),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){for(var t,n=e+"=",i=document.cookie.split(";"),s=0;s<i.length;s++){for(t=i[s];" "===t.charAt(0);)t=t.substring(1);if(0===t.indexOf(n))return decodeURIComponent(t.substring(n.length))}return null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},5235(e){"use strict";e.exports=["authorization","proxy-authorization","cookie","set-cookie","x-api-key","password"]},4298(e,t,n){"use strict";var i=n(9516);e.exports=function(e){function t(e,n,s,r){var o=e[r++];if("__proto__"===o)return!0;var a=Number.isFinite(+o),c=r>=e.length;return o=!o&&i.isArray(s)?s.length:o,c?(i.hasOwnProperty(s,o)?s[o]=[s[o],n]:s[o]=n,!a):(s[o]&&i.isObject(s[o])||(s[o]=[]),t(e,n,s[o],r)&&i.isArray(s[o])&&(s[o]=function(e){var t,n,i={},s=Object.keys(e),r=s.length;for(t=0;t<r;t++)i[n=s[t]]=e[n];return i}(s[o])),!a)}if(i.isFormData(e)&&i.isFunction(e.entries)){var n={};return i.forEachEntry(e,function(e,s){t(function(e){return i.matchAll(/\w+|\[(\w*)]/g,e).map(function(e){return"[]"===e[0]?"":e[1]||e[0]})}(e),s,n,0)}),n}return null}},9137(e){"use strict";e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},5019(e,t,n){"use strict";var i=n(9516);e.exports=function(e){return i.isObject(e)&&!0===e.isAxiosError}},4202(e,t,n){"use strict";var i=n(9516);e.exports=i.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function s(e){var i=e;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=s(window.location.href),function(t){var n=i.isString(t)?s(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},7018(e,t,n){"use strict";var i=n(9516);e.exports=function(e,t){i.forEach(e,function(n,i){i!==t&&i.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[i])})}},2012(e,t,n){"use strict";var i=n(9516),s=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,r,o={};return e?(i.forEach(e.split("\n"),function(e){if(r=e.indexOf(":"),t=i.trim(e.slice(0,r)).toLowerCase(),n=i.trim(e.slice(r+1)),t){if(o[t]&&s.indexOf(t)>=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([n]):o[t]?o[t]+", "+n:n}}),o):o}},5656(e){"use strict";e.exports=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}}
1,5380(e,t,n){"use strict";var i=n(9516),s=/[^\x09\x20-\x7E\x80-\xFF]/g,r=/^[\x09\x20]+|[\x09\x20]+$/g;e.exports=function e(t){return!1===t||null==t?t:i.isArray(t)?t.map(e):String(t).replace(s,"").replace(r,"")}},7980(e){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},6440(e,t,n){"use strict";var i=n(9516),s=n(5845),r=n(786);function o(e){return i.isPlainObject(e)||i.isArray(e)}function a(e){return i.endsWith(e,"[]")?e.slice(0,-2):e}function c(e,t,n){return e?e.concat(t).map(function(e,t){return e=a(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}var l=i.toFlatObject(i,{},null,function(e){return/^is[A-Z]/.test(e)});e.exports=function(e,t,n){if(!i.isObject(e))throw new TypeError("target must be an object");t=t||new(r||FormData);var d,u=(n=i.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!i.isUndefined(t[e])})).metaTokens,S=n.visitor||O,E=n.dots,h=n.indexes,g=n.Blob||"undefined"!=typeof Blob&&Blob,_=void 0===n.maxDepth?100:n.maxDepth,p=g&&(d=t)&&i.isFunction(d.append)&&"FormData"===d[Symbol.toStringTag]&&d[Symbol.iterator];if(!i.isFunction(S))throw new TypeError("visitor must be a function");function T(e){if(null===e)return"";if(i.isDate(e))return e.toISOString();if(!p&&i.isBlob(e))throw new s("Blob is not supported. Use a Buffer instead.");return i.isArrayBuffer(e)||i.isTypedArray(e)?p&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function O(e,n,s){var r=e;if(e&&!s&&"object"==typeof e)if(i.endsWith(n,"{}"))n=u?n:n.slice(0,-2),e=JSON.stringify(e);else if(i.isArray(e)&&function(e){return i.isArray(e)&&!e.some(o)}(e)||i.isFileList(e)||i.endsWith(n,"[]")&&(r=i.toArray(e)))return n=a(n),r.forEach(function(e,s){!i.isUndefined(e)&&null!==e&&t.append(!0===h?c([n],s,E):null===h?n:n+"[]",T(e))}),!1;return!!o(e)||(t.append(c(s,n,E),T(e)),!1)}var N=[],I=Object.assign(l,{defaultVisitor:O,convertValue:T,isVisitable:o});if(!i.isObject(e))throw new TypeError("data must be an object");return function e(n,r,o){if(!i.isUndefined(n)){if((o=o||0)>_)throw new s("Maximum object depth of "+_+" exceeded (got "+o+" levels)",s.ERR_FORM_DATA_DEPTH_EXCEEDED);if(-1!==N.indexOf(n))throw Error("Circular reference detected in "+r.join("."));N.push(n),i.forEach(n,function(n,s){!0===(!(i.isUndefined(n)||null===n)&&S.call(t,n,i.isString(s)?s.trim():s,r,I))&&e(n,r?r.concat(s):[s],o+1)}),N.pop()}}(e,null,0),t}},6069(e,t,n){"use strict";var i=n(9516),s=n(6440),r=n(5721);e.exports=function(e,t){return s(e,new r.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,s){return r.isNode&&i.isBuffer(e)?(this.append(t,e.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}},4841(e,t,n){"use strict";var i=n(9641).version,s=n(5845),r={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){r[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});var o={};r.transitional=function(e,t,n){function r(e,t){return"[Axios v"+i+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,i,a){if(!1===e)throw new s(r(i," has been removed"+(t?" in "+t:"")),s.ERR_DEPRECATED);return t&&!o[i]&&(o[i]=!0,console.warn(r(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,i,a)}},e.exports={assertOptions:function(e,t,n){if("object"!=typeof e)throw new s("options must be an object",s.ERR_BAD_OPTION_VALUE);for(var i=Object.keys(e),r=i.length;r-- >0;){var o=i[r],a=t[o];if(a){var c=e[o],l=void 0===c||a(c,o,e);if(!0!==l)throw new s("option "+o+" must be "+l,s.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new s("Unknown option "+o,s.ERR_BAD_OPTION)}},validators:r}},243(e){"use strict";e.exports=FormData},2002(e,t,n){"use strict";var i=n(170);e.exports="undefined"!=typeof URLSearchParams?URLSearchParams:i},9490(e,t,n){"use strict";e.exports={isBrowser:!0,classes:{URLSearchParams:n(2002),FormData:n(243),Blob},protocols:["http","https","file","blob","url","data"]}},5721(e,t,n){"use strict";e.exports=n(9490)},9516(e,t,n){"use strict";var i,s=n(9012),r=Object.prototype.toString,o=(i=Object.create(null),function(e){var t=r.call(e);return i[t]||(i[t]=t.slice(8,-1).toLowerCase())});function a(e){return e=e.toLowerCase(),function(t){return o(t)===e}}function c(e){return Array.isArray(e)}function l(e){return void 0===e}var d=a("ArrayBuffer");function u(e){return"number"==typeof e}function S(e){return null!==e&&"object"==typeof e}function E(e){if("object"!==o(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var h=a("Date"),g=a("File"),_=a("Blob"),p=a("FileList");function T(e){return"[object Function]"===r.call(e)}var O=a("URLSearchParams");function N(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),c(e))for(var n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.call(null,e[s],s,e)}var I,C,A=(I="undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(e){return I&&e instanceof I}),P=a("HTMLFormElement"),w=(C=Object.prototype.hasOwnProperty,function(e,t){return C.call(e,t)});e.exports={isArray:c,isArrayBuffer:d,isBuffer:function(e){return null!==e&&!l(e)&&null!==e.constructor&&!l(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){var t="[object FormData]";if(!e)return!1;if("function"==typeof FormData&&e instanceof FormData)return!0;
1if(!S(e))return!1;var n=Object.getPrototypeOf(e);return!(!n||n===Object.prototype)&&!!T(e.append)&&(r.call(e)===t||T(e.toString)&&e.toString()===t)},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&d(e.buffer)},isString:function(e){return"string"==typeof e},isNumber:u,isObject:S,isPlainObject:E,isEmptyObject:function(e){if(!E(e))return!1;for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0},isUndefined:l,isDate:h,isFile:g,isBlob:_,isFunction:T,isStream:function(e){return S(e)&&T(e.pipe)},isURLSearchParams:O,isStandardBrowserEnv:function(){var e;return("undefined"==typeof navigator||"ReactNative"!==(e=navigator.product)&&"NativeScript"!==e&&"NS"!==e)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:N,merge:function e(){var t=Object.create(null);function n(n,i){var s;"__proto__"!==i&&"constructor"!==i&&"prototype"!==i&&(E(s=Object.prototype.hasOwnProperty.call(t,i)?t[i]:void 0)&&E(n)?t[i]=e(s,n):E(n)?t[i]=e({},n):c(n)?t[i]=n.slice():t[i]=n)}for(var i=0,s=arguments.length;i<s;i++)N(arguments[i],n);return t},extend:function(e,t,n){return N(t,function(t,i){e[i]=n&&"function"==typeof t?s(t,n):t}),e},trim:function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,n,i){e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,n&&Object.assign(e.prototype,n)},toFlatObject:function(e,t,n,i){var s,r,o,a={};if(t=t||{},null==e)return t;do{for(r=(s=Object.getOwnPropertyNames(e)).length;r-- >0;)o=s[r],i&&!i(o,e,t)||a[o]||(t[o]=e[o],a[o]=!0);e=!1!==n&&Object.getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:o,kindOfTest:a,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var i=e.indexOf(t,n);return-1!==i&&i===n},toArray:function(e){if(!e)return null;if(c(e))return e;var t=e.length;if(!u(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},isTypedArray:A,isFileList:p,forEachEntry:function(e,t){for(var n,i=(e&&e[Symbol.iterator]).call(e);(n=i.next())&&!n.done;){var s=n.value;t.call(e,s[0],s[1])}},matchAll:function(e,t){for(var n,i=[];null!==(n=e.exec(t));)i.push(n);return i},isHTMLForm:P,hasOwnProperty:w}},1894(e){"use strict";e.exports="object"==typeof self?self.FormData:window.FormData}};const t={};function n(i){const s=t[i];if(void 0!==s)return s.exports;const r=t[i]={exports:{}};return e[i](r,r.exports,n),r.exports}n.n=e=>{const t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{if(Array.isArray(t))for(var i=0;i<t.length;){var s=t[i++],r=t[i++];n.o(e,s)?0===r&&i++:0===r?Object.defineProperty(e,s,{enumerable:!0,value:t[i++]}):Object.defineProperty(e,s,{enumerable:!0,get:r})}else for(var s in t)n.o(t,s)&&!n.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";var e=n(2505),t=n.n(e);t().defaults.withCredentials=!1;const i=function(e){return new Promise((n,i)=>{t().get(e).then(e=>{n(e.data)}).catch(e=>{i(e)})})},s=function(e,n){return new Promise((i,s)=>{t().get(e,n).then(e=>{i(e.data)}).catch(e=>{s(e)})})},r=function(e,n,i){return new Promise((s,r)=>{try{t().post(e,n,i).then(e=>{s(e.data)}).catch(e=>{r(e)})}catch(e){r(e)}})},o=function(e,t,n,i,s,r,o,a,c,l,d){return{licenseKey:e,profileSettings:t,baseUrl:n,languageCode:i,supportedDomains:s,environment:r,region:o,recordUrlDomain:a,identityServiceUrl:c,crossDomainConsent:l,customOptions:d}},a=class{constructor(e){this.persistCookies=e.Custom1stPartyData?.length>0?e.Custom1stPartyData:[],this.privacyId=function(e){if(!e)return 1;const t=e.substring(0,e.length-1).split("|"),n=[];for(let e=0;e<t.length;e++){const i=t[e].split(","),s="1"===i[1],r={PrivacyId:Number(i[0]),Default:s,ValidFrom:i[2]};n.push(r)}n.sort(function(e,t){return Date.parse(t.ValidFrom)-Date.parse(e.ValidFrom)});const i=n.find(e=>!1===e.Default);return i?i.PrivacyId:1}(e.Template.PrivacyPolicies),this.identityServiceUrl=e.IdentityServiceEndpoint??null,this.reconsentDate=e.ReconsentDate??"1970-01-01T00:00:00.000Z",this.cookieCollectionId=e.CookieCollectionId??1,this.identityServiceUrlPrefix=e.IdentityServiceUrlPrefix??null,this.CassieCookiesExpiry=e.CassieCookiesExpiry??365,this.RejectAllCookiesExpiry=e.RejectAllCookiesExpiry??null}},c=new Set(["co.uk","org.uk","gov.uk","ac.uk","me.uk","net.uk","sch.uk","ltd.uk","plc.uk","nhs.uk","police.uk","com.au","net.au","org.au","gov.au","edu.au","asn.au","id.au","co.nz","net.nz","org.nz","govt.nz","ac.nz","school.nz","co.za","org.za","
1net.za","gov.za","ac.za","co.jp","or.jp","ne.jp","ac.jp","go.jp","com.br","net.br","org.br","gov.br","com.sg","com.cn","net.cn","org.cn","gov.cn","ak.us","al.us","ar.us","az.us","ca.us","co.us","ct.us","dc.us","de.us","fl.us","ga.us","gu.us","hi.us","ia.us","id.us","il.us","in.us","ks.us","ky.us","la.us","ma.us","md.us","me.us","mi.us","mn.us","mo.us","ms.us","mt.us","nc.us","nd.us","ne.us","nh.us","nj.us","nm.us","nv.us","ny.us","oh.us","ok.us","or.us","pa.us","pr.us","ri.us","sc.us","sd.us","tn.us","tx.us","ut.us","va.us","vi.us","vt.us","wa.us","wi.us","wv.us","wy.us"]);function l(e){if(!e)return"";let t=String(e).trim().toLowerCase();if(t=t.replace(/^[a-z][a-z0-9+.-]*:\/\//,""),t=t.split(/[/?#]/)[0],t=t.split("@").pop(),t.startsWith("[")){const e=t.indexOf("]");-1!==e&&(t=t.slice(0,e+1))}else t.indexOf(":")===t.lastIndexOf(":")&&(t=t.split(":")[0]);return t=t.replace(/^www\./,""),t}function d(e){const t=l(e);if(!t)return"";if(/^(\d{1,3}\.){3}\d{1,3}$/.test(t))return t;const n=t.split(".");if(n.length<3)return t;const i=n.slice(-2).join("."),s=c.has(i)?3:2;return n.slice(-s).join(".")}const u=function(e){function t(e){return d(e)||null}function n(e,t){const n=e||window.location.hostname;return t?l(n):d(n)}return e&&(e.environment="production"===e.environment?"":e.environment),{getRootDomain:t,getDomainName:n,getDefaultSubmissionUrl:function(){const t=e.recordUrlDomain;if(t||t?.length>0)return t;const{region:i}=e;let s=e?.environment;return s&&s?.length>0&&(s=`-${s}`),`https://cscript-${i}${s}.${n()}/cookiesapi/submit`},getSubmissionUrl:function(){const t=""===e.environment?"":`-${e.environment}`,n=window?.cassieResourceRootDomain??"cassiecloud.com";return`https://cscript-${e.region}${t}.${n}/cookiesapi/submit`},determineJsonUrl:function(){return`${e.baseUrl}/${e.licenseKey}/V2/${e.profileSettings.WidgetId}_${e.languageCode}.json`},checkDomain:function(e){if("all"===e||"N/A"===e)return!0;const n=e.trim().split(",");for(let e=0;e<n.length;e++){let i=n[e].trim();if("all"===i)return!0;-1!==i.indexOf("*.")&&(i=i.replace("*.",""));const s=document.domain;if(-1!==s.indexOf(i))return!0;const r=t(`https://${i}`);if(r&&-1!==s.indexOf(r))return!0}return!1}}},S=function(e,t){e&&0!==e.length&&function(e,t){const n=t?"head":"body",i=document.createElement("body"),s=["script","link","meta","title","style","base","noscript"];i.innerHTML=e;const{children:r}=i;for(let e=0;e<r.length;e++){const i=r[e],o=document.createElement(i.tagName.toLocaleLowerCase());for(let e=0;e<i.attributes.length;e++){const t=i.attributes[e];o.setAttribute(t.name,t.value)}o.innerHTML=i.innerHTML,s.includes(o.tagName.toLocaleLowerCase())||!t?document.getElementsByTagName(n)[0].appendChild(o):document.getElementsByTagName("body")[0].appendChild(o)}i.remove()}(e,t)},E=async function(e,t,n,i,r,o,a,c,l,d,u,S,E){const h=`${l}/Home/SaveConsent?accessKey=${t}&domain=${d}&consentedCookieIds=${n}&cookieFormConsent=${i}&runFirstCookieIds=${r}&privacyCookieIds=${o}&custom1stPartyData=${a}&privacyLink=${c}${u?`&userProfile=${u}`:""}&cookieCollectionId=${S}&expiryDays=${e}&gtmConsent=${E}`,g=await s(h,{withCredentials:!0});return JSON.parse(g.CassieConsent)},h=async function(e,t,n,i,r,o){const a=`${i}/Home/Index?accessKey=${t}&domain=${n}${r?`&userProfile=${r}`:""}&cookieCollectionId=${o}&expiryDays=${e}`;return await s(a,{withCredentials:!0})},g=async function(e,t,n,i,r){let o=`${n}/Home/CreateIdentifier?cassieGuid=${encodeURIComponent(t)}&accessKey=${encodeURIComponent(e)}`;return Number.isFinite(i)&&(o+=`&consentDate=${i}`),Number.isFinite(r)&&(o+=`&expiryDays=${r}`),await s(o,{withCredentials:!0})},_=function(){return/Trident\/|MSIE/.test(window.navigator.userAgent)};function p(e){return e&&"string"==typeof e&&""!==e.trim()?e.split(".").map(e=>{const t=e.split("-");if(2!==t.length)return null;const n=t[0].match(/s(\d+)c(\d+)/);return n?{FieldID:`s${n[1]}_c${n[2]}`,IsChecked:parseInt(t[1],10)}:null}).filter(e=>null!==e):[]}function T(e){try{return JSON.parse(e),!0}catch(e){return!1}}const O=class{constructor(e,t=null){this.accessKey=e,this.cookies=this.getAllCookies(),this.defaultCookieExpiry=t??365,this.maxTimeout=2e3}getAllCookies(){const e={},t=document.cookie.split(";");for(let n=1;n<=t.length;n++){const i=t[n-1].split("=");let s=i[0],r=i[1];void 0!==s&&s.length>0&&(s=s.trim()),void 0!==r&&r.length>0&&(r=r.trim()),e[s]=r}return e}getCookieValueByName=function(e){const t=`; ${document.cookie}`.split(`; ${e}=`);return 2===t.length?t.pop().split(";").shift().trim():null};sleep(e){return new Promise(t=>setTimeout(t,e))}getProtectedCookieByName=function(e,t,n=2e3){return new Promise(async i=>{const s=n/100;for(let n=1;n<s;n++){const n=`; ${document.cookie}`.split(`; ${e}=`);if(2===n.length){const s=n.pop().split(";").shift();i({Key:e,Value:s,Expiry:t})}await this.sleep(100)}setTimeout(i(null),n)})};getFormConsent=function(){const e=`SyrenisCookieFormConsent_${this.accessKey}`,t=this.getCookieValueByName(e);
1if(!t)return[];try{return T(t)?JSON.parse(t)??[]:p(t)}catch(e){return[]}};getProtectedCookies=async function(e,t){let n=[],i=[];if(0===e?.length)return i;e.includes(",")?n=e.split(","):n[0]=e.trim();for(let e=0;e<n.length;e++){const s=n[e]?.trim();if(!s)continue;const r=t.find(e=>{const t=e.browserCookieName.trim().toLowerCase();let n=[];return t.includes(",")?n=t.split(",").map(e=>e.trim()):n.push(t),n.includes(s.toLowerCase())});if(!r||0===r?.expiry)continue;const o=new Date;o.setDate(o.getDate()+r.expiry),i.push(this.getProtectedCookieByName(s,o.getTime().toString(),this.maxTimeout))}return i=(await Promise.all(i)).filter(e=>e),i.filter(e=>e)};recreateProtectedCookies(){try{const e=this.getCookieValueByName(`SyrenisCustom_${this.accessKey}`);let t=[];t=T(e)?JSON.parse(e):function(e){if(!e||"string"!=typeof e||""===e.trim())return[];let t=null;try{t=function(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");for(;t.length%4!=0;)t+="=";return decodeURIComponent(Array.from(atob(t)).map(e=>`%${e.charCodeAt(0).toString(16).padStart(2,"0")}`).join(""))}(e)}catch(e){return console.error("Error decoding base64 string:",e),[]}return t.split("|$|").map(e=>{const t=e.split("|*|");return{Key:t[0],Value:t[1],Expiry:t[2]}})}(e);for(let e=0;e<t.length;e++){const n=t[e];this.getAllCookies()[n.Key]||this.storeCookieWithTimeExpiry(n.Key,n.Value,null,n.Expiry)}}catch(e){}}storeCookie=function(e,t,n,i,s){const r=i??this.defaultCookieExpiry,o=new Date;null!=s&&Number.isFinite(s)?o.setTime(s+24*r*60*60*1e3):o.setTime(o.getTime()+24*r*60*60*1e3);const a=`expires=${o.toUTCString()}`,c=n??window.document.domain,l=_()?"":`;domain=${c}`;let d=t;try{d=JSON.parse(t)}catch{}let u=d;var S;Array.isArray(d)&&0===d.length||"string"==typeof d&&"[]"===d.trim()?u="":"object"==typeof d&&function(e){if(!e||"string"!=typeof e)return!1;const t=e.toLowerCase();return t.startsWith("syrenis")||t.startsWith("cassie")}(e)?u=Array.isArray(d)&&d.length>0&&d[0].FieldID?(S=d)&&Array.isArray(S)&&0!==S.length?S.map(e=>`${e.FieldID.replace("_","")}-${e.IsChecked}`).join("."):"":Array.isArray(d)&&d.length>0&&d[0].Key?function(e){return e&&Array.isArray(e)&&0!==e.length?(t=e.map(e=>`${e.Key}|*|${e.Value}|*|${e.Expiry}`).join("|$|"),btoa(Array.from((new TextEncoder).encode(t)).map(e=>String.fromCharCode(e)).join("")).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")):"";var t}(d):e.includes("GtmConsent")?function(e){return e&&Array.isArray(e)&&0!==e.length?e.map(e=>Object.entries(e).map(([e,t])=>`${e}:${t}`).join("|")).join("|"):""}(d):JSON.stringify(d):"object"==typeof d&&(u=JSON.stringify(d));const E=`${e}=${u};${a}${l};path=/`;document.cookie=E};storeCookieWithTimeExpiry=function(e,t,n,i){const s=new Date;s.setTime(i);const r=`${e}=${t};expires=${s.toUTCString()};domain=${n??window.document.domain};path=/`;document.cookie=r};hasConsent=function(){const e=this.getAllCookies(),t=e[`SyrenisCookieFormConsent_${this.accessKey}`],n=e[`SyrenisGuid_${this.accessKey}`];return!(!t||!n)};getVisitGuid=function(){return this.getCookieValueByName(`SyrenisGuid_${this.accessKey}`)};getConsentDate=function(){let e=this.getCookieValueByName(`SyrenisCookieConsentDate_${this.accessKey}`);return e||(e=new Date(1970,0,1).getTime()),e};getPrivacyPolicyId=function(){const e=this.getCookieValueByName(`SyrenisCookiePrivacyLink_${this.accessKey}`);return e&&0!==e.length?e:null};getProtectedCookiesContainer=function(){return this.getCookieValueByName(`SyrenisCustom_${this.accessKey}`)}};let N,I,C;function A(e){const t=e.split(",").map(e=>e.trim().replace("*","").replace("https://","").replace("http://","")).filter(e=>(e||e.length>0)&&"all"!==e.trim()).map(e=>e.trim().replace("*",""));return 0===t.length&&t.push(`.${document.domain}`),t}function P(e){let t=[];for(let n=0;n<e.length;n++){const i=e[n],s=i.FieldID.indexOf("_"),r=i.FieldID.substring(1,s),o=i.FieldID.substr(s+2),a=1==i.IsChecked;t.push({statementId:r,channelId:o,isOptIn:a})}return t}const w=function(e,t){function n(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})}function i(e){e.sort((e,t)=>
1e.executionOrder-t.executionOrder),e.sort((e,t)=>t.isRunFirst-e.isRunFirst),e.forEach(e=>{e.isStrictlyNecessary||(e.isOptIn?(S(e.bodyOptIn,!1),S(e.headOptIn,!0)):(S(e.bodyOptOut,!1),S(e.headOptOut,!0)))})}function s(e,t,n){const i=void 0!==t&&t!==C?new O(I.profileSettings.AccessKey,t):N;for(const[s,r]of Object.entries(e))A(I.supportedDomains).forEach(e=>{i.storeCookie(s.replace("Cassie","Syrenis"),r,e,t,n)})}function o(e,t){e.forEach(e=>{const n=t.find(t=>t.channelId==e.channelId);e.isStrictlyNecessary?(e.hasConsent=!0,e.isOptIn=!0):n&&(e.hasConsent=!0,e.isOptIn=n.isOptIn)}),i(e.filter(e=>e.hasConsent))}return I=e,C=t,N=new O(I.profileSettings.AccessKey,C),{runStrictlyNecessaryScripts:function(e){e.sort((e,t)=>e.executionOrder-t.executionOrder),e.sort((e,t)=>t.isRunFirst-e.isRunFirst),e.forEach(e=>{e.isStrictlyNecessary&&(S(e.bodyOptIn,!1),S(e.headOptIn,!0))})},runOptInScripts:i,placeSyrenisCookies:s,processConsent:async function(e,t,i,r,a=!1){const c=I.profileSettings.AccessKey;this.runStrictlyNecessaryScripts(t),o(t,e);const l=await N.getProtectedCookies(i.persistCookies,t),d=N.getCookieValueByName("SyrenisGtmConsent_"+c)??"",u=a&&null!=i.RejectAllCookiesExpiry?i.RejectAllCookiesExpiry:C;I.identityServiceUrl?s(await E(u,c,JSON.stringify([]),JSON.stringify(r),JSON.stringify([]),JSON.stringify([]),JSON.stringify(l),i.privacyId,I.identityServiceUrl,I.supportedDomains,I.crossDomainConsent,I?.profileSettings?.CookieCollectionId??1,d),u):function(e,t,i){let s=I.profileSettings.AccessKey,r=A(I.supportedDomains);var o=n(),a=(new Date).getTime();const c=void 0!==i&&i!==C?new O(s,i):N;r.forEach(n=>{null===c.getCookieValueByName("SyrenisGuid_"+s)&&c.storeCookie("SyrenisGuid_"+s,o,n),c.storeCookie("SyrenisCookieFormConsent_"+s,e,n),c.storeCookie("SyrenisCookiePrivacyLink_"+s,t,n),c.storeCookie("SyrenisCookieConsentDate_"+s,a,n)})}(r,i.privacyId,u)},runConsent:async function(e){let t=I?.profileSettings?.CookieCollectionId??1;if(I.identityServiceUrl&&await async function(e){let t=(!N.hasConsent()||I.crossDomainConsent)&&await h(C,I.profileSettings.AccessKey,I.supportedDomains,I.identityServiceUrl,I.crossDomainConsent,e);if(null!==t){const e=JSON.parse(t.CassieConsent),i=t.Restored,r=t.CassieGuid,o="boolean"!=typeof e&&e;let a=null;if(o){const e=Object.keys(o).find(e=>e.includes("CookieConsentDate_"));if(e&&o[e]){const t=o[e];a="string"==typeof t?parseFloat(t):t}}if(o&&s(o,void 0,a),!1===i&&I.crossDomainConsent){var n=function(e,t){const n=t.identityServiceUrl,i=n.indexOf("."),s=n.substring(0,i+1),r=e.split(","),o=[];return r.forEach(e=>{const t=s+e.trim().replace(/^\*\./,"");o.includes(t)||o.push(t)}),o}(I.supportedDomains,I);const e=I.profileSettings.AccessKey,t=n.map(t=>g(e,r,t,a,C));(await Promise.allSettled(t)).forEach((e,t)=>{"rejected"===e.status&&console.warn("[Cassie] CreateIdentifier failed for domain",n[t],e.reason?.message||e.reason)})}}}(t),!N.hasConsent())return;const n=N.getCookieValueByName("SyrenisCookieFormConsent_"+I.profileSettings.AccessKey);let i;try{i=T(n)?JSON.parse(n):p(n)}catch(e){return void console.error("Error parsing cookie consent:",e)}let r=i.map(e=>{let t=e.FieldID.indexOf("c")+1;return{channelId:e.FieldID.substring(t,e.FieldID.length),isOptIn:1==e.IsChecked}});N.recreateProtectedCookies(),this.runStrictlyNecessaryScripts(e),o(e,r)},getCurrentConsent:function(){return P(N.getFormConsent())},postConsentToCassie:async function(e,t,i,s){return new Promise(async(o,a)=>{let c={CookieFormID:I?.profileSettings?.WidgetId??null,LicenseID:I?.licenseKey,DivID:s,Preferences:N.getFormConsent(),appCodeName:navigator.appCodeName,appName:navigator.appName,appVersion:navigator.appVersion,cookieEnabled:navigator.cookieEnabled,geolocation:"",language:navigator.language,platform:navigator.platform,referrer:document.referrer.replace(/&/g,"%26"),submissionSource:t??"undefined_source",visitGUID:N.getVisitGuid()??n(),WebsiteURL:document.URL.replace(/&/g,"%26"),PrivacyPolicyID:i,custom1stPartyData:N.getProtectedCookiesContainer()};try{return o(await r(e,c,{timeout:5e3}))}catch(e){return a(e)}})}
1,dropStrictlyNecessaryCookies:function(e,t){let i=I.profileSettings.AccessKey,s=A(I.supportedDomains);var r=n(),o=(new Date).getTime();s.forEach(t=>{null===N.getCookieValueByName("SyrenisGuid_"+i)&&N.storeCookie("SyrenisGuid_"+i,r,t),N.storeCookie("SyrenisCookiePrivacyLink_"+i,e,t),N.storeCookie("SyrenisCookieConsentDate_"+i,o,t)}),this.runStrictlyNecessaryScripts(t)},saveGtmConsent:async function(e){let t=I.profileSettings.AccessKey,n=A(I.supportedDomains),i=e;n.forEach(e=>{N.storeCookie("SyrenisGtmConsent_"+t,i,e)}),n[0];const s="SyrenisGtmConsent_"+t;await new Promise(e=>setTimeout(e,10)),N.getCookieValueByName(s)||console.warn("GTM consent cookie may not have been set properly")}}},D=class{constructor(e){this.cookieId=e.CookieID,this.scriptName=e.CookieName,this.scriptDescription=e.CookieDescription??new String(""),this.isStrictlyNecessary=e.IsStrictlyNecessary??!1,this.isRunFirst=e.IsRunFirst??!1,this.executionOrder=e.ExecutionOrder??100,this.bodyOptIn=e.CookieBodyDivID,this.bodyOptOut=e.CookieBodyDivIDOptOut,this.headOptIn=e.CookieScript,this.headOptOut=e.CookieScriptOptOut,this.cookieUrl=e.CookieURL,this.channelId=e.ChannelID,this.expiry=e.Expiry,this.browserCookieName=e.BrowserCookieName,this.gtmConsentType=e.GtmConsentType,this.gpcEnabled=e.GpcEnabled??e.GPCEnabled??!1}CreateScript(e){this.cookieId=e.cookieId,this.scriptName=e.scriptName,this.scriptDescription=e.scriptDescription,this.isStrictlyNecessary=e.isStrictlyNecessary,this.isRunFirst=e.isRunFirst,this.executionOrder=e.executionOrder,this.bodyOptIn=e.bodyOptIn,this.bodyOptOut=e.bodyOptOut,this.headOptIn=e.headOptIn,this.headOptOut=e.headOptOut,this.cookieUrl=e.cookieUrl,this.channelId=e.channelID,this.gtmConsentType=e.gtmConsentType,this.gpcEnabled=e.gpcEnabled}},f={emit:function(e,t){!function(e,t){const n=t||{bubbles:!0,cancelable:!1},i=document.createEvent("CustomEvent");i.initCustomEvent(e,n.bubbles,n.cancelable,n.detail),document.dispatchEvent(i)}(e,{detail:t,bubbles:!0,cancelable:!0})}};class m{gppVersion;cmpStatus;cmpDisplayStatus;signalStatus;supportedAPIs;cmpId;sectionList;applicableSections;gppString;parsedSections;constructor(e){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 R{callback;parameter;success=!0;cmpApiContext;constructor(e,t,n){this.cmpApiContext=e,Object.assign(this,{callback:t,parameter:n})}execute(){try{return this.respond()}catch(e){return this.invokeCallback(null),null}}invokeCallback(e){const t=null!==e;this.callback&&this.callback(e,t)}}class V extends R{respond(){let e=new m(this.cmpApiContext);this.invokeCallback(e)}}class M extends R{respond(){if(!this.parameter||0===this.parameter.length)throw new Error("<section>.<field> parameter required");let e=this.parameter.split(".");if(2!=e.length)throw new Error("Field name must be in the format <section>.<fieldName>");let t=e[0],n=e[1],i=null;"tcfeuv2"!=this.parameter&&(i=this.cmpApiContext.gppModel.getFieldValue(t,n)),this.invokeCallback(i)}}class U extends R{respond(){if(!this.parameter||0===this.parameter.length)throw new Error("<section> parameter required");let e=null;"tcfeuv2"!=this.parameter&&this.cmpApiContext.gppModel.hasSection(this.parameter)&&(e=this.cmpApiContext.gppModel.getSection(this.parameter)),this.invokeCallback(e)}}class y extends R{respond(){if(!this.parameter||0===this.parameter.length)throw new Error("<section>[.version] parameter required");let e=this.cmpApiContext.gppModel.hasSection(this.parameter);this.invokeCallback(e)}}var G,b,v,L,F,x;!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"}(G||(G={}));class k{eventName;listenerId;data;pingData;constructor(e,t,n,i){this.eventName=e,this.listenerId=t,this.data=n,this.pingData=i}}class B extends R{respond(){let e=this.cmpApiContext.eventQueue.add({callback:this.callback,parameter:this.parameter}),t=new k("listenerRegistered",e,!0,new m(this.cmpApiContext));this.invokeCallback(t)}}class H extends R{respond(){let e=this.parameter,t=this.cmpApiContext.eventQueue.remove(e),n=new k("listenerRemoved",e,t,new m(this.cmpApiContext));this.invokeCallback(n)}}class j{static[G.ADD_EVENT_LISTENER]=B;static[G.GET_FIELD]=M;static[G.GET_SECTION]=U;static[G.HAS_SECTION]=y;static[G.PING]=V;
1static[G.REMOVE_EVENT_LISTENER]=H}!function(e){e.STUB="stub",e.LOADING="loading",e.LOADED="loaded",e.ERROR="error"}(b||(b={})),function(e){e.VISIBLE="visible",e.HIDDEN="hidden",e.DISABLED="disabled"}(v||(v={})),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"}(F||(F={}));class K{callQueue;customCommands;cmpApiContext;constructor(e,t){if(this.cmpApiContext=e,t){let e=G.ADD_EVENT_LISTENER;if(t?.[e])throw new Error(`Built-In Custom Commmand for ${e} not allowed`);if(e=G.REMOVE_EVENT_LISTENER,t?.[e])throw new Error(`Built-In Custom Commmand for ${e} 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,i){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 j[e](this.cmpApiContext,t,n).execute():t&&t(null,!1)}}purgeQueuedCalls(){const 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!==j[e]}}class W{eventQueue=new Map;queueNumber=1e3;cmpApiContext;constructor(e){this.cmpApiContext=e;try{let e=window.__gpp("events")||[];for(var t=0;t<e.length;t++){let n=e[t];this.eventQueue.set(n.id,{callback:n.callback,parameter:n.parameter})}}catch(e){console.log(e)}}add(e){return this.eventQueue.set(this.queueNumber,e),this.queueNumber++}get(e){return this.eventQueue.get(e)}remove(e){return this.eventQueue.delete(e)}exec(e,t){this.eventQueue.forEach((n,i)=>{let s=new k(e,i,t,new m(this.cmpApiContext));n.callback(s,!0)})}clear(){this.queueNumber=1e3,this.eventQueue.clear()}get size(){return this.eventQueue.size}}class z extends Error{constructor(e){super(e),this.name="InvalidFieldError"}}class ${segments;encodedString=null;dirty=!1;decoded=!0;constructor(){this.segments=this.initializeSegments()}hasField(e){this.decoded||(this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!0);for(let t=0;t<this.segments.length;t++){let n=this.segments[t];if(n.getFieldNames().includes(e))return n.hasField(e)}return!1}getFieldValue(e){this.decoded||(this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!0);for(let t=0;t<this.segments.length;t++){let n=this.segments[t];if(n.hasField(e))return n.getFieldValue(e)}throw new z("Invalid field: '"+e+"'")}setFieldValue(e,t){this.decoded||(this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!0);for(let n=0;n<this.segments.length;n++){let i=this.segments[n];if(i.hasField(e))return void i.setFieldValue(e,t)}throw new z("Invalid field: '"+e+"'")}toObj(){let e={};for(let t=0;t<this.segments.length;t++){let n=this.segments[t].toObj();for(const[t,i]of Object.entries(n))e[t]=i}return e}encode(){return(null==this.encodedString||0===this.encodedString.length||this.dirty)&&(this.encodedString=this.encodeSection(this.segments),this.dirty=!1,this.decoded=!0),this.encodedString}decode(e){this.encodedString=e,this.segments=this.decodeSection(this.encodedString),this.dirty=!1,this.decoded=!1}setIsDirty(e){this.dirty=e}}class Y extends Error{constructor(e){super(e),this.name="DecodingError"}}class J extends Error{constructor(e){super(e),this.name="EncodingError"}}class q{static encode(e,t){let n=[];if(e>=1)for(n.push(1);e>=2*n[0];)n.unshift(2*n[0]);let i="";for(let t=0;t<n.length;t++){let s=n[t];e>=s?(i+="1",e-=s):i+="0"}if(i.length>t)throw new J("Numeric value '"+e+"' is too large for a bit string length of '"+t+"'");for(;i.length<t;)i="0"+i;return i}static decode(e){if(!/^[0-1]*$/.test(e))throw new Y("Undecodable FixedInteger '"+e+"'");let t=0,n=[];for(let t=0;t<e.length;t++)n[e.length-(t+1)]=0===t?1:2*n[e.length-t];for(let i=0;i<e.length;i++)"1"===e.charAt(i)&&(t+=n[i]);return t}}class Q{static DICT="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";static REVERSE_DICT=new Map([["A",0],["B",1],["C",2],["D",3],["E",4],["F",5],["G",6],["H",7],["I",8],["J",9],["K",10],["L",11],["M",12],["N",13],["O",14],["P",15],["Q",16],["R",17],["S",18],["T",19],["U",20],["V",21],["W",22],["X",23],["Y",24],["Z",25],["a",26],["b",27],["c",28],["d",29],["e",30],["f",31],["g",32],["h",33],["i",34],["j",35],["k",36],["l",37],["m",38],["n",39],["o",40],["p",41],["q",42],["r",43],["s",44],["t",45],["u",46],["v",47],["w",48],["x",49],["y",50],["z",51],["0",52],["1",53],["2",54],["3",55],["4",56],["5",57],["6",58],["7",59],["8",60],["9",61],["-",62],["_",63]]);encode(e){if(!/^[0-1]*$/.test(e))throw new J("Unencodable Base64Url '"+e+"'");e=this.pad(e);let t="",n=0;for(;n<=e.length-6;){let i=e.substring(n,n+6);try{let e=q.decode(i);t+=Q.DICT.charAt(e),n+=6}catch(t){throw new J("Unencodable Base64Url '"+e+"'")}}return t}decode(e){if(!/^[A-Za-z0-9\-_]*$/.test(e))throw new Y("Undecodable Base64URL string '"+e+"'");let t="";for(let n=0;n<e.length;n++){let i=e.charAt(n),s=Q.REVERSE_DICT.get(i);t+=q.encode(s,6)}return t}}class X extends Q{static instance=new X;constructor(){super()}static getInstance(){return this.instance}pad(e){for(;e.length%8>0;)e+="0";for(;e.length%6>0;)e+="0";return e}}class Z{static instance=new Z;constructor(){}static getInstance(){return this.instance}encode(e,t){let n="";for(let i=0;i<t.length;i++){let s=t[i];if(!e.containsKey(s))throw new Error("Field not found: '"+s+"'");n+=e.get(s).encode()}return n}decode(e,t,n){let i=0;for(let s=0;s<t.length;s++){let r=t[s];if(!n.containsKey(r))throw new Error("Field not found: '"+r+"'");{let t=n.get(r);try{let n=t.substring(e,i);t.decode(n),i+=n.length}catch(e){if("SubstringError"!==e.name||t.getHardFailIfMissing())throw new Y("Unable to decode field '"+r+"'");return}}}}}class ee{static encode(e){let t=[];if(e>=1&&(t.push(1),e>=2)){t.push(2);let n=2;
1for(;e>=t[n-1]+t[n-2];)t.push(t[n-1]+t[n-2]),n++}let n="1";for(let i=t.length-1;i>=0;i--){let s=t[i];e>=s?(n="1"+n,e-=s):n="0"+n}return n}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<2||e.indexOf("11")!==e.length-2)throw new Y("Undecodable FibonacciInteger '"+e+"'");let t=0,n=[];for(let t=0;t<e.length-1;t++)0===t?n.push(1):1===t?n.push(2):n.push(n[t-1]+n[t-2]);for(let i=0;i<e.length-1;i++)"1"===e.charAt(i)&&(t+=n[i]);return t}}class te{static encode(e){if(!0===e)return"1";if(!1===e)return"0";throw new J("Unencodable Boolean '"+e+"'")}static decode(e){if("1"===e)return!0;if("0"===e)return!1;throw new Y("Undecodable Boolean '"+e+"'")}}class ne{static encode(e){e=e.sort((e,t)=>e-t);let t=[],n=0,i=0;for(;i<e.length;){let n=i;for(;n<e.length-1&&e[n]+1===e[n+1];)n++;t.push(e.slice(i,n+1)),i=n+1}let s=q.encode(t.length,12);for(let e=0;e<t.length;e++)if(1==t[e].length){let i=t[e][0]-n;n=t[e][0],s+="0"+ee.encode(i)}else{let i=t[e][0]-n;n=t[e][0];let r=t[e][t[e].length-1]-n;n=t[e][t[e].length-1],s+="1"+ee.encode(i)+ee.encode(r)}return s}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<12)throw new Y("Undecodable FibonacciIntegerRange '"+e+"'");let t=[],n=q.decode(e.substring(0,12)),i=0,s=12;for(let r=0;r<n;r++){let n=te.decode(e.substring(s,s+1));if(s++,!0===n){let n=e.indexOf("11",s),r=ee.decode(e.substring(s,n+2))+i;i=r,s=n+2,n=e.indexOf("11",s);let o=ee.decode(e.substring(s,n+2))+i;i=o,s=n+2;for(let e=r;e<=o;e++)t.push(e)}else{let n=e.indexOf("11",s),r=ee.decode(e.substring(s,n+2))+i;i=r,t.push(r),s=n+2}}return t}}class ie extends Error{constructor(e){super(e),this.name="ValidationError"}}class se{hardFailIfMissing;validator;value;constructor(e=!0){this.hardFailIfMissing=e}withValidator(e){return this.validator=e,this}hasValue(){return void 0!==this.value&&null!==this.value}getValue(){return this.value}setValue(e){if(this.validator&&!this.validator.test(e))throw new ie("Invalid value '"+e+"'");this.value=e}getHardFailIfMissing(){return this.hardFailIfMissing}}class re extends Y{constructor(e){super(e),this.name="SubstringError"}}class oe{static substring(e,t,n){if(n>e.length||t<0||t>n)throw new re("Invalid substring indexes "+t+":"+n+" for string of length "+e.length);return e.substring(t,n)}}class ae extends se{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return ne.encode(this.value)}catch(e){throw new J(e)}}decode(e){try{this.value=ne.decode(e)}catch(e){throw new Y(e)}}substring(e,t){try{let n=q.decode(oe.substring(e,t,t+12)),i=t+12;for(let t=0;t<n;t++)i="1"===e.charAt(i)?e.indexOf("11",e.indexOf("11",i+1)+2)+2:e.indexOf("11",i+1)+2;return oe.substring(e,t,i)}catch(e){throw new re(e)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((e,t)=>e-t))}}class ce extends se{bitStringLength;
1constructor(e,t,n=!0){super(n),this.bitStringLength=e,this.setValue(t)}encode(){try{return q.encode(this.value,this.bitStringLength)}catch(e){throw new J(e)}}decode(e){try{this.value=q.decode(e)}catch(e){throw new Y(e)}}substring(e,t){try{return oe.substring(e,t,t+this.bitStringLength)}catch(e){throw new re(e)}}}class le{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"}(x||(x={}));const de=[x.ID,x.VERSION,x.SECTION_IDS];class ue{fields;encodedString=null;dirty=!1;decoded=!0;constructor(){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 z("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 z(e+" not found");this.fields.get(e).setValue(t),this.dirty=!0}toObj(){let e={},t=this.getFieldNames();for(let n=0;n<t.length;n++){let i=t[n],s=this.getFieldValue(i);e[i]=s}return e}encode(){return(null==this.encodedString||0===this.encodedString.length||this.dirty)&&(this.validate(),this.encodedString=this.encodeSegment(this.fields),this.dirty=!1,this.decoded=!0),this.encodedString}decode(e){this.encodedString=e,this.dirty=!1,this.decoded=!1}}class Se extends ue{base64UrlEncoder=X.getInstance();bitStringEncoder=Z.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return de}initializeFields(){let e=new le;return e.put(x.ID.toString(),new ce(6,Ee.ID)),e.put(x.VERSION.toString(),new ce(6,Ee.VERSION)),e.put(x.SECTION_IDS.toString(),new ae([])),e}encodeSegment(e){let 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{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new Y("Unable to decode HeaderV1CoreSegment '"+e+"'")}}}class Ee extends ${static ID=3;static VERSION=1;static NAME="header";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Ee.ID}getName(){return Ee.NAME}getVersion(){return Ee.VERSION}initializeSegments(){let e=[];return e.push(new Se),e}decodeSection(e){let t=this.initializeSegments();if(null!=e&&0!==e.length){let n=e.split(".");for(let e=0;e<t.length;e++)n.length>e&&t[e].decode(n[e])}return t}encodeSection(e){let t=[];for(let n=0;n<e.length;n++){let i=e[n];t.push(i.encode())}return t.join(".")}}var he;!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.POLICY_VERSION="PolicyVersion",e.IS_SERVICE_SPECIFIC="IsServiceSpecific",e.USE_NON_STANDARD_STACKS="UseNonStandardStacks",e.SPECIAL_FEATURE_OPTINS="SpecialFeatureOptins",e.PURPOSE_CONSENTS="PurposeConsents",e.PURPOSE_LEGITIMATE_INTERESTS="PurposeLegitimateInterests",e.PURPOSE_ONE_TREATMENT="PurposeOneTreatment",e.PUBLISHER_COUNTRY_CODE="PublisherCountryCode",e.VENDOR_CONSENTS="VendorConsents",e.VENDOR_LEGITIMATE_INTERESTS="VendorLegitimateInterests",e.PUBLISHER_RESTRICTIONS="PublisherRestrictions",e.PUBLISHER_PURPOSES_SEGMENT_TYPE="PublisherPurposesSegmentType",e.PUBLISHER_CONSENTS="PublisherConsents",e.PUBLISHER_LEGITIMATE_INTERESTS="PublisherLegitimateInterests",e.NUM_CUSTOM_PURPOSES="NumCustomPurposes",e.PUBLISHER_CUSTOM_CONSENTS="PublisherCustomConsents",e.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS="PublisherCustomLegitimateInterests",e.VENDORS_ALLOWED_SEGMENT_TYPE="VendorsAllowedSegmentType",e.VENDORS_ALLOWED="VendorsAllowed",e.VENDORS_DISCLOSED_SEGMENT_TYPE="VendorsDisclosedSegmentType",e.VENDORS_DISCLOSED="VendorsDisclosed"}(he||(he={}));const ge=[he.VERSION,he.CREATED,he.LAST_UPDATED,he.CMP_ID,he.CMP_VERSION,he.CONSENT_SCREEN,he.CONSENT_LANGUAGE,he.VENDOR_LIST_VERSION,he.POLICY_VERSION,he.IS_SERVICE_SPECIFIC,he.USE_NON_STANDARD_STACKS,he.SPECIAL_FEATURE_OPTINS,he.PURPOSE_CONSENTS,he.PURPOSE_LEGITIMATE_INTERESTS,he.PURPOSE_ONE_TREATMENT,he.PUBLISHER_COUNTRY_CODE,he.VENDOR_CONSENTS,he.VENDOR_LEGITIMATE_INTERESTS,he.PUBLISHER_RESTRICTIONS],_e=[he.PUBLISHER_PURPOSES_SEGMENT_TYPE,he.PUBLISHER_CONSENTS,he.PUBLISHER_LEGITIMATE_INTERESTS,he.NUM_CUSTOM_PURPOSES,he.PUBLISHER_CUSTOM_CONSENTS,he.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS],pe
1=[he.VENDORS_ALLOWED_SEGMENT_TYPE,he.VENDORS_ALLOWED],Te=[he.VENDORS_DISCLOSED_SEGMENT_TYPE,he.VENDORS_DISCLOSED];class Oe extends Q{static instance=new Oe;constructor(){super()}static getInstance(){return this.instance}pad(e){for(;e.length%24>0;)e+="0";return e}}class Ne{static encode(e){e.sort((e,t)=>e-t);let t=[],n=0;for(;n<e.length;){let i=n;for(;i<e.length-1&&e[i]+1===e[i+1];)i++;t.push(e.slice(n,i+1)),n=i+1}let i=q.encode(t.length,12);for(let e=0;e<t.length;e++)1===t[e].length?i+="0"+q.encode(t[e][0],16):i+="1"+q.encode(t[e][0],16)+q.encode(t[e][t[e].length-1],16);return i}static decode(e){if(!/^[0-1]*$/.test(e)||e.length<12)throw new Y("Undecodable FixedIntegerRange '"+e+"'");let t=[],n=q.decode(e.substring(0,12)),i=12;for(let s=0;s<n;s++){let n=te.decode(e.substring(i,i+1));if(i++,!0===n){let n=q.decode(e.substring(i,i+16));i+=16;let s=q.decode(e.substring(i,i+16));i+=16;for(let e=n;e<=s;e++)t.push(e)}else{let n=q.decode(e.substring(i,i+16));t.push(n),i+=16}}return t}}class Ie extends se{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return Ne.encode(this.value)}catch(e){throw new J(e)}}decode(e){try{this.value=Ne.decode(e)}catch(e){throw new Y(e)}}substring(e,t){try{let n=q.decode(oe.substring(e,t,t+12)),i=t+12;for(let t=0;t<n;t++)"1"===e.charAt(i)?i+=33:i+=17;return oe.substring(e,t,i)}catch(e){throw new re(e)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((e,t)=>e-t))}}class Ce{key;type;ids;constructor(e,t,n){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 Ae extends se{keyBitStringLength;typeBitStringLength;constructor(e,t,n,i=!0){super(i),this.keyBitStringLength=e,this.typeBitStringLength=t,this.setValue(n)}encode(){try{let e=this.value,t="";t+=q.encode(e.length,12);for(let n=0;n<e.length;n++){let i=e[n];t+=q.encode(i.getKey(),this.keyBitStringLength),t+=q.encode(i.getType(),this.typeBitStringLength),t+=Ne.encode(i.getIds())}return t}catch(e){throw new J(e)}}decode(e){try{let t=[],n=q.decode(oe.substring(e,0,12)),i=12;for(let s=0;s<n;s++){let n=q.decode(oe.substring(e,i,i+this.keyBitStringLength));i+=this.keyBitStringLength;let s=q.decode(oe.substring(e,i,i+this.typeBitStringLength));i+=this.typeBitStringLength;let r=new Ie([]).substring(e,i),o=Ne.decode(r);i+=r.length,t.push(new Ce(n,s,o))}this.value=t}catch(e){throw new Y(e)}}substring(e,t){try{let n="";n+=oe.substring(e,t,t+12);let i=q.decode(n.toString()),s=t+n.length;for(let t=0;t<i;t++){let t=oe.substring(e,s,s+this.keyBitStringLength);s+=t.length,n+=t;let i=oe.substring(e,s,s+this.typeBitStringLength);s+=i.length,n+=i;let r=new Ie([]).substring(e,s);s+=r.length,n+=r}return n}catch(e){throw new re(e)}}}class Pe extends se{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return te.encode(this.value)}catch(e){throw new J(e)}}decode(e){try{this.value=te.decode(e)}catch(e){throw new Y(e)}}substring(e,t){try{return oe.substring(e,t,t+1)}catch(e){throw new re(e)}}}class we{static encode(e){return e?q.encode(Math.round(e.getTime()/100),36):q.encode(0,36)}static decode(e){if(!/^[0-1]*$/.test(e)||36!==e.length)throw new Y("Undecodable Datetime '"+e+"'");return new Date(100*q.decode(e))}}class De extends se{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{return we.encode(this.value)}catch(e){throw new J(e)}}decode(e){try{this.value=we.decode(e)}catch(e){throw new Y(e)}}substring(e,t){try{return oe.substring(e,t,t+36)}catch(e){throw new re(e)}}}class fe{static encode(e,t){if(e.length>t)throw new J("Too many values '"+e.length+"'");let n="";for(let t=0;t<e.length;t++)n+=te.encode(e[t]);for(;n.length<t;)n+="0";return n}static decode(e){if(!/^[0-1]*$/.test(e))throw new Y("Undecodable FixedBitfield '"+e+"'");let t=[];for(let n=0;n<e.length;n++)t.push(te.decode(e.substring(n,n+1)));return t}}class me extends se{numElements;constructor(e,t=!0){super(t),this.numElements=e.length,this.setValue(e)}encode(){try{return fe.encode(this.value,this.numElements)}catch(e){throw new J(e)}}decode(e){try{this.value=fe.decode(e)}catch(e){throw new Y(e)}}substring(e,t){try{return oe.substring(e,t,t+this.numElements)}catch(e){throw new re(e)}}getValue(){return[...super.getValue()]}setValue(e){let t=[...e];for(let e=t.length;e<this.numElements;e++)t.push(!1);t.length>this.numElements&&(t=t.slice(0,this.numElements)),super.setValue(t)}}class Re{static encode(e,t){for(;e.length<t;)e+=" ";let n="";for(let t=0;t<e.length;t++){let i=e.charCodeAt(t);if(32===i)n+=q.encode(63,6);else{if(!(i>=65))throw new J("Unencodable FixedString '"+e+"'");
1n+=q.encode(e.charCodeAt(t)-65,6)}}return n}static decode(e){if(!/^[0-1]*$/.test(e)||e.length%6!=0)throw new Y("Undecodable FixedString '"+e+"'");let t="";for(let n=0;n<e.length;n+=6){let i=q.decode(e.substring(n,n+6));t+=63===i?" ":String.fromCharCode(i+65)}return t.trim()}}class Ve extends se{stringLength;constructor(e,t,n=!0){super(n),this.stringLength=e,this.setValue(t)}encode(){try{return Re.encode(this.value,this.stringLength)}catch(e){throw new J(e)}}decode(e){try{this.value=Re.decode(e)}catch(e){throw new Y(e)}}substring(e,t){try{return oe.substring(e,t,t+6*this.stringLength)}catch(e){throw new re(e)}}}class Me extends se{constructor(e,t=!0){super(t),this.setValue(e)}encode(){try{let e=this.value.length>0?this.value[this.value.length-1]:0,t=Ne.encode(this.value),n=t.length,i=e;if(n<=i)return q.encode(e,16)+"1"+t;{let t=[],n=0;for(let i=0;i<e;i++)i===this.value[n]-1?(t[i]=!0,n++):t[i]=!1;return q.encode(e,16)+"0"+fe.encode(t,i)}}catch(e){throw new J(e)}}decode(e){try{if("1"===e.charAt(16))this.value=Ne.decode(e.substring(17));else{let t=[],n=fe.decode(e.substring(17));for(let e=0;e<n.length;e++)!0===n[e]&&t.push(e+1);this.value=t}}catch(e){throw new Y(e)}}substring(e,t){try{let n=q.decode(oe.substring(e,t,t+16));return"1"===e.charAt(t+16)?oe.substring(e,t,t+17)+new Ie([]).substring(e,t+17):oe.substring(e,t,t+17+n)}catch(e){throw new re(e)}}getValue(){return[...super.getValue()]}setValue(e){super.setValue(Array.from(new Set(e)).sort((e,t)=>e-t))}}class Ue extends ue{base64UrlEncoder=Oe.getInstance();bitStringEncoder=Z.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ge}initializeFields(){let e=new Date,t=new le;return t.put(he.VERSION.toString(),new ce(6,Le.VERSION)),t.put(he.CREATED.toString(),new De(e)),t.put(he.LAST_UPDATED.toString(),new De(e)),t.put(he.CMP_ID.toString(),new ce(12,0)),t.put(he.CMP_VERSION.toString(),new ce(12,0)),t.put(he.CONSENT_SCREEN.toString(),new ce(6,0)),t.put(he.CONSENT_LANGUAGE.toString(),new Ve(2,"EN")),t.put(he.VENDOR_LIST_VERSION.toString(),new ce(12,0)),t.put(he.POLICY_VERSION.toString(),new ce(6,5)),t.put(he.IS_SERVICE_SPECIFIC.toString(),new Pe(!0)),t.put(he.USE_NON_STANDARD_STACKS.toString(),new Pe(!1)),t.put(he.SPECIAL_FEATURE_OPTINS.toString(),new me([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(he.PURPOSE_CONSENTS.toString(),new me([!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(he.PURPOSE_LEGITIMATE_INTERESTS.toString(),new me([!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(he.PURPOSE_ONE_TREATMENT.toString(),new Pe(!1)),t.put(he.PUBLISHER_COUNTRY_CODE.toString(),new Ve(2,"AA")),t.put(he.VENDOR_CONSENTS.toString(),new Me([])),t.put(he.VENDOR_LEGITIMATE_INTERESTS.toString(),new Me([])),t.put(he.PUBLISHER_RESTRICTIONS.toString(),new Ae(6,2,[],!1)),t}encodeSegment(e){let 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{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new Y("Unable to decode TcfEuV2CoreSegment '"+e+"'")}}}class ye extends se{getLength;constructor(e,t,n=!0){super(n),this.getLength=e,this.setValue(t)}encode(){try{return fe.encode(this.value,this.getLength())}catch(e){throw new J(e)}}decode(e){try{this.value=fe.decode(e)}catch(e){throw new Y(e)}}substring(e,t){try{return oe.substring(e,t,t+this.getLength())}catch(e){throw new re(e)}}getValue(){return[...super.getValue()]}setValue(e){let t=this.getLength(),n=[...e];for(let e=n.length;e<t;e++)n.push(!1);n.length>t&&(n=n.slice(0,t)),super.setValue([...n])}}class Ge extends ue{base64UrlEncoder=Oe.getInstance();bitStringEncoder=Z.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return _e}initializeFields(){let e=new le;e.put(he.PUBLISHER_PURPOSES_SEGMENT_TYPE.toString(),new ce(3,3)),e.put(he.PUBLISHER_CONSENTS.toString(),new me([!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(he.PUBLISHER_LEGITIMATE_INTERESTS.toString(),new me([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1]));let t=new ce(6,0);
1return e.put(he.NUM_CUSTOM_PURPOSES.toString(),t),e.put(he.PUBLISHER_CUSTOM_CONSENTS.toString(),new ye(()=>t.getValue(),[])),e.put(he.PUBLISHER_CUSTOM_LEGITIMATE_INTERESTS.toString(),new ye(()=>t.getValue(),[])),e}encodeSegment(e){let 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{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new Y("Unable to decode TcfEuV2PublisherPurposesSegment '"+e+"'")}}}class be extends ue{base64UrlEncoder=Oe.getInstance();bitStringEncoder=Z.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return pe}initializeFields(){let e=new le;return e.put(he.VENDORS_ALLOWED_SEGMENT_TYPE.toString(),new ce(3,2)),e.put(he.VENDORS_ALLOWED.toString(),new Me([])),e}encodeSegment(e){let 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{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new Y("Unable to decode TcfEuV2VendorsAllowedSegment '"+e+"'")}}}class ve extends ue{base64UrlEncoder=Oe.getInstance();bitStringEncoder=Z.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Te}initializeFields(){let e=new le;return e.put(he.VENDORS_DISCLOSED_SEGMENT_TYPE.toString(),new ce(3,1)),e.put(he.VENDORS_DISCLOSED.toString(),new Me([])),e}encodeSegment(e){let 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{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new Y("Unable to decode TcfEuV2VendorsDisclosedSegment '"+e+"'")}}}class Le extends ${static ID=2;static VERSION=2;static NAME="tcfeuv2";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Le.ID}getName(){return Le.NAME}getVersion(){return Le.VERSION}initializeSegments(){let e=[];return e.push(new Ue),e.push(new Ge),e.push(new be),e.push(new ve),e}decodeSection(e){let t=this.initializeSegments();if(null!=e&&0!==e.length){let n=e.split(".");for(let e=0;e<n.length;e++){let i=n[e];if(0!==i.length){let s=i.charAt(0);if(s>="A"&&s<="H")t[0].decode(n[e]);else if(s>="I"&&s<="P")t[3].decode(n[e]);else if(s>="Q"&&s<="X")t[2].decode(n[e]);else{if(!(s>="Y"&&s<="Z"||s>="a"&&s<="f"))throw new Y("Unable to decode TcfEuV2 segment '"+i+"'");t[1].decode(n[e])}}}}return t}encodeSection(e){let t=[];if(e.length>=1){t.push(e[0].encode());let n=this.getFieldValue(he.IS_SERVICE_SPECIFIC);if(!n)throw new J("Unable to encode TcfEuV2 segment with isServiceSpecific = '"+n+"'");e.length>=2&&t.push(e[3].encode()),e.length>=3&&t.push(e[1].encode())}return t.join(".")}setFieldValue(e,t){e===he.PURPOSE_LEGITIMATE_INTERESTS&&(t[0]=!1,t[2]=t[3]=t[4]=t[5]=!1),e===he.CREATED||e===he.LAST_UPDATED?e===he.CREATED?super.setFieldValue(he.LAST_UPDATED,t):super.setFieldValue(he.CREATED,t):this.updateDateStamp(),super.setFieldValue(e,t)}updateDateStamp(){const e=new Date,t=new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()));super.setFieldValue(he.CREATED,t),super.setFieldValue(he.LAST_UPDATED,t)}}var Fe;!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"}(Fe||(Fe={}));
1const xe=[Fe.VERSION,Fe.CREATED,Fe.LAST_UPDATED,Fe.CMP_ID,Fe.CMP_VERSION,Fe.CONSENT_SCREEN,Fe.CONSENT_LANGUAGE,Fe.VENDOR_LIST_VERSION,Fe.TCF_POLICY_VERSION,Fe.USE_NON_STANDARD_STACKS,Fe.SPECIAL_FEATURE_EXPRESS_CONSENT,Fe.PURPOSES_EXPRESS_CONSENT,Fe.PURPOSES_IMPLIED_CONSENT,Fe.VENDOR_EXPRESS_CONSENT,Fe.VENDOR_IMPLIED_CONSENT,Fe.PUB_RESTRICTIONS],ke=[Fe.PUB_PURPOSES_SEGMENT_TYPE,Fe.PUB_PURPOSES_EXPRESS_CONSENT,Fe.PUB_PURPOSES_IMPLIED_CONSENT,Fe.NUM_CUSTOM_PURPOSES,Fe.CUSTOM_PURPOSES_EXPRESS_CONSENT,Fe.CUSTOM_PURPOSES_IMPLIED_CONSENT],Be=[Fe.DISCLOSED_VENDORS_SEGMENT_TYPE,Fe.DISCLOSED_VENDORS];class He extends ue{base64UrlEncoder=X.getInstance();bitStringEncoder=Z.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return xe}initializeFields(){let e=new Date,t=new le;return t.put(Fe.VERSION.toString(),new ce(6,We.VERSION)),t.put(Fe.CREATED.toString(),new De(e)),t.put(Fe.LAST_UPDATED.toString(),new De(e)),t.put(Fe.CMP_ID.toString(),new ce(12,0)),t.put(Fe.CMP_VERSION.toString(),new ce(12,0)),t.put(Fe.CONSENT_SCREEN.toString(),new ce(6,0)),t.put(Fe.CONSENT_LANGUAGE.toString(),new Ve(2,"EN")),t.put(Fe.VENDOR_LIST_VERSION.toString(),new ce(12,0)),t.put(Fe.TCF_POLICY_VERSION.toString(),new ce(6,2)),t.put(Fe.USE_NON_STANDARD_STACKS.toString(),new Pe(!1)),t.put(Fe.SPECIAL_FEATURE_EXPRESS_CONSENT.toString(),new me([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1])),t.put(Fe.PURPOSES_EXPRESS_CONSENT.toString(),new me([!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(Fe.PURPOSES_IMPLIED_CONSENT.toString(),new me([!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(Fe.VENDOR_EXPRESS_CONSENT.toString(),new Me([])),t.put(Fe.VENDOR_IMPLIED_CONSENT.toString(),new Me([])),t.put(Fe.PUB_RESTRICTIONS.toString(),new Ae(6,2,[],!1)),t}encodeSegment(e){let 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{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new Y("Unable to decode TcfCaV1CoreSegment '"+e+"'")}}}class je extends ue{base64UrlEncoder=X.getInstance();bitStringEncoder=Z.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ke}initializeFields(){let e=new le;e.put(Fe.PUB_PURPOSES_SEGMENT_TYPE.toString(),new ce(3,3)),e.put(Fe.PUB_PURPOSES_EXPRESS_CONSENT.toString(),new me([!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(Fe.PUB_PURPOSES_IMPLIED_CONSENT.toString(),new me([!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1,!1]));let t=new ce(6,0);return e.put(Fe.NUM_CUSTOM_PURPOSES.toString(),t),e.put(Fe.CUSTOM_PURPOSES_EXPRESS_CONSENT.toString(),new ye(()=>t.getValue(),[])),e.put(Fe.CUSTOM_PURPOSES_IMPLIED_CONSENT.toString(),new ye(()=>t.getValue(),[])),e}encodeSegment(e){let 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{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new Y("Unable to decode TcfCaV1PublisherPurposesSegment '"+e+"'")}}}class Ke extends ue{base64UrlEncoder=Oe.getInstance();bitStringEncoder=Z.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Be}initializeFields(){let e=new le;return e.put(Fe.DISCLOSED_VENDORS_SEGMENT_TYPE.toString(),new ce(3,1)),e.put(Fe.DISCLOSED_VENDORS.toString(),new Me([])),e}encodeSegment(e){let 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{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new Y("Unable to decode HeaderV1CoreSegment '"+e+"'")}}}class We extends ${static ID=5;static VERSION=1;static NAME="tcfcav1";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return We.ID}getName(){return We.NAME}getVersion(){return We.VERSION}initializeSegments(){let e=[];return e.push(new He),e.push(new je),e.push(new Ke),e}decodeSection(e){let t=this.initializeSegments();if(null!=e&&0!==e.length){let n=e.split(".");for(let e=0;e<n.length;e++){let i=n[e];if(0!==i.length){let s=i.charAt(0);if(s>="A"&&s<="H")t[0].decode(n[e]);else if(s>="I"&&s<="P")t[2].decode(n[e]);else{if(!(s>="Y"&&s<="Z"||s>="a"&&s<="f"))throw new Y("Unable to decode TcfCaV1 segment '"+i+"'");t[1].decode(n[e])}}}}return t}encodeSection(e){let t=[];return t.push(e[0].encode()),t.push(e[1].encode()),this.getFieldValue(Fe.DISCLOSED_VENDORS).length>0&&t.push(e[2].encode()),t.join(".")}setFieldValue(e,t){if(super.setFieldValue(e,t),e!==Fe.CREATED&&e!==Fe.LAST_UPDATED){let e=new Date;super.setFieldValue(Fe.CREATED,e),super.setFieldValue(Fe.LAST_UPDATED,e)}}}class ze{validator;value=null;constructor(e,t){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 $e{validator;value=null;constructor(e,t){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 Ye{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)}
1reset(e){this.fields.clear(),e.getAll().forEach((e,t)=>{this.fields.set(t,e)})}}var Je;!function(e){e.VERSION="Version",e.NOTICE="Notice",e.OPT_OUT_SALE="OptOutSale",e.LSPA_COVERED="LspaCovered"}(Je||(Je={}));const qe=[Je.VERSION,Je.NOTICE,Je.OPT_OUT_SALE,Je.LSPA_COVERED];class Qe extends ue{constructor(e){super(),e&&this.decode(e)}getFieldNames(){return qe}initializeFields(){const e=new class{test(e){return"-"===e||"Y"===e||"N"===e}};let t=new Ye;return t.put(Je.VERSION,new $e(Xe.VERSION)),t.put(Je.NOTICE,new ze("-",e)),t.put(Je.OPT_OUT_SALE,new ze("-",e)),t.put(Je.LSPA_COVERED,new ze("-",e)),t}encodeSegment(e){let t="";return t+=e.get(Je.VERSION).getValue(),t+=e.get(Je.NOTICE).getValue(),t+=e.get(Je.OPT_OUT_SALE).getValue(),t+=e.get(Je.LSPA_COVERED).getValue(),t}decodeSegment(e,t){if(null==e||4!=e.length)throw new Y("Unable to decode UspV1CoreSegment '"+e+"'");try{t.get(Je.VERSION).setValue(parseInt(e.substring(0,1))),t.get(Je.NOTICE).setValue(e.charAt(1)),t.get(Je.OPT_OUT_SALE).setValue(e.charAt(2)),t.get(Je.LSPA_COVERED).setValue(e.charAt(3))}catch(t){throw new Y("Unable to decode UspV1CoreSegment '"+e+"'")}}}class Xe extends ${static ID=6;static VERSION=1;static NAME="uspv1";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Xe.ID}getName(){return Xe.NAME}getVersion(){return Xe.VERSION}initializeSegments(){let e=[];return e.push(new Qe),e}decodeSection(e){let t=this.initializeSegments();if(null!=e&&0!==e.length){let n=e.split(".");for(let e=0;e<t.length;e++)n.length>e&&t[e].decode(n[e])}return t}encodeSection(e){let t=[];for(let n=0;n<e.length;n++){let i=e[n];t.push(i.encode())}return t.join(".")}}var Ze;!function(e){e.VERSION="Version",e.SHARING_NOTICE="SharingNotice",e.SALE_OPT_OUT_NOTICE="SaleOptOutNotice",e.SHARING_OPT_OUT_NOTICE="SharingOptOutNotice",e.TARGETED_ADVERTISING_OPT_OUT_NOTICE="TargetedAdvertisingOptOutNotice",e.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE="SensitiveDataProcessingOptOutNotice",e.SENSITIVE_DATA_LIMIT_USE_NOTICE="SensitiveDataLimitUseNotice",e.SALE_OPT_OUT="SaleOptOut",e.SHARING_OPT_OUT="SharingOptOut",e.TARGETED_ADVERTISING_OPT_OUT="TargetedAdvertisingOptOut",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"}(Ze||(Ze={}));const et=[Ze.VERSION,Ze.SHARING_NOTICE,Ze.SALE_OPT_OUT_NOTICE,Ze.SHARING_OPT_OUT_NOTICE,Ze.TARGETED_ADVERTISING_OPT_OUT_NOTICE,Ze.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE,Ze.SENSITIVE_DATA_LIMIT_USE_NOTICE,Ze.SALE_OPT_OUT,Ze.SHARING_OPT_OUT,Ze.TARGETED_ADVERTISING_OPT_OUT,Ze.SENSITIVE_DATA_PROCESSING,Ze.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,Ze.PERSONAL_DATA_CONSENTS,Ze.MSPA_COVERED_TRANSACTION,Ze.MSPA_OPT_OUT_OPTION_MODE,Ze.MSPA_SERVICE_PROVIDER_MODE],tt=[Ze.GPC_SEGMENT_TYPE,Ze.GPC];class nt{static encode(e,t,n){if(e.length>n)throw new J("Too many values '"+e.length+"'");let i="";for(let n=0;n<e.length;n++)i+=q.encode(e[n],t);for(;i.length<t*n;)i+="0";return i}static decode(e,t,n){if(!/^[0-1]*$/.test(e))throw new Y("Undecodable FixedInteger '"+e+"'");if(e.length>t*n)throw new Y("Undecodable FixedIntegerList '"+e+"'");if(e.length%t!=0)throw new Y("Undecodable FixedIntegerList '"+e+"'");for(;e.length<t*n;)e+="0";e.length>t*n&&(e=e.substring(0,t*n));let i=[];for(let n=0;n<e.length;n+=t)i.push(q.decode(e.substring(n,n+t)));for(;i.length<n;)i.push(0);return i}}class it extends se{elementBitStringLength;numElements;constructor(e,t,n=!0){super(n),this.elementBitStringLength=e,this.numElements=t.length,this.setValue(t)}encode(){try{return nt.encode(this.value,this.elementBitStringLength,this.numElements)}catch(e){throw new J(e)}}decode(e){try{this.value=nt.decode(e,this.elementBitStringLength,this.numElements)}catch(e){throw new Y(e)}}substring(e,t){try{return oe.substring(e,t,t+this.elementBitStringLength*this.numElements)}catch(e){throw new re(e)}}getValue(){return[...super.getValue()]}setValue(e){let t=[...e];for(let e=t.length;e<this.numElements;e++)t.push(0);t.length>this.numElements&&(t=t.slice(0,this.numElements)),super.setValue(t)}}class st extends ue{base64UrlEncoder=X.getInstance();bitStringEncoder=Z.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return et}initializeFields(){const 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(let t=0;t<e.length;t++){let n=e[t];if(n<0||n>2)return!1}return!0}};let i=new le;return i.put(Ze.VERSION.toString(),new ce(6,ot.VERSION)),i.put(Ze.SHARING_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(Ze.SALE_OPT_OUT_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(Ze.SHARING_OPT_OUT_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(Ze.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(Ze.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(Ze.SENSITIVE_DATA_LIMIT_USE_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(Ze.SALE_OPT_OUT.toString(),new ce(2,0).withValidator(e)),i.put(Ze.SHARING_OPT_OUT.toString(),new ce(2,0).withValidator(e)),i.put(Ze.TARGETED_ADVERTISING_OPT_OUT.toString(),new ce(2,0).withValidator(e)),i.put(Ze.SENSITIVE_DATA_PROCESSING.toString(),new it(2,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]).withValidator(n)),i.put(Ze.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new it(2,[0,0,0]).withValidator(n)),i.put(Ze.PERSONAL_DATA_CONSENTS.toString(),new ce(2,0).withValidator(e)),i.put(Ze.MSPA_COVERED_TRANSACTION.toString(),new ce(2,1).withValidator(t)),i.put(Ze.MSPA_OPT_OUT_OPTION_MODE.toString(),new ce(2,0).withValidator(e)),i.put(Ze.MSPA_SERVICE_PROVIDER_MODE.toString(),new ce(2,0).withValidator(e)),i}
1encodeSegment(e){let 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{let n=this.base64UrlEncoder.decode(e);66==n.length&&(n=n.substring(0,48)+"00000000"+n.substring(48,52)+"00"+n.substring(52,62)),this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new Y("Unable to decode UsNatCoreSegment '"+e+"'")}}}class rt extends ue{base64UrlEncoder=X.getInstance();bitStringEncoder=Z.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return tt}initializeFields(){let e=new le;return e.put(Ze.GPC_SEGMENT_TYPE.toString(),new ce(2,1)),e.put(Ze.GPC_SEGMENT_INCLUDED.toString(),new Pe(!0)),e.put(Ze.GPC.toString(),new Pe(!1)),e}encodeSegment(e){let 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{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new Y("Unable to decode UsNatGpcSegment '"+e+"'")}}}class ot extends ${static ID=7;static VERSION=1;static NAME="usnat";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return ot.ID}getName(){return ot.NAME}getVersion(){return ot.VERSION}initializeSegments(){let e=[];return e.push(new st),e.push(new rt),e}decodeSection(e){let t=this.initializeSegments();if(null!=e&&0!==e.length){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(Ze.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(Ze.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&!0===e[1].getFieldValue(Ze.GPC_SEGMENT_INCLUDED)&&t.push(e[1].encode())),t.join(".")}}var at;!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"}(at||(at={}));const ct=[at.VERSION,at.SALE_OPT_OUT_NOTICE,at.SHARING_OPT_OUT_NOTICE,at.SENSITIVE_DATA_LIMIT_USE_NOTICE,at.SALE_OPT_OUT,at.SHARING_OPT_OUT,at.SENSITIVE_DATA_PROCESSING,at.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,at.PERSONAL_DATA_CONSENTS,at.MSPA_COVERED_TRANSACTION,at.MSPA_OPT_OUT_OPTION_MODE,at.MSPA_SERVICE_PROVIDER_MODE],lt=[at.GPC_SEGMENT_TYPE,at.GPC];class dt extends ue{base64UrlEncoder=X.getInstance();bitStringEncoder=Z.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ct}initializeFields(){const 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(let t=0;t<e.length;t++){let n=e[t];if(n<0||n>2)return!1}return!0}};let i=new le;return i.put(at.VERSION.toString(),new ce(6,St.VERSION)),i.put(at.SALE_OPT_OUT_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(at.SHARING_OPT_OUT_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(at.SENSITIVE_DATA_LIMIT_USE_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(at.SALE_OPT_OUT.toString(),new ce(2,0).withValidator(e)),i.put(at.SHARING_OPT_OUT.toString(),new ce(2,0).withValidator(e)),i.put(at.SENSITIVE_DATA_PROCESSING.toString(),new it(2,[0,0,0,0,0,0,0,0,0]).withValidator(n)),i.put(at.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new it(2,[0,0]).withValidator(n)),i.put(at.PERSONAL_DATA_CONSENTS.toString(),new ce(2,0).withValidator(e)),i.put(at.MSPA_COVERED_TRANSACTION.toString(),new ce(2,1).withValidator(t)),i.put(at.MSPA_OPT_OUT_OPTION_MODE.toString(),new ce(2,0).withValidator(e)),i.put(at.MSPA_SERVICE_PROVIDER_MODE.toString(),new ce(2,0).withValidator(e)),i}
1encodeSegment(e){let 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{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new Y("Unable to decode UsCaCoreSegment '"+e+"'")}}}class ut extends ue{base64UrlEncoder=X.getInstance();bitStringEncoder=Z.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return lt}initializeFields(){let e=new le;return e.put(at.GPC_SEGMENT_TYPE.toString(),new ce(2,1)),e.put(at.GPC_SEGMENT_INCLUDED.toString(),new Pe(!0)),e.put(at.GPC.toString(),new Pe(!1)),e}encodeSegment(e){let 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{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new Y("Unable to decode UsCaGpcSegment '"+e+"'")}}}class St extends ${static ID=8;static VERSION=1;static NAME="usca";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return St.ID}getName(){return St.NAME}getVersion(){return St.VERSION}initializeSegments(){let e=[];return e.push(new dt),e.push(new ut),e}decodeSection(e){let t=this.initializeSegments();if(null!=e&&0!==e.length){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(at.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(at.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&!0===e[1].getFieldValue(at.GPC_SEGMENT_INCLUDED)&&t.push(e[1].encode())),t.join(".")}}var Et;!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"}(Et||(Et={}));const ht=[Et.VERSION,Et.SHARING_NOTICE,Et.SALE_OPT_OUT_NOTICE,Et.TARGETED_ADVERTISING_OPT_OUT_NOTICE,Et.SALE_OPT_OUT,Et.TARGETED_ADVERTISING_OPT_OUT,Et.SENSITIVE_DATA_PROCESSING,Et.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,Et.MSPA_COVERED_TRANSACTION,Et.MSPA_OPT_OUT_OPTION_MODE,Et.MSPA_SERVICE_PROVIDER_MODE];class gt extends ue{base64UrlEncoder=X.getInstance();bitStringEncoder=Z.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ht}initializeFields(){const 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(let t=0;t<e.length;t++){let n=e[t];if(n<0||n>2)return!1}return!0}};let i=new le;return i.put(Et.VERSION.toString(),new ce(6,_t.VERSION)),i.put(Et.SHARING_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(Et.SALE_OPT_OUT_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(Et.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(Et.SALE_OPT_OUT.toString(),new ce(2,0).withValidator(e)),i.put(Et.TARGETED_ADVERTISING_OPT_OUT.toString(),new ce(2,0).withValidator(e)),i.put(Et.SENSITIVE_DATA_PROCESSING.toString(),new it(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(Et.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new ce(2,0).withValidator(e)),i.put(Et.MSPA_COVERED_TRANSACTION.toString(),new ce(2,1).withValidator(t)),i.put(Et.MSPA_OPT_OUT_OPTION_MODE.toString(),new ce(2,0).withValidator(e)),i.put(Et.MSPA_SERVICE_PROVIDER_MODE.toString(),new ce(2,0).withValidator(e)),i}encodeSegment(e){let 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{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new Y("Unable to decode UsVaCoreSegment '"+e+"'")}}}class _t extends ${static ID=9;static VERSION=1;static NAME="usva";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return _t.ID}getName(){return _t.NAME}getVersion(){return _t.VERSION}initializeSegments(){let e=[];return e.push(new gt),e}decodeSection(e){let t=this.initializeSegments();if(null!=e&&0!==e.length){let n=e.split(".");for(let e=0;e<t.length;e++)n.length>e&&t[e].decode(n[e])}return t}encodeSection(e){let t=[];for(let n=0;n<e.length;n++){let i=e[n];t.push(i.encode())}return t.join(".")}}var pt;!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",e.GPC_SEGMENT_TYPE="GpcSegmentType",e.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",e.GPC="Gpc"}(pt||(pt={}));const Tt=[pt.VERSION,pt.SHARING_NOTICE,pt.SALE_OPT_OUT_NOTICE,pt.TARGETED_ADVERTISING_OPT_OUT_NOTICE,pt.SALE_OPT_OUT,pt.TARGETED_ADVERTISING_OPT_OUT,pt.SENSITIVE_DATA_PROCESSING,pt.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,pt.MSPA_COVERED_TRANSACTION,pt.MSPA_OPT_OUT_OPTION_MODE,pt.MSPA_SERVICE_PROVIDER_MODE],Ot=[pt.GPC_SEGMENT_TYPE,pt.GPC];class Nt extends ue{base64UrlEncoder=X.getInstance();bitStringEncoder=Z.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Tt}initializeFields(){const 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(let t=0;t<e.length;t++){let n=e[t];if(n<0||n>2)return!1}return!0}};let i=new le;return i.put(pt.VERSION.toString(),new ce(6,Ct.VERSION)),i.put(pt.SHARING_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(pt.SALE_OPT_OUT_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(pt.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(pt.SALE_OPT_OUT.toString(),new ce(2,0).withValidator(e)),i.put(pt.TARGETED_ADVERTISING_OPT_OUT.toString(),new ce(2,0).withValidator(e)),i.put(pt.SENSITIVE_DATA_PROCESSING.toString(),new it(2,[0,0,0,0,0,0,0]).withValidator(n)),i.put(pt.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new ce(2,0).withValidator(e)),i.put(pt.MSPA_COVERED_TRANSACTION.toString(),new ce(2,1).withValidator(t)),i.put(pt.MSPA_OPT_OUT_OPTION_MODE.toString(),new ce(2,0).withValidator(e)),i.put(pt.MSPA_SERVICE_PROVIDER_MODE.toString(),new ce(2,0).withValidator(e)),i}
1encodeSegment(e){let 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{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new Y("Unable to decode UsCoCoreSegment '"+e+"'")}}}class It extends ue{base64UrlEncoder=X.getInstance();bitStringEncoder=Z.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ot}initializeFields(){let e=new le;return e.put(pt.GPC_SEGMENT_TYPE.toString(),new ce(2,1)),e.put(pt.GPC_SEGMENT_INCLUDED.toString(),new Pe(!0)),e.put(pt.GPC.toString(),new Pe(!1)),e}encodeSegment(e){let 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{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new Y("Unable to decode UsCoGpcSegment '"+e+"'")}}}class Ct extends ${static ID=10;static VERSION=1;static NAME="usco";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Ct.ID}getName(){return Ct.NAME}getVersion(){return Ct.VERSION}initializeSegments(){let e=[];return e.push(new Nt),e.push(new It),e}decodeSection(e){let t=this.initializeSegments();if(null!=e&&0!==e.length){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(pt.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(pt.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&!0===e[1].getFieldValue(pt.GPC_SEGMENT_INCLUDED)&&t.push(e[1].encode())),t.join(".")}}var At;!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"}(At||(At={}));const Pt=[At.VERSION,At.SHARING_NOTICE,At.SALE_OPT_OUT_NOTICE,At.TARGETED_ADVERTISING_OPT_OUT_NOTICE,At.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE,At.SALE_OPT_OUT,At.TARGETED_ADVERTISING_OPT_OUT,At.SENSITIVE_DATA_PROCESSING,At.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,At.MSPA_COVERED_TRANSACTION,At.MSPA_OPT_OUT_OPTION_MODE,At.MSPA_SERVICE_PROVIDER_MODE];class wt extends ue{base64UrlEncoder=X.getInstance();bitStringEncoder=Z.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Pt}initializeFields(){const 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(let t=0;t<e.length;t++){let n=e[t];if(n<0||n>2)return!1}return!0}};let i=new le;return i.put(At.VERSION.toString(),new ce(6,Dt.VERSION)),i.put(At.SHARING_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(At.SALE_OPT_OUT_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(At.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(At.SENSITIVE_DATA_PROCESSING_OPT_OUT_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(At.SALE_OPT_OUT.toString(),new ce(2,0).withValidator(e)),i.put(At.TARGETED_ADVERTISING_OPT_OUT.toString(),new ce(2,0).withValidator(e)),i.put(At.SENSITIVE_DATA_PROCESSING.toString(),new it(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(At.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new ce(2,0).withValidator(e)),i.put(At.MSPA_COVERED_TRANSACTION.toString(),new ce(2,1).withValidator(t)),i.put(At.MSPA_OPT_OUT_OPTION_MODE.toString(),new ce(2,0).withValidator(e)),i.put(At.MSPA_SERVICE_PROVIDER_MODE.toString(),new ce(2,0).withValidator(e)),i}encodeSegment(e){let 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{let n=this.base64UrlEncoder.decode(e);
1this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new Y("Unable to decode UsUtCoreSegment '"+e+"'")}}}class Dt extends ${static ID=11;static VERSION=1;static NAME="usut";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Dt.ID}getName(){return Dt.NAME}getVersion(){return Dt.VERSION}initializeSegments(){let e=[];return e.push(new wt),e}decodeSection(e){let t=this.initializeSegments();if(null!=e&&0!==e.length){let n=e.split(".");for(let e=0;e<t.length;e++)n.length>e&&t[e].decode(n[e])}return t}encodeSection(e){let t=[];for(let n=0;n<e.length;n++){let i=e[n];t.push(i.encode())}return t.join(".")}}var ft;!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",e.GPC_SEGMENT_TYPE="GpcSegmentType",e.GPC_SEGMENT_INCLUDED="GpcSegmentIncluded",e.GPC="Gpc"}(ft||(ft={}));const mt=[ft.VERSION,ft.SHARING_NOTICE,ft.SALE_OPT_OUT_NOTICE,ft.TARGETED_ADVERTISING_OPT_OUT_NOTICE,ft.SALE_OPT_OUT,ft.TARGETED_ADVERTISING_OPT_OUT,ft.SENSITIVE_DATA_PROCESSING,ft.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,ft.MSPA_COVERED_TRANSACTION,ft.MSPA_OPT_OUT_OPTION_MODE,ft.MSPA_SERVICE_PROVIDER_MODE],Rt=[ft.GPC_SEGMENT_TYPE,ft.GPC];class Vt extends ue{base64UrlEncoder=X.getInstance();bitStringEncoder=Z.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return mt}initializeFields(){const 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(let t=0;t<e.length;t++){let n=e[t];if(n<0||n>2)return!1}return!0}};let i=new le;return i.put(ft.VERSION.toString(),new ce(6,Ut.VERSION)),i.put(ft.SHARING_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(ft.SALE_OPT_OUT_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(ft.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(ft.SALE_OPT_OUT.toString(),new ce(2,0).withValidator(e)),i.put(ft.TARGETED_ADVERTISING_OPT_OUT.toString(),new ce(2,0).withValidator(e)),i.put(ft.SENSITIVE_DATA_PROCESSING.toString(),new it(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(ft.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new it(2,[0,0,0]).withValidator(n)),i.put(ft.MSPA_COVERED_TRANSACTION.toString(),new ce(2,1).withValidator(t)),i.put(ft.MSPA_OPT_OUT_OPTION_MODE.toString(),new ce(2,0).withValidator(e)),i.put(ft.MSPA_SERVICE_PROVIDER_MODE.toString(),new ce(2,0).withValidator(e)),i}encodeSegment(e){let 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{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new Y("Unable to decode UsCtCoreSegment '"+e+"'")}}}class Mt extends ue{base64UrlEncoder=X.getInstance();bitStringEncoder=Z.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Rt}initializeFields(){let e=new le;return e.put(ft.GPC_SEGMENT_TYPE.toString(),new ce(2,1)),e.put(ft.GPC_SEGMENT_INCLUDED.toString(),new Pe(!0)),e.put(ft.GPC.toString(),new Pe(!1)),e}encodeSegment(e){let 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{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new Y("Unable to decode UsCtGpcSegment '"+e+"'")}}}class Ut extends ${static ID=12;static VERSION=1;static NAME="usct";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Ut.ID}getName(){return Ut.NAME}getVersion(){return Ut.VERSION}initializeSegments(){let e=[];return e.push(new Vt),e.push(new Mt),e}decodeSection(e){let t=this.initializeSegments();if(null!=e&&0!==e.length){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(ft.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(ft.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>
1=2&&!0===e[1].getFieldValue(ft.GPC_SEGMENT_INCLUDED)&&t.push(e[1].encode())),t.join(".")}}var yt;!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"}(yt||(yt={}));const Gt=[yt.VERSION,yt.PROCESSING_NOTICE,yt.SALE_OPT_OUT_NOTICE,yt.TARGETED_ADVERTISING_OPT_OUT_NOTICE,yt.SALE_OPT_OUT,yt.TARGETED_ADVERTISING_OPT_OUT,yt.SENSITIVE_DATA_PROCESSING,yt.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,yt.ADDITIONAL_DATA_PROCESSING_CONSENT,yt.MSPA_COVERED_TRANSACTION,yt.MSPA_OPT_OUT_OPTION_MODE,yt.MSPA_SERVICE_PROVIDER_MODE];class bt extends ue{base64UrlEncoder=X.getInstance();bitStringEncoder=Z.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Gt}initializeFields(){const 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(let t=0;t<e.length;t++){let n=e[t];if(n<0||n>2)return!1}return!0}};let i=new le;return i.put(yt.VERSION.toString(),new ce(6,vt.VERSION)),i.put(yt.PROCESSING_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(yt.SALE_OPT_OUT_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(yt.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(yt.SALE_OPT_OUT.toString(),new ce(2,0).withValidator(e)),i.put(yt.TARGETED_ADVERTISING_OPT_OUT.toString(),new ce(2,0).withValidator(e)),i.put(yt.SENSITIVE_DATA_PROCESSING.toString(),new it(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(yt.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new it(2,[0,0,0]).withValidator(n)),i.put(yt.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new ce(2,0).withValidator(e)),i.put(yt.MSPA_COVERED_TRANSACTION.toString(),new ce(2,1).withValidator(t)),i.put(yt.MSPA_OPT_OUT_OPTION_MODE.toString(),new ce(2,0).withValidator(e)),i.put(yt.MSPA_SERVICE_PROVIDER_MODE.toString(),new ce(2,0).withValidator(e)),i}encodeSegment(e){let 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{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new Y("Unable to decode UsFlCoreSegment '"+e+"'")}}}class vt extends ${static ID=13;static VERSION=1;static NAME="usfl";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return vt.ID}getName(){return vt.NAME}getVersion(){return vt.VERSION}initializeSegments(){let e=[];return e.push(new bt),e}decodeSection(e){let t=this.initializeSegments();if(null!=e&&0!==e.length){let n=e.split(".");for(let e=0;e<t.length;e++)n.length>e&&t[e].decode(n[e])}return t}encodeSection(e){let t=[];for(let n=0;n<e.length;n++){let i=e[n];t.push(i.encode())}return t.join(".")}}var Lt;!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.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"}(Lt||(Lt={}));const Ft=[Lt.VERSION,Lt.SHARING_NOTICE,Lt.SALE_OPT_OUT_NOTICE,Lt.TARGETED_ADVERTISING_OPT_OUT_NOTICE,Lt.SALE_OPT_OUT,Lt.TARGETED_ADVERTISING_OPT_OUT,Lt.SENSITIVE_DATA_PROCESSING,Lt.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,Lt.ADDITIONAL_DATA_PROCESSING_CONSENT,Lt.MSPA_COVERED_TRANSACTION,Lt.MSPA_OPT_OUT_OPTION_MODE,Lt.MSPA_SERVICE_PROVIDER_MODE],xt=[Lt.GPC_SEGMENT_TYPE,Lt.GPC];class kt extends ue{base64UrlEncoder=X.getInstance();bitStringEncoder=Z.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Ft}initializeFields(){const 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(let t=0;t<e.length;t++){let n=e[t];if(n<0||n>2)return!1}return!0}};let i=new le;return i.put(Lt.VERSION.toString(),new ce(6,Ht.VERSION)),i.put(Lt.SHARING_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(Lt.SALE_OPT_OUT_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(Lt.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(Lt.SALE_OPT_OUT.toString(),new ce(2,0).withValidator(e)),i.put(Lt.TARGETED_ADVERTISING_OPT_OUT.toString(),new ce(2,0).withValidator(e)),i.put(Lt.SENSITIVE_DATA_PROCESSING.toString(),new it(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(Lt.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new it(2,[0,0,0]).withValidator(n)),i.put(Lt.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new ce(2,0).withValidator(e)),i.put(Lt.MSPA_COVERED_TRANSACTION.toString(),new ce(2,1).withValidator(t)),i.put(Lt.MSPA_OPT_OUT_OPTION_MODE.toString(),new ce(2,0).withValidator(e)),i.put(Lt.MSPA_SERVICE_PROVIDER_MODE.toString(),new ce(2,0).withValidator(e)),i}
1encodeSegment(e){let 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{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new Y("Unable to decode UsMtCoreSegment '"+e+"'")}}}class Bt extends ue{base64UrlEncoder=X.getInstance();bitStringEncoder=Z.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return xt}initializeFields(){let e=new le;return e.put(Lt.GPC_SEGMENT_TYPE.toString(),new ce(2,1)),e.put(Lt.GPC_SEGMENT_INCLUDED.toString(),new Pe(!0)),e.put(Lt.GPC.toString(),new Pe(!1)),e}encodeSegment(e){let 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{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new Y("Unable to decode UsMtGpcSegment '"+e+"'")}}}class Ht extends ${static ID=14;static VERSION=1;static NAME="usmt";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Ht.ID}getName(){return Ht.NAME}getVersion(){return Ht.VERSION}initializeSegments(){let e=[];return e.push(new kt),e.push(new Bt),e}decodeSection(e){let t=this.initializeSegments();if(null!=e&&0!==e.length){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(Lt.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(Lt.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&!0===e[1].getFieldValue(Lt.GPC_SEGMENT_INCLUDED)&&t.push(e[1].encode())),t.join(".")}}var jt;!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"}(jt||(jt={}));const Kt=[jt.VERSION,jt.PROCESSING_NOTICE,jt.SALE_OPT_OUT_NOTICE,jt.TARGETED_ADVERTISING_OPT_OUT_NOTICE,jt.SALE_OPT_OUT,jt.TARGETED_ADVERTISING_OPT_OUT,jt.SENSITIVE_DATA_PROCESSING,jt.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,jt.ADDITIONAL_DATA_PROCESSING_CONSENT,jt.MSPA_COVERED_TRANSACTION,jt.MSPA_OPT_OUT_OPTION_MODE,jt.MSPA_SERVICE_PROVIDER_MODE],Wt=[jt.GPC_SEGMENT_TYPE,jt.GPC];class zt extends ue{base64UrlEncoder=X.getInstance();bitStringEncoder=Z.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Kt}initializeFields(){const 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(let t=0;t<e.length;t++){let n=e[t];if(n<0||n>2)return!1}return!0}};let i=new le;return i.put(jt.VERSION.toString(),new ce(6,Yt.VERSION)),i.put(jt.PROCESSING_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(jt.SALE_OPT_OUT_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(jt.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(jt.SALE_OPT_OUT.toString(),new ce(2,0).withValidator(e)),i.put(jt.TARGETED_ADVERTISING_OPT_OUT.toString(),new ce(2,0).withValidator(e)),i.put(jt.SENSITIVE_DATA_PROCESSING.toString(),new it(2,[0,0,0,0,0,0,0,0,0,0,0]).withValidator(n)),i.put(jt.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new it(2,[0,0,0]).withValidator(n)),i.put(jt.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new ce(2,0).withValidator(e)),i.put(jt.MSPA_COVERED_TRANSACTION.toString(),new ce(2,1).withValidator(t)),i.put(jt.MSPA_OPT_OUT_OPTION_MODE.toString(),new ce(2,0).withValidator(e)),i.put(jt.MSPA_SERVICE_PROVIDER_MODE.toString(),new ce(2,0).withValidator(e)),i}
1encodeSegment(e){let 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{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new Y("Unable to decode UsOrCoreSegment '"+e+"'")}}}class $t extends ue{base64UrlEncoder=X.getInstance();bitStringEncoder=Z.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Wt}initializeFields(){let e=new le;return e.put(jt.GPC_SEGMENT_TYPE.toString(),new ce(2,1)),e.put(jt.GPC_SEGMENT_INCLUDED.toString(),new Pe(!0)),e.put(jt.GPC.toString(),new Pe(!1)),e}encodeSegment(e){let 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{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new Y("Unable to decode UsOrGpcSegment '"+e+"'")}}}class Yt extends ${static ID=15;static VERSION=1;static NAME="usor";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Yt.ID}getName(){return Yt.NAME}getVersion(){return Yt.VERSION}initializeSegments(){let e=[];return e.push(new zt),e.push(new $t),e}decodeSection(e){let t=this.initializeSegments();if(null!=e&&0!==e.length){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(jt.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(jt.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&!0===e[1].getFieldValue(jt.GPC_SEGMENT_INCLUDED)&&t.push(e[1].encode())),t.join(".")}}var Jt;!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"}(Jt||(Jt={}));const qt=[Jt.VERSION,Jt.PROCESSING_NOTICE,Jt.SALE_OPT_OUT_NOTICE,Jt.TARGETED_ADVERTISING_OPT_OUT_NOTICE,Jt.SALE_OPT_OUT,Jt.TARGETED_ADVERTISING_OPT_OUT,Jt.SENSITIVE_DATA_PROCESSING,Jt.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,Jt.ADDITIONAL_DATA_PROCESSING_CONSENT,Jt.MSPA_COVERED_TRANSACTION,Jt.MSPA_OPT_OUT_OPTION_MODE,Jt.MSPA_SERVICE_PROVIDER_MODE],Qt=[Jt.GPC_SEGMENT_TYPE,Jt.GPC];class Xt extends ue{base64UrlEncoder=X.getInstance();bitStringEncoder=Z.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return qt}initializeFields(){const 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(let t=0;t<e.length;t++){let n=e[t];if(n<0||n>2)return!1}return!0}};let i=new le;return i.put(Jt.VERSION.toString(),new ce(6,en.VERSION)),i.put(Jt.PROCESSING_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(Jt.SALE_OPT_OUT_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(Jt.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(Jt.SALE_OPT_OUT.toString(),new ce(2,0).withValidator(e)),i.put(Jt.TARGETED_ADVERTISING_OPT_OUT.toString(),new ce(2,0).withValidator(e)),i.put(Jt.SENSITIVE_DATA_PROCESSING.toString(),new it(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(Jt.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new ce(2,0).withValidator(e)),i.put(Jt.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new ce(2,0).withValidator(e)),i.put(Jt.MSPA_COVERED_TRANSACTION.toString(),new ce(2,1).withValidator(t)),i.put(Jt.MSPA_OPT_OUT_OPTION_MODE.toString(),new ce(2,0).withValidator(e)),i.put(Jt.MSPA_SERVICE_PROVIDER_MODE.toString(),new ce(2,0).withValidator(e)),i}
1encodeSegment(e){let 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{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new Y("Unable to decode UsTxCoreSegment '"+e+"'")}}}class Zt extends ue{base64UrlEncoder=X.getInstance();bitStringEncoder=Z.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Qt}initializeFields(){let e=new le;return e.put(Jt.GPC_SEGMENT_TYPE.toString(),new ce(2,1)),e.put(Jt.GPC_SEGMENT_INCLUDED.toString(),new Pe(!0)),e.put(Jt.GPC.toString(),new Pe(!1)),e}encodeSegment(e){let 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{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new Y("Unable to decode UsTxGpcSegment '"+e+"'")}}}class en extends ${static ID=16;static VERSION=1;static NAME="ustx";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return en.ID}getName(){return en.NAME}getVersion(){return en.VERSION}initializeSegments(){let e=[];return e.push(new Xt),e.push(new Zt),e}decodeSection(e){let t=this.initializeSegments();if(null!=e&&0!==e.length){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(Jt.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(Jt.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&!0===e[1].getFieldValue(Jt.GPC_SEGMENT_INCLUDED)&&t.push(e[1].encode())),t.join(".")}}var tn;!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"}(tn||(tn={}));const nn=[tn.VERSION,tn.PROCESSING_NOTICE,tn.SALE_OPT_OUT_NOTICE,tn.TARGETED_ADVERTISING_OPT_OUT_NOTICE,tn.SALE_OPT_OUT,tn.TARGETED_ADVERTISING_OPT_OUT,tn.SENSITIVE_DATA_PROCESSING,tn.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,tn.ADDITIONAL_DATA_PROCESSING_CONSENT,tn.MSPA_COVERED_TRANSACTION,tn.MSPA_OPT_OUT_OPTION_MODE,tn.MSPA_SERVICE_PROVIDER_MODE],sn=[tn.GPC_SEGMENT_TYPE,tn.GPC];class rn extends ue{base64UrlEncoder=X.getInstance();bitStringEncoder=Z.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return nn}initializeFields(){const 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(let t=0;t<e.length;t++){let n=e[t];if(n<0||n>2)return!1}return!0}};let i=new le;return i.put(tn.VERSION.toString(),new ce(6,an.VERSION)),i.put(tn.PROCESSING_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(tn.SALE_OPT_OUT_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(tn.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(tn.SALE_OPT_OUT.toString(),new ce(2,0).withValidator(e)),i.put(tn.TARGETED_ADVERTISING_OPT_OUT.toString(),new ce(2,0).withValidator(e)),i.put(tn.SENSITIVE_DATA_PROCESSING.toString(),new it(2,[0,0,0,0,0,0,0,0,0]).withValidator(n)),i.put(tn.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new it(2,[0,0,0,0,0]).withValidator(n)),i.put(tn.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new ce(2,0).withValidator(e)),i.put(tn.MSPA_COVERED_TRANSACTION.toString(),new ce(2,1).withValidator(t)),i.put(tn.MSPA_OPT_OUT_OPTION_MODE.toString(),new ce(2,0).withValidator(e)),i.put(tn.MSPA_SERVICE_PROVIDER_MODE.toString(),new ce(2,0).withValidator(e)),i}
1encodeSegment(e){let 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{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new Y("Unable to decode UsDeCoreSegment '"+e+"'")}}}class on extends ue{base64UrlEncoder=X.getInstance();bitStringEncoder=Z.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return sn}initializeFields(){let e=new le;return e.put(tn.GPC_SEGMENT_TYPE.toString(),new ce(2,1)),e.put(tn.GPC_SEGMENT_INCLUDED.toString(),new Pe(!0)),e.put(tn.GPC.toString(),new Pe(!1)),e}encodeSegment(e){let 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{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new Y("Unable to decode UsDeGpcSegment '"+e+"'")}}}class an extends ${static ID=17;static VERSION=1;static NAME="usde";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return an.ID}getName(){return an.NAME}getVersion(){return an.VERSION}initializeSegments(){let e=[];return e.push(new rn),e.push(new on),e}decodeSection(e){let t=this.initializeSegments();if(null!=e&&0!==e.length){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(tn.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(tn.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&!0===e[1].getFieldValue(tn.GPC_SEGMENT_INCLUDED)&&t.push(e[1].encode())),t.join(".")}}var cn;!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"}(cn||(cn={}));const ln=[cn.VERSION,cn.PROCESSING_NOTICE,cn.SALE_OPT_OUT_NOTICE,cn.TARGETED_ADVERTISING_OPT_OUT_NOTICE,cn.SENSITIVE_DATA_OPT_OUT_NOTICE,cn.SALE_OPT_OUT,cn.TARGETED_ADVERTISING_OPT_OUT,cn.SENSITIVE_DATA_PROCESSING,cn.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,cn.MSPA_COVERED_TRANSACTION,cn.MSPA_OPT_OUT_OPTION_MODE,cn.MSPA_SERVICE_PROVIDER_MODE],dn=[cn.GPC_SEGMENT_TYPE,cn.GPC];class un extends ue{base64UrlEncoder=X.getInstance();bitStringEncoder=Z.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return ln}initializeFields(){const 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(let t=0;t<e.length;t++){let n=e[t];if(n<0||n>2)return!1}return!0}};let i=new le;return i.put(cn.VERSION.toString(),new ce(6,En.VERSION)),i.put(cn.PROCESSING_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(cn.SALE_OPT_OUT_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(cn.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(cn.SENSITIVE_DATA_OPT_OUT_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(cn.SALE_OPT_OUT.toString(),new ce(2,0).withValidator(e)),i.put(cn.TARGETED_ADVERTISING_OPT_OUT.toString(),new ce(2,0).withValidator(e)),i.put(cn.SENSITIVE_DATA_PROCESSING.toString(),new it(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(cn.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new ce(2,0).withValidator(e)),i.put(cn.MSPA_COVERED_TRANSACTION.toString(),new ce(2,1).withValidator(t)),i.put(cn.MSPA_OPT_OUT_OPTION_MODE.toString(),new ce(2,0).withValidator(e)),i.put(cn.MSPA_SERVICE_PROVIDER_MODE.toString(),new ce(2,0).withValidator(e)),i}
1encodeSegment(e){let 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{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new Y("Unable to decode UsIaCoreSegment '"+e+"'")}}}class Sn extends ue{base64UrlEncoder=X.getInstance();bitStringEncoder=Z.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return dn}initializeFields(){let e=new le;return e.put(cn.GPC_SEGMENT_TYPE.toString(),new ce(2,1)),e.put(cn.GPC_SEGMENT_INCLUDED.toString(),new Pe(!0)),e.put(cn.GPC.toString(),new Pe(!1)),e}encodeSegment(e){let 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{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new Y("Unable to decode UsIaGpcSegment '"+e+"'")}}}class En extends ${static ID=18;static VERSION=1;static NAME="usia";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return En.ID}getName(){return En.NAME}getVersion(){return En.VERSION}initializeSegments(){let e=[];return e.push(new un),e.push(new Sn),e}decodeSection(e){let t=this.initializeSegments();if(null!=e&&0!==e.length){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(cn.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(cn.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&!0===e[1].getFieldValue(cn.GPC_SEGMENT_INCLUDED)&&t.push(e[1].encode())),t.join(".")}}var hn;!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"}(hn||(hn={}));const gn=[hn.VERSION,hn.PROCESSING_NOTICE,hn.SALE_OPT_OUT_NOTICE,hn.TARGETED_ADVERTISING_OPT_OUT_NOTICE,hn.SALE_OPT_OUT,hn.TARGETED_ADVERTISING_OPT_OUT,hn.SENSITIVE_DATA_PROCESSING,hn.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,hn.ADDITIONAL_DATA_PROCESSING_CONSENT,hn.MSPA_COVERED_TRANSACTION,hn.MSPA_OPT_OUT_OPTION_MODE,hn.MSPA_SERVICE_PROVIDER_MODE],_n=[hn.GPC_SEGMENT_TYPE,hn.GPC];class pn extends ue{base64UrlEncoder=X.getInstance();bitStringEncoder=Z.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return gn}initializeFields(){const 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(let t=0;t<e.length;t++){let n=e[t];if(n<0||n>2)return!1}return!0}};let i=new le;return i.put(hn.VERSION.toString(),new ce(6,On.VERSION)),i.put(hn.PROCESSING_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(hn.SALE_OPT_OUT_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(hn.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(hn.SALE_OPT_OUT.toString(),new ce(2,0).withValidator(e)),i.put(hn.TARGETED_ADVERTISING_OPT_OUT.toString(),new ce(2,0).withValidator(e)),i.put(hn.SENSITIVE_DATA_PROCESSING.toString(),new it(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(hn.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new ce(2,0).withValidator(e)),i.put(hn.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new ce(2,0).withValidator(e)),i.put(hn.MSPA_COVERED_TRANSACTION.toString(),new ce(2,1).withValidator(t)),i.put(hn.MSPA_OPT_OUT_OPTION_MODE.toString(),new ce(2,0).withValidator(e)),i.put(hn.MSPA_SERVICE_PROVIDER_MODE.toString(),new ce(2,0).withValidator(e)),i}
1encodeSegment(e){let 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{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new Y("Unable to decode UsNeCoreSegment '"+e+"'")}}}class Tn extends ue{base64UrlEncoder=X.getInstance();bitStringEncoder=Z.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return _n}initializeFields(){let e=new le;return e.put(hn.GPC_SEGMENT_TYPE.toString(),new ce(2,1)),e.put(hn.GPC_SEGMENT_INCLUDED.toString(),new Pe(!0)),e.put(hn.GPC.toString(),new Pe(!1)),e}encodeSegment(e){let 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{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new Y("Unable to decode UsNeGpcSegment '"+e+"'")}}}class On extends ${static ID=19;static VERSION=1;static NAME="usne";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return On.ID}getName(){return On.NAME}getVersion(){return On.VERSION}initializeSegments(){let e=[];return e.push(new pn),e.push(new Tn),e}decodeSection(e){let t=this.initializeSegments();if(null!=e&&0!==e.length){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(hn.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(hn.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&!0===e[1].getFieldValue(hn.GPC_SEGMENT_INCLUDED)&&t.push(e[1].encode())),t.join(".")}}var Nn;!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"}(Nn||(Nn={}));const In=[Nn.VERSION,Nn.PROCESSING_NOTICE,Nn.SALE_OPT_OUT_NOTICE,Nn.TARGETED_ADVERTISING_OPT_OUT_NOTICE,Nn.SALE_OPT_OUT,Nn.TARGETED_ADVERTISING_OPT_OUT,Nn.SENSITIVE_DATA_PROCESSING,Nn.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,Nn.ADDITIONAL_DATA_PROCESSING_CONSENT,Nn.MSPA_COVERED_TRANSACTION,Nn.MSPA_OPT_OUT_OPTION_MODE,Nn.MSPA_SERVICE_PROVIDER_MODE],Cn=[Nn.GPC_SEGMENT_TYPE,Nn.GPC];class An extends ue{base64UrlEncoder=X.getInstance();bitStringEncoder=Z.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return In}initializeFields(){const 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(let t=0;t<e.length;t++){let n=e[t];if(n<0||n>2)return!1}return!0}};let i=new le;return i.put(Nn.VERSION.toString(),new ce(6,wn.VERSION)),i.put(Nn.PROCESSING_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(Nn.SALE_OPT_OUT_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(Nn.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(Nn.SALE_OPT_OUT.toString(),new ce(2,0).withValidator(e)),i.put(Nn.TARGETED_ADVERTISING_OPT_OUT.toString(),new ce(2,0).withValidator(e)),i.put(Nn.SENSITIVE_DATA_PROCESSING.toString(),new it(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(Nn.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new it(2,[0,0,0]).withValidator(n)),i.put(Nn.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new ce(2,0).withValidator(e)),i.put(Nn.MSPA_COVERED_TRANSACTION.toString(),new ce(2,1).withValidator(t)),i.put(Nn.MSPA_OPT_OUT_OPTION_MODE.toString(),new ce(2,0).withValidator(e)),i.put(Nn.MSPA_SERVICE_PROVIDER_MODE.toString(),new ce(2,0).withValidator(e)),i}
1encodeSegment(e){let 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{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new Y("Unable to decode UsNhCoreSegment '"+e+"'")}}}class Pn extends ue{base64UrlEncoder=X.getInstance();bitStringEncoder=Z.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Cn}initializeFields(){let e=new le;return e.put(Nn.GPC_SEGMENT_TYPE.toString(),new ce(2,1)),e.put(Nn.GPC_SEGMENT_INCLUDED.toString(),new Pe(!0)),e.put(Nn.GPC.toString(),new Pe(!1)),e}encodeSegment(e){let 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{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new Y("Unable to decode UsNhGpcSegment '"+e+"'")}}}class wn extends ${static ID=20;static VERSION=1;static NAME="usnh";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return wn.ID}getName(){return wn.NAME}getVersion(){return wn.VERSION}initializeSegments(){let e=[];return e.push(new An),e.push(new Pn),e}decodeSection(e){let t=this.initializeSegments();if(null!=e&&0!==e.length){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(Nn.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(Nn.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&!0===e[1].getFieldValue(Nn.GPC_SEGMENT_INCLUDED)&&t.push(e[1].encode())),t.join(".")}}var Dn;!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"}(Dn||(Dn={}));const fn=[Dn.VERSION,Dn.PROCESSING_NOTICE,Dn.SALE_OPT_OUT_NOTICE,Dn.TARGETED_ADVERTISING_OPT_OUT_NOTICE,Dn.SALE_OPT_OUT,Dn.TARGETED_ADVERTISING_OPT_OUT,Dn.SENSITIVE_DATA_PROCESSING,Dn.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,Dn.ADDITIONAL_DATA_PROCESSING_CONSENT,Dn.MSPA_COVERED_TRANSACTION,Dn.MSPA_OPT_OUT_OPTION_MODE,Dn.MSPA_SERVICE_PROVIDER_MODE],mn=[Dn.GPC_SEGMENT_TYPE,Dn.GPC];class Rn extends ue{base64UrlEncoder=X.getInstance();bitStringEncoder=Z.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return fn}initializeFields(){const 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(let t=0;t<e.length;t++){let n=e[t];if(n<0||n>2)return!1}return!0}};let i=new le;return i.put(Dn.VERSION.toString(),new ce(6,Mn.VERSION)),i.put(Dn.PROCESSING_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(Dn.SALE_OPT_OUT_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(Dn.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(Dn.SALE_OPT_OUT.toString(),new ce(2,0).withValidator(e)),i.put(Dn.TARGETED_ADVERTISING_OPT_OUT.toString(),new ce(2,0).withValidator(e)),i.put(Dn.SENSITIVE_DATA_PROCESSING.toString(),new it(2,[0,0,0,0,0,0,0,0,0,0]).withValidator(n)),i.put(Dn.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new it(2,[0,0,0,0,0]).withValidator(n)),i.put(Dn.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new ce(2,0).withValidator(e)),i.put(Dn.MSPA_COVERED_TRANSACTION.toString(),new ce(2,1).withValidator(t)),i.put(Dn.MSPA_OPT_OUT_OPTION_MODE.toString(),new ce(2,0).withValidator(e)),i.put(Dn.MSPA_SERVICE_PROVIDER_MODE.toString(),new ce(2,0).withValidator(e)),i}
1encodeSegment(e){let 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{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new Y("Unable to decode UsNjCoreSegment '"+e+"'")}}}class Vn extends ue{base64UrlEncoder=X.getInstance();bitStringEncoder=Z.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return mn}initializeFields(){let e=new le;return e.put(Dn.GPC_SEGMENT_TYPE.toString(),new ce(2,1)),e.put(Dn.GPC_SEGMENT_INCLUDED.toString(),new Pe(!0)),e.put(Dn.GPC.toString(),new Pe(!1)),e}encodeSegment(e){let 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{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new Y("Unable to decode UsNjGpcSegment '"+e+"'")}}}class Mn extends ${static ID=21;static VERSION=1;static NAME="usnj";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Mn.ID}getName(){return Mn.NAME}getVersion(){return Mn.VERSION}initializeSegments(){let e=[];return e.push(new Rn),e.push(new Vn),e}decodeSection(e){let t=this.initializeSegments();if(null!=e&&0!==e.length){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(Dn.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(Dn.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&!0===e[1].getFieldValue(Dn.GPC_SEGMENT_INCLUDED)&&t.push(e[1].encode())),t.join(".")}}var Un;!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"}(Un||(Un={}));const yn=[Un.VERSION,Un.PROCESSING_NOTICE,Un.SALE_OPT_OUT_NOTICE,Un.TARGETED_ADVERTISING_OPT_OUT_NOTICE,Un.SALE_OPT_OUT,Un.TARGETED_ADVERTISING_OPT_OUT,Un.SENSITIVE_DATA_PROCESSING,Un.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,Un.ADDITIONAL_DATA_PROCESSING_CONSENT,Un.MSPA_COVERED_TRANSACTION,Un.MSPA_OPT_OUT_OPTION_MODE,Un.MSPA_SERVICE_PROVIDER_MODE],Gn=[Un.GPC_SEGMENT_TYPE,Un.GPC];class bn extends ue{base64UrlEncoder=X.getInstance();bitStringEncoder=Z.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return yn}initializeFields(){const 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(let t=0;t<e.length;t++){let n=e[t];if(n<0||n>2)return!1}return!0}};let i=new le;return i.put(Un.VERSION.toString(),new ce(6,Ln.VERSION)),i.put(Un.PROCESSING_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(Un.SALE_OPT_OUT_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(Un.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(Un.SALE_OPT_OUT.toString(),new ce(2,0).withValidator(e)),i.put(Un.TARGETED_ADVERTISING_OPT_OUT.toString(),new ce(2,0).withValidator(e)),i.put(Un.SENSITIVE_DATA_PROCESSING.toString(),new it(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(Un.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new ce(2,0).withValidator(e)),i.put(Un.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new ce(2,0).withValidator(e)),i.put(Un.MSPA_COVERED_TRANSACTION.toString(),new ce(2,1).withValidator(t)),i.put(Un.MSPA_OPT_OUT_OPTION_MODE.toString(),new ce(2,0).withValidator(e)),i.put(Un.MSPA_SERVICE_PROVIDER_MODE.toString(),new ce(2,0).withValidator(e)),i}
1encodeSegment(e){let 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{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new Y("Unable to decode UsTnCoreSegment '"+e+"'")}}}class vn extends ue{base64UrlEncoder=X.getInstance();bitStringEncoder=Z.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return Gn}initializeFields(){let e=new le;return e.put(Un.GPC_SEGMENT_TYPE.toString(),new ce(2,1)),e.put(Un.GPC_SEGMENT_INCLUDED.toString(),new Pe(!0)),e.put(Un.GPC.toString(),new Pe(!1)),e}encodeSegment(e){let 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{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new Y("Unable to decode UsTnGpcSegment '"+e+"'")}}}class Ln extends ${static ID=22;static VERSION=1;static NAME="ustn";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return Ln.ID}getName(){return Ln.NAME}getVersion(){return Ln.VERSION}initializeSegments(){let e=[];return e.push(new bn),e.push(new vn),e}decodeSection(e){let t=this.initializeSegments();if(null!=e&&0!==e.length){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(Un.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(Un.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&!0===e[1].getFieldValue(Un.GPC_SEGMENT_INCLUDED)&&t.push(e[1].encode())),t.join(".")}}var Fn;!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"}(Fn||(Fn={}));const xn=[Fn.VERSION,Fn.PROCESSING_NOTICE,Fn.SALE_OPT_OUT_NOTICE,Fn.TARGETED_ADVERTISING_OPT_OUT_NOTICE,Fn.SALE_OPT_OUT,Fn.TARGETED_ADVERTISING_OPT_OUT,Fn.SENSITIVE_DATA_PROCESSING,Fn.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS,Fn.ADDITIONAL_DATA_PROCESSING_CONSENT,Fn.MSPA_COVERED_TRANSACTION,Fn.MSPA_OPT_OUT_OPTION_MODE,Fn.MSPA_SERVICE_PROVIDER_MODE],kn=[Fn.GPC_SEGMENT_TYPE,Fn.GPC];class Bn extends ue{base64UrlEncoder=X.getInstance();bitStringEncoder=Z.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return xn}initializeFields(){const 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(let t=0;t<e.length;t++){let n=e[t];if(n<0||n>2)return!1}return!0}};let i=new le;return i.put(Fn.VERSION.toString(),new ce(6,jn.VERSION)),i.put(Fn.PROCESSING_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(Fn.SALE_OPT_OUT_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(Fn.TARGETED_ADVERTISING_OPT_OUT_NOTICE.toString(),new ce(2,0).withValidator(e)),i.put(Fn.SALE_OPT_OUT.toString(),new ce(2,0).withValidator(e)),i.put(Fn.TARGETED_ADVERTISING_OPT_OUT.toString(),new ce(2,0).withValidator(e)),i.put(Fn.SENSITIVE_DATA_PROCESSING.toString(),new it(2,[0,0,0,0,0,0,0,0]).withValidator(n)),i.put(Fn.KNOWN_CHILD_SENSITIVE_DATA_CONSENTS.toString(),new ce(2,0).withValidator(e)),i.put(Fn.ADDITIONAL_DATA_PROCESSING_CONSENT.toString(),new ce(2,0).withValidator(e)),i.put(Fn.MSPA_COVERED_TRANSACTION.toString(),new ce(2,1).withValidator(t)),i.put(Fn.MSPA_OPT_OUT_OPTION_MODE.toString(),new ce(2,0).withValidator(e)),i.put(Fn.MSPA_SERVICE_PROVIDER_MODE.toString(),new ce(2,0).withValidator(e)),i}
1encodeSegment(e){let 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{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new Y("Unable to decode UsMnCoreSegment '"+e+"'")}}}class Hn extends ue{base64UrlEncoder=X.getInstance();bitStringEncoder=Z.getInstance();constructor(e){super(),e&&this.decode(e)}getFieldNames(){return kn}initializeFields(){let e=new le;return e.put(Fn.GPC_SEGMENT_TYPE.toString(),new ce(2,1)),e.put(Fn.GPC_SEGMENT_INCLUDED.toString(),new Pe(!0)),e.put(Fn.GPC.toString(),new Pe(!1)),e}encodeSegment(e){let 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{let n=this.base64UrlEncoder.decode(e);this.bitStringEncoder.decode(n,this.getFieldNames(),t)}catch(t){throw new Y("Unable to decode UsMnGpcSegment '"+e+"'")}}}class jn extends ${static ID=23;static VERSION=1;static NAME="usmn";constructor(e){super(),e&&e.length>0&&this.decode(e)}getId(){return jn.ID}getName(){return jn.NAME}getVersion(){return jn.VERSION}initializeSegments(){let e=[];return e.push(new Bn),e.push(new Hn),e}decodeSection(e){let t=this.initializeSegments();if(null!=e&&0!==e.length){let n=e.split(".");n.length>0&&t[0].decode(n[0]),n.length>1?(t[1].setFieldValue(Fn.GPC_SEGMENT_INCLUDED,!0),t[1].decode(n[1])):t[1].setFieldValue(Fn.GPC_SEGMENT_INCLUDED,!1)}return t}encodeSection(e){let t=[];return e.length>=1&&(t.push(e[0].encode()),e.length>=2&&!0===e[1].getFieldValue(Fn.GPC_SEGMENT_INCLUDED)&&t.push(e[1].encode())),t.join(".")}}class Kn{static SECTION_ID_NAME_MAP=new Map([[Le.ID,Le.NAME],[We.ID,We.NAME],[Xe.ID,Xe.NAME],[ot.ID,ot.NAME],[St.ID,St.NAME],[_t.ID,_t.NAME],[Ct.ID,Ct.NAME],[Dt.ID,Dt.NAME],[Ut.ID,Ut.NAME],[vt.ID,vt.NAME],[Ht.ID,Ht.NAME],[Yt.ID,Yt.NAME],[en.ID,en.NAME],[an.ID,an.NAME],[En.ID,En.NAME],[On.ID,On.NAME],[wn.ID,wn.NAME],[Mn.ID,Mn.NAME],[Ln.ID,Ln.NAME],[jn.ID,jn.NAME]]);static SECTION_ORDER=[Le.NAME,We.NAME,Xe.NAME,ot.NAME,St.NAME,_t.NAME,Ct.NAME,Dt.NAME,Ut.NAME,vt.NAME,Ht.NAME,Yt.NAME,en.NAME,an.NAME,En.NAME,On.NAME,wn.NAME,Mn.NAME,Ln.NAME,jn.NAME]}class Wn{sections=new Map;encodedString=null;decoded=!0;dirty=!1;constructor(e){e&&this.decode(e)}setFieldValue(e,t,n){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let i=null;if(this.sections.has(e)?i=this.sections.get(e):e===We.NAME?(i=new We,this.sections.set(We.NAME,i)):e===Le.NAME?(i=new Le,this.sections.set(Le.NAME,i)):e===Xe.NAME?(i=new Xe,this.sections.set(Xe.NAME,i)):e===ot.NAME?(i=new ot,this.sections.set(ot.NAME,i)):e===St.NAME?(i=new St,this.sections.set(St.NAME,i)):e===_t.NAME?(i=new _t,this.sections.set(_t.NAME,i)):e===Ct.NAME?(i=new Ct,this.sections.set(Ct.NAME,i)):e===Dt.NAME?(i=new Dt,this.sections.set(Dt.NAME,i)):e===Ut.NAME?(i=new Ut,this.sections.set(Ut.NAME,i)):e===vt.NAME?(i=new vt,this.sections.set(vt.NAME,i)):e===Ht.NAME?(i=new Ht,this.sections.set(Ht.NAME,i)):e===Yt.NAME?(i=new Yt,this.sections.set(Yt.NAME,i)):e===en.NAME?(i=new en,this.sections.set(en.NAME,i)):e===an.NAME?(i=new an,this.sections.set(an.NAME,i)):e===En.NAME?(i=new En,this.sections.set(En.NAME,i)):e===On.NAME?(i=new On,this.sections.set(On.NAME,i)):e===wn.NAME?(i=new wn,this.sections.set(wn.NAME,i)):e===Mn.NAME?(i=new Mn,this.sections.set(Mn.NAME,i)):e===Ln.NAME?(i=new Ln,this.sections.set(Ln.NAME,i)):e===jn.NAME&&(i=new jn,this.sections.set(jn.NAME,i)),!i)throw new z(e+"."+t+" not found");i.setFieldValue(t,n),this.dirty=!0,i.setIsDirty(!0)}setFieldValueBySectionId(e,t,n){this.setFieldValue(Kn.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(Kn.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(Kn.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(Kn.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(Kn.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);let e=new Ee;
1return 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);let e=[];for(let t=0;t<Kn.SECTION_ORDER.length;t++){let n=Kn.SECTION_ORDER[t];if(this.sections.has(n)){let t=this.sections.get(n);e.push(t.getId())}}return e}encodeModel(e){let t=[],n=[];for(let i=0;i<Kn.SECTION_ORDER.length;i++){let s=Kn.SECTION_ORDER[i];if(e.has(s)){let i=e.get(s);i.setIsDirty(!0),t.push(i.encode()),n.push(i.getId())}}let i=new Ee;return i.setFieldValue("SectionIds",n),t.unshift(i.encode()),t.join("~")}decodeModel(e){if(!e||0==e.length||e.startsWith("DB")){let t=e.split("~"),n=new Map;if(t[0].startsWith("D")){let i=new Ee(t[0]).getFieldValue("SectionIds");if(i.length!==t.length-1)throw new Y("Unable to decode '"+e+"'. The number of sections does not match the number of sections defined in the header.");for(let s=0;s<i.length;s++){if(""===t[s+1].trim())throw new Y("Unable to decode '"+e+"'. Section "+(s+1)+" is blank.");if(i[s]===We.ID){let e=new We(t[s+1]);n.set(We.NAME,e)}else if(i[s]===Le.ID){let e=new Le(t[s+1]);n.set(Le.NAME,e)}else if(i[s]===Xe.ID){let e=new Xe(t[s+1]);n.set(Xe.NAME,e)}else if(i[s]===ot.ID){let e=new ot(t[s+1]);n.set(ot.NAME,e)}else if(i[s]===St.ID){let e=new St(t[s+1]);n.set(St.NAME,e)}else if(i[s]===_t.ID){let e=new _t(t[s+1]);n.set(_t.NAME,e)}else if(i[s]===Ct.ID){let e=new Ct(t[s+1]);n.set(Ct.NAME,e)}else if(i[s]===Dt.ID){let e=new Dt(t[s+1]);n.set(Dt.NAME,e)}else if(i[s]===Ut.ID){let e=new Ut(t[s+1]);n.set(Ut.NAME,e)}else if(i[s]===vt.ID){let e=new vt(t[s+1]);n.set(vt.NAME,e)}else if(i[s]===Ht.ID){let e=new Ht(t[s+1]);n.set(Ht.NAME,e)}else if(i[s]===Yt.ID){let e=new Yt(t[s+1]);n.set(Yt.NAME,e)}else if(i[s]===en.ID){let e=new en(t[s+1]);n.set(en.NAME,e)}else if(i[s]===an.ID){let e=new an(t[s+1]);n.set(an.NAME,e)}else if(i[s]===En.ID){let e=new En(t[s+1]);n.set(En.NAME,e)}else if(i[s]===On.ID){let e=new On(t[s+1]);n.set(On.NAME,e)}else if(i[s]===wn.ID){let e=new wn(t[s+1]);n.set(wn.NAME,e)}else if(i[s]===Mn.ID){let e=new Mn(t[s+1]);n.set(Mn.NAME,e)}else if(i[s]===Ln.ID){let e=new Ln(t[s+1]);n.set(Ln.NAME,e)}else if(i[s]===jn.ID){let e=new jn(t[s+1]);n.set(jn.NAME,e)}}}return n}if(e.startsWith("C")){let t=new Map,n=new Le(e);return t.set(Le.NAME,n),(new Ee).setFieldValue(x.SECTION_IDS,[2]),t.set(Ee.NAME,n),t}throw new Y("Unable to decode '"+e+"'")}encodeSection(e){return this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0),this.sections.has(e)?this.sections.get(e).encode():null}encodeSectionById(e){return this.encodeSection(Kn.SECTION_ID_NAME_MAP.get(e))}decodeSection(e,t){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let n=null;this.sections.has(e)?n=this.sections.get(e):e===We.NAME?(n=new We,this.sections.set(We.NAME,n)):e===Le.NAME?(n=new Le,this.sections.set(Le.NAME,n)):e===Xe.NAME?(n=new Xe,this.sections.set(Xe.NAME,n)):e===ot.NAME?(n=new ot,this.sections.set(ot.NAME,n)):e===St.NAME?(n=new St,this.sections.set(St.NAME,n)):e===_t.NAME?(n=new _t,this.sections.set(_t.NAME,n)):e===Ct.NAME?(n=new Ct,this.sections.set(Ct.NAME,n)):e===Dt.NAME?(n=new Dt,this.sections.set(Dt.NAME,n)):e===Ut.NAME?(n=new Ut,this.sections.set(Ut.NAME,n)):e===vt.NAME?(n=new vt,this.sections.set(vt.NAME,n)):e===Ht.NAME?(n=new Ht,this.sections.set(Ht.NAME,n)):e===Yt.NAME?(n=new Yt,this.sections.set(Yt.NAME,n)):e===en.NAME?(n=new en,this.sections.set(en.NAME,n)):e===an.NAME?(n=new an,this.sections.set(an.NAME,n)):e===En.NAME?(n=new En,this.sections.set(En.NAME,n)):e===On.NAME?(n=new On,this.sections.set(On.NAME,n)):e===wn.NAME?(n=new wn,this.sections.set(wn.NAME,n)):e===Mn.NAME?(n=new Mn,this.sections.set(Mn.NAME,n)):e===Ln.NAME?(n=new Ln,this.sections.set(Ln.NAME,n)):e===jn.NAME&&(n=new jn,this.sections.set(jn.NAME,n)),n&&(n.decode(t),this.dirty=!0)}decodeSectionById(e,t){this.decodeSection(Kn.SECTION_ID_NAME_MAP.get(e),t)}toObject(){this.decoded||(this.sections=this.decodeModel(this.encodedString),this.dirty=!1,this.decoded=!0);let e={};for(let t=0;t<Kn.SECTION_ORDER.length;t++){let n=Kn.SECTION_ORDER[t];this.sections.has(n)&&(e[n]=this.sections.get(n).toObj())}return e}encode(){return(null==this.encodedString||0===this.encodedString.length||this.dirty)&&(this.encodedString=this.encodeModel(this.sections),this.dirty=!1,this.decoded=!0),this.encodedString}decode(e){this.encodedString=e,this.dirty=!1,this.decoded=!1}}class zn{gppVersion="1.1";supportedAPIs=[];eventQueue=new W(this);cmpStatus=b.LOADING;cmpDisplayStatus=v.HIDDEN;signalStatus=F.NOT_READY;applicableSections=[];gppModel=new Wn;cmpId;cmpVersion;eventStatus;reset(){this.eventQueue.clear(),this.cmpStatus=b.LOADING,this.cmpDisplayStatus=v.HIDDEN,this.signalStatus=F.NOT_READY,this.applicableSections=[],this.supportedAPIs=[],this.gppModel=new Wn,delete this.cmpId,delete this.cmpVersion,delete this.eventStatus}}
1class $n extends Error{constructor(e){super(e),this.name="GVLError"}}class Yn{static langSet=new Set(["AR","BG","BS","CA","CS","CY","DA","DE","EL","EN","ES","ET","EU","FI","FR","GL","HE","HI","HR","HU","ID","IS","IT","JA","KA","KO","LT","LV","MK","MS","MT","NL","NO","PL","PT-BR","PT-PT","RO","RU","SK","SL","SQ","SR-LATN","SR-CYRL","SV","SW","TH","TL","TR","UK","VI","ZH","ZH-HANT"]);has(e){return Yn.langSet.has(e)}forEach(e){Yn.langSet.forEach(e)}get size(){return Yn.langSet.size}}class Jn{static absCall(e,t,n,i){return new Promise((s,r)=>{const o=new XMLHttpRequest;o.withCredentials=n,o.addEventListener("load",()=>{if(o.readyState==XMLHttpRequest.DONE)if(o.status>=200&&o.status<300){let e=o.response;if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}s(e)}else r(new Error(`HTTP Status: ${o.status} response type: ${o.responseType}`))}),o.addEventListener("error",()=>{r(new Error("error"))}),o.addEventListener("abort",()=>{r(new Error("aborted"))}),null===t?o.open("GET",e,!0):o.open("POST",e,!0),o.responseType="json",o.timeout=i,o.ontimeout=()=>{r(new Error("Timeout "+i+"ms "+e))},o.send(t)})}static post(e,t,n=!1,i=0){return this.absCall(e,JSON.stringify(t),n,i)}static fetch(e,t=!1,n=0){return this.absCall(e,null,t,n)}}class qn{vendors;static DEFAULT_LANGUAGE="EN";consentLanguages=new Yn;gvlSpecificationVersion;vendorListVersion;tcfPolicyVersion;lastUpdated;purposes;specialPurposes;features;specialFeatures;stacks;dataCategories;language=qn.DEFAULT_LANGUAGE;vendorIds;ready=!1;fullVendorList;byPurposeVendorMap;bySpecialPurposeVendorMap;byFeatureVendorMap;bySpecialFeatureVendorMap;baseUrl;languageFilename="purposes-[LANG].json";static fromVendorList(e){let t=new qn;return t.populate(e),t}static async fromUrl(e){let t=e.baseUrl;if(!t||0===t.length)throw new $n("Invalid baseUrl: '"+t+"'");if(/^https?:\/\/vendorlist\.consensu\.org\//.test(t))throw new $n("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+="/");let n=new qn;if(n.baseUrl=t,e.languageFilename?n.languageFilename=e.languageFilename:n.languageFilename="purposes-[LANG].json",e.version>0){let i=e.versionedFilename;i||(i="archives/vendor-list-v[VERSION].json");let s=t+i.replace("[VERSION]",String(e.version));n.populate(await Jn.fetch(s))}else{let i=e.latestFilename;i||(i="vendor-list.json");let s=t+i;n.populate(await Jn.fetch(s))}return n}async changeLanguage(e){const t=e.toUpperCase();if(!this.consentLanguages.has(t))throw new $n(`unsupported language ${e}`);if(t!==this.language){this.language=t;const n=this.baseUrl+this.languageFilename.replace("[LANG]",e);try{this.populate(await Jn.fetch(n))}catch(e){throw new $n("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}
1),Object.keys(this.features).forEach(e=>{this.byFeatureVendorMap[e]=new Set}),Object.keys(this.specialFeatures).forEach(e=>{this.bySpecialFeatureVendorMap[e]=new Set}),Array.isArray(e)||(e=Object.keys(this.fullVendorList).map(e=>+e)),this.vendorIds=new Set(e),this.vendors=e.reduce((e,t)=>{const n=this.vendors[String(t)];return n&&void 0===n.deletedDate&&(n.purposes.forEach(e=>{this.byPurposeVendorMap[String(e)].consent.add(t)}),n.specialPurposes.forEach(e=>{this.bySpecialPurposeVendorMap[String(e)].add(t)}),n.legIntPurposes&&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,i){const s=e.charAt(0).toUpperCase()+e.slice(1);let r;const o={};return r="purpose"===e&&n?this["by"+s+"VendorMap"][String(t)][n]:this["by"+(i?"Special":"")+s+"VendorMap"][String(t)],r.forEach(e=>{o[String(e)]=this.vendors[String(e)]}),o}getVendorsWithConsentPurpose(e){return this.getFilteredVendors("purpose",e,"consent")}getVendorsWithLegIntPurpose(e){return this.getFilteredVendors("purpose",e,"legInt")}getVendorsWithFlexiblePurpose(e){return this.getFilteredVendors("purpose",e,"flexible")}getVendorsWithSpecialPurpose(e){return this.getFilteredVendors("purpose",e,void 0,!0)}getVendorsWithFeature(e){return this.getFilteredVendors("feature",e)}getVendorsWithSpecialFeature(e){return this.getFilteredVendors("feature",e,void 0,!0)}narrowVendorsTo(e){this.mapVendors(e)}get isReady(){return this.ready}static isInstanceOf(e){return"object"==typeof e&&"function"==typeof e.narrowVendorsTo}}class Qn{callResponder;cmpApiContext;constructor(e,t,n){this.cmpApiContext=new zn,this.cmpApiContext.cmpId=e,this.cmpApiContext.cmpVersion=t,this.callResponder=new K(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(Kn.SECTION_ID_NAME_MAP.get(e),t)}getSectionString(e){return this.cmpApiContext.gppModel.encodeSection(e)}getSectionStringById(e){return this.getSectionString(Kn.SECTION_ID_NAME_MAP.get(e))}setFieldValue(e,t,n){this.cmpApiContext.gppModel.setFieldValue(e,t,n)}setFieldValueBySectionId(e,t,n){this.setFieldValue(Kn.SECTION_ID_NAME_MAP.get(e),t,n)}getFieldValue(e,t){return this.cmpApiContext.gppModel.getFieldValue(e,t)}getFieldValueBySectionId(e,t){return this.getFieldValue(Kn.SECTION_ID_NAME_MAP.get(e),t)}getSection(e){return this.cmpApiContext.gppModel.getSection(e)}getSectionById(e){return this.getSection(Kn.SECTION_ID_NAME_MAP.get(e))}hasSection(e){return this.cmpApiContext.gppModel.hasSection(e)}hasSectionId(e){return this.hasSection(Kn.SECTION_ID_NAME_MAP.get(e))}deleteSection(e){this.cmpApiContext.gppModel.deleteSection(e)}deleteSectionById(e){this.deleteSection(Kn.SECTION_ID_NAME_MAP.get(e))}clear(){this.cmpApiContext.gppModel.clear()}getObject(){return this.cmpApiContext.gppModel.toObject()}getGvlFromVendorList(e){return qn.fromVendorList(e)}async getGvlFromUrl(e){return qn.fromUrl(e)}}let Xn=null,Zn=null,ei=null;
1function ti(e=200,t=1){return Xn&&Zn===e&&ei===t||(Xn=new Qn(e,t),Zn=e,ei=t),Xn}function ni(e){const t=ti();if(t&&e)try{t.setGppString(e);const n=t.getApplicableSections();"function"==typeof t.fireSectionChange&&n.forEach(e=>{try{const n={2:"tcfeuv2",7:"usnat",8:"usca"}[e];n&&t.fireSectionChange(n)}catch(e){console.warn("Could not fire section change event:",e)}})}catch(t){throw console.error("Failed to update GPP API instance with string:",{gppString:e,error:t.message,stack:t.stack}),new Error(`GPP API update failed: ${t.message}. Unable to set GPP string through official API.`)}}function ii(e){return"number"==typeof e&&Number.isInteger(e)&&e>=0&&e<=2?e:0}function si(e,t,n){const i=e.ChannelID,s=t.Scripts&&t.Scripts.find(e=>e.ChannelID===i),r=t.Template&&t.Template.Categories&&t.Template.Categories.find(e=>e.ChannelID===i);let o;if(s&&s.IsStrictlyNecessary)o=e.False;else if(n&&Array.isArray(n)){const t=n.find(e=>String(e.channelId)===String(i));o=t?t.isOptIn?e.False:e.True:r&&"boolean"==typeof r.DefaultValue?r.DefaultValue?e.False:e.True:0}else o=r&&"boolean"==typeof r.DefaultValue?r.DefaultValue?e.False:e.True:0;return ii(o)}function ri(e){return!(!e?.MSPAConfig&&!e?.TCFconfig)}const oi=class{constructor(e){this.eventManager=f,this.datetimestamp=(new Date).getTime(),this.domain=(new u).getDomainName();let t=e.languageCode??"";(e.profileSettings?.SupportedLanguages??[]).includes(t)&&""!==t||(t="Default"),this.cassieSettings=o(e.licenseKey,e.profileSettings,e.baseUrl,t,e.supportedDomains??`*.${this.domain}`,e.environment,e.region,e.recordUrlDomain,e.identityServiceUrl,e.crossDomainConsent,e.customOptions),this.cassieSettings.profileSettings?.TemplateOptions||(this.cassieSettings.profileSettings.TemplateOptions={},this.cassieSettings.profileSettings.TemplateOptions.PreBannerPosition=this.cassieSettings.profileSettings?.TemplateOptions?.PreBannerPosition??1,this.cassieSettings.profileSettings.TemplateOptions.WidgetPosition=this.cassieSettings.profileSettings?.TemplateOptions?.WidgetPosition??2),this.urlHelper=new u(this.cassieSettings),this.cookieWidgetDivId="cassie-widget",this.cassieScripts=[],this.widgetTemplate={},this.cassieWidgetFileSettings=null,this.gpcEnabled=(e.profileSettings.GpcEnabled&&navigator.globalPrivacyControl)??!1,this.gpcStatus=null,this.gppString=null,this.bannerIsVisible=!1,this.modalIsVisible=!1,this.handlerUrl=this.urlHelper.getSubmissionUrl(),this.forceReconsent=!1,this.extentions=[{event:"Sample",extentionFunction:function(){}}],this.init()}
1async init(){this.createWidgetElement(),await this.getWidgetJson(),this.initializeGppWithConfig(),this.cassieWidgetFileSettings.identityServiceUrl&&!this.cassieSettings?.customOptions?.isPreview&&(this.cassieSettings.identityServiceUrl=this.cassieWidgetFileSettings.identityServiceUrl),this.cassieSettings?.crossDomainConsent&&this.cassieWidgetFileSettings.identityServiceUrlPrefix&&(this.cassieSettings.identityServiceUrl=`https://${this.cassieWidgetFileSettings.identityServiceUrlPrefix}.${this.domain}`),this.syrenisHelper=new w(this.cassieSettings,this.cassieWidgetFileSettings.CassieCookiesExpiry),this.cookieHelper=new O(this.cassieSettings.profileSettings.AccessKey,this.cassieWidgetFileSettings.CassieCookiesExpiry),this.loadExistingGppString();const e=this.cassieWidgetFileSettings.reconsentDate.toString(),t=e.endsWith("Z")?new Date(e):new Date(`${e}Z`);this.forceReconsent=t.getTime()>this.cookieHelper.getConsentDate()&&this.cookieHelper.hasConsent(),!this.forceReconsent&&await this.syrenisHelper.runConsent(this.cassieScripts),this.widgetTemplate.hasConsentCookies=this.cookieHelper.hasConsent(),this.widgetTemplate.hasConsent=this.widgetTemplate.hasConsentCookies&&!this.forceReconsent,this.widgetTemplate.useRadioButtons=this.cassieSettings.profileSettings.UseRadioButtons??!1,this.widgetTemplate.hasConsent||this.dropCookiesOnLoad(),await this.getTemplateFiles(),f.emit("CassieTemplateFilesLoaded")}registerExtention(e,t){this.extentions.push({event:e,extentionFunction:t})}runExtentions(e){const t=this.extentions.filter(t=>t.event===e);for(const e of t)e.extentionFunction()}dropCookiesOnLoad(){const e="auto_save",t=this.widgetTemplate.CookieDropBehaviourType??1;var n=3===t||4===t;if(!this.gpcEnabled&&this.cassieSettings.profileSettings.GpcEnabled&&n&&(this.gpcNoSignalAutoDrop=!0),3===t)this.gpcEnabled&&(this.gpcAutoDropInfo={occurred:!0,respected:!1},this.gpcStatus="not-respected"),this.acceptAll(e);else if(2===t){const e=this.cookieHelper.getPrivacyPolicyId()??this.cassieWidgetFileSettings.privacyId;
1this.syrenisHelper.dropStrictlyNecessaryCookies(e,this.cassieScripts)}else if(4===t)this.gpcEnabled&&(this.gpcAutoDropInfo={occurred:!0,respected:!0},this.gpcStatus="respected"),this.acceptAll({respectGpc:!0,source:e});else if(1===t)return}getCurrentConsent(){return this.syrenisHelper.getCurrentConsent()}getGtmConsent(){const e=this.syrenisHelper.getCurrentConsent();return this.getGtmConsentInternal(e)}getGtmConsentInternal(e){const t=this.cassieScripts.filter(e=>null!==e.gtmConsentType&&""!==e.gtmConsentType).reduce((e,t)=>{const n=String(t.gtmConsentType).split(",").map(e=>e.trim()).filter(Boolean);for(const i of n)e[i]||(e[i]={channelIds:new Set,hasStrictlyNecessary:!1}),e[i].channelIds.add(t.channelId),t.isStrictlyNecessary&&(e[i].hasStrictlyNecessary=!0);return e},{}),n=new Set((Array.isArray(e)?e:[]).filter(e=>e&&e.isOptIn).map(e=>String(e.channelId)));return Object.keys(t).map(e=>{const{channelIds:i,hasStrictlyNecessary:s}=t[e];if(s){const t={};return t[e]="granted",t}const r=[...i].every(e=>n.has(String(e)))?"granted":"denied",o={};return o[e]=r,o})}async storeGtmConsent(){const e=this.getGtmConsent();e.length>0&&await this.syrenisHelper.saveGtmConsent(e)}async storeGtmConsentInternal(e){const t=P(e),n=this.getGtmConsentInternal(t);n.length>0&&await this.syrenisHelper.saveGtmConsent(n)}initializeTemplate(){f.emit("CassieTemplateInitialized")}hideBanner(){this.runExtentions("hideBanner"),this.bannerIsVisible=!1,f.emit("CassieBannerVisibility",!1)}showBanner(){this.runExtentions("showBanner"),this.bannerIsVisible=!0,f.emit("CassieBannerVisibility",!0)}showModal(){this.runExtentions("showModal"),this.modalIsVisible=!0,f.emit("CassieModalVisibility",!0)}hideModal(){this.runExtentions("hideModal"),this.modalIsVisible=!1,f.emit("CassieModalVisibility",!1)}getPreferences(){const e=this.widgetTemplate.Categories,t=new Set((this.cassieScripts??[]).filter(e=>e.gpcEnabled).map(e=>String(e.channelId))),n=[];return e.forEach(e=>{const i=e.Cookies.map(e=>({channelId:e.ChannelID,gpcEnabled:e.GpcEnabled||e.GPCEnabled||t.has(String(e.ChannelID)),statementId:e.Statements[0].StatementID,isOptIn:e.DefaultValue}));n.push(...i)}),n}async submitConsent(e,t,n=!1){f.emit("CassieSubmitConsent",e);const i=e.map(e=>({FieldID:`s${e.statementId}_c${e.channelId}`,IsChecked:e.isOptIn?1:0}));if(await this.storeGtmConsentInternal(i),await this.syrenisHelper.processConsent(e,this.cassieScripts,this.cassieWidgetFileSettings,i,n),this.widgetTemplate.hasConsent=!0,f.emit("CassieProcessedConsent",e),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"CassieGtmConsent"}),this.generateAndStoreGPPString(e),this.handlerUrl)try{const n=this.cookieHelper.getPrivacyPolicyId()??this.cassieWidgetFileSettings.privacyId;this.syrenisHelper.postConsentToCassie(this.handlerUrl,t,n,this.cookieWidgetDivId).then(t=>(f.emit("CassieSubmittedConsent",e),t)).catch(async()=>{const i=await this.syrenisHelper.postConsentToCassie(this.defaultSubmissionUrl,t,n,this.cookieWidgetDivId);return f.emit("CassieSubmittedConsent",e),i})}catch(e){return console.error(e),e}}addConsentListener(e){document.addEventListener("CassieProcessedConsent",e)}hasConsent(){return this.widgetTemplate.hasConsent=this.cookieHelper.hasConsent(),this.widgetTemplate.hasConsent}getGppString(){return this.gppString}acceptAll(e){if("string"==typeof e||null==e){var t=e;(e={}).source=t,e.respectGpc=!1}let n=this.getPreferences();n.forEach(t=>{t.isOptIn=!0,e.respectGpc&&this.gpcEnabled&&t.gpcEnabled&&(t.isOptIn=!1)}),this.submitConsent(n,e.source)}rejectAll(e){const t=this.getPreferences();t.forEach(e=>e.isOptIn=!1),this.submitConsent(t,e,!0)}createWidgetElement(){if(!this.cassieSettings.profileSettings.LoadTemplateHtml)return;const e=this.cookieWidgetDivId;if(null===document.getElementById(e)||0===document.getElementById(e).length){const t=document.createElement("div");t.setAttribute("id",e),t.style.display="none",t.classList.add("syrenis-cookie-widget"),document.body.appendChild(t)}}async getWidgetJson(){let e;try{e=await i(this.urlHelper.determineJsonUrl())}catch(t){if(404!==t?.response?.status||"Default"===this.cassieSettings.languageCode)throw t;this.cassieSettings.languageCode="Default",e=await i(this.urlHelper.determineJsonUrl())}
1this.populateWidget(e),f.emit("CassieWidgetFileLoaded",null)}async getTemplateFiles(){const e=`${this.cassieSettings.baseUrl}/templates/${this.cassieSettings.profileSettings.Template}/`;if(this.cassieSettings.profileSettings.LoadTemplateCss&&this.AddCssToPage(`${e}template.min.css`),this.cassieSettings.profileSettings.LoadTemplateHtml){const t=await i(`${e}index.min.html`);this.loadHtmlToElement(this.cookieWidgetDivId,t)}this.cassieSettings.profileSettings.LoadTemplateJs&&await this.loadScriptToDOM(`${e}template.min.js`,{reExecute:!0})}AddCssToPage(e){const{head:t}=document,n=document.createElement("link");n.type="text/css",n.rel="stylesheet",n.href=e,t.insertBefore(n,t.childNodes[0])}loadHtmlToElement(e,t){const n=document.getElementById(e);n.innerHTML=t;const i=document.getElementsByTagName("body")[0];i.insertBefore(n,i.firstChild)}loadScriptToDOM(e,{reExecute:t=!1}={}){if(this._scriptLoadPromises=this._scriptLoadPromises??new Map,t)this._scriptLoadPromises.delete(e),document.querySelectorAll(`script[src="${e}"]`).forEach(e=>e.remove());else{if(this._scriptLoadPromises.has(e))return this._scriptLoadPromises.get(e);if(document.querySelector(`script[src="${e}"]`)){const t=Promise.resolve();return this._scriptLoadPromises.set(e,t),t}}const n=new Promise((t,n)=>{const i=document.createElement("script");i.src=e,i.onload=()=>t(),i.onerror=()=>{this._scriptLoadPromises.delete(e),i.remove(),n(new Error(`Failed to load script: ${e}`))},document.body.appendChild(i)});return this._scriptLoadPromises.set(e,n),n}loadExistingGppString(){if((!this.cassieWidgetFileSettings||!this.cassieWidgetFileSettings.widgetResponse||ri(this.cassieWidgetFileSettings.widgetResponse))&&this.cookieHelper){const e=this.cookieHelper.getCookieValueByName("__gpp");e&&(this.gppString=e,function(e,t=200,n=1){const i=ti(t,n);if(e)try{ni(e),"function"==typeof i.setCmpStatus&&i.setCmpStatus("loaded"),"function"==typeof i.setSignalStatus&&i.setSignalStatus("ready"),"function"==typeof i.fireEvent&&(i.fireEvent("cmpStatus","loaded"),i.fireEvent("signalStatus","ready"))}catch(e){console.error("Failed to initialize GPP for returning user:",e)}}(e))}}initializeGppWithConfig(){if(this.cassieWidgetFileSettings&&this.cassieWidgetFileSettings.widgetResponse){const{widgetResponse:e}=this.cassieWidgetFileSettings;if(!ri(e))return;!function(e,t=200,n=1){!!ri(e)&&function(e=200,t=1){const n=ti(e,t);if("undefined"!=typeof window&&(window.__gpp=function(t,i,s){if(!n)return window.__gpp.queue||(window.__gpp.queue=[]),void window.__gpp.queue.push({command:t,callback:i,parameter:s});try{switch(t){case"addEventListener":"function"==typeof i&&n.addEventListener(s,i);break;case"removeEventListener":"function"==typeof i&&n.removeEventListener(s,i);break;case"hasSection":{const e=n.hasSection(s);return"function"==typeof i&&i(e,!0),e}case"getSection":{const e=n.getSection(s);return"function"==typeof i&&i(e,!0),e}case"getGPPString":{const e=n.getGppString();return"function"==typeof i&&i(e,!0),e}case"getField":{const e=n.getFieldValue(s);return"function"==typeof i&&i(e,!0),e}case"ping":{const t=n.getApplicableSections()||[],s=n.getGppString()||"",r=n.getObject()||{},o={gppVersion:"1.1",cmpStatus:"loaded",cmpDisplayStatus:"hidden",signalStatus:"ready",supportedAPIs:["2:tcfeuv2","7:usnat"],cmpId:e,sectionList:t,applicableSections:t,gppString:s,parsedSections:r};return"function"==typeof i&&i(o,!0),o}default:"function"==typeof i&&i(null,!1)}}catch(e){console.error("GPP API Error:",e),"function"==typeof i&&i(null,!1)}},window.__gpp.queue&&Array.isArray(window.__gpp.queue))){const e=window.__gpp.queue.slice();window.__gpp.queue=[],e.forEach(e=>{window.__gpp(e.command,e.callback,e.parameter)})}}(t,n)}(e)}}generateAndStoreGPPString(e){if(!this.cassieWidgetFileSettings||!this.cassieWidgetFileSettings.widgetResponse)return void console.error("CassieWidget: widgetResponse not available for GPP string generation.");const{widgetResponse:t}=this.cassieWidgetFileSettings;if(ri(t)){e||console.warn("CassieWidget: formConsent not available for GPP string generation.");try{const n=200,i=1;this.gppString=function(e,t,n,i=null){if(!e?.MSPAConfig&&!e?.TCFconfig)return null;const s=ti(t,n),r=[];if(e.MSPAConfig){const t=e.MSPAConfig,n="usnat";if(t.Core)for(const[r,o]of Object.entries(t.Core))if("SaleOptOut"===r||"SharingOptOut"===r||"TargetedAdvertisingOptOut"===r)if("object"==typeof o&&null!==o&&"ChannelID"in o&&"True"in o&&"False"in o){const t=si(o,e,i);s.setFieldValue(n,r,t)}else{const e=ii(o);s.setFieldValue(n,r,e)}else s.setFieldValue(n,r,o);if(t.SensitiveDataProcessing&&t.SensitiveDataProcessing.items){const r=new Array(16).fill(0);for(let n=1;n<=16;n++){const s=n.toString();if(void 0!==t.SensitiveDataProcessing.items[s]){const o=t.SensitiveDataProcessing.items[s];if("object"==typeof o&&null!==o&&"ChannelID"in o&&"True"in o&&"False"in o){const t=si(o,e,i);r[n-1]=t}else r[n-1]=ii(o)}}s.setFieldValue(n,"SensitiveDataProcessing",r)}
1if(t.KnownChildSensitiveDataConsents&&t.KnownChildSensitiveDataConsents.items){const r=new Array(10).fill(0);for(let n=1;n<=10;n++){const s=n.toString();if(void 0!==t.KnownChildSensitiveDataConsents.items[s]){const o=t.KnownChildSensitiveDataConsents.items[s];if("object"==typeof o&&null!==o&&"ChannelID"in o&&"True"in o&&"False"in o){const t=si(o,e,i);r[n-1]=t}else r[n-1]=ii(o)}}s.setFieldValue(n,"KnownChildSensitiveDataConsents",r)}if(void 0!==t.PersonalDataConsents){const r=t.PersonalDataConsents;if("object"==typeof r&&null!==r&&"ChannelID"in r&&"True"in r&&"False"in r){const t=si(r,e,i);s.setFieldValue(n,"PersonalDataConsents",t)}else s.setFieldValue(n,"PersonalDataConsents",ii(r))}void 0!==t.MspaCoveredTransaction&&s.setFieldValue(n,"MspaCoveredTransaction",t.MspaCoveredTransaction),void 0!==t.MspaOptOutOptionMode&&s.setFieldValue(n,"MspaOptOutOptionMode",t.MspaOptOutOptionMode),void 0!==t.MspaServiceProviderMode&&s.setFieldValue(n,"MspaServiceProviderMode",t.MspaServiceProviderMode),r.includes(7)||r.push(7)}if(e.TCFconfig){const t=e.TCFconfig,n="tcfeuv2";for(const[e,i]of Object.entries(t))null!=i&&("Created"===e||"LastUpdated"===e?s.setFieldValue(n,e,new Date(i)):s.setFieldValue(n,e,i));r.includes(2)||r.push(2)}return r.sort((e,t)=>e-t),s.setApplicableSections(r),s.getGppString()}(t,n,i,e),this.gppString&&this.cookieHelper?(this.cookieHelper.storeCookie("__gpp",this.gppString,null,null),ni(this.gppString)):this.gppString||this.cookieHelper&&this.cookieHelper.storeCookie("__gpp","",null,null)}catch(e){console.error("CassieWidget: Error generating or storing GPP string:",e),this.gppString=null}}}populateWidget(e){if(this.cassieWidgetFileSettings=new a(e),this.cassieWidgetFileSettings.widgetResponse=e,e.Scripts.forEach(e=>{const t=new D(e);this.cassieScripts.push(t)}),!(e.AccessKeys?.split(",").map(e=>e.toLowerCase().trim())??[]).includes(this.cassieSettings.profileSettings.AccessKey.toLowerCase().trim())&&"n/a"!==this.cassieSettings.profileSettings.AccessKey&&!this.cassieSettings?.customOptions?.isPreview)throw new Error(`Access Key: ${this.cassieSettings.profileSettings.AccessKey}\n        can't access widget with id: ${this.cassieSettings.widgetId}`);const t=e.SupportedDomains;if(t&&!this.urlHelper.checkDomain(t)&&!this.cassieSettings?.customOptions?.isPreview)throw new Error(`Not supported domain: ${this.domain} the supported domains are ${t}.\n        Please add this domain to your Cassie system`);this.cassieSettings.supportedDomains=t,this.widgetTemplate=e.Template,this.widgetTemplate.strictlyNecessary=e.Scripts.filter(e=>e.IsStrictlyNecessary).map(e=>({cookieName:e.CookieName,cookieDescription:e.CookieDescription})),this.widgetTemplate.Services=e.Scripts}},ai=class{constructor(e){this.widgetProfileId=e.widgetProfileId??null,this.licenseKey=e.licenseKey??null,this.licenseKey||console.error("licenseKey cannot be null"),this.identityUrl=e.identityUrl??null,this.supportedDomains=e.supportedDomains??null,this.languageCode=e?.languageCode??"en",this.customOptions=e.customOptions??null,this.region=e.region??"use",this.environment=e.environment??"production",this.crossDomainConsent=e.crossDomainConsent??!1,this.widgetProfileUrl=e.widgetProfileUrl??null,this.profileSettings=e.widgetProfileSettings??null,this.widgetLocation=e.widgetLocationUrl??null,this.customServerPath=e.customServerPathUrl??null,this.Widget=null,this.baseUrl=e.baseUrl??this.getBaseUrl(),this.recordUrl=e.recordUrl??null,this.error={isError:!1,errorMessage:""},this.isLoading=!0,this.init()}
1async init(){try{await this.initWidget()}catch(e){if(this.isLoading=!1,this.error.isError=!0,this.error.errorMessage=e,"dev"===this.environment)throw e}}async initWidget(){this.profileSettings=this.profileSettings??await i(this.getProfileUrl()),this.widgetLocation=this.widgetLocation??this.getWidgetUrl(this.profileSettings.Version);const e=await this.getProfiler();await this.loadExternalScriptToDOM(this.widgetLocation);const t=o(this.licenseKey,this.profileSettings,this.baseUrl,this.languageCode,this.supportedDomains,this.environment,this.region,this.recordUrl,this.identityUrl,e,this.customOptions);this.Widget=new oi(t),this.isLoading=!1}getProfiler(){return this.crossDomainConsent?new Promise(e=>{try{e(this.crossDomainConsent?"true":null)}catch(t){this.error.isError=!0,this.error.errorMessage=t,e(!1)}}):Promise.resolve(null)}getWidgetUrl(e){return`${this.baseUrl}/versions/${e??"4"}/widget.js`}getBaseUrl(){if(this.customServerPath)return this.customServerPath;const e="production"===this.environment?"":`-${this.environment}`,t=window?.cassieResourceRootDomain??"cassiecloud.com";return`https://cscript-cdn-${this.region}${e}.${t}`}getProfileUrl(){return this.widgetProfileUrl?this.widgetProfileUrl:`${this.getBaseUrl()}/${this.licenseKey}/widgetProfile/widgetProfile_${this.widgetProfileId}.json`}loadExternalScriptToDOM(e){if(this._scriptLoadPromises=this._scriptLoadPromises??new Map,this._scriptLoadPromises.has(e))return this._scriptLoadPromises.get(e);if(document.querySelector(`script[src="${e}"]`)){const t=Promise.resolve();return this._scriptLoadPromises.set(e,t),t}const t=new Promise((t,n)=>{const i=document.createElement("script");i.src=e,i.onload=()=>t(),i.onerror=()=>{this._scriptLoadPromises.delete(e),i.remove(),n(new Error(`Failed to load script: ${e}`))},document.body.appendChild(i)});return this._scriptLoadPromises.set(e,t),t}compactFormatKeyValueToJson(e){if(!e||"string"!=typeof e||""===e.trim())return[];const t=[],n=e.split("|");let i={};return n.forEach(e=>{const[n,s]=e.split(":");n&&void 0!==s?i[n]=s:(t.push(i),i={})}),Object.keys(i).length>0&&t.push(i),t}getSyrenisGtmConsent(){const e=this.profileSettings.AccessKey;let t="";const n=document.cookie.split(";");for(let i=0;i<n.length;i++){const s=n[i].trim(),r=`SyrenisGtmConsent_${e}=`;if(0===s.indexOf(r)){t=s.substring(r.length);break}}if(""!==t)try{return JSON.parse(t)}catch(e){return this.compactFormatKeyValueToJson(t)}return null}};function ci(e){return null==e||""===e?null:String(e)}function li(e){if(null==e||""===e)return null;const t=String(e).trim();try{const e=new URL(t);return"http:"!==e.protocol&&"https:"!==e.protocol?null:t}catch(e){return null}}window.CassieWidgetLoaderModule=ai,window.SyrenisBannerLoaderModule=ai,function(){if(window.__syrenisInitializing)return;if(window.__syrenisInitializing=!0,window.SyrenisBannerLoader||window.CassieWidgetLoader)return void(window.__syrenisInitializing=!1);if(void 0!==window.syrenisSettings&&null!==window.syrenisSettings){try{const e=new ai(window.syrenisSettings);window.SyrenisBannerLoader=e,window.CassieWidgetLoader=e,window.__syrenisInitializing=!1}catch(e){window.__syrenisInitializing=!1}return}if(void 0!==window.cassieSettings&&null!==window.cassieSettings){try{const e=new ai(window.cassieSettings);window.CassieWidgetLoader=e,window.SyrenisBannerLoader=e,window.__syrenisInitializing=!1}catch(e){window.__syrenisInitializing=!1}return}const e=function(){if(document.currentScript)return document.currentScript;const e=document.querySelector("script[data-syrenis-widget-profile-id]");if(e)return e;const t=document.getElementsByTagName("script");for(let e=t.length-1;e>=0;e--){const n=t[e];if(n.src&&n.src.includes("/loader.js"))return n}return null}();if(e&&e.dataset.syrenisWidgetProfileId)try{const t=function(e){const{dataset:t}=e,n={};if(n.widgetProfileId=function(e){if(null==e||""===e)return null;const t=parseInt(e,10);return isNaN(t)?null:t}(t.syrenisWidgetProfileId),n.licenseKey=ci(t.syrenisLicenseKey),n.region=ci(t.syrenisRegion)??"use",n.environment=ci(t.syrenisEnvironment)??"production",n.languageCode=ci(t.syrenisLanguageCode)??"",n.crossDomainConsent=function(e){if(null==e||""===e)return null;const t=String(e).toLowerCase().trim();return"true"===t||"1"===t||"yes"===t||"false"!==t&&"0"!==t&&"no"!==t&&null}(t.syrenisCrossDomainConsent)??!1,n.identityUrl=li(t.syrenisIdentityUrl),n.supportedDomains=ci(t.syrenisSupportedDomains),n.widgetProfileUrl=li(t.syrenisWidgetProfileUrl),n.widgetLocationUrl=li(t.syrenisWidgetLocationUrl),n.customServerPathUrl=li(t.syrenisCustomServerPath),n.baseUrl=li(t.syrenisBaseUrl),n.recordUrl=li(t.syrenisRecordUrl),t.syrenisWidgetProfileSettings)try{n.widgetProfileSettings=JSON.parse(t.syrenisWidgetProfileSettings)}catch(e){n.widgetProfileSettings=null}if(t.syrenisCustomOptions)try{n.customOptions=JSON.parse(t.syrenisCustomOptions)}catch(e){n.customOptions=null}return n}(e);if(!function(e){const t=[];return e.widgetProfileId?"number"!=typeof e.widgetProfileId&&t.push("widgetProfileId must be a number, got "+typeof e.widgetProfileId):t.push("widgetProfileId is required"),e.licenseKey?"string"!=typeof e.licenseKey&&t.pu
1sh("licenseKey must be a string, got "+typeof e.licenseKey):t.push("licenseKey is required"),!(t.length>0)}(t))return void(window.__syrenisInitializing=!1);const n=new ai(t);window.SyrenisBannerLoader=n,window.CassieWidgetLoader=n,window.__syrenisInitializing=!1}catch(e){window.__syrenisInitializing=!1}else window.__syrenisInitializing=!1}()})()})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.