1var loginController={loginModal:$("#loginModal"),elForm:$("#loginModal form"),email:"",password:"",callback:false,init:function(){loginController.elForm.submit(function(){loginController.submitForm();return false});loginController.elForm.find("#btnForgotPass").click(function(){loginController.loginModal.modal("hide");$("#forgotModal").modal("show");return false});loginController.email=loginController.elForm.find("input#input-mail").val().trim();loginController.password=loginController.elForm.find("input#input-password").val().trim();loginController.elForm.find("input#input-mail").on("click change keyup keydown blur input",function(){loginController.email=$(this).val().trim()});loginController.elForm.find("input#input-password").on("click change keyup keydown blur input",function(){loginController.password=$(this).val().trim()});loginController.elForm.find("button").click(function(){loginController.elForm.submit()});loginController.loginModal.find("#signShowBtn").click(function(){loginController.loginModal.modal("hide");$("#signModal").modal("show");return false})},submitForm:function(){if(!loginController.validateForm()){loginController.showError();return false}$.post(loginController.elForm.attr("action"),loginController.elForm.serialize(),function(a){if(a.success){loginController.loginModal.modal("hide");$(".right-head .show-logout").first().before(a.content);$(".right-head .show-logout").remove();if(loginController.callback){loginController.callback();loginController.callback=false}else{window.location.reload()}}else{loginController.showError()}})},validateForm:function(){loginController.clearForm();var a=/^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;return(loginController.email.length>3&&a.test(loginController.email)&&loginController.password.length>5)},clearForm:function(){loginController.elForm.find(".form-group").removeClass("has-error")},showError:function(){loginController.elForm.find(".form-group").addClass("has-error")}};$(function(){loginController.init()}); 2var regController={modal:$("#signModal"),elForm:$("#signModal form"),email:"",password:"",firstName:"",lastName:"",city:"",placeId:"",countryId:"",confirmRule:false,componentValue:{street_number:"",route:"",locality:"",administrative_area_level_1:"",country:"",countryId:"",postal_code:""},componentForm:{street_number:"short_name",route:"long_name",locality:"long_name",administrative_area_level_1:"short_name",country:"long_name",countryId:"short_name",postal_code:"short_name"},init:function(){regController.initAutocomplete();regController.elForm.submit(function(){regController.submitForm();return false});regController.elForm.find("input").not("#userbundle_user_city").change(function(){regController.email=regController.elForm.find("input#userbundle_user_email").val().trim();regController.password=regController.elForm.find("input#userbundle_user_password").val().trim();regController.firstName=regController.elForm.find("input#userbundle_user_firstName").val().trim();regController.lastName=regController.elForm.find("input#userbundle_user_lastName").val().trim();regController.city=regController.elForm.find("input#userbundle_user_city").val().trim();regController.placeId=regController.elForm.find("input#userbundle_user_cityId").val().trim();regController.countryId=regController.elForm.find("input#userbundle_user_country").val().trim();regController.confirmRule=false;if(regController.elForm.find("input#userbundle_user_confirmRule").prop("checked")){regController.confirmRule=true}});regController.elForm.find("button").click(function(){regController.elForm.submit()});regController.modal.find("#loginShowBtn").click(function(){regController.modal.modal("hide");$("#loginModal").modal("show");return false});$("#userbundle_user_city").bind("keyup",function(){$(this).val($(this).val().replace(/[^a-z ]/i,""))})},submitForm:function(){if(!regController.validateForm()){return false}$.post(regController.elForm.attr("action"),regController.elForm.serialize(),function(a){if(a.success){regController.modal.modal("hide");if(typeof getThanksPage()!=="undefined"){changeThanksPage(getThanksPage())}ga("send","pageview",THANKS_PAGE_NAME);ga("send","event",{eventCategory:"Sign Up",eventAction:"Click",eventLabel:"Sign Up"});window._fbq.push("track","CompleteRegistration");goog_report_conversion("https://foodietrip.com"+THANKS_PAGE_NAME);setTimeout(function(){window.location.reload()},100)}else{if(a.errors){$.each(a.errors,function(c,b){regController.showError(regController.elForm.find("input#userbundle_user_"+c),b)})}}})},validateForm:function(){regController.clearForm();var a=/^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;if(!a.test(regController.email)){regController.showError(regController.elForm.find("input#userbundle_user_email"),"Please, enter valid email")}if(regController.password.length<6){regController.showError(regController.elForm.find("input#userbundle_user_password"),"Password should contains at least 6 characters")}if(regController.firstName.length<1){regController.showError(regController.elForm.find("input#userbundle_user_firstName"),"First Name empty")}if(regController.lastName.length<1){regController.showError(regController.elForm.find("input#userbundle_user_lastName"),"Last Name empty")}if(regController.confirmRule==false){regController.showError(regController.elForm.find("input#userbundle_user_confirmRule"))}if(regController.elForm.find(".has-error").length>0){return false}return true},clearForm:function(){console.log("clear form");regController.elForm.find(".form-group").removeClass("has-error")},showError:function(b,a){b.closest(".form-group").addClass("has-error");
2if(a){b.closest(".form-group").find("span.error-text").html(a)}},initAutocomplete:function(){var c=document.getElementById("userbundle_user_city");var a={types:["(regions)"]};var b=new google.maps.places.Autocomplete(c,a);b.addListener("place_changed",function(){var d=b.getPlace();regController.placesChanged(d)})},placesChanged:function(a){if(!a){return}for(var c=0;c<a.address_components.length;c++){var b=a.address_components[c].types[0];if(regController.componentForm[b]){var d=a.address_components[c][regController.componentForm[b]];regController.componentValue[b]=d;if(b==="country"){regController.componentValue.countryId=a.address_components[c][regController.componentForm.countryId]}}}$("#userbundle_user_city").val(regController.componentValue.locality+", "+regController.componentValue.country);$("#userbundle_user_country").val(regController.componentValue.countryId);$("#userbundle_user_cityId").val(a.place_id)}};$(function(){regController.init()}); 3var forgotController={modal:$("#forgotModal"),elForm:$("#forgotModal form"),email:"",init:function(){forgotController.elForm.submit(function(){forgotController.submitForm();return false});forgotController.elForm.find("button").click(function(){forgotController.elForm.submit()});forgotController.elForm.find("input#form_email").keyup(function(){forgotController.email=$(this).val().trim()});forgotController.modal.find(".loginShowBtn").click(function(){forgotController.modal.modal("hide");$("#loginModal").modal("show");return false})},submitForm:function(){if(!forgotController.validateForm()){forgotController.showError();return false}$.post(forgotController.elForm.attr("action"),forgotController.elForm.serialize(),function(a){if(a.success){forgotController.modal.modal("hide");$("#thanksForForgot").modal("show")}else{forgotController.showError()}})},validateForm:function(){forgotController.clearForm();var a=/^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;return(forgotController.email.length>3&&a.test(forgotController.email))},clearForm:function(){forgotController.elForm.find(".form-group").removeClass("has-error")},showError:function(){forgotController.elForm.find(".form-group").addClass("has-error")}};$(function(){forgotController.init()});
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.