Form Maker by WD – user-friendly drag & drop Form Builder plugin - Version 1.14.5

Version Description

  • Fixed: Form submit required fields issue.
Download this release

Release Info

Developer 10web
Plugin Icon 128x128 Form Maker by WD – user-friendly drag & drop Form Builder plugin
Version 1.14.5
Comparing to
See all releases

Code changes from version 1.14.4 to 1.14.5

Files changed (4) hide show
  1. form-maker.php +3 -3
  2. js/main_div_front_end.js +3 -3
  3. js/scripts.min.js +1 -1
  4. readme.txt +4 -1
form-maker.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Form Maker
4
  * Plugin URI: https://10web.io/plugins/wordpress-form-maker/?utm_source=form_maker&utm_medium=free_plugin
5
  * Description: This plugin is a modern and advanced tool for easy and fast creating of a WordPress Form. The backend interface is intuitive and user friendly which allows users far from scripting and programming to create WordPress Forms.
6
- * Version: 1.14.4
7
  * Author: 10Web Form Builder Team
8
  * Author URI: https://10web.io/plugins/?utm_source=form_maker&utm_medium=free_plugin
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -104,8 +104,8 @@ final class WDFM {
104
  $this->plugin_url = plugins_url(plugin_basename(dirname(__FILE__)));
105
  $this->front_urls = $this->get_front_urls();
106
  $this->main_file = plugin_basename(__FILE__);
107
- $this->plugin_version = '1.14.4';
108
- $this->db_version = '2.14.4';
109
  $this->menu_postfix = ($this->is_free == 2 ? '_fmc' : '_fm');
110
  $this->plugin_postfix = ($this->is_free == 2 ? '_fmc' : '');
111
  $this->menu_slug = 'manage' . $this->menu_postfix;
3
  * Plugin Name: Form Maker
4
  * Plugin URI: https://10web.io/plugins/wordpress-form-maker/?utm_source=form_maker&utm_medium=free_plugin
5
  * Description: This plugin is a modern and advanced tool for easy and fast creating of a WordPress Form. The backend interface is intuitive and user friendly which allows users far from scripting and programming to create WordPress Forms.
6
+ * Version: 1.14.5
7
  * Author: 10Web Form Builder Team
8
  * Author URI: https://10web.io/plugins/?utm_source=form_maker&utm_medium=free_plugin
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
104
  $this->plugin_url = plugins_url(plugin_basename(dirname(__FILE__)));
105
  $this->front_urls = $this->get_front_urls();
106
  $this->main_file = plugin_basename(__FILE__);
107
+ $this->plugin_version = '1.14.5';
108
+ $this->db_version = '2.14.5';
109
  $this->menu_postfix = ($this->is_free == 2 ? '_fmc' : '_fm');
110
  $this->plugin_postfix = ($this->is_free == 2 ? '_fmc' : '');
111
  $this->menu_slug = 'manage' . $this->menu_postfix;
js/main_div_front_end.js CHANGED
@@ -1320,7 +1320,7 @@ function wd_is_filled(form_id, field_id, all_pages) {
1320
  case 'type_paypal_select': {
1321
  var element = "#wdform_" + wdid + "_element" + form_id;
1322
  if(all_pages || x.find(jQuery("div[wdid='"+wdid+"']")).closest(".wdform-page-and-images").css('display') != "none") {
1323
- if (jQuery(element).val() == "" || (jQuery("#wdform_"+ wdid +"_element_quantity" + form_id) && !parseInt(jQuery("#wdform_"+ wdid +"_element_quantity" + form_id).val()))) {
1324
  not_filled[wdid] = element;
1325
  }
1326
  }
@@ -1415,14 +1415,14 @@ function wd_is_filled(form_id, field_id, all_pages) {
1415
  case 'type_paypal_radio':
1416
  case 'type_paypal_shipping': {
1417
  if(all_pages || x.find(jQuery("div[wdid='"+wdid+"']")).closest(".wdform-page-and-images").css('display') != "none"){
1418
- if (x.find(jQuery("div[wdid='"+ wdid +"'] input:checked")).length == 0 || jQuery("#wdform_"+ wdid +"_other_input" + form_id).val() == "" || (jQuery("#wdform_"+ wdid +"_element_quantity" + form_id) && !parseInt(jQuery("#wdform_"+ wdid +"_element_quantity" + form_id).val()))){
1419
  not_filled[wdid] = true;
1420
  }
1421
  }
1422
  if(!field_id && !window['check_submit'+form_id]){
1423
  jQuery.each(jQuery("#form" + form_id + " div[wdid='"+ wdid +"'] input"), function( i, val ){
1424
  jQuery(this).change(function() {
1425
- if (x.find(jQuery("div[wdid='"+ wdid +"'] input:checked")).length == 0 || jQuery("#wdform_"+ wdid +"_other_input" + form_id).val() == "" || (jQuery("#wdform_"+ wdid +"_element_quantity" + form_id) && !parseInt(jQuery("#wdform_"+ wdid +"_element_quantity" + form_id).val())) ){
1426
  wd_is_filled(form_id, wdid);
1427
  }
1428
  else{
1320
  case 'type_paypal_select': {
1321
  var element = "#wdform_" + wdid + "_element" + form_id;
1322
  if(all_pages || x.find(jQuery("div[wdid='"+wdid+"']")).closest(".wdform-page-and-images").css('display') != "none") {
1323
+ if (jQuery(element).val() == "" || (jQuery("#wdform_"+ wdid +"_element_quantity" + form_id).length > 0 && !parseInt(jQuery("#wdform_"+ wdid +"_element_quantity" + form_id).val()))) {
1324
  not_filled[wdid] = element;
1325
  }
1326
  }
1415
  case 'type_paypal_radio':
1416
  case 'type_paypal_shipping': {
1417
  if(all_pages || x.find(jQuery("div[wdid='"+wdid+"']")).closest(".wdform-page-and-images").css('display') != "none"){
1418
+ if (x.find(jQuery("div[wdid='"+ wdid +"'] input:checked")).length == 0 || jQuery("#wdform_"+ wdid +"_other_input" + form_id).val() == "" || (jQuery("#wdform_"+ wdid +"_element_quantity" + form_id).length > 0 && !parseInt(jQuery("#wdform_"+ wdid +"_element_quantity" + form_id).val()))){
1419
  not_filled[wdid] = true;
1420
  }
1421
  }
1422
  if(!field_id && !window['check_submit'+form_id]){
1423
  jQuery.each(jQuery("#form" + form_id + " div[wdid='"+ wdid +"'] input"), function( i, val ){
1424
  jQuery(this).change(function() {
1425
+ if (x.find(jQuery("div[wdid='"+ wdid +"'] input:checked")).length == 0 || jQuery("#wdform_"+ wdid +"_other_input" + form_id).val() == "" || (jQuery("#wdform_"+ wdid +"_element_quantity" + form_id).length > 0 && !parseInt(jQuery("#wdform_"+ wdid +"_element_quantity" + form_id).val())) ){
1426
  wd_is_filled(form_id, wdid);
1427
  }
1428
  else{
js/scripts.min.js CHANGED
@@ -1 +1 @@
1
- var fm_rated=!1;function form_load_actions(){jQuery(".wd-datepicker").each(function(){jQuery(this).datepicker(),jQuery(this).datepicker("option","dateFormat",jQuery(this).data("format"))});var e=jQuery(".fm-form").find(".fm-message");0!==e.length&&0==e.closest(".fm-popover-content").length&&0==e.closest(".fm-scrollbox-form").length&&0==e.closest(".fm-topbar").length&&(jQuery(window).scrollTop(jQuery(".fm-message").offset().top-100),-1<navigator.userAgent.toLowerCase().indexOf("safari/")&&(document.scrollingElement.scrollTop=jQuery(".fm-message").offset().top-100));if(0!==jQuery(".fm-form").find(".message_captcha").length){var t=jQuery(".fm-form").attr("name").split("form")[1];if(0!==jQuery("#form"+t+" .message_captcha").length){var r=jQuery(jQuery("#form"+t+" .message_captcha")).offset().top;jQuery(".fm-form").find(".message_captcha").parents(".wdform-field").find(".wdform-label").addClass("error_label"),jQuery("html").animate({scrollTop:r-150},500),document.scrollingElement.scrollTop=r-150}}}function set_total_value(form_id){var getDataHideCurreny=jQuery(".paypal_total"+form_id).parent().parent().attr("data-hide-currency");if("yes"==getDataHideCurreny)var toggle_currency="wd-hidden",FormCurrency="";else var toggle_currency="wd-inline-block",FormCurrency=window["FormCurrency_"+form_id]+" ";if(0!=jQuery(".paypal_total"+form_id).length){var div_paypal_show=jQuery(".paypal_total"+form_id),div_paypal_products=jQuery(".paypal_products"+form_id),div_paypal_tax=jQuery(".paypal_tax"+form_id),input_paypal_total=jQuery(".input_paypal_total"+form_id),total=0,total_shipping=0;div_paypal_products.html(""),div_paypal_tax.html(""),n=parseInt(jQuery("#counter"+form_id).val()),jQuery("#form"+form_id+" div[type='type_paypal_checkbox'], #form"+form_id+" div[type='type_paypal_radio']").each(function(){var e=jQuery(this).parent();if("none"!=e.css("display")){var t=e.attr("wdid");paypal_checkbox_qty=jQuery("#wdform_"+t+"_element_quantity"+form_id).val()?jQuery("#wdform_"+t+"_element_quantity"+form_id).val():0,jQuery(this).find("input:checked").each(function(){label=jQuery("label[for='"+jQuery(this).attr("id")+"']").html(),span_value='<span class="'+toggle_currency+'">'+FormCurrency+"</span>"+jQuery(this).val()+(0!=jQuery("#wdform_"+t+"_element_quantity"+form_id).length?" x "+paypal_checkbox_qty:""),total+=jQuery(this).val()*parseInt(0!=jQuery("#wdform_"+t+"_element_quantity"+form_id).length?paypal_checkbox_qty:1),div_paypal_products.html(div_paypal_products.html()+"<div>"+label+" - "+span_value+"</div>")})}}),jQuery("#form"+form_id+" div[type='type_paypal_shipping']").each(function(){var e=jQuery(this).parent();if("none"!=e.css("display")){var t=e.attr("wdid");paypal_shipping_qty=jQuery("#wdform_"+t+"_element_quantity"+form_id).val()?jQuery("#wdform_"+t+"_element_quantity"+form_id).val():0,jQuery(this).find("input:checked").each(function(){label=jQuery("label[for='"+jQuery(this).attr("id")+"']").html(),span_value='<span class="'+toggle_currency+'">'+FormCurrency+"</span>"+jQuery(this).val()+(0!=jQuery("#wdform_"+t+"_element_quantity"+form_id).length?" x "+paypal_shipping_qty:""),total_shipping+=jQuery(this).val()*parseInt(0!=jQuery("#wdform_"+t+"_element_quantity"+form_id).length?paypal_shipping_qty:1),div_paypal_products.html(div_paypal_products.html()+"<div>"+label+" - "+span_value+"</div>")})}}),jQuery("#form"+form_id+" div[type='type_paypal_select']").each(function(){var e=jQuery(this).parent();if("none"!=e.css("display")){var t=e.attr("wdid");paypal_select_qty=jQuery("#wdform_"+t+"_element_quantity"+form_id).val()?jQuery("#wdform_"+t+"_element_quantity"+form_id).val():0,""!=jQuery(this).find("select").val()&&(label=jQuery(this).find("select option:selected").html(),span_value='<span class="'+toggle_currency+'">'+FormCurrency+"</span>"+jQuery(this).find("select").val()+(0!=jQuery("#wdform_"+t+"_element_quantity"+form_id).length?" x "+paypal_select_qty:""),total+=jQuery(this).find("select").val()*parseInt(0!=jQuery("#wdform_"+t+"_element_quantity"+form_id).length?paypal_select_qty:1),div_paypal_products.html(div_paypal_products.html()+"<div>"+label+" - "+span_value+"</div>"))}}),jQuery("#form"+form_id+" div[type='type_paypal_price']").each(function(){var e=jQuery(this).parent();if("none"!=e.css("display")){var t=e.attr("wdid");label=jQuery(this).find(".wdform-label").html(),cents="00",dollars="0",""!=jQuery("#wdform_"+t+"_element_dollars"+form_id).val()&&(dollars=jQuery("#wdform_"+t+"_element_dollars"+form_id).val()),""!=jQuery("#wdform_"+t+"_element_cents"+form_id).val()&&(1==jQuery("#wdform_"+t+"_element_cents"+form_id).val().length?cents="0"+jQuery("#wdform_"+t+"_element_cents"+form_id).val():cents=jQuery("#wdform_"+t+"_element_cents"+form_id).val(),span_value='<span class="'+toggle_currency+'">'+FormCurrency+"</span>"+dollars+"."+cents,total+=parseFloat(dollars+"."+cents),div_paypal_products.html(div_paypal_products.html()+"<div>"+label+" - "+span_value+"</div>"))}}),jQuery("#form"+form_id+" div[type='type_paypal_price_new']").each(function(){var e=jQuery(this).parent();if("none"!=e.css("display")){var t=e.attr("wdid");label=jQuery(this).find(".wdform-label").html(),dollars="0",""!=jQuery("#wdform_"+t+"_element"+form_id).val()&&(dollars=jQuery("#wdform_"+t+"_element"+form_id).val()),span_value='<span class="'+toggle_currency+'">'+FormCurrency+"</span>"+dollars,total+=parseFloat(dollars),div_paypal_products.html(div_paypal_products.html()+"<div>"+label+" - "+span_value+"</div>")}});var FormPaypalTax=eval("FormPaypalTax_"+form_id);0!=FormPaypalTax&&div_paypal_tax.html("Tax: "+FormCurrency+(total*FormPaypalTax/100).toFixed(2)),jQuery(".div_total"+form_id).html('<span class="'+toggle_currency+'">'+FormCurrency+"</span>"+(parseFloat((total*(1+FormPaypalTax/100)).toFixed(2))+total_shipping).toFixed(2)),input_paypal_total.val(FormCurrency+(parseFloat((total*(1+FormPaypalTax/100)).toFixed(2))+total_shipping).toFixed(2))}}function check_isnum_or_minus(e){var t=e.which||e.keyCode;return!(45!=t&&31<t&&(t<48||57<t))}function sum_grading_values(e,t){for(var r=0,i=0;i<100;i++)document.getElementById(e+"_element"+t+"_"+i)&&document.getElementById(e+"_element"+t+"_"+i).value&&(r+=parseInt(document.getElementById(e+"_element"+t+"_"+i).value)),document.getElementById(e+"_total_element"+t)&&(r>document.getElementById(e+"_total_element"+t).innerHTML?document.getElementById(e+"_text_element"+t).innerHTML=" "+fm_objectL10n.fm_grading_text+" "+document.getElementById(e+"_total_element"+t).innerHTML:document.getElementById(e+"_text_element"+t).innerHTML="");document.getElementById(e+"_sum_element"+t)&&(document.getElementById(e+"_sum_element"+t).innerHTML=r)}function change_src(e,t,r,i){if(0==fm_rated)for(var n=0;n<=e;n++)document.getElementById(t+"_star_"+n+"_"+r).src=fm_objectL10n.plugin_url+"/images/star_"+i+".png"}function reset_src(e,t,r){if(0==fm_rated)for(var i=0;i<=e;i++)document.getElementById(t+"_star_"+i+"_"+r).src=fm_objectL10n.plugin_url+"/images/star.png"}function select_star_rating(e,t,r,i,n){fm_rated=!0;for(var a=0;a<=e;a++)document.getElementById(t+"_star_"+a+"_"+r).src=fm_objectL10n.plugin_url+"/images/star_"+i+".png";for(var o=e+1;o<=n-1;o++)document.getElementById(t+"_star_"+o+"_"+r).src=fm_objectL10n.plugin_url+"/images/star.png";document.getElementById(t+"_selected_star_amount"+r).value=e+1,jQuery("#"+t+"_selected_star_amount"+r).trigger("change")}function show_other_input(e,t){var r=jQuery(".form"+t+" [id^="+e+"_element"+t+'][other="1"]').parent(),i=document.createElement("br");i.setAttribute("id",e+"_other_br"+t);var n=e.split("_")[1],a=document.createElement("input");a.setAttribute("id",e+"_other_input"+t),a.setAttribute("name",e+"_other_input"+t),a.setAttribute("type","text"),a.setAttribute("class","other_input"),a.setAttribute("onchange","other_input_change(this, '"+t+"', '"+n+"')"),r.children("input").length<2&&(r.append(i),r.append(a))}function other_input_change(e,t,r){""==jQuery(e).val()?wd_is_filled(t,r):(jQuery("#form"+t+" #wd_required_"+r).remove(),jQuery("#form"+t+" div[wdid='"+r+"'] .wdform-label-section:first .error_label").removeClass("error_label"))}function check_isnum(e){var t=e.which||e.keyCode;return-1!=jQuery.inArray(t,[46,8,9,27,13,190])||!0===e.ctrlKey||35<=t&&t<39||45==t||!(31<t&&(t<48||57<t))}function captcha_refresh(e,t){srcArr=document.getElementById(e+t).src.split("&r="),document.getElementById(e+t).src=srcArr[0]+"&r="+Math.floor(100*Math.random()),document.getElementById(e+"_input"+t).value="",document.getElementById(e+t).style.display="inline-block"}function set_checked(e,t,r){return checking=document.getElementById(e+"_element"+r+t),!(checking.getAttribute("other")&&1==checking.getAttribute("other")&&!checking.checked)||(document.getElementById(e+"_other_input"+r)&&(document.getElementById(e+"_other_input"+r).parentNode.removeChild(document.getElementById(e+"_other_br"+r)),document.getElementById(e+"_other_input"+r).parentNode.removeChild(document.getElementById(e+"_other_input"+r))),!1)}function set_default(e,t,r){document.getElementById(e+"_other_input"+r)&&(document.getElementById(e+"_other_input"+r).parentNode.removeChild(document.getElementById(e+"_other_br"+r)),document.getElementById(e+"_other_input"+r).parentNode.removeChild(document.getElementById(e+"_other_input"+r)))}function add_0(e){1==jQuery(e).val().length&&jQuery(e).val("0"+jQuery(e).val())}function wd_validate(e,t){if(!jQuery(e).is("input"))return!0;var r,i,n,a=jQuery(e).val(),o=(jQuery(e).attr("id"),jQuery(e).parent().find(".hidden_date")),d=jQuery(e).data("valid-type"),s=jQuery(e).data("form-id"),l=jQuery(e).data("wdid"),u=o.data("format"),c=new Date(o.data("min")),m=new Date(o.data("max")),_=parseInt(jQuery(e).attr("from")),f=parseInt(jQuery(e).attr("to"));if(void 0===t)t=jQuery(e).data("addiotional-fields");var p="#form"+s+" div[wdid='"+l+"']",y=jQuery(p+" .wdform-label-section:first .wdform-label"),h=jQuery(p+" .wdform-element-section");switch(d){case"hour24":r=fm_objectL10n.time_validation,n=/^(0?[0-1]?[0-9]|2[0-3])?$/;break;case"hour12":r=fm_objectL10n.time_validation,n=/^(0?[0-9]|1[0-2])?$/;break;case"minute":case"second":r=fm_objectL10n.time_validation,n=/^([0-5]?[0-9])?$/;break;case"number":r=fm_objectL10n.number_validation,n=/^\-{0,1}\d+(.\d+){0,1}$/;break;case"quantity":r=fm_objectL10n.number_validation,n=/^[+]?\d+([.]\d+)?$/;break;case"day":r=fm_objectL10n.date_validation,n=/^(0?[0-2]?[0-9]|3[0-1])?$/;break;case"month":r=fm_objectL10n.date_validation,n=/^(0?[0-9]|1[0-2])?$/;break;case"year":r=fm_objectL10n.date_validation,n=/^([1-2]?[0-9]?[0-9]?[0-9])?$/;break;case"date":n="mm/dd/yy"==u?(r=fm_objectL10n.date_validation,/^(0[1-9]|1[0-2])\/(0[1-9]|[1-2][0-9]|3[01])\/\d{4}$/):(r="",/^$/)}if(i=n.test(a),""!=a&&"mm/dd/yy"==u||(i=!0),i)for(var w in t)if(!(i=wd_validate("#"+t[w],"")))break;return"year"==d&&(parseInt(a)<_||parseInt(a)>f)&&(i=!1,r=fm_objectL10n.year_validation.replace("%%start%%",_).replace("%%end%%",f)),"date"==d&&(new Date(a)<c||new Date(a)>m)&&(i=!1,r=fm_objectL10n.date_validation),jQuery("#check_email_"+l+"_"+s).remove(),i?(y.removeClass("wd-error-label"),delete window["check_before_submit"+s][l+"_"+s]):(h.parent().parent().append("<div id='check_email_"+l+"_"+s+"' class='fm-not-filled'>"+r+"</div>"),y.addClass("wd-error-label"),window["check_before_submit"+s][l+"_"+s]=!1),i}function check_isnum_interval(e,t,r,i){var n=e.which||e.keyCode;return-1!=jQuery.inArray(n,[46,8,9,27,13,190])||!0===e.ctrlKey||35<=n&&n<39||!(31<n&&(n<48||57<n))&&(val1=""+jQuery(t).val()+String.fromCharCode(n),!(2<val1.length)&&("00"!=val1&&!(val1<r||val1>i)))}function destroyChildren(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function generate_page_nav(e,t,r){var i;if(form_view=e,page_nav=document.getElementById(t+"page_nav"+e),destroyChildren(page_nav),form_view_elemet=document.getElementById(t+"form_view"+e),remove_whitespace(form_view_elemet.parentNode.parentNode),display_none_form_views_all(t),form_view_elemet.parentNode.style.display="",(i=document.createElement("div")).setAttribute("valign","middle"),i.setAttribute("align","left"),i.style.display="table-cell",i.style.width="40%",page_nav.appendChild(i),form_view_elemet.parentNode.previousSibling&&-1!=form_view_elemet.parentNode.previousSibling.className.indexOf("wdform-page-and-images")&&form_view_elemet.parentNode.previousSibling.previousSibling&&("DIV"==form_view_elemet.parentNode.previousSibling.tagName?table=form_view_elemet.parentNode.previousSibling:"DIV"==form_view_elemet.parentNode.previousSibling.previousSibling.tagName?table=form_view_elemet.parentNode.previousSibling.previousSibling:table="none","none"!=table&&(table.firstChild.tagName||table.removeChild(table.firstChild),previous_title=form_view_elemet.getAttribute("previous_title"),previous_type=form_view_elemet.getAttribute("previous_type"),"text"==previous_type&&i.setAttribute("class","previous-page"),previous_class=form_view_elemet.getAttribute("previous_class"),previous_checkable=form_view_elemet.getAttribute("previous_checkable"),next_or_previous="previous",previous=make_pagebreak_button(next_or_previous,previous_title,previous_type,previous_class,previous_checkable,e,t,r),i.appendChild(previous))),(i=document.createElement("div")).setAttribute("id",t+"page_numbers"+form_view),i.setAttribute("valign","middle"),i.setAttribute("class","page-numbers"),i.setAttribute("align","center"),i.style.display="table-cell","true"==document.getElementById("fm-pages"+t).getAttribute("show_numbers")){var n=document.createElement("span");n.setAttribute("class","page_numbers"),i.appendChild(n)}page_nav.appendChild(i),(i=document.createElement("div")).setAttribute("valign","middle"),i.setAttribute("align","right"),i.style.cssText="display:table-cell; width:40%; text-align:right;",page_nav.appendChild(i),not_next=!1,form_view_elemet.parentNode.nextSibling?("DIV"==form_view_elemet.parentNode.nextSibling.tagName&&-1!=form_view_elemet.parentNode.nextSibling.className.indexOf("wdform-page-and-images")?table=form_view_elemet.parentNode.nextSibling:form_view_elemet.parentNode.nextSibling.nextSibling&&"DIV"==form_view_elemet.parentNode.nextSibling.nextSibling.tagName?table=form_view_elemet.parentNode.nextSibling.nextSibling:table="none","none"!=table?(next_title=form_view_elemet.getAttribute("next_title"),next_type=form_view_elemet.getAttribute("next_type"),"text"==next_type&&i.setAttribute("class","next-page"),next_class=form_view_elemet.getAttribute("next_class"),next_checkable=form_view_elemet.getAttribute("next_checkable"),next_or_previous="next",next=make_pagebreak_button(next_or_previous,next_title,next_type,next_class,next_checkable,e,t,r),i.appendChild(next)):not_next=!0):not_next=!0,generate_page_bar(e,t,r),fm_initilize_form(t)}function fm_initilize_form(e){jQuery("#form"+e+" div[type='type_map']").each(function(){for(id=jQuery(this).parent().attr("wdid"),if_gmap_init("wdform_"+id,e),q=0;q<20;q++)jQuery("#wdform_"+id+"_element"+e)[0].getAttribute("long"+q)&&(w_long=parseFloat(document.getElementById("wdform_"+id+"_element"+e).getAttribute("long"+q)),w_lat=parseFloat(document.getElementById("wdform_"+id+"_element"+e).getAttribute("lat"+q)),w_info=parseFloat(document.getElementById("wdform_"+id+"_element"+e).getAttribute("info"+q)),add_marker_on_map("wdform_"+id,q,w_long,w_lat,w_info,e,!1))}),jQuery("#form"+e+" div[type='type_mark_map']").each(function(){id=jQuery(this).parent().attr("wdid"),if_gmap_init("wdform_"+id,e),q=0,jQuery("#wdform_"+id+"_element"+e)[0].getAttribute("long"+q)&&(w_long=parseFloat(document.getElementById("wdform_"+id+"_element"+e).getAttribute("long"+q)),w_lat=parseFloat(document.getElementById("wdform_"+id+"_element"+e).getAttribute("lat"+q)),w_info=parseFloat(document.getElementById("wdform_"+id+"_element"+e).getAttribute("info"+q)),add_marker_on_map("wdform_"+id,q,w_long,w_lat,w_info,e,!0))}),jQuery(".wdform-element-section").each(function(){if("type_stripe"==jQuery(this).parent().attr("type")){jQuery(this).parent().parent().find(".stripe_more_info .wdform-label-section").removeClass("wd-hidden");return!0}jQuery(this).parent()[0].style.width||0==parseInt(jQuery(this).width())||0==jQuery(this).parent().find(jQuery(".wdform-label-section")).length||"table-cell"==jQuery(this).css("display")&&("type_captcha"!=jQuery(this).parent().attr("type")?jQuery(this).parent().css("width",parseInt(jQuery(this).width())+parseInt(jQuery(this).parent().find(jQuery(".wdform-label-section"))[0].style.width)+15):jQuery(this).parent().css("width",2*parseInt(jQuery(this).parent().find(jQuery(".captcha_input"))[0].style.width)+50+parseInt(jQuery(this).parent().find(jQuery(".wdform-label-section"))[0].style.width)+15))})}function display_none_form_views_all(e){jQuery("#form"+e+" .wdform-page-and-images").css("display","none")}function generate_page_bar(t,r,e){if("steps"==document.getElementById("fm-pages"+r).getAttribute("type")?make_page_steps_front(t,r,e):"percentage"==document.getElementById("fm-pages"+r).getAttribute("type")?make_page_percentage_front(t,r,e):make_page_none_front(r),"true"==document.getElementById("fm-pages"+r).getAttribute("show_numbers")){if(td=document.getElementById(r+"page_numbers"+t),td){destroyChildren(td);var i=0,n=0;jQuery("#form"+r+" .wdform-page-and-images").each(function(){var e=jQuery(this).find(".wdform_page").attr("id");j=e.split("form_view")[1],document.getElementById(r+"form_view"+j)&&(i++,j==t&&(n=i))});var a=document.createElement("span");a.setAttribute("class","page_numbers"),a.innerHTML=n+"/"+i,td.appendChild(a)}}else td=document.getElementById(r+"page_numbers"+t),td&&destroyChildren(document.getElementById(r+"page_numbers"+t))}function make_page_steps_front(t,r,i){destroyChildren(document.getElementById("fm-pages"+r)),show_title="true"==document.getElementById("fm-pages"+r).getAttribute("show_title"),next_checkable="true"==document.getElementById(r+"form_view"+t).getAttribute("next_checkable"),previous_checkable="true"==document.getElementById(r+"form_view"+t).getAttribute("previous_checkable"),k=0,jQuery("#form"+r+" .wdform-page-and-images").each(function(){var e=jQuery(this).find(".wdform_page").attr("id");j=e.split("form_view")[1],document.getElementById(r+"form_view"+j)&&(document.getElementById(r+"form_view"+j).getAttribute("page_title")?w_pages=document.getElementById(r+"form_view"+j).getAttribute("page_title"):w_pages="",k++,page_number=document.createElement("span"),page_number.setAttribute("id","page_"+j),j<t&&(previous_checkable?page_number.setAttribute("onClick","if(fm_check("+t+", "+r+', false)) generate_page_nav("'+j+'", "'+r+'", "'+i+'")'):page_number.setAttribute("onClick",'generate_page_nav("'+j+'", "'+r+'", "'+i+'")')),j>t&&(next_checkable?page_number.setAttribute("onClick","if(fm_check("+t+", "+r+', false)) generate_page_nav("'+j+'", "'+r+'", "'+i+'")'):page_number.setAttribute("onClick",'generate_page_nav("'+j+'", "'+r+'", "'+i+'")')),j==t?page_number.setAttribute("class","page_active"):page_number.setAttribute("class","page_deactive"),show_title?page_number.innerHTML=w_pages:page_number.innerHTML=k,document.getElementById("fm-pages"+r).appendChild(page_number))})}function make_page_percentage_front(t,r,e){destroyChildren(document.getElementById("fm-pages"+r)),show_title="true"==document.getElementById("fm-pages"+r).getAttribute("show_title");var i=document.createElement("div");i.setAttribute("class","page_percentage_deactive");var n=document.createElement("div");n.setAttribute("id","div_percentage"),n.setAttribute("class","page_percentage_active"),n.setAttribute("align","right");var a=document.createElement("div");a.setAttribute("class","wdform_percentage_arrow");var o=document.createElement("b");o.setAttribute("class","wdform_percentage_text"),n.appendChild(o),k=0,cur_page_title="",jQuery(".form"+r+" .wdform-page-and-images").each(function(){var e=jQuery(this).find(".wdform_page").attr("id");j=e.split("form_view")[1],document.getElementById(r+"form_view"+j)&&(document.getElementById(r+"form_view"+j).getAttribute("page_title")?w_pages=document.getElementById(r+"form_view"+j).getAttribute("page_title"):w_pages="",k++,j==t&&(show_title&&(cur_page_title=document.createElement("div"),cur_page_title.innerHTML=w_pages,cur_page_title.innerHTML=w_pages,cur_page_title.setAttribute("class","wdform_percentage_title")),page_number=k))}),o.innerHTML=Math.round((page_number-1)/(k-1)*100)+"%",n.style.width=(page_number-1)/(k-1)*100+"%",1==page_number&&(a.style.display="none"),i.appendChild(n),i.appendChild(a),cur_page_title&&i.appendChild(cur_page_title),document.getElementById("fm-pages"+r).appendChild(i)}function make_page_none_front(e){destroyChildren(document.getElementById("fm-pages"+e))}function make_pagebreak_button(e,t,r,i,n,a,o,d){switch(r){case"text":return(s=document.createElement("div")).setAttribute("id","page_"+e+"_"+a+"_"+o),s.setAttribute("class",i),"true"==n?s.setAttribute("onClick","if(fm_check("+a+", "+o+", false)) page_"+e+"("+a+","+o+","+d+")"):s.setAttribute("onClick","page_"+e+"("+a+","+o+","+d+")"),s.innerHTML=t,s;case"img":var s;return(s=document.createElement("img")).setAttribute("id","page_"+e+"_"+a),s.setAttribute("class",i),"true"==n?s.setAttribute("onClick","if(fm_check("+a+", "+o+", false)) page_"+e+"("+a+","+o+","+d+")"):s.setAttribute("onClick","page_"+e+"("+a+","+o+","+d+")"),0==t.indexOf("http")?s.src=t:s.src=fm_objectL10n.plugin_url+"/"+t,s}}function form_maker_findPos(e){var t=0;if(e.offsetParent){for(;t+=e.offsetTop,e=e.offsetParent;);return[t]}}function page_previous(e,t,r){form_view_elemet=document.getElementById(t+"form_view"+e),form_view_elemet.parentNode.previousSibling&&form_view_elemet.parentNode.previousSibling.previousSibling&&("DIV"==form_view_elemet.parentNode.previousSibling.tagName?table=form_view_elemet.parentNode.previousSibling:table=form_view_elemet.parentNode.previousSibling.previousSibling),table.firstChild.tagName||table.removeChild(table.firstChild),generate_page_nav(table.firstChild.id.replace(t+"form_view",""),t,r),form=jQuery("#form"+t),form.parent().hasClass("fm-scrollbox-form")||(jQuery("html").animate({scrollTop:form.offset().top-150},500),document.scrollingElement.scrollTop=form.offset().top-150)}function page_next(e,t,r){form_view_elemet=document.getElementById(t+"form_view"+e),form_view_elemet.parentNode.nextSibling&&("DIV"==form_view_elemet.parentNode.nextSibling.tagName?table=form_view_elemet.parentNode.nextSibling:table=form_view_elemet.parentNode.nextSibling.nextSibling),table.firstChild.tagName||table.removeChild(table.firstChild),generate_page_nav(table.firstChild.id.replace(t+"form_view",""),t,r),form=jQuery("#form"+t),form.parent().hasClass("fm-scrollbox-form")||(jQuery("html").animate({scrollTop:form.offset().top-150},500),document.scrollingElement.scrollTop=form.offset().top-150)}function fm_go_to_page(e,t,r){form_view_elemet=document.getElementById(t+"form_view"+e),table=form_view_elemet.parentNode,table.firstChild.tagName||table.removeChild(table.firstChild),generate_page_nav(table.firstChild.id.replace(t+"form_view",""),t,r),form=jQuery("#form"+t),form.parent().hasClass("fm-scrollbox-form")||(jQuery("html").animate({scrollTop:form.offset().top-150},500),document.scrollingElement.scrollTop=form.offset().top-150)}function getfileextension(e,t){if(void 0===e||0==e.length)return!0;var r=e.lastIndexOf("."),i=e.substr(r+1,e.length);t=t.split(",");for(var n=0;n<t.length;n++)if(t[n]=t[n].replace(/\./g,""),t[n]=t[n].replace(/ /g,""),i.toLowerCase()==t[n].toLowerCase())return!0;return!1}function reselect(e,t){t=void 0!==t?t:"",jQuery(e).wrap('<div class="sel-wrap '+t+'"/>');var r="",i=!1;jQuery(e).children("option").each(function(){jQuery(this).is(":selected")&&(i=jQuery(this).index()),r=r+'<div class="sel-option" value="'+jQuery(this).val()+'">'+jQuery(this).html()+"</div>"}),w=jQuery(e)[0].style.width,"100%"==w?w="100%":w=jQuery(e).width()+32+"px";var n='<div class="sel-imul" style="width:'+w+'"> <div class="sel-selected"> <div class="selected-text">'+jQuery(e).children("option").eq(i).html()+'</div> <div class="sel-arraw"></div> </div> <div class="sel-options">'+r+"</div> </div>";jQuery(e).addClass("no-width"),jQuery(e).before(n)}jQuery(window).on("load",function(){0<jQuery(".g-recaptcha").length&&1!=jQuery(".g-recaptcha").data("render")&&fmRecaptchaInit(0),validate_received_data_from_url(),jQuery(".submissions").length&&jQuery(".submissions td").each(function(){"0"==jQuery(this).data("status")&&jQuery(this).parent().hide()})}),jQuery(document).on("change",'.wdform-element-section input[type="checkbox"],.wdform-element-section input[type="radio"], .wdform-quantity',function(){var e=jQuery(this).closest(".wdform-field").attr("data-limit"),t=jQuery(this).closest(".wdform-field").attr("data-limit-text"),r=jQuery(this).closest(".wdform-element-section").find("input[type='checkbox']:checked").length,i=jQuery(this).closest(".wdform-element-section").find(".other_input");e<r?(this.checked=!1,1==this.getAttribute("other")&&(r.checked||i&&(i.prev("br").remove(),i.remove())),jQuery(this).closest(".wdform-field").find(".wdform-label").addClass("error_label"),0==jQuery(".fm-error").length&&jQuery(this).closest(".wdform_row").append("<div class='fm-error'>"+t+"</div>")):(jQuery(this).closest(".wdform-field").find(".wdform-label").removeClass("error_label"),jQuery(".fm-error").remove())}),jQuery(document).on("change",".wdform-element-section select",function(){var e=jQuery(this).children("option:selected").text();jQuery(this).parent(".sel-wrap ").children(".sel-imul").children(".sel-selected").children(".selected-text").html(e),jQuery(this).parent(".sel-wrap ").children(".sel-imul").children(".sel-options").children(".sel-option").removeClass("sel-ed"),jQuery(this).addClass("sel-ed"),jQuery(this).parent(".sel-wrap ").children(".sel-imul").children(".sel-options").each(function(){jQuery(this).html()==e&&jQuery(this).addClass("sel-ed")})}),jQuery(document).on("change",'div[type="type_date_fields"]',function(){2<jQuery(this).find("select.sel-ed").length&&(jQuery(this).next(".fm-not-valid-date, .fm-not-filled").remove(),jQuery(this).find(".wdform-label").removeClass("error_label"))}),jQuery(document).on("click",".sel-imul",function(){jQuery(".sel-imul").removeClass("act"),jQuery(this).addClass("act"),jQuery(this).children(".sel-options").is(":visible")?jQuery(".sel-options").hide():(jQuery(".sel-options").hide(),jQuery(this).children(".sel-options").show(),jQuery(this).children(".sel-options").css("width",jQuery(this).width()))}),jQuery(document).on("click",".sel-option",function(){var e=jQuery(this).html();jQuery(this).parent(".sel-options").parent(".sel-imul").children(".sel-selected").children(".selected-text").html(e),jQuery(this).parent(".sel-options").children(".sel-option").removeClass("sel-ed"),jQuery(this).addClass("sel-ed");var t=jQuery(this).attr("value");t=void 0!==t?t:e,jQuery(this).parent(".sel-options").parent(".sel-imul").parent(".sel-wrap").children("select").children("option").prop("selected",!1).each(function(){jQuery(this).html()==e&&jQuery(this).attr("selected","select")}),jQuery(this).parent(".sel-options").parent(".sel-imul").parent(".sel-wrap").children("select").change()});var selenter=!1;function remove_whitespace(e){var t;for(t=0;t<e.childNodes.length;t++)e.childNodes[t]&&"3"==e.childNodes[t].nodeType&&!/\S/.test(e.childNodes[t].nodeValue)?(e.removeChild(e.childNodes[t]),t--):e.childNodes[t].childNodes.length&&remove_whitespace(e.childNodes[t])}function change_value_range(e,t,r,i,n){r?jQuery("#"+e).datepicker("option",t,r):"today"==i?jQuery("#"+e).datepicker("option",t,new Date):(-1==i.indexOf("d")&&-1==i.indexOf("m")&&-1==i.indexOf("y")&&-1==i.indexOf("w")&&""!=i&&(i=jQuery.datepicker.formatDate(n,new Date(i))),jQuery("#"+e).datepicker("option",t,i))}function wd_check_confirmation_email(e,t,r,i){var n=jQuery("#wdform_"+e+"_element"+t),a=jQuery("#wdform_"+e+"_1_element"+t);0==window["check_before_submit"+t][e+"_"+t]||jQuery(n).val()!=jQuery(a).val()?(jQuery("#confirm_"+e+"_"+t).remove(),jQuery("#form"+t+" div[wdid='"+e+"'] .wdform-label-section:eq( 1 ) .error_label_confirm").removeClass("error_label_confirm"),jQuery(n).val()!=jQuery(a).val()&&(jQuery(a).parent().parent().parent().append("<div id='confirm_"+e+"_"+t+"' class='fm-not-filled'>"+r+"</div>"),jQuery("#form"+t+" div[wdid='"+e+"'] .wdform-label-section:eq( 1 ) .wdform-label").addClass("error_label_confirm")),window["check_before_submit"+t][e+"_"+t]=!(e+"_"+t in window["check_before_submit"+t])||window["check_before_submit"+t][e+"_"+t]):(jQuery("#confirm_"+e+"_"+t).remove(),jQuery("#form"+t+" div[wdid='"+e+"'] .wdform-label-section:eq( 1 ) .error_label_confirm").removeClass("error_label_confirm"),1==window["check_before_submit"+t][e+"_"+t]&&delete window["check_before_submit"+t][e+"_"+t])}function wd_check_email(e,t,r){var i=jQuery("#wdform_"+e+"_element"+t),n=jQuery("#wdform_"+e+"_1_element"+t);if(""==jQuery(i).val()||/^[\u0400-\u04FFa-zA-Z0-9'.+_-]+@[\u0400-\u04FFa-zA-Z0-9.-]+\.[\u0400-\u04FFa-zA-Z]{2,61}$/.test(jQuery.trim(jQuery(i).val()))||jQuery(i).attr("title")==jQuery(i).val())jQuery("#check_email_"+e+"_"+t).remove(),jQuery("#form"+t+" div[wdid='"+e+"'] .wdform-label-section:first .error_label_check_mail").removeClass("error_label_check_mail"),window["check_before_submit"+t][e+"_"+t]=!0,void 0===n.val()&&delete window["check_before_submit"+t][e+"_"+t];else{jQuery("#check_email_"+e+"_"+t).remove();var a=jQuery("#form"+t+" div[wdid='"+e+"'] .wdform-label-section:first"),o=0;a.hasClass("wd-width-30")&&!a.hasClass("wd-hidden")&&(o=a.width()),jQuery(i).parent().parent().parent().append("<div id='check_email_"+e+"_"+t+"' class='fm-not-filled' style='margin-left: "+o+"px'>"+r+"</div>"),jQuery("#form"+t+" div[wdid='"+e+"'] .wdform-label-section:first .wdform-label").addClass("error_label_check_mail"),i.val()==n.val()&&(jQuery("#confirm_"+e+"_"+t).remove(),jQuery("#form"+t+" div[wdid='"+e+"'] .wdform-label-section:eq( 1 ) .error_label_confirm").removeClass("error_label_confirm")),delete window["check_before_submit"+t][e+"_"+t],window["check_before_submit"+t][e+"_"+t]=!1}}function wd_check_confirmation_pass(e,t,r){var i,n=jQuery("#wdform_"+e+"_element"+t),a=jQuery("#wdform_"+e+"_1_element"+t);i=n.val()!==a.val();var o=jQuery("#form"+t+" div[wdid='"+e+"'] .wdform-label-section:first"),d=0;o.hasClass("wd-width-30")&&!o.hasClass("wd-hidden")&&(d=o.width()),i?(jQuery("#confirm_"+e+"_"+t).remove(),jQuery(a).parent().parent().parent().append("<div id='confirm_"+e+"_"+t+"' class='fm-not-filled' style='margin-left: "+d+"px'>"+r+"</div>"),jQuery("#form"+t+" div[wdid='"+e+"'] .wdform-label-section:eq( 1 ) .wdform-label").addClass("error_label_check_pass"),window["check_before_submit"+t][e+"_"+t]=!1):(jQuery("#confirm_"+e+"_"+t).remove(),jQuery("#form"+t+" div[wdid='"+e+"'] .wdform-label-section:eq( 1 ) .error_label_check_pass").removeClass("error_label_check_pass"),delete window["check_before_submit"+t][e+"_"+t])}function minimize_form(e){jQuery("#fm-scrollbox"+e).removeClass("fm-animated fadeInUp").addClass("fm-animated fadeOutDown fm-minimized"),jQuery("#fm-minimize-text"+e).removeClass("fm-animated fadeOutDown").addClass("fm-show fm-animated fadeInUp")}function fm_show_scrollbox(e){jQuery("#fm-minimize-text"+e).removeClass("fm-animated fadeInUp").addClass("fm-animated fadeOutDown"),jQuery("#fm-scrollbox"+e).removeClass("fm-animated fadeOutDown fm-minimized").addClass("fm-show fm-animated fadeInUp")}function fm_hide_form(e,t,r){var i=new Date;i.setDate(i.getDate()+t),0<t&&localStorage.setItem("hide-"+e,i.getTime()),"function"==typeof r&&r()}function wd_check_regExp(o,d){var s=jQuery("#form"+o),l=!1,e=d||window["check_regExp_all"+o];return jQuery.each(e,function(e,t){var r="#wdform_"+e+"_element"+o,i="",n=unescape(t[0]),a=s.find(jQuery("div[wdid='"+e+"']"));i=t[1].length<=0?new RegExp(n):new RegExp(n,t[1]),0!=s.find(jQuery("div[wdid='"+e+"']")).length&&"none"!=s.find(jQuery("div[wdid='"+e+"']")).css("display")&&(jQuery("#form"+o+" #wd_exp_"+e).remove(),""==jQuery(r).val()&&0==a.find(".wdform-required").length?(l=!0,s.find(jQuery("div[wdid='"+e+"'] .wdform-element-section")).parent().parent().append("<div id='wd_exp_"+e+"' class='fm-not-filled'>"+t[2]+"</div>"),jQuery("#form"+o+" div[wdid='"+e+"'] .wdform-label-section:first .wdform-label").addClass("error_label_exp"),scroll_on_element(o)):jQuery(r).val()!=jQuery(r).attr("title")&&1!=i.test(jQuery(r).val())&&(s.find(jQuery("div[wdid='"+e+"'] .wdform-element-section")).parent().parent().append("<div id='wd_exp_"+e+"' class='fm-not-filled'>"+t[2]+"</div>"),jQuery("#form"+o+" div[wdid='"+e+"'] .wdform-label-section:first .wdform-label").addClass("error_label_exp"),l=!0,d||scroll_on_element(o)))}),!1===l}function scroll_on_element(e){if(0==jQuery("#form"+e+" .fm-not-filled").length)return!0;var t=!0;0==jQuery("#fm_shake"+e).val()&&(t=!1);var r=jQuery("#form"+e+" .fm-not-filled").closest(".wdform_row"),i=r.closest(".wdform_page");if("none"==i.parent().css("display")){var n=jQuery("#form"+e+" .wdform-page-and-images").length,a=jQuery("#form"+e+" .wdform_page").last().attr("id");a=a.split("form_view");var o=i.attr("id");fm_go_to_page(o=o.split("form_view")[1],e,n,a[1])}var d=jQuery(document).scrollTop(),s=document.body.clientHeight,l=jQuery("#form"+e+" .fm-not-filled").closest("div[wdid]").height(),u=jQuery("#form"+e+" .fm-not-filled").offset().top,c=function(){document.body.clientHeight!==s&&(s=document.body.clientHeight,l=jQuery("#form"+e+" .fm-not-filled").closest("div[wdid]").height(),u=jQuery("#form"+e+" .fm-not-filled").offset().top,jQuery("html").stop(),_())};function m(e){e&&(old_bg=jQuery(r).css("background-color"),jQuery(r).effect("shake",{},500).css("background-color","#FF8F8B").animate({backgroundColor:old_bg},{duration:500,queue:!1}))}function _(){jQuery("html").animate({scrollTop:u-(l+40)},500,function(){document.scrollingElement.scrollTop=u-(l+40),jQuery(window).off("scroll",c),m(t)})}jQuery(window).on("scroll",c),u<d?_():m(t)}function wd_file_upload_check(i,e){var n=jQuery("#form"+i),a=!1,t=e||window["file_upload_check"+i];return jQuery.each(t,function(e,t){var r="#wdform_"+e+"_element"+i;0!=n.find(jQuery("div[wdid='"+e+"']")).length&&"none"!=n.find(jQuery("div[wdid='"+e+"']")).css("display")&&(ext_available=getfileextension(jQuery(r).val(),t),ext_available?(jQuery("#form"+i+" #wd_upload_type_"+e).remove(),jQuery("#form"+i+" div[wdid='"+e+"'] .wdform-label-section:first .error_label_upload").removeClass("error_label_upload")):(jQuery("#form"+i+" #wd_upload_type_"+e).remove(),n.find(jQuery("div[wdid='"+e+"'] .wdform-element-section")).parent().parent().append("<div id='wd_upload_type_"+e+"' class='fm-not-filled'>"+fm_objectL10n.fm_file_type_error+"</div>"),jQuery("#form"+i+" div[wdid='"+e+"'] .wdform-label-section:first .wdform-label").addClass("error_label_upload"),a=!0))}),e||!0!==a||scroll_on_element(i),!1===a}function wd_is_filled(l,u,c){null==c&&(c=!0);var m=jQuery("#form"+l),e=u?u.split():window["required_fields"+l],_={};return jQuery(e).each(function(e,i){if("none"===m.find(jQuery("div[wdid='"+i+"']")).css("display")&&(m.find(jQuery("div[wdid='"+i+"']")).find(".fm-not-filled").remove(),m.find(jQuery("div[wdid='"+i+"']")).css("background-color",""),m.find(jQuery("div[wdid='"+i+"'] label")).removeClass("error_label")),0!=m.find(jQuery("div[wdid='"+i+"']")).length&&"none"!==m.find(jQuery("div[wdid='"+i+"']")).css("display"))switch(window["labels_and_ids"+l][i]){case"type_text":case"type_textarea":case"type_paypal_price_new":case"type_spinner":case"type_number":case"type_phone_new":case"type_submitter_mail":var t="#wdform_"+i+"_element"+l,r=jQuery(t).val();r=jQuery.trim(r),(c||"none"!=m.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&""==r&&(_[i]=t),u||window["check_submit"+l]||jQuery(t).focus(function(){jQuery("#form"+l+" #wd_required_"+i).remove(),jQuery("#form"+l+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label")}).blur(function(){wd_is_filled(l,i)});break;case"type_own_select":case"type_country":case"type_paypal_select":t="#wdform_"+i+"_element"+l;(c||"none"!=m.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&(""==jQuery(t).val()||jQuery("#wdform_"+i+"_element_quantity"+l)&&!parseInt(jQuery("#wdform_"+i+"_element_quantity"+l).val()))&&(_[i]=t),u||window["check_submit"+l]||jQuery(t).focus(function(){jQuery("#form"+l+" #wd_required_"+i).remove(),jQuery("#form"+l+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label")}).blur(function(){wd_is_filled(l,i)}).change(function(){jQuery("#form"+l+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),wd_is_filled(l,i)});break;case"type_phone":t=["#wdform_"+i+"_element_first"+l,"#wdform_"+i+"_element_last"+l];jQuery.each(t,function(e,t){(c||"none"!=m.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&""==jQuery(t).val()&&(_[i]=t),u||window["check_submit"+l]||jQuery(t).focus(function(){jQuery("#form"+l+" #wd_required_"+i).remove(),jQuery("#form"+l+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label")}).blur(function(){wd_is_filled(l,i)})});break;case"type_name":t=["#wdform_"+i+"_element_title"+l,"#wdform_"+i+"_element_first"+l,"#wdform_"+i+"_element_last"+l,"#wdform_"+i+"_element_middle"+l];jQuery.each(t,function(e,t){if((c||"none"!=m.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&jQuery(t).length){var r=jQuery(t).val();""==(r=jQuery.trim(r))&&void 0!==r&&(_[i]=t)}u||window["check_submit"+l]||jQuery(t).focus(function(){jQuery("#form"+l+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),jQuery("#form"+l+" #wd_required_"+i).remove()}).blur(function(){wd_is_filled(l,i)})});break;case"type_address":t=["#wdform_"+i+"_street1"+l,"#wdform_"+i+"_city"+l,"#wdform_"+i+"_state"+l,"#wdform_"+i+"_postal"+l,"#wdform_"+i+"_country"+l];jQuery.each(t,function(e,t){if(c||"none"!=m.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display")){var r=jQuery(t).val();void 0!==r&&(r=jQuery.trim(r)),""==r&&void 0!==jQuery(t).closest(".wd-address").css("display")&&"none"!=jQuery(t).closest(".wd-address").css("display")&&0<jQuery(t).length&&(_[i]=t)}u||window["check_submit"+l]||jQuery(t).focus(function(){jQuery("#form"+l+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),jQuery("#form"+l+" #wd_required_"+i).remove()}).blur(function(){wd_is_filled(l,i)})});break;case"type_checkbox":case"type_radio":case"type_scale_rating":case"type_paypal_checkbox":case"type_paypal_radio":case"type_paypal_shipping":(c||"none"!=m.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&(0==m.find(jQuery("div[wdid='"+i+"'] input:checked")).length||""==jQuery("#wdform_"+i+"_other_input"+l).val()||jQuery("#wdform_"+i+"_element_quantity"+l)&&!parseInt(jQuery("#wdform_"+i+"_element_quantity"+l).val()))&&(_[i]=!0),u||window["check_submit"+l]||jQuery.each(jQuery("#form"+l+" div[wdid='"+i+"'] input"),function(e,t){jQuery(this).change(function(){0==m.find(jQuery("div[wdid='"+i+"'] input:checked")).length||""==jQuery("#wdform_"+i+"_other_input"+l).val()||jQuery("#wdform_"+i+"_element_quantity"+l)&&!parseInt(jQuery("#wdform_"+i+"_element_quantity"+l).val())?wd_is_filled(l,i):(jQuery("#form"+l+" #wd_required_"+i).remove(),jQuery("#form"+l+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"))})});break;case"type_star_rating":t="#wdform_"+i+"_selected_star_amount"+l;(c||"none"!=m.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&""==jQuery(t).val()&&(_[i]=!0),u||window["check_submit"+l]||jQuery("#wdform_"+i+"_element"+l).click(function(){""!=jQuery(t).val()&&(jQuery("#form"+l+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),jQuery("#form"+l+" #wd_required_"+i).remove())});break;case"type_range":t=["#wdform_"+i+"_element"+l+"0","#wdform_"+i+"_element"+l+"1"];jQuery.each(t,function(e,t){(c||"none"!=m.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&""==jQuery(t).val()&&(_[i]=t),u||window["check_submit"+l]||jQuery(t).focus(function(){jQuery("#form"+l+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),jQuery("#form"+l+" #wd_required_"+i).remove()}).blur(function(){wd_is_filled(l,i)})});break;case"type_grading":if(c||"none"!=m.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display")){var n=0;jQuery.each(jQuery("#wdform_"+i+"_element"+l+" input"),function(e,t){""!=jQuery(this).val()&&n++}),0==n&&(_[i]=!0)}u||window["check_submit"+l]||jQuery.each(jQuery("#wdform_"+i+"_element"+l+" input"),function(e,t){jQuery(this).focus(function(){jQuery("#form"+l+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),jQuery("#form"+l+" #wd_required_"+i).remove()}).blur(function(){wd_is_filled(l,i)})});break;case"type_slider":var a="#wdform_"+i+"_element"+l,o=(t="#wdform_"+i+"_slider_value"+l,"#wdform_"+i+"_element_min"+l);(c||"none"!=m.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&jQuery(t).val()==jQuery(o).html()&&(_[i]=!0),u||window["check_submit"+l]||jQuery(a).slider({change:function(e,t){jQuery("#form"+l+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),jQuery("#form"+l+" #wd_required_"+i).remove(),wd_is_filled(l,i)}});break;case"type_date":case"type_date_new":t="#wdform_"+i+"_element"+l;(c||"none"!=m.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&""==jQuery(t).val()&&(_[i]=t),u||window["check_submit"+l]||jQuery(t).focus(function(){jQuery("#form"+l+" #wd_required_"+i).remove()}).change(function(){jQuery("#form"+l+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),wd_is_filled(l,i)});break;case"type_date_range":t=["#wdform_"+i+"_element"+l+"0","#wdform_"+i+"_element"+l+"1"];jQuery.each(t,function(e,t){(c||"none"!=m.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&""==jQuery(t).val()&&(_[i]=t),u||window["check_submit"+l]||jQuery(t).focus(function(){jQuery("#form"+l+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),jQuery("#form"+l+" #wd_required_"+i).remove()}).change(function(){wd_is_filled(l,i)})});break;case"type_date_fields":t=["#wdform_"+i+"_day"+l,"#wdform_"+i+"_month"+l,"#wdform_"+i+"_year"+l];jQuery.each(t,function(e,t){(c||"none"!=m.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&""==jQuery(t).val()&&(_[i]=t),u||window["check_submit"+l]||jQuery(t).focus(function(){jQuery("#form"+l+"div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),jQuery("#form"+l+"#wd_required_"+i).remove(),jQuery("#check_min_date_"+i+"_"+l).remove()}).blur(function(){wd_is_filled(l,i)}).change(function(){wd_is_filled(l,i)})});break;case"type_time":t=["#wdform_"+i+"_hh"+l,"#wdform_"+i+"_mm"+l,"#wdform_"+i+"_ss"+l];jQuery.each(t,function(e,t){(c||"none"!=m.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&""==jQuery(t).val()&&void 0!==jQuery(t).val()&&(_[i]=t),u||window["check_submit"+l]||jQuery(t).focus(function(){jQuery("#form"+l+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),jQuery("#form"+l+" #wd_required_"+i).remove()}).blur(function(){wd_is_filled(l,i)})});break;case"type_password":t="#wdform_"+i+"_element"+l;(c||"none"!=m.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&""==jQuery(t).val()&&(_[i]=t),u||window["check_submit"+l]||jQuery(t).focus(function(){jQuery("#form"+l+" #wd_required_"+i).remove(),jQuery("#form"+l+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label")}).blur(function(){wd_is_filled(l,i)});break;case"type_file_upload":t="#wdform_"+i+"_element"+l;(c||"none"!=m.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&""==jQuery(t).val()&&(_[i]=t),u||window["check_submit"+l]||jQuery(t).focus(function(){jQuery("#form"+l+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),jQuery("#form"+l+" #wd_required_"+i).remove()}).change(function(){jQuery("#form"+l+" #wd_required_"+i).remove(),jQuery("#form"+l+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),wd_is_filled(l,i)});break;case"type_matrix":if(jQuery("#form"+l+" #wd_required_"+i).remove(),jQuery("#form"+l+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),"radio"==jQuery("#form"+l+" div[wdid='"+i+"'] input").attr("type")||"checkbox"==jQuery("#form"+l+" div[wdid='"+i+"'] input").attr("type"))(c||"none"!=m.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&(0==m.find(jQuery("div[wdid='"+i+"'] input:checked")).length&&(_[i]=!0),"radio"==jQuery("#form"+l+" div[wdid='"+i+"'] input").attr("type")&&jQuery.each(jQuery("#form"+l+" div[wdid='"+i+"'] div[class^='wdform-matrix-row']"),function(e,t){0==jQuery(t).find('input[type="radio"]:checked').length&&(_[i]=!0)})),"checkbox"==jQuery("#form"+l+" div[wdid='"+i+"'] input").attr("type")&&(u||window["check_submit"+l]||jQuery.each(jQuery("#form"+l+" div[wdid='"+i+"'] input"),function(e,t){jQuery(this).change(function(){0==m.find(jQuery("div[wdid='"+i+"'] input:checked")).length?wd_is_filled(l,i):(jQuery("#form"+l+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),jQuery("#form"+l+" #wd_required_"+i).remove())})}));else if("text"==jQuery("#form"+l+" div[wdid='"+i+"'] input").attr("type")){if(c||"none"!=m.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display")){var d=0;jQuery.each(jQuery("#form"+l+" div[wdid='"+i+"'] input"),function(e,t){""!=jQuery(this).val()&&d++}),0==d&&(_[i]=!0)}u||window["check_submit"+l]||jQuery.each(jQuery("#form"+l+" div[wdid='"+i+"'] input"),function(e,t){jQuery(this).focus(function(){jQuery("#form"+l+" #wd_required_"+i).remove(),jQuery("#form"+l+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label")}).blur(function(){wd_is_filled(l,i)})})}else{if(c||"none"!=m.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display")){var s=0;jQuery.each(jQuery("#form"+l+" div[wdid='"+i+"'] select"),function(e,t){""!=jQuery(this).val()&&s++}),0==s&&(_[i]=!0)}u||window["check_submit"+l]||jQuery.each(jQuery("#form"+l+" div[wdid='"+i+"'] select"),function(e,t){jQuery(this).focus(function(){""==jQuery(this).val()&&(jQuery("#form"+l+" #wd_required_"+i).remove(),jQuery("#form"+l+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"))}).change(function(){wd_is_filled(l,i)}).blur(function(){wd_is_filled(l,i)})})}break;case"type_send_copy":(c||"none"!=m.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&0==jQuery("div[wdid='"+i+"'] input:checked").length&&(_[i]=!0),u||window["check_submit"+l]||jQuery("#form"+l+" div[wdid='"+i+"'] input").change(function(){0==jQuery("div[wdid='"+i+"'] input:checked").length?wd_is_filled(l,i):(jQuery("#form"+l+" #wd_required_"+i).remove(),jQuery("#form"+l+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"))});break;case"type_captcha":case"type_arithmetic_captcha":t="";t="type_captcha"==window["labels_and_ids"+l][i]?"#wd_captcha_input"+l:"#wd_arithmetic_captcha_input"+l,(c||"none"!=m.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&""==jQuery(t).val()&&(jQuery(".message_captcha").html(""),_[i]=t),u||window["check_submit"+l]||jQuery(t).focus(function(){jQuery("#form"+l+" #wd_required_"+i).remove(),jQuery("#form"+l+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label")}).blur(function(){wd_is_filled(l,i)});break;case"type_signature":jQuery("#form"+l+" #wd_required_"+i).remove(),jQuery("#form"+l+" div[wdid='"+i+"'] .wdform-label-section:first .wdform-label").removeClass("error_label");t="#signature-file-wdform_"+i+"_element"+l;(c||"none"!=m.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&""==jQuery(t).val()&&(_[i]=t),u||window["check_submit"+l]||jQuery(t).focus(function(){jQuery("#form"+l+" div[wdid='"+i+"'] .wdform-label-section:first .wdform-label").removeClass("error_label"),jQuery("#form"+l+" #wd_required_"+i).remove()}).change(function(){jQuery("#form"+l+" #wd_required_"+i).remove(),jQuery("#form"+l+" div[wdid='"+i+"'] .wdform-label-section:first .wdform-label").removeClass("error_label"),wd_is_filled(l,i)})}}),0===Object.keys(_).length&&0===Object.keys(window["check_before_submit"+l]).length||(0!==Object.keys(_).length&&jQuery.each(_,function(e,t){var r=jQuery("#form"+l+" div[wdid='"+e+"'] .wdform-label-section:first"),i=0;r.hasClass("wd-width-30")&&!r.hasClass("wd-hidden")&&(i=r.width()),jQuery("#form"+l+" #wd_required_"+e).remove(),jQuery("#form"+l+" div[wdid='"+e+"'] .wdform-label-section:first .wdform-label").addClass("error_label"),"type_password"===window["labels_and_ids"+l][e]||"type_submitter_mail"===window["labels_and_ids"+l][e]?jQuery("#form"+l+" div[wdid='"+e+"'] .wdform-element-section:first").parent().after("<div id='wd_required_"+e+"' class='fm-not-filled fm-password-not-filled' style='margin-left: "+i+"px'>"+fm_objectL10n.fm_field_is_required+"</div>"):jQuery("#form"+l+" div[wdid='"+e+"'] .wdform-element-section:first").parent().parent().append("<div id='wd_required_"+e+"' class='fm-not-filled' style='margin-left: "+i+"px'>"+fm_objectL10n.fm_field_is_required+"</div>")}),u||scroll_on_element(l),!(window["check_submit"+l]=1))}function wd_check_price_min_max(a,o){var d=jQuery("#form"+a),e=o||window["check_paypal_price_min_max"+a],s=!1;return jQuery.each(e,function(e,t){var r="#wdform_"+e+"_element"+a,i=t[3]?t[3]:0,n=t[4]?t[4]:-1;!t[2]&&jQuery(r).val()==t[1]||(-1!=n&&parseFloat(jQuery(r).val())>n||parseFloat(jQuery(r).val())<i)&&(jQuery("#form"+a+" #wd_price_"+e).remove(),d.find(jQuery("div[wdid='"+e+"'] .wdform-element-section")).parent().parent().append("<div id='wd_price_"+e+"' class='fm-not-filled'>"+fm_objectL10n.fm_min_max_check_1+t[0]+fm_objectL10n.fm_min_max_check_2+(t[3]?t[3]:0)+"-"+(t[4]?t[4]:"any")+"</div>"),jQuery("#form"+a+" div[wdid='"+e+"'] .wdform-label-section:first .wdform-label").addClass("error_label_price"),s=!0,o||scroll_on_element(a))}),!1===s}function wd_check_min_date_dob(u){var c=!0;return jQuery("#form"+u+" div[type='type_date_fields']").each(function(){var e=parseInt(jQuery(this).data("min-day"));if(!e)return!0;var t=jQuery(this).parent(),r=t.attr("wdid"),i=parseInt(jQuery("#wdform_"+r+"_day"+u).val()),n=parseInt(jQuery("#wdform_"+r+"_month"+u).val()),a=parseInt(jQuery("#wdform_"+r+"_year"+u).val());if(!(i||n||a))return!0;var o=parseInt(jQuery(this).data("min-month")),d=parseInt(jQuery(this).data("min-year")),s=new Date(a+"-"+n+"-"+i),l=new Date(d+"-"+o+"-"+e);(isNaN(s)||isNaN(a)||s-l<0)&&(c=!1,jQuery("#check_min_date_"+r+"_"+u).remove(),t.append("<div id='check_min_date_"+r+"_"+u+"' class='fm-not-valid-date'>"+jQuery(this).attr("data-min-date-alert")+"</div>"),t.find(".wdform-label").addClass("error_label"),scroll_on_element(u))}),c}function wd_spinner_check(i,n){var a=jQuery("#form"+i),o=!1,e=n||window["spinner_check"+i];return jQuery.each(e,function(e,t){var r="#wdform_"+e+"_element"+i;0!=a.find(jQuery("div[wdid='"+e+"']")).length&&"none"!=a.find(jQuery("div[wdid='"+e+"']")).css("display")&&(parseInt(jQuery(r).val())<parseInt(t[0])||parseInt(jQuery(r).val())>parseInt(t[1]))&&(jQuery("#form"+i+" #wd_price_"+e).remove(),a.find(jQuery("div[wdid='"+e+"'] .wdform-element-section")).parent().parent().append("<div id='wd_price_"+e+"' class='fm-not-filled'>"+fm_objectL10n.fm_spinner_check+(t[0]?t[0]:0)+"-"+(t[1]?t[1]:"any")+"</div>"),jQuery("#form"+i+" div[wdid='"+e+"'] .wdform-label-section:first .wdform-label").addClass("error_label_price"),o=!0,n||scroll_on_element(i))}),!1===o}function fmscrollHandler(e){var t=100*jQuery(window).scrollTop()/(jQuery(document).height()-jQuery(window).height());!jQuery("#fm-scrollbox"+e).hasClass("fm-minimized")&&t>=window["scrollbox_trigger_point"+e]?setTimeout(function(){jQuery("#fm-scrollbox"+e).removeClass("fm-animated fadeOutDown").addClass("fm-animated fadeInUp"),jQuery("#fm-scrollbox"+e).css("visibility",""),jQuery("#fm-scrollbox"+e+" .fm-header-img").addClass("fm-animated "+window["header_image_animation"+e])},1e3*window["scrollbox_loading_delay"+e]):"1"==window["scrollbox_auto_hide"+e]&&(jQuery("#fm-scrollbox"+e+" .fm-header-img").removeClass("fm-animated "+window["header_image_animation"+e]),jQuery("#fm-scrollbox"+e).removeClass("fm-animated fadeInUp").addClass("fm-animated fadeOutDown"))}function fm_submit_form(e){if("function"==typeof window["before_submit"+e]&&window["before_submit"+e]())return!1;if(!fm_check(0,e))return!1;(jQuery("#form"+e+" button").each(function(){jQuery(this).attr("disabled","disabled")}),jQuery('<input type="hidden" name="save_or_submit'+e+'" value ="submit" />').appendTo("#form"+e),window["onsubmit_js"+e](),1==window["checkStripe"+e])?"none"!=jQuery("form[id='form"+e+"']").find(".StripeElement").first().parents(".wdform_row").css("display")?wdfm_call_stripe(!0):0<jQuery("#form"+e).find(".g-recaptcha[data-size=invisible]").length?grecaptcha.execute():fm_submit(e):0<jQuery("#form"+e).find(".g-recaptcha[data-size=invisible]").length?grecaptcha.execute():fm_submit(e)}function getHostName(e){var t=e.match(/:\/\/(www[0-9]?\.)?(.[^/:]+)/i);return null!=t&&2<t.length&&"string"==typeof t[2]&&0<t[2].length?t[2]:null}function isJson(e){try{JSON.parse(e)}catch(e){return!1}return!0}function fm_submit(u){if(fm_set_input_value("fm_empty_field_validation"+u,jQuery("#fm_empty_field_validation"+u).attr("data-value")),"0"!=jQuery("#form"+u+" .button-submit:not(.save_button)").attr("data-ajax")){jQuery("#form"+u+" .fm-submit-loading").css("display","inline-block");var e=jQuery("#form"+u)[0],t=new FormData(e),r=jQuery("#fm_ajax_url"+u).data("ajax_url"),c=jQuery("#form"+u+" #fm_ajax_redirect_url"+u).data("ajax_redirect_url");jQuery.ajax({type:"POST",enctype:"multipart/form-data",url:r,data:t,contentType:!1,processData:!1,success:function(e){if(isJson(e)){var t=JSON.parse(e);if(void 0!==t.after_submit_redirect_url&&""!=jQuery.trim(t.after_submit_redirect_url))return void window.location.replace(t.after_submit_redirect_url);var r=new Date,i=window.location.href,n=r.getTime();if(void 0!==t.success&&(n=t.success),-1<i.indexOf("&succes="))i=i.split("&succes=")[0];else if(-1<i.indexOf("?succes=")){i=i.split("?succes=")[0]}i=-1<i.indexOf("?")?i+"&succes="+n:i+"?succes="+n;var a="&return="+encodeURIComponent(i);if(void 0!==t.paypal_url){var o=t.paypal_url+a;return void window.location.replace(o)}}if(0==c){jQuery("#form"+u+" .button-submit").prop("disabled",!1),jQuery("#form"+u+" .fm-submit-loading").hide();var d=jQuery(e).find("#form"+u).html();jQuery("#form"+u).html(d),"function"==typeof window["fm_save_progress_"+u]&&window["fm_save_progress_"+u](),0<jQuery(document).find(".g-recaptcha").length&&fmRecaptchaInit(1);var s="fm_script_ready"+u;if(void 0!==window[s]&&window[s](),0<jQuery(d).find(".fm-not-filled.message_captcha").length){var l=jQuery(d).find(".fm-not-filled.message_captcha").text();jQuery("#form"+u+" .fm-message").remove(),jQuery("#form"+u).prepend('<div class="fm-message fm-notice-error">'+l+"</div>")}else fm_reset_form(u);window["check_submit"+u]=0}else window.location.replace(c)},complete:function(){0==jQuery("#form"+u+" .fm-message").length?(jQuery("#closing-form"+u).remove(),jQuery("#fm-popover-background"+u).css("display","none")):jQuery("#fm-popover-container"+u).addClass("fm-submit-message"),"function"!=typeof window["after_submit"+u]||jQuery("#form"+u).find(".message_captcha").length||window["after_submit"+u]()}})}else jQuery("#form"+u).submit()}function fm_reset_form(form_id){"function"==typeof window["before_reset"+form_id]&&window["before_reset"+form_id]();var privacy_policy_check=jQuery("#fm_privacy_policy"+form_id);privacy_policy_check&&(privacy_policy_check.prop("checked",!1),fm_privacy_policy_check(privacy_policy_check)),jQuery.each(window["labels_and_ids"+form_id],function(index,elem){switch(elem){case"type_text":case"type_textarea":case"type_number":case"type_spinner":case"type_own_select":case"type_country":case"type_date":case"type_date_new":case"type_hidden":case"type_paypal_price_new":case"type_phone_new":case"type_time":jQuery("#wdform_"+index+"_element"+form_id).val("");break;case"type_submitter_mail":case"type_password":jQuery("#wdform_"+index+"_element"+form_id).val(""),jQuery("#wdform_"+index+"_1_element"+form_id)&&(jQuery("#wdform_"+index+"_1_element"+form_id).val(""),jQuery("#confirm_"+index+"_"+form_id)&&jQuery("#confirm_"+index+"_"+form_id).remove(),"type_submitter_mail"==elem&&jQuery("#check_email_"+index+"_"+form_id)&&jQuery("#check_email_"+index+"_"+form_id).remove());break;case"type_date_range":jQuery("#wdform_"+index+"_element"+form_id+"0").val(""),jQuery("#wdform_"+index+"_element"+form_id+"1").val("");break;case"type_send_copy":jQuery("#wdform_"+index+"_element"+form_id).prop("checked",!1);break;case"type_phone":jQuery("#wdform_"+index+"_element_first"+form_id+", #wdform_"+index+"_element_last"+form_id).val("");break;case"type_name":jQuery("#wdform_"+index+"_element_first"+form_id+", #wdform_"+index+"_element_last"+form_id+", #wdform_"+index+"_element_title"+form_id+", #wdform_"+index+"_element_middle"+form_id).val("");break;case"type_address":jQuery("#wdform_"+index+"_street1"+form_id+", #wdform_"+index+"_street2"+form_id+", #wdform_"+index+"_city"+form_id+", #wdform_"+index+"_state"+form_id+", #wdform_"+index+"_postal"+form_id+", #wdform_"+index+"_country"+form_id).val("");break;case"type_checkbox":jQuery("#form"+form_id+" div[wdid='"+index+"'] .checkbox-div input").prop("checked",!1),jQuery("#wdform_"+index+"_other_br"+form_id).remove(),jQuery("#wdform_"+index+"_other_input"+form_id).remove();break;case"type_radio":jQuery("#form"+form_id+" div[wdid='"+index+"'] .radio-div input").prop("checked",!1),jQuery("#wdform_"+index+"_other_br"+form_id).remove(),jQuery("#wdform_"+index+"_other_input"+form_id).remove();break;case"type_time":jQuery("#wdform_"+index+"_hh"+form_id+", #wdform_"+index+"_mm"+form_id+", #wdform_"+index+"_ss"+form_id+", #wdform_"+index+"_am_pm"+form_id).val("");break;case"type_date_fields":jQuery("#wdform_"+index+"_day"+form_id+", #wdform_"+index+"_month"+form_id+", #wdform_"+index+"_year"+form_id).val("");break;case"type_file_upload":jQuery("#wdform_"+index+"_element"+form_id+"_save").remove();break;case"type_paypal_price":jQuery("#wdform_"+index+"_element_dollars"+form_id+", #wdform_"+index+"_element_cents"+form_id).val("");break;case"type_paypal_select":jQuery("#wdform_"+index+"_element"+form_id+", #wdform_"+index+"_element_quantity"+form_id+", #form"+form_id+" div[wdid='"+index+"'] .paypal-property select").val("");break;case"type_paypal_radio":jQuery("#wdform_"+index+"_element_quantity"+form_id+",#form"+form_id+" div[wdid='"+index+"'] .paypal-property select").val(""),jQuery("#form"+form_id+" div[wdid='"+index+"'] .radio-div input").prop("checked",!1);break;case"type_paypal_shipping":jQuery("#form"+form_id+" div[wdid='"+index+"'] .radio-div input").prop("checked",!1);break;case"type_paypal_checkbox":jQuery("#wdform_"+index+"_element_quantity"+form_id+",#form"+form_id+" div[wdid='"+index+"'] .paypal-property select").val(""),jQuery("#form"+form_id+" div[wdid='"+index+"'] .checkbox-div input").prop("checked",!1);break;case"type_star_rating":jQuery("#wdform_"+index+"_selected_star_amount"+form_id).val(""),jQuery("#wdform_"+index+"_element"+form_id+" img").attr("src",fm_objectL10n.plugin_url+"/images/star.png");break;case"type_scale_rating":jQuery("#form"+form_id+" div[wdid='"+index+"'] .radio-div input").prop("checked",!1);break;case"type_slider":jQuery("#wdform_"+index+"_element"+form_id).slider({value:eval(0)}),jQuery("#wdform_"+index+"_element_value"+form_id).html("0");break;case"type_range":jQuery("#wdform_"+index+"_element"+form_id+"0, #wdform_"+index+"_element"+form_id+"1").val("");break;case"type_grading":jQuery("#wdform_"+index+"_element"+form_id+" input").val("");break;case"type_matrix":jQuery("#wdform_"+index+"_element"+form_id+" .radio-div input").prop("checked",!1),jQuery("#wdform_"+index+"_element"+form_id+" .checkbox-div input").prop("checked",!1),jQuery("#wdform_"+index+"_element"+form_id+" input[type='text']").val(""),jQuery("#wdform_"+index+"_element"+form_id+" select").val("");break;case"type_paypal_total":jQuery("#wdform_"+index+"div_total"+form_id).html("$0"),jQuery("#wdform_"+index+"paypal_products"+form_id).empty();break;case"type_captcha":jQuery("#wd_captcha_input"+form_id).val("");case"type_arithmetic_captcha":jQuery("#wd_arithmetic_captcha_input"+form_id).val("")}})}function fm_save_form(e){jQuery('<input type="hidden" name="save_or_submit'+e+'" value ="save" />').appendTo("#form"+e),window["onsubmit_js"+e](),jQuery("#form"+e+" button").each(function(){jQuery(this).attr("disabled","disabled")}),fm_set_input_value("fm_empty_field_validation"+e,jQuery("#fm_empty_field_validation"+e).attr("data-value")),jQuery("#form"+e).submit()}function fm_clear_form(e){1==confirm(fm_objectL10n.fm_clear_data)&&(jQuery("#form"+e+" button").each(function(){jQuery(this).attr("disabled","disabled")}),jQuery.get(fm_objectL10n.form_maker_admin_ajax+"?action=FMClearProg&addon_task=clear_data&nonce="+fm_ajax.ajaxnonce+"&form_id="+e).done(function(){window.location=jQuery("#form"+e).attr("action")}))}function fm_set_input_value(e,t){jQuery("#"+e).val(t)}function formOnload(i){var n;-1!=navigator.userAgent.toLowerCase().indexOf("msie")&&8===parseInt(navigator.userAgent.toLowerCase().split("msie")[1])&&(jQuery("#form"+i).find(jQuery("input[type='radio']")).click(function(){jQuery("input[type='radio']+label").removeClass("if-ie-div-label"),jQuery("input[type='radio']:checked+label").addClass("if-ie-div-label")}),jQuery("#form"+i).find(jQuery("input[type='radio']:checked+label")).addClass("if-ie-div-label"),jQuery("#form"+i).find(jQuery("input[type='checkbox']")).click(function(){jQuery("input[type='checkbox']+label").removeClass("if-ie-div-label"),jQuery("input[type='checkbox']:checked+label").addClass("if-ie-div-label")}),jQuery("#form"+i).find(jQuery("input[type='checkbox']:checked+label")).addClass("if-ie-div-label")),jQuery.each(window["check_regExp_all"+i],function(e,t){var r={};r[e]=t,jQuery("div[wdid='"+e+"'] input").blur(function(){wd_check_regExp(i,r)}).focus(function(){jQuery("#form"+i+" #wd_exp_"+e).remove(),jQuery("#form"+i+" div[wdid='"+e+"'] .wdform-label-section:first .error_label_exp").removeClass("error_label_exp")})}),jQuery.each(window["check_paypal_price_min_max"+i],function(e,t){var r={};r[e]=t,jQuery("div[wdid='"+e+"'] input").blur(function(){wd_check_price_min_max(i,r)}).focus(function(){jQuery("#form"+i+" #wd_price_"+e).remove(),jQuery("#form"+i+" div[wdid='"+e+"'] .wdform-label-section:first .error_label_price").removeClass("error_label_price")})}),jQuery.each(window["spinner_check"+i],function(e,t){var r={};r[e]=t,jQuery("div[wdid='"+e+"'] input").blur(function(){wd_spinner_check(i,r)}).focus(function(){jQuery("#form"+i+" #wd_price_"+e).remove(),jQuery("#form"+i+" div[wdid='"+e+"'] .wdform-label-section:first .error_label_price").removeClass("error_label_price")})}),jQuery.each(window["file_upload_check"+i],function(e,t){var r={};r[e]=t,jQuery("div[wdid='"+e+"'] input").change(function(){wd_file_upload_check(i,r)})}),jQuery("#form"+i+" input").on("keypress",function(e){if(13==(e.keyCode?e.keyCode:e.which))return!1}),jQuery("div[type='type_number'] input, div[type='type_phone'] input, div[type='type_spinner'] input, div[type='type_range'] input, .wdform-quantity, div[type='type_paypal_price_new'] input").keypress(function(e){return check_isnum(e)}),jQuery("div[type='type_grading'] input").keypress(function(e){return check_isnum_or_minus(e)}),jQuery("div[type='type_paypal_checkbox'] input[type='checkbox'], div[type='type_paypal_radio'] input[type='radio'], div[type='type_paypal_shipping'] input[type='radio']").click(function(){set_total_value(i)}),jQuery("div[type='type_paypal_select'] select, div[type='type_paypal_price'] input, div[type='type_paypal_price_new'] input").change(function(){set_total_value(i)}),jQuery(".wdform-quantity").change(function(){set_total_value(i)}),jQuery("div[type='type_address'] select").change(function(){set_total_value(i)}),jQuery("div[type='type_time'] input").blur(function(){add_0(this)}),jQuery(".wdform-element-section").each(function(){if("type_stripe"==jQuery(this).parent().parent().attr("type"))return!0;jQuery(this).parent()[0].style.width||0==parseInt(jQuery(this).width())||0==jQuery(this).parent().find(jQuery(".wdform-label-section")).length||"table-cell"==jQuery(this).css("display")&&("type_captcha"!=jQuery(this).parent().attr("type")?jQuery(this).parent().css("width",parseInt(jQuery(this).width())+parseInt(jQuery(this).parent().find(jQuery(".wdform-label-section"))[0].style.width)+15):jQuery(this).parent().css("width",2*parseInt(jQuery(this).parent().find(jQuery(".captcha_input"))[0].style.width)+50+parseInt(jQuery(this).parent().find(jQuery(".wdform-label-section"))[0].style.width)+15)),parseInt(jQuery(this)[0].style.width.replace("px",""))<parseInt(jQuery(this).css("min-width").replace("px",""))&&jQuery(this).css("min-width",parseInt(jQuery(this)[0].style.width.replace("px",""))-10)}),jQuery(".wdform-label").each(function(){parseInt(jQuery(this).height())>=2*parseInt(jQuery(this).css("line-height").replace("px",""))&&(jQuery(this).parent().css("max-width",jQuery(this).parent().width()),jQuery(this).parent().css("width",""))}),(n=jQuery).fn.shuffle=function(){var i=n(this).find(".wd-choice"),t=n.map(i,function(){var e,t=(e=i.length,Math.floor(Math.random()*e)),r=n(i[parseInt(t)]).clone(!0)[0];return i.splice(t,1),r});return n(this).find(".wd-choice").each(function(e){n(this).replaceWith(n(t[e]))}),n(t)},"function"==typeof window["onload_js"+i]&&window["onload_js"+i](),"function"==typeof window["before_load"+i]&&window["before_load"+i]()}function fm_document_ready(e){jQuery("#form"+e).hasClass("fm-form-submitted")&&!jQuery("#form"+e).find(".message_captcha").length&&"function"==typeof window["after_submit"+e]&&window["after_submit"+e]();var t=jQuery("#form"+e+" .wdform-page-and-images").length;window["form_view_count"+e]=t,1<window["form_view_count"+e]&&(firstid=jQuery("#form"+e+" .wdform_page").first().attr("id"),firstid=firstid.split("form_view"),window["first_form_view"+e]=firstid[1],generate_page_nav(window["first_form_view"+e],e,window["form_view_count"+e])),fm_initilize_form(e),window["condition_js"+e](),jQuery(document).trigger("fm_document_ready")}function fm_check(e,t,r){if(!wd_is_filled(t,void 0,r))return!1;if(1==window["checkStripe"+t]){var i=jQuery("form[id='form"+t+"']");if("none"!=i.find(".StripeElement").first().closest(".wdform-page-and-images").css("display")&&"none"!=i.find(".StripeElement").first().parents(".wdform_row").css("display")&&0==wdfm_call_stripe(!1))return!1}return!!wd_check_regExp(t)&&(!!wd_check_price_min_max(t)&&(!!wd_spinner_check(t)&&(!!wd_file_upload_check(t)&&(!!wd_check_min_date_dob(t)&&0!=window["check_js"+t](e,t)))))}function fmRecaptchaInit(e){void 0===e&&(e=0),jQuery(".g-recaptcha").each(function(){if(type=jQuery(this).attr("data-size"),jQuery(this).attr("data-render",1),"invisible"==type)r=jQuery(this).attr("data-form_id"),grecaptcha.render(jQuery(this).attr("id"),{sitekey:jQuery(this).attr("data-sitekey"),badge:jQuery(this).attr("data-badge"),callback:function(){fm_submit(r)}});else if("v3"==type){if("undefined"==jQuery(this).attr("data-sitekey")||""==jQuery(this).attr("data-sitekey"))return;var t=jQuery(this).attr("data-id"),r=jQuery(this).attr("data-form-id"),e=jQuery(this).attr("data-sitekey");grecaptcha.ready(function(){grecaptcha.execute(e).then(function(e){document.getElementById("recaptchaV3Response_"+r+t).value=e})})}else grecaptcha.render(jQuery(this).attr("id"),{sitekey:jQuery(this).attr("data-sitekey"),theme:"light"})})}function wd_change_state_input(e,t){if(document.getElementById(e+"_country"+t)&&document.getElementById(e+"_state"+t)){var r=!1,i=document.getElementById(e+"_state"+t);if("United States"==document.getElementById(e+"_country"+t).value){var n=document.createElement("select"),a=fm_objectL10n.states;for(var o in a){(d=document.createElement("option")).setAttribute("value",o),d.innerHTML=a[o],n.appendChild(d)}r=!0}else if("Canada"==document.getElementById(e+"_country"+t).value){n=document.createElement("select"),a=fm_objectL10n.provinces;for(var o in a){var d;(d=document.createElement("option")).setAttribute("value",o),d.innerHTML=a[o],n.appendChild(d)}r=!0}else if("SELECT"==document.getElementById(e+"_state"+t).tagName){n=document.createElement("input");r=!0}if(r){n.setAttribute("type","text"),n.setAttribute("id",e+"_state"+t),n.setAttribute("name","wdform_"+(parseInt(e.replace("wdform_",""))+3)+"_state"+t),n.setAttribute("class","wd-width-100");var s=i.parentNode;s.removeChild(i),s.insertBefore(n,s.firstChild)}}}function fm_privacy_policy_check(e){var t=jQuery(e),r=t.parents(".wdform_row").find(".button-submit");t.is(":checked")?r.prop("disabled",!1):r.prop("disabled",!0)}function fm_html_entities(e){return String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function validate_received_data_from_url(){new URLSearchParams(window.location.search).forEach(function(e,t){jQuery("#"+t).each(function(){jQuery(this).keyup(),jQuery(this).keydown(),jQuery(this).trigger("change")})})}jQuery(document).on("mouseenter",".sel-imul",function(){selenter=!0}),jQuery(document).on("mouseleave",".sel-imul",function(){selenter=!1}),jQuery(document).click(function(){selenter||(jQuery(".sel-options").hide(),jQuery(".sel-imul").removeClass("act"))}),function(t){"function"==typeof define&&define.amd?define(["jquery"],function(e){t(e,window,document)}):"object"==typeof module&&module.exports?module.exports=t(require("jquery"),window,document):t(jQuery,window,document)}(function(s,d,e,a){"use strict";var o="intlTelInput",r=1,i={allowDropdown:!0,autoHideDialCode:!0,autoPlaceholder:"polite",customPlaceholder:null,dropdownContainer:"",excludeCountries:[],formatOnDisplay:!0,geoIpLookup:null,initialCountry:"",nationalMode:!0,onlyCountries:[],placeholderNumberType:"MOBILE",preferredCountries:["us","gb"],separateDialCode:!1,utilsScript:""},l=38,u=40,c=13,m=27,t=43,_=65,f=90,p=32,n=9,y=["800","822","833","844","855","866","877","880","881","882","883","884","885","886","887","888","889"];function h(e,t){this.telInput=s(e),this.options=s.extend({},i,t),this.ns="."+o+r++,this.isGoodBrowser=Boolean(e.setSelectionRange),this.hadInitialPlaceholder=Boolean(s(e).attr("placeholder"))}s(d).on("load",function(){s.fn[o].windowLoaded=!0}),h.prototype={_init:function(){return this.options.nationalMode&&(this.options.autoHideDialCode=!1),this.options.separateDialCode&&(this.options.autoHideDialCode=this.options.nationalMode=!1),this.isMobile=/Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),this.isMobile&&(s("body").addClass("iti-mobile"),this.options.dropdownContainer||(this.options.dropdownContainer="body")),this.autoCountryDeferred=new s.Deferred,this.utilsScriptDeferred=new s.Deferred,this._processCountryData(),this._generateMarkup(),this._setInitialState(),this._initListeners(),this._initRequests(),[this.autoCountryDeferred,this.utilsScriptDeferred]},_processCountryData:function(){this._processAllCountries(),this._processCountryCodes(),this._processPreferredCountries()},_addCountryCode:function(e,t,r){t in this.countryCodes||(this.countryCodes[t]=[]);var i=r||0;this.countryCodes[t][i]=e},_filterCountries:function(e,t){var r;for(r=0;r<e.length;r++)e[r]=e[r].toLowerCase();for(this.countries=[],r=0;r<w.length;r++)t(s.inArray(w[r].iso2,e))&&this.countries.push(w[r])},_processAllCountries:function(){this.options.onlyCountries.length?this._filterCountries(this.options.onlyCountries,function(e){return-1<e}):this.options.excludeCountries.length?this._filterCountries(this.options.excludeCountries,function(e){return-1==e}):this.countries=w},_processCountryCodes:function(){this.countryCodes={};for(var e=0;e<this.countries.length;e++){var t=this.countries[e];if(this._addCountryCode(t.iso2,t.dialCode,t.priority),t.areaCodes)for(var r=0;r<t.areaCodes.length;r++)this._addCountryCode(t.iso2,t.dialCode+t.areaCodes[r])}},_processPreferredCountries:function(){this.preferredCountries=[];for(var e=0;e<this.options.preferredCountries.length;e++){var t=this.options.preferredCountries[e].toLowerCase(),r=this._getCountryData(t,!1,!0);r&&this.preferredCountries.push(r)}},_generateMarkup:function(){this.telInput.attr("autocomplete","off");var e="intl-tel-input";this.options.allowDropdown&&(e+=" allow-dropdown"),this.options.separateDialCode&&(e+=" separate-dial-code"),this.telInput.wrap(s("<div>",{class:e})),this.flagsContainer=s("<div>",{class:"flag-container"}).insertBefore(this.telInput);var t=s("<div>",{class:"selected-flag"});t.appendTo(this.flagsContainer),this.selectedFlagInner=s("<div>",{class:"iti-flag"}).appendTo(t),this.options.separateDialCode&&(this.selectedDialCode=s("<div>",{class:"selected-dial-code"}).appendTo(t)),this.options.allowDropdown?(t.attr("tabindex","0"),s("<div>",{class:"iti-arrow"}).appendTo(t),this.countryList=s("<ul>",{class:"country-list hide"}),this.preferredCountries.length&&(this._appendListItems(this.preferredCountries,"preferred"),s("<li>",{class:"divider"}).appendTo(this.countryList)),this._appendListItems(this.countries,""),this.countryListItems=this.countryList.children(".country"),this.options.dropdownContainer?this.dropdown=s("<div>",{class:"intl-tel-input iti-container"}).append(this.countryList):this.countryList.appendTo(this.flagsContainer)):this.countryListItems=s()},_appendListItems:function(e,t){for(var r="",i=0;i<e.length;i++){var n=e[i];r+="<li class='country "+t+"' data-dial-code='"+n.dialCode+"' data-country-code='"+n.iso2+"'>",r+="<div class='flag-box'><div class='iti-flag "+n.iso2+"'></div></div>",r+="<span class='country-name'>"+n.name+"</span>",r+="<span class='dial-code'>+"+n.dialCode+"</span>",r+="</li>"}this.countryList.append(r)},_setInitialState:function(){var e=this.telInput.val();this._getDialCode(e)&&!this._isRegionlessNanp(e)?this._updateFlagFromNumber(e):"auto"!==this.options.initialCountry&&(this.options.initialCountry?this._setFlag(this.options.initialCountry.toLowerCase()):(this.defaultCountry=this.preferredCountries.length?this.preferredCountries[0].iso2:this.countries[0].iso2,e||this._setFlag(this.defaultCountry)),e||this.options.nationalMode||this.options.autoHideDialCode||this.options.separateDialCode||this.telInput.val("+"+this.selectedCountryData.dialCode)),e&&this._updateValFromNumber(e)},_initListeners:function(){this._initKeyListeners(),this.options.autoHideDialCode&&this._initFocusListeners(),this.options.allowDropdown&&this._initDropdownListeners()},_initDropdownListeners:function(){var t=this,e=this.telInput.closest("label");e.length&&e.on("click"+this.ns,function(e){t.countryList.hasClass("hide")?t.telInput.focus():e.preventDefault()}),this.selectedFlagInner.parent().on("click"+this.ns,function(e){!t.countryList.hasClass("hide")||t.telInput.prop("disabled")||t.telInput.prop("readonly")||t._showDropdown()}),this.flagsContainer.on("keydown"+t.ns,function(e){!t.countryList.hasClass("hide")||e.which!=l&&e.which!=u&&e.which!=p&&e.which!=c||(e.preventDefault(),e.stopPropagation(),t._showDropdown()),e.which==n&&t._closeDropdown()})},_initRequests:function(){var e=this;this.options.utilsScript?s.fn[o].windowLoaded?s.fn[o].loadUtils(this.options.utilsScript,this.utilsScriptDeferred):s(d).on("load",function(){s.fn[o].loadUtils(e.options.utilsScript,e.utilsScriptDeferred)}):this.utilsScriptDeferred.resolve(),"auto"===this.options.initialCountry?this._loadAutoCountry():this.autoCountryDeferred.resolve()},_loadAutoCountry:function(){s.fn[o].autoCountry?this.handleAutoCountry():s.fn[o].startedLoadingAutoCountry||(s.fn[o].startedLoadingAutoCountry=!0,"function"==typeof this.options.geoIpLookup&&this.options.geoIpLookup(function(e){s.fn[o].autoCountry=e.toLowerCase(),setTimeout(function(){s(".intl-tel-input input").intlTelInput("handleAutoCountry")})}))},_initKeyListeners:function(){var e=this;this.telInput.on("keyup"+this.ns,function(){e._updateFlagFromNumber(e.telInput.val())&&e._triggerCountryChange()}),this.telInput.on("cut"+this.ns+" paste"+this.ns,function(){setTimeout(function(){e._updateFlagFromNumber(e.telInput.val())&&e._triggerCountryChange()})})},_cap:function(e){var t=this.telInput.attr("maxlength");return t&&e.length>t?e.substr(0,t):e},_initFocusListeners:function(){var r=this;this.telInput.on("mousedown"+this.ns,function(e){r.telInput.is(":focus")||r.telInput.val()||(e.preventDefault(),r.telInput.focus())}),this.telInput.on("focus"+this.ns,function(e){r.telInput.val()||r.telInput.prop("readonly")||!r.selectedCountryData.dialCode||(r.telInput.val("+"+r.selectedCountryData.dialCode),r.telInput.one("keypress.plus"+r.ns,function(e){e.which==t&&r.telInput.val("")}),setTimeout(function(){var e=r.telInput[0];if(r.isGoodBrowser){var t=r.telInput.val().length;e.setSelectionRange(t,t)}}))});var e=this.telInput.prop("form");e&&s(e).on("submit"+this.ns,function(){r._removeEmptyDialCode()}),this.telInput.on("blur"+this.ns,function(){r._removeEmptyDialCode()})},_removeEmptyDialCode:function(){var e=this.telInput.val();if("+"==e.charAt(0)){var t=this._getNumeric(e);t&&this.selectedCountryData.dialCode!=t||this.telInput.val("")}this.telInput.off("keypress.plus"+this.ns)},_getNumeric:function(e){return e.replace(/\D/g,"")},_showDropdown:function(){this._setDropdownPosition();var e=this.countryList.children(".active");e.length&&(this._highlightListItem(e),this._scrollTo(e)),this._bindDropdownListeners(),this.selectedFlagInner.children(".iti-arrow").addClass("up")},_setDropdownPosition:function(){var e=this;if(this.options.dropdownContainer&&this.dropdown.appendTo(this.options.dropdownContainer),this.dropdownHeight=this.countryList.removeClass("hide").outerHeight(),!this.isMobile){var t=this.telInput.offset(),r=t.top,i=s(d).scrollTop(),n=r+this.telInput.outerHeight()+this.dropdownHeight<i+s(d).height(),a=r-this.dropdownHeight>i;if(this.countryList.toggleClass("dropup",!n&&a),this.options.dropdownContainer){var o=!n&&a?0:this.telInput.innerHeight();this.dropdown.css({top:r+o,left:t.left}),s(d).on("scroll"+this.ns,function(){e._closeDropdown()})}}},_bindDropdownListeners:function(){var t=this;this.countryList.on("mouseover"+this.ns,".country",function(e){t._highlightListItem(s(this))}),this.countryList.on("click"+this.ns,".country",function(e){t._selectListItem(s(this))});var r=!0;s("html").on("click"+this.ns,function(e){r||t._closeDropdown(),r=!1});var i="",n=null;s(e).on("keydown"+this.ns,function(e){e.preventDefault(),e.which==l||e.which==u?t._handleUpDownKey(e.which):e.which==c?t._handleEnterKey():e.which==m?t._closeDropdown():(e.which>=_&&e.which<=f||e.which==p)&&(n&&clearTimeout(n),i+=String.fromCharCode(e.which),t._searchForCountry(i),n=setTimeout(function(){i=""},1e3))})},_handleUpDownKey:function(e){var t=this.countryList.children(".highlight").first(),r=e==l?t.prev():t.next();r.length&&(r.hasClass("divider")&&(r=e==l?r.prev():r.next()),this._highlightListItem(r),this._scrollTo(r))},_handleEnterKey:function(){var e=this.countryList.children(".highlight").first();e.length&&this._selectListItem(e)},_searchForCountry:function(e){for(var t=0;t<this.countries.length;t++)if(this._startsWith(this.countries[t].name,e)){var r=this.countryList.children("[data-country-code="+this.countries[t].iso2+"]").not(".preferred");this._highlightListItem(r),this._scrollTo(r,!0);break}},_startsWith:function(e,t){return e.substr(0,t.length).toUpperCase()==t},_updateValFromNumber:function(e){if(this.options.formatOnDisplay&&d.intlTelInputUtils&&this.selectedCountryData){var t=this.options.separateDialCode||!this.options.nationalMode&&"+"==e.charAt(0)?intlTelInputUtils.numberFormat.INTERNATIONAL:intlTelInputUtils.numberFormat.NATIONAL;e=intlTelInputUtils.formatNumber(e,this.selectedCountryData.iso2,t)}e=this._beforeSetNumber(e),this.telInput.val(e)},_updateFlagFromNumber:function(e){e&&this.options.nationalMode&&this.selectedCountryData&&"1"==this.selectedCountryData.dialCode&&"+"!=e.charAt(0)&&("1"!=e.charAt(0)&&(e="1"+e),e="+"+e);var t=this._getDialCode(e),r=null,i=this._getNumeric(e);if(t){var n=this.countryCodes[this._getNumeric(t)],a=this.selectedCountryData&&-1<s.inArray(this.selectedCountryData.iso2,n),o="+1"==t&&4<=i.length;if((!(this.selectedCountryData&&"1"==this.selectedCountryData.dialCode)||!this._isRegionlessNanp(i))&&(!a||o))for(var d=0;d<n.length;d++)if(n[d]){r=n[d];break}}else"+"==e.charAt(0)&&i.length?r="":e&&"+"!=e||(r=this.defaultCountry);return null!==r&&this._setFlag(r)},_isRegionlessNanp:function(e){var t=this._getNumeric(e);if("1"!=t.charAt(0))return!1;var r=t.substr(1,3);return-1<s.inArray(r,y)},_highlightListItem:function(e){this.countryListItems.removeClass("highlight"),e.addClass("highlight")},_getCountryData:function(e,t,r){for(var i=t?w:this.countries,n=0;n<i.length;n++)if(i[n].iso2==e)return i[n];if(r)return null;throw new Error("No country data for '"+e+"'")},_setFlag:function(e){var t=this.selectedCountryData&&this.selectedCountryData.iso2?this.selectedCountryData:{};this.selectedCountryData=e?this._getCountryData(e,!1,!1):{},this.selectedCountryData.iso2&&(this.defaultCountry=this.selectedCountryData.iso2),this.selectedFlagInner.attr("class","iti-flag "+e);var r=e?this.selectedCountryData.name+": +"+this.selectedCountryData.dialCode:"Unknown";if(this.selectedFlagInner.parent().attr("title",r),this.options.separateDialCode){var i=this.selectedCountryData.dialCode?"+"+this.selectedCountryData.dialCode:"",n=this.telInput.parent();t.dialCode&&n.removeClass("iti-sdc-"+(t.dialCode.length+1)),i&&n.addClass("iti-sdc-"+i.length),this.selectedDialCode.text(i)}return this._updatePlaceholder(),this.countryListItems.removeClass("active"),e&&this.countryListItems.find(".iti-flag."+e).first().closest(".country").addClass("active"),t.iso2!==e},_updatePlaceholder:function(){var e="aggressive"===this.options.autoPlaceholder||!this.hadInitialPlaceholder&&(!0===this.options.autoPlaceholder||"polite"===this.options.autoPlaceholder);if(d.intlTelInputUtils&&e&&this.selectedCountryData){var t=intlTelInputUtils.numberType[this.options.placeholderNumberType],r=this.selectedCountryData.iso2?intlTelInputUtils.getExampleNumber(this.selectedCountryData.iso2,this.options.nationalMode,t):"";r=this._beforeSetNumber(r),"function"==typeof this.options.customPlaceholder&&(r=this.options.customPlaceholder(r,this.selectedCountryData)),this.telInput.attr("placeholder",r)}},_selectListItem:function(e){var t=this._setFlag(e.attr("data-country-code"));if(this._closeDropdown(),this._updateDialCode(e.attr("data-dial-code"),!0),this.telInput.focus(),this.isGoodBrowser){var r=this.telInput.val().length;this.telInput[0].setSelectionRange(r,r)}t&&this._triggerCountryChange()},_closeDropdown:function(){this.countryList.addClass("hide"),this.selectedFlagInner.children(".iti-arrow").removeClass("up"),s(e).off(this.ns),s("html").off(this.ns),this.countryList.off(this.ns),this.options.dropdownContainer&&(this.isMobile||s(d).off("scroll"+this.ns),this.dropdown.detach())},_scrollTo:function(e,t){var r=this.countryList,i=r.height(),n=r.offset().top,a=n+i,o=e.outerHeight(),d=e.offset().top,s=d+o,l=d-n+r.scrollTop(),u=i/2-o/2;if(d<n)t&&(l-=u),r.scrollTop(l);else if(a<s){t&&(l+=u);var c=i-o;r.scrollTop(l-c)}},_updateDialCode:function(e,t){var r,i=this.telInput.val();if(e="+"+e,"+"==i.charAt(0)){var n=this._getDialCode(i);r=n?i.replace(n,e):e}else{if(this.options.nationalMode||this.options.separateDialCode)return;if(i)r=e+i;else{if(!t&&this.options.autoHideDialCode)return;r=e}}this.telInput.val(r)},_getDialCode:function(e){var t="";if("+"==e.charAt(0))for(var r="",i=0;i<e.length;i++){var n=e.charAt(i);if(s.isNumeric(n)&&(r+=n,this.countryCodes[r]&&(t=e.substr(0,i+1)),4==r.length))break}return t},_getFullNumber:function(){var e=s.trim(this.telInput.val()),t=this.selectedCountryData.dialCode,r=this._getNumeric(e),i="1"==r.charAt(0)?r:"1"+r;return(this.options.separateDialCode?"+"+t:"+"!=e.charAt(0)&&"1"!=e.charAt(0)&&t&&"1"==t.charAt(0)&&4==t.length&&t!=i.substr(0,4)?t.substr(1):"")+e},_beforeSetNumber:function(e){if(this.options.separateDialCode){var t=this._getDialCode(e);if(t){null!==this.selectedCountryData.areaCodes&&(t="+"+this.selectedCountryData.dialCode);var r=" "===e[t.length]||"-"===e[t.length]?t.length+1:t.length;e=e.substr(r)}}return this._cap(e)},_triggerCountryChange:function(){this.telInput.trigger("countrychange",this.selectedCountryData)},handleAutoCountry:function(){"auto"===this.options.initialCountry&&(this.defaultCountry=s.fn[o].autoCountry,this.telInput.val()||this.setCountry(this.defaultCountry),this.autoCountryDeferred.resolve())},handleUtils:function(){d.intlTelInputUtils&&(this.telInput.val()&&this._updateValFromNumber(this.telInput.val()),this._updatePlaceholder()),this.utilsScriptDeferred.resolve()},destroy:function(){if(this.allowDropdown&&(this._closeDropdown(),this.selectedFlagInner.parent().off(this.ns),this.telInput.closest("label").off(this.ns)),this.options.autoHideDialCode){var e=this.telInput.prop("form");e&&s(e).off(this.ns)}this.telInput.off(this.ns),this.telInput.parent().before(this.telInput).remove()},getExtension:function(){return d.intlTelInputUtils?intlTelInputUtils.getExtension(this._getFullNumber(),this.selectedCountryData.iso2):""},getNumber:function(e){return d.intlTelInputUtils?intlTelInputUtils.formatNumber(this._getFullNumber(),this.selectedCountryData.iso2,e):""},getNumberType:function(){return d.intlTelInputUtils?intlTelInputUtils.getNumberType(this._getFullNumber(),this.selectedCountryData.iso2):-99},getSelectedCountryData:function(){return this.selectedCountryData||{}},getValidationError:function(){return d.intlTelInputUtils?intlTelInputUtils.getValidationError(this._getFullNumber(),this.selectedCountryData.iso2):-99},isValidNumber:function(){var e=s.trim(this._getFullNumber()),t=this.options.nationalMode?this.selectedCountryData.iso2:"";return d.intlTelInputUtils?intlTelInputUtils.isValidNumber(e,t):null},setCountry:function(e){e=e.toLowerCase(),this.selectedFlagInner.hasClass(e)||(this._setFlag(e),this._updateDialCode(this.selectedCountryData.dialCode,!1),this._triggerCountryChange())},setNumber:function(e){var t=this._updateFlagFromNumber(e);this._updateValFromNumber(e),t&&this._triggerCountryChange()}},s.fn[o]=function(r){var t,i=arguments;if(r===a||"object"==typeof r){var n=[];return this.each(function(){if(!s.data(this,"plugin_"+o)){var e=new h(this,r),t=e._init();n.push(t[0]),n.push(t[1]),s.data(this,"plugin_"+o,e)}}),s.when.apply(null,n)}if("string"==typeof r&&"_"!==r[0])return this.each(function(){var e=s.data(this,"plugin_"+o);e instanceof h&&"function"==typeof e[r]&&(t=e[r].apply(e,Array.prototype.slice.call(i,1))),"destroy"===r&&s.data(this,"plugin_"+o,null)}),t!==a?t:this},s.fn[o].getCountryData=function(){return w},s.fn[o].loadUtils=function(e,t){s.fn[o].loadedUtilsScript?t&&t.resolve():(s.fn[o].loadedUtilsScript=!0,s.ajax({type:"GET",url:e,complete:function(){s(".intl-tel-input input").intlTelInput("handleUtils")},dataType:"script",cache:!0}))},s.fn[o].version="11.0.0",s.fn[o].defaults=i;for(var w=[["Afghanistan","af","93"],["Albania","al","355"],["Algeria","dz","213"],["American Samoa","as","1684"],["Andorra","ad","376"],["Angola","ao","244"],["Anguilla","ai","1264"],["Antigua and Barbuda","ag","1268"],["Argentina","ar","54"],["Armenia","am","374"],["Aruba","aw","297"],["Australia","au","61",0],["Austria","at","43"],["Azerbaijan","az","994"],["Bahamas","bs","1242"],["Bahrain","bh","973"],["Bangladesh","bd","880"],["Barbados","bb","1246"],["Belarus","by","375"],["Belgium","be","32"],["Belize","bz","501"],["Benin","bj","229"],["Bermuda","bm","1441"],["Bhutan","bt","975"],["Bolivia","bo","591"],["Bosnia and Herzegovina","ba","387"],["Botswana","bw","267"],["Brazil","br","55"],["British Indian Ocean Territory","io","246"],["British Virgin Islands","vg","1284"],["Brunei","bn","673"],["Bulgaria","bg","359"],["Burkina Faso","bf","226"],["Burundi","bi","257"],["Cambodia","kh","855"],["Cameroon","cm","237"],["Canada","ca","1",1,["204","226","236","249","250","289","306","343","365","387","403","416","418","431","437","438","450","506","514","519","548","579","581","587","604","613","639","647","672","705","709","742","778","780","782","807","819","825","867","873","902","905"]],["Cape Verde","cv","238"],["Caribbean Netherlands","bq","599",1],["Cayman Islands","ky","1345"],["Central African Republic","cf","236"],["Chad","td","235"],["Chile","cl","56"],["China","cn","86"],["Christmas Island","cx","61",2],["Cocos (Keeling) Islands","cc","61",1],["Colombia","co","57"],["Comoros","km","269"],["Congo (DRC) (Jamhuri ya Kidemokrasia ya Kongo)","cd","243"],["Congo (Republic) (Congo-Brazzaville)","cg","242"],["Cook Islands","ck","682"],["Costa Rica","cr","506"],["Cote d'Ivoire","ci","225"],["Croatia","hr","385"],["Cuba","cu","53"],["Curacao","cw","599",0],["Cyprus","cy","357"],["Czech Republic","cz","420"],["Denmark","dk","45"],["Djibouti","dj","253"],["Dominica","dm","1767"],["Dominican Republic","do","1",2,["809","829","849"]],["Ecuador","ec","593"],["Egypt","eg","20"],["El Salvador","sv","503"],["Equatorial Guinea","gq","240"],["Eritrea","er","291"],["Estonia","ee","372"],["Ethiopia","et","251"],["Falkland Islands","fk","500"],["Faroe Islands","fo","298"],["Fiji","fj","679"],["Finland","fi","358",0],["France","fr","33"],["French Guiana","gf","594"],["French Polynesia","pf","689"],["Gabon","ga","241"],["Gambia","gm","220"],["Georgia","ge","995"],["Germany","de","49"],["Ghana","gh","233"],["Gibraltar","gi","350"],["Greece","gr","30"],["Greenland","gl","299"],["Grenada","gd","1473"],["Guadeloupe","gp","590",0],["Guam","gu","1671"],["Guatemala","gt","502"],["Guernsey","gg","44",1],["Guinea","gn","224"],["Guinea-Bissau","gw","245"],["Guyana","gy","592"],["Haiti","ht","509"],["Honduras","hn","504"],["Hong Kong","hk","852"],["Hungary","hu","36"],["Iceland","is","354"],["India","in","91"],["Indonesia","ia","62"],["Iran","ir","98"],["Iraq","iq","964"],["Ireland","ie","353"],["Isle of Man","im","44",2],["Israel","il","972"],["Italy","it","39",0],["Jamaica","jm","1876"],["Japan","jp","81"],["Jersey","je","44",3],["Jordan","jo","962"],["Kazakhstan","kz","7",1],["Kenya","ke","254"],["Kiribati","ki","686"],["Kosovo","xk","383"],["Kuwait","kw","965"],["Kyrgyzstan","kg","996"],["Laos","la","856"],["Latvia","lv","371"],["Lebanon","lb","961"],["Lesotho","ls","266"],["Liberia","lr","231"],["Libya","ly","218"],["Liechtenstein","li","423"],["Lithuania","lt","370"],["Luxembourg","lu","352"],["Macau","mo","853"],["Macedonia","mk","389"],["Madagascar","mg","261"],["Malawi","mw","265"],["Malaysia","my","60"],["Maldives","mv","960"],["Mali","ml","223"],["Malta","mt","356"],["Marshall Islands","mh","692"],["Martinique","mq","596"],["Mauritania","mr","222"],["Mauritius","mu","230"],["Mayotte","yt","262",1],["Mexico","mx","52"],["Micronesia","fm","691"],["Moldova","md","373"],["Monaco","mc","377"],["Mongolia","mn","976"],["Montenegro","me","382"],["Montserrat","ms","1664"],["Morocco","ma","212",0],["Mozambique","mz","258"],["Myanmar (Burma)","mm","95"],["Namibia","na","264"],["Nauru","nr","674"],["Nepal","np","977"],["Netherlands (Nederland)","nl","31"],["New Caledonia","nc","687"],["New Zealand","nz","64"],["Nicaragua","ni","505"],["Niger","ne","227"],["Nigeria","ng","234"],["Niue","nu","683"],["Norfolk Island","nf","672"],["North Korea","kp","850"],["Northern Mariana Islands","mp","1670"],["Norway (Norge)","no","47",0],["Oman","om","968"],["Pakistan","pk","92"],["Palau","pw","680"],["Palestine","ps","970"],["Panama","pa","507"],["Papua New Guinea","pg","675"],["Paraguay","py","595"],["Peru","pe","51"],["Philippines","ph","63"],["Poland","pl","48"],["Portugal","pt","351"],["Puerto Rico","pr","1",3,["787","939"]],["Qatar","qa","974"],["Reunion","re","262",0],["Romania","ro","40"],["Russia","ru","7",0],["Rwanda","rw","250"],["Saint Barthelemy","bl","590",1],["Saint Helena","sh","290"],["Saint Kitts and Nevis","kn","1869"],["Saint Lucia","lc","1758"],["Saint Martin","mf","590",2],["Saint Pierre and Miquelon","pm","508"],["Saint Vincent and the Grenadines","vc","1784"],["Samoa","ws","685"],["San Marino","sm","378"],["Sao Tome and Principe","st","239"],["Saudi Arabia","sa","966"],["Senegal","sn","221"],["Serbia","rs","381"],["Seychelles","sc","248"],["Sierra Leone","sl","232"],["Singapore","sg","65"],["Sint Maarten","sx","1721"],["Slovakia","sk","421"],["Slovenia","si","386"],["Solomon Islands","sb","677"],["Somalia","so","252"],["South Africa","za","27"],["South Korea","kr","82"],["South Sudan","ss","211"],["Spain","es","34"],["Sri Lanka","lk","94"],["Sudan","sd","249"],["Suriname","sr","597"],["Svalbard and Jan Mayen","sj","47",1],["Swaziland","sz","268"],["Sweden (Sverige)","se","46"],["Switzerland","ch","41"],["Syria","sy","963"],["Taiwan","tw","886"],["Tajikistan","tj","992"],["Tanzania","tz","255"],["Thailand","th","66"],["Timor-Leste","tl","670"],["Togo","tg","228"],["Tokelau","tk","690"],["Tonga","to","676"],["Trinidad and Tobago","tt","1868"],["Tunisia","tn","216"],["Turkey","tr","90"],["Turkmenistan","tm","993"],["Turks and Caicos Islands","tc","1649"],["Tuvalu","tv","688"],["U.S. Virgin Islands","vi","1340"],["Uganda","ug","256"],["Ukraine","ua","380"],["United Arab Emirates","ae","971"],["United Kingdom","gb","44",0],["United States","us","1",0],["Uruguay","uy","598"],["Uzbekistan","uz","998"],["Vanuatu","vu","678"],["Vatican City","va","39",1],["Venezuela","ve","58"],["Vietnam","vn","84"],["Wallis and Futuna","wf","681"],["Western Sahara","eh","212",1],["Yemen","ye","967"],["Zambia","zm","260"],["Zimbabwe","zw","263"],["Aland Islands","ax","358",1]],v=0;v<w.length;v++){var g=w[v];w[v]={name:g[0],iso2:g[1],dialCode:g[2],priority:g[3]||0,areaCodes:g[4]||null}}});var gmapdata=new Array,gmapmarker=new Array;function if_gmap_init(e,t){if(document.getElementById(e+"_element"+t)){map=document.getElementById(e+"_element"+t);var r=parseInt(map.getAttribute("zoom")),i=map.getAttribute("center_x"),n=map.getAttribute("center_y"),a=new google.maps.LatLng(n,i);return gmapdata[e]=new google.maps.Map(document.getElementById(e+"_element"+t),{center:a,zoom:r,mapTypeId:"roadmap"}),gmapmarker[e]=new Array,!1}draggab=!1,map=document.getElementById(e);r=parseInt(map.getAttribute("zoom")),i=map.getAttribute("long"),n=map.getAttribute("lat"),a=new google.maps.LatLng(n,i);return gmapdata=new google.maps.Map(document.getElementById(e),{center:a,zoom:r,mapTypeId:"roadmap"}),geocoder=new google.maps.Geocoder,(gmapmarker=new google.maps.Marker({map:gmapdata,position:a,draggable:draggab})).setDraggable(draggab),infoW=new google.maps.InfoWindow,google.maps.event.addListener(gmapdata,"mouseover",function(e){document.getElementById("longval")||(gmapmarker.draggable=!1)}),google.maps.event.addListener(gmapdata,"click",function(e){document.getElementById("longval")&&(document.getElementById("longval").value=e.latLng.lng().toFixed(6),document.getElementById("latval").value=e.latLng.lat().toFixed(6),gmapmarker.setPosition(e.latLng),if_gmap_updateMap(),geocoder.geocode({latLng:gmapmarker.getPosition()},function(e,t){t==google.maps.GeocoderStatus.OK&&e[0]&&document.getElementById("addrval")&&(document.getElementById("addrval").value=e[0].formatted_address)}))}),google.maps.event.addListener(gmapmarker,"drag",function(){document.getElementById("longval")&&(geocoder.geocode({latLng:gmapmarker.getPosition()},function(e,t){t==google.maps.GeocoderStatus.OK&&e[0]&&document.getElementById("addrval")&&(document.getElementById("addrval").value=e[0].formatted_address)}),if_gmap_updateMap(),document.getElementById("latval").value=gmapmarker.getPosition().lat().toFixed(6),document.getElementById("longval").value=gmapmarker.getPosition().lng().toFixed(6))}),google.maps.event.addListener(gmapmarker,"click",function(){infoW.setContent('<div style="overflow: hidden;">'+document.getElementById(e).getAttribute("info")+"</div>");infoW.setOptions({maxWidth:"300"}),infoW.open(this.getMap(),this)}),document.getElementById("longval")&&(document.getElementById("longval").value=i,document.getElementById("latval").value=n,geocoder.geocode({latLng:gmapmarker.getPosition()},function(e,t){t==google.maps.GeocoderStatus.OK&&e[0]&&document.getElementById("addrval")&&(document.getElementById("addrval").value=e[0].formatted_address)})),!1}function add_marker_on_map(e,t,r,i,n,a,o){var d=new google.maps.LatLng(i,r);return gmapmarker[e][t]=new google.maps.Marker({map:gmapdata[e],position:d,draggable:o}),gmapmarker[e][t].setDraggable(o),o&&google.maps.event.addListener(gmapmarker[e][t],"drag",function(){document.getElementById(e+"_lat"+a).value=gmapmarker[e][t].getPosition().lat().toFixed(6),document.getElementById(e+"_long"+a).value=gmapmarker[e][t].getPosition().lng().toFixed(6)}),infoW=new google.maps.InfoWindow,google.maps.event.addListener(gmapmarker[e][t],"click",function(){infoW.setContent('<div style="overflow: hidden;">'+document.getElementById(e+"_element"+a).getAttribute("info"+t)+"</div>");infoW.setOptions({maxWidth:"300"}),infoW.open(this.getMap(),this)}),!1}!function(L){function r(e,t){var a=this,o=L.extend({},L.fn.signaturePad.defaults,t),d=L(e),r=L(o.canvas,d),s=r.get(0),l=null,u={x:null,y:null},c=[],m=!1,i=!1,n=!1,_=!1,f=30,p=f,y=0;function h(){clearTimeout(m),i=m=!1}function w(e,t){var r,i,n;if(e.preventDefault(),r=L(e.target).offset(),clearTimeout(m),m=!1,n=void 0!==e.targetTouches?(i=Math.floor(e.targetTouches[0].pageX-r.left),Math.floor(e.targetTouches[0].pageY-r.top)):(i=Math.floor(e.pageX-r.left),Math.floor(e.pageY-r.top)),u.x===i&&u.y===n)return!0;null===u.x&&(u.x=i),null===u.y&&(u.y=n),t&&(n+=t),l.beginPath(),l.moveTo(u.x,u.y),l.lineTo(i,n),l.lineCap=o.penCap,l.stroke(),l.closePath(),c.push({lx:i,ly:n,mx:u.x,my:u.y}),u.x=i,u.y=n,o.onDraw&&"function"==typeof o.onDraw&&o.onDraw.apply(a)}function v(){g()}function g(e){e?w(e,1):(n?r.each(function(){this.removeEventListener("touchmove",w)}):r.unbind("mousemove.signaturepad"),0<c.length&&o.onDrawEnd&&"function"==typeof o.onDrawEnd&&o.onDrawEnd.apply(a)),u.x=null,u.y=null,o.output&&0<c.length&&L(o.output,d).val(JSON.stringify(c))}function b(){l.clearRect(0,0,s.width,s.height),l.fillStyle=o.bgColour,l.fillRect(0,0,s.width,s.height),o.displayOnly||function(){if(!o.lineWidth)return;l.beginPath(),l.lineWidth=o.lineWidth,l.strokeStyle=o.lineColour,l.moveTo(o.lineMargin,o.lineTop),l.lineTo(s.width-o.lineMargin,o.lineTop),l.stroke(),l.closePath()}(),l.lineWidth=o.penWidth,l.strokeStyle=o.penColour,L(o.output,d).val(""),c=[],g()}function j(e,t){null==u.x?w(e,1):w(e,t)}function Q(e,t){n?t.addEventListener("touchmove",j,!1):r.bind("mousemove.signaturepad",j),w(e,1)}function C(e){if(_)return!1;_=!0,L("input").blur(),void 0!==e.targetTouches&&(n=!0),n?(r.each(function(){this.addEventListener("touchend",v,!1),this.addEventListener("touchcancel",v,!1)}),r.unbind("mousedown.signaturepad")):(L(document).bind("mouseup.signaturepad",function(){i&&(g(),h())}),r.bind("mouseleave.signaturepad",function(e){i&&g(e),i&&!m&&(m=setTimeout(function(){g(),h()},500))}),r.each(function(){this.removeEventListener("touchstart",k)}))}function k(e){e.preventDefault(),i=!0,C(e),Q(e,this)}function I(){L(o.typed,d).hide(),b(),r.each(function(){this.addEventListener("touchstart",k)}),r.bind("mousedown.signaturepad",function(e){if(e.preventDefault(),1<e.which)return!1;i=!0,C(e),Q(e)}),L(o.clear,d).bind("click.signaturepad",function(e){e.preventDefault(),b()}),L(o.typeIt,d).bind("click.signaturepad",function(e){e.preventDefault(),x()}),L(o.drawIt,d).unbind("click.signaturepad"),L(o.drawIt,d).bind("click.signaturepad",function(e){e.preventDefault()}),L(o.typeIt,d).removeClass(o.currentClass),L(o.drawIt,d).addClass(o.currentClass),L(o.sig,d).addClass(o.currentClass),L(o.typeItDesc,d).hide(),L(o.drawItDesc,d).show(),L(o.clear,d).show()}function x(){b(),_=!1,r.each(function(){this.removeEventListener&&(this.removeEventListener("touchend",v),this.removeEventListener("touchcancel",v),this.removeEventListener("touchmove",w),this.removeEventListener("touchstart",k))}),L(document).unbind("mouseup.signaturepad"),r.unbind("mousedown.signaturepad"),r.unbind("mousemove.signaturepad"),r.unbind("mouseleave.signaturepad"),L(o.clear,d).unbind("click.signaturepad"),L(o.typed,d).show(),L(o.drawIt,d).bind("click.signaturepad",function(e){e.preventDefault(),I()}),L(o.typeIt,d).unbind("click.signaturepad"),L(o.typeIt,d).bind("click.signaturepad",function(e){e.preventDefault()}),L(o.output,d).val(""),L(o.drawIt,d).removeClass(o.currentClass),L(o.typeIt,d).addClass(o.currentClass),L(o.sig,d).removeClass(o.currentClass),L(o.drawItDesc,d).hide(),L(o.clear,d).hide(),L(o.typeItDesc,d).show(),p=f=L(o.typed,d).css("font-size").replace(/px/,"")}function D(e){var t=L(o.typed,d),r=L.trim(e.replace(/>/g,"&gt;").replace(/</g,"&lt;")),i=y,n=.5*p;if(y=r.length,t.html(r),r){if(i<y&&t.outerWidth()>s.width)for(;t.outerWidth()>s.width;)p--,t.css("font-size",p+"px");if(y<i&&t.outerWidth()+n<s.width&&p<f)for(;t.outerWidth()+n<s.width&&p<f;)p++,t.css("font-size",p+"px")}else t.css("font-size",f+"px")}function E(){var e=!0,t={drawInvalid:!1,nameInvalid:!1},r=[d,o],i=[t,d,o];return o.onBeforeValidate&&"function"==typeof o.onBeforeValidate?o.onBeforeValidate.apply(a,r):function(e,t){L("p."+t.errorClass,e).remove(),e.removeClass(t.errorClass),L("input, label",e).removeClass(t.errorClass)}.apply(a,r),o.drawOnly&&c.length<1&&(e=!(t.drawInvalid=!0)),""===L(o.name,d).val()&&(e=!(t.nameInvalid=!0)),o.onFormError&&"function"==typeof o.onFormError?o.onFormError.apply(a,i):function(e,t,r){e.nameInvalid&&(t.prepend(['<p class="',r.errorClass,'">',r.errorMessage,"</p>"].join("")),L(r.name,t).focus(),L(r.name,t).addClass(r.errorClass),L("label[for="+L(r.name).attr("id")+"]",t).addClass(r.errorClass)),e.drawInvalid&&t.prepend(['<p class="',r.errorClass,'">',r.errorMessageDraw,"</p>"].join(""))}.apply(a,i),e}function A(e,t,r){for(var i in e)"object"==typeof e[i]&&(t.beginPath(),t.moveTo(e[i].mx,e[i].my),t.lineTo(e[i].lx,e[i].ly),t.lineCap=o.penCap,t.stroke(),t.closePath(),r&&e[i].lx&&c.push({lx:e[i].lx,ly:e[i].ly,mx:e[i].mx,my:e[i].my}))}L.extend(a,{signaturePad:"{{version}}",init:function(){parseFloat((/CPU.+OS ([0-9_]{3}).*AppleWebkit.*Mobile/i.exec(navigator.userAgent)||[0,"4_2"])[1].replace("_","."))<4.1&&(L.fn.Oldoffset=L.fn.offset,L.fn.offset=function(){var e=L(this).Oldoffset();return e.top-=window.scrollY,e.left-=window.scrollX,e}),L(o.typed,d).bind("selectstart.signaturepad",function(e){return L(e.target).is(":input")}),r.bind("selectstart.signaturepad",function(e){return L(e.target).is(":input")}),!s.getContext&&FlashCanvas&&FlashCanvas.initElement(s),s.getContext&&(l=s.getContext("2d"),L(o.sig,d).show(),o.displayOnly||(o.drawOnly||(L(o.name,d).bind("keyup.signaturepad",function(){D(L(this).val())}),L(o.name,d).bind("blur.signaturepad",function(){D(L(this).val())}),L(o.drawIt,d).bind("click.signaturepad",function(e){e.preventDefault(),I()})),o.drawOnly||"drawIt"===o.defaultAction?I():x(),o.validateFields&&(L(e).is("form")?L(e).bind("submit.signaturepad",function(){return E()}):L(e).parents("form").bind("submit.signaturepad",function(){return E()})),L(o.sigNav,d).show()))},updateOptions:function(e){L.extend(o,e)},regenerate:function(e){a.clearCanvas(),L(o.typed,d).hide(),"string"==typeof e&&(e=JSON.parse(e)),A(e,l,!0),o.output&&0<L(o.output,d).length&&L(o.output,d).val(JSON.stringify(c))},clearCanvas:function(){b()},getSignature:function(){return c},getSignatureString:function(){return JSON.stringify(c)},getSignatureImage:function(){var e,t=document.createElement("canvas"),r=null;return t.style.position="absolute",t.style.top="-999em",t.width=s.width,t.height=s.height,document.body.appendChild(t),!t.getContext&&FlashCanvas&&FlashCanvas.initElement(t),(r=t.getContext("2d")).fillStyle=o.bgColour,r.fillRect(0,0,s.width,s.height),r.lineWidth=o.penWidth,r.strokeStyle=o.penColour,A(c,r),e=t.toDataURL.apply(t,arguments),document.body.removeChild(t),t=null,e},validateForm:function(){return E()}})}L.fn.signaturePad=function(e){var t=null;return this.each(function(){L.data(this,"plugin-signaturePad")?(t=L.data(this,"plugin-signaturePad")).updateOptions(e):((t=new r(this,e)).init(),L.data(this,"plugin-signaturePad",t))}),t},L.fn.signaturePad.defaults={defaultAction:"typeIt",displayOnly:!1,drawOnly:!1,canvas:"canvas",sig:".sig",sigNav:".sigNav",bgColour:"#ffffff",penColour:"#145394",penWidth:2,penCap:"round",lineColour:"#ccc",lineWidth:2,lineMargin:5,lineTop:35,name:".name",typed:".typed",clear:".clearButton",typeIt:".typeIt a",drawIt:".drawIt a",typeItDesc:".typeItDesc",drawItDesc:".drawItDesc",output:".output",currentClass:"current",validateFields:!0,errorClass:"error",errorMessage:"Please enter your name",errorMessageDraw:"Please sign the document",onBeforeValidate:null,onFormError:null,onDraw:null,onDrawEnd:null}}(jQuery);
1
+ var fm_rated=!1;function form_load_actions(){jQuery(".wd-datepicker").each(function(){jQuery(this).datepicker(),jQuery(this).datepicker("option","dateFormat",jQuery(this).data("format"))});var e=jQuery(".fm-form").find(".fm-message");0!==e.length&&0==e.closest(".fm-popover-content").length&&0==e.closest(".fm-scrollbox-form").length&&0==e.closest(".fm-topbar").length&&(jQuery(window).scrollTop(jQuery(".fm-message").offset().top-100),-1<navigator.userAgent.toLowerCase().indexOf("safari/")&&(document.scrollingElement.scrollTop=jQuery(".fm-message").offset().top-100));if(0!==jQuery(".fm-form").find(".message_captcha").length){var t=jQuery(".fm-form").attr("name").split("form")[1];if(0!==jQuery("#form"+t+" .message_captcha").length){var r=jQuery(jQuery("#form"+t+" .message_captcha")).offset().top;jQuery(".fm-form").find(".message_captcha").parents(".wdform-field").find(".wdform-label").addClass("error_label"),jQuery("html").animate({scrollTop:r-150},500),document.scrollingElement.scrollTop=r-150}}}function set_total_value(form_id){var getDataHideCurreny=jQuery(".paypal_total"+form_id).parent().parent().attr("data-hide-currency");if("yes"==getDataHideCurreny)var toggle_currency="wd-hidden",FormCurrency="";else var toggle_currency="wd-inline-block",FormCurrency=window["FormCurrency_"+form_id]+" ";if(0!=jQuery(".paypal_total"+form_id).length){var div_paypal_show=jQuery(".paypal_total"+form_id),div_paypal_products=jQuery(".paypal_products"+form_id),div_paypal_tax=jQuery(".paypal_tax"+form_id),input_paypal_total=jQuery(".input_paypal_total"+form_id),total=0,total_shipping=0;div_paypal_products.html(""),div_paypal_tax.html(""),n=parseInt(jQuery("#counter"+form_id).val()),jQuery("#form"+form_id+" div[type='type_paypal_checkbox'], #form"+form_id+" div[type='type_paypal_radio']").each(function(){var e=jQuery(this).parent();if("none"!=e.css("display")){var t=e.attr("wdid");paypal_checkbox_qty=jQuery("#wdform_"+t+"_element_quantity"+form_id).val()?jQuery("#wdform_"+t+"_element_quantity"+form_id).val():0,jQuery(this).find("input:checked").each(function(){label=jQuery("label[for='"+jQuery(this).attr("id")+"']").html(),span_value='<span class="'+toggle_currency+'">'+FormCurrency+"</span>"+jQuery(this).val()+(0!=jQuery("#wdform_"+t+"_element_quantity"+form_id).length?" x "+paypal_checkbox_qty:""),total+=jQuery(this).val()*parseInt(0!=jQuery("#wdform_"+t+"_element_quantity"+form_id).length?paypal_checkbox_qty:1),div_paypal_products.html(div_paypal_products.html()+"<div>"+label+" - "+span_value+"</div>")})}}),jQuery("#form"+form_id+" div[type='type_paypal_shipping']").each(function(){var e=jQuery(this).parent();if("none"!=e.css("display")){var t=e.attr("wdid");paypal_shipping_qty=jQuery("#wdform_"+t+"_element_quantity"+form_id).val()?jQuery("#wdform_"+t+"_element_quantity"+form_id).val():0,jQuery(this).find("input:checked").each(function(){label=jQuery("label[for='"+jQuery(this).attr("id")+"']").html(),span_value='<span class="'+toggle_currency+'">'+FormCurrency+"</span>"+jQuery(this).val()+(0!=jQuery("#wdform_"+t+"_element_quantity"+form_id).length?" x "+paypal_shipping_qty:""),total_shipping+=jQuery(this).val()*parseInt(0!=jQuery("#wdform_"+t+"_element_quantity"+form_id).length?paypal_shipping_qty:1),div_paypal_products.html(div_paypal_products.html()+"<div>"+label+" - "+span_value+"</div>")})}}),jQuery("#form"+form_id+" div[type='type_paypal_select']").each(function(){var e=jQuery(this).parent();if("none"!=e.css("display")){var t=e.attr("wdid");paypal_select_qty=jQuery("#wdform_"+t+"_element_quantity"+form_id).val()?jQuery("#wdform_"+t+"_element_quantity"+form_id).val():0,""!=jQuery(this).find("select").val()&&(label=jQuery(this).find("select option:selected").html(),span_value='<span class="'+toggle_currency+'">'+FormCurrency+"</span>"+jQuery(this).find("select").val()+(0!=jQuery("#wdform_"+t+"_element_quantity"+form_id).length?" x "+paypal_select_qty:""),total+=jQuery(this).find("select").val()*parseInt(0!=jQuery("#wdform_"+t+"_element_quantity"+form_id).length?paypal_select_qty:1),div_paypal_products.html(div_paypal_products.html()+"<div>"+label+" - "+span_value+"</div>"))}}),jQuery("#form"+form_id+" div[type='type_paypal_price']").each(function(){var e=jQuery(this).parent();if("none"!=e.css("display")){var t=e.attr("wdid");label=jQuery(this).find(".wdform-label").html(),cents="00",dollars="0",""!=jQuery("#wdform_"+t+"_element_dollars"+form_id).val()&&(dollars=jQuery("#wdform_"+t+"_element_dollars"+form_id).val()),""!=jQuery("#wdform_"+t+"_element_cents"+form_id).val()&&(1==jQuery("#wdform_"+t+"_element_cents"+form_id).val().length?cents="0"+jQuery("#wdform_"+t+"_element_cents"+form_id).val():cents=jQuery("#wdform_"+t+"_element_cents"+form_id).val(),span_value='<span class="'+toggle_currency+'">'+FormCurrency+"</span>"+dollars+"."+cents,total+=parseFloat(dollars+"."+cents),div_paypal_products.html(div_paypal_products.html()+"<div>"+label+" - "+span_value+"</div>"))}}),jQuery("#form"+form_id+" div[type='type_paypal_price_new']").each(function(){var e=jQuery(this).parent();if("none"!=e.css("display")){var t=e.attr("wdid");label=jQuery(this).find(".wdform-label").html(),dollars="0",""!=jQuery("#wdform_"+t+"_element"+form_id).val()&&(dollars=jQuery("#wdform_"+t+"_element"+form_id).val()),span_value='<span class="'+toggle_currency+'">'+FormCurrency+"</span>"+dollars,total+=parseFloat(dollars),div_paypal_products.html(div_paypal_products.html()+"<div>"+label+" - "+span_value+"</div>")}});var FormPaypalTax=eval("FormPaypalTax_"+form_id);0!=FormPaypalTax&&div_paypal_tax.html("Tax: "+FormCurrency+(total*FormPaypalTax/100).toFixed(2)),jQuery(".div_total"+form_id).html('<span class="'+toggle_currency+'">'+FormCurrency+"</span>"+(parseFloat((total*(1+FormPaypalTax/100)).toFixed(2))+total_shipping).toFixed(2)),input_paypal_total.val(FormCurrency+(parseFloat((total*(1+FormPaypalTax/100)).toFixed(2))+total_shipping).toFixed(2))}}function check_isnum_or_minus(e){var t=e.which||e.keyCode;return!(45!=t&&31<t&&(t<48||57<t))}function sum_grading_values(e,t){for(var r=0,i=0;i<100;i++)document.getElementById(e+"_element"+t+"_"+i)&&document.getElementById(e+"_element"+t+"_"+i).value&&(r+=parseInt(document.getElementById(e+"_element"+t+"_"+i).value)),document.getElementById(e+"_total_element"+t)&&(r>document.getElementById(e+"_total_element"+t).innerHTML?document.getElementById(e+"_text_element"+t).innerHTML=" "+fm_objectL10n.fm_grading_text+" "+document.getElementById(e+"_total_element"+t).innerHTML:document.getElementById(e+"_text_element"+t).innerHTML="");document.getElementById(e+"_sum_element"+t)&&(document.getElementById(e+"_sum_element"+t).innerHTML=r)}function change_src(e,t,r,i){if(0==fm_rated)for(var n=0;n<=e;n++)document.getElementById(t+"_star_"+n+"_"+r).src=fm_objectL10n.plugin_url+"/images/star_"+i+".png"}function reset_src(e,t,r){if(0==fm_rated)for(var i=0;i<=e;i++)document.getElementById(t+"_star_"+i+"_"+r).src=fm_objectL10n.plugin_url+"/images/star.png"}function select_star_rating(e,t,r,i,n){fm_rated=!0;for(var a=0;a<=e;a++)document.getElementById(t+"_star_"+a+"_"+r).src=fm_objectL10n.plugin_url+"/images/star_"+i+".png";for(var o=e+1;o<=n-1;o++)document.getElementById(t+"_star_"+o+"_"+r).src=fm_objectL10n.plugin_url+"/images/star.png";document.getElementById(t+"_selected_star_amount"+r).value=e+1,jQuery("#"+t+"_selected_star_amount"+r).trigger("change")}function show_other_input(e,t){var r=jQuery(".form"+t+" [id^="+e+"_element"+t+'][other="1"]').parent(),i=document.createElement("br");i.setAttribute("id",e+"_other_br"+t);var n=e.split("_")[1],a=document.createElement("input");a.setAttribute("id",e+"_other_input"+t),a.setAttribute("name",e+"_other_input"+t),a.setAttribute("type","text"),a.setAttribute("class","other_input"),a.setAttribute("onchange","other_input_change(this, '"+t+"', '"+n+"')"),r.children("input").length<2&&(r.append(i),r.append(a))}function other_input_change(e,t,r){""==jQuery(e).val()?wd_is_filled(t,r):(jQuery("#form"+t+" #wd_required_"+r).remove(),jQuery("#form"+t+" div[wdid='"+r+"'] .wdform-label-section:first .error_label").removeClass("error_label"))}function check_isnum(e){var t=e.which||e.keyCode;return-1!=jQuery.inArray(t,[46,8,9,27,13,190])||!0===e.ctrlKey||35<=t&&t<39||45==t||!(31<t&&(t<48||57<t))}function captcha_refresh(e,t){srcArr=document.getElementById(e+t).src.split("&r="),document.getElementById(e+t).src=srcArr[0]+"&r="+Math.floor(100*Math.random()),document.getElementById(e+"_input"+t).value="",document.getElementById(e+t).style.display="inline-block"}function set_checked(e,t,r){return checking=document.getElementById(e+"_element"+r+t),!(checking.getAttribute("other")&&1==checking.getAttribute("other")&&!checking.checked)||(document.getElementById(e+"_other_input"+r)&&(document.getElementById(e+"_other_input"+r).parentNode.removeChild(document.getElementById(e+"_other_br"+r)),document.getElementById(e+"_other_input"+r).parentNode.removeChild(document.getElementById(e+"_other_input"+r))),!1)}function set_default(e,t,r){document.getElementById(e+"_other_input"+r)&&(document.getElementById(e+"_other_input"+r).parentNode.removeChild(document.getElementById(e+"_other_br"+r)),document.getElementById(e+"_other_input"+r).parentNode.removeChild(document.getElementById(e+"_other_input"+r)))}function add_0(e){1==jQuery(e).val().length&&jQuery(e).val("0"+jQuery(e).val())}function wd_validate(e,t){if(!jQuery(e).is("input"))return!0;var r,i,n,a=jQuery(e).val(),o=(jQuery(e).attr("id"),jQuery(e).parent().find(".hidden_date")),d=jQuery(e).data("valid-type"),l=jQuery(e).data("form-id"),s=jQuery(e).data("wdid"),u=o.data("format"),c=new Date(o.data("min")),m=new Date(o.data("max")),_=parseInt(jQuery(e).attr("from")),f=parseInt(jQuery(e).attr("to"));if(void 0===t)t=jQuery(e).data("addiotional-fields");var p="#form"+l+" div[wdid='"+s+"']",y=jQuery(p+" .wdform-label-section:first .wdform-label"),h=jQuery(p+" .wdform-element-section");switch(d){case"hour24":r=fm_objectL10n.time_validation,n=/^(0?[0-1]?[0-9]|2[0-3])?$/;break;case"hour12":r=fm_objectL10n.time_validation,n=/^(0?[0-9]|1[0-2])?$/;break;case"minute":case"second":r=fm_objectL10n.time_validation,n=/^([0-5]?[0-9])?$/;break;case"number":r=fm_objectL10n.number_validation,n=/^\-{0,1}\d+(.\d+){0,1}$/;break;case"quantity":r=fm_objectL10n.number_validation,n=/^[+]?\d+([.]\d+)?$/;break;case"day":r=fm_objectL10n.date_validation,n=/^(0?[0-2]?[0-9]|3[0-1])?$/;break;case"month":r=fm_objectL10n.date_validation,n=/^(0?[0-9]|1[0-2])?$/;break;case"year":r=fm_objectL10n.date_validation,n=/^([1-2]?[0-9]?[0-9]?[0-9])?$/;break;case"date":n="mm/dd/yy"==u?(r=fm_objectL10n.date_validation,/^(0[1-9]|1[0-2])\/(0[1-9]|[1-2][0-9]|3[01])\/\d{4}$/):(r="",/^$/)}if(i=n.test(a),""!=a&&"mm/dd/yy"==u||(i=!0),i)for(var w in t)if(!(i=wd_validate("#"+t[w],"")))break;return"year"==d&&(parseInt(a)<_||parseInt(a)>f)&&(i=!1,r=fm_objectL10n.year_validation.replace("%%start%%",_).replace("%%end%%",f)),"date"==d&&(new Date(a)<c||new Date(a)>m)&&(i=!1,r=fm_objectL10n.date_validation),jQuery("#check_email_"+s+"_"+l).remove(),i?(y.removeClass("wd-error-label"),delete window["check_before_submit"+l][s+"_"+l]):(h.parent().parent().append("<div id='check_email_"+s+"_"+l+"' class='fm-not-filled'>"+r+"</div>"),y.addClass("wd-error-label"),window["check_before_submit"+l][s+"_"+l]=!1),i}function check_isnum_interval(e,t,r,i){var n=e.which||e.keyCode;return-1!=jQuery.inArray(n,[46,8,9,27,13,190])||!0===e.ctrlKey||35<=n&&n<39||!(31<n&&(n<48||57<n))&&(val1=""+jQuery(t).val()+String.fromCharCode(n),!(2<val1.length)&&("00"!=val1&&!(val1<r||val1>i)))}function destroyChildren(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function generate_page_nav(e,t,r){var i;if(form_view=e,page_nav=document.getElementById(t+"page_nav"+e),destroyChildren(page_nav),form_view_elemet=document.getElementById(t+"form_view"+e),remove_whitespace(form_view_elemet.parentNode.parentNode),display_none_form_views_all(t),form_view_elemet.parentNode.style.display="",(i=document.createElement("div")).setAttribute("valign","middle"),i.setAttribute("align","left"),i.style.display="table-cell",i.style.width="40%",page_nav.appendChild(i),form_view_elemet.parentNode.previousSibling&&-1!=form_view_elemet.parentNode.previousSibling.className.indexOf("wdform-page-and-images")&&form_view_elemet.parentNode.previousSibling.previousSibling&&("DIV"==form_view_elemet.parentNode.previousSibling.tagName?table=form_view_elemet.parentNode.previousSibling:"DIV"==form_view_elemet.parentNode.previousSibling.previousSibling.tagName?table=form_view_elemet.parentNode.previousSibling.previousSibling:table="none","none"!=table&&(table.firstChild.tagName||table.removeChild(table.firstChild),previous_title=form_view_elemet.getAttribute("previous_title"),previous_type=form_view_elemet.getAttribute("previous_type"),"text"==previous_type&&i.setAttribute("class","previous-page"),previous_class=form_view_elemet.getAttribute("previous_class"),previous_checkable=form_view_elemet.getAttribute("previous_checkable"),next_or_previous="previous",previous=make_pagebreak_button(next_or_previous,previous_title,previous_type,previous_class,previous_checkable,e,t,r),i.appendChild(previous))),(i=document.createElement("div")).setAttribute("id",t+"page_numbers"+form_view),i.setAttribute("valign","middle"),i.setAttribute("class","page-numbers"),i.setAttribute("align","center"),i.style.display="table-cell","true"==document.getElementById("fm-pages"+t).getAttribute("show_numbers")){var n=document.createElement("span");n.setAttribute("class","page_numbers"),i.appendChild(n)}page_nav.appendChild(i),(i=document.createElement("div")).setAttribute("valign","middle"),i.setAttribute("align","right"),i.style.cssText="display:table-cell; width:40%; text-align:right;",page_nav.appendChild(i),not_next=!1,form_view_elemet.parentNode.nextSibling?("DIV"==form_view_elemet.parentNode.nextSibling.tagName&&-1!=form_view_elemet.parentNode.nextSibling.className.indexOf("wdform-page-and-images")?table=form_view_elemet.parentNode.nextSibling:form_view_elemet.parentNode.nextSibling.nextSibling&&"DIV"==form_view_elemet.parentNode.nextSibling.nextSibling.tagName?table=form_view_elemet.parentNode.nextSibling.nextSibling:table="none","none"!=table?(next_title=form_view_elemet.getAttribute("next_title"),next_type=form_view_elemet.getAttribute("next_type"),"text"==next_type&&i.setAttribute("class","next-page"),next_class=form_view_elemet.getAttribute("next_class"),next_checkable=form_view_elemet.getAttribute("next_checkable"),next_or_previous="next",next=make_pagebreak_button(next_or_previous,next_title,next_type,next_class,next_checkable,e,t,r),i.appendChild(next)):not_next=!0):not_next=!0,generate_page_bar(e,t,r),fm_initilize_form(t)}function fm_initilize_form(e){jQuery("#form"+e+" div[type='type_map']").each(function(){for(id=jQuery(this).parent().attr("wdid"),if_gmap_init("wdform_"+id,e),q=0;q<20;q++)jQuery("#wdform_"+id+"_element"+e)[0].getAttribute("long"+q)&&(w_long=parseFloat(document.getElementById("wdform_"+id+"_element"+e).getAttribute("long"+q)),w_lat=parseFloat(document.getElementById("wdform_"+id+"_element"+e).getAttribute("lat"+q)),w_info=parseFloat(document.getElementById("wdform_"+id+"_element"+e).getAttribute("info"+q)),add_marker_on_map("wdform_"+id,q,w_long,w_lat,w_info,e,!1))}),jQuery("#form"+e+" div[type='type_mark_map']").each(function(){id=jQuery(this).parent().attr("wdid"),if_gmap_init("wdform_"+id,e),q=0,jQuery("#wdform_"+id+"_element"+e)[0].getAttribute("long"+q)&&(w_long=parseFloat(document.getElementById("wdform_"+id+"_element"+e).getAttribute("long"+q)),w_lat=parseFloat(document.getElementById("wdform_"+id+"_element"+e).getAttribute("lat"+q)),w_info=parseFloat(document.getElementById("wdform_"+id+"_element"+e).getAttribute("info"+q)),add_marker_on_map("wdform_"+id,q,w_long,w_lat,w_info,e,!0))}),jQuery(".wdform-element-section").each(function(){if("type_stripe"==jQuery(this).parent().attr("type")){jQuery(this).parent().parent().find(".stripe_more_info .wdform-label-section").removeClass("wd-hidden");return!0}jQuery(this).parent()[0].style.width||0==parseInt(jQuery(this).width())||0==jQuery(this).parent().find(jQuery(".wdform-label-section")).length||"table-cell"==jQuery(this).css("display")&&("type_captcha"!=jQuery(this).parent().attr("type")?jQuery(this).parent().css("width",parseInt(jQuery(this).width())+parseInt(jQuery(this).parent().find(jQuery(".wdform-label-section"))[0].style.width)+15):jQuery(this).parent().css("width",2*parseInt(jQuery(this).parent().find(jQuery(".captcha_input"))[0].style.width)+50+parseInt(jQuery(this).parent().find(jQuery(".wdform-label-section"))[0].style.width)+15))})}function display_none_form_views_all(e){jQuery("#form"+e+" .wdform-page-and-images").css("display","none")}function generate_page_bar(t,r,e){if("steps"==document.getElementById("fm-pages"+r).getAttribute("type")?make_page_steps_front(t,r,e):"percentage"==document.getElementById("fm-pages"+r).getAttribute("type")?make_page_percentage_front(t,r,e):make_page_none_front(r),"true"==document.getElementById("fm-pages"+r).getAttribute("show_numbers")){if(td=document.getElementById(r+"page_numbers"+t),td){destroyChildren(td);var i=0,n=0;jQuery("#form"+r+" .wdform-page-and-images").each(function(){var e=jQuery(this).find(".wdform_page").attr("id");j=e.split("form_view")[1],document.getElementById(r+"form_view"+j)&&(i++,j==t&&(n=i))});var a=document.createElement("span");a.setAttribute("class","page_numbers"),a.innerHTML=n+"/"+i,td.appendChild(a)}}else td=document.getElementById(r+"page_numbers"+t),td&&destroyChildren(document.getElementById(r+"page_numbers"+t))}function make_page_steps_front(t,r,i){destroyChildren(document.getElementById("fm-pages"+r)),show_title="true"==document.getElementById("fm-pages"+r).getAttribute("show_title"),next_checkable="true"==document.getElementById(r+"form_view"+t).getAttribute("next_checkable"),previous_checkable="true"==document.getElementById(r+"form_view"+t).getAttribute("previous_checkable"),k=0,jQuery("#form"+r+" .wdform-page-and-images").each(function(){var e=jQuery(this).find(".wdform_page").attr("id");j=e.split("form_view")[1],document.getElementById(r+"form_view"+j)&&(document.getElementById(r+"form_view"+j).getAttribute("page_title")?w_pages=document.getElementById(r+"form_view"+j).getAttribute("page_title"):w_pages="",k++,page_number=document.createElement("span"),page_number.setAttribute("id","page_"+j),j<t&&(previous_checkable?page_number.setAttribute("onClick","if(fm_check("+t+", "+r+', false)) generate_page_nav("'+j+'", "'+r+'", "'+i+'")'):page_number.setAttribute("onClick",'generate_page_nav("'+j+'", "'+r+'", "'+i+'")')),j>t&&(next_checkable?page_number.setAttribute("onClick","if(fm_check("+t+", "+r+', false)) generate_page_nav("'+j+'", "'+r+'", "'+i+'")'):page_number.setAttribute("onClick",'generate_page_nav("'+j+'", "'+r+'", "'+i+'")')),j==t?page_number.setAttribute("class","page_active"):page_number.setAttribute("class","page_deactive"),show_title?page_number.innerHTML=w_pages:page_number.innerHTML=k,document.getElementById("fm-pages"+r).appendChild(page_number))})}function make_page_percentage_front(t,r,e){destroyChildren(document.getElementById("fm-pages"+r)),show_title="true"==document.getElementById("fm-pages"+r).getAttribute("show_title");var i=document.createElement("div");i.setAttribute("class","page_percentage_deactive");var n=document.createElement("div");n.setAttribute("id","div_percentage"),n.setAttribute("class","page_percentage_active"),n.setAttribute("align","right");var a=document.createElement("div");a.setAttribute("class","wdform_percentage_arrow");var o=document.createElement("b");o.setAttribute("class","wdform_percentage_text"),n.appendChild(o),k=0,cur_page_title="",jQuery(".form"+r+" .wdform-page-and-images").each(function(){var e=jQuery(this).find(".wdform_page").attr("id");j=e.split("form_view")[1],document.getElementById(r+"form_view"+j)&&(document.getElementById(r+"form_view"+j).getAttribute("page_title")?w_pages=document.getElementById(r+"form_view"+j).getAttribute("page_title"):w_pages="",k++,j==t&&(show_title&&(cur_page_title=document.createElement("div"),cur_page_title.innerHTML=w_pages,cur_page_title.innerHTML=w_pages,cur_page_title.setAttribute("class","wdform_percentage_title")),page_number=k))}),o.innerHTML=Math.round((page_number-1)/(k-1)*100)+"%",n.style.width=(page_number-1)/(k-1)*100+"%",1==page_number&&(a.style.display="none"),i.appendChild(n),i.appendChild(a),cur_page_title&&i.appendChild(cur_page_title),document.getElementById("fm-pages"+r).appendChild(i)}function make_page_none_front(e){destroyChildren(document.getElementById("fm-pages"+e))}function make_pagebreak_button(e,t,r,i,n,a,o,d){switch(r){case"text":return(l=document.createElement("div")).setAttribute("id","page_"+e+"_"+a+"_"+o),l.setAttribute("class",i),"true"==n?l.setAttribute("onClick","if(fm_check("+a+", "+o+", false)) page_"+e+"("+a+","+o+","+d+")"):l.setAttribute("onClick","page_"+e+"("+a+","+o+","+d+")"),l.innerHTML=t,l;case"img":var l;return(l=document.createElement("img")).setAttribute("id","page_"+e+"_"+a),l.setAttribute("class",i),"true"==n?l.setAttribute("onClick","if(fm_check("+a+", "+o+", false)) page_"+e+"("+a+","+o+","+d+")"):l.setAttribute("onClick","page_"+e+"("+a+","+o+","+d+")"),0==t.indexOf("http")?l.src=t:l.src=fm_objectL10n.plugin_url+"/"+t,l}}function form_maker_findPos(e){var t=0;if(e.offsetParent){for(;t+=e.offsetTop,e=e.offsetParent;);return[t]}}function page_previous(e,t,r){form_view_elemet=document.getElementById(t+"form_view"+e),form_view_elemet.parentNode.previousSibling&&form_view_elemet.parentNode.previousSibling.previousSibling&&("DIV"==form_view_elemet.parentNode.previousSibling.tagName?table=form_view_elemet.parentNode.previousSibling:table=form_view_elemet.parentNode.previousSibling.previousSibling),table.firstChild.tagName||table.removeChild(table.firstChild),generate_page_nav(table.firstChild.id.replace(t+"form_view",""),t,r),form=jQuery("#form"+t),form.parent().hasClass("fm-scrollbox-form")||(jQuery("html").animate({scrollTop:form.offset().top-150},500),document.scrollingElement.scrollTop=form.offset().top-150)}function page_next(e,t,r){form_view_elemet=document.getElementById(t+"form_view"+e),form_view_elemet.parentNode.nextSibling&&("DIV"==form_view_elemet.parentNode.nextSibling.tagName?table=form_view_elemet.parentNode.nextSibling:table=form_view_elemet.parentNode.nextSibling.nextSibling),table.firstChild.tagName||table.removeChild(table.firstChild),generate_page_nav(table.firstChild.id.replace(t+"form_view",""),t,r),form=jQuery("#form"+t),form.parent().hasClass("fm-scrollbox-form")||(jQuery("html").animate({scrollTop:form.offset().top-150},500),document.scrollingElement.scrollTop=form.offset().top-150)}function fm_go_to_page(e,t,r){form_view_elemet=document.getElementById(t+"form_view"+e),table=form_view_elemet.parentNode,table.firstChild.tagName||table.removeChild(table.firstChild),generate_page_nav(table.firstChild.id.replace(t+"form_view",""),t,r),form=jQuery("#form"+t),form.parent().hasClass("fm-scrollbox-form")||(jQuery("html").animate({scrollTop:form.offset().top-150},500),document.scrollingElement.scrollTop=form.offset().top-150)}function getfileextension(e,t){if(void 0===e||0==e.length)return!0;var r=e.lastIndexOf("."),i=e.substr(r+1,e.length);t=t.split(",");for(var n=0;n<t.length;n++)if(t[n]=t[n].replace(/\./g,""),t[n]=t[n].replace(/ /g,""),i.toLowerCase()==t[n].toLowerCase())return!0;return!1}function reselect(e,t){t=void 0!==t?t:"",jQuery(e).wrap('<div class="sel-wrap '+t+'"/>');var r="",i=!1;jQuery(e).children("option").each(function(){jQuery(this).is(":selected")&&(i=jQuery(this).index()),r=r+'<div class="sel-option" value="'+jQuery(this).val()+'">'+jQuery(this).html()+"</div>"}),w=jQuery(e)[0].style.width,"100%"==w?w="100%":w=jQuery(e).width()+32+"px";var n='<div class="sel-imul" style="width:'+w+'"> <div class="sel-selected"> <div class="selected-text">'+jQuery(e).children("option").eq(i).html()+'</div> <div class="sel-arraw"></div> </div> <div class="sel-options">'+r+"</div> </div>";jQuery(e).addClass("no-width"),jQuery(e).before(n)}jQuery(window).on("load",function(){0<jQuery(".g-recaptcha").length&&1!=jQuery(".g-recaptcha").data("render")&&fmRecaptchaInit(0),validate_received_data_from_url(),jQuery(".submissions").length&&jQuery(".submissions td").each(function(){"0"==jQuery(this).data("status")&&jQuery(this).parent().hide()})}),jQuery(document).on("change",'.wdform-element-section input[type="checkbox"],.wdform-element-section input[type="radio"], .wdform-quantity',function(){var e=jQuery(this).closest(".wdform-field").attr("data-limit"),t=jQuery(this).closest(".wdform-field").attr("data-limit-text"),r=jQuery(this).closest(".wdform-element-section").find("input[type='checkbox']:checked").length,i=jQuery(this).closest(".wdform-element-section").find(".other_input");e<r?(this.checked=!1,1==this.getAttribute("other")&&(r.checked||i&&(i.prev("br").remove(),i.remove())),jQuery(this).closest(".wdform-field").find(".wdform-label").addClass("error_label"),0==jQuery(".fm-error").length&&jQuery(this).closest(".wdform_row").append("<div class='fm-error'>"+t+"</div>")):(jQuery(this).closest(".wdform-field").find(".wdform-label").removeClass("error_label"),jQuery(".fm-error").remove())}),jQuery(document).on("change",".wdform-element-section select",function(){var e=jQuery(this).children("option:selected").text();jQuery(this).parent(".sel-wrap ").children(".sel-imul").children(".sel-selected").children(".selected-text").html(e),jQuery(this).parent(".sel-wrap ").children(".sel-imul").children(".sel-options").children(".sel-option").removeClass("sel-ed"),jQuery(this).addClass("sel-ed"),jQuery(this).parent(".sel-wrap ").children(".sel-imul").children(".sel-options").each(function(){jQuery(this).html()==e&&jQuery(this).addClass("sel-ed")})}),jQuery(document).on("change",'div[type="type_date_fields"]',function(){2<jQuery(this).find("select.sel-ed").length&&(jQuery(this).next(".fm-not-valid-date, .fm-not-filled").remove(),jQuery(this).find(".wdform-label").removeClass("error_label"))}),jQuery(document).on("click",".sel-imul",function(){jQuery(".sel-imul").removeClass("act"),jQuery(this).addClass("act"),jQuery(this).children(".sel-options").is(":visible")?jQuery(".sel-options").hide():(jQuery(".sel-options").hide(),jQuery(this).children(".sel-options").show(),jQuery(this).children(".sel-options").css("width",jQuery(this).width()))}),jQuery(document).on("click",".sel-option",function(){var e=jQuery(this).html();jQuery(this).parent(".sel-options").parent(".sel-imul").children(".sel-selected").children(".selected-text").html(e),jQuery(this).parent(".sel-options").children(".sel-option").removeClass("sel-ed"),jQuery(this).addClass("sel-ed");var t=jQuery(this).attr("value");t=void 0!==t?t:e,jQuery(this).parent(".sel-options").parent(".sel-imul").parent(".sel-wrap").children("select").children("option").prop("selected",!1).each(function(){jQuery(this).html()==e&&jQuery(this).attr("selected","select")}),jQuery(this).parent(".sel-options").parent(".sel-imul").parent(".sel-wrap").children("select").change()});var selenter=!1;function remove_whitespace(e){var t;for(t=0;t<e.childNodes.length;t++)e.childNodes[t]&&"3"==e.childNodes[t].nodeType&&!/\S/.test(e.childNodes[t].nodeValue)?(e.removeChild(e.childNodes[t]),t--):e.childNodes[t].childNodes.length&&remove_whitespace(e.childNodes[t])}function change_value_range(e,t,r,i,n){r?jQuery("#"+e).datepicker("option",t,r):"today"==i?jQuery("#"+e).datepicker("option",t,new Date):(-1==i.indexOf("d")&&-1==i.indexOf("m")&&-1==i.indexOf("y")&&-1==i.indexOf("w")&&""!=i&&(i=jQuery.datepicker.formatDate(n,new Date(i))),jQuery("#"+e).datepicker("option",t,i))}function wd_check_confirmation_email(e,t,r,i){var n=jQuery("#wdform_"+e+"_element"+t),a=jQuery("#wdform_"+e+"_1_element"+t);0==window["check_before_submit"+t][e+"_"+t]||jQuery(n).val()!=jQuery(a).val()?(jQuery("#confirm_"+e+"_"+t).remove(),jQuery("#form"+t+" div[wdid='"+e+"'] .wdform-label-section:eq( 1 ) .error_label_confirm").removeClass("error_label_confirm"),jQuery(n).val()!=jQuery(a).val()&&(jQuery(a).parent().parent().parent().append("<div id='confirm_"+e+"_"+t+"' class='fm-not-filled'>"+r+"</div>"),jQuery("#form"+t+" div[wdid='"+e+"'] .wdform-label-section:eq( 1 ) .wdform-label").addClass("error_label_confirm")),window["check_before_submit"+t][e+"_"+t]=!(e+"_"+t in window["check_before_submit"+t])||window["check_before_submit"+t][e+"_"+t]):(jQuery("#confirm_"+e+"_"+t).remove(),jQuery("#form"+t+" div[wdid='"+e+"'] .wdform-label-section:eq( 1 ) .error_label_confirm").removeClass("error_label_confirm"),1==window["check_before_submit"+t][e+"_"+t]&&delete window["check_before_submit"+t][e+"_"+t])}function wd_check_email(e,t,r){var i=jQuery("#wdform_"+e+"_element"+t),n=jQuery("#wdform_"+e+"_1_element"+t);if(""==jQuery(i).val()||/^[\u0400-\u04FFa-zA-Z0-9'.+_-]+@[\u0400-\u04FFa-zA-Z0-9.-]+\.[\u0400-\u04FFa-zA-Z]{2,61}$/.test(jQuery.trim(jQuery(i).val()))||jQuery(i).attr("title")==jQuery(i).val())jQuery("#check_email_"+e+"_"+t).remove(),jQuery("#form"+t+" div[wdid='"+e+"'] .wdform-label-section:first .error_label_check_mail").removeClass("error_label_check_mail"),window["check_before_submit"+t][e+"_"+t]=!0,void 0===n.val()&&delete window["check_before_submit"+t][e+"_"+t];else{jQuery("#check_email_"+e+"_"+t).remove();var a=jQuery("#form"+t+" div[wdid='"+e+"'] .wdform-label-section:first"),o=0;a.hasClass("wd-width-30")&&!a.hasClass("wd-hidden")&&(o=a.width()),jQuery(i).parent().parent().parent().append("<div id='check_email_"+e+"_"+t+"' class='fm-not-filled' style='margin-left: "+o+"px'>"+r+"</div>"),jQuery("#form"+t+" div[wdid='"+e+"'] .wdform-label-section:first .wdform-label").addClass("error_label_check_mail"),i.val()==n.val()&&(jQuery("#confirm_"+e+"_"+t).remove(),jQuery("#form"+t+" div[wdid='"+e+"'] .wdform-label-section:eq( 1 ) .error_label_confirm").removeClass("error_label_confirm")),delete window["check_before_submit"+t][e+"_"+t],window["check_before_submit"+t][e+"_"+t]=!1}}function wd_check_confirmation_pass(e,t,r){var i,n=jQuery("#wdform_"+e+"_element"+t),a=jQuery("#wdform_"+e+"_1_element"+t);i=n.val()!==a.val();var o=jQuery("#form"+t+" div[wdid='"+e+"'] .wdform-label-section:first"),d=0;o.hasClass("wd-width-30")&&!o.hasClass("wd-hidden")&&(d=o.width()),i?(jQuery("#confirm_"+e+"_"+t).remove(),jQuery(a).parent().parent().parent().append("<div id='confirm_"+e+"_"+t+"' class='fm-not-filled' style='margin-left: "+d+"px'>"+r+"</div>"),jQuery("#form"+t+" div[wdid='"+e+"'] .wdform-label-section:eq( 1 ) .wdform-label").addClass("error_label_check_pass"),window["check_before_submit"+t][e+"_"+t]=!1):(jQuery("#confirm_"+e+"_"+t).remove(),jQuery("#form"+t+" div[wdid='"+e+"'] .wdform-label-section:eq( 1 ) .error_label_check_pass").removeClass("error_label_check_pass"),delete window["check_before_submit"+t][e+"_"+t])}function minimize_form(e){jQuery("#fm-scrollbox"+e).removeClass("fm-animated fadeInUp").addClass("fm-animated fadeOutDown fm-minimized"),jQuery("#fm-minimize-text"+e).removeClass("fm-animated fadeOutDown").addClass("fm-show fm-animated fadeInUp")}function fm_show_scrollbox(e){jQuery("#fm-minimize-text"+e).removeClass("fm-animated fadeInUp").addClass("fm-animated fadeOutDown"),jQuery("#fm-scrollbox"+e).removeClass("fm-animated fadeOutDown fm-minimized").addClass("fm-show fm-animated fadeInUp")}function fm_hide_form(e,t,r){var i=new Date;i.setDate(i.getDate()+t),0<t&&localStorage.setItem("hide-"+e,i.getTime()),"function"==typeof r&&r()}function wd_check_regExp(o,d){var l=jQuery("#form"+o),s=!1,e=d||window["check_regExp_all"+o];return jQuery.each(e,function(e,t){var r="#wdform_"+e+"_element"+o,i="",n=unescape(t[0]),a=l.find(jQuery("div[wdid='"+e+"']"));i=t[1].length<=0?new RegExp(n):new RegExp(n,t[1]),0!=l.find(jQuery("div[wdid='"+e+"']")).length&&"none"!=l.find(jQuery("div[wdid='"+e+"']")).css("display")&&(jQuery("#form"+o+" #wd_exp_"+e).remove(),""==jQuery(r).val()&&0==a.find(".wdform-required").length?(s=!0,l.find(jQuery("div[wdid='"+e+"'] .wdform-element-section")).parent().parent().append("<div id='wd_exp_"+e+"' class='fm-not-filled'>"+t[2]+"</div>"),jQuery("#form"+o+" div[wdid='"+e+"'] .wdform-label-section:first .wdform-label").addClass("error_label_exp"),scroll_on_element(o)):jQuery(r).val()!=jQuery(r).attr("title")&&1!=i.test(jQuery(r).val())&&(l.find(jQuery("div[wdid='"+e+"'] .wdform-element-section")).parent().parent().append("<div id='wd_exp_"+e+"' class='fm-not-filled'>"+t[2]+"</div>"),jQuery("#form"+o+" div[wdid='"+e+"'] .wdform-label-section:first .wdform-label").addClass("error_label_exp"),s=!0,d||scroll_on_element(o)))}),!1===s}function scroll_on_element(e){if(0==jQuery("#form"+e+" .fm-not-filled").length)return!0;var t=!0;0==jQuery("#fm_shake"+e).val()&&(t=!1);var r=jQuery("#form"+e+" .fm-not-filled").closest(".wdform_row"),i=r.closest(".wdform_page");if("none"==i.parent().css("display")){var n=jQuery("#form"+e+" .wdform-page-and-images").length,a=jQuery("#form"+e+" .wdform_page").last().attr("id");a=a.split("form_view");var o=i.attr("id");fm_go_to_page(o=o.split("form_view")[1],e,n,a[1])}var d=jQuery(document).scrollTop(),l=document.body.clientHeight,s=jQuery("#form"+e+" .fm-not-filled").closest("div[wdid]").height(),u=jQuery("#form"+e+" .fm-not-filled").offset().top,c=function(){document.body.clientHeight!==l&&(l=document.body.clientHeight,s=jQuery("#form"+e+" .fm-not-filled").closest("div[wdid]").height(),u=jQuery("#form"+e+" .fm-not-filled").offset().top,jQuery("html").stop(),_())};function m(e){e&&(old_bg=jQuery(r).css("background-color"),jQuery(r).effect("shake",{},500).css("background-color","#FF8F8B").animate({backgroundColor:old_bg},{duration:500,queue:!1}))}function _(){jQuery("html").animate({scrollTop:u-(s+40)},500,function(){document.scrollingElement.scrollTop=u-(s+40),jQuery(window).off("scroll",c),m(t)})}jQuery(window).on("scroll",c),u<d?_():m(t)}function wd_file_upload_check(i,e){var n=jQuery("#form"+i),a=!1,t=e||window["file_upload_check"+i];return jQuery.each(t,function(e,t){var r="#wdform_"+e+"_element"+i;0!=n.find(jQuery("div[wdid='"+e+"']")).length&&"none"!=n.find(jQuery("div[wdid='"+e+"']")).css("display")&&(ext_available=getfileextension(jQuery(r).val(),t),ext_available?(jQuery("#form"+i+" #wd_upload_type_"+e).remove(),jQuery("#form"+i+" div[wdid='"+e+"'] .wdform-label-section:first .error_label_upload").removeClass("error_label_upload")):(jQuery("#form"+i+" #wd_upload_type_"+e).remove(),n.find(jQuery("div[wdid='"+e+"'] .wdform-element-section")).parent().parent().append("<div id='wd_upload_type_"+e+"' class='fm-not-filled'>"+fm_objectL10n.fm_file_type_error+"</div>"),jQuery("#form"+i+" div[wdid='"+e+"'] .wdform-label-section:first .wdform-label").addClass("error_label_upload"),a=!0))}),e||!0!==a||scroll_on_element(i),!1===a}function wd_is_filled(s,u,c){null==c&&(c=!0);var m=jQuery("#form"+s),e=u?u.split():window["required_fields"+s],_={};return jQuery(e).each(function(e,i){if("none"===m.find(jQuery("div[wdid='"+i+"']")).css("display")&&(m.find(jQuery("div[wdid='"+i+"']")).find(".fm-not-filled").remove(),m.find(jQuery("div[wdid='"+i+"']")).css("background-color",""),m.find(jQuery("div[wdid='"+i+"'] label")).removeClass("error_label")),0!=m.find(jQuery("div[wdid='"+i+"']")).length&&"none"!==m.find(jQuery("div[wdid='"+i+"']")).css("display"))switch(window["labels_and_ids"+s][i]){case"type_text":case"type_textarea":case"type_paypal_price_new":case"type_spinner":case"type_number":case"type_phone_new":case"type_submitter_mail":var t="#wdform_"+i+"_element"+s,r=jQuery(t).val();r=jQuery.trim(r),(c||"none"!=m.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&""==r&&(_[i]=t),u||window["check_submit"+s]||jQuery(t).focus(function(){jQuery("#form"+s+" #wd_required_"+i).remove(),jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label")}).blur(function(){wd_is_filled(s,i)});break;case"type_own_select":case"type_country":case"type_paypal_select":t="#wdform_"+i+"_element"+s;(c||"none"!=m.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&(""==jQuery(t).val()||0<jQuery("#wdform_"+i+"_element_quantity"+s).length&&!parseInt(jQuery("#wdform_"+i+"_element_quantity"+s).val()))&&(_[i]=t),u||window["check_submit"+s]||jQuery(t).focus(function(){jQuery("#form"+s+" #wd_required_"+i).remove(),jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label")}).blur(function(){wd_is_filled(s,i)}).change(function(){jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),wd_is_filled(s,i)});break;case"type_phone":t=["#wdform_"+i+"_element_first"+s,"#wdform_"+i+"_element_last"+s];jQuery.each(t,function(e,t){(c||"none"!=m.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&""==jQuery(t).val()&&(_[i]=t),u||window["check_submit"+s]||jQuery(t).focus(function(){jQuery("#form"+s+" #wd_required_"+i).remove(),jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label")}).blur(function(){wd_is_filled(s,i)})});break;case"type_name":t=["#wdform_"+i+"_element_title"+s,"#wdform_"+i+"_element_first"+s,"#wdform_"+i+"_element_last"+s,"#wdform_"+i+"_element_middle"+s];jQuery.each(t,function(e,t){if((c||"none"!=m.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&jQuery(t).length){var r=jQuery(t).val();""==(r=jQuery.trim(r))&&void 0!==r&&(_[i]=t)}u||window["check_submit"+s]||jQuery(t).focus(function(){jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),jQuery("#form"+s+" #wd_required_"+i).remove()}).blur(function(){wd_is_filled(s,i)})});break;case"type_address":t=["#wdform_"+i+"_street1"+s,"#wdform_"+i+"_city"+s,"#wdform_"+i+"_state"+s,"#wdform_"+i+"_postal"+s,"#wdform_"+i+"_country"+s];jQuery.each(t,function(e,t){if(c||"none"!=m.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display")){var r=jQuery(t).val();void 0!==r&&(r=jQuery.trim(r)),""==r&&void 0!==jQuery(t).closest(".wd-address").css("display")&&"none"!=jQuery(t).closest(".wd-address").css("display")&&0<jQuery(t).length&&(_[i]=t)}u||window["check_submit"+s]||jQuery(t).focus(function(){jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),jQuery("#form"+s+" #wd_required_"+i).remove()}).blur(function(){wd_is_filled(s,i)})});break;case"type_checkbox":case"type_radio":case"type_scale_rating":case"type_paypal_checkbox":case"type_paypal_radio":case"type_paypal_shipping":(c||"none"!=m.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&(0==m.find(jQuery("div[wdid='"+i+"'] input:checked")).length||""==jQuery("#wdform_"+i+"_other_input"+s).val()||0<jQuery("#wdform_"+i+"_element_quantity"+s).length&&!parseInt(jQuery("#wdform_"+i+"_element_quantity"+s).val()))&&(_[i]=!0),u||window["check_submit"+s]||jQuery.each(jQuery("#form"+s+" div[wdid='"+i+"'] input"),function(e,t){jQuery(this).change(function(){0==m.find(jQuery("div[wdid='"+i+"'] input:checked")).length||""==jQuery("#wdform_"+i+"_other_input"+s).val()||0<jQuery("#wdform_"+i+"_element_quantity"+s).length&&!parseInt(jQuery("#wdform_"+i+"_element_quantity"+s).val())?wd_is_filled(s,i):(jQuery("#form"+s+" #wd_required_"+i).remove(),jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"))})});break;case"type_star_rating":t="#wdform_"+i+"_selected_star_amount"+s;(c||"none"!=m.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&""==jQuery(t).val()&&(_[i]=!0),u||window["check_submit"+s]||jQuery("#wdform_"+i+"_element"+s).click(function(){""!=jQuery(t).val()&&(jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),jQuery("#form"+s+" #wd_required_"+i).remove())});break;case"type_range":t=["#wdform_"+i+"_element"+s+"0","#wdform_"+i+"_element"+s+"1"];jQuery.each(t,function(e,t){(c||"none"!=m.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&""==jQuery(t).val()&&(_[i]=t),u||window["check_submit"+s]||jQuery(t).focus(function(){jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),jQuery("#form"+s+" #wd_required_"+i).remove()}).blur(function(){wd_is_filled(s,i)})});break;case"type_grading":if(c||"none"!=m.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display")){var n=0;jQuery.each(jQuery("#wdform_"+i+"_element"+s+" input"),function(e,t){""!=jQuery(this).val()&&n++}),0==n&&(_[i]=!0)}u||window["check_submit"+s]||jQuery.each(jQuery("#wdform_"+i+"_element"+s+" input"),function(e,t){jQuery(this).focus(function(){jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),jQuery("#form"+s+" #wd_required_"+i).remove()}).blur(function(){wd_is_filled(s,i)})});break;case"type_slider":var a="#wdform_"+i+"_element"+s,o=(t="#wdform_"+i+"_slider_value"+s,"#wdform_"+i+"_element_min"+s);(c||"none"!=m.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&jQuery(t).val()==jQuery(o).html()&&(_[i]=!0),u||window["check_submit"+s]||jQuery(a).slider({change:function(e,t){jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),jQuery("#form"+s+" #wd_required_"+i).remove(),wd_is_filled(s,i)}});break;case"type_date":case"type_date_new":t="#wdform_"+i+"_element"+s;(c||"none"!=m.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&""==jQuery(t).val()&&(_[i]=t),u||window["check_submit"+s]||jQuery(t).focus(function(){jQuery("#form"+s+" #wd_required_"+i).remove()}).change(function(){jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),wd_is_filled(s,i)});break;case"type_date_range":t=["#wdform_"+i+"_element"+s+"0","#wdform_"+i+"_element"+s+"1"];jQuery.each(t,function(e,t){(c||"none"!=m.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&""==jQuery(t).val()&&(_[i]=t),u||window["check_submit"+s]||jQuery(t).focus(function(){jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),jQuery("#form"+s+" #wd_required_"+i).remove()}).change(function(){wd_is_filled(s,i)})});break;case"type_date_fields":t=["#wdform_"+i+"_day"+s,"#wdform_"+i+"_month"+s,"#wdform_"+i+"_year"+s];jQuery.each(t,function(e,t){(c||"none"!=m.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&""==jQuery(t).val()&&(_[i]=t),u||window["check_submit"+s]||jQuery(t).focus(function(){jQuery("#form"+s+"div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),jQuery("#form"+s+"#wd_required_"+i).remove(),jQuery("#check_min_date_"+i+"_"+s).remove()}).blur(function(){wd_is_filled(s,i)}).change(function(){wd_is_filled(s,i)})});break;case"type_time":t=["#wdform_"+i+"_hh"+s,"#wdform_"+i+"_mm"+s,"#wdform_"+i+"_ss"+s];jQuery.each(t,function(e,t){(c||"none"!=m.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&""==jQuery(t).val()&&void 0!==jQuery(t).val()&&(_[i]=t),u||window["check_submit"+s]||jQuery(t).focus(function(){jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),jQuery("#form"+s+" #wd_required_"+i).remove()}).blur(function(){wd_is_filled(s,i)})});break;case"type_password":t="#wdform_"+i+"_element"+s;(c||"none"!=m.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&""==jQuery(t).val()&&(_[i]=t),u||window["check_submit"+s]||jQuery(t).focus(function(){jQuery("#form"+s+" #wd_required_"+i).remove(),jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label")}).blur(function(){wd_is_filled(s,i)});break;case"type_file_upload":t="#wdform_"+i+"_element"+s;(c||"none"!=m.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&""==jQuery(t).val()&&(_[i]=t),u||window["check_submit"+s]||jQuery(t).focus(function(){jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),jQuery("#form"+s+" #wd_required_"+i).remove()}).change(function(){jQuery("#form"+s+" #wd_required_"+i).remove(),jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),wd_is_filled(s,i)});break;case"type_matrix":if(jQuery("#form"+s+" #wd_required_"+i).remove(),jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),"radio"==jQuery("#form"+s+" div[wdid='"+i+"'] input").attr("type")||"checkbox"==jQuery("#form"+s+" div[wdid='"+i+"'] input").attr("type"))(c||"none"!=m.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&(0==m.find(jQuery("div[wdid='"+i+"'] input:checked")).length&&(_[i]=!0),"radio"==jQuery("#form"+s+" div[wdid='"+i+"'] input").attr("type")&&jQuery.each(jQuery("#form"+s+" div[wdid='"+i+"'] div[class^='wdform-matrix-row']"),function(e,t){0==jQuery(t).find('input[type="radio"]:checked').length&&(_[i]=!0)})),"checkbox"==jQuery("#form"+s+" div[wdid='"+i+"'] input").attr("type")&&(u||window["check_submit"+s]||jQuery.each(jQuery("#form"+s+" div[wdid='"+i+"'] input"),function(e,t){jQuery(this).change(function(){0==m.find(jQuery("div[wdid='"+i+"'] input:checked")).length?wd_is_filled(s,i):(jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"),jQuery("#form"+s+" #wd_required_"+i).remove())})}));else if("text"==jQuery("#form"+s+" div[wdid='"+i+"'] input").attr("type")){if(c||"none"!=m.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display")){var d=0;jQuery.each(jQuery("#form"+s+" div[wdid='"+i+"'] input"),function(e,t){""!=jQuery(this).val()&&d++}),0==d&&(_[i]=!0)}u||window["check_submit"+s]||jQuery.each(jQuery("#form"+s+" div[wdid='"+i+"'] input"),function(e,t){jQuery(this).focus(function(){jQuery("#form"+s+" #wd_required_"+i).remove(),jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label")}).blur(function(){wd_is_filled(s,i)})})}else{if(c||"none"!=m.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display")){var l=0;jQuery.each(jQuery("#form"+s+" div[wdid='"+i+"'] select"),function(e,t){""!=jQuery(this).val()&&l++}),0==l&&(_[i]=!0)}u||window["check_submit"+s]||jQuery.each(jQuery("#form"+s+" div[wdid='"+i+"'] select"),function(e,t){jQuery(this).focus(function(){""==jQuery(this).val()&&(jQuery("#form"+s+" #wd_required_"+i).remove(),jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"))}).change(function(){wd_is_filled(s,i)}).blur(function(){wd_is_filled(s,i)})})}break;case"type_send_copy":(c||"none"!=m.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&0==jQuery("div[wdid='"+i+"'] input:checked").length&&(_[i]=!0),u||window["check_submit"+s]||jQuery("#form"+s+" div[wdid='"+i+"'] input").change(function(){0==jQuery("div[wdid='"+i+"'] input:checked").length?wd_is_filled(s,i):(jQuery("#form"+s+" #wd_required_"+i).remove(),jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label"))});break;case"type_captcha":case"type_arithmetic_captcha":t="";t="type_captcha"==window["labels_and_ids"+s][i]?"#wd_captcha_input"+s:"#wd_arithmetic_captcha_input"+s,(c||"none"!=m.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&""==jQuery(t).val()&&(jQuery(".message_captcha").html(""),_[i]=t),u||window["check_submit"+s]||jQuery(t).focus(function(){jQuery("#form"+s+" #wd_required_"+i).remove(),jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .error_label").removeClass("error_label")}).blur(function(){wd_is_filled(s,i)});break;case"type_signature":jQuery("#form"+s+" #wd_required_"+i).remove(),jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .wdform-label").removeClass("error_label");t="#signature-file-wdform_"+i+"_element"+s;(c||"none"!=m.find(jQuery("div[wdid='"+i+"']")).closest(".wdform-page-and-images").css("display"))&&""==jQuery(t).val()&&(_[i]=t),u||window["check_submit"+s]||jQuery(t).focus(function(){jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .wdform-label").removeClass("error_label"),jQuery("#form"+s+" #wd_required_"+i).remove()}).change(function(){jQuery("#form"+s+" #wd_required_"+i).remove(),jQuery("#form"+s+" div[wdid='"+i+"'] .wdform-label-section:first .wdform-label").removeClass("error_label"),wd_is_filled(s,i)})}}),0===Object.keys(_).length&&0===Object.keys(window["check_before_submit"+s]).length||(0!==Object.keys(_).length&&jQuery.each(_,function(e,t){var r=jQuery("#form"+s+" div[wdid='"+e+"'] .wdform-label-section:first"),i=0;r.hasClass("wd-width-30")&&!r.hasClass("wd-hidden")&&(i=r.width()),jQuery("#form"+s+" #wd_required_"+e).remove(),jQuery("#form"+s+" div[wdid='"+e+"'] .wdform-label-section:first .wdform-label").addClass("error_label"),"type_password"===window["labels_and_ids"+s][e]||"type_submitter_mail"===window["labels_and_ids"+s][e]?jQuery("#form"+s+" div[wdid='"+e+"'] .wdform-element-section:first").parent().after("<div id='wd_required_"+e+"' class='fm-not-filled fm-password-not-filled' style='margin-left: "+i+"px'>"+fm_objectL10n.fm_field_is_required+"</div>"):jQuery("#form"+s+" div[wdid='"+e+"'] .wdform-element-section:first").parent().parent().append("<div id='wd_required_"+e+"' class='fm-not-filled' style='margin-left: "+i+"px'>"+fm_objectL10n.fm_field_is_required+"</div>")}),u||scroll_on_element(s),!(window["check_submit"+s]=1))}function wd_check_price_min_max(a,o){var d=jQuery("#form"+a),e=o||window["check_paypal_price_min_max"+a],l=!1;return jQuery.each(e,function(e,t){var r="#wdform_"+e+"_element"+a,i=t[3]?t[3]:0,n=t[4]?t[4]:-1;!t[2]&&jQuery(r).val()==t[1]||(-1!=n&&parseFloat(jQuery(r).val())>n||parseFloat(jQuery(r).val())<i)&&(jQuery("#form"+a+" #wd_price_"+e).remove(),d.find(jQuery("div[wdid='"+e+"'] .wdform-element-section")).parent().parent().append("<div id='wd_price_"+e+"' class='fm-not-filled'>"+fm_objectL10n.fm_min_max_check_1+t[0]+fm_objectL10n.fm_min_max_check_2+(t[3]?t[3]:0)+"-"+(t[4]?t[4]:"any")+"</div>"),jQuery("#form"+a+" div[wdid='"+e+"'] .wdform-label-section:first .wdform-label").addClass("error_label_price"),l=!0,o||scroll_on_element(a))}),!1===l}function wd_check_min_date_dob(u){var c=!0;return jQuery("#form"+u+" div[type='type_date_fields']").each(function(){var e=parseInt(jQuery(this).data("min-day"));if(!e)return!0;var t=jQuery(this).parent(),r=t.attr("wdid"),i=parseInt(jQuery("#wdform_"+r+"_day"+u).val()),n=parseInt(jQuery("#wdform_"+r+"_month"+u).val()),a=parseInt(jQuery("#wdform_"+r+"_year"+u).val());if(!(i||n||a))return!0;var o=parseInt(jQuery(this).data("min-month")),d=parseInt(jQuery(this).data("min-year")),l=new Date(a+"-"+n+"-"+i),s=new Date(d+"-"+o+"-"+e);(isNaN(l)||isNaN(a)||l-s<0)&&(c=!1,jQuery("#check_min_date_"+r+"_"+u).remove(),t.append("<div id='check_min_date_"+r+"_"+u+"' class='fm-not-valid-date'>"+jQuery(this).attr("data-min-date-alert")+"</div>"),t.find(".wdform-label").addClass("error_label"),scroll_on_element(u))}),c}function wd_spinner_check(i,n){var a=jQuery("#form"+i),o=!1,e=n||window["spinner_check"+i];return jQuery.each(e,function(e,t){var r="#wdform_"+e+"_element"+i;0!=a.find(jQuery("div[wdid='"+e+"']")).length&&"none"!=a.find(jQuery("div[wdid='"+e+"']")).css("display")&&(parseInt(jQuery(r).val())<parseInt(t[0])||parseInt(jQuery(r).val())>parseInt(t[1]))&&(jQuery("#form"+i+" #wd_price_"+e).remove(),a.find(jQuery("div[wdid='"+e+"'] .wdform-element-section")).parent().parent().append("<div id='wd_price_"+e+"' class='fm-not-filled'>"+fm_objectL10n.fm_spinner_check+(t[0]?t[0]:0)+"-"+(t[1]?t[1]:"any")+"</div>"),jQuery("#form"+i+" div[wdid='"+e+"'] .wdform-label-section:first .wdform-label").addClass("error_label_price"),o=!0,n||scroll_on_element(i))}),!1===o}function fmscrollHandler(e){var t=100*jQuery(window).scrollTop()/(jQuery(document).height()-jQuery(window).height());!jQuery("#fm-scrollbox"+e).hasClass("fm-minimized")&&t>=window["scrollbox_trigger_point"+e]?setTimeout(function(){jQuery("#fm-scrollbox"+e).removeClass("fm-animated fadeOutDown").addClass("fm-animated fadeInUp"),jQuery("#fm-scrollbox"+e).css("visibility",""),jQuery("#fm-scrollbox"+e+" .fm-header-img").addClass("fm-animated "+window["header_image_animation"+e])},1e3*window["scrollbox_loading_delay"+e]):"1"==window["scrollbox_auto_hide"+e]&&(jQuery("#fm-scrollbox"+e+" .fm-header-img").removeClass("fm-animated "+window["header_image_animation"+e]),jQuery("#fm-scrollbox"+e).removeClass("fm-animated fadeInUp").addClass("fm-animated fadeOutDown"))}function fm_submit_form(e){if("function"==typeof window["before_submit"+e]&&window["before_submit"+e]())return!1;if(!fm_check(0,e))return!1;(jQuery("#form"+e+" button").each(function(){jQuery(this).attr("disabled","disabled")}),jQuery('<input type="hidden" name="save_or_submit'+e+'" value ="submit" />').appendTo("#form"+e),window["onsubmit_js"+e](),1==window["checkStripe"+e])?"none"!=jQuery("form[id='form"+e+"']").find(".StripeElement").first().parents(".wdform_row").css("display")?wdfm_call_stripe(!0):0<jQuery("#form"+e).find(".g-recaptcha[data-size=invisible]").length?grecaptcha.execute():fm_submit(e):0<jQuery("#form"+e).find(".g-recaptcha[data-size=invisible]").length?grecaptcha.execute():fm_submit(e)}function getHostName(e){var t=e.match(/:\/\/(www[0-9]?\.)?(.[^/:]+)/i);return null!=t&&2<t.length&&"string"==typeof t[2]&&0<t[2].length?t[2]:null}function isJson(e){try{JSON.parse(e)}catch(e){return!1}return!0}function fm_submit(u){if(fm_set_input_value("fm_empty_field_validation"+u,jQuery("#fm_empty_field_validation"+u).attr("data-value")),"0"!=jQuery("#form"+u+" .button-submit:not(.save_button)").attr("data-ajax")){jQuery("#form"+u+" .fm-submit-loading").css("display","inline-block");var e=jQuery("#form"+u)[0],t=new FormData(e),r=jQuery("#fm_ajax_url"+u).data("ajax_url"),c=jQuery("#form"+u+" #fm_ajax_redirect_url"+u).data("ajax_redirect_url");jQuery.ajax({type:"POST",enctype:"multipart/form-data",url:r,data:t,contentType:!1,processData:!1,success:function(e){if(isJson(e)){var t=JSON.parse(e);if(void 0!==t.after_submit_redirect_url&&""!=jQuery.trim(t.after_submit_redirect_url))return void window.location.replace(t.after_submit_redirect_url);var r=new Date,i=window.location.href,n=r.getTime();if(void 0!==t.success&&(n=t.success),-1<i.indexOf("&succes="))i=i.split("&succes=")[0];else if(-1<i.indexOf("?succes=")){i=i.split("?succes=")[0]}i=-1<i.indexOf("?")?i+"&succes="+n:i+"?succes="+n;var a="&return="+encodeURIComponent(i);if(void 0!==t.paypal_url){var o=t.paypal_url+a;return void window.location.replace(o)}}if(0==c){jQuery("#form"+u+" .button-submit").prop("disabled",!1),jQuery("#form"+u+" .fm-submit-loading").hide();var d=jQuery(e).find("#form"+u).html();jQuery("#form"+u).html(d),"function"==typeof window["fm_save_progress_"+u]&&window["fm_save_progress_"+u](),0<jQuery(document).find(".g-recaptcha").length&&fmRecaptchaInit(1);var l="fm_script_ready"+u;if(void 0!==window[l]&&window[l](),0<jQuery(d).find(".fm-not-filled.message_captcha").length){var s=jQuery(d).find(".fm-not-filled.message_captcha").text();jQuery("#form"+u+" .fm-message").remove(),jQuery("#form"+u).prepend('<div class="fm-message fm-notice-error">'+s+"</div>")}else fm_reset_form(u);window["check_submit"+u]=0}else window.location.replace(c)},complete:function(){0==jQuery("#form"+u+" .fm-message").length?(jQuery("#closing-form"+u).remove(),jQuery("#fm-popover-background"+u).css("display","none")):jQuery("#fm-popover-container"+u).addClass("fm-submit-message"),"function"!=typeof window["after_submit"+u]||jQuery("#form"+u).find(".message_captcha").length||window["after_submit"+u]()}})}else jQuery("#form"+u).submit()}function fm_reset_form(form_id){"function"==typeof window["before_reset"+form_id]&&window["before_reset"+form_id]();var privacy_policy_check=jQuery("#fm_privacy_policy"+form_id);privacy_policy_check&&(privacy_policy_check.prop("checked",!1),fm_privacy_policy_check(privacy_policy_check)),jQuery.each(window["labels_and_ids"+form_id],function(index,elem){switch(elem){case"type_text":case"type_textarea":case"type_number":case"type_spinner":case"type_own_select":case"type_country":case"type_date":case"type_date_new":case"type_hidden":case"type_paypal_price_new":case"type_phone_new":case"type_time":jQuery("#wdform_"+index+"_element"+form_id).val("");break;case"type_submitter_mail":case"type_password":jQuery("#wdform_"+index+"_element"+form_id).val(""),jQuery("#wdform_"+index+"_1_element"+form_id)&&(jQuery("#wdform_"+index+"_1_element"+form_id).val(""),jQuery("#confirm_"+index+"_"+form_id)&&jQuery("#confirm_"+index+"_"+form_id).remove(),"type_submitter_mail"==elem&&jQuery("#check_email_"+index+"_"+form_id)&&jQuery("#check_email_"+index+"_"+form_id).remove());break;case"type_date_range":jQuery("#wdform_"+index+"_element"+form_id+"0").val(""),jQuery("#wdform_"+index+"_element"+form_id+"1").val("");break;case"type_send_copy":jQuery("#wdform_"+index+"_element"+form_id).prop("checked",!1);break;case"type_phone":jQuery("#wdform_"+index+"_element_first"+form_id+", #wdform_"+index+"_element_last"+form_id).val("");break;case"type_name":jQuery("#wdform_"+index+"_element_first"+form_id+", #wdform_"+index+"_element_last"+form_id+", #wdform_"+index+"_element_title"+form_id+", #wdform_"+index+"_element_middle"+form_id).val("");break;case"type_address":jQuery("#wdform_"+index+"_street1"+form_id+", #wdform_"+index+"_street2"+form_id+", #wdform_"+index+"_city"+form_id+", #wdform_"+index+"_state"+form_id+", #wdform_"+index+"_postal"+form_id+", #wdform_"+index+"_country"+form_id).val("");break;case"type_checkbox":jQuery("#form"+form_id+" div[wdid='"+index+"'] .checkbox-div input").prop("checked",!1),jQuery("#wdform_"+index+"_other_br"+form_id).remove(),jQuery("#wdform_"+index+"_other_input"+form_id).remove();break;case"type_radio":jQuery("#form"+form_id+" div[wdid='"+index+"'] .radio-div input").prop("checked",!1),jQuery("#wdform_"+index+"_other_br"+form_id).remove(),jQuery("#wdform_"+index+"_other_input"+form_id).remove();break;case"type_time":jQuery("#wdform_"+index+"_hh"+form_id+", #wdform_"+index+"_mm"+form_id+", #wdform_"+index+"_ss"+form_id+", #wdform_"+index+"_am_pm"+form_id).val("");break;case"type_date_fields":jQuery("#wdform_"+index+"_day"+form_id+", #wdform_"+index+"_month"+form_id+", #wdform_"+index+"_year"+form_id).val("");break;case"type_file_upload":jQuery("#wdform_"+index+"_element"+form_id+"_save").remove();break;case"type_paypal_price":jQuery("#wdform_"+index+"_element_dollars"+form_id+", #wdform_"+index+"_element_cents"+form_id).val("");break;case"type_paypal_select":jQuery("#wdform_"+index+"_element"+form_id+", #wdform_"+index+"_element_quantity"+form_id+", #form"+form_id+" div[wdid='"+index+"'] .paypal-property select").val("");break;case"type_paypal_radio":jQuery("#wdform_"+index+"_element_quantity"+form_id+",#form"+form_id+" div[wdid='"+index+"'] .paypal-property select").val(""),jQuery("#form"+form_id+" div[wdid='"+index+"'] .radio-div input").prop("checked",!1);break;case"type_paypal_shipping":jQuery("#form"+form_id+" div[wdid='"+index+"'] .radio-div input").prop("checked",!1);break;case"type_paypal_checkbox":jQuery("#wdform_"+index+"_element_quantity"+form_id+",#form"+form_id+" div[wdid='"+index+"'] .paypal-property select").val(""),jQuery("#form"+form_id+" div[wdid='"+index+"'] .checkbox-div input").prop("checked",!1);break;case"type_star_rating":jQuery("#wdform_"+index+"_selected_star_amount"+form_id).val(""),jQuery("#wdform_"+index+"_element"+form_id+" img").attr("src",fm_objectL10n.plugin_url+"/images/star.png");break;case"type_scale_rating":jQuery("#form"+form_id+" div[wdid='"+index+"'] .radio-div input").prop("checked",!1);break;case"type_slider":jQuery("#wdform_"+index+"_element"+form_id).slider({value:eval(0)}),jQuery("#wdform_"+index+"_element_value"+form_id).html("0");break;case"type_range":jQuery("#wdform_"+index+"_element"+form_id+"0, #wdform_"+index+"_element"+form_id+"1").val("");break;case"type_grading":jQuery("#wdform_"+index+"_element"+form_id+" input").val("");break;case"type_matrix":jQuery("#wdform_"+index+"_element"+form_id+" .radio-div input").prop("checked",!1),jQuery("#wdform_"+index+"_element"+form_id+" .checkbox-div input").prop("checked",!1),jQuery("#wdform_"+index+"_element"+form_id+" input[type='text']").val(""),jQuery("#wdform_"+index+"_element"+form_id+" select").val("");break;case"type_paypal_total":jQuery("#wdform_"+index+"div_total"+form_id).html("$0"),jQuery("#wdform_"+index+"paypal_products"+form_id).empty();break;case"type_captcha":jQuery("#wd_captcha_input"+form_id).val("");case"type_arithmetic_captcha":jQuery("#wd_arithmetic_captcha_input"+form_id).val("")}})}function fm_save_form(e){jQuery('<input type="hidden" name="save_or_submit'+e+'" value ="save" />').appendTo("#form"+e),window["onsubmit_js"+e](),jQuery("#form"+e+" button").each(function(){jQuery(this).attr("disabled","disabled")}),fm_set_input_value("fm_empty_field_validation"+e,jQuery("#fm_empty_field_validation"+e).attr("data-value")),jQuery("#form"+e).submit()}function fm_clear_form(e){1==confirm(fm_objectL10n.fm_clear_data)&&(jQuery("#form"+e+" button").each(function(){jQuery(this).attr("disabled","disabled")}),jQuery.get(fm_objectL10n.form_maker_admin_ajax+"?action=FMClearProg&addon_task=clear_data&nonce="+fm_ajax.ajaxnonce+"&form_id="+e).done(function(){window.location=jQuery("#form"+e).attr("action")}))}function fm_set_input_value(e,t){jQuery("#"+e).val(t)}function formOnload(i){var n;-1!=navigator.userAgent.toLowerCase().indexOf("msie")&&8===parseInt(navigator.userAgent.toLowerCase().split("msie")[1])&&(jQuery("#form"+i).find(jQuery("input[type='radio']")).click(function(){jQuery("input[type='radio']+label").removeClass("if-ie-div-label"),jQuery("input[type='radio']:checked+label").addClass("if-ie-div-label")}),jQuery("#form"+i).find(jQuery("input[type='radio']:checked+label")).addClass("if-ie-div-label"),jQuery("#form"+i).find(jQuery("input[type='checkbox']")).click(function(){jQuery("input[type='checkbox']+label").removeClass("if-ie-div-label"),jQuery("input[type='checkbox']:checked+label").addClass("if-ie-div-label")}),jQuery("#form"+i).find(jQuery("input[type='checkbox']:checked+label")).addClass("if-ie-div-label")),jQuery.each(window["check_regExp_all"+i],function(e,t){var r={};r[e]=t,jQuery("div[wdid='"+e+"'] input").blur(function(){wd_check_regExp(i,r)}).focus(function(){jQuery("#form"+i+" #wd_exp_"+e).remove(),jQuery("#form"+i+" div[wdid='"+e+"'] .wdform-label-section:first .error_label_exp").removeClass("error_label_exp")})}),jQuery.each(window["check_paypal_price_min_max"+i],function(e,t){var r={};r[e]=t,jQuery("div[wdid='"+e+"'] input").blur(function(){wd_check_price_min_max(i,r)}).focus(function(){jQuery("#form"+i+" #wd_price_"+e).remove(),jQuery("#form"+i+" div[wdid='"+e+"'] .wdform-label-section:first .error_label_price").removeClass("error_label_price")})}),jQuery.each(window["spinner_check"+i],function(e,t){var r={};r[e]=t,jQuery("div[wdid='"+e+"'] input").blur(function(){wd_spinner_check(i,r)}).focus(function(){jQuery("#form"+i+" #wd_price_"+e).remove(),jQuery("#form"+i+" div[wdid='"+e+"'] .wdform-label-section:first .error_label_price").removeClass("error_label_price")})}),jQuery.each(window["file_upload_check"+i],function(e,t){var r={};r[e]=t,jQuery("div[wdid='"+e+"'] input").change(function(){wd_file_upload_check(i,r)})}),jQuery("#form"+i+" input").on("keypress",function(e){if(13==(e.keyCode?e.keyCode:e.which))return!1}),jQuery("div[type='type_number'] input, div[type='type_phone'] input, div[type='type_spinner'] input, div[type='type_range'] input, .wdform-quantity, div[type='type_paypal_price_new'] input").keypress(function(e){return check_isnum(e)}),jQuery("div[type='type_grading'] input").keypress(function(e){return check_isnum_or_minus(e)}),jQuery("div[type='type_paypal_checkbox'] input[type='checkbox'], div[type='type_paypal_radio'] input[type='radio'], div[type='type_paypal_shipping'] input[type='radio']").click(function(){set_total_value(i)}),jQuery("div[type='type_paypal_select'] select, div[type='type_paypal_price'] input, div[type='type_paypal_price_new'] input").change(function(){set_total_value(i)}),jQuery(".wdform-quantity").change(function(){set_total_value(i)}),jQuery("div[type='type_address'] select").change(function(){set_total_value(i)}),jQuery("div[type='type_time'] input").blur(function(){add_0(this)}),jQuery(".wdform-element-section").each(function(){if("type_stripe"==jQuery(this).parent().parent().attr("type"))return!0;jQuery(this).parent()[0].style.width||0==parseInt(jQuery(this).width())||0==jQuery(this).parent().find(jQuery(".wdform-label-section")).length||"table-cell"==jQuery(this).css("display")&&("type_captcha"!=jQuery(this).parent().attr("type")?jQuery(this).parent().css("width",parseInt(jQuery(this).width())+parseInt(jQuery(this).parent().find(jQuery(".wdform-label-section"))[0].style.width)+15):jQuery(this).parent().css("width",2*parseInt(jQuery(this).parent().find(jQuery(".captcha_input"))[0].style.width)+50+parseInt(jQuery(this).parent().find(jQuery(".wdform-label-section"))[0].style.width)+15)),parseInt(jQuery(this)[0].style.width.replace("px",""))<parseInt(jQuery(this).css("min-width").replace("px",""))&&jQuery(this).css("min-width",parseInt(jQuery(this)[0].style.width.replace("px",""))-10)}),jQuery(".wdform-label").each(function(){parseInt(jQuery(this).height())>=2*parseInt(jQuery(this).css("line-height").replace("px",""))&&(jQuery(this).parent().css("max-width",jQuery(this).parent().width()),jQuery(this).parent().css("width",""))}),(n=jQuery).fn.shuffle=function(){var i=n(this).find(".wd-choice"),t=n.map(i,function(){var e,t=(e=i.length,Math.floor(Math.random()*e)),r=n(i[parseInt(t)]).clone(!0)[0];return i.splice(t,1),r});return n(this).find(".wd-choice").each(function(e){n(this).replaceWith(n(t[e]))}),n(t)},"function"==typeof window["onload_js"+i]&&window["onload_js"+i](),"function"==typeof window["before_load"+i]&&window["before_load"+i]()}function fm_document_ready(e){jQuery("#form"+e).hasClass("fm-form-submitted")&&!jQuery("#form"+e).find(".message_captcha").length&&"function"==typeof window["after_submit"+e]&&window["after_submit"+e]();var t=jQuery("#form"+e+" .wdform-page-and-images").length;window["form_view_count"+e]=t,1<window["form_view_count"+e]&&(firstid=jQuery("#form"+e+" .wdform_page").first().attr("id"),firstid=firstid.split("form_view"),window["first_form_view"+e]=firstid[1],generate_page_nav(window["first_form_view"+e],e,window["form_view_count"+e])),fm_initilize_form(e),window["condition_js"+e](),jQuery(document).trigger("fm_document_ready")}function fm_check(e,t,r){if(!wd_is_filled(t,void 0,r))return!1;if(1==window["checkStripe"+t]){var i=jQuery("form[id='form"+t+"']");if("none"!=i.find(".StripeElement").first().closest(".wdform-page-and-images").css("display")&&"none"!=i.find(".StripeElement").first().parents(".wdform_row").css("display")&&0==wdfm_call_stripe(!1))return!1}return!!wd_check_regExp(t)&&(!!wd_check_price_min_max(t)&&(!!wd_spinner_check(t)&&(!!wd_file_upload_check(t)&&(!!wd_check_min_date_dob(t)&&0!=window["check_js"+t](e,t)))))}function fmRecaptchaInit(e){void 0===e&&(e=0),jQuery(".g-recaptcha").each(function(){if(type=jQuery(this).attr("data-size"),jQuery(this).attr("data-render",1),"invisible"==type)r=jQuery(this).attr("data-form_id"),grecaptcha.render(jQuery(this).attr("id"),{sitekey:jQuery(this).attr("data-sitekey"),badge:jQuery(this).attr("data-badge"),callback:function(){fm_submit(r)}});else if("v3"==type){if("undefined"==jQuery(this).attr("data-sitekey")||""==jQuery(this).attr("data-sitekey"))return;var t=jQuery(this).attr("data-id"),r=jQuery(this).attr("data-form-id"),e=jQuery(this).attr("data-sitekey");grecaptcha.ready(function(){grecaptcha.execute(e).then(function(e){document.getElementById("recaptchaV3Response_"+r+t).value=e})})}else grecaptcha.render(jQuery(this).attr("id"),{sitekey:jQuery(this).attr("data-sitekey"),theme:"light"})})}function wd_change_state_input(e,t){if(document.getElementById(e+"_country"+t)&&document.getElementById(e+"_state"+t)){var r=!1,i=document.getElementById(e+"_state"+t);if("United States"==document.getElementById(e+"_country"+t).value){var n=document.createElement("select"),a=fm_objectL10n.states;for(var o in a){(d=document.createElement("option")).setAttribute("value",o),d.innerHTML=a[o],n.appendChild(d)}r=!0}else if("Canada"==document.getElementById(e+"_country"+t).value){n=document.createElement("select"),a=fm_objectL10n.provinces;for(var o in a){var d;(d=document.createElement("option")).setAttribute("value",o),d.innerHTML=a[o],n.appendChild(d)}r=!0}else if("SELECT"==document.getElementById(e+"_state"+t).tagName){n=document.createElement("input");r=!0}if(r){n.setAttribute("type","text"),n.setAttribute("id",e+"_state"+t),n.setAttribute("name","wdform_"+(parseInt(e.replace("wdform_",""))+3)+"_state"+t),n.setAttribute("class","wd-width-100");var l=i.parentNode;l.removeChild(i),l.insertBefore(n,l.firstChild)}}}function fm_privacy_policy_check(e){var t=jQuery(e),r=t.parents(".wdform_row").find(".button-submit");t.is(":checked")?r.prop("disabled",!1):r.prop("disabled",!0)}function fm_html_entities(e){return String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function validate_received_data_from_url(){new URLSearchParams(window.location.search).forEach(function(e,t){jQuery("#"+t).each(function(){jQuery(this).keyup(),jQuery(this).keydown(),jQuery(this).trigger("change")})})}jQuery(document).on("mouseenter",".sel-imul",function(){selenter=!0}),jQuery(document).on("mouseleave",".sel-imul",function(){selenter=!1}),jQuery(document).click(function(){selenter||(jQuery(".sel-options").hide(),jQuery(".sel-imul").removeClass("act"))}),function(t){"function"==typeof define&&define.amd?define(["jquery"],function(e){t(e,window,document)}):"object"==typeof module&&module.exports?module.exports=t(require("jquery"),window,document):t(jQuery,window,document)}(function(l,d,e,a){"use strict";var o="intlTelInput",r=1,i={allowDropdown:!0,autoHideDialCode:!0,autoPlaceholder:"polite",customPlaceholder:null,dropdownContainer:"",excludeCountries:[],formatOnDisplay:!0,geoIpLookup:null,initialCountry:"",nationalMode:!0,onlyCountries:[],placeholderNumberType:"MOBILE",preferredCountries:["us","gb"],separateDialCode:!1,utilsScript:""},s=38,u=40,c=13,m=27,t=43,_=65,f=90,p=32,n=9,y=["800","822","833","844","855","866","877","880","881","882","883","884","885","886","887","888","889"];function h(e,t){this.telInput=l(e),this.options=l.extend({},i,t),this.ns="."+o+r++,this.isGoodBrowser=Boolean(e.setSelectionRange),this.hadInitialPlaceholder=Boolean(l(e).attr("placeholder"))}l(d).on("load",function(){l.fn[o].windowLoaded=!0}),h.prototype={_init:function(){return this.options.nationalMode&&(this.options.autoHideDialCode=!1),this.options.separateDialCode&&(this.options.autoHideDialCode=this.options.nationalMode=!1),this.isMobile=/Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),this.isMobile&&(l("body").addClass("iti-mobile"),this.options.dropdownContainer||(this.options.dropdownContainer="body")),this.autoCountryDeferred=new l.Deferred,this.utilsScriptDeferred=new l.Deferred,this._processCountryData(),this._generateMarkup(),this._setInitialState(),this._initListeners(),this._initRequests(),[this.autoCountryDeferred,this.utilsScriptDeferred]},_processCountryData:function(){this._processAllCountries(),this._processCountryCodes(),this._processPreferredCountries()},_addCountryCode:function(e,t,r){t in this.countryCodes||(this.countryCodes[t]=[]);var i=r||0;this.countryCodes[t][i]=e},_filterCountries:function(e,t){var r;for(r=0;r<e.length;r++)e[r]=e[r].toLowerCase();for(this.countries=[],r=0;r<w.length;r++)t(l.inArray(w[r].iso2,e))&&this.countries.push(w[r])},_processAllCountries:function(){this.options.onlyCountries.length?this._filterCountries(this.options.onlyCountries,function(e){return-1<e}):this.options.excludeCountries.length?this._filterCountries(this.options.excludeCountries,function(e){return-1==e}):this.countries=w},_processCountryCodes:function(){this.countryCodes={};for(var e=0;e<this.countries.length;e++){var t=this.countries[e];if(this._addCountryCode(t.iso2,t.dialCode,t.priority),t.areaCodes)for(var r=0;r<t.areaCodes.length;r++)this._addCountryCode(t.iso2,t.dialCode+t.areaCodes[r])}},_processPreferredCountries:function(){this.preferredCountries=[];for(var e=0;e<this.options.preferredCountries.length;e++){var t=this.options.preferredCountries[e].toLowerCase(),r=this._getCountryData(t,!1,!0);r&&this.preferredCountries.push(r)}},_generateMarkup:function(){this.telInput.attr("autocomplete","off");var e="intl-tel-input";this.options.allowDropdown&&(e+=" allow-dropdown"),this.options.separateDialCode&&(e+=" separate-dial-code"),this.telInput.wrap(l("<div>",{class:e})),this.flagsContainer=l("<div>",{class:"flag-container"}).insertBefore(this.telInput);var t=l("<div>",{class:"selected-flag"});t.appendTo(this.flagsContainer),this.selectedFlagInner=l("<div>",{class:"iti-flag"}).appendTo(t),this.options.separateDialCode&&(this.selectedDialCode=l("<div>",{class:"selected-dial-code"}).appendTo(t)),this.options.allowDropdown?(t.attr("tabindex","0"),l("<div>",{class:"iti-arrow"}).appendTo(t),this.countryList=l("<ul>",{class:"country-list hide"}),this.preferredCountries.length&&(this._appendListItems(this.preferredCountries,"preferred"),l("<li>",{class:"divider"}).appendTo(this.countryList)),this._appendListItems(this.countries,""),this.countryListItems=this.countryList.children(".country"),this.options.dropdownContainer?this.dropdown=l("<div>",{class:"intl-tel-input iti-container"}).append(this.countryList):this.countryList.appendTo(this.flagsContainer)):this.countryListItems=l()},_appendListItems:function(e,t){for(var r="",i=0;i<e.length;i++){var n=e[i];r+="<li class='country "+t+"' data-dial-code='"+n.dialCode+"' data-country-code='"+n.iso2+"'>",r+="<div class='flag-box'><div class='iti-flag "+n.iso2+"'></div></div>",r+="<span class='country-name'>"+n.name+"</span>",r+="<span class='dial-code'>+"+n.dialCode+"</span>",r+="</li>"}this.countryList.append(r)},_setInitialState:function(){var e=this.telInput.val();this._getDialCode(e)&&!this._isRegionlessNanp(e)?this._updateFlagFromNumber(e):"auto"!==this.options.initialCountry&&(this.options.initialCountry?this._setFlag(this.options.initialCountry.toLowerCase()):(this.defaultCountry=this.preferredCountries.length?this.preferredCountries[0].iso2:this.countries[0].iso2,e||this._setFlag(this.defaultCountry)),e||this.options.nationalMode||this.options.autoHideDialCode||this.options.separateDialCode||this.telInput.val("+"+this.selectedCountryData.dialCode)),e&&this._updateValFromNumber(e)},_initListeners:function(){this._initKeyListeners(),this.options.autoHideDialCode&&this._initFocusListeners(),this.options.allowDropdown&&this._initDropdownListeners()},_initDropdownListeners:function(){var t=this,e=this.telInput.closest("label");e.length&&e.on("click"+this.ns,function(e){t.countryList.hasClass("hide")?t.telInput.focus():e.preventDefault()}),this.selectedFlagInner.parent().on("click"+this.ns,function(e){!t.countryList.hasClass("hide")||t.telInput.prop("disabled")||t.telInput.prop("readonly")||t._showDropdown()}),this.flagsContainer.on("keydown"+t.ns,function(e){!t.countryList.hasClass("hide")||e.which!=s&&e.which!=u&&e.which!=p&&e.which!=c||(e.preventDefault(),e.stopPropagation(),t._showDropdown()),e.which==n&&t._closeDropdown()})},_initRequests:function(){var e=this;this.options.utilsScript?l.fn[o].windowLoaded?l.fn[o].loadUtils(this.options.utilsScript,this.utilsScriptDeferred):l(d).on("load",function(){l.fn[o].loadUtils(e.options.utilsScript,e.utilsScriptDeferred)}):this.utilsScriptDeferred.resolve(),"auto"===this.options.initialCountry?this._loadAutoCountry():this.autoCountryDeferred.resolve()},_loadAutoCountry:function(){l.fn[o].autoCountry?this.handleAutoCountry():l.fn[o].startedLoadingAutoCountry||(l.fn[o].startedLoadingAutoCountry=!0,"function"==typeof this.options.geoIpLookup&&this.options.geoIpLookup(function(e){l.fn[o].autoCountry=e.toLowerCase(),setTimeout(function(){l(".intl-tel-input input").intlTelInput("handleAutoCountry")})}))},_initKeyListeners:function(){var e=this;this.telInput.on("keyup"+this.ns,function(){e._updateFlagFromNumber(e.telInput.val())&&e._triggerCountryChange()}),this.telInput.on("cut"+this.ns+" paste"+this.ns,function(){setTimeout(function(){e._updateFlagFromNumber(e.telInput.val())&&e._triggerCountryChange()})})},_cap:function(e){var t=this.telInput.attr("maxlength");return t&&e.length>t?e.substr(0,t):e},_initFocusListeners:function(){var r=this;this.telInput.on("mousedown"+this.ns,function(e){r.telInput.is(":focus")||r.telInput.val()||(e.preventDefault(),r.telInput.focus())}),this.telInput.on("focus"+this.ns,function(e){r.telInput.val()||r.telInput.prop("readonly")||!r.selectedCountryData.dialCode||(r.telInput.val("+"+r.selectedCountryData.dialCode),r.telInput.one("keypress.plus"+r.ns,function(e){e.which==t&&r.telInput.val("")}),setTimeout(function(){var e=r.telInput[0];if(r.isGoodBrowser){var t=r.telInput.val().length;e.setSelectionRange(t,t)}}))});var e=this.telInput.prop("form");e&&l(e).on("submit"+this.ns,function(){r._removeEmptyDialCode()}),this.telInput.on("blur"+this.ns,function(){r._removeEmptyDialCode()})},_removeEmptyDialCode:function(){var e=this.telInput.val();if("+"==e.charAt(0)){var t=this._getNumeric(e);t&&this.selectedCountryData.dialCode!=t||this.telInput.val("")}this.telInput.off("keypress.plus"+this.ns)},_getNumeric:function(e){return e.replace(/\D/g,"")},_showDropdown:function(){this._setDropdownPosition();var e=this.countryList.children(".active");e.length&&(this._highlightListItem(e),this._scrollTo(e)),this._bindDropdownListeners(),this.selectedFlagInner.children(".iti-arrow").addClass("up")},_setDropdownPosition:function(){var e=this;if(this.options.dropdownContainer&&this.dropdown.appendTo(this.options.dropdownContainer),this.dropdownHeight=this.countryList.removeClass("hide").outerHeight(),!this.isMobile){var t=this.telInput.offset(),r=t.top,i=l(d).scrollTop(),n=r+this.telInput.outerHeight()+this.dropdownHeight<i+l(d).height(),a=r-this.dropdownHeight>i;if(this.countryList.toggleClass("dropup",!n&&a),this.options.dropdownContainer){var o=!n&&a?0:this.telInput.innerHeight();this.dropdown.css({top:r+o,left:t.left}),l(d).on("scroll"+this.ns,function(){e._closeDropdown()})}}},_bindDropdownListeners:function(){var t=this;this.countryList.on("mouseover"+this.ns,".country",function(e){t._highlightListItem(l(this))}),this.countryList.on("click"+this.ns,".country",function(e){t._selectListItem(l(this))});var r=!0;l("html").on("click"+this.ns,function(e){r||t._closeDropdown(),r=!1});var i="",n=null;l(e).on("keydown"+this.ns,function(e){e.preventDefault(),e.which==s||e.which==u?t._handleUpDownKey(e.which):e.which==c?t._handleEnterKey():e.which==m?t._closeDropdown():(e.which>=_&&e.which<=f||e.which==p)&&(n&&clearTimeout(n),i+=String.fromCharCode(e.which),t._searchForCountry(i),n=setTimeout(function(){i=""},1e3))})},_handleUpDownKey:function(e){var t=this.countryList.children(".highlight").first(),r=e==s?t.prev():t.next();r.length&&(r.hasClass("divider")&&(r=e==s?r.prev():r.next()),this._highlightListItem(r),this._scrollTo(r))},_handleEnterKey:function(){var e=this.countryList.children(".highlight").first();e.length&&this._selectListItem(e)},_searchForCountry:function(e){for(var t=0;t<this.countries.length;t++)if(this._startsWith(this.countries[t].name,e)){var r=this.countryList.children("[data-country-code="+this.countries[t].iso2+"]").not(".preferred");this._highlightListItem(r),this._scrollTo(r,!0);break}},_startsWith:function(e,t){return e.substr(0,t.length).toUpperCase()==t},_updateValFromNumber:function(e){if(this.options.formatOnDisplay&&d.intlTelInputUtils&&this.selectedCountryData){var t=this.options.separateDialCode||!this.options.nationalMode&&"+"==e.charAt(0)?intlTelInputUtils.numberFormat.INTERNATIONAL:intlTelInputUtils.numberFormat.NATIONAL;e=intlTelInputUtils.formatNumber(e,this.selectedCountryData.iso2,t)}e=this._beforeSetNumber(e),this.telInput.val(e)},_updateFlagFromNumber:function(e){e&&this.options.nationalMode&&this.selectedCountryData&&"1"==this.selectedCountryData.dialCode&&"+"!=e.charAt(0)&&("1"!=e.charAt(0)&&(e="1"+e),e="+"+e);var t=this._getDialCode(e),r=null,i=this._getNumeric(e);if(t){var n=this.countryCodes[this._getNumeric(t)],a=this.selectedCountryData&&-1<l.inArray(this.selectedCountryData.iso2,n),o="+1"==t&&4<=i.length;if((!(this.selectedCountryData&&"1"==this.selectedCountryData.dialCode)||!this._isRegionlessNanp(i))&&(!a||o))for(var d=0;d<n.length;d++)if(n[d]){r=n[d];break}}else"+"==e.charAt(0)&&i.length?r="":e&&"+"!=e||(r=this.defaultCountry);return null!==r&&this._setFlag(r)},_isRegionlessNanp:function(e){var t=this._getNumeric(e);if("1"!=t.charAt(0))return!1;var r=t.substr(1,3);return-1<l.inArray(r,y)},_highlightListItem:function(e){this.countryListItems.removeClass("highlight"),e.addClass("highlight")},_getCountryData:function(e,t,r){for(var i=t?w:this.countries,n=0;n<i.length;n++)if(i[n].iso2==e)return i[n];if(r)return null;throw new Error("No country data for '"+e+"'")},_setFlag:function(e){var t=this.selectedCountryData&&this.selectedCountryData.iso2?this.selectedCountryData:{};this.selectedCountryData=e?this._getCountryData(e,!1,!1):{},this.selectedCountryData.iso2&&(this.defaultCountry=this.selectedCountryData.iso2),this.selectedFlagInner.attr("class","iti-flag "+e);var r=e?this.selectedCountryData.name+": +"+this.selectedCountryData.dialCode:"Unknown";if(this.selectedFlagInner.parent().attr("title",r),this.options.separateDialCode){var i=this.selectedCountryData.dialCode?"+"+this.selectedCountryData.dialCode:"",n=this.telInput.parent();t.dialCode&&n.removeClass("iti-sdc-"+(t.dialCode.length+1)),i&&n.addClass("iti-sdc-"+i.length),this.selectedDialCode.text(i)}return this._updatePlaceholder(),this.countryListItems.removeClass("active"),e&&this.countryListItems.find(".iti-flag."+e).first().closest(".country").addClass("active"),t.iso2!==e},_updatePlaceholder:function(){var e="aggressive"===this.options.autoPlaceholder||!this.hadInitialPlaceholder&&(!0===this.options.autoPlaceholder||"polite"===this.options.autoPlaceholder);if(d.intlTelInputUtils&&e&&this.selectedCountryData){var t=intlTelInputUtils.numberType[this.options.placeholderNumberType],r=this.selectedCountryData.iso2?intlTelInputUtils.getExampleNumber(this.selectedCountryData.iso2,this.options.nationalMode,t):"";r=this._beforeSetNumber(r),"function"==typeof this.options.customPlaceholder&&(r=this.options.customPlaceholder(r,this.selectedCountryData)),this.telInput.attr("placeholder",r)}},_selectListItem:function(e){var t=this._setFlag(e.attr("data-country-code"));if(this._closeDropdown(),this._updateDialCode(e.attr("data-dial-code"),!0),this.telInput.focus(),this.isGoodBrowser){var r=this.telInput.val().length;this.telInput[0].setSelectionRange(r,r)}t&&this._triggerCountryChange()},_closeDropdown:function(){this.countryList.addClass("hide"),this.selectedFlagInner.children(".iti-arrow").removeClass("up"),l(e).off(this.ns),l("html").off(this.ns),this.countryList.off(this.ns),this.options.dropdownContainer&&(this.isMobile||l(d).off("scroll"+this.ns),this.dropdown.detach())},_scrollTo:function(e,t){var r=this.countryList,i=r.height(),n=r.offset().top,a=n+i,o=e.outerHeight(),d=e.offset().top,l=d+o,s=d-n+r.scrollTop(),u=i/2-o/2;if(d<n)t&&(s-=u),r.scrollTop(s);else if(a<l){t&&(s+=u);var c=i-o;r.scrollTop(s-c)}},_updateDialCode:function(e,t){var r,i=this.telInput.val();if(e="+"+e,"+"==i.charAt(0)){var n=this._getDialCode(i);r=n?i.replace(n,e):e}else{if(this.options.nationalMode||this.options.separateDialCode)return;if(i)r=e+i;else{if(!t&&this.options.autoHideDialCode)return;r=e}}this.telInput.val(r)},_getDialCode:function(e){var t="";if("+"==e.charAt(0))for(var r="",i=0;i<e.length;i++){var n=e.charAt(i);if(l.isNumeric(n)&&(r+=n,this.countryCodes[r]&&(t=e.substr(0,i+1)),4==r.length))break}return t},_getFullNumber:function(){var e=l.trim(this.telInput.val()),t=this.selectedCountryData.dialCode,r=this._getNumeric(e),i="1"==r.charAt(0)?r:"1"+r;return(this.options.separateDialCode?"+"+t:"+"!=e.charAt(0)&&"1"!=e.charAt(0)&&t&&"1"==t.charAt(0)&&4==t.length&&t!=i.substr(0,4)?t.substr(1):"")+e},_beforeSetNumber:function(e){if(this.options.separateDialCode){var t=this._getDialCode(e);if(t){null!==this.selectedCountryData.areaCodes&&(t="+"+this.selectedCountryData.dialCode);var r=" "===e[t.length]||"-"===e[t.length]?t.length+1:t.length;e=e.substr(r)}}return this._cap(e)},_triggerCountryChange:function(){this.telInput.trigger("countrychange",this.selectedCountryData)},handleAutoCountry:function(){"auto"===this.options.initialCountry&&(this.defaultCountry=l.fn[o].autoCountry,this.telInput.val()||this.setCountry(this.defaultCountry),this.autoCountryDeferred.resolve())},handleUtils:function(){d.intlTelInputUtils&&(this.telInput.val()&&this._updateValFromNumber(this.telInput.val()),this._updatePlaceholder()),this.utilsScriptDeferred.resolve()},destroy:function(){if(this.allowDropdown&&(this._closeDropdown(),this.selectedFlagInner.parent().off(this.ns),this.telInput.closest("label").off(this.ns)),this.options.autoHideDialCode){var e=this.telInput.prop("form");e&&l(e).off(this.ns)}this.telInput.off(this.ns),this.telInput.parent().before(this.telInput).remove()},getExtension:function(){return d.intlTelInputUtils?intlTelInputUtils.getExtension(this._getFullNumber(),this.selectedCountryData.iso2):""},getNumber:function(e){return d.intlTelInputUtils?intlTelInputUtils.formatNumber(this._getFullNumber(),this.selectedCountryData.iso2,e):""},getNumberType:function(){return d.intlTelInputUtils?intlTelInputUtils.getNumberType(this._getFullNumber(),this.selectedCountryData.iso2):-99},getSelectedCountryData:function(){return this.selectedCountryData||{}},getValidationError:function(){return d.intlTelInputUtils?intlTelInputUtils.getValidationError(this._getFullNumber(),this.selectedCountryData.iso2):-99},isValidNumber:function(){var e=l.trim(this._getFullNumber()),t=this.options.nationalMode?this.selectedCountryData.iso2:"";return d.intlTelInputUtils?intlTelInputUtils.isValidNumber(e,t):null},setCountry:function(e){e=e.toLowerCase(),this.selectedFlagInner.hasClass(e)||(this._setFlag(e),this._updateDialCode(this.selectedCountryData.dialCode,!1),this._triggerCountryChange())},setNumber:function(e){var t=this._updateFlagFromNumber(e);this._updateValFromNumber(e),t&&this._triggerCountryChange()}},l.fn[o]=function(r){var t,i=arguments;if(r===a||"object"==typeof r){var n=[];return this.each(function(){if(!l.data(this,"plugin_"+o)){var e=new h(this,r),t=e._init();n.push(t[0]),n.push(t[1]),l.data(this,"plugin_"+o,e)}}),l.when.apply(null,n)}if("string"==typeof r&&"_"!==r[0])return this.each(function(){var e=l.data(this,"plugin_"+o);e instanceof h&&"function"==typeof e[r]&&(t=e[r].apply(e,Array.prototype.slice.call(i,1))),"destroy"===r&&l.data(this,"plugin_"+o,null)}),t!==a?t:this},l.fn[o].getCountryData=function(){return w},l.fn[o].loadUtils=function(e,t){l.fn[o].loadedUtilsScript?t&&t.resolve():(l.fn[o].loadedUtilsScript=!0,l.ajax({type:"GET",url:e,complete:function(){l(".intl-tel-input input").intlTelInput("handleUtils")},dataType:"script",cache:!0}))},l.fn[o].version="11.0.0",l.fn[o].defaults=i;for(var w=[["Afghanistan","af","93"],["Albania","al","355"],["Algeria","dz","213"],["American Samoa","as","1684"],["Andorra","ad","376"],["Angola","ao","244"],["Anguilla","ai","1264"],["Antigua and Barbuda","ag","1268"],["Argentina","ar","54"],["Armenia","am","374"],["Aruba","aw","297"],["Australia","au","61",0],["Austria","at","43"],["Azerbaijan","az","994"],["Bahamas","bs","1242"],["Bahrain","bh","973"],["Bangladesh","bd","880"],["Barbados","bb","1246"],["Belarus","by","375"],["Belgium","be","32"],["Belize","bz","501"],["Benin","bj","229"],["Bermuda","bm","1441"],["Bhutan","bt","975"],["Bolivia","bo","591"],["Bosnia and Herzegovina","ba","387"],["Botswana","bw","267"],["Brazil","br","55"],["British Indian Ocean Territory","io","246"],["British Virgin Islands","vg","1284"],["Brunei","bn","673"],["Bulgaria","bg","359"],["Burkina Faso","bf","226"],["Burundi","bi","257"],["Cambodia","kh","855"],["Cameroon","cm","237"],["Canada","ca","1",1,["204","226","236","249","250","289","306","343","365","387","403","416","418","431","437","438","450","506","514","519","548","579","581","587","604","613","639","647","672","705","709","742","778","780","782","807","819","825","867","873","902","905"]],["Cape Verde","cv","238"],["Caribbean Netherlands","bq","599",1],["Cayman Islands","ky","1345"],["Central African Republic","cf","236"],["Chad","td","235"],["Chile","cl","56"],["China","cn","86"],["Christmas Island","cx","61",2],["Cocos (Keeling) Islands","cc","61",1],["Colombia","co","57"],["Comoros","km","269"],["Congo (DRC) (Jamhuri ya Kidemokrasia ya Kongo)","cd","243"],["Congo (Republic) (Congo-Brazzaville)","cg","242"],["Cook Islands","ck","682"],["Costa Rica","cr","506"],["Cote d'Ivoire","ci","225"],["Croatia","hr","385"],["Cuba","cu","53"],["Curacao","cw","599",0],["Cyprus","cy","357"],["Czech Republic","cz","420"],["Denmark","dk","45"],["Djibouti","dj","253"],["Dominica","dm","1767"],["Dominican Republic","do","1",2,["809","829","849"]],["Ecuador","ec","593"],["Egypt","eg","20"],["El Salvador","sv","503"],["Equatorial Guinea","gq","240"],["Eritrea","er","291"],["Estonia","ee","372"],["Ethiopia","et","251"],["Falkland Islands","fk","500"],["Faroe Islands","fo","298"],["Fiji","fj","679"],["Finland","fi","358",0],["France","fr","33"],["French Guiana","gf","594"],["French Polynesia","pf","689"],["Gabon","ga","241"],["Gambia","gm","220"],["Georgia","ge","995"],["Germany","de","49"],["Ghana","gh","233"],["Gibraltar","gi","350"],["Greece","gr","30"],["Greenland","gl","299"],["Grenada","gd","1473"],["Guadeloupe","gp","590",0],["Guam","gu","1671"],["Guatemala","gt","502"],["Guernsey","gg","44",1],["Guinea","gn","224"],["Guinea-Bissau","gw","245"],["Guyana","gy","592"],["Haiti","ht","509"],["Honduras","hn","504"],["Hong Kong","hk","852"],["Hungary","hu","36"],["Iceland","is","354"],["India","in","91"],["Indonesia","ia","62"],["Iran","ir","98"],["Iraq","iq","964"],["Ireland","ie","353"],["Isle of Man","im","44",2],["Israel","il","972"],["Italy","it","39",0],["Jamaica","jm","1876"],["Japan","jp","81"],["Jersey","je","44",3],["Jordan","jo","962"],["Kazakhstan","kz","7",1],["Kenya","ke","254"],["Kiribati","ki","686"],["Kosovo","xk","383"],["Kuwait","kw","965"],["Kyrgyzstan","kg","996"],["Laos","la","856"],["Latvia","lv","371"],["Lebanon","lb","961"],["Lesotho","ls","266"],["Liberia","lr","231"],["Libya","ly","218"],["Liechtenstein","li","423"],["Lithuania","lt","370"],["Luxembourg","lu","352"],["Macau","mo","853"],["Macedonia","mk","389"],["Madagascar","mg","261"],["Malawi","mw","265"],["Malaysia","my","60"],["Maldives","mv","960"],["Mali","ml","223"],["Malta","mt","356"],["Marshall Islands","mh","692"],["Martinique","mq","596"],["Mauritania","mr","222"],["Mauritius","mu","230"],["Mayotte","yt","262",1],["Mexico","mx","52"],["Micronesia","fm","691"],["Moldova","md","373"],["Monaco","mc","377"],["Mongolia","mn","976"],["Montenegro","me","382"],["Montserrat","ms","1664"],["Morocco","ma","212",0],["Mozambique","mz","258"],["Myanmar (Burma)","mm","95"],["Namibia","na","264"],["Nauru","nr","674"],["Nepal","np","977"],["Netherlands (Nederland)","nl","31"],["New Caledonia","nc","687"],["New Zealand","nz","64"],["Nicaragua","ni","505"],["Niger","ne","227"],["Nigeria","ng","234"],["Niue","nu","683"],["Norfolk Island","nf","672"],["North Korea","kp","850"],["Northern Mariana Islands","mp","1670"],["Norway (Norge)","no","47",0],["Oman","om","968"],["Pakistan","pk","92"],["Palau","pw","680"],["Palestine","ps","970"],["Panama","pa","507"],["Papua New Guinea","pg","675"],["Paraguay","py","595"],["Peru","pe","51"],["Philippines","ph","63"],["Poland","pl","48"],["Portugal","pt","351"],["Puerto Rico","pr","1",3,["787","939"]],["Qatar","qa","974"],["Reunion","re","262",0],["Romania","ro","40"],["Russia","ru","7",0],["Rwanda","rw","250"],["Saint Barthelemy","bl","590",1],["Saint Helena","sh","290"],["Saint Kitts and Nevis","kn","1869"],["Saint Lucia","lc","1758"],["Saint Martin","mf","590",2],["Saint Pierre and Miquelon","pm","508"],["Saint Vincent and the Grenadines","vc","1784"],["Samoa","ws","685"],["San Marino","sm","378"],["Sao Tome and Principe","st","239"],["Saudi Arabia","sa","966"],["Senegal","sn","221"],["Serbia","rs","381"],["Seychelles","sc","248"],["Sierra Leone","sl","232"],["Singapore","sg","65"],["Sint Maarten","sx","1721"],["Slovakia","sk","421"],["Slovenia","si","386"],["Solomon Islands","sb","677"],["Somalia","so","252"],["South Africa","za","27"],["South Korea","kr","82"],["South Sudan","ss","211"],["Spain","es","34"],["Sri Lanka","lk","94"],["Sudan","sd","249"],["Suriname","sr","597"],["Svalbard and Jan Mayen","sj","47",1],["Swaziland","sz","268"],["Sweden (Sverige)","se","46"],["Switzerland","ch","41"],["Syria","sy","963"],["Taiwan","tw","886"],["Tajikistan","tj","992"],["Tanzania","tz","255"],["Thailand","th","66"],["Timor-Leste","tl","670"],["Togo","tg","228"],["Tokelau","tk","690"],["Tonga","to","676"],["Trinidad and Tobago","tt","1868"],["Tunisia","tn","216"],["Turkey","tr","90"],["Turkmenistan","tm","993"],["Turks and Caicos Islands","tc","1649"],["Tuvalu","tv","688"],["U.S. Virgin Islands","vi","1340"],["Uganda","ug","256"],["Ukraine","ua","380"],["United Arab Emirates","ae","971"],["United Kingdom","gb","44",0],["United States","us","1",0],["Uruguay","uy","598"],["Uzbekistan","uz","998"],["Vanuatu","vu","678"],["Vatican City","va","39",1],["Venezuela","ve","58"],["Vietnam","vn","84"],["Wallis and Futuna","wf","681"],["Western Sahara","eh","212",1],["Yemen","ye","967"],["Zambia","zm","260"],["Zimbabwe","zw","263"],["Aland Islands","ax","358",1]],v=0;v<w.length;v++){var g=w[v];w[v]={name:g[0],iso2:g[1],dialCode:g[2],priority:g[3]||0,areaCodes:g[4]||null}}});var gmapdata=new Array,gmapmarker=new Array;function if_gmap_init(e,t){if(document.getElementById(e+"_element"+t)){map=document.getElementById(e+"_element"+t);var r=parseInt(map.getAttribute("zoom")),i=map.getAttribute("center_x"),n=map.getAttribute("center_y"),a=new google.maps.LatLng(n,i);return gmapdata[e]=new google.maps.Map(document.getElementById(e+"_element"+t),{center:a,zoom:r,mapTypeId:"roadmap"}),gmapmarker[e]=new Array,!1}draggab=!1,map=document.getElementById(e);r=parseInt(map.getAttribute("zoom")),i=map.getAttribute("long"),n=map.getAttribute("lat"),a=new google.maps.LatLng(n,i);return gmapdata=new google.maps.Map(document.getElementById(e),{center:a,zoom:r,mapTypeId:"roadmap"}),geocoder=new google.maps.Geocoder,(gmapmarker=new google.maps.Marker({map:gmapdata,position:a,draggable:draggab})).setDraggable(draggab),infoW=new google.maps.InfoWindow,google.maps.event.addListener(gmapdata,"mouseover",function(e){document.getElementById("longval")||(gmapmarker.draggable=!1)}),google.maps.event.addListener(gmapdata,"click",function(e){document.getElementById("longval")&&(document.getElementById("longval").value=e.latLng.lng().toFixed(6),document.getElementById("latval").value=e.latLng.lat().toFixed(6),gmapmarker.setPosition(e.latLng),if_gmap_updateMap(),geocoder.geocode({latLng:gmapmarker.getPosition()},function(e,t){t==google.maps.GeocoderStatus.OK&&e[0]&&document.getElementById("addrval")&&(document.getElementById("addrval").value=e[0].formatted_address)}))}),google.maps.event.addListener(gmapmarker,"drag",function(){document.getElementById("longval")&&(geocoder.geocode({latLng:gmapmarker.getPosition()},function(e,t){t==google.maps.GeocoderStatus.OK&&e[0]&&document.getElementById("addrval")&&(document.getElementById("addrval").value=e[0].formatted_address)}),if_gmap_updateMap(),document.getElementById("latval").value=gmapmarker.getPosition().lat().toFixed(6),document.getElementById("longval").value=gmapmarker.getPosition().lng().toFixed(6))}),google.maps.event.addListener(gmapmarker,"click",function(){infoW.setContent('<div style="overflow: hidden;">'+document.getElementById(e).getAttribute("info")+"</div>");infoW.setOptions({maxWidth:"300"}),infoW.open(this.getMap(),this)}),document.getElementById("longval")&&(document.getElementById("longval").value=i,document.getElementById("latval").value=n,geocoder.geocode({latLng:gmapmarker.getPosition()},function(e,t){t==google.maps.GeocoderStatus.OK&&e[0]&&document.getElementById("addrval")&&(document.getElementById("addrval").value=e[0].formatted_address)})),!1}function add_marker_on_map(e,t,r,i,n,a,o){var d=new google.maps.LatLng(i,r);return gmapmarker[e][t]=new google.maps.Marker({map:gmapdata[e],position:d,draggable:o}),gmapmarker[e][t].setDraggable(o),o&&google.maps.event.addListener(gmapmarker[e][t],"drag",function(){document.getElementById(e+"_lat"+a).value=gmapmarker[e][t].getPosition().lat().toFixed(6),document.getElementById(e+"_long"+a).value=gmapmarker[e][t].getPosition().lng().toFixed(6)}),infoW=new google.maps.InfoWindow,google.maps.event.addListener(gmapmarker[e][t],"click",function(){infoW.setContent('<div style="overflow: hidden;">'+document.getElementById(e+"_element"+a).getAttribute("info"+t)+"</div>");infoW.setOptions({maxWidth:"300"}),infoW.open(this.getMap(),this)}),!1}!function(L){function r(e,t){var a=this,o=L.extend({},L.fn.signaturePad.defaults,t),d=L(e),r=L(o.canvas,d),l=r.get(0),s=null,u={x:null,y:null},c=[],m=!1,i=!1,n=!1,_=!1,f=30,p=f,y=0;function h(){clearTimeout(m),i=m=!1}function w(e,t){var r,i,n;if(e.preventDefault(),r=L(e.target).offset(),clearTimeout(m),m=!1,n=void 0!==e.targetTouches?(i=Math.floor(e.targetTouches[0].pageX-r.left),Math.floor(e.targetTouches[0].pageY-r.top)):(i=Math.floor(e.pageX-r.left),Math.floor(e.pageY-r.top)),u.x===i&&u.y===n)return!0;null===u.x&&(u.x=i),null===u.y&&(u.y=n),t&&(n+=t),s.beginPath(),s.moveTo(u.x,u.y),s.lineTo(i,n),s.lineCap=o.penCap,s.stroke(),s.closePath(),c.push({lx:i,ly:n,mx:u.x,my:u.y}),u.x=i,u.y=n,o.onDraw&&"function"==typeof o.onDraw&&o.onDraw.apply(a)}function v(){g()}function g(e){e?w(e,1):(n?r.each(function(){this.removeEventListener("touchmove",w)}):r.unbind("mousemove.signaturepad"),0<c.length&&o.onDrawEnd&&"function"==typeof o.onDrawEnd&&o.onDrawEnd.apply(a)),u.x=null,u.y=null,o.output&&0<c.length&&L(o.output,d).val(JSON.stringify(c))}function b(){s.clearRect(0,0,l.width,l.height),s.fillStyle=o.bgColour,s.fillRect(0,0,l.width,l.height),o.displayOnly||function(){if(!o.lineWidth)return;s.beginPath(),s.lineWidth=o.lineWidth,s.strokeStyle=o.lineColour,s.moveTo(o.lineMargin,o.lineTop),s.lineTo(l.width-o.lineMargin,o.lineTop),s.stroke(),s.closePath()}(),s.lineWidth=o.penWidth,s.strokeStyle=o.penColour,L(o.output,d).val(""),c=[],g()}function j(e,t){null==u.x?w(e,1):w(e,t)}function Q(e,t){n?t.addEventListener("touchmove",j,!1):r.bind("mousemove.signaturepad",j),w(e,1)}function C(e){if(_)return!1;_=!0,L("input").blur(),void 0!==e.targetTouches&&(n=!0),n?(r.each(function(){this.addEventListener("touchend",v,!1),this.addEventListener("touchcancel",v,!1)}),r.unbind("mousedown.signaturepad")):(L(document).bind("mouseup.signaturepad",function(){i&&(g(),h())}),r.bind("mouseleave.signaturepad",function(e){i&&g(e),i&&!m&&(m=setTimeout(function(){g(),h()},500))}),r.each(function(){this.removeEventListener("touchstart",k)}))}function k(e){e.preventDefault(),i=!0,C(e),Q(e,this)}function I(){L(o.typed,d).hide(),b(),r.each(function(){this.addEventListener("touchstart",k)}),r.bind("mousedown.signaturepad",function(e){if(e.preventDefault(),1<e.which)return!1;i=!0,C(e),Q(e)}),L(o.clear,d).bind("click.signaturepad",function(e){e.preventDefault(),b()}),L(o.typeIt,d).bind("click.signaturepad",function(e){e.preventDefault(),x()}),L(o.drawIt,d).unbind("click.signaturepad"),L(o.drawIt,d).bind("click.signaturepad",function(e){e.preventDefault()}),L(o.typeIt,d).removeClass(o.currentClass),L(o.drawIt,d).addClass(o.currentClass),L(o.sig,d).addClass(o.currentClass),L(o.typeItDesc,d).hide(),L(o.drawItDesc,d).show(),L(o.clear,d).show()}function x(){b(),_=!1,r.each(function(){this.removeEventListener&&(this.removeEventListener("touchend",v),this.removeEventListener("touchcancel",v),this.removeEventListener("touchmove",w),this.removeEventListener("touchstart",k))}),L(document).unbind("mouseup.signaturepad"),r.unbind("mousedown.signaturepad"),r.unbind("mousemove.signaturepad"),r.unbind("mouseleave.signaturepad"),L(o.clear,d).unbind("click.signaturepad"),L(o.typed,d).show(),L(o.drawIt,d).bind("click.signaturepad",function(e){e.preventDefault(),I()}),L(o.typeIt,d).unbind("click.signaturepad"),L(o.typeIt,d).bind("click.signaturepad",function(e){e.preventDefault()}),L(o.output,d).val(""),L(o.drawIt,d).removeClass(o.currentClass),L(o.typeIt,d).addClass(o.currentClass),L(o.sig,d).removeClass(o.currentClass),L(o.drawItDesc,d).hide(),L(o.clear,d).hide(),L(o.typeItDesc,d).show(),p=f=L(o.typed,d).css("font-size").replace(/px/,"")}function D(e){var t=L(o.typed,d),r=L.trim(e.replace(/>/g,"&gt;").replace(/</g,"&lt;")),i=y,n=.5*p;if(y=r.length,t.html(r),r){if(i<y&&t.outerWidth()>l.width)for(;t.outerWidth()>l.width;)p--,t.css("font-size",p+"px");if(y<i&&t.outerWidth()+n<l.width&&p<f)for(;t.outerWidth()+n<l.width&&p<f;)p++,t.css("font-size",p+"px")}else t.css("font-size",f+"px")}function E(){var e=!0,t={drawInvalid:!1,nameInvalid:!1},r=[d,o],i=[t,d,o];return o.onBeforeValidate&&"function"==typeof o.onBeforeValidate?o.onBeforeValidate.apply(a,r):function(e,t){L("p."+t.errorClass,e).remove(),e.removeClass(t.errorClass),L("input, label",e).removeClass(t.errorClass)}.apply(a,r),o.drawOnly&&c.length<1&&(e=!(t.drawInvalid=!0)),""===L(o.name,d).val()&&(e=!(t.nameInvalid=!0)),o.onFormError&&"function"==typeof o.onFormError?o.onFormError.apply(a,i):function(e,t,r){e.nameInvalid&&(t.prepend(['<p class="',r.errorClass,'">',r.errorMessage,"</p>"].join("")),L(r.name,t).focus(),L(r.name,t).addClass(r.errorClass),L("label[for="+L(r.name).attr("id")+"]",t).addClass(r.errorClass)),e.drawInvalid&&t.prepend(['<p class="',r.errorClass,'">',r.errorMessageDraw,"</p>"].join(""))}.apply(a,i),e}function A(e,t,r){for(var i in e)"object"==typeof e[i]&&(t.beginPath(),t.moveTo(e[i].mx,e[i].my),t.lineTo(e[i].lx,e[i].ly),t.lineCap=o.penCap,t.stroke(),t.closePath(),r&&e[i].lx&&c.push({lx:e[i].lx,ly:e[i].ly,mx:e[i].mx,my:e[i].my}))}L.extend(a,{signaturePad:"{{version}}",init:function(){parseFloat((/CPU.+OS ([0-9_]{3}).*AppleWebkit.*Mobile/i.exec(navigator.userAgent)||[0,"4_2"])[1].replace("_","."))<4.1&&(L.fn.Oldoffset=L.fn.offset,L.fn.offset=function(){var e=L(this).Oldoffset();return e.top-=window.scrollY,e.left-=window.scrollX,e}),L(o.typed,d).bind("selectstart.signaturepad",function(e){return L(e.target).is(":input")}),r.bind("selectstart.signaturepad",function(e){return L(e.target).is(":input")}),!l.getContext&&FlashCanvas&&FlashCanvas.initElement(l),l.getContext&&(s=l.getContext("2d"),L(o.sig,d).show(),o.displayOnly||(o.drawOnly||(L(o.name,d).bind("keyup.signaturepad",function(){D(L(this).val())}),L(o.name,d).bind("blur.signaturepad",function(){D(L(this).val())}),L(o.drawIt,d).bind("click.signaturepad",function(e){e.preventDefault(),I()})),o.drawOnly||"drawIt"===o.defaultAction?I():x(),o.validateFields&&(L(e).is("form")?L(e).bind("submit.signaturepad",function(){return E()}):L(e).parents("form").bind("submit.signaturepad",function(){return E()})),L(o.sigNav,d).show()))},updateOptions:function(e){L.extend(o,e)},regenerate:function(e){a.clearCanvas(),L(o.typed,d).hide(),"string"==typeof e&&(e=JSON.parse(e)),A(e,s,!0),o.output&&0<L(o.output,d).length&&L(o.output,d).val(JSON.stringify(c))},clearCanvas:function(){b()},getSignature:function(){return c},getSignatureString:function(){return JSON.stringify(c)},getSignatureImage:function(){var e,t=document.createElement("canvas"),r=null;return t.style.position="absolute",t.style.top="-999em",t.width=l.width,t.height=l.height,document.body.appendChild(t),!t.getContext&&FlashCanvas&&FlashCanvas.initElement(t),(r=t.getContext("2d")).fillStyle=o.bgColour,r.fillRect(0,0,l.width,l.height),r.lineWidth=o.penWidth,r.strokeStyle=o.penColour,A(c,r),e=t.toDataURL.apply(t,arguments),document.body.removeChild(t),t=null,e},validateForm:function(){return E()}})}L.fn.signaturePad=function(e){var t=null;return this.each(function(){L.data(this,"plugin-signaturePad")?(t=L.data(this,"plugin-signaturePad")).updateOptions(e):((t=new r(this,e)).init(),L.data(this,"plugin-signaturePad",t))}),t},L.fn.signaturePad.defaults={defaultAction:"typeIt",displayOnly:!1,drawOnly:!1,canvas:"canvas",sig:".sig",sigNav:".sigNav",bgColour:"#ffffff",penColour:"#145394",penWidth:2,penCap:"round",lineColour:"#ccc",lineWidth:2,lineMargin:5,lineTop:35,name:".name",typed:".typed",clear:".clearButton",typeIt:".typeIt a",drawIt:".drawIt a",typeItDesc:".typeItDesc",drawItDesc:".drawItDesc",output:".output",currentClass:"current",validateFields:!0,errorClass:"error",errorMessage:"Please enter your name",errorMessageDraw:"Please sign the document",onBeforeValidate:null,onFormError:null,onDraw:null,onDrawEnd:null}}(jQuery);
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: webdorado,10web,wdsupport,formmakersupport
3
  Tags: form, forms, form builder, contact form, feedback, custom form, contact, web contact form, captcha, email, form manager, survey
4
  Requires at least: 4.6
5
  Tested up to: 5.8
6
- Stable tag: 1.14.4
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -561,6 +561,9 @@ Where **{{field_id}}** is the ID of the field you wish to prefill. Also, **{{par
561
 
562
 
563
  == Changelog ==
 
 
 
564
  = 1.14.4 =
565
  * Added: The Ghana Cedi to currencies list.
566
  * Fixed: Arithmetic Captcha.
3
  Tags: form, forms, form builder, contact form, feedback, custom form, contact, web contact form, captcha, email, form manager, survey
4
  Requires at least: 4.6
5
  Tested up to: 5.8
6
+ Stable tag: 1.14.5
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
561
 
562
 
563
  == Changelog ==
564
+ = 1.14.5 =
565
+ * Fixed: Form submit required fields issue.
566
+
567
  = 1.14.4 =
568
  * Added: The Ghana Cedi to currencies list.
569
  * Fixed: Arithmetic Captcha.