Forminator Payment, Quiz and Contact Form Plugin - Version 1.15.14

Version Description

  • Fix: Submission indicator is not working in a validation error
  • Fix: Form name input field is not working while the New Update popup opens
  • Fix: Typo on the links for Invisible hCaptcha
  • Fix: manage_forminator capability no longer exists in user role
  • Fix: HubSpot and AWeber Identifier aren't working
  • Fix: Whitespace in select fields causing error in visibility conditions
  • Fix: Fields do not support blank space from URLs
Download this release

Release Info

Developer Dency
Plugin Icon 128x128 Forminator Payment, Quiz and Contact Form Plugin
Version 1.15.14
Comparing to
See all releases

Code changes from version 1.15.13 to 1.15.14

addons/pro/aweber/views/settings/authorize.php CHANGED
@@ -84,7 +84,7 @@ foreach ( $template_vars as $key => $val ) {
84
  $('input[name="identifier"]').on( 'change', function (e) {
85
  var parent = $(this).closest('.sui-box-body'),
86
  val = $(this).val(),
87
- link = $('.forminator-addon-connect', parent),
88
  href = link.prop('href');
89
  if ( href ) {
90
  var index = href.indexOf('identifier');
84
  $('input[name="identifier"]').on( 'change', function (e) {
85
  var parent = $(this).closest('.sui-box-body'),
86
  val = $(this).val(),
87
+ link = $( '.forminator-addon-connect', parent.next() ),
88
  href = link.prop('href');
89
  if ( href ) {
90
  var index = href.indexOf('identifier');
addons/pro/hubspot/views/settings/authorize.php CHANGED
@@ -84,7 +84,7 @@ foreach ( $template_vars as $key => $val ) {
84
  $('input[name="identifier"]').on( 'change', function (e) {
85
  var parent = $(this).closest('.sui-box-body'),
86
  val = $(this).val(),
87
- link = $('.forminator-addon-connect', parent),
88
  href = link.prop('href');
89
  if ( href ) {
90
  var index = href.indexOf('identifier');
84
  $('input[name="identifier"]').on( 'change', function (e) {
85
  var parent = $(this).closest('.sui-box-body'),
86
  val = $(this).val(),
87
+ link = $( '.forminator-addon-connect', parent.next() ),
88
  href = link.prop('href');
89
  if ( href ) {
90
  var index = href.indexOf('identifier');
admin/classes/class-admin.php CHANGED
@@ -962,23 +962,27 @@ class Forminator_Admin {
962
  public function show_plugin_update_notice( $data, $response ) {
963
  $plugin_data = (object) $response;
964
 
965
- if ( empty( $plugin_data->new_version ) || empty( $plugin_data->plugin ) ) {
966
  return;
967
  }
968
 
969
  if ( '1.16.0' === $plugin_data->new_version || '1.16' === $plugin_data->new_version ) {
970
- $notice = sprintf(
971
- __( '<strong>Important Upgrade Notice:</strong> We\'ve made some improvements to the way form submissions are handled with this update for better performance, and that can break <strong>only</strong> custom forms that may be using deprecated actions & filters. See <a href="%1$s" target="_blank">this chapter</a> in our Forminator API Docs for the complete list of those changes.', 'forminator' ),
972
- 'https://wpmudev.com/docs/api-plugin-development/forminator-api-docs/#modified-or-deprecated-hooks'
973
- );
974
- $notice .= '<br/><br/>' . esc_html__( 'Also, please ensure you have a backup of your site before updating, and check to ensure your custom forms are working as expected afterwards. If you face any issue or have any questions or doubt, don\'t hesitate to get in touch with our support heroes.', 'forminator' );
 
 
 
 
975
 
976
  echo "<script type='text/javascript'>
977
- (function ($) {
978
- $(document).ready(function (e) {
979
- $( '.wp-list-table tr[data-plugin=\"" . esc_attr( $plugin_data->plugin ) . "\"] .notice-warning' ).append( '" . addslashes( $notice ) . "' ).css('padding-bottom', '10px');
980
- });
981
- })(jQuery);
982
  </script>";
983
  }
984
  }
962
  public function show_plugin_update_notice( $data, $response ) {
963
  $plugin_data = (object) $response;
964
 
965
+ if ( empty( $plugin_data->update ) || empty( $plugin_data->new_version ) || empty( $plugin_data->plugin ) ) {
966
  return;
967
  }
968
 
969
  if ( '1.16.0' === $plugin_data->new_version || '1.16' === $plugin_data->new_version ) {
970
+ $notice = '<br/><strong>' . __( 'Upgrade Notice: ', 'forminator' ) . '</strong>';
971
+ $notice .= __( 'Forminator is getting a huge performance boost thanks to some form submission improvements.', 'forminator' );
972
+ $notice .= '<br/><br/>' . sprintf(
973
+ __( 'There\'s an extremely low chance these changes may affect you if any of your forms use a custom action or filter that we\'ve now removed or modified (forms using standard Forminator features won\'t be affected at all). If needed, refer to this list of the %1$sretired actions/filters%2$s, but we\'re confident that %3$s of users should remain unaffected.', 'forminator' ),
974
+ '<a href="https://wpmudev.com/docs/api-plugin-development/forminator-api-docs/#modified-or-deprecated-hooks" target="_blank">',
975
+ '</a>',
976
+ '99%'
977
+ );
978
+ $notice .= '<br/><br/>' . esc_html__( 'Any problems or issues? Don\'t hesitate to create a support ticket or contact support directly.', 'forminator' );
979
 
980
  echo "<script type='text/javascript'>
981
+ (function ($) {
982
+ $(document).ready(function (e) {
983
+ $( '.wp-list-table tr[data-plugin=\"" . esc_attr( $plugin_data->plugin ) . "\"] .notice-warning' ).append( '" . addslashes( $notice ) . "' ).css('padding-bottom', '10px');
984
+ });
985
+ })(jQuery);
986
  </script>";
987
  }
988
  }
admin/views/dashboard/content.php CHANGED
@@ -30,7 +30,7 @@
30
  $notice_dismissed = get_option( 'forminator_dismiss_feature_11511', false );
31
  $version_upgraded = get_option( 'forminator_version_upgraded', false );
32
 
33
- if ( ! $notice_dismissed && $version_upgraded && forminator_is_show_documentation_link() ) {
34
  $this->template( 'dashboard/new-feature-notice' );
35
  }
36
  ?>
30
  $notice_dismissed = get_option( 'forminator_dismiss_feature_11511', false );
31
  $version_upgraded = get_option( 'forminator_version_upgraded', false );
32
 
33
+ if ( ! $notice_dismissed && $version_upgraded && forminator_is_show_documentation_link() && ! isset( $_GET['createnew'] ) ) {
34
  $this->template( 'dashboard/new-feature-notice' );
35
  }
36
  ?>
assets/js/front/front.paypal.js CHANGED
@@ -106,7 +106,7 @@
106
  }
107
 
108
  // Listen for form field changes
109
- $form.find('input, select, textarea').change( function() {
110
  if ( self.is_data_valid() && self.is_form_valid() ) {
111
  actions.enable();
112
  } else {
106
  }
107
 
108
  // Listen for form field changes
109
+ $form.find('input, select, textarea').on( 'change', function() {
110
  if ( self.is_data_valid() && self.is_form_valid() ) {
111
  actions.enable();
112
  } else {
assets/js/front/front.submit.js CHANGED
@@ -184,7 +184,7 @@
184
 
185
  $target_message.removeAttr("aria-hidden")
186
  .prop("tabindex", "-1")
187
- .removeClass('forminator-success forminator-error')
188
  .addClass('forminator-loading forminator-show');
189
  }
190
 
@@ -465,7 +465,7 @@
465
 
466
  $target_message.removeAttr("aria-hidden")
467
  .prop("tabindex", "-1")
468
- .removeClass('forminator-success forminator-error')
469
  .addClass('forminator-loading forminator-show');
470
  }
471
 
184
 
185
  $target_message.removeAttr("aria-hidden")
186
  .prop("tabindex", "-1")
187
+ .removeClass('forminator-success forminator-error forminator-accessible')
188
  .addClass('forminator-loading forminator-show');
189
  }
190
 
465
 
466
  $target_message.removeAttr("aria-hidden")
467
  .prop("tabindex", "-1")
468
+ .removeClass('forminator-success forminator-error forminator-accessible')
469
  .addClass('forminator-loading forminator-show');
470
  }
471
 
build/front/front.multi.min.js CHANGED
@@ -1 +1 @@
1
- !function n(o,i,a){function s(e,t){if(!i[e]){if(!o[e]){var r="function"==typeof require&&require;if(!t&&r)return r(e,!0);if(l)return l(e,!0);throw(t=new Error("Cannot find module '"+e+"'")).code="MODULE_NOT_FOUND",t}r=i[e]={exports:{}},o[e][0].call(r.exports,function(t){return s(o[e][1][t]||t)},r,r.exports,n,o,i,a)}return i[e].exports}for(var l="function"==typeof require&&require,t=0;t<a.length;t++)s(a[t]);return s}({1:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o=n(t("./parser/front.calculator.parser.tokenizer")),i=n(t("./symbol/front.calculator.symbol.loader")),a=n(t("./parser/front.calculator.parser")),s=n(t("./symbol/front.calculator.symbol.number")),l=n(t("./symbol/abstract/front.calculator.symbol.constant.abstract")),f=n(t("./parser/node/front.calculator.parser.node.symbol")),c=n(t("./symbol/abstract/front.calculator.symbol.operator.abstract")),u=n(t("./symbol/front.calculator.symbol.separator")),m=n(t("./parser/node/front.calculator.parser.node.function")),d=n(t("./parser/node/front.calculator.parser.node.container"));function n(t){return t&&t.__esModule?t:{default:t}}function h(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var p=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.term=t,this.tokenizer=new o.default(this.term),this.symbolLoader=new i.default,this.parser=new a.default(this.symbolLoader)}var t,r,n;return t=e,(r=[{key:"parse",value:function(){this.tokenizer.input=this.term,this.tokenizer.reset();var t=this.tokenizer.tokenize();if(0===t.length)throw"Error: Empty token of calculator term.";t=this.parser.parse(t);if(t.isEmpty())throw"Error: Empty nodes of calculator tokens.";return t}},{key:"calculate",value:function(){var t=this.parse();return!1===t?0:this.calculateNode(t)}},{key:"calculateNode",value:function(t){if(t instanceof f.default)return this.calculateSymbolNode(t);if(t instanceof m.default)return this.calculateFunctionNode(t);if(t instanceof d.default)return this.calculateContainerNode(t);throw'Error: Cannot calculate node of unknown type "'+t.constructor.name+'"'}},{key:"calculateContainerNode",value:function(t){if(t instanceof m.default)throw"Error: Expected container node but got a function node";for(var e=0,r=t.childNodes,n=this.detectCalculationOrder(r),o=0;o<n.length;o++){for(var i=n[o].node,a=n[o].index,s=null,l=null,f=0;f!==a;)void 0===r[f]||(s=r[f],l=f),f++;for(f++;void 0===r[f];)f++;var c=r[f],u=f,c=isNaN(c)?this.calculateNode(c):c,d=i.symbol;i.isUnaryOperator?(e=d.operate(null,c),delete r[u],r[a]=e):null!==l&&null!==s&&(i=isNaN(s)?this.calculateNode(s):s,e=d.operate(i,c),delete r[l],delete r[u],r[a]=e)}if(0===(r=r.filter(function(t){return void 0!==t})).length)throw"Error: Missing calculable subterm. Are there empty brackets?";if(1<r.length)throw"Error: Missing operators between parts of the term.";return e=r.pop(),isNaN(e)?this.calculateNode(e):e}},{key:"calculateFunctionNode",value:function(t){for(var e=t.childNodes,r=[],n=[],o=null,i=0;i<e.length;i++){var a=e[i];a instanceof f.default&&a.symbol instanceof u.default?(o=new d.default(n),r.push(this.calculateNode(o)),n=[]):n.push(a)}return 0<n.length&&(o=new d.default(n),r.push(this.calculateNode(o))),t.symbolNode.symbol.execute(r)}},{key:"calculateSymbolNode",value:function(t){var e=t.symbol,r=0;if(e instanceof s.default)r=t.token.value,r=Number(r);else{if(!(e instanceof l.default))throw'Error: Found symbol of unexpected type "'+e.constructor.name+'", expected number or constant';r=e.value}return r}},{key:"detectCalculationOrder",value:function(t){for(var e=[],r=0;r<t.length;r++){var n=t[r];n instanceof f.default&&n.symbol instanceof c.default&&e.push({index:r,node:n})}return e.sort(function(t,e){var t=t.node,e=e.node,r=t.symbol,n=2,o=(t.isUnaryOperator&&(n=3),e.symbol),i=2;return n===(i=e.isUnaryOperator?3:i)&&(n=r.precedence,i=o.precedence),n===i?t.token.position<e.token.position?-1:1:n<i?1:-1}),e}}])&&h(t.prototype,r),n&&h(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();r.default=p,void 0===window.forminatorCalculator&&(window.forminatorCalculator=function(t){return new p(t)})},{"./parser/front.calculator.parser":2,"./parser/front.calculator.parser.tokenizer":4,"./parser/node/front.calculator.parser.node.container":6,"./parser/node/front.calculator.parser.node.function":7,"./parser/node/front.calculator.parser.node.symbol":8,"./symbol/abstract/front.calculator.symbol.constant.abstract":10,"./symbol/abstract/front.calculator.symbol.operator.abstract":12,"./symbol/front.calculator.symbol.loader":16,"./symbol/front.calculator.symbol.number":17,"./symbol/front.calculator.symbol.separator":18}],2:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var f=n(t("./front.calculator.parser.token")),c=n(t("../symbol/front.calculator.symbol.number")),u=n(t("../symbol/brackets/front.calculator.symbol.opening.bracket")),d=n(t("../symbol/brackets/front.calculator.symbol.closing.bracket")),m=n(t("../symbol/abstract/front.calculator.symbol.function.abstract")),a=n(t("../symbol/abstract/front.calculator.symbol.operator.abstract")),s=n(t("../symbol/front.calculator.symbol.separator")),h=n(t("./node/front.calculator.parser.node.symbol")),l=n(t("./node/front.calculator.parser.node.container")),p=n(t("./node/front.calculator.parser.node.function"));function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}t=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.symbolLoader=t}var t,r,n;return t=e,(r=[{key:"parse",value:function(t){t=this.detectSymbols(t),t=this.createTreeByBrackets(t),t=this.transformTreeByFunctions(t);return this.checkGrammar(t),new l.default(t)}},{key:"detectSymbols",value:function(t){for(var e=[],r=null,n=null,o=!1,i=0,a=0;a<t.length;a++){var s=t[a],l=s.type;if(f.default.TYPE_WORD===l){if(n=s.value,null===(r=this.symbolLoader.find(n)))throw"Error: Detected unknown or invalid string identifier: "+n+"."}else if(l===f.default.TYPE_NUMBER){l=this.symbolLoader.findSubTypes(c.default);if(l.length<1||!(l instanceof Array))throw"Error: Unavailable number symbol processor.";r=l[0]}else{if(n=s.value,null===(r=this.symbolLoader.find(n)))throw"Error: Detected unknown or invalid string identifier: "+n+".";if(r instanceof u.default&&i++,r instanceof d.default&&--i<0)throw"Error: Found closing bracket that does not have an opening bracket."}if(o){if(!(r instanceof u.default))throw"Error: Expected opening bracket (after a function) but got something else.";o=!1}else r instanceof m.default&&(o=!0);l=new h.default(s,r);e.push(l)}if(o)throw"Error: Expected opening bracket (after a function) but reached the end of the term";if(0<i)throw"Error: There is at least one opening bracket that does not have a closing bracket";return e}},{key:"createTreeByBrackets",value:function(t){for(var e=[],r=[],n=0,o=0;o<t.length;o++){var i,a=t[o];if(!(a instanceof h.default))throw'Error: Expected symbol node, but got "'+a.constructor.name+'"';a.symbol instanceof u.default?1<++n&&r.push(a):a.symbol instanceof d.default?0===--n?(i=this.createTreeByBrackets(r),e.push(new l.default(i)),r=[]):r.push(a):(0===n?e:r).push(a)}return e}},{key:"transformTreeByFunctions",value:function(t){for(var e=[],r=null,n=0;n<t.length;n++){var o=t[n];if(o instanceof l.default){var i,a=this.transformTreeByFunctions(o.childNodes);null!==r?(i=new p.default(a,r),e.push(i),r=null):(o.childNodes=a,e.push(o))}else{if(!(o instanceof h.default))throw'Error: Expected array node or symbol node, got "'+o.constructor.name+'"';o.symbol instanceof m.default?r=o:e.push(o)}}return e}},{key:"checkGrammar",value:function(t){for(var e=0;e<t.length;e++){var r=t[e];if(r instanceof h.default){var n=r.symbol;if(n instanceof a.default){if(e+1>=t.length)throw"Error: Found operator that does not stand before an operand.";var o=e-1,i=null;if(null===(i=0<=o&&(i=t[o])instanceof h.default&&(i.symbol instanceof a.default||i.symbol instanceof s.default)?null:i)){if(!n.operatesUnary)throw"Error: Found operator in unary notation that is not unary.";r.setIsUnaryOperator(!0)}else if(!n.operatesBinary)throw console.log(n),"Error: Found operator in binary notation that is not binary."}}else this.checkGrammar(r.childNodes)}}}])&&o(t.prototype,r),n&&o(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();r.default=t},{"../symbol/abstract/front.calculator.symbol.function.abstract":11,"../symbol/abstract/front.calculator.symbol.operator.abstract":12,"../symbol/brackets/front.calculator.symbol.closing.bracket":13,"../symbol/brackets/front.calculator.symbol.opening.bracket":14,"../symbol/front.calculator.symbol.number":17,"../symbol/front.calculator.symbol.separator":18,"./front.calculator.parser.token":3,"./node/front.calculator.parser.node.container":6,"./node/front.calculator.parser.node.function":7,"./node/front.calculator.parser.node.symbol":8}],3:[function(t,e,r){"use strict";function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=function(){function n(t,e,r){if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");this.type=t,this.value=e,this.position=r}var t,e,r;return t=n,r=[{key:"TYPE_WORD",get:function(){return 1}},{key:"TYPE_CHAR",get:function(){return 2}},{key:"TYPE_NUMBER",get:function(){return 3}}],(e=null)&&o(t.prototype,e),r&&o(t,r),Object.defineProperty(t,"prototype",{writable:!1}),n}();r.default=n},{}],4:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o=(t=t("./front.calculator.parser.token"))&&t.__esModule?t:{default:t};function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}t=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.input=t,this.currentPosition=0}var t,r,n;return t=e,(r=[{key:"tokenize",value:function(){this.reset();for(var t=[],e=this.readToken();e;)t.push(e),e=this.readToken();return t}},{key:"readToken",value:function(){this.stepOverWhitespace();var t=this.readCurrent();if(null===t)return null;var e=null,r=null,r=this.isLetter(t)?(e=this.readWord(),o.default.TYPE_WORD):this.isDigit(t)||this.isPeriod(t)?(e=this.readNumber(),o.default.TYPE_NUMBER):(e=this.readChar(),o.default.TYPE_CHAR);return new o.default(r,e,this.currentPosition)}},{key:"isLetter",value:function(t){if(null===t)return!1;t=t.charCodeAt(0);return 65<=t&&t<=90||97<=t&&t<=122}},{key:"isDigit",value:function(t){if(null===t)return!1;t=t.charCodeAt(0);return 48<=t&&t<=57}},{key:"isPeriod",value:function(t){return"."===t}},{key:"isWhitespace",value:function(t){return 0<=[" ","\t","\n"].indexOf(t)}},{key:"stepOverWhitespace",value:function(){for(;this.isWhitespace(this.readCurrent());)this.readNext()}},{key:"readWord",value:function(){for(var t="",e=this.readCurrent();null!==e&&this.isLetter(e);)t+=e,e=this.readNext();return t}},{key:"readNumber",value:function(){for(var t="",e=!1,r=this.readCurrent();null!==r&&(this.isPeriod(r)||this.isDigit(r));){if(this.isPeriod(r)){if(e)throw"Error: A number cannot have more than one period";e=!0}t+=r,r=this.readNext()}return t}},{key:"readChar",value:function(){var t=this.readCurrent();return this.readNext(),t}},{key:"readCurrent",value:function(){var t=null;return t=this.hasCurrent()?this.input[this.currentPosition]:t}},{key:"readNext",value:function(){return this.currentPosition++,this.readCurrent()}},{key:"hasCurrent",value:function(){return this.currentPosition<this.input.length}},{key:"reset",value:function(){this.currentPosition=0}}])&&i(t.prototype,r),n&&i(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();r.default=t},{"./front.calculator.parser.token":3}],5:[function(t,e,r){"use strict";function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,r.default=o(function t(){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function")})},{}],6:[function(t,e,r){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var i=(t=t("./front.calculator.parser.node.abstract"))&&t.__esModule?t:{default:t};function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(r){var n=function(){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(t){return!1}}();return function(){var t,e=f(r),e=(t=n?(t=f(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(t){var e=o;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&&s(e,t);var r,n=l(o);function o(t){var e;if(this instanceof o)return(e=n.call(this)).childNodes=null,e.setChildNodes(t),e;throw new TypeError("Cannot call a class as a function")}return e=o,(t=[{key:"setChildNodes",value:function(t){t.forEach(function(t){if(!(t instanceof i.default))throw"Expected AbstractNode, but got "+t.constructor.name}),this.childNodes=t}},{key:"size",value:function(){try{return this.childNodes.length}catch(t){return 0}}},{key:"isEmpty",value:function(){return!this.size()}}])&&a(e.prototype,t),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(i.default);r.default=t},{"./front.calculator.parser.node.abstract":5}],7:[function(t,e,r){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(r){var n=function(){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(t){return!1}}();return function(){var t,e=i(r),e=(t=n?(t=i(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function i(t){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;t=function(t){var e=i;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&&s(e,t);var r,n,o=l(i);function i(t,e){if(this instanceof i)return(t=o.call(this,t)).symbolNode=e,t;throw new TypeError("Cannot call a class as a function")}return e=i,r&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(((t=t("./front.calculator.parser.node.container"))&&t.__esModule?t:{default:t}).default);r.default=t},{"./front.calculator.parser.node.container":6}],8:[function(t,e,r){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var i=n(t("../../symbol/abstract/front.calculator.symbol.operator.abstract"));function n(t){return t&&t.__esModule?t:{default:t}}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(r){var n=function(){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(t){return!1}}();return function(){var t,e=f(r),e=(t=n?(t=f(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(t){var e=o;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&&s(e,t);var r,n=l(o);function o(t,e){var r;if(this instanceof o)return(r=n.call(this)).token=t,r.symbol=e,r.isUnaryOperator=!1,r;throw new TypeError("Cannot call a class as a function")}return e=o,(t=[{key:"setIsUnaryOperator",value:function(t){if(!(this.symbol instanceof i.default))throw"Error: Cannot mark node as unary operator, because symbol is not an operator but of type "+this.symbol.constructor.name;this.isUnaryOperator=t}}])&&a(e.prototype,t),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(n(t("./front.calculator.parser.node.abstract")).default);r.default=t},{"../../symbol/abstract/front.calculator.symbol.operator.abstract":12,"./front.calculator.parser.node.abstract":5}],9:[function(t,e,r){"use strict";function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=function(){function t(){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this.identifiers=[]}var e,r,n;return e=t,(r=[{key:"getIdentifiers",value:function(){var e=[];return this.identifiers.forEach(function(t){e.push(t.toLowerCase())}),e}}])&&o(e.prototype,r),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();r.default=n},{}],10:[function(t,e,r){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(r){var n=function(){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(t){return!1}}();return function(){var t,e=i(r),e=(t=n?(t=i(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function i(t){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;t=function(t){var e=i;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&&s(e,t);var r,n,o=l(i);function i(){var t;if(this instanceof i)return(t=o.call(this)).value=0,t;throw new TypeError("Cannot call a class as a function")}return e=i,r&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(((t=t("./front.calculator.symbol.abstract"))&&t.__esModule?t:{default:t}).default);r.default=t},{"./front.calculator.symbol.abstract":9}],11:[function(t,e,r){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(r){var n=function(){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(t){return!1}}();return function(){var t,e=l(r),e=(t=n?(t=l(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;t=function(t){var e=o;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&&a(e,t);var r,n=s(o);function o(){if(this instanceof o)return n.call(this);throw new TypeError("Cannot call a class as a function")}return e=o,(t=[{key:"execute",value:function(t){return 0}}])&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(((t=t("./front.calculator.symbol.abstract"))&&t.__esModule?t:{default:t}).default);r.default=t},{"./front.calculator.symbol.abstract":9}],12:[function(t,e,r){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(r){var n=function(){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(t){return!1}}();return function(){var t,e=l(r),e=(t=n?(t=l(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;t=function(t){var e=o;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&&a(e,t);var r,n=s(o);function o(){var t;if(this instanceof o)return(t=n.call(this)).precedence=0,t.operatesUnary=!1,t.operatesBinary=!0,t;throw new TypeError("Cannot call a class as a function")}return e=o,(t=[{key:"operate",value:function(t,e){return 0}}])&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(((t=t("./front.calculator.symbol.abstract"))&&t.__esModule?t:{default:t}).default);r.default=t},{"./front.calculator.symbol.abstract":9}],13:[function(t,e,r){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(r){var n=function(){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(t){return!1}}();return function(){var t,e=i(r),e=(t=n?(t=i(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function i(t){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;t=function(t){var e=i;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&&s(e,t);var r,n,o=l(i);function i(){var t;if(this instanceof i)return(t=o.call(this)).identifiers=[")"],t;throw new TypeError("Cannot call a class as a function")}return e=i,r&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(((t=t("../abstract/front.calculator.symbol.abstract"))&&t.__esModule?t:{default:t}).default);r.default=t},{"../abstract/front.calculator.symbol.abstract":9}],14:[function(t,e,r){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(r){var n=function(){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(t){return!1}}();return function(){var t,e=i(r),e=(t=n?(t=i(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function i(t){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;t=function(t){var e=i;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&&s(e,t);var r,n,o=l(i);function i(){var t;if(this instanceof i)return(t=o.call(this)).identifiers=["("],t;throw new TypeError("Cannot call a class as a function")}return e=i,r&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(((t=t("../abstract/front.calculator.symbol.abstract"))&&t.__esModule?t:{default:t}).default);r.default=t},{"../abstract/front.calculator.symbol.abstract":9}],15:[function(t,e,r){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(r){var n=function(){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(t){return!1}}();return function(){var t,e=i(r),e=(t=n?(t=i(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function i(t){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;t=function(t){var e=i;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&&s(e,t);var r,n,o=l(i);function i(){var t;if(this instanceof i)return(t=o.call(this)).identifiers=["pi"],t.value=Math.PI,t;throw new TypeError("Cannot call a class as a function")}return e=i,r&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(((t=t("../abstract/front.calculator.symbol.constant.abstract"))&&t.__esModule?t:{default:t}).default);r.default=t},{"../abstract/front.calculator.symbol.constant.abstract":10}],16:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o=n(t("./front.calculator.symbol.number")),i=n(t("./front.calculator.symbol.separator")),a=n(t("./brackets/front.calculator.symbol.opening.bracket")),s=n(t("./brackets/front.calculator.symbol.closing.bracket")),l=n(t("./constants/front.calculator.symbol.constant.pi")),f=n(t("./operators/front.calculator.symbol.operator.addition")),c=n(t("./operators/front.calculator.symbol.operator.division")),u=n(t("./operators/front.calculator.symbol.operator.exponentiation")),d=n(t("./operators/front.calculator.symbol.operator.modulo")),m=n(t("./operators/front.calculator.symbol.operator.multiplication")),h=n(t("./operators/front.calculator.symbol.operator.subtraction")),p=n(t("./functions/front.calculator.symbol.function.abs")),b=n(t("./functions/front.calculator.symbol.function.avg")),y=n(t("./functions/front.calculator.symbol.function.ceil")),_=n(t("./functions/front.calculator.symbol.function.floor")),g=n(t("./functions/front.calculator.symbol.function.max")),v=n(t("./functions/front.calculator.symbol.function.min")),w=n(t("./functions/front.calculator.symbol.function.round"));function n(t){return t&&t.__esModule?t:{default:t}}function O(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}t=function(){function t(){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this.symbols={FrontCalculatorSymbolNumber:new o.default,FrontCalculatorSymbolSeparator:new i.default,FrontCalculatorSymbolOpeningBracket:new a.default,FrontCalculatorSymbolClosingBracket:new s.default,FrontCalculatorSymbolConstantPi:new l.default,FrontCalculatorSymbolOperatorAddition:new f.default,FrontCalculatorSymbolOperatorDivision:new c.default,FrontCalculatorSymbolOperatorExponentiation:new u.default,FrontCalculatorSymbolOperatorModulo:new d.default,FrontCalculatorSymbolOperatorMultiplication:new m.default,FrontCalculatorSymbolOperatorSubtraction:new h.default,FrontCalculatorSymbolFunctionAbs:new p.default,FrontCalculatorSymbolFunctionAvg:new b.default,FrontCalculatorSymbolFunctionCeil:new y.default,FrontCalculatorSymbolFunctionFloor:new _.default,FrontCalculatorSymbolFunctionMax:new g.default,FrontCalculatorSymbolFunctionMin:new v.default,FrontCalculatorSymbolFunctionRound:new w.default}}var e,r,n;return e=t,(r=[{key:"find",value:function(t){for(var e in t=t.toLowerCase(),this.symbols)if(this.symbols.hasOwnProperty(e)){e=this.symbols[e];if(0<=e.getIdentifiers().indexOf(t))return e}return null}},{key:"findSubTypes",value:function(t){var e,r,n=[];for(e in this.symbols)!this.symbols.hasOwnProperty(e)||(r=this.symbols[e])instanceof t&&n.push(r);return n}}])&&O(e.prototype,r),n&&O(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();r.default=t},{"./brackets/front.calculator.symbol.closing.bracket":13,"./brackets/front.calculator.symbol.opening.bracket":14,"./constants/front.calculator.symbol.constant.pi":15,"./front.calculator.symbol.number":17,"./front.calculator.symbol.separator":18,"./functions/front.calculator.symbol.function.abs":19,"./functions/front.calculator.symbol.function.avg":20,"./functions/front.calculator.symbol.function.ceil":21,"./functions/front.calculator.symbol.function.floor":22,"./functions/front.calculator.symbol.function.max":23,"./functions/front.calculator.symbol.function.min":24,"./functions/front.calculator.symbol.function.round":25,"./operators/front.calculator.symbol.operator.addition":26,"./operators/front.calculator.symbol.operator.division":27,"./operators/front.calculator.symbol.operator.exponentiation":28,"./operators/front.calculator.symbol.operator.modulo":29,"./operators/front.calculator.symbol.operator.multiplication":30,"./operators/front.calculator.symbol.operator.subtraction":31}],17:[function(t,e,r){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(r){var n=function(){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(t){return!1}}();return function(){var t,e=i(r),e=(t=n?(t=i(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function i(t){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;t=function(t){var e=i;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&&s(e,t);var r,n,o=l(i);function i(){if(this instanceof i)return o.call(this);throw new TypeError("Cannot call a class as a function")}return e=i,r&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(((t=t("./abstract/front.calculator.symbol.abstract"))&&t.__esModule?t:{default:t}).default);r.default=t},{"./abstract/front.calculator.symbol.abstract":9}],18:[function(t,e,r){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(r){var n=function(){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(t){return!1}}();return function(){var t,e=i(r),e=(t=n?(t=i(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function i(t){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;t=function(t){var e=i;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&&s(e,t);var r,n,o=l(i);function i(){var t;if(this instanceof i)return(t=o.call(this)).identifiers=[","],t;throw new TypeError("Cannot call a class as a function")}return e=i,r&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(((t=t("./abstract/front.calculator.symbol.abstract"))&&t.__esModule?t:{default:t}).default);r.default=t},{"./abstract/front.calculator.symbol.abstract":9}],19:[function(t,e,r){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(r){var n=function(){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(t){return!1}}();return function(){var t,e=l(r),e=(t=n?(t=l(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;t=function(t){var e=o;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&&a(e,t);var r,n=s(o);function o(){var t;if(this instanceof o)return(t=n.call(this)).identifiers=["abs"],t;throw new TypeError("Cannot call a class as a function")}return e=o,(t=[{key:"execute",value:function(t){if(1!==t.length)throw"Error: Expected one argument, got "+t.length;t=t[0];return Math.abs(t)}}])&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(((t=t("../abstract/front.calculator.symbol.function.abstract"))&&t.__esModule?t:{default:t}).default);r.default=t},{"../abstract/front.calculator.symbol.function.abstract":11}],20:[function(t,e,r){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(r){var n=function(){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(t){return!1}}();return function(){var t,e=l(r),e=(t=n?(t=l(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;t=function(t){var e=o;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&&a(e,t);var r,n=s(o);function o(){var t;if(this instanceof o)return(t=n.call(this)).identifiers=["avg"],t;throw new TypeError("Cannot call a class as a function")}return e=o,(t=[{key:"execute",value:function(t){if(t.length<1)throw"Error: Expected at least one argument, got "+t.length;for(var e=0,r=0;r<t.length;r++)e+=t[r];return e/t.length}}])&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(((t=t("../abstract/front.calculator.symbol.function.abstract"))&&t.__esModule?t:{default:t}).default);r.default=t},{"../abstract/front.calculator.symbol.function.abstract":11}],21:[function(t,e,r){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(r){var n=function(){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(t){return!1}}();return function(){var t,e=l(r),e=(t=n?(t=l(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;t=function(t){var e=o;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&&a(e,t);var r,n=s(o);function o(){var t;if(this instanceof o)return(t=n.call(this)).identifiers=["ceil"],t;throw new TypeError("Cannot call a class as a function")}return e=o,(t=[{key:"execute",value:function(t){if(1!==t.length)throw"Error: Expected one argument, got "+t.length;return Math.ceil(t[0])}}])&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(((t=t("../abstract/front.calculator.symbol.function.abstract"))&&t.__esModule?t:{default:t}).default);r.default=t},{"../abstract/front.calculator.symbol.function.abstract":11}],22:[function(t,e,r){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(r){var n=function(){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(t){return!1}}();return function(){var t,e=l(r),e=(t=n?(t=l(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;t=function(t){var e=o;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&&a(e,t);var r,n=s(o);function o(){var t;if(this instanceof o)return(t=n.call(this)).identifiers=["floor"],t;throw new TypeError("Cannot call a class as a function")}return e=o,(t=[{key:"execute",value:function(t){if(1!==t.length)throw"Error: Expected one argument, got "+t.length;return Math.floor(t[0])}}])&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(((t=t("../abstract/front.calculator.symbol.function.abstract"))&&t.__esModule?t:{default:t}).default);r.default=t},{"../abstract/front.calculator.symbol.function.abstract":11}],23:[function(t,e,r){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t){return function(t){if(Array.isArray(t))return n(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Map"===(r="Object"===r&&t.constructor?t.constructor.name:r)||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(r){var n=function(){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(t){return!1}}();return function(){var t,e=f(r),e=(t=n?(t=f(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;t=function(t){var e=o;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&&s(e,t);var r,n=l(o);function o(){var t;if(this instanceof o)return(t=n.call(this)).identifiers=["max"],t;throw new TypeError("Cannot call a class as a function")}return e=o,(t=[{key:"execute",value:function(t){if(t.length<1)throw"Error: Expected at least one argument, got "+t.length;return Math.max.apply(Math,i(t))}}])&&a(e.prototype,t),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(((t=t("../abstract/front.calculator.symbol.function.abstract"))&&t.__esModule?t:{default:t}).default);r.default=t},{"../abstract/front.calculator.symbol.function.abstract":11}],24:[function(t,e,r){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t){return function(t){if(Array.isArray(t))return n(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Map"===(r="Object"===r&&t.constructor?t.constructor.name:r)||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(r){var n=function(){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(t){return!1}}();return function(){var t,e=f(r),e=(t=n?(t=f(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;t=function(t){var e=o;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&&s(e,t);var r,n=l(o);function o(){var t;if(this instanceof o)return(t=n.call(this)).identifiers=["min"],t;throw new TypeError("Cannot call a class as a function")}return e=o,(t=[{key:"execute",value:function(t){if(t.length<1)throw"Error: Expected at least one argument, got "+t.length;return Math.min.apply(Math,i(t))}}])&&a(e.prototype,t),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(((t=t("../abstract/front.calculator.symbol.function.abstract"))&&t.__esModule?t:{default:t}).default);r.default=t},{"../abstract/front.calculator.symbol.function.abstract":11}],25:[function(t,e,r){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(r){var n=function(){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(t){return!1}}();return function(){var t,e=l(r),e=(t=n?(t=l(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;t=function(t){var e=o;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&&a(e,t);var r,n=s(o);function o(){var t;if(this instanceof o)return(t=n.call(this)).identifiers=["round"],t;throw new TypeError("Cannot call a class as a function")}return e=o,(t=[{key:"execute",value:function(t){if(1!==t.length)throw"Error: Expected one argument, got "+t.length;return Math.round(t[0])}}])&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(((t=t("../abstract/front.calculator.symbol.function.abstract"))&&t.__esModule?t:{default:t}).default);r.default=t},{"../abstract/front.calculator.symbol.function.abstract":11}],26:[function(t,e,r){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(r){var n=function(){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(t){return!1}}();return function(){var t,e=l(r),e=(t=n?(t=l(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;t=function(t){var e=o;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&&a(e,t);var r,n=s(o);function o(){var t;if(this instanceof o)return(t=n.call(this)).identifiers=["+"],t.precedence=100,t;throw new TypeError("Cannot call a class as a function")}return e=o,(t=[{key:"operate",value:function(t,e){return t+e}}])&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(((t=t("../abstract/front.calculator.symbol.operator.abstract"))&&t.__esModule?t:{default:t}).default);r.default=t},{"../abstract/front.calculator.symbol.operator.abstract":12}],27:[function(t,e,r){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(r){var n=function(){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(t){return!1}}();return function(){var t,e=l(r),e=(t=n?(t=l(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;t=function(t){var e=o;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&&a(e,t);var r,n=s(o);function o(){var t;if(this instanceof o)return(t=n.call(this)).identifiers=["/"],t.precedence=200,t;throw new TypeError("Cannot call a class as a function")}return e=o,(t=[{key:"operate",value:function(t,e){return t/e}}])&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(((t=t("../abstract/front.calculator.symbol.operator.abstract"))&&t.__esModule?t:{default:t}).default);r.default=t},{"../abstract/front.calculator.symbol.operator.abstract":12}],28:[function(t,e,r){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(r){var n=function(){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(t){return!1}}();return function(){var t,e=l(r),e=(t=n?(t=l(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;t=function(t){var e=o;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&&a(e,t);var r,n=s(o);function o(){var t;if(this instanceof o)return(t=n.call(this)).identifiers=["^"],t.precedence=300,t;throw new TypeError("Cannot call a class as a function")}return e=o,(t=[{key:"operate",value:function(t,e){return Math.pow(t,e)}}])&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(((t=t("../abstract/front.calculator.symbol.operator.abstract"))&&t.__esModule?t:{default:t}).default);r.default=t},{"../abstract/front.calculator.symbol.operator.abstract":12}],29:[function(t,e,r){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(r){var n=function(){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(t){return!1}}();return function(){var t,e=l(r),e=(t=n?(t=l(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;t=function(t){var e=o;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&&a(e,t);var r,n=s(o);function o(){var t;if(this instanceof o)return(t=n.call(this)).identifiers=["%"],t.precedence=200,t;throw new TypeError("Cannot call a class as a function")}return e=o,(t=[{key:"operate",value:function(t,e){return t%e}}])&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(((t=t("../abstract/front.calculator.symbol.operator.abstract"))&&t.__esModule?t:{default:t}).default);r.default=t},{"../abstract/front.calculator.symbol.operator.abstract":12}],30:[function(t,e,r){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(r){var n=function(){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(t){return!1}}();return function(){var t,e=l(r),e=(t=n?(t=l(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;t=function(t){var e=o;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&&a(e,t);var r,n=s(o);function o(){var t;if(this instanceof o)return(t=n.call(this)).identifiers=["*"],t.precedence=200,t;throw new TypeError("Cannot call a class as a function")}return e=o,(t=[{key:"operate",value:function(t,e){return t*e}}])&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(((t=t("../abstract/front.calculator.symbol.operator.abstract"))&&t.__esModule?t:{default:t}).default);r.default=t},{"../abstract/front.calculator.symbol.operator.abstract":12}],31:[function(t,e,r){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(r){var n=function(){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(t){return!1}}();return function(){var t,e=l(r),e=(t=n?(t=l(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;t=function(t){var e=o;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&&a(e,t);var r,n=s(o);function o(){var t;if(this instanceof o)return(t=n.call(this)).identifiers=["-"],t.precedence=100,t.operatesUnary=!0,t;throw new TypeError("Cannot call a class as a function")}return e=o,(t=[{key:"operate",value:function(t,e){return t-e}}])&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(((t=t("../abstract/front.calculator.symbol.operator.abstract"))&&t.__esModule?t:{default:t}).default);r.default=t},{"../abstract/front.calculator.symbol.operator.abstract":12}]},{},[1]),[].includes||(Array.prototype.includes=function(t,e){"use strict";var r=Object(this),n=parseInt(r.length)||0;if(0===n)return!1;var o,e=parseInt(e)||0;for(0<=e?o=e:(o=n+e)<0&&(o=0);o<n;){var i=r[o];if(t===i||t!=t&&i!=i)return!0;o++}return!1}),function(l,f,a){"use strict";var r="forminatorLoader",n={action:"",type:"",id:"",render_id:"",is_preview:"",preview_data:[],nonce:!1,last_submit_data:{},extra:{}};function e(t,e){this.element=t,this.$el=l(this.element),this.settings=l.extend({},n,e),this._defaults=n,this._name=r,this.frontInitCalled=!1,this.scriptsQue=[],this.frontOptions=null,this.leadFrontOptions=null,this.init()}l.extend(e.prototype,{init:function(){var t=decodeURI(a.location.search).replace(/(^\?)/,"").split("&").map(function(t){return this[(t=t.split("="))[0]]=t[1],this}.bind({}))[0];t.action=this.settings.action,t.type=this.settings.type,t.id=this.settings.id,t.render_id=this.settings.render_id,t.is_preview=this.settings.is_preview,t.preview_data=JSON.stringify(this.settings.preview_data),t.last_submit_data=this.settings.last_submit_data,t.extra=this.settings.extra,t.nonce=this.settings.nonce,void 0!==this.settings.has_lead&&(t.has_lead=this.settings.has_lead,t.leads_id=this.settings.leads_id),this.load_ajax(t)},load_ajax:function(o){var i=this;l.ajax({type:"POST",url:f.ForminatorFront.ajaxUrl,data:o,cache:!1,beforeSend:function(){l(a).trigger("before.load.forminator",o.id)},success:function(t){if(t.success){var e=t.data;if(l(a).trigger("response.success.load.forminator",o.id,t),!e.is_ajax_load)return!1;var r,n=[];(n=void 0===e.pagination_config&&void 0!==e.options.pagination_config?e.options.pagination_config:n)&&(f.Forminator_Cform_Paginations=f.Forminator_Cform_Paginations||[],f.Forminator_Cform_Paginations[o.id]=n),i.frontOptions=e.options||null,void 0===f.Forminator_Cform_Paginations&&i.frontOptions.pagination_config&&(f.Forminator_Cform_Paginations=f.Forminator_Cform_Paginations||[],f.Forminator_Cform_Paginations[o.id]=i.frontOptions.pagination_config),void 0!==e.lead_options&&(i.leadFrontOptions=e.lead_options||null,void 0===f.Forminator_Cform_Paginations&&i.leadFrontOptions.pagination_config&&(f.Forminator_Cform_Paginations=f.Forminator_Cform_Paginations||[],f.Forminator_Cform_Paginations[o.leads_id]=i.leadFrontOptions.pagination_config)),e.html&&(n=e.style||null,r=e.script||null,i.render_html(e.html,n,r)),e.styles&&i.maybe_append_styles(e.styles),e.scripts&&i.maybe_append_scripts(e.scripts),!e.scripts&&i.frontOptions&&i.init_front()}else l(a).trigger("response.error.load.forminator",o.id,t)},error:function(){l(a).trigger("request.error.load.forminator",o.id)}}).always(function(){l(a).trigger("after.load.forminator",o.id)})},render_html:function(t,e,r){var n=this.settings.id,o=this.settings.render_id,i="",a=null;(a=this.$el.find(".forminator-response-message")).length&&(i=a.get(0).outerHTML),(a=this.$el.find(".forminator-poll-response-message")).length&&(i=a.get(0).outerHTML),this.$el.parent().hasClass("forminator-guttenberg")?this.$el.parent().html(t):this.$el.replaceWith(t),i&&(l("#forminator-module-"+n+"[data-forminator-render="+o+"] .forminator-response-message").replaceWith(i),l("#forminator-module-"+n+"[data-forminator-render="+o+"] .forminator-poll-response-message").replaceWith(i)),e&&(l("style#forminator-module-"+n).length&&l("style#forminator-module-"+n).remove(),l("body").append(e)),r&&l("body").append(r)},maybe_append_styles:function(t){for(var e in t){var r;t.hasOwnProperty(e)&&!l("link#"+e).length&&((r=l("<link>")).attr("rel","stylesheet"),r.attr("id",e),r.attr("type","text/css"),r.attr("media","all"),r.attr("href",t[e].src),l("head").append(r))}},maybe_append_scripts:function(t){var e,r=[],n=l("body").find(".hustle-ui").length,o=l("body").find("script[src^='https://www.paypal.com/sdk/js']").attr("src");for(e in t)if(t.hasOwnProperty(e)){var i=t[e].on,a=t[e].load;if("window"===i){if(f[a]&&"forminator-google-recaptcha"!==e&&0===n)continue}else if("$"===i&&l.fn[a])continue;i={};i.src=t[e].src,i.src!==o&&(r.push(i),this.scriptsQue.push(e))}if(this.scriptsQue.length)for(var s in r)r.hasOwnProperty(s)&&this.load_script(r[s]);else this.init_front()},load_script:function(t){var e=this,r=a.createElement("script"),n=a.getElementsByTagName("body")[0];r.type="text/javascript",r.src=t.src,r.async=!0,r.defer=!0,r.onload=function(){e.script_on_load()},0===l('script[src="'+r.src+'"]').length?n.appendChild(r):e.script_on_load()},script_on_load:function(){this.scriptsQue.pop(),this.scriptsQue.length||this.init_front()},init_front:function(){var t,e,r,n;this.frontInitCalled||(this.frontInitCalled=!0,n=this.settings.id,t=this.settings.render_id,e=this.frontOptions||null,r=this.leadFrontOptions||null,e&&l("#forminator-module-"+n+'[data-forminator-render="'+t+'"]').forminatorFront(e),void 0!==this.settings.has_lead&&r&&(n=this.settings.leads_id,l("#forminator-module-"+n+'[data-forminator-render="'+t+'"]').forminatorFront(r)),this.init_window_vars())},init_window_vars:function(){var t;"undefined"!=typeof ForminatorValidationErrors&&void 0!==(t=jQuery(ForminatorValidationErrors.selector).data("forminatorFrontSubmit"))&&t.show_messages(ForminatorValidationErrors.errors),"undefined"!=typeof ForminatorFormHider&&void 0!==(t=jQuery(ForminatorFormHider.selector).data("forminatorFront"))&&t.hide()}}),l.fn[r]=function(t){return this.each(function(){l.data(this,r)||l.data(this,r,new e(this,t))})}}(jQuery,window,document),function(l,o,n){"use strict";var r="forminatorFront",i={form_type:"custom-form",rules:{},messages:{},conditions:{},inline_validation:!1,print_value:!1,chart_design:"bar",chart_options:{},forminator_fields:[],max_nested_formula:5,general_messages:{calculation_error:"Failed to calculate field.",payment_require_ssl_error:"SSL required to submit this form, please check your URL.",payment_require_amount_error:"PayPal amount must be greater than 0.",form_has_error:"Please correct the errors before submission."},payment_require_ssl:!1};function e(t,e){this.element=t,this.$el=l(this.element),this.forminator_selector="#"+l(this.element).attr("id")+'[data-forminator-render="'+l(this.element).data("forminator-render")+'"]',this.forminator_loader_selector='div[data-forminator-render="'+l(this.element).data("forminator-render")+'"][data-form="'+l(this.element).attr("id")+'"]',this.settings=l.extend({},i,e),void 0!==this.settings.messages&&(this.settings.messages=this.maybeParseStringToJson(this.settings.messages,"object")),void 0!==this.settings.rules&&(this.settings.rules=this.maybeParseStringToJson(this.settings.rules,"object")),void 0!==this.settings.calendar&&(this.settings.calendar=this.maybeParseStringToJson(this.settings.calendar,"array")),this._defaults=i,this._name=r,this.form_id=0,this.template_type="",this.init()}function t(){l(".forminator-custom-form").find(".forminator-label").on("click",function(t){t.preventDefault();t=l(this);t.next("#"+t.attr("for")).focus()})}l.extend(e.prototype,{init:function(){var t=this;switch(0<this.$el.find('input[name="form_id"]').length&&(this.form_id=this.$el.find('input[name="form_id"]').val()),0<this.$el.find('input[name="form_type"]').length&&(this.template_type=this.$el.find('input[name="form_type"]').val()),l(this.forminator_loader_selector).remove(),0===this.$el.closest(".wph-modal").length&&this.$el.show(),l(n).on("hustle:module:displayed",function(t,e){l(".wph-modal-active").find("form").css("display","")}),setTimeout(function(){l(".wph-modal-active").find("form").css("display","")},10),this.settings.form_type){case"custom-form":l(this.element).each(function(){t.init_custom_form(this)});break;case"poll":this.init_poll_form();break;case"quiz":this.init_quiz_form()}var e={form_type:t.settings.form_type,forminator_selector:t.forminator_selector,chart_design:t.settings.chart_design,chart_options:t.settings.chart_options,has_quiz_loader:t.settings.has_quiz_loader,has_loader:t.settings.has_loader,loader_label:t.settings.loader_label,resetEnabled:t.settings.is_reset_enabled,inline_validation:t.settings.inline_validation};"leads"!==this.template_type&&"quiz"!==this.settings.form_type||(e.form_placement=t.settings.form_placement,e.hasLeads=t.settings.hasLeads,e.leads_id=t.settings.leads_id,e.quiz_id=t.settings.quiz_id,e.skip_form=t.settings.skip_form),l(this.element).forminatorFrontSubmit(e),this.activate_field(),this.small_form()},init_custom_form:function(t){var e,r=this;this.init_intlTelInput_validation(t),this.settings.inline_validation&&l(t).forminatorFrontValidate({rules:r.settings.rules,messages:r.settings.messages}),l(t).forminatorFrontCalculate({forminatorFields:r.settings.forminator_fields,maxExpand:r.settings.max_nested_formula,generalMessages:r.settings.general_messages,memoizeTime:r.settings.calcs_memoize_time||300}),l(t).forminatorFrontMergeTags({forminatorFields:r.settings.forminator_fields,print_value:r.settings.print_value}),this.init_pagination(t),l(t).find('div[data-is-payment="true"], input[data-is-payment="true"]').first();r.settings.has_stripe&&(e=l(this.element).find(".forminator-stripe-element").first(),this.renderStripe(r,e)),r.settings.has_paypal&&l(this.element).forminatorFrontPayPal({type:"paypal",paymentEl:this.settings.paypal_config,paymentRequireSsl:r.settings.payment_require_ssl,generalMessages:r.settings.general_messages,has_loader:r.settings.has_loader,loader_label:r.settings.loader_label}),l(t).forminatorFrontCondition(this.settings.conditions,this.settings.calendar),this.init_fui(t),l(t).find(".forminator-datepicker").forminatorFrontDatePicker(this.settings.calendar),this.responsive_captcha(t),this.field_counter(t),this.field_number(t),this.field_time(),l(t).find(".forminator-multi-upload").forminatorFrontMultiFile(this.$el),this.upload_field(t),this.init_login_2FA(),r.maybeRemoveDuplicateFields(t),l(o).on("resize",function(){r.responsive_captcha(t)}),l(o).on("load",function(){r.maybeRemoveDuplicateFields(t)}),void 0!==r.settings.hasLeads&&("beginning"===r.settings.form_placement&&l("#forminator-module-"+this.settings.quiz_id).css({height:0,opacity:0,overflow:"hidden",visibility:"hidden","pointer-events":"none",margin:0,padding:0,border:0}),"end"===r.settings.form_placement&&l(t).css({height:0,opacity:0,overflow:"hidden",visibility:"hidden","pointer-events":"none",margin:0,padding:0,border:0}))},init_poll_form:function(){var o=this,i=this.$el.find("fieldset"),t=this.$el.find(".forminator-radio input"),a=this.$el.find(".forminator-input"),s=a.closest(".forminator-field");FUI.inputStates(a),t.on("click",function(){s.addClass("forminator-hidden"),s.attr("aria-hidden","true"),a.removeAttr("tabindex"),a.attr("name","");var t,e=this.checked,r=l(this).attr("id"),n=l(this).attr("name");return i.removeClass("forminator-has_error"),o.$el.find(".forminator-input#"+r+"-extra").length&&(t=(r=o.$el.find(".forminator-input#"+r+"-extra")).closest(".forminator-field"),e?(r.attr("name",n+"-extra"),t.removeClass("forminator-hidden"),t.removeAttr("aria-hidden"),r.attr("tabindex","-1"),r.focus()):(t.addClass("forminator-hidden"),t.attr("aria-hidden","true"),r.removeAttr("tabindex"))),!0}),this.$el.hasClass("forminator-poll-disabled")&&this.$el.find(".forminator-radio").each(function(){l(this).addClass("forminator-disabled"),l(this).find("input").attr("disabled",!0)})},init_quiz_form:function(){var a=this,t=void 0!==a.settings.form_placement?a.settings.form_placement:"",e=void 0!==a.settings.quiz_id?a.settings.quiz_id:0;this.$el.find(".forminator-button:not(.forminator-quiz-start)").each(function(){l(this).prop("disabled",!0)}),this.$el.find(".forminator-answer input").each(function(){l(this).attr("checked",!1)}),this.$el.find(".forminator-result--info button").on("click",function(){location.reload()}),l("#forminator-quiz-leads-"+e+" .forminator-quiz-intro .forminator-quiz-start").on("click",function(t){t.preventDefault(),l(this).closest(".forminator-quiz-intro").hide(),a.$el.prepend('<button class="forminator-button forminator-quiz-start forminator-hidden"></button>').find(".forminator-quiz-start").trigger("click").remove()}),this.$el.on("click",".forminator-quiz-start",function(t){t.preventDefault(),a.$el.find(".forminator-quiz-intro").hide(),a.$el.find(".forminator-pagination").removeClass("forminator-hidden");t={totalSteps:a.$el.find(".forminator-pagination").length-1,step:0,quiz:!0};a.settings.text_next&&(t.next_button=a.settings.text_next),a.settings.text_prev&&(t.prev_button=a.settings.text_prev),l(a.element).forminatorFrontPagination(t)}),"end"!==t&&this.$el.find(".forminator-submit-rightaway").on("click",function(){a.$el.submit(),l(this).closest(".forminator-question").find(".forminator-submit-rightaway").addClass("forminator-has-been-disabled").attr("disabled","disabled")}),a.settings.hasLeads&&("beginning"===t&&a.$el.css({height:0,opacity:0,overflow:"hidden",visibility:"hidden","pointer-events":"none",margin:0,padding:0,border:0}),"end"===t&&(a.$el.closest("div").find("#forminator-module-"+a.settings.leads_id).css({height:0,opacity:0,overflow:"hidden",visibility:"hidden","pointer-events":"none",margin:0,padding:0,border:0}),l("#forminator-quiz-leads-"+e+" .forminator-lead-form-skip").hide())),this.$el.on("click",".forminator-social--icon a",function(t){t.preventDefault();var t=l(this).data("social"),e=l(this).closest(".forminator-social--icons").data("url"),r=l(this).closest(".forminator-social--icons").data("message"),e={facebook:"https://www.facebook.com/sharer/sharer.php?u="+e+"&quote="+(r=encodeURIComponent(r)),twitter:"https://twitter.com/intent/tweet?&url="+e+"&text="+r,google:"https://plus.google.com/share?url="+e,linkedin:"https://www.linkedin.com/shareArticle?mini=true&url="+e+"&title="+r};if(void 0!==e[t])return r=o.open(e[t],t,"height="+l(o).height()+",width="+l(o).width()),o.focus&&r.focus(),!1}),this.$el.on("change",".forminator-answer input",function(t){var e=!!l(this).closest(".forminator-pagination").length,r=e?l(this).closest(".forminator-pagination"):a.$el,n=r.find(".forminator-answer input:checked").length,o=r.find(".forminator-question").length,r=l(this).closest(".forminator-question"),i=r.data("multichoice");a.$el.find(".forminator-button:not(.forminator-button-back)").each(function(){var t=n<o;l(this).prop("disabled",t),e&&(t?l(this).addClass("forminator-disabled"):l(this).removeClass("forminator-disabled"))}),this.checked&&!1===i&&r.find(".forminator-answer").not(l(this).parent(".forminator-answer")).each(function(t,e){l(e).find("> input").prop("checked",!1)})})},small_form:function(){var t,e=l(this.element),r=e.width();783<Math.max(n.documentElement.clientWidth,o.innerWidth||0)&&(e.hasClass("forminator-size--small")?480<r&&e.removeClass("forminator-size--small"):(t=e.closest(".hustle-content"),e.is(":visible")&&r<=480&&!t.length&&e.addClass("forminator-size--small")))},init_intlTelInput_validation:function(t){var t=l(t),n=t.is(".forminator-design--material");t.find(".forminator-field--phone").each(function(){var t=l(this).data("national_mode"),e=l(this).data("country"),r=l(this).data("validation");void 0!==t&&(t={nationalMode:"enabled"===t,initialCountry:void 0!==e?e:"us",utilsScript:o.ForminatorFront.cform.intlTelInput_utils_script},void 0!==r&&"standard"===r&&(t.allowDropdown=!1),l(this).intlTelInput(t),n?(l(this).closest(".forminator-field").find("div.iti").addClass("forminator-input-with-phone"),l(this).closest(".forminator-field").find("div.iti").hasClass("iti--allow-dropdown")&&l(this).closest(".forminator-field").find(".forminator-label").addClass("iti--allow-dropdown")):l(this).closest(".forminator-field").find("div.iti").addClass("forminator-phone"))})},init_fui:function(t){var t=l(t),e=t.find(".forminator-input"),r=t.find(".forminator-textarea"),n=t.find(".forminator-select2"),o=t.find(".forminator-multiselect"),i=t.find(".forminator-stripe-element");t.attr("data-design"),t.attr("data-design"),t.attr("data-design"),t.attr("data-design");e.length&&e.each(function(){FUI.inputStates(this)}),r.length&&r.each(function(){FUI.textareaStates(this)}),FUI.select2(n.length),o.length&&FUI.multiSelectStates(o),t.hasClass("forminator-design--material")&&(e.length&&e.each(function(){FUI.inputMaterial(this)}),r.length&&r.each(function(){FUI.textareaMaterial(this)}),i.length&&i.each(function(){var t=l(this).closest(".forminator-field"),e=t.find(".forminator-label");e.length&&(t.addClass("forminator-stripe-floating"),e.addClass("forminator-floating--input"))}))},responsive_captcha:function(t){l(t).find(".forminator-g-recaptcha").each(function(){var t=l(this).data("badge");l(this).is(":visible")&&"inline"===t&&(t=(t=l(this).parent().width())<302?t/302:1,l(this).css("transform","scale("+t+")"),l(this).css("-webkit-transform","scale("+t+")"),l(this).css("transform-origin","0 0"),l(this).css("-webkit-transform-origin","0 0"))})},init_pagination:function(t){var t=l(t).find(".forminator-pagination").length,e=o.location.hash,r=!1,n=0;0<t&&(void 0!==e&&0<=e.indexOf("step-")&&(r=!0,n=e.substr(6,8)),l(this.element).forminatorFrontPagination({totalSteps:t,hashStep:r,step:n,inline_validation:this.settings.inline_validation}))},activate_field:function(){var t=l(this.element),e=t.find(".forminator-input"),r=t.find(".forminator-textarea");function n(t){var r=l(t),n=r.val().trim(),o=r.closest(".forminator-field"),i=r.attr("data-field"),a=r.closest(".forminator-timepicker").parent(),s=o.find(".forminator-error-message");r.on("load change keyup keydown",function(t){var e;void 0!==i&&!1!==i?("hours"===r.data("field")&&(e=a.find('.forminator-error-message[data-error-field="hours"]'),""!==n&&0!==e.length&&e.remove()),"minutes"===r.data("field")&&(e=a.find('.forminator-error-message[data-error-field="minutes"]'),""!==n&&0!==e.length&&e.remove())):""!==n&&s.text()&&(s.remove(),o.removeClass("forminator-has_error")),t.stopPropagation()})}function o(){t.find(".select2-container").hasClass("select2-container--open")?setTimeout(o,300):t.find(".select2-container").closest(".forminator-field").removeClass("forminator-is_active")}e.length&&e.each(function(){n(this)}),r.length&&r.each(function(){n(this)}),t.find("select.forminator-select2 + .forminator-select").each(function(){var e=l(this);e.on("mouseover",function(t){t.stopPropagation(),l(this).closest(".forminator-field").addClass("forminator-is_hover")}).on("mouseout",function(t){t.stopPropagation(),l(this).closest(".forminator-field").removeClass("forminator-is_hover")}),e.on("click",function(t){t.stopPropagation(),o(),e.hasClass("select2-container--open")?l(this).closest(".forminator-field").addClass("forminator-is_active"):l(this).closest(".forminator-field").removeClass("forminator-is_active")})})},field_counter:function(t){var t=l(t),e=t.find(".forminator-button-submit");t.find(".forminator-input, .forminator-textarea").each(function(){var t=l(this),r=0;t.on("keydown",function(t){if(!l(this).hasClass("forminator-textarea")&&13===t.keyCode)return t.preventDefault(),e.is(":visible")&&e.trigger("click"),!1}),t.on("change keyup keydown",function(t){t.stopPropagation();var e=l(this).closest(".forminator-col").find(".forminator-description span");e.length&&e.data("limit")&&("words"!==e.data("type")?r=l(l(this).val()).text().length:(r=l(this).val().trim().split(/\s+/).length,l(this).val().trim().split(/\s+/).length>=e.data("limit")&&32===t.which&&t.preventDefault()),e.html(r+" / "+e.data("limit")))})})},field_number:function(t){t=l(t);t.find("input[type=number]").each(function(){l(this).keypress(function(t){for(var e=[44,45,46],r=t.which,n=48;n<58;n++)e.push(n);0<=e.indexOf(r)||t.preventDefault()})}),t.find(".forminator-number--field, .forminator-currency, .forminator-calculation").each(function(){var e;"number"===l(this).attr("type")&&(e=l(this).data("decimals"),l(this).change(function(t){this.value=parseFloat(this.value).toFixed(e)})),l(this).inputmask({alias:"decimal",rightAlign:!1,digitsOptional:!1,showMaskOnHover:!1,autoUnmask:!0,removeMaskOnSubmit:!0})})},field_time:function(){l(".forminator-input-time").on("input",function(t){var e=l(this),r=e.val();r&&2<=r.length&&e.val(r.substr(0,2))})},init_login_2FA:function(){var e=this;this.two_factor_providers("totp"),l("body").on("click",".forminator-2fa-link",function(){e.$el.find("#login_error").remove(),e.$el.find(".notification").empty();var t=l(this).data("slug");e.two_factor_providers(t),"fallback-email"===t&&e.resend_code()}),this.$el.find(".wpdef-2fa-email-resend input").on("click",function(){e.resend_code()})},two_factor_providers:function(t){var e=this;e.$el.find(".forminator-authentication-box").hide(),e.$el.find(".forminator-authentication-box input").attr("disabled",!0),e.$el.find("#forminator-2fa-"+t).show(),e.$el.find("#forminator-2fa-"+t+" input").attr("disabled",!1),0<e.$el.find(".forminator-2fa-link").length&&(e.$el.find(".forminator-2fa-link").hide(),e.$el.find(".forminator-2fa-link:not(#forminator-2fa-link-"+t+")").each(function(){e.$el.find(".forminator-auth-method").val(t),l(this).find("input").attr("disabled",!1),l(this).show()}))},resend_code:function(){var e=l('input[name="button_resend_code"]'),t=l(".forminator-auth-token"),t={action:"forminator_2fa_fallback_email",data:JSON.stringify({token:t})};l.ajax({type:"POST",url:o.ForminatorFront.ajaxUrl,data:t,beforeSend:function(){e.attr("disabled","disabled"),l(".def-ajaxloader").show()},success:function(t){e.removeAttr("disabled"),l(".def-ajaxloader").hide(),l(".notification").text(t.data.message)}})},material_field:function(){},toggle_file_input:function(){l(this.element).find(".forminator-file-upload").each(function(){var t=l(this),e=t.find("input"),t=t.find(".forminator-button-delete");""!==e.val()?t.show():t.hide()})},upload_field:function(t){var r=this,e=l(t);this.toggle_file_input(),e.find(".forminator-button-delete").on("click",function(t){t.preventDefault();var t=l(this),e=t.siblings("input"),r=t.closest(".forminator-file-upload").find("> span");e.val(""),r.html(r.data("empty-text")),t.hide()}),e.find(".forminator-input-file, .forminator-input-file-required").on("change",function(){var t=l(this).closest(".forminator-file-upload").find("> span"),e=l(this).val(),e=e.length?e.split("\\").pop():"";t.text(e),r.toggle_file_input()}),e.find(".forminator-button-upload").on("click",function(t){t.preventDefault();t=l(this).attr("data-id");e.find("input#"+t).trigger("click")}),e.find(".forminator-input-file, .forminator-input-file-required").on("change",function(t){t.preventDefault();var t=l(this)[0].files.length,e=l(this).find(".forminator-button-delete");0===t?e.hide():e.show()})},maybeRemoveDuplicateFields:function(t){var e,r,t=l(t);l(n).find("link[id='neira-lite-style-css']").length&&(e=t.find(".forminator-select-container").next(".chosen-container"),r=t.find("select.forminator-select2 + .forminator-select").next(".chosen-container"),t=t.find(".forminator-select").next(".chosen-container"),0!==e.length&&e.remove(),0!==r.length&&r.remove(),0!==t.length&&t.remove())},renderCaptcha:function(t){var e,r,n=this;void 0===l(t).data("forminator-recapchta-widget")&&(r=l(t).data("size"),e={sitekey:l(t).data("sitekey"),theme:l(t).data("theme"),size:r},"invisible"===r?(e.badge=l(t).data("badge"),e.callback=function(t){l(n.element).trigger("submit.frontSubmit")}):e.callback=function(){l(t).parent(".forminator-col").removeClass("forminator-has_error").remove(".forminator-error-message")},""!==e.sitekey&&(r=o.grecaptcha.render(t,e),l(t).data("forminator-recapchta-widget",r),this.addCaptchaAria(t),this.responsive_captcha()))},renderHcaptcha:function(t){var e,r,n=this;void 0===l(t).data("forminator-hcaptcha-widget")&&(r=l(t).data("size"),(e={sitekey:l(t).data("sitekey"),theme:l(t).data("theme"),size:r}).callback="invisible"===r?function(t){l(n.element).trigger("submit.frontSubmit")}:function(){l(t).parent(".forminator-col").removeClass("forminator-has_error").remove(".forminator-error-message")},""!==e.sitekey&&(r=hcaptcha.render(t,e),l(t).data("forminator-hcaptcha-widget",r)))},addCaptchaAria:function(t){var e=l(t).find(".g-recaptcha-response"),t=l(t).find(">div");0!==e.length&&(e.attr("aria-hidden","true"),e.attr("aria-label","do not use"),e.attr("aria-readonly","true")),0!==t.length&&t.css("z-index",99)},hide:function(){this.$el.hide()},maybeParseStringToJson:function(t,e){var r={};if("object"==typeof t)return t;if("object"===e)t="{"+t.trim()+"}";else{if("array"!==e)return{};t="["+t.trim()+"]"}try{t=t.replace(/\,(?!\s*?[\{\[\"\'\w])/g,""),r=JSON.parse(t)}catch(t){console.error(t.message),"object"===e?r={}:"array"===e&&(r=[])}return r},renderStripe:function(t,e,r=0){var n=this;setTimeout(function(){r++,"undefined"!=typeof Stripe?l(t.element).forminatorFrontPayment({type:"stripe",paymentEl:e,paymentRequireSsl:t.settings.payment_require_ssl,generalMessages:t.settings.general_messages,has_loader:t.settings.has_loader,loader_label:t.settings.loader_label}):r<300?n.renderStripe(t,e,r):console.error("Failed to load Stripe.")},100)}}),l.fn[r]=function(t){return this.each(function(){l.data(this,r)||l.data(this,r,new e(this,t))})},l(n).on("tinymce-editor-init",function(t,e){var r=0;e.on("change",function(){0===e.id.indexOf("forminator-wp-editor-")&&e.save();var t=e.id,t=l("#"+t).closest(".forminator-col").find(".forminator-description span");t.length&&t.data("limit")&&(r=("words"!==t.data("type")?e.getContent({format:"text"}):e.getContent({format:"text"}).split(/\s+/)).length,t.html(r+" / "+t.data("limit")))}),l("#"+e.id+"_ifr").height(l("#"+e.id).height())}),l(n).ready(t),l(n).on("after.load.forminator",t)}(jQuery,window,document);var forminator_render_captcha=function(){jQuery(".forminator-g-recaptcha").each(function(){var e=jQuery(this),r=e.closest("form");0<r.length&&window.setTimeout(function(){var t=r.data("forminatorFront");void 0!==t&&t.renderCaptcha(e[0])},100)})},forminator_render_hcaptcha=function(){jQuery(".forminator-hcaptcha").each(function(){var e=jQuery(this),r=e.closest("form");0<r.length&&window.setTimeout(function(){var t=r.data("forminatorFront");void 0!==t&&t.renderHcaptcha(e[0])},100)})},forminatorDateUtil={month_number:function(t){if(t.constructor===Number)return t;var e,r=NaN;return t.constructor===String&&(t=t.toLowerCase(),r=-1===(e=-1===(e=["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"].indexOf(t))?["january","february","march","april","may","june","july","august","september","october","november","december"].indexOf(t):e)?NaN:e),r},convert:function(t){return t.constructor===Date?t:t.constructor===Array?new Date(t[0],this.month_number(t[1]),t[2]):t.constructor===Number||t.constructor===String?new Date(t):"object"==typeof t?new Date(t.year,this.month_number(t.month),t.date):NaN},compare:function(t,e){return isFinite(t=this.convert(t).valueOf())&&isFinite(e=this.convert(e).valueOf())?(e<t)-(t<e):NaN},inRange:function(t,e,r){return isFinite(t=this.convert(t).valueOf())&&isFinite(e=this.convert(e).valueOf())&&isFinite(r=this.convert(r).valueOf())?e<=t&&t<=r:NaN},diffInDays:function(t,e){if(t=this.convert(t),e=this.convert(e),"function"!=typeof t.getMonth||"function"!=typeof e.getMonth)return NaN;e=e.getTime(),t=t.getTime();return parseFloat((e-t)/864e5)},diffInWeeks:function(t,e){if(t=this.convert(t),e=this.convert(e),"function"!=typeof t.getMonth||"function"!=typeof e.getMonth)return NaN;e=e.getTime(),t=t.getTime();return parseInt((e-t)/6048e5)},diffInMonths:function(t,e){if(t=this.convert(t),e=this.convert(e),"function"!=typeof t.getMonth||"function"!=typeof e.getMonth)return NaN;var r=t.getFullYear(),n=e.getFullYear(),t=t.getMonth();return e.getMonth()+12*n-(t+12*r)},diffInYears:function(t,e){return t=this.convert(t),e=this.convert(e),"function"!=typeof t.getMonth||"function"!=typeof e.getMonth?NaN:e.getFullYear()-t.getFullYear()}};!function(s,o,c){"use strict";var r="forminatorFrontCalculate",n={forminatorFields:[],maxExpand:5,generalMessages:{}};function e(t,e){this.element=t,this.$el=s(this.element),this.settings=s.extend({},n,e),this._defaults=n,this._name=r,this.calculationFields=[],this.currentExpand=0,this.triggerInputs=[],this.isError=!1,this.init()}s.extend(e.prototype,{init:function(){var e=this,t=this.$el.find("input.forminator-calculation");0<t.length&&(t.each(function(){var t;e.calculationFields.push({$input:s(this),formula:s(this).data("formula"),name:s(this).attr("name"),isHidden:s(this).data("isHidden"),precision:s(this).data("precision")}),s(this).data("isHidden")&&(s(this).closest(".forminator-col").addClass("forminator-hidden forminator-hidden-option"),(t=s(this).closest(".forminator-row")).addClass("forminator-hidden-option"),0===t.find("> .forminator-col:not(.forminator-hidden)").length&&t.addClass("forminator-hidden"))}),t=this.settings.memoizeTime||300,this.debouncedReCalculateAll=this.debounce(this.recalculateAll,1e3),this.memoizeDebounceRender=this.memoize(this.recalculate,t),this.$el.on("forminator:field:condition:toggled",function(t){e.debouncedReCalculateAll()}),this.parseCalcFieldsFormula(),this.attachEventToTriggeringFields(),this.debouncedReCalculateAll())},memoize:function(e,r){var n,o={},i=Array.prototype.slice;return function(){var t=i.call(arguments);return clearTimeout(n),n=setTimeout(function(){n=null,o={}},r),t[0].name in o?o[t[0].name]:o[t[0].name]=e.apply(this,t)}},debounce:function(n,o,i){var a;return function(){var t=this,e=arguments,r=i&&!a;clearTimeout(a),a=setTimeout(function(){a=null,i||n.apply(t,e)},o),r&&n.apply(t,e)}},parseCalcFieldsFormula:function(){for(var t=0;t<this.calculationFields.length;t++){var e=this.calculationFields[t],r=e.formula;this.currentExpand=0,e.formula=r,this.calculationFields[t]=e}},maybeExpandCalculationFieldOnFormula:function(t){if(this.currentExpand>this.settings.maxExpand)return t;for(var e=this.settings.forminatorFields.join("|"),r=new RegExp("\\{("+("("+e+")-\\d+")+")(\\-[A-Za-z-_]+)?\\}","g"),n=t,o=!1;s=r.exec(t);){var i=s[0],a=s[1],s=s[2],l=i;i!==c&&a!==c&&s!==c&&("calculation"===s&&(o=!0,l="("+this.$el.find('input[name="'+a+'"]').data("formula")+")"),n=n.replace(i,l))}return o&&(this.currentExpand++,n=this.maybeExpandCalculationFieldOnFormula(n)),n},findTriggerInputs:function(t){for(var e=t.formula,r=this.settings.forminatorFields.join("|"),n=new RegExp("\\{("+("("+r+")-\\d+")+")(\\-[A-Za-z-_]+)?\\}","g");a=n.exec(e);){var o=a[0],i=a[1],a=a[2];if(o!==c&&i!==c&&a!==c){o=this.get_form_field(i);if(o.length){for(var s=o.data("calcFields"),l=(s===c&&(s=[]),!1),f=0;f<s.length;f++)if(s[f].name===t.name){l=!0;break}l||s.push(t),o.data("calcFields",s),this.triggerInputs.push(o)}}}},get_form_field:function(t){var e=this.$el.data("form-id"),e=this.$el.find("#forminator-form-"+e+"__field--"+t);return e=0===e.length&&0===(e=this.$el.find("#"+t+"-field")).length&&0===(e=this.$el.find("input[name="+t+"]")).length&&0===(e=this.$el.find("textarea[name="+t+"]")).length&&0===(e=this.$el.find('input[name="'+t+'[]"]')).length?this.$el.find("#"+t):e},attachEventToTriggeringFields:function(){for(var n=this,t=0;t<this.calculationFields.length;t++){var e=this.calculationFields[t];this.findTriggerInputs(e)}if(0<this.triggerInputs.length)for(var r=[],o=0;o<this.triggerInputs.length;o++){var i=this.triggerInputs[o],a=i.attr("id");r.indexOf(a)<0&&(i.on("change.forminatorFrontCalculate, blur",function(){var t=s(this).data("calcFields");if(t!==c&&0<t.length)for(var e=0;e<t.length;e++){var r=t[e];n.field_is_checkbox(s(this))||n.field_is_radio(s(this))?n.recalculate(r):n.memoizeDebounceRender(r)}}),r.push(a))}},recalculateAll:function(){for(var t=0;t<this.calculationFields.length;t++)this.recalculate(this.calculationFields[t])},recalculate:function(t){var e=t.$input,r=(this.hideErrorMessage(e),this.maybeReplaceFieldOnFormula(t.formula)),n=0,r=new o.forminatorCalculator(r);try{if(n=r.calculate(),!isFinite(n))throw"Infinity calculation result.";n=(+(Math.round(n+("e+"+t.precision))+("e-"+t.precision))).toFixed(t.precision)}catch(t){this.isError=!0,console.log(t),this.displayErrorMessage(e,this.settings.generalMessages.calculation_error),n="0"}e.val()!==String(n)&&(r=e.data("decimal-point"),n=String(n).replace(".",r),e.val(n).trigger("change"))},maybeReplaceFieldOnFormula:function(t){for(var e=this.settings.forminatorFields.join("|"),r=new RegExp("\\{("+("("+e+")-\\d+")+")(\\-[A-Za-z-_]+)?\\}","g"),n=t;s=r.exec(t);){var o,i=s[0],a=s[1],s=s[2],l=i;i!==c&&a!==c&&s!==c&&(this.is_hidden(a)?(l=0,o=i.replace(/([\\\.\+\*\?\[\^\]\$\(\)\{\}\=\!\<\>\|\:])/g,"\\$1"),!(o=new RegExp("([\\+\\-\\*\\/]?)[^\\+\\-\\*\\/\\(]*"+o+"[^\\)\\+\\-\\*\\/]*([\\+\\-\\*\\/]?)").exec(t))||"*"!==o[1]&&"/"!==o[1]&&"*"!==o[2]&&"/"!==o[2]||(l=1)):("calculation"===s&&(o=this.get_calculation_field(a))&&this.memoizeDebounceRender(o),l=this.get_field_value(a)),n=n.replace(i,l="("+l+")"))}return n},get_calculation_field:function(t){for(var e=0;e<this.calculationFields.length;e++)if(this.calculationFields[e].name===t)return this.calculationFields[e];return!1},is_hidden:function(t){var t=this.get_form_field(t).closest(".forminator-col"),e=t.closest(".forminator-row");return!e.hasClass("forminator-hidden-option")&&!t.hasClass("forminator-hidden-option")&&!(!e.hasClass("forminator-hidden")&&!t.hasClass("forminator-hidden"))},get_field_value:function(t){var t=this.get_form_field(t),e=0,r=0,n=null;return this.field_is_radio(t)?(n=t.filter(":checked")).length&&(r=n.data("calculation"))!==c&&(e=Number(r)):this.field_is_checkbox(t)?t.each(function(){s(this).is(":checked")&&(r=s(this).data("calculation"))!==c&&(e+=Number(r))}):this.field_is_select(t)?(n=t.find("option").filter(":selected")).length&&(r=n.data("calculation"))!==c&&(e=Number(r)):e=this.field_has_inputMask(t)?parseFloat(t.inputmask("unmaskedvalue")):(n=t.val(),parseFloat(n.replace(",","."))),isNaN(e)?0:e},field_has_inputMask:function(t){var e=!1;return t.each(function(){if(c!==s(this).attr("data-inputmask"))return!(e=!0)}),e},field_is_radio:function(t){var e=!1;return t.each(function(){if("radio"===s(this).attr("type"))return!(e=!0)}),e},field_is_checkbox:function(t){var e=!1;return t.each(function(){if("checkbox"===s(this).attr("type"))return!(e=!0)}),e},field_is_select:function(t){return t.is("select")},displayErrorMessage:function(t,e){var r=t.closest(".forminator-field--inner"),n=(r=0===r.length?t.closest(".forminator-field"):r).find(".forminator-error-message");0===n.length&&(r.append('<span class="forminator-error-message" aria-hidden="true"></span>'),n=r.find(".forminator-error-message")),t.attr("aria-invalid","true"),n.html(e),r.addClass("forminator-has_error")},hideErrorMessage:function(t){var e=t.closest(".forminator-field--inner"),r=(e=0===e.length?t.closest(".forminator-field"):e).find(".forminator-error-message");t.removeAttr("aria-invalid"),r.remove(),e.removeClass("forminator-has_error")}}),s.fn[r]=function(t){return this.each(function(){s.data(this,r)||s.data(this,r,new e(this,t))})}}(jQuery,window,void document),function(i,s){"use strict";var r="forminatorFrontMergeTags",n={print_value:!1,forminatorFields:[]};function e(t,e){this.element=t,this.$el=i(this.element),this.settings=i.extend({},n,e),this._defaults=n,this._name=r,this.formFields=[],this.init()}i.extend(e.prototype,{init:function(){var t=this,e=this.$el.find(".forminator-merge-tags");0<e.length&&e.each(function(){t.formFields.push({$input:i(this),value:i(this).html()})}),this.replaceAll(),this.attachEvents()},attachEvents:function(){var t=this;this.$el.find(".forminator-textarea, input.forminator-input, .forminator-checkbox, .forminator-radio, .forminator-input-file, select.forminator-select2, .forminator-multiselect input").each(function(){i(this).on("change",function(){setTimeout(function(){t.replaceAll()},300)})})},replaceAll:function(){for(var t=0;t<this.formFields.length;t++)this.replace(this.formFields[t])},replace:function(t){var e=t.$input,t=this.maybeReplaceValue(t.value);e.html(t)},maybeReplaceValue:function(t){for(var e=this.settings.forminatorFields.join("|"),r=new RegExp("\\{("+("("+e+")-\\d+")+")(\\-[A-Za-z-_]+)?\\}","g"),n=t;a=r.exec(t);){var o=a[0],i=o.replace("{","").replace("}",""),a=a[2];o!==s&&i!==s&&a!==s&&(a=this.get_field_value(i),n=n.replace(o,a))}return n},get_form_field:function(t){var e=this.$el.find("#"+t+"-field");return e=0===e.length&&0===(e=this.$el.find("[name="+t+"]")).length&&0===(e=this.$el.find('input[name="'+t+'[]"]')).length?this.$el.find("#"+t):e},is_calculation:function(t){return!!this.get_form_field(t).hasClass("forminator-calculation")},get_field_value:function(t){var e=this.get_form_field(t),r=this,n="",o=null;if(this.is_hidden(t)&&!this.is_calculation(t))return"";if(this.is_calculation(t)&&(!this.get_form_field(t).closest(".forminator-col").closest(".forminator-row").hasClass("forminator-hidden-option")&&this.is_hidden(t)))return"";return this.field_is_radio(e)?(o=e.filter(":checked")).length&&(n=this.settings.print_value?o.val():(0===o.siblings(".forminator-radio-label").length?o.siblings(".forminator-screen-reader-only"):o.siblings(".forminator-radio-label")).text()):this.field_is_checkbox(e)?e.each(function(){var t;i(this).is(":checked")&&(""!==n&&(n+=", "),t=!!i(this).closest(".forminator-multiselect").length,r.settings.print_value?n+=i(this).val():n+=(t?i(this).closest("label"):0===i(this).siblings(".forminator-checkbox-label").length?i(this).siblings(".forminator-screen-reader-only"):i(this).siblings(".forminator-checkbox-label")).text())}):this.field_is_select(e)?(o=e.find("option").filter(":selected")).length&&(n=this.settings.print_value?o.val():o.text()):this.field_is_upload(e)?n=e.val().split("\\").pop():this.field_has_inputMask(e)?(e.inputmask({autoUnmask:!1}),n=e.val(),e.inputmask({autoUnmask:!0})):n=e.val(),n},field_has_inputMask:function(t){var e=!1;return t.each(function(){if(s!==i(this).attr("data-inputmask"))return!(e=!0)}),e},field_is_radio:function(t){var e=!1;return t.each(function(){if("radio"===i(this).attr("type"))return!(e=!0)}),e},field_is_checkbox:function(t){var e=!1;return t.each(function(){if("checkbox"===i(this).attr("type"))return!(e=!0)}),e},field_is_upload:function(t){return"file"===t.attr("type")},field_is_select:function(t){return t.is("select")},is_hidden:function(t){var t=this.get_form_field(t).closest(".forminator-col"),e=t.closest(".forminator-row");return!(!e.hasClass("forminator-hidden-option")&&!e.hasClass("forminator-hidden"))||!!t.hasClass("forminator-hidden")}}),i.fn[r]=function(t){return this.each(function(){i.data(this,r)||i.data(this,r,new e(this,t))})}}(jQuery,(window,void document)),function(s,a,c){"use strict";Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:function(t,e){if(t===c||null===t)throw new TypeError("Cannot convert first argument to object");for(var r=Object(t),n=1;n<arguments.length;n++){var o=arguments[n];if(o!==c&&null!==o)for(var i=Object.keys(Object(o)),a=0,s=i.length;a<s;a++){var l=i[a],f=Object.getOwnPropertyDescriptor(o,l);f!==c&&f.enumerable&&(r[l]=o[l])}}return r}});var r="forminatorFrontPayment",n={type:"stripe",paymentEl:null,paymentRequireSsl:!1,generalMessages:{}};function e(t,e){this.element=t,this.$el=s(this.element),this.settings=s.extend({},n,e),this._defaults=n,this._name=r,this._stripeData=null,this._stripe=null,this._cardElement=null,this._stripeToken=null,this._beforeSubmitCallback=null,this._form=null,this._paymentIntent=null,this.init()}s.extend(e.prototype,{init:function(){var n;this.settings.paymentEl&&void 0!==this.settings.paymentEl.data()&&((n=this)._stripeData=this.settings.paymentEl.data(),!1!==this.mountCardField()&&(s(this.element).on("payment.before.submit.forminator",function(t,e,r){n._form=n.getForm(t),n._beforeSubmitCallback=r,n.validateStripe(t,e)}),this.$el.on("forminator:form:submit:stripe:3dsecurity",function(t,e,r){n.validate3d(t,e,r)}),this.$el.find("input.forminator-input, .forminator-checkbox, .forminator-radio, select.forminator-select2").each(function(){s(this).on("change",function(t){n.mapZip(t)})})))},validate3d:function(t,e,r){var n=this;r?this._stripe.confirmCardPayment(e,{payment_method:{card:n._cardElement,...n.getBillingData()}}).then(function(t){n.$el.find("#forminator-stripe-subscriptionid").val(r),n._beforeSubmitCallback&&n._beforeSubmitCallback.call()}):this._stripe.retrievePaymentIntent(e).then(function(t){"requires_action"!==t.paymentIntent.status&&"requires_source_action"!==t.paymentIntent.status||n._stripe.handleCardAction(e).then(function(t){n._beforeSubmitCallback&&n._beforeSubmitCallback.call()})})},validateStripe:function(r,n){var o=this;this._stripe.createToken(this._cardElement).then(function(t){t.error?o.showCardError(t.error.message,!0):(o.hideCardError(),o._stripe.createPaymentMethod("card",o._cardElement,o.getBillingData()).then(function(t){var e=o.getObjectValue(t,"paymentMethod");o._stripeData.paymentMethod=o.getObjectValue(e,"id"),o.updateAmount(r,n,t)}))})},isValid:function(e){var r=this;this._stripe.createToken(this._cardElement).then(function(t){t.error?r.showCardError(t.error.message,e):r.hideCardError()})},getForm:function(t){t=s(t.target);return t=t.hasClass("forminator-custom-form")?t:t.closest("form.forminator-custom-form")},updateAmount:function(r,n,t){r.preventDefault();var o=this,e=n,t=this.getObjectValue(t,"paymentMethod"),t=(e.append("action","forminator_update_payment_amount"),e.append("paymentid",this.getStripeData("paymentid")),e.append("payment_method",this.getObjectValue(t,"id")),this.getStripeData("receipt")),i=this.getStripeData("receiptEmail");t&&i&&(t=this.get_field_value(i)||"",e.append("receipt_email",t)),s.ajax({type:"POST",url:a.ForminatorFront.ajaxUrl,data:e,cache:!1,contentType:!1,processData:!1,beforeSend:function(){var t;void 0!==o.settings.has_loader&&o.settings.has_loader&&(o._form.addClass("forminator-fields-disabled"),(t=o._form.find(".forminator-response-message")).html("<p>"+o.settings.loader_label+"</p>"),o.focus_to_element(t),t.removeAttr("aria-hidden").prop("tabindex","-1").removeClass("forminator-success forminator-error").addClass("forminator-loading forminator-show")),o._form.find("button").attr("disabled",!0)},success:function(t){var e;!0===t.success?void 0!==t.data&&void 0!==t.data.paymentid?(o.$el.find("#forminator-stripe-paymentid").val(t.data.paymentid),o.$el.find("#forminator-stripe-paymentmethod").val(o._stripeData.paymentMethod),o._stripeData.paymentid=t.data.paymentid,o._stripeData.secret=t.data.paymentsecret,o.handleCardPayment(t,r,n)):o.show_error("Invalid Payment Intent ID"):(o.show_error(t.data.message),t.data.errors.length&&o.show_messages(t.data.errors),(t=o._form.find(".forminator-g-recaptcha")).length&&(e=(t=s(t.get(0))).data("forminator-recapchta-widget"),"invisible"===t.data("size")&&a.grecaptcha.reset(e)))},error:function(t){t=400===t.status?a.ForminatorFront.cform.upload_error:a.ForminatorFront.cform.error;o.show_error(t)}})},show_error:function(t){var e=this._form.find(".forminator-response-message");this._form.find("button").removeAttr("disabled"),e.removeAttr("aria-hidden").prop("tabindex","-1").removeClass("forminator-loading").addClass("forminator-error forminator-show"),e.html("<p>"+t+"</p>"),this.focus_to_element(e),this.enable_form()},enable_form:function(){var t;void 0!==this.settings.has_loader&&this.settings.has_loader&&(t=this._form.find(".forminator-response-message"),this._form.removeClass("forminator-fields-disabled"),t.removeClass("forminator-loading"))},mapZip:function(t){var e=this.getStripeData("veifyZip"),r=this.getStripeData("zipField"),n=s(t.currentTarget).attr("name");e&&""!==r&&n===r&&t.originalEvent!==c&&(e=this.get_field_value(r),this._cardElement.update({value:{postalCode:e}}))},focus_to_element:function(t){t.show(),s("html,body").animate({scrollTop:t.offset().top-(s(a).height()-t.outerHeight(!0))/2},500,function(){t.attr("tabindex")||t.attr("tabindex",-1),t.focus()})},show_messages:function(t){var o,i=this,a=i.$el.data("forminatorFrontCondition");return void 0!==a&&(this.$el.find(".forminator-error-message").remove(),o=0,t.forEach(function(t){var e,r,n=Object.keys(t),t=Object.values(t),n=a.get_form_field(n);n.length&&(0===o&&(i.$el.trigger("forminator.front.pagination.focus.input",[n]),i.focus_to_element(n)),s(n).hasClass("forminator-input-time")&&(0===(r=(e=s(n).closest(".forminator-field:not(.forminator-field--inner)")).children(".forminator-error-message")).length&&(e.append('<span class="forminator-error-message" aria-hidden="true"></span>'),r=e.children(".forminator-error-message")),r.html(t)),0===(r=(e=0===(e=s(n).closest(".forminator-field--inner")).length&&0===(e=s(n).closest(".forminator-field")).length&&1<(e=s(n).find(".forminator-field")).length?e.first():e).find(".forminator-error-message")).length&&(e.append('<span class="forminator-error-message" aria-hidden="true"></span>'),r=e.find(".forminator-error-message")),s(n).attr("aria-invalid","true"),r.html(t),e.addClass("forminator-has_error"),o++)})),this},getBillingData:function(t){if(!this.getStripeData("billing"))return{};var e=this.getStripeData("billingName"),r=this.getStripeData("billingEmail"),n=this.getStripeData("billingAddress"),o={address:{}},i=(!e||(i=(i=this.get_field_value(e))||(this.get_field_value(e+"-first-name")||"")+" "+(this.get_field_value(e+"-last-name")||""))&&(o.name=i),!r||(e=this.get_field_value(r)||"")&&(o.email=e),this.get_field_value(n+"-street_address")||""),r=(i&&(o.address.line1=i),this.get_field_value(n+"-address_line")||""),e=(r&&(o.address.line2=r),this.get_field_value(n+"-city")||""),i=(e&&(o.address.city=e),this.get_field_value(n+"-state")||"");i&&(o.address.state=i);r=this.get_form_field(n+"-country").find(":selected").data("country-code"),r&&(o.address.country=r),e=this.get_field_value(n+"-zip")||"";return e&&(o.address.postal_code=e),{billing_details:o}},handleCardPayment:function(t,e,r){t.data.paymentsecret;t=s(".forminator-number--field, .forminator-currency, .forminator-calculation");t.inputmask&&t.inputmask("remove"),this._beforeSubmitCallback&&this._beforeSubmitCallback.call()},mountCardField:function(){var t=this.getStripeData("key"),e=this.getStripeData("cardIcon"),r=this.getStripeData("veifyZip"),n=(this.getStripeData("zipField"),this.getStripeData("fieldId"));if(null===t)return!1;this._stripe=Stripe(t,{locale:this.getStripeData("language")});var t={},r=(r?t.value={postalCode:""}:t.hidePostalCode=!0,{}),o=this.getStripeData("fontFamily"),i=this.getStripeData("customFonts"),i=(o&&i&&(r.fonts=[{cssSrc:"https://fonts.googleapis.com/css?family="+o}]),this._stripe.elements(r));this._cardElement=i.create("card",Object.assign({classes:{base:this.getStripeData("baseClass"),complete:this.getStripeData("completeClass"),empty:this.getStripeData("emptyClass"),focus:this.getStripeData("focusedClass"),invalid:this.getStripeData("invalidClass"),webkitAutofill:this.getStripeData("autofilledClass")},style:{base:{iconColor:this.getStripeData("iconColor"),color:this.getStripeData("fontColor"),lineHeight:this.getStripeData("lineHeight"),fontWeight:this.getStripeData("fontWeight"),fontFamily:this.getStripeData("fontFamily"),fontSmoothing:"antialiased",fontSize:this.getStripeData("fontSize"),"::placeholder":{color:this.getStripeData("placeholder")},":hover":{iconColor:this.getStripeData("iconColorHover")},":focus":{iconColor:this.getStripeData("iconColorFocus")}},invalid:{iconColor:this.getStripeData("iconColorError"),color:this.getStripeData("fontColorError")}},iconStyle:"solid",hideIcon:!e},t)),this._cardElement.mount("#card-element-"+n),this.validateCard()},validateCard:function(){var e=this;this._cardElement.on("change",function(t){e.$el.find(".forminator-stripe-element").hasClass("StripeElement--empty")?e.$el.find(".forminator-stripe-element").closest(".forminator-field").removeClass("forminator-is_filled"):e.$el.find(".forminator-stripe-element").closest(".forminator-field").addClass("forminator-is_filled"),e.$el.find(".forminator-stripe-element").hasClass("StripeElement--invalid")&&e.$el.find(".forminator-stripe-element").closest(".forminator-field").addClass("forminator-has_error")}),this._cardElement.on("focus",function(t){e.$el.find(".forminator-stripe-element").closest(".forminator-field").addClass("forminator-is_active")}),this._cardElement.on("blur",function(t){e.$el.find(".forminator-stripe-element").closest(".forminator-field").removeClass("forminator-is_active"),e.isValid(!1)})},hideCardError:function(){var t=this.$el.find(".forminator-card-message"),e=t.find(".forminator-error-message");0===e.length&&(t.append('<span class="forminator-error-message" aria-hidden="true"></span>'),e=t.find(".forminator-error-message")),t.closest(".forminator-field").removeClass("forminator-has_error"),e.html("")},showCardError:function(t,e){var r=this.$el.find(".forminator-card-message"),n=r.find(".forminator-error-message");0===n.length&&(r.append('<span class="forminator-error-message" aria-hidden="true"></span>'),n=r.find(".forminator-error-message")),r.closest(".forminator-field").addClass("forminator-has_error"),r.closest(".forminator-field").addClass("forminator-is_filled"),n.html(t),e&&this.focus_to_element(r.closest(".forminator-field"))},getStripeData:function(t){return void 0!==this._stripeData&&void 0!==this._stripeData[t]?this._stripeData[t]:null},getObjectValue:function(t,e){return void 0!==t[e]?t[e]:null},get_form_field:function(t){var e=this.$el.find("#"+t+"-field");return e=0===e.length&&0===(e=this.$el.find("input[name="+t+"]")).length&&0===(e=this.$el.find("textarea[name="+t+"]")).length&&0===(e=this.$el.find('input[name="'+t+'[]"]')).length?this.$el.find("#"+t):e},get_field_value:function(t){var t=this.get_form_field(t),e="",r=null;return this.field_is_radio(t)?(r=t.filter(":checked")).length&&(e=r.val()):this.field_is_checkbox(t)?t.each(function(){s(this).is(":checked")&&(e=s(this).val())}):e=!this.field_is_select(t)&&this.field_has_inputMask(t)?parseFloat(t.inputmask("unmaskedvalue")):t.val(),e},get_field_calculation:function(t){var t=this.get_form_field(t),e=0,r=0,n=null;return this.field_is_radio(t)?(n=t.filter(":checked")).length&&(r=n.data("calculation"))!==c&&(e=Number(r)):this.field_is_checkbox(t)?t.each(function(){s(this).is(":checked")&&(r=s(this).data("calculation"))!==c&&(e+=Number(r))}):this.field_is_select(t)?(n=t.find("option").filter(":selected")).length&&(r=n.data("calculation"))!==c&&(e=Number(r)):e=Number(t.val()),isNaN(e)?0:e},field_has_inputMask:function(t){var e=!1;return t.each(function(){if(c!==s(this).attr("data-inputmask"))return!(e=!0)}),e},field_is_radio:function(t){var e=!1;return t.each(function(){if("radio"===s(this).attr("type"))return!(e=!0)}),e},field_is_checkbox:function(t){var e=!1;return t.each(function(){if("checkbox"===s(this).attr("type"))return!(e=!0)}),e},field_is_select:function(t){return t.is("select")}}),s.fn[r]=function(t){return this.each(function(){s.data(this,r)||s.data(this,r,new e(this,t))})}}(jQuery,window,void document),function(a,n){"use strict";var r="forminatorFrontPagination",o={totalSteps:0,step:0,hashStep:0,inline_validation:!1};function e(t,e){this.element=a(t),this.$el=this.element,this.totalSteps=0,this.step=0,this.finished=!1,this.hashStep=!1,this.next_button_txt="",this.prev_button_txt="",this.custom_label=[],this.form_id=0,this.element="",this.settings=a.extend({},o,e),this._defaults=o,this._name=r,this.init()}a.extend(e.prototype,{init:function(){this.next_button=this.settings.next_button||n.ForminatorFront.cform.pagination_next,this.prev_button=this.settings.prev_button||n.ForminatorFront.cform.pagination_prev,0<this.$el.find("input[name=form_id]").length&&(this.form_id=this.$el.find("input[name=form_id]").val()),this.totalSteps=this.settings.totalSteps,this.step=this.settings.step,this.quiz=this.settings.quiz,this.element=this.$el.find("[data-step="+this.step+"]").data("name"),this.form_id&&"object"==typeof n.Forminator_Cform_Paginations&&"object"==typeof n.Forminator_Cform_Paginations[this.form_id]&&(this.custom_label=n.Forminator_Cform_Paginations[this.form_id]),this.settings.hashStep&&0<this.step?this.go_to(this.step,!0):this.quiz?this.go_to(0,!0):this.go_to(0,!1),this.render_navigation(),this.render_bar_navigation(),this.render_footer_navigation(this.form_id),this.init_events(),this.update_buttons(),this.update_navigation(),this.$el.find(".forminator-button.forminator-button-back, .forminator-button.forminator-button-next, .forminator-button.forminator-button-submit").on("click",function(t){t.preventDefault(),a(this).trigger("forminator.front.pagination.move")}),this.$el.on("click",".forminator-result--view-answers",function(t){t.preventDefault(),a(this).trigger("forminator.front.pagination.move")})},init_events:function(){var o=this;this.$el.find(".forminator-button-back").on("forminator.front.pagination.move",function(t){o.handle_click("prev")}),this.$el.on("forminator.front.pagination.move",".forminator-result--view-answers",function(t){o.handle_click("prev")}),this.$el.find(".forminator-button-next").on("forminator.front.pagination.move",function(t){o.handle_click("next")}),this.$el.find(".forminator-step").on("click",function(t){t.preventDefault();t=a(this).data("nav");o.handle_step(t)}),this.$el.on("reset",function(t){o.on_form_reset(t)}),this.$el.on("forminator:quiz:submit:success",function(t,e,r,n){n&&o.move_to_results(t)}),this.$el.on("forminator.front.pagination.focus.input",function(t,e){o.on_focus_input(t,e)})},move_to_results:function(t){this.finished=!0,this.$el.find(".forminator-submit-rightaway").length?this.$el.find("#forminator-submit").removeClass("forminator-hidden"):this.handle_click("next")},on_form_reset:function(t){this.go_to(0,!0),this.update_buttons()},on_focus_input:function(t,e){e=this.get_page_of_input(e);this.go_to(e,!0),this.update_buttons()},render_footer_navigation:function(t){var e="",r=!0===this.custom_label["has-paypal"]?' style="align-items: flex-start;"':"";this.custom_label[this.element]&&"custom"===this.custom_label["pagination-labels"]?(this.prev_button_txt=""!==this.custom_label[this.element]["prev-text"]?this.custom_label[this.element]["prev-text"]:this.prev_button,this.next_button_txt=""!==this.custom_label[this.element]["next-text"]?this.custom_label[this.element]["next-text"]:this.next_button):(this.prev_button_txt=this.prev_button,this.next_button_txt=this.next_button),e=this.$el.hasClass("forminator-design--material")?'<div class="forminator-pagination-footer"'+r+'><button class="forminator-button forminator-button-back"><span class="forminator-button--mask" aria-label="hidden"></span><span class="forminator-button--text">'+this.prev_button_txt+'</span></button><button class="forminator-button forminator-button-next"><span class="forminator-button--mask" aria-label="hidden"></span><span class="forminator-button--text">'+this.next_button_txt+"</span></button>":'<div class="forminator-pagination-footer"'+r+'><button class="forminator-button forminator-button-back">'+this.prev_button_txt+'</button><button class="forminator-button forminator-button-next">'+this.next_button_txt+"</button>",!0===this.custom_label["has-paypal"]&&(e+='<div class="forminator-payment forminator-button-paypal forminator-hidden '+(this.custom_label["paypal-id"]||"")+'-payment" id="paypal-button-container-'+t+'">'),this.$el.append(e+="</div>")},render_bar_navigation:function(){var t=this.$el.find(".forminator-pagination-progress");t.length&&(t.html('<div class="forminator-progress-label">0%</div><div class="forminator-progress-bar"><span style="width: 0%"></span></div>'),this.calculate_bar_percentage())},calculate_bar_percentage:function(){var t=this.totalSteps,e=this.step+1,r=this.$el;r.length&&(e=Math.round(e/t*100),r.find(".forminator-progress-label").html(e+"%"),r.find(".forminator-progress-bar span").css("width",e+"%"))},render_navigation:function(){var n,o,i=this.$el.find(".forminator-pagination-steps"),t=this.$el.find(".forminator-pagination-start");i.length&&(n=this.$el.find(".forminator-pagination").not(".forminator-pagination-start"),i.append('<div class="forminator-break"></div>'),o=this,n.each(function(){var t=a(this),e=t.data("label"),t=t.data("step")-1,r="forminator-custom-form-"+o.form_id+"--page-"+t;i.append('<button role="tab" id="'+(r+"-label")+'" class="forminator-step forminator-step-'+t+'" aria-selected="false" aria-controls="'+r+'" data-nav="'+t+'"><span class="forminator-step-label">'+e+'</span><span class="forminator-step-dot" aria-hidden="true"></span></button>'+'<div class="forminator-break" aria-hidden="true"></div>')}),t.each(function(){var t=a(this).data("label"),e=n.length,r="forminator-custom-form-"+o.form_id+"--page-"+e;i.append('<button role="tab" id="'+(r+"-label")+'" class="forminator-step forminator-step-'+e+'" data-nav="'+e+'" aria-selected="false" aria-controls="'+r+'"><span class="forminator-step-label">'+t+'</span><span class="forminator-step-dot" aria-hidden="true"></span></button>'+'<div class="forminator-break" aria-hidden="true"></div>')}))},handle_step:function(t){if(this.settings.inline_validation)for(var e=0;e<t;e++)if(this.step<=e&&!this.is_step_inputs_valid(e))return void this.go_to(e,!0);this.go_to(t,!0),this.update_buttons()},handle_click:function(t){var e,r=this;if("prev"===t&&0!==this.step)this.go_to(this.step-1,!0),this.update_buttons();else if("next"===t){if(this.settings.inline_validation&&!this.is_step_inputs_valid(this.step))return;void 0!==this.$el.data().forminatorFrontPayment?(e=this.$el.data().forminatorFrontPayment,0<this.$el.find("[data-step="+this.step+"]").find(".forminator-stripe-element").not(".forminator-hidden .forminator-stripe-element").length?e._stripe.createToken(e._cardElement).then(function(t){t.error?e.showCardError(t.error.message,!0):(e.hideCardError(),r.go_to(r.step+1,!0),r.update_buttons())}):(this.go_to(this.step+1,!0),this.update_buttons())):(this.go_to(this.step+1,!0),this.update_buttons())}var t=a(this.$el),n=t.find(".forminator-textarea");t.hasClass("forminator-design--material")&&n.length&&n.each(function(){FUI.textareaMaterial(this)})},is_step_inputs_valid:function(t){var r=0,n=this.$el.data("validator"),t=this.$el.find("[data-step="+t+"]");return void 0===n||(t.find("input, select, textarea").not(":submit, :reset, :image, :disabled").not(':hidden:not(.forminator-wp-editor-required, .forminator-input-file-required, input[name$="_data"])').not('[gramm="true"]').each(function(t,e){n.element(e)||(0===r&&e.focus(),r++)}),0===r)},get_page_of_input:function(t){var e=this.step,t=a(t).closest(".forminator-pagination");return 0<t.length&&(void 0!==(t=a(t).data("step"))&&(e=+t)),e},update_buttons:function(){var t,e,r;0===this.step?(this.$el.find(".forminator-button-back").closest(".forminator-pagination-footer").css({"justify-content":"flex-end"}),this.$el.find(".forminator-button-back").addClass("forminator-hidden"),this.$el.find(".forminator-button-next").removeClass("forminator-hidden")):1<this.totalSteps&&(this.$el.find(".forminator-button-back").closest(".forminator-pagination-footer").css({"justify-content":"space-between"}),this.$el.find(".forminator-button-back, .forminator-button-next").removeClass("forminator-hidden")),this.step!==this.totalSteps||this.finished||(this.step--,this.$el.submit()),this.step!==this.totalSteps-1||this.finished?(this.element=this.$el.find("[data-step="+this.step+"]").data("name"),this.custom_label[this.element]&&"custom"===this.custom_label["pagination-labels"]?(this.prev_button_txt=""!==this.custom_label[this.element]["prev-text"]?this.custom_label[this.element]["prev-text"]:this.prev_button,this.next_button_txt=""!==this.custom_label[this.element]["next-text"]?this.custom_label[this.element]["next-text"]:this.next_button):(this.prev_button_txt=this.prev_button,this.next_button_txt=this.next_button),this.step===this.totalSteps-1&&this.finished&&(this.next_button_txt=n.ForminatorFront.quiz.view_results),this.$el.hasClass("forminator-design--material")?(this.$el.find("#forminator-submit").removeAttr("id").removeClass("forminator-button-submit forminator-hidden").addClass("forminator-button-next"),!0===this.custom_label["has-paypal"]&&(this.$el.find("#forminator-paypal-submit").removeAttr("id").addClass("forminator-hidden"),this.$el.find(".forminator-button-next").removeClass("forminator-button-submit forminator-hidden")),this.$el.find(".forminator-button-back .forminator-button--text").html(this.prev_button_txt),this.$el.find(".forminator-button-next .forminator-button--text").html(this.next_button_txt)):(this.$el.find("#forminator-submit").removeAttr("id").removeClass("forminator-button-submit forminator-hidden").addClass("forminator-button-next"),!0===this.custom_label["has-paypal"]&&(this.$el.find("#forminator-paypal-submit").removeAttr("id").addClass("forminator-hidden"),this.$el.find(".forminator-button-next").removeClass("forminator-button-submit forminator-hidden")),this.$el.find(".forminator-button-back").html(this.prev_button_txt),this.$el.find(".forminator-button-next").html(this.next_button_txt)),this.step===this.totalSteps&&this.finished&&this.$el.find(".forminator-button-next, .forminator-button-back").addClass("forminator-hidden")):(t=this.$el.find(".forminator-pagination-submit").html(),e=this.$el.find(".forminator-pagination-submit").data("loading"),r="custom"===this.custom_label["pagination-labels"]&&""!==this.custom_label["last-previous"]?this.custom_label["last-previous"]:this.prev_button,this.$el.hasClass("forminator-design--material")?(this.$el.find(".forminator-button-back .forminator-button--text").html(r),this.$el.find(".forminator-button-next").removeClass("forminator-button-next").attr("id","forminator-submit").addClass("forminator-button-submit").find(".forminator-button--text").html("").html(t).data("loading",e)):(this.$el.find(".forminator-button-back").html(r),this.$el.find(".forminator-button-next").removeClass("forminator-button-next").attr("id","forminator-submit").addClass("forminator-button-submit").html(t).data("loading",e)),r=this.$el.find(".forminator-button-submit"),t||(r.addClass("forminator-hidden"),this.$el.find(".forminator-submit-rightaway").length&&r.html(n.ForminatorFront.quiz.view_results)),!0===this.custom_label["has-paypal"]&&(r.addClass("forminator-hidden"),this.$el.find(".forminator-payment").attr("id","forminator-paypal-submit"),!1===n.paypalHasCondition&&this.$el.find(".forminator-payment").removeClass("forminator-hidden")),0<this.$el.find(".forminator-payment iframe").length&&this.$el.find(".forminator-payment iframe").width("100%")),this.$el.trigger("forminator.front.condition.restart")},go_to:function(t,e){if((this.step=t)===this.totalSteps&&!this.finished)return!1;this.$el.find(".forminator-pagination").css({height:"0",opacity:"0",visibility:"hidden",overflow:"hidden"}).attr("aria-hidden","true").attr("hidden",!0),this.$el.find(".forminator-pagination .forminator-pagination--content").hide(),this.$el.find("[data-step="+t+"]").css({height:"auto",opacity:"1",visibility:"visible"}).removeAttr("aria-hidden").removeAttr("hidden"),this.$el.find("[data-step="+t+"] .forminator-pagination--content").show();t=this.$el.data("forminatorFront");void 0!==t&&t.responsive_captcha(),this.update_navigation(),e&&this.scroll_to_top_form()},update_navigation:function(){this.$el.find(".forminator-current").attr("aria-selected","false"),this.$el.find(".forminator-current").removeClass("forminator-current"),this.$el.find(".forminator-step-"+this.step).attr("aria-selected","true"),this.$el.find(".forminator-step-"+this.step).addClass("forminator-current"),this.$el.find(".forminator-pagination:not(:hidden)").find(".forminator-answer input").first().trigger("change"),this.calculate_bar_percentage()},scroll_to_top_form:function(){var t,e=this.$el,r=this.$el.find(".forminator-row").not(":hidden").first();(e=r.length?r:e).length&&(r="html,body",0<this.$el.closest(".sui-dialog").length&&(r=".sui-dialog"),0<this.$el.closest(".wph-modal").length&&(r=".wph-modal"),e.focus(),t=e.offset().top-(a(n).height()-e.outerHeight(!0))/2,this.quiz&&(t=e.offset().top,a("#wpadminbar").length&&(t-=35)),a(r).animate({scrollTop:t},500,function(){e.attr("tabindex")||e.attr("tabindex",-1)}))}}),a.fn[r]=function(t){return this.each(function(){a.data(this,r)||a.data(this,r,new e(this,t))})}}(jQuery,window,document),function(l,e,o){"use strict";var r="forminatorFrontPayPal",n={type:"paypal",paymentEl:null,paymentRequireSsl:!1,generalMessages:{}};function i(t,e){this.element=t,this.$el=l(this.element),this.forminator_selector="#"+this.$el.attr("id")+'[data-forminator-render="'+this.$el.data("forminator-render")+'"]',this.settings=l.extend({},n,e),this._defaults=n,this._name=r,this.paypalData=null,this.init()}l.extend(i.prototype,{init:function(){this.settings.paymentEl&&(this.paypalData=this.settings.paymentEl,this.render_paypal_button(this.element))},is_data_valid:function(){var t=this.configurePayPal(),e=this.settings.paymentRequireSsl;return!(t.amount<=0)&&(!e||"https:"===location.protocol)},is_form_valid:function(){var t=this.$el.validate(),e=t.checkForm();return t.submitted={},e},render_paypal_button:function(t){var i=l(t),a=this,r=this.configurePayPal(),n=i.find(".forminator-response-message"),s=ForminatorFront.cform.gateway.error,e=this.settings.paymentRequireSsl,o=this.settings.generalMessages,t={shape:r.shape,color:r.color,label:r.label,layout:r.layout,height:parseInt(r.height)};"vertical"!==r.layout&&(t.tagline=r.tagline),paypal.Buttons({onInit:function(t,e){e.disable(),"variable"===r.amount_type&&""!==r.variable&&(r.amount=a.get_field_calculation(r.variable)),i.find("input, select, textarea").change(function(){a.is_data_valid()&&a.is_form_valid()?e.enable():e.disable()}),i.on("validation:error",function(){e.disable()}),a.is_data_valid()&&a.is_form_valid()&&e.enable()},env:r.mode,style:t,onClick:function(){!i.valid()&&r.amount<=0?(n.removeClass("forminator-accessible").addClass("forminator-error").html("").removeAttr("aria-hidden"),n.html('<label class="forminator-label--error"><span>'+o.payment_require_amount_error+"</span></label>"),a.focus_to_element(n)):e&&"https:"!==location.protocol?(n.removeClass("forminator-accessible").addClass("forminator-error").html("").removeAttr("aria-hidden"),n.html('<label class="forminator-label--error"><span>'+o.payment_require_ssl_error+"</span></label>"),a.focus_to_element(n)):i.valid()||(n.removeClass("forminator-accessible").addClass("forminator-error").html("").removeAttr("aria-hidden"),n.html('<label class="forminator-label--error"><span>'+o.form_has_error+"</span></label>"),a.focus_to_element(n)),"variable"===r.amount_type&&""!==r.variable&&(r.amount=a.get_field_calculation(r.variable))},createOrder:function(t,e){i.addClass("forminator-partial-disabled");var r=i.find('input[name="forminator_nonce"]').val(),n=a.getPayPalData("form_id"),o=a.paypal_request_data();return fetch(ForminatorFront.ajaxUrl+"?action=forminator_pp_create_order",{method:"POST",mode:"same-origin",credentials:"same-origin",headers:{"content-type":"application/json"},body:JSON.stringify({nonce:r,form_id:n,mode:a.getPayPalData("mode"),form_data:o,form_fields:i.serialize()})}).then(function(t){return t.json()}).then(function(t){if(!0!==t.success)return s=t.data,!1;t=t.data.order_id;return i.find(".forminator-paypal-input").val(t),t})},onApprove:function(t,e){void 0!==a.settings.has_loader&&a.settings.has_loader&&(i.addClass("forminator-fields-disabled"),n.html("<p>"+a.settings.loader_label+"</p>"),n.removeAttr("aria-hidden").prop("tabindex","-1").removeClass("forminator-success forminator-error").addClass("forminator-loading forminator-show"),a.focus_to_element(n)),i.trigger("submit")},onCancel:function(t,e){return void 0!==a.settings.has_loader&&a.settings.has_loader&&(i.removeClass("forminator-fields-disabled forminator-partial-disabled"),n.removeClass("forminator-loading")),e.redirect()},onError:function(){void 0!==a.settings.has_loader&&a.settings.has_loader&&(i.removeClass("forminator-fields-disabled forminator-partial-disabled"),n.removeClass("forminator-loading")),n.removeClass("forminator-accessible").addClass("forminator-error").html("").removeAttr("aria-hidden"),n.html('<label class="forminator-label--error"><span>'+s+"</span></label>"),a.focus_to_element(n)}}).render(i.find(".forminator-button-paypal")[0])},configurePayPal:function(){var t={form_id:this.getPayPalData("form_id"),sandbox_id:this.getPayPalData("sandbox_id"),currency:this.getPayPalData("currency"),live_id:this.getPayPalData("live_id"),amount:0},e=(t.color=this.getPayPalData("color")?this.getPayPalData("color"):"gold",t.shape=this.getPayPalData("shape")?this.getPayPalData("shape"):"rect",t.label=this.getPayPalData("label")?this.getPayPalData("label"):"checkout",t.layout=this.getPayPalData("layout")?this.getPayPalData("layout"):"vertical",t.tagline=this.getPayPalData("tagline")?this.getPayPalData("tagline"):"true",t.redirect_url=this.getPayPalData("redirect_url")?this.getPayPalData("redirect_url"):"",t.mode=this.getPayPalData("mode"),t.locale=this.getPayPalData("locale")?this.getPayPalData("locale"):"en_US",t.debug_mode=this.getPayPalData("debug_mode")?this.getPayPalData("debug_mode"):"disable",t.amount_type=this.getPayPalData("amount_type")?this.getPayPalData("amount_type"):"fixed",t.variable=this.getPayPalData("variable")?this.getPayPalData("variable"):"",t.height=this.getPayPalData("height")?this.getPayPalData("height"):55,t.shipping_address=this.getPayPalData("shipping_address")?this.getPayPalData("shipping_address"):55,this.getPayPalData("amount_type"));return"fixed"===e?t.amount=this.getPayPalData("amount"):"variable"===e&&""!==t.variable&&(t.amount=this.get_field_calculation(t.variable)),t},getPayPalData:function(t){return void 0!==this.paypalData[t]?this.paypalData[t]:null},get_form_field:function(t){var e=this.$el.find("#"+t+"-field");return e=0===e.length&&0===(e=this.$el.find("input[name="+t+"]")).length&&0===(e=this.$el.find("textarea[name="+t+"]")).length&&0===(e=this.$el.find('input[name="'+t+'[]"]')).length&&0===(e=this.$el.find("#"+t)).length?this.$el.find("select[name="+t+"]"):e},get_field_calculation:function(t){var t=this.get_form_field(t),e=0,r=0,n=null;return this.field_is_radio(t)?(n=t.filter(":checked")).length&&(r=n.data("calculation"))!==o&&(e=Number(r)):this.field_is_checkbox(t)?t.each(function(){l(this).is(":checked")&&(r=l(this).data("calculation"))!==o&&(e+=Number(r))}):this.field_is_select(t)?(n=t.find("option").filter(":selected")).length&&(r=n.data("calculation"))!==o&&(e=Number(r)):e=t.inputmask?t.inputmask("unmaskedvalue").replace(/,/g,"."):Number(t.val()),isNaN(e)?0:e},focus_to_element:function(t){t.show(),l("html,body").animate({scrollTop:t.offset().top-(l(e).height()-t.outerHeight(!0))/2},500,function(){t.attr("tabindex")||t.attr("tabindex",-1),t.focus()})},paypal_request_data:function(){var t=this.configurePayPal(),e=this.getPayPalData("shipping_address"),r=this.getPayPalData("billing-details"),n=this.getBillingData(),o={};return o.purchase_units=[{amount:{currency_code:this.getPayPalData("currency"),value:t.amount}}],"disable"===e&&(o.application_context={shipping_preference:"NO_SHIPPING"}),r&&(o.payer=n),o},getBillingData:function(){var t,e,r,n,o,i=this.getPayPalData("billing-name"),a=this.getPayPalData("billing-email"),s=this.getPayPalData("billing-address"),l={};return i&&(l.name={},(n=this.get_field_value(i))||(t=this.get_field_value(i+"-prefix")||"",e=this.get_field_value(i+"-first-name")||"",r=this.get_field_value(i+"-middle-name")||"",o=this.get_field_value(i+"-last-name")||"",n=(n=t?t+" ":"")+e+(r?" "+r:"")),n&&(l.name.given_name=n,l.name.surname=o)),a&&(i=this.get_field_value(a)||"")&&(l.email_address=i),s&&(l.address={},(t=this.get_field_value(s+"-street_address")||"")&&(l.address.address_line_1=t),(e=this.get_field_value(s+"-address_line")||"")&&(l.address.address_line_2=e),(r=this.get_field_value(s+"-city")||"")&&(l.address.admin_area_2=r),(n=this.get_field_value(s+"-state")||"")&&(l.address.admin_area_1=n),(o=this.get_form_field(s+"-country")||"")&&(l.address.country_code=o.find(":selected").data("country-code")),(a=this.get_field_value(s+"-zip")||"")&&(l.address.postal_code=a)),l},get_field_value:function(t){var t=this.get_form_field(t),e="",r=null;return this.field_is_radio(t)?(r=t.filter(":checked")).length&&(e=r.val()):this.field_is_checkbox(t)?t.each(function(){l(this).is(":checked")&&(e=l(this).val())}):e=(this.field_is_select(t),t.val()),e},field_is_radio:function(t){var e=!1;return t.each(function(){if("radio"===l(this).attr("type"))return!(e=!0)}),e},field_is_checkbox:function(t){var e=!1;return t.each(function(){if("checkbox"===l(this).attr("type"))return!(e=!0)}),e},field_is_select:function(t){return t.is("select")}}),l.fn[r]=function(t){return this.each(function(){l.data(this,r)||l.data(this,r,new i(this,t))})}}(jQuery,window,void document),function(g){"use strict";var r="forminatorFrontDatePicker",n={};function e(t,e){this.element=t,this.$el=g(this.element),this.settings=g.extend({},n,e),this._defaults=n,this._name=r,this.init()}g.extend(e.prototype,{init:function(){var r=this,t=this.$el.data("format"),e=(this.$el.data("restrict-type"),this.$el.data("restrict")),n=this.$el.data("restrict"),o=this.$el.data("start-year"),i=this.$el.data("end-year"),a=this.$el.data("past-dates"),s=this.$el.val(),l=this.$el.data("start-of-week"),f=this.$el.data("start-date"),c=this.$el.data("end-date"),u=this.$el.data("start-field"),d=this.$el.data("end-field"),m=this.$el.data("start-offset"),h=this.$el.data("end-offset"),p=this.$el.data("disable-date"),b=this.$el.data("disable-range"),n=!isNaN(parseFloat(n))&&isFinite(n)?[n.toString()]:e.split(","),p=p.split(","),b=b.split(","),o=o||"c-95",i=i||"c+95",y=this.$el.closest(".forminator-custom-form"),_="forminator-calendar";y.hasClass("forminator-design--default")?_="forminator-calendar--default":y.hasClass("forminator-design--material")?_="forminator-calendar--material":y.hasClass("forminator-design--flat")?_="forminator-calendar--flat":y.hasClass("forminator-design--bold")&&(_="forminator-calendar--bold"),this.$el.datepicker({beforeShow:function(t,e){e.dpDiv.removeClass(function(t,e){return(e.match(/\bhustle-\S+/g)||[]).join(" ")}),e.dpDiv.removeClass(function(t,e){return(e.match(/\bforminator-\S+/g)||[]).join(" ")}),e.dpDiv.addClass("forminator-custom-form-"+y.data("form-id")+" "+_),"disable"===a?g(this).datepicker("option","minDate",s):g(this).datepicker("option","minDate",null),f&&(e=new Date(f.replace(/-/g,"/").replace(/T.+/,"")),g(this).datepicker("option","minDate",e)),c&&(e=new Date(c.replace(/-/g,"/").replace(/T.+/,"")),g(this).datepicker("option","maxDate",e)),u&&void 0!==(e=r.getLimitDate(u,m))&&g(this).datepicker("option","minDate",e),d&&void 0!==(e=r.getLimitDate(d,h))&&g(this).datepicker("option","maxDate",e)},beforeShowDay:function(t){return r.restrict_date(n,p,b,t)},monthNames:datepickerLang.monthNames,monthNamesShort:datepickerLang.monthNamesShort,dayNames:datepickerLang.dayNames,dayNamesShort:datepickerLang.dayNamesShort,dayNamesMin:datepickerLang.dayNamesMin,changeMonth:!0,changeYear:!0,dateFormat:t,yearRange:o+":"+i,minDate:new Date(o,0,1),maxDate:new Date(i,11,31),firstDay:l,onClose:function(){g(this).valid()}}),g(".ui-datepicker").addClass("notranslate")},getLimitDate:function(t,e){var r=g('input[name ="'+t+'"]').val();if(void 0!==r)return t=g('input[name ="'+t+'"]').data("format").replace(/y/g,"yy"),e=e.split("_"),r=moment(r,t.toUpperCase()),r="-"===e[0]?r.subtract(e[1],e[2]):r.add(e[1],e[2]),t=moment(r).format("YYYY-MM-DD"),new Date(t)},restrict_date:function(t,e,r,n){var o=!0,i=n.getDay(),a=jQuery.datepicker.formatDate("mm/dd/yy",n);if(0!==r[0].length)for(var s=0;s<r.length;s++){var l=r[s].split("-"),f=new Date(l[0].trim()),l=new Date(l[1].trim());if(f<=n&&n<=l){o=!1;break}}return-1!==t.indexOf(i.toString())||-1!==e.indexOf(a)||!1===o?[!1,"disabledDate"]:[!0,"enabledDate"]}}),g.fn[r]=function(t){return this.each(function(){g.data(this,r)||g.data(this,r,new e(this,t))})}}(jQuery,(window,document)),function(u){"use strict";var r="forminatorFrontValidate",n={},o={rules:{},messages:{}};function e(t,e){this.element=t,this.$el=u(this.element),this.settings=u.extend({},o,e),this._defaults=o,this._name=r,this.init()}function i(t){t=String(t).trim();var e=parseFloat(t);if(String(e)===t)return a(e,2);e=t.split(/[^\dE-]+/);if(1===e.length)return a(parseFloat(t),2);t=e.pop();return a(parseFloat(e.join("")+"."+t),2)}function a(t,e){return(Math.floor(100*t)/100).toFixed(e)}u.extend(e.prototype,{init:function(){u(".forminator-select2").on("change",this.element,function(t,e){"forminator_emulate_trigger"!==e&&u(this).trigger("focusout")});var r=!1,n=this.$el;u(this.element).validate({ignore:":hidden:not(.do-validate)",errorPlacement:function(t,e){n.trigger("validation:error")},showErrors:function(t,e){r&&0<e.length&&(n.find(".forminator-response-message").html("<ul></ul>"),jQuery.each(e,function(t,e){n.find(".forminator-response-message ul").append("<li>"+e.message+"</li>")}),n.find(".forminator-response-message").removeAttr("aria-hidden").prop("tabindex","-1").addClass("forminator-accessible")),r=!1,this.defaultShowErrors(),n.trigger("validation:showError",e)},invalidHandler:function(t,e){r=!0,n.trigger("validation:invalid")},onfocusout:function(t){!1===u(t).hasClass("hasDatepicker")&&u(t).valid(),u(t).trigger("validation:focusout")},highlight:function(t,e,r){var n=u(t),o=n.closest(".forminator-field"),i=n.closest(".forminator-date-input"),a=n.closest(".forminator-timepicker"),s=!1,l=!1,f=!1,t=this.errorMap[t.name],c='<span class="forminator-error-message" aria-hidden="true"></span>';0<i.length?(l=(s=i.parent()).find('.forminator-error-message[data-error-field="'+n.data("field")+'"]'),f=s.find(".forminator-description"),c='<span class="forminator-error-message" data-error-field="'+n.data("field")+'" aria-hidden="true"></span>',0===l.length&&("day"===n.data("field")&&(s.find('.forminator-error-message[data-error-field="year"]').length?u(c).insertBefore(s.find('.forminator-error-message[data-error-field="year"]')):0===f.length?s.append(c):u(c).insertBefore(f),0===o.find(".forminator-error-message").length&&o.append('<span class="forminator-error-message" aria-hidden="true"></span>')),"month"===n.data("field")&&(s.find('.forminator-error-message[data-error-field="day"]').length?u(c).insertBefore(s.find('.forminator-error-message[data-error-field="day"]')):0===f.length?s.append(c):u(c).insertBefore(f),0===o.find(".forminator-error-message").length&&o.append('<span class="forminator-error-message" aria-hidden="true"></span>')),"year"===n.data("field")&&(0===f.length?s.append(c):u(c).insertBefore(f),0===o.find(".forminator-error-message").length&&o.append('<span class="forminator-error-message" aria-hidden="true"></span>'))),s.find('.forminator-error-message[data-error-field="'+n.data("field")+'"]').html(t),o.find(".forminator-error-message").html(t)):0<a.length?(l=(s=a.parent()).find('.forminator-error-message[data-error-field="'+n.data("field")+'"]'),f=s.find(".forminator-description"),c='<span class="forminator-error-message" data-error-field="'+n.data("field")+'" aria-hidden="true"></span>',0===l.length&&("hours"===n.data("field")&&(s.find('.forminator-error-message[data-error-field="minutes"]').length?u(c).insertBefore(s.find('.forminator-error-message[data-error-field="minutes"]')):0===f.length?s.append(c):u(c).insertBefore(f),0===o.find(".forminator-error-message").length&&o.append('<span class="forminator-error-message" aria-hidden="true"></span>')),"minutes"===n.data("field")&&(0===f.length?s.append(c):u(c).insertBefore(f),0===o.find(".forminator-error-message").length&&o.append('<span class="forminator-error-message" aria-hidden="true"></span>'))),s.find('.forminator-error-message[data-error-field="'+n.data("field")+'"]').html(t),o.find(".forminator-error-message").html(t)):(l=o.find(".forminator-error-message"),f=o.find(".forminator-description"),0===l.length&&(0===f.length?o.append(c):u(c).insertBefore(f)),o.find(".forminator-error-message").html(t)),n.attr("aria-invalid","true"),o.addClass("forminator-has_error"),n.trigger("validation:highlight")},unhighlight:function(t,e,r){var t=u(t),n=t.closest(".forminator-field"),o=t.closest(".forminator-timepicker"),i=t.closest(".forminator-date-input"),a="",a=0<i.length?i.parent().find('.forminator-error-message[data-error-field="'+t.data("field")+'"]'):0<o.length?o.parent().find('.forminator-error-message[data-error-field="'+t.data("field")+'"]'):n.find(".forminator-error-message");t.removeAttr("aria-invalid"),a.remove(),n.removeClass("forminator-has_error"),t.trigger("validation:unhighlight")},rules:this.settings.rules,messages:this.settings.messages}),u(this.element).on("forminator.validate.signature",function(){u(this).validate().form()})}}),u.fn[r]=function(t){return u.each(n,function(t,e){void 0===u.validator.methods[t]?u.validator.addMethod(t,e):"number"===t&&(u.validator.methods.number=n.number)}),this.each(function(){u.data(this,r)||u.data(this,r,new e(this,t))})},u.validator.addMethod("validurl",function(t,e){var r=u.validator.methods.url.bind(this);return r(t,e)||r("http://"+t,e)}),u.validator.addMethod("forminatorPhoneNational",function(t,e){return this.optional(e)||u(e).intlTelInput("isValidNumber")}),u.validator.addMethod("forminatorPhoneInternational",function(t,e){return this.optional(e)||u(e).intlTelInput("isValidNumber")}),u.validator.addMethod("dateformat",function(t,e,r){var n,o,i,a,s=!1,l="yy-mm-dd"===r||"yy/mm/dd"===r||"yy.mm.dd"===r?/^\d{4}-\d{1,2}-\d{1,2}$/:/^\d{1,2}-\d{1,2}-\d{4}$/;return t=t.replace(/[ /.]/g,"-"),s=!!l.test(t)&&("dd/mm/yy"===r||"dd-mm-yy"===r||"dd.mm.yy"===r?(n=t.split("-"),o=parseInt(n[0],10),i=parseInt(n[1],10),a=parseInt(n[2],10)):"mm/dd/yy"===r||"mm.dd.yy"===r||"mm-dd-yy"===r?(n=t.split("-"),i=parseInt(n[0],10),o=parseInt(n[1],10),a=parseInt(n[2],10)):(n=t.split("-"),a=parseInt(n[0],10),i=parseInt(n[1],10),o=parseInt(n[2],10)),(l=new Date(Date.UTC(a,i-1,o,12,0,0,0))).getUTCFullYear()===a&&l.getUTCMonth()===i-1&&l.getUTCDate()===o),this.optional(e)||s}),u.validator.addMethod("maxwords",function(t,e,r){return this.optional(e)||t.trim().split(/\s+/).length<=r}),u.validator.addMethod("trim",function(t,e,r){return!0===this.optional(e)||0!==t.trim().length}),u.validator.addMethod("emailWP",function(t,e,r){if(this.optional(e))return!0;if(t.trim().length<6)return!1;if(t.indexOf("@",1)<0)return!1;e=t.split("@",2);if(!e[0].match(/^[a-zA-Z0-9!#$%&'*+\/=?^_`{|}~\.-]+$/))return!1;if(e[1].match(/\.{2,}/))return!1;var n=e[1].split(".");if(n.length<2)return!1;for(var o=n.length,i=0;i<o;i++)if(!n[i].match(/^[a-z0-9-]+$/i))return!1;return!0}),u.validator.addMethod("forminatorPasswordStrength",function(t,e,r){t=t.trim();if(0==t.length)return!0;if(!t||t.length<8)return!1;var n=0;return t.match(/[0-9]/)&&(n+=10),t.match(/[a-z]/)&&(n+=20),t.match(/[A-Z]/)&&(n+=20),t.match(/[^a-zA-Z0-9]/)&&(n+=30),t.match(/[=!\-@.,_*#&?^`%$+\/{\[\]|}^?~]/)&&(n+=30),54<=Math.log(Math.pow(n,t.length))/Math.LN2}),u.validator.addMethod("extension",function(t,e,r){var n,o=!1;return""!==t.trim()&&(n=(n=t.replace(/^.*\./,""))==t?"notExt":n.toLowerCase(),-1!=r.indexOf(n)&&(o=!0)),this.optional(e)||o}),u.validator.methods.number=function(t,e,r){return this.optional(e)||/^[-+]?[0-9]+[.]?[0-9]*([eE][-+]?[0-9]+)?$/.test(t)},u.validator.addMethod("minNumber",function(t,e,r){return 0===t.length||r<=i(t)}),u.validator.addMethod("maxNumber",function(t,e,r){return 0===t.length||i(t)<=r}),n=u.validator.methods}(jQuery,(window,document)),function(i,c,t,o){"use strict";c.paypalHasCondition=!1;var n="forminatorFrontCondition",a={fields:{},relations:{}};function r(t,e,r){this.element=t,this.$el=i(this.element),this.settings=i.extend({},a,e),this._defaults=a,this._name=n,this.calendar=r[0],this.init()}i.extend(r.prototype,{init:function(){var n=this,r=this.$el;this.add_missing_relations(),this.$el.find(".forminator-field input, .forminator-row input[type=hidden], .forminator-field select, .forminator-field textarea, .forminator-field-signature").on("change input",function(t){var e=i(this),r=(r=void 0===(r=e.closest(".forminator-col").attr("id"))?"1"===e.attr("data-multi")?e.attr("name"):e.attr("id"):r).trim();return!(!n.has_relations(r)&&!n.has_siblings(r))&&(n.has_siblings(r)&&n.trigger_fake_parent_date_field(r),!n.has_relations(r)&&n.has_siblings(r)?(n.trigger_siblings(r),!1):(n.process_relations(r,e,t),n.paypal_button_condition(),void n.maybe_clear_upload_container()))}),i(t).on("tinymce-editor-init",function(t,e){e.on("change",function(t){r.find("#"+i(this).attr("id")).change()})}),"undefined"!=typeof tinyMCE&&tinyMCE.activeEditor&&tinyMCE.activeEditor.on("change",function(t){r.find("#"+i(this).attr("id")).change()}),this.$el.find(".forminator-button.forminator-button-back, .forminator-button.forminator-button-next").on("click",function(){r.find('.forminator-field input:not([type="file"]), .forminator-row input[type=hidden], .forminator-field select, .forminator-field textarea').trigger("change","forminator_emulate_trigger")}),this.$el.find(".forminator-field input, .forminator-row input[type=hidden], .forminator-field select, .forminator-field textarea").trigger("change","forminator_emulate_trigger"),this.init_events()},process_relations:function(t,s,l){var f=this;f.get_relations(t).forEach(function(t){var e,r=f.get_field_logic(t),n=r.action,o=r.rule,i=r.conditions,a=0;0===t.indexOf("paypal")&&0!==r.length&&(c.paypalHasCondition=!0),i.forEach(function(t){f.is_applicable_rule(t,n)&&a++}),"all"===o&&a===i.length||"any"===o&&0<a?(s instanceof jQuery&&(e=s.closest(".forminator-pagination")),"submit"===t&&void 0!==e&&f.toggle_field(t,"show","valid"),f.toggle_field(t,n,"valid"),f.has_relations(t)&&("hide"===n?f.hide_element(t,l):f.show_element(t,l))):(f.toggle_field(t,n,"invalid"),f.has_relations(t)&&("show"===n?f.hide_element(t,l):f.show_element(t,l)))})},init_events:function(){var e=this;this.$el.on("forminator.front.condition.restart",function(t){e.on_restart(t)})},on_restart:function(t){this.$el.find('.forminator-field input:not([type="file"]), .forminator-row input[type=hidden], .forminator-field select, .forminator-field textarea').trigger("change","forminator_emulate_trigger")},add_missing_relations:function(){var t,r=this,n={};void 0!==this.settings.fields&&(t=this.settings.fields,Object.keys(t).forEach(function(e){t[e].conditions.forEach(function(t){t=t.field;r.has_relations(t)||(void 0===n[t]&&(n[t]=[]),n[t].push(e))})})),Object.keys(n).forEach(function(t){r.settings.relations[t]=n[t]})},get_field_logic:function(t){return void 0===this.settings.fields[t]?[]:this.settings.fields[t]},has_relations:function(t){return void 0!==this.settings.relations[t]},get_relations:function(t){return this.has_relations(t)?this.settings.relations[t]:[]},get_field_value:function(t){if(""===t)return"";var t=this.get_form_field(t),e=t.val();return this.field_is_radio(t)?e=t.filter(":checked").val():this.field_is_signature(t)?e=t.find("input[id$='_data']").val():this.field_is_checkbox(t)?(e=[],t.each(function(){i(this).is(":checked")&&e.push(i(this).val().toLowerCase())}),0===e.length&&(e=null)):this.field_is_textarea_wpeditor(t)?"undefined"!=typeof tinyMCE&&tinyMCE.activeEditor&&(e=tinyMCE.activeEditor.getContent()):this.field_has_inputMask(t)&&(e=t.inputmask("unmaskedvalue")),e||""},get_date_field_value:function(t){if(""===t)return"";var e=this.get_form_field(t),r=!0,n=(e instanceof jQuery&&(r=!1,e.hasClass("forminator-col")&&(r=!0)),"");if(!r&&this.field_is_datepicker(e)){switch(n=e.val(),e.data("format")){case"dd/mm/yy":n=e.val().split("/").reverse().join("-");break;case"dd.mm.yy":n=e.val().split(".").reverse().join("-");break;case"dd-mm-yy":n=e.val().split("-").reverse().join("-")}var o=new Date,n={year:(o=""!==n?new Date(n):o).getFullYear(),month:o.getMonth(),date:o.getDate(),day:o.getDay()}}else{var t=!0===r?t:e.data("parent"),i=this.get_form_field_value(t+"-year"),a=this.get_form_field_value(t+"-month"),t=this.get_form_field_value(t+"-day");if(""!==i&&""!==a&&""!==t){o=new Date(i+"-"+a+"-"+t);if(!0===r)return o;n={year:o.getFullYear(),month:o.getMonth(),date:o.getDate(),day:o.getDay()}}}return n||""},field_has_inputMask:function(t){var e=!1;return t.each(function(){if(o!==i(this).attr("data-inputmask"))return!(e=!0)}),e},field_is_radio:function(t){var e=!1;return t.each(function(){if("radio"===i(this).attr("type"))return!(e=!0)}),e},field_is_signature:function(t){var e=!1;return t.each(function(){if(0<i(this).find(".forminator-field-signature").length)return!(e=!0)}),e},field_is_datepicker:function(t){var e=!1;return t.each(function(){if(i(this).hasClass("forminator-datepicker"))return!(e=!0)}),e},field_is_checkbox:function(t){var e=!1;return t.each(function(){if("checkbox"===i(this).attr("type"))return!(e=!0)}),e},field_is_select:function(t){return t.is("select")},field_is_textarea_wpeditor:function(t){var e=!1;return t.each(function(){if(i(this).parent(".wp-editor-container").parent("div").hasClass("tmce-active"))return!(e=!0)}),e},field_is_upload:function(t){var e=!1;return e=-1!==t.indexOf("upload")?!0:e},get_form_field:function(t){var e=this.$el.find("#"+t+"-field");return e=0===e.length&&0===(e=this.$el.find("."+t+"-payment")).length&&0===(e=this.$el.find('input[name="'+t+'"]')).length&&0===(e=this.$el.find('textarea[name="'+t+'"]')).length&&0===(e=this.$el.find('input[name="'+t+'[]"]')).length&&0===(e=this.$el.find('select[name="'+t+'"]')).length?this.$el.find("#"+t):e},get_form_field_value:function(t){var e=this.$el.data("form-id"),e=this.$el.find("#forminator-form-"+e+"__field--"+t);return(e=0===e.length&&0===(e=this.$el.find("#"+t+"-field")).length&&0===(e=this.$el.find('input[name="'+t+'"]')).length&&0===(e=this.$el.find('textarea[name="'+t+'"]')).length&&0===(e=this.$el.find('input[name="'+t+'[]"]')).length&&0===(e=this.$el.find('select[name="'+t+'"]')).length?this.$el.find("#"+t):e).val()},is_numeric:function(t){return!isNaN(parseFloat(t))&&isFinite(t)},is_date_rule:function(t){return["day_is","day_is_not","month_is","month_is_not","is_before","is_after","is_before_n_or_more_days","is_before_less_than_n_days","is_after_n_or_more_days","is_after_less_than_n_days"].includes(t)},has_siblings:function(t){return""!==t&&!!(t=this.get_form_field(t)).data("parent")},trigger_fake_parent_date_field:function(t){t=this.get_form_field(t).data("parent");this.process_relations(t,{},{})},trigger_siblings:function(r){var n=this,t=n.get_form_field(r).data("parent");i.each([t+"-year",t+"-month",t+"-day"],function(t,e){r!==e&&n.has_relations(e)&&n.get_form_field(e).trigger("change")})},is_applicable_rule:function(t,e){if(void 0===t)return!1;r=this.is_date_rule(t.operator)?this.get_date_field_value(t.field):this.get_field_value(t.field);var r,n=t.value,o=t.operator;return"show"===e?this.is_matching(r,n,o)&&this.is_hidden(t.field):this.is_matching(r,n,o)},is_hidden:function(t){t=this.get_form_field(t).closest(".forminator-col").closest(".forminator-row");return!!t.hasClass("forminator-hidden-option")||!t.hasClass("forminator-hidden")},is_matching:function(t,e,r){var n,o=Array.isArray(t);switch("string"==typeof t&&(t=t.toLowerCase()),"string"==typeof e&&(e=e.toLowerCase(),"month_is"!==r&&"month_is_not"!==r||i.inArray(e,n={jan:0,feb:1,mar:2,apr:3,may:4,jun:5,jul:6,aug:7,sep:8,oct:9,nov:10,dec:11})&&(e=n[e]),"day_is"!==r&&"day_is_not"!==r||i.inArray(e,n={su:0,mo:1,tu:2,we:3,th:4,fr:5,sa:6})&&(e=n[e])),r){case"is":return o?-1<i.inArray(e,t):t===e;case"is_not":return o?-1===i.inArray(e,t):t!==e;case"is_great":return e=+e,!(!this.is_numeric(t=+t)||!this.is_numeric(e))&&e<t;case"is_less":return e=+e,!(!this.is_numeric(t=+t)||!this.is_numeric(e))&&t<e;case"contains":return this.contains(t,e);case"starts":return t.startsWith(e);case"ends":return t.endsWith(e);case"month_is":return t.month===e;case"month_is_not":return t.month!==e;case"day_is":return t.day===e;case"day_is_not":return t.day!==e;case"is_before":return this.date_is_smaller(t,e);case"is_after":return this.date_is_grater(t,e);case"is_before_n_or_more_days":return this.date_is_n_days_before_current_date(t,e);case"is_before_less_than_n_days":return this.date_is_less_than_n_days_before_current_date(t,e);case"is_after_n_or_more_days":return this.date_is_n_days_after_current_date(t,e);case"is_after_less_than_n_days":return this.date_is_less_than_n_days_after_current_date(t,e)}return!1},contains:function(t,e){return 0<=t.toLowerCase().indexOf(e)},date_is_grater:function(t,e){return 1===forminatorDateUtil.compare(t,e)},date_is_smaller:function(t,e){return-1===forminatorDateUtil.compare(t,e)},date_is_equal:function(t,e){return 0===forminatorDateUtil.compare(t,e)},date_is_n_days_before_current_date:function(t,e){e=parseInt(e);var r=this.get_current_date(),t=forminatorDateUtil.diffInDays(t,r);return!isNaN(t)&&(0===e?t===e:e<=t)},date_is_less_than_n_days_before_current_date:function(t,e){e=parseInt(e);var r=this.get_current_date(),t=forminatorDateUtil.diffInDays(t,r);return!isNaN(t)&&(t<e&&0<t)},date_is_n_days_after_current_date:function(t,e){e=parseInt(e);var r=this.get_current_date(),r=forminatorDateUtil.diffInDays(r,t);return!isNaN(r)&&(0===e?r===e:e<=r)},date_is_less_than_n_days_after_current_date:function(t,e){e=parseInt(e);var r=this.get_current_date(),r=forminatorDateUtil.diffInDays(r,t);return!isNaN(r)&&(r<e&&0<r)},get_current_date:function(){return new Date},toggle_field:function(t,e,r){var n=this.get_form_field(t),o=n.closest(".forminator-col"),i=o.find(".forminator-input-file-required"),a=o.find("[id ^=ctlSignature][id $=_data]"),s=o.find(".forminator-wp-editor-required"),l=o.closest(".forminator-row"),f=this.$el.find(".forminator-pagination-footer").find(".forminator-button-next"),c=this.$el.find("submit"===t?".forminator-button-submit":"#forminator-paypal-submit");"show"===e&&("valid"===r?(l.removeClass("forminator-hidden"),o.removeClass("forminator-hidden"),f.removeClass("forminator-hidden"),0<i.length&&i.addClass("do-validate"),0<s.length&&s.addClass("do-validate"),0<a.length&&a.addClass("do-validate"),"submit"===t&&c.removeClass("forminator-hidden"),0===t.indexOf("paypal")&&c.removeClass("forminator-hidden")):(o.addClass("forminator-hidden"),"submit"===t&&c.addClass("forminator-hidden"),0===t.indexOf("paypal")&&c.addClass("forminator-hidden"),0<i.length&&i.removeClass("do-validate"),0<s.length&&s.removeClass("do-validate"),0<a.length&&a.removeClass("do-validate"),0===l.find("> .forminator-col:not(.forminator-hidden)").length&&l.addClass("forminator-hidden"))),"hide"===e&&("valid"===r?(o.addClass("forminator-hidden"),c.addClass("forminator-hidden"),0<i.length&&i.removeClass("do-validate"),0<s.length&&s.removeClass("do-validate"),0<a.length&&a.removeClass("do-validate"),0===l.find("> .forminator-col:not(.forminator-hidden)").length&&l.addClass("forminator-hidden")):(l.removeClass("forminator-hidden"),o.removeClass("forminator-hidden"),c.removeClass("forminator-hidden"),0<i.length&&i.addClass("do-validate"),0<s.length&&s.addClass("do-validate"),0<a.length&&a.addClass("do-validate"))),this.$el.trigger("forminator:field:condition:toggled"),this.toggle_confirm_password(n)},clear_value:function(t,e){var r=this.get_form_field(t),n=this.get_field_value(t);r.hasClass("forminator-cleared-value")||(r.addClass("forminator-cleared-value"),e.originalEvent!==o&&(this.field_is_radio(r)?(r.attr("data-previous-value",n),r.removeAttr("checked")):this.field_is_checkbox(r)?r.each(function(){i(this).is(":checked")&&i(this).attr("data-previous-value",n),i(this).removeAttr("checked")}):(r.attr("data-previous-value",n),r.val(""))))},restore_value:function(t,e){var r=this.get_form_field(t),n=r.attr("data-previous-value");r.hasClass("forminator-cleared-value")&&e.originalEvent!==o&&(r.removeClass("forminator-cleared-value"),this.field_is_upload(t)||n&&(this.field_is_radio(r)?r.val([n]):this.field_is_checkbox(r)?r.each(function(){var t=i(this).attr("data-previous-value");t&&0<=t.indexOf(i(this).val())&&i(this).attr("checked","checked")}):r.val(n)))},hide_element:function(t,e){var r=this,n=r.get_relations(t);r.clear_value(t,e),n.forEach(function(t){r.toggle_field(t,"hide","valid"),r.has_relations(t)&&(n=r.hide_element(t,e))})},show_element:function(t,i){var a=this,s=a.get_relations(t);this.restore_value(t,i),this.textareaFix(this.$el,t,i),s.forEach(function(t){var e=a.get_field_logic(t),r=e.action,n=e.rule,e=e.conditions,o=0;e.forEach(function(t){a.is_applicable_rule(t,r)&&o++}),"all"===n&&o===e.length||"any"===n&&0<o?a.toggle_field(t,r,"valid"):a.toggle_field(t,r,"invalid"),a.has_relations(t)&&(s=a.show_element(t,i))})},paypal_button_condition:function(){var t=this.$el.find(".forminator-paypal-row"),e=this.$el.find(".forminator-pagination-footer").find(".forminator-button-paypal");0<t.length&&(this.$el.find(".forminator-button-submit").closest(".forminator-row").removeClass("forminator-hidden"),t.hasClass("forminator-hidden")||this.$el.find(".forminator-button-submit").closest(".forminator-row").addClass("forminator-hidden")),0<e.length&&(e.hasClass("forminator-hidden")?this.$el.find(".forminator-button-submit").removeClass("forminator-hidden"):this.$el.find(".forminator-button-submit").addClass("forminator-hidden"))},maybe_clear_upload_container:function(){this.$el.find('.forminator-row.forminator-hidden input[type="file"]').each(function(){""===i(this).val()&&(i(this).parent().hasClass("forminator-multi-upload")?i(this).parent().siblings(".forminator-uploaded-files").empty():(i(this).siblings("span").text(i(this).siblings("span").data("empty-text")),i(this).siblings(".forminator-button-delete").hide()))})},textareaFix:function(t,e,r){var n=i("#"+e+" .forminator-label");e.includes("textarea")&&t.hasClass("forminator-design--material")&&0<n.length&&(t=i("#"+e+" .forminator-textarea"),e=n.height()+9,n.css({"padding-top":e+"px"}),t.css({"padding-top":e+"px"}))},toggle_confirm_password:function(t){0!==t.length&&t.attr("id")&&-1!==t.attr("id").indexOf("password")&&((t=t.closest(".forminator-col")).hasClass("forminator-hidden")?t.parent(".forminator-row").next(".forminator-row").addClass("forminator-hidden"):t.parent(".forminator-row").next(".forminator-row").removeClass("forminator-hidden"))}}),i.fn[n]=function(t,e){return this.each(function(){i.data(this,n)||i.data(this,n,new r(this,t,e))})}}(jQuery,window,document),function(h,p){"use strict";var r="forminatorFrontSubmit",n={form_type:"custom-form",forminatorFront:!1,forminator_selector:"",chart_design:"bar",chart_options:{}};function e(t,e){this.element=t,this.$el=h(this.element),this.forminatorFront=null,this.settings=h.extend({},n,e),this._defaults=n,this._name=r,this.init()}h.extend(e.prototype,{init:function(){switch(this.forminatorFront=this.$el.data("forminatorFront"),this.settings.form_type){case"custom-form":this.settings.forminator_selector&&h(this.settings.forminator_selector).length||(this.settings.forminator_selector=".forminator-custom-form"),this.handle_submit_custom_form();break;case"quiz":this.settings.forminator_selector&&h(this.settings.forminator_selector).length||(this.settings.forminator_selector=".forminator-quiz"),this.handle_submit_quiz();break;case"poll":this.settings.forminator_selector&&h(this.settings.forminator_selector).length||(this.settings.forminator_selector=".forminator-poll"),this.handle_submit_poll()}},decodeHtmlEntity:function(t){return t.replace(/&#(\d+);/g,function(t,e){return String.fromCharCode(e)})},handle_submit_custom_form:function(){var c=this,u=h(this.element),r=(c.$el.find(".forminator-response-message").find(".forminator-label--success").not(":hidden").length&&c.focus_to_element(c.$el.find(".forminator-response-message")),h(".def-ajaxloader").hide(),!1);h("body").on("click","#lostPhone",function(t){t.preventDefault();var e=h(this);!1===r&&(r=!0,h.ajax({type:"GET",url:e.attr("href"),beforeSend:function(){e.attr("disabled","disabled"),h(".def-ajaxloader").show()},success:function(t){e.removeAttr("disabled"),h(".def-ajaxloader").hide(),h(".notification").text(t.data.message),r=!1}}))}),h("body").on("click",".auth-back",function(t){t.preventDefault();t=c.$el.attr("id");h("#"+(t+"-authentication")+"-input").attr("disabled","disabled"),FUI.closeAuthentication()}),h("body").on("submit.frontSubmit",this.settings.forminator_selector,function(t){var s=h(this),e=this,r=t,l=new FormData(this),f=s.find(".forminator-response-message"),n=c.$el.find(".forminator-g-recaptcha, .forminator-hcaptcha");if(c.settings.inline_validation&&0<c.$el.find(".forminator-uploaded-files").length&&0<c.$el.find(".forminator-uploaded-files li.forminator-has_error").length)return!1;if(void 0!==r.originalEvent){var o=h(this).find(".forminator-button-submit").first();if(0===o.length||h(o).closest(".forminator-col").hasClass("forminator-hidden"))return!1}if(c.$el.data("forminatorFrontPayment")&&!1===c.processCaptcha(c,n,f))return!1;c.multi_upload_disable(s,!0);function i(){if(l=new FormData(this),!c.$el.data("forminatorFrontPayment")&&!1===c.processCaptcha(c,n,f))return!1;c.$el.hasClass("forminator_ajax")?(f.html(""),c.$el.find(".forminator-button-submit").addClass("forminator-button-onload"),c.$el.find("input[type=file]").each(function(){""===h(this).val()&&"function"==typeof p.FormData.prototype.delete&&l.delete(h(this).attr("name"))}),void 0!==c.settings.has_loader&&c.settings.has_loader&&("login"!==c.$el.find('input[name="form_type"]').val()&&u.addClass("forminator-fields-disabled"),f.html("<p>"+c.settings.loader_label+"</p>"),c.focus_to_element(f),f.removeAttr("aria-hidden").prop("tabindex","-1").removeClass("forminator-success forminator-error").addClass("forminator-loading forminator-show")),t.preventDefault(),h.ajax({type:"POST",url:p.ForminatorFront.ajaxUrl,data:l,cache:!1,contentType:!1,processData:!1,beforeSend:function(){s.find("button").attr("disabled",!0),s.trigger("before:forminator:form:submit",l)},success:function(t){if(!t&&void 0!==t||"object"!=typeof t.data)return s.find("button").removeAttr("disabled"),f.addClass("forminator-error").html("<p>"+p.ForminatorFront.cform.error+"<br>("+t.data+")</p>"),c.focus_to_element(f),!1;if(s.find(".forminator-error-message").not(".forminator-uploaded-files .forminator-error-message").remove(),s.find(".forminator-field").removeClass("forminator-has_error"),s.find("button").removeAttr("disabled"),f.html("").removeClass("forminator-accessible forminator-error forminator-success"),c.settings.hasLeads&&void 0!==t.data.entry_id)return c.showQuiz(u),h("#forminator-module-"+c.settings.quiz_id+" input[name=entry_id]").val(t.data.entry_id),"end"===c.settings.form_placement&&h("#forminator-module-"+c.settings.quiz_id).submit(),!1;var e,r;if(void 0!==t&&void 0!==t.data&&void 0!==t.data.authentication&&("show"===t.data.authentication||"invalid"===t.data.authentication))return i=c.$el.attr("id"),r=h("#"+(e=i+"-authentication")),a=h("#"+e+"-input"),n=h("#"+e+"-token"),r.find(".forminator-authentication-notice").removeClass("error"),r.find(".lost-device-url").attr("href",t.data.lost_url),"show"===t.data.authentication&&(c.$el.find(".forminator-authentication-nav").html("").append(t.data.auth_nav),c.$el.find(".forminator-authentication-box").hide(),"fallback-email"===t.data.auth_method&&(c.$el.find(".wpdef-2fa-email-resend input").click(),c.$el.find(".notification").hide()),c.$el.find("#forminator-2fa-"+t.data.auth_method).show(),c.$el.find(".forminator-authentication-box input").attr("disabled",!0),c.$el.find("#forminator-2fa-"+t.data.auth_method+" input").attr("disabled",!1),c.$el.find(".forminator-2fa-link").show(),c.$el.find("#forminator-2fa-link-"+t.data.auth_method).hide(),a.removeAttr("disabled").val(t.data.auth_method),n.val(t.data.auth_token),FUI.openAuthentication(e,i,e+"-input")),"invalid"===t.data.authentication&&(r.find(".forminator-authentication-notice").addClass("error"),r.find(".forminator-authentication-notice").html("<p>"+t.data.message+"</p>")),!1;var n,o,i,a=t.success?"forminator-success":"forminator-error";void 0!==t.message?(f.removeAttr("aria-hidden").prop("tabindex","-1").addClass(a+" forminator-show"),c.focus_to_element(f,!1,t.fadeout,t.fadeout_time),f.html(t.message),!t.data.success&&t.data.errors.length&&(o='<ul class="forminator-screen-reader-only">',h.each(t.data.errors,function(t,e){for(var r in e)e.hasOwnProperty(r)&&(o+="<li>"+e[r]+"</li>")}),o+="</ul>",f.append(o))):void 0!==t.data&&(n=!0,(n=void 0!==t.data.url&&void 0!==t.data.newtab&&"newtab_thankyou"!==t.data.newtab?!1:n)&&(f.removeAttr("aria-hidden").prop("tabindex","-1").addClass(a+" forminator-show"),c.focus_to_element(f,!1,t.data.fadeout,t.data.fadeout_time),f.html(t.data.message)),!t.data.success&&void 0!==t.data.errors&&t.data.errors.length&&(o='<ul class="forminator-screen-reader-only">',h.each(t.data.errors,function(t,e){for(var r in e)e.hasOwnProperty(r)&&(o+="<li>"+e[r]+"</li>")}),o+="</ul>",f.append(o)),void 0!==t.data.stripe3d&&(void 0!==t.data.subscription?s.trigger("forminator:form:submit:stripe:3dsecurity",[t.data.secret,t.data.subscription]):s.trigger("forminator:form:submit:stripe:3dsecurity",[t.data.secret,!1]))),t.data.success||(s.trigger("forminator:form:submit:failed",l),c.multi_upload_disable(s,!1),void 0!==t.data.errors&&t.data.errors.length&&c.show_messages(t.data.errors)),!0===t.success&&(i=void 0!==t.data.behav&&"behaviour-hide"===t.data.behav,s[0]&&(c.settings.resetEnabled&&!i&&s[0].reset(),c.$el.trigger("forminator:field:condition:toggled"),s.find(".forminator-field-signature img").trigger("click"),void 0!==t.data.select_field&&h.each(t.data.select_field,function(r,t){0<t.length&&h.each(t,function(t,e){e.value&&("multiselect"===e.type?s.find("#"+r+" input[value="+e.value+"]").closest(".forminator-option"):s.find("#"+r+" option[value="+e.value+"]")).remove().trigger("change")})}),s.find(".forminator-button-delete").hide(),s.find(".forminator-file-upload input").val(""),s.find(".forminator-file-upload > span").html(p.ForminatorFront.cform.no_file_chosen),s.find("ul.forminator-uploaded-files").html(""),c.$el.find("ul.forminator-uploaded-files").html(""),c.$el.find(".forminator-multifile-hidden").val(""),0<s.find(".forminator-select").length&&s.find(".forminator-select").each(function(t,e){var r=h(e).data("default-value");""===r&&(r=h(e).val()),h(e).val(r).trigger("fui:change")}),s.find(".multiselect-default-values").each(function(){var t=""!==h(this).val()?h.parseJSON(h(this).val()):[],r=Object.values(t);h(this).closest(".forminator-multiselect").find('input[type="checkbox"]').each(function(t,e){-1!==h.inArray(h(e).val(),r)?(h(e).prop("checked",!0),h(e).closest("label").addClass("forminator-is_checked")):(h(e).prop("checked",!1),h(e).closest("label").removeClass("forminator-is_checked"))})}),c.multi_upload_disable(s,!1),s.trigger("forminator:form:submit:success",l),s.trigger("forminator.front.condition.restart")),void 0!==t.data.url&&(void 0!==t.data.newtab&&"sametab"!==t.data.newtab?("newtab_hide"===t.data.newtab&&c.$el.hide(),p.open(c.decodeHtmlEntity(t.data.url),"_blank")):p.location.href=c.decodeHtmlEntity(t.data.url)),i&&(c.$el.find(".forminator-row").hide(),c.$el.find(".forminator-pagination-steps").hide(),c.$el.find(".forminator-pagination-footer").hide(),c.$el.find(".forminator-pagination-steps, .forminator-pagination-progress").hide()))},error:function(t){s.find("button").removeAttr("disabled"),f.html("");t=400===t.status?p.ForminatorFront.cform.upload_error:p.ForminatorFront.cform.error;f.html('<label class="forminator-label--notice"><span>'+t+"</span></label>"),c.focus_to_element(f),s.trigger("forminator:form:submit:failed",l),c.multi_upload_disable(s,!1)},complete:function(t,e){c.$el.find(".forminator-button-submit").removeClass("forminator-button-onload"),s.trigger("forminator:form:submit:complete",l)}}).always(function(){void 0!==c.settings.has_loader&&c.settings.has_loader&&(u.removeClass("forminator-fields-disabled forminator-partial-disabled"),f.removeClass("forminator-loading")),s.trigger("after:forminator:form:submit",l)})):(void 0!==c.settings.has_loader&&c.settings.has_loader&&(u.addClass("forminator-fields-disabled"),f.html("<p>"+c.settings.loader_label+"</p>"),f.removeAttr("aria-hidden").prop("tabindex","-1").removeClass("forminator-success forminator-error").addClass("forminator-loading forminator-show")),r.currentTarget.submit())}o=c.$el.find('div[data-is-payment="true"]').closest(".forminator-row").hasClass("forminator-hidden");return c.$el.data("forminatorFrontPayment")&&!o?c.$el.trigger("payment.before.submit.forminator",[l,function(){i.apply(e)}]):i.apply(e),!1})},processCaptcha:function(t,e,r){if(e.length){var n=(e=h(e.get(0))).data("size"),o=e.parent(".forminator-col");if(e.hasClass("forminator-g-recaptcha")){var i=e.data("forminator-recapchta-widget"),a=p.grecaptcha.getResponse(i);if("invisible"===n&&0===a.length)return p.grecaptcha.execute(i),!1;t.$el.hasClass("forminator_ajax")&&p.grecaptcha.reset(i)}else if(e.hasClass("forminator-hcaptcha")){i=e.data("forminator-hcaptcha-widget"),a=hcaptcha.getResponse(i);if("invisible"===n&&0===a.length)return hcaptcha.execute(i),!1;t.$el.hasClass("forminator_ajax")&&hcaptcha.reset(i)}if(r.html(""),e.hasClass("error")&&e.removeClass("error"),0===a.length)return e.hasClass("error")||e.addClass("error"),r.html('<label class="forminator-label--error"><span>'+p.ForminatorFront.cform.captcha_error+"</span></label>"),t.settings.inline_validation?o.hasClass("forminator-has_error")||"invisible"===e.data("size")||(o.addClass("forminator-has_error").append('<span class="forminator-error-message" aria-hidden="true">'+p.ForminatorFront.cform.captcha_error+"</span>"),t.focus_to_element(o)):t.focus_to_element(r),!1}},hideForm:function(t){t.css({height:0,opacity:0,overflow:"hidden",visibility:"hidden","pointer-events":"none",margin:0,padding:0,border:0})},showForm:function(t){t.css({height:"",opacity:"",overflow:"",visibility:"","pointer-events":"",margin:"",padding:"",border:""})},showQuiz:function(t){var e=h("#forminator-module-"+this.settings.quiz_id),r=h("#forminator-quiz-leads-"+this.settings.quiz_id);this.hideForm(t),r.find(".forminator-lead-form-skip").hide(),void 0!==this.settings.form_placement&&"beginning"===this.settings.form_placement&&(this.showForm(e),e.find(".forminator-pagination").length&&(r.find(".forminator-quiz-intro").hide(),e.prepend('<button class="forminator-button forminator-quiz-start forminator-hidden"></button>').find(".forminator-quiz-start").trigger("click").remove()))},handle_submit_quiz:function(t){var u=this,c=void 0!==u.settings.hasLeads&&u.settings.hasLeads,d=void 0!==u.settings.leads_id?u.settings.leads_id:0,m=void 0!==u.settings.quiz_id?u.settings.quiz_id:0;h("body").on("submit.frontSubmit",this.settings.forminator_selector,function(t){var e,r=h(this),n=new FormData(this),o=r.find(".forminator-answer"),i=u.$el.find(".forminator-button").last(),a=i.data("loading"),s=void 0!==u.settings.form_placement?u.settings.form_placement:"",l=void 0!==u.settings.skip_form?u.settings.skip_form:"";if(t.preventDefault(),t.stopPropagation(),u.$el.find(".forminator-has-been-disabled").removeAttr("disabled"),e=r.serialize(),u.$el.find(".forminator-has-been-disabled").attr("disabled","disabled"),c){t="";if(0<u.$el.find("input[name=entry_id]").length&&(t=u.$el.find("input[name=entry_id]").val()),"end"===s&&""===t)return u.showForm(h("#forminator-module-"+d)),u.$el.find(".forminator-quiz--result").addClass("forminator-hidden"),h("#forminator-quiz-leads-"+m+" .forminator-lead-form-skip").show(),!1;if(!l&&""===t)return!1}""!==a&&i.text(a),u.settings.has_quiz_loader&&o.each(function(){var t=h(this),e=t.find("input"),t=t.find(".forminator-answer--status");e.is(":checked")&&0===t.html().length&&t.html('<i class="forminator-icon-loader forminator-loading"></i>')});var f=!!u.$el.find(".forminator-pagination");return h.ajax({type:"POST",url:p.ForminatorFront.ajaxUrl,data:e,beforeSend:function(){f||u.$el.find("button").attr("disabled","disabled"),r.trigger("before:forminator:quiz:submit",[e,n])},success:function(c){var t;c.success?(t="",u.$el.find(".forminator-quiz--result").removeClass("forminator-hidden"),p.history.pushState("forminator","Forminator",c.data.result_url),"nowrong"===c.data.type?(t=c.data.result,u.$el.find(".forminator-quiz--result").html(t),f||u.$el.find(".forminator-answer input").attr("disabled","disabled")):"knowledge"===c.data.type&&(t=c.data.finalText,0<u.$el.find(".forminator-quiz--result").length&&u.$el.find(".forminator-quiz--result").html(t),Object.keys(c.data.result).forEach(function(t){var e,r=u.$el.find("#"+t),n=r.find(".forminator-question--result"),o=r.find(".forminator-submit-rightaway"),i=r.find(".forminator-answer input"),a=c.data.result[t].isCorrect?(e="forminator-is_correct",'<i class="forminator-icon-check"></i>'):(e="forminator-is_incorrect",'<i class="forminator-icon-cancel"></i>');if(n.text(c.data.result[t].message),n.addClass("forminator-show"),o.attr("disabled",!0),o.attr("aria-disabled",!0),i.attr("disabled",!0),i.attr("aria-disabled",!0),void 0===c.data.result[t].answer)for(var s,l=c.data.result[t].answers,f=0;f<l.length;f++)(s=r.find('[id|="'+l[f].id+'"]').closest(".forminator-answer")).addClass(e),(0===s.find(".forminator-answer--status").html().length||0!==s.find(".forminator-answer--status .forminator-icon-loader").length)&&s.find(".forminator-answer--status").html(a);else(s=r.find('[id|="'+c.data.result[t].answer+'"]').closest(".forminator-answer")).addClass(e),0!==s.find(".forminator-answer--status").html().length&&0===s.find(".forminator-answer--status .forminator-icon-loader").length||s.find(".forminator-answer--status").html(a)})),r.trigger("forminator:quiz:submit:success",[e,n,t])):(u.$el.find("button").removeAttr("disabled"),r.trigger("forminator:quiz:submit:failed",[e,n]))}}).always(function(){r.trigger("after:forminator:quiz:submit",[e,n])}),!1}),h("body").on("click","#forminator-quiz-leads-"+m+" .forminator-lead-form-skip",function(t){u.showQuiz(h("#forminator-module-"+d)),void 0!==u.settings.form_placement&&"end"===u.settings.form_placement&&(u.settings.form_placement="skip",u.$el.submit())}),h("body").on("click",".forminator-result--retake",function(t){var e={action:"forminator_reload_quiz",pageId:u.$el.find('input[name="page_id"]').val(),nonce:u.$el.find('input[name="forminator_nonce"]').val()};t.preventDefault(),h.post(p.ForminatorFront.ajaxUrl,e,function(t){1==t.success&&t.html&&p.location.replace(t.html)})})},handle_submit_poll:function(){var c=this,u=c.$el.html();c.$el.find(".forminator-response-message").not(":hidden").length&&c.focus_to_element(c.$el.find(".forminator-response-message"),!0),h("body").on("submit.frontSubmit",this.settings.forminator_selector,function(t){var r=h(this),n=new FormData(this),o=r.serialize(),i=c.$el.find(".forminator-response-message"),a=c.$el.find("fieldset"),s=c.$el.find(".forminator-button");function l(){i.html(""),i.removeClass("forminator-show"),i.removeClass("forminator-error"),i.removeClass("forminator-success"),i.removeAttr("tabindex"),i.attr("aria-hidden",!0),a.removeClass("forminator-has_error")}function f(t,e){i.html("<p>"+t+"</p>"),i.addClass("forminator-"+e),i.addClass("forminator-show"),i.removeAttr("aria-hidden"),i.attr("tabindex","-1"),i.focus(),"error"!==e||a.find('input[type="radio"]').is(":checked")||a.addClass("forminator-has_error")}return!c.$el.hasClass("forminator_ajax")||(l(),h.ajax({type:"POST",url:p.ForminatorFront.ajaxUrl,data:o,beforeSend:function(){s.addClass("forminator-onload"),r.trigger("before:forminator:poll:submit",[o,n])},success:function(t){var e=t.success?"success":"error";s.removeClass("forminator-onload"),!1===t.success?(f(t.data.message,e),r.trigger("forminator:poll:submit:failed",[o,n])):void 0!==t.data&&(e=t.data.success?"success":"error",f(t.data.message,e),setTimeout(function(){l()},2500)),!0===t.success&&(void 0!==t.data.url?p.location.href=t.data.url:void 0!==t.data.chart_data&&1<t.data.chart_data.length&&("link_on"===t.data.results_behav&&r.find(".forminator-note").length&&(r.find(".forminator-note").remove(),r.find(".forminator-poll-footer").append(t.data.results_link)),"show_after"===t.data.results_behav&&c.render_poll_chart(t.data.chart_data,t.data.back_button,c,u,[t.data.votes_text,t.data.votes_count,[t.data.grids_color,t.data.labels_color,t.data.onchart_label],[t.data.tooltips_bg,t.data.tooltips_color]])),r.trigger("forminator:poll:submit:success",[o,n]))},error:function(){l(),s.removeClass(".forminator-onload"),r.trigger("forminator:poll:submit:failed",[o,n])}}).always(function(){r.trigger("after:forminator:poll:submit",[o,n])}),!1)})},render_poll_chart:function(t,e,r,n,o){var i,a,s="forminator-chart-poll-"+(r.$el.attr("id")+"-"+r.$el.data("forminatorRender")),l=r.$el.find(".forminator-poll-body"),f=r.$el.find(".forminator-poll-footer");a=r.$el.find(".forminator-chart-wrapper"),i=r.$el.find(".forminator-chart"),a.remove(),i.remove(),a=h('<canvas id="'+s+'" class="forminator-chart" role="img" aria-hidden="true"></canvas>'),l.append(a),FUI.pollChart("#"+s,t,r.settings.chart_design,o),(i=l.find(".forminator-field")).hide(),i.attr("aria-hidden","true"),a=r.$el.find(".forminator-chart"),(s=r.$el.find(".forminator-chart-wrapper")).length?(a.addClass("forminator-show"),s.addClass("forminator-show"),s.removeAttr("aria-hidden"),s.attr("tabindex","-1"),s.focus()):(a.html("<p>Fallback text...</p>"),a.addClass("forminator-show"),a.removeAttr("aria-hidden"),a.attr("tabindex","-1"),a.focus()),t=h(e),f.empty(),f.append(t),r.$el.find(".forminator-button").click(function(t){r.$el.hasClass("forminator_ajax")?r.$el.html(n):location.reload(),t.preventDefault()})},focus_to_element:function(t,e,r,n){function o(t){t.attr("tabindex")||t.attr("tabindex",-1),t.hasClass("forminator-select2")||t.focus(),r&&t.show().delay(n).fadeOut("slow")}r=r||!1,n=n||0,e=e||!1,t.hasClass("forminator-textarea")||t.parent(".wp-editor-container").length?t.hasClass("forminator-textarea")&&t.parent(".wp-editor-container").length&&(t=t.parent(".wp-editor-container")):t.show(),e?o(t):h("html,body").animate({scrollTop:t.offset().top-(h(p).height()-t.outerHeight(!0))/2},500,function(){o(t)})},show_messages:function(t){var c,u=this,d=u.$el.data("forminatorFrontCondition");return void 0!==d&&(this.$el.find(".forminator-error-message").remove(),c=0,t.forEach(function(t){var e=Object.keys(t),e=d.get_form_field(e),r=h(e),n=r.closest(".forminator-field"),o=r.closest(".forminator-date-input"),i=r.closest(".forminator-timepicker"),a=!1,s=!1,l=!1,t=Object.values(t),f='<span class="forminator-error-message" aria-hidden="true"></span>';e.length&&(0===c&&(u.$el.trigger("forminator.front.pagination.focus.input",[e]),u.focus_to_element(e)),0<o.length?(s=(a=o.parent()).find('.forminator-error-message[data-error-field="'+r.data("field")+'"]'),l=a.find(".forminator-description"),f='<span class="forminator-error-message" data-error-field="'+r.data("field")+'" aria-hidden="true"></span>',0===s.length&&("day"===r.data("field")&&(a.find('.forminator-error-message[data-error-field="year"]').length?h(f).insertBefore(a.find('.forminator-error-message[data-error-field="year"]')):0===l.length?a.append(f):h(f).insertBefore(l),0===n.find(".forminator-error-message").length&&n.append('<span class="forminator-error-message" aria-hidden="true"></span>')),"month"===r.data("field")&&(a.find('.forminator-error-message[data-error-field="day"]').length?h(f).insertBefore(a.find('.forminator-error-message[data-error-field="day"]')):0===l.length?a.append(f):h(f).insertBefore(l),0===n.find(".forminator-error-message").length&&n.append('<span class="forminator-error-message" aria-hidden="true"></span>')),"year"===r.data("field")&&(0===l.length?a.append(f):h(f).insertBefore(l),0===n.find(".forminator-error-message").length&&n.append('<span class="forminator-error-message" aria-hidden="true"></span>'))),a.find('.forminator-error-message[data-error-field="'+r.data("field")+'"]').html(t),n.find(".forminator-error-message").html(t)):0<i.length&&0<t[0].length?(s=(a=i.parent()).find('.forminator-error-message[data-error-field="'+r.data("field")+'"]'),l=a.find(".forminator-description"),f='<span class="forminator-error-message" data-error-field="'+r.data("field")+'" aria-hidden="true"></span>',0===s.length&&("hours"===r.data("field")&&(a.find('.forminator-error-message[data-error-field="minutes"]').length?h(f).insertBefore(a.find('.forminator-error-message[data-error-field="minutes"]')):0===l.length?a.append(f):h(f).insertBefore(l),0===n.find(".forminator-error-message").length&&n.append('<span class="forminator-error-message" aria-hidden="true"></span>')),"minutes"===r.data("field")&&(0===l.length?a.append(f):h(f).insertBefore(l),0===n.find(".forminator-error-message").length&&n.append('<span class="forminator-error-message" aria-hidden="true"></span>'))),a.find('.forminator-error-message[data-error-field="'+r.data("field")+'"]').html(t),n.find(".forminator-error-message").html(t)):(s=n.find(".forminator-error-message"),l=n.find(".forminator-description"),0===s.length&&(0===l.length?n.append(f):h(f).insertBefore(l)),n.find(".forminator-error-message").html(t)),r.attr("aria-invalid","true"),n.addClass("forminator-has_error"),c++)})),this},multi_upload_disable:function(t,e){t.find(".forminator-multi-upload input").each(function(){"ajax"===h(this).data("method")&&h(this).attr("disabled",e)})}}),h.fn[r]=function(t){return this.each(function(){h.data(this,r)||h.data(this,r,new e(this,t))})}}(jQuery,window,document),function(h,p,o){"use strict";var r="forminatorFrontMultiFile",n={};function e(t,e){this.element=t,this.$el=h(this.element),this.form=h.extend({},n,e),this._defaults=n,this._name=r,this.form_id=0,this.uploader=this.$el,this.element=this.uploader.data("element"),this.init()}h.extend(e.prototype,{init:function(){var i=this,a=[],s=[];0<this.form.find("input[name=form_id]").length&&(this.form_id=this.form.find("input[name=form_id]").val()),this.uploader.on("drag dragstart dragend dragover dragenter dragleave drop",function(t){t.preventDefault(),t.stopPropagation()}),this.uploader.on("dragover dragenter",function(t){h(this).addClass("forminator-dragover")}),this.uploader.on("dragleave dragend drop",function(t){h(this).removeClass("forminator-dragover")}),this.uploader.find(".forminator-upload-file--forminator-field-"+this.element).on("click",function(t){i.form.find(".forminator-field-"+i.element+"-"+i.form_id).click()}),this.uploader.on("drop",function(t){o.querySelector(".forminator-field-"+i.element+"-"+i.form_id).files=t.originalEvent.dataTransfer.files,i.form.find(".forminator-field-"+i.element+"-"+i.form_id).change()}),this.uploader.on("click",function(t){t.target===t.currentTarget&&i.form.find(".forminator-field-"+i.element+"-"+i.form_id).click()}),this.uploader.find(".forminator-multi-upload-message, .forminator-multi-upload-message p, .forminator-multi-upload-message .forminator-icon-upload").on("click",function(t){t.target===t.currentTarget&&i.form.find(".forminator-field-"+i.element+"-"+i.form_id).click()}),this.form.on("forminator:form:submit:success",function(t){a=[]}),this.form.find(".forminator-field-"+i.element+"-"+i.form_id).on("change",function(t){var r,n,o;i.uploadingFile||(i.uploadingFile=1,r=h(this),n=this.files,o=[],h.when().then(function(){r.closest(".forminator-field").removeClass("forminator-has_error");for(var t=0;t<n.length;t++)o.push(n[t]),a.push(n[t]);s=i.handleChangeCallback(o,r,s);var e=Array.prototype.slice.call(a);0<e.length&&(n=i.FileObjectItem(e),"submission"===r.data("method")&&r.prop("files",n))}).done(function(){i.uploadingFile=null}))}),this.delete_files(a,s)},handleChangeCallback:function(s,l,f){var c=this,u=0,d=new FormData,t=this.form.find('input[name="forminator_nonce"]').val(),m=l.data("method");return d.append("action","forminator_multiple_file_upload"),d.append("form_id",this.form_id),d.append("element_id",c.element),d.append("nonce",t),h.each(s,function(t,n){var e,o=c.progress_bar(n,m),r=c.form.find(".upload-container-"+c.element+" li").length,i=void 0!==l.data("filetype")?l.data("filetype"):"",i=new RegExp("(.*?).("+i+")$"),a=n.name.toLowerCase();return void 0!==l.data("size")&&l.data("size")<=n.size?(e=l.data("size-message"),void c.upload_fail_response(o,e)):i.test(a)?void("ajax"===m?(d.delete(c.element),d.delete("totalFiles"),d.append("totalFiles",r),d.append(c.element,n),f.push(h.ajax({xhr:function(){var t=new p.XMLHttpRequest;return t.upload.addEventListener("progress",function(t){t.lengthComputable&&(t=t.loaded/t.total*100)<90&&c.form.find("#"+o+" .progress-percentage").html(Math.round(t)+"% of ")},!1),t},type:"POST",url:p.ForminatorFront.ajaxUrl,data:d,cache:!1,contentType:!1,processData:!1,beforeSend:function(){c.form.find(".forminator-button-submit").attr("disabled",!0),c.$el.trigger("before:forminator:multiple:upload",d)},success:function(t){var e=c.element,r={success:t.success,message:"undefined"!==t.data.message?t.data.message:"",file_id:o,file_name:void 0!==t.data.file_url?t.data.file_url.replace(/^.*[\\\/]/,""):n.name,mime_type:n.type};c.add_upload_file(e,r),!0===t.success&&!0===t.data.success&&void 0!==t.data?(c.upload_success_response(o),c.$el.trigger("success:forminator:multiple:upload",d)):(c.upload_fail_response(o,t.data.message),void 0!==t.data.error_type&&"limit"===t.data.error_type&&c.form.find("#"+o).addClass("forminator-upload-limit_error"),c.$el.trigger("fail:forminator:multiple:upload",d))},complete:function(t,e){u++,s.length===u&&c.form.find(".forminator-button-submit").attr("disabled",!1),c.$el.trigger("complete:forminator:multiple:upload",d)},error:function(t){c.upload_fail_response(o,p.ForminatorFront.cform.process_error)}}))):(i=!0,e=p.ForminatorFront.cform.process_error,void 0!==l.data("limit")&&l.data("limit")<r&&(i=!1,c.form.find("#"+o).addClass("forminator-upload-limit_error"),e=l.data("limit-message")),i?c.upload_success_response(o):c.upload_fail_response(o,e))):(e="."+a.split(".").pop()+" "+l.data("filetype-message"),void c.upload_fail_response(o,e))}),f},upload_fail_response:function(t,e){this.form.find("#"+t).addClass("forminator-has_error"),this.form.find("#"+t).find('.forminator-uploaded-file--size [class*="forminator-icon-"]').addClass("forminator-icon-warning").removeClass("forminator-icon-loader").removeClass("forminator-loading"),this.form.find("#"+t+" .progress-percentage").html("0% of "),this.form.find("#"+t+" .forminator-uploaded-file--content").after('<div class="forminator-error-message">'+e+"</div>")},upload_success_response:function(t){this.form.find("#"+t+" .progress-percentage").html("100% of "),this.form.find("#"+t+' .forminator-uploaded-file--size [class*="forminator-icon-"]').remove(),this.form.find("#"+t+" .progress-percentage").remove()},progress_bar:function(t,e){var r="upload-process-"+Math.random().toString(36).substr(2,7),n=t.name,o=this.bytes_to_size(t.size,2),i=this.uploader.closest(".forminator-field").find(".forminator-uploaded-files"),a="";this.progress_image_preview(t,r);var t='<div class="forminator-uploaded-file--preview" aria-hidden="true"><span class="forminator-icon-file" aria-hidden="true"></span></div>',s='<p class="forminator-uploaded-file--title">'+n+"</p>",a=(a=(a=(a=(a=a+('<li id="'+r+'" class="forminator-uploaded-file">')+'<div class="forminator-uploaded-file--content">')+(t=!function(t){switch((t=(t=t).split("."))[t.length-1].toLowerCase()){case"jpg":case"jpe":case"jpeg":case"png":case"gif":case"ico":return 1}}(n)?t:'<div class="forminator-uploaded-file--image" aria-hidden="true"><div class="forminator-img-preview" role="image"></div></div>')+'<div class="forminator-uploaded-file--text">')+s+('<p class="forminator-uploaded-file--size"><span class="forminator-icon-loader forminator-loading" aria-hidden="true"></span><span class="progress-percentage">29% of </span>'+o+"</p>"))+"</div>"+('<button type="button" class="forminator-uploaded-file--delete forminator-button-delete" data-method="'+e+'" data-element="'+this.element+'" data-value="'+r+'"><span class="forminator-icon-close" aria-hidden="true"></span><span class="forminator-screen-reader-only">Delete uploaded file</span></button>'))+"</div>"+"</li>";return i.hasClass(".forminator-has-files")||i.addClass("forminator-has-files"),i.append(a),r},bytes_to_size:function(t,e){if(0===t)return"0 Bytes";var e=e<0?0:e,r=Math.floor(Math.log(t)/Math.log(1024));return parseFloat((t/Math.pow(1024,r)).toFixed(e))+" "+["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][r]},progress_image_preview:function(t,e){var r;t&&((r=new FileReader).onload=function(t){h("#"+e+" .forminator-img-preview").css("background-image","url("+t.target.result+")")},r.readAsDataURL(t))},get_uplaoded_files:function(){var t=this.form.find(".forminator-multifile-hidden").val();return t=void 0===t||""===t?{}:h.parseJSON(t)},get_uplaoded_file:function(t){var e=this.get_uplaoded_files();return void 0===e[t]&&(e[t]=[]),e[t]},add_upload_file:function(t,e){var r=this.get_uplaoded_file(t);r.unshift(e),this.set_upload_file(t,r)},set_upload_file:function(t,e){var r=this.get_uplaoded_files(),n=this.form.find(".forminator-multifile-hidden");r[t]=e,n.val(JSON.stringify(r))},get_uploaded_file_id:function(t,r){var n=null,t=this.get_uplaoded_file(t);return h.each(t,function(t,e){r===e.file_id&&(n=t)}),n},delete_files:function(l,f){var c=this;h(o).on("click",".forminator-uploaded-file--delete",function(t){t.preventDefault();var e,r,n,t=h(this),o=t.data("value"),i=t.data("method"),a=t.data("element"),s=(void 0!==o&&void 0!==a&&void 0!==i&&(e=c.form.find("#"+o).index(),t=h(t).closest("li#"+o),r=c.get_uplaoded_files(),n=c.form.find(".forminator-multifile-hidden"),r&&"ajax"===i&&(void 0!==f[e]&&(f[e].abort(),f.splice(e,1)),void 0!==n&&(""!==(o=c.get_uploaded_file_id(a,o))&&null!==o&&r[a].splice(o,1),n.val(JSON.stringify(r)))),void 0!==i&&"submission"===i&&c.remove_object(e,l,a),h(t).remove()),c.form.find(".forminator-field-"+c.element+"-"+c.form_id)),o=c.form.find(".upload-container-"+a+" li");void 0!==s.data("limit")&&(h.each(o,function(t){s.data("limit")>t&&h(this).hasClass("forminator-upload-limit_error")&&(t=h(this).attr("id"),t=c.get_uploaded_file_id(a,t),h(this).removeClass("forminator-has_error"),h(this).find(".forminator-error-message, .forminator-icon-warning, .progress-percentage").remove(),""!==t&&null!==t&&void 0!==r[a][t]&&(r[a][t].success=!0))}),n.val(JSON.stringify(r))),0===o.length&&s.val("")})},remove_object:function(t,e,r){var n,r=o.querySelector(".forminator-field-"+r+"-"+this.form_id);void 0!==r&&0<(n=r.files).length&&(n=Array.prototype.slice.call(n),e.splice(t,1),n.splice(t,1),r.files=this.FileObjectItem(n))},FileObjectItem:function(t){for(var e,r=e=(t=(t=[].slice.call(Array.isArray(t)?t:arguments)).reverse()).length,n=!0;r--&&n;)n=t[r]instanceof File;if(!n)throw new TypeError("expected argument to FileList is File or array of File objects");for(r=new ClipboardEvent("").clipboardData||new DataTransfer;e--;)r.items.add(t[e]);return r.files}}),h.fn[r]=function(t){return this.each(function(){h.data(this,r)||h.data(this,r,new e(this,t))})}}(jQuery,window,document);
1
+ !function n(o,i,a){function s(e,t){if(!i[e]){if(!o[e]){var r="function"==typeof require&&require;if(!t&&r)return r(e,!0);if(l)return l(e,!0);throw(t=new Error("Cannot find module '"+e+"'")).code="MODULE_NOT_FOUND",t}r=i[e]={exports:{}},o[e][0].call(r.exports,function(t){return s(o[e][1][t]||t)},r,r.exports,n,o,i,a)}return i[e].exports}for(var l="function"==typeof require&&require,t=0;t<a.length;t++)s(a[t]);return s}({1:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o=n(t("./parser/front.calculator.parser.tokenizer")),i=n(t("./symbol/front.calculator.symbol.loader")),a=n(t("./parser/front.calculator.parser")),s=n(t("./symbol/front.calculator.symbol.number")),l=n(t("./symbol/abstract/front.calculator.symbol.constant.abstract")),f=n(t("./parser/node/front.calculator.parser.node.symbol")),c=n(t("./symbol/abstract/front.calculator.symbol.operator.abstract")),u=n(t("./symbol/front.calculator.symbol.separator")),m=n(t("./parser/node/front.calculator.parser.node.function")),d=n(t("./parser/node/front.calculator.parser.node.container"));function n(t){return t&&t.__esModule?t:{default:t}}function h(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var p=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.term=t,this.tokenizer=new o.default(this.term),this.symbolLoader=new i.default,this.parser=new a.default(this.symbolLoader)}var t,r,n;return t=e,(r=[{key:"parse",value:function(){this.tokenizer.input=this.term,this.tokenizer.reset();var t=this.tokenizer.tokenize();if(0===t.length)throw"Error: Empty token of calculator term.";t=this.parser.parse(t);if(t.isEmpty())throw"Error: Empty nodes of calculator tokens.";return t}},{key:"calculate",value:function(){var t=this.parse();return!1===t?0:this.calculateNode(t)}},{key:"calculateNode",value:function(t){if(t instanceof f.default)return this.calculateSymbolNode(t);if(t instanceof m.default)return this.calculateFunctionNode(t);if(t instanceof d.default)return this.calculateContainerNode(t);throw'Error: Cannot calculate node of unknown type "'+t.constructor.name+'"'}},{key:"calculateContainerNode",value:function(t){if(t instanceof m.default)throw"Error: Expected container node but got a function node";for(var e=0,r=t.childNodes,n=this.detectCalculationOrder(r),o=0;o<n.length;o++){for(var i=n[o].node,a=n[o].index,s=null,l=null,f=0;f!==a;)void 0===r[f]||(s=r[f],l=f),f++;for(f++;void 0===r[f];)f++;var c=r[f],u=f,c=isNaN(c)?this.calculateNode(c):c,d=i.symbol;i.isUnaryOperator?(e=d.operate(null,c),delete r[u],r[a]=e):null!==l&&null!==s&&(i=isNaN(s)?this.calculateNode(s):s,e=d.operate(i,c),delete r[l],delete r[u],r[a]=e)}if(0===(r=r.filter(function(t){return void 0!==t})).length)throw"Error: Missing calculable subterm. Are there empty brackets?";if(1<r.length)throw"Error: Missing operators between parts of the term.";return e=r.pop(),isNaN(e)?this.calculateNode(e):e}},{key:"calculateFunctionNode",value:function(t){for(var e=t.childNodes,r=[],n=[],o=null,i=0;i<e.length;i++){var a=e[i];a instanceof f.default&&a.symbol instanceof u.default?(o=new d.default(n),r.push(this.calculateNode(o)),n=[]):n.push(a)}return 0<n.length&&(o=new d.default(n),r.push(this.calculateNode(o))),t.symbolNode.symbol.execute(r)}},{key:"calculateSymbolNode",value:function(t){var e=t.symbol,r=0;if(e instanceof s.default)r=t.token.value,r=Number(r);else{if(!(e instanceof l.default))throw'Error: Found symbol of unexpected type "'+e.constructor.name+'", expected number or constant';r=e.value}return r}},{key:"detectCalculationOrder",value:function(t){for(var e=[],r=0;r<t.length;r++){var n=t[r];n instanceof f.default&&n.symbol instanceof c.default&&e.push({index:r,node:n})}return e.sort(function(t,e){var t=t.node,e=e.node,r=t.symbol,n=2,o=(t.isUnaryOperator&&(n=3),e.symbol),i=2;return n===(i=e.isUnaryOperator?3:i)&&(n=r.precedence,i=o.precedence),n===i?t.token.position<e.token.position?-1:1:n<i?1:-1}),e}}])&&h(t.prototype,r),n&&h(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();r.default=p,void 0===window.forminatorCalculator&&(window.forminatorCalculator=function(t){return new p(t)})},{"./parser/front.calculator.parser":2,"./parser/front.calculator.parser.tokenizer":4,"./parser/node/front.calculator.parser.node.container":6,"./parser/node/front.calculator.parser.node.function":7,"./parser/node/front.calculator.parser.node.symbol":8,"./symbol/abstract/front.calculator.symbol.constant.abstract":10,"./symbol/abstract/front.calculator.symbol.operator.abstract":12,"./symbol/front.calculator.symbol.loader":16,"./symbol/front.calculator.symbol.number":17,"./symbol/front.calculator.symbol.separator":18}],2:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var f=n(t("./front.calculator.parser.token")),c=n(t("../symbol/front.calculator.symbol.number")),u=n(t("../symbol/brackets/front.calculator.symbol.opening.bracket")),d=n(t("../symbol/brackets/front.calculator.symbol.closing.bracket")),m=n(t("../symbol/abstract/front.calculator.symbol.function.abstract")),a=n(t("../symbol/abstract/front.calculator.symbol.operator.abstract")),s=n(t("../symbol/front.calculator.symbol.separator")),h=n(t("./node/front.calculator.parser.node.symbol")),l=n(t("./node/front.calculator.parser.node.container")),p=n(t("./node/front.calculator.parser.node.function"));function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}t=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.symbolLoader=t}var t,r,n;return t=e,(r=[{key:"parse",value:function(t){t=this.detectSymbols(t),t=this.createTreeByBrackets(t),t=this.transformTreeByFunctions(t);return this.checkGrammar(t),new l.default(t)}},{key:"detectSymbols",value:function(t){for(var e=[],r=null,n=null,o=!1,i=0,a=0;a<t.length;a++){var s=t[a],l=s.type;if(f.default.TYPE_WORD===l){if(n=s.value,null===(r=this.symbolLoader.find(n)))throw"Error: Detected unknown or invalid string identifier: "+n+"."}else if(l===f.default.TYPE_NUMBER){l=this.symbolLoader.findSubTypes(c.default);if(l.length<1||!(l instanceof Array))throw"Error: Unavailable number symbol processor.";r=l[0]}else{if(n=s.value,null===(r=this.symbolLoader.find(n)))throw"Error: Detected unknown or invalid string identifier: "+n+".";if(r instanceof u.default&&i++,r instanceof d.default&&--i<0)throw"Error: Found closing bracket that does not have an opening bracket."}if(o){if(!(r instanceof u.default))throw"Error: Expected opening bracket (after a function) but got something else.";o=!1}else r instanceof m.default&&(o=!0);l=new h.default(s,r);e.push(l)}if(o)throw"Error: Expected opening bracket (after a function) but reached the end of the term";if(0<i)throw"Error: There is at least one opening bracket that does not have a closing bracket";return e}},{key:"createTreeByBrackets",value:function(t){for(var e=[],r=[],n=0,o=0;o<t.length;o++){var i,a=t[o];if(!(a instanceof h.default))throw'Error: Expected symbol node, but got "'+a.constructor.name+'"';a.symbol instanceof u.default?1<++n&&r.push(a):a.symbol instanceof d.default?0===--n?(i=this.createTreeByBrackets(r),e.push(new l.default(i)),r=[]):r.push(a):(0===n?e:r).push(a)}return e}},{key:"transformTreeByFunctions",value:function(t){for(var e=[],r=null,n=0;n<t.length;n++){var o=t[n];if(o instanceof l.default){var i,a=this.transformTreeByFunctions(o.childNodes);null!==r?(i=new p.default(a,r),e.push(i),r=null):(o.childNodes=a,e.push(o))}else{if(!(o instanceof h.default))throw'Error: Expected array node or symbol node, got "'+o.constructor.name+'"';o.symbol instanceof m.default?r=o:e.push(o)}}return e}},{key:"checkGrammar",value:function(t){for(var e=0;e<t.length;e++){var r=t[e];if(r instanceof h.default){var n=r.symbol;if(n instanceof a.default){if(e+1>=t.length)throw"Error: Found operator that does not stand before an operand.";var o=e-1,i=null;if(null===(i=0<=o&&(i=t[o])instanceof h.default&&(i.symbol instanceof a.default||i.symbol instanceof s.default)?null:i)){if(!n.operatesUnary)throw"Error: Found operator in unary notation that is not unary.";r.setIsUnaryOperator(!0)}else if(!n.operatesBinary)throw console.log(n),"Error: Found operator in binary notation that is not binary."}}else this.checkGrammar(r.childNodes)}}}])&&o(t.prototype,r),n&&o(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();r.default=t},{"../symbol/abstract/front.calculator.symbol.function.abstract":11,"../symbol/abstract/front.calculator.symbol.operator.abstract":12,"../symbol/brackets/front.calculator.symbol.closing.bracket":13,"../symbol/brackets/front.calculator.symbol.opening.bracket":14,"../symbol/front.calculator.symbol.number":17,"../symbol/front.calculator.symbol.separator":18,"./front.calculator.parser.token":3,"./node/front.calculator.parser.node.container":6,"./node/front.calculator.parser.node.function":7,"./node/front.calculator.parser.node.symbol":8}],3:[function(t,e,r){"use strict";function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=function(){function n(t,e,r){if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");this.type=t,this.value=e,this.position=r}var t,e,r;return t=n,r=[{key:"TYPE_WORD",get:function(){return 1}},{key:"TYPE_CHAR",get:function(){return 2}},{key:"TYPE_NUMBER",get:function(){return 3}}],(e=null)&&o(t.prototype,e),r&&o(t,r),Object.defineProperty(t,"prototype",{writable:!1}),n}();r.default=n},{}],4:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o=(t=t("./front.calculator.parser.token"))&&t.__esModule?t:{default:t};function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}t=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.input=t,this.currentPosition=0}var t,r,n;return t=e,(r=[{key:"tokenize",value:function(){this.reset();for(var t=[],e=this.readToken();e;)t.push(e),e=this.readToken();return t}},{key:"readToken",value:function(){this.stepOverWhitespace();var t=this.readCurrent();if(null===t)return null;var e=null,r=null,r=this.isLetter(t)?(e=this.readWord(),o.default.TYPE_WORD):this.isDigit(t)||this.isPeriod(t)?(e=this.readNumber(),o.default.TYPE_NUMBER):(e=this.readChar(),o.default.TYPE_CHAR);return new o.default(r,e,this.currentPosition)}},{key:"isLetter",value:function(t){if(null===t)return!1;t=t.charCodeAt(0);return 65<=t&&t<=90||97<=t&&t<=122}},{key:"isDigit",value:function(t){if(null===t)return!1;t=t.charCodeAt(0);return 48<=t&&t<=57}},{key:"isPeriod",value:function(t){return"."===t}},{key:"isWhitespace",value:function(t){return 0<=[" ","\t","\n"].indexOf(t)}},{key:"stepOverWhitespace",value:function(){for(;this.isWhitespace(this.readCurrent());)this.readNext()}},{key:"readWord",value:function(){for(var t="",e=this.readCurrent();null!==e&&this.isLetter(e);)t+=e,e=this.readNext();return t}},{key:"readNumber",value:function(){for(var t="",e=!1,r=this.readCurrent();null!==r&&(this.isPeriod(r)||this.isDigit(r));){if(this.isPeriod(r)){if(e)throw"Error: A number cannot have more than one period";e=!0}t+=r,r=this.readNext()}return t}},{key:"readChar",value:function(){var t=this.readCurrent();return this.readNext(),t}},{key:"readCurrent",value:function(){var t=null;return t=this.hasCurrent()?this.input[this.currentPosition]:t}},{key:"readNext",value:function(){return this.currentPosition++,this.readCurrent()}},{key:"hasCurrent",value:function(){return this.currentPosition<this.input.length}},{key:"reset",value:function(){this.currentPosition=0}}])&&i(t.prototype,r),n&&i(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();r.default=t},{"./front.calculator.parser.token":3}],5:[function(t,e,r){"use strict";function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0,r.default=o(function t(){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function")})},{}],6:[function(t,e,r){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var i=(t=t("./front.calculator.parser.node.abstract"))&&t.__esModule?t:{default:t};function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(r){var n=function(){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(t){return!1}}();return function(){var t,e=f(r),e=(t=n?(t=f(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(t){var e=o;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&&s(e,t);var r,n=l(o);function o(t){var e;if(this instanceof o)return(e=n.call(this)).childNodes=null,e.setChildNodes(t),e;throw new TypeError("Cannot call a class as a function")}return e=o,(t=[{key:"setChildNodes",value:function(t){t.forEach(function(t){if(!(t instanceof i.default))throw"Expected AbstractNode, but got "+t.constructor.name}),this.childNodes=t}},{key:"size",value:function(){try{return this.childNodes.length}catch(t){return 0}}},{key:"isEmpty",value:function(){return!this.size()}}])&&a(e.prototype,t),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(i.default);r.default=t},{"./front.calculator.parser.node.abstract":5}],7:[function(t,e,r){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(r){var n=function(){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(t){return!1}}();return function(){var t,e=i(r),e=(t=n?(t=i(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function i(t){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;t=function(t){var e=i;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&&s(e,t);var r,n,o=l(i);function i(t,e){if(this instanceof i)return(t=o.call(this,t)).symbolNode=e,t;throw new TypeError("Cannot call a class as a function")}return e=i,r&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(((t=t("./front.calculator.parser.node.container"))&&t.__esModule?t:{default:t}).default);r.default=t},{"./front.calculator.parser.node.container":6}],8:[function(t,e,r){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var i=n(t("../../symbol/abstract/front.calculator.symbol.operator.abstract"));function n(t){return t&&t.__esModule?t:{default:t}}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(r){var n=function(){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(t){return!1}}();return function(){var t,e=f(r),e=(t=n?(t=f(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}t=function(t){var e=o;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&&s(e,t);var r,n=l(o);function o(t,e){var r;if(this instanceof o)return(r=n.call(this)).token=t,r.symbol=e,r.isUnaryOperator=!1,r;throw new TypeError("Cannot call a class as a function")}return e=o,(t=[{key:"setIsUnaryOperator",value:function(t){if(!(this.symbol instanceof i.default))throw"Error: Cannot mark node as unary operator, because symbol is not an operator but of type "+this.symbol.constructor.name;this.isUnaryOperator=t}}])&&a(e.prototype,t),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(n(t("./front.calculator.parser.node.abstract")).default);r.default=t},{"../../symbol/abstract/front.calculator.symbol.operator.abstract":12,"./front.calculator.parser.node.abstract":5}],9:[function(t,e,r){"use strict";function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=function(){function t(){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this.identifiers=[]}var e,r,n;return e=t,(r=[{key:"getIdentifiers",value:function(){var e=[];return this.identifiers.forEach(function(t){e.push(t.toLowerCase())}),e}}])&&o(e.prototype,r),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();r.default=n},{}],10:[function(t,e,r){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(r){var n=function(){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(t){return!1}}();return function(){var t,e=i(r),e=(t=n?(t=i(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function i(t){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;t=function(t){var e=i;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&&s(e,t);var r,n,o=l(i);function i(){var t;if(this instanceof i)return(t=o.call(this)).value=0,t;throw new TypeError("Cannot call a class as a function")}return e=i,r&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(((t=t("./front.calculator.symbol.abstract"))&&t.__esModule?t:{default:t}).default);r.default=t},{"./front.calculator.symbol.abstract":9}],11:[function(t,e,r){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(r){var n=function(){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(t){return!1}}();return function(){var t,e=l(r),e=(t=n?(t=l(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;t=function(t){var e=o;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&&a(e,t);var r,n=s(o);function o(){if(this instanceof o)return n.call(this);throw new TypeError("Cannot call a class as a function")}return e=o,(t=[{key:"execute",value:function(t){return 0}}])&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(((t=t("./front.calculator.symbol.abstract"))&&t.__esModule?t:{default:t}).default);r.default=t},{"./front.calculator.symbol.abstract":9}],12:[function(t,e,r){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(r){var n=function(){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(t){return!1}}();return function(){var t,e=l(r),e=(t=n?(t=l(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;t=function(t){var e=o;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&&a(e,t);var r,n=s(o);function o(){var t;if(this instanceof o)return(t=n.call(this)).precedence=0,t.operatesUnary=!1,t.operatesBinary=!0,t;throw new TypeError("Cannot call a class as a function")}return e=o,(t=[{key:"operate",value:function(t,e){return 0}}])&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(((t=t("./front.calculator.symbol.abstract"))&&t.__esModule?t:{default:t}).default);r.default=t},{"./front.calculator.symbol.abstract":9}],13:[function(t,e,r){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(r){var n=function(){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(t){return!1}}();return function(){var t,e=i(r),e=(t=n?(t=i(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function i(t){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;t=function(t){var e=i;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&&s(e,t);var r,n,o=l(i);function i(){var t;if(this instanceof i)return(t=o.call(this)).identifiers=[")"],t;throw new TypeError("Cannot call a class as a function")}return e=i,r&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(((t=t("../abstract/front.calculator.symbol.abstract"))&&t.__esModule?t:{default:t}).default);r.default=t},{"../abstract/front.calculator.symbol.abstract":9}],14:[function(t,e,r){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(r){var n=function(){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(t){return!1}}();return function(){var t,e=i(r),e=(t=n?(t=i(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function i(t){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;t=function(t){var e=i;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&&s(e,t);var r,n,o=l(i);function i(){var t;if(this instanceof i)return(t=o.call(this)).identifiers=["("],t;throw new TypeError("Cannot call a class as a function")}return e=i,r&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(((t=t("../abstract/front.calculator.symbol.abstract"))&&t.__esModule?t:{default:t}).default);r.default=t},{"../abstract/front.calculator.symbol.abstract":9}],15:[function(t,e,r){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(r){var n=function(){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(t){return!1}}();return function(){var t,e=i(r),e=(t=n?(t=i(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function i(t){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;t=function(t){var e=i;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&&s(e,t);var r,n,o=l(i);function i(){var t;if(this instanceof i)return(t=o.call(this)).identifiers=["pi"],t.value=Math.PI,t;throw new TypeError("Cannot call a class as a function")}return e=i,r&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(((t=t("../abstract/front.calculator.symbol.constant.abstract"))&&t.__esModule?t:{default:t}).default);r.default=t},{"../abstract/front.calculator.symbol.constant.abstract":10}],16:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o=n(t("./front.calculator.symbol.number")),i=n(t("./front.calculator.symbol.separator")),a=n(t("./brackets/front.calculator.symbol.opening.bracket")),s=n(t("./brackets/front.calculator.symbol.closing.bracket")),l=n(t("./constants/front.calculator.symbol.constant.pi")),f=n(t("./operators/front.calculator.symbol.operator.addition")),c=n(t("./operators/front.calculator.symbol.operator.division")),u=n(t("./operators/front.calculator.symbol.operator.exponentiation")),d=n(t("./operators/front.calculator.symbol.operator.modulo")),m=n(t("./operators/front.calculator.symbol.operator.multiplication")),h=n(t("./operators/front.calculator.symbol.operator.subtraction")),p=n(t("./functions/front.calculator.symbol.function.abs")),b=n(t("./functions/front.calculator.symbol.function.avg")),y=n(t("./functions/front.calculator.symbol.function.ceil")),_=n(t("./functions/front.calculator.symbol.function.floor")),g=n(t("./functions/front.calculator.symbol.function.max")),v=n(t("./functions/front.calculator.symbol.function.min")),w=n(t("./functions/front.calculator.symbol.function.round"));function n(t){return t&&t.__esModule?t:{default:t}}function O(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}t=function(){function t(){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function");this.symbols={FrontCalculatorSymbolNumber:new o.default,FrontCalculatorSymbolSeparator:new i.default,FrontCalculatorSymbolOpeningBracket:new a.default,FrontCalculatorSymbolClosingBracket:new s.default,FrontCalculatorSymbolConstantPi:new l.default,FrontCalculatorSymbolOperatorAddition:new f.default,FrontCalculatorSymbolOperatorDivision:new c.default,FrontCalculatorSymbolOperatorExponentiation:new u.default,FrontCalculatorSymbolOperatorModulo:new d.default,FrontCalculatorSymbolOperatorMultiplication:new m.default,FrontCalculatorSymbolOperatorSubtraction:new h.default,FrontCalculatorSymbolFunctionAbs:new p.default,FrontCalculatorSymbolFunctionAvg:new b.default,FrontCalculatorSymbolFunctionCeil:new y.default,FrontCalculatorSymbolFunctionFloor:new _.default,FrontCalculatorSymbolFunctionMax:new g.default,FrontCalculatorSymbolFunctionMin:new v.default,FrontCalculatorSymbolFunctionRound:new w.default}}var e,r,n;return e=t,(r=[{key:"find",value:function(t){for(var e in t=t.toLowerCase(),this.symbols)if(this.symbols.hasOwnProperty(e)){e=this.symbols[e];if(0<=e.getIdentifiers().indexOf(t))return e}return null}},{key:"findSubTypes",value:function(t){var e,r,n=[];for(e in this.symbols)!this.symbols.hasOwnProperty(e)||(r=this.symbols[e])instanceof t&&n.push(r);return n}}])&&O(e.prototype,r),n&&O(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();r.default=t},{"./brackets/front.calculator.symbol.closing.bracket":13,"./brackets/front.calculator.symbol.opening.bracket":14,"./constants/front.calculator.symbol.constant.pi":15,"./front.calculator.symbol.number":17,"./front.calculator.symbol.separator":18,"./functions/front.calculator.symbol.function.abs":19,"./functions/front.calculator.symbol.function.avg":20,"./functions/front.calculator.symbol.function.ceil":21,"./functions/front.calculator.symbol.function.floor":22,"./functions/front.calculator.symbol.function.max":23,"./functions/front.calculator.symbol.function.min":24,"./functions/front.calculator.symbol.function.round":25,"./operators/front.calculator.symbol.operator.addition":26,"./operators/front.calculator.symbol.operator.division":27,"./operators/front.calculator.symbol.operator.exponentiation":28,"./operators/front.calculator.symbol.operator.modulo":29,"./operators/front.calculator.symbol.operator.multiplication":30,"./operators/front.calculator.symbol.operator.subtraction":31}],17:[function(t,e,r){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(r){var n=function(){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(t){return!1}}();return function(){var t,e=i(r),e=(t=n?(t=i(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function i(t){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;t=function(t){var e=i;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&&s(e,t);var r,n,o=l(i);function i(){if(this instanceof i)return o.call(this);throw new TypeError("Cannot call a class as a function")}return e=i,r&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(((t=t("./abstract/front.calculator.symbol.abstract"))&&t.__esModule?t:{default:t}).default);r.default=t},{"./abstract/front.calculator.symbol.abstract":9}],18:[function(t,e,r){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(r){var n=function(){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(t){return!1}}();return function(){var t,e=i(r),e=(t=n?(t=i(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function i(t){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;t=function(t){var e=i;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&&s(e,t);var r,n,o=l(i);function i(){var t;if(this instanceof i)return(t=o.call(this)).identifiers=[","],t;throw new TypeError("Cannot call a class as a function")}return e=i,r&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(((t=t("./abstract/front.calculator.symbol.abstract"))&&t.__esModule?t:{default:t}).default);r.default=t},{"./abstract/front.calculator.symbol.abstract":9}],19:[function(t,e,r){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(r){var n=function(){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(t){return!1}}();return function(){var t,e=l(r),e=(t=n?(t=l(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;t=function(t){var e=o;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&&a(e,t);var r,n=s(o);function o(){var t;if(this instanceof o)return(t=n.call(this)).identifiers=["abs"],t;throw new TypeError("Cannot call a class as a function")}return e=o,(t=[{key:"execute",value:function(t){if(1!==t.length)throw"Error: Expected one argument, got "+t.length;t=t[0];return Math.abs(t)}}])&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(((t=t("../abstract/front.calculator.symbol.function.abstract"))&&t.__esModule?t:{default:t}).default);r.default=t},{"../abstract/front.calculator.symbol.function.abstract":11}],20:[function(t,e,r){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(r){var n=function(){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(t){return!1}}();return function(){var t,e=l(r),e=(t=n?(t=l(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;t=function(t){var e=o;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&&a(e,t);var r,n=s(o);function o(){var t;if(this instanceof o)return(t=n.call(this)).identifiers=["avg"],t;throw new TypeError("Cannot call a class as a function")}return e=o,(t=[{key:"execute",value:function(t){if(t.length<1)throw"Error: Expected at least one argument, got "+t.length;for(var e=0,r=0;r<t.length;r++)e+=t[r];return e/t.length}}])&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(((t=t("../abstract/front.calculator.symbol.function.abstract"))&&t.__esModule?t:{default:t}).default);r.default=t},{"../abstract/front.calculator.symbol.function.abstract":11}],21:[function(t,e,r){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(r){var n=function(){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(t){return!1}}();return function(){var t,e=l(r),e=(t=n?(t=l(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;t=function(t){var e=o;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&&a(e,t);var r,n=s(o);function o(){var t;if(this instanceof o)return(t=n.call(this)).identifiers=["ceil"],t;throw new TypeError("Cannot call a class as a function")}return e=o,(t=[{key:"execute",value:function(t){if(1!==t.length)throw"Error: Expected one argument, got "+t.length;return Math.ceil(t[0])}}])&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(((t=t("../abstract/front.calculator.symbol.function.abstract"))&&t.__esModule?t:{default:t}).default);r.default=t},{"../abstract/front.calculator.symbol.function.abstract":11}],22:[function(t,e,r){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(r){var n=function(){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(t){return!1}}();return function(){var t,e=l(r),e=(t=n?(t=l(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;t=function(t){var e=o;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&&a(e,t);var r,n=s(o);function o(){var t;if(this instanceof o)return(t=n.call(this)).identifiers=["floor"],t;throw new TypeError("Cannot call a class as a function")}return e=o,(t=[{key:"execute",value:function(t){if(1!==t.length)throw"Error: Expected one argument, got "+t.length;return Math.floor(t[0])}}])&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(((t=t("../abstract/front.calculator.symbol.function.abstract"))&&t.__esModule?t:{default:t}).default);r.default=t},{"../abstract/front.calculator.symbol.function.abstract":11}],23:[function(t,e,r){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t){return function(t){if(Array.isArray(t))return n(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Map"===(r="Object"===r&&t.constructor?t.constructor.name:r)||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(r){var n=function(){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(t){return!1}}();return function(){var t,e=f(r),e=(t=n?(t=f(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;t=function(t){var e=o;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&&s(e,t);var r,n=l(o);function o(){var t;if(this instanceof o)return(t=n.call(this)).identifiers=["max"],t;throw new TypeError("Cannot call a class as a function")}return e=o,(t=[{key:"execute",value:function(t){if(t.length<1)throw"Error: Expected at least one argument, got "+t.length;return Math.max.apply(Math,i(t))}}])&&a(e.prototype,t),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(((t=t("../abstract/front.calculator.symbol.function.abstract"))&&t.__esModule?t:{default:t}).default);r.default=t},{"../abstract/front.calculator.symbol.function.abstract":11}],24:[function(t,e,r){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t){return function(t){if(Array.isArray(t))return n(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Map"===(r="Object"===r&&t.constructor?t.constructor.name:r)||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(r){var n=function(){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(t){return!1}}();return function(){var t,e=f(r),e=(t=n?(t=f(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;t=function(t){var e=o;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&&s(e,t);var r,n=l(o);function o(){var t;if(this instanceof o)return(t=n.call(this)).identifiers=["min"],t;throw new TypeError("Cannot call a class as a function")}return e=o,(t=[{key:"execute",value:function(t){if(t.length<1)throw"Error: Expected at least one argument, got "+t.length;return Math.min.apply(Math,i(t))}}])&&a(e.prototype,t),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(((t=t("../abstract/front.calculator.symbol.function.abstract"))&&t.__esModule?t:{default:t}).default);r.default=t},{"../abstract/front.calculator.symbol.function.abstract":11}],25:[function(t,e,r){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(r){var n=function(){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(t){return!1}}();return function(){var t,e=l(r),e=(t=n?(t=l(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;t=function(t){var e=o;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&&a(e,t);var r,n=s(o);function o(){var t;if(this instanceof o)return(t=n.call(this)).identifiers=["round"],t;throw new TypeError("Cannot call a class as a function")}return e=o,(t=[{key:"execute",value:function(t){if(1!==t.length)throw"Error: Expected one argument, got "+t.length;return Math.round(t[0])}}])&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(((t=t("../abstract/front.calculator.symbol.function.abstract"))&&t.__esModule?t:{default:t}).default);r.default=t},{"../abstract/front.calculator.symbol.function.abstract":11}],26:[function(t,e,r){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(r){var n=function(){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(t){return!1}}();return function(){var t,e=l(r),e=(t=n?(t=l(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;t=function(t){var e=o;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&&a(e,t);var r,n=s(o);function o(){var t;if(this instanceof o)return(t=n.call(this)).identifiers=["+"],t.precedence=100,t;throw new TypeError("Cannot call a class as a function")}return e=o,(t=[{key:"operate",value:function(t,e){return t+e}}])&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(((t=t("../abstract/front.calculator.symbol.operator.abstract"))&&t.__esModule?t:{default:t}).default);r.default=t},{"../abstract/front.calculator.symbol.operator.abstract":12}],27:[function(t,e,r){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(r){var n=function(){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(t){return!1}}();return function(){var t,e=l(r),e=(t=n?(t=l(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;t=function(t){var e=o;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&&a(e,t);var r,n=s(o);function o(){var t;if(this instanceof o)return(t=n.call(this)).identifiers=["/"],t.precedence=200,t;throw new TypeError("Cannot call a class as a function")}return e=o,(t=[{key:"operate",value:function(t,e){return t/e}}])&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(((t=t("../abstract/front.calculator.symbol.operator.abstract"))&&t.__esModule?t:{default:t}).default);r.default=t},{"../abstract/front.calculator.symbol.operator.abstract":12}],28:[function(t,e,r){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(r){var n=function(){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(t){return!1}}();return function(){var t,e=l(r),e=(t=n?(t=l(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;t=function(t){var e=o;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&&a(e,t);var r,n=s(o);function o(){var t;if(this instanceof o)return(t=n.call(this)).identifiers=["^"],t.precedence=300,t;throw new TypeError("Cannot call a class as a function")}return e=o,(t=[{key:"operate",value:function(t,e){return Math.pow(t,e)}}])&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(((t=t("../abstract/front.calculator.symbol.operator.abstract"))&&t.__esModule?t:{default:t}).default);r.default=t},{"../abstract/front.calculator.symbol.operator.abstract":12}],29:[function(t,e,r){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(r){var n=function(){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(t){return!1}}();return function(){var t,e=l(r),e=(t=n?(t=l(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;t=function(t){var e=o;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&&a(e,t);var r,n=s(o);function o(){var t;if(this instanceof o)return(t=n.call(this)).identifiers=["%"],t.precedence=200,t;throw new TypeError("Cannot call a class as a function")}return e=o,(t=[{key:"operate",value:function(t,e){return t%e}}])&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(((t=t("../abstract/front.calculator.symbol.operator.abstract"))&&t.__esModule?t:{default:t}).default);r.default=t},{"../abstract/front.calculator.symbol.operator.abstract":12}],30:[function(t,e,r){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(r){var n=function(){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(t){return!1}}();return function(){var t,e=l(r),e=(t=n?(t=l(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;t=function(t){var e=o;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&&a(e,t);var r,n=s(o);function o(){var t;if(this instanceof o)return(t=n.call(this)).identifiers=["*"],t.precedence=200,t;throw new TypeError("Cannot call a class as a function")}return e=o,(t=[{key:"operate",value:function(t,e){return t*e}}])&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(((t=t("../abstract/front.calculator.symbol.operator.abstract"))&&t.__esModule?t:{default:t}).default);r.default=t},{"../abstract/front.calculator.symbol.operator.abstract":12}],31:[function(t,e,r){"use strict";function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(r){var n=function(){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(t){return!1}}();return function(){var t,e=l(r),e=(t=n?(t=l(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;t=function(t){var e=o;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&&a(e,t);var r,n=s(o);function o(){var t;if(this instanceof o)return(t=n.call(this)).identifiers=["-"],t.precedence=100,t.operatesUnary=!0,t;throw new TypeError("Cannot call a class as a function")}return e=o,(t=[{key:"operate",value:function(t,e){return t-e}}])&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(((t=t("../abstract/front.calculator.symbol.operator.abstract"))&&t.__esModule?t:{default:t}).default);r.default=t},{"../abstract/front.calculator.symbol.operator.abstract":12}]},{},[1]),[].includes||(Array.prototype.includes=function(t,e){"use strict";var r=Object(this),n=parseInt(r.length)||0;if(0===n)return!1;var o,e=parseInt(e)||0;for(0<=e?o=e:(o=n+e)<0&&(o=0);o<n;){var i=r[o];if(t===i||t!=t&&i!=i)return!0;o++}return!1}),function(l,f,a){"use strict";var r="forminatorLoader",n={action:"",type:"",id:"",render_id:"",is_preview:"",preview_data:[],nonce:!1,last_submit_data:{},extra:{}};function e(t,e){this.element=t,this.$el=l(this.element),this.settings=l.extend({},n,e),this._defaults=n,this._name=r,this.frontInitCalled=!1,this.scriptsQue=[],this.frontOptions=null,this.leadFrontOptions=null,this.init()}l.extend(e.prototype,{init:function(){var t=decodeURI(a.location.search).replace(/(^\?)/,"").split("&").map(function(t){return this[(t=t.split("="))[0]]=t[1],this}.bind({}))[0];t.action=this.settings.action,t.type=this.settings.type,t.id=this.settings.id,t.render_id=this.settings.render_id,t.is_preview=this.settings.is_preview,t.preview_data=JSON.stringify(this.settings.preview_data),t.last_submit_data=this.settings.last_submit_data,t.extra=this.settings.extra,t.nonce=this.settings.nonce,void 0!==this.settings.has_lead&&(t.has_lead=this.settings.has_lead,t.leads_id=this.settings.leads_id),this.load_ajax(t)},load_ajax:function(o){var i=this;l.ajax({type:"POST",url:f.ForminatorFront.ajaxUrl,data:o,cache:!1,beforeSend:function(){l(a).trigger("before.load.forminator",o.id)},success:function(t){if(t.success){var e=t.data;if(l(a).trigger("response.success.load.forminator",o.id,t),!e.is_ajax_load)return!1;var r,n=[];(n=void 0===e.pagination_config&&void 0!==e.options.pagination_config?e.options.pagination_config:n)&&(f.Forminator_Cform_Paginations=f.Forminator_Cform_Paginations||[],f.Forminator_Cform_Paginations[o.id]=n),i.frontOptions=e.options||null,void 0===f.Forminator_Cform_Paginations&&i.frontOptions.pagination_config&&(f.Forminator_Cform_Paginations=f.Forminator_Cform_Paginations||[],f.Forminator_Cform_Paginations[o.id]=i.frontOptions.pagination_config),void 0!==e.lead_options&&(i.leadFrontOptions=e.lead_options||null,void 0===f.Forminator_Cform_Paginations&&i.leadFrontOptions.pagination_config&&(f.Forminator_Cform_Paginations=f.Forminator_Cform_Paginations||[],f.Forminator_Cform_Paginations[o.leads_id]=i.leadFrontOptions.pagination_config)),e.html&&(n=e.style||null,r=e.script||null,i.render_html(e.html,n,r)),e.styles&&i.maybe_append_styles(e.styles),e.scripts&&i.maybe_append_scripts(e.scripts),!e.scripts&&i.frontOptions&&i.init_front()}else l(a).trigger("response.error.load.forminator",o.id,t)},error:function(){l(a).trigger("request.error.load.forminator",o.id)}}).always(function(){l(a).trigger("after.load.forminator",o.id)})},render_html:function(t,e,r){var n=this.settings.id,o=this.settings.render_id,i="",a=null;(a=this.$el.find(".forminator-response-message")).length&&(i=a.get(0).outerHTML),(a=this.$el.find(".forminator-poll-response-message")).length&&(i=a.get(0).outerHTML),this.$el.parent().hasClass("forminator-guttenberg")?this.$el.parent().html(t):this.$el.replaceWith(t),i&&(l("#forminator-module-"+n+"[data-forminator-render="+o+"] .forminator-response-message").replaceWith(i),l("#forminator-module-"+n+"[data-forminator-render="+o+"] .forminator-poll-response-message").replaceWith(i)),e&&(l("style#forminator-module-"+n).length&&l("style#forminator-module-"+n).remove(),l("body").append(e)),r&&l("body").append(r)},maybe_append_styles:function(t){for(var e in t){var r;t.hasOwnProperty(e)&&!l("link#"+e).length&&((r=l("<link>")).attr("rel","stylesheet"),r.attr("id",e),r.attr("type","text/css"),r.attr("media","all"),r.attr("href",t[e].src),l("head").append(r))}},maybe_append_scripts:function(t){var e,r=[],n=l("body").find(".hustle-ui").length,o=l("body").find("script[src^='https://www.paypal.com/sdk/js']").attr("src");for(e in t)if(t.hasOwnProperty(e)){var i=t[e].on,a=t[e].load;if("window"===i){if(f[a]&&"forminator-google-recaptcha"!==e&&0===n)continue}else if("$"===i&&l.fn[a])continue;i={};i.src=t[e].src,i.src!==o&&(r.push(i),this.scriptsQue.push(e))}if(this.scriptsQue.length)for(var s in r)r.hasOwnProperty(s)&&this.load_script(r[s]);else this.init_front()},load_script:function(t){var e=this,r=a.createElement("script"),n=a.getElementsByTagName("body")[0];r.type="text/javascript",r.src=t.src,r.async=!0,r.defer=!0,r.onload=function(){e.script_on_load()},0===l('script[src="'+r.src+'"]').length?n.appendChild(r):e.script_on_load()},script_on_load:function(){this.scriptsQue.pop(),this.scriptsQue.length||this.init_front()},init_front:function(){var t,e,r,n;this.frontInitCalled||(this.frontInitCalled=!0,n=this.settings.id,t=this.settings.render_id,e=this.frontOptions||null,r=this.leadFrontOptions||null,e&&l("#forminator-module-"+n+'[data-forminator-render="'+t+'"]').forminatorFront(e),void 0!==this.settings.has_lead&&r&&(n=this.settings.leads_id,l("#forminator-module-"+n+'[data-forminator-render="'+t+'"]').forminatorFront(r)),this.init_window_vars())},init_window_vars:function(){var t;"undefined"!=typeof ForminatorValidationErrors&&void 0!==(t=jQuery(ForminatorValidationErrors.selector).data("forminatorFrontSubmit"))&&t.show_messages(ForminatorValidationErrors.errors),"undefined"!=typeof ForminatorFormHider&&void 0!==(t=jQuery(ForminatorFormHider.selector).data("forminatorFront"))&&t.hide()}}),l.fn[r]=function(t){return this.each(function(){l.data(this,r)||l.data(this,r,new e(this,t))})}}(jQuery,window,document),function(l,o,n){"use strict";var r="forminatorFront",i={form_type:"custom-form",rules:{},messages:{},conditions:{},inline_validation:!1,print_value:!1,chart_design:"bar",chart_options:{},forminator_fields:[],max_nested_formula:5,general_messages:{calculation_error:"Failed to calculate field.",payment_require_ssl_error:"SSL required to submit this form, please check your URL.",payment_require_amount_error:"PayPal amount must be greater than 0.",form_has_error:"Please correct the errors before submission."},payment_require_ssl:!1};function e(t,e){this.element=t,this.$el=l(this.element),this.forminator_selector="#"+l(this.element).attr("id")+'[data-forminator-render="'+l(this.element).data("forminator-render")+'"]',this.forminator_loader_selector='div[data-forminator-render="'+l(this.element).data("forminator-render")+'"][data-form="'+l(this.element).attr("id")+'"]',this.settings=l.extend({},i,e),void 0!==this.settings.messages&&(this.settings.messages=this.maybeParseStringToJson(this.settings.messages,"object")),void 0!==this.settings.rules&&(this.settings.rules=this.maybeParseStringToJson(this.settings.rules,"object")),void 0!==this.settings.calendar&&(this.settings.calendar=this.maybeParseStringToJson(this.settings.calendar,"array")),this._defaults=i,this._name=r,this.form_id=0,this.template_type="",this.init()}function t(){l(".forminator-custom-form").find(".forminator-label").on("click",function(t){t.preventDefault();t=l(this);t.next("#"+t.attr("for")).focus()})}l.extend(e.prototype,{init:function(){var t=this;switch(0<this.$el.find('input[name="form_id"]').length&&(this.form_id=this.$el.find('input[name="form_id"]').val()),0<this.$el.find('input[name="form_type"]').length&&(this.template_type=this.$el.find('input[name="form_type"]').val()),l(this.forminator_loader_selector).remove(),0===this.$el.closest(".wph-modal").length&&this.$el.show(),l(n).on("hustle:module:displayed",function(t,e){l(".wph-modal-active").find("form").css("display","")}),setTimeout(function(){l(".wph-modal-active").find("form").css("display","")},10),this.settings.form_type){case"custom-form":l(this.element).each(function(){t.init_custom_form(this)});break;case"poll":this.init_poll_form();break;case"quiz":this.init_quiz_form()}var e={form_type:t.settings.form_type,forminator_selector:t.forminator_selector,chart_design:t.settings.chart_design,chart_options:t.settings.chart_options,has_quiz_loader:t.settings.has_quiz_loader,has_loader:t.settings.has_loader,loader_label:t.settings.loader_label,resetEnabled:t.settings.is_reset_enabled,inline_validation:t.settings.inline_validation};"leads"!==this.template_type&&"quiz"!==this.settings.form_type||(e.form_placement=t.settings.form_placement,e.hasLeads=t.settings.hasLeads,e.leads_id=t.settings.leads_id,e.quiz_id=t.settings.quiz_id,e.skip_form=t.settings.skip_form),l(this.element).forminatorFrontSubmit(e),this.activate_field(),this.small_form()},init_custom_form:function(t){var e,r=this;this.init_intlTelInput_validation(t),this.settings.inline_validation&&l(t).forminatorFrontValidate({rules:r.settings.rules,messages:r.settings.messages}),l(t).forminatorFrontCalculate({forminatorFields:r.settings.forminator_fields,maxExpand:r.settings.max_nested_formula,generalMessages:r.settings.general_messages,memoizeTime:r.settings.calcs_memoize_time||300}),l(t).forminatorFrontMergeTags({forminatorFields:r.settings.forminator_fields,print_value:r.settings.print_value}),this.init_pagination(t),l(t).find('div[data-is-payment="true"], input[data-is-payment="true"]').first();r.settings.has_stripe&&(e=l(this.element).find(".forminator-stripe-element").first(),this.renderStripe(r,e)),r.settings.has_paypal&&l(this.element).forminatorFrontPayPal({type:"paypal",paymentEl:this.settings.paypal_config,paymentRequireSsl:r.settings.payment_require_ssl,generalMessages:r.settings.general_messages,has_loader:r.settings.has_loader,loader_label:r.settings.loader_label}),l(t).forminatorFrontCondition(this.settings.conditions,this.settings.calendar),this.init_fui(t),l(t).find(".forminator-datepicker").forminatorFrontDatePicker(this.settings.calendar),this.responsive_captcha(t),this.field_counter(t),this.field_number(t),this.field_time(),l(t).find(".forminator-multi-upload").forminatorFrontMultiFile(this.$el),this.upload_field(t),this.init_login_2FA(),r.maybeRemoveDuplicateFields(t),l(o).on("resize",function(){r.responsive_captcha(t)}),l(o).on("load",function(){r.maybeRemoveDuplicateFields(t)}),void 0!==r.settings.hasLeads&&("beginning"===r.settings.form_placement&&l("#forminator-module-"+this.settings.quiz_id).css({height:0,opacity:0,overflow:"hidden",visibility:"hidden","pointer-events":"none",margin:0,padding:0,border:0}),"end"===r.settings.form_placement&&l(t).css({height:0,opacity:0,overflow:"hidden",visibility:"hidden","pointer-events":"none",margin:0,padding:0,border:0}))},init_poll_form:function(){var o=this,i=this.$el.find("fieldset"),t=this.$el.find(".forminator-radio input"),a=this.$el.find(".forminator-input"),s=a.closest(".forminator-field");FUI.inputStates(a),t.on("click",function(){s.addClass("forminator-hidden"),s.attr("aria-hidden","true"),a.removeAttr("tabindex"),a.attr("name","");var t,e=this.checked,r=l(this).attr("id"),n=l(this).attr("name");return i.removeClass("forminator-has_error"),o.$el.find(".forminator-input#"+r+"-extra").length&&(t=(r=o.$el.find(".forminator-input#"+r+"-extra")).closest(".forminator-field"),e?(r.attr("name",n+"-extra"),t.removeClass("forminator-hidden"),t.removeAttr("aria-hidden"),r.attr("tabindex","-1"),r.focus()):(t.addClass("forminator-hidden"),t.attr("aria-hidden","true"),r.removeAttr("tabindex"))),!0}),this.$el.hasClass("forminator-poll-disabled")&&this.$el.find(".forminator-radio").each(function(){l(this).addClass("forminator-disabled"),l(this).find("input").attr("disabled",!0)})},init_quiz_form:function(){var a=this,t=void 0!==a.settings.form_placement?a.settings.form_placement:"",e=void 0!==a.settings.quiz_id?a.settings.quiz_id:0;this.$el.find(".forminator-button:not(.forminator-quiz-start)").each(function(){l(this).prop("disabled",!0)}),this.$el.find(".forminator-answer input").each(function(){l(this).attr("checked",!1)}),this.$el.find(".forminator-result--info button").on("click",function(){location.reload()}),l("#forminator-quiz-leads-"+e+" .forminator-quiz-intro .forminator-quiz-start").on("click",function(t){t.preventDefault(),l(this).closest(".forminator-quiz-intro").hide(),a.$el.prepend('<button class="forminator-button forminator-quiz-start forminator-hidden"></button>').find(".forminator-quiz-start").trigger("click").remove()}),this.$el.on("click",".forminator-quiz-start",function(t){t.preventDefault(),a.$el.find(".forminator-quiz-intro").hide(),a.$el.find(".forminator-pagination").removeClass("forminator-hidden");t={totalSteps:a.$el.find(".forminator-pagination").length-1,step:0,quiz:!0};a.settings.text_next&&(t.next_button=a.settings.text_next),a.settings.text_prev&&(t.prev_button=a.settings.text_prev),l(a.element).forminatorFrontPagination(t)}),"end"!==t&&this.$el.find(".forminator-submit-rightaway").on("click",function(){a.$el.submit(),l(this).closest(".forminator-question").find(".forminator-submit-rightaway").addClass("forminator-has-been-disabled").attr("disabled","disabled")}),a.settings.hasLeads&&("beginning"===t&&a.$el.css({height:0,opacity:0,overflow:"hidden",visibility:"hidden","pointer-events":"none",margin:0,padding:0,border:0}),"end"===t&&(a.$el.closest("div").find("#forminator-module-"+a.settings.leads_id).css({height:0,opacity:0,overflow:"hidden",visibility:"hidden","pointer-events":"none",margin:0,padding:0,border:0}),l("#forminator-quiz-leads-"+e+" .forminator-lead-form-skip").hide())),this.$el.on("click",".forminator-social--icon a",function(t){t.preventDefault();var t=l(this).data("social"),e=l(this).closest(".forminator-social--icons").data("url"),r=l(this).closest(".forminator-social--icons").data("message"),e={facebook:"https://www.facebook.com/sharer/sharer.php?u="+e+"&quote="+(r=encodeURIComponent(r)),twitter:"https://twitter.com/intent/tweet?&url="+e+"&text="+r,google:"https://plus.google.com/share?url="+e,linkedin:"https://www.linkedin.com/shareArticle?mini=true&url="+e+"&title="+r};if(void 0!==e[t])return r=o.open(e[t],t,"height="+l(o).height()+",width="+l(o).width()),o.focus&&r.focus(),!1}),this.$el.on("change",".forminator-answer input",function(t){var e=!!l(this).closest(".forminator-pagination").length,r=e?l(this).closest(".forminator-pagination"):a.$el,n=r.find(".forminator-answer input:checked").length,o=r.find(".forminator-question").length,r=l(this).closest(".forminator-question"),i=r.data("multichoice");a.$el.find(".forminator-button:not(.forminator-button-back)").each(function(){var t=n<o;l(this).prop("disabled",t),e&&(t?l(this).addClass("forminator-disabled"):l(this).removeClass("forminator-disabled"))}),this.checked&&!1===i&&r.find(".forminator-answer").not(l(this).parent(".forminator-answer")).each(function(t,e){l(e).find("> input").prop("checked",!1)})})},small_form:function(){var t,e=l(this.element),r=e.width();783<Math.max(n.documentElement.clientWidth,o.innerWidth||0)&&(e.hasClass("forminator-size--small")?480<r&&e.removeClass("forminator-size--small"):(t=e.closest(".hustle-content"),e.is(":visible")&&r<=480&&!t.length&&e.addClass("forminator-size--small")))},init_intlTelInput_validation:function(t){var t=l(t),n=t.is(".forminator-design--material");t.find(".forminator-field--phone").each(function(){var t=l(this).data("national_mode"),e=l(this).data("country"),r=l(this).data("validation");void 0!==t&&(t={nationalMode:"enabled"===t,initialCountry:void 0!==e?e:"us",utilsScript:o.ForminatorFront.cform.intlTelInput_utils_script},void 0!==r&&"standard"===r&&(t.allowDropdown=!1),l(this).intlTelInput(t),n?(l(this).closest(".forminator-field").find("div.iti").addClass("forminator-input-with-phone"),l(this).closest(".forminator-field").find("div.iti").hasClass("iti--allow-dropdown")&&l(this).closest(".forminator-field").find(".forminator-label").addClass("iti--allow-dropdown")):l(this).closest(".forminator-field").find("div.iti").addClass("forminator-phone"))})},init_fui:function(t){var t=l(t),e=t.find(".forminator-input"),r=t.find(".forminator-textarea"),n=t.find(".forminator-select2"),o=t.find(".forminator-multiselect"),i=t.find(".forminator-stripe-element");t.attr("data-design"),t.attr("data-design"),t.attr("data-design"),t.attr("data-design");e.length&&e.each(function(){FUI.inputStates(this)}),r.length&&r.each(function(){FUI.textareaStates(this)}),FUI.select2(n.length),o.length&&FUI.multiSelectStates(o),t.hasClass("forminator-design--material")&&(e.length&&e.each(function(){FUI.inputMaterial(this)}),r.length&&r.each(function(){FUI.textareaMaterial(this)}),i.length&&i.each(function(){var t=l(this).closest(".forminator-field"),e=t.find(".forminator-label");e.length&&(t.addClass("forminator-stripe-floating"),e.addClass("forminator-floating--input"))}))},responsive_captcha:function(t){l(t).find(".forminator-g-recaptcha").each(function(){var t=l(this).data("badge");l(this).is(":visible")&&"inline"===t&&(t=(t=l(this).parent().width())<302?t/302:1,l(this).css("transform","scale("+t+")"),l(this).css("-webkit-transform","scale("+t+")"),l(this).css("transform-origin","0 0"),l(this).css("-webkit-transform-origin","0 0"))})},init_pagination:function(t){var t=l(t).find(".forminator-pagination").length,e=o.location.hash,r=!1,n=0;0<t&&(void 0!==e&&0<=e.indexOf("step-")&&(r=!0,n=e.substr(6,8)),l(this.element).forminatorFrontPagination({totalSteps:t,hashStep:r,step:n,inline_validation:this.settings.inline_validation}))},activate_field:function(){var t=l(this.element),e=t.find(".forminator-input"),r=t.find(".forminator-textarea");function n(t){var r=l(t),n=r.val().trim(),o=r.closest(".forminator-field"),i=r.attr("data-field"),a=r.closest(".forminator-timepicker").parent(),s=o.find(".forminator-error-message");r.on("load change keyup keydown",function(t){var e;void 0!==i&&!1!==i?("hours"===r.data("field")&&(e=a.find('.forminator-error-message[data-error-field="hours"]'),""!==n&&0!==e.length&&e.remove()),"minutes"===r.data("field")&&(e=a.find('.forminator-error-message[data-error-field="minutes"]'),""!==n&&0!==e.length&&e.remove())):""!==n&&s.text()&&(s.remove(),o.removeClass("forminator-has_error")),t.stopPropagation()})}function o(){t.find(".select2-container").hasClass("select2-container--open")?setTimeout(o,300):t.find(".select2-container").closest(".forminator-field").removeClass("forminator-is_active")}e.length&&e.each(function(){n(this)}),r.length&&r.each(function(){n(this)}),t.find("select.forminator-select2 + .forminator-select").each(function(){var e=l(this);e.on("mouseover",function(t){t.stopPropagation(),l(this).closest(".forminator-field").addClass("forminator-is_hover")}).on("mouseout",function(t){t.stopPropagation(),l(this).closest(".forminator-field").removeClass("forminator-is_hover")}),e.on("click",function(t){t.stopPropagation(),o(),e.hasClass("select2-container--open")?l(this).closest(".forminator-field").addClass("forminator-is_active"):l(this).closest(".forminator-field").removeClass("forminator-is_active")})})},field_counter:function(t){var t=l(t),e=t.find(".forminator-button-submit");t.find(".forminator-input, .forminator-textarea").each(function(){var t=l(this),r=0;t.on("keydown",function(t){if(!l(this).hasClass("forminator-textarea")&&13===t.keyCode)return t.preventDefault(),e.is(":visible")&&e.trigger("click"),!1}),t.on("change keyup keydown",function(t){t.stopPropagation();var e=l(this).closest(".forminator-col").find(".forminator-description span");e.length&&e.data("limit")&&("words"!==e.data("type")?r=l(l(this).val()).text().length:(r=l(this).val().trim().split(/\s+/).length,l(this).val().trim().split(/\s+/).length>=e.data("limit")&&32===t.which&&t.preventDefault()),e.html(r+" / "+e.data("limit")))})})},field_number:function(t){t=l(t);t.find("input[type=number]").each(function(){l(this).keypress(function(t){for(var e=[44,45,46],r=t.which,n=48;n<58;n++)e.push(n);0<=e.indexOf(r)||t.preventDefault()})}),t.find(".forminator-number--field, .forminator-currency, .forminator-calculation").each(function(){var e;"number"===l(this).attr("type")&&(e=l(this).data("decimals"),l(this).change(function(t){this.value=parseFloat(this.value).toFixed(e)})),l(this).inputmask({alias:"decimal",rightAlign:!1,digitsOptional:!1,showMaskOnHover:!1,autoUnmask:!0,removeMaskOnSubmit:!0})})},field_time:function(){l(".forminator-input-time").on("input",function(t){var e=l(this),r=e.val();r&&2<=r.length&&e.val(r.substr(0,2))})},init_login_2FA:function(){var e=this;this.two_factor_providers("totp"),l("body").on("click",".forminator-2fa-link",function(){e.$el.find("#login_error").remove(),e.$el.find(".notification").empty();var t=l(this).data("slug");e.two_factor_providers(t),"fallback-email"===t&&e.resend_code()}),this.$el.find(".wpdef-2fa-email-resend input").on("click",function(){e.resend_code()})},two_factor_providers:function(t){var e=this;e.$el.find(".forminator-authentication-box").hide(),e.$el.find(".forminator-authentication-box input").attr("disabled",!0),e.$el.find("#forminator-2fa-"+t).show(),e.$el.find("#forminator-2fa-"+t+" input").attr("disabled",!1),0<e.$el.find(".forminator-2fa-link").length&&(e.$el.find(".forminator-2fa-link").hide(),e.$el.find(".forminator-2fa-link:not(#forminator-2fa-link-"+t+")").each(function(){e.$el.find(".forminator-auth-method").val(t),l(this).find("input").attr("disabled",!1),l(this).show()}))},resend_code:function(){var e=l('input[name="button_resend_code"]'),t=l(".forminator-auth-token"),t={action:"forminator_2fa_fallback_email",data:JSON.stringify({token:t})};l.ajax({type:"POST",url:o.ForminatorFront.ajaxUrl,data:t,beforeSend:function(){e.attr("disabled","disabled"),l(".def-ajaxloader").show()},success:function(t){e.removeAttr("disabled"),l(".def-ajaxloader").hide(),l(".notification").text(t.data.message)}})},material_field:function(){},toggle_file_input:function(){l(this.element).find(".forminator-file-upload").each(function(){var t=l(this),e=t.find("input"),t=t.find(".forminator-button-delete");""!==e.val()?t.show():t.hide()})},upload_field:function(t){var r=this,e=l(t);this.toggle_file_input(),e.find(".forminator-button-delete").on("click",function(t){t.preventDefault();var t=l(this),e=t.siblings("input"),r=t.closest(".forminator-file-upload").find("> span");e.val(""),r.html(r.data("empty-text")),t.hide()}),e.find(".forminator-input-file, .forminator-input-file-required").on("change",function(){var t=l(this).closest(".forminator-file-upload").find("> span"),e=l(this).val(),e=e.length?e.split("\\").pop():"";t.text(e),r.toggle_file_input()}),e.find(".forminator-button-upload").on("click",function(t){t.preventDefault();t=l(this).attr("data-id");e.find("input#"+t).trigger("click")}),e.find(".forminator-input-file, .forminator-input-file-required").on("change",function(t){t.preventDefault();var t=l(this)[0].files.length,e=l(this).find(".forminator-button-delete");0===t?e.hide():e.show()})},maybeRemoveDuplicateFields:function(t){var e,r,t=l(t);l(n).find("link[id='neira-lite-style-css']").length&&(e=t.find(".forminator-select-container").next(".chosen-container"),r=t.find("select.forminator-select2 + .forminator-select").next(".chosen-container"),t=t.find(".forminator-select").next(".chosen-container"),0!==e.length&&e.remove(),0!==r.length&&r.remove(),0!==t.length&&t.remove())},renderCaptcha:function(t){var e,r,n=this;void 0===l(t).data("forminator-recapchta-widget")&&(r=l(t).data("size"),e={sitekey:l(t).data("sitekey"),theme:l(t).data("theme"),size:r},"invisible"===r?(e.badge=l(t).data("badge"),e.callback=function(t){l(n.element).trigger("submit.frontSubmit")}):e.callback=function(){l(t).parent(".forminator-col").removeClass("forminator-has_error").remove(".forminator-error-message")},""!==e.sitekey&&(r=o.grecaptcha.render(t,e),l(t).data("forminator-recapchta-widget",r),this.addCaptchaAria(t),this.responsive_captcha()))},renderHcaptcha:function(t){var e,r,n=this;void 0===l(t).data("forminator-hcaptcha-widget")&&(r=l(t).data("size"),(e={sitekey:l(t).data("sitekey"),theme:l(t).data("theme"),size:r}).callback="invisible"===r?function(t){l(n.element).trigger("submit.frontSubmit")}:function(){l(t).parent(".forminator-col").removeClass("forminator-has_error").remove(".forminator-error-message")},""!==e.sitekey&&(r=hcaptcha.render(t,e),l(t).data("forminator-hcaptcha-widget",r)))},addCaptchaAria:function(t){var e=l(t).find(".g-recaptcha-response"),t=l(t).find(">div");0!==e.length&&(e.attr("aria-hidden","true"),e.attr("aria-label","do not use"),e.attr("aria-readonly","true")),0!==t.length&&t.css("z-index",99)},hide:function(){this.$el.hide()},maybeParseStringToJson:function(t,e){var r={};if("object"==typeof t)return t;if("object"===e)t="{"+t.trim()+"}";else{if("array"!==e)return{};t="["+t.trim()+"]"}try{t=t.replace(/\,(?!\s*?[\{\[\"\'\w])/g,""),r=JSON.parse(t)}catch(t){console.error(t.message),"object"===e?r={}:"array"===e&&(r=[])}return r},renderStripe:function(t,e,r=0){var n=this;setTimeout(function(){r++,"undefined"!=typeof Stripe?l(t.element).forminatorFrontPayment({type:"stripe",paymentEl:e,paymentRequireSsl:t.settings.payment_require_ssl,generalMessages:t.settings.general_messages,has_loader:t.settings.has_loader,loader_label:t.settings.loader_label}):r<300?n.renderStripe(t,e,r):console.error("Failed to load Stripe.")},100)}}),l.fn[r]=function(t){return this.each(function(){l.data(this,r)||l.data(this,r,new e(this,t))})},l(n).on("tinymce-editor-init",function(t,e){var r=0;e.on("change",function(){0===e.id.indexOf("forminator-wp-editor-")&&e.save();var t=e.id,t=l("#"+t).closest(".forminator-col").find(".forminator-description span");t.length&&t.data("limit")&&(r=("words"!==t.data("type")?e.getContent({format:"text"}):e.getContent({format:"text"}).split(/\s+/)).length,t.html(r+" / "+t.data("limit")))}),l("#"+e.id+"_ifr").height(l("#"+e.id).height())}),l(n).ready(t),l(n).on("after.load.forminator",t)}(jQuery,window,document);var forminator_render_captcha=function(){jQuery(".forminator-g-recaptcha").each(function(){var e=jQuery(this),r=e.closest("form");0<r.length&&window.setTimeout(function(){var t=r.data("forminatorFront");void 0!==t&&t.renderCaptcha(e[0])},100)})},forminator_render_hcaptcha=function(){jQuery(".forminator-hcaptcha").each(function(){var e=jQuery(this),r=e.closest("form");0<r.length&&window.setTimeout(function(){var t=r.data("forminatorFront");void 0!==t&&t.renderHcaptcha(e[0])},100)})},forminatorDateUtil={month_number:function(t){if(t.constructor===Number)return t;var e,r=NaN;return t.constructor===String&&(t=t.toLowerCase(),r=-1===(e=-1===(e=["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"].indexOf(t))?["january","february","march","april","may","june","july","august","september","october","november","december"].indexOf(t):e)?NaN:e),r},convert:function(t){return t.constructor===Date?t:t.constructor===Array?new Date(t[0],this.month_number(t[1]),t[2]):t.constructor===Number||t.constructor===String?new Date(t):"object"==typeof t?new Date(t.year,this.month_number(t.month),t.date):NaN},compare:function(t,e){return isFinite(t=this.convert(t).valueOf())&&isFinite(e=this.convert(e).valueOf())?(e<t)-(t<e):NaN},inRange:function(t,e,r){return isFinite(t=this.convert(t).valueOf())&&isFinite(e=this.convert(e).valueOf())&&isFinite(r=this.convert(r).valueOf())?e<=t&&t<=r:NaN},diffInDays:function(t,e){if(t=this.convert(t),e=this.convert(e),"function"!=typeof t.getMonth||"function"!=typeof e.getMonth)return NaN;e=e.getTime(),t=t.getTime();return parseFloat((e-t)/864e5)},diffInWeeks:function(t,e){if(t=this.convert(t),e=this.convert(e),"function"!=typeof t.getMonth||"function"!=typeof e.getMonth)return NaN;e=e.getTime(),t=t.getTime();return parseInt((e-t)/6048e5)},diffInMonths:function(t,e){if(t=this.convert(t),e=this.convert(e),"function"!=typeof t.getMonth||"function"!=typeof e.getMonth)return NaN;var r=t.getFullYear(),n=e.getFullYear(),t=t.getMonth();return e.getMonth()+12*n-(t+12*r)},diffInYears:function(t,e){return t=this.convert(t),e=this.convert(e),"function"!=typeof t.getMonth||"function"!=typeof e.getMonth?NaN:e.getFullYear()-t.getFullYear()}};!function(s,o,c){"use strict";var r="forminatorFrontCalculate",n={forminatorFields:[],maxExpand:5,generalMessages:{}};function e(t,e){this.element=t,this.$el=s(this.element),this.settings=s.extend({},n,e),this._defaults=n,this._name=r,this.calculationFields=[],this.currentExpand=0,this.triggerInputs=[],this.isError=!1,this.init()}s.extend(e.prototype,{init:function(){var e=this,t=this.$el.find("input.forminator-calculation");0<t.length&&(t.each(function(){var t;e.calculationFields.push({$input:s(this),formula:s(this).data("formula"),name:s(this).attr("name"),isHidden:s(this).data("isHidden"),precision:s(this).data("precision")}),s(this).data("isHidden")&&(s(this).closest(".forminator-col").addClass("forminator-hidden forminator-hidden-option"),(t=s(this).closest(".forminator-row")).addClass("forminator-hidden-option"),0===t.find("> .forminator-col:not(.forminator-hidden)").length&&t.addClass("forminator-hidden"))}),t=this.settings.memoizeTime||300,this.debouncedReCalculateAll=this.debounce(this.recalculateAll,1e3),this.memoizeDebounceRender=this.memoize(this.recalculate,t),this.$el.on("forminator:field:condition:toggled",function(t){e.debouncedReCalculateAll()}),this.parseCalcFieldsFormula(),this.attachEventToTriggeringFields(),this.debouncedReCalculateAll())},memoize:function(e,r){var n,o={},i=Array.prototype.slice;return function(){var t=i.call(arguments);return clearTimeout(n),n=setTimeout(function(){n=null,o={}},r),t[0].name in o?o[t[0].name]:o[t[0].name]=e.apply(this,t)}},debounce:function(n,o,i){var a;return function(){var t=this,e=arguments,r=i&&!a;clearTimeout(a),a=setTimeout(function(){a=null,i||n.apply(t,e)},o),r&&n.apply(t,e)}},parseCalcFieldsFormula:function(){for(var t=0;t<this.calculationFields.length;t++){var e=this.calculationFields[t],r=e.formula;this.currentExpand=0,e.formula=r,this.calculationFields[t]=e}},maybeExpandCalculationFieldOnFormula:function(t){if(this.currentExpand>this.settings.maxExpand)return t;for(var e=this.settings.forminatorFields.join("|"),r=new RegExp("\\{("+("("+e+")-\\d+")+")(\\-[A-Za-z-_]+)?\\}","g"),n=t,o=!1;s=r.exec(t);){var i=s[0],a=s[1],s=s[2],l=i;i!==c&&a!==c&&s!==c&&("calculation"===s&&(o=!0,l="("+this.$el.find('input[name="'+a+'"]').data("formula")+")"),n=n.replace(i,l))}return o&&(this.currentExpand++,n=this.maybeExpandCalculationFieldOnFormula(n)),n},findTriggerInputs:function(t){for(var e=t.formula,r=this.settings.forminatorFields.join("|"),n=new RegExp("\\{("+("("+r+")-\\d+")+")(\\-[A-Za-z-_]+)?\\}","g");a=n.exec(e);){var o=a[0],i=a[1],a=a[2];if(o!==c&&i!==c&&a!==c){o=this.get_form_field(i);if(o.length){for(var s=o.data("calcFields"),l=(s===c&&(s=[]),!1),f=0;f<s.length;f++)if(s[f].name===t.name){l=!0;break}l||s.push(t),o.data("calcFields",s),this.triggerInputs.push(o)}}}},get_form_field:function(t){var e=this.$el.data("form-id"),e=this.$el.find("#forminator-form-"+e+"__field--"+t);return e=0===e.length&&0===(e=this.$el.find("#"+t+"-field")).length&&0===(e=this.$el.find("input[name="+t+"]")).length&&0===(e=this.$el.find("textarea[name="+t+"]")).length&&0===(e=this.$el.find('input[name="'+t+'[]"]')).length?this.$el.find("#"+t):e},attachEventToTriggeringFields:function(){for(var n=this,t=0;t<this.calculationFields.length;t++){var e=this.calculationFields[t];this.findTriggerInputs(e)}if(0<this.triggerInputs.length)for(var r=[],o=0;o<this.triggerInputs.length;o++){var i=this.triggerInputs[o],a=i.attr("id");r.indexOf(a)<0&&(i.on("change.forminatorFrontCalculate, blur",function(){var t=s(this).data("calcFields");if(t!==c&&0<t.length)for(var e=0;e<t.length;e++){var r=t[e];n.field_is_checkbox(s(this))||n.field_is_radio(s(this))?n.recalculate(r):n.memoizeDebounceRender(r)}}),r.push(a))}},recalculateAll:function(){for(var t=0;t<this.calculationFields.length;t++)this.recalculate(this.calculationFields[t])},recalculate:function(t){var e=t.$input,r=(this.hideErrorMessage(e),this.maybeReplaceFieldOnFormula(t.formula)),n=0,r=new o.forminatorCalculator(r);try{if(n=r.calculate(),!isFinite(n))throw"Infinity calculation result.";n=(+(Math.round(n+("e+"+t.precision))+("e-"+t.precision))).toFixed(t.precision)}catch(t){this.isError=!0,console.log(t),this.displayErrorMessage(e,this.settings.generalMessages.calculation_error),n="0"}e.val()!==String(n)&&(r=e.data("decimal-point"),n=String(n).replace(".",r),e.val(n).trigger("change"))},maybeReplaceFieldOnFormula:function(t){for(var e=this.settings.forminatorFields.join("|"),r=new RegExp("\\{("+("("+e+")-\\d+")+")(\\-[A-Za-z-_]+)?\\}","g"),n=t;s=r.exec(t);){var o,i=s[0],a=s[1],s=s[2],l=i;i!==c&&a!==c&&s!==c&&(this.is_hidden(a)?(l=0,o=i.replace(/([\\\.\+\*\?\[\^\]\$\(\)\{\}\=\!\<\>\|\:])/g,"\\$1"),!(o=new RegExp("([\\+\\-\\*\\/]?)[^\\+\\-\\*\\/\\(]*"+o+"[^\\)\\+\\-\\*\\/]*([\\+\\-\\*\\/]?)").exec(t))||"*"!==o[1]&&"/"!==o[1]&&"*"!==o[2]&&"/"!==o[2]||(l=1)):("calculation"===s&&(o=this.get_calculation_field(a))&&this.memoizeDebounceRender(o),l=this.get_field_value(a)),n=n.replace(i,l="("+l+")"))}return n},get_calculation_field:function(t){for(var e=0;e<this.calculationFields.length;e++)if(this.calculationFields[e].name===t)return this.calculationFields[e];return!1},is_hidden:function(t){var t=this.get_form_field(t).closest(".forminator-col"),e=t.closest(".forminator-row");return!e.hasClass("forminator-hidden-option")&&!t.hasClass("forminator-hidden-option")&&!(!e.hasClass("forminator-hidden")&&!t.hasClass("forminator-hidden"))},get_field_value:function(t){var t=this.get_form_field(t),e=0,r=0,n=null;return this.field_is_radio(t)?(n=t.filter(":checked")).length&&(r=n.data("calculation"))!==c&&(e=Number(r)):this.field_is_checkbox(t)?t.each(function(){s(this).is(":checked")&&(r=s(this).data("calculation"))!==c&&(e+=Number(r))}):this.field_is_select(t)?(n=t.find("option").filter(":selected")).length&&(r=n.data("calculation"))!==c&&(e=Number(r)):e=this.field_has_inputMask(t)?parseFloat(t.inputmask("unmaskedvalue")):(n=t.val(),parseFloat(n.replace(",","."))),isNaN(e)?0:e},field_has_inputMask:function(t){var e=!1;return t.each(function(){if(c!==s(this).attr("data-inputmask"))return!(e=!0)}),e},field_is_radio:function(t){var e=!1;return t.each(function(){if("radio"===s(this).attr("type"))return!(e=!0)}),e},field_is_checkbox:function(t){var e=!1;return t.each(function(){if("checkbox"===s(this).attr("type"))return!(e=!0)}),e},field_is_select:function(t){return t.is("select")},displayErrorMessage:function(t,e){var r=t.closest(".forminator-field--inner"),n=(r=0===r.length?t.closest(".forminator-field"):r).find(".forminator-error-message");0===n.length&&(r.append('<span class="forminator-error-message" aria-hidden="true"></span>'),n=r.find(".forminator-error-message")),t.attr("aria-invalid","true"),n.html(e),r.addClass("forminator-has_error")},hideErrorMessage:function(t){var e=t.closest(".forminator-field--inner"),r=(e=0===e.length?t.closest(".forminator-field"):e).find(".forminator-error-message");t.removeAttr("aria-invalid"),r.remove(),e.removeClass("forminator-has_error")}}),s.fn[r]=function(t){return this.each(function(){s.data(this,r)||s.data(this,r,new e(this,t))})}}(jQuery,window,void document),function(i,s){"use strict";var r="forminatorFrontMergeTags",n={print_value:!1,forminatorFields:[]};function e(t,e){this.element=t,this.$el=i(this.element),this.settings=i.extend({},n,e),this._defaults=n,this._name=r,this.formFields=[],this.init()}i.extend(e.prototype,{init:function(){var t=this,e=this.$el.find(".forminator-merge-tags");0<e.length&&e.each(function(){t.formFields.push({$input:i(this),value:i(this).html()})}),this.replaceAll(),this.attachEvents()},attachEvents:function(){var t=this;this.$el.find(".forminator-textarea, input.forminator-input, .forminator-checkbox, .forminator-radio, .forminator-input-file, select.forminator-select2, .forminator-multiselect input").each(function(){i(this).on("change",function(){setTimeout(function(){t.replaceAll()},300)})})},replaceAll:function(){for(var t=0;t<this.formFields.length;t++)this.replace(this.formFields[t])},replace:function(t){var e=t.$input,t=this.maybeReplaceValue(t.value);e.html(t)},maybeReplaceValue:function(t){for(var e=this.settings.forminatorFields.join("|"),r=new RegExp("\\{("+("("+e+")-\\d+")+")(\\-[A-Za-z-_]+)?\\}","g"),n=t;a=r.exec(t);){var o=a[0],i=o.replace("{","").replace("}",""),a=a[2];o!==s&&i!==s&&a!==s&&(a=this.get_field_value(i),n=n.replace(o,a))}return n},get_form_field:function(t){var e=this.$el.find("#"+t+"-field");return e=0===e.length&&0===(e=this.$el.find("[name="+t+"]")).length&&0===(e=this.$el.find('input[name="'+t+'[]"]')).length?this.$el.find("#"+t):e},is_calculation:function(t){return!!this.get_form_field(t).hasClass("forminator-calculation")},get_field_value:function(t){var e=this.get_form_field(t),r=this,n="",o=null;if(this.is_hidden(t)&&!this.is_calculation(t))return"";if(this.is_calculation(t)&&(!this.get_form_field(t).closest(".forminator-col").closest(".forminator-row").hasClass("forminator-hidden-option")&&this.is_hidden(t)))return"";return this.field_is_radio(e)?(o=e.filter(":checked")).length&&(n=this.settings.print_value?o.val():(0===o.siblings(".forminator-radio-label").length?o.siblings(".forminator-screen-reader-only"):o.siblings(".forminator-radio-label")).text()):this.field_is_checkbox(e)?e.each(function(){var t;i(this).is(":checked")&&(""!==n&&(n+=", "),t=!!i(this).closest(".forminator-multiselect").length,r.settings.print_value?n+=i(this).val():n+=(t?i(this).closest("label"):0===i(this).siblings(".forminator-checkbox-label").length?i(this).siblings(".forminator-screen-reader-only"):i(this).siblings(".forminator-checkbox-label")).text())}):this.field_is_select(e)?(o=e.find("option").filter(":selected")).length&&(n=this.settings.print_value?o.val():o.text()):this.field_is_upload(e)?n=e.val().split("\\").pop():this.field_has_inputMask(e)?(e.inputmask({autoUnmask:!1}),n=e.val(),e.inputmask({autoUnmask:!0})):n=e.val(),n},field_has_inputMask:function(t){var e=!1;return t.each(function(){if(s!==i(this).attr("data-inputmask"))return!(e=!0)}),e},field_is_radio:function(t){var e=!1;return t.each(function(){if("radio"===i(this).attr("type"))return!(e=!0)}),e},field_is_checkbox:function(t){var e=!1;return t.each(function(){if("checkbox"===i(this).attr("type"))return!(e=!0)}),e},field_is_upload:function(t){return"file"===t.attr("type")},field_is_select:function(t){return t.is("select")},is_hidden:function(t){var t=this.get_form_field(t).closest(".forminator-col"),e=t.closest(".forminator-row");return!(!e.hasClass("forminator-hidden-option")&&!e.hasClass("forminator-hidden"))||!!t.hasClass("forminator-hidden")}}),i.fn[r]=function(t){return this.each(function(){i.data(this,r)||i.data(this,r,new e(this,t))})}}(jQuery,(window,void document)),function(s,a,c){"use strict";Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:function(t,e){if(t===c||null===t)throw new TypeError("Cannot convert first argument to object");for(var r=Object(t),n=1;n<arguments.length;n++){var o=arguments[n];if(o!==c&&null!==o)for(var i=Object.keys(Object(o)),a=0,s=i.length;a<s;a++){var l=i[a],f=Object.getOwnPropertyDescriptor(o,l);f!==c&&f.enumerable&&(r[l]=o[l])}}return r}});var r="forminatorFrontPayment",n={type:"stripe",paymentEl:null,paymentRequireSsl:!1,generalMessages:{}};function e(t,e){this.element=t,this.$el=s(this.element),this.settings=s.extend({},n,e),this._defaults=n,this._name=r,this._stripeData=null,this._stripe=null,this._cardElement=null,this._stripeToken=null,this._beforeSubmitCallback=null,this._form=null,this._paymentIntent=null,this.init()}s.extend(e.prototype,{init:function(){var n;this.settings.paymentEl&&void 0!==this.settings.paymentEl.data()&&((n=this)._stripeData=this.settings.paymentEl.data(),!1!==this.mountCardField()&&(s(this.element).on("payment.before.submit.forminator",function(t,e,r){n._form=n.getForm(t),n._beforeSubmitCallback=r,n.validateStripe(t,e)}),this.$el.on("forminator:form:submit:stripe:3dsecurity",function(t,e,r){n.validate3d(t,e,r)}),this.$el.find("input.forminator-input, .forminator-checkbox, .forminator-radio, select.forminator-select2").each(function(){s(this).on("change",function(t){n.mapZip(t)})})))},validate3d:function(t,e,r){var n=this;r?this._stripe.confirmCardPayment(e,{payment_method:{card:n._cardElement,...n.getBillingData()}}).then(function(t){n.$el.find("#forminator-stripe-subscriptionid").val(r),n._beforeSubmitCallback&&n._beforeSubmitCallback.call()}):this._stripe.retrievePaymentIntent(e).then(function(t){"requires_action"!==t.paymentIntent.status&&"requires_source_action"!==t.paymentIntent.status||n._stripe.handleCardAction(e).then(function(t){n._beforeSubmitCallback&&n._beforeSubmitCallback.call()})})},validateStripe:function(r,n){var o=this;this._stripe.createToken(this._cardElement).then(function(t){t.error?o.showCardError(t.error.message,!0):(o.hideCardError(),o._stripe.createPaymentMethod("card",o._cardElement,o.getBillingData()).then(function(t){var e=o.getObjectValue(t,"paymentMethod");o._stripeData.paymentMethod=o.getObjectValue(e,"id"),o.updateAmount(r,n,t)}))})},isValid:function(e){var r=this;this._stripe.createToken(this._cardElement).then(function(t){t.error?r.showCardError(t.error.message,e):r.hideCardError()})},getForm:function(t){t=s(t.target);return t=t.hasClass("forminator-custom-form")?t:t.closest("form.forminator-custom-form")},updateAmount:function(r,n,t){r.preventDefault();var o=this,e=n,t=this.getObjectValue(t,"paymentMethod"),t=(e.append("action","forminator_update_payment_amount"),e.append("paymentid",this.getStripeData("paymentid")),e.append("payment_method",this.getObjectValue(t,"id")),this.getStripeData("receipt")),i=this.getStripeData("receiptEmail");t&&i&&(t=this.get_field_value(i)||"",e.append("receipt_email",t)),s.ajax({type:"POST",url:a.ForminatorFront.ajaxUrl,data:e,cache:!1,contentType:!1,processData:!1,beforeSend:function(){var t;void 0!==o.settings.has_loader&&o.settings.has_loader&&(o._form.addClass("forminator-fields-disabled"),(t=o._form.find(".forminator-response-message")).html("<p>"+o.settings.loader_label+"</p>"),o.focus_to_element(t),t.removeAttr("aria-hidden").prop("tabindex","-1").removeClass("forminator-success forminator-error").addClass("forminator-loading forminator-show")),o._form.find("button").attr("disabled",!0)},success:function(t){var e;!0===t.success?void 0!==t.data&&void 0!==t.data.paymentid?(o.$el.find("#forminator-stripe-paymentid").val(t.data.paymentid),o.$el.find("#forminator-stripe-paymentmethod").val(o._stripeData.paymentMethod),o._stripeData.paymentid=t.data.paymentid,o._stripeData.secret=t.data.paymentsecret,o.handleCardPayment(t,r,n)):o.show_error("Invalid Payment Intent ID"):(o.show_error(t.data.message),t.data.errors.length&&o.show_messages(t.data.errors),(t=o._form.find(".forminator-g-recaptcha")).length&&(e=(t=s(t.get(0))).data("forminator-recapchta-widget"),"invisible"===t.data("size")&&a.grecaptcha.reset(e)))},error:function(t){t=400===t.status?a.ForminatorFront.cform.upload_error:a.ForminatorFront.cform.error;o.show_error(t)}})},show_error:function(t){var e=this._form.find(".forminator-response-message");this._form.find("button").removeAttr("disabled"),e.removeAttr("aria-hidden").prop("tabindex","-1").removeClass("forminator-loading").addClass("forminator-error forminator-show"),e.html("<p>"+t+"</p>"),this.focus_to_element(e),this.enable_form()},enable_form:function(){var t;void 0!==this.settings.has_loader&&this.settings.has_loader&&(t=this._form.find(".forminator-response-message"),this._form.removeClass("forminator-fields-disabled"),t.removeClass("forminator-loading"))},mapZip:function(t){var e=this.getStripeData("veifyZip"),r=this.getStripeData("zipField"),n=s(t.currentTarget).attr("name");e&&""!==r&&n===r&&t.originalEvent!==c&&(e=this.get_field_value(r),this._cardElement.update({value:{postalCode:e}}))},focus_to_element:function(t){t.show(),s("html,body").animate({scrollTop:t.offset().top-(s(a).height()-t.outerHeight(!0))/2},500,function(){t.attr("tabindex")||t.attr("tabindex",-1),t.focus()})},show_messages:function(t){var o,i=this,a=i.$el.data("forminatorFrontCondition");return void 0!==a&&(this.$el.find(".forminator-error-message").remove(),o=0,t.forEach(function(t){var e,r,n=Object.keys(t),t=Object.values(t),n=a.get_form_field(n);n.length&&(0===o&&(i.$el.trigger("forminator.front.pagination.focus.input",[n]),i.focus_to_element(n)),s(n).hasClass("forminator-input-time")&&(0===(r=(e=s(n).closest(".forminator-field:not(.forminator-field--inner)")).children(".forminator-error-message")).length&&(e.append('<span class="forminator-error-message" aria-hidden="true"></span>'),r=e.children(".forminator-error-message")),r.html(t)),0===(r=(e=0===(e=s(n).closest(".forminator-field--inner")).length&&0===(e=s(n).closest(".forminator-field")).length&&1<(e=s(n).find(".forminator-field")).length?e.first():e).find(".forminator-error-message")).length&&(e.append('<span class="forminator-error-message" aria-hidden="true"></span>'),r=e.find(".forminator-error-message")),s(n).attr("aria-invalid","true"),r.html(t),e.addClass("forminator-has_error"),o++)})),this},getBillingData:function(t){if(!this.getStripeData("billing"))return{};var e=this.getStripeData("billingName"),r=this.getStripeData("billingEmail"),n=this.getStripeData("billingAddress"),o={address:{}},i=(!e||(i=(i=this.get_field_value(e))||(this.get_field_value(e+"-first-name")||"")+" "+(this.get_field_value(e+"-last-name")||""))&&(o.name=i),!r||(e=this.get_field_value(r)||"")&&(o.email=e),this.get_field_value(n+"-street_address")||""),r=(i&&(o.address.line1=i),this.get_field_value(n+"-address_line")||""),e=(r&&(o.address.line2=r),this.get_field_value(n+"-city")||""),i=(e&&(o.address.city=e),this.get_field_value(n+"-state")||"");i&&(o.address.state=i);r=this.get_form_field(n+"-country").find(":selected").data("country-code"),r&&(o.address.country=r),e=this.get_field_value(n+"-zip")||"";return e&&(o.address.postal_code=e),{billing_details:o}},handleCardPayment:function(t,e,r){t.data.paymentsecret;t=s(".forminator-number--field, .forminator-currency, .forminator-calculation");t.inputmask&&t.inputmask("remove"),this._beforeSubmitCallback&&this._beforeSubmitCallback.call()},mountCardField:function(){var t=this.getStripeData("key"),e=this.getStripeData("cardIcon"),r=this.getStripeData("veifyZip"),n=(this.getStripeData("zipField"),this.getStripeData("fieldId"));if(null===t)return!1;this._stripe=Stripe(t,{locale:this.getStripeData("language")});var t={},r=(r?t.value={postalCode:""}:t.hidePostalCode=!0,{}),o=this.getStripeData("fontFamily"),i=this.getStripeData("customFonts"),i=(o&&i&&(r.fonts=[{cssSrc:"https://fonts.googleapis.com/css?family="+o}]),this._stripe.elements(r));this._cardElement=i.create("card",Object.assign({classes:{base:this.getStripeData("baseClass"),complete:this.getStripeData("completeClass"),empty:this.getStripeData("emptyClass"),focus:this.getStripeData("focusedClass"),invalid:this.getStripeData("invalidClass"),webkitAutofill:this.getStripeData("autofilledClass")},style:{base:{iconColor:this.getStripeData("iconColor"),color:this.getStripeData("fontColor"),lineHeight:this.getStripeData("lineHeight"),fontWeight:this.getStripeData("fontWeight"),fontFamily:this.getStripeData("fontFamily"),fontSmoothing:"antialiased",fontSize:this.getStripeData("fontSize"),"::placeholder":{color:this.getStripeData("placeholder")},":hover":{iconColor:this.getStripeData("iconColorHover")},":focus":{iconColor:this.getStripeData("iconColorFocus")}},invalid:{iconColor:this.getStripeData("iconColorError"),color:this.getStripeData("fontColorError")}},iconStyle:"solid",hideIcon:!e},t)),this._cardElement.mount("#card-element-"+n),this.validateCard()},validateCard:function(){var e=this;this._cardElement.on("change",function(t){e.$el.find(".forminator-stripe-element").hasClass("StripeElement--empty")?e.$el.find(".forminator-stripe-element").closest(".forminator-field").removeClass("forminator-is_filled"):e.$el.find(".forminator-stripe-element").closest(".forminator-field").addClass("forminator-is_filled"),e.$el.find(".forminator-stripe-element").hasClass("StripeElement--invalid")&&e.$el.find(".forminator-stripe-element").closest(".forminator-field").addClass("forminator-has_error")}),this._cardElement.on("focus",function(t){e.$el.find(".forminator-stripe-element").closest(".forminator-field").addClass("forminator-is_active")}),this._cardElement.on("blur",function(t){e.$el.find(".forminator-stripe-element").closest(".forminator-field").removeClass("forminator-is_active"),e.isValid(!1)})},hideCardError:function(){var t=this.$el.find(".forminator-card-message"),e=t.find(".forminator-error-message");0===e.length&&(t.append('<span class="forminator-error-message" aria-hidden="true"></span>'),e=t.find(".forminator-error-message")),t.closest(".forminator-field").removeClass("forminator-has_error"),e.html("")},showCardError:function(t,e){var r=this.$el.find(".forminator-card-message"),n=r.find(".forminator-error-message");0===n.length&&(r.append('<span class="forminator-error-message" aria-hidden="true"></span>'),n=r.find(".forminator-error-message")),r.closest(".forminator-field").addClass("forminator-has_error"),r.closest(".forminator-field").addClass("forminator-is_filled"),n.html(t),e&&this.focus_to_element(r.closest(".forminator-field"))},getStripeData:function(t){return void 0!==this._stripeData&&void 0!==this._stripeData[t]?this._stripeData[t]:null},getObjectValue:function(t,e){return void 0!==t[e]?t[e]:null},get_form_field:function(t){var e=this.$el.find("#"+t+"-field");return e=0===e.length&&0===(e=this.$el.find("input[name="+t+"]")).length&&0===(e=this.$el.find("textarea[name="+t+"]")).length&&0===(e=this.$el.find('input[name="'+t+'[]"]')).length?this.$el.find("#"+t):e},get_field_value:function(t){var t=this.get_form_field(t),e="",r=null;return this.field_is_radio(t)?(r=t.filter(":checked")).length&&(e=r.val()):this.field_is_checkbox(t)?t.each(function(){s(this).is(":checked")&&(e=s(this).val())}):e=!this.field_is_select(t)&&this.field_has_inputMask(t)?parseFloat(t.inputmask("unmaskedvalue")):t.val(),e},get_field_calculation:function(t){var t=this.get_form_field(t),e=0,r=0,n=null;return this.field_is_radio(t)?(n=t.filter(":checked")).length&&(r=n.data("calculation"))!==c&&(e=Number(r)):this.field_is_checkbox(t)?t.each(function(){s(this).is(":checked")&&(r=s(this).data("calculation"))!==c&&(e+=Number(r))}):this.field_is_select(t)?(n=t.find("option").filter(":selected")).length&&(r=n.data("calculation"))!==c&&(e=Number(r)):e=Number(t.val()),isNaN(e)?0:e},field_has_inputMask:function(t){var e=!1;return t.each(function(){if(c!==s(this).attr("data-inputmask"))return!(e=!0)}),e},field_is_radio:function(t){var e=!1;return t.each(function(){if("radio"===s(this).attr("type"))return!(e=!0)}),e},field_is_checkbox:function(t){var e=!1;return t.each(function(){if("checkbox"===s(this).attr("type"))return!(e=!0)}),e},field_is_select:function(t){return t.is("select")}}),s.fn[r]=function(t){return this.each(function(){s.data(this,r)||s.data(this,r,new e(this,t))})}}(jQuery,window,void document),function(a,n){"use strict";var r="forminatorFrontPagination",o={totalSteps:0,step:0,hashStep:0,inline_validation:!1};function e(t,e){this.element=a(t),this.$el=this.element,this.totalSteps=0,this.step=0,this.finished=!1,this.hashStep=!1,this.next_button_txt="",this.prev_button_txt="",this.custom_label=[],this.form_id=0,this.element="",this.settings=a.extend({},o,e),this._defaults=o,this._name=r,this.init()}a.extend(e.prototype,{init:function(){this.next_button=this.settings.next_button||n.ForminatorFront.cform.pagination_next,this.prev_button=this.settings.prev_button||n.ForminatorFront.cform.pagination_prev,0<this.$el.find("input[name=form_id]").length&&(this.form_id=this.$el.find("input[name=form_id]").val()),this.totalSteps=this.settings.totalSteps,this.step=this.settings.step,this.quiz=this.settings.quiz,this.element=this.$el.find("[data-step="+this.step+"]").data("name"),this.form_id&&"object"==typeof n.Forminator_Cform_Paginations&&"object"==typeof n.Forminator_Cform_Paginations[this.form_id]&&(this.custom_label=n.Forminator_Cform_Paginations[this.form_id]),this.settings.hashStep&&0<this.step?this.go_to(this.step,!0):this.quiz?this.go_to(0,!0):this.go_to(0,!1),this.render_navigation(),this.render_bar_navigation(),this.render_footer_navigation(this.form_id),this.init_events(),this.update_buttons(),this.update_navigation(),this.$el.find(".forminator-button.forminator-button-back, .forminator-button.forminator-button-next, .forminator-button.forminator-button-submit").on("click",function(t){t.preventDefault(),a(this).trigger("forminator.front.pagination.move")}),this.$el.on("click",".forminator-result--view-answers",function(t){t.preventDefault(),a(this).trigger("forminator.front.pagination.move")})},init_events:function(){var o=this;this.$el.find(".forminator-button-back").on("forminator.front.pagination.move",function(t){o.handle_click("prev")}),this.$el.on("forminator.front.pagination.move",".forminator-result--view-answers",function(t){o.handle_click("prev")}),this.$el.find(".forminator-button-next").on("forminator.front.pagination.move",function(t){o.handle_click("next")}),this.$el.find(".forminator-step").on("click",function(t){t.preventDefault();t=a(this).data("nav");o.handle_step(t)}),this.$el.on("reset",function(t){o.on_form_reset(t)}),this.$el.on("forminator:quiz:submit:success",function(t,e,r,n){n&&o.move_to_results(t)}),this.$el.on("forminator.front.pagination.focus.input",function(t,e){o.on_focus_input(t,e)})},move_to_results:function(t){this.finished=!0,this.$el.find(".forminator-submit-rightaway").length?this.$el.find("#forminator-submit").removeClass("forminator-hidden"):this.handle_click("next")},on_form_reset:function(t){this.go_to(0,!0),this.update_buttons()},on_focus_input:function(t,e){e=this.get_page_of_input(e);this.go_to(e,!0),this.update_buttons()},render_footer_navigation:function(t){var e="",r=!0===this.custom_label["has-paypal"]?' style="align-items: flex-start;"':"";this.custom_label[this.element]&&"custom"===this.custom_label["pagination-labels"]?(this.prev_button_txt=""!==this.custom_label[this.element]["prev-text"]?this.custom_label[this.element]["prev-text"]:this.prev_button,this.next_button_txt=""!==this.custom_label[this.element]["next-text"]?this.custom_label[this.element]["next-text"]:this.next_button):(this.prev_button_txt=this.prev_button,this.next_button_txt=this.next_button),e=this.$el.hasClass("forminator-design--material")?'<div class="forminator-pagination-footer"'+r+'><button class="forminator-button forminator-button-back"><span class="forminator-button--mask" aria-label="hidden"></span><span class="forminator-button--text">'+this.prev_button_txt+'</span></button><button class="forminator-button forminator-button-next"><span class="forminator-button--mask" aria-label="hidden"></span><span class="forminator-button--text">'+this.next_button_txt+"</span></button>":'<div class="forminator-pagination-footer"'+r+'><button class="forminator-button forminator-button-back">'+this.prev_button_txt+'</button><button class="forminator-button forminator-button-next">'+this.next_button_txt+"</button>",!0===this.custom_label["has-paypal"]&&(e+='<div class="forminator-payment forminator-button-paypal forminator-hidden '+(this.custom_label["paypal-id"]||"")+'-payment" id="paypal-button-container-'+t+'">'),this.$el.append(e+="</div>")},render_bar_navigation:function(){var t=this.$el.find(".forminator-pagination-progress");t.length&&(t.html('<div class="forminator-progress-label">0%</div><div class="forminator-progress-bar"><span style="width: 0%"></span></div>'),this.calculate_bar_percentage())},calculate_bar_percentage:function(){var t=this.totalSteps,e=this.step+1,r=this.$el;r.length&&(e=Math.round(e/t*100),r.find(".forminator-progress-label").html(e+"%"),r.find(".forminator-progress-bar span").css("width",e+"%"))},render_navigation:function(){var n,o,i=this.$el.find(".forminator-pagination-steps"),t=this.$el.find(".forminator-pagination-start");i.length&&(n=this.$el.find(".forminator-pagination").not(".forminator-pagination-start"),i.append('<div class="forminator-break"></div>'),o=this,n.each(function(){var t=a(this),e=t.data("label"),t=t.data("step")-1,r="forminator-custom-form-"+o.form_id+"--page-"+t;i.append('<button role="tab" id="'+(r+"-label")+'" class="forminator-step forminator-step-'+t+'" aria-selected="false" aria-controls="'+r+'" data-nav="'+t+'"><span class="forminator-step-label">'+e+'</span><span class="forminator-step-dot" aria-hidden="true"></span></button>'+'<div class="forminator-break" aria-hidden="true"></div>')}),t.each(function(){var t=a(this).data("label"),e=n.length,r="forminator-custom-form-"+o.form_id+"--page-"+e;i.append('<button role="tab" id="'+(r+"-label")+'" class="forminator-step forminator-step-'+e+'" data-nav="'+e+'" aria-selected="false" aria-controls="'+r+'"><span class="forminator-step-label">'+t+'</span><span class="forminator-step-dot" aria-hidden="true"></span></button>'+'<div class="forminator-break" aria-hidden="true"></div>')}))},handle_step:function(t){if(this.settings.inline_validation)for(var e=0;e<t;e++)if(this.step<=e&&!this.is_step_inputs_valid(e))return void this.go_to(e,!0);this.go_to(t,!0),this.update_buttons()},handle_click:function(t){var e,r=this;if("prev"===t&&0!==this.step)this.go_to(this.step-1,!0),this.update_buttons();else if("next"===t){if(this.settings.inline_validation&&!this.is_step_inputs_valid(this.step))return;void 0!==this.$el.data().forminatorFrontPayment?(e=this.$el.data().forminatorFrontPayment,0<this.$el.find("[data-step="+this.step+"]").find(".forminator-stripe-element").not(".forminator-hidden .forminator-stripe-element").length?e._stripe.createToken(e._cardElement).then(function(t){t.error?e.showCardError(t.error.message,!0):(e.hideCardError(),r.go_to(r.step+1,!0),r.update_buttons())}):(this.go_to(this.step+1,!0),this.update_buttons())):(this.go_to(this.step+1,!0),this.update_buttons())}var t=a(this.$el),n=t.find(".forminator-textarea");t.hasClass("forminator-design--material")&&n.length&&n.each(function(){FUI.textareaMaterial(this)})},is_step_inputs_valid:function(t){var r=0,n=this.$el.data("validator"),t=this.$el.find("[data-step="+t+"]");return void 0===n||(t.find("input, select, textarea").not(":submit, :reset, :image, :disabled").not(':hidden:not(.forminator-wp-editor-required, .forminator-input-file-required, input[name$="_data"])').not('[gramm="true"]').each(function(t,e){n.element(e)||(0===r&&e.focus(),r++)}),0===r)},get_page_of_input:function(t){var e=this.step,t=a(t).closest(".forminator-pagination");return 0<t.length&&(void 0!==(t=a(t).data("step"))&&(e=+t)),e},update_buttons:function(){var t,e,r;0===this.step?(this.$el.find(".forminator-button-back").closest(".forminator-pagination-footer").css({"justify-content":"flex-end"}),this.$el.find(".forminator-button-back").addClass("forminator-hidden"),this.$el.find(".forminator-button-next").removeClass("forminator-hidden")):1<this.totalSteps&&(this.$el.find(".forminator-button-back").closest(".forminator-pagination-footer").css({"justify-content":"space-between"}),this.$el.find(".forminator-button-back, .forminator-button-next").removeClass("forminator-hidden")),this.step!==this.totalSteps||this.finished||(this.step--,this.$el.submit()),this.step!==this.totalSteps-1||this.finished?(this.element=this.$el.find("[data-step="+this.step+"]").data("name"),this.custom_label[this.element]&&"custom"===this.custom_label["pagination-labels"]?(this.prev_button_txt=""!==this.custom_label[this.element]["prev-text"]?this.custom_label[this.element]["prev-text"]:this.prev_button,this.next_button_txt=""!==this.custom_label[this.element]["next-text"]?this.custom_label[this.element]["next-text"]:this.next_button):(this.prev_button_txt=this.prev_button,this.next_button_txt=this.next_button),this.step===this.totalSteps-1&&this.finished&&(this.next_button_txt=n.ForminatorFront.quiz.view_results),this.$el.hasClass("forminator-design--material")?(this.$el.find("#forminator-submit").removeAttr("id").removeClass("forminator-button-submit forminator-hidden").addClass("forminator-button-next"),!0===this.custom_label["has-paypal"]&&(this.$el.find("#forminator-paypal-submit").removeAttr("id").addClass("forminator-hidden"),this.$el.find(".forminator-button-next").removeClass("forminator-button-submit forminator-hidden")),this.$el.find(".forminator-button-back .forminator-button--text").html(this.prev_button_txt),this.$el.find(".forminator-button-next .forminator-button--text").html(this.next_button_txt)):(this.$el.find("#forminator-submit").removeAttr("id").removeClass("forminator-button-submit forminator-hidden").addClass("forminator-button-next"),!0===this.custom_label["has-paypal"]&&(this.$el.find("#forminator-paypal-submit").removeAttr("id").addClass("forminator-hidden"),this.$el.find(".forminator-button-next").removeClass("forminator-button-submit forminator-hidden")),this.$el.find(".forminator-button-back").html(this.prev_button_txt),this.$el.find(".forminator-button-next").html(this.next_button_txt)),this.step===this.totalSteps&&this.finished&&this.$el.find(".forminator-button-next, .forminator-button-back").addClass("forminator-hidden")):(t=this.$el.find(".forminator-pagination-submit").html(),e=this.$el.find(".forminator-pagination-submit").data("loading"),r="custom"===this.custom_label["pagination-labels"]&&""!==this.custom_label["last-previous"]?this.custom_label["last-previous"]:this.prev_button,this.$el.hasClass("forminator-design--material")?(this.$el.find(".forminator-button-back .forminator-button--text").html(r),this.$el.find(".forminator-button-next").removeClass("forminator-button-next").attr("id","forminator-submit").addClass("forminator-button-submit").find(".forminator-button--text").html("").html(t).data("loading",e)):(this.$el.find(".forminator-button-back").html(r),this.$el.find(".forminator-button-next").removeClass("forminator-button-next").attr("id","forminator-submit").addClass("forminator-button-submit").html(t).data("loading",e)),r=this.$el.find(".forminator-button-submit"),t||(r.addClass("forminator-hidden"),this.$el.find(".forminator-submit-rightaway").length&&r.html(n.ForminatorFront.quiz.view_results)),!0===this.custom_label["has-paypal"]&&(r.addClass("forminator-hidden"),this.$el.find(".forminator-payment").attr("id","forminator-paypal-submit"),!1===n.paypalHasCondition&&this.$el.find(".forminator-payment").removeClass("forminator-hidden")),0<this.$el.find(".forminator-payment iframe").length&&this.$el.find(".forminator-payment iframe").width("100%")),this.$el.trigger("forminator.front.condition.restart")},go_to:function(t,e){if((this.step=t)===this.totalSteps&&!this.finished)return!1;this.$el.find(".forminator-pagination").css({height:"0",opacity:"0",visibility:"hidden",overflow:"hidden"}).attr("aria-hidden","true").attr("hidden",!0),this.$el.find(".forminator-pagination .forminator-pagination--content").hide(),this.$el.find("[data-step="+t+"]").css({height:"auto",opacity:"1",visibility:"visible"}).removeAttr("aria-hidden").removeAttr("hidden"),this.$el.find("[data-step="+t+"] .forminator-pagination--content").show();t=this.$el.data("forminatorFront");void 0!==t&&t.responsive_captcha(),this.update_navigation(),e&&this.scroll_to_top_form()},update_navigation:function(){this.$el.find(".forminator-current").attr("aria-selected","false"),this.$el.find(".forminator-current").removeClass("forminator-current"),this.$el.find(".forminator-step-"+this.step).attr("aria-selected","true"),this.$el.find(".forminator-step-"+this.step).addClass("forminator-current"),this.$el.find(".forminator-pagination:not(:hidden)").find(".forminator-answer input").first().trigger("change"),this.calculate_bar_percentage()},scroll_to_top_form:function(){var t,e=this.$el,r=this.$el.find(".forminator-row").not(":hidden").first();(e=r.length?r:e).length&&(r="html,body",0<this.$el.closest(".sui-dialog").length&&(r=".sui-dialog"),0<this.$el.closest(".wph-modal").length&&(r=".wph-modal"),e.focus(),t=e.offset().top-(a(n).height()-e.outerHeight(!0))/2,this.quiz&&(t=e.offset().top,a("#wpadminbar").length&&(t-=35)),a(r).animate({scrollTop:t},500,function(){e.attr("tabindex")||e.attr("tabindex",-1)}))}}),a.fn[r]=function(t){return this.each(function(){a.data(this,r)||a.data(this,r,new e(this,t))})}}(jQuery,window,document),function(l,e,o){"use strict";var r="forminatorFrontPayPal",n={type:"paypal",paymentEl:null,paymentRequireSsl:!1,generalMessages:{}};function i(t,e){this.element=t,this.$el=l(this.element),this.forminator_selector="#"+this.$el.attr("id")+'[data-forminator-render="'+this.$el.data("forminator-render")+'"]',this.settings=l.extend({},n,e),this._defaults=n,this._name=r,this.paypalData=null,this.init()}l.extend(i.prototype,{init:function(){this.settings.paymentEl&&(this.paypalData=this.settings.paymentEl,this.render_paypal_button(this.element))},is_data_valid:function(){var t=this.configurePayPal(),e=this.settings.paymentRequireSsl;return!(t.amount<=0)&&(!e||"https:"===location.protocol)},is_form_valid:function(){var t=this.$el.validate(),e=t.checkForm();return t.submitted={},e},render_paypal_button:function(t){var i=l(t),a=this,r=this.configurePayPal(),n=i.find(".forminator-response-message"),s=ForminatorFront.cform.gateway.error,e=this.settings.paymentRequireSsl,o=this.settings.generalMessages,t={shape:r.shape,color:r.color,label:r.label,layout:r.layout,height:parseInt(r.height)};"vertical"!==r.layout&&(t.tagline=r.tagline),paypal.Buttons({onInit:function(t,e){e.disable(),"variable"===r.amount_type&&""!==r.variable&&(r.amount=a.get_field_calculation(r.variable)),i.find("input, select, textarea").on("change",function(){a.is_data_valid()&&a.is_form_valid()?e.enable():e.disable()}),i.on("validation:error",function(){e.disable()}),a.is_data_valid()&&a.is_form_valid()&&e.enable()},env:r.mode,style:t,onClick:function(){!i.valid()&&r.amount<=0?(n.removeClass("forminator-accessible").addClass("forminator-error").html("").removeAttr("aria-hidden"),n.html('<label class="forminator-label--error"><span>'+o.payment_require_amount_error+"</span></label>"),a.focus_to_element(n)):e&&"https:"!==location.protocol?(n.removeClass("forminator-accessible").addClass("forminator-error").html("").removeAttr("aria-hidden"),n.html('<label class="forminator-label--error"><span>'+o.payment_require_ssl_error+"</span></label>"),a.focus_to_element(n)):i.valid()||(n.removeClass("forminator-accessible").addClass("forminator-error").html("").removeAttr("aria-hidden"),n.html('<label class="forminator-label--error"><span>'+o.form_has_error+"</span></label>"),a.focus_to_element(n)),"variable"===r.amount_type&&""!==r.variable&&(r.amount=a.get_field_calculation(r.variable))},createOrder:function(t,e){i.addClass("forminator-partial-disabled");var r=i.find('input[name="forminator_nonce"]').val(),n=a.getPayPalData("form_id"),o=a.paypal_request_data();return fetch(ForminatorFront.ajaxUrl+"?action=forminator_pp_create_order",{method:"POST",mode:"same-origin",credentials:"same-origin",headers:{"content-type":"application/json"},body:JSON.stringify({nonce:r,form_id:n,mode:a.getPayPalData("mode"),form_data:o,form_fields:i.serialize()})}).then(function(t){return t.json()}).then(function(t){if(!0!==t.success)return s=t.data,!1;t=t.data.order_id;return i.find(".forminator-paypal-input").val(t),t})},onApprove:function(t,e){void 0!==a.settings.has_loader&&a.settings.has_loader&&(i.addClass("forminator-fields-disabled"),n.html("<p>"+a.settings.loader_label+"</p>"),n.removeAttr("aria-hidden").prop("tabindex","-1").removeClass("forminator-success forminator-error").addClass("forminator-loading forminator-show"),a.focus_to_element(n)),i.trigger("submit")},onCancel:function(t,e){return void 0!==a.settings.has_loader&&a.settings.has_loader&&(i.removeClass("forminator-fields-disabled forminator-partial-disabled"),n.removeClass("forminator-loading")),e.redirect()},onError:function(){void 0!==a.settings.has_loader&&a.settings.has_loader&&(i.removeClass("forminator-fields-disabled forminator-partial-disabled"),n.removeClass("forminator-loading")),n.removeClass("forminator-accessible").addClass("forminator-error").html("").removeAttr("aria-hidden"),n.html('<label class="forminator-label--error"><span>'+s+"</span></label>"),a.focus_to_element(n)}}).render(i.find(".forminator-button-paypal")[0])},configurePayPal:function(){var t={form_id:this.getPayPalData("form_id"),sandbox_id:this.getPayPalData("sandbox_id"),currency:this.getPayPalData("currency"),live_id:this.getPayPalData("live_id"),amount:0},e=(t.color=this.getPayPalData("color")?this.getPayPalData("color"):"gold",t.shape=this.getPayPalData("shape")?this.getPayPalData("shape"):"rect",t.label=this.getPayPalData("label")?this.getPayPalData("label"):"checkout",t.layout=this.getPayPalData("layout")?this.getPayPalData("layout"):"vertical",t.tagline=this.getPayPalData("tagline")?this.getPayPalData("tagline"):"true",t.redirect_url=this.getPayPalData("redirect_url")?this.getPayPalData("redirect_url"):"",t.mode=this.getPayPalData("mode"),t.locale=this.getPayPalData("locale")?this.getPayPalData("locale"):"en_US",t.debug_mode=this.getPayPalData("debug_mode")?this.getPayPalData("debug_mode"):"disable",t.amount_type=this.getPayPalData("amount_type")?this.getPayPalData("amount_type"):"fixed",t.variable=this.getPayPalData("variable")?this.getPayPalData("variable"):"",t.height=this.getPayPalData("height")?this.getPayPalData("height"):55,t.shipping_address=this.getPayPalData("shipping_address")?this.getPayPalData("shipping_address"):55,this.getPayPalData("amount_type"));return"fixed"===e?t.amount=this.getPayPalData("amount"):"variable"===e&&""!==t.variable&&(t.amount=this.get_field_calculation(t.variable)),t},getPayPalData:function(t){return void 0!==this.paypalData[t]?this.paypalData[t]:null},get_form_field:function(t){var e=this.$el.find("#"+t+"-field");return e=0===e.length&&0===(e=this.$el.find("input[name="+t+"]")).length&&0===(e=this.$el.find("textarea[name="+t+"]")).length&&0===(e=this.$el.find('input[name="'+t+'[]"]')).length&&0===(e=this.$el.find("#"+t)).length?this.$el.find("select[name="+t+"]"):e},get_field_calculation:function(t){var t=this.get_form_field(t),e=0,r=0,n=null;return this.field_is_radio(t)?(n=t.filter(":checked")).length&&(r=n.data("calculation"))!==o&&(e=Number(r)):this.field_is_checkbox(t)?t.each(function(){l(this).is(":checked")&&(r=l(this).data("calculation"))!==o&&(e+=Number(r))}):this.field_is_select(t)?(n=t.find("option").filter(":selected")).length&&(r=n.data("calculation"))!==o&&(e=Number(r)):e=t.inputmask?t.inputmask("unmaskedvalue").replace(/,/g,"."):Number(t.val()),isNaN(e)?0:e},focus_to_element:function(t){t.show(),l("html,body").animate({scrollTop:t.offset().top-(l(e).height()-t.outerHeight(!0))/2},500,function(){t.attr("tabindex")||t.attr("tabindex",-1),t.focus()})},paypal_request_data:function(){var t=this.configurePayPal(),e=this.getPayPalData("shipping_address"),r=this.getPayPalData("billing-details"),n=this.getBillingData(),o={};return o.purchase_units=[{amount:{currency_code:this.getPayPalData("currency"),value:t.amount}}],"disable"===e&&(o.application_context={shipping_preference:"NO_SHIPPING"}),r&&(o.payer=n),o},getBillingData:function(){var t,e,r,n,o,i=this.getPayPalData("billing-name"),a=this.getPayPalData("billing-email"),s=this.getPayPalData("billing-address"),l={};return i&&(l.name={},(n=this.get_field_value(i))||(t=this.get_field_value(i+"-prefix")||"",e=this.get_field_value(i+"-first-name")||"",r=this.get_field_value(i+"-middle-name")||"",o=this.get_field_value(i+"-last-name")||"",n=(n=t?t+" ":"")+e+(r?" "+r:"")),n&&(l.name.given_name=n,l.name.surname=o)),a&&(i=this.get_field_value(a)||"")&&(l.email_address=i),s&&(l.address={},(t=this.get_field_value(s+"-street_address")||"")&&(l.address.address_line_1=t),(e=this.get_field_value(s+"-address_line")||"")&&(l.address.address_line_2=e),(r=this.get_field_value(s+"-city")||"")&&(l.address.admin_area_2=r),(n=this.get_field_value(s+"-state")||"")&&(l.address.admin_area_1=n),(o=this.get_form_field(s+"-country")||"")&&(l.address.country_code=o.find(":selected").data("country-code")),(a=this.get_field_value(s+"-zip")||"")&&(l.address.postal_code=a)),l},get_field_value:function(t){var t=this.get_form_field(t),e="",r=null;return this.field_is_radio(t)?(r=t.filter(":checked")).length&&(e=r.val()):this.field_is_checkbox(t)?t.each(function(){l(this).is(":checked")&&(e=l(this).val())}):e=(this.field_is_select(t),t.val()),e},field_is_radio:function(t){var e=!1;return t.each(function(){if("radio"===l(this).attr("type"))return!(e=!0)}),e},field_is_checkbox:function(t){var e=!1;return t.each(function(){if("checkbox"===l(this).attr("type"))return!(e=!0)}),e},field_is_select:function(t){return t.is("select")}}),l.fn[r]=function(t){return this.each(function(){l.data(this,r)||l.data(this,r,new i(this,t))})}}(jQuery,window,void document),function(g){"use strict";var r="forminatorFrontDatePicker",n={};function e(t,e){this.element=t,this.$el=g(this.element),this.settings=g.extend({},n,e),this._defaults=n,this._name=r,this.init()}g.extend(e.prototype,{init:function(){var r=this,t=this.$el.data("format"),e=(this.$el.data("restrict-type"),this.$el.data("restrict")),n=this.$el.data("restrict"),o=this.$el.data("start-year"),i=this.$el.data("end-year"),a=this.$el.data("past-dates"),s=this.$el.val(),l=this.$el.data("start-of-week"),f=this.$el.data("start-date"),c=this.$el.data("end-date"),u=this.$el.data("start-field"),d=this.$el.data("end-field"),m=this.$el.data("start-offset"),h=this.$el.data("end-offset"),p=this.$el.data("disable-date"),b=this.$el.data("disable-range"),n=!isNaN(parseFloat(n))&&isFinite(n)?[n.toString()]:e.split(","),p=p.split(","),b=b.split(","),o=o||"c-95",i=i||"c+95",y=this.$el.closest(".forminator-custom-form"),_="forminator-calendar";y.hasClass("forminator-design--default")?_="forminator-calendar--default":y.hasClass("forminator-design--material")?_="forminator-calendar--material":y.hasClass("forminator-design--flat")?_="forminator-calendar--flat":y.hasClass("forminator-design--bold")&&(_="forminator-calendar--bold"),this.$el.datepicker({beforeShow:function(t,e){e.dpDiv.removeClass(function(t,e){return(e.match(/\bhustle-\S+/g)||[]).join(" ")}),e.dpDiv.removeClass(function(t,e){return(e.match(/\bforminator-\S+/g)||[]).join(" ")}),e.dpDiv.addClass("forminator-custom-form-"+y.data("form-id")+" "+_),"disable"===a?g(this).datepicker("option","minDate",s):g(this).datepicker("option","minDate",null),f&&(e=new Date(f.replace(/-/g,"/").replace(/T.+/,"")),g(this).datepicker("option","minDate",e)),c&&(e=new Date(c.replace(/-/g,"/").replace(/T.+/,"")),g(this).datepicker("option","maxDate",e)),u&&void 0!==(e=r.getLimitDate(u,m))&&g(this).datepicker("option","minDate",e),d&&void 0!==(e=r.getLimitDate(d,h))&&g(this).datepicker("option","maxDate",e)},beforeShowDay:function(t){return r.restrict_date(n,p,b,t)},monthNames:datepickerLang.monthNames,monthNamesShort:datepickerLang.monthNamesShort,dayNames:datepickerLang.dayNames,dayNamesShort:datepickerLang.dayNamesShort,dayNamesMin:datepickerLang.dayNamesMin,changeMonth:!0,changeYear:!0,dateFormat:t,yearRange:o+":"+i,minDate:new Date(o,0,1),maxDate:new Date(i,11,31),firstDay:l,onClose:function(){g(this).valid()}}),g(".ui-datepicker").addClass("notranslate")},getLimitDate:function(t,e){var r=g('input[name ="'+t+'"]').val();if(void 0!==r)return t=g('input[name ="'+t+'"]').data("format").replace(/y/g,"yy"),e=e.split("_"),r=moment(r,t.toUpperCase()),r="-"===e[0]?r.subtract(e[1],e[2]):r.add(e[1],e[2]),t=moment(r).format("YYYY-MM-DD"),new Date(t)},restrict_date:function(t,e,r,n){var o=!0,i=n.getDay(),a=jQuery.datepicker.formatDate("mm/dd/yy",n);if(0!==r[0].length)for(var s=0;s<r.length;s++){var l=r[s].split("-"),f=new Date(l[0].trim()),l=new Date(l[1].trim());if(f<=n&&n<=l){o=!1;break}}return-1!==t.indexOf(i.toString())||-1!==e.indexOf(a)||!1===o?[!1,"disabledDate"]:[!0,"enabledDate"]}}),g.fn[r]=function(t){return this.each(function(){g.data(this,r)||g.data(this,r,new e(this,t))})}}(jQuery,(window,document)),function(u){"use strict";var r="forminatorFrontValidate",n={},o={rules:{},messages:{}};function e(t,e){this.element=t,this.$el=u(this.element),this.settings=u.extend({},o,e),this._defaults=o,this._name=r,this.init()}function i(t){t=String(t).trim();var e=parseFloat(t);if(String(e)===t)return a(e,2);e=t.split(/[^\dE-]+/);if(1===e.length)return a(parseFloat(t),2);t=e.pop();return a(parseFloat(e.join("")+"."+t),2)}function a(t,e){return(Math.floor(100*t)/100).toFixed(e)}u.extend(e.prototype,{init:function(){u(".forminator-select2").on("change",this.element,function(t,e){"forminator_emulate_trigger"!==e&&u(this).trigger("focusout")});var r=!1,n=this.$el;u(this.element).validate({ignore:":hidden:not(.do-validate)",errorPlacement:function(t,e){n.trigger("validation:error")},showErrors:function(t,e){r&&0<e.length&&(n.find(".forminator-response-message").html("<ul></ul>"),jQuery.each(e,function(t,e){n.find(".forminator-response-message ul").append("<li>"+e.message+"</li>")}),n.find(".forminator-response-message").removeAttr("aria-hidden").prop("tabindex","-1").addClass("forminator-accessible")),r=!1,this.defaultShowErrors(),n.trigger("validation:showError",e)},invalidHandler:function(t,e){r=!0,n.trigger("validation:invalid")},onfocusout:function(t){!1===u(t).hasClass("hasDatepicker")&&u(t).valid(),u(t).trigger("validation:focusout")},highlight:function(t,e,r){var n=u(t),o=n.closest(".forminator-field"),i=n.closest(".forminator-date-input"),a=n.closest(".forminator-timepicker"),s=!1,l=!1,f=!1,t=this.errorMap[t.name],c='<span class="forminator-error-message" aria-hidden="true"></span>';0<i.length?(l=(s=i.parent()).find('.forminator-error-message[data-error-field="'+n.data("field")+'"]'),f=s.find(".forminator-description"),c='<span class="forminator-error-message" data-error-field="'+n.data("field")+'" aria-hidden="true"></span>',0===l.length&&("day"===n.data("field")&&(s.find('.forminator-error-message[data-error-field="year"]').length?u(c).insertBefore(s.find('.forminator-error-message[data-error-field="year"]')):0===f.length?s.append(c):u(c).insertBefore(f),0===o.find(".forminator-error-message").length&&o.append('<span class="forminator-error-message" aria-hidden="true"></span>')),"month"===n.data("field")&&(s.find('.forminator-error-message[data-error-field="day"]').length?u(c).insertBefore(s.find('.forminator-error-message[data-error-field="day"]')):0===f.length?s.append(c):u(c).insertBefore(f),0===o.find(".forminator-error-message").length&&o.append('<span class="forminator-error-message" aria-hidden="true"></span>')),"year"===n.data("field")&&(0===f.length?s.append(c):u(c).insertBefore(f),0===o.find(".forminator-error-message").length&&o.append('<span class="forminator-error-message" aria-hidden="true"></span>'))),s.find('.forminator-error-message[data-error-field="'+n.data("field")+'"]').html(t),o.find(".forminator-error-message").html(t)):0<a.length?(l=(s=a.parent()).find('.forminator-error-message[data-error-field="'+n.data("field")+'"]'),f=s.find(".forminator-description"),c='<span class="forminator-error-message" data-error-field="'+n.data("field")+'" aria-hidden="true"></span>',0===l.length&&("hours"===n.data("field")&&(s.find('.forminator-error-message[data-error-field="minutes"]').length?u(c).insertBefore(s.find('.forminator-error-message[data-error-field="minutes"]')):0===f.length?s.append(c):u(c).insertBefore(f),0===o.find(".forminator-error-message").length&&o.append('<span class="forminator-error-message" aria-hidden="true"></span>')),"minutes"===n.data("field")&&(0===f.length?s.append(c):u(c).insertBefore(f),0===o.find(".forminator-error-message").length&&o.append('<span class="forminator-error-message" aria-hidden="true"></span>'))),s.find('.forminator-error-message[data-error-field="'+n.data("field")+'"]').html(t),o.find(".forminator-error-message").html(t)):(l=o.find(".forminator-error-message"),f=o.find(".forminator-description"),0===l.length&&(0===f.length?o.append(c):u(c).insertBefore(f)),o.find(".forminator-error-message").html(t)),n.attr("aria-invalid","true"),o.addClass("forminator-has_error"),n.trigger("validation:highlight")},unhighlight:function(t,e,r){var t=u(t),n=t.closest(".forminator-field"),o=t.closest(".forminator-timepicker"),i=t.closest(".forminator-date-input"),a="",a=0<i.length?i.parent().find('.forminator-error-message[data-error-field="'+t.data("field")+'"]'):0<o.length?o.parent().find('.forminator-error-message[data-error-field="'+t.data("field")+'"]'):n.find(".forminator-error-message");t.removeAttr("aria-invalid"),a.remove(),n.removeClass("forminator-has_error"),t.trigger("validation:unhighlight")},rules:this.settings.rules,messages:this.settings.messages}),u(this.element).on("forminator.validate.signature",function(){u(this).validate().form()})}}),u.fn[r]=function(t){return u.each(n,function(t,e){void 0===u.validator.methods[t]?u.validator.addMethod(t,e):"number"===t&&(u.validator.methods.number=n.number)}),this.each(function(){u.data(this,r)||u.data(this,r,new e(this,t))})},u.validator.addMethod("validurl",function(t,e){var r=u.validator.methods.url.bind(this);return r(t,e)||r("http://"+t,e)}),u.validator.addMethod("forminatorPhoneNational",function(t,e){return this.optional(e)||u(e).intlTelInput("isValidNumber")}),u.validator.addMethod("forminatorPhoneInternational",function(t,e){return this.optional(e)||u(e).intlTelInput("isValidNumber")}),u.validator.addMethod("dateformat",function(t,e,r){var n,o,i,a,s=!1,l="yy-mm-dd"===r||"yy/mm/dd"===r||"yy.mm.dd"===r?/^\d{4}-\d{1,2}-\d{1,2}$/:/^\d{1,2}-\d{1,2}-\d{4}$/;return t=t.replace(/[ /.]/g,"-"),s=!!l.test(t)&&("dd/mm/yy"===r||"dd-mm-yy"===r||"dd.mm.yy"===r?(n=t.split("-"),o=parseInt(n[0],10),i=parseInt(n[1],10),a=parseInt(n[2],10)):"mm/dd/yy"===r||"mm.dd.yy"===r||"mm-dd-yy"===r?(n=t.split("-"),i=parseInt(n[0],10),o=parseInt(n[1],10),a=parseInt(n[2],10)):(n=t.split("-"),a=parseInt(n[0],10),i=parseInt(n[1],10),o=parseInt(n[2],10)),(l=new Date(Date.UTC(a,i-1,o,12,0,0,0))).getUTCFullYear()===a&&l.getUTCMonth()===i-1&&l.getUTCDate()===o),this.optional(e)||s}),u.validator.addMethod("maxwords",function(t,e,r){return this.optional(e)||t.trim().split(/\s+/).length<=r}),u.validator.addMethod("trim",function(t,e,r){return!0===this.optional(e)||0!==t.trim().length}),u.validator.addMethod("emailWP",function(t,e,r){if(this.optional(e))return!0;if(t.trim().length<6)return!1;if(t.indexOf("@",1)<0)return!1;e=t.split("@",2);if(!e[0].match(/^[a-zA-Z0-9!#$%&'*+\/=?^_`{|}~\.-]+$/))return!1;if(e[1].match(/\.{2,}/))return!1;var n=e[1].split(".");if(n.length<2)return!1;for(var o=n.length,i=0;i<o;i++)if(!n[i].match(/^[a-z0-9-]+$/i))return!1;return!0}),u.validator.addMethod("forminatorPasswordStrength",function(t,e,r){t=t.trim();if(0==t.length)return!0;if(!t||t.length<8)return!1;var n=0;return t.match(/[0-9]/)&&(n+=10),t.match(/[a-z]/)&&(n+=20),t.match(/[A-Z]/)&&(n+=20),t.match(/[^a-zA-Z0-9]/)&&(n+=30),t.match(/[=!\-@.,_*#&?^`%$+\/{\[\]|}^?~]/)&&(n+=30),54<=Math.log(Math.pow(n,t.length))/Math.LN2}),u.validator.addMethod("extension",function(t,e,r){var n,o=!1;return""!==t.trim()&&(n=(n=t.replace(/^.*\./,""))==t?"notExt":n.toLowerCase(),-1!=r.indexOf(n)&&(o=!0)),this.optional(e)||o}),u.validator.methods.number=function(t,e,r){return this.optional(e)||/^[-+]?[0-9]+[.]?[0-9]*([eE][-+]?[0-9]+)?$/.test(t)},u.validator.addMethod("minNumber",function(t,e,r){return 0===t.length||r<=i(t)}),u.validator.addMethod("maxNumber",function(t,e,r){return 0===t.length||i(t)<=r}),n=u.validator.methods}(jQuery,(window,document)),function(i,c,t,o){"use strict";c.paypalHasCondition=!1;var n="forminatorFrontCondition",a={fields:{},relations:{}};function r(t,e,r){this.element=t,this.$el=i(this.element),this.settings=i.extend({},a,e),this._defaults=a,this._name=n,this.calendar=r[0],this.init()}i.extend(r.prototype,{init:function(){var n=this,r=this.$el;this.add_missing_relations(),this.$el.find(".forminator-field input, .forminator-row input[type=hidden], .forminator-field select, .forminator-field textarea, .forminator-field-signature").on("change input",function(t){var e=i(this),r=(r=void 0===(r=e.closest(".forminator-col").attr("id"))?"1"===e.attr("data-multi")?e.attr("name"):e.attr("id"):r).trim();return!(!n.has_relations(r)&&!n.has_siblings(r))&&(n.has_siblings(r)&&n.trigger_fake_parent_date_field(r),!n.has_relations(r)&&n.has_siblings(r)?(n.trigger_siblings(r),!1):(n.process_relations(r,e,t),n.paypal_button_condition(),void n.maybe_clear_upload_container()))}),i(t).on("tinymce-editor-init",function(t,e){e.on("change",function(t){r.find("#"+i(this).attr("id")).change()})}),"undefined"!=typeof tinyMCE&&tinyMCE.activeEditor&&tinyMCE.activeEditor.on("change",function(t){r.find("#"+i(this).attr("id")).change()}),this.$el.find(".forminator-button.forminator-button-back, .forminator-button.forminator-button-next").on("click",function(){r.find('.forminator-field input:not([type="file"]), .forminator-row input[type=hidden], .forminator-field select, .forminator-field textarea').trigger("change","forminator_emulate_trigger")}),this.$el.find(".forminator-field input, .forminator-row input[type=hidden], .forminator-field select, .forminator-field textarea").trigger("change","forminator_emulate_trigger"),this.init_events()},process_relations:function(t,s,l){var f=this;f.get_relations(t).forEach(function(t){var e,r=f.get_field_logic(t),n=r.action,o=r.rule,i=r.conditions,a=0;0===t.indexOf("paypal")&&0!==r.length&&(c.paypalHasCondition=!0),i.forEach(function(t){f.is_applicable_rule(t,n)&&a++}),"all"===o&&a===i.length||"any"===o&&0<a?(s instanceof jQuery&&(e=s.closest(".forminator-pagination")),"submit"===t&&void 0!==e&&f.toggle_field(t,"show","valid"),f.toggle_field(t,n,"valid"),f.has_relations(t)&&("hide"===n?f.hide_element(t,l):f.show_element(t,l))):(f.toggle_field(t,n,"invalid"),f.has_relations(t)&&("show"===n?f.hide_element(t,l):f.show_element(t,l)))})},init_events:function(){var e=this;this.$el.on("forminator.front.condition.restart",function(t){e.on_restart(t)})},on_restart:function(t){this.$el.find('.forminator-field input:not([type="file"]), .forminator-row input[type=hidden], .forminator-field select, .forminator-field textarea').trigger("change","forminator_emulate_trigger")},add_missing_relations:function(){var t,r=this,n={};void 0!==this.settings.fields&&(t=this.settings.fields,Object.keys(t).forEach(function(e){t[e].conditions.forEach(function(t){t=t.field;r.has_relations(t)||(void 0===n[t]&&(n[t]=[]),n[t].push(e))})})),Object.keys(n).forEach(function(t){r.settings.relations[t]=n[t]})},get_field_logic:function(t){return void 0===this.settings.fields[t]?[]:this.settings.fields[t]},has_relations:function(t){return void 0!==this.settings.relations[t]},get_relations:function(t){return this.has_relations(t)?this.settings.relations[t]:[]},get_field_value:function(t){if(""===t)return"";var t=this.get_form_field(t),e=t.val();return this.field_is_radio(t)?e=t.filter(":checked").val():this.field_is_signature(t)?e=t.find("input[id$='_data']").val():this.field_is_checkbox(t)?(e=[],t.each(function(){i(this).is(":checked")&&e.push(i(this).val().toLowerCase())}),0===e.length&&(e=null)):this.field_is_textarea_wpeditor(t)?"undefined"!=typeof tinyMCE&&tinyMCE.activeEditor&&(e=tinyMCE.activeEditor.getContent()):this.field_has_inputMask(t)&&(e=t.inputmask("unmaskedvalue")),e||""},get_date_field_value:function(t){if(""===t)return"";var e=this.get_form_field(t),r=!0,n=(e instanceof jQuery&&(r=!1,e.hasClass("forminator-col")&&(r=!0)),"");if(!r&&this.field_is_datepicker(e)){switch(n=e.val(),e.data("format")){case"dd/mm/yy":n=e.val().split("/").reverse().join("-");break;case"dd.mm.yy":n=e.val().split(".").reverse().join("-");break;case"dd-mm-yy":n=e.val().split("-").reverse().join("-")}var o=new Date,n={year:(o=""!==n?new Date(n):o).getFullYear(),month:o.getMonth(),date:o.getDate(),day:o.getDay()}}else{var t=!0===r?t:e.data("parent"),i=this.get_form_field_value(t+"-year"),a=this.get_form_field_value(t+"-month"),t=this.get_form_field_value(t+"-day");if(""!==i&&""!==a&&""!==t){o=new Date(i+"-"+a+"-"+t);if(!0===r)return o;n={year:o.getFullYear(),month:o.getMonth(),date:o.getDate(),day:o.getDay()}}}return n||""},field_has_inputMask:function(t){var e=!1;return t.each(function(){if(o!==i(this).attr("data-inputmask"))return!(e=!0)}),e},field_is_radio:function(t){var e=!1;return t.each(function(){if("radio"===i(this).attr("type"))return!(e=!0)}),e},field_is_signature:function(t){var e=!1;return t.each(function(){if(0<i(this).find(".forminator-field-signature").length)return!(e=!0)}),e},field_is_datepicker:function(t){var e=!1;return t.each(function(){if(i(this).hasClass("forminator-datepicker"))return!(e=!0)}),e},field_is_checkbox:function(t){var e=!1;return t.each(function(){if("checkbox"===i(this).attr("type"))return!(e=!0)}),e},field_is_select:function(t){return t.is("select")},field_is_textarea_wpeditor:function(t){var e=!1;return t.each(function(){if(i(this).parent(".wp-editor-container").parent("div").hasClass("tmce-active"))return!(e=!0)}),e},field_is_upload:function(t){var e=!1;return e=-1!==t.indexOf("upload")?!0:e},get_form_field:function(t){var e=this.$el.find("#"+t+"-field");return e=0===e.length&&0===(e=this.$el.find("."+t+"-payment")).length&&0===(e=this.$el.find('input[name="'+t+'"]')).length&&0===(e=this.$el.find('textarea[name="'+t+'"]')).length&&0===(e=this.$el.find('input[name="'+t+'[]"]')).length&&0===(e=this.$el.find('select[name="'+t+'"]')).length?this.$el.find("#"+t):e},get_form_field_value:function(t){var e=this.$el.data("form-id"),e=this.$el.find("#forminator-form-"+e+"__field--"+t);return(e=0===e.length&&0===(e=this.$el.find("#"+t+"-field")).length&&0===(e=this.$el.find('input[name="'+t+'"]')).length&&0===(e=this.$el.find('textarea[name="'+t+'"]')).length&&0===(e=this.$el.find('input[name="'+t+'[]"]')).length&&0===(e=this.$el.find('select[name="'+t+'"]')).length?this.$el.find("#"+t):e).val()},is_numeric:function(t){return!isNaN(parseFloat(t))&&isFinite(t)},is_date_rule:function(t){return["day_is","day_is_not","month_is","month_is_not","is_before","is_after","is_before_n_or_more_days","is_before_less_than_n_days","is_after_n_or_more_days","is_after_less_than_n_days"].includes(t)},has_siblings:function(t){return""!==t&&!!(t=this.get_form_field(t)).data("parent")},trigger_fake_parent_date_field:function(t){t=this.get_form_field(t).data("parent");this.process_relations(t,{},{})},trigger_siblings:function(r){var n=this,t=n.get_form_field(r).data("parent");i.each([t+"-year",t+"-month",t+"-day"],function(t,e){r!==e&&n.has_relations(e)&&n.get_form_field(e).trigger("change")})},is_applicable_rule:function(t,e){if(void 0===t)return!1;r=this.is_date_rule(t.operator)?this.get_date_field_value(t.field):this.get_field_value(t.field);var r,n=t.value,o=t.operator;return"show"===e?this.is_matching(r,n,o)&&this.is_hidden(t.field):this.is_matching(r,n,o)},is_hidden:function(t){t=this.get_form_field(t).closest(".forminator-col").closest(".forminator-row");return!!t.hasClass("forminator-hidden-option")||!t.hasClass("forminator-hidden")},is_matching:function(t,e,r){var n,o=Array.isArray(t);switch("string"==typeof t&&(t=t.toLowerCase()),"string"==typeof e&&(e=e.toLowerCase(),"month_is"!==r&&"month_is_not"!==r||i.inArray(e,n={jan:0,feb:1,mar:2,apr:3,may:4,jun:5,jul:6,aug:7,sep:8,oct:9,nov:10,dec:11})&&(e=n[e]),"day_is"!==r&&"day_is_not"!==r||i.inArray(e,n={su:0,mo:1,tu:2,we:3,th:4,fr:5,sa:6})&&(e=n[e])),r){case"is":return o?-1<i.inArray(e,t):t===e;case"is_not":return o?-1===i.inArray(e,t):t!==e;case"is_great":return e=+e,!(!this.is_numeric(t=+t)||!this.is_numeric(e))&&e<t;case"is_less":return e=+e,!(!this.is_numeric(t=+t)||!this.is_numeric(e))&&t<e;case"contains":return this.contains(t,e);case"starts":return t.startsWith(e);case"ends":return t.endsWith(e);case"month_is":return t.month===e;case"month_is_not":return t.month!==e;case"day_is":return t.day===e;case"day_is_not":return t.day!==e;case"is_before":return this.date_is_smaller(t,e);case"is_after":return this.date_is_grater(t,e);case"is_before_n_or_more_days":return this.date_is_n_days_before_current_date(t,e);case"is_before_less_than_n_days":return this.date_is_less_than_n_days_before_current_date(t,e);case"is_after_n_or_more_days":return this.date_is_n_days_after_current_date(t,e);case"is_after_less_than_n_days":return this.date_is_less_than_n_days_after_current_date(t,e)}return!1},contains:function(t,e){return 0<=t.toLowerCase().indexOf(e)},date_is_grater:function(t,e){return 1===forminatorDateUtil.compare(t,e)},date_is_smaller:function(t,e){return-1===forminatorDateUtil.compare(t,e)},date_is_equal:function(t,e){return 0===forminatorDateUtil.compare(t,e)},date_is_n_days_before_current_date:function(t,e){e=parseInt(e);var r=this.get_current_date(),t=forminatorDateUtil.diffInDays(t,r);return!isNaN(t)&&(0===e?t===e:e<=t)},date_is_less_than_n_days_before_current_date:function(t,e){e=parseInt(e);var r=this.get_current_date(),t=forminatorDateUtil.diffInDays(t,r);return!isNaN(t)&&(t<e&&0<t)},date_is_n_days_after_current_date:function(t,e){e=parseInt(e);var r=this.get_current_date(),r=forminatorDateUtil.diffInDays(r,t);return!isNaN(r)&&(0===e?r===e:e<=r)},date_is_less_than_n_days_after_current_date:function(t,e){e=parseInt(e);var r=this.get_current_date(),r=forminatorDateUtil.diffInDays(r,t);return!isNaN(r)&&(r<e&&0<r)},get_current_date:function(){return new Date},toggle_field:function(t,e,r){var n=this.get_form_field(t),o=n.closest(".forminator-col"),i=o.find(".forminator-input-file-required"),a=o.find("[id ^=ctlSignature][id $=_data]"),s=o.find(".forminator-wp-editor-required"),l=o.closest(".forminator-row"),f=this.$el.find(".forminator-pagination-footer").find(".forminator-button-next"),c=this.$el.find("submit"===t?".forminator-button-submit":"#forminator-paypal-submit");"show"===e&&("valid"===r?(l.removeClass("forminator-hidden"),o.removeClass("forminator-hidden"),f.removeClass("forminator-hidden"),0<i.length&&i.addClass("do-validate"),0<s.length&&s.addClass("do-validate"),0<a.length&&a.addClass("do-validate"),"submit"===t&&c.removeClass("forminator-hidden"),0===t.indexOf("paypal")&&c.removeClass("forminator-hidden")):(o.addClass("forminator-hidden"),"submit"===t&&c.addClass("forminator-hidden"),0===t.indexOf("paypal")&&c.addClass("forminator-hidden"),0<i.length&&i.removeClass("do-validate"),0<s.length&&s.removeClass("do-validate"),0<a.length&&a.removeClass("do-validate"),0===l.find("> .forminator-col:not(.forminator-hidden)").length&&l.addClass("forminator-hidden"))),"hide"===e&&("valid"===r?(o.addClass("forminator-hidden"),c.addClass("forminator-hidden"),0<i.length&&i.removeClass("do-validate"),0<s.length&&s.removeClass("do-validate"),0<a.length&&a.removeClass("do-validate"),0===l.find("> .forminator-col:not(.forminator-hidden)").length&&l.addClass("forminator-hidden")):(l.removeClass("forminator-hidden"),o.removeClass("forminator-hidden"),c.removeClass("forminator-hidden"),0<i.length&&i.addClass("do-validate"),0<s.length&&s.addClass("do-validate"),0<a.length&&a.addClass("do-validate"))),this.$el.trigger("forminator:field:condition:toggled"),this.toggle_confirm_password(n)},clear_value:function(t,e){var r=this.get_form_field(t),n=this.get_field_value(t);r.hasClass("forminator-cleared-value")||(r.addClass("forminator-cleared-value"),e.originalEvent!==o&&(this.field_is_radio(r)?(r.attr("data-previous-value",n),r.removeAttr("checked")):this.field_is_checkbox(r)?r.each(function(){i(this).is(":checked")&&i(this).attr("data-previous-value",n),i(this).removeAttr("checked")}):(r.attr("data-previous-value",n),r.val(""))))},restore_value:function(t,e){var r=this.get_form_field(t),n=r.attr("data-previous-value");r.hasClass("forminator-cleared-value")&&e.originalEvent!==o&&(r.removeClass("forminator-cleared-value"),this.field_is_upload(t)||n&&(this.field_is_radio(r)?r.val([n]):this.field_is_checkbox(r)?r.each(function(){var t=i(this).attr("data-previous-value");t&&0<=t.indexOf(i(this).val())&&i(this).attr("checked","checked")}):r.val(n)))},hide_element:function(t,e){var r=this,n=r.get_relations(t);r.clear_value(t,e),n.forEach(function(t){r.toggle_field(t,"hide","valid"),r.has_relations(t)&&(n=r.hide_element(t,e))})},show_element:function(t,i){var a=this,s=a.get_relations(t);this.restore_value(t,i),this.textareaFix(this.$el,t,i),s.forEach(function(t){var e=a.get_field_logic(t),r=e.action,n=e.rule,e=e.conditions,o=0;e.forEach(function(t){a.is_applicable_rule(t,r)&&o++}),"all"===n&&o===e.length||"any"===n&&0<o?a.toggle_field(t,r,"valid"):a.toggle_field(t,r,"invalid"),a.has_relations(t)&&(s=a.show_element(t,i))})},paypal_button_condition:function(){var t=this.$el.find(".forminator-paypal-row"),e=this.$el.find(".forminator-pagination-footer").find(".forminator-button-paypal");0<t.length&&(this.$el.find(".forminator-button-submit").closest(".forminator-row").removeClass("forminator-hidden"),t.hasClass("forminator-hidden")||this.$el.find(".forminator-button-submit").closest(".forminator-row").addClass("forminator-hidden")),0<e.length&&(e.hasClass("forminator-hidden")?this.$el.find(".forminator-button-submit").removeClass("forminator-hidden"):this.$el.find(".forminator-button-submit").addClass("forminator-hidden"))},maybe_clear_upload_container:function(){this.$el.find('.forminator-row.forminator-hidden input[type="file"]').each(function(){""===i(this).val()&&(i(this).parent().hasClass("forminator-multi-upload")?i(this).parent().siblings(".forminator-uploaded-files").empty():(i(this).siblings("span").text(i(this).siblings("span").data("empty-text")),i(this).siblings(".forminator-button-delete").hide()))})},textareaFix:function(t,e,r){var n=i("#"+e+" .forminator-label");e.includes("textarea")&&t.hasClass("forminator-design--material")&&0<n.length&&(t=i("#"+e+" .forminator-textarea"),e=n.height()+9,n.css({"padding-top":e+"px"}),t.css({"padding-top":e+"px"}))},toggle_confirm_password:function(t){0!==t.length&&t.attr("id")&&-1!==t.attr("id").indexOf("password")&&((t=t.closest(".forminator-col")).hasClass("forminator-hidden")?t.parent(".forminator-row").next(".forminator-row").addClass("forminator-hidden"):t.parent(".forminator-row").next(".forminator-row").removeClass("forminator-hidden"))}}),i.fn[n]=function(t,e){return this.each(function(){i.data(this,n)||i.data(this,n,new r(this,t,e))})}}(jQuery,window,document),function(h,p){"use strict";var r="forminatorFrontSubmit",n={form_type:"custom-form",forminatorFront:!1,forminator_selector:"",chart_design:"bar",chart_options:{}};function e(t,e){this.element=t,this.$el=h(this.element),this.forminatorFront=null,this.settings=h.extend({},n,e),this._defaults=n,this._name=r,this.init()}h.extend(e.prototype,{init:function(){switch(this.forminatorFront=this.$el.data("forminatorFront"),this.settings.form_type){case"custom-form":this.settings.forminator_selector&&h(this.settings.forminator_selector).length||(this.settings.forminator_selector=".forminator-custom-form"),this.handle_submit_custom_form();break;case"quiz":this.settings.forminator_selector&&h(this.settings.forminator_selector).length||(this.settings.forminator_selector=".forminator-quiz"),this.handle_submit_quiz();break;case"poll":this.settings.forminator_selector&&h(this.settings.forminator_selector).length||(this.settings.forminator_selector=".forminator-poll"),this.handle_submit_poll()}},decodeHtmlEntity:function(t){return t.replace(/&#(\d+);/g,function(t,e){return String.fromCharCode(e)})},handle_submit_custom_form:function(){var c=this,u=h(this.element),r=(c.$el.find(".forminator-response-message").find(".forminator-label--success").not(":hidden").length&&c.focus_to_element(c.$el.find(".forminator-response-message")),h(".def-ajaxloader").hide(),!1);h("body").on("click","#lostPhone",function(t){t.preventDefault();var e=h(this);!1===r&&(r=!0,h.ajax({type:"GET",url:e.attr("href"),beforeSend:function(){e.attr("disabled","disabled"),h(".def-ajaxloader").show()},success:function(t){e.removeAttr("disabled"),h(".def-ajaxloader").hide(),h(".notification").text(t.data.message),r=!1}}))}),h("body").on("click",".auth-back",function(t){t.preventDefault();t=c.$el.attr("id");h("#"+(t+"-authentication")+"-input").attr("disabled","disabled"),FUI.closeAuthentication()}),h("body").on("submit.frontSubmit",this.settings.forminator_selector,function(t){var s=h(this),e=this,r=t,l=new FormData(this),f=s.find(".forminator-response-message"),n=c.$el.find(".forminator-g-recaptcha, .forminator-hcaptcha");if(c.settings.inline_validation&&0<c.$el.find(".forminator-uploaded-files").length&&0<c.$el.find(".forminator-uploaded-files li.forminator-has_error").length)return!1;if(void 0!==r.originalEvent){var o=h(this).find(".forminator-button-submit").first();if(0===o.length||h(o).closest(".forminator-col").hasClass("forminator-hidden"))return!1}if(c.$el.data("forminatorFrontPayment")&&!1===c.processCaptcha(c,n,f))return!1;c.multi_upload_disable(s,!0);function i(){if(l=new FormData(this),!c.$el.data("forminatorFrontPayment")&&!1===c.processCaptcha(c,n,f))return!1;c.$el.hasClass("forminator_ajax")?(f.html(""),c.$el.find(".forminator-button-submit").addClass("forminator-button-onload"),c.$el.find("input[type=file]").each(function(){""===h(this).val()&&"function"==typeof p.FormData.prototype.delete&&l.delete(h(this).attr("name"))}),void 0!==c.settings.has_loader&&c.settings.has_loader&&("login"!==c.$el.find('input[name="form_type"]').val()&&u.addClass("forminator-fields-disabled"),f.html("<p>"+c.settings.loader_label+"</p>"),c.focus_to_element(f),f.removeAttr("aria-hidden").prop("tabindex","-1").removeClass("forminator-success forminator-error forminator-accessible").addClass("forminator-loading forminator-show")),t.preventDefault(),h.ajax({type:"POST",url:p.ForminatorFront.ajaxUrl,data:l,cache:!1,contentType:!1,processData:!1,beforeSend:function(){s.find("button").attr("disabled",!0),s.trigger("before:forminator:form:submit",l)},success:function(t){if(!t&&void 0!==t||"object"!=typeof t.data)return s.find("button").removeAttr("disabled"),f.addClass("forminator-error").html("<p>"+p.ForminatorFront.cform.error+"<br>("+t.data+")</p>"),c.focus_to_element(f),!1;if(s.find(".forminator-error-message").not(".forminator-uploaded-files .forminator-error-message").remove(),s.find(".forminator-field").removeClass("forminator-has_error"),s.find("button").removeAttr("disabled"),f.html("").removeClass("forminator-accessible forminator-error forminator-success"),c.settings.hasLeads&&void 0!==t.data.entry_id)return c.showQuiz(u),h("#forminator-module-"+c.settings.quiz_id+" input[name=entry_id]").val(t.data.entry_id),"end"===c.settings.form_placement&&h("#forminator-module-"+c.settings.quiz_id).submit(),!1;var e,r;if(void 0!==t&&void 0!==t.data&&void 0!==t.data.authentication&&("show"===t.data.authentication||"invalid"===t.data.authentication))return i=c.$el.attr("id"),r=h("#"+(e=i+"-authentication")),a=h("#"+e+"-input"),n=h("#"+e+"-token"),r.find(".forminator-authentication-notice").removeClass("error"),r.find(".lost-device-url").attr("href",t.data.lost_url),"show"===t.data.authentication&&(c.$el.find(".forminator-authentication-nav").html("").append(t.data.auth_nav),c.$el.find(".forminator-authentication-box").hide(),"fallback-email"===t.data.auth_method&&(c.$el.find(".wpdef-2fa-email-resend input").click(),c.$el.find(".notification").hide()),c.$el.find("#forminator-2fa-"+t.data.auth_method).show(),c.$el.find(".forminator-authentication-box input").attr("disabled",!0),c.$el.find("#forminator-2fa-"+t.data.auth_method+" input").attr("disabled",!1),c.$el.find(".forminator-2fa-link").show(),c.$el.find("#forminator-2fa-link-"+t.data.auth_method).hide(),a.removeAttr("disabled").val(t.data.auth_method),n.val(t.data.auth_token),FUI.openAuthentication(e,i,e+"-input")),"invalid"===t.data.authentication&&(r.find(".forminator-authentication-notice").addClass("error"),r.find(".forminator-authentication-notice").html("<p>"+t.data.message+"</p>")),!1;var n,o,i,a=t.success?"forminator-success":"forminator-error";void 0!==t.message?(f.removeAttr("aria-hidden").prop("tabindex","-1").addClass(a+" forminator-show"),c.focus_to_element(f,!1,t.fadeout,t.fadeout_time),f.html(t.message),!t.data.success&&t.data.errors.length&&(o='<ul class="forminator-screen-reader-only">',h.each(t.data.errors,function(t,e){for(var r in e)e.hasOwnProperty(r)&&(o+="<li>"+e[r]+"</li>")}),o+="</ul>",f.append(o))):void 0!==t.data&&(n=!0,(n=void 0!==t.data.url&&void 0!==t.data.newtab&&"newtab_thankyou"!==t.data.newtab?!1:n)&&(f.removeAttr("aria-hidden").prop("tabindex","-1").addClass(a+" forminator-show"),c.focus_to_element(f,!1,t.data.fadeout,t.data.fadeout_time),f.html(t.data.message)),!t.data.success&&void 0!==t.data.errors&&t.data.errors.length&&(o='<ul class="forminator-screen-reader-only">',h.each(t.data.errors,function(t,e){for(var r in e)e.hasOwnProperty(r)&&(o+="<li>"+e[r]+"</li>")}),o+="</ul>",f.append(o)),void 0!==t.data.stripe3d&&(void 0!==t.data.subscription?s.trigger("forminator:form:submit:stripe:3dsecurity",[t.data.secret,t.data.subscription]):s.trigger("forminator:form:submit:stripe:3dsecurity",[t.data.secret,!1]))),t.data.success||(s.trigger("forminator:form:submit:failed",l),c.multi_upload_disable(s,!1),void 0!==t.data.errors&&t.data.errors.length&&c.show_messages(t.data.errors)),!0===t.success&&(i=void 0!==t.data.behav&&"behaviour-hide"===t.data.behav,s[0]&&(c.settings.resetEnabled&&!i&&s[0].reset(),c.$el.trigger("forminator:field:condition:toggled"),s.find(".forminator-field-signature img").trigger("click"),void 0!==t.data.select_field&&h.each(t.data.select_field,function(r,t){0<t.length&&h.each(t,function(t,e){e.value&&("multiselect"===e.type?s.find("#"+r+" input[value="+e.value+"]").closest(".forminator-option"):s.find("#"+r+" option[value="+e.value+"]")).remove().trigger("change")})}),s.find(".forminator-button-delete").hide(),s.find(".forminator-file-upload input").val(""),s.find(".forminator-file-upload > span").html(p.ForminatorFront.cform.no_file_chosen),s.find("ul.forminator-uploaded-files").html(""),c.$el.find("ul.forminator-uploaded-files").html(""),c.$el.find(".forminator-multifile-hidden").val(""),0<s.find(".forminator-select").length&&s.find(".forminator-select").each(function(t,e){var r=h(e).data("default-value");""===r&&(r=h(e).val()),h(e).val(r).trigger("fui:change")}),s.find(".multiselect-default-values").each(function(){var t=""!==h(this).val()?h.parseJSON(h(this).val()):[],r=Object.values(t);h(this).closest(".forminator-multiselect").find('input[type="checkbox"]').each(function(t,e){-1!==h.inArray(h(e).val(),r)?(h(e).prop("checked",!0),h(e).closest("label").addClass("forminator-is_checked")):(h(e).prop("checked",!1),h(e).closest("label").removeClass("forminator-is_checked"))})}),c.multi_upload_disable(s,!1),s.trigger("forminator:form:submit:success",l),s.trigger("forminator.front.condition.restart")),void 0!==t.data.url&&(void 0!==t.data.newtab&&"sametab"!==t.data.newtab?("newtab_hide"===t.data.newtab&&c.$el.hide(),p.open(c.decodeHtmlEntity(t.data.url),"_blank")):p.location.href=c.decodeHtmlEntity(t.data.url)),i&&(c.$el.find(".forminator-row").hide(),c.$el.find(".forminator-pagination-steps").hide(),c.$el.find(".forminator-pagination-footer").hide(),c.$el.find(".forminator-pagination-steps, .forminator-pagination-progress").hide()))},error:function(t){s.find("button").removeAttr("disabled"),f.html("");t=400===t.status?p.ForminatorFront.cform.upload_error:p.ForminatorFront.cform.error;f.html('<label class="forminator-label--notice"><span>'+t+"</span></label>"),c.focus_to_element(f),s.trigger("forminator:form:submit:failed",l),c.multi_upload_disable(s,!1)},complete:function(t,e){c.$el.find(".forminator-button-submit").removeClass("forminator-button-onload"),s.trigger("forminator:form:submit:complete",l)}}).always(function(){void 0!==c.settings.has_loader&&c.settings.has_loader&&(u.removeClass("forminator-fields-disabled forminator-partial-disabled"),f.removeClass("forminator-loading")),s.trigger("after:forminator:form:submit",l)})):(void 0!==c.settings.has_loader&&c.settings.has_loader&&(u.addClass("forminator-fields-disabled"),f.html("<p>"+c.settings.loader_label+"</p>"),f.removeAttr("aria-hidden").prop("tabindex","-1").removeClass("forminator-success forminator-error forminator-accessible").addClass("forminator-loading forminator-show")),r.currentTarget.submit())}o=c.$el.find('div[data-is-payment="true"]').closest(".forminator-row").hasClass("forminator-hidden");return c.$el.data("forminatorFrontPayment")&&!o?c.$el.trigger("payment.before.submit.forminator",[l,function(){i.apply(e)}]):i.apply(e),!1})},processCaptcha:function(t,e,r){if(e.length){var n=(e=h(e.get(0))).data("size"),o=e.parent(".forminator-col");if(e.hasClass("forminator-g-recaptcha")){var i=e.data("forminator-recapchta-widget"),a=p.grecaptcha.getResponse(i);if("invisible"===n&&0===a.length)return p.grecaptcha.execute(i),!1;t.$el.hasClass("forminator_ajax")&&p.grecaptcha.reset(i)}else if(e.hasClass("forminator-hcaptcha")){i=e.data("forminator-hcaptcha-widget"),a=hcaptcha.getResponse(i);if("invisible"===n&&0===a.length)return hcaptcha.execute(i),!1;t.$el.hasClass("forminator_ajax")&&hcaptcha.reset(i)}if(r.html(""),e.hasClass("error")&&e.removeClass("error"),0===a.length)return e.hasClass("error")||e.addClass("error"),r.html('<label class="forminator-label--error"><span>'+p.ForminatorFront.cform.captcha_error+"</span></label>"),t.settings.inline_validation?o.hasClass("forminator-has_error")||"invisible"===e.data("size")||(o.addClass("forminator-has_error").append('<span class="forminator-error-message" aria-hidden="true">'+p.ForminatorFront.cform.captcha_error+"</span>"),t.focus_to_element(o)):t.focus_to_element(r),!1}},hideForm:function(t){t.css({height:0,opacity:0,overflow:"hidden",visibility:"hidden","pointer-events":"none",margin:0,padding:0,border:0})},showForm:function(t){t.css({height:"",opacity:"",overflow:"",visibility:"","pointer-events":"",margin:"",padding:"",border:""})},showQuiz:function(t){var e=h("#forminator-module-"+this.settings.quiz_id),r=h("#forminator-quiz-leads-"+this.settings.quiz_id);this.hideForm(t),r.find(".forminator-lead-form-skip").hide(),void 0!==this.settings.form_placement&&"beginning"===this.settings.form_placement&&(this.showForm(e),e.find(".forminator-pagination").length&&(r.find(".forminator-quiz-intro").hide(),e.prepend('<button class="forminator-button forminator-quiz-start forminator-hidden"></button>').find(".forminator-quiz-start").trigger("click").remove()))},handle_submit_quiz:function(t){var u=this,c=void 0!==u.settings.hasLeads&&u.settings.hasLeads,d=void 0!==u.settings.leads_id?u.settings.leads_id:0,m=void 0!==u.settings.quiz_id?u.settings.quiz_id:0;h("body").on("submit.frontSubmit",this.settings.forminator_selector,function(t){var e,r=h(this),n=new FormData(this),o=r.find(".forminator-answer"),i=u.$el.find(".forminator-button").last(),a=i.data("loading"),s=void 0!==u.settings.form_placement?u.settings.form_placement:"",l=void 0!==u.settings.skip_form?u.settings.skip_form:"";if(t.preventDefault(),t.stopPropagation(),u.$el.find(".forminator-has-been-disabled").removeAttr("disabled"),e=r.serialize(),u.$el.find(".forminator-has-been-disabled").attr("disabled","disabled"),c){t="";if(0<u.$el.find("input[name=entry_id]").length&&(t=u.$el.find("input[name=entry_id]").val()),"end"===s&&""===t)return u.showForm(h("#forminator-module-"+d)),u.$el.find(".forminator-quiz--result").addClass("forminator-hidden"),h("#forminator-quiz-leads-"+m+" .forminator-lead-form-skip").show(),!1;if(!l&&""===t)return!1}""!==a&&i.text(a),u.settings.has_quiz_loader&&o.each(function(){var t=h(this),e=t.find("input"),t=t.find(".forminator-answer--status");e.is(":checked")&&0===t.html().length&&t.html('<i class="forminator-icon-loader forminator-loading"></i>')});var f=!!u.$el.find(".forminator-pagination");return h.ajax({type:"POST",url:p.ForminatorFront.ajaxUrl,data:e,beforeSend:function(){f||u.$el.find("button").attr("disabled","disabled"),r.trigger("before:forminator:quiz:submit",[e,n])},success:function(c){var t;c.success?(t="",u.$el.find(".forminator-quiz--result").removeClass("forminator-hidden"),p.history.pushState("forminator","Forminator",c.data.result_url),"nowrong"===c.data.type?(t=c.data.result,u.$el.find(".forminator-quiz--result").html(t),f||u.$el.find(".forminator-answer input").attr("disabled","disabled")):"knowledge"===c.data.type&&(t=c.data.finalText,0<u.$el.find(".forminator-quiz--result").length&&u.$el.find(".forminator-quiz--result").html(t),Object.keys(c.data.result).forEach(function(t){var e,r=u.$el.find("#"+t),n=r.find(".forminator-question--result"),o=r.find(".forminator-submit-rightaway"),i=r.find(".forminator-answer input"),a=c.data.result[t].isCorrect?(e="forminator-is_correct",'<i class="forminator-icon-check"></i>'):(e="forminator-is_incorrect",'<i class="forminator-icon-cancel"></i>');if(n.text(c.data.result[t].message),n.addClass("forminator-show"),o.attr("disabled",!0),o.attr("aria-disabled",!0),i.attr("disabled",!0),i.attr("aria-disabled",!0),void 0===c.data.result[t].answer)for(var s,l=c.data.result[t].answers,f=0;f<l.length;f++)(s=r.find('[id|="'+l[f].id+'"]').closest(".forminator-answer")).addClass(e),(0===s.find(".forminator-answer--status").html().length||0!==s.find(".forminator-answer--status .forminator-icon-loader").length)&&s.find(".forminator-answer--status").html(a);else(s=r.find('[id|="'+c.data.result[t].answer+'"]').closest(".forminator-answer")).addClass(e),0!==s.find(".forminator-answer--status").html().length&&0===s.find(".forminator-answer--status .forminator-icon-loader").length||s.find(".forminator-answer--status").html(a)})),r.trigger("forminator:quiz:submit:success",[e,n,t])):(u.$el.find("button").removeAttr("disabled"),r.trigger("forminator:quiz:submit:failed",[e,n]))}}).always(function(){r.trigger("after:forminator:quiz:submit",[e,n])}),!1}),h("body").on("click","#forminator-quiz-leads-"+m+" .forminator-lead-form-skip",function(t){u.showQuiz(h("#forminator-module-"+d)),void 0!==u.settings.form_placement&&"end"===u.settings.form_placement&&(u.settings.form_placement="skip",u.$el.submit())}),h("body").on("click",".forminator-result--retake",function(t){var e={action:"forminator_reload_quiz",pageId:u.$el.find('input[name="page_id"]').val(),nonce:u.$el.find('input[name="forminator_nonce"]').val()};t.preventDefault(),h.post(p.ForminatorFront.ajaxUrl,e,function(t){1==t.success&&t.html&&p.location.replace(t.html)})})},handle_submit_poll:function(){var c=this,u=c.$el.html();c.$el.find(".forminator-response-message").not(":hidden").length&&c.focus_to_element(c.$el.find(".forminator-response-message"),!0),h("body").on("submit.frontSubmit",this.settings.forminator_selector,function(t){var r=h(this),n=new FormData(this),o=r.serialize(),i=c.$el.find(".forminator-response-message"),a=c.$el.find("fieldset"),s=c.$el.find(".forminator-button");function l(){i.html(""),i.removeClass("forminator-show"),i.removeClass("forminator-error"),i.removeClass("forminator-success"),i.removeAttr("tabindex"),i.attr("aria-hidden",!0),a.removeClass("forminator-has_error")}function f(t,e){i.html("<p>"+t+"</p>"),i.addClass("forminator-"+e),i.addClass("forminator-show"),i.removeAttr("aria-hidden"),i.attr("tabindex","-1"),i.focus(),"error"!==e||a.find('input[type="radio"]').is(":checked")||a.addClass("forminator-has_error")}return!c.$el.hasClass("forminator_ajax")||(l(),h.ajax({type:"POST",url:p.ForminatorFront.ajaxUrl,data:o,beforeSend:function(){s.addClass("forminator-onload"),r.trigger("before:forminator:poll:submit",[o,n])},success:function(t){var e=t.success?"success":"error";s.removeClass("forminator-onload"),!1===t.success?(f(t.data.message,e),r.trigger("forminator:poll:submit:failed",[o,n])):void 0!==t.data&&(e=t.data.success?"success":"error",f(t.data.message,e),setTimeout(function(){l()},2500)),!0===t.success&&(void 0!==t.data.url?p.location.href=t.data.url:void 0!==t.data.chart_data&&1<t.data.chart_data.length&&("link_on"===t.data.results_behav&&r.find(".forminator-note").length&&(r.find(".forminator-note").remove(),r.find(".forminator-poll-footer").append(t.data.results_link)),"show_after"===t.data.results_behav&&c.render_poll_chart(t.data.chart_data,t.data.back_button,c,u,[t.data.votes_text,t.data.votes_count,[t.data.grids_color,t.data.labels_color,t.data.onchart_label],[t.data.tooltips_bg,t.data.tooltips_color]])),r.trigger("forminator:poll:submit:success",[o,n]))},error:function(){l(),s.removeClass(".forminator-onload"),r.trigger("forminator:poll:submit:failed",[o,n])}}).always(function(){r.trigger("after:forminator:poll:submit",[o,n])}),!1)})},render_poll_chart:function(t,e,r,n,o){var i,a,s="forminator-chart-poll-"+(r.$el.attr("id")+"-"+r.$el.data("forminatorRender")),l=r.$el.find(".forminator-poll-body"),f=r.$el.find(".forminator-poll-footer");a=r.$el.find(".forminator-chart-wrapper"),i=r.$el.find(".forminator-chart"),a.remove(),i.remove(),a=h('<canvas id="'+s+'" class="forminator-chart" role="img" aria-hidden="true"></canvas>'),l.append(a),FUI.pollChart("#"+s,t,r.settings.chart_design,o),(i=l.find(".forminator-field")).hide(),i.attr("aria-hidden","true"),a=r.$el.find(".forminator-chart"),(s=r.$el.find(".forminator-chart-wrapper")).length?(a.addClass("forminator-show"),s.addClass("forminator-show"),s.removeAttr("aria-hidden"),s.attr("tabindex","-1"),s.focus()):(a.html("<p>Fallback text...</p>"),a.addClass("forminator-show"),a.removeAttr("aria-hidden"),a.attr("tabindex","-1"),a.focus()),t=h(e),f.empty(),f.append(t),r.$el.find(".forminator-button").click(function(t){r.$el.hasClass("forminator_ajax")?r.$el.html(n):location.reload(),t.preventDefault()})},focus_to_element:function(t,e,r,n){function o(t){t.attr("tabindex")||t.attr("tabindex",-1),t.hasClass("forminator-select2")||t.focus(),r&&t.show().delay(n).fadeOut("slow")}r=r||!1,n=n||0,e=e||!1,t.hasClass("forminator-textarea")||t.parent(".wp-editor-container").length?t.hasClass("forminator-textarea")&&t.parent(".wp-editor-container").length&&(t=t.parent(".wp-editor-container")):t.show(),e?o(t):h("html,body").animate({scrollTop:t.offset().top-(h(p).height()-t.outerHeight(!0))/2},500,function(){o(t)})},show_messages:function(t){var c,u=this,d=u.$el.data("forminatorFrontCondition");return void 0!==d&&(this.$el.find(".forminator-error-message").remove(),c=0,t.forEach(function(t){var e=Object.keys(t),e=d.get_form_field(e),r=h(e),n=r.closest(".forminator-field"),o=r.closest(".forminator-date-input"),i=r.closest(".forminator-timepicker"),a=!1,s=!1,l=!1,t=Object.values(t),f='<span class="forminator-error-message" aria-hidden="true"></span>';e.length&&(0===c&&(u.$el.trigger("forminator.front.pagination.focus.input",[e]),u.focus_to_element(e)),0<o.length?(s=(a=o.parent()).find('.forminator-error-message[data-error-field="'+r.data("field")+'"]'),l=a.find(".forminator-description"),f='<span class="forminator-error-message" data-error-field="'+r.data("field")+'" aria-hidden="true"></span>',0===s.length&&("day"===r.data("field")&&(a.find('.forminator-error-message[data-error-field="year"]').length?h(f).insertBefore(a.find('.forminator-error-message[data-error-field="year"]')):0===l.length?a.append(f):h(f).insertBefore(l),0===n.find(".forminator-error-message").length&&n.append('<span class="forminator-error-message" aria-hidden="true"></span>')),"month"===r.data("field")&&(a.find('.forminator-error-message[data-error-field="day"]').length?h(f).insertBefore(a.find('.forminator-error-message[data-error-field="day"]')):0===l.length?a.append(f):h(f).insertBefore(l),0===n.find(".forminator-error-message").length&&n.append('<span class="forminator-error-message" aria-hidden="true"></span>')),"year"===r.data("field")&&(0===l.length?a.append(f):h(f).insertBefore(l),0===n.find(".forminator-error-message").length&&n.append('<span class="forminator-error-message" aria-hidden="true"></span>'))),a.find('.forminator-error-message[data-error-field="'+r.data("field")+'"]').html(t),n.find(".forminator-error-message").html(t)):0<i.length&&0<t[0].length?(s=(a=i.parent()).find('.forminator-error-message[data-error-field="'+r.data("field")+'"]'),l=a.find(".forminator-description"),f='<span class="forminator-error-message" data-error-field="'+r.data("field")+'" aria-hidden="true"></span>',0===s.length&&("hours"===r.data("field")&&(a.find('.forminator-error-message[data-error-field="minutes"]').length?h(f).insertBefore(a.find('.forminator-error-message[data-error-field="minutes"]')):0===l.length?a.append(f):h(f).insertBefore(l),0===n.find(".forminator-error-message").length&&n.append('<span class="forminator-error-message" aria-hidden="true"></span>')),"minutes"===r.data("field")&&(0===l.length?a.append(f):h(f).insertBefore(l),0===n.find(".forminator-error-message").length&&n.append('<span class="forminator-error-message" aria-hidden="true"></span>'))),a.find('.forminator-error-message[data-error-field="'+r.data("field")+'"]').html(t),n.find(".forminator-error-message").html(t)):(s=n.find(".forminator-error-message"),l=n.find(".forminator-description"),0===s.length&&(0===l.length?n.append(f):h(f).insertBefore(l)),n.find(".forminator-error-message").html(t)),r.attr("aria-invalid","true"),n.addClass("forminator-has_error"),c++)})),this},multi_upload_disable:function(t,e){t.find(".forminator-multi-upload input").each(function(){"ajax"===h(this).data("method")&&h(this).attr("disabled",e)})}}),h.fn[r]=function(t){return this.each(function(){h.data(this,r)||h.data(this,r,new e(this,t))})}}(jQuery,window,document),function(h,p,o){"use strict";var r="forminatorFrontMultiFile",n={};function e(t,e){this.element=t,this.$el=h(this.element),this.form=h.extend({},n,e),this._defaults=n,this._name=r,this.form_id=0,this.uploader=this.$el,this.element=this.uploader.data("element"),this.init()}h.extend(e.prototype,{init:function(){var i=this,a=[],s=[];0<this.form.find("input[name=form_id]").length&&(this.form_id=this.form.find("input[name=form_id]").val()),this.uploader.on("drag dragstart dragend dragover dragenter dragleave drop",function(t){t.preventDefault(),t.stopPropagation()}),this.uploader.on("dragover dragenter",function(t){h(this).addClass("forminator-dragover")}),this.uploader.on("dragleave dragend drop",function(t){h(this).removeClass("forminator-dragover")}),this.uploader.find(".forminator-upload-file--forminator-field-"+this.element).on("click",function(t){i.form.find(".forminator-field-"+i.element+"-"+i.form_id).click()}),this.uploader.on("drop",function(t){o.querySelector(".forminator-field-"+i.element+"-"+i.form_id).files=t.originalEvent.dataTransfer.files,i.form.find(".forminator-field-"+i.element+"-"+i.form_id).change()}),this.uploader.on("click",function(t){t.target===t.currentTarget&&i.form.find(".forminator-field-"+i.element+"-"+i.form_id).click()}),this.uploader.find(".forminator-multi-upload-message, .forminator-multi-upload-message p, .forminator-multi-upload-message .forminator-icon-upload").on("click",function(t){t.target===t.currentTarget&&i.form.find(".forminator-field-"+i.element+"-"+i.form_id).click()}),this.form.on("forminator:form:submit:success",function(t){a=[]}),this.form.find(".forminator-field-"+i.element+"-"+i.form_id).on("change",function(t){var r,n,o;i.uploadingFile||(i.uploadingFile=1,r=h(this),n=this.files,o=[],h.when().then(function(){r.closest(".forminator-field").removeClass("forminator-has_error");for(var t=0;t<n.length;t++)o.push(n[t]),a.push(n[t]);s=i.handleChangeCallback(o,r,s);var e=Array.prototype.slice.call(a);0<e.length&&(n=i.FileObjectItem(e),"submission"===r.data("method")&&r.prop("files",n))}).done(function(){i.uploadingFile=null}))}),this.delete_files(a,s)},handleChangeCallback:function(s,l,f){var c=this,u=0,d=new FormData,t=this.form.find('input[name="forminator_nonce"]').val(),m=l.data("method");return d.append("action","forminator_multiple_file_upload"),d.append("form_id",this.form_id),d.append("element_id",c.element),d.append("nonce",t),h.each(s,function(t,n){var e,o=c.progress_bar(n,m),r=c.form.find(".upload-container-"+c.element+" li").length,i=void 0!==l.data("filetype")?l.data("filetype"):"",i=new RegExp("(.*?).("+i+")$"),a=n.name.toLowerCase();return void 0!==l.data("size")&&l.data("size")<=n.size?(e=l.data("size-message"),void c.upload_fail_response(o,e)):i.test(a)?void("ajax"===m?(d.delete(c.element),d.delete("totalFiles"),d.append("totalFiles",r),d.append(c.element,n),f.push(h.ajax({xhr:function(){var t=new p.XMLHttpRequest;return t.upload.addEventListener("progress",function(t){t.lengthComputable&&(t=t.loaded/t.total*100)<90&&c.form.find("#"+o+" .progress-percentage").html(Math.round(t)+"% of ")},!1),t},type:"POST",url:p.ForminatorFront.ajaxUrl,data:d,cache:!1,contentType:!1,processData:!1,beforeSend:function(){c.form.find(".forminator-button-submit").attr("disabled",!0),c.$el.trigger("before:forminator:multiple:upload",d)},success:function(t){var e=c.element,r={success:t.success,message:"undefined"!==t.data.message?t.data.message:"",file_id:o,file_name:void 0!==t.data.file_url?t.data.file_url.replace(/^.*[\\\/]/,""):n.name,mime_type:n.type};c.add_upload_file(e,r),!0===t.success&&!0===t.data.success&&void 0!==t.data?(c.upload_success_response(o),c.$el.trigger("success:forminator:multiple:upload",d)):(c.upload_fail_response(o,t.data.message),void 0!==t.data.error_type&&"limit"===t.data.error_type&&c.form.find("#"+o).addClass("forminator-upload-limit_error"),c.$el.trigger("fail:forminator:multiple:upload",d))},complete:function(t,e){u++,s.length===u&&c.form.find(".forminator-button-submit").attr("disabled",!1),c.$el.trigger("complete:forminator:multiple:upload",d)},error:function(t){c.upload_fail_response(o,p.ForminatorFront.cform.process_error)}}))):(i=!0,e=p.ForminatorFront.cform.process_error,void 0!==l.data("limit")&&l.data("limit")<r&&(i=!1,c.form.find("#"+o).addClass("forminator-upload-limit_error"),e=l.data("limit-message")),i?c.upload_success_response(o):c.upload_fail_response(o,e))):(e="."+a.split(".").pop()+" "+l.data("filetype-message"),void c.upload_fail_response(o,e))}),f},upload_fail_response:function(t,e){this.form.find("#"+t).addClass("forminator-has_error"),this.form.find("#"+t).find('.forminator-uploaded-file--size [class*="forminator-icon-"]').addClass("forminator-icon-warning").removeClass("forminator-icon-loader").removeClass("forminator-loading"),this.form.find("#"+t+" .progress-percentage").html("0% of "),this.form.find("#"+t+" .forminator-uploaded-file--content").after('<div class="forminator-error-message">'+e+"</div>")},upload_success_response:function(t){this.form.find("#"+t+" .progress-percentage").html("100% of "),this.form.find("#"+t+' .forminator-uploaded-file--size [class*="forminator-icon-"]').remove(),this.form.find("#"+t+" .progress-percentage").remove()},progress_bar:function(t,e){var r="upload-process-"+Math.random().toString(36).substr(2,7),n=t.name,o=this.bytes_to_size(t.size,2),i=this.uploader.closest(".forminator-field").find(".forminator-uploaded-files"),a="";this.progress_image_preview(t,r);var t='<div class="forminator-uploaded-file--preview" aria-hidden="true"><span class="forminator-icon-file" aria-hidden="true"></span></div>',s='<p class="forminator-uploaded-file--title">'+n+"</p>",a=(a=(a=(a=(a=a+('<li id="'+r+'" class="forminator-uploaded-file">')+'<div class="forminator-uploaded-file--content">')+(t=!function(t){switch((t=(t=t).split("."))[t.length-1].toLowerCase()){case"jpg":case"jpe":case"jpeg":case"png":case"gif":case"ico":return 1}}(n)?t:'<div class="forminator-uploaded-file--image" aria-hidden="true"><div class="forminator-img-preview" role="image"></div></div>')+'<div class="forminator-uploaded-file--text">')+s+('<p class="forminator-uploaded-file--size"><span class="forminator-icon-loader forminator-loading" aria-hidden="true"></span><span class="progress-percentage">29% of </span>'+o+"</p>"))+"</div>"+('<button type="button" class="forminator-uploaded-file--delete forminator-button-delete" data-method="'+e+'" data-element="'+this.element+'" data-value="'+r+'"><span class="forminator-icon-close" aria-hidden="true"></span><span class="forminator-screen-reader-only">Delete uploaded file</span></button>'))+"</div>"+"</li>";return i.hasClass(".forminator-has-files")||i.addClass("forminator-has-files"),i.append(a),r},bytes_to_size:function(t,e){if(0===t)return"0 Bytes";var e=e<0?0:e,r=Math.floor(Math.log(t)/Math.log(1024));return parseFloat((t/Math.pow(1024,r)).toFixed(e))+" "+["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][r]},progress_image_preview:function(t,e){var r;t&&((r=new FileReader).onload=function(t){h("#"+e+" .forminator-img-preview").css("background-image","url("+t.target.result+")")},r.readAsDataURL(t))},get_uplaoded_files:function(){var t=this.form.find(".forminator-multifile-hidden").val();return t=void 0===t||""===t?{}:h.parseJSON(t)},get_uplaoded_file:function(t){var e=this.get_uplaoded_files();return void 0===e[t]&&(e[t]=[]),e[t]},add_upload_file:function(t,e){var r=this.get_uplaoded_file(t);r.unshift(e),this.set_upload_file(t,r)},set_upload_file:function(t,e){var r=this.get_uplaoded_files(),n=this.form.find(".forminator-multifile-hidden");r[t]=e,n.val(JSON.stringify(r))},get_uploaded_file_id:function(t,r){var n=null,t=this.get_uplaoded_file(t);return h.each(t,function(t,e){r===e.file_id&&(n=t)}),n},delete_files:function(l,f){var c=this;h(o).on("click",".forminator-uploaded-file--delete",function(t){t.preventDefault();var e,r,n,t=h(this),o=t.data("value"),i=t.data("method"),a=t.data("element"),s=(void 0!==o&&void 0!==a&&void 0!==i&&(e=c.form.find("#"+o).index(),t=h(t).closest("li#"+o),r=c.get_uplaoded_files(),n=c.form.find(".forminator-multifile-hidden"),r&&"ajax"===i&&(void 0!==f[e]&&(f[e].abort(),f.splice(e,1)),void 0!==n&&(""!==(o=c.get_uploaded_file_id(a,o))&&null!==o&&r[a].splice(o,1),n.val(JSON.stringify(r)))),void 0!==i&&"submission"===i&&c.remove_object(e,l,a),h(t).remove()),c.form.find(".forminator-field-"+c.element+"-"+c.form_id)),o=c.form.find(".upload-container-"+a+" li");void 0!==s.data("limit")&&(h.each(o,function(t){s.data("limit")>t&&h(this).hasClass("forminator-upload-limit_error")&&(t=h(this).attr("id"),t=c.get_uploaded_file_id(a,t),h(this).removeClass("forminator-has_error"),h(this).find(".forminator-error-message, .forminator-icon-warning, .progress-percentage").remove(),""!==t&&null!==t&&void 0!==r[a][t]&&(r[a][t].success=!0))}),n.val(JSON.stringify(r))),0===o.length&&s.val("")})},remove_object:function(t,e,r){var n,r=o.querySelector(".forminator-field-"+r+"-"+this.form_id);void 0!==r&&0<(n=r.files).length&&(n=Array.prototype.slice.call(n),e.splice(t,1),n.splice(t,1),r.files=this.FileObjectItem(n))},FileObjectItem:function(t){for(var e,r=e=(t=(t=[].slice.call(Array.isArray(t)?t:arguments)).reverse()).length,n=!0;r--&&n;)n=t[r]instanceof File;if(!n)throw new TypeError("expected argument to FileList is File or array of File objects");for(r=new ClipboardEvent("").clipboardData||new DataTransfer;e--;)r.items.add(t[e]);return r.files}}),h.fn[r]=function(t){return this.each(function(){h.data(this,r)||h.data(this,r,new e(this,t))})}}(jQuery,window,document);
forminator.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  * Plugin Name: Forminator
4
- * Version: 1.15.13
5
  * Plugin URI: https://wpmudev.com/project/forminator/
6
  * Description: Capture user information (as detailed as you like), engage users with interactive polls that show real-time results and graphs, “no wrong answer” Facebook-style quizzes and knowledge tests.
7
  * Author: WPMU DEV
@@ -34,7 +34,7 @@ if ( ! defined( 'ABSPATH' ) ) {
34
  }
35
 
36
  if ( ! defined( 'FORMINATOR_VERSION' ) ) {
37
- define( 'FORMINATOR_VERSION', '1.15.13' );
38
  }
39
 
40
  if ( ! defined( 'FORMINATOR_SUI_VERSION' ) ) {
@@ -126,6 +126,7 @@ if ( ! class_exists( 'Forminator' ) ) {
126
  */
127
  public function __construct() {
128
  add_action( 'admin_init', array( $this, 'initialize_admin' ) );
 
129
 
130
  $this->includes();
131
  $this->include_vendors();
@@ -172,6 +173,16 @@ if ( ! class_exists( 'Forminator' ) ) {
172
  }
173
  }
174
 
 
 
 
 
 
 
 
 
 
 
175
  /**
176
  * Return status of Addon feature
177
  *
1
  <?php
2
  /**
3
  * Plugin Name: Forminator
4
+ * Version: 1.15.14
5
  * Plugin URI: https://wpmudev.com/project/forminator/
6
  * Description: Capture user information (as detailed as you like), engage users with interactive polls that show real-time results and graphs, “no wrong answer” Facebook-style quizzes and knowledge tests.
7
  * Author: WPMU DEV
34
  }
35
 
36
  if ( ! defined( 'FORMINATOR_VERSION' ) ) {
37
+ define( 'FORMINATOR_VERSION', '1.15.14' );
38
  }
39
 
40
  if ( ! defined( 'FORMINATOR_SUI_VERSION' ) ) {
126
  */
127
  public function __construct() {
128
  add_action( 'admin_init', array( $this, 'initialize_admin' ) );
129
+ add_action( 'admin_init', array( $this, 'add_custom_cap' ) );
130
 
131
  $this->includes();
132
  $this->include_vendors();
173
  }
174
  }
175
 
176
+ /**
177
+ * Add manage_forminator custom capability
178
+ *
179
+ * @since 1.15
180
+ */
181
+ public function add_custom_cap() {
182
+ $admin = get_role( 'administrator' );
183
+ $admin->add_cap( 'manage_forminator', true );
184
+ }
185
+
186
  /**
187
  * Return status of Addon feature
188
  *
languages/forminator.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the same license as the Forminator package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Forminator 1.15.13\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/forminator\n"
7
- "POT-Creation-Date: 2022-05-03 09:44:49+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -5934,22 +5934,29 @@ msgid ""
5934
  "form(s)."
5935
  msgstr ""
5936
 
 
 
 
 
5937
  #: admin/classes/class-admin.php:971
5938
  msgid ""
5939
- "<strong>Important Upgrade Notice:</strong> We've made some improvements to "
5940
- "the way form submissions are handled with this update for better "
5941
- "performance, and that can break <strong>only</strong> custom forms that may "
5942
- "be using deprecated actions & filters. See <a href=\"%1$s\" "
5943
- "target=\"_blank\">this chapter</a> in our Forminator API Docs for the "
5944
- "complete list of those changes."
 
 
 
 
 
5945
  msgstr ""
5946
 
5947
- #: admin/classes/class-admin.php:974
5948
  msgid ""
5949
- "Also, please ensure you have a backup of your site before updating, and "
5950
- "check to ensure your custom forms are working as expected afterwards. If "
5951
- "you face any issue or have any questions or doubt, don't hesitate to get in "
5952
- "touch with our support heroes."
5953
  msgstr ""
5954
 
5955
  #: admin/classes/thirdparty-importers/class-importer-cf7.php:94
@@ -15481,8 +15488,8 @@ msgstr ""
15481
 
15482
  #: library/fields/captcha.php:79
15483
  msgid ""
15484
- "This site is protected by hCaptcha and its %1$s Privacy Policy %3$s and "
15485
- "%2$s Terms of Service %3$s apply."
15486
  msgstr ""
15487
 
15488
  #: library/fields/captcha.php:87
2
  # This file is distributed under the same license as the Forminator package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Forminator 1.15.14\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/forminator\n"
7
+ "POT-Creation-Date: 2022-05-11 08:59:21+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
5934
  "form(s)."
5935
  msgstr ""
5936
 
5937
+ #: admin/classes/class-admin.php:970
5938
+ msgid "Upgrade Notice: "
5939
+ msgstr ""
5940
+
5941
  #: admin/classes/class-admin.php:971
5942
  msgid ""
5943
+ "Forminator is getting a huge performance boost thanks to some form "
5944
+ "submission improvements."
5945
+ msgstr ""
5946
+
5947
+ #: admin/classes/class-admin.php:973
5948
+ msgid ""
5949
+ "There's an extremely low chance these changes may affect you if any of your "
5950
+ "forms use a custom action or filter that we've now removed or modified "
5951
+ "(forms using standard Forminator features won't be affected at all). If "
5952
+ "needed, refer to this list of the %1$sretired actions/filters%2$s, but "
5953
+ "we're confident that %3$s of users should remain unaffected."
5954
  msgstr ""
5955
 
5956
+ #: admin/classes/class-admin.php:978
5957
  msgid ""
5958
+ "Any problems or issues? Don't hesitate to create a support ticket or "
5959
+ "contact support directly."
 
 
5960
  msgstr ""
5961
 
5962
  #: admin/classes/thirdparty-importers/class-importer-cf7.php:94
15488
 
15489
  #: library/fields/captcha.php:79
15490
  msgid ""
15491
+ "This site is protected by hCaptcha and its %1$sPrivacy Policy%3$s and "
15492
+ "%2$sTerms of Service%3$s apply."
15493
  msgstr ""
15494
 
15495
  #: library/fields/captcha.php:87
library/abstracts/abstract-class-field.php CHANGED
@@ -980,98 +980,103 @@ abstract class Forminator_Field {
980
  * @return bool
981
  */
982
  public static function is_condition_fulfilled( $form_field_value, $condition, $form_id = null ) {
 
 
 
 
 
983
 
984
- $form_field_value = wp_unslash( $form_field_value );
985
 
986
  switch ( $condition['rule'] ) {
987
  case 'is':
988
  if ( is_array( $form_field_value ) ) {
989
  // possible input is "1" to be compared with 1
990
- return in_array( $condition['value'], $form_field_value ); //phpcs:ignore WordPress.PHP.StrictInArray.MissingTrueStrict
991
  }
992
- if ( is_numeric( $condition['value'] ) ) {
993
- return ( (int) $form_field_value === (int) $condition['value'] );
994
  }
995
 
996
- return ( $form_field_value === $condition['value'] );
997
  case 'is_not':
998
  if ( is_array( $form_field_value ) ) {
999
  // possible input is "1" to be compared with 1
1000
- return ! in_array( $condition['value'], $form_field_value ); //phpcs:ignore WordPress.PHP.StrictInArray.MissingTrueStrict
1001
  }
1002
 
1003
- return ( $form_field_value !== $condition['value'] );
1004
  case 'is_great':
1005
- if ( ! is_numeric( $condition['value'] ) ) {
1006
  return false;
1007
  }
1008
  if ( ! is_numeric( $form_field_value ) ) {
1009
  return false;
1010
  }
1011
 
1012
- return $form_field_value > $condition['value'];
1013
  case 'is_less':
1014
- if ( ! is_numeric( $condition['value'] ) ) {
1015
  return false;
1016
  }
1017
  if ( ! is_numeric( $form_field_value ) ) {
1018
  return false;
1019
  }
1020
 
1021
- return $form_field_value < $condition['value'];
1022
  case 'contains':
1023
- return ( stripos( $form_field_value, $condition['value'] ) === false ? false : true );
1024
  case 'starts':
1025
- return ( stripos( $form_field_value, $condition['value'] ) === 0 ? true : false );
1026
  case 'ends':
1027
- return ( substr( $form_field_value, - strlen( $condition['value'] ) ) === $condition['value'] );
1028
 
1029
  case 'day_is':
1030
  if ( null !== $form_id && ! empty( $form_field_value ) ) {
1031
  $day = self::get_day_or_month( $form_field_value, $condition['element_id'], $form_id, 'D' );
1032
- return $day === $condition['value'];
1033
  }
1034
 
1035
  return false;
1036
  case 'day_is_not':
1037
  if ( null !== $form_id && ! empty( $form_field_value ) ) {
1038
  $day = self::get_day_or_month( $form_field_value, $condition['element_id'], $form_id, 'D' );
1039
- return $day !== $condition['value'];
1040
  }
1041
 
1042
  return false;
1043
  case 'month_is':
1044
  if ( null !== $form_id && ! empty( $form_field_value ) ) {
1045
  $month = self::get_day_or_month( $form_field_value, $condition['element_id'], $form_id, 'M' );
1046
- return $month === $condition['value'];
1047
  }
1048
 
1049
  return false;
1050
  case 'month_is_not':
1051
  if ( null !== $form_id && ! empty( $form_field_value ) ) {
1052
  $month = self::get_day_or_month( $form_field_value, $condition['element_id'], $form_id, 'M' );
1053
- return $month !== $condition['value'];
1054
  }
1055
 
1056
  return false;
1057
  case 'is_before':
1058
  if ( null !== $form_id && ! empty( $form_field_value ) ) {
1059
  $date = self::get_day_or_month( $form_field_value, $condition['element_id'], $form_id, 'j F Y' );
1060
- return strtotime( $date ) < strtotime( $condition['value'] );
1061
  }
1062
 
1063
  return false;
1064
  case 'is_after':
1065
  if ( null !== $form_id && ! empty( $form_field_value ) ) {
1066
  $date = self::get_day_or_month( $form_field_value, $condition['element_id'], $form_id, 'j F Y' );
1067
- return strtotime( $date ) > strtotime( $condition['value'] );
1068
  }
1069
 
1070
  return false;
1071
  case 'is_before_n_or_more_days':
1072
  if ( null !== $form_id && ! empty( $form_field_value ) ) {
1073
  $date = self::get_day_or_month( $form_field_value, $condition['element_id'], $form_id, 'Y-m-d' );
1074
- return strtotime( $date ) <= strtotime( '-' . $condition['value'] . ' days' );
1075
  }
1076
 
1077
  return false;
@@ -1079,7 +1084,7 @@ abstract class Forminator_Field {
1079
  case 'is_before_less_than_n_days':
1080
  if ( null !== $form_id && ! empty( $form_field_value ) ) {
1081
  $date = self::get_day_or_month( $form_field_value, $condition['element_id'], $form_id, 'Y-m-d' );
1082
- $rule_date = strtotime( '-' . $condition['value'] . ' days' );
1083
  $current_date = strtotime( 'today' );
1084
  return $rule_date < strtotime( $date ) && strtotime( $date ) <= $current_date;
1085
  }
@@ -1088,7 +1093,7 @@ abstract class Forminator_Field {
1088
  case 'is_after_n_or_more_days':
1089
  if ( null !== $form_id && ! empty( $form_field_value ) ) {
1090
  $date = self::get_day_or_month( $form_field_value, $condition['element_id'], $form_id, 'Y-m-d' );
1091
- return strtotime( $date ) >= strtotime( '+' . $condition['value'] . ' days' );
1092
  }
1093
 
1094
  return false;
@@ -1096,7 +1101,7 @@ abstract class Forminator_Field {
1096
  case 'is_after_less_than_n_days':
1097
  if ( null !== $form_id && ! empty( $form_field_value ) ) {
1098
  $date = self::get_day_or_month( $form_field_value, $condition['element_id'], $form_id, 'Y-m-d' );
1099
- $rule_date = strtotime( '+' . $condition['value'] . ' days' );
1100
  $current_date = strtotime( 'today' );
1101
  return $rule_date > strtotime( $date ) && strtotime( $date ) >= $current_date;
1102
  }
980
  * @return bool
981
  */
982
  public static function is_condition_fulfilled( $form_field_value, $condition, $form_id = null ) {
983
+ if ( is_array( $form_field_value ) ) {
984
+ $form_field_value = forminator_trim_array( $form_field_value );
985
+ } else {
986
+ $form_field_value = wp_unslash( trim( $form_field_value ) );
987
+ }
988
 
989
+ $condition_value = trim( $condition['value'] );
990
 
991
  switch ( $condition['rule'] ) {
992
  case 'is':
993
  if ( is_array( $form_field_value ) ) {
994
  // possible input is "1" to be compared with 1
995
+ return in_array( $condition_value, $form_field_value ); //phpcs:ignore WordPress.PHP.StrictInArray.MissingTrueStrict
996
  }
997
+ if ( is_numeric( $condition_value ) ) {
998
+ return ( (int) $form_field_value === (int) $condition_value );
999
  }
1000
 
1001
+ return ( $form_field_value === $condition_value );
1002
  case 'is_not':
1003
  if ( is_array( $form_field_value ) ) {
1004
  // possible input is "1" to be compared with 1
1005
+ return ! in_array( $condition_value, $form_field_value ); //phpcs:ignore WordPress.PHP.StrictInArray.MissingTrueStrict
1006
  }
1007
 
1008
+ return ( $form_field_value !== $condition_value );
1009
  case 'is_great':
1010
+ if ( ! is_numeric( $condition_value ) ) {
1011
  return false;
1012
  }
1013
  if ( ! is_numeric( $form_field_value ) ) {
1014
  return false;
1015
  }
1016
 
1017
+ return $form_field_value > $condition_value;
1018
  case 'is_less':
1019
+ if ( ! is_numeric( $condition_value ) ) {
1020
  return false;
1021
  }
1022
  if ( ! is_numeric( $form_field_value ) ) {
1023
  return false;
1024
  }
1025
 
1026
+ return $form_field_value < $condition_value;
1027
  case 'contains':
1028
+ return ( stripos( $form_field_value, $condition_value ) === false ? false : true );
1029
  case 'starts':
1030
+ return ( stripos( $form_field_value, $condition_value ) === 0 ? true : false );
1031
  case 'ends':
1032
+ return ( substr( $form_field_value, - strlen( $condition_value ) ) === $condition_value );
1033
 
1034
  case 'day_is':
1035
  if ( null !== $form_id && ! empty( $form_field_value ) ) {
1036
  $day = self::get_day_or_month( $form_field_value, $condition['element_id'], $form_id, 'D' );
1037
+ return $day === $condition_value;
1038
  }
1039
 
1040
  return false;
1041
  case 'day_is_not':
1042
  if ( null !== $form_id && ! empty( $form_field_value ) ) {
1043
  $day = self::get_day_or_month( $form_field_value, $condition['element_id'], $form_id, 'D' );
1044
+ return $day !== $condition_value;
1045
  }
1046
 
1047
  return false;
1048
  case 'month_is':
1049
  if ( null !== $form_id && ! empty( $form_field_value ) ) {
1050
  $month = self::get_day_or_month( $form_field_value, $condition['element_id'], $form_id, 'M' );
1051
+ return $month === $condition_value;
1052
  }
1053
 
1054
  return false;
1055
  case 'month_is_not':
1056
  if ( null !== $form_id && ! empty( $form_field_value ) ) {
1057
  $month = self::get_day_or_month( $form_field_value, $condition['element_id'], $form_id, 'M' );
1058
+ return $month !== $condition_value;
1059
  }
1060
 
1061
  return false;
1062
  case 'is_before':
1063
  if ( null !== $form_id && ! empty( $form_field_value ) ) {
1064
  $date = self::get_day_or_month( $form_field_value, $condition['element_id'], $form_id, 'j F Y' );
1065
+ return strtotime( $date ) < strtotime( $condition_value );
1066
  }
1067
 
1068
  return false;
1069
  case 'is_after':
1070
  if ( null !== $form_id && ! empty( $form_field_value ) ) {
1071
  $date = self::get_day_or_month( $form_field_value, $condition['element_id'], $form_id, 'j F Y' );
1072
+ return strtotime( $date ) > strtotime( $condition_value );
1073
  }
1074
 
1075
  return false;
1076
  case 'is_before_n_or_more_days':
1077
  if ( null !== $form_id && ! empty( $form_field_value ) ) {
1078
  $date = self::get_day_or_month( $form_field_value, $condition['element_id'], $form_id, 'Y-m-d' );
1079
+ return strtotime( $date ) <= strtotime( '-' . $condition_value . ' days' );
1080
  }
1081
 
1082
  return false;
1084
  case 'is_before_less_than_n_days':
1085
  if ( null !== $form_id && ! empty( $form_field_value ) ) {
1086
  $date = self::get_day_or_month( $form_field_value, $condition['element_id'], $form_id, 'Y-m-d' );
1087
+ $rule_date = strtotime( '-' . $condition_value . ' days' );
1088
  $current_date = strtotime( 'today' );
1089
  return $rule_date < strtotime( $date ) && strtotime( $date ) <= $current_date;
1090
  }
1093
  case 'is_after_n_or_more_days':
1094
  if ( null !== $form_id && ! empty( $form_field_value ) ) {
1095
  $date = self::get_day_or_month( $form_field_value, $condition['element_id'], $form_id, 'Y-m-d' );
1096
+ return strtotime( $date ) >= strtotime( '+' . $condition_value . ' days' );
1097
  }
1098
 
1099
  return false;
1101
  case 'is_after_less_than_n_days':
1102
  if ( null !== $form_id && ! empty( $form_field_value ) ) {
1103
  $date = self::get_day_or_month( $form_field_value, $condition['element_id'], $form_id, 'Y-m-d' );
1104
+ $rule_date = strtotime( '+' . $condition_value . ' days' );
1105
  $current_date = strtotime( 'today' );
1106
  return $rule_date > strtotime( $date ) && strtotime( $date ) >= $current_date;
1107
  }
library/class-core.php CHANGED
@@ -368,9 +368,14 @@ class Forminator_Core {
368
  public static function sanitize_array( $data, $current_key = '' ) {
369
  $data = wp_unslash( $data );
370
  $skipped_keys = array( 'preview_data' );
371
- if ( in_array( $current_key, $skipped_keys, true ) ) {
 
 
 
 
372
  return $data;
373
  }
 
374
  $allow_html = array(
375
  'variations',
376
  'question_description',
368
  public static function sanitize_array( $data, $current_key = '' ) {
369
  $data = wp_unslash( $data );
370
  $skipped_keys = array( 'preview_data' );
371
+ // TODO: Should skip fields that has its own sanitize function
372
+ if (
373
+ in_array( $current_key, $skipped_keys, true ) ||
374
+ 0 === strpos( $current_key, 'url-' )
375
+ ) {
376
  return $data;
377
  }
378
+
379
  $allow_html = array(
380
  'variations',
381
  'question_description',
library/fields/captcha.php CHANGED
@@ -77,7 +77,7 @@ class Forminator_Captcha extends Forminator_Field {
77
  'captcha_badge' => 'bottomright',
78
  'hc_invisible_notice' => sprintf(
79
  __(
80
- 'This site is protected by hCaptcha and its %1$s Privacy Policy %3$s and %2$s Terms of Service %3$s apply.',
81
  'forminator'
82
  ),
83
  '<a href="https://hcaptcha.com/privacy">',
@@ -200,7 +200,7 @@ class Forminator_Captcha extends Forminator_Field {
200
  break;
201
  default:
202
  $key = get_option( 'forminator_captcha_key', '' );
203
-
204
  }
205
  } else {
206
  $key = get_option( 'forminator_hcaptcha_key', '' );
77
  'captcha_badge' => 'bottomright',
78
  'hc_invisible_notice' => sprintf(
79
  __(
80
+ 'This site is protected by hCaptcha and its %1$sPrivacy Policy%3$s and %2$sTerms of Service%3$s apply.',
81
  'forminator'
82
  ),
83
  '<a href="https://hcaptcha.com/privacy">',
200
  break;
201
  default:
202
  $key = get_option( 'forminator_captcha_key', '' );
203
+
204
  }
205
  } else {
206
  $key = get_option( 'forminator_hcaptcha_key', '' );
library/fields/website.php CHANGED
@@ -321,7 +321,7 @@ class Forminator_Website extends Forminator_Field {
321
  public function sanitize( $field, $data ) {
322
  $original_data = $data;
323
  // Sanitize.
324
- $data = forminator_sanitize_field( $data );
325
 
326
  return apply_filters( 'forminator_field_website_sanitize', $data, $field, $original_data );
327
  }
321
  public function sanitize( $field, $data ) {
322
  $original_data = $data;
323
  // Sanitize.
324
+ $data = esc_url_raw( $data );
325
 
326
  return apply_filters( 'forminator_field_website_sanitize', $data, $field, $original_data );
327
  }
library/helpers/helper-fields.php CHANGED
@@ -2411,3 +2411,25 @@ function forminator_count_field_type_in_page( $field_type ) {
2411
 
2412
  return $field_count;
2413
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2411
 
2412
  return $field_count;
2413
  }
2414
+
2415
+ /**
2416
+ * Trim field values
2417
+ *
2418
+ * @since 1.15.15
2419
+ *
2420
+ * @param $value
2421
+ *
2422
+ * @return array
2423
+ */
2424
+ function forminator_trim_array ( $value ) {
2425
+
2426
+ foreach( $value as $key => $val ) {
2427
+ if ( is_array( $val ) ) {
2428
+ $value[$key] = forminator_trim_array( $val );
2429
+ } else {
2430
+ $value[$key] = wp_unslash( trim( $val ) );
2431
+ }
2432
+ }
2433
+
2434
+ return $value;
2435
+ }
readme.txt CHANGED
@@ -1,13 +1,13 @@
1
  === Forminator - Contact Form, Payment Form & Custom Form Builder ===
2
  Plugin Name: Forminator - Contact Form, Payment Form & Custom Form Builder
3
- Version: 1.15.13
4
  Author: WPMU DEV
5
  Author URI: https://wpmudev.com/
6
  Contributors: WPMUDEV
7
  Tags: forms, contact form, wordpress form plugin, payment form, custom form, form builder, paypal form wordpress, form maker, quiz, quiz builder, order form, stripe payments, paypal payments, stripe form, paypal form
8
  Requires at least: 5.2
9
  Tested up to: 5.9
10
- Stable tag: 1.15.13
11
  Requires PHP: 5.6.20
12
  License: GPL v2 - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
13
 
@@ -211,6 +211,16 @@ Find out all you need to know by checking out our API documentation [here](https
211
 
212
  == Changelog ==
213
 
 
 
 
 
 
 
 
 
 
 
214
  = 1.15.13 =
215
 
216
  - Improvement: 2FA functionality backward compatibility with Defender
1
  === Forminator - Contact Form, Payment Form & Custom Form Builder ===
2
  Plugin Name: Forminator - Contact Form, Payment Form & Custom Form Builder
3
+ Version: 1.15.14
4
  Author: WPMU DEV
5
  Author URI: https://wpmudev.com/
6
  Contributors: WPMUDEV
7
  Tags: forms, contact form, wordpress form plugin, payment form, custom form, form builder, paypal form wordpress, form maker, quiz, quiz builder, order form, stripe payments, paypal payments, stripe form, paypal form
8
  Requires at least: 5.2
9
  Tested up to: 5.9
10
+ Stable tag: 1.15.14
11
  Requires PHP: 5.6.20
12
  License: GPL v2 - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
13
 
211
 
212
  == Changelog ==
213
 
214
+ = 1.15.14 =
215
+
216
+ - Fix: Submission indicator is not working in a validation error
217
+ - Fix: Form name input field is not working while the New Update popup opens
218
+ - Fix: Typo on the links for Invisible hCaptcha
219
+ - Fix: manage_forminator capability no longer exists in user role
220
+ - Fix: HubSpot and AWeber Identifier aren't working
221
+ - Fix: Whitespace in select fields causing error in visibility conditions
222
+ - Fix: Fields do not support blank space from URLs
223
+
224
  = 1.15.13 =
225
 
226
  - Improvement: 2FA functionality backward compatibility with Defender