var Footer;(function(n){var t=function(){function n(n,t){var i=this,r;this.jqueryElement=n;this.parm=t;r="."+this.parm.ajaxMenuItemClass;jQuery(n).find(r).each(function(t,r){jQuery.ajax({type:"GET",url:jQuery(r).attr("data-ajax-url")}).fail(function(){jQuery("[data-selector='loader']").hide()}).done(function(t){jQuery(r).html(t);jQuery(r).removeClass("ajaxmenuitem");r.children[0].classList.contains("newslettersubscribe-component")&&(i.email=ko.observable(""),i.formSubmitted=ko.observable(!1),i.showIsRequired=ko.observable(!1),i.showIsWrongFormat=ko.observable(!1),ko.applyBindings(i,n[0]))})});jQuery(this.jqueryElement).on("keyup","[data-selector='subscribe-email-box']",function(n){return i.onSubscribeEmailBoxKeypress(n)})}return n.prototype.handleSubscribe=function(){var n=this;Components.EmailValidationHelper.validateEmailAndUpdateObservableTextValidation(this.email(),this.showIsRequired,this.showIsWrongFormat)&&(this.jqueryElement.find("[data-selector='submit-form-loader']").show(),Components.Marketo.NewsletterSubscribeFormHelper.submitNewsletterSubscribeForm(this.email(),"NewsletterSubscribe",this.parm.subscribedTo,function(){n.jqueryElement.find("[data-selector='submit-form-loader']").hide();n.formSubmitted(!0)}))},n.prototype.onSubscribeEmailBoxKeypress=function(n){n.keyCode===13&&this.handleSubscribe()},n}();n.Footer=t})(Footer||(Footer={}))