function FormHelper(){FormHelper.prototype.InitOtherComponents=function(){$(".enforce-only-alphanumeric").on("input",function(){RemoveNonAlphaNumericCharacters($(this))});$(".enforce-only-numeric").on("input",function(){RemoveNonNumericCharacters($(this))});$(".enforce-year-format").on("input",function(){RemoveNonNumericCharacters($(this));EnforceMaxLength($(this),4)});$(".enforce-one-digit-format").on("input",function(){RemoveNonNumericCharacters($(this));EnforceMaxLength($(this),1)});$(".enforce-inches-digit-format").on("input",function(){EnforceMaxInches($(this));EnforceMaxLength($(this),2)});$(".enforce-one-to-two-digit-format").on("input",function(){RemoveNonNumericCharacters($(this));EnforceMaxLength($(this),2)});$(".enforce-one-to-three-digit-format").on("input",function(){RemoveNonNumericCharacters($(this));EnforceMaxLength($(this),3)});$(".enforce-no-white-space").on("input",function(){RemoveWhiteSpaceCharacters($(this))})};FormHelper.prototype.RestartValidator=function(){var n=$("#formModalBody").find("form");$.validator.setDefaults({ignore:""});n.removeData("validator");n.removeData("unobtrusiveValidation");$.validator.unobtrusive.parse(n)};FormHelper.prototype.InitKendoAutoComplete=function(n,t){var i=$("#"+n);i.length>0&&i.kendoAutoComplete({filter:"contains",dataSource:JSON.parse($("#"+t).text()),noDataTemplate:""}).data("kendoAutoComplete")};FormHelper.prototype.InitKendoDropDownThumbnail=function(n){var t=$(".kendo-dropdown-thumbnail"),r=JSON.parse($("#"+n).text()),i="# if (data.HexColourCode == null) { #<span class= 'dropdown-thumbnail multicolour-thumbnail'><\/span><span>#: data.Text #<\/span># } else if (data.Text != '') { #<span class= 'dropdown-thumbnail' style='background-color: #:data.HexColourCode#' ><\/span><span>#: data.Text #<\/span> # } #";t.length>0&&t.kendoDropDownList({filter:"contains",dataSource:r,dataTextField:"Text",dataValueField:"ColourId",template:i,valueTemplate:i})};FormHelper.prototype.InitKendoComponents=function(){$(".kendo-dropdown").kendoDropDownList();$(".kendo-dropdown-filter").kendoDropDownList({filter:"contains"});$(".kendo-combobox").kendoComboBox();$(".kendo-currency").kendoNumericTextBox({format:"c",restrictDecimals:!0,spinners:!1});$(".kendo-phonenumber").kendoMaskedTextBox({mask:"(999) 000-0000"});$(".kendo-date").kendoMaskedTextBox({mask:"0000-00-00"});$(function(){$(".k-widget").removeClass("input-validation-error")});$.fn.modal.Constructor.prototype.enforceFocus=function(){$(document).off("focusin.bs.modal").on("focusin.bs.modal",$.proxy(function(n){document===n.target||this.$element[0]===n.target||this.$element.has(n.target).length||$(n.target).closest(".k-popup").is(":visible")||this.$element.trigger("focus")},this))}};FormHelper.prototype.FocusFirstFormInput=function(){IsMobile()||$(document).ready(function(){$(".form-control:first").focus()})};FormHelper.prototype.InitToolTips=function(){$(document).ready(function(){$('[data-toggle="tooltip"]').tooltip()})};FormHelper.prototype.ResetValidationErrors=function(){$(".field-validation-error").each(function(){$(this).removeClass("field-validation-error");$(this).addClass("field-validation-valid");$(this).html("")});$("#validationSummary").addClass("validation-summary-valid");$("#validationSummary").removeClass("validation-summary-errors");$("#validationSummary ul").empty()};FormHelper.prototype.UpdateValidationSummary=function(n){$("#validationSummary").removeClass("validation-summary-valid");$("#validationSummary").addClass("validation-summary-errors");$("#validationSummary").find("ul").append("<li>"+n+"<\/li>")};FormHelper.prototype.ToggleRequiredField=function(n,t,i){n.length!==0&&(t===!0?(n.addClass("required"),n.append("<strong class='required'> ("+i+") <\/strong>")):(n.removeClass("required"),n.children().remove("strong")))};FormHelper.prototype.AddEnforceNumbersAndLettersOnInput=function(n,t){n.on("input",function(){RemoveAllCharactersExceptNumbersAndLetters(n,t)})};FormHelper.prototype.AddEnforceNumbersOnInput=function(n,t){n.on("input",function(){RemoveAllCharactersExceptNumbers(n,t)})}}$("body").on("submit","form",function(){return $(this).submit(function(){return!1}),!0});$(document).ready(function(){const n=13;$(window).keydown(function(t){t.keyCode===n&&$(t.target).hasClass("preventDefaultSubmit")&&t.preventDefault()})})