/*!CK:2996788792!*//*1403491361,*/ if (self.CavalryLogger) { CavalryLogger.start_js(["yIcQG"]); } __d("PrivacyRemindersLoggingTypes",[],function(a,b,c,d,e,f){e.exports={ONLY_ME_IMPRESSION:"only_me_impression",ONLY_ME_CONVERSION:"only_me_conversion",EVERYONE_IMPRESSION:"everyone_impression",EVERYONE_CONVERSION:"everyone_conversion",EVERYONE_TESTS_IMPRESSION:"everyone_tests_impression",EVERYONE_TESTS_CONVERSION:"everyone_tests_conversion",PUBLIC_POSTING_FILTER_NUX_IMPRESSION:"public_posting_filter_nux_impression",PUBLIC_POSTING_FILTER_NUX_CONVERSION:"public_posting_filter_nux_conversion",DELTA_EVERYONE_IMPRESSION:"delta_everyone_impression",DELTA_EVERYONE_CONVERSION:"delta_everyone_conversion",DELTA_EVERYONE_OK_BUTTON_CLICKED:"delta_everyone_ok_button_clicked",DELTA_EVERYONE_CHANGE_BUTTON_CLICKED:"delta_everyone_change_button_clicked"};},null); __d("ComposerXAttachmentButtonBarState",["CSS","DOMQuery","csx","cx"],function(a,b,c,d,e,f,g,h,i,j){var k={trackCityChanges:function(l){var m=l.getComponent('citysharericon');if(m)return m.instance.subscribe('change',function(){k.updateMessageBoxBarState(l);});},updateMessageBoxBarState:function(l){var m=l.getComponent('citysharericon');if(m){var n=h.find(l.getRoot(),"._1dsp");g.conditionClass(n,"_icv",!!m.instance.getValue());}}};e.exports=k;},null); __d("ComposerXAttachmentUtils",["CSS","DataStore","DOMQuery","Focus","Input","PageTransitions","Run","StickyPlaceholderInput","tx"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){var p='composer_fixed_placeholder';function q(t,u){if(!h.get(t.element,p,false))t.instance.setPlaceholder(u);}function r(t,u){var v=l.getMostRecentURI(),w=l.getNextURI(),x=v.getQueryData().hasOwnProperty('theater')&&u.path===w.path;if(x||w.getQueryData().hasOwnProperty('theater')){m.onAfterLoad(function(){m.onBeforeUnload(function(){return r(t,u);});});return;}if(a.Dialog&&a.Dialog.getCurrent())return;if(t.offsetParent!==null&&!k.isEmpty(t))return "You haven't finished your post yet. Do you want to leave without finishing?";}var s={initMentions:function(t,u){q(t,u);var v=i.find(t.element,'textarea.input');j.set(v);},setStickyPlaceholderForMentions:function(t,u){if(i.contains(t.element,document.activeElement)&&g.hasClass(document.activeElement,'DOMControl_placeholder'))document.activeElement.blur();q(t,u);},setPlaceholderIsFixed:function(t,u){h.set(t.element,p,!!u);},setStickyPlaceholderForTypeahead:function(t,u){var v=i.find(t,'.textInput');n.setPlaceholderText(v,u);},registerInputForLeaveWarning:function(t){var u=l.getNextURI();m.onBeforeUnload(function(){return r(t,u);});}};e.exports=s;},null); __d("DialogExpansion",["Animation","DialogPosition","LoadingDialogDimensions","Style"],function(a,b,c,d,e,f,g,h,i,j){var k=i.WIDTH,l=i.HEIGHT,m=400,n=100;function o(p){"use strict";this._dialog=p;this._fixedTopMargin=p.getFixedTopPosition();}o.prototype.enable=function(){"use strict";this._subscription=this._dialog.subscribe('aftershow',this._onAfterShow.bind(this));};o.prototype.disable=function(){"use strict";this._subscription.unsubscribe();this._subscription=null;};o.prototype.setTargetWidth=function(p){"use strict";this._targetWidth=p;};o.prototype._onAfterShow=function(){"use strict";this._outer=this._dialog.getContentRoot();this._inner=this._dialog.getInnerContent();var p=parseInt(this._dialog.getWidth(),10);if(this._targetWidth)p=this._targetWidth;var q=parseInt(j.get(this._inner,'height'),10);if(isNaN(q))return;var r=h.calculateTopMargin(k,l),s;if(this._fixedTopMargin){s=this._fixedTopMargin;}else s=h.calculateTopMargin(p,q);j.apply(this._outer,{width:k+'px',height:l+'px',marginTop:r+'px',overflow:'hidden'});j.set(this._inner,'opacity','0');setTimeout(this._growThenFade.bind(this,p,q,s),100);};o.prototype._growThenFade=function(p,q,r){"use strict";new g(this._outer).to('width',p).to('height',q).to('marginTop',r).duration(m).ease(g.ease.both).ondone(this._fadeIn.bind(this)).go();};o.prototype._fadeIn=function(){"use strict";j.set(this._outer,'overflow','');j.set(this._outer,'height','');new g(this._inner).from('opacity',0).to('opacity',1).duration(n).go();};e.exports=o;},null); __d("XPrivacyAudienceAlignmentLoggingControllerURIBuilder",["XControllerURIBuilder"],function(a,b,c,d,e,f,g){e.exports=g.create("\/privacy\/audience_alignment\/log\/",{client_time:{type:"Int"},event:{type:"Enum",required:true},product:{type:"Enum",required:true}});},null); __d("AudienceAlignment",["Arbiter","AsyncRequest","AudienceSelector","ComposerXStore","ContextualDialog","CSS","cx","DialogExpansion","DOM","Event","Focus","Keys","ModalMask","PrivacyConst","SelectorDeprecated","Style","XPrivacyAudienceAlignmentLoggingControllerURIBuilder"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w){var x=false,y,z;function aa(va,wa){va.setContext(wa);va.show();}function ba(va,wa){var xa=v.get(wa.getContentRoot(),'margin-top');va.setWidth(this.aaa_dialog_width);va.show();v.set(va.getContentRoot(),'margin-top',xa);}var ca='wwwtux',da='exposed',ea='friends_sticky',fa='public_sticky',ga='selector',ha='holdout',ia='dismissal',ja='learn_more',ka='blur';function la(event){var va=new w().setEnum('product',ca).setEnum('event',event).setInt('client_time',Date.now()).getURI(),wa=new h().setURI(va);wa.send();}function ma(va,wa,xa,ya){if(x)return false;if(!o.contains(document.body,va.getRoot()))return false;var za=j.get(wa,'maininput');if(za&&za.instance.getValue())return false;if(!xa)return false;var ab=null;if(ya){ab=ya.getSelectedBaseValue();}else ab=parseInt(u.getValue(xa),10);return (ab===t.BaseValue.EVERYONE);}function na(){var va=o.scry(document.body,'#pagelet_timeline_recent');if(va.length>=1){var wa=o.scry(va[0],'li.fbTimelineComposerCapsule');if(wa.length>=1)return wa[0];}return null;}function oa(va,wa,xa,ya){var za;if(ya){za=ya.getMenuElement();}else{var ab=o.find(xa,'div.audienceSelector');za=o.scry(ab,'div.wrap');}if(za.length<1)return;var bb=na(),cb;if(ya){ya.subscribeOnce('open',function(){if(bb)l.addClass(bb,"_2wc-");k.setContext(wa,za);wa.setOffsetY(30);wa.show();});}else cb=u.listen(ab,'open',function(){var fb=o.scry(za[0],'div.uiSelectorMenuWrapper');if(fb.length>0){if(bb)l.addClass(bb,"_2wc-");k.setContext(wa,fb[0]);wa.setOffsetX(12);wa.show();}else s.hide();u.unsubscribe(cb);});if(ya){ya.getPopover().subscribeOnce('hide',function(){pa(wa,za,bb,va);});}else var db=u.listen(ab,'close',function(){pa(wa,za[0],bb,va);u.unsubscribe(db);});if(ya){l.addClass(za,"_35mn");var eb=ya.getTriggerButtonElement();l.addClass(eb,"_35mn");}else l.addClass(za[0],"_35mn");setTimeout(function(){s.show();v.set(s.getNode(),'opacity','0.3');v.set(s.getNode(),'background-color','rgb(0,0,0)');if(ya){ya.openSelectorExpanded();}else u.toggle(ab);},20);}function pa(va,wa,xa,ya){s.hide();va.hide();l.removeClass(wa,"_35mn");if(xa)l.removeClass(xa,"_2wc-");q.set(o.find(ya.getRoot(),'textarea.input'));}function qa(va,wa){va.unsubscribe(y);va.hide();q.set(o.find(wa.getRoot(),'textarea.input'));}function ra(va){var wa=ta(va);return wa&&wa.element;}function sa(va){var wa=ta(va);return wa&&wa.instance&&wa.instance.getInstance().getInstance();}function ta(va){return j.get(va,'mainprivacywidget');}var ua={abort:function(){x=true;},startOnComposerFocus:function(va,wa,xa,ya,za,ab,bb,cb,db,eb,fb,gb,hb,ib,jb,kb){g.subscribe('composer/focus',function(){var lb=ra(kb),mb=sa(kb);if(ma(wa,kb,lb,mb))if(va){la(ha);}else{la(da);setTimeout(function(){xa.show();var nb=fb.parentElement;this.aaa_dialog_width=xa.getWidth()+nb.offsetWidth-490;var ob=new n(xa);ob.setTargetWidth(this.aaa_dialog_width);ob._onAfterShow();q.set(xa.getRoot());},100);}});p.listen(eb,'click',function(){var lb=ra(kb),mb=sa(kb);qa(xa,wa);if(mb){mb.selectOption(t.PostParam.FRIENDS);}else i.setAudience(wa.getRoot(),t.BaseValue.ALL_FRIENDS);aa(ya,lb);la(ea);});p.listen(fb,'click',function(){var lb=ra(kb),mb=sa(kb);qa(xa,wa);if(mb){mb.selectOption(t.PostParam.EVERYONE);}else i.setAudience(wa.getRoot(),t.BaseValue.EVERYONE);aa(za,lb);la(fa);});p.listen(gb,'click',function(){xa.subscribe('hide',function(){var lb=ra(kb),mb=sa(kb);if(ab)oa(wa,ab,lb,mb);});qa(xa,wa);la(ga);});p.listen(hb,'click',function(){var lb=ra(kb);qa(xa,wa);la(ia);if(bb)aa(bb,lb);});y=xa.subscribe('hide',function(){var lb=ra(kb);q.set(o.find(wa.getRoot(),'textarea.input'));la(ia);if(cb)aa(cb,lb);});z=xa.subscribe('blur',function(){la(ka);});p.listen(ib,'click',function(event){ba(db,xa);la(ja);});p.listen(jb,'click',function(event){db.hide();});p.listen(db.getRoot(),'keydown',function(event){if(p.getKeyCode(event)===r.ESC){db.hide();p.kill(event);}});}};e.exports=ua;},null); __d("PagesComposerEntryLogger",["Event","PagesBanzaiLogger"],function(a,b,c,d,e,f,g,h){function i(j){"use strict";this.$PagesComposerEntryLogger0=j;}i.prototype.registerForContentEntryEvents=function(j){"use strict";var k=function(){var l={page_id:this.$PagesComposerEntryLogger0,event_name:'composer_content_entry',pages_composer:1,target_id:this.$PagesComposerEntryLogger0};h.logData(l,h.VITAL_WAIT);this.unregister();};this.$PagesComposerEntryLogger1=g.listen(j,{paste:k.bind(this),keydown:k.bind(this)});};i.prototype.unregister=function(){"use strict";if(!this.$PagesComposerEntryLogger1)return;for(var event in this.$PagesComposerEntryLogger1)this.$PagesComposerEntryLogger1[event].remove();this.$PagesComposerEntryLogger1=null;};e.exports=i;},null); __d("XPrivacyRemindersImpressionLoggingControllerURIBuilder",["XControllerURIBuilder"],function(a,b,c,d,e,f,g){e.exports=g.create("\/privacy\/reminders\/log_imp\/",{type:{type:"String",required:true}});},null); __d("ComposerXBootloadStatusAttachment",["Arbiter","AsyncRequest","AudienceAlignment","Bootloader","ComposerXAttachment","ComposerXAttachmentButtonBarState","ComposerXController","ComposerXDragDrop","ComposerXMarauderLogger","ComposerXNUX","ComposerXStore","CSS","DOM","DOMQuery","Event","Focus","PagesComposerEntryLogger","Parent","PlaceholderListener","PrivacyConst","PrivacyRemindersLoggingTypes","SelectorDeprecated","URI","copyProperties","csx","cx","getActiveElement","requestAnimationFrame","XPrivacyRemindersDismissControllerURIBuilder","XPrivacyRemindersImpressionLoggingControllerURIBuilder"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,ba,ca,da,ea,fa,ga,ha,ia,ja){var ka={only_me:{PRIVACY_CONSTANT:[z.BaseValue.SELF],LOG_IMPRESSION:aa.ONLY_ME_IMPRESSION,LOG_CONVERSION:aa.ONLY_ME_CONVERSION},everyone:{PRIVACY_CONSTANT:[z.BaseValue.EVERYONE],LOG_IMPRESSION:aa.EVERYONE_IMPRESSION,LOG_CONVERSION:aa.EVERYONE_CONVERSION,LOG_IMPRESSION_TO_DISMISS_ENDPOINT:true},delta_everyone:{PRIVACY_CONSTANT:[z.BaseValue.EVERYONE],LOG_IMPRESSION:aa.DELTA_EVERYONE_IMPRESSION,LOG_CONVERSION:aa.DELTA_EVERYONE_CONVERSION,LOG_IMPRESSION_TO_DISMISS_ENDPOINT:true},everyone_tests:{PRIVACY_CONSTANT:[z.BaseValue.EVERYONE],LOG_IMPRESSION:aa.EVERYONE_TESTS_IMPRESSION,LOG_CONVERSION:aa.EVERYONE_TESTS_CONVERSION,LOG_IMPRESSION_TO_DISMISS_ENDPOINT:true},public_posting_filter_nux:{PRIVACY_CONSTANT:[z.BaseValue.EVERYONE],LOG_IMPRESSION:aa.PUBLIC_POSTING_FILTER_NUX_IMPRESSION,LOG_CONVERSION:aa.PUBLIC_POSTING_FILTER_NUX_CONVERSION,LOG_IMPRESSION_TO_DISMISS_ENDPOINT:true}},la={};for(var ma in k)if(k.hasOwnProperty(ma))oa[ma]=k[ma];var na=k===null?null:k.prototype;oa.prototype=Object.create(na);oa.prototype.constructor=oa;oa.__superConstructor__=k;function oa(pa,qa){"use strict";k.call(this);this._root=pa;this._config=qa;this._privacyReminders={};this._onSelectorChange=this._onSelectorChange.bind(this);}oa.prototype.getRoot=function(){"use strict";return this._root;};oa.prototype.initWithComponents=function(pa){"use strict";la[this._composerID]=this;this._attachmentIsActive=true;var qa=t.find(this.getComponent('maininput').element,'textarea.input'),ra=t.scry(x.byClass(this.getRoot(),"_119"),'li.'+this.attachmentClassName)[0];this._focusListener=u.listen(qa,'focus',this._onFocus.bind(this));if(pa&&this._config.targetIsPage){this._pagesComposerEntryLogger=new w(this._config.targetID);this._pagesComposerEntryLogger.registerForContentEntryEvents(qa);}if(this._fullVersion){this._fullInitWithComponents();}else if(!this._bootloading)if(t.contains(this._root,ga())){this._onFocus();}else if(ra)this._clickListener=u.listen(ra,'click',function(){v.set(qa);}.bind(this));this._dragEnterHandler=g.subscribe('dragenter',function(wa,xa){if(xa.element==this._root){i.abort();var ya=xa.event.dataTransfer.items,za;if(ya)za=n.filterImages(ya);if(za&&za.length>0){v.set(qa);}else{var ab=x.byClass(this._root,'focus_target');y.expandInput(ab);this._onFocus();}}}.bind(this));this.getComponent('maininput').instance.setPlaceholder(this._config.mentionsPlaceholder);if(!pa)v.set(qa);var sa=this.getComponent('prompt_selector');if(sa)sa.instance.registerInput(this.getComponent('maininput'),this._config.mentionsPlaceholder);if(this._config.plus_version){this._dragdrop=new n(this._root,this._composerID,this._config.targetID);this._dragdrop.enableURLDropping();}var ta=this.getComponent('mainprivacywidget');this._privacyWidgetElement=ta.element;this._newPrivacyWidgetInstance=ta.instance&&ta.instance.getInstance().getInstance();if(this._newPrivacyWidgetInstance){var ua=this.getComponent('maininput').instance&&this.getComponent('maininput').instance.getMentions(),va=this.getComponent('tagExpansionButton');(va&&va.instance)&&va.instance.listenToPrivacy(this._newPrivacyWidgetInstance,ua);}if(this._config.postActionsButton!=null)this._config.postActionsButton.initHiddenInputs(this.getComponent('pabhiddeninputs').instance);};oa.prototype._fullInitWithComponents=function(pa){"use strict";if(pa&&pa.show_tag_expansion_reminder){j.loadModules(["ComposerXPrivacyWidgetTags","URLScraper","URI","ComposerTagReminder"],this._bootloadModules.bind(this));}else j.loadModules(["ComposerXPrivacyWidgetTags","URLScraper","URI"],this._bootloadModules.bind(this));Object.keys(this._privacyReminders).forEach(this._showPrivacyReminder,this);if(this._setEveryonePrivacyImpression)this._showPrivacyReminder('everyone');if(this._privacyReminders.delta_everyone&&this._privacyReminders.delta_everyone.dialog){var qa=this._privacyReminders.delta_everyone.dialog.getContent();if(qa){var ra=t.scry(qa,'.photoText')[0],sa=t.scry(qa,'.postText')[0];g.subscribe('multi-upload/images-added',function(){ra&&r.show(ra);sa&&r.hide(sa);}.bind(this));g.subscribe('multi-upload/all-images-removed',function(){ra&&r.hide(ra);sa&&r.show(sa);}.bind(this));}}if(this._newPrivacyWidgetInstance){this._newPrivacyWidgetInstance.subscribe('changed',this._onSelectorChange);}else ba.subscribe('select',this._onSelectorChange);};oa.prototype._bootloadModules=function(pa,qa,ra,sa){"use strict";this._tagger.init(this);this._privacyWidgetTags=new pa(this);if(sa){this._tagExpansionReminder=new sa(this._root);this._tagExpansionReminder.listen();}l.trackCityChanges(this);var ta=t.find(this.getComponent('maininput').element,'textarea.input');if(!this._scraper){this._scraper=new qa(ta);this._scraper.subscribe('match',function(ua,va){var wa=this._getScraperEndpoint();wa.addQueryData({scrape_url:encodeURIComponent(va.url),remove_url:this._config.remove_url,attachment_class:this._config.classname});m.getAttachment(this._root,wa.toString());}.bind(this));}this._scraper.enable();this._scraper.check();};oa.prototype._showPrivacyReminder=function(pa){"use strict";var qa=this,ra=this._privacyReminders[pa],sa=ka[pa],ta=null;if(this._newPrivacyWidgetInstance){ta=this._newPrivacyWidgetInstance.getSelectedBaseValue();}else ta=parseInt(ba.getValue(this._privacyWidgetElement),10);if(!ra||!ra.dialog||ra.shown){if(ta===z.BaseValue.EVERYONE&&this._setEveryonePrivacyImpression){this._sendSetEveryonePrivacyImpression();this._setEveryonePrivacyImpression=false;}return;}if(sa.PRIVACY_CONSTANT.indexOf(ta)===-1)return;ra.dialog.setContext(this._privacyWidgetElement).show();ra.shown=true;this._privacyReminderShown=true;if(sa.LOG_IMPRESSION){var ua=(new ja()).setString('type',sa.LOG_IMPRESSION).getURI();new h(ua).send();}if(sa.LOG_IMPRESSION_TO_DISMISS_ENDPOINT)if(pa==='delta_everyone'||pa==='only_me'){var va=(new ia()).setString('type',pa).getURI();new h(va).send();}else new h('/ajax/privacy/reminders/dismiss').setData({type:pa,dismiss_type:'impression'}).send();var wa=function(event){var xa=r.hasClass(event.target,'layerConfirm')||t.scry(event.target,'^.layerConfirm').length===1,ya=r.hasClass(event.target,'layerButton')||t.scry(event.target,'^.layerButton').length===1;if(xa&&pa!=='public_posting_filter_nux'){if(pa==='delta_everyone'||pa==='only_me'){var za=(new ja()).setString('type',aa.DELTA_EVERYONE_OK_BUTTON_CLICKED).getURI();new h(za).send();}return;}if(pa==='delta_everyone'||pa==='only_me'){var ab=(new ia()).setString('type',pa).getURI();new h(ab).send();}else new h('/ajax/privacy/reminders/dismiss').setData({type:pa,hide:ya}).send();ra.events.forEach(function(cb){cb.remove();});ra.events=[];ra.dialog.hide();this._privacyReminderShown=false;if(ya){ha(function(){if(this._newPrivacyWidgetInstance){this._newPrivacyWidgetInstance.openSelector();}else ba.toggle(t.scry(qa.getComponent('mainprivacywidget').element,'.uiSelector')[0]);}.bind(this));if(pa==='delta_everyone'){var bb=(new ja()).setString('type',aa.DELTA_EVERYONE_CHANGE_BUTTON_CLICKED).getURI();new h(bb).send();}}}.bind(this);if(this._newPrivacyWidgetInstance){ra.conversionListener=this._newPrivacyWidgetInstance.subscribe('changed',function(xa,ya){var za=this._newPrivacyWidgetInstance.getSelectedBaseValue();this._logPrivacyReminderConversion(ra,sa,za);}.bind(this));}else ra.conversionListener=ba.subscribe('select',function(xa,ya){if(ya.selector==this._privacyWidgetElement.firstChild){var za=parseInt(ba.getValue(ya.option),10);this._logPrivacyReminderConversion(ra,sa,za);}}.bind(this));ra.events=[u.listen(ra.dialog.getContent(),'click',wa),u.listen(ra.dialog.getContext(),'click',wa)];};oa.prototype._logPrivacyReminderConversion=function(pa,qa,ra){"use strict";if(qa.PRIVACY_CONSTANT.indexOf(ra)===-1){if(qa.LOG_CONVERSION){var sa=(new ja()).setString('type',qa.LOG_CONVERSION).getURI();new h(sa).send();}if(this._newPrivacyWidgetInstance){this._newPrivacyWidgetInstance.unsubscribe(pa.conversionListener);}else ba.unsubscribe(pa.conversionListener);pa.conversionListener=null;}};oa.prototype._onSelectorChange=function(pa,qa){"use strict";if(!this.getComponent('mainprivacywidget'))return;if(this._newPrivacyWidgetInstance||(qa.selector===this._privacyWidgetElement.firstChild))setTimeout(function(){Object.keys(this._privacyReminders).forEach(this._showPrivacyReminder,this);}.bind(this));};oa.prototype.cleanup=function(){"use strict";this._attachmentIsActive=false;if(this._focusListener){this._focusListener.remove();this._focusListener=null;}if(this._clickListener){this._clickListener.remove();this._clickListener=null;}Object.keys(ka).forEach(function(pa){var qa=this._privacyReminders[pa];if(qa&&qa.dialog&&qa.shown){qa.dialog.hide();qa.events.forEach(function(ra){ra.remove();});qa.events=[];if(qa.conversionListener)if(this._newPrivacyWidgetInstance){this._newPrivacyWidgetInstance.unsubscribe(qa.conversionListener);}else ba.unsubscribe(qa.conversionListener);qa.conversionListener=null;}}.bind(this));if(this._dragdrop){this._dragdrop.deactivate();this._dragdrop=null;}if(this._fullVersion){this._tagger.cleanup();this._privacyWidgetTags.destroy();this._privacyWidgetTags=null;this._scraper.disable();}if(this._dragEnterHandler){this._dragEnterHandler.unsubscribe();this._dragEnterHandler=null;}if(this._pagesComposerEntryLogger)this._pagesComposerEntryLogger.unregister();};oa.prototype.reset=function(){"use strict";var pa=x.byClass(this._root,"child_was_focused");if(pa)r.removeClass(pa,"child_was_focused");if(this._tagger)this._tagger.reset();if(this._newPrivacyWidgetInstance)this._newPrivacyWidgetInstance.informTagsChanged([]);this.getComponent('maininput').instance.setPlaceholder(this._config.mentionsPlaceholder);};oa.prototype.canSwitchAway=function(){"use strict";return !x.byClass(this._root,'async_saving');};oa.prototype.setBootloadedContent=function(pa){"use strict";this._setEveryonePrivacyImpression=!!pa.set_everyone_privacy_impression;Object.keys(ka).forEach(function(ra){var sa=pa[ra+'_privacy_reminder'];if(sa)this._privacyReminders[ra]={dialog:sa};}.bind(this));var qa=pa.placeholders.map(function(ra){return ra.component_name;});q.waitForComponents(this._composerID,qa,function(){var ra=t.find(this._root,"._3-6"),sa=t.find(this._root,"._3-7");s.setContent(ra,pa.markup.tagger_content);s.setContent(sa,pa.markup.tagger_icons);m.addPlaceholders(this._root,this,pa.placeholders);this._tagger=pa.tagger;l.updateMessageBoxBarState(this);this._fullVersion=true;if(this._attachmentIsActive)this._fullInitWithComponents(pa);var ta=this.getComponent('maininput');if(!this._privacyReminderShown&&!ta.instance.hasAuxContent()&&this._config.newverbsNUXDialog){var ua=s.scry(this._root,"._4-jj");if(ua.length>0){p.onInit(this._config.newverbsNUXDialog,ua[0],p.OGCOMPOSER_NEWVERBS_NUX);this._newVerbsListener=u.listen(ua[0],'click',function(){p.acknowledgeDialog(p.OGCOMPOSER_NEWVERBS_NUX,this._config.newverbsNUXDialog);}.bind(this));}}}.bind(this));};oa.prototype._getScraperEndpoint=function(){"use strict";return ca('/ajax/composerx/attachment/link/scraper/');};oa.prototype._onFocus=function(){"use strict";o.logEntry(this._composerID,'status');if(this._fullVersion||this._bootloading)return;g.inform('composer/focus');g.inform('composer/render_pab_nux');m.getEndpoint(this._root,'/ajax/composerx/attachment/status/bootload/',true);this._bootloading=true;};oa.prototype.allowOGTagPreview=function(){"use strict";return true;};oa.prototype._sendSetEveryonePrivacyImpression=function(){"use strict";new h('/ajax/privacy/reminders/set_everyone_privacy_impression').send();};oa.setBootloadedContent=function(pa,qa){"use strict";var ra=la[pa];if(ra)ra.setBootloadedContent.call(ra,qa);};da(oa.prototype,{_attachmentIsActive:false,_bootloading:false,_fullVersion:false,_focusListener:null,_privacyWidgetTags:null,_scraper:null,_dragdrop:null,attachmentClassName:"_4j"});e.exports=oa;},null); __d("ComposerXMentionsInputReset",["DOMQuery","Input"],function(a,b,c,d,e,f,g,h){function i(j){var k=g.scry(j.element,'textarea.input')[0];j.instance.reset();h.reset(k);}e.exports=i;},null); __d("ComposerXOGTaggerIconReset",["CSS","cx"],function(a,b,c,d,e,f,g,h){function i(j){g.removeClass(j.element,"_4-jh");g.removeClass(j.element,"_509o");}e.exports=i;},null); __d("ComposerXPrivacyWidgetReset",["Arbiter"],function(a,b,c,d,e,f,g){function h(i){g.inform('Composer/changedtags',{withTags:[],mention:{},eventTag:false});}e.exports=h;},null); __d("htmlize",["htmlSpecialChars"],function(a,b,c,d,e,f,g){function h(i){return g(i).replace(/\r\n|[\r\n]/g,'
');}e.exports=h;},null); __d("MentionsInputMatchers",[],function(a,b,c,d,e,f){var g=['@','\\uff20'].join(''),h='.,+*?$|#{}()\\^\\-\\[\\]\\\\\/!%&\'"~=<>_:;\n\r',i='\\b[A-Z][^ A-Z'+h+']',j='([^'+g+h+']|['+h+'][^ '+h+'])',k='(?:^|\\s)(?:['+g+']('+j+'{0,20}))',l='(?:(?:^|[^#])('+i+'+)|'+k+')',m='(?:'+i+'{4,})',n='#\\uFF03',o={trigger:new RegExp('['+g+']$'),hashtagTrigger:new RegExp('['+n+']'),mainMatcher:new RegExp(k+'$'),autoMatcher:new RegExp(l+'$'),userMatcher:new RegExp(m+'$')};e.exports=o;},null); __d("MentionsInput",["Arbiter","ArbiterMixin","Bootloader","CSS","DataStore","DOM","Event","Input","InputSelection","Keys","MentionsInputMatchers","Parent","Style","TokenizeUtil","UserAgent","htmlize","mixin","removeFromArray","repeatString"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y){var z='\uFEFF',aa=new RegExp(z,'g'),ba=function(na){return na+z;},ca='\uFFFD',da=/@+\[[0-9]+\:([^\]]|\\\])*\]+/g,ea=/[\\\]:]/g;function fa(na,oa){return na.replace(oa,y(' ',oa.length));}function ga(na,oa){return na.substring(0,oa)+na.substring(oa+1);}function ha(na){var oa=na.lastIndexOf('>');if(oa>=0){var pa=na.indexOf(' ',oa);return pa>=0?na.substr(0,pa+1):na;}else return '';}function ia(na,oa,pa){var qa=pa.lastIndexOf('<',oa)>pa.lastIndexOf('>',oa);return qa?' ':' ';}var ja=w(h);for(var ka in ja)if(ja.hasOwnProperty(ka))ma[ka]=ja[ka];var la=ja===null?null:ja.prototype;ma.prototype=Object.create(la);ma.prototype.constructor=ma;ma.__superConstructor__=ja;function ma(na,oa,pa,qa,ra,sa){"use strict";k.set(na,'MentionsInput',this);this._root=na;this._typeahead=oa;this._input=pa;var ta=null,ua=this.init.bind(this,qa,ra,sa);try{ta=document.activeElement===this._input;}catch(va){}if(ta){setTimeout(ua,0);}else var wa=m.listen(this._input,'focus',function(){setTimeout(ua,0);wa.remove();});this._hasHashtags=qa.hashtags;this._autoSuggestPages=qa.autosuggest_pages;this._lastHighlighterHTML='';this._hashtags=[];}ma.prototype.init=function(na,oa,pa){"use strict";if(this._initialized)return;this._initialized=true;this._highlighter=l.find(this._root,'.highlighter');this._highlighterInner=this._highlighter.firstChild;this._highlighterContent=l.find(this._root,'.highlighterContent');this._hiddenInput=l.find(this._root,'.mentionsHidden');this._placeholder=this._input.getAttribute('placeholder')||'';this._metrics=pa;if(!this._hiddenInput.name){var qa=this._input.name;this._input.name=qa+'_text';this._hiddenInput.name=qa;}this._initEvents();this._initTypeahead();if(oa===null){this._setup();}else this.reset(oa);this.inform('init',null,g.BEHAVIOR_STATE);};ma.prototype._setup=function(){"use strict";this._mentioned={};this._orderedUIDs=[];this._numMentioned=0;this._filterData=null;this._highlighterContent&&l.empty(this._highlighterContent);this._highlighterAuxContent&&l.remove(this._highlighterAuxContent);this._highlighterAuxContent=null;n.setPlaceholder(this._input,this._placeholder);s.set(this._typeahead.getElement(),'height','auto');};ma.prototype.reset=function(na){"use strict";if(!this._initialized)return;this._setup();var oa=na&&na.value||'';this._value=oa;this._hiddenInput&&(this._hiddenInput.value=oa);if(this._input&&na)n.setValue(this._input,na.value);var pa=na&&na.mentions;if(pa&&pa.length){var qa=[];pa.forEach(function(ra){qa.push(ra.offset+ra.length);delete ra.offset;delete ra.length;this._addToken(ra);},this);qa.reverse().forEach(function(ra){oa=oa.substring(0,ra)+z+oa.substring(ra);});}n.setValue(this._input,oa);this._update();};ma.prototype.getValue=function(){"use strict";return this._getMarkedValue().replace(aa,'');};ma.prototype._getMarkedValue=function(){"use strict";return n.getValue(this._input);};ma.prototype.getRawValue=function(){"use strict";this._update();return n.getValue(this._hiddenInput);};ma.prototype.checkValue=function(){"use strict";var na=this._typeahead.getCore().getValue();if(q.trigger.exec(na)||na==='')this.inform('sessionEnd',{});};ma.prototype.getTypeahead=function(){"use strict";return this._typeahead;};ma.prototype._initEvents=function(){"use strict";var na=this._update.bind(this);m.listen(this._input,{input:na,keyup:na,change:na,blur:this._handleBlur.bind(this),focus:this._handleFocus.bind(this),keydown:this._handleKeydown.bind(this)});if(this._metrics){this._metrics.init(this._typeahead);this._metrics._reset();this._metrics.bindSessionStart(this._typeahead,'render',true);this._metrics.bindSessionEnd(this._typeahead.getView(),'select',true);this._metrics.bindSessionEnd(this,'sessionEnd',false);m.listen(this._input,'keyup',function(event){setTimeout(this.checkValue.bind(this),0);}.bind(this));}};ma.prototype._initTypeahead=function(){"use strict";this._typeahead.subscribe('select',function(sa,ta){var ua=ta.selected;this._addToken({uid:ua.uid,text:ua.text,type:ua.type,weakreference:ua.weak_reference});this.updateValue();}.bind(this));var na=this._input,oa=null;function pa(){if(oa===null){oa=n.getSubmitOnEnter(na);n.setSubmitOnEnter(na,false);}}function qa(){if(oa!==null){n.setSubmitOnEnter(na,oa);oa=null;}}this._typeahead.subscribe('reset',qa);this._typeahead.subscribe('render',pa);this._typeahead.subscribe('highlight',function(sa,ta){ta.index>=0?pa():qa();});this._typeahead.subscribe('query',function(){this._filterData=null;}.bind(this));var ra=this._typeahead.getCore();ra.suffix=z;this._handleFocus();};ma.prototype._handleBlur=function(){"use strict";if(this._filterToken){this._filterToken.remove();this._filterToken=null;}};ma.prototype._handleFocus=function(){"use strict";if(!this._filterToken)this._filterToken=this._typeahead.getData().addFilter(this._filterResults.bind(this));this._updateWidth();};ma.prototype._handleKeydown=function(event){"use strict";var na=event.keyCode;if(na==p.BACKSPACE||na==p.DELETE)this._handleBackspaceAndDelete(event,na);if(na==p.LEFT||na==p.RIGHT)setTimeout(this._handleLeftAndRight.bind(this,na),10);};ma.prototype._handleLeftAndRight=function(na){"use strict";var oa=this._getMarkedValue(),pa=o.get(this._input),qa=pa.start,ra=pa.end,sa=na==p.LEFT,ta=na==p.RIGHT;if(qa==ra){var ua=sa?-1:1;if(oa.charAt(qa)==z)o.set(this._input,qa+ua);}else if(sa&&oa.charAt(qa)==z){o.set(this._input,qa-1,ra);}else if(sa&&oa.charAt(ra)==z){o.set(this._input,qa,ra-1);}else if(ta&&oa.charAt(ra)==z){o.set(this._input,qa,ra+1);}else if(ta&&oa.charAt(qa)==z)o.set(this._input,qa+1,ra);};ma.prototype._handleBackspaceAndDelete=function(event,na){"use strict";var oa=o.get(this._input),pa=false;if(oa.start!==oa.end)if(this._offsetIsInsideMention(oa.start+1)&&this._offsetIsInsideMention(oa.end)){pa=(na===p.BACKSPACE);}else return;var qa=na===p.DELETE?1:-1,ra=qa+(pa?oa.end:oa.start),sa=this._getMarkedValue(),ta=sa;for(var ua=0;ua=za){ta=fa(ta,xa);continue;}var ab,bb;if(va.type!='user'){ab=0;bb=[wa];}else{ab=xa.substring(0,ra-ya).split(' ').length-1;bb=wa.split(' ');}var cb=bb.splice(ab,1)[0],db=bb.join(' '),eb=ab===0?ya:za-cb.length-1;if(db){va.text=db;db=ba(db);}else this._removeToken(va.uid);var fb=sa.substring(0,ya)+db+sa.substring(za);n.setValue(this._input,fb);o.set(this._input,eb);this._update();event.kill();break;}};ma.prototype._offsetIsInsideMention=function(na){"use strict";for(var oa=0;oathis._offsets[oa][0]&&na<=this._offsets[oa][1])return true;return false;};ma.prototype._filterResults=function(na){"use strict";if(this._filterData===null){var oa=o.get(this._input).start;if(this._offsetIsInsideMention(oa)){this._filterData={caretIsInsideMention:true};return false;}var pa=this._typeahead.getCore();this._filterData={value:pa.getValue(),rawValue:pa.getRawValue()};}if(this._filterData.caretIsInsideMention)return false;if(q.mainMatcher.test(this._filterData.rawValue))return true;if(na.type!='user'&&!this._shouldIncludeNonUserItem(na))return false;if(na.disable_autosuggest)return false;if(q.userMatcher.test(this._filterData.value))return true;return t.isExactMatch(this._filterData.value,this._typeahead.getData().getTextToIndex(na));};ma.prototype._shouldIncludeNonUserItem=function(na){"use strict";if(this._autoSuggestPages!='false'&&na.connected_page)return true;if(this._autoSuggestPages=='include_authoritative'&&na.is_authoritative_person)return true;return false;};ma.prototype._addToken=function(na){"use strict";var oa=na.uid;if(!this._mentioned.hasOwnProperty(oa)){this._mentioned[oa]=na;this._orderedUIDs.push(oa);this._numMentioned++;this._update();}};ma.prototype._removeToken=function(na){"use strict";if(this._mentioned.hasOwnProperty(na)){delete this._mentioned[na];x(this._orderedUIDs,na);this._numMentioned--;this._update();}};ma.prototype._update=function(){"use strict";var na=this._getMarkedValue();if(na==this._value)return;this._value=na;this._updateTypeahead();this._updateMentions();this._updateWidth();setTimeout(this._updateDirection.bind(this),0);this.updateValue();};ma.prototype._updateMentions=function(){"use strict";this._offsets=[];var na=this._getMarkedValue(),oa=na;for(var pa=0;pa-1){ta=ga(ta,sa);oa=ga(oa,sa);}if(na!==ta){var ua=o.get(this._input);n.setValue(this._input,ta);o.set(this._input,ua.start);this._value=ta;}};ma.prototype._renderHashtags=function(na){"use strict";if(!this._hasHashtags)return v(na);if(!this._hashtagParser){if(q.hashtagTrigger.exec(na))this.bootloadHashtagParser();if(!this._hashtagParser)return v(na);}this._hashtags=this._hashtagParser.parse(na);var oa=[],pa=0;for(var qa=0;qa',ra.marker,ra.tag,'');pa=ra.rawOffset+ra.marker.length+ra.tag.length;}oa.push(v(na.substring(pa)));return oa.join('');};ma.prototype.updateValue=function(){"use strict";var na=this._value=this._getMarkedValue(),oa=this._orderedUIDs,pa=na.replace(da,ca);for(var qa=0;qa':'';ta=ta.replace('@['+ua+':]',xa+v(ba(wa))+'');wa=wa.replace(ea,function(za){return '\\'+za;});pa=pa.replace('@['+ua+':]','@['+ua+':'+wa+']');}var ya=ha(ta);if(this._highlighterAuxContent||ya!==this._lastHighlighterHTML){if(u.ie())ta=ta.replace(/ /g,ia);this._highlighterContent.innerHTML=ta;this._updateHighlighter();this._lastHighlighterHTML=ya;}this._hiddenInput.value=pa;this._updateHeight();};ma.prototype._updateDirection=function(){"use strict";var na=s.get(this._input,'direction');if(na==this._dir)return;this._dir=na;s.set(this._highlighter,'direction',na);if(na=='rtl'){s.set(this._highlighter,'text-align','right');}else s.set(this._highlighter,'text-align','left');};ma.prototype._updateWidth=function(){"use strict";var na=this._input.offsetWidth;if(na===this._lastInputWidth)return;this._lastInputWidth=na;var oa=s.getFloat.bind(null,this._input),pa=na-oa('paddingLeft')-oa('paddingRight')-oa('borderLeftWidth')-oa('borderRightWidth');if(u.firefox())pa-=2;this._highlighterInner.style.width=Math.max(pa,0)+'px';};ma.prototype._updateHeight=function(){"use strict";if(this._highlighterAuxContent){var na=this._highlighter.offsetHeight,oa=this._typeahead.getElement();if(na>oa.offsetHeight){s.set(oa,'height',na+'px');g.inform('reflow');}}};ma.prototype._updateTypeahead=function(){"use strict";var na=this._typeahead.getCore();na.matcher=q.autoMatcher;na.setExclusions(this._orderedUIDs);this.inform('update',{mentioned:this._mentioned});};ma.prototype.setPlaceholder=function(na){"use strict";this._placeholder=na;if(!this.hasAuxContent())n.setPlaceholder(this._input,na);};ma.prototype._updateHighlighter=function(){"use strict";if(this._highlighterContent)j.conditionShow(this._highlighterContent,this._numMentioned>0||this.hasAuxContent()||this._hashtags.length);};ma.prototype.setAuxContent=function(na){"use strict";if(this._highlighterContent){if(!this._highlighterAuxContent){this._highlighterAuxContent=l.create('span',{className:'highlighterAuxContent'});l.insertAfter(this._highlighterContent,this._highlighterAuxContent);}l.setContent(this._highlighterAuxContent,na);if(na){n.setPlaceholder(this._input,'');}else n.setPlaceholder(this._input,this._placeholder);this._value=null;this._update();this._updateHighlighter();this._updateHeight();}};ma.prototype.hasAuxContent=function(){"use strict";var na=this.getAuxContentRoot();return na&&na.innerHTML.length>0;};ma.prototype.getAuxContentRoot=function(){"use strict";return this._highlighterAuxContent;};ma.prototype.addMention=function(na,oa){"use strict";oa=(typeof oa==='undefined')?true:oa;var pa=oa===false?'':' ',qa=this._getMarkedValue();if(qa!=='')qa+=' ';n.setValue(this._input,qa+ba(na.text)+pa);this._addToken(na);this._update();};ma.prototype.getMentions=function(){"use strict";return this._mentioned;};ma.prototype.bootloadHashtagParser=function(){"use strict";if(!this._hashtagParser)i.loadModules(["HashtagParser"],function(na){this._hashtagParser=na;if(this._initialized){this._value=null;this._update();}}.bind(this));};ma.getInstance=function(na){"use strict";var oa=r.byClass(na,'uiMentionsInput');return oa?k.get(oa,'MentionsInput'):null;};e.exports=ma;},null); __d("legacy:MentionsInput",["MentionsInput"],function(a,b,c,d){a.MentionsInput=b('MentionsInput');},3); __d("TypeaheadAreaCore",["InputSelection","TypeaheadCore","copyProperties","emptyFunction"],function(a,b,c,d,e,f,g,h,i,j){for(var k in h)if(h.hasOwnProperty(k))m[k]=h[k];var l=h===null?null:h.prototype;m.prototype=Object.create(l);m.prototype.constructor=m;m.__superConstructor__=h;function m(n){"use strict";h.call(this,n);this.matcher=new RegExp(this.matcher+'$');this.preventFocusChangeOnTab=true;}m.prototype.select=function(n){"use strict";l.select.call(this,n);var o=this.element.value,p=this.prefix+n.text+this.suffix;this.expandBounds(o,p);var q=o.substring(0,this.start),r=o.substring(this.end);this.element.value=q+p+r;g.set(this.element,q.length+p.length);};m.prototype.expandBounds=function(n,o){"use strict";n=n.toLowerCase();o=o.toLowerCase();var p,q,r,s,t=/\s/;q=n.substring(this.start,this.end);r=o.indexOf(q);p=this.start;while(p>=0&&r>=0){s=n.charAt(p-1);if(!s||t.test(s))this.start=p;q=s+q;r=o.indexOf(q);p--;}q=n.substring(this.start,this.end);r=o.indexOf(q);p=this.end;while(p<=n.length&&r>=0){s=n.charAt(p);if(!s||t.test(s))this.end=p;q=q+s;r=o.indexOf(q);p++;}};m.prototype.getRawValue=function(){"use strict";var n=g.get(this.element).start||0;return l.getValue.call(this).substring(0,n);};m.prototype.getValue=function(){"use strict";var n=this.matcher&&this.matcher.exec(this.getRawValue());if(!n)return '';var o=n[0],p=n.index+o.length;o=o.replace(/^\s/,'');var q=o.length;o=o.replace(/\s$/,'');var r=q-o.length;this.start=p-q;this.end=p+r;return n[2]||n[1]||n[0];};i(m.prototype,{prefix:'',suffix:', ',matcher:"\\b[^,]*",click:j});e.exports=m;},null); __d("TypeaheadHoistFriends",["copyProperties"],function(a,b,c,d,e,f,g){function h(i){"use strict";this._typeahead=i;}h.prototype.enable=function(){"use strict";var i=this._typeahead.getView();this._subscription=i.subscribe('beforeRender',function(j,k){var l=[],m=[],n=[];for(var o=0;o