/*!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;xba()){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;ia0;};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;v0&&this.index!==this.getDefaultIndex(this.results)&&this.indexthis.items.length-1){u=-1;}else if(u<-1)u=this.items.length-1;if(u>=0&&u=0&&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