!function(){var e={215(e,t,n){var o,c;
/*!
 * JavaScript Cookie v2.2.1
 * https://github.com/js-cookie/js-cookie
 *
 * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
 * Released under the MIT license
 */!function(i){if(void 0===(c="function"==typeof(o=i)?o.call(t,n,t,e):o)||(e.exports=c),e.exports=i(),!!0){var r=window.Cookies,a=window.Cookies=i();a.noConflict=function(){return window.Cookies=r,a}}}(function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var o in n)t[o]=n[o]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function n(o){function c(){}function i(t,n,i){if("undefined"!=typeof document){"number"==typeof(i=e({path:"/"},c.defaults,i)).expires&&(i.expires=new Date(1*new Date+864e5*i.expires)),i.expires=i.expires?i.expires.toUTCString():"";try{var r=JSON.stringify(n);/^[\{\[]/.test(r)&&(n=r)}catch(e){}n=o.write?o.write(n,t):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var a="";for(var s in i)i[s]&&(a+="; "+s,!0!==i[s]&&(a+="="+i[s].split(";")[0]));return document.cookie=t+"="+n+a}}function r(e,n){if("undefined"!=typeof document){for(var c={},i=document.cookie?document.cookie.split("; "):[],r=0;r<i.length;r++){var a=i[r].split("="),s=a.slice(1).join("=");n||'"'!==s.charAt(0)||(s=s.slice(1,-1));try{var d=t(a[0]);if(s=(o.read||o)(s,d)||t(s),n)try{s=JSON.parse(s)}catch(e){}if(c[d]=s,e===d)break}catch(e){}}return e?c[e]:c}}return c.set=i,c.get=function(e){return r(e,!1)},c.getJSON=function(e){return r(e,!0)},c.remove=function(t,n){i(t,"",e(n,{expires:-1}))},c.defaults={},c.withConverter=n,c}(function(){})})}},t={};function n(o){var c=t[o];if(void 0!==c)return c.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){"use strict";var e=window.ctEvents,t=n.n(e),o=n(215),c=n.n(o),i=window.ctFrontend;const r=function(e){27===e.keyCode&&a(document.querySelector(".cookie-notification"))},a=function(e){document.removeEventListener("keyup",r),e.classList.add("ct-fade-start"),requestAnimationFrame(function(){e.classList.remove("ct-fade-start"),e.classList.add("ct-fade-end"),l(e,function(){e.parentNode.removeChild(e)})})},s={onehour:36e5,oneday:864e5,oneweek:6048e5,onemonth:26784e5,threemonths:80352e5,sixmonths:160704e5,oneyear:31536e6,forever:864e9},d=function(){const e=document.querySelector(".cookie-notification");var t;t=e,document.addEventListener("keyup",r),requestAnimationFrame(function(){t.classList.remove("ct-fade-in-start"),t.classList.add("ct-fade-in-end"),l(t,function(){t.classList.remove("ct-fade-in-end")})}),[...e.querySelectorAll("button")].map(function(t){t.addEventListener("click",function(n){n.preventDefault(),t.classList.contains("ct-cookies-accept-button")&&(c().set("blocksy_cookies_consent_accepted","true",{expires:new Date(1*new Date+s[t.closest("[data-period]").dataset.period]),sameSite:"lax"}),function(){const e=new FormData;e.append("action","blocksy_companion_load_cookies_consent_scripts"),fetch(ct_localizations.ajax_url,{method:"POST",body:e}).then(function(e){return e.json()}).then(function({data:e}){e&&e.scripts&&e.scripts.map(function(e){const t=(new DOMParser).parseFromString(e,"text/html").querySelectorAll("script");t&&[...t].map(function(e){const t=document.createElement("script");e.innerHTML&&(t.innerHTML=e.innerHTML),[...e.attributes].map(function({name:e,value:n}){t.setAttribute(e,n)}),document.head.appendChild(t)})})})}()),t.classList.contains("ct-cookies-decline-button")&&c().set("blocksy_cookies_consent_accepted","no",{expires:new Date(1*new Date+s[t.closest("[data-period]").dataset.period]),sameSite:"lax"}),a(e)})})},u=function(){if(c().get("blocksy_cookies_consent_accepted"))return;const e=document.getElementById("ct-cookies-consent-template");if(!e)return;let t=document.querySelector('.ct-drawer-canvas[data-location="start"]');if(!t){const e=document.createElement("div");e.classList.add("ct-drawer-canvas"),e.setAttribute("data-location","start"),document.querySelector("#main-container").insertAdjacentElement("beforebegin",e),t=e}(0,i.loadStyle)(ct_localizations.dynamic_styles.cookie_notification).then(function(){t.appendChild(e.content.cloneNode(!0)),d()})};var f;function l(e,t){setTimeout(function(){t()},300)}f=function(){u(),t()&&t().on("blocksy:cookies:init",function(){u()})},/comp|inter|loaded/.test(document.readyState)?f():document.addEventListener("DOMContentLoaded",f,!1)}()}();