!function(e){window.BorlabsCookie=function(){"use strict";function o(e,o){if(o){var t=o.querySelectorAll('a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])'),n=Array.from(t).filter((function(e){return 0!==e.offsetHeight})),i=n[0],a=n[n.length-1],c=9,s;("Tab"===e.key||9===e.keyCode)&&(e.shiftKey?document.activeElement===i&&(e.preventDefault(),a.focus()):document.activeElement===a&&(e.preventDefault(),i.focus()))}}function t(e){e.addEventListener("keydown",(function(t){return o(t,e)}),!0)}function n(e){e.removeEventListener("keydown",(function(t){return o(t,e)}),!0)}var i="data-cookie-accordion",a="data-cookie-accordion-parent",c="data-cookie-accordion-status",s="data-cookie-accordion-target",r="#BorlabsCookieBox input[type='checkbox']",l="#BorlabsCookieBox",d="#BorlabsCookieBoxWrap",u="data-borlabs-cookie-group",b="#BorlabsCookieBox input[type='checkbox'][name='cookieGroup[]']",h="data-cookie-accept",k="data-cookie-accept-all",p="data-cookie-back",f="data-cookie-individual",v="data-cookie-refuse",m="data-borlabs-cookie-preference",g=".borlabs-cookie-preference",x="data-borlabs-cookie-switch",y="._brlbs-btn-switch-status",C="data-borlabs-cookie-unblock",w="data-borlabs-cookie-type",L="data-borlabs-cookie-id",_="data-borlabs-script-blocker-id",B="data-borlabs-script-blocker-js-handle",S="input[type='checkbox'][name='unblockAll']",O="data-borlabs-cookie-uid",j="data-borlabs-cookie-consent-history",I=".BorlabsCookie",T,D,A={},U={},E={},P={},H={scriptBlockerId:{},jsHandle:{}},N=!1,R={consents:{},expires:null,uid:null,version:null},G="borlabs-cookie",J={consentSaved:null,codeUnblocked:null,codeUnblockedAfterConsent:null},M=function(o,t,n,i){return"about:blank"!==window.location.href&&(T=e.extend({ajaxURL:"",language:"en",animation:"1",animationDelay:"",animationIn:"fadeIn",animationOut:"fadeOut",blockContent:"",boxLayout:"box",boxLayoutAdvanced:"0",automaticCookieDomainAndPath:"",cookieDomain:"",cookiePath:"",cookieLifetime:"365",crossDomainCookie:[],cookieBeforeConsent:"",cookiesForBots:"1",cookieVersion:"1",hideCookieBoxOnPages:[],respectDoNotTrack:"",reloadAfterConsent:"",showCookieBox:"1",cookieBoxIntegration:"javascript",ignorePreSelectStatus:"1",cookies:[]},o),D=i,A=t,U=n,J.consentSaved=document.createEvent("Event"),J.consentSaved.initEvent("borlabs-cookie-consent-saved",!0,!0),J.codeUnblocked=document.createEvent("Event"),J.codeUnblocked.initEvent("borlabs-cookie-code-unblocked",!0,!0),J.codeUnblockedAfterConsent=document.createEvent("Event"),J.codeUnblockedAfterConsent.initEvent("borlabs-cookie-code-unblocked-after-consent",!0,!0),ne(),Ie(),null===R.uid&&(R.uid=be()),T.cookieBeforeConsent&&"function"==typeof Object&&(void 0===Object.entries&&(Object.entries=function(e){for(var o=Object.keys(e),t=o.length,n=new Array(t);t--;)n[t]=[o[t],e[o[t]]];return n}),0===Object.entries(R.consents).length&&_e()),z(),e(document).on("click","["+C+"]",ve),e(document).on("click","["+m+"]",F),e(document).on("click",g,F),e(document).on("change","["+x+"]",Y),e(document).on("keydown",(function(o){9===o.keyCode&&e(I).addClass("_brlbs-keyboard")})),e(document).on("mousedown",(function(o){e(I).is(":visible")&&e(I).removeClass("_brlbs-keyboard")})),e("body").on("focus",I+"._brlbs-keyboard input[type='checkbox']",(function(o){var t=e(o.currentTarget).closest("label");t&&e(t).addClass("_brlbs-focused")})),e(I).on("blur","input[type='checkbox']",(function(o){var t=e(o.currentTarget).closest("label");t&&e(t).removeClass("_brlbs-focused")})),e("["+j+"]").length&&Be(),Oe(),e("["+O+"]").length&&e("["+O+"]").each((function(){e(this).html(R.uid)})),!0)},z=function(){e(d).length&&"SCRIPT"===e(d)[0].tagName&&e(d).after(e(d).html()),e(document).on("click","["+h+"]",(function(e){e.preventDefault(),ee(),$()})),e(document).on("click","["+k+"]",(function(e){e.preventDefault(),Q()})),e(document).on("click","["+p+"]",(function(e){e.preventDefault(),V()})),e(document).on("click","["+f+"]",(function(e){e.preventDefault(),W()})),e(document).on("click","["+v+"]",(function(o){o.preventDefault();var t=[];e(b+":checked").each((function(){-1===t.indexOf(this.value)&&(e(this).trigger("click"),t.push(this.value))})),ee(),$()})),K(),Z(),X(),!0===oe()?(he(),ke(),pe(),document.dispatchEvent(J.codeUnblocked)):T.showCookieBox&&(0===T.hideCookieBoxOnPages.length||-1===T.hideCookieBoxOnPages.indexOf(window.location.protocol+"//"+window.location.hostname+window.location.pathname)?T.cookiesForBots&&/bot|googlebot|crawler|spider|robot|crawling|lighthouse/i.test(navigator.userAgent.toLowerCase())?(ie(T.cookies,!1),he(),ke(),pe(),document.dispatchEvent(J.codeUnblocked)):T.respectDoNotTrack&&void 0!==navigator.doNotTrack&&"1"===navigator.doNotTrack?(ie({essential:T.cookies.essential},!1),he(),ke(),pe(),document.dispatchEvent(J.codeUnblocked)):q(!0):(he(),ke(),pe(),document.dispatchEvent(J.codeUnblocked)))},q=function(o){e("body").addClass("borlabs-position-fix"),t(document.querySelector(".cookie-box")),void 0===o&&(o=!1);var n=e(b),i=null;return Object.keys(R.consents).length?(e("["+u+"]").each((function(){-1===Object.keys(R.consents).indexOf(this.dataset.borlabsCookieGroup)&&e(this).addClass("borlabs-hide")})),n.length&&"1"===T.boxLayoutAdvanced&&n.each((function(){i=this.value,"string"==typeof this.dataset.borlabsCookieCheckbox&&("object"==typeof R.consents[i]?e(this).prop("checked",!0):e(this).prop("checked",!1))}))):n.length&&n.each((function(){i=this.value,"1"===T.boxLayoutAdvanced&&"1"===T.ignorePreSelectStatus&&!1===N&&"essential"!==i&&(e(this).prop("checked",!1),e(r+"[name='cookies["+i+"][]']").prop("checked",!1).change())})),T.blockContent?(e(l+" > div").addClass("_brlbs-block-content"),T.animation?(e(l+" > div").addClass("_brlbs-bg-animation"),setTimeout((function(){e(l+" > div").addClass("_brlbs-bg-dark")}),25)):e(l+" > div").addClass("_brlbs-bg-dark")):e("._brlbs-"+T.boxLayout+"-wrap").addClass("_brlbs-position-fixed"),e(l+" > div").css("display",""),e(l+" > div").addClass("show-cookie-box"),T.animation&&e(l+" ._brlbs-"+T.boxLayout).addClass("animated "+T.animationIn+(o&&T.animationDelay?" delay-1s":"")),e("#CookieBoxSaveButton")[0].focus(),!0},$=function(){return n(document.querySelector(".cookie-box")),T.animation&&(e(l+" ._brlbs-"+T.boxLayout).removeClass("delay-1s "),e(l+" ._brlbs-"+T.boxLayout).removeClass(T.animationIn),e(l+" ._brlbs-"+T.boxLayout).addClass(T.animationOut)),e(l+" > div").addClass("borlabs-hide"),T.blockContent?e(l+" > div").removeClass("_brlbs-bg-dark"):e("._brlbs-"+T.boxLayout+"-wrap").addClass("_brlbs-position-fixed"),setTimeout((function(){e("._brlbs-"+T.boxLayout+"-wrap").removeAttr("style"),e("._brlbs-"+T.boxLayout+" .cookie-box .container").removeAttr("style"),e("._brlbs-"+T.boxLayout+" .cookie-preference .container").removeAttr("style"),T.animation&&(e("._brlbs-"+T.boxLayout).removeClass("animated"),e("._brlbs-"+T.boxLayout).removeClass("delay-1s"),e("._brlbs-"+T.boxLayout).removeClass(T.animationIn),e("._brlbs-"+T.boxLayout).removeClass(T.animationOut)),e(l+" > div").removeClass("show-cookie-box"),T.blockContent&&e(l+" > div").removeClass("_brlbs-block-content")}),T.animation?1e3:0),e("body").removeClass("borlabs-position-fix"),!0},W=function(){n(document.querySelector(".cookie-box")),t(document.querySelector(".cookie-preference"));var o=e(b),i=null,a=null;o.length&&o.each((function(){i=this.value,Object.keys(R.consents).length?!1===N&&(void 0!==R.consents[i]?(e(this).prop("checked",!0),e(this).change(),(a=e(r+"[name='cookies["+i+"][]']")).each((function(){-1!==R.consents[i].indexOf(this.value)?e(this).prop("checked",!0):e(this).prop("checked",!1),e(this).change()}))):(e(this).prop("checked",!1),e(this).change(),e(r+"[name='cookies["+i+"][]']").prop("checked",!1).change())):("1"===T.ignorePreSelectStatus&&!1===N&&(e(this).prop("checked",!1),e(l+" ["+u+"='"+this.value+"']").addClass("borlabs-hide")),e(this).change(),(a=e(r+"[name='cookies["+i+"][]']")).each((function(){"1"===T.ignorePreSelectStatus&&!1===N&&e(this).prop("checked",!1),e(this).change()})))})),e("._brlbs-"+T.boxLayout+" .cookie-box .container").animate({height:0,opacity:0},(function(){e("._brlbs-"+T.boxLayout+" .cookie-box").attr("aria-hidden",!0),e("._brlbs-"+T.boxLayout+" .cookie-preference").attr("aria-hidden",!1),e("#CookiePrefSave")[0].focus(),e("._brlbs-"+T.boxLayout+"-wrap").animate({width:"100vw",maxWidth:"box"===T.boxLayout?"768px":"100%"},"box"===T.boxLayout?400:0,(function(){var o=e("._brlbs-"+T.boxLayout+" .cookie-preference .container")[0].scrollHeight;e("._brlbs-"+T.boxLayout+" .cookie-preference .container").animate({height:"80vh",maxHeight:o,opacity:1})}))}))},V=function(){n(document.querySelector(".cookie-preference")),e("._brlbs-"+T.boxLayout+" .cookie-preference .container").animate({height:0,opacity:0},(function(){e("._brlbs-"+T.boxLayout+" .cookie-box").attr("aria-hidden",!1),e("._brlbs-"+T.boxLayout+" .cookie-preference").attr("aria-hidden",!0),e("._brlbs-"+T.boxLayout+"-wrap").animate({maxWidth:"box"===T.boxLayout?"375px":"100%"},"box"===T.boxLayout?400:0,(function(){var o=e("._brlbs-"+T.boxLayout+" .cookie-box .container")[0].scrollHeight+"px";e("._brlbs-"+T.boxLayout+" .cookie-box .container").animate({height:o,opacity:1})})),e("#CookieBoxSaveButton")[0].focus()}))},F=function(o){return void 0!==o&&o.preventDefault(),e("._brlbs-"+T.boxLayout+" .cookie-preference .container a["+p+"]").css("display","none"),e("._brlbs-"+T.boxLayout+" .cookie-preference .container a["+p+"] + span._brlbs-separator").css("display","none"),e("._brlbs-"+T.boxLayout+" .cookie-box .container").css("height",0),e("._brlbs-"+T.boxLayout+" .cookie-box .container").css("opacity",0),e("._brlbs-"+T.boxLayout+"-wrap").css({width:"100vw",maxWidth:"box"===T.boxLayout?"768px":"100%"}),q(!1),setTimeout((function(){W()}),500),!0},K=function(){e("["+i+"]").on("click","["+s+"]",(function(){var o=e(this).closest("["+i+"]");o.find("["+a+"]:visible").length&&(o.find("["+c+"='hide']").addClass("borlabs-hide"),o.find("["+c+"='show']").removeClass("borlabs-hide"),o.find("["+a+"]:visible").slideUp()),o.find("["+a+"='"+this.dataset.cookieAccordionTarget+"']:hidden").length&&(e(this).children("["+c+"='show']").addClass("borlabs-hide"),e(this).children("["+c+"='hide']").removeClass("borlabs-hide"),o.find("["+a+"='"+this.dataset.cookieAccordionTarget+"']").slideDown())}))},Q=function(){var o=e(b),t=null,n=null;o.length&&o.each((function(){t=this.value,e(this).prop("checked",!0),e(this).change(),(n=e(r+"[name='cookies["+t+"][]']")).each((function(){e(this).prop("checked",!0),e(this).change()}))})),ee(),$()},Z=function(){e(document).on("click",b,(function(){N=!0,this.checked?(e(r+"[name='cookies["+this.value+"][]']").prop("checked",!0).change(),e(b+"[value='"+this.value+"']").prop("checked",!0),e(l+" ["+u+"='"+this.value+"']").length&&e(l+" ["+u+"='"+this.value+"']").removeClass("borlabs-hide")):(e(r+"[name='cookies["+this.value+"][]']").prop("checked",!1).change(),e(b+"[value='"+this.value+"']").prop("checked",!1),e(l+" ["+u+"='"+this.value+"']").length&&e(l+" ["+u+"='"+this.value+"']").addClass("borlabs-hide"))}))},X=function(){e(document).on("click",r+"[name^='cookies']",(function(){N=!0,this.checked&&(e(b+"[value='"+this.dataset.cookieGroup+"']").prop("checked",!0).change(),e(l+" ["+u+"='"+this.dataset.cookieGroup+"']").length&&e(l+" ["+u+"='"+this.dataset.cookieGroup+"']").removeClass("borlabs-hide"))}))},Y=function(){!0===this.checked?(e(this).parent().parent().children(y).children().last().css("display","none"),e(this).parent().parent().children(y).children().first().css("display","inline-block")):(e(this).parent().parent().children(y).children().first().css("display","none"),e(this).parent().parent().children(y).children().last().css("display","inline-block"))},ee=function(){var o={essential:T.cookies.essential},t=e(b+":checked"),n=e(r+"[name^='cookies']:checked");if(t.length&&(t.each((function(){this.value.length&&new RegExp(/^[a-z-_]{3,}$/).test(this.value)&&"essential"!==this.value&&(o[this.value]=[])})),n.length&&n.each((function(){this.value.length&&"string"==typeof this.dataset.cookieGroup&&new RegExp(/^[a-z-_]{3,}$/).test(this.value)&&new RegExp(/^[a-z-_]{3,}$/).test(this.dataset.cookieGroup)&&o[this.dataset.cookieGroup].push(this.value)}))),Object.keys(R.consents).length)for(var i in R.consents)if(void 0!==o[i])for(var a in R.consents[i])-1===o[i].indexOf(R.consents[i][a])&&fe(i,R.consents[i][a]);else if(void 0!==A[i])for(var c in A[i])fe(i,c);ie(o,!1),"1"!==T.reloadAfterConsent&&(he(),ke(),pe(),document.dispatchEvent(J.codeUnblockedAfterConsent),document.dispatchEvent(J.codeUnblocked))},oe=function(){var e=!1;return"string"==typeof R.version&&(R.version===T.cookieVersion?e=!0:R.consents={}),e},te=function(e,o){var t={name:"",value:""};if(void 0===o&&(o=!1),o&&(e=e.replace("*","")),document.cookie.length)for(var n=document.cookie.split(";"),i=0;i0&&location.reload(!0)}))},Be=function(){e.ajax(T.ajaxURL,{type:"POST",data:{action:"borlabs_cookie_handler",type:"consent_history",language:T.language,uid:R.uid}}).done((function(o){(o=e.parseJSON(o)).length&&e.each(o,(function(o,t){e("["+j+"] table").append(""+t.stamp+""+t.version+""+t.consent+"")}))}))},Se=function(){if(T.crossDomainCookie.length)for(var o in T.crossDomainCookie){var t=T.crossDomainCookie[o];e("body").append('')}},Oe=function(){e(I+" [name^='borlabsCookie']").each((function(){de(this.value)?this.checked=!0:this.checked=!1,e(this).change()})),e(document).on("change",I+" [name^='borlabsCookie']",(function(){this.checked?re(this.dataset.cookieGroup,this.value):le(this.dataset.cookieGroup,this.value)}))},je,Ie=function(){if(Object.keys(A).length)for(var e in A)if(Object.keys(A[e]).length)for(var o in A[e])if(void 0!==A[e][o].settings&&void 0!==A[e][o].settings.blockCookiesBeforeConsent&&"1"===A[e][o].settings.blockCookiesBeforeConsent&&void 0!==A[e][o].cookieNameList&&!1===de(o))for(var t in A[e][o].cookieNameList)ae(t,null,-1!==t.indexOf("*"))},Te;return{addConsent:re,allocateScriptBlockerToContentBlocker:function(e,o,t){"scriptBlockerId"!==t&&"jsHandle"!==t||(void 0===P[e]&&(P[e]={scriptBlockerId:[],jsHandle:[]}),-1===P[e][t].indexOf(o)&&P[e][t].push(o))},callWhenLoaded:function(e,o){var t=function(){!0===window.hasOwnProperty(e)?o(o):window.setTimeout(t,1e3)};t()},checkCookieConsent:de,checkCookieGroupConsent:function(e){var o=!1;return void 0!==R.consents[e]&&(o=!0),o},deleteCookie:ae,getCookie:ne,hideCookieBox:$,init:M,initConsentHistoryTable:Be,initSwitchConsentButtonStatus:Oe,openCookiePreference:F,removeConsent:le,showCookieBox:q,unblockContentId:function(o){e("["+w+"='content-blocker']["+L+"='"+o+"']").each((function(){me(e(this).parents(".BorlabsCookie"))}))},unblockScriptBlockerId:xe,unblockScriptBlockerJSHandle:ye}}()}(jQuery);