Plugin Directory

Changeset 3371703


Ignore:
Timestamp:
10/02/2025 10:28:53 AM (5 months ago)
Author:
alexandergull
Message:

Update to 6.65

Location:
cleantalk-spam-protect
Files:
421 added
33 edited

Legend:

Unmodified
Added
Removed
  • cleantalk-spam-protect/trunk/cleantalk.php

    r3363712 r3371703  
    55  Plugin URI: https://cleantalk.org
    66  Description: Max power, all-in-one, no Captcha, premium anti-spam plugin. No comment spam, no registration spam, no contact spam, protects any WordPress forms.
    7   Version: 6.64
     7  Version: 6.65
    88  Author: CleanTalk - Anti-Spam Protection <[email protected]>
    99  Author URI: https://cleantalk.org
     
    29642964 * @param $exec_time
    29652965 */
    2966 function apbct_statistics__rotate($exec_time)
     2966function apbct_statistics_rotate($exec_time)
    29672967{
    29682968    global $apbct;
     
    30603060    $apbct->sfw_update_sentinel->runWatchDog();
    30613061}
     3062
     3063/**
     3064 * Cron wrapper. Remove support user.
     3065 * @return void
     3066 */
     3067function apbct_cron_remove_support_user()
     3068{
     3069    $temp_user_service = new \Cleantalk\ApbctWP\SupportUser();
     3070    $temp_user_service->performCronDeleteUser();
     3071}
  • cleantalk-spam-protect/trunk/css/cleantalk-admin-settings-page.min.css

    r3329559 r3371703  
    1 .apbct_settings-field_title--radio,.apbct_settings-field_title--select,.apbct_settings-field_title--textarea{padding-right:10px;margin:0;font-size:14px;vertical-align:top;width:210px}.apbct_settings-field_content,.apbct_settings-field_title--radio,.cleantalk_link-auto,.cleantalk_link-manual,.ct-warning-test-failed,.ct_rate_block,.ct_settings_banner,i.animate-spin{display:inline-block}.apbct_settings-page{padding-right:10px}#apbctTopWarning{margin-bottom:5px}#apbctTopWarning h3{margin:10px 0 5px}#apbctTopWarning h4{margin:10px}#apbctTopWarning h4 span{margin-top:5px}.apbct_settings-subtitle{position:relative;top:-15px;margin:0}.apbct_settings-field_wrapper{margin:15px 0}.apbct_settings-field_wrapper--sub{margin-left:30px!important}.apbct_settings__label{margin-right:10px;font-size:17px;vertical-align:text-bottom}.apbct_settings-field_content--radio,.apbct_settings-field_wrapper>.apbct_settings-field_description{width:70%;padding-bottom:10px}.apbct_settings-field_title--select,.apbct_settings-field_title--textarea{padding-bottom:10px}.apbct_input_text{min-width:255px;width:400px}.apbct_settings-long_description---show:hover{color:#aaa;cursor:pointer}.apbct_setting_textarea{min-width:300px}.cleantalk_link{text-decoration:none;font-size:13px;line-height:26px;margin:10px 0 0;padding:0 10px 1px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;white-space:nowrap;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.cleantalk_link-auto{background:#ccc;border-color:#999;-webkit-box-shadow:inset 0 1px 0 rgba(200,200,200,.5),0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 rgba(200,200,200,.5),0 1px 0 rgba(0,0,0,.15);color:#000;height:28px;-webkit-border-radius:2px;border-radius:2px}.cleantalk_link-auto:hover{color:#fff}.cleantalk_link-manual{background:#2ea2cc;border-color:#0074a2;-webkit-box-shadow:inset 0 1px 0 rgba(120,200,230,.5),0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 rgba(120,200,230,.5),0 1px 0 rgba(0,0,0,.15);color:#fff;-webkit-border-radius:3px;border-radius:3px;text-align:center}.cleantalk_link-manual:hover{color:#000}.cleantalk_link[disabled=disabled]{background:#5d9db5;color:#000}.apbct_status_icon{vertical-align:text-bottom;margin:0 5px 0 8px}a.ct_support_link{color:#666;margin-right:.5em;font-size:10pt;font-weight:400}.ct-warning-test-failed{position:relative;padding:5px;margin:4px;border:3px solid rgba(240,50,50,1);border-radius:5px;background-color:rgba(255,200,200,1)}.ct_settings_banner{text-align:right;width:100%;margin:1em 0;vertical-align:top}#ct_translate_plugin{margin-left:0}.ct_rate_block{width:370px;margin-right:3em;padding:.8em .8em 15px;text-align:center;border:1px dashed #666}#ct_translate_plugin .apbct_button_rate{margin-bottom:10px}.apbct_long_desc{position:absolute;background:#5a5a5a;min-width:80px;min-height:80px;max-width:500px;padding:10px;color:#fff;z-index:10}.apbct_long_desc a,i.animate-spin{color:rgba(120,200,230,1)}i.animate-spin{-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;-webkit-animation:spin 2s infinite linear;animation:spin 2s infinite linear;font-size:25px;line-height:20px;margin:25px}@keyframes spin{to{transform:rotate(359deg)}}.apbct_long_desc__cancel{position:absolute;top:5px;right:5px;color:rgba(255,255,255,.5)}.apbct_long_desc__cancel:hover{color:#fff}.apbct_long_desc__angle{position:absolute;top:5px;left:-17px;width:10px;height:10px;background:#5a5a5a;-webkit-transform:rotate(135deg);-ms-transform:rotate(135deg);transform:rotate(135deg);-webkit-transform-origin:100% 100%;-ms-transform-origin:100% 100%;transform-origin:100% 100%}.apbct_long_desc__title{color:rgba(120,200,230,1);margin:0}.--hide{display:none}.apbct_preloader_button{height:15px;margin-left:5px;vertical-align:text-top;display:none}.--invisible{visibility:hidden}.apbct_preloader{height:1em;width:1em;margin-left:.5em;display:inline-block}.key_changed_success,.key_changed_sync{font-size:1.5em;line-height:2em;vertical-align:middle}.--upper-case{text-transform:uppercase}#cleantalk-modal-content{text-align:center}#cleantalk-modal-content>*{display:block;width:100%}button.ct_support_link{border:none;background:0 0;color:#666;text-decoration:underline;cursor:pointer}.apbct-btn-as-link{padding:0;margin:0;vertical-align:baseline;color:gray;border:0;border-bottom:1px solid;cursor:pointer}#apbct-account-email[contenteditable=true]{padding:6px;background-color:#fff;border:1px solid #ccc}button[value=save_changes]:disabled{color:#2271b1;border-color:#2271b1;background:#f6f7f7}#apbct_settings__advanced_settings{position:relative}#apbct_settings__advanced_settings_inner{width:70%}#apbct_hidden_section_nav{position:absolute;top:0;right:0;width:200px}#apbct_hidden_section_nav ul{z-index:9999;width:100%;top:40px}.apbct_settings__position_main_save_button{text-align:right;margin-right:40px}#apbct_settings__after_advanced_settings{margin-bottom:20px;width:70%}#apbct_settings__button_section{position:static;z-index:9999;padding-bottom:40px;bottom:0}.apbct_highlighted{outline-offset:5px;outline-color:red;outline-width:3px!important;outline-style:solid!important}.apbct_notice_inner{display:flex;margin-top:10px!important}.apbct_notification__advanced_settings{margin:20px 0;font-weight:400}.apbct_settings_top_info__div{float:right;padding:0 20px 0 0;font-size:13px;position:relative}.apbct_settings_top_info__p{padding:0;margin:2px}.apbct_settings_top_info__btn{display:inline-flex;gap:10px}.apbct_hidden_section_nav_mob_btn{display:none;background-image:url(images/menu.svg);background-repeat:no-repeat;background-size:contain;background-position-y:center}.apbct_hidden_section_nav_mob_btn-close{display:none}.apbct_settings__footer{background:#c2c2c2;position:absolute;left:0;padding-bottom:30px;padding-left:21px;z-index:-1}.apbct_settings_top_info__sub_btn{display:flex;flex-wrap:wrap;gap:10px;margin:15px 0}.apbct_settings__key_line{display:flex;align-items:center;justify-content:flex-start;flex-direction:row}.apbct_settings__key_line__elements{margin-right:10px}.apbct_setting__key_line__buttons{margin:0}.apbct_setting__key_line__get_key_manual_chunk{margin:10px 0;border:1px solid #d3d3d3;border-radius:3px;padding:10px;background:#FFF}.apbct_settings__key_line__service_block{margin-left:10px}#apbct_settings__public_offer{margin-top:10px;display:flex;align-items:center}#cleantalk_apikey_wrapper{max-width:65%}.apcbt_contact_data_encoder__line{max-width:70%;display:flex;flex-wrap:wrap;flex-direction:row}.apbct_warning_red_point{display:inline-block;width:4px;height:4px;background:red;border-radius:100%;margin-left:10px;margin-bottom:10px;vertical-align:middle;position:relative}.apbct_warning_red_point::after{content:'';position:absolute;left:-5px;top:-5px;width:12px;height:12px;border:1.5px solid rgba(255,2,2,.65);border-radius:50%;animation:apbct_pulsate 1.2s ease-out infinite;opacity:.7;pointer-events:none}#apbct_statistics{display:flex;flex-wrap:wrap;gap:40px}@keyframes apbct_pulsate{0%,100%{transform:scale(1);opacity:.7}50%{transform:scale(1.4);opacity:.2}}@media (max-width:768px){.apbct_settings_top_info__btn{display:inline-grid;width:100%;gap:5px}#apbct_settings__advanced_settings_inner,#apbct_settings__after_advanced_settings,.apbct_settings-field_content--radio,.apbct_settings-field_wrapper>.apbct_settings-field_description{width:100%}.apbct_settings_top_info__sub_btn .apbct_bottom_links--left,.apbct_settings_top_info__sub_btn .apbct_bottom_links--other{margin-left:0;margin-right:0}#apbct_hidden_section_nav ul{display:none;background-color:#dadee3bd;margin:0;padding:10px;border-radius:3px;right:0;width:auto}#apbct_hidden_section_nav{right:0;min-width:167px}.apbct_setting_radio::before{height:6px!important;width:6px!important;margin:4px!important}.apbct_setting_checkbox::before{height:15px!important;width:15px!important;margin:0 -.05rem!important}.apbct_setting_checkbox,.apbct_setting_radio{height:16px!important;width:16px!important}.apbct_hidden_section_nav_mob_btn{display:block;width:32px;height:28px;right:20px;top:20px;position:fixed}.apbct_hidden_section_nav_mob_btn-close{display:block;position:relative;float:right;width:20px;height:22px;top:-5px;right:-5px;background-image:url(images/cancel.svg);background-repeat:no-repeat;background-size:contain;background-position-y:center;text-align:center}.apbct_long_desc{left:-2%!important;max-width:95%;margin-top:10%}.apbct_long_desc__angle{display:none}.ct_rate_block{max-width:240px;margin-right:20px}.apbct_settings__key_line{display:flex;align-items:flex-start;flex-direction:column;width:100%}.apbct_settings__key_line__elements{margin:5px 0}#apbct_setting_apikey,.apbct_setting__key_line__buttons,.apbct_settings__key_line__elements{width:100%}#cleantalk_apikey_wrapper{max-width:100%}#apbct_settings__button_section{position:fixed;right:20px}.apcbt_contact_data_encoder__line{max-width:100%;margin-top:5px}}
     1.apbct_settings-field_title--radio,.apbct_settings-field_title--select,.apbct_settings-field_title--textarea{padding-right:10px;margin:0;font-size:14px;vertical-align:top;width:210px}#cleantalk-modal-content,.cleantalk_link-auto.cleantalk_link_text_center,.cleantalk_link-manual,.ct_rate_block{text-align:center}.apbct_settings-field_content,.apbct_settings-field_title--radio,.cleantalk_link-auto,.cleantalk_link-manual,.ct-warning-test-failed,.ct_rate_block,.ct_settings_banner,i.animate-spin{display:inline-block}.apbct_settings-page{padding-right:10px}#apbctTopWarning{margin-bottom:5px}#apbctTopWarning h3{margin:10px 0 5px}#apbctTopWarning h4{margin:10px}#apbctTopWarning h4 span{margin-top:5px}.apbct_settings-subtitle{position:relative;top:-15px;margin:0}.apbct_settings-field_wrapper{margin:15px 0}.apbct_settings-field_wrapper--sub{margin-left:30px!important}.apbct_settings__label{margin-right:10px;font-size:17px;vertical-align:text-bottom}.apbct_settings-field_content--radio,.apbct_settings-field_wrapper>.apbct_settings-field_description{width:70%;padding-bottom:10px}.apbct_settings-field_title--select,.apbct_settings-field_title--textarea{padding-bottom:10px}.apbct_input_text{min-width:255px;width:400px}.apbct_settings-long_description---show:hover{color:#aaa;cursor:pointer}.apbct_setting_textarea{min-width:300px}.cleantalk_link{text-decoration:none;font-size:13px;line-height:26px;margin:10px 0 0;padding:0 10px 1px;cursor:pointer;border-width:1px;border-style:solid;-webkit-appearance:none;white-space:nowrap;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.cleantalk_link-auto{background:#ccc;border-color:#999;-webkit-box-shadow:inset 0 1px 0 rgba(200,200,200,.5),0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 rgba(200,200,200,.5),0 1px 0 rgba(0,0,0,.15);color:#000;height:28px;-webkit-border-radius:2px;border-radius:2px}.cleantalk_link-auto:hover{color:#fff}.cleantalk_link-manual{background:#2ea2cc;border-color:#0074a2;-webkit-box-shadow:inset 0 1px 0 rgba(120,200,230,.5),0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 rgba(120,200,230,.5),0 1px 0 rgba(0,0,0,.15);color:#fff;-webkit-border-radius:3px;border-radius:3px}.cleantalk_link-manual:hover{color:#000}.cleantalk_link[disabled=disabled]{background:#5d9db5;color:#000}.apbct_status_icon{vertical-align:text-bottom;margin:0 5px 0 8px}.apbct-icon-upload-cloud{margin-right:3px}a.ct_support_link{color:#666;margin-right:.5em;font-size:10pt;font-weight:400}.ct-warning-test-failed{position:relative;padding:5px;margin:4px;border:3px solid rgba(240,50,50,1);border-radius:5px;background-color:rgba(255,200,200,1)}.ct_settings_banner{text-align:right;width:100%;margin:1em 0;vertical-align:top}#ct_translate_plugin{margin-left:0}.ct_rate_block{width:370px;margin-right:3em;padding:.8em .8em 15px;border:1px dashed #666}#ct_translate_plugin .apbct_button_rate{margin-bottom:10px}.apbct_long_desc{position:absolute;background:#5a5a5a;min-width:80px;min-height:80px;max-width:500px;padding:10px;color:#fff;z-index:10}.apbct_long_desc a,i.animate-spin{color:rgba(120,200,230,1)}i.animate-spin{-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;-webkit-animation:spin 2s infinite linear;animation:spin 2s infinite linear;font-size:25px;line-height:20px;margin:25px}@keyframes spin{to{transform:rotate(359deg)}}.apbct_long_desc__cancel{position:absolute;top:5px;right:5px;color:rgba(255,255,255,.5)}.apbct_long_desc__cancel:hover{color:#fff}.apbct_long_desc__angle{position:absolute;top:5px;left:-17px;width:10px;height:10px;background:#5a5a5a;-webkit-transform:rotate(135deg);-ms-transform:rotate(135deg);transform:rotate(135deg);-webkit-transform-origin:100% 100%;-ms-transform-origin:100% 100%;transform-origin:100% 100%}.apbct_long_desc__title{color:rgba(120,200,230,1);margin:0}.--hide{display:none}.apbct_preloader_button{height:15px;margin-left:5px;vertical-align:text-top;display:none}.--invisible{visibility:hidden}.apbct_preloader{height:1em;width:1em;margin-left:.5em;display:inline-block}.key_changed_success,.key_changed_sync{font-size:1.5em;line-height:2em;vertical-align:middle}.--upper-case{text-transform:uppercase}#cleantalk-modal-content>*{display:block;width:100%}.cleantalk-confirm-modal_header{font-size:15px;font-weight:500}.cleantalk-confirm-modal_text-block{padding:10px 0}.cleantalk-confirm-modal_buttons-block{display:flex!important;gap:10px;justify-content:center}button.ct_support_link{border:none;background:0 0;color:#666;text-decoration:underline;cursor:pointer}.apbct-btn-as-link{padding:0;margin:0;vertical-align:baseline;color:gray;border:0;border-bottom:1px solid;cursor:pointer}#apbct-account-email[contenteditable=true]{padding:6px;background-color:#fff;border:1px solid #ccc}button[value=save_changes]:disabled{color:#2271b1;border-color:#2271b1;background:#f6f7f7}#apbct_settings__advanced_settings{position:relative}#apbct_settings__advanced_settings_inner{width:70%}#apbct_hidden_section_nav{position:absolute;top:0;right:0;width:200px}#apbct_hidden_section_nav ul{z-index:9999;width:100%;top:40px}.apbct_settings__position_main_save_button{text-align:right;margin-right:40px}#apbct_settings__after_advanced_settings{margin-bottom:20px;width:70%}#apbct_settings__button_section{position:static;z-index:9999;padding-bottom:40px;bottom:0}.apbct_highlighted{outline-offset:5px;outline-color:red;outline-width:3px!important;outline-style:solid!important}.apbct_notice_inner{display:flex;margin-top:10px!important}.apbct_notification__advanced_settings{margin:20px 0;font-weight:400}.apbct_settings_top_info__div{float:right;padding:0 20px 0 0;font-size:13px;position:relative}.apbct_settings_top_info__p{padding:0;margin:2px}.apbct_settings_top_info__btn{display:inline-flex;gap:10px}.apbct_hidden_section_nav_mob_btn{display:none;background-image:url(images/menu.svg);background-repeat:no-repeat;background-size:contain;background-position-y:center}.apbct_hidden_section_nav_mob_btn-close{display:none}.apbct_settings__footer{background:#c2c2c2;position:absolute;left:0;padding-bottom:30px;padding-left:21px;z-index:-1}.apbct_settings_top_info__sub_btn{display:flex;flex-wrap:wrap;gap:10px;margin:15px 0}.apbct_settings__key_line{display:flex;align-items:center;justify-content:flex-start;flex-direction:row}.apbct_settings__key_line__elements{margin-right:10px}.apbct_setting__key_line__buttons{margin:0}.apbct_setting__key_line__get_key_manual_chunk{margin:10px 0;border:1px solid #d3d3d3;border-radius:3px;padding:10px;background:#FFF}.apbct_settings__key_line__service_block{margin-left:10px}#apbct_settings__public_offer{margin-top:10px;display:flex;align-items:center}#cleantalk_apikey_wrapper{max-width:65%}.apcbt_contact_data_encoder__line{max-width:70%;display:flex;flex-wrap:wrap;flex-direction:row}.apbct_warning_red_point{display:inline-block;width:4px;height:4px;background:red;border-radius:100%;margin:0 10px 3px 3px;vertical-align:middle;position:relative}.apbct_warning_red_point::after{content:'';position:absolute;left:50%;top:50%;width:12px;height:12px;border:1.5px solid rgba(255,2,2,.65);border-radius:50%;animation:apbct_pulsate 1.2s ease-out infinite;opacity:.7;pointer-events:none;transform:translate(-50%,-50%)}#apbct_summary_and_support{display:flex;flex-wrap:wrap;width:-webkit-fill-available;border:1px solid #ddd;border-radius:3px;padding:10px;background:#ededed;margin-top:4em}#apbct_summary_and_support-left_side{width:69%;padding:0 20px 0 0}#apbct_summary_and_support-right_side{width:31%;padding:0 20px;border-left:1px solid #dcdcde}#apbct_summary_and_support-sides_wrap{display:flex;flex-direction:row;margin:10px 0;width:100%}.apbct_summary_and_support-side_header{margin:.5em 0}.apbct_summary_and_support-inner_header{margin:2em 0 .5em;font-size:medium}.apbct_summary_and_support-inner_header::after{content:'';display:block;width:100%;height:1px;background:linear-gradient(90deg,#d3d3d357 0,rgba(211,211,211,.14) 10%,transparent 100%);margin-top:5px}.apbct_summary_and_support-support_buttons_wrapper{display:flex;flex-direction:column}#apbct_summary_and_support-create_user_button{display:inline-flex;flex-direction:row;align-items:center;justify-content:center}.apbct_summary_and_support-user_creation_result{background:#eee;margin-top:10px;padding:5px;border:1px solid #d3d3d3;display:none}.apbct_summary-list_of_items{display:flex;flex-direction:column}.apbct_summary_list_item{margin-bottom:2px}.apbct-green{color:green}.apbct-red{color:red}#apbct_negative_reports_table{width:100%;border-collapse:collapse;margin:10px 5px}#apbct_sending_report_div{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;flex-wrap:nowrap}#apbct_sending_report_disabled_notice{margin-right:5px}@keyframes apbct_pulsate{0%{transform:translate(-50%,-50%) scale(1);opacity:.7}100%{transform:translate(-50%,-50%) scale(1.5);opacity:0}}@media (max-width:768px){.apbct_settings_top_info__btn{display:inline-grid;width:100%;gap:5px}#apbct_settings__advanced_settings_inner,#apbct_settings__after_advanced_settings,.apbct_settings-field_content--radio,.apbct_settings-field_wrapper>.apbct_settings-field_description{width:100%}.apbct_settings_top_info__sub_btn .apbct_bottom_links--left,.apbct_settings_top_info__sub_btn .apbct_bottom_links--other{margin-left:0;margin-right:0}#apbct_hidden_section_nav ul{display:none;background-color:#dadee3bd;margin:0;padding:10px;border-radius:3px;right:0;width:auto}#apbct_hidden_section_nav{right:0;min-width:167px}.apbct_setting_radio::before{height:6px!important;width:6px!important;margin:4px!important}.apbct_setting_checkbox::before{height:15px!important;width:15px!important;margin:0 -.05rem!important}.apbct_setting_checkbox,.apbct_setting_radio{height:16px!important;width:16px!important}.apbct_hidden_section_nav_mob_btn{display:block;width:32px;height:28px;right:20px;top:20px;position:fixed}.apbct_hidden_section_nav_mob_btn-close{display:block;position:relative;float:right;width:20px;height:22px;top:-5px;right:-5px;background-image:url(images/cancel.svg);background-repeat:no-repeat;background-size:contain;background-position-y:center;text-align:center}.apbct_long_desc{left:-2%!important;max-width:95%;margin-top:10%}.apbct_long_desc__angle{display:none}.ct_rate_block{max-width:240px;margin-right:20px}.apbct_settings__key_line{display:flex;align-items:flex-start;flex-direction:column;width:100%}.apbct_settings__key_line__elements{margin:5px 0}#apbct_setting_apikey,.apbct_setting__key_line__buttons,.apbct_settings__key_line__elements{width:100%}#apbct_summary_and_support-left_side,#apbct_summary_and_support-right_side{border-top:1px solid #dcdcde;width:-webkit-fill-available}#cleantalk_apikey_wrapper{max-width:100%}#apbct_settings__button_section{position:fixed;right:20px}.apcbt_contact_data_encoder__line{max-width:100%;margin-top:5px}#apbct_summary_and_support-right_side{border-left:0;margin:35px 0 0;padding:0}#apbct_summary_and_support-sides_wrap{flex-direction:column}}
  • cleantalk-spam-protect/trunk/inc/cleantalk-admin.php

    r3342680 r3371703  
    1414use Cleantalk\ApbctWP\LinkConstructor;
    1515use Cleantalk\Common\TT;
     16use Cleantalk\ApbctWP\SupportUser;
    1617
    1718// Prevent direct call
     
    603604            'ip_license'  => $apbct->ip_license ? true : false,
    604605            'key_changed' => ! empty($apbct->data['key_changed']),
    605             'key_is_ok'   => ! empty($apbct->key_is_ok) && !empty($apbct->settings['apikey'])
     606            'key_is_ok'   => ! empty($apbct->key_is_ok) && !empty($apbct->settings['apikey']),
     607            'support_user_creation_msg_array' => SupportUser::getMessages(),
    606608        ));
    607609
     
    14851487    wp_send_json_success();
    14861488}
     1489
     1490function apbct_action__create_support_user()
     1491{
     1492    $support_user = new SupportUser();
     1493    $result = $support_user->ajaxProcess();
     1494    wp_send_json($result);
     1495}
  • cleantalk-spam-protect/trunk/inc/cleantalk-ajax.php

    r3357730 r3371703  
    570570        }
    571571
    572         if ( Post::getString('action', 'glsr_public_action') ) {
     572        if ( Post::getString('action') === 'glsr_public_action' ) {
    573573            $result = array(
    574574                'success' => false,
     
    10041004        }
    10051005
     1006        // Indeed Coming Soon
     1007        // Works only with special Indeed plugin version. Look at https://doboard.com/1/task/31617#comment_207324
     1008        if (
     1009            Post::getString('action') === 'ics_save_email_subscribe' ||
     1010            Post::getString('action') === 'ics_send_email_fc'
     1011        ) {
     1012            wp_send_json_error($ct_result->comment);
     1013        }
     1014
    10061015        // Regular block output
    10071016        die(
     
    10611070    if (
    10621071        Post::hasString('action', 'tve_leads_ajax_') ||
     1072        Post::hasString('action', 'submit_nex_form') ||
    10631073        (Post::hasString('action', 'xoo_el_form_action') && Post::hasString('_xoo_el_form', 'register')) ||
    10641074        (Post::get('elqFormName') && Post::get('elqSiteId') && Post::get('elqFormSubmissionToken'))
  • cleantalk-spam-protect/trunk/inc/cleantalk-common.php

    r3363712 r3371703  
    287287    // Statistics
    288288    // Average request time
    289     apbct_statistics__rotate($exec_time);
     289    apbct_statistics_rotate($exec_time);
    290290    // Last request
    291291    $apbct->stats['last_request']['time']   = time();
  • cleantalk-spam-protect/trunk/inc/cleantalk-integrations-by-hook.php

    r3363712 r3371703  
    463463        'setting' => 'forms__registrations_test',
    464464        'ajax'    => false
     465    ),
     466    'NEXForms' => array(
     467        'hook'    => 'submit_nex_form',
     468        'setting' => 'forms__contact_forms_test',
     469        'ajax'    => true
    465470    ),
    466471);
  • cleantalk-spam-protect/trunk/inc/cleantalk-pluggable.php

    r3363712 r3371703  
    717717            'cscf-submitform', // CSCF has direct integration
    718718            'mailpoet', // Mailpoet has direct integration
     719            'wpcommunity_auth_login', // WPCommunity login
     720            'submit_nex_form', // NEXForms has direct integration
    719721        );
    720722
     
    10301032        // WP Booking System Premium
    10311033        if (
    1032             (apbct_is_plugin_active('wp-booking-system-premium/index.php') &&
    1033             TT::toString(Post::get('action')) === 'wpbs_calculate_pricing') ||
    1034             TT::toString(Post::get('action')) === 'wpbs_validate_date_selection'
     1034            apbct_is_plugin_active('wp-booking-system-premium/index.php') &&
     1035            (TT::toString(Post::get('action')) === 'wpbs_calculate_pricing' ||
     1036            TT::toString(Post::get('action')) === 'wpbs_validate_date_selection')
    10351037        ) {
    10361038            return 'WP Booking System Premium';
     
    11281130        if (
    11291131            apbct_is_plugin_active('custom-registration-form-builder-with-submission-manager/registration_magic.php') &&
    1130             Post::get('action') === 'rm_user_exists' ||
     1132            (Post::get('action') === 'rm_user_exists' ||
    11311133            Post::get('action') === 'check_username_validity' ||
    1132             Post::get('action') === 'check_email_exists'
     1134            Post::get('action') === 'check_email_exists')
    11331135        ) {
    11341136            return 'RegistrationMagic service request';
     
    11371139        //Wp Booking System request - having the direct integration
    11381140        if (
    1139             apbct_is_plugin_active('wp-booking-system/wp-booking-system.php') &&
     1141            (
     1142                apbct_is_plugin_active('wp-booking-system/wp-booking-system.php') ||
     1143                apbct_is_plugin_active('wp-booking-system-premium/index.php')
     1144            ) &&
    11401145            Post::get('action') === 'wpbs_submit_form'
    11411146        ) {
     
    13311336        if (
    13321337            apbct_is_plugin_active('geodirectory/geodirectory.php') &&
    1333             Post::get('action') === 'geodir_auto_save_post' ||
    1334             Post::get('action') === 'geodir_save_post'
     1338            (Post::get('action') === 'geodir_auto_save_post' ||
     1339            Post::get('action') === 'geodir_save_post')
    13351340        ) {
    13361341            return 'WP GeoDirectory service action';
     
    13521357                apbct_is_plugin_active('easy-digital-downloads-pro/easy-digital-downloads.php')
    13531358            ) &&
    1354             Post::get('action') === 'edd_add_to_cart' ||
     1359            (Post::get('action') === 'edd_add_to_cart' ||
    13551360            Post::get('action') === 'edd_get_shipping_rate' ||
    13561361            Post::get('action') === 'edd_check_email' ||
    1357             Post::get('action') === 'edd_recalculate_discounts_pro'
     1362            Post::get('action') === 'edd_recalculate_discounts_pro')
    13581363        ) {
    13591364            return 'Easy Digital Downloads service action';
     
    13651370                apbct_is_plugin_active('bookingpress-appointment-booking-pro/bookingpress-appointment-booking-pro.php')
    13661371            ) &&
    1367             Post::get('action') === 'bookingpress_pre_booking_verify_details' ||
    1368             Post::get('action') === 'bookingpress_book_appointment_booking'
     1372            (Post::get('action') === 'bookingpress_pre_booking_verify_details' ||
     1373            Post::get('action') === 'bookingpress_book_appointment_booking')
    13691374        ) {
    13701375            return 'BookingPress service action';
     
    15461551        if (
    15471552            (apbct_is_theme_active('Avada') || apbct_is_theme_active('Avada Child')) &&
    1548             Post::get('action') === 'fusion_form_submit_form_to_database_email' ||
     1553            (Post::get('action') === 'fusion_form_submit_form_to_database_email' ||
    15491554            Post::get('action') === 'fusion_form_submit_form_to_email' ||
    1550             Post::get('action') === 'fusion_form_submit_ajax'
     1555            Post::get('action') === 'fusion_form_submit_ajax')
    15511556        ) {
    15521557            return 'fusion_form/avada_theme skip';
     
    16071612        ) {
    16081613            return 'wwlc_create_user';
     1614        }
     1615
     1616        // Fluent Booking Pro ave the direct integration
     1617        if (
     1618            apbct_is_plugin_active('fluent-booking-pro/fluent-booking-pro.php') &&
     1619            Post::getString('action') === 'fluent_cal_schedule_meeting'
     1620        ) {
     1621            return 'Fluent Booking Pro skip';
    16091622        }
    16101623    } else {
     
    16471660        if ( (apbct_is_plugin_active('happyforms-upgrade/happyforms-upgrade.php') ||
    16481661              apbct_is_plugin_active('happyforms/happyforms.php')) &&
    1649              (Post::get('happyforms_message_nonce') !== '') ||
    1650              (Post::get('action') === 'happyforms_message' && Post::get('happyforms_form_id') !== '')
     1662             ((Post::get('happyforms_message_nonce') !== '') ||
     1663             (Post::get('action') === 'happyforms_message' && Post::get('happyforms_form_id') !== ''))
    16511664        ) {
    16521665            return 'happyform_skipped';
     
    17161729            apbct_is_plugin_active('restrict-content-pro/restrict-content-pro.php') &&
    17171730            Post::equal('rcp_action', 'login') &&
    1718             Post::get('rcp_user_login') ||
    1719             Post::get('rcp_user_pass')
     1731            (Post::get('rcp_user_login') ||
     1732            Post::get('rcp_user_pass'))
    17201733        ) {
    17211734            return 'Restrict Content Pro Login Form skip';
     
    17241737        if (
    17251738            apbct_is_plugin_active('cleantalk-spam-protect/cleantalk.php') &&
    1726             apbct_is_in_uri('cleantalk-antispam/v1/check_email_before_post') ||
    1727             apbct_is_in_uri('cleantalk-antispam/v1/check_email_exist_post')
     1739            (apbct_is_in_uri('cleantalk-antispam/v1/check_email_before_post') ||
     1740            apbct_is_in_uri('cleantalk-antispam/v1/check_email_exist_post'))
    17281741        ) {
    17291742            return 'APBCT service actions';
  • cleantalk-spam-protect/trunk/inc/cleantalk-public-integrations.php

    r3363712 r3371703  
    869869    }
    870870
     871    /**
     872     * Exclusions
     873     */
    871874    if ( Post::get('wpmem_reg_page') && apbct_is_plugin_active('wp-members/wp-members.php') ) {
     875        return $errors;
     876    }
     877    // BuddyBoss login form
     878    if ( Post::getString('wp-submit') && Post::getString('log') && Post::getString('pwd') ) {
    872879        return $errors;
    873880    }
  • cleantalk-spam-protect/trunk/inc/cleantalk-public-validate.php

    r3357730 r3371703  
    5454    if (
    5555        apbct_is_in_uri('wc-ajax=update_order_review') ||
     56        apbct_is_in_uri('wc-ajax=apply_coupon') ||
    5657        apbct_is_in_uri('wc-ajax=checkout') ||
    5758        !empty($_POST['woocommerce_checkout_place_order']) ||
  • cleantalk-spam-protect/trunk/inc/cleantalk-settings.php

    r3348065 r3371703  
    1414use Cleantalk\Common\TT;
    1515use Cleantalk\ApbctWP\PluginSettingsPage\SettingsField;
     16use Cleantalk\ApbctWP\PluginSettingsPage\SummaryAndSupportRenderer;
    1617use Cleantalk\ApbctWP\ServerRequirementsChecker\ServerRequirementsChecker;
    1718
     
    631632                'data__email_check_exist_post'        => array(
    632633                    'title'       => __('Show email existence alert when filling in the field', 'cleantalk-spam-protect'),
    633                     'description' => __('Checks the email address and shows the result as an icon in the email field before submitting the form. Works only for the standard WordPress comment form.', 'cleantalk-spam-protect'),
     634                    'description' => __('Checks the email address and shows the result as an icon in the email field before submitting the form. Works for WooCommerce checkout form, FluentForms, standard WordPress comment form and registration form.', 'cleantalk-spam-protect'),
    634635                ),
    635636            ),
     
    13801381    if ( $apbct->key_is_ok && apbct_api_key__is_correct() ) {
    13811382        if ( $apbct->network_settings['multisite__work_mode'] != 2 || is_main_site() ) {
    1382             // Support button
    1383             echo '<a class="cleantalk_link cleantalk_link-auto" target="__blank" href="' . $apbct->data['wl_support_url'] . '" style="text-align: center;">' .
    1384                  __('Support', 'cleantalk-spam-protect') . '</a>';
     1383            $checker = new ServerRequirementsChecker();
     1384            $warnings = $checker->checkRequirements() ?: [];
     1385            $has_requirements_warning = !empty($warnings);
     1386
     1387            $dot = $has_requirements_warning
     1388            ? '<span class="apbct_warning_red_point"></span>'
     1389            : '';
     1390            echo '<a class="cleantalk_link cleantalk_link-auto" style="text-align: center;" onclick="apbctShowHideElem(\'apbct_summary_and_support\')">'
     1391                 . $dot
     1392                 . __('Summary & Support', 'cleantalk-spam-protect') . '</a>';
    13851393        }
    13861394    }
     
    20192027    global $apbct;
    20202028
    2021     $checker = new ServerRequirementsChecker();
    2022     $warnings = $checker->checkRequirements() ?: [];
    2023     $has_requirements_warning = !empty($warnings);
    2024 
    20252029    add_filter('apbct_settings_action_buttons', function ($buttons_array) {
    20262030        $buttons_array[] =
     
    20452049    }
    20462050
    2047     add_filter('apbct_settings_action_buttons', function ($buttons_array) use ($has_requirements_warning) {
    2048         $dot = $has_requirements_warning
    2049             ? '<span class="apbct_warning_red_point"></span>'
    2050             : '';
    2051         $buttons_array[] =
    2052             '<a href="#" class="ct_support_link" onclick="apbctShowHideElem(\'apbct_statistics\')">'
    2053             . __('Statistics & Reports', 'cleantalk-spam-protect')
    2054             . $dot
    2055             . '</a>';
    2056         return $buttons_array;
    2057     });
    2058 
    20592051    $links = apply_filters('apbct_settings_action_buttons', array());
    20602052
     
    20652057            echo Escape::escKsesPreset($link, 'apbct_settings__display__groups');
    20662058        }
    2067     } elseif ( apbct__is_hosting_license() ) {
    2068         echo '<a href="#" class="ct_support_link" onclick="apbctShowHideElem(\'apbct_statistics\')">'
    2069              . __('Statistics & Reports', 'cleantalk-spam-protect')
    2070              . '</a>';
    20712059    }
    20722060
     
    20782066    global $apbct;
    20792067
    2080     echo '<div id="apbct_statistics" class="apbct_settings-field_wrapper" style="display: none;">';
    2081     echo '<div>';
    2082     // Last request
    2083     // Get the server information
    2084     $server = isset($apbct->stats['last_request']['server']) && $apbct->stats['last_request']['server']
    2085         ? Escape::escUrl($apbct->stats['last_request']['server'])
    2086         : __('unknown', 'cleantalk-spam-protect');
    2087 
    2088     // Get the time information
    2089     $time = isset($apbct->stats['last_request']['time']) && $apbct->stats['last_request']['time']
    2090         ? date('M d Y H:i:s', $apbct->stats['last_request']['time'])
    2091         : __('unknown', 'cleantalk-spam-protect');
    2092 
    2093     // Output the result
    2094     printf(
    2095         __('Last spam check request to %s server was at %s.', 'cleantalk-spam-protect'),
    2096         $server ? $server : __('unknown', 'cleantalk-spam-protect'),
    2097         $time ? $time : __('unknown', 'cleantalk-spam-protect')
    2098     );
    2099     echo '<br>';
    2100 
    2101     // Average time request
    2102     // Get the earliest date from the requests stats
    2103     $earliest_date = null;
    2104     if (!empty($apbct->stats['requests'])) {
    2105         $request_keys = array_keys($apbct->stats['requests']);
    2106         if (!empty($request_keys)) {
    2107             $earliest_date = min($request_keys);
    2108         }
    2109     }
    2110 
    2111     // Get the average time for the earliest date, if it exists
    2112     $average_time = null;
    2113     if ($earliest_date !== null && isset($apbct->stats['requests'][$earliest_date]['average_time'])) {
    2114         $average_time = $apbct->stats['requests'][$earliest_date]['average_time'];
    2115     }
    2116 
    2117     // Format the average time
    2118     $formatted_time = $average_time !== null
    2119         ? round($average_time, 3)
    2120         : __('unknown', 'cleantalk-spam-protect');
    2121 
    2122     // Output the result
    2123     printf(
    2124         __('Average request time for past 7 days: %s seconds.', 'cleantalk-spam-protect'),
    2125         $formatted_time
    2126     );
    2127     echo '<br>';
    2128 
    2129     // SFW last die
    2130     $last_sfw_block_ip = isset($apbct->stats['last_sfw_block']['ip']) && $apbct->stats['last_sfw_block']['ip']
    2131         ? $apbct->stats['last_sfw_block']['ip']
    2132         : __('unknown', 'cleantalk-spam-protect');
    2133 
    2134     $last_sfw_block_time = isset($apbct->stats['last_sfw_block']['time']) && $apbct->stats['last_sfw_block']['time']
    2135         ? date('M d Y H:i:s', $apbct->stats['last_sfw_block']['time'])
    2136         : __('unknown', 'cleantalk-spam-protect');
    2137 
    2138     printf(
    2139         __('Last time SpamFireWall was triggered for %s IP at %s', 'cleantalk-spam-protect'),
    2140         $last_sfw_block_ip,
    2141         $last_sfw_block_time ? $last_sfw_block_time : __('unknown', 'cleantalk-spam-protect')
    2142     );
    2143     echo '<br>';
    2144 
    2145     // SFW last update
    2146     $last_update_time = isset($apbct->stats['sfw']['last_update_time']) && $apbct->stats['sfw']['last_update_time']
    2147         ? date('M d Y H:i:s', $apbct->stats['sfw']['last_update_time'])
    2148         : __('unknown', 'cleantalk-spam-protect');
    2149 
    2150     printf(
    2151         __('SpamFireWall was updated %s. Now contains %s entries.', 'cleantalk-spam-protect'),
    2152         $last_update_time ? $last_update_time : __('unknown', 'cleantalk-spam-protect'),
    2153         isset($apbct->stats['sfw']['entries']) ? (int)$apbct->stats['sfw']['entries'] : __('unknown', 'cleantalk-spam-protect')
    2154     );
    2155     echo $apbct->fw_stats['firewall_updating_id']
    2156         ? ' ' . __('Under updating now:', 'cleantalk-spam-protect') . ' ' . (int)$apbct->fw_stats['firewall_update_percent'] . '%'
    2157         : '';
    2158     echo '<br>';
    2159 
    2160     // SFW last sent logs
    2161     $last_send_time = $apbct->stats['sfw']['last_send_time'] ? date('M d Y H:i:s', $apbct->stats['sfw']['last_send_time']) : __(
    2162         'unknown',
    2163         'cleantalk-spam-protect'
    2164     );
    2165 
    2166     printf(
    2167         __('SpamFireWall sent %s events at %s.', 'cleantalk-spam-protect'),
    2168         $apbct->stats['sfw']['last_send_amount'] ? (int)$apbct->stats['sfw']['last_send_amount'] : __(
    2169             'unknown',
    2170             'cleantalk-spam-protect'
    2171         ),
    2172         $last_send_time ? $last_send_time : __('unknown', 'cleantalk-spam-protect')
    2173     );
    2174     echo '<br>';
    2175     echo 'Plugin version: ' . APBCT_VERSION;
    2176     echo '<br>';
    2177 
    2178     // Connection reports
    2179     $connection_reports = $apbct->getConnectionReports();
    2180     if ( ! $connection_reports->hasNegativeReports() ) {
    2181         _e('There are no failed connections to server.', 'cleantalk-spam-protect');
    2182     } else {
    2183         $reports_html = $connection_reports->prepareNegativeReportsHtmlForSettingsPage();
    2184         //escaping and echoing html
    2185         echo Escape::escKses(
    2186             $reports_html,
    2187             array(
    2188                 'tr' => array(
    2189                     'style' => true
    2190                 ),
    2191                 'td' => array(),
    2192                 'th' => array(
    2193                     'colspan' => true
    2194                 ),
    2195                 'b' => array(),
    2196                 'br' => array(),
    2197                 'div' => array(
    2198                     'id' => true
    2199                 ),
    2200                 'table' => array(
    2201                     'id' => true
    2202                 ),
    2203             )
    2204         );
    2205         //if no unsent reports show caption, in another case show the button
    2206         if ( ! $connection_reports->hasUnsentReports() ) {
    2207             _e('All the reports already have been sent.', 'cleantalk-spam-protect');
    2208         } else {
    2209             echo '<button'
    2210                 . ' name="submit"'
    2211                 . ' class="cleantalk_link cleantalk_link-manual"'
    2212                 . ' value="ct_send_connection_report"'
    2213                 . (! $apbct->settings['misc__send_connection_reports'] ? ' disabled="disabled"' : '')
    2214                 . '>'
    2215                 . __('Send new report', 'cleantalk-spam-protect')
    2216                 . '</button>';
    2217             if ( ! $apbct->settings['misc__send_connection_reports'] ) {
    2218                 echo '<br><br>';
    2219                 _e(
    2220                     'Please, enable "Send connection reports" setting to be able to send reports',
    2221                     'cleantalk-spam-protect'
    2222                 );
    2223             }
    2224         }
    2225     }
    2226     echo '</div>';
    2227 
    2228     $checker = new ServerRequirementsChecker();
    2229     $warnings = $checker->checkRequirements() ?: [];
    2230     $requirements_data = $checker->requirements;
    2231     $requirement_items = $checker->requirement_items;
    2232 
    2233     echo '<div class="apbct_check_server_requirements">';
    2234     echo '<h3 style="margin: 0;">' . __('Check Server Requirements', 'cleantalk-spam-protect') . '</h3>';
    2235     echo '<ul style="margin-bottom:0;">';
    2236 
    2237     foreach ($requirement_items as $key => $item) {
    2238         $value = $requirements_data[$key];
    2239         if ($key === 'curl_support' || $key === 'allow_url_fopen') {
    2240             $value = $value ? __('enabled', 'cleantalk-spam-protect') : __('disabled', 'cleantalk-spam-protect');
    2241         }
    2242         $label = sprintf(__($item['label'], 'cleantalk-spam-protect'), $value);
    2243 
    2244         $warn_text = '';
    2245         foreach ($warnings as $warn) {
    2246             if (stripos($warn, $item['pattern']) !== false) {
    2247                 $warn_text = ' <span style="color:red;">(' . esc_html($warn) . ')</span>';
    2248                 break;
    2249             }
    2250         }
    2251         echo '<li' . ($warn_text ? ' style="color:red;font-weight:bold;"' : '') . '>' . $label . $warn_text . '</li>';
    2252     }
    2253     echo '</ul>';
    2254 
    2255     if (!empty($warnings)) {
    2256         $link = LinkConstructor::buildCleanTalkLink('notice_server_requirements', 'help/system-requirements-for-anti-spam-and-security ');
    2257         echo sprintf(
    2258             '<a href="%s">%s</a>',
    2259             $link,
    2260             __('Instructions for solving the compatibility issue', 'cleantalk-spam-protect')
    2261         );
    2262     }
    2263     echo '</div>';
    2264     echo '</div>';
     2068    $renderer = new SummaryAndSupportRenderer($apbct);
     2069    echo $renderer->render();
    22652070}
    22662071
  • cleantalk-spam-protect/trunk/js/apbct-public-bundle.min.js

    r3363712 r3371703  
    1 function ownKeys(t,e){var n,o=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),o.push.apply(o,n)),o}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(n),!0).forEach(function(e){_defineProperty(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function _callSuper(e,t,n){return t=_getPrototypeOf(t),_possibleConstructorReturn(e,_isNativeReflectConstruct()?Reflect.construct(t,n||[],_getPrototypeOf(e).constructor):t.apply(e,n))}function _possibleConstructorReturn(e,t){if(t&&("object"==_typeof(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(e)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_isNativeReflectConstruct=function(){return!!e})()}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _createForOfIteratorHelper(e,t){var n,o,a,i,c="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(c)return a=!(o=!0),{s:function(){c=c.call(e)},n:function(){var e=c.next();return o=e.done,e},e:function(e){a=!0,n=e},f:function(){try{o||null==c.return||c.return()}finally{if(a)throw n}}};if(Array.isArray(e)||(c=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length)return c&&(e=c),i=0,{s:t=function(){},n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){var n;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(n="Object"===(n={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty(e,t,n){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}function apbctSetEmailDecoderPopupAnimation(){var e=["apbct_dog_one","apbct_dog_two","apbct_dog_three"],t=document.createElement("div");t.classList="apbct-ee-animation-wrapper";for(var n=0;n<e.length;n++){var o=document.createElement("span");o.classList="apbct_dog "+e[n],o.innerText="@",t.append(o)}return t}function ctFillDecodedEmailHandler(){var e,t,n,o=0<arguments.length&&void 0!==arguments[0]&&arguments[0],a=!1,i="",c="",r=("undefined"!=typeof ctPublic?(this.removeEventListener("click",ctFillDecodedEmailHandler),a=this,ctPublic.encodedEmailNodesIsMixed=!1,i=ctPublic.wl_brandname,c=ctPublic.encodedEmailNodes):"undefined"!=typeof ctAdminCommon&&(i=ctAdminCommon.plugin_name,c=ctAdminCommon.encodedEmailNode),document.body.classList.add("apbct-popup-fade"),document.getElementById("apbct_popup"));r?(r.setAttribute("style","display: inherit"),"undefined"!=typeof ctPublicFunctions&&ctPublicFunctions.text__ee_wait_for_decoding?document.getElementById("apbct_popup_text").innerHTML=ctPublicFunctions.text__ee_wait_for_decoding:document.getElementById("apbct_popup_text").innerHTML=ctAdminCommon.text__ee_wait_for_decoding):((r=document.createElement("div")).setAttribute("class","apbct-popup apbct-email-encoder-popup"),r.setAttribute("id","apbct_popup"),(e=document.createElement("span")).classList="apbct-email-encoder-elements_center",(t=document.createElement("p")).innerText=i,t.setAttribute("class","apbct-email-encoder--popup-header"),e.append(t),(i=document.createElement("div")).setAttribute("id","apbct_popup_text"),i.setAttribute("class","apbct-email-encoder-elements_center"),i.style.color="black",(t=document.createElement("p")).id="apbct_email_ecoder__popup_text_node_first","undefined"!=typeof ctPublicFunctions&&ctPublicFunctions.text__ee_wait_for_decoding?t.innerText=ctPublicFunctions.text__ee_wait_for_decoding:t.innerText=ctAdminCommon.text__ee_wait_for_decoding,t.setAttribute("class","apbct-email-encoder-elements_center"),(n=document.createElement("p")).id="apbct_email_ecoder__popup_text_node_second","undefined"!=typeof ctPublicFunctions&&ctPublicFunctions.text__ee_decoding_process?n.innerText=ctPublicFunctions.text__ee_decoding_process:n.innerText=ctAdminCommon.text__ee_decoding_process,i.append(t),i.append(n),r.append(e),r.append(i),r.append(apbctSetEmailDecoderPopupAnimation()),document.body.append(r)),apbctAjaxEmailDecodeBulk(o,c,a)}function apbctAjaxEmailDecodeBulk(e,t,n){if(e&&n){for(var o={post_url:document.location.href,referrer:document.referrer,encodedEmails:""},a=(1==ctPublic.settings__data__bot_detector_enabled?o.event_token=apbctLocalStorage.get("bot_detector_event_token"):o.event_javascript_data=getJavascriptClientData(),{}),i=0;i<t.length;i++){void 0!==t[i].href&&0===t[i].href.indexOf("mailto:")&&(e.preventDefault(),ctPublic.encodedEmailNodesIsMixed=!0);var c=document.createElement("div");c.setAttribute("class","apbct-tooltip"),apbct(t[i]).append(c),a[i]=t[i].dataset.originalString}o.encodedEmails=JSON.stringify(a),"rest"===ctPublicFunctions.data__ajax_type?apbct_public_sendREST("apbct_decode_email",{data:o,method:"POST",callback:function(e){ctSetCookie("apbct_email_encoder_passed",ctPublic.emailEncoderPassKey,""),apbctEmailEncoderCallbackBulk(e,t,n)},onErrorCallback:function(e){resetEncodedNodes(),ctShowDecodeComment(e)}}):(o.action="apbct_decode_email",apbct_public_sendAJAX(o,{notJson:!1,callback:function(e){console.log("result"),console.log(e),ctSetCookie("apbct_email_encoder_passed",ctPublic.emailEncoderPassKey,""),apbctEmailEncoderCallbackBulk(e,t,n)},onErrorCallback:function(e){resetEncodedNodes(),ctShowDecodeComment(e)}}))}else{var o=t.dataset.originalString,o={encodedEmails:JSON.stringify({0:o})},r=document.createElement("div");r.setAttribute("class","apbct-tooltip"),t.appendChild(r),apbct_admin_sendAJAX({action:"apbct_decode_email",encodedEmails:o.encodedEmails},{callback:function(e){apbctEmailEncoderCallbackBulk(e,t,!1)},notJson:!0})}}function apbctEmailEncoderCallbackBulk(i,c){var r=2<arguments.length&&void 0!==arguments[2]&&arguments[2];i.success&&!0===i.data[0].is_allowed?setTimeout(function(){var t,e,n,o,a=document.getElementById("apbct_popup");null!==a&&(o="",o=r?(i.data.forEach(function(e){e.encoded_email===r.dataset.originalString&&(t=e)}),t.decoded_email.split(/[&?]/)[0]):i.data[0].decoded_email,n=a.querySelector("#apbct_email_ecoder__popup_text_node_first"),(e=document.createElement("b")).setAttribute("class","apbct-email-encoder-select-whole-email"),e.innerText=o,"undefined"!=typeof ctPublicFunctions&&ctPublicFunctions.text__ee_click_to_select?e.title=ctPublicFunctions.text__ee_click_to_select:e.title=ctAdminCommon.text__ee_click_to_select,n&&("undefined"!=typeof ctPublicFunctions&&ctPublicFunctions.text__ee_original_email?n.innerHTML=ctPublicFunctions.text__ee_original_email+"&nbsp;"+e.outerHTML:n.innerHTML=ctAdminCommon.text__ee_original_email+"&nbsp;"+e.outerHTML,n.setAttribute("style","flex-direction: row;")),(o=a.querySelector(".apbct-ee-animation-wrapper"))&&o.remove(),(e=a.querySelector("#apbct_email_ecoder__popup_text_node_second"))&&e.remove(),(n=document.createElement("span")).classList="apbct-email-encoder-elements_center top-margin-long",document.querySelector(".apbct-email-encoder-got-it-button")||(o=document.createElement("button"),"undefined"!=typeof ctPublicFunctions&&ctPublicFunctions.text__ee_got_it?o.innerText=ctPublicFunctions.text__ee_got_it:o.innerText=ctAdminCommon.text__ee_got_it,o.classList="apbct-email-encoder-got-it-button",o.addEventListener("click",function(){document.body.classList.remove("apbct-popup-fade"),a.setAttribute("style","display:none"),fillDecodedNodes(c,i),"undefined"!=typeof ctPublic&&ctPublic.encodedEmailNodesIsMixed&&r&&r.click()}),n.append(o),a.append(n)))},3e3):r?i.success?(resetEncodedNodes(),"undefined"!=typeof ctPublicFunctions&&ctPublicFunctions.text__ee_blocked?ctShowDecodeComment(ctPublicFunctions.text__ee_blocked+": "+i.data[0].comment):ctShowDecodeComment(ctAdminCommon.text__ee_blocked+": "+i.data[0].comment)):(resetEncodedNodes(),"undefined"!=typeof ctPublicFunctions&&ctPublicFunctions.text__ee_cannot_connect?ctShowDecodeComment(ctPublicFunctions.text__ee_cannot_connect+": "+i.apbct.comment):ctShowDecodeComment(ctAdminCommon.text__ee_cannot_connect+": "+i.data[0].comment)):console.log("result",i)}function resetEncodedNodes(){void 0!==ctPublic.encodedEmailNodes&&ctPublic.encodedEmailNodes.forEach(function(e){e.addEventListener("click",ctFillDecodedEmailHandler)})}function ctShowDecodeComment(e){e=e||("undefined"!=typeof ctPublicFunctions&&ctPublicFunctions.text__ee_cannot_decode?ctPublicFunctions:ctAdminCommon).text__ee_cannot_decode;var t=document.getElementById("apbct_popup"),n=document.getElementById("apbct_popup_text");null!==t&&(document.body.classList.remove("apbct-popup-fade"),"undefined"!=typeof ctPublicFunctions&&ctPublicFunctions.text__ee_email_decoder?n.innerText=ctPublicFunctions.text__ee_email_decoder+": "+e:n.innerText=ctAdminCommon.text__ee_email_decoder+": "+e,setTimeout(function(){t.setAttribute("style","display:none")},3e3))}function fillDecodedNodes(i,c){if(0<i.length){for(var e,t=0;t<i.length;t++)if(0!==(e=(t=>{var n,e;if(c.data.forEach(function(e){e.encoded_email===i[t].dataset.originalString&&(n=e)}),!1===n.is_allowed)return{v:void 0};if(void 0===i[t].href||0!==i[t].href.indexOf("mailto:")&&0!==i[t].href.indexOf("tel:"))i[t].classList.add("no-blur"),setTimeout(function(){ctProcessDecodedDataResult(n,i[t])},2e3);else{if(0===i[t].href.indexOf("mailto:"))e="mailto:";else{if(0!==i[t].href.indexOf("tel:"))return 0;e="tel:"}var o=i[t].href.replace(e,""),a=i[t].innerHTML;i[t].innerHTML=a.replace(o,n.decoded_email),i[t].href=e+n.decoded_email,i[t].querySelectorAll("span.apbct-email-encoder").forEach(function(t){var n="";c.data.forEach(function(e){e.encoded_email===t.dataset.originalString&&(n=e.decoded_email)}),t.innerHTML=n})}i[t].removeEventListener("click",ctFillDecodedEmailHandler)})(t))&&e)return e.v}else{var n=c.data[0];i.classList.add("no-blur"),setTimeout(function(){ctProcessDecodedDataResult(n,i)},2e3),i.removeEventListener("click",ctFillDecodedEmailHandler)}}function ctProcessDecodedDataResult(e,t){t.setAttribute("title",""),t.removeAttribute("style"),ctFillDecodedEmail(t,e.decoded_email)}function ctFillDecodedEmail(e,t){e.innerHTML=e.innerHTML.replace(/.+?(<div class=["']apbct-tooltip["'].+?<\/div>)/,t+"$1")}document.addEventListener("DOMContentLoaded",function(){var e=document.querySelectorAll("[data-original-string]");if("undefined"!=typeof ctPublic&&(ctPublic.encodedEmailNodes=e),e.length)for(var t=0;t<e.length;++t)e[t].addEventListener("click",ctFillDecodedEmailHandler)});var cleantalkModal=cleantalkModal||{loaded:!1,loading:!1,opened:!1,opening:!1,ignoreURLConvert:!1,load:function(e){var t;this.loaded||(this.loading=!0,t=function(e,t,n,o){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(){var e,t="";for(e in this.styles)t+=e+":"+this.styles[e]+";";return t}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},n={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},o={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},a={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},c={styles:{overflow:"hidden"},toString:e},r=document.createElement("style"),c=(r.setAttribute("id","cleantalk-modal-styles"),r.innerHTML="body.cleantalk-modal-opened{"+c+"}",r.innerHTML+="#cleantalk-modal-overlay{"+t+"}",r.innerHTML+="#cleantalk-modal-close{"+o+"}",r.innerHTML+="#cleantalk-modal-close:before{"+a+"}",r.innerHTML+="#cleantalk-modal-close:after{"+i+"}",document.body.append(r),document.createElement("div")),t=(c.setAttribute("id","cleantalk-modal-overlay"),document.body.append(c),document.body.classList.add("cleantalk-modal-opened"),document.createElement("div")),o=(t.setAttribute("id","cleantalk-modal-inner"),t.setAttribute("style",n),c.append(t),document.createElement("div")),a=(o.setAttribute("id","cleantalk-modal-close"),t.append(o),document.createElement("div"));this.loaded?/.*\/inc/g.test(this.loaded)||this.ignoreURLConvert?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"),t.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}))}},ApbctCore=(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)}),(()=>_createClass(function e(t){_classCallCheck(this,e),_defineProperty(this,"ajax_parameters",{}),_defineProperty(this,"restParameters",{}),_defineProperty(this,"selector",null),_defineProperty(this,"elements",[]),_defineProperty(this,"eventCallback",void 0),_defineProperty(this,"eventSelector",void 0),_defineProperty(this,"event",void 0),this.select(t)},[{key:"select",value:function(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}},{key:"addElement",value:function(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()}},{key:"push",value:function(e){this.elements.push(e)}},{key:"reduce",value:function(){this.elements=this.elements.slice(0,-1)}},{key:"deselect",value:function(){this.elements=[]}},{key:"css",value:function(e,t){if(t=t||!1,"object"===_typeof(e)){for(var n in e)if(Object.hasOwn(e,n))for(var o=n.replace(/([-_][a-z])/g,function(e){return e.toUpperCase().replace("-","").replace("_","")}),a=0;a<this.elements.length;a++)this.elements[a].style[o]=e[n];return this}var i;if("string"==typeof e)return void 0!==(i=getComputedStyle(this.elements[0])[e])&&!t&&(i=i.replace(/(\d)(em|pt|%|px){1,2}$/,"$1"),Number(i)==i)?Number(i):i}},{key:"hide",value:function(){this.prop("prev-display",this.css("display")),this.css({display:"none"})}},{key:"show",value:function(){this.css({display:this.prop("prev-display")})}},{key:"addClass",value:function(){for(var e=0;e<this.elements.length;e++)this.elements[e].classList.add(className)}},{key:"removeClass",value:function(){for(var e=0;e<this.elements.length;e++)this.elements[e].classList.remove(className)}},{key:"toggleClass",value:function(e){for(var t=0;t<this.elements.length;t++)this.elements[t].classList.toggle(e)}},{key:"ajax",value:function(e){return this.ajax_parameters=e,new ApbctAjax(e)}},{key:"rest",value:function(e){return this.restParameters=e,new ApbctRest(e)}},{key:"on",value:function(){this.event=arguments.length<=0?void 0:arguments[0],this.eventCallback=(arguments.length<=2?void 0:arguments[2])||(arguments.length<=1?void 0:arguments[1]),this.eventSelector="string"==typeof(arguments.length<=1?void 0:arguments[1])?arguments.length<=1?void 0:arguments[1]:null;for(var e=0;e<this.elements.length;e++)this.elements[e].addEventListener(this.event,null!==this.eventSelector?this.onChecker.bind(this):this.eventCallback)}},{key:"onChecker",value:function(e){if(e.target===document.querySelector(this.eventSelector))return e.stopPropagation(),this.eventCallback(e)}},{key:"ready",value:function(e){document.addEventListener("DOMContentLoaded",e)}},{key:"change",value:function(e){this.on("change",e)}},{key:"attr",value:function(e){for(var t=[],n=0;n<this.elements.length;n++)void 0!==this.elements[n][e]?t.push(this.elements[n][e]):t.push(this.elements[n].getAttribute(e));return 1===t.length?t[0]:t}},{key:"prop",value:function(e,t){if(void 0!==t){for(var n=0;n<this.elements.length;n++)this.elements[n][e]=t;return this}for(var o=[],a=0;a<this.elements.length;a++)o.push(this.elements[a][e]);return 1===o.length?o[0]:o}},{key:"html",value:function(e){return void 0!==e?this.prop("innerHTML",e):this.prop("innerHTML")}},{key:"val",value:function(e){return void 0!==e?this.prop("value",e):this.prop("value")}},{key:"data",value:function(e,t){return void 0!==t?this.prop("apbct-data",e,t):this.prop("apbct-data")}},{key:"is",value:function(e){var t,n=!1,o=_createForOfIteratorHelper(this.elements);try{for(o.s();!(t=o.n()).done;)var a=t.value,n=n||this.isElem(a,e)}catch(e){o.e(e)}finally{o.f()}return n}},{key:"isElem",value:function(e,t){var n=!1;return"function"==typeof t&&(n=n||t.call(this,e)),n="string"==typeof t?t.match(/^[a-z]/)&&(e=>(e=document.createElement(e).constructor,!Boolean(~[HTMLElement,HTMLUnknownElement].indexOf(e))))(t)?n||e.tagName.toLowerCase()===t.toLowerCase():t.match(/^[a-z]/)?n||Boolean(e[t]):n||(null!==this.selector?null!==document.querySelector(this.selector+t):this.isWithoutSelector(e,t)):n}},{key:"isWithoutSelector",value:function(e,t){var n,o=!1,a=_createForOfIteratorHelper(document.querySelectorAll(t));try{for(a.s();!(n=a.n()).done;)o=o||e===n.value}catch(e){a.e(e)}finally{a.f()}return o}},{key:"filter",value:function(e){this.selector=null;for(var t=this.elements.length-1;0<=t;t--)this.isElem(this.elements[t],e)||this.elements.splice(Number(t),1);return this}},{key:"parent",value:function(e){return this.select(this.elements[0].parentElement),void 0===e||this.is(e)||this.deselect(),this}},{key:"parents",value:function(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}},{key:"children",value:function(e){return this.select(this.elements[0].children),void 0!==e&&this.filter(e),this}},{key:"siblings",value:function(e){var t=this.elements[0];return this.parent(),this.children(e),this.elements.splice(this.elements.indexOf(t),1),this}},{key:"remove",value:function(){var e,t=_createForOfIteratorHelper(this.elements);try{for(t.s();!(e=t.n()).done;)e.value.remove()}catch(e){t.e(e)}finally{t.f()}}},{key:"after",value:function(e){var t,n=_createForOfIteratorHelper(this.elements);try{for(n.s();!(t=n.n()).done;)t.value.after(e)}catch(e){n.e(e)}finally{n.f()}}},{key:"append",value:function(e){var t,n=_createForOfIteratorHelper(this.elements);try{for(n.s();!(t=n.n()).done;)t.value.append(e)}catch(e){n.e(e)}finally{n.f()}}},{key:"fadeIn",value:function(o){var a,t=_createForOfIteratorHelper(this.elements);try{for(t.s();!(a=t.n()).done;)(()=>{function e(){t.style.opacity=+t.style.opacity+(new Date-n)/o,n=+new Date,+t.style.opacity<1&&(window.requestAnimationFrame&&requestAnimationFrame(e)||setTimeout(e,16))}var t=a.value,n=(t.style.opacity=0,t.style.display="block",+new Date);e()})()}catch(e){t.e(e)}finally{t.f()}}},{key:"fadeOut",value:function(o){var a,t=_createForOfIteratorHelper(this.elements);try{for(t.s();!(a=t.n()).done;)(()=>{function e(){t.style.opacity=+t.style.opacity-(new Date-n)/o,n=+new Date,0<+t.style.opacity?window.requestAnimationFrame&&requestAnimationFrame(e)||setTimeout(e,16):t.style.display="none"}var t=a.value,n=(t.style.opacity=1,+new Date);e()})()}catch(e){t.e(e)}finally{t.f()}}}]))());function selectActualNonce(){var e="";return ctPublicFunctions.hasOwnProperty("_fresh_nonce")&&"string"==typeof ctPublicFunctions._fresh_nonce&&0<ctPublicFunctions._fresh_nonce.length?ctPublicFunctions._fresh_nonce:("admin_ajax"===ctPublicFunctions.data__ajax_type&&ctPublicFunctions.hasOwnProperty("_ajax_nonce")&&"string"==typeof ctPublicFunctions._ajax_nonce&&0<ctPublicFunctions._ajax_nonce.length&&(e=ctPublicFunctions._ajax_nonce),"rest"===ctPublicFunctions.data__ajax_type&&ctPublicFunctions.hasOwnProperty("_rest_nonce")&&"string"==typeof ctPublicFunctions._rest_nonce&&0<ctPublicFunctions._rest_nonce.length?ctPublicFunctions._rest_nonce:e)}function apbct(e){return(new ApbctCore).select(e)}var ApbctXhr=(()=>{function o(e){for(var t in _classCallCheck(this,o),_defineProperty(this,"xhr",new XMLHttpRequest),_defineProperty(this,"method","POST"),_defineProperty(this,"url",""),_defineProperty(this,"async",!0),_defineProperty(this,"user",null),_defineProperty(this,"password",null),_defineProperty(this,"data",{}),_defineProperty(this,"button",null),_defineProperty(this,"spinner",null),_defineProperty(this,"progressbar",null),_defineProperty(this,"context",this),_defineProperty(this,"callback",null),_defineProperty(this,"onErrorCallback",null),_defineProperty(this,"responseType","json"),_defineProperty(this,"headers",{}),_defineProperty(this,"timeout",15e3),_defineProperty(this,"methods_to_convert_data_to_URL",["GET","HEAD"]),_defineProperty(this,"body",null),_defineProperty(this,"http_code",0),_defineProperty(this,"status_text",""),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.isWpNonceError()?this.getFreshNonceAndRerunXHR(e):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)}return _createClass(o,[{key:"prepare",value:function(){this.button&&(this.button.setAttribute("disabled","disabled"),this.button.style.cursor="not-allowed"),this.spinner&&(this.spinner.style.display="inline")}},{key:"complete",value:function(){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")}},{key:"onReadyStateChange",value:function(){null!==this.on_ready_state_change&&"function"==typeof this.on_ready_state_change&&this.on_ready_state_change()}},{key:"onProgress",value:function(e){null!==this.on_progress&&"function"==typeof this.on_progress&&this.on_progress()}},{key:"onError",value:function(){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)}},{key:"onTimeout",value:function(){this.complete(),this.error(0,"timeout"),null!==this.onErrorCallback&&"function"==typeof this.onErrorCallback&&this.onErrorCallback("Timeout")}},{key:"onLoad",value:function(){if(this.complete(),"json"===this.responseType){if(null===this.xhr.response)return this.error(this.http_code,this.status_text,"No response"),!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)}},{key:"isWpNonceError",value:function(){var e=!1,t=!1;return 4==this.xhr.readyState&&(e="object"===_typeof(this.xhr.response)&&null!==this.xhr.response&&this.xhr.response.hasOwnProperty("data")&&this.xhr.response.data.hasOwnProperty("status")&&403===this.xhr.response.data.status,t="-1"===this.xhr.response&&403===this.xhr.status),e||t}},{key:"getFreshNonceAndRerunXHR",value:function(e){var t,n="";e.hasOwnProperty("headers")&&e.headers.hasOwnProperty("X-WP-Nonce")&&(n=e.headers["X-WP-Nonce"]),""!==(n=e.hasOwnProperty("data")&&e.data.hasOwnProperty("_ajax_nonce")?e.data._ajax_nonce:n)&&((t={method:"POST"}).data={spbc_remote_call_action:"get_fresh_wpnonce",plugin_name:"antispam",nonce_prev:n,initial_request_params:e},t.notJson=!0,t.url=ctPublicFunctions.host_url,t.callback=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var o=t[0],a=!1;(a=void 0!==t[1]&&t[1].hasOwnProperty("initial_request_params")?t[1].initial_request_params:a)&&o.hasOwnProperty("wpnonce")&&(ctPublicFunctions._fresh_nonce=o.wpnonce,"rest"===ctPublicFunctions.data__ajax_type?(new ApbctCore).rest(a):(new ApbctCore).ajax(a))},new o(t))}},{key:"error",value:function(e,t,n){var o="";"timeout"===t?o+="Server response timeout":200===e?"parsererror"===t?o+="Unexpected response from server. See console for details.":(o+="Unexpected error. Status: "+t+".",void 0!==n&&(o+=" Additional error info: "+n)):o+=500===e?"Internal server error.":"Unexpected response code:"+e,this.errorOutput(o),null!==this.onErrorCallback&&"function"==typeof this.onErrorCallback&&this.onErrorCallback(this.status_text)}},{key:"errorOutput",value:function(e){console.log("%c ctXHR error: %c"+e,"color: red;","color: grey;")}},{key:"setHeaders",value:function(){for(var e in this.headers)void 0!==this.headers[e]&&this.xhr.setRequestHeader(e,this.headers[e])}},{key:"convertData",value:function(){return~this.methods_to_convert_data_to_URL.indexOf(this.method)?this.convertDataToURL():this.convertDataToBody()}},{key:"convertDataToURL",value:function(){var e=new URLSearchParams(this.data).toString(),t=this.url.match(/^(https?:\/{2})?[a-z0-9.]+\?/)?"&":"?";return this.url+=t+e,this.url}},{key:"convertDataToBody",value:function(){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}},{key:"deleteDoubleJSONEncoding",value:function(e){if("object"===_typeof(e))for(var t in e){var n;Object.hasOwn(e,t)&&("object"===_typeof(e[t])&&(e[t]=this.deleteDoubleJSONEncoding(e[t])),"string"==typeof e[t])&&null!==e[t].match(/^[\[{].*?[\]}]$/)&&"object"===_typeof(n=JSON.parse(e[t]))&&(e[t]=n)}return e}}])})(),ApbctAjax=(()=>{function o(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return _classCallCheck(this,o),(t=t[0]).data._ajax_nonce=selectActualNonce(),_callSuper(this,o,[t])}return _inherits(o,ApbctXhr),_createClass(o)})(),ApbctRest=(()=>{function a(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];_classCallCheck(this,a);var t=t[0],o=selectActualNonce();return t.url=a.default_route+t.route,t.headers={"X-WP-Nonce":o},_defineProperty(o=_callSuper(this,a,[t]),"route",""),o}return _inherits(a,ApbctXhr),_createClass(a)})();function initParams(){var e=new Date,t=navigator.webdriver,n="undefined"!=typeof ApbctGatheringData&&"function"==typeof ApbctGatheringData.prototype.getScreenInfo?(new ApbctGatheringData).getScreenInfo():"",o=[["ct_ps_timestamp",Math.floor((new Date).getTime()/1e3)],["ct_fkp_timestamp","0"],["ct_pointer_data","0"],["ct_timezone",e.getTimezoneOffset()/60*-1],["ct_screen_info",n],["apbct_headless",t]];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",e.getTimezoneOffset()/60*-1),apbctLocalStorage.set("ct_screen_info",n),apbctLocalStorage.set("apbct_headless",t),"native"!==ctPublic.data__cookies_type)o.push(["apbct_visible_fields","0"]);else{var a=document.cookie.split(";");if(0!==a.length)for(var i=0;i<a.length;i++){var c=a[i].trim().split("=")[0];0===c.indexOf("apbct_visible_fields_")&&ctDeleteCookie(c)}}+ctPublic.pixel__setting&&3!=+ctPublic.pixel__setting&&("function"==typeof ctIsDrawPixel&&ctIsDrawPixel()?"function"==typeof ctGetPixelUrl&&ctGetPixelUrl():o.push(["apbct_pixel_url",ctPublic.pixel__url])),+ctPublic.data__email_check_before_post&&(o.push(["ct_checked_emails","0"]),"function"==typeof apbct)&&apbct('input[type = "email"], #email').on("blur",checkEmail),+ctPublic.data__email_check_exist_post&&(o.push(["ct_checked_emails_exist","0"]),"function"==typeof apbct)&&(apbct('.comment-form input[name = "email"], input#email').on("blur",checkEmailExist),apbct('.frm-fluent-form input[name = "email"], input#email').on("blur",checkEmailExist),apbct('#registerform input[name = "user_email"]').on("blur",checkEmailExist)),apbctLocalStorage.isSet("ct_checkjs")?o.push(["ct_checkjs",apbctLocalStorage.get("ct_checkjs")]):o.push(["ct_checkjs",0]),ctSetCookie(o)}function ctSetCookie(e,t,o){var n,a=["ct_sfw_pass_key","ct_sfw_passed","wordpress_apbct_antibot","apbct_anticrawler_passed","apbct_bot_detector_exist","apbct_antiflood_passed","apbct_email_encoder_passed"],i=!1;"string"==typeof e&&(i="ct_pointer_data"===e,"string"!=typeof t&&"number"!=typeof t||(e=[[e,t,o]])),"none"===ctPublicFunctions.data__cookies_type?(n=[],e.forEach(function(e){-1!==a.indexOf(e[0])?n.push(e):apbctLocalStorage.set(e[0],e[1])}),0<n.length&&ctSetAlternativeCookie(n),ctPublic.force_alt_cookies&&!i?ctSetAlternativeCookie(e,{forceAltCookies:!0}):+ctPublic.settings__data__bot_detector_enabled||ctNoCookieAttachHiddenFieldsToForms()):"native"===ctPublicFunctions.data__cookies_type?(ctPublic.force_alt_cookies&&!i&&ctSetAlternativeCookie(e,{forceAltCookies:!0}),e.forEach(function(e){var t=void 0!==e[2]?"expires="+o+"; ":"",n="https:"===location.protocol?"; secure":"";document.cookie=ctPublicFunctions.cookiePrefix+e[0]+"="+encodeURIComponent(e[1])+"; "+t+"path=/; samesite=lax"+n})):"alternative"!==ctPublicFunctions.data__cookies_type||i||ctSetAlternativeCookie(e)}function ctSetAlternativeCookie(e,t){if("function"==typeof getJavascriptClientData?Array.isArray(e)&&(e=getJavascriptClientData(e)):+ctPublic.settings__data__bot_detector_enabled||console.log("APBCT ERROR: getJavascriptClientData() is not loaded"),"string"==typeof(e=Array.isArray(e)&&e[0]&&"apbct_bot_detector_exist"===e[0][0]?{apbct_bot_detector_exist:e[0][1]}:e))try{e=JSON.parse(e)}catch(e){return void console.log("APBCT ERROR: JSON parse error:"+e)}var n=t&&t.callback||null,o=t&&t.onErrorCallback||null;t&&t.forceAltCookies&&(e.apbct_force_alt_cookies=!0),"rest"===ctPublicFunctions.data__ajax_type?("string"==typeof e.apbct_pixel_url&&-1!==e.apbct_pixel_url.indexOf("%3A")&&(e.apbct_pixel_url=decodeURIComponent(e.apbct_pixel_url)),apbct_public_sendREST("alt_sessions",{method:"POST",data:{cookies:e},callback:n,onErrorCallback:o})):"admin_ajax"===ctPublicFunctions.data__ajax_type&&apbct_public_sendAJAX({action:"apbct_alt_session__save__AJAX",cookies:e},{notJson:1,callback:n,onErrorCallback:o,beforeSend:function(e){e.setRequestHeader("X-Robots-Tag","noindex, nofollow")}})}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,n){var o=[],n=(o.callback=t.callback||null,o.onErrorCallback=t.onErrorCallback||null,o.callback_context=t.callback_context||null,o.callback_params=t.callback_params||null,o.async=t.async||!0,o.notJson=t.notJson||null,o.responseType=t.notJson?"text":"json",o.timeout=t.timeout||15e3,o.obj=n||null,o.button=t.button||null,o.spinner=t.spinner||null,o.progressbar=t.progressbar||null,o.silent=t.silent||null,o.no_nonce=t.no_nonce||null,o.data=e,o.url=ctPublicFunctions._ajax_url,selectActualNonce());"string"==typeof e?(o.no_nonce||(o.data=o.data+"&_ajax_nonce="+n),o.data=o.data+"&no_cache="+Math.random()):(o.no_nonce||(o.data._ajax_nonce=n),o.data.no_cache=Math.random()),(new ApbctCore).ajax(o)}function apbct_public_sendREST(e,t){var n=[];n.route=e,n.callback=t.callback||null,n.onErrorCallback=t.onErrorCallback||null,n.data=t.data||[],n.method=t.method||"POST",(new ApbctCore).rest(n)}function apbct_attach_event_handler(e,t,n){"function"==typeof window.addEventListener?e.addEventListener(t,n):e.attachEvent(t,n)}function apbct_remove_event_handler(e,t,n){"function"==typeof window.removeEventListener?e.removeEventListener(t,n):e.detachEvent(t,n)}function removeDoubleJsonEncoding(e){if("object"===_typeof(e))for(var t in e){var n;"object"===_typeof(e[t])&&(e[t]=removeDoubleJsonEncoding(e[t])),"string"==typeof e[t]&&null!==e[t].match(/^[\[{].*?[\]}]$/)&&"object"===_typeof(n=JSON.parse(e[t]))&&(e[t]=n)}return e}function ctGetPageForms(){var e=document.forms;return e||!1}function apbct_js_keys__set_input_value(e,t,n,o){if(0<document.querySelectorAll("[name^=ct_checkjs]").length)for(var a=document.querySelectorAll("[name^=ct_checkjs]"),i=0;i<a.length;i++)a[i].value=e.js_key}_defineProperty(ApbctRest,"default_route",ctPublicFunctions._rest_url+"cleantalk-antispam/v1/"),Object.prototype.hasOwn||Object.defineProperty(Object.prototype,"hasOwn",{value:function(e){return Object.prototype.hasOwnProperty.call(this,e)},enumerable:!1,configurable:!0,writable:!0});var apbctLocalStorage={get:function(t,n){void 0===n&&(n="value");t=localStorage.getItem(t);if(null!==t)try{var o=JSON.parse(t);if(!o.hasOwnProperty(n))return o;try{return JSON.parse(o[n])}catch(e){return o[n].toString()}}catch(e){return t}return!1},set:function(e,t){var n;!(2<arguments.length&&void 0!==arguments[2])||arguments[2]?(n={value:JSON.stringify(t),timestamp:Math.floor((new Date).getTime()/1e3)},localStorage.setItem(e,JSON.stringify(n))):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(){for(var e={},t=0;t<localStorage.length;t++){var n=localStorage.key(t);-1===n.indexOf("ct_")&&-1===n.indexOf("apbct_")||(e[n.toString()]=apbctLocalStorage.get(n))}return e}},apbctSessionStorage={get:function(t,e){void 0===e&&(e="value");t=sessionStorage.getItem(t);if(null!==t)try{var n=JSON.parse(t);return n.hasOwnProperty(e)?JSON.parse(n[e]):n}catch(e){return t}return!1},set:function(e,t){var n;!(2<arguments.length&&void 0!==arguments[2])||arguments[2]?(n={value:JSON.stringify(t),timestamp:Math.floor((new Date).getTime()/1e3)},sessionStorage.setItem(e,JSON.stringify(n))):sessionStorage.setItem(e,t)},isSet:function(e){return null!==sessionStorage.getItem(e)},delete:function(e){sessionStorage.removeItem(e)},getCleanTalkData:function(){for(var e={},t=0;t<sessionStorage.length;t++){var n=sessionStorage.key(t);-1===n.indexOf("ct_")&&-1===n.indexOf("apbct_")||(e[n.toString()]=apbctSessionStorage.get(n))}return e}};function getNoCookieData(){var e=apbctLocalStorage.getCleanTalkData(),t=apbctSessionStorage.getCleanTalkData(),e=_objectSpread(_objectSpread({},e),t),e=JSON.stringify(e);return"_ct_no_cookie_data_"+btoa(e)}function getCleanTalkStorageDataArray(){var e=apbctLocalStorage.getCleanTalkData(),t=apbctSessionStorage.getCleanTalkData(),n={typo:[]},o=(document.ctTypoData&&document.ctTypoData.data&&(n={typo:document.ctTypoData.data}),{collecting_user_activity_data:[]});return document.ctCollectingUserActivityData&&(o={collecting_user_activity_data:JSON.parse(JSON.stringify(document.ctCollectingUserActivityData))}),_objectSpread(_objectSpread(_objectSpread(_objectSpread({},e),t),n),o)}var ApbctEventTokenTransport=(()=>_createClass(function e(){_classCallCheck(this,e)},[{key:"attachEventTokenToMultipageGravityForms",value:function(){document.addEventListener("gform_page_loaded",function(){void 0!==ctPublic.force_alt_cookies&&("undefined"===ctPublic.force_alt_cookies||ctPublic.force_alt_cookies)||"function"!=typeof setEventTokenField||"function"!=typeof botDetectorLocalStorage||setEventTokenField(botDetectorLocalStorage.get("bot_detector_event_token"))})}},{key:"attachEventTokenToWoocommerceGetRequestAddToCart",value:function(){ctPublic.wc_ajax_add_to_cart||document.querySelectorAll("a.add_to_cart_button:not(.product_type_variable):not(.wc-interactive)").forEach(function(o){o.addEventListener("click",function(e){var t=o.getAttribute("href"),n=apbctLocalStorage.get("bot_detector_event_token");n&&(-1===t.indexOf("?")?t+="?":t+="&",o.setAttribute("href",t+="ct_bot_detector_event_token="+n))})})}},{key:"setEventTokenToAltCookies",value:function(){void 0!==ctPublic.force_alt_cookies&&ctPublic.force_alt_cookies&&(tokenCheckerIntervalId=setInterval(function(){var e=apbctLocalStorage.get("bot_detector_event_token");e&&(ctSetAlternativeCookie(JSON.stringify({ct_bot_detector_event_token:e}),{forceAltCookies:!0}),clearInterval(tokenCheckerIntervalId))},1e3))}},{key:"restartBotDetectorEventTokenAttach",value:function(){var e,t=0<document.getElementsByClassName("latepoint-form").length||0<document.getElementsByClassName("mec-booking-form-container").length||null!==document.getElementById("login-form-popup");try{t&&(e=apbctLocalStorage.get("bot_detector_event_token"),"function"==typeof setEventTokenField)&&void 0!==e&&64===e.length&&setEventTokenField(e)}catch(e){console.log(e.toString())}}}]))(),ApbctAttachData=(()=>_createClass(function e(){_classCallCheck(this,e)},[{key:"attachHiddenFieldsToForms",value:function(){void 0!==ctPublic.force_alt_cookies&&("undefined"===ctPublic.force_alt_cookies||ctPublic.force_alt_cookies)||+ctPublic.settings__data__bot_detector_enabled||(ctNoCookieAttachHiddenFieldsToForms(),document.addEventListener("gform_page_loaded",ctNoCookieAttachHiddenFieldsToForms))}},{key:"attachVisibleFieldsToForm",value:function(e,t){var n=document.createElement("input"),t=(n.setAttribute("type","hidden"),n.setAttribute("id","apbct_visible_fields_"+t),n.setAttribute("name","apbct_visible_fields"),{});t[0]=this.collectVisibleFields(e),n.value=btoa(JSON.stringify(t)),e.append(n)}},{key:"attachVisibleFieldsDuringSubmit",value:function(e,t){"native"!==ctPublic.data__cookies_type&&void 0!==e.target.ctFormIndex&&this.setVisibleFieldsCookie(this.collectVisibleFields(t),e.target.ctFormIndex)}},{key:"constructNoCookieHiddenField",value:function(e){var t="hidden",e=("submit"===e&&(t="submit"),""),n=getCleanTalkStorageDataArray(),n=JSON.stringify(n);return n="_ct_no_cookie_data_"+btoa(n),(e=document.createElement("input")).setAttribute("name","ct_no_cookie_hidden_field"),e.setAttribute("value",n),e.setAttribute("type",t),e.classList.add("apbct_special_field"),e.classList.add("ct_no_cookie_hidden_field"),e}},{key:"attachNoCookieDuringSubmit",value:function(e){"none"===ctPublic.data__cookies_type&&e.target&&e.target.action&&-1!==e.target.action.toString().indexOf("mailpoet_subscription_form")&&(window.XMLHttpRequest.prototype.send=function(e){var t,n;+ctPublic.settings__data__bot_detector_enabled?(t=(new ApbctHandler).toolGetEventToken())&&(n="data%5Bct_no_cookie_hidden_field%5D="+getNoCookieData()+"&",defaultSend.call(this,n+("data%5Bct_bot_detector_event_token%5D="+t+"&")+e)):(n="data%5Bct_no_cookie_hidden_field%5D="+getNoCookieData()+"&",defaultSend.call(this,n+e)),setTimeout(function(){window.XMLHttpRequest.prototype.send=defaultSend},0)})}},{key:"setVisibleFieldsCookie",value:function(e,t){var n="object"===_typeof(e)&&null!==e?e:{};if("native"===ctPublic.data__cookies_type)for(var o in n){if(10<o)return;ctSetCookie("apbct_visible_fields_"+(void 0!==t?t:o),JSON.stringify(n[o]))}else ctSetCookie("apbct_visible_fields",JSON.stringify(n))}},{key:"collectVisibleFields",value:function(e){var t,n=[],o="",a=0,i="",c=0,r=[];for(t in e.elements)isNaN(+t)||(n[t]=e.elements[t]);return(n=n.filter(function(e){return-1===r.indexOf(e.getAttribute("name"))&&(-1===["radio","checkbox"].indexOf(e.getAttribute("type"))||(r.push(e.getAttribute("name")),!1))})).map(function(e){var t;return"submit"===e.getAttribute("type")||null===e.getAttribute("name")||"ct_checkjs"===e.getAttribute("name")?{elem:e,skip:!0}:"hidden"===e.getAttribute("type")?{elem:e,isVisible:!1,isWpEditor:e.classList.contains("wp-editor-area")}:{elem:e,isVisible:!("none"===(t=getComputedStyle(e)).display||"hidden"===t.visibility||"0"===t.opacity),isWpEditor:e.classList.contains("wp-editor-area")}}).forEach(function(e){e.skip||(e.isVisible||e.isWpEditor?(o+=" "+e.elem.getAttribute("name"),a++):(i+=" "+e.elem.getAttribute("name"),c++))}),i=i.trim(),{visible_fields:o=o.trim(),visible_fields_count:a,invisible_fields:i,invisible_fields_count:c}}}]))(),ApbctHandler=(()=>{function i(){_classCallCheck(this,i)}return _createClass(i,[{key:"excludeForm",value:function(e){return!!this.checkHiddenFieldsExclusions(e,"visible_fields")||!!(e.querySelector('input[name="wspsc_add_cart_submit"]')||e.querySelector('input[name="option"][value="com_vikrentcar"]')||e.querySelector('input[name="option"][value="com_vikbooking"]'))||void 0!==e.elements.apbct_visible_fields&&0<e.elements.apbct_visible_fields.length}},{key:"checkHiddenFieldsExclusions",value:function(e,t){var n="string"==typeof e.action?e.action:"";return!!Boolean(e.querySelector("fieldset.asl_sett_scroll"))||!!e.classList.contains("swpf-instant-filtering")||-1!==n.indexOf("secure.payu.com")||-1!==n.indexOf("hsforms")||-1!==n.indexOf("secureinternetbank.com")||"string"==typeof t&&-1!==["visible_fields","no_cookie"].indexOf(t)&&1===this.getHiddenFieldExclusionsType(e)[t]}},{key:"getHiddenFieldExclusionsType",value:function(e){var t={no_cookie:0,visible_fields:0},n=((0==+ctPublic.data__visible_fields_required||"get"===e.method.toString().toLowerCase()&&0===e.querySelectorAll(".nf-form-content").length&&"twt_cc_signup"!==e.id||e.classList.contains("slp_search_form")||e.parentElement.classList.contains("mec-booking")||-1!==e.action.toString().indexOf("activehosted.com")||e.id&&"caspioform"===e.id||e.classList&&e.classList.contains("tinkoffPayRow")||e.classList&&e.classList.contains("give-form")||e.id&&"ult-forgot-password-form"===e.id||e.id&&-1!==e.id.toString().indexOf("calculatedfields")||e.id&&-1!==e.id.toString().indexOf("sac-form")||e.id&&-1!==e.id.toString().indexOf("cp_tslotsbooking_pform")||e.name&&-1!==e.name.toString().indexOf("cp_tslotsbooking_pform")||"https://epayment.epymtservice.com/epay.jhtml"===e.action.toString()||e.name&&-1!==e.name.toString().indexOf("tribe-bar-form")||e.id&&"ihf-login-form"===e.id||e.id&&"subscriberForm"===e.id&&-1!==e.action.toString().indexOf("actionType=update")||e.id&&"ihf-main-search-form"===e.id||e.id&&"frmCalc"===e.id||-1!==e.action.toString().indexOf("property-organizer-delete-saved-search-submit")||null!==e.querySelector('a[name="login"]'))&&(t.visible_fields=1),e.parentNode);return(n&&n.classList.contains("proinput")||"options"===e.name&&e.classList.contains("asp-fss-flex"))&&(t.no_cookie=1),e&&e.classList.contains("woocommerce-form-login")&&(t.visible_fields=1,t.no_cookie=1),t}},{key:"prevCallExclude",value:function(e){return!!e.classList.contains("hb-booking-search-form")}},{key:"catchMain",value:function(t,e){t.onsubmit_prev=t.onsubmit,t.ctFormIndex=e;var n=this;t.onsubmit=function(e){(new ApbctAttachData).attachVisibleFieldsDuringSubmit(e,t),e.target.onsubmit_prev instanceof Function&&!n.prevCallExclude(e.target)&&(void 0!==e.target.classList&&e.target.classList.contains("brave_form_form")&&e.preventDefault(),setTimeout(function(){e.target.onsubmit_prev.call(e.target,e)},0))}}},{key:"cronFormsHandler",value:function(){setTimeout(function(){setInterval(function(){+ctPublic.settings__data__bot_detector_enabled||(new ApbctGatheringData).restartFieldsListening(),(new ApbctEventTokenTransport).restartBotDetectorEventTokenAttach()},2e3)},0<arguments.length&&void 0!==arguments[0]?arguments[0]:2e3)}},{key:"detectForcedAltCookiesForms",value:function(){var e=0<document.querySelectorAll("#tmpl-nf-layout").length,t=0<document.querySelectorAll(".uael-registration-form-wrapper").length,n=0<document.querySelectorAll('script[id*="smart-forms"]').length,o=0<document.querySelectorAll('iframe[name="jetpack_remote_comment"]').length,a=0<document.querySelectorAll('div[id^="user-registration-form"]').length,i=0<document.querySelectorAll('div[class^="et_pb_newsletter_form"]').length,c=0<document.querySelectorAll('div[class^="fluent_booking_app"]').length,r=0<document.querySelectorAll('div[class^="et_bloom_form_container"]').length,s=0<document.querySelectorAll('div[class*="pafe-form"]').length,l=0<document.querySelectorAll('div [class*="otter-form"]').length,d=0<document.querySelectorAll("form .sqbform, .fields_reorder_enabled").length;ctPublic.force_alt_cookies=n||e||o||t||a||i||c||s||r||l||d,setTimeout(function(){var e;ctPublic.force_alt_cookies||(e=0<document.querySelectorAll('main[id^="bookingpress_booking_form"]').length,ctPublic.force_alt_cookies=e)},1e3)}},{key:"catchXmlHttpRequest",value:function(){var o;(null!==document.querySelector("div.wfu_container")||null!==document.querySelector("#newAppointmentForm")||null!==document.querySelector(".booked-calendar-shortcode-wrap")||document.body.classList.contains("single-product")&&void 0!==cwginstock)&&(o=XMLHttpRequest.prototype.send,XMLHttpRequest.prototype.send=function(e){var t,n;return!e||"string"!=typeof e||-1===e.indexOf("action=wfu_ajax_action_ask_server")&&-1===e.indexOf("action=booked_add_appt")&&-1===e.indexOf("action=cwginstock_product_subscribe")?o.apply(this,[e]):(t="",+ctPublic.settings__data__bot_detector_enabled?(n=(new i).toolGetEventToken())&&(t+="&data%5Bct_bot_detector_event_token%5D="+n):t+="&data%5Bct_no_cookie_hidden_field%5D="+getNoCookieData(),o.apply(this,[e+=t]))})}},{key:"catchFetchRequest",value:function(){setTimeout(function(){0<document.forms.length&&0<Array.from(document.forms).map(function(e){return e.classList.contains("metform-form-content")}).length&&(window.fetch=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t&&t[0]&&"function"==typeof t[0].includes&&(t[0].includes("/wp-json/metform/")||ctPublicFunctions._rest_url&&(()=>{try{return t[0].includes(new URL(ctPublicFunctions._rest_url).pathname+"metform/")}catch(e){}})())&&t&&t[1]&&t[1].body&&(+ctPublic.settings__data__bot_detector_enabled?t[1].body.append("ct_bot_detector_event_token",apbctLocalStorage.get("bot_detector_event_token")):t[1].body.append("ct_no_cookie_hidden_field",getNoCookieData())),defaultFetch.apply(window,t)})},1e3)}},{key:"catchJqueryAjax",value:function(){"undefined"!=typeof jQuery&&"function"==typeof jQuery.ajaxSetup&&jQuery.ajaxSetup({beforeSend:function(e,t){var n,o,a=!1;"string"==typeof t.data&&(-1!==t.data.indexOf("twt_cc_signup")&&(a="twt_cc_signup"),-1!==t.data.indexOf("action=mailpoet")&&(a="action=mailpoet"),-1!==t.data.indexOf("action=user_registration")&&-1!==t.data.indexOf("ur_frontend_form_nonce")&&(a="action=user_registration"),-1!==t.data.indexOf("action=happyforms_message")&&(a="action=happyforms_message"),-1!==t.data.indexOf("action=new_activity_comment")&&(a="action=new_activity_comment"),-1!==t.data.indexOf("action=wwlc_create_user"))&&(a="action=wwlc_create_user"),(a="string"==typeof t.url&&-1!==t.url.indexOf("wc-ajax=add_to_cart")?"wc-ajax=add_to_cart":a)&&(n=a="",+ctPublic.settings__data__bot_detector_enabled?(o=(new i).toolGetEventToken())&&(a="data%5Bct_bot_detector_event_token%5D="+o+"&"):n="data%5Bct_no_cookie_hidden_field%5D="+(n=getNoCookieData())+"&",t.data=n+a+t.data)}})}},{key:"catchWCRestRequestAsMiddleware",value:function(){window.hasOwnProperty("wp")&&window.wp.hasOwnProperty("apiFetch")&&"function"==typeof window.wp.apiFetch.use&&window.wp.apiFetch.use(function(e,t){return"object"===_typeof(e)&&null!==e&&e.hasOwnProperty("data")&&e.hasOwnProperty("path")&&(e.data.hasOwnProperty("requests")&&0<e.data.requests.length&&e.data.requests[0].hasOwnProperty("path")&&"/wc/store/v1/cart/add-item"===e.data.requests[0].path&&(+ctPublic.settings__data__bot_detector_enabled?e.data.requests[0].data.event_token=localStorage.getItem("bot_detector_event_token"):"none"===ctPublic.data__cookies_type&&(e.data.requests[0].data.ct_no_cookie_hidden_field=getNoCookieData())),"/wc/store/v1/checkout"===e.path)&&(+ctPublic.settings__data__bot_detector_enabled?e.data.event_token=localStorage.getItem("bot_detector_event_token"):"none"===ctPublic.data__cookies_type&&(e.data.ct_no_cookie_hidden_field=getNoCookieData())),t(e)})}},{key:"searchFormMiddleware",value:function(){var e,n=this,o=function(e){var t=e.getAttribute("class");return"string"!=typeof t&&(t=""),e.querySelector("input.dgwt-wcas-search-input")||"hero-search-form"===e.getAttribute("id")||"hb-booking-search-form"===t||-1!==t.indexOf("tribe-events")&&-1!==t.indexOf("search")},t=_createForOfIteratorHelper(document.forms);try{for(t.s();!(e=t.n()).done;)(()=>{var t=e.value;"undefined"!=typeof ctPublic&&1==+ctPublic.settings__forms__search_test&&("searchform"===t.getAttribute("id")||null!==t.getAttribute("class")&&-1!==t.getAttribute("class").indexOf("search-form")||null!==t.getAttribute("role")&&-1!==t.getAttribute("role").indexOf("search"))&&!o(t)&&(t.apbctSearchPrevOnsubmit=t.onsubmit,t.onsubmit=function(e){return n.searchFormHandler(e,t)})})()}catch(e){t.e(e)}finally{t.f()}}},{key:"searchFormHandler",value:function(e,t){try{var n,o,a,i=t.querySelector('[name*="apbct_email_id__"]'),c=null,r=(null!==i&&null!==i.value&&(c=i.value),getCleanTalkStorageDataArray()),s=apbctLocalStorage.get("bot_detector_event_token");null===r&&null===i&&null===s||(e.preventDefault(),n=function(){null!==i&&i.parentNode.removeChild(i),"function"==typeof t.apbctSearchPrevOnsubmit?t.apbctSearchPrevOnsubmit():HTMLFormElement.prototype.submit.call(t)},o=r,null!==c&&(o.apbct_search_form__honeypot_value=c),o.ct_bot_detector_event_token=s,"string"==typeof o.apbct_pixel_url&&-1!==o.apbct_pixel_url.indexOf("%3A")&&(o.apbct_pixel_url=decodeURIComponent(o.apbct_pixel_url)),void 0!==(a=JSON.stringify(o))&&0!==a.length?ctSetAlternativeCookie(a,{callback:n,onErrorCallback:n,forceAltCookies:!0}):n())}catch(e){console.warn("APBCT search form onsubmit handler error. "+e)}}},{key:"toolForAntiCrawlerCheckDuringBotDetector",value:function(){var e=setInterval(function(){localStorage.bot_detector_event_token&&(ctSetCookie("apbct_bot_detector_exist","1","3600"),clearInterval(e))},500)}},{key:"toolGetEventToken",value:function(){var t=localStorage.getItem("bot_detector_event_token");try{t=JSON.parse(t)}catch(e){t=!1}return!(null===t||!1===t||!t.hasOwnProperty("value")||""===t.value)&&t.value}}])})(),ApbctShowForbidden=(()=>_createClass(function e(){_classCallCheck(this,e)},[{key:"prepareBlockForAjaxForms",value:function(){var o=function(e){if(e.responseText&&-1!==e.responseText.indexOf('"apbct')&&-1===e.responseText.indexOf("DOCTYPE"))try{this.parseBlockMessage(JSON.parse(e.responseText))}catch(e){console.log(e.toString())}}.bind(this);"undefined"!=typeof jQuery?"function"!=typeof jQuery(document).ajaxComplete()?jQuery(document).on("ajaxComplete",function(e,t,n){o(t)}):jQuery(document).ajaxComplete(function(e,t,n){o(t)}):"undefined"!=typeof XMLHttpRequest&&document.addEventListener("readystatechange",function(e){4===e.target.readyState&&o(e.target)})}},{key:"parseBlockMessage",value:function(e){var t="";void 0!==e.apbct&&(e=e.apbct).blocked&&(t=e.comment),(t=void 0!==e.data&&void 0!==(e=e.data).message?e.message:t)&&(document.dispatchEvent(new CustomEvent("apbctAjaxBockAlert",{bubbles:!0,detail:{message:t}})),cleantalkModal.loaded=t,cleantalkModal.open(),1==+e.stop_script)&&window.stop()}}]))();function apbct_ready(){(new ApbctShowForbidden).prepareBlockForAjaxForms();var e,a=new ApbctHandler;if(a.detectForcedAltCookiesForms(),+ctPublic.settings__data__bot_detector_enabled||((e=new ApbctGatheringData).setSessionId(),e.writeReferrersToSessionStorage(),e.setCookiesType(),e.startFieldsListening(),e.listenAutocomplete(),e.gatheringTypoData()),"function"==typeof initParams)try{initParams()}catch(e){console.log("initParams error:",e)}setTimeout(function(){+ctPublic.settings__data__bot_detector_enabled&&((e=new ApbctEventTokenTransport).attachEventTokenToMultipageGravityForms(),e.attachEventTokenToWoocommerceGetRequestAddToCart());var e,t=new ApbctAttachData;+ctPublic.settings__data__bot_detector_enabled||t.attachHiddenFieldsToForms();for(var n=0;n<document.forms.length;n++){var o=document.forms[n];a.excludeForm(o)||(t.attachVisibleFieldsToForm(o,n),a.catchMain(o,n))}},1e3),1==+ctPublic.settings__forms__search_test&&a.searchFormMiddleware(),a.catchXmlHttpRequest(),a.catchFetchRequest(),a.catchJqueryAjax(),a.catchWCRestRequestAsMiddleware(),+ctPublic.settings__data__bot_detector_enabled&&(new ApbctEventTokenTransport).setEventTokenToAltCookies(),ctPublic.settings__sfw__anti_crawler&&+ctPublic.settings__data__bot_detector_enabled&&a.toolForAntiCrawlerCheckDuringBotDetector()}ctPublic.data__key_is_ok&&("loading"!==document.readyState?apbct_ready():apbct_attach_event_handler(document,"DOMContentLoaded",apbct_ready),apbctLocalStorage.set("ct_checkjs",ctPublic.ct_checkjs_key,!0),"native"===ctPublic.data__cookies_type)&&ctSetCookie("ct_checkjs",ctPublic.ct_checkjs_key,!0);var defaultFetch=window.fetch,defaultSend=XMLHttpRequest.prototype.send,botDetectorLogLastUpdate=((new ApbctHandler).cronFormsHandler(2e3),0),botDetectorLogEventTypesCollected=[];function sendBotDetectorLogToAltSessions(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:3e3,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1e3;setTimeout(function(){setInterval(function(){var e=apbctLocalStorage.get("ct_bot_detector_frontend_data_log");needsSaveLogToAltSessions(e)&&(botDetectorLogLastUpdate=e.log_last_update,ctSetAlternativeCookie([],{forceAltCookies:!0}))},t)},e)}function needsSaveLogToAltSessions(e){if(e&&e.hasOwnProperty("log_last_update")&&botDetectorLogLastUpdate!==e.log_last_update)try{for(var t=0;t<e.records.length;t++){var n=e.records[t].frontend_data.js_event;if(void 0===n||!botDetectorLogEventTypesCollected.includes(n))return botDetectorLogEventTypesCollected.push(n),!0}}catch(e){console.log("APBCT: bot detector log collection error: ".e.toString())}return!1}ctPublicFunctions.hasOwnProperty("data__bot_detector_enabled")&&1==ctPublicFunctions.data__bot_detector_enabled&&ctPublicFunctions.hasOwnProperty("data__frontend_data_log_enabled")&&1==ctPublicFunctions.data__frontend_data_log_enabled&&sendBotDetectorLogToAltSessions(1e3);var ctCheckedEmails={},ctCheckedEmailsExist={};function checkEmail(e){var t=e.target.value;!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)||!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},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 checkEmailExist(t){var e,n=t.target.value;n&&n.length?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n)&&(n in ctCheckedEmailsExist?(e=ctCheckedEmailsExist[n],getResultCheckEmailExist(t,e,n)):(viewCheckEmailExist(t,"load"),(ctPublicFunctions.data__ajax_type="rest")===ctPublicFunctions.data__ajax_type?apbct_public_sendREST("check_email_exist_post",{method:"POST",data:{email:n},callback:function(e){getResultCheckEmailExist(t,e,n)}}):"admin_ajax"===ctPublicFunctions.data__ajax_type&&apbct_public_sendAJAX({action:"apbct_email_check_exist_post",email:n},{callback:function(e){getResultCheckEmailExist(t,e,n)}}))):((e=document.getElementById("apbct-check_email_exist-block"))&&e.remove(),(e=document.getElementById("apbct-check_email_exist-popup_description"))&&e.remove())}function getResultCheckEmailExist(e,t,n){t&&t.result&&(t=t.result,ctCheckedEmailsExist[n]={result:t,timestamp:Date.now()/1e3|0},"EXISTS"==t.result?viewCheckEmailExist(e,"good_email",t.text_result):viewCheckEmailExist(e,"bad_email",t.text_result),ctSetCookie("ct_checked_emails_exist",JSON.stringify(ctCheckedEmailsExist)))}function viewCheckEmailExist(e,t,n){var o,a,e=e.target.parentElement,i=e.querySelector('[name*="email"]');if(i)switch(document.getElementById("apbct-check_email_exist-block")?o=document.getElementById("apbct-check_email_exist-block"):((o=document.createElement("div")).setAttribute("class","apbct-check_email_exist-block"),o.setAttribute("id","apbct-check_email_exist-block"),window.addEventListener("scroll",function(){o.style.top=i.getBoundingClientRect().top+"px"}),e.after(o)),document.getElementById("apbct-check_email_exist-popup_description")?a=document.getElementById("apbct-check_email_exist-popup_description"):((a=document.createElement("div")).setAttribute("class","apbct-check_email_exist-popup_description"),a.setAttribute("id","apbct-check_email_exist-popup_description"),window.addEventListener("scroll",function(){a.style.top=o.getBoundingClientRect().top+"px"}),o.after(a)),ctEmailExistSetElementsPositions(i),window.addEventListener("resize",function(e){ctEmailExistSetElementsPositions(i)}),t){case"load":o.classList.remove("apbct-check_email_exist-good_email","apbct-check_email_exist-bad_email"),o.classList.add("apbct-check_email_exist-load");break;case"good_email":o.classList.remove("apbct-check_email_exist-load","apbct-check_email_exist-bad_email"),o.classList.add("apbct-check_email_exist-good_email"),o.onmouseover=function(){a.textContent=n,a.style.display="block",a.style.top=i.getBoundingClientRect().top-a.getBoundingClientRect().height+"px",a.style.color="#1C7129"},o.onmouseout=function(){a.style.display="none"};break;case"bad_email":o.classList.remove("apbct-check_email_exist-load","apbct-check_email_exist-good_email"),o.classList.add("apbct-check_email_exist-bad_email"),o.onmouseover=function(){a.textContent=n,a.style.display="block",a.style.top=i.getBoundingClientRect().top-a.getBoundingClientRect().height+"px",a.style.color="#E01111"},o.onmouseout=function(){a.style.display="none"}}}function ctEmailExistSetElementsPositions(e){var t,n,o;e&&(t=e.getBoundingClientRect(),n=e.offsetHeight,e=e.offsetWidth,(o=document.getElementById("apbct-check_email_exist-block"))&&(o.style.cssText="\n            top: ".concat(t.top,"px;\n            left: ").concat(t.right-35-10,"px;\n            height: ").concat(n,"px;\n            width: ").concat(35,"px;\n        ")),o=document.getElementById("apbct-check_email_exist-popup_description"))&&(o.style.cssText="\n            width: ".concat(e,"px;\n            left: ").concat(t.left,"px;\n        "))}function ctProcessError(e,t){var n={},e=(e&&e.message?n.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}:(n.err={msg:e},t&&(n.err.file=t)),n.url=window.location.href,n.userAgent=window.navigator.userAgent,"ct_js_errors");null===(o=localStorage.getItem(e))&&(o="[]");for(var o=JSON.parse(o),a=0;a<o.length;a++)if(o[a].err.msg===n.err.msg)return;o.push(n),localStorage.setItem(e,JSON.stringify(o))}function closeAllPopupTRP(){var e=document.querySelectorAll(".apbct-real-user-popup.visible");0<e.length&&e.forEach(function(e){e.classList.remove("visible")})}1===Math.floor(100*Math.random())&&(window.onerror=function(e,t){for(var n=["apbct","ctPublic"],o=n.length;o--;)-1!==e.indexOf(n[o])&&ctProcessError(e,t);return!1}),document.addEventListener("DOMContentLoaded",function(){var e,t=this,l=void 0,d=!1;"undefined"==typeof ctPublic&&"undefined"==typeof ctTrpAdminLocalize||void 0===(l="undefined"!=typeof ctPublic&&ctPublic.theRealPerson?ctPublic.theRealPerson:l)&&"undefined"!=typeof ctTrpAdminLocalize&&ctTrpAdminLocalize.theRealPerson&&(l=ctTrpAdminLocalize.theRealPerson,d=!0),l&&(e='.apbct-trp *[class*="comment-author"]',document.querySelector(".apbct-trp .comment-author .comment-author-link")&&(e='.apbct-trp *[class*="comment-author-link"]'),0!==(e=document.querySelectorAll(e+',.apbct-trp *[class*="review__author"],.apbct-trp td[class*="column-author"] > strong')).length)&&(e.forEach(function(e,t){var n,o,a,i,c,r,s;"undefined"==typeof pagenow&&e.parentElement.className.indexOf("group")<0&&"DIV"!=e.tagName||((n=document.createElement("div")).setAttribute("class","apbct-real-user-badge"),(o=document.createElement("img")).setAttribute("src",l.imgPersonUrl),o.setAttribute("class","apbct-real-user-popup-img"),(a=document.createElement("div")).setAttribute("class","apbct-real-user-popup"),(i=document.createElement("p")).setAttribute("class","apbct-real-user-popup-header"),i.append(l.phrases.trpHeading),(c=document.createElement("div")).setAttribute("class","apbct-real-user-popup-content_row"),(r=document.createElement("span")).append(l.phrases.trpContent1+" "),r.append(l.phrases.trpContent2),d&&((s=document.createElement("a")).setAttribute("href",l.trpContentLink),s.setAttribute("target","_blank"),s.text=l.phrases.trpContentLearnMore,r.append(" "),r.append(s)),c.append(r),a.append(i,c),n.append(o),e.append(n),e.append(a))}),document.querySelectorAll(".apbct-real-user-badge").forEach(function(o){var a=void 0,e=(t.body.addEventListener("click",function(e){-1==e.target.className.indexOf("apbct-real-user")&&-1==e.target.parentElement.className.indexOf("apbct-real-user")&&closeAllPopupTRP()}),o.addEventListener("click",function(){var e=this.nextElementSibling;e&&e.classList.contains("apbct-real-user-popup")&&e.classList.toggle("visible")}),o.addEventListener("mouseenter",function(){closeAllPopupTRP();var e=this.nextElementSibling;e&&e.classList.contains("apbct-real-user-popup")&&e.classList.add("visible")}),o.addEventListener("mouseleave",function(){var t=this;a=setTimeout(function(){var e=t.nextElementSibling;e&&e.classList.contains("apbct-real-user-popup")&&e.classList.remove("visible")},1e3)}),o.nextElementSibling);e.addEventListener("mouseenter",function(){clearTimeout(a),e.classList.add("visible")}),e.addEventListener("mouseleave",function(){a=setTimeout(function(){e.classList.contains("apbct-real-user-popup")&&e.classList.remove("visible")},1e3)}),o.addEventListener("touchend",function(){var n=this;a=setTimeout(function(){var e=n.nextElementSibling,t=window.getSelection();e&&t&&e.classList.contains("apbct-real-user-popup")&&0===t.toString().length?e.classList.remove("visible"):(clearTimeout(a),document.addEventListener("selectionchange",function e(){var t=window.getSelection();t&&0===t.toString().length&&(a=setTimeout(function(){var e=o.nextElementSibling;e&&e.classList.contains("apbct-real-user-popup")&&e.classList.remove("visible")},3e3),document.removeEventListener("selectionchange",e))}))},3e3)})}))});
     1function ownKeys(t,e){var n,o=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),o.push.apply(o,n)),o}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(n),!0).forEach(function(e){_defineProperty(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function _callSuper(e,t,n){return t=_getPrototypeOf(t),_possibleConstructorReturn(e,_isNativeReflectConstruct()?Reflect.construct(t,n||[],_getPrototypeOf(e).constructor):t.apply(e,n))}function _possibleConstructorReturn(e,t){if(t&&("object"==_typeof(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(e)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_isNativeReflectConstruct=function(){return!!e})()}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _createForOfIteratorHelper(e,t){var n,o,a,i,c="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(c)return a=!(o=!0),{s:function(){c=c.call(e)},n:function(){var e=c.next();return o=e.done,e},e:function(e){a=!0,n=e},f:function(){try{o||null==c.return||c.return()}finally{if(a)throw n}}};if(Array.isArray(e)||(c=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length)return c&&(e=c),i=0,{s:t=function(){},n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){var n;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(n="Object"===(n={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty(e,t,n){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}function apbctSetEmailDecoderPopupAnimation(){var e=["apbct_dog_one","apbct_dog_two","apbct_dog_three"],t=document.createElement("div");t.classList="apbct-ee-animation-wrapper";for(var n=0;n<e.length;n++){var o=document.createElement("span");o.classList="apbct_dog "+e[n],o.innerText="@",t.append(o)}return t}function ctFillDecodedEmailHandler(){var e,t,n,o=0<arguments.length&&void 0!==arguments[0]&&arguments[0],a=!1,i="",c="",r=("undefined"!=typeof ctPublic?(this.removeEventListener("click",ctFillDecodedEmailHandler),a=this,ctPublic.encodedEmailNodesIsMixed=!1,i=ctPublic.wl_brandname,c=ctPublic.encodedEmailNodes):"undefined"!=typeof ctAdminCommon&&(i=ctAdminCommon.plugin_name,c=ctAdminCommon.encodedEmailNode),document.body.classList.add("apbct-popup-fade"),document.getElementById("apbct_popup"));r?(r.setAttribute("style","display: inherit"),"undefined"!=typeof ctPublicFunctions&&ctPublicFunctions.text__ee_wait_for_decoding?document.getElementById("apbct_popup_text").innerHTML=ctPublicFunctions.text__ee_wait_for_decoding:document.getElementById("apbct_popup_text").innerHTML=ctAdminCommon.text__ee_wait_for_decoding):((r=document.createElement("div")).setAttribute("class","apbct-popup apbct-email-encoder-popup"),r.setAttribute("id","apbct_popup"),(e=document.createElement("span")).classList="apbct-email-encoder-elements_center",(t=document.createElement("p")).innerText=i,t.setAttribute("class","apbct-email-encoder--popup-header"),e.append(t),(i=document.createElement("div")).setAttribute("id","apbct_popup_text"),i.setAttribute("class","apbct-email-encoder-elements_center"),i.style.color="black",(t=document.createElement("p")).id="apbct_email_ecoder__popup_text_node_first","undefined"!=typeof ctPublicFunctions&&ctPublicFunctions.text__ee_wait_for_decoding?t.innerText=ctPublicFunctions.text__ee_wait_for_decoding:t.innerText=ctAdminCommon.text__ee_wait_for_decoding,t.setAttribute("class","apbct-email-encoder-elements_center"),(n=document.createElement("p")).id="apbct_email_ecoder__popup_text_node_second","undefined"!=typeof ctPublicFunctions&&ctPublicFunctions.text__ee_decoding_process?n.innerText=ctPublicFunctions.text__ee_decoding_process:n.innerText=ctAdminCommon.text__ee_decoding_process,i.append(t),i.append(n),r.append(e),r.append(i),r.append(apbctSetEmailDecoderPopupAnimation()),document.body.append(r)),apbctAjaxEmailDecodeBulk(o,c,a)}function apbctAjaxEmailDecodeBulk(e,t,n){if(e&&n){for(var o={post_url:document.location.href,referrer:document.referrer,encodedEmails:""},a=(1==ctPublic.settings__data__bot_detector_enabled?o.event_token=apbctLocalStorage.get("bot_detector_event_token"):o.event_javascript_data=getJavascriptClientData(),{}),i=0;i<t.length;i++){void 0!==t[i].href&&0===t[i].href.indexOf("mailto:")&&(e.preventDefault(),ctPublic.encodedEmailNodesIsMixed=!0);var c=document.createElement("div");c.setAttribute("class","apbct-tooltip"),apbct(t[i]).append(c),a[i]=t[i].dataset.originalString}o.encodedEmails=JSON.stringify(a),"rest"===ctPublicFunctions.data__ajax_type?apbct_public_sendREST("apbct_decode_email",{data:o,method:"POST",callback:function(e){ctSetCookie("apbct_email_encoder_passed",ctPublic.emailEncoderPassKey,""),apbctEmailEncoderCallbackBulk(e,t,n)},onErrorCallback:function(e){resetEncodedNodes(),ctShowDecodeComment(e)}}):(o.action="apbct_decode_email",apbct_public_sendAJAX(o,{notJson:!1,callback:function(e){console.log("result"),console.log(e),ctSetCookie("apbct_email_encoder_passed",ctPublic.emailEncoderPassKey,""),apbctEmailEncoderCallbackBulk(e,t,n)},onErrorCallback:function(e){resetEncodedNodes(),ctShowDecodeComment(e)}}))}else{var o=t.dataset.originalString,o={encodedEmails:JSON.stringify({0:o})},r=document.createElement("div");r.setAttribute("class","apbct-tooltip"),t.appendChild(r),apbct_admin_sendAJAX({action:"apbct_decode_email",encodedEmails:o.encodedEmails},{callback:function(e){apbctEmailEncoderCallbackBulk(e,t,!1)},notJson:!0})}}function apbctEmailEncoderCallbackBulk(i,c){var r=2<arguments.length&&void 0!==arguments[2]&&arguments[2];i.success&&!0===i.data[0].is_allowed?setTimeout(function(){var t,e,n,o,a=document.getElementById("apbct_popup");null!==a&&(o="",o=r?(i.data.forEach(function(e){e.encoded_email===r.dataset.originalString&&(t=e)}),t.decoded_email.split(/[&?]/)[0]):i.data[0].decoded_email,n=a.querySelector("#apbct_email_ecoder__popup_text_node_first"),(e=document.createElement("b")).setAttribute("class","apbct-email-encoder-select-whole-email"),e.innerText=o,"undefined"!=typeof ctPublicFunctions&&ctPublicFunctions.text__ee_click_to_select?e.title=ctPublicFunctions.text__ee_click_to_select:e.title=ctAdminCommon.text__ee_click_to_select,n&&("undefined"!=typeof ctPublicFunctions&&ctPublicFunctions.text__ee_original_email?n.innerHTML=ctPublicFunctions.text__ee_original_email+"&nbsp;"+e.outerHTML:n.innerHTML=ctAdminCommon.text__ee_original_email+"&nbsp;"+e.outerHTML,n.setAttribute("style","flex-direction: row;")),(o=a.querySelector(".apbct-ee-animation-wrapper"))&&o.remove(),(e=a.querySelector("#apbct_email_ecoder__popup_text_node_second"))&&e.remove(),(n=document.createElement("span")).classList="apbct-email-encoder-elements_center top-margin-long",document.querySelector(".apbct-email-encoder-got-it-button")||(o=document.createElement("button"),"undefined"!=typeof ctPublicFunctions&&ctPublicFunctions.text__ee_got_it?o.innerText=ctPublicFunctions.text__ee_got_it:o.innerText=ctAdminCommon.text__ee_got_it,o.classList="apbct-email-encoder-got-it-button",o.addEventListener("click",function(){document.body.classList.remove("apbct-popup-fade"),a.setAttribute("style","display:none"),fillDecodedNodes(c,i),"undefined"!=typeof ctPublic&&ctPublic.encodedEmailNodesIsMixed&&r&&r.click()}),n.append(o),a.append(n)))},3e3):r?i.success?(resetEncodedNodes(),"undefined"!=typeof ctPublicFunctions&&ctPublicFunctions.text__ee_blocked?ctShowDecodeComment(ctPublicFunctions.text__ee_blocked+": "+i.data[0].comment):ctShowDecodeComment(ctAdminCommon.text__ee_blocked+": "+i.data[0].comment)):(resetEncodedNodes(),"undefined"!=typeof ctPublicFunctions&&ctPublicFunctions.text__ee_cannot_connect?ctShowDecodeComment(ctPublicFunctions.text__ee_cannot_connect+": "+i.apbct.comment):ctShowDecodeComment(ctAdminCommon.text__ee_cannot_connect+": "+i.data[0].comment)):console.log("result",i)}function resetEncodedNodes(){void 0!==ctPublic.encodedEmailNodes&&ctPublic.encodedEmailNodes.forEach(function(e){e.addEventListener("click",ctFillDecodedEmailHandler)})}function ctShowDecodeComment(e){e=e||("undefined"!=typeof ctPublicFunctions&&ctPublicFunctions.text__ee_cannot_decode?ctPublicFunctions:ctAdminCommon).text__ee_cannot_decode;var t=document.getElementById("apbct_popup"),n=document.getElementById("apbct_popup_text");null!==t&&(document.body.classList.remove("apbct-popup-fade"),"undefined"!=typeof ctPublicFunctions&&ctPublicFunctions.text__ee_email_decoder?n.innerText=ctPublicFunctions.text__ee_email_decoder+": "+e:n.innerText=ctAdminCommon.text__ee_email_decoder+": "+e,setTimeout(function(){t.setAttribute("style","display:none")},3e3))}function fillDecodedNodes(i,c){if(0<i.length){for(var e,t=0;t<i.length;t++)if(0!==(e=(t=>{var n,e;if(c.data.forEach(function(e){e.encoded_email===i[t].dataset.originalString&&(n=e)}),!1===n.is_allowed)return{v:void 0};if(void 0===i[t].href||0!==i[t].href.indexOf("mailto:")&&0!==i[t].href.indexOf("tel:"))i[t].classList.add("no-blur"),setTimeout(function(){ctProcessDecodedDataResult(n,i[t])},2e3);else{if(0===i[t].href.indexOf("mailto:"))e="mailto:";else{if(0!==i[t].href.indexOf("tel:"))return 0;e="tel:"}var o=i[t].href.replace(e,""),a=i[t].innerHTML;i[t].innerHTML=a.replace(o,n.decoded_email),i[t].href=e+n.decoded_email,i[t].querySelectorAll("span.apbct-email-encoder").forEach(function(t){var n="";c.data.forEach(function(e){e.encoded_email===t.dataset.originalString&&(n=e.decoded_email)}),t.innerHTML=n})}i[t].removeEventListener("click",ctFillDecodedEmailHandler)})(t))&&e)return e.v}else{var n=c.data[0];i.classList.add("no-blur"),setTimeout(function(){ctProcessDecodedDataResult(n,i)},2e3),i.removeEventListener("click",ctFillDecodedEmailHandler)}}function ctProcessDecodedDataResult(e,t){t.setAttribute("title",""),t.removeAttribute("style"),ctFillDecodedEmail(t,e.decoded_email)}function ctFillDecodedEmail(e,t){e.innerHTML=e.innerHTML.replace(/.+?(<div class=["']apbct-tooltip["'].+?<\/div>)/,t+"$1")}document.addEventListener("DOMContentLoaded",function(){var e=document.querySelectorAll("[data-original-string]");if("undefined"!=typeof ctPublic&&(ctPublic.encodedEmailNodes=e),e.length)for(var t=0;t<e.length;++t)e[t].addEventListener("click",ctFillDecodedEmailHandler)});var cleantalkModal=cleantalkModal||{loaded:!1,loading:!1,opened:!1,opening:!1,ignoreURLConvert:!1,load:function(e){var t;this.loaded||(this.loading=!0,t=function(e,t,n,o){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(){var e,t="";for(e in this.styles)t+=e+":"+this.styles[e]+";";return t}var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"get_options_template",n={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},a={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},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},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},r={styles:{overflow:"hidden"},toString:e},l=document.createElement("style"),r=(l.setAttribute("id","cleantalk-modal-styles"),l.innerHTML="body.cleantalk-modal-opened{"+r+"}",l.innerHTML+="#cleantalk-modal-overlay{"+n+"}",l.innerHTML+="#cleantalk-modal-close{"+a+"}",l.innerHTML+="#cleantalk-modal-close:before{"+i+"}",l.innerHTML+="#cleantalk-modal-close:after{"+c+"}",document.body.append(l),document.createElement("div")),n=(r.setAttribute("id","cleantalk-modal-overlay"),document.body.append(r),document.body.classList.add("cleantalk-modal-opened"),document.createElement("div")),a=(n.setAttribute("id","cleantalk-modal-inner"),n.setAttribute("style",o),r.append(n),document.createElement("div")),i=(a.setAttribute("id","cleantalk-modal-close"),n.append(a),document.createElement("div"));this.loaded?/.*\/inc/g.test(this.loaded)||this.ignoreURLConvert?i.innerHTML=this.loaded:i.innerHTML=this.loaded.replace(/(https?:\/\/[^\s]+)/g,'<a href="$1" target="_blank">$1</a>'):(i.innerHTML="Loading...",t&&this.load(t)),i.setAttribute("id","cleantalk-modal-content"),n.append(i),this.opened=!0},confirm:function(e){var t,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"",o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"",a=3<arguments.length?arguments[3]:void 0,i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:"Yes",c=5<arguments.length&&void 0!==arguments[5]?arguments[5]:"No",r=(cleantalkModal.loading=!1,document.getElementById("cleantalk-modal-content"));r&&(r.innerHTML="",(t=document.createElement("div")).className="cleantalk-confirm-modal_header",t.textContent=e,r.append(t),(e=document.createElement("div")).className="cleantalk-confirm-modal_text-block",r.append(e),o&&60<o.length&&(o="..."+o.slice(o.length-60)),(t=document.createElement("div")).className="cleantalk-confirm-modal_text",t.textContent=n,e.append(t),(o=document.createElement("div")).className="cleantalk-confirm-modal_buttons-block",r.append(o),(n=document.createElement("button")).className="cleantalk_link cleantalk_link-auto",n.textContent=i,n.onclick=function(){a(!0),cleantalkModal.close()},o.append(n),(e=document.createElement("button")).className="cleantalk_link cleantalk_link-auto",e.textContent=c,e.onclick=function(){cleantalkModal.close()},o.append(e)),document.dispatchEvent(new CustomEvent("cleantalkModalContentLoaded",{bubbles:!0}))},close:function(){document.body.classList.remove("cleantalk-modal-opened");var e=document.getElementById("cleantalk-modal-overlay"),t=document.getElementById("cleantalk-modal-styles");null!==e&&e.remove(),null!==t&&t.remove(),document.dispatchEvent(new CustomEvent("cleantalkModalClosed",{bubbles:!0}))}},ApbctCore=(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)}),(()=>_createClass(function e(t){_classCallCheck(this,e),_defineProperty(this,"ajax_parameters",{}),_defineProperty(this,"restParameters",{}),_defineProperty(this,"selector",null),_defineProperty(this,"elements",[]),_defineProperty(this,"eventCallback",void 0),_defineProperty(this,"eventSelector",void 0),_defineProperty(this,"event",void 0),this.select(t)},[{key:"select",value:function(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}},{key:"addElement",value:function(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()}},{key:"push",value:function(e){this.elements.push(e)}},{key:"reduce",value:function(){this.elements=this.elements.slice(0,-1)}},{key:"deselect",value:function(){this.elements=[]}},{key:"css",value:function(e,t){if(t=t||!1,"object"===_typeof(e)){for(var n in e)if(Object.hasOwn(e,n))for(var o=n.replace(/([-_][a-z])/g,function(e){return e.toUpperCase().replace("-","").replace("_","")}),a=0;a<this.elements.length;a++)this.elements[a].style[o]=e[n];return this}var i;if("string"==typeof e)return void 0!==(i=getComputedStyle(this.elements[0])[e])&&!t&&(i=i.replace(/(\d)(em|pt|%|px){1,2}$/,"$1"),Number(i)==i)?Number(i):i}},{key:"hide",value:function(){this.prop("prev-display",this.css("display")),this.css({display:"none"})}},{key:"show",value:function(){this.css({display:this.prop("prev-display")})}},{key:"addClass",value:function(){for(var e=0;e<this.elements.length;e++)this.elements[e].classList.add(className)}},{key:"removeClass",value:function(){for(var e=0;e<this.elements.length;e++)this.elements[e].classList.remove(className)}},{key:"toggleClass",value:function(e){for(var t=0;t<this.elements.length;t++)this.elements[t].classList.toggle(e)}},{key:"ajax",value:function(e){return this.ajax_parameters=e,new ApbctAjax(e)}},{key:"rest",value:function(e){return this.restParameters=e,new ApbctRest(e)}},{key:"on",value:function(){this.event=arguments.length<=0?void 0:arguments[0],this.eventCallback=(arguments.length<=2?void 0:arguments[2])||(arguments.length<=1?void 0:arguments[1]),this.eventSelector="string"==typeof(arguments.length<=1?void 0:arguments[1])?arguments.length<=1?void 0:arguments[1]:null;for(var e=0;e<this.elements.length;e++)this.elements[e].addEventListener(this.event,null!==this.eventSelector?this.onChecker.bind(this):this.eventCallback)}},{key:"onChecker",value:function(e){if(e.target===document.querySelector(this.eventSelector))return e.stopPropagation(),this.eventCallback(e)}},{key:"ready",value:function(e){document.addEventListener("DOMContentLoaded",e)}},{key:"change",value:function(e){this.on("change",e)}},{key:"attr",value:function(e){for(var t=[],n=0;n<this.elements.length;n++)void 0!==this.elements[n][e]?t.push(this.elements[n][e]):t.push(this.elements[n].getAttribute(e));return 1===t.length?t[0]:t}},{key:"prop",value:function(e,t){if(void 0!==t){for(var n=0;n<this.elements.length;n++)this.elements[n][e]=t;return this}for(var o=[],a=0;a<this.elements.length;a++)o.push(this.elements[a][e]);return 1===o.length?o[0]:o}},{key:"html",value:function(e){return void 0!==e?this.prop("innerHTML",e):this.prop("innerHTML")}},{key:"val",value:function(e){return void 0!==e?this.prop("value",e):this.prop("value")}},{key:"data",value:function(e,t){return void 0!==t?this.prop("apbct-data",e,t):this.prop("apbct-data")}},{key:"is",value:function(e){var t,n=!1,o=_createForOfIteratorHelper(this.elements);try{for(o.s();!(t=o.n()).done;)var a=t.value,n=n||this.isElem(a,e)}catch(e){o.e(e)}finally{o.f()}return n}},{key:"isElem",value:function(e,t){var n=!1;return"function"==typeof t&&(n=n||t.call(this,e)),n="string"==typeof t?t.match(/^[a-z]/)&&(e=>(e=document.createElement(e).constructor,!Boolean(~[HTMLElement,HTMLUnknownElement].indexOf(e))))(t)?n||e.tagName.toLowerCase()===t.toLowerCase():t.match(/^[a-z]/)?n||Boolean(e[t]):n||(null!==this.selector?null!==document.querySelector(this.selector+t):this.isWithoutSelector(e,t)):n}},{key:"isWithoutSelector",value:function(e,t){var n,o=!1,a=_createForOfIteratorHelper(document.querySelectorAll(t));try{for(a.s();!(n=a.n()).done;)o=o||e===n.value}catch(e){a.e(e)}finally{a.f()}return o}},{key:"filter",value:function(e){this.selector=null;for(var t=this.elements.length-1;0<=t;t--)this.isElem(this.elements[t],e)||this.elements.splice(Number(t),1);return this}},{key:"parent",value:function(e){return this.select(this.elements[0].parentElement),void 0===e||this.is(e)||this.deselect(),this}},{key:"parents",value:function(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}},{key:"children",value:function(e){return this.select(this.elements[0].children),void 0!==e&&this.filter(e),this}},{key:"siblings",value:function(e){var t=this.elements[0];return this.parent(),this.children(e),this.elements.splice(this.elements.indexOf(t),1),this}},{key:"remove",value:function(){var e,t=_createForOfIteratorHelper(this.elements);try{for(t.s();!(e=t.n()).done;)e.value.remove()}catch(e){t.e(e)}finally{t.f()}}},{key:"after",value:function(e){var t,n=_createForOfIteratorHelper(this.elements);try{for(n.s();!(t=n.n()).done;)t.value.after(e)}catch(e){n.e(e)}finally{n.f()}}},{key:"append",value:function(e){var t,n=_createForOfIteratorHelper(this.elements);try{for(n.s();!(t=n.n()).done;)t.value.append(e)}catch(e){n.e(e)}finally{n.f()}}},{key:"fadeIn",value:function(o){var a,t=_createForOfIteratorHelper(this.elements);try{for(t.s();!(a=t.n()).done;)(()=>{function e(){t.style.opacity=+t.style.opacity+(new Date-n)/o,n=+new Date,+t.style.opacity<1&&(window.requestAnimationFrame&&requestAnimationFrame(e)||setTimeout(e,16))}var t=a.value,n=(t.style.opacity=0,t.style.display="block",+new Date);e()})()}catch(e){t.e(e)}finally{t.f()}}},{key:"fadeOut",value:function(o){var a,t=_createForOfIteratorHelper(this.elements);try{for(t.s();!(a=t.n()).done;)(()=>{function e(){t.style.opacity=+t.style.opacity-(new Date-n)/o,n=+new Date,0<+t.style.opacity?window.requestAnimationFrame&&requestAnimationFrame(e)||setTimeout(e,16):t.style.display="none"}var t=a.value,n=(t.style.opacity=1,+new Date);e()})()}catch(e){t.e(e)}finally{t.f()}}}]))());function selectActualNonce(){var e="";return ctPublicFunctions.hasOwnProperty("_fresh_nonce")&&"string"==typeof ctPublicFunctions._fresh_nonce&&0<ctPublicFunctions._fresh_nonce.length?ctPublicFunctions._fresh_nonce:("admin_ajax"===ctPublicFunctions.data__ajax_type&&ctPublicFunctions.hasOwnProperty("_ajax_nonce")&&"string"==typeof ctPublicFunctions._ajax_nonce&&0<ctPublicFunctions._ajax_nonce.length&&(e=ctPublicFunctions._ajax_nonce),"rest"===ctPublicFunctions.data__ajax_type&&ctPublicFunctions.hasOwnProperty("_rest_nonce")&&"string"==typeof ctPublicFunctions._rest_nonce&&0<ctPublicFunctions._rest_nonce.length?ctPublicFunctions._rest_nonce:e)}function apbct(e){return(new ApbctCore).select(e)}var ApbctXhr=(()=>{function o(e){for(var t in _classCallCheck(this,o),_defineProperty(this,"xhr",new XMLHttpRequest),_defineProperty(this,"method","POST"),_defineProperty(this,"url",""),_defineProperty(this,"async",!0),_defineProperty(this,"user",null),_defineProperty(this,"password",null),_defineProperty(this,"data",{}),_defineProperty(this,"button",null),_defineProperty(this,"spinner",null),_defineProperty(this,"progressbar",null),_defineProperty(this,"context",this),_defineProperty(this,"callback",null),_defineProperty(this,"onErrorCallback",null),_defineProperty(this,"responseType","json"),_defineProperty(this,"headers",{}),_defineProperty(this,"timeout",15e3),_defineProperty(this,"methods_to_convert_data_to_URL",["GET","HEAD"]),_defineProperty(this,"body",null),_defineProperty(this,"http_code",0),_defineProperty(this,"status_text",""),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.isWpNonceError()?this.getFreshNonceAndRerunXHR(e):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)}return _createClass(o,[{key:"prepare",value:function(){this.button&&(this.button.setAttribute("disabled","disabled"),this.button.style.cursor="not-allowed"),this.spinner&&(this.spinner.style.display="inline")}},{key:"complete",value:function(){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")}},{key:"onReadyStateChange",value:function(){null!==this.on_ready_state_change&&"function"==typeof this.on_ready_state_change&&this.on_ready_state_change()}},{key:"onProgress",value:function(e){null!==this.on_progress&&"function"==typeof this.on_progress&&this.on_progress()}},{key:"onError",value:function(){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)}},{key:"onTimeout",value:function(){this.complete(),this.error(0,"timeout"),null!==this.onErrorCallback&&"function"==typeof this.onErrorCallback&&this.onErrorCallback("Timeout")}},{key:"onLoad",value:function(){if(this.complete(),"json"===this.responseType){if(null===this.xhr.response)return this.error(this.http_code,this.status_text,"No response"),!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)}},{key:"isWpNonceError",value:function(){var e=!1,t=!1;return 4==this.xhr.readyState&&(e="object"===_typeof(this.xhr.response)&&null!==this.xhr.response&&this.xhr.response.hasOwnProperty("data")&&this.xhr.response.data.hasOwnProperty("status")&&403===this.xhr.response.data.status,t="-1"===this.xhr.response&&403===this.xhr.status),e||t}},{key:"getFreshNonceAndRerunXHR",value:function(e){var t,n="";e.hasOwnProperty("headers")&&e.headers.hasOwnProperty("X-WP-Nonce")&&(n=e.headers["X-WP-Nonce"]),""!==(n=e.hasOwnProperty("data")&&e.data.hasOwnProperty("_ajax_nonce")?e.data._ajax_nonce:n)&&((t={method:"POST"}).data={spbc_remote_call_action:"get_fresh_wpnonce",plugin_name:"antispam",nonce_prev:n,initial_request_params:e},t.notJson=!0,t.url=ctPublicFunctions.host_url,t.callback=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var o=t[0],a=!1;(a=void 0!==t[1]&&t[1].hasOwnProperty("initial_request_params")?t[1].initial_request_params:a)&&o.hasOwnProperty("wpnonce")&&(ctPublicFunctions._fresh_nonce=o.wpnonce,"rest"===ctPublicFunctions.data__ajax_type?(new ApbctCore).rest(a):(new ApbctCore).ajax(a))},new o(t))}},{key:"error",value:function(e,t,n){var o="";"timeout"===t?o+="Server response timeout":200===e?"parsererror"===t?o+="Unexpected response from server. See console for details.":(o+="Unexpected error. Status: "+t+".",void 0!==n&&(o+=" Additional error info: "+n)):o+=500===e?"Internal server error.":"Unexpected response code:"+e,this.errorOutput(o),null!==this.onErrorCallback&&"function"==typeof this.onErrorCallback&&this.onErrorCallback(this.status_text)}},{key:"errorOutput",value:function(e){console.log("%c ctXHR error: %c"+e,"color: red;","color: grey;")}},{key:"setHeaders",value:function(){for(var e in this.headers)void 0!==this.headers[e]&&this.xhr.setRequestHeader(e,this.headers[e])}},{key:"convertData",value:function(){return~this.methods_to_convert_data_to_URL.indexOf(this.method)?this.convertDataToURL():this.convertDataToBody()}},{key:"convertDataToURL",value:function(){var e=new URLSearchParams(this.data).toString(),t=this.url.match(/^(https?:\/{2})?[a-z0-9.]+\?/)?"&":"?";return this.url+=t+e,this.url}},{key:"convertDataToBody",value:function(){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}},{key:"deleteDoubleJSONEncoding",value:function(e){if("object"===_typeof(e))for(var t in e){var n;Object.hasOwn(e,t)&&("object"===_typeof(e[t])&&(e[t]=this.deleteDoubleJSONEncoding(e[t])),"string"==typeof e[t])&&null!==e[t].match(/^[\[{].*?[\]}]$/)&&"object"===_typeof(n=JSON.parse(e[t]))&&(e[t]=n)}return e}}])})(),ApbctAjax=(()=>{function o(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return _classCallCheck(this,o),(t=t[0]).data._ajax_nonce=selectActualNonce(),_callSuper(this,o,[t])}return _inherits(o,ApbctXhr),_createClass(o)})(),ApbctRest=(()=>{function a(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];_classCallCheck(this,a);var t=t[0],o=selectActualNonce();return t.url=a.default_route+t.route,t.headers={"X-WP-Nonce":o},_defineProperty(o=_callSuper(this,a,[t]),"route",""),o}return _inherits(a,ApbctXhr),_createClass(a)})();function initParams(){var e=new Date,t=navigator.webdriver,n="undefined"!=typeof ApbctGatheringData&&"function"==typeof ApbctGatheringData.prototype.getScreenInfo?(new ApbctGatheringData).getScreenInfo():"",o=[["ct_ps_timestamp",Math.floor((new Date).getTime()/1e3)],["ct_fkp_timestamp","0"],["ct_pointer_data","0"],["ct_timezone",e.getTimezoneOffset()/60*-1],["ct_screen_info",n],["apbct_headless",t]];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",e.getTimezoneOffset()/60*-1),apbctLocalStorage.set("ct_screen_info",n),apbctLocalStorage.set("apbct_headless",t),"native"!==ctPublic.data__cookies_type)o.push(["apbct_visible_fields","0"]);else{var a=document.cookie.split(";");if(0!==a.length)for(var i=0;i<a.length;i++){var c=a[i].trim().split("=")[0];0===c.indexOf("apbct_visible_fields_")&&ctDeleteCookie(c)}}+ctPublic.pixel__setting&&3!=+ctPublic.pixel__setting&&("function"==typeof ctIsDrawPixel&&ctIsDrawPixel()?"function"==typeof ctGetPixelUrl&&ctGetPixelUrl():o.push(["apbct_pixel_url",ctPublic.pixel__url])),+ctPublic.data__email_check_before_post&&(o.push(["ct_checked_emails","0"]),"function"==typeof apbct)&&apbct('input[type = "email"], #email').on("blur",checkEmail),+ctPublic.data__email_check_exist_post&&(o.push(["ct_checked_emails_exist","0"]),"function"==typeof apbct)&&(apbct('.comment-form input[name = "email"], input#email').on("blur",checkEmailExist),apbct('.frm-fluent-form input[name = "email"], input#email').on("blur",checkEmailExist),apbct('#registerform input[name = "user_email"]').on("blur",checkEmailExist),apbct('form.wc-block-checkout__form input[type = "email"]').on("blur",checkEmailExist),apbct('form.checkout input[type = "email"]').on("blur",checkEmailExist)),apbctLocalStorage.isSet("ct_checkjs")?o.push(["ct_checkjs",apbctLocalStorage.get("ct_checkjs")]):o.push(["ct_checkjs",0]),ctSetCookie(o)}function ctSetCookie(e,t,o){var n,a=["ct_sfw_pass_key","ct_sfw_passed","wordpress_apbct_antibot","apbct_anticrawler_passed","apbct_bot_detector_exist","apbct_antiflood_passed","apbct_email_encoder_passed"],i=!1;"string"==typeof e&&(i="ct_pointer_data"===e,"string"!=typeof t&&"number"!=typeof t||(e=[[e,t,o]])),"none"===ctPublicFunctions.data__cookies_type?(n=[],e.forEach(function(e){-1!==a.indexOf(e[0])?n.push(e):apbctLocalStorage.set(e[0],e[1])}),0<n.length&&ctSetAlternativeCookie(n),ctPublic.force_alt_cookies&&!i?ctSetAlternativeCookie(e,{forceAltCookies:!0}):+ctPublic.settings__data__bot_detector_enabled||ctNoCookieAttachHiddenFieldsToForms()):"native"===ctPublicFunctions.data__cookies_type?(ctPublic.force_alt_cookies&&!i&&ctSetAlternativeCookie(e,{forceAltCookies:!0}),e.forEach(function(e){var t=void 0!==e[2]?"expires="+o+"; ":"",n="https:"===location.protocol?"; secure":"";document.cookie=ctPublicFunctions.cookiePrefix+e[0]+"="+encodeURIComponent(e[1])+"; "+t+"path=/; samesite=lax"+n})):"alternative"!==ctPublicFunctions.data__cookies_type||i||ctSetAlternativeCookie(e)}function ctSetAlternativeCookie(e,t){if("function"==typeof getJavascriptClientData?Array.isArray(e)&&(e=getJavascriptClientData(e)):+ctPublic.settings__data__bot_detector_enabled||console.log("APBCT ERROR: getJavascriptClientData() is not loaded"),"string"==typeof(e=Array.isArray(e)&&e[0]&&"apbct_bot_detector_exist"===e[0][0]?{apbct_bot_detector_exist:e[0][1]}:e))try{e=JSON.parse(e)}catch(e){return void console.log("APBCT ERROR: JSON parse error:"+e)}var n=t&&t.callback||null,o=t&&t.onErrorCallback||null;t&&t.forceAltCookies&&(e.apbct_force_alt_cookies=!0),"rest"===ctPublicFunctions.data__ajax_type?("string"==typeof e.apbct_pixel_url&&-1!==e.apbct_pixel_url.indexOf("%3A")&&(e.apbct_pixel_url=decodeURIComponent(e.apbct_pixel_url)),apbct_public_sendREST("alt_sessions",{method:"POST",data:{cookies:e},callback:n,onErrorCallback:o})):"admin_ajax"===ctPublicFunctions.data__ajax_type&&apbct_public_sendAJAX({action:"apbct_alt_session__save__AJAX",cookies:e},{notJson:1,callback:n,onErrorCallback:o,beforeSend:function(e){e.setRequestHeader("X-Robots-Tag","noindex, nofollow")}})}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,n){var o=[],n=(o.callback=t.callback||null,o.onErrorCallback=t.onErrorCallback||null,o.callback_context=t.callback_context||null,o.callback_params=t.callback_params||null,o.async=t.async||!0,o.notJson=t.notJson||null,o.responseType=t.notJson?"text":"json",o.timeout=t.timeout||15e3,o.obj=n||null,o.button=t.button||null,o.spinner=t.spinner||null,o.progressbar=t.progressbar||null,o.silent=t.silent||null,o.no_nonce=t.no_nonce||null,o.data=e,o.url=ctPublicFunctions._ajax_url,selectActualNonce());"string"==typeof e?(o.no_nonce||(o.data=o.data+"&_ajax_nonce="+n),o.data=o.data+"&no_cache="+Math.random()):(o.no_nonce||(o.data._ajax_nonce=n),o.data.no_cache=Math.random()),(new ApbctCore).ajax(o)}function apbct_public_sendREST(e,t){var n=[];n.route=e,n.callback=t.callback||null,n.onErrorCallback=t.onErrorCallback||null,n.data=t.data||[],n.method=t.method||"POST",(new ApbctCore).rest(n)}function apbct_attach_event_handler(e,t,n){"function"==typeof window.addEventListener?e.addEventListener(t,n):e.attachEvent(t,n)}function apbct_remove_event_handler(e,t,n){"function"==typeof window.removeEventListener?e.removeEventListener(t,n):e.detachEvent(t,n)}function removeDoubleJsonEncoding(e){if("object"===_typeof(e))for(var t in e){var n;"object"===_typeof(e[t])&&(e[t]=removeDoubleJsonEncoding(e[t])),"string"==typeof e[t]&&null!==e[t].match(/^[\[{].*?[\]}]$/)&&"object"===_typeof(n=JSON.parse(e[t]))&&(e[t]=n)}return e}function ctGetPageForms(){var e=document.forms;return e||!1}function apbct_js_keys__set_input_value(e,t,n,o){if(0<document.querySelectorAll("[name^=ct_checkjs]").length)for(var a=document.querySelectorAll("[name^=ct_checkjs]"),i=0;i<a.length;i++)a[i].value=e.js_key}_defineProperty(ApbctRest,"default_route",ctPublicFunctions._rest_url+"cleantalk-antispam/v1/"),Object.prototype.hasOwn||Object.defineProperty(Object.prototype,"hasOwn",{value:function(e){return Object.prototype.hasOwnProperty.call(this,e)},enumerable:!1,configurable:!0,writable:!0});var apbctLocalStorage={get:function(t,n){void 0===n&&(n="value");t=localStorage.getItem(t);if(null!==t)try{var o=JSON.parse(t);if(!o.hasOwnProperty(n))return o;try{return JSON.parse(o[n])}catch(e){return o[n].toString()}}catch(e){return t}return!1},set:function(e,t){var n;!(2<arguments.length&&void 0!==arguments[2])||arguments[2]?(n={value:JSON.stringify(t),timestamp:Math.floor((new Date).getTime()/1e3)},localStorage.setItem(e,JSON.stringify(n))):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(){for(var e={},t=0;t<localStorage.length;t++){var n=localStorage.key(t);-1===n.indexOf("ct_")&&-1===n.indexOf("apbct_")||(e[n.toString()]=apbctLocalStorage.get(n))}return e}},apbctSessionStorage={get:function(t,e){void 0===e&&(e="value");t=sessionStorage.getItem(t);if(null!==t)try{var n=JSON.parse(t);return n.hasOwnProperty(e)?JSON.parse(n[e]):n}catch(e){return t}return!1},set:function(e,t){var n;!(2<arguments.length&&void 0!==arguments[2])||arguments[2]?(n={value:JSON.stringify(t),timestamp:Math.floor((new Date).getTime()/1e3)},sessionStorage.setItem(e,JSON.stringify(n))):sessionStorage.setItem(e,t)},isSet:function(e){return null!==sessionStorage.getItem(e)},delete:function(e){sessionStorage.removeItem(e)},getCleanTalkData:function(){for(var e={},t=0;t<sessionStorage.length;t++){var n=sessionStorage.key(t);-1===n.indexOf("ct_")&&-1===n.indexOf("apbct_")||(e[n.toString()]=apbctSessionStorage.get(n))}return e}};function getNoCookieData(){var e=apbctLocalStorage.getCleanTalkData(),t=apbctSessionStorage.getCleanTalkData(),e=_objectSpread(_objectSpread({},e),t),e=JSON.stringify(e);return"_ct_no_cookie_data_"+btoa(e)}function getCleanTalkStorageDataArray(){var e=apbctLocalStorage.getCleanTalkData(),t=apbctSessionStorage.getCleanTalkData(),n={typo:[]},o=(document.ctTypoData&&document.ctTypoData.data&&(n={typo:document.ctTypoData.data}),{collecting_user_activity_data:[]});return document.ctCollectingUserActivityData&&(o={collecting_user_activity_data:JSON.parse(JSON.stringify(document.ctCollectingUserActivityData))}),_objectSpread(_objectSpread(_objectSpread(_objectSpread({},e),t),n),o)}var ApbctEventTokenTransport=(()=>_createClass(function e(){_classCallCheck(this,e)},[{key:"attachEventTokenToMultipageGravityForms",value:function(){document.addEventListener("gform_page_loaded",function(){void 0!==ctPublic.force_alt_cookies&&("undefined"===ctPublic.force_alt_cookies||ctPublic.force_alt_cookies)||"function"!=typeof setEventTokenField||"function"!=typeof botDetectorLocalStorage||setEventTokenField(botDetectorLocalStorage.get("bot_detector_event_token"))})}},{key:"attachEventTokenToWoocommerceGetRequestAddToCart",value:function(){ctPublic.wc_ajax_add_to_cart||document.querySelectorAll("a.add_to_cart_button:not(.product_type_variable):not(.wc-interactive)").forEach(function(o){o.addEventListener("click",function(e){var t=o.getAttribute("href"),n=apbctLocalStorage.get("bot_detector_event_token");n&&(-1===t.indexOf("?")?t+="?":t+="&",o.setAttribute("href",t+="ct_bot_detector_event_token="+n))})})}},{key:"setEventTokenToAltCookies",value:function(){void 0!==ctPublic.force_alt_cookies&&ctPublic.force_alt_cookies&&(tokenCheckerIntervalId=setInterval(function(){var e=apbctLocalStorage.get("bot_detector_event_token");e&&(ctSetAlternativeCookie(JSON.stringify({ct_bot_detector_event_token:e}),{forceAltCookies:!0}),clearInterval(tokenCheckerIntervalId))},1e3))}},{key:"restartBotDetectorEventTokenAttach",value:function(){var e,t=0<document.getElementsByClassName("latepoint-form").length||0<document.getElementsByClassName("mec-booking-form-container").length||null!==document.getElementById("login-form-popup");try{t&&(e=apbctLocalStorage.get("bot_detector_event_token"),"function"==typeof setEventTokenField)&&void 0!==e&&64===e.length&&setEventTokenField(e)}catch(e){console.log(e.toString())}}}]))(),ApbctAttachData=(()=>_createClass(function e(){_classCallCheck(this,e)},[{key:"attachHiddenFieldsToForms",value:function(){void 0!==ctPublic.force_alt_cookies&&("undefined"===ctPublic.force_alt_cookies||ctPublic.force_alt_cookies)||+ctPublic.settings__data__bot_detector_enabled||(ctNoCookieAttachHiddenFieldsToForms(),document.addEventListener("gform_page_loaded",ctNoCookieAttachHiddenFieldsToForms))}},{key:"attachVisibleFieldsToForm",value:function(e,t){var n=document.createElement("input"),t=(n.setAttribute("type","hidden"),n.setAttribute("id","apbct_visible_fields_"+t),n.setAttribute("name","apbct_visible_fields"),{});t[0]=this.collectVisibleFields(e),n.value=btoa(JSON.stringify(t)),e.append(n)}},{key:"attachVisibleFieldsDuringSubmit",value:function(e,t){"native"!==ctPublic.data__cookies_type&&void 0!==e.target.ctFormIndex&&this.setVisibleFieldsCookie(this.collectVisibleFields(t),e.target.ctFormIndex)}},{key:"constructNoCookieHiddenField",value:function(e){var t="hidden",e=("submit"===e&&(t="submit"),""),n=getCleanTalkStorageDataArray(),n=JSON.stringify(n);return n="_ct_no_cookie_data_"+btoa(n),(e=document.createElement("input")).setAttribute("name","ct_no_cookie_hidden_field"),e.setAttribute("value",n),e.setAttribute("type",t),e.classList.add("apbct_special_field"),e.classList.add("ct_no_cookie_hidden_field"),e}},{key:"attachNoCookieDuringSubmit",value:function(e){"none"===ctPublic.data__cookies_type&&e.target&&e.target.action&&-1!==e.target.action.toString().indexOf("mailpoet_subscription_form")&&(window.XMLHttpRequest.prototype.send=function(e){var t,n;+ctPublic.settings__data__bot_detector_enabled?(t=(new ApbctHandler).toolGetEventToken())&&(n="data%5Bct_no_cookie_hidden_field%5D="+getNoCookieData()+"&",defaultSend.call(this,n+("data%5Bct_bot_detector_event_token%5D="+t+"&")+e)):(n="data%5Bct_no_cookie_hidden_field%5D="+getNoCookieData()+"&",defaultSend.call(this,n+e)),setTimeout(function(){window.XMLHttpRequest.prototype.send=defaultSend},0)})}},{key:"setVisibleFieldsCookie",value:function(e,t){var n="object"===_typeof(e)&&null!==e?e:{};if("native"===ctPublic.data__cookies_type)for(var o in n){if(10<o)return;ctSetCookie("apbct_visible_fields_"+(void 0!==t?t:o),JSON.stringify(n[o]))}else ctSetCookie("apbct_visible_fields",JSON.stringify(n))}},{key:"collectVisibleFields",value:function(e){var t,n=[],o="",a=0,i="",c=0,r=[];for(t in e.elements)isNaN(+t)||(n[t]=e.elements[t]);return(n=n.filter(function(e){return-1===r.indexOf(e.getAttribute("name"))&&(-1===["radio","checkbox"].indexOf(e.getAttribute("type"))||(r.push(e.getAttribute("name")),!1))})).map(function(e){var t;return"submit"===e.getAttribute("type")||null===e.getAttribute("name")||"ct_checkjs"===e.getAttribute("name")?{elem:e,skip:!0}:"hidden"===e.getAttribute("type")?{elem:e,isVisible:!1,isWpEditor:e.classList.contains("wp-editor-area")}:{elem:e,isVisible:!("none"===(t=getComputedStyle(e)).display||"hidden"===t.visibility||"0"===t.opacity),isWpEditor:e.classList.contains("wp-editor-area")}}).forEach(function(e){e.skip||(e.isVisible||e.isWpEditor?(o+=" "+e.elem.getAttribute("name"),a++):(i+=" "+e.elem.getAttribute("name"),c++))}),i=i.trim(),{visible_fields:o=o.trim(),visible_fields_count:a,invisible_fields:i,invisible_fields_count:c}}}]))(),ApbctHandler=(()=>{function i(){_classCallCheck(this,i)}return _createClass(i,[{key:"excludeForm",value:function(e){return!!this.checkHiddenFieldsExclusions(e,"visible_fields")||!!(e.querySelector('input[name="wspsc_add_cart_submit"]')||e.querySelector('input[name="option"][value="com_vikrentcar"]')||e.querySelector('input[name="option"][value="com_vikbooking"]'))||void 0!==e.elements.apbct_visible_fields&&0<e.elements.apbct_visible_fields.length}},{key:"checkHiddenFieldsExclusions",value:function(e,t){var n="string"==typeof e.action?e.action:"";return!!Boolean(e.querySelector("fieldset.asl_sett_scroll"))||!!e.classList.contains("swpf-instant-filtering")||-1!==n.indexOf("secure.payu.com")||-1!==n.indexOf("hsforms")||-1!==n.indexOf("secureinternetbank.com")||"string"==typeof t&&-1!==["visible_fields","no_cookie"].indexOf(t)&&1===this.getHiddenFieldExclusionsType(e)[t]}},{key:"getHiddenFieldExclusionsType",value:function(e){var t={no_cookie:0,visible_fields:0},n=((0==+ctPublic.data__visible_fields_required||"get"===e.method.toString().toLowerCase()&&0===e.querySelectorAll(".nf-form-content").length&&"twt_cc_signup"!==e.id||e.classList.contains("slp_search_form")||e.parentElement.classList.contains("mec-booking")||-1!==e.action.toString().indexOf("activehosted.com")||e.id&&"caspioform"===e.id||e.classList&&e.classList.contains("tinkoffPayRow")||e.classList&&e.classList.contains("give-form")||e.id&&"ult-forgot-password-form"===e.id||e.id&&-1!==e.id.toString().indexOf("calculatedfields")||e.id&&-1!==e.id.toString().indexOf("sac-form")||e.id&&-1!==e.id.toString().indexOf("cp_tslotsbooking_pform")||e.name&&-1!==e.name.toString().indexOf("cp_tslotsbooking_pform")||"https://epayment.epymtservice.com/epay.jhtml"===e.action.toString()||e.name&&-1!==e.name.toString().indexOf("tribe-bar-form")||e.id&&"ihf-login-form"===e.id||e.id&&"subscriberForm"===e.id&&-1!==e.action.toString().indexOf("actionType=update")||e.id&&"ihf-main-search-form"===e.id||e.id&&"frmCalc"===e.id||-1!==e.action.toString().indexOf("property-organizer-delete-saved-search-submit")||null!==e.querySelector('a[name="login"]'))&&(t.visible_fields=1),e.parentNode);return(n&&n.classList.contains("proinput")||"options"===e.name&&e.classList.contains("asp-fss-flex"))&&(t.no_cookie=1),e&&e.classList.contains("woocommerce-form-login")&&(t.visible_fields=1,t.no_cookie=1),t}},{key:"prevCallExclude",value:function(e){return!!e.classList.contains("hb-booking-search-form")}},{key:"catchMain",value:function(t,e){t.onsubmit_prev=t.onsubmit,t.ctFormIndex=e;var n=this;t.onsubmit=function(e){(new ApbctAttachData).attachVisibleFieldsDuringSubmit(e,t),e.target.onsubmit_prev instanceof Function&&!n.prevCallExclude(e.target)&&(void 0!==e.target.classList&&e.target.classList.contains("brave_form_form")&&e.preventDefault(),setTimeout(function(){e.target.onsubmit_prev.call(e.target,e)},0))}}},{key:"cronFormsHandler",value:function(){setTimeout(function(){setInterval(function(){+ctPublic.settings__data__bot_detector_enabled||(new ApbctGatheringData).restartFieldsListening(),(new ApbctEventTokenTransport).restartBotDetectorEventTokenAttach()},2e3)},0<arguments.length&&void 0!==arguments[0]?arguments[0]:2e3)}},{key:"detectForcedAltCookiesForms",value:function(){var e=0<document.querySelectorAll("#tmpl-nf-layout").length,t=0<document.querySelectorAll(".uael-registration-form-wrapper").length,n=0<document.querySelectorAll('script[id*="smart-forms"]').length,o=0<document.querySelectorAll('iframe[name="jetpack_remote_comment"]').length,a=0<document.querySelectorAll('div[id^="user-registration-form"]').length,i=0<document.querySelectorAll('div[class^="et_pb_newsletter_form"]').length,c=0<document.querySelectorAll('div[class^="fluent_booking_app"]').length,r=0<document.querySelectorAll('div[class^="et_bloom_form_container"]').length,l=0<document.querySelectorAll('div[class*="pafe-form"]').length,s=0<document.querySelectorAll('div [class*="otter-form"]').length,d=0<document.querySelectorAll("form .sqbform, .fields_reorder_enabled").length;ctPublic.force_alt_cookies=n||e||o||t||a||i||c||l||r||s||d,setTimeout(function(){var e;ctPublic.force_alt_cookies||(e=0<document.querySelectorAll('main[id^="bookingpress_booking_form"]').length,ctPublic.force_alt_cookies=e)},1e3)}},{key:"catchXmlHttpRequest",value:function(){var o;(null!==document.querySelector("div.wfu_container")||null!==document.querySelector("#newAppointmentForm")||null!==document.querySelector(".booked-calendar-shortcode-wrap")||document.body.classList.contains("single-product")&&void 0!==cwginstock)&&(o=XMLHttpRequest.prototype.send,XMLHttpRequest.prototype.send=function(e){var t,n;return!e||"string"!=typeof e||-1===e.indexOf("action=wfu_ajax_action_ask_server")&&-1===e.indexOf("action=booked_add_appt")&&-1===e.indexOf("action=cwginstock_product_subscribe")?o.apply(this,[e]):(t="",+ctPublic.settings__data__bot_detector_enabled?(n=(new i).toolGetEventToken())&&(t+="&data%5Bct_bot_detector_event_token%5D="+n):t+="&data%5Bct_no_cookie_hidden_field%5D="+getNoCookieData(),o.apply(this,[e+=t]))})}},{key:"catchFetchRequest",value:function(){setTimeout(function(){0<document.forms.length&&0<Array.from(document.forms).map(function(e){return e.classList.contains("metform-form-content")}).length&&(window.fetch=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t&&t[0]&&"function"==typeof t[0].includes&&(t[0].includes("/wp-json/metform/")||ctPublicFunctions._rest_url&&(()=>{try{return t[0].includes(new URL(ctPublicFunctions._rest_url).pathname+"metform/")}catch(e){}})())&&t&&t[1]&&t[1].body&&(+ctPublic.settings__data__bot_detector_enabled?t[1].body.append("ct_bot_detector_event_token",apbctLocalStorage.get("bot_detector_event_token")):t[1].body.append("ct_no_cookie_hidden_field",getNoCookieData())),defaultFetch.apply(window,t)})},1e3)}},{key:"catchJqueryAjax",value:function(){"undefined"!=typeof jQuery&&"function"==typeof jQuery.ajaxSetup&&jQuery.ajaxSetup({beforeSend:function(e,t){var n,o,a=!1;"string"==typeof t.data&&(-1!==t.data.indexOf("twt_cc_signup")&&(a="twt_cc_signup"),-1!==t.data.indexOf("action=mailpoet")&&(a="action=mailpoet"),-1!==t.data.indexOf("action=user_registration")&&-1!==t.data.indexOf("ur_frontend_form_nonce")&&(a="action=user_registration"),-1!==t.data.indexOf("action=happyforms_message")&&(a="action=happyforms_message"),-1!==t.data.indexOf("action=new_activity_comment")&&(a="action=new_activity_comment"),-1!==t.data.indexOf("action=wwlc_create_user"))&&(a="action=wwlc_create_user"),(a="string"==typeof t.url&&-1!==t.url.indexOf("wc-ajax=add_to_cart")?"wc-ajax=add_to_cart":a)&&(n=a="",+ctPublic.settings__data__bot_detector_enabled?(o=(new i).toolGetEventToken())&&(a="data%5Bct_bot_detector_event_token%5D="+o+"&"):n="data%5Bct_no_cookie_hidden_field%5D="+(n=getNoCookieData())+"&",t.data=n+a+t.data)}})}},{key:"catchWCRestRequestAsMiddleware",value:function(){window.hasOwnProperty("wp")&&window.wp.hasOwnProperty("apiFetch")&&"function"==typeof window.wp.apiFetch.use&&window.wp.apiFetch.use(function(e,t){return"object"===_typeof(e)&&null!==e&&e.hasOwnProperty("data")&&e.hasOwnProperty("path")&&(e.data.hasOwnProperty("requests")&&0<e.data.requests.length&&e.data.requests[0].hasOwnProperty("path")&&"/wc/store/v1/cart/add-item"===e.data.requests[0].path&&(+ctPublic.settings__data__bot_detector_enabled?e.data.requests[0].data.event_token=localStorage.getItem("bot_detector_event_token"):"none"===ctPublic.data__cookies_type&&(e.data.requests[0].data.ct_no_cookie_hidden_field=getNoCookieData())),"/wc/store/v1/checkout"===e.path)&&(+ctPublic.settings__data__bot_detector_enabled?e.data.event_token=localStorage.getItem("bot_detector_event_token"):"none"===ctPublic.data__cookies_type&&(e.data.ct_no_cookie_hidden_field=getNoCookieData())),t(e)})}},{key:"searchFormMiddleware",value:function(){var e,n=this,t=_createForOfIteratorHelper(document.forms);try{for(t.s();!(e=t.n()).done;)(()=>{var t=e.value;"undefined"!=typeof ctPublic&&1==+ctPublic.settings__forms__search_test&&null!==t.getAttribute("apbct-form-sign")&&"native_search"===t.getAttribute("apbct-form-sign")&&(t.apbctSearchPrevOnsubmit=t.onsubmit,t.onsubmit=function(e){return n.searchFormHandler(e,t)})})()}catch(e){t.e(e)}finally{t.f()}}},{key:"searchFormHandler",value:function(e,t){try{var n,o,a,i=t.querySelector('[name*="apbct_email_id__"]'),c=null,r=(null!==i&&null!==i.value&&(c=i.value),getCleanTalkStorageDataArray()),l=apbctLocalStorage.get("bot_detector_event_token");null===r&&null===i&&null===l||(e.preventDefault(),n=function(){null!==i&&i.parentNode.removeChild(i),"function"==typeof t.apbctSearchPrevOnsubmit?t.apbctSearchPrevOnsubmit():HTMLFormElement.prototype.submit.call(t)},o=r,null!==c&&(o.apbct_search_form__honeypot_value=c),o.ct_bot_detector_event_token=l,"string"==typeof o.apbct_pixel_url&&-1!==o.apbct_pixel_url.indexOf("%3A")&&(o.apbct_pixel_url=decodeURIComponent(o.apbct_pixel_url)),void 0!==(a=JSON.stringify(o))&&0!==a.length?ctSetAlternativeCookie(a,{callback:n,onErrorCallback:n,forceAltCookies:!0}):n())}catch(e){console.warn("APBCT search form onsubmit handler error. "+e)}}},{key:"toolForAntiCrawlerCheckDuringBotDetector",value:function(){var e=setInterval(function(){localStorage.bot_detector_event_token&&(ctSetCookie("apbct_bot_detector_exist","1","3600"),clearInterval(e))},500)}},{key:"toolGetEventToken",value:function(){var t=localStorage.getItem("bot_detector_event_token");try{t=JSON.parse(t)}catch(e){t=!1}return!(null===t||!1===t||!t.hasOwnProperty("value")||""===t.value)&&t.value}}])})(),ApbctShowForbidden=(()=>_createClass(function e(){_classCallCheck(this,e)},[{key:"prepareBlockForAjaxForms",value:function(){var o=function(e){if(e.responseText&&-1!==e.responseText.indexOf('"apbct')&&-1===e.responseText.indexOf("DOCTYPE"))try{this.parseBlockMessage(JSON.parse(e.responseText))}catch(e){console.log(e.toString())}}.bind(this);"undefined"!=typeof jQuery?"function"!=typeof jQuery(document).ajaxComplete()?jQuery(document).on("ajaxComplete",function(e,t,n){o(t)}):jQuery(document).ajaxComplete(function(e,t,n){o(t)}):"undefined"!=typeof XMLHttpRequest&&document.addEventListener("readystatechange",function(e){4===e.target.readyState&&o(e.target)})}},{key:"parseBlockMessage",value:function(e){var t="";void 0!==e.apbct&&(e=e.apbct).blocked&&(t=e.comment),(t=void 0!==e.data&&void 0!==(e=e.data).message?e.message:t)&&(document.dispatchEvent(new CustomEvent("apbctAjaxBockAlert",{bubbles:!0,detail:{message:t}})),cleantalkModal.loaded=t,cleantalkModal.open(),1==+e.stop_script)&&(window.stop(),e.integration)&&"NEXForms"===e.integration&&((t=document.querySelector("form.submit-nex-form button.nex-submit"))&&(t.disabled=!0,t.style.opacity="0.5",t.style.cursor="not-allowed",t.style.pointerEvents="none",t.style.backgroundColor="#ccc",t.style.color="#fff"),e=document.querySelector("div.nex_success_message"))&&(e.style.display="none")}}]))();function apbct_ready(){(new ApbctShowForbidden).prepareBlockForAjaxForms();var e,a=new ApbctHandler;if(a.detectForcedAltCookiesForms(),+ctPublic.settings__data__bot_detector_enabled||((e=new ApbctGatheringData).setSessionId(),e.writeReferrersToSessionStorage(),e.setCookiesType(),e.startFieldsListening(),e.listenAutocomplete(),e.gatheringTypoData()),"function"==typeof initParams)try{initParams()}catch(e){console.log("initParams error:",e)}setTimeout(function(){+ctPublic.settings__data__bot_detector_enabled&&((e=new ApbctEventTokenTransport).attachEventTokenToMultipageGravityForms(),e.attachEventTokenToWoocommerceGetRequestAddToCart());var e,t=new ApbctAttachData;+ctPublic.settings__data__bot_detector_enabled||t.attachHiddenFieldsToForms();for(var n=0;n<document.forms.length;n++){var o=document.forms[n];a.excludeForm(o)||(t.attachVisibleFieldsToForm(o,n),a.catchMain(o,n))}},1e3),1==+ctPublic.settings__forms__search_test&&a.searchFormMiddleware(),a.catchXmlHttpRequest(),a.catchFetchRequest(),a.catchJqueryAjax(),a.catchWCRestRequestAsMiddleware(),+ctPublic.settings__data__bot_detector_enabled&&(new ApbctEventTokenTransport).setEventTokenToAltCookies(),ctPublic.settings__sfw__anti_crawler&&+ctPublic.settings__data__bot_detector_enabled&&a.toolForAntiCrawlerCheckDuringBotDetector()}ctPublic.data__key_is_ok&&("loading"!==document.readyState?apbct_ready():apbct_attach_event_handler(document,"DOMContentLoaded",apbct_ready),apbctLocalStorage.set("ct_checkjs",ctPublic.ct_checkjs_key,!0),"native"===ctPublic.data__cookies_type)&&ctSetCookie("ct_checkjs",ctPublic.ct_checkjs_key,!0);var defaultFetch=window.fetch,defaultSend=XMLHttpRequest.prototype.send,botDetectorLogLastUpdate=((new ApbctHandler).cronFormsHandler(2e3),0),botDetectorLogEventTypesCollected=[];function sendBotDetectorLogToAltSessions(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:3e3,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1e3;setTimeout(function(){setInterval(function(){var e=apbctLocalStorage.get("ct_bot_detector_frontend_data_log");needsSaveLogToAltSessions(e)&&(botDetectorLogLastUpdate=e.log_last_update,ctSetAlternativeCookie([],{forceAltCookies:!0}))},t)},e)}function needsSaveLogToAltSessions(e){if(e&&e.hasOwnProperty("log_last_update")&&botDetectorLogLastUpdate!==e.log_last_update)try{for(var t=0;t<e.records.length;t++){var n=e.records[t].frontend_data.js_event;if(void 0===n||!botDetectorLogEventTypesCollected.includes(n))return botDetectorLogEventTypesCollected.push(n),!0}}catch(e){console.log("APBCT: bot detector log collection error: ".e.toString())}return!1}ctPublicFunctions.hasOwnProperty("data__bot_detector_enabled")&&1==ctPublicFunctions.data__bot_detector_enabled&&ctPublicFunctions.hasOwnProperty("data__frontend_data_log_enabled")&&1==ctPublicFunctions.data__frontend_data_log_enabled&&sendBotDetectorLogToAltSessions(1e3);var ctCheckedEmails={},ctCheckedEmailsExist={};function checkEmail(e){var t=e.target.value;!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)||!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},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 checkEmailExist(t){var e,n=t.target.value;n&&n.length?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n)&&(n in ctCheckedEmailsExist?(e=ctCheckedEmailsExist[n],getResultCheckEmailExist(t,e,n)):(viewCheckEmailExist(t,"load"),(ctPublicFunctions.data__ajax_type="rest")===ctPublicFunctions.data__ajax_type?apbct_public_sendREST("check_email_exist_post",{method:"POST",data:{email:n},callback:function(e){getResultCheckEmailExist(t,e,n)}}):"admin_ajax"===ctPublicFunctions.data__ajax_type&&apbct_public_sendAJAX({action:"apbct_email_check_exist_post",email:n},{callback:function(e){getResultCheckEmailExist(t,e,n)}}))):((e=document.getElementById("apbct-check_email_exist-block"))&&e.remove(),(e=document.getElementById("apbct-check_email_exist-popup_description"))&&e.remove())}function getResultCheckEmailExist(e,t,n){t&&t.result&&(t=t.result,ctCheckedEmailsExist[n]={result:t,timestamp:Date.now()/1e3|0},"EXISTS"==t.result?viewCheckEmailExist(e,"good_email",t.text_result):viewCheckEmailExist(e,"bad_email",t.text_result),ctSetCookie("ct_checked_emails_exist",JSON.stringify(ctCheckedEmailsExist)))}function viewCheckEmailExist(e,t,n){var o,a,e=e.target.parentElement,i=(i=e.querySelector('[name*="email"]'))||e.querySelector('[type*="email"]');if(i)switch(document.getElementById("apbct-check_email_exist-block")?o=document.getElementById("apbct-check_email_exist-block"):((o=document.createElement("div")).setAttribute("class","apbct-check_email_exist-block"),o.setAttribute("id","apbct-check_email_exist-block"),window.addEventListener("scroll",function(){o.style.top=i.getBoundingClientRect().top+"px"}),e.after(o)),document.getElementById("apbct-check_email_exist-popup_description")?a=document.getElementById("apbct-check_email_exist-popup_description"):((a=document.createElement("div")).setAttribute("class","apbct-check_email_exist-popup_description"),a.setAttribute("id","apbct-check_email_exist-popup_description"),window.addEventListener("scroll",function(){a.style.top=o.getBoundingClientRect().top+"px"}),o.after(a)),ctEmailExistSetElementsPositions(i),window.addEventListener("resize",function(e){ctEmailExistSetElementsPositions(i)}),t){case"load":o.classList.remove("apbct-check_email_exist-good_email","apbct-check_email_exist-bad_email"),o.classList.add("apbct-check_email_exist-load");break;case"good_email":o.classList.remove("apbct-check_email_exist-load","apbct-check_email_exist-bad_email"),o.classList.add("apbct-check_email_exist-good_email"),o.onmouseover=function(){a.textContent=n,a.style.display="block",a.style.top=i.getBoundingClientRect().top-a.getBoundingClientRect().height+"px",a.style.color="#1C7129"},o.onmouseout=function(){a.style.display="none"};break;case"bad_email":o.classList.remove("apbct-check_email_exist-load","apbct-check_email_exist-good_email"),o.classList.add("apbct-check_email_exist-bad_email"),o.onmouseover=function(){a.textContent=n,a.style.display="block",a.style.top=i.getBoundingClientRect().top-a.getBoundingClientRect().height+"px",a.style.color="#E01111"},o.onmouseout=function(){a.style.display="none"}}}function ctEmailExistSetElementsPositions(e){var t,n,o;e&&(t=e.getBoundingClientRect(),n=e.offsetHeight,e=e.offsetWidth,(o=document.getElementById("apbct-check_email_exist-block"))&&(o.style.cssText="\n            top: ".concat(t.top,"px;\n            left: ").concat(t.right-35-10,"px;\n            height: ").concat(n,"px;\n            width: ").concat(35,"px;\n        ")),o=document.getElementById("apbct-check_email_exist-popup_description"))&&(o.style.cssText="\n            width: ".concat(e,"px;\n            left: ").concat(t.left,"px;\n        "))}function ctProcessError(e,t){var n={},e=(e&&e.message?n.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}:(n.err={msg:e},t&&(n.err.file=t)),n.url=window.location.href,n.userAgent=window.navigator.userAgent,"ct_js_errors");null===(o=localStorage.getItem(e))&&(o="[]");for(var o=JSON.parse(o),a=0;a<o.length;a++)if(o[a].err.msg===n.err.msg)return;o.push(n),localStorage.setItem(e,JSON.stringify(o))}function closeAllPopupTRP(){var e=document.querySelectorAll(".apbct-real-user-popup.visible");0<e.length&&e.forEach(function(e){e.classList.remove("visible")})}1===Math.floor(100*Math.random())&&(window.onerror=function(e,t){for(var n=["apbct","ctPublic"],o=n.length;o--;)-1!==e.indexOf(n[o])&&ctProcessError(e,t);return!1}),document.addEventListener("DOMContentLoaded",function(){var e,t=this,s=void 0,d=!1;"undefined"==typeof ctPublic&&"undefined"==typeof ctTrpAdminLocalize||void 0===(s="undefined"!=typeof ctPublic&&ctPublic.theRealPerson?ctPublic.theRealPerson:s)&&"undefined"!=typeof ctTrpAdminLocalize&&ctTrpAdminLocalize.theRealPerson&&(s=ctTrpAdminLocalize.theRealPerson,d=!0),s&&(e='.apbct-trp *[class*="comment-author"]',document.querySelector(".apbct-trp .comment-author .comment-author-link")&&(e='.apbct-trp *[class*="comment-author-link"]'),0!==(e=document.querySelectorAll(e+',.apbct-trp *[class*="review__author"],.apbct-trp td[class*="column-author"] > strong')).length)&&(e.forEach(function(e,t){var n,o,a,i,c,r,l;"undefined"==typeof pagenow&&e.parentElement.className.indexOf("group")<0&&"DIV"!=e.tagName||((n=document.createElement("div")).setAttribute("class","apbct-real-user-badge"),(o=document.createElement("img")).setAttribute("src",s.imgPersonUrl),o.setAttribute("class","apbct-real-user-popup-img"),(a=document.createElement("div")).setAttribute("class","apbct-real-user-popup"),(i=document.createElement("p")).setAttribute("class","apbct-real-user-popup-header"),i.append(s.phrases.trpHeading),(c=document.createElement("div")).setAttribute("class","apbct-real-user-popup-content_row"),(r=document.createElement("span")).append(s.phrases.trpContent1+" "),r.append(s.phrases.trpContent2),d&&((l=document.createElement("a")).setAttribute("href",s.trpContentLink),l.setAttribute("target","_blank"),l.text=s.phrases.trpContentLearnMore,r.append(" "),r.append(l)),c.append(r),a.append(i,c),n.append(o),e.append(n),e.append(a))}),document.querySelectorAll(".apbct-real-user-badge").forEach(function(o){var a=void 0,e=(t.body.addEventListener("click",function(e){-1==e.target.className.indexOf("apbct-real-user")&&-1==e.target.parentElement.className.indexOf("apbct-real-user")&&closeAllPopupTRP()}),o.addEventListener("click",function(){var e=this.nextElementSibling;e&&e.classList.contains("apbct-real-user-popup")&&e.classList.toggle("visible")}),o.addEventListener("mouseenter",function(){closeAllPopupTRP();var e=this.nextElementSibling;e&&e.classList.contains("apbct-real-user-popup")&&e.classList.add("visible")}),o.addEventListener("mouseleave",function(){var t=this;a=setTimeout(function(){var e=t.nextElementSibling;e&&e.classList.contains("apbct-real-user-popup")&&e.classList.remove("visible")},1e3)}),o.nextElementSibling);e.addEventListener("mouseenter",function(){clearTimeout(a),e.classList.add("visible")}),e.addEventListener("mouseleave",function(){a=setTimeout(function(){e.classList.contains("apbct-real-user-popup")&&e.classList.remove("visible")},1e3)}),o.addEventListener("touchend",function(){var n=this;a=setTimeout(function(){var e=n.nextElementSibling,t=window.getSelection();e&&t&&e.classList.contains("apbct-real-user-popup")&&0===t.toString().length?e.classList.remove("visible"):(clearTimeout(a),document.addEventListener("selectionchange",function e(){var t=window.getSelection();t&&0===t.toString().length&&(a=setTimeout(function(){var e=o.nextElementSibling;e&&e.classList.contains("apbct-real-user-popup")&&e.classList.remove("visible")},3e3),document.removeEventListener("selectionchange",e))}))},3e3)})}))});
  • cleantalk-spam-protect/trunk/js/apbct-public-bundle_ext-protection.min.js

    r3363712 r3371703  
    1 function ownKeys(t,e){var n,o=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),o.push.apply(o,n)),o}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(n),!0).forEach(function(e){_defineProperty(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function _callSuper(e,t,n){return t=_getPrototypeOf(t),_possibleConstructorReturn(e,_isNativeReflectConstruct()?Reflect.construct(t,n||[],_getPrototypeOf(e).constructor):t.apply(e,n))}function _possibleConstructorReturn(e,t){if(t&&("object"==_typeof(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(e)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_isNativeReflectConstruct=function(){return!!e})()}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _createForOfIteratorHelper(e,t){var n,o,a,i,c="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(c)return a=!(o=!0),{s:function(){c=c.call(e)},n:function(){var e=c.next();return o=e.done,e},e:function(e){a=!0,n=e},f:function(){try{o||null==c.return||c.return()}finally{if(a)throw n}}};if(Array.isArray(e)||(c=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length)return c&&(e=c),i=0,{s:t=function(){},n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){var n;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(n="Object"===(n={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty(e,t,n){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}function apbctSetEmailDecoderPopupAnimation(){var e=["apbct_dog_one","apbct_dog_two","apbct_dog_three"],t=document.createElement("div");t.classList="apbct-ee-animation-wrapper";for(var n=0;n<e.length;n++){var o=document.createElement("span");o.classList="apbct_dog "+e[n],o.innerText="@",t.append(o)}return t}function ctFillDecodedEmailHandler(){var e,t,n,o=0<arguments.length&&void 0!==arguments[0]&&arguments[0],a=!1,i="",c="",r=("undefined"!=typeof ctPublic?(this.removeEventListener("click",ctFillDecodedEmailHandler),a=this,ctPublic.encodedEmailNodesIsMixed=!1,i=ctPublic.wl_brandname,c=ctPublic.encodedEmailNodes):"undefined"!=typeof ctAdminCommon&&(i=ctAdminCommon.plugin_name,c=ctAdminCommon.encodedEmailNode),document.body.classList.add("apbct-popup-fade"),document.getElementById("apbct_popup"));r?(r.setAttribute("style","display: inherit"),"undefined"!=typeof ctPublicFunctions&&ctPublicFunctions.text__ee_wait_for_decoding?document.getElementById("apbct_popup_text").innerHTML=ctPublicFunctions.text__ee_wait_for_decoding:document.getElementById("apbct_popup_text").innerHTML=ctAdminCommon.text__ee_wait_for_decoding):((r=document.createElement("div")).setAttribute("class","apbct-popup apbct-email-encoder-popup"),r.setAttribute("id","apbct_popup"),(e=document.createElement("span")).classList="apbct-email-encoder-elements_center",(t=document.createElement("p")).innerText=i,t.setAttribute("class","apbct-email-encoder--popup-header"),e.append(t),(i=document.createElement("div")).setAttribute("id","apbct_popup_text"),i.setAttribute("class","apbct-email-encoder-elements_center"),i.style.color="black",(t=document.createElement("p")).id="apbct_email_ecoder__popup_text_node_first","undefined"!=typeof ctPublicFunctions&&ctPublicFunctions.text__ee_wait_for_decoding?t.innerText=ctPublicFunctions.text__ee_wait_for_decoding:t.innerText=ctAdminCommon.text__ee_wait_for_decoding,t.setAttribute("class","apbct-email-encoder-elements_center"),(n=document.createElement("p")).id="apbct_email_ecoder__popup_text_node_second","undefined"!=typeof ctPublicFunctions&&ctPublicFunctions.text__ee_decoding_process?n.innerText=ctPublicFunctions.text__ee_decoding_process:n.innerText=ctAdminCommon.text__ee_decoding_process,i.append(t),i.append(n),r.append(e),r.append(i),r.append(apbctSetEmailDecoderPopupAnimation()),document.body.append(r)),apbctAjaxEmailDecodeBulk(o,c,a)}function apbctAjaxEmailDecodeBulk(e,t,n){if(e&&n){for(var o={post_url:document.location.href,referrer:document.referrer,encodedEmails:""},a=(1==ctPublic.settings__data__bot_detector_enabled?o.event_token=apbctLocalStorage.get("bot_detector_event_token"):o.event_javascript_data=getJavascriptClientData(),{}),i=0;i<t.length;i++){void 0!==t[i].href&&0===t[i].href.indexOf("mailto:")&&(e.preventDefault(),ctPublic.encodedEmailNodesIsMixed=!0);var c=document.createElement("div");c.setAttribute("class","apbct-tooltip"),apbct(t[i]).append(c),a[i]=t[i].dataset.originalString}o.encodedEmails=JSON.stringify(a),"rest"===ctPublicFunctions.data__ajax_type?apbct_public_sendREST("apbct_decode_email",{data:o,method:"POST",callback:function(e){ctSetCookie("apbct_email_encoder_passed",ctPublic.emailEncoderPassKey,""),apbctEmailEncoderCallbackBulk(e,t,n)},onErrorCallback:function(e){resetEncodedNodes(),ctShowDecodeComment(e)}}):(o.action="apbct_decode_email",apbct_public_sendAJAX(o,{notJson:!1,callback:function(e){console.log("result"),console.log(e),ctSetCookie("apbct_email_encoder_passed",ctPublic.emailEncoderPassKey,""),apbctEmailEncoderCallbackBulk(e,t,n)},onErrorCallback:function(e){resetEncodedNodes(),ctShowDecodeComment(e)}}))}else{var o=t.dataset.originalString,o={encodedEmails:JSON.stringify({0:o})},r=document.createElement("div");r.setAttribute("class","apbct-tooltip"),t.appendChild(r),apbct_admin_sendAJAX({action:"apbct_decode_email",encodedEmails:o.encodedEmails},{callback:function(e){apbctEmailEncoderCallbackBulk(e,t,!1)},notJson:!0})}}function apbctEmailEncoderCallbackBulk(i,c){var r=2<arguments.length&&void 0!==arguments[2]&&arguments[2];i.success&&!0===i.data[0].is_allowed?setTimeout(function(){var t,e,n,o,a=document.getElementById("apbct_popup");null!==a&&(o="",o=r?(i.data.forEach(function(e){e.encoded_email===r.dataset.originalString&&(t=e)}),t.decoded_email.split(/[&?]/)[0]):i.data[0].decoded_email,n=a.querySelector("#apbct_email_ecoder__popup_text_node_first"),(e=document.createElement("b")).setAttribute("class","apbct-email-encoder-select-whole-email"),e.innerText=o,"undefined"!=typeof ctPublicFunctions&&ctPublicFunctions.text__ee_click_to_select?e.title=ctPublicFunctions.text__ee_click_to_select:e.title=ctAdminCommon.text__ee_click_to_select,n&&("undefined"!=typeof ctPublicFunctions&&ctPublicFunctions.text__ee_original_email?n.innerHTML=ctPublicFunctions.text__ee_original_email+"&nbsp;"+e.outerHTML:n.innerHTML=ctAdminCommon.text__ee_original_email+"&nbsp;"+e.outerHTML,n.setAttribute("style","flex-direction: row;")),(o=a.querySelector(".apbct-ee-animation-wrapper"))&&o.remove(),(e=a.querySelector("#apbct_email_ecoder__popup_text_node_second"))&&e.remove(),(n=document.createElement("span")).classList="apbct-email-encoder-elements_center top-margin-long",document.querySelector(".apbct-email-encoder-got-it-button")||(o=document.createElement("button"),"undefined"!=typeof ctPublicFunctions&&ctPublicFunctions.text__ee_got_it?o.innerText=ctPublicFunctions.text__ee_got_it:o.innerText=ctAdminCommon.text__ee_got_it,o.classList="apbct-email-encoder-got-it-button",o.addEventListener("click",function(){document.body.classList.remove("apbct-popup-fade"),a.setAttribute("style","display:none"),fillDecodedNodes(c,i),"undefined"!=typeof ctPublic&&ctPublic.encodedEmailNodesIsMixed&&r&&r.click()}),n.append(o),a.append(n)))},3e3):r?i.success?(resetEncodedNodes(),"undefined"!=typeof ctPublicFunctions&&ctPublicFunctions.text__ee_blocked?ctShowDecodeComment(ctPublicFunctions.text__ee_blocked+": "+i.data[0].comment):ctShowDecodeComment(ctAdminCommon.text__ee_blocked+": "+i.data[0].comment)):(resetEncodedNodes(),"undefined"!=typeof ctPublicFunctions&&ctPublicFunctions.text__ee_cannot_connect?ctShowDecodeComment(ctPublicFunctions.text__ee_cannot_connect+": "+i.apbct.comment):ctShowDecodeComment(ctAdminCommon.text__ee_cannot_connect+": "+i.data[0].comment)):console.log("result",i)}function resetEncodedNodes(){void 0!==ctPublic.encodedEmailNodes&&ctPublic.encodedEmailNodes.forEach(function(e){e.addEventListener("click",ctFillDecodedEmailHandler)})}function ctShowDecodeComment(e){e=e||("undefined"!=typeof ctPublicFunctions&&ctPublicFunctions.text__ee_cannot_decode?ctPublicFunctions:ctAdminCommon).text__ee_cannot_decode;var t=document.getElementById("apbct_popup"),n=document.getElementById("apbct_popup_text");null!==t&&(document.body.classList.remove("apbct-popup-fade"),"undefined"!=typeof ctPublicFunctions&&ctPublicFunctions.text__ee_email_decoder?n.innerText=ctPublicFunctions.text__ee_email_decoder+": "+e:n.innerText=ctAdminCommon.text__ee_email_decoder+": "+e,setTimeout(function(){t.setAttribute("style","display:none")},3e3))}function fillDecodedNodes(i,c){if(0<i.length){for(var e,t=0;t<i.length;t++)if(0!==(e=(t=>{var n,e;if(c.data.forEach(function(e){e.encoded_email===i[t].dataset.originalString&&(n=e)}),!1===n.is_allowed)return{v:void 0};if(void 0===i[t].href||0!==i[t].href.indexOf("mailto:")&&0!==i[t].href.indexOf("tel:"))i[t].classList.add("no-blur"),setTimeout(function(){ctProcessDecodedDataResult(n,i[t])},2e3);else{if(0===i[t].href.indexOf("mailto:"))e="mailto:";else{if(0!==i[t].href.indexOf("tel:"))return 0;e="tel:"}var o=i[t].href.replace(e,""),a=i[t].innerHTML;i[t].innerHTML=a.replace(o,n.decoded_email),i[t].href=e+n.decoded_email,i[t].querySelectorAll("span.apbct-email-encoder").forEach(function(t){var n="";c.data.forEach(function(e){e.encoded_email===t.dataset.originalString&&(n=e.decoded_email)}),t.innerHTML=n})}i[t].removeEventListener("click",ctFillDecodedE