(window.webpackJsonp=window.webpackJsonp||[]).push([[27],{1e3:function(e,t,a){e.exports={"bp-min-md":"(min-width: 800px)",container:"VerifiedReviewsBlock-module--container--91982b",textContainer:"VerifiedReviewsBlock-module--textContainer--1252cb"}},1001:function(e,t,a){e.exports={criteria:"VenueCriteria-module--criteria--82144e",name:"VenueCriteria-module--name--228fc0",criteriaCol:"VenueCriteria-module--criteriaCol--60cf9a"}},1044:function(e,t,a){"use strict";a.d(t,"a",(function(){return me}));var n=a(0),r=a.n(n),i=a(5),s=a(343),o=a(42),l=a(394),c=a.n(l),u=a(953),m=a(954);var d=a(48),v=a(928),p=a(794),g=a(786),f=a(789),w=a(861),b=a(949),h=a(40),E=a(350),R=a(774),y=a(825),x=a(993),N=a.n(x);const C="\u2014";function k(e){const{options:t,onChange:a,value:n}=e;return r.a.createElement("div",{className:N.a.select},r.a.createElement(R.a,{labelId:"treatmentFilter",initialSelected:n.toString(),menuWidthAuto:!0,caretSize:16,enableScroll:!0,onSelected:function(e){const t=parseInt(e,10);if(isNaN(t)){if(e===n)return;a(e)}else{if(t===n)return;a(t)}}},t.map((e=>r.a.createElement(R.b,{key:e.value,value:e.value.toString()},r.a.createElement(S,{option:e}))))))}function S({option:e,isDropdownOption:t}){const a=e.rating?r.a.createElement("div",{className:N.a.optionRating},r.a.createElement("span",null,e.rating),r.a.createElement(y.a,{size:16,fill:"full","data-testid":"star-small"})):r.a.createElement("div",{className:N.a.optionRating},r.a.createElement("span",{className:N.a.noRating},C)),n=Object(i.a)({[N.a.option]:!0,[N.a.buttonText]:!t});return r.a.createElement("div",{className:n},r.a.createElement(h.a,{type:"body"},e.label),t?a:null)}var T=a(994),O=a.n(T);function P(e){const{val:t,max:a,colour:n,className:s,showMin:o,...l}=e,c=0===a?0:Math.floor(t/a*100),u={[O.a.inner]:!0,[O.a.min]:o};return r.a.createElement("div",{...l,className:Object(i.a)(O.a.outer,s)},r.a.createElement("div",{className:Object(i.a)(u),style:{backgroundColor:n,width:`${c}%`}}))}var V=a(995),j=a.n(V);function F({name:e,onChange:t,label:a,isChecked:r=!1}){return n.createElement("div",{className:j.a.container},n.createElement("input",{type:"checkbox",name:e,id:e,onChange:function(){t(!r)},checked:r}),n.createElement("label",{htmlFor:e,className:j.a.label,tabIndex:0,onKeyPress:function(e){"Enter"===e.key&&t(!r)}},a))}var D=a(951),L=a(996),A=a.n(L);function M({rating:e,checked:t,count:a=0,totalReviews:n,onChange:i}){const s=a>0,o=r.a.createElement(r.a.Fragment,null,r.a.createElement(D.a,{rating:e,size:16,showRatingValue:!1}),r.a.createElement("div",{className:A.a.progressBar},r.a.createElement(P,{val:a,max:n,showMin:s})),r.a.createElement("div",{className:A.a.count},a));return r.a.createElement("div",{className:A.a.ratingContainer},r.a.createElement(F,{isChecked:t,name:e,label:o,onChange:i}))}var B=a(997),H=a.n(B);const U=[5,4,3,2,1];class W extends r.a.Component{constructor(e){super(e),this.handleChange=(e,t)=>{this.props.onChange(e,t)},this.handleToggleRatingCount=()=>{const e=!this.state.ratingCountExpanded;this.setState({ratingCountExpanded:!this.state.ratingCountExpanded}),Object(w.b)(e)},this.handleRatingSelect=(e,t)=>{const{selectedOption:a,selectedRatings:n}=this.props,r={...n,[e]:t};this.handleChange(a,r),Object(w.a)(e,t)},this.handleTreatmentSelect=e=>{const{selectedRatings:t}=this.props;this.handleChange(e,t),Object(w.e)(e)},this.state={ratingCountExpanded:!1,isBrowser:!1}}componentDidMount(){window.addEventListener("resize",(()=>this.forceUpdate())),this.setState({isBrowser:!0})}componentWillUnmount(){window.removeEventListener("resize",(()=>this.forceUpdate()))}render(){const{ratingCounts:e,options:t,i18n:a,selectedRatings:n,selectedOption:i}=this.props,{ratingCountExpanded:s}=this.state,l=e.reduce(((e,t)=>e+t),0),c=t||[],u=this.state.isBrowser&&"mobile"===Object(g.d)(),m=s||!u,d=c.length>0,v=(e=>e.map((e=>({value:e.id.toString(),label:e.name,rating:e.average?e.average.toFixed(1):e.average}))))(c).sort(((e,t)=>e.label>t.label?1:-1)),p=[{value:"ALL",label:a("page.venue.review-filter.all-treatments")}].concat(v);return r.a.createElement("div",{className:H.a.reviewFilter},d?r.a.createElement(h.a,{as:"h3",type:"caption",className:H.a.fullTitle},a("page.venue.review-filter.filter-by-treatment")):null,r.a.createElement(h.a,{as:"h3",type:"smHeader",className:H.a.mobileTitle},a("page.venue.review-filter.filter-reviews")),d?r.a.createElement("div",{className:H.a.treatmentSelect},r.a.createElement(o.a,{align:"center"},r.a.createElement(h.a,{className:H.a.treatmentSelectTitle},a("page.venue.review-filter.treatment")),r.a.createElement(k,{options:p,onChange:this.handleTreatmentSelect,value:i}))):null,r.a.createElement(h.a,{as:"h3",type:"caption",className:H.a.subTitle},a("page.venue.review-filter.filter-by-rating")),r.a.createElement(o.a,{align:"center",justify:"between",className:H.a.ratingToggle,onClick:this.handleToggleRatingCount,"data-cy":"ToggleRating"},r.a.createElement(h.a,null,a("page.venue.review-filter.toggle-counts")),r.a.createElement(h.a,{type:"smHeader"},r.a.createElement(o.a,{align:"center"},a("page.venue.review-filter.filter-by-rating"),r.a.createElement(E.a,{containerStyle:{marginLeft:"8px !important"},colour:"bloomGreyNavy500",size:E.c.Medium,direction:s?E.b.Up:E.b.Down,animated:!0})))),m?r.a.createElement("div",{className:H.a.ratingCounts},U.map((t=>r.a.createElement(M,{key:t,checked:n[t],rating:t.toString(),count:e[5-t],totalReviews:l,onChange:e=>this.handleRatingSelect(t,e)})))):null)}}var z=a(55),$=a(56),q=a(998),I=a.n(q);function _(e){const{i18n:t,resetFilters:a}=e;return r.a.createElement(z.a,{align:"center",className:I.a.reviewsEmpty},r.a.createElement("div",{className:I.a.icon}),r.a.createElement(h.a,{as:"div",type:"mdHeader",className:I.a.primaryText},t("page.venue.review-filter.no-reviews-primary-text")),r.a.createElement(h.a,{as:"div",className:I.a.secondaryText},t("page.venue.review-filter.no-reviews-secondary-text")),r.a.createElement($.a,{label:t("page.venue.review-filter.reset-button-label"),colour:$.b.Blue,onClick:a}))}var K=a(999),G=a.n(K);function J(e){return r.a.createElement("div",{className:G.a.container},r.a.createElement(h.a,{as:"h2",type:"caption",className:G.a.heading},e.heading),r.a.createElement(h.a,{as:"p",type:"caption",className:G.a.typeBrowsePages},e.venueTypes.map((e=>r.a.createElement("a",{href:e.uri,key:e.uri},e.label)))),r.a.createElement("a",{href:e.location.uri,className:G.a.locationBrowsePage},r.a.createElement(h.a,{type:"caption"},e.location.label)))}var Q=a(910),X=a(1e3),Y=a.n(X);function Z(e){return r.a.createElement("div",{className:Y.a.container},r.a.createElement(o.a,{space:"sm",align:"center"},r.a.createElement(Q.a,{size:24}),r.a.createElement(z.a,{space:"xxs",className:Y.a.textContainer},r.a.createElement(h.a,{as:"h2",type:"captionHeavy"},e.heading),r.a.createElement(h.a,{type:"caption"},e.body))))}var ee=a(938),te=a(911),ae=a.n(te);const ne=e=>"ALL"===e?null:Number(e),re=[5,4,3,2,1],ie=()=>{const e={};return re.forEach((t=>{e[t]=!1})),e};function se(e){const t=r.a.useRef(null),[a,n]=r.a.useState({loading:!1,fetchFailed:!1,page:0,nextPage:1,ratingHistogram:e.venue.venueReviews.ratingHistogram,selectedRatings:ie(),selectedOption:"ALL",reviews:e.venue.venueReviews.reviews,pagination:e.pagination}),s=(t=!1,r=null)=>{let i;var s;i=null===r?t?a.page+1:0:r,e.generatePaginationUri&&window.history.pushState(null,"null",e.generatePaginationUri(i+1)),n({...a,loading:!0,fetchFailed:!1}),Object(v.b)(e.requestData,e.venue.venue.id,ne(a.selectedOption),null,i,ee.a,(s=a.selectedRatings,Object.keys(s).reduce(((e,t)=>s[t]?e.concat(t):e),[])),!0,!!ne(a.selectedOption)).then((e=>{if(!e)return;const r=t?a.reviews.concat(e.reviews):e.reviews;n({...a,loading:!1,reviews:r,page:i,nextPage:i+1,fetchFailed:!1,ratingHistogram:e.ratingHistogram,pagination:e.pagination})})).catch((()=>{n({...a,loading:!1,fetchFailed:!0})}))},o=Object(f.a)(a.selectedOption),l=Object(f.a)(a.selectedRatings);r.a.useEffect((()=>{o&&l&&s()}),[a.selectedOption,a.selectedRatings]);const u=(e,t)=>{n({...a,selectedRatings:t,selectedOption:e})},m=()=>{const e="mobile"===Object(g.d)(),a=t.current;e&&null!==a&&Object(p.b)(a.getBoundingClientRect().top)},{i18n:d,channelData:h,venue:E,generatePaginationUri:R,venueTypeLinks:y}=e,x=E.venueReviews.treatmentCategoryOverallRatingAverages||[],N=Object(i.a)(c.a["col-xs-12"],c.a["col-sm-8"],c.a["col-lg-8"],c.a["col-sm-offset-4"],c.a["col-md-offset-0"]),C=Object(i.a)(c.a["col-md-4"],c.a["col-md-offset-0"],c.a["col-sm-8"],c.a["col-sm-offset-4"],ae.a.venueReviewSidebar),k=new Array(5);a.ratingHistogram.forEach((({rating:e,count:t})=>{k[e-1]=t}));const S=a.reviews.length?r.a.createElement(b.a,{i18n:d,channelData:h,venueId:E.venue.id,reviews:a.reviews,nextPage:a.nextPage,more:(T=a.ratingHistogram,(Object.keys(a.selectedRatings).filter((e=>a.selectedRatings[e])).length?T.filter((({rating:e})=>a.selectedRatings[e])):T).reduce(((e,t)=>e+t.count),0)>(a.page+1)*ee.a&&a.reviews.length>0),fetchFailed:a.fetchFailed,venueNormalisedName:E.venue.normalisedName,generateReviewsUri:!0,onLoadMoreReviews:()=>{s(!0)},loading:a.loading,pagination:a.pagination,generatePaginationUri:R,onPaginationClick:a=>{var n;if(0===a&&void 0!==e.generatePaginationUri)return void(window.location.href=e.generatePaginationUri(a+1));s(!1,a);const r=t.current;null!==r&&Object(p.b)((null===(n=r.getBoundingClientRect())||void 0===n?void 0:n.top)-25)},showTreatmentNames:x.length>0}):r.a.createElement(_,{i18n:d,resetFilters:()=>{u("ALL",ie()),Object(w.c)(),m()}});var T;const O=y&&r.a.createElement(J,{...y});return r.a.createElement(r.a.Fragment,null,r.a.createElement("div",{className:c.a.row,ref:t,"data-cy":"Reviews"},r.a.createElement("div",{className:C},r.a.createElement(W,{ratingCounts:k.reverse(),options:x,i18n:d,onChange:u,selectedRatings:a.selectedRatings,selectedOption:a.selectedOption}),r.a.createElement(Z,{heading:d("venue.reviews.verified-reviews.heading"),body:d("venue.reviews.verified-reviews.body")}),y&&r.a.createElement("div",{className:ae.a.venueTypeDesktopWrapper},O)),r.a.createElement("div",{className:N},S)),y&&r.a.createElement("div",{className:ae.a.venueTypeMobileWrapper},O))}var oe=a(84),le=a(1001),ce=a.n(le);function ue(e){const{dimensions:t}=e,a=Object(oe.a)({device:"mobile"}),n=Object(oe.a)({device:"tablet"}),s=Object(oe.a)({device:"desktop"}),l=Object(i.a)(c.a["col-sm-4"],ce.a.criteriaCol);if(!t.length)return null;function u(e){return r.a.createElement(r.a.Fragment,null,r.a.createElement("div",{className:ce.a.name},r.a.createElement(h.a,null,e.name)),r.a.createElement(D.a,{rating:e.average,size:24,showRatingValue:!1}))}return r.a.createElement("div",{className:l},t.map(((e,t)=>r.a.createElement("div",{key:t,className:ce.a.criteria},(a||s)&&r.a.createElement(o.a,{align:"center"},u(e)),n&&r.a.createElement(z.a,{space:"xs"},u(e))))))}const me=({requestData:e,venue:t,channelData:a,i18n:n,pagination:l,generatePaginationUri:v,venueTypeLinks:p})=>{const{rating:g}=t.venue,f={stars:ae.a["venue-score-stars"]},w=Object(i.a)(c.a.row,ae.a.venueReviewRow),b=Object(i.a)(c.a["col-sm-4"],ae.a.venueScoreCol),[h,E]=r.a.useState(!1),R=r.a.useRef(null),y=function(e,t){const{threshold:a=0,root:n=null,rootMargin:i="0%",freezeOnceVisible:s=!1}=null!=t?t:{},[o,l]=r.a.useState(),c=(null==o?void 0:o.isIntersecting)&&s;return r.a.useEffect((()=>{const t=!!window.IntersectionObserver,r=null==e?void 0:e.current;if(!t||c||!r)return;const s=new IntersectionObserver((([e])=>{l(e)}),{threshold:a,root:n,rootMargin:i});return s.observe(r),()=>{s.disconnect()}}),[e,a,n,i,c]),o}(R,{threshold:0}),x=!!(null==y?void 0:y.isIntersecting);function N(){return r.a.createElement(r.a.Fragment,null,r.a.createElement("div",{className:b},r.a.createElement(u.a,{displayAverage:g.displayAverage,average:g.average,count:g.count,extraStyles:f,channelData:a})),function(){const e=g.dimensions;if(void 0===e)return;const t=Math.ceil(e.length/2);return r.a.createElement(r.a.Fragment,null,r.a.createElement(ue,{dimensions:e.slice(0,t)}),r.a.createElement(ue,{dimensions:e.slice(t)}))}())}return r.a.useEffect((()=>{x&&!h&&(Object(d.d)({category:"venue",property:"reviews",action:"view"}),E(!0))}),[x,h]),r.a.createElement("div",{ref:R},r.a.createElement("div",{className:w},r.a.createElement(s.a,{serverRender:!0,device:"mobile"},N()),r.a.createElement(s.a,{device:["tablet","desktop"]},r.a.createElement(o.a,{splitAfter:0,align:"center"},N()))),r.a.createElement("div",{className:ae.a.divider},r.a.createElement(m.a,null)),r.a.createElement(se,{i18n:n,channelData:a,requestData:e,venue:t,pagination:l,generatePaginationUri:v,venueTypeLinks:p}))}},1355:function(e,t,a){e.exports={baseWrapper:"compose-module--baseWrapper--ff8a8d","text-smaller":"12px","text-small":"13px","text-large":"16px","bp-min-md":"(min-width: 800px)",container:"Header-module--container--0c4d14",pageWidthWrapper:"Header-module--pageWidthWrapper--4bdcbf compose-module--baseWrapper--ff8a8d",venueName:"Header-module--venueName--52c5eb",venueAddress:"Header-module--venueAddress--85349b",bookCta:"Header-module--bookCta--354520"}},1356:function(e,t,a){e.exports={baseWrapper:"compose-module--baseWrapper--ff8a8d","text-smaller":"12px","text-regular":"14px","bp-min-md":"(min-width: 800px)",reviewsSection:"VenueReviewsPage-module--reviewsSection--bec8c6 compose-module--baseWrapper--ff8a8d compose-module--baseWrapper--ff8a8d",preamble:"VenueReviewsPage-module--preamble--3a8ca6",poweredByTreatwellWrapper:"VenueReviewsPage-module--poweredByTreatwellWrapper--6e8f6c"}},1460:function(e,t,a){"use strict";a.r(t),a.d(t,"VenueReviewsPage",(function(){return f}));var n=a(0),r=a.n(n),i=a(352);var s=a(1044),o=a(349);var l=a(26),c=a(395),u=a(403),m=a(1355),d=a.n(m);function v(e){const{breadcrumbs:t,venueReviewsTitle:a,venueAddress:n,bookCta:i}=e;return r.a.createElement("div",{className:d.a.container},r.a.createElement("header",{className:d.a.pageWidthWrapper},r.a.createElement(u.a,{breadcrumbsParams:t,lastElementLink:!0}),r.a.createElement("h1",{className:d.a.venueName},a),r.a.createElement("p",{className:d.a.venueAddress},n),r.a.createElement("a",{href:i.uri,className:d.a.bookCta},i.label)))}var p=a(1356),g=a.n(p);function f(){const e=r.a.useContext(l.a);Object(c.b)();const t=e.pageData.cms,a=e.pageData.venueReviews.venueReviews.pagination,{...n}=e.pageData,u=function(e,t,a,n,r){const s=Object(i.b)(a.address.addressLines,a.address.postalCode,e.code);return{bookCta:{label:t.page["venue-reviews"]["book-cta"],uri:r("venue",{normalisedName:a.normalisedName})},breadcrumbs:n.map((e=>({name:e.name,uri:e.uri.desktopUri}))),venueAddress:null===s?"":s,venueReviewsTitle:t.page["venue-reviews"].title.replace("{venueName}",a.name)}}(e.channel,t,e.pageData.venueReviews.venueReviewDetails,e.pageData.venueReviews.venueBreadcrumbs,e.generateUri),m=function(e,t){return{heading:e.page["venue-reviews"]["venue-type-links-heading"],venueTypes:t.venueTypes.map((a=>({label:Object(o.c)(e.page["venue-reviews"]["venue-type-browse-link"],a.name,t.location.name),uri:a.uri.desktopUri}))),location:{label:Object(o.c)(e.page["venue-reviews"]["venue-location-browse-link"],t.location.name),uri:t.location.uri.desktopUri}}}(t,e.pageData.venueReviews.venueTypeUris);return r.a.createElement(r.a.Fragment,null,r.a.createElement(v,{...u}),r.a.createElement("section",{className:g.a.reviewsSection},r.a.createElement("div",{className:g.a.preamble},r.a.createElement("p",null,t.page["venue-reviews"].preamble)),r.a.createElement(s.a,{channelData:e.channel,i18n:e.i18n,requestData:n,venue:{venue:{id:e.pageData.venueReviews.venueReviewDetails.venueId,rating:e.pageData.venueReviews.venueReviewDetails.rating},venueReviews:{ratingHistogram:e.pageData.venueReviews.venueReviews.ratingHistogram,reviews:e.pageData.venueReviews.venueReviews.reviews,treatmentCategoryOverallRatingAverages:e.pageData.venueReviews.venueReviews.treatmentCategoryOverallRatingAverages}},pagination:a,generatePaginationUri:function(t){const a=e.pageData.venueReviews.venueReviewDetails;return 1===t?e.generateUri("venue",{normalisedName:a.normalisedName}):e.generateUri("venueReviews",{normalisedName:a.normalisedName,page:t})},venueTypeLinks:m})))}},786:function(e,t,a){"use strict";a.d(t,"a",(function(){return n})),a.d(t,"d",(function(){return r})),a.d(t,"c",(function(){return i})),a.d(t,"e",(function(){return s})),a.d(t,"b",(function(){return o}));const n="mobile";function r(){return"undefined"==typeof window?"server":i(window.innerWidth)}function i(e){return e>=992?"desktop":e>=520?"tablet":"mobile"}function s(e){const t=document.querySelector(e);t&&window.scrollTo({top:t.getBoundingClientRect().top,behavior:"smooth"})}function o(e){e.clientHeight}},789:function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a.n(n);function i(e){const t=r.a.useRef();return r.a.useEffect((()=>{t.current=e})),t.current}},794:function(e,t,a){"use strict";a.d(t,"b",(function(){return r})),a.d(t,"a",(function(){return i}));a(824);const n=25;function r(e){const t=Math.floor(document.body.getBoundingClientRect().top),a=Math.abs(t-e);let r=Math.abs(t);const i=a-r,s=i/n;let o=0;const l=()=>{r+=s,o+=Math.abs(s),window.scrollTo(0,r),o+Math.abs(s)<Math.abs(i)?window.requestAnimationFrame(l):window.scrollTo(0,a)};window.requestAnimationFrame(l)}function i(e,t,a){const r=Math.floor(e.scrollTop);let i=Math.abs(r);const s=a-i,o=s/n;let l=0;const c=Math.floor(e.scrollLeft);let u=Math.abs(c);const m=t-u,d=m/n;let v=0;const p=()=>{i+=o,l+=Math.abs(o),u+=d,v+=Math.abs(d),e.scrollTo(u,i),v+Math.abs(d)<Math.abs(m)||l+Math.abs(o)<Math.abs(s)?window.requestAnimationFrame(p):e.scrollTo(t,a)};window.requestAnimationFrame(p)}},824:function(e,t,a){(function(e){for(var t="undefined"==typeof window?e:window,a=0,n=["ms","moz","webkit","o"],r=0;r<n.length&&!t.requestAnimationFrame;++r)t.requestAnimationFrame=t["".concat(n[r],"RequestAnimationFrame")],t.cancelAnimationFrame=t["".concat(n[r],"CancelAnimationFrame")]||t["".concat(n[r],"CancelRequestAnimationFrame")];t.requestAnimationFrame||(t.requestAnimationFrame=function(e){var n=(new Date).getTime(),r=Math.max(0,16-(n-a)),i=t.setTimeout((function(){e(n+r)}),r);return a=n+r,i}),t.cancelAnimationFrame||(t.cancelAnimationFrame=function(e){clearTimeout(e)})}).call(this,a(43))},840:function(e,t,a){e.exports={container:"Pagination-module--container--86fbd0",item:"Pagination-module--item--b6f01b",active:"Pagination-module--active--c6c14b",prev:"Pagination-module--prev--f23148",next:"Pagination-module--next--740edf"}},861:function(e,t,a){"use strict";a.d(t,"a",(function(){return o})),a.d(t,"e",(function(){return l})),a.d(t,"d",(function(){return c})),a.d(t,"c",(function(){return u})),a.d(t,"b",(function(){return m}));var n,r,i=a(48);!function(e){e.Expand="expand",e.Collapse="collapse",e.On="on",e.Off="off"}(n||(n={})),function(e){e.SelectRating="select_rating",e.SelectTreatment="select_treatment"}(r||(r={}));const s=(e,t,a,n,r="venue_review_filter")=>Object(i.d)({category:r,action:e,value:t,property:a,label:n}),o=(e,t)=>{const a=t?n.On:n.Off;return s(r.SelectRating,e,a)},l=e=>{const t="ALL"===e?0:Number(e);return s(r.SelectTreatment,t)},c=()=>s("show_more",void 0,void 0,void 0,"venue_review_list"),u=()=>s("reset"),m=e=>{const t=e?n.Expand:n.Collapse;return s("rating_toggle",void 0,t)}},879:function(e,t,a){"use strict";function n(e){return e.altKey||e.ctrlKey||e.shiftKey||e.metaKey||e.button>0}a.d(t,"a",(function(){return n}))},910:function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a.n(n),i=a(94);const s={colourTW:i.ColorBloomTeal700,size:"16"};function o({size:e}){const t=e||s.size,a=s.colourTW;return r.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 24 24"},r.a.createElement("defs",null,r.a.createElement("path",{id:"a",d:"M16.138 7.956l1.542 1.543-7.316 7.317L6.32 12.77l1.542-1.542 2.502 2.5 5.774-5.773zM12 21.818c5.422 0 9.818-4.396 9.818-9.818S17.422 2.182 12 2.182 2.182 6.578 2.182 12 6.578 21.818 12 21.818zM12 24C5.373 24 0 18.627 0 12S5.373 0 12 0s12 5.373 12 12-5.373 12-12 12z"})),r.a.createElement("use",{fill:a,fillRule:"evenodd",href:"#a"}))}},911:function(e,t,a){e.exports={"min-viewport-width":"935px","max-viewport-width":"1160px","bp-min-md":"(min-width: 800px)","bp-max-xs":"(max-width: 519px)",advertisement:"VenueReviews-module--advertisement--862a1a",venueReviewRow:"VenueReviews-module--venueReviewRow--9822b1",divider:"VenueReviews-module--divider--3b100a",venueReviewSidebar:"VenueReviews-module--venueReviewSidebar--113b06",venueTypeDesktopWrapper:"VenueReviews-module--venueTypeDesktopWrapper--3e3327",venueTypeMobileWrapper:"VenueReviews-module--venueTypeMobileWrapper--c3b734",venueScoreCol:"VenueReviews-module--venueScoreCol--d0e271","venue-score-stars":"VenueReviews-module--venue-score-stars--8ed6d6",ratings:"VenueReviews-module--ratings--c3385d"}},926:function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(42),s=a(99),o=a(878),l=a.n(o);function c(e,t){let a=!1,n=!1;return e>0&&e<t&&(a=!0),e<t-1&&(n=!0),{previousNavigation:a,nextNavigation:n}}var u=a(840),m=a.n(u),d=a(5),v=a(80),p=a(879);class g extends r.a.Component{constructor(){super(...arguments),this.onClick=e=>{this.props.changePage&&!Object(p.a)(e)&&(e.preventDefault(),this.props.changePage(this.props.page))}}render(){const{page:e,active:t,href:a,direction:n}=this.props,i=e+1;return n?r.a.createElement("a",{className:Object(d.a)(m.a.item,m.a[n]),href:a,onClick:this.onClick},r.a.createElement(v.a,null,i)):t?r.a.createElement("div",{className:Object(d.a)(m.a.item,m.a.active)},i):r.a.createElement("a",{className:m.a.item,href:a,onClick:this.onClick},i)}}class f extends r.a.PureComponent{render(){const{pagination:e,createPageUri:t,onPageChange:a}=this.props,n=e.page,o=e.totalPages;if(1===o)return null;const{pages:u,ellipsisStart:d,ellipsisEnd:v,previousNavigation:p,nextNavigation:f}=function(e,t,a){if(a%2==0)throw new Error("Pagination only works for an odd amount of pages");if(e>=t)return{pages:l()(0,Math.min(t,a)),ellipsisStart:!1,ellipsisEnd:!1,previousNavigation:!1,nextNavigation:!1};if(t<=a)return{pages:l()(0,t),ellipsisStart:!1,ellipsisEnd:!1,...c(e,t)};const n=t-1,r=Math.min(t,a);let i=e,s=e;for(let l=1;l<r;)i>0&&(i--,l++),l<r&&s<n&&(s++,l++);const o=l()(i,s+1),{ellipsisStart:u,ellipsisEnd:m,pages:d}=function(e,t){let a=!1,n=!1;const r=[...e];return e[0]>0&&(r[0]=0,a=!0),e[e.length-1]<t&&(r[r.length-1]=t,n=!0),{pages:r,ellipsisStart:a,ellipsisEnd:n}}(o,n);return{pages:d,ellipsisStart:u,ellipsisEnd:m,...c(e,t)}}(n,o,5),w=u.map((e=>r.a.createElement(g,{key:e,page:e,href:t(e+1),active:n===e,changePage:a})));return d&&w.splice(1,0,r.a.createElement("div",{key:"ellipsis-start",className:m.a.item},"\u2026")),v&&w.splice(-1,0,r.a.createElement("div",{key:"ellipsis-end",className:m.a.item},"\u2026")),p&&w.unshift(r.a.createElement(g,{key:"prev",direction:"prev",page:n-1,href:t(Object(s.j)(n)),changePage:a})),f&&w.push(r.a.createElement(g,{key:"next",direction:"next",page:n+1,href:t(Object(s.g)(n)),changePage:a})),r.a.createElement(i.a,{justify:"center",className:m.a.container},w)}}},928:function(e,t,a){"use strict";a.d(t,"a",(function(){return i})),a.d(t,"b",(function(){return s}));a(357);var n=a(101),r=a(399);a(988),a(423);const i=async(e,t,a,i=Object(n.a)())=>{const s=`/api/v1/venue/${t}/our-work/portfolio-images/by-image-id?imageIds=${a.map((e=>e.id)).join(",")}`;return await Object(r.a)(e,s,i)},s=(e,t,a,i,s,o,l=[],c=!1,u=!1,m=Object(n.a)())=>{let d=[`page=${s}`,`size=${o}`,`includeRatingHistogram=${c}`,`excludeUnverifiedReviews=${u}`,a?`treatmentCategoryIds=${a}`:""];l.length&&(d=d.concat([`ratings=${l.join(",")}`]));const v=`/api/v1/venue/${t}/review?${i?`menuItemId=${i}&`:""}${d.join("&")}`;return Object(r.a)(e,v,m)}},938:function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));const n=5},949:function(e,t,a){"use strict";a.d(t,"a",(function(){return S}));var n=a(0),r=a.n(n),i=a(5),s=a(40),o=a(926),l=a(951),c=a(42),u=a(989),m=a.n(u);function d(e){const[t,a]=r.a.useState(!1),{content:n,visibilityToggleLabels:i}=e;return r.a.createElement("div",{className:m.a.response,onClick:()=>{a((e=>!e))}},r.a.createElement(s.a,{as:"div",type:"body",className:m.a.title},t?i.isVisible:i.isHidden),t&&r.a.createElement(s.a,{as:"div",type:"body",className:m.a.reply},n))}var v=a(990),p=a.n(v);function g(e){const[t,a]=r.a.useState(!1),n=()=>{a((e=>!e))},{treatments:o}=e;return r.a.createElement(r.a.Fragment,null,o.map(((a,o)=>((a,o)=>{const{showAllLabel:l,treatments:u}=e;return!t&&0===o&&u.length>1?r.a.createElement(c.a,{space:"xxs",align:"center",key:o},r.a.createElement(s.a,{type:"caption",className:p.a.bubble},a),r.a.createElement(s.a,{type:"caption",className:Object(i.a)(p.a.bubble,p.a.showAll),onClick:n},l)):!t&&0!==o&&u.length>1?void 0:r.a.createElement(s.a,{type:"caption",className:p.a.bubble,key:o},a)})(a,o))))}var f=a(910),w=a(991),b=a.n(w);function h({review:e,response:t,reportLink:a,showAllTreatmentsLabel:n,showTreatmentNames:i}){var o;return r.a.createElement("div",{className:b.a.container},r.a.createElement("div",{className:b.a.stars},r.a.createElement(l.a,{rating:e.rating,size:24,showRatingValue:!1})),e.content&&r.a.createElement("div",{className:b.a.content},r.a.createElement(s.a,null,e.content)),(e.employeeDescription||e.treatmentNames&&e.treatmentNames.length>0)&&r.a.createElement("div",{className:b.a.treatmentMetadata},r.a.createElement(c.a,{space:"xs",align:"center",wrap:!0},e.employeeDescription&&r.a.createElement(s.a,{type:"caption",className:b.a.employeeDescription},e.employeeDescription),e.employeeDescription&&e.treatmentNames&&(null===(o=e.treatmentNames)||void 0===o?void 0:o.length)>0&&i&&r.a.createElement(s.a,{type:"caption"},"\u2022"),e.treatmentNames&&e.treatmentNames.length>0&&i&&r.a.createElement(g,{treatments:e.treatmentNames,showAllLabel:n}))),r.a.createElement("div",{className:b.a.dash}),r.a.createElement("div",{className:b.a.reviewMetadata},r.a.createElement(c.a,{space:"xs",align:"center",wrap:!0,splitAfter:3},r.a.createElement(s.a,{type:"caption",className:b.a.author},e.author),e.isVerified&&r.a.createElement(f.a,null),r.a.createElement(s.a,{type:"caption"},"\u2022"),r.a.createElement(s.a,{type:"caption",suppressHydrationWarning:!0},e.created),a.isVisible&&r.a.createElement("a",{href:a.uri,className:b.a.reportLink},r.a.createElement(s.a,{type:"caption"},a.label)))),t.content&&r.a.createElement(d,{...t}))}var E=a(396);function R(e,t,a,n){return{review:{rating:e.rating,content:e.content.generated?"":e.content.content,employeeDescription:e.employeeDescription||"",...e.treatmentNames&&{treatmentNames:e.treatmentNames},author:e.reviewer.name||a("venue.reviews.anonymous"),isVerified:e.verified,created:Object(E.e)(e.createdAt,t.languageCode)},response:{content:e.venueResponse?e.venueResponse.content:"",visibilityToggleLabels:{isVisible:a("venue.reviews.show-response-opened"),isHidden:a("venue.reviews.show-response-closed")}},reportLink:{label:a("venue.reviews.report"),uri:a("venue.reviews.report-url"),isVisible:"WHN_GB"===t.code},showAllTreatmentsLabel:a("venue.reviews.show-all-treatments"),showTreatmentNames:n}}var y=a(26),x=a(789),N=a(992),C=a.n(N),k=a(861);const S=r.a.forwardRef(((e,t)=>{const[a,n]=r.a.useState(!0),[l,c]=r.a.useState(!1),u=Object(x.a)(e.loading);r.a.useEffect((()=>{!l&&a&&e.loading&&!u&&d()}),[e.loading,a,l]),r.a.useEffect((()=>{l&&(e.onLoadMoreReviews(),c(!1))}),[l]);const m=r.a.useContext(y.a),d=()=>{n(!1),setTimeout((()=>{n(!0)}),100)},v=t=>{t.preventDefault(),e.loading||(c(!0),Object(k.d)())},p=t=>{if(void 0===e.generateReviewsUri)return;const a=(()=>{if(void 0!==e.nextPage)return m.generateUri("venue",{normalisedName:e.venueNormalisedName,reviewPage:e.nextPage+1})})();return void 0!==a?r.a.createElement(s.a,{as:"a",href:a,className:C.a["load-more"],onClick:v},t):void 0},{i18n:g,pagination:f,generatePaginationUri:w}=e,b=Object(i.a)({[C.a.list]:!0,[C.a.hide]:!a,[C.a.show]:a});return r.a.createElement("div",{className:b,ref:t},(()=>{const{channelData:t,i18n:a,showTreatmentNames:n}=e;return e.reviews.map((e=>r.a.createElement(h,{...R(e,t,a,n),key:e.id})))})(),f&&w?(()=>{const{pagination:t,generatePaginationUri:a,onPaginationClick:n,loading:i,i18n:s}=e;if(void 0!==t&&void 0!==a)return i?r.a.createElement("div",{className:C.a.loadingPagination},s("common.labels.loading")):r.a.createElement(o.a,{pagination:t,createPageUri:a,onPageChange:n})})():(t=>{const{more:a,loading:n,fetchFailed:i}=e;return a?n?r.a.createElement("div",{className:C.a.loading},t("common.labels.loading")):i?r.a.createElement("div",null,t("common.labels.something-went-wrong")," ",p(t("common.labels.try-again"))):p(t("venue.reviews.show-more")):null})(g))}))},953:function(e,t,a){"use strict";a.d(t,"a",(function(){return g}));var n=a(0),r=a.n(n),i=a(5),s=a(40),o=a(42),l=a(951),c=a(343),u=a(55),m=a(352),d=a(986),v=a.n(d),p=a(26);class g extends r.a.PureComponent{renderReviewCount(){const{extraStyles:e,count:t}=this.props,{i18n:a}=this.context;return r.a.createElement(s.a,{as:"div",type:"caption",className:Object(i.a)(v.a.reviews,e.reviews)},a("page.venue.head.review-text.short."+(t>1?"plural":"singular"),t))}renderSummary(){const{extraStyles:e,average:t,size:a,inVenueHeader:n,inServicePopup:s}=this.props;return r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{justify:n?"center":void 0,className:Object(i.a)(v.a.stars,e.stars)},r.a.createElement(l.a,{rating:t,size:a,showRatingValue:!1})),r.a.createElement(c.a,{device:"mobile",serverRender:!0},r.a.createElement(o.a,{justify:s?"start":"end"},this.renderReviewCount())),r.a.createElement(c.a,{device:["tablet","desktop"]},r.a.createElement(o.a,{justify:n?"end":"start"},this.renderReviewCount())))}renderScore(){const{average:e,displayAverage:t,channelData:a,extraStyles:n,inVenueHeader:s,inServicePopup:l}=this.props,d=e>0?t||Object(m.e)(e,1,a):"-.-";return r.a.createElement(r.a.Fragment,null,r.a.createElement("div",{className:Object(i.a)(v.a.rating,n.rating)},d),r.a.createElement("div",{className:Object(i.a)(v.a.summary,n.summary)},r.a.createElement(c.a,{device:"mobile",serverRender:!0},s?r.a.createElement(o.a,{align:"center"},this.renderSummary()):l?r.a.createElement(o.a,{align:"start"},r.a.createElement(u.a,{space:"xxs"},this.renderSummary())):r.a.createElement(o.a,{justify:"end"},r.a.createElement(u.a,{space:"xxs"},this.renderSummary()))),r.a.createElement(c.a,{device:["tablet","desktop"]},r.a.createElement(u.a,{space:s?void 0:"xs"},this.renderSummary()))))}render(){const{onClick:e,extraStyles:t,inVenueHeader:a,inServicePopup:n}=this.props;return r.a.createElement("div",{className:Object(i.a)(v.a.score,t.score),onClick:e},r.a.createElement(c.a,{device:"mobile",serverRender:!0},r.a.createElement(o.a,{align:"center"},this.renderScore())),r.a.createElement(c.a,{device:"tablet"},a||n?r.a.createElement(o.a,{align:a?"start":"center"},this.renderScore()):r.a.createElement(u.a,null,this.renderScore())),r.a.createElement(c.a,{device:"desktop"},r.a.createElement(o.a,{align:a?"start":"center"},this.renderScore())))}}g.contextType=p.a,g.defaultProps={size:32},g.contextType=p.a},954:function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a.n(n),i=a(987),s=a.n(i);function o(){return r.a.createElement("div",{className:s.a.divider})}},986:function(e,t,a){e.exports={"bp-min-md":"(min-width: 800px)","bp-min-sm":"(min-width: 520px)",score:"VenueScore-module--score--1f057f",rating:"VenueScore-module--rating--91b9f7",summary:"VenueScore-module--summary--3d7aa9",stars:"VenueScore-module--stars--096c84",reviews:"VenueScore-module--reviews--534d17",venueHeaderScore:"VenueScore-module--venueHeaderScore--e41e11"}},987:function(e,t,a){e.exports={divider:"Divider-module--divider--9dbda3"}},988:function(e,t,a){"use strict";(function(e){a.d(t,"b",(function(){return l})),a.d(t,"a",(function(){return c}));var n=a(32),r=a(935);const i=e.env.FLIPPER_API_URI||"flipper-server.dev01.k8s.dev.twcloud.io",s=`http://${i}/flipper-server/v1/flag`,o=`http://${i}/flipper-client/v1/evaluate/flag`,l={VenueHeaderExperiment:"enhance-venue-page-navigation",BrowseRelatedTreatments:"experiment_browse-related-treatments"},c=(Object(r.cachifyPromise)(((e,t)=>Object(n.b)(`${s}/${e}`,{ruid:t,requestHeaders:{}})),{ttl:18e4,debug:false,cacheKeyFn:e=>`${s}/${e}`}),(e,t,a)=>Object(n.c)(`${o}/${e}`,{ruid:t,requestHeaders:{},data:a,isTimeoutEnabled:!0}))}).call(this,a(260))},989:function(e,t,a){e.exports={"bp-min-sm":"(min-width: 520px)",response:"VenueReviewResponse-module--response--81a03a",title:"VenueReviewResponse-module--title--cc95cd",reply:"VenueReviewResponse-module--reply--be3c49"}},990:function(e,t,a){e.exports={bubble:"VenueReviewTreatments-module--bubble--0a0266",showAll:"VenueReviewTreatments-module--showAll--2e686d"}},991:function(e,t,a){e.exports={"bp-min-sm":"(min-width: 520px)",container:"VenueReview-module--container--f22392",stars:"VenueReview-module--stars--c79dd2",content:"VenueReview-module--content--d3d0d4",treatmentMetadata:"VenueReview-module--treatmentMetadata--afd148",reviewMetadata:"VenueReview-module--reviewMetadata--aca566",employeeDescription:"VenueReview-module--employeeDescription--f2c58e",dash:"VenueReview-module--dash--1e1d6b",author:"VenueReview-module--author--b1146d",reportLink:"VenueReview-module--reportLink--e5d5a8"}},992:function(e,t,a){e.exports={"text-regular":"14px","text-large":"16px",hide:"VenueReviewsList-module--hide--6da4f4",show:"VenueReviewsList-module--show--1d6b79","load-more":"VenueReviewsList-module--load-more--03d4ca",loading:"VenueReviewsList-module--loading--362dd0",loadingPagination:"VenueReviewsList-module--loadingPagination--90df44",list:"VenueReviewsList-module--list--31c87a"}},993:function(e,t,a){e.exports={select:"RatingSelect-module--select--880dff",option:"RatingSelect-module--option--7c1d0f",buttonText:"RatingSelect-module--buttonText--0826cb",noRating:"RatingSelect-module--noRating--95b452",optionRating:"RatingSelect-module--optionRating--b99ccc"}},994:function(e,t,a){e.exports={"bp-min-sm":"(min-width: 520px)",progressBar:"ProgressBar-module--progressBar--e3381d",outer:"ProgressBar-module--outer--18b760 ProgressBar-module--progressBar--e3381d",inner:"ProgressBar-module--inner--e5e319 ProgressBar-module--progressBar--e3381d",min:"ProgressBar-module--min--4ea71b"}},995:function(e,t,a){e.exports={container:"Checkbox-module--container--59aa32",label:"Checkbox-module--label--c82d1d"}},996:function(e,t,a){e.exports={"text-regular":"14px",count:"RatingCheckbox-module--count--51afeb",progressBar:"RatingCheckbox-module--progressBar--f00c26",ratingContainer:"RatingCheckbox-module--ratingContainer--8eee4d"}},997:function(e,t,a){e.exports={"bp-min-sm":"(min-width: 520px)",title:"ReviewFilter-module--title--5e9a21",mobileTitle:"ReviewFilter-module--mobileTitle--3d2f97",fullTitle:"ReviewFilter-module--fullTitle--ea0417 ReviewFilter-module--title--5e9a21",subTitle:"ReviewFilter-module--subTitle--2a670c ReviewFilter-module--title--5e9a21",treatmentSelect:"ReviewFilter-module--treatmentSelect--539796",treatmentSelectTitle:"ReviewFilter-module--treatmentSelectTitle--9af103",count:"ReviewFilter-module--count--a89989",progressBar:"ReviewFilter-module--progressBar--e8fb0f",ratingCounts:"ReviewFilter-module--ratingCounts--11f4c0",ratingToggle:"ReviewFilter-module--ratingToggle--192504",reviewFilter:"ReviewFilter-module--reviewFilter--2f8938"}},998:function(e,t,a){e.exports={"bp-min-md":"(min-width: 800px)",reviewsEmpty:"VenueReviewsEmpty-module--reviewsEmpty--54da08",icon:"VenueReviewsEmpty-module--icon--5c9461",primaryText:"VenueReviewsEmpty-module--primaryText--e08124",secondaryText:"VenueReviewsEmpty-module--secondaryText--3b9a8f"}},999:function(e,t,a){e.exports={container:"VenueTypeLinks-module--container--d7943e",typeBrowsePages:"VenueTypeLinks-module--typeBrowsePages--554979",locationBrowsePage:"VenueTypeLinks-module--locationBrowsePage--4db7af",heading:"VenueTypeLinks-module--heading--35fa25"}}}]);
//# sourceMappingURL=VenueReviewsPage-3add72.js.map