UNPKG

@usercentrics/cmp-browser-sdk

Version:
1 lines 342 kB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UC_SDK={})}(this,(function(e){"use strict";function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function n(e,t,n,i,s,r,o){try{var a=e[r](o),c=a.value}catch(e){return void n(e)}a.done?t(c):Promise.resolve(c).then(i,s)}function i(e){return function(){var t=this,i=arguments;return new Promise((function(s,r){var o=e.apply(t,i);function a(e){n(o,s,r,a,c,"next",e)}function c(e){n(o,s,r,a,c,"throw",e)}a(void 0)}))}}function s(e,t,n){return t=d(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,p()?Reflect.construct(t,n||[],d(e).constructor):t.apply(e,n))}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,C(i.key),i)}}function a(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=y(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,s=function(){};return{s:s,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){a=!0,r=e},f:function(){try{o||null==n.return||n.return()}finally{if(a)throw r}}}}function u(e,t,n){return(t=C(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(){return l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var i=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=d(e)););return e}(e,t);if(i){var s=Object.getOwnPropertyDescriptor(i,t);return s.get?s.get.call(arguments.length<3?e:n):s.value}},l.apply(null,arguments)}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&S(e,t)}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function v(){v=function(){return t};var e,t={},n=Object.prototype,i=n.hasOwnProperty,s=Object.defineProperty||function(e,t,n){e[t]=n.value},r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",c=r.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function l(e,t,n,i){var r=t&&t.prototype instanceof E?t:E,o=Object.create(r.prototype),a=new L(i||[]);return s(o,"_invoke",{value:N(e,n,a)}),o}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var h="suspendedStart",p="suspendedYield",g="executing",f="completed",S={};function E(){}function I(){}function C(){}var T={};u(T,o,(function(){return this}));var y=Object.getPrototypeOf,m=y&&y(y(R([])));m&&m!==n&&i.call(m,o)&&(T=m);var A=C.prototype=E.prototype=Object.create(T);function _(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function n(s,r,o,a){var c=d(e[s],e,r);if("throw"!==c.type){var u=c.arg,l=u.value;return l&&"object"==typeof l&&i.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,o,a)}),(function(e){n("throw",e,o,a)})):t.resolve(l).then((function(e){u.value=e,o(u)}),(function(e){return n("throw",e,o,a)}))}a(c.arg)}var r;s(this,"_invoke",{value:function(e,i){function s(){return new t((function(t,s){n(e,i,t,s)}))}return r=r?r.then(s,s):s()}})}function N(t,n,i){var s=h;return function(r,o){if(s===g)throw Error("Generator is already running");if(s===f){if("throw"===r)throw o;return{value:e,done:!0}}for(i.method=r,i.arg=o;;){var a=i.delegate;if(a){var c=b(a,i);if(c){if(c===S)continue;return c}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(s===h)throw s=f,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);s=g;var u=d(t,n,i);if("normal"===u.type){if(s=i.done?f:p,u.arg===S)continue;return{value:u.arg,done:i.done}}"throw"===u.type&&(s=f,i.method="throw",i.arg=u.arg)}}}function b(t,n){var i=n.method,s=t.iterator[i];if(s===e)return n.delegate=null,"throw"===i&&t.iterator.return&&(n.method="return",n.arg=e,b(t,n),"throw"===n.method)||"return"!==i&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+i+"' method")),S;var r=d(s,t.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,S;var o=r.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,S):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,S)}function D(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(D,this),this.reset(!0)}function R(t){if(t||""===t){var n=t[o];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var s=-1,r=function n(){for(;++s<t.length;)if(i.call(t,s))return n.value=t[s],n.done=!1,n;return n.value=e,n.done=!0,n};return r.next=r}}throw new TypeError(typeof t+" is not iterable")}return I.prototype=C,s(A,"constructor",{value:C,configurable:!0}),s(C,"constructor",{value:I,configurable:!0}),I.displayName=u(C,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===I||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,C):(e.__proto__=C,u(e,c,"GeneratorFunction")),e.prototype=Object.create(A),e},t.awrap=function(e){return{__await:e}},_(O.prototype),u(O.prototype,a,(function(){return this})),t.AsyncIterator=O,t.async=function(e,n,i,s,r){void 0===r&&(r=Promise);var o=new O(l(e,n,i,s),r);return t.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},_(A),u(A,c,"Generator"),u(A,o,(function(){return this})),u(A,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var i in t)n.push(i);return n.reverse(),function e(){for(;n.length;){var i=n.pop();if(i in t)return e.value=i,e.done=!1,e}return e.done=!0,e}},t.values=R,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(w),!t)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function s(i,s){return a.type="throw",a.arg=t,n.next=i,s&&(n.method="next",n.arg=e),!!s}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],a=o.completion;if("root"===o.tryLoc)return s("end");if(o.tryLoc<=this.prev){var c=i.call(o,"catchLoc"),u=i.call(o,"finallyLoc");if(c&&u){if(this.prev<o.catchLoc)return s(o.catchLoc,!0);if(this.prev<o.finallyLoc)return s(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return s(o.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return s(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var s=this.tryEntries[n];if(s.tryLoc<=this.prev&&i.call(s,"finallyLoc")&&this.prev<s.finallyLoc){var r=s;break}}r&&("break"===e||"continue"===e)&&r.tryLoc<=t&&t<=r.finallyLoc&&(r=null);var o=r?r.completion:{};return o.type=e,o.arg=t,r?(this.method="next",this.next=r.finallyLoc,S):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),S},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),w(n),S}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var s=i.arg;w(n)}return s}}throw Error("illegal catch attempt")},delegateYield:function(t,n,i){return this.delegate={iterator:R(t),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=e),S}},t}function S(e,t){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},S(e,t)}function E(e,t,n,i){var s=l(d(1&i?e.prototype:e),t,n);return 2&i&&"function"==typeof s?function(e){return s.apply(n,e)}:s}function I(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||y(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function T(e){return T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},T(e)}function y(e,n){if(e){if("string"==typeof e)return t(e,n);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?t(e,n):void 0}}function m(e){var t="function"==typeof Map?new Map:void 0;return m=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(p())return Reflect.construct.apply(null,arguments);var i=[null];i.push.apply(i,t);var s=new(e.bind.apply(e,i));return n&&S(s,n.prototype),s}(e,arguments,d(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),S(n,e)},m(e)}var A=function(e,t){return A=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},A(e,t)};function _(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}A(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var O,N,b,D=function(){return D=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var s in t=arguments[n])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},D.apply(this,arguments)};function w(e,t,n,i){return new(n||(n=Promise))((function(s,r){function o(e){try{c(i.next(e))}catch(t){r(t)}}function a(e){try{c(i.throw(e))}catch(t){r(t)}}function c(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((i=i.apply(e,t||[])).next())}))}function L(e,t){var n,i,s,r={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(r=0)),r;)try{if(n=1,i&&(s=2&a[0]?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[2&a[0],s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(!(s=r.trys,(s=s.length>0&&s[s.length-1])||6!==a[0]&&2!==a[0])){r=0;continue}if(3===a[0]&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(6===a[0]&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(c){a=[6,c],i=0}finally{n=s=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}function R(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function P(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,s,r=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o}function V(e,t,n){if(n||2===arguments.length)for(var i,s=0,r=t.length;s<r;s++)!i&&s in t||(i||(i=Array.prototype.slice.call(t,0,s)),i[s]=t[s]);return e.concat(i||Array.prototype.slice.call(t))}function U(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=R(e),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(n){t[n]=e[n]&&function(t){return new Promise((function(i,s){(function(e,t,n,i){Promise.resolve(i).then((function(t){e({value:t,done:n})}),t)})(i,s,(t=e[n](t)).done,t.value)}))}}}"function"==typeof SuppressedError&&SuppressedError,function(e){e.CONSENT_RESPONSE="consent-response",e.CONSENT_UI="consent-ui"}(O||(O={})),function(e){e.ACCEPT="accept",e.REJECT="reject",e.DISMISS="dismiss",e.FULLSCREEN="enter-fullscreen",e.READY="ready"}(N||(N={})),function(e){e[e.TCF_V2=2]="TCF_V2",e[e.CCPA=3]="CCPA"}(b||(b={}));var M,k,F,G,B,x,H,j,Y,J,W,K,z,Q;!function(e){e[e.FALSE=0]="FALSE",e[e.TRUE=1]="TRUE"}(M||(M={})),function(e){e[e.DATA_LAYER=0]="DATA_LAYER",e[e.WINDOW_EVENT=1]="WINDOW_EVENT"}(k||(k={})),function(e){e[e.MAJOR=0]="MAJOR",e[e.MINOR=1]="MINOR",e[e.PATCH=2]="PATCH"}(F||(F={})),function(e){e.CALL_INIT="Usercentrics: You have to call the init method before!",e.DATA_LOCAL="Usercentrics: disableServerConsents and controllerId should not be present at the same time in the InitOptions!",e.UNKNOWN_VARIANT="Usercentrics: Unknown variant",e.NOT_CCPA="Usercentrics: CCPA was not initialized",e.NOT_DEFAULT="Usercentrics: GDPR was not initialized",e.NOT_TCF="Usercentrics: TCF was not initialized"}(G||(G={})),e.FIRST_LAYER_VARIANT=void 0,(B=e.FIRST_LAYER_VARIANT||(e.FIRST_LAYER_VARIANT={})).BANNER="BANNER",B.WALL="WALL",e.SECOND_LAYER_VARIANT=void 0,(x=e.SECOND_LAYER_VARIANT||(e.SECOND_LAYER_VARIANT={})).CENTER="CENTER",x.SIDE="SIDE",e.THEME=void 0,(H=e.THEME||(e.THEME={}))[H.DARK=0]="DARK",H[H.LIGHT=1]="LIGHT",e.SECOND_LAYER_TRIGGER=void 0,(j=e.SECOND_LAYER_TRIGGER||(e.SECOND_LAYER_TRIGGER={})).LINK="LINK",j.BUTTON="BUTTON",j.MORE_LINK_BUTTON="MORE_LINK_BUTTON",e.SECOND_LAYER_SIDE=void 0,(Y=e.SECOND_LAYER_SIDE||(e.SECOND_LAYER_SIDE={})).LEFT="LEFT",Y.RIGHT="RIGHT",e.BUTTON_ALIGNMENT=void 0,(J=e.BUTTON_ALIGNMENT||(e.BUTTON_ALIGNMENT={})).HORIZONTAL="HORIZONTAL",J.VERTICAL="VERTICAL",e.DPS_DISPLAY_FORMAT=void 0,(W=e.DPS_DISPLAY_FORMAT||(e.DPS_DISPLAY_FORMAT={})).ALL="ALL",W.SHORT="SHORT",function(e){e.CROSS_DEVICE_DATA_NOT_AVAILABLE="Usercentrics: Cross Device Consents data is not available",e.CROSS_DEVICE_TCF_DATA_NOT_AVAILABLE="Usercentrics: Cross Device TCF data is not available",e.CROSS_DEVICE_FEATURE_DISABLED="Usercentrics: The `Cross-Device Consent Sharing` feature is not enabled. Please contact the support team in order to enable this feature for your configuration"}(K||(K={})),function(e){e.CROSS_DOMAIN_DATA_NOT_AVAILABLE="Usercentrics: Cross Domain Consents data is not available",e.CROSS_DOMAIN_TCF_DATA_NOT_AVAILABLE="Usercentrics: Cross Domain TCF data is not available",e.CROSS_DOMAIN_FEATURE_NOT_AVAILABLE="Usercentrics: Cross Domain Consent Sharing is not available.",e.CROSS_DOMAIN_LANGUAGE_NOT_AVAILABLE="Usercentrics: Cross Domain Consent language is not available",e.CROSS_DOMAIN_SET_DATA_FAILURE="Usercentrics: Unable to set Cross Domain data",e.CROSS_DOMAIN_SET_TCF_DATA_FAILURE="Usercentrics: Unable to set Cross Domain TCF data",e.CROSS_DOMAIN_IFRAME_ERROR="Usercentrics: Iframe error",e.CROSS_DOMAIN_IFRAME_NOT_FOUND="Usercentrics: Cross Domain iFrame not found",e.CROSS_DOMAIN_IFRAME_LOAD_ERROR="Usercentrics: IFrame did not load"}(z||(z={})),function(e){e.CLEAR="clear",e.GET_CROSS_DOMAIN_LANGUAGE="getCrossDomainLanguage",e.GET_CROSS_DOMAIN_SESSION_DATA="getCrossDomainSessionData",e.GET_CROSS_DOMAIN_TCF_DATA="getCrossDomainTcfData",e.GET_CROSS_DOMAIN_CCPA_DATA="getCrossDomainCcpaData",e.GET_TC_STRING="getTCString",e.PING="ping",e.SET_CROSS_DOMAIN_DATA="setCrossDomainData",e.SET_CROSS_DOMAIN_TCF_DATA="setCrossDomainTcfData",e.SET_CROSS_DOMAIN_CCPA_DATA="setCrossDomainCcpaData",e.SET_TC_STRING="setTCString"}(Q||(Q={}));var q,X,$="ucMobileSdk",Z=["*.usercentrics-sandbox.eu","*.usercentrics.eu"],ee="4.41.0",te="1---",ne="__uspapiLocator",ie=/^[1][nNyY-][nNyY-][nNyY-]$/,se="__uspapi";!function(e){e.CCPA="uc_usprivacy",e.CCPA_DATA="uc_ccpa",e.CONSENTS_BUFFER="uc_consents_buffer",e.CONSENTS_V2_BUFFER="uc_consents_v2_buffer",e.GCM_DATA="uc_gcm",e.LEGACY_SETTINGS="ucSettings",e.SERVICES="uc_services",e.SETTINGS="uc_settings",e.TCF="uc_tcf",e.USER_INTERACTION="uc_user_interaction",e.AB_TEST_VARIANT="uc_ab_variant"}(q||(q={})),function(e){e.USER_COUNTRY="uc_user_country"}(X||(X={}));var re,oe,ae,ce,ue="uc-cross-domain-bridge",le="".concat("https://app.usercentrics.eu","/browser-sdk/").concat(ee,"/cross-domain-bridge.html"),de="".concat("https://app.eu.usercentrics.eu","/browser-sdk/").concat(ee,"/cross-domain-bridge.html"),he=function(){function e(){}return e.setDomainBridgeUri=function(t){var n="";t&&(t.crossDomainConsentSharingIFrame?n=t.crossDomainConsentSharingIFrame:t.app&&(n="".concat(t.app,"/browser-sdk/").concat(ee,"/cross-domain-bridge.html")));var i=""!==n?n:le,s=de;e.domainBridgeUri=e.useEuCdn?s:i},e.getDomainBridgeUri=function(){return e.domainBridgeUri},e.init=function(t,n){return w(this,void 0,void 0,(function(){return L(this,(function(i){return e.setDomainBridgeUri(n),e.setUseEuCdn((null==t?void 0:t.useEuCdn)||!1),e.setDomainBridgeUri(n),[2,this.initIFrame(e.getDomainBridgeUri(),ue)]}))}))},e.initIFrame=function(t,n){return w(this,void 0,void 0,(function(){var i=this;return L(this,(function(s){return[2,new Promise((function(s,r){var o=e.createIFrame(t,n);o.onload=function(){return w(i,void 0,void 0,(function(){var i;return L(this,(function(a){return i=setTimeout((function(){o={},r(new Error(z.CROSS_DOMAIN_IFRAME_LOAD_ERROR))}),1e3),e.queryIFrame(t,n,Q.PING).then((function(){clearTimeout(i),s(!0)})).catch((function(e){clearTimeout(i),r(e)})),[2]}))}))},o.onerror=function(){return w(i,void 0,void 0,(function(){return L(this,(function(e){return r(new Error(z.CROSS_DOMAIN_IFRAME_ERROR)),[2]}))}))},e.appendIFrame(o)}))]}))}))},e.setIsCrossDomainAvailable=function(t){e.crossDomainAvailable=t},e.isCookieBridgeAvailable=function(){return e.cookieBridgeAvailable},e.setIsCookieBridgeAvailable=function(t){e.cookieBridgeAvailable=t},e.isCrossDomainAvailable=function(){return e.crossDomainAvailable},e.getCrossDomainId=function(){return e.crossDomainId},e.setCrossDomainId=function(t){e.crossDomainId="".concat("uc_cross_domain_data","_").concat(t)},e.setCookieBridgeDomain=function(e,t){this.cookieBridgeDomain="".concat(e).concat(t)},e.setUseEuCdn=function(t){e.useEuCdn=t},e.createIFrame=function(t,n){e.removeIFrame(n);var i=document.createElement("iframe");return i.style.display="none",i.id=n,i.src=t,i},e.removeIFrame=function(e){var t=document.getElementById(e);t&&t.parentNode&&t.parentNode.removeChild(t)},e.queryIFrame=function(e,t,n,i,s){return w(this,void 0,void 0,(function(){var r;return L(this,(function(o){if(!(r=document.getElementById(t))||!r.id)throw new Error(z.CROSS_DOMAIN_IFRAME_NOT_FOUND);return[2,new Promise((function(t,o){var a=JSON.stringify({crossDomainId:s,method:n,payload:i}),c=new MessageChannel;c.port1.onmessage=function(e){var n=JSON.parse(e.data),i=n.success,s=n.data;i?t(s):o(e)},r&&r.contentWindow&&r.contentWindow.postMessage(a,e,[c.port2])}))]}))}))},e.appendIFrame=function(e){try{document.body?document.body.appendChild(e):document.addEventListener("DOMContentLoaded",(function(){document.body.appendChild(e)}))}catch(t){return new Error(z.CROSS_DOMAIN_IFRAME_ERROR)}return null},e.query=function(t,n){return w(this,void 0,void 0,(function(){return L(this,(function(i){return[2,e.queryIFrame(e.getDomainBridgeUri(),ue,t,n,e.crossDomainId)]}))}))},e.getCrossDomainLanguage=function(){return e.query(Q.GET_CROSS_DOMAIN_LANGUAGE)},e.setCrossDomainData=function(t){return w(this,void 0,void 0,(function(){return L(this,(function(n){return[2,e.query(Q.SET_CROSS_DOMAIN_DATA,(i=t,{consents:i.services.map((function(e){return e.history.map((function(t){return{action:t.action,consentId:"",settingsVersion:t.versions.settings,status:t.status,templateId:e.id,timestamp:"".concat(t.timestamp),updatedBy:t.type}}))})).reduce((function(e,t){return e.concat(t)}),[]).sort((function(e,t){return parseInt(e.timestamp,10)-parseInt(t.timestamp,10)})),controllerId:i.controllerId,language:i.language}))];var i}))}))},e.setCrossDomainCcpaData=function(t){return w(this,void 0,void 0,(function(){return L(this,(function(n){return[2,e.query(Q.SET_CROSS_DOMAIN_CCPA_DATA,t)]}))}))},e.getCrossDomainCcpaData=function(){return w(this,void 0,void 0,(function(){return L(this,(function(t){return[2,e.query(Q.GET_CROSS_DOMAIN_CCPA_DATA)]}))}))},e.getCrossDomainSessionData=function(){return w(this,void 0,void 0,(function(){return L(this,(function(t){return[2,e.query(Q.GET_CROSS_DOMAIN_SESSION_DATA)]}))}))},e.getCrossDomainTcfData=function(){return w(this,void 0,void 0,(function(){return L(this,(function(t){return[2,e.query(Q.GET_CROSS_DOMAIN_TCF_DATA)]}))}))},e.setCrossDomainTcfData=function(t){return w(this,void 0,void 0,(function(){return L(this,(function(n){return[2,e.query(Q.SET_CROSS_DOMAIN_TCF_DATA,t)]}))}))},e.clearCrossDomainStorage=function(){return w(this,void 0,void 0,(function(){return L(this,(function(t){return[2,e.query(Q.CLEAR)]}))}))},e.crossDomainId="",e.cookieBridgeDomain="",e.domainBridgeUri=le,e.useEuCdn=!1,e.cookieBridgeAvailable=!1,e.crossDomainAvailable=!1,e}(),pe=function(){function e(){this.length=0,this.data={}}return e.prototype.updateLength=function(){this.length=Object.keys(this.data).length},e.prototype.key=function(e){var t=Object.keys(this.data)[e];return void 0===T(t)?null:t},e.prototype.getItem=function(e){return void 0!==this.data[e]?this.data[e]:null},e.prototype.setItem=function(e,t){this.data[e]=String(t),this.updateLength()},e.prototype.removeItem=function(e){delete this.data[e],this.updateLength()},e.prototype.clear=function(){this.data={},this.updateLength()},e}();!function(e){e.COOKIE_BRIDGE_NOT_AVAILABLE="Usercentrics: Cookie bridge is not available.",e.COOKIE_BRIDGE_OPTIONS_NOT_SET="Usercentrics: Cookie bridge options are not set",e.GET_GLOBAL_TC_STRING_FAILURE="Usercentrics: Unable to get the Global TC string",e.INIT_TCF_ERROR="Usercentrics: Unable to init TCF",e.RESET_GVL_FAILURE="Usercentrics: Unable to reset Global Vendor List",e.SET_GLOBAL_TC_STRING_FAILURE="Usercentrics: Unable to set the Global TC string",e.VENDOR_REMOVED="Usercentrics: The following vendor is not part of the official vendors list anymore: ",e.TC_MODEL_UNDEFINED="Usercentrics: tcModel can not be null.",e.SELECTED_LANGUAGE_UNDEFINED="Usercentrics: Selected language can not be undefined"}(re||(re={})),function(e){e.LEGITIMATE_INTEREST="legIntPurposes",e.PURPOSES="purposes"}(oe||(oe={})),function(e){e[e.ID=0]="ID",e[e.LEGITIMATE_INTEREST=1]="LEGITIMATE_INTEREST",e[e.PURPOSES=2]="PURPOSES",e[e.SPECIAL_PURPOSES=3]="SPECIAL_PURPOSES"}(ae||(ae={})),e.TCF_DECISION_UI_LAYER=void 0,(ce=e.TCF_DECISION_UI_LAYER||(e.TCF_DECISION_UI_LAYER={}))[ce.FIRST_LAYER=1]="FIRST_LAYER",ce[ce.SECOND_LAYER=2]="SECOND_LAYER";var ge=function(e){switch(e){case"onAcceptAllBtnClick":case"onSpecialFunctionAcceptAllConsentTrigger":return"onAcceptAllServices";case"onDenyAllAnchorClick":case"onDenyAllBtnClick":return"onDenyAllServices";case"onNonEURegion":return"onNonEURegion";case"onInitialPageLoad":case"onCountdownFinished":default:return"onInitialPageLoad";case"onToggleCategory":case"onToggleConsent":case"onToggleSelectAll":return"onEssentialChange";case"onWindowFunctionUpdateConsent":case"bySettingsUpdate":case"onSaveBtnClick":return"onUpdateServices"}},fe=function(e){switch(e){case"update":case"implicit":default:return"implicit";case"explicit":return"explicit"}},ve="RAMDOM_KEY_LOCAL_STORAGE",Se=function(){function e(){this.localStorage=null,this.sessionStorage=null,this.storeServiceIdToNameMapping=!1}return e.getInstance=function(){return e.instance||(e.instance=new e),e.instance},e.resetInstance=function(){e.instance.localStorage=null,e.instance.sessionStorage=null},e.prototype.setStoreServiceIdToNameMapping=function(e){this.storeServiceIdToNameMapping=e},e.prototype.getStoreServiceIdToNameMapping=function(){return this.storeServiceIdToNameMapping},e.prototype.init=function(){try{localStorage.setItem(ve,ve),localStorage.removeItem(ve),this.localStorage=localStorage}catch(e){this.localStorage=new pe}try{sessionStorage.setItem(ve,ve),sessionStorage.removeItem(ve),this.sessionStorage=sessionStorage}catch(e){this.sessionStorage=new pe}},e.appendToConsentsBuffer=function(t){var n,i=e.fetchConsentsBuffer(),s=(new Date).valueOf();i.push({consents:t,timestamp:s}),null===(n=e.getInstance().localStorage)||void 0===n||n.setItem(q.CONSENTS_BUFFER,JSON.stringify(i))},e.appendToConsentsV2Buffer=function(t){var n,i=e.fetchConsentsV2Buffer(),s=(new Date).valueOf();i.push({consents:t,timestamp:s}),null===(n=e.getInstance().localStorage)||void 0===n||n.setItem(q.CONSENTS_V2_BUFFER,JSON.stringify(i))},e.clearOnNewSettingsId=function(t){t!==e.fetchSettingsId()&&e.clear()},e.findBufferItem=function(t){return e.fetchConsentsBuffer().slice().find((function(e){return JSON.stringify(e.consents)===JSON.stringify(t)}))},e.findV2BufferItem=function(t){return e.fetchConsentsV2Buffer().slice().find((function(e){return JSON.stringify(e.consents)===JSON.stringify(t)}))},e.removeConsentsBufferItem=function(t){var n,i,s=e.fetchConsentsBuffer(),r=s.length+0;(s=s.filter((function(e){return JSON.stringify(e)!==JSON.stringify(t)}))).length&&s.length!==r?null===(n=e.getInstance().localStorage)||void 0===n||n.setItem(q.CONSENTS_BUFFER,JSON.stringify(s)):null===(i=e.getInstance().localStorage)||void 0===i||i.removeItem(q.CONSENTS_BUFFER)},e.removeConsentsV2BufferItem=function(t){var n,i,s=e.fetchConsentsV2Buffer(),r=s.length+0;(s=s.filter((function(e){return JSON.stringify(e)!==JSON.stringify(t)}))).length&&s.length!==r?null===(n=e.getInstance().localStorage)||void 0===n||n.setItem(q.CONSENTS_V2_BUFFER,JSON.stringify(s)):null===(i=e.getInstance().localStorage)||void 0===i||i.removeItem(q.CONSENTS_V2_BUFFER)},e.getCcpaString=function(){var t,n=null===(t=e.getInstance().localStorage)||void 0===t?void 0:t.getItem(q.CCPA);return n&&ie.test(n)?n:te},e.getCcpaData=function(){var t,n=null===(t=e.getInstance().localStorage)||void 0===t?void 0:t.getItem(q.CCPA_DATA);return n?JSON.parse(n):null},e.fetchConsentsBuffer=function(){var t,n=null===(t=e.getInstance().localStorage)||void 0===t?void 0:t.getItem(q.CONSENTS_BUFFER);return n?JSON.parse(n):[]},e.fetchConsentsV2Buffer=function(){var t,n=null===(t=e.getInstance().localStorage)||void 0===t?void 0:t.getItem(q.CONSENTS_V2_BUFFER);return n?JSON.parse(n):[]},e.fetchControllerId=function(){var t=e.fetchSettings();return t?t.controllerId:""},e.fetchLanguage=function(){var t=e.fetchSettings();return t?t.language:""},e.fetchServices=function(){var t=e.fetchSettings();return t?t.services:[]},e.fetchLegacySettings=function(){var t,n=null===(t=e.getInstance().localStorage)||void 0===t?void 0:t.getItem(q.LEGACY_SETTINGS);return n?JSON.parse(n):null},e.fetchSettings=function(){var t,n=null===(t=e.getInstance().localStorage)||void 0===t?void 0:t.getItem(q.SETTINGS);return n?JSON.parse(n):{}},e.fetchSettingsId=function(){var t=e.fetchSettings();return t?t.id:""},e.fetchSettingsVersion=function(){var t=e.fetchSettings();return t?t.version:""},e.fetchTCFData=function(){var t,n=null===(t=e.getInstance().localStorage)||void 0===t?void 0:t.getItem(q.TCF),i=n?JSON.parse(n):{acString:"",tcString:"",timestamp:Date.now(),vendors:[]};return i.vendors||(i.vendors=[]),i},e.fetchTCFVendorsDisclosedObject=function(t){var n,i=e.fetchTCFData(),s=i.acString,r=i.tcString,o=i.vendors,a=i.vendorsDisclosed;if(!o&&!a)return{};if((a||!a&&!o.length&&r)&&t){var c=Object.keys(t).map(Number);n=(a||c).filter((function(e){return t[e]})).map((function(e){var n=t[e];return[n.id,n.legIntPurposes,n.purposes,n.specialPurposes]})),e.saveTCFData({acString:s,tcString:r,timestamp:Date.now(),vendors:n})}else n=o;return n.reduce((function(e,t){var n;return D(D({},e),((n={})[t[ae.ID]]=!0,n))}),{})},e.fetchTCString=function(){return e.fetchTCFData().tcString||""},e.fetchACString=function(){return e.fetchTCFData().acString||""},e.fetchUserActionPerformed=function(){var t;return"true"===(null===(t=e.getInstance().localStorage)||void 0===t?void 0:t.getItem(q.USER_INTERACTION))},e.fetchUserCountryResponse=function(){var t;try{return JSON.parse((null===(t=e.getInstance().sessionStorage)||void 0===t?void 0:t.getItem(X.USER_COUNTRY))||"null")}catch(n){return null}},e.setUserCountryResponse=function(t){var n;null===(n=e.getInstance().sessionStorage)||void 0===n||n.setItem(X.USER_COUNTRY,JSON.stringify(t))},e.mapServices=function(e){return e.map((function(e){return{history:e.consent.history,id:e.id,processorId:e.processorId,status:e.consent.status}}))},e.mapSettings=function(t,n){return{controllerId:t.controllerId,id:t.id,language:t.selectedLanguage,services:e.mapServices(n),version:t.version}},e.migrateLegacySettings=function(t){if(!e.settingsExist()){var n,i,s=e.fetchLegacySettings();if(e.clearLegacySettings(),null==s?void 0:s[t]){var r=(n=s[t])&&Ce(n.ucConsents.consents)?((i={})[q.SETTINGS]={controllerId:n.ucConsents.consents[0].controllerId,id:n.usercentrics.settings.settingsId,language:n.usercentrics.settings.language,services:n.ucConsents.consents.map((function(e){return{history:e.history.map((function(e){return{action:ge(e.action),language:e.language,status:e.consentStatus,timestamp:e.updatedAt,type:fe(e.updatedBy),versions:{application:e.appVersion,service:e.consentTemplateVersion,settings:e.settingsVersion}}})),id:e.templateId,processorId:e.processorId,status:e.consentStatus}})),version:n.usercentrics.settings.version},i[q.USER_INTERACTION]=n.usercentrics.firstUserInteraction.stateSaved,i):null;r&&(e.saveSettings(r[q.SETTINGS]),r[q.USER_INTERACTION]&&e.setUserActionPerformed(!0))}}},e.saveSettings=function(t,n){var i,s;if(null===(i=e.getInstance().localStorage)||void 0===i||i.setItem(q.SETTINGS,JSON.stringify(t)),e.getInstance().getStoreServiceIdToNameMapping()&&n&&n.length){var r=n.reduce((function(e,t){return e[t.id]=t.name,e}),{});null===(s=e.getInstance().localStorage)||void 0===s||s.setItem(q.SERVICES,JSON.stringify(r))}he.isCrossDomainAvailable()&&he.setCrossDomainData(t).catch((function(){console.warn(z.CROSS_DOMAIN_SET_DATA_FAILURE)}))},e.saveTCFData=function(t){var n;null===(n=e.getInstance().localStorage)||void 0===n||n.setItem(q.TCF,JSON.stringify(t)),he.isCrossDomainAvailable()&&he.setCrossDomainTcfData(t).catch((function(){console.warn(z.CROSS_DOMAIN_SET_TCF_DATA_FAILURE)}))},e.fetchGcmData=function(){var t,n=null===(t=e.getInstance().localStorage)||void 0===t?void 0:t.getItem(q.GCM_DATA);return n?JSON.parse(n):null},e.saveGcmData=function(t){var n;null===(n=e.getInstance().localStorage)||void 0===n||n.setItem(q.GCM_DATA,JSON.stringify(t))},e.saveTCString=function(t){var n=e.fetchTCFData();this.saveTCFData(D(D({},n),{tcString:t}))},e.setCcpaTimeStamp=function(t){var n,i=t||{ccpaString:this.getCcpaString()||"",timestamp:(new Date).getTime()};null===(n=e.getInstance().localStorage)||void 0===n||n.setItem(q.CCPA_DATA,JSON.stringify(i))},e.getCcpaTimeStamp=function(){var e=this.getCcpaData();return e&&e.timestamp?e.timestamp:(new Date).getTime()},e.setCcpaString=function(t){var n;null===(n=e.getInstance().localStorage)||void 0===n||n.setItem(q.CCPA,t),this.setCcpaTimeStamp()},e.settingsExist=function(){return Te(e.fetchSettings())},e.setUserActionPerformed=function(t){var n;null===(n=e.getInstance().localStorage)||void 0===n||n.setItem(q.USER_INTERACTION,JSON.stringify(t))},e.clearCcpa=function(){var t;this.clearCcpaData(),null===(t=e.getInstance().localStorage)||void 0===t||t.removeItem(q.CCPA)},e.clearCcpaData=function(){var t;null===(t=e.getInstance().localStorage)||void 0===t||t.removeItem(q.CCPA_DATA)},e.clearTcf=function(){var t;null===(t=e.getInstance().localStorage)||void 0===t||t.removeItem(q.TCF)},e.clearGcm=function(){var t;null===(t=e.getInstance().localStorage)||void 0===t||t.removeItem(q.GCM_DATA)},e.clear=function(){var t,n;e.clearCcpa(),e.clearTcf(),e.clearGcm(),null===(t=e.getInstance().localStorage)||void 0===t||t.removeItem(q.SETTINGS),null===(n=e.getInstance().localStorage)||void 0===n||n.removeItem(q.USER_INTERACTION)},e.clearAll=function(){return w(this,void 0,void 0,(function(){return L(this,(function(e){switch(e.label){case 0:return this.clear(),he.isCrossDomainAvailable()?[4,he.clearCrossDomainStorage()]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}}))}))},e.fetchAbTestVariant=function(t){var n,i,s=(null===(n=e.getInstance().localStorage)||void 0===n?void 0:n.getItem(q.AB_TEST_VARIANT))||"";if(t.includes(s))return s;var r=t[Math.floor(Math.random()*t.length)];return null===(i=e.getInstance().localStorage)||void 0===i||i.setItem(q.AB_TEST_VARIANT,r),r},e.clearLegacySettings=function(){var t;null===(t=e.getInstance().localStorage)||void 0===t||t.removeItem(q.LEGACY_SETTINGS)},e}(),Ee=function(e,t){return-1!==e.indexOf(t)},Ie=function(){return"SDK-".concat(ee)},Ce=function(e){return Array.isArray(e)&&e.length>0},Te=function(e){return"object"===T(e)&&null!==e&&Object.keys(e).length>0},ye=function(e,t){if(void 0===t)throw new Error("altElement of nullishOperation can not be undefined");return null!=e?e:t},me=function(e,t,n,i,s,r){return{applicationVersion:Ie(),consent:{action:n,status:t.consent.status,type:i},service:{categorySlug:s||"",id:t.id,name:t.name,processorId:t.processorId,version:t.version},settings:{controllerId:e.controllerId,id:e.id,language:e.selectedLanguage,referrerControllerId:ye(null==r?void 0:r.referrerControllerId,""),version:e.version},timestamp:ye(null==r?void 0:r.timestamp,(new Date).valueOf())}},Ae=function(e){var t=e.dataTransferSettings,n=e.services,i=void 0===n?[]:n,s=e.consentAction,r=e.consentString,o=e.isCcpa,a=e.isTcf,c=e.isAnalyticsEnabled,u=e.isConsentXDeviceEnabled,l=i.map((function(e){return{consentStatus:e.consent.status,consentTemplateId:e.id,consentTemplateVersion:e.version}})),d="",h="",p="";if(a){var g=Se.fetchTCFData(),f=g.acString,v=g.tcString,S=g.timestamp,E=g.vendors,I=g.vendorsDisclosed;h=ye(h?null==r?void 0:r.TCF2:v,""),p=JSON.stringify({timestamp:S,vendors:E,vendorsDisclosed:I}),f&&(d=f)}else o&&(h=ye(null==r?void 0:r.CCPA,""));return D(D(D(D(D({action:s,analytics:ye(c,!1),appVersion:Ie().replace("SDK-","")},p&&{consentMeta:p}),{consents:l}),h&&{consentString:h}),d&&{acString:d}),{controllerId:t.controllerId,language:t.selectedLanguage,settingsId:t.id,settingsVersion:t.version,xdevice:ye(u,!1)})},_e=function(e,t){return e.reduce((function(e,n){var i=t[n];if(!(null==i?void 0:i.name))return e;var s=i.name;return V(V([],P(e),!1),[{id:n,name:s}],!1)}),[])};function Oe(e){return V([],P(new Set(e)),!1)}var Ne,be,De,we,Le,Re,Pe,Ve,Ue,Me,ke=function(e){return e.filter((function(e){return["onAcceptAllServices","onDenyAllServices","onUpdateServices"].indexOf(e.action)>-1})).sort((function(e,t){return t.timestamp-e.timestamp}))},Fe=function(e){return e&&"object"===T(e)},Ge=function(e,t,n){void 0===n&&(n=!1);var i=D({},t);if(!Fe(i))throw new Error("Source param should be an object");return Fe(e)?(Object.keys(e).forEach((function(t){var s,r,o,a,c,u=e[t],l=i[t];void 0!==l&&(i=Array.isArray(u)&&Array.isArray(l)?D(D({},i),n?((s={})[t]=(c=u.concat(l)).filter((function(e,t){return c.indexOf(e)===t})),s):((r={})[t]=u,r)):Fe(u)&&Fe(l)?D(D({},i),((o={})[t]=Ge(D({},u),l),o)):D(D({},i),((a={})[t]=u,a)))})),i):i},Be=function(e,t,n,i){return void 0===n&&(n=2e4),void 0===i&&(i=5),new Promise((function(s,r){var o=setInterval((function(){e()&&(clearTimeout(a),clearInterval(o),s())}),i),a=setTimeout((function(){clearTimeout(a),clearInterval(o),r(new Error(t))}),n)}))},xe=function(e,t){for(var n=e.split("."),i=t.split("."),s=Math.min(n.length,i.length),r=0;r<s;r+=1){var o=Number(n[r])||0,a=Number(i[r])||0;if(o!==a)return o>a?1:-1}return i.length-n.length};!function(e){e[e.COOKIE=0]="COOKIE",e[e.WEB=1]="WEB",e[e.APP=2]="APP"}(Ne||(Ne={})),function(e){e.LEFT="LEFT",e.CENTER="CENTER",e.RIGHT="RIGHT"}(be||(be={})),function(e){e.CAT="CAT",e.SRV="SRV"}(De||(De={})),function(e){e.AVAILABLE_LANGUAGES_NOT_FOUND="Unable to find available languages using given settingsId and version.",e.FETCH_ACM_VENDORS="Something went wrong while fetching the atp vendors.",e.FETCH_AVAILABLE_LANGUAGES="Something went wrong while fetching the available languages.",e.FETCH_DATA_PROCESSING_SERVICES="Something went wrong while fetching the data processing services.",e.FETCH_LEGAL_BASIS="Something went wrong while fetching the legal data translations.",e.FETCH_SETTINGS="Something went wrong while fetching the settings.",e.FETCH_USER_CONSENTS="Something went wrong while fetching the user's consents.",e.FETCH_USER_COUNTRY="Something went wrong while fetching the user's country.",e.FETCH_USER_TCF_DATA="Something went wrong while fetching the user's tcf data.",e.GENERATE_DATA_PROCESSING_SERVICES="Something went wrong while generating the data processing services.",e.RULESET_NOT_FOUND="Config Map not found!",e.TAGLOGGER="Tag logger API is being called just before browser unload, some browsers like firefox cancel the api call and throw the error.",e.SAVE_CONSENTS="Something went wrong while saving user consents.",e.SAVE_CONSENTS_RETRY="Number of retries exceeded for saving user consents.",e.SETTINGS_NOT_FOUND="Unable to find settings using given settingsId and version.",e.CUSTOM_REFERRER_NOT_VALID="A custom referrer was passed to setTrackingPixel but it is not a valid URL. Origin and pathname will be passed instead."}(we||(we={})),function(e){e.US_CA_ONLY="US_CA_ONLY",e.US="US"}(Le||(Le={})),function(e){e[e.FIRST_LAYER=1]="FIRST_LAYER",e[e.SECOND_LAYER=3]="SECOND_LAYER"}(Re||(Re={})),function(e){e[e.DATA_LAYER=1]="DATA_LAYER",e[e.WINDOW_EVENT=4]="WINDOW_EVENT"}(Pe||(Pe={})),function(e){e.DATA_COLLECTED_LIST="dataCollectedList",e.DATA_PURPOSES_LIST="dataPurposesList",e.DATA_RECIPIENTS_LIST="dataRecipientsList",e.TECHNOLOGY_USED="technologyUsed"}(Ve||(Ve={})),function(e){e.MAJOR="major",e.MINOR="minor",e.PATCH="patch"}(Ue||(Ue={})),e.CLOSE_OPTION=void 0,(Me=e.CLOSE_OPTION||(e.CLOSE_OPTION={})).ICON="ICON",Me.LINK="LINK";var He,je={acceptAllButton:"Accept All",ccpaButton:"Agree to CCPA",ccpaMoreInformation:"More Information",closeButton:"Close Second Layer",collapse:"Collapse",cookiePolicyButton:"Open Cookie Policy",copyControllerId:"Copy Controller ID",denyAllButton:"Deny all",expand:"Expand",fullscreenButton:"Enter full screen",imprintButton:"Open Imprint",languageSelector:"Select language",privacyButton:"Open",privacyPolicyButton:"Open Privacy Policy",saveButton:"Save",serviceInCategoryDetails:"View Service details",servicesInCategory:"List of Services in this category",tabButton:"Tab",usercentricsCard:"Card",usercentricsCMPButtons:"Footer including buttons",usercentricsCMPContent:"Content",usercentricsCMPHeader:"Header including language selection and external links",usercentricsCMPUI:"Consent Management Platform Interface",usercentricsList:"List",vendorConsentToggle:"Consent",vendorDetailedStorageInformation:"Detailed Storage Information",vendorLegIntToggle:"Legitimate Interest"},Ye=function(e,t){return"boolean"==typeof e?e:t},Je=function(e){if(!e)return null;var t=e.startsWith("#")?e:"#".concat(e);return We(t)?t:"#0045A5"},We=function(e){if(""===e||!e)return!1;return/^#(?:[0-9a-fA-F]{3}){1,2}$/.test(e)},Ke=function(e){if(null!=e.firstLayer.isOverlayEnabled)return e.firstLayer.isOverlayEnabled;var t=e.backgroundOverlay.find((function(e){var t;return(null===(t=e.target)||void 0===t?void 0:t[0])===Re.FIRST_LAYER}));return!!t&&(null==t?void 0:t.darken)>0},ze=function(e){if(null!=e.secondLayer.isOverlayEnabled)return e.secondLayer.isOverlayEnabled;var t=e.backgroundOverlay.find((function(e){var t;return(null===(t=e.target)||void 0===t?void 0:t[0])===Re.SECOND_LAYER}));return!!t&&(null==t?void 0:t.darken)>0},Qe=function(e){return"number"==typeof e||"string"==typeof e&&!e.includes("px")?"".concat(e,"px"):e},qe=function(e){switch(e){case be.CENTER:return"center";case be.RIGHT:return"right";case be.LEFT:default:return"left"}},Xe={description:"",id:"",legalBasis:[],name:""},$e=function(e,t){return e.reduce((function(e,n){var i=t.find((function(e){return e.id===n.id}));return i?V(V([],P(e),!1),[{categorySlug:n.categorySlug,consent:n.consent,id:n.id,language:n.language,name:i.name,processorId:n.processorId,version:n.version}],!1):V([],P(e),!1)}),[])},Ze=function(e,t){return e.map((function(e){var n=t.find((function(t){return t.id===e.id}));return D(D(D({},e),n||Xe),{description:e.description||(null==n?void 0:n.description)||Xe.description,id:e.id,subServices:Ze(e.subServices,t)})}))},et=function(e){return null!=e&&null!=e.region},tt=function(e){return null!=e&&null!=e.changedPurposes},nt=function(e){return null!=e&&!et(e)&&!tt(e)},it=function(e){var t;return null!=e&&null!=(null===(t=e.buttons)||void 0===t?void 0:t.optOutNotice)},st=function(e){return null!=e&&null!=e.vendor},rt=function(e){var t;return null!=e&&null!=(null===(t=e.buttons)||void 0===t?void 0:t.showSecondLayer)},ot=function(e){return null!=e&&(it(e)||rt(e)||st(e))},at=function(e){var t,n;return null!=e&&null!=(null===(t=e.firstLayer)||void 0===t?void 0:t.showShortDescriptionOnMobile)&&null==(null===(n=e.firstLayer)||void 0===n?void 0:n.isCategoryTogglesEnabled)},ct=function(e){var t;return null!=e&&null!=(null===(t=e.firstLayer)||void 0===t?void 0:t.hideNonIabPurposes)},ut=function(e){var t;return null!=e&&null!=(null===(t=e.firstLayer)||void 0===t?void 0:t.isCategoryTogglesEnabled)},lt=function(){function e(){this.ampEnabled=!1}return e.getInstance=function(){return e.instance||(e.instance=new e),e.instance},e.resetInstance=function(){e.instance.ampEnabled=!1},e.prototype.isAmpEnabled=function(){return this.ampEnabled},e.prototype.setIsAmpEnabled=function(e){this.ampEnabled=e},e}(),dt="latest",ht={EU_URI:{AGGREGATOR:"https://aggregator.eu.usercentrics.eu/aggregate/",CDN:"https://config.eu.usercentrics.eu",FETCH_CONSENTS:"https://consents.eu.usercentrics.eu/consentsHistory",FETCH_CONSENTS_V2:"https://consent-rt-ret.service.consent.eu1.usercentrics.eu",FETCH_TCF_DATA:"https://consents.eu.usercentrics.eu/consentsHistoryTCF",FETCH_TCF_DATA_V2:"https://consents.eu.usercentrics.eu/consentState",GRAPHQL:"https://api.eu.usercentrics.eu/graphql",SAVE_CONSENTS_V2:"https://consent-api.service.consent.eu1.usercentrics.eu/consent",TRACK_EVENT:"https://uct.eu.usercentrics.eu/uct",TRACK_SESSION:"https://app.eu.usercentrics.eu/session/1px.png"},FOLDER:{RULESET:"ruleSet",SETTINGS:"settings",TEMPLATES:"consent-templates",TRANSLATIONS:"translations"},URI:{AGGREGATOR:"https://aggregator.service.usercentrics.eu/aggregate/",CDN:"https://api.usercentrics.eu",FETCH_CONSENTS:"https://consents.usercentrics.eu/consentsHistory",FETCH_CONSENTS_V2:"https://consent-rt-ret.service.consent.usercentrics.eu",FETCH_TCF_DATA:"https://consents.usercentrics.eu/consentsHistoryTCF",FETCH_TCF_DATA_V2:"https://consents.usercentrics.eu/consentState",GRAPHQL:"https://graphql.usercentrics.eu/graphql",RULESET:"https://api.usercentrics.eu",SAVE_CONSENTS_V2:"https://consent-api.service.consent.usercentrics.eu/consent",TRACK_EVENT:"https://uct.service.usercentrics.eu/uct",TRACK_SESSION:"https://app.usercentrics.eu/session/1px.png"}},pt={EU_URI:{AGGREGATOR:"https://aggregator.service.usercentrics-sandbox.eu/aggregate/",CDN:"https://api.usercentrics-sandbox.eu",FETCH_CONSENTS:"https://api-consent-sandbox-dot-usercentrics-playground.nw.r.appspot.com/consentsHistory",FETCH_CONSENTS_V2:"https://consent-rt-ret.service.consent.eu1.usercentrics-staging.eu",FETCH_TCF_DATA:"https://api-consent-sandbox-dot-usercentrics-playground.nw.r.appspot.com/consentsHistoryTCF",FETCH_TCF_DATA_V2:"https://api-consent-sandbox-dot-usercentrics-playground.nw.r.appspot.com/consentState",GRAPHQL:"https://api-v2-sandbox-consent-dot-usercentrics-playground.nw.r.appspot.com/",SAVE_CONSENTS_V2:"https://consent-api.service.consent.eu1.usercentrics-staging.eu/consent",TRACK_EVENT:"https://uct.eu.usercentrics.eu/uct",TRACK_SESSION:"https://app.usercentrics-sandbox.eu/session/1px.png"},FOLDER:{RULESET:"ruleSet",SETTINGS:"settings",TEMPLATES:"consent-templates",TRANSLATIONS:"translations"},URI:{AGGREGATOR:"https://aggregator.service.usercentrics-sandbox.eu/aggregate/",CDN:"https://api.usercentrics-sandbox.eu",FETCH_CONSENTS:"https://api-consent-sandbox-dot-usercentrics-playground.nw.r.appspot.com/consentsHistory",FETCH_CONSENTS_V2:"https://consent-rt-ret.service.consent.usercentrics-staging.eu",FETCH_TCF_DATA:"https://api-consent-sandbox-dot-usercentrics-playground.nw.r.appspot.com/consentsHistoryTCF",FETCH_TCF_DATA_V2:"https://api-consent-sandbox-dot-usercentrics-playground.nw.r.appspot.com/consentState",GRAPHQL:"https://api-v2-sandbox-consent-dot-usercentrics-playground.nw.r.appspot.com/",RULESET:"https://api.usercentrics-sandbox.eu",SAVE_CONSENTS_V2:"https://consent-api.service.consent.usercentrics-staging.eu/consent",TRACK_EVENT:"https://uct.service.usercentrics.eu/uct",TRACK_SESSION:"https://app.usercentrics-sandbox.eu/session/1px.png"}},gt="DE",ft="Germany (default)",vt="",St=["onEssentialChange","onInitialPageLoad","onNonEURegion"],Et=["onSessionRestored","onMobileSessionRestore"],It=function(e,t,n){return w(void 0,void 0,void 0,(function(){return L(this,(function(i){return[2,Tt(e,t,null,n)]}))}))},Ct=function(e,t,n,i){return w(void 0,void 0,void 0,(function(){return L(this,(function(s){return[2,Tt(e,n,t,i)]}))}))},Tt=function(e,t,n,i){return w(void 0,void 0,void 0,(function(){var s,r;return L(this,(function(o){return s={"Content-Type":"application/json"},r=D(D({},i),{headers:s,method:n?"POST":"GET"}),n&&(r.body=JSON.stringify(n)),(null==i?void 0:i.headers)&&(r.headers=D(D({},s),i.headers)),[2,fetch(e,r).then((function(e){return w(void 0,void 0,void 0,(function(){return L(this,(function(n){if(e.ok)return[2,mt(e)];throw yt(t,e.status)}))}))}))]}))}))},yt=function(e,t){return{errorMessage:e,statusCode:t}},mt=function(e){return w(void 0,void 0,void 0,(function(){return L(this,(function(t){switch(t.label){case 0:return[4,At(e)];case 1:return[2,{data:t.sent(),location:e.headers.get("x-client-geo-location"),statusCode:e.status}]}}))}))},At=function(e){return w(void 0,void 0,void 0,(function(){var t,n;return L(this,(function(i){switch(i.label){case 0:return[4,e.text()];case 1:return t=i.sent(),[2,(n=""===t?{}:JSON.parse(t)).data||n]}}))}))};!function(e){e[e.RESOURCE_NOT_FOUND=403]="RESOURCE_NOT_FOUND"}(He||(He={}));var _t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var Ot={exports:{}},Nt={exports:{}};!function(e){var t;e.exports=(t=t||function(e,t){var n;if("undefined"!=typeof window&&window.crypto&&(n=window.crypto),"unde