/*!CK:1491575586!*//*1438123868,*/

if (self.CavalryLogger) { CavalryLogger.start_js(["pH5bi"]); }

__d("MXUIButton.react",["React","cx","joinClasses"],function(a,b,c,d,e,f,g,h,i){b.__markCompiled&&b.__markCompiled();var j=g,k=j.PropTypes,l=g.createClass({displayName:"MXUIButton",propTypes:{label:k.string,size:k.oneOf(['small','medium','large']),use:k.oneOf(['special','primary','normal'])},getDefaultProps:function(){return {use:'normal',size:'small'};},getClassListForAttribute:function(m){var n={size:{medium:"_56bw",large:"_56bx"},use:{special:"_56bv",primary:"_56bu",normal:"_56bt"}};return n[m][this.props[m]];},render:function(){var m=i("_56bs",this.getClassListForAttribute('size'),this.getClassListForAttribute('use'));if(this.props.href)return (g.createElement("a",g.__spread({},this.props,{href:this.props.href,className:i(this.props.className,m)}),this.props.children||this.props.label));return (g.createElement("button",g.__spread({},this.props,{type:"submit",className:i(this.props.className,m)}),this.props.children||this.props.label));}});e.exports=l;},null);
__d("arrayContains",[],function(a,b,c,d,e,f){b.__markCompiled&&b.__markCompiled();function g(h,i){return h.indexOf(i)!=-1;}e.exports=g;},null);
__d("cssURL",[],function(a,b,c,d,e,f){b.__markCompiled&&b.__markCompiled();function g(h){return "url('"+h.replace(/(\\|\s|\(|\)|'|\")/g,'\\$1')+"')";}e.exports=g;},null);
__d("DOMContainer.react",["React","invariant","isNode"],function(a,b,c,d,e,f,g,h,i){b.__markCompiled&&b.__markCompiled();var j=g,k=j.PropTypes,l=g.createClass({displayName:"DOMContainer",propTypes:{display:k.oneOf(['inline','block'])},getDefaultProps:function(){return {display:'inline'};},getDOMChild:function(){var m=this.props.children;h(i(m));return m;},shouldComponentUpdate:function(m,n){return m.children!==this.props.children;},componentDidMount:function(){g.findDOMNode(this).appendChild(this.getDOMChild());},componentDidUpdate:function(){var m=g.findDOMNode(this);while(m.lastChild)m.removeChild(m.lastChild);m.appendChild(this.getDOMChild());},render:function(){if(this.props.display==='block')return g.createElement("div",g.__spread({},this.props),undefined);return g.createElement("span",g.__spread({},this.props),undefined);}});e.exports=l;},null);
__d("LeftRight.react",["React","ReactChildren","cx","invariant","keyMirror","joinClasses"],function(a,b,c,d,e,f,g,h,i,j,k,l){b.__markCompiled&&b.__markCompiled();var m=k({left:true,right:true,both:true});function n(p){j(p&&(p.length===1||p.length===2));}var o=g.createClass({displayName:"LeftRight",render:function(){var p=[];h.forEach(this.props.children,function(x){p.push(x);},this);n(p);var q=this.props.direction||m.both,r=(q===m.both),s=r||q===m.left?"_ohe lfloat":'',t=r||q===m.right?"_ohf rfloat":'',u=g.createElement("div",{key:"left",className:s},p[0]),v=(p.length<2)?null:g.createElement("div",{key:"right",className:t},p[1]),w=(q===m.right&&v)?[v,u]:[u,v];return (g.createElement("div",g.__spread({},this.props,{className:l(this.props.className,"clearfix")}),w));}});o.DIRECTION=m;e.exports=o;},null);
__d("FacebarResultsTextHighlighter",["React"],function(a,b,c,d,e,f,g){b.__markCompiled&&b.__markCompiled();var h={highlightAddedChars:function(i,j){var k=[],l=j.trim().toLowerCase(),m=i.trim().split(' ');while(m.length>0&&l.length>0){var n=m.shift(),o=l.indexOf(n),p=j,q=p.length;if(o>0){var r=j.substr(0,o);p=[g.createElement("strong",{key:this._generateKey(r)},r),n];q=o+n.length;}else if(o===0){q=n.length;p=j.substr(0,q);}k.push(p);l=l.substr(q);j=j.substr(q);}if(j.length!==0)k.push(g.createElement("strong",{key:this._generateKey(j)},j));return k;},_generateKey:function(i){return 'highlight_'+i+Math.random();}};e.exports=h;},null);
__d("TokenizeUtil",[],function(a,b,c,d,e,f){b.__markCompiled&&b.__markCompiled();var g=/[ ]+/g,h=/[^ ]+/g,i=new RegExp(j(),'g');function j(){return '[.,+*?$|#{}()\'\\^\\-\\[\\]\\\\\\/!@%"~=<>_:;'+'\u30fb\u3001\u3002\u3008-\u3011\u3014-\u301f\uff1a-\uff1f\uff01-\uff0f'+'\uff3b-\uff40\uff5b-\uff65\u2E2E\u061f\u066a-\u066c\u061b\u060c\u060d'+'\uFD3e\uFD3F\u1801\u0964\u104a\u104b\u2010-\u2027\u2030-\u205e'+'\u00a1-\u00b1\u00b4-\u00b8\u00ba\u00bb\u00bf]';}var k={},l={a:"\u0430 \u00e0 \u00e1 \u00e2 \u00e3 \u00e4 \u00e5 \u0101",b:"\u0431",c:"\u0446 \u00e7 \u010d",d:"\u0434 \u00f0 \u010f \u0111",e:"\u044d \u0435 \u00e8 \u00e9 \u00ea \u00eb \u011b \u0113",f:"\u0444",g:"\u0433 \u011f \u0123",h:"\u0445 \u0127",i:"\u0438 \u00ec \u00ed \u00ee \u00ef \u0131 \u012b",j:"\u0439",k:"\u043a \u0138 \u0137",l:"\u043b \u013e \u013a \u0140 \u0142 \u013c",m:"\u043c",n:"\u043d \u00f1 \u0148 \u0149 \u014b \u0146",o:"\u043e \u00f8 \u00f6 \u00f5 \u00f4 \u00f3 \u00f2",p:"\u043f",r:"\u0440 \u0159 \u0155",s:"\u0441 \u015f \u0161 \u017f",t:"\u0442 \u0165 \u0167 \u00fe",u:"\u0443 \u044e \u00fc \u00fb \u00fa \u00f9 \u016f \u016b",v:"\u0432",y:"\u044b \u00ff \u00fd",z:"\u0437 \u017e",ae:"\u00e6",oe:"\u0153",ts:"\u0446",ch:"\u0447",ij:"\u0133",sh:"\u0448",ss:"\u00df",ya:"\u044f"};for(var m in l){var n=l[m].split(' ');for(var o=0;o<n.length;o++)k[n[o]]=m;}var p={};function q(w){return w?w.replace(i,' '):'';}function r(w){w=w.toLowerCase();var x='',y='';for(var z=w.length;z--;){y=w.charAt(z);x=(k[y]||y)+x;}return x.replace(g,' ');}function s(w){var x=[],y=h.exec(w);while(y){y=y[0];x.push(y);y=h.exec(w);}return x;}function t(w,x){if(!p.hasOwnProperty(w)){var y=r(w),z=q(y);p[w]={value:w,flatValue:y,tokens:s(z),isPrefixQuery:z&&z[z.length-1]!=' '};}if(x&&typeof p[w].sortedTokens=='undefined'){p[w].sortedTokens=p[w].tokens.slice();p[w].sortedTokens.sort(function(aa,ba){return ba.length-aa.length;});}return p[w];}function u(w,x,y){var z=t(x,w=='prefix'),aa=w=='prefix'?z.sortedTokens:z.tokens,ba=t(y).tokens,ca={},da=z.isPrefixQuery&&w=='query'?aa.length-1:null,ea=function(fa,ga){for(var ha=0;ha<ba.length;++ha){var ia=ba[ha];if(!ca[ha]&&(ia==fa||((w=='query'&&ga===da||w=='prefix')&&ia.indexOf(fa)===0)))return (ca[ha]=true);}return false;};return Boolean(aa.length&&aa.every(ea));}var v={flatten:r,parse:t,getPunctuation:j,isExactMatch:u.bind(null,'exact'),isQueryMatch:u.bind(null,'query'),isPrefixMatch:u.bind(null,'prefix'),tokenize:s};e.exports=v;},null);
__d("MContentSearchFilter",["Stratcom"],function(a,b,c,d,e,f,g){b.__markCompiled&&b.__markCompiled();var h={setFilters:function(i){this.markup=i;g.invoke('m-content-search-filter-update',null,{markup:i});},getFilters:function(){var i=this.markup;this.markup=null;return i;}};e.exports=h;},null);
__d("MGraphSearchUtils",[],function(a,b,c,d,e,f){b.__markCompiled&&b.__markCompiled();var g={normalizeQuery:function(h){return h.replace(/^.*\/\//,'').replace(/\//g,'%2F').replace(/\\/g,'%5C').replace(/ /g,'+').replace(/\?/g,'3F').replace(/#/g,'%23');}};e.exports=g;},null);
__d("MContentSearchFilterFlyout",["Style"],function(a,b,c,d,e,f,g){b.__markCompiled&&b.__markCompiled();var h,i={init:function(j){j.addListener('aftershow',function(){h=g.get(document.body,'overflow');g.set(document.body,'overflow','hidden');});j.addListener('hide',function(){g.set(document.body,'overflow',h);});}};e.exports=i;},null);
__d("MGraphSearchCompositeSource",["TypeaheadCompositeSource"],function(a,b,c,d,e,f,g){b.__markCompiled&&b.__markCompiled();for(var h in g)if(g.hasOwnProperty(h))j[h]=g[h];var i=g===null?null:g.prototype;j.prototype=Object.create(i);j.prototype.constructor=j;j.__superConstructor__=g;function j(){"use strict";if(g!==null)g.apply(this,arguments);}j.prototype.mergeResults=function(k,l){"use strict";var m,n,o,p,q,r=i.mergeResults.call(this,k,l);if(!r||!this.$MGraphSearchCompositeSource0||r.some(function(ea){return ea.type==='trending';})||r.some(function(ea){return ea.isRecentSearch;}))return r;r.length=Math.min(r.length,this.$MGraphSearchCompositeSource0.maxResults);if(this.$MGraphSearchCompositeSource0.enableLegacyStyleBucketization)return this.bucketResults(r);var s=false,t=r[0];if(t&&((t.bootstrapped||t.bootstrap)||(t.type==='user'&&t.cost<this.$MGraphSearchCompositeSource0.minCostForUserToSurfaceAtTop)))s=true;var u=false;for(var v=0;v<this.$MGraphSearchCompositeSource0.maxPositionOfEntityToDivideKeywords;v++)if(r[v]&&r[v].type!=='keyword')u=true;var w=[],x=[],y=[],z=null;for(var aa=0;aa<r.length;aa++){z=r[aa];if(!(z.bootstrapped&&this.$MGraphSearchCompositeSource0.keepBootstrapped)&&z.type in this.$MGraphSearchCompositeSource0.filterOutTypes)continue;if(z.type==='keyword'){if(!s&&(!u||x.length<this.$MGraphSearchCompositeSource0.maxKeywordAboveEntities)){x.push(z);}else y.push(z);}else w.push(z);}if(this.$MGraphSearchCompositeSource0.overrideKWRankingBehavior){var ba=x;(m=ba).push.apply(m,y);var ca=ba.slice(0,this.$MGraphSearchCompositeSource0.numKeywordsAboveEntities),da=ba.slice(this.$MGraphSearchCompositeSource0.numKeywordsAboveEntities);r=ca;(n=r).push.apply(n,w);if(this.$MGraphSearchCompositeSource0.hasKeywordsBelowEntities)(o=r).push.apply(o,da);}else{r=x;(p=r).push.apply(p,w);(q=r).push.apply(q,y);}return r;};j.prototype.bucketResults=function(k){"use strict";if(!k.length)return k;var l,m,n=[],o={};for(var p=0,q=k.length;p<q;p++){l=k[p];m=this.getBucketType(l);if(!o[m]){n.push(m);o[m]=[l];}else o[m].push(l);}return n.reduce(function(r,s){return r.concat(o[s]);},[]);};j.prototype.getBucketType=function(k){"use strict";if(k.type==='keyword'||k.is_grammar)return 'keyword';return 'entity';};j.prototype.setConfig=function(k){"use strict";this.$MGraphSearchCompositeSource0=k;};e.exports=j;},null);
__d("MGraphSearchTypeaheadHeaders",["fbt","keyMirror"],function(a,b,c,d,e,f,g,h){b.__markCompiled&&b.__markCompiled();var i=h({RECENT:null,SUGGESTED:null,TOP_MATCHES:null,TRENDING:null,GROUP_POPULAR:null,GROUP_SEARCH:null,SUGGESTED_GLOBAL:null}),j={RECENT:g._("Recent Searches"),SUGGESTED:g._("Searches"),TOP_MATCHES:g._("Top Matches"),TRENDING:g._("Trending"),GROUP_POPULAR:g._("Popular in this group"),GROUP_SEARCH:g._("Search this group"),SUGGESTED_GLOBAL:g._("Search all of Facebook")};e.exports={Types:i,Labels:j};},null);
__d("MGraphSearchTypeaheadBucketizer",["MGraphSearchTypeaheadHeaders"],function(a,b,c,d,e,f,g){b.__markCompiled&&b.__markCompiled();var h=g.Types,i=10;function j(l){if(l.isTrending){return h.TRENDING;}else if(l.isRecentSearch){return h.RECENT;}else if(l.isScoped){return l.isNullStateSuggestion?h.GROUP_POPULAR:h.GROUP_SEARCH;}else if(l.type==='keyword'){return h.SUGGESTED;}else return h.TOP_MATCHES;}function k(l){"use strict";l=l||{};this.maxResults=l.maxResults||i;}k.prototype.bucketize=function(l){"use strict";var m={},n=Math.min(l.length,this.maxResults);for(var o=0;o<n;o++){var p=l[o],q=j(p);if(!m[q])m[q]=[];m[q].push(p);}return m;};e.exports=k;},null);
__d("MGraphSearchTypeaheadOnDemandSource",["MTypeaheadOnDemandSource","TokenizeUtil","createArrayFromMixed","Stratcom"],function(a,b,c,d,e,f,g,h,i,j){b.__markCompiled&&b.__markCompiled();var k='graph-search-entry-point';for(var l in g)if(g.hasOwnProperty(l))n[l]=g[l];var m=g===null?null:g.prototype;n.prototype=Object.create(m);n.prototype.constructor=n;n.__superConstructor__=g;function n(o,p){"use strict";g.call(this,o,p);this.enableImmediateReturnOfCachedResults=true;this.setNormalizer(function(q){return q.toLowerCase();});this.setSanitizer(function(q){return q;});this.queryCache={};this.groupID=null;j.listen('setCurrentProfileID',k,function(event){if(event.getData().profileID!==this.groupID){this.groupID=event.getData().profileID;this.clearCache();}}.bind(this));}n.prototype.getMatchedResults=function(o){"use strict";var p=o.toLowerCase();while(p.length>0&&!(p in this.queryCache))p=p.substr(0,p.length-1);if(!p)return [];var q=[];if(p===o){q=this.queryCache[o];return this.renderNodes(o,q);}for(var r=0;r<this.queryCache[p].length;r++){var s=this.queryCache[p][r];if(h.isQueryMatch(o,this._raw[s].display))q.push(s);}return this.renderNodes(o,q);};n.prototype.addToLookup=function(o,p){"use strict";this.addToQueryCache(o,p);};n.prototype.addResult=function(o,p){"use strict";var q=o.uid;if(!(q in this._raw)){o=(this.getTransformer()||this._defaultTransformer)(o);this._raw[q]=o;}this._raw[q].idx=o.idx;this.addToQueryCache(q,p);};n.prototype.addToQueryCache=function(o,p){"use strict";if(!this.queryCache[p])this.queryCache[p]=[];if(this.queryCache[p].indexOf(o)===-1)this.queryCache[p].push(o);};n.prototype.setGroupID=function(o){"use strict";this.groupID=o;};n.prototype.getAuxiliaryData=function(){"use strict";if(this.groupID!=null)return {group_id:this.groupID};};n.prototype.tokenize=function(o){"use strict";var p=m.tokenize.call(this,o);if(p[p.length-1]==='')p.pop();return p;};n.prototype.ondata=function(o,p,q){"use strict";if(q.payload){if(p)p=p.toLowerCase();m.ondata.call(this,o,p,i(q.payload));}else{this.invoke('req_recv',0);this.invoke('complete');}};n.prototype.getTransformer=function(){"use strict";return function(o){if(o.type==='keyword')return {cost:o.cost,idx:o.idx,display:o.text,name:o.text,type:o.untranslated_type||o.type,id:o.uid,uri:o.path,saved_context:o.saved_context,logInfo:o.logInfo,subtext:o.subtext,is_grammar:o.grammar_type!=null,isScoped:o.is_scoped};return {name:o.text,uri:o.path,id:o.uid,display:o.display||o.text,photo:o.photo,category:o.category,cost:o.cost,idx:o.idx,tokens:o.tokens,type:o.untranslated_type||o.type,verticalType:o.vertical_type,subtext:o.subtext,saved_context:o.saved_context,isVerified:o.is_verified,showBlueSeal:o.show_blue_seal,showGraySeal:o.show_gray_seal,logInfo:o.logInfo};};};n.prototype.clearCache=function(){"use strict";m.clearCache.call(this);this.queryCache={};};e.exports=n;},null);
__d("MGraphSearchTypeaheadTouchSource",["MTypeaheadTouchSource","createArrayFromMixed"],function(a,b,c,d,e,f,g,h){b.__markCompiled&&b.__markCompiled();for(var i in g)if(g.hasOwnProperty(i))k[i]=g[i];var j=g===null?null:g.prototype;k.prototype=Object.create(j);k.prototype.constructor=k;k.__superConstructor__=g;function k(){"use strict";if(g!==null)g.apply(this,arguments);}k.prototype.ondata=function(l){"use strict";this.setNormalizer(function(m){return m.toLowerCase();});j.ondata.call(this,h(l.payload||l));};k.prototype.checkFragmentMatches=function(l,m,n,o){"use strict";if(l.substr(0,m.length)!==m)return false;var p=n[n.length-1]!==' ';if(!p||m!==o)return l==m;return true;};k.prototype.tokenize=function(l){"use strict";var m=j.tokenize.call(this,l);if(m[m.length-1]==='')m.pop();return m;};k.prototype.getTransformer=function(){"use strict";return function(l){return {name:l.text,uri:l.path,id:l.uid,display:l.display||l.text,photo:l.photo,category:l.category,cost:l.cost,idx:l.idx,tokens:l.tokens,type:l.untranslated_type||l.type,verticalType:l.vertical_type,subtext:l.text_only_subtext,logInfo:l.logInfo,bootstrapped:true,saved_context:l.saved_context};};};e.exports=k;},null);
__d("MGraphSearchTypeaheadResult.react",["FacebarResultsTextHighlighter","React","cssURL","cx","MSearchConst"],function(a,b,c,d,e,f,g,h,i,j,k){b.__markCompiled&&b.__markCompiled();var l=' \u00B7 ',m=h.createClass({displayName:"MGraphSearchTypeaheadResult",render:function(){var n=this.props.result.subtext,o=(this.props.query||'').toLowerCase(),p=this.props.result.display,q='';if(!this.props.result.isRecentSearch&&!this.props.result.isNullStateSuggestion&&this.props.result.type==='keyword'&&this.props.result.display)p=g.highlightAddedChars(o,p);if(this.props.result.saved_context&&n){q=h.createElement("span",{className:"_2gau"},this.props.result.saved_context);n=l+n;}var r=this.props.forceLongBorder,s=this.props.vertical===k.feed_search&&this.props.result.type==='keyword',t=(("_1_oa")+(' '+"_1w-s")+(this.props.result.isTrending?' '+"_1_ob":'')+(this.props.result.isVerified?' '+"_21tt":'')+(this.props.result.showBlueSeal?' '+"_1bam":'')+(this.props.result.showGraySeal?' '+"_1ban":'')+(!!n?' '+"_1_oc":'')+(this.props.result.photo!=null?' '+"_1_od":'')+(s?' '+"_18ka":'')+(r?' '+"_bmx":'')),u=(("_5h5e")+(this.props.result.isTrending&&!this.props.result.isVerified?' '+"_22wu":'')+(!this.props.result.isTrending&&this.props.result.isVerified?' '+"_22wv":'')+(this.props.result.isTrending&&this.props.result.isVerified?' '+"_22ww":'')),v=s,w=null;if(this.props.vertical!==k.content_search)w=(h.createElement("div",{className:"_38c2",onTouchStart:this.props.onAddToInputClick,onMouseDown:this.props.onAddToInputClick}));return (h.createElement("div",{className:t},h.createElement("div",{className:(("_w_1")+(!r?' '+"_bmx":''))},h.createElement("a",{className:(("touchable")+(' '+"_4rh3")),href:this.props.result.uriWithSession,onClick:this.props.onClick,rel:this.props.result.id,style:{display:this.props.visible?'':'none'}},h.createElement("i",{className:(("img")+(s?' '+"_15i9":'')),style:{display:v?'block':'none'}}),h.createElement("div",{className:"_1_oe"},h.createElement("span",{className:u},p),h.createElement("i",{className:"_21tu img"}),h.createElement("i",{className:"_1bao img"}),h.createElement("i",{className:"_1bap img"})),h.createElement("div",{className:"_1_og"},q,n),this.renderPhoto()),w)));},renderPhoto:function(){if(this.props.result.type==='trending')return (h.createElement("i",{className:"img _1_of _1_oh"}));var n=this.props.result.photo?i(this.props.result.photo):'none';return (h.createElement("i",{className:"_1_oh",style:{backgroundImage:n}}));}});e.exports=m;},null);
__d("MSearchComponentLogger",["Banzai","ge","Stratcom","Parent","DOM"],function(a,b,c,d,e,f,g,h,i,j,k){b.__markCompiled&&b.__markCompiled();var l='mtouch_search_component_logging',m='m-search-component-marker-sigil',n='click',o='impression';function p(q,r,s){"use strict";if(!q)return;this.logData=r;if(s){this.logData.unique_id=this.$MSearchComponentLogger0();this.$MSearchComponentLogger1();}this.sigils=q;this.$MSearchComponentLogger2=this.$MSearchComponentLogger2.bind(this);q.forEach(function(t){i.listen('click',t,this.$MSearchComponentLogger2);}.bind(this));}p.prototype.$MSearchComponentLogger0=function(q){"use strict";var r=Date.now();return this.logData.userid+this.logData.typeid+r;};p.prototype.$MSearchComponentLogger1=function(){"use strict";var q=this.logData;q.event=o;g.post(l,q,{delay:0,retry:true});};p.prototype.$MSearchComponentLogger3=function(q){"use strict";while(q){if(i.hasSigil(q,m))return q;if(q.getAttribute('data-sigil')){q=q.parentNode;}else q=j.byAttribute(q,'data-sigil');}return null;};p.prototype.$MSearchComponentLogger2=function(q){"use strict";var r=this.$MSearchComponentLogger3(q.getTarget());if(!r)return;var s=null;this.sigils.forEach(function(u){if(i.hasSigil(r,u))s=u;});this.logData.sigil=s;var t=this.logData;t.event=n;t=this.$MSearchComponentLogger4(t);g.post(l,t,{delay:0,retry:true});};p.prototype.$MSearchComponentLogger4=function(q){"use strict";var r=h('main-search-input');if(r){q.query=r.value;var s=j.byTag(r,'form'),t=k.scry(s,'input','search-typeahead-session-id')[0];if(t)q.tsid=t.value;}return q;};e.exports=p;},null);
__d("MSearchComponentLoggerHelper.react",["React","MSearchComponentLogger"],function(a,b,c,d,e,f,g,h){b.__markCompiled&&b.__markCompiled();var i=g.createClass({displayName:"MSearchComponentLoggerHelper",componentWillMount:function(){var j={userid:this.props.userid,component_location:this.props.componentLocation,typeid:this.props.typeid,source:this.props.source};this.logger=new h(this.props.targetSigils,j,true);},render:function(){return this.props.children;}});e.exports=i;},null);
__d("MFeedSearchMegaphone.react",["React","cx","ix","fbt","MXUILayout.react","MXUILayoutFillColumn.react","MXUIButton.react","Image.react","MSearchComponentLoggerHelper.react"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){b.__markCompiled&&b.__markCompiled();var p="m-nullstate-megaphone-close",q="m-nullstate-megaphone-take-tour",r='m-search-component-marker-sigil',s=g.createClass({displayName:"MFeedSearchMegaphone",render:function(){var t=i('/images/mobile/search/search_nullstate_mega_kayak.png'),u=i('/images/mobile/search/search_nullstate_mega_baseball.png');return (g.createElement(o,{userid:this.props.userid,componentLocation:"nullstate",typeid:"feed_search_megaphone",targetSigils:[p,q]},g.createElement("div",{className:"_qrv"},g.createElement("div",{className:"_qrw"},g.createElement("a",{href:"#","data-sigil":r+' '+p,onClick:this.props.onDismissClick},g.createElement(n,{src:i('/images/mobile/glyph/cross_dark-grey_m.png')}))),g.createElement("strong",null,j._("Now you can find old posts like:")),g.createElement(k,null,g.createElement(l,{align:"center"},g.createElement("div",{className:"_qrx"},j._("kayak trip john smith")),g.createElement(n,{src:t})),g.createElement(l,{align:"center"},g.createElement("div",{className:"_qrx"},j._("little league win dave")),g.createElement(n,{src:u}))),g.createElement("div",{className:"_21vt"},g.createElement(m,{use:"primary","data-sigil":r+' '+q,onClick:this.props.onActionClick},j._("Learn More"))))));}});e.exports=s;},null);
__d("MFeedSearchModeSwitch.react",["React","cx","ix","fbt","Image.react","MXUILayout.react","MXUILayoutFillColumn.react","MSearchComponentLoggerHelper.react"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n){b.__markCompiled&&b.__markCompiled();var o="m-nullstate-modeswitch-post",p="m-nullstate-modeswitch-simple",q='m-search-component-marker-sigil',r=g.createClass({displayName:"MFeedSearchModeSwitch",getInitialState:function(){return {simpleSearchMode:this.props.simpleSearchMode,hasResults:this.props.hasResults};},shouldComponentUpdate:function(s,t){return s.simpleSearchMode!==this.props.simpleSearchMode||s.hasResults!==this.props.hasResults;},render:function(){var s=this.props.simpleSearchMode?i('/images/mobile/search/search_mode_people_active.png'):i('/images/mobile/search/search_mode_people_inactive.png'),t=this.props.simpleSearchMode?i('/images/mobile/search/search_mode_post_inactive.png'):i('/images/mobile/search/search_mode_post_active.png'),u=this.props.tiny?null:(g.createElement("div",{className:"_4y5n"},g.createElement(k,{src:s}))),v=this.props.tiny?null:(g.createElement("div",{className:"_4y5n"},g.createElement(k,{src:t}))),w=this.props.tiny?(j._("People & Pages")):(j._("Search for people, places & things")),x=this.props.tiny?(j._("Posts")):(j._("Search for a post")),y=((this.props.tiny?"_1w8d":'')+(this.props.tiny&&this.props.hasResults?' '+"_1w8e":'')),z=(("_4y5m")+(this.props.simpleSearchMode?' '+"_1w8f":'')),aa=(("_4y5p")+(!this.props.simpleSearchMode?' '+"_1w8f":''));return (g.createElement(n,{userid:this.props.userid,componentLocation:"nullstate",typeid:"feed_search_modeswitch",targetSigils:[o,p]},g.createElement(l,{className:y},g.createElement(m,{align:"center",className:z},g.createElement("a",{href:"#","data-sigil":q+' '+p,onTouchStart:this.onMouseOrTouchDown,onMouseDown:this.onMouseOrTouchDown,onTouchEnd:this.onRegularSearchClick,onMouseUp:this.onRegularSearchClick},u,g.createElement("div",{className:"_4y5o"},w))),g.createElement(m,{align:"center",className:aa},g.createElement("a",{"data-sigil":q+' '+o,href:"#",onTouchStart:this.onMouseOrTouchDown,onMouseDown:this.onMouseOrTouchDown,onTouchEnd:this.onPostSearchClick,onMouseUp:this.onPostSearchClick},v,g.createElement("div",{className:"_4y5o"},x))))));},onRegularSearchClick:function(){this.props.onRegularSearchClick();},onPostSearchClick:function(){this.props.onPostSearchClick();},onMouseOrTouchDown:function(event){event.stopPropagation();event.preventDefault();}});e.exports=r;},null);
__d("XSearchFeedSearchMegaphoneDismissController",["XController"],function(a,b,c,d,e,f){b.__markCompiled&&b.__markCompiled();e.exports=b("XController").create("\/search\/feed_search_megaphone\/dismiss\/",{});},null);
__d("XGroupSearchResultsController",["XController"],function(a,b,c,d,e,f){b.__markCompiled&&b.__markCompiled();e.exports=b("XController").create("\/groups\/search\/",{groupID:{type:"Int"},query:{type:"String"},name:{type:"String"},cursor:{type:"String"},source:{type:"String"}});},null);
__d("MGraphSearchTypeahead.react",["CSS","DOM","DOMContainer.react","LeftRight.react","MHistory","MPageController","MRequest","MSearchConst","MTouchClick","MViewport","Parent","React","Stratcom","Style","SubscriptionsHandler","URI","$","arrayContains","csx","cx","fbt","getActiveElement","invariant","ix","throttle","MGraphSearchCompositeSource","MGraphSearchTypeaheadBucketizer","MGraphSearchTypeaheadHeaders","MGraphSearchTypeaheadOnDemandSource","MGraphSearchTypeaheadTouchSource","MGraphSearchTypeaheadResult.react","MGraphSearchUtils","MFeedSearchMegaphone.react","MFeedSearchModeSwitch.react","MRecentSearchesUpdater","MSearchTrendingLogger","MSearchTypeaheadLogger","MSearchTypeaheadPerfLogger","MTypeaheadNullstateSource","MTypeaheadOnDemandSource","MTypeaheadTouchSource","SearchMTouchGlobalOptions","TypeaheadCompositeSource","XSearchFeedSearchMegaphoneDismissController","Image.react","MJewel","MJewels","MContentSearchFilter","XGroupSearchResultsController"],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,ea,fa,ga,ha,ia,ja,ka,la,ma,na,oa,pa,qa,ra,sa,ta,ua,va,wa,xa,ya,za,ab,bb,cb){b.__markCompiled&&b.__markCompiled();var db=ha.Types,eb=ha.Labels,fb=[db.TOP_MATCHES,db.TRENDING],gb="/graphsearch/",hb="/keywords_",ib="keywords_top",jb='simple',kb='gsv2',lb='timeline',mb='group',nb=null,ob=null,pb=false,qb=r.createClass({displayName:"MGraphSearchTypeahead",getInitialState:function(){var rb=this.getInitialSearchMode(),sb=this.getInitialGroupID();return {query:this.props.prefilledValue||'',prefilledValue:this.props.prefilledValue||'',results:[],isWaiting:false,isActive:false,isVisible:this.props.prefilledValue!=null,resultClicked:false,showingFeedSearchMegaphone:this.props.hasFeedSearchMegaphone,searchMode:rb,prevSearchMode:rb,showModeSwitch:true,querySource:null,timelineID:this.getTimelineIDFromURI(),filterEnabled:false,qpMegaphoneDismissed:false,isInputFocused:false,groupID:sb,groupName:this.props.groupName};},shouldComponentUpdate:function(rb,sb){return sb.query!==this.state.query||sb.isWaiting!==this.state.isWaiting||sb.isActive!==this.state.isActive||sb.isVisible!==this.state.isVisible||sb.results.length!==this.state.results.length||sb.results.some(function(tb,ub){return tb.id!==this.state.results[ub].id||tb.display!=this.state.results[ub].display;}.bind(this))||sb.showingFeedSearchMegaphone!==this.state.showingFeedSearchMegaphone||sb.searchMode!==this.state.searchMode||sb.showModeSwitch!==this.state.showModeSwitch||sb.filterEnabled!==this.state.filterEnabled||sb.qpMegaphoneDismissed!==this.state.qpMegaphoneDismissed;},componentWillMount:function(){if(ob)this.applyPayload(ob);this._subscriptions=new u();this._bucketizer=new ga();this._datasource=null;this._listeners={};this._lastRenderedResult=[];this._datasourceCache=[];this._mSearchTypeaheadPerfLoggerConfigurationComplete=[];this._filters=this.props.filters;this.invokeQueryChangeThrottled=ea(this.invokeQueryChange,200);this.setResultsHeightThrottled=ea(this.setResultsHeight,500);if(this.props.filters)this._subscriptions.addSubscriptions(s.listen('m-content-search-filter-update',null,this.onFilterUpdate));if(this.props.qpMegaphone)this._subscriptions.addSubscriptions(s.listen('click','m-megaphone-close',this.onDismissQPMegaphone));if(this.props.typeaheadConfig.hasTopNavSearch)this._subscriptions.addSubscriptions(s.listen('setSearchText','graph-search-entry-point',this.onSetSearchText));this._subscriptions.addSubscriptions(s.listen(['m:chrome:tab:show','m:chrome:tab:hide'],ab.SEARCH,function(event){var sb={isActive:event.getType()==='m:chrome:tab:show'};if(event.getData().open)sb.searchMode=this.getGlobalSearchMode();if(this.state.isVisible&&this.state.query===''&&this.state.prevQuery){sb.query=this.state.prevQuery;sb.searchMode=this.getInitialSearchMode();}this.setState(sb);if(sb.isActive){var tb=r.findDOMNode(this.refs.input);tb&&tb.focus();}else this.reset();}.bind(this)),s.listen('m:page:loading',null,this.onMPageLoad),s.listen('click','m-timeline-search-dummy-box',this.onTimelineSearchActivation),s.listen('click','m-groups-scoped-search-button',this.onGroupSearchActivation));if(this.props.vertical===n.feed_search)this._subscriptions.addSubscriptions(s.listen('click','m-feed-search-nux-tryit',this.onFeedSearchNuxTryit),s.listen('click','m-search-keyword-pivot-link-permalink',this.onFeedSearchPermalinkPivotClick),s.listen('click','m-search-keyword-pivot-link-in_feed',this.onFeedSearchInFeedPivotClick),s.listen('click','m-search-keyword-pivot-link-timeline',this.onFeedSearchTimelinePivotClick),s.listen('click','m-feedsearch-megaphone-take-tour',this.onShowNux));var rb=bb.getFilters();if(rb){h.setContent(this._filters.getContentRoot().querySelector("._5c0f"),rb);this.setState({filterEnabled:true});}},componentWillUnmount:function(){this._subscriptions.release();this._datasourceHandler.release();if(this._datasource!=null)this._datasource.unbindFromTypeahead();this._bucketizer=null;},componentDidMount:function(){ca(!nb);nb=this;window.addEventListener('scroll',this.onWindowScroll,false);this.mGraphSearchTypeaheadContainer=q.byClass(r.findDOMNode(this),"_3qs0");if(this.props.nuxSearchFollow&&p.getScrollTop()<2){this.props.nuxSearchFollow.setContext(r.findDOMNode(this.refs.searchButtonDummy));this.props.nuxSearchFollow.show();}this.positionSearchBox();if(this.props.feedSearchInputNux)this._feedSearchInputNux=this.props.feedSearchInputNux;this._subscriptions.addSubscriptions(s.listen('m:graph-search:position-search-box',null,this.positionSearchBox),s.listen('keydown',null,this.onGlobalKeyDown),s.listen('MGraphSearchTypeahead:focus',null,this.onFocusRequest));if(this.props.active)this.setState({query:this.props.prefilledValue||'',isActive:true,isVisible:true});if(k.getParam(k.SOFT_STATE_KEY)===ab.SEARCH)this.setState({isActive:true,isVisible:true},function(){r.findDOMNode(this.refs.input).focus();});},componentWillUpdate:function(rb,sb){this._invoke('render_start');if(this.state.searchMode!==lb&&sb.searchMode===lb&&sb.isVisible&&!this.state.isVisible)g.removeClass(this.mGraphSearchTypeaheadContainer,"_g9y");if(this.state.searchMode===lb&&sb.searchMode!==lb&&!sb.isVisible&&this.state.isVisible)g.addClass(this.mGraphSearchTypeaheadContainer,"_g9y");if(k.getParam(k.SOFT_STATE_KEY)!==ab.SEARCH){var tb=h.find(w(za.JEWEL_NAV_NODE_ID),'*','search');g.conditionClass(tb,'isActive',sb.isVisible);}},componentDidUpdate:function(rb,sb){this._lastRenderedResult=sb.results;if(this.state.isActive){this.setResultsHeightThrottled();}else if(sb.isActive&&!this.state.isActive)t.set(document.getElementById('page'),'height',null);if(!this._configurationDone&&!rb.isVisible&&this.state.isVisible){this.configureDatasource(va);this.configureMSideNavMarauderLogger();this.configureMSearchTypeaheadLogger();this.configureMSearchTypeaheadPerfLogger();this.configureMRecentSearchesUpdater();var tb=o.hasTouchEvents()?'touchend':'click';s.invoke(tb,'graph-search-activator');this._invoke('change',[this.state.query]);this._configurationDone=true;}else if(sb.searchMode!==this.state.searchMode){this.configureDatasource(va,true);this.configureMSearchTypeaheadPerfLogger();this.invokeQueryChange();}if(this.state.isActive&&this.state.searchMode===jb&&this.refs.results&&this.props.feedSearchModeSwitchNux&&this.state.query===''&&!this._feedSearchModeSwitchNux){var ub=r.findDOMNode(this.refs.results),vb=h.scry(ub,'*','m-nullstate-modeswitch-post');if(vb.length>0){this._feedSearchModeSwitchNux=this.props.feedSearchModeSwitchNux;this._feedSearchModeSwitchNux.setContext(vb[0]);this._feedSearchModeSwitchNux.updatePosition();this._feedSearchModeSwitchNux.show();}}if(this._feedSearchInputNux&&!this._feedSearchInputNux.isDestroyed()&&this.state.isActive&&this.state.searchMode===kb&&this.state.showModeSwitch){this._feedSearchInputNux.setContext(r.findDOMNode(this.refs.input));this._feedSearchInputNux.show();}this._invoke('rendered');},render:function(){var rb=this.props.typeaheadConfig.hasKeywordAffordance,sb=this.props.typeaheadConfig.hasXToClose,tb=this.props.typeaheadConfig.hasTopNavSearch,ub=this.props.typeaheadConfig.hasDropdownDesign,vb=!!this.props.filters&&this.state.filterEnabled&&!this.state.isActive,wb='';if(this.state.searchMode===lb){wb=aa._("Enter words from the post ...");}else if(this.state.searchMode===mb){wb=aa._("Search in {groupName}",[aa.param("groupName",this.state.groupName)]);}else if(tb)wb=aa._("Search");var xb=r.createElement("form",{ref:"form",className:"_bjg",onSubmit:this.onFormSubmit,action:"/search"},r.createElement("div",{className:"_31vt",ref:"searchButtonDummy","data-sigil":"search-small-box-dummy",onClick:this.onSearchButtonDummyClick}),r.createElement("div",{ref:"inputWrapper",className:"_bjh"},r.createElement("div",{className:"_2chx"},r.createElement(ya,{src:da('/images/mobile/search/post_token.png')})),r.createElement("input",{ref:"input",id:"main-search-input","data-sigil":"search-small-box",className:"_bji",type:"search",name:"query",placeholder:wb,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",onChange:this.onInputChange,onFocus:this.onInputFocus,onBlur:this.onInputBlur,value:this.state.query}),r.createElement("label",{htmlFor:"main-search-input",className:"_3a7l"},aa._("Search")),r.createElement("a",{href:"#",className:"_bjj",style:{display:!sb&&(!this.state.query||!this.state.isInputFocused)?'none':''},role:"button",onMouseDown:this.onClearButtonEvent,onTouchStart:this.onClearButtonEvent},"×")),r.createElement("a",{href:"#",className:"_mq5","data-sigil":"touchable m_content_search_filter_button",style:{display:vb?'block':'none'},role:"button"})),yb=this.props.vertical===n.feed_search,zb=this.state.isActive&&this.state.query===''&&this.state.showingFeedSearchMegaphone,ac=this.props.hasFeedSearchModeSwitch&&this.state.isActive&&this.state.showModeSwitch&&this.state.searchMode!==lb&&this.state.searchMode!==mb,bc=(("_djv")+(this.state.searchMode===lb?' '+"_25dh":'')+(!this.state.isActive?' '+"_bjm":'')+(this.state.isActive?' '+"_bjn":'')+(this.state.query&&this.state.query!==''?' '+"_xg3":'')+(this.state.isWaiting&&!yb?' '+"_bjo":'')+(this.state.isVisible?' '+"_bjp":'')+(!this.state.isVisible?' '+"_bjq":'')+(tb?' '+"_5ek4":'')+(!tb?' '+"_5ek5":'')+(rb?' '+"_3gwg":'')+(ub?' '+"_4rh2":'')+(zb?' '+"_2chy":'')+((this.state.isActive||this.state.isVisible)&&this.props.hasFeedSearchModeSwitch&&this.state.searchMode===kb&&!this.props.hasFeedSearchModeSwitchV2?' '+"_2chz":'')+(this.props.hasFeedSearchModeSwitchV2?' '+"_39ff":'')+(this.props.vertical===n.content_search?' '+"_2c_g":'')+(vb?' '+"_mq6":'')),cc=this.renderResultsComponents(),dc=null;if(ac&&!this.props.hasFeedSearchModeSwitchV2){dc=(r.createElement(na,{ref:"results",userid:this.props.userid,simpleSearchMode:this.state.searchMode===jb,onRegularSearchClick:this.onRegularSearchClick,onPostSearchClick:this.onPostSearchClick}));}else if(zb){var ec=false;if(!this.feedSearchMegaphoneImpressionLogged){ec=true;this.feedSearchMegaphoneImpressionLogged=true;}dc=this.feedSearchMegaphone=(r.createElement(ma,{ref:"results",userid:this.props.userid,logImpression:ec,onDismissClick:this.onMegaphoneCloseClick,onActionClick:this.onMegaphoneActionClick}));}else{var fc=null,gc=null;if(this.props.hasFeedSearchModeSwitchV2&&ac){fc=(r.createElement(na,{tiny:true,userid:this.props.userid,hasResults:this.state.query!=='',simpleSearchMode:this.state.searchMode===jb,onRegularSearchClick:this.onRegularSearchClick,onPostSearchClick:this.onPostSearchClick}));if(this.state.query===''&&this.state.searchMode===kb)gc=(r.createElement("div",{className:"_39fg"},aa._("Enter words you remember from the post.")));}var hc=null;if(this.props.qpMegaphone&&!this.state.qpMegaphoneDismissed)hc=(r.createElement("div",{className:"_406x"},r.createElement(i,null,this.props.qpMegaphone)));dc=(r.createElement("div",{ref:"results",className:"_bjs"},fc,gc,hc,cc));}return (r.createElement("div",{className:bc},xb,r.createElement("div",{className:"_bjr",onTouchMove:this.onResultsWrapperTouchMove,onTouchStart:this.onResultsWrapperTouchMove},dc)));},onGlobalKeyDown:function(rb){if(rb.getSpecialKey()==='delete'&&this.state.isActive&&this.state.query===''&&this.state.searchMode===kb&&this.props.hasFeedSearchModeSwitch&&!this.props.hasFeedSearchModeSwitchV2&&r.findDOMNode(this.refs.input)===ba()){if(this._feedSearchInputNux){this._feedSearchInputNux.hide();this._feedSearchInputNux=null;}this.setState({searchMode:jb});}},onFocusRequest:function(){r.findDOMNode(this.refs.input).focus();},onRegularSearchClick:function(){this.setState({query:this.state.searchMode===jb||this.props.hasFeedSearchModeSwitchV2?this.state.query:'',searchMode:jb,showModeSwitch:true});r.findDOMNode(this.refs.input).focus();},onPostSearchClick:function(){this.setState({query:this.state.searchMode===kb||this.props.hasFeedSearchModeSwitchV2?this.state.query:'',searchMode:kb,showModeSwitch:true});r.findDOMNode(this.refs.input).focus();},onDismissQPMegaphone:function(){if(!this.state.isVisible)return;this.setState({qpMegaphoneDismissed:true});},dismissMegaphone:function(){var rb=xa.getURIBuilder().getURI();this.setState({showingFeedSearchMegaphone:false});(new m(rb)).setMethod('post').send();},onMegaphoneActionClick:function(){this.props.feedSearchNux.show();},onMegaphoneCloseClick:function(){this.dismissMegaphone();r.findDOMNode(this.refs.input).focus();},onTimelineSearchActivation:function(rb){var sb=q.byClass(rb.getTarget(),"_25dl"),tb=sb.getAttribute('data-sigil');if(!tb)return;this.setState({searchMode:lb,timelineID:tb,isVisible:true,isActive:true,showModeSwitch:false,refURI:window.location.href,results:[]});r.findDOMNode(this.refs.input).focus();},onGroupSearchActivation:function(rb){var sb=rb.getTarget(),tb=sb.getAttribute('data-ft'),ub=sb.getAttribute('data-name');if(!tb||!ub)return;this.setState({searchMode:mb,groupID:tb,groupName:ub,isVisible:true,isActive:true,showModeSwitch:false,refURI:window.location.href,results:[]});r.findDOMNode(this.refs.input).focus();},tryFeedSearch:function(rb,sb){if(!rb)rb='';if(!sb)sb=null;if(this.state.showingFeedSearchMegaphone)this.dismissMegaphone();this.setState({searchMode:this.props.hasFeedSearchModeSwitch?kb:this.state.searchMode,isVisible:true,isActive:true,query:rb,querySource:sb,showModeSwitch:rb===''||this.props.hasFeedSearchModeSwitchV2});r.findDOMNode(this.refs.input).focus();},onFeedSearchNuxTryit:function(){this.tryFeedSearch();},onFeedSearchPivotClick:function(rb,sb){var tb=q.byClass(rb.getTarget(),"_182_"),ub=h.find(tb,'span','m-feedsearch-pivot-keyword');this.tryFeedSearch(ub.innerText,sb);},onFeedSearchPermalinkPivotClick:function(rb){this.onFeedSearchPivotClick(rb,'feed_search_permalink_pivot');},onFeedSearchInFeedPivotClick:function(rb){this.onFeedSearchPivotClick(rb,'feed_search_in_feed_pivot');},onFeedSearchTimelinePivotClick:function(rb){this.onFeedSearchPivotClick(rb,'feed_search_timeline_pivot');},onShowNux:function(){this.props.feedSearchNux.show();},getHeaderTypeForResult:function(rb,sb){if(rb.isTrending){return db.TRENDING;}else if(rb.isRecentSearch){return db.RECENT;}else if(rb.type==='keyword'){return db.SUGGESTED;}else return db.TOP_MATCHES;},renderResultsComponents:function(){var rb=this._bucketizer.bucketize(this.state.results),sb=false,tb=false,ub=[],vb=[],wb=-1,xb=[],yb=true,zb=0,ac=this.state.query.toLowerCase().trim();Object.keys(rb).forEach(function(cc){var dc=rb[cc];if(cc===db.SUGGESTED&&db.GROUP_SEARCH in rb)cc=db.SUGGESTED_GLOBAL;xb.push(this.renderHeader(cc,yb));yb=false;var ec=dc.map(function(fc,gc){if(fc.type==='keyword'){tb=true;if(fc.display&&fc.display.toLowerCase().trim()===ac)sb=true;}if(this.state.isVisible&&fc.isTrending){ub[zb]=fc.topicID;vb[zb]=zb+1;wb=fc.trendingQueryID;}var hc=x(fb,cc)||gc===dc.length-1;return this.renderResult(zb++,hc);}.bind(this));xb.push.apply(xb,ec);}.bind(this));if(ub.length>0&&!pb){pb=true;pa.registerTrendingTopicListeners(ub,n.msite_news_null_state,vb,wb);pa.logTrendingTopicImpressions(ub,n.msite_news_null_state,vb,wb);}else pb=false;var bc=this.getEchoQuery(sb,tb);if(bc){if(this.state.query!==''&&this.props.vertical===n.content_search&&!rb[db.SUGGESTED])xb.push(this.renderHeader(db.SUGGESTED,yb));xb.push(bc);}return xb;},getEchoQuery:function(rb,sb){if(this.state.searchMode===lb)return this.renderSeeMore();if(this.props.vertical===n.content_search||this.props.vertical===n.feed_search){if(this.state.searchMode===jb){return this.renderSeeMore(true);}else if(!rb&&(!sb||!this.props.removeEchoQuery))return this.renderSeeMore();return null;}return this.renderSeeMore();},positionSearchBox:function(){t.set(r.findDOMNode(this),'top',p.getHeaderTop()+'px');},getSeeMoreText:function(rb){if(this.props.simpleSearch||rb)if(this.props.vertical===n.content_search){return (aa._("See More Results"));}else return (aa._("See more results for {query}",[aa.param("query",("\""+this.state.query+"\""))]));if(this.state.searchMode===lb||this.props.vertical===n.content_search)return this.state.query;if(this.props.vertical===n.feed_search)if(this.props.hasFeedSearchTypeaheadSuggestions){return this.state.query;}else return (aa._("Find posts for {query}",[aa.param("query",("\""+this.state.query+"\""))]));var sb=this.state.query.trim();return (aa._("Search for {query}",[aa.param("query",("\""+sb+"\""))]));},getDefaultSource:function(){return this.state.querySource?this.state.querySource:'typeahead';},renderSeeMore:function(rb){var sb=this.getSeeMoreURI(this.state.query,rb).addQueryData('tsid',this._sessionID).addQueryData('source',this.getDefaultSource()).toString(),tb=rb?this.onSimpleSearchSeeMoreClick:this.onSeeMoreClick,ub=false;if(this.props.vertical===n.content_search||this.props.vertical===n.feed_search)ub=!this.props.hasFeedSearchModeSwitch||!rb;return (r.createElement("a",{className:(("_1_oa")+(!ub?' '+"_bju":'')+(' '+"touchable")),"data-sigil":"touchable",href:sb,key:"see-more",onClick:tb,style:{display:!this.state.query?'none':''}},r.createElement("i",{className:(("img")+(' '+"_15i9")),style:{display:this.state.searchMode===jb||rb||this.props.vertical===n.content_search?'none':''}}),r.createElement("div",{className:(("_1_oe")+(this.state.searchMode!==jb&&!rb?' '+"_15ia":''))},this.getSeeMoreText(rb))));},renderResult:function(rb,sb){var tb=this.state.results[rb],ub=tb!=null,vb='typeahead';if(ub&&tb.uri)if(this.redirectPages&&tb.type=='page'){tb.uriWithSession=new v('/search/').addQueryData('query',tb.name).addQueryData('tsid',this._sessionID).addQueryData('source',vb).toString();}else tb.uriWithSession=new v(tb.uri).addQueryData({tsid:this._sessionID,source:vb}).toString();if(!ub)tb=this._lastRenderedResult[rb]||{};if(tb.isTrending)tb.uriWithSession=new v(tb.uriWithSession).addQueryData('position',rb+1).toString();return (r.createElement(ka,{key:tb.id,onAddToInputClick:this.onAddToInputClick,onClick:this.onResultClick,query:this.state.query,result:tb,vertical:this.props.vertical,visible:ub,forceLongBorder:sb}));},renderHeader:function(rb,sb){if(rb===db.RECENT)return this.renderRecentHeader();if(this.state.query===''||this.state.searchMode===mb){return (r.createElement("div",{className:"_tn0",key:rb},eb[rb]));}else if(!sb)return (r.createElement("div",{className:"_2p41",key:rb}));},renderRecentHeader:function(){return (r.createElement(j,{key:db.RECENT,direction:"right",className:"_tn0"},eb[db.RECENT],r.createElement("a",{href:this.props.activityLogURI,onClick:this.onEditRecentClick,className:"_2186"},aa._("Edit"))));},onEditRecentClick:function(){this.recentSearchesNeedsUpdate=true;},clear:function(){var rb=r.findDOMNode(this.refs.input),sb='';rb.value=sb;this.setState({query:sb,showModeSwitch:true});this._invoke('change',[sb]);this._invoke('update',[sb]);},cancel:function(){var rb=r.findDOMNode(this.refs.input);rb.blur();s.invoke('log-m-search-session-end',null,{reason:'cancel'});var sb=this.state.prefilledValue||'';this.setState({query:sb,isActive:false,isVisible:!!sb,searchMode:this.getInitialSearchMode()});this._invoke('change',[sb]);this._invoke('update',[sb]);},getValue:function(){return r.findDOMNode(this.refs.input).value;},getDatasource:function(){return this._datasource;},_setDatasource:function(rb){this._datasource=rb;this._datasourceHandler=new u();this._datasourceHandler.addSubscriptions(rb.listen('waiting',this.onDatasourceWaiting),rb.listen('resultsready',this.onDatasourceResultsReady),rb.listen('complete',this.onDatasourceComplete));rb.bindToTypeahead(this);},_getTypeaheadConfig:function(){if(this.props.timelineSearchTypeaheadConfig&&this.state.searchMode===lb)return this.props.timelineSearchTypeaheadConfig;if(!this.props.simpleSearchTypeaheadConfig||this.props.vertical===n.content_search)return this.props.typeaheadConfig;return this.state.searchMode===jb?this.props.simpleSearchTypeaheadConfig:this.props.typeaheadConfig;},_getDatasourceCacheKey:function(){return this.state.searchMode;},configureDatasource:function(rb,sb){if(this._datasource!=null&&!sb)return;if(this._datasource!=null){this._datasourceHandler.release();this._datasource.unbindFromTypeahead();}var tb=this._getDatasourceCacheKey(),ub=this._datasourceCache[tb];if(ub){this._setDatasource(ub);this._invoke('refresh');return;}var vb=this._getTypeaheadConfig().sources,wb=[],xb;if(vb.bootstrapped&&this.state.searchMode!==mb&&(!this.props.hasFeedSearchModeSwitch||this.state.searchMode===jb)){xb=this.getTypeaheadTouchSource(vb.bootstrapped.src,vb.bootstrapped.source_key,this.props.suggestions);xb.setShowSecondaryAction(true);xb.reactRendered=true;this.touchSource=xb;wb.push(xb);}if(vb.nullstate&&this.props.vertical!==n.feed_search){this.nullstateDataSource=this.getTypeaheadNullstateSource(vb.nullstate.src);this.nullstateDataSource.setMaximumResultCount(vb.nullstate.max_results);this.nullstateDataSource.setShowSecondaryAction(true);this.nullstateDataSource.reactRendered=true;this.nullstateDataSource.setCurrentProfileID(this.props.currentProfileID);if(this.props.hasFeedSearchModeSwitch)this.nullstateDataSource.setForceDisableSingleState(this.state.searchMode===jb);if(this.state.searchMode===mb)this.nullstateDataSource.setEnableScoped(true);wb.push(this.nullstateDataSource);}var yb=vb.online;if(this.props.hasFeedSearchModeSwitch&&this.props.vertical===n.content_search&&this.state.searchMode===jb)yb=vb.online_entities;if(yb){xb=this.getTypeaheadOnDemandSource(yb.src);xb.setMaximumResultCount(yb.max_results);xb.setEnableImmediateReturnOfCachedResults(yb.enable_caching);if(rb){if(rb.enableQueryThrottle)xb.setThrottleSendRequest(rb.queryThrottleTime);xb.setMaxResults(rb.maxResults);xb.setEnableEagerSendRequest(rb.enableEagerSendRequest);xb.setQueryDelay(rb.queryWaitTime);this.redirectPages=rb.redirectPages;}xb.setShowSecondaryAction(true);xb.reactRendered=true;wb.push(xb);}var zb=this.getTypeaheadCompositeSource(wb);zb.reactRendered=true;zb.mergeKey='id';this._setDatasource(zb);this._invoke('start');this._datasourceCache[tb]=this._datasource;},getTypeaheadCompositeSource:function(rb){if(this.state.searchMode===jb&&this.props.vertical!==n.content_search)return new wa(rb);var sb=new fa(rb);sb.setConfig(this.props.typeaheadConfig.compositeSourceConfig);return sb;},getTypeaheadOnDemandSource:function(rb){if(this.state.searchMode===jb&&this.props.vertical!==n.content_search)return new ta(rb);rb=new ia(rb,{disableLongerQueryCacheHit:this.props.typeaheadConfig.disableLongerQueryCacheHit});if(this.state.searchMode===mb)rb.setGroupID(this.state.groupID);return rb;},getTypeaheadTouchSource:function(rb,sb){if(this.state.searchMode===jb)return new ua(rb,sb);return new ja(rb,sb);},getTypeaheadNullstateSource:function(rb){return new sa(rb);},getTypeaheadType:function(){var rb='m_top_nav';if(this.props.simpleSearch){rb+='_simple';}else rb+='_gsv2';if(this.props.typeaheadConfig.hasTopNavSearch)rb+='_small_box';return rb;},configureMSideNavMarauderLogger:function(){if(!this.props.typeaheadConfig.mSideNavMarauderLogger||this._mSideNavMarauderLoggerConfigurationComplete)return;this.props.typeaheadConfig.mSideNavMarauderLogger.setupTypeaheadListener(this);this._mSideNavMarauderLoggerConfigurationComplete=true;},configureMSearchTypeaheadLogger:function(){if(this._mSearchTypeaheadLoggerConfigurationComplete)return;this._subscriptions.addSubscriptions(s.listen('m-typeahead-logger:new-session-id',null,this.onMTypeaheadLoggerNewSessionId));var rb='/search/metrics.php',sb=new qa(this,rb);this._mSearchTypeaheadLoggerConfigurationComplete=true;this._subscriptions.addSubscriptions(s.listen('log-m-search-session-end',null,function(tb){sb.blur(tb.getData().reason);}));},configureMRecentSearchesUpdater:function(){if(this.props.typeaheadConfig.hasRecentSearches)new oa(this);},configureMSearchTypeaheadPerfLogger:function(){var rb=this._getDatasourceCacheKey();if(!this.props.typeaheadConfig.typeaheadScubaInfo||this._mSearchTypeaheadPerfLoggerConfigurationComplete[rb])return;new ra(this,this.props.typeaheadConfig.typeaheadScubaInfo,this.props.typeaheadConfig.sources.online.enable_caching);this._mSearchTypeaheadPerfLoggerConfigurationComplete[rb]=true;},invokeKeypressed:function(){var rb=r.findDOMNode(this.refs.input).value;this._invoke('keypress',[rb]);},invokeQueryChange:function(){var rb=r.findDOMNode(this.refs.input).value;this._invoke('update',[rb]);this._invoke('change',[rb]);},listen:function(rb,sb){this._listeners[rb]=this._listeners[rb]||[];this._listeners[rb].push(sb);return {type:rb,callback:sb,remove:function(){this._listeners[rb]=this._listeners[rb].filter(function(tb){return tb!==sb;});}.bind(this)};},_invoke:function(rb,sb){if(this._listeners[rb])this._listeners[rb].forEach(function(tb){tb.apply(this,sb);}.bind(this),this);},onInputChange:function(){var rb=r.findDOMNode(this.refs.input).value;if(this._feedSearchModeSwitchNux)this._feedSearchModeSwitchNux.hide();if(this._feedSearchInputNux)this._feedSearchInputNux.hide();if(this.state.searchMode===jb&&(rb==='post: '||rb==='posts: ')){this.setState({query:'',searchMode:kb,showModeSwitch:true});return;}this.setState({query:rb,showModeSwitch:rb===''||this.props.hasFeedSearchModeSwitchV2,querySource:null});this.invokeKeypressed();this.invokeQueryChangeThrottled();},onInputBlur:function(){this.setState({isInputFocused:false});s.invoke('log-m-search-session-end',null,{reason:'navigated_away'});},onInputFocus:function(){this.setState({isInputFocused:true});k.pushSoftState(ab.SEARCH);var rb=r.findDOMNode(this.refs.input).value,sb=new v(window.location),tb=new v(this.props.activityLogURI);if(this.recentSearchesNeedsUpdate||sb.getPath()===tb.getPath()){this.recentSearchesNeedsUpdate=false;this._invoke('refreshRecent',[rb]);}var ub=!this.state.isActive||rb===''||this.state.showModeSwitch;this.setState({isActive:true,isVisible:true,showModeSwitch:ub,prevSearchMode:this.state.searchMode});if(this._configurationDone){var vb=o.hasTouchEvents()?'touchend':'click';s.invoke(vb,'graph-search-activator');}this._invoke('focus');this._invoke('change',[rb]);},onClearButtonEvent:function(event){event.preventDefault();var rb=this.props.typeaheadConfig.hasXToClose,sb=r.findDOMNode(this.refs.input);if(rb&&sb.value===''){this.cancel();}else r.findDOMNode(this.refs.input).focus();this.setState({prevQuery:this.state.query});this.clear();},onResultClick:function(event){var rb=this.getResultLinkFromTarget(event.target),sb=this.getResultFromResultLink(rb),tb={isActive:false,isVisible:sb.type==='keyword',resultClicked:true};tb.query=sb.type==='keyword'?sb.display:'';tb.prefilledValue=tb.query;this.setState(tb);this._invoke('select',[rb]);},onAddToInputClick:function(event){event.preventDefault();event.stopPropagation();var rb=this.getResultFromResultLink(this.getResultLinkFromTarget(event.target)),sb=rb.display+' ';this._invoke('change',[sb]);this.setState({query:sb});},onSeeMoreClick:function(){this.handleSeeMoreClick(false);},onSimpleSearchSeeMoreClick:function(){this.handleSeeMoreClick(true);},handleSeeMoreClick:function(rb){var sb=r.findDOMNode(this.refs.input),tb=sb.value;this.setState({resultClicked:true,prefilledValue:tb,isActive:false,isVisible:!!tb});var ub='';if(this.props.vertical===n.feed_search)ub=rb?'keyword_find_other_results':'keyword_feed_search';this._invoke('query',[this.state.results,ub]);},onFormSubmit:function(event){event.preventDefault();var rb=r.findDOMNode(this.refs.input),sb=rb.value,tb='';if(sb==='')return false;sb=encodeURIComponent(sb);sb=sb.replace(/%/g,'%25');tb=this.getSubmitURI(sb);tb=tb.addQueryData('tsid',this._sessionID).addQueryData('source',this.getDefaultSource()).toString();l.load(tb);this.setState({prefilledValue:sb,isActive:false,isVisible:!!sb,resultClicked:true});this._invoke('query',[this.state.results]);rb.blur();},getGraphSearchURI:function(rb){rb=rb.trim();var sb=la.normalizeQuery(rb);if(this.state.searchMode===mb)return cb.getURIBuilder().setInt('groupID',this.state.groupID).setString('query',sb).getURI();if(this.props.vertical===n.content_search&&this.props.hasFeedSearchModeSwitch&&ib==='keywords_top')ib='keywords_posts';var tb=new v(window.location),ub=tb.getPath();if(ub.indexOf(gb)===0&&ub.lastIndexOf(hb)!=-1&&this.props.vertical!==n.content_search){ib=ub.substring(ub.lastIndexOf(hb)+1);var vb=ib.indexOf('/');if(vb!==-1)ib=ub.substring(0,vb);}return new v('/graphsearch/str/'+sb+'/'+ib);},getSubmitURI:function(rb){switch(this.state.searchMode){case jb:return this.getSeeMoreURI(rb,true);case lb:return this.getSeeMoreURI(rb);default:return this.getGraphSearchURI(rb).addQueryData('ref','content_filter');}},getSeeMoreURI:function(rb,sb){rb=rb.trim();sb=sb||false;if(this.props.hasGSv2EntityMode&&(sb||this.state.searchMode===jb)){var tb=la.normalizeQuery(rb);return new v('/graphsearch/str/'+tb+'/keywords_entities');}if(!sb&&this.state.searchMode===kb)return this.getGraphSearchURI(rb);var ub=new v('/search/?query').addQueryData({query:rb,refid:n.refid});if(this.state.searchMode===lb)ub.addQueryData('timeline_id',this.state.timelineID);return ub;},getTimelineURI:function(){return this.state.refURI?this.state.refURI:this.state.timelineID?new v(("/"+this.state.timelineID)):'#';},onResultsWrapperTouchMove:function(){r.findDOMNode(this.refs.input).blur();},onSearchButtonDummyClick:function(){if(this.props.nuxSearchFollow)this.props.nuxSearchFollow.hide();r.findDOMNode(this.refs.input).focus();},onDatasourceWaiting:function(){this.setState({isWaiting:true});},injectKeywordEchoQuery:function(rb){if(this.state.query===''||this.props.vertical!==n.content_search||this.props.removeEchoQuery||(this.props.hasFeedSearchModeSwitch&&this.state.searchMode===jb))return rb;var sb=[],tb=false;for(var ub=0;ub<rb.length;ub++){var vb=rb[ub];if(vb&&vb.type==='keyword'&&vb.display&&vb.display.toLowerCase().trim()===this.state.query.toLowerCase().trim())tb=true;var wb=null;if(ub+1<rb.length)wb=rb[ub+1];sb.push(vb);if(!tb&&((ub===rb.length-1)||vb.type==='keyword'&&wb&&wb.type!=='keyword')){var xb=this.getSeeMoreURI(this.state.query).toString();sb.push({id:'echo-query',type:'keyword',display:this.getSeeMoreText(),uri:xb});tb=true;}}return sb;},onDatasourceResultsReady:function(rb){this.setState({results:this.injectKeywordEchoQuery(rb)});rb.forEach(function(sb){sb.uri=new v(sb.uri).addQueryData('refid',n.refid);return sb;});this._invoke('show',[rb]);},onDatasourceComplete:function(){this.setState({isWaiting:false});},onFilterUpdate:function(event){var rb=bb.getFilters();if(!rb)return;h.setContent(this._filters.getContentRoot().querySelector("._5c0f"),rb);this.setState({filterEnabled:true});},onSetSearchText:function(event){var rb=event.getData().title||'';this._invoke('change',[rb]);this.setState({query:rb,prefilledValue:rb,isActive:false,isVisible:rb!=='',searchMode:this.getInitialSearchMode(),timelineID:this.getTimelineIDFromURI()});},onMTypeaheadLoggerNewSessionId:function(rb){if(!this.refs||!this.refs.form)return;var sb=r.findDOMNode(this.refs.form),tb=h.scry(sb,'input','search-typeahead-session-id')[0];if(!tb){tb=document.createElement('input');tb.type='hidden';tb.name='tsid';sb.appendChild(tb);s.addSigil(tb,'search-typeahead-session-id');}var ub=rb.getData().sessionID;tb.value=ub;this._sessionID=ub;},onWindowScroll:function(event){if(this.state.isVisible)this._invoke('scroll',[event]);},onMPageLoad:function(){if(this._filters){this._filters.hide();this.setState({filterEnabled:false});}setTimeout(this.reset);},reset:function(){var rb=r.findDOMNode(this.refs.input);if(rb!=null)rb.blur();if(!this.state.resultClicked){this.setState({isVisible:false,isActive:false,query:'',prefilledValue:'',searchMode:this.getInitialSearchMode()});}else this.setState({resultClicked:false});},getResultLinkFromTarget:function(rb){var sb=q.byClass(rb,"_1w-s");return sb.querySelector("._4rh3");},getResultFromResultLink:function(rb){var sb=this.state.results.filter(function(tb){return tb.id===rb.getAttribute('rel');})[0]||{};return sb;},setResultsHeight:function(){var rb=r.findDOMNode(this.refs.results).offsetHeight+r.findDOMNode(this.refs.results).offsetTop;if(rb){var sb=r.findDOMNode(this.refs.form).offsetHeight;t.set(document.getElementById('page'),'height',rb+sb+'px');}},applyPayload:function(rb){if(rb.active)s.listen(['m:onload','m:page:render:complete'],null,(function(){s.removeCurrentListener();ob=null;var sb=this.state.searchMode;if(this.props.hasFeedSearchModeSwitch)sb=rb.postsearchmode?kb:jb;this.setState({isActive:true,isVisible:true,searchMode:sb});}).bind(this));},getInitialSearchMode:function(){var rb=new v(window.location),sb=this.getSpecialSearchMode(rb);if(sb!==(void 0))return sb;var tb=rb.getPath();return this.getGlobalSearchMode(tb);},getSpecialSearchMode:function(rb){if(rb.getQueryData().timeline_id){return lb;}else if(rb.getQueryData().groupID)return mb;},getGlobalSearchMode:function(rb){if(rb===(void 0)){var sb=new v(window.location);rb=sb.getPath();}if(this.props.simpleSearch||((this.props.vertical===n.feed_search||this.props.vertical===n.content_search)&&rb.indexOf(gb)===-1)&&this.props.hasFeedSearchModeSwitch)return jb;return kb;},getInitialGroupID:function(){var rb=new v(window.location);return rb.getQueryData().groupID;},getTimelineIDFromURI:function(){return new v(window.location).getQueryData().timeline_id;}});qb.update=function(rb){if(nb&&rb){nb.applyPayload(rb);}else ob=rb;};e.exports=qb;},null);
__d("MActionBubbleMask",["CSS","DOM","MViewport","Stratcom","cx","requestAnimationFrame"],function(a,b,c,d,e,f,g,h,i,j,k,l){b.__markCompiled&&b.__markCompiled();var m="_5nvw",n="_5nvx",o=300;function p(q){"use strict";this.$MActionBubbleMask0=null;this.$MActionBubbleMask1=null;this.$MActionBubbleMask2=q;}p.prototype.enable=function(){"use strict";var q=this.$MActionBubbleMask2.getRoot().getAttribute('data-mask-class');if(!q)q=m;this.$MActionBubbleMask1=h.create('div',{className:q});this.$MActionBubbleMask0=[this.$MActionBubbleMask2.addListener('show',this.$MActionBubbleMask3.bind(this)),this.$MActionBubbleMask2.addListener('hide',this.$MActionBubbleMask4.bind(this)),this.$MActionBubbleMask2.addListener('reposition',this.$MActionBubbleMask5.bind(this)),h.listen(this.$MActionBubbleMask1,'touchend',null,function(r){r.stop();})];if(this.$MActionBubbleMask2.isShown())this.$MActionBubbleMask3();};p.prototype.disable=function(){"use strict";this.$MActionBubbleMask4();while(this.$MActionBubbleMask0.length)this.$MActionBubbleMask0.pop().remove();this.$MActionBubbleMask0=null;this.$MActionBubbleMask1=null;};p.prototype.$MActionBubbleMask3=function(){"use strict";h.insertBefore(this.$MActionBubbleMask2.getRoot(),this.$MActionBubbleMask1);g.addClass(this.$MActionBubbleMask2.getCausalElement(),n);this.$MActionBubbleMask6=j.listen('scroll',null,this.$MActionBubbleMask5.bind(this));this.$MActionBubbleMask5();};p.prototype.$MActionBubbleMask4=function(){"use strict";h.remove(this.$MActionBubbleMask1);var q=this.$MActionBubbleMask2.getCausalElement();if(q)g.removeClass(q,n);this.$MActionBubbleMask6&&this.$MActionBubbleMask6.remove();this.$MActionBubbleMask6=null;};p.prototype.$MActionBubbleMask5=function(){"use strict";l(function(){this.$MActionBubbleMask1.style.top=i.getScrollTop()-o+'px';this.$MActionBubbleMask1.style.height=i.getHeight()+(o*2)+'px';}.bind(this));};e.exports=p;},null);