/*1358177009,178142527*/

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

/** js/composer/Composer.js */
__d("Composer",["Event","function-extensions","Arbiter","ArbiterMixin","Button","CSS","DOM","Env","FileForm","Focus","HTML","Input","PageTransitions","Parent","Run","ServerJS","TextAreaControl","URI","URLScraper","$","copyProperties","ge","tx"],function(a,b,c,d,e,f){






var g=b('Event');
b('function-extensions');

var h=b('Arbiter'),
i=b('ArbiterMixin'),
j=b('Button'),
k=b('CSS'),
l=b('DOM'),
m=b('Env'),
n=b('FileForm'),
o=b('Focus'),
p=b('HTML'),
q=b('Input'),
r=b('PageTransitions'),
s=b('Parent'),
t=b('Run'),
u=b('ServerJS'),
v=b('TextAreaControl'),
w=b('URI'),
x=b('URLScraper'),

y=b('$'),
z=b('copyProperties'),
aa=b('ge'),
ba=b('tx'),

ca=1,

da=4,

ea={},

fa=function(){
var ja=l.scry(this.root,'span.linkAttachment')[0];
if(!ja&&this.isMetaComposer)
ja=l.scry(this.root,'span.attachmentAcceptsLink')[0];

if(!ja)
return;


var ka=s.byTag(ja,'form');
this.scraper=new x(this.input);
this.scraper.subscribe('match',function(la,ma){
if(this.isMetaComposer){
var na=this.form.xhpc_targetid,
oa=new w('/ajax/metacomposer/attachment/link/scraper.php');
oa.addQueryData
({scrape_url:encodeURIComponent(ma.url),
alt_scrape_url:encodeURIComponent(ma.alt_url),
targetid:na.value});

ka.action=oa.toString();}else{

k.show(ja);
ka.action='/ajax/composer/attachment/link/scraper.php?scrape_url='+
encodeURIComponent(ma.url);}

ka.xhpc.value=ja.id;





ka.xhpc.disabled=false;
ka.xhpc.click();}.
bind(this));

this.isMetaComposer&&this.scraper.check();},


ga=function(ja){
if(this.inform('submit')===false){
ja.kill();
return false;}

if(this.submitHandler)
return (new Function(this.submitHandler)).apply(this.form);};





function ha
(ja,
ka,
la,
ma,
na){

ea[ja.id]=this;

this.root=ja;
this.resetCfg=ka;
this.dataSource=ma;
this.lazyEndpoint=this.resetCfg&&this.resetCfg.lazyEndpoint;

this.focus=l.find(ja,'div.focus_target');
this.form=l.find(ja,'form.attachmentForm');
this.content=l.find(ja,'div.attachmentContent');

this.isMetaComposer=la;
if(this.isMetaComposer){
this.messageBox=l.find(ja,'div.uiMetaComposerMessageBox');
this.metaArea=l.find(ja,'div.attachmentMetaArea');
this.bottomArea=l.find(ja,'div.attachmentBottomArea');
this.barArea=l.find(ja,'div.attachmentBarArea');
this.auxBarArea=l.find(ja,'.attachmentAuxBarArea');
this.blurb=l.find(ja,'div.uiMetaComposerMessageBox div.textBlurb');
this.input=l.find(ja,'div.uiMetaComposerMessageBox textarea.input');
this.button=l.find(ja,'div.uiMetaComposerMessageBox label.submitBtn');
this.privacy=l.find(ja,'div.uiMetaComposerMessageBox li.privacyWidget');
this.boosting=l.scry(ja,'div.uiMetaComposerMessageBox li.boostingWidget');}else{

this.blurb=l.find(ja,'div.uiComposerMessageBox div.textBlurb');
this.input=l.find(ja,'div.uiComposerMessageBox textarea.input');
this.button=l.find(ja,'div.uiComposerMessageBox label.submitBtn');
this.privacy=l.find(ja,'div.uiComposerMessageBox li.privacyWidget');
this.boosting=[];}


g.listen(this.form,'submit',ga.bind(this));
if(this.isMetaComposer){
g.listen(this.input,'focus',this.onFocus.bind(this));


if(na){
if(document.activeElement===this.input)
this.onFocus.bind(this).defer();}else

if(s.byClass(this.input,'child_was_focused'))
this.onFocus.bind(this).defer();}


h.inform('xhpc/construct/'+ja.id,this,h.BEHAVIOR_STATE);}


z(ha.prototype,i,





{init:function(ja){

this.mentionsInput=ja;
if(this.mentionsInput)
this.mentionsInput.subscribe('init',function(){
var ka=this.mentionsInput.getTypeahead().getView();
ka.subscribe(['reset','render'],function(la){
k.conditionClass(this.root,'uiComposerMention',(la=='render'));}.
bind(this));}.
bind(this));


fa.call(this);
this.inform('init',null,h.BEHAVIOR_PERSISTENT);
this.setupListen();

t.onBeforeUnload(this._handleUnsavedChanges.bind(this));},


setupListen:function(){
g.listen
(this.root,
'click',
this.clickHandler.bind(this));},



clickHandler:function(event){
var ja=event.getTarget();
if(s.byClass(ja,'collapsedPostButton'))
this.focusInput.bind(this).defer();},



setBlurb:function(ja){
l.setContent(this.blurb,ja);},


setEnabled:function(ja){
j.setEnabled(this.button,ja);},


getEndpoint:function(){
return this.form.getAttribute('action');},


setEndpoint:function(ja){
this.form.setAttribute('action',ja);},


setLoading:function(ja){
k.conditionClass(this.root,'async_saving',!!ja);},


setContentVisible:function(ja){
k.conditionClass(this.root,'uiComposerHideContent',!ja);},


setMessageBoxVisible:function(ja){
k.conditionClass(this.root,'uiComposerHideMessageBox',!ja);},


setInputVisible:function(ja){
k.conditionClass(this.root,'uiComposerHideInput',!ja);},


setStatusBoxVisible:function(ja){
k.conditionClass(this.root,'uiComposerHideStatusBox',!ja);},


setTopicTaggerVisible:function(ja){
k.conditionClass(this.root,'uiTagComposerHidden',!ja);},


mutate:function(ja){

if(this.lastComposerInput)
q.setValue(this.input,q.getValue(aa(this.lastComposerInput)));


var ka=aa(ja.xhpc);
if(ka){
var la=l.scry
(this.root,
'.uiComposerAttachmentSelected')[0];


if(ja.confirmAugmentation&&la!==ka)
return;

la&&k.removeClass(la,'uiComposerAttachmentSelected');
k.addClass(ka,'uiComposerAttachmentSelected');

if(!ja.disableCache)
g.listen(ka,'click',function(na){
na.stop();
ja.disableCache=true;
this.mutate(ja);}.
bind(this));}




if(!ja.keepContentAreas){
this.setContentVisible(false);
l.empty(this.content);
if(this.isMetaComposer){
this.mentionsInput&&this.mentionsInput.setAuxContent(null);
l.empty(this.metaArea);
l.empty(this.bottomArea);
l.empty(this.barArea);
l.empty(this.auxBarArea);}}


if(ja.content){
l.setContent(this.content,p(ja.content));
this.setContentVisible(true);}

if(this.isMetaComposer){
ja.metaContent&&
l.setContent(this.metaArea,p(ja.metaContent));
ja.bottomContent&&
l.setContent(this.bottomArea,p(ja.bottomContent));
ja.barContent&&
l.setContent(this.barArea,p(ja.barContent));
ja.auxBarContent&&
l.setContent(this.auxBarArea,p(ja.auxBarContent));}



this.setMessageBoxVisible(!ja.messageBoxHidden);


k.conditionClass
(this.root,
'uiComposerWhiteMessageBox',
!ja.messageBoxHidden&&!ja.inputHidden&&!ja.content);



this.setInputVisible(!ja.inputHidden);

this.setStatusBoxVisible(!ja.statusBoxHidden);


k.conditionShow(this.privacy,!ja.privacyWidgetHidden);


if(this.boosting.length>0)
k.conditionShow(this.boosting[0],!ja.boostingWidgetHidden);


if(!ja.keepContentAreas){

q.setPlaceholder(this.input,ja.placeholder);


j.setLabel(this.button,ja.buttonLabel);}



this.setBlurb(p(ja.blurb));


if(ja.autoscrape){
this.scraper&&this.scraper.enable();}else 

this.scraper&&this.scraper.disable();



this.setEnabled(!ja.disabled);


this.setTopicTaggerVisible(!ja.hideTopicTagger);


this.setEndpoint(ja.endpoint);


if(ja.formType==ca){
this.form.setAttribute('rel','async');}else 

this.form.removeAttribute('rel');


this.form.removeAttribute('target');
if(ja.formType==da){
if(!this._fileForm){
this._fileForm=new n(this.form);
this._fileForm.setAllowCrossOrigin(m.allowCrossOriginComposerUpload);
this._fileForm.subscribe('submit',this.setLoading.bind(this,true));


this._fileForm.subscribe('failure',this.setLoading.bind(this,false));}}else 


if(this._fileForm){
this._fileForm.destroy();
this._fileForm=null;}




this.submitHandler=ja.submitHandler;

this.lazyEndpoint=ja.lazyEndpoint;

k.addClass(this.root,'uiComposerInteracted');
k.addClass(this.root,'uiComposerOpen');



if(ja.messageBoxFocused){

var ma=document.activeElement;
if(ma===document.body||
s.byClass(ma,'attachmentLink'))
this.focusInput.bind(this).defer();}



if(ja.inputElement){

q.setValue(aa(ja.inputElement),q.getValue(this.input));

v.getInstance(aa(ja.inputElement)).update();}else 


v.getInstance(this.input).update();


this.lastComposerInput=ja.inputElement;

h.inform('composer/mutate',this);},





subscribeToMutate:function(ja){
return h.subscribe('composer/mutate',function(ka,la){
if(la===this)
ja();}.

bind(this));},





unsubscribeFromMutate:function(ja){
ja.unsubscribe();},


reset:function(ja){
if(this.isMetaComposer){
l.empty(this.metaArea);
l.empty(this.bottomArea);
l.empty(this.barArea);
l.empty(this.auxBarArea);}

if(this.resetCfg){
this.mutate(this.resetCfg);}else{

var ka=l.scry(this.root,'.uiComposerAttachmentSelected')[0];
if(ka)
k.removeClass(ka,'uiComposerAttachmentSelected');}


if(!ja){
q.reset(this.input);
this.mentionsInput&&this.mentionsInput.reset();
this.scraper&&this.scraper.reset();}

k.removeClass(this.root,'uiComposerInteracted');
k.setClass(this.focus,'focus_target');
this.setLoading(false);

h.inform('composer/reset');},


onFocus:function(){


if(this.lazyEndpoint){
var ja=l.find(this.root,'form.attachmentSelectForm'),
ka=new w(this.lazyEndpoint);
ka.addQueryData({isAugmentation:true});
ja.action=ka.toString();

var la=l.scry(this.root,'.uiComposerAttachmentSelected')[0];
ja.xhpc.value=la&&la.id;
ja.xhpc.click();

k.removeClass.curry(this.root,'async_saving').defer();}

this.inform('focus');},


focusInput:function(){
o.set(this.input);},


getInput:function(){
return this.input;},


updateDataSourceToken:function(ja){
if(this.dataSource)
this.dataSource.updateToken(ja);},



_handleUnsavedChanges:function(){
var ja=r.getNextURI();
if(ja.getQueryData().hasOwnProperty('theater'))
return;



if(this.input.offsetParent!==null&&
!q.isEmpty(this.input)&&
!(a.Dialog&&a.Dialog.getCurrent()))
return "You haven't finished your post yet. Do you want to leave without finishing?";}});




var ia;

z(ha,




{setNodeToConfigure:function(ja){
ia=ja;},


configure:function(ja,ka,la){
var ma=s.byClass(ia,'uiComposer').id,
na=h.subscribe
('xhpc/construct/'+ma,
function(oa,pa){

(function(){
na.unsubscribe();}).
defer();
pa.mutate(ja);
pa.subscribe('init',function(){

new u().handle(ka);
new Function(la)();
if(ja.attachmentJS)
new Function(ja.attachmentJS).call(pa);});});},






publish:function(ja,ka){
ka=ka||{};

ka.composer_id=ja;
ka.composer=ha.getInstance(ja);

if(ka.streamNode){
ka.streamStory=ka.streamNode;}else
if(ka.streamMarkup)
ka.streamStory=p(ka.streamMarkup).getRootNode();


h.inform('composer/publish',ka);
ka.composer&&ka.composer.reset(false);},


finish:function(ja){
ha.getInstance(ja).setLoading(false);},


getInstance:function(ja){
var ka=s.byClass(y(ja),'uiComposer');
return ka?ea[ka.id]:null;}});




e.exports=ha;});

