1class ApbctCore{ajax_parameters={};restParameters={};selector=null;elements=[];eventCallback;eventSelector;event;constructor(e){this.select(e)}select(e){return e instanceof HTMLCollection?(this.selector=null,this.elements=[],this.elements=Array.prototype.slice.call(e)):"object"==typeof e?(this.selector=null,this.elements=[],this.elements[0]=e):"string"==typeof e?(this.selector=e,this.elements=Array.prototype.slice.call(document.querySelectorAll(e))):this.deselect(),this}addElement(e){"object"==typeof e?this.elements.push(e):"string"==typeof e?(this.selector=e,this.elements=Array.prototype.slice.call(document.querySelectorAll(e))):this.deselect()}push(e){this.elements.push(e)}reduce(){this.elements=this.elements.slice(0,-1)}deselect(){this.elements=[]}css(t,o){if(o=o||!1,"object"==typeof t){for(const c in t)if(Object.hasOwn(t,c)){var n=c.replace(/([-_][a-z])/g,e=>e.toUpperCase().replace("-","").replace("_",""));for(let e=0;e<this.elements.length;e++)this.elements[e].style[n]=t[c]}return this}if("string"==typeof t){let e=getComputedStyle(this.elements[0])[t];return void 0===e||o?e:(e=e.replace(/(\d)(em|pt|%|px){1,2}$/,"$1"),e=Number(e)==e?Number(e):e)}}hide(){this.prop("prev-display",this.css("display")),this.css({display:"none"})}show(){this.css({display:this.prop("prev-display")})}addClass(){for(let e=0;e<this.elements.length;e++)this.elements[e].classList.add(className)}removeClass(){for(let e=0;e<this.elements.length;e++)this.elements[e].classList.remove(className)}toggleClass(t){for(let e=0;e<this.elements.length;e++)this.elements[e].classList.toggle(t)}ajax(e){return this.ajax_parameters=e,new ApbctAjax(e)}rest(e){return this.restParameters=e,new ApbctRest(e)}on(...e){this.event=e[0],this.eventCallback=e[2]||e[1],this.eventSelector="string"==typeof e[1]?e[1]:null;for(let e=0;e<this.elements.length;e++)this.elements[e].addEventListener(this.event,null!==this.eventSelector?this.onChecker.bind(this):this.eventCallback)}onChecker(e){if(e.target===document.querySelector(this.eventSelector))return e.stopPropagation(),this.eventCallback(e)}ready(e){document.addEventListener("DOMContentLoaded",e)}change(e){this.on("change",e)}attr(t){let o=[];for(let e=0;e<this.elements.length;e++)this.elements[e][t],o.push(this.elements[e][t]);return 1===o.length?o[0]:o}prop(t,o){if(void 0!==o){for(let e=0;e<this.elements.length;e++)this.elements[e][t]=o;return this}{const n=[];for(let e=0;e<this.elements.length;e++)n.push(this.elements[e][t]);return 1===n.length?n[0]:n}}html(e){return void 0!==e?this.prop("innerHTML",e):this.prop("innerHTML")}val(e){return void 0!==e?this.prop("value",e):this.prop("value")}data(e,t){return void 0!==t?this.prop("apbct-data",e,t):this.prop("apbct-data")}is(e){let t=!1;for(var o of this.elements)t||=this.isElem(o,e);return t}isElem(e,t){let o=!1;return"function"==typeof t&&(o||=t.call(this,e)),"string"==typeof t&&(t.match(/^[a-z]/)&&function(e){e=document.createElement(e).constructor;return!Boolean(~[HTMLElement,HTMLUnknownElement].indexOf(e))}(t)?o||=e.tagName.toLowerCase()===t.toLowerCase():t.match(/^[a-z]/)?o||=Boolean(e[t]):o||=null!==this.selector?null!==document.querySelector(this.selector+t):this.isWithoutSelector(e,t)),o}isWithoutSelector(e,t){var o;let n=!1;for(o of document.querySelectorAll(t))n||=e===o;return n}filter(t){this.selector=null;for(let e=this.elements.length-1;0<=e;e--)this.isElem(this.elements[e],t)||this.elements.splice(Number(e),1);return this}parent(e){return this.select(this.elements[0].parentElement),void 0===e||this.is(e)||this.deselect(),this}parents(e){for(this.select(this.elements[0]);null!==this.elements[this.elements.length-1].parentElement;)this.push(this.elements[this.elements.length-1].parentElement);return this.elements.splice(0,1),void 0!==e&&this.filter(e),this}children(e){return this.select(this.elements[0].children),void 0!==e&&this.filter(e),this}siblings(e){var t=this.elements[0];return this.parent(),this.children(e),this.elements.splice(this.elements.indexOf(t),1),this}remove(){for(var e of this.elements)e.remove()}after(e){for(var t of this.elements)t.after(e)}append(e){for(var t of this.elements)t.append(e)}fadeIn(o){for(let t of this.elements){t.style.opacity=0,t.style.display="block";let e=+new Date;const n=function(){t.style.opacity=+t.style.opacity+(new Date-e)/o,e=+new Date,+t.style.opacity<1&&(window.requestAnimationFrame&&requestAnimationFrame(n)||setTimeout(n,16))};n()}}fadeOut(o){for(let t of this.elements){t.style.opacity=1;let e=+new Date;const n=function(){t.style.opacity=+t.style.opacity-(new Date-e)/o,e=+new Date,0<+t.style.opacity?window.requestAnimationFrame&&requestAnimationFrame(n)||setTimeout(n,16):t.style.display="none"};n()}}}function ctProcessError(e,t){var o={};e&&e.message?o.err={msg:e.message,file:e.fileName||!1,ln:e.lineNumber||lineNo||!1,col:e.columnNumber||columnNo||!1,stacktrace:e.stack||!1,cause:!!t&&JSON.stringify(t),errorObj:error||!1}:(o.err={msg:e},t&&(o.err.file=t)),o.url=window.location.href,o.userAgent=window.navigator.userAgent;let n=localStorage.getItem("ct_js_errors");null===n&&(n="[]"),n=JSON.parse(n);for(let e=0;e<n.length;e++)if(n[e].err.msg===o.err.msg)return;n.push(o),localStorage.setItem(ct_js_errors,JSON.stringify(n))}function apbct(e){return(new ApbctCore).select(e)}1===Math.floor(100*Math.random())&&(window.onerror=function(e,t){var o=["apbct","ctPublic"];let n=o.length;for(;n--;)-1!==e.indexOf(o[n])&&ctProcessError(e,t);return!1});class ApbctXhr{xhr=new XMLHttpRequest;method="POST";url="";async=!0;user=null;password=null;data={};button=null;spinner=null;progressbar=null;context=this;callback=null;onErrorCallback=null;responseType="json";headers={};timeout=15e3;methods_to_convert_data_to_URL=["GET","HEAD"];body=null;http_code=0;status_text="";constructor(e){for(var t in console.log("%cXHR%c started","color: red; font-weight: bold;","color: grey; font-weight: normal;"),e)void 0!==this[t]&&(this[t]=e[t]);if(this.prepare(),Object.keys(this.data).length&&(this.deleteDoubleJSONEncoding(this.data),this.convertData()),!this.url)return console.log("%cXHR%c not URL provided","color: red; font-weight: bold;","color: grey; font-weight: normal;"),!1;this.xhr.open(this.method,this.url,this.async,this.user,this.password),this.setHeaders(),this.xhr.responseType=this.responseType,this.xhr.timeout=this.timeout,this.xhr.onreadystatechange=function(){this.onReadyStateChange()}.bind(this),this.xhr.onload=function(){this.onLoad()}.bind(this),this.xhr.onprogress=function(e){this.onProgress(e)}.bind(this),this.xhr.onerror=function(){this.onError()}.bind(this),this.xhr.ontimeout=function(){this.onTimeout()}.bind(this),this.xhr.send(this.body)}prepare(){this.button&&(this.button.setAttribute("disabled","disabled"),this.button.style.cursor="not-allowed"),this.spinner&&(this.spinner.style.display="inline")}complete(){this.http_code=this.xhr.status,this.status_text=this.xhr.statusText,this.button&&(this.button.removeAttribute("disabled"),this.button.style.cursor="auto"),this.spinner&&(this.spinner.style.display="none"),this.progressbar&&this.progressbar.fadeOut("slow")}onReadyStateChange(){null!==this.on_ready_state_change&&"function"==typeof this.on_ready_state_change&&this.on_ready_state_change()}onProgress(e){null!==this.on_progress&&"function"==typeof this.on_progress&&this.on_progress()}onError(){console.log("error"),this.complete(),this.error(this.http_code,this.status_text),null!==this.onErrorCallback&&"function"==typeof this.onErrorCallback&&this.onErrorCallback(this.status_text)}onTimeout(){this.complete(),this.error(0,"timeout"),null!==this.onErrorCallback&&"function"==typeof this.onErrorCallback&&this.onErrorCallback("Timeout")}onLoad(){if(this.complete(),"json"===this.responseType){if(null===this.xhr.response)return this.error(this.http_code,this.status_text,"No response"),
1!1;if(void 0!==this.xhr.response.error)return this.error(this.http_code,this.status_text,this.xhr.response.error),!1}null!==this.callback&&"function"==typeof this.callback&&this.callback.call(this.context,this.xhr.response,this.data)}error(e,t,o){let n="";"timeout"===t?n+="Server response timeout":200===e?"parsererror"===t?n+="Unexpected response from server. See console for details.":(n+="Unexpected error. Status: "+t+".",void 0!==o&&(n+=" Additional error info: "+o)):n+=500===e?"Internal server error.":"Unexpected response code:"+e,this.errorOutput(n)}errorOutput(e){console.log("%c ctXHR error: %c"+e,"color: red;","color: grey;")}setHeaders(){for(var e in this.headers)void 0!==this.headers[e]&&this.xhr.setRequestHeader(e,this.headers[e])}convertData(){return~this.methods_to_convert_data_to_URL.indexOf(this.method)?this.convertDataToURL():this.convertDataToBody()}convertDataToURL(){var e=new URLSearchParams(this.data).toString(),t=this.url.match(/^(https?:\/{2})?[a-z0-9.]+\?/)?"&":"?";return this.url+=t+e,this.url}convertDataToBody(){for(var e in this.body=new FormData,this.data)Object.hasOwn(this.data,e)&&this.body.append(e,"object"==typeof this.data[e]?JSON.stringify(this.data[e]):this.data[e]);return this.body}deleteDoubleJSONEncoding(e){if("object"==typeof e)for(var t in e){var o;Object.hasOwn(e,t)&&("object"==typeof e[t]&&(e[t]=this.deleteDoubleJSONEncoding(e[t])),"string"==typeof e[t]&&null!==e[t].match(/^[\[{].*?[\]}]$/)&&"object"==typeof(o=JSON.parse(e[t]))&&(e[t]=o))}return e}}class ApbctAjax extends ApbctXhr{constructor(...e){super(e[0])}}class ApbctRest extends ApbctXhr{static default_route=ctPublicFunctions._rest_url+"cleantalk-antispam/v1/";route="";constructor(...e){(e=e[0]).url=ApbctRest.default_route+e.route,e.headers={"X-WP-Nonce":ctPublicFunctions._rest_nonce},super(e)}}function ctSetCookie(e,t,o){let n=["ct_sfw_pass_key","ct_sfw_passed","wordpress_apbct_antibot","apbct_anticrawler_passed","apbct_antiflood_passed","apbct_email_encoder_passed"];var c;if(("string"==typeof e&&"string"==typeof t||"number"==typeof t)&&(c="ct_pointer_data"===e,e=[[e,t,o]]),"none"===ctPublicFunctions.data__cookies_type){let t=[];e.forEach(function(e){-1!==n.indexOf(e[0])?t.push(e):apbctLocalStorage.set(e[0],encodeURIComponent(e[1]))}),0<t.length&&ctSetAlternativeCookie(t),ctPublic.force_alt_cookies?void 0!==c&&c||ctSetAlternativeCookie(e,{forceAltCookies:!0}):ctNoCookieAttachHiddenFieldsToForms()}else"native"===ctPublicFunctions.data__cookies_type?e.forEach(function(e){var t=void 0!==e[2]?"expires="+t+"; ":"",o="https:"===location.protocol?"; secure":"";document.cookie=ctPublicFunctions.cookiePrefix+e[0]+"="+encodeURIComponent(e[1])+"; "+t+"path=/; samesite=lax"+o}):("alternative"!==ctPublicFunctions.data__cookies_type||void 0!==c)&&c||ctSetAlternativeCookie(e)}function ctDetectForcedAltCookiesForms(){var e=0<document.querySelectorAll("#tmpl-nf-layout").length,t=0<document.querySelectorAll('script[id*="smart-forms"]').length;ctPublic.force_alt_cookies=t||e}function ctSetAlternativeCookie(e,t){"function"==typeof getJavascriptClientData?Array.isArray(e)&&(e=getJavascriptClientData(e)):console.log("APBCT ERROR: getJavascriptClientData() is not loaded");try{e=JSON.parse(e)}catch(e){return void console.log("APBCT ERROR: JSON parse error:"+e)}var o=t&&t.callback||null,n=t&&t.onErrorCallback||null;t&&t.forceAltCookies&&(e.apbct_force_alt_cookies=!0),"rest"===ctPublicFunctions.data__ajax_type?apbct_public_sendREST("alt_sessions",{method:"POST",data:{cookies:e},callback:o,onErrorCallback:n}):"admin_ajax"===ctPublicFunctions.data__ajax_type&&apbct_public_sendAJAX({action:"apbct_alt_session__save__AJAX",cookies:e},{notJson:1,callback:o,onErrorCallback:n})}function ctGetCookie(e){e=document.cookie.match(new RegExp("(?:^|; )"+e.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,"\\$1")+"=([^;]*)"));return e?decodeURIComponent(e[1]):void 0}function ctDeleteCookie(e){var t;"none"!==ctPublicFunctions.data__cookies_type&&("native"===ctPublicFunctions.data__cookies_type?(t="https:"===location.protocol?"; secure":"",document.cookie=e+'=""; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; samesite=lax'+t):ctPublicFunctions.data__cookies_type)}function apbct_public_sendAJAX(e,t,o){let n=[];
1n.callback=t.callback||null,n.onErrorCallback=t.onErrorCallback||null,n.callback_context=t.callback_context||null,n.callback_params=t.callback_params||null,n.async=t.async||!0,n.notJson=t.notJson||null,n.responseType=t.notJson?"text":"json",n.timeout=t.timeout||15e3,n.obj=o||null,n.button=t.button||null,n.spinner=t.spinner||null,n.progressbar=t.progressbar||null,n.silent=t.silent||null,n.no_nonce=t.no_nonce||null,n.data=e,n.url=ctPublicFunctions._ajax_url,"string"==typeof e?(n.no_nonce||(n.data=n.data+"&_ajax_nonce="+ctPublicFunctions._ajax_nonce),n.data=n.data+"&no_cache="+Math.random()):(n.no_nonce||(n.data._ajax_nonce=ctPublicFunctions._ajax_nonce),n.data.no_cache=Math.random()),(new ApbctCore).ajax(n)}function apbct_public_sendREST(e,t){let o=[];o.route=e,o.callback=t.callback||null,o.onErrorCallback=t.onErrorCallback||null,o.data=t.data||[],o.method=t.method||"POST",(new ApbctCore).rest(o)}function apbctGenerateUniqueID(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(2,10)}let apbctLocalStorage={get:function(t,e){void 0===e&&(e="value");t=localStorage.getItem(t);if(null!==t)try{const o=JSON.parse(t);return o.hasOwnProperty(e)?JSON.parse(o[e]):o}catch(e){return t}return!1},set:function(e,t,o=!0){o?(o={value:JSON.stringify(t),timestamp:Math.floor((new Date).getTime()/1e3)},localStorage.setItem(e,JSON.stringify(o))):localStorage.setItem(e,t)},isAlive:function(e,t){return void 0===t&&(t=86400),this.get(e,"timestamp")+t>Math.floor((new Date).getTime()/1e3)},isSet:function(e){return null!==localStorage.getItem(e)},delete:function(e){localStorage.removeItem(e)},getCleanTalkData:function(){let o={};for(let t=0;t<localStorage.length;t++){let e=localStorage.key(t);-1===e.indexOf("ct_")&&-1===e.indexOf("apbct_")||(o[e.toString()]=apbctLocalStorage.get(e))}return o}},apbctSessionStorage={get:function(t,e){void 0===e&&(e="value");t=sessionStorage.getItem(t);if(null!==t)try{const o=JSON.parse(t);return o.hasOwnProperty(e)?JSON.parse(o[e]):o}catch(e){return t}return!1},set:function(e,t,o=!0){o?(o={value:JSON.stringify(t),timestamp:Math.floor((new Date).getTime()/1e3)},sessionStorage.setItem(e,JSON.stringify(o))):sessionStorage.setItem(e,t)},isSet:function(e){return null!==sessionStorage.getItem(e)},delete:function(e){sessionStorage.removeItem(e)},getCleanTalkData:function(){let o={};for(let t=0;t<sessionStorage.length;t++){let e=sessionStorage.key(t);-1===e.indexOf("ct_")&&-1===e.indexOf("apbct_")||(o[e.toString()]=apbctSessionStorage.get(e))}return o}};var ct_date=new Date,ctTimeMs=(new Date).getTime(),ctMouseEventTimerFlag=!0,ctMouseData=[],ctMouseDataCounter=0,ctCheckedEmails={};function apbct_attach_event_handler(e,t,o){"function"==typeof window.addEventListener?e.addEventListener(t,o):e.attachEvent(t,o)}function apbct_remove_event_handler(e,t,o){"function"==typeof window.removeEventListener?e.removeEventListener(t,o):e.detachEvent(t,o)}var ctMouseReadInterval,ctMouseWriteDataInterval,ctFunctionFirstKey=function(e){ctSetCookie("ct_fkp_timestamp",Math.floor((new Date).getTime()/1e3)),ctKeyStopStopListening()},ctFunctionMouseMove=(ctPublic.data__key_is_ok&&(ctMouseReadInterval=setInterval(function(){ctMouseEventTimerFlag=!0},150),ctMouseWriteDataInterval=setInterval(function(){ctSetCookie("ct_pointer_data",JSON.stringify(ctMouseData))},1200)),function(e){ctSetMouseMoved(),!0===ctMouseEventTimerFlag&&(ctMouseData.push([Math.round(e.clientY),Math.round(e.clientX),Math.round((new Date).getTime()-ctTimeMs)]),ctMouseEventTimerFlag=!1,50<=++ctMouseDataCounter&&ctMouseStopData())});function ctMouseStopData(){apbct_remove_event_handler(document,"mousemove",ctFunctionMouseMove),clearInterval(ctMouseReadInterval),clearInterval(ctMouseWriteDataInterval)}function ctKeyStopStopListening(){apbct_remove_event_handler(document,"mousedown",ctFunctionFirstKey),apbct_remove_event_handler(document,"keydown",ctFunctionFirstKey)}function checkEmail(e){var t=e.target.value;!t||t in ctCheckedEmails||("rest"===ctPublicFunctions.data__ajax_type?apbct_public_sendREST("check_email_before_post",{method:"POST",data:{email:t},callback:function(e){e.result&&(ctCheckedEmails[t]={result:e.result,timestamp:Date.now()/1e3|0}
1,ctSetCookie("ct_checked_emails",JSON.stringify(ctCheckedEmails)))}}):"admin_ajax"===ctPublicFunctions.data__ajax_type&&apbct_public_sendAJAX({action:"apbct_email_check_before_post",email:t},{callback:function(e){e.result&&(ctCheckedEmails[t]={result:e.result,timestamp:Date.now()/1e3|0},ctSetCookie("ct_checked_emails",JSON.stringify(ctCheckedEmails)))}}))}function ctSetPixelImg(t){if(ctSetCookie("apbct_pixel_url",t),+ctPublic.pixel__enabled&&!document.getElementById("apbct_pixel")){let e=document.createElement("img");e.setAttribute("alt","CleanTalk Pixel"),e.setAttribute("id","apbct_pixel"),e.setAttribute("style","display: none; left: 99999px;"),e.setAttribute("src",t),apbct("body").append(e)}}function ctGetPixelUrl(){var e=apbctLocalStorage.get("apbct_pixel_url");if(!1!==e){if(apbctLocalStorage.isAlive("apbct_pixel_url",10800))return void ctSetPixelImg(e);apbctLocalStorage.delete("apbct_pixel_url")}"rest"===ctPublicFunctions.data__ajax_type?apbct_public_sendREST("apbct_get_pixel_url",{method:"POST",callback:function(e){e&&(apbctLocalStorage.get("apbct_pixel_url")||(apbctLocalStorage.set("apbct_pixel_url",e),ctNoCookieAttachHiddenFieldsToForms()),ctSetPixelImg(e))}}):apbct_public_sendAJAX({action:"apbct_get_pixel_url"},{notJson:!0,callback:function(e){e&&(apbctLocalStorage.get("apbct_pixel_url")||(apbctLocalStorage.set("apbct_pixel_url",e),ctNoCookieAttachHiddenFieldsToForms()),ctSetPixelImg(e))}})}function ctSetHasScrolled(){apbctLocalStorage.isSet("ct_has_scrolled")&&apbctLocalStorage.get("ct_has_scrolled")||(ctSetCookie("ct_has_scrolled","true"),apbctLocalStorage.set("ct_has_scrolled",!0))}function ctSetMouseMoved(){apbctLocalStorage.isSet("ct_mouse_moved")&&apbctLocalStorage.get("ct_mouse_moved")||(ctSetCookie("ct_mouse_moved","true"),apbctLocalStorage.set("ct_mouse_moved",!0))}function ctStartFieldsListening(){if(!apbctLocalStorage.isSet("ct_has_key_up")&&!apbctLocalStorage.get("ct_has_key_up")||!apbctLocalStorage.isSet("ct_has_input_focused")&&!apbctLocalStorage.get("ct_has_input_focused")){let t=ctGetPageForms();if(ctPublic.handled_fields=[],0<t.length)for(let e=0;e<t.length;e++){var o=t[e].querySelectorAll("input,textarea");for(let e=0;e<o.length;e++)"hidden"!==o[e].type&&(ctPublic.handled_fields.push(o[e]),apbct_attach_event_handler(o[e],"focus",ctFunctionHasInputFocused),apbct_attach_event_handler(o[e],"keyup",ctFunctionHasKeyUp))}}}function ctStopFieldsListening(t,o){if(void 0!==ctPublic.handled_fields&&0<ctPublic.handled_fields.length)for(let e=0;e<ctPublic.handled_fields.length;e++)apbct_remove_event_handler(ctPublic.handled_fields[e],t,o)}let ctFunctionHasInputFocused=function(e){ctSetHasInputFocused(),ctStopFieldsListening("focus",ctFunctionHasInputFocused)},ctFunctionHasKeyUp=function(e){ctSetHasKeyUp(),ctStopFieldsListening("keyup",ctFunctionHasKeyUp)};function ctSetHasInputFocused(){apbctLocalStorage.isSet("ct_has_input_focused")&&apbctLocalStorage.get("ct_has_input_focused")||(ctSetCookie("ct_has_input_focused","true"),apbctLocalStorage.set("ct_has_input_focused",!0))}function ctSetHasKeyUp(){apbctLocalStorage.isSet("ct_has_key_up")&&apbctLocalStorage.get("ct_has_key_up")||(ctSetCookie("ct_has_key_up","true"),apbctLocalStorage.set("ct_has_key_up",!0))}function ctPreloadLocalStorage(){if(ctPublic.data__to_local_storage){let e=Object.entries(ctPublic.data__to_local_storage);e.forEach(([e,t])=>{apbctLocalStorage.set(e,t)})}}function apbct_ready(){ctPreloadLocalStorage(),apbctSessionStorage.isSet("apbct_session_id")?apbctLocalStorage.set("apbct_page_hits",Number(apbctLocalStorage.get("apbct_page_hits"))+1):(e=apbctGenerateUniqueID(),apbctSessionStorage.set("apbct_session_id",e,!1),apbctLocalStorage.set("apbct_page_hits",1),document.referrer&&new URL(document.referrer).host!==location.host&&apbctSessionStorage.set("apbct_site_referer",document.referrer,!1)),apbctSessionStorage.set("apbct_prev_referer",document.referrer,!1);var e=apbctLocalStorage.get("ct_cookies_type");e&&e===ctPublic.data__cookies_type||(apbctLocalStorage.set("ct_cookies_type",ctPublic.data__cookies_type),apbctLocalStorage.delete("ct_mouse_moved"),apbctLocalStorage.delete("ct_has_scrolled")),ctStartFieldsListening(),setTimeout(ctStartFieldsListening,1e3);const t=[["ct_ps_timestamp",Math.floor((new Date).getTime()/1e3)],["ct_fkp_timestamp","0"],["ct_pointer_data","0"],["ct_timezone",ct_date.getTimezoneOffset()/60*-1],["ct_screen_info",apbctGetScreenInfo()],["apbct_headless",navigator.webdriver]];if(apbctLocalStorage.set("ct_ps_timestamp",Math.floor((new Date).getTime()/1e3)),apbctLocalStorage.set("ct_fkp_timestamp","0"),apbctLocalStorage.set("ct_pointer_data","0"),apbctLocalStorage.set("ct_timezone",ct_date.getTimezoneOffset()/60*-1),apbctLocalStorage.set("ct_screen_info",apbctGetScreenInfo()),apbctLocalStorage.set("apbct_headless",navigator.webdriver),"native"!==ctPublic.data__cookies_type)t.push(["apbct_visible_fields","0"]);else{var o=document.cookie.split(";");if(0!==o.length)for(let e=0;e<o.length;e++){var n=o[e].trim().split("=")[0];0===n.indexOf("apbct_visible_fields_")&&ctDeleteCookie(n)}}+ctPublic.pixel__setting&&(+ctPublic.pixel__enabled?ctGetPixelUrl():t.push(["apbct_pixel_url",ctPublic.pixel__url])),+ctPublic.data__email_check_before_post&&(t.push(["ct_checked_emails","0"]),apbct("input[type = 'email'], #email").on("blur",checkEmail)),apbctLocalStorage.isSet("ct_checkjs")?t.push(["ct_checkjs",apbctLocalStorage.get("ct_checkjs")]):t.push(["ct_checkjs",0]),ctDetectForcedAltCookiesForms(),ctSetCo
1okie(t),setTimeout(function(){void 0!==ctPublic.force_alt_cookies&&("undefined"===ctPublic.force_alt_cookies||ctPublic.force_alt_cookies)||ctNoCookieAttachHiddenFieldsToForms();for(let e=0;e<document.forms.length;e++){var t,o,n=document.forms[e];0==+ctPublic.data__visible_fields_required||"get"===n.method.toString().toLowerCase()&&0===n.querySelectorAll(".nf-form-content").length||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.classList&&n.classList.contains("tinkoffPayRow")||n.classList&&n.classList.contains("give-form")||n.id&&"ult-forgot-password-form"===n.id||n.id&&-1!==n.id.toString().indexOf("calculatedfields")||n.id&&-1!==n.id.toString().indexOf("sac-form")||n.id&&-1!==n.id.toString().indexOf("cp_tslotsbooking_pform")||n.name&&-1!==n.name.toString().indexOf("cp_tslotsbooking_pform")||"https://epayment.epymtservice.com/epay.jhtml"===n.action.toString()||n.name&&-1!==n.name.toString().indexOf("tribe-bar-form")||n.id&&"ihf-login-form"===n.id||n.id&&"subscriberForm"===n.id&&-1!==n.action.toString().indexOf("actionType=update")||n.id&&"ihf-main-search-form"===n.id||n.id&&"frmCalc"===n.id||-1!==n.action.toString().indexOf("property-organizer-delete-saved-search-submit")||((t=document.createElement("input")).setAttribute("type","hidden"),t.setAttribute("id","apbct_visible_fields_"+e),t.setAttribute("name","apbct_visible_fields"),(o={})[0]=apbct_collect_visible_fields(n),t.value=btoa(JSON.stringify(o)),n.append(t),n.onsubmit_prev=n.onsubmit,n.ctFormIndex=e,n.onsubmit=function(e){if("native"!==ctPublic.data__cookies_type&&void 0!==e.target.ctFormIndex){const t={};t[0]=apbct_collect_visible_fields(this),apbct_visible_fields_set_cookie(t,e.target.ctFormIndex)}e.target.onsubmit_prev instanceof Function&&setTimeout(function(){e.target.onsubmit_prev.call(e.target,e)},500)})}},1e3);let c=document.querySelectorAll("[data-original-string]");if((ctPublic.encodedEmailNodes=c).length)for(let e=0;e<c.length;++e)c[e].parentElement.href||c[e].parentElement.parentElement.href||c[e].addEventListener("click",ctFillDecodedEmailHandler);for(const i of document.forms)"undefined"!=typeof ctPublic&&"1"===ctPublic.settings__forms__search_test&&"none"===ctPublic.data__cookies_type&&("searchform"===i.getAttribute("id")||null!==i.getAttribute("class")&&-1!==i.getAttribute("class").indexOf("search-form")||null!==i.getAttribute("role")&&-1!==i.getAttribute("role").indexOf("search"))&&(i.apbctSearchPrevOnsubmit=i.onsubmit,i.onsubmit=e=>{const t=i.querySelector('[name="ct_no_cookie_hidden_field"]');var o;null!==t&&(e.preventDefault(),e=()=>{i.apbctSearchPrevOnsubmit instanceof Function?i.apbctSearchPrevOnsubmit():HTMLFormElement.prototype.submit.call(i)},0!==(o=atob(t.value.replace("_ct_no_cookie_data_",""))).length?ctSetAlternativeCookie(o,{callback:e,onErrorCallback:e,forceAltCookies:!0}):e())})}function ctFillDecodedEmailHandler(e){this.removeEventListener("click",ctFillDecodedEmailHandler);ctPublic.encodedEmailNodesIsMixed=!1,document.body.classList.add("apbct-popup-fade");let t=document.getElementById("apbct_popup");if(t)t.setAttribute("style","display: inherit"),document.getElementById("apbct_popup_text").innerHTML="Please wait while CleanTalk is decoding the email addresses.";else{let e=document.createElement("div"),t=(e.setAttribute("class","apbct-popup"),e.setAttribute("id","apbct_popup"),document.createElement("p"));t.setAttribute("id","apbct_popup_text"),t.style.color="black",t.innerText="Please wait while CleanTalk is decoding the email addresses.",e.append(t),document.body.append(e)}apbctAjaxEmailDecodeBulk(e,ctPublic.encodedEmailNodes,this)}function apbctAjaxEmailDecodeBulk(o,n,t){let e={event_javascript_data:getJavascriptClientData(),post_url:document.location.href,referrer:document.referrer,encodedEmails:""},c={};for(let t=0;t<n.length;t++){void 0!==n[t].href&&0===n[t].href.indexOf("mailto:")&&(o.preventDefault(),ctPublic.encodedEmailNodesIsMixed=!0);let e=document.createElement("div");e.setAttribute("class","apbct-tooltip"),apbct(n[t]).append(e),c[t]=n[t].dataset.originalString}e.encodedEmails=JSON.stringify(c),"rest"===ctPublicFunctions.data__ajax_type?apbct_public_sendREST("apbct_decode_email",{data:e,method:"POST",callback:function(e){ctSetCookie("apbct_email_encoder_passed","1"),apbctEmailEncoderCallbackBulk(e,n,t)},onErrorCallback:function(e){resetEncodedNodes(),ctShowDecodeComment(e)}}):(e.action="apbct_decode_email",apbct_public_sendAJAX(e,{notJson:!1,callback:function(e){ctSetCookie("apbct_email_encoder_passed","1"),apbctEmailEncoderCallbackBulk(e,n,t)},onErrorCallback:function(e){resetEncodedNodes(),ctShowDecodeComment(e)}}))}function apbctEmailEncoderCallbackBulk(c,i,t){c.success&&!0===c.data[0].is_allowed?setTimeout(function(){for(let o=0;o<i.length;o++){let t;
1if(c.data.forEach(e=>{e.encoded_email===i[o].dataset.originalString&&(t=e)}),!1===t.is_allowed)break;if(void 0!==i[o].href&&0===i[o].href.indexOf("mailto:")){var n=i[o].href.replace("mailto:","");let e=i[o].innerHTML;i[o].innerHTML=e.replace(n,t.decoded_email),i[o].href="mailto:"+t.decoded_email}ctProcessDecodedDataResult(t,i[o]),i[o].removeEventListener("click",ctFillDecodedEmailHandler)}let e=document.getElementById("apbct_popup");null!==e&&(document.body.classList.remove("apbct-popup-fade"),e.setAttribute("style","display:none"),ctPublic.encodedEmailNodesIsMixed&&t.click())},3e3):c.success?(resetEncodedNodes(),ctShowDecodeComment("Blocked: "+c.data[0].comment)):(resetEncodedNodes(),ctShowDecodeComment("Cannot connect with CleanTalk server: "+c.data[0].comment))}function resetEncodedNodes(){void 0!==ctPublic.encodedEmailNodes&&ctPublic.encodedEmailNodes.forEach(function(e){e.addEventListener("click",ctFillDecodedEmailHandler)})}function getJavascriptClientData(t=[]){let o={};o.apbct_headless=!!ctGetCookie(ctPublicFunctions.cookiePrefix+"apbct_headless"),o.apbct_pixel_url=ctGetCookie(ctPublicFunctions.cookiePrefix+"apbct_pixel_url"),o.ct_checked_emails=ctGetCookie(ctPublicFunctions.cookiePrefix+"ct_checked_emails"),o.ct_checkjs=ctGetCookie(ctPublicFunctions.cookiePrefix+"ct_checkjs"),o.ct_fkp_timestamp=ctGetCookie(ctPublicFunctions.cookiePrefix+"ct_fkp_timestamp"),o.ct_pointer_data=ctGetCookie(ctPublicFunctions.cookiePrefix+"ct_pointer_data"),o.ct_ps_timestamp=ctGetCookie(ctPublicFunctions.cookiePrefix+"ct_ps_timestamp"),o.ct_screen_info=ctGetCookie(ctPublicFunctions.cookiePrefix+"ct_screen_info"),o.ct_timezone=ctGetCookie(ctPublicFunctions.cookiePrefix+"ct_timezone");var e=apbctLocalStorage.get(ctPublicFunctions.cookiePrefix+"ct_mouse_moved"),n=apbctLocalStorage.get(ctPublicFunctions.cookiePrefix+"ct_has_scrolled"),c=apbctLocalStorage.get(ctPublicFunctions.cookiePrefix+"ct_cookies_type"),i=apbctLocalStorage.get("apbct_page_hits"),a=apbctSessionStorage.get("apbct_prev_referer"),l=apbctSessionStorage.get("apbct_site_referer"),s=apbctLocalStorage.get(ctPublicFunctions.cookiePrefix+"ct_js_errors"),r=ctGetCookie(ctPublicFunctions.cookiePrefix+"ct_mouse_moved"),d=ctGetCookie(ctPublicFunctions.cookiePrefix+"ct_has_scrolled"),u=ctGetCookie(ctPublicFunctions.cookiePrefix+"ct_cookies_type");if(o.ct_mouse_moved=void 0!==e?e:r,o.ct_has_scrolled=void 0!==n?n:d,o.ct_cookies_type=void 0!==c?c:u,o.apbct_page_hits=i,o.apbct_prev_referer=a,o.apbct_site_referer=l,o.apbct_ct_js_errors=s,"object"==typeof t&&t!==[])for(let e=0;e<t.length;++e)"object"==typeof t[e][1]?o[t[e][1][0]]=t[e][1][1]:o[t[e][0]]=t[e][1];else console.log("APBCT JS ERROR: Collecting data type mismatch");return o=removeDoubleJsonEncoding(o),JSON.stringify(o)}function removeDoubleJsonEncoding(e){if("object"==typeof e)for(var t in e){var o;"object"==typeof e[t]&&(e[t]=removeDoubleJsonEncoding(e[t])),"string"!=typeof e[t]||null===e[t].match(/^[\[{].*?[\]}]$/)||"object"==typeof(o=JSON.parse(e[t]))&&(e[t]=o)}return e}function ctProcessDecodedDataResult(e,t){t.setAttribute("title",""),t.removeAttribute("style"),ctFillDecodedEmail(t,e.decoded_email)}function ctFillDecodedEmail(e,t){apbct(e).html(apbct(e).html().replace(/.+?(<div class=["']apbct-tooltip["'].+?<\/div>)/,t+"$1"))}function ctShowDecodeComment(e){e=e||"Can not decode email. Unknown reason";let t=document.getElementById("apbct_popup"),o=document.getElementById("apbct_popup_text");null!==t&&(document.body.classList.remove("apbct-popup-fade"),o.innerText="CleanTalk email decoder: "+e,setTimeout(function(){t.setAttribute("style","display:none")},3e3))}function apbct_collect_visible_fields(e){let t=[],n="",c=0,i="",a=0,o=[];for(var l in e.elements)isNaN(+l)||(t[l]=e.elements[l]);return(t=t.filter(function(e){return-1===o.indexOf(e.getAttribute("name"))&&(-1===["radio","checkbox"].indexOf(e.getAttribute("type"))||(o.push(e.getAttribute("name")),!1))})).forEach(function(e,t,o){"submit"!==e.getAttribute("type")&&null!==e.getAttribute("name")&&"ct_checkjs"!==e.getAttribute("name")&&("none"!==getComputedStyle(e).display&&"hidden"
1!==getComputedStyle(e).visibility&&"0"!==getComputedStyle(e).opacity&&"hidden"!==e.getAttribute("type")||e.classList.contains("wp-editor-area")?(n+=" "+e.getAttribute("name"),c++):(i+=" "+e.getAttribute("name"),a++))}),i=i.trim(),{visible_fields:n=n.trim(),visible_fields_count:c,invisible_fields:i,invisible_fields_count:a}}function apbct_visible_fields_set_cookie(e,t){var o="object"==typeof e&&null!==e?e:{};if("native"===ctPublic.data__cookies_type)for(var n in o){if(10<n)return;ctSetCookie("apbct_visible_fields_"+(void 0!==t?t:n),JSON.stringify(o[n]))}else"none"===ctPublic.data__cookies_type?ctSetCookie("apbct_visible_fields",JSON.stringify(o[0])):ctSetCookie("apbct_visible_fields",JSON.stringify(o))}function apbct_js_keys__set_input_value(o,e,t,n){if(0<document.querySelectorAll("[name^=ct_checkjs]").length){let t=document.querySelectorAll("[name^=ct_checkjs]");for(let e=0;e<t.length;e++)t[e].value=o.js_key}}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 ctParseBlockMessage(e){void 0!==e.apbct&&(e=e.apbct).blocked&&(document.dispatchEvent(new CustomEvent("apbctAjaxBockAlert",{bubbles:!0,detail:{message:e.comment}})),cleantalkModal.loaded=e.comment,cleantalkModal.open(),1==+e.stop_script&&window.stop())}function ctSetPixelUrlLocalstorage(e){ctSetCookie("apbct_pixel_url",e)}function ctNoCookieConstructHiddenField(e){let t="hidden",o=("submit"===e&&(t="submit"),"");var e=apbctLocalStorage.getCleanTalkData(),n=apbctSessionStorage.getCleanTalkData(),e={...e,...n},e=JSON.stringify(e);return e="_ct_no_cookie_data_"+btoa(e),(o=document.createElement("input")).setAttribute("name","ct_no_cookie_hidden_field"),o.setAttribute("value",e),o.setAttribute("type",t),o.classList.add("apbct_special_field"),o.classList.add("ct_no_cookie_hidden_field"),o}function ctGetPageForms(){var e=document.forms;return e||!1}function ctNoCookieFormIsExcludedFromNcField(e){let t=e.parentNode;return!(!t||!t.classList.contains("proinput"))&&"ajax search pro exclusion"}function ctNoCookieAttachHiddenFieldsToForms(){if("none"===ctPublic.data__cookies_type){let o=ctGetPageForms();if(o)for(let e=0;e<o.length;e++){let t=o[e].querySelectorAll(".ct_no_cookie_hidden_field");for(let e=0;e<t.length;e++)t[e].outerHTML="";if(ctNoCookieFormIsExcludedFromNcField(document.forms[e]))return;null===document.forms[e].getAttribute("method")||"post"===document.forms[e].getAttribute("method").toLowerCase()?document.forms[e].append(ctNoCookieConstructHiddenField()):"undefined"!=typeof ctPublic&&"1"===ctPublic.settings__forms__search_test&&("searchform"===document.forms[e].getAttribute("id")||null!==document.forms[e].getAttribute("class")&&-1!==document.forms[e].getAttribute("class").indexOf("search-form")||null!==document.forms[e].getAttribute("role")&&-1!==document.forms[e].getAttribute("role").indexOf("search"))&&document.forms[e].append(ctNoCookieConstructHiddenField("submit"))}}}ctPublic.data__key_is_ok&&(apbct_attach_event_handler(document,"mousemove",ctFunctionMouseMove),apbct_attach_event_handler(document,"mousedown",ctFunctionFirstKey),apbct_attach_event_handler(document,"keydown",ctFunctionFirstKey),apbct_attach_event_handler(document,"scroll",ctSetHasScrolled)),ctPublic.data__key_is_ok&&("loading"!==document.readyState?apbct_ready():apbct_attach_event_handler(document,"DOMContentLoaded",apbct_ready)),"undefined"!=typeof jQuery&&jQuery(document).ajaxComplete(function(e,t,o){if(t.responseText&&-1!==t.responseText.indexOf('"apbct')){try{JSON.parse(t.responseText)}catch(e){return void console.log(e.toString())}ctParseBlockMessage(response)}});const defaultFetch=window.fetch,defaultSend=XMLHttpRequest.prototype.send;function checkFormsExistForCatching(){setTimeout(function(){isFormThatNeedCatch()&&(window.fetch=function(arguments){var e;return arguments&&arguments[0]&&"function"==typeof arguments[0].includes&&arguments[0].includes("/wp-json/metform/")&&(e=getNoCookieData(),arguments&&arguments[1]&&arguments[1].body&&arguments[1].body.append("ct_no_co
1okie_hidden_field",e)),defaultFetch.apply(window,arguments)})},1e3)}function isFormThatNeedCatch(){const e=["metform-form-content"];let o=!1;for(let t of document.forms)e.forEach(function(e){t.classList.contains(e)&&(o=!0)});return o}function checkFormsExistForCatchingXhr(){setTimeout(function(){isFormThatNeedCatchXhr()&&(window.XMLHttpRequest.prototype.send=function(e){var t="data%5Bct_no_cookie_hidden_field%5D="+getNoCookieData()+"&";defaultSend.call(this,t+e)})},1e3)}function isFormThatNeedCatchXhr(){return null!=document.querySelector("div.elementor-widget[title='Login/Signup']")}function getNoCookieData(){var e=apbctLocalStorage.getCleanTalkData(),t=apbctSessionStorage.getCleanTalkData(),e={...e,...t},e=JSON.stringify(e);return"_ct_no_cookie_data_"+btoa(e)}"loading"!==document.readyState?(checkFormsExistForCatching(),checkFormsExistForCatchingXhr()):(apbct_attach_event_handler(document,"DOMContentLoaded",checkFormsExistForCatching),apbct_attach_event_handler(document,"DOMContentLoaded",checkFormsExistForCatchingXhr));let cleantalkModal={loaded:!1,loading:!1,opened:!1,opening:!1,load:function(e){var t;this.loaded||(this.loading=!0,t=function(e,t,o,n){cleantalkModal.loading=!1,cleantalkModal.loaded=e,document.dispatchEvent(new CustomEvent("cleantalkModalContentLoaded",{bubbles:!0}))},("function"==typeof apbct_admin_sendAJAX?apbct_admin_sendAJAX:apbct_public_sendAJAX)({action:e},{callback:t,notJson:!0}))},open:function(){function e(){let e="";for(const t in this.styles)e+=t+":"+this.styles[t]+";";return e}var t={styles:{"z-index":"9999999999",position:"fixed",top:"0",left:"0",width:"100%",height:"100%",background:"rgba(0,0,0,0.5)",display:"flex","justify-content":"center","align-items":"center"},toString:e},o={styles:{position:"relative",padding:"30px",background:"#FFF",border:"1px solid rgba(0,0,0,0.75)","border-radius":"4px","box-shadow":"7px 7px 5px 0px rgba(50,50,50,0.75)"},toString:e},n={styles:{position:"absolute",background:"#FFF",width:"20px",height:"20px",border:"2px solid rgba(0,0,0,0.75)","border-radius":"15px",cursor:"pointer",top:"-8px",right:"-8px","box-sizing":"content-box"},toString:e},c={styles:{content:'""',display:"block",position:"absolute",background:"#000","border-radius":"1px",width:"2px",height:"16px",top:"2px",left:"9px",transform:"rotate(45deg)"},toString:e},i={styles:{content:'""',display:"block",position:"absolute",background:"#000","border-radius":"1px",width:"2px",height:"16px",top:"2px",left:"9px",transform:"rotate(-45deg)"},toString:e},a={styles:{overflow:"hidden"},toString:e};let l=document.createElement("style"),s=(l.setAttribute("id","cleantalk-modal-styles"),l.innerHTML="body.cleantalk-modal-opened{"+a+"}",l.innerHTML+="#cleantalk-modal-overlay{"+t+"}",l.innerHTML+="#cleantalk-modal-close{"+n+"}",l.innerHTML+="#cleantalk-modal-close:before{"+c+"}",l.innerHTML+="#cleantalk-modal-close:after{"+i+"}",document.body.append(l),document.createElement("div")),r=(s.setAttribute("id","cleantalk-modal-overlay"),document.body.append(s),document.body.classList.add("cleantalk-modal-opened"),document.createElement("div")),d=(r.setAttribute("id","cleantalk-modal-inner"),r.setAttribute("style",o),s.append(r),document.createElement("div"));d.setAttribute("id","cleantalk-modal-close"),r.append(d);a=document.createElement("div");this.loaded?/.*\/inc/g.test(this.loaded)?a.innerHTML=this.loaded:a.innerHTML=this.loaded.replace(/(https?:\/\/[^\s]+)/g,'<a href="$1" target="_blank">$1</a>'):(a.innerHTML="Loading...",this.load("get_options_template")),a.setAttribute("id","cleantalk-modal-content"),r.append(a),this.opened=!0},close:function(){document.body.classList.remove("cleantalk-modal-opened"),document.getElementById("cleantalk-modal-overlay").remove(),document.getElementById("cleantalk-modal-styles").remove(),document.dispatchEvent(new CustomEvent("cleantalkModalClosed",{bubbles:!0}))}};function ctProtectExternal(){for(let e=0;e<document.forms.length;e++)if(void 0===document.forms[e].cleantalk_hidden_action&&void 0===document.forms[e].cleantalk_hidden_method){const t=document.forms[e];if("string"==typeof t.action&&!formIsExclusion(t))if(isIntegratedForm(t))apbctProcessExternalForm(t,e,document);else if(-1!==t.action.indexOf("http://")||-1!==t.action.indexOf("https://")){let e=t.action.split("//");if((e=e[1].split("/"))[0].toLowerCase()!==location.hostname.toLowerCase()){const o=document.createElement("input"),n=(o.name="cleantalk_hidden_action",o.value=t.action,o.type="hidden",t.appendChild(o),document.createElement("input"));n.name="cleantalk_hidden_method",n.value=t.method,n.type="hidden",t.method="POST",t.appendChild(n),t.action=document.location}}}apbctProcessIframes(),ctStartFieldsListening()}function formIsExclusion(o){let n=!1;try{o.parentElement&&0<o.parentElement.classList.length&&-1!==o.parentElement.classList[0].indexOf("mewtwo")&&(n=!0),["give-form","frmCalc","ihf-contact-request-form"].forEach(function(e){const t=o.getAttribute("id");null!==t&&void 0!==t&&-1!==t.indexOf(e)&&(n=!0)}),["search-form","hs-form","ihc-form-create-edit"].forEach(function(e){const t=o.getAttribute("class");null!==t&&void 0!==t&&-1!==t.indexOf(e)&&(n=!0)}),["search"].forEach(function(e){const t=o.getAttribute("id");null!==t&&void 0!==t&&-1!==t.indexOf(e)&&(n=!0)})}catch(e){console.table("APBCT ERROR: formIsExclusion() - ",e)}return n}function apbctProcessIframes(){var o=document.getElementsByTagName("iframe");
1if(0<o.length)for(let t=0;t<o.length;t++)if(null!=o[t].contentDocument){var n=o[t].contentDocument.forms;if(0!==n.length)for(let e=0;e<n.length;e++){var c=n[e];formIsExclusion(c)||apbctProcessExternalForm(c,e,o[t].contentDocument)}}}function apbctProcessExternalForm(e,o,n){if(!formIsExclusion(e)){const a=document.createElement("i"),l=(a.className="cleantalk_placeholder",a.style="display: none",e.parentElement.insertBefore(a,e),e.previousSibling);var c=e.outerHTML,i=e;e.parentElement.removeChild(e);const s=document.createElement("div"),r=(s.innerHTML=c,l.after(s.firstElementChild),document.createElement("input")),d=(r.name="action",r.value="cleantalk_force_ajax_check",r.type="hidden",n.forms[o]);d.appendChild(r),d.apbctPrev=l,d.apbctFormOriginal=i;let t=!1;if(void 0!==d.classList){const u=["newsletterform","ml-block-form"];u.forEach(function(e){d.classList.contains(e)&&(t=e)})}if(t){const p=n.querySelector("form."+t).querySelector('button[type="submit"]');void 0!==p&&p.click(function(e){e.preventDefault(),sendAjaxCheckingFormData(e.currentTarget)})}else n.forms[o].onsubmit=function(e){e.preventDefault();apbct_prev(e.currentTarget),e.currentTarget.cloneNode(!0);sendAjaxCheckingFormData(e.currentTarget)}}}function apbctReplaceInputsValuesFromOtherForm(e,t){const o=e.querySelectorAll("button, input, textarea, select"),n=t.querySelectorAll("button, input, textarea, select");o.forEach(t=>{n.forEach(e=>{t.outerHTML===e.outerHTML&&(e.value=apbctVal(t))})})}function isIntegratedForm(e){const t=e.action,o=null!==e.getAttribute("id")?e.getAttribute("id"):"";return!!(-1!==t.indexOf("activehosted.com")||-1!==t.indexOf("app.convertkit.com")||void 0!==e.firstChild.classList&&e.firstChild.classList.contains("cb-form-group")||-1!==t.indexOf("mailerlite.com")||-1!==t.indexOf("colcolmail.co.uk")||-1!==t.indexOf("paypal.com")||-1!==t.indexOf("infusionsoft.com")||-1!==t.indexOf("webto.salesforce.com")||-1!==t.indexOf("secure2.convio.net")||-1!==t.indexOf("hookb.in")||-1!==t.indexOf("external.url")||-1!==t.indexOf("tp.media")||-1!==t.indexOf("flodesk.com")||-1!==t.indexOf("sendfox.com")||-1!==t.indexOf("aweber.com")||-1!==t.indexOf("secure.payu.com")||-1!==t.indexOf("mautic")||-1!==o.indexOf("mauticform_")||-1!==o.indexOf("ihf-contact-request-form"))}function sendAjaxCheckingFormData(r,e,t){const o={},n=(o[0]=apbct_collect_visible_fields(r),apbct_visible_fields_set_cookie(o),{});let c=r.elements;(c=Array.prototype.slice.call(c)).forEach(function(e,t){""===e.name?n["input_"+t]=e.value:n[e.name]=e.value}),apbct_public_sendAJAX(n,{async:!1,callback:function(e,t,o,n){if(void 0===e.apbct||!+e.apbct.blocked){var c=r;r.parentElement.removeChild(r);const i=r.apbctPrev,a=r.apbctFormOriginal;let e=!1;apbctReplaceInputsValuesFromOtherForm(c,a),-1!==a.id.indexOf("mautic")&&(e=!0),i.after(a);for(const l of a.querySelectorAll('input[name="apbct_visible_fields"]'))l.remove();for(const s of a.querySelectorAll('input[value="cleantalk_force_ajax_check"]'))s.remove();let t=a.querySelectorAll("button[type=submit]");if(0!==t.length)return t[0].click(),void(e&&setTimeout(function(){ctProtectExternal()},1500));if(0!==(t=a.querySelectorAll("input[type=submit]")).length)return void t[0].click();if(0!==(t=a.querySelectorAll('button[data-element="submit"]')).length)return void t[0].click();0!==(t=a.querySelectorAll('input[type="image"][name="submit"]')).length&&t[0].click()}void 0!==e.apbct&&+e.apbct.blocked&&ctParseBlockMessage(e)}})}function catchDynamicRenderedForm(){catchDynamicRenderedFormHandler(document.getElementsByTagName("form"));var t=document.getElementsByTagName("iframe");if(0<t.length)for(let e=0;e<t.length;e++)if(null!=t[e].contentDocument){var o=t[e].contentDocument.forms;if(0===o.length)return;catchDynamicRenderedFormHandler(o,t[e].contentDocument)}}function catchDynamicRenderedFormHandler(e,t=document){const o=[];for(const n of e)-1!==n.id.indexOf("hsForm")&&o.push(n.id),-1!==n.id.indexOf("createuser")&&void 0!==n.classList&&n.classList.contains("ihc-form-create-edit")&&o.push(n.id);for(const c of o){const i=t.getElementById(c);i.apbct_external_onsubmit_prev=i.onsubmit,i.onsubmit=sendAjaxCheckingDynamicFormData}}function sendAjaxCheckingDynamicFormData(i){i.preventDefault(),i.stopImmediatePropagation();const a=i,e=(i=i.target,document.createElement("input")),t=(e.name="action",e.value="cleantalk_force_ajax_check",e.type="hidden",i.appendChild(e),{}),o=(t[0]=apbct_collect_visible_fields(i),apbct_visible_fields_set_cookie(t),i.append(ctNoCookieConstructHiddenField("hidden")),{});let n=i.elements;
1(n=Array.prototype.slice.call(n)).forEach(function(e,t){""===e.name?o["input_"+t]=e.value:o[e.name]=e.value}),apbct_public_sendAJAX(o,{async:!1,callback:function(e){if(void 0===e.apbct||!+e.apbct.blocked){i.onsubmit=null;for(const o of i.querySelectorAll('input[name="apbct_visible_fields"]'))o.remove();for(const n of i.querySelectorAll('input[value="cleantalk_force_ajax_check"]'))n.remove();for(const c of i.querySelectorAll('input[name="ct_no_cookie_hidden_field"]'))c.remove();i.apbct_external_onsubmit_prev instanceof Function&&setTimeout(function(){i.apbct_external_onsubmit_prev.call(i,a)},500);const t=i.querySelector('input[type="submit"]');if(t)return void t.click()}void 0!==e.apbct&&+e.apbct.blocked&&ctParseBlockMessage(e)}})}function apbctVal(e){return e.options&&e.multiple?e.options.filter(e=>e.selected).map(e=>e.value):e.value}function ctCheckInternal(t){const e={};var o=t.elements;let n;for(n in o)"submit"!==o[n].type&&void 0!==o[n].value&&""!==o[n].value&&(e[o[n].name]=t.elements[n].value);e.action="ct_check_internal",apbct_public_sendAJAX(e,{url:ctPublicFunctions._ajax_url,callback:function(e){if(!0!==e.success)return alert(e.data),!1;t.origSubmit()}})}function ctCheckInternalIsExcludedForm(t){return["wp-login.php","wp-comments-post.php"].some(e=>null!==t.match(new RegExp(ctPublic.blog_home+".*"+e)))}document.addEventListener("click",function(e){!e.target||"cleantalk-modal-overlay"!==e.target.id&&"cleantalk-modal-close"!==e.target.id||cleantalkModal.close()}),document.addEventListener("cleantalkModalContentLoaded",function(e){cleantalkModal.opened&&cleantalkModal.loaded&&(document.getElementById("cleantalk-modal-content").innerHTML=cleantalkModal.loaded)}),window.onload=function(){+ctPublic.settings__forms__check_external&&setTimeout(function(){ctProtectExternal(),catchDynamicRenderedForm()},1500)},document.addEventListener("DOMContentLoaded",function(){let o="",n="";+ctPublic.settings__forms__check_internal&&setTimeout(()=>{for(let e=0;e<document.forms.length;e++)if("string"==typeof document.forms[e].action&&(n=document.forms[e],null!==(o=n.action).indexOf("https?://")&&null!==o.match(ctPublic.blog_home+".*?.php")&&!ctCheckInternalIsExcludedForm(o))){const t=n.cloneNode(!0);n.parentNode.replaceChild(t,n),t.origSubmit=n.submit,t.submit=null,t.addEventListener("submit",function(e){return e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),ctCheckInternal(e.target),!1})}},500)}); 2//# sourceMappingURL=apbct-public-bundle.min.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.