Contact Form Plugin – Fastest Contact Form Builder Plugin for WordPress by Fluent Forms - Version 3.6.22

Version Description

(Date: June 19, 2020) = * Address Field Parser Fix * Fix Conditional Logic issue for multi-select * Added {inputs.fieldName.label} smartcode for accessing checkable field label

Download this release

Release Info

Developer techjewel
Plugin Icon 128x128 Contact Form Plugin – Fastest Contact Form Builder Plugin for WordPress by Fluent Forms
Version 3.6.22
Comparing to
See all releases

Code changes from version 3.6.21 to 3.6.22

fluentform.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: Fluent Forms - Best Form Plugin for WordPress
4
  Description: Contact Form By Fluent Forms is the advanced Contact form plugin with drag and drop, multi column supported form builder plugin
5
- Version: 3.6.21
6
  Author: WP Fluent Forms
7
  Author URI: https://wpmanageninja.com
8
  Plugin URI: https://wpmanageninja.com/wp-fluent-form/
@@ -16,7 +16,7 @@ defined('ABSPATH') or die;
16
  defined('FLUENTFORM') or define('FLUENTFORM', true);
17
  define('FLUENTFORM_DIR_PATH', plugin_dir_path(__FILE__));
18
 
19
- defined('FLUENTFORM_VERSION') or define('FLUENTFORM_VERSION', '3.6.21');
20
 
