if (self.CavalryLogger) { CavalryLogger.start_js(["a8Eo8"]); } __d("XGroupsRHCSuggestionXoutController",["XController"],(function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/groups\/xout_suggested_group\/",{id:{type:"Int",required:true}});}),null); __d('GroupSuggestionXoutHandler',['csx','AsyncRequest','CSS','DOM','Event','XGroupsRHCSuggestionXoutController'],(function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();var i={onclick:function j(k,l,m){c('Event').listen(k,'click',function(){var n=c('XGroupsRHCSuggestionXoutController').getURIBuilder().setInt('id',l).getURI();new (c('AsyncRequest'))().setURI(n).send();var o=c('DOM').find(document,'#'+m);c('DOM').remove(o);var p=c('DOM').scry(document,"div._1spx");if(p.length===0){var q=c('DOM').find(document,'#GroupsRHCSuggestionSection');if(q!==null)c('DOM').remove(q);}});},hide:function j(k,l){c('Event').listen(l,'mouseover',function(){c('CSS').show(k);});c('Event').listen(l,'mouseleave',function(){c('CSS').hide(k);});}};f.exports=i;}),null); __d('PluginSend',['Arbiter','CSS','DOM','DOMEvent','DOMEventListener','Focus','Plugin','PluginOptin','PluginResize','PopupWindow'],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=3000,i=5000,j=function k(l,m,n,o,p,q,r,s,t){new (c('PluginResize'))(function(){return l.offsetWidth;},function(){return l.offsetHeight;}).resize().auto();if(r!==null){c('DOMEventListener').add(m,'click',y);return;}if(t){c('DOMEventListener').add(m,'click',function(aa){aa=new (c('DOMEvent'))(aa);aa.kill();c('PopupWindow').open(t,340,670);});return;}if(!o){var u=new (c('PluginOptin'))('send').addReturnParams({act:'send'});c('DOMEventListener').add(m,'click',u.start.bind(u));return;}var v=false,w=false,x;function y(){if(s!==null){if(x!==null)clearTimeout(x);var aa=Date.now();x=setTimeout(function(){if(Date.now()-aa0);});function s(){k.reset();n.value='';c('Button').setEnabled(r,false);c('Focus').setWithoutOutline(p);c('Arbiter').inform(c('PluginSend').CLOSE);}c('DOMEventListener').add(o,'submit',function(t){new (c('DOMEvent'))(t).kill();c('FormSubmit').send(o);});c('DOMEventListener').add(q,'click',function(t){new (c('DOMEvent'))(t).kill();s();});c('DOMEventListener').add(q,'keydown',function(t){t=new (c('DOMEvent'))(t);var u=t.event.keyCode||t.event.which;if(u==9&&!t.event.shiftKey){t.preventDefault();c('Focus').set(m);}});c('DOMEventListener').add(m,'keydown',function(t){t=new (c('DOMEvent'))(t);var u=t.event.keyCode||t.event.which;if(u==9&&t.event.shiftKey){t.preventDefault();if(m.getAttribute('aria-expanded')=='true'){m.setAttribute('aria-expanded','false');}else c('Focus').set(q);}});c('DOMEventListener').add(o,'keyup',function(t){t=new (c('DOMEvent'))(t);var u=t.event.keyCode||t.event.which;if(u==27)s();});c('Arbiter').subscribe(c('PluginSend').SUCCESS,s);new (c('PluginResize'))(function(){return Math.max(p.offsetWidth,j.offsetWidth,c('PluginUITypeahead').width());},function(){return Math.max(p.offsetHeight,j.offsetHeight+j.offsetTop,c('PluginUITypeahead').height());},'resize.iframe',false).resize().auto();}});f.exports=h;}),null); __d('legacy:SubmitOnSelectTypeaheadBehavior',['TypeaheadSubmitOnSelect'],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();if(!b.TypeaheadBehaviors)b.TypeaheadBehaviors={};b.TypeaheadBehaviors.submitOnSelect=function(h){h.enableBehavior(c('TypeaheadSubmitOnSelect'));};}),3); __d('TypeaheadShowResultsOnFocus',['Event','Keys'],(function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(i){'use strict';this._typeahead=i;}h.prototype.enable=function(){'use strict';this._typeahead.getCore().resetOnKeyup=false;this._subscription=this._typeahead.subscribe('bootstrap',function(i,j){this.firstFetch(j,this._typeahead.getCore(),this._typeahead.getData());}.bind(this));this._keyUpListener=c('Event').listen(this._typeahead.getCore().getElement(),'keyup',function(event){if(c('Event').getKeyCode(event)==c('Keys').BACKSPACE||c('Event').getKeyCode(event)==c('Keys').DELETE)this.respond(this._typeahead.getCore(),this._typeahead.getData());}.bind(this));this._focusListener=c('Event').listen(this._typeahead.getCore().getElement(),'focus',function(event){this.respond(this._typeahead.getCore(),this._typeahead.getData());}.bind(this));};h.prototype.disable=function(){'use strict';this._typeahead.unsubscribe(this._subscription);this._subscription=null;this._keyUpListener.remove();this._keyUpListener=null;this._focusListener.remove();this._focusListener=null;};h.prototype.firstFetch=function(i,j,k){'use strict';!i.bootstrapping&&this.respond(j,k);};h.prototype.respond=function(i,j){'use strict';if(!i.getValue())this.refreshAndShowNeededResults(i,j);};h.prototype.refreshAndShowNeededResults=function(i,j){'use strict';var k=this.getUidsFromData(j);i.setValue('');var l=j.buildUids(' ',k);j.respond('',l);};h.prototype.getUidsFromData=function(i){'use strict';var j=i.getAllEntries(),k=[];for(var l in j)k.push({uid:j[l].uid,index:j[l].index});k.sort(function(m,n){return m.index-n.index;});return k.map(function(m){return m.uid;});};Object.assign(h.prototype,{_subscription:null,_keyUpListener:null,_focusListener:null});f.exports=h;}),null);