/*!CK:744403774!*//*1427086740,*/

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

__d("StarsRatableBase",["Event","Arbiter","CSS","DOM","Parent","Run","copyProperties"],function(a,b,c,d,e,f,g,h,i,j,k,l,m){b.__markCompiled&&b.__markCompiled();function n(o,p,q,r){this.root=o;this.freezeOnClick=p;this.stars=j.scry(o,'a');this.listeners=[g.listen(this.root,'click',this._onClick.bind(this)),g.listen(this.root,'mousemove',this._onMouseMove.bind(this)),g.listen(this.root,'mouseout',this._onMouseOut.bind(this))];this.holdMouseMove=false;this.setRating(q);this.layerHides=0;if(r)h.subscribe('layer_hidden',function(){this.layerHides++;if(this.layerHides>=2)this.setRating(0);}.bind(this));l.onLeave(this.destroyListeners.bind(this));}n.init=function(o,p,q,r){return new n(o,p,q,r);};m(n.prototype,{_onClick:function(event){this.layerHides=0;var o=this._getStarIndexFromEvent(event);if(!o)return;this.setRating(o);if(this.freezeOnClick){this.freeze();}else this.holdMouseMove=true;event.prevent();},_onMouseMove:function(event){if(this.holdMouseMove)return;var o=this._getStarIndexFromEvent(event);if(!o)return;this.setStars(o,true);},_onMouseOut:function(event){this.holdMouseMove=false;this.updateStars();},_getStarIndexFromEvent:function(event){var o=k.byTag(event.getTarget(),'a');if(o)return this.stars.indexOf(o)+1;return 0;},setRating:function(o){this._rating=o;this.updateStars();},updateStars:function(){this.setStars(this._rating);},setStars:function(o,p){var q=p?'hoverStar':'fullStar',r=p?'fullStar':'hoverStar';for(var s=0;s<this.stars.length;++s){i.removeClass(this.stars[s],r);var t=(s>=o);i.conditionClass(this.stars[s],q,!t);i.conditionClass(this.stars[s],'emptyStar',t);}},freeze:function(){i.addClass(this.root,'uiStarsRated');this.destroyListeners();},destroyListeners:function(){this.listeners.forEach(function(o){o&&o.remove();});this.listeners=[];}});a.StarsRatableBase=e.exports=n;},null);
__d("TabBar",["ArbiterMixin","React","mixin"],function(a,b,c,d,e,f,g,h,i){b.__markCompiled&&b.__markCompiled();var j=i(g);for(var k in j)if(j.hasOwnProperty(k))m[k]=j[k];var l=j===null?null:j.prototype;m.prototype=Object.create(l);m.prototype.constructor=m;m.__superConstructor__=j;function m(n,o,p){"use strict";o.props=Object.assign({},o.props,{onTabClick:function(q){return this.inform(m.TAB_CLICK,q);}.bind(this)});h.render(n(o),p);}m.TAB_CLICK='onTabClick';e.exports=m;},null);
__d("PageStars",["Event","Locale","Style","copyProperties"],function(a,b,c,d,e,f,g,h,i,j){b.__markCompiled&&b.__markCompiled();var k=5;function l(m,n,o,p,q,r,s,t){this.myRating=q;this.avgRating=p;this.avgStars=n;this.myStars=o;this.margin=t;this.width=r;this.height=s;for(var u=0;u<m.length;u++){var v=m[u],w=u+1;for(var x=0;x<v.length;x++){if(!v[x])continue;g.listen(v[x],'mouseenter',this._hover.bind(this,w));g.listen(v[x],'mouseleave',this._mouseout.bind(this,w));g.listen(v[x],'click',this._click.bind(this,w));}}}j(l.prototype,{onClick:function(m){this.callback=m;},_updateUI:function(){if(this.hovered||this.myRating){this.avgStars&&this._setClip(this.avgStars,0);this.myStars&&this._setClip(this.myStars,this.hovered||this.myRating);}else{this.myStars&&this._setClip(this.myStars,0);this.avgStars&&this._setClip(this.avgStars,this.avgRating||0);}},_setClip:function(m,n){var o=Math.round(n*this.width+Math.floor(n)*this.margin),p=0;if(h.isRTL()){p=Math.round((k-n)*this.width+Math.floor(k-n)*this.margin);o+=p;}var q='rect(0px, '+o+'px, '+this.height+'px, '+p+'px)';i.set(m,'clip',q);},_click:function(m){this.myRating=m;this._updateUI();return this.callback&&this.callback(m);},_hover:function(m){this.hovered=m;this._updateUI();},_mouseout:function(m){if(this.hovered===m){this.hovered=null;this._updateUI();}},setAverageRating:function(m){this.avgRating=m;this._updateUI();},setMyRating:function(m){this.myRating=m;this._updateUI();}});e.exports=l;},null);
__d("PlaceStarSurvey",["AsyncRequest","copyProperties"],function(a,b,c,d,e,f,g,h){b.__markCompiled&&b.__markCompiled();var i={};h(i,{register:function(j,k,l){j.onClick(function(m){(new g(l[m])).setMethod('POST').setRelativeTo(k).send();});}});e.exports=i;},null);
__d("ReviewsController",["Arbiter","Dialog","Event","React","Image.react","Run","DOM","csx","fbt","ix","ge"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){b.__markCompiled&&b.__markCompiled();var r={},s={},t={},u={},v={},w={registerRevealProfanity:function(x,y,z){i.listen(y,'click',function(){x.style.display='none';z.style.display='inline';});},registerButton:function(x,y){r[y]=r[y]||[];r[y].push(x);},registerViewerReview:function(x,y){s[y]=s[y]||[];s[y].push(x);},registerComposer:function(x,y){t[y]=t[y]||[];t[y].push(x);},registerToggle:function(x,y,z,aa){u[x]=u[x]||[];u[x].push([y,z,aa]);},addUserReview:function(x,y,z,aa,ba,ca){this._updateState(true,x,y,z,aa,ba,ca);},deleteUserReview:function(x,y,z){this._updateState(false,x,null,null,null,y,z);},_updateState:function(x,y,z,aa,ba,ca,da){var ea,fa=s[y]||[];for(ea=0;ea<fa.length;ea++)m.remove(fa[ea]);var ga=u[y]||[];for(ea=0;ea<ga.length;ea++){var ha=ga[ea],ia=ha[x?1:2];m.setContent(ha[0],ia);}var ja=t[y]||[];for(ea=0;ea<ja.length;ea++){var ka=ja[ea];if(x){ka.hide();}else{ka.clear();ka.show();}}var la=r[y]||[];for(ea=0;ea<la.length;ea++){var ma=la[ea],na=m.find(ma,'.uiButtonText'),oa=m.find(ma,'i'),pa,qa;if(x){pa=p('/images/icons/buttons/check.png');qa=o._("Reviewed");}else{pa=p('/images/icons/buttons/feature.png');qa=o._("Review");}var ra=m.create('span'),sa={"padding-right":"5px"};j.render(j.createElement("div",null,qa),na);j.render(j.createElement(k,{src:pa,style:sa}),ra);m.replace(oa,ra);}if(x){var ta=m.scry(document,'#page_recommendations_browse_list')[0];if(ta)m.prependContent(ta,z);var ua=q('page_reviews_tab_list');if(ua)m.prependContent(ua,aa);var va="ul._1rhx",wa=m.scry(document,va)[0];if(wa)m.prependContent(wa,ba);}if(ca){var xa=q('page_reviews_pill_and_histogram');if(xa)m.replace(xa,ca);}if(da){var ya=q('pages_inline_rating_summary');if(ya)m.replace(ya,da);}},registerPhotoUpload:function(x,y){g.subscribe('multi-upload/images-upload-completed/'+y,function(){v[y]=false;});g.subscribe('multi-upload/images-upload-start/'+y,function(){v[y]=true;});i.listen(x,'submit',function(){if(v[y]){new h().setTitle(o._("Photos Are Uploading")).setSemiModal(true).setButtons(h.OK).setBody(o._("Please wait until photo is uploaded before posting.")).show();return false;}return true;}.bind(this));}};l.onLeave(function(){r={};s={};t={};u={};v={};});e.exports=w;},null);
__d("PageReviewInlineComposer",["Arbiter","CSS","Event","Input","ReviewsController","Run","fbt"],function(a,b,c,d,e,f,g,h,i,j,k,l,m){b.__markCompiled&&b.__markCompiled();function n(o,p,q,r,s,t,u,v,w,x){"use strict";w=w.getInstance();w.subscribe('changed',function(){h.conditionShow(x,!w.getIsPublicSelected());});if(!v)s&&i.listen(s,'focus',function(){h.addClass(s,'expand');q&&h.show(q);s.setAttribute('rows',6);});l.onBeforeUnload(this.$PageReviewInlineComposer0.bind(this));u.onClick(function(y,z){y.setAttribute('value',z);s.focus();}.bind(null,r));this.$PageReviewInlineComposer1=p;this.$PageReviewInlineComposer2=u;this.$PageReviewInlineComposer3=s;this.$PageReviewInlineComposer4=t;this.$PageReviewInlineComposer5=r;k.registerComposer(this,o);k.registerPhotoUpload(p,t);}n.prototype.$PageReviewInlineComposer0=function(){"use strict";if(this.$PageReviewInlineComposer3.offsetParent!==null&&!j.isEmpty(this.$PageReviewInlineComposer3)&&!(a.Dialog&&a.Dialog.getCurrent()))return m._("You haven't finished your review yet. Do you want to leave without finishing?");};n.prototype.hide=function(){"use strict";h.hide(this.$PageReviewInlineComposer1);};n.prototype.show=function(){"use strict";h.show(this.$PageReviewInlineComposer1);};n.prototype.clear=function(){"use strict";this.$PageReviewInlineComposer2.setMyRating(0);this.$PageReviewInlineComposer3.value='';this.$PageReviewInlineComposer5.setAttribute('value',null);if(this.$PageReviewInlineComposer4!==null)g.inform('multi-upload/composer-reset/'+this.$PageReviewInlineComposer4,this,g.BEHAVIOUR_PERSISTENT);};e.exports=n;},null);
__d("ReviewPagingNotifier",["Arbiter"],function(a,b,c,d,e,f,g){b.__markCompiled&&b.__markCompiled();var h={PAGING_STATE:'paging_state',PAGING_FINISHED:'paging_finished',send_state:function(i,j){var k={context:i,state:j};g.inform(h.PAGING_STATE,k,g.BEHAVIOR_STATE);},paging_finished:function(i){h.send_state(i,h.PAGING_FINISHED);}};e.exports=h;},null);
__d("ReviewSortTabbing",["cx","Arbiter","CSS","ReviewPagingNotifier","Style","TabBar"],function(a,b,c,d,e,f,g,h,i,j,k,l){b.__markCompiled&&b.__markCompiled();function m(n,o,p,q){this.tab_bar=n;this.tabs=p;this.selected_tab=o;this.review_lists=q;this.loaded_tabs={star_rating:true};n.subscribe(l.TAB_CLICK,function(r,s){var t=this.review_lists[this.selected_tab],u=this.review_lists[s];if(!(s in this.loaded_tabs)){var v=k.get(t,'height');k.apply(u,{'min-height':v});}i.removeClass(this.review_lists[this.selected_tab],"_58z-");i.addClass(this.review_lists[s],"_58z-");this.selected_tab=s;}.bind(this));h.subscribe(j.PAGING_STATE,function(r,s){if(s.state===j.PAGING_FINISHED){k.apply(this.review_lists[s.context],{'min-height':0});this.loaded_tabs[s.context]=true;}return false;}.bind(this));}m.init=function(n,o,p,q){return new m(n,o,p,q);};e.exports=m;},null);
__d("TabBarShim",["DOMContainer.react","React","isNode"],function(a,b,c,d,e,f,g,h,i){b.__markCompiled&&b.__markCompiled();var j=function(k){var l;if(k.children)l=k.children.map(function(n){if(typeof n==='object'&&typeof n.ctor==='function'){return j(n);}else if(i(n)){return h.createElement(g,null,n);}else return n;});if(l.length===1)l=l[0];var m=k.ctor;return h.createElement(m,h.__spread({},k.props),l);};e.exports=j;},null);
__d("CovercardArrow",["ContextualDialogArrow","CSS","DOMQuery","Locale","Style","csx","cx"],function(a,b,c,d,e,f,g,h,i,j,k,l,m){b.__markCompiled&&b.__markCompiled();var n=-45,o=45,p=9;if(j.isRTL()){n=-n;o=-o;}function q(s){"use strict";this._layer=s;}q.prototype.enable=function(){"use strict";this._layer.enableBehavior(g);var s=this._layer.getContentRoot();this._arrowWrapper=i.scry(s,"._7lh")[0];if(!this._arrowWrapper)return;this._arrowShadow=i.scry(this._arrowWrapper,"._7li")[0];if(!this._arrowShadow)return;var t=null;if(r(this._arrowWrapper))t=this._renderArrowWithRotate.bind(this);if(!t)return;if(j.isRTL())h.addClass(s,"_7lf");this._subscription=this._layer.subscribe('reposition',function(u,v){var w=v.getPosition()=='below';h.conditionClass(s,"_53ih",w);w&&t(v);});};q.prototype.disable=function(){"use strict";this._subscription&&this._subscription.unsubscribe();this._subscription=null;};q.prototype._calculateArrowOffset=function(s){"use strict";var t=g.getOffsetPercent(s),u=g.getOffset(s,t,this._layer),v=k.get(this._layer.getContentRoot(),'width');return parseInt(v,10)*(t/100)+u;};q.prototype._renderArrowWithRotate=function(s){"use strict";var t=i.scry(this._arrowWrapper,"._7lj")[0];if(!t)return;var u=i.scry(this._arrowWrapper,"._1ubp")[0];if(!u)return;var v=r(this._arrowWrapper);if(!v)return;var w=this._calculateArrowOffset(s),x=p+w,y=-p;if(j.isRTL()){x=-x;y=-y;}this._arrowWrapper.style[v]='translate('+x+'px, -'+p+'px) '+'rotate('+o+'deg)';t.style[v]='rotate('+n+'deg) '+'translate('+(-x)+'px, '+(p-12)+'px)';u.style[v]='rotate('+n+'deg) '+'translate('+y+'px, 0)';};function r(s){if(!s)s=document.body;var t=['transform','WebkitTransform','msTransform','MozTransform','OTransform'],u;while(u=t.shift())if(s.style[u]!==(void 0))return u;return null;}e.exports=q;},null);