Spam protection, AntiSpam, FireWall by CleanTalk - Version 6.1

Version Description

Dec 15 2022 =

Some integrations fixed , Search forms protection improved and some minor issues fixed

  • New. Integrations. Add NewUserApprove plugin.
  • Update. EmailEncoder. Add hook for encode email in default wp widget.
  • Fix. Settings. Affiliate shortcode disabled state.
  • Fix. Elementor forms. Elementor login form skipping.
  • Mod: Optima Express Integration for Login Form
  • Fix. Integrations. Optima Express - Update form fixed.
  • Fix. Modified Header. Undefined post_type.
  • Fix. Integrations. Probably spam notification updated.
  • Fix. Integration. Ninja refactoring.
  • Fix. Cookies. No-cookies parameters gathering on search forms improved.
  • Fix. Integrations. Do not draw hidden fields on excluded pages.
  • Fix. Integration. WP Forms integration fixed.
  • Fix. Integration. Ninja Forms integration fixed.
Download this release

Release Info

Developer glomberg
Plugin Icon 128x128 Spam protection, AntiSpam, FireWall by CleanTalk
Version 6.1
Comparing to
See all releases

Code changes from version 6.0.1 to 6.1

cleantalk.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin Name: Anti-Spam by CleanTalk
5
  Plugin URI: https://cleantalk.org
6
  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.0.1
8
  Author: СleanTalk <welcome@cleantalk.org>
9
  Author URI: https://cleantalk.org
10
  Text Domain: cleantalk-spam-protect
@@ -395,6 +395,11 @@ $apbct_active_integrations = array(
395
  'ajax' => true,
396
  'ajax_and_post' => true
397
  ),
 
 
 
 
 
398
  );
399
  new \Cleantalk\Antispam\Integrations($apbct_active_integrations, (array)$apbct->settings);
400
 
4
  Plugin Name: Anti-Spam by CleanTalk
5
  Plugin URI: https://cleantalk.org
6
  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.1
8
  Author: СleanTalk <welcome@cleantalk.org>
9
  Author URI: https://cleantalk.org
10
  Text Domain: cleantalk-spam-protect
395
  'ajax' => true,
396
  'ajax_and_post' => true
397
  ),
398
+ 'NewUserApprove' => array(
399
+ 'hook' => 'nua_pass_create_new_user',
400
+ 'setting' => 'forms__registrations_test',
401
+ 'ajax' => false
402
+ ),
403
  );
404
  new \Cleantalk\Antispam\Integrations($apbct_active_integrations, (array)$apbct->settings);
405
 
inc/cleantalk-common.php CHANGED
@@ -99,6 +99,10 @@ function apbct_base_call($params = array(), $reg_flag = false)
99
  {
100
  global $cleantalk_executed;
101
 
 
 
 
 
102
  /* Exclusions */
103
  if ( $cleantalk_executed ) {
104
  do_action('apbct_skipped_request', __FILE__ . ' -> ' . __FUNCTION__ . '():' . __LINE__, $_POST);
99
  {
100
  global $cleantalk_executed;
101
 
102
+ if ( isset($params['post_info']['comment_type']) && $params['post_info']['comment_type'] === 'site_search_wordpress' ) {
103
+ Cookie::$force_alt_cookies_global = true;
104
+ }
105
+
106
  /* Exclusions */
107
  if ( $cleantalk_executed ) {
108
  do_action('apbct_skipped_request', __FILE__ . ' -> ' . __FUNCTION__ . '():' . __LINE__, $_POST);
inc/cleantalk-pluggable.php CHANGED
@@ -869,13 +869,6 @@ function apbct_is_skip_request($ajax = false)
869
  if ( apbct_is_rest() && Post::get('automation_id') !== '' && Post::get('unique_key') !== '' ) {
870
  return 'autonami-rest';
871
  }
872
- //Skip wforms because of direct integration
873
- if (
874
- apbct_is_plugin_active('wpforms/wpforms.php') &&
875
- (Post::get('wpforms') || Post::get('actions') === 'wpforms_submit')
876
- ) {
877
- return 'wp_forms';
878
- }
879
  // Formidable skip - this is the direct integration
880
  if ( apbct_is_plugin_active('formidable/formidable.php') &&
881
  (Post::get('frm_action') === 'update' ||
@@ -949,6 +942,32 @@ function apbct_is_skip_request($ajax = false)
949
  ) {
950
  return 'JQueryMigrate plugin service actions';
951
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
952
  }
953
 
954
  // Event Manager - there is the direct integration
869
  if ( apbct_is_rest() && Post::get('automation_id') !== '' && Post::get('unique_key') !== '' ) {
870
  return 'autonami-rest';
871
  }
 
 
 
 
 
 
 
872
  // Formidable skip - this is the direct integration
873
  if ( apbct_is_plugin_active('formidable/formidable.php') &&
874
  (Post::get('frm_action') === 'update' ||
942
  ) {
943
  return 'JQueryMigrate plugin service actions';
944
  }
945
+
946
+ /** Skip Optima Express login */
947
+ if (
948
+ apbct_is_plugin_active('optima-express/iHomefinder.php') &&
949
+ Post::get('actionType') === 'login' &&
950
+ !empty(Post::get('username'))
951
+ ) {
952
+ return 'Skip Optima Express login';
953
+ }
954
+
955
+ /** Skip Optima Express update */
956
+ if (
957
+ apbct_is_plugin_active('optima-express/iHomefinder.php') &&
958
+ Post::get('actionType') === 'update' &&
959
+ !empty(Post::get('firstName'))
960
+ ) {
961
+ return 'Skip Optima Express update';
962
+ }
963
+ }
964
+
965
+ //Skip wforms because of direct integration
966
+ if (
967
+ (apbct_is_plugin_active('wpforms/wpforms.php') || apbct_is_plugin_active('wpforms-lite/wpforms.php')) &&
968
+ (Post::get('wpforms') || Post::get('actions') === 'wpforms_submit')
969
+ ) {
970
+ return 'wp_forms';
971
  }
972
 
973
  // Event Manager - there is the direct integration
inc/cleantalk-public-integrations.php CHANGED
@@ -2071,12 +2071,12 @@ function apbct_form__contactForm7__changeMailNotification($component)
2071
  global $apbct;
2072
 
2073
  $component['body'] =
2074
- __('CleanTalk Anti-Spam: This message is spam.', 'cleantalk-spam-protect')
2075
  . PHP_EOL . __('CleanTalk\'s Anti-Spam database:', 'cleantalk-spam-protect')
2076
  . PHP_EOL . 'IP: ' . $apbct->sender_ip
2077
  . PHP_EOL . 'Email: ' . $apbct->sender_email
2078
  . PHP_EOL . sprintf(
2079
- __('Activate protection in your Anti-Spam Dashboard: %s.', 'clentalk'),
2080
  'https://cleantalk.org/my/?cp_mode=antispam&utm_source=newsletter&utm_medium=email&utm_campaign=cf7_activate_antispam&user_token=' . $apbct->user_token
2081
  )
2082
  . PHP_EOL . '---' . PHP_EOL . PHP_EOL
@@ -2123,8 +2123,7 @@ function apbct_form__ninjaForms__testSpam()
2123
  /**
2124
  * Filter for POST
2125
  */
2126
- $formData = isset($_POST['formData']) ? json_decode(stripslashes($_POST['formData']), true) : $_POST;
2127
- $input_array = apply_filters('apbct__filter_post', $formData);
2128
 
2129
  // Choosing between POST and GET
2130
  $params = ct_get_fields_any(
@@ -2312,12 +2311,12 @@ function apbct_form__ninjaForms__changeMailNotification($message, $_data, $actio
2312
  $message .= wpautop(
2313
  PHP_EOL . '---'
2314
  . PHP_EOL
2315
- . __('CleanTalk Anti-Spam: This message is spam.', 'cleantalk-spam-protect')
2316
  . PHP_EOL . __('CleanTalk\'s Anti-Spam database:', 'cleantalk-spam-protect')
2317
  . PHP_EOL . 'IP: ' . $apbct->sender_ip
2318
  . PHP_EOL . 'Email: ' . $apbct->sender_email
2319
  . PHP_EOL .
2320
- __('Activate protection in your Anti-Spam Dashboard: ', 'clentalk') .
2321
  'https://cleantalk.org/my/?cp_mode=antispam&utm_source=newsletter&utm_medium=email&utm_campaign=ninjaform_activate_antispam' . $apbct->user_token
2322
  );
2323
  }
@@ -2546,13 +2545,13 @@ function apbct_form__WPForms__changeMailNotification($message, $_wpforms_email)
2546
  PHP_EOL
2547
  . '---'
2548
  . PHP_EOL
2549
- . __('CleanTalk Anti-Spam: This message is spam.', 'cleantalk-spam-protect')
2550
  . PHP_EOL . __('CleanTalk\'s Anti-Spam database:', 'cleantalk-spam-protect')
2551
  . PHP_EOL . 'IP: ' . '<a href="https://cleantalk.org/blacklists/' . $apbct->sender_ip . '?utm_source=newsletter&utm_medium=email&utm_campaign=wpforms_spam_passed" target="_blank">' . $apbct->sender_ip . '</a>'
2552
  . PHP_EOL . 'Email: ' . '<a href="https://cleantalk.org/blacklists/' . $apbct->sender_email . '?utm_source=newsletter&utm_medium=email&utm_campaign=wpforms_spam_passed" target="_blank">' . $apbct->sender_email . '</a>'
2553
  . PHP_EOL
2554
  . sprintf(
2555
- __('Activate protection in your %sAnti-Spam Dashboard%s.', 'clentalk'),
2556
  '<a href="https://cleantalk.org/my/?cp_mode=antispam&utm_source=newsletter&utm_medium=email&utm_campaign=wpforms_activate_antispam" target="_blank">',
2557
  '</a>'
2558
  )
@@ -3091,6 +3090,8 @@ function apbct_form__elementor_pro__testSpam()
3091
  if (
3092
  $apbct->settings['forms__contact_forms_test'] == 0 ||
3093
  ($apbct->settings['data__protect_logged_in'] != 1 && is_user_logged_in()) || // Skip processing for logged in users.
 
 
3094
  apbct_exclusions_check__url()
3095
  ) {
3096
  do_action('apbct_skipped_request', __FILE__ . ' -> ' . __FUNCTION__ . '():' . __LINE__, $_POST);
@@ -3595,9 +3596,11 @@ function apbct__wc_add_orders_spam_status_hide_from_list($query)
3595
 
3596
  $query_vars = &$query->query_vars;
3597
 
3598
- if ( $pagenow == 'edit.php' && $query_vars['post_type'] == 'shop_order' &&
3599
- is_array($query_vars['post_status']) &&
3600
- ( $key = array_search('wc-spamorder', $query_vars['post_status']) ) !== false
 
 
3601
  ) {
3602
  unset($query_vars['post_status'][$key]);
3603
  }
2071
  global $apbct;
2072
 
2073
  $component['body'] =
2074
+ __('CleanTalk Anti-Spam: This message could be spam.', 'cleantalk-spam-protect')
2075
  . PHP_EOL . __('CleanTalk\'s Anti-Spam database:', 'cleantalk-spam-protect')
2076
  . PHP_EOL . 'IP: ' . $apbct->sender_ip
2077
  . PHP_EOL . 'Email: ' . $apbct->sender_email
2078
  . PHP_EOL . sprintf(
2079
+ __('If you want to be sure activate protection in your Anti-Spam Dashboard: %s.', 'clentalk'),
2080
  'https://cleantalk.org/my/?cp_mode=antispam&utm_source=newsletter&utm_medium=email&utm_campaign=cf7_activate_antispam&user_token=' . $apbct->user_token
2081
  )
2082
  . PHP_EOL . '---' . PHP_EOL . PHP_EOL
2123
  /**
2124
  * Filter for POST
2125
  */
2126
+ $input_array = apply_filters('apbct__filter_post', $_POST);
 
2127
 
2128
  // Choosing between POST and GET
2129
  $params = ct_get_fields_any(
2311
  $message .= wpautop(
2312
  PHP_EOL . '---'
2313
  . PHP_EOL
2314
+ . __('CleanTalk Anti-Spam: This message could be spam.', 'cleantalk-spam-protect')
2315
  . PHP_EOL . __('CleanTalk\'s Anti-Spam database:', 'cleantalk-spam-protect')
2316
  . PHP_EOL . 'IP: ' . $apbct->sender_ip
2317
  . PHP_EOL . 'Email: ' . $apbct->sender_email
2318
  . PHP_EOL .
2319
+ __('If you want to be sure activate protection in your Anti-Spam Dashboard: ', 'clentalk') .
2320
  'https://cleantalk.org/my/?cp_mode=antispam&utm_source=newsletter&utm_medium=email&utm_campaign=ninjaform_activate_antispam' . $apbct->user_token
2321
  );
2322
  }
2545
  PHP_EOL
2546
  . '---'
2547
  . PHP_EOL
2548
+ . __('CleanTalk Anti-Spam: This message could be spam.', 'cleantalk-spam-protect')
2549
  . PHP_EOL . __('CleanTalk\'s Anti-Spam database:', 'cleantalk-spam-protect')
2550
  . PHP_EOL . 'IP: ' . '<a href="https://cleantalk.org/blacklists/' . $apbct->sender_ip . '?utm_source=newsletter&utm_medium=email&utm_campaign=wpforms_spam_passed" target="_blank">' . $apbct->sender_ip . '</a>'
2551
  . PHP_EOL . 'Email: ' . '<a href="https://cleantalk.org/blacklists/' . $apbct->sender_email . '?utm_source=newsletter&utm_medium=email&utm_campaign=wpforms_spam_passed" target="_blank">' . $apbct->sender_email . '</a>'
2552
  . PHP_EOL
2553
  . sprintf(
2554
+ __('If you want to be sure activate protection in your %sAnti-Spam Dashboard%s.', 'clentalk'),
2555
  '<a href="https://cleantalk.org/my/?cp_mode=antispam&utm_source=newsletter&utm_medium=email&utm_campaign=wpforms_activate_antispam" target="_blank">',
2556
  '</a>'
2557
  )
3090
  if (
3091
  $apbct->settings['forms__contact_forms_test'] == 0 ||
3092
  ($apbct->settings['data__protect_logged_in'] != 1 && is_user_logged_in()) || // Skip processing for logged in users.
3093
+ Post::get('form_fields_password') ||
3094
+ Post::get('form-field-password') || // Skip processing for login form.
3095
  apbct_exclusions_check__url()
3096
  ) {
3097
  do_action('apbct_skipped_request', __FILE__ . ' -> ' . __FUNCTION__ . '():' . __LINE__, $_POST);
3596
 
3597
  $query_vars = &$query->query_vars;
3598
 
3599
+ if ( $pagenow == 'edit.php'
3600
+ && isset($query_vars['post_type'])
3601
+ && $query_vars['post_type'] == 'shop_order'
3602
+ && is_array($query_vars['post_status'])
3603
+ && ( $key = array_search('wc-spamorder', $query_vars['post_status']) ) !== false
3604
  ) {
3605
  unset($query_vars['post_status'][$key]);
3606
  }
inc/cleantalk-public.php CHANGED
@@ -123,6 +123,18 @@ function apbct_init()
123
  ct_contact_form_validate();
124
  }
125
 
 
 
 
 
 
 
 
 
 
 
 
 
126
  //hook for Anonymous Post
127
  if ( $apbct->settings['data__general_postdata_test'] == 1 && empty(Post::get('ct_checkjs_cf7')) ) {
128
  add_action('init', 'ct_contact_form_validate_postdata', 1000);
@@ -685,7 +697,7 @@ function ct_add_honeypot_field($form_type, $form_method = 'post')
685
  global $apbct;
686
 
687
  // Honeypot option is OFF
688
- if ( ! $apbct->settings['data__honeypot_field'] ) {
689
  return '';
690
  }
691
  //Generate random suffix to prevent ids duplicate
123
  ct_contact_form_validate();
124
  }
125
 
126
+ /** Optima Express integration */
127
+ if (
128
+ ! empty($_POST) &&
129
+ $apbct->settings['forms__contact_forms_test'] == 1 &&
130
+ empty(Post::get('ct_checkjs_cf7')) &&
131
+ apbct_is_plugin_active('optima-express/iHomefinder.php') &&
132
+ Post::get('actionType') === 'create' &&
133
+ !empty(Post::get('newEmail'))
134
+ ) {
135
+ ct_contact_form_validate();
136
+ }
137
+
138
  //hook for Anonymous Post
139
  if ( $apbct->settings['data__general_postdata_test'] == 1 && empty(Post::get('ct_checkjs_cf7')) ) {
140
  add_action('init', 'ct_contact_form_validate_postdata', 1000);
697
  global $apbct;
698
 
699
  // Honeypot option is OFF
700
+ if ( ! $apbct->settings['data__honeypot_field'] || apbct_exclusions_check__url() ) {
701
  return '';
702
  }
703
  //Generate random suffix to prevent ids duplicate
inc/cleantalk-settings.php CHANGED
@@ -823,7 +823,6 @@ function apbct_settings__set_fields()
823
  'cleantalk-spam-protect'
824
  ),
825
  'childrens' => array('trusted_and_affiliate__shortcode_tag'),
826
- 'reverse_trigger' => true,
827
  'type' => 'checkbox'
828
  ),
829
  'trusted_and_affiliate__shortcode_tag' => array(
@@ -831,7 +830,7 @@ function apbct_settings__set_fields()
831
  'title' => __('<- Copy this text and place shortcode wherever you need.', 'cleantalk-spam-protect'),
832
  'parent' => 'trusted_and_affiliate__shortcode',
833
  'class' => 'apbct_settings-field_wrapper--sub',
834
- 'disabled' => 'test'
835
  ),
836
  'trusted_and_affiliate__footer' => array(
837
  'title' => __('Add to the footer', 'cleantalk-spam-protect'),
@@ -2234,7 +2233,8 @@ function apbct_settings__field__draw($params = array())
2234
  name="cleantalk_settings[' . $params['name'] . ']"'
2235
  . " class='apbct_setting_{$params['type']} apbct_setting---{$params['name']}'"
2236
  . ' value="[cleantalk_affiliate_link]" '
2237
- . "readonly"
 
2238
  . ($params['required'] ? ' required="required"' : '')
2239
  . ($params['childrens'] ? ' onchange="apbctSettingsDependencies(\'' . $childrens . '\')"' : '')
2240
  . ' />'
823
  'cleantalk-spam-protect'
824
  ),
825
  'childrens' => array('trusted_and_affiliate__shortcode_tag'),
 
826
  'type' => 'checkbox'
827
  ),
828
  'trusted_and_affiliate__shortcode_tag' => array(
830
  'title' => __('<- Copy this text and place shortcode wherever you need.', 'cleantalk-spam-protect'),
831
  'parent' => 'trusted_and_affiliate__shortcode',
832
  'class' => 'apbct_settings-field_wrapper--sub',
833
+ 'disabled' => true
834
  ),
835
  'trusted_and_affiliate__footer' => array(
836
  'title' => __('Add to the footer', 'cleantalk-spam-protect'),
2233
  name="cleantalk_settings[' . $params['name'] . ']"'
2234
  . " class='apbct_setting_{$params['type']} apbct_setting---{$params['name']}'"
2235
  . ' value="[cleantalk_affiliate_link]" '
2236
+ . "readonly" //hardcode for this shortcode
2237
+ . $disabled
2238
  . ($params['required'] ? ' required="required"' : '')
2239
  . ($params['childrens'] ? ' onchange="apbctSettingsDependencies(\'' . $childrens . '\')"' : '')
2240
  . ' />'
js/apbct-public-bundle.min.js CHANGED
@@ -1 +1 @@
1
- "use strict";function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArrayLimit(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var n,i,a=[],r=!0,c=!1;try{for(o=o.call(e);!(r=(n=o.next()).done)&&(a.push(n.value),!t||a.length!==t);r=!0);}catch(e){c=!0,i=e}finally{try{r||null==o.return||o.return()}finally{if(c)throw i}}return a}}function _arrayWithHoles(e){if(Array.isArray(e))return 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 _createSuper(o){var n=_isNativeReflectConstruct();return function(){var e,t=_getPrototypeOf(o);return _possibleConstructorReturn(this,n?(e=_getPrototypeOf(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}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(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _createForOfIteratorHelper(e,t){var o,n,i,a,r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return n=!(o=!0),{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){n=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(n)throw i}}};if(Array.isArray(e)||(r=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length)return r&&(e=r),a=0,{s:t=function(){},n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},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 o;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(o="Object"===(o=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:o)||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_arrayLikeToArray(e,t):void 0}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}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 o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,o){return t&&_defineProperties(e.prototype,t),o&&_defineProperties(e,o),Object.defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}var ApbctCore=function(){function t(e){_classCallCheck(this,t),_defineProperty(this,"ajax_parameters",{}),_defineProperty(this,"rest_parameters",{}),_defineProperty(this,"selector",null),_defineProperty(this,"elements",[]),_defineProperty(this,"eventCallback",void 0),_defineProperty(this,"eventSelector",void 0),_defineProperty(this,"event",void 0),this.select(e)}return _createClass(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|=!1,"object"===_typeof(e)){for(var o in e)for(var n=o.replace(/([-_][a-z])/g,function(e){return e.toUpperCase().replace("-","").replace("_","")}),i=0;i<this.elements.length;i++)this.elements[i].style[n]=e[o];return this}var a;if("string"==typeof e)return void 0!==(a=getComputedStyle(this.elements[0])[e])&&!t&&(a=a.replace(/(\d)(em|pt|%|px){1,2}$/,"$1"),Number(a)==a)?Number(a):a}},{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.rest_parameters=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=[],o=0;o<this.elements.length;o++)void 0!==_typeof(this.elements[o][e])?t.push(this.elements[o][e]):t.push(this.elements[o].getAttribute(e));return 1===t.length?t[0]:t}},{key:"prop",value:function(e,t){if(void 0!==t){for(var o=0;o<this.elements.length;o++)this.elements[o][e]=t;return this}for(var n=[],i=0;i<this.elements.length;i++)n.push(this.elements[i][e]);return 1===n.length?n[0]:n}},{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,o=!1,n=_createForOfIteratorHelper(this.elements);try{for(n.s();!(t=n.n()).done;)var i=t.value,o=o||this.isElem(i,e)}catch(e){n.e(e)}finally{n.f()}return o}},{key:"isElem",value:function(e,t){var o=!1;return"function"==typeof t&&(o=o||t.call(this,e)),o="string"==typeof t?t.match(/^[a-z]/)&&function(e){e=document.createElement(e).constructor;return!Boolean(~[HTMLElement,HTMLUnknownElement].indexOf(e))}(t)?o||e.tagName.toLowerCase()===t.toLowerCase():t.match(/^[a-z]/)?o||Boolean(e[t]):o||(null!==this.selector?null!==document.querySelector(this.selector+t):this.isWithoutSelector(e,t)):o}},{key:"isWithoutSelector",value:function(e,t){var o,n=!1,i=_createForOfIteratorHelper(document.querySelectorAll(t));try{for(i.s();!(o=i.n()).done;)var a=o.value,n=n||e===a}catch(e){i.e(e)}finally{i.f()}return n}},{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,o=_createForOfIteratorHelper(this.elements);try{for(o.s();!(t=o.n()).done;)t.value.after(e)}catch(e){o.e(e)}finally{o.f()}}},{key:"append",value:function(e){var t,o=_createForOfIteratorHelper(this.elements);try{for(o.s();!(t=o.n()).done;)t.value.append(e)}catch(e){o.e(e)}finally{o.f()}}},{key:"fadeIn",value:function(n){var e,t=_createForOfIteratorHelper(this.elements);try{for(t.s();!(e=t.n()).done;)!function(){var t=e.value,o=(t.style.opacity=0,t.style.display="block",+new Date);(function e(){t.style.opacity=+t.style.opacity+(new Date-o)/n,o=+new Date,+t.style.opacity<1&&(window.requestAnimationFrame&&requestAnimationFrame(e)||setTimeout(e,16))})()}()}catch(e){t.e(e)}finally{t.f()}}},{key:"fadeOut",value:function(n){var e,t=_createForOfIteratorHelper(this.elements);try{for(t.s();!(e=t.n()).done;)!function(){var t=e.value,o=(t.style.opacity=1,+new Date);(function e(){t.style.opacity=+t.style.opacity-(new Date-o)/n,o=+new Date,0<+t.style.opacity?window.requestAnimationFrame&&requestAnimationFrame(e)||setTimeout(e,16):t.style.display="none"})()}()}catch(e){t.e(e)}finally{t.f()}}}]),t}();function apbct(e){return(new ApbctCore).select(e)}var ApbctXhr=function(){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",""),console.log("%cXHR%c started","color: red; font-weight: bold;","color: grey; font-weight: normal;"),e)void 0!==this[t]&&(this[t]=e[t]);if(this.prepare(),Object.keys(this.data).length&&(this.deleteDoubleJSONEncoding(this.data),this.convertData()),!this.url)return console.log("%cXHR%c not URL provided","color: red; font-weight: bold;","color: grey; font-weight: normal;"),!1;this.xhr.open(this.method,this.url,this.async,this.user,this.password),this.setHeaders(),this.xhr.responseType=this.responseType,this.xhr.timeout=this.timeout,this.xhr.onreadystatechange=function(){this.onReadyStateChange()}.bind(this),this.xhr.onload=function(){this.onLoad()}.bind(this),this.xhr.onprogress=function(e){this.onProgress(e)}.bind(this),this.xhr.onerror=function(){this.onError()}.bind(this),this.xhr.ontimeout=function(){this.onTimeout()}.bind(this),this.xhr.send(this.body)}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:"error",value:function(e,t,o){var n="";"timeout"===t?n+="Server response timeout":200===e?"parsererror"===t?n+="Unexpected response from server. See console for details.":(n+="Unexpected error. Status: "+t+".",void 0!==o&&(n+=" Additional error info: "+o)):n+=500===e?"Internal server error.":"Unexpected response code:"+e,this.errorOutput(n)}},{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)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 o;"object"===_typeof(e[t])&&(e[t]=this.deleteDoubleJSONEncoding(e[t])),"string"==typeof e[t]&&null!==e[t].match(/^[\[{].*?[\]}]$/)&&"object"===_typeof(o=JSON.parse(e[t]))&&(e[t]=o)}return e}}]),o}(),ApbctAjax=function(){_inherits(t,ApbctXhr);var e=_createSuper(t);function t(){return _classCallCheck(this,t),e.call(this,arguments.length<=0?void 0:arguments[0])}return _createClass(t)}(),ApbctRest=function(){_inherits(a,ApbctXhr);var i=_createSuper(a);function a(){for(var e,t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];return _classCallCheck(this,a),(o=o[0]).url=a.default_route+o.route,o.headers={"X-WP-Nonce":ctPublicFunctions._rest_nonce},_defineProperty(_assertThisInitialized(e=i.call(this,o)),"route",""),e}return _createClass(a)}();function ctSetCookie(e,t,o){var n,i,a=["ct_sfw_pass_key","ct_sfw_passed","wordpress_apbct_antibot","apbct_anticrawler_passed","apbct_antiflood_passed","apbct_email_encoder_passed"];("string"==typeof e&&"string"==typeof t||"number"==typeof t)&&(n="ct_pointer_data"===e,e=[[e,t,o]]),"none"===ctPublicFunctions.data__cookies_type?(i=[],e.forEach(function(e,t,o){-1!==a.indexOf(e[0])?i.push(e):apbctLocalStorage.set(e[0],encodeURIComponent(e[1]))}),0<i.length&&ctSetAlternativeCookie(i),ctNoCookieAttachHiddenFieldsToForms()):"native"===ctPublicFunctions.data__cookies_type?e.forEach(function(e,t,o){var n=void 0!==e[2]?"expires="+n+"; ":"",i="https:"===location.protocol?"; secure":"";document.cookie=ctPublicFunctions.cookiePrefix+e[0]+"="+encodeURIComponent(e[1])+"; "+n+"path=/; samesite=lax"+i}):"alternative"!==ctPublicFunctions.data__cookies_type||n||ctSetAlternativeCookie(e)}function ctSetAlternativeCookie(e){"function"==typeof getJavascriptClientData?e=getJavascriptClientData(e):console.log("APBCT ERROR: getJavascriptClientData() is not loaded");try{JSON.parse(e)}catch(e){return void console.log("APBCT ERROR: JSON parse error:"+e)}"rest"===ctPublicFunctions.data__ajax_type?apbct_public_sendREST("alt_sessions",{method:"POST",data:{cookies:e}}):"admin_ajax"===ctPublicFunctions.data__ajax_type&&apbct_public_sendAJAX({action:"apbct_alt_session__save__AJAX",cookies:e},{notJson:1})}function ctGetCookie(e){e=document.cookie.match(new RegExp("(?:^|; )"+e.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,"\\$1")+"=([^;]*)"));return e?decodeURIComponent(e[1]):void 0}function ctDeleteCookie(e){var t;"none"!==ctPublicFunctions.data__cookies_type&&("native"===ctPublicFunctions.data__cookies_type?(t="https:"===location.protocol?"; secure":"",document.cookie=e+'=""; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; samesite=lax'+t):ctPublicFunctions.data__cookies_type)}function apbct_public_sendAJAX(e,t,o){var n=[];n.callback=t.callback||null,n.onErrorCallback=t.onErrorCallback||null,n.callback_context=t.callback_context||null,n.callback_params=t.callback_params||null,n.async=t.async||!0,n.notJson=t.notJson||null,n.timeout=t.timeout||15e3,n.obj=o||null,n.button=t.button||null,n.progressbar=t.progressbar||null,n.silent=t.silent||null,n.no_nonce=t.no_nonce||null,n.data=e,n.url=ctPublicFunctions._ajax_url,"string"==typeof e?(n.no_nonce||(n.data=n.data+"&_ajax_nonce="+ctPublicFunctions._ajax_nonce),n.data=n.data+"&no_cache="+Math.random()):(n.no_nonce||(n.data._ajax_nonce=ctPublicFunctions._ajax_nonce),n.data.no_cache=Math.random()),(new ApbctCore).ajax(n)}function apbct_public_sendREST(e,t){var o=[];o.route=e,o.callback=t.callback||null,o.onErrorCallback=t.onErrorCallback||null,o.data=t.data||[],o.method=t.method||"POST",(new ApbctCore).rest(o)}_defineProperty(ApbctRest,"default_route",ctPublicFunctions._rest_url+"cleantalk-antispam/v1/");var apbctLocalStorage={get:function(t,e){void 0===e&&(e="value");t=localStorage.getItem(t);if(null!==t)try{var o=JSON.parse(t);return o.hasOwnProperty(e)?JSON.parse(o[e]):o}catch(e){return t}return!1},set:function(e,t){var o;!(2<arguments.length&&void 0!==arguments[2])||arguments[2]?(o={value:JSON.stringify(t),timestamp:Math.floor((new Date).getTime()/1e3)},localStorage.setItem(e,JSON.stringify(o))):localStorage.setItem(e,t)},isAlive:function(e,t){return void 0===t&&(t=86400),this.get(e,"timestamp")+t>Math.floor((new Date).getTime()/1e3)},isSet:function(e){return null!==localStorage.getItem(e)},delete:function(e){localStorage.removeItem(e)},getCleanTalkData:function(){for(var e={},t=0;t<localStorage.length;t++){var o=localStorage.key(t);-1===o.indexOf("ct_")&&-1===o.indexOf("apbct_")||(e[o.toString()]=apbctLocalStorage.get(o))}return e}},ct_date=new Date,ctTimeMs=(new Date).getTime(),ctMouseEventTimerFlag=!0,ctMouseData=[],ctMouseDataCounter=0,ctCheckedEmails={};function apbct_attach_event_handler(e,t,o){"function"==typeof window.addEventListener?e.addEventListener(t,o):e.attachEvent(t,o)}function apbct_remove_event_handler(e,t,o){"function"==typeof window.removeEventListener?e.removeEventListener(t,o):e.detachEvent(t,o)}var ctMouseReadInterval,ctMouseWriteDataInterval,ctFunctionFirstKey=function(e){ctSetCookie("ct_fkp_timestamp",Math.floor((new Date).getTime()/1e3)),ctKeyStopStopListening()},ctFunctionMouseMove=(ctPublic.data__key_is_ok&&(ctMouseReadInterval=setInterval(function(){ctMouseEventTimerFlag=!0},150),ctMouseWriteDataInterval=setInterval(function(){ctSetCookie("ct_pointer_data",JSON.stringify(ctMouseData))},1200)),function(e){ctSetMouseMoved(),!0===ctMouseEventTimerFlag&&(ctMouseData.push([Math.round(e.clientY),Math.round(e.clientX),Math.round((new Date).getTime()-ctTimeMs)]),ctMouseEventTimerFlag=!1,50<=++ctMouseDataCounter)&&ctMouseStopData()});function ctMouseStopData(){apbct_remove_event_handler(document,"mousemove",ctFunctionMouseMove),clearInterval(ctMouseReadInterval),clearInterval(ctMouseWriteDataInterval)}function ctKeyStopStopListening(){apbct_remove_event_handler(document,"mousedown",ctFunctionFirstKey),apbct_remove_event_handler(document,"keydown",ctFunctionFirstKey)}function checkEmail(e){var t=e.target.value;!t||t in ctCheckedEmails||("rest"===ctPublicFunctions.data__ajax_type?apbct_public_sendREST("check_email_before_post",{method:"POST",data:{email:t},callback:function(e){e.result&&(ctCheckedEmails[t]={result:e.result,timestamp:Date.now()/1e3|0},ctSetCookie("ct_checked_emails",JSON.stringify(ctCheckedEmails)))}}):"admin_ajax"===ctPublicFunctions.data__ajax_type&&apbct_public_sendAJAX({action:"apbct_email_check_before_post",email:t},{callback:function(e){e.result&&(ctCheckedEmails[t]={result:e.result,timestamp:Date.now()/1e3|0},ctSetCookie("ct_checked_emails",JSON.stringify(ctCheckedEmails)))}}))}function ctSetPixelImg(e){var t;ctSetCookie("apbct_pixel_url",e),+ctPublic.pixel__enabled&&!document.getElementById("apbct_pixel")&&((t=document.createElement("img")).setAttribute("alt","CleanTalk Pixel"),t.setAttribute("id","apbct_pixel"),t.setAttribute("style","display: none; left: 99999px;"),t.setAttribute("src",e),apbct("body").append(t))}function ctGetPixelUrl(){var e=apbctLocalStorage.get("apbct_pixel_url");if(!1!==e){if(!apbctLocalStorage.isAlive("apbct_pixel_url",10800))return void ctSetPixelImg(e);apbctLocalStorage.delete("apbct_pixel_url")}"rest"===ctPublicFunctions.data__ajax_type?apbct_public_sendREST("apbct_get_pixel_url",{method:"POST",callback:function(e){e&&(apbctLocalStorage.get("apbct_pixel_url")||(apbctLocalStorage.set("apbct_pixel_url",e),ctNoCookieAttachHiddenFieldsToForms()),ctSetPixelImg(e))}}):apbct_public_sendAJAX({action:"apbct_get_pixel_url"},{notJson:!0,callback:function(e){e&&(apbctLocalStorage.get("apbct_pixel_url")||(apbctLocalStorage.set("apbct_pixel_url",e),ctNoCookieAttachHiddenFieldsToForms()),ctSetPixelImg(e))}})}function ctSetHasScrolled(){apbctLocalStorage.isSet("ct_has_scrolled")&&apbctLocalStorage.get("ct_has_scrolled")||(ctSetCookie("ct_has_scrolled","true"),apbctLocalStorage.set("ct_has_scrolled",!0))}function ctSetMouseMoved(){apbctLocalStorage.isSet("ct_mouse_moved")&&apbctLocalStorage.get("ct_mouse_moved")||(ctSetCookie("ct_mouse_moved","true"),apbctLocalStorage.set("ct_mouse_moved",!0))}function ctPreloadLocalStorage(){ctPublic.data__to_local_storage&&Object.entries(ctPublic.data__to_local_storage).forEach(function(e){var e=_slicedToArray(e,2),t=e[0],e=e[1];apbctLocalStorage.set(t,e)})}function apbct_ready(){ctPreloadLocalStorage();var e=apbctLocalStorage.get("ct_cookies_type"),e=(e&&e===ctPublic.data__cookies_type||(apbctLocalStorage.set("ct_cookies_type",ctPublic.data__cookies_type),apbctLocalStorage.delete("ct_mouse_moved"),apbctLocalStorage.delete("ct_has_scrolled")),[["ct_ps_timestamp",Math.floor((new Date).getTime()/1e3)],["ct_fkp_timestamp","0"],["ct_pointer_data","0"],["ct_timezone",ct_date.getTimezoneOffset()/60*-1],["ct_screen_info",apbctGetScreenInfo()],["apbct_headless",navigator.webdriver]]);if(apbctLocalStorage.set("ct_ps_timestamp",Math.floor((new Date).getTime()/1e3)),apbctLocalStorage.set("ct_fkp_timestamp","0"),apbctLocalStorage.set("ct_pointer_data","0"),apbctLocalStorage.set("ct_timezone",ct_date.getTimezoneOffset()/60*-1),apbctLocalStorage.set("ct_screen_info",apbctGetScreenInfo()),apbctLocalStorage.set("apbct_headless",navigator.webdriver),"native"!==ctPublic.data__cookies_type)e.push(["apbct_visible_fields","0"]);else{var t=document.cookie.split(";");if(0!==t.length)for(var o=0;o<t.length;o++){var n=t[o].trim().split("=")[0];0===n.indexOf("apbct_visible_fields_")&&ctDeleteCookie(n)}}+ctPublic.pixel__setting&&(+ctPublic.pixel__enabled?ctGetPixelUrl():e.push(["apbct_pixel_url",ctPublic.pixel__url])),+ctPublic.data__email_check_before_post&&(e.push(["ct_checked_emails","0"]),apbct("input[type = 'email'], #email").on("blur",checkEmail)),apbctLocalStorage.isSet("ct_checkjs")?e.push(["ct_checkjs",apbctLocalStorage.get("ct_checkjs")]):e.push(["ct_checkjs",0]),ctSetCookie(e),setTimeout(function(){ctNoCookieAttachHiddenFieldsToForms();for(var e=0;e<document.forms.length;e++){var t,o,n=document.forms[e];0==+ctPublic.data__visible_fields_required||"get"===n.method.toString().toLowerCase()&&0===n.querySelectorAll(".nf-form-content").length||n.classList.contains("slp_search_form")||n.parentElement.classList.contains("mec-booking")||-1!==n.action.toString().indexOf("activehosted.com")||n.id&&"caspioform"===n.id||n.classList&&n.classList.contains("tinkoffPayRow")||n.classList&&n.classList.contains("give-form")||n.id&&"ult-forgot-password-form"===n.id||n.id&&-1!==n.id.toString().indexOf("calculatedfields")||n.id&&-1!==n.id.toString().indexOf("sac-form")||n.id&&-1!==n.id.toString().indexOf("cp_tslotsbooking_pform")||n.name&&-1!==n.name.toString().indexOf("cp_tslotsbooking_pform")||"https://epayment.epymtservice.com/epay.jhtml"===n.action.toString()||n.name&&-1!==n.name.toString().indexOf("tribe-bar-form")||((t=document.createElement("input")).setAttribute("type","hidden"),t.setAttribute("id","apbct_visible_fields_"+e),t.setAttribute("name","apbct_visible_fields"),(o={})[0]=apbct_collect_visible_fields(n),t.value=btoa(JSON.stringify(o)),n.append(t),n.onsubmit_prev=n.onsubmit,n.ctFormIndex=e,n.onsubmit=function(e){var t;"native"!==ctPublic.data__cookies_type&&void 0!==e.target.ctFormIndex&&((t={})[0]=apbct_collect_visible_fields(this),apbct_visible_fields_set_cookie(t,e.target.ctFormIndex)),e.target.onsubmit_prev instanceof Function&&setTimeout(function(){e.target.onsubmit_prev.call(e.target,e)},500)})}},1e3);var i=document.querySelectorAll("[data-original-string]");if((ctPublic.encodedEmailNodes=i).length)for(var a=0;a<i.length;++a)i[a].parentElement.href||i[a].parentElement.parentElement.href||i[a].addEventListener("click",ctFillDecodedEmailHandler)}function ctFillDecodedEmailHandler(e){this.removeEventListener("click",ctFillDecodedEmailHandler);ctPublic.encodedEmailNodesIsMixed=!1,document.body.classList.add("apbct-popup-fade");var t,o=document.getElementById("apbct_popup");o?(o.setAttribute("style","display: inherit"),document.getElementById("apbct_popup_text").innerHTML="Please wait while CleanTalk decoding email addresses.."):((o=document.createElement("div")).setAttribute("class","apbct-popup"),o.setAttribute("id","apbct_popup"),(t=document.createElement("p")).setAttribute("id","apbct_popup_text"),t.innerText="Please wait while CleanTalk decoding email addresses..",o.append(t),document.body.append(o)),apbctAjaxEmailDecodeBulk(e,ctPublic.encodedEmailNodes,this)}function apbctAjaxEmailDecodeBulk(e,t,o){for(var n={event_javascript_data:getJavascriptClientData(),post_url:document.location.href,referrer:document.referrer,encodedEmails:""},i={},a=0;a<t.length;a++){void 0!==t[a].href&&0===t[a].href.indexOf("mailto:")&&(e.preventDefault(),ctPublic.encodedEmailNodesIsMixed=!0);var r=document.createElement("div");r.setAttribute("class","apbct-tooltip"),apbct(t[a]).append(r),i[a]=t[a].dataset.originalString}n.encodedEmails=JSON.stringify(i),"rest"===ctPublicFunctions.data__ajax_type?apbct_public_sendREST("apbct_decode_email",{data:n,method:"POST",callback:function(e){ctSetCookie("apbct_email_encoder_passed","1"),apbctEmailEncoderCallbackBulk(e,t,o)},onErrorCallback:function(e){resetEncodedNodes(),ctShowDecodeComment(e)}}):(n.action="apbct_decode_email",apbct_public_sendAJAX(n,{notJson:!1,callback:function(e){ctSetCookie("apbct_email_encoder_passed","1"),apbctEmailEncoderCallbackBulk(e,t,o)},onErrorCallback:function(e){resetEncodedNodes(),ctShowDecodeComment(e)}}))}function apbctEmailEncoderCallbackBulk(i,a,o){i.success&&!0===i.data[0].is_allowed?setTimeout(function(){for(var e=0;e<a.length&&"break"!==function(t){var e,o,n=void 0;if(i.data.forEach(function(e){e.encoded_email===a[t].dataset.originalString&&(n=e)}),!1===n.is_allowed)return"break";void 0!==a[t].href&&0===a[t].href.indexOf("mailto:")&&(e=a[t].href.replace("mailto:",""),o=a[t].innerHTML,a[t].innerHTML=o.replace(e,n.decoded_email),a[t].href="mailto:"+n.decoded_email),ctProcessDecodedDataResult(n,a[t]),a[t].removeEventListener("click",ctFillDecodedEmailHandler)}(e);e++);var t=document.getElementById("apbct_popup");null!==t&&(document.body.classList.remove("apbct-popup-fade"),t.setAttribute("style","display:none"),ctPublic.encodedEmailNodesIsMixed)&&o.click()},3e3):i.success?(resetEncodedNodes(),ctShowDecodeComment("Blocked: "+i.data[0].comment)):(resetEncodedNodes(),ctShowDecodeComment("Cannot connect with CleanTalk server: "+i.data[0].comment))}function resetEncodedNodes(){void 0!==ctPublic.encodedEmailNodes&&ctPublic.encodedEmailNodes.forEach(function(e){e.addEventListener("click",ctFillDecodedEmailHandler)})}function getJavascriptClientData(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],t={},o=(t.apbct_headless=!!ctGetCookie(ctPublicFunctions.cookiePrefix+"apbct_headless"),t.apbct_pixel_url=ctGetCookie(ctPublicFunctions.cookiePrefix+"apbct_pixel_url"),t.ct_checked_emails=ctGetCookie(ctPublicFunctions.cookiePrefix+"ct_checked_emails"),t.ct_checkjs=ctGetCookie(ctPublicFunctions.cookiePrefix+"ct_checkjs"),t.ct_fkp_timestamp=ctGetCookie(ctPublicFunctions.cookiePrefix+"ct_fkp_timestamp"),t.ct_pointer_data=ctGetCookie(ctPublicFunctions.cookiePrefix+"ct_pointer_data"),t.ct_ps_timestamp=ctGetCookie(ctPublicFunctions.cookiePrefix+"ct_ps_timestamp"),t.ct_screen_info=ctGetCookie(ctPublicFunctions.cookiePrefix+"ct_screen_info"),t.ct_timezone=ctGetCookie(ctPublicFunctions.cookiePrefix+"ct_timezone"),apbctLocalStorage.get(ctPublicFunctions.cookiePrefix+"ct_mouse_moved")),n=apbctLocalStorage.get(ctPublicFunctions.cookiePrefix+"ct_has_scrolled"),i=apbctLocalStorage.get(ctPublicFunctions.cookiePrefix+"ct_cookies_type"),a=ctGetCookie(ctPublicFunctions.cookiePrefix+"ct_mouse_moved"),r=ctGetCookie(ctPublicFunctions.cookiePrefix+"ct_has_scrolled"),c=ctGetCookie(ctPublicFunctions.cookiePrefix+"ct_cookies_type");if(t.ct_mouse_moved=void 0!==o?o:a,t.ct_has_scrolled=void 0!==n?n:r,t.ct_cookies_type=void 0!==i?i:c,"object"===_typeof(e)&&e!==[])for(var l=0;l<e.length;++l)"object"===_typeof(e[l][1])?t[e[l][1][0]]=e[l][1][1]:t[e[l][0]]=e[l][1];else console.log("APBCT JS ERROR: Collecting data type mismatch");return t=removeDoubleJsonEncoding(t),JSON.stringify(t)}function removeDoubleJsonEncoding(e){if("object"===_typeof(e))for(var t in e){var o;"object"===_typeof(e[t])&&(e[t]=removeDoubleJsonEncoding(e[t])),"string"==typeof e[t]&&null!==e[t].match(/^[\[{].*?[\]}]$/)&&"object"===_typeof(o=JSON.parse(e[t]))&&(e[t]=o)}return e}function ctProcessDecodedDataResult(e,t){t.setAttribute("title",""),t.removeAttribute("style"),ctFillDecodedEmail(t,e.decoded_email)}function ctFillDecodedEmail(e,t){apbct(e).html(apbct(e).html().replace(/.+?(<div class=["']apbct-tooltip["'].+?<\/div>)/,t+"$1"))}function ctShowDecodeComment(e){e=e||"Can not decode email. Unknown reason";var t=document.getElementById("apbct_popup"),o=document.getElementById("apbct_popup_text");null!==t&&(document.body.classList.remove("apbct-popup-fade"),o.innerText="CleanTalk email decoder: "+e,setTimeout(function(){t.setAttribute("style","display:none")},3e3))}function apbct_collect_visible_fields(e){var t,o=[],n="",i=0,a="",r=0,c=[];for(t in e.elements)isNaN(+t)||(o[t]=e.elements[t]);return(o=o.filter(function(e){return-1===c.indexOf(e.getAttribute("name"))&&(-1===["radio","checkbox"].indexOf(e.getAttribute("type"))||(c.push(e.getAttribute("name")),!1))})).forEach(function(e,t,o){"submit"!==e.getAttribute("type")&&null!==e.getAttribute("name")&&"ct_checkjs"!==e.getAttribute("name")&&("none"!==getComputedStyle(e).display&&"hidden"!==getComputedStyle(e).visibility&&"0"!==getComputedStyle(e).opacity&&"hidden"!==e.getAttribute("type")||e.classList.contains("wp-editor-area")?(n+=" "+e.getAttribute("name"),i++):(a+=" "+e.getAttribute("name"),r++))}),a=a.trim(),{visible_fields:n=n.trim(),visible_fields_count:i,invisible_fields:a,invisible_fields_count:r}}function apbct_visible_fields_set_cookie(e,t){var o="object"===_typeof(e)&&null!==e?e:{};if("native"===ctPublic.data__cookies_type)for(var n in o){if(10<n)return;ctSetCookie("apbct_visible_fields_"+(void 0!==t?t:n),JSON.stringify(o[n]))}else"none"===ctPublic.data__cookies_type?ctSetCookie("apbct_visible_fields",JSON.stringify(o[0])):ctSetCookie("apbct_visible_fields",JSON.stringify(o))}function apbct_js_keys__set_input_value(e,t,o,n){if(0<document.querySelectorAll("[name^=ct_checkjs]").length)for(var i=document.querySelectorAll("[name^=ct_checkjs]"),a=0;a<i.length;a++)i[a].value=e.js_key}function apbctGetScreenInfo(){return JSON.stringify({fullWidth:document.documentElement.scrollWidth,fullHeight:Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight),visibleWidth:document.documentElement.clientWidth,visibleHeight:document.documentElement.clientHeight})}function ctParseBlockMessage(e){void 0!==e.apbct&&(e=e.apbct).blocked&&(document.dispatchEvent(new CustomEvent("apbctAjaxBockAlert",{bubbles:!0,detail:{message:e.comment}})),cleantalkModal.loaded=e.comment,cleantalkModal.open(),1==+e.stop_script)&&window.stop()}function ctSetPixelUrlLocalstorage(e){ctSetCookie("apbct_pixel_url",e)}function ctNoCookieConstructHiddenField(){var e="",t=apbctLocalStorage.getCleanTalkData(),t=JSON.stringify(t);return t=btoa(t),(e=document.createElement("input")).setAttribute("id","ct_no_cookie_hidden_field"),e.setAttribute("name","ct_no_cookie_hidden_field"),e.setAttribute("value",t),e.setAttribute("type","hidden"),e}function ctNoCookieGetForms(){var e=document.forms;return e||!1}function ctNoCookieAttachHiddenFieldsToForms(){if("none"===ctPublic.data__cookies_type){var e=ctNoCookieGetForms();if(e){var t=document.getElementsByName("ct_no_cookie_hidden_field");if(t)for(var o=0;o<t.length;o++)t[o].parentNode.removeChild(t[o]);for(var n=0;n<e.length;n++)null!==document.forms[n].getAttribute("method")&&"post"!==document.forms[n].getAttribute("method").toLowerCase()||document.forms[n].append(ctNoCookieConstructHiddenField())}}}ctPublic.data__key_is_ok&&(apbct_attach_event_handler(document,"mousemove",ctFunctionMouseMove),apbct_attach_event_handler(document,"mousedown",ctFunctionFirstKey),apbct_attach_event_handler(document,"keydown",ctFunctionFirstKey),apbct_attach_event_handler(document,"scroll",ctSetHasScrolled)),ctPublic.data__key_is_ok&&("loading"!==document.readyState?apbct_ready():apbct_attach_event_handler(document,"DOMContentLoaded",apbct_ready)),"undefined"!=typeof jQuery&&jQuery(document).ajaxComplete(function(e,t,o){if(t.responseText&&-1!==t.responseText.indexOf('"apbct')){try{var n=JSON.parse(t.responseText)}catch(e){return void console.log(e.toString())}ctParseBlockMessage(n)}});var cleantalkModal={loaded:!1,loading:!1,opened:!1,opening:!1,load:function(e){var t;this.loaded||(this.loading=!0,t=function(e,t,o,n){cleantalkModal.loading=!1,cleantalkModal.loaded=e,document.dispatchEvent(new CustomEvent("cleantalkModalContentLoaded",{bubbles:!0}))},("function"==typeof apbct_admin_sendAJAX?apbct_admin_sendAJAX:apbct_public_sendAJAX)({action:e},{callback:t,notJson:!0}))},open:function(){function e(){var e,t="";for(e in this.styles)t+=e+":"+this.styles[e]+";";return t}var t={styles:{"z-index":"9999",position:"fixed",top:"0",left:"0",width:"100%",height:"100%",background:"rgba(0,0,0,0.5)",display:"flex","justify-content":"center","align-items":"center"},toString:e},o={styles:{position:"relative",padding:"30px",background:"#FFF",border:"1px solid rgba(0,0,0,0.75)","border-radius":"4px","box-shadow":"7px 7px 5px 0px rgba(50,50,50,0.75)"},toString:e},n={styles:{position:"absolute",background:"#FFF",width:"20px",height:"20px",border:"2px solid rgba(0,0,0,0.75)","border-radius":"15px",cursor:"pointer",top:"-8px",right:"-8px","box-sizing":"content-box"},toString:e},i={styles:{content:'""',display:"block",position:"absolute",background:"#000","border-radius":"1px",width:"2px",height:"16px",top:"2px",left:"9px",transform:"rotate(45deg)"},toString:e},a={styles:{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},c=document.createElement("style"),r=(c.setAttribute("id","cleantalk-modal-styles"),c.innerHTML="body.cleantalk-modal-opened{"+r+"}",c.innerHTML+="#cleantalk-modal-overlay{"+t+"}",c.innerHTML+="#cleantalk-modal-close{"+n+"}",c.innerHTML+="#cleantalk-modal-close:before{"+i+"}",c.innerHTML+="#cleantalk-modal-close:after{"+a+"}",document.body.append(c),document.createElement("div")),t=(r.setAttribute("id","cleantalk-modal-overlay"),document.body.append(r),document.body.classList.add("cleantalk-modal-opened"),document.createElement("div")),n=(t.setAttribute("id","cleantalk-modal-inner"),t.setAttribute("style",o),r.append(t),document.createElement("div")),i=(n.setAttribute("id","cleantalk-modal-close"),t.append(n),document.createElement("div"));this.loaded?/.*\/inc/g.test(this.loaded)?i.innerHTML=this.loaded:(a=this.loaded.replace(/(https?:\/\/[^\s]+)/g,'<a href="$1" target="_blank">$1</a>'),i.innerHTML=a):(i.innerHTML="Loading...",this.load("get_options_template")),i.setAttribute("id","cleantalk-modal-content"),t.append(i),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}))}},buttons_to_handle=(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)}),[]);function apbct_gdpr_handle_buttons(){try{buttons_to_handle!==[]&&buttons_to_handle.forEach(function(e){var t='[id="apbct_gdpr_'+e.index+'"]',t=jQuery(t);jQuery(t).prop("checked")?(e.button.disabled=!1,jQuery(e.button).prop("title",e.old_notice)):(e.button.disabled=!0,jQuery(e.button).prop("title",gdpr_notice_for_button))})}catch(e){console.info("APBCT GDPR JS ERROR: Can not handle form buttons "+e)}}function ct_protect_external(){for(var e,t,o=0;o<document.forms.length;o++)void 0===document.forms[o].cleantalk_hidden_action&&void 0===document.forms[o].cleantalk_hidden_method&&"string"==typeof(e=document.forms[o]).action&&(isIntegratedForm(e)?apbctProcessExternalForm(e,o,document):-1===e.action.indexOf("http://")&&-1===e.action.indexOf("https://")||e.action.split("//")[1].split("/")[0].toLowerCase()!==location.hostname.toLowerCase()&&((t=document.createElement("input")).name="cleantalk_hidden_action",t.value=e.action,t.type="hidden",e.appendChild(t),(t=document.createElement("input")).name="cleantalk_hidden_method",t.value=e.method,t.type="hidden",e.method="POST",e.appendChild(t),e.action=document.location));apbctProcessIframes()}function formIsExclusion(t){var o=!1;return t.parentElement&&0<t.parentElement.classList.length&&-1!==t.parentElement.classList[0].indexOf("mewtwo")&&(o=!0),["give-form"].forEach(function(e){void 0!==t.id&&-1!==t.id.indexOf(e)&&(o=!0)}),o}function apbctProcessIframes(){var e=document.getElementsByTagName("iframe");if(0<e.length)for(var t=0;t<e.length;t++)if(null!=e[t].contentDocument){var o=e[t].contentDocument.forms;if(0===o.length)return;for(var n=0;n<o.length;n++)apbctProcessExternalForm(o[n],n,e[t].contentDocument)}}function apbctProcessExternalForm(e,n,i){var t,o,a,r,c;formIsExclusion(e)||((t=document.createElement("i")).className="cleantalk_placeholder",t.style="display: none",e.parentElement.insertBefore(t,e),t=e.previousSibling,a=e.outerHTML,(o=e).parentElement.removeChild(e),(e=document.createElement("div")).innerHTML=a,t.after(e.firstElementChild),(a=document.createElement("input")).name="action",a.value="cleantalk_force_ajax_check",a.type="hidden",(r=i.forms[n]).appendChild(a),r.apbctPrev=t,r.apbctFormOriginal=o,c=!1,void 0!==r.classList&&["newsletterform","ml-block-form"].forEach(function(e){r.classList.contains(e)&&(c=e)}),c?void 0!==(e=jQuery("form."+c).find('button[type="submit"]'))&&e.click(function(e){e.preventDefault(),sendAjaxCheckingFormData(e.currentTarget)}):i.forms[n].onsubmit=function(e){var t,o;e.preventDefault(),-1!==i.forms[n].id.indexOf("mauticform")&&0<(t=jQuery(i.forms[n]).find('input[id*="checkbox_rgpd"]')).length&&!0===t.prop("checked")&&0<(o=jQuery(".cleantalk_placeholder")).length&&o[0].setAttribute("mautic_hidden_gdpr_id",t.prop("id")),jQuery(e.currentTarget).prev(),jQuery(e.currentTarget).clone();sendAjaxCheckingFormData(e.currentTarget)})}function apbct_replace_inputs_values_from_other_form(e,t){var e=jQuery(e).find("button, input, textarea, select"),o=jQuery(t).find("button, input, textarea, select");e.each(function(e,n){var i=jQuery(n);o.each(function(e,t){var o=jQuery(t);n.outerHTML===t.outerHTML&&o.val(i.val())})})}function isIntegratedForm(e){var t=e.action,o=e.id;return!!(-1!==t.indexOf("activehosted.com")||-1!==t.indexOf("app.convertkit.com")||void 0!==e.firstChild.classList&&e.firstChild.classList.contains("cb-form-group")||-1!==t.indexOf("mailerlite.com")||-1!==t.indexOf("colcolmail.co.uk")||-1!==t.indexOf("paypal.com")||-1!==t.indexOf("infusionsoft.com")||-1!==t.indexOf("webto.salesforce.com")||-1!==t.indexOf("secure2.convio.net")||-1!==t.indexOf("hookb.in")||-1!==t.indexOf("external.url")||-1!==t.indexOf("tp.media")||-1!==t.indexOf("flodesk.com")||-1!==t.indexOf("sendfox.com")||-1!==t.indexOf("aweber.com")||-1!==t.indexOf("secure.payu.com")||-1!==t.indexOf("mautic")||-1!==o.indexOf("mauticform_"))}function sendAjaxCheckingFormData(d,e,t){var o={},n=(o[0]=apbct_collect_visible_fields(d),apbct_visible_fields_set_cookie(o),{}),o=d.elements;(o=Array.prototype.slice.call(o)).forEach(function(e,t){""===e.name?n["input_"+t]=e.value:n[e.name]=e.value}),apbct_public_sendAJAX(n,{async:!1,callback:function(e,t,o,n){if(void 0===e.apbct||!+e.apbct.blocked){var i=jQuery(d).detach(),a=d.apbctPrev,r=d.apbctFormOriginal,c=!1,l=(apbct_replace_inputs_values_from_other_form(i,r),-1!==r.id.indexOf("mautic")&&(c=!0),document.getElementsByClassName("cleantalk_placeholder"));if(l)for(var s=0;s<l.length;s++){var u=l[s].getAttribute("mautic_hidden_gdpr_id");void 0!==u&&void 0!==(u=jQuery(r).find("#"+u))&&u.prop("checked",!0)}a.after(r),jQuery(r).find('input[name="apbct_visible_fields"]').remove(),jQuery(r).find('input[value="cleantalk_force_ajax_check"]').remove();i=jQuery(r).find("button[type=submit]");if(0!==i.length)return i[0].click(),void(c&&setTimeout(function(){ct_protect_external()},1500));if(0!==(i=jQuery(r).find("input[type=submit]")).length)return void i[0].click();if(0!==(i=jQuery(r).find('button[data-element="submit"]')).length)return void i[0].click();0!==(i=jQuery(r).find('input[type="image"][name="submit"]')).length&&i[0].click()}void 0!==e.apbct&&+e.apbct.blocked&&ctParseBlockMessage(e)}})}function ct_check_internal(t){var e,o={},n=t.elements;for(e in n)"submit"!=n[e].type&&null!=n[e].value&&""!=n[e].value&&(o[n[e].name]=t.elements[e].value);o.action="ct_check_internal",apbct_public_sendAJAX(o,{url:ctPublicFunctions._ajax_url,callback:function(e){if(!0!==e.success)return alert(e.data),!1;t.submit()}})}function ct_check_internal__is_exclude_form(t){return["wp-login.php","wp-comments-post.php"].some(function(e){return null!==t.match(new RegExp(ctPublic.blog_home+".*"+e))})}document.addEventListener("DOMContentLoaded",function(){if("undefined"!=typeof ctPublicGDPR&&ctPublicGDPR.gdpr_forms.length){var i=ctPublicGDPR.gdpr_title;if("undefined"!=typeof jQuery)try{ctPublicGDPR.gdpr_forms.forEach(function(e,t){var o=jQuery("#"+e+", ."+e),e=(o.is("form")||(o.find("form")[0]?o=o.children("form").first():jQuery(".wpcf7[role=form]")[0]&&-1!==jQuery(".wpcf7[role=form]").attr("id").indexOf("wpcf7-f"+e)?o=jQuery(".wpcf7[role=form]").children("form"):jQuery(".frm_forms")[0]&&-1!==jQuery(".frm_forms").first().attr("id").indexOf("frm_form_"+e)?o=jQuery(".frm_forms").first().children("form"):jQuery(".wpforms-form")[0]&&-1!==jQuery(".wpforms-form").first().attr("id").indexOf("wpforms-form-"+e)&&(o=jQuery(".wpforms-form"))),!1),n=o.find('input[type|="submit"],button[type|="submit"]');n.length&&(!1!==(e=n[0])&&(e.disabled=!0,n=jQuery(e).prop("title")?jQuery(e).prop("title"):"",buttons_to_handle.push({index:t,button:e,old_notice:n}),jQuery(e).prop("title",i)),!o.is("form")&&"form"!==o.attr("role")||o.append('<input id="apbct_gdpr_'+t+'" type="checkbox" required="required" style=" margin-right: 10px;" onchange="apbct_gdpr_handle_buttons()">').append('<label style="display: inline;" for="apbct_gdpr_'+t+'">'+ctPublicGDPR.gdpr_text+"</label>"))})}catch(e){console.info("APBCT GDPR JS ERROR: Can not add GDPR notice"+e)}}}),window.onload=function(){+ctPublic.settings__forms__check_external&&"undefined"!=typeof jQuery&&setTimeout(function(){ct_protect_external()},1500)},document.addEventListener("DOMContentLoaded",function(){var e,t="";if(+ctPublic.settings__forms__check_internal)for(var o=0;o<document.forms.length;o++)"string"!=typeof document.forms[o].action||null===(t=(e=document.forms[o]).action).indexOf("https?://")||null===t.match(ctPublic.blog_home+".*?.php")||ct_check_internal__is_exclude_form(t)||(e.click,"undefined"!=typeof jQuery&&(jQuery(e).off("**"),jQuery(e).off(),jQuery(e).on("submit",function(e){return ct_check_internal(e.target),!1})))});
1
+ "use strict";function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArrayLimit(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var n,i,a=[],r=!0,c=!1;try{for(o=o.call(e);!(r=(n=o.next()).done)&&(a.push(n.value),!t||a.length!==t);r=!0);}catch(e){c=!0,i=e}finally{try{r||null==o.return||o.return()}finally{if(c)throw i}}return a}}function _arrayWithHoles(e){if(Array.isArray(e))return 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 _createSuper(o){var n=_isNativeReflectConstruct();return function(){var e,t=_getPrototypeOf(o);return _possibleConstructorReturn(this,n?(e=_getPrototypeOf(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}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(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _createForOfIteratorHelper(e,t){var o,n,i,a,r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return n=!(o=!0),{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){n=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(n)throw i}}};if(Array.isArray(e)||(r=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length)return r&&(e=r),a=0,{s:t=function(){},n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},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 o;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(o="Object"===(o=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:o)||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_arrayLikeToArray(e,t):void 0}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t);o<t;o++)n[o]=e[o];return n}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 o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,o){return t&&_defineProperties(e.prototype,t),o&&_defineProperties(e,o),Object.defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}var ApbctCore=function(){function t(e){_classCallCheck(this,t),_defineProperty(this,"ajax_parameters",{}),_defineProperty(this,"rest_parameters",{}),_defineProperty(this,"selector",null),_defineProperty(this,"elements",[]),_defineProperty(this,"eventCallback",void 0),_defineProperty(this,"eventSelector",void 0),_defineProperty(this,"event",void 0),this.select(e)}return _createClass(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|=!1,"object"===_typeof(e)){for(var o in e)for(var n=o.replace(/([-_][a-z])/g,function(e){return e.toUpperCase().replace("-","").replace("_","")}),i=0;i<this.elements.length;i++)this.elements[i].style[n]=e[o];return this}var a;if("string"==typeof e)return void 0!==(a=getComputedStyle(this.elements[0])[e])&&!t&&(a=a.replace(/(\d)(em|pt|%|px){1,2}$/,"$1"),Number(a)==a)?Number(a):a}},{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.rest_parameters=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=[],o=0;o<this.elements.length;o++)void 0!==_typeof(this.elements[o][e])?t.push(this.elements[o][e]):t.push(this.elements[o].getAttribute(e));return 1===t.length?t[0]:t}},{key:"prop",value:function(e,t){if(void 0!==t){for(var o=0;o<this.elements.length;o++)this.elements[o][e]=t;return this}for(var n=[],i=0;i<this.elements.length;i++)n.push(this.elements[i][e]);return 1===n.length?n[0]:n}},{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,o=!1,n=_createForOfIteratorHelper(this.elements);try{for(n.s();!(t=n.n()).done;)var i=t.value,o=o||this.isElem(i,e)}catch(e){n.e(e)}finally{n.f()}return o}},{key:"isElem",value:function(e,t){var o=!1;return"function"==typeof t&&(o=o||t.call(this,e)),o="string"==typeof t?t.match(/^[a-z]/)&&function(e){e=document.createElement(e).constructor;return!Boolean(~[HTMLElement,HTMLUnknownElement].indexOf(e))}(t)?o||e.tagName.toLowerCase()===t.toLowerCase():t.match(/^[a-z]/)?o||Boolean(e[t]):o||(null!==this.selector?null!==document.querySelector(this.selector+t):this.isWithoutSelector(e,t)):o}},{key:"isWithoutSelector",value:function(e,t){var o,n=!1,i=_createForOfIteratorHelper(document.querySelectorAll(t));try{for(i.s();!(o=i.n()).done;)var a=o.value,n=n||e===a}catch(e){i.e(e)}finally{i.f()}return n}},{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,o=_createForOfIteratorHelper(this.elements);try{for(o.s();!(t=o.n()).done;)t.value.after(e)}catch(e){o.e(e)}finally{o.f()}}},{key:"append",value:function(e){var t,o=_createForOfIteratorHelper(this.elements);try{for(o.s();!(t=o.n()).done;)t.value.append(e)}catch(e){o.e(e)}finally{o.f()}}},{key:"fadeIn",value:function(n){var e,t=_createForOfIteratorHelper(this.elements);try{for(t.s();!(e=t.n()).done;)!function(){var t=e.value,o=(t.style.opacity=0,t.style.display="block",+new Date);(function e(){t.style.opacity=+t.style.opacity+(new Date-o)/n,o=+new Date,+t.style.opacity<1&&(window.requestAnimationFrame&&requestAnimationFrame(e)||setTimeout(e,16))})()}()}catch(e){t.e(e)}finally{t.f()}}},{key:"fadeOut",value:function(n){var e,t=_createForOfIteratorHelper(this.elements);try{for(t.s();!(e=t.n()).done;)!function(){var t=e.value,o=(t.style.opacity=1,+new Date);(function e(){t.style.opacity=+t.style.opacity-(new Date-o)/n,o=+new Date,0<+t.style.opacity?window.requestAnimationFrame&&requestAnimationFrame(e)||setTimeout(e,16):t.style.display="none"})()}()}catch(e){t.e(e)}finally{t.f()}}}]),t}();function apbct(e){return(new ApbctCore).select(e)}var ApbctXhr=function(){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",""),console.log("%cXHR%c started","color: red; font-weight: bold;","color: grey; font-weight: normal;"),e)void 0!==this[t]&&(this[t]=e[t]);if(this.prepare(),Object.keys(this.data).length&&(this.deleteDoubleJSONEncoding(this.data),this.convertData()),!this.url)return console.log("%cXHR%c not URL provided","color: red; font-weight: bold;","color: grey; font-weight: normal;"),!1;this.xhr.open(this.method,this.url,this.async,this.user,this.password),this.setHeaders(),this.xhr.responseType=this.responseType,this.xhr.timeout=this.timeout,this.xhr.onreadystatechange=function(){this.onReadyStateChange()}.bind(this),this.xhr.onload=function(){this.onLoad()}.bind(this),this.xhr.onprogress=function(e){this.onProgress(e)}.bind(this),this.xhr.onerror=function(){this.onError()}.bind(this),this.xhr.ontimeout=function(){this.onTimeout()}.bind(this),this.xhr.send(this.body)}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:"error",value:function(e,t,o){var n="";"timeout"===t?n+="Server response timeout":200===e?"parsererror"===t?n+="Unexpected response from server. See console for details.":(n+="Unexpected error. Status: "+t+".",void 0!==o&&(n+=" Additional error info: "+o)):n+=500===e?"Internal server error.":"Unexpected response code:"+e,this.errorOutput(n)}},{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)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 o;"object"===_typeof(e[t])&&(e[t]=this.deleteDoubleJSONEncoding(e[t])),"string"!=typeof e[t]||null===e[t].match(/^[\[{].*?[\]}]$/)||"object"===_typeof(o=JSON.parse(e[t]))&&(e[t]=o)}return e}}]),o}(),ApbctAjax=function(){_inherits(t,ApbctXhr);var e=_createSuper(t);function t(){return _classCallCheck(this,t),e.call(this,arguments.length<=0?void 0:arguments[0])}return _createClass(t)}(),ApbctRest=function(){_inherits(a,ApbctXhr);var i=_createSuper(a);function a(){for(var e,t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];return _classCallCheck(this,a),(o=o[0]).url=a.default_route+o.route,o.headers={"X-WP-Nonce":ctPublicFunctions._rest_nonce},_defineProperty(_assertThisInitialized(e=i.call(this,o)),"route",""),e}return _createClass(a)}();function ctSetCookie(e,t,o){var n,i,a=["ct_sfw_pass_key","ct_sfw_passed","wordpress_apbct_antibot","apbct_anticrawler_passed","apbct_antiflood_passed","apbct_email_encoder_passed"];("string"==typeof e&&"string"==typeof t||"number"==typeof t)&&(n="ct_pointer_data"===e,e=[[e,t,o]]),"none"===ctPublicFunctions.data__cookies_type?(i=[],e.forEach(function(e,t,o){-1!==a.indexOf(e[0])?i.push(e):apbctLocalStorage.set(e[0],encodeURIComponent(e[1]))}),0<i.length&&ctSetAlternativeCookie(i),ctNoCookieAttachHiddenFieldsToForms()):"native"===ctPublicFunctions.data__cookies_type?e.forEach(function(e,t,o){var n=void 0!==e[2]?"expires="+n+"; ":"",i="https:"===location.protocol?"; secure":"";document.cookie=ctPublicFunctions.cookiePrefix+e[0]+"="+encodeURIComponent(e[1])+"; "+n+"path=/; samesite=lax"+i}):"alternative"!==ctPublicFunctions.data__cookies_type||n||ctSetAlternativeCookie(e)}function ctSetAlternativeCookie(e,t){"function"==typeof getJavascriptClientData?Array.isArray(e)&&(e=getJavascriptClientData(e)):console.log("APBCT ERROR: getJavascriptClientData() is not loaded");try{e=JSON.parse(e)}catch(e){return void console.log("APBCT ERROR: JSON parse error:"+e)}var o=t&&t.callback||null,n=t&&t.onErrorCallback||null;t&&t.searchForm&&(e.apbct_search_forms_params=!0),"rest"===ctPublicFunctions.data__ajax_type?apbct_public_sendREST("alt_sessions",{method:"POST",data:{cookies:e},callback:o,onErrorCallback:n}):"admin_ajax"===ctPublicFunctions.data__ajax_type&&apbct_public_sendAJAX({action:"apbct_alt_session__save__AJAX",cookies:e},{notJson:1,callback:o,onErrorCallback:n})}function ctGetCookie(e){e=document.cookie.match(new RegExp("(?:^|; )"+e.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,"\\$1")+"=([^;]*)"));return e?decodeURIComponent(e[1]):void 0}function ctDeleteCookie(e){var t;"none"!==ctPublicFunctions.data__cookies_type&&("native"===ctPublicFunctions.data__cookies_type?(t="https:"===location.protocol?"; secure":"",document.cookie=e+'=""; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; samesite=lax'+t):ctPublicFunctions.data__cookies_type)}function apbct_public_sendAJAX(e,t,o){var n=[];n.callback=t.callback||null,n.onErrorCallback=t.onErrorCallback||null,n.callback_context=t.callback_context||null,n.callback_params=t.callback_params||null,n.async=t.async||!0,n.notJson=t.notJson||null,n.timeout=t.timeout||15e3,n.obj=o||null,n.button=t.button||null,n.progressbar=t.progressbar||null,n.silent=t.silent||null,n.no_nonce=t.no_nonce||null,n.data=e,n.url=ctPublicFunctions._ajax_url,"string"==typeof e?(n.no_nonce||(n.data=n.data+"&_ajax_nonce="+ctPublicFunctions._ajax_nonce),n.data=n.data+"&no_cache="+Math.random()):(n.no_nonce||(n.data._ajax_nonce=ctPublicFunctions._ajax_nonce),n.data.no_cache=Math.random()),(new ApbctCore).ajax(n)}function apbct_public_sendREST(e,t){var o=[];o.route=e,o.callback=t.callback||null,o.onErrorCallback=t.onErrorCallback||null,o.data=t.data||[],o.method=t.method||"POST",(new ApbctCore).rest(o)}_defineProperty(ApbctRest,"default_route",ctPublicFunctions._rest_url+"cleantalk-antispam/v1/");var apbctLocalStorage={get:function(t,e){void 0===e&&(e="value");t=localStorage.getItem(t);if(null!==t)try{var o=JSON.parse(t);return o.hasOwnProperty(e)?JSON.parse(o[e]):o}catch(e){return t}return!1},set:function(e,t){var o;!(2<arguments.length&&void 0!==arguments[2])||arguments[2]?(o={value:JSON.stringify(t),timestamp:Math.floor((new Date).getTime()/1e3)},localStorage.setItem(e,JSON.stringify(o))):localStorage.setItem(e,t)},isAlive:function(e,t){return void 0===t&&(t=86400),this.get(e,"timestamp")+t>Math.floor((new Date).getTime()/1e3)},isSet:function(e){return null!==localStorage.getItem(e)},delete:function(e){localStorage.removeItem(e)},getCleanTalkData:function(){for(var e={},t=0;t<localStorage.length;t++){var o=localStorage.key(t);-1===o.indexOf("ct_")&&-1===o.indexOf("apbct_")||(e[o.toString()]=apbctLocalStorage.get(o))}return e}},ct_date=new Date,ctTimeMs=(new Date).getTime(),ctMouseEventTimerFlag=!0,ctMouseData=[],ctMouseDataCounter=0,ctCheckedEmails={};function apbct_attach_event_handler(e,t,o){"function"==typeof window.addEventListener?e.addEventListener(t,o):e.attachEvent(t,o)}function apbct_remove_event_handler(e,t,o){"function"==typeof window.removeEventListener?e.removeEventListener(t,o):e.detachEvent(t,o)}var ctMouseReadInterval,ctMouseWriteDataInterval,ctFunctionFirstKey=function(e){ctSetCookie("ct_fkp_timestamp",Math.floor((new Date).getTime()/1e3)),ctKeyStopStopListening()},ctFunctionMouseMove=(ctPublic.data__key_is_ok&&(ctMouseReadInterval=setInterval(function(){ctMouseEventTimerFlag=!0},150),ctMouseWriteDataInterval=setInterval(function(){ctSetCookie("ct_pointer_data",JSON.stringify(ctMouseData))},1200)),function(e){ctSetMouseMoved(),!0===ctMouseEventTimerFlag&&(ctMouseData.push([Math.round(e.clientY),Math.round(e.clientX),Math.round((new Date).getTime()-ctTimeMs)]),ctMouseEventTimerFlag=!1,50<=++ctMouseDataCounter&&ctMouseStopData())});function ctMouseStopData(){apbct_remove_event_handler(document,"mousemove",ctFunctionMouseMove),clearInterval(ctMouseReadInterval),clearInterval(ctMouseWriteDataInterval)}function ctKeyStopStopListening(){apbct_remove_event_handler(document,"mousedown",ctFunctionFirstKey),apbct_remove_event_handler(document,"keydown",ctFunctionFirstKey)}function checkEmail(e){var t=e.target.value;!t||t in ctCheckedEmails||("rest"===ctPublicFunctions.data__ajax_type?apbct_public_sendREST("check_email_before_post",{method:"POST",data:{email:t},callback:function(e){e.result&&(ctCheckedEmails[t]={result:e.result,timestamp:Date.now()/1e3|0},ctSetCookie("ct_checked_emails",JSON.stringify(ctCheckedEmails)))}}):"admin_ajax"===ctPublicFunctions.data__ajax_type&&apbct_public_sendAJAX({action:"apbct_email_check_before_post",email:t},{callback:function(e){e.result&&(ctCheckedEmails[t]={result:e.result,timestamp:Date.now()/1e3|0},ctSetCookie("ct_checked_emails",JSON.stringify(ctCheckedEmails)))}}))}function ctSetPixelImg(e){var t;ctSetCookie("apbct_pixel_url",e),+ctPublic.pixel__enabled&&!document.getElementById("apbct_pixel")&&((t=document.createElement("img")).setAttribute("alt","CleanTalk Pixel"),t.setAttribute("id","apbct_pixel"),t.setAttribute("style","display: none; left: 99999px;"),t.setAttribute("src",e),apbct("body").append(t))}function ctGetPixelUrl(){var e=apbctLocalStorage.get("apbct_pixel_url");if(!1!==e){if(!apbctLocalStorage.isAlive("apbct_pixel_url",10800))return void ctSetPixelImg(e);apbctLocalStorage.delete("apbct_pixel_url")}"rest"===ctPublicFunctions.data__ajax_type?apbct_public_sendREST("apbct_get_pixel_url",{method:"POST",callback:function(e){e&&(apbctLocalStorage.get("apbct_pixel_url")||(apbctLocalStorage.set("apbct_pixel_url",e),ctNoCookieAttachHiddenFieldsToForms()),ctSetPixelImg(e))}}):apbct_public_sendAJAX({action:"apbct_get_pixel_url"},{notJson:!0,callback:function(e){e&&(apbctLocalStorage.get("apbct_pixel_url")||(apbctLocalStorage.set("apbct_pixel_url",e),ctNoCookieAttachHiddenFieldsToForms()),ctSetPixelImg(e))}})}function ctSetHasScrolled(){apbctLocalStorage.isSet("ct_has_scrolled")&&apbctLocalStorage.get("ct_has_scrolled")||(ctSetCookie("ct_has_scrolled","true"),apbctLocalStorage.set("ct_has_scrolled",!0))}function ctSetMouseMoved(){apbctLocalStorage.isSet("ct_mouse_moved")&&apbctLocalStorage.get("ct_mouse_moved")||(ctSetCookie("ct_mouse_moved","true"),apbctLocalStorage.set("ct_mouse_moved",!0))}function ctPreloadLocalStorage(){ctPublic.data__to_local_storage&&Object.entries(ctPublic.data__to_local_storage).forEach(function(e){var e=_slicedToArray(e,2),t=e[0],e=e[1];apbctLocalStorage.set(t,e)})}function apbct_ready(){ctPreloadLocalStorage();var e=apbctLocalStorage.get("ct_cookies_type"),e=(e&&e===ctPublic.data__cookies_type||(apbctLocalStorage.set("ct_cookies_type",ctPublic.data__cookies_type),apbctLocalStorage.delete("ct_mouse_moved"),apbctLocalStorage.delete("ct_has_scrolled")),[["ct_ps_timestamp",Math.floor((new Date).getTime()/1e3)],["ct_fkp_timestamp","0"],["ct_pointer_data","0"],["ct_timezone",ct_date.getTimezoneOffset()/60*-1],["ct_screen_info",apbctGetScreenInfo()],["apbct_headless",navigator.webdriver]]);if(apbctLocalStorage.set("ct_ps_timestamp",Math.floor((new Date).getTime()/1e3)),apbctLocalStorage.set("ct_fkp_timestamp","0"),apbctLocalStorage.set("ct_pointer_data","0"),apbctLocalStorage.set("ct_timezone",ct_date.getTimezoneOffset()/60*-1),apbctLocalStorage.set("ct_screen_info",apbctGetScreenInfo()),apbctLocalStorage.set("apbct_headless",navigator.webdriver),"native"!==ctPublic.data__cookies_type)e.push(["apbct_visible_fields","0"]);else{var t=document.cookie.split(";");if(0!==t.length)for(var o=0;o<t.length;o++){var n=t[o].trim().split("=")[0];0===n.indexOf("apbct_visible_fields_")&&ctDeleteCookie(n)}}+ctPublic.pixel__setting&&(+ctPublic.pixel__enabled?ctGetPixelUrl():e.push(["apbct_pixel_url",ctPublic.pixel__url])),+ctPublic.data__email_check_before_post&&(e.push(["ct_checked_emails","0"]),apbct("input[type = 'email'], #email").on("blur",checkEmail)),apbctLocalStorage.isSet("ct_checkjs")?e.push(["ct_checkjs",apbctLocalStorage.get("ct_checkjs")]):e.push(["ct_checkjs",0]),ctSetCookie(e),setTimeout(function(){ctNoCookieAttachHiddenFieldsToForms();for(var e=0;e<document.forms.length;e++){var t,o,n=document.forms[e];0==+ctPublic.data__visible_fields_required||"get"===n.method.toString().toLowerCase()&&0===n.querySelectorAll(".nf-form-content").length||n.classList.contains("slp_search_form")||n.parentElement.classList.contains("mec-booking")||-1!==n.action.toString().indexOf("activehosted.com")||n.id&&"caspioform"===n.id||n.classList&&n.classList.contains("tinkoffPayRow")||n.classList&&n.classList.contains("give-form")||n.id&&"ult-forgot-password-form"===n.id||n.id&&-1!==n.id.toString().indexOf("calculatedfields")||n.id&&-1!==n.id.toString().indexOf("sac-form")||n.id&&-1!==n.id.toString().indexOf("cp_tslotsbooking_pform")||n.name&&-1!==n.name.toString().indexOf("cp_tslotsbooking_pform")||"https://epayment.epymtservice.com/epay.jhtml"===n.action.toString()||n.name&&-1!==n.name.toString().indexOf("tribe-bar-form")||n.id&&"ihf-login-form"===n.id||n.id&&"subscriberForm"===n.id&&-1!==n.action.toString().indexOf("actionType=update")||((t=document.createElement("input")).setAttribute("type","hidden"),t.setAttribute("id","apbct_visible_fields_"+e),t.setAttribute("name","apbct_visible_fields"),(o={})[0]=apbct_collect_visible_fields(n),t.value=btoa(JSON.stringify(o)),n.append(t),n.onsubmit_prev=n.onsubmit,n.ctFormIndex=e,n.onsubmit=function(e){var t;"native"!==ctPublic.data__cookies_type&&void 0!==e.target.ctFormIndex&&((t={})[0]=apbct_collect_visible_fields(this),apbct_visible_fields_set_cookie(t,e.target.ctFormIndex)),e.target.onsubmit_prev instanceof Function&&setTimeout(function(){e.target.onsubmit_prev.call(e.target,e)},500)})}},1e3);var i=document.querySelectorAll("[data-original-string]");if((ctPublic.encodedEmailNodes=i).length)for(var a=0;a<i.length;++a)i[a].parentElement.href||i[a].parentElement.parentElement.href||i[a].addEventListener("click",ctFillDecodedEmailHandler);var r,c=_createForOfIteratorHelper(document.forms);try{for(c.s();!(r=c.n()).done;)!function(){var o=r.value;"searchform"===o.getAttribute("id")&&"none"===ctPublic.data__cookies_type&&(o.apbctSearchPrevOnsubmit=o.onsubmit,o.onsubmit=function(e){var t=o.querySelector('[name="ct_no_cookie_hidden_field"]');null!==t&&(e.preventDefault(),e=function(){o.apbctSearchPrevOnsubmit instanceof Function?o.apbctSearchPrevOnsubmit():HTMLFormElement.prototype.submit.call(o)},0!==(t=atob(t.value)).length?ctSetAlternativeCookie(t,{callback:e,onErrorCallback:e,searchForm:!0}):e())})}()}catch(e){c.e(e)}finally{c.f()}}function ctFillDecodedEmailHandler(e){this.removeEventListener("click",ctFillDecodedEmailHandler);ctPublic.encodedEmailNodesIsMixed=!1,document.body.classList.add("apbct-popup-fade");var t,o=document.getElementById("apbct_popup");o?(o.setAttribute("style","display: inherit"),document.getElementById("apbct_popup_text").innerHTML="Please wait while CleanTalk decoding email addresses.."):((o=document.createElement("div")).setAttribute("class","apbct-popup"),o.setAttribute("id","apbct_popup"),(t=document.createElement("p")).setAttribute("id","apbct_popup_text"),t.innerText="Please wait while CleanTalk decoding email addresses..",o.append(t),document.body.append(o)),apbctAjaxEmailDecodeBulk(e,ctPublic.encodedEmailNodes,this)}function apbctAjaxEmailDecodeBulk(e,t,o){for(var n={event_javascript_data:getJavascriptClientData(),post_url:document.location.href,referrer:document.referrer,encodedEmails:""},i={},a=0;a<t.length;a++){void 0!==t[a].href&&0===t[a].href.indexOf("mailto:")&&(e.preventDefault(),ctPublic.encodedEmailNodesIsMixed=!0);var r=document.createElement("div");r.setAttribute("class","apbct-tooltip"),apbct(t[a]).append(r),i[a]=t[a].dataset.originalString}n.encodedEmails=JSON.stringify(i),"rest"===ctPublicFunctions.data__ajax_type?apbct_public_sendREST("apbct_decode_email",{data:n,method:"POST",callback:function(e){ctSetCookie("apbct_email_encoder_passed","1"),apbctEmailEncoderCallbackBulk(e,t,o)},onErrorCallback:function(e){resetEncodedNodes(),ctShowDecodeComment(e)}}):(n.action="apbct_decode_email",apbct_public_sendAJAX(n,{notJson:!1,callback:function(e){ctSetCookie("apbct_email_encoder_passed","1"),apbctEmailEncoderCallbackBulk(e,t,o)},onErrorCallback:function(e){resetEncodedNodes(),ctShowDecodeComment(e)}}))}function apbctEmailEncoderCallbackBulk(i,a,o){i.success&&!0===i.data[0].is_allowed?setTimeout(function(){for(var e=0;e<a.length&&"break"!==function(t){var e,o,n=void 0;if(i.data.forEach(function(e){e.encoded_email===a[t].dataset.originalString&&(n=e)}),!1===n.is_allowed)return"break";void 0!==a[t].href&&0===a[t].href.indexOf("mailto:")&&(e=a[t].href.replace("mailto:",""),o=a[t].innerHTML,a[t].innerHTML=o.replace(e,n.decoded_email),a[t].href="mailto:"+n.decoded_email),ctProcessDecodedDataResult(n,a[t]),a[t].removeEventListener("click",ctFillDecodedEmailHandler)}(e);e++);var t=document.getElementById("apbct_popup");null!==t&&(document.body.classList.remove("apbct-popup-fade"),t.setAttribute("style","display:none"),ctPublic.encodedEmailNodesIsMixed&&o.click())},3e3):i.success?(resetEncodedNodes(),ctShowDecodeComment("Blocked: "+i.data[0].comment)):(resetEncodedNodes(),ctShowDecodeComment("Cannot connect with CleanTalk server: "+i.data[0].comment))}function resetEncodedNodes(){void 0!==ctPublic.encodedEmailNodes&&ctPublic.encodedEmailNodes.forEach(function(e){e.addEventListener("click",ctFillDecodedEmailHandler)})}function getJavascriptClientData(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],t={},o=(t.apbct_headless=!!ctGetCookie(ctPublicFunctions.cookiePrefix+"apbct_headless"),t.apbct_pixel_url=ctGetCookie(ctPublicFunctions.cookiePrefix+"apbct_pixel_url"),t.ct_checked_emails=ctGetCookie(ctPublicFunctions.cookiePrefix+"ct_checked_emails"),t.ct_checkjs=ctGetCookie(ctPublicFunctions.cookiePrefix+"ct_checkjs"),t.ct_fkp_timestamp=ctGetCookie(ctPublicFunctions.cookiePrefix+"ct_fkp_timestamp"),t.ct_pointer_data=ctGetCookie(ctPublicFunctions.cookiePrefix+"ct_pointer_data"),t.ct_ps_timestamp=ctGetCookie(ctPublicFunctions.cookiePrefix+"ct_ps_timestamp"),t.ct_screen_info=ctGetCookie(ctPublicFunctions.cookiePrefix+"ct_screen_info"),t.ct_timezone=ctGetCookie(ctPublicFunctions.cookiePrefix+"ct_timezone"),apbctLocalStorage.get(ctPublicFunctions.cookiePrefix+"ct_mouse_moved")),n=apbctLocalStorage.get(ctPublicFunctions.cookiePrefix+"ct_has_scrolled"),i=apbctLocalStorage.get(ctPublicFunctions.cookiePrefix+"ct_cookies_type"),a=ctGetCookie(ctPublicFunctions.cookiePrefix+"ct_mouse_moved"),r=ctGetCookie(ctPublicFunctions.cookiePrefix+"ct_has_scrolled"),c=ctGetCookie(ctPublicFunctions.cookiePrefix+"ct_cookies_type");if(t.ct_mouse_moved=void 0!==o?o:a,t.ct_has_scrolled=void 0!==n?n:r,t.ct_cookies_type=void 0!==i?i:c,"object"===_typeof(e)&&e!==[])for(var l=0;l<e.length;++l)"object"===_typeof(e[l][1])?t[e[l][1][0]]=e[l][1][1]:t[e[l][0]]=e[l][1];else console.log("APBCT JS ERROR: Collecting data type mismatch");return t=removeDoubleJsonEncoding(t),JSON.stringify(t)}function removeDoubleJsonEncoding(e){if("object"===_typeof(e))for(var t in e){var o;"object"===_typeof(e[t])&&(e[t]=removeDoubleJsonEncoding(e[t])),"string"!=typeof e[t]||null===e[t].match(/^[\[{].*?[\]}]$/)||"object"===_typeof(o=JSON.parse(e[t]))&&(e[t]=o)}return e}function ctProcessDecodedDataResult(e,t){t.setAttribute("title",""),t.removeAttribute("style"),ctFillDecodedEmail(t,e.decoded_email)}function ctFillDecodedEmail(e,t){apbct(e).html(apbct(e).html().replace(/.+?(<div class=["']apbct-tooltip["'].+?<\/div>)/,t+"$1"))}function ctShowDecodeComment(e){e=e||"Can not decode email. Unknown reason";var t=document.getElementById("apbct_popup"),o=document.getElementById("apbct_popup_text");null!==t&&(document.body.classList.remove("apbct-popup-fade"),o.innerText="CleanTalk email decoder: "+e,setTimeout(function(){t.setAttribute("style","display:none")},3e3))}function apbct_collect_visible_fields(e){var t,o=[],n="",i=0,a="",r=0,c=[];for(t in e.elements)isNaN(+t)||(o[t]=e.elements[t]);return(o=o.filter(function(e){return-1===c.indexOf(e.getAttribute("name"))&&(-1===["radio","checkbox"].indexOf(e.getAttribute("type"))||(c.push(e.getAttribute("name")),!1))})).forEach(function(e,t,o){"submit"!==e.getAttribute("type")&&null!==e.getAttribute("name")&&"ct_checkjs"!==e.getAttribute("name")&&("none"!==getComputedStyle(e).display&&"hidden"!==getComputedStyle(e).visibility&&"0"!==getComputedStyle(e).opacity&&"hidden"!==e.getAttribute("type")||e.classList.contains("wp-editor-area")?(n+=" "+e.getAttribute("name"),i++):(a+=" "+e.getAttribute("name"),r++))}),a=a.trim(),{visible_fields:n=n.trim(),visible_fields_count:i,invisible_fields:a,invisible_fields_count:r}}function apbct_visible_fields_set_cookie(e,t){var o="object"===_typeof(e)&&null!==e?e:{};if("native"===ctPublic.data__cookies_type)for(var n in o){if(10<n)return;ctSetCookie("apbct_visible_fields_"+(void 0!==t?t:n),JSON.stringify(o[n]))}else"none"===ctPublic.data__cookies_type?ctSetCookie("apbct_visible_fields",JSON.stringify(o[0])):ctSetCookie("apbct_visible_fields",JSON.stringify(o))}function apbct_js_keys__set_input_value(e,t,o,n){if(0<document.querySelectorAll("[name^=ct_checkjs]").length)for(var i=document.querySelectorAll("[name^=ct_checkjs]"),a=0;a<i.length;a++)i[a].value=e.js_key}function apbctGetScreenInfo(){return JSON.stringify({fullWidth:document.documentElement.scrollWidth,fullHeight:Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight),visibleWidth:document.documentElement.clientWidth,visibleHeight:document.documentElement.clientHeight})}function ctParseBlockMessage(e){void 0!==e.apbct&&(e=e.apbct).blocked&&(document.dispatchEvent(new CustomEvent("apbctAjaxBockAlert",{bubbles:!0,detail:{message:e.comment}})),cleantalkModal.loaded=e.comment,cleantalkModal.open(),1==+e.stop_script&&window.stop())}function ctSetPixelUrlLocalstorage(e){ctSetCookie("apbct_pixel_url",e)}function ctNoCookieConstructHiddenField(e){var t="hidden",e=("submit"===e&&(t="submit"),""),o=apbctLocalStorage.getCleanTalkData(),o=JSON.stringify(o);return o=btoa(o),(e=document.createElement("input")).setAttribute("id","ct_no_cookie_hidden_field"),e.setAttribute("name","ct_no_cookie_hidden_field"),e.setAttribute("value",o),e.setAttribute("type",t),e.classList.add("apbct_special_field"),e}function ctNoCookieGetForms(){var e=document.forms;return e||!1}function ctNoCookieAttachHiddenFieldsToForms(){if("none"===ctPublic.data__cookies_type){var e=ctNoCookieGetForms();if(e){var t=document.getElementsByName("ct_no_cookie_hidden_field");if(t)for(var o=0;o<t.length;o++)t[o].parentNode.removeChild(t[o]);for(var n=0;n<e.length;n++)null!==document.forms[n].getAttribute("method")&&"post"!==document.forms[n].getAttribute("method").toLowerCase()||document.forms[n].append(ctNoCookieConstructHiddenField()),"searchform"===document.forms[n].getAttribute("id")&&document.forms[n].append(ctNoCookieConstructHiddenField("submit"))}}}ctPublic.data__key_is_ok&&(apbct_attach_event_handler(document,"mousemove",ctFunctionMouseMove),apbct_attach_event_handler(document,"mousedown",ctFunctionFirstKey),apbct_attach_event_handler(document,"keydown",ctFunctionFirstKey),apbct_attach_event_handler(document,"scroll",ctSetHasScrolled)),ctPublic.data__key_is_ok&&("loading"!==document.readyState?apbct_ready():apbct_attach_event_handler(document,"DOMContentLoaded",apbct_ready)),"undefined"!=typeof jQuery&&jQuery(document).ajaxComplete(function(e,t,o){if(t.responseText&&-1!==t.responseText.indexOf('"apbct')){try{var n=JSON.parse(t.responseText)}catch(e){return void console.log(e.toString())}ctParseBlockMessage(n)}});var cleantalkModal={loaded:!1,loading:!1,opened:!1,opening:!1,load:function(e){var t;this.loaded||(this.loading=!0,t=function(e,t,o,n){cleantalkModal.loading=!1,cleantalkModal.loaded=e,document.dispatchEvent(new CustomEvent("cleantalkModalContentLoaded",{bubbles:!0}))},("function"==typeof apbct_admin_sendAJAX?apbct_admin_sendAJAX:apbct_public_sendAJAX)({action:e},{callback:t,notJson:!0}))},open:function(){function e(){var e,t="";for(e in this.styles)t+=e+":"+this.styles[e]+";";return t}var t={styles:{"z-index":"9999",position:"fixed",top:"0",left:"0",width:"100%",height:"100%",background:"rgba(0,0,0,0.5)",display:"flex","justify-content":"center","align-items":"center"},toString:e},o={styles:{position:"relative",padding:"30px",background:"#FFF",border:"1px solid rgba(0,0,0,0.75)","border-radius":"4px","box-shadow":"7px 7px 5px 0px rgba(50,50,50,0.75)"},toString:e},n={styles:{position:"absolute",background:"#FFF",width:"20px",height:"20px",border:"2px solid rgba(0,0,0,0.75)","border-radius":"15px",cursor:"pointer",top:"-8px",right:"-8px","box-sizing":"content-box"},toString:e},i={styles:{content:'""',display:"block",position:"absolute",background:"#000","border-radius":"1px",width:"2px",height:"16px",top:"2px",left:"9px",transform:"rotate(45deg)"},toString:e},a={styles:{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},c=document.createElement("style"),r=(c.setAttribute("id","cleantalk-modal-styles"),c.innerHTML="body.cleantalk-modal-opened{"+r+"}",c.innerHTML+="#cleantalk-modal-overlay{"+t+"}",c.innerHTML+="#cleantalk-modal-close{"+n+"}",c.innerHTML+="#cleantalk-modal-close:before{"+i+"}",c.innerHTML+="#cleantalk-modal-close:after{"+a+"}",document.body.append(c),document.createElement("div")),t=(r.setAttribute("id","cleantalk-modal-overlay"),document.body.append(r),document.body.classList.add("cleantalk-modal-opened"),document.createElement("div")),n=(t.setAttribute("id","cleantalk-modal-inner"),t.setAttribute("style",o),r.append(t),document.createElement("div")),i=(n.setAttribute("id","cleantalk-modal-close"),t.append(n),document.createElement("div"));this.loaded?/.*\/inc/g.test(this.loaded)?i.innerHTML=this.loaded:(a=this.loaded.replace(/(https?:\/\/[^\s]+)/g,'<a href="$1" target="_blank">$1</a>'),i.innerHTML=a):(i.innerHTML="Loading...",this.load("get_options_template")),i.setAttribute("id","cleantalk-modal-content"),t.append(i),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}))}},buttons_to_handle=(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)}),[]);function apbct_gdpr_handle_buttons(){try{buttons_to_handle!==[]&&buttons_to_handle.forEach(function(e){var t='[id="apbct_gdpr_'+e.index+'"]',t=jQuery(t);jQuery(t).prop("checked")?(e.button.disabled=!1,jQuery(e.button).prop("title",e.old_notice)):(e.button.disabled=!0,jQuery(e.button).prop("title",gdpr_notice_for_button))})}catch(e){console.info("APBCT GDPR JS ERROR: Can not handle form buttons "+e)}}function ct_protect_external(){for(var e,t,o=0;o<document.forms.length;o++)void 0!==document.forms[o].cleantalk_hidden_action||void 0!==document.forms[o].cleantalk_hidden_method||"string"==typeof(e=document.forms[o]).action&&(isIntegratedForm(e)?apbctProcessExternalForm(e,o,document):-1===e.action.indexOf("http://")&&-1===e.action.indexOf("https://")||e.action.split("//")[1].split("/")[0].toLowerCase()!==location.hostname.toLowerCase()&&((t=document.createElement("input")).name="cleantalk_hidden_action",t.value=e.action,t.type="hidden",e.appendChild(t),(t=document.createElement("input")).name="cleantalk_hidden_method",t.value=e.method,t.type="hidden",e.method="POST",e.appendChild(t),e.action=document.location));apbctProcessIframes()}function formIsExclusion(t){var o=!1;return t.parentElement&&0<t.parentElement.classList.length&&-1!==t.parentElement.classList[0].indexOf("mewtwo")&&(o=!0),["give-form"].forEach(function(e){void 0!==t.id&&-1!==t.id.indexOf(e)&&(o=!0)}),o}function apbctProcessIframes(){var e=document.getElementsByTagName("iframe");if(0<e.length)for(var t=0;t<e.length;t++)if(null!=e[t].contentDocument){var o=e[t].contentDocument.forms;if(0===o.length)return;for(var n=0;n<o.length;n++)apbctProcessExternalForm(o[n],n,e[t].contentDocument)}}function apbctProcessExternalForm(e,n,i){var t,o,a,r,c;formIsExclusion(e)||((t=document.createElement("i")).className="cleantalk_placeholder",t.style="display: none",e.parentElement.insertBefore(t,e),t=e.previousSibling,a=e.outerHTML,(o=e).parentElement.removeChild(e),(e=document.createElement("div")).innerHTML=a,t.after(e.firstElementChild),(a=document.createElement("input")).name="action",a.value="cleantalk_force_ajax_check",a.type="hidden",(r=i.forms[n]).appendChild(a),r.apbctPrev=t,r.apbctFormOriginal=o,c=!1,void 0!==r.classList&&["newsletterform","ml-block-form"].forEach(function(e){r.classList.contains(e)&&(c=e)}),c?void 0!==(e=jQuery("form."+c).find('button[type="submit"]'))&&e.click(function(e){e.preventDefault(),sendAjaxCheckingFormData(e.currentTarget)}):i.forms[n].onsubmit=function(e){var t,o;e.preventDefault(),-1!==i.forms[n].id.indexOf("mauticform")&&0<(t=jQuery(i.forms[n]).find('input[id*="checkbox_rgpd"]')).length&&!0===t.prop("checked")&&0<(o=jQuery(".cleantalk_placeholder")).length&&o[0].setAttribute("mautic_hidden_gdpr_id",t.prop("id")),jQuery(e.currentTarget).prev(),jQuery(e.currentTarget).clone();sendAjaxCheckingFormData(e.currentTarget)})}function apbct_replace_inputs_values_from_other_form(e,t){var e=jQuery(e).find("button, input, textarea, select"),o=jQuery(t).find("button, input, textarea, select");e.each(function(e,n){var i=jQuery(n);o.each(function(e,t){var o=jQuery(t);n.outerHTML===t.outerHTML&&o.val(i.val())})})}function isIntegratedForm(e){var t=e.action,o=e.id;return!!(-1!==t.indexOf("activehosted.com")||-1!==t.indexOf("app.convertkit.com")||void 0!==e.firstChild.classList&&e.firstChild.classList.contains("cb-form-group")||-1!==t.indexOf("mailerlite.com")||-1!==t.indexOf("colcolmail.co.uk")||-1!==t.indexOf("paypal.com")||-1!==t.indexOf("infusionsoft.com")||-1!==t.indexOf("webto.salesforce.com")||-1!==t.indexOf("secure2.convio.net")||-1!==t.indexOf("hookb.in")||-1!==t.indexOf("external.url")||-1!==t.indexOf("tp.media")||-1!==t.indexOf("flodesk.com")||-1!==t.indexOf("sendfox.com")||-1!==t.indexOf("aweber.com")||-1!==t.indexOf("secure.payu.com")||-1!==t.indexOf("mautic")||-1!==o.indexOf("mauticform_"))}function sendAjaxCheckingFormData(d,e,t){var o={},n=(o[0]=apbct_collect_visible_fields(d),apbct_visible_fields_set_cookie(o),{}),o=d.elements;(o=Array.prototype.slice.call(o)).forEach(function(e,t){""===e.name?n["input_"+t]=e.value:n[e.name]=e.value}),apbct_public_sendAJAX(n,{async:!1,callback:function(e,t,o,n){if(void 0===e.apbct||!+e.apbct.blocked){var i=jQuery(d).detach(),a=d.apbctPrev,r=d.apbctFormOriginal,c=!1,l=(apbct_replace_inputs_values_from_other_form(i,r),-1!==r.id.indexOf("mautic")&&(c=!0),document.getElementsByClassName("cleantalk_placeholder"));if(l)for(var s=0;s<l.length;s++){var u=l[s].getAttribute("mautic_hidden_gdpr_id");void 0===u||void 0!==(u=jQuery(r).find("#"+u))&&u.prop("checked",!0)}a.after(r),jQuery(r).find('input[name="apbct_visible_fields"]').remove(),jQuery(r).find('input[value="cleantalk_force_ajax_check"]').remove();i=jQuery(r).find("button[type=submit]");if(0!==i.length)return i[0].click(),void(c&&setTimeout(function(){ct_protect_external()},1500));if(0!==(i=jQuery(r).find("input[type=submit]")).length)return void i[0].click();if(0!==(i=jQuery(r).find('button[data-element="submit"]')).length)return void i[0].click();0!==(i=jQuery(r).find('input[type="image"][name="submit"]')).length&&i[0].click()}void 0!==e.apbct&&+e.apbct.blocked&&ctParseBlockMessage(e)}})}function ct_check_internal(t){var e,o={},n=t.elements;for(e in n)"submit"!=n[e].type&&null!=n[e].value&&""!=n[e].value&&(o[n[e].name]=t.elements[e].value);o.action="ct_check_internal",apbct_public_sendAJAX(o,{url:ctPublicFunctions._ajax_url,callback:function(e){if(!0!==e.success)return alert(e.data),!1;t.submit()}})}function ct_check_internal__is_exclude_form(t){return["wp-login.php","wp-comments-post.php"].some(function(e){return null!==t.match(new RegExp(ctPublic.blog_home+".*"+e))})}document.addEventListener("DOMContentLoaded",function(){if("undefined"!=typeof ctPublicGDPR&&ctPublicGDPR.gdpr_forms.length){var i=ctPublicGDPR.gdpr_title;if("undefined"!=typeof jQuery)try{ctPublicGDPR.gdpr_forms.forEach(function(e,t){var o=jQuery("#"+e+", ."+e),e=(o.is("form")||(o.find("form")[0]?o=o.children("form").first():jQuery(".wpcf7[role=form]")[0]&&-1!==jQuery(".wpcf7[role=form]").attr("id").indexOf("wpcf7-f"+e)?o=jQuery(".wpcf7[role=form]").children("form"):jQuery(".frm_forms")[0]&&-1!==jQuery(".frm_forms").first().attr("id").indexOf("frm_form_"+e)?o=jQuery(".frm_forms").first().children("form"):jQuery(".wpforms-form")[0]&&-1!==jQuery(".wpforms-form").first().attr("id").indexOf("wpforms-form-"+e)&&(o=jQuery(".wpforms-form"))),!1),n=o.find('input[type|="submit"],button[type|="submit"]');n.length&&(!1!==(e=n[0])&&(e.disabled=!0,n=jQuery(e).prop("title")?jQuery(e).prop("title"):"",buttons_to_handle.push({index:t,button:e,old_notice:n}),jQuery(e).prop("title",i)),!o.is("form")&&"form"!==o.attr("role")||o.append('<input id="apbct_gdpr_'+t+'" type="checkbox" required="required" style=" margin-right: 10px;" onchange="apbct_gdpr_handle_buttons()">').append('<label style="display: inline;" for="apbct_gdpr_'+t+'">'+ctPublicGDPR.gdpr_text+"</label>"))})}catch(e){console.info("APBCT GDPR JS ERROR: Can not add GDPR notice"+e)}}}),window.onload=function(){+ctPublic.settings__forms__check_external&&"undefined"!=typeof jQuery&&setTimeout(function(){ct_protect_external()},1500)},document.addEventListener("DOMContentLoaded",function(){var e,t="";if(+ctPublic.settings__forms__check_internal)for(var o=0;o<document.forms.length;o++)"string"!=typeof document.forms[o].action||null===(t=(e=document.forms[o]).action).indexOf("https?://")||null===t.match(ctPublic.blog_home+".*?.php")||ct_check_internal__is_exclude_form(t)||(e.click,"undefined"!=typeof jQuery&&(jQuery(e).off("**"),jQuery(e).off(),jQuery(e).on("submit",function(e){return ct_check_internal(e.target),!1})))});
js/apbct-public-bundle.min.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"apbct-public-bundle.min.js","sources":["apbct-public-bundle.js"],"sourcesContent":["class ApbctCore{\n\n ajax_parameters = {};\n rest_parameters = {};\n\n selector = null;\n elements = [];\n\n // Event properties\n eventCallback;\n eventSelector;\n event;\n\n /**\n * Default constructor\n */\n constructor(selector){\n this.select(selector);\n }\n\n /**\n * Get elements by CSS selector\n *\n * @param selector\n * @returns {*}\n */\n select(selector) {\n\n if(selector instanceof HTMLCollection){\n this.selector = null;\n this.elements = [];\n this.elements = Array.prototype.slice.call(selector);\n }else if( typeof selector === 'object' ){\n this.selector = null;\n this.elements = [];\n this.elements[0] = selector;\n }else if( typeof selector === 'string' ){\n this.selector = selector;\n this.elements = Array.prototype.slice.call(document.querySelectorAll(selector));\n // this.elements = document.querySelectorAll(selector)[0];\n }else{\n this.deselect();\n }\n\n return this;\n }\n\n addElement(elemToAdd){\n if( typeof elemToAdd === 'object' ){\n this.elements.push(elemToAdd);\n }else if( typeof elemToAdd === 'string' ){\n this.selector = elemToAdd;\n this.elements = Array.prototype.slice.call(document.querySelectorAll(elemToAdd));\n }else{\n this.deselect();\n }\n }\n\n push(elem){\n this.elements.push(elem);\n }\n\n reduce(){\n this.elements = this.elements.slice(0,-1);\n }\n\n deselect(){\n this.elements = [];\n }\n\n /**\n * Set or get CSS for/of currently selected element\n *\n * @param style\n * @param getRaw\n *\n * @returns {boolean|*}\n */\n css(style, getRaw){\n\n getRaw = getRaw | false;\n\n // Set style\n if(typeof style === \"object\"){\n\n const stringToCamelCase = str =>\n str.replace(/([-_][a-z])/g, group =>\n group\n .toUpperCase()\n .replace('-', '')\n .replace('_', '')\n );\n\n // Apply multiple styles\n for(let style_name in style){\n let DOM_style_name = stringToCamelCase(style_name);\n\n // Apply to multiple elements (currently selected)\n for(let i=0; i<this.elements.length; i++){\n this.elements[i].style[DOM_style_name] = style[style_name];\n }\n }\n\n return this;\n }\n\n // Get style of first currently selected element\n if(typeof style === 'string'){\n\n let computedStyle = getComputedStyle(this.elements[0])[style];\n\n // Process\n if( typeof computedStyle !== 'undefined' && ! getRaw){\n computedStyle = computedStyle.replace(/(\\d)(em|pt|%|px){1,2}$/, '$1'); // Cut of units\n computedStyle = Number(computedStyle) == computedStyle ? Number(computedStyle) : computedStyle; // Cast to INT\n return computedStyle;\n }\n\n // Return unprocessed\n return computedStyle;\n }\n }\n\n hide(){\n this.prop('prev-display', this.css('display'));\n this.css({'display': 'none'});\n }\n\n show(){\n this.css({'display': this.prop('prev-display')});\n }\n\n addClass(){\n for(let i=0; i<this.elements.length; i++){\n this.elements[i].classList.add(className);\n }\n }\n\n removeClass(){\n for(let i=0; i<this.elements.length; i++){\n this.elements[i].classList.remove(className);\n }\n }\n\n toggleClass(className){\n for(let i=0; i<this.elements.length; i++){\n this.elements[i].classList.toggle(className);\n }\n }\n\n /**\n * Wrapper for apbctAJAX class\n *\n * @param ajax_parameters\n * @returns {ApbctAjax}\n */\n ajax(ajax_parameters){\n this.ajax_parameters = ajax_parameters;\n return new ApbctAjax(ajax_parameters);\n }\n\n /**\n * Wrapper for apbctREST class\n *\n * @param rest_parameters\n * @returns {ApbctRest}\n */\n rest(rest_parameters){\n this.rest_parameters = rest_parameters;\n return new ApbctRest(rest_parameters);\n }\n\n /************** EVENTS **************/\n\n /**\n *\n * Why the mess with arguments?\n *\n * Because we need to support the following function signatures:\n * on('click', function(){ alert('some'); });\n * on('click', 'inner_selector', function(){ alert('some'); });\n *\n * @param args\n */\n on(...args){\n\n this.event = args[0];\n this.eventCallback = args[2] || args[1];\n this.eventSelector = typeof args[1] === \"string\" ? args[1] : null;\n\n for(let i=0; i<this.elements.length; i++){\n this.elements[i].addEventListener(\n this.event,\n this.eventSelector !== null\n ? this.onChecker.bind(this)\n : this.eventCallback\n );\n }\n }\n\n /**\n * Check if a selector of an event matches current target\n *\n * @param event\n * @returns {*}\n */\n onChecker(event){\n if(event.target === document.querySelector(this.eventSelector)){\n event.stopPropagation();\n return this.eventCallback(event);\n }\n }\n\n ready(callback){\n document.addEventListener('DOMContentLoaded', callback);\n }\n\n change(callback){\n this.on('change', callback);\n }\n\n /************** ATTRIBUTES **************/\n\n /**\n * Get an attribute or property of an element\n *\n * @param attrName\n * @returns {*|*[]}\n */\n attr(attrName){\n\n let outputValue = [];\n\n for(let i=0; i<this.elements.length; i++){\n\n // Use property instead of attribute if possible\n if(typeof this.elements[i][attrName] !== undefined){\n outputValue.push(this.elements[i][attrName]);\n }else{\n outputValue.push(this.elements[i].getAttribute(attrName));\n }\n }\n\n // Return a single value instead of array if only one value is present\n return outputValue.length === 1 ? outputValue[0] : outputValue;\n }\n\n prop(propName, value){\n\n // Setting values\n if(typeof value !== \"undefined\"){\n for(let i=0; i<this.elements.length; i++){\n this.elements[i][propName] = value;\n }\n\n return this;\n\n // Getting values\n }else{\n\n let outputValue = [];\n\n for(let i=0; i<this.elements.length; i++){\n outputValue.push(this.elements[i][propName]);\n }\n\n // Return a single value instead of array if only one value is present\n return outputValue.length === 1 ? outputValue[0] : outputValue;\n }\n }\n\n /**\n * Set or get inner HTML\n *\n * @param value\n * @returns {*|*[]}\n */\n html(value){\n return typeof value !== 'undefined'\n ? this.prop('innerHTML', value)\n : this.prop('innerHTML');\n }\n\n /**\n * Set or get value of input tags\n *\n * @param value\n * @returns {*|*[]|undefined}\n */\n val(value){\n return typeof value !== 'undefined'\n ? this.prop('value', value)\n : this.prop('value');\n }\n\n data(name, value){\n return typeof value !== 'undefined'\n ? this.prop('apbct-data', name, value)\n : this.prop('apbct-data');\n }\n\n /************** END OF ATTRIBUTES **************/\n\n /************** FILTERS **************/\n\n /**\n * Check if the current elements are corresponding to filter\n *\n * @param filter\n * @returns {boolean}\n */\n is(filter){\n\n let outputValue = false;\n\n for(let elem of this.elements){\n outputValue ||= this.isElem(elem, filter);\n }\n\n return outputValue;\n }\n\n isElem(elemToCheck, filter){\n\n let is = false;\n let isRegisteredTagName = function(name){\n let newlyCreatedElement = document.createElement(name).constructor;\n return ! Boolean( ~[HTMLElement, HTMLUnknownElement].indexOf(newlyCreatedElement) );\n };\n\n // Check for filter function\n if(typeof filter === 'function') {\n is ||= filter.call(this, elemToCheck);\n }\n\n // Check for filter function\n if(typeof filter === 'string') {\n\n // Filter is tag name\n if( filter.match(/^[a-z]/) && isRegisteredTagName(filter) ){\n is ||= elemToCheck.tagName.toLowerCase() === filter.toLowerCase();\n\n // Filter is property\n }else if( filter.match(/^[a-z]/) ){\n is ||= Boolean(elemToCheck[filter]);\n\n // Filter is CSS selector\n }else {\n is ||= this.selector !== null\n ? document.querySelector(this.selector + filter) !== null // If possible\n : this.isWithoutSelector(elemToCheck, filter); // Search through all elems with such selector\n }\n }\n\n return is;\n }\n\n isWithoutSelector(elemToCheck, filter){\n\n let elems = document.querySelectorAll(filter);\n let outputValue = false;\n\n for(let elem of elems){\n outputValue ||= elemToCheck === elem;\n }\n\n return outputValue;\n }\n\n filter(filter){\n\n this.selector = null;\n\n for( let i = this.elements.length - 1; i >= 0; i-- ){\n if( ! this.isElem(this.elements[i], filter) ){\n this.elements.splice(Number(i), 1);\n }\n }\n\n return this;\n }\n\n /************** NODES **************/\n\n parent(filter){\n\n this.select(this.elements[0].parentElement);\n\n if( typeof filter !== 'undefined' && ! this.is(filter) ){\n this.deselect();\n }\n\n return this;\n }\n\n parents(filter){\n\n this.select(this.elements[0]);\n\n for ( ; this.elements[ this.elements.length - 1].parentElement !== null ; ) {\n this.push(this.elements[ this.elements.length - 1].parentElement);\n }\n\n this.elements.splice(0,1); // Deleting initial element from the set\n\n if( typeof filter !== 'undefined' ){\n this.filter(filter);\n }\n\n return this;\n }\n\n children(filter){\n\n this.select(this.elements[0].children);\n\n if( typeof filter !== 'undefined' ){\n this.filter(filter);\n }\n\n return this;\n }\n\n siblings(filter){\n\n let current = this.elements[0]; // Remember current to delete it later\n\n this.parent();\n this.children(filter);\n this.elements.splice(this.elements.indexOf(current), 1); // Remove current element\n\n return this;\n }\n\n /************** DOM MANIPULATIONS **************/\n remove(){\n for(let elem of this.elements){\n elem.remove();\n }\n }\n\n after(content){\n for(let elem of this.elements){\n elem.after(content);\n }\n }\n\n append(content){\n for(let elem of this.elements){\n elem.append(content);\n }\n }\n\n /************** ANIMATION **************/\n fadeIn(time) {\n for(let elem of this.elements){\n elem.style.opacity = 0;\n elem.style.display = 'block';\n\n let last = +new Date();\n const tick = function () {\n elem.style.opacity = +elem.style.opacity + (new Date() - last) / time;\n last = +new Date();\n\n if (+elem.style.opacity < 1) {\n (window.requestAnimationFrame && requestAnimationFrame(tick)) || setTimeout(tick, 16);\n }\n };\n\n tick();\n }\n }\n\n fadeOut(time) {\n for(let elem of this.elements){\n elem.style.opacity = 1;\n\n let last = +new Date();\n const tick = function () {\n elem.style.opacity = +elem.style.opacity - (new Date() - last) / time;\n last = +new Date();\n\n if (+elem.style.opacity > 0) {\n (window.requestAnimationFrame && requestAnimationFrame(tick)) || setTimeout(tick, 16);\n } else {\n elem.style.display = 'none';\n }\n };\n\n tick();\n }\n }\n}\n\n/**\n * Hack\n *\n * Make a proxy to keep both properties and methods from:\n * - the native object and\n * - the new one from ApbctCore for selected element.\n *\n * For example:\n * apbct('#id).innerHTML = 'some';\n * apbct('#id).css({'backgorund-color': 'black'});\n */\n// apbct = new Proxy(\n// apbct,\n// {\n// get(target, prop) {\n// if (target.elements.length) {\n// return target.elements[0][prop];\n// } else {\n// return null;\n// }\n// },\n// set(target, prop, value){\n// if (target.elements.length) {\n// target.elements[0][prop] = value;\n// return true;\n// } else {\n// return false;\n// }\n// },\n// apply(target, thisArg, argArray) {\n//\n// }\n// }\n// );\n\n/**\n * Enter point to ApbctCore class\n *\n * @param params\n * @returns {*}\n */\nfunction apbct(params){\n return new ApbctCore()\n .select(params);\n}\nclass ApbctXhr{\n\n xhr = new XMLHttpRequest();\n\n // Base parameters\n method = 'POST'; // HTTP-request type\n url = ''; // URL to send the request\n async = true;\n user = null; // HTTP-authorization username\n password = null; // HTTP-authorization password\n data = {}; // Data to send\n\n\n // Optional params\n button = null; // Button that should be disabled when request is performing\n spinner = null; // Spinner that should appear when request is in process\n progressbar = null; // Progress bar for the current request\n context = this; // Context\n callback = null;\n onErrorCallback = null;\n\n responseType = 'json'; // Expected data type from server\n headers = {};\n timeout = 15000; // Request timeout in milliseconds\n\n methods_to_convert_data_to_URL = [\n 'GET',\n 'HEAD',\n ];\n\n body = null;\n http_code = 0;\n status_text = '';\n\n constructor(parameters){\n\n console.log('%cXHR%c started', 'color: red; font-weight: bold;', 'color: grey; font-weight: normal;');\n\n // Set class properties\n for( let key in parameters ){\n if( typeof this[key] !== 'undefined' ){\n this[key] = parameters[key];\n }\n }\n\n // Modifying DOM-elements\n this.prepare();\n\n // Modify URL with data for GET and HEAD requests\n if ( Object.keys(this.data).length ) {\n this.deleteDoubleJSONEncoding(this.data);\n this.convertData();\n }\n\n if( ! this.url ){\n console.log('%cXHR%c not URL provided', 'color: red; font-weight: bold;', 'color: grey; font-weight: normal;')\n return false;\n }\n\n // Configure the request\n this.xhr.open(this.method, this.url, this.async, this.user, this.password);\n this.setHeaders();\n\n this.xhr.responseType = this.responseType;\n this.xhr.timeout = this.timeout;\n\n /* EVENTS */\n // Monitoring status\n this.xhr.onreadystatechange = function(){\n this.onReadyStateChange();\n }.bind(this);\n\n // Run callback\n this.xhr.onload = function(){\n this.onLoad();\n }.bind(this);\n\n // On progress\n this.xhr.onprogress = function(event){\n this.onProgress(event);\n }.bind(this);\n\n // On error\n this.xhr.onerror = function(){\n this.onError();\n }.bind(this);\n\n this.xhr.ontimeout = function(){\n this.onTimeout();\n }.bind(this);\n\n // Send the request\n this.xhr.send(this.body);\n }\n\n prepare(){\n\n // Disable button\n if(this.button){\n this.button.setAttribute('disabled', 'disabled');\n this.button.style.cursor = 'not-allowed';\n }\n\n // Enable spinner\n if(this.spinner) {\n this.spinner.style.display = 'inline';\n }\n }\n\n complete(){\n\n this.http_code = this.xhr.status;\n this.status_text = this.xhr.statusText;\n\n // Disable button\n if(this.button){\n this.button.removeAttribute('disabled');\n this.button.style.cursor = 'auto';\n }\n\n // Enable spinner\n if(this.spinner) {\n this.spinner.style.display = 'none';\n }\n\n if( this.progressbar ) {\n this.progressbar.fadeOut('slow');\n }\n }\n\n onReadyStateChange(){\n if (this.on_ready_state_change !== null && typeof this.on_ready_state_change === 'function'){\n this.on_ready_state_change();\n }\n }\n\n onProgress(event) {\n if (this.on_progress !== null && typeof this.on_progress === 'function'){\n this.on_progress();\n }\n }\n\n onError(){\n\n console.log('error');\n\n this.complete();\n this.error(\n this.http_code,\n this.status_text\n );\n\n if (this.onErrorCallback !== null && typeof this.onErrorCallback === 'function'){\n this.onErrorCallback(this.status_text);\n }\n }\n\n onTimeout(){\n this.complete();\n this.error(\n 0,\n 'timeout'\n );\n\n if (this.onErrorCallback !== null && typeof this.onErrorCallback === 'function'){\n this.onErrorCallback('Timeout');\n }\n }\n\n onLoad(){\n\n this.complete();\n\n if (this.responseType === 'json' ){\n if(this.xhr.response === null){\n this.error(this.http_code, this.status_text, 'No response');\n return false;\n }else if( typeof this.xhr.response.error !== 'undefined') {\n this.error(this.http_code, this.status_text, this.xhr.response.error);\n return false;\n }\n }\n\n if (this.callback !== null && typeof this.callback === 'function') {\n this.callback.call(this.context, this.xhr.response, this.data);\n }\n }\n\n error(http_code, status_text, additional_msg){\n\n let error_string = '';\n\n if( status_text === 'timeout' ){\n error_string += 'Server response timeout'\n\n }else if( http_code === 200 ){\n\n if( status_text === 'parsererror' ){\n error_string += 'Unexpected response from server. See console for details.';\n }else {\n error_string += 'Unexpected error. Status: ' + status_text + '.';\n if( typeof additional_msg !== 'undefined' )\n error_string += ' Additional error info: ' + additional_msg;\n }\n\n }else if(http_code === 500){\n error_string += 'Internal server error.';\n\n }else {\n error_string += 'Unexpected response code:' + http_code;\n }\n\n this.errorOutput( error_string );\n }\n\n errorOutput(error_msg){\n console.log( '%c ctXHR error: %c' + error_msg, 'color: red;', 'color: grey;' );\n }\n\n setHeaders(){\n // Set headers if passed\n for( let header_name in this.headers ){\n if( typeof this.headers[header_name] !== 'undefined' ){\n this.xhr.setRequestHeader(header_name, this.headers[header_name]);\n }\n }\n }\n\n convertData()\n {\n // GET, HEAD request-type\n if( ~this.methods_to_convert_data_to_URL.indexOf( this.method ) ){\n return this.convertDataToURL();\n\n // POST request-type\n }else{\n return this.convertDataToBody()\n }\n }\n\n convertDataToURL(){\n let params_appendix = new URLSearchParams(this.data).toString();\n let params_prefix = this.url.match(/^(https?:\\/{2})?[a-z0-9.]+\\?/) ? '&' : '?';\n this.url += params_prefix + params_appendix;\n\n return this.url;\n }\n\n /**\n *\n * @returns {null}\n */\n convertDataToBody()\n {\n this.body = new FormData();\n\n for (let dataKey in this.data) {\n this.body.append(\n dataKey,\n typeof this.data[dataKey] === 'object'\n ? JSON.stringify(this.data[dataKey])\n : this.data[dataKey]\n );\n }\n\n return this.body;\n }\n\n /**\n * Recursive\n *\n * Recursively decode JSON-encoded properties\n *\n * @param object\n * @returns {*}\n */\n deleteDoubleJSONEncoding(object){\n\n if( typeof object === 'object'){\n\n for (let objectKey in object) {\n\n // Recursion\n if( typeof object[objectKey] === 'object'){\n object[objectKey] = this.deleteDoubleJSONEncoding(object[objectKey]);\n }\n\n // Common case (out)\n if(\n typeof object[objectKey] === 'string' &&\n object[objectKey].match(/^[\\[{].*?[\\]}]$/) !== null // is like JSON\n ){\n let parsedValue = JSON.parse(object[objectKey]);\n if( typeof parsedValue === 'object' ){\n object[objectKey] = parsedValue;\n }\n }\n }\n }\n\n return object;\n }\n}\nclass ApbctAjax extends ApbctXhr{\n\n constructor(...args) {\n super(args[0]);\n }\n}\nclass ApbctRest extends ApbctXhr{\n\n static default_route = ctPublicFunctions._rest_url + 'cleantalk-antispam/v1/';\n route = '';\n\n constructor(...args) {\n args = args[0];\n args.url = ApbctRest.default_route + args.route;\n args.headers = {\n \"X-WP-Nonce\": ctPublicFunctions._rest_nonce\n };\n super(args);\n }\n}\n\nfunction ctSetCookie( cookies, value, expires ){\n\n let force_alternative_method_for_cookies = [\n 'ct_sfw_pass_key',\n 'ct_sfw_passed',\n 'wordpress_apbct_antibot',\n 'apbct_anticrawler_passed',\n 'apbct_antiflood_passed',\n 'apbct_email_encoder_passed'\n ]\n\n if( typeof cookies === 'string' && typeof value === 'string' || typeof value === 'number'){\n var skip_alt = cookies === 'ct_pointer_data';\n cookies = [ [ cookies, value, expires ] ];\n }\n\n // Cookies disabled\n if( ctPublicFunctions.data__cookies_type === 'none' ){\n let forced_alt_cookies_set = []\n cookies.forEach( function (item, i, arr\t) {\n if (force_alternative_method_for_cookies.indexOf(item[0]) !== -1) {\n forced_alt_cookies_set.push(item)\n } else {\n apbctLocalStorage.set(item[0], encodeURIComponent(item[1]))\n }\n });\n if ( forced_alt_cookies_set.length > 0 ){\n ctSetAlternativeCookie(forced_alt_cookies_set)\n }\n ctNoCookieAttachHiddenFieldsToForms()\n // Using traditional cookies\n }else if( ctPublicFunctions.data__cookies_type === 'native' ){\n cookies.forEach( function (item, i, arr\t) {\n var expires = typeof item[2] !== 'undefined' ? \"expires=\" + expires + '; ' : '';\n var ctSecure = location.protocol === 'https:' ? '; secure' : '';\n document.cookie = ctPublicFunctions.cookiePrefix + item[0] + \"=\" + encodeURIComponent(item[1]) + \"; \" + expires + \"path=/; samesite=lax\" + ctSecure;\n });\n\n // Using alternative cookies\n }else if( ctPublicFunctions.data__cookies_type === 'alternative' && ! skip_alt ) {\n ctSetAlternativeCookie(cookies)\n }\n}\n\nfunction ctSetAlternativeCookie(cookies){\n if (typeof (getJavascriptClientData) === \"function\"){\n //reprocess already gained cookies data\n cookies = getJavascriptClientData(cookies);\n } else {\n console.log('APBCT ERROR: getJavascriptClientData() is not loaded')\n }\n\n try {\n JSON.parse(cookies)\n } catch (e){\n console.log('APBCT ERROR: JSON parse error:' + e)\n return\n }\n\n // Using REST API handler\n if( ctPublicFunctions.data__ajax_type === 'rest' ){\n apbct_public_sendREST(\n 'alt_sessions',\n {\n method: 'POST',\n data: { cookies: cookies }\n }\n );\n\n // Using AJAX request and handler\n } else if( ctPublicFunctions.data__ajax_type === 'admin_ajax' ) {\n apbct_public_sendAJAX(\n {\n action: 'apbct_alt_session__save__AJAX',\n cookies: cookies,\n },\n {\n notJson: 1,\n }\n );\n }\n}\n\n/**\n * Get cookie by name\n * @param name\n * @returns {string|undefined}\n */\nfunction ctGetCookie(name) {\n var matches = document.cookie.match(new RegExp(\n \"(?:^|; )\" + name.replace(/([\\.$?*|{}\\(\\)\\[\\]\\\\\\/\\+^])/g, '\\\\$1') + \"=([^;]*)\"\n ));\n return matches ? decodeURIComponent(matches[1]) : undefined;\n}\n\nfunction ctDeleteCookie(cookieName) {\n // Cookies disabled\n if( ctPublicFunctions.data__cookies_type === 'none' ){\n return;\n\n // Using traditional cookies\n }else if( ctPublicFunctions.data__cookies_type === 'native' ){\n\n var ctSecure = location.protocol === 'https:' ? '; secure' : '';\n document.cookie = cookieName + \"=\\\"\\\"; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; samesite=lax\" + ctSecure;\n\n // Using alternative cookies\n }else if( ctPublicFunctions.data__cookies_type === 'alternative' ){\n // @ToDo implement this logic\n }\n}\n\nfunction apbct_public_sendAJAX(data, params, obj){\n\n // Default params\n let _params = [];\n _params[\"callback\"] = params.callback || null;\n _params[\"onErrorCallback\"] = params.onErrorCallback || null;\n _params[\"callback_context\"] = params.callback_context || null;\n _params[\"callback_params\"] = params.callback_params || null;\n _params[\"async\"] = params.async || true;\n _params[\"notJson\"] = params.notJson || null;\n _params[\"timeout\"] = params.timeout || 15000;\n _params[\"obj\"] = obj || null;\n _params[\"button\"] = params.button || null;\n _params[\"progressbar\"] = params.progressbar || null;\n _params[\"silent\"] = params.silent || null;\n _params[\"no_nonce\"] = params.no_nonce || null;\n _params[\"data\"] = data;\n _params[\"url\"] = ctPublicFunctions._ajax_url;\n\n if(typeof (data) === 'string') {\n if( ! _params[\"no_nonce\"] ) {\n _params[\"data\"] = _params[\"data\"] + '&_ajax_nonce=' + ctPublicFunctions._ajax_nonce;\n }\n _params[\"data\"] = _params[\"data\"] + '&no_cache=' + Math.random()\n } else {\n if( ! _params[\"no_nonce\"] ) {\n _params[\"data\"]._ajax_nonce = ctPublicFunctions._ajax_nonce;\n }\n _params[\"data\"].no_cache = Math.random();\n }\n\n new ApbctCore().ajax(_params);\n}\n\nfunction apbct_public_sendREST( route, params ) {\n\n let _params = [];\n _params[\"route\"] = route;\n _params[\"callback\"] = params.callback || null;\n _params[\"onErrorCallback\"] = params.onErrorCallback || null;\n _params[\"data\"] = params.data || [];\n _params[\"method\"] = params.method || 'POST';\n\n new ApbctCore().rest(_params);\n}\n\nlet apbctLocalStorage = {\n get : function(key, property) {\n if ( typeof property === 'undefined' ) {\n property = 'value';\n }\n const storageValue = localStorage.getItem(key);\n if ( storageValue !== null ) {\n try {\n const json = JSON.parse(storageValue);\n return json.hasOwnProperty(property) ? JSON.parse(json[property]) : json;\n } catch (e) {\n return storageValue;\n }\n }\n return false;\n },\n set : function(key, value, is_json = true) {\n if (is_json){\n let objToSave = {'value': JSON.stringify(value), 'timestamp': Math.floor(new Date().getTime() / 1000)};\n localStorage.setItem(key, JSON.stringify(objToSave));\n } else {\n localStorage.setItem(key, value);\n }\n },\n isAlive : function(key, maxLifetime) {\n if ( typeof maxLifetime === 'undefined' ) {\n maxLifetime = 86400;\n }\n const keyTimestamp = this.get(key, 'timestamp');\n return keyTimestamp + maxLifetime > Math.floor(new Date().getTime() / 1000);\n },\n isSet : function(key) {\n return localStorage.getItem(key) !== null;\n },\n delete : function (key) {\n localStorage.removeItem(key);\n },\n getCleanTalkData : function () {\n let data = {}\n for(let i=0; i<localStorage.length; i++) {\n let key = localStorage.key(i);\n if (key.indexOf('ct_') !==-1 || key.indexOf('apbct_') !==-1){\n data[key.toString()] = apbctLocalStorage.get(key)\n }\n }\n return data\n },\n\n}\nvar ct_date = new Date(),\n\tctTimeMs = new Date().getTime(),\n\tctMouseEventTimerFlag = true, //Reading interval flag\n\tctMouseData = [],\n\tctMouseDataCounter = 0,\n\tctCheckedEmails = {};\n\nfunction apbct_attach_event_handler(elem, event, callback){\n\tif(typeof window.addEventListener === \"function\") elem.addEventListener(event, callback);\n\telse elem.attachEvent(event, callback);\n}\n\nfunction apbct_remove_event_handler(elem, event, callback){\n\tif(typeof window.removeEventListener === \"function\") elem.removeEventListener(event, callback);\n\telse elem.detachEvent(event, callback);\n}\n\n//Writing first key press timestamp\nvar ctFunctionFirstKey = function output(event){\n\tvar KeyTimestamp = Math.floor(new Date().getTime()/1000);\n\tctSetCookie(\"ct_fkp_timestamp\", KeyTimestamp);\n\tctKeyStopStopListening();\n};\n\nif (ctPublic.data__key_is_ok) {\n\t//Reading interval\n\tvar ctMouseReadInterval = setInterval(function(){\n\t\tctMouseEventTimerFlag = true;\n\t}, 150);\n\n\t//Writting interval\n\tvar ctMouseWriteDataInterval = setInterval(function(){\n\t\tctSetCookie(\"ct_pointer_data\", JSON.stringify(ctMouseData));\n\t}, 1200);\n}\n\n\n//Logging mouse position each 150 ms\nvar ctFunctionMouseMove = function output(event){\n\tctSetMouseMoved();\n\tif(ctMouseEventTimerFlag === true){\n\n\t\tctMouseData.push([\n\t\t\tMath.round(event.clientY),\n\t\t\tMath.round(event.clientX),\n\t\t\tMath.round(new Date().getTime() - ctTimeMs)\n\t\t]);\n\n\t\tctMouseDataCounter++;\n\t\tctMouseEventTimerFlag = false;\n\t\tif(ctMouseDataCounter >= 50){\n\t\t\tctMouseStopData();\n\t\t}\n\t}\n};\n\n//Stop mouse observing function\nfunction ctMouseStopData(){\n\tapbct_remove_event_handler(document, \"mousemove\", ctFunctionMouseMove);\n\tclearInterval(ctMouseReadInterval);\n\tclearInterval(ctMouseWriteDataInterval);\n}\n\n//Stop key listening function\nfunction ctKeyStopStopListening(){\n\tapbct_remove_event_handler(document, \"mousedown\", ctFunctionFirstKey);\n\tapbct_remove_event_handler(document, \"keydown\", ctFunctionFirstKey);\n}\n\nfunction checkEmail(e) {\n\tvar current_email = e.target.value;\n\tif (current_email && !(current_email in ctCheckedEmails)) {\n\t\t// Using REST API handler\n\t\tif( ctPublicFunctions.data__ajax_type === 'rest' ){\n\t\t\tapbct_public_sendREST(\n\t\t\t\t'check_email_before_post',\n\t\t\t\t{\n\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\tdata: {'email' : current_email},\n\t\t\t\t\tcallback: function (result) {\n\t\t\t\t\t\tif (result.result) {\n\t\t\t\t\t\t\tctCheckedEmails[current_email] = {'result' : result.result, 'timestamp': Date.now() / 1000 |0};\n\t\t\t\t\t\t\tctSetCookie('ct_checked_emails', JSON.stringify(ctCheckedEmails));\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t);\n\t\t\t// Using AJAX request and handler\n\t\t} else if( ctPublicFunctions.data__ajax_type === 'admin_ajax' ) {\n\t\t\tapbct_public_sendAJAX(\n\t\t\t\t{\n\t\t\t\t\taction: 'apbct_email_check_before_post',\n\t\t\t\t\temail : current_email,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcallback: function (result) {\n\t\t\t\t\t\tif (result.result) {\n\t\t\t\t\t\t\tctCheckedEmails[current_email] = {'result' : result.result, 'timestamp': Date.now() / 1000 |0};\n\t\t\t\t\t\t\tctSetCookie('ct_checked_emails', JSON.stringify(ctCheckedEmails));\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t}\n}\n\nfunction ctSetPixelImg(pixelUrl) {\n\tctSetCookie('apbct_pixel_url', pixelUrl);\n\tif( +ctPublic.pixel__enabled ){\n\t\tif( ! document.getElementById('apbct_pixel') ) {\n\t\t\tlet insertedImg = document.createElement('img');\n\t\t\tinsertedImg.setAttribute('alt', 'CleanTalk Pixel');\n\t\t\tinsertedImg.setAttribute('id', 'apbct_pixel');\n\t\t\tinsertedImg.setAttribute('style', 'display: none; left: 99999px;');\n\t\t\tinsertedImg.setAttribute('src', pixelUrl);\n\t\t\tapbct('body').append(insertedImg);\n\t\t}\n\t}\n}\n\nfunction ctGetPixelUrl() {\n\t// Check if pixel is already in localstorage and is not outdated\n\tlet local_storage_pixel_url = apbctLocalStorage.get('apbct_pixel_url');\n\tif ( local_storage_pixel_url !== false ) {\n\t\tif ( apbctLocalStorage.isAlive('apbct_pixel_url', 3600 * 3) ) {\n\t\t\tapbctLocalStorage.delete('apbct_pixel_url')\n\t\t} else {\n\t\t\t//if so - load pixel from localstorage and draw it skipping AJAX\n\t\t\tctSetPixelImg(local_storage_pixel_url);\n\t\t\treturn;\n\t\t}\n\t}\n\t// Using REST API handler\n\tif( ctPublicFunctions.data__ajax_type === 'rest' ){\n\t\tapbct_public_sendREST(\n\t\t\t'apbct_get_pixel_url',\n\t\t\t{\n\t\t\t\tmethod: 'POST',\n\t\t\t\tcallback: function (result) {\n\t\t\t\t\tif (result) {\n\t\t\t\t\t\t//set pixel url to localstorage\n\t\t\t\t\t\tif ( ! apbctLocalStorage.get('apbct_pixel_url') ){\n\t\t\t\t\t\t\t//set pixel to the storage\n\t\t\t\t\t\t\tapbctLocalStorage.set('apbct_pixel_url', result)\n\t\t\t\t\t\t\t//update pixel data in the hidden fields\n\t\t\t\t\t\t\tctNoCookieAttachHiddenFieldsToForms()\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//then run pixel drawing\n\t\t\t\t\t\tctSetPixelImg(result);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t}\n\t\t);\n\t\t// Using AJAX request and handler\n\t}else{\n\t\tapbct_public_sendAJAX(\n\t\t\t{\n\t\t\t\taction: 'apbct_get_pixel_url',\n\t\t\t},\n\t\t\t{\n\t\t\t\tnotJson: true,\n\t\t\t\tcallback: function (result) {\n\t\t\t\t\tif (result) {\n\t\t\t\t\t\t//set pixel url to localstorage\n\t\t\t\t\t\tif ( ! apbctLocalStorage.get('apbct_pixel_url') ){\n\t\t\t\t\t\t\t//set pixel to the storage\n\t\t\t\t\t\t\tapbctLocalStorage.set('apbct_pixel_url', result)\n\t\t\t\t\t\t\t//update pixel data in the hidden fields\n\t\t\t\t\t\t\tctNoCookieAttachHiddenFieldsToForms()\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//then run pixel drawing\n\t\t\t\t\t\tctSetPixelImg(result);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t}\n\t\t);\n\t}\n}\n\nfunction ctSetHasScrolled() {\n\tif( ! apbctLocalStorage.isSet('ct_has_scrolled') || ! apbctLocalStorage.get('ct_has_scrolled') ) {\n\t\tctSetCookie(\"ct_has_scrolled\", 'true');\n\t\tapbctLocalStorage.set('ct_has_scrolled', true);\n\t}\n}\n\nfunction ctSetMouseMoved() {\n\tif( ! apbctLocalStorage.isSet('ct_mouse_moved') || ! apbctLocalStorage.get('ct_mouse_moved') ) {\n\t\tctSetCookie(\"ct_mouse_moved\", 'true');\n\t\tapbctLocalStorage.set('ct_mouse_moved', true);\n\t}\n}\n\nfunction ctPreloadLocalStorage(){\n\tif (ctPublic.data__to_local_storage){\n\t\tlet data = Object.entries(ctPublic.data__to_local_storage)\n\t\tdata.forEach(([key, value]) => {\n\t\t\tapbctLocalStorage.set(key,value)\n\t\t});\n\t}\n}\n\nif (ctPublic.data__key_is_ok) {\n\tapbct_attach_event_handler(document, \"mousemove\", ctFunctionMouseMove);\n\tapbct_attach_event_handler(document, \"mousedown\", ctFunctionFirstKey);\n\tapbct_attach_event_handler(document, \"keydown\", ctFunctionFirstKey);\n\tapbct_attach_event_handler(document, \"scroll\", ctSetHasScrolled);\n}\n\n// Ready function\nfunction apbct_ready(){\n\n\tctPreloadLocalStorage()\n\n\tlet cookiesType = apbctLocalStorage.get('ct_cookies_type');\n\tif ( ! cookiesType || cookiesType !== ctPublic.data__cookies_type ) {\n\t\tapbctLocalStorage.set('ct_cookies_type', ctPublic.data__cookies_type);\n\t\tapbctLocalStorage.delete('ct_mouse_moved');\n\t\tapbctLocalStorage.delete('ct_has_scrolled');\n\t}\n\n\t// Collect scrolling info\n\tvar initCookies = [\n\t\t[\"ct_ps_timestamp\", Math.floor(new Date().getTime() / 1000)],\n\t\t[\"ct_fkp_timestamp\", \"0\"],\n\t\t[\"ct_pointer_data\", \"0\"],\n\t\t[\"ct_timezone\", ct_date.getTimezoneOffset()/60*(-1) ],\n\t\t[\"ct_screen_info\", apbctGetScreenInfo()],\n\t\t[\"apbct_headless\", navigator.webdriver],\n\t];\n\n\tapbctLocalStorage.set('ct_ps_timestamp', Math.floor(new Date().getTime() / 1000));\n\tapbctLocalStorage.set('ct_fkp_timestamp', \"0\");\n\tapbctLocalStorage.set('ct_pointer_data', \"0\");\n\tapbctLocalStorage.set('ct_timezone', ct_date.getTimezoneOffset()/60*(-1) );\n\tapbctLocalStorage.set('ct_screen_info', apbctGetScreenInfo());\n\tapbctLocalStorage.set('apbct_headless', navigator.webdriver);\n\n\tif( ctPublic.data__cookies_type !== 'native' ) {\n\t\tinitCookies.push(['apbct_visible_fields', '0']);\n\t} else {\n\t\t// Delete all visible fields cookies on load the page\n\t\tvar cookiesArray = document.cookie.split(\";\");\n\t\tif( cookiesArray.length !== 0 ) {\n\t\t\tfor ( var i = 0; i < cookiesArray.length; i++ ) {\n\t\t\t\tvar currentCookie = cookiesArray[i].trim();\n\t\t\t\tvar cookieName = currentCookie.split(\"=\")[0];\n\t\t\t\tif( cookieName.indexOf(\"apbct_visible_fields_\") === 0 ) {\n\t\t\t\t\tctDeleteCookie(cookieName);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tif( +ctPublic.pixel__setting ){\n\t\tif( +ctPublic.pixel__enabled ){\n\t\t\tctGetPixelUrl()\n\t\t} else {\n\t\t\tinitCookies.push(['apbct_pixel_url', ctPublic.pixel__url]);\n\t\t}\n\t}\n\n\tif ( +ctPublic.data__email_check_before_post) {\n\t\tinitCookies.push(['ct_checked_emails', '0']);\n\t\tapbct(\"input[type = 'email'], #email\").on('blur', checkEmail);\n\t}\n\n\tif (apbctLocalStorage.isSet('ct_checkjs')) {\n\t\tinitCookies.push(['ct_checkjs', apbctLocalStorage.get('ct_checkjs')]);\n\t} else {\n\t\tinitCookies.push(['ct_checkjs', 0]);\n\t}\n\n\tctSetCookie(initCookies);\n\n\tsetTimeout(function(){\n\n\t\tctNoCookieAttachHiddenFieldsToForms()\n\n\t\tfor(var i = 0; i < document.forms.length; i++){\n\t\t\tvar form = document.forms[i];\n\n\t\t\t//Exclusion for forms\n\t\t\tif (\n\t\t\t\t+ctPublic.data__visible_fields_required === 0 ||\n\t\t\t\t(form.method.toString().toLowerCase() === 'get' && form.querySelectorAll('.nf-form-content').length === 0) ||\n\t\t\t\tform.classList.contains('slp_search_form') || //StoreLocatorPlus form\n\t\t\t\tform.parentElement.classList.contains('mec-booking') ||\n\t\t\t\tform.action.toString().indexOf('activehosted.com') !== -1 || // Active Campaign\n\t\t\t\t(form.id && form.id === 'caspioform') || //Caspio Form\n\t\t\t\t(form.classList && form.classList.contains('tinkoffPayRow')) || // TinkoffPayForm\n\t\t\t\t(form.classList && form.classList.contains('give-form')) || // GiveWP\n\t\t\t\t(form.id && form.id === 'ult-forgot-password-form') || //ult forgot password\n\t\t\t\t(form.id && form.id.toString().indexOf('calculatedfields') !== -1) || // CalculatedFieldsForm\n\t\t\t\t(form.id && form.id.toString().indexOf('sac-form') !== -1) || // Simple Ajax Chat\n\t\t\t\t(form.id && form.id.toString().indexOf('cp_tslotsbooking_pform') !== -1) || // WP Time Slots Booking Form\n\t\t\t\t(form.name && form.name.toString().indexOf('cp_tslotsbooking_pform') !== -1) || // WP Time Slots Booking Form\n\t\t\t\tform.action.toString() === 'https://epayment.epymtservice.com/epay.jhtml' || // Custom form\n\t\t\t\t(form.name && form.name.toString().indexOf('tribe-bar-form') !== -1) // The Events Calendar\n\t\t\t) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tvar hiddenInput = document.createElement( 'input' );\n\t\t\thiddenInput.setAttribute( 'type', 'hidden' );\n\t\t\thiddenInput.setAttribute( 'id', 'apbct_visible_fields_' + i );\n\t\t\thiddenInput.setAttribute( 'name', 'apbct_visible_fields');\n\t\t\tvar visibleFieldsToInput = {};\n\t\t\tvisibleFieldsToInput[0] = apbct_collect_visible_fields(form);\n\t\t\thiddenInput.value = btoa(JSON.stringify(visibleFieldsToInput));\n\t\t\tform.append( hiddenInput );\n\n\t\t\tform.onsubmit_prev = form.onsubmit;\n\n\t\t\tform.ctFormIndex = i;\n\t\t\tform.onsubmit = function (event) {\n\n\t\t\t\tif ( ctPublic.data__cookies_type !== 'native' && typeof event.target.ctFormIndex !== 'undefined' ) {\n\n\t\t\t\t\tvar visible_fields = {};\n\t\t\t\t\tvisible_fields[0] = apbct_collect_visible_fields(this);\n\t\t\t\t\tapbct_visible_fields_set_cookie( visible_fields, event.target.ctFormIndex );\n\t\t\t\t}\n\n\t\t\t\t// Call previous submit action\n\t\t\t\tif (event.target.onsubmit_prev instanceof Function) {\n\t\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t\tevent.target.onsubmit_prev.call(event.target, event);\n\t\t\t\t\t}, 500);\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\n\t}, 1000);\n\n\t// Listen clicks on encoded emails\n\tlet encodedEmailNodes = document.querySelectorAll(\"[data-original-string]\");\n\tctPublic.encodedEmailNodes = encodedEmailNodes\n\tif (encodedEmailNodes.length) {\n\t\tfor (let i = 0; i < encodedEmailNodes.length; ++i) {\n\t\t\tif (\n\t\t\t\tencodedEmailNodes[i].parentElement.href ||\n\t\t\t\tencodedEmailNodes[i].parentElement.parentElement.href\n\t\t\t) {\n\t\t\t\t// Skip listening click on hyperlinks\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tencodedEmailNodes[i].addEventListener('click', ctFillDecodedEmailHandler);\n\t\t}\n\t}\n}\nif (ctPublic.data__key_is_ok) {\n\tif (document.readyState !== 'loading') {\n\t\tapbct_ready();\n\t} else {\n\t\tapbct_attach_event_handler(document, \"DOMContentLoaded\", apbct_ready);\n\t}\n}\n\nfunction ctFillDecodedEmailHandler(event) {\n\tthis.removeEventListener('click', ctFillDecodedEmailHandler);\n\t//remember click_source\n\tlet click_source = this\n\t//globally remember if emails is mixed with mailto\n\tctPublic.encodedEmailNodesIsMixed = false\n\t//get fade\n\tdocument.body.classList.add('apbct-popup-fade')\n\t//popup show\n\tlet encoder_popup = document.getElementById('apbct_popup')\n\tif (!encoder_popup){\n\t\tlet waiting_popup = document.createElement('div')\n\t\twaiting_popup.setAttribute('class', 'apbct-popup')\n\t\twaiting_popup.setAttribute('id', 'apbct_popup')\n\t\tlet popup_text = document.createElement('p')\n\t\tpopup_text.setAttribute('id', 'apbct_popup_text')\n\t\tpopup_text.innerText = \"Please wait while CleanTalk decoding email addresses..\"\n\t\twaiting_popup.append(popup_text)\n\t\tdocument.body.append(waiting_popup)\n\t} else {\n\t\tencoder_popup.setAttribute('style','display: inherit')\n\t\tdocument.getElementById('apbct_popup_text').innerHTML = \"Please wait while CleanTalk decoding email addresses..\"\n\t}\n\n\tapbctAjaxEmailDecodeBulk(event,ctPublic.encodedEmailNodes,click_source)\n}\n\nfunction apbctAjaxEmailDecodeBulk(event, encodedEmailNodes, click_source){\n\t//collect data\n\tconst javascriptClientData = getJavascriptClientData();\n\tlet data = {\n\t\tevent_javascript_data: javascriptClientData,\n\t\tpost_url: document.location.href,\n\t\treferrer: document.referrer,\n\t\tencodedEmails: ''\n\t};\n\tlet encoded_emails_collection = {}\n\tfor (let i = 0; i < encodedEmailNodes.length; i++){\n\t\t//disable click for mailto\n\t\tif (typeof encodedEmailNodes[i].href !== 'undefined' && encodedEmailNodes[i].href.indexOf('mailto:') === 0) {\n\t\t\tevent.preventDefault()\n\t\t\tctPublic.encodedEmailNodesIsMixed = true;\n\t\t}\n\n\t\t// Adding a tooltip\n\t\tlet apbctTooltip = document.createElement('div');\n\t\tapbctTooltip.setAttribute('class', 'apbct-tooltip');\n\t\tapbct(encodedEmailNodes[i]).append(apbctTooltip);\n\n\t\t//collect encoded email strings\n\t\tencoded_emails_collection[i] = encodedEmailNodes[i].dataset.originalString;\n\t}\n\n\t//JSONify encoded email strings\n\tdata.encodedEmails = JSON.stringify(encoded_emails_collection)\n\n\t// Using REST API handler\n\tif( ctPublicFunctions.data__ajax_type === 'rest' ){\n\t\tapbct_public_sendREST(\n\t\t\t'apbct_decode_email',\n\t\t\t{\n\t\t\t\tdata: data,\n\t\t\t\tmethod: 'POST',\n\t\t\t\tcallback: function(result) {\n\t\t\t\t\t//set alternative cookie to skip next pages encoding\n\t\t\t\t\tctSetCookie('apbct_email_encoder_passed','1')\n\t\t\t\t\tapbctEmailEncoderCallbackBulk(result, encodedEmailNodes, click_source);\n\t\t\t\t},\n\t\t\t\tonErrorCallback: function (res) {\n\t\t\t\t\tresetEncodedNodes()\n\t\t\t\t\tctShowDecodeComment(res);\n\t\t\t\t},\n\t\t\t}\n\t\t);\n\n\t\t// Using AJAX request and handler\n\t}else{\n\t\tdata.action = 'apbct_decode_email';\n\t\tapbct_public_sendAJAX(\n\t\t\tdata,\n\t\t\t{\n\t\t\t\tnotJson: false,\n\t\t\t\tcallback: function(result) {\n\t\t\t\t\t//set alternative cookie to skip next pages encoding\n\t\t\t\t\tctSetCookie('apbct_email_encoder_passed','1')\n\t\t\t\t\tapbctEmailEncoderCallbackBulk(result, encodedEmailNodes, click_source);\n\t\t\t\t},\n\t\t\t\tonErrorCallback: function (res) {\n\t\t\t\t\tresetEncodedNodes()\n\t\t\t\t\tctShowDecodeComment(res);\n\t\t\t\t},\n\t\t\t}\n\t\t);\n\t}\n}\n\nfunction apbctEmailEncoderCallbackBulk(result, encodedEmailNodes, click_source){\n\n\tif (result.success && result.data[0].is_allowed === true){\n\t\t//start process of visual decoding\n\t\tsetTimeout(function(){\n\t\t\tfor (let i = 0; i < encodedEmailNodes.length; i++) {\n\t\t\t\t//chek what is what\n\t\t\t\tlet current_result_data\n\t\t\t\tresult.data.forEach((row) => {\n\t\t\t\t\tif (row.encoded_email === encodedEmailNodes[i].dataset.originalString){\n\t\t\t\t\t\tcurrent_result_data = row\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t//quit case on cloud block\n\t\t\t\tif (current_result_data.is_allowed === false){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t//handler for mailto\n\t\t\t\tif (typeof encodedEmailNodes[i].href !== 'undefined' && encodedEmailNodes[i].href.indexOf('mailto:') === 0) {\n\t\t\t\t\tlet encodedEmail = encodedEmailNodes[i].href.replace('mailto:', '');\n\t\t\t\t\tlet baseElementContent = encodedEmailNodes[i].innerHTML;\n\t\t\t\t\tencodedEmailNodes[i].innerHTML = baseElementContent.replace(encodedEmail, current_result_data.decoded_email);\n\t\t\t\t\tencodedEmailNodes[i].href = 'mailto:' + current_result_data.decoded_email;\n\t\t\t\t}\n\t\t\t\t// fill the nodes\n\t\t\t\tctProcessDecodedDataResult(current_result_data, encodedEmailNodes[i]);\n\t\t\t\t//remove listeners\n\t\t\t\tencodedEmailNodes[i].removeEventListener('click', ctFillDecodedEmailHandler)\n\t\t\t}\n\t\t\t//popup remove\n\t\t\tlet popup = document.getElementById('apbct_popup')\n\t\t\tif (popup !== null){\n\t\t\t\tdocument.body.classList.remove('apbct-popup-fade')\n\t\t\t\tpopup.setAttribute('style','display:none')\n\t\t\t\t//click on mailto if so\n\t\t\t\tif (ctPublic.encodedEmailNodesIsMixed){\n\t\t\t\t\tclick_source.click();\n\t\t\t\t}\n\t\t\t}\n\t\t}, 3000);\n\t} else {\n\t\tif (result.success){\n\t\t\tresetEncodedNodes()\n\t\t\tctShowDecodeComment('Blocked: ' + result.data[0].comment)\n\t\t} else {\n\t\t\tresetEncodedNodes()\n\t\t\tctShowDecodeComment('Cannot connect with CleanTalk server: ' + result.data[0].comment)\n\t\t}\n\t}\n}\n\nfunction resetEncodedNodes(){\n\tif (typeof ctPublic.encodedEmailNodes !== 'undefined'){\n\t\tctPublic.encodedEmailNodes.forEach(function (element){\n\t\t\telement.addEventListener('click', ctFillDecodedEmailHandler);\n\t\t})\n\t}\n}\n\nfunction getJavascriptClientData(common_cookies = []) {\n\tlet resultDataJson = {};\n\n\tresultDataJson.apbct_headless = !!ctGetCookie(ctPublicFunctions.cookiePrefix + 'apbct_headless');\n\tresultDataJson.apbct_pixel_url = ctGetCookie(ctPublicFunctions.cookiePrefix + 'apbct_pixel_url');\n\tresultDataJson.ct_checked_emails = ctGetCookie(ctPublicFunctions.cookiePrefix + 'ct_checked_emails');\n\tresultDataJson.ct_checkjs = ctGetCookie(ctPublicFunctions.cookiePrefix + 'ct_checkjs');\n\tresultDataJson.ct_fkp_timestamp = ctGetCookie(ctPublicFunctions.cookiePrefix + 'ct_fkp_timestamp');\n\tresultDataJson.ct_pointer_data = ctGetCookie(ctPublicFunctions.cookiePrefix + 'ct_pointer_data');\n\tresultDataJson.ct_ps_timestamp = ctGetCookie(ctPublicFunctions.cookiePrefix + 'ct_ps_timestamp');\n\tresultDataJson.ct_screen_info = ctGetCookie(ctPublicFunctions.cookiePrefix + 'ct_screen_info');\n\tresultDataJson.ct_timezone = ctGetCookie(ctPublicFunctions.cookiePrefix + 'ct_timezone');\n\n\t// collecting data from localstorage\n\tconst ctMouseMovedLocalStorage = apbctLocalStorage.get(ctPublicFunctions.cookiePrefix + 'ct_mouse_moved');\n\tconst ctHasScrolledLocalStorage = apbctLocalStorage.get(ctPublicFunctions.cookiePrefix + 'ct_has_scrolled');\n\tconst ctCookiesTypeLocalStorage = apbctLocalStorage.get(ctPublicFunctions.cookiePrefix + 'ct_cookies_type');\n\n\t// collecting data from cookies\n\tconst ctMouseMovedCookie = ctGetCookie(ctPublicFunctions.cookiePrefix + 'ct_mouse_moved');\n\tconst ctHasScrolledCookie = ctGetCookie(ctPublicFunctions.cookiePrefix + 'ct_has_scrolled');\n\tconst ctCookiesTypeCookie = ctGetCookie(ctPublicFunctions.cookiePrefix + 'ct_cookies_type');\n\n\tresultDataJson.ct_mouse_moved = ctMouseMovedLocalStorage !== undefined ? ctMouseMovedLocalStorage : ctMouseMovedCookie;\n\tresultDataJson.ct_has_scrolled = ctHasScrolledLocalStorage !== undefined ? ctHasScrolledLocalStorage : ctHasScrolledCookie;\n\tresultDataJson.ct_cookies_type = ctCookiesTypeLocalStorage !== undefined ? ctCookiesTypeLocalStorage : ctCookiesTypeCookie;\n\n\tif (\n\t\ttypeof (common_cookies) === \"object\"\n\t\t&& common_cookies !== []\n\t){\n\t\tfor (let i = 0; i < common_cookies.length; ++i){\n\t\t\tif ( typeof (common_cookies[i][1]) === \"object\" ){\n\t\t\t\t//this is for handle SFW cookies\n\t\t\t\tresultDataJson[common_cookies[i][1][0]] = common_cookies[i][1][1]\n\t\t\t} else {\n\t\t\t\tresultDataJson[common_cookies[i][0]] = common_cookies[i][1]\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconsole.log('APBCT JS ERROR: Collecting data type mismatch')\n\t}\n\n\t// Parse JSON properties to prevent double JSON encoding\n\tresultDataJson = removeDoubleJsonEncoding(resultDataJson);\n\n\treturn JSON.stringify(resultDataJson);\n}\n\n/**\n * Recursive\n *\n * Recursively decode JSON-encoded properties\n *\n * @param object\n * @returns {*}\n */\nfunction removeDoubleJsonEncoding(object){\n\n\tif( typeof object === 'object'){\n\n\t\tfor (let objectKey in object) {\n\n\t\t\t// Recursion\n\t\t\tif( typeof object[objectKey] === 'object'){\n\t\t\t\tobject[objectKey] = removeDoubleJsonEncoding(object[objectKey]);\n\t\t\t}\n\n\t\t\t// Common case (out)\n\t\t\tif(\n\t\t\t\ttypeof object[objectKey] === 'string' &&\n\t\t\t\tobject[objectKey].match(/^[\\[{].*?[\\]}]$/) !== null // is like JSON\n\t\t\t){\n\t\t\t\tlet parsedValue = JSON.parse(object[objectKey]);\n\t\t\t\tif( typeof parsedValue === 'object' ){\n\t\t\t\t\tobject[objectKey] = parsedValue;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn object;\n}\n\nfunction ctProcessDecodedDataResult(response, targetElement) {\n\n\ttargetElement.setAttribute('title', '');\n\ttargetElement.removeAttribute('style');\n\tctFillDecodedEmail(targetElement, response.decoded_email);\n}\n\nfunction ctFillDecodedEmail(target, email){\n\n\tapbct(target).html(\n\t\tapbct(target)\n\t\t\t.html()\n\t\t\t.replace(/.+?(<div class=[\"']apbct-tooltip[\"'].+?<\\/div>)/, email + \"$1\")\n\t);\n}\n\nfunction ctShowDecodeComment(comment){\n\n\tif( ! comment ){\n\t\tcomment = 'Can not decode email. Unknown reason'\n\t}\n\n\tlet popup = document.getElementById('apbct_popup')\n\tlet popup_text = document.getElementById('apbct_popup_text')\n\tif (popup !== null){\n\t\tdocument.body.classList.remove('apbct-popup-fade')\n\t\tpopup_text.innerText = \"CleanTalk email decoder: \" + comment\n\t\tsetTimeout(function(){\n\t\t\tpopup.setAttribute('style','display:none')\n\t\t},3000)\n\t}\n}\n\nfunction apbct_collect_visible_fields( form ) {\n\n\t// Get only fields\n\tvar inputs = [],\n\t\tinputs_visible = '',\n\t\tinputs_visible_count = 0,\n\t\tinputs_invisible = '',\n\t\tinputs_invisible_count = 0,\n\t\tinputs_with_duplicate_names = [];\n\n\tfor(var key in form.elements){\n\t\tif(!isNaN(+key))\n\t\t\tinputs[key] = form.elements[key];\n\t}\n\n\t// Filter fields\n\tinputs = inputs.filter(function(elem){\n\n\t\t// Filter already added fields\n\t\tif( inputs_with_duplicate_names.indexOf( elem.getAttribute('name') ) !== -1 ){\n\t\t\treturn false;\n\t\t}\n\t\t// Filter inputs with same names for type == radio\n\t\tif( -1 !== ['radio', 'checkbox'].indexOf( elem.getAttribute(\"type\") )){\n\t\t\tinputs_with_duplicate_names.push( elem.getAttribute('name') );\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t});\n\n\t// Visible fields\n\tinputs.forEach(function(elem, i, elements){\n\t\t// Unnecessary fields\n\t\tif(\n\t\t\telem.getAttribute(\"type\") === \"submit\" || // type == submit\n\t\t\telem.getAttribute('name') === null ||\n\t\t\telem.getAttribute('name') === 'ct_checkjs'\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\t// Invisible fields\n\t\tif(\n\t\t\tgetComputedStyle(elem).display === \"none\" || // hidden\n\t\t\tgetComputedStyle(elem).visibility === \"hidden\" || // hidden\n\t\t\tgetComputedStyle(elem).opacity === \"0\" || // hidden\n\t\t\telem.getAttribute(\"type\") === \"hidden\" // type == hidden\n\t\t) {\n\t\t\tif( elem.classList.contains(\"wp-editor-area\") ) {\n\t\t\t\tinputs_visible += \" \" + elem.getAttribute(\"name\");\n\t\t\t\tinputs_visible_count++;\n\t\t\t} else {\n\t\t\t\tinputs_invisible += \" \" + elem.getAttribute(\"name\");\n\t\t\t\tinputs_invisible_count++;\n\t\t\t}\n\t\t}\n\t\t// Visible fields\n\t\telse {\n\t\t\tinputs_visible += \" \" + elem.getAttribute(\"name\");\n\t\t\tinputs_visible_count++;\n\t\t}\n\n\t});\n\n\tinputs_invisible = inputs_invisible.trim();\n\tinputs_visible = inputs_visible.trim();\n\n\treturn {\n\t\tvisible_fields : inputs_visible,\n\t\tvisible_fields_count : inputs_visible_count,\n\t\tinvisible_fields : inputs_invisible,\n\t\tinvisible_fields_count : inputs_invisible_count,\n\t}\n\n}\n\nfunction apbct_visible_fields_set_cookie( visible_fields_collection, form_id ) {\n\n\tvar collection = typeof visible_fields_collection === 'object' && visible_fields_collection !== null ? visible_fields_collection : {};\n\n\tif( ctPublic.data__cookies_type === 'native' ) {\n\t\tfor ( var i in collection ) {\n\t\t\tif ( i > 10 ) {\n\t\t\t\t// Do not generate more than 10 cookies\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar collectionIndex = form_id !== undefined ? form_id : i;\n\t\t\tctSetCookie(\"apbct_visible_fields_\" + collectionIndex, JSON.stringify( collection[i] ) );\n\t\t}\n\t} else {\n\t\tif (ctPublic.data__cookies_type === 'none'){\n\t\t\tctSetCookie(\"apbct_visible_fields\", JSON.stringify( collection[0] ) );\n\t\t} else {\n\t\t\tctSetCookie(\"apbct_visible_fields\", JSON.stringify( collection ) );\n\t\t}\n\n\t}\n}\n\nfunction apbct_js_keys__set_input_value(result, data, params, obj){\n\tif( document.querySelectorAll('[name^=ct_checkjs]').length > 0 ) {\n\t\tvar elements = document.querySelectorAll('[name^=ct_checkjs]');\n\t\tfor ( var i = 0; i < elements.length; i++ ) {\n\t\t\telements[i].value = result.js_key;\n\t\t}\n\t}\n}\n\nfunction apbctGetScreenInfo() {\n\treturn JSON.stringify({\n\t\tfullWidth : document.documentElement.scrollWidth,\n\t\tfullHeight : Math.max(\n\t\t\tdocument.body.scrollHeight, document.documentElement.scrollHeight,\n\t\t\tdocument.body.offsetHeight, document.documentElement.offsetHeight,\n\t\t\tdocument.body.clientHeight, document.documentElement.clientHeight\n\t\t),\n\t\tvisibleWidth : document.documentElement.clientWidth,\n\t\tvisibleHeight : document.documentElement.clientHeight,\n\t});\n}\n\nif(typeof jQuery !== 'undefined') {\n\n\t// Capturing responses and output block message for unknown AJAX forms\n\tjQuery(document).ajaxComplete(function (event, xhr, settings) {\n\t\tif (xhr.responseText && xhr.responseText.indexOf('\"apbct') !== -1) {\n\t\t\ttry {\n\t\t\t\tvar response = JSON.parse(xhr.responseText);\n\t\t\t} catch (e) {\n\t\t\t\tconsole.log(e.toString());\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tctParseBlockMessage(response);\n\t\t}\n\t});\n}\n\nfunction ctParseBlockMessage(response) {\n\n\tif (typeof response.apbct !== 'undefined') {\n\t\tresponse = response.apbct;\n\t\tif (response.blocked) {\n\t\t\tdocument.dispatchEvent(\n\t\t\t\tnew CustomEvent( \"apbctAjaxBockAlert\", {\n\t\t\t\t\tbubbles: true,\n\t\t\t\t\tdetail: { message: response.comment }\n\t\t\t\t} )\n\t\t\t);\n\n\t\t\t// Show the result by modal\n\t\t\tcleantalkModal.loaded = response.comment;\n\t\t\tcleantalkModal.open();\n\n\t\t\tif(+response.stop_script == 1)\n\t\t\t\twindow.stop();\n\t\t}\n\t}\n}\n\nfunction ctSetPixelUrlLocalstorage(ajax_pixel_url) {\n\t//set pixel to the storage\n\tctSetCookie('apbct_pixel_url', ajax_pixel_url)\n}\n\nfunction ctNoCookieConstructHiddenField(){\n\tlet field = ''\n\tlet no_cookie_data = apbctLocalStorage.getCleanTalkData()\n\tno_cookie_data = JSON.stringify(no_cookie_data)\n\tno_cookie_data = btoa(no_cookie_data)\n\tfield = document.createElement('input')\n\tfield.setAttribute('id','ct_no_cookie_hidden_field')\n\tfield.setAttribute('name','ct_no_cookie_hidden_field')\n\tfield.setAttribute('value', no_cookie_data)\n\tfield.setAttribute('type', 'hidden')\n\treturn field\n}\n\nfunction ctNoCookieGetForms(){\n\tlet forms = document.forms\n\tif (forms) {\n\t\treturn forms\n\t}\n\treturn false\n}\n\nfunction ctNoCookieAttachHiddenFieldsToForms(){\n\n\tif (ctPublic.data__cookies_type !== 'none'){\n\t\treturn\n\t}\n\n\tlet forms = ctNoCookieGetForms()\n\n\tif (forms){\n\t\t//clear previous hidden set\n\t\tlet elements = document.getElementsByName('ct_no_cookie_hidden_field')\n\t\tif (elements){\n\t\t\tfor (let j = 0; j < elements.length; j++) {\n\t\t\t\telements[j].parentNode.removeChild(elements[j])\n\t\t\t}\n\t\t}\n\t\tfor ( let i = 0; i < forms.length; i++ ){\n\t\t\t//ignore forms with get method @todo We need to think about this\n\t\t\tif (document.forms[i].getAttribute('method') === null ||\n\t\t\t\tdocument.forms[i].getAttribute('method').toLowerCase() === 'post'){\n\t\t\t\t// add new set\n\t\t\t\tdocument.forms[i].append(ctNoCookieConstructHiddenField())\n\t\t\t}\n\t\t}\n\t}\n\n}\n/* Cleantalk Modal object */\nlet cleantalkModal = {\n\n // Flags\n loaded: false,\n loading: false,\n opened: false,\n opening: false,\n\n // Methods\n load: function( action ) {\n if( ! this.loaded ) {\n this.loading = true;\n let callback = function( result, data, params, obj ) {\n cleantalkModal.loading = false;\n cleantalkModal.loaded = result;\n document.dispatchEvent(\n new CustomEvent( \"cleantalkModalContentLoaded\", {\n bubbles: true,\n } )\n );\n };\n if( typeof apbct_admin_sendAJAX === \"function\" ) {\n apbct_admin_sendAJAX( { 'action' : action }, { 'callback': callback, 'notJson': true } );\n } else {\n apbct_public_sendAJAX( { 'action' : action }, { 'callback': callback, 'notJson': true } );\n }\n\n }\n },\n\n open: function () {\n /* Cleantalk Modal CSS start */\n var renderCss = function () {\n var cssStr = '';\n for ( let key in this.styles ) {\n cssStr += key + ':' + this.styles[key] + ';';\n }\n return cssStr;\n };\n var overlayCss = {\n styles: {\n \"z-index\": \"9999\",\n \"position\": \"fixed\",\n \"top\": \"0\",\n \"left\": \"0\",\n \"width\": \"100%\",\n \"height\": \"100%\",\n \"background\": \"rgba(0,0,0,0.5)\",\n \"display\": \"flex\",\n \"justify-content\" : \"center\",\n \"align-items\" : \"center\",\n },\n toString: renderCss\n };\n var innerCss = {\n styles: {\n \"position\" : \"relative\",\n \"padding\" : \"30px\",\n \"background\" : \"#FFF\",\n \"border\" : \"1px solid rgba(0,0,0,0.75)\",\n \"border-radius\" : \"4px\",\n \"box-shadow\" : \"7px 7px 5px 0px rgba(50,50,50,0.75)\",\n },\n toString: renderCss\n };\n var closeCss = {\n styles: {\n \"position\" : \"absolute\",\n \"background\" : \"#FFF\",\n \"width\" : \"20px\",\n \"height\" : \"20px\",\n \"border\" : \"2px solid rgba(0,0,0,0.75)\",\n \"border-radius\" : \"15px\",\n \"cursor\" : \"pointer\",\n \"top\" : \"-8px\",\n \"right\" : \"-8px\",\n \"box-sizing\" : \"content-box\",\n },\n toString: renderCss\n };\n var closeCssBefore = {\n styles: {\n \"content\" : \"\\\"\\\"\",\n \"display\" : \"block\",\n \"position\" : \"absolute\",\n \"background\" : \"#000\",\n \"border-radius\" : \"1px\",\n \"width\" : \"2px\",\n \"height\" : \"16px\",\n \"top\" : \"2px\",\n \"left\" : \"9px\",\n \"transform\" : \"rotate(45deg)\",\n },\n toString: renderCss\n };\n var closeCssAfter = {\n styles: {\n \"content\" : \"\\\"\\\"\",\n \"display\" : \"block\",\n \"position\" : \"absolute\",\n \"background\" : \"#000\",\n \"border-radius\" : \"1px\",\n \"width\" : \"2px\",\n \"height\" : \"16px\",\n \"top\" : \"2px\",\n \"left\" : \"9px\",\n \"transform\" : \"rotate(-45deg)\",\n },\n toString: renderCss\n };\n var bodyCss = {\n styles: {\n \"overflow\" : \"hidden\",\n },\n toString: renderCss\n };\n var cleantalkModalStyle = document.createElement( 'style' );\n cleantalkModalStyle.setAttribute( 'id', 'cleantalk-modal-styles' );\n cleantalkModalStyle.innerHTML = 'body.cleantalk-modal-opened{' + bodyCss + '}';\n cleantalkModalStyle.innerHTML += '#cleantalk-modal-overlay{' + overlayCss + '}';\n cleantalkModalStyle.innerHTML += '#cleantalk-modal-close{' + closeCss + '}';\n cleantalkModalStyle.innerHTML += '#cleantalk-modal-close:before{' + closeCssBefore + '}';\n cleantalkModalStyle.innerHTML += '#cleantalk-modal-close:after{' + closeCssAfter + '}';\n document.body.append( cleantalkModalStyle );\n /* Cleantalk Modal CSS end */\n\n var overlay = document.createElement( 'div' );\n overlay.setAttribute( 'id', 'cleantalk-modal-overlay' );\n document.body.append( overlay );\n\n document.body.classList.add( 'cleantalk-modal-opened' );\n\n var inner = document.createElement( 'div' );\n inner.setAttribute( 'id', 'cleantalk-modal-inner' );\n inner.setAttribute( 'style', innerCss );\n overlay.append( inner );\n\n var close = document.createElement( 'div' );\n close.setAttribute( 'id', 'cleantalk-modal-close' );\n inner.append( close );\n\n var content = document.createElement( 'div' );\n if ( this.loaded ) {\n var urlRegex = /(https?:\\/\\/[^\\s]+)/g;\n var service_content_regex = /.*\\/inc/g;\n if (service_content_regex.test(this.loaded)){\n content.innerHTML = this.loaded\n } else {\n var renderedMsg = this.loaded.replace(urlRegex, '<a href=\"$1\" target=\"_blank\">$1</a>');\n content.innerHTML = renderedMsg;\n }\n\n } else {\n content.innerHTML = 'Loading...';\n // @ToDo Here is hardcoded parameter. Have to get this from a 'data-' attribute.\n this.load( 'get_options_template' );\n }\n content.setAttribute( 'id', 'cleantalk-modal-content' );\n inner.append( content );\n\n this.opened = true;\n },\n\n close: function () {\n document.body.classList.remove( 'cleantalk-modal-opened' );\n document.getElementById( 'cleantalk-modal-overlay' ).remove();\n document.getElementById( 'cleantalk-modal-styles' ).remove();\n document.dispatchEvent(\n new CustomEvent( \"cleantalkModalClosed\", {\n bubbles: true,\n } )\n );\n }\n\n};\n\n/* Cleantalk Modal helpers */\ndocument.addEventListener('click',function( e ){\n if( e.target && (e.target.id === 'cleantalk-modal-overlay' || e.target.id === 'cleantalk-modal-close') ){\n cleantalkModal.close();\n }\n});\ndocument.addEventListener(\"cleantalkModalContentLoaded\", function( e ) {\n if( cleantalkModal.opened && cleantalkModal.loaded ) {\n document.getElementById( 'cleantalk-modal-content' ).innerHTML = cleantalkModal.loaded;\n }\n});\nlet buttons_to_handle = [];\n\ndocument.addEventListener('DOMContentLoaded', function(){\n\n\tif(\n\t\ttypeof ctPublicGDPR === 'undefined' ||\n\t\t! ctPublicGDPR.gdpr_forms.length\n\t) {\n\t\treturn;\n\t}\n\n\tlet gdpr_notice_for_button = ctPublicGDPR.gdpr_title;\n\n\tif ( typeof jQuery === 'undefined' ) {\n\t\treturn;\n\t}\n\ttry {\n\t\tctPublicGDPR.gdpr_forms.forEach(function(item, i){\n\n\t\t\tlet elem = jQuery('#'+item+', .'+item);\n\n\t\t\t// Filter forms\n\t\t\tif (!elem.is('form')){\n\t\t\t\t// Caldera\n\t\t\t\tif (elem.find('form')[0])\n\t\t\t\t\telem = elem.children('form').first();\n\t\t\t\t// Contact Form 7\n\t\t\t\telse if(\n\t\t\t\t\tjQuery('.wpcf7[role=form]')[0] && jQuery('.wpcf7[role=form]')\n\t\t\t\t\t\t.attr('id')\n\t\t\t\t\t\t.indexOf('wpcf7-f'+item) !== -1\n\t\t\t\t) {\n\t\t\t\t\telem = jQuery('.wpcf7[role=form]').children('form');\n\t\t\t\t}\n\n\t\t\t\t// Formidable\n\t\t\t\telse if(jQuery('.frm_forms')[0] && jQuery('.frm_forms').first().attr('id').indexOf('frm_form_'+item) !== -1)\n\t\t\t\t\telem = jQuery('.frm_forms').first().children('form');\n\t\t\t\t// WPForms\n\t\t\t\telse if(jQuery('.wpforms-form')[0] && jQuery('.wpforms-form').first().attr('id').indexOf('wpforms-form-'+item) !== -1)\n\t\t\t\t\telem = jQuery('.wpforms-form');\n\t\t\t}\n\n\t\t\t//disable forms buttons\n\t\t\tlet button = false\n\t\t\tlet buttons_collection= elem.find('input[type|=\"submit\"],button[type|=\"submit\"]')\n\n\t\t\tif (!buttons_collection.length) {\n\t\t\t\treturn\n\t\t\t} else {\n\t\t\t\tbutton = buttons_collection[0]\n\t\t\t}\n\n\t\t\tif (button !== false){\n\t\t\t\tbutton.disabled = true\n\t\t\t\tlet old_notice = jQuery(button).prop('title') ? jQuery(button).prop('title') : ''\n\t\t\t\tbuttons_to_handle.push({index:i,button:button,old_notice:old_notice})\n\t\t\t\tjQuery(button).prop('title', gdpr_notice_for_button)\n\t\t\t}\n\n\t\t\t// Adding notice and checkbox\n\t\t\tif(elem.is('form') || elem.attr('role') === 'form'){\n\t\t\t\telem.append('<input id=\"apbct_gdpr_'+i+'\" type=\"checkbox\" required=\"required\" style=\" margin-right: 10px;\" onchange=\"apbct_gdpr_handle_buttons()\">')\n\t\t\t\t\t.append('<label style=\"display: inline;\" for=\"apbct_gdpr_'+i+'\">'+ctPublicGDPR.gdpr_text+'</label>');\n\t\t\t}\n\t\t});\n\t} catch (e) {\n\t\tconsole.info('APBCT GDPR JS ERROR: Can not add GDPR notice' + e)\n\t}\n});\n\nfunction apbct_gdpr_handle_buttons(){\n\n\ttry {\n\n\t\tif (buttons_to_handle === []){\n\t\t\treturn\n\t\t}\n\n\t\tbuttons_to_handle.forEach((button) => {\n\t\t\tlet selector = '[id=\"apbct_gdpr_' + button.index + '\"]'\n\t\t\tlet apbct_gdpr_item = jQuery(selector)\n\t\t\t//chek if apbct_gdpr checkbox is set\n\t\t\tif (jQuery(apbct_gdpr_item).prop(\"checked\")){\n\t\t\t\tbutton.button.disabled = false\n\t\t\t\tjQuery(button.button).prop('title', button.old_notice)\n\t\t\t} else {\n\t\t\t\tbutton.button.disabled = true\n\t\t\t\tjQuery(button.button).prop('title', gdpr_notice_for_button)\n\t\t\t}\n\t\t})\n\t} catch (e) {\n\t\tconsole.info('APBCT GDPR JS ERROR: Can not handle form buttons ' + e)\n\t}\n}\n/**\n * Handle external forms\n */\nfunction ct_protect_external() {\n for(var i = 0; i < document.forms.length; i++) {\n\n if (document.forms[i].cleantalk_hidden_action === undefined && document.forms[i].cleantalk_hidden_method === undefined) {\n\n // current form\n var currentForm = document.forms[i];\n\n if(typeof(currentForm.action) == 'string') {\n\n // Ajax checking for the integrated forms\n if(isIntegratedForm(currentForm)) {\n\n apbctProcessExternalForm(currentForm, i, document);\n\n // Common flow - modify form's action\n }else if(currentForm.action.indexOf('http://') !== -1 || currentForm.action.indexOf('https://') !== -1) {\n\n var tmp = currentForm.action.split('//');\n tmp = tmp[1].split('/');\n var host = tmp[0].toLowerCase();\n\n if(host !== location.hostname.toLowerCase()){\n\n var ct_action = document.createElement(\"input\");\n ct_action.name = 'cleantalk_hidden_action';\n ct_action.value = currentForm.action;\n ct_action.type = 'hidden';\n currentForm.appendChild(ct_action);\n\n var ct_method = document.createElement(\"input\");\n ct_method.name = 'cleantalk_hidden_method';\n ct_method.value = currentForm.method;\n ct_method.type = 'hidden';\n\n currentForm.method = 'POST'\n\n currentForm.appendChild(ct_method);\n\n currentForm.action = document.location;\n }\n }\n }\n }\n\n }\n // Trying to process external form into an iframe\n apbctProcessIframes()\n}\n\nfunction formIsExclusion(currentForm)\n{\n let exclusions_by_id = [\n 'give-form' //give form exclusion because of direct integration\n ]\n\n let result = false\n\n //mewto forms exclusion\n if (currentForm.parentElement\n && currentForm.parentElement.classList.length > 0\n && currentForm.parentElement.classList[0].indexOf('mewtwo') !== -1) {\n result = true\n }\n\n exclusions_by_id.forEach(function (id) {\n if ( typeof (currentForm.id) !== 'undefined' && currentForm.id.indexOf(id) !== -1 ) {\n result = true\n }\n })\n\n return result\n}\n\nfunction apbctProcessIframes()\n{\n const frames = document.getElementsByTagName('iframe');\n\n if ( frames.length > 0 ) {\n for ( let j = 0; j < frames.length; j++ ) {\n if ( frames[j].contentDocument == null ) {\n continue;\n }\n\n const iframeForms = frames[j].contentDocument.forms;\n\n if ( iframeForms.length === 0 ) {\n return;\n }\n\n for ( let y = 0; y < iframeForms.length; y++ ) {\n let currentForm = iframeForms[y];\n\n apbctProcessExternalForm(currentForm, y, frames[j].contentDocument);\n }\n }\n }\n}\n\nfunction apbctProcessExternalForm(currentForm, iterator, documentObject) {\n\n //process forms exclusions\n if ( formIsExclusion(currentForm)) {\n return\n }\n\n const cleantalk_placeholder = document.createElement(\"i\");\n cleantalk_placeholder.className = 'cleantalk_placeholder';\n cleantalk_placeholder.style = 'display: none';\n\n currentForm.parentElement.insertBefore(cleantalk_placeholder, currentForm);\n\n // Deleting form to prevent submit event\n let prev = currentForm.previousSibling,\n form_html = currentForm.outerHTML,\n form_original = currentForm;\n\n // Remove the original form\n currentForm.parentElement.removeChild(currentForm);\n\n // Insert a clone\n const placeholder = document.createElement(\"div\");\n placeholder.innerHTML = form_html;\n prev.after(placeholder.firstElementChild);\n\n var force_action = document.createElement(\"input\");\n force_action.name = 'action';\n force_action.value = 'cleantalk_force_ajax_check';\n force_action.type = 'hidden';\n\n let reUseCurrentForm = documentObject.forms[iterator];\n\n reUseCurrentForm.appendChild(force_action);\n reUseCurrentForm.apbctPrev = prev;\n reUseCurrentForm.apbctFormOriginal = form_original;\n\n // mailerlite integration - disable click on submit button\n let mailerlite_detected_class = false\n if (reUseCurrentForm.classList !== undefined) {\n //list there all the mailerlite classes\n let mailerlite_classes = ['newsletterform', 'ml-block-form']\n mailerlite_classes.forEach(function(mailerlite_class) {\n if (reUseCurrentForm.classList.contains(mailerlite_class)){\n mailerlite_detected_class = mailerlite_class\n }\n });\n }\n if ( mailerlite_detected_class ) {\n let mailerliteSubmitButton = jQuery('form.' + mailerlite_detected_class).find('button[type=\"submit\"]');\n if ( mailerliteSubmitButton !== undefined ) {\n mailerliteSubmitButton.click(function (event) {\n event.preventDefault();\n sendAjaxCheckingFormData(event.currentTarget);\n });\n }\n } else {\n documentObject.forms[iterator].onsubmit = function ( event ){\n event.preventDefault();\n\n //mautic integration\n if (documentObject.forms[iterator].id.indexOf('mauticform') !== -1) {\n let checkbox = jQuery(documentObject.forms[iterator]).find('input[id*=\"checkbox_rgpd\"]')\n if (checkbox.length > 0){\n if (checkbox.prop(\"checked\") === true){\n let placeholder = jQuery('.cleantalk_placeholder')\n if (placeholder.length > 0) {\n placeholder[0].setAttribute('mautic_hidden_gdpr_id', checkbox.prop(\"id\"))\n }\n }\n }\n }\n\n const prev = jQuery(event.currentTarget).prev();\n const form_original = jQuery(event.currentTarget).clone();\n\n sendAjaxCheckingFormData(event.currentTarget);\n };\n }\n}\n\nfunction apbct_replace_inputs_values_from_other_form( form_source, form_target ){\n\n var\tinputs_source = jQuery( form_source ).find( 'button, input, textarea, select' ),\n inputs_target = jQuery( form_target ).find( 'button, input, textarea, select' );\n\n inputs_source.each( function( index, elem_source ){\n\n var source = jQuery( elem_source );\n\n inputs_target.each( function( index2, elem_target ){\n\n var target = jQuery( elem_target );\n\n if( elem_source.outerHTML === elem_target.outerHTML ){\n\n target.val( source.val() );\n }\n });\n });\n\n}\nwindow.onload = function () {\n\n if( ! +ctPublic.settings__forms__check_external ) {\n return;\n }\n\n if ( typeof jQuery === 'undefined' ) {\n return;\n }\n\n setTimeout(function () {\n ct_protect_external()\n }, 1500);\n};\n\n/**\n * Checking the form integration\n */\nfunction isIntegratedForm(formObj) {\n var formAction = formObj.action;\n let formId = formObj.id;\n\n if(\n formAction.indexOf('activehosted.com') !== -1 || // ActiveCampaign form\n formAction.indexOf('app.convertkit.com') !== -1 || // ConvertKit form\n ( formObj.firstChild.classList !== undefined && formObj.firstChild.classList.contains('cb-form-group') ) || // Convertbox form\n formAction.indexOf('mailerlite.com') !== -1 || // Mailerlite integration\n formAction.indexOf('colcolmail.co.uk') !== -1 || // colcolmail.co.uk integration\n formAction.indexOf('paypal.com') !== -1 ||\n formAction.indexOf('infusionsoft.com') !== -1 ||\n formAction.indexOf('webto.salesforce.com') !== -1 ||\n formAction.indexOf('secure2.convio.net') !== -1 ||\n formAction.indexOf('hookb.in') !== -1 ||\n formAction.indexOf('external.url') !== -1 ||\n formAction.indexOf('tp.media') !== -1 ||\n formAction.indexOf('flodesk.com') !== -1 ||\n formAction.indexOf('sendfox.com') !== -1 ||\n formAction.indexOf('aweber.com') !== -1 ||\n formAction.indexOf('secure.payu.com') !== -1 ||\n formAction.indexOf('mautic') !== -1 || formId.indexOf('mauticform_') !== -1\n ) {\n return true;\n }\n\n return false;\n}\n\n/**\n * Sending Ajax for checking form data\n */\nfunction sendAjaxCheckingFormData(form, prev, formOriginal) {\n // Get visible fields and set cookie\n var visible_fields = {};\n visible_fields[0] = apbct_collect_visible_fields(form);\n apbct_visible_fields_set_cookie( visible_fields );\n\n var data = {};\n var elems = form.elements;\n elems = Array.prototype.slice.call(elems);\n\n elems.forEach( function( elem, y ) {\n if( elem.name === '' ) {\n data['input_' + y] = elem.value;\n } else {\n data[elem.name] = elem.value;\n }\n });\n\n apbct_public_sendAJAX(\n data,\n {\n async: false,\n callback: function( result, data, params, obj ){\n\n if( result.apbct === undefined || ! +result.apbct.blocked ) {\n\n let form_new = jQuery(form).detach();\n let prev = form.apbctPrev;\n let formOriginal = form.apbctFormOriginal;\n let mautic_integration = false;\n\n apbct_replace_inputs_values_from_other_form(form_new, formOriginal);\n\n //mautic forms integration\n if (formOriginal.id.indexOf('mautic') !== -1) {\n mautic_integration = true\n }\n let placeholders = document.getElementsByClassName('cleantalk_placeholder')\n if (placeholders) {\n for (let i = 0; i < placeholders.length; i++) {\n let mautic_hidden_gdpr_id = placeholders[i].getAttribute(\"mautic_hidden_gdpr_id\")\n if (typeof(mautic_hidden_gdpr_id) !== 'undefined') {\n let mautic_gdpr_radio = jQuery(formOriginal).find('#' + mautic_hidden_gdpr_id)\n if (typeof(mautic_gdpr_radio) !== 'undefined') {\n mautic_gdpr_radio.prop(\"checked\", true);\n }\n }\n }\n }\n\n prev.after( formOriginal );\n\n // Clear visible_fields input\n jQuery(formOriginal).find('input[name=\"apbct_visible_fields\"]').remove();\n jQuery(formOriginal).find('input[value=\"cleantalk_force_ajax_check\"]').remove();\n\n\n //Common click event\n var subm_button = jQuery(formOriginal).find('button[type=submit]');\n if( subm_button.length !== 0 ) {\n subm_button[0].click();\n if (mautic_integration) {\n setTimeout(function () {\n ct_protect_external()\n }, 1500);\n }\n return;\n }\n\n subm_button = jQuery(formOriginal).find('input[type=submit]');\n if( subm_button.length !== 0 ) {\n subm_button[0].click();\n return;\n }\n\n // ConvertKit direct integration\n subm_button = jQuery(formOriginal).find('button[data-element=\"submit\"]');\n if( subm_button.length !== 0 ) {\n subm_button[0].click();\n return;\n }\n\n // Paypal integration\n subm_button = jQuery(formOriginal).find('input[type=\"image\"][name=\"submit\"]');\n if( subm_button.length !== 0 ) {\n subm_button[0].click();\n }\n\n }\n if (result.apbct !== undefined && +result.apbct.blocked) {\n ctParseBlockMessage(result);\n }\n }\n }\n );\n}\n\nfunction ct_check_internal(currForm){\n \n//Gathering data\n var ct_data = {},\n elems = currForm.elements;\n\n for (var key in elems) {\n if(elems[key].type == 'submit' || elems[key].value == undefined || elems[key].value == '')\n continue;\n ct_data[elems[key].name] = currForm.elements[key].value;\n }\n ct_data['action'] = 'ct_check_internal';\n\n //AJAX Request\n apbct_public_sendAJAX(\n ct_data,\n {\n url: ctPublicFunctions._ajax_url,\n callback: function (data) {\n if(data.success === true){\n currForm.submit();\n }else{\n alert(data.data);\n return false;\n }\n }\n }\n );\n}\n\ndocument.addEventListener('DOMContentLoaded',function(){\n let ct_currAction = '',\n ct_currForm = '';\n\n if( ! +ctPublic.settings__forms__check_internal ) {\n return;\n }\n\n let ctPrevHandler;\n\tfor( let i=0; i<document.forms.length; i++ ){\n\t\tif ( typeof(document.forms[i].action) == 'string' ){\n ct_currForm = document.forms[i];\n\t\t\tct_currAction = ct_currForm.action;\n if (\n ct_currAction.indexOf('https?://') !== null && // The protocol is obligatory\n ct_currAction.match(ctPublic.blog_home + '.*?\\.php') !== null && // Main check\n ! ct_check_internal__is_exclude_form(ct_currAction) // Exclude WordPress native scripts from processing\n ) {\n ctPrevHandler = ct_currForm.click;\n if ( typeof jQuery !== 'undefined' ) {\n jQuery(ct_currForm).off('**');\n jQuery(ct_currForm).off();\n jQuery(ct_currForm).on('submit', function(event){\n ct_check_internal(event.target);\n return false;\n });\n }\n }\n\t\t}\n\t}\n});\n\n/**\n * Check by action to exclude the form checking\n * @param action string\n * @return boolean\n */\nfunction ct_check_internal__is_exclude_form(action) {\n // An array contains forms action need to be excluded.\n let ct_internal_script_exclusions = [\n 'wp-login.php', // WordPress login page\n 'wp-comments-post.php', // WordPress Comments Form\n ];\n\n return ct_internal_script_exclusions.some((item) => {\n return action.match(new RegExp(ctPublic.blog_home + '.*' + item)) !== null;\n });\n}"],"names":["ApbctCore","ajax_parameters","rest_parameters","selector","elements","eventCallback","eventSelector","event","constructor","this","select","HTMLCollection","Array","prototype","slice","call","document","querySelectorAll","deselect","addElement","elemToAdd","push","elem","reduce","css","style","getRaw","let","style_name","DOM_style_name","replace","group","toUpperCase","i","length","computedStyle","getComputedStyle","Number","hide","prop","display","show","addClass","classList","add","className","removeClass","remove","toggleClass","toggle","ajax","ApbctAjax","rest","ApbctRest","on","args","addEventListener","onChecker","bind","target","querySelector","stopPropagation","ready","callback","change","attr","attrName","outputValue","propName","value","html","val","data","name","is","filter","isElem","elemToCheck","match","newlyCreatedElement","createElement","Boolean","HTMLElement","HTMLUnknownElement","indexOf","tagName","toLowerCase","isWithoutSelector","splice","parent","parentElement","parents","children","siblings","current","after","content","append","fadeIn","time","opacity","last","Date","tick","window","requestAnimationFrame","setTimeout","fadeOut","apbct","params","ApbctXhr","xhr","XMLHttpRequest","method","url","async","user","password","button","spinner","progressbar","context","onErrorCallback","responseType","headers","timeout","methods_to_convert_data_to_URL","body","http_code","status_text","parameters","key","console","log","prepare","Object","keys","deleteDoubleJSONEncoding","convertData","open","setHeaders","onreadystatechange","onReadyStateChange","onload","onLoad","onprogress","onProgress","onerror","onError","ontimeout","onTimeout","send","setAttribute","cursor","complete","status","statusText","removeAttribute","on_ready_state_change","on_progress","error","response","additional_msg","error_string","errorOutput","error_msg","header_name","setRequestHeader","convertDataToURL","convertDataToBody","params_appendix","URLSearchParams","toString","params_prefix","dataKey","FormData","JSON","stringify","object","objectKey","parsedValue","parse","super","default_route","ctPublicFunctions","_rest_url","route","X-WP-Nonce","_rest_nonce","ctSetCookie","cookies","expires","force_alternative_method_for_cookies","skip_alt","data__cookies_type","forced_alt_cookies_set","forEach","item","arr","apbctLocalStorage","set","encodeURIComponent","ctSetAlternativeCookie","ctNoCookieAttachHiddenFieldsToForms","ctSecure","location","protocol","cookie","cookiePrefix","getJavascriptClientData","e","data__ajax_type","apbct_public_sendREST","apbct_public_sendAJAX","action","notJson","ctGetCookie","matches","RegExp","decodeURIComponent","undefined","ctDeleteCookie","cookieName","obj","_params","callback_context","callback_params","silent","no_nonce","_ajax_url","_ajax_nonce","Math","random","no_cache","get","property","storageValue","localStorage","getItem","json","hasOwnProperty","is_json","objToSave","timestamp","floor","getTime","setItem","isAlive","maxLifetime","isSet","delete","removeItem","getCleanTalkData","ct_date","ctTimeMs","ctMouseEventTimerFlag","ctMouseData","ctMouseDataCounter","ctCheckedEmails","apbct_attach_event_handler","attachEvent","apbct_remove_event_handler","removeEventListener","detachEvent","ctMouseReadInterval","ctMouseWriteDataInterval","ctFunctionFirstKey","ctKeyStopStopListening","ctFunctionMouseMove","ctPublic","data__key_is_ok","setInterval","ctSetMouseMoved","round","clientY","clientX","ctMouseStopData","clearInterval","checkEmail","current_email","email","result","now","ctSetPixelImg","pixelUrl","insertedImg","pixel__enabled","getElementById","ctGetPixelUrl","local_storage_pixel_url","ctSetHasScrolled","ctPreloadLocalStorage","data__to_local_storage","entries","apbct_ready","cookiesType","initCookies","getTimezoneOffset","apbctGetScreenInfo","navigator","webdriver","cookiesArray","split","trim","pixel__setting","pixel__url","data__email_check_before_post","forms","hiddenInput","visibleFieldsToInput","form","data__visible_fields_required","contains","id","apbct_collect_visible_fields","btoa","onsubmit_prev","onsubmit","ctFormIndex","visible_fields","apbct_visible_fields_set_cookie","Function","encodedEmailNodes","href","ctFillDecodedEmailHandler","encodedEmailNodesIsMixed","popup_text","encoder_popup","innerHTML","waiting_popup","innerText","apbctAjaxEmailDecodeBulk","click_source","event_javascript_data","post_url","referrer","encodedEmails","encoded_emails_collection","preventDefault","apbctTooltip","dataset","originalString","apbctEmailEncoderCallbackBulk","res","resetEncodedNodes","ctShowDecodeComment","success","is_allowed","current_result_data","row","encoded_email","encodedEmail","baseElementContent","decoded_email","ctProcessDecodedDataResult","popup","click","comment","element","common_cookies","resultDataJson","apbct_headless","apbct_pixel_url","ct_checked_emails","ct_checkjs","ct_fkp_timestamp","ct_pointer_data","ct_ps_timestamp","ct_screen_info","ct_timezone","ctMouseMovedLocalStorage","ctHasScrolledLocalStorage","ctCookiesTypeLocalStorage","ctMouseMovedCookie","ctHasScrolledCookie","ctCookiesTypeCookie","ct_mouse_moved","ct_has_scrolled","ct_cookies_type","removeDoubleJsonEncoding","targetElement","ctFillDecodedEmail","inputs","inputs_visible","inputs_visible_count","inputs_invisible","inputs_invisible_count","inputs_with_duplicate_names","isNaN","getAttribute","visibility","visible_fields_count","invisible_fields","invisible_fields_count","visible_fields_collection","form_id","collection","apbct_js_keys__set_input_value","js_key","fullWidth","documentElement","scrollWidth","fullHeight","max","scrollHeight","offsetHeight","clientHeight","visibleWidth","clientWidth","visibleHeight","ctParseBlockMessage","blocked","dispatchEvent","CustomEvent","bubbles","detail","message","cleantalkModal","loaded","stop_script","stop","ctSetPixelUrlLocalstorage","ajax_pixel_url","ctNoCookieConstructHiddenField","field","no_cookie_data","ctNoCookieGetForms","getElementsByName","j","parentNode","removeChild","readyState","jQuery","ajaxComplete","settings","responseText","loading","opened","opening","load","apbct_admin_sendAJAX","renderCss","cssStr","styles","overlayCss","z-index","position","top","left","width","height","background","justify-content","align-items","innerCss","padding","border","border-radius","box-shadow","closeCss","right","box-sizing","closeCssBefore","transform","closeCssAfter","bodyCss","overflow","cleantalkModalStyle","overlay","inner","close","test","renderedMsg","buttons_to_handle","apbct_gdpr_handle_buttons","index","apbct_gdpr_item","disabled","old_notice","gdpr_notice_for_button","info","ct_protect_external","currentForm","ct_method","cleantalk_hidden_action","cleantalk_hidden_method","isIntegratedForm","apbctProcessExternalForm","hostname","ct_action","type","appendChild","apbctProcessIframes","formIsExclusion","frames","getElementsByTagName","contentDocument","iframeForms","y","iterator","documentObject","cleantalk_placeholder","prev","insertBefore","previousSibling","form_html","outerHTML","form_original","placeholder","force_action","firstElementChild","reUseCurrentForm","mailerlite_detected_class","apbctPrev","apbctFormOriginal","mailerlite_class","mailerliteSubmitButton","find","sendAjaxCheckingFormData","currentTarget","checkbox","clone","apbct_replace_inputs_values_from_other_form","form_source","form_target","inputs_source","inputs_target","each","elem_source","source","index2","elem_target","formObj","formAction","formId","firstChild","formOriginal","elems","form_new","detach","mautic_integration","placeholders","getElementsByClassName","mautic_hidden_gdpr_id","mautic_gdpr_radio","subm_button","ct_check_internal","currForm","ct_data","alert","submit","ct_check_internal__is_exclude_form","some","blog_home","ctPublicGDPR","gdpr_forms","gdpr_title","first","buttons_collection","gdpr_text","settings__forms__check_external","ct_currForm","ct_currAction","settings__forms__check_internal","off"],"mappings":"MAAM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ADAC,EAAgB,GAGpB,GAAM,CAACrS,SAASsS,gCAKnB,IAAKxhB,IAAIM,EAAE,EAAGA,EAAEjB,SAASmS,MAAMjR,OAAQD,CAAC,GACE,UAApC,OAAOjB,SAASmS,MAAMlR,GAAS,QAIiB,QAFpDihB,GADSD,EAAcjiB,SAASmS,MAAMlR,IACVqL,QAEDlI,QAAQ,WAAW,GACwB,OAAzD8d,EAAcpe,MAAM+L,SAAS4R,UAAY,SAAU,GACjDF,mCAAmCW,CAAa,IAElCD,EAAY7M,MACL,aAAlB,OAAO4E,SACRA,OAAOiI,CAAW,EAAEG,IAAI,IAAI,EAC5BpI,OAAOiI,CAAW,EAAEG,IAAI,EACxBpI,OAAOiI,CAAW,EAAE3f,GAAG,SAAU,SAAS/C,GAEtC,OADA2hB,kBAAkB3hB,EAAMoD,MAAM,EACvB,CAAA,CACX,CAAC,GAKrB,CAAC"}
1
+ {"version":3,"file":"apbct-public-bundle.min.js","sources":["apbct-public-bundle.js"],"sourcesContent":["class ApbctCore{\n\n ajax_parameters = {};\n rest_parameters = {};\n\n selector = null;\n elements = [];\n\n // Event properties\n eventCallback;\n eventSelector;\n event;\n\n /**\n * Default constructor\n */\n constructor(selector){\n this.select(selector);\n }\n\n /**\n * Get elements by CSS selector\n *\n * @param selector\n * @returns {*}\n */\n select(selector) {\n\n if(selector instanceof HTMLCollection){\n this.selector = null;\n this.elements = [];\n this.elements = Array.prototype.slice.call(selector);\n }else if( typeof selector === 'object' ){\n this.selector = null;\n this.elements = [];\n this.elements[0] = selector;\n }else if( typeof selector === 'string' ){\n this.selector = selector;\n this.elements = Array.prototype.slice.call(document.querySelectorAll(selector));\n // this.elements = document.querySelectorAll(selector)[0];\n }else{\n this.deselect();\n }\n\n return this;\n }\n\n addElement(elemToAdd){\n if( typeof elemToAdd === 'object' ){\n this.elements.push(elemToAdd);\n }else if( typeof elemToAdd === 'string' ){\n this.selector = elemToAdd;\n this.elements = Array.prototype.slice.call(document.querySelectorAll(elemToAdd));\n }else{\n this.deselect();\n }\n }\n\n push(elem){\n this.elements.push(elem);\n }\n\n reduce(){\n this.elements = this.elements.slice(0,-1);\n }\n\n deselect(){\n this.elements = [];\n }\n\n /**\n * Set or get CSS for/of currently selected element\n *\n * @param style\n * @param getRaw\n *\n * @returns {boolean|*}\n */\n css(style, getRaw){\n\n getRaw = getRaw | false;\n\n // Set style\n if(typeof style === \"object\"){\n\n const stringToCamelCase = str =>\n str.replace(/([-_][a-z])/g, group =>\n group\n .toUpperCase()\n .replace('-', '')\n .replace('_', '')\n );\n\n // Apply multiple styles\n for(let style_name in style){\n let DOM_style_name = stringToCamelCase(style_name);\n\n // Apply to multiple elements (currently selected)\n for(let i=0; i<this.elements.length; i++){\n this.elements[i].style[DOM_style_name] = style[style_name];\n }\n }\n\n return this;\n }\n\n // Get style of first currently selected element\n if(typeof style === 'string'){\n\n let computedStyle = getComputedStyle(this.elements[0])[style];\n\n // Process\n if( typeof computedStyle !== 'undefined' && ! getRaw){\n computedStyle = computedStyle.replace(/(\\d)(em|pt|%|px){1,2}$/, '$1'); // Cut of units\n computedStyle = Number(computedStyle) == computedStyle ? Number(computedStyle) : computedStyle; // Cast to INT\n return computedStyle;\n }\n\n // Return unprocessed\n return computedStyle;\n }\n }\n\n hide(){\n this.prop('prev-display', this.css('display'));\n this.css({'display': 'none'});\n }\n\n show(){\n this.css({'display': this.prop('prev-display')});\n }\n\n addClass(){\n for(let i=0; i<this.elements.length; i++){\n this.elements[i].classList.add(className);\n }\n }\n\n removeClass(){\n for(let i=0; i<this.elements.length; i++){\n this.elements[i].classList.remove(className);\n }\n }\n\n toggleClass(className){\n for(let i=0; i<this.elements.length; i++){\n this.elements[i].classList.toggle(className);\n }\n }\n\n /**\n * Wrapper for apbctAJAX class\n *\n * @param ajax_parameters\n * @returns {ApbctAjax}\n */\n ajax(ajax_parameters){\n this.ajax_parameters = ajax_parameters;\n return new ApbctAjax(ajax_parameters);\n }\n\n /**\n * Wrapper for apbctREST class\n *\n * @param rest_parameters\n * @returns {ApbctRest}\n */\n rest(rest_parameters){\n this.rest_parameters = rest_parameters;\n return new ApbctRest(rest_parameters);\n }\n\n /************** EVENTS **************/\n\n /**\n *\n * Why the mess with arguments?\n *\n * Because we need to support the following function signatures:\n * on('click', function(){ alert('some'); });\n * on('click', 'inner_selector', function(){ alert('some'); });\n *\n * @param args\n */\n on(...args){\n\n this.event = args[0];\n this.eventCallback = args[2] || args[1];\n this.eventSelector = typeof args[1] === \"string\" ? args[1] : null;\n\n for(let i=0; i<this.elements.length; i++){\n this.elements[i].addEventListener(\n this.event,\n this.eventSelector !== null\n ? this.onChecker.bind(this)\n : this.eventCallback\n );\n }\n }\n\n /**\n * Check if a selector of an event matches current target\n *\n * @param event\n * @returns {*}\n */\n onChecker(event){\n if(event.target === document.querySelector(this.eventSelector)){\n event.stopPropagation();\n return this.eventCallback(event);\n }\n }\n\n ready(callback){\n document.addEventListener('DOMContentLoaded', callback);\n }\n\n change(callback){\n this.on('change', callback);\n }\n\n /************** ATTRIBUTES **************/\n\n /**\n * Get an attribute or property of an element\n *\n * @param attrName\n * @returns {*|*[]}\n */\n attr(attrName){\n\n let outputValue = [];\n\n for(let i=0; i<this.elements.length; i++){\n\n // Use property instead of attribute if possible\n if(typeof this.elements[i][attrName] !== undefined){\n outputValue.push(this.elements[i][attrName]);\n }else{\n outputValue.push(this.elements[i].getAttribute(attrName));\n }\n }\n\n // Return a single value instead of array if only one value is present\n return outputValue.length === 1 ? outputValue[0] : outputValue;\n }\n\n prop(propName, value){\n\n // Setting values\n if(typeof value !== \"undefined\"){\n for(let i=0; i<this.elements.length; i++){\n this.elements[i][propName] = value;\n }\n\n return this;\n\n // Getting values\n }else{\n\n let outputValue = [];\n\n for(let i=0; i<this.elements.length; i++){\n outputValue.push(this.elements[i][propName]);\n }\n\n // Return a single value instead of array if only one value is present\n return outputValue.length === 1 ? outputValue[0] : outputValue;\n }\n }\n\n /**\n * Set or get inner HTML\n *\n * @param value\n * @returns {*|*[]}\n */\n html(value){\n return typeof value !== 'undefined'\n ? this.prop('innerHTML', value)\n : this.prop('innerHTML');\n }\n\n /**\n * Set or get value of input tags\n *\n * @param value\n * @returns {*|*[]|undefined}\n */\n val(value){\n return typeof value !== 'undefined'\n ? this.prop('value', value)\n : this.prop('value');\n }\n\n data(name, value){\n return typeof value !== 'undefined'\n ? this.prop('apbct-data', name, value)\n : this.prop('apbct-data');\n }\n\n /************** END OF ATTRIBUTES **************/\n\n /************** FILTERS **************/\n\n /**\n * Check if the current elements are corresponding to filter\n *\n * @param filter\n * @returns {boolean}\n */\n is(filter){\n\n let outputValue = false;\n\n for(let elem of this.elements){\n outputValue ||= this.isElem(elem, filter);\n }\n\n return outputValue;\n }\n\n isElem(elemToCheck, filter){\n\n let is = false;\n let isRegisteredTagName = function(name){\n let newlyCreatedElement = document.createElement(name).constructor;\n return ! Boolean( ~[HTMLElement, HTMLUnknownElement].indexOf(newlyCreatedElement) );\n };\n\n // Check for filter function\n if(typeof filter === 'function') {\n is ||= filter.call(this, elemToCheck);\n }\n\n // Check for filter function\n if(typeof filter === 'string') {\n\n // Filter is tag name\n if( filter.match(/^[a-z]/) && isRegisteredTagName(filter) ){\n is ||= elemToCheck.tagName.toLowerCase() === filter.toLowerCase();\n\n // Filter is property\n }else if( filter.match(/^[a-z]/) ){\n is ||= Boolean(elemToCheck[filter]);\n\n // Filter is CSS selector\n }else {\n is ||= this.selector !== null\n ? document.querySelector(this.selector + filter) !== null // If possible\n : this.isWithoutSelector(elemToCheck, filter); // Search through all elems with such selector\n }\n }\n\n return is;\n }\n\n isWithoutSelector(elemToCheck, filter){\n\n let elems = document.querySelectorAll(filter);\n let outputValue = false;\n\n for(let elem of elems){\n outputValue ||= elemToCheck === elem;\n }\n\n return outputValue;\n }\n\n filter(filter){\n\n this.selector = null;\n\n for( let i = this.elements.length - 1; i >= 0; i-- ){\n if( ! this.isElem(this.elements[i], filter) ){\n this.elements.splice(Number(i), 1);\n }\n }\n\n return this;\n }\n\n /************** NODES **************/\n\n parent(filter){\n\n this.select(this.elements[0].parentElement);\n\n if( typeof filter !== 'undefined' && ! this.is(filter) ){\n this.deselect();\n }\n\n return this;\n }\n\n parents(filter){\n\n this.select(this.elements[0]);\n\n for ( ; this.elements[ this.elements.length - 1].parentElement !== null ; ) {\n this.push(this.elements[ this.elements.length - 1].parentElement);\n }\n\n this.elements.splice(0,1); // Deleting initial element from the set\n\n if( typeof filter !== 'undefined' ){\n this.filter(filter);\n }\n\n return this;\n }\n\n children(filter){\n\n this.select(this.elements[0].children);\n\n if( typeof filter !== 'undefined' ){\n this.filter(filter);\n }\n\n return this;\n }\n\n siblings(filter){\n\n let current = this.elements[0]; // Remember current to delete it later\n\n this.parent();\n this.children(filter);\n this.elements.splice(this.elements.indexOf(current), 1); // Remove current element\n\n return this;\n }\n\n /************** DOM MANIPULATIONS **************/\n remove(){\n for(let elem of this.elements){\n elem.remove();\n }\n }\n\n after(content){\n for(let elem of this.elements){\n elem.after(content);\n }\n }\n\n append(content){\n for(let elem of this.elements){\n elem.append(content);\n }\n }\n\n /************** ANIMATION **************/\n fadeIn(time) {\n for(let elem of this.elements){\n elem.style.opacity = 0;\n elem.style.display = 'block';\n\n let last = +new Date();\n const tick = function () {\n elem.style.opacity = +elem.style.opacity + (new Date() - last) / time;\n last = +new Date();\n\n if (+elem.style.opacity < 1) {\n (window.requestAnimationFrame && requestAnimationFrame(tick)) || setTimeout(tick, 16);\n }\n };\n\n tick();\n }\n }\n\n fadeOut(time) {\n for(let elem of this.elements){\n elem.style.opacity = 1;\n\n let last = +new Date();\n const tick = function () {\n elem.style.opacity = +elem.style.opacity - (new Date() - last) / time;\n last = +new Date();\n\n if (+elem.style.opacity > 0) {\n (window.requestAnimationFrame && requestAnimationFrame(tick)) || setTimeout(tick, 16);\n } else {\n elem.style.display = 'none';\n }\n };\n\n tick();\n }\n }\n}\n\n/**\n * Hack\n *\n * Make a proxy to keep both properties and methods from:\n * - the native object and\n * - the new one from ApbctCore for selected element.\n *\n * For example:\n * apbct('#id).innerHTML = 'some';\n * apbct('#id).css({'backgorund-color': 'black'});\n */\n// apbct = new Proxy(\n// apbct,\n// {\n// get(target, prop) {\n// if (target.elements.length) {\n// return target.elements[0][prop];\n// } else {\n// return null;\n// }\n// },\n// set(target, prop, value){\n// if (target.elements.length) {\n// target.elements[0][prop] = value;\n// return true;\n// } else {\n// return false;\n// }\n// },\n// apply(target, thisArg, argArray) {\n//\n// }\n// }\n// );\n\n/**\n * Enter point to ApbctCore class\n *\n * @param params\n * @returns {*}\n */\nfunction apbct(params){\n return new ApbctCore()\n .select(params);\n}\nclass ApbctXhr{\n\n xhr = new XMLHttpRequest();\n\n // Base parameters\n method = 'POST'; // HTTP-request type\n url = ''; // URL to send the request\n async = true;\n user = null; // HTTP-authorization username\n password = null; // HTTP-authorization password\n data = {}; // Data to send\n\n\n // Optional params\n button = null; // Button that should be disabled when request is performing\n spinner = null; // Spinner that should appear when request is in process\n progressbar = null; // Progress bar for the current request\n context = this; // Context\n callback = null;\n onErrorCallback = null;\n\n responseType = 'json'; // Expected data type from server\n headers = {};\n timeout = 15000; // Request timeout in milliseconds\n\n methods_to_convert_data_to_URL = [\n 'GET',\n 'HEAD',\n ];\n\n body = null;\n http_code = 0;\n status_text = '';\n\n constructor(parameters){\n\n console.log('%cXHR%c started', 'color: red; font-weight: bold;', 'color: grey; font-weight: normal;');\n\n // Set class properties\n for( let key in parameters ){\n if( typeof this[key] !== 'undefined' ){\n this[key] = parameters[key];\n }\n }\n\n // Modifying DOM-elements\n this.prepare();\n\n // Modify URL with data for GET and HEAD requests\n if ( Object.keys(this.data).length ) {\n this.deleteDoubleJSONEncoding(this.data);\n this.convertData();\n }\n\n if( ! this.url ){\n console.log('%cXHR%c not URL provided', 'color: red; font-weight: bold;', 'color: grey; font-weight: normal;')\n return false;\n }\n\n // Configure the request\n this.xhr.open(this.method, this.url, this.async, this.user, this.password);\n this.setHeaders();\n\n this.xhr.responseType = this.responseType;\n this.xhr.timeout = this.timeout;\n\n /* EVENTS */\n // Monitoring status\n this.xhr.onreadystatechange = function(){\n this.onReadyStateChange();\n }.bind(this);\n\n // Run callback\n this.xhr.onload = function(){\n this.onLoad();\n }.bind(this);\n\n // On progress\n this.xhr.onprogress = function(event){\n this.onProgress(event);\n }.bind(this);\n\n // On error\n this.xhr.onerror = function(){\n this.onError();\n }.bind(this);\n\n this.xhr.ontimeout = function(){\n this.onTimeout();\n }.bind(this);\n\n // Send the request\n this.xhr.send(this.body);\n }\n\n prepare(){\n\n // Disable button\n if(this.button){\n this.button.setAttribute('disabled', 'disabled');\n this.button.style.cursor = 'not-allowed';\n }\n\n // Enable spinner\n if(this.spinner) {\n this.spinner.style.display = 'inline';\n }\n }\n\n complete(){\n\n this.http_code = this.xhr.status;\n this.status_text = this.xhr.statusText;\n\n // Disable button\n if(this.button){\n this.button.removeAttribute('disabled');\n this.button.style.cursor = 'auto';\n }\n\n // Enable spinner\n if(this.spinner) {\n this.spinner.style.display = 'none';\n }\n\n if( this.progressbar ) {\n this.progressbar.fadeOut('slow');\n }\n }\n\n onReadyStateChange(){\n if (this.on_ready_state_change !== null && typeof this.on_ready_state_change === 'function'){\n this.on_ready_state_change();\n }\n }\n\n onProgress(event) {\n if (this.on_progress !== null && typeof this.on_progress === 'function'){\n this.on_progress();\n }\n }\n\n onError(){\n\n console.log('error');\n\n this.complete();\n this.error(\n this.http_code,\n this.status_text\n );\n\n if (this.onErrorCallback !== null && typeof this.onErrorCallback === 'function'){\n this.onErrorCallback(this.status_text);\n }\n }\n\n onTimeout(){\n this.complete();\n this.error(\n 0,\n 'timeout'\n );\n\n if (this.onErrorCallback !== null && typeof this.onErrorCallback === 'function'){\n this.onErrorCallback('Timeout');\n }\n }\n\n onLoad(){\n\n this.complete();\n\n if (this.responseType === 'json' ){\n if(this.xhr.response === null){\n this.error(this.http_code, this.status_text, 'No response');\n return false;\n }else if( typeof this.xhr.response.error !== 'undefined') {\n this.error(this.http_code, this.status_text, this.xhr.response.error);\n return false;\n }\n }\n\n if (this.callback !== null && typeof this.callback === 'function') {\n this.callback.call(this.context, this.xhr.response, this.data);\n }\n }\n\n error(http_code, status_text, additional_msg){\n\n let error_string = '';\n\n if( status_text === 'timeout' ){\n error_string += 'Server response timeout'\n\n }else if( http_code === 200 ){\n\n if( status_text === 'parsererror' ){\n error_string += 'Unexpected response from server. See console for details.';\n }else {\n error_string += 'Unexpected error. Status: ' + status_text + '.';\n if( typeof additional_msg !== 'undefined' )\n error_string += ' Additional error info: ' + additional_msg;\n }\n\n }else if(http_code === 500){\n error_string += 'Internal server error.';\n\n }else {\n error_string += 'Unexpected response code:' + http_code;\n }\n\n this.errorOutput( error_string );\n }\n\n errorOutput(error_msg){\n console.log( '%c ctXHR error: %c' + error_msg, 'color: red;', 'color: grey;' );\n }\n\n setHeaders(){\n // Set headers if passed\n for( let header_name in this.headers ){\n if( typeof this.headers[header_name] !== 'undefined' ){\n this.xhr.setRequestHeader(header_name, this.headers[header_name]);\n }\n }\n }\n\n convertData()\n {\n // GET, HEAD request-type\n if( ~this.methods_to_convert_data_to_URL.indexOf( this.method ) ){\n return this.convertDataToURL();\n\n // POST request-type\n }else{\n return this.convertDataToBody()\n }\n }\n\n convertDataToURL(){\n let params_appendix = new URLSearchParams(this.data).toString();\n let params_prefix = this.url.match(/^(https?:\\/{2})?[a-z0-9.]+\\?/) ? '&' : '?';\n this.url += params_prefix + params_appendix;\n\n return this.url;\n }\n\n /**\n *\n * @returns {null}\n */\n convertDataToBody()\n {\n this.body = new FormData();\n\n for (let dataKey in this.data) {\n this.body.append(\n dataKey,\n typeof this.data[dataKey] === 'object'\n ? JSON.stringify(this.data[dataKey])\n : this.data[dataKey]\n );\n }\n\n return this.body;\n }\n\n /**\n * Recursive\n *\n * Recursively decode JSON-encoded properties\n *\n * @param object\n * @returns {*}\n */\n deleteDoubleJSONEncoding(object){\n\n if( typeof object === 'object'){\n\n for (let objectKey in object) {\n\n // Recursion\n if( typeof object[objectKey] === 'object'){\n object[objectKey] = this.deleteDoubleJSONEncoding(object[objectKey]);\n }\n\n // Common case (out)\n if(\n typeof object[objectKey] === 'string' &&\n object[objectKey].match(/^[\\[{].*?[\\]}]$/) !== null // is like JSON\n ){\n let parsedValue = JSON.parse(object[objectKey]);\n if( typeof parsedValue === 'object' ){\n object[objectKey] = parsedValue;\n }\n }\n }\n }\n\n return object;\n }\n}\nclass ApbctAjax extends ApbctXhr{\n\n constructor(...args) {\n super(args[0]);\n }\n}\nclass ApbctRest extends ApbctXhr{\n\n static default_route = ctPublicFunctions._rest_url + 'cleantalk-antispam/v1/';\n route = '';\n\n constructor(...args) {\n args = args[0];\n args.url = ApbctRest.default_route + args.route;\n args.headers = {\n \"X-WP-Nonce\": ctPublicFunctions._rest_nonce\n };\n super(args);\n }\n}\n\nfunction ctSetCookie( cookies, value, expires ){\n\n let force_alternative_method_for_cookies = [\n 'ct_sfw_pass_key',\n 'ct_sfw_passed',\n 'wordpress_apbct_antibot',\n 'apbct_anticrawler_passed',\n 'apbct_antiflood_passed',\n 'apbct_email_encoder_passed'\n ]\n\n if( typeof cookies === 'string' && typeof value === 'string' || typeof value === 'number'){\n var skip_alt = cookies === 'ct_pointer_data';\n cookies = [ [ cookies, value, expires ] ];\n }\n\n // Cookies disabled\n if( ctPublicFunctions.data__cookies_type === 'none' ){\n let forced_alt_cookies_set = []\n cookies.forEach( function (item, i, arr\t) {\n if (force_alternative_method_for_cookies.indexOf(item[0]) !== -1) {\n forced_alt_cookies_set.push(item)\n } else {\n apbctLocalStorage.set(item[0], encodeURIComponent(item[1]))\n }\n });\n if ( forced_alt_cookies_set.length > 0 ){\n ctSetAlternativeCookie(forced_alt_cookies_set)\n }\n ctNoCookieAttachHiddenFieldsToForms()\n // Using traditional cookies\n }else if( ctPublicFunctions.data__cookies_type === 'native' ){\n cookies.forEach( function (item, i, arr\t) {\n var expires = typeof item[2] !== 'undefined' ? \"expires=\" + expires + '; ' : '';\n var ctSecure = location.protocol === 'https:' ? '; secure' : '';\n document.cookie = ctPublicFunctions.cookiePrefix + item[0] + \"=\" + encodeURIComponent(item[1]) + \"; \" + expires + \"path=/; samesite=lax\" + ctSecure;\n });\n\n // Using alternative cookies\n }else if( ctPublicFunctions.data__cookies_type === 'alternative' && ! skip_alt ) {\n ctSetAlternativeCookie(cookies)\n }\n}\n\nfunction ctSetAlternativeCookie(cookies, params) {\n\n if (typeof (getJavascriptClientData) === \"function\" ){\n //reprocess already gained cookies data\n if (Array.isArray(cookies)) {\n cookies = getJavascriptClientData(cookies);\n }\n } else {\n console.log('APBCT ERROR: getJavascriptClientData() is not loaded')\n }\n\n try {\n cookies = JSON.parse(cookies)\n } catch (e){\n console.log('APBCT ERROR: JSON parse error:' + e)\n return\n }\n\n const callback = params && params.callback || null;\n const onErrorCallback = params && params.onErrorCallback || null;\n\n if( params && params.searchForm ) {\n cookies.apbct_search_forms_params = true;\n }\n\n // Using REST API handler\n if( ctPublicFunctions.data__ajax_type === 'rest' ){\n apbct_public_sendREST(\n 'alt_sessions',\n {\n method: 'POST',\n data: { cookies: cookies },\n callback: callback,\n onErrorCallback: onErrorCallback\n }\n );\n\n // Using AJAX request and handler\n } else if( ctPublicFunctions.data__ajax_type === 'admin_ajax' ) {\n apbct_public_sendAJAX(\n {\n action: 'apbct_alt_session__save__AJAX',\n cookies: cookies,\n },\n {\n notJson: 1,\n callback: callback,\n onErrorCallback: onErrorCallback\n }\n );\n }\n}\n\n/**\n * Get cookie by name\n * @param name\n * @returns {string|undefined}\n */\nfunction ctGetCookie(name) {\n var matches = document.cookie.match(new RegExp(\n \"(?:^|; )\" + name.replace(/([\\.$?*|{}\\(\\)\\[\\]\\\\\\/\\+^])/g, '\\\\$1') + \"=([^;]*)\"\n ));\n return matches ? decodeURIComponent(matches[1]) : undefined;\n}\n\nfunction ctDeleteCookie(cookieName) {\n // Cookies disabled\n if( ctPublicFunctions.data__cookies_type === 'none' ){\n return;\n\n // Using traditional cookies\n }else if( ctPublicFunctions.data__cookies_type === 'native' ){\n\n var ctSecure = location.protocol === 'https:' ? '; secure' : '';\n document.cookie = cookieName + \"=\\\"\\\"; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; samesite=lax\" + ctSecure;\n\n // Using alternative cookies\n }else if( ctPublicFunctions.data__cookies_type === 'alternative' ){\n // @ToDo implement this logic\n }\n}\n\nfunction apbct_public_sendAJAX(data, params, obj){\n\n // Default params\n let _params = [];\n _params[\"callback\"] = params.callback || null;\n _params[\"onErrorCallback\"] = params.onErrorCallback || null;\n _params[\"callback_context\"] = params.callback_context || null;\n _params[\"callback_params\"] = params.callback_params || null;\n _params[\"async\"] = params.async || true;\n _params[\"notJson\"] = params.notJson || null;\n _params[\"timeout\"] = params.timeout || 15000;\n _params[\"obj\"] = obj || null;\n _params[\"button\"] = params.button || null;\n _params[\"progressbar\"] = params.progressbar || null;\n _params[\"silent\"] = params.silent || null;\n _params[\"no_nonce\"] = params.no_nonce || null;\n _params[\"data\"] = data;\n _params[\"url\"] = ctPublicFunctions._ajax_url;\n\n if(typeof (data) === 'string') {\n if( ! _params[\"no_nonce\"] ) {\n _params[\"data\"] = _params[\"data\"] + '&_ajax_nonce=' + ctPublicFunctions._ajax_nonce;\n }\n _params[\"data\"] = _params[\"data\"] + '&no_cache=' + Math.random()\n } else {\n if( ! _params[\"no_nonce\"] ) {\n _params[\"data\"]._ajax_nonce = ctPublicFunctions._ajax_nonce;\n }\n _params[\"data\"].no_cache = Math.random();\n }\n\n new ApbctCore().ajax(_params);\n}\n\nfunction apbct_public_sendREST( route, params ) {\n\n let _params = [];\n _params[\"route\"] = route;\n _params[\"callback\"] = params.callback || null;\n _params[\"onErrorCallback\"] = params.onErrorCallback || null;\n _params[\"data\"] = params.data || [];\n _params[\"method\"] = params.method || 'POST';\n\n new ApbctCore().rest(_params);\n}\n\nlet apbctLocalStorage = {\n get : function(key, property) {\n if ( typeof property === 'undefined' ) {\n property = 'value';\n }\n const storageValue = localStorage.getItem(key);\n if ( storageValue !== null ) {\n try {\n const json = JSON.parse(storageValue);\n return json.hasOwnProperty(property) ? JSON.parse(json[property]) : json;\n } catch (e) {\n return storageValue;\n }\n }\n return false;\n },\n set : function(key, value, is_json = true) {\n if (is_json){\n let objToSave = {'value': JSON.stringify(value), 'timestamp': Math.floor(new Date().getTime() / 1000)};\n localStorage.setItem(key, JSON.stringify(objToSave));\n } else {\n localStorage.setItem(key, value);\n }\n },\n isAlive : function(key, maxLifetime) {\n if ( typeof maxLifetime === 'undefined' ) {\n maxLifetime = 86400;\n }\n const keyTimestamp = this.get(key, 'timestamp');\n return keyTimestamp + maxLifetime > Math.floor(new Date().getTime() / 1000);\n },\n isSet : function(key) {\n return localStorage.getItem(key) !== null;\n },\n delete : function (key) {\n localStorage.removeItem(key);\n },\n getCleanTalkData : function () {\n let data = {}\n for(let i=0; i<localStorage.length; i++) {\n let key = localStorage.key(i);\n if (key.indexOf('ct_') !==-1 || key.indexOf('apbct_') !==-1){\n data[key.toString()] = apbctLocalStorage.get(key)\n }\n }\n return data\n },\n\n}\nvar ct_date = new Date(),\n\tctTimeMs = new Date().getTime(),\n\tctMouseEventTimerFlag = true, //Reading interval flag\n\tctMouseData = [],\n\tctMouseDataCounter = 0,\n\tctCheckedEmails = {};\n\nfunction apbct_attach_event_handler(elem, event, callback){\n\tif(typeof window.addEventListener === \"function\") elem.addEventListener(event, callback);\n\telse elem.attachEvent(event, callback);\n}\n\nfunction apbct_remove_event_handler(elem, event, callback){\n\tif(typeof window.removeEventListener === \"function\") elem.removeEventListener(event, callback);\n\telse elem.detachEvent(event, callback);\n}\n\n//Writing first key press timestamp\nvar ctFunctionFirstKey = function output(event){\n\tvar KeyTimestamp = Math.floor(new Date().getTime()/1000);\n\tctSetCookie(\"ct_fkp_timestamp\", KeyTimestamp);\n\tctKeyStopStopListening();\n};\n\nif (ctPublic.data__key_is_ok) {\n\t//Reading interval\n\tvar ctMouseReadInterval = setInterval(function(){\n\t\tctMouseEventTimerFlag = true;\n\t}, 150);\n\n\t//Writting interval\n\tvar ctMouseWriteDataInterval = setInterval(function(){\n\t\tctSetCookie(\"ct_pointer_data\", JSON.stringify(ctMouseData));\n\t}, 1200);\n}\n\n\n//Logging mouse position each 150 ms\nvar ctFunctionMouseMove = function output(event){\n\tctSetMouseMoved();\n\tif(ctMouseEventTimerFlag === true){\n\n\t\tctMouseData.push([\n\t\t\tMath.round(event.clientY),\n\t\t\tMath.round(event.clientX),\n\t\t\tMath.round(new Date().getTime() - ctTimeMs)\n\t\t]);\n\n\t\tctMouseDataCounter++;\n\t\tctMouseEventTimerFlag = false;\n\t\tif(ctMouseDataCounter >= 50){\n\t\t\tctMouseStopData();\n\t\t}\n\t}\n};\n\n//Stop mouse observing function\nfunction ctMouseStopData(){\n\tapbct_remove_event_handler(document, \"mousemove\", ctFunctionMouseMove);\n\tclearInterval(ctMouseReadInterval);\n\tclearInterval(ctMouseWriteDataInterval);\n}\n\n//Stop key listening function\nfunction ctKeyStopStopListening(){\n\tapbct_remove_event_handler(document, \"mousedown\", ctFunctionFirstKey);\n\tapbct_remove_event_handler(document, \"keydown\", ctFunctionFirstKey);\n}\n\nfunction checkEmail(e) {\n\tvar current_email = e.target.value;\n\tif (current_email && !(current_email in ctCheckedEmails)) {\n\t\t// Using REST API handler\n\t\tif( ctPublicFunctions.data__ajax_type === 'rest' ){\n\t\t\tapbct_public_sendREST(\n\t\t\t\t'check_email_before_post',\n\t\t\t\t{\n\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\tdata: {'email' : current_email},\n\t\t\t\t\tcallback: function (result) {\n\t\t\t\t\t\tif (result.result) {\n\t\t\t\t\t\t\tctCheckedEmails[current_email] = {'result' : result.result, 'timestamp': Date.now() / 1000 |0};\n\t\t\t\t\t\t\tctSetCookie('ct_checked_emails', JSON.stringify(ctCheckedEmails));\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t);\n\t\t\t// Using AJAX request and handler\n\t\t} else if( ctPublicFunctions.data__ajax_type === 'admin_ajax' ) {\n\t\t\tapbct_public_sendAJAX(\n\t\t\t\t{\n\t\t\t\t\taction: 'apbct_email_check_before_post',\n\t\t\t\t\temail : current_email,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcallback: function (result) {\n\t\t\t\t\t\tif (result.result) {\n\t\t\t\t\t\t\tctCheckedEmails[current_email] = {'result' : result.result, 'timestamp': Date.now() / 1000 |0};\n\t\t\t\t\t\t\tctSetCookie('ct_checked_emails', JSON.stringify(ctCheckedEmails));\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t}\n}\n\nfunction ctSetPixelImg(pixelUrl) {\n\tctSetCookie('apbct_pixel_url', pixelUrl);\n\tif( +ctPublic.pixel__enabled ){\n\t\tif( ! document.getElementById('apbct_pixel') ) {\n\t\t\tlet insertedImg = document.createElement('img');\n\t\t\tinsertedImg.setAttribute('alt', 'CleanTalk Pixel');\n\t\t\tinsertedImg.setAttribute('id', 'apbct_pixel');\n\t\t\tinsertedImg.setAttribute('style', 'display: none; left: 99999px;');\n\t\t\tinsertedImg.setAttribute('src', pixelUrl);\n\t\t\tapbct('body').append(insertedImg);\n\t\t}\n\t}\n}\n\nfunction ctGetPixelUrl() {\n\t// Check if pixel is already in localstorage and is not outdated\n\tlet local_storage_pixel_url = apbctLocalStorage.get('apbct_pixel_url');\n\tif ( local_storage_pixel_url !== false ) {\n\t\tif ( apbctLocalStorage.isAlive('apbct_pixel_url', 3600 * 3) ) {\n\t\t\tapbctLocalStorage.delete('apbct_pixel_url')\n\t\t} else {\n\t\t\t//if so - load pixel from localstorage and draw it skipping AJAX\n\t\t\tctSetPixelImg(local_storage_pixel_url);\n\t\t\treturn;\n\t\t}\n\t}\n\t// Using REST API handler\n\tif( ctPublicFunctions.data__ajax_type === 'rest' ){\n\t\tapbct_public_sendREST(\n\t\t\t'apbct_get_pixel_url',\n\t\t\t{\n\t\t\t\tmethod: 'POST',\n\t\t\t\tcallback: function (result) {\n\t\t\t\t\tif (result) {\n\t\t\t\t\t\t//set pixel url to localstorage\n\t\t\t\t\t\tif ( ! apbctLocalStorage.get('apbct_pixel_url') ){\n\t\t\t\t\t\t\t//set pixel to the storage\n\t\t\t\t\t\t\tapbctLocalStorage.set('apbct_pixel_url', result)\n\t\t\t\t\t\t\t//update pixel data in the hidden fields\n\t\t\t\t\t\t\tctNoCookieAttachHiddenFieldsToForms()\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//then run pixel drawing\n\t\t\t\t\t\tctSetPixelImg(result);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t}\n\t\t);\n\t\t// Using AJAX request and handler\n\t}else{\n\t\tapbct_public_sendAJAX(\n\t\t\t{\n\t\t\t\taction: 'apbct_get_pixel_url',\n\t\t\t},\n\t\t\t{\n\t\t\t\tnotJson: true,\n\t\t\t\tcallback: function (result) {\n\t\t\t\t\tif (result) {\n\t\t\t\t\t\t//set pixel url to localstorage\n\t\t\t\t\t\tif ( ! apbctLocalStorage.get('apbct_pixel_url') ){\n\t\t\t\t\t\t\t//set pixel to the storage\n\t\t\t\t\t\t\tapbctLocalStorage.set('apbct_pixel_url', result)\n\t\t\t\t\t\t\t//update pixel data in the hidden fields\n\t\t\t\t\t\t\tctNoCookieAttachHiddenFieldsToForms()\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//then run pixel drawing\n\t\t\t\t\t\tctSetPixelImg(result);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t}\n\t\t);\n\t}\n}\n\nfunction ctSetHasScrolled() {\n\tif( ! apbctLocalStorage.isSet('ct_has_scrolled') || ! apbctLocalStorage.get('ct_has_scrolled') ) {\n\t\tctSetCookie(\"ct_has_scrolled\", 'true');\n\t\tapbctLocalStorage.set('ct_has_scrolled', true);\n\t}\n}\n\nfunction ctSetMouseMoved() {\n\tif( ! apbctLocalStorage.isSet('ct_mouse_moved') || ! apbctLocalStorage.get('ct_mouse_moved') ) {\n\t\tctSetCookie(\"ct_mouse_moved\", 'true');\n\t\tapbctLocalStorage.set('ct_mouse_moved', true);\n\t}\n}\n\nfunction ctPreloadLocalStorage(){\n\tif (ctPublic.data__to_local_storage){\n\t\tlet data = Object.entries(ctPublic.data__to_local_storage)\n\t\tdata.forEach(([key, value]) => {\n\t\t\tapbctLocalStorage.set(key,value)\n\t\t});\n\t}\n}\n\nif (ctPublic.data__key_is_ok) {\n\tapbct_attach_event_handler(document, \"mousemove\", ctFunctionMouseMove);\n\tapbct_attach_event_handler(document, \"mousedown\", ctFunctionFirstKey);\n\tapbct_attach_event_handler(document, \"keydown\", ctFunctionFirstKey);\n\tapbct_attach_event_handler(document, \"scroll\", ctSetHasScrolled);\n}\n\n// Ready function\nfunction apbct_ready(){\n\n\tctPreloadLocalStorage()\n\n\tlet cookiesType = apbctLocalStorage.get('ct_cookies_type');\n\tif ( ! cookiesType || cookiesType !== ctPublic.data__cookies_type ) {\n\t\tapbctLocalStorage.set('ct_cookies_type', ctPublic.data__cookies_type);\n\t\tapbctLocalStorage.delete('ct_mouse_moved');\n\t\tapbctLocalStorage.delete('ct_has_scrolled');\n\t}\n\n\t// Collect scrolling info\n\tvar initCookies = [\n\t\t[\"ct_ps_timestamp\", Math.floor(new Date().getTime() / 1000)],\n\t\t[\"ct_fkp_timestamp\", \"0\"],\n\t\t[\"ct_pointer_data\", \"0\"],\n\t\t[\"ct_timezone\", ct_date.getTimezoneOffset()/60*(-1) ],\n\t\t[\"ct_screen_info\", apbctGetScreenInfo()],\n\t\t[\"apbct_headless\", navigator.webdriver],\n\t];\n\n\tapbctLocalStorage.set('ct_ps_timestamp', Math.floor(new Date().getTime() / 1000));\n\tapbctLocalStorage.set('ct_fkp_timestamp', \"0\");\n\tapbctLocalStorage.set('ct_pointer_data', \"0\");\n\tapbctLocalStorage.set('ct_timezone', ct_date.getTimezoneOffset()/60*(-1) );\n\tapbctLocalStorage.set('ct_screen_info', apbctGetScreenInfo());\n\tapbctLocalStorage.set('apbct_headless', navigator.webdriver);\n\n\tif( ctPublic.data__cookies_type !== 'native' ) {\n\t\tinitCookies.push(['apbct_visible_fields', '0']);\n\t} else {\n\t\t// Delete all visible fields cookies on load the page\n\t\tvar cookiesArray = document.cookie.split(\";\");\n\t\tif( cookiesArray.length !== 0 ) {\n\t\t\tfor ( var i = 0; i < cookiesArray.length; i++ ) {\n\t\t\t\tvar currentCookie = cookiesArray[i].trim();\n\t\t\t\tvar cookieName = currentCookie.split(\"=\")[0];\n\t\t\t\tif( cookieName.indexOf(\"apbct_visible_fields_\") === 0 ) {\n\t\t\t\t\tctDeleteCookie(cookieName);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tif( +ctPublic.pixel__setting ){\n\t\tif( +ctPublic.pixel__enabled ){\n\t\t\tctGetPixelUrl()\n\t\t} else {\n\t\t\tinitCookies.push(['apbct_pixel_url', ctPublic.pixel__url]);\n\t\t}\n\t}\n\n\tif ( +ctPublic.data__email_check_before_post) {\n\t\tinitCookies.push(['ct_checked_emails', '0']);\n\t\tapbct(\"input[type = 'email'], #email\").on('blur', checkEmail);\n\t}\n\n\tif (apbctLocalStorage.isSet('ct_checkjs')) {\n\t\tinitCookies.push(['ct_checkjs', apbctLocalStorage.get('ct_checkjs')]);\n\t} else {\n\t\tinitCookies.push(['ct_checkjs', 0]);\n\t}\n\n\tctSetCookie(initCookies);\n\n\tsetTimeout(function(){\n\n\t\tctNoCookieAttachHiddenFieldsToForms()\n\n\t\tfor(var i = 0; i < document.forms.length; i++){\n\t\t\tvar form = document.forms[i];\n\n\t\t\t//Exclusion for forms\n\t\t\tif (\n\t\t\t\t+ctPublic.data__visible_fields_required === 0 ||\n\t\t\t\t(form.method.toString().toLowerCase() === 'get' && form.querySelectorAll('.nf-form-content').length === 0) ||\n\t\t\t\tform.classList.contains('slp_search_form') || //StoreLocatorPlus form\n\t\t\t\tform.parentElement.classList.contains('mec-booking') ||\n\t\t\t\tform.action.toString().indexOf('activehosted.com') !== -1 || // Active Campaign\n\t\t\t\t(form.id && form.id === 'caspioform') || //Caspio Form\n\t\t\t\t(form.classList && form.classList.contains('tinkoffPayRow')) || // TinkoffPayForm\n\t\t\t\t(form.classList && form.classList.contains('give-form')) || // GiveWP\n\t\t\t\t(form.id && form.id === 'ult-forgot-password-form') || //ult forgot password\n\t\t\t\t(form.id && form.id.toString().indexOf('calculatedfields') !== -1) || // CalculatedFieldsForm\n\t\t\t\t(form.id && form.id.toString().indexOf('sac-form') !== -1) || // Simple Ajax Chat\n\t\t\t\t(form.id && form.id.toString().indexOf('cp_tslotsbooking_pform') !== -1) || // WP Time Slots Booking Form\n\t\t\t\t(form.name && form.name.toString().indexOf('cp_tslotsbooking_pform') !== -1) || // WP Time Slots Booking Form\n\t\t\t\tform.action.toString() === 'https://epayment.epymtservice.com/epay.jhtml' || // Custom form\n\t\t\t\t(form.name && form.name.toString().indexOf('tribe-bar-form') !== -1) || // The Events Calendar\n\t\t\t\t(form.id && form.id === 'ihf-login-form') || //Optima Express login\n\t\t\t\t(form.id && form.id === 'subscriberForm' && form.action.toString().indexOf('actionType=update') !== -1) //Optima Express update\n\t\t\t) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tvar hiddenInput = document.createElement( 'input' );\n\t\t\thiddenInput.setAttribute( 'type', 'hidden' );\n\t\t\thiddenInput.setAttribute( 'id', 'apbct_visible_fields_' + i );\n\t\t\thiddenInput.setAttribute( 'name', 'apbct_visible_fields');\n\t\t\tvar visibleFieldsToInput = {};\n\t\t\tvisibleFieldsToInput[0] = apbct_collect_visible_fields(form);\n\t\t\thiddenInput.value = btoa(JSON.stringify(visibleFieldsToInput));\n\t\t\tform.append( hiddenInput );\n\n\t\t\tform.onsubmit_prev = form.onsubmit;\n\n\t\t\tform.ctFormIndex = i;\n\t\t\tform.onsubmit = function (event) {\n\n\t\t\t\tif ( ctPublic.data__cookies_type !== 'native' && typeof event.target.ctFormIndex !== 'undefined' ) {\n\n\t\t\t\t\tvar visible_fields = {};\n\t\t\t\t\tvisible_fields[0] = apbct_collect_visible_fields(this);\n\t\t\t\t\tapbct_visible_fields_set_cookie( visible_fields, event.target.ctFormIndex );\n\t\t\t\t}\n\n\t\t\t\t// Call previous submit action\n\t\t\t\tif (event.target.onsubmit_prev instanceof Function) {\n\t\t\t\t\tsetTimeout(function () {\n\t\t\t\t\t\tevent.target.onsubmit_prev.call(event.target, event);\n\t\t\t\t\t}, 500);\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\n\t}, 1000);\n\n\t// Listen clicks on encoded emails\n\tlet encodedEmailNodes = document.querySelectorAll(\"[data-original-string]\");\n\tctPublic.encodedEmailNodes = encodedEmailNodes\n\tif (encodedEmailNodes.length) {\n\t\tfor (let i = 0; i < encodedEmailNodes.length; ++i) {\n\t\t\tif (\n\t\t\t\tencodedEmailNodes[i].parentElement.href ||\n\t\t\t\tencodedEmailNodes[i].parentElement.parentElement.href\n\t\t\t) {\n\t\t\t\t// Skip listening click on hyperlinks\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tencodedEmailNodes[i].addEventListener('click', ctFillDecodedEmailHandler);\n\t\t}\n\t}\n\n\t/**\n\t * WordPress Search form processing\n\t */\n\tfor (const _form of document.forms) {\n\t\tif ( _form.getAttribute('id') === 'searchform' && ctPublic.data__cookies_type === 'none' ) {\n\t\t\t_form.apbctSearchPrevOnsubmit = _form.onsubmit;\n\t\t\t_form.onsubmit = (e) => {\n\t\t\t\tconst noCookie = _form.querySelector('[name=\"ct_no_cookie_hidden_field\"]');\n\t\t\t\tif ( noCookie !== null ) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tconst callBack = () => {\n\t\t\t\t\t\tif (_form.apbctSearchPrevOnsubmit instanceof Function) {\n\t\t\t\t\t\t\t_form.apbctSearchPrevOnsubmit();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tHTMLFormElement.prototype.submit.call(_form);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tlet parsedCookies = atob(noCookie.value);\n\n\t\t\t\t\tif ( parsedCookies.length !== 0 ) {\n\t\t\t\t\t\tctSetAlternativeCookie(\n\t\t\t\t\t\t\tparsedCookies,\n\t\t\t\t\t\t\t{callback: callBack, onErrorCallback: callBack, searchForm: true}\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcallBack();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\nif (ctPublic.data__key_is_ok) {\n\tif (document.readyState !== 'loading') {\n\t\tapbct_ready();\n\t} else {\n\t\tapbct_attach_event_handler(document, \"DOMContentLoaded\", apbct_ready);\n\t}\n}\n\nfunction ctFillDecodedEmailHandler(event) {\n\tthis.removeEventListener('click', ctFillDecodedEmailHandler);\n\t//remember click_source\n\tlet click_source = this\n\t//globally remember if emails is mixed with mailto\n\tctPublic.encodedEmailNodesIsMixed = false\n\t//get fade\n\tdocument.body.classList.add('apbct-popup-fade')\n\t//popup show\n\tlet encoder_popup = document.getElementById('apbct_popup')\n\tif (!encoder_popup){\n\t\tlet waiting_popup = document.createElement('div')\n\t\twaiting_popup.setAttribute('class', 'apbct-popup')\n\t\twaiting_popup.setAttribute('id', 'apbct_popup')\n\t\tlet popup_text = document.createElement('p')\n\t\tpopup_text.setAttribute('id', 'apbct_popup_text')\n\t\tpopup_text.innerText = \"Please wait while CleanTalk decoding email addresses..\"\n\t\twaiting_popup.append(popup_text)\n\t\tdocument.body.append(waiting_popup)\n\t} else {\n\t\tencoder_popup.setAttribute('style','display: inherit')\n\t\tdocument.getElementById('apbct_popup_text').innerHTML = \"Please wait while CleanTalk decoding email addresses..\"\n\t}\n\n\tapbctAjaxEmailDecodeBulk(event,ctPublic.encodedEmailNodes,click_source)\n}\n\nfunction apbctAjaxEmailDecodeBulk(event, encodedEmailNodes, click_source){\n\t//collect data\n\tconst javascriptClientData = getJavascriptClientData();\n\tlet data = {\n\t\tevent_javascript_data: javascriptClientData,\n\t\tpost_url: document.location.href,\n\t\treferrer: document.referrer,\n\t\tencodedEmails: ''\n\t};\n\tlet encoded_emails_collection = {}\n\tfor (let i = 0; i < encodedEmailNodes.length; i++){\n\t\t//disable click for mailto\n\t\tif (typeof encodedEmailNodes[i].href !== 'undefined' && encodedEmailNodes[i].href.indexOf('mailto:') === 0) {\n\t\t\tevent.preventDefault()\n\t\t\tctPublic.encodedEmailNodesIsMixed = true;\n\t\t}\n\n\t\t// Adding a tooltip\n\t\tlet apbctTooltip = document.createElement('div');\n\t\tapbctTooltip.setAttribute('class', 'apbct-tooltip');\n\t\tapbct(encodedEmailNodes[i]).append(apbctTooltip);\n\n\t\t//collect encoded email strings\n\t\tencoded_emails_collection[i] = encodedEmailNodes[i].dataset.originalString;\n\t}\n\n\t//JSONify encoded email strings\n\tdata.encodedEmails = JSON.stringify(encoded_emails_collection)\n\n\t// Using REST API handler\n\tif( ctPublicFunctions.data__ajax_type === 'rest' ){\n\t\tapbct_public_sendREST(\n\t\t\t'apbct_decode_email',\n\t\t\t{\n\t\t\t\tdata: data,\n\t\t\t\tmethod: 'POST',\n\t\t\t\tcallback: function(result) {\n\t\t\t\t\t//set alternative cookie to skip next pages encoding\n\t\t\t\t\tctSetCookie('apbct_email_encoder_passed','1')\n\t\t\t\t\tapbctEmailEncoderCallbackBulk(result, encodedEmailNodes, click_source);\n\t\t\t\t},\n\t\t\t\tonErrorCallback: function (res) {\n\t\t\t\t\tresetEncodedNodes()\n\t\t\t\t\tctShowDecodeComment(res);\n\t\t\t\t},\n\t\t\t}\n\t\t);\n\n\t\t// Using AJAX request and handler\n\t}else{\n\t\tdata.action = 'apbct_decode_email';\n\t\tapbct_public_sendAJAX(\n\t\t\tdata,\n\t\t\t{\n\t\t\t\tnotJson: false,\n\t\t\t\tcallback: function(result) {\n\t\t\t\t\t//set alternative cookie to skip next pages encoding\n\t\t\t\t\tctSetCookie('apbct_email_encoder_passed','1')\n\t\t\t\t\tapbctEmailEncoderCallbackBulk(result, encodedEmailNodes, click_source);\n\t\t\t\t},\n\t\t\t\tonErrorCallback: function (res) {\n\t\t\t\t\tresetEncodedNodes()\n\t\t\t\t\tctShowDecodeComment(res);\n\t\t\t\t},\n\t\t\t}\n\t\t);\n\t}\n}\n\nfunction apbctEmailEncoderCallbackBulk(result, encodedEmailNodes, click_source){\n\n\tif (result.success && result.data[0].is_allowed === true){\n\t\t//start process of visual decoding\n\t\tsetTimeout(function(){\n\t\t\tfor (let i = 0; i < encodedEmailNodes.length; i++) {\n\t\t\t\t//chek what is what\n\t\t\t\tlet current_result_data\n\t\t\t\tresult.data.forEach((row) => {\n\t\t\t\t\tif (row.encoded_email === encodedEmailNodes[i].dataset.originalString){\n\t\t\t\t\t\tcurrent_result_data = row\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t//quit case on cloud block\n\t\t\t\tif (current_result_data.is_allowed === false){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t//handler for mailto\n\t\t\t\tif (typeof encodedEmailNodes[i].href !== 'undefined' && encodedEmailNodes[i].href.indexOf('mailto:') === 0) {\n\t\t\t\t\tlet encodedEmail = encodedEmailNodes[i].href.replace('mailto:', '');\n\t\t\t\t\tlet baseElementContent = encodedEmailNodes[i].innerHTML;\n\t\t\t\t\tencodedEmailNodes[i].innerHTML = baseElementContent.replace(encodedEmail, current_result_data.decoded_email);\n\t\t\t\t\tencodedEmailNodes[i].href = 'mailto:' + current_result_data.decoded_email;\n\t\t\t\t}\n\t\t\t\t// fill the nodes\n\t\t\t\tctProcessDecodedDataResult(current_result_data, encodedEmailNodes[i]);\n\t\t\t\t//remove listeners\n\t\t\t\tencodedEmailNodes[i].removeEventListener('click', ctFillDecodedEmailHandler)\n\t\t\t}\n\t\t\t//popup remove\n\t\t\tlet popup = document.getElementById('apbct_popup')\n\t\t\tif (popup !== null){\n\t\t\t\tdocument.body.classList.remove('apbct-popup-fade')\n\t\t\t\tpopup.setAttribute('style','display:none')\n\t\t\t\t//click on mailto if so\n\t\t\t\tif (ctPublic.encodedEmailNodesIsMixed){\n\t\t\t\t\tclick_source.click();\n\t\t\t\t}\n\t\t\t}\n\t\t}, 3000);\n\t} else {\n\t\tif (result.success){\n\t\t\tresetEncodedNodes()\n\t\t\tctShowDecodeComment('Blocked: ' + result.data[0].comment)\n\t\t} else {\n\t\t\tresetEncodedNodes()\n\t\t\tctShowDecodeComment('Cannot connect with CleanTalk server: ' + result.data[0].comment)\n\t\t}\n\t}\n}\n\nfunction resetEncodedNodes(){\n\tif (typeof ctPublic.encodedEmailNodes !== 'undefined'){\n\t\tctPublic.encodedEmailNodes.forEach(function (element){\n\t\t\telement.addEventListener('click', ctFillDecodedEmailHandler);\n\t\t})\n\t}\n}\n\nfunction getJavascriptClientData(common_cookies = []) {\n\tlet resultDataJson = {};\n\n\tresultDataJson.apbct_headless = !!ctGetCookie(ctPublicFunctions.cookiePrefix + 'apbct_headless');\n\tresultDataJson.apbct_pixel_url = ctGetCookie(ctPublicFunctions.cookiePrefix + 'apbct_pixel_url');\n\tresultDataJson.ct_checked_emails = ctGetCookie(ctPublicFunctions.cookiePrefix + 'ct_checked_emails');\n\tresultDataJson.ct_checkjs = ctGetCookie(ctPublicFunctions.cookiePrefix + 'ct_checkjs');\n\tresultDataJson.ct_fkp_timestamp = ctGetCookie(ctPublicFunctions.cookiePrefix + 'ct_fkp_timestamp');\n\tresultDataJson.ct_pointer_data = ctGetCookie(ctPublicFunctions.cookiePrefix + 'ct_pointer_data');\n\tresultDataJson.ct_ps_timestamp = ctGetCookie(ctPublicFunctions.cookiePrefix + 'ct_ps_timestamp');\n\tresultDataJson.ct_screen_info = ctGetCookie(ctPublicFunctions.cookiePrefix + 'ct_screen_info');\n\tresultDataJson.ct_timezone = ctGetCookie(ctPublicFunctions.cookiePrefix + 'ct_timezone');\n\n\t// collecting data from localstorage\n\tconst ctMouseMovedLocalStorage = apbctLocalStorage.get(ctPublicFunctions.cookiePrefix + 'ct_mouse_moved');\n\tconst ctHasScrolledLocalStorage = apbctLocalStorage.get(ctPublicFunctions.cookiePrefix + 'ct_has_scrolled');\n\tconst ctCookiesTypeLocalStorage = apbctLocalStorage.get(ctPublicFunctions.cookiePrefix + 'ct_cookies_type');\n\n\t// collecting data from cookies\n\tconst ctMouseMovedCookie = ctGetCookie(ctPublicFunctions.cookiePrefix + 'ct_mouse_moved');\n\tconst ctHasScrolledCookie = ctGetCookie(ctPublicFunctions.cookiePrefix + 'ct_has_scrolled');\n\tconst ctCookiesTypeCookie = ctGetCookie(ctPublicFunctions.cookiePrefix + 'ct_cookies_type');\n\n\tresultDataJson.ct_mouse_moved = ctMouseMovedLocalStorage !== undefined ? ctMouseMovedLocalStorage : ctMouseMovedCookie;\n\tresultDataJson.ct_has_scrolled = ctHasScrolledLocalStorage !== undefined ? ctHasScrolledLocalStorage : ctHasScrolledCookie;\n\tresultDataJson.ct_cookies_type = ctCookiesTypeLocalStorage !== undefined ? ctCookiesTypeLocalStorage : ctCookiesTypeCookie;\n\n\tif (\n\t\ttypeof (common_cookies) === \"object\"\n\t\t&& common_cookies !== []\n\t){\n\t\tfor (let i = 0; i < common_cookies.length; ++i){\n\t\t\tif ( typeof (common_cookies[i][1]) === \"object\" ){\n\t\t\t\t//this is for handle SFW cookies\n\t\t\t\tresultDataJson[common_cookies[i][1][0]] = common_cookies[i][1][1]\n\t\t\t} else {\n\t\t\t\tresultDataJson[common_cookies[i][0]] = common_cookies[i][1]\n\t\t\t}\n\t\t}\n\t} else {\n\t\tconsole.log('APBCT JS ERROR: Collecting data type mismatch')\n\t}\n\n\t// Parse JSON properties to prevent double JSON encoding\n\tresultDataJson = removeDoubleJsonEncoding(resultDataJson);\n\n\treturn JSON.stringify(resultDataJson);\n}\n\n/**\n * Recursive\n *\n * Recursively decode JSON-encoded properties\n *\n * @param object\n * @returns {*}\n */\nfunction removeDoubleJsonEncoding(object){\n\n\tif( typeof object === 'object'){\n\n\t\tfor (let objectKey in object) {\n\n\t\t\t// Recursion\n\t\t\tif( typeof object[objectKey] === 'object'){\n\t\t\t\tobject[objectKey] = removeDoubleJsonEncoding(object[objectKey]);\n\t\t\t}\n\n\t\t\t// Common case (out)\n\t\t\tif(\n\t\t\t\ttypeof object[objectKey] === 'string' &&\n\t\t\t\tobject[objectKey].match(/^[\\[{].*?[\\]}]$/) !== null // is like JSON\n\t\t\t){\n\t\t\t\tlet parsedValue = JSON.parse(object[objectKey]);\n\t\t\t\tif( typeof parsedValue === 'object' ){\n\t\t\t\t\tobject[objectKey] = parsedValue;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn object;\n}\n\nfunction ctProcessDecodedDataResult(response, targetElement) {\n\n\ttargetElement.setAttribute('title', '');\n\ttargetElement.removeAttribute('style');\n\tctFillDecodedEmail(targetElement, response.decoded_email);\n}\n\nfunction ctFillDecodedEmail(target, email){\n\n\tapbct(target).html(\n\t\tapbct(target)\n\t\t\t.html()\n\t\t\t.replace(/.+?(<div class=[\"']apbct-tooltip[\"'].+?<\\/div>)/, email + \"$1\")\n\t);\n}\n\nfunction ctShowDecodeComment(comment){\n\n\tif( ! comment ){\n\t\tcomment = 'Can not decode email. Unknown reason'\n\t}\n\n\tlet popup = document.getElementById('apbct_popup')\n\tlet popup_text = document.getElementById('apbct_popup_text')\n\tif (popup !== null){\n\t\tdocument.body.classList.remove('apbct-popup-fade')\n\t\tpopup_text.innerText = \"CleanTalk email decoder: \" + comment\n\t\tsetTimeout(function(){\n\t\t\tpopup.setAttribute('style','display:none')\n\t\t},3000)\n\t}\n}\n\nfunction apbct_collect_visible_fields( form ) {\n\n\t// Get only fields\n\tvar inputs = [],\n\t\tinputs_visible = '',\n\t\tinputs_visible_count = 0,\n\t\tinputs_invisible = '',\n\t\tinputs_invisible_count = 0,\n\t\tinputs_with_duplicate_names = [];\n\n\tfor(var key in form.elements){\n\t\tif(!isNaN(+key))\n\t\t\tinputs[key] = form.elements[key];\n\t}\n\n\t// Filter fields\n\tinputs = inputs.filter(function(elem){\n\n\t\t// Filter already added fields\n\t\tif( inputs_with_duplicate_names.indexOf( elem.getAttribute('name') ) !== -1 ){\n\t\t\treturn false;\n\t\t}\n\t\t// Filter inputs with same names for type == radio\n\t\tif( -1 !== ['radio', 'checkbox'].indexOf( elem.getAttribute(\"type\") )){\n\t\t\tinputs_with_duplicate_names.push( elem.getAttribute('name') );\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t});\n\n\t// Visible fields\n\tinputs.forEach(function(elem, i, elements){\n\t\t// Unnecessary fields\n\t\tif(\n\t\t\telem.getAttribute(\"type\") === \"submit\" || // type == submit\n\t\t\telem.getAttribute('name') === null ||\n\t\t\telem.getAttribute('name') === 'ct_checkjs'\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\t// Invisible fields\n\t\tif(\n\t\t\tgetComputedStyle(elem).display === \"none\" || // hidden\n\t\t\tgetComputedStyle(elem).visibility === \"hidden\" || // hidden\n\t\t\tgetComputedStyle(elem).opacity === \"0\" || // hidden\n\t\t\telem.getAttribute(\"type\") === \"hidden\" // type == hidden\n\t\t) {\n\t\t\tif( elem.classList.contains(\"wp-editor-area\") ) {\n\t\t\t\tinputs_visible += \" \" + elem.getAttribute(\"name\");\n\t\t\t\tinputs_visible_count++;\n\t\t\t} else {\n\t\t\t\tinputs_invisible += \" \" + elem.getAttribute(\"name\");\n\t\t\t\tinputs_invisible_count++;\n\t\t\t}\n\t\t}\n\t\t// Visible fields\n\t\telse {\n\t\t\tinputs_visible += \" \" + elem.getAttribute(\"name\");\n\t\t\tinputs_visible_count++;\n\t\t}\n\n\t});\n\n\tinputs_invisible = inputs_invisible.trim();\n\tinputs_visible = inputs_visible.trim();\n\n\treturn {\n\t\tvisible_fields : inputs_visible,\n\t\tvisible_fields_count : inputs_visible_count,\n\t\tinvisible_fields : inputs_invisible,\n\t\tinvisible_fields_count : inputs_invisible_count,\n\t}\n\n}\n\nfunction apbct_visible_fields_set_cookie( visible_fields_collection, form_id ) {\n\n\tvar collection = typeof visible_fields_collection === 'object' && visible_fields_collection !== null ? visible_fields_collection : {};\n\n\tif( ctPublic.data__cookies_type === 'native' ) {\n\t\tfor ( var i in collection ) {\n\t\t\tif ( i > 10 ) {\n\t\t\t\t// Do not generate more than 10 cookies\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar collectionIndex = form_id !== undefined ? form_id : i;\n\t\t\tctSetCookie(\"apbct_visible_fields_\" + collectionIndex, JSON.stringify( collection[i] ) );\n\t\t}\n\t} else {\n\t\tif (ctPublic.data__cookies_type === 'none'){\n\t\t\tctSetCookie(\"apbct_visible_fields\", JSON.stringify( collection[0] ) );\n\t\t} else {\n\t\t\tctSetCookie(\"apbct_visible_fields\", JSON.stringify( collection ) );\n\t\t}\n\n\t}\n}\n\nfunction apbct_js_keys__set_input_value(result, data, params, obj){\n\tif( document.querySelectorAll('[name^=ct_checkjs]').length > 0 ) {\n\t\tvar elements = document.querySelectorAll('[name^=ct_checkjs]');\n\t\tfor ( var i = 0; i < elements.length; i++ ) {\n\t\t\telements[i].value = result.js_key;\n\t\t}\n\t}\n}\n\nfunction apbctGetScreenInfo() {\n\treturn JSON.stringify({\n\t\tfullWidth : document.documentElement.scrollWidth,\n\t\tfullHeight : Math.max(\n\t\t\tdocument.body.scrollHeight, document.documentElement.scrollHeight,\n\t\t\tdocument.body.offsetHeight, document.documentElement.offsetHeight,\n\t\t\tdocument.body.clientHeight, document.documentElement.clientHeight\n\t\t),\n\t\tvisibleWidth : document.documentElement.clientWidth,\n\t\tvisibleHeight : document.documentElement.clientHeight,\n\t});\n}\n\nif(typeof jQuery !== 'undefined') {\n\n\t// Capturing responses and output block message for unknown AJAX forms\n\tjQuery(document).ajaxComplete(function (event, xhr, settings) {\n\t\tif (xhr.responseText && xhr.responseText.indexOf('\"apbct') !== -1) {\n\t\t\ttry {\n\t\t\t\tvar response = JSON.parse(xhr.responseText);\n\t\t\t} catch (e) {\n\t\t\t\tconsole.log(e.toString());\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tctParseBlockMessage(response);\n\t\t}\n\t});\n}\n\nfunction ctParseBlockMessage(response) {\n\n\tif (typeof response.apbct !== 'undefined') {\n\t\tresponse = response.apbct;\n\t\tif (response.blocked) {\n\t\t\tdocument.dispatchEvent(\n\t\t\t\tnew CustomEvent( \"apbctAjaxBockAlert\", {\n\t\t\t\t\tbubbles: true,\n\t\t\t\t\tdetail: { message: response.comment }\n\t\t\t\t} )\n\t\t\t);\n\n\t\t\t// Show the result by modal\n\t\t\tcleantalkModal.loaded = response.comment;\n\t\t\tcleantalkModal.open();\n\n\t\t\tif(+response.stop_script == 1)\n\t\t\t\twindow.stop();\n\t\t}\n\t}\n}\n\nfunction ctSetPixelUrlLocalstorage(ajax_pixel_url) {\n\t//set pixel to the storage\n\tctSetCookie('apbct_pixel_url', ajax_pixel_url)\n}\n\nfunction ctNoCookieConstructHiddenField(type){\n\tlet inputType = 'hidden';\n\tif (type === 'submit') {\n\t\tinputType = 'submit';\n\t}\n\tlet field = ''\n\tlet no_cookie_data = apbctLocalStorage.getCleanTalkData()\n\tno_cookie_data = JSON.stringify(no_cookie_data)\n\tno_cookie_data = btoa(no_cookie_data)\n\tfield = document.createElement('input')\n\tfield.setAttribute('id','ct_no_cookie_hidden_field')\n\tfield.setAttribute('name','ct_no_cookie_hidden_field')\n\tfield.setAttribute('value', no_cookie_data)\n\tfield.setAttribute('type', inputType)\n\tfield.classList.add('apbct_special_field');\n\treturn field\n}\n\nfunction ctNoCookieGetForms(){\n\tlet forms = document.forms\n\tif (forms) {\n\t\treturn forms\n\t}\n\treturn false\n}\n\nfunction ctNoCookieAttachHiddenFieldsToForms(){\n\n\tif (ctPublic.data__cookies_type !== 'none'){\n\t\treturn\n\t}\n\n\tlet forms = ctNoCookieGetForms()\n\n\tif (forms){\n\t\t//clear previous hidden set\n\t\tlet elements = document.getElementsByName('ct_no_cookie_hidden_field')\n\t\tif (elements){\n\t\t\tfor (let j = 0; j < elements.length; j++) {\n\t\t\t\telements[j].parentNode.removeChild(elements[j])\n\t\t\t}\n\t\t}\n\t\tfor ( let i = 0; i < forms.length; i++ ){\n\t\t\t//ignore forms with get method @todo We need to think about this\n\t\t\tif (document.forms[i].getAttribute('method') === null ||\n\t\t\t\tdocument.forms[i].getAttribute('method').toLowerCase() === 'post'){\n\t\t\t\t// add new set\n\t\t\t\tdocument.forms[i].append(ctNoCookieConstructHiddenField());\n\t\t\t}\n\t\t\tif ( document.forms[i].getAttribute('id') === 'searchform' ) {\n\t\t\t\tdocument.forms[i].append(ctNoCookieConstructHiddenField('submit'));\n\t\t\t}\n\t\t}\n\t}\n\n}\n/* Cleantalk Modal object */\nlet cleantalkModal = {\n\n // Flags\n loaded: false,\n loading: false,\n opened: false,\n opening: false,\n\n // Methods\n load: function( action ) {\n if( ! this.loaded ) {\n this.loading = true;\n let callback = function( result, data, params, obj ) {\n cleantalkModal.loading = false;\n cleantalkModal.loaded = result;\n document.dispatchEvent(\n new CustomEvent( \"cleantalkModalContentLoaded\", {\n bubbles: true,\n } )\n );\n };\n if( typeof apbct_admin_sendAJAX === \"function\" ) {\n apbct_admin_sendAJAX( { 'action' : action }, { 'callback': callback, 'notJson': true } );\n } else {\n apbct_public_sendAJAX( { 'action' : action }, { 'callback': callback, 'notJson': true } );\n }\n\n }\n },\n\n open: function () {\n /* Cleantalk Modal CSS start */\n var renderCss = function () {\n var cssStr = '';\n for ( let key in this.styles ) {\n cssStr += key + ':' + this.styles[key] + ';';\n }\n return cssStr;\n };\n var overlayCss = {\n styles: {\n \"z-index\": \"9999\",\n \"position\": \"fixed\",\n \"top\": \"0\",\n \"left\": \"0\",\n \"width\": \"100%\",\n \"height\": \"100%\",\n \"background\": \"rgba(0,0,0,0.5)\",\n \"display\": \"flex\",\n \"justify-content\" : \"center\",\n \"align-items\" : \"center\",\n },\n toString: renderCss\n };\n var innerCss = {\n styles: {\n \"position\" : \"relative\",\n \"padding\" : \"30px\",\n \"background\" : \"#FFF\",\n \"border\" : \"1px solid rgba(0,0,0,0.75)\",\n \"border-radius\" : \"4px\",\n \"box-shadow\" : \"7px 7px 5px 0px rgba(50,50,50,0.75)\",\n },\n toString: renderCss\n };\n var closeCss = {\n styles: {\n \"position\" : \"absolute\",\n \"background\" : \"#FFF\",\n \"width\" : \"20px\",\n \"height\" : \"20px\",\n \"border\" : \"2px solid rgba(0,0,0,0.75)\",\n \"border-radius\" : \"15px\",\n \"cursor\" : \"pointer\",\n \"top\" : \"-8px\",\n \"right\" : \"-8px\",\n \"box-sizing\" : \"content-box\",\n },\n toString: renderCss\n };\n var closeCssBefore = {\n styles: {\n \"content\" : \"\\\"\\\"\",\n \"display\" : \"block\",\n \"position\" : \"absolute\",\n \"background\" : \"#000\",\n \"border-radius\" : \"1px\",\n \"width\" : \"2px\",\n \"height\" : \"16px\",\n \"top\" : \"2px\",\n \"left\" : \"9px\",\n \"transform\" : \"rotate(45deg)\",\n },\n toString: renderCss\n };\n var closeCssAfter = {\n styles: {\n \"content\" : \"\\\"\\\"\",\n \"display\" : \"block\",\n \"position\" : \"absolute\",\n \"background\" : \"#000\",\n \"border-radius\" : \"1px\",\n \"width\" : \"2px\",\n \"height\" : \"16px\",\n \"top\" : \"2px\",\n \"left\" : \"9px\",\n \"transform\" : \"rotate(-45deg)\",\n },\n toString: renderCss\n };\n var bodyCss = {\n styles: {\n \"overflow\" : \"hidden\",\n },\n toString: renderCss\n };\n var cleantalkModalStyle = document.createElement( 'style' );\n cleantalkModalStyle.setAttribute( 'id', 'cleantalk-modal-styles' );\n cleantalkModalStyle.innerHTML = 'body.cleantalk-modal-opened{' + bodyCss + '}';\n cleantalkModalStyle.innerHTML += '#cleantalk-modal-overlay{' + overlayCss + '}';\n cleantalkModalStyle.innerHTML += '#cleantalk-modal-close{' + closeCss + '}';\n cleantalkModalStyle.innerHTML += '#cleantalk-modal-close:before{' + closeCssBefore + '}';\n cleantalkModalStyle.innerHTML += '#cleantalk-modal-close:after{' + closeCssAfter + '}';\n document.body.append( cleantalkModalStyle );\n /* Cleantalk Modal CSS end */\n\n var overlay = document.createElement( 'div' );\n overlay.setAttribute( 'id', 'cleantalk-modal-overlay' );\n document.body.append( overlay );\n\n document.body.classList.add( 'cleantalk-modal-opened' );\n\n var inner = document.createElement( 'div' );\n inner.setAttribute( 'id', 'cleantalk-modal-inner' );\n inner.setAttribute( 'style', innerCss );\n overlay.append( inner );\n\n var close = document.createElement( 'div' );\n close.setAttribute( 'id', 'cleantalk-modal-close' );\n inner.append( close );\n\n var content = document.createElement( 'div' );\n if ( this.loaded ) {\n var urlRegex = /(https?:\\/\\/[^\\s]+)/g;\n var service_content_regex = /.*\\/inc/g;\n if (service_content_regex.test(this.loaded)){\n content.innerHTML = this.loaded\n } else {\n var renderedMsg = this.loaded.replace(urlRegex, '<a href=\"$1\" target=\"_blank\">$1</a>');\n content.innerHTML = renderedMsg;\n }\n\n } else {\n content.innerHTML = 'Loading...';\n // @ToDo Here is hardcoded parameter. Have to get this from a 'data-' attribute.\n this.load( 'get_options_template' );\n }\n content.setAttribute( 'id', 'cleantalk-modal-content' );\n inner.append( content );\n\n this.opened = true;\n },\n\n close: function () {\n document.body.classList.remove( 'cleantalk-modal-opened' );\n document.getElementById( 'cleantalk-modal-overlay' ).remove();\n document.getElementById( 'cleantalk-modal-styles' ).remove();\n document.dispatchEvent(\n new CustomEvent( \"cleantalkModalClosed\", {\n bubbles: true,\n } )\n );\n }\n\n};\n\n/* Cleantalk Modal helpers */\ndocument.addEventListener('click',function( e ){\n if( e.target && (e.target.id === 'cleantalk-modal-overlay' || e.target.id === 'cleantalk-modal-close') ){\n cleantalkModal.close();\n }\n});\ndocument.addEventListener(\"cleantalkModalContentLoaded\", function( e ) {\n if( cleantalkModal.opened && cleantalkModal.loaded ) {\n document.getElementById( 'cleantalk-modal-content' ).innerHTML = cleantalkModal.loaded;\n }\n});\nlet buttons_to_handle = [];\n\ndocument.addEventListener('DOMContentLoaded', function(){\n\n\tif(\n\t\ttypeof ctPublicGDPR === 'undefined' ||\n\t\t! ctPublicGDPR.gdpr_forms.length\n\t) {\n\t\treturn;\n\t}\n\n\tlet gdpr_notice_for_button = ctPublicGDPR.gdpr_title;\n\n\tif ( typeof jQuery === 'undefined' ) {\n\t\treturn;\n\t}\n\ttry {\n\t\tctPublicGDPR.gdpr_forms.forEach(function(item, i){\n\n\t\t\tlet elem = jQuery('#'+item+', .'+item);\n\n\t\t\t// Filter forms\n\t\t\tif (!elem.is('form')){\n\t\t\t\t// Caldera\n\t\t\t\tif (elem.find('form')[0])\n\t\t\t\t\telem = elem.children('form').first();\n\t\t\t\t// Contact Form 7\n\t\t\t\telse if(\n\t\t\t\t\tjQuery('.wpcf7[role=form]')[0] && jQuery('.wpcf7[role=form]')\n\t\t\t\t\t\t.attr('id')\n\t\t\t\t\t\t.indexOf('wpcf7-f'+item) !== -1\n\t\t\t\t) {\n\t\t\t\t\telem = jQuery('.wpcf7[role=form]').children('form');\n\t\t\t\t}\n\n\t\t\t\t// Formidable\n\t\t\t\telse if(jQuery('.frm_forms')[0] && jQuery('.frm_forms').first().attr('id').indexOf('frm_form_'+item) !== -1)\n\t\t\t\t\telem = jQuery('.frm_forms').first().children('form');\n\t\t\t\t// WPForms\n\t\t\t\telse if(jQuery('.wpforms-form')[0] && jQuery('.wpforms-form').first().attr('id').indexOf('wpforms-form-'+item) !== -1)\n\t\t\t\t\telem = jQuery('.wpforms-form');\n\t\t\t}\n\n\t\t\t//disable forms buttons\n\t\t\tlet button = false\n\t\t\tlet buttons_collection= elem.find('input[type|=\"submit\"],button[type|=\"submit\"]')\n\n\t\t\tif (!buttons_collection.length) {\n\t\t\t\treturn\n\t\t\t} else {\n\t\t\t\tbutton = buttons_collection[0]\n\t\t\t}\n\n\t\t\tif (button !== false){\n\t\t\t\tbutton.disabled = true\n\t\t\t\tlet old_notice = jQuery(button).prop('title') ? jQuery(button).prop('title') : ''\n\t\t\t\tbuttons_to_handle.push({index:i,button:button,old_notice:old_notice})\n\t\t\t\tjQuery(button).prop('title', gdpr_notice_for_button)\n\t\t\t}\n\n\t\t\t// Adding notice and checkbox\n\t\t\tif(elem.is('form') || elem.attr('role') === 'form'){\n\t\t\t\telem.append('<input id=\"apbct_gdpr_'+i+'\" type=\"checkbox\" required=\"required\" style=\" margin-right: 10px;\" onchange=\"apbct_gdpr_handle_buttons()\">')\n\t\t\t\t\t.append('<label style=\"display: inline;\" for=\"apbct_gdpr_'+i+'\">'+ctPublicGDPR.gdpr_text+'</label>');\n\t\t\t}\n\t\t});\n\t} catch (e) {\n\t\tconsole.info('APBCT GDPR JS ERROR: Can not add GDPR notice' + e)\n\t}\n});\n\nfunction apbct_gdpr_handle_buttons(){\n\n\ttry {\n\n\t\tif (buttons_to_handle === []){\n\t\t\treturn\n\t\t}\n\n\t\tbuttons_to_handle.forEach((button) => {\n\t\t\tlet selector = '[id=\"apbct_gdpr_' + button.index + '\"]'\n\t\t\tlet apbct_gdpr_item = jQuery(selector)\n\t\t\t//chek if apbct_gdpr checkbox is set\n\t\t\tif (jQuery(apbct_gdpr_item).prop(\"checked\")){\n\t\t\t\tbutton.button.disabled = false\n\t\t\t\tjQuery(button.button).prop('title', button.old_notice)\n\t\t\t} else {\n\t\t\t\tbutton.button.disabled = true\n\t\t\t\tjQuery(button.button).prop('title', gdpr_notice_for_button)\n\t\t\t}\n\t\t})\n\t} catch (e) {\n\t\tconsole.info('APBCT GDPR JS ERROR: Can not handle form buttons ' + e)\n\t}\n}\n/**\n * Handle external forms\n */\nfunction ct_protect_external() {\n for(var i = 0; i < document.forms.length; i++) {\n\n if (document.forms[i].cleantalk_hidden_action === undefined && document.forms[i].cleantalk_hidden_method === undefined) {\n\n // current form\n var currentForm = document.forms[i];\n\n if(typeof(currentForm.action) == 'string') {\n\n // Ajax checking for the integrated forms\n if(isIntegratedForm(currentForm)) {\n\n apbctProcessExternalForm(currentForm, i, document);\n\n // Common flow - modify form's action\n }else if(currentForm.action.indexOf('http://') !== -1 || currentForm.action.indexOf('https://') !== -1) {\n\n var tmp = currentForm.action.split('//');\n tmp = tmp[1].split('/');\n var host = tmp[0].toLowerCase();\n\n if(host !== location.hostname.toLowerCase()){\n\n var ct_action = document.createElement(\"input\");\n ct_action.name = 'cleantalk_hidden_action';\n ct_action.value = currentForm.action;\n ct_action.type = 'hidden';\n currentForm.appendChild(ct_action);\n\n var ct_method = document.createElement(\"input\");\n ct_method.name = 'cleantalk_hidden_method';\n ct_method.value = currentForm.method;\n ct_method.type = 'hidden';\n\n currentForm.method = 'POST'\n\n currentForm.appendChild(ct_method);\n\n currentForm.action = document.location;\n }\n }\n }\n }\n\n }\n // Trying to process external form into an iframe\n apbctProcessIframes()\n}\n\nfunction formIsExclusion(currentForm)\n{\n let exclusions_by_id = [\n 'give-form' //give form exclusion because of direct integration\n ]\n\n let result = false\n\n //mewto forms exclusion\n if (currentForm.parentElement\n && currentForm.parentElement.classList.length > 0\n && currentForm.parentElement.classList[0].indexOf('mewtwo') !== -1) {\n result = true\n }\n\n exclusions_by_id.forEach(function (id) {\n if ( typeof (currentForm.id) !== 'undefined' && currentForm.id.indexOf(id) !== -1 ) {\n result = true\n }\n })\n\n return result\n}\n\nfunction apbctProcessIframes()\n{\n const frames = document.getElementsByTagName('iframe');\n\n if ( frames.length > 0 ) {\n for ( let j = 0; j < frames.length; j++ ) {\n if ( frames[j].contentDocument == null ) {\n continue;\n }\n\n const iframeForms = frames[j].contentDocument.forms;\n\n if ( iframeForms.length === 0 ) {\n return;\n }\n\n for ( let y = 0; y < iframeForms.length; y++ ) {\n let currentForm = iframeForms[y];\n\n apbctProcessExternalForm(currentForm, y, frames[j].contentDocument);\n }\n }\n }\n}\n\nfunction apbctProcessExternalForm(currentForm, iterator, documentObject) {\n\n //process forms exclusions\n if ( formIsExclusion(currentForm)) {\n return\n }\n\n const cleantalk_placeholder = document.createElement(\"i\");\n cleantalk_placeholder.className = 'cleantalk_placeholder';\n cleantalk_placeholder.style = 'display: none';\n\n currentForm.parentElement.insertBefore(cleantalk_placeholder, currentForm);\n\n // Deleting form to prevent submit event\n let prev = currentForm.previousSibling,\n form_html = currentForm.outerHTML,\n form_original = currentForm;\n\n // Remove the original form\n currentForm.parentElement.removeChild(currentForm);\n\n // Insert a clone\n const placeholder = document.createElement(\"div\");\n placeholder.innerHTML = form_html;\n prev.after(placeholder.firstElementChild);\n\n var force_action = document.createElement(\"input\");\n force_action.name = 'action';\n force_action.value = 'cleantalk_force_ajax_check';\n force_action.type = 'hidden';\n\n let reUseCurrentForm = documentObject.forms[iterator];\n\n reUseCurrentForm.appendChild(force_action);\n reUseCurrentForm.apbctPrev = prev;\n reUseCurrentForm.apbctFormOriginal = form_original;\n\n // mailerlite integration - disable click on submit button\n let mailerlite_detected_class = false\n if (reUseCurrentForm.classList !== undefined) {\n //list there all the mailerlite classes\n let mailerlite_classes = ['newsletterform', 'ml-block-form']\n mailerlite_classes.forEach(function(mailerlite_class) {\n if (reUseCurrentForm.classList.contains(mailerlite_class)){\n mailerlite_detected_class = mailerlite_class\n }\n });\n }\n if ( mailerlite_detected_class ) {\n let mailerliteSubmitButton = jQuery('form.' + mailerlite_detected_class).find('button[type=\"submit\"]');\n if ( mailerliteSubmitButton !== undefined ) {\n mailerliteSubmitButton.click(function (event) {\n event.preventDefault();\n sendAjaxCheckingFormData(event.currentTarget);\n });\n }\n } else {\n documentObject.forms[iterator].onsubmit = function ( event ){\n event.preventDefault();\n\n //mautic integration\n if (documentObject.forms[iterator].id.indexOf('mauticform') !== -1) {\n let checkbox = jQuery(documentObject.forms[iterator]).find('input[id*=\"checkbox_rgpd\"]')\n if (checkbox.length > 0){\n if (checkbox.prop(\"checked\") === true){\n let placeholder = jQuery('.cleantalk_placeholder')\n if (placeholder.length > 0) {\n placeholder[0].setAttribute('mautic_hidden_gdpr_id', checkbox.prop(\"id\"))\n }\n }\n }\n }\n\n const prev = jQuery(event.currentTarget).prev();\n const form_original = jQuery(event.currentTarget).clone();\n\n sendAjaxCheckingFormData(event.currentTarget);\n };\n }\n}\n\nfunction apbct_replace_inputs_values_from_other_form( form_source, form_target ){\n\n var\tinputs_source = jQuery( form_source ).find( 'button, input, textarea, select' ),\n inputs_target = jQuery( form_target ).find( 'button, input, textarea, select' );\n\n inputs_source.each( function( index, elem_source ){\n\n var source = jQuery( elem_source );\n\n inputs_target.each( function( index2, elem_target ){\n\n var target = jQuery( elem_target );\n\n if( elem_source.outerHTML === elem_target.outerHTML ){\n\n target.val( source.val() );\n }\n });\n });\n\n}\nwindow.onload = function () {\n\n if( ! +ctPublic.settings__forms__check_external ) {\n return;\n }\n\n if ( typeof jQuery === 'undefined' ) {\n return;\n }\n\n setTimeout(function () {\n ct_protect_external()\n }, 1500);\n};\n\n/**\n * Checking the form integration\n */\nfunction isIntegratedForm(formObj) {\n var formAction = formObj.action;\n let formId = formObj.id;\n\n if(\n formAction.indexOf('activehosted.com') !== -1 || // ActiveCampaign form\n formAction.indexOf('app.convertkit.com') !== -1 || // ConvertKit form\n ( formObj.firstChild.classList !== undefined && formObj.firstChild.classList.contains('cb-form-group') ) || // Convertbox form\n formAction.indexOf('mailerlite.com') !== -1 || // Mailerlite integration\n formAction.indexOf('colcolmail.co.uk') !== -1 || // colcolmail.co.uk integration\n formAction.indexOf('paypal.com') !== -1 ||\n formAction.indexOf('infusionsoft.com') !== -1 ||\n formAction.indexOf('webto.salesforce.com') !== -1 ||\n formAction.indexOf('secure2.convio.net') !== -1 ||\n formAction.indexOf('hookb.in') !== -1 ||\n formAction.indexOf('external.url') !== -1 ||\n formAction.indexOf('tp.media') !== -1 ||\n formAction.indexOf('flodesk.com') !== -1 ||\n formAction.indexOf('sendfox.com') !== -1 ||\n formAction.indexOf('aweber.com') !== -1 ||\n formAction.indexOf('secure.payu.com') !== -1 ||\n formAction.indexOf('mautic') !== -1 || formId.indexOf('mauticform_') !== -1\n ) {\n return true;\n }\n\n return false;\n}\n\n/**\n * Sending Ajax for checking form data\n */\nfunction sendAjaxCheckingFormData(form, prev, formOriginal) {\n // Get visible fields and set cookie\n var visible_fields = {};\n visible_fields[0] = apbct_collect_visible_fields(form);\n apbct_visible_fields_set_cookie( visible_fields );\n\n var data = {};\n var elems = form.elements;\n elems = Array.prototype.slice.call(elems);\n\n elems.forEach( function( elem, y ) {\n if( elem.name === '' ) {\n data['input_' + y] = elem.value;\n } else {\n data[elem.name] = elem.value;\n }\n });\n\n apbct_public_sendAJAX(\n data,\n {\n async: false,\n callback: function( result, data, params, obj ){\n\n if( result.apbct === undefined || ! +result.apbct.blocked ) {\n\n let form_new = jQuery(form).detach();\n let prev = form.apbctPrev;\n let formOriginal = form.apbctFormOriginal;\n let mautic_integration = false;\n\n apbct_replace_inputs_values_from_other_form(form_new, formOriginal);\n\n //mautic forms integration\n if (formOriginal.id.indexOf('mautic') !== -1) {\n mautic_integration = true\n }\n let placeholders = document.getElementsByClassName('cleantalk_placeholder')\n if (placeholders) {\n for (let i = 0; i < placeholders.length; i++) {\n let mautic_hidden_gdpr_id = placeholders[i].getAttribute(\"mautic_hidden_gdpr_id\")\n if (typeof(mautic_hidden_gdpr_id) !== 'undefined') {\n let mautic_gdpr_radio = jQuery(formOriginal).find('#' + mautic_hidden_gdpr_id)\n if (typeof(mautic_gdpr_radio) !== 'undefined') {\n mautic_gdpr_radio.prop(\"checked\", true);\n }\n }\n }\n }\n\n prev.after( formOriginal );\n\n // Clear visible_fields input\n jQuery(formOriginal).find('input[name=\"apbct_visible_fields\"]').remove();\n jQuery(formOriginal).find('input[value=\"cleantalk_force_ajax_check\"]').remove();\n\n\n //Common click event\n var subm_button = jQuery(formOriginal).find('button[type=submit]');\n if( subm_button.length !== 0 ) {\n subm_button[0].click();\n if (mautic_integration) {\n setTimeout(function () {\n ct_protect_external()\n }, 1500);\n }\n return;\n }\n\n subm_button = jQuery(formOriginal).find('input[type=submit]');\n if( subm_button.length !== 0 ) {\n subm_button[0].click();\n return;\n }\n\n // ConvertKit direct integration\n subm_button = jQuery(formOriginal).find('button[data-element=\"submit\"]');\n if( subm_button.length !== 0 ) {\n subm_button[0].click();\n return;\n }\n\n // Paypal integration\n subm_button = jQuery(formOriginal).find('input[type=\"image\"][name=\"submit\"]');\n if( subm_button.length !== 0 ) {\n subm_button[0].click();\n }\n\n }\n if (result.apbct !== undefined && +result.apbct.blocked) {\n ctParseBlockMessage(result);\n }\n }\n }\n );\n}\n\nfunction ct_check_internal(currForm){\n \n//Gathering data\n var ct_data = {},\n elems = currForm.elements;\n\n for (var key in elems) {\n if(elems[key].type == 'submit' || elems[key].value == undefined || elems[key].value == '')\n continue;\n ct_data[elems[key].name] = currForm.elements[key].value;\n }\n ct_data['action'] = 'ct_check_internal';\n\n //AJAX Request\n apbct_public_sendAJAX(\n ct_data,\n {\n url: ctPublicFunctions._ajax_url,\n callback: function (data) {\n if(data.success === true){\n currForm.submit();\n }else{\n alert(data.data);\n return false;\n }\n }\n }\n );\n}\n\ndocument.addEventListener('DOMContentLoaded',function(){\n let ct_currAction = '',\n ct_currForm = '';\n\n if( ! +ctPublic.settings__forms__check_internal ) {\n return;\n }\n\n let ctPrevHandler;\n\tfor( let i=0; i<document.forms.length; i++ ){\n\t\tif ( typeof(document.forms[i].action) == 'string' ){\n ct_currForm = document.forms[i];\n\t\t\tct_currAction = ct_currForm.action;\n if (\n ct_currAction.indexOf('https?://') !== null && // The protocol is obligatory\n ct_currAction.match(ctPublic.blog_home + '.*?\\.php') !== null && // Main check\n ! ct_check_internal__is_exclude_form(ct_currAction) // Exclude WordPress native scripts from processing\n ) {\n ctPrevHandler = ct_currForm.click;\n if ( typeof jQuery !== 'undefined' ) {\n jQuery(ct_currForm).off('**');\n jQuery(ct_currForm).off();\n jQuery(ct_currForm).on('submit', function(event){\n ct_check_internal(event.target);\n return false;\n });\n }\n }\n\t\t}\n\t}\n});\n\n/**\n * Check by action to exclude the form checking\n * @param action string\n * @return boolean\n */\nfunction ct_check_internal__is_exclude_form(action) {\n // An array contains forms action need to be excluded.\n let ct_internal_script_exclusions = [\n 'wp-login.php', // WordPress login page\n 'wp-comments-post.php', // WordPress Comments Form\n ];\n\n return ct_internal_script_exclusions.some((item) => {\n return action.match(new RegExp(ctPublic.blog_home + '.*' + item)) !== null;\n });\n}"],"names":["ApbctCore","ajax_parameters","rest_parameters","selector","elements","eventCallback","eventSelector","event","constructor","this","select","HTMLCollection","Array","prototype","slice","call","document","querySelectorAll","deselect","addElement","elemToAdd","push","elem","reduce","css","style","getRaw","let","style_name","DOM_style_name","replace","group","toUpperCase","i","length","computedStyle","getComputedStyle","Number","hide","prop","display","show","addClass","classList","add","className","removeClass","remove","toggleClass","toggle","ajax","ApbctAjax","rest","ApbctRest","on","args","addEventListener","onChecker","bind","target","querySelector","stopPropagation","ready","callback","change","attr","attrName","outputValue","propName","value","html","val","data","name","is","filter","isElem","elemToCheck","match","newlyCreatedElement","createElement","Boolean","HTMLElement","HTMLUnknownElement","indexOf","tagName","toLowerCase","isWithoutSelector","splice","parent","parentElement","parents","children","siblings","current","after","content","append","fadeIn","time","opacity","last","Date","tick","window","requestAnimationFrame","setTimeout","fadeOut","apbct","params","ApbctXhr","xhr","XMLHttpRequest","method","url","async","user","password","button","spinner","progressbar","context","onErrorCallback","responseType","headers","timeout","methods_to_convert_data_to_URL","body","http_code","status_text","parameters","key","console","log","prepare","Object","keys","deleteDoubleJSONEncoding","convertData","open","setHeaders","onreadystatechange","onReadyStateChange","onload","onLoad","onprogress","onProgress","onerror","onError","ontimeout","onTimeout","send","setAttribute","cursor","complete","status","statusText","removeAttribute","on_ready_state_change","on_progress","error","response","additional_msg","error_string","errorOutput","error_msg","header_name","setRequestHeader","convertDataToURL","convertDataToBody","params_appendix","URLSearchParams","toString","params_prefix","dataKey","FormData","JSON","stringify","object","objectKey","parsedValue","parse","super","default_route","ctPublicFunctions","_rest_url","route","X-WP-Nonce","_rest_nonce","ctSetCookie","cookies","expires","force_alternative_method_for_cookies","skip_alt","data__cookies_type","forced_alt_cookies_set","forEach","item","arr","apbctLocalStorage","set","encodeURIComponent","ctSetAlternativeCookie","ctNoCookieAttachHiddenFieldsToForms","ctSecure","location","protocol","cookie","cookiePrefix","isArray","getJavascriptClientData","e","searchForm","apbct_search_forms_params","data__ajax_type","apbct_public_sendREST","apbct_public_sendAJAX","action","notJson","ctGetCookie","matches","RegExp","decodeURIComponent","undefined","ctDeleteCookie","cookieName","obj","_params","callback_context","callback_params","silent","no_nonce","_ajax_url","_ajax_nonce","Math","random","no_cache","get","property","storageValue","localStorage","getItem","json","hasOwnProperty","is_json","objToSave","timestamp","floor","getTime","setItem","isAlive","maxLifetime","isSet","delete","removeItem","getCleanTalkData","ct_date","ctTimeMs","ctMouseEventTimerFlag","ctMouseData","ctMouseDataCounter","ctCheckedEmails","apbct_attach_event_handler","attachEvent","apbct_remove_event_handler","removeEventListener","detachEvent","ctMouseReadInterval","ctMouseWriteDataInterval","ctFunctionFirstKey","ctKeyStopStopListening","ctFunctionMouseMove","ctPublic","data__key_is_ok","setInterval","ctSetMouseMoved","round","clientY","clientX","ctMouseStopData","clearInterval","checkEmail","current_email","email","result","now","ctSetPixelImg","pixelUrl","insertedImg","pixel__enabled","getElementById","ctGetPixelUrl","local_storage_pixel_url","ctSetHasScrolled","ctPreloadLocalStorage","data__to_local_storage","entries","apbct_ready","cookiesType","initCookies","getTimezoneOffset","apbctGetScreenInfo","navigator","webdriver","cookiesArray","split","trim","pixel__setting","pixel__url","data__email_check_before_post","forms","hiddenInput","visibleFieldsToInput","form","data__visible_fields_required","contains","id","apbct_collect_visible_fields","btoa","onsubmit_prev","onsubmit","ctFormIndex","visible_fields","apbct_visible_fields_set_cookie","Function","encodedEmailNodes","href","ctFillDecodedEmailHandler","_form","getAttribute","apbctSearchPrevOnsubmit","noCookie","preventDefault","callBack","HTMLFormElement","submit","parsedCookies","atob","encodedEmailNodesIsMixed","popup_text","encoder_popup","innerHTML","waiting_popup","innerText","apbctAjaxEmailDecodeBulk","click_source","event_javascript_data","post_url","referrer","encodedEmails","encoded_emails_collection","apbctTooltip","dataset","originalString","apbctEmailEncoderCallbackBulk","res","resetEncodedNodes","ctShowDecodeComment","success","is_allowed","current_result_data","row","encoded_email","encodedEmail","baseElementContent","decoded_email","ctProcessDecodedDataResult","popup","click","comment","element","common_cookies","resultDataJson","apbct_headless","apbct_pixel_url","ct_checked_emails","ct_checkjs","ct_fkp_timestamp","ct_pointer_data","ct_ps_timestamp","ct_screen_info","ct_timezone","ctMouseMovedLocalStorage","ctHasScrolledLocalStorage","ctCookiesTypeLocalStorage","ctMouseMovedCookie","ctHasScrolledCookie","ctCookiesTypeCookie","ct_mouse_moved","ct_has_scrolled","ct_cookies_type","removeDoubleJsonEncoding","targetElement","ctFillDecodedEmail","inputs","inputs_visible","inputs_visible_count","inputs_invisible","inputs_invisible_count","inputs_with_duplicate_names","isNaN","visibility","visible_fields_count","invisible_fields","invisible_fields_count","visible_fields_collection","form_id","collection","apbct_js_keys__set_input_value","js_key","fullWidth","documentElement","scrollWidth","fullHeight","max","scrollHeight","offsetHeight","clientHeight","visibleWidth","clientWidth","visibleHeight","ctParseBlockMessage","blocked","dispatchEvent","CustomEvent","bubbles","detail","message","cleantalkModal","loaded","stop_script","stop","ctSetPixelUrlLocalstorage","ajax_pixel_url","ctNoCookieConstructHiddenField","type","inputType","field","no_cookie_data","ctNoCookieGetForms","getElementsByName","j","parentNode","removeChild","readyState","jQuery","ajaxComplete","settings","responseText","loading","opened","opening","load","apbct_admin_sendAJAX","renderCss","cssStr","styles","overlayCss","z-index","position","top","left","width","height","background","justify-content","align-items","innerCss","padding","border","border-radius","box-shadow","closeCss","right","box-sizing","closeCssBefore","transform","closeCssAfter","bodyCss","overflow","cleantalkModalStyle","overlay","inner","close","test","renderedMsg","buttons_to_handle","apbct_gdpr_handle_buttons","index","apbct_gdpr_item","disabled","old_notice","gdpr_notice_for_button","info","ct_protect_external","currentForm","ct_method","cleantalk_hidden_action","cleantalk_hidden_method","isIntegratedForm","apbctProcessExternalForm","hostname","ct_action","appendChild","apbctProcessIframes","formIsExclusion","frames","getElementsByTagName","contentDocument","iframeForms","y","iterator","documentObject","cleantalk_placeholder","prev","insertBefore","previousSibling","form_html","outerHTML","form_original","placeholder","force_action","firstElementChild","reUseCurrentForm","mailerlite_detected_class","apbctPrev","apbctFormOriginal","mailerlite_class","mailerliteSubmitButton","find","sendAjaxCheckingFormData","currentTarget","checkbox","clone","apbct_replace_inputs_values_from_other_form","form_source","form_target","inputs_source","inputs_target","each","elem_source","source","index2","elem_target","formObj","formAction","formId","firstChild","formOriginal","elems","form_new","detach","mautic_integration","placeholders","getElementsByClassName","mautic_hidden_gdpr_id","mautic_gdpr_radio","subm_button","ct_check_internal","currForm","ct_data","alert","ct_check_internal__is_exclude_form","some","blog_home","ctPublicGDPR","gdpr_forms","gdpr_title","first","buttons_collection","gdpr_text","settings__forms__check_external","ct_currForm","ct_currAction","settings__forms__check_internal","off"],"mappings":"MAAMA,UAEFC,gBAAkB,GAClBC,gBAAkB,GAElBC,SAAW,KACXC,SAAW,GAGXC,cACAC,cACAC,MAKAC,YAAYL,GACRM,KAAKC,OAAOP,CAAQ,CACxB,CAQAO,OAAOP,GAkBH,OAhBGA,aAAoBQ,gBACnBF,KAAKN,SAAc,KACnBM,KAAKL,SAAc,GACnBK,KAAKL,SAAWQ,MAAMC,UAAUC,MAAMC,KAAKZ,CAAQ,GACzB,UAApB,OAAOA,GACbM,KAAKN,SAAc,KACnBM,KAAKL,SAAc,GACnBK,KAAKL,SAAS,GAAKD,GACO,UAApB,OAAOA,GACbM,KAAKN,SAAWA,EAChBM,KAAKL,SAAWQ,MAAMC,UAAUC,MAAMC,KAAKC,SAASC,iBAAiBd,CAAQ,CAAC,GAG9EM,KAAKS,SAAS,EAGXT,IACX,CAEAU,WAAWC,GACkB,UAArB,OAAOA,EACPX,KAAKL,SAASiB,KAAKD,CAAS,EACD,UAArB,OAAOA,GACbX,KAAKN,SAAWiB,EAChBX,KAAKL,SAAWQ,MAAMC,UAAUC,MAAMC,KAAKC,SAASC,iBAAiBG,CAAS,CAAC,GAE/EX,KAAKS,SAAS,CAEtB,CAEAG,KAAKC,GACDb,KAAKL,SAASiB,KAAKC,CAAI,CAC3B,CAEAC,SACId,KAAKL,SAAWK,KAAKL,SAASU,MAAM,EAAE,CAAC,CAAC,CAC5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AGF,CAFE,MAAOvW,GACR/E,QAAQyW,KAAK,+CAAiD1R,CAAC,CAChE,CA3DA,CA4DD,CAAC,EAsOD3G,OAAOuC,OAAS,WAEN,CAACiI,SAAS2S,iCAIO,aAAlB,OAAO9H,QAIZnV,WAAW,WACPoY,oBAAoB,CACxB,EAAG,IAAI,CACX,EAoKA9d,SAASwC,iBAAiB,mBAAmB,WACzC7B,IACIiiB,EADAC,EAAgB,GAGpB,GAAM,CAAC7S,SAAS8S,gCAKnB,IAAKniB,IAAIM,EAAE,EAAGA,EAAEjB,SAASsS,MAAMpR,OAAQD,CAAC,GACE,UAApC,OAAOjB,SAASsS,MAAMrR,GAAS,QAIiB,QAFpD4hB,GADSD,EAAc5iB,SAASsS,MAAMrR,IACVwL,QAEDrI,QAAQ,WAAW,GACwB,OAAzDye,EAAc/e,MAAMkM,SAASoS,UAAY,SAAU,GACjDF,mCAAmCW,CAAa,IAElCD,EAAY5M,MACL,aAAlB,OAAO6E,SACRA,OAAO+H,CAAW,EAAEG,IAAI,IAAI,EAC5BlI,OAAO+H,CAAW,EAAEG,IAAI,EACxBlI,OAAO+H,CAAW,EAAEtgB,GAAG,SAAU,SAAS/C,GAEtC,OADAuiB,kBAAkBviB,EAAMoD,MAAM,EACvB,CAAA,CACX,CAAC,GAKrB,CAAC"}
js/cleantalk-comments-editscreen.min.js CHANGED
@@ -1,2 +1,2 @@
1
- function ct_is_email(e){return e.search(/.*@.*\..*/)}function ct_is_ip(e){return e.search(/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/)}function ct_send_feedback_request(t,c,n){var e={action:"ct_feedback_comment",security:ctCommentsScreen.ct_ajax_nonce,comment_id:t,comment_status:c};jQuery.ajax({type:"POST",url:ajaxurl,data:e,success:function(e){ct_feedback_message_output(t,c,e,n)},error:function(e,t,c){console.log(e),console.log(t),console.log(c)},timeout:5e3})}function ct_feedback_message_output(e,t,c,n){1==c&&("approve"!=t||n||jQuery("tr#comment-"+e).html("").show().append("<td colspan='5'></td>").children("td").css("background","rgba(110,240,110,0.7)").append("<div class='spam-undo-inside'>"+ctCommentsScreen.ct_feedback_msg+"</div>"),"spam"==t)&&(jQuery("tr").is("#undo-"+e)?(jQuery("tr#undo-"+e).css("background","rgba(240,110,110,0.7)"),jQuery("tr#undo-"+e+" div.spam-undo-inside").append(" "+ctCommentsScreen.ct_feedback_msg)):jQuery("tr#comment-"+e).html("").show().css("background","rgba(240,110,110,0.7)").append("<td colspan='5'></td>").children("td").append("<div class='spam-undo-inside'>"+ctCommentsScreen.ct_feedback_msg+"</div>"))}jQuery(document).ready(function(){var t;parseInt(ctCommentsScreen.ct_show_check_links)&&jQuery(".column-author a, .comment-author a").each(function(){var e=jQuery(this).html();-1==ct_is_email(e)&&-1==ct_is_ip(e)||jQuery(this).after('&nbsp;<a href="https://cleantalk.org/blacklists/'+e+'" target="_blank" title="https://cleantalk.org/blacklists/'+e+'" class="ct_link_new_tab"><img src="'+ctCommentsScreen.ct_img_src_new_tab+'"></a>')}),jQuery("span.approve").on("click",function(){var e=(e=jQuery(this).children("a").attr("href")).match(/^comment\.php\?.*c=(\d*).*/);t=e[1],ct_send_feedback_request(undo_comment_id=t,"approve",0)}),jQuery("span.unapprove").on("click",function(){var e=(e=jQuery(this).children("a").attr("href")).match(/^comment\.php\?.*c=(\d*).*/);t=e[1],ct_send_feedback_request(undo_comment_id=t,"spam",0)}),jQuery("span.spam").on("click",function(){var e=(e=jQuery(this).children("a").attr("href")).match(/^comment\.php\?.*c=(\d*).*/);t=e[1],ct_send_feedback_request(undo_comment_id=t,"spam",0),setTimeout(function(){jQuery("tr#undo-"+t+" span.unspam a").click(function(){var e=(e=jQuery(this).attr("href")).match(/^comment\.php\?.*&c=(\d*).*/);ct_send_feedback_request(t=e[1],"approve",1)})},202)}),jQuery("span.unspam").on("click",function(){var e=(e=jQuery(this).children("a").attr("href")).match(/^comment\.php\?.*c=(\d*).*/);ct_send_feedback_request(t=e[1],"approve",0)}),jQuery("span.untrash a").on("click",function(){var e=(e=jQuery(this).attr("href")).match(/^comment\.php\?.*c=(\d*).*/);t=e[1],feedback_result=ct_send_feedback_request(t,"approve",0)})});
2
  //# sourceMappingURL=cleantalk-comments-editscreen.min.js.map
1
+ function ct_is_email(e){return e.search(/.*@.*\..*/)}function ct_is_ip(e){return e.search(/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/)}function ct_send_feedback_request(t,c,n){var e={action:"ct_feedback_comment",security:ctCommentsScreen.ct_ajax_nonce,comment_id:t,comment_status:c};jQuery.ajax({type:"POST",url:ajaxurl,data:e,success:function(e){ct_feedback_message_output(t,c,e,n)},error:function(e,t,c){console.log(e),console.log(t),console.log(c)},timeout:5e3})}function ct_feedback_message_output(e,t,c,n){1==c&&("approve"!=t||n||jQuery("tr#comment-"+e).html("").show().append("<td colspan='5'></td>").children("td").css("background","rgba(110,240,110,0.7)").append("<div class='spam-undo-inside'>"+ctCommentsScreen.ct_feedback_msg+"</div>"),"spam"==t&&(jQuery("tr").is("#undo-"+e)?(jQuery("tr#undo-"+e).css("background","rgba(240,110,110,0.7)"),jQuery("tr#undo-"+e+" div.spam-undo-inside").append(" "+ctCommentsScreen.ct_feedback_msg)):jQuery("tr#comment-"+e).html("").show().css("background","rgba(240,110,110,0.7)").append("<td colspan='5'></td>").children("td").append("<div class='spam-undo-inside'>"+ctCommentsScreen.ct_feedback_msg+"</div>")))}jQuery(document).ready(function(){var t;parseInt(ctCommentsScreen.ct_show_check_links)&&jQuery(".column-author a, .comment-author a").each(function(){var e=jQuery(this).html();-1==ct_is_email(e)&&-1==ct_is_ip(e)||jQuery(this).after('&nbsp;<a href="https://cleantalk.org/blacklists/'+e+'" target="_blank" title="https://cleantalk.org/blacklists/'+e+'" class="ct_link_new_tab"><img src="'+ctCommentsScreen.ct_img_src_new_tab+'"></a>')}),jQuery("span.approve").on("click",function(){var e=(e=jQuery(this).children("a").attr("href")).match(/^comment\.php\?.*c=(\d*).*/);t=e[1],ct_send_feedback_request(undo_comment_id=t,"approve",0)}),jQuery("span.unapprove").on("click",function(){var e=(e=jQuery(this).children("a").attr("href")).match(/^comment\.php\?.*c=(\d*).*/);t=e[1],ct_send_feedback_request(undo_comment_id=t,"spam",0)}),jQuery("span.spam").on("click",function(){var e=(e=jQuery(this).children("a").attr("href")).match(/^comment\.php\?.*c=(\d*).*/);t=e[1],ct_send_feedback_request(undo_comment_id=t,"spam",0),setTimeout(function(){jQuery("tr#undo-"+t+" span.unspam a").click(function(){var e=(e=jQuery(this).attr("href")).match(/^comment\.php\?.*&c=(\d*).*/);ct_send_feedback_request(t=e[1],"approve",1)})},202)}),jQuery("span.unspam").on("click",function(){var e=(e=jQuery(this).children("a").attr("href")).match(/^comment\.php\?.*c=(\d*).*/);ct_send_feedback_request(t=e[1],"approve",0)}),jQuery("span.untrash a").on("click",function(){var e=(e=jQuery(this).attr("href")).match(/^comment\.php\?.*c=(\d*).*/);t=e[1],feedback_result=ct_send_feedback_request(t,"approve",0)})});
2
  //# sourceMappingURL=cleantalk-comments-editscreen.min.js.map
js/cleantalk-comments-editscreen.min.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cleantalk-comments-editscreen.min.js","sources":["cleantalk-comments-editscreen.js"],"sourcesContent":["function ct_is_email(str){\n\treturn str.search(/.*@.*\\..*/);\n}\nfunction ct_is_ip(str){\n\treturn str.search(/^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$/);\n}\n\njQuery(document).ready(function(){\n\n\t/* Shows link to blacklists near every email and IP address */\n\tif(parseInt(ctCommentsScreen.ct_show_check_links))\n\t\tjQuery('.column-author a, .comment-author a').each(function(){\n\t\t\tvar ct_curr_str = jQuery(this).html();\n\t\t\tif(ct_is_email(ct_curr_str) != -1 || ct_is_ip(ct_curr_str) != -1){\n\t\t\t\tjQuery(this).after('&nbsp;<a href=\"https://cleantalk.org/blacklists/'+ct_curr_str+'\" target=\"_blank\" title=\"https://cleantalk.org/blacklists/'+ct_curr_str+'\" class=\"ct_link_new_tab\"><img src=\"'+ctCommentsScreen.ct_img_src_new_tab+'\"></a>');\n\t\t\t}\n\t\t});\n\t\t\n\t/* Feedback for comments */\n\tvar ct_comment_id;\n\t\n\t// For approved\n\tjQuery('span.approve').on('click', function(){\n\t\tvar result = jQuery(this).children('a').attr('href');\n\t\tresult = result.match(/^comment\\.php\\?.*c=(\\d*).*/);\n\t\tct_comment_id = result[1];\n\t\tundo_comment_id = ct_comment_id;\n\t\tct_send_feedback_request(ct_comment_id, 'approve', 0);\t\t\n\t});\n\t\n\t// For unapprove\n\tjQuery('span.unapprove').on('click', function(){\n\t\tvar result = jQuery(this).children('a').attr('href');\n\t\tresult = result.match(/^comment\\.php\\?.*c=(\\d*).*/);\n\t\tct_comment_id = result[1];\n\t\tundo_comment_id = ct_comment_id;\n\t\tct_send_feedback_request(ct_comment_id, 'spam', 0);\t\t\n\t});\n\t\n\t// For spammed\n\tjQuery('span.spam').on('click', function(){\n\t\tvar result = jQuery(this).children('a').attr('href');\n\t\tresult = result.match(/^comment\\.php\\?.*c=(\\d*).*/);\n\t\tct_comment_id = result[1];\n\t\tundo_comment_id = ct_comment_id;\n\t\tct_send_feedback_request(ct_comment_id, 'spam', 0);\n\t\t\n\t\tsetTimeout(function(){\n\t\t\tjQuery('tr#undo-'+ct_comment_id+' span.unspam a').click(function(){\n\t\t\t\tvar result = jQuery(this).attr('href');\n\t\t\t\tresult = result.match(/^comment\\.php\\?.*&c=(\\d*).*/);\n\t\t\t\tct_comment_id = result[1];\n\t\t\t\tct_send_feedback_request(ct_comment_id, 'approve', 1);\n\t\t\t});\n\t\t}, 202);\n\t\t\n\t});\n\t\n\t// For unspammed\n\tjQuery('span.unspam').on('click', function(){\n\t\tvar result = jQuery(this).children('a').attr('href');\n\t\tresult = result.match(/^comment\\.php\\?.*c=(\\d*).*/);\n\t\tct_comment_id = result[1];\n\t\tct_send_feedback_request(ct_comment_id, 'approve', 0);\n\t});\n\t\n\t// For untrashed\n\tjQuery('span.untrash a').on('click', function(){\n\t\tvar result = jQuery(this).attr('href');\n\t\tresult = result.match(/^comment\\.php\\?.*c=(\\d*).*/);\n\t\tct_comment_id = result[1];\n\t\tfeedback_result = ct_send_feedback_request(ct_comment_id, 'approve', 0);\t\t\n\t});\t\n});\n\n// Send feedback to backend\nfunction ct_send_feedback_request(ct_comment_id, ct_comment_status, ct_undo){\n\t\n\tvar data = {\n\t\t'action': 'ct_feedback_comment',\n\t\t'security': ctCommentsScreen.ct_ajax_nonce,\n\t\t'comment_id': ct_comment_id,\n\t\t'comment_status': ct_comment_status\n\t};\n\t\n\tjQuery.ajax({\n\t\ttype: \"POST\",\n\t\turl: ajaxurl,\n\t\tdata: data,\n\t\tsuccess: function(msg){\n\t\t\tct_feedback_message_output(ct_comment_id, ct_comment_status, msg, ct_undo);\n\t\t},\n error: function(jqXHR, textStatus, errorThrown) {\n\t\t\tconsole.log(jqXHR);\n\t\t\tconsole.log(textStatus);\n\t\t\tconsole.log(errorThrown);\n\t\t},\n timeout: 5000\n\t});\n}\n\n// Outputs CT message about feedback\nfunction ct_feedback_message_output(ct_comment_id, ct_comment_status, ct_result, ct_undo){\n\tif(ct_result == 1){\n\t\tif(ct_comment_status == 'approve' && !ct_undo){\n\t\t\tjQuery('tr#comment-'+ct_comment_id)\n\t\t\t\t.html('')\n\t\t\t\t.show()\n\t\t\t\t.append(\"<td colspan='5'></td>\").children('td')\n\t\t\t\t\t.css('background', 'rgba(110,240,110,0.7)')\n\t\t\t\t\t.append(\"<div class='spam-undo-inside'>\"+ctCommentsScreen.ct_feedback_msg+\"</div>\");\n\t\t}\n\t\tif(ct_comment_status == 'spam'){\n\t\t\tif(jQuery('tr').is('#undo-'+ct_comment_id)){\n\t\t\t\tjQuery('tr#undo-'+ct_comment_id)\n\t\t\t\t\t.css('background', 'rgba(240,110,110,0.7)');\n\t\t\t\tjQuery('tr#undo-'+ct_comment_id+' div.spam-undo-inside')\n\t\t\t\t\t.append(\" \"+ctCommentsScreen.ct_feedback_msg);\n\t\t\t}else{\n\t\t\t\tjQuery('tr#comment-'+ct_comment_id)\n\t\t\t\t.html('')\n\t\t\t\t.show()\n\t\t\t\t.css('background', 'rgba(240,110,110,0.7)')\n\t\t\t\t.append(\"<td colspan='5'></td>\").children('td')\n\t\t\t\t\t.append(\"<div class='spam-undo-inside'>\"+ctCommentsScreen.ct_feedback_msg+\"</div>\");\n\t\t\t}\n\t\t}\n\t}\n\tif(ct_result == 0){\n\t\t// Error occurred\n\t}if(ct_result == 'no_hash'){\n\t\t// No hash for this comment\n\t}\n}\n"],"names":["ct_is_email","str","search","ct_is_ip","ct_send_feedback_request","ct_comment_id","ct_comment_status","ct_undo","data","action","security","ctCommentsScreen","ct_ajax_nonce","comment_id","comment_status","jQuery","ajax","type","url","ajaxurl","success","msg","ct_feedback_message_output","error","jqXHR","textStatus","errorThrown","console","log","timeout","ct_result","html","show","append","children","css","ct_feedback_msg","is","document","ready","parseInt","ct_show_check_links","each","ct_curr_str","this","after","ct_img_src_new_tab","on","result","attr","match","undo_comment_id","setTimeout","click","feedback_result"],"mappings":"AAAA,SAASA,YAAYC,GACpB,OAAOA,EAAIC,OAAO,WAAW,CAC9B,CACA,SAASC,SAASF,GACjB,OAAOA,EAAIC,OAAO,sCAAsC,CACzD,CAuEA,SAASE,yBAAyBC,EAAeC,EAAmBC,GAEnE,IAAIC,EAAO,CACVC,OAAU,sBACVC,SAAYC,iBAAiBC,cAC7BC,WAAcR,EACdS,eAAkBR,CACnB,EAEAS,OAAOC,KAAK,CACXC,KAAM,OACNC,IAAKC,QACLX,KAAMA,EACNY,QAAS,SAASC,GACjBC,2BAA2BjB,EAAeC,EAAmBe,EAAKd,CAAO,CAC1E,EACMgB,MAAO,SAASC,EAAOC,EAAYC,GACxCC,QAAQC,IAAIJ,CAAK,EACjBG,QAAQC,IAAIH,CAAU,EACtBE,QAAQC,IAAIF,CAAW,CACxB,EACMG,QAAS,GAChB,CAAC,CACF,CAGA,SAASP,2BAA2BjB,EAA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GAAG,QAAS,WACpC,IACAC,GAASA,EADIjC,OAAO6B,IAAI,EAAEV,SAAS,GAAG,EAAEe,KAAK,MAAM,GACnCC,MAAM,4BAA4B,EAClD7C,EAAgB2C,EAAO,GAEvB5C,yBADA+C,gBAAkB9C,EACsB,OAAQ,CAAC,CAClD,CAAC,EAGDU,OAAO,WAAW,EAAEgC,GAAG,QAAS,WAC/B,IACAC,GAASA,EADIjC,OAAO6B,IAAI,EAAEV,SAAS,GAAG,EAAEe,KAAK,MAAM,GACnCC,MAAM,4BAA4B,EAClD7C,EAAgB2C,EAAO,GAEvB5C,yBADA+C,gBAAkB9C,EACsB,OAAQ,CAAC,EAEjD+C,WAAW,WACVrC,OAAO,WAAWV,EAAc,gBAAgB,EAAEgD,MAAM,WACvD,IACAL,GAASA,EADIjC,OAAO6B,IAAI,EAAEK,KAAK,MAAM,GACrBC,MAAM,6BAA6B,EAEnD9C,yBADAC,EAAgB2C,EAAO,GACiB,UAAW,CAAC,CACrD,CAAC,CACF,EAAG,GAAG,CAEP,CAAC,EAGDjC,OAAO,aAAa,EAAEgC,GAAG,QAAS,WACjC,IACAC,GAASA,EADIjC,OAAO6B,IAAI,EAAEV,SAAS,GAAG,EAAEe,KAAK,MAAM,GACnCC,MAAM,4BAA4B,EAElD9C,yBADAC,EAAgB2C,EAAO,GACiB,UAAW,CAAC,CACrD,CAAC,EAGDjC,OAAO,gBAAgB,EAAEgC,GAAG,QAAS,WACpC,IACAC,GAASA,EADIjC,OAAO6B,IAAI,EAAEK,KAAK,MAAM,GACrBC,MAAM,4BAA4B,EAClD7C,EAAgB2C,EAAO,GACvBM,gBAAkBlD,yBAAyBC,EAAe,UAAW,CAAC,CACvE,CAAC,CACF,CAAC"}
1
+ {"version":3,"file":"cleantalk-comments-editscreen.min.js","sources":["cleantalk-comments-editscreen.js"],"sourcesContent":["function ct_is_email(str){\n\treturn str.search(/.*@.*\\..*/);\n}\nfunction ct_is_ip(str){\n\treturn str.search(/^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$/);\n}\n\njQuery(document).ready(function(){\n\n\t/* Shows link to blacklists near every email and IP address */\n\tif(parseInt(ctCommentsScreen.ct_show_check_links))\n\t\tjQuery('.column-author a, .comment-author a').each(function(){\n\t\t\tvar ct_curr_str = jQuery(this).html();\n\t\t\tif(ct_is_email(ct_curr_str) != -1 || ct_is_ip(ct_curr_str) != -1){\n\t\t\t\tjQuery(this).after('&nbsp;<a href=\"https://cleantalk.org/blacklists/'+ct_curr_str+'\" target=\"_blank\" title=\"https://cleantalk.org/blacklists/'+ct_curr_str+'\" class=\"ct_link_new_tab\"><img src=\"'+ctCommentsScreen.ct_img_src_new_tab+'\"></a>');\n\t\t\t}\n\t\t});\n\t\t\n\t/* Feedback for comments */\n\tvar ct_comment_id;\n\t\n\t// For approved\n\tjQuery('span.approve').on('click', function(){\n\t\tvar result = jQuery(this).children('a').attr('href');\n\t\tresult = result.match(/^comment\\.php\\?.*c=(\\d*).*/);\n\t\tct_comment_id = result[1];\n\t\tundo_comment_id = ct_comment_id;\n\t\tct_send_feedback_request(ct_comment_id, 'approve', 0);\t\t\n\t});\n\t\n\t// For unapprove\n\tjQuery('span.unapprove').on('click', function(){\n\t\tvar result = jQuery(this).children('a').attr('href');\n\t\tresult = result.match(/^comment\\.php\\?.*c=(\\d*).*/);\n\t\tct_comment_id = result[1];\n\t\tundo_comment_id = ct_comment_id;\n\t\tct_send_feedback_request(ct_comment_id, 'spam', 0);\t\t\n\t});\n\t\n\t// For spammed\n\tjQuery('span.spam').on('click', function(){\n\t\tvar result = jQuery(this).children('a').attr('href');\n\t\tresult = result.match(/^comment\\.php\\?.*c=(\\d*).*/);\n\t\tct_comment_id = result[1];\n\t\tundo_comment_id = ct_comment_id;\n\t\tct_send_feedback_request(ct_comment_id, 'spam', 0);\n\t\t\n\t\tsetTimeout(function(){\n\t\t\tjQuery('tr#undo-'+ct_comment_id+' span.unspam a').click(function(){\n\t\t\t\tvar result = jQuery(this).attr('href');\n\t\t\t\tresult = result.match(/^comment\\.php\\?.*&c=(\\d*).*/);\n\t\t\t\tct_comment_id = result[1];\n\t\t\t\tct_send_feedback_request(ct_comment_id, 'approve', 1);\n\t\t\t});\n\t\t}, 202);\n\t\t\n\t});\n\t\n\t// For unspammed\n\tjQuery('span.unspam').on('click', function(){\n\t\tvar result = jQuery(this).children('a').attr('href');\n\t\tresult = result.match(/^comment\\.php\\?.*c=(\\d*).*/);\n\t\tct_comment_id = result[1];\n\t\tct_send_feedback_request(ct_comment_id, 'approve', 0);\n\t});\n\t\n\t// For untrashed\n\tjQuery('span.untrash a').on('click', function(){\n\t\tvar result = jQuery(this).attr('href');\n\t\tresult = result.match(/^comment\\.php\\?.*c=(\\d*).*/);\n\t\tct_comment_id = result[1];\n\t\tfeedback_result = ct_send_feedback_request(ct_comment_id, 'approve', 0);\t\t\n\t});\t\n});\n\n// Send feedback to backend\nfunction ct_send_feedback_request(ct_comment_id, ct_comment_status, ct_undo){\n\t\n\tvar data = {\n\t\t'action': 'ct_feedback_comment',\n\t\t'security': ctCommentsScreen.ct_ajax_nonce,\n\t\t'comment_id': ct_comment_id,\n\t\t'comment_status': ct_comment_status\n\t};\n\t\n\tjQuery.ajax({\n\t\ttype: \"POST\",\n\t\turl: ajaxurl,\n\t\tdata: data,\n\t\tsuccess: function(msg){\n\t\t\tct_feedback_message_output(ct_comment_id, ct_comment_status, msg, ct_undo);\n\t\t},\n error: function(jqXHR, textStatus, errorThrown) {\n\t\t\tconsole.log(jqXHR);\n\t\t\tconsole.log(textStatus);\n\t\t\tconsole.log(errorThrown);\n\t\t},\n timeout: 5000\n\t});\n}\n\n// Outputs CT message about feedback\nfunction ct_feedback_message_output(ct_comment_id, ct_comment_status, ct_result, ct_undo){\n\tif(ct_result == 1){\n\t\tif(ct_comment_status == 'approve' && !ct_undo){\n\t\t\tjQuery('tr#comment-'+ct_comment_id)\n\t\t\t\t.html('')\n\t\t\t\t.show()\n\t\t\t\t.append(\"<td colspan='5'></td>\").children('td')\n\t\t\t\t\t.css('background', 'rgba(110,240,110,0.7)')\n\t\t\t\t\t.append(\"<div class='spam-undo-inside'>\"+ctCommentsScreen.ct_feedback_msg+\"</div>\");\n\t\t}\n\t\tif(ct_comment_status == 'spam'){\n\t\t\tif(jQuery('tr').is('#undo-'+ct_comment_id)){\n\t\t\t\tjQuery('tr#undo-'+ct_comment_id)\n\t\t\t\t\t.css('background', 'rgba(240,110,110,0.7)');\n\t\t\t\tjQuery('tr#undo-'+ct_comment_id+' div.spam-undo-inside')\n\t\t\t\t\t.append(\" \"+ctCommentsScreen.ct_feedback_msg);\n\t\t\t}else{\n\t\t\t\tjQuery('tr#comment-'+ct_comment_id)\n\t\t\t\t.html('')\n\t\t\t\t.show()\n\t\t\t\t.css('background', 'rgba(240,110,110,0.7)')\n\t\t\t\t.append(\"<td colspan='5'></td>\").children('td')\n\t\t\t\t\t.append(\"<div class='spam-undo-inside'>\"+ctCommentsScreen.ct_feedback_msg+\"</div>\");\n\t\t\t}\n\t\t}\n\t}\n\tif(ct_result == 0){\n\t\t// Error occurred\n\t}if(ct_result == 'no_hash'){\n\t\t// No hash for this comment\n\t}\n}\n"],"names":["ct_is_email","str","search","ct_is_ip","ct_send_feedback_request","ct_comment_id","ct_comment_status","ct_undo","data","action","security","ctCommentsScreen","ct_ajax_nonce","comment_id","comment_status","jQuery","ajax","type","url","ajaxurl","success","msg","ct_feedback_message_output","error","jqXHR","textStatus","errorThrown","console","log","timeout","ct_result","html","show","append","children","css","ct_feedback_msg","is","document","ready","parseInt","ct_show_check_links","each","ct_curr_str","this","after","ct_img_src_new_tab","on","result","attr","match","undo_comment_id","setTimeout","click","feedback_result"],"mappings":"AAAA,SAASA,YAAYC,GACpB,OAAOA,EAAIC,OAAO,WAAW,CAC9B,CACA,SAASC,SAASF,GACjB,OAAOA,EAAIC,OAAO,sCAAsC,CACzD,CAuEA,SAASE,yBAAyBC,EAAeC,EAAmBC,GAEnE,IAAIC,EAAO,CACVC,OAAU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O,gBAAgB,EAAEgC,GAAG,QAAS,WACpC,IACAC,GAASA,EADIjC,OAAO6B,IAAI,EAAEK,KAAK,MAAM,GACrBC,MAAM,4BAA4B,EAClD7C,EAAgB2C,EAAO,GACvBM,gBAAkBlD,yBAAyBC,EAAe,UAAW,CAAC,CACvE,CAAC,CACF,CAAC"}
lib/Cleantalk/Antispam/EmailEncoder.php CHANGED
@@ -94,6 +94,7 @@ class EmailEncoder
94
  'widget_text',
95
  'widget_content',
96
  'widget_output',
 
97
  );
98
  foreach ( $hooks_to_encode as $hook ) {
99
  add_filter($hook, array($this, 'modifyContent'));
94
  'widget_text',
95
  'widget_content',
96
  'widget_output',
97
+ 'widget_block_content',
98
  );
99
  foreach ( $hooks_to_encode as $hook ) {
100
  add_filter($hook, array($this, 'modifyContent'));
lib/Cleantalk/Antispam/Integrations/NewUserApprove.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Cleantalk\Antispam\Integrations;
4
+
5
+ use Cleantalk\ApbctWP\Variables\Post;
6
+
7
+ class NewUserApprove extends IntegrationBase
8
+ {
9
+ private $return_argument = true;
10
+
11
+ public function getDataForChecking($argument)
12
+ {
13
+ $this->return_argument = $argument;
14
+
15
+ if (
16
+ (
17
+ apbct_is_plugin_active('new-user-approve/new-user-approve.php')
18
+ ||
19
+ apbct_is_plugin_active('new-user-approve-premium/new-user-approve.php')
20
+ )
21
+ && !empty($_POST)
22
+ && Post::get('user_email')
23
+ && Post::get('user_login')
24
+ ) {
25
+ $input_array = apply_filters('apbct__filter_post', $_POST);
26
+ $data = ct_get_fields_any($input_array);
27
+ $data['register'] = true;
28
+
29
+ return $data;
30
+ }
31
+
32
+ return null;
33
+ }
34
+
35
+ /**
36
+ * @param $message
37
+ *
38
+ * @return void
39
+ */
40
+ public function doBlock($message)
41
+ {
42
+ wp_die($message);
43
+ }
44
+
45
+ public function allow()
46
+ {
47
+ return $this->return_argument;
48
+ }
49
+ }
lib/Cleantalk/ApbctWP/Variables/AltSessions.php CHANGED
@@ -85,6 +85,10 @@ class AltSessions
85
  'error' => 'AltSessions: Internal JSON error:' . json_last_error_msg()));
86
  }
87
 
 
 
 
 
88
  foreach ( $cookies_array as $cookie_to_set => $value ) {
89
  Cookie::set($cookie_to_set, $value);
90
  }
85
  'error' => 'AltSessions: Internal JSON error:' . json_last_error_msg()));
86
  }
87
 
88
+ if ( array_key_exists('apbct_search_forms_params', $cookies_array) ) {
89
+ Cookie::$force_alt_cookies_global = true;
90
+ }
91
+
92
  foreach ( $cookies_array as $cookie_to_set => $value ) {
93
  Cookie::set($cookie_to_set, $value);
94
  }
lib/Cleantalk/ApbctWP/Variables/Cookie.php CHANGED
@@ -6,6 +6,8 @@ class Cookie extends \Cleantalk\Variables\Cookie
6
  {
7
  protected static $instance;
8
 
 
 
9
  public static $force_to_use_alternative_cookies = array(
10
  'ct_sfw_pass_key',
11
  'ct_sfw_passed',
@@ -38,7 +40,7 @@ class Cookie extends \Cleantalk\Variables\Cookie
38
  $value = $this->getAndSanitize(urldecode($_COOKIE[$name]));
39
  //NoCookies
40
  } else if ( $apbct->data['cookies_type'] === 'none' ) {
41
- if ( in_array($name, static::$force_to_use_alternative_cookies, true) ) {
42
  $value = AltSessions::get($name);
43
  if ( empty($value) && isset($_COOKIE[$name]) ) {
44
  $value = $this->getAndSanitize(urldecode($_COOKIE[$name]));
@@ -92,7 +94,7 @@ class Cookie extends \Cleantalk\Variables\Cookie
92
  if ( $apbct->data['key_is_ok'] ) {
93
  //select handling way to set cookie data in dependence of cookie type in the settings
94
  if ( $apbct->data['cookies_type'] === 'none' ) {
95
- if ( in_array($name, static::$force_to_use_alternative_cookies, true) ) {
96
  AltSessions::set($name, $value);
97
  } else {
98
  return NoCookie::set($name, $value, $no_cookie_to_db);
6
  {
7
  protected static $instance;
8
 
9
+ public static $force_alt_cookies_global = false;
10
+
11
  public static $force_to_use_alternative_cookies = array(
12
  'ct_sfw_pass_key',
13
  'ct_sfw_passed',
40
  $value = $this->getAndSanitize(urldecode($_COOKIE[$name]));
41
  //NoCookies
42
  } else if ( $apbct->data['cookies_type'] === 'none' ) {
43
+ if ( static::$force_alt_cookies_global || in_array($name, static::$force_to_use_alternative_cookies, true) ) {
44
  $value = AltSessions::get($name);
45
  if ( empty($value) && isset($_COOKIE[$name]) ) {
46
  $value = $this->getAndSanitize(urldecode($_COOKIE[$name]));
94
  if ( $apbct->data['key_is_ok'] ) {
95
  //select handling way to set cookie data in dependence of cookie type in the settings
96
  if ( $apbct->data['cookies_type'] === 'none' ) {
97
+ if ( static::$force_alt_cookies_global || in_array($name, static::$force_to_use_alternative_cookies, true) ) {
98
  AltSessions::set($name, $value);
99
  } else {
100
  return NoCookie::set($name, $value, $no_cookie_to_db);
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: spam, antispam, anti-spam, comments, firewall
4
  Requires at least: 4.7
5
  Tested up to: 6.1
6
  Requires PHP: 5.6
7
- Stable tag: 6.0.1
8
  License: GPLv2
9
 
10
  Spam protection, anti-spam, firewall, premium plugin. No spam comments & users, no spam contact form & WooCommerce anti-spam.
@@ -451,6 +451,22 @@ Yes, it is. Please read this article,
451
 
452
  == Changelog ==
453
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
454
  = 6.0.1 Dec 4 2022 =
455
  * Fix. Updater. Updating checking fixed.
456
  * Fix. Updater. Updating function renamed.
4
  Requires at least: 4.7
5
  Tested up to: 6.1
6
  Requires PHP: 5.6
7
+ Stable tag: 6.1
8
  License: GPLv2
9
 
10
  Spam protection, anti-spam, firewall, premium plugin. No spam comments & users, no spam contact form & WooCommerce anti-spam.
451
 
452
  == Changelog ==
453
 
454
+ = 6.1 Dec 15 2022 =
455
+ #### Some integrations fixed 🐞, Search forms 🎯 protection improved and some minor issues fixed 💪🏼
456
+ * New. Integrations. Add NewUserApprove plugin.
457
+ * Update. EmailEncoder. Add hook for encode email in default wp widget.
458
+ * Fix. Settings. Affiliate shortcode disabled state.
459
+ * Fix. Elementor forms. Elementor login form skipping.
460
+ * Mod: Optima Express Integration for Login Form
461
+ * Fix. Integrations. Optima Express - Update form fixed.
462
+ * Fix. Modified Header. Undefined post_type.
463
+ * Fix. Integrations. Probably spam notification updated.
464
+ * Fix. Integration. Ninja refactoring.
465
+ * Fix. Cookies. No-cookies parameters gathering on search forms improved.
466
+ * Fix. Integrations. Do not draw hidden fields on excluded pages.
467
+ * Fix. Integration. WP Forms integration fixed.
468
+ * Fix. Integration. Ninja Forms integration fixed.
469
+
470
  = 6.0.1 Dec 4 2022 =
471
  * Fix. Updater. Updating checking fixed.
472
  * Fix. Updater. Updating function renamed.