"use strict";(()=>{var e=Object.defineProperty,t=(t,n,r)=>(((t,n,r)=>{n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r})(t,typeof n==`symbol`?n:n+``,r),r),n=(e,t=`flex`)=>new Promise((n=>{e.style.opacity=`0`,e.style.display=t,function t(){let r=parseFloat(e.style.opacity);if(r>=1)return void n();let i=r+.1;e.style.opacity=i.toString(),requestAnimationFrame(t)}()})),r=e=>new Promise((t=>{e.style.opacity=`1`,function n(){let r=parseFloat(e.style.opacity)-.1;e.style.opacity=r.toString(),r<=0?(e.style.display=`none`,t()):requestAnimationFrame(n)}()})),i=class{static activateAlerts(){this.alertsActivated=!0}static alert(e,t){if(this.alertsActivated&&window.alert(e),t===`error`)throw Error(e)}};t(i,`alertsActivated`,!1);var a=(e,t)=>!!e&&t.includes(e),o=(e,t)=>(Array.isArray(t)||(t=[t]),t.map((t=>e.dispatchEvent(new Event(t,{bubbles:!0})))).every((e=>e))),s=e=>Object.keys(e),c=e=>{let{overflow:t}=getComputedStyle(e);return t===`auto`||t===`scroll`},l=(e,t,n=document)=>{let r=n.querySelector(e);if(r instanceof t)return r},u=(e,t=!0)=>(t!==e.checked&&(e.checked=t,o(e,[`click`,`input`,`change`])),e.type===`checkbox`?e.checked:e.value),ee=class{constructor({element:e,duration:n}){t(this,`element`),t(this,`active`,!1),t(this,`running`,!1),t(this,`runningPromise`),t(this,`duration`),t(this,`isActive`,(()=>this.active)),t(this,`isRunning`,(()=>this.running)),t(this,`untilFinished`,(()=>this.runningPromise)),this.element=typeof e==`string`?l(e,HTMLElement)||i.alert(`No interaction with the ${e} selector was found.`,`error`):e,this.duration={first:typeof n==`number`?n:n?.first??0,second:typeof n==`number`?n:n?.second??0}}async trigger(e){return!(e===`first`&&this.active||e===`second`&&!this.active)&&(e||=this.active?`second`:`first`,o(this.element,`click`),this.running=!0,this.runningPromise=(t=this.duration[e],new Promise((e=>setTimeout(e,t)))),await this.runningPromise,this.running=!1,this.active=e===`first`,!0);var t}},d=class{constructor({element:e,interaction:n,displayProperty:r,noTransition:a,startsHidden:o}){if(t(this,`interaction`),t(this,`noTransition`),t(this,`displayProperty`),t(this,`visible`),t(this,`element`),t(this,`isVisible`,(()=>this.visible)),this.element=typeof e==`string`?l(e,HTMLElement)||i.alert(`No element with the ${e} selector was found.`,`error`):e,this.noTransition=a,this.displayProperty=r||`block`,o?(this.element.style.display=`none`,this.visible=!1):this.visible=!!((s=this.element).offsetWidth||s.offsetHeight||s.getClientRects().length),n){let{element:e,duration:t}=n;this.interaction=new ee({element:e,duration:t})}var s}async show(){this.visible||=(this.interaction?await this.interaction.trigger(`first`):this.noTransition?this.element.style.display=this.displayProperty:await n(this.element,this.displayProperty),!0)}async hide(){this.visible&&=(this.interaction?await this.interaction.trigger(`second`):this.noTransition?this.element.style.display=`none`:await r(this.element),!1)}};t(d,`displayProperties`,[`block`,`flex`,`grid`,`inline-block`,`inline`]);var te=async e=>{var t,n;let{Webflow:r}=window;if(r&&`destroy`in r&&`ready`in r&&`require`in r&&(!e||e.length)){if(e||(r.destroy(),r.ready()),!e||e.includes(`ix2`)){let t=r.require(`ix2`);if(t){let{store:n,actions:r}=t,{eventState:i}=n.getState().ixSession,a=Object.entries(i);e||t.destroy(),t.init(),await Promise.all(a.map((e=>n.dispatch(r.eventStateChanged(...e)))))}}if(!e||e.includes(`commerce`)){let e=r.require(`commerce`),t=((e=document)=>e.documentElement.getAttribute(`data-wf-site`))();e&&t&&(e.destroy(),e.init({siteId:t,apiUrl:`https://render.webflow.com`}))}if(e!=null&&e.includes(`lightbox`)&&((t=r.require(`lightbox`))==null||t.ready()),e!=null&&e.includes(`slider`)){let e=r.require(`slider`);e&&(e.redraw(),e.ready())}return e!=null&&e.includes(`tabs`)&&((n=r.require(`tabs`))==null||n.redraw()),new Promise((e=>r.push((()=>e(void 0)))))}},f=!1;typeof window<`u`&&(p={get passive(){f=!0}},window.addEventListener(`testPassive`,null,p),window.removeEventListener(`testPassive`,null,p));var p,m=typeof window<`u`&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform===`MacIntel`&&window.navigator.maxTouchPoints>1),h=[],g=!1,_=-1,v=void 0,y=void 0,b=void 0,x=function(e){return h.some((function(t){return!(!t.options.allowTouchMove||!t.options.allowTouchMove(e))}))},S=function(e){var t=e||window.event;return!!(x(t.target)||t.touches.length>1)||(t.preventDefault&&t.preventDefault(),!1)},ne=function(e,t){if(e){if(!h.some((function(t){return t.targetElement===e}))){var n={targetElement:e,options:t||{}};h=[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0){let e=parseInt(window.getComputedStyle(window.top.document.body).getPropertyValue(`padding-right`),10);b=window.top.document.body.style.paddingRight,window.top.document.body.style.paddingRight=`${e+n}px`}}v===void 0&&(v=window.top.document.body.style.overflow,window.top.document.body.style.overflow=`hidden`)}(t),m&&(e.ontouchstart=function(e){e.targetTouches.length===1&&(_=e.targetTouches[0].clientY)},e.ontouchmove=function(t){t.targetTouches.length===1&&function(e,t){var n=e.targetTouches[0].clientY-_;!x(e.target)&&(t&&t.scrollTop===0&&n>0||function(e){return!!e&&e.scrollHeight-e.scrollTop<=e.clientHeight}(t)&&n<0?S(e):e.stopPropagation())}(t,e)},g||=(document.addEventListener(`touchmove`,S,f?{passive:!1}:void 0),!0))}}else console.error(`disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.`)},re=function(){m&&(h.forEach((function(e){e.targetElement.ontouchstart=null,e.targetElement.ontouchmove=null})),g&&=(document.removeEventListener(`touchmove`,S,f?{passive:!1}:void 0),!1),_=-1),m?function(){if(y!==void 0){let e=-parseInt(window.top.document.body.style.top,10),t=-parseInt(window.top.document.body.style.left,10);window.top.body.style.position=y.position,window.top.body.style.top=y.top,window.top.body.style.left=y.left,window.scrollTo(t,e),y=void 0}}():(b!==void 0&&(window.top.document.body.style.paddingRight=b,b=void 0),v!==void 0&&(window.top.document.body.style.overflow=v,v=void 0)),h=[]},C=new WeakMap,w=new WeakMap,T=new WeakMap,E=Symbol(`anyProducer`),ie=Promise.resolve(),D=Symbol(`listenerAdded`),O=Symbol(`listenerRemoved`),k=!1,A=!1;function j(e){if(typeof e!=`string`&&typeof e!=`symbol`&&typeof e!=`number`)throw TypeError("`eventName` must be a string, symbol, or number")}function M(e){if(typeof e!=`function`)throw TypeError(`listener must be a function`)}function N(e,t){let n=w.get(e);if(n.has(t))return n.get(t)}function P(e,t){let n=typeof t==`string`||typeof t==`symbol`||typeof t==`number`?t:E,r=T.get(e);if(r.has(n))return r.get(n)}function ae(e,t){t=Array.isArray(t)?t:[t];let n=!1,r=()=>{},i=[],a={enqueue(e){i.push(e),r()},finish(){n=!0,r()}};for(let n of t){let t=P(e,n);t||(t=new Set,T.get(e).set(n,t)),t.add(a)}return{async next(){return i?i.length===0?n?(i=void 0,this.next()):(await new Promise((e=>{r=e})),this.next()):{done:!1,value:await i.shift()}:{done:!0}},async return(n){i=void 0;for(let n of t){let t=P(e,n);t&&(t.delete(a),t.size===0&&T.get(e).delete(n))}return r(),arguments.length>0?{done:!0,value:await n}:{done:!0}},[Symbol.asyncIterator](){return this}}}function F(e){if(e===void 0)return z;if(!Array.isArray(e))throw TypeError("`methodNames` must be an array of strings");for(let t of e)if(!z.includes(t))throw typeof t==`string`?Error(`${t} is not Emittery method`):TypeError("`methodNames` element must be a string");return e}var I=e=>e===D||e===O;function L(e,t,n){if(I(t))try{k=!0,e.emit(t,n)}finally{k=!1}}var R=class e{static mixin(t,n){return n=F(n),r=>{if(typeof r!=`function`)throw TypeError("`target` must be function");for(let e of n)if(r.prototype[e]!==void 0)throw Error(`The property \`${e}\` already exists on \`target\``);Object.defineProperty(r.prototype,t,{enumerable:!1,get:function(){return Object.defineProperty(this,t,{enumerable:!1,value:new e}),this[t]}});let i=e=>function(...n){return this[t][e](...n)};for(let e of n)Object.defineProperty(r.prototype,e,{enumerable:!1,value:i(e)});return r}}static get isDebugEnabled(){if(typeof globalThis.process?.env!=`object`)return A;let{env:e}=globalThis.process??{env:{}};return e.DEBUG===`emittery`||e.DEBUG===`*`||A}static set isDebugEnabled(e){A=e}constructor(e={}){C.set(this,new Set),w.set(this,new Map),T.set(this,new Map),T.get(this).set(E,new Set),this.debug=e.debug??{},this.debug.enabled===void 0&&(this.debug.enabled=!1),this.debug.logger||(this.debug.logger=(e,t,n,r)=>{try{r=JSON.stringify(r)}catch{r=`Object with the following keys failed to stringify: ${Object.keys(r).join(`,`)}`}(typeof n==`symbol`||typeof n==`number`)&&(n=n.toString());let i=new Date,a=`${i.getHours()}:${i.getMinutes()}:${i.getSeconds()}.${i.getMilliseconds()}`;console.log(`[${a}][emittery:${e}][${t}] Event Name: ${n}\n\tdata: ${r}`)})}logIfDebugEnabled(t,n,r){(e.isDebugEnabled||this.debug.enabled)&&this.debug.logger(t,this.debug.name,n,r)}on(e,t){M(t),e=Array.isArray(e)?e:[e];for(let n of e){j(n);let e=N(this,n);e||(e=new Set,w.get(this).set(n,e)),e.add(t),this.logIfDebugEnabled(`subscribe`,n,void 0),I(n)||L(this,D,{eventName:n,listener:t})}return this.off.bind(this,e,t)}off(e,t){M(t),e=Array.isArray(e)?e:[e];for(let n of e){j(n);let e=N(this,n);e&&(e.delete(t),e.size===0&&w.get(this).delete(n)),this.logIfDebugEnabled(`unsubscribe`,n,void 0),I(n)||L(this,O,{eventName:n,listener:t})}}once(e){let t,n=new Promise((n=>{t=this.on(e,(e=>{t(),n(e)}))}));return n.off=t,n}events(e){e=Array.isArray(e)?e:[e];for(let t of e)j(t);return ae(this,e)}async emit(e,t){if(j(e),I(e)&&!k)throw TypeError("`eventName` cannot be meta event `listenerAdded` or `listenerRemoved`");this.logIfDebugEnabled(`emit`,e,t),function(e,t,n){let r=T.get(e);if(r.has(t))for(let e of r.get(t))e.enqueue(n);if(r.has(E)){let e=Promise.all([t,n]);for(let t of r.get(E))t.enqueue(e)}}(this,e,t);let n=N(this,e)??new Set,r=C.get(this),i=[...n],a=I(e)?[]:[...r];await ie,await Promise.all([...i.map((async e=>{if(n.has(e))return e(t)})),...a.map((async n=>{if(r.has(n))return n(e,t)}))])}async emitSerial(e,t){if(j(e),I(e)&&!k)throw TypeError("`eventName` cannot be meta event `listenerAdded` or `listenerRemoved`");this.logIfDebugEnabled(`emitSerial`,e,t);let n=N(this,e)??new Set,r=C.get(this),i=[...n],a=[...r];await ie;for(let e of i)n.has(e)&&await e(t);for(let n of a)r.has(n)&&await n(e,t)}onAny(e){return M(e),this.logIfDebugEnabled(`subscribeAny`,void 0,void 0),C.get(this).add(e),L(this,D,{listener:e}),this.offAny.bind(this,e)}anyEvent(){return ae(this)}offAny(e){M(e),this.logIfDebugEnabled(`unsubscribeAny`,void 0,void 0),L(this,O,{listener:e}),C.get(this).delete(e)}clearListeners(e){e=Array.isArray(e)?e:[e];for(let t of e)if(this.logIfDebugEnabled(`clear`,t,void 0),typeof t==`string`||typeof t==`symbol`||typeof t==`number`){let e=N(this,t);e&&e.clear();let n=P(this,t);if(n){for(let e of n)e.finish();n.clear()}}else{C.get(this).clear();for(let[e,t]of w.get(this).entries())t.clear(),w.get(this).delete(e);for(let[e,t]of T.get(this).entries()){for(let e of t)e.finish();t.clear(),T.get(this).delete(e)}}}listenerCount(e){e=Array.isArray(e)?e:[e];let t=0;for(let n of e)if(typeof n!=`string`){n!==void 0&&j(n),t+=C.get(this).size;for(let e of w.get(this).values())t+=e.size;for(let e of T.get(this).values())t+=e.size}else t+=C.get(this).size+(N(this,n)?.size??0)+(P(this,n)?.size??0)+(P(this)?.size??0);return t}bindMethods(e,t){if(typeof e!=`object`||!e)throw TypeError("`target` must be an object");t=F(t);for(let n of t){if(e[n]!==void 0)throw Error(`The property \`${n}\` already exists on \`target\``);Object.defineProperty(e,n,{enumerable:!1,value:this[n].bind(this)})}}},z=Object.getOwnPropertyNames(R.prototype).filter((e=>e!==`constructor`));Object.defineProperty(R,`listenerAdded`,{value:D,writable:!1,enumerable:!0,configurable:!1}),Object.defineProperty(R,`listenerRemoved`,{value:O,writable:!1,enumerable:!0,configurable:!1});var oe=[`personalization`,`analytics`,`marketing`],se=`uncategorized`,ce=[`essential`,...oe,se],B=`fs-cc`,le=[`informational`,`opt-in`,`opt-out`],V={allow:`allow`,deny:`deny`,submit:`submit`},H={banner:`[${B}="banner"]`,preferences:`[${B}="preferences"]`,manager:`[${B}="manager"]`},U={allow:`[${B}="${V.allow}"]`,deny:`[${B}="${V.deny}"]`,submit:`[${B}="${V.submit}"]`,openPreferences:`[${B}="open-preferences"]`,close:`[${B}="close"]`},W={interactionTrigger:`[${B}="interaction"]`},G={categories:[`${B}-category`,`${B}-categories`],disableScroll:`${B}-scroll`,displayProperty:`${B}-display`,cookieMaxAge:`${B}-expires`,mode:`${B}-mode`,debugMode:`${B}-debug`,endpoint:`${B}-endpoint`,componentsSource:`${B}-source`,src:`${B}-src`,placeholder:`${B}-placeholder`,domain:`${B}-domain`,consentMode:`${B}-consentmode`},K={main:B,consentsUpdated:`${B}-updated`},q=e=>`[${B}-checkbox="${e}"]`,J=e=>`${e}-activated`,ue=``,de={info:`green`,warning:`yellow`,error:`red`},Y=class{static activate(){this.init(),this.active=!0}static init(){this.element=document.createElement(`div`),Object.assign(this.element.style,{position:`fixed`,left:`auto`,top:`auto`,right:`16px`,bottom:`0px`,"z-index":`999999`,"max-width":`320px`,"font-size":`14px`,"line-height":`1.25`}),document.body.appendChild(this.element)}static alert(e,t){if(!this.active)return;let n=document.createElement(`div`);Object.assign(n.style,{position:`relative`,padding:`16px`,opacity:`0`,"margin-bottom":`16px`,"border-left":`4px solid ${de[t]}`,"background-color":`#fff`,"box-shadow":`1px 1px 3px 0 rgba(0, 0, 0, 0.1)`,"word-break":`break-all`});let r=document.createElement(`div`);r.innerText=e,n.appendChild(r),n.insertAdjacentHTML(`beforeend`,`
✖
`),this.handleCard(n)}static handleCard(e){let t=n=>{n.target instanceof Element&&n.target.closest(U.close)&&(e.removeEventListener(`click`,t),e.remove())};e.addEventListener(`click`,t),this.element.insertAdjacentElement(`afterbegin`,e),n(e)}};Y.active=!1;var fe=Object.freeze({analytics:!1,essential:!0,marketing:!1,personalization:!1,uncategorized:!1}),X=Object.freeze({analytics:!0,essential:!0,marketing:!0,personalization:!0,uncategorized:!0}),pe=class{constructor(){this.confirmed=!1,this.bannerText=`empty`,this.scripts=[],this.iFrames=[],this.userHasConfirmed=()=>this.confirmed,this.getStoredElements=()=>[...this.scripts,...this.iFrames],this.getActivableElements=()=>this.getStoredElements().filter((({active:e,categories:t})=>!e&&t.every((e=>this.consents[e])))),this.getConsents=()=>this.consents,this.getConsentsEntries=()=>{return e=this.consents,Object.entries(e);var e},this.getConsent=e=>this.consents[e],this.getBannerText=()=>this.bannerText;let{currentScript:e}=document,t=e?.getAttribute(G.mode);switch(this.mode=a(t,le)?t:`opt-in`,this.mode){case`informational`:case`opt-out`:this.consents={...X};break;default:this.consents={...fe}}this.cookieMaxAge=parseInt(e?.getAttribute(G.cookieMaxAge)||`180`);let n=e?.getAttribute(G.debugMode);this.debugMode=n===``||n===`true`,this.debugMode&&Y.activate(),this.consentMode=e?.getAttribute(G.consentMode)===`true`,this.endpoint=e?.getAttribute(G.endpoint),this.componentsSource=e?.getAttribute(G.componentsSource),this.domain=e?.getAttribute(G.domain),Y.alert(`The cookie banner is set to ${this.mode} mode with a consent expiry time of ${this.cookieMaxAge} days.${this.endpoint?`The consents will be POSTed to ${this.endpoint}`:``}`,`info`)}storeScript(e){this.scripts.push({...e,type:`script`})}storeIFrame(e){this.iFrames.push({...e,type:`iframe`})}storeConsents(e){let t=[];return s(e).forEach((n=>{if(n===`essential`)return;let r=e[n];r===void 0||r===this.consents[n]||(this.consents[n]=r,t.push(n))})),this.confirmed=!0,t}storeBannerText(e){e&&e.textContent&&(this.bannerText=e.textContent)}},me=({element:e})=>{let t=document.createElement(`script`);return t.type=`text/javascript`,t.innerText=e.innerText,t.text=e.text,e.src&&(t.src=e.src),t},he=({element:e,src:t,placeholder:n})=>{let i=document.createElement(`iframe`);for(let{name:t,value:n}of e.attributes)i.setAttribute(t,n);return i.innerText=e.innerText,i.src=t,n&&i.addEventListener(`load`,(()=>r(n))),i},ge=class extends R{constructor(e,t){super(),this.element=e,this.store=t,this.checkboxes=new Map,this.initElements(),this.listenEvents(),this.updateCheckboxes()}initElements(){let e=oe.filter((e=>{let t=q(e),n=this.element.querySelector(`input${t}, ${t} input`);return!n||n.type!==`checkbox`||(n.checked&&u(n,!1),this.checkboxes.set(e,n),!1)}));e.length&&Y.alert(`The Consents Form is missing the following checkboxes: ${e.map((e=>q(e))).join(`, `)}.`,`warning`)}listenEvents(){this.element.addEventListener(`submit`,(e=>this.handleSubmit(e)))}handleSubmit(e){e.preventDefault(),e.stopPropagation();let t={};this.checkboxes.forEach(((e,n)=>{var r;t[n]=(r=e.checked)!=null&&r})),this.emit(`submit`,t)}updateCheckboxes(){let e=this.store.getConsents();this.checkboxes.forEach(((t,n)=>{!!e[n]!==t.checked&&u(t,e[n])}))}submit(){o(this.element,`submit`)}},Z=class extends R{constructor(e,t){super(),this.selector=e,this.store=t,this.disableScrollOnOpen=!1,this.ready=!1,this.isReady=()=>this.ready,document.readyState===`complete`?this.init():window.addEventListener(`load`,(()=>this.init()))}init(){let{banner:e,manager:t,preferences:n}=H;if(this.initElements())this.handleAccessibility(),this.listenEvents(),this.ready=!0,this.emit(`ready`,this.element);else switch(this.selector){case e:Y.alert(`No element with the ${e} attribute was found, it is required to have it!`,`error`);break;case t:Y.alert(`No element with the ${t} attribute was found, did you want to use the Manager component?`,`info`);break;case n:Y.alert(`No element with the ${n} attribute was found, did you want to use the Preferences component?`,`info`)}}initElements(){this.element=l(this.selector,HTMLElement);let{element:e,store:t}=this;if(!e)return!1;let n=l(`form`,HTMLFormElement,e);n&&(this.form=new ge(n,t));let r=e.getAttribute(G.displayProperty);this.disableScrollOnOpen=e.getAttribute(G.disableScroll)===`disable`,this.disableScrollOnOpen&&(this.scrollableElement=(e=>{if(c(e))return e;let t=e.querySelectorAll(`*`);for(let e of t)if(c(e))return e})(e));let i=l(W.interactionTrigger,HTMLElement,e);return this.displayController=new d({element:e,interaction:i?{element:i}:void 0,displayProperty:a(r,d.displayProperties)?r:`flex`,startsHidden:!0}),!0}handleAccessibility(){let{element:e}=this;e&&s(U).forEach((t=>{let n=e.querySelector(U[t]);n&&(n.setAttribute(`role`,`button`),n.setAttribute(`tabindex`,`0`))}))}listenEvents(){let{element:e,form:t}=this;e&&(e.addEventListener(`click`,(e=>this.handleMouseAndKeyboard(e))),e.addEventListener(`keydown`,(e=>this.handleMouseAndKeyboard(e))),t?.on(`submit`,(e=>this.handleFormSubmit(e))))}handleMouseAndKeyboard(e){var t;let{target:n}=e,{allow:r,deny:i,close:a,submit:o}=U;n instanceof Element&&(`key`in e&&e.key!==`Enter`||(n.closest(r)?(this.emit(`allow`),this.close()):n.closest(i)?(this.emit(`deny`),this.close()):n.closest(a)?this.close():n.closest(o)&&((t=this.form)==null||t.submit())))}handleFormSubmit(e){this.emit(`formsubmit`,e),this.close()}show(e=!0){let{element:t,displayController:n,disableScrollOnOpen:r,scrollableElement:i}=this;!t||!n||n.isVisible()===e||(n[e?`show`:`hide`](),r&&(e?ne(i||t,{reserveScrollBarGap:!0}):re()),this.emit(e?`open`:`close`))}open(){this.ready?this.show():this.once(`ready`).then((()=>this.show()))}close(){this.ready?this.show(!1):this.once(`ready`).then((()=>this.show(!1)))}};function Q(e){for(var t=1;t{if(!e)return;let{hostname:t}=window.location;return t.includes(`webflow.io`)?t:e},ve=()=>{let e=$.get(K.main);if(!e)return;let t=JSON.parse(decodeURIComponent(e));return t.consents&&(e=>Object.keys(e).every((e=>a(e,ce))))(t.consents)?t.consents:void 0},ye=(e,t)=>{(function(...e){window.dataLayer=window.dataLayer||[],window.dataLayer.push(arguments)})(`consent`,e,t)},be=e=>{window.dataLayer=window.dataLayer||[],!window.dataLayer.find((t=>typeof t==`object`&&`event`in t&&t.event===e))&&(window.dataLayer.push({event:e}),Y.alert(`The GTM event ${e} has been fired with its equivalent consent mode.`,`info`))},xe=class extends R{constructor(e){super(),this.store=e,this.loadConsents(),this.storeElements(),document.readyState!==`complete`&&window.addEventListener(`load`,(()=>{this.storeElements(),this.applyConsents()})),this.applyConsents()}storeElements(){let{store:e}=this,t=document.querySelectorAll(`script[type="${B}"], iframe[${G.src}]`),n=e.getStoredElements();[...t].filter((e=>!n.find((({element:t})=>e===t)))).forEach((t=>{let n=function(e,t,n,r=!0){let i=n?[n]:[];if(!e)return i;let o=e.split(`,`).reduce(((e,t)=>{let n=t.trim();return(!r||n)&&e.push(n),e}),[]);if(t){let e=o.filter((e=>a(e,t)));return e.length?e:i}return o}(t.getAttribute(G.categories[0])||t.getAttribute(G.categories[1]),ce,se);if(t instanceof HTMLScriptElement&&e.storeScript({categories:n,element:t,active:!1}),t instanceof HTMLIFrameElement){let r=t.getAttribute(G.src);if(!r)return;t.src=``;let i=t.getAttribute(G.placeholder),a=i?l(i,HTMLElement):void 0;e.storeIFrame({categories:n,element:t,src:r,placeholder:a,active:!1})}Y.alert(`Stored the element: ${t.outerHTML} in the categories: ${n.join(`, `)}`,`info`)}))}loadConsents(){let e=ve();if(this.store.consentMode&&ye(`default`,{ad_storage:e!=null&&e.marketing?`granted`:`denied`,ad_user_data:e!=null&&e.marketing?`granted`:`denied`,ad_personalization:e!=null&&e.marketing?`granted`:`denied`,analytics_storage:e!=null&&e.analytics?`granted`:`denied`,functionality_storage:e!=null&&e.personalization?`granted`:`denied`,personalization_storage:e!=null&&e.personalization?`granted`:`denied`,security_storage:`granted`}),e){for(let t in e||{}){let n=t;e[n]&&be(J(n))}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:`consent_ready`}),Y.alert(`The following consents were loaded from the stored cookies: ${JSON.stringify(e)}`,`info`),this.store.storeConsents(e),$.get(K.consentsUpdated)&&((()=>{let e=$.get();for(let t in e){if(t===K.main)continue;let e=window.location.host.split(`.`);for(;e.length>1;)$.remove(t),$.remove(t,{domain:`.${e.join(`.`)}`}),$.remove(t,{domain:`${e.join(`.`)}`}),e.splice(0,1)}})(),Y.alert(`Previously denied cookies have been deleted.`,`info`))}}async applyConsents(){for(let e of this.store.getActivableElements())await new Promise((t=>{let n,{element:r}=e,{src:i,parentElement:a}=r;if(e.type===`script`)n=me(e);else{if(e.type!==`iframe`)return void t(void 0);n=he(e)}let o=()=>{e.element=n,e.active=!0,t(void 0)};i&&n.addEventListener(`load`,o),a?.insertBefore(n,r),r.remove(),i||o()}))}updateConsents(e,t){let{store:n}=this,{cookieMaxAge:r,endpoint:i,domain:a}=n,o=n.storeConsents(e),s=((e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce(((e,t)=>e+((t&=63)<36?t.toString(36):t<62?(t-26).toString(36).toUpperCase():t>62?`-`:`_`)),``))();((e,t,n=120,r)=>{let i=encodeURIComponent(JSON.stringify({id:e,consents:t}));r=_e(r),$.set(K.main,i,{expires:n,domain:r})})(s,n.getConsents(),r,a);let c={};for(let t of o){let n=e[t],r=n?`granted`:`denied`;t===`marketing`&&(c.ad_storage=r,c.ad_user_data=r,c.ad_personalization=r),t===`analytics`&&(c.analytics_storage=r),t===`personalization`&&(c.functionality_storage=r,c.personalization_storage=r),n&&be(J(t))}n.consentMode&&ye(`update`,c),i&&(async({id:e,endpoint:t,consents:n,action:r,bannerText:i})=>{if(t)try{let a=JSON.stringify({id:e,action:r,consents:n,bannerText:i,url:window.location.href,userAgent:navigator.userAgent}),o=await fetch(t,{body:a,method:`POST`});if(!o.ok)throw Error(`The API returned a ${o.status} status.`);Y.alert(`The new consents were successfully POSTed to the API endpoint.`,`info`)}catch(e){Y.alert(`There was an error while POSTing to the API: ${e}`,`error`)}})({action:t,endpoint:i,id:s,consents:n.getConsents(),bannerText:n.getBannerText()||``}),o.length&&(((e=120,t)=>{t=_e(t),$.set(K.consentsUpdated,`true`,{expires:e,domain:t})})(r,a),this.applyConsents(),Y.alert(`The following consents were updated: ${o.join(`, `)}`,`info`)),this.emit(`updateconsents`),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:`consent_ready`})}},Se=Array.isArray(window.FsCC)?window.FsCC:[];window.FsCC=new class{constructor(e=[]){this.store=new pe,this.consentController=new xe(this.store),this.initComponents().then((()=>this.init(e)))}async initComponents(){let{store:e}=this,{componentsSource:t}=e,{banner:n,preferences:r,manager:i}=H;t&&await(async e=>{let{origin:t,pathname:n,href:r}=window.location,{origin:i,pathname:a,href:o}=new URL(document.baseURI);try{e.startsWith(`/`)&&(e=(e=>e.replace(/\/+$/,``))(o===r?t:i+a)+e);let{origin:s,pathname:c}=new URL(e);if(s+c===t+n)return;let l=await(await fetch(e)).text(),u=new DOMParser().parseFromString(l,`text/html`);Object.values(H).forEach((e=>{let t=u.querySelector(e);t&&document.body.appendChild(t)})),te([`ix2`])}catch(e){Y.alert(`${e}`,`error`)}})(t),this.banner=new Z(n,e),this.preferences=new Z(r,e),this.manager=new Z(i,e)}init(e=[]){let{store:t,manager:n,banner:r}=this;document.head.insertAdjacentHTML(`beforeend`,ue),!/bot|crawler|spider|crawling/i.test(navigator.userAgent)&&(this.push(...e),t.userHasConfirmed()?n.open():r.open(),this.listenEvents())}listenEvents(){let{allow:e,deny:t,submit:n}=V,r=[`banner`,`manager`,`preferences`],{store:i,consentController:a,banner:o,manager:s}=this;document.addEventListener(`click`,(e=>this.handleMouseAndKeyboard(e))),document.addEventListener(`keydown`,(e=>this.handleMouseAndKeyboard(e))),o.isReady()?i.storeBannerText(o.element):o.on(`ready`,(e=>i.storeBannerText(e))),a.on(`updateconsents`,(()=>{r.forEach((e=>this[e].form?.updateCheckboxes()))})),r.forEach((r=>{this[r].on(`allow`,(()=>{Y.alert(`Allow button was clicked in the ${r} component.`,`info`),a.updateConsents(X,e)})),this[r].on(`deny`,(()=>{Y.alert(`Deny button was clicked in the ${r} component.`,`info`),a.updateConsents(fe,t)})),this[r].on(`formsubmit`,(e=>{Y.alert(`Consents Form was submitted in the ${r} component with the following consents: ${JSON.stringify(e)}`,`info`),a.updateConsents(e,n)})),r!==`manager`&&this[r].on(`close`,(()=>{Y.alert(`The ${r} component was closed.`,`info`),i.mode===`informational`&&(Y.alert(`All cookies were accepted because the mode is set to ${i.mode}.`,`warning`),a.updateConsents(X,e)),s.open()}))}))}handleMouseAndKeyboard(e){let{target:t}=e,{banner:n,manager:r,preferences:i}=this;t instanceof Element&&(`key`in e&&e.key!==`Enter`||t.closest(U.openPreferences)&&(n.close(),r.close(),i.open(),Y.alert(`Open Preferences button was clicked.`,`info`)))}push(...e){e.forEach((e=>e(this)))}}(Se)})();