/*!CK:1282555274!*//*1403547904,*/ if (self.CavalryLogger) { CavalryLogger.start_js(["WBTSS"]); } __d("BusinessConf",[],function(a,b,c,d,e,f){e.exports={DOMAIN:"business",BIZ_ID_PARAM_NAME:"business_id",LABEL_ID_PARAM_NAME:"label_id",ACCOUNT_ID_PARAM_NAME:"act",ACCOUNT_ID_PARAM_NAME_LONG:"account_id",ACCOUNT_IDS_PARAM_NAME_LONG:"account_ids",PAGE_ID_PARAM_NAME:"id",PAGE_ADMIN_SELECTED_KEY:"sk",PRODUCT_CATALOG_ID_PARAM_NAME:"catalog_id",PRODUCT_FEED_ID_PARAM_NAME:"feed_id",LEGACY_ADS_MANAGER_PREFIX:"\/ads\/manage\/",WHITELISTED_URI_CLASS:"bizOK",OPT_OUT_KEY:"do_not_redirect_to_biz_site",OPT_OUT_EXPIRE:86400,HIGHLANDER_OPT_OUT_KEY:"use_biz_page_in_highlander"};},null); __d("MessageThreadViewSource",[],function(a,b,c,d,e,f){e.exports={UNSPECIFIED:"unspecified",LEGACY:"legacy",LEGACY_MESSAGES_PREVIEW:"legacy_messages_preview",REFRESH_SPRINGBOARD:"springboard",REFRESH_MESSAGETAB:"message_tab",REFRESH_PERMALINK:"permalink",REFRESH_HIGHLANDER_JEWEL:"highlander_jewel",REFRESH_SEARCH_TYPEAHEAD:"search_typeahead"};},null); __d("BlueBar",["Arbiter","Event","Run","SubscriptionsHandler"],function(a,b,c,d,e,f,g,h,i,j){var k;function l(event){if(g.inform('BlueBar/homeClick')===false)event.preventDefault();}function m(){if(k){k.release();k=null;}}var n={listen:function(o){if(!k){k=new j();i.onUnload(m);}k.addSubscriptions(h.listen(o,'click',l));}};e.exports=n;},null); __d("BlueBarMinWidth",["Arbiter","DOM","DOMDimensions","Event","Locale","Style","Vector","$","csx","queryThenMutateDOM"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){f.init=function(){var q=n('pageHead'),r=h.find(q,"._59g8"),s,t=p.bind(null,function(){var u=i.getElementDimensions(q).width,v;if(k.isRTL()){v=-m.getElementPosition(q).x;}else v=m.getElementPosition(q).x+u-i.getViewportDimensions().width;if(v>0){var w=i.measureElementBox(q,'width',true);s=u-v-w+'px';}else s='';},function(){l.set(r,'width',s);},'BlueBarMinWidth');j.listen(window,'resize',t);t();};},null); __d("BusinessAssetGrouping.brands",["emptyFunction","getObjectValues"],function(a,b,c,d,e,f,g,h){'use strict';var i="personal-business",j={NULL_BIZ_ID:i,groupAssets:function(r,s,t,u,v,w,x,y){v=v||o;w=w||g.thatReturnsTrue;var z=k(r,s,t),aa=z.businessesByID;aa[i]={id:i,name:x||"You"};var ba=l(z.assetsByBizID,aa,u),ca=p(h(ba),n);if(y&&ca[0].bizID===i)ca.shift();var da=[];for(var ea=0;ea0)for(var ba=0;baw){return 1;}else if(v0&&!this.props.isActive){n=j._({"All":"All ({count})","Social":"Social ({count})","Work":"Work ({count})"},[j['enum'](k[this.props.filter],{All:"All",Social:"Social",Work:"Work"}),j.param("count",this.props.count)]);}else n=j._({"All":"All","Social":"Social","Work":"Work"},[j['enum'](k[this.props.filter],{All:"All",Social:"Social",Work:"Work"})]);return (h.DOM.a({className:m,onClick:this.handleOnClick},n));}});e.exports=l;},null); __d("NotificationTabs.react",["CommunityNotificationFilter","NotificationStore","NotificationTab.react","React"],function(a,b,c,d,e,f,g,h,i,j){var k=j.createClass({displayName:'NotificationTabs',getInitialState:function(){return {activeTab:g.SOCIAL};},handleOnClick:function(l){this.setState({activeTab:l});this.props.onTabSelect(l);},getFilteredCount:function(l){return h.getFilteredIDs(this.props.unseenIDs,function(m){return h.filterNotification(m,l);}).length;},render:function(){return (j.DOM.div(null,i({count:this.getFilteredCount(g.SOCIAL),filter:g.SOCIAL,isActive:this.state.activeTab===g.SOCIAL,onClick:this.handleOnClick}),i({count:this.getFilteredCount(g.WORK),filter:g.WORK,isActive:this.state.activeTab===g.WORK,onClick:this.handleOnClick})));}});e.exports=k;},null); __d("NotificationJewelHeaderController",["Arbiter","ArbiterMixin","DOM","Event","NotificationTabs.react","NotificationSeenState","NotificationStore","NotificationUserActions","NotificationUpdates","React","mixin"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){var r=q(h);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,w,x,y){"use strict";this.$NotificationJewelHeaderController0=w;if(x){this.renderTabs(x,w);g.subscribe('jewel/count-updated',function(){this.renderTabs(x,w);}.bind(this));}if(v)j.listen(v,'click',function(){var z=l.getUnreadIDs();z=m.getFilteredIDs(z,function(aa){return m.filterNotification(aa,this.$NotificationJewelHeaderController0);}.bind(this));if(z.length)n.markNotificationsAsRead(z);}.bind(this));o.subscribe('read-state-updated',function(){if(y)i.setContent(y,l.getUnreadCount());});}u.prototype.renderTabs=function(v,w){"use strict";var x=k({defaultTab:w,onTabSelect:this.$NotificationJewelHeaderController1.bind(this),unseenIDs:l.getUnseenIDs()});p.renderComponent(x,v);};u.prototype.getFilter=function(){"use strict";return this.$NotificationJewelHeaderController0;};u.prototype.$NotificationJewelHeaderController1=function(v){"use strict";this.$NotificationJewelHeaderController0=v;this.inform('tabselected',{filter:v});};e.exports=u;},null); __d("NotificationHiddenState",["NotificationUpdates","copyProperties"],function(a,b,c,d,e,f,g,h){var i={};g.subscribe('update-hidden',function(k,l){if(l.hiddenState){i=h(i,l.hiddenState);g.didUpdateHiddenState(Object.keys(l.hiddenState));}});var j={isHidden:function(k){if(i[k])return i[k];return false;}};e.exports=j;},null); __d("XNotificationInlineStoryControllerURIBuilder",["XControllerURIBuilder"],function(a,b,c,d,e,f,g){e.exports=g.create("\/desktop_notifications\/inline_story\/",{notif_id:{type:"String",required:true},flyout_id:{type:"String",required:true}});},null); __d("XNotificationInlineStoryDialogControllerURIBuilder",["XControllerURIBuilder"],function(a,b,c,d,e,f,g){e.exports=g.create("\/desktop_notifications\/inline_story_dialog\/",{flyout_id:{type:"String",required:true}});},null); __d("InlineStoryFlyout",["Arbiter","AsyncRequest","csx","DOM","ScrollableArea","Style","Vector","XNotificationInlineStoryControllerURIBuilder","XNotificationInlineStoryDialogControllerURIBuilder"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){var p=450,q=25,r=160,s=120,t=[],u=null,v={},w={init:function(x){t.push(x);},setDialog:function(x){if(!u){u=x;u.subscribe('hide',w._onDialogHide);t.forEach(function(y){y.subscribe('closed',function(){u.hide();});});}g.inform('inlineStory/dialogLoaded');},reuseDialog:function(x,y){if(!u){var z=g.subscribe('inlineStory/dialogLoaded',function(){u.setInnerContent(x);w.showDialog(y);w.setupCommentArbiter(x);w.updatePosition();g.inform('inlineStory/flyoutLoaded');g.subscribe('inlineStory/ufiLoaded',w.updatePosition);z.unsubscribe();}.bind(this)),aa=new o().setString('flyout_id',y).getURI();new h().setURI(aa).send();g.inform('inlineStory/flyoutLoaded');}else{if(u.getContent()!=x)u.setInnerContent(x);w.showDialog(y);w.setupCommentArbiter(x);g.inform('inlineStory/flyoutLoaded');}},_onDialogHide:function(){var x=u.getContext().id,y=u.getContent();v[x]=y;},requestStory:function(x,y){if(y in v){w.reuseDialog(v[y],y);}else{var z=new n().setString('notif_id',x).setString('flyout_id',y).getURI();new h().setURI(z).send();}},setCommentFocus:function(){var x=j.scry(u.getContentRoot(),"._5vpa textarea");if(x.length>0)x[0].focus();},setupCommentArbiter:function(x){g.subscribe('ufi/comment',function(y,z){var aa=j.scry(x,"._5vp9");if(!aa)return;var ba=j.scry(aa[0],'.uiScrollableAreaWrap')[0];ba=ba&&k.getInstance(ba);ba&&ba.scrollToBottom();});},showDialog:function(x){var y=false;for(var z=0;z0)l.set(z,'margin-top',-ja+'px');ja=ia-ha+q;if(ja>0)l.set(z,'margin-top',ja+'px');w.setCommentFocus();}};e.exports=w;},null); __d("PageLikeButton.react",["AsyncResponse","Image.react","PageFanning","React","XUIButton.react","cx","fbt"],function(a,b,c,d,e,f,g,h,i,j,k,l,m){var n=j.createClass({displayName:'PageLikeButton',propTypes:{pageID:j.PropTypes.number.isRequired,ref:j.PropTypes.string.isRequired},getInitialState:function(){return {liked:false};},_onClick:function(o){o.preventDefault();if(!this.state.liked){this.setState({liked:true});i.setFanStatus(this.refs.likeButton.getDOMNode(),this.props.pageID,true,false,this._onSuccess,this._onFailure,{fan_origin:this.props.ref,fan_source:this.props.ref});}},_onSuccess:function(){this.setState({liked:true});},_onFailure:function(o){this.setState({liked:false});g.defaultErrorHandler(o);},render:function(){var o=this.state.liked?"Liked":"Like",p=h({src:"/images/litestand/glyph/like.png"});return (k({className:"_19nd",disabled:this.state.liked,image:p,label:o,onClick:this._onClick,ref:"likeButton",suppressed:false,size:"medium",use:"default"}));}});e.exports=n;},null); __d("XNotificationInlineStoryLoggingControllerURIBuilder",["XControllerURIBuilder"],function(a,b,c,d,e,f,g){e.exports=g.create("\/desktop_notifications\/inline_story_logging\/",{screen_wide_enough:{type:"Bool"},is_snowlift:{type:"Bool"},is_vault_set:{type:"Bool"},is_aggregated_story:{type:"Bool"},should_fallback:{type:"Bool"}});},null); __d("NotificationJewelItem.react",["Arbiter","AsyncRequest","AsyncResponse","BizSiteIdentifier.brands","CloseButton.react","DOM","Event","FlexibleBlock.react","ImageBlock.react","InlineStoryFlyout","Keys","NotificationPhotoThumbnail","NotificationURI","NotificationUserActions","PageLikeButton.react","React","TextWithEntities.react","Timestamp.react","VaultBoxURI","Vector","XNotificationInlineStoryLoggingControllerURIBuilder","XUIButton.react","XUISpinner.react","cx","emptyFunction","invariant","mergeObjects","tx"],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){var ia=950,ja={group_activity:true};function ka(na,oa){return v.DOM.span({className:"fwb"},na);}function la(na){return !!(na&&na.id&&!na.is_facebook_app);}var ma=v.createClass({displayName:'NotificationJewelItem',getInitialState:function(){return {showingOptions:false,negativeFeedbackConfirmation:null,canReportAsSpam:false,spamReportConfirmation:null,sendingFeedback:false,mayUndoHide:false,firstReceiptHandled:false,showLoadingIndicator:false,isBizSite:j.isBizSite()};},_onKeyDownItem:function(na){if(m.getKeyCode(na.nativeEvent)==q.RETURN)this._markItemRead();},_markItemRead:function(){t.markNotificationsAsRead([this.props.alert_id]);},_onFeedbackError:function(na){i.defaultErrorHandler(na);this.setState({sendingFeedback:false});},_onHideSuccess:function(na){var oa=na.getPayload();fa(oa.confirmation);this.setState({negativeFeedbackConfirmation:oa.confirmation,canReportAsSpam:oa.canReportAsSpam,sendingFeedback:false});},_onHideAppSuccess:function(na){var oa=na.getPayload(),pa=oa.confirmation,qa=oa.canReportAsSpam;fa(pa);this.setState({negativeFeedbackConfirmation:pa,canReportAsSpam:qa,mayUndoHide:true,sendingFeedback:false,showingOptions:true});},_onSpamReportSuccess:function(na){var oa=na.getPayload().spamReportConfirmation;this.setState({negativeFeedbackConfirmation:null,spamReportConfirmation:oa,sendingFeedback:false});},_onHide:function(){t.markNotificationAsHidden(this.props.alert_id,this._onHideSuccess,this._onFeedbackError);this.setState({sendingFeedback:true,mayUndoHide:true});},_onShow:function(){var na=this.props.negative?this.props.negative.subscription_level:null;t.markNotificationAsVisible(this.props.alert_id,na,function(){this.setState({negativeFeedbackConfirmation:null,sendingFeedback:false,showingOptions:false});}.bind(this),this._onFeedbackError);this.setState({sendingFeedback:true});},_onReportSpam:function(){t.markNotificationAsSpam(this.props.alert_id,this._onSpamReportSuccess,this._onFeedbackError);this.setState({sendingFeedback:true});},_markAppAsHidden:function(){t.markAppAsHidden(this.props.alert_id,this.props.application.id,this._onHideAppSuccess,this._onFeedbackError);this.setState({sendingFeedback:true});},_markAppAsVisible:function(){t.markAppAsVisible(this.props.alert_id,this.props.application.id,function(){this.setState({negativeFeedbackConfirmation:null,sendingFeedback:false,showingOptions:false,mayUndoHide:false});}.bind(this),this._onFeedbackError);this.setState({sendingFeedback:true});},_onFirstReceiptYes:function(){t.markFirstReceiptYes(this.props.alert_id,function(){this.props.onHandleFirstReceipt(this.props.application.id);this.setState({firstReceiptHandled:true});}.bind(this),ea);},_onFirstReceiptNo:function(){t.markFirstReceiptNo(this.props.alert_id,function(){this._markAppAsHidden();this.props.onHandleFirstReceipt(this.props.application.id);this.setState({firstReceiptHandled:true});}.bind(this),this._onFeedbackError);this.setState({sendingFeedback:true});},_renderAttachedItem:function(na){if(na)return (v.DOM.img({src:na.uri,className:"_42td",'aria-hidden':true}));if(this.props.showLikeButton&&(this.props.notif_type==='fbpage_fan_invite'||this.props.notif_type==='fbpage_ci_invite'))return (u({pageID:this.props.contextID,ref:this.props.notif_type+'_jewel'}));return v.DOM.span(null);},_getModifiedTrackingString:function(na){return JSON.stringify(ga(JSON.parse(this.props.tracking),na));},_onClickCloseButton:function(){this.setState({showingOptions:true});},_onCancelNegativeFeedback:function(){this.setState({showingOptions:false});},shouldComponentUpdate:function(na,oa){return (this.props.visible!==na.visible||this.props.isRead!==na.isRead||this.props.timestamp!==na.timestamp||this.state.showingOptions!==oa.showingOptions||this.state.sendingFeedback!==oa.sendingFeedback||this.state.canReportAsSpam!==oa.canReportAsSpam||this.state.spamReportConfirmation!==oa.spamReportConfirmation||this.state.showLoadingIndicator!==oa.showLoadingIndicator);},render:function(){if(!this.props.visible&&!this.state.mayUndoHide)return v.DOM.li({className:"_4_62"});var na=this.props.negative,oa=this.props.negativeTracking,pa=(("_33c")+(!this.props.isRead?' '+"_4af":'')+(this.state.showingOptions?' '+"_4ag":'')+(this.state.sendingFeedback?' '+"_4m8s":''));if(this.state.negativeFeedbackConfirmation){var qa=this.state.negativeFeedbackConfirmation,ra;if(this.state.canReportAsSpam)ra=v.DOM.span(null,v.DOM.span({className:"mhs"},"ยท"),v.DOM.a({href:"#",onClick:this._onReportSpam},"Report app for spam"));var sa=la(this.props.application)?this._markAppAsVisible:this._onShow;return (v.DOM.li({className:pa,'data-gt':this.props.tracking},v.DOM.div({className:"_4ai"},w({interpolator:ka,ranges:qa.ranges,aggregatedranges:qa.aggregated_ranges,text:qa.text}),v.DOM.a({href:"#",onClick:sa,className:"mls"},"Undo"),ra)));}var ta=this.state.spamReportConfirmation;if(ta)return (v.DOM.li({className:pa,'data-gt':this.props.tracking},v.DOM.div({className:"_4ai"},w({interpolator:ka,ranges:ta.ranges,aggregatedranges:ta.aggregated_ranges,text:ta.text}))));if(this.state.showingOptions){var ua=la(this.props.application)?this._markAppAsHidden:this._onHide;return (v.DOM.li({className:pa,'data-gt':this.props.tracking},v.DOM.div({className:"_4ai"},v.DOM.div(null,w({interpolator:ka,ranges:na.confirm_question.ranges,aggregatedranges:na.confirm_question.aggregated_ranges,text:na.confirm_question.text})),v.DOM.div({className:"mts"},ba({'data-gt':this._getModifiedTrackingString(oa.confirm),href:{url:'#'},label:na.turn_off,use:"confirm",onClick:ua,disabled:this.state.sendingFeedback}),ba({'data-gt':this._getModifiedTrackingString(oa.cancel),href:{url:'#'},label:"Keep On",onClick:this._onCancelNegativeFeedback,disabled:this.state.sendingFeedback})))));}var va=null;if(this.props.title)va=w({interpolator:ka,ranges:this.props.title.ranges,aggregatedranges:this.props.title.aggregated_ranges,text:this.props.title.text,renderEmoji:true,renderEmoticons:true});var wa=null,xa=null,ya=null;if(na){var za=this._onClickCloseButton,ab;if(this.props.isFirstReceipt){xa=v.DOM.span({className:"_540_"},"NEW");za=this._onFirstReceiptNo;ya=this._onFirstReceiptYes;ab=this._getModifiedTrackingString(oa.firstReceiptNo);}else ab=this._getModifiedTrackingString(oa.click);var bb=(("_4ah")+(' '+"_55m9"));wa=k({className:bb,'data-gt':ab,size:"medium",tooltip:na.button_tooltip,onClick:za,ref:"closeButton"});}var cb=s.localize(this.props.url),db=r.getThumbnail(this.props.attachments,this.props.attached_story,this.props.feedback_context),eb=db&&s.snowliftable(cb),fb=s.isVaultSetURI(cb),gb=(("_55m9")+(!this.props.isRead?' '+"_5c9q":'')+(this.props.isRead?' '+"_5c9_":'')),hb=v.DOM.a({href:"#",className:gb,role:"button",'aria-label':this.props.isRead?"Read":"Mark as Read",'data-hover':"tooltip",'data-tooltip-alignh':"center",onClick:this.props.isRead?null:this._markItemRead}),ib=(eb||fb)?cb:this.props.ajaxify_url,jb=null,kb=null,lb=fb?y.getSyncedTabURI().toString():cb;if(eb){jb='theater';}else if(fb||ib)jb='dialog';var mb=null,nb=this.props.actors[0];if(nb)mb={backgroundImage:'url('+nb.profile_picture.uri+')'};var ob='notif_flyout_'+this.props.alert_id,pb=null,qb=this.props.substory_count>0,rb=false;this.props.attachments.forEach(function(vb){if(rb)return;rb=vb.style_list.indexOf("notification_target")>=0||vb.style_list.indexOf("question")>=0;if(rb)return;});var sb=false;if(this.props.storyInline){var tb=z.getViewportDimensions().x>ia,ub=ja[this.props.notif_type]&&this.props.excludeGroup;if(tb&&!eb&&!fb&&!qb&&!ub&&!rb)sb=true;kb=this._openItemFlyout(cb,ob,tb,eb,fb,qb,rb);if(tb&&!eb&&!fb&&!rb&&!qb){jb=null;if(this.state.showLoadingIndicator)pb=ca({color:"white",background:"light",className:"_5vp8",size:"large"});}}return (v.DOM.li({className:pa,'data-gt':this.props.tracking,onMouseLeave:ya},v.DOM.div({className:"anchorContainer"},v.DOM.a({id:ob,href:lb,ajaxify:ib,className:"_33e",rel:jb,onClick:kb,onMouseDown:this._markItemRead,onKeyDown:this._onKeyDownItem},o(null,v.DOM.span({style:mb,className:"_33h"},v.DOM.img({src:"/images/notif_flyout_indicator.png",className:(("flyoutNoIndicator")+(sb?' '+"flyoutShowIndicator":''))})),n({flex:n.FLEX.left},v.DOM.div({className:"_4l_v"},va,xa,o({className:(("_33f")+(this.state.isBizSite?' '+"_2g48":''))},v.DOM.img({className:"_10cu",src:this.props.icon.uri}),v.DOM.span(null,x({shorten:this.props.shortenTimestamp,time:this.props.timestamp.time,text:this.props.timestamp.text,verbose:this.props.timestamp.verbose,className:"_33g"})))),this._renderAttachedItem(db))),pb),hb,wa)));},_openItemFlyout:function(na,oa,pa,qa,ra,sa,ta){return function(event){if(event.type==='click'&&(event.button!==0||event.altKey||event.ctrlKey||event.shiftKey||event.metaKey))return true;if(this.state.showLoadingIndicator)return false;var ua=ja[this.props.notif_type]&&this.props.excludeGroup,va=new aa().setBool('screen_wide_enough',pa).setBool('is_snowlift',qa).setBool('is_vault_set',ra).setBool('is_aggregated_story',sa).setBool('should_fallback',ta).getURI();new h().setURI(va).send();if(!pa||qa||ra||sa||ua||ta)return;event.preventDefault();g.subscribeOnce('inlineStory/flyoutLoaded',function(){this.setState({showLoadingIndicator:false});}.bind(this));setTimeout(function(){this.state.showLoadingIndicator&&window.open(l.find(document,'#'+oa).href,'_self');}.bind(this),3000);this.setState({showLoadingIndicator:true});p.requestStory(this.props.id,oa);}.bind(this);}});e.exports=ma;},null); __d("filterObject",[],function(a,b,c,d,e,f){"use strict";function g(h,i,j){if(!h)return null;var k={};for(var l in h)if(h.hasOwnProperty(l)&&i.call(j,h[l],l))k[l]=h[l];return k;}e.exports=g;},null); __d("NotificationJewelList.react",["Animation","Event","NotificationConstants","NotificationHiddenState","NotificationJewelItem.react","NotificationSeenState","NotificationStore","NotificationUpdates","React","LegacyScrollableArea.react","Vector","copyProperties","createObjectFrom","cx","debounce","filterObject","getObjectValues","isEmpty","mapObject","merge","tx"],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){var ba=o.PropTypes,ca=5,da=160,ea=530,fa=40,ga=332,ha=430,ia=i.PayloadSourceType.LIVE_SEND;function ja(la){return !!(la.application&&la.application.id&&la.negative&&la.negative.show_first_receipt&&!la.application.is_facebook_app);}var ka=o.createClass({displayName:'NotificationJewelList',propTypes:{businessID:ba.string,excludeGroup:ba.bool,filter:ba.number,hasEverBeenOpened:ba.bool,maxHeight:ba.number,negativeTracking:ba.object,paused:ba.bool,staticNotifs:ba.object,storyInline:ba.bool,tracking:ba.string,useWideList:ba.bool},getInitialState:function(){this._currentlyFetching=false;this._pendingNotifs={};this._shouldScroll=false;var la=y(this.props.staticNotifs,function(ma){return ma.seen_state==='SEEN_AND_READ';});return {canFetchMore:!this.props.staticNotifs,notifs:this.props.staticNotifs||{},hiddenState:{},readState:la||{},firstReceiptsHandled:{}};},componentWillMount:function(){this._filter=function(la){return m.filterNotification(la,this.props.filter);}.bind(this);if(this.props.staticNotifs)return;m.setBusinessID(this.props.businessID);this._subscriptions=[n.subscribe('notifications-updated',function(la,ma){if(ma.source==ia&&!x(ma.updates)){this._shouldScroll=true;if(this.props.paused)this._pendingNotifs=z(this._pendingNotifs,ma.updates);return;}this._fetchAndUpdate(m.getCount(this._filter));}.bind(this)),n.subscribe(['hidden-state-updated','read-state-updated'],function(la,ma){if(la=='hidden-state-updated'){var na={};Object.keys(ma.updates).forEach(function(pa){na[pa]=j.isHidden(pa);});this.setState({hiddenState:z(this.state.hiddenState,na)});}else{var oa={};Object.keys(ma.updates).forEach(function(pa){oa[pa]=l.isRead(pa);});this.setState({readState:z(this.state.readState,oa)});}}.bind(this))];},componentWillUnmount:function(){if(this._subscriptions){while(this._subscriptions.length)this._subscriptions.pop().unsubscribe();this._subscriptions=null;}},_fetchAndUpdate:function(la){if(this.props.staticNotifs)return;this._currentlyFetching=true;m.getNotifications(la,this.props.filter,function(ma,na){if(na!==this.props.filter)return;var oa=v(ma,this._filter),pa=x(this._pendingNotifs)?oa:this._getNotifsWithCurrentOrder(oa);this._currentlyFetching=false;this.setState({notifs:pa,canFetchMore:m.canFetchMore(this.props.filter)});}.bind(this));},_getNotifsWithCurrentOrder:function(la){var ma=Object.keys(this.state.notifs),na=Object.keys(la).filter(function(pa){return !this.state.notifs[pa];}.bind(this));ma=ma.concat(na);var oa={};ma.forEach(function(pa){if(this._pendingNotifs[pa]){var qa=this.state.notifs[pa];if(qa)oa[pa]=qa;}else oa[pa]=la[pa];}.bind(this));return oa;},_fetchAndUpdateAll:function(){this._pendingNotifs={};this._fetchAndUpdate(m.getCount(this._filter));},_fetchNextSet:function(){if(!this._currentlyFetching){var la=Object.keys(this.state.notifs).length;this._fetchAndUpdate(la+ca);}},_onScroll:function(){if(this._currentlyFetching||!this.state.canFetchMore)return;if(this._isLoadingIndicatorVisible())this._fetchNextSet();},_isLoadingIndicatorVisible:function(){var la=this.refs.loading;if(!la)return false;var ma=this.refs.scrollable.getDOMNode(),na=q.getElementDimensions(ma).y;if(na===0)return false;var oa=q.getElementPosition(ma).y+na,pa=q.getElementPosition(la.getDOMNode()).y;pa-=fa;return paca){this._fetchAndUpdate(ma);}else this._fetchNextSet();return;}if(la.paused&&!this.props.paused){setTimeout(this._fetchAndUpdateAll,0);return;}if(this.props.paused&&!la.paused){if(this._shouldScroll&&this.refs.scrollable)this.refs.scrollable.getArea().scrollToTop(false);this._shouldScroll=false;}if(!this._currentlyFetching&&this._isLoadingIndicatorVisible())setTimeout(this._fetchNextSet,0);if(la.filter!=this.props.filter)setTimeout(this._fetchAndUpdateAll,0);},render:function(){var la=this.state.notifs,ma=null,na=null,oa=this.props.useWideList?ha:ga,pa=null;if(!x(la)){ma=o.DOM.ul({'data-gt':this.props.tracking},this._renderItems());na=this._calculateHeight();}else if(!this.state.canFetchMore)ma=o.DOM.div({className:"_572e"},"No new notifications");if(this.state.canFetchMore)pa=o.DOM.img({ref:"loading",src:"/images/loaders/indicator_blue_small.gif",className:"_33i"});return (o.DOM.div({className:"_50-t"},p({ref:"scrollable",width:oa,height:na,fade:true,persistent:true,onScroll:u(this._onScroll)},ma,pa)));}});e.exports=ka;},null); __d("NotificationJewelListController",["NotificationJewelList.react","React","copyProperties"],function(a,b,c,d,e,f,g,h,i){function j(k,l){this._root=k;this._config=l;this._filter=this._config.filter;this._hasEverBeenOpened=false;this._paused=false;this._render();}i(j.prototype,{open:function(){this._hasEverBeenOpened=true;this._render();},pause:function(){this._paused=true;this._render();},unpause:function(){this._paused=false;this._render();},setFilter:function(k){this._filter=k;this._render();},_render:function(){var k=g({filter:this._filter,hasEverBeenOpened:this._hasEverBeenOpened,paused:this._paused,initialNotifs:this._config.initialNotifs||{},useWideList:this._config.useWideList,tracking:this._config.tracking,negativeTracking:this._config.negativeTracking,shortenTimestamp:this._config.shortenTimestamp,storyInline:this._config.storyInline,excludeGroup:this._config.excludeGroup,businessID:this._config.businessID,maxHeight:this._config.maxHeight});h.renderComponent(k,this._root);}});e.exports=j;},null); __d("legacy:cookie",["Cookie"],function(a,b,c,d,e,f,g){a.getCookie=g.get;a.setCookie=g.set;a.clearCookie=g.clear;},3); __d("getHashtagRegex",[],function(a,b,c,d,e,f){function g(){var h='\xc0-\xd6'+'\xd8-\xf6'+'\xf8-\xff'+'\u0100-\u024f'+'\u0253-\u0254'+'\u0256-\u0257'+'\u0259'+'\u025b'+'\u0263'+'\u0268'+'\u026f'+'\u0272'+'\u0289'+'\u028b'+'\u02bb'+'\u0300-\u036f'+'\u1e00-\u1eff',i='\u0400-\u04ff'+'\u0500-\u0527'+'\u2de0-\u2dff'+'\ua640-\ua69f'+'\u0591-\u05bf'+'\u05c1-\u05c2'+'\u05c4-\u05c5'+'\u05c7'+'\u05d0-\u05ea'+'\u05f0-\u05f4'+'\ufb12-\ufb28'+'\ufb2a-\ufb36'+'\ufb38-\ufb3c'+'\ufb3e'+'\ufb40-\ufb41'+'\ufb43-\ufb44'+'\ufb46-\ufb4f'+'\u0610-\u061a'+'\u0620-\u065f'+'\u066e-\u06d3'+'\u06d5-\u06dc'+'\u06de-\u06e8'+'\u06ea-\u06ef'+'\u06fa-\u06fc'+'\u06ff'+'\u0750-\u077f'+'\u08a0'+'\u08a2-\u08ac'+'\u08e4-\u08fe'+'\ufb50-\ufbb1'+'\ufbd3-\ufd3d'+'\ufd50-\ufd8f'+'\ufd92-\ufdc7'+'\ufdf0-\ufdfb'+'\ufe70-\ufe74'+'\ufe76-\ufefc'+'\u200c-\u200c'+'\u0e01-\u0e3a'+'\u0e40-\u0e4e'+'\u1100-\u11ff'+'\u3130-\u3185'+'\uA960-\uA97F'+'\uAC00-\uD7AF'+'\uD7B0-\uD7FF'+'\uFFA1-\uFFDC',j=String.fromCharCode,k='\u30A1-\u30FA\u30FC-\u30FE'+'\uFF66-\uFF9F'+'\uFF10-\uFF19\uFF21-\uFF3A'+'\uFF41-\uFF5A'+'\u3041-\u3096\u3099-\u309E'+'\u3400-\u4DBF'+'\u4E00-\u9FFF'+j(173824)+'-'+j(177983)+j(177984)+'-'+j(178207)+j(194560)+'-'+j(195103)+'\u3003\u3005\u303B',l=h+i+k,m='\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6'+'\u00F8-\u0241\u0250-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EE\u037A\u0386'+'\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03CE\u03D0-\u03F5\u03F7-\u0481'+'\u048A-\u04CE\u04D0-\u04F9\u0500-\u050F\u0531-\u0556\u0559\u0561-\u0587'+'\u05D0-\u05EA\u05F0-\u05F2\u0621-\u063A\u0640-\u064A\u066E-\u066F'+'\u0671-\u06D3\u06D5\u06E5-\u06E6\u06EE-\u06EF\u06FA-\u06FC\u06FF\u0710'+'\u0712-\u072F\u074D-\u076D\u0780-\u07A5\u07B1\u0904-\u0939\u093D\u0950'+'\u0958-\u0961\u097D\u0985-\u098C\u098F-\u0990\u0993-\u09A8\u09AA-\u09B0'+'\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC-\u09DD\u09DF-\u09E1\u09F0-\u09F1'+'\u0A05-\u0A0A\u0A0F-\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32-\u0A33'+'\u0A35-\u0A36\u0A38-\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D'+'\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2-\u0AB3\u0AB5-\u0AB9\u0ABD'+'\u0AD0\u0AE0-\u0AE1\u0B05-\u0B0C\u0B0F-\u0B10\u0B13-\u0B28\u0B2A-\u0B30'+'\u0B32-\u0B33\u0B35-\u0B39\u0B3D\u0B5C-\u0B5D\u0B5F-\u0B61\u0B71\u0B83'+'\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99-\u0B9A\u0B9C\u0B9E-\u0B9F'+'\u0BA3-\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0C05-\u0C0C\u0C0E-\u0C10'+'\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C60-\u0C61\u0C85-\u0C8C'+'\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE'+'\u0CE0-\u0CE1\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D28\u0D2A-\u0D39'+'\u0D60-\u0D61\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6'+'\u0E01-\u0E30\u0E32-\u0E33\u0E40-\u0E46\u0E81-\u0E82\u0E84\u0E87-\u0E88'+'\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7'+'\u0EAA-\u0EAB\u0EAD-\u0EB0\u0EB2-\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6'+'\u0EDC-\u0EDD\u0F00\u0F40-\u0F47\u0F49-\u0F6A\u0F88-\u0F8B\u1000-\u1021'+'\u1023-\u1027\u1029-\u102A\u1050-\u1055\u10A0-\u10C5\u10D0-\u10FA\u10FC'+'\u1100-\u1159\u115F-\u11A2\u11A8-\u11F9\u1200-\u1248\u124A-\u124D'+'\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0'+'\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310'+'\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C'+'\u166F-\u1676\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711'+'\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7'+'\u17DC\u1820-\u1877\u1880-\u18A8\u1900-\u191C\u1950-\u196D\u1970-\u1974'+'\u1980-\u19A9\u19C1-\u19C7\u1A00-\u1A16\u1D00-\u1DBF\u1E00-\u1E9B'+'\u1EA0-\u1EF9\u1F00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D'+'\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC'+'\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC'+'\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u2094\u2102\u2107'+'\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D'+'\u212F-\u2131\u2133-\u2139\u213C-\u213F\u2145-\u2149\u2C00-\u2C2E'+'\u2C30-\u2C5E\u2C80-\u2CE4\u2D00-\u2D25\u2D30-\u2D65\u2D6F\u2D80-\u2D96'+'\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6'+'\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3006\u3031-\u3035'+'\u303B-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF'+'\u3105-\u312C\u3131-\u318E\u31A0-\u31B7\u31F0-\u31FF\u3400-\u4DB5'+'\u4E00-\u9FBB\uA000-\uA48C\uA800-\uA801\uA803-\uA805\uA807-\uA80A'+'\uA80C-\uA822\uAC00-\uD7A3\uF900-\uFA2D\uFA30-\uFA6A\uFA70-\uFAD9'+'\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C'+'\uFB3E\uFB40-\uFB41\uFB43-\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F'+'\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A'+'\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7'+'\uFFDA-\uFFDC',n='\u0300-\u036F\u0483-\u0486\u0591-\u05B9\u05BB-\u05BD\u05BF'+'\u05C1-\u05C2\u05C4-\u05C5\u05C7\u0610-\u0615\u064B-\u065E\u0670'+'\u06D6-\u06DC\u06DF-\u06E4\u06E7-\u06E8\u06EA-\u06ED\u0711\u0730-\u074A'+'\u07A6-\u07B0\u0901-\u0903\u093C\u093E-\u094D\u0951-\u0954\u0962-\u0963'+'\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7-\u09C8\u09CB-\u09CD\u09D7'+'\u09E2-\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47-\u0A48\u0A4B-\u0A4D'+'\u0A70-\u0A71\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD'+'\u0AE2-\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B43\u0B47-\u0B48\u0B4B-\u0B4D'+'\u0B56-\u0B57\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7'+'\u0C01-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55-\u0C56'+'\u0C82-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5-\u0CD6'+'\u0D02-\u0D03\u0D3E-\u0D43\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D82-\u0D83'+'\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2-\u0DF3\u0E31\u0E34-\u0E3A'+'\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB-\u0EBC\u0EC8-\u0ECD\u0F18-\u0F19'+'\u0F35\u0F37\u0F39\u0F3E-\u0F3F\u0F71-\u0F84\u0F86-\u0F87\u0F90-\u0F97'+'\u0F99-\u0FBC\u0FC6\u102C-\u1032\u1036-\u1039\u1056-\u1059\u135F'+'\u1712-\u1714\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17B6-\u17D3\u17DD'+'\u180B-\u180D\u18A9\u1920-\u192B\u1930-\u193B\u19B0-\u19C0\u19C8-\u19C9'+'\u1A17-\u1A1B\u1DC0-\u1DC3\u20D0-\u20DC\u20E1\u20E5-\u20EB\u302A-\u302F'+'\u3099-\u309A\uA802\uA806\uA80B\uA823-\uA827\uFB1E\uFE00-\uFE0F'+'\uFE20-\uFE23',o='\u0030-\u0039\u0660-\u0669\u06F0-\u06F9\u0966-\u096F\u09E6-\u09EF'+'\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0BE6-\u0BEF\u0C66-\u0C6F'+'\u0CE6-\u0CEF\u0D66-\u0D6F\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F29'+'\u1040-\u1049\u17E0-\u17E9\u1810-\u1819\u1946-\u194F\u19D0-\u19D9'+'\uFF10-\uFF19',p=m+n+l,q=o+'_',r=p+q,s='['+p+']',t='['+r+']',u='^|$|[^&'+r+']',v='[#\\uFF03]',w='('+u+')('+v+')('+t+'*'+s+t+'*)';return new RegExp(w,'ig');}e.exports=g;},null); __d("HashtagParser",["URLMatcher","getHashtagRegex"],function(a,b,c,d,e,f,g,h){var i=100,j=30,k=/@\[([0-9]+):([0-9]+):((?:[^\\\]]*(?:\\.)*)*)\]/g;function l(da){var ea=y(da),fa=0,ga=0;return n(da).map(function(ha){while(faea[ha][0]){fa[ia++]=ea[ha++];}else fa[ia++]=da[ga++];return fa.concat(da.slice(ga),ea.slice(ha));}function v(da,ea,fa){if(!fa)return false;var ga=x(fa,da);return w(da,ea,fa,ga)||w(da,ea,fa,ga+1);}function w(da,ea,fa,ga){if(!fa[ga])return false;var ha=fa[ga][0],ia=fa[ga][1];return !((da+ea-1ha+ia-1));}function x(da,ea){var fa=0,ga=da.length-1;while(fa<=ga){var ha=Math.floor((fa+ga)/2),ia=da[ha][0];if(ia==ea){return ha;}else if(ia=0)return {id:ga.id,name:ia,type:ga.type,offset:ha};});}var ca={};ca.parse=l;ca.parseWithoutMentions=m;e.exports=ca;},null); __d("FriendsCenterStickyController",["StickyController"],function(a,b,c,d,e,f,g){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(k,l,m,n){"use strict";g.call(this,k,l,m,n);this.$FriendsCenterStickyController0=l;this.$FriendsCenterStickyController1=n||k.parentNode;var o=k.getBoundingClientRect();this.$FriendsCenterStickyController2=o.bottom-o.top;this.$FriendsCenterStickyController3=true;}j.prototype.unstick=function(){"use strict";this.$FriendsCenterStickyController3=false;this.handleScroll();};j.prototype.restick=function(){"use strict";this.$FriendsCenterStickyController3=true;this.handleScroll();};j.prototype.shouldFix=function(){"use strict";if(!this.$FriendsCenterStickyController3)return false;var k=this.$FriendsCenterStickyController1.getBoundingClientRect();return this.$FriendsCenterStickyController0>=k.top&&this.$FriendsCenterStickyController0+this.$FriendsCenterStickyController20)this.countNew-=1;},_handleLink:function(y,event){var z=q.byClass(y,'jewelItemNew');if(z&&q.byClass(z,'fbRequestList')&&q.byClass(z,'beeperEnabled')){var aa=this._parseID(z.id);aa&&this._markSeenCallback(aa.requester,aa.type);this._decrementCountNewIfPositive();h.inform('jewel/count-updated',{jewel:'requests',count:this.countNew});l.removeClass(z,'jewelItemNew');}return true;},_handleScroll:function(){var y=m.scry(this._scrollableWrap,'.uiMorePager');if(!y||(u('fbRequestsJewelManualPager')&&y.length<2))return;var z=y.pop();if(z){var aa=s.getElementPosition(z,'viewport').y;if(aa>0)l.addClass(q.byClass(this._scrollableWrap,'uiScrollableArea'),'contentAfter');var ba=m.find(z,'a');if(!ba)return;var ca=s.getElementPosition(ba,'viewport').y;if(ca==this._lastLinkPosition)return;var da=s.getElementPosition(this._scrollableWrap,'viewport').y+s.getElementDimensions(this._scrollableWrap).y;if(ca-3000){this._lastLinkPosition=ca;var ea=ba.getAttribute('ajaxify');if(ea){new i(ea).setRelativeTo(ba).setStatusElement(q.byClass(ba,'stat_elem')).send();}else o.getInstance('jewel').showMore();}}},_addNotif:function(y,z){if(!z||this.jewel.isOpen())return;if(z.obj.notif_type!=='friend_confirmed')return;if(u('fbRequestsJewelLoading')){new i().setURI('/ajax/requests/loader/').send();return;}var aa={};aa.reloadcontent=true;new i().setURI('/ajax/requests/loader/').setData(aa).send();},_addRequest:function(y,z){if(!z)return;var aa=z.obj.from,ba=z.obj.suggester,ca=this._parseIDToInts(this._requestList[aa]).type,da=ca===19&&!ba;if(!da&&(ca||this.jewel.isOpen()))return;if(u('fbRequestsJewelLoading')){new i().setURI('/ajax/requests/loader/').send();}else{var ea={};ea.reloadcontent=true;new i().setURI('/ajax/requests/loader/').setData(ea).send();}},_removeOldRequest:function(y,z){if(!z||this.jewel.isOpen()||u('fbRequestsJewelLoading')!==null)return;var aa=this._requestList[z.obj.from],ba=aa&&u(aa);if(ba){if(l.hasClass(ba,'jewelItemNew')){this._decrementCountNewIfPositive();h.inform('jewel/count-updated',{jewel:'requests',count:this.countNew});}if(!l.hasClass(ba,'jewelItemResponded')){m.remove(ba);delete this._requestList[z.obj.from];--this._requestCount;this._conditionShowEmptyMessage();}}},pageInCollapsedRequests:function(){var y=u('fbRequestsJewelManualPager');if(y){var z=m.scry(y,'.uiMorePagerPrimary')[0];if(z.style&&z.style.display!='none')setTimeout(function(){z.click();},100);}},_markRead:function(){this.jewel.markSeen();this._clearNewItems();},_markSeenCallback:function(y,z){h.inform('friend-confirmed-notifs-seen');var aa=m.scry(this.jewelFlyout,'li');new j('/ajax/gigaboxx/endpoint/UpdateLastSeenTime.php',{folder:this.folder,first_item:aa[0].id}).send();new i().setURI('/ajax/friends/jewel/predicted_count_logging').setData({ego_predicted_count:this.egoPredictedCount,pending_count:this.pendingCount,unseen_timestamp:this.egoUnseenTimestamp,action_context:this.actionContext,should_log_ego_click:this.shouldLogEgoClick}).send();var ba=typeof y!='undefined'&&typeof z!='undefined'?{requester:y,type:z}:{};this.doNewMarkRead&&new j('/ajax/requests/mark_read/',ba).send();},_markSeenFromMessage:function(y,z){h.inform('jewel/count-updated',{jewel:'requests',count:0});},_clearNewItems:function(y,z){m.scry(this.jewel.root,'li.jewelItemNew').forEach(function(aa){l.removeClass(aa,'jewelItemNew');});},_updateCount:function(y,z){this.countNew=z.count;l.conditionClass(this.jewelFlyout,'beeperUnread',this.countNew>0);l.conditionClass(this.jewelFlyoutCase,'showRequests',this.countNew>0);if(this.newCountSpan){var aa=this.countNew==1?w._("{num} NEW REQUEST",{num:this.countNew}):w._("{num} NEW REQUESTS",{num:this.countNew});m.setContent(this.newCountSpan,aa);}},_conditionShowEmptyMessage:function(){m.scry(this.jewelFlyout,'li.empty').forEach(function(y){l.conditionShow(y,this._requestCount<=0);}.bind(this));},_openHandler:function(){h.inform('requestsJewel/opened');var y=m.scry(this.jewelFlyout,'.uiScrollableArea')[0];if(u('fbRequestsJewelLoading')){var z=Date.now();if(this.openTimestamp+50000){new i().setURI('/friends/requests/log_impressions').setData({ids:aa.join(','),ref:'jewel'}).send();var ba=Object.keys(this._egoData);if(ba.length>0)new i().setURI('/growth/jewel/impression_logging.php').setData({egodata:ba}).send();}}y&&r.poke(y);}});e.exports=x;},null); __d("legacy:RequestsJewel",["RequestsJewel"],function(a,b,c,d){a.RequestsJewel=b('RequestsJewel');},3); __d("JewelX",["Event","Arbiter","ArbiterMixin","CSS","DOM","HTML","Keys","TabIsolation","Toggler","copyProperties","emptyFunction","reportData","setTimeoutAcrossTransitions"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s){var t=function(u,v){u&&v&&this.init(u,v);};p(t,{_instancesByName:{},_resizeListener:null});p(t.prototype,i,{init:function(u,v){this.name=v.name;this.root=u;this.badge=v.badge;this.countNew=0;this.initialCount=0;this.escHandler=null;this.togglerInstance=o.createInstance(u).setSticky(false);if(v.keepOpenForSnowlift)this.togglerInstance.setPrePageTransitionCallback(this._onPrePageTransition.bind(this));t._instancesByName[this.name]=this;var w=this.getFlyout(),x=new n(w);o.createInstance(w).setSticky(false);o.listen('show',this.root,function(y){this._logFirstClick();this.hasNew()&&this.markSeen();this.reset();this.inform('opened');h.inform('layer_shown',{type:'Jewel'});x.enable();this.setupEvents();}.bind(this));o.listen('hide',this.root,function(y,z){this.hasNew()&&this.markSeen();this.reset();this.inform('closed');h.inform('layer_hidden',{type:'Jewel'});x.disable();this.removeEvents();}.bind(this));h.subscribe('jewel/count-updated',function(y,z){z.jewel==this.name&&this.update(z);}.bind(this));h.subscribe('jewel/count-initial',function(y,z){z.jewel==this.name&&this.setInitial(z);}.bind(this));h.subscribe('jewel/reset',function(y,z){z.jewel==this.name&&this.reset();}.bind(this));t._resizeListener=t._resizeListener||(function(){var y=null;return g.listen(window,'resize',function(){clearTimeout(y);y=s(h.inform.bind(h,'jewel/resize'),100);});})();},getRoot:function(){return this.root;},getFlyout:function(){if(typeof this._flyout==='undefined')this._flyout=k.find(this.root,'.fbJewelFlyout');return this._flyout;},hasNew:function(){return j.hasClass(this.root,'hasNew');},isOpen:function(){return j.hasClass(this.root,'openToggler');},reset:function(){j.removeClass(this.root,'hasNew');},setContent:function(u){var v=k.find(this.root,'ul.jewelItemList');k.setContent(v,l(u));},update:function(u){this.countNew=u.count;if(typeof this.countNew==='number'&&this.countNew<0)this.countNew=0;this.badge.setLegacyContent(this.countNew);var v=isNaN(this.countNew)||this.countNew>0;j.conditionClass(this.root,'hasNew',v);this.inform('updated',u);},setInitial:function(u){this.initialCount=u;},setupEvents:function(){this.escHandler=g.listen(document.documentElement,'keydown',function(u){if(u.keyCode===m.ESC&&this.isOpen())o.hide(this.root);}.bind(this));},removeEvents:function(){if(this.escHandler)this.escHandler.remove();},markSeen:function(){h.inform('jewel/count-updated',{jewel:this.name,count:0},h.BEHAVIOR_STATE);this.inform('marked-seen');},_onPrePageTransition:function(u,v){if(!this._isSnowliftURI(v.from)&&!this._isSnowliftURI(v.to))this.togglerInstance&&this.togglerInstance.hide();},_isSnowliftURI:function(u){return u&&u.getQueryData().hasOwnProperty('theater');},_logFirstClick:function(){this._logFirstClick=q;r('jewel_click',{gt:{count:this.countNew,initial:this.initialCount,jewel:this.name}});}});e.exports=t;},null); __d("LitestandNewsfeedCountUpdater",["Arbiter","AsyncRequest","LitestandMessages","LitestandSidebarBookmarkConfig","emptyFunction"],function(a,b,c,d,e,f,g,h,i,j,k){var l,m;function n(){m&&clearTimeout(m);if(l)return;m=setTimeout(o,j.nf_count_query_interval_ms);}function o(){if(l)return;new h().setURI('/ajax/litestand/newsfeed_count').setHandler(function(r){if(l)return;p(r.getPayload());n();}).setAllowCrossPageTransition(true).send();}function p(r){g.inform(i.UPDATE_HOME_COUNT,{count:r,onHome:l},g.BEHAVIOR_STATE);}var q={init:function(){q.init=k;g.subscribe(i.NEWSFEED_LOAD,function(){l=true;p(0);});g.subscribe(i.LEAVE_HOME,function(){l=false;n();});n();}};e.exports=q;},null); __d("LitestandChromeHomeCount",["Arbiter","CSS","DOM","Event","LitestandMessages","LitestandNewsfeedCountUpdater","Parent","UserAgent","$","csx","cx"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){var r=20,s,t,u,v,w,x={init:function(y){w=y;t=i.find(o('pageHead'),"._5ahz");s=t.parentNode;u=m.byClass(s,'navLink');v=false;g.subscribe(k.UPDATE_HOME_COUNT,function(z,aa){x.updateBadge(aa.onHome?0:aa.count);});j.listen(u,'click',function(event){var z=event.getModifiers();if(z.shift||(n.osx()&&z.meta)||(n.windows()&&z.control))x.updateBadge(0);});l.init();x.updateBadge(w);},updateBadge:function(y){w=y;var z=y>0;x.toggleBadge(z);if(z){var aa=y>r?r+'+':y;i.setContent(t,aa);}},toggleBadge:function(y){if(v===y)return;v=y;h.conditionClass(s,"_5ahy",!y);}};e.exports=x;},null); __d("MercuryJewelCountControl",["Arbiter","DOM","copyProperties","shield","MercuryServerRequests","MercuryThreadInformer","MercuryUnseenState"],function(a,b,c,d,e,f,g,h,i,j){var k=b('MercuryServerRequests').get(),l=b('MercuryThreadInformer').get(),m=b('MercuryUnseenState').get(),n,o,p,q=function(s){if(s||p.isOpen())m.markAsSeen();},r=function(s,t){n=s;o=h.find(n,'#mercurymessagesCountValue');p=t;this.render();k.subscribe('model-update-completed',function(u,v){q(false);});l.subscribe('unseen-updated',this.render.bind(this));p.subscribe('marked-seen',j(q,this,true));};i(r.prototype,{render:function(){g.inform('jewel/count-updated',{jewel:'mercurymessages',count:m.getUnseenCount()},g.BEHAVIOR_STATE);}});e.exports=r;},null); __d("MercuryJewelThreadlistControl",["ArbiterMixin","ChatOpenTab","CurrentUser","MercuryConfig","CSS","DOM","Event","HighlanderFinchGating","JSLogger","JSXDOM","MercuryAPIArgsSource","MercuryIDs","MercuryThreadlistConstants","MessagingTag","MessageThreadViewSource","Parent","MercuryPresence","MercuryJewelTemplates","Tooltip","URI","copyProperties","csx","cx","throttle","tx","MercuryServerRequests","MercuryOrderedThreadlist","MercuryThreadInformer","MercuryThreadMetadataRenderer","MercuryThreads","MercuryUnreadState"],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){var fa=b('MercuryServerRequests').get(),ga=b('MercuryOrderedThreadlist').get(),ha=b('MercuryThreadInformer').get(),ia=b('MercuryThreadMetadataRenderer').get(),ja=b('MercuryThreads').get(),ka=b('MercuryUnreadState').get(),la=o.create('mercury_jewel');function ma(ua,va){this._contentArea=l.scry(ua,'.scrollable')[0]||ua;this._contentElement=l.find(this._contentArea,'.jewelContent');this._loadingElement=l.find(this._contentArea,'.jewelLoading');this._loadMoreButton=l.find(this._contentArea,"._8y5");this._loadMoreLink=l.find(this._contentArea,"a._8y6");this._currentFolder=t.INBOX;this._jewelFolderLinks=[];this._jewelFolderLinks[t.INBOX]=l.find(va,"._1sde");this._jewelFolderLinks[t.OTHER]=l.find(va,"._1sdf");this._jewelFolderCounts=[];this._jewelFolderCounts[t.INBOX]=l.find(va,"._1sdg");this._jewelFolderCounts[t.OTHER]=l.find(va,"._1sdh");ra.bind(this)();m.listen(this._jewelFolderLinks[t.INBOX],'click',qa.bind(this,t.INBOX));m.listen(this._jewelFolderLinks[t.OTHER],'click',qa.bind(this,t.OTHER));this._curCount=[];this._curCount[t.INBOX]=s.JEWEL_THREAD_COUNT+1;this._curCount[t.OTHER]=s.JEWEL_THREAD_COUNT+1;this._isFolderLoaded=[];this._isFolderLoaded[t.INBOX]=false;this._isFolderLoaded[t.OTHER]=false;this._folderIsLoading=[];this._folderIsLoading[t.INBOX]=false;this._folderIsLoading[t.OTHER]=false;ha.subscribe('threadlist-updated',this.render.bind(this));ha.subscribe('unread-updated',ra.bind(this));this.render();la.bump('opened_threadlist_'+this._currentFolder);m.listen(this._contentArea,'scroll',da(na,50,this));m.listen(this._loadMoreLink,'click',this.renderMoreThreads.bind(this));}aa(ma,{EVENT_THREADS_LOADED:'threads-loaded',EVENT_THREADS_RENDERED:'threads-rendered'});aa(ma.prototype,g);aa(ma.prototype,{render:function(){l.empty(this._contentElement);k.show(this._loadingElement);k.hide(this._loadMoreButton);var ua=l.create('div');l.appendContent(this._contentElement,ua);ga.getThreadlist(s.RECENT_THREAD_OFFSET,this._curCount[this._currentFolder],this._currentFolder,this.renderThreads.bind(this,ua),true);},renderThreads:function(ua,va){this.inform(ma.EVENT_THREADS_LOADED);if(va.length){va.forEach(function(wa){var xa=x[':fb:mercury:jewel:threadlist-row'].build();ja.getThreadMeta(wa,function(ya){ia.renderCoreThreadlist(ya,xa,this.renderSingleThread.bind(this),{show_unread_count:true});}.bind(this));l.appendContent(ua,xa.getRoot());}.bind(this));}else l.setContent(this._contentElement,this.renderEmptyThreadlist());k.hide(this._loadingElement);k.conditionShow(this._loadMoreButton,!this._isFolderLoaded[this._currentFolder]);this.inform(ma.EVENT_THREADS_RENDERED);},renderSingleThread:function(ua,va){var wa=va.unread_count>0;if(wa)k.addClass(ua.getRoot(),'jewelItemNew');var xa=p.div({className:"x_div"}),ya=p.div({className:"_5c9q"}),za="Mark as Unread";if(wa)za="Mark as Read";y.set(ya,za,'above','right');m.listen(ya,'click',function(event){ja.changeThreadReadStatus(va.thread_id,va.unread_count>0);return false;});xa.appendChild(ya);ua.getNode('link').appendChild(xa);if(h.canOpenTab()){var ab=ua.getNode('presenceIndicator'),bb=va.is_canonical&&va.canonical_fbid?va.canonical_fbid:va.thread_id;ta(bb,ab);}if(n.HIGHLANDER_FINCH_GATING){fa.getServerThreadID(va.thread_id,function(cb){var db=z('/ajax/pages/messages/load_message_thread.php').setQueryData({pageid:i.getID(),threadid:va.thread_id,threadElementID:cb,folder:this._currentFolder,source:u.REFRESH_HIGHLANDER_JEWEL}),eb=ua.getNode('link');eb.setAttribute('rel','dialog');eb.setAttribute('ajaxify',db.toString());}.bind(this));}else ia.renderWebMessengerLink(va.thread_id,ua.getNode('link'),null,this._currentFolder);if(j.MessagesJewelOpenInChat)m.listen(ua.getRoot(),'click',function(cb){var db=h.canOpenTab()&&!cb.isDefaultRequested();if(db&&cb.prevent())h.openThread(va.thread_id,'jewel');});m.listen(ua.getRoot(),'mouseover',function(event){var cb=ua.getRoot();if(!v.byClass(cb,'notifNegativeBase'))k.addClass(cb,'selected');});m.listen(ua.getRoot(),'mouseout',function(event){k.removeClass(ua.getRoot(),'selected');});},renderMoreThreads:function(){k.addClass(this._loadMoreButton,'async_saving');this._folderIsLoading[this._currentFolder]=true;var ua=this._curCount[this._currentFolder]+s.JEWEL_MORE_COUNT;ga.getThreadlist(s.RECENT_THREAD_OFFSET,ua+1,this._currentFolder,pa.bind(this,ua,this._currentFolder),true,q.JEWEL);},renderEmptyThreadlist:function(){return l.create('li',{className:'empty'},"No messages");}});function na(){if(!this._isFolderLoaded[this._currentFolder]&&!this._folderIsLoading[this._currentFolder]&&oa.bind(this)())this.renderMoreThreads();}function oa(){return this._contentArea.scrollTop+this._contentArea.clientHeight>=this._contentArea.scrollHeight-1;}function pa(ua,va,wa){this._curCount[va]=ua;if(!this._isFolderLoaded[va]&&wa.length0){if(va==s.MAX_UNREAD_COUNT)va+='+';l.setContent(wa,ea._("({unread_count})",{unread_count:va}));}else l.setContent(wa,'');}function ta(ua,va){var wa=r.isValid(ua)&&r.isMultichat(ua);if(wa){k.addClass(va,'groupThread');}else w.updateOnPresenceChanges(ua,va);}e.exports=ma;},null); __d("MercuryJewel",["MercuryJewelCountControl","DOM","MercuryJewelThreadlistControl","userAction","MercuryChannelHandler","MercuryServerRequests"],function(a,b,c,d,e,f,g,h,i,j){b('MercuryChannelHandler');var k=b('MercuryServerRequests').get(),l=false;function m(q,r,s,t){if(typeof s==='undefined'){t=r;s=q;r=s.getRoot();q=s.getFlyout();}k.handleUpdate(t);var u=new g(r,s),v=h.find(q,'#MercuryJewelThreadList');if(s.getRoot()&&s.isOpen()){n.call(this,v,q);}else s.subscribe('opened',n.bind(this,v,q));}e.exports=m;function n(q,r){this._ua=j('messages').uai('click','jewel');this._listenForLoad=this._listenForRender=true;if(!l){var s=new i(q,r);s.subscribe(i.EVENT_THREADS_LOADED,o.bind(this));s.subscribe(i.EVENT_THREADS_RENDERED,p.bind(this));l=true;}}function o(){if(this._listenForLoad){this._ua.add_event('loaded');this._listenForLoad=false;}}function p(){if(this._listenForRender){this._ua.add_event('rendered');this._listenForRender=false;}}},null); __d("RenderManager",["copyProperties"],function(a,b,c,d,e,f,g){function h(i){"use strict";this._isDirty=false;this._obj=i;}h.prototype.dirty=function(){"use strict";if(!this._isDirty){this._isDirty=true;setTimeout(this._doPaint.bind(this),0);}};h.prototype._doPaint=function(){"use strict";this._isDirty=false;this._obj.paint();};e.exports=h;},null); __d("CounterDisplay",["Arbiter","CSS","DOM","RenderManager","Run","$","copyProperties","removeFromArray"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n){function o(p,q,r,s,t,u){m(this,{_name:p,_valueNode:l(q),_wrapperNode:l(r)||null,_statusClass:t,_rm:new j(this),_arbiterSubscription:null,_count:0});var v=this._valueNode.firstChild;if(v){var w=parseInt(v.nodeValue,10);if(!isNaN(w))this._count=w;}this._statusNode=s?l(s):null;this._subscribeAll();o.instances.push(this);if(!u)k.onLeave(this._destroy.bind(this),true);}m(o,{EVENT_TYPE_ADJUST:'CounterDisplay/adjust',EVENT_TYPE_UPDATE:'CounterDisplay/update',instances:[],adjustCount:function(p,q){g.inform(o.EVENT_TYPE_ADJUST+'/'+p,q);},setCount:function(p,q){g.inform(o.EVENT_TYPE_UPDATE+'/'+p,q);}});m(o.prototype,{_destroy:function(){delete this._valueNode;delete this._wrapperNode;if(this._arbiterSubscription){this._arbiterSubscription.unsubscribe();delete this._arbiterSubscription;}n(o.instances,this);},adjustCount:function(p){this._count=Math.max(0,this._count+p);this._rm.dirty();return this;},setCount:function(p){this._count=Math.max(0,p);this._rm.dirty();return this;},paint:function(){i.setContent(this._valueNode,this._count);this._toggleNodes();},_toggleNodes:function(){if(this._wrapperNode)h.conditionClass(this._wrapperNode,'hidden_elem',this._count<=0);if(this._statusClass&&this._statusNode)h.conditionClass(this._statusNode,this._statusClass,this._count>0);},_subscribeAll:function(){var p=[o.EVENT_TYPE_ADJUST+'/'+this._name,o.EVENT_TYPE_UPDATE+'/'+this._name];this._arbiterSubscription=g.subscribe(p,this._onInform.bind(this),g.SUBSCRIBE_NEW);},_onInform:function(p,q){q=parseInt(q);if(isNaN(q))return;if(p.indexOf(o.EVENT_TYPE_ADJUST)!=-1){this.adjustCount(q);}else if(p.indexOf(o.EVENT_TYPE_UPDATE)!=-1){this.setCount(q);}else return;return;}});e.exports=o;},null); __d("MessagingEvents",["Arbiter","ChannelConstants","arrayContains","copyProperties","isEmpty"],function(a,b,c,d,e,f,g,h,i,j,k){var l={},m=new g();function n(o){if(!k(l))return;for(var p in o)m.inform('count/'+p,o[p]);}m.subscribe('mark-as-read',function(o,p){(p.tids||p.chat_ids||[]).forEach(function(q){q=''+q;if(!(q in l)){l[q]=true;var r=function(){m.unsubscribe(s);clearTimeout(t);delete l[q];},s=m.subscribe('read',function(u,v){if(i((v.tids||[]),q)||i((v.chat_ids||[]),q))r();}),t=setTimeout(r,60000);}});});g.subscribe(h.getArbiterType('messaging'),function(o,p){var q=j({},p.obj),event=q.event||'';delete q.type;delete q.event;m.inform(event,q);if('unread_counts' in q){var r=q.unread_counts;n({unread:r.inbox,other_unseen:r.other});}});g.subscribe(h.getArbiterType('inbox'),function(o,p){var q=j(p.obj);delete q.type;n(q);});a.MessagingEvents=e.exports=m;},3); __d("TitanLeftNav",["CounterDisplay","MessagingEvents"],function(a,b,c,d,e,f,g,h){var i={initialize:function(){h.subscribe('count/other_unseen',function(j,k){g.setCount('other_unseen',k);});}};e.exports=i;},null); __d("AccessibilityShortcut",["AccessibilityLogger","Event","Focus","ge","onEnclosingPageletDestroy","warning"],function(a,b,c,d,e,f,g,h,i,j,k,l){var m={init:function(n,o){var p=h.listen(n,'click',function(q){q.preventDefault();var r=j(o);if(r){i.set(r);g.logSRKey();}else l(r,'Failed to set focus on element with ID: %s',o);});k(n,function(){return p.remove();});}};e.exports=m;},null); __d("AccessibleMenu",["Event","CSS","DOM","Keys","TabbableElements","Toggler"],function(a,b,c,d,e,f,g,h,i,j,k,l){var m,n,o;function p(){var x=i.scry(m,'a[rel="toggle"]')[0];x&&x.focus();l.getInstance(m).hide();}function q(x){if(!x)return false;h.removeClass(x,'selected');x.setAttribute('aria-selected','false');}function r(x){if(!x)return false;h.addClass(x,'selected');x.setAttribute('aria-selected','true');var y=k.find(x);if(y[0])y[0].focus();}function s(x){var y=i.scry(m,'.selected')[0],z=n.indexOf(y)+x,aa=n[z];if(!aa)return false;q(y);r(aa);}function t(x){if(!l.isShown()||l.getActive()!==m||h.hasClass(m,w.MENU_HIDDEN))return true;var y=g.getKeyCode(x);switch(y){case j.TAB:s(x.shiftKey?-1:1);g.prevent(x);break;case j.ESC:p();g.prevent(x);break;case j.UP:case j.DOWN:s(y===j.UP?-1:1);g.prevent(x);break;}}function u(x,y){m=y.getActive();n=i.scry(m,'[role="menuitem"]');if(!o)o=g.listen(document.documentElement,'keydown',t);}function v(){if(l.getActive()==m)q(i.scry(m,'.selected')[0]);}var w={init:function(x){l.listen('show',x,u);l.listen('hide',x,v);},MENU_HIDDEN:'menu_hidden'};e.exports=w;},null); __d("NotificationJewelReminder",["Arbiter","ContextualDialog","ContextualDialogXUITheme","DOM","Event","ImageBlock.react","LayerFadeOnHide","LayerFadeOnShow","NotificationConstants","NotificationStore","NotificationUpdates","React","SubscriptionsHandler","Toggler","$","cx","fbt","intlList"],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){var y=2;z.init=function(aa){"use strict";new z(aa);};function z(aa){"use strict";this.$NotificationJewelReminder0=aa;this.$NotificationJewelReminder1=aa.filter;this.$NotificationJewelReminder2=function(ba){return p.filterNotification(ba,this.$NotificationJewelReminder1);}.bind(this);if(p.getCount(this.$NotificationJewelReminder2)){this.$NotificationJewelReminder3();return;}q.subscribeOnce('update-notifications',function(ba,ca){if(ca.payloadsource===o.PayloadSourceType.INITIAL_LOAD)this.$NotificationJewelReminder3();}.bind(this));}z.prototype.$NotificationJewelReminder3=function(){"use strict";p.getNotifications(p.getCount(this.$NotificationJewelReminder2),this.$NotificationJewelReminder1,this.$NotificationJewelReminder5.bind(this));};z.prototype.$NotificationJewelReminder5=function(aa){"use strict";var ba=t.getInstance(u('fbNotificationsJewel'));if(ba&&ba.isShown())return;var ca=[],da,ea=Object.keys(aa);for(var fa=0;fa1?'notifications':'notification',{notifications:"notifications",notification:"notification"}),w.param("notification senders",x(ba))]));};z.prototype.$NotificationJewelReminder7=function(aa){"use strict";aa.show();this.$NotificationJewelReminder8=aa;var ba=aa.getRoot();this.$NotificationJewelReminder9=setTimeout(this.$NotificationJewelRemindera.bind(this),this.$NotificationJewelReminder0.show_time);this.$NotificationJewelReminderb=new s();this.$NotificationJewelReminderb.addSubscriptions(g.subscribe('layer_shown',function(ca,da){if(da&&da.type==='Jewel')this.$NotificationJewelRemindera();}.bind(this)),k.listen(ba,'mouseenter',function(){clearTimeout(this.$NotificationJewelReminder9);}.bind(this)),k.listen(ba,'mouseleave',this.$NotificationJewelRemindera.bind(this)),k.listen(ba,'click',function(){this.$NotificationJewelRemindera();t.show(u('fbNotificationsJewel'));}.bind(this)));};z.prototype.$NotificationJewelRemindera=function(){"use strict";clearTimeout(this.$NotificationJewelReminder9);this.$NotificationJewelReminder8.hide();this.$NotificationJewelReminderb.release();};e.exports=z;},null); __d("legacy:onvisible",["OnVisible"],function(a,b,c,d){a.OnVisible=b('OnVisible');},3); __d("PagesVoiceBar",["$","Arbiter","AsyncRequest","CSS","ChannelConstants","DOM","PageTransitions"],function(a,b,c,d,e,f,g,h,i,j,k,l,m){var n='PagesVoiceBar/initialized',o='PagesVoiceBar/switchVoice',p='page_transition',q='pages_voice_bar_sync',r=null,s=null,t=false;function u(aa,ba){new i('/ajax/pages/switch_voice.php').setData(ba).setHandler(function(ca){y();}).send();}function v(){r=null;}function w(aa,ba){if(ba.obj.profile_id&&ba.obj.profile_id==r)y();}function x(aa){h.subscribe(n,aa);}function y(){m.getNextURI().go();}var z={initVoiceBar:function(){if(t)return;s=g('pagesVoiceBarContent');h.subscribe(o,u);h.subscribe(p,v);h.subscribe(k.getArbiterType(q),w);t=true;h.inform(n,null,h.BEHAVIOR_STATE);},update:function(aa,ba){x(function(){r=ba;l.setContent(s,aa);});}};e.exports=z;},null); __d("PrivacyLiteFlyout",["Animation","Arbiter","ArbiterMixin","AsyncRequest","CSS","DOM","Ease","Event","Parent","PrivacyConst","SelectorDeprecated","Style","Toggler","copyProperties","csx","cx","ge","XPrivacyRemindersDismissControllerURIBuilder"],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){var y='PrivacyLiteFlyout/expandingSection',z={},aa={};function ba(ja,ka,la){var ma=ka?0:ja.offsetHeight;r.set(ja,'height',ma+'px');r.set(ja,'overflow','hidden');k.show(ja);var na=ka?ja.scrollHeight:0,oa=l.getID(ja);z[oa]&&z[oa].stop();z[oa]=new g(ja).to('height',na).ondone(function(){z[oa]=null;r.set(ja,'height','');r.set(ja,'overflow','');na||k.hide(ja);la();}).duration(Math.abs(na-ma)*1.5).ease(m.sineOut).go();}function ca(ja){return new j().setURI(ja).send();}function da(){return ca('/ajax/privacy/privacy_lite/increment_masher_tip_count');}function ea(){return ca('/ajax/privacy/privacy_lite/dismiss_masher_tip');}var fa=null,ga=false,ha=false,ia=t({loadBody:function(){this._loadBody(false);},loadBodyFromMegaphone:function(){this._loadBody(true);},_loadBody:function(ja){if(!ga&&w('fbPrivacyLiteFlyoutLoading')){ga=true;new j('/ajax/privacy/privacy_lite/loader').setData({from_megaphone:ja}).send();}},renderBody:function(ja,ka){var la=w('fbPrivacyLiteFlyoutLoading');if(la){l.replace(la,ja);ia.registerCallback(function(){ia.inform('load',null,h.BEHAVIOR_STATE);},ka);}},hideCleanup:function(ja){h.inform(y);var ka=l.scry(ja,"._2va0").forEach(function(la){k.removeClass(la,"_2va0");});},registerFlyoutToggler:function(ja,ka,la){fa=ka;var ma=s.createInstance(ja);ma.setSticky(false);s.listen(['show','hide'],ka,function(na){ia.inform(na);ha=na==='show';if(!ha){ia.hideCleanup(ja);ma.hide();h.inform('layer_hidden',{type:'PrivacyShortcutsFlyout'});}else{h.inform('layer_shown',{type:'PrivacyShortcutsFlyout'});if(la){la.start(this);la=null;}}}.bind(this));},isFlyoutVisible:function(){return fa&&s.getActive()===fa;},exists:function(){return !!l.scry(document.body,"._59fc")[0];},setFlyoutVisible:function(ja){ja?s.show(fa):s.hide(fa);},showSection:function(ja){var ka=aa[ja],la=ka.chevron,ma=ka.sublist_container;h.inform(y,la);if(ia.inform('expand',ja)!==false){k.removeClass(la,"_9or");k.addClass(la,"_9os");ba(ma,true,function(){ia.inform('expanded',ja);});}},hideSection:function(ja,ka,la){var ma=aa[ja],na=ma.chevron,oa=ma.sublist_container;if(la===na)return;if(ia.inform('collapse',ja)!==false){k.addClass(na,"_9or");k.removeClass(na,"_9os");ba(oa,false,function(){ia.inform('collapsed',ja);});}},toggleSection:function(ja){var ka=aa[ja].chevron;s.getInstance(ka).hide();if(k.hasClass(ka,"_9or")){ia.showSection(ja);new j('/ajax/privacy/privacy_lite/log_section_expand').setData({section:ja}).send();}else ia.hideSection(ja);},registerSection:function(ja,ka){aa[ja]=ka;h.subscribe(y,ia.hideSection.bind(null,ja));n.listen(ka.section_block,'click',ia.toggleSection.bind(null,ja));ia.inform(ja);},registerInlineHelpOnAudienceChangeOldSelector:function(ja,ka,la,ma){q.subscribe('select',function(na,oa){if(oa.selector!=ja)return;this._registerInlineHelpOnAudienceChange(ka,la,ma,oa.value);}.bind(this));},registerInlineHelpOnAudienceChangeNewSelector:function(ja,ka,la,ma){ja=ja.getInstance();ja.subscribe('changed',function(na){this._registerInlineHelpOnAudienceChange(ka,la,ma,ja.getSelectedBaseValue());}.bind(this));},_registerInlineHelpOnAudienceChange:function(ja,ka,la,ma){var na=l.find(ja,"._9o_"),oa=l.find(ja,"._2v9_");if(la){var pa=l.find(ja,"._5n9w"),qa=(ma==p.BaseValue.EVERYONE);k.conditionShow(pa,qa);k.conditionShow(na,!qa);if(pa&&qa){var ra=(new x()).setString('type','delta_everyone').setBool('log_plite',true).getURI();new j(ra).send();}}else k.show(na);k.hide(oa);if(ka)new j('/ajax/privacy/privacy_lite/kill_intro').send();},registerInlineHelpXOutOnClick:function(ja,ka,la){n.listen(ja,'click',function(){k.addClass(ka,"_9p0");});},registerBlockUnhideOnFocus:function(ja,ka){n.listen(ja,'focus',k.show.bind(null,ka));},registerMessageFilterSettingOnClick:function(ja,ka){var la=l.find(ja,"._fv0");n.listen(ja,'click',function(){if(la.checked)new j('/ajax/mercury/change_filtering_type.php').setData({filtering_type:ka,source:'privacy_lite'}).send();});},registerMasher:function(ja,ka){var la=false;h.subscribe(y,function(ma,na){var oa=true;if(na)oa=!!l.scry(o.byTag(na,'li'),"._571t").length;if(la||!oa)return;la=!!(da());});n.listen(ka,'click',function(){l.remove(ja);ea();});}},i);e.exports=ia;},null); __d("PrivacyLiteFlyoutHelp",["Event","Arbiter","AsyncRequest","ContextualHelpSearchController","CSS","DOM","Parent","copyProperties","csx","cx"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){var q,r;function s(t,u,v,w,x){this._width=315;r=l.find(u,'input');var y=l.create('div');this.init(t,r,y,v,w,{focusSearchBox:false});q=m.byClass(u,"_8-a");g.listen(x,'click',this._hideSearch.bind(this));h.subscribe('PrivacyLiteFlyout/expandingSection',this._hideSearch.bind(this));var z=l.scry(q,"._d1r")[0];z&&g.listen(z,'click',function(){k.addClass(q,"_aw6");r.focus();if(!this.suggestedResults)new i('/ajax/privacy/privacy_lite/help_suggestions').setHandler(function(aa){var ba=aa.getPayload().searchSuggestions,ca=l.find(q,"._4_8m");l.setContent(ca,ba);k.addClass(q,"_4_8l");}.bind(this)).send();}.bind(this));}n(s.prototype,new j(),{source:'privacy_shortcuts',_hideSearch:function(){this.clearResults();k.removeClass(q,"_aw6");},show:function(t){if(t===this.topics_area){k.removeClass(q,"_aw7");return;}else if(t===this.loader){k.addClass(q,"_aw7");k.hide(this.results_area);}else k.hide(this.loader);k.show(t);}});e.exports=s;},null); __d("ViewasChromeBar",["Event","Arbiter","AsyncRequest","CSS","DOM","Focus","ModalMask","PageTransitions","Parent","cx","csx"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){var r='ViewasChromeBar/initialized',s=null,t=false;function u(x){h.subscribe(r,x);}function v(x){j.addClass(x,"_7g7");var y=k.find(x,"._7g0");l.set(k.find(y,'.textInput'));}var w={initChromeBar:function(x){if(t)return;s=x;t=true;h.inform(r,null,h.BEHAVIOR_STATE);},update:function(x,y){u(function(){k.setContent(s,x);if(y)new i('/ajax/privacy/glasgow/viewas_bar_flyout_open').send();});},registerSpecificModeOnClick:function(x){g.listen(x,'click',v.bind(null,o.byClass(x,"_7f-")));},registerFlyoutModalMask:function(){m.show();n.registerHandler(m.hide,10);}};e.exports=w;},null); __d("BingScalingCommon",[],function(a,b,c,d,e,f){var g={integrateWebsuggestions:function(h,i,j,k,l){var m=[],n=i?m:[],o=[],p=0,q=0,r=j;k=Math.floor(j*k);for(var s=0;s0&&p0&&p0)o.push(t);}else{if(r<=0&&!i)continue;m.push(t);q++;r--;}}if(r>0&&o.length>0)n=n.concat(o.slice(0,r));if(!i)return m.concat(n);return n;}};e.exports=g;},null); __d("SearchSingleState",["fbt"],function(a,b,c,d,e,f,g){function h(j,k,l,m){return {classNames:'grammar',groupIndex:0,indexInGroup:j,path:k,text:l,type:'grammar',uid:m};}var i={getSuggestions:function(j,k,l){if(l==='ent:user'){return this.getSuggestionsForUser(j,k);}else if(l==='ent:page'){return this.getSuggestionsForPage(j,k);}else if(l==='ent:app'){return this.getSuggestionsForApp(j,k);}else if(l==='ent:group')return this.getSuggestionsForGroup(j,k);},getSuggestionsForUser:function(j,k){return [h(0,'/search/'+j+'/photos-of',g._("photos of {full name}",[g.param("full name",k)]),'photos_of_user'),h(1,'/search/'+j+'/friends',g._("friends of {full name}",[g.param("full name",k)]),'friends_of_user'),h(2,'/search/'+j+'/pages-liked',g._("favorite pages of {full name}",[g.param("full name",k)]),'pages_liked_user'),h(3,'/search/str/'+k+'/users-named',g._("find all people named \"{full name}\"",[g.param("full name",k)]),'people_named_text')];},getSuggestionsForPage:function(j,k){return [h(0,'/search/'+j+'/photos-of',g._("photos of {name of page}",[g.param("name of page",k)]),'photos_of_page'),h(1,'/search/'+j+'/likers',g._("people who like {name of page}",[g.param("name of page",k)]),'page_likers'),h(2,'/search/str/'+k+'/pages-named',g._("find all pages named \"{name of page}\"",[g.param("name of page",k)]),'pages_named_text')];},getSuggestionsForGroup:function(j,k){return [h(0,'/search/'+j+'/members',g._("{name of group} members",[g.param("name of group",k)]),'members_of_group'),h(1,'/search/'+j+'/photos-in',g._("photos in {name of groups}",[g.param("name of groups",k)]),'photos_in_group'),h(2,'/search/'+j+'/creators',g._("{name of group} creators",[g.param("name of group",k)]),'creators_of_group'),h(3,'/search/'+j+'/admins',g._("{name of group} administrators",[g.param("name of group",k)]),'admins_of_group')];},getSuggestionsForApp:function(j,k){return [h(0,'/search/'+j+'/apps-similar-to',g._("apps similar to {name of app}",[g.param("name of app",k)]),'similar_apps'),h(1,'/search/'+j+'/app-users',g._("people who use {name of app}",[g.param("name of app",k)]),'app_users'),h(2,'/search/str/'+k+'/pages-named',g._("find all apps named \"{name of page}\"",[g.param("name of page",k)]),'apps_named_text')];}};e.exports=i;},null); __d("SearchDataSource",["Event","Arbiter","AsyncResponse","DataSource","HashtagSearchResultUtils","copyProperties","createArrayFrom","BingScalingCommon","PageTransitions","SearchSingleState","UnicodeCJK"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){var r='/typeahead/search/facebar/nullstate/';for(var s in j)if(j.hasOwnProperty(s))u[s]=j[s];var t=j===null?null:j.prototype;u.prototype=Object.create(t);u.prototype.constructor=u;u.__superConstructor__=j;function u(v){"use strict";this._token=v.token||'';this._lazyonload=v.lazyonload===false?false:true;this._extraTypes=v.extraTypes;this._buckets=v.buckets;this._noMultiFetch=v.noMultiFetch||false;this._maxWebSuggToCountFetchMore=v.maxWebSuggToCountFetchMore||0;this._nullStateConfig=v.nullStateConfig||{};var w=v.maxResults||8;j.call(this,v);this._numResults={min:3,max:w};this.recordingRoute=v.recordingRoute||'non_banzai';this._enabledHashtag=v.enabledHashtag||false;this.logBackendQueriesWindow=v.logBackendQueriesWindow||25;this._minWebSugg=v.minWebSugg||2;this._queryToWebSuggState={};this._genTime=v.genTime;this.cacheUnicodeMatch.setConfigs({prefix_hangul_conjoining_jamo:true,prefix_kana_drop_trailing_latin:v.cjkDropLatinInCjTokens,prefix_kana_hiragana_to_katakana:v.cjkUiCacheHiraganaToKatakana});this.backendUnicodeMatch.setConfigs({prefix_kana_drop_trailing_latin:v.cjkDropLatinInCjTokens});}u.prototype.init=function(){"use strict";t.init.call(this);this._leanPayload=null;this._bootstrapRequestsPending=0;this._criticalOnly=true;this._updateMaxResults();g.listen(window,'resize',this._updateMaxResults.bind(this));if(this._nullStateConfig.singleState){h.subscribe('page_transition',this.handlePageTransition.bind(this));h.subscribe('search/updateNullState',this.updateNullState.bind(this));}if(this._nullStateConfig.recent)h.subscribe('search/refreshRecentSearchesNullstate',this.refreshRecentSearches.bind(this));};u.prototype.refreshRecentSearches=function(){"use strict";this.nullStateData=null;};u.prototype.handlePageTransition=function(){"use strict";this.nullStateParams={};};u.prototype.updateNullState=function(event,v){"use strict";this.nullStateParams=v;this.fetchNullState();};u.prototype.fetchNullState=function(v){"use strict";if(!this._nullStateConfig.hasNullState)return;var w=null;if(this.nullStateParams&&this.nullStateParams.uid){this.nullStateParams.query=v||'';w=this._fetchDataForSingleState();}else w=this._fetchDataForNullState();if(w)this.inform('respond',{value:this.nullStateParams?this.nullStateParams.query:'',results:w,isAsync:false,nullState:true});};u.prototype._fetchDataForSingleState=function(){"use strict";if(this.nullStateDataWithProfile&&this.nullStateParams.uid===this.nullStateDataWithProfile.profileID)return this.nullStateDataWithProfile.data;if(this.nullStateParams.type==='ent:app'||this.nullStateParams.type==='ent:group'||this.nullStateParams.type==='ent:page'){this.fetch(r,{profile_id:this.nullStateParams.uid,ent_type:this.nullStateParams.type},{singleState:true});this.nullStateDataWithProfile={profileID:this.nullStateParams.uid};return;}var v=p.getSuggestions(this.nullStateParams.uid,this.nullStateParams.text,this.nullStateParams.type);if(!v)return this._fetchDataForNullState();this.nullStateDataWithProfile={data:v,profileID:this.nullStateParams.uid};return v;};u.prototype._shouldRefreshNullState=function(){"use strict";if(!this._nullStateConfig.recent)return false;var v=window.location.href;if(!v)return false;if(v.indexOf('allactivity')&&v.indexOf('log_filter=search'))return true;return false;};u.prototype._fetchDataForNullState=function(){"use strict";if(this.nullStateData&&!this._shouldRefreshNullState())return this.nullStateData;this.fetch(r,{value:""},{nullState:true,value:''});return null;};u.prototype.dirty=function(){"use strict";t.dirty.call(this);this._fetchOnUseRequests=[];};u.prototype.asyncErrorHandler=function(v){"use strict";if(window.Dialog&&window.Dialog.getCurrent()==null&&v.getError()==1400003)i.verboseErrorHandler(v);};u.prototype.fetch=function(v,w,x){"use strict";x=x||{};x.fetch_start=Date.now();var y=o.getMostRecentURI().path;w=l(w,{path:y});t.fetch.call(this,v,w,x);};u.prototype.fetchHandler=function(v,w){"use strict";if(w.nullState){this.nullStateData=v.getPayload().entries;this.inform('respond',{value:'',results:v.getPayload().entries,isAsync:true,nullState:true});return;}if(w.singleState){this.nullStateDataWithProfile.data=v.getPayload().entries;this.inform('respond',{results:v.getPayload().entries,isAsync:true,value:this.nullStateParams?this.nullStateParams.query:'',nullState:true});return;}var x=v.getPayload(),y=l({fetch_end:Date.now()},w),z=y.value?h.BEHAVIOR_EVENT:h.BEHAVIOR_PERSISTENT;this.inform('beginFetchHandler',{response:v});if(w.type=='lean'){this._leanPayload=x;this._processLean();}else{if(x.coeff2_ts)y.coeff2_ts=x.coeff2_ts;var aa={limit:typeof x.webSuggLimit!=='undefined'?x.webSuggLimit:6,showOnTop:typeof x.webSuggOnTop!=='undefined'?x.webSuggOnTop:false};this._queryToWebSuggState[w.value]=aa;t.fetchHandler.call(this,v,w);if(w.bootstrap&&!v.getRequest().getData().no_cache)y.browserCacheHit=(x.timestamp0){w.bootstrap=false;--this._bootstrapRequestsPending;!this._bootstrapRequestsPending&&this._bootstrapPostProcess();}if(x.no_data||x.stale||x.token!==this._token){var ba=l({},v.getRequest().getData());if(ba.lazy){delete ba.lazy;ba.token=this._token;this._fetchOnUse(ba,w);}}}this.inform('endpointStats',y,z);if(w&&!!w.value)this.inform('completeFetch',{response:v,stats:y});};u.prototype.respond=function(v,w,x){"use strict";this.inform('respondValidUids',w);this.inform('reorderResults',w);var y=this.buildData(w,v);y.forEach(function(z,aa){z.origIndex=aa;});this.inform('respond',{value:v,results:y,isAsync:!!x});return y;};u.prototype.buildData=function(v,w){"use strict";if(!v||v.length===0)return [];var x=this.getWebSuggState(w),y=x.showOnTop,z=n.integrateWebsuggestions(v.map(this.getEntry.bind(this)),Boolean(y),this._maxResults,x.limit);z.length=Math.min(z.length,this._maxResults);return z;};u.prototype.getWebSuggState=function(v){"use strict";while(v){var w=this._queryToWebSuggState[v];if(typeof w!=='undefined')return w;v=v.slice(0,v.length-1);}return {limit:0,showOnTop:false};};u.prototype.fetchLean=function(){"use strict";this._fetchLean();};u.prototype._isQueryTooShort=function(v){"use strict";return v.length0)this.inform('extra_bootstrap',{time:Date.now()},h.BEHAVIOR_PERSISTENT);this._fetchOnUseRequests=[];};u.prototype.onLoad=function(v,w){"use strict";this.inform('onload',{time:Date.now()},h.BEHAVIOR_PERSISTENT);if(v)setTimeout(this.bootstrap.bind(this,w),0);};u.prototype.mergeUids=function(v,w,x,y){"use strict";var z=this.getDynamicHashtagResult(y);if(y&&z&&w.indexOf(z)<=0)w.unshift(z);var aa=x[0]?this.getEntry(x[0]):null,ba=w[0]?this.getEntry(w[0]):null,ca=(aa&&aa.replace_results)?aa:null;ca=(!ca&&ba&&ba.replace_results)?ba:ca;var da=t.mergeUids.call(this,v,w,x,y);if(ca){this.inform('backend_topreplace',{});return this.deduplicateByKey([ca.uid].concat(da));}return da;};u.prototype.getTextToIndexFromFields=function(v,w){"use strict";var x=[],y=v.tokenVersion==="v2";for(var z=0;z0&&!this.stats.first_result_time)this.recordStat('first_result_time',Date.now());};t.prototype.recordSelectInfo=function(v){"use strict";var w=v.selected,x=v.index;if(w.groupIndex!==undefined)x=v.index-w.groupIndex-1;var y={href:w.path},z=w.dataGT?{gt:JSON.parse(w.dataGT)}:{};o('click',y,null,null,z);r('search').uai('click');if(w.uid=='search'){this.recordStat('selected_search',1);}else if(w.uid=='invite'){this.recordStat('selected_invite',1);}else{var aa=w.log_type||w.rankType||w.render_type||w.type,ba=(aa=='friend'?'user':aa);this.recordStat('selected_'+ba,1);this.recordStat('selected_position',x);this.recordStat('selected_type',aa);this.recordStat('selected_name_length',w.text.length);this.recordStat('selected_id',w.uid);this.recordStat('selected_degree',w.bootstrapped?1:2);this.recordStat('selected_recent_search',w.recent_search);var ca=m.parse(this.data.getTextToIndex(w)).tokens,da=u(ca,this.query);if(da)this.recordStat('matched_terms',da);}var ea={};this._extraRecorder.forEach(function(fa){fa(v,this.results,ea);}.bind(this));this.recordStat('extra_select_info',JSON.stringify(ea));if(w.type==='websuggestion'){this.recordStat('selected_memcached_websuggestion',w.fromMemcache);this.recordStat('selected_websuggestion_source',w.websuggestion_source);}this.recordStat('selected_with_mouse',v.clicked?1:0);};t.prototype._dataToSubmit=function(){"use strict";this.recordStat('candidate_results',this.buildResults());this.recordStat('query',this.query);this.recordStat('init_time',this.initTime);if(this.initStartTime){this.recordStat('init_start_time',this.initStartTime);this.recordStat('onload_time',this._onloadTime);this.initStartTime=0;}this.recordStat('bootstrapped',this.bootstrapStats.bootstrapped);if(this.bootstrapStats.endTime){this.recordStat('bootstrapped_time',this.bootstrapStats.endTime);this.recordStat('user_bootstrap_ms',this.bootstrapStats.user);this.recordStat('other_bootstrap_ms',this.bootstrapStats.other);this.bootstrapStats.endTime=0;}this.recordStat('coeff2_ts',this.bootstrapStats.coeff2_ts);this.recordStat('max_results',this.data._maxResults);if(this.backendQueries.length>0){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(s.taSessionLoggingSample){var v=[];this.results.forEach(function(aa){v.push([aa.text||'',aa.category||'',aa.subtext||'']);});this.recordStat('raw_suggestions_text',v);}var w=this.stats;for(var x in this.avgStats){var y=this.avgStats[x];w[x]=y[0]/y[1];}for(var z in this.appendStats)w[z]=JSON.stringify(this.appendStats[z]);return w;};t.prototype.buildResults=function(){"use strict";var v=(this.results||[]).map(function(w,x){var y=m.parse(this.data.getTextToIndex(w)).tokens,z=w.rankType||w.render_type||w.type,aa=w.bootstrapped?1:0,ba=w.s_token||'',ca=(typeof w.index=='undefined')?100:w.index,da=u(y,this.query)||this.query,ea=w.index_rank,fa=w.match_type,ga=w.l_type,ha=w.vertical_type,ia=w.prefix_match,ja=w.prefix_length,ka=w.text,la=w.category,ma=w.subtext;if(typeof w.groupIndex=='number')return [w.groupIndex,w.indexInGroup,w.uid,z,aa,ba,da,ea,fa,ia,ja,w.origIndex,ga,ha,ka,la,ma,ca];return [0,x,w.uid,z,aa,ba,da,ea,fa,ia,ja,w.origIndex,ga,ha,ka,la,ma,ca];}.bind(this));return JSON.stringify(v);};t.prototype.submit=function(){"use strict";var v=this._dataToSubmit();switch(this.data.recordingRoute){case 'double_recording':if(Math.random()>.5){v.recorded_first='legacy';setTimeout(this.submitThroughAsyncRequest.bind(this,v),0);h.post(this._banzaiRoute,v,{delay:0,retry:true});}else{v.recorded_first='banzai';h.post(this._banzaiRoute,v,{delay:0,retry:true});setTimeout(this.submitThroughAsyncRequest.bind(this,v),0);}break;case 'random_recording':if(Math.random()>.5){this.submitThroughAsyncRequest(v);}else h.post(this._banzaiRoute,v,{delay:0,retry:true});break;case 'banzai_basic':h.post(this._banzaiRoute,v);break;case 'banzai_vital':h.post(this._banzaiRoute,v,{delay:0,retry:true});break;default:this.submitThroughAsyncRequest(v);}this._reset();};t.prototype.addLatencyToSample=function(v,w,x){"use strict";v.addInteger(x+'query_start',w.queryStart);v.addInteger(x+'query_end',w.queryEnd);v.addInteger(x+'keypress_query_end',w.keyPressToQueryEnd);v.addInteger(x+'render',w.render);v.addInteger(x+'keypress_render',w.keyPressToRender);};t.prototype.logToScuba=function(v,w,x,y,z){"use strict";var aa=new l('search_facebar_js',null,{addBrowserFields:true,addPredictedGeographyFields:true,addUser:true,addSearchVersion:true,addGatekeepers:{facebarGKs:true}});aa.addInteger('sample_rate',x.sample_rate);aa.addNormal('site',x.site);aa.addDenorm('query',y);var ba=v.payload;ba.entities&&aa.addInteger('num_entities',ba.entities.length);Object.keys(this.performanceTimings).forEach(function(ca){aa.addInteger(ca,this.performanceTimings[ca]);}.bind(this),this);if(ba.results||ba.entries)aa.addInteger('num_results',(ba.results||ba.entries).length);if(ba.gzipped_payload_size!==undefined)aa.addInteger('gzipped_payload_size',ba.gzipped_payload_size);if(w.recv&&w.render>w.recv){aa.addInteger('time_render',w.render-w.recv);aa.addInteger('time_js_async',w.recv);}if(w.payload_size)aa.addInteger('payload_size',w.payload_size);aa.addInteger('query_id',v.queryId);aa.addDenorm('user_id',i.getID());aa.addDenorm('session_id',this.stats.sid);aa.addNormal('typeahead_type',z);if(w.remoteQueryLatencies){this.addLatencyToSample(aa,w.remoteQueryLatencies,'remote_');aa.addInteger('remote_keypress_query_dispatch',w.remoteQueryLatencies.keyPressToQueryDispatch);aa.addInteger('remote_keypress_query_start',w.remoteQueryLatencies.keyPressToQueryStart);aa.addNormal('inflight_requests',w.remoteQueryLatencies.inflightRequests);aa.addInteger('inflight_requests',w.remoteQueryLatencies.inflightRequests);aa.addNormal('waiting_queries',w.remoteQueryLatencies.waitingQueries);aa.addInteger('waiting_queries',w.remoteQueryLatencies.waitingQueries);}if(w.cacheQueryLatencies)this.addLatencyToSample(aa,w.cacheQueryLatencies,'cache_');aa.post();};t.prototype.submitThroughAsyncRequest=function(v){"use strict";if(Object.keys(v).length>0)new g().setURI(this._endPoint).setMethod('POST').setData({stats:v}).setOption('handleErrorAfterUnload',true).setErrorHandler(function(w){v.retry=true;new g().setURI(this._endPoint).setMethod('POST').setData({stats:v}).setOption('asynchronous',false).send();}.bind(this)).send();};var u=function(v,w){if(!v||!w)return;var x=m.parse(w);if(x.flatValue[x.flatValue.length-1]===' ')return x.flatValue;var y=x.tokens[x.tokens.length-1],z={};v.forEach(function(ea){z[ea]=(z[ea]||0)+1;});var aa={},ba=x.tokens.slice(0,x.tokens.length-1);ba.forEach(function(ea){aa[ea]=(aa[ea]||0)+1;});for(var ca=0;ca0)){ba.push(da);return ba.join(' ');}}return undefined;};p(t.prototype,{_endPoint:'/ajax/typeahead/record_metrics.php',_banzaiRoute:'search'});e.exports=t;},null); __d("legacy:CompactTypeaheadRenderer",["CompactTypeaheadRenderer"],function(a,b,c,d){if(!a.TypeaheadRenderers)a.TypeaheadRenderers={};a.TypeaheadRenderers.compact=b('CompactTypeaheadRenderer');},3);