var cookieman=function(){"use strict";var e="CookieConsent",t=365,n=document.querySelector("[data-cookieman-form]"),o=document.querySelector("[data-cookieman-settings]"),r=o,i=JSON.parse(o.dataset.cookiemanSettings),c=n.querySelectorAll("[type=checkbox][name]"),a=document.querySelectorAll("[data-cookieman-save]"),u=document.querySelectorAll("[data-cookieman-accept-all]"),d=document.querySelectorAll("[data-cookieman-accept-none]"),l=[],s={};function f(e,t){e.checked=t}function v(){for(var e=0;e<c.length;e++){var t=c[e];t.disabled||f(t,!1)}}function m(e){for(var t=p(),n=0;n<t.length;n++)if(t[n]===e)return!0;return!1}function h(){var t=Cookies.get(e);return t?t.split("|"):[]}function p(){return h().filter(function(e){var t=i.groups[e];return void 0!==t&&(!t.respectDnt||"1"!==window.navigator.doNotTrack)})}function g(n){n.preventDefault(),function(){for(var n=[],o=0;o<c.length;o++)c[o].checked&&n.push(c[o].name);Cookies.set(e,n.join("|"),{expires:t})}(),cookieman.hide(),function(){for(var e in i.groups)if(Object.prototype.hasOwnProperty.call(i.groups,e)&&!m(e))for(var t=i.groups[e],n=0;n<t.trackingObjects.length;n++){var o=t.trackingObjects[n];y(o,i.trackingObjects[o])}}(),E()}function k(e){e.preventDefault(),function(){for(var e=0;e<c.length;e++)f(c[e],!0)}()}function b(e){e.preventDefault(),v()}function w(e,t){if(void 0!==t.inject){var n,o=document.createElement("div");o.innerHTML=t.inject;for(var r=0,i=0;i<o.children.length;i++){var c=o.children[i];if("SCRIPT"===c.tagName){(n=document.createElement("script")).textContent=c.textContent;for(var a=0;a<c.attributes.length;a++){var u=c.attributes[a];n.setAttribute(u.name,u.value)}n.addEventListener("load",function(e,t,n,o){return function(r){void 0===s[n]&&(s[n]=[]),s[n].push(t),O("scriptLoaded",{detail:{trackingObjectKey:n,trackingObjectSettings:o,scriptId:t,node:e}})}}(n,r++,e,t)),c=n}else i--;document.body.appendChild(c)}l.push(e)}}function y(e,t){for(var n in t.show){if(Object.prototype.hasOwnProperty.call(t.show,n))C(n,t.show[n])}}function C(e,t){return"cookie_http+html"===t.type&&(Cookies.remove(e),!0)}function E(){for(var e=p(),t=0;t<e.length;t++)for(var n=i.groups[e[t]],o=0;o<n.trackingObjects.length;o++){var r=n.trackingObjects[o];-1===l.indexOf(r)&&w(r,i.trackingObjects[r])}}function O(e,t){"function"!=typeof window.CustomEvent&&(window.CustomEvent=function(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n},window.CustomEvent.prototype=window.Event.prototype),r.dispatchEvent(new window.CustomEvent(e,t))}return function(){for(var t=0;t<u.length;t++)u[t].addEventListener("click",k);for(t=0;t<d.length;t++)d[t].addEventListener("click",b);for(t=0;t<a.length;t++)a[t].addEventListener("click",g);!function(){if(void 0!==Cookies.get(e)){var t=h();v();for(var o=0;o<t.length;o++){var r=n.querySelector("[name="+t[o]+"]");r&&f(r,!0)}}}(),function(){if("1"===window.navigator.doNotTrack)for(var e=document.querySelectorAll("[data-cookieman-dnt]"),t=0;t<e.length;t++)e[t].innerHTML=n.dataset.cookiemanDntEnabled}(),E()}(),{show:function(){console.error("Your theme should implement function cookieman.show()")},hide:function(){console.error("Your theme should implement function cookieman.hide()")},showOnce:function(){void 0===Cookies.get(e)&&cookieman.show()},hasConsented:m,consenteds:p,onScriptLoaded:function(e,t,n){void 0===s[e]&&(s[e]=[]),-1===s[e].indexOf(t)?r.addEventListener("scriptLoaded",function(o){o.detail.trackingObjectKey===e&&o.detail.scriptId===t&&n(o.detail.trackingObjectKey,o.detail.scriptId)}):n(e,t)},eventsEl:r}}();