/*!CK:2844510020!*//*1401211073,178171423*/ if (self.CavalryLogger) { CavalryLogger.start_js(["ECa9c"]); } __d("DocumentMentionsRegex",[],function(a,b,c,d,e,f){var g='\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\\/!%&\'"~=<>_:;',h='\\b[A-Z][^\\s'+g+']',i={PUNCTUATION:g,NAME:h};e.exports=i;},null); __d("AtSignMentionsStrategy",["DocumentMentionsRegex"],function(a,b,c,d,e,f,g){var h=g.PUNCTUATION,i=['@','\\uff20'].join(''),j='[^'+i+h+'\\s]',k='(?:'+'\\.[ |$]|'+' |'+'['+h+']|'+')',l=new RegExp('(?:^|\\s)('+'['+i+']'+'((?:'+j+k+'){0,20})'+')$'),m={findMentionableString:function(n){var o=l.exec(n);if(o!==null){var p=o[2];if(p.length)return {matchingString:p,leadOffset:o[1].length};}return null;}};e.exports=m;},null); __d("CapitalizedNameMentionsStrategy",["DocumentMentionsRegex"],function(a,b,c,d,e,f,g){var h=3,i=new RegExp('(?:'+g.NAME+'{'+h+',})$'),j={findMentionableString:function(k){var l=i.exec(k);if(l!==null)return {matchingString:l[0],leadOffset:l[0].length};return null;}};e.exports=j;},null); __d("DocumentCompositeMentionsSource",["emptyFunction","invariant"],function(a,b,c,d,e,f,g,h){function i(k,l){var m=k.getEntities(),n=l;while(m[n-1]===null)n--;return k.getText().slice(n,l);}function j(k){"use strict";h(k.length>0);this.$DocumentCompositeMentionsSource0=k;this.$DocumentCompositeMentionsSource1=false;this.$DocumentCompositeMentionsSource2=null;}j.prototype.bootstrap=function(k){"use strict";if(this.$DocumentCompositeMentionsSource1)return;this.$DocumentCompositeMentionsSource1=true;k=k||g;var l=this.$DocumentCompositeMentionsSource0.length;function m(){l--;if(!l)k();}this.$DocumentCompositeMentionsSource0.forEach(function(n){n.bootstrap(m);});};j.prototype.search=function(k,l,m){"use strict";var n=this.$DocumentCompositeMentionsSource0.length,o=i(k,l),p,q;for(var r=0;r=5||s(t,u));}function r(t){var u=t.getAuxiliaryData();return !u.disableAutosuggest&&!!(t.getType()==='user'||u.connectedPage);}function s(t,u){return m.isExactMatch(u,t.getTitle());}e.exports=p;},null); __d("TypeaheadMetricCounter",["copyProperties"],function(a,b,c,d,e,f,g){function h(){"use strict";this.reset();}h.prototype.reset=function(){"use strict";this.stats={};this.avgStats={};};h.prototype.recordStat=function(i,j){"use strict";this.stats[i]=j;};h.prototype.recordCountStat=function(i){"use strict";var j=this.stats[i];this.stats[i]=j?j+1:1;};h.prototype.recordAvgStat=function(i,j){"use strict";if(this.avgStats[i]){this.avgStats[i][0]+=j;this.avgStats[i][1]+=1;}else this.avgStats[i]=[j,1];};h.prototype.hasStats=function(){"use strict";return !!Object.keys(this.stats).length;};h.prototype.getStats=function(){"use strict";var i=g({},this.stats);for(var j in this.avgStats){var k=this.avgStats[j];i[j]=k[0]/k[1];}return i;};e.exports=h;},null); __d("TypeaheadMetricReporter",["AsyncRequest","TypeaheadMetricCounter","mixInEventEmitter","copyProperties"],function(a,b,c,d,e,f,g,h,i,j){var k='/ajax/typeahead/record_basic_metrics.php';function l(m){"use strict";this.counter=new h();this.extraData=m;this.bootstrapped=null;this.bootstrapBegin=null;this.lastQuery=null;this.$TypeaheadMetricReporter0();}l.prototype.sessionStart=function(){"use strict";this.sessionActive=true;};l.prototype.sessionEnd=function(){"use strict";if(this.sessionActive){this.$TypeaheadMetricReporter1();this.$TypeaheadMetricReporter0();this.sessionActive=false;}};l.prototype.reportSelect=function(m,n,o,p,q){"use strict";q=q==null?this.lastQuery:q;this.counter.recordStat('selected_id',m||'SELECT_NULL');this.counter.recordStat('selected_type',n);this.counter.recordStat('selected_position',o);this.counter.recordStat('selected_with_mouse',p?1:0);this.counter.recordStat('selected_query',q);};l.prototype.reportBootstrapBegin=function(){"use strict";this.bootstrapBegin=Date.now();};l.prototype.reportBootstrapDirty=function(){"use strict";this.bootstrapped=false;};l.prototype.reportBootstrapComplete=function(m){"use strict";this.counter.recordAvgStat('bootstrap_latency',Date.now()-this.bootstrapBegin);var n={};m.forEach(function(o){n[o]=(n[o]||0)+1;});this.counter.recordStat('bootstrap_response_types',n);this.bootstrapped=true;};l.prototype.reportQueryBegin=function(m){"use strict";this.counter.recordStat('query',m);this.counter.recordCountStat('num_queries');this.lastQuery=m;};l.prototype.reportQueryComplete=function(m,n){"use strict";this.counter.recordAvgStat('avg_query_latency',m);if(typeof n!='undefined')this.counter.recordStat('filtered_count',n);};l.prototype.reportResults=function(m){"use strict";this.results=m;};l.prototype.$TypeaheadMetricReporter0=function(){"use strict";this.sid=Math.floor(Date.now()*Math.random());this.results=null;this.counter.reset();this.emit('reset',{sid:this.sid});};l.prototype.$TypeaheadMetricReporter2=function(){"use strict";var m={};for(var n in this.extraData){var o=this.extraData[n];m[n]=typeof o==='function'?o():o;}return m;};l.prototype.$TypeaheadMetricReporter1=function(){"use strict";if(this.counter.hasStats()){if(this.results)this.counter.recordStat('candidate_results',JSON.stringify(this.results));if(this.sid)this.counter.recordStat('sid',this.sid);if(this.bootstrapped)this.counter.recordStat('bootstrapped',1);var m=j(this.counter.getStats(),this.$TypeaheadMetricReporter2());new g().setURI(k).setMethod('POST').setData({stats:m}).send();this.emit('submitted',m);}};i(l,{reset:true,submitted:true});e.exports=l;},null);