/*!CK:3422079103!*//*1407269493,*/
if (self.CavalryLogger) { CavalryLogger.start_js(["z\/Q06"]); }
__d("legacy:connect-login",["ConnectLogin"],function(a,b,c,d){a.ConnectLogin=b('ConnectLogin');},3);
__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("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("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;this._offsets=[];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 n.getValue(this._input).replace(aa,'');};ma.prototype._getMarkedValue=function(){"use strict";return n.getValueRaw(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()<9)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');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:feedback",["Feedback"],function(a,b,c,d){a.Feedback=b('Feedback');},3);
__d("legacy:dom",["DOM"],function(a,b,c,d){a.DOM=b('DOM');},3);
__d("ReferrerTools",[],function(a,b,c,d,e,f){e.exports.storeAncestorOrigins=function(g){if(!location||!location.ancestorOrigins)return;for(var h=0;h=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