// source --> https://vr-bau-service.de/wp-content/plugins/ws-form/shared/js/ws-form.min.js?ver=1.10.87 
!function(e){"use strict";e.WS_Form=function(t){e.WS_Form.this=this,this.is_admin=this.set_is_admin(),this.user_roles=ws_form_settings.user_roles,this.form_interface=!1,this.group_data_cache=[],this.group_index=0,this.section_data_cache=[],this.field_data_cache=[],this.action_data_cache=[],this.validation_message_cache=[],this.invalid_feedback_cache=[],this.object_cache={},this.object_cache.condition=[],this.object_cache.then=[],this.object_cache.else=[],this.action=!1,this.object_data_scratch=!1,this.form_history=[],this.history_index=0,this.framework_id=!1,this.framework=!1,this.framework_fields=!1,this.column_resize_obj=!1,this.column_size_value=0,this.column_size_value_old=0,this.offset_value=0,this.offset_value_old=0,this.dragged_field=null,this.dragged_field_in_section=null,this.dragged_section=null,this.dragged_section_in_group=null,this.dragging=!1,this.next_sibling_id_old=null,this.section_id_old=null,this.group_id_old=null,this.section_repeatable_dragged=!1,this.section_repeatable_indexes={},this.checksum=!1,this.checksum_setTimeout=!1,this.published_checksum="",this.recaptchas=[],this.recaptchas_v2_default=[],this.recaptchas_v2_invisible=[],this.recaptchas_v3_default=[],this.recaptchas_conditions=[],this.timeout_recaptcha=3e4,this.hcaptchas=[],this.hcaptchas_default=[],this.hcaptchas_invisible=[],this.hcaptchas_conditions=[],this.timeout_hcaptcha=3e4,this.turnstiles=[],this.turnstiles_default=[],this.turnstiles_conditions=[],this.timeout_turnstile=3e4,this.captchafoxes=[],this.captchafoxes_default=[],this.captchafoxes_invisible=[],this.captchafoxes_conditions=[],this.timeout_captchafox=3e4,this.form_events_reset=[],this.keydown=[],this.timeout_interval=100,this.api_call_queue=[],this.api_call_queue_running=!1,this.number_to_word=["nought","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen","twenty"],this.label_old="",this.submit=!1,this.action_js=[],this.form_draft=!1,this.submit_auto_populate=!1,this.form_id_prefix="wsf-",this.field_name_prefix=ws_form_settings.field_prefix,this.meta_key_options_cache=[],this.options_action_objects=[],this.options_action_cache=[],this.sidebar_conditions=[],this.sidebar_expanded_obj=!1,this.sidebar_lock_count=0,this.touch_device="ontouchend"in document,this.hash="",this.token="",this.token_validated=!1,this.form_post_locked=!1,this.form_post_lock_start=0,this.form_post_lock_duration_max=1e3,this.form_loader_showing=!1,this.form_loader_show_start=0,this.form_loader_show_duration_max=this.form_post_lock_duration_max,this.form_loader_timeout_id=!1,this.field_required_bypass=[],this.form_valid=!1,this.form_valid_old=null,this.form_validation_real_time_hooks=[],this.form_action_custom=!1,this.form_ajax=!0,this.object_focus=!1,this.field_type_click_drag_check=!1,this.section_id_click_drag_check=!1,this.password_strength_status=0,this.cascade_cache=[],this.select_ajax_cache=[],this.preview_window=void 0,this.file_frame=!1,this.file_frame_input_obj=!1,this.api_call_handle=[],this.visual_builder=!1,this.form_bypass_enabled=!1,this.action_js_process_validation_focus=!0,this.action_ga=!1,this.form_stat_add_lock=!1,this.form_geo_cache=!1,this.form_geo_cache_request=!1,this.form_geo_stack=[]},e.WS_Form.prototype.render=function(t){var a=this;void 0===t&&this.error("error_attributes"),void 0===t.obj&&this.error("error_attributes_obj"),void 0===t.form_id&&this.error("error_attributes_form_id"),this.form_canvas_obj=t.obj instanceof e?t.obj:e(t.obj),this.form_obj_id=this.form_canvas_obj.attr("id"),this.form_id=parseInt(t.form_id,10),0!==this.form_id&&(this.form_instance_id=parseInt(this.form_canvas_obj.attr("data-instance-id"),10),0!==this.form_instance_id&&(this.form_id_prefix=this.is_admin?"wsf-":"wsf-"+this.form_instance_id+"-",this.form_id_prefix_function=this.is_admin?"wsf_":"wsf_"+this.form_instance_id+"_",this.form_obj=this.form_canvas_obj.closest("form"),this.form_obj.length?this.form_obj.attr("novalidate",""):this.form_obj=this.form_canvas_obj,this.form_obj[0]!=this.form_canvas_obj[0]&&(this.form_obj.hasClass("wsf-form")||this.form_obj.addClass("wsf-form"),this.form_canvas_obj.hasClass("wsf-form")&&this.form_canvas_obj.removeClass("wsf-form"),void 0!==this.form_canvas_obj.attr("data-wsf-style-id")&&(this.form_obj.attr("data-wsf-style-id",this.form_canvas_obj.attr("data-wsf-style-id")),this.form_canvas_obj.removeAttr("data-wsf-style-id"))),this.form_canvas_obj.html(""),this.get_configuration(function(){a.get_form(function(){a.init()})})))},e.WS_Form.configured=!1,e.WS_Form.css_rendered=!1,e.WS_Form.styler,e.WS_Form.styler_rendered=!1,e.WS_Form.settings_plugin,e.WS_Form.settings_form=null,e.WS_Form.frameworks,e.WS_Form.parse_variables,e.WS_Form.parse_variable_help,e.WS_Form.parse_variable_repairable,e.WS_Form.actions,e.WS_Form.field_types,e.WS_Form.field_type_cache=[],e.WS_Form.file_types,e.WS_Form.meta_keys,e.WS_Form.meta_keys_required_setting=[],e.WS_Form.breakpoints,e.WS_Form.data_sources,e.WS_Form.templates_section,e.WS_Form.prototype.get_configuration=function(t,a,r){if(void 0===a&&(a=!1),void 0===r&&(r=!1),this.options_action_cache=[],r||this.loader_on(),!e.WS_Form.configured||a)if("undefined"==typeof wsf_form_json_config){var i=this;this.api_call("config","GET",!1,function(e){i.set_configuration(e.data),window.wsf_form_json_config=e.data,"function"==typeof t&&t()},!1,r)}else this.set_configuration(wsf_form_json_config),"function"==typeof t&&t();else"function"==typeof t&&t()},e.WS_Form.prototype.set_configuration=function(t){e.WS_Form.settings_plugin=t.settings_plugin,e.WS_Form.settings_form=t.settings_form,e.WS_Form.frameworks=t.frameworks,e.WS_Form.field_types=t.field_types,e.WS_Form.file_types=t.file_types,e.WS_Form.meta_keys=t.meta_keys,e.WS_Form.parse_variables=t.parse_variables,e.WS_Form.parse_variables_repairable=t.parse_variables_repairable,e.WS_Form.parse_variable_help=t.parse_variable_help,e.WS_Form.actions=t.actions,e.WS_Form.data_sources=t.data_sources,e.WS_Form.templates_section=t.templates_section,this.field_type_cache_build(),e.WS_Form.configured=!0},e.WS_Form.prototype.get_form=function(t){if(0==this.form_id)return this.error("error_form_id"),void this.loader_off();if(e("#"+this.form_obj_id).attr("data-id",this.form_id),void 0===window.wsf_form_json||void 0===window.wsf_form_json[this.form_id]){var a=this;this.api_call("form/"+this.form_id+"/full/?wsf_fp=true","GET",!1,function(e){a.form=e.form,void 0===window.wsf_form_json&&(window.wsf_form_json=[]),window.wsf_form_json[a.form_id]=e.form,a.data_cache_build(),"function"==typeof t&&t(),a.loader_off()})}else this.form=window.wsf_form_json[this.form_id],this.data_cache_build(),"function"==typeof t&&t(),this.loader_off()},e.WS_Form.prototype.form_build=function(){if(this.timer_start=new Date,this.form_canvas_obj.children().not(".wsf-loader").remove(),this.form_canvas_obj.append(this.get_form_html(this.form)),!this.is_admin){var e=this.get_object_meta_value(this.form,"class_form_wrapper","");if(""!=e){var t=this.form_canvas_obj.attr("class");t+=" "+e.trim(),this.form_canvas_obj.attr("class",t)}}this.form_render(),this.timer_duration=new Date-this.timer_start},e.WS_Form.prototype.get_form_style_id=function(){var t=this.is_admin?"ws-form":e.WS_Form.settings_plugin.framework;return e.WS_Form.frameworks.types[t]},e.WS_Form.prototype.get_framework=function(){var t=this.is_admin?"ws-form":e.WS_Form.settings_plugin.framework;return e.WS_Form.frameworks.types[t]},e.WS_Form.prototype.get_form_html=function(e){if(void 0===e)return"";if(void 0===e.groups)return"";var t=this.get_framework().form[this.is_admin?"admin":"public"],a=this.esc_html(e.label);if(!this.is_admin&&"on"==this.get_object_meta_value(e,"label_render","on"))var r=this.is_admin?"":this.get_object_meta_value(this.form,"label_mask_form",""),i=""!=r?r:void 0!==t.mask_label?t.mask_label:"",s={label:a},_=this.mask_parse(i,s);else _="";var o=this.get_tabs_html(e);o+=this.get_groups_html(e.groups);i=t.mask_single,s={form:o,id:this.form_id_prefix+"tabs",label:_};return this.comment_html("Form: "+a)+this.mask_parse(i,s)+this.comment_html("Form: "+a,!0)},e.WS_Form.prototype.get_tabs_html=function(e){if(void 0===e.groups)return"";var t=e.groups,a=Object.keys(t).length;if(1==a&&!this.is_admin)return"";var r="",i=this.get_framework().tabs[this.is_admin?"admin":"public"],s=this.get_object_meta_value(this.form,"cookie_tab_index")?this.cookie_get("tab_index",0):0;if(a>1||this.is_admin){for(var _ in t)if(t.hasOwnProperty(_)){var o=t[_];r+=this.get_tab_html(o,_,s==_)}var l="";if(!this.is_admin)this.get_object_meta_value(e,"tabs_hide",!1)&&(l+=' style="display: none;"');var n=["wsf-group-tabs"];if(!this.is_admin){var c=this.get_object_meta_value(e,"class_tabs_wrapper",!1);""!=c&&n.push(c.trim())}var d=i.mask_wrapper,f={attributes:l,class:n.join(" "),tabs:r,id:this.form_id_prefix+"tabs"};return this.comment_html(this.language("comment_group_tabs"))+this.mask_parse(d,f)+this.comment_html(this.language("comment_group_tabs"),!0)}return""},e.WS_Form.prototype.get_tab_html=function(e,t,a){void 0===t&&(t=0),void 0===a&&(a=!1);var r=this.get_framework().tabs[this.is_admin?"admin":"public"],i=this.esc_html(e.label),s="";!this.is_admin&&"on"==this.get_object_meta_value(e,"hidden","")&&(s=' style="display: none;" data-wsf-group-hidden');var _=r.mask_single,o={attributes:s,data_id:e.id,href:"#"+this.form_id_prefix+"group-"+e.id,label:i};return a&&void 0!==r.active?o.active=r.active:o.active="",this.mask_parse(_,o)},e.WS_Form.prototype.get_groups_html=function(t){if(void 0===t)return"";var a=Object.keys(t).length,r=this.get_framework().groups[this.is_admin?"admin":"public"],i=this.get_object_meta_value(this.form,"cookie_tab_index")?this.cookie_get("tab_index",0):0,s="",_=this.is_admin||a>1,o=0;for(var l in t)if(t.hasOwnProperty(l)){var n=t[l];s+=this.get_group_html(n,l==i,_,o++)}var c=_?r.mask_wrapper:"#groups",d={class:["wsf-groups"].join(" "),column_count:e.WS_Form.settings_plugin.framework_column_count,groups:s,id:this.form_id_prefix+"tabs"};return(_?this.comment_html(this.language("comment_groups")):"")+this.mask_parse(c,d)+(_?this.comment_html(this.language("comment_groups"),!0):"")},e.WS_Form.prototype.get_group_html=function(t,a,r,i){void 0===a&&(a=!1),void 0===r&&(r=!0);var s=this.get_framework().groups[this.is_admin?"admin":"public"],_=this.esc_html(t.id),o=this.esc_html(t.label);if(!this.is_admin&&"on"==this.get_object_meta_value(t,"label_render","on"))var l=this.is_admin?"":this.get_object_meta_value(this.form,"label_mask_group",""),n=""!=l?l:void 0!==s.mask_label?s.mask_label:"",c={label:o},d=this.mask_parse(n,c);else d="";var f,p=this.get_sections_html(t),u=[];(void 0!==s.class&&u.push(s.class),this.is_admin)||(""!=(f=this.get_object_meta_value(this.form,"class_group_wrapper",""))&&u.push(f.trim()),""!=(f=this.get_object_meta_value(t,"class_group_wrapper",""))&&u.push(f.trim()));a&&void 0!==s.class_active&&u.push(s.class_active);var h=[];this.is_admin||!this.is_admin&&"on"==this.get_object_meta_value(t,"hidden","")&&h.push("data-wsf-group-hidden");n=r?s.mask_single:"#group",c={attributes:(h.length>0?" ":"")+h.join(" "),class:u.join(" "),column_count:e.WS_Form.settings_plugin.framework_column_count,data_id:t.id,data_group_index:i,group:p,id:this.form_id_prefix+"group-"+_,label:d};return(r?this.comment_html(this.language("comment_group")+": "+o):"")+this.mask_parse(n,c)+(r?this.comment_html(this.language("comment_group")+": "+o,!0):"")},e.WS_Form.prototype.get_sections_html=function(t){var a="",r=this.get_framework().sections[this.is_admin?"admin":"public"],i=(t.id,t.sections),s={};if("object"==typeof this.submit?void 0!==this.submit.section_repeatable&&(s=this.submit.section_repeatable):!1!==this.submit_auto_populate&&void 0!==this.submit_auto_populate.section_repeatable&&(s=this.submit_auto_populate.section_repeatable),void 0===i)return"";for(var _ in i)if(i.hasOwnProperty(_)){var o=i[_],l="section_"+o.id,n=!1!==s&&void 0!==s[l]&&void 0!==s[l].index?s[l].index:[!1];for(var c in n)if(n.hasOwnProperty(c)){var d=n[c];a+=this.get_section_html(o,d)}}var f=r.mask_wrapper,p={class:"wsf-sections",column_count:e.WS_Form.settings_plugin.framework_column_count,data_id:t.id,sections:a,id:this.form_id_prefix+"sections-"+t.id};return this.comment_html(this.language("comment_sections"))+this.mask_parse(f,p)+this.comment_html(this.language("comment_sections"),!0)},e.WS_Form.prototype.get_section_html=function(t,a){void 0===a&&(a=!1);var r=!1;if(!this.is_admin&&((r="on"==this.get_object_meta_value(t,"section_repeatable",""))&&!1===a)){a=0;do{a++}while(e("#"+this.form_id_prefix+"section-"+t.id+"-repeat-"+a).length)}var i="",s=this.get_framework().sections[this.is_admin?"admin":"public"],_=this.column_class_array(t);if(r&&!this.is_admin&&(i=this.attribute_modify(i,"data-repeatable","",!0),i=this.attribute_modify(i,"data-repeatable-index",a,!0)),void 0!==s.class_single&&(_=_.concat(s.class_single)),!this.is_admin){var o;""!=(o=this.get_object_meta_value(this.form,"class_section_wrapper",""))&&_.push(o.trim()),""!=(o=this.get_object_meta_value(t,"class_section_wrapper",""))&&_.push(o.trim());var l=this.get_object_meta_value(t,"class_single_vertical_align","");if(l){var n=this.get_field_value_fallback(!1,!1,"class_single_vertical_align");void 0!==n[l]&&_.push(n[l])}var c=this.get_object_meta_value(t,"validate_inline","");if(""!=c){var d=void 0!==this.framework.fields.public.class_form_validated?this.framework.fields.public.class_form_validated:[];switch(c){case"on":this.is_iterable(d)?_.push(...d):_.push(d);break;case"change_blur":i=this.attribute_modify(i,"data-wsf-section-validated-class",d.join(" "),!0)}}var f=this.get_object_meta_value(this.form,"conversational",!1),p=this.get_object_meta_value(t,"conversational_full_height_section",!1);f&&p&&_.push("wsf-form-conversational-section-full-height")}var u=this.esc_html(t.label);if(this.is_admin||"on"==this.get_object_meta_value(t,"label_render","on"))var h=this.is_admin?"":this.get_object_meta_value(this.form,"label_mask_section",""),m=""!=h?h:void 0!==s.mask_label?s.mask_label:"",v={label:u},b=this.mask_parse(m,v);else b="";if(!this.is_admin){"on"==this.get_object_meta_value(t,"disabled_section","")&&(i=this.attribute_modify(i,"disabled","",!0),i=this.attribute_modify(i,"aria-disabled","true",!0)),"on"==this.get_object_meta_value(t,"hidden_section","")&&(i=this.attribute_modify(i,"style","display: none;",!0),i=this.attribute_modify(i,"aria-live","polite",!0),i=this.attribute_modify(i,"aria-hidden","true",!0));var g=this.get_object_meta_value(t,"aria_label","");""==g&&(g=t.label),i=this.attribute_modify(i,"aria-label",g,!0),i=this.custom_attributes(i,t,"section",a)}var y=this.get_fields_html(t,a);m=s.mask_single,v={attributes:(i?" ":"")+i,class:_.join(" "),column_count:e.WS_Form.settings_plugin.framework_column_count,data_id:t.id,id:this.form_id_prefix+"section-"+t.id+(a?"-repeat-"+a:""),label:b,section:y,section_id:e.WS_Form.settings_plugin.helper_section_id?'<span class="wsf-section-id">'+this.language("id")+": "+t.id+"</span>":""};return this.comment_html(this.language("comment_section")+": "+u)+this.mask_parse(m,v)+this.comment_html(this.language("comment_section")+": "+u,!0)},e.WS_Form.prototype.custom_attributes=function(e,t,a,r,i){var s=this.custom_attributes_get(t,a,r);for(const t in s){var _=s[t];e=this.attribute_modify(e,t,_,!0)}return e},e.WS_Form.prototype.custom_attributes_get=function(e,t,a){var r={},i=this.get_object_meta_value(e,"custom_attributes",!1);if(!1!==i&&"object"==typeof i&&i.length>0)for(var s in"field"!=t&&(e=!1),i)if(i.hasOwnProperty(s)){var _=i[s];""!=_.custom_attribute_name&&(_.custom_attribute_value=this.parse_variables_process(_.custom_attribute_value,a,!1,e).output,r[_.custom_attribute_name]=_.custom_attribute_value)}return r},e.WS_Form.prototype.get_fields_html=function(t,a){var r="on"==this.get_object_meta_value(t,"section_repeatable","");void 0===a&&(a=!!r&&0);var i="",s=this.get_framework().fields[this.is_admin?"admin":"public"],_=(t.id,t.fields),o=this.esc_html(t.label);if(!this.is_admin&&"on"==this.get_object_meta_value(t,"label_render","on"))var l=this.is_admin?"":this.get_object_meta_value(this.form,"label_mask_section",""),n=""!=l?l:void 0!==s.mask_wrapper_label?s.mask_wrapper_label:"",c={label:o},d=this.mask_parse(n,c);else d="";if(void 0===_)return"";for(var f in _)if(_.hasOwnProperty(f)){var p=_[f];i+=this.get_field_html(p,a)}n=s.mask_wrapper,c={column_count:e.WS_Form.settings_plugin.framework_column_count,data_id:t.id,fields:i,id:this.form_id_prefix+"fields-"+t.id,label:d};return this.comment_html(this.language("comment_fields"))+this.mask_parse(n,c)+this.comment_html(this.language("comment_fields"),!0)},e.WS_Form.prototype.value_populate_process=function(t,a){if(null===t)return"";switch(a.type){case"datetime":return"function"==typeof this.get_date_by_type?this.get_date_by_type(t,a):"";case"select":case"checkbox":case"radio":case"price_select":case"price_checkbox":case"price_radio":return Array.isArray(t)?t.map(function(e){return e?e.toString():""}):t;case"quantity":var r=e.WS_Form.settings_plugin.price_decimal_separator;return"."!==r&&-1!==t.indexOf(r)&&(t=this.get_number(t)),t;default:return this.esc_html(t)}},e.WS_Form.prototype.get_field_html=function(t,a){void 0===a&&(a=!1);var r=[];!1!==a&&r.push('data-repeatable-index="'+this.esc_attr(a)+'"');var i=this.get_framework().fields[this.is_admin?"admin":"public"];this.is_admin||"on"==this.get_object_meta_value(t,"hidden","")&&r.push('style="display: none;" aria-live="polite" aria-hidden="true"');var s=this.column_class_array(t),_=this.get_object_meta_value(t,"sub_type",!1);""==_&&(_=!1);var o=this.get_field_value_fallback(t.type,!1,"class_single",!1,i,_);if(!1!==o&&(s=s.concat(o)),!this.is_admin){var l;""!=(l=this.get_object_meta_value(this.form,"class_field_wrapper",""))&&s.push(l.trim()),""!=(l=this.get_object_meta_value(t,"class_field_wrapper",""))&&s.push(l.trim());var n=this.get_object_meta_value(t,"class_single_vertical_align","");if(n){var c=this.get_field_value_fallback(t.type,!1,"class_single_vertical_align",!1,i,_);void 0!==c[n]&&s.push(c[n])}var d=this.get_object_meta_value(t,"validate_inline","");if(""!=d){var f=void 0!==this.framework.fields.public.class_form_validated?this.framework.fields.public.class_form_validated:[];switch(d){case"on":this.is_iterable(f)?s.push(...f):s.push(f);break;case"change_blur":r.push('data-wsf-field-validated-class="'+f.join(" ")+'"')}}}var p=!1!==a?"_"+a:"",u=ws_form_settings.field_prefix+t.id+p;if("object"==typeof this.submit){if(void 0!==this.submit.meta&&void 0!==this.submit.meta[u]&&void 0!==this.submit.meta[u].value&&null!==this.submit.meta[u].value){var h=this.submit.meta[u].value;h=this.value_populate_process(h,t)}}else if(!1!==this.submit_auto_populate&&void 0!==this.submit_auto_populate.data&&void 0!==this.submit_auto_populate.data[u]&&null!==this.submit_auto_populate.data[u]){h=this.submit_auto_populate.data[u];h=this.value_populate_process(h,t)}var m=this.is_admin?"":this.get_field_html_single(t,h,!1,a),v=this.esc_html(t.label);if(void 0===e.WS_Form.field_type_cache[t.type])return"";var b=e.WS_Form.field_type_cache[t.type];if(void 0!==b.pro_required&&b.pro_required)return"";if(!this.is_admin&&(void 0!==b.mask_wrappers_drop&&b.mask_wrappers_drop))var g="#field";else g=this.get_field_value_fallback(t.type,!1,"mask_single",!1,i,_);switch(t.type){case"checkbox":case"price_checkbox":var y=this.get_object_meta_value(t,"checkbox_min",!1),k=this.get_object_meta_value(t,"checkbox_max",!1),w=this.get_object_meta_value(t,"select_all",!1);if(!1===y&&!1===k)break;!1!==y&&(y=parseInt(y,10))>0&&r.push('data-checkbox-min="'+this.esc_attr(y)+'"'),!1===k||w||(k=parseInt(k,10))>=0&&r.push('data-checkbox-max="'+this.esc_attr(k)+'"');break;case"select":case"price_select":var x=this.get_object_meta_value(t,"select_min",!1),j=this.get_object_meta_value(t,"select_max",!1);if(!1===x&&!1===j)break;!1!==x&&(x=parseInt(x,10))>0&&r.push('data-select-min="'+this.esc_attr(x)+'"'),!1!==j&&(j=parseInt(j,10))>=0&&r.push('data-select-max="'+this.esc_attr(j)+'"')}var S={attributes:(r.length>0?" ":"")+r.join(" "),class:s.join(" "),data_id:t.id,field:m,id:this.get_part_id(t.id,a,"field-wrapper"),type:t.type};return this.comment_html(this.language("comment_field")+": "+v)+this.mask_parse(g,S)+this.comment_html(this.language("comment_field")+": "+v,!0)},e.WS_Form.prototype.field_type_cache_build=function(){if(!this.is_admin)return e.WS_Form.field_type_cache=e.WS_Form.field_types,!0;if(Object.keys(e.WS_Form.field_type_cache.length)>0)return!0;for(var t in e.WS_Form.field_types){var a=e.WS_Form.field_types[t].types;for(var r in a)e.WS_Form.field_type_cache[r]=a[r]}},e.WS_Form.prototype.esc_html=function(e,t){if("string"!=typeof e)return e;switch(void 0===t&&(t=!1),typeof e){case"string":e=this.esc_html_do(e,t);break;case"object":for(var a in e)e.hasOwnProperty(a)&&"string"==typeof e[a]&&(e[a]=this.esc_html_do(e[a],t))}return e},e.WS_Form.prototype.esc_html_do=function(e,t){void 0===t&&(t=!1);var a=this.replace_all(e,"&","&#38;");return a=this.replace_all(a,"<","&lt;"),a=this.replace_all(a,">","&gt;"),a=this.replace_all(a,'"',"&quot;"),t&&(a=this.replace_all(a,"\n","&#13;")),a},e.WS_Form.prototype.esc_html_undo=function(e){return(new DOMParser).parseFromString(e,"text/html").documentElement.textContent},e.WS_Form.prototype.esc_attr=function(e,t){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)return"";var a=e.replace(/[&<>"']/g,function(e){switch(e){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case'"':return"&quot;";case"'":return"&apos;"}});return t&&(a=a.replace(/\n/g,"&#13;")),a},e.WS_Form.prototype.esc_url=function(e){try{if(e=decodeURIComponent(e),/^#[a-zA-Z0-9\-]+$/.test(e))return e;var t="",a=e.indexOf("#");-1!==a&&(t=e.substring(a),e=e.substring(0,a)),/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(e)||(e="https://"+e);var r=new URL(e);if(!["http","https","ftp","mailto","tel"].includes(r.protocol.replace(":","")))return"";for(var i of[/javascript:/i,/data:/i,/vbscript:/i,/file:/i,/<.*?>/i,/%00/i,/(\.\.\/|\.\\)/i,/(redirect|url|next)=http/i,/(%25)+/i])if(i.test(e))return"";return r.toString()+t}catch(e){return""}},e.WS_Form.prototype.esc_selector=function(e){if("string"!=typeof e)return e;var t=this.replace_all(e,'"','\\"');return t=this.replace_all(t,"'","\\'"),t=this.replace_all(t,"[","\\["),t=this.replace_all(t,"]","\\]"),t=this.replace_all(t,",","\\,"),t=this.replace_all(t,"=","\\=")},e.WS_Form.prototype.html_strip=function(e){switch(typeof e){case"string":e=this.html_strip_do(e);break;case"object":for(var t in e)e.hasOwnProperty(t)&&"string"==typeof e[t]&&(e[t]=this.html_strip_do(e[t]))}return e},e.WS_Form.prototype.html_strip_do=function(e){return this.esc_html(e.replace(/<[^>]*>/g,""))},e.WS_Form.prototype.js_string_encode=function(e){return"string"!=typeof e?e:this.replace_all(e,"'","\\'")},e.WS_Form.prototype.loader_on=function(){e("#wsf-loader").addClass("wsf-loader-on")},e.WS_Form.prototype.loader_off=function(){e("#wsf-loader").removeClass("wsf-loader-on")},e.WS_Form.prototype.comment_html=function(e,t){return void 0===t&&(t=!1),"\x3c!-- "+(t?"/":"")+e+" --\x3e\n"+(t?"\n":"")},e.WS_Form.prototype.comment_css=function(e){return"\t/* "+e+" */\n"},e.WS_Form.prototype.get_object_value=function(e,t,a){return void 0===a&&(a=!1),void 0===e?a:void 0===e[t]?a:e[t]},e.WS_Form.prototype.get_field_value_fallback=function(e,t,a,r,i,s){if(void 0===r&&(r=!1),i||(i=this.framework_fields),void 0===s&&(s=!1),!1===s)return this.get_field_value_fallback_process(e,t,a,r,i);if((_=this.get_field_value_fallback_process(e,t,a+"_"+s,r,i))===r)var _=this.get_field_value_fallback_process(e,t,a,r,i);return _},e.WS_Form.prototype.get_field_value_fallback_process=function(t,a,r,i,s){var _=s,o=e.WS_Form.field_type_cache[t];if(!1!==a){if(!(void 0===_||void 0===_[a]||void 0===_[a].field_types||void 0===_[a].field_types[t]||void 0===_[a].field_types[t][r]))return _[a].field_types[t][r];if(!(void 0===_||void 0===_[a]||void 0===_[a][r]))return _[a][r]}return void 0===_||void 0===_.field_types||void 0===_.field_types[t]||void 0===_.field_types[t][r]?void 0===_||void 0===_[r]?void 0===o?i:void 0===o[r]?i:o[r]:_[r]:_.field_types[t][r]},e.WS_Form.prototype.get_object_data=function(e,t,a){switch(void 0===a&&(a=!1),e){case"form":return a?this.object_data_scratch:this.form;case"group":return a?this.object_data_scratch:this.group_data_cache[t];case"section":return a?this.object_data_scratch:this.section_data_cache[t];case"field":return a?this.object_data_scratch:this.field_data_cache[t];case"action":return this.action}return!1},e.WS_Form.prototype.get_object_meta=function(t,a){switch(t){case"form":var r=e.WS_Form.settings_form.sidebars.form.meta;break;case"group":r=e.WS_Form.settings_form.sidebars.group.meta;break;case"section":r=e.WS_Form.settings_form.sidebars.section.meta;break;case"field":var i=this.field_data_cache[a];r=e.WS_Form.field_type_cache[i.type]}return r},e.WS_Form.prototype.get_object_meta_value=function(e,t,a,r,i){if(void 0===a&&(a=!1),void 0===r&&(r=!1),void 0===i&&(i=!1),void 0===e)return a;if(void 0===e.meta)return a;if(void 0===e.meta[t]){if(!r)return a;this.set_object_meta_value(e,t,a)}return i&&"string"==typeof e.meta[t]?this.parse_variables_process(e.meta[t]).output:e.meta[t]},e.WS_Form.prototype.has_object_meta_key=function(e,t){return void 0!==e&&void 0!==e.meta&&void 0!==e.meta[t]&&""!=e.meta[t]},e.WS_Form.prototype.parse_variables_process=function(t,a,r,i,s,_,o,l,n,c){var d=this;if("string"!=typeof t)return this.parse_variables_process_error(t);if(-1==t.indexOf("#"))return this.parse_variables_process_error(t);void 0===a&&(a=!1),void 0===r&&(r=!1);var f="calc"===r;void 0===i&&(i=!1),void 0===s&&(s=!1),void 0===_&&(_=!0),void 0===o&&(o=!1),void 0===l&&(l=1),void 0===n&&(n=t),void 0===c&&(c=i);var p={},u={},h=[];if(l>100)return this.error("error_parse_variable_syntax_error_depth","","error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_depth"));for(var m in e.WS_Form.parse_variables)if(e.WS_Form.parse_variables.hasOwnProperty(m)){var v=e.WS_Form.parse_variables[m],b=!1;for(var g in v.var_lookups)if(v.var_lookups.hasOwnProperty(g)&&-1!==t.indexOf(v.var_lookups[g])){b=!0;break}if(b)for(var y in v.variables)if(v.variables.hasOwnProperty(y)&&-1!==t.indexOf("#"+y)){var k=v.variables[y],w=void 0!==k.value&&k.value,x="object"==typeof k.attributes&&k.attributes,j=void 0!==k.single_parse&&k.single_parse;if(!1!==x||!1===w){if(("object"==typeof k.attributes?k.attributes.length:0)>0){var S=0;do{var F=t.indexOf("#"+y,S);if(-1!==F){var W=-1,O=-1,M=t.substring(F+y.length+1);if("("===M.substring(0,1)&&(W=F+y.length+1,-1!==(O=this.get_bracket_finish_index(M))&&(O+=W)),-1===W||-1===O){S+=y.length+1,D="#"+y;var I=[]}else{S=O;var N=t.substring(W+1,O),D=t.substring(F,O+1),P=void 0!==k.attribute_separator?k.attribute_separator:",";I=this.string_to_attributes(N,P)}for(var q in x)if(x.hasOwnProperty(q)){var C=x[q],z=C.id,T=void 0!==I[q];if((void 0===C.required||C.required)&&!T)return this.error("error_parse_variable_syntax_error_attribute","#"+y+" (Expected "+z+")","error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_attribute","#"+y+" (Expected "+z+")"));var $=void 0!==C.default&&C.default;if(!1===$||T||(I[q]=$),void 0===C.trim||C.trim){var A=I[q];"string"==typeof A&&(I[q]=A.trim())}var Y=void 0!==C.valid&&C.valid;if(!1!==Y&&!Y.includes(I[q]))return this.error("error_parse_variable_syntax_error_attribute_invalid","#"+y+" (Expected "+Y.join(", ")+")","error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_attribute_invalid","#"+y+" (Expected "+Y.join(", ")+")"))}var E="",L=!0;switch(y){case"tab_label":if(isNaN(I[0]))return this.error("error_parse_variable_syntax_error_group_id",I[0],"error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_group_id",I[0]));var U=parseInt(I[0],10);if(void 0===this.group_data_cache[U]||void 0===this.group_data_cache[U].label)return this.error("error_parse_variable_syntax_error_group_id",U,"error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_group_id",U));E=this.group_data_cache[U].label;break;case"section_label":if(isNaN(I[0]))return this.error("error_parse_variable_syntax_error_section_id",I[0],"error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_section_id",I[0]));var R=parseInt(I[0],10);if(void 0===this.section_data_cache[R]||void 0===this.section_data_cache[R].label)return this.error("error_parse_variable_syntax_error_section_id",R,"error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_section_id",R));E=this.section_data_cache[R].label;break;case"cookie_get":E=this.cookie_get_raw(I[0]);break;case"session_storage_get":E=this.session_storage_get_raw(I[0]);break;case"local_storage_get":E=this.local_storage_get_raw(I[0]);break;case"field_label":if(isNaN(I[0]))return this.error("error_parse_variable_syntax_error_field_id",I[0],"error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_field_id",I[0]));var J=parseInt(I[0],10);if(void 0===this.field_data_cache[J]||void 0===this.field_data_cache[J].label)return this.error("error_parse_variable_syntax_error_field_id",J,"error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_field_id",J));E=this.field_data_cache[J].label;break;case"field_min_id":case"field_max_id":case"field_min_value":case"field_max_value":case"field_min_label":case"field_max_label":for(var H=0,Z=0,G="",B=0,Q=0,K="",V=0,X=0;!isNaN(I[V]);){if(J=parseInt(I[V],10)){if(h.push(J),"object"==typeof this.field_data_cache[J]){var ee=this.field_data_cache[J],te=this.get_field_value(ee,ee.section_repeatable);"object"==typeof te&&void 0!==te[0]||(te=[0]);var ae=ee.label;for(var re of te)re=this.get_number(re,0,!0),0==X?(B=H=J,Q=Z=re,K=G=ae):(re<Z&&(H=J,Z=re,G=ae),re>Q&&(B=J,Q=re,K=ae)),X++;V++}}else V++}switch(y){case"field_min_id":E=H;break;case"field_max_id":E=B;break;case"field_min_value":E=Z;break;case"field_max_value":E=Q;break;case"field_min_label":E=G;break;case"field_max_label":E=K}break;case"date_format":var ie=this.parse_variables_process(I[0],a,r,oe,s,_,o,l).output,se=this.parse_variables_process(I[1],a,r,oe,s,_,o,l).output,_e=new Date(ie);if(isNaN(_e.getTime()))return this.error("error_parse_variable_syntax_error_date_format",ie,"error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_date_format",ie));E=this.date_format(_e,se);break;case"field":case"field_float":case"field_date_age":case"field_date_format":case"field_date_offset":case"field_count_word":case"field_count_char":case"ecommerce_field_price":if(isNaN(I[0]))return this.error("error_parse_variable_syntax_error_field_id",I[0],"error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_field_id",I[0]));J=parseInt(I[0],10);if(("field_value"===s||!1===s)&&J===parseInt(c.id,10))return this.error("error_parse_variable_syntax_error_self_ref",D,"error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_self_ref",D));if(void 0===this.field_data_cache[J])return this.error("error_parse_variable_syntax_error_field_id",J,"error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_field_id",J));i.id===c.id&&h.push(J);var oe=this.field_data_cache[J];if(void 0===e.WS_Form.field_type_cache[oe.type])break;var le=e.WS_Form.field_type_cache[oe.type];if(!1!==r)if(!(le[r+"_out"],le[r+"_out"]))return this.error("error_parse_variable_syntax_error_"+r+"_out",oe.label+" (ID: "+oe.id+")","error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_"+r+"_out",oe.label+" (ID: "+oe.id+")"));var ne=(le.static,le.static);if(ne){if(!0===ne)var ce=void 0!==le.mask_field_static?le.mask_field_static:"";else{ce=this.get_object_meta_value(oe,ne,"");this.wpautop_parse_variable(oe,le)&&(ce=this.wpautop(ce),L=!1)}"object"==typeof(Ke=this.parse_variables_process(ce,a,r,oe,s,_,o,l+1,n,c)).fields&&(h=h.concat(Ke.fields)),E=[Ke.output];break}var de=void 0!==le.submit_array&&le.submit_array,fe=void 0!==oe.section_repeatable_section_id&&parseInt(oe.section_repeatable_section_id,10),pe=void 0!==i.section_repeatable_section_id&&parseInt(i.section_repeatable_section_id,10),ue=a,he=(E=!1,void 0!==I[1]?I[1]:","),me=void 0!==I[2]&&I[2];if(!1!==ue&&fe===o||!1!==fe&&!1!==pe)E=this.get_field_value(oe,ue,de,me);if(!1===E&&!1!==fe&&!1===pe)E=this.get_field_value(oe,!0,de,me);if(!1===E&&!1===fe)E=this.get_field_value(oe,!1,de,me);if(!1===E)switch(oe.type){case"price_select":case"price_checkbox":case"price_radio":case"select":case"checkbox":case"radio":var ve=this.get_data_source(oe);E=!1!==ve.default_value?ve.default_value:[];break;default:var be=this.get_object_meta_value(oe,"default_value","");"object"==typeof(Ke=this.parse_variables_process(be,a,r,oe,s,_,o,l+1,n,c)).fields&&(h=h.concat(Ke.fields)),E=[Ke.output]}switch(y){case"field":!1!==me&&(E=this.get_data_grid_column(E,oe,me));break;case"field_count_char":case"field_count_word":var ge="object"==typeof E?E.join(he):"";if(void 0!==I[1]){var ye=/\/(.*)\/(.*)/.exec(I[1]);ge=ge.replace(new RegExp(ye[1],ye[2]),"")}E=["field_count_char"==y?ge.length:this.get_word_count(ge)]}if(f)if(E.length)switch(oe.type){case"price_select":case"price_checkbox":case"price_radio":case"price":case"price_subtotal":case"cart_price":case"cart_total":var ke=0;for(var we in E)E.hasOwnProperty(we)&&(ke+=this.get_number(E[we],0,!0));var xe=parseInt(e.WS_Form.settings_plugin.price_decimals,10);E=this.get_number(ke,0,!1,xe);break;case"datetime":if(""===E[0]){E="";break}var je=this.get_object_meta_value(oe,"input_type_datetime","date");(Ie=this.get_object_meta_value(oe,"format_date",ws_form_settings.date_format))||(Ie=ws_form_settings.date_format);var Se=this.get_object_meta_value(oe,"format_time",ws_form_settings.time_format);Se||(Se=ws_form_settings.time_format);var Fe=this.get_date(E[0],je,Ie,Se);E=this.get_number(Fe.getTime())/1e3;break;default:ke=0;for(var we in E)E.hasOwnProperty(we)&&(ke+=d.get_number(E[we],0,!1));E=ke}else E=0;else E=(E=e.map(E,function(e){return d.esc_html(e)})).join(he),L=!1;switch(y){case"ecommerce_field_price":E=this.get_price(this.get_number(E));break;case"field_date_age":var We=new Date("number"==typeof E?1e3*E:E),Oe=new Date;isNaN(We.getTime())&&this.error("error_parse_variable_field_date_age_invalid",E,"error-parse-variables");var Me="string"==typeof I[1]?I[1]:"y";switch(Me=Me.toLowerCase(),["y","m","d","h","n","s","year","month","day","hour","minute","second","years","months","days","hours","minutes","seconds"].includes(Me)||this.error("error_parse_variable_syntax_error_field_date_age_period",Me,"error-parse-variables"),Me){case"s":case"second":case"seconds":E=Math.floor((Oe-We)/1e3);break;case"n":case"minute":case"minutes":E=Math.floor((Oe-We)/6e4);break;case"h":case"hour":case"hours":E=Math.floor((Oe-We)/36e5);break;case"d":case"day":case"days":E=Math.floor((Oe-We)/864e5);break;case"w":case"week":case"weeks":E=Math.floor((Oe-We)/6048e5);break;case"m":case"month":case"months":E=12*(Oe.getFullYear()-We.getFullYear())+(Oe.getMonth()-We.getMonth())-(Oe.getDate()<We.getDate()?1:0);break;default:E=Oe.getFullYear()-We.getFullYear()-(Oe.getMonth()<We.getMonth()||Oe.getMonth()===We.getMonth()&&Oe.getDate()<We.getDate()?1:0)}break;case"field_date_format":if("datetime"!==oe.type)return this.error("error_parse_variable_syntax_error_field_date_offset",J,"error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_field_date_offset",J));ie=this.parse_variables_process(E,a,r,oe,s,_,o,l).output;if((Ne=this.get_object_meta_value(oe,"format_date",ws_form_settings.date_format))||(Ne=ws_form_settings.date_format),(De=this.get_object_meta_value(oe,"format_time",ws_form_settings.time_format))||(De=ws_form_settings.time_format),this.is_integer(ie))_e=new Date(1e3*parseInt(ie,10));else{je=this.get_object_meta_value(oe,"input_type_datetime","date");_e=this.get_date(ie,je,Ne,De)}if(!1!==_e&&!isNaN(_e.getTime())){if(void 0!==I[1]&&""!=I[1])var Ie=I[1];else Ie=Ne;Ie||(Ie=ws_form_settings.date_format),E="function"==typeof this.date_format?this.date_format(_e,Ie):""}break;case"field_date_offset":if("datetime"!==oe.type)return this.error("error_parse_variable_syntax_error_field_date_offset",J,"error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_field_date_offset",J));var Ne,De;ie=this.parse_variables_process(E,a,r,oe,s,_,o,l).output;if((Ne=this.get_object_meta_value(oe,"format_date",ws_form_settings.date_format))||(Ne=ws_form_settings.date_format),(De=this.get_object_meta_value(oe,"format_time",ws_form_settings.time_format))||(De=ws_form_settings.time_format),this.is_integer(ie))_e=new Date(1e3*parseInt(ie,10));else{je=this.get_object_meta_value(oe,"input_type_datetime","date");_e=this.get_date(ie,je,Ne,De)}if(!1!==_e&&!isNaN(_e.getTime())){if((Le=parseInt(this.parse_variables_process(I[1],a,r,i,s,_,o,l).output,10))&&_e.setSeconds(_e.getSeconds()+Le),void 0!==I[2]&&""!=I[2])Ie=I[2];else Ie=Ne;Ie||(Ie=ws_form_settings.date_format),E="function"==typeof this.date_format?this.date_format(_e,Ie):""}break;case"field_float":E=this.get_number(E)}"field"===y&&this.wpautop_parse_variable(oe,le)&&(E=this.wpautop(E),L=!1);break;case"ecommerce_price":"object"==typeof(Ke=this.parse_variables_process(I[0],a,r,i,s,_,o,l)).fields&&(h=h.concat(Ke.fields));var Pe=this.calc_string(Ke.output,n,!1,c,s);E=this.get_price(Pe);break;case"number_format":"object"==typeof(Ke=this.parse_variables_process(I[0],a,r,i,s,_,o,l)).fields&&(h=h.concat(Ke.fields));var qe=this.calc_string(Ke.output,n,!1,c,s),Ce=I[1],ze=I[2],Te=I[3];E=this.number_format(qe,Ce,ze,Te);break;case"select_option_text":if(isNaN(I[0]))return this.error("error_parse_variable_syntax_error_field_id",I[0],"error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_field_id",I[0]));J=parseInt(I[0],10);void 0===(he=I[1])&&(he=", "),i.id===c.id&&h.push(J);var $e=ws_form_settings.field_prefix+J.toString()+(a?"["+a+"]":"");if((Ee=e('[name="'+this.esc_selector($e)+'[]"] option:selected',this.form_canvas_obj)).length)E=e.map(Ee,function(t,a){return e(t).text()}).join(he);break;case"query_var":E=this.get_query_var(I[0],I[1]);break;case"checkbox_label":case"radio_label":if(isNaN(I[0]))return this.error("error_parse_variable_syntax_error_field_id",I[0],"error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_field_id",I[0]));J=parseInt(I[0],10);void 0===(he=I[1])&&(he=", "),i.id===c.id&&h.push(J);$e=ws_form_settings.field_prefix+J.toString()+(a?"["+a+"]":"");if((Ee=e('[name="'+this.esc_selector($e)+'[]"]:checked',this.form_canvas_obj)).length)E=e.map(Ee,function(t,a){return e('label[for="'+e(t).attr("id")+'"]').text()}).join(he);break;case"checkbox_count":case"checkbox_count_total":case"select_count":case"select_count_total":if(isNaN(I[0]))return this.error("error_parse_variable_syntax_error_field_id",I[0],"error-parse-variables"),this.parse_variables_process_error(this.language("error_parse_variable_syntax_error_field_id",I[0]));J=parseInt(I[0],10);i.id===c.id&&h.push(J);$e=ws_form_settings.field_prefix+J.toString()+(a?"["+a+"]":"");switch(y){case"checkbox_count":case"checkbox_count_total":var Ae=I[1]&&this.is_true(I[1]),Ye=" [data-row-checkbox]"+(Ae?"":':not([style*="display: none"])')+" input"+(Ae?"":":not([data-hidden])")+("checkbox_count"==y?":checked":""),Ee=e('[data-type="checkbox"][data-id="'+J+'"]'+Ye+', [data-type="price_checkbox"][data-id="'+J+'"]'+Ye,this.form_canvas_obj);break;case"select_count":case"select_count_total":Ee=e('select[name="'+this.esc_selector($e)+'[]"] option:not([data-placeholder])'+("select_count"==y?":selected":""),this.form_canvas_obj)}E=Ee?Ee.length:0;break;case"post_date_custom":case"post_date_modified_custom":case"server_date_custom":case"blog_date_custom":_e=this.get_new_date(w);if(void 0!==I[1])(Le=parseInt(this.parse_variables_process(I[1],a,r,i,s,_,o,l).output,10))&&_e.setSeconds(_e.getSeconds()+Le);E="function"==typeof this.date_format?this.date_format(_e,I[0]):"";break;case"client_date_custom":var Le;_e=new Date;if(void 0!==I[1])(Le=parseInt(this.parse_variables_process(I[1],a,r,i,s,_,o,l).output,10))&&_e.setSeconds(_e.getSeconds()+Le);E="function"==typeof this.date_format?this.date_format(_e,I[0]):"";break;case"random_number":var Ue=parseInt(this.get_number(I[0]),10),Re=parseInt(this.get_number(I[1]),10);E=Math.floor(Math.random()*(Re-Ue+1))+Ue;break;case"random_string":var Je=parseInt(this.get_number(I[0]),10),He=I[1],Ze=He.length;E="";for(var Ge=0;Ge<Je;Ge++)E+=He[Math.floor(Math.random()*Ze)];break;case"abs":case"acos":case"asin":case"atan":case"ceil":case"cos":case"exp":case"floor":case"log":case"negative":case"positive":case"sin":case"sqrt":case"tan":"object"==typeof(Ke=this.parse_variables_process(I[0],a,r,i,s,_,o,l)).fields&&(h=h.concat(Ke.fields));Pe=this.calc_string(Ke.output,n,!1,c,s);switch(y){case"abs":E=Math.abs(Pe);break;case"acos":E=Math.acos(Pe);break;case"asin":E=Math.asin(Pe);break;case"atan":E=Math.atan(Pe);break;case"ceil":E=Math.ceil(Pe);break;case"cos":E=Math.cos(Pe);break;case"exp":E=Math.exp(Pe);break;case"floor":E=Math.floor(Pe);break;case"log":E=Math.log(Pe);break;case"negative":case"positive":E="positive"==y?Math.max(0,Pe):Math.min(0,Pe);break;case"sin":E=Math.sin(Pe);break;case"sqrt":E=Math.sqrt(Pe);break;case"tan":E=Math.tan(Pe)}break;case"lower":case"upper":case"ucwords":case"ucfirst":case"capitalize":case"sentence":case"wpautop":case"trim":case"slug":case"name_prefix":case"name_first":case"name_middle":case"name_last":case"name_suffix":if("string"==typeof I[0])switch("object"==typeof(Ke=this.parse_variables_process(I[0],a,r,i,s,_,o,l)).fields&&(h=h.concat(Ke.fields)),E=Ke.output,y){case"lower":E=E.toLowerCase();break;case"upper":E=E.toUpperCase();break;case"ucwords":E=this.ucwords(E);break;case"ucfirst":E=this.ucfirst(E);break;case"capitalize":E=this.capitalize(E);break;case"sentence":E=this.sentence(E);break;case"wpautop":E=this.wpautop(E),L=!1;break;case"trim":E=E.trim(),L=!1;break;case"slug":E=this.get_slug(E);break;case"name_prefix":case"name_first":case"name_middle":case"name_last":case"name_suffix":E=this.get_full_name_components(E)[y]}break;case"pow":"object"==typeof(Ke=this.parse_variables_process(I[0],a,r,i,s,_,o,l)).fields&&(h=h.concat(Ke.fields));var Be=this.calc_string(Ke.output,n,Ce,c,s);"object"==typeof(Ke=this.parse_variables_process(I[1],a,r,i,s,_,o,l)).fields&&(h=h.concat(Ke.fields));var Qe=this.calc_string(Ke.output,n,Ce,c,s);E=Math.pow(Be,Qe);break;case"round":var Ke=this.parse_variables_process(I[1],a,r,i,s,_,o,l);Ce=this.get_number(Ke.output);"object"==typeof(Ke=this.parse_variables_process(I[0],a,r,i,s,_,o,l)).fields&&(h=h.concat(Ke.fields)),E=this.calc_string(Ke.output,n,Ce,c,s);break;case"min":case"max":var Ve=[];if(1===I.length)"object"==typeof(Ke=this.parse_variables_process(I[0],a,r,i,s,_,o,l)).fields&&(h=h.concat(Ke.fields)),I=this.string_to_attributes(Ke.output);for(var V in I)if(I.hasOwnProperty(V)){"object"==typeof(Ke=this.parse_variables_process(I[V],a,r,i,s,_,o,l)).fields&&(h=h.concat(Ke.fields));Pe=this.calc_string(Ke.output,n,!1,c,s);Ve.push(Pe)}E=Ve.length>0?"min"==y?Math.min(...Ve):Math.max(...Ve):0;break;case"avg":ke=0;if(1===I.length)"object"==typeof(Ke=this.parse_variables_process(I[0],a,r,i,s,_,o,l)).fields&&(h=h.concat(Ke.fields)),I=this.string_to_attributes(Ke.output);for(var V in I){if(I.hasOwnProperty(V))"object"==typeof(Ke=this.parse_variables_process(I[V],a,r,i,s,_,o,l)).fields&&(h=h.concat(Ke.fields)),ke+=Pe=this.calc_string(Ke.output,n,!1,c,s)}E=ke/I.length}!1!==E&&(L&&(E=this.esc_html(E)),j?u[D.substring(1)]=E:p[D.substring(1)]=E)}}while(-1!==F);t=this.mask_parse(t,p)}}else p[y]=w}}if(-1!=t.indexOf("form")&&(p.form_id=this.form_id,p.form_instance_id=this.form_instance_id,p.form_obj_id=this.form_obj_id,p.form_label=this.form.label,p.form_checksum=this.form.published_checksum,p.form_framework=this.framework.name),-1!=t.indexOf("section")){p.section_row_index=a;var Xe=1;!1===o&&!1!==i&&void 0!==i.section_id&&parseInt(i.section_id,10)>0&&(o=parseInt(i.section_id,10)),"object"==typeof this.section_repeatable_indexes["section_"+o]&&(Xe=this.section_repeatable_indexes["section_"+o].indexOf(a.toString())+1)<=0&&(Xe=1),p.section_row_number=Xe}if(-1!=t.indexOf("submit")&&(p.submit_hash=this.hash),-1!=t.indexOf("client")){var et=new Date;p.client_time="function"==typeof this.date_format?this.date_format(et,ws_form_settings.time_format):"",p.client_date="function"==typeof this.date_format?this.date_format(et,ws_form_settings.date_format):""}-1!=t.indexOf("seconds_epoch_midnight")&&((tt=new Date).setHours(0,0,0,0),p.seconds_epoch_midnight=Math.round(tt.getTime()/1e3));if(-1!=t.indexOf("seconds_epoch")){var tt=new Date;p.seconds_epoch=Math.round(tt.getTime()/1e3)}var at=t;(t=this.mask_parse(t,p),(t=this.mask_parse(t,u,!0))!==at&&-1!==t.indexOf("#"))&&(t=(Ke=this.parse_variables_process(t,a,r,i,s,_,o,l+1,n,c)).output,"object"==typeof Ke.fields&&(h=h.concat(Ke.fields)));return{output:t,fields:h}},e.WS_Form.prototype.get_data_grid_column=function(t,a,r){if(0===t.length)return t;var i=[];switch(s=a.type){case"select":case"checkbox":case"radio":break;case"price_select":var s="select_price";break;case"price_checkbox":s="checkbox_price";break;case"price_radio":s="radio_price";break;default:return t}var _="data_grid_"+s,o=this.get_object_meta_value(a,s+"_field_value","0"),l=this.get_object_meta_value(a,s+"_field_label","0"),n=this.get_object_meta_value(a,s+"_field_price","0"),c=this.get_object_meta_value(a,s+"_field_parse_variable","0"),d=this.get_object_meta_value(a,s+"_field_wc","0"),f=this.get_object_meta_value(a,_,!1);if(!1===f)return t;if("object"!=typeof f.columns||"object"!=typeof f.groups)return t;var p=0,u=0,h=0,m=f.columns,v=parseInt(r,10);for(var b in m)if(m.hasOwnProperty(b)){var g=m[b];void 0!==g.id&&void 0!==g.label&&(g.id==o&&(p=b),g.id==l&&(u=b),g.id==n&&b,g.id==c&&(h=b),g.id==d&&b,g.label===r&&(v=b))}for(var y in t)if(t.hasOwnProperty(y)){var k=t[y],w=f.groups;for(var x in w)if(w.hasOwnProperty(x)){var j=w[x];if(void 0!==j.rows){var S=j.rows;for(var F in S)if(S.hasOwnProperty(F)){var W=S[F];if(null!==W&&"object"==typeof W.data){var O=W.data,M=e.extend(!0,[],O);if(void 0!==M[p]&&void 0!==M[v]){var I={data_grid_row_value:M[p],data_grid_row_action_variable:"",data_grid_row_label:""};for(var N in!1!==u&&void 0!==M[u]&&(I.data_grid_row_label=M[u]),!1!==h&&void 0!==M[h]&&(I.data_grid_row_action_variable=M[h]),M)M.hasOwnProperty(N)&&("number"==typeof M[N]&&(M[N]=M[N].toString()),M[N]=this.mask_parse(M[N],I));if(k===M[p].toString()){if(void 0===W.data[v])continue;i.push(W.data[v])}}}}}}}return i},e.WS_Form.prototype.wpautop_parse_variable=function(e,t){if("on"==this.get_object_meta_value(e,"wpautop_do_not_process",""))return!1;var a=void 0!==t.wpautop_parse_variable&&t.wpautop_parse_variable;if("object"==typeof a){var r=!1;for(var i in a)if(a.hasOwnProperty(i)){var s=a[i];this.get_object_meta_value(e,s.meta_key,"")===s.meta_value&&(r=!0)}a=r}return a},e.WS_Form.prototype.wpautop=function(e,t){if("string"!=typeof e)return"";void 0===t&&(t=!0);var a=new Map;if(""===e.trim())return"";if((e+="\n").indexOf("<pre")>-1){var r=e.split("</pre>"),i=r.pop();e="",r.forEach(function(t,r){var i=t.indexOf("<pre");if(-1!==i){var s="<pre wp-pre-tag-"+r+"></pre>";a[s]=t.slice(i)+"</pre>",e+=t.substring(0,i)+s}else e+=t}),e+=i}var s="(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)";(e=(e=(e=(e=e.replace(/<br \/>\s*<br \/>/,"\n\n")).replace(new RegExp("(<"+s+"[^>]*>)","gmi"),"\n$1")).replace(new RegExp("(</"+s+">)","gmi"),"$1\n\n")).replace(/\r\n|\r/,"\n")).indexOf("<option")>-1&&(e=(e=e.replace(/\s*<option'/gim,"<option")).replace(/<\/option>\s*/gim,"</option>")),e.indexOf("</object>")>-1&&(e=(e=(e=e.replace(/(<object[^>]*>)\s*/gim,"$1")).replace(/\s*<\/object>/gim,"</object>")).replace(/\s*(<\/?(?:param|embed)[^>]*>)\s*/gim,"$1")),(e.indexOf("<source")>-1||e.indexOf("<track")>-1)&&(e=(e=(e=e.replace(/([<\[](?:audio|video)[^>\]]*[>\]])\s*/gim,"$1")).replace(/\s*([<\[]\/(?:audio|video)[>\]])/gim,"$1")).replace(/\s*(<(?:source|track)[^>]*>)\s*/gim,"$1"));var _=(e=e.replace(/\n\n+/gim,"\n\n")).split(/\n\s*\n/);return e="",_.forEach(function(t){e+="<p>"+t.replace(/^\s+|\s+$/g,"")+"</p>\n"}),e=(e=(e=(e=(e=(e=(e=(e=e.replace(/<p>\s*<\/p>/gim,"")).replace(/<p>([^<]+)<\/(div|address|form)>/gim,"<p>$1</p></$2>")).replace(new RegExp("<p>s*(</?"+s+"[^>]*>)s*</p>","gmi"),"$1",e)).replace(/<p>(<li.+?)<\/p>/gim,"$1")).replace(/<p><blockquote([^>]*)>/gim,"<blockquote$1><p>")).replace(/<\/blockquote><\/p>/gim,"</p></blockquote>")).replace(new RegExp("<p>s*(</?"+s+"[^>]*>)","gmi"),"$1")).replace(new RegExp("(</?"+s+"[^>]*>)s*</p>","gmi"),"$1"),t&&(e=(e=(e=e.replace(/<(script|style)(?:.|\n)*?<\/\\1>/gim,function(e){return e[0].replace("\n","<WPPreserveNewline />")})).replace(/(<br \/>)?\s*\n/gim,"<br />\n")).replace("<WPPreserveNewline />","\n")),e=(e=(e=e.replace(new RegExp("(</?"+s+"[^>]*>)s*<br />","gmi"),"$1")).replace(/<br \/>(\s*<\/?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)/gim,"$1")).replace(/\n<\/p>$/gim,"</p>"),Object.keys(a).length&&(e=e.replace(new RegExp(Object.keys(a).join("|"),"gi"),function(e){return a[e]})),e},e.WS_Form.prototype.calc_string=function(e,t,a,r,i){try{var s=new Function("return "+e)();return s===1/0&&(s=0),this.get_number(s,0,!1,a)}catch(e){return"object"==typeof r&&void 0!==r.id&&void 0!==r.label&&this.error("error_parse_variable_syntax_error_calc",r.id+" | "+this.esc_html(r.label)+(i?" | "+this.esc_html(i):"")+" | "+e.message+": "+this.esc_html(t)),0}},e.WS_Form.prototype.closing_string_index=function(e,t,a,r){for(var i=1;i>0;){var s=e.indexOf(a,r),_=e.indexOf(t,r);if(-1!==s&&-1!==_&&s<_)r=s+a.length,i++;else{if(!(-1!==_&&i>1)){if(-1!==_&&1===i)break;break}r=_+t.length,i--}}return _},e.WS_Form.prototype.string_to_attributes=function(e,t){if("string"!=typeof e||""==e)return[];"string"!=typeof t&&(t=",");var a=1,r=0,i=!1,s="",_=[];e.replace("“",'"'),e.replace("”",'"');for(var o=e.length;r<o;){var l=e[r];if(void 0===l)break;if(l!==t||1!==a||i)if('"'!==l||1!==a){if(!i){switch(l){case"(":a++;break;case")":a--}if(0===a)break}s+=l,r++}else i||(s=""),i=!i,r++;else _.push(s),s="",r++}return _.push(s),_.length&&(_=_.map(function(e){return e=e.replace(/^"(.+(?="$))"$/,"$1")})),_},e.WS_Form.prototype.get_bracket_finish_index=function(e){if(""===e)return-1;e.replace("“",'"'),e.replace("”",'"');for(var t=1,a=1,r=!1;t>0||a<e.length;){var i=e[a];if(void 0===i)break;if('"'!==i){if(!r){switch(i){case"(":t++;break;case")":t--}if(0===t)break}a++}else r=!r,a++}return 0===t?a:(this.error("error_parse_variable_syntax_error_bracket_closing",e,"error-parse-variables"),-1)},e.WS_Form.prototype.parse_variables_process_error=function(e){return{output:e,functions:[],fields:[]}},e.WS_Form.prototype.get_field_value=function(t,a,r,i){var s=this;if(void 0===a&&(a=!1),void 0===r&&(r=!1),void 0===i&&(i=!1),!1===a){var _='[name="'+this.esc_selector(ws_form_settings.field_prefix+t.id);r&&(_+="[]")}else if(!0===a)_='[name^="'+this.esc_selector(ws_form_settings.field_prefix+t.id)+"[";else{_='[name="'+this.esc_selector(ws_form_settings.field_prefix+t.id+"["+a+"]");r&&(_+="[]")}if(!e(_+='"]',this.form_canvas_obj).length)return!1;switch(t.type){case"select":case"price_select":_+=" option:selected";break;case"checkbox":case"radio":case"price_checkbox":case"price_radio":_+=":checked"}var o=[];return e(_,this.form_canvas_obj).each(function(){switch(t.type){case"price_select":!1===i?o.push(e(this).attr("data-price")):o.push(e(this).val());break;case"price_checkbox":case"price_radio":!1===i?o.push(e(this).attr("data-price")):o.push(e(this).val());break;case"mediacapture":if(p=e(this).val()){var a=JSON.parse(p);"object"==typeof a&&a.filename&&o.push(a.filename)}break;case"file":var r=[];switch(e(this).attr("data-file-type")){case"dropzonejs":var _=e(this).closest('[data-type="file"]');if(_){var l=e(".dropzone",_)[0].dropzone;if(l&&l.files)r=l.files}break;default:r=e(this)[0].files}var n=[];for(var c in r)if(r.hasOwnProperty(c)){var d=r[c];n.push(d.name)}o.push(n.join(","));break;case"googlemap":var f=e(this).val();if(!f)break;try{var p=JSON.parse(f)}catch(e){break}void 0!==p.lat&&void 0!==p.lng&&o.push(p.lat+","+p.lng);break;default:p=e(this).val();s.is_iterable(p)?o.push(...p):o.push(p)}}),o},e.WS_Form.prototype.get_data_source=function(t){var a={default_value:[]};t=this.field_data_cache[t.id];if(void 0===e.WS_Form.field_type_cache[t.type])return!1;var r=e.WS_Form.field_type_cache[t.type];if(void 0===r.data_source)return!1;var i=r.data_source;if(void 0===i.type)return!1;switch(a.type=i.type,a.type){case"data_grid":if(void 0===i.id)return!1;a.meta_key_data_grid=i.id,a.meta_key_value_column=(r.datagrid_column_value,r.datagrid_column_value),a.data_grid=this.get_object_meta_value(t,a.meta_key_data_grid,!1),a.value_column_id=this.get_object_meta_value(t,a.meta_key_value_column,!1);var s=(a.data_grid.columns,a.data_grid.columns);for(var _ in a.value_column_index=!1,s)if(s.hasOwnProperty(_)){var o=s[_];if(void 0!==o.id&&o.id==a.value_column_id){a.value_column_index=_;break}}if(!1!==a.value_column_id&&void 0!==a.data_grid.groups){var l=a.data_grid.groups;for(var n in l)if(l.hasOwnProperty(n)){var c=l[n];if(void 0!==c.rows){var d=c.rows;for(var f in d)if(d.hasOwnProperty(f)){var p=d[f];if(null!==p)if(void 0!==p.default&&"on"===p.default){if(void 0===p.data)continue;if(void 0===p.data[a.value_column_index])continue;a.default_value.push(p.data[a.value_column_index])}}}}}}return a},e.WS_Form.prototype.get_query_var=function(e,t){t||(t="");var a=window.location.href;if(!a)return t;try{e=e.replace(/[\[\]]/g,"\\$&");var r=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)").exec(a);if(!r)return t;if(!r[2])return t;try{return decodeURIComponent(r[2].replace(/\+/g," "))}catch(e){return t}}catch(e){return t}},e.WS_Form.prototype.set_object_meta_value=function(e,t,a){return void 0===e?a:void 0===e.meta?a:void(e.meta[t]=a)},e.WS_Form.prototype.column_class_array=function(t,a){void 0===a&&(a="breakpoint");var r=[],i=this.framework.breakpoints,s=this.framework.columns.column_class,_=this.framework.columns.offset_class,o=0,l=0;for(var n in i)if(i.hasOwnProperty(n)){var c=i[n],d=this.get_object_meta_value(t,a+"_size_"+n,"");if(""==d&&(d="0"),0==(d=parseInt(d,10))){if(void 0!==c.column_size_default)switch(c.column_size_default){case"column_count":d=parseInt(e.WS_Form.settings_plugin.framework_column_count,10);break;default:d=parseInt(c.column_size_default,10)}}else d=parseInt(d,10);if(d>0&&d!=o){var f={id:c.id,size_word:void 0===this.number_to_word[d]?d:this.number_to_word[d],size:d};if(void 0!==c.column_class)var p=c.column_class;else p=s;var u=this.mask_parse(p,f);r.push(u),o=d}var h=this.get_object_meta_value(t,a+"_offset_"+n,""),m=!1;if(""!==h&&h!=l){f={id:c.id,offset_word:void 0===this.number_to_word[h]?h:this.number_to_word[h],offset:h};if(void 0!==c.offset_class)var v=c.offset_class;else v=_;u=this.mask_parse(v,f);r.push(u),l=h,m=!0}m&&r.push("wsf-has-offset")}return r},e.WS_Form.prototype.column_classes_render=function(e,t,a){e.closest(".wsf-sections").css("min-height","auto"),e.closest(".wsf-fields").css("min-height","auto"),void 0===a&&(a=!0);for(var r=this.column_class_array(t),i=0;i<r.length;i++)a?e.addClass(r[i]):e.removeClass(r[i])},e.WS_Form.prototype.mask_parse=function(e,t,a){if("string"!=typeof e)return"";void 0===a&&(a=!1);var r=[],i=Object.keys(t);i.sort(function(e,t){if(e===t)return 0;var a=-1!==e.indexOf("("),r=-1!==t.indexOf("(");return a&&r?e<t?1:-1:!a&&r||a&&!r?a<r?1:-1:e<t?1:-1});for(var s=0;s<i.length;s++)r[i[s]]=t[i[s]];for(var _ in t=r)if(t.hasOwnProperty(_)){var o=t[_];e=a?e.replace("#"+_,o):this.replace_all(e,"#"+_,o)}return e},e.WS_Form.prototype.language=function(t,a,r,i){void 0===a&&(a=!1),void 0===r&&(r=!0),void 0===i&&(i=!1);var s="",_="";if("error_language"===t)s="Language reference not found: %s";else if(null!==e.WS_Form.settings_form&&void 0!==e.WS_Form.settings_form.language&&void 0!==e.WS_Form.settings_form.language[t])s=e.WS_Form.settings_form.language[t];return""==s?"error_language"===t||i||this.error("error_language",t):(!1!==a&&(s=this.replace_all(s,"%s",a)),_=r?this.esc_html(s):s),""==_&&(_=""==a?"[LANGUAGE NOT FOUND: "+t+"]":a),_},e.WS_Form.prototype.cookie_set=function(t,a,r,i){void 0===r&&(r=!0),void 0===i&&(i=!0);var s=this.get_object_value(e.WS_Form.settings_plugin,"cookie_prefix");if(!s)return!1;if(""==a){if(""==this.cookie_get(t,""))return!1;(o=new Date).setTime(o.getTime()-864e5);var _="expires="+o.toUTCString()+";"}else if(r){var o,l=this.get_object_value(e.WS_Form.settings_plugin,"cookie_timeout");if(!l)return!1;(o=new Date).setTime(o.getTime()+1e3*l);_=" expires="+o.toUTCString()+";"}else _="";var n=s+"_"+(i?this.form_id+"_":"")+t+"="+a+";"+_+" path=/; SameSite=Strict; Secure";return document.cookie=n,!0},e.WS_Form.prototype.field_param_language=function(e,t,a){var r=this.get_object_meta_value(e,t,"");return""!==r?r:this.language(a)},e.WS_Form.prototype.cookie_get=function(t,a,r){void 0===r&&(r=!0);var i=this.get_object_value(e.WS_Form.settings_plugin,"cookie_prefix");return i?(t=i+"_"+(r?this.form_id+"_":"")+t,this.cookie_get_raw(t,a)):a},e.WS_Form.prototype.cookie_get_raw=function(e,t){if(void 0===t&&(t=""),""===e||!document.cookie||"string"!=typeof document.cookie)return t;var a=document.cookie.split(";");e+="=";for(var r=0;r<a.length;r++){for(var i=a[r];" "==i.charAt(0);)i=i.substring(1);if(0==i.indexOf(e)){var s=i.substring(e.length,i.length);try{return decodeURIComponent(s)}catch(e){return s}}}return t},e.WS_Form.prototype.cookie_clear=function(t,a){void 0===a&&(a=!0);var r=this.get_object_value(e.WS_Form.settings_plugin,"cookie_prefix");if(!r)return!1;var i=new Date;i.setTime(i.getTime()-36e5);var s=r+"_"+(a?this.form_id+"_":"")+t+"=''; expires="+i.toUTCString()+"; path=/; SameSite=Strict; Secure";return document.cookie=s,!0},e.WS_Form.prototype.session_storage_get_raw=function(e,t){return void 0===t&&(t=""),""===e||"object"!=typeof sessionStorage||null===sessionStorage.getItem(e)?t:sessionStorage.getItem(e)},e.WS_Form.prototype.local_storage_get_raw=function(e,t){return void 0===t&&(t=""),""===e||"object"!=typeof localStorage||null===localStorage.getItem(e)?t:localStorage.getItem(e)},e.WS_Form.prototype.tabs=function(t,a){void 0===a&&(a={});var r=void 0!==a.selector?a.selector:"li",i=void 0!==a.active?a.active:0,s=void 0!==a.activate&&a.activate,_=this,o=0;t.addClass("wsf-tabs"),e(r,t).each(function(){var t=e(this);t.find('a[href*="#"]:not([href="#"])').each(function(){e(this).attr("data-tab-index",o),e(this).off("click").on("click",function(a){a.preventDefault(),e(this).trigger("wsf-click"),a.stopPropagation(),a.stopImmediatePropagation(),_.tab_show(e(this),t,s)}),o==i&&_.tab_show(e(this),t)}),o++})},e.WS_Form.prototype.tabs_destroy=function(t,a){void 0===a&&(a={});var r=void 0!==a.selector?a.selector:"li";e(r,t).each(function(){e(this).find("a").each(function(){e(this).removeAttr("data-tab-index"),e(this).off("click")})}),t.removeClass("wsf-tabs")},e.WS_Form.prototype.tab_show=function(t,a,r){var i=this;a.siblings().each(function(){var t=e(this).find("a").first();i.tab_hide(t,e(this))}),a.addClass("wsf-tab-active");var s=t.attr("href");(e(s).show(),"function"==typeof r)&&r(t.attr("data-tab-index"));t.trigger("tab_show")},e.WS_Form.prototype.tab_hide=function(t,a){a.removeClass("wsf-tab-active");var r=t.attr("href");e(r).hide()},e.WS_Form.prototype.data_cache_build=function(){if(void 0===this.form)return!1;if(void 0===this.form.groups)return!1;for(var e in this.group_data_cache=[],this.section_data_cache=[],this.field_data_cache=[],this.action_data_cache=[],this.form.groups)if(this.form.groups.hasOwnProperty(e)){var t=this.form.groups[e];this.data_cache_build_group(t)}var a=this.get_object_meta_value(this.form,"action",!1);if(!1!==a&&void 0!==a.groups&&void 0!==a.groups[0]&&"object"==typeof a.groups[0].rows&&0!=a.groups[0].rows.length){var r=a.groups[0].rows;for(var i in r)if(r.hasOwnProperty(i)){var s=r[i];null!==s&&"object"==typeof s&&"object"==typeof s.data&&0!=s.data.length&&(this.action_data_cache[s.id]={label:s.data[0]})}}return!0},e.WS_Form.prototype.data_cache_build_group=function(e){for(var t in this.group_data_cache[e.id]=e,e.sections)if(e.sections.hasOwnProperty(t)){var a=e.sections[t];this.data_cache_build_section(a)}return!0},e.WS_Form.prototype.data_cache_build_section=function(t){this.section_data_cache[t.id]=t;var a=void 0!==t.meta&&void 0!==t.meta.section_repeatable&&"on"==t.meta.section_repeatable;for(var r in t.fields)if(t.fields.hasOwnProperty(r)){var i=t.fields[r];a&&(i.section_repeatable_section_id=t.id),void 0!==e.WS_Form.field_type_cache[i.type]&&(this.field_data_cache[i.id]=i)}return!0},e.WS_Form.prototype.array_randomize=function(e){for(var t=e.length-1;t>0;t--){var a=Math.floor(Math.random()*(t+1)),r=e[t];e[t]=e[a],e[a]=r}return e},e.WS_Form.prototype.get_nice_duration=function(e,t){if(void 0===t&&(t=!0),0==e)return"-";var a=Math.floor(e/3600);if(t)var r=Math.floor(e%3600/60),i=e%60;else r=Math.ceil(e%3600/60);var s=[];return a>0&&s.push(a+" "+(1==a?this.language("hour"):this.language("hours"))),r>0&&s.push(r+" "+(1==r?this.language("minute"):this.language("minutes"))),t&&s.push(i+" "+(1==i?this.language("second"):this.language("seconds"))),s.join(" ")},e.WS_Form.prototype.get_nice_distance=function(e,t){if(0==e)return"-";switch(t){case"IMPERIAL":var a=e/1609;if(a>=1)return Math.floor(a)+" "+(1==a?this.language("mile"):this.language("miles"));var r=3.2808399*e;return Math.floor(r)+" "+(1==r?this.language("feet"):this.language("feets"));default:var i=e/1e3;return i>=1?Math.round(10*i)/10+" "+(1==i?this.language("kilometer"):this.language("kilometers")):Math.round(10*e)/10+" "+(1==e?this.language("meter"):this.language("meters"))}},e.WS_Form.prototype.ucwords=function(e){for(var t=e.split(" "),a=0;a<t.length;a++)t[a]=t[a].charAt(0).toUpperCase()+t[a].slice(1);return t.join(" ")},e.WS_Form.prototype.ucfirst=function(e){var t="";return e.length>0&&(t=e[0].toUpperCase(),e.length>1&&(t+=e.slice(1))),t},e.WS_Form.prototype.capitalize=function(e){return this.ucwords(e.toLowerCase())},e.WS_Form.prototype.sentence=function(e){return this.ucfirst(e.toLowerCase())},e.WS_Form.prototype.get_label_position=function(e){var t=this.get_object_meta_value(e,"sub_type",!1);""==t&&(t=!1);var a=this.get_object_meta_value(e,"label_position","default");return"default"==(a=this.get_field_value_fallback(e.type,!1,"label_position_force",a,!1,t))&&(a=this.get_object_meta_value(this.form,"label_position_form","top")),a},e.WS_Form.prototype.get_help_position=function(e){var t=this.get_object_meta_value(e,"sub_type",!1);""==t&&(t=!1);var a=this.get_object_meta_value(e,"help_position","default");return"default"==(a=this.get_field_value_fallback(e.type,!1,"help_position_force",a,!1,t))&&(a=this.get_object_meta_value(this.form,"help_position_form","bottom")),a},e.WS_Form.prototype.get_form_invalid_feedback_mask=function(){var t=this.get_object_meta_value(this.form,"invalid_feedback_mask","");if(""==t){var a=e.WS_Form.meta_keys.invalid_feedback_mask;return a.p?a.p:a.mask_placeholder}return t},e.WS_Form.prototype.get_invalid_feedback_mask_parsed=function(e,t){return e=this.replace_all(e,"#label_lowercase",t.toLowerCase()),e=this.replace_all(e,"#label",t)},e.WS_Form.prototype.get_field_html_single=function(t,a,r,i){void 0===r&&(r=!1),void 0===i&&(i=!1);var s=[],_=void 0!==a,o=!r,l=!1!==i?"-repeat-"+i:"",n=this.get_part_id(t.id,i),c=this.get_field_name(t.id,i),d=["default","class","input_type_datetime","multiple","min","max","step"],f=["class"];if(void 0===e.WS_Form.field_type_cache[t.type])return"";var p=e.WS_Form.field_type_cache[t.type];if(p.pro_required)return this.language("error_pro_required");if(r)var u=!0;else u=this.get_object_meta_value(t,"label_render",!0);var h=this.get_object_meta_value(t,"sub_type",!1);if(""==h&&(h=!1),this.get_field_value_fallback(t.type,!1,"label_disabled",!1,!1,h)&&(u=!1),void 0!==p.submit_array&&p.submit_array&&(c+="[]"),u&&!r)var m=this.get_label_position(t);else m="top";var v=!1;-1===this.get_framework().label_positions.indexOf(m)&&(m="top");var b=e.extend(!0,[],this.get_field_value_fallback(t.type,m,"mask_field_attributes",[],!1,h)),g=void 0!==p.mask_wrappers_drop&&p.mask_wrappers_drop,y=g?"#field":this.get_field_value_fallback(t.type,m,"mask","#field",!1,h),k=this.get_field_value_fallback(t.type,m,"mask_field","",!1,h);if(r){var w=this.get_field_value_fallback(t.type,m,"mask_field_submit",!1,!1,h);!1!==w&&(k=w)}"left"!=m&&"right"!=m||(k=(k=k.replace("#pre_help","")).replace("#post_help",""));var x=u?this.get_field_value_fallback(t.type,m,"mask_field_label","",!1,h):"",j=this.get_field_value_fallback(t.type,m,"mask_field_label_hide_group",!1,!1,h),S=this.get_field_value_fallback(t.type,m,"mask_help","",!1,h),F=this.get_field_value_fallback(t.type,m,"mask_help_append","",!1,h),W=this.get_field_value_fallback(t.type,m,"mask_help_append_separator","",!1,h),O=this.get_field_value_fallback(t.type,m,"mask_invalid_feedback","",!1,h),M=this.get_object_meta_value(t,"default_value","",!1,!0),I=this.get_object_meta_value(t,"text_editor","",!1,!0),N=this.get_object_meta_value(t,"html_editor","",!1,!0),D=this.get_object_meta_value(t,"dedupe_value_scope","",!1,!0),P=this.get_object_meta_value(t,"hidden_bypass","",!1,!0),q=this.get_object_meta_value(t,"exclude_cart_total","",!1,!0);_||(a="",""!=M&&(a=this.esc_html(M)),""!=I&&(a=I),""!=N&&(a=N));var C=!0,z="";switch(t.type){case"textarea":C=""===this.get_object_meta_value(t,"input_type_textarea","");break;case"select":case"checkbox":case"radio":case"price_select":case"price_checkbox":case"price_radio":a&&(a="string"==typeof a?a.split(",").map(function(e){return e.trim()}):a,_=!0)}var T=C?this.parse_variables_process(this.get_object_meta_value(t,"prepend",""),i,!1,t,"field_prepend",o).output:"";z+=C?this.parse_variables_process(this.get_object_meta_value(t,"append",""),i,!1,t,"field_prepend",o).output:"";var $="";if(!r){var A=[],Y=this.get_object_meta_value(this.form,"class_field","",!1,!0);if(""!=Y&&A.push(Y),""!=($=this.get_object_meta_value(t,"class_field","",!1,!0))&&A.push($),!this.get_object_meta_value(t,"class_field_full_button_remove","")){var E=this.get_field_value_fallback(t.type,m,"class_field_full_button","",!1,h);"object"==typeof E&&A.push(E.join(" "))}if(!(L=this.get_object_meta_value(t,"class_field_button_type",!1)))var L=this.get_field_value_fallback(t.type,m,"class_field_button_type_fallback",!1,!1,h);if(L){var U=this.get_field_value_fallback(t.type,m,"class_field_button_type","",!1,h);void 0!==U[L]&&A.push(U[L])}switch(t.type){case"checkbox":case"radio":switch(this.get_object_meta_value(t,t.type+"_style","")){case"button":A.push("wsf-button");break;case"button-full":A.push("wsf-button wsf-button-full");break;case"color":A.push("wsf-color");break;case"color-circle":A.push("wsf-color wsf-circle");break;case"circle":A.push("wsf-circle");break;case"image":A.push("wsf-image");break;case"image-circle":A.push("wsf-image wsf-circle");break;case"image-responsive":A.push("wsf-image wsf-responsive wsf-image-full");break;case"image-circle-responsive":A.push("wsf-image wsf-responsive wsf-image-full wsf-circle");break;case"switch":A.push("wsf-switch")}}if(""!==T||""!==z){var R=this.get_field_value_fallback(t.type,m,"class_field_input_group","",!1,h);""!==R&&A.push(R)}var J=void 0!==p.label_inside&&p.label_inside;if(J&&"inside"===m){switch(t.type){case"textarea":var H=this.get_object_meta_value(t,"input_type_textarea",!1);v=!("tinymce"===H||"html"===H);break;case"select":case"price_select":v=!this.get_object_meta_value(t,"select2",!1);break;default:v=!0}v||(m="top")}J||"inside"!==m||(m="top"),v&&(t.meta.placeholder=this.parse_variables_process(t.label,i,!1,t,"field_label",o).output),$=A.join(" ")}var Z=parseInt(e.WS_Form.settings_plugin.framework_column_count,10),G=parseInt(this.get_object_meta_value(this.form,"label_column_width_form",3),10),B=this.get_object_meta_value(t,"label_column_width","default");switch(B){case"default":case"":B=G;break;default:B=parseInt(B,10)}B>=Z&&(B=Z-1);var Q=Z-B,K={id:n,form_id_prefix:this.form_id_prefix,form_id:this.form_id,form_instance_id:this.form_instance_id,field_id:t.id,name:c,label:this.parse_variables_process(t.label,i,!1,t,"field_label",o).output,value:a,required:this.get_object_meta_value(this.form,"label_required")?'<span class="wsf-required-wrapper"></span>':"",column_width_label:B,column_width_field:Q,max_upload_size:ws_form_settings.max_upload_size,locale:ws_form_settings.locale,currency:e.WS_Form.settings_plugin.currency},V=this.get_field_value_fallback(t.type,m,"meta_key_parse_variables",[],!1,h);for(var X in V)if(V.hasOwnProperty(X)){var ee=V[X],te=!1!==(Xe=void 0!==e.WS_Form.meta_keys[ee]&&e.WS_Form.meta_keys[ee])?void 0===Xe.d?"":Xe.d:"",ae=this.get_object_meta_value(t,ee,te);"object"==typeof ae&&(ae=JSON.stringify(ae)),ae=this.replace_all(ae,"'","&#39;"),K[ee]=ae}var re=e.extend(!0,{},K);re.label_id=this.get_part_id(t.id,i,"label");var ie=this.get_part_id(t.id,i,"help"),se=""!==(oe=r?"":this.get_object_meta_value(t,"help","",!1,!1)),_e={value:0,character_count:0,character_count_label:"",character_remaining:0,character_remaining_label:"",character_min:0,character_min_label:"",character_max:0,character_max_label:"",word_count:0,word_count_label:"",word_remaining:0,word_remaining_label:"",word_min:0,word_min_label:"",word_max:0,word_max_label:""};oe=this.mask_parse(oe,_e);var oe=this.parse_variables_process(oe,i,!1,t,"field_help",o).output;if(r)switch(t.type){case"range":oe="#value"}var le=this.get_help_position(t),ne=this.get_field_value_fallback(t.type,m,"class_help_"+("bottom"==le?"post":"pre"),[],!1,h);_e.id=n,_e.help_id=ie,_e.help_class=ne.join(" "),_e.help=oe,K.help_class=ne.join(" ");var ce=!r&&this.get_object_meta_value(t,"invalid_feedback_render",!1,!1,!0),de=!1;if(ce){var fe=e.extend(!0,{},K),pe=this.form_id_prefix+"invalid-feedback-"+t.id+l,ue=this.get_field_value_fallback(t.type,m,"class_invalid_feedback",[],!1,h),he=(de=this.get_field_value_fallback(t.type,m,"invalid_feedback_last_row",!1,!1,h),this.get_object_meta_value(t,"invalid_feedback","",!1,!0));""==he&&(he=this.get_form_invalid_feedback_mask()),he=this.get_invalid_feedback_mask_parsed(he,t.label),fe.invalid_feedback_id=pe,fe.invalid_feedback_class=ue.join(" "),fe.invalid_feedback=he,fe.attributes="";var me=this.mask_parse(O,fe)}else pe=!1,me="";if(K.invalid_feedback=me,re.invalid_feedback=me,K.attributes="",r)b=d.filter(function(e){return-1!=b.indexOf(e)});if(b.length>0){var ve=this.get_attributes(t,b,!1,i);K.attributes+=" "+ve.attributes,b=ve.mask_attributes,s=ve.attribute_values}!1!==i&&(K.attributes+=' data-repeatable-index="'+this.esc_attr(i)+'"');K.attributes=this.custom_attributes(K.attributes,t,"field",i);var be=this.get_object_meta_value(t,"orientation",!1);if("grid"==be)var ge=this.get_field_value_fallback(t.type,m,"class_orientation_wrapper",[],!1,h),ye=this.get_field_value_fallback(t.type,m,"class_orientation_row",[],!1,h),ke=ge.join(" "),we=this.column_class_array(t,"orientation_breakpoint"),xe=(we=ye.concat(we)).join(" ");re.attributes="";var je=e.extend(!0,[],this.get_field_value_fallback(t.type,m,"mask_field_label_attributes",[],!1,h));if(r)je=f.filter(function(e){return-1!=je.indexOf(e)});if(je.length>0){ve=this.get_attributes(t,je,!1,i);re.attributes+=ve.attributes,je=ve.mask_attributes}var Se="",Fe=this.get_object_value(p,"data_source",!1),We=0,Oe=!1!==Fe;if(Oe){if(void 0===Fe.type)Oe=!1;else var Me=Fe.type;if(void 0===Fe.id)Oe=!1;else var Ie=Fe.id}if(Oe){switch(Me){case"data_grid":var Ne=this.get_object_meta_value(t,Ie,!1)}if(!1===Ne&&(Oe=!1),void 0===Ne.columns)Oe=!1;else var De=Ne.columns}if(Oe){var Pe=this.get_field_value_fallback(t.type,m,"mask_group","",!1,h),qe=this.get_field_value_fallback(t.type,m,"mask_group_wrapper","",!1,h),Ce=this.get_field_value_fallback(t.type,m,"mask_group_label","",!1,h),ze=this.get_field_value_fallback(t.type,m,"mask_group_always",!1,!1,h),Te=this.get_field_value_fallback(t.type,m,"mask_row","",!1,h),$e=this.get_field_value_fallback(t.type,m,"mask_row_placeholder","",!1,h),Ae=this.get_field_value_fallback(t.type,m,"mask_row_field","",!1,h),Ye=this.get_field_value_fallback(t.type,m,"mask_row_label","",!1,h),Ee=this.get_field_value_fallback(t.type,m,"mask_row_lookups",[],!1,h),Le=this.get_field_value_fallback(t.type,m,"datagrid_column_value",!1,!1,h),Ue=this.get_field_value_fallback(t.type,m,"mask_row_default","",!1,h),Re=this.get_field_value_fallback(t.type,m,"mask_row_required"," required data-required",!1,h),Je=this.get_field_value_fallback(t.type,m,"mask_row_disabled"," disabled",!1,h),He=(this.get_field_value_fallback(t.type,m,"mask_row_visible"," visible",!1,h),this.get_object_meta_value(t,"data_grid_rows_randomize","",!1,!0));if(He)this.get_object_meta_value(t,"data_source_term_hierarchy","",!1,!0)&&(He=!1);var Ze=this.get_object_meta_value(t,"placeholder_row","",!1,!0),Ge=this.get_object_meta_value(t,"multiple","",!1,!0);if(""!=Ze&&!Ge){var Be=e.extend(!0,{},K);Be.value=Ze,Se+=this.mask_parse($e,Be)}_&&"object"!=typeof a&&("string"!=typeof a&&(a=a.toString()),a=[a]);var Qe=_&&void 0!==a.indexOf,Ke=[];for(var Ve in Ee)if(Ee.hasOwnProperty(Ve)){if(Ke[ut=Ee[Ve]]=!1,!1===(kt=this.get_object_meta_value(t,ut,!1,!1,!0))){if(void 0===e.WS_Form.meta_keys[ut])continue;var Xe;(kt=void 0!==(Xe=e.WS_Form.meta_keys[ut]).d?Xe.d:0)>De.length&&(kt=0)}var et=!1;for(var tt in De){if(De.hasOwnProperty(tt))if(De[tt].id==kt){et=tt;break}}et&&(Ke[ut]=et)}if(void 0===Ne.groups)return this.error("error_data_source_groups"),"";var at=Ne.groups;Object.keys(at).length;for(var rt in He&&(at=this.array_randomize(at)),at)if(at.hasOwnProperty(rt)){var it=e.extend(!0,{},K);it.group_id=this.form_id_prefix+"datagrid-"+t.id+"-group-"+rt+l;var st=at[rt];if(null!=st&&"object"==typeof st){if(void 0===st.label)return this.error("error_data_group_label"),"";switch(t.type){case"select":case"price_select":var _t=!0;break;default:_t=void 0===st.label_render||st.label_render}if(_t){var ot=e.extend(!0,{},K);ot.group_label=st.label,ot.label_row_id=this.form_id_prefix+"label-"+t.id+"-group-"+rt+l,it.group_label=this.parse_variables_process(this.mask_parse(Ce,ot),i).output}else it.group_label="";it.disabled=void 0!==st.disabled&&"on"==st.disabled?" disabled":"";var lt=void 0!==st.mask_group&&"on"==st.mask_group||ze;lt&&j&&(x="");var nt="";if(void 0!==st.rows){var ct=JSON.parse(JSON.stringify(st.rows)),dt=this.get_object_meta_value(t,"select_all","");if(("checkbox"==t.type||"price_checkbox"==t.type)&&"on"==dt){var ft=!1,pt=!1;for(var ut in Ke)if(Ke.hasOwnProperty(ut)){var ht=Ke[ut];"checkbox_field_value"==ut&&(ft=ht),"checkbox_field_label"==ut&&(pt=ht),"checkbox_price_field_value"==ut&&(ft=ht),"checkbox_price_field_label"==ut&&(pt=ht)}dt={id:0,default:"",required:"",hidden:"",disabled:"",select_all:!0,data:[]};var mt=this.get_object_meta_value(t,"select_all_label","");""==mt&&(mt=this.language("select_all_label")),dt.data[ft]=mt,dt.data[pt]=mt,ct.unshift(dt)}for(var vt in He&&(ct=this.array_randomize(ct)),ct)if(ct.hasOwnProperty(vt)){var bt=ct[vt];if(null!==bt&&"object"==typeof bt&&"object"==typeof bt.data){var gt=!de||vt==ct.length-1,yt=e.extend(!0,{},K);for(var ut in yt.data_grid_row_value="",yt.data_grid_row_action_variable="",yt.data_grid_row_label="",yt.data_grid_row_price="",yt.data_grid_row_price_currency="",yt.data_grid_row_woocommerce_cart="",Ke){if(Ke.hasOwnProperty(ut))if(yt[ut]="",!1!==(et=Ke[ut])&&void 0!==bt.data[et]){var kt;switch(null===(kt=bt.data[et])&&(kt=""),kt=this.parse_variables_process(kt.toString(),i,!1,t,"data_grid_row",o).output,yt[ut+"_html"]=this.esc_html(kt),t.type){case"range":case"price_range":var wt=this.get_object_meta_value(t,"min",0);(""==wt||isNaN(wt))&&(wt=0);var xt=this.get_object_meta_value(t,"max",100);(""==xt||isNaN(xt))&&(xt=100);var jt=this.get_number(kt,!0),St=parseFloat(xt)-parseFloat(wt),Ft=St>0?(jt-wt)/St*100:0;yt[ut+"_percentage"]=Ft,-1!==ut.indexOf("_field_percentage")&&(yt.data_grid_row_value_percentage=Ft)}yt[ut+"_compare"]=this.esc_html(kt);var Wt=!1;if(void 0!==e.WS_Form.meta_keys[ut]){var Ot=e.WS_Form.meta_keys[ut];void 0!==Ot.h&&Ot.h&&(kt=this.esc_html(kt));Wt=void 0!==Ot.pr&&Ot.pr}if(Wt){var Mt=this.get_number(kt),It=ut+"_currency",Nt=this.get_price(Mt);yt[It]=Nt,yt[ut]=Mt,-1!==ut.indexOf("_price_field_price")&&(yt.data_grid_row_price=Mt),-1!==It.indexOf("_price_field_price_currency")&&(yt.data_grid_row_price_currency=Nt)}else yt[ut]=kt;-1!==ut.indexOf("_field_value")&&(yt.data_grid_row_value=kt),-1!==ut.indexOf("_field_parse_variable")&&(yt.data_grid_row_action_variable=kt),-1!==ut.indexOf("_field_label")&&(yt.data_grid_row_label=kt),-1!==ut.indexOf("_field_wc")&&(yt.data_grid_row_woocommerce_cart=kt)}}void 0!==p.mask_row_value&&(yt.row_value=this.mask_parse(p.mask_row_value,yt),yt.row_value.indexOf("#")>-1&&(yt.row_value=this.mask_parse(yt.row_value,yt))),void 0!==p.mask_row_price&&(yt.row_price=this.mask_parse(p.mask_row_price,yt)),bt.select_all?yt.row_id=this.form_id_prefix+"field-"+t.id+"-group-"+rt+"-row-"+bt.id+l:yt.row_id=this.form_id_prefix+"field-"+t.id+"-row-"+bt.id+l,yt.data_id=bt.id;var Dt=e.extend(!0,{},yt),Pt=e.extend(!0,{},yt);Pt.label_id=this.form_id_prefix+"label-"+t.id+l,Pt.label_row_id=this.form_id_prefix+"label-"+t.id+"-row-"+bt.id+l;var qt=[];(!_&&bt.default||_&&!1!==Le&&Qe&&a.indexOf(yt[Le+"_compare"])>-1||_&&void 0!==yt.row_value&&Qe&&a.indexOf(yt.row_value)>-1)&&(qt.default=Ue),bt.disabled&&(qt.disabled=Je),bt.required&&(qt.required=Re),qt.dedupe_value_scope=D,qt.hidden_bypass=P,qt.exclude_cart_total=q,yt.attributes="",Pt.attributes="",Dt.attributes="";var Ct=e.extend(!0,[],qt);if(!r){var zt="horizontal"==be&&this.get_field_value_fallback(t.type,m,"class_inline",!1,!1,h);!1!==zt&&(Ct.class=zt.join(" "));var Tt=this.get_field_value_fallback(t.type,m,"class_row",!1,!1,h);if(!1!==Tt&&(Ct.class=!1!==zt?Ct.class+" "+Tt.join(" "):Tt.join(" ")),bt.disabled){var $t=this.get_field_value_fallback(t.type,m,"class_row_disabled",!1,!1,h);!1!==$t&&(Ct.class+=" "+$t.join(" "))}}var At=e.extend(!0,[],this.get_field_value_fallback(t.type,m,"mask_row_attributes",[],!1,h));if(At.length>0){ve=this.get_attributes(t,At,Ct,i);yt.attributes+=" "+ve.attributes}if(void 0!==bt.hidden&&bt.hidden&&!r)switch(t.type){case"select":continue;default:yt.attributes+=' style="display: none;"'}"grid"==be&&""!=xe&&(yt.attributes=this.attribute_modify(yt.attributes,"class",xe,!0));Ct=e.extend(!0,[],qt);var Yt=this.get_field_value_fallback(t.type,m,"class_row_field_label",!1,!1,h);!1!==Yt&&(Ct.class=Yt.join(" "));var Et=e.extend(!0,[],this.get_field_value_fallback(t.type,m,"mask_row_label_attributes",[],!1,h));if(r)Et=f.filter(function(e){return-1!=Et.indexOf(e)});if(Et.length>0){ve=this.get_attributes(t,Et,Ct,i);Pt.attributes+=" "+ve.attributes}Ct=e.extend(!0,[],qt);var Lt=this.get_field_value_fallback(t.type,m,"class_row_field",!1,!1,h);!1!==Lt&&(Ct.class=Lt.join(" ")),r||""==$||(Ct.class+=" "+$.trim()),Ct.aria_labelledby=Pt.label_row_id,(!_&&bt.default||_&&!1!==Le&&Qe&&a.indexOf(yt[Le+"_compare"])>-1)&&(Ct.default=Ue),bt.disabled&&(Ct.disabled=Je),bt.required&&(Ct.required=Re),Ct.required_row=s.required;var Ut=e.extend(!0,[],this.get_field_value_fallback(t.type,m,"mask_row_field_attributes",[],!1,h));if(r)Ut=d.filter(function(e){return-1!=Ut.indexOf(e)});if(Ut.length>0){ve=this.get_attributes(t,Ut,Ct,i);Dt.attributes+=" "+ve.attributes}if(""!=Dt.attributes&&(Dt.attributes=" "+Dt.attributes),void 0!==bt.select_all&&(Dt.attributes+=" data-wsf-select-all"),void 0!==bt.hierarchy&&""==be&&!He)switch(t.type){case"checkbox":case"price_checkbox":case"radio":case"price_radio":yt.attributes+=' data-wsf-hierarchy="'+this.esc_attr(bt.hierarchy)+'"';break;case"select":case"price_select":bt.hierarchy>0&&(yt.select_field_label="&nbsp;&nbsp;&nbsp;".repeat(bt.hierarchy)+yt.select_field_label)}if(ce&&!de)if(pe=this.form_id_prefix+"invalid-feedback-"+t.id+"-row-"+bt.id+l,fe.invalid_feedback_id=pe,ce)me=this.mask_parse(O,fe);else me="";Dt.invalid_feedback=gt?me:"",Pt.invalid_feedback=gt?me:"";var Rt=this.mask_parse(Ae,Dt);Pt.row_field=Rt,yt.row_field=Rt;var Jt=this.mask_parse(Ye,Pt);yt.row_label=Jt,nt+=this.mask_parse(Te,yt),We++}}}if(""!=qe){var Ht={group:nt};"grid"==be&&""!=ke&&(Ht.attributes=' class="'+this.esc_attr(ke)+'"'),nt=this.mask_parse(qe,Ht)}!1!==Pe&&lt?(it.group=nt,Se+=this.mask_parse(Pe,it)):Se+=nt}}}if(K.datalist=We>0?Se:"",b.length>0){Ct=[];void 0!==it&&void 0!==it.group_id&&We>0&&(Ct.list=it.group_id),""===this.get_object_meta_value(t,"aria_label",!1,!1,!0)&&(u&&-1!==x.indexOf("#attributes")?Ct.aria_labelledby=this.form_id_prefix+"label-"+t.id+l:Ct.aria_label=t.label),se&&(Ct.aria_describedby=ie),!1!==(A=this.get_field_value_fallback(t.type,m,"class_field",!1,!1,h))&&(Ct.class=A.join(" ")),""!=$&&(Ct.class+=" "+$.trim()),""!=(ve=this.get_attributes(t,b,Ct,i)).attributes&&(K.attributes+=" "+ve.attributes)}if(je.length>0){Ct=[];var Zt=this.get_field_value_fallback(t.type,m,"class_field_label",!1,!1,h);!1!==Zt&&(Ct.class=Zt.join(" ")),""!=(ve=this.get_attributes(t,je,Ct,i)).attributes&&(re.attributes+=" "+ve.attributes)}if(_e.help_append_separator=se?this.mask_parse(W,_e):"",""!=F){_e.text_clear=this.get_object_meta_value(t,"text_clear",""),""==_e.text_clear&&(_e.text_clear=this.language("clear")),_e.text_reset=this.get_object_meta_value(t,"text_reset",""),""==_e.text_reset&&(_e.text_reset=this.language("reset"));var Gt=this.mask_parse(F,_e)}else Gt="";_e.help_append=Gt,_e.attributes="";var Bt=se||""!=Gt?this.mask_parse(S,_e):"";K.pre_help=re.pre_help="bottom"==le?"":Bt,K.post_help=re.post_help="bottom"==le?Bt:"",K.help=Bt,re.help=Bt,""!=K.attributes&&(K.attributes=" "+K.attributes.trim()),""!=re.attributes&&(re.attributes=" "+re.attributes.trim());var Qt=this.mask_parse(x,re);if(""!=Qt&&!g){var Kt=this.get_field_value_fallback(t.type,m,"mask_field_label_wrapper",!1,!1,h);if(!1!==Kt){var Vt={label:Qt};Qt=this.mask_parse(Kt,Vt)}}var Xt=-1!==x.indexOf("#field");switch(m){case"inside":case"bottom":K.pre_label="",K.post_label=Xt?K.label:Qt;break;case"top":K.pre_label=Xt?K.label:Qt,K.post_label="";break;default:K.pre_label="",K.post_label="",re.pre_label="",re.post_label=""}if(""!==T||""!==z){var ea=e.extend(!0,{},K);ea.invalid_feedback=K.invalid_feedback,ea.pre_help=K.pre_help,ea.post_help=K.post_help,ea.pre_label=K.pre_label,ea.post_label=K.post_label,K.invalid_feedback="",K.pre_help="",K.post_help="",K.pre_label="",K.post_label="",ea.help=K.help,K.help=""}var ta=this.mask_parse(k,K);if(""!==T||""!==z){var aa=this.get_field_value_fallback(t.type,m,"col_small_prepend_factor",!1,!1,h),ra=this.get_field_value_fallback(t.type,m,"col_small_append_factor",!1,!1,h);if(!1!==aa&&!1!==ra){var ia=""!==T?Math.round(Z*aa,0):0;ea.col_small_prepend=ia;var sa=""!==z?Math.round(Z*ra,0):0;ea.col_small_append=sa,ea.col_small_field=Z-(ia+sa)}ea.field=ta;var _a=this.get_field_value_fallback(t.type,m,"mask_field_input_group_field","#field",!1,h);if(""!==_a&&(ta=this.mask_parse(_a,ea)),""!==T){ea.prepend=T;var oa=this.get_field_value_fallback(t.type,m,"mask_field_input_group_prepend","#prepend",!1,h);if(""!==oa)ta=this.mask_parse(oa,ea)+ta}if(""!==z){ea.append=z;var la=this.get_field_value_fallback(t.type,m,"mask_field_input_group_append","#append",!1,h);if(""!==la)ta+=this.mask_parse(la,ea)}var na=this.get_field_value_fallback(t.type,m,"mask_field_input_group","#field",!1,h),ca=[];""!==T&&ca.push("wsf-input-group-has-prepend"),""!==z&&ca.push("wsf-input-group-has-append");var da=ca.join(" ");da&&(da=" "+da),ea.css_input_group=da,ea.field=ta,ta=this.mask_parse(na,ea)}if(Xt&&(re.field=ta,Qt=this.mask_parse(x,re),ta="",re.field=""),-1!==k.indexOf("#label")&&(K.label=Qt,ta=this.mask_parse(k,K),Qt="",K.label=""),""!=ta&&!g){var fa=this.get_field_value_fallback(t.type,m,"mask_field_wrapper",!1,!1,h);if(!1!==fa){var pa={field:ta};ta=this.mask_parse(fa,pa)}}switch(m){case"right":ta+=Qt;break;case"left":ta=Qt+ta;break;default:Xt&&(ta=Qt)}return K.field=ta,this.mask_parse(y,K)},e.WS_Form.prototype.attribute_modify=function(t,a,r,i){var s=this,_=!1,o="";return e("<div "+t+" />").each(function(){e.each(this.attributes,function(){if(this.specified){var e=this.name,t=this.value;e==a&&(i?t+=" "+r:t=r,t.trim(),_=!0),o+=" "+e,""!==t&&(o+='="'+s.esc_attr(t)+'"')}})}),_||(o+=" "+a,""!==r&&(o+='="'+this.esc_attr(r)+'"')),o},e.WS_Form.prototype.get_attributes=function(t,a,r,i){"object"!=typeof r&&(r=!1);var s=[],_=[];if(!1!==a)for(var o in a)if(a.hasOwnProperty(o)){var l=a[o];if(void 0!==e.WS_Form.meta_keys[l]){var n=e.WS_Form.meta_keys[l];if(this.is_admin)var c=void 0!==n.mask?n.mask:"",d=void 0!==n.mask_disregard_on_empty&&n.mask_disregard_on_empty,f=void 0!==n.mask_disregard_on_zero&&n.mask_disregard_on_zero,p=void 0!==n.default?n.default:"";else c=void 0!==n.m?n.m:"",d=void 0!==n.e&&n.e,f=void 0!==n.z&&n.z,p=void 0!==n.d?n.d:"";if(!1!==r)if(void 0!==r[l])var u=r[l].trim();else u="";else{if(this.is_admin)var h=void 0!==n.key?n.key:l;else h=void 0!==n.k?n.k:l;var m=void 0!==n.c&&n.c;if(!1!==m){u=this.get_object_meta_value(t,h,p,!1,!1);u=this.parse_variables_process(u,i,!1,t,m).output}else u=this.get_object_meta_value(t,h,p,!1,!0);if(""==u&&void 0!==n.g){var v=n.g;void 0!==e.WS_Form.settings_plugin[v]&&e.WS_Form.settings_plugin[v]&&(u=e.WS_Form.settings_plugin[v])}_[h]=u}u=this.esc_html(u);var b=this.mask_parse(c,{value:u});(d&&""!=u||!d)&&(f&&0!=parseInt(u,10)||!f)&&(s.push(b),delete a[o])}}return a=this.array_remove_empty(a),{attributes:s.join(" "),mask_attributes:a,attribute_values:_}},e.WS_Form.prototype.get_number=function(t,a,r,i){if(void 0===a&&(a=0),void 0===r&&(r=!0),void 0===i&&(i=!1),"number"==typeof t&&(t=t.toString()),"string"!=typeof t)return 0;(t=t.trim()).includes(ws_form_settings.currency_symbol)&&(r=!0);var s=e.WS_Form.settings_plugin.price_decimal_separator;if(r){var _=e.WS_Form.settings_plugin.price_thousand_separator,o=ws_form_settings.currency_symbol;t.includes("&")&&(t=this.parse_html_entities(t)),t=t.replace(o,"");var l=new RegExp("[^0-9-"+s+"]","g");if(t=t.replace(l,""),""!==s&&""!==_&&s===_){if(t.slice(-3,-2)===s){var n=t.length-3;t=t.substring(0,n)+"[dec]"+t.substring(n+1)}t=(t=t.replace(_,"")).replace("[dec]",".")}else""!==s&&(t=t.replace(s,"."))}else""!==s&&(t=t.replace(s,"."));var c=""===t.trim()?a:isNaN(t)?a:parseFloat(t);return!1!==i&&(c=this.get_number_rounded(parseFloat(c),i)),c},e.WS_Form.prototype.get_number_rounded=function(e,t){return Number(Math.round(e+"e"+t)+"e-"+t)},e.WS_Form.prototype.get_number_to_step=function(e,t){if(isNaN(t))return e;t||(t=1);var a=1/t;return Math.round(e*a)/a},e.WS_Form.prototype.get_float=function(e,t){return void 0===t&&(t=0),"number"==typeof e&&(e=e.toString()),"string"!=typeof e?0:(e=e.trim(),parseFloat(e))},e.WS_Form.prototype.get_currency=function(){var t={},a=parseInt(e.WS_Form.settings_plugin.price_decimals,10);switch(t.prefix=ws_form_settings.currency_symbol,t.suffix="",e.WS_Form.settings_plugin.currency_position){case"right":t.prefix="",t.suffix=ws_form_settings.currency_symbol;break;case"left_space":t.prefix=ws_form_settings.currency_symbol+" ";break;case"right_space":t.prefix="",t.suffix=" "+ws_form_settings.currency_symbol}return t.decimals=a<0?0:a,t.decimal_separator=e.WS_Form.settings_plugin.price_decimal_separator||".",t.thousand_separator=e.WS_Form.settings_plugin.price_thousand_separator,t},e.WS_Form.prototype.get_price=function(e,t,a){return"number"!=typeof e&&(e=parseFloat(e)),void 0===t&&(t=this.get_currency()),void 0===a&&(a=!0),(a?t.prefix:"")+this.replace_all(this.replace_all(e.toFixed(t.decimals).replace(/\B(?=(\d{3})+(?!\d))/g,"[thousand]"),".",t.decimal_separator),"[thousand]",t.thousand_separator)+(a?t.suffix:"")},e.WS_Form.prototype.get_slug=function(e){return(e=this.parse_html_entities(e.toString())).toString().normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().trim().replace(/\s+/g,"-").replace(/[^\w\-]+/g,"").replace(/\-\-+/g,"-")},e.WS_Form.prototype.parse_html_entities=function(e){var t={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:" ",copy:"©",reg:"®",euro:"€",cent:"¢",pound:"£",yen:"¥",hellip:"…"};return e=(e=e.replace(/&#([0-9]{1,5});/g,function(e,t){var a=parseInt(t,10);return String.fromCharCode(a)})).replace(/&([a-z]+);/gi,function(e,a){return t[a.toLowerCase()]||"&"+a+";"})},e.WS_Form.prototype.form_add_hidden_input=function(t,a,r,i,s,_){var o=e('input[name="'+this.esc_selector(t)+'"]',this.form_canvas_obj);o.length&&-1===t.indexOf("[]")?o.val(a):(void 0===a&&(a=""),void 0===r&&(r=!1),void 0===i&&(i=!1),void 0===s&&(s=!1),void 0===_&&(_="hidden"),this.form_canvas_obj.append('<input type="'+this.esc_attr(_)+'" name="'+this.esc_attr(t)+'" value='+(s?"'":'"')+this.esc_attr(a)+(s?"'":'"')+(!1!==r?' id="'+this.esc_attr(r)+'"':"")+(!1!==i?" "+i:"")+" />"))},e.WS_Form.prototype.get_part_id=function(e,t,a){void 0===t&&(t=!1),void 0===a&&(a="field");var r=!1!==t?"-repeat-"+t:"";return this.form_id_prefix+a+"-"+e+r},e.WS_Form.prototype.get_field_name=function(e,t,a){void 0===t&&(t=!1),void 0===a&&(a=!1);return this.field_name_prefix+e+(!1!==t?a?"_"+t:"["+t+"]":"")},e.WS_Form.prototype.is_iterable=function(e){return null!=e&&("object"==typeof e&&"function"==typeof e[Symbol.iterator])},e.WS_Form.prototype.is_integer=function(e){return!isNaN(e)&&/^\d+\.?\d*$/.test(e)},e.WS_Form.prototype.is_invalid=function(e){return!e[0]||!e[0].validity||!e[0].validity.valid},e.WS_Form.prototype.is_valid=function(e){return!(!e[0]||!e[0].validity)&&e[0].validity.valid},e.WS_Form.prototype.is_not_number=function(e){return isNaN(e)||"boolean"==typeof e||""===e},e.WS_Form.prototype.is_true=function(e){if("boolean"==typeof e)return e;if("object"==typeof e&&null!==e&&(e=Array.isArray(e)?void 0!==e[0]?e[0]:"":Object.values(e)[0]||""),"number"==typeof e&&(e=String(e)),"string"!=typeof e)return!1;e=e.trim().toLowerCase();return["1","on","yes","true"].includes(e)},e.WS_Form.prototype.replace_all=function(e,t,a){return void 0===a?e.toString():e.split(t).join(a)},e.WS_Form.prototype.array_remove_empty=function(e){if("object"!=typeof e)return e;var t=[];for(var a in e)e.hasOwnProperty(a)&&null!==e[a]&&t.push(e[a]);return t},e.WS_Form.prototype.attribute_add_item=function(e,t,a){var r=e.attr(t);void 0!==r?-1===r.indexOf(a)&&e.attr(t,this.esc_attr(a)+(r?" ":"")+r):e.attr(t,this.esc_attr(a))},e.WS_Form.prototype.attribute_remove_item=function(e,t,a){var r=e.attr(t);if(void 0!==r&&-1!==r.indexOf(a)){var i=r.split(" "),s=this;(r=(i=i.filter(function(e){return e!==s.esc_attr(a)})).join(" "))?e.attr(t,r):e.removeAttr(t)}},e.WS_Form.prototype.get_date=function(e,t,a,r){switch(t||(t="date"),a||(a=ws_form_settings.date_format),r||(r=ws_form_settings.time_format),t){case"time":return new Date("01/01/1970 "+e);case"date":e+=" 00:00:00";break;case"week":case"month":return!1}var i=!1;switch(a){case"d/m/Y":i="/";break;case"d.m.Y":case"j.n.Y":i=".";break;case"d-m-Y":i="-"}if(!1!==i){switch(t){case"datetime-local":var s=e.indexOf(" "),_=e.substring(0,s),o=e.substring(s);break;default:_=e,o=""}var l=_.split(i);if(3===l.length){var n=parseInt(l[0],10);_=parseInt(l[1],10)+"/"+n+"/"+parseInt(l[2],10)}e=_+o}return e=e.replace(/(\d+)(st|nd|rd|th)/g,"$1"),e=this.replace_all(e,"."," "),-1!==r.indexOf(" \\h ")&&(e=e.replace(/\b(\d{1,2})\s*h\s*(\d{1,2})\b/gi,"$1:$2")),e=this.replace_all(e,"  "," "),this.get_new_date(e)},e.WS_Form.prototype.get_new_date=function(e){return"-"!=e.charAt(4)||"-"!=e.charAt(7)||"T"==e.charAt(10)||":"!=e.charAt(13)||this.date_valid(e)||(e=e.replace(/-/g,"/")),"-"!=e.charAt(4)||this.date_valid(e)||-1===e.toLowerCase().indexOf("am")&&-1===e.toLowerCase().indexOf("pm")||(e=e.replace(/-/g,"/")),new Date(e)},e.WS_Form.prototype.date_valid=function(e){return e instanceof Date&&!isNaN(e.valueOf())},e.WS_Form.prototype.get_object_row_id=function(e){var t=e.object_row_id;return void 0!==t&&""!=t&&("object"==typeof t?(t=t.map(function(e){return parseInt(e,10)})).length||(t=!1):t=""!==t&&[parseInt(t,10)],t)},e.WS_Form.prototype.get_date_by_type=function(e,t){if(!e)return"";var a=this.get_object_meta_value(t,"format_date",ws_form_settings.date_format);a||(a=ws_form_settings.date_format);var r=this.get_object_meta_value(t,"format_time",ws_form_settings.time_format);r||(r=ws_form_settings.time_format);var i=this.get_object_meta_value(t,"input_type_datetime","date");switch(i){case"datetime-local":case"date":switch(a){case"d/m/Y":var s=-1!==e.indexOf(" ")?[e.substring(0,e.indexOf(" ")),e.substring(e.indexOf(" ")+1)]:[e];e=(_=s[0].split("/"))[1]+"/"+_[0]+"/"+_[2]+(void 0!==s[1]?" "+s[1]:"");break;case"d-m-Y":s=-1!==e.indexOf(" ")?[e.substring(0,e.indexOf(" ")),e.substring(e.indexOf(" ")+1)]:[e];e=(_=s.split("-"))[1]+"/"+_[0]+"/"+_[2]+(void 0!==s[1]?" "+s[1]:"");break;case"d.m.Y":case"j.n.Y":var _;s=-1!==e.indexOf(" ")?[e.substring(0,e.indexOf(" ")),e.substring(e.indexOf(" ")+1)]:[e];e=(_=s[0].split("."))[1]+"/"+_[0]+"/"+_[2]+(void 0!==s[1]?" "+s[1]:"")}}switch("time"!==i&&4===e.indexOf("-")&&-1===e.indexOf(":")&&(e+=" 00:00:00"),i){case"date":return e=this.get_new_date(e),this.date_format(e,a);case"month":return e=this.get_new_date(e),this.date_format(e,"F Y");case"time":return e=this.get_new_date("1970-01-01 "+e),this.date_format(e,r);case"week":return e=this.get_new_date(e),this.language("week")+" "+this.date_format(e,"W, Y");default:return e=this.get_new_date(e),this.date_format(e,a+" "+r)}},e.WS_Form.prototype.number_format=function(e,t,a,r){if(void 0===e||null==e||!isFinite(e))return 0;if(!t){var i=e.toString().split(".").length;t=i>1?i:0}void 0===a&&(a="."),void 0===r&&(r=","),(t<0||t>100)&&(t=0);var s=(e=(e=parseFloat(e).toFixed(t)).replace(".",a)).split(a);return s[0]=s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,r),e=s.join(a)},e.WS_Form.prototype.get_full_name_components=function(t){if("string"!=typeof t)return{name_prefix:"",first_name:"",name_middle:"",name_last:"",suffix:""};var a=t.trim().split(/\s+/),r="",i="",s="",_="",o="",l=e.WS_Form.settings_form.name.prefixes;"object"!=typeof l&&(l=[]),a.length&&l.includes(a[0].toLowerCase().replace(/\./g,""))&&(r=a.shift());var n=e.WS_Form.settings_form.name.suffixes;return"object"!=typeof n&&(l=[]),a.length>1&&n.includes(a[a.length-1].toLowerCase().replace(/\./g,""))&&(i=a.pop()),1===a.length?s=a[0]:2===a.length?(s=a[0],o=a[1]):a.length>2&&(s=a[0],o=a[a.length-1],_=a.slice(1,-1).join(" ")),{name_prefix:r,name_first:s,name_middle:_,name_last:o,name_suffix:i}},e.WS_Form.prototype.date_format=function(e,t){var a=this,r=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],i=["January","February","March","April","May","June","July","August","September","October","November","December"],s=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],_=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],o={d:function(){var e=this.getDate();return(e<10?"0":"")+e},D:function(){return s[this.getDay()]},j:function(){return this.getDate()},l:function(){return _[this.getDay()]},N:function(){var e=this.getDay();return 0===e?7:e},S:function(){var e=this.getDate();return e%10==1&&11!==e?"st":e%10==2&&12!==e?"nd":e%10==3&&13!==e?"rd":"th"},w:function(){return this.getDay()},z:function(){var e=new Date(this.getFullYear(),0,1);return Math.ceil((this-e)/864e5)},W:function(){var e=new Date(this.valueOf()),t=(this.getDay()+6)%7;e.setDate(e.getDate()-t+3);var a=e.valueOf();e.setMonth(0,1),4!==e.getDay()&&e.setMonth(0,1+(4-e.getDay()+7)%7);var r=1+Math.ceil((a-e)/6048e5);return r<10?"0"+r:r},F:function(){return i[this.getMonth()]},m:function(){var e=this.getMonth();return(e<9?"0":"")+(e+1)},M:function(){return r[this.getMonth()]},n:function(){return this.getMonth()+1},t:function(){var e=this.getFullYear(),t=this.getMonth()+1;return 12===t&&(e=e++,t=0),new Date(e,t,0).getDate()},L:function(){var e=this.getFullYear();return e%400==0||e%100!=0&&e%4==0},o:function(){var e=new Date(this.valueOf());return e.setDate(e.getDate()-(this.getDay()+6)%7+3),e.getFullYear()},Y:function(){return this.getFullYear()},y:function(){return(""+this.getFullYear()).slice(2)},a:function(){return this.getHours()<12?"am":"pm"},A:function(){return this.getHours()<12?"AM":"PM"},B:function(){return Math.floor(1e3*((this.getUTCHours()+1)%24+this.getUTCMinutes()/60+this.getUTCSeconds()/3600)/24)},g:function(){return this.getHours()%12||12},G:function(){return this.getHours()},h:function(){var e=this.getHours();return((e%12||12)<10?"0":"")+(e%12||12)},H:function(){var e=this.getHours();return(e<10?"0":"")+e},i:function(){var e=this.getMinutes();return(e<10?"0":"")+e},s:function(){var e=this.getSeconds();return(e<10?"0":"")+e},v:function(){var e=this.getMilliseconds();return(e<10?"00":e<100?"0":"")+e},e:function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},I:function(){for(var e=null,t=0;t<12;++t){var a=new Date(this.getFullYear(),t,1).getTimezoneOffset();if(null===e)e=a;else{if(a<e){e=a;break}if(a>e)break}}return this.getTimezoneOffset()===e|0},O:function(){var e=this.getTimezoneOffset();return(-e<0?"-":"+")+(Math.abs(e/60)<10?"0":"")+Math.floor(Math.abs(e/60))+(0===Math.abs(e%60)?"00":(Math.abs(e%60)<10?"0":"")+Math.abs(e%60))},P:function(){var e=this.getTimezoneOffset();return(-e<0?"-":"+")+(Math.abs(e/60)<10?"0":"")+Math.floor(Math.abs(e/60))+":"+(0===Math.abs(e%60)?"00":(Math.abs(e%60)<10?"0":"")+Math.abs(e%60))},T:function(){var e=this.toLocaleTimeString(navigator.language,{timeZoneName:"short"}).split(" ");return e[e.length-1]},Z:function(){return 60*-this.getTimezoneOffset()},c:function(){return a.date_format(e,"Y-m-d\\TH:i:sP")},r:function(){return this.toString()},U:function(){return Math.floor(this.getTime()/1e3)}};return t.replace(/(\\?)(.)/g,function(t,a,r){return""===a&&o[r]?o[r].call(e):r})}}(jQuery);
// source --> https://vr-bau-service.de/wp-content/plugins/ws-form/public/js/ws-form-public-captcha.min.js?ver=1.10.87 
!function(a){"use strict";a.WS_Form.prototype.form_recaptcha=function(){var t=this,e=a("[data-recaptcha]",this.form_canvas_obj);if(!e.length)return!1;if(!a("#wsf-recaptcha-script-head").length){"var wsf_recaptcha_loaded = false;","function wsf_recaptcha_onload() {","wsf_recaptcha_loaded = true;","}","<\/script>",a("head").append('<script id="wsf-recaptcha-script-head">var wsf_recaptcha_loaded = false;function wsf_recaptcha_onload() {wsf_recaptcha_loaded = true;}<\/script>')}var i=a('[data-recaptcha-type="v3_default"]',this.form_canvas_obj).length?3:2;if(window.grecaptcha||a("#wsf-recaptcha-script-body").length)window.grecaptcha&&(window.wsf_recaptcha_loaded=!0);else{switch(i){case 2:var s='<script id="wsf-recaptcha-script-body" src="https://www.google.com/recaptcha/api.js?onload=wsf_recaptcha_onload&render=explicit" async defer><\/script>';break;case 3:s='<script id="wsf-recaptcha-script-body" src="https://www.google.com/recaptcha/api.js?onload=wsf_recaptcha_onload&render='+a('[data-recaptcha-type="v3_default"]',this.form_canvas_obj).eq(0).attr("data-site-key")+'"><\/script>'}a("body").append(s)}this.recaptchas=[],this.recaptchas_v2_default=[],this.recaptchas_v2_invisible=[],this.recaptchas_v3_default=[],e.each(function(){var e=a(this).attr("name"),i=a(this).attr("id");if(void 0===i||""==i)return!1;var s=a(this).attr("data-site-key");if(void 0===s||""==s)return!1;var c=a(this).attr("data-recaptcha-type");void 0!==c&&-1!=["v2_default","v2_invisible","v3_default"].indexOf(c)||(c="default");var r=a(this).attr("data-type");void 0!==r&&-1!=["image","audio"].indexOf(r)||(r="image");var o=a(this).attr("data-language");void 0===o&&(o="");var n=a(this).attr("data-recaptcha-action");switch(void 0!==n&&""!=n||(n="ws_form_loaded_#form_id"),c){case"v2_default":var _=a(this).attr("data-size");void 0!==_&&-1!=["normal","compact","invisible"].indexOf(_)||(_="normal");var l=a(this).attr("data-theme");void 0!==l&&-1!=["light","dark"].indexOf(l)||(l="light");var d=t.get_field_value_fallback("recaptcha",!1,"class_invalid_label",[]),h=t.get_field_value_fallback("recaptcha",!1,"class_invalid_field",[]),p=t.get_field_value_fallback("recaptcha",!1,"class_invalid_invalid_feedback",[]),f=t.get_field_value_fallback("recaptcha",!1,"class_valid_label",[]),v=t.get_field_value_fallback("recaptcha",!1,"class_valid_field",[]),u=t.get_field_value_fallback("recaptcha",!1,"class_valid_invalid_feedback",[]),m=a(this),b=m.closest("[data-id]"),g=a("label",b),y=a("#"+this.form_id_prefix+"invalid-feedback-"+i,b,t.form_canvas_obj),x={sitekey:s,type:r,theme:l,size:_,callback:function(a){g.addClass(f.join(" ")),g.removeClass(d.join(" ")),m.addClass(v.join(" ")),m.removeClass(h.join(" ")),m.removeAttr("data-captcha-invalid"),y.addClass(u.join(" ")),y.removeClass(p.join(" ")),t.recaptcha_conditions_run(),t.form_validate_real_time_process(!1,!1)},"expired-callback":function(){g.addClass(d.join(" ")),g.removeClass(f.join(" ")),m.addClass(h.join(" ")),m.removeClass(v.join(" ")),m.attr("data-captcha-invalid",""),y.addClass(p.join(" ")),y.removeClass(u.join(" ")),t.recaptcha_conditions_run(),t.form_validate_real_time_process(!1,!1)},"error-callback":function(){g.addClass(d.join(" ")),g.removeClass(f.join(" ")),m.addClass(h.join(" ")),m.removeClass(v.join(" ")),m.attr("data-captcha-invalid",""),y.addClass(p.join(" ")),y.removeClass(u.join(" ")),t.recaptcha_conditions_run(),t.form_validate_real_time_process(!1,!1)}};""!=o&&(x.hl=o);var w={id:!1,recaptcha_site_key:s,name:e,recaptcha_id:i,config:x,recaptcha_recaptcha_type:c,type:"v2_default"};t.recaptchas_v2_default.push(w),t.recaptcha_process(w);break;case"v2_invisible":var j=a(this).attr("data-badge");void 0!==j&&-1!=["bottomright","bottomleft","inline"].indexOf(j)||(j="bottomright");x={sitekey:s,badge:j,size:"invisible",callback:function(){t.recaptcha_conditions_run(),t.form_validate_real_time_process(!1,!1),t.form_post("submit")},"expired-callback":function(){t.recaptcha_conditions_run(),t.form_validate_real_time_process(!1,!1)},"error-callback":function(){t.error("error_recaptcha_v2_invisible"),t.recaptcha_conditions_run(),t.form_validate_real_time_process(!1,!1)}};""!=o&&(x.hl=o);w={id:!1,recaptcha_site_key:s,name:e,recaptcha_id:i,config:x,recaptcha_recaptcha_type:c,type:"v2_invisible"};t.recaptchas_v2_invisible.push(w),t.recaptcha_process(w);break;case"v3_default":w={id:!1,recaptcha_site_key:s,name:e,recaptcha_id:i,config:x={action:n=t.parse_variables_process(n).output},recaptcha_recaptcha_type:c,type:"v3_default"};t.recaptchas_v3_default.push(w),t.recaptcha_process(w)}})},a.WS_Form.prototype.recaptcha_conditions_run=function(){for(var a in this.recaptchas_conditions)this.recaptchas_conditions.hasOwnProperty(a)&&this.recaptchas_conditions[a]()},a.WS_Form.prototype.recaptcha_process=function(t,e){var i=this;if(void 0===e&&(e=(new Date).getTime()),(new Date).getTime()-e>this.timeout_recaptcha)return this.error("error_timeout_recaptcha"),!1;if(wsf_recaptcha_loaded&&a("#"+t.recaptcha_id).length){switch(t.type){case"v2_default":case"v2_invisible":var s=grecaptcha.render(t.recaptcha_id,t.config);t.id=s,this.form_validate_real_time_process(!1,!1);break;case"v3_default":a('[name="g-recaptcha-response"]',i.form_canvas_obj).length||i.form_add_hidden_input("g-recaptcha-response")}this.recaptchas.push(t),this.recaptcha_conditions_run()}else{i=this;setTimeout(function(){i.recaptcha_process(t,e)},this.timeout_interval)}},a.WS_Form.prototype.recaptcha_v2_invisible_execute=function(){for(var a in this.recaptchas_v2_invisible)if(this.recaptchas_v2_invisible.hasOwnProperty(a)){var t=this.recaptchas_v2_invisible[a].id;grecaptcha.execute(t),this.form_validate_real_time_process(!1,!1)}},a.WS_Form.prototype.recaptcha_reset=function(){for(var a in this.recaptchas)if(this.recaptchas.hasOwnProperty(a)){var t=this.recaptchas[a];switch(t.recaptcha_recaptcha_type){case"v3_default":break;default:var e=t.id;!1!==e&&grecaptcha.reset(e)}}},a.WS_Form.prototype.recaptcha_v3_default_execute=function(){for(var a in this.recaptchas_v3_default)if(this.recaptchas_v3_default.hasOwnProperty(a)){var t=this.recaptchas_v3_default[a];this.recaptcha_v3_default_execute_single(t)}},a.WS_Form.prototype.recaptcha_v3_default_execute_single=function(t){var e=this;grecaptcha.execute(t.recaptcha_site_key,t.config).then(function(t){a('[name="g-recaptcha-response"]',e.form_canvas_obj).val(t),e.form_validate_real_time_process(!1,!1),e.form_post("submit")})},a.WS_Form.prototype.recaptcha_get_response_by_name=function(a){for(var t in this.recaptchas)if(this.recaptchas.hasOwnProperty(t)){var e=this.recaptchas[t],i=e.id;if(e.name==a&&!1!==i)return grecaptcha.getResponse(i)}return""},a.WS_Form.prototype.form_hcaptcha=function(){var t=this,e=a("[data-hcaptcha]",this.form_canvas_obj);if(!e.length)return!1;if(!a("#wsf-hcaptcha-script-head").length){"var wsf_hcaptcha_loaded = false;","function wsf_hcaptcha_onload() {","wsf_hcaptcha_loaded = true;","}","<\/script>",a("head").append('<script id="wsf-hcaptcha-script-head">var wsf_hcaptcha_loaded = false;function wsf_hcaptcha_onload() {wsf_hcaptcha_loaded = true;}<\/script>')}if(!window.hcaptcha&&!a("#wsf-hcaptcha-script-body").length){a("body").append('<script id="wsf-hcaptcha-script-body" src="https://js.hcaptcha.com/1/api.js?onload=wsf_hcaptcha_onload&render=explicit&recaptchacompat=off" async defer><\/script>')}this.hcaptchas=[],this.hcaptchas_default=[],this.hcaptchas_invisible=[],e.each(function(){var e=a(this).attr("name"),i=a(this).attr("id");if(void 0===i||""==i)return!1;var s=a(this).attr("data-site-key");if(void 0===s||""==s)return!1;var c=a(this).attr("data-hcaptcha-type");void 0!==c&&-1!=["default","invisible"].indexOf(c)||(c="default");var r=a(this).attr("data-language");switch(void 0===r&&(r=""),c){case"default":var o=a(this).attr("data-size");void 0!==o&&-1!=["normal","compact"].indexOf(o)||(o="normal");var n=a(this).attr("data-theme");void 0!==n&&-1!=["light","dark"].indexOf(n)||(n="light");var _=t.get_field_value_fallback("hcaptcha",!1,"class_invalid_label",[]),l=t.get_field_value_fallback("hcaptcha",!1,"class_invalid_field",[]),d=t.get_field_value_fallback("hcaptcha",!1,"class_invalid_invalid_feedback",[]),h=t.get_field_value_fallback("hcaptcha",!1,"class_valid_label",[]),p=t.get_field_value_fallback("hcaptcha",!1,"class_valid_field",[]),f=t.get_field_value_fallback("hcaptcha",!1,"class_valid_invalid_feedback",[]),v=a(this),u=v.closest("[data-id]"),m=a("label",u),b=a("#"+this.form_id_prefix+"invalid-feedback-"+i,u,t.form_canvas_obj),g={sitekey:s,type:c,theme:n,size:o,callback:function(a){m.addClass(h.join(" ")),m.removeClass(_.join(" ")),v.addClass(p.join(" ")),v.removeClass(l.join(" ")),v.removeAttr("data-captcha-invalid"),b.addClass(f.join(" ")),b.removeClass(d.join(" ")),t.hcaptcha_conditions_run(),t.form_validate_real_time_process(!1,!1)},"expired-callback":function(){m.addClass(_.join(" ")),m.removeClass(h.join(" ")),v.addClass(l.join(" ")),v.removeClass(p.join(" ")),v.attr("data-captcha-invalid",""),b.addClass(d.join(" ")),b.removeClass(f.join(" ")),t.hcaptcha_conditions_run(),t.form_validate_real_time_process(!1,!1)},"error-callback":function(){m.addClass(_.join(" ")),m.removeClass(h.join(" ")),v.addClass(l.join(" ")),v.removeClass(p.join(" ")),v.attr("data-captcha-invalid",""),b.addClass(d.join(" ")),b.removeClass(f.join(" ")),t.hcaptcha_conditions_run(),t.form_validate_real_time_process(!1,!1)}};""!=r&&(g.hl=r);var y={id:!1,hcaptcha_site_key:s,name:e,hcaptcha_id:i,config:g,type:"default"};t.hcaptchas_default.push(y),t.hcaptcha_process(y);break;case"invisible":var x=a(this).attr("data-badge");void 0!==x&&-1!=["bottomright","bottomleft","inline"].indexOf(x)||(x="bottomright");g={sitekey:s,badge:x,size:"invisible",callback:function(){t.hcaptcha_conditions_run(),t.form_validate_real_time_process(!1,!1),t.form_post("submit")},"expired-callback":function(){t.hcaptcha_conditions_run(),t.form_validate_real_time_process(!1,!1)},"error-callback":function(){t.error("error_hcaptcha_invisible"),t.hcaptcha_conditions_run(),t.form_validate_real_time_process(!1,!1)}};""!=r&&(g.hl=r);y={id:!1,hcaptcha_site_key:s,name:e,hcaptcha_id:i,config:g,type:"invisible"};t.hcaptchas_invisible.push(y),t.hcaptcha_process(y)}})},a.WS_Form.prototype.hcaptcha_conditions_run=function(){for(var a in this.hcaptchas_conditions)this.hcaptchas_conditions.hasOwnProperty(a)&&this.hcaptchas_conditions[a]()},a.WS_Form.prototype.hcaptcha_process=function(t,e){var i=this;if(void 0===e&&(e=(new Date).getTime()),(new Date).getTime()-e>this.timeout_hcaptcha)return this.error("error_timeout_hcaptcha"),!1;if(wsf_hcaptcha_loaded&&a("#"+t.hcaptcha_id).length){switch(t.type){case"default":case"invisible":var s=hcaptcha.render(t.hcaptcha_id,t.config);t.id=s,this.form_validate_real_time_process(!1,!1)}this.hcaptchas.push(t),this.hcaptcha_conditions_run()}else{i=this;setTimeout(function(){i.hcaptcha_process(t,e)},this.timeout_interval)}},a.WS_Form.prototype.hcaptcha_invisible_execute=function(){for(var a in this.hcaptchas_invisible)if(this.hcaptchas_invisible.hasOwnProperty(a)){var t=this.hcaptchas_invisible[a].id;hcaptcha.execute(t),this.form_validate_real_time_process(!1,!1)}},a.WS_Form.prototype.hcaptcha_reset=function(){for(var a in this.hcaptchas)if(this.hcaptchas.hasOwnProperty(a)){var t=this.hcaptchas[a].id;hcaptcha.reset(t)}},a.WS_Form.prototype.hcaptcha_get_response_by_name=function(a){for(var t in this.hcaptchas)if(this.hcaptchas.hasOwnProperty(t)){var e=this.hcaptchas[t],i=e.id;if(e.name==a)return hcaptcha.getResponse(i)}return""},a.WS_Form.prototype.form_turnstile=function(){var t=this,e=a("[data-turnstile]",this.form_canvas_obj);if(!e.length)return!1;if(!a("#wsf-turnstile-script-head").length){"var wsf_turnstile_loaded = false;","function wsf_turnstile_onload() {","wsf_turnstile_loaded = true;","}","<\/script>",a("head").append('<script id="wsf-turnstile-script-head">var wsf_turnstile_loaded = false;function wsf_turnstile_onload() {wsf_turnstile_loaded = true;}<\/script>')}if(!window.turnstile&&!a("#wsf-turnstile-script-body").length){a("body").append('<script id="wsf-turnstile-script-body" src="https://challenges.cloudflare.com/turnstile/v0/api.js?onload=wsf_turnstile_onload&render=explicit" async defer><\/script>')}this.turnstiles=[],this.turnstiles_default=[],e.each(function(){var e=a(this).attr("name"),i=a(this).attr("id");if(void 0===i||""==i)return!1;var s=a(this).attr("data-site-key");if(void 0===s||""==s)return!1;var c=a(this).attr("data-theme");void 0!==c&&-1!=["light","dark","auto"].indexOf(c)||(c="auto");var r=a(this).attr("data-size");void 0!==r&&-1!=["normal","compact"].indexOf(r)||(r="normal");var o=a(this).attr("data-appearance");void 0!==o&&-1!=["always","execute","interaction-only"].indexOf(o)||(o="always");var n=t.get_field_value_fallback("turnstile",!1,"class_invalid_label",[]),_=t.get_field_value_fallback("turnstile",!1,"class_invalid_field",[]),l=t.get_field_value_fallback("turnstile",!1,"class_invalid_invalid_feedback",[]),d=t.get_field_value_fallback("turnstile",!1,"class_valid_label",[]),h=t.get_field_value_fallback("turnstile",!1,"class_valid_field",[]),p=t.get_field_value_fallback("turnstile",!1,"class_valid_invalid_feedback",[]),f=a(this),v=f.closest("[data-id]"),u=a("label",v),m=a("#"+this.form_id_prefix+"invalid-feedback-"+i,v,t.form_canvas_obj),b={id:!1,turnstile_site_key:s,name:e,turnstile_id:i,config:{sitekey:s,theme:c,size:r,appearance:o,callback:function(a){u.addClass(d.join(" ")),u.removeClass(n.join(" ")),f.addClass(h.join(" ")),f.removeClass(_.join(" ")),f.removeAttr("data-captcha-invalid"),m.addClass(p.join(" ")),m.removeClass(l.join(" ")),t.turnstile_conditions_run(),t.form_validate_real_time_process(!1,!1)},"expired-callback":function(){u.addClass(n.join(" ")),u.removeClass(d.join(" ")),f.addClass(_.join(" ")),f.removeClass(h.join(" ")),f.attr("data-captcha-invalid",""),m.addClass(l.join(" ")),m.removeClass(p.join(" ")),t.turnstile_conditions_run(),t.form_validate_real_time_process(!1,!1)},"error-callback":function(){u.addClass(n.join(" ")),u.removeClass(d.join(" ")),f.addClass(_.join(" ")),f.removeClass(h.join(" ")),m.addClass(l.join(" ")),m.removeClass(p.join(" ")),f.attr("data-captcha-invalid",""),t.turnstile_conditions_run(),t.form_validate_real_time_process(!1,!1)}},type:"default"};t.turnstiles_default.push(b),t.turnstile_process(b)})},a.WS_Form.prototype.turnstile_conditions_run=function(){for(var a in this.turnstiles_conditions)this.turnstiles_conditions.hasOwnProperty(a)&&this.turnstiles_conditions[a]()},a.WS_Form.prototype.turnstile_process=function(t,e){var i=this;if(void 0===e&&(e=(new Date).getTime()),(new Date).getTime()-e>this.timeout_turnstile)return this.error("error_timeout_turnstile"),!1;if(wsf_turnstile_loaded&&a("#"+t.turnstile_id).length){var s=turnstile.render("#"+t.turnstile_id,t.config);t.id=s,this.form_validate_real_time_process(!1,!1),this.turnstiles.push(t),this.turnstile_conditions_run()}else{i=this;setTimeout(function(){i.turnstile_process(t,e)},this.timeout_interval)}},a.WS_Form.prototype.turnstile_reset=function(){for(var a in this.turnstiles)if(this.turnstiles.hasOwnProperty(a)){var t=this.turnstiles[a].id;turnstile.reset(t)}},a.WS_Form.prototype.turnstile_get_response_by_name=function(a){for(var t in this.turnstiles)if(this.turnstiles.hasOwnProperty(t)){var e=this.turnstiles[t],i=e.id;if(e.name==a)return turnstile.getResponse(i)}return""},a.WS_Form.prototype.form_captchafox=function(){var t=this,e=a("[data-captchafox]",this.form_canvas_obj);if(!e.length)return!1;if(!a("#wsf-captchafox-script-head").length){"var wsf_captchafox_loaded = false;","function wsf_captchafox_onload() {","wsf_captchafox_loaded = true;","}","<\/script>",a("head").append('<script id="wsf-captchafox-script-head">var wsf_captchafox_loaded = false;function wsf_captchafox_onload() {wsf_captchafox_loaded = true;}<\/script>')}if(!window.captchafox&&!a("#wsf-captchafox-script-body").length){a("body").append('<script id="wsf-captchafox-script-body" src="https://cdn.captchafox.com/api.js?onload=wsf_captchafox_onload&render=explicit" async defer><\/script>')}this.captchafoxes=[],this.captchafoxes_default=[],e.each(function(){var e=a(this).attr("name"),i=a(this).attr("id");if(void 0===i||""==i)return!1;var s=a(this).attr("data-site-key");if(void 0===s||""==s)return!1;var c=a(this).attr("data-theme");void 0!==c&&-1!=["light","dark"].indexOf(c)||(c="auto");var r=a(this).attr("data-mode");void 0!==r&&-1!=["inline","popup","hidden"].indexOf(r)||(r="inline");var o=t.get_field_value_fallback("captchafox",!1,"class_invalid_label",[]),n=t.get_field_value_fallback("captchafox",!1,"class_invalid_field",[]),_=t.get_field_value_fallback("captchafox",!1,"class_invalid_invalid_feedback",[]),l=t.get_field_value_fallback("captchafox",!1,"class_valid_label",[]),d=t.get_field_value_fallback("captchafox",!1,"class_valid_field",[]),h=t.get_field_value_fallback("captchafox",!1,"class_valid_invalid_feedback",[]),p=a(this),f=p.closest("[data-id]"),v=a("label",f),u=a("#"+this.form_id_prefix+"invalid-feedback-"+i,f,t.form_canvas_obj);switch(r){case"inline":case"popup":var m={id:!1,captchafox_site_key:s,name:e,captchafox_id:i,config:{sitekey:s,mode:r,theme:c,onVerify:function(a){v.addClass(l.join(" ")),v.removeClass(o.join(" ")),p.addClass(d.join(" ")),p.removeClass(n.join(" ")),p.removeAttr("data-captcha-invalid"),u.addClass(h.join(" ")),u.removeClass(_.join(" ")),t.captchafox_conditions_run(),t.form_validate_real_time_process(!1,!1)},onExpire:function(){v.addClass(o.join(" ")),v.removeClass(l.join(" ")),p.addClass(n.join(" ")),p.removeClass(d.join(" ")),p.attr("data-captcha-invalid",""),u.addClass(_.join(" ")),u.removeClass(h.join(" ")),t.captchafox_conditions_run(),t.form_validate_real_time_process(!1,!1)},onError:function(){v.addClass(o.join(" ")),v.removeClass(l.join(" ")),p.addClass(n.join(" ")),p.removeClass(d.join(" ")),p.attr("data-captcha-invalid",""),u.addClass(_.join(" ")),u.removeClass(h.join(" ")),t.captchafox_conditions_run(),t.form_validate_real_time_process(!1,!1)}},type:"default"};t.captchafoxes_default.push(m),t.captchafox_process(m);break;case"hidden":m={id:!1,captchafox_site_key:s,name:e,captchafox_id:i,config:{sitekey:s,mode:r,onVerify:function(a){p.removeAttr("data-captcha-invalid"),t.captchafox_conditions_run(),t.form_validate_real_time_process(!1,!1),setTimeout(function(){t.form_post("submit")},0)},onExpire:function(){p.attr("data-captcha-invalid",""),t.captchafox_conditions_run(),t.form_validate_real_time_process(!1,!1)},onError:function(){p.attr("data-captcha-invalid",""),t.error("error_captchafox_invisible"),t.captchafox_conditions_run(),t.form_validate_real_time_process(!1,!1)}},type:"default"};t.captchafoxes_invisible.push(m),t.captchafox_process(m)}})},a.WS_Form.prototype.captchafox_conditions_run=function(){for(var a in this.captchafoxes_conditions)this.captchafoxes_conditions.hasOwnProperty(a)&&this.captchafoxes_conditions[a]()},a.WS_Form.prototype.captchafox_process=async function(t,e){var i=this;if(void 0===e&&(e=(new Date).getTime()),(new Date).getTime()-e>this.timeout_captchafox)return this.error("error_timeout_captchafox"),!1;if(wsf_captchafox_loaded&&a("#"+t.captchafox_id).length){var s=await captchafox.render("#"+t.captchafox_id,t.config);t.id=s,this.form_validate_real_time_process(!1,!1),this.captchafoxes.push(t),this.captchafox_conditions_run()}else{i=this;setTimeout(function(){i.captchafox_process(t,e)},this.timeout_interval)}},a.WS_Form.prototype.captchafox_invisible_execute=async function(){for(var a in this.captchafoxes_invisible)if(this.captchafoxes_invisible.hasOwnProperty(a)){var t=this.captchafoxes_invisible[a].id;await captchafox.execute(t);this.form_validate_real_time_process(!1,!1)}},a.WS_Form.prototype.captchafox_reset=function(){for(var a in this.captchafoxes)if(this.captchafoxes.hasOwnProperty(a)){var t=this.captchafoxes[a].id;captchafox.reset(t)}},a.WS_Form.prototype.captchafox_get_response_by_name=function(a){for(var t in this.captchafoxes)if(this.captchafoxes.hasOwnProperty(t)){var e=this.captchafoxes[t],i=e.id;if(e.name==a)return captchafox.getResponse(i)}return""},a.WS_Form.prototype.form_validate_captcha=function(t,e,i){if(0==t.length)return!0;var s=this.get_field_value_fallback(e,!1,"class_invalid_label",[]),c=this.get_field_value_fallback(e,!1,"class_invalid_field",[]),r=this.get_field_value_fallback(e,!1,"class_invalid_invalid_feedback",[]),o=this.get_field_value_fallback(e,!1,"class_valid_label",[]),n=this.get_field_value_fallback(e,!1,"class_valid_field",[]),_=this.get_field_value_fallback(e,!1,"class_valid_invalid_feedback",[]);for(var l in t)if(t.hasOwnProperty(l)){var d=t[l],h=d.id,p=d.name,f=a("#"+d.captcha_id,this.form_canvas_obj);if(void 0===f.attr("data-required-bypass")&&void 0===f.attr("data-required-bypass-section")&&void 0===f.attr("data-required-bypass-group")){var v=a('[name="'+this.esc_selector(p)+'"]',i),u=v.closest("[data-id]"),m=a("label",u),b=a("#"+this.form_id_prefix+"invalid-feedback-"+h,i),g="";switch(e){case"recaptcha":g=grecaptcha.getResponse(h);break;case"hcaptcha":g=hcaptcha.getResponse(h);break;case"turnstile":g=turnstile.getResponse(h);break;case"captchafox":g=captchafox.getResponse(h)}if(!g)return m.addClass(s.join(" ")),m.removeClass(o.join(" ")),v.addClass(c.join(" ")),v.removeClass(n.join(" ")),v.attr("data-captcha-invalid",""),b.addClass(r.join(" ")),b.removeClass(_.join(" ")),{object_focus:v,group_index_focus:this.get_group_index(u)};m.addClass(o.join(" ")),m.removeClass(s.join(" ")),v.addClass(n.join(" ")),v.removeClass(c.join(" ")),v.removeAttr("data-captcha-invalid"),b.addClass(_.join(" ")),b.removeClass(r.join(" "))}}return!0},a.WS_Form.prototype.form_validate_silent_captchas=function(t,e,i){if(0==t.length)return!0;for(var s in t)if(t.hasOwnProperty(s)){var c=t[s];if(!1===c.id)return!1;var r=c.captcha_id,o=a("#"+r,i);if(void 0===o.attr("data-required-bypass")&&void 0===o.attr("data-required-bypass-section")&&void 0===o.attr("data-required-bypass-group")){var n="";switch(e){case"recaptcha":n=grecaptcha.getResponse(c.id);break;case"hcaptcha":n=hcaptcha.getResponse(c.id);break;case"turnstile":n=turnstile.getResponse(c.id);break;case"captchafox":n=captchafox.getResponse(c.id)}if(!n)return!1}}return!0}}(jQuery);
// source --> https://vr-bau-service.de/wp-content/plugins/ws-form/public/js/ws-form-public-select.min.js?ver=1.10.87 
!function(e){"use strict";e.WS_Form.prototype.form_select=function(){ws_form_settings.styler_enabled&&e("select:not([multiple]):not([size]):not([data-wsf-select2])",this.form_canvas_obj).each(function(){e(this).after('<span class="wsf-select-arrow"></span>')})},e.WS_Form.prototype.form_select2=function(t){var a=this;void 0===t&&(t=e("[data-wsf-select2]",this.form_canvas_obj)),void 0!==jQuery().select2&&t.each(function(){var t=a.get_field_id(e(this)),s=a.get_field(e(this)),r=a.get_object_meta_value(s,"placeholder_row",""),n=ws_form_settings.locale.substring(0,2),i={};a.form_select2_language_add(i,s,"select2_language_error_loading","errorLoading"),a.form_select2_language_add(i,s,"select2_language_input_too_short","inputTooShort"),a.form_select2_language_add(i,s,"select2_language_input_too_long","inputTooLong"),a.form_select2_language_add(i,s,"select2_language_no_results","noResults"),a.form_select2_language_add(i,s,"select2_language_searching","searching"),Object.keys(i).length&&(n=i);var o=ws_form_settings.url_ajax+"field/"+t+"/select-ajax/",l={templateSelection:function(t){return void 0!==t.data_price&&e(t.element).attr("data-price",t.data_price),t.text},allowClear:!0,placeholder:r,language:n,selectionCssClass:"wsf-select2-selection",dropdownCssClass:"wsf-select2-dropdown",dropdownParent:e(this).parent()},_=a.get_object_meta_value(s,"select2_minimum_input_length","");""!=_&&(l.minimumInputLength=parseInt(_,10));var c=a.get_object_meta_value(s,"select2_maximum_input_length","");""!=c&&(l.maximumInputLength=parseInt(c,10));var d=a.get_object_meta_value(s,"select2_theme","");if(""!=d&&(l.theme=d),!("on"==a.get_object_meta_value(s,s.type+"_cascade",""))&&"on"==a.get_object_meta_value(s,"select2_ajax","")){var m=e(this);l.ajax={url:o,dataType:"json",data:function(t){var s={id:a.form_id,preview:a.form_canvas_obj[0].hasAttribute("data-preview"),keyword:t.term};if(void 0!==e(this).attr("data-wsf-populate")){var r=e(this).attr("data-wsf-populate");""!==r&&(s.value=r),void 0===e(this).attr("data-cascade-ajax")&&e(this).removeAttr("data-wsf-populate")}return ws_form_settings.wsf_nonce&&(s[ws_form_settings.wsf_nonce_field_name]=ws_form_settings.wsf_nonce),ws_form_settings.x_wp_nonce&&(s._wpnonce=ws_form_settings.x_wp_nonce),s},processResults:function(e){return e.results&&e.results.length?m.attr("data-select2-ajax-results",""):m.removeAttr("data-select2-ajax-results"),m.trigger("wsf-select2-ajax-results"),e},delay:250,cache:!0}}var u,p="on"==a.get_object_meta_value(s,"multiple",""),f="on"==a.get_object_meta_value(s,"select2_tags","");(p&&f&&(l.tags=!0),u=e(this).closest('[data-type="select"]').attr("data-select-max"))&&((u=parseInt(u,10))>0&&(l.maximumSelectionLength=u));var g=e(this).select2(l);g.on("select2:open",function(t){var a=e(".select2-search__field",e(this).parent());a.length&&a.get(0).focus()});var h=void 0!==e(this).attr("data-wsf-populate")?e(this).attr("data-wsf-populate"):"";if(""!==h){var v=new FormData;v.append("id",a.form_id),v.append("preview",a.form_canvas_obj[0].hasAttribute("data-preview")),v.append("value",h),a.api_call("field/"+t+"/select-ajax/","GET",v,function(t){if(t.results){for(var a in t.results)if(t.results.hasOwnProperty(a)){var s=t.results[a];if(void 0!==s.children){var r=e("<optgroup>");r.attr("label",s.text);var n=g.append(r);for(var i in s.children)if(s.children.hasOwnProperty(i)){var o=s.children[i];(l=e("<option>")).attr("value",o.id).attr("selected","").html(o.text),n.append(l)}}else{var l;(l=e("<option>")).attr("value",s.id).attr("selected","").html(s.text),g.append(l)}}g.trigger("change")}})}})},e.WS_Form.prototype.form_select2_language_add=function(e,t,a,s){var r=this.get_object_meta_value(t,a,"");if(""!=r){var n=this;e[s]=function(e){var t={};switch(s){case"searching":t.term=void 0!==e.term?e.term:"";break;case"inputTooShort":t.term=void 0!==e.input?e.input:"";var a=e.minimum-e.input.length;t.char_remaining=a,t.char_plural=1!=a?"s":"";break;case"inputTooLong":t.term=void 0!==e.input?e.input:"";var i=e.input.length-e.maximum;t.char_over=i,t.char_plural=1!=i?"s":""}return n.mask_parse(r,t)}}},e.WS_Form.prototype.form_select_min_max=function(){var t=this;e("[data-select-min]:not([data-select-min-max-init]),[data-select-max]:not([data-select-min-max-init])",this.form_canvas_obj).each(function(){var a=e(this).attr("data-select-min"),s=e(this).attr("data-select-max");if(void 0!==a||void 0!==s){var r=e(this).attr("data-id"),n=t.get_section_repeatable_suffix(e(this)),i=e('<input type="number" id="'+t.esc_attr(t.form_id_prefix+"select-min-max-"+r+n)+'" data-select-min-max data-progress-include="change" style="display: none !important;" aria-label="Validator" />',t.form_canvas_obj);void 0!==a&&i.attr("min",a),void 0!==s&&i.attr("max",s),s=parseInt(s,10);var o=e("select option:selected",e(this)).length;i.attr("value",o);var l=t.get_invalid_feedback_obj(e(this));l.length?l.before(i):e(this).append(i),e("select",e(this)).on("change",function(){var a=t.get_field_wrapper(e(this)),s=t.get_field_id(e(this)),r=t.get_section_repeatable_suffix(e(this)),n=e("select option:selected",a).length;e("#"+t.form_id_prefix+"select-min-max-"+s+r,t.form_canvas_obj).val(n).trigger("change")}),e(this).attr("data-select-min-max-init","")}})}}(jQuery);
// source --> https://vr-bau-service.de/wp-content/plugins/ws-form/public/js/ws-form-public.min.js?ver=1.10.87 
!function(t){"use strict";t.WS_Form.prototype.set_is_admin=function(){return!1},t.WS_Form.prototype.init=function(){this.data_cache_build(),this.set_globals()},t.WS_Form.prototype.init_after_get_submit=function(t){this.form_build()},t.WS_Form.prototype.set_globals=function(){if(this.framework_id=t.WS_Form.settings_plugin.framework,this.framework=t.WS_Form.frameworks.types[this.framework_id],t.WS_Form.debug_rendered&&this.debug_info("debug_info_framework",this.framework.name),this.framework_fields=this.framework.fields.public,void 0!==this.form_obj.attr("action")){var e=this.form_obj.attr("action"),i=ws_form_settings.url_ajax_namespace+"/submit",a="rest_route="+encodeURIComponent("/"+ws_form_settings.url_ajax_namespace+"/submit");this.form_action_custom=-1===e.indexOf(i)&&-1===e.indexOf(a)}else this.form_action_custom=!0;var r=void 0!==this.framework.fields.public.class_form_validated?this.framework.fields.public.class_form_validated:[];if(this.class_validated=r.join(" "),this.selector_validated="."+r.join(",."),ws_form_settings.wsf_hash&&"object"==typeof ws_form_settings.wsf_hash){for(var o in ws_form_settings.wsf_hash)if(ws_form_settings.wsf_hash.hasOwnProperty(o)){var s=ws_form_settings.wsf_hash[o];void 0!==s.id&&void 0!==s.hash&&void 0!==s.token&&s.id==this.form_id&&this.hash_set(s.hash,s.token,!0)}}else this.hash_set(this.cookie_get("hash",""),!1,!0);this.visual_editor=void 0!==this.form_canvas_obj.attr("data-visual-builder");var _=this;if(this.hash){var n="submit/hash/"+this.hash+"/";this.token&&(n+=this.token+"/"),t.WS_Form.this.api_call(n,"GET",!1,function(t){void 0!==t.data&&(_.submit=t.data),_.init_after_get_submit(!0),_.submit=!1},function(t){_.read_json_populate(),_.init_after_get_submit(!1)})}else this.read_json_populate(),this.init_after_get_submit(!1)},t.WS_Form.prototype.read_json_populate=function(){"undefined"!=typeof wsf_form_json_populate&&void 0!==wsf_form_json_populate[this.form_id]&&(this.submit_auto_populate=wsf_form_json_populate[this.form_id])},t.WS_Form.prototype.error=function(t,e,i){void 0===e&&(e=""),void 0===i&&(i="");var a=this.language(t,e,!1).replace(/%s/g,e);return window.console&&window.console.error&&console.error(a),a},t.WS_Form.prototype.form_render=function(){this.recaptchas=[],this.recaptchas_v2_default=[],this.recaptchas_v2_invisible=[],this.recaptchas_v3_default=[],this.recaptchas_conditions=[],this.hcaptchas=[],this.hcaptchas_default=[],this.hcaptchas_invisible=[],this.hcpatchas_conditions=[],this.turnstiles=[],this.turnstiles_default=[],this.turnstiles_conditions=[],this.captchafoxes=[],this.captchafoxes_default=[],this.captchafoxes_invisible=[],this.captchafoxes_conditions=[],this.form.meta.style_id&&void 0===this.form_obj.attr("data-wsf-style-id")&&this.form_obj.attr("data-wsf-style-id",this.form.meta.style_id),this.form_framework(),this.form_preview(),"function"==typeof this.form_tab&&this.form_tab(),this.form_navigation(),this.form_validation(),"function"==typeof this.form_select&&this.form_select(),"function"==typeof this.form_select_min_max&&this.form_select_min_max(),"function"==typeof this.form_checkbox_min_max&&this.form_checkbox_min_max(),"function"==typeof this.form_checkbox_select_all&&this.form_checkbox_select_all(),"function"==typeof this.form_radio_validation&&this.form_radio_validation(),this.form_character_word_count(),"function"==typeof this.form_tel&&this.form_tel(),this.form_honeypot(),"function"==typeof this.form_recaptcha&&this.form_recaptcha(),"function"==typeof this.form_hcaptcha&&this.form_hcaptcha(),"function"==typeof this.form_turnstile&&this.form_turnstile(),"function"==typeof this.form_captchafox&&this.form_captchafox(),"function"==typeof this.form_email&&this.form_email(),this.form_label(),this.form_css_var(),"function"==typeof this.form_consent&&this.form_consent(),this.form_required(),this.form_inputmask(),this.form_transform(),this.form_bypass_enabled=!0,this.form_bypass(!1),this.form_validate_real_time(),"function"==typeof this.form_tab_validation&&this.form_tab_validation(),this.form_accessibility(),this.trigger("rendered"),this.form_obj.attr("data-wsf-rendered",""),"function"==typeof this.styler&&this.styler(),"function"==typeof this.styler_scheme&&this.styler_scheme(!this.visual_editor,!0)},t.WS_Form.prototype.trigger=function(e){var i="wsf-"+e;t(document).trigger(i,[this.form,this.form_id,this.form_instance_id,this.form_obj,this.form_canvas_obj,this.group_index]);var a="wsf-"+e+"-instance-"+this.form_instance_id;t(window).trigger(a);var r="wsf-"+e+"-form-"+this.form_id;t(window).trigger(r)},t.WS_Form.prototype.form_framework=function(){if(void 0!==this.framework.form.public&&"object"==typeof this.framework.form.public.attributes)for(var e in this.framework.form.public.attributes){var i=this.framework.form.public.attributes[e];this.form_obj.attr(e,i)}if(void 0!==this.framework.init_js){var a={form_canvas_selector:"#"+this.form_obj_id},r=this.mask_parse(this.framework.init_js,a);try{t.globalEval("(function($) {\n"+r+"\n})(jQuery);")}catch(t){this.error("error_js",r)}}},t.WS_Form.prototype.form_reset=function(t){this.trigger("reset-before"),this.form_canvas_obj.removeClass(this.class_validated),this.form_obj[0].reset(),"function"==typeof this.recaptcha_reset&&this.recaptcha_reset(),"function"==typeof this.hcaptcha_reset&&this.hcaptcha_reset(),"function"==typeof this.turnstile_reset&&this.turnstile_reset(),"function"==typeof this.captchafox_reset&&this.captchafox_reset(),this.trigger("reset-complete")},t.WS_Form.prototype.form_clear=function(){var e=this;for(var i in this.trigger("clear-before"),this.form_canvas_obj.removeClass(this.class_validated),this.field_data_cache)if(this.field_data_cache.hasOwnProperty(i)){var a=this.field_data_cache[i],r=a.id,o=this.field_name_prefix+r,s=t.WS_Form.field_type_cache[a.type],_=void 0!==s.trigger?s.trigger:"change",n=t('[name="'+this.esc_selector(o)+'"], [name^="'+this.esc_selector(o)+'["]',this.form_canvas_obj);switch(a.type){case"checkbox":case"price_checkbox":case"radio":case"price_radio":n.each(function(){t(this).is(":checked")&&t(this).prop("checked",!1).trigger(_)});break;case"select":case"price_select":t('[name="'+this.esc_selector(o)+'"], [name^="'+this.esc_selector(o)+'["] option',this.form_canvas_obj).each(function(){t(this).is(":selected")&&(t(this).prop("selected",!1),t(this).closest("select").trigger(_))});break;case"textarea":n.each(function(){""!=t(this).val()&&(t(this).val("").trigger(_),"function"==typeof e.textarea_set_value&&e.textarea_set_value(t(this),""))});break;case"color":n.each(function(){""!=t(this).val()&&(t(this).val("").trigger(_),"undefined"!=typeof Coloris&&t(this)[0].dispatchEvent(new Event("input",{bubbles:!0})))});break;case"file":n.each(function(){""!=t(this).val()&&t(this).val("").trigger(_)}),"function"==typeof e.form_file_dropzonejs_populate&&"undefined"!=typeof Dropzone&&t('[name="'+this.esc_selector(o)+'"][data-file-type="dropzonejs"], [name^="'+this.esc_selector(o)+'["][data-file-type="dropzonejs"]',this.form_canvas_obj).each(function(){e.form_file_dropzonejs_populate(t(this),!0)});break;default:n.each(function(){""!=t(this).val()&&t(this).val("").trigger(_)})}}"function"==typeof this.recaptcha_reset&&this.recaptcha_reset(),"function"==typeof this.hcaptcha_reset&&this.hcaptcha_reset(),"function"==typeof this.turnstile_reset&&this.turnstile_reset(),"function"==typeof this.captchafox_reset&&this.captchafox_reset(),this.trigger("clear-complete")},t.WS_Form.prototype.form_reload=function(){for(var e in this.form_events_reset)if(this.form_events_reset.hasOwnProperty(e)){var i=this.form_events_reset[e];i.obj.off(i.event)}this.form_obj.off(),this.form_canvas_obj.off(),this.form_events_reset=[],this.calc=[];var a=this;""!=this.hash?t.WS_Form.this.api_call("submit/hash/"+this.hash,"GET",!1,function(t){a.submit=t.data,a.form_reload_after_get_submit(!0),a.submit=!1},function(t){a.form_reload_after_get_submit(!1)}):(this.submit=!1,this.form_reload_after_get_submit(!1))},t.WS_Form.prototype.form_reload_after_get_submit=function(e){t('[data-wsf-message][data-wsf-instance-id="'+this.form_instance_id+'"]').remove(),this.form_canvas_obj.show(),this.form_canvas_obj.removeClass(this.class_validated),this.form_validation_real_time_hooks=[],this.form_canvas_obj.empty(),this.form_build()},t.WS_Form.prototype.form_hash_clear=function(){this.hash="",this.cookie_clear("hash")},t.WS_Form.prototype.form_transform=function(){var e=this;t("[data-wsf-transform]:not([data-wsf-transform-init])",this.form_canvas_obj).each(function(){t(this).attr("data-wsf-transform-init","");var i=t(this).attr("data-wsf-transform");t(this).on("change input",function(){e.form_transform_process(t(this),i)}),e.form_transform_process(t(this),i)})},t.WS_Form.prototype.form_transform_process=function(t,e){var i=t.val();switch(t.attr("type")){case"email":var a=!1;break;default:a=!0}if(i&&"string"==typeof i){if(a)var r=t[0].selectionStart,o=t[0].selectionEnd;switch(e){case"uc":t.val(i.toUpperCase());break;case"lc":t.val(i.toLowerCase());break;case"capitalize":t.val(this.ucwords(i.toLowerCase()));break;case"sentence":t.val(this.ucfirst(i.toLowerCase()))}a&&t[0].setSelectionRange(r,o)}},t.WS_Form.prototype.form_email=function(){var e=this;t('input[type="email"]:not([data-init-email])',this.form_canvas_obj).each(function(){var i=e.get_field(t(this)),a=e.get_object_meta_value(i,"allow_deny",""),r=e.get_object_meta_value(i,"allow_deny_values",[]);""!==a&&-1!==["allow","deny"].indexOf(a)&&"object"==typeof r&&(e.form_email_allow_deny(t(this)),t(this).on("change",function(){e.form_email_allow_deny(t(this))})),t(this).attr("data-init-email","")})},t.WS_Form.prototype.form_email_allow_deny=function(t){var e=t.val();if(""!=e){var i=this.get_field(t),a=this.get_object_meta_value(i,"allow_deny",""),r=this.get_object_meta_value(i,"allow_deny_values",[]),o="deny"===a;for(var s in r)if(r.hasOwnProperty(s)){var _=r[s].allow_deny_value;new RegExp(_.replace("*",".*")+"$").test(e)&&(o="allow"===a)}if(o)this.set_invalid_feedback(t,"");else{var n=this.get_object_meta_value(i,"allow_deny_message","");n||(n=this.language("error_email_allow_deny_message")),this.set_invalid_feedback(t,n)}}},t.WS_Form.prototype.form_navigation=function(){var e=this,i=this.get_group_count();t('[data-action="wsf-tab_next"]',this.form_canvas_obj).each(function(){t(this).off("click");var a=t(this).closest("[data-group-index]").nextAll(":not([data-wsf-group-hidden])").first();i<=1||!a.length?t(this).prop("disabled",!0).attr("data-wsf-disabled",""):void 0!==t(this).attr("data-wsf-disabled")&&t(this).prop("disabled",!1).removeAttr("data-wsf-disabled"),void 0===t(this).attr("disabled")&&t(this).on("click",function(){var i=e.get_object_meta_value(e.form,"tab_validation"),r=e.get_object_meta_value(e.form,"tab_validation_show");if(i&&r){var o=e.get_group(t(this));o&&void 0===o.attr("data-wsf-validated")?(o.addClass(e.class_validated),e.form_accessibility(),e.get_object_meta_value(e.form,"invalid_field_focus",!0)&&e.get_field_elements(o).each(function(){if(e.is_invalid(t(this)))return t(this).focus().trigger("focus"),!1})):(o.removeClass(this.class_validated),"function"==typeof e.form_tab_group_index_new&&e.form_tab_group_index_new(t(this),a.attr("data-group-index")))}else"function"==typeof e.form_tab_group_index_new&&e.form_tab_group_index_new(t(this),a.attr("data-group-index"))})}),t('[data-action="wsf-tab_previous"]',this.form_canvas_obj).each(function(){t(this).off("click");var a=t(this).closest("[data-group-index]").prevAll(":not([data-wsf-group-hidden])").first();i<=1||!a.length?t(this).prop("disabled",!0).attr("data-wsf-disabled",""):void 0!==t(this).attr("data-wsf-disabled")&&t(this).prop("disabled",!1).removeAttr("data-wsf-disabled"),void 0===t(this).attr("disabled")&&"function"==typeof e.form_tab_group_index_new&&t(this).on("click",function(){e.form_tab_group_index_new(t(this),a.attr("data-group-index"))})}),this.form_canvas_obj.off("click",'[data-action="wsf-save"]').on("click",'[data-action="wsf-save"]',function(){var i=e.get_field(t(this));void 0!==i&&(e.get_object_meta_value(i,"validate_form","")?e.form_post_if_validated("save"):e.form_post("save"))}),this.form_canvas_obj.off("click",'[data-action="wsf-reset"]').on("click",'[data-action="wsf-reset"]',function(t){t.preventDefault(),e.form_reset()}),this.form_canvas_obj.off("click",'[data-action="wsf-clear"]').on("click",'[data-action="wsf-clear"]',function(){e.form_clear()})},t.WS_Form.prototype.get_group_index=function(t){var e=this.get_group(t);if(!1===e)return!1;var i=e.first().attr("data-group-index");return null!=i&&parseInt(i,10)},t.WS_Form.prototype.get_group_count=function(){t(".wsf-group-tabs",this.form_canvas_obj).children(":not([data-wsf-group-hidden])").length},t.WS_Form.prototype.get_group=function(t){if(this.get_group_count()<=1)return!1;var e=t.closest("[data-group-index]");return 0!=e.length&&e},t.WS_Form.prototype.get_group_id=function(t){var e=t.closest("[data-id]").attr("data-id");return void 0!==e&&parseInt(e,10)},t.WS_Form.prototype.get_section=function(t){var e=t.closest("fieldset");return 0!=e.length&&e},t.WS_Form.prototype.get_section_id=function(t){var e=t.closest('[id^="'+this.form_id_prefix+'section-"]').attr("data-id");return void 0!==e&&parseInt(e,10)},t.WS_Form.prototype.get_section_repeatable_index=function(t){var e=t.closest('[id^="'+this.form_id_prefix+'section-"]').attr("data-repeatable-index");return e>0?parseInt(e,10):0},t.WS_Form.prototype.get_section_repeatable_suffix=function(t){var e=this.get_section_repeatable_index(t);return e?"-repeat-"+e:""},t.WS_Form.prototype.get_field_elements=function(e){return t("input,select,textarea",e).filter(':not([data-hidden],[data-hidden-section],[data-hidden-group],[disabled],[type="hidden"])')},t.WS_Form.prototype.get_field=function(t){var e=this.get_field_id(t);return!!e&&this.field_data_cache[e]},t.WS_Form.prototype.get_field_wrapper=function(t){return t.closest("[data-id]")},t.WS_Form.prototype.get_field_id=function(t){var e;return(e=t.closest("[data-type][data-id]").attr("data-id"))?parseInt(e,10):!!(e=t.attr("data-id-hidden"))&&parseInt(e,10)},t.WS_Form.prototype.get_field_type=function(t){var e=t.closest("[data-type]").attr("data-type");return void 0!==e&&e},t.WS_Form.prototype.get_field_object_row_id=function(t){var e=t.closest("[data-row-radio][data-row-id],[data-row-checkbox][data-row-id]");if(0==e.length)return!1;var i=e.attr("data-row-id");return void 0!==i&&parseInt(i,10)},t.WS_Form.prototype.get_label_obj=function(e){var i=this.get_field_id(e),a=this.get_section_repeatable_suffix(e);return t("#"+this.form_id_prefix+"label-"+i+a,this.form_canvas_obj)},t.WS_Form.prototype.get_checkbox_min_max_obj=function(e){var i=this.get_field_id(e),a=this.get_section_repeatable_suffix(e);return t("#"+this.form_id_prefix+"checkbox-min-max-"+i+a,this.form_canvas_obj)},t.WS_Form.prototype.get_checkbox_row_count=function(e){var i=this.get_field_wrapper(e),a=t('[data-row-checkbox]:not([style*="display: none"]) input:not([data-hidden],[data-hidden-section],[data-hidden-group])',i);return a?a.length:0},t.WS_Form.prototype.get_radio_row_count=function(e){var i=this.get_field_wrapper(e),a=t('[data-row-radio]:not([style*="display: none"]) input:not([data-hidden],[data-hidden-section],[data-hidden-group])',i);return a?a.length:0},t.WS_Form.prototype.get_help_obj=function(e){var i=this.get_field_id(e),a=this.get_section_repeatable_suffix(e);return t("#"+this.form_id_prefix+"help-"+i+a,this.form_canvas_obj)},t.WS_Form.prototype.get_invalid_feedback_obj=function(e,i){return t("#"+this.get_invalid_feedback_id(e,i))},t.WS_Form.prototype.get_invalid_feedback_id=function(t,e){var i=this.get_field_id(t),a=this.get_section_repeatable_suffix(t),r=e?"-row-"+e:"";return this.form_id_prefix+"invalid-feedback-"+i+r+a},t.WS_Form.prototype.get_invalid_feedback=function(t){return!(!t.length||void 0===t[0].validationMessage)&&t[0].validationMessage},t.WS_Form.prototype.set_invalid_feedback=function(t,e,i){this.is_not_number(i)&&(i=0),"object"==typeof i&&void 0!==i[0]&&(i=i[0]);var a=this.get_invalid_feedback_obj(t,i),r=this.get_section_id(t),o=this.get_section_repeatable_index(t),s=this.get_field_id(t);!1===e&&(e=a.html()),t.length&&t[0].willValidate&&(""!==e?(void 0===this.validation_message_cache[r]&&(this.validation_message_cache[r]=[]),void 0===this.validation_message_cache[r][o]&&(this.validation_message_cache[r][o]=[]),void 0===this.validation_message_cache[r][o][s]&&(this.validation_message_cache[r][o][s]=[]),this.validation_message_cache[r][o][s][i]=e):void 0!==this.validation_message_cache[r]&&void 0!==this.validation_message_cache[r][o]&&void 0!==this.validation_message_cache[r][o][s]&&void 0!==this.validation_message_cache[r][o][s][i]&&delete this.validation_message_cache[r][o][s][i],t[0].setCustomValidity(e),this.form_validate_real_time_process(!1,!1)),a.length&&(""!==e?(void 0===this.invalid_feedback_cache[r]&&(this.invalid_feedback_cache[r]=[]),void 0===this.invalid_feedback_cache[r][o]&&(this.invalid_feedback_cache[r][o]=[]),void 0===this.invalid_feedback_cache[r][o][s]&&(this.invalid_feedback_cache[r][o][s]=[]),void 0===this.invalid_feedback_cache[r][o][s][i]&&(this.invalid_feedback_cache[r][o][s][i]=a.html()),a.html(e)):void 0!==this.invalid_feedback_cache[r]&&void 0!==this.invalid_feedback_cache[r][o]&&void 0!==this.invalid_feedback_cache[r][o][s]&&void 0!==this.invalid_feedback_cache[r][o][s][i]&&(a.html(this.invalid_feedback_cache[r][o][s][i]),delete this.invalid_feedback_cache[r][o][s][i]))},t.WS_Form.prototype.form_preview=function(){this.form_canvas_obj[0].hasAttribute("data-preview")&&this.form_add_hidden_input("wsf_preview","true")},t.WS_Form.prototype.form_honeypot=function(){if(this.get_object_meta_value(this.form,"honeypot",!1)){var e=""!=this.form.published_checksum?this.form.published_checksum:"honeypot_unpublished_"+this.form_id,i=t.WS_Form.settings_plugin.framework,a=(t.WS_Form.frameworks.types[i],this.framework.fields.public),r=void 0!==a.honeypot_attributes?" "+a.honeypot_attributes.join(" "):"",o='<label for="field_'+e+'" aria-hidden="true" style="position: absolute !important; '+(ws_form_settings.rtl?"right":"left")+': -9999em !important; height: 0 !important; margin: 0 !important; padding: 0 !important;">'+this.esc_html(e)+'<input type="text" id="field_'+this.esc_attr(e)+'" name="field_'+this.esc_attr(e)+'" value="" autocomplete="off" tab-index="-1" style="display: none !important;"'+r+"></label>";this.form_canvas_obj.append(o)}},t.WS_Form.prototype.get_css_var=function(t,e){void 0===e&&(e="");var i=getComputedStyle(this.form_obj[0]);if(!i)return e;var a=i.getPropertyValue(t);return void 0===a?e:a.trim()},t.WS_Form.prototype.form_css_var=function(){switch(this.get_css_var("--wsf-field-label-inside-mode","move")){case"hide":this.form_obj.addClass("wsf-label-position-inside-hide")}switch(this.get_css_var("--wsf-field-border-placement","all")){case"bottom":this.form_obj.addClass("wsf-field-border-placement-bottom")}},t.WS_Form.prototype.form_label=function(e){void 0===e&&(e=this.form_canvas_obj);var i=this;t(".wsf-label-position-inside:not([wsf-label-position-inside-init]):visible",e).each(function(){var e=t(".wsf-input-group-prepend",t(this)),a=t(".iti",t(this));if(e.length&&!a.length){var r=t("label",t(this)),o=parseFloat(r.css("left").replace("px",""))+e.outerWidth();r.css("left",o+"px")}var s=i.get_help_obj(t(this));if(s.length){var _=i.get_field_id(t(this)),n=i.field_data_cache[_];if("top"==i.get_help_position(n)){var c=parseFloat(s.outerHeight()),d=parseFloat(s.css("margin-bottom")),h=(r=i.get_label_obj(t(this)),parseFloat(r.css("top")));h+=c+d,r.css("top",h+"px")}}t(this).attr("wsf-label-position-inside-init","")})},t.WS_Form.prototype.form_required=function(){var e=this;if(!this.get_object_meta_value(this.form,"label_required",!1))return!1;if(""==(i=this.get_object_meta_value(this.form,"label_mask_required","",!0,!0))){var i,a=t.WS_Form.settings_plugin.framework,r=(t.WS_Form.frameworks.types[a],this.framework.fields.public);if(void 0===r.mask_required_label)return!1;if(""==(i=r.mask_required_label))return!1}t("label",this.form_canvas_obj).each(function(){var a=t(this).attr("for");if(void 0!==a){if(!(o=t('[id="'+e.esc_selector(a)+'"]',e.form_canvas_obj)).length)return;if(void 0!==o.attr("data-init-required"))return;var r=void 0!==o.attr("data-required")}else{var o;if(!(o=e.get_checkbox_min_max_obj(t(this))).length)return;r=void 0!==o.attr("min")&&parseInt(o.attr("min"),10)>0}var s=t(this).attr("data-label-required-id");if(void 0!==s&&!1!==s)var _=t("#"+s,e.form_canvas_obj);else _=t(this);var n=t(".wsf-required-wrapper",_);if(!n.length&&r){var c=_.children("div,[name]").first();c.length?c.before('<span class="wsf-required-wrapper"></span>'):_.append('<span class="wsf-required-wrapper"></span>'),n=t(".wsf-required-wrapper",_)}r?(n.html(i),o.attr("data-init-required","")):(n.html(""),o.removeAttr("data-init-required"))})},t.WS_Form.prototype.form_bypass=function(e){if(!this.form_bypass_enabled)return!1;var i=this;t('input[type="number"]:not([step]):not([data-step-bypass])',this.form_canvas_obj).attr("step",1);var a=this.form_bypass_attributes();for(var r in a)if(a.hasOwnProperty(r)){var o=a[r],s=o.bypass,_=o.not,n=void 0!==o.replace&&o.replace;t("["+s+"-group]",this.form_canvas_obj).length&&t('[id^="'+this.form_id_prefix+'group-"]:not([data-wsf-group-hidden]) ['+s+"-group]:not("+_+")",this.form_canvas_obj).attr(r,function(){return t(this).attr(s+"-group")}).removeAttr(s+"-group"),t("["+r+"]",this.form_canvas_obj).length&&t('[id^="'+this.form_id_prefix+'group-"][data-wsf-group-hidden] ['+r+"]:not("+_+",["+s+'-group]), [id^="'+this.form_id_prefix+'group-"][data-wsf-group-hidden] ['+r+"]:not("+_+",["+s+"-group])").attr(s+"-group",function(){return i.form_bypass_hidden(t(this),r,n)}),t("["+s+"]",this.form_canvas_obj).length&&t('[id^="'+this.form_id_prefix+'group-"][data-wsf-group-hidden] ['+s+"]:not("+_+'), [id^="'+this.form_id_prefix+'group-"][data-wsf-group-hidden] ['+s+"]:not("+_+")").attr(s+"-group",function(){return i.form_bypass_visible(t(this),s)}).removeAttr(s),t("["+s+"-section]",this.form_canvas_obj).length&&t('[id^="'+this.form_id_prefix+'section-"]:not([style*="display:none"],[style*="display: none"]) ['+s+"-section]:not("+_+")",this.form_canvas_obj).attr(r,function(){return t(this).attr(s+"-section")}).removeAttr(s+"-section"),t("["+r+"]",this.form_canvas_obj).length&&t('[id^="'+this.form_id_prefix+'section-"][style*="display:none"] ['+r+"]:not("+_+",["+s+'-section]), [id^="'+this.form_id_prefix+'section-"][style*="display: none"] ['+r+"]:not("+_+",["+s+"-section])").attr(s+"-section",function(){return i.form_bypass_hidden(t(this),r,n)}),t("["+s+"]",this.form_canvas_obj).length&&t('[id^="'+this.form_id_prefix+'section-"][style*="display:none"] ['+s+"]:not("+_+'), [id^="'+this.form_id_prefix+'section-"][style*="display: none"] ['+s+"]:not("+_+")").attr(s+"-section",function(){return i.form_bypass_visible(t(this),s)}).removeAttr(s),t("["+s+"]",this.form_canvas_obj).length&&t('[id^="'+this.form_id_prefix+'field-wrapper-"]:not([style*="display:none"],[style*="display: none"]) ['+s+"]:not("+_+")",this.form_canvas_obj).attr(r,function(){return i.form_bypass_visible(t(this),s)}).removeAttr(s),t("["+r+"]",this.form_canvas_obj).length&&t('[id^="'+this.form_id_prefix+'field-wrapper-"][style*="display:none"] ['+r+"]:not("+_+",["+s+']), [id^="'+this.form_id_prefix+'field-wrapper-"][style*="display: none"] ['+r+"]:not("+_+",["+s+"])",this.form_canvas_obj).attr(s,function(){return i.form_bypass_hidden(t(this),r,n)}),t("["+s+"]",this.form_canvas_obj).length&&t('[id^="'+this.form_id_prefix+'field-wrapper-"]:not([style*="display:none"],[style*="display: none"]) [data-row-checkbox]:not([style*="display:none"],[style*="display: none"]) > input[type="checkbox"] ['+s+"]:not("+_+")",this.form_canvas_obj).attr(r,function(){return i.form_bypass_visible(t(this),s)}).removeAttr(s),t("["+r+"]",this.form_canvas_obj).length&&t('[id^="'+this.form_id_prefix+'field-wrapper-"] [data-row-checkbox][style*="display:none"] > input[type="checkbox"]['+r+"]:not("+_+",["+s+']), [id^="'+this.form_id_prefix+'field-wrapper-"] [data-row-checkbox][style*="display: none"] > input[type="checkbox"]['+r+"]:not("+_+",["+s+"])",this.form_canvas_obj).attr(s,function(){return i.form_bypass_hidden(t(this),r,n)}),t("["+s+"]",this.form_canvas_obj).length&&t('[id^="'+this.form_id_prefix+'field-wrapper-"]:not([style*="display:none"],[style*="display: none"]) [data-row-radio]:not([style*="display:none"],[style*="display: none"]) > input[type="radio"] ['+s+"]:not("+_+")",this.form_canvas_obj).attr(r,function(){return i.form_bypass_visible(t(this),s)}).removeAttr(s),t("["+r+"]",this.form_canvas_obj).length&&t('[id^="'+this.form_id_prefix+'field-wrapper-"] [data-row-radio][style*="display:none"] > input[type="radio"]['+r+"]:not("+_+",["+s+']), [id^="'+this.form_id_prefix+'field-wrapper-"] [data-row-radio][style*="display: none"] > input[type="radio"]['+r+"]:not("+_+",["+s+"])",this.form_canvas_obj).attr(s,function(){return i.form_bypass_hidden(t(this),r,n)})}return t('[id^="'+this.form_id_prefix+'group-"]:not([data-wsf-group-hidden])',this.form_canvas_obj).find('[name]:not([type="hidden"]),[data-static],[data-recaptcha],[data-hcaptcha],[data-turnstile],[data-captchafox]').each(function(){i.form_bypass_process(t(this),"-group",!1)}),t('[id^="'+this.form_id_prefix+'group-"][data-wsf-group-hidden]',this.form_canvas_obj).find('[name]:not([type="hidden"]),[data-static],[data-recaptcha],[data-hcaptcha],[data-turnstile],[data-captchafox]').each(function(){i.form_bypass_process(t(this),"-group",!0)}),t('[id^="'+this.form_id_prefix+'section-"]:not([style*="display:none"],[style*="display: none"])',this.form_canvas_obj).find('[name]:not([type="hidden"],[data-hidden-group]),[data-static],[data-recaptcha],[data-hcaptcha],[data-turnstile],[data-captchafox]').each(function(){i.form_bypass_process(t(this),"-section",!1)}),t('[id^="'+this.form_id_prefix+'section-"][style*="display:none"], [id^="'+this.form_id_prefix+'section-"][style*="display: none"]').find('[name]:not([type="hidden"]),[data-static],[data-recaptcha],[data-hcaptcha],[data-turnstile],[data-captchafox]').each(function(){i.form_bypass_process(t(this),"-section",!0)}),t('[id^="'+this.form_id_prefix+'field-wrapper-"]:not([style*="display:none"],[style*="display: none"])',this.form_canvas_obj).find('[name]:not([type="hidden"],[data-hidden-section],[data-hidden-group]),[data-static],[data-recaptcha],[data-hcaptcha],[data-turnstile],[data-captchafox]').each(function(){i.form_bypass_process(t(this),"",!1)}),t('[id^="'+this.form_id_prefix+'field-wrapper-"][style*="display:none"], [id^="'+this.form_id_prefix+'field-wrapper-"][style*="display: none"]',this.form_canvas_obj).find('[name]:not([type="hidden"]),[data-static],[data-recaptcha],[data-hcaptcha],[data-turnstile],[data-captchafox]').each(function(){i.form_bypass_process(t(this),"",!0)}),t('[id^="'+this.form_id_prefix+'field-wrapper-"]:not([style*="display:none"],[style*="display: none"]) [data-row-checkbox]:not([style*="display:none"],[style*="display: none"]) input[type="checkbox"]',this.form_canvas_obj).each(function(){i.form_bypass_process(t(this),"",!1)}),t('[id^="'+this.form_id_prefix+'field-wrapper-"] [data-row-checkbox][style*="display:none"] input[type="checkbox"], [id^="'+this.form_id_prefix+'field-wrapper-"] [data-row-checkbox][style*="display: none"] input[type="checkbox"]',this.form_canvas_obj).each(function(){i.form_bypass_process(t(this),"",!0)}),t('[id^="'+this.form_id_prefix+'field-wrapper-"]:not([style*="display:none"],[style*="display: none"]) [data-row-radio]:not([style*="display:none"],[style*="display: none"]) input[type="radio"]',this.form_canvas_obj).each(function(){i.form_bypass_process(t(this),"",!1)}),t('[id^="'+this.form_id_prefix+'field-wrapper-"] [data-row-radio][style*="display:none"] input[type="radio"], [id^="'+this.form_id_prefix+'field-wrapper-"] [data-row-radio][style*="display: none"] input[type="radio"]',this.form_canvas_obj).each(function(){i.form_bypass_process(t(this),"",!0)}),!0},t.WS_Form.prototype.form_bypass_attributes=function(){return{required:{bypass:"data-required-bypass",not:'[type="hidden"]'},"aria-required":{bypass:"data-aria-required-bypass",not:'[type="hidden"]'},min:{bypass:"data-min-bypass",not:'[type="hidden"],[type="range"]'},max:{bypass:"data-max-bypass",not:'[type="hidden"],[type="range"]'},minlength:{bypass:"data-minlength-bypass",not:'[type="hidden"]'},maxlength:{bypass:"data-maxlength-bypass",not:'[type="hidden"]'},pattern:{bypass:"data-pattern-bypass",not:'[type="hidden"]'},step:{bypass:"data-step-bypass",not:'[type="hidden"],[type="range"]',replace:"any"}}},t.WS_Form.prototype.form_bypass_obj_reset=function(t){var e=this.form_bypass_attributes();for(var i in e)if(e.hasOwnProperty(i)){var a=e[i].bypass;t.attr(a+"-group")&&t.attr(i,t.attr(a+"-group")).removeAttr(a+"-group"),t.attr(a+"-section")&&t.attr(i,t.attr(a+"-section")).removeAttr(a+"-section"),t.attr(a)&&t.attr(i,t.attr(a)).removeAttr(a)}},t.WS_Form.prototype.form_bypass_hidden=function(t,e,i){var a=t.attr(e);return i?t.attr(e,i):t.removeAttr(e),a},t.WS_Form.prototype.form_bypass_visible=function(t,e){return t.attr(e)},t.WS_Form.prototype.form_bypass_process=function(t,e,i){var a=this.get_section_id(t),r=this.get_section_repeatable_index(t),o=this.get_field_id(t),s=this.get_field_object_row_id(t);s||(s=0);var _=t[0];i?(_.willValidate&&_.validity&&_.validity.customError&&""!==_.validationMessage&&(void 0===this.validation_message_cache[a]&&(this.validation_message_cache[a]=[]),void 0===this.validation_message_cache[a][r]&&(this.validation_message_cache[a][r]=[]),void 0===this.validation_message_cache[a][r][o]&&(this.validation_message_cache[a][r][o]=[]),this.validation_message_cache[a][r][o][s]=_.validationMessage,_.setCustomValidity("")),t.attr("data-hidden"+e,"")):(_.willValidate&&void 0!==this.validation_message_cache[a]&&void 0!==this.validation_message_cache[a][r]&&void 0!==this.validation_message_cache[a][r][o]&&void 0!==this.validation_message_cache[a][r][o][s]&&(_.setCustomValidity(this.validation_message_cache[a][r][o][s]),delete this.validation_message_cache[a][r][o][s]),t.removeAttr("data-hidden"+e))},t.WS_Form.prototype.form_inputmask=function(){var e=this;t("[data-inputmask]",this.form_canvas_obj).each(function(){void 0!==t(this).inputmask&&(t(this).inputmask().off("invalid"),void 0!==t(this).attr("data-inputmask-validate")&&(t(this).on("change input",function(){e.form_inputmask_validate(t(this))}),e.form_inputmask_validate(t(this))))})},t.WS_Form.prototype.form_inputmask_validate=function(t){t.inputmask("isComplete")?this.set_invalid_feedback(t,""):this.set_invalid_feedback(t)},t.WS_Form.prototype.form_validation=function(){var t=this;this.get_object_meta_value(this.form,"submit_on_enter",!1)||(this.form_obj.on("keydown",":input:not(textarea)",function(t){if(13==t.keyCode)return t.preventDefault(),!1}),this.form_events_reset.push({obj:this.form_obj,event:"keydown"})),this.form_obj.on("submit",function(e){e.preventDefault(),e.stopPropagation(),t.form_post_if_validated("submit")}),this.form_events_reset.push({obj:this.form_obj,event:"submit"})},t.WS_Form.prototype.form_post_if_validated=function(t){this.trigger(t+"-before"),this.form_post_locked||(this.has_ecommerce&&"function"==typeof this.form_ecommerce_calculate&&this.form_ecommerce_calculate(),this.form_canvas_obj.addClass(this.class_validated),this.form_validate(this.form_obj)?(this.trigger(t+"-validate-success"),this.recaptchas_v2_invisible.length>0?this.recaptcha_v2_invisible_execute():this.recaptchas_v3_default.length>0?this.recaptcha_v3_default_execute():this.hcaptchas_invisible.length>0?this.hcaptcha_invisible_execute():this.captchafoxes_invisible.length>0?this.captchafox_invisible_execute():this.form_post(t)):this.trigger(t+"-validate-fail"))},t.WS_Form.prototype.form_validate=function(e){void 0===e&&(e=this.form_obj),this.trigger("validate-before");var i,a=!1,r=!1,o=e[0].checkValidity();if(!o){var s=this;this.get_field_elements(e).each(function(){if(s.is_invalid(t(this)))return r=t(this),!1}),!1!==r&&(a=this.get_group_index(r))}"function"==typeof this.form_validate_captcha&&("object"==typeof(i=this.form_validate_captcha(this.recaptchas_v2_default,"recaptcha",e))&&(o=!1,!1===r&&(r=i.object_focus),!1===a&&(a=i.group_index_focus)),"object"==typeof(i=this.form_validate_captcha(this.hcaptchas_default,"hcaptcha",e))&&(o=!1,!1===r&&(r=i.object_focus),!1===a&&(a=i.group_index_focus)),"object"==typeof(i=this.form_validate_captcha(this.turnstiles_default,"turnstile",e))&&(o=!1,!1===r&&(r=i.object_focus),!1===a&&(a=i.group_index_focus)),"object"==typeof(i=this.form_validate_captcha(this.captchafoxes_default,"captchafox",e))&&(o=!1,!1===r&&(r=i.object_focus),!1===a&&(a=i.group_index_focus)));return this.form_accessibility(),o||(!1!==r&&this.get_object_meta_value(this.form,"invalid_field_focus",!0)&&(!1!==a?this.object_focus=r:r.trigger("focus")),"function"==typeof this.form_tab_group_index_set&&!1!==a&&this.form_tab_group_index_set(a)),this.trigger("validate-after"),o},t.WS_Form.prototype.form_validate_real_time=function(){var e=this;for(var i in this.field_data_cache)if(this.field_data_cache.hasOwnProperty(i)){var a=this.field_data_cache[i].type,r=t.WS_Form.field_type_cache[a];if(void 0!==r.events){var o=r.events.event,s=this.field_data_cache[i].id,_=void 0!==r.submit_array&&r.submit_array;t('div[data-type][data-id="'+this.esc_selector(s)+'"],input[type="hidden"][data-id-hidden="'+this.esc_selector(s)+'"]',this.form_canvas_obj).each(function(){var i=t(this).attr("data-repeatable-index"),n=i>0?"["+i+"]":"",c=("hidden"==a?'input[type="hidden"]':"")+'[name="'+e.esc_selector(ws_form_settings.field_prefix+s+n)+(_?"[]":"")+'"]:not([data-init-validate-real-time])',d=t(c,"hidden"==a?e.form_canvas_obj:t(this));if(d.length){d.attr("data-init-validate-real-time","");var h=void 0!==r.event_validate_bypass&&r.event_validate_bypass;d.on(o+" blur",function(t){h||e.form_validate_real_time_process(!1,!1)})}})}}t("[data-wsf-section-validated-class]:not([data-wsf-section-validated-class-init])",this.form_canvas_obj).each(function(){t(this).attr("data-wsf-section-validated-class-init",""),t('input:not([type="hidden"]),textarea,select',t(this)).on("change blur",function(i){var a=t(this).closest("[data-wsf-section-validated-class]"),r=e.get_field_wrapper(t(this));if(r.length){var o=a.attr("data-wsf-section-validated-class");r.addClass(o).off(i)}})}),t("[data-wsf-field-validated-class]:not([data-wsf-field-validated-class-init])",this.form_canvas_obj).each(function(){t(this).attr("data-wsf-field-validated-class-init",""),t('input:not([type="hidden"]),textarea,select',t(this)).on("change blur",function(i){var a=e.get_field_wrapper(t(this));if(a.length){var r=a.attr("data-wsf-field-validated-class");a.addClass(r).removeAttr("data-wsf-field-validated-class data-wsf-field-validated-class-init").off(i)}})}),this.form_validate_real_time_process(!1,!0)},t.WS_Form.prototype.form_validate_real_time_process=function(t,e){for(var i in this.form_valid=this.form_validate_silent(this.form_obj),!e&&(null!==this.form_valid_old&&this.form_valid_old==this.form_valid||t)||this.form_canvas_obj.trigger("wsf-validate"),t||this.form_canvas_obj.trigger("wsf-validate-silent"),this.form_valid_old=this.form_valid,this.form_validation_real_time_hooks)if(this.form_validation_real_time_hooks.hasOwnProperty(i)){var a=this.form_validation_real_time_hooks[i];void 0===a?delete this.form_validation_real_time_hooks[i]:a(this.form_valid,this.form,this.form_id,this.form_instance_id,this.form_obj,this.form_canvas_obj)}return this.form_valid},t.WS_Form.prototype.form_validate_real_time_register_hook=function(t){this.form_validation_real_time_hooks.push(t)},t.WS_Form.prototype.form_validate_silent=function(t){var e=t[0];return this.form_accessibility(t),!!e.checkValidity()},t.WS_Form.prototype.form_accessibility=function(e){var i=this;void 0===e&&(e=this.form_canvas_obj);var a=e.is(this.selector_validated)?"":this.selector_validated+" ",r=t(a+"input,"+a+"select,"+a+"textarea",e).filter(':not([data-hidden],[data-hidden-section],[data-hidden-group],[disabled],[type="hidden"])');r.filter('[aria-invalid="true"]').each(function(){i.is_valid(t(this))&&(t(this).removeAttr("aria-invalid"),i.attribute_remove_item(t(this),"aria-describedby",i.get_invalid_feedback_id(t(this))),i.get_invalid_feedback_obj(t(this)).attr("aria-hidden","true"))}),r.filter(':not([aria-invalid="true"])').each(function(){i.is_invalid(t(this))&&(t(this).attr("aria-invalid","true"),i.attribute_add_item(t(this),"aria-describedby",i.get_invalid_feedback_id(t(this))),i.get_invalid_feedback_obj(t(this)).removeAttr("aria-hidden"))})},t.WS_Form.prototype.object_validate=function(e){var i=[];if(void 0===e)return!1;var a=this,r=!0;return this.get_field_elements(e).each(function(){var e=a.get_field(t(this)).type,o=a.get_section_repeatable_index(t(this)),s=o>0?"["+o+"]":"",_=ws_form_settings.field_prefix+a.get_field_id(t(this))+s,n=!1;switch(e){case"radio":case"price_radio":if(void 0!==i[_])return;n=t(this)[0].checkValidity();break;default:n=t(this)[0].checkValidity()}if(i[_]=!0,!n)return r=!1,!1}),r},t.WS_Form.prototype.hex_to_hsl=function(t){var e=this.hex_to_rgb(t);return!1!==e&&this.rgb_to_hsl(e)},t.WS_Form.prototype.hex_to_rgb=function(t){if(""==t)return!1;var e="#"==t[0];if(e&&7!=t.length)return!1;if(!e&&6!=t.length)return!1;t=e?t.slice(1):t;return{r:parseInt(t.substring(0,2),16),g:parseInt(t.substring(2,4),16),b:parseInt(t.substring(4,6),16)}},t.WS_Form.prototype.rgb_to_hsl=function(t){if(void 0===t.r)return!1;if(void 0===t.g)return!1;if(void 0===t.b)return!1;var e=t.r,i=t.g,a=t.b;e/=255,i/=255,a/=255;var r,o,s=Math.max(e,i,a),_=Math.min(e,i,a),n=(s+_)/2;if(s==_)r=o=0;else{var c=s-_;switch(o=n>.5?c/(2-s-_):c/(s+_),s){case e:r=(i-a)/c+(i<a?6:0);break;case i:r=(a-e)/c+2;break;case a:r=(e-i)/c+4}r/=6}return{h:r,s:o,l:n}},t.WS_Form.prototype.group_fields_reset=function(t,e){if(void 0===this.group_data_cache[t])return!1;var i=this.group_data_cache[t];if(void 0===i.sections)return!1;var a=i.sections;for(var r in a)if(a.hasOwnProperty(r)){var o=a[r];this.section_fields_reset(o.id,e,!1)}},t.WS_Form.prototype.section_fields_reset=function(e,i,a){if(void 0===this.section_data_cache[e])return!1;var r=this.section_data_cache[e];if(void 0===r.fields)return!1;var o=r.fields;for(var s in o)if(o.hasOwnProperty(s)){var _=o[s],n=_.id;if(!1===a)var c='[id^="'+this.esc_selector(this.form_id_prefix+"field-wrapper-"+n)+'"][data-id="'+this.esc_selector(_.id)+'"]';else c="#"+this.form_id_prefix+"field-wrapper-"+n+"-repeat-"+a;var d=t(c,this.form_canvas_obj);this.field_reset(n,i,d)}},t.WS_Form.prototype.field_reset=function(e,i,a){var r=this;if(void 0===a&&(a=!1),void 0!==this.field_data_cache[e]){var o=this.field_data_cache[e],s=t.WS_Form.field_type_cache[o.type],_=void 0!==s.trigger?s.trigger:"change";switch(o.type){case"select":case"price_select":t("option",a).each(function(){var e=!i&&t(this).prop("defaultSelected"),a=t(this).prop("selected")!==e;t(this).prop("selected",e),a&&t(this).trigger(_)});break;case"checkbox":case"price_checkbox":t('input[type="checkbox"]',a).each(function(){var e=!i&&t(this).prop("defaultChecked"),a=t(this).prop("checked")!==e;t(this).prop("checked",e),a&&t(this).trigger(_)});break;case"radio":case"price_radio":t('input[type="radio"]',a).each(function(){var e=!i&&t(this).prop("defaultChecked"),a=t(this).prop("checked")!==e;t(this).prop("checked",e),a&&t(this).trigger(_)});break;case"textarea":t("textarea",a).each(function(){var e=i?"":t(this).prop("defaultValue"),a=t(this).val()!==e;t(this).val(e),"function"==typeof r.textarea_set_value&&r.textarea_set_value(t(this),e),a&&t(this).trigger("change")});break;case"color":t("input",a).each(function(){var e=i?"":t(this).prop("defaultValue"),a=t(this).val()!==e;t(this).val(e),a&&(t(this).trigger("change"),"undefined"!=typeof Coloris&&t(this)[0].dispatchEvent(new Event("input",{bubbles:!0})))});break;case"hidden":var n=i?"":a.attr("data-default-value"),c=a.val()!==n;a.val(n),c&&a.trigger(_);break;case"googlemap":t("input",a).each(function(){var e=i?"":t(this).attr("data-default-value"),a=t(this).val()!==e;t(this).val(e),a&&t(this).trigger(_)});break;case"file":t('input[type="file"]',a).each(function(){var e=""!==t(this).val();t(this).val(""),e&&t(this).trigger(_)}),"function"==typeof r.form_file_dropzonejs_populate&&"undefined"!=typeof Dropzone&&t('input[data-file-type="dropzonejs"]',a).each(function(){var e=t(this).val();r.form_file_dropzonejs_populate(t(this),i),t(this).val()!==e&&t(this).trigger(_)});break;default:t("input",a).each(function(){var e=i?"":t(this).prop("defaultValue"),a=t(this).val()!==e;t(this).val(e),a&&t(this).trigger(_)})}}},t.WS_Form.prototype.form_post=function(e,i){void 0===e&&(e="save"),void 0===i&&(i=0);var a="submit"==e;this.trigger(e);var r=this;this.form_add_hidden_input("wsf_form_id",this.form_id),this.form_add_hidden_input("wsf_hash",this.hash),ws_form_settings.wsf_nonce&&this.form_add_hidden_input(ws_form_settings.wsf_nonce_field_name,ws_form_settings.wsf_nonce),void 0!==ws_form_settings.post_id&&ws_form_settings.post_id>0&&this.form_add_hidden_input("wsf_post_id",ws_form_settings.post_id),this.form_add_hidden_input("wsf_post_mode",e);var o=t("[data-hidden],[data-hidden-section],[data-hidden-group]",this.form_canvas_obj).filter(":not([data-hidden-bypass])").map(function(){var e;if(void 0===(e=t(this).attr("name"))&&void 0===(e=t(this).attr("data-name")))return"";switch(e=e.replace("[]",""),r.get_field_type(t(this))){case"checkbox":case"price_checkbox":if(r.get_checkbox_row_count(t(this)))return"";break;case"radio":case"price_radio":if(r.get_radio_row_count(t(this)))return""}return e}).get(),s=(o=o.filter(function(t,e,i){return i.indexOf(t)===e&&""!==t})).join();this.form_add_hidden_input("wsf_hidden",s);var _=t("[data-required-bypass],[data-required-bypass-section],[data-required-bypass-group],[data-conditional-logic-bypass]",this.form_canvas_obj).map(function(){var e=t(this).attr("name");return e=e.replace("[]","")}).get(),n=(_=_.filter(function(t,e,i){return i.indexOf(t)===e})).join();if(this.form_add_hidden_input("wsf_bypass_required",n),this.form.submit_hidden_fields&&"object"==typeof this.form.submit_hidden_fields)for(var c in this.form.submit_hidden_fields)if(this.form.submit_hidden_fields.hasOwnProperty(c)){var d=this.form.submit_hidden_fields[c];if(void 0!==d.name&&void 0!==d.value&&void 0!==d.type){switch(d.type){case"local_storage":d.value=this.local_storage_get_raw(d.value)}void 0===d.id&&(d.id=!1),void 0===d.attributes&&(d.attributes=!1),this.form_add_hidden_input(d.name,d.value,d.id,d.attributes)}}if(a&&0==i&&!1===this.form_ajax)return this.form_hash_clear(),this.trigger(e+"-complete"),void this.trigger("complete");this.form_post_lock("progress",!1,!1,!0),"function"==typeof this.form_loader_show&&this.form_loader_show(e),r.trigger(e+"-before-ajax");var h=new FormData(this.form_obj[0]);i>0&&h.append("wsf_row_id_filter",i),"submit"!==e&&(h.delete("quantity"),h.delete("add-to-cart"),h.delete("product_id"),h.delete("variation_id")),"function"==typeof this.form_tel_post&&this.form_tel_post(h),"function"==typeof this.form_media_capture_post&&this.form_media_capture_post(h),this.api_call("submit","POST",h,function(t){a&&("function"==typeof r.recaptcha_reset&&r.recaptcha_reset(),"function"==typeof r.hcaptcha_reset&&r.hcaptcha_reset(),"function"==typeof r.turnstile_reset&&r.turnstile_reset(),"function"==typeof r.captchafox_reset&&r.captchafox_reset());var i=void 0!==t.error_validation&&t.error_validation,o=void 0!==t.data&&void 0!==t.data.errors&&t.data.errors.length,s=!1;if("object"==typeof t.data&&"object"==typeof t.data.js){var _=t.data.js;for(var n in _)if(_.hasOwnProperty(n)){var c=_[n];if("redirect"==r.js_action_get_parameter(c,"action")){s=!0;break}}}if(!s){var d=void 0===t.data||"save"==e||i||o;r.form_post_unlock("progress",!d,d,!0),"function"==typeof r.form_loader_hide&&r.form_loader_hide(!d)}if(o||i?(r.trigger(e+"-error"),r.trigger("error")):(r.trigger(e+"-success"),r.trigger("success")),!a||i||o||(r.form_hash_clear(),r.get_object_meta_value(r.form,"submit_reload",!0)&&!s&&r.form_reload()),o&&r.get_object_meta_value(r.form,"submit_show_errors",!0))for(var h in t.data.errors)if(t.data.errors.hasOwnProperty(h)){var f=t.data.errors[h];r.action_message(f)}return r.trigger(e+"-complete"),r.trigger("complete"),!o},function(t){r.form_post_unlock("progress",!0,!0,!0),"function"==typeof r.form_loader_hide&&r.form_loader_hide(!0),"function"==typeof r.recaptcha_reset&&r.recaptcha_reset(),"function"==typeof r.hcaptcha_reset&&r.hcaptcha_reset(),"function"==typeof r.turnstile_reset&&r.turnstile_reset(),"function"==typeof r.captchafox_reset&&r.captchafox_reset(),void 0!==t.error_message&&r.action_message(t.error_message),r.trigger(e+"-error"),r.trigger("error")},i>0||!a)},t.WS_Form.prototype.form_post_lock=function(e,i,a,r){void 0===e&&(e="progress"),void 0===i&&(i=!1),void 0===a&&(a=!1),void 0===r&&(r=!1),this.form_post_lock_start=new Date;var o=this.get_form_post_lock_class(r);this.form_obj.hasClass(o)||(i||this.get_object_meta_value(this.form,"submit_lock",!1))&&(a&&(this.form_ecommerce_calculate_enabled=!1),this.get_form_post_lock_button_objs(r).each(function(){void 0!==t(this).attr("disabled")?t(this).attr("data-form-lock-disabled-bypass",""):t(this).prop("disabled",!0)}),this.form_obj.addClass(o+(e?" wsf-form-post-lock-"+e:"")),this.form_post_locked=!0,this.trigger("lock"))},t.WS_Form.prototype.form_post_unlock=function(e,i,a,r){void 0===e&&(e="progress"),void 0===i&&(i=!0),void 0===a&&(a=!1),void 0===r&&(r=!1);var o=this.get_form_post_lock_class(r);if(this.form_obj.hasClass(o)){var s=this,_=function(){s.form_ecommerce_calculate_enabled=!0,s.form_obj.removeClass(o+(e?" wsf-form-post-lock-"+e:"")),s.get_form_post_lock_button_objs(r).each(function(){void 0!==t(this).attr("data-form-lock-disabled-bypass")?t(this).removeAttr("data-form-lock-disabled-bypass"):t(this).prop("disabled",!1)}),s.form_post_locked=!1,"function"==typeof s.form_progress_api_call_reset&&s.form_progress_api_call_reset(),s.trigger("unlock"),s.form_validate_real_time_process(!1,!1)};if(a||this.get_object_meta_value(this.form,"submit_unlock",!1)){var n=new Date-this.form_post_lock_start,c=Math.max(this.form_post_lock_duration_max-n,0);i?setTimeout(function(){_()},c):_()}}},t.WS_Form.prototype.get_form_post_lock_button_objs=function(e){return t("string"==typeof e?e:e='button[type="submit"].wsf-button, input[type="submit"].wsf-button, button[data-action="wsf-save"].wsf-button, button[data-ecommerce-payment].wsf-button, [data-post-lock]'+(e?', button[type="button"].wsf-button':""),this.form_canvas_obj)},t.WS_Form.prototype.get_form_post_lock_class=function(t){var e="wsf-form-post-lock";return"string"==typeof t&&(e+="-custom-selector"),e},t.WS_Form.prototype.api_call=function(e,i,a,r,o,s){void 0===i&&(i="POST"),a||(a=new FormData),void 0===s&&(s=!1);var _=this,n=new Date;if(ws_form_settings.use_rest_route){var c=e.split("?");e=encodeURIComponent(c[0])+(c[1]?"&"+c[1]:"")}var d=s?ws_form_settings.url_ajax+e:"submit"==e?this.form_obj.attr("action"):ws_form_settings.url_ajax+e;if(!s&&this.form_action_custom&&"submit"==e)return this.form_obj.off("submit"),this.form_obj.trigger("submit"),!0;if(void 0!==a.get&&null!==a.get(ws_form_settings.wsf_nonce_field_name)||!ws_form_settings.wsf_nonce||a.append(ws_form_settings.wsf_nonce_field_name,ws_form_settings.wsf_nonce),"GET"===i){for(var h={},f=a.entries(),l=f.next();!l.done;){var p=l.value;h[p[0]]=p[1],l=f.next()}a=h}this.action_js_process_validation_focus=!0;var m={method:i,url:d,contentType:!1,processData:"GET"===i,beforeSend:function(t){ws_form_settings.x_wp_nonce&&t.setRequestHeader("X-WP-Nonce",ws_form_settings.x_wp_nonce)},success:function(t){_.api_call_hander_success(t,r,n)},error:function(t,e,i){_.api_call_handler_error(t,e,i,r,o,n,d)}};!1!==a&&(m.data=a);var u=t('[data-source="post_progress"]',this.form_canvas_obj);return u.length&&(m.xhr=function(){var t=new window.XMLHttpRequest;return t.upload.addEventListener("progress",function(t){_.form_progress_api_call(u,t)},!1),t.addEventListener("progress",function(t){_.form_progress_api_call(u,t)},!1),t}),t.ajax(m)},t.WS_Form.prototype.api_call_hander_success=function(t,e,i){this.api_call_hash(t);void 0!==t.x_wp_nonce&&(ws_form_settings.x_wp_nonce=t.x_wp_nonce),void 0!==t.wsf_nonce&&(ws_form_settings.wsf_nonce=t.wsf_nonce);var a="function"!=typeof e||e(t);return void 0!==t.data&&a&&"object"==typeof t.data.js&&this.action_js_init(t.data.js),!0},t.WS_Form.prototype.api_call_handler_error=function(t,e,i,a,r,o,s){var _=void 0!==t.responseJSON&&t.responseJSON,n=t.status,c=this.language("error_api_call_unknown");switch(n){case 200:if("string"==typeof i)c=this.error("error_api_call_response_error",i);else if(i instanceof Error)c=this.error("error_api_call_response_error",i.message);else try{c=this.error("error_api_call_response_error",JSON.stringify(i))}catch(t){c=this.error("error_api_call_response_error",this.language("error_api_call_unknown"))}this.error("error_api_call_response_text",this.esc_html(t.responseText)),_={error:!0,error_message:c};break;case 400:case 401:case 403:case 404:case 500:_&&_.error?c=_.error_message?this.error("error_api_call_"+n,_.error_message):this.error("error_api_call_"+n,s):_={error:!0,error_message:c=this.error("error_api_call_"+n,s)}}"function"==typeof r&&r(_)},t.WS_Form.prototype.api_call_hash=function(t){if("string"!=typeof t.hash)return!1;var e=t.hash;if("clear"==e)return this.form_hash_clear(),!1;if(32!=e.length)return!1;return!!/^[a-fA-F0-9]{32}$/gi.test(e)&&(this.hash_set(e),!0)},t.WS_Form.prototype.hash_set=function(e,i,a){(void 0===i&&(i=!1),void 0===a&&(a=!1),e!=this.hash&&(this.hash=e,a=!0),i&&(this.token=i),a)&&(this.get_object_value(t.WS_Form.settings_plugin,"cookie_hash")&&this.cookie_set("hash",this.hash))},t.WS_Form.prototype.action_js_init=function(t){this.trigger("actions-start"),this.action_js=t,this.action_js_process_next()},t.WS_Form.prototype.action_js_process_next=function(){if(0==this.action_js.length)return this.trigger("actions-finish"),!1;var e=this.action_js.shift();switch(this.js_action_get_parameter(e,"action")){case"redirect":return!1!==this.js_action_get_parameter(e,"url")&&(location.href=e.url),!0;case"message":var i=this.js_action_get_parameter(e,"message"),a=this.js_action_get_parameter(e,"type"),r=this.js_action_get_parameter(e,"method"),o=this.js_action_get_parameter(e,"duration"),s=this.js_action_get_parameter(e,"form_hide"),_=this.js_action_get_parameter(e,"clear"),n=this.js_action_get_parameter(e,"scroll_top"),c=this.js_action_get_parameter(e,"scroll_top_offset"),d=this.js_action_get_parameter(e,"scroll_top_duration"),h=this.js_action_get_parameter(e,"form_show"),f=this.js_action_get_parameter(e,"message_hide");this.action_message(i,a,r,o,s,_,n,c,d,h,f);break;case"field_invalid_feedback":var l=parseInt(this.js_action_get_parameter(e,"field_id"),10),p=(k=parseInt(this.js_action_get_parameter(e,"section_repeatable_index"),10))?"-repeat-"+k:"",m=(i=this.js_action_get_parameter(e,"message"),t("#"+this.form_id_prefix+"field-"+l+p,this.form_canvas_obj));this.set_invalid_feedback(m,i);var u=this;if(m.one("change input",function(){u.set_invalid_feedback(t(this),"")}),this.get_object_meta_value(this.form,"invalid_field_focus",!0)&&this.action_js_process_validation_focus){var v=this.get_group_index(m);!1!==v?this.object_focus=m:m.trigger("focus"),"function"==typeof this.form_tab_group_index_set&&!1!==v&&this.form_tab_group_index_set(v),this.action_js_process_validation_focus=!1}this.form_canvas_obj.addClass(this.class_validated),this.form_accessibility(),this.action_js_process_next();break;case"field_value":l=parseInt(this.js_action_get_parameter(e,"field_id"),10),p=(k=parseInt(this.js_action_get_parameter(e,"section_repeatable_index"),10))?"-repeat-"+k:"";var g=this.js_action_get_parameter(e,"value"),b=this.js_action_get_parameter(e,"check",!0),y=this.js_action_get_parameter(e,"append"),w=this.js_action_get_parameter(e,"prepend"),j=t("#"+this.form_id_prefix+"field-wrapper-"+l+p,this.form_canvas_obj),x=t("#"+this.form_id_prefix+"field-"+l+p,this.form_canvas_obj);this.field_value_set(j,x,g,b,y,w),this.action_js_process_next();break;case"field_dropzonejs_file_objects":l=parseInt(this.js_action_get_parameter(e,"field_id"),10),p=(k=parseInt(this.js_action_get_parameter(e,"section_repeatable_index"),10))?"-repeat-"+k:"";var k,S=this.js_action_get_parameter(e,"file_objects");(m=t("#"+this.form_id_prefix+"field-"+l+p,this.form_canvas_obj)).attr("data-default-value",JSON.stringify(S)),this.form_file_dropzonejs_populate(m),this.action_js_process_next();break;case"trigger":var F=this.js_action_get_parameter(e,"event"),W=this.js_action_get_parameter(e,"params");t(document).trigger(F,W),this.action_js_process_next()}},t.WS_Form.prototype.field_value_set=function(e,i,a,r,o,s){if(e.length)_=e.attr("data-type");else{if(!i.length)return;switch(i.attr("type")){case"hidden":var _="hidden";break;default:return}}void 0===r&&(r=!0),void 0===o&&(o=!1),void 0===s&&(s=!1);var n=!!i.length&&i[0].nodeName;if("string"==typeof n)switch(n.toLowerCase()){case"button":_="button"}switch(_){case"select":case"price_select":var c=t('option[value="'+this.esc_selector(a)+'"]',i).prop("selected")!==r;t('option[value="'+this.esc_selector(a)+'"]',i).prop("selected",r),c&&i.trigger("change");break;case"checkbox":case"price_checkbox":case"radio":case"price_radio":c=t('input[value="'+this.esc_selector(a)+'"]',e).prop("checked")!==r;t('input[value="'+this.esc_selector(a)+'"]',e).prop("checked",r),c&&t('input[value="'+this.esc_selector(a)+'"]',e).trigger("change");break;case"button":i.html(a);break;case"html":case"texteditor":case"message":o?t("[data-html],[data-text-editor]",e).append(a):s?t("[data-html],[data-text-editor]",e).prepend(a):t("[data-html],[data-text-editor]",e).html(a);break;case"color":i.attr("data-value-old",function(){return t(this).val()}).val(a).filter(function(){return t(this).val()!==t(this).attr("data-value-old")}).trigger("change").removeAttr("data-value-old"),"undefined"!=typeof Coloris&&i[0].dispatchEvent(new Event("input",{bubbles:!0}));break;case"price":case"cart_price":if(""!==a){if(isNaN(a))a=this.get_number(a);a=this.get_price(a,this.get_currency(),!1)}i.attr("data-value-old",function(){return t(this).val()}).val(a).filter(function(){return t(this).val()!==t(this).attr("data-value-old")}).trigger("change").removeAttr("data-value-old");break;default:o?a=i.val()+a:s&&(a+=i.val()),i.attr("data-value-old",function(){return t(this).val()}).val(a).filter(function(){return t(this).val()!==t(this).attr("data-value-old")}).trigger("change").removeAttr("data-value-old"),"textarea"==_&&"function"==typeof this.textarea_set_value&&this.textarea_set_value(i,a)}},t.WS_Form.prototype.js_action_get_parameter=function(t,e,i=!1){return void 0!==t[e]?t[e]:i},t.WS_Form.prototype.get_framework_config_value=function(t,e){return void 0!==this.framework[t]&&(void 0!==this.framework[t].public&&(void 0!==this.framework[t].public[e]&&this.framework[t].public[e]))},t.WS_Form.prototype.action_message=function(e,i,a,r,o,s,_,n,c,d,h){if(e){void 0===i&&(i=this.get_object_meta_value(this.form,"error_type","danger")),void 0===a&&(a=this.get_object_meta_value(this.form,"error_method","after")),void 0===r&&(r=parseInt(this.get_object_meta_value(this.form,"error_duration","4000"),10)),void 0===o&&(o="on"==this.get_object_meta_value(this.form,"error_form_hide","")),void 0===s&&(s="on"==this.get_object_meta_value(this.form,"error_clear","")),void 0===_&&(_="on"==this.get_object_meta_value(this.form,"error_scroll_top","")),void 0===n&&(n=parseInt(this.get_object_meta_value(this.form,"error_scroll_top_offset","0"),10)),n=""==n?0:parseInt(n,10),void 0===c&&(c=parseInt(this.get_object_meta_value(this.form,"error_scroll_top_duration","400"),10)),void 0===d&&(d="on"==this.get_object_meta_value(this.form,"error_form_show","")),void 0===h&&(h="on"==this.get_object_meta_value(this.form,"error_message_hide","on"));var f=this.form_canvas_obj.offset().top-n;(r=parseInt(r,10))<0&&(r=0);var l=this.get_framework_config_value("message","mask_wrapper"),p=this.get_framework_config_value("message","types"),m=void 0!==(i=void 0!==p[i]&&p[i]).mask_wrapper_class?i.mask_wrapper_class:"";switch(s&&t('[data-wsf-message][data-wsf-instance-id="'+this.form_instance_id+'"]').remove(),_){case"instant":case"on":t("html,body").scrollTop(f);break;case"smooth":c=""==c?0:parseInt(c,10),t("html,body").animate({scrollTop:f},c)}var u={message:e,mask_wrapper_class:m},v=void 0!==this.form_canvas_obj.attr("data-wsf-style-id")&&this.form_canvas_obj.attr("data-wsf-style-id");v&&(u.style_id=v);var g=t("<div/>",{html:this.mask_parse(l,u)});switch(g.attr("role","alert"),g.attr("data-wsf-message",""),g.attr("data-wsf-instance-id",this.form_instance_id),v&&t("#wsf-styler").length&&g.attr("style",this.form_canvas_obj.attr("style")),o&&this.form_obj.hide(),a){case"before":g.insertBefore(this.form_obj);break;default:g.insertAfter(this.form_obj)}this.conversational&&t(".wsf-form-conversational-nav").length&&g.css("bottom",t(".wsf-form-conversational-nav").outerHeight()+"px");var b=this;(r=parseInt(r,10))>0?setTimeout(function(){h&&g.remove(),d&&b.form_obj.show(),b.action_js_process_next()},r):b.action_js_process_next()}},t.WS_Form.prototype.form_character_word_count=function(e){var i=this;for(var a in void 0===e&&(e=this.form_canvas_obj),this.field_data_cache)if(this.field_data_cache.hasOwnProperty(a)){var r=this.field_data_cache[a],o=this.get_object_meta_value(r,"help","",!1,!0),s=-1!==o.indexOf("#character_")||-1!==o.indexOf("#word_");if(this.has_object_meta_key(r,"min_length")||this.has_object_meta_key(r,"max_length")||this.has_object_meta_key(r,"min_length_words")||this.has_object_meta_key(r,"max_length_words")||s){var _=t("#"+this.form_id_prefix+"field-"+a,e);_.length||(_=t('[id^="'+this.form_id_prefix+"field-"+a+'-"]:not([data-init-char-word-count]):not(iframe)',e)),_.each(function(){t(this).attr("data-init-char-word-count",""),i.form_character_word_count_process(t(this))&&t(this).on("change input",function(){i.form_character_word_count_process(t(this))})})}}},t.WS_Form.prototype.form_character_word_count_process=function(t){var e=this.get_field(t),i=this.get_object_meta_value(e,"min_length","");i=parseInt(i,10)>0&&parseInt(i,10);var a=this.get_object_meta_value(e,"max_length","");a=parseInt(a,10)>0&&parseInt(a,10);var r=this.get_object_meta_value(e,"min_length_words","");r=parseInt(r,10)>0&&parseInt(r,10);var o=this.get_object_meta_value(e,"max_length_words","");o=parseInt(o,10)>0&&parseInt(o,10);var s=t.val();if("string"==typeof s){var _=s.length,n=!1!==a&&a-_;n<0&&(n=0);var c=this.get_word_count(s),d=!1!==o&&o-c;d<0&&(d=0);var h=!1,f=[];!1!==i&&_<i&&(f.push(this.language("error_min_length",i)),h=!0),!1!==a&&_>a&&(f.push(this.language("error_max_length",a)),h=!0),!1!==r&&c<r&&(f.push(this.language("error_min_length_words",r)),h=!0),!1!==o&&c>o&&(f.push(this.language("error_max_length_words",o)),h=!0),(void 0!==t.attr("required")||s.length>0)&&h?this.set_invalid_feedback(t,f.join(" / ")):this.set_invalid_feedback(t,""),this.form_bypass();var l=this.get_object_meta_value(e,"help","",!1,!0);if(-1===l.indexOf("#character_")&&-1===l.indexOf("#word_"))return!0;var p=this.language("character_singular"),m=this.language("character_plural"),u=this.language("word_singular"),v=this.language("word_plural"),g={character_count:_,character_count_label:1==_?p:m,character_remaining:!1!==n?n:"",character_remaining_label:1==n?p:m,character_min:!1!==i?i:"",character_min_label:!1!==i?1==i?p:m:"",character_max:!1!==a?a:"",character_max_label:!1!==a?1==a?p:m:"",word_count:c,word_count_label:1==c?u:v,word_remaining:!1!==d?d:"",word_remaining_label:1==d?u:v,word_min:!1!==r?r:"",word_min_label:!1!==r?1==r?u:v:"",word_max:!1!==o?o:"",word_max_label:!1!==o?1==o?u:v:""},b=this.mask_parse(l,g);return this.get_help_obj(t).html(b),!0}},t.WS_Form.prototype.get_word_count=function(t){return 0==(t=t.trim()).length?0:t.trim().replace(/\s+/gi," ").split(" ").length},window.wsf_form_instances=[],window.wsf_form_init=function(e,i,a){if(void 0===e&&(e=!1),void 0===i&&(i=!1),void 0===a)var r=t(".wsf-form");else r=t(".wsf-form",a);if(r.length){var o=0,s=[];t(".wsf-form").each(function(){if(void 0!==t(this).attr("data-instance-id")){var e=parseInt(t(this).attr("data-instance-id"),10);-1!==s.indexOf(e)?t(this).removeAttr("data-instance-id"):e>o&&(o=e),s.push(e)}}),o++,r.each(function(){if(e||void 0===t(this).attr("data-wsf-rendered")){i&&t(this).off(),void 0===t(this).attr("data-instance-id")&&(void 0===t(this).attr("data-wsf-custom-id")&&t(this).attr("id","ws-form-"+o),t(this).attr("data-instance-id",o),o++);var a=t(this).attr("id"),r=t(this).attr("data-id"),s=t(this).attr("data-instance-id");if(a&&r&&s){var _=new t.WS_Form;window.wsf_form_instances[s]=_,_.render({obj:t(this),form_id:r})}}})}},t(function(){wsf_form_init()})}(jQuery);