21
  if (!defined('FLUENTFORM_HAS_NIA')) {
22
  define('FLUENTFORM_HAS_NIA', true);
2
  /*
3
  Plugin Name: Fluent Forms - Best Form Plugin for WordPress
4
  Description: Contact Form By Fluent Forms is the advanced Contact form plugin with drag and drop, multi column supported form builder plugin
5
+ Version: 3.6.22
6
  Author: WP Fluent Forms
7
  Author URI: https://wpmanageninja.com
8
  Plugin URI: https://wpmanageninja.com/wp-fluent-form/
16
  defined('FLUENTFORM') or define('FLUENTFORM', true);
17
  define('FLUENTFORM_DIR_PATH', plugin_dir_path(__FILE__));
18
 
19
+ defined('FLUENTFORM_VERSION') or define('FLUENTFORM_VERSION', '3.6.22');
20
 
21
  if (!defined('FLUENTFORM_HAS_NIA')) {
22
  define('FLUENTFORM_HAS_NIA', true);
public/js/ff_elementor.js DELETED
@@ -1,84 +0,0 @@
1
- /******/ (function(modules) { // webpackBootstrap
2
- /******/ // The module cache
3
- /******/ var installedModules = {};
4
- /******/
5
- /******/ // The require function
6
- /******/ function __webpack_require__(moduleId) {
7
- /******/
8
- /******/ // Check if module is in cache
9
- /******/ if(installedModules[moduleId]) {
10
- /******/ return installedModules[moduleId].exports;
11
- /******/ }
12
- /******/ // Create a new module (and put it into the cache)
13
- /******/ var module = installedModules[moduleId] = {
14
- /******/ i: moduleId,
15
- /******/ l: false,
16
- /******/ exports: {}
17
- /******/ };
18
- /******/
19
- /******/ // Execute the module function
20
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
21
- /******/
22
- /******/ // Flag the module as loaded
23
- /******/ module.l = true;
24
- /******/
25
- /******/ // Return the exports of the module
26
- /******/ return module.exports;
27
- /******/ }
28
- /******/
29
- /******/
30
- /******/ // expose the modules object (__webpack_modules__)
31
- /******/ __webpack_require__.m = modules;
32
- /******/
33
- /******/ // expose the module cache
34
- /******/ __webpack_require__.c = installedModules;
35
- /******/
36
- /******/ // define getter function for harmony exports
37
- /******/ __webpack_require__.d = function(exports, name, getter) {
38
- /******/ if(!__webpack_require__.o(exports, name)) {
39
- /******/ Object.defineProperty(exports, name, {
40
- /******/ configurable: false,
41
- /******/ enumerable: true,
42
- /******/ get: getter
43
- /******/ });
44
- /******/ }
45
- /******/ };
46
- /******/
47
- /******/ // getDefaultExport function for compatibility with non-harmony modules
48
- /******/ __webpack_require__.n = function(module) {
49
- /******/ var getter = module && module.__esModule ?
50
- /******/ function getDefault() { return module['default']; } :
51
- /******/ function getModuleExports() { return module; };
52
- /******/ __webpack_require__.d(getter, 'a', getter);
53
- /******/ return getter;
54
- /******/ };
55
- /******/
56
- /******/ // Object.prototype.hasOwnProperty.call
57
- /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
58
- /******/
59
- /******/ // __webpack_public_path__
60
- /******/ __webpack_require__.p = "";
61
- /******/
62
- /******/ // Load entry module and return exports
63
- /******/ return __webpack_require__(__webpack_require__.s = 1504);
64
- /******/ })
65
- /************************************************************************/
66
- /******/ ({
67
-
68
- /***/ 1504:
69
- /***/ (function(module, exports, __webpack_require__) {
70
-
71
- module.exports = __webpack_require__(1505);
72
-
73
-
74
- /***/ }),
75
-
76
- /***/ 1505:
77
- /***/ (function(module, exports) {
78
-
79
- throw new Error("Module build failed: Error: ENOENT: no such file or directory, open '/Users/jewel/sites/wp/wp-content/plugins/fluentform/resources/assets/elementor/ff_elementor.js'");
80
-
81
- /***/ })
82
-
83
- /******/ });
84
- //# sourceMappingURL=ff_elementor.js.map
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
public/js/fluentform-advanced.js CHANGED
@@ -1 +1 @@
1
- !function(e){var t={};function n(a){if(t[a])return t[a].exports;var i=t[a]={i:a,l:!1,exports:{}};return e[a].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:a})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1452)}({1452:function(e,t,n){e.exports=n(1453)},1453:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){var t=e(".jss-ff-el-net-promoter");t.length&&e.each(t,function(t,n){e(n).on("click","label",function(t){var n=e(this);n.addClass("active"),n.prevAll().removeClass("active"),n.nextAll().removeClass("active")})})},i=function(e){!function(e){e.on("click",".js-repeat .repeat-plus",function(e){var t=jQuery(this),n=t.closest(".ff-el-repeat"),a=parseInt(n.data("max_repeat")),i=n.find(".ff-t-cell:first-child .ff-el-input--content > input").length;if(!(a&&a<=i)){a&&a-i==1&&n.find(".repeat-plus").hide();var r=t.closest("div"),o=r.index(),l=t.closest(".ff-el-input--content").find(".ff-t-cell").length;t.closest(".ff-el-input--content").find(".ff-t-cell").each(function(e,t){var n=jQuery(this).find(".ff-el-form-control:last-child"),a=n.attr("tabindex"),i=n.clone(),r={value:"",id:"ffrpt-"+(new Date).getTime()+e};a&&(r.tabIndex=parseInt(a)+l),i.prop(r),i.insertAfter(n)}),r.clone().insertAfter(r),t.closest(".ff-el-input--content").find(".ff-t-cell").eq(0).find("input:eq("+(o+1)+")").focus()}}),e.on("click",".js-repeat .repeat-minus",function(e){var t=!1,n=jQuery(this),a=n.closest("div");n.closest(".ff-el-repeat").find(".repeat-plus").show(),n.closest(".ff-el-input--content").find(".ff-t-cell").each(function(){var e=a.index(),n=jQuery(this).find(".ff-el-form-control:eq("+e+")");a.siblings().length&&(t=n.remove().length)}),t&&a.remove()})}(e),function(e){e.on("click",".js-repeater .repeat-plus",function(e){var t=jQuery(this),n=t.closest("table"),a=t.closest("tr"),i=parseInt(n.attr("data-max_repeat")),r=n.find("tbody tr").length;if(i&&r==i)n.addClass("repeat-maxed");else{var o=a.clone();o.find("td").each(function(e,t){var n=jQuery(this).find(".ff-el-form-control:last-child"),a=(n.attr("tabindex"),"ffrpt-"+(new Date).getTime()+e),i=(n.data("name"),{value:"",id:a});n.prop(i)}),o.insertAfter(a);var l=n.attr("data-root_name"),f=0;n.find("tbody tr").each(function(e,t){jQuery(this).find(".ff-el-form-control").each(function(t,n){var a=jQuery(n);0==e&&(f=a.attr("tabindex")),a.prop({name:l+"["+e+"][]"}),a.attr("data-name",l+"_"+t+"_"+e),f&&a.attr("tabindex",f)})}),o.find(".ff-el-form-control")[0].focus(),n.trigger("repeat_change"),i&&r+1==i&&n.addClass("repeat-maxed")}}),e.on("click",".js-repeater .repeat-minus",function(e){var t=jQuery(this),n=t.closest("table");if(1!=n.find("tbody tr").length){t.closest("tr").remove(),n.removeClass("repeat-maxed");var a=n.attr("data-root_name");n.find("tbody tr").each(function(e,t){jQuery(this).find(".ff-el-form-control").each(function(t,n){jQuery(n).prop({name:a+"["+e+"][]"})})}),n.trigger("repeat_change")}})}(e)},r=function(e,t,n){var a={},i=n.form_id_selector,r="."+n.form_instance;window.stackItems={},a[i]={};var o,l,f,s,c,d,u,p,v,m,h,g,_,y,x,b,j,w,k;(o=void 0,l={},f={},s=function(t){var n=e(r),a=e("[data-name='"+t+"']",n);return(a=a.length?a:e("[name='"+t+"']",n)).length?a:e("[name='"+t+"[]']",n)},c=function(e){var t=e.prop("type")||e.attr("data-type");if("checkbox"==t||"radio"==t){if(e.filter(":checked").length)return e.trigger("change")}else if("select-multiple"==t){if(e.val().length)return e.trigger("change")}else if(e.val())return e.trigger("change")},d=function(t,n){var r=t.prop("name").replace("[]","");return e.each(a[i][n].conditions,function(e,n){var a=t.prop("type");r==n.field&&("checkbox"==a?u(n,t):"radio"==a?p(n,t):a.startsWith("select")?v(n,t):m(n,t))}),!0},u=function(e,t){"="==e.operator?e.value?t.val()==e.value&&(e.status=t.is(":checked")):e.status=!t.is(":checked"):e.value?t.val()==e.value&&(e.status=!t.is(":checked")):e.status=t.is(":checked")},p=function(e,t){t.is(":checked")?e.status=h(e,t.val()):t.val()==e.value&&("="==e.operator?e.status=!1:e.status=!0)},v=function(t,n){"="==t.operator?t.value?n.prop("multiple")?n.find("option").each(function(n,a){e(a).val()==t.value&&(t.status=e(a).is(":selected"))}):t.status=t.value==n.find("option:selected").val():n.prop("multiple")?t.status=!n.find("option:selected").length:t.status=""==n.find("option:selected").val():t.value?n.prop("multiple")?n.find("option").each(function(n,a){e(a).val()==t.value&&(t.status=!e(a).is(":selected"))}):t.status=t.value!=n.find("option:selected").val():n.prop("multiple")?t.status=n.find("option:selected").length:t.status=""!=n.find("option:selected").val()},m=function(e,t){var n=t.val();e.status=h(e,n)},h=function(e,t){return"="==e.operator?t==e.value:"!="==e.operator?t!=e.value:">"==e.operator?t&&t>Number(e.value):"<"==e.operator?t&&t<Number(e.value):">="==e.operator?t&&t>=Number(e.value):"<="==e.operator?t&&t<=Number(e.value):"startsWith"==e.operator?t.startsWith(e.value):"endsWith"==e.operator?t.endsWith(e.value):"contains"==e.operator?-1!=t.indexOf(e.value):"doNotContains"==e.operator&&-1==t.indexOf(e.value)},g=function(t){var n=!1,r=[];e.each(a[i][t].conditions,function(e,t){r.push(Boolean(t.status))});var o=r.filter(function(e){return e}).length;if("any"==a[i][t].type)n=Boolean(o);else{var f=a[i][t].conditions.length;n=Boolean(f==o)}_(t,n,function(n,a){var i=n.prop("type")||n.attr("data-type");if(i){stackItems[t]||(stackItems[t]=0),stackItems[t]+=1;var r=!1;!i||"checkbox"!=i&&"radio"!=i?i&&i.startsWith("select")?x(n,a):i&&"name-element"==i?j(n,a):i&&"repeat-element"==i?w(n,a):i&&"address-element"==i?k(n,a):"hidden"!=i&&b(n,a):(y(n,a),n.each(function(t,n){var a=e(n);l[a.attr("id")]&&a.trigger("change")}),r=!0),n.closest(".has-conditions:hidden").addClass("ff_excluded"),n.closest(".has-conditions:visible").removeClass("ff_excluded"),!r&&l[n.attr("id")]&&n.trigger("change")}})},_=function(e,t,n){var a=s(e),i=t?"slideDown":"slideUp";"slideup"==i&&a.is(":hidden")||"slideDown"==i&&a.is(":visible")||a.closest(".has-conditions")[i](200,function(){n&&n(a,t)})},y=function(t,n){t.each(function(t,a){var i=e(this);i.prop("checked",!!n&&i.prop("defaultChecked"))})},x=function(t,n){t.find("option").each(function(t,a){var i=e(this);i.prop("selected",!!n&&i.prop("defaultSelected"))})},b=function(e,t){e.val(t?e.prop("defaultValue"):"")},j=function(t,n){t.find("input").each(function(t,a){b(e(this),n)})},w=function(t,n){t.find(".ff-t-cell").each(function(t,a){b(e(this).find("input").first(),n)})},k=function(t,n){t.find(":input").each(function(t,a){var i=e(this),r=i.prop("type");!r||"checkbox"!=r&&"radio"!=r?r&&r.startsWith("select")?x(i,n):b(i,n):y(i,n)})},{init:function(){var t={};e.each(n.conditionals,function(n,r){o={},n&&(a[i][n]=r,f[n]||(f[n]={}),e.each(r.conditions,function(a,i){t[i.field]=r.status;var c=s(i.field),d=c.prop("type")||c.attr("data-type");if("radio"==d||"checkbox"==d)c.each(function(t,a){if(e(a).val()==i.value){var r=e(a).attr("id");l[r]=e(a).val(),f[n][r]=e(a)}});else{var u=c.attr("id");l[u]=!0,f[n][u]=c}o[c.prop("name")]=c}),e.each(o,function(t,a){e(a).on("change",function(t){var a=e(t.target),i=a.prop("type")||a.attr("data-type");return!!(t.originalEvent||"checkbox"!=i&&"radio"!=i||l[a.attr("id")])&&!(!t.originalEvent&&!l[a.attr("id")])&&(d(e(this),n),void g(n))})}))}),e.each(t,function(e,t){t&&c(s(e))})}}).init()},o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};var l,f=function(e,t,n,a){var i=0;n.stepAnimationDuration=parseInt(n.stepAnimationDuration),n.enable_step_data_persistency=t.find(".ff-step-container").attr("data-enable_step_data_persistency"),"yes"==n.enable_step_data_persistency&&(n.enable_step_page_resume=t.find(".ff-step-container").attr("data-enable_step_page_resume"));var r=!!window.fluentFormVars.is_rtl,o=!1,l=function(t){var a=t.response,i=t.step_completed;jQuery.each(a,function(t,a){if(a){var i=Object.prototype.toString.call(a);if("[object Object]"===i){var r=jQuery("[data-name="+t+"]");if(r.length&&"tabular-element"===r.attr("data-type"))jQuery.each(a,function(n,a){var i=jQuery('[name="'+t+"["+n+']\\[\\]"]');jQuery.each(i,function(t,n){-1!=jQuery.inArray(e(n).val(),a)&&e(n).prop("checked",!0).change()})});else if("chained-select"===r.attr("data-type")){var o={meta_key:r.find("select:first").attr("data-meta_key"),form_id:r.closest("form").attr("data-form_id"),action:"fluentform_get_chained_select_options",filter_options:"all",keys:a};jQuery.getJSON(n.ajaxUrl,o).then(function(e){jQuery.each(e,function(e,t){var n=r.find("select[data-key="+e+"]");0!=n.attr("data-index")&&jQuery.each(t,function(e,t){n.append(jQuery("<option />",{value:t,text:t}))}),n.attr("disabled",!1).val(a[e])})})}else jQuery.each(a,function(e,n){jQuery('[name="'+t+"["+e+']"]').val(n).change()})}else if("[object Array]"===i){var l=jQuery("[name="+t+"]");if((l=(l=l.length?l:jQuery("[data-name="+t+"]")).length?l:jQuery("[name="+t+"\\[\\]]")).prop("multiple"))l.val(a).change();else if("repeater_field"===l.attr("data-type")){var f=l.find("tbody"),s=l.attr("data-name");jQuery.each(a,function(t,n){0!=t?f.find("tr:last").clone().appendTo(f).find(".ff-el-form-control").each(function(a,i){var r="ffrpt-"+(new Date).getTime()+a;e(i).attr({id:r,name:s+"["+t+"][]",value:n[a]}).change()}):f.find("tr:first .ff-el-form-control").each(function(t,a){e(a).val(n[t]).change()})})}else l.each(function(t,n){-1!=jQuery.inArray(e(n).val(),a)&&e(n).prop("checked",!0).change()})}else{var c=jQuery("[name="+t+"]");"radio"===c.prop("type")||"checkbox"===c.prop("type")?jQuery("[name="+t+"][value="+a+"]").prop("checked",!0).change():c.val(a).change()}}}),o=!0,"yes"==n.enable_step_page_resume&&c(i,n.stepAnimationDuration,!0),o=!1},f=function(a){if(t.find(".ff-el-progress").length){var i=a.totalSteps,r=a.activeStep,o=100/i*(r+1),l=t.find(".ff-el-progress-title li"),f=t.find(".ff-step-header .ff-el-progress-bar"),s=f.find("span");f.css({width:o+"%"}),o?f.append(s.text(parseInt(o)+"%")):s.empty();var c=n.step_text,d=e(l[r]).text();c=c.replace("%activeStep%",r+1).replace("%totalStep%",i).replace("%stepTitle%",d),t.find(".ff-el-progress-status").html(c),l.css("display","none"),e(l[r]).css("display","inline")}},s=function(n){e(document).on("keydown",a+" .fluentform-step > .step-nav button",function(t){9==t.which&&"next"==e(this).data("action")&&t.preventDefault()}),e(a).on("click",".fluentform-step .step-nav button",function(a){var r=e(this).data("action"),o="next",l=e(this).closest(".fluentform-step"),f=window.fluentFormApp(t);if("next"==r){try{var s=l.find(":input").not(":button").filter(function(t,n){return!e(n).closest(".has-conditions").hasClass("ff_excluded")});s.length&&f.validate(s),i++}catch(a){if(!(a instanceof window.ffValidationError))throw a;return f.showErrorMessages(a.messages),void f.scrollToFirstError(350)}t.trigger("ff_to_next_page",i),jQuery(document).trigger("ff_to_next_page",{step:i,form:t}),u(i)}else i--,o="prev",t.trigger("ff_to_prev_page",i),jQuery(document).trigger("ff_to_prev_page",{step:i,form:t});var d="yes"!=t.find(".ff-step-container").attr("data-disable_auto_focus");c(i,n,d,o)})},c=function(l,s){var c=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"next";e("div"+a+"_errors").empty(),i=l;var p=t.find(".ff-step-body"),v=t.find(".ff-step-titles li"),m=t.find(".fluentform-step"),h=m.length,g=t.offset().top-(e("#wpadminbar")?32:0)-20;m.removeClass("active"),e(m[i]).addClass("active"),v.removeClass("ff_active ff_completed"),e.each([].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(Array(i).keys())),function(t){e(e(v[t])).addClass("ff_completed")}),e(v[i]).addClass("ff_active");var _={left:-100*i+"%"};if(r&&(_={right:-100*i+"%"}),p.animate(_,s,function(){return c&&void(window.ff_disable_step_scroll||(window.ff_scroll_top_offset&&(g=window.ff_scroll_top_offset),e("html, body").delay(s).animate({scrollTop:g},s,function(n){e(".fluentform-step.active",t).find(":input:visible:first").focus()})))}),"yes"!=n.enable_step_data_persistency||o||d(t,i).then(function(e){console.log(e)}),f({activeStep:i,totalSteps:h}),m.last().hasClass("active"))t.find('button[type="submit"]').css("display","inline-block");else if(t.find('button[type="submit"]').css("display","none"),!window.ff_disable_auto_step){var y=t.find(".fluentform-step.active"),x=t.find(".fluentform-step.active > div").length-1,b=t.find(".fluentform-step.active > .ff_excluded").length;t.find(".fluentform-step.active > .ff-t-container").length&&(x-=t.find(".fluentform-step.active > .ff-t-container").length,x+=t.find(".fluentform-step.active > .ff-t-container > .ff-t-cell > div").length,b+=t.find(".fluentform-step.active > .ff-t-container > .ff-t-cell > .ff_excluded").length),x==b&&y.find(".step-nav button[data-action="+u+"]").click()}},d=function(t,a){var i=t.find(":input").filter(function(t,n){return!e(n).closest(".has-conditions").hasClass("ff_excluded")});i.filter(function(t,n){var a=e(n);return a.parents().hasClass("ff_repeater_table")&&"select"==a.attr("type")&&!a.val()}).prepend("<option selected disabled />");var r={active_step:a,data:i.serialize(),form_id:t.data("form_id"),action:"fluentform_step_form_save_data"};return jQuery.post(n.ajaxUrl,r)},u=function(n){var a=t.find(".fluentform-step"),i=e(a[n]);jQuery.each(i.find(".ff_dynamic_value"),function(n,a){var i=e(a).data("ref");if("payment_summary"!=i){var r=t.find('.ff-el-form-control[name="'+i+'"]'),o=" ";r.length||(r=t.find('.ff-field_container[data-name="'+i+'"]').find("input")),r.length||(r=t.find('*[name="'+i+'"]:checked')).length||(r=t.find('*[name="'+i+'[]"]:checked'),o=", ");var l=[];e.each(r,function(){var t=e(this).val();t&&l.push(t)});var f="";f=l.length?l.join(o):e(a).data("fallback"),e(this).html(f)}else t.trigger("calculate_payment_summary",{element:e(a)})})};return{init:function(){var a,r,o,c;"no"!=n.enable_step_data_persistency&&jQuery(document).ready(function(e){jQuery.getJSON(n.ajaxUrl,{form_id:t.data("form_id"),action:"fluentform_step_form_get_data"}).then(function(e){e&&l(e)})}),t.find(".fluentform-step:first").find('.step-nav [data-action="prev"]').remove(),a=t.find(".ff-step-body"),r=t.find(".fluentform-step"),o=r.length,c=t.find(".ff-step-titles li"),a.css({width:100*o+"%"}),r.css({width:100/o+"%"}),e(r[i]).addClass("active"),e(c[i]).addClass("active"),r.length&&!r.last().hasClass("active")&&t.find('button[type="submit"]').css("display","none"),f({activeStep:i,totalSteps:o}),s(n.stepAnimationDuration),function(){function n(e){var t=e.closest(".fluentform-step.active").find(".ff-el-group:not(.ff_excluded)").length,n=window.ffTransitionTimeOut||400;1==t&&setTimeout(function(){e.closest(".fluentform-step.active").find(".ff-btn-next").trigger("click")},n)}"yes"==t.find(".ff-step-container").attr("data-enable_auto_slider")&&(t.find(".ff-el-form-check-radio,.ff-el-net-label, .ff-el-ratings label").on("click",function(){n(e(this))}),t.find("select").on("change",function(){n(e(this))}))}()},updateSlider:c}},s=function(e,t){var n=t.find(".ff_has_formula");if(n.length){var a={};mexp.addToken([{type:8,token:"round",show:"round",value:function(e,t){return t||0===t||(t=2),e=parseFloat(e).toFixed(t),parseFloat(e)}},{type:8,token:"max",show:"max",value:function(e,t){return e>t?e:t}}]);var i=function i(){jQuery.each(n,function(n,o){var l=jQuery(o),f=l.data("calculation_formula"),s=function(e,t){for(var n=[],a=void 0,i=RegExp(e,"g");a=i.exec(t);)delete a.input,n.push(a);return n}(/{(.*?)}/g,f),c={};jQuery.each(s,function(e,n){var o=n[0];if(-1!=o.indexOf("{input.")){var l=o.replace(/{input.|}/g,"");c[o]=t.find("input[name="+l+"]").val()||0}else if(-1!=o.indexOf("{select.")){var f=o.replace(/{select.|}/g,""),s=r("select[data-name="+f+"] option:selected");t.find("select[data-name="+f+"]").attr("data-calc_value",s),c[o]=s}else if(-1!=o.indexOf("{checkbox.")){var d=o.replace(/{checkbox.|}/g,"");c[o]=r("input[data-name="+d+"]:checked")}else if(-1!=o.indexOf("{radio.")){var u=o.replace(/{radio.|}/g,"");c[o]=t.find("input[name="+u+"]:checked").attr("data-calc_value")||0}else if(-1!=o.indexOf("{repeat.")){var p=o.replace(/{repeat.|}/g,""),v=t.find("table[data-root_name="+p+"]");a[p]||(a[p]=!0,v.on("repeat_change",function(){i()})),c[o]=v.find("tbody tr").length}}),jQuery.each(c,function(e,t){t||(t=0),f=f.split(e).join(t)});var d="";try{if(d=mexp.eval(f),isNaN(d)&&(d=""),"string"==typeof f&&0===f.indexOf("round")){var u=parseInt(f.substr(-2,1));u&&Number.isInteger(u)&&(d=parseFloat(d).toFixed(2))}}catch(e){console.log(e)}"text"==l[0].type?e(l).val(d).prop("defaultValue",d).trigger("change"):l.text(d)})};t.find("input[type=number],input[data-calc_value],select[data-calc_value]").on("change keyup",i).trigger("change"),i()}function r(n){var a=0,i=t.find(n);return e.each(i,function(t,n){var i=e(n).attr("data-calc_value");i&&!isNaN(i)&&(a+=Number(i))}),a}};jQuery(document).ready(function(){!function(e){a(e),function(e){var t=e(".fluentform .js-repeat");e.each(t,function(t,n){var a=e(n);if(a.find(".ff-t-cell").length>1){var i=a.find(".ff-el-group").height()-a.find(".ff-el-group").find(".ff-el-input--content").height();a.find(".js-repeat-buttons").css("margin-top",i+"px")}var r=a.find(".ff-el-group").find(".ff-el-input--content .ff-el-form-control").outerHeight();a.find(".ff-el-repeat-buttons").height(r)})}(e),function(e){var t=e(".jss-ff-el-ratings");t.length&&e.each(t,function(t,n){var a=e(n);a.find("label.active").prevAll().addClass("active"),a.on("mouseenter","label",function(t){var n=e(this),a="[data-id="+n.find("input").attr("id")+"]";n.addClass("active"),n.prevAll().addClass("active"),n.nextAll().removeClass("active"),n.closest(".ff-el-input--content").find(".ff-el-rating-text").css("display","none"),n.closest(".ff-el-input--content").find(a).css("display","inline-block")}).on("click","label",function(t){var n=e(this).find(".jss-ff-svg");n.addClass("scale"),n.addClass("scalling"),setTimeout(function(e){n.removeClass("scalling"),n.removeClass("scale")},150)}).on("mouseleave",function(t){var n=e(this),a="[data-id="+n.find("input:checked").attr("id")+"]",i=n.find("input:checked").parent("label");i.length?(i.addClass("active"),i.prevAll().addClass("active"),i.nextAll().removeClass("active")):n.find("label").removeClass("active"),n.closest(".ff-el-input--content").find(".ff-el-rating-text").css("display","none"),n.closest(".ff-el-input--content").find(a).css("display","inline-block")})})}(e);var t=e(".frm-fluent-form");e.each(t,function(t,n){var a=e(n),l=a.attr("data-form_instance"),c=window["fluent_form_"+l];if(c){c.form_id_selector;var d="."+c.form_instance,u=f(e,a,window.fluentFormVars,d);!function(e,t,n,a,i){var r=function(e){if(e.type.match("image"))return URL.createObjectURL(e);var t=document.createElement("canvas");t.width=60,t.height=60,t.style.zIndex=8,t.style.position="absolute",t.style.border="1px solid";var n=t.getContext("2d");return n.fillStyle="rgba(0, 0, 0, 0.2)",n.fillRect(0,0,60,60),n.font="13px Arial",n.fillStyle="white",n.textAlign="center",n.fillText(e.type.substr(e.type.indexOf("/")+1),30,30,60),t.toDataURL()},l=function(e){return e<1024?e+"bytes":e>=1024&&e<=1048576?(e/1024).toFixed(1)+"KB":e>1048576?(e/1048576).toFixed(1)+"MB":void 0},f=function(e,t){var n=[],a="",i="";if("allowed_file_types"in t?(a=t.allowed_file_types.value,i=t.allowed_file_types.message):"allowed_image_types"in t&&(a=t.allowed_image_types.value,i=t.allowed_image_types.message),a){var r=new RegExp("("+a.join("|")+")","i"),o=e.name.split(".").pop();o=o.toLowerCase(),r.test(o)||n.push(i)}return"max_file_size"in t&&e.size>t.max_file_size.value&&n.push(t.max_file_size.message),n};t.find('input[type="file"]').each(function(s,c){var d,u=e(this);d=e("<div/>",{class:"ff-uploaded-list",style:"font-size:12px; margin-top: 15px;"}),u.closest("div").append(d);var p=n.rules[u.prop("name")],v=p.max_file_count.value;"max_file_count"in p&&(p.max_file_count.remaining=Number(v));var m="";function h(e){var n=u.prop("name");t.trigger("show_element_error",{element:n,message:e})}"allowed_file_types"in p?(m=p.allowed_file_types.value.join("|"),u.prop("accept","."+m.replace(/\|/g,",."))):(m=p.allowed_image_types.value.join("|"))?u.prop("accept","."+m.replace(/\|/g,",.")):u.prop("accept","image/*"),u.fileupload({dataType:"json",url:a.ajaxUrl+"?action=fluentform_file_upload&formId="+n.id,change:function(a,r){if(r&&r.files&&r.files.length){if(t.find(".ff-upload-preview-elem").remove(),"max_file_count"in p){e(i+"_errors").empty(),e(this).closest("div").find(".error").html("");var o=p.max_file_count.remaining;if(!o||r.files.length>o){var l="Maximum 1 file is allowed!";return l=v>1?"Maximum "+v+" files are allowed!":l,p.max_file_count&&p.max_file_count.message&&(l=p.max_file_count.message),h(l),!1}}var s=f(r.files[0],n.rules[u.prop("name")]);return!s.length||(h(s.join(", ")),!1)}},add:function(t,n){var i=e("<div/>",{class:"ff-upload-preview"});n.context=i;var o=e("<div/>",{class:"ff-upload-thumb"}),f=e("<div/>",{class:"ff-upload-details"}),s=e("<div/>",{class:"ff-upload-preview-img",style:"background-image: url('"+r(n.files[0])+"');"}),c=e("<div>",{class:"ff-upload-error",style:"color:red;"}),u=e("<span/>",{html:a.upload_start_txt,class:"ff-upload-progress-inline-text ff-inline-block"}),p=e('\n\t\t\t\t\t\t\t\t\t<div class="ff-upload-progress-inline ff-el-progress">\n\t\t\t\t\t\t\t\t\t\t<div class="ff-el-progress-bar"></div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t'),v=e("<div/>",{class:"ff-upload-filename",html:n.files[0].name}),m=e("<span/>",{"data-href":"#",html:"&times;",class:"ff-upload-remove"}),h=e("<div>",{class:"ff-upload-filesize ff-inline-block",html:l(n.files[0].size)});o.append(s),f.append(v,p,u,h,c,m),i.append(o,f),d.append(i),v.css({maxWidth:n.context.width()-91+"px"}),n.submit(),n.context.addClass("ff_uploading")},progress:function(e,t){var n=parseInt(t.loaded/t.total*100,10);t.context.find(".ff-el-progress-bar").css("width",n+"%"),t.context.find(".ff-upload-progress-inline-text").text(a.uploading_txt)},done:function(e,t){if(t.context.removeClass("ff_uploading"),t.result&&"data"in t.result&&"files"in t.result.data)"error"in t.result.data.files[0]?(h("Upload Error: "+t.result.data.files[0].error),t.context.remove()):(t.context.find(".ff-upload-progress-inline-text").text(a.upload_completed_txt),p.max_file_count.remaining-=1,t.context.css("border","1px solid #6f757d"),t.context.attr("data-src",t.result.data.files[0].url),t.context.find(".ff-upload-remove").attr("data-href",t.result.data.files[0].file));else{var n="Sorry! The upload failed for some unknown reason.";if(t.messages){var i=Object.keys(t.messages);i.length&&(n=t.messages[i[0]])}h(n),t.context.remove()}},fail:function(t,n){var a=[];n.context.remove(),n.jqXHR.responseJSON&&n.jqXHR.responseJSON.data&&n.jqXHR.responseJSON.data.errors?e.each(n.jqXHR.responseJSON.data.errors,function(t,n){"object"==(void 0===n?"undefined":o(n))?e.each(n,function(e,t){a.push(t)}):a.push(n)}):n.jqXHR.responseText?a.push(n.jqXHR.responseText):a.push("Something is wrong when uploading the file! Please try again"),h(a.join(", "))}})}),e(".ff-uploaded-list").on("click",".ff-upload-remove",function(t){t.preventDefault();var i=e(this),r=i.closest(".ff-uploaded-list"),o=i.attr("data-href");"#"==o?(i.closest(".ff-upload-preview").remove(),r.find(".ff-upload-preview").length||r.siblings(".ff-upload-progress").addClass("ff-hidden")):e.post(a.ajaxUrl,{path:o,action:"fluentform_delete_uploaded_file"}).then(function(e){var t=i.closest(".ff-el-input--content").find("input");n.rules[t.prop("name")].max_file_count.remaining+=1,i.closest(".ff-upload-preview").remove(),r.find(".ff-upload-preview").length||r.siblings(".ff-upload-progress").addClass("ff-hidden")})})}(e,a,c,window.fluentFormVars,d),i(a),r(e,a,c,window.fluentFormVars),u.init(),s(e,a),a.on("update_slider",function(e,t){u.updateSlider(t.goBackToStep,t.animDuration,t.isScrollTop,t.actionType)}),jQuery(document).on("reInitExtras",d,function(){a=jQuery("form"+d),f(jQuery,a,window.fluentFormVars,d).init(),i(a),r(e,a,c),s(e,a)})}else console.log("No Fluent form JS vars found!")})}(jQuery)}),(l=String.prototype).startsWith||(l.startsWith=function(e){return!(!e||!this||this.lastIndexOf(e,0))}),l.endsWith||(l.endsWith=function(e){var t=e&&this?this.length-e.length:-1;return t>=0&&this.lastIndexOf(e,t)===t})}});
1
+ !function(e){var t={};function n(a){if(t[a])return t[a].exports;var i=t[a]={i:a,l:!1,exports:{}};return e[a].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:a})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1452)}({1452:function(e,t,n){e.exports=n(1453)},1453:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){var t=e(".jss-ff-el-net-promoter");t.length&&e.each(t,function(t,n){e(n).on("click","label",function(t){var n=e(this);n.addClass("active"),n.prevAll().removeClass("active"),n.nextAll().removeClass("active")})})},i=function(e){!function(e){e.on("click",".js-repeat .repeat-plus",function(e){var t=jQuery(this),n=t.closest(".ff-el-repeat"),a=parseInt(n.data("max_repeat")),i=n.find(".ff-t-cell:first-child .ff-el-input--content > input").length;if(!(a&&a<=i)){a&&a-i==1&&n.find(".repeat-plus").hide();var r=t.closest("div"),o=r.index(),l=t.closest(".ff-el-input--content").find(".ff-t-cell").length;t.closest(".ff-el-input--content").find(".ff-t-cell").each(function(e,t){var n=jQuery(this).find(".ff-el-form-control:last-child"),a=n.attr("tabindex"),i=n.clone(),r={value:"",id:"ffrpt-"+(new Date).getTime()+e};a&&(r.tabIndex=parseInt(a)+l),i.prop(r),i.insertAfter(n)}),r.clone().insertAfter(r),t.closest(".ff-el-input--content").find(".ff-t-cell").eq(0).find("input:eq("+(o+1)+")").focus()}}),e.on("click",".js-repeat .repeat-minus",function(e){var t=!1,n=jQuery(this),a=n.closest("div");n.closest(".ff-el-repeat").find(".repeat-plus").show(),n.closest(".ff-el-input--content").find(".ff-t-cell").each(function(){var e=a.index(),n=jQuery(this).find(".ff-el-form-control:eq("+e+")");a.siblings().length&&(t=n.remove().length)}),t&&a.remove()})}(e),function(e){e.on("click",".js-repeater .repeat-plus",function(e){var t=jQuery(this),n=t.closest("table"),a=t.closest("tr"),i=parseInt(n.attr("data-max_repeat")),r=n.find("tbody tr").length;if(i&&r==i)n.addClass("repeat-maxed");else{var o=a.clone();o.find("td").each(function(e,t){var n=jQuery(this).find(".ff-el-form-control:last-child"),a=(n.attr("tabindex"),"ffrpt-"+(new Date).getTime()+e),i=(n.data("name"),{value:"",id:a});n.prop(i)}),o.insertAfter(a);var l=n.attr("data-root_name"),f=0;n.find("tbody tr").each(function(e,t){jQuery(this).find(".ff-el-form-control").each(function(t,n){var a=jQuery(n);0==e&&(f=a.attr("tabindex")),a.prop({name:l+"["+e+"][]"}),a.attr("data-name",l+"_"+t+"_"+e),f&&a.attr("tabindex",f)})}),o.find(".ff-el-form-control")[0].focus(),n.trigger("repeat_change"),i&&r+1==i&&n.addClass("repeat-maxed")}}),e.on("click",".js-repeater .repeat-minus",function(e){var t=jQuery(this),n=t.closest("table");if(1!=n.find("tbody tr").length){t.closest("tr").remove(),n.removeClass("repeat-maxed");var a=n.attr("data-root_name");n.find("tbody tr").each(function(e,t){jQuery(this).find(".ff-el-form-control").each(function(t,n){jQuery(n).prop({name:a+"["+e+"][]"})})}),n.trigger("repeat_change")}})}(e)},r=function(e,t,n){var a={},i=n.form_id_selector,r="."+n.form_instance;window.stackItems={},a[i]={};var o,l,f,s,c,d,u,p,v,m,h,g,_,y,x,b,j,w,k;(o=void 0,l={},f={},s=function(t){var n=e(r),a=e("[data-name='"+t+"']",n);return(a=a.length?a:e("[name='"+t+"']",n)).length?a:e("[name='"+t+"[]']",n)},c=function(e){var t=e.prop("type")||e.attr("data-type");if("checkbox"==t||"radio"==t){if(e.filter(":checked").length)return e.trigger("change")}else if("select-multiple"==t){if(e.val()&&e.val().length)return e.trigger("change")}else if(e.val())return e.trigger("change")},d=function(t,n){var r=t.prop("name").replace("[]","");return e.each(a[i][n].conditions,function(e,n){var a=t.prop("type");r==n.field&&("checkbox"==a?u(n,t):"radio"==a?p(n,t):a.startsWith("select")?v(n,t):m(n,t))}),!0},u=function(e,t){"="==e.operator?e.value?t.val()==e.value&&(e.status=t.is(":checked")):e.status=!t.is(":checked"):e.value?t.val()==e.value&&(e.status=!t.is(":checked")):e.status=t.is(":checked")},p=function(e,t){t.is(":checked")?e.status=h(e,t.val()):t.val()==e.value&&("="==e.operator?e.status=!1:e.status=!0)},v=function(t,n){"="==t.operator?t.value?n.prop("multiple")?n.find("option").each(function(n,a){e(a).val()==t.value&&(t.status=e(a).is(":selected"))}):t.status=t.value==n.find("option:selected").val():n.prop("multiple")?t.status=!n.find("option:selected").length:t.status=""==n.find("option:selected").val():t.value?n.prop("multiple")?n.find("option").each(function(n,a){e(a).val()==t.value&&(t.status=!e(a).is(":selected"))}):t.status=t.value!=n.find("option:selected").val():n.prop("multiple")?t.status=n.find("option:selected").length:t.status=""!=n.find("option:selected").val()},m=function(e,t){var n=t.val();e.status=h(e,n)},h=function(e,t){return"="==e.operator?t==e.value:"!="==e.operator?t!=e.value:">"==e.operator?t&&t>Number(e.value):"<"==e.operator?t&&t<Number(e.value):">="==e.operator?t&&t>=Number(e.value):"<="==e.operator?t&&t<=Number(e.value):"startsWith"==e.operator?t.startsWith(e.value):"endsWith"==e.operator?t.endsWith(e.value):"contains"==e.operator?-1!=t.indexOf(e.value):"doNotContains"==e.operator&&-1==t.indexOf(e.value)},g=function(t){var n=!1,r=[];e.each(a[i][t].conditions,function(e,t){r.push(Boolean(t.status))});var o=r.filter(function(e){return e}).length;if("any"==a[i][t].type)n=Boolean(o);else{var f=a[i][t].conditions.length;n=Boolean(f==o)}_(t,n,function(n,a){var i=n.prop("type")||n.attr("data-type");if(i){stackItems[t]||(stackItems[t]=0),stackItems[t]+=1;var r=!1;!i||"checkbox"!=i&&"radio"!=i?i&&i.startsWith("select")?x(n,a):i&&"name-element"==i?j(n,a):i&&"repeat-element"==i?w(n,a):i&&"address-element"==i?k(n,a):"hidden"!=i&&b(n,a):(y(n,a),n.each(function(t,n){var a=e(n);l[a.attr("id")]&&a.trigger("change")}),r=!0),n.closest(".has-conditions:hidden").addClass("ff_excluded"),n.closest(".has-conditions:visible").removeClass("ff_excluded"),!r&&l[n.attr("id")]&&n.trigger("change")}})},_=function(e,t,n){var a=s(e),i=t?"slideDown":"slideUp";"slideup"==i&&a.is(":hidden")||"slideDown"==i&&a.is(":visible")||a.closest(".has-conditions")[i](200,function(){n&&n(a,t)})},y=function(t,n){t.each(function(t,a){var i=e(this);i.prop("checked",!!n&&i.prop("defaultChecked"))})},x=function(t,n){t.find("option").each(function(t,a){var i=e(this);i.prop("selected",!!n&&i.prop("defaultSelected"))})},b=function(e,t){e.val(t?e.prop("defaultValue"):"")},j=function(t,n){t.find("input").each(function(t,a){b(e(this),n)})},w=function(t,n){t.find(".ff-t-cell").each(function(t,a){b(e(this).find("input").first(),n)})},k=function(t,n){t.find(":input").each(function(t,a){var i=e(this),r=i.prop("type");!r||"checkbox"!=r&&"radio"!=r?r&&r.startsWith("select")?x(i,n):b(i,n):y(i,n)})},{init:function(){var t={};e.each(n.conditionals,function(n,r){o={},n&&(a[i][n]=r,f[n]||(f[n]={}),e.each(r.conditions,function(a,i){t[i.field]=r.status;var c=s(i.field),d=c.prop("type")||c.attr("data-type");if("radio"==d||"checkbox"==d)c.each(function(t,a){if(e(a).val()==i.value){var r=e(a).attr("id");l[r]=e(a).val(),f[n][r]=e(a)}});else{var u=c.attr("id");l[u]=!0,f[n][u]=c}o[c.prop("name")]=c}),e.each(o,function(t,a){e(a).on("change",function(t){var a=e(t.target),i=a.prop("type")||a.attr("data-type");return!!(t.originalEvent||"checkbox"!=i&&"radio"!=i||l[a.attr("id")])&&!(!t.originalEvent&&!l[a.attr("id")])&&(d(e(this),n),void g(n))})}))}),e.each(t,function(e,t){t&&c(s(e))})}}).init()},o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};var l,f=function(e,t,n,a){var i=0;n.stepAnimationDuration=parseInt(n.stepAnimationDuration),n.enable_step_data_persistency=t.find(".ff-step-container").attr("data-enable_step_data_persistency"),"yes"==n.enable_step_data_persistency&&(n.enable_step_page_resume=t.find(".ff-step-container").attr("data-enable_step_page_resume"));var r=!!window.fluentFormVars.is_rtl,o=!1,l=function(t){var a=t.response,i=t.step_completed;jQuery.each(a,function(t,a){if(a){var i=Object.prototype.toString.call(a);if("[object Object]"===i){var r=jQuery("[data-name="+t+"]");if(r.length&&"tabular-element"===r.attr("data-type"))jQuery.each(a,function(n,a){var i=jQuery('[name="'+t+"["+n+']\\[\\]"]');jQuery.each(i,function(t,n){-1!=jQuery.inArray(e(n).val(),a)&&e(n).prop("checked",!0).change()})});else if("chained-select"===r.attr("data-type")){var o={meta_key:r.find("select:first").attr("data-meta_key"),form_id:r.closest("form").attr("data-form_id"),action:"fluentform_get_chained_select_options",filter_options:"all",keys:a};jQuery.getJSON(n.ajaxUrl,o).then(function(e){jQuery.each(e,function(e,t){var n=r.find("select[data-key="+e+"]");0!=n.attr("data-index")&&jQuery.each(t,function(e,t){n.append(jQuery("<option />",{value:t,text:t}))}),n.attr("disabled",!1).val(a[e])})})}else jQuery.each(a,function(e,n){jQuery('[name="'+t+"["+e+']"]').val(n).change()})}else if("[object Array]"===i){var l=jQuery("[name="+t+"]");if((l=(l=l.length?l:jQuery("[data-name="+t+"]")).length?l:jQuery("[name="+t+"\\[\\]]")).prop("multiple"))l.val(a).change();else if("repeater_field"===l.attr("data-type")){var f=l.find("tbody"),s=l.attr("data-name");jQuery.each(a,function(t,n){0!=t?f.find("tr:last").clone().appendTo(f).find(".ff-el-form-control").each(function(a,i){var r="ffrpt-"+(new Date).getTime()+a;e(i).attr({id:r,name:s+"["+t+"][]",value:n[a]}).change()}):f.find("tr:first .ff-el-form-control").each(function(t,a){e(a).val(n[t]).change()})})}else l.each(function(t,n){-1!=jQuery.inArray(e(n).val(),a)&&e(n).prop("checked",!0).change()})}else{var c=jQuery("[name="+t+"]");"radio"===c.prop("type")||"checkbox"===c.prop("type")?jQuery("[name="+t+"][value="+a+"]").prop("checked",!0).change():c.val(a).change()}}}),o=!0,"yes"==n.enable_step_page_resume&&c(i,n.stepAnimationDuration,!0),o=!1},f=function(a){if(t.find(".ff-el-progress").length){var i=a.totalSteps,r=a.activeStep,o=100/i*(r+1),l=t.find(".ff-el-progress-title li"),f=t.find(".ff-step-header .ff-el-progress-bar"),s=f.find("span");f.css({width:o+"%"}),o?f.append(s.text(parseInt(o)+"%")):s.empty();var c=n.step_text,d=e(l[r]).text();c=c.replace("%activeStep%",r+1).replace("%totalStep%",i).replace("%stepTitle%",d),t.find(".ff-el-progress-status").html(c),l.css("display","none"),e(l[r]).css("display","inline")}},s=function(n){e(document).on("keydown",a+" .fluentform-step > .step-nav button",function(t){9==t.which&&"next"==e(this).data("action")&&t.preventDefault()}),e(a).on("click",".fluentform-step .step-nav button",function(a){var r=e(this).data("action"),o="next",l=e(this).closest(".fluentform-step"),f=window.fluentFormApp(t);if("next"==r){try{var s=l.find(":input").not(":button").filter(function(t,n){return!e(n).closest(".has-conditions").hasClass("ff_excluded")});s.length&&f.validate(s),i++}catch(a){if(!(a instanceof window.ffValidationError))throw a;return f.showErrorMessages(a.messages),void f.scrollToFirstError(350)}t.trigger("ff_to_next_page",i),jQuery(document).trigger("ff_to_next_page",{step:i,form:t}),u(i)}else i--,o="prev",t.trigger("ff_to_prev_page",i),jQuery(document).trigger("ff_to_prev_page",{step:i,form:t});var d="yes"!=t.find(".ff-step-container").attr("data-disable_auto_focus");c(i,n,d,o)})},c=function(l,s){var c=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"next";e("div"+a+"_errors").empty(),i=l;var p=t.find(".ff-step-body"),v=t.find(".ff-step-titles li"),m=t.find(".fluentform-step"),h=m.length,g=t.offset().top-(e("#wpadminbar")?32:0)-20;m.removeClass("active"),e(m[i]).addClass("active"),v.removeClass("ff_active ff_completed"),e.each([].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(Array(i).keys())),function(t){e(e(v[t])).addClass("ff_completed")}),e(v[i]).addClass("ff_active");var _={left:-100*i+"%"};if(r&&(_={right:-100*i+"%"}),p.animate(_,s,function(){return c&&void(window.ff_disable_step_scroll||(window.ff_scroll_top_offset&&(g=window.ff_scroll_top_offset),e("html, body").delay(s).animate({scrollTop:g},s,function(n){e(".fluentform-step.active",t).find(":input:visible:first").focus()})))}),"yes"!=n.enable_step_data_persistency||o||d(t,i).then(function(e){console.log(e)}),f({activeStep:i,totalSteps:h}),m.last().hasClass("active"))t.find('button[type="submit"]').css("display","inline-block");else if(t.find('button[type="submit"]').css("display","none"),!window.ff_disable_auto_step){var y=t.find(".fluentform-step.active"),x=t.find(".fluentform-step.active > div").length-1,b=t.find(".fluentform-step.active > .ff_excluded").length;t.find(".fluentform-step.active > .ff-t-container").length&&(x-=t.find(".fluentform-step.active > .ff-t-container").length,x+=t.find(".fluentform-step.active > .ff-t-container > .ff-t-cell > div").length,b+=t.find(".fluentform-step.active > .ff-t-container > .ff-t-cell > .ff_excluded").length),x==b&&y.find(".step-nav button[data-action="+u+"]").click()}},d=function(t,a){var i=t.find(":input").filter(function(t,n){return!e(n).closest(".has-conditions").hasClass("ff_excluded")});i.filter(function(t,n){var a=e(n);return a.parents().hasClass("ff_repeater_table")&&"select"==a.attr("type")&&!a.val()}).prepend("<option selected disabled />");var r={active_step:a,data:i.serialize(),form_id:t.data("form_id"),action:"fluentform_step_form_save_data"};return jQuery.post(n.ajaxUrl,r)},u=function(n){var a=t.find(".fluentform-step"),i=e(a[n]);jQuery.each(i.find(".ff_dynamic_value"),function(n,a){var i=e(a).data("ref");if("payment_summary"!=i){var r=t.find('.ff-el-form-control[name="'+i+'"]'),o=" ";r.length||(r=t.find('.ff-field_container[data-name="'+i+'"]').find("input")),r.length||(r=t.find('*[name="'+i+'"]:checked')).length||(r=t.find('*[name="'+i+'[]"]:checked'),o=", ");var l=[];e.each(r,function(){var t=e(this).val();t&&l.push(t)});var f="";f=l.length?l.join(o):e(a).data("fallback"),e(this).html(f)}else t.trigger("calculate_payment_summary",{element:e(a)})})};return{init:function(){var a,r,o,c;"no"!=n.enable_step_data_persistency&&jQuery(document).ready(function(e){jQuery.getJSON(n.ajaxUrl,{form_id:t.data("form_id"),action:"fluentform_step_form_get_data"}).then(function(e){e&&l(e)})}),t.find(".fluentform-step:first").find('.step-nav [data-action="prev"]').remove(),a=t.find(".ff-step-body"),r=t.find(".fluentform-step"),o=r.length,c=t.find(".ff-step-titles li"),a.css({width:100*o+"%"}),r.css({width:100/o+"%"}),e(r[i]).addClass("active"),e(c[i]).addClass("active"),r.length&&!r.last().hasClass("active")&&t.find('button[type="submit"]').css("display","none"),f({activeStep:i,totalSteps:o}),s(n.stepAnimationDuration),function(){function n(e){var t=e.closest(".fluentform-step.active").find(".ff-el-group:not(.ff_excluded)").length,n=window.ffTransitionTimeOut||400;1==t&&setTimeout(function(){e.closest(".fluentform-step.active").find(".ff-btn-next").trigger("click")},n)}"yes"==t.find(".ff-step-container").attr("data-enable_auto_slider")&&(t.find(".ff-el-form-check-radio,.ff-el-net-label, .ff-el-ratings label").on("click",function(){n(e(this))}),t.find("select").on("change",function(){n(e(this))}))}()},updateSlider:c}},s=function(e,t){var n=t.find(".ff_has_formula");if(n.length){var a={};mexp.addToken([{type:8,token:"round",show:"round",value:function(e,t){return t||0===t||(t=2),e=parseFloat(e).toFixed(t),parseFloat(e)}},{type:8,token:"max",show:"max",value:function(e,t){return e>t?e:t}}]);var i=function i(){jQuery.each(n,function(n,o){var l=jQuery(o),f=l.data("calculation_formula"),s=function(e,t){for(var n=[],a=void 0,i=RegExp(e,"g");a=i.exec(t);)delete a.input,n.push(a);return n}(/{(.*?)}/g,f),c={};jQuery.each(s,function(e,n){var o=n[0];if(-1!=o.indexOf("{input.")){var l=o.replace(/{input.|}/g,"");c[o]=t.find("input[name="+l+"]").val()||0}else if(-1!=o.indexOf("{select.")){var f=o.replace(/{select.|}/g,""),s=r("select[data-name="+f+"] option:selected");t.find("select[data-name="+f+"]").attr("data-calc_value",s),c[o]=s}else if(-1!=o.indexOf("{checkbox.")){var d=o.replace(/{checkbox.|}/g,"");c[o]=r("input[data-name="+d+"]:checked")}else if(-1!=o.indexOf("{radio.")){var u=o.replace(/{radio.|}/g,"");c[o]=t.find("input[name="+u+"]:checked").attr("data-calc_value")||0}else if(-1!=o.indexOf("{repeat.")){var p=o.replace(/{repeat.|}/g,""),v=t.find("table[data-root_name="+p+"]");a[p]||(a[p]=!0,v.on("repeat_change",function(){i()})),c[o]=v.find("tbody tr").length}}),jQuery.each(c,function(e,t){t||(t=0),f=f.split(e).join(t)});var d="";try{if(d=mexp.eval(f),isNaN(d)&&(d=""),"string"==typeof f&&0===f.indexOf("round")){var u=parseInt(f.substr(-2,1));u&&Number.isInteger(u)&&(d=parseFloat(d).toFixed(2))}}catch(e){console.log(e)}"text"==l[0].type?e(l).val(d).prop("defaultValue",d).trigger("change"):l.text(d)})};t.find("input[type=number],input[data-calc_value],select[data-calc_value]").on("change keyup",i).trigger("change"),i()}function r(n){var a=0,i=t.find(n);return e.each(i,function(t,n){var i=e(n).attr("data-calc_value");i&&!isNaN(i)&&(a+=Number(i))}),a}};jQuery(document).ready(function(){!function(e){a(e),function(e){var t=e(".fluentform .js-repeat");e.each(t,function(t,n){var a=e(n);if(a.find(".ff-t-cell").length>1){var i=a.find(".ff-el-group").height()-a.find(".ff-el-group").find(".ff-el-input--content").height();a.find(".js-repeat-buttons").css("margin-top",i+"px")}var r=a.find(".ff-el-group").find(".ff-el-input--content .ff-el-form-control").outerHeight();a.find(".ff-el-repeat-buttons").height(r)})}(e),function(e){var t=e(".jss-ff-el-ratings");t.length&&e.each(t,function(t,n){var a=e(n);a.find("label.active").prevAll().addClass("active"),a.on("mouseenter","label",function(t){var n=e(this),a="[data-id="+n.find("input").attr("id")+"]";n.addClass("active"),n.prevAll().addClass("active"),n.nextAll().removeClass("active"),n.closest(".ff-el-input--content").find(".ff-el-rating-text").css("display","none"),n.closest(".ff-el-input--content").find(a).css("display","inline-block")}).on("click","label",function(t){var n=e(this).find(".jss-ff-svg");n.addClass("scale"),n.addClass("scalling"),setTimeout(function(e){n.removeClass("scalling"),n.removeClass("scale")},150)}).on("mouseleave",function(t){var n=e(this),a="[data-id="+n.find("input:checked").attr("id")+"]",i=n.find("input:checked").parent("label");i.length?(i.addClass("active"),i.prevAll().addClass("active"),i.nextAll().removeClass("active")):n.find("label").removeClass("active"),n.closest(".ff-el-input--content").find(".ff-el-rating-text").css("display","none"),n.closest(".ff-el-input--content").find(a).css("display","inline-block")})})}(e);var t=e(".frm-fluent-form");e.each(t,function(t,n){var a=e(n),l=a.attr("data-form_instance"),c=window["fluent_form_"+l];if(c){c.form_id_selector;var d="."+c.form_instance,u=f(e,a,window.fluentFormVars,d);!function(e,t,n,a,i){var r=function(e){if(e.type.match("image"))return URL.createObjectURL(e);var t=document.createElement("canvas");t.width=60,t.height=60,t.style.zIndex=8,t.style.position="absolute",t.style.border="1px solid";var n=t.getContext("2d");return n.fillStyle="rgba(0, 0, 0, 0.2)",n.fillRect(0,0,60,60),n.font="13px Arial",n.fillStyle="white",n.textAlign="center",n.fillText(e.type.substr(e.type.indexOf("/")+1),30,30,60),t.toDataURL()},l=function(e){return e<1024?e+"bytes":e>=1024&&e<=1048576?(e/1024).toFixed(1)+"KB":e>1048576?(e/1048576).toFixed(1)+"MB":void 0},f=function(e,t){var n=[],a="",i="";if("allowed_file_types"in t?(a=t.allowed_file_types.value,i=t.allowed_file_types.message):"allowed_image_types"in t&&(a=t.allowed_image_types.value,i=t.allowed_image_types.message),a){var r=new RegExp("("+a.join("|")+")","i"),o=e.name.split(".").pop();o=o.toLowerCase(),r.test(o)||n.push(i)}return"max_file_size"in t&&e.size>t.max_file_size.value&&n.push(t.max_file_size.message),n};t.find('input[type="file"]').each(function(s,c){var d,u=e(this);d=e("<div/>",{class:"ff-uploaded-list",style:"font-size:12px; margin-top: 15px;"}),u.closest("div").append(d);var p=n.rules[u.prop("name")],v=p.max_file_count.value;"max_file_count"in p&&(p.max_file_count.remaining=Number(v));var m="";function h(e){var n=u.prop("name");t.trigger("show_element_error",{element:n,message:e})}"allowed_file_types"in p?(m=p.allowed_file_types.value.join("|"),u.prop("accept","."+m.replace(/\|/g,",."))):(m=p.allowed_image_types.value.join("|"))?u.prop("accept","."+m.replace(/\|/g,",.")):u.prop("accept","image/*"),u.fileupload({dataType:"json",url:a.ajaxUrl+"?action=fluentform_file_upload&formId="+n.id,change:function(a,r){if(r&&r.files&&r.files.length){if(t.find(".ff-upload-preview-elem").remove(),"max_file_count"in p){e(i+"_errors").empty(),e(this).closest("div").find(".error").html("");var o=p.max_file_count.remaining;if(!o||r.files.length>o){var l="Maximum 1 file is allowed!";return l=v>1?"Maximum "+v+" files are allowed!":l,p.max_file_count&&p.max_file_count.message&&(l=p.max_file_count.message),h(l),!1}}var s=f(r.files[0],n.rules[u.prop("name")]);return!s.length||(h(s.join(", ")),!1)}},add:function(t,n){var i=e("<div/>",{class:"ff-upload-preview"});n.context=i;var o=e("<div/>",{class:"ff-upload-thumb"}),f=e("<div/>",{class:"ff-upload-details"}),s=e("<div/>",{class:"ff-upload-preview-img",style:"background-image: url('"+r(n.files[0])+"');"}),c=e("<div>",{class:"ff-upload-error",style:"color:red;"}),u=e("<span/>",{html:a.upload_start_txt,class:"ff-upload-progress-inline-text ff-inline-block"}),p=e('\n\t\t\t\t\t\t\t\t\t<div class="ff-upload-progress-inline ff-el-progress">\n\t\t\t\t\t\t\t\t\t\t<div class="ff-el-progress-bar"></div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t'),v=e("<div/>",{class:"ff-upload-filename",html:n.files[0].name}),m=e("<span/>",{"data-href":"#",html:"&times;",class:"ff-upload-remove"}),h=e("<div>",{class:"ff-upload-filesize ff-inline-block",html:l(n.files[0].size)});o.append(s),f.append(v,p,u,h,c,m),i.append(o,f),d.append(i),v.css({maxWidth:n.context.width()-91+"px"}),n.submit(),n.context.addClass("ff_uploading")},progress:function(e,t){var n=parseInt(t.loaded/t.total*100,10);t.context.find(".ff-el-progress-bar").css("width",n+"%"),t.context.find(".ff-upload-progress-inline-text").text(a.uploading_txt)},done:function(e,t){if(t.context.removeClass("ff_uploading"),t.result&&"data"in t.result&&"files"in t.result.data)"error"in t.result.data.files[0]?(h("Upload Error: "+t.result.data.files[0].error),t.context.remove()):(t.context.find(".ff-upload-progress-inline-text").text(a.upload_completed_txt),p.max_file_count.remaining-=1,t.context.css("border","1px solid #6f757d"),t.context.attr("data-src",t.result.data.files[0].url),t.context.find(".ff-upload-remove").attr("data-href",t.result.data.files[0].file));else{var n="Sorry! The upload failed for some unknown reason.";if(t.messages){var i=Object.keys(t.messages);i.length&&(n=t.messages[i[0]])}h(n),t.context.remove()}},fail:function(t,n){var a=[];n.context.remove(),n.jqXHR.responseJSON&&n.jqXHR.responseJSON.data&&n.jqXHR.responseJSON.data.errors?e.each(n.jqXHR.responseJSON.data.errors,function(t,n){"object"==(void 0===n?"undefined":o(n))?e.each(n,function(e,t){a.push(t)}):a.push(n)}):n.jqXHR.responseText?a.push(n.jqXHR.responseText):a.push("Something is wrong when uploading the file! Please try again"),h(a.join(", "))}})}),e(".ff-uploaded-list").on("click",".ff-upload-remove",function(t){t.preventDefault();var i=e(this),r=i.closest(".ff-uploaded-list"),o=i.attr("data-href");"#"==o?(i.closest(".ff-upload-preview").remove(),r.find(".ff-upload-preview").length||r.siblings(".ff-upload-progress").addClass("ff-hidden")):e.post(a.ajaxUrl,{path:o,action:"fluentform_delete_uploaded_file"}).then(function(e){var t=i.closest(".ff-el-input--content").find("input");n.rules[t.prop("name")].max_file_count.remaining+=1,i.closest(".ff-upload-preview").remove(),r.find(".ff-upload-preview").length||r.siblings(".ff-upload-progress").addClass("ff-hidden")})})}(e,a,c,window.fluentFormVars,d),i(a),r(e,a,c,window.fluentFormVars),u.init(),s(e,a),a.on("update_slider",function(e,t){u.updateSlider(t.goBackToStep,t.animDuration,t.isScrollTop,t.actionType)}),jQuery(document).on("reInitExtras",d,function(){a=jQuery("form"+d),f(jQuery,a,window.fluentFormVars,d).init(),i(a),r(e,a,c),s(e,a)})}else console.log("No Fluent form JS vars found!")})}(jQuery)}),(l=String.prototype).startsWith||(l.startsWith=function(e){return!(!e||!this||this.lastIndexOf(e,0))}),l.endsWith||(l.endsWith=function(e){var t=e&&this?this.length-e.length:-1;return t>=0&&this.lastIndexOf(e,t)===t})}});
public/js/form-conditionals.js DELETED
@@ -1 +0,0 @@
1
- !function(t){var n={};function r(e){if(n[e])return n[e].exports;var o=n[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=t,r.c=n,r.d=function(t,n,e){r.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:e})},r.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(n,"a",n),n},r.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},r.p="",r(r.s=1436)}({1436:function(t,n,r){t.exports=r(1437)},1437:function(t,n){var r;jQuery(document).ready(function(){!function(t,n){var r={};t||(t={});var e=n(".frm-fluent-form");n.each(e,function(t,e){var o=n(e).attr("data-form_instance"),i=window["fluent_form_"+o];if(i){var u=i.form_id_selector,f="."+i.form_instance;r[u]={};var a=function(){};"conditionals"in i&&(a.init(i),n(document).on("reInitExtras",f,function(){a.init(i)}))}else console.log("No Fluent form JS vars found!")})}(window.fluentFormVars,jQuery)}),(r=String.prototype).startsWith||(r.startsWith=function(t){return!(!t||!this||this.lastIndexOf(t,0))}),r.endsWith||(r.endsWith=function(t){var n=t&&this?this.length-t.length:-1;return n>=0&&this.lastIndexOf(t,n)===n})}});
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: contact form, contact forms, wp forms, forms, form builder
4
  Requires at least: 4.5
5
  Tested up to: 5.4
6
  Requires PHP: 5.6
7
- Stable tag: 3.6.21
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -302,8 +302,9 @@ Yes, Please check our <a href="https://trello.com/b/FaDlAD9B/public-roadmap-wp-f
302
 
303
  == Changelog ==
304
 
305
- = 3.6.21 (Date: June 19, 2020) =
306
  * Address Field Parser Fix
 
307
  * Added {inputs.fieldName.label} smartcode for accessing checkable field label
308
 
309
  = 3.6.0 (Date: June 18, 2020) =
4
  Requires at least: 4.5
5
  Tested up to: 5.4
6
  Requires PHP: 5.6
7
+ Stable tag: 3.6.22
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
302
 
303
  == Changelog ==
304
 
305
+ = 3.6.22 (Date: June 19, 2020) =
306
  * Address Field Parser Fix
307
+ * Fix Conditional Logic issue for multi-select
308
  * Added {inputs.fieldName.label} smartcode for accessing checkable field label
309
 
310
  = 3.6.0 (Date: June 18, 2020) =