class WPConsentIntegration{static purposeMappings={1:["functional"],2:["preferences"],3:["preferences"],4:["statistics","statistics-anonymous"],5:["marketing"]};static applyGeneralConsent(e){let t=Object.values(WPConsentIntegration.purposeMappings).reduce(function(n,e){return n.concat(e)},[]);t.filter(function(n,e){return t.indexOf(n)===e}).forEach(function(n){"functional"!==n||e?wp_set_consent(n,e?"allow":"deny"):wp_set_consent(n,"allow")})}static applySpecificConsents(t){let o={};Object.keys(t.purposes).forEach(function(n){var e=t.purposes[n],n=WPConsentIntegration.purposeMappings[n];e||n.forEach(function(n){"functional"!==n&&(o[n]="deny")})}),Object.keys(t.purposes).forEach(function(n){var e=t.purposes[n],n=WPConsentIntegration.purposeMappings[n];e&&n.forEach(function(n){o[n]="allow"})}),Object.keys(o).forEach(function(n){var e=o[n];wp_set_consent(n,e)})}iubPreferenceExpressedHandler(n){try{"function"==typeof window.iubOriginalPreferenceExpressedCallback&&window.iubOriginalPreferenceExpressedCallback(),"function"==typeof wp_set_consent&&(n?"object"==typeof n&&("consent"in n&&void 0===n.consent?(window.wp_consent_type=window.wp_fallback_consent_type="optout",WPConsentIntegration.applyGeneralConsent(!0)):"consent"in n&&"boolean"==typeof n.consent?WPConsentIntegration.applyGeneralConsent(n.consent):WPConsentIntegration.applySpecificConsents(n)):(window.wp_consent_type=window.wp_fallback_consent_type="optout",WPConsentIntegration.applyGeneralConsent(!0)))}catch(n){}}initialize(){if("undefined"!=typeof _iub&&void 0!==_iub.csConfiguration){_iub.csConfiguration.callback=_iub.csConfiguration.callback||{};var e,t="onPreferenceExpressedOrNotNeeded";let n="";t in _iub.csConfiguration.callback&&("function"==typeof(e=_iub.csConfiguration.callback[t])?n=e:"string"==typeof e&&"function"==typeof window[e]&&(n=window[e])),_iub.csConfiguration.callback[t]=this.iubPreferenceExpressedHandler,window.iubOriginalPreferenceExpressedCallback=n}}}let wpConsentIntegration=new WPConsentIntegration;wpConsentIntegration.initialize();