function ctSetCookie(e,t,n){var o;("string"==typeof e&&"string"==typeof t||"number"==typeof t)&&(o="ct_pointer_data"===e||"ct_user_info"===e,e=[[e,t,n]]),0==+ctPublic.data__set_cookies||(1==+ctPublic.data__set_cookies?e.forEach(function(e,t,n){var o=void 0!==e[2]?"expires="+o+"; ":"",i="https:"===location.protocol?"; secure":"";document.cookie=e[0]+"="+encodeURIComponent(e[1])+"; "+o+"path=/; samesite=lax"+i}):2!=+ctPublic.data__set_cookies||o||(1==+ctPublic.data__set_cookies__alt_sessions_type?apbct_public_sendREST("alt_sessions",{method:"POST",data:{cookies:e}}):2==+ctPublic.data__set_cookies__alt_sessions_type&&apbct_public_sendAJAX({action:"apbct_alt_session__save__AJAX",cookies:e},{apbct_ajax:1,notJson:1})))}function apbct_collect_visible_fields(e){var t,n=[],o="",i=0,c="",l=0,a=[];for(t in e.elements)isNaN(+t)||(n[t]=e.elements[t]);return(n=n.filter(function(e){return-1===a.indexOf(e.getAttribute("name"))&&(-1===["radio","checkbox"].indexOf(e.getAttribute("type"))||(a.push(e.getAttribute("name")),!1))})).forEach(function(e,t,n){"submit"!==e.getAttribute("type")&&null!==e.getAttribute("name")&&"ct_checkjs"!==e.getAttribute("name")&&("none"!==getComputedStyle(e).display&&"hidden"!==getComputedStyle(e).visibility&&"0"!==getComputedStyle(e).opacity&&"hidden"!==e.getAttribute("type")||e.classList.contains("wp-editor-area")?(o+=" "+e.getAttribute("name"),i++):(c+=" "+e.getAttribute("name"),l++))}),c=c.trim(),{visible_fields:o=o.trim(),visible_fields_count:i,invisible_fields:c,invisible_fields_count:l}}function apbct_visible_fields_set_cookie(e){e="object"==typeof e&&null!==e?e:{};ctSetCookie("apbct_visible_fields",JSON.stringify(e))}function apbct_js_keys__set_input_value(e,t,n,o){if(0<document.querySelectorAll("[name^=ct_checkjs]").length)for(var i=document.querySelectorAll("[name^=ct_checkjs]"),c=0;c<i.length;c++)i[c].value=e.js_key}function apbct_public_sendAJAX(t,n,o){var i=n.callback||null,c=n.callback_context||null,l=n.callback_params||null,e=n.async||!0,a=n.notJson||null,s=n.timeout||15e3,o=o||null,r=n.button||null,u=n.spinner||null,_=n.progressbar||null,d=n.silent||null,p=n.no_nonce||null,m=n.apbct_ajax||null;"string"==typeof t?t=(t=!p?t+"&_ajax_nonce="+ctPublic._ajax_nonce:t)+"&no_cache="+Math.random():(p||(t._ajax_nonce=ctPublic._ajax_nonce),t.no_cache=Math.random()),r&&(r.setAttribute("disabled","disabled"),r.style.cursor="not-allowed"),u&&jQuery(u).css("display","inline"),jQuery.ajax({type:"POST",url:m?ctPublic._apbct_ajax_url:ctPublic._ajax_url,data:t,async:e,success:function(e){r&&(r.removeAttribute("disabled"),r.style.cursor="pointer"),u&&jQuery(u).css("display","none"),(e=!a?JSON.parse(e):e).error?(setTimeout(function(){_&&_.fadeOut("slow")},1e3),console.log("Error happens: "+(e.error||"Unkown"))):i&&(l?i.apply(c,l.concat(e,t,n,o)):i(e,t,n,o))},error:function(e,t,n){r&&(r.removeAttribute("disabled"),r.style.cursor="pointer"),u&&jQuery(u).css("display","none"),n&&!d&&(console.log("APBCT_AJAX_ERROR"),console.log(e),console.log(t),console.log("Anti-spam by Cleantalk plugin error: "+n+"Please, contact Cleantalk tech support https://wordpress.org/support/plugin/cleantalk-spam-protect/"))},timeout:s})}function apbct_public_sendREST(t,n){var o=n.callback||null,e=n.data||[],i=n.method||"POST";jQuery.ajax({type:i,url:ctPublic._rest_url+"cleantalk-antispam/v1/"+t,data:e,beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",ctPublic._rest_nonce)},success:function(e){e.error?console.log("Error happens: "+(e.error||"Unknown")):o&&o(e,t,n,null)},error:function(e,t,n){n&&(console.log("APBCT_REST_ERROR"),console.log(e),console.log(t),console.log("Anti-spam by Cleantalk plugin REST API error: "+n+" Please, contact Cleantalk tech support https://wordpress.org/support/plugin/cleantalk-spam-protect/"))}})}function apbctGetScreenInfo(){return JSON.stringify({fullWidth:document.documentElement.scrollWidth,fullHeight:Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight),visibleWidth:document.documentElement.clientWidth,visibleHeight:document.documentElement.clientHeight})}!function(){var e=new Date,t=(new Date).getTime(),n=!0,o=[],i=0,c={},l=!1;function a(e,t,n){"function"==typeof window.addEventListener?e.addEventListener(t,n):e.attachEvent(t,n)}function s(e,t,n){"function"==typeof window.removeEventListener?e.removeEventListener(t,n):e.detachEvent(t,n)}ctSetCookie([["ct_ps_timestamp",Math.floor((new Date).getTime()/1e3)],["ct_fkp_timestamp","0"],["ct_pointer_data","0"],["ct_timezone",e.getTimezoneOffset()/60*-1],["apbct_visible_fields","0"]]);var r=function(e){ctSetCookie("ct_fkp_timestamp",Math.floor((new Date).getTime()/1e3)),s(window,"mousedown",r),s(window,"keydown",r)},u=setInterval(function(){n=!0},150),_=setInterval(function(){ctSetCookie("ct_pointer_data",JSON.stringify(o))},1200),d=function(e){!0===n&&(o.push([Math.round(e.clientY),Math.round(e.clientX),Math.round((new Date).getTime()-t)]),n=!1,50<=++i&&(s(window,"mousemove",d),clearInterval(u),clearInterval(_)))};function p(e){var t=e.target.value;!t||t in c||apbct_public_sendAJAX({action:"apbct_email_check_before_post",data:{email:t}},{apbct_ajax:1,callback:function(e){e.result&&(c[t]={result:e.result,timestamp:Date.now()/1e3|0},ctSetCookie("ct_checked_emails",JSON.stringify(c)))}})}a(window,"mousemove",d),a(window,"mousedown",r),a(window,"keydown",r),a(window,"scroll",function(){l||(ctSetCookie("ct_has_scrolled",JSON.stringify(!0)),l=!0)}),a(window,"DOMContentLoaded",function(){+ctPublic.pixel__setting&&(ctSetCookie("apbct_pixel_url",ctPublic.pixel__url),+ctPublic.pixel__enabled&&jQuery("body").append('<img style="display: none; left: 99999px;" src="'+ctPublic.pixel__url+'">')),+ctPublic.data__email_check_before_post&&(ctSetCookie("ct_checked_emails","0"),jQuery("input[type = 'email'], #email").blur(p)),ctSetCookie("ct_screen_info",apbctGetScreenInfo()),ctSetCookie("ct_has_scrolled",JSON.stringify(!1)),setTimeout(function(){for(var e={},t=0;t<document.forms.length;t++){var n=document.forms[t];n.classList.contains("slp_search_form")||n.parentElement.classList.contains("mec-booking")||-1!==n.action.toString().indexOf("activehosted.com")||n.id&&"caspioform"==n.id||n.name.classList&&n.name.classList.contains("tinkoffPayRow")||n.name.classList&&n.name.classList.contains("give-form")||(e[t]=apbct_collect_visible_fields(n),n.onsubmit_prev=n.onsubmit,n.onsubmit=function(e){var t={};t[0]=apbct_collect_visible_fields(this),apbct_visible_fields_set_cookie(t),e.target.onsubmit_prev instanceof Function&&setTimeout(function(){e.target.onsubmit_prev.call(e.target,e)},500)})}apbct_visible_fields_set_cookie(e)},1e3)})}(),"undefined"!=typeof jQuery&&jQuery(document).ajaxComplete(function(e,t,n){!t.responseText||-1===t.responseText.indexOf('"apbct')||void 0!==(t=JSON.parse(t.responseText)).apbct&&(t=t.apbct).blocked&&(document.dispatchEvent(new CustomEvent("apbctAjaxBockAlert",{bubbles:!0,detail:{message:t.comment}})),cleantalkModal.loaded=t.comment,cleantalkModal.open(),1==+t.stop_script&&window.stop())})