/*!CK:18328741!*//*1403688549,*/ if (self.CavalryLogger) { CavalryLogger.start_js(["mgs9l"]); } __d("NodeHighlighter",["concatMap","createArrayFrom","escapeRegex","TokenizeUtil","DOM"],function(a,b,c,d,e,f,g,h,i,j,k){var l={};function m(p,q){var r=k.getText(p).split(q),s=r.map(function(t){if(q.test(t))return n(t);return t||'';});return r.length>1?s:null;}function n(p){var q=k.create('span',{'class':'highlightNode',className:'highlightNode'},p);return q;}var o={getTextNodes:function(p){if(this.isLeafNode(p)||this.isStopNode(p)){return p;}else if(this.isDiscardNode(p))return [];return g(this.getTextNodes.bind(this),h(p.childNodes));},getHighlightCandidates:function(){return [];},isLeafNode:function(p){return k.isTextNode(p);},isStopNode:function(p){return false;},isDiscardNode:function(p){return false;},createSegmentedRegex:function(p){var q=j.getPunctuation();p=this.escapeAndAddBidirectionalCharsToTokens(p);return '(^|\\s|'+q+')('+p.join('|')+')(?=(?:$|\\s|'+q+'))';},createNonSegmentedRegex:function(p){return '('+p.map(i).join('|')+')';},escapeAndAddBidirectionalCharsToTokens:function(p){var q='[\\u200E\\u200F\\u202A\\u202B\\u202C\\u202D\\u202E]*';return p.map(function(r){return q+String(r).split('').map(i).join(q)+q;});},createRegex:function(p){p=p.filter(function(w){return w;});if(!p||p.length===0)return new RegExp(null);var q=p.join('|');if(l[q])return l[q];var r=/[\u0E00-\u109F\u2000-\uFFFF]/,s=[],t=[];p.forEach(function(w){if(r.test(w)){t.push(w);}else s.push(w);});var u='';if(s.length){u+=this.createSegmentedRegex(s);u+=(t.length)?'|':'';}if(t.length)u+=this.createNonSegmentedRegex(t);var v=new RegExp(u,'i');l[q]=v;return v;},searchNodes:function(p,q){return k.scry(p,q);},highlight:function(p,q){q=q.filter(function(t){return t;});if(!q||q.length===0||!p)return;var r=g(function(t){return g(this.getTextNodes.bind(this),this.searchNodes(p,t));}.bind(this),this.getHighlightCandidates()),s=this.createRegex(q);r.forEach(function(t){var u=m(t,s);if(u)if(this.isStopNode(t)){k.setContent(t,u);}else k.replace(t,u);}.bind(this));}};e.exports=o;},null); __d("BrowseFacebarHighlighter",["copyProperties","CSS","csx","NodeHighlighter"],function(a,b,c,d,e,f,g,h,i,j){var k={};g(k,j,{getHighlightCandidates:function(){return ["._53ad"];},isDiscardNode:function(l){return h.hasClass(l,'DefaultText');},createSegmentedRegex:function(l){l=this.escapeAndAddBidirectionalCharsToTokens(l);return '(^|\\s|\\b)('+l.join('|')+')';}});e.exports=k;},null); __d("BrowseLogger",["Banzai","copyProperties","mapObject","Run"],function(a,b,c,d,e,f,g,h,i,j){var k='browse',l='browse_aggr',m=null,n={},o={},p=function(x){if(x==null)return 'undefined';var y=x.tagName.toLowerCase(),z=x.id,aa=x.className;if(z)y+='#'+z;if(aa)y+='.'+aa;return y;};function q(){m=null;n={};o={};}function r(x){h(x,{clientSessionID:m});return x;}function s(x){g.post(k,r(x));}function t(){if(m===null)return;o.aggregated=n;g.post(l,r(o));q();}function u(x){n[x]=(n[x]||0)+1;}function v(x){h(o,x);}j.onUnload(t);var w={newSession:function(){t();m=Math.random().toString();if(!o.start_time)o.start_time=Math.round(Date.now()/1000);},logResultClick:function(x,y,z,aa){var ba={action:'result_click',click_type:x.ct||'result',section:x.section||'unknown',id:x.id||0,path:x.path||'unknown',rank:x.rank||0,referrer:x.referrer||'unknown',result_type:x.result_type||'unknown',session_id:x.session_id||0,query_time:x.query_time,abtest_version:x.abtest_version||'NONE',abtest_params:x.abtest_params,typeahead_sid:x.typeahead_sid||'',result_title:x.result_title||'unknown',result_href:x.result_href||'unknown',result_semantic:x.result_semantic||'unknown',type:x.experience_type||'unknown',click_action:z,sub_id:x.sub_id,owner_id:x.owner_id,browse_location:x.browse_location||'unknown',query_data:x.query_data||'unknown',is_headline:x.is_headline||false};if(y.tn)ba.tn=y.tn;if(x.cst)ba.click_subtype=x.cst;u('result_click_'+ba.click_type);v({path:ba.path,referrer:ba.referrer,result_type:ba.result_type,session_id:ba.session_id,abtest_version:ba.abtest_version,abtest_params:ba.abtest_params,typeahead_sid:ba.typeahead_sid});s(ba);if(!x.id)s({action:'logging_error',click_action:z,click_type:ba.click_type,attributes:JSON.stringify(x),element:i({srcElement:aa.srcElement,target:aa.target,toElement:aa.toElement},p),event:{button:aa.button,clientX:aa.clientX,clientY:aa.clientY,ctrlKey:aa.ctrlKey,layerX:aa.layerX,layerY:aa.layerY,offsetX:aa.offsetX,offsetY:aa.offsetY,pageX:aa.pageX,pageY:aa.pageY,screenX:aa.screenX,screenY:aa.screenY,shiftKey:aa.shiftKey,type:aa.type,x:aa.x,y:aa.y}});},logControlsClick:function(x,y){var z={action:'controls_click',click_type:y,path:x.path||'unknown',referrer:x.referrer||'unknown',session_id:x.session_id||0,query_time:x.query_time,filter_name:x.name||'unknown',typeahead_sid:x.typeahead_sid||'',result_type:x.result_type||'unknown',type:x.experience_type||'unknown'};if(x.cst)z.click_subtype=x.cst;u('controls_click_'+y);v({path:z.path,referrer:z.referrer,session_id:z.session_id,typeahead_sid:z.typeahead_sid});s(z);},logResultHover:function(x,y){var z={action:'result_hover',id:x.id||0,path:x.path||'unknown',rank:x.rank,result_type:x.result_type||'unknown',session_id:x.session_id||0,query_time:x.query_time,time_elapsed:y,typeahead_sid:x.typeahead_sid||0,type:x.experience_type||'unknown'};u('result_hover');v({path:z.path,session_id:z.session_id,typeahead_sid:z.typeahead_sid});s(z);},logScroll:function(x,y,z,aa){var ba={action:'scroll',encoded_query:x,fragments:y,position:z,session_id:aa||0};s(ba);},logNUXStep:function(x){var y={action:'nux_step',step:x};s(y);},logDisambiguationImpression:function(x,y,z,aa,ba){var ca={action:'disambiguation_imp',ids:aa,name:x,path:z,type:y,typeahead_sid:ba};s(ca);},logDisambiguationClick:function(x,y,z,aa,ba,ca){var da={action:'disambiguation_clk',id:ba,index:aa,name:x,path:z,type:y,typeahead_sid:ca};s(da);}};e.exports=w;},null); __d("StaticContainer.react",["React","onlyChild"],function(a,b,c,d,e,f,g,h){var i=g.createClass({displayName:'StaticContainer',shouldComponentUpdate:function(j){return !!j.shouldUpdate;},render:function(){return h(this.props.children);}});e.exports=i;},null); __d("TypeaheadFacepileX.react",["React"],function(a,b,c,d,e,f,g){var h=g.createClass({displayName:'TypeaheadFacepile',renderPic:function(i,j){return (g.DOM.span({className:'splitpic '+j},g.DOM.img({alt:"",src:i})));},renderPics:function(){var i=this.props.photos,j=this.props.size;if(j>=3){return [this.renderPic(i[0],'leftpic'),this.renderPic(i[1],'toppic'),this.renderPic(i[2],'bottompic')];}else return [this.renderPic(i[0],'leftpic'),this.renderPic(i[1],'')];},render:function(){return this.transferPropsTo(g.DOM.span({className:"splitpics clearfix"},this.renderPics()));}});e.exports=h;},null); __d("clip",[],function(a,b,c,d,e,f){function g(h,i,j){return Math.min(Math.max(h,i),j);}e.exports=g;},null); __d("FacebarSemanticQuery",["CurrentUser","URI","copyProperties"],function(a,b,c,d,e,f,g,h,i){var j='str',k=/\*[\w\-]+\(/g;function l(v){var w={me:g.getID()};return i(w,v.semantic_map);}function m(v,w){var x=l(v);if(typeof x[w]!=='undefined')return String(x[w]);return w;}function n(v){return new h("/profile.php").addQueryData({id:v});}function o(v,w){var x=[w],y=[],z=v.browse_functions,aa=v.search_path;while(x.length>0){var ba=x.pop();if(!r(ba)){y.push(ba);continue;}var ca=ba.substring(0,ba.indexOf('(')),da=ca,ea=s(ba);if(!z[ca]){y=[];break;}var fa=z[ca].minNumParams,ga=z[ca].maxNumParams;if(x.length>0)if(z[ca].numParamsUnbounded){if(y.length>0)ca+='-'+ea.length;}else if((ea.length!=1&&ea.length>fa)||(ea.length===0&&fa!=ga))ca+='-'+ea.length;x.push(ca);for(var ha=0;ha0)y=[x[0]];var z=[],aa=v.browse_functions,ba=v.search_path;while(y.length>0){var ca=y.pop();if(typeof(ca)!=='object'){z.push(p(ca));continue;}var da=Object.keys(ca)[0],ea=da,fa=ca[da];if(!aa[da]){z=[];break;}var ga=aa[da].minNumParams,ha=aa[da].maxNumParams;if(y.length>0)if(aa[da].numParamsUnbounded){if(z.length>0)da+='-'+fa.length;}else if((fa.length!=1&&fa.length>ga)||(fa.length===0&&ga!=ha))da+='-'+fa.length;y.push(da);for(var ia=0;iai.default_cost)--w;if(r.type!==i.result_type)continue;u.backendCost=r.cost+i.exact_match_cost_delta_from_best;u.cost=r.backendCost;l(o);o.splice(s,0,u);return;}l(o);o.splice(Math.min(Math.min(v,p-1),w),0,u);},getExactMatchKeywordResult:function(n){if(!n||n.is_empty||!n.raw_text)return;var o=n.raw_text.toLowerCase().replace(/\s{2,}/g,' ').trim(),p=i.query_prefix_blacklist;for(var q=0;q=0||t.tokens.length===0)&&!t.isTypeNamedXBootstrap)return null;var v;if(!!t.isTypeNamedXBootstrap){if(s.raw_text!==null){v=t.ext_text+u;}else if(s.tokens.length!==0&&s.tokens[0].text){v=s.tokens[0].text;}else return null;}else if(t.tokens[t.tokens.length-1].length!==0){v=t.ext_text+u;}else v=t.ext_text+" "+u;if(v.length===0)return null;t.ext_node.text=v;t.parse.entTokens=[v];t.parse.suffix="";this._extractStructure(t);if(!this._punctRegexp)this._punctRegexp=new RegExp(p.getPunctuation(),'g');t.semantic=t.ext_semantic.replace('(ext_string)','('+v.replace(this._punctRegexp,"")+')');t.isExtendedResult=true;return t;};r.prototype.getResults=function(s,t){"use strict";if(s.tokens.length===0||(s.tokens.length==1&&s.tokens[0]===''))return {results:this.facebarConfig.null_state||[],null_state:true};var u=this._getBestQueryCache(s.cache_id),v=u.results,w={},x=this._getBootstrapMatchByType(s.tokens,w),y=this._addMatchingBootstrapResults(s,x[0]||{});Array.prototype.push.apply(y,h(this._getResultsFromCache.bind(this,x,s),v));var z={},aa=[],ba=false,ca=0;y.sort(this._sortFunction);if(i.keywordSearchEnabled)k.addExactMatch(s,y,t);y.forEach(function(da){var ea=n.fromStruct(da.structure);if(ea.hasType('blank')){aa.push(da);return;}da.semantic=da.semantic.toLowerCase();if(!da.termMatches)da.termMatches=w[da.semantic];var fa=r.getUniqueSemantic(da.semantic),ga=r.getUniqueSemantic(da.alternateSemantic);if(!fa)return;var ha=z[fa]||(ga&&z[ga]);if(ha){if(da.isJSBootstrapMatch){ha.isJSBootstrapMatch=true;ha.bootstrapCost=da.bootstrapCost;}else if(ha.isJSBootstrapMatch&&da.backendCost!==undefined&&ha.backendCost===undefined)ha.backendCost=da.backendCost;if(!!da.tags)g(ha.tags,da.tags);return;}if(ba&&da.blankFilled)return;if(da.type.indexOf('browse_type')>=0){ca+=1;if(this.facebarConfig.maxGrammarResults!==undefined&&ca>this.facebarConfig.maxGrammarResults)return;}ba=ba||!!da.blankFilled;z[fa]=da;if(ga)z[ga]=da;aa.push(da);},this);return {results:aa,webSuggOnTop:u.webSuggOnTop,webSuggLimit:u.webSuggLimit,webSuggLimitSeeMore:u.webSuggLimitSeeMore};};r.prototype.saveResults=function(s,t,u,v,w){"use strict";s=s.map(this._processBackendResult,this);var x=[],y={},z={};s.forEach(function(ba){z[ba.semantic]=true;ba.parse&&ba.parse.disambiguation&&ba.parse.disambiguation.forEach(function(ca){var da=m.semanticForestConversion(ca);y[da]=true;});});var aa=this._getBestQueryCache(t.cache_id);aa.results.forEach(function(ba){if(ba.type==='websuggestion')return;if(ba.exactMatchKeyword)return;if(ba.isExtendedResult)return;if(ba.semantic in y)return;var ca=this._getDifferenceArrayTokens(ba.tokens,t.tokens),da=this._getNumTokensMatching(ca,ba);da=this._tryMatchingFinalInsertedEntity(ca,da,ba);if(da>0&&da==ca.length){ba.cacheOnlyResult=!z[ba.semantic];x.push(ba);}},this);s.forEach(function(ba){ba.tokens=t.tokens;ba.cache_id_length=t.cache_id.length;if(!!ba.isTypeNamedXBootstrap)++ba.cache_id_length;x.push(ba);},this);if(w)Array.prototype.push.apply(x,w);if(this.queryCache[t.cache_id]===undefined)this.queryCache[t.cache_id]={};g(this.queryCache[t.cache_id],{tokens:t.tokens,results:x,incomplete:u});g(this.queryCache[t.cache_id],v);};r.prototype.alreadyKnown=function(s){"use strict";return !!this.queryCache[s]&&!this.queryCache[s].incomplete;};r.prototype.stripBrackets=function(s){"use strict";return s.replace(/^[\[\{]/,'').replace(/[\]\}]$/,'');};r.prototype._extractStructure=function(s){"use strict";function t(w,x,y){return {type:w==='ent:extend_string'?'text':w,text:x,uid:y||null};}function u(w,x){w.split(' ').forEach(function(y){if(y!==''){if(x)s.chunks.push(s.structure.length);s.structure.push(t('text',y));}s.structure.push(t('text',' '));});s.structure.pop();}function v(w){if(s.structure.length!==0||j.nonGrammarTypes[s.type])return w;return w.charAt(0).toUpperCase()+w.substr(1);}s.structure=[];s.chunks=[];s.parse.display.forEach(function(w){if(typeof w==='string'){u(v(w),true);}else if(w.type==='ent:extend_string'){u(w.text,true);}else if(w.uid){var x=this.getEntry(w.uid,w.fetchType);s.chunks.push(s.structure.length);if(x==null)throw new Error('No entry found for uid \"'+w.uid+'\", type \"'+w.fetchType+'\" and piece text \"'+w.text+'\"');if(x.grammar_like){u(v(x.text),false);}else{var y=w.type;if(w.fetchType)y+=':'+w.fetchType;s.structure.push(t(y,x.text,w.uid));}}else if(w.type=='blank'){s.chunks.push(s.structure.length);s.structure.push(t(w.type,'...'));}},this);return s;};r.prototype._getDifferenceArrayTokens=function(s,t){"use strict";if(!s.length)return [''].concat(t);var u=s.length-1,v=s[u];if(v==='')v=s[--u];var w='';if(typeof(v)=='string'&&u0){u.disambiguation=u.disambiguation.filter(function(z){return z.indexOf('['+x+']')!==-1;});u.unsubstituted_disambiguation=u.disambiguation.splice(0);u.disambiguation=u.disambiguation.map(function(z){return z.replace(y,x);});}}}}s.semantic=s.semantic.replace(/\[(.*)\]/g,'$1');s.tuid=JSON.stringify({semantic:s.semantic,structure:s.structure});return s;};r.prototype._sortFunction=function(s,t){"use strict";return (s.cost||0)-(t.cost||0);};r.prototype._getResultsFromCache=function(s,t,u){"use strict";var v=t.tokens,w=this._getDifferenceArrayTokens(u.tokens,v),x=[],y=this._getNumTokensMatching(w,u),z=this._tryMatchingFinalInsertedEntity(w,y,u);if(u.parse.extendable||u.isExtendedResult){var aa=this.extendResult(t,u);if(aa)x.push(aa);if(u.isExtendedResult)return x;}if(z>0&&z==w.length&&!(u.type===o.result_type&&w.length===1&&w[0]==='"'))x.push(u);return x;};r.prototype._addMatchingBootstrapResults=function(s,t){"use strict";var u=s.tokens;return h(function(v){var w=t[v];if(w===undefined)return [];var x=[];w.forEach(function(y){var z=this.getEntry(y,v);if(!this._isTitleTermMatch(u,z)&&!this._isAliasMatch(s.raw_text,z))return;var aa=(this._isExactNameMatch(u,z)||this._isAliasMatch(s.raw_text,z))?0:this.facebarConfig.non_title_term_match_penalty,ba=this._isNonGrammarTermMatch(u,z),ca=z.grammar_costs['{'+v+'}']+aa+this.facebarConfig.entity_cost+this.facebarConfig.grammar_stop_words_penalty*!ba,da=l.processEntityResult(v,y,z.text,ca);da.bootstrapCost=ca;da.isJSBootstrapMatch=true;x.push(da);},this);return x;}.bind(this),this.facebarConfig.bootstrap_types);};r.prototype._isTitleTermMatch=function(s,t){"use strict";var u=s[0]||{};if(typeof(u)=='object')return false;var v=t.titleToIndex;return s.length===1?this._isTokenizePrefixMatch(u,v):p.isExactMatch(u,v);};r.prototype._isExactNameMatch=function(s,t){"use strict";var u=s[0]||{};if(typeof(u)=='object')return false;var v=t.text;for(var w=0;w0&&this._isTokenizePrefixMatch(s[s.length-1],v);};r.prototype._isAliasMatch=function(s,t){"use strict";return (t.alias!=null&&s!=null&&p.isExactMatch(t.alias,s));};r.prototype._isNonGrammarTermMatch=function(s,t){"use strict";var u=p.parse(t.titleToIndex.toLowerCase()),v=u.tokens.filter(function(y){return y!==''&&!this.facebarConfig.grammar_stop_words[y];},this);v=v.join(' ');for(var w=0;w=0;ba--){if(typeof(s[ba])=='object')break;if(s[ba].length&&s[ba][0]=='"')break;for(x in this.bootstrapCache[s[ba]]){if(!w[x])w[x]=0;if(w[x]+ba==y-1){++w[x];this._addMatchedTerm(x,s[ba],t);this._pushBootstrapEntryAtPosition(u,ba,x);}}}return u;};r.prototype._addMatchedTerm=function(s,t,u){"use strict";(u[s]=u[s]||[]).push(t);return u;};r.prototype._pushBootstrapEntryAtPosition=function(s,t,u){"use strict";var v=this.getEntry(u);if(!v)return;for(var w in v.grammar_costs){var x=this.stripBrackets(w);if(s[t][x]===undefined)s[t][x]=[];s[t][x].push(u);}};r.prototype._getNumTokensMatching=function(s,t){"use strict";var u=0,v=t.parse,w=s.length,x=null,y=null;if(v.pos!==undefined){var z=t.structure[t.chunks[v.pos]];if(z){x=z.uid;y=z.type.split(':')[2];}}t.outputTokensUsed=[];t.termMatches=[];if(x){u=this._prefixMatchEntity(s,v,x,t.outputTokensUsed,y,!!t.useExtendedIndex,t.termMatches);if(u===0||u===w)return u;}else if(v.suffix&&w==1&&v.suffix.indexOf(s[0])===0){return w;}else if(v.suffix==s[0]){++u;}else return 0;var aa=[];v.remTokens=v.remTokens||[];for(var ba=0;ba1&&s[1]=='\'s'){v.push([t.pos+1]);return 2;}else return 1;}var z=false,aa=this.getEntry(u,w);if(typeof(w)!=='undefined'&&w!==aa.fetchType)return 0;var ba=this.tokenize(x?aa.textToIndex:aa.text,true),ca=[];for(var da=0;da0){if(z)v.push([t.pos+1]);return ea;}if(v===undefined)return 0;var ka=s[0],la=ka;if(t.possessive&&ka.length>=2&&ka.substr(ka.length-2)=='\'s')la=ka.substr(0,ka.length-2);t.suffix=t.suffix||'';if((s.length==1&&t.suffix.indexOf(ka)===0)||t.suffix==la||t.suffix==ka){if(la!=ka&&t.suffix==la)v.push([t.pos+1]);return 1;}return 0;};r.prototype._tryMatchingFinalInsertedEntity=function(s,t,u){"use strict";if(!u.completed||t<0)return t;var v=u.parse,w=v.remTokens[v.remTokens.length-1],x=u.structure[u.chunks[w]],y=this.getEntry(x.uid,x.type),z=this.tokenize(y.text,true);t=this._greedyMatchText(z,s,t);if(t==s.length-1&&s[t]==='')return s.length;return t;};r.prototype._greedyMatchText=function(s,t,u,v,w,x){"use strict";for(var y=0;y=0;t--){var u=this.queryCache[s.slice(0,t)];if(u)return u;}};r.prototype._getFBObjectType=function(s){"use strict";if(this.typeaheadTypeMap[s]){return this.typeaheadTypeMap[s];}else return 'page';};r.prototype._isTokenizePrefixMatch=function(s,t){"use strict";return p.isPrefixMatch(this.unicodeMatch.prefixMatchPrepare(s),this.unicodeMatch.prefixMatchPrepare(t));};r.EPSILON=1e-05;r.getUniqueSemantic=function(s){if(!s)return;var t=[],u=[],v=[];s='('+s+')';var w=s,x=false;s.replace(/[\(\),]/g,function(y,z){var aa;switch(y){case ',':var ba=v.length-1;aa=w.substr(v[ba],z-v[ba]);t[ba].push(aa);v[ba]=z+1;break;case '(':v.push(z+1);t.push([]);u.push(z+1);break;case ')':if(v.length===0)throw s+' is not a valid semantic string';var ca=v.pop();aa=w.substr(ca,z-ca);aa=decodeURI(aa.replace(/%/g,'%25').replace(/\s/g,'+').trim());var da=t.pop();da.push(aa);var ea=da.sort();for(var fa=1;fao){var s=l.substr(o,r-o);Array.prototype.push.apply(n,g.parse(s).tokens.slice(0));}var t=q;for(var u=0;u=h){p.push([s,o[t].index]);}else q.push(s);});p.sort(function(s,t){return s[1]-t[1];});var r=p.map(function(s){return s[0];});Array.prototype.push.apply(q,r.slice(i));r.length=Math.min(r.length,i);return [r,q];};j.prototype.replaceResults=function(k,l,m){"use strict";var n=[],o=Math.min(0,k.length-l)+m.length;for(var p=0;p=0){n.push(k[q]);k.splice(q,1);}}Array.prototype.unshift.apply(k,m);return n;};e.exports=j;},null); __d("FacebarTypeaheadL2Terms",["FacebarJSConstants"],function(a,b,c,d,e,f,g){var h=3,i={addL2Terms:function(j,k,l,m){if(!m.suggestBackendL2Terms)return j;var n=[],o=[];j.forEach(function(q){if(q.exactMatchKeyword){q.tags.l2_suggestion=true;n.push(q);}else if(q.isKeywordL2){q.tags.l2_suggestion=true;q.type='l2suggestion';n.push(q);}else if(q.type!=='keywords')o.push(q);});var p=0;return o.map(function(q){if(g.entityTypes[q.type])if(pj)l.push({index:n,originalIndex:m.indexBeforeBuckets});});l.sort(function(m,n){return m.originalIndex-n.originalIndex;}).slice(k).sort(function(m,n){return n.index-m.index;}).forEach(function(m){i.splice(m.index,1);});};h.mergeBuckets=function(i,j){"use strict";var k=[];for(var l in j)if(!j[l].rule.hidden&&(!j[l].rule.xor||!j[j[l].rule.xor]))k.push(j[l]);k.sort(function(m,n){var o=(m.rule.position||0)-(n.rule.position||0);if(o!==0)return o;return m.results[0].indexBeforeBuckets-n.results[0].indexBeforeBuckets;});i.length=0;k.forEach(function(m,n){if(m.rule.maxPromotions!=null&&n=n.maxResults)return true;l.bucketLineage.push({bucketName:o,bucketIndex:k[o].results.length});k[o].results.push(l);return true;}.bind(this));}.bind(this));return k;};h.prototype.$ResultsBucketizer4=function(i,j){"use strict";var k=this.$ResultsBucketizer0[j];if(!k)return {};var l=this.$ResultsBucketizer3(i,k);for(var m in l){var n=l[m].rule.subBucketRules;if(!!n)this.$ResultsBucketizer4(l[m].results,n);}h.mergeBuckets(i,l);return l;};h.prototype.$ResultsBucketizer5=function(i,j,k){"use strict";if(j.length<=k)return j.slice();var l=j.map(function(n){return n.indexBeforeBuckets;}),m=l.sort(function(n,o){return n-o;})[k];return j.filter(function(n){return n.indexBeforeBuckets0){ta.push(ua);}else if(ua.isSeeMore){ra.push(ua);}else sa.push(ua);});if(na){ka=this.orderNullState(ka,this.getMaxResults());}else if(j.webSuggestionsEnabled){ka=i.integrateWebsuggestions(sa,Boolean(la),this.getMaxResults(),ma,this._minWebSugg);}else ka=sa;this.inform('decorateSeeMoreSuggestions',{structured:ha,allResults:qa,selectedResults:ka,seeMoreResults:ra});if(ta.length>0){ta.sort(function(ua,va){return ua.forcedPosition-va.forcedPosition;});ta.forEach(function(ua){ka.splice(ua.forcedPosition,0,ua);});}if(ra.length>0)ka.push.apply(ka,ra);return ka.map(this.toTypeaheadEntryUid,this);};ga.prototype.orderNullState=function(ha,ia){"use strict";var ja={top:[],bottom:[],middle:[]},ka=function(na){var oa=na.null_state_position;return ja.hasOwnProperty(oa)?oa:'middle';},la=function(na,oa){return na.original_cost-oa.original_cost;};ha&&ha.forEach(function(na){ja[ka(na)].push(na);},this);for(var ma in ja){ja[ma]=ja[ma].sort(la).slice(0,ia);ia-=ja[ma].length;}return [].concat(ja.top,ja.middle,ja.bottom);};ga.prototype.handleResponse=function(ha,ia){"use strict";if(!(ha.payload.errors)){this.processEntries(ha.payload.entities);this.filterOutWebSuggestion=true;for(var ja=0;ja0)this.setQueryData({qid:this._curQueryID,existing_ids:JSON.stringify(ma),max_results:ka});}this.inform('query',{value:ha,results:la,queryId:this._curQueryId});if(this.resultStore)this.respond(ha,la,false,false,ja);};ga.prototype.shouldFetchMore=function(ha,ia){"use strict";if(ha.is_empty)return false;if(this.resultStore.alreadyKnown(ha.cache_id))return false;if(ha.raw_text&&this._isQueryTooShort(ha.raw_text))return false;if(j.alwaysFetchMore)return true;if(ia.length0?' '+"_55y-":'')),s=i.DOM.span({className:r},this.renderText(),this.renderBadge(),this.props.token),t=(("_7gk")+(this.props.message?' '+"_5byz":''));return (i.DOM.span({className:t},s,this.props.message));},renderMain:function(){var r=this.props.result.uri;return (i.DOM.a({className:"_205",href:r?r.toString():'#',rel:"ignore"},i.DOM.span({className:"_6i1"},this.props.icon||this.renderIcon(),this.renderLabel())));},renderDebug:function(){return this.props.result.debug?k({result:this.props.result}):null;},render:function(){var r="_202 _5bl2 _6_k";return (i.DOM.li({className:o(r,this.props.className),onClick:this.props.onClick,onMouseEnter:this.props.onMouseEnter,'aria-label':this.props.result.structure.toString(),role:"option"},this.renderMain(),this.renderDebug()));}});e.exports=q;},null); __d("FacebarTypeaheadToken.react",["FacebarTypeaheadHighlightedText.react","ReactPropTypes","React","cx"],function(a,b,c,d,e,f,g,h,i,j){var k=' \u00B7 ',l=i.createClass({displayName:'FacebarTypeaheadToken',propTypes:{text:h.array.isRequired,highlight:h.array,limit:h.number,innerClass:h.string,leadingMiddot:h.bool},render:function(){var m=this.props.text;if(this.props.limit)m.splice(this.props.limit);m.forEach(function(q,r){if(r!==0||this.props.leadingMiddot)m[r]=k+q;}.bind(this));var n=g({tokens:this.props.highlight,text:m.shift()}),o=m.length?g({tokens:this.props.highlight,className:"_53ab",text:m.join('')}):null,p=this.props.innerClass||"_53aa";return (i.DOM.span({className:"_53a9"},i.DOM.span({className:p},n,o)));}});e.exports=l;},null); __d("FacebarTypeaheadTokenText",["DOM","HTML"],function(a,b,c,d,e,f,g,h){var i='\u00B7';function j(n){if(typeof n==='object'){return g.getText(h(n).getRootNode());}else return n||'';}function k(n){return j(n).split(i).map(function(o){return o.trim();});}function l(n){var o={};return n.filter(function(p){var q=!o[p];o[p]=true;return q&&p;});}var m={textForEntity:function(n,o){var p=n.category||o[n.type]||'',q=n.subtext||'',r=k(p).concat(k(q));return l(r);},text:function(n){return l(k(n));}};e.exports=m;},null); __d("FacebarTypeaheadEntityItem.react",["React","FacebarTypeaheadItem.react","FacebarTypeaheadToken.react","FacebarTypeaheadTokenText","TypeaheadFacepileX.react","cx"],function(a,b,c,d,e,f,g,h,i,j,k,l){var m=g.createClass({displayName:'FacebarTypeaheadEntityItem',renderToken:function(){return (i({highlight:this.getHighlightTokens(),text:j.textForEntity(this.props.result,{})}));},renderIcon:function(){if(this.props.result.size>1&&this.props.result.photos){return (k({className:"_51l_",photos:this.props.result.photos,size:this.props.result.size}));}else if(this.props.result.photo)return (g.DOM.img({className:"_20h",alt:"",src:this.props.result.photo}));},getHighlightTokens:function(){if(this.props.result.original_query){var n=this.props.result.original_query.toString().trim(),o=n.split(' '),p=o.length>1?[n].concat(o):[n];return p.filter(function(q){return (q!=='');});}},render:function(){return this.transferPropsTo(h({icon:this.renderIcon(),token:this.renderToken(),highlight:this.getHighlightTokens(),valign:true}));}});e.exports=m;},null); __d("FacebarDisambiguationDialog",["Event","BrowseLogger","CSS","cx","Dialog","DOM","FacebarStructuredText","FacebarTypeaheadEntityItem.react","React","tx"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){var q=650;function r(s,t,u,v,w){"use strict";this._sets=s;this._path=t;this._ondone=u;this._oncancel=v;this._selection=[];this._typeaheadSID=w;}r.prototype.show=function(){"use strict";new k().setTitle("Which of these did you mean?").setBody(this._createBody()).setContentWidth(q).setModal(true).setButtons([k.CONFIRM,k.CANCEL]).setHandler(this._handleDone.bind(this)).setCancelHandler(this._handleCancel.bind(this)).show();this._sets.forEach(function(s){var t=[];s.forEach(function(v){t.push(v.uid);});var u=s[0];h.logDisambiguationImpression(u.text,u.type,this._path,t.join(','),this._typeaheadSID);}.bind(this));};r.prototype._createBody=function(){"use strict";var s=[];this._sets.forEach(function(t,u){s.length&&s.push(l.create('li',{className:"_200"}));t.forEach(function(v){var w=this._createItem(v,u);this._selection[u]||this._selectItem(w);s.push(w.root);}.bind(this));}.bind(this));return l.create('ul',{className:'viewList disambiguationList'},s);};r.prototype._createItem=function(s,t){"use strict";var u={uri:null,subtext:s.subtext,category:s.category,photo:s.photo,type:s.type,structure:m.fromStruct([{text:s.text,type:'ent:'+s.type,uid:s.uid}])},v=l.create('div',{className:"_201"}),w=n({result:u}),x=l.create('div');o.renderComponent(w,x);var y=x.firstChild;i.addClass(y,"_6i3");l.appendContent(y,i.hide(v));var z={setId:t,result:s,root:y,check:v};g.listen(y,'mouseover',this._toggleHover.bind(this,z,true));g.listen(y,'mouseout',this._toggleHover.bind(this,z,false));g.listen(y,'click',function(event){this._selectItem(z);return event.kill();}.bind(this));return z;};r.prototype._toggleHover=function(s,t){"use strict";i.conditionClass(s.root,'selected',t);};r.prototype._toggleCheck=function(s,t){"use strict";i.conditionShow(s.check,t);};r.prototype._selectItem=function(s){"use strict";var t=this._selection[s.setId];this._selection[s.setId]=s;t&&this._toggleCheck(t,false);this._toggleCheck(s,true);};r.prototype._handleDone=function(s){"use strict";this._ondone(s==k.CONFIRM?this._selection.map(function(t){var u=t.result;h.logDisambiguationClick(u.text,u.type,this._path,u.index,u.uid,this._typeaheadSID);return u;}.bind(this)):null);};r.prototype._handleCancel=function(){"use strict";this._oncancel();};e.exports=r;},null); __d("FacebarTypeahead",["Arbiter","Typeahead","copyProperties","emptyFunction","FacebarGlobalOptions","throttle"],function(a,b,c,d,e,f,g,h,i,j,k,l){for(var m in h)if(h.hasOwnProperty(m))o[m]=h[m];var n=h===null?null:h.prototype;o.prototype=Object.create(n);o.prototype.constructor=o;o.__superConstructor__=h;function o(p,q,r,s,t,u){"use strict";h.call(this,p,q,r,s);this.getCore();this.proxyEvents();this.initBehaviors(t||[]);var v=this.core.subscribe('focus',function(){if(u)u.init(this);this.core.unsubscribe(v);this.data.bootstrap(false);this.core.input.focus();if(k.fetchLeanOnFocus){var w=k.fetchLeanOnFocusThrottleTime;this.core.subscribe('focus',l(this.data.fetchLean,w,this.data));}}.bind(this));this.data.bootstrap(true);this.inform('init',this,g.BEHAVIOR_PERSISTENT);g.inform('Facebar/init',this,g.BEHAVIOR_PERSISTENT);}o.prototype.proxyEvents=function(){"use strict";var p,q=[],r=null,s=(function(){while(p=q.shift())this.inform(p[0],p[1]);r=null;}).bind(this);[this.data,this.view,this.core].forEach(function(t){t.subscribe(t.events,function(u,v){q.push([u,v]);r=r||setTimeout(s,0);}.bind(this));},this);};i(o.prototype,{init:j});e.exports=o;},null); __d("StructuredInputDOM",["createArrayFrom","CSS","cx","DOM"],function(a,b,c,d,e,f,g,h,i,j){var k={ENTITY_CLASS:"_586o",encodeText:function(l){return l.replace(/ /g,'\u00a0');},decodeText:function(l){return l.replace(/\u00a0/g,' ');},createIconNode:function(l){if(l&&typeof l=='object'){var m=j.create('i',{className:l.className,style:l.uri&&{backgroundImage:'url("'+l.uri+'")'}});m.setAttribute('data-select','ignore');return m;}},createTextNode:function(l){return j.create('span',{'data-si':true},k.encodeText(l||""));},createEntityNode:function(l,m){var n=k.encodeText(l.text),o=k.createIconNode(m.icon),p=j.create('span',{},o?[o,n]:n),q=(m.className||'').split(/\s+/);q.push(k.ENTITY_CLASS);q.forEach(h.addClass.bind(h,p));var r={si:true,uid:l.uid,type:l.type,text:n,fulltext:n,group:m.group,select:m.select,icon:JSON.stringify(m.icon||null)};for(var s in r)if(r[s]!=null)p.setAttribute('data-'+s,r[s]);return p;},convertToTextNode:function(l){l.className='';l.setAttribute('data-type','text');l.removeAttribute('data-group');l.removeAttribute('data-select');l.removeAttribute('data-icon');l.removeAttribute('data-uid');for(var m=l.firstChild;m;m=m.nextSibling)if(!j.isTextNode(m))j.remove(m);},isEntityNode:function(l){return j.isElementNode(l)&&h.hasClass(l,k.ENTITY_CLASS);},containsOnlyText:function(l,m){m=g(m);for(var n=l.firstChild;n;n=n.nextSibling)if(!(j.isTextNode(n)||l.nodeName in m))return false;return true;},getText:function(l){return j.getText(l).replace(/ /g,'\u00a0');},getDecodedText:function(l){return k.decodeText(j.getText(l));},getLength:function(l){return j.getText(l).length;},getMarker:function(l,m,n){var o=l.firstChild;while(o){var p=k.getLength(o);if(p>m||!o.nextSibling){if(j.isTextNode(o)||!n){return {node:o,offset:Math.min(m,p)};}else return k.getMarker(o,m);}else m-=p;o=o.nextSibling;}}};e.exports=k;},null); __d("StructuredInputUtil",["StructuredInputDOM"],function(a,b,c,d,e,f,g){function h(n,o,p){var q=n.substr(0,o).lastIndexOf(p);return q!==-1?q+1:0;}function i(n,o,p){var q=n.indexOf(p,o);return q!==-1?q:n.length;}function j(n,o,p){return (o===0||o===n.length||n.substr(o,p.length)==p);}function k(n,o,p,q){switch(o){case 'none':return p;case 'all':return q?n.length:0;case 'word':if(j(n,p,'\u00a0')){return p;}else if(q){return i(n,p,'\u00a0');}else return h(n,p,'\u00a0');}}function l(n,o){return o&&g.isEntityNode(n)&&!g.isEntityNode(o);}var m={getMarkerAtOffset:function(n,o){var p=n.firstChild,q=0,r=0;while(p){q+=r;r=g.getLength(p);if(q+r>o){break;}else p=p.nextSibling;}return {node:p||n.lastChild,offset:o-q};},validateEntityText:function(n){var o=g.getText(n),p=n.getAttribute('data-fulltext'),q=n.getAttribute('data-group');if(q=='hashtag'){var r=o.match(/#[^\s]+/);p=r&&r[0];}var s=o.indexOf(p),t={prefix:null,entity:null,suffix:null};switch(q){case 'none':t.entity=o;break;case 'hashtag':case 'all':if(s!=-1){t.prefix=o.substr(0,s);t.entity=o.substr(s,p.length);t.suffix=o.substr(s+p.length);}else t.suffix=o;break;case 'word':if(s!=-1){t.prefix=o.substr(0,s);o=o.substr(s);}var u=0,v=0;while(u0;};return function(p){if(p.length!=1||!n(p[0])){var q=p.map(k.getText).join('').replace(/\s+/g,' ');return q?[this._createTextNode(q)]:[];}else{p[0].style.cssText='';return;}};})()});e.exports=m;},null); __d("DOMSelection",[],function(a,b,c,d,e,f){(function(){var g=this,h={isPreceding:function(n,o){return o.compareDocumentPosition(n)&2;},contains:function(n,o){if(n.compareDocumentPosition!=null){return n.compareDocumentPosition(o)&16;}else return n.contains(o);},isCursorPreceding:function(n,o,p,q){if(n===p)return o<=q;if(h.isText(n)&&h.isText(p))return h.isPreceding(n,p);if(h.isText(n)&&!h.isText(p))return !h.isCursorPreceding(p,q,n,o);if(!h.contains(n,p))return h.isPreceding(n,p);if(n.childNodes.length<=o)return false;if(n.childNodes[o]===p)return 0<=q;return h.isPreceding(n.childNodes[o],p);},isText:function(n){return (n!=null?n.nodeType==3:false);},getChildIndex:function(n){var o=0;while(n=n.previousSibling)o++;return o;}},i=g.Selection=(function(){function n(o){this.win=o;}n.prototype.hasSelection=function(){return n.hasSelection(this.win);};n.prototype.isBidirectional=function(){return n.isBidirectional(this.win);};n.prototype.getOrigin=function(){return n.getOrigin(this.win);};n.prototype.getFocus=function(){return n.getFocus(this.win);};n.prototype.getStart=function(){return n.getStart(this.win);};n.prototype.getEnd=function(){return n.getEnd(this.win);};n.prototype.trySelection=function(o,p,q,r){return n.trySelection(this.win,o,p,q,r);};n.prototype.setSelection=function(o,p,q,r){return n.setSelection(this.win,o,p,q,r);};n.prototype.clearSelection=function(){return n.clearSelection(this.win);};return n;})();function j(){if(g.document.selection&&/MSIE 9\./.test(navigator.userAgent)){return false;}else return !!g.getSelection;}if(j()){i.supported=true;i.hasSelection=function(n){var o;return (o=n.getSelection())&&(o.focusNode!=null)&&(o.anchorNode!=null);};i.isBidirectional=function(n){return true;};i.getOrigin=function(n){var o;if(!((o=n.getSelection())&&(o.anchorNode!=null)))return null;return [o.anchorNode,o.anchorOffset];};i.getFocus=function(n){var o;if(!((o=n.getSelection())&&(o.focusNode!=null)))return null;return [o.focusNode,o.focusOffset];};i.getStart=function(n){var o,p,q,r,s,t;if(!i.hasSelection(n))return null;s=i.getOrigin(n),o=s[0],q=s[1];t=i.getFocus(n),p=t[0],r=t[1];if(h.isCursorPreceding(o,q,p,r))return [o,q];return [p,r];};i.getEnd=function(n){var o,p,q,r,s,t;if(!i.hasSelection(n))return null;s=i.getOrigin(n),o=s[0],q=s[1];t=i.getFocus(n),p=t[0],r=t[1];if(h.isCursorPreceding(o,q,p,r))return [p,r];return [o,q];};var k=function(n,o,p,q,s,t){var u=o.getSelection();if(!u)return;if(s==null)s=p;if(t==null)t=q;if(u.collapse&&u.extend){u.collapse(p,q);u.extend(s,t);}else{r=o.document.createRange();r.setStart(p,q);r.setEnd(s,t);if(n||!i.hasSelection(o)||(r.endContainer===s&&r.endOffset===t&&r.startContainer===p&&r.startOffset===q)){try{u.removeAllRanges();}catch(v){}u.addRange(r);}}};i.setSelection=k.bind(i,true);i.trySelection=k.bind(i,false);i.clearSelection=function(n){try{var p=n.getSelection();if(!p)return;p.removeAllRanges();}catch(o){}};i.getText=function(n){var o=n.getSelection();if(!o)return;return o.toString();};}else if(g.document.selection){var l=function(n,o,p){var q,r,s,t,u;r=n.createElement('a');q=o.duplicate();q.collapse(p);u=q.parentElement();while(true){u.insertBefore(r,r.previousSibling);q.moveToElementText(r);if(!(q.compareEndPoints((p?'StartToStart':'StartToEnd'),o)>0&&(r.previousSibling!=null)))break;}if(q.compareEndPoints((p?'StartToStart':'StartToEnd'),o)===-1&&r.nextSibling){q.setEndPoint((p?'EndToStart':'EndToEnd'),o);s=r.nextSibling;t=q.text.length;}else{s=r.parentNode;t=h.getChildIndex(r);}r.parentNode.removeChild(r);return [s,t];},m=function(n,o,p,q,r){var s,t,u,v,w;w=0;s=h.isText(q)?q:q.childNodes[r];t=h.isText(q)?q.parentNode:q;if(h.isText(q))w=r;v=n.createElement('a');t.insertBefore(v,s||null);u=n.body.createTextRange();u.moveToElementText(v);v.parentNode.removeChild(v);o.setEndPoint((p?'StartToStart':'EndToEnd'),u);return o[p?'moveStart':'moveEnd']('character',w);};i.supported=true;i.hasSelection=function(n){var o;if(!n.document.selection)return false;o=n.document.selection.createRange();return o&&o.parentElement().document===n.document;};i.getStart=function(n){var o;if(!i.hasSelection(n))return null;o=n.document.selection.createRange();return l(n.document,o,true);};i.getEnd=function(n){var o;if(!i.hasSelection(n))return null;o=n.document.selection.createRange();return l(n.document,o,false);};i.isBidirectional=function(n){return false;};i.getOrigin=function(n){return i.getStart(n);};i.getFocus=function(n){return i.getEnd(n);};var k=function(n,o,p,q,r,s){if(r==null)r=p;if(s==null)s=q;var t=o.document.body.createTextRange();m(o.document,t,false,r,s);m(o.document,t,true,p,q);return t.select();};i.setSelection=k.bind(i,true);i.trySelection=k.bind(i,false);i.clearSelection=function(n){return n.document.selection.empty();};i.getText=function(n){if(!i.hasSelection(n))return null;var o=n.document.selection.createRange();return o&&o.text;};}else i.supported=false;}).call(this);e.exports=Selection;},null); __d("StructuredInputSelection",["DOM","DOMSelection","Vector","StructuredInputUtil","StructuredInputDOM"],function(a,b,c,d,e,f,g,h,i,j,k){function l(n){"use strict";var o=n.ownerDocument;this.window=o.defaultView||o.parentWindow;this.root=n;this.selection=false;this.start=new m(this,[]);this.end=new m(this,[]);this.update();}l.prototype.isSupported=function(){"use strict";return !!(h&&h.hasSelection);};l.prototype.update=function(){"use strict";this.selection=false;if(this.isSupported()&&this.root==document.activeElement)if(h.hasSelection(this.window)){var n=h.getStart(this.window),o=h.getEnd(this.window),p=h.getFocus(this.window);this.start=this.makeMarker(n);this.end=this.makeMarker(o);this.backward=n[0]==p[0]&&n[1]==p[1];this.selection=this.start.node&&this.end.node;}};l.prototype.makeMarker=function(n){"use strict";if(n[0]===this.root){return new m(this,[this.root.childNodes[n[1]],0]);}else return new m(this,n);};l.prototype.getFocus=function(){"use strict";return this.backward?this.start:this.end;};l.prototype.getOrigin=function(){"use strict";return this.backward?this.end:this.start;};l.prototype.move=function(n){"use strict";if(this.selection){this.start.move(n);this.start.snap();this.end.setPosition(this.start);return this.apply();}};l.prototype.expand=function(n){"use strict";if(this.selection){if(h.isBidirectional()){this.start.move(!n);this.start.snap();this.end.move(n);this.end.snap();}return this.apply();}};l.prototype.getText=function(){"use strict";if(this.selection&&this.isSupported()){var n=h.getText(this.window);return n;}};l.prototype.getOffset=function(){"use strict";if(this.selection)return this.start.rootOffset;};l.prototype.getLength=function(){"use strict";return (this.getText()||"").length;};l.prototype.setPosition=function(n,o){"use strict";this.backward=false;this.selection=true;this.start.setPosition(j.getMarkerAtOffset(this.root,n));this.start.snap();if(o>0){this.end.setPosition(j.getMarkerAtOffset(this.root,n+o));this.end.snap();}else this.end.setPosition(this.start);return this.apply();};l.prototype.hasRange=function(){"use strict";return this.selection&&(this.start.node!=this.end.node||this.start.offset!=this.end.offset);};l.prototype.scrollToFocus=function(){"use strict";var n=5,o=this.getFocus();if(o.node){var p=i.getElementDimensions(this.root).x,q=this.root.scrollLeft,r=o.node.offsetLeft+o.node.offsetWidth;if(r-qp-n)this.root.scrollLeft=r-p+n;}};l.prototype.apply=function(){"use strict";if(this.start.hasChanged()||this.end.hasChanged()){var n=this.getOrigin().getMarker(true),o=this.getFocus().getMarker(true);this.selection=this.selection&&n&&n.node&&o&&o.node;if(this.selection&&this.isSupported()){this.start.changed=false;this.end.changed=false;h.trySelection(this.window,n.node,n.offset,o.node,o.offset);return true;}}};l.prototype.markDirty=function(n){"use strict";if(g.contains(n,this.start.node,n))this.start.changed=true;if(g.contains(n,this.end.node,n))this.end.changed=true;};function m(n,o){"use strict";this.selection=n;this.node=o[0];this.offset=o[1];this.rootOffset=this.getRootOffset(o[0],o[1]);this.sibling=this.node&&this.node.previousSibling;this.changed=false;}m.prototype.hasChanged=function(){"use strict";return this.changed||!this.isNodeValid();};m.prototype.isNodeValid=function(){"use strict";if(k.getLength(this.node)>this.offset){var n=this.node;while(n=n.parentNode)if(n==this.selection.root)return true;}};m.prototype.getMarker=function(n){"use strict";if(this.isNodeValid()&&((n&&!this.node.firstChild)||(!n&&this.node.parentNode==this.selection.root))){return this;}else return k.getMarker(this.selection.root,this.rootOffset,n);};m.prototype.move=function(n){"use strict";this.node&&this.setPosition(j.nextMarkerBoundary(this.getMarker(false),n,'select'));};m.prototype.snap=function(){"use strict";this.node&&this.setPosition(j.snapMarkerToText(this.getMarker(false),'select'));};m.prototype.setPosition=function(n){"use strict";if(n.offset!=this.offset||n.node!=this.node){this.changed=true;this.node=n.node;this.offset=n.offset;this.rootOffset=this.getRootOffset(this.node,this.offset);}};m.prototype.getRootOffset=function(n,o){"use strict";var p=0,q=5;while(n&&p++0||ra.offset===0)return false;var sa=this.getSelection().offset-1,ta=u.getMarkerAtOffset(this._richInput,sa);if(ta&&s.isEntityNode(ta.node)&&u.getGrouping(ta.node,'select')!=='none'){j.remove(ta.node);return true;}return false;};pa.prototype._selectionIsText=function(){"use strict";var qa=this._selection.start.node,ra=this._selection.end.node;return qa&&qa===ra&&!s.isEntityNode(qa)&&!s.isEntityNode(qa.parentNode);};pa.prototype._insertText=function(qa){"use strict";if(qa){var ra=j.create('div',{},qa);return this._insertNodes(ra);}};pa.prototype._insertHTML=function(qa){"use strict";if(qa){var ra=j.create('div'),sa=new r(ra,null,false);ra.innerHTML=qa;sa.clean();return this._insertNodes(ra);}};pa.prototype._insertNodes=function(qa){"use strict";if(document.selection){document.selection.createRange().pasteHTML(qa.innerHTML);}else document.execCommand('insertHTML',false,qa.innerHTML);this._richChanged=true;this.cleanInput();};pa.prototype.togglePlaceholder=function(qa){"use strict";if(!this._placeholderText)return;var ra=s.getLength(this._richInput)===0;if(qa&&ra){i.show(this._placeholderText);}else i.conditionShow(this._placeholderText,ra&&!this._imeMode);};pa.prototype._toggleHint=function(){"use strict";var qa=x(this._hintNodes),ra=null,sa='',ta=s.getText(this._richInput).toLowerCase();if(!this.hasFocus())return;if(this._contentOverflows()){i.hide(this._hintText);return;}while(qa.length&&sa.lengththis._richWidth;};pa.prototype._forceTop=function(){"use strict";if(!this._multiline)this._richInput.scrollTop=0;this._root.scrollTop=0;};pa.prototype._createStructureNodes=function(qa){"use strict";return qa.map(function(ra){return ra.uid||(ra.type&&ra.type!='text')?s.createEntityNode(ra,ra.display||{}):s.createTextNode(ra.text);}.bind(this));};pa.prototype._suppressInput=function(){"use strict";if(ja||ka){if(this._richClean)return;this._richClean=this._richInput.cloneNode(true);this._richClean.contentEditable=false;this._root.insertBefore(this._richClean,this._richInput.nextSibling);this._richClean.scrollLeft=this._richInput.scrollLeft;v.set(this._richInput,'padding',0);v.set(this._richInput,'height',0);}};pa.prototype._revealInput=function(){"use strict";if(!this._richClean)return;v.set(this._richInput,'height','');v.set(this._richInput,'padding','');this._root.removeChild(this._richClean);this.focus();this._richClean=null;};pa.prototype._cleanInput=function(){"use strict";var qa;if(this._textChanged&&!this._richChanged){this._selection.update();qa='change';}else if(this._richChanged||this._selectionChanged){this._selection.update();if(this._richChanged){this._contentWidth=null;this._cleaner.clean();this._cleaner.endOnText();this._selection.apply();qa='change';}if(this._selectionChanged){this._cleanSelection();if(this._selectionLength||!this._richChanged)qa='select';}}this._revealInput();this._forceTop();this._cleanInputPreTogglesFinished=true;if(this._richChanged||this._textChanged){this.togglePlaceholder();this._toggleHint();}this._selectionIgnore=true;this._selectionChanged=false;this._richChanged=false;this._textChanged=false;this._cleanInputFinished=true;qa&&this.inform(qa);};pa.prototype._cleanSelection=function(){"use strict";var qa=this._selection.getLength(),ra=this._selection.getOffset();if(qa){this._selection.expand(qa>=this._selectionLength);qa=this._selection.getLength();ra=this._selection.getOffset();}this._selectionLength=qa;this._selectionOffset=ra;};pa.prototype.cleanInput=function(){"use strict";this._scheduledCleanInput||this._cleanInput();};pa.prototype.scheduleCleanInput=function(qa){"use strict";qa&&this._suppressInput();if(!this._scheduledCleanInput){this._scheduledCleanInput=true;setTimeout(function(){this._cleanInput();this._scheduledCleanInput=false;}.bind(this),0);}};pa.prototype.setEnabled=function(qa){"use strict";this._textInput.disabled=!qa;this._richInput.contentEditable=qa;};pa.prototype.getRoot=function(){"use strict";return this._root;};pa.prototype.getRichInput=function(){"use strict";return this._richInput;};pa.prototype.getEnabled=function(){"use strict";return !this._textInput.disabled;};pa.prototype.getText=function(){"use strict";return s.getDecodedText(this._richInput);};pa.prototype.setText=function(qa){"use strict";j.setContent(this._richInput,s.createTextNode(qa));this._richChanged=false;this._selectionChanged=false;this.inform('change');};pa.prototype.setHint=function(qa){"use strict";this._hintNodes=this._createStructureNodes(qa);this._toggleHint();};pa.prototype.getStructure=function(){"use strict";var qa=[];x(this._richInput.childNodes).forEach(function(ra){var sa=!j.isTextNode(ra),ta=s.getDecodedText(ra);ta.length&&qa.push({text:ta,uid:sa?ra.getAttribute('data-uid'):null,type:(sa&&ra.getAttribute('data-type'))||'text'});}.bind(this));return qa;};pa.prototype.setStructure=function(qa){"use strict";j.setContent(this._richInput,this._createStructureNodes(qa));this._cleaner.endOnText();this._cleaner.clean();this.togglePlaceholder();this._toggleHint();this._richChanged=false;this._selectionChanged=false;this.inform('change');};pa.prototype.getContentDimensions=function(){"use strict";var qa=this._richInput.lastChild;return {width:qa?qa.offsetLeft+qa.offsetWidth:0,height:qa?qa.offsetTop+qa.offsetHeight:0};};pa.prototype.getSelection=function(){"use strict";if(this._selection)return {offset:this._selection.getOffset(),length:this._selection.getLength()};};pa.prototype.setSelection=function(qa){"use strict";if(this.hasFocus()&&this._selection){this._selection.update();this._selection.setPosition(qa.offset,qa.length);this._selection.scrollToFocus();this._selectionChanged=false;this.inform('select');}};pa.prototype.moveSelectionToEnd=function(){"use strict";this.setSelection({length:0,offset:s.getLength(this._richInput)});};pa.prototype.isSelectionAtEnd=function(){"use strict";var qa=this.getSelection().offset,ra=s.getLength(this._richInput);return qa>=ra;};pa.prototype.selectAll=function(){"use strict";this.setSelection({offset:0,length:s.getLength(this._richInput)});};pa.prototype.hasFocus=function(){"use strict";return j.contains(this._root,document.activeElement);};pa.prototype.focus=function(){"use strict";this._richInput.focus();};pa.prototype.blur=function(){"use strict";var qa=j.create('input',{type:'text',tabIndex:-1,style:{position:'absolute',top:0,left:'-100px',width:'1px',height:'1px'}});j.appendContent(this._root,qa);var ra=function(){if(this.hasFocus()||(la&&document.activeElement===document.body)){qa.focus();qa.blur();}};this.blur=ra;this.blur();};pa.getInstance=function(qa){var ra=q.byClass(qa,"_586g");if(!ra)throw new Error('No DOMElement structured input found using '+qa);return k.get(ra,'StructuredInput')||new pa(ra);};e.exports=pa;},null); __d("FacebarTypeaheadInput",["ArbiterMixin","csx","DOM","FacebarStructuredText","StructuredInput","Vector","copyProperties","Locale","mixin"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){var p={text:{className:"text",group:"all",select:"none"},ent:{className:"entity",group:"all",select:"group"},'ent:hashtag_exact':{className:"entity",group:"hashtag",select:"none"}};function q(v){return m(v.toStruct(),{display:p[v.getType()]||p[v.getTypePart(0)]});}var r=o(g);for(var s in r)if(r.hasOwnProperty(s))u[s]=r[s];var t=r===null?null:r.prototype;u.prototype=Object.create(t);u.prototype.constructor=u;u.__superConstructor__=r;function u(v){"use strict";this.root=v;this.input=k.getInstance(v);this.value=null;this.selection={offset:0,length:0};this.resetOnChange=true;this.initEvents();}u.prototype.initEvents=function(){"use strict";var v=function(w,x){this.inform(w,x);}.bind(this);this.input.subscribe('blur',v);this.input.subscribe('focus',v);this.input.subscribe('change',function(w,x){if(this.resetOnChange)this.value=null;this.inform('change',x);}.bind(this));};u.prototype.togglePlaceholder=function(v){"use strict";return this.input.togglePlaceholder(v);};u.prototype.focus=function(){"use strict";this.input.focus();};u.prototype.blur=function(){"use strict";this.input.blur();};u.prototype.getElement=function(){"use strict";return this.root;};u.prototype.getRawPlaceholderElement=function(){"use strict";return i.find(this.root,"._586j");};u.prototype.getRawInputElement=function(){"use strict";return i.scry(this.root,"._586i")[0];};u.prototype.getValue=function(){"use strict";if(this.value===null)this.value=j.fromStruct(this.input.getStructure());return this.value;};u.prototype.getLength=function(){"use strict";return this.getValue().getLength();};u.prototype.resetPlaceholder=function(){"use strict";this.input.resetPlaceholder();};u.prototype.setValue=function(v){"use strict";this.value=v;this.resetOnChange=false;var w=v.toArray().map(q);this.input.setStructure(w);this.input.setSelection({offset:v.getLength(),length:0});this.resetOnChange=true;};u.prototype.storeSelection=function(){"use strict";this.selection=this.input.getSelection();};u.prototype.restoreSelection=function(){"use strict";if(this.selection)this.input.setSelection(this.selection);};u.prototype.setHint=function(v){"use strict";var w=v&&!v.hasRTL()&&!n.isRTL()?v.toArray().map(q):[];this.input.setHint(w);};u.prototype.isSelectionAtEnd=function(){"use strict";return this.input.isSelectionAtEnd();};u.prototype.selectInput=function(v){"use strict";this.input.setSelection({offset:v||0,length:this.getLength()});};u.prototype.getEndOffset=function(){"use strict";var v=l.getElementDimensions(this.root),w=this.input.getContentDimensions();return Math.min(v.x,w.width);};m(u.prototype,{events:['change','focus','blur']});e.exports=u;},null); __d("FacebarTypeaheadWebSearch",["startsWith","FacebarStructuredFragment","FacebarStructuredText"],function(a,b,c,d,e,f,g,h,i){var j=new h({type:'ent:websuggestion',text:'Web Search: ',uid:null}),k=j.getText().toLowerCase().trim();function l(o,p){if(!o||o.type!=='websuggestion')return;var q=p.getValue().toArray();q.forEach(function(r){if(r.isType('ent')&&!r.isType('ent','user')&&r.getUID())if(o.extra_uri_params){o.extra_uri_params.qh=r.getUID();return;}});}function m(o){return o.getType()===j.getType();}function n(o){"use strict";this._core=o.getCore();this._view=o.getView();this._input=this._core.input;this._isEnabled=false;}n.prototype.enable=function(){"use strict";this._isEnabled=true;this.changeListener=this._input.subscribe('change',this._changeWebSearch.bind(this));this.lockListener=this._input.subscribe('shortcut',this._lockWebSearch.bind(this));this.beforeSelectListener=this._view.subscribe('beforeSelect',this._beforeSelect.bind(this));this.beforeRenderListener=this._view.subscribe('beforeRender',this._beforeRender.bind(this));};n.prototype._changeWebSearch=function(){"use strict";var o=this._input.getValue(),p=o.toArray(),q=p[0];if(q&&q.getType()==='text')if(g(q.getText().toLowerCase(),k)){p.splice(0,1,j,new h({text:q.getText().substr(k.length).replace(/^ /,'')}));this._replaceFragments(p);}else if(p.length>1&&p.some(m)){var r='';p.forEach(function(s){if(m(s))return;r+=s.getText();});this._input.storeSelection();this._input.setValue(i.fromString(r));this._input.restoreSelection();}};n.prototype._replaceFragments=function(o){"use strict";this._input.storeSelection();this._input.setValue(new i(o));this._input.restoreSelection();};n.prototype._beforeSelect=function(o,p){"use strict";l(p.selected,this._input);return true;};n.prototype._beforeRender=function(o,p){"use strict";var q=this._input.getValue().toArray()[0],r=q&&m(q);p.results.forEach(function(s){if(s.type==='websuggestion')s.isLockedWebSearchMode=r;});return true;};n.prototype._lockWebSearch=function(o,p){"use strict";if(p.shift){var q=this._input.getValue().toArray()[0];if(!q||!m(q))this._input.setValue(new i([j]));}};n.prototype.disable=function(){"use strict";this.beforeSelectListener.unsubscribe();this.changeListener.unsubscribe();this.lockListener.unsubscribe();this.beforeRenderListener.unsubscribe();this._isEnabled=false;};n.addPrefix=function(o){"use strict";var p=m(o.getFragment(0))||g(o.getFragment(0).getText().toLowerCase(),k);if(!p){var q=[j].concat(o.toArray());return new i(q);}else return o;};e.exports=n;},null); __d("FacebarTypeaheadCore",["Animation","Arbiter","ArbiterMixin","Base64","DOM","Event","FacebarGlobalOptions","FacebarJSConstants","FacebarStructuredText","FacebarTypeaheadInput","FacebarTypeaheadWebSearch","Keys","KeywordsSearchResultConfig","Parent","Style","URI","arrayContains","copyProperties","cx","csx","getActiveElement","invariant","mixin","startsWith"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,ba,ca,da){var ea=ca(i);for(var fa in ea)if(ea.hasOwnProperty(fa))ha[fa]=ea[fa];var ga=ea===null?null:ea.prototype;ha.prototype=Object.create(ga);ha.prototype.constructor=ha;ha.__superConstructor__=ea;function ha(ia){"use strict";x(this,ia);}ha.prototype.init=function(ia,ja,ka){"use strict";if(window.getSelection===null)throw new Error('Facebar: window.getSelection is null!');this.init=function(){};this.data=ia;this.view=ja;this.root=ka;this.windowFocused=true;this.isFocused=false;this.hoverAnimation=null;this.stickyQuery=null;this.settedQuery=null;this.selectedQuery=null;this.currentQuery=null;this.initSubcomponents();this.initEvents();this.checkValue();};ha.prototype.initSubcomponents=function(){"use strict";var ia=k.find(this.root,"._5861");this.input=new p(ia);this.view.setInputElement(this.input.getRawInputElement());};ha.prototype.initEvents=function(){"use strict";l.listen(this.root,'keydown',this.keydown.bind(this));l.listen(this.root.parentNode,'mousedown',this.mousedown.bind(this));l.listen(this.view.getElement(),'mousedown',this.mousedown.bind(this));l.listen(window,'focus',this.focusWindow.bind(this));l.listen(window,'blur',this.blurWindow.bind(this));this.view.subscribe('select',this.selectView.bind(this));this.view.subscribe('highlight',this.highlightView.bind(this));this.view.subscribe('render',this.highlightView.bind(this));this.view.subscribe('hideHelp',this.performQuery.bind(this));this.input.subscribe('focus',this.focusInput.bind(this));this.input.subscribe('blur',this.blurInput.bind(this));this.input.subscribe('change',this.changeInput.bind(this));this.data.subscribe('activity',this.typeaheadActivity.bind(this));this.data.subscribe('respond',this.completeData.bind(this));this.data.subscribe('nullstateReady',this.performQueryIfVisible.bind(this));setTimeout(this.initFocus.bind(this),0);if(m.noTitleInSingleState)h.subscribe('facebar/updateNullStateQuery',function(){this.needsRefresh=true;}.bind(this));};ha.prototype.initFocus=function(){"use strict";if(!this.lazyFocused&&k.contains(this.input.root,aa())){this.lazyFocused=true;this.isFocused=true;this._newSession();this.inform('focus',{catchup:true});this.open();}};ha.prototype.cleanQuery=function(ia){"use strict";ia=x({},ia)||{};if(!ia.structure)ia.structure=new o();if(!m.allowGrammar||n.nonGrammarTypes[ia.type])ia.structure=o.fromString(ia.structure.toString());ba(ia.structure instanceof o);if(ia.type=='websuggestion'&&m.allowGrammar&&m.webSearchLockedInMode)ia.structure=q.addPrefix(ia.structure);return ia;};ha.prototype._unlockQuery=function(){"use strict";var ia=this.input.getValue();if(ia.hasType('ent')&&ia.trim().getCount()===1){this.input.storeSelection();this.input.setValue(o.fromString(ia.toString()));this.input.restoreSelection();}};ha.prototype.setPageQuery=function(ia){"use strict";ia=this.cleanQuery(ia);var ja=this.input.getValue(),ka=ia.structure,la=!ka.isEmptyOrWhitespace()&&(ja.isEmptyOrWhitespace()||ja.toString().trim()==ka.toString().trim());return this.selectQuery(ia,la);};ha.prototype.selectQuery=function(ia,ja){"use strict";ja=ja!==false;ia=this.cleanQuery(ia);if(ja||!this.selectedQuery){if(ja||this.getValue().isEmptyOrWhitespace())this.setQuery(ia);this.selectedQuery=ia;}return ia;};ha.prototype.completeSelection=function(){"use strict";var ia=this.view.getSelection();if(ia&&!ia.search){this.data.saveResult(ia);ia.structure=ia.structure.pad();this.setQuery(ia);return true;}};ha.prototype.setQuery=function(ia,ja){"use strict";ia=this.cleanQuery(ia);if(ia.structure.hasType('blank'))ia.structure=new o(ia.structure.toArray().filter(function(ka){return ka.getType()!='blank';}));if(m.graphSearchV2){this.input.setValue(o.fromString(ia.structure.toString()));}else this.input.setValue(ia.structure);this.settedQuery=ia;this.stickyQuery=ja===false?this.stickyQuery:ia;this.checkValue();};ha.prototype.checkValue=function(){"use strict";if(!this.needsRefresh&&this.value&&this.value.getHash()==this.input.getValue().getHash()){this.needsRefresh=false;return;}this.checkBlockedSearch();this.performQueryIfVisible();};ha.prototype.checkBlockedSearch=function(){"use strict";var ia=this.input.getValue().toString().toLocaleLowerCase();if(!this.data.blockees||!(this.data.blockees.hasOwnProperty(ia))){this.view.hideBlockNotification();}else this.view.showBlockNotification(this.data.blockees[ia]);};ha.prototype.isNullState=function(){"use strict";return (this.input.getValue().getHash()==='');};ha.prototype.performQueryIfVisible=function(){"use strict";if(!this.view.visible)return;this.value=this.nextQuery=this.getValue();this.performQuery();};ha.prototype.performQuery=function(){"use strict";this.data.query(this.nextQuery);this.currentQuery=this.nextQuery;};ha.prototype.requery=function(){"use strict";if(this.currentQuery)this.data.query(this.currentQuery);};ha.prototype.executeQuery=function(ia){"use strict";ia=this.cleanQuery(ia);var ja=this.inform('execute',ia),ka=this.getSessionID();this.close();if(m.allowGrammar){this.selectQuery(ia);}else this.selectQuery();if(!ja)this._navigateToQuery(ia,ka);};ha.prototype.getSearchType=function(){"use strict";return 'facebar';};ha.prototype._newSession=function(){"use strict";if(this._sessionID!=null)return;this._sessionID=Math.random().toString();this.inform('session',this._sessionID,h.BEHAVIOR_STATE);};ha.prototype._closeSession=function(){"use strict";this._sessionID=null;this.inform('session',null,h.BEHAVIOR_STATE);};ha.prototype.getSessionID=function(){"use strict";return this._sessionID;};ha.prototype._navigateToQuery=function(ia,ja){"use strict";var ka=this.data.facebarConfig;if(ia.uri){ia.uri.addQueryData(ia.extra_uri_params);ia.uri.addQueryData({ref:'br_tf'});if(ia.structure&&(ia.type=='websuggestion'||ia.type==s.result_type||(ia.type=='grammar'&&(!ka||da(ia.uri.getPath(),ka.search_path))))){var la=this.data.getRawStructure(ia.structure).text_form,ma=j.encode(encodeURIComponent(la)).replace(/\=+$/,''),na={sid:ja,qs:ma,gv:this.data.getQueryData().grammar_version},oa=j.encode(JSON.stringify(na)).replace(/\=+$/,'');ia.uri.addQueryData({ref:oa});}ia.uri.go();return;}};ha.prototype.reset=function(){"use strict";this.selectQuery();this.inform('reset');};ha.prototype.animateInputValue=function(ia,ja,ka){"use strict";this.hoverAnimation&&this.hoverAnimation.stop();var la=new g(ja).from('opacity',1).to('opacity',0).duration(150).ondone(function(){this.input.setValue(ka);this.hoverAnimation=ma.go();}.bind(this)),ma=new g(ia).from('opacity',0).to('opacity',1).duration(150).ondone(function(){this.hoverAnimation=null;u.set(ja,'opacity','');u.set(ia,'opacity','');}.bind(this));u.set(ia,'opacity',0);this.hoverAnimation=la.go();};ha.prototype.open=function(){"use strict";this.inform('open');this.view.show();this.input.focus();this.checkValue();if(!this.isFocused){this.isFocused=true;this._newSession();this.inform('focus');}};ha.prototype.close=function(){"use strict";this._closeSession();if(this.inform('close')===false)return;if((!this.value||this.value.isEmptyOrWhitespace())&&this.selectedQuery){this.input.setValue(this.selectedQuery.structure);}else if(this.stickyQuery)this.input.setValue(this.stickyQuery.structure);this.input.blur();this.view.hide();this.view.setAutoSelect(false);this.inform('session',null,h.BEHAVIOR_STATE);if(this.isFocused){this.isFocused=false;setTimeout(this.inform.bind(this,'blur'),0);}};ha.prototype.getElement=function(){"use strict";return this.root;};ha.prototype.getValue=function(){"use strict";return this.input.getValue();};ha.prototype.getText=function(){"use strict";return this.getValue().toString();};ha.prototype.keydown=function(event){"use strict";var ia=true,ja=l.getKeyCode(event);switch(ja){case r.ESC:this.close();break;case r.RIGHT:if(!m.disableLockingEntitiesOnRightArrow){ia=this.input.isSelectionAtEnd()&&this.completeSelection();}else ia=false;break;case r.TAB:var ka=this.cleanQuery(this.view.getSelection()),la=ka.structure.hasType('blank');if(event.getModifiers().shift||(!this.completeSelection()&&!this.loading)){this.view.setAutoSelect(false);this.view.hide();ia=false;}else if(!la&&!m.graphSearchV2)this.tabQueued=true;break;case r.UP:this.view.prev();break;case r.DOWN:this.view.next();break;case r.RETURN:this.view.select();break;case r.PAGE_UP:this.view.first();break;case 222:var ma=this.input.value.trim();if(!event.getModifiers().shift&&ma.endsOnType('ent'))this.input.setValue(ma);ia=false;break;default:var na=(ja<=46&&ja!==8),oa=(ja>=112&&ja<=126),pa=(ja===144||ja===145);if(!na&&!oa&&!pa){if(m.unlockTextOnKeypress)this._unlockQuery();this.data.setSingleState(false);this.view.setAutoSelect(true);}this.stickyQuery=null;ia=false;break;}this.input.storeSelection();if(ia)return event.kill();};ha.prototype.mousedown=function(event){"use strict";this.view.setAutoSelect(true);this.input.storeSelection();if(t.byClass(event.target,"_50c9"))event.preventDefault();};ha.prototype.focusWindow=function(){"use strict";this.windowFocused=true;};ha.prototype.blurWindow=function(){"use strict";this.windowFocused=false;};ha.prototype.selectView=function(ia,ja){"use strict";if(!ja||!ja.selected)return;this.data.setSingleState(true);this.inform('select',ja);var ka=this.cleanQuery(ja.selected);this.executeQuery(ka);};ha.prototype.highlightView=function(){"use strict";var ia=this.view.getSelection();ia&&this.input.setHint(ia.structure);};ha.prototype.blurInput=function(){"use strict";setTimeout((function(){if(this.windowFocused||v.getRequestURI().getSubdomain()==='apps'){this.input.togglePlaceholder();this.close();}}).bind(this),0);};ha.prototype.changeInput=function(){"use strict";this.inform('change');this.checkValue();this.inform('change_end');};ha.prototype.focusInput=function(){"use strict";this.open();this.input.togglePlaceholder(false);};ha.prototype.updateData=function(){"use strict";this.view.setLoading(this.loading);};ha.prototype.completeData=function(ia,ja){"use strict";this.checkBlockedSearch();if(ja.forceDisplay||(this.value&&this.value.matches(ja.value))){this.view.render(ja.value,ja.results,ja.isAsync,(ja.results.length===0)&&ja.isEmptyResults);if(this.tabQueued&&this.completeSelection())delete this.tabQueued;}};ha.prototype.typeaheadActivity=function(ia,ja){"use strict";this.fetching=ja.activity;if(this.loading!==this.fetching){this.loading=this.fetching;this.updateData();}};ha.prototype.getNameTextFromSelected=function(){"use strict";var ia=this.settedQuery&&this.settedQuery.semantic,ja=this.data.facebarConfig&&this.data.facebarConfig.name_functions,ka=ia&&ja&&ia.match(/[a-z-]+\([^()]+\)/g);if(ka)for(var la=0;la0){if(this.backendQueries.length>this.data.logBackendQueriesWindow)this.backendQueries=this.backendQueries.slice(this.backendQueries.length-this.data.logBackendQueriesWindow);this.recordStat('backend_queries',this.backendQueries);}if(p.taSessionLoggingSample){var x=[];this.results.forEach(function(z){x.push([z.text||'',z.category||'',z.subtext||'']);});this.recordStat('raw_suggestions_text',x);}for(var y in this.appendStats)t[y]=JSON.stringify(this.appendStats[y]);return t;};s.prototype.getDataToSubmit=function(){"use strict";return this._dataToSubmit();};s.prototype.reset=function(){"use strict";return this._reset();};s.prototype.submit=function(){"use strict";if(!this._sessionDisabled)r.submit.call(this);this.view.inform('feedback');this._reset();};h(s.prototype,{_endPoint:'/ajax/typeahead/search/record_metrics.php',_sessionEnded:true,_extraRecorder:[],_banzaiRoute:'facebar'});e.exports=s;},null); __d("FacebarTypeaheadGrammarItem.react",["React","FacebarTypeaheadItem.react","FacebarTypeaheadToken.react","FacebarTypeaheadTokenText","cx","fbt"],function(a,b,c,d,e,f,g,h,i,j,k,l){var m={user:"Person"},n=g.createClass({displayName:'FacebarTypeaheadGrammarItem',renderToken:function(){var o=this.props.result.decoration,p=this.props.result.ambiguity,q=p&&p.text,r=(o&&o.entity)||(p&&p.entity);if(this.props.result.isRecent){var s="Recent search";return (i({text:[s],innerClass:"_53ab"}));}else if(q){return (i({text:j.text(q)}));}else if(r)return (i({text:j.textForEntity(r,m),limit:2,leadingMiddot:true}));},render:function(){var o=this.renderToken(),p=o&&!o.props.leadingMiddot;return this.transferPropsTo(h({className:"_207",valign:p,token:o}));}});e.exports=n;},null); __d("FacebarTypeaheadKeywordItem.react",["FacebarTypeaheadItem.react","FacebarTypeaheadToken.react","React","cx","fbt"],function(a,b,c,d,e,f,g,h,i,j,k){var l=i.createClass({displayName:'FacebarTypeaheadKeywordItem',render:function(){var m=["Search"];if(this.props.result.isTrending){m.push("Trending");}else if(this.props.result.type=='related')m=["Related search"];var n=h({text:m,innerClass:"_53ab"});return this.transferPropsTo(g({className:"_207",token:n,prefix:this.props.result.query_string.toLowerCase()}));}});e.exports=l;},null); __d("FacebarTypeaheadTrendingItem.react",["FacebarTypeaheadItem.react","FacebarTypeaheadToken.react","React","cx"],function(a,b,c,d,e,f,g,h,i,j){var k=i.createClass({displayName:'FacebarTypeaheadTrendingItem',render:function(){var l=this.props.result.articleTitle||'',m=h({text:[l],innerClass:"_53ab",leadingMiddot:true});return this.transferPropsTo(g({className:"_207",token:m,valign:false}));}});e.exports=k;},null); __d("FacebarTypeaheadNodeItem.react",["React","DOM"],function(a,b,c,d,e,f,g,h){var i=g.createClass({displayName:'FacebarTypeaheadNodeItem',render:function(){var j=this.props.result.node;return this.transferPropsTo(g.DOM.li(null,!h.isElementNode(j)?j:null));},attachNode:function(j){var k=this.props.result.node;if(h.isElementNode(k))h.setContent(j,k);},componentDidMount:function(){this.attachNode(this.getDOMNode());},componentDidUpdate:function(j,k,l){this.attachNode(this.getDOMNode());},shouldComponentUpdate:function(j){return this.props.result.node!==j.result.node;}});e.exports=i;},null); __d("FacebarTypeaheadWebSuggestionItem.react",["FacebarTypeaheadItem.react","FacebarTypeaheadToken.react","React","cx","fbt"],function(a,b,c,d,e,f,g,h,i,j,k){var l={EXACT_MATCH:1,BING:2,BING_POPULAR:3,WEBSUGGESTIONS_AS_KEYWORDS:4},m=i.createClass({displayName:'FacebarTypeaheadWebSuggestionItem',renderToken:function(){if(this.props.result.isLockedWebSearchMode)return;var n=this.props.result.websuggestion_source,o;if(n===l.WEBSUGGESTIONS_AS_KEYWORDS){o="Search";}else if(n===l.BING_POPULAR){o="Popular Web Search";}else o="Web Search";return (h({innerClass:"_57q5",text:[o]}));},render:function(){this.props.result.icon_class="_6-a";return this.transferPropsTo(g({className:"_207",token:this.renderToken()}));}});e.exports=m;},null); __d("FacebarTypeaheadList.react",["React","ReactPropTypes","StaticContainer.react","FacebarTypeaheadEntityItem.react","FacebarTypeaheadGrammarItem.react","FacebarTypeaheadKeywordItem.react","FacebarTypeaheadTrendingItem.react","FacebarTypeaheadNodeItem.react","FacebarTypeaheadWebSuggestionItem.react","LoadingIndicator.react","FacebarJSConstants","cx","fbt"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s){var t={grammar:k,node:n,trending:m,related:l,websuggestion:o};t[q.browseTypes.keyword]=l;var u=g.createClass({displayName:'FacebarTypeaheadList',propTypes:{results:h.array,onRender:h.func,onSelect:h.func.isRequired,onHighlight:h.func.isRequired},getItemComponent:function(v,w){var x=v.type,y;if(v.results_set_type===q.browseTypes.keyword)x=q.browseTypes.keyword;if(v.node)x='node';if(x==null)x='entity';y=t[x];if(y==null){y=j;x='entity';}return {type:x,constructor:y};},renderItem:function(v,w){var x=this.getItemComponent(v);x=x.constructor({result:v,onClick:this.handleClick.bind(null,v),onMouseEnter:this.handleMouseEnter.bind(null,v)});return (i({key:v.semantic||v.uid||v.tuid},x));},renderFooter:function(){var v=(("_3su")+(!this.props.loading?' '+"hidden_elem":''));return (g.DOM.li({className:v},this.props.loading,g.DOM.div({className:"_21f"},"Retrieving suggestions",p({size:"medium",color:"white"}))));},render:function(){var v=this.props.results;return (g.DOM.ul({className:"_21c",role:"listbox"},v&&v.map(this.renderItem),this.renderFooter()));},handleClick:function(v,w){if(!w.nativeEvent.isMiddleClick()&&!w.nativeEvent.getModifiers().any){this.props.onSelect(v);w.preventDefault();}},handleMouseEnter:function(v){this.props.onHighlight(v);},componentDidUpdate:function(v,w,x){this.props.onRender();},shouldComponentUpdate:function(v){return this.props.loading!==v.loading||this.props.results!==v.results;}});e.exports=u;},null); __d("FacebarTypeaheadView",["Arbiter","CSS","ContextualLayer","DOM","FacebarGlobalOptions","FacebarTypeaheadList.react","Parent","React","TypeaheadView","copyProperties","performanceNow","csx","cx","fbt","URI","Link.react"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v){var w='unimplemented';for(var x in o)if(o.hasOwnProperty(x))z[x]=o[x];var y=o===null?null:o.prototype;z.prototype=Object.create(y);z.prototype.constructor=z;z.__superConstructor__=o;function z(aa,ba){"use strict";o.call(this,aa,ba);this.sid='';this.index=-1;this.warningShown=false;this.autoSelect=false;this.loading=false;this.handleRender=this.handleRender.bind(this);this.handleHighlight=this.handleHighlight.bind(this);this.handleSelect=this.handleSelect.bind(this);this.events=['highlight','render','filter'];}z.prototype.init=function(){"use strict";this.initializeElements();};z.prototype.initGSV2Elements=function(){"use strict";var aa=this.element;this.contentKeyword=j.find(aa,"._f7s");this.contentEntity=j.find(aa,"._f7t");this.keywordResultsContainer=j.create('div');this.entityResultsContainer=j.create('div');this.keywordResults=[];this.entityResults=[];};z.prototype.initGSV2Construct=function(){"use strict";this.contentKeyword.appendChild(this.keywordResultsContainer);this.contentEntity.appendChild(this.entityResultsContainer);this.resultsContainer.appendChild(this.contentKeyword);this.resultsContainer.appendChild(this.contentEntity);};z.prototype.initializeElements=function(){"use strict";var aa=this.element;this.isGSV2=k.graphSearchV2;this.content=j.find(aa,"._21r");this.warningNode=j.find(aa,"._553e");this.blockNotificationNode=j.find(aa,"._2hh");this.resultsContainer=j.create('div');if(this.isGSV2)this.initGSV2Elements();this.renderTypeaheadList();this.content.appendChild(this.resultsContainer);if(this.isGSV2)this.initGSV2Construct();};z.prototype.initializeLayer=function(){"use strict";this.layer=new i({context:m.byClass(this.causalElement,"_585-"),position:'below',causalElement:this.causalElement},this.element);var aa=this.layer.getContentRoot();this.root=j.find(aa,"._50c9");h.addClass(aa,"_5tlx");};z.prototype.setInputElement=function(aa){"use strict";this.setAccessibilityControlElement(aa);this.causalElement=aa;this.initializeLayer();};z.prototype.setAutoSelect=function(aa){"use strict";this.autoSelect=aa;if(this.index===-1&&aa)this.first();};z.prototype.handleHighlight=function(aa){"use strict";this.highlight(this.results.indexOf(aa),false);};z.prototype.handleSelect=function(aa){"use strict";this.handleHighlight(aa);this.select(true);};z.prototype.show=function(){"use strict";if(!this.visible){this.inform('beforeShow',this.layer);var aa=y.show.call(this);this.first();this.layer.show();this.layer.updatePosition();this.inform('show');g.inform('layer_shown',{type:'FacebarTypeahead'});return aa;}};z.prototype.hide=function(){"use strict";if(this.visible){this.layer.hide();y.hide.call(this);this.inform('hide');g.inform('layer_hidden',{type:'FacebarTypeahead'});}return this;};z.prototype.select=function(aa){"use strict";var ba=this.results&&this.results[this.index];if(!ba){this.inform('quickSelect');return;}var ca=this.inform('beforeSelect',{index:this.index,selected:ba});if(ca!==false)y.select.call(this,aa);};z.prototype.divideResults=function(aa){"use strict";this.keywordResults=[];this.entityResults=[];aa.forEach(function(ba){if(ba.type==='keyword'){this.keywordResults.push(ba);}else this.entityResults.push(ba);}.bind(this));return this.keywordResults.concat(this.entityResults);};z.prototype.buildResults=function(aa){"use strict";aa.forEach(function(ca){ca.query_string=this.value.toString();}.bind(this));this.results=aa;if(this.isGSV2)this.results=this.divideResults(aa);var ba=q();this.renderTypeaheadList({results:this.results,loading:this.loading});this.inform('logPerformanceTiming',{field:'build_results_set_props_duration',value:q()-ba});return this.resultsContainer;};z.prototype.getGSV2Items=function(){"use strict";var aa=y.getItems.call(this),ba=aa.slice(0,this.keywordResults.length),ca=aa.slice(this.keywordResults.length+1,-1);aa=ba.concat(ca);return aa;};z.prototype.getItems=function(){"use strict";if(this.isGSV2)return this.getGSV2Items();return y.getItems.call(this).slice(0,-1);};z.prototype.handleRender=function(){"use strict";this.items=this.getItems();};z.prototype.render=function(aa,ba,ca,da){"use strict";this.inform('filter',{results:ba,value:aa});this.seeMoreResult=null;if(ba.length&&aa.getLength()){this.seeMoreResult=this.inform('seeMore',{value:aa,results:ba});if(!this.loading&&this.seeMoreResult)ba.push(this.seeMoreResult);}var ea=ba[0];if(da){this.showWarning(t._("There are no results for '{query}'",[t.param("query",aa.toString())]));}else if(ea&&ea.results_set_type===w){if(!ea.error_info.suppress)this.showWarning(ea.error_info.errorMessage||"This search isn't currently supported.");}else this.hideWarning();if(this.inform('removeUnimplementedGrammar')!==false)ba=ba.filter(function(fa){return fa.results_set_type!==w;}.bind(this));y.render.call(this,aa,ba,ca);};z.prototype.reset=function(){"use strict";this.index=-1;this.items=[];this.results=[];this.value='';this.buildResults([]);this.inform('reset');return this;};z.prototype.showBlockNotification=function(aa){"use strict";var ba=u('https://www.facebook.com').setPath('/settings').addQueryData('tab','blocking'),ca=n.DOM.div(null,t._("You've blocked {fullName}. For more info on privacy and blocking, go to your {settings}.",[t.param("fullName",aa),t.param("settings",v({href:{url:ba}},"settings"))]));h.show(this.blockNotificationNode);n.renderComponent(ca,this.blockNotificationNode);};z.prototype.hideBlockNotification=function(){"use strict";h.hide(this.blockNotificationNode);j.setContent(this.blockNotificationNode,'');};z.prototype.showWarning=function(aa){"use strict";h.show(this.warningNode);j.setContent(this.warningNode,aa);this.warningShown=true;this.highlight(-1,false);};z.prototype.hideWarning=function(){"use strict";h.hide(this.warningNode);this.warningShown=false;this.highlight(this.index,false);};z.prototype.setLoading=function(aa){"use strict";if(this.loading!=aa){this.loading=aa;if(this.seeMoreResult){if(this.loading){this.results.splice(this.results.indexOf(this.seeMoreResult),1);}else this.results.push(this.seeMoreResult);this.buildResults(this.results);}else this.renderTypeaheadList({results:this.results,loading:aa});}};z.prototype.first=function(){"use strict";this.index=this.autoSelect?0:-1;this.highlight(this.index);};z.prototype.prev=function(){"use strict";if(this.index<=0)this.index=this.items.length;this.ignoreMouseover=true;y.prev.call(this);};z.prototype.next=function(){"use strict";if(this.index+1>=this.items.length)this.index=-1;this.ignoreMouseover=true;y.next.call(this);};z.prototype.highlight=function(aa,ba){"use strict";ba=ba!==false&&(this.index!=aa);if(!ba||this.inform('beforeHighlight')!==false){var ca=this.warningShown||!this.autoSelect?-1:0;y.highlight.call(this,Math.max(ca,aa),ba);}};z.prototype.copyProps=function(aa){"use strict";return p({onRender:this.handleRender,onHighlight:this.handleHighlight,onSelect:this.handleSelect},aa);};z.prototype.renderList=function(aa,ba){"use strict";n.renderComponent(l(this.copyProps(aa)),ba);};z.prototype.renderGSV2TypeaheadList=function(aa){"use strict";var ba=this.copyProps(aa),ca=this.copyProps(aa);ba.results=this.keywordResults;ba.loading=false;ca.results=this.entityResults;this.renderList(ba,this.keywordResultsContainer);this.renderList(ca,this.entityResultsContainer);h.conditionShow(this.contentKeyword,!!this.keywordResults.length);h.conditionShow(this.contentEntity,!!this.entityResults.length);};z.prototype.renderTypeaheadList=function(aa){"use strict";aa=aa||{};if(this.isGSV2){this.renderGSV2TypeaheadList(aa);}else this.renderList(aa,this.resultsContainer);};e.exports=z;},null); __d("FacebarTypeaheadAutoWidth",["CSS","cx"],function(a,b,c,d,e,f,g,h){function i(j){"use strict";this._view=j.view;}i.prototype.enable=function(){"use strict";g.addClass(this._view.element,"_5tw_");};i.prototype.disable=function(){"use strict";g.removeClass(this._view.element,"_5tw_");};e.exports=i;},null); __d("FacebarTypeaheadDecorateEntities",["arrayContains","copyProperties","emptyFunction"],function(a,b,c,d,e,f,g,h,i){function j(n){var o=[];n.forEach(function(p){if(p.isType('ent'))o.push(p.getUID());});return o;}function k(n,o){var p=null;n.structure.forEach(function(q){if(q.isType('ent')&&!g(o,q.getUID()))p=q;});return p;}function l(n,o,p){n.forEach(function(q){var r=k(q,o);q.decoration={entity:r&&p.getEntryForFragment(r)};});}function m(n){"use strict";this._typeahead=n;}m.prototype.enable=function(){"use strict";this._typeahead.view.subscribe('filter',function(n,o){l(o.results,j(this._typeahead.core.getValue()),this._typeahead.data);}.bind(this));};h(m.prototype,{disable:i});e.exports=m;},null); __d("FacebarTypeaheadDisambiguateResults",["FacebarDisambiguationDialog","FacebarStructuredFragment","FacebarStructuredText","URI","copyProperties","emptyFunction","getObjectValues"],function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(w,x){var y={};w.forEach(function(ba){if(ba.type=='grammar'){var ca=x(ba.structure).toLowerCase();y[ca]=y[ca]||[];y[ca].push(ba);}});var z=[];for(var aa in y)if(y[aa].length>1)z.push(y[aa]);return z;}function o(w){var x=[];w.toArray().forEach(function(y,z){if(y.isType('ent'))x.push(z);});return x;}function p(w,x,y){var z={},aa={},ba={};x.forEach(function(da){var ea=w[0].structure.getFragment(da),fa=ea.getHash();aa[fa]=aa[fa]||[];ba[da]=aa[fa];w.forEach(function(ga){var ha=ga.structure.getFragment(da),ia=ha&&ha.getUID();if(ia&&!z.hasOwnProperty(ia)){aa[fa].push(y.getEntryForFragment(ha));z[ia]=true;}});});for(var ca in ba)if(ba[ca].length<=1)delete ba[ca];return ba;}function q(w,x){var y={},z=[];w.forEach(function(aa){var ba=aa.structure.getFragment(x).getUID();if(!y.hasOwnProperty(ba)){y[ba]=z.length;z.push([]);}z[y[ba]].push(aa);});return z;}function r(w,x,y){var z=w.shift();z.ambiguity.entities=x;y.push.apply(y,w);return z;}function s(w,x){var y=[],z=[],aa=false;w.forEach(function(ca){ca.ambiguity={fragment:null,entities:null,text:null};});n(w,function(ca){return ca.getHash();}).forEach(function(ca){var da=ca[0].structure,ea=o(da),fa=p(ca,ea,x);if(aa){r(ca,fa,y);return;}var ga=ea.pop();if(typeof ga=='number'){var ha=q(ca,ga);aa=ha.length>1;if(aa)delete fa[ga];ha.forEach(function(ia){var ja=r(ia,fa,y);if(aa){var ka=ja.structure.getFragment(ga).getUID();ja.ambiguity.entity=x.getEntry(ka);z.push(ja);}});}});y.forEach(function(ca){var da=w.indexOf(ca);da!=-1&&w.splice(da,1);});n(w,function(ca){return ca.toString();}).forEach(function(ca){ca.forEach(function(da){if(!da.ambiguity.entities)da.ambiguity.text=da.queryTypeText;});});var ba=w.indexOf(z[0]);z.slice(1).forEach(function(ca){var da=w.indexOf(ca);if(da!=-1&&da!=++ba){w.splice(da,1);w.splice(ba,0,ca);}});}function t(w,x){var y=w&&w.ambiguity&&w.ambiguity.entities,z=y&&Object.keys(y).map(Number),aa=x.core.input;if(!z||z.length===0)return false;var ba=function(ea){x.core.executeQuery(u(w,z,ea));},ca=function(){aa.focus();aa.input.moveSelectionToEnd();};y=y?m(y):[];var da=new g(y,w.uri.getPath(),ba,ca,x.getCore().getSessionID());aa.blur();da.show();return true;}function u(w,x,y){var z=w.structure.toArray(),aa=j(w.uri),ba=aa.getPath().split('/');x.forEach(function(ca){var da=z[ca],ea=y.shift(),fa=ba.indexOf(String(da.getUID()));if(fa!=-1)ba[fa]=ea.uid;z[ca]=new h({uid:ea.uid,text:ea.text,type:'ent:'+ea.type});});return {uri:aa.setPath(ba.join('/')),structure:new i(z)};}function v(w){"use strict";this._typeahead=w;}v.prototype.enable=function(){"use strict";this._typeahead.view.subscribe('filter',function(w,x){s(x.results,this._typeahead.data);}.bind(this));this._typeahead.view.subscribe('beforeSelect',function(w,x){return !t(x.selected,this._typeahead);}.bind(this));};k(v.prototype,{disable:l});e.exports=v;},null); __d("FacebarTypeaheadHashtagResult",["HashtagSearchResultUtils"],function(a,b,c,d,e,f,g){function h(i){"use strict";this.$FacebarTypeaheadHashtagResult0=i.getData();}h.prototype.enable=function(){"use strict";this.$FacebarTypeaheadHashtagResult1=this.$FacebarTypeaheadHashtagResult0.subscribe('beforeQuery',this.$FacebarTypeaheadHashtagResult2.bind(this));};h.prototype.$FacebarTypeaheadHashtagResult2=function(i,j){"use strict";if(!j||!j.value)return;var k=this.$FacebarTypeaheadHashtagResult0.getRawStructure(j.value);if(!k||k.is_empty||!k.raw_text)return;var l=g.getHashtagFromQuery(k.raw_text);if(!l)return;var m='hashtag:'+l,n=this.$FacebarTypeaheadHashtagResult0.getEntry(m);if(!n){this.$FacebarTypeaheadHashtagResult0.processEntries([g.makeFacebarEntry(l)]);this.$FacebarTypeaheadHashtagResult0.resultStore.saveResults([g.makeFacebarResult(l)],k,true);}return;};h.prototype.disable=function(){"use strict";this.$FacebarTypeaheadHashtagResult1&&this.$FacebarTypeaheadHashtagResult0.unsubscribe(this.$FacebarTypeaheadHashtagResult1);};e.exports=h;},null); __d("FacebarTypeaheadMagGo",["csx","DOM","Event","$","SubscriptionsHandler"],function(a,b,c,d,e,f,g,h,i,j,k){function l(m){"use strict";this._core=m.getCore();this._view=this._core.view;this._handler=new k();this._selected=null;}l.prototype.enable=function(){"use strict";var m=h.find(j('blueBar'),"._585_");this._handler.addSubscriptions(i.listen(m,'click',this._runQuery.bind(this)),this._view.subscribe('highlight',this._highlight.bind(this)),this._view.subscribe('render',this._render.bind(this)),this._core.subscribe('close',this._close.bind(this)));};l.prototype.disable=function(){"use strict";this._handler.release();};l.prototype._highlight=function(m,n){"use strict";this._selected=n.selected;};l.prototype._render=function(m,n){"use strict";this._selected=this._view.results[this._view.index];};l.prototype._runQuery=function(){"use strict";if(this._selected)return this._core.selectView(null,{selected:this._selected});};l.prototype._close=function(){"use strict";this._selected=null;};e.exports=l;},null); __d("FacebarTypeaheadNavigation",["Arbiter","FacebarNavigation","copyProperties","emptyFunction"],function(a,b,c,d,e,f,g,h,i,j){function k(l){"use strict";this._core=l.core;this._preserveQuery=false;this._typeahead=l;}k.prototype.enable=function(){"use strict";h.registerBehavior(this);this._core.subscribe('execute',this.executedUserQuery.bind(this));};k.prototype.executedUserQuery=function(l,m){"use strict";this._preserveQuery=true;};k.prototype.pageTransition=function(){"use strict";if(!this._preserveQuery){this._core.close();this._core.reset();}else this._preserveQuery=false;};k.prototype.setPageQuery=function(l){"use strict";l=this._core.setPageQuery(l);this._typeahead.inform('navigation',l,g.BEHAVIOR_PERSISTENT);};i(k.prototype,{disable:j});e.exports=k;},null); __d("FacebarTypeaheadPrefixLengthOrderedCache",["copyProperties","emptyFunction","Arbiter"],function(a,b,c,d,e,f,g,h,i){function j(k){"use strict";this._typeahead=k;}j.prototype.enable=function(){"use strict";this._typeahead.data.inform('setSortFunction',function(k,l){if(k.cache_id_length!=l.cache_id_length)return k.cache_id_length-l.cache_id_length;var m=(k.cost||0)-(l.cost||0);if(m!==0)return m;return (k.semantic||'').localeCompare(l.semantic||'');},i.BEHAVIOR_STATE);};g(j.prototype,{disable:h});e.exports=j;},null); __d("FacebarTypeaheadQuickSelect",["FacebarStructuredText","URI"],function(a,b,c,d,e,f,g,h){var i='/search/web/direct_search.php';function j(k){"use strict";this._core=k.getCore();this._view=k.getView();this._input=this._core.input;this._beforeSelectListener=null;this._quickSelectListener=null;}j.prototype.enable=function(){"use strict";this._beforeSelectListener=this._view.subscribe('beforeSelect',this._quickSelect.bind(this));this._quickSelectListener=this._view.subscribe('quickSelect',this._quickSelect.bind(this));};j.prototype._quickSelect=function(k,l){"use strict";if(l&&l.selected&&l.selected.uid!=='search')return true;var m=this._input.getValue().toArray(),n=new g(m),o=n.toString();if(!o)return true;var p=h(i).addQueryData('q',o),q={input_query:o,type:'quickselect',text:o,position:0,with_mouse:0,semantic:'quickselect('+p.toString()+')',extra_uri_params:{source:'quickselect',sid:this._core.getSessionID()},uri:p};this._core.inform('quickSelectRedirect',q);this._core.executeQuery(q);return false;};j.prototype.disable=function(){"use strict";this._beforeSelectListener&&this._view.unsubscribe(this._beforeSelectListener);this._quickSelectListener&&this._view.unsubscribe(this._quickSelectListener);};e.exports=j;},null); __d("FacebarTypeaheadRecorderBasic",["FacebarTypeaheadRecorder","copyProperties"],function(a,b,c,d,e,f,g,h){function i(j){"use strict";this._typeahead=j;}i.prototype.enable=function(){"use strict";var j=this._typeahead;this._recorder=new g(j);};i.prototype.disable=function(){"use strict";this._typeahead.unsubscribe(this._subscription);this._recorder=null;this._subscription=null;};h(i.prototype,{_subscription:null});e.exports=i;},null); __d("FacebarTypeaheadSearchMap",["URI"],function(a,b,c,d,e,f,g){function h(i){"use strict";this._typeahead=i;this._subscription=null;}h.prototype.enable=function(){"use strict";this._subscription=this._typeahead.core.subscribe('execute',function(i,j){if(this._moveMapToQuery(j))return true;}.bind(this));};h.prototype._moveMapToQuery=function(i){"use strict";var j=i.results_set_type==='browse_type_place'||i.results_set_type==='page',k=window.searchmap&&window.location.pathname==='/nearby';if(!j||i.is_redirect){return false;}else if(k){window.searchmap.doFacebarSearch(i);return true;}else{var l=g('/nearby').addQueryData({query:i.structure._textHash,query_path:i.uri.getPath(),ref:'typeahead'});l.go();return true;}};h.prototype.disable=function(){"use strict";this._subscription&&this._subscription.unsubscribe();};e.exports=h;},null); __d("FacebarTypeaheadSeeMoreSerp",["cx","FacebarStructuredText","FacebarURI","fbt","URI","React"],function(a,b,c,d,e,f,g,h,i,j,k,l){function m(n){"use strict";this.$FacebarTypeaheadSeeMoreSerp0=n.getCore();this.$FacebarTypeaheadSeeMoreSerp1=this.$FacebarTypeaheadSeeMoreSerp0.view;}m.prototype.enable=function(){"use strict";this.$FacebarTypeaheadSeeMoreSerp2=this.$FacebarTypeaheadSeeMoreSerp1.subscribe('seeMore',this.$FacebarTypeaheadSeeMoreSerp3.bind(this));};m.prototype.disable=function(){"use strict";this.$FacebarTypeaheadSeeMoreSerp2.unsubscribe();};m.prototype.$FacebarTypeaheadSeeMoreSerp3=function(n,o){"use strict";var p=o.value.toString().trim();p=p.replace(/web\ssearch[\:]*\s*/i,'');var q=j._("See more results for \"{query}\"",[j.param("query",p)]),r=l.DOM.div({className:"_57zy calltoaction",'aria-label':q},l.DOM.span({className:"text"},l.DOM.span({className:"seeMore"},q))),s=k(this.$FacebarTypeaheadSeeMoreSerp1.seeMoreSerpEndpoint).addQueryData('q',p).addQueryData('sid',this.$FacebarTypeaheadSeeMoreSerp0.getSessionID());s=i.getQualifiedURI(s);return {uid:'see_more_serp',node:r,structure:new h(),search:true,uri:s,semantic:'seemore('+p+')',type:'see_more_serp',text:p};};e.exports=m;},null); __d("FacebarTypeaheadSelectAll",["requestAnimationFrame"],function(a,b,c,d,e,f,g){function h(i){"use strict";this._core=i.getCore();this._listener=null;}h.prototype.enable=function(){"use strict";var i=this._core.input;this._listener=this._core.subscribe('focus',function(j,k){var l=k&&k.catchup;l||g(function(){i.selectInput();});});};h.prototype.disable=function(){"use strict";this._listener&&this._core.unsubscribe(this._listener);};e.exports=h;},null); __d("FacebarTypeaheadShortcut",["FacebarTypeaheadShortcutConfig","KeyEventController","Run","copyProperties","emptyFunction"],function(a,b,c,d,e,f,g,h,i,j,k){function l(m){"use strict";this._input=m.core.input;this._view=m.view;this._listener=null;}l.prototype.enable=function(){"use strict";this._registerListener();};l.prototype._registerListener=function(){"use strict";h.registerKey('SLASH',this._handleKeydown.bind(this));i.onLeave(function(){setTimeout(this._registerListener.bind(this),0);}.bind(this));};l.prototype._handleKeydown=function(m){"use strict";var n=m.getModifiers().shift;if(n&&!g.gkWebShortcut)return;this._view.setAutoSelect(true);this._input.focus();this._input.selectInput();this._input.inform('shortcut',{shift:n});return false;};j(l.prototype,{disable:k});e.exports=l;},null); __d("FacebarTypeaheadSizeAdjuster",["copyProperties","createArrayFrom","clip","emptyFunction","Style","Vector"],function(a,b,c,d,e,f,g,h,i,j,k,l){var m=12,n=20,o=50,p=200,q=5;function r(t){return l.getElementDimensions(t).x;}function s(t){"use strict";this._core=t.getCore();this._view=this._core.view;this._input=this._core.input;this._cachedSizes={};this._appliedSize=null;this._defaultSize=this.getDefaultFontSize();this._calculatedSize=this._defaultSize;this._containerWidth=this.getContainerWidth();}s.prototype.enable=function(){"use strict";this._input.subscribe('change',this.adjustFontSize.bind(this));this.adjustFontSize();};s.prototype.getContainerWidth=function(){"use strict";return l.getElementDimensions(this._input.getElement()).x;};s.prototype.getDefaultFontSize=function(){"use strict";var t=k.get(this._input.getElement(),'font-size'),u=/^([\d\.]+)px$/.exec(t),v=u&&Number(u[1]);return Math.max(m,Math.min(n,v));};s.prototype.calculateFontSize=function(){"use strict";var t=this.getTextWidth(),u=this._calculatedSize;if(t>this._containerWidth-o){u--;}else if(t