!function(){const _wccStore=window._wccConfig,_wccStyle=window._wccStyles;let currentLaw=window._wccConfig._lawSelected[0],showBanner=!0;_wccStore._backupNodes=[],_wccStore._resetConsentID=!1,_wccStore._bannerState=!1,_wccStore._preferenceOriginTag=!1,window.webtoffee=window.webtoffee||{};const ref=window.webtoffee;ref._wccConsentStore=new Map,ref._wccGetCookieMap=function(){const cookieMap={};try{document.cookie.split(";").map((cookie=>{const[key,value]=cookie.split("=");key&&(cookieMap[key.trim()]=value)}))}catch(error){}return cookieMap};const currentCookieMap=ref._wccGetCookieMap();ref._wccGetFromStore=function(key){return ref._wccConsentStore.get(key)||""},ref._wccSetInStore=function(key,value){ref._wccConsentStore.set(key,value);let cookieStringArray=[];for(const[key,value]of ref._wccConsentStore)cookieStringArray.push(`${key}:${value}`);const scriptExpiry=_wccStore&&_wccStore._bannerConfig[currentLaw].settings.consentExpiry?_wccStore._bannerConfig[currentLaw].settings.consentExpiry:365;ref._wccSetCookie("wt_consent",cookieStringArray.join(","),scriptExpiry)};const cookieyesConsentMap=(currentCookieMap.wt_consent||"").split(",").reduce(((prev,curr)=>{if(!curr)return prev;const[key,value]=curr.split(":");return prev[key]=value,prev}),{});function _wccSetConsentID(){if(ref._wccGetFromStore("consentid"))return;const consentID=ref._wccRandomString(32);ref._wccSetInStore("consentid",consentID),_wccStore._resetConsentID=!0}function _wccGetElementByTag(tag){const item=document.querySelector("[data-tag="+tag+"]");return item||!1}function _wccAttachListener(selector,fn){const item=_wccFindElement(selector);item&&item.addEventListener("click",fn)}function _wccClassAction(action,selector,className,forParent=!0){const item=_wccFindElement(selector,forParent);return item&&item.classList[action](className)}function _wccFindElement(selector,forParent){let createdSelector=selector;if(!0===selector.startsWith("="))createdSelector=`[data-tag="${selector.substring(1)}"]`;const element=document.querySelector(createdSelector);return!element||forParent&&!element.parentElement?null:forParent?element.parentElement:element}function _wccRemoveBanner(){_wccHideBanner(),!0===_wccStore._bannerConfig[currentLaw].config.revisitConsent.status&&_wccShowRevisit(),"popup"===_wccGetType()&&(_wccHideOverLay(),document.body&&document.body.classList.contains("wcc-popup-overflow")&&document.body.classList.remove("wcc-popup-overflow"))}async function _wccInitOperations(){await async function(){const bannerConfig=_wccStore._bannerConfig,availableLaws=Object.keys(bannerConfig);let country="",is_eu=!1,region_code="",ccpaAllowedRegions=_wccStore._ccpaAllowedRegions,gdprAllowedRegions=_wccStore._gdprAllowedRegions;if(availableLaws.some((law=>"ALL"!==bannerConfig[law].settings.selectedRegion))){const visitor=await async function(){const apiUrl=_wccStore._restApiUrl,response=await fetch(apiUrl);return await response.json()}();visitor&&(country=visitor.country,is_eu=visitor.in_eu,region_code=visitor.region_code)}if(1===availableLaws.length){currentLaw=availableLaws[0],_wccBannerEnabled()||(showBanner=!1)}else currentLaw="EU"===country||is_eu?"GDPR":"US"===country?"CCPA":availableLaws[0];let selectedRegion=_wccStore._bannerConfig[currentLaw].settings.selectedRegion,bannerEnabled=_wccBannerEnabled();"GDPR"===currentLaw?bannerEnabled?"ALL"!==selectedRegion&&(showBanner=Array.isArray(gdprAllowedRegions)&&gdprAllowedRegions.length>0?gdprAllowedRegions.includes(country):is_eu):showBanner=!1:"CCPA"===currentLaw&&(bannerEnabled?"ALL"!==selectedRegion&&(showBanner=Array.isArray(ccpaAllowedRegions)&&ccpaAllowedRegions.length>0?"US"===country&&ccpaAllowedRegions.includes(region_code):function(country,region_code){return _wccStore._restrictToCA?"US"===country&&"CA"===region_code:"US"===country}(country,region_code)):showBanner=!1)}(),function(){if(document.getElementById("wcc-style")||!_wccStyle)return;document.head.insertAdjacentHTML("beforeend",` <style id="wcc-style">${_wccStyle.css[currentLaw]}</style>`)}(),function(){const shortCodes=_wccStore._tags;Array.prototype.forEach.call(shortCodes,(function(shortcode){document.querySelectorAll("[data-tag="+shortcode.tag+"]").forEach((function(item){let styles="";for(const key in shortcode.styles)styles+=`${key}: ${shortcode.styles[key]};`;item.style.cssText=styles}))}))}(),async function(){const myEvent=new CustomEvent("_wccBannerVisible",{detail:{bannerVisibility:showBanner,currentLaw:currentLaw},bubbles:!0,cancelable:!0,composed:!1});if(setTimeout((()=>{document.body.dispatchEvent(myEvent)}),0),currentLaw&&showBanner){const template=document.getElementById(`wccBannerTemplate_${currentLaw}`);if(template){const templateHtml=template.innerHTML,doc=(new DOMParser).parseFromString(templateHtml,"text/html");!function($doc){const footer=$doc.querySelector('[data-tag="detail"] .wcc-footer-shadow'),preference=$doc.querySelector('[data-tag="detail"]');if(!footer)return;const background=preference&&preference.style.backgroundColor||"#ffffff";footer.style.background=`linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, ${background} 100%)`}(doc),document.body.insertAdjacentHTML("afterbegin",doc.body.innerHTML)}}_wccSetPreferenceCheckBoxStates(),function(){for(const{slug:slug}of _wccStore._categories)_wccAttachListener("detail-category-title",(()=>document.getElementById(`wccCategory${slug}`).classList.toggle("wcc-tab-active")));_wccAttachListener("=settings-button",(()=>_wccSetPreferenceAction("settings-button"))),_wccAttachListener("=detail-close",(()=>_wccHidePreferenceCenter())),_wccAttachListener("=optout-cancel-button",(()=>_wccHidePreferenceCenter())),_wccAttachListener("=close-button",(()=>{_wccAcceptReject(_wccStore._closeButtonAction)()})),_wccAttachListener("=donotsell-button",(()=>_wccSetPreferenceAction("donotsell-button"))),_wccAttachListener("=reject-button",_wccAcceptReject("reject")),_wccAttachListener("=accept-button",_wccAcceptReject("all")),_wccAttachListener("=detail-accept-button",_wccAcceptReject("all")),_wccAttachListener("=detail-save-button",_wccAcceptReject()),_wccAttachListener("=detail-category-preview-save-button",_wccAcceptReject()),_wccAttachListener("=optout-confirm-button",_wccAcceptReject()),_wccAttachListener("=detail-reject-button",_wccAcceptReject("reject")),_wccAttachListener("=revisit-consent",(()=>_revisitWccConsent())),_wccAttachListener("=optout-close",(()=>_wccHidePreferenceCenter())),_wccAttachListener("=category-tab",(()=>_wccShowTab("wccIABSectionCookie"))),_wccAttachListener("=purpose-tab",(()=>_wccShowTab("wccIABSectionPurpose"))),_wccAttachListener("=vendor-tab",(()=>_wccShowTab("wccIABSectionVendor"))),_wccAttachListener("#wcc-iab-notice-toggle",(()=>_wccShowPreferenceCenter())),function(){_wccIabInnerAccordionClickListener("wccIABSectionPurpose"),_wccIabInnerAccordionClickListener("wccIABSectionVendor"),document.querySelectorAll(".wcc-child-accordion .wcc-child-accordion-item").forEach((item=>item.addEventListener("click",(function(event){if("checkbox"===event.target.type)return;const accordion=this.parentNode,body=accordion.querySelector(".wcc-child-accordion-body"),isActive=accordion.classList.toggle("wcc-child-accordion-active");accordion.setAttribute("aria-expanded",isActive?"true":"false"),body&&body.setAttribute("aria-hidden",isActive?"false":"true")}))));document.querySelectorAll(".wcc-consents-checkbox").forEach((function(checkbox){checkbox.addEventListener("change",wcc_enable_disable_consent)}))}(),document.querySelectorAll(".wcc-preference-btn").forEach((button=>{const uniqueID=ref._wccRandomString(8,!1);button.id=uniqueID,button.addEventListener("click",(function(){_revisitWccConsent()}))})),function(){if(!_wccStore._bannerConfig[currentLaw].config.auditTable.status)return;const categoryNames=_wccStore._categories.map((({slug:slug})=>slug));categoryNames.map((category=>{const selector=`#wccDetailCategory${category}`;_wccAttachListener(selector,(({target:{id:id}})=>{if(id===`wccSwitch${category}`)return;const accordion=document.querySelector(selector),body=accordion.querySelector(".wcc-accordion-body"),isActive=accordion.classList.toggle("wcc-accordion-active");accordion.setAttribute("aria-expanded",isActive),body&&body.setAttribute("aria-hidden",!isActive),categoryNames.filter((categoryName=>categoryName!==category)).map((filteredName=>{const otherAccordion=document.querySelector(`#wccDetailCategory${filteredName}`),otherBody=otherAccordion.querySelector(".wcc-accordion-body");otherAccordion.classList.remove("wcc-accordion-active"),otherAccordion.setAttribute("aria-expanded","false"),otherBody&&otherBody.setAttribute("aria-hidden","true")}))}))}))}()}(),function(){const toggle=_wccStore._bannerConfig[currentLaw].config.optOption.toggle,activeColor=toggle.states.active.styles["background-color"],inactiveColor=toggle.states.inactive.styles["background-color"];!function(){_wccClassAction("remove",...arguments)}("=optout-option","wcc-disabled",!1);const toggleDataCode=_wccStore._bannerConfig[currentLaw].settings.shortcodes.find((code=>"wcc_optout_toggle_label"===code.key)),optOutTitle=_wccStore._bannerConfig[currentLaw].settings.shortcodes.find((code=>"wcc_optout_option_title"===code.key)),formattedLabel=toggleDataCode.content.replace("[wcc_optout_option_title]",optOutTitle.content);let checked=_wccGPCEnabled()||"yes"===ref._wccGetFromStore("consent");if(function(boxElem,formattedLabel,{checked:checked,disabled:disabled,addListeners:addListeners},{activeColor:activeColor,inactiveColor:inactiveColor},isCCPA=!1){if(!boxElem)return;isCCPA&&addListeners&&_wccAttachListener("=optout-option-title",(()=>boxElem.click()));if(boxElem.checked=checked,boxElem.disabled=disabled,boxElem.style.backgroundColor=checked?activeColor:inactiveColor,_wccSetCheckBoxAriaLabel(boxElem,checked,formattedLabel,isCCPA),!addListeners)return;boxElem.addEventListener("change",(({currentTarget:elem})=>{const isChecked=elem.checked;elem.style.backgroundColor=isChecked?activeColor:inactiveColor,_wccSetCheckBoxAriaLabel(boxElem,isChecked,formattedLabel,isCCPA)}))}(document.getElementById("wccCCPAOptOut"),formattedLabel,{checked:checked,disabled:!1,addListeners:!0},{activeColor:activeColor,inactiveColor:inactiveColor},!0),_wccGPCEnabled()){const optOutButton=document.querySelector('[data-tag="optout-confirm-button"]');optOutButton?(_wccSetConsentID(),optOutButton.click()):console.warn("Opt-out confirm button not found.")}}(),function(){const status=_wccStore._bannerConfig[currentLaw].config.videoPlaceholder.status,styles=_wccStore._bannerConfig[currentLaw].config.videoPlaceholder.styles;if(!status)return;if(!status)return;const placeHolders=document.querySelectorAll('[data-tag="placeholder-title"]');if(placeHolders.length<1)return;Array.from(placeHolders).forEach((placeHolder=>{placeHolder.style.display="block",placeHolder.addEventListener("click",(()=>{ref._wccGetFromStore("action")&&_revisitWccConsent()}));for(const style in styles)styles[style]&&(placeHolder.style[style]=styles[style])}))}(),function(){const readMoreButton=_wccStore._bannerConfig[currentLaw].settings.shortcodes.find((code=>"wcc_readmore"===code.key));if(!readMoreButton.status)return;const content=readMoreButton.content,styles=_wccStore._bannerConfig[currentLaw].config.readMore.styles,readMoreElement=document.querySelector('[data-tag="description"]');if(!readMoreElement)return;if(readMoreElement.childNodes.length>1){const innerElement=document.querySelector('[data-tag="description"] p:last-child');innerElement&&innerElement.insertAdjacentHTML("beforeend",`&nbsp;${content}`)}else readMoreElement.insertAdjacentHTML("beforeend",`&nbsp;${content}`);const placeHolders=document.querySelectorAll('[data-tag="readmore-button"]');if(placeHolders.length<1)return;Array.from(placeHolders).forEach((placeHolder=>{for(const style in styles)styles[style]&&(placeHolder.style[style]=styles[style])}))}(),function(){const item=document.getElementById("wcc-style-inline");item&&item.remove()}(),function(){const notice=_wccGetElementByTag("notice");if(!notice)return!1;const container=notice.closest(".wcc-consent-container");if(!container)return!1;const type=_wccStore._bannerConfig[currentLaw].settings.type;let position=_wccStore._bannerConfig[currentLaw].settings.position;"popup"===type&&(position="center",_wccShowOverLay(),document.body.classList.add("wcc-popup-overflow"));const noticeClass="wcc-"+type+"-"+position;container.classList.add(noticeClass);const revisitConsent=_wccGetElementByTag("revisit-consent");if(!revisitConsent)return!1;const revisitPosition=`wcc-revisit-${_wccStore._bannerConfig[currentLaw].config.revisitConsent.position}`;revisitConsent.classList.add(revisitPosition)}(),function(){if(!_wccStore._rtl)return;["notice","detail","optout-popup","revisit-consent","video-placeholder"].forEach((function(item){_wccGetElementByTag(item)&&_wccGetElementByTag(item).classList.add("wcc-rtl")}))}(),function(){const poweredByStatus=_wccStore._bannerConfig[currentLaw].config.preferenceCenter.poweredBy.status,styles=poweredByStatus?{display:"flex",justifyContent:"flex-end",alignItems:"center"}:{display:"none"};["detail-powered-by","optout-powered-by"].forEach((key=>{const element=document.querySelector(`[data-tag="${key}"]`);element&&Object.assign(element.style,styles)}))}()}(),function(){const activeLaw=_wccGetLaw(),showCode=_wccStore._bannerConfig[currentLaw].settings.shortcodes.find((code=>"wcc_show_desc"===code.key)),hideCode=_wccStore._bannerConfig[currentLaw].settings.shortcodes.find((code=>"wcc_hide_desc"===code.key));if(!showCode||!hideCode)return;const hideButtonContent=hideCode.content,showButtonContent=showCode.content,contentLimit=window.innerWidth<376?150:300,element=document.querySelector(`[data-tag="${"gdpr"===activeLaw?"detail":"optout"}-description"]`);if(!element)return;if(element.textContent.length<contentLimit)return;const contentHTML=element.innerHTML,innerElements=(new DOMParser).parseFromString(contentHTML,"text/html").querySelectorAll("body > p");if(innerElements.length<=1)return;let strippedContent="";for(let index=0;index<innerElements.length;index++){if(index===innerElements.length-1)return;const element=innerElements[index];if(`${strippedContent}${element.outerHTML}`.length>contentLimit&&element.insertAdjacentHTML("beforeend",`...&nbsp;${showButtonContent}`),strippedContent=`${strippedContent}${element.outerHTML}`,strippedContent.length>contentLimit)break}function showMoreHandler(){element.innerHTML=`${contentHTML}${hideButtonContent}`,_wccAttachListener("=hide-desc-button",showLessHandler)}function showLessHandler(){element.innerHTML=strippedContent,_wccAttachListener("=show-desc-button",showMoreHandler)}showLessHandler()}();let renew_date=_wccStore._renewConsent;const consent_time=function(cookieName){const cookieValue=document.cookie.split(";").map((cookie=>cookie.trim())).find((row=>row.startsWith(`${cookieName}=`)));if(cookieValue){const cookiePairs=cookieValue.substring(cookieName.length+1).split(",");for(const pair of cookiePairs){const[key,value]=pair.split(":");if("consent_time"===key){const lastModifiedTime=Number(value);if(!isNaN(lastModifiedTime))return lastModifiedTime}}}return null}("wt_consent");!ref._wccGetFromStore("action")||function(){let params=new URL(document.location).searchParams;return params.get("wcc_preview")&&"true"===params.get("wcc_preview")}()||renew_date&&renew_date>consent_time?(_wccShowBanner(),function(){const activeLaw=_wccGetLaw();ref._wccSetInStore("consent","no");const ccpaCheckBoxValue=_wccFindCheckBoxValue(),responseCategories={accepted:[],rejected:[]};for(const category of _wccStore._categories){let valueToSet="yes";showBanner&&("gdpr"===activeLaw&&!category.isNecessary&&!category.defaultConsent.gdpr||"ccpa"===activeLaw&&ccpaCheckBoxValue&&!category.defaultConsent.ccpa)&&(valueToSet="no"),"no"===valueToSet?responseCategories.rejected.push(category.slug):responseCategories.accepted.push(category.slug),ref._wccSetInStore(`${category.slug}`,valueToSet)}_wccUnblock(),_wccSendConsentEvent(responseCategories)}(),renew_date&&renew_date>consent_time&&(_wccAcceptReject("reject"),ref._wccSetInStore("action",""))):_wccRemoveBanner()}async function _wccInit(){try{_wccInitOperations(),function(){for(const category of _wccStore._categories)"yes"!==ref._wccGetFromStore(category.slug)&&_wccRemoveDeadCookies(category)}(),document.querySelector("body").addEventListener("click",(event=>{const selector=".wcc-banner-element, .wcc-banner-element *";(event.target.matches?event.target.matches(selector):event.target.msMatchesSelector(selector))&&_revisitWccConsent()}))}catch(err){console.error(err)}}var callback;function wcc_enable_disable_consent(){let el=this.getAttribute("data-tag");const nestedInputs=document.querySelectorAll(".wcc-"+el+"-checkbox, .wcc-"+el+"-legitimate-interests-checkbox"),isChecked=this.checked;nestedInputs.forEach((input=>{input.checked=isChecked}))}function _wccIabInnerAccordionClickListener(containerId){document.querySelectorAll(`#${containerId} .wcc-accordion .wcc-accordion-iab-item`).forEach((item=>{item.addEventListener("click",(function(event){if("checkbox"===event.target.type)return;this.parentNode.classList.toggle("wcc-accordion-active"),this.parentNode.setAttribute("aria-expanded","true");const accordion=this.parentNode,body=accordion.querySelector(".wcc-accordion-body"),isActive=accordion.classList.toggle("wcc-child-accordion-active");accordion.setAttribute("aria-expanded",isActive?"true":"false"),body&&body.setAttribute("aria-hidden",isActive?"false":"true")}))}))}function _wccGetLaw(){return _wccStore._bannerConfig[currentLaw].settings.applicableLaw}function _wccBannerEnabled(){return _wccStore._bannerConfig[currentLaw].settings.bannerEnabled}function _wccGetType(){return _wccStore._bannerConfig[currentLaw].settings.type}function _wccGetBanner(){const notice=_wccGetElementByTag("notice"),container=notice&&notice.closest(".wcc-consent-container")||!1;return container&&container||!1}function _wccHideBanner(){const notice=_wccGetBanner();notice&&notice.classList.add("wcc-hide")}function _wccShowBanner(){const notice=_wccGetBanner();notice&&notice.classList.remove("wcc-hide")}function _wccHideOverLay(){const overlay=document.querySelector(".wcc-overlay");overlay&&overlay.classList.add("wcc-hide")}function _wccShowOverLay(){const overlay=document.querySelector(".wcc-overlay");overlay&&overlay.classList.remove("wcc-hide")}function _wccGetPreferenceCenter(){if("classic"===_wccGetType())return _wccGetBanner();let element="ccpa"===_wccGetLaw()?_wccGetElementByTag("optout-popup"):_wccGetElementByTag("detail");return element&&element.closest(".wcc-modal")||!1}function _wccHidePreferenceCenter(){const element=_wccGetPreferenceCenter();element&&element.classList.remove(_wccGetPreferenceClass()),"classic"!==_wccGetType()&&(_wccHideOverLay(),ref._wccGetFromStore("action")||_wccShowBanner()),ref._wccGetFromStore("action")&&_wccShowRevisit();const origin=_wccStore._preferenceOriginTag;origin&&function(tagName){const element=_wccGetElementByTag(tagName);if(!element)return;element.focus()}(origin)}function _wccShowPreferenceCenter(){const element=_wccGetPreferenceCenter();element&&element.classList.add(_wccGetPreferenceClass()),"classic"!==_wccGetType()&&(_wccShowOverLay(),_wccHideBanner())}function _wccTogglePreferenceCenter(){const element=_wccGetPreferenceCenter();element&&element.classList.toggle(_wccGetPreferenceClass()),"classic"!==_wccGetType()&&function(){const overlay=document.querySelector(".wcc-overlay");overlay&&overlay.classList.toggle("wcc-hide")}()}function _wccGetPreferenceClass(){return"classic"===_wccGetType()?"wcc-consent-bar-expand":"wcc-modal-open"}function _wccGetRevisit(){const revisit=_wccGetElementByTag("revisit-consent");return revisit&&revisit||!1}function _wccShowRevisit(){const revisit=_wccGetRevisit();revisit&&revisit.classList.remove("wcc-revisit-hide")}function _wccSetPreferenceAction(tagName=!1){_wccStore._preferenceOriginTag=tagName,"classic"===_wccGetType()?_wccTogglePreferenceCenter():_wccShowPreferenceCenter()}["consent","action"].concat(_wccStore._categories.map((({slug:slug})=>slug))).map((item=>ref._wccConsentStore.set(item,cookieyesConsentMap[item]||""))),ref._wccGetCookie=function(name){const value=new RegExp(`${name}=([^;]+)`).exec(document.cookie);return value&&Array.isArray(value)&&value[1]?unescape(value[1]):null},ref._wccSetCookie=function(name,value,days=0,domain=_wccStore._rootDomain,ssl=_wccStore._ssl){const date=new Date;domain&&(domain=`domain=${domain}`),ssl&&(ssl="secure");const toSetTime=0===days?0:date.setTime(date.getTime()+24*days*60*60*1e3);document.cookie=`${name}=${value}; expires=${new Date(toSetTime).toUTCString()}; path=/;${domain}; SameSite=Strict;${ssl};`},_revisitWccConsent=function(){"classic"===_wccGetType()&&_wccShowBanner(),_wccSetPreferenceAction(),function(force=!1){const revisit=_wccGetRevisit();revisit&&(!0===force?_wccRevisitHide():revisit.classList.toggle("wcc-revisit-hide"))}()},ref._wccRandomString=function(length,allChars=!0){const chars=(allChars?"0123456789":"")+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghiklmnopqrstuvwxyz",response=[];for(let i=0;i<length;i++)response.push(chars[Math.floor(Math.random()*chars.length)]);return allChars?btoa(response.join("")).replace(/\=+$/,""):response.join("")},callback=async function(){try{await _wccInit()}catch(err){console.error(err)}},"undefined"!=typeof document&&("complete"!==document.readyState&&"interactive"!==document.readyState?document.addEventListener("DOMContentLoaded",callback):callback());const sectionNames=["wccIABSectionCookie","wccIABSectionPurpose","wccIABSectionVendor"];function _wccShowTab(tagName=!1){sectionNames.forEach((validTagName=>{!function(){const buttons=document.querySelectorAll(".wcc-iab-nav-item");buttons.forEach((button=>{button.addEventListener("click",(function(){buttons.forEach((btn=>btn.classList.remove("wcc-iab-nav-item-active"))),this.classList.add("wcc-iab-nav-item-active")}))}))}();const tab=function(tagName=!1){const tab=_wccGetElementByTag(tagName);return tab&&tab||!1}(validTagName);validTagName===tagName?tab&&tab.classList.remove("wcc-hide"):tab&&tab.classList.add("wcc-hide")}))}function _wccRemoveDeadCookies({cookies:cookies}){const currentCookieMap=ref._wccGetCookieMap();for(const{cookieID:cookieID,domain:domain}of cookies)for(const existingCookieID in currentCookieMap){(existingCookieID===cookieID||cookieID.includes("*")&&new RegExp(`^${cookieID.replace("*",".*")}$`).test(existingCookieID))&&[domain,""].map((cookieDomain=>ref._wccSetCookie(existingCookieID,"",0,cookieDomain)))}}function _wccSetPreferenceCheckBoxStates(revisit=!1){for(const category of _wccStore._categories){const cookieValue=ref._wccGetFromStore(category.slug);_wccSetCheckboxes(category,"yes"===cookieValue||!cookieValue&&category.defaultConsent[_wccGetLaw()]||category.isNecessary,category.isNecessary,_wccStore._bannerConfig[currentLaw].settings.shortcodes.find((code=>"wcc_category_toggle_label"===code.key)).content.replace("[wcc_preference_{{category_slug}}_title]",category.name),revisit),_wccSetPreferenceState(category)}}function _wccSetCheckboxes(category,checked,disabled,formattedLabel,revisit=!1){const toggle=_wccStore._bannerConfig[currentLaw].config.preferenceCenter.toggle,activeColor=toggle.states.active.styles["background-color"],inactiveColor=toggle.states.inactive.styles["background-color"];["wccCategoryDirect","wccSwitch"].map((key=>{const boxElem=document.getElementById(`${key}${category.slug}`);boxElem&&(!function(element,category={},revisit=!1){if(revisit)return;"detail-category-toggle"===element.parentElement.getAttribute("data-tag")?function(element,category){let toggleContainer=element.closest(".wcc-accordion-item");if(!toggleContainer)return;const toggleSwitch=toggleContainer.querySelector(".wcc-switch"),necessaryText=toggleContainer.querySelector(".wcc-always-active");category.isNecessary?toggleSwitch&&toggleSwitch.remove():(necessaryText&&necessaryText.remove(),("classic"===_wccGetType()&&_wccStore._bannerConfig[currentLaw].config.categoryPreview.status||category.cookies&&0===category.cookies.length&&!category.foundNoCookieScript)&&toggleSwitch&&toggleSwitch.remove())}(element,category):"detail-category-preview-toggle"===element.parentElement.getAttribute("data-tag")&&function(element,category){category.cookies&&0===category.cookies.length&&!category.isNecessary&&element.parentElement.parentElement.remove()}(element,category)}(boxElem,category,revisit),boxElem.checked=checked,boxElem.disabled=disabled,boxElem.style.backgroundColor=checked?activeColor:inactiveColor,_wccSetCheckBoxAriaLabel(boxElem,checked,formattedLabel),revisit||boxElem.addEventListener("change",(({currentTarget:elem})=>{const isChecked=elem.checked;elem.style.backgroundColor=isChecked?activeColor:inactiveColor,_wccSetCheckBoxAriaLabel(boxElem,isChecked,formattedLabel)})))}))}function _wccSetPreferenceState(category){if(!1===_wccStore._bannerConfig[currentLaw].config.auditTable.status){const tableElement=document.querySelector(`#wccDetailCategory${category.slug} [data-tag="audit-table"]`);tableElement&&tableElement.remove();const chevronElement=document.querySelector(`#wccDetailCategory${category.slug} .wcc-accordion-chevron`);chevronElement&&chevronElement.classList.add("wcc-accordion-chevron-hide")}}function _wccSetCheckBoxAriaLabel(boxElem,isChecked,formattedLabel,isCCPA=!1){if(!boxElem)return;const keyName=isChecked?"disable":"enable",textCode=`wcc_${keyName}_${isCCPA?"optout":"category"}_label`,shortCodeData=_wccStore._bannerConfig[currentLaw].settings.shortcodes.find((code=>code.key===textCode));if(!shortCodeData)return;const labelText=formattedLabel.replace(/{{status}}/g,keyName).replace(`[${textCode}]`,shortCodeData.content);boxElem.setAttribute("aria-label",labelText)}function _wccAcceptReject(option="custom"){return()=>{!function(choice="all"){const activeLaw=_wccGetLaw(),ccpaCheckBoxValue=_wccFindCheckBoxValue();ref._wccSetInStore("action","yes"),"gdpr"===activeLaw?ref._wccSetInStore("consent","reject"===choice?"no":"yes"):ref._wccSetInStore("consent",ccpaCheckBoxValue?"yes":"no");const responseCategories={accepted:[],rejected:[]};for(const category of _wccStore._categories){let valueToSet="no";valueToSet="gdpr"===activeLaw?category.isNecessary||"reject"!==choice&&("custom"!==choice||_wccFindCheckBoxValue(category.slug))?"yes":"no":ccpaCheckBoxValue&&!category.defaultConsent.ccpa||!category.isNecessary&&"CCPA"===currentLaw&&"reject"===choice?"no":"yes",ref._wccSetInStore(`${category.slug}`,valueToSet),"no"===valueToSet?(responseCategories.rejected.push(category.slug),_wccRemoveDeadCookies(category)):responseCategories.accepted.push(category.slug)}let customEventSupport=_wccStore._customEvents;window.dataLayer&&customEventSupport&&window.dataLayer.push({event:"cookie_consent_updated"});_wccUnblock(),_wccSendConsentEvent(responseCategories,choice)}(option),_wccSetConsentID(),function(){const consentTime=(new Date).getTime();ref._wccSetInStore("consent_time",consentTime)}(),_wccRemoveBanner(),_wccHidePreferenceCenter(),async function(){if(!_wccStore._logConsent)return;try{const data={log:JSON.stringify(_wccStore._categories.map((({slug:slug})=>({name:slug,status:ref._wccGetFromStore(slug)||"no"}))).concat([{name:"Cookie Consent",status:"ccpa"===_wccStore._bannerConfig.activeLaw?"yes":ref._wccGetFromStore("consent")||"no"}])),consent_id:ref._wccGetFromStore("consentid")};let request=new XMLHttpRequest;request.open("POST",`${_wccApi.base}consent_logs`,!0),request.setRequestHeader("Content-type","application/json"),request.setRequestHeader("X-WP-Nonce",_wccApi.nonce),request.send(JSON.stringify(data))}catch(err){console.error(err)}}(),function(){"gdpr"===_wccGetLaw()&&_wccSetPreferenceCheckBoxStates(!0);!0===_wccStore._bannerConfig[currentLaw].behaviours.reloadBannerOnAccept&&window.location.reload()}()}}const _wccCreateElementBackup=document.createElement;function _wccUnblock(){if(1===navigator.doNotTrack)return;const consent=ref._wccGetFromStore("consent");("gdpr"!==_wccGetLaw()||consent&&"yes"===consent||!showBanner)&&(_wccStore._backupNodes=_wccStore._backupNodes.filter((({position:position,node:node,uniqueID:uniqueID})=>{try{if(_wccShouldBlockProvider(node.src))return!0;const frame=document.getElementById(uniqueID);if("BLOCKQUOTE"===node.nodeName&&node.classList.contains("tiktok-embed")&&frame){frame.parentNode.insertBefore(node,frame);const script=document.createElement("script");return script.src="https://www.tiktok.com/embed.js",script.async=!0,document.body.appendChild(script),frame.parentNode.removeChild(frame),!1}if(node.src&&node.type&&node.type.startsWith("javascript")){const scriptNode=document.createElement("script");scriptNode.src=node.src,scriptNode.type="text/javascript",scriptNode.async=!0;return("head"===position?document.head:document.body).appendChild(scriptNode),frame&&frame.parentNode.removeChild(frame),!1}if(frame){const iframe=document.createElement("iframe");iframe.src=node.src,iframe.width=frame.offsetWidth,iframe.height=frame.offsetHeight,frame.parentNode.insertBefore(iframe,frame),frame.parentNode.removeChild(frame)}return!1}catch(error){return console.error(error),!1}})))}function _wccAddProviderToList(node,cleanedHostname){const categoryName=node.hasAttribute("data-wcc")&&node.getAttribute("data-wcc");if(!categoryName)return;for(const category of _wccStore._categories)if(category.isNecessary&&category.slug===categoryName&&!0===category.defaultConsent[currentLaw])return;const provider=_wccStore._providersToBlock.find((({re:re})=>re===cleanedHostname));provider?provider.isOverriden?provider.categories.includes(categoryName)||provider.categories.push(categoryName):(provider.categories=[categoryName],provider.isOverriden=!0):_wccStore._providersToBlock.push({re:cleanedHostname,categories:[categoryName],fullPath:!1})}document.createElement=(...args)=>{const createdElement=_wccCreateElementBackup.call(document,...args);if("script"!==createdElement.nodeName.toLowerCase())return createdElement;const originalSetAttribute=createdElement.setAttribute.bind(createdElement);return Object.defineProperties(createdElement,{src:{get:function(){return createdElement.getAttribute("src")},set:function(value){return _wccShouldChangeType(createdElement,value)&&originalSetAttribute("type","javascript/blocked"),originalSetAttribute("src",value),!0}},type:{get:function(){return createdElement.getAttribute("type")},set:function(value){return value=_wccShouldChangeType(createdElement)?"javascript/blocked":value,originalSetAttribute("type",value),!0}}}),createdElement.setAttribute=(name,value)=>{if("type"===name||"src"===name)return createdElement[name]=value;originalSetAttribute(name,value),"data-wcc"!==name||_wccShouldChangeType(createdElement)||originalSetAttribute("type","text/javascript")},createdElement};const _nodeListObserver=new MutationObserver((function(mutations){if(!new URLSearchParams(window.location.search).has("wcc_bypass"))for(const{addedNodes:addedNodes}of mutations)for(const node of addedNodes)try{if("BLOCKQUOTE"===node.nodeName&&node.classList.contains("tiktok-embed")){const videoId=node.getAttribute("data-video-id");if(!videoId)continue;const uniqueID=ref._wccRandomString(8,!1),pseudoIframe={nodeName:"iframe",src:`https://www.tiktok.com/embed/${videoId}`,offsetWidth:parseInt(node.style.maxWidth)||605,offsetHeight:parseInt(node.style.minHeight)||700,insertAdjacentHTML:function(position,html){node.insertAdjacentHTML(position,html)}},cleanedHostname=_wccCleanHostName("tiktok.com");if(_wccAddProviderToList(node,cleanedHostname),!_wccShouldBlockProvider(cleanedHostname))continue;_wccAddPlaceholder(pseudoIframe,uniqueID);const tiktokScript=document.querySelector('script[src*="tiktok.com/embed.js"]');tiktokScript&&tiktokScript.remove(),node.remove(),_wccStore._backupNodes.push({position:"body",node:node.cloneNode(!0),uniqueID:uniqueID});continue}if(1===node.nodeType&&node.classList.contains("elementor-video")){const widgetContainer=node.closest(".elementor-widget-video");if(!widgetContainer)continue;const settings=widgetContainer.getAttribute("data-settings");if(!settings)continue;try{const parsed=JSON.parse(settings.replace(/&quot;/g,'"')),ytMatch=parsed.youtube_url.match(/(?:youtu\.be\/|youtube\.com\/(?:watch\?v=|embed\/))([\w-]{11})/);if(!ytMatch)continue;const videoId=ytMatch[1],uniqueID=ref._wccRandomString(8,!1),realIframe=document.createElement("iframe");realIframe.src=`https://www.youtube.com/embed/${videoId}`,realIframe.width=widgetContainer.offsetWidth||560,realIframe.height=widgetContainer.offsetHeight||315,realIframe.frameBorder=0,realIframe.allowFullscreen=!0,realIframe.setAttribute("allow","accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture");const pseudoIframe={nodeName:"iframe",src:realIframe.src,offsetWidth:realIframe.width,offsetHeight:realIframe.height,insertAdjacentHTML:function(position,html){node.insertAdjacentHTML(position,html)}},cleanedHostname=_wccCleanHostName("youtube.com");if(_wccAddProviderToList(node,cleanedHostname),!_wccShouldBlockProvider(cleanedHostname))continue;_wccAddPlaceholder(pseudoIframe,uniqueID),node.remove(),_wccStore._backupNodes.push({position:"body",node:realIframe.cloneNode(!0),uniqueID:uniqueID})}catch(e){console.error("Error processing Elementor YouTube video:",e)}continue}if(!node.src||!node.nodeName||!["script","iframe"].includes(node.nodeName.toLowerCase()))continue;try{let hostname,pathname,urlToParse=node.src;if(urlToParse.match(/^\/[a-zA-Z0-9]+\/?$/))hostname=window.location.hostname,pathname=urlToParse;else try{const url=new URL(urlToParse.startsWith("//")?`${window.location.protocol}${urlToParse}`:urlToParse.startsWith("/")?`${window.location.origin}${urlToParse}`:urlToParse.match(/^https?:\/\//)?urlToParse:`${window.location.origin}/${urlToParse}`);hostname=url.hostname,pathname=url.pathname}catch(urlError){hostname=window.location.hostname,pathname=urlToParse.startsWith("/")?urlToParse:`/${urlToParse}`}const cleanedHostname=_wccCleanHostName(`${hostname}${pathname}`);if(_wccAddProviderToList(node,cleanedHostname),!_wccShouldBlockProvider(cleanedHostname))continue;const uniqueID=ref._wccRandomString(8,!1);if("iframe"===node.nodeName.toLowerCase())_wccAddPlaceholder(node,uniqueID);else{node.type="javascript/blocked";const scriptEventListener=function(event){event.preventDefault(),node.removeEventListener("beforescriptexecute",scriptEventListener)};node.addEventListener("beforescriptexecute",scriptEventListener)}const position=document.head.compareDocumentPosition(node)&Node.DOCUMENT_POSITION_CONTAINED_BY?"head":"body";node.remove(),_wccStore._backupNodes.push({position:position,node:node.cloneNode(),uniqueID:uniqueID})}catch(error){console.log("Script processing error:",{src:node.src,nodeType:node.nodeName,error:error.message});continue}}catch(error){console.error("Error in mutation observer:",error)}}));function _wccCleanHostName(name){return name.replace(/^www./,"")}function _wccIsCategoryToBeBlocked(category){const cookieValue=ref._wccGetFromStore(category),normalizedLaw=currentLaw.toLowerCase();return"no"===cookieValue||!cookieValue&&_wccStore._categories.some((cat=>cat.slug===category&&!cat.isNecessary&&!cat.defaultConsent[normalizedLaw]))}function _wccShouldBlockProvider(formattedRE){const provider=_wccStore._providersToBlock.find((({re:re})=>{return new RegExp((literal=re,literal.replace(/[.*+?^${}()[\]\\]/g,"\\$&"))).test(formattedRE);var literal}));return provider&&provider.categories.some((category=>_wccIsCategoryToBeBlocked(category)))}function _wccShouldChangeType(element,src){return element.hasAttribute("data-wcc")&&_wccIsCategoryToBeBlocked(element.getAttribute("data-wcc"))||_wccShouldBlockProvider(src||element.src)}function _wccSendConsentEvent(responseCategories,status="initial"){const consentUpdate=new CustomEvent("wcc_consent_update",{detail:{status:status,categories:responseCategories,currentLaw:currentLaw}});document.dispatchEvent(consentUpdate),window.dataLayer&&window.dataLayer.push({event:"wcc_cookie_consent_update",cookie_consent_status:status,cookie_consent_categories:responseCategories})}function _wccFindCheckBoxValue(id=""){return(id?["wccSwitch","wccCategoryDirect"]:["wccCCPAOptOut"]).some((key=>{const checkBox=document.getElementById(`${key}${id}`);return checkBox&&checkBox.checked}))}function _wccAddPlaceholder(htmlElm,uniqueID){const videoPlaceHolderDataCode=_wccStore._bannerConfig[currentLaw].settings.shortcodes.find((code=>"wcc_video_placeholder"===code.key)).content,{offsetWidth:offsetWidth,offsetHeight:offsetHeight}=htmlElm;if(0===offsetWidth||0===offsetHeight)return;htmlElm.insertAdjacentHTML?htmlElm.insertAdjacentHTML("beforebegin",`${videoPlaceHolderDataCode}`.replace("[UNIQUEID]",uniqueID)):document.body.insertAdjacentHTML("beforeend",`${videoPlaceHolderDataCode}`.replace("[UNIQUEID]",uniqueID));const addedNode=document.getElementById(uniqueID);addedNode.style.width=`${offsetWidth}px`,addedNode.style.height=`${offsetHeight}px`;const innerTextElement=document.querySelector(`#${uniqueID} .video-placeholder-text-normal`);innerTextElement.style.display="none";const isTikTok=htmlElm.src.includes("tiktok.com"),youtubeID=!isTikTok&&function(src){const match=src.match(/^.*(youtu\.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/);return!!(match&&Array.isArray(match)&&match[2]&&11===match[2].length)&&match[2]}(htmlElm.src);youtubeID?(addedNode.classList.replace("video-placeholder-normal","video-placeholder-youtube"),addedNode.style.backgroundImage=`linear-gradient(rgba(76,72,72,.7),rgba(76,72,72,.7)),url('https://img.youtube.com/vi/${youtubeID}/maxresdefault.jpg')`,innerTextElement.classList.replace("video-placeholder-text-normal","video-placeholder-text-youtube")):isTikTok&&(addedNode.classList.replace("video-placeholder-text-normal","video-placeholder-tiktok"),innerTextElement.classList.replace("video-placeholder-text-tiktok","video-placeholder-text-normal"))}function _wccGPCEnabled(){return!0===navigator.globalPrivacyControl&&_wccStore._bannerConfig[currentLaw].config.optOption.gpcOption}_nodeListObserver.observe(document.documentElement,{childList:!0,subtree:!0}),window.revisitWccConsent=()=>_revisitWccConsent(),window.getWccConsent=function(){const cookieConsent={currentLaw:"",categories:{},isUserActionCompleted:!1,consentID:"",languageCode:""};try{cookieConsent.currentLaw=_wccGetLaw(),_wccStore._categories.forEach((category=>{cookieConsent.categories[category.slug]="yes"===ref._wccGetFromStore(category.slug)})),cookieConsent.isUserActionCompleted="yes"===ref._wccGetFromStore("action"),cookieConsent.consentID=ref._wccGetFromStore("consentid")||"",cookieConsent.languageCode=_wccStore._language||""}catch(e){}return cookieConsent}}();