/*!CK:3328720586!*//*1459382612,*/

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

__d("OptimisticVideoPostEvent",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={VIDEO_POST_ADDED:"video_post_added",VIDEO_POST_REMOVED:"video_post_removed",POST_REMOVED_WITHOUT_REPLACEMENT:"post_removed_without_replacement"};},null);
__d("OptimisticVideoPostSource",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={PAGES_TIMELINE:"pages_timeline",VIDEO_HUB:"video_hub",USERS_TIMELINE:"users_timeline"};},null);
__d("TimelineSeenStateConstants",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={FT_TIMELINE_HASH_IDENTIFIER_KEY:"thid"};},null);
__d("TimelineViewportTrackingLogType",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={IMPRESSION:"impression",DURATION:"duration"};},null);
__d("VideoEditSource",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={PROCESSING_DIALOG:"processing_dialog",OPTIMISTIC_VIDEO_POST:"optimistic_video_post",VIDEO_ASSET_INSIGHTS:"video_asset_insights",PERMALINK:"permalink",TIMELINE:"timeline",SNOWLIFT:"snowlift",LIBRARY:"library",REFERENCE_LIBRARY:"reference_library",UNKNOWN:"unknown"};},null);
__d("VideoLibraryNuxAction",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={IMPRESSION:"impression",DISMISS:"dismiss"};},null);
__d("VideoLibraryNuxType",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={HIGHLIGHTED_VIDEOS_NUX:"highlighted_videos_nux",OPTIMISTIC_POST_NUX:"optimistic_post_nux",VIDEO_HUB_NUX:"video_hub_nux",VIDEO_INSIGHTS_NUX:"video_insights_nux"};},null);
__d("VideoLibrarySource",[],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports={VIDEO_UPLOAD_CONFIRMATION_DIALOG:"video_upload_confirmation_dialog",OPTIMISTIC_VIDEO_POST:"optimistic_video_post",VIDEO_INSIGHTS:"video_insights",VIDEOS_HUB:"videos_hub"};},null);
__d('FBProfilePhotoShadow.react',['cx','React','joinClasses'],function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();var i=c('React').createClass({displayName:'FBProfilePhotoShadow',render:function(){var j=this.props,k=j.className,l=j.children,m=babelHelpers.objectWithoutProperties(j,['className','children']),n=c('React').Children.only(l);return (c('React').createElement('div',babelHelpers['extends']({},m,{className:c('joinClasses')(k,"_38vo")}),c('React').cloneElement(n,{className:c('joinClasses')(n.props.className,"_44ma")})));}});f.exports=i;},null);
__d('OptimisticPostMetadata.react',['cx','React','XUIText.react','Link.react','BackgroundImage.react','getDOMImageSize'],function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();var i=470,j=263,k=472,l=c('React').createClass({displayName:'OptimisticPostMetadata',componentDidMount:function(){c('getDOMImageSize')(this.props.image,this.onGetSize);},getInitialState:function(){return {height:j};},onGetSize:function(m,n,o){var p=m<n?i:j;this.setState({height:p});},render:function(){return (c('React').createElement('div',null,c('React').createElement('div',{className:"_1gi0"},c('React').createElement(c('XUIText.react'),{size:'medium',weight:'bold',display:'block'},c('React').createElement(c('Link.react'),null,this.props.title)),c('React').createElement(c('XUIText.react'),{size:'medium',weight:'normal',display:'block'},this.props.description)),c('React').createElement('div',{className:"_2bc-"},c('React').createElement(c('BackgroundImage.react'),{src:this.props.image,backgroundSize:'contain',width:k,height:this.state.height}))));}});f.exports=l;},null);
__d('OptimisticPostMetadataWithoutThumbnail.react',['cx','EventListener','OptimisticPostMetadata.react','React','ReactDOM','generateVideoThumbnails'],function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();var i=c('React').createClass({displayName:'OptimisticPostMetadataWithoutThumbnail',_loadedmetadataListener:null,getInitialState:function(){return {thumbnail:''};},componentDidMount:function(){var j=c('ReactDOM').findDOMNode(this.refs.videoPlayer);this._loadedmetadataListener=c('EventListener').listen(j,'loadedmetadata',this.generateVideoThumbnails);},componentWillUnmount:function(){if(this._loadedmetadataListener){this._loadedmetadataListener.remove();this._loadedmetadataListener=null;}},generateVideoThumbnails:function(){var j=c('ReactDOM').findDOMNode(this.refs.videoPlayer);c('generateVideoThumbnails')(j,200,200,1).done(function(k){this.setState({thumbnail:k.thumbnails[0].getURL()});}.bind(this));},render:function(){return (c('React').createElement('div',null,c('React').createElement(c('OptimisticPostMetadata.react'),{title:this.props.title,description:this.props.description,image:this.state.thumbnail}),c('React').createElement('video',{key:'videoPlayer',ref:'videoPlayer',className:"_2mpk",src:this.props.videoFileUrl})));}});f.exports=i;},null);
__d('OptimisticPostUFISection.react',['cx','Image.react','React','UFICommentLink.react','UFILikeLink.react','UFIShareLink.react','XUICardSection.react','XUIPopoverButton.react'],function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();var i=' \u00b7 ',j=' \u0020 ',k=c('React').createClass({displayName:'OptimisticPostUFISection',getDefaultProps:function(){var l={inlineShareHighlight:true};return {ufiExperiments:l};},render:function(){var l=null;if(this.props.isPagePost)l=c('React').createElement('div',{className:"_1f6t _3uni"},c('React').createElement('div',{className:"_3m9g"},c('React').createElement('div',{className:"_40yk"},c('React').createElement(c('XUIPopoverButton.react'),{haschevron:true,image:c('React').createElement(c('Image.react'),{width:16,height:16,src:this.props.profilePicture}),ref:'open-menu-button',suppressed:true,type:'button'}))));return (c('React').createElement(c('XUICardSection.react'),null,c('React').createElement('div',{className:"_sa_"},l,c('React').createElement('div',{className:"_a7s _3399"},c('React').createElement('div',{className:"_524d"},c('React').createElement('div',{className:"_42nr"},c('React').createElement('span',null,c('React').createElement(c('UFILikeLink.react'),{likeAction:true,ufiExperiments:this.props.ufiExperiments})),c('React').createElement('span',null,c('React').createElement(c('UFICommentLink.react'),null)),c('React').createElement('span',null,c('React').createElement(c('UFIShareLink.react'),null))))))));}});f.exports=k;},null);
__d('StoryProfile.react',['cx','BackgroundImage.react','FBProfilePhotoShadow.react','Image.react','ImageBlock.react','InlineBlock.react','Link.react','PrivacyConst','React','XUIGrayText.react','XUIText.react','joinClasses'],function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();var i=c('React').PropTypes,j=c('React').createClass({displayName:'StoryProfile',propTypes:{privacySetting:i.number.isRequired,privacyIndicator:i.object,profilePicture:i.string.isRequired,username:i.string.isRequired,uploadTime:i.string.isRequired,profileURL:i.string,openProfileURLInNewPage:i.bool,additionalLink:i.shape({URL:i.string,text:i.string})},getDefaultProps:function(){return {openProfileURLInNewPage:false};},_renderPrivacyIndicator:function(){if(this.props.privacyIndicator){return this.props.privacyIndicator;}else{var k=this.props.privacySetting==c('PrivacyConst').BaseValue.EVERYONE,l=this.props.privacySetting==c('PrivacyConst').BaseValue.ALL_FRIENDS;return (c('React').createElement(c('BackgroundImage.react'),{width:13,height:12,className:"_14g-"+(k?' '+"_14g_":'')+(l?' '+"_5qhp":'')+(!l&&!k?' '+"_14h0":'')}));}},_renderProfileName:function(){var k,l;if(this.props.profileURL){var m;if(this.props.openProfileURLInNewPage)m='_blank';l='bold';k=c('React').createElement(c('Link.react'),{href:this.props.profileURL,target:m},this.props.username);}else k=this.props.username;return (c('React').createElement(c('XUIText.react'),{className:"_14gz",size:'medium',weight:l,display:'block'},k));},_renderAdditionalLink:function(){if(this.props.additionalLink)return (c('React').createElement(c('XUIGrayText.react'),{shade:'light',size:'small',display:'inline'},' · ',c('React').createElement(c('Link.react'),{href:this.props.additionalLink.URL,target:'_blank'},this.props.additionalLink.text)));return null;},render:function(){return (c('React').createElement(c('ImageBlock.react'),{spacing:'medium',className:c('joinClasses')(this.props.className,"_56-3")},c('React').createElement(c('FBProfilePhotoShadow.react'),null,c('React').createElement(c('Image.react'),{className:"_56-4",src:this.props.profilePicture})),c('React').createElement(c('InlineBlock.react'),{alignv:'middle',height:40,fullWidth:true},this._renderProfileName(),c('React').createElement('div',null,c('React').createElement(c('XUIGrayText.react'),{shade:'light',size:'small',display:'inline'},this.props.uploadTime,' · '),this._renderPrivacyIndicator(),this._renderAdditionalLink()))));}});f.exports=j;},null);
__d("XPagesManagerPublishingToolsController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/{page_token}\/publishing_tools\/",{page_token:{type:"String",required:true},business_id:{type:"Int"},current_page:{type:"Int"},section:{type:"String"},source:{type:"Enum",enumType:1}});},null);
__d('VideoLibraryButton.react',['cx','fbt','React','URI','VideoLibrarySource','XPagesManagerPublishingToolsController','XUIDialogButton.react'],function a(b,c,d,e,f,g,h,i){var j,k;if(c.__markCompiled)c.__markCompiled();j=babelHelpers.inherits(l,c('React').Component);k=j&&j.prototype;l.prototype.$VideoLibraryButton1=function(){'use strict';return c('XPagesManagerPublishingToolsController').getURIBuilder().setString('page_token',this.props.pageID).setString('section','VIDEOS').setEnum('source',this.props.source).getURI();};l.prototype.$VideoLibraryButton2=function(){'use strict';this.$VideoLibraryButton1().go();};l.prototype.render=function(){'use strict';return (c('React').createElement(c('XUIDialogButton.react'),{action:'cancel',className:"_2bhc",label:i._("Video Library"),size:this.props.size,onClick:this.$VideoLibraryButton2.bind(this)}));};function l(){'use strict';j.apply(this,arguments);}l.defaultProps={size:'small'};f.exports=l;},null);
__d("XVideoEditController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/video\/edit\/",{v:{type:"Int",required:true},album:{type:"Int"},source:{type:"Enum",enumType:1}});},null);
__d("XVideoEditDialogController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/video\/edit\/dialog\/",{video_id:{type:"Int"},source:{type:"Enum",enumType:1},story_dom_id:{type:"String"},timeline_identifier:{type:"String"},post_id:{type:"String"},video_asset_id:{type:"Int"},__asyncDialog:{type:"Int"}});},null);
__d('OptimisticVideoPost.react',['fbt','cx','ActorURI','AsyncRequest','LeftRight.react','OptimisticPostMetadata.react','OptimisticPostMetadataWithoutThumbnail.react','OptimisticPostUFISection.react','PrivacyConst','ProgressBar.react','React','ReactLayeredComponentMixin','StoryProfile.react','VideoEditSource','VideoLibraryButton.react','VideoLibrarySource','VideoThumbnailConfig','XUIAmbientNUX.react','XUIButton.react','XUICard.react','XUICardSection.react','XVideoEditController','XVideoEditDialogController'],function a(b,c,d,e,f,g,h,i){if(c.__markCompiled)c.__markCompiled();var j=c('React').PropTypes,k=c('React').createClass({displayName:'OptimisticVideoPost',mixins:[c('ReactLayeredComponentMixin')],propTypes:{profilePicture:j.string,username:j.string,privacySetting:j.number,metadataTitle:j.string,metadataDescription:j.string,thumbnail:j.string,videoID:j.string,isPagePost:j.bool,shouldShowVideoEditDialog:j.bool,targetID:j.string,videoFileUrl:j.string,shouldShowVideoLibraryNux:j.bool},getDefaultProps:function(){return {profilePicture:'',username:'',privacySetting:c('PrivacyConst').BaseValue.EVERYONE,metadataTitle:'',metadataDescription:'',thumbnail:'',progress:0,videoID:'',isPagePost:false,shouldShowVideoEditDialog:false,videoFileUrl:'',shouldShowVideoLibraryNux:false};},getInitialState:function(){return {shouldShowVideoLibraryNux:this.props.shouldShowVideoLibraryNux,videoLibraryNuxImpression:0};},getThumbnail:function(){if(this.props.thumbnail)return this.props.thumbnail;return c('VideoThumbnailConfig').defaultThumbnailURL;},onEditClick:function(){var l;if(this.props.shouldShowVideoEditDialog){l=c('XVideoEditDialogController').getURIBuilder().setInt('video_id',this.props.videoID).setEnum('source',c('VideoEditSource').OPTIMISTIC_VIDEO_POST).getURI();if(this.props.targetID)l=c('ActorURI').create(l,this.props.targetID);new (c('AsyncRequest'))(l).send();}else{l=c('XVideoEditController').getURIBuilder().setInt('v',this.props.videoID).setEnum('source',c('VideoEditSource').OPTIMISTIC_VIDEO_POST).getURI();window.open(l,'_blank');}},onNuxDismiss:function(){this.setState({shouldShowVideoLibraryNux:false});this.props.onVideoLibraryNuxDismiss();},renderLayers:function(){if(!this.props.shouldShowVideoLibraryNux)return null;return {videoLibraryNux:c('React').createElement(c('XUIAmbientNUX.react'),{contextRef:function(){return this.refs.video_library_button;}.bind(this),shown:true,position:'above',onCloseButtonClick:this.props.onVideoLibraryNuxDismiss},'Manage your videos, all in one place.')};},render:function(){var l=h._("Just Now"),m=h._("Preparing... {number} \u0025",[h.param('number',this.props.progress)]),n=null;if(this.props.shouldShowVideoLibraryButton)n=c('React').createElement(c('VideoLibraryButton.react'),{ref:'video_library_button',pageID:this.props.targetID,source:c('VideoLibrarySource').OPTIMISTIC_VIDEO_POST});var o=this.props.shouldShowVideoLibraryButton,p=c('React').createElement(c('XUICardSection.react'),{background:'light-wash'},c('React').createElement('div',{className:"_pro"},c('React').createElement('div',{className:"_2uu3"},c('React').createElement(c('LeftRight.react'),{className:"_1mg"},c('React').createElement('div',null,c('React').createElement('span',null,c('React').createElement(c('ProgressBar.react'),{className:(!o?"_1mh":'')+(o?' '+"_1mi":''),value:this.props.progress,label:m}))),c('React').createElement('div',null,n,c('React').createElement(c('XUIButton.react'),{className:"_4p26",label:'Edit',size:'small',onClick:this.onEditClick})))))),q=this.props.profilePicture||'',r=this.props.username||'',s=this.props.privacySetting||-1,t=c('React').createElement(c('StoryProfile.react'),{className:"_4r8g",profilePicture:q,username:r,uploadTime:l,privacySetting:s}),u=this.props.thumbnail?c('React').createElement(c('OptimisticPostMetadata.react'),{title:this.props.metadataTitle,description:this.props.metadataDescription,image:this.getThumbnail()}):c('React').createElement(c('OptimisticPostMetadataWithoutThumbnail.react'),{title:this.props.metadataTitle,description:this.props.metadataDescription,videoFileUrl:this.props.videoFileUrl}),v=h._("Boost Post"),w=this.props.isPagePost?c('React').createElement('div',{className:"_5c_1"},c('React').createElement(c('LeftRight.react'),null,c('React').createElement('div',null),c('React').createElement(c('XUIButton.react'),{label:v,use:'confirm'}))):null,x=c('React').createElement(c('OptimisticPostUFISection.react'),{ufiExperiments:this.props.ufiExperiments,profilePicture:this.props.profilePicture,isPagePost:this.props.isPagePost}),y=c('React').createElement('div',null,t,u,w,x),z=c('React').createElement('div',{className:"_5c_3"});return (c('React').createElement('div',{className:!!this.props.isPagePost?"_5ctl":''},c('React').createElement(c('XUICard.react'),{className:"_4p28"},p,c('React').createElement('div',{className:"_prq"},y,z))));}});f.exports=k;},null);
__d('OptimisticVideoPostLogger',['BanzaiLogger'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h={logEvent:function(event,i,j,k,l){c('BanzaiLogger').log('OptimisticVideoPostLoggerConfig',{number_of_posts:j,source:i,event:event,target_id:k,video_id:l});}};f.exports=h;},null);
__d('OptimisticVideoPostUtils',['AsyncRequest'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h={shouldShowOptimisticPost:function(i){if(i.isScheduledPost||i.isHiddenFromTimeline||i.isSecret||!i.isPageToPage&&!i.isToUserProfile||i.isDraft)return false;return true;},checkVideoStatus:function(i,j,k,l){new (c('AsyncRequest'))().setURI('/ajax/video/encode/feedback/ping/').setData({video_id:i}).setHandler(function(m){var n=m.getPayload();if(m.error){k(i,m);}else if(n.is_ready){j(i);}else l(i);}).send();}};f.exports=h;},null);
__d("XVideoGenerateStoryController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/video\/generate_story\/",{video_id:{type:"Int"},feed_location:{type:"Enum",enumType:0},timeline_identifier:{type:"String"}});},null);
__d("XVideoLibraryNuxController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/pages\/video_library\/nux\/",{action:{type:"Enum",required:true,enumType:1},nux_type:{type:"Enum",required:true,enumType:1}});},null);
__d("XVideoOptimisticPostingController",["XController"],function a(b,c,d,e,f,g){c.__markCompiled&&c.__markCompiled();f.exports=c("XController").create("\/video\/optimistic_posting\/",{video_id:{type:"Int",required:true}});},null);
__d('OptimisticVideoPostList.react',['Arbiter','AsyncRequest','ChannelConstants','FBFeedLocations','OptimisticVideoPost.react','OptimisticVideoPostEvent','OptimisticVideoPostLogger','OptimisticVideoPostSource','OptimisticVideoPostUtils','PagesComposer','React','ReactDOM','Run','TimelineComposer','VideoLibraryNuxAction','VideoLibraryNuxType','XVideoGenerateStoryController','XVideoLibraryNuxController','XVideoOptimisticPostingController'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=b.URL||b.webkitURL||{},i='video_encode',j=7,k=5000,l=2,m=c('React').createClass({displayName:'OptimisticVideoPostList',getInitialState:function(){return {videoPostsMetadata:{},videoPosts:[],shouldShowVideoLibraryNux:this.props.shouldShowVideoLibraryNux,videoLibraryNuxImpression:0,videoLibraryNuxImpressionLogged:false};},componentDidUpdate:function(){if(!this.state.videoLibraryNuxImpressionLogged&&this.state.videoPosts.length>0&&this.state.shouldShowVideoLibraryNux){var n=c('XVideoLibraryNuxController').getURIBuilder().setEnum('action',c('VideoLibraryNuxAction').IMPRESSION).setEnum('nux_type',c('VideoLibraryNuxType').OPTIMISTIC_POST_NUX).getURI();new (c('AsyncRequest'))().setURI(n).send();this.setState({videoLibraryNuxImpressionLogged:true});}},componentDidMount:function(){var n=c('Arbiter').subscribe('videoUpload/complete',this.onVideoPostSubmitted),o=c('Arbiter').subscribe(this.getChannelType(),this.onEncodeUpdate);c('Run').onLeave(function(){return n.unsubscribe();});c('Run').onLeave(function(){return o.unsubscribe();});if(this.props.data.length>0)this.initializePosts();},initializePosts:function(){var n=[],o={};for(var p=0;p<this.props.data.length;p++){if(!c('OptimisticVideoPostUtils').shouldShowOptimisticPost(this.props.data[p]))break;var q=babelHelpers['extends']({},this.props.data[p],{shouldRender:false});q.progress=0;var r=q.videoID;q.inactivityTimer=this.startInactivityTimer(r);n.push(r);o[r]=q;}this.setState({videoPostsMetadata:o,videoPosts:n});},getChannelType:function(){return c('ChannelConstants').getArbiterType(i);},updateVideoData:function(n){var o={};o[n.videoID]=babelHelpers['extends']({},n,{shouldRender:true,fakeProgressTimer:setInterval(function(){return this.fakeInitialProgress(n.videoID);}.bind(this),700),inactivityTimer:this.startInactivityTimer(n.videoID)});o[n.videoID].progress=0;var p=babelHelpers['extends']({},this.state.videoPostsMetadata,o),q=[n.videoID].concat(this.state.videoPosts);this.setState({videoPostsMetadata:p,videoPosts:q});this.logEvent(c('OptimisticVideoPostEvent').VIDEO_POST_ADDED,n.videoID);},onVideoPostSubmitted:function(n,o){if(!c('OptimisticVideoPostUtils').shouldShowOptimisticPost(o))return;if(!o.isToUserProfile){this.updateVideoData(o);return;}var p=c('XVideoOptimisticPostingController').getURIBuilder().setInt('video_id',o.videoID).getURI();new (c('AsyncRequest'))().setURI(p).setHandler(function(q){this.updateVideoData(babelHelpers['extends']({},q.payload,{videoFileUrl:o.videoFileURL}));}.bind(this)).send();},checkVideoStatus:function(n){c('OptimisticVideoPostUtils').checkVideoStatus(n,this.onEncodeFinish,this.onEncodeFinish,this.restartInactivityTimer);},startInactivityTimer:function(n){return setTimeout(function(){return this.checkVideoStatus(n);}.bind(this),k);},restartInactivityTimer:function(n){this.stopInactivityTimer(n);var o=babelHelpers['extends']({},this.state.videoPostsMetadata),p=babelHelpers['extends']({},o[n]);p.inactivityTimer=this.startInactivityTimer(n);o[n]=p;this.setState({videoPostsMetadata:o});},stopInactivityTimer:function(n){clearTimeout(this.state.videoPostsMetadata[n].inactivityTimer);},logEvent:function(event,n){c('OptimisticVideoPostLogger').logEvent(event,this.props.isPagePost?c('OptimisticVideoPostSource').PAGES_TIMELINE:c('OptimisticVideoPostSource').USERS_TIMELINE,this.state.videoPosts.length,this.props.targetID,n);},fakeInitialProgress:function(n){var o=this.state.videoPostsMetadata[n].progress;if(o>j){this.stopFakeInitialProgress(n);return;}var p=babelHelpers['extends']({},this.state.videoPostsMetadata),q=babelHelpers['extends']({},p[n]);q.progress+=1;p[n]=q;this.setState({videoPostsMetadata:p});this.restartInactivityTimer(n);},stopFakeInitialProgress:function(n){if(!this.state.videoPostsMetadata[n].fakeProgressTimer)return;var o=babelHelpers['extends']({},this.state.videoPostsMetadata);clearTimeout(o[n].fakeProgressTimer);var p=babelHelpers['extends']({},o[n]);p.fakeProgressTimer=null;o[n]=p;this.setState({videoPostsMetadata:o});},onEncodeUpdate:function(n,o){var p=String(o.obj.videoID);if(!this.state.videoPostsMetadata[p])return;var q=babelHelpers['extends']({},this.state.videoPostsMetadata);if(o.obj.progress<q[p].progress)return;this.stopFakeInitialProgress(p);var r=babelHelpers['extends']({},q[p]);r.progress=o.obj.progress;r.shouldRender=true;q[p]=r;this.setState({videoPostsMetadata:q});if(this._isEncodingFinished(o.obj.stage)){this.onEncodeFinish(p);}else this.restartInactivityTimer(p);},_isEncodingFinished:function(n){return n==='finish';},onEncodeFinish:function(n){if(!this.state.videoPostsMetadata[n])return;this.stopInactivityTimer(n);var o=this.props.isPagePost?c('FBFeedLocations').PAGE_TIMELINE:c('FBFeedLocations').TIMELINE,p=c('XVideoGenerateStoryController').getURIBuilder().setInt('video_id',n).setEnum('feed_location',o).getURI();new (c('AsyncRequest'))().setURI(p).setData({video_id:n,feed_location:o}).setHandler(function(q){return this.handleRequest(q,n);}.bind(this)).send();},handleRequest:function(n,o){var p=n.payload;if(p){if(this.props.isPagePost){c('PagesComposer').renderStory(c('ReactDOM').findDOMNode(this),p);}else c('TimelineComposer').renderCapsuleBasedStory(c('ReactDOM').findDOMNode(this),p);}else this.logEvent(c('OptimisticVideoPostEvent').POST_REMOVED_WITHOUT_REPLACEMENT,o);this.removeOptimisticPost(o);},removeOptimisticPost:function(n){var o=babelHelpers['extends']({},this.state.videoPostsMetadata);delete o[n];var p=this.state.videoPosts;p=this.removeVideoID(p,n);this.setState({videoPostsMetadata:o,videoPosts:p});this.logEvent(c('OptimisticVideoPostEvent').VIDEO_POST_REMOVED,n);},removeVideoID:function(n,o){var p=n.indexOf(o);n.splice(p,1);return n;},onVideoLibraryNuxShown:function(){var n=this.state.videoLibraryNuxImpression+1;this.setState({videoLibraryNuxImpression:n});if(n>=l)this.setState({shouldShowVideoLibraryNux:false});},onVideoLibraryNuxDismiss:function(){this.setState({shouldShowVideoLibraryNux:false});var n=c('XVideoLibraryNuxController').getURIBuilder().setEnum('action',c('VideoLibraryNuxAction').DISMISS).setEnum('nux_type',c('VideoLibraryNuxType').OPTIMISTIC_POST_NUX).getURI();new (c('AsyncRequest'))().setURI(n).send();},renderOptimisticPost:function(n,o){if(!n.shouldRender)return c('React').createElement('div',{key:n.videoID});var p;if(n.videoThumbnail){p=n.videoThumbnail;}else if(h.createObjectURL&&n&&n.videoThumbnailBlob){p=h.createObjectURL(n.videoThumbnailBlob);this.setThumbnailURL(p,n.videoID);}else p='';return (c('React').createElement(c('OptimisticVideoPost.react'),{username:n.userDisplayName,profilePicture:n.userProfilePictureURI,metadataTitle:n.videoTitle,metadataDescription:n.videoDescription,thumbnail:p,videoID:n.videoID,videoFileUrl:n.videoFileUrl,key:n.videoID,progress:n.progress,ufiExperiments:this.props.ufiExperiments,privacySetting:n.privacySetting,isPagePost:this.props.isPagePost,shouldShowVideoEditDialog:this.props.shouldShowVideoEditDialog,targetID:this.props.targetID,shouldShowVideoLibraryButton:this.props.shouldShowVideoLibraryButton,shouldShowVideoLibraryNux:o,onVideoLibraryNuxDismiss:this.onVideoLibraryNuxDismiss,onVideoLibraryNuxShown:this.onVideoLibraryNuxShown}));},setThumbnailURL:function(n,o){var p=babelHelpers['extends']({},this.state.videoPostsMetadata);p[o].videoThumbnail=n;this.setState({videoPostsMetadata:p});},render:function(){var n=this.state.videoPostsMetadata,o=this.state.videoPosts.map(function(p,q){return (this.renderOptimisticPost(n[p],q===0&&this.state.shouldShowVideoLibraryNux));}.bind(this));return (c('React').createElement('ul',null,o));}});f.exports=m;},null);
__d('OptimisticVideoPostController',['React','ReactDOM','CSS','OptimisticVideoPostList.react'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h={init:function(i,j,k,l,m,n,o,p){this._postsContainer=i;c('ReactDOM').render(c('React').createElement(c('OptimisticVideoPostList.react'),{data:j,targetID:k,isPagePost:l,ufiExperiments:m,shouldShowVideoEditDialog:n,shouldShowVideoLibraryButton:o,shouldShowVideoLibraryNux:p}),this._postsContainer);c('CSS').show(this._postsContainer);}};f.exports=h;},null);
__d('TimelineContextItemLogger',['cx','BanzaiLogger','Event','FBJSON','Parent','Run','tidyEvent'],function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();var i='MTimelineXContextItemsLoggerConfig',j='impression',k='click',l='context_item_url',m='event',n="_md0",o=[];function p(r,s,t){var u=c('FBJSON').parse(r.getAttribute('data-store'));u[m]=s;if(t)u[l]=t;c('BanzaiLogger').log(i,u);}var q={logWhenVisible:function(r){if(!o.length)c('Run').onLeave(function(){o=[];});o.push(r);},logWhenClicked:function(r){c('tidyEvent')(c('Event').listen(r,'click',function(s){var t=s.getTarget();if(t.nodeName!=='A')return;var u=c('Parent').byClass(t,n);u&&p(u,k,t.href);}));},listenToExpand:function(r){c('tidyEvent')(r.addListener('expanded',function(){while(o.length)p(o.pop(),j);}));}};f.exports=q;},null);
__d('TimelineCapsule',['csx','Arbiter','CSS','DataStore','DOM','DOMQuery','DOMScroll','Parent','TimelineConstants','TimelineLegacySections','Vector','$','queryThenMutateDOM'],function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();var i=function(){var j={},k={};function l(n){c('DOMQuery').scry(n,"._3ram").forEach(function(o){var p=o.getAttribute('data-endmarker'),q=o.getAttribute('data-pageindex'),r=function(){if(!o.parentNode)return;c('DataStore').set(c('TimelineConstants').DS_LOADED,n.id,q);c('DOM').remove(o);c('Arbiter').inform(c('TimelineConstants').SECTION_FULLY_LOADED,{scrubberKey:p,pageIndex:q,capsuleID:n.id,childCount:n.childNodes.length});};if(c('TimelineLegacySections').get(p)){r();}else var s=c('Arbiter').subscribe(c('TimelineConstants').SECTION_REGISTERED,function(t,u){if(u.scrubberKey===p){r();s.unsubscribe();}});});c('Arbiter').inform('TimelineCapsule/balanced',{capsule:n});}function m(n,o){var p=c('Parent').byAttribute(n,'data-size');if(p)if(c('CSS').hasClass(n.parentNode,'timelineReportContent')){o(n);}else o(p);}return {removeUnit:function(n){m(n,function(o){c('DOM').remove(o);});},removeUnitWithID:function(n){i.removeUnit(c('$')(n));},hideUnit:function(n){m(n,function(o){c('CSS').addClass(o,'fbTimelineColumnHidden');});},undoHideUnit:function(n,o){c('DOM').remove(c('Parent').byClass(o,'hiddenText'));m(n,function(p){c('CSS').removeClass(p,'fbTimelineColumnHidden');});},unplacehold:function(n){var o=c('$')(n);o.style.top=null;c('CSS').removeClass(o,'visiblePlaceholder');c('CSS').removeClass(o,'placeholder');var p=c('Parent').byClass(o,'fbTimelineCapsule');delete j[p.id][n];i.balanceCapsule(p);},scrollToCapsule:function(n){if(!k.hasOwnProperty(n.id)){var o=c('Vector').getElementPosition(n.parentNode);c('DOMScroll').scrollTo(new (c('Vector'))(c('Vector').getScrollPosition().x,o.y-c('TimelineConstants').SCROLL_TO_OFFSET,'document'));k[n.id]=true;}},loadTwoColumnUnits:function(n,o,p){var q=c('$')(n);c('queryThenMutateDOM')(function(){var r=c('Parent').byClass(q,'fbTimelineSection');if(r&&!o){var s=c('DOMQuery').find(q,"._2t4u"),t=c('DOMQuery').find(q,"._2t4v"),u=t.offsetHeight-s.offsetHeight;c('DataStore').set(c('TimelineConstants').DS_COLUMN_HEIGHT_DIFFERENTIAL,p,u);}},l.bind(null,q));}};}();f.exports=i;},null);
__d('TimelineSection',['Arbiter','CSS','DOM','Parent','ScrollingPager','TimelineConstants','TimelineLegacySections','TimelineScrubberKey','UIPagelet'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();function h(i,j,k,l,m){'use strict';this.$TimelineSection1=i;this.$TimelineSection2=l;this.$TimelineSection3=j;this.$TimelineSection4=null;this.$TimelineSection5=null;this.$TimelineSection6=true;this.$TimelineSection7=true;this.$TimelineSection8=j!==c('TimelineScrubberKey').RECENT_ACTIVITY;this.$TimelineSection9=m;this.$TimelineSection10=k;this.$TimelineSection11={};this.$TimelineSection12=false;this.$TimelineSection13=[];this.$TimelineSection14=false;}h.prototype.load=function(i,j){'use strict';if(this.$TimelineSection2){this.activateContentScrollLoad();return;}var k=this.$TimelineSection10;c('Arbiter').inform(c('TimelineConstants').SECTION_LOADING,{data:k,scrubberKey:this.$TimelineSection3});this.$TimelineSection2=true;c('CSS').removeClass(this.$TimelineSection1,'fbTimelineTimePeriodUnexpanded');c('CSS').removeClass(this.$TimelineSection1,'fbTimelineTimePeriodSuppressed');var l=c('TimelineLegacySections').shouldForceNoFriendActivity();k=babelHelpers['extends']({},k,{highlight_unit_data:i,parent_key:this.$TimelineSection4,force_no_friend_activity:l});c('CSS').addClass(this.$TimelineSection1,'fbTimelineSectionLoading');this.$TimelineSection6=false;this.activateContentScrollLoad();if(j){this.$TimelineSection1.style.minHeight=window.innerHeight+'px';c('Arbiter').subscribeOnce(c('TimelineConstants').SECTION_FULLY_LOADED,function(m,n){if(n.scrubberKey===this.$TimelineSection3){this.$TimelineSection1.style.minHeight='';c('TimelineLegacySections').destroyOnVisible(this.$TimelineSection3);}}.bind(this));}c('TimelineLegacySections').addLoadPagelet(this.$TimelineSection3,c('UIPagelet').loadFromEndpoint('ProfileTimelineSectionPagelet',this.$TimelineSection1.id,k,{usePipe:true,jsNonblock:true,constHeight:true,append:false}));c('TimelineLegacySections').collapsePlaceHolderHeaders();};h.prototype.preload=function(){'use strict';c('CSS').addClass(this.$TimelineSection1,'fbTimelineTimePeriodSuppressed');c('CSS').removeClass(this.$TimelineSection1,'fbTimelineTimePeriodUnexpanded');var i=c('DOM').find(this.$TimelineSection1,'span.sectionLabel');if(i.getAttribute('data-original-label')){c('DOM').setContent(i,i.getAttribute('data-original-label'));i.removeAttribute('data-original-label');}};h.prototype.unload=function(){'use strict';if(!this.$TimelineSection2||!this.$TimelineSection8)return;this.$TimelineSection2=false;c('TimelineLegacySections').cancelLoadPagelet(this.$TimelineSection3);c('CSS').addClass(this.$TimelineSection1,'fbTimelineTimePeriodUnexpanded');c('CSS').removeClass(this.$TimelineSection1,'fbTimelineTimePeriodSuppressed');if(this.$TimelineSection1.nextSibling&&c('CSS').hasClass(this.$TimelineSection1.nextSibling,'fbTimelineSection')){c('DOM').setContent(this.$TimelineSection1,this.$TimelineSection1.nextSibling);c('CSS').show(this.$TimelineSection1.firstChild);}else c('DOM').empty(this.$TimelineSection1);this.deactivateScrollLoad();};h.prototype.canScrollLoad=function(){'use strict';return this.$TimelineSection6;};h.prototype.activateScrollLoad=function(){'use strict';this.$TimelineSection6=true;c('CSS').removeClass(this.$TimelineSection1,'fbTimelineTimePeriodSuppressed');c('CSS').addClass(this.$TimelineSection1,'fbTimelineTimePeriodUnexpanded');var i=c('TimelineLegacySections').getOnVisible(this.$TimelineSection3);if(i)i.reset();return this;};h.prototype.deactivateScrollLoad=function(){'use strict';if(!this.$TimelineSection2){this.$TimelineSection6=false;c('CSS').removeClass(this.$TimelineSection1,'fbTimelineTimePeriodUnexpanded');c('CSS').addClass(this.$TimelineSection1,'fbTimelineTimePeriodSuppressed');var i=c('TimelineLegacySections').getOnVisible(this.$TimelineSection3);if(i)i.remove();}c('DOM').scry(this.$TimelineSection1,'.fbTimelineSectionExpandPager').forEach(function(j){var k=c('ScrollingPager').getInstance(j.id);k&&k.removeOnVisible();var l=c('Parent').byClass(j,'stat_elem');if(l)c('CSS').removeClass(l,'async_saving');});return this;};h.prototype.canContentScrollLoad=function(){'use strict';return this.$TimelineSection7;};h.prototype.activateContentScrollLoad=function(){'use strict';this.$TimelineSection7=true;return this;};h.prototype.deactivateContentScrollLoad=function(){'use strict';this.$TimelineSection7=false;return this;};h.prototype.getNode=function(){'use strict';return this.$TimelineSection1;};h.prototype.getScrubberKey=function(){'use strict';return this.$TimelineSection3;};h.prototype.getParentKey=function(){'use strict';return this.$TimelineSection4;};h.prototype.setParentKey=function(i){'use strict';this.$TimelineSection4=i;return this;};h.prototype.addSubSection=function(i,j){'use strict';if(!Array.isArray(this.$TimelineSection5))this.$TimelineSection5=[];if(Array.isArray(this.$TimelineSection5))this.$TimelineSection5[i]=j;return this;};h.prototype.getSubSections=function(){'use strict';return this.$TimelineSection5;};h.prototype.isLoaded=function(){'use strict';return this.$TimelineSection2;};h.prototype.isRightColumnFinished=function(){'use strict';return this.$TimelineSection12;};h.prototype.setRightColumnFinished=function(){'use strict';this.$TimelineSection12=true;return this;};h.prototype.getHistoricUnitCount=function(){'use strict';return this.$TimelineSection9;};h.prototype.expand=function(i){'use strict';if(!this.$TimelineSection2)return this;var j=c('DOM').find(this.$TimelineSection1,'.fbTimelineSectionExpander');c('CSS').addClass(j.firstChild,'async_saving');i&&c('CSS').addClass(i,'async_saving');c('Arbiter').inform(c('TimelineConstants').SECTION_EXPAND,this.$TimelineSection3);c('DOM').scry(this.$TimelineSection1,'.fbTimelineCapsule').forEach(c('DOM').remove);this.$TimelineSection11.new_expand=true;c('TimelineLegacySections').cancelLoadPagelet(this.$TimelineSection3);c('TimelineLegacySections').addLoadPagelet(this.$TimelineSection3,c('UIPagelet').loadFromEndpoint('ProfileTimelineSectionPagelet',j.id,this.$TimelineSection11,{usePipe:true,jsNonblock:true,constHeight:true}));return this;};h.prototype.isPermalinkPeriod=function(){'use strict';return !!this.$TimelineSection10.is_permalink_period;};h.prototype.isHidden=function(){'use strict';return this.$TimelineSection14;};h.prototype.hide=function(){'use strict';this.$TimelineSection14=true;c('CSS').hide(c('DOM').find(this.$TimelineSection1,'.fbTimelineSection'));return this;};h.prototype.isHiddenFromView=function(){'use strict';return (!this.$TimelineSection2||this.$TimelineSection14||c('CSS').hasClass(this.$TimelineSection1,'fbTimelineTimePeriodUnexpanded'));};h.prototype.hasPendingCallbacks=function(){'use strict';return this.$TimelineSection13.length>0;};h.prototype.queueDisplayCallback=function(i,j){'use strict';this.$TimelineSection13[i]=j;return this;};h.prototype.runPendingDisplayCallbacks=function(){'use strict';while(this.hasPendingCallbacks()){var i=this.$TimelineSection13.shift();if(i)i();}return this;};f.exports=h;},null);
__d('TimelineContentLoader',['csx','$','Arbiter','CSS','DOM','DOMScroll','Event','OnVisible','Parent','ScrollingPager','TimelineComponentKeys','TimelineConstants','TimelineController','TimelineDOMID','TimelineLegacySections','TimelineScrubberKey','TimelineSection','TimelineSmartInsert','Vector','arrayContains','debounce','ge','queryThenMutateDOM','setImmediate'],function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();var i=false,j=null,k={},l={},m=[],n={},o=null,p=null,q=80,r=250,s=500;function t(){if(i)return;c('TimelineController').register(c('TimelineComponentKeys').CONTENT,z);p=c('Arbiter').subscribe(c('TimelineConstants').SECTION_EXPAND,function(aa,ba){z.navigateToSection(ba);});i=true;}var u=c('debounce')(function(aa,ba,ca){var da=c('TimelineLegacySections').get(aa).getHistoricUnitCount();ba-=da;ca-=1;if(da==-1||ca<=0||ba<0)return;var ea=z.getNextSectionKey(aa);if(ea){c('TimelineLegacySections').get(ea).load();u(ea,ba,ca);}},s);function v(aa,ba){if(!ba)ba=0;if(ba<q&&!aa())setTimeout(v.bind(null,aa,ba+1),r);}function w(aa){v(function(){if(aa===c('TimelineScrubberKey').WAY_BACK)return true;var ba=z.getNextSectionKey(aa);if(ba){y(ba);return true;}return false;});}function x(aa,ba,ca){v(function(){if(ba===c('TimelineScrubberKey').WAY_BACK)return true;var da=z.getNextSectionKey(ba);if(da){c('TimelineLegacySections').addOnVisible(da,new (c('OnVisible'))(aa,y.bind(null,da),false,ca||1000));return true;}return false;});}function y(aa){var ba=c('TimelineLegacySections').get(aa);if(ba&&ba.canScrollLoad()){ba.load();if(o)u(aa,o.required_units,o.max_parallelism);}}var z={CURRENT_SECTION_OFFSET:150,registerTimePeriod:function(aa,ba,ca,da,ea,fa,ga){t();if(c('arrayContains')(m,ba))return;if(l)Object.assign(ca||{},l);var ha=new (c('TimelineSection'))(aa,ba,ca,da,ga);if(!ea){c('TimelineLegacySections').setMainSectionOrder(ba,fa);k[ba]=true;}else{ha.setParentKey(ea);var ia=c('TimelineLegacySections').get(ea);if(ia)ia.addSubSection(fa,ha);}c('TimelineLegacySections').set(ba,ha);z.checkCurrentSectionChange();c('Arbiter').inform(c('TimelineConstants').SECTION_REGISTERED,{scrubberKey:ba,section:ha});},reset:function(){c('TimelineLegacySections').removeAllOnVisibles();c('TimelineLegacySections').cancelLoadPagelets();for(var aa in n){n[aa].unsubscribe();delete n[aa];}p&&p.unsubscribe();p=null;c('TimelineLegacySections').removeAll();j=null;k={};l={};m=[];i=false;},checkCurrentSectionChange:function(){var aa=null;c('queryThenMutateDOM')(function(){aa=z.getCurrentSection();},function(){var ba=j&&j.getScrubberKey();if(aa&&aa.getScrubberKey()!==ba&&!aa.isPermalinkPeriod()){j=aa;var ca=aa.getScrubberKey(),da=aa.getParentKey();if(!da){da=ca;ca=null;}c('TimelineController').sectionHasChanged(da,ca);}});},setParallelLoadConfig:function(aa){o=aa;},getCurrentSection:function(){var aa={},ba=c('TimelineLegacySections').getAll();for(var ca in ba){var da=ba[ca];if(!da||da.isHiddenFromView())continue;var ea=c('Vector').getElementPosition(da.getNode(),'viewport').y;if(da.getScrubberKey()===c('TimelineScrubberKey').RECENT_ACTIVITY)ea--;if(ea<z.CURRENT_SECTION_OFFSET)aa[ea]=da;}var fa=Math.max.apply(null,Object.keys(aa)),ga=c('TimelineLegacySections').getMainSectionOrder(),ha=fa==-Infinity;if(!ha){return aa[fa];}else if(ga[0])return c('TimelineLegacySections').get(ga[0]);return null;},getLastVisibleSection:function(){var aa=c('TimelineLegacySections').getMainSectionOrder();for(var ba=aa.length-1;ba>=0;ba--){var ca=c('TimelineLegacySections').get(aa[ba]);if(ca&&!ca.isHiddenFromView())return ca;}return null;},getRecentActivitySection:function(){return c('TimelineLegacySections').get(c('TimelineScrubberKey').RECENT_ACTIVITY);},capsuleForCurrentSection:function(){var aa=z.getCurrentSection();return aa&&c('DOM').scry(aa.getNode(),'.fbTimelineCapsule')[0];},enableScrollLoad:function(aa,ba,ca,da){aa=c('$')(aa);var ea=c('Parent').byClass(aa,'fbTimelineSection')||aa.parentNode,fa=ea&&c('DOM').scry(ea,'.fbTimelineCapsule')[0];if(!fa)return;if(ca===null){x(aa,ba,da);}else c('TimelineController').runOnceWhenSectionFullyLoaded(x.bind(null,aa,ba,da),ba,ca);},getNextSectionKey:function(aa){var ba=c('TimelineLegacySections').getMainSectionOrder();for(var ca=0;ca<ba.length-1;ca++)if(ba[ca]==aa){while(ca<ba.length-1&&!ba[ca+1])ca++;return ba[ca+1];}var da=c('TimelineLegacySections').get(aa);if(!da||!da.getParentKey())return;var ea=c('TimelineLegacySections').get(da.getParentKey());if(!ea)return;var fa=ea.getSubSections(),ga=fa[fa.length-1];if(da.getScrubberKey()===ga.getScrubberKey())return z.getNextSectionKey(da.getParentKey());for(var ha=0;ha<fa.length-1;ha++)if(fa[ha].getScrubberKey()==aa)return fa[ha+1].getScrubberKey();},hideSection:function(aa){var ba=c('TimelineLegacySections').get(aa);if(ba)ba.hide();var ca=c('TimelineController').getCurrentScrubber();if(ca){var da=null;if(!k[aa]){da=c('TimelineController').getCurrentScrubber().getSubnav(ba.getParentKey(),aa);}else da=c('TimelineController').getCurrentScrubber().getNav(aa);da&&c('CSS').hide(da);}var ea=c('TimelineController').getCurrentStickyHeaderNav();ea&&ea.removeTimePeriod(aa);},loadSectionOnClick:function(aa,ba){c('Event').listen(aa,'click',function(ca){ca.prevent();c('TimelineLegacySections').get(ba).load();});},removeSection:function(aa){c('TimelineLegacySections').removeOnVisible(aa);c('TimelineLegacySections').remove(aa);delete k[aa];var ba=c('TimelineController').getCurrentStickyHeaderNav();ba&&ba.removeTimePeriod(aa);m.push(aa);},navigateToSection:function(aa,ba,ca){ba=!!ba;var da=aa,ea=c('TimelineLegacySections').get(aa);if(!ea)return;if(!ea.isLoaded()){c('TimelineSmartInsert').enable();c('DOM').scry(c('$')(c('TimelineDOMID').TAB_CONTENT),'.fbTimelineShowOlderSections').forEach(c('DOM').remove);}if(!k[aa]){if(!ea.isLoaded())ea.getNode().style.minHeight=c('Vector').getViewportDimensions().y+'px';var fa=c('Arbiter').subscribe(c('TimelineConstants').SECTION_FULLY_LOADED,function(pa,qa){if(qa.scrubberKey===aa){ea.getNode().style.minHeight='';fa.unsubscribe();}});da=ea.getParentKey();var ga=c('TimelineLegacySections').get(da);if(ga){var ha=ga.getNode();if(!c('CSS').hasClass(ha,'fbTimelineSectionExpanded')){c('DOMScroll').scrollTo(ha,0);c('CSS').addClass(ha,'fbTimelineSectionExpanded');c('DOM').scry(ha,'.fbTimelineCapsule').forEach(c('DOM').remove);c('DOM').scry(ha,'div.fbTimelineSectionExpandPager').forEach(c('DOM').remove);c('DOM').scry(ha,'div.fbTimelineContentHeader').forEach(c('DOM').remove);c('DOM').scry(ha,"._5vf").forEach(function(pa){if(!pa.getAttribute('data-subsection'))c('DOM').remove(pa);});}}var ia=z.getNextSectionKey(da),ja=c('TimelineLegacySections').getOnVisible(ia);if(ja)ja.setBuffer(0);}var ka=c('TimelineLegacySections').getMainSectionOrder();for(var la=0;la<ka.length;la++){var ma=ka[la];if(!ma)continue;if(ma==da)break;c('TimelineLegacySections').get(ma).deactivateScrollLoad().deactivateContentScrollLoad();}ea.load(ca,true);c('TimelineLegacySections').collapsePlaceHolderHeaders();var na=c('Vector').getScrollPosition().x,oa=c('Vector').getElementPosition(ea.getNode()).y;if(!ba)c('DOMScroll').scrollTo(new (c('Vector'))(na,oa-c('TimelineConstants').SCROLL_TO_OFFSET,'document'),true,false,false,0,function(){var pa=c('Vector').getElementPosition(ea.getNode()).y;c('DOMScroll').scrollTo(new (c('Vector'))(na,pa-c('TimelineConstants').SCROLL_TO_OFFSET,'document'),false);if(aa!==c('TimelineScrubberKey').RECENT_ACTIVITY){var qa=c('DOM').scry(ea.getNode(),'h3.uiHeaderTitle')[0];if(qa){qa.tabIndex=0;qa.focus();}}});},appendContentAfterLoad:function(aa,ba,ca){c('TimelineController').runOnceWhenSectionFullyLoaded(c('DOM').appendContent.bind(null,c('$')(aa),ba),ca,'0');},markSectionAsLoaded:function(aa,ba,ca){c('TimelineController').runOnceWhenSectionFullyLoaded(function(){c('ge')(aa)&&c('CSS').removeClass(c('$')(aa).parentNode,'fbTimelineSectionLoading');},ba,ca);},scrollToTimeline:function(aa,ba){c('TimelineController').runOnceWhenSectionFullyLoaded(function(){var ca=c('$')('fbTimelineHeadline');c('setImmediate')(function(){c('DOMScroll').scrollTo(ca);});},aa,ba);},suppressSectionsAbove:function(aa){var ba,ca,da=c('TimelineLegacySections').getMainSectionOrder();for(var ea=0;ea<da.length;ea++){var fa=da[ea];if(!fa)continue;ba=c('TimelineLegacySections').get(fa).getNode();ca=null;if(Array.from(aa.parentNode.children).indexOf(aa)<=Array.from(ba.parentNode.children).indexOf(ba)){ca=fa;break;}c('TimelineLegacySections').get(fa).deactivateScrollLoad();}if(ca)z.navigateToSection(ca,true);},forceNoFriendActivity:function(){c('TimelineLegacySections').forceNoFriendActivity();},removeDupes:function(aa){var ba=c('ge')(aa);if(!ba)return;var ca=c('DOM').scry(ba,'li.fbTimelineUnit'),da={};for(var ea=0;ea<ca.length;ea++){var fa=ca[ea];if(fa.id&&fa.id.startsWith('tl_unit_')){var ga=fa.id.substring(8,fa.id.length),ha=c('DOM').scry(fa,'div.timelineUnitContainer');if(ha.length>0)ga=ga+ha[0].getAttribute('data-time');if(da.hasOwnProperty(ga)){fa.id='dupe_unit_'+Math.random();fa.className="hidden_elem";}else da[ga]=1;}}},removeLoadingState:function(aa){c('ge')(aa)&&c('CSS').removeClass(c('$')(aa),'fbTimelineSectionLoading');},updatePagerAfterLoad:function(aa,ba,ca,da,ea){var fa=c('ScrollingPager').getInstance(aa.firstChild.id);if(!fa){n[aa.firstChild.id]=c('Arbiter').subscribe(c('ScrollingPager').REGISTERED,function(ha,ia){n[aa.firstChild.id].unsubscribe();delete n[aa.firstChild.id];if(ia.id===aa.firstChild.id)z.updatePagerAfterLoad(aa,ba,ca,da,ea);});return;}var ga=fa.getHandler();fa.setHandler(function(ha){c('CSS').addClass(aa,'async_saving');ga(ha);});c('TimelineController').runOnceWhenSectionFullyLoaded(function(){c('CSS').removeClass(aa,'fbTimelineHiddenPager');fa.checkBuffer();},ca,da);if(ea)c('TimelineController').runOnceWhenSectionFullyLoaded(c('TimelineController').adjustScrollingPagerBuffer.bind(null,aa.firstChild.id,ca),ca,da);},repositionDialog:function(aa){c('Arbiter').subscribe(c('TimelineConstants').SECTION_LOADED,function(){aa.updatePosition();});},rightColumnFinished:function(aa){var ba=c('TimelineLegacySections').get(aa);ba.setRightColumnFinished();},loadNextSection:function(aa){w(aa);}};f.exports=z;},null);
__d('TimelineLogging',['TimelineComponentKeys','TimelineController','reportData'],function a(b,c,d,e,f,g){if(c.__markCompiled)c.__markCompiled();var h=false,i=0,j=null,k=null,l={init:function(m){if(h)return;i=m;c('TimelineController').register(c('TimelineComponentKeys').LOGGING,this);},reset:function(){h=false;i=0;j=null;},log:function(m,n){n.profile_id=i;c('reportData')(m,{gt:n});},logSectionChange:function(m,n){var o={timeline_section_change:1,key:m};if(j&&m==j){o.timeline_scrubber=1;j=null;}if(k&&m==k){o.sticky_header_nav=1;k=null;}l.log('timeline',o);},logScrubberClick:function(m){j=m;},logStickyHeaderNavClick:function(m){k=m;}};f.exports=l;},null);
__d('TimelineStickyColumn',['csx','Arbiter','CSS','DOMQuery','Event','Run','Style','TimelineComponentKeys','TimelineConstants','TimelineContentLoader','TimelineController','Vector','ViewportBounds','queryThenMutateDOM','requireWeak'],function a(b,c,d,e,f,g,h){if(c.__markCompiled)c.__markCompiled();var i=100,j=15,k=35,l=10,m="._2t4u",n="._5nb8",o="._2t4v",p=false,q={},r=null,s=null,t=null,u=null,v,w,x,y=0,z=0,aa=0,ba=0,ca=0,da=0,ea=0,fa;function ga(){var za;c('requireWeak')('ModalLayer',function(ab){return za=ab;});if(za)return !!za.getTopmostModalLayer();return false;}function ha(){v=c('TimelineContentLoader').getCurrentSection();w=c('TimelineContentLoader').getRecentActivitySection();if(!v||!v.isRightColumnFinished())return;var za,ab;if(q.hasDecoupledColumns){za=ta(w);ab=ra(w);}else{ab=ra(v);za=sa(v);}y=za?za.offsetHeight:0;z=ab?ab.offsetHeight:0;aa=c('Vector').getViewportDimensions().y;ea=za?c('Vector').getElementPosition(za).y:0;x=c('TimelineContentLoader').getLastVisibleSection();ba=v.getNode().offsetHeight;fa=document.body.clientWidth<document.body.scrollWidth;}function ia(){if(ga())return false;if(!q.hasDecoupledColumns&&v)return v.isRightColumnFinished();if(w&&v===w&&ca>=da)return w.isRightColumnFinished();return true;}function ja(){if(!v)return;if(!q.hasDecoupledColumns&&u&&u!==v){var za=ra(u);if(za)ua(za,'','','');}da=ca;ca=c('Vector').getScrollPosition().y;var ab;if(q.hasDecoupledColumns){ab=ra(w);}else ab=ra(v);if(!ab)return;if(fa){ua(ab,'','','');return;}if(ia()){ka(ab);u=na(ab)==='fixed'?v:null;}}function ka(za){if(na(za)==='static'&&(z>=y||y<=aa))return;var ab=ea-va();if(ca<=ab){ua(za,'','','');return;}var bb=j+k,cb=ca+aa-bb,db=ca+z+va(),eb=ea+ba;if(v===x)eb+=k;if(!q.hasDecoupledColumns&&eb<=Math.min(db,cb)){ua(za,'absolute','',j+'px');return;}var fb=aa-j-va();if(z<=fb){ua(za,'fixed',va()+'px','');return;}if(ca<da){la(za);}else ma(za);}function la(za){var ab=false;if(na(za)==='absolute'){var bb=ea+y-va(),cb=ca+va()-ea;if(!!pa(za)&&cb<=pa(za)){ab=true;}else if(za.style.bottom!==''&&ca<=bb-z)ab=true;}if(ab){ua(za,'fixed',va()+'px','');return;}if(na(za)==='absolute'&&!!pa(za))return;if(oa(za)){if(pa(za)>=va())return;var db=aa-k,eb=ca-ea-(z-db);if(!q.hasDecoupledColumns&&v===w)eb+=i;if(da)eb+=da-ca;ua(za,'absolute',eb+'px','');return;}}function ma(za){var ab,bb,cb=false;if(!oa(za)){ab=pa(za);bb=qa(za);if(ab>0||bb===0){var db=ca+aa+k-va(),eb=ea+ab+z-k;if(db>=eb)cb=true;}}if(!cb)if(ca===da||!oa(za))return;if(cb){ab=aa-z-j-k;ua(za,'fixed',ab+'px','');return;}if(oa(za)&&pa(za)>=va()){ab=ca-ea+va();if(da)ab+=da-ca;ua(za,'absolute',ab+'px','');}}function na(za){switch(za.style.position){case 'absolute':case 'static':return za.style.position;default:return c('CSS').hasClass(za,'fixed_always')?'fixed':'static';}}function oa(za){switch(na(za)){case 'absolute':case 'static':return false;default:return true;}}function pa(za){return za.style.top?parseInt(za.style.top,10):0;}function qa(za){return za.style.bottom?parseInt(za.style.bottom,10):0;}function ra(za){if(za)return c('DOMQuery').scry(za.getNode(),o)[0];return null;}function sa(za){if(za)return c('DOMQuery').scry(za.getNode(),m)[0];return null;}function ta(za){if(za)return c('DOMQuery').scry(za.getNode(),n)[0];return null;}function ua(za,ab,bb,cb){c('Style').set(za,'bottom',cb);if(ab==='fixed'){c('CSS').addClass(za,'fixed_always');c('Style').set(za,'position','');}else{c('CSS').removeClass(za,'fixed_always');c('Style').set(za,'position',ab);}c('Style').set(za,'top',bb);c('Arbiter').inform('reflow');}function va(){return c('ViewportBounds').getTop()+l;}function wa(){c('queryThenMutateDOM')(ha,ja);}function xa(){p=false;u=null;while(r&&r.length)r.pop().remove();r=null;if(s)s.unsubscribe();if(t)t.unsubscribe();}var ya={init:function(za){if(!p){p=true;q=za;r=[c('Event').listen(window,'scroll',wa),c('Event').listen(window,'resize',wa)];s=c('Arbiter').subscribe(c('TimelineConstants').SECTION_FULLY_LOADED,wa);t=c('Arbiter').subscribe(c('TimelineConstants').UNIT_SEGMENT_LOADED,wa);c('Run').onLeave(xa);c('TimelineController').register(c('TimelineComponentKeys').STICKY_COLUMN,this);}},adjust:function(){if(p){ha();ja();}}};f.exports=ya;},null);
__d('TimelineViewportTracking',['csx','Arbiter','Banzai','DOM','TimelineSeenStateConstants','TimelineViewportTrackingLogType','ViewportTracking','$','tidyEvent'],function a(b,c,d,e,f,g,h){var i,j;if(c.__markCompiled)c.__markCompiled();var k;i=babelHelpers.inherits(l,c('ViewportTracking'));j=i&&i.prototype;l.prototype.getAllStories=function(){'use strict';var m=c('DOM').scry(this.getStream(),"._5pat"),n=[];for(var o=0;o<m.length;o++)if(this.getStoryID(m[o]))n.push(m[o]);return n;};l.prototype.getStream=function(){'use strict';if(!this.$TimelineViewportTracking1)this.$TimelineViewportTracking1=c('$')('timeline_tab_content');return this.$TimelineViewportTracking1;};l.prototype.getStoryID=function(m){'use strict';var n=JSON.parse(m.getAttribute('data-ft'));if(n){var o=c('TimelineSeenStateConstants').FT_TIMELINE_HASH_IDENTIFIER_KEY;return n[o];}return null;};l.prototype.getDataToLog=function(m){'use strict';var n=JSON.parse(m.getAttribute('data-ft'));return {ft:n,log_type:c('TimelineViewportTrackingLogType').IMPRESSION};};l.prototype.getTimetrackingDataToLog=function(m){'use strict';var n=j.getTimetrackingDataToLog.call(this,m);n.log_type=c('TimelineViewportTrackingLogType').DURATION;return n;};l.prototype.sendDataToLog=function(m,n,o,p){'use strict';if(!n.ft)return;var q={};if(p)q.retry=p;if(o)q.delay=2000;c('Banzai').post('timeline_feed_tracking',n,q);};l.prototype.getDataFromConfig=function(m){'use strict';this.timeout=m.record_delay;this.isSeenStateLoggingEnabled=m.is_seen_state_logging_enabled;this.isTimetrackingEnabled=m.is_timetracking_enabled;this.vpvdDebug=!!m.vpvd_debug;c('tidyEvent')(c('Arbiter').subscribe(['TimelineConstants/unitSegmentLoaded'],function(){this.invalidateAllStoriesCache();this.invalidateVisibleStoriesCache();}.bind(this)));};l.prototype.getTimeout=function(){'use strict';return this.timeout;};l.prototype.cleanup=function(){'use strict';k=null;j.cleanup.call(this);};function l(){'use strict';i.apply(this,arguments);}f.exports={getInstance:function(){return k;},init:function(m){if(k)return;k=new l();k.init(m);}};},null);