/*!CK:2411677430!*//*1403503756,*/

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

__d("ComposerXContextConfig",[],function(a,b,c,d,e,f){e.exports={propertyNames:{actorID:"ACTOR_ID",postID:"POST_ID"},propertyValues:{ACTOR_ID:"actorID",POST_ID:"postID"}};},null);
__d("ComposerXAttachmentBootstrap",["CSS","DOM","Input","Flash","Form","Parent","URI","cx"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n){var o=[],p={bootstrap:function(r){p.load(l.byTag(r,'form'),r.getAttribute('data-endpoint'));},load:function(r,s,t){var u=m(s).addQueryData({composerurihash:p.getURIHash(s)});g.conditionClass(r,"_fu",t);var v=l.byClass(r,"_2_4");g.removeClass(v,'async_saving');k.setDisabled(r,false);q(r);r.action=u.toString();k.bootstrap(r);},getURIHash:function(r){if(r==='initial')return 'initial';var s=o.indexOf(r);if(s!==-1){return s+'';}else{s=o.length;o[s]=r;return s+'';}}};function q(r){if(j.isAvailable()){var s=h.create('input');h.setAttributes(s,{name:'flash_version',type:'hidden'});var t=j.getVersion().join('.');i.setValue(s,t);r.appendChild(s);}}e.exports=p;},null);
__d("ComposerXContext",["ComposerXContextConfig","invariant"],function(a,b,c,d,e,f,g,h){var i=function(k){return g.propertyNames[k];};function j(k){"use strict";this.$ComposerXContext0={};for(var l in k)this.setProperty(l,k[l]);}j.prototype.getProperty=function(k){"use strict";h(i(k));return this.$ComposerXContext0[k];};j.prototype.setProperty=function(k,l){"use strict";h(i(k));this.$ComposerXContext0[k]=l;return this;};j.PROPERTIES=g.propertyValues;e.exports=j;},null);
__d("ComposerXSessionIDs",[],function(a,b,c,d,e,f){function g(){return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,function(j){var k=Math.random()*16|0,l=j=='x'?k:(k&3|8);return l.toString(16);});}var h={},i={getSessionID:function(j){return h[j];},resetSessionID:function(j){h[j]=g();}};e.exports=i;},null);
__d("CacheStorage",["ErrorUtils","EventListener","FBJSON","WebStorage","startsWith"],function(a,b,c,d,e,f,g,h,i,j,k){var l={memory:u,localstorage:s,sessionstorage:t},m='_@_',n='3b',o='CacheStorageVersion';function p(w){"use strict";this._store=w;}p.prototype.getStore=function(){"use strict";return this._store;};p.prototype.keys=function(){"use strict";var w=[];for(var x=0;x<this._store.length;x++)w.push(this._store.key(x));return w;};p.prototype.get=function(w){"use strict";return this._store.getItem(w);};p.prototype.set=function(w,x){"use strict";this._store.setItem(w,x);};p.prototype.remove=function(w){"use strict";this._store.removeItem(w);};p.prototype.clear=function(){"use strict";this._store.clear();};for(var q in p)if(p.hasOwnProperty(q))s[q]=p[q];var r=p===null?null:p.prototype;s.prototype=Object.create(r);s.prototype.constructor=s;s.__superConstructor__=p;function s(){"use strict";p.call(this,j.getLocalStorage());}s.available=function(){"use strict";return !!j.getLocalStorage();};for(q in p)if(p.hasOwnProperty(q))t[q]=p[q];t.prototype=Object.create(r);t.prototype.constructor=t;t.__superConstructor__=p;function t(){"use strict";p.call(this,j.getSessionStorage());}t.available=function(){"use strict";return !!j.getSessionStorage();};function u(){"use strict";this._store={};}u.prototype.getStore=function(){"use strict";return this._store;};u.prototype.keys=function(){"use strict";return Object.keys(this._store);};u.prototype.get=function(w){"use strict";if(this._store[w]===undefined)return null;return this._store[w];};u.prototype.set=function(w,x){"use strict";this._store[w]=x;};u.prototype.remove=function(w){"use strict";if(w in this._store)delete this._store[w];};u.prototype.clear=function(){"use strict";this._store={};};u.available=function(){"use strict";return true;};function v(w,x){"use strict";this._key_prefix=x||'_cs_';if(w=='AUTO'||!w)for(var y in l){var z=l[y];if(z.available()){w=y;break;}}if(w)if(!l[w]||!l[w].available()){this._backend=new u();}else this._backend=new l[w]();var aa=this.useBrowserStorage();if(aa)h.listen(window,'storage',this._onBrowserValueChanged.bind(this));var ba=aa?this._backend.getStore().getItem(o):this._backend.getStore()[o];if(ba!==n)this.clear();}v.prototype.useBrowserStorage=function(){"use strict";return this._backend.getStore()===j.getLocalStorage()||this._backend.getStore()===j.getSessionStorage();};v.prototype.addValueChangeCallback=function(w){"use strict";this._changeCallbacks=this._changeCallbacks||[];this._changeCallbacks.push(w);return {remove:function(){this._changeCallbacks.slice(this._changeCallbacks.indexOf(w),1);}.bind(this)};};v.prototype._onBrowserValueChanged=function(w){"use strict";if(this._changeCallbacks&&k(w.key,this._key_prefix))this._changeCallbacks.forEach(function(x){x(w.key,w.oldValue,w.newValue);});};v.prototype.keys=function(){"use strict";var w=[];g.guard(function(){if(this._backend){var x=this._backend.keys(),y=this._key_prefix.length;for(var z=0;z<x.length;z++)if(x[z].substr(0,y)==this._key_prefix)w.push(x[z].substr(y));}}.bind(this),'CacheStorage')();return w;};v.prototype.set=function(w,x,y){"use strict";if(this._backend){var z;if(typeof x=='string'){z=m+x;}else if(!y){z={__t:Date.now(),__v:x};z=i.stringify(z);}else z=i.stringify(x);var aa=this._backend,ba=this._key_prefix+w,ca=true;while(ca)try{aa.set(ba,z);ca=false;}catch(da){var ea=aa.keys().length;this._evictCacheEntries();ca=aa.keys().length<ea;}}};v.prototype._evictCacheEntries=function(){"use strict";var w=[],x=this._backend;x.keys().forEach(function(z){if(z===o)return;var aa=x.get(z);if(aa===undefined){x.remove(z);return;}if(v._hasMagicPrefix(aa))return;try{aa=i.parse(aa,e.id);}catch(ba){x.remove(z);return;}if(aa&&aa.__t!==undefined&&aa.__v!==undefined)w.push([z,aa.__t]);});w.sort(function(z,aa){return z[1]-aa[1];});for(var y=0;y<Math.ceil(w.length/2);y++)x.remove(w[y][0]);};v.prototype.get=function(w,x){"use strict";var y;if(this._backend){g.applyWithGuard(function(){y=this._backend.get(this._key_prefix+w);},this,null,function(){y=null;},'CacheStorage:get');if(y!==null){if(v._hasMagicPrefix(y)){y=y.substr(m.length);}else try{y=i.parse(y,e.id);if(y&&y.__t!==undefined&&y.__v!==undefined)y=y.__v;}catch(z){y=undefined;}}else y=undefined;}if(y===undefined&&x!==undefined){y=x;this.set(w,y);}return y;};v.prototype.remove=function(w){"use strict";if(this._backend)g.applyWithGuard(this._backend.remove,this._backend,[this._key_prefix+w],null,'CacheStorage:remove');};v.prototype.clear=function(){"use strict";if(this._backend){g.applyWithGuard(this._backend.clear,this._backend,null,null,null,'CacheStorage:clear');if(this.useBrowserStorage()){this._backend.getStore().setItem(o,n);}else this._backend.getStore()[o]=n;}};v.getAllStorageTypes=function(){"use strict";return Object.keys(l);};v._hasMagicPrefix=function(w){"use strict";return w.substr(0,m.length)===m;};e.exports=v;},null);
__d("MarauderLogger",["Banzai","CacheStorage","MarauderConfig"],function(a,b,c,d,e,f,g,h,i){var j='client_event',k='navigation',l=180000,m='marauder',n='marauder_last_event_time',o='marauder_last_session_id',p={},q=[],r=false,s=null,t=null,u=null,v=0,w,x,y=false,z=new h('localstorage','');function aa(){z.set(n,ba());}g.subscribe(g.SHUTDOWN,aa);function ba(){w=w||z.get(n)||0;return w;}function ca(){if(!y){x=z.get(o);y=true;}var ra=Date.now();if(!x||ra-l>ba()){x=ra.toString(16)+'-'+(~~(Math.random()*16777215)).toString(16);z.set(o,x);}return x;}function da(){return {user_agent:window.navigator.userAgent,screen_height:window.screen.availHeight,screen_width:window.screen.availWidth,density:(window.screen.devicePixelRatio||null),platform:(window.navigator.platform||null),locale:(window.navigator.language||null)};}function ea(){return {locale:navigator.language};}function fa(ra,sa,ta,ua,va,wa,xa){var ya=xa||Date.now();w=xa?Date.now():ya;sa=sa||s;return {name:ra,time:ya/1000,module:sa,obj_type:ua,obj_id:va,uuid:wa,extra:ta};}function ga(ra,sa,ta){return fa('content',null,{flags:sa},null,null,ra,ta);}function ha(ra){var sa=window.__mrdr;if(sa)for(var ta in sa){var ua=sa[ta];if(ua[3]!==0){delete sa[ta];if(ta==="1")if(u!==null){ta=u;}else continue;ra.push(ga(ta,1,ua[1]));ra.push(ga(ta,2,ua[2]));ra.push(ga(ta,3,ua[3]));}}}function ia(ra){ha(ra);if(ra.length===0)return;if(r)ra.push(fa('counters',null,p));var sa=g.BASIC,ta=i.gk_enabled;if(v===0&&ta){ra.push(fa('device_status',null,ea()));sa={delay:5000};}if(ta&&Math.random()<.01)ra.push(fa('device_info',null,da()));if(u!==null)for(var ua in ra){var va=ra[ua];if(va.uuid===null||typeof(va.uuid)==='undefined')va.uuid=u;}var wa={app_ver:i.app_version,data:ra,log_type:j,seq:v++,session_id:ca()},xa=z.get('device_id');if(xa)wa.device_id=xa;p={};r=false;g.post(m,wa,sa);}function ja(ra){if(!p[ra])p[ra]=0;p[ra]++;r=true;}function ka(ra,sa,ta,ua,va,wa,xa){ia([fa(ra,sa,ta,ua,va,wa,xa)]);}function la(ra,sa){if(s!==sa){q.push(fa(k,s,{dest_module:sa,source_url:t,destination_url:ra}));s=sa;t=ra;}}function ma(ra,sa){if(s!==sa){u=null;la(ra,sa);}}function na(ra,sa,ta){ka(sa?'show_module':'hide_module',ra,ta);}function oa(ra){s=ra;}function pa(){return s;}function qa(ra){if(u===null){u=ra;if(ra!==null){ia(q);q=[];}}}e.exports={count:ja,log:ka,navigateTo:ma,navigateWithinSession:la,toggleModule:na,setUUID:qa,setNavigationModule:oa,getNavigationModule:pa};},null);
__d("ComposerXMarauderLogger",["Event","ComposerXSessionIDs","MarauderLogger"],function(a,b,c,d,e,f,g,h,i){var j={};function k(m,n){return function(o,p,q){var r=j[o],s=h.getSessionID(o);if(!r||!s)return;if(n){if(!r.loggedEventTypes[s])r.loggedEventTypes[s]={};if(r.loggedEventTypes[s][m])return;r.loggedEventTypes[s][m]=true;}i.log(m,'composer',{composer_type:p,target_type:r.targetType,ref:r.entryPointRef,error_info:q},undefined,undefined,s);};}var l={registerComposer:function(m,n,o,p){j[m.id]={targetType:n,entryPointRef:o,loggedEventTypes:{},contentRoot:p};},listenForPostEvents:function(m){if(j[m]&&j[m].contentRoot){var n=j[m].contentRoot;return [g.listen(n,'submit',function(){l.logPost(m);}),g.listen(n,'success',function(){l.logPostSuccess(m);}),g.listen(n,'error',function(event){l.logPostFailure(m,null,{error_code:event.data.response.error,error_description:event.data.response.errorDescription,error_summary:event.data.response.errorSummary});})];}else return [];},logEntry:k('composer_entry',true),logCompleted:k('composer_post_completed',false),logPost:k('composer_post',false),logPostSuccess:k('composer_post_success',false),logPostFailure:k('composer_post_failure',false)};e.exports=l;},null);
__d("ComposerXSessionIDInserter",["ComposerXSessionIDs","DOM","DOMQuery","Event","Parent","csx","cx","onEnclosingPageletDestroy"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n){var o={init:function(p){var q=j.listen(p,'submit',o._onSubmit);n(p,function(){q.remove();});},_onSubmit:function(p){o.insertSessionInput(p.getTarget());},insertSessionInput:function(p){var q=k.byClass(p,"_119");if(!q)return;var r=g.getSessionID(q.id);if(!r)return;var s=i.scry(p,"._5r_b")[0];if(!s){s=h.create('input',{type:'hidden',name:'composer_session_id',className:"_5r_b"});h.prependContent(p,s);}s.value=r;}};e.exports=o;},null);
__d("ComposerXStore",["Arbiter","ge"],function(a,b,c,d,e,f,g,h){var i={};function j(l,m){return 'ComposerX/'+l+'/'+m;}var k={set:function(l,m,n){if(!i[l])i[l]={};i[l][m]=n;g.inform(j(l,m),{},g.BEHAVIOR_STATE);},get:function(l,m){if(i[l])return i[l][m];return null;},getAllForComposer:function(l){return i[l]||{};},waitForComponents:function(l,m,n){g.registerCallback(n,m.map(j.bind(null,l)));}};g.subscribe('page_transition',function(){for(var l in i)if(!h(l))delete i[l];});e.exports=k;},null);
__d("ComposerX",["ActorURI","Arbiter","ComposerXAttachmentBootstrap","ComposerXContext","ComposerXMarauderLogger","ComposerXSessionIDs","ComposerXSessionIDInserter","ComposerXStore","CSS","DOM","DOMQuery","URI","SubscriptionsHandler","arrayContains","copyProperties","csx","cx","getObjectValues","removeFromArray"],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='any';function aa(ba){"use strict";this._root=ba;this._composerID=ba.id;this._attachments={};this._context=new j({});l.resetSessionID(this._composerID);m.init(this._root);this._subscriptionsHandler=new s();this._subscriptionsHandler.addSubscriptions(h.subscribe('composer/publish',function(ca,da){if(da.composer_id===this._composerID)this.reset();}.bind(this)));if(k.listenForPostEvents)this._subscriptionsHandler.addSubscriptions.apply(this._subscriptionsHandler,k.listenForPostEvents(this._composerID));this._attachmentFetchForm=q.find(ba,"._2_4");}aa.prototype.getAttachment=function(ba,ca,da){"use strict";ba=this._augmentURI(ba);var ea=i.getURIHash(ba);this._endpointHashToShow=ea;var fa=this._attachments[ea];if(fa){this._showAttachmentAfterComponentsLoaded(ea,da);}else this.fetchAttachmentData(ba,ca);};aa.prototype.fetchAttachmentData=function(ba,ca){"use strict";ba=this._augmentURI(ba);var da=i.getURIHash(ba);if(this._attachments[da])return;if(!t(this._currentFetchEndpoints,da)){i.load(this._attachmentFetchForm,ba,ca);this._currentFetchEndpoints.push(da);}};aa.prototype.setAttachment=function(ba,ca,da,ea){"use strict";y(this._currentFetchEndpoints,ba);this._setupAttachment(ba,ca,da,ea);this._showAttachmentAfterComponentsLoaded(ba,false);};aa.prototype.setInitialAttachment=function(ba,ca,da,ea,fa){"use strict";if(fa)this._context=fa;ba=this._augmentURI(ba);var ga=i.getURIHash(ba);this._setupAttachment(ga,ca,da,ea);this._initialAttachmentEndpoint=ba;if(!this._currentInstance)this._showAttachmentAfterComponentsLoaded(ga,true);};aa.prototype.setComponent=function(ba,ca){"use strict";if(!n.get(this._composerID,ba)){n.set(this._composerID,ba,ca);p.appendContent(this._attachmentFetchForm,p.create('input',{type:'hidden',name:'loaded_components[]',value:ba}));}};aa.prototype.reset=function(){"use strict";if(this._currentInstance){this._currentInstance.cleanup();this._currentInstance=null;}l.resetSessionID(this._composerID);for(var ba in this._attachments)this._attachments[ba].instance.reset();var ca=n.getAllForComposer(this._composerID);x(ca).forEach(function(da){if(da.reset)da.reset(da);});this.getAttachment(this._initialAttachmentEndpoint,false,true);h.inform('composer/reset');};aa.prototype.destroy=function(){"use strict";this._subscriptionsHandler.release();};aa.prototype.addPlaceholders=function(ba,ca){"use strict";var da;for(var ea in this._attachments){da=this._attachments[ea];if(da.instance===ba){ca.forEach(function(fa){da.placeholders.push(fa);da.required_components.push(fa.component_name);});break;}}if(this._currentInstance===ba)this._fillPlaceholders(ca);};aa.prototype.hasAttachmentWithClassName=function(ba){"use strict";return q.scry(this._root,'.'+ba).length>0;};aa.prototype.showAttachmentThrobber=function(){"use strict";o.addClass(this._attachmentFetchForm,'async_saving');};aa.prototype.hideAttachmentThrobber=function(){"use strict";o.removeClass(this._attachmentFetchForm,'async_saving');};aa.prototype.getContext=function(){"use strict";return this._context;};aa.prototype.getID=function(){"use strict";return this._composerID;};aa.prototype._setupAttachment=function(ba,ca,da,ea){"use strict";ca.setComposerID(this._composerID);this._attachments[ba]={instance:ca,placeholders:da,required_components:ea};var fa=q.find(this._root,"div._55d0"),ga=ca.getRoot();if(ga.parentNode!==fa){o.hide(ga);p.appendContent(fa,ga);}};aa.prototype._showAttachment=function(ba,ca,da,ea){"use strict";if(this._currentInstance===ba)return;if(this._endpointHashToShow===z){this._endpointHashToShow=null;}else if(this._endpointHashToShow!==ca)return;if(this._currentInstance){if(!this._currentInstance.canSwitchAway())return;this._currentInstance.cleanup();}this._currentInstance=ba;var fa=q.find(this._root,"div._55d0"),ga=fa.childNodes,ha=ba.getRoot();for(var ia=0;ia<ga.length;ia++)if(ga[ia]!==ha)o.hide(ga[ia]);o.show(ha);this._fillPlaceholders(da);ba.initWithComponents(ea);this._setAttachmentSelectedClass(ba.attachmentClassName);h.inform('composer/initializedAttachment',{composerRoot:this._root,isInitial:ea});};aa.prototype._showAttachmentAfterComponentsLoaded=function(ba,ca){"use strict";var da=this._attachments[ba];n.waitForComponents(this._composerID,da.required_components,this._showAttachment.bind(this,da.instance,ba,da.placeholders,ca));};aa.prototype._fillPlaceholders=function(ba){"use strict";ba.forEach(function(ca){var da=n.get(this._composerID,ca.component_name);if(da.element&&ca.element!==da.element.parentNode)p.setContent(ca.element,da.element);}.bind(this));};aa.prototype._setAttachmentSelectedClass=function(ba){"use strict";var ca=q.scry(this._root,"._519b")[0],da;if(ca){o.removeClass(ca,"_519b");da=q.scry(ca,'*[aria-pressed="true"]')[0];if(da)da.setAttribute('aria-pressed','false');}if(ba){var ea=q.scry(this._root,'.'+ba)[0];if(ea){o.addClass(ea,"_519b");da=q.scry(ea,'*[aria-pressed="false"]')[0];if(da)da.setAttribute('aria-pressed','true');}}};aa.prototype._augmentURI=function(ba){"use strict";var ca=this._context.getProperty(j.PROPERTIES.ACTOR_ID),da=(ca)?g.create(ba,ca):new r(ba),ea=this._context.getProperty(j.PROPERTIES.POST_ID);if(ea)da.addQueryData('post_id',ea);return da.toString();};u(aa.prototype,{_endpointHashToShow:z,_currentFetchEndpoints:[],_initialAttachmentEndpoint:''});e.exports=aa;},null);
__d("ComposerXController",["ActorURI","Arbiter","ComposerX","ComposerXAttachmentBootstrap","ComposerXContext","Parent","$","cx","emptyFunction","ge","invariant"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){var r={};function s(v){var w=p(v);if(!w)return null;var x=l.byClass(m(v),"_119"),y=x.id;if(!r[y])r[y]=new i(x);return r[y];}function t(v){var w=s(v);q(w!==null);return w;}var u={getAttachment:function(v,w,x){var y=t(v);y.getAttachment(w,x);},fetchAttachmentData:function(v,w,x){t(v).fetchAttachmentData(w,x);},setAttachment:function(v,w,x,y,z){var aa=s(v);if(aa)aa.setAttachment(w,x,y,z);},setInitialAttachment:function(v,w,x,y,z,aa){var ba=t(v);ba.setInitialAttachment(w,x,y,z,aa);},setComponent:function(v,w,x){var y=s(v);if(y)y.setComponent(w,x);},reset:function(v){var w=t(v);w.reset();},holdTheMarkup:o,getEndpoint:function(v,w,x){var y=t(v),z=y.getContext();w=g.create(w,z.getProperty(k.PROPERTIES.ACTOR_ID)).toString();j.load(y._attachmentFetchForm,w,x);},addPlaceholders:function(v,w,x){var y=t(v);y.addPlaceholders(w,x);},hasAttachmentWithClassName:function(v,w){var x=t(v);return x.hasAttachmentWithClassName(w);},showAttachmentThrobber:function(v){var w=t(v);w.showAttachmentThrobber();},hideAttachmentThrobber:function(v){var w=t(v);w.hideAttachmentThrobber();},getComposerID:function(v){return t(v).getID();}};j.bootstrap=function(v){u.getAttachment(v,v.getAttribute('data-endpoint'));};h.subscribe('page_transition',function(){for(var v in r)if(!p(v)){r[v].destroy();delete r[v];}});e.exports=u;},null);
__d("PhotosMimeType",[],function(a,b,c,d,e,f){function g(h){"use strict";if(this instanceof g===false)return new g(h);this.$PhotosMimeType0=h.split('/');}g.prototype.isImage=function(){"use strict";return this.$PhotosMimeType0[0]==='image';};g.prototype.isJpeg=function(){"use strict";return this.isImage()&&(this.$PhotosMimeType0[1]==='jpeg'||this.$PhotosMimeType0[1]==='pjpeg');};e.exports=g;},null);
__d("DataTransfer",["PhotosMimeType","createArrayFrom","emptyFunction"],function(a,b,c,d,e,f,g,h,i){var j=new RegExp('\u000D\u000A','g'),k='\u000A',l={'text/rtf':1,'text/html':1};function m(o){if(o.kind=='file')return o.getAsFile();}function n(o){"use strict";this.data=o;this.types=o.types?h(o.types):[];}n.prototype.isRichText=function(){"use strict";return this.types.some(function(o){return l[o];});};n.prototype.getText=function(){"use strict";var o;if(this.data.getData)if(!this.types.length){o=this.data.getData('Text');}else if(this.types.indexOf('text/plain')!=-1)o=this.data.getData('text/plain');return o?o.replace(j,k):null;};n.prototype.getHTML=function(){"use strict";if(this.data.getData)if(!this.types.length){return this.data.getData('Text');}else if(this.types.indexOf('text/html')!=-1)return this.data.getData('text/html');};n.prototype.isImage=function(){"use strict";var o=this.types.some(function(s){return s.indexOf('application/x-moz-file')!=-1;});if(o)return true;var p=this.getFiles();for(var q=0;q<p.length;q++){var r=p[q].type;if(!g(r).isImage())return false;}return true;};n.prototype.getCount=function(){"use strict";if(this.data.hasOwnProperty('items')){return this.data.items.length;}else if(this.data.hasOwnProperty('mozItemCount')){return this.data.mozItemCount;}else if(this.data.files)return this.data.files.length;return null;};n.prototype.getFiles=function(){"use strict";if(this.data.items){return Array.prototype.slice.call(this.data.items).map(m).filter(i.thatReturnsArgument);}else if(this.data.files){return Array.prototype.slice.call(this.data.files);}else return [];};n.prototype.hasFiles=function(){"use strict";return this.getFiles().length>0;};e.exports=n;},null);
__d("DragDropFileUpload",[],function(a,b,c,d,e,f){f.isSupported=function(){return typeof(FileList)!=="undefined";};},null);
__d("DocumentDragDrop",["Event","Arbiter","CSS","DOM","DOMQuery","DragDropFileUpload","emptyFunction","getObjectValues"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n){var o={},p=0;function q(){p=0;n(o).forEach(function(t){i.removeClass(t.element,t.className);h.inform('dragleave',{element:t.element});});}function r(){if(!l.isSupported())return;g.listen(document,'dragenter',function(u){if(p===0)n(o).forEach(function(v){i.addClass(v.element,v.className);h.inform('dragenter',{element:v.element,event:u});});p++;});g.listen(document,'dragleave',function(u){p--;if(p===0)q();});g.listen(document,'drop',function(u){q();var v=u.getTarget();if(k.isNodeOfType(u.getTarget(),'input'))if(v.type==='file')return;u.prevent();});g.listen(document,'dragover',g.prevent);var t=null;document.addEventListener('dragover',function(){t&&clearTimeout(t);t=setTimeout(q,839);},true);r=m;}var s={init:function(){r();},registerStatusElement:function(t,u){r();o[j.getID(t)]={element:t,className:u};if(p>0)i.addClass(t,u);},removeStatusElement:function(t){var u=j.getID(t),v=o[u];if(v){i.removeClass(v.element,v.className);delete o[u];}}};e.exports=s;},null);
__d("DragDropTarget",["Arbiter","Event","SubscriptionsHandler","CSS","DataTransfer","DocumentDragDrop","DragDropFileUpload","copyProperties","emptyFunction"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){function p(q){this._element=q;this._listeners=new i();this._statusElem=q;this._dragEnterCount=0;this._enabled=false;}n(p.prototype,{_onFilesDropCallback:o,_onURLDropCallback:o,_onPlainTextDropCallback:o,_onDropCallback:o,_fileFilterFn:o.thatReturnsArgument,setOnDocumentDragEnterCallback:function(q){this._onDocumentDragEnterCallback=q;return this;},setOnDocumentDragLeaveCallback:function(q){this._onDocumentDragLeaveCallback=q;return this;},setOnDragEnterCallback:function(q){this._onDragEnterCallback=q;return this;},setOnDragLeaveCallback:function(q){this._onDragLeaveCallback=q;return this;},setOnFilesDropCallback:function(q){this._onFilesDropCallback=q;return this;},setOnURLDropCallback:function(q){this._onURLDropCallback=q;return this;},setOnPlainTextDropCallback:function(q){this._onPlainTextDropCallback=q;return this;},setOnDropCallback:function(q){this._onDropCallback=q;return this;},enable:function(){if(!m.isSupported())return this;this._listeners.engage();l.registerStatusElement(this._statusElem,'fbWantsDragDrop');this._listeners.addSubscriptions(h.listen(this._element,'dragenter',this._onDragEnter.bind(this)),h.listen(this._element,'dragleave',this._onDragLeave.bind(this)),h.listen(this._element,'dragover',this._onDragOver.bind(this)),h.listen(this._element,'drop',function(q){this._dragEnterCount=0;j.removeClass(this._statusElem,'fbDropReady');j.removeClass(this._statusElem,'fbDropReadyPhoto');j.removeClass(this._statusElem,'fbDropReadyPhotos');j.removeClass(this._statusElem,'fbDropReadyLink');var r={},s=false,t=this._fileFilterFn(q.dataTransfer.files);if(t.length){this._onFilesDropCallback(t,q);r.files=t;s=true;}var u=q.dataTransfer.getData('url')||q.dataTransfer.getData('text/uri-list');if(u){this._onURLDropCallback(u,q);r.url=u;s=true;}var v=q.dataTransfer.getData('text/plain');if(v){this._onPlainTextDropCallback(v,q);r.plainText=v;s=true;}if(s)this._onDropCallback(r,q);q.kill();}.bind(this)));this._listeners.addSubscriptions(g.subscribe('dragenter',this._onDocumentDragEnter.bind(this)),g.subscribe('dragleave',this._onDocumentDragLeave.bind(this)));this._enabled=true;return this;},disable:function(){if(!this._enabled)return this;l.removeStatusElement(this._statusElem,'fbWantsDragDrop');j.removeClass(this._statusElem,'fbDropReady');j.removeClass(this._statusElem,'fbDropReadyPhoto');j.removeClass(this._statusElem,'fbDropReadyPhotos');j.removeClass(this._statusElem,'fbDropReadyLink');this._listeners.release();this._enabled=false;return this;},setFileFilter:function(q){this._fileFilterFn=q;return this;},setStatusElement:function(q){this._statusElem=q;return this;},_onDragEnter:function(q){if(this._dragEnterCount===0){var r=new k(q.dataTransfer);j.addClass(this._statusElem,'fbDropReady');if(!r.isImage()){j.addClass(this._statusElem,'fbDropReadyLink');}else if(r.getCount()>1){j.addClass(this._statusElem,'fbDropReadyPhotos');}else j.addClass(this._statusElem,'fbDropReadyPhoto');this._onDragEnterCallback&&this._onDragEnterCallback();}this._dragEnterCount++;q.preventDefault();},_onDragLeave:function(){this._dragEnterCount=Math.max(this._dragEnterCount-1,0);if(this._dragEnterCount===0){j.removeClass(this._statusElem,'fbDropReady');j.removeClass(this._statusElem,'fbDropReadyPhoto');j.removeClass(this._statusElem,'fbDropReadyPhotos');j.removeClass(this._statusElem,'fbDropReadyLink');this._onDragLeaveCallback&&this._onDragLeaveCallback();}},_onDragOver:function(q){if(!q.dataTransfer){h.kill(q);return;}var r=q.dataTransfer.effectAllowed;q.dataTransfer.dropEffect=(r=='move'||r=='linkMove')?'move':'copy';h.kill(q);},_onDocumentDragEnter:function(event,q){if(this._onDocumentDragEnterCallback&&q.element==this._element)this._onDocumentDragEnterCallback();},_onDocumentDragLeave:function(event,q){if(this._onDocumentDragLeaveCallback&&q.element==this._element)this._onDocumentDragLeaveCallback();}});e.exports=p;},null);
__d("ComposerXDragDrop",["Arbiter","ComposerXController","CSS","DOMQuery","DragDropTarget","Parent","URI","csx","cx"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){var p='/ajax/composerx/attachment/media/upload/',q='/ajax/composerx/attachment/link/scraper/',r=function(t){t();};function s(t,u,v,w){"use strict";this._root=t;this._composerID=u;this._targetID=v;w=w||r;this._dragdrop=new k(t).setOnFilesDropCallback(function(x){w(this._uploadFiles.bind(this,x));}.bind(this)).setFileFilter(s.filterImages).enable();s.handleDragEnterAndLeave(t);g.subscribe('composer/deactivateDragdrop',function(){this.deactivate();}.bind(this));g.subscribe('composer/reactivateDragdrop',function(){this.reactivate();}.bind(this));}s.prototype.enableURLDropping=function(){"use strict";this._dragdrop.setOnURLDropCallback(this._onURLDrop.bind(this));};s.prototype.deactivate=function(){"use strict";this._dragdrop.disable();};s.prototype.reactivate=function(){"use strict";this._dragdrop.enable();};s.prototype._uploadFiles=function(t){"use strict";h.getAttachment(this._root,p);g.inform('ComposerXFilesStore/filesDropped/'+this._composerID+'/mediaupload',{files:t},g.BEHAVIOR_PERSISTENT);};s.prototype._onURLDrop=function(t){"use strict";var u=new m(q);u.addQueryData({scrape_url:encodeURIComponent(t)});h.getAttachment(this._root,u.toString());};s.handleDragEnterAndLeave=function(t){"use strict";var u=j.scry(l.byClass(t,"_119"),"._2wr");g.subscribe('dragenter',function(v,w){if(t==w.element)u.forEach(i.hide);});g.subscribe('dragleave',function(v,w){if(t==w.element)u.forEach(i.show);});};s.filterImages=function(t){"use strict";var u=[];for(var v=0;v<t.length;v++)if(t[v].type.match('image/*'))u.push(t[v]);return u;};e.exports=s;},null);
__d("Dispatcher",["copyProperties","invariant"],function(a,b,c,d,e,f,g,h){var i=1;function j(){this._callbacks={};this._isPending={};this._isHandled={};this._isDispatching=false;this._pendingPayload=null;}g(j.prototype,{register:function(k){var l=i++;this._callbacks[l]=k;return l;},waitFor:function(k){h(this._isDispatching);for(var l=0;l<k.length;l++){var m=k[l];if(this._isPending[m]){h(this._isHandled[m]);continue;}h(this._callbacks[m]);this._invokeCallback(m);}},dispatch:function(k){h(!this._isDispatching);this._startDispatching(k);try{for(var l in this._callbacks){if(this._isPending[l])continue;this._invokeCallback(l);}}finally{this._stopDispatching();}},isDispatching:function(){return this._isDispatching;},_invokeCallback:function(k){this._isPending[k]=true;this._callbacks[k](this._pendingPayload);this._isHandled[k]=true;},_startDispatching:function(k){for(var l in this._callbacks){this._isPending[l]=false;this._isHandled[l]=false;}this._pendingPayload=k;this._isDispatching=true;},_stopDispatching:function(){this._pendingPayload=null;this._isDispatching=false;}});e.exports=j;},null);
__d("CurrentLocale",["LocaleInitialData"],function(a,b,c,d,e,f,g){var h={};h.get=function(){return g.locale;};e.exports=h;},null);
__d("TypeaheadFacepile",["DOM"],function(a,b,c,d,e,f,g){function h(){}h.render=function(i){var j=[g.create('span',{className:'splitpic leftpic'},[g.create('img',{alt:'',src:i[0]})]),g.create('span',{className:'splitpic'+(i[2]?' toppic':'')},[g.create('img',{alt:'',src:i[1]})])];if(i[2])j.push(g.create('span',{className:'splitpic bottompic'},[g.create('img',{alt:'',src:i[2]})]));return g.create('span',{className:'splitpics clearfix'},j);};e.exports=h;},null);
__d("BasicTypeaheadRenderer",["BadgeHelper","DOM"],function(a,b,c,d,e,f,g,h){function i(j,k){var l=[];if(j.icon)l.push(h.create('img',{alt:'',src:j.icon}));if(j.text){var m=[j.text];if(j.is_verified)m.push(g.renderBadge('xsmall','verified'));l.push(h.create('span',{className:'text'},m));}if(j.subtext)l.push(h.create('span',{className:'subtext'},[j.subtext]));var n=h.create('li',{className:j.type||''},l);if(j.text)n.setAttribute('aria-label',j.text);return n;}i.className='basic';e.exports=i;},null);
__d("TypeaheadView",["ArbiterMixin","BasicTypeaheadRenderer","CSS","DOM","Event","Parent","$","copyProperties","emptyFunction","mixin"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){var q=p(g);for(var r in q)if(q.hasOwnProperty(r))t[r]=q[r];var s=q===null?null:q.prototype;t.prototype=Object.create(s);t.prototype.constructor=t;t.__superConstructor__=q;function t(u,v){"use strict";this.element=this.content=m(u);n(this,v);}t.prototype.init=function(){"use strict";this.init=o;this.initializeEvents();this.reset();};t.prototype.initializeEvents=function(){"use strict";k.listen(this.element,{mouseup:this.mouseup.bind(this),mouseover:this.mouseover.bind(this)});};t.prototype.setTypeahead=function(u){"use strict";this.typeahead=u;};t.prototype.setAccessibilityControlElement=function(u){"use strict";this.accessibilityElement=u;};t.prototype.getElement=function(){"use strict";return this.element;};t.prototype.mouseup=function(event){"use strict";if(event.button!=2){this.select(true);event.prevent();}};t.prototype.mouseover=function(event){"use strict";if(this.ignoreMouseover){this.ignoreMouseover=false;return;}if(this.visible)this.highlight(this.getIndex(event));};t.prototype.reset=function(u){"use strict";if(!u)this.disableAutoSelect=false;this.index=-1;this.items=[];this.results=[];this.value='';this.content.innerHTML='';this.inform('reset');return this;};t.prototype.getIndex=function(event){"use strict";return this.items.indexOf(l.byTag(event.getTarget(),'li'));};t.prototype.getSelection=function(){"use strict";var u=this.results[this.index]||null;return this.visible?u:null;};t.prototype.isEmpty=function(){"use strict";return !this.results.length;};t.prototype.isVisible=function(){"use strict";return !!this.visible;};t.prototype.show=function(){"use strict";i.show(this.element);if(this.results&&this.results.length)if(this.autoSelect&&this.accessibilityElement&&this.selected)this.accessibilityElement.setAttribute('aria-activedescendant',j.getID(this.selected));this.accessibilityElement&&this.accessibilityElement.setAttribute('aria-expanded','true');this.visible=true;return this;};t.prototype.hide=function(){"use strict";i.hide(this.element);if(this.accessibilityElement){this.accessibilityElement.setAttribute('aria-expanded','false');this.accessibilityElement.removeAttribute('aria-activedescendant');}this.visible=false;return this;};t.prototype.render=function(u,v){"use strict";this.value=u;if(!v.length){this.accessibilityElement&&this.accessibilityElement.removeAttribute('aria-activedescendant');this.reset(true);return;}var w={results:v,value:u};this.inform('beforeRender',w);v=w.results;var x=this.getDefaultIndex(v);if(this.index>0&&this.index!==this.getDefaultIndex(this.results)&&this.index<this.results.length){var y=this.results[this.index];for(var z=0,aa=v.length;z<aa;++z)if(y.uid==v[z].uid){x=z;break;}}this.results=v;j.setContent(this.content,this.buildResults(v));this.items=this.getItems();this.highlight(x,false);this.inform('render',v);};t.prototype.getItems=function(){"use strict";return j.scry(this.content,'li');};t.prototype.buildResults=function(u){"use strict";var v,w=null;if(typeof this.renderer=='function'){v=this.renderer;w=this.renderer.className||'';}else{v=a.TypeaheadRenderers[this.renderer];w=this.renderer;}v=v.bind(this);var x=u.map(function(z,aa){var ba=z.node||v(z,aa);ba.setAttribute('role','option');return ba;}),y=j.create('ul',{className:w,id:'typeahead_list_'+(this.typeahead?j.getID(this.typeahead):j.getID(this.element))},x);y.setAttribute('role','listbox');return y;};t.prototype.getDefaultIndex=function(){"use strict";var u=(this.autoSelect&&!this.disableAutoSelect);return this.index<0&&!u?-1:0;};t.prototype.next=function(){"use strict";this.highlight(this.index+1);this.inform('next',this.selected);};t.prototype.prev=function(){"use strict";this.highlight(this.index-1);this.inform('prev',this.selected);};t.prototype.getItemText=function(u){"use strict";var v='';if(u){v=u.getAttribute('aria-label');if(!v){v=j.getText(u);u.setAttribute('aria-label',v);}}return v;};t.prototype.setIsViewingSelectedItems=function(u){"use strict";this.viewingSelected=u;return this;};t.prototype.getIsViewingSelectedItems=function(){"use strict";return !!this.viewingSelected;};t.prototype.highlight=function(u,v){"use strict";if(this.selected){i.removeClass(this.selected,'selected');this.selected.setAttribute('aria-selected','false');}if(u>this.items.length-1){u=-1;}else if(u<-1)u=this.items.length-1;if(u>=0&&u<this.items.length){this.selected=this.items[u];i.addClass(this.selected,'selected');this.selected.setAttribute('aria-selected','true');if(this.accessibilityElement)setTimeout((function(){this.accessibilityElement.setAttribute('aria-activedescendant',j.getID(this.selected));}).bind(this),0);}else this.accessibilityElement&&this.accessibilityElement.removeAttribute('aria-activedescendant');this.index=u;this.disableAutoSelect=(u==-1);if(v!==false)this.inform('highlight',{index:u,selected:this.results[u],element:this.selected});};t.prototype.select=function(u){"use strict";if(this.headerIndex&&u)return;var v=this.index,w=this.results[v],x=this.element.getAttribute('id');if(w){this.inform('select',{index:v,clicked:!!u,selected:w,id:x,query:this.value});this.inform('afterSelect');}};n(t.prototype,{events:['highlight','render','reset','select','beforeRender','next','prev'],renderer:h,autoSelect:false,ignoreMouseover:false});e.exports=t;},null);
__d("BucketedTypeaheadView",["DOM","TypeaheadView","tx"],function(a,b,c,d,e,f,g,h,i){for(var j in h)if(h.hasOwnProperty(j))l[j]=h[j];var k=h===null?null:h.prototype;l.prototype=Object.create(k);l.prototype.constructor=l;l.__superConstructor__=h;function l(){"use strict";if(h!==null)h.apply(this,arguments);}l.prototype.render=function(m,n,o){"use strict";n=this.buildBuckets(m,n);return k.render.call(this,m,n,o);};l.prototype.highlight=function(m,n){"use strict";this.headerIndex=false;if(m==-1&&this.index!==0)m=this.index;while(m>=0&&m<this.items.length&&!this.isHighlightable(this.results[m])){m=m+1;this.headerIndex=true;}k.highlight.call(this,m,n);};l.prototype.buildBuckets=function(m,n){"use strict";if(!this.typeObjects||!n||!n.length)return n;var o=[],p={};for(var q=0;q<n.length;++q){var r=n[q],s=r.render_type||r.type;if(!p.hasOwnProperty(s)){p[s]=o.length;o.push([this.buildBucketHeader(s)]);}r.classNames=r.classNames||s;r.groupIndex=p[s];r.indexInGroup=o[r.groupIndex].length-1;r.globalIndex=q;o[r.groupIndex].push(r);}for(s in this.typeObjects)if(!p.hasOwnProperty(s)&&this.typeObjects[s].show_always){p[s]=o.length;o.push([this.buildBucketHeader(s)]);r=this.buildNoResultsEntry();r.classNames=r.type;r.groupIndex=p[s];r.indexInGroup=o[r.groupIndex].length-1;o[r.groupIndex].push(r);}var t=[];if(this.typeObjectsOrder){for(var u=0;u<this.typeObjectsOrder.length;++u){var v=this.typeObjectsOrder[u];if(p.hasOwnProperty(v))t=t.concat(o[p[v]]);}}else for(var w=0;w<o.length;++w)t=t.concat(o[w]);return t;};l.prototype.buildNoResultsEntry=function(){"use strict";return {uid:'disabled_result',type:'disabled_result',text:"No Results"};};l.prototype.buildBucketHeader=function(m){"use strict";var n=this.typeObjects[m];if(n===undefined)throw new Error(m+" is undefined in "+JSON.stringify(this.typeObjects));if(n.markup){n.text=n.markup;delete n.markup;}return this.typeObjects[m];};l.prototype.buildResults=function(m){"use strict";var n=k.buildResults.call(this,m);if(this.typeObjects){return g.create('div',{className:'bucketed'},[n]);}else return n;};l.prototype.isHighlightable=function(m){"use strict";return m.type!='header'&&m.type!='disabled_result';};l.prototype.select=function(m){"use strict";var n=this.results[this.index];if(n&&this.isHighlightable(n))k.select.call(this,m);};l.prototype.normalizeIndex=function(m){"use strict";var n=this.results.length;if(n===0){return -1;}else if(m<-1){return (m%n)+n+1;}else if(m>=n){return (m%n)-1;}else return m;};l.prototype.getDefaultIndex=function(m){"use strict";var n=(this.autoSelect&&!this.disableAutoSelect);if(this.index<0&&!n)return -1;if(m.length===0)return -1;var o=0;while(!this.isHighlightable(m)&&o<m.length)o++;return o;};l.prototype.prev=function(){"use strict";var m=this.results[this.normalizeIndex(this.index-1)];while(m&&!this.isHighlightable(m)){this.index=this.normalizeIndex(this.index-1);m=this.results[this.normalizeIndex(this.index-1)];}return k.prev.call(this);};l.prototype.next=function(){"use strict";var m=this.results[this.normalizeIndex(this.index+1)];while(m&&!this.isHighlightable(m)){this.index=this.normalizeIndex(this.index+1);m=this.results[this.normalizeIndex(this.index+1)];}return k.next.call(this);};e.exports=l;},null);
__d("ContextualTypeaheadView",["BucketedTypeaheadView","CSS","ContextualLayer","ContextualLayerAutoFlip","ContextualLayerHideOnScroll","DOM","DOMDimensions","Style"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n){for(var o in g)if(g.hasOwnProperty(o))q[o]=g[o];var p=g===null?null:g.prototype;q.prototype=Object.create(p);q.prototype.constructor=q;q.__superConstructor__=g;function q(){"use strict";if(g!==null)g.apply(this,arguments);}q.prototype.init=function(){"use strict";this.initializeLayer();p.init.call(this);};q.prototype.initializeLayer=function(){"use strict";this.context=this.getContext();this.wrapper=l.create('div');l.appendContent(this.wrapper,this.element);h.addClass(this.element,'uiContextualTypeaheadView');this.layer=new i({context:this.context,position:'below',alignment:this.alignment,causalElement:this.causalElement,permanent:true,shouldSetARIAProperties:false},this.wrapper);this.layer.enableBehavior(k);if(n.isFixed(this.context)||this.autoflip)this.layer.enableBehavior(j);this.subscribe('render',this.renderLayer.bind(this));};q.prototype.show=function(){"use strict";if(this.minWidth){n.set(this.wrapper,'min-width',this.minWidth+'px');}else if(this.width){n.set(this.wrapper,'width',this.width+'px');}else n.set(this.wrapper,'width',m.getElementDimensions(this.context).width+'px');var r=p.show.call(this);this.layer.show();this.inform('show');return r;};q.prototype.hide=function(){"use strict";this.layer.hide();this.inform('hide');return p.hide.call(this);};q.prototype.renderLayer=function(){"use strict";if(!this.isVisible())return;if(this.layer.isShown()){this.layer.updatePosition();}else this.layer.show();};q.prototype.clearText=function(){"use strict";this.layer.getCausalElement().value='';};q.prototype.getContext=function(){"use strict";return this.element.parentNode;};e.exports=q;},null);
__d("Typeahead",["ArbiterMixin","BehaviorsMixin","DataStore","DOM","Event","Parent","Run","emptyFunction","ge","mixin"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){var q=p(g,h);for(var r in q)if(q.hasOwnProperty(r))t[r]=q[r];var s=q===null?null:q.prototype;t.prototype=Object.create(s);t.prototype.constructor=t;t.__superConstructor__=q;function t(u,v,w,x){"use strict";this.args={data:u,view:v,core:w};i.set(x,'Typeahead',this);this.element=x;}t.prototype.init=function(u){"use strict";this.init=n;this.getCore();this.getView().setAccessibilityControlElement(this.getCore().getElement());this.proxyEvents();this.initBehaviors(u||[]);this.inform('init',this);this.data.bootstrap();this.core.focus();};t.prototype.getData=function(){"use strict";if(!this.data){var u=this.args.data;this.data=u;this.data.init();}return this.data;};t.prototype.getView=function(){"use strict";if(!this.view){var u=this.args.view,v=u.node||o(u.node_id);if(!v){v=j.create('div',{className:'uiTypeaheadView'});j.appendContent(this.element,v);}if(typeof u.ctor==='string'){this.view=new window[u.ctor](v,u.options||{});}else this.view=new u.ctor(v,u.options||{});this.view.init();this.view.setTypeahead(this.element);}return this.view;};t.prototype.getCore=function(){"use strict";if(!this.core){var u=this.args.core;if(typeof u.ctor==='string'){this.core=new window[u.ctor](u.options||{});}else this.core=new u.ctor(u.options||{});this.core.init(this.getData(),this.getView(),this.getElement());}return this.core;};t.prototype.getElement=function(){"use strict";return this.element;};t.prototype.swapData=function(u){"use strict";var v=this.core;this.data=this.args.data=u;u.init();if(v){v.data=u;v.initData();v.reset();}u.bootstrap();return u;};t.prototype.proxyEvents=function(){"use strict";[this.data,this.view,this.core].forEach(function(u){u.subscribe(u.events,this.inform.bind(this));},this);};t.prototype.initBehaviors=function(u){"use strict";u.forEach(function(v){if(typeof v==='string'){if(a.TypeaheadBehaviors&&a.TypeaheadBehaviors[v]){a.TypeaheadBehaviors[v](this);}else m.onLoad(function(){if(a.TypeaheadBehaviors)(a.TypeaheadBehaviors[v]||n)(this);}.bind(this));}else this.enableBehavior(v);},this);};t.getInstance=function(u){"use strict";var v=l.byClass(u,'uiTypeahead');return v?i.get(v,'Typeahead'):null;};t.initNow=function(u,v,w){"use strict";if(w)w.init(u);u.init(v);};t.init=function(u,v,w,x){"use strict";if(!j.isNodeOfType(u,['input','textarea']))u=j.scry(u,'input')[0]||j.scry(u,'textarea')[0];var y=false;try{y=document.activeElement===u;}catch(z){}if(y){t.initNow(v,w,x);}else var aa=k.listen(u,'focus',function(){t.initNow(v,w,x);aa.remove();});};e.exports=t;},null);
__d("StickyPlaceholderInput",["Event","CSS","DOM","Input","Parent","emptyFunction"],function(a,b,c,d,e,f,g,h,i,j,k,l){function m(q){return k.byClass(q,'uiStickyPlaceholderInput');}function n(q){return i.scry(q,'.placeholder')[0];}function o(q){q=q||window.event;var r=q.target||q.srcElement;if(i.isNodeOfType(r,['input','textarea'])){var s=m(r);if(s)setTimeout(function(){h.conditionClass(s,'uiStickyPlaceholderEmptyInput',!r.value.length);},0);}}var p={init:function(){p.init=l;g.listen(document.documentElement,{keydown:o,paste:o,focusout:o});},registerInput:function(q){p.init();var r=q.getAttribute('placeholder')||'';if(r.length)if(document.activeElement===q){var s=g.listen(q,'blur',function(){p.manipulateInput(q,r);s.remove();});}else p.manipulateInput(q,r);},manipulateInput:function(q,r){var s=i.create('div',{className:'placeholder','aria-hidden':'true'},r),t=i.create('div',{className:'uiStickyPlaceholderInput'},s);if(i.isNodeOfType(q,'textarea'))h.addClass(t,'uiStickyPlaceholderTextarea');g.listen(s,'click',function(){q.focus();});if(q.value===r)q.value='';h.removeClass(q,'DOMControl_placeholder');q.setAttribute('placeholder','');i.replace(q,t);i.appendContent(t,q);h.conditionClass(t,'uiStickyPlaceholderEmptyInput',!q.value.length);},setPlaceholderText:function(q,r){var s=m(q);if(!s){j.setPlaceholder(q,r);}else{var t=n(s);t&&i.setContent(t,r);}},getPlaceholderText:function(q){var r=m(q),s=n(r);return s&&i.getText(s);},update:function(q){var r=m(q);if(r)h.conditionClass(r,'uiStickyPlaceholderEmptyInput',!q.value.length);},getVisibleText:function(q){var r=m(q);if(h.hasClass(r,'uiStickyPlaceholderEmptyInput')){var s=n(r);return s&&i.getText(s);}else return q.value;}};e.exports=p;},null);
__d("TypeaheadCore",["Arbiter","ArbiterMixin","CSS","DOM","Event","Focus","Input","InputSelection","Keys","StickyPlaceholderInput","UserAgent","bind","copyProperties","emptyFunction","mixin"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u){var v=u(h);for(var w in v)if(v.hasOwnProperty(w))y[w]=v[w];var x=v===null?null:v.prototype;y.prototype=Object.create(x);y.prototype.constructor=y;y.__superConstructor__=v;function y(z){"use strict";s(this,z);}y.prototype.init=function(z,aa,ba){"use strict";this.init=t;this.data=z;this.view=aa;this.root=ba;this.initInput();this.inputWrap=j.find(ba,'div.wrap');this.hiddenInput=j.find(ba,'input.hiddenInput');this.value='';this.nextQuery=null;this.selectedText=null;if(this.setValueOnSelect&&i.hasClass(this.inputWrap,'selected'))this.selectedText=this.getValue();this.initView();this.initData();this.initEvents();this.initToggle();this._exclusions=[];};y.prototype.initInput=function(){"use strict";this.element=j.find(this.root,'.textInput');var z=j.scry(this.element,'input')[0];if(z)this.element=z;};y.prototype.initView=function(){"use strict";this.view.subscribe('highlight',l.set.bind(null,this.element));this.view.subscribe('select',function(z,aa){this.select(aa.selected);}.bind(this));this.view.subscribe('afterSelect',function(){this.afterSelect();}.bind(this));};y.prototype.initData=function(){"use strict";this.data.subscribe('notify',function(z,aa){if(this.root.id==aa.rootid&&!this.element.disabled&&aa.value==this.getValue())this.view.render(aa.value,aa.results,aa.isAsync);}.bind(this));this.data.subscribe('respond',function(z,aa){if(aa.forceDisplay||aa.value==this.getValue()&&!this.element.disabled&&(this.element.getAttribute('singlestate')!=='true'||aa.nullState))this.view.render(aa.value,aa.results,aa.isAsync);}.bind(this));this.data.subscribe('activity',function(z,aa){this.fetching=aa.activity;if(!this.fetching)this.nextQuery&&this.performQuery();if(this.loading!=this.fetching){this.loading=this.fetching;this.inform('loading',{loading:this.loading});}}.bind(this));};y.prototype.initEvents=function(){"use strict";k.listen(this.view.getElement(),{mouseup:this.viewMouseup.bind(this),mousedown:this.viewMousedown.bind(this)});var z={blur:r(this,'blur'),focus:r(this,'focus'),click:r(this,'click'),keyup:r(this,'keyup'),keydown:r(this,'keydown'),keypress:r(this,'keypress')};if(q.firefox())z.input=z.keyup;k.listen(this.element,z);};y.prototype.initToggle=function(){"use strict";this.subscribe('blur',this.view.hide.bind(this.view));this.subscribe('focus',this.view.show.bind(this.view));};y.prototype.viewMousedown=function(){"use strict";this.selecting=true;};y.prototype.viewMouseup=function(){"use strict";this.selecting=false;};y.prototype.blur=function(){"use strict";if(this.selecting){this.selecting=false;return;}this.inform('blur');};y.prototype.click=function(){"use strict";var z=n.get(this.element);if(z.start==z.end)this.element.select();this.inform('click');};y.prototype.focus=function(){"use strict";this.checkValue();this.inform('focus');};y.prototype.keyup=function(){"use strict";if(this.resetOnKeyup&&!this.getValue())this.view.reset();this.checkValue();if(this.getValue().length===0)this.inform('change',null);};y.prototype.keydown=function(event){"use strict";if(!this.view.isVisible()||this.view.isEmpty()){setTimeout(this.checkValue.bind(this),0);return;}switch(k.getKeyCode(event)){case o.TAB:this.handleTab(event);return;case o.UP:this.view.prev();break;case o.DOWN:this.view.next();break;case o.ESC:this.view.reset();break;default:setTimeout(this.checkValue.bind(this),0);return;}event.kill();};y.prototype.keypress=function(event){"use strict";if(this.view.getSelection()&&k.getKeyCode(event)==o.RETURN){this.view.select();event.kill();}};y.prototype.handleTab=function(event){"use strict";if(this.preventFocusChangeOnTab)if(this.view.getSelection()){event.kill();}else event.prevent();this.view.select();};y.prototype.select=function(z){"use strict";if(z&&this.setValueOnSelect){var aa=z.orig_text||z.text;this.setValue(aa);this.setHiddenValue(z.uid);this.selectedText=aa;i.addClass(this.inputWrap,'selected');}};y.prototype.afterSelect=function(){"use strict";this.keepFocused?l.set(this.element):this.element.blur();this.resetOnSelect?this.reset():this.view.reset();};y.prototype.unselect=function(){"use strict";if(this.setValueOnSelect){this.selectedText=null;i.removeClass(this.inputWrap,'selected');}this.setHiddenValue();this.inform('unselect',this);};y.prototype.setEnabled=function(z){"use strict";var aa=z===false;this.element.disabled=aa;i.conditionClass(this.root,'uiTypeaheadDisabled',aa);};y.prototype.reset=function(){"use strict";this.unselect();this.setValue();!this.keepFocused&&m.reset(this.element);this.view.reset();this.inform('reset');};y.prototype.getElement=function(){"use strict";return this.element;};y.prototype.setExclusions=function(z){"use strict";this._exclusions=z.map(String);};y.prototype.getExclusions=function(){"use strict";return this._exclusions;};y.prototype.setValue=function(z){"use strict";this.value=this.nextQuery=z||'';m.setValue(this.element,this.value);p.update(this.element);this.inform('change',z);};y.prototype.setHiddenValue=function(z){"use strict";this.hiddenInput.value=(z||z===0)?z:'';g.inform('Form/change',{node:this.hiddenInput});};y.prototype.getValue=function(){"use strict";return m.getValue(this.element);};y.prototype.getHiddenValue=function(){"use strict";return this.hiddenInput.value||'';};y.prototype.checkValue=function(){"use strict";var z=this.getValue();if(z==this.value)return;if(this.selectedText&&this.selectedText!=z)this.unselect();var aa=Date.now(),ba=aa-this.time;this.time=aa;this.value=this.nextQuery=z;this.performQuery(ba);};y.prototype.performQuery=function(z){"use strict";if(this.selectedText)return;z=z||0;if(this.fetching&&z<this.queryTimeout){this.data.query(this.nextQuery,true,this._exclusions,z);}else{this.data.query(this.nextQuery,false,this._exclusions,z);this.nextQuery=null;}};s(y.prototype,{events:['blur','focus','click','unselect','loading'],keepFocused:true,resetOnSelect:false,resetOnKeyup:true,setValueOnSelect:false,queryTimeout:250,preventFocusChangeOnTab:false});e.exports=y;},null);
__d("TypeaheadBestName",["TokenizeUtil","copyProperties"],function(a,b,c,d,e,f,g,h){function i(j){"use strict";this._typeahead=j;}i.prototype.enable=function(){"use strict";var j=this._typeahead.getView();this._subscription=j.subscribe('beforeRender',function(k,l){var m=l.value;for(var n=0;n<l.results.length;++n){var o=l.results[n];if(o.alternate_names==null)continue;if(g.isQueryMatch(m,o.default_name)){o.text=o.default_name;return;}for(var p=0;p<o.alternate_names.length;p++)if(g.isQueryMatch(m,o.alternate_names[p])){o.text=o.alternate_names[p];return;}o.text=o.default_name;}});};i.prototype.disable=function(){"use strict";this._typeahead.getView().unsubscribe(this._subscription);this._subscription=null;};h(i.prototype,{_subscription:null});e.exports=i;},null);
__d("legacy:BestNameTypeaheadBehavior",["TypeaheadBestName"],function(a,b,c,d,e,f,g){if(!a.TypeaheadBehaviors)a.TypeaheadBehaviors={};a.TypeaheadBehaviors.buildBestAvailableNames=function(h){h.enableBehavior(g);};},3);
__d("CompactTypeaheadRenderer",["BadgeHelper","DOM","TypeaheadFacepile"],function(a,b,c,d,e,f,g,h,i){function j(k,l){var m=[];if(k.xhp)return h.create('li',{className:'raw'},k.xhp);var n=k.photos||k.photo;if(n){if(n instanceof Array){n=i.render(n);}else n=h.create('img',{alt:'',src:n});m.push(n);}if(k.text){var o=[k.text];if(k.is_verified)o.push(g.renderBadge('xsmall','verified'));m.push(h.create('span',{className:'text'},o));}var p=k.subtext,q=k.category;if(p||q){var r=[];p&&r.push(p);p&&q&&r.push(" \u00b7 ");q&&r.push(q);m.push(h.create('span',{className:'subtext'},r));}var s=h.create('li',{className:k.type||''},m);return s;}j.className='compact';e.exports=j;},null);