/** js/composer/LegacyComposer.js */
__d("legacy:Composer",["Composer"],function(a,b,c,d){



a.Composer=b('Composer');},

3);

/** js/composerx/components/timeline/ComposerXDatepickerIconReset.js */
__d("ComposerXDatepickerIconReset",["CSS","cx"],function(a,b,c,d,e,f){



var g=b('CSS'),

h=b('cx');

function i(j){
g.removeClass
(j.element,
"_t5");
g.removeClass
(j.element,
"_4m");}


e.exports=i;});

/** js/profile/picture/BrokenProfilePicLogger.js */
__d("BrokenProfilePicLogger",["Run","DOM","JSLogger"],function(a,b,c,d,e,f){




var g=b("Run"),
h=b("DOM"),
i=b("JSLogger"),

j=i.create("entities_profile_pics"),

k=







{checkAndLog:function(l){
g.onAfterLoad
(function(){
var m=h.find(l.parentNode,'img');
if(!m.complete||
(typeof m.naturalWidth!="undefined"&&
m.naturalWidth===0))
j.log('broken_link',{src:m.getAttribute('src')});});}};






e.exports=k;});

/** js/profile/timeline/TimelineAggregatePost.js */










var TimelineAggregatePost=
{init:function(a){
Event.listen(a,'click',function(b){


var c=b.getTarget();
if(b.isDefaultRequested()||
c.tagName==='A'||
Parent.byClass(c,"_1ww"))
return true;


var d=Parent.byTag(c,'li'),
e=DataStore.get(d,'url');
AsyncRequest.bootstrap(e,d);});},



initPage:function(a){
Event.listen(a,'click',function(b){
var c=Parent.byClass(b.getTarget(),'uiCloseButton');
if(c)
return;

var d=Parent.byTag(b.getTarget(),'li');
new AsyncRequest().setURI(DataStore.get(d,'url')).send();});},



poke:function(a){
ScrollableArea.poke(a);},


setScrollHeight:function(a){
var b=DOM.find(a,'.sArea');
Style.set
(b,
'height',
a.offsetHeight+'px');}};

/** js/profile/timeline/modules/TimelineDrag.js */
__d("TimelineDrag",["Event","ArbiterMixin","Locale","Style","Vector","copyProperties"],function(a,b,c,d,e,f){



var g=b('Event'),

h=b('ArbiterMixin'),
i=b('Locale'),
j=b('Style'),
k=b('Vector'),

l=b('copyProperties');
















function m(n,o,p){
p=p||{};
this._listenOn=p.listenOn;
this._offsetInput=o;
this._defaultOffset=p.default_offset;
this._killClicks=p.killClicks;
this._vertical=true;
this._RTLXSwitch=false;
this.setPicture(n,p);}


l(m.prototype,h,

{setPicture:function(n,o){
if(!n)
return false;


o=o||{};
this._picture=n;
this._defaultOffset=o.default_offset;

if(o.vertical!==undefined)
this._vertical=o.vertical;


if(this._vertical){

if(o.height)
this._containerHeight=o.height;

this._offsetType='top';
this._eventCoord='y';}else{


if(o.width)
this._containerWidth=o.width;

this._RTLXSwitch=i.isRTL();
this._offsetType='left';
this._eventCoord='x';}


if(this._picture.complete){
this._initialLoad();}else 

this._loadListener=g.listen(this._picture,'load',function(){
this._loadListener.remove();
this._initialLoad();}.
bind(this));},



destroy:function(){
this._stopDrag();
this._saveOffset();
this._mousedown&&this._mousedown.remove();
this._onclick&&this._onclick.remove();
this._loadListener&&this._loadListener.remove();},


_initialLoad:function(){
var n=this._listenOn?this._listenOn:this._picture;
this._mousedown&&this._mousedown.remove();
this._mousedown=
g.listen(n,'mousedown',this._onMouseDown.bind(this));

if(this._vertical){
this._maxOffset=this._containerHeight-this._picture.offsetHeight;}else 

this._maxOffset=this._containerWidth-this._picture.width;

if(this._defaultOffset!==undefined)
this._setOffset(this._defaultOffset);

this._onclick&&this._onclick.remove();
if(this._killClicks)
this._onclick=g.listen
(n,
'click',
this._onClick.bind(this));


this._saveOffset();},


_onClick:function(event){
event.kill();},


_onMouseDown:function(event){
var n=
parseInt(j.get(this._picture,this._offsetType),10)||0;
this._pictureStartDragOffset=
n-k.getEventPosition(event)[this._eventCoord];

this._startDrag();
event.kill();},


_startDrag:function(){
if(!this._dragStarted){
this.inform('startdrag',this);

this._dragTokens=
[g.listen
(document.documentElement,
'mouseup',
this._onMouseUp.bind(this)),

g.listen
(document.documentElement,
'mousemove',
this._onMouseMove.bind(this))];


this._dragStarted=true;}},



_saveOffset:function(){
var n=parseInt(j.get(this._picture,this._offsetType),10);
if(this._RTLXSwitch){

this._offsetInput.value=
n+this._containerWidth-this._picture.offsetWidth;}else 

this._offsetInput.value=n;},



_stopDrag:function(){
if(this._dragStarted){
this.inform('stopdrag',this);

this._dragStarted=false;
this._dragTokens.forEach(function(n){n.remove();});
this._saveOffset();}},



_onMouseUp:function(event){
this._stopDrag();
event.kill();},


_setOffset:function(n){
if(this._RTLXSwitch){
n=Math.max(0,Math.min(n,-this._maxOffset));}else 

n=Math.min(0,Math.max(n,this._maxOffset));

j.set
(this._picture,
this._offsetType,
n+'px');},



_onMouseMove:function(event){
this._setOffset
(this._pictureStartDragOffset+
k.getEventPosition(event)[this._eventCoord]);

event.kill();}});



e.exports=m;});

/** js/profile/timeline/TimelineCover.js */
__d("TimelineCover",["Button","CSS","DOM","HTML","Parent","DOMScroll","Vector","TimelineController","TimelineDrag","Style","$","copyProperties","ge"],function(a,b,c,d,e,f){




var g=b('Button'),
h=b('CSS'),
i=b('DOM'),
j=b('HTML'),
k=b('Parent'),
l=b('DOMScroll'),
m=b('Vector'),
n=b('TimelineController'),
o=b('TimelineDrag'),
p=b('Style'),

q=b('$'),
r=b('copyProperties'),
s=b('ge');

function t(u,v,w){







this.root=q('fbProfileCover');

this._parentSection=k.byClass(this.root,'fbTimelineSection');
this._coverHeight=v;
this.cover=i.find(this.root,'.cover');
t.instance=this;
this.previewing=w;
this.editing=false;

if(!this._parentSection)
this._parentSection=k.byClass(this.root,'fbEventHeader');


if(w){
this.editMode();
this.updateCoverImage(w);}else
if(this.cover.getAttribute('data-collapse'))
this._expandCover(parseInt(this.cover.getAttribute('data-collapse'),10));


n.register(n.COVER,this);}


t.instance=null;

t.getInstance=function(){
return t.instance;};


r(t.prototype,
{showLoadingIndicator:function(){
var u=s('fbCoverImageContainer');
if(u)
h.addClass(u,'opaquedLoading');},



hideLoadingIndicator:function(){
var u=s('fbCoverImageContainer');
if(u)
h.removeClass(u,'opaquedLoading');},



editMode:function(){
g.setEnabled(i.find(this.root,'label.cancelButton'),true);
g.setEnabled(i.find(this.root,'label.saveButton'),true);
this.hideLoadingIndicator();


this._coverImage=i.scry(this.root,'.coverImage')[0];
var u=i.scry(this._coverImage,'.coverWrap')[0];
if(u)
this._originalOffset=p.get
(i.find(u,'.coverPhotoImg'),
'top');



h.addClass(this._parentSection,'fbEditCover');
l.scrollTo(this.root);

if(this.previewing){
i.remove(this._coverImage);
h.show(this._coverImage);}


var v=i.scry(this._coverImage,'.coverPhotoImg')[0];
if(v)
this._createDragger();

this.editing=true;},


_expandCover:function(u){


u-=1;

this.cover.style.marginTop='0px';
if(u!=m.getScrollPosition().y){
window.scrollBy(0,u);
n.coverHasExpanded(u);}},



_exitEditMode:function(){
if(this._timelineDrag){
this._timelineDrag.destroy();
this._timelineDrag=null;}


i.find(this.root,'input.hiddenPhotoID').value=null;
i.find(this.root,'input.hiddenVideoID').value=null;
g.setEnabled(i.find(this.root,'label.cancelButton'),false);
g.setEnabled(i.find(this.root,'label.saveButton'),false);

h.removeClass(this._parentSection,'fbEditCover');

this.hideLoadingIndicator();
this.previewing=false;},


_createDragger:function(){
this._timelineDrag=new o
(i.find(this.root,'.coverImage .coverPhotoImg'),
i.find(this.root,'input.photoOffsetInput'),

{height:this._coverHeight,
listenOn:this.cover,
vertical:true,
killClicks:true});},






updateCoverImage:function(u,v,w){
this.videoID=w;
if(v)
this.editMode();


i.find(this.root,'input.hiddenPhotoID').value=u;
i.find(this.root,'input.hiddenVideoID').value=w||null;
g.setEnabled(i.find(this.root,'label.saveButton'),true);
if(v)
i.replace(i.find(this.root,'.coverImage'),j(v));


if(this._timelineDrag){
this._timelineDrag.setPicture
(i.find(i.find(this.root,'.coverImage'),'.coverPhotoImg'));}else 


this._createDragger();},



cancelUpdate:function(){

i.remove(i.scry(this.root,'.coverImage')[0]);
i.prependContent(this.cover,this._coverImage);

if(this._originalOffset!==undefined)
p.set
(i.find(this._coverImage,'.coverPhotoImg'),
'top',
this._originalOffset);


this._exitEditMode();},


saveComplete:function(){
this._coverImage=i.scry(this.root,'.coverImage')[0];
this._exitEditMode();},


isInEditMode:function(){
return this.editing;}});



e.exports=t;});

/** js/profile/timeline/TimelineCoverDisclaimer.js */




function TimelineCoverDisclaimer(a,b,c){
if(TimelineCoverDisclaimer.displayed===undefined){
TimelineCoverDisclaimer.displayed=true;}else 

return;


new Dialog().
setModal(true).
setTitle(a).
setBody(b).
setButtonsMessage(c).
setButtons(Dialog.OK).
show();}

/** js/profile/timeline/TimelineCurationControl.js */





requireLazy(['Selector'],function(a){
add_properties('__behaviors',{});
if(__behaviors.TimelineCurationControl)return;
__behaviors.TimelineCurationControl=true;

a.subscribe('open',function(b,c){
var d=c.selector,
e=c.clone||d,
f=Parent.byClass(e,'fbTimelineCurationControl');
if(f){
CSS.addClass(f,'editControlsMenuOpen');
var g=a.subscribe('close',function(h,i){
if(i.selector==d){
a.unsubscribe(g);

CSS.removeClass.curry(f,'editControlsMenuOpen').defer();}});}});});

/** js/profile/timeline/TimelineFriendsNavHovercard.js */
__d("TimelineFriendsNavHovercard",["Event","Hovercard","Keys","Parent"],function(a,b,c,d,e,f){




















var g=b('Event'),

h=b('Hovercard'),
i=b('Keys'),
j=b('Parent'),

k=null,
l=[],
m=-1,
n={};

n[i.UP]={"-1":0,3:0,4:1,5:2};
n[i.RIGHT]={"-1":0,0:1,1:2,2:3,3:4,4:5};
n[i.DOWN]={"-1":0,0:3,1:4,2:5};
n[i.LEFT]={"-1":0,1:0,2:1,3:2,4:3,5:4};

function o(event){
h.processNode(event.getTarget())&&event.stop();}


function p(event){
event.getTarget().tabIndex=-1;
h.hide();}


function q(event){
var s=g.getKeyCode(event);

if(s in n){
if(m in n[s]){
m=n[s][m];
l[m].focus();}


event.prevent();}}



var r=
{init:function(s){


if(!k){
k=j.byTag(s,'a');
if(k)
g.listen(k,
{keydown:q,
focus:function(){
m=-1;}});}





l.push(s);
g.listen(s,
{focus:o,
blur:p,
mouseover:o,
mouseout:function(event){

event.getTarget().tabIndex=-1;}});}};





e.exports=r;});

/** js/profile/timeline/modules/TimelineUnitSelector.js */
__d("TimelineUnitSelector",["DOMQuery"],function(a,b,c,d,e,f){



var g=b('DOMQuery'),

h=



{getUnitsWithTime:function(i){

return g.scry(i,'div.timelineUnitContainer').
filter(function(j){
return (j.parentNode.parentNode===i&&
j.getAttribute('data-time'));});}};




e.exports=h;});

/** js/profile/timeline/modules/TimelineComposerUtilities.js */
__d("TimelineComposerUtilities",["Event","Arbiter","Bootloader","CSS","DOM","DOMQuery","Parent","TimelineUnitSelector","Vector","cx","csx"],function(a,b,c,d,e,f){



var g=b('Event'),

h=b('Arbiter'),
i=b('Bootloader'),
j=b('CSS'),
k=b('DOM'),
l=b('DOMQuery'),
m=b('Parent'),
n=b('TimelineUnitSelector'),
o=b('Vector'),

p=b('cx'),
q=b('csx'),

r=86400*31,
s=86400000,

t=
{listenToSetEstimatedDate:function(u,v){
return h.subscribe
('ComposerXTimelineTagger/init',
function(w,x){
if(l.contains(u,x.datePickerElement)){
t.setEstimatedDate
(x.datePickerInstance,
v());

x.composerTimelineTagger.switchToTagger('date');}});},









listenToSetEstimatedDateOld:function(u,v){
return h.subscribe
('TimelineBackdatedComposerTagger/initialized',
function(event,w){
if(w.composer===u)
w.date_picker.subscribe
('initialized',
function(x,y){
t.setEstimatedDate
(y,
v());});});},












listenToPublish:function(u,v){


if(u.root)
u=u.root;

return h.subscribe
('composer/publish',
function(event,w){
if(w.composer_id===u.id)
i.loadModules(['TimelineStoryPublisher'],
function(x){
x.publish(w);
v&&v();});});},










listenToAnotherComposerOpen:function(u,v){
return h.subscribe('composer/mutate',function(w,x){
if(x!==u)
v();});},




listenToCancel:function(u,v){
return g.listen(u,'click',function(event){
if(m.byClass
(event.getTarget(),
"_306"))
v();});},




listenToCancelOld:function(u,v){
return g.listen(u,'click',function(event){
m.byClass(event.getTarget(),'cancelBtn')&&v();});},








hidePlaceIfAttachmentsTooTall:function(u){
var v=l.find
(u,
"._2_3"),

w=o.getElementDimensions(v).y;
if(w>50)
j.hide
(l.find
(v,
"._mg"));},






hidePlaceIfAttachmentsTooTallOld:function(u){
var v=k.find(u,'ul.fbTimelineComposerAttachments'),
w=o.getElementDimensions(v).y;
if(w>50){
var x=
m.byTag(k.scry(v,'span.placeAttachment')[0],'li');
x&&j.hide(x);}},



setEstimatedDate:function(u,v){
var w,
x;

if(v&&j.hasClass(v,'fbTimelineCapsule')){
w=v.getAttribute('data-start');
x=v.getAttribute('data-end');
if(w&&x){
var y=new Date(x*1000);
if(x-w>2*r){



u.setDate(y.getFullYear());}else 


u.setDate(y.getFullYear(),y.getMonth()+1);}


return;}


var z=m.byClass(v,'fbTimelineCapsule');
if(z){
w=z.getAttribute('data-start');
x=z.getAttribute('data-end');

var aa=o.getElementPosition(v).y,



ba=[x,null],
ca=[w,null],

da=n.getUnitsWithTime(z);
for(var ea=0;ea<da.length;ea++){
var fa=da[ea],

ga=k.scry(fa.parentNode,'.spinePointer')[0];
if(!ga)
continue;


var ha=o.getElementPosition(ga).y;
if(ha<=aa){
if(!ba[1]||ha>ba[1])
ba=[fa.getAttribute('data-time'),ha];}else 


if(!ca[1]||ha<ca[1])
ca=[fa.getAttribute('data-time'),ha];}




if(ba[0]!==null&&ca[0]!==null){
var ia=Math.round
((parseInt(ba[0],10)+parseInt(ca[0],10))/
2)*1000;

ia=Math.min(new Date()-s,ia);
u.setDateWithTimestamp(ia);}}},




showMLEFlyout:function(u){

var v=k.scry(document,'a.fbTimelineSpine').length===0,
w=
function(x){
x.showMLEFlyout(u);};

if(v){
i.loadModules(['TimelineSpinelessComposer'],w);}else 

i.loadModules(['TimelineComposer'],w);}};




e.exports=t;});

/** js/profile/timeline/modules/TimelineNavigation.js */
__d("TimelineNavigation",["Event","Arbiter","DOM","CSS","PageTransitions","Parent","TimelineController","TimelineURI","URI","$","createArrayFrom","ge"],function(a,b,c,d,e,f){



var g=b('Event'),

h=b('Arbiter'),
i=b('DOM'),
j=b('CSS'),
k=b('PageTransitions'),
l=b('Parent'),
m=b('TimelineController'),
n=b('TimelineURI'),
o=b('URI'),

p=b('$'),
q=b('createArrayFrom'),
r=b('ge'),

s=4,
t=110,
u=20,
v=119,
w=328,
x=10,
y=3,
z=false,
aa=21,

ba,
ca,
da,
ea=[],
fa=[],


ga,
ha=0,
ia,
ja=0,
ka=0,
la,
ma=s,
na=false,
oa=false,
pa=null,

qa,
ra=false,
sa,
ta,

ua=false;

function va(jb,kb,lb){
if(!kb.firstChild){
i.remove(kb);
return;}


fa.push(kb);
ya(lb.recent);

j.removeClass(l.byTag(kb,'li'),'empty');
if(ga&&
(ja>s||ka>0))
j.removeClass(ga,'notready');


xa();
if(lb.async){
cb();
eb();}}



function wa(jb,kb,lb){
i.remove(l.byTag(kb,'li'));
if(!lb.async){
la++;}else{

ja--;
cb();
eb();}

xa();}


function xa(){
var jb=ga?0:aa;

if(ja<=s){
var kb=
w+
v*Math.max(0,s-ja)+
jb;

if(ia)
ia.style.width=kb+'px';


ma=ja;
za();}}



function ya(jb){
if(jb){
ka++;}else 

ja++;

za();}


function za(){
if(!sa)


return;

var jb=
Math.max(0,ja-s)+ka;
if(ha&&ga){
i.setContent(ha,jb===0?" ":jb);
j.conditionClass(ga,'fbTimelineMoreButtonZero',jb===0);
if(!na)
j.conditionShow(ga,jb>0);}}




function ab(){
var jb=i.scry(p('fbTimelineNavTopRow'),'li.tile'),

kb=0,
lb=0,
mb=Math.max(0,s-ma),
nb=false;
for(var ob=0;ob<jb.length;ob++){


if(jb[ob]==ia||jb[ob]==ga)
continue;

nb=((kb+mb)%s===0);



j.conditionClass
(jb[ob],
'leftMost',
(kb!==0&&nb));

if(!j.hasClass(jb[ob],'empty'))
lb=kb;

kb++;}




nb=((lb+1+mb)%s===0);
var pb=jb.length-1-mb;
if(nb){
if(na&&
(lb+1+mb)/s<y){
pb=Math.min
(pb,
lb+s);

oa=true;}else 

pb=lb;}else{



var qb=((lb+1+mb)%s);
pb=lb+(s-qb);
oa=false;}

ob=0;
for(ob=0;ob<=pb;ob++)
if(jb[ob]&&(jb[ob]==ia||jb[ob]==ga)){
pb++;}else 

jb[ob]&&
j.hasClass(jb[ob],'empty')&&
j.removeClass(jb[ob],'hidden_elem');}




function bb(jb,kb,lb){
var mb=i.scry(jb,'li.tile');

if(!kb)
kb=0;

var nb=false;
for(var ob=kb;ob<mb.length;ob++){
nb=((ob-lb)%s===0);
var pb=mb[ob];
j.conditionClass
(pb,
'leftMost',
nb);

if(j.hasClass(pb,'empty'))
j.removeClass(pb,'hidden_elem');}}




function cb(){
ab();
var jb=r('fbTimelineNavSecondaryRow');
jb&&bb(jb,0,0);}


function db(){
if(!ga)
return;


if(j.hasClass(ga,'notready'))
return;

j.toggleClass(ga,'fbTimelineMoreButtonOpen');
var jb=r('fbRecentAppTitle');
jb&&j.conditionClass
(jb,
'hidden_elem',
ka===0);

if(j.hasClass(ga,'fbTimelineMoreButtonOpen')){
cb();}else 

za();

eb();}


function eb(){
if(ga&&!j.hasClass(ga,'fbTimelineMoreButtonOpen')){
ba.style.height='';
j.removeClass(ba,'expanded');}else{

var jb=ja+(s-ma),
kb=
((ka>0)?x:0)+
t*(Math.ceil(ka/s))+
t*(Math.ceil(jb/s))+
t*(oa?1:0)+
u;
j.addClass(ba,'expanded');
ba.style.height=kb+'px';}}



function fb(jb){
var kb=jb==n.TIMELINE_KEY||
jb==n.WALL_KEY,
lb=l.byClass(ba,'fbTimelineTopSectionBase'),
mb=r('timeline_tour_toolbar');

if(ga){
j.removeClass(ga,'fbTimelineMoreButtonOpen');
eb();}


mb&&j.conditionShow(mb,kb);
if(lb)
j.conditionClass(lb,'collapsedHead',!kb);}



function gb(event){
if(ua)
return true;

if(!l.byTag(event.getTarget(),'a')){
var jb=i.find(ia,'a.title');
k.go(jb.href);}}



function hb(){


if(ga)
(function(){
ga.removeAttribute('ajaxify');
ga.removeAttribute('rel');}).
defer();

pa&&pa.remove();}


var ib=
{UPDATE_PAGE:'TimelineNavigation/updatePage',

init:function(jb,kb,lb,mb){
if(z)
return;


z=true;
ba=jb;
ga=kb;
ca=o.getRequestURI();
ia=i.scry(ba,'li.about')[0];
fb(m.getCurrentKey());
na=mb;
h.inform(ib.UPDATE_PAGE);


if(ga){
ha=i.find(ga,'div.text');

pa=g.listen(ga,'click',hb);}


qa=p('fbTimelineNavigationLoadContainer');
i.appendContent(p('content'),qa);

if(ia)
ta=g.listen(ia,'click',gb);


ea.forEach(function(ob){
if(!ob[2].remove){
va.apply(this,ob);}else 

wa.apply(this,ob);});


ea=[];



var nb=l.byClass(jb,'fbTimelineSection');
if(nb)
i.scry(nb,'ul.uiButtonGroup').forEach(function(ob){
q(ob.childNodes).forEach(function(pb){
pb.childNodes.length||i.remove(pb);});

if(ob.firstChild){
j.addClass(ob.firstChild,'firstItem');}else 

i.remove(ob);});




m.register(m.NAV,ib);},


reset:function(){

ta&&ta.remove();
ta=null;
sa&&sa.remove();
sa=null;
z=false;
ba=null;
da=null;
fa=[];
ga=null;
ha=null;
ia=null;
ja=0;
ka=0;
la=0;
ma=s;
na=false;
oa=false;
qa=null;
ra=false;
ua=false;},


initializeMorePager:function(){
if(sa)
return;

if(ga)
sa=g.listen(ga,'click',db);},



registerNav:function(jb,kb,lb){


z?
(lb.remove?
wa.apply(this,arguments):
va.apply(this,arguments)):
ea.push(arguments);},


redraw:function(){
cb();
eb();},


setEditMode:function(jb){
ua=jb;}};



e.exports=ib;});

/** js/profile/timeline/modules/TimelineBackdatedComposer.js */
__d("TimelineBackdatedComposer",["Arbiter","Bootloader","CSS","DOM","LayerHideOnBlur","Run","TimelineComposerUtilities","TimelineNavigation"],function(a,b,c,d,e,f){



var g=b('Arbiter'),
h=b('Bootloader'),
i=b('CSS'),
j=b('DOM'),
k=b('LayerHideOnBlur'),
l=b('Run'),
m=b('TimelineComposerUtilities'),
n=b('TimelineNavigation'),

o;

function p(){
q();
r();}


function q(){
o.hide();}


function r(){
h.loadModules(['TimelineMLE'],function(t){
var u=t.getFlyout();
if(u&&i.hasClass(u.getContext(),'backdatedDot'))
t.hideFlyout();});}




var s=
{init:function(t,u){
o=u;

var v=
[m.listenToPublish(t,p),
m.listenToAnotherComposerOpen(t,p),
m.listenToSetEstimatedDateOld
(t,
o.getContext.bind(o)),



t.subscribeToMutate(function(){
var x=
!j.scry(t.root,'.cancelBtn')[0]||
j.scry(t.root,'.attachmentLifeEvents')[0];
if(x){
o.enableBehavior(k);}else 

o.disableBehavior(k);}),



g.subscribe
('TimelineMLE/mleFlyoutShown',
function(x,y){
if(i.hasClass(y.getContext(),'backdatedDot')){
q();}else 

p();}),




g.subscribe(n.UPDATE_PAGE,p)],


w=
m.listenToCancelOld(o.getContent(),p);

l.onLeave(function(){
v.forEach(g.unsubscribe.bind(g));
v=[];
w.remove();
w=null;});


g.inform('TimelineBackdatedComposer/initialized');},


getFlyout:function(){
return o;}};



e.exports=a.TimelineBackdatedComposer||s;});

/** js/profile/timeline/modules/TimelineSpine.js */
__d("TimelineSpine",["array-extensions","Event","Arbiter","AsyncRequest","Bootloader","Composer","ComposerXController","CSS","DOM","Layer","LayerHideOnBlur","Parent","Run","TimelineBackdatedComposer","TimelineComposerUtilities","copyProperties"],function(a,b,c,d,e,f){



b('array-extensions');
var g=b('Event'),

h=b('Arbiter'),
i=b('AsyncRequest'),
j=b('Bootloader'),
k=b('Composer'),
l=b('ComposerXController'),
m=b('CSS'),
n=b('DOM'),
o=b('Layer'),
p=b('LayerHideOnBlur'),
q=b('Parent'),
r=b('Run'),
s=b('TimelineBackdatedComposer'),
t=b('TimelineComposerUtilities'),

u=b('copyProperties');

function v(){}

u(v,
{OFFSET_Y:12,
composerFlyout:null,
composerRoot:null,
mleFlyout:null,
dot:null,
loadComposerFlyoutCalled:false,





showComposerFlyout:function(w){
var x=v.composerFlyout;
if(!x){
v.loadComposerFlyout(w);
v.showComposerFlyoutOnLoad=true;
return;}


if(v.composerRoot){
l.reset(v.composerRoot);
t.hidePlaceIfAttachmentsTooTall
(v.composerRoot);}else{


var y=n.scry
(x.getContent(),'div.fbTimelineBackdatedComposer')[0],
z=k.getInstance(y);
if(z){
z.reset();
m.removeClass(z.root,'uiComposerOpen');}


t.hidePlaceIfAttachmentsTooTallOld(y);}


x.
enableBehavior(p).
setContext(v.dot).
updatePosition();
x.show();},





loadComposerFlyout:function(w){
if(v.loadComposerFlyoutCalled||
v.composerFlyout)
return;

v.loadComposerFlyoutCalled=true;

r.onLeave(function(){
v.loadComposerFlyoutCalled=false;
v.composerFlyout=null;
v.composerRoot=null;}.
bind(this));

new i().
setURI('/ajax/timeline/backdated_composer.php').
setData({targetid:w}).
setRelativeTo(v.dot||document.body).
send();
var x=
h.subscribe
('TimelineBackdatedComposer/initialized',
function(y,z){
if(z){
v.composerFlyout=z.getFlyout();
v.composerRoot=
z.getComposerRoot();}else 


v.composerFlyout=
s.getFlyout();

if(v.showComposerFlyoutOnLoad)
v.showComposerFlyout(w);

v._handleComposerFlyoutDismissed();
x.unsubscribe();});},




showMLEFlyout:function(w){
v.mleFlyout=w;
w.setContext(v.dot).show();
v.composerFlyout.hide();},





_handleComposerFlyoutDismissed:function(){
var w=
o.subscribe('hide',function(x,y){
if(v.dot&&y.getContext)
if(y.getContext()===v.dot&&
!v.mleFlyout){
v._hideDot();}else
if(y===v.mleFlyout){
v.mleFlyout=null;
v._hideDot();}});



r.onLeave(function(){
o.unsubscribe(w);}.
bind(this));},


_hideDot:function(){
n.remove(v.dot);
v.dot=null;}});



u(v.prototype,
{init:function(w,x){
this._spine=w;
this._plus=n.find(w,'.spineHoverPlus');
this._capsule=q.byClass(w,'fbTimelineCapsule');
this._targetid=x;

var y=

[g.listen(w,'mouseenter',function(event){
v.loadComposerFlyout(this._targetid);
this._spineHeight=w.offsetHeight;}.
bind(this)),
g.listen(w,'mousemove',this._mouseMoved.bind(this)),
g.listen(w,'click',this._spineClicked.bind(this))];

m.addClass(this._plus,'spineHoverPlusActive');

r.onLeave(function(){
while(y.length)
y.pop().remove();}.

bind(this));},





_mouseMoved:function(event){
var w=event.offsetY||event.layerY,
x=event.getTarget();


if(x!==this._spine)
w=x.offsetTop+w;

w=
Math.min(Math.max(w-v.OFFSET_Y,0),this._spineHeight);
this._plus.style.top=w+'px';},





_spineClicked:function(event){
if(v.mleFlyout){
j.loadModules(['TimelineMLE'],function(w){
w.hideFlyout();});

return;}

v.dot&&n.remove(v.dot);
v.dot=n.create('i',{className:'backdatedDot'});
v.dot.style.top=(this._plus.offsetTop-1)+'px';
n.appendContent(this._spine,v.dot);

event.stop();

v.showComposerFlyout(this._targetid);}});



e.exports=a.TimelineSpine||v;});

/** js/profile/timeline/TimelineSpine.js */
__d("legacy:TimelineSpine",["TimelineSpine"],function(a,b,c,d){



a.TimelineSpine=b('TimelineSpine');},

3);

/** js/profile/timeline/modules/TimelineCapsule.js */
__d("TimelineCapsule",["Arbiter","CSS","DataStore","DOM","DOMQuery","DOMScroll","Parent","TimelineConstants","TimelineLegacySections","UserAgent","Vector","$","createArrayFrom","csx","isEmpty","queryThenMutateDOM","requestAnimationFrame"],function(a,b,c,d,e,f){



var g=b('Arbiter'),
h=b('CSS'),
i=b('DataStore'),
j=b('DOM'),
k=b('DOMQuery'),
l=b('DOMScroll'),
m=b('Parent'),
n=b('TimelineConstants'),
o=b('TimelineLegacySections'),
p=b('UserAgent'),
q=b('Vector'),

r=b('$'),
s=b('createArrayFrom'),
t=b('csx'),
u=b('isEmpty'),
v=b('queryThenMutateDOM'),
w=b('requestAnimationFrame'),

x=(function(){


var y=45,

z=15,

aa='use',
ba='update',

ca={},
da={};

function ea(ra){
return h.hasClass(ra,'fbTimelineBalancer');}


function fa(ra){
return ra.getAttribute('data-spine');}


function ga(ra){
return h.hasClass(ra,'placeholderUnit');}


function ha(ra,sa){
if(sa)

return (i.get(n.DS_SIDEORG,ra.id)||
ra.getAttribute('data-side'));


return ra.getAttribute('data-side');}


var ia=function(ra,sa){
if(p.ie()<=6){
ia=function(ta,ua){
i.set
(n.DS_SIDEORG,
ta.id,
ha(ta,true));

ta.setAttribute('data-side',ua);
h.removeClass(ta,'leftColumn');
h.removeClass(ta,'rightColumn');
h.addClass(ta,ua=='l'?'leftColumn':'rightColumn');};}else 


ia=function(ta,ua){
i.set
(n.DS_SIDEORG,
ta.id,
ha(ta,true));

ta.setAttribute('data-side',ua);};


ia(ra,sa);};


function ja(ra){
return ra.getAttribute('data-size');}


function ka(ra){
if(h.hasClass(ra,'fbTimelineOneColumn')&&
ra.prevSibling&&
h.hasClass(ra.prevSibling,'fbTimelineOneColumn'))
return z*2;

if(h.hasClass(ra,'fbTimelineIndeterminateContent'))
return 0;

return z;}


function la(ra,sa){
var ta=0;
if(h.shown(ra)&&!h.hasClass(ra,'placeholderUnit'))
if(sa===aa){

ta=i.get(n.DS_HEIGHT,ra.id,null);
if(ta===null)
ta=ra.getAttribute('data-calculatedheight');}else 


ta=ra.offsetHeight+ka(ra);








































if(sa===aa&&ta===null)



ta=300;


i.set
(n.DS_HEIGHT,
ra.id,
parseInt(ta,10));}



function ma(ra){
var sa=i.get(n.DS_HEIGHT,ra.id,null);






return sa;}


function na(ra,sa){
if(ja(sa)=='2'){
return 0;}else
if(ha(sa)=='r'){
return ra+ma(sa);}else 

return ra-ma(sa);}



function oa(ra){
k.scry(ra,"._3ram").forEach
(function(sa){
var ta=sa.getAttribute('data-endmarker'),
ua=sa.getAttribute('data-pageindex'),

va=function(){
if(!sa.parentNode)

return;



i.set(n.DS_LOADED,ra.id,ua);
j.remove(sa);
g.inform(n.SECTION_FULLY_LOADED,
{scrubberKey:ta,
pageIndex:ua,
capsuleID:ra.id,
childCount:ra.childNodes.length});};





if(o.get(ta)){
va();}else 

var wa=g.subscribe
(n.SECTION_REGISTERED,
function(xa,ya){
if(ya.scrubberKey===ta){
va();
wa.unsubscribe();}});});







g.inform('TimelineCapsule/balanced',
{capsule:ra});}








function pa(ra){
if(u(ca[ra.id]))
return;


var sa=ea(ra)?ra.firstChild:ra,
ta=sa.childNodes.length,
ua={},
va={},
wa,
xa=z,
ya=z,
za,
ab=[];




for(var bb=0;bb<ta;bb++){
wa=sa.childNodes[bb];
if(h.hasClass(wa,'fbTimelineUnit')){
za=k.scry(wa,'div.timelineUnitContainer')[0];
if(za)
va[wa.id]=za.getAttribute('data-time');


if(!ga(wa)&&h.shown(wa)){
if(ja(wa)=='2'){
ua[wa.id]=Math.max
(xa,
ya);

xa=ya=ua[wa.id]+
ma(wa);}else
if(ha(wa)=='r'){
ua[wa.id]=ya;
ya+=ma(wa);}else{

ua[wa.id]=xa;
xa+=ma(wa);}


if(ha(wa,true)=='l'||ja(wa)=='2')

ab.push(wa.id);}}}





for(bb=0;bb<ab.length-1;++bb){
var cb=ab[bb],
db=ab[bb+1],
eb=ua[cb]+y,
fb=ua[db];

for(var gb in ca[ra.id]){
if(eb>fb)

break;

var hb=ca[ra.id][gb];
if(h.shown(hb))

continue;


if(va[gb]<=va[cb]&&
va[gb]>va[db]){
hb.style.top=eb+"px";
eb+=y;
h.show(hb);}}}}








function qa(ra,sa){
var ta=m.byAttribute(ra,'data-size');
if(ta){



if(h.hasClass(ra.parentNode,'timelineReportContent')){
sa(ra);}else 

sa(ta);

x.balanceCapsule
(m.byClass(ta,'fbTimelineCapsule'));}}





return {removeUnit:function(ra){
qa(ra,function(sa){
j.remove(sa);});},



hideUnit:function(ra){
qa(ra,function(sa){
h.addClass(sa,'fbTimelineColumnHidden');});},



undoHideUnit:function(ra,sa){
j.remove(m.byClass(sa,'hiddenText'));
qa(ra,function(ta){
h.removeClass(ta,'fbTimelineColumnHidden');});},



unplacehold:function(ra){
var sa=r(ra);
sa.style.top=null;
h.removeClass(sa,'visiblePlaceholder');
h.removeClass(sa,'placeholder');
var ta=m.byClass(sa,'fbTimelineCapsule');
delete ca[ta.id][ra];
x.balanceCapsule(ta);},


scrollToCapsule:function(ra){
if(!da.hasOwnProperty(ra.id)){
var sa=q.getElementPosition(ra.parentNode);
l.scrollTo(new q
(q.getScrollPosition().x,
sa.y-n.SUBSECTION_SCROLL_TO_OFFSET,
'document'));

da[ra.id]=true;}},



balanceCapsuleFromChild:function(ra,sa){
x.balanceCapsule
(m.byClass(ra,'fbTimelineCapsule'),
sa);},






balanceCapsuleDeferred:function(ra,sa){
x.balanceCapsule.curry(ra,sa).defer();},


balanceCapsule:function(ra,sa){
if(!ra||!ra.childNodes)
return;


var ta=0,
ua,
va=document.createDocumentFragment(),
wa=[],
xa=[],
ya=[],
za=false,
ab=sa&&sa.heights_action;


if(sa&&sa.tail_balance)
i.set
(n.DS_TAILBALANCE,
ra.id,
sa.tail_balance);





if(ab!==ba&&
(p.chrome()||p.webkit()))
h.toggleClass(ra,'webkitFix');


for(var bb=0;bb<ra.childNodes.length;bb++){
ua=ra.childNodes[bb];
if(fa(ua)){
continue;}else
if(ea(ua)){
s(ua.firstChild.childNodes).forEach
(function(jb){
la(jb,ab);});


continue;}

la(ua,ab);

if(ha(ua,true)=='r'){
xa.push(ua);}else 

wa.push(ua);

ya.push(ua);
if(ja(ua)!='2')

if((ta>0&&ha(ua)=='r')||
(ta<0&&ha(ua)=='l'))
za=true;


ta=na(ta,ua);}


var cb=[],
db=[],
eb=[];

k.scry(ra,'li.fbTimelineBalancer').forEach(function(jb){
var kb=s(jb.firstChild.childNodes);
if(jb.getAttribute('data-nonunits')){
eb=eb.concat(kb);}else
if(ha(jb)=='left'){
cb=cb.concat(kb);}else
if(ha(jb)=='right')
db=db.concat(kb);});



if(za){





ra.style.minHeight=ra.offsetHeight;
wa.forEach(function(jb){
if(ja(jb)!='2')
ia(jb,'l');});


xa.forEach(function(jb){
if(ja(jb)!='2')
ia(jb,'r');});




var fb=j.create
('li',
{className:'fbTimelineBalancer'},
j.create('ol',null,wa));

fb.setAttribute('data-side','left');
j.prependContent(ra,fb);
cb=wa.concat(cb);

var gb=j.create
('li',
{className:'fbTimelineBalancer'},
j.create('ol',null,xa));

gb.setAttribute('data-side','right');
j.prependContent(ra,gb);
db=xa.concat(db);

ta=0;}


while((ta>=0&&cb.length)||
(ta<0&&db.length)){
if(ta>=0){
ua=cb.shift();}else 

ua=db.shift();

va.appendChild(ua);
ta=na(ta,ua);}


while(eb.length)
va.appendChild(eb.shift());


ra.appendChild(va);
k.scry(ra,'li.fbTimelineBalancer').forEach(function(jb){
if(!jb.firstChild.childNodes.length)
j.remove(jb);});



var hb=(sa&&sa.tail_balance)||
i.get(n.DS_TAILBALANCE,ra.id);

if(hb)
ta=x.tailBalance
(ra,
ta,
hb);



if(za){
ya.forEach(function(jb){
if(jb.parentNode!==ra){
ra.appendChild(jb);
ta=na(ta,jb);}});


ra.style.minHeight=null;}




var ib=m.byClass(ra,'fbTimelineSection');
if(ib)
i.set
(n.DS_COLUMN_HEIGHT_DIFFERENTIAL,
ib.id,
ta);



ca[ra.id]={};
k.scry(ra,'li.placeholderUnit').forEach(function(jb){

ca[ra.id][jb.id]=jb;});

pa(ra);

oa(ra);

if(ab===aa){
sa.heights_action=ba;

w(function(){
w
(x.balanceCapsule.curry(ra,sa));});}},





tailBalance:function(ra,sa,ta){
if(!ra)
return sa;


var ua=[],
va=[],
wa=[],
xa=[];

k.scry(ra,'li.fbTimelineBalancer').forEach(function(za){
var ab=s(za.firstChild.childNodes);
if(za.getAttribute('data-nonunits')){
xa=xa.concat(ab);}else
if(ha(za)=='left'){
va=va.concat(ab);}else
if(ha(za)=='right')
wa=wa.concat(ab);

ua=ua.concat(ab);});


if((ta==n.FIXED_SIDE_RIGHT&&
va.length)||
(ta==n.FIXED_SIDE_LEFT&&
wa.length))

return sa;


var ya=document.createDocumentFragment();
if(ua)
while(ua.length){
if(ta!=n.FIXED_SIDE_NONE)
if(ja(ua[0])!='2')
if(sa>=0){
ia(ua[0],'l');}else 

ia(ua[0],'r');



sa=na(sa,ua[0]);
ya.appendChild(ua.shift());}


ra.appendChild(ya);
k.scry(ra,'li.fbTimelineBalancer').forEach(function(za){
if(!za.firstChild.childNodes.length)
j.remove(za);});



return sa;},



loadTwoColumnUnits:function(ra){
var sa=r(ra);
v
(function(){
var ta=m.byClass(sa,'fbTimelineSection');
if(ta){
var ua=k.find
(sa,
"._3rbf"),

va=k.find
(sa,
"._3rbh"),

wa=
va.offsetHeight-ua.offsetHeight;
i.set
(n.DS_COLUMN_HEIGHT_DIFFERENTIAL,
ta.id,
wa);}},



oa.curry(sa));}};})



();

e.exports=a.TimelineCapsule||x;});

/** js/profile/timeline/modules/TimelineCapsuleUtilities.js */
__d("TimelineCapsuleUtilities",["CSS"],function(a,b,c,d,e,f){



var g=b('CSS'),

h=
{setFirstUnit:function(i){
var j=true;
for(var k=0;k<i.childNodes.length;++k){
var l=i.childNodes[k];

if(l.id.indexOf('tl_unit_')===0)
if(j){
j=false;
g.addClass(l,'firstUnit');}else{

g.removeClass(l,'firstUnit');
break;}}}};






e.exports=h;});

/** js/profile/timeline/modules/TimelineComposer.js */
__d("TimelineComposer",["Arbiter","Bootloader","CSS","DOM","Parent","Run","TimelineCapsule","TimelineCapsuleUtilities","TimelineComposerUtilities","$","cx"],function(a,b,c,d,e,f){



var g=b('Arbiter'),
h=b('Bootloader'),
i=b('CSS'),
j=b('DOM'),
k=b('Parent'),
l=b('Run'),
m=b('TimelineCapsule'),
n=b('TimelineCapsuleUtilities'),
o=b('TimelineComposerUtilities'),

p=b('$'),
q=b('cx'),

r;

function s(x){
if(x.isScheduledPost||x.isOGPost)

return;


if(!x.streamStory){



window.location.reload();
return;}


if(x.backdatedTime){
h.loadModules(['TimelineStoryPublisher'],
function(z){
z.publish(x);});

return;}


var y=
w.renderCapsuleBasedStory(r,x.streamStory);
g.inform
('TimelineComposer/on_after_publish',
y,
g.BEHAVIOR_PERSISTENT);}



function t(){
var x=k.byClass(r,'fbTimelineTwoColumn');
return j.find(x,'.spinePointer');}


function u(x){
var y=v();
i.show(y);
var z=x.subscribe('hide',function(){
i.hide(y);
x.unsubscribe(z);});}



function v(){
var x=k.byClass(r,'fbTimelineTwoColumn'),
y=j.scry(x,'div.composerVeil');
if(y.length!==1)
y=
j.appendContent
(x,
j.create('div',{className:'composerVeil hidden_elem'}));


return y[0];}


var w=
{init:function(x){
r=p(x);
var y=
g.subscribe('composer/publish',function(event,z){
if(z.composer_id===r.id)
s(z);});


l.onLeave(y.unsubscribe.bind(y));

if(i.hasClass(r,"_mj")){
o.hidePlaceIfAttachmentsTooTall(r);}else 

o.hidePlaceIfAttachmentsTooTallOld(r);},



showMLEFlyout:function(x){
x.setContext(t()).show();
u(x);},


renderCapsuleBasedStory:function(x,y){
var z=k.byClass(x,'fbTimelineCapsule');
if(!z)
return;


var aa=
k.byClass(x,'timelineUnitContainer').parentNode;

if(aa.nextSibling.getAttribute('data-spine'))
aa=aa.nextSibling;


var ba=j.insertAfter(aa,y)[0];
h.loadModules(['Animation'],function(ca){
ca(ba.firstChild).
from('backgroundColor','#fff8dd').
to('backgroundColor','#fff').
duration(2000).
ease(ca.ease.both).
go();});


n.setFirstUnit(z);
m.balanceCapsule(z);
return ba;}};



e.exports=a.TimelineComposer||w;});

/** js/profile/timeline/modules/TimelineSmartInsert.js */
__d("TimelineSmartInsert",["Run","UserAgent","Vector"],function(a,b,c,d,e,f){



var g=b('Run'),
h=b('UserAgent'),
i=b('Vector'),








j=false,
k=false;

function l(){
if(k)
return;


g.onLeave(m);

k=true;}


function m(){
j=false;
k=false;}


var n=


{BUFFER:100,









run:function(o,p){
l();

if(!j||h.ie()<=8){
p();
return;}


var q=o.offsetHeight;
p();
var r=o.offsetHeight;

if(r-q!==0&&
i.getElementPosition(o).y+q<
i.getScrollPosition().y+n.BUFFER)
window.scrollBy(0,r-q);},



enable:function(){
j=true;}};



e.exports=n;});

/** js/profile/timeline/modules/TimelineContentLoader.js */
__d("TimelineContentLoader",["Event","function-extensions","Arbiter","CSS","DOM","DOMScroll","OnVisible","ScrollingPager","TimelineConstants","TimelineController","TimelineLegacySections","TimelineSmartInsert","TimelineURI","UIPagelet","UserAgent","Vector","$","copyProperties","createArrayFrom","csx","debounce","ge","startsWith","tx","userAction"],function(a,b,c,d,e,f){



var g=b('Event');
b('function-extensions');

var h=b('Arbiter'),
i=b('CSS'),
j=b('DOM'),
k=b('DOMScroll'),
l=b('OnVisible'),
m=b('ScrollingPager'),
n=b('TimelineConstants'),
o=b('TimelineController'),
p=b('TimelineLegacySections'),
q=b('TimelineSmartInsert'),
r=b('TimelineURI'),
s=b('UIPagelet'),
t=b('UserAgent'),
u=b('Vector'),

v=b('$'),
w=b('copyProperties'),
x=b('createArrayFrom'),
y=b('csx'),
z=b('debounce'),
aa=b('ge'),
ba=b('startsWith'),
ca=b('tx'),
da=b('userAction'),

ea=false,
fa=false,
ga,
ha=null,
ia={},
ja=[],
ka=[],
la={},
ma={},
na={},
oa={},
pa=null,
qa=null,
ra=false,
sa=null;

function ta(cb,db,eb,fb,
gb){
this.node=cb;
this.loaded=fb;
this.canScrollLoad=true;
this.canUnload=db!=bb.RECENT;
this.scrubberKey=db;
this.historicUnitCount=gb;
this._pageletLoadData=eb;
this._expandPageletLoadData={};
this.rightColumnFinished=false;}


w(ta.prototype,
{load:function(cb){
if(this.loaded)
return;

var db=this._pageletLoadData;

h.inform(n.SECTION_LOADING,
{data:db,scrubberKey:this.scrubberKey});

this.loaded=true;
i.removeClass(this.node,'fbTimelineTimePeriodUnexpanded');
i.removeClass(this.node,'fbTimelineTimePeriodSuppressed');

var eb='ProfileTimelineSectionPagelet';
if(this.scrubberKey==bb.WAY_BACK)
eb='ProfileTimelineRemainingYearsPagelet';

db.time_cutoff=bb.getTimeCutoff();
db.highlight_unit_data=cb;
db.parent_key=this.parentKey;
db.force_no_friend_activity=ra;
i.addClass(this.node,'fbTimelineSectionLoading');

if(this.canUnload&&fa){
var fb=this.node.firstChild.cloneNode(true);
i.hide(fb);
j.insertAfter(this.node,fb);}else 




this.canScrollLoad=false;


na[this.scrubberKey]=s.loadFromEndpoint
(eb,
this.node.id,
db,

{usePipe:true,
jsNonblock:true,
constHeight:true});



ab(this.scrubberKey);},


preload:function(){
i.addClass(this.node,'fbTimelineTimePeriodSuppressed');
i.removeClass(this.node,'fbTimelineTimePeriodUnexpanded');
var cb=j.find(this.node,'span.sectionLabel');
if(cb.getAttribute('data-original-label')){




j.setContent(cb,cb.getAttribute('data-original-label'));
cb.removeAttribute('data-original-label');}},



unload:function(){
if(!this.loaded||!this.canUnload)
return;


this.loaded=false;

na[this.scrubberKey]&&na[this.scrubberKey].cancel();
i.addClass(this.node,'fbTimelineTimePeriodUnexpanded');
i.removeClass(this.node,'fbTimelineTimePeriodSuppressed');

if(this.node.nextSibling&&
i.hasClass(this.node.nextSibling,'fbTimelineSection')){
j.setContent(this.node,this.node.nextSibling);
i.show(this.node.firstChild);}else 

j.empty(this.node);


this.deactivateScrollLoad();},


activateScrollLoad:function(){
this.canScrollLoad=true;
i.removeClass(this.node,'fbTimelineTimePeriodSuppressed');
i.addClass(this.node,'fbTimelineTimePeriodUnexpanded');
ma[this.scrubberKey]&&
ma[this.scrubberKey].reset();},


deactivateScrollLoad:function(){
if(!this.loaded){
this.canScrollLoad=false;
i.removeClass(this.node,'fbTimelineTimePeriodUnexpanded');
i.addClass(this.node,'fbTimelineTimePeriodSuppressed');
ma[this.scrubberKey]&&
ma[this.scrubberKey].remove();}},



setExpandLoadData:function(cb){
this._expandPageletLoadData=cb;
return this;},


expandSubSections:function(){
if(this.subSections.length)
bb.navigateToSection
(this.subSections[0].scrubberKey);},




expand:function(cb){
if(!this.loaded)
return;


qa.add_event('expand_'+this.scrubberKey);

var db=j.find(this.node,'.fbTimelineSectionExpander');
i.addClass(db.firstChild,'async_saving');
cb&&i.addClass(cb,'async_saving');
this._expandPageletLoadData.time_cutoff=
bb.getTimeCutoff();

bb.navigateToSection(this.scrubberKey);
j.scry(this.node,'.fbTimelineCapsule').forEach(j.remove);
this._expandPageletLoadData.new_expand=true;


na[this.scrubberKey]&&na[this.scrubberKey].cancel();
na[this.scrubberKey]=s.loadFromEndpoint
('ProfileTimelineSectionPagelet',
db.id,
this._expandPageletLoadData,

{usePipe:true,
jsNonblock:true,
constHeight:true});},




isPermalinkPeriod:function(){
return this._pageletLoadData.is_permalink_period;}});



function ua(){
if(ea)
return;


o.register
(o.CONTENT,
bb);


qa=da('timeline').uai('init','scrubber',false);

ea=true;

if(t.ie()<=7)
fa=true;}




var va=
z
(function(cb,db,eb){
var fb=
p.get(cb).
historicUnitCount;
db-=fb;
eb-=1;

if(fb==-1||eb<=0||db<0)
return;

var gb=
bb.getNextSectionKey(cb);
if(gb){
p.get(gb).load();
va(gb,db,
eb);}},


500);


function wa(cb,db,eb,fb){
var gb=
bb.getNextSectionKey(db);
if(gb){
ma[gb]=new l
(cb,
xa.curry(gb,cb),
false,
eb||1000);}else 








if(db!==bb.WAY_BACK){
fb=fb?fb:0;
if(fb>80)
return null;

wa.curry
(cb,
db,
eb,
fb+1).
defer(250);}}




function xa(cb,db){
var eb=p.get(cb);
if(eb&&eb.canScrollLoad){
qa.add_event("scroll_load_"+cb);
if(fa){
eb.preload();}else{

eb.load();

if(sa)
va
(cb,
sa.required_units,
sa.max_parallelism);}



db&&j.remove(db);}}



function ya(){
var cb,
db,
eb=false;
for(var fb=0;fb<ja.length;fb++){
var gb=ja[fb];
if(!gb)
continue;

var hb=p.get(gb);
if(hb&&(hb.canScrollLoad||hb.loaded)){
if(!hb.loaded){

i.removeClass(hb.node,'fbTimelineTimePeriodSuppressed');
i.addClass(hb.node,'fbTimelineTimePeriodUnexpanded');}

if(cb&&db){
za(cb,db);
if(eb)



cb.deactivateScrollLoad();

eb=true;}

cb=null;
db=null;
continue;}else
if(cb){
db=hb;
hb.deactivateScrollLoad();}else{

cb=hb;
if(eb)



hb.activateScrollLoad();}


i.removeClass(hb.node,'fbTimelineTimePeriodSuppressed');
i.addClass(hb.node,'fbTimelineTimePeriodUnexpanded');}}



function za(cb,db){
i.removeClass(db.node,'fbTimelineTimePeriodUnexpanded');
i.addClass(db.node,'fbTimelineTimePeriodSuppressed');
var eb=j.find(cb.node,'span.sectionLabel'),
fb=j.find(db.node,'span.sectionLabel');
if(!fb.getAttribute('data-original-label'))
fb.setAttribute
('data-original-label',
j.getText(fb));


if(eb.getAttribute('data-month')&&
fb.getAttribute('data-month')&&
eb.getAttribute('data-year')==
fb.getAttribute('data-year')){
j.setContent
(fb,
ca._("Show {month1} - {month2} {year}",
{month1:fb.getAttribute('data-month'),
month2:eb.getAttribute('data-month'),
year:eb.getAttribute('data-year')}));}else


if(eb.getAttribute('data-year')!==
fb.getAttribute('data-year')){
j.setContent
(fb,
ca._("Show {year1} - {year2}",
{year1:fb.getAttribute('data-year'),
year2:eb.getAttribute('data-year')}));}else 



j.setContent
(fb,
ca._("Show {year}",
{year:fb.getAttribute('data-year')}));}





function ab(cb){
if(fa)
for(var db=0;db<ja.length-1;db++){
var eb=ja[db];
if(!eb)
continue;

if(eb!=cb){
var fb=p.get(eb);
if(fb.loaded&&fb.canUnload)
fb.unload();}}




ya();}


var bb=
{WAY_BACK:'way_back',
RECENT:'recent',
HEADER_SCROLL_CUTOFF:80,
CURRENT_SECTION_OFFSET:150,
FOOTER_HEIGHT:60,

registerTimePeriod:function(cb,db,eb,fb,
gb,hb,ib){
ua();


if(ka.contains(db))
return;

var jb=new ta
(cb,
db,
eb,
fb,
ib);

if(!gb){
ja[hb]=db;
ia[db]=true;}else{

jb.parentKey=gb;
p.get(gb).subSections=
p.get(gb).subSections||[];
p.get(gb).subSections[hb]=jb;}



p.set(db,jb);
bb.checkCurrentSectionChange();

h.inform(n.SECTION_REGISTERED,
{scrubberKey:db});

o.registerSectionKey(db,hb);},


reset:function(){
for(var cb in ma)
ma[cb].remove();

for(var db in na)
na[db]&&na[db].cancel();

for(var eb in oa){
oa[eb].unsubscribe();
delete oa[eb];}


ga&&ga.unsubscribe();
ga=null;

p.removeAll();
ha=null;
ia={};
ja=[];
ka=[];
la={};
ma={};
na={};
pa=null;
qa=null;
ra=false;

ea=false;},


checkCurrentSectionChange:function(){
var cb=bb.getCurrentSection(),
db=ha&&ha.scrubberKey;
if(cb&&
cb.scrubberKey!==db&&
!cb.isPermalinkPeriod()){
ha=cb;
var eb=cb.scrubberKey,
fb=cb.parentKey;
if(!fb){
fb=eb;
eb=null;}

o.sectionHasChanged(fb,eb);}},



setTimeCutoff:function(cb){
pa=cb;},


getTimeCutoff:function(){
return pa;},


setParallelLoadConfig:function(cb){
sa=cb;},


getCurrentSection:function(){
var cb={},
db=p.getAll();
for(var eb in db){
var fb=db[eb];
if(!fb.loaded||la[fb.scrubberKey])

continue;

var gb=u.getElementPosition(fb.node,'viewport').y;
if(fb.scrubberKey=='recent')




gb--;

if(gb<bb.CURRENT_SECTION_OFFSET)
cb[gb]=fb;}


var hb=Math.max.apply
(null,
Object.keys(cb)),

ib=hb==-Infinity;
if(!ib){
return cb[hb];}else
if(ja[0])
return p.get(ja[0]);

return null;},


capsuleForCurrentSection:function(){
var cb=bb.getCurrentSection();
return cb&&
j.scry(cb.node,'.fbTimelineCapsule')[0];},


enableScrollLoad:function(cb,db,eb,fb){
cb=v(cb);
var gb=j.scry
(cb.parentNode,
'.fbTimelineCapsule')[
0];
if(!gb)
return;


if(eb===null){
wa(cb,db,fb);}else 

o.runOnceWhenSectionFullyLoaded
(wa.curry(cb,db,fb),
db,
eb);},




enableScrollLoadOnClick:function(cb,db,eb){
cb=v(cb);
g.listen(cb,'click',function(fb){
fb.preventDefault();
bb.enableScrollLoad
(cb,
db,
null,
eb);});},




expandSectionOnClick:function(cb,db){
g.listen(cb,'click',function(eb){
eb.preventDefault();
p.get(db).expand();});},



expandSubSectionsOnClick:function(cb,db){
g.listen(cb,'click',function(eb){
eb.preventDefault();
p.get(db).expandSubSections();});},




getNextSectionKey:function(cb){
for(var db=0;db<ja.length-1;db++)
if(ja[db]==cb){
while(db<ja.length-1&&
!ja[db+1])

db++;

return ja[db+1];}


var eb=p.get(cb);
if(!eb||!eb.parentKey)
return;

var fb=p.get(eb.parentKey);
if(!fb)
return;

for(var gb=0;gb<fb.subSections.length-1;gb++)
if(fb.subSections[gb].scrubberKey==cb)
return fb.subSections[gb+1].scrubberKey;},






hideSection:function(cb){
var db=p.get(cb);
db&&i.hide(db.node);

var eb=o.getCurrentScrubber();
if(eb){
var fb=
o.getCurrentScrubber().getNav(cb);
fb&&i.hide(fb);}


var gb=o.getCurrentStickyHeaderNav();
gb&&gb.removeTimePeriod(cb);

la[cb]=true;},


loadSectionOnClick:function(cb,db){
g.listen(cb,'click',function(eb){
eb.preventDefault();
p.get(db).load();});},



removeSection:function(cb){
for(var db in ja)
if(ja[db]==cb){
ja[db]=null;
break;}



p.remove(cb);
delete ia[cb];
if(cb in ma){
ma[cb].remove();
delete ma[cb];}


var eb=o.getCurrentStickyHeaderNav();
eb&&eb.removeTimePeriod(cb);

ka.push(cb);},


removeSectionParent:function(cb){
j.remove(v(cb).parentNode);},


navigateToSection:function(cb,db,eb){
qa.add_event("nav_"+cb);
db=!!db;
var fb=cb,
gb=p.get(cb);
if(!gb)

return;


if(!gb.loaded){



q.enable();


j.scry
(v('timeline_tab_content'),
'.fbTimelineShowOlderSections').
forEach(j.remove);}



if(!ia[cb]){

gb.node.style.minHeight=u.getViewportDimensions().y+'px';
var hb=h.subscribe
(n.SECTION_FULLY_LOADED,
function(pb,qb){
if(qb.scrubberKey===cb){
gb.node.style.minHeight='';
hb.unsubscribe();}});




fb=gb.parentKey;
var ib=p.get(fb).node;
if(!i.hasClass(ib,'fbTimelineSectionExpanded')){
k.scrollTo(ib,0);
i.addClass(ib,'fbTimelineSectionExpanded');
j.scry(ib,'.fbTimelineCapsule').forEach(j.remove);
j.scry(ib,'div.fbTimelineSectionExpandPager').
forEach(j.remove);
j.scry(ib,'div.fbTimelineContentHeader').forEach(j.remove);
j.scry
(ib,
"._5vf").
forEach(function(pb){
if(!pb.getAttribute('data-subsection'))
j.remove(pb);});}





var jb=bb.getNextSectionKey(fb);
if(jb&&ma[jb])
ma[jb].setBuffer(0);}


for(var kb=0;kb<ja.length;kb++){




var lb=ja[kb];
if(!lb)
continue;

if(lb==fb)
break;

p.get(lb).deactivateScrollLoad();

j.scry
(v('timeline_tab_content'),
'.fbTimelineSectionExpandPager').
forEach(function(pb){
var qb=m.getInstance(pb.id);
qb&&qb.removeOnVisible();});}


bb.adjustContentPadding();

gb.load(eb);
ya();

var mb=u.getScrollPosition().x,
nb=u.getElementPosition(gb.node).y;

if(!db){
var ob=ia[cb]?
n.SCROLL_TO_OFFSET:
n.SUBSECTION_SCROLL_TO_OFFSET;
k.scrollTo
(new u(mb,nb-ob,'document'),
true,
false,
false,



function(){

var pb=u.getElementPosition(gb.node).y;
k.scrollTo
(new u(mb,pb-ob,'document'),
false);


var qb=j.scry(gb.node,'h3.uiHeaderTitle')[0];
if(qb){
qb.tabIndex=0;
qb.focus();}});}},






adjustContentPadding:function(){
var cb=aa('timeline_tab_content');
if(!cb)
return;

var db=o.getCurrentKey()||r.TIMELINE_KEY;
if(db!==r.TIMELINE_KEY)
return;




var eb=ja.length-1,
fb=
p.get(ja[eb]);
cb.style.paddingBottom=
fb&&fb.loaded?
null:
u.getViewportDimensions().y-
bb.CURRENT_SECTION_OFFSET-
bb.HEADER_SCROLL_CUTOFF-
bb.FOOTER_HEIGHT+
'px';},


adjustContentPaddingAfterLoad:function(cb,db){
o.runOnceWhenSectionFullyLoaded
(bb.adjustContentPadding,
cb,
db);},



appendContentAfterLoad:function(cb,db,eb){
o.runOnceWhenSectionFullyLoaded
(j.appendContent.curry(v(cb),db),
eb,
'0');},



markSectionAsLoaded:function(cb,db,eb){
o.runOnceWhenSectionFullyLoaded
(function(){
aa(cb)&&
i.removeClass(v(cb).parentNode,'fbTimelineSectionLoading');},

db,
eb);},



suppressSectionsAbove:function(cb){
var db,
eb;
for(var fb=0;fb<ja.length;fb++){
var gb=ja[fb];
if(!gb)
continue;

db=p.get(gb).node;
eb=null;

if(x(cb.parentNode.children).indexOf(cb)<=
x
(db.parentNode.children).indexOf(db)){
eb=gb;
break;}

p.get(gb).deactivateScrollLoad();}

if(eb)

bb.navigateToSection(eb,true);},



forceNoFriendActivity:function(){
ra=true;},


removeDupes:function(cb){
var db=aa(cb);
if(!db)
return;

var eb=j.scry(db,'li.fbTimelineUnit'),
fb={};
for(var gb=0;gb<eb.length;gb++){
var hb=eb[gb];
if(hb.id&&ba(hb.id,'tl_unit_')){
var ib=hb.id.substring(8,hb.id.length),
jb=
(hb.getAttribute('data-unit')=='ExperienceSummaryUnit'?
hb.getAttribute('data-time'):
1);
if(fb.hasOwnProperty(ib)&&fb[ib]==jb){


j.remove(hb);}else 

fb[ib]=jb;}}},





removeLoadingState:function(cb){
aa(cb)&&
i.removeClass(v(cb),'fbTimelineSectionLoading');},


setExpandLoadDataForSection:function(cb,db){
var eb=p.get(cb);
eb&&eb.setExpandLoadData(db);},


updatePagerAfterLoad:
function(cb,
db,
eb,
fb,
gb){





var hb=m.getInstance(cb.firstChild.id);
if(!hb){
oa[cb.firstChild.id]=h.subscribe
(m.REGISTERED,
function(ib,jb){
oa[cb.firstChild.id].unsubscribe();
delete oa[cb.firstChild.id];
if(jb.id===cb.firstChild.id)
bb.updatePagerAfterLoad
(cb,db,eb,fb,gb);});




return;}


o.runOnceWhenSectionFullyLoaded
(function(){
i.removeClass(cb,'fbTimelineHiddenPager');
hb.checkBuffer();},

eb,
fb);


if(gb)
o.runOnceWhenSectionFullyLoaded
(o.adjustScrollingPagerBuffer.curry
(cb.firstChild.id,db),

eb,
fb);},




showAfterLoad:function(cb,db,eb){
o.runOnceWhenSectionFullyLoaded
(function(){
var fb=aa(cb);
fb&&i.show(fb);},

db,
eb);},



repositionDialog:function(cb){
h.subscribe
(n.SECTION_LOADED,
function(){
cb.updatePosition();});},




rightColumnFinished:function(cb){
var db=p.get(cb);
db.rightColumnFinished=true;}};



e.exports=bb;});

/** js/profile/timeline/modules/TimelineLogging.js */
__d("TimelineLogging",["TimelineController","reportData"],function(a,b,c,d,e,f){



var g=b('TimelineController'),

h=b('reportData'),

i=false,
j=0,
k=null,

l=
{init:function(m){
if(i)
return;


j=m;

g.register
(g.LOGGING,
this);},



reset:function(){
i=false;
j=0;
k=null;},


log:function(m,n){
n.profile_id=j;
h(m,{gt:n});},


logSectionChange:function(m,n){
var o={timeline_section_change:1,key:m};
if(k&&m==k){
o.timeline_scrubber=1;
k=null;}

l.log
('timeline',
o);},



logScrubberClick:function(m){
k=m;}};



e.exports=l;});

/** js/profile/timeline/modules/TimelineViewportTracking.js */
__d("TimelineViewportTracking",["Class","DOM","ViewportTracking","$","copyProperties"],function(a,b,c,d,e,f){









var g=b('Class'),
h=b('DOM'),
i=b('ViewportTracking'),

j=b('$'),
k=b('copyProperties'),

l=55;

function m(){
this.parent.construct(this);}


g.extend(m,i);

k(m.prototype,


{getDataFromConfig:function(n){
this.timeout=n.record_delay;},


getTimeout:function(){
return this.timeout;},





getAllStories:function(){
return h.scry(j('timeline_tab_content'),'.timelineUnitContainer');},






getStoryID:function(n){
var o=JSON.parse(n.getAttribute('data-gt'));
return o&&o.contentid;},





getDataToLog:function(n){
var o={evt:l,
timelineviewporttracking:true};
return {gt:o};}});



e.exports.init=function(n){
(new m()).init(n);};});

/** js/profile/timeline/timeline_cover.js */
__d("legacy:TimelineCover",["TimelineCover"],function(a,b,c,d){



a.TimelineCover=b('TimelineCover');},

3);

/** js/stream/OnlyMeUI.js */
__d("OnlyMeUI",["AudienceSelector","Arbiter","CSS","DOM","Parent","PrivacyConst","Selector","$","tx"],function(a,b,c,d,e,f){





var g=b('AudienceSelector'),
h=b('Arbiter'),
i=b('CSS'),
j=b('DOM'),
k=b('Parent'),
l=b('PrivacyConst'),
m=b('Selector'),

n=b('$'),
o=b('tx');

function p(){

return [j.create('div',{className:'onlyMeBorder'}),
j.create('div',{className:'onlyMeBorder onlyMeBorderBottom'})];}



function q(){
return j.create
('img',

{alt:' ',
className:'onlyMePrivacyCorner',
height:34,
src:'/images/profile/timeline/privacy_corner.png',
width:34});}




function r(x){
var y=j.scry(x,'.photoUnit a.photo');

return y.filter(function(z){
return !j.scry(z,'.onlyMePrivacyCorner').length;});}



function s(x,y){


if(g.hasTags(u(y)))
return;



if(i.hasClass(x,'storyContent'))
if(!k.byClass(x,'onlyMeWrap')){
var z=j.create('div',{className:'onlyMeWrap'});
j.appendContent(k.byClass(x,'uiStreamStory'),z);
j.appendContent(z,x);
x=z;}else 

x=k.byClass(x,'onlyMeWrap');



i.addClass(x,'storyOnlyMe');

if(!i.hasClass(x,'timelineRecentActivityStory'))
j.setContent
(j.find(y,'span.uiButtonText'),
"Only Me");




if(!i.hasClass(x,'storyContent')){
var aa=r(x);
for(var ba=0,ca=aa.length;ba<ca;++ba)
j.appendContent(aa[ba],q());}



if(!j.scry(x,'div.onlyMeBorder').length){
var da=p();
j.prependContent(x,da[0]);
j.appendContent(x,da[1]);}}



function t(x){
if(!x)

return;

var y=k.byClass(x,'storyContent')||
k.byClass(x,'timelineRecentActivityStory')||
k.byClass(x,'timelineUnitContainer')||
k.byClass(x,'fbTimelineTwoColumn');

if(!y){
y=j.scry(x,'^.permalink_stream .storyContent');
y=y.length&&y[0];}else
if(i.hasClass(y,'fbTimelineComposerUnit'))


return null;


return y;}


function u(x){
var y=j.scry(x,'*[data-oid]');
if(y.length===0)
return '';

return y[0].getAttribute('data-oid');}


var v=false,

w=

{init:function(){
if(v)
return;


v=true;

h.subscribe('AudienceSelector/changed',function(x,y){
var z=t(y.selector)||
t(y.clone);
if(!z)
return;


if(m.getOptionValue(y.option)==l.BaseValue.SELF){
s(z,y.selector);}else{


z=i.hasClass(z,'storyContent')?
k.byClass(z,'onlyMeWrap'):z;
z&&i.removeClass(z,'storyOnlyMe');}});},




setOnlyMe:function(x){
if(v)
return;


w.init();

x=
j.find(k.byClass(n(x),'uiSelector'),'a.uiSelectorButton');
var y=t(x);
y&&s(y,x);}};




e.exports=w;});

/** js/ui/xhp/menu/SubMenu.js */
__d("SubMenu",["Event","Arbiter","copyProperties","CSS"],function(a,b,c,d,e,f){




var g=b('Event'),

h=b('Arbiter'),
i=b('copyProperties'),
j=b('CSS');

function k(){
}

i(k.prototype,

{_subMenu:null,
_mainMenu:null,
_forward:null,
_backward:null,

init:function(l,m,n,o){
this._subMenu=l;
this._mainMenu=m;
this._forward=n;
this._backward=o;

h.subscribe('SubMenu/Reset',this._goToMainMenu.bind(this));

g.listen(n,'click',this._goToSubMenu.bind(this));
g.listen(o,'click',this._goToMainMenu.bind(this));},


initAsyncChildMenu:function(l){
g.listen(this._forward,'click',function(){
this._goToSubMenu();
l.load();}.
bind(this));},


_goToMainMenu:function(){
j.hide(this._subMenu);
j.show(this._mainMenu);},


_goToSubMenu:function(){
j.hide(this._mainMenu);
j.show(this._subMenu);}});



e.exports=k;});

/** js/ui/xhp/menu/SubMenuLegacy.js */
__d("legacy:ui-submenu",["SubMenu"],function(a,b,c,d){



a.SubMenu=b('SubMenu');},

3);

/** js/ui/xhp/menu/asyncmenu.js */
__d("AsyncMenu",["AsyncRequest","copyProperties","emptyFunction"],function(a,b,c,d,e,f){



var g=b('AsyncRequest'),

h=b('copyProperties'),
i=b('emptyFunction');

function j(k,l){
this._uri=k;
this._elem=l;}


h(j.prototype,

{_uri:null,
_elem:null,

load:function(){
this.load=i;
g.bootstrap(this._uri,this._elem);}});



e.exports=j;});
