1function mbm_form_grtoken(){var t;app_recaptcha_data.enabled&&1!=app_recaptcha_data.enabled&&app_recaptcha_data.version&&"v3"==app_recaptcha_data.version&&window.grecaptcha&&app_recaptcha_data.site_key&&(t=app_recaptcha_data.site_key,grecaptcha.ready(function(){grecaptcha.execute(t,{action:"MBMFormSubmit"}).then(function(t){window.localStorage.setItem("mbmform_recaptcha_token",t)})}))}function mbm_form_set_global_grtoken(){if(app_recaptcha_data.enabled&&1!=app_recaptcha_data.enabled)return!1;document.querySelector(".MBM_Form").length&&!window.localStorage.getItem("mbmform_recaptcha_token")&&mbm_form_grtoken()}function mbm_sumit_form_data_server(t,e,i){return form_wrapper=t.closest(".MBM_Form_Wrapper"),form_id=t.find('input[name="MBM_Form_ID"]').val(),void 0!==(form_data=t.data()).block_form?(e.stopPropagation(),alert("To ensure data is stored in a user's profile, back office user's may not fill in this form"),!1):!!t.valid()&&(form_wrapper.find(".success_msg").remove(),mbm_fex.ui.block.element(jQuery(form_wrapper),{message:"Sending...",overlayCSS:{backgroundColor:"#000",opacity:.2,cursor:"wait"}}),void jQuery.ajax({url:mbm_fex.ajaxurl,type:"POST",data:{action:"MBM_Form_send",form_nonce_field:form_data.nonce,form_data:t.serialize(),"g-recaptcha-response":i},dataType:"JSON",form_wrapper:form_wrapper,form_id:form_id,form_data:form_data}).done(function(t){var e;"OK"===t.status?(void 0!==form_data.hide_form&&form_wrapper.find("form").slideUp(),void 0!==form_data.ok_msg&&jQuery("<h4/>",{class:"success_msg",html:form_data.ok_msg}).appendTo(form_wrapper),mbm_fex.cookie.set("MBM_Form_"+form_id,"sent",999),form_wrapper.find(".MBM_Form").trigger("mbm_form_sent",[form_id]),void 0!==form_data.redirect&&setTimeout(function(){window.location=form_data.redirect},1e3)):(e=void 0!==t.msg?t.msg:"Error when sending the form.",console.log(t),alert(e)),mbm_fex.ui.block.unblock(jQuery(form_wrapper))}))}function mbm_form_run(){var n;(n=jQuery)(".MBM_Form").length&&n(".MBM_Form").each(function(t,e){n(e).on("form_loaded",function(t){var e=n(this),i=mbm_fex.cookie.get(e.attr("id")+"_Cache");if(void 0!==i&&i){var r=JSON.parse(i);if("object"==typeof r)for(var s in r)if(r.hasOwnProperty(s)){var a=e.find('*[name="'+s+'"]');if(a.length&&a.hasClass("form_field"))switch(a.attr("type")){case"radio":case"checkbox":(a=1<a.length?e.find('*[value="'+r[s].toString()+'"]'):a).is(":checked")||a.prop("checked",!0);break;default:"SELECT"==a.prop("tagName")?a.find('option[value="'+r[s].toString()+'"]').attr("selected","selected"):""===a.val()&&a.val(r[s].toString())}}}}),n(e).hasClass("ajax")?(n(e).find(".Block_Form_Overlay").on("click",function(t){t.preventDefault(),t.stopPropagation(),alert("To ensure data is stored in a user's profile, back office user's may not fill in this form.")}),n(e).validate({errorPlacement:function(t,e){e.hasClass("MBM_Consent")&&(e.closest("div").addClass("important-error-wrap"),t.insertBefore(e)),"radio"==e.attr("type")?e.closest("div").append(t):"file"==e.attr("type")?t.insertAfter(e.closest("span")):"checkbox"!=e.attr("type")||e.hasClass("MBM_Consent")?e.hasClass("MBM_Consent")?(t.insertAfter(e),t.insertAfter(e.closest("span"))):t.insertAfter(e):e.closest("div").append(t)},highlight:function(t,e,i){n(t).hasClass("MBM_Consent")&&(n(t).addClass(e).removeClass(i),n(t).closest("form").find("label[for="+n(t).attr("id")+"]").addClass(e),n(t).closest("div").addClass("important-error-wrap"))},unhighlight:function(t,e,i){n(t).hasClass("MBM_Consent")&&(n(t).removeClass(e).addClass(i),n(t).closest("form").find("label[for="+n(t).attr("id")+"]").removeClass(e),n(t).closest("div").removeClass("important-error-wrap"))}})):n(e).validate({errorPlacement:function(t,e){"radio"==e.attr("type")||"checkbox"==e.attr("type")?t.insertBefore(e):"file"==e.attr("type")?t.insertAfter(e.closest("span")):t.insertAfter(e)}}),n(e).trigger("form_loaded"),n(e).on("submit",function(e){e.preventDefault();var t,i=n(this),r=window.app_recaptcha_data;r.enabled&&1==r.enabled&&r.version&&"v3"==r.version?window.grecaptcha&&r.site_key&&(t=r.site_key,grecaptcha.ready(function(){gre
1captcha.execute(t,{action:"MBMFormSubmit"}).then(function(t){mbm_sumit_form_data_server(i,e,t)})})):mbm_sumit_form_data_server(i,e,"")}),n(e).find("*[data-show_if_value]").each(function(){var e=n(this),t=n(this).data("show_from"),i=n(this).data("show_if_value");i&&n("."+t).find(".form_field").on("change",function(t){n(this).val()==i?(e.show(),e.find(".form_field").attr("disabled",!1)):(e.hide(),e.find(".form_field").attr("disabled",!0))})}),n(e).on("mbm_form_sent",function(t){var e,i=n(this),r={};i.find("*[data-cache]").each(function(){var t=n(this),e="";("checkbox"!=t.attr("type")&&"radio"!=t.attr("type")||t.is(":checked"))&&(e=t.val(),r[t.attr("name")]=e)}),n.isEmptyObject(r)||(e=JSON.stringify(r),mbm_fex.cookie.delete(i.attr("id")+"_Cache"),mbm_fex.cookie.set(i.attr("id")+"_Cache",e,999))})})}function tidy(t){var e=document.createElement("div");return e.innerHTML=t,e.innerHTML}function mbm_form_create_other_input(t,e){var i=t.find('option[value="'+e+'"]'),e=t.attr("name"),r=void 0!==t.attr("required"),r=jQuery("<input/>",{type:"text",class:"other_input_for",placeholder:"Other",required:r,name:e+"_other",blur:function(){i.data("last-value",$(this).val())}});void 0!==i.data("last-value")&&r.val(i.data("last-value")),r.insertAfter(t)}function msgUI(t){jQuery(".blockUI").length&&jQuery(".blockUI").html(t)}!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&module.exports?module.exports=t(require("jquery")):t(jQuery)}(function(h){h.extend(h.fn,{validate:function(t){var r;if(this.length)return(r=h.data(this[0],"validator"))||(this.attr("novalidate","novalidate"),r=new h.validator(t,this[0]),h.data(this[0],"validator",r),r.settings.onsubmit&&(this.on("click.validate",":submit",function(t){r.settings.submitHandler&&(r.submitButton=t.target),h(this).hasClass("cancel")&&(r.cancelSubmit=!0),void 0!==h(this).attr("formnovalidate")&&(r.cancelSubmit=!0)}),this.on("submit.validate",function(i){function t(){var t,e;return!r.settings.submitHandler||(r.submitButton&&(t=h("<input type='hidden'/>").attr("name",r.submitButton.name).val(h(r.submitButton).val()).appendTo(r.currentForm)),e=r.settings.submitHandler.call(r,r.currentForm,i),r.submitButton&&t.remove(),void 0!==e&&e)}return r.settings.debug&&i.preventDefault(),r.cancelSubmit?(r.cancelSubmit=!1,t()):r.form()?r.pendingRequest?!(r.formSubmitted=!0):t():(r.focusInvalid(),!1)})),r);t&&t.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing.")},valid:function(){var t,e,i;return h(this[0]).is("form")?t=this.validate().form():(i=[],t=!0,e=h(this[0].form).validate(),this.each(function(){(t=e.element(this)&&t)||(i=i.concat(e.errorList))}),e.errorList=i),t},rules:function(t,e){var i,r,s,a,n,o=this[0];if(null!=o&&null!=o.form){if(t)switch(i=h.data(o.form,"validator").settings,r=i.rules,s=h.validator.staticRules(o),t){case"add":h.extend(s,h.validator.normalizeRule(e)),delete s.messages,r[o.name]=s,e.messages&&(i.messages[o.name]=h.extend(i.messages[o.name],e.messages));break;case"remove":return e?(n={},h.each(e.split(/\s/),function(t,e){n[e]=s[e],delete s[e],"required"===e&&h(o).removeAttr("aria-required")}),n):(delete r[o.name],s)}return(t=h.validator.normalizeRules(h.extend({},h.validator.classRules(o),h.validator.attributeRules(o),h.validator.dataRules(o),h.validator.staticRules(o)),o)).required&&(a=t.required,delete t.required,t=h.extend({required:a},t),h(o).attr("aria-required","true")),t.remote&&(a=t.remote,delete t.remote,t=h.extend(t,{remote:a})),t}}}),h.extend(h.expr.pseudos||h.expr[":"],{blank:function(t){return!h.trim(""+h(t).val())},filled:function(t){t=h(t).val();return null!==t&&!!h.trim(""+t)},unchecked:function(t){return!h(t).prop("checked")}}),h.validator=function(t,e){this.settings=h.extend(!0,{},h.validator.defaults,t),this.currentForm=e,this.init()},h.validator.format=function(i,t){return 1===arguments.length?function(){var t=h.makeArray(arguments);return t.unshift(i),h.validator.format.apply(this,t)}:(void 0===t||((t=2<arguments.length&&t.constructor!==Array?h.makeArray(arguments).slice(1):t).constructor!==Array&&(t=[t]),h.each(t,function(t,e){i=i.replace(new RegExp("\\{"+t+"\\}","g"),function(){return e})})),i)},h.extend(h.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:h([]),errorLabelContainer:h([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(t){this.lastActive=t,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,t,this.settings.errorClass,this.settings.val
1idClass),this.hideThese(this.errorsFor(t)))},onfocusout:function(t){this.checkable(t)||!(t.name in this.submitted)&&this.optional(t)||this.element(t)},onkeyup:function(t,e){9===e.which&&""===this.elementValue(t)||-1!==h.inArray(e.keyCode,[16,17,18,20,35,36,37,38,39,40,45,144,225])||(t.name in this.submitted||t.name in this.invalid)&&this.element(t)},onclick:function(t){t.name in this.submitted?this.element(t):t.parentNode.name in this.submitted&&this.element(t.parentNode)},highlight:function(t,e,i){("radio"===t.type?this.findByName(t.name):h(t)).addClass(e).removeClass(i)},unhighlight:function(t,e,i){("radio"===t.type?this.findByName(t.name):h(t)).removeClass(e).addClass(i)}},setDefaults:function(t){h.extend(h.validator.defaults,t)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:h.validator.format("Please enter no more than {0} characters."),minlength:h.validator.format("Please enter at least {0} characters."),rangelength:h.validator.format("Please enter a value between {0} and {1} characters long."),range:h.validator.format("Please enter a value between {0} and {1}."),max:h.validator.format("Please enter a value less than or equal to {0}."),min:h.validator.format("Please enter a value greater than or equal to {0}."),step:h.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function t(t){!this.form&&this.hasAttribute("contenteditable")&&(this.form=h(this).closest("form")[0]);var e=h.data(this.form,"validator"),i="on"+t.type.replace(/^validate/,""),r=e.settings;r[i]&&!h(this).is(r.ignore)&&r[i].call(e,this,t)}this.labelContainer=h(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||h(this.currentForm),this.containers=h(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var i,r=this.groups={};h.each(this.settings.groups,function(i,t){"string"==typeof t&&(t=t.split(/\s/)),h.each(t,function(t,e){r[e]=i})}),i=this.settings.rules,h.each(i,function(t,e){i[t]=h.validator.normalizeRule(e)}),h(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",t).on("click.validate","select, option, [type='radio'], [type='checkbox']",t),this.settings.invalidHandler&&h(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler),h(this.currentForm).find("[required], [data-rule-required], .required").attr("aria-required","true")},form:function(){return this.checkForm(),h.extend(this.submitted,this.errorMap),this.invalid=h.extend({},this.errorMap),this.valid()||h(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var t=0,e=this.currentElements=this.elements();e[t];t++)this.check(e[t]);return this.valid()},element:function(t){var e,i,r=this.clean(t),s=this.validationTargetFor(r),a=this,n=!0;return void 0===s?delete this.invalid[r.name]:(this.prepareElement(s),this.currentElements=h(s),(i=this.groups[s.name])&&h.each(this.groups,function(t,e){e===i&&t!==s.name&&((r=a.validationTargetFor(a.clean(a.findByName(t))))&&r.name in a.invalid&&(a.currentElements.push(r),n=a.check(r)&&n))}),e=!1!==this.check(s),n=n&&e,this.invalid[s.name]=!e,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),h(t).attr("aria-invalid",!e)),n},showErrors:function(e){var i;e&&(h.extend((i=this).errorMap,e),this.errorList=h.map(this.errorMap,function(t,e){return{message:t,element:i.findByName(e)[0]}}),this.successList=h.grep(this.successList,function(t){return!(t.name in e)})),this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){h.fn.resetForm&&h(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var t=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(t)},resetElements:function(t){var e;if(this.settings.unhighlight)for(e=0;t[e];e++)this.settings.unhighlight.call(this,t[e],this.settings.errorClass,""),this.findByName(t[e].name).removeClass(this.settings.val
1idClass);else t.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(t){var e,i=0;for(e in t)t[e]&&i++;return i},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(t){t.not(this.containers).text(""),this.addWrapper(t).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{h(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(t){}},findLastActive:function(){var e=this.lastActive;return e&&1===h.grep(this.errorList,function(t){return t.element.name===e.name}).length&&e},elements:function(){var e=this,i={};return h(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var t=this.name||h(this).attr("name");return!t&&e.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.hasAttribute("contenteditable")&&(this.form=h(this).closest("form")[0]),!(t in i||!e.objectLength(h(this).rules())||(i[t]=!0,0))})},clean:function(t){return h(t)[0]},errors:function(){var t=this.settings.errorClass.split(" ").join(".");return h(this.settings.errorElement+"."+t,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=h([]),this.toHide=h([])},reset:function(){this.resetInternals(),this.currentElements=h([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(t){this.reset(),this.toHide=this.errorsFor(t)},elementValue:function(t){var e=h(t),i=t.type;return"radio"===i||"checkbox"===i?this.findByName(t.name).filter(":checked").val():"number"===i&&void 0!==t.validity?t.validity.badInput?"NaN":e.val():(t=t.hasAttribute("contenteditable")?e.text():e.val(),"file"===i?"C:\\fakepath\\"===t.substr(0,12)?t.substr(12):0<=(e=t.lastIndexOf("/"))||0<=t.lastIndexOf("\\")?t.substr(e+1):t:"string"==typeof t?t.replace(/\r/g,""):t)},check:function(e){e=this.validationTargetFor(this.clean(e));var t,i,r,s=h(e).rules(),a=h.map(s,function(t,e){return e}).length,n=!1,o=this.elementValue(e);if("function"==typeof s.normalizer){if("string"!=typeof(o=s.normalizer.call(e,o)))throw new TypeError("The normalizer should return a string value.");delete s.normalizer}for(i in s){r={method:i,parameters:s[i]};try{if("dependency-mismatch"===(t=h.validator.methods[i].call(this,o,e,r.parameters))&&1===a)n=!0;else{if(n=!1,"pending"===t)return void(this.toHide=this.toHide.not(this.errorsFor(e)));if(!t)return this.formatAndAdd(e,r),!1}}catch(t){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+e.id+", check the '"+r.method+"' method.",t),t instanceof TypeError&&(t.message+=". Exception occurred when checking element "+e.id+", check the '"+r.method+"' method."),t}}if(!n)return this.objectLength(s)&&this.successList.push(e),!0},customDataMessage:function(t,e){return h(t).data("msg"+e.charAt(0).toUpperCase()+e.substring(1).toLowerCase())||h(t).data("msg")},customMessage:function(t,e){t=this.settings.messages[t];return t&&(t.constructor===String?t:t[e])},findDefined:function(){for(var t=0;t<arguments.length;t++)if(void 0!==arguments[t])return arguments[t]},defaultMessage:function(t,e){var i=this.findDefined(this.customMessage(t.name,(e="string"==typeof e?{method:e}:e).method),this.customDataMessage(t,e.method),!this.settings.ignoreTitle&&t.title||void 0,h.validator.messages[e.method],"<strong>Warning: No message defined for "+t.name+"</strong>"),r=/\$?\{(\d+)\}/g;return"function"==typeof i?i=i.call(this,e.parameters,t):r.test(i)&&(i=h.validator.format(i.replace(r,"{$1}"),e.parameters)),i},formatAndAdd:function(t,e){var i=this.defaultMessage(t,e);this.errorList.push({message:i,element:t,method:e.method}),this.errorMap[t.name]=i,this.submitted[t.name]=i},addWrapper:function(t){return t=this.settings.wrapper?t.add(t.parent(this.settings.wrapper)):t},defaultShowErrors:function(){for(var t,e,i=0;this.errorList[i];i++)e=this.errorList[i],this.settings.highlight&&this.settings.highlight.call(this,e.element,this.settings.errorClass,this.settings.val
1idClass),this.showLabel(e.element,e.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(i=0;this.successList[i];i++)this.showLabel(this.successList[i]);if(this.settings.unhighlight)for(i=0,t=this.validElements();t[i];i++)this.settings.unhighlight.call(this,t[i],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return h(this.errorList).map(function(){return this.element})},showLabel:function(t,e){var i,r,s,a=this.errorsFor(t),n=this.idOrName(t),o=h(t).attr("aria-describedby");a.length?(a.removeClass(this.settings.validClass).addClass(this.settings.errorClass),a.html(e)):(r=a=h("<"+this.settings.errorElement+">").attr("id",n+"-error").addClass(this.settings.errorClass).html(e||""),this.settings.wrapper&&(r=a.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(r):this.settings.errorPlacement?this.settings.errorPlacement.call(this,r,h(t)):r.insertAfter(t),a.is("label")?a.attr("for",n):0===a.parents("label[for='"+this.escapeCssMeta(n)+"']").length&&(r=a.attr("id"),o?o.match(new RegExp("\\b"+this.escapeCssMeta(r)+"\\b"))||(o+=" "+r):o=r,h(t).attr("aria-describedby",o),(i=this.groups[t.name])&&h.each((s=this).groups,function(t,e){e===i&&h("[name='"+s.escapeCssMeta(t)+"']",s.currentForm).attr("aria-describedby",a.attr("id"))}))),!e&&this.settings.success&&(a.text(""),"string"==typeof this.settings.success?a.addClass(this.settings.success):this.settings.success(a,t)),this.toShow=this.toShow.add(a)},errorsFor:function(t){var e=this.escapeCssMeta(this.idOrName(t)),t=h(t).attr("aria-describedby"),e="label[for='"+e+"'], label[for='"+e+"'] *";return t&&(e=e+", #"+this.escapeCssMeta(t).replace(/\s+/g,", #")),this.errors().filter(e)},escapeCssMeta:function(t){return t.replace(/([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(t){return this.groups[t.name]||!this.checkable(t)&&t.id||t.name},validationTargetFor:function(t){return this.checkable(t)&&(t=this.findByName(t.name)),h(t).not(this.settings.ignore)[0]},checkable:function(t){return/radio|checkbox/i.test(t.type)},findByName:function(t){return h(this.currentForm).find("[name='"+this.escapeCssMeta(t)+"']")},getLength:function(t,e){switch(e.nodeName.toLowerCase()){case"select":return h("option:selected",e).length;case"input":if(this.checkable(e))return this.findByName(e.name).filter(":checked").length}return t.length},depend:function(t,e){return!this.dependTypes[typeof t]||this.dependTypes[typeof t](t,e)},dependTypes:{boolean:function(t){return t},string:function(t,e){return!!h(t,e.form).length},function:function(t,e){return t(e)}},optional:function(t){var e=this.elementValue(t);return!h.validator.methods.required.call(this,e,t)&&"dependency-mismatch"},startRequest:function(t){this.pending[t.name]||(this.pendingRequest++,h(t).addClass(this.settings.pendingClass),this.pending[t.name]=!0)},stopRequest:function(t,e){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[t.name],h(t).removeClass(this.settings.pendingClass),e&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(h(this.currentForm).submit(),this.formSubmitted=!1):!e&&0===this.pendingRequest&&this.formSubmitted&&(h(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(t,e){return e="string"==typeof e&&e||"remote",h.data(t,"previousValue")||h.data(t,"previousValue",{old:null,valid:!0,message:this.defaultMessage(t,{method:e})})},destroy:function(){this.resetForm(),h(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(t,e){t.constructor===String?this.classRuleSettings[t]=e:h.extend(this.classRuleSettings,t)},classRules:function(t){var e={},t=h(t).attr("class");return t&&h.each(t.split(" "),function(){this in h.validator.classRuleSettings&&h.extend(e,h.validator.classRuleSettings[this])}),e}
1,normalizeAttributeRule:function(t,e,i,r){/min|max|step/.test(i)&&(null===e||/number|range|text/.test(e))&&(r=Number(r),isNaN(r)&&(r=void 0)),r||0===r?t[i]=r:e===i&&"range"!==e&&(t[i]=!0)},attributeRules:function(t){var e,i,r={},s=h(t),a=t.getAttribute("type");for(e in h.validator.methods)i="required"===e?(i=t.getAttribute(e),""===i&&(i=!0),!!i):s.attr(e),this.normalizeAttributeRule(r,a,e,i);return r.maxlength&&/-1|2147483647|524288/.test(r.maxlength)&&delete r.maxlength,r},dataRules:function(t){var e,i,r={},s=h(t),a=t.getAttribute("type");for(e in h.validator.methods)i=s.data("rule"+e.charAt(0).toUpperCase()+e.substring(1).toLowerCase()),this.normalizeAttributeRule(r,a,e,i);return r},staticRules:function(t){var e={},i=h.data(t.form,"validator");return e=i.settings.rules?h.validator.normalizeRule(i.settings.rules[t.name])||{}:e},normalizeRules:function(r,s){return h.each(r,function(t,e){if(!1===e)delete r[t];else if(e.param||e.depends){var i=!0;switch(typeof e.depends){case"string":i=!!h(e.depends,s.form).length;break;case"function":i=e.depends.call(s,s)}i?r[t]=void 0===e.param||e.param:(h.data(s.form,"validator").resetElements(h(s)),delete r[t])}}),h.each(r,function(t,e){r[t]=h.isFunction(e)&&"normalizer"!==t?e(s):e}),h.each(["minlength","maxlength"],function(){r[this]&&(r[this]=Number(r[this]))}),h.each(["rangelength","range"],function(){var t;r[this]&&(h.isArray(r[this])?r[this]=[Number(r[this][0]),Number(r[this][1])]:"string"==typeof r[this]&&(t=r[this].replace(/[\[\]]/g,"").split(/[\s,]+/),r[this]=[Number(t[0]),Number(t[1])]))}),h.validator.autoCreateRanges&&(null!=r.min&&null!=r.max&&(r.range=[r.min,r.max],delete r.min,delete r.max),null!=r.minlength&&null!=r.maxlength&&(r.rangelength=[r.minlength,r.maxlength],delete r.minlength,delete r.maxlength)),r},normalizeRule:function(t){var e;return"string"==typeof t&&(e={},h.each(t.split(/\s/),function(){e[this]=!0}),t=e),t},addMethod:function(t,e,i){h.validator.methods[t]=e,h.validator.messages[t]=void 0!==i?i:h.validator.messages[t],e.length<3&&h.validator.addClassRules(t,h.validator.normalizeRule(t))},methods:{required:function(t,e,i){return this.depend(i,e)?"select"===e.nodeName.toLowerCase()?(i=h(e).val())&&0<i.length:this.checkable(e)?0<this.getLength(t,e):0<t.length:"dependency-mismatch"},email:function(t,e){return this.optional(e)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(t)},url:function(t,e){return this.optional(e)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(t)},date:function(t,e){return this.optional(e)||!/Invalid|NaN/.test(new Date(t).toString())},dateISO:function(t,e){return this.optional(e)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(t)},number:function(t,e){return this.optional(e)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(t)},digits:function(t,e){return this.optional(e)||/^\d+$/.test(t)},minlength:function(t,e,i){t=h.isArray(t)?t.length:this.getLength(t,e);return this.optional(e)||i<=t},maxlength:function(t,e,i){t=h.isArray(t)?t.length:this.getLength(t,e);return this.optional(e)||t<=i},rangelength:function(t,e,i){t=h.isArray(t)?t.length:this.getLength(t,e);return this.optional(e)||t>=i[0]&&t<=i[1]},min:function(t,e,i){return this.optional(e)||i<=t},max:function(t,e,i){return this.optional(e)||t<=i},range:function(t,e,i){return this.optional(e)||t>=i[0]&&t<=i[1]},step:function(t,e,i){function r(t){return(t=(""+t).match(/(?:\.(\d+))?$/))&&t[1]?t[1].length:0}function s(t){return Math.round(t*Math.pow(10,a))}var a,n=h(e).attr("type"),o="Step attribute on input type "+n+" is not supported.",l=new RegExp("\\b"+n+"\\b"),d=!0;if(n&&!l.test(["text","number","range"].join()))throw new Error(o);return a=r(i),(r(t)>a||s(t)%s(i)!=0)&&(d=!1),this.optional(e)||d}
1,equalTo:function(t,e,i){i=h(i);return this.settings.onfocusout&&i.not(".validate-equalTo-blur").length&&i.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){h(e).valid()}),t===i.val()},remote:function(r,s,t,a){if(this.optional(s))return"dependency-mismatch";a="string"==typeof a&&a||"remote";var n,e,o=this.previousValue(s,a);return this.settings.messages[s.name]||(this.settings.messages[s.name]={}),o.originalMessage=o.originalMessage||this.settings.messages[s.name][a],this.settings.messages[s.name][a]=o.message,e=h.param(h.extend({data:r},(t="string"==typeof t?{url:t}:t).data)),o.old===e?o.valid:(o.old=e,(n=this).startRequest(s),(e={})[s.name]=r,h.ajax(h.extend(!0,{mode:"abort",port:"validate"+s.name,dataType:"json",data:e,context:n.currentForm,success:function(t){var e,i=!0===t||"true"===t;n.settings.messages[s.name][a]=o.originalMessage,i?(e=n.formSubmitted,n.resetInternals(),n.toHide=n.errorsFor(s),n.formSubmitted=e,n.successList.push(s),n.invalid[s.name]=!1,n.showErrors()):(e={},t=t||n.defaultMessage(s,{method:a,parameters:r}),e[s.name]=o.message=t,n.invalid[s.name]=!0,n.showErrors(e)),o.valid=i,n.stopRequest(s,i)}},t)),"pending")}}});var r,s={};return h.ajaxPrefilter?h.ajaxPrefilter(function(t,e,i){var r=t.port;"abort"===t.mode&&(s[r]&&s[r].abort(),s[r]=i)}):(r=h.ajax,h.ajax=function(t){var e=("mode"in t?t:h.ajaxSettings).mode,i=("port"in t?t:h.ajaxSettings).port;return"abort"===e?(s[i]&&s[i].abort(),s[i]=r.apply(this,arguments),s[i]):r.apply(this,arguments)}),h}),window.recaptchaParam="",function(r){"use strict";r.each(r.validator.methods,function(t,e){r.validator.methods[t]=function(){return arguments.length&&(arguments[0]=r.trim(arguments[0])),e.apply(this,arguments)}}),r.validator.methods.required=function(t,e,i){return"file"===e.type?r(".files").find(".file_input_alias").length:!!t},jQuery(document).ready(function(t){mbm_form_run()})}(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.