text: "use strict";!function(t,i,s,e){var o="emailautocomplete",n={suggClass:"eac-sugg",domains:["yahoo.com","hotmail.com","gmail.com","me.com","aol.com","mac.com","live.com","comcast.net","googlemail.com","msn.com","hotmail.co.uk","yahoo.co.uk","facebook.com","verizon.net","sbcglobal.net","att.net","gmx.com","outlook.com","icloud.com"]};function l(i,s){this.$field=t(i),this.$container=t(i).parent(".input-group"),this.options=t.extend(!0,{},n,s),this._defaults=n,this._domains=this.options.domains,this.init()}l.prototype={init:function(){Array.prototype.indexOf||this.doIndexOf(),this.fieldLeftOffset=null;var i=t("<div class='eac-input-wrap' />").css({display:this.$field.css("display"),position:"absolute",fontSize:this.$field.css("fontSize"),zIndex:1999,left:(this.$field.outerWidth(!0)-this.$field.width())/2-13.2188+"px"});this.$container.append(i),this.$cval=t("<span class='eac-cval' />").css({visibility:"hidden",position:"absolute",display:"inline-block",fontFamily:this.$field.css("fontFamily"),fontWeight:this.$field.css("fontWeight"),letterSpacing:this.$field.css("letterSpacing")}).insertAfter(this.$field);var s=(this.$field.outerHeight(!0)-this.$field.height())/2;this.$suggOverlay=t("<span class='"+this.options.suggClass+"' />").css({display:"block","box-sizing":"content-box",lineHeight:this.$field.css("lineHeight"),paddingTop:s+0+"px",paddingBottom:s-2+"px",fontFamily:this.$field.css("fontFamily"),fontWeight:this.$field.css("fontWeight"),letterSpacing:this.$field.css("letterSpacing"),position:"absolute",top:0,left:0}),this.$container.children(".eac-input-wrap").append(this.$suggOverlay),this.$field.on("keyup.eac",t.proxy(this.displaySuggestion,this)),this.$field.on("blur.eac",t.proxy(this.autocomplete,this)),this.$field.on("keydown.eac",t.proxy(function(t){39!==t.which&&9!==t.which||this.autocomplete()},this)),this.$suggOverlay.on("mousedown.eac touchstart.eac",t.proxy(this.autocomplete,this))},suggest:function(t){var i=t.split("@");return i.length>1&&(t=i.pop()).length?(this._domains.filter(function(i){return 0===i.indexOf(t)}).shift()||"").replace(t,""):""},autocomplete:function(){if(void 0===this.suggestion||this.suggestion.length<1)return!1;this.$field.val(this.val+this.suggestion),this.$suggOverlay.text(""),this.$cval.text("")},displaySuggestion:function(t){this.val=this.$field.val(),this.suggestion=this.suggest(this.val),this.suggestion.length?t.preventDefault():this.$suggOverlay.text(""),this.$suggOverlay.text(this.suggestion),this.$cval.text(this.val),null===this.fieldLeftOffset&&(this.fieldLeftOffset=(this.$field.outerWidth(!0)-this.$field.width())/2);var i=this.$cval.width();this.$field.outerWidth()>i&&this.$suggOverlay.css("left",this.fieldLeftOffset+i+"px")},doIndexOf:function(){Array.prototype.indexOf=function(t,i){if(void 0===this||null===this)throw new TypeError('"this" is null or not defined');var s=this.length>>>0;for(i=+i||0,Math.abs(i)===1/0&&(i=0),i<0&&(i+=s)<0&&(i=0);i<s;i++)if(this[i]===t)return i;return-1}}},t.fn[o]=function(i){return this.each(function(){t.data(this,"yz_"+o)||t.data(this,"yz_"+o,new l(this,i))})}}(jQuery,window,document);