(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{785:function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a})),n.d(t,"d",(function(){return i})),n.d(t,"c",(function(){return r}));const o=5;var a;function i(e,t,n,o,a,i){return{key:`${e}:${t}:${n}`,data:{name:o,entityType:t,entityValue:n,aliasId:i},label:o,labelRight:a,type:t}}function r(e){return Object.values(a).includes(e)}!function(e){e.ExternalLocation="external_location",e.Location="location",e.PostalArea="postal_area",e.PostalReference="postal_reference",e.Treatments="treatments",e.TreatmentType="treatmentType",e.Venue="venue",e.CurrentLocation="current-location",e.BoundedBox="box",e.VenueType="venueType"}(a||(a={}))},787:function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"c",(function(){return l})),n.d(t,"d",(function(){return c})),n.d(t,"e",(function(){return u})),n.d(t,"f",(function(){return d})),n.d(t,"b",(function(){return p}));var o,a,i=n(800);class r{constructor(){this.perPerson="",this.saveUpTo="",this.save="",this.from=""}static create(){return new r}}function s(e){let t="";if("number"!=typeof e||isNaN(e)||(t=e.toFixed(2)),"string"==typeof e){const n=parseFloat(e);isNaN(n)||(t=n.toFixed(2))}return t}function l(e,t,n=!1){const i=s(e);if(""===i)return"";const r=i.split("."),l=r[1],c=void 0!==l&&""!==l&&"00"!==l||n,u=r[0],d=t.decimalSeparator||".",p=c?r[1]:"";let m=u;return c&&(m+=d+p),function(e,t){const n=(i=t.currencyCode,a.hasOwnProperty(i)?a[i]:(console.warn("Unknown currency code",i),""));var i;switch(t.currencyFormat){case o.SYMBOL_START:return`${n}${e}`;case o.SYMBOL_END:return`${e}${n}`;case o.CODE_START:return`${t.currencyCode}${e}`;case o.CODE_END:return`${e}${t.currencyCode}`;case o.WHITESPACE_SYMBOL:return`${e}\xa0${n}`;case o.SYMBOL_WHITESPACE:return`${n}\xa0${e}`;case o.WHITESPACE_CODE:return`${e}\xa0${t.currencyCode}`;case o.CODE_WHITESPACE:return`${t.currencyCode}\xa0${e}`;default:return console.warn(`Unknown channel currency symbol "${t.currencyFormat}"`),`${n}${e}`}}(m,t)}function c(e,t){let n="";return e.isRange()&&t&&Object.prototype.hasOwnProperty.call(t,"from")&&(n=t.from),n}function u(e,t){return e.perPerson&&t===i.a.perPerson?e.perPerson:""}function d(e){const t=r.create();try{t.perPerson=e("venue.menu.labels.per-person")||"",t.saveUpTo=e("page.venue.menu.labels.save-up-to")||"",t.save=e("page.venue.menu.labels.save")||"",t.from=e("page.venue.menu.labels.from")||""}catch(n){}return t}function p(e){const t=r.create();try{t.perPerson=e.venue.menu.labels["per-person"],t.saveUpTo=e.venue.menu.labels["save-up-to"],t.save=e.venue.menu.labels.save,t.from=e.venue.menu.labels.from}catch(n){}return t}!function(e){e.SYMBOL_START="symbol_start",e.SYMBOL_END="symbol_end",e.CODE_START="code_start",e.CODE_END="code_end",e.WHITESPACE_SYMBOL="whitespace_symbol",e.SYMBOL_WHITESPACE="symbol_whitespace",e.WHITESPACE_CODE="whitespace_code",e.CODE_WHITESPACE="code_whitespace"}(o||(o={})),function(e){e.GBP="\xa3",e.USD="$",e.EUR="\u20ac",e.CHF="Fr.",e.DKK="kr."}(a||(a={}))},790:function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return i})),n.d(t,"c",(function(){return r})),n.d(t,"j",(function(){return m})),n.d(t,"k",(function(){return f})),n.d(t,"i",(function(){return h})),n.d(t,"g",(function(){return g})),n.d(t,"f",(function(){return b})),n.d(t,"e",(function(){return v})),n.d(t,"d",(function(){return y})),n.d(t,"h",(function(){return w})),n.d(t,"l",(function(){return T}));var o,a,i,r,s=n(0),l=n.n(s),c=n(48),u=n(292);function d(e,t,n,o,a){Object(c.d)({category:e,property:t,action:n,label:o,value:a})}function p(e,t,n,o,a){Object(c.d)({category:e,property:t,action:n,label:o,value:a})}function m(e,t,n,o,i){p(e,a.Treatment,`${t}_${n}`,o,i)}function f(e,t,n,o,i){p(e,a.VenueType,`${t}_${n}`,o,i)}function h(e,t,n){d(e,a.Treatment,i.Search,t,n)}function g(e,t,n,o){p(e,a.Location,`${i.Select}_${n}`,t,o)}function b(e,t,n){d(e,a.Location,i.Search,t,n)}function v(e,t,n){n?d(e,a.LocationRadius,i.Select,t,n):d(e,a.LocationRadius,i.Select,"nearby")}async function y(e,t){await Object(u.a)(),d(e,t.property,t.action,t.label,t.value)}async function w(e,t,n){await Object(u.a)(),d(e,a.Visibility,n,t)}!function(e){e.List="browse_list_www",e.Map="browse_map_www",e.Hybrid="browse_hybrid_www"}(o||(o={})),function(e){e.DateDaysInFuture="calendar",e.DateTime="date_and_time_field",e.DateType="date_field",e.Duration="duration",e.Location="location_field",e.LocationRadius="radius_expansion",e.TimeEnd="max_time",e.TimeStart="min_time",e.TimeType="calendar",e.Treatment="treatment_field",e.VenueType="venue_type",e.Visibility="filters"}(a||(a={})),function(e){e.Collapse="collapse",e.Expand="expand",e.Open="open",e.Search="type",e.Select="select",e.SelectTreatment="select_treatment",e.SelectTreatmentType="select_treatmenttype",e.SelectVenueType="select_venuetype"}(i||(i={})),function(e){e.Location="tree",e.ExternalLocation="external",e.PostalReference="postal_ref",e.Geo="geo_location"}(r||(r={}));const T=l.a.createContext(o.List)},792:function(e,t,n){"use strict";n.d(t,"c",(function(){return B})),n.d(t,"a",(function(){return M})),n.d(t,"d",(function(){return H})),n.d(t,"b",(function(){return N})),n.d(t,"e",(function(){return W}));var o,a=n(0),i=n.n(a),r=n(936),s=n.n(r),l=n(399),c=n(101),u=n(357),d=n(413);!function(e){e.Treatment="treatment",e.TreatmentPackage="treatment_package"}(o||(o={}));var p=n(99),m=n(819),f=n(855),h=n(48),g=n(836),b=n(793),v=n(826),y=n(818),w=n(837);const T=-1;function C(e,t){if(!(e&&e.specification&&e.pagination&&e.results))return{pageType:"browse",pageSpecific:{}};const{location:n}=e.specification,o=e.results.slice(0,20);return{pageType:"browse",pageSpecific:{location:_(n),treatmentGroup:e.specification.treatmentCategoryGroup&&{id:e.specification.treatmentCategoryGroup.id},filters:{category:{ids:e.specification.treatmentCategories&&e.specification.treatmentCategories.map((e=>e.id))},offerType:"local",orderBy:e.specification.sort,radius:n&&n.radius,startDate:e.specification.date&&e.specification.date.from,endDate:e.specification.date&&e.specification.date.to},listing:{type:"browse_results",venueCount:e.pagination.totalElements,firstItem:e.pagination.from+1,lastItem:Math.min(e.pagination.from+e.pagination.pageSize,e.pagination.totalElements),page:e.pagination.page+1,venues:O(o,t,n),venueCountBookable:e.results.reduce(((e,t)=>e+t.data.menuHighlights.length),0)}}}}function _(e){if(e)return e.tree?{id:e.tree.id}:e.point?{point:e.point}:void 0}function S(e){const t=e.data.priceRange,n=t.range?"from":null;return t.yieldDiscountTypes.concat(new v.a(t).shouldShowStrikeThrough()?[y.a.SalePrice]:[]).join("-")||n||"null"}function E(e){const t=new v.a(e.data.priceRange);return t.hasYieldDiscount()||t.shouldShowStrikeThrough()||!t.isRange()?0===e.data.priceRange.maxDiscountPercentage?0:e.data.priceRange.maxDiscountPercentage/100:0}function O(e,t,n){let o=g.a.KM;return t&&"mile"===t.distanceUnit&&(o=g.a.MILE),{venueIds:e.map((e=>e.data.id)),venueDistance:e.map((e=>function(e,t,n){if(!n||!n.point)return T;const o=Object(g.b)(n.point,e.location.point,t);return parseFloat(o.toFixed(2))}(e.data,o,n))),venueRating:e.map((e=>e.data.rating.average||null)),venueReviewCount:e.map((e=>e.data.rating.count||null)),venueNumberOfServices:e.map((e=>e.data.menuHighlights.length||null)),venueServiceIds:e.map((e=>e.data.menuHighlights.map((e=>parseInt(e.data.id.substr(2),10))))),venueServiceDisplayPrice:e.map((e=>e.data.menuHighlights.map((e=>parseFloat(e.data.priceRange.minSalePriceAmount))))),venueServiceDiscounts:e.map((e=>e.data.menuHighlights.map(S))),venueServiceDiscountsValues:e.map((e=>e.data.menuHighlights.map(E))),venueTags:e.map((e=>function(e){const t=Object(w.d)(e.menuHighlights),n=[...e.treatmentBadges.map((e=>`treatment-badge-${e.treatmentId}`)),...e.accolades.filter((e=>e.featured)).map((()=>"top-rated")),t.jit?y.a.Jit:null,t.offpeak?y.a.Offpeak:null,e.newVenue?"new":null,e.type&&e.type.mobile?"mobile":null,e.type&&61===e.type.id||e.subTypes&&e.subTypes.some((e=>61===e.id))?"home-based":null];return Object(b.a)(n)}(e.data)))}}var x=n(415),I=n(407),R=n(26),k=n(292),L=n(145),P=n(802);function D(e){return e===P.a.Map?50:void 0}var B,M,j=n(815);!function(e){e.DATE="availableOn",e.STARTHOURS="timeRange.from",e.ENDHOURS="timeRange.to",e.NIGHTS="fixedStayNights",e.MAXDURATION="maxServiceDuration",e.ACCOLADE="accolade",e.BOOKINGTYPE="bookingType",e.PRICERANGEFROM="priceRange.from",e.PRICERANGETO="priceRange.to",e.VENUETYPE="venueType",e.TREATMENT="treatments",e.TREATMENTTYPE="treatmentType",e.AMENITIES="amenities",e.BRANDS="brands"}(B||(B={})),function(e){e[e.Geo=0]="Geo",e[e.CurrentPage=1]="CurrentPage",e[e.CurrentPageWithRadius=2]="CurrentPageWithRadius"}(M||(M={}));const H=i.a.createContext((()=>Promise.resolve()));class N extends i.a.Component{constructor(e,t){super(e,t),this.onPopState=()=>{this.changeBrowseData({},[],void 0,!0)},this.changeBrowseData=async(e,t,n,o=!1,a,i)=>{let r=a;if(o){const e=this.viewModeFromWindowLocation();e!==this.state.browsePageOutput.viewMode&&(r=e)}if(r)await this.fetchNewData({pageSize:D(r)},void 0,void 0,o,r,i);else{let a=t?[...t]:[];this.shouldClearPriceRange(e)&&(a=[...a,B.PRICERANGEFROM,B.PRICERANGETO]),await this.fetchNewData({...e,pageSize:D(this.state.browsePageOutput.viewMode)},a,n,o,void 0,i)}},this.transformedBrowseData(e.initialBrowsePageOutput),this.state={browsePageOutput:e.initialBrowsePageOutput,loading:!1,currentTreatmentTypeParameters:this.getInitialTreatmentTypeParameters()}}componentDidMount(){var e;window.addEventListener("popstate",this.onPopState);const t=L.a.session.getItem("searchAliasTreatment");Object(j.d)("treatment_searched",this.context.channel.country.countryCode,this.state.browsePageOutput.specification,null===(e=this.state.browsePageOutput.results)||void 0===e?void 0:e.length,t||void 0),L.a.session.removeItem("searchAliasTreatment")}componentWillUnmount(){window.removeEventListener("popstate",this.onPopState)}async trackNewBrowsePage(e){var t;await Object(k.a)(),Object(h.a)({listing:{venues:void 0}}),Object(h.c)("virtualPageView",{page:{path:window.location.pathname},...C(e,this.context.pageData.channel).pageSpecific}),Object(j.d)("treatment_searched",this.context.channel.country.countryCode,e.specification,null===(t=e.results)||void 0===t?void 0:t.length,e.aliasId)}currentPageLocationAsParameter(e){if(e.tree)return{tree:{id:e.tree.id}};if(e.point)return{point:{latitude:e.point.lat,longitude:e.point.lon}};if(e.external)return{external:{id:e.external.id,description:e.external.name}};if(e.postalReference)return{postalReferenceId:e.postalReference.id};throw new Error("Unhandled location type")}removeParameters(e,t){if(!t||0===t.length)return e;const{code:n,languageCode:o}=this.context.pageData.channel,a=Object(p.i)(e,n,o);if(!a)return e;for(const i of t)delete a.values[i];return Object(p.e)("browse",a.values,this.context.pageData.channel.code,this.context.pageData.channel.languageCode)||e}async transformParametersWithOptions(e,t,n){const o=this.state.browsePageOutput.specification.location,a={...e};return t===M.CurrentPage&&o&&(a.location={...a.location,...this.currentPageLocationAsParameter(o)}),t===M.CurrentPageWithRadius&&o&&o.radius&&(a.location={...a.location,...this.currentPageLocationAsParameter(o),radius:o.radius.distance}),t===M.Geo&&(a.location={...await W()}),a.page||n||(a.page=0),a}transformedBrowseData(e){if(!e.specification||e.specification.location)return;const t=this.context.channel.country;e.specification.location={tree:t},e.aggregations=e.aggregations||{},e.aggregations.locations=e.aggregations.locations||[],e.aggregations.locations.unshift({...t,count:0})}persistNavigationLocation(e){const{location:t}=e.specification||{location:void 0};if(!t)return;const n=this.context.pageData.channel.languageCode;t.tree&&(I.b(n),I.c({location:t.tree.normalisedName},n)),t.postalReference&&(I.b(n),I.c({postalReference:t.postalReference.normalisedName},n)),t.external&&(I.b(n),I.c({externalLocation:t.external.id},n)),t.point&&(I.b(n),I.c({searchAreaGeocode:`${t.point.lat},${t.point.lon}`},n))}viewModeFromWindowLocation(){const e=Object(p.m)();return Object(P.c)(e.view)}render(){const{children:e}=this.props,{loading:t,browsePageOutput:n}=this.state;return i.a.createElement(H.Provider,{value:this.changeBrowseData},e(n,t))}async fetchNewData(e,t,n,a,i,r){try{this.setState({loading:!0});const s=a?this.viewModeFromWindowLocation():i,p=this.removeParameters(window.location.pathname,t),m=await this.transformParametersWithOptions(e,n,a),h=await async function(e,t,n=Object(c.a)(),a={}){const i={...a,currentBrowseUri:decodeURIComponent(t)},r=await Object(l.b)(e,`/api/v1/page/browse?${Object(d.stringify)(i,{allowDots:!0,arrayFormat:"comma"})}`,n,!0),s=Object(u.a)(await r.text(),n);if(!s)throw new Error("Error occurred fetching Browse data");return s.results.forEach((e=>{e.data.menuHighlights.forEach((e=>{e.type!==o.Treatment&&e.type!==o.TreatmentPackage||(e.data.optionGroups=[])}))})),s}(this.context.pageData,p,void 0,m);this.transformedBrowseData(h),this.persistNavigationLocation(h);const g=new URL(Object(f.e)(h.canonicalUri,window.location.protocol,window.location.host)+window.location.search);s&&(s!==P.a.Hybrid?g.searchParams.append("view",s):g.searchParams.delete("view")),a||g.toString()===window.location.href||Object(x.a)({},"",g),h.aliasId=r,this.setState({browsePageOutput:{...h,viewMode:s||h.viewMode||this.viewModeFromWindowLocation()},loading:!1},(()=>this.trackNewBrowsePage(h))),window.scroll(0,0)}catch(s){throw this.setState({loading:!1}),s}}getInitialTreatmentTypeParameters(){const{initialBrowsePageOutput:{specification:e}}=this.props;let t={};return e.treatmentCategories&&(t={...t,treatmentCategoryIds:e.treatmentCategories.map((e=>e.id))}),e.treatmentCategoryGroup&&(t={...t,treatmentCategoryGroupId:e.treatmentCategoryGroup.id}),e.venueType&&(t={...t,venueTypeId:e.venueType.id}),e.menuItemTypes&&(t={...t,menuItemTypes:e.menuItemTypes,nights:e.nights}),t}shouldClearPriceRange(e){const{currentTreatmentTypeParameters:t}=this.state,n=["venueTypeId","treatmentCategoryIds","treatmentCategoryGroupId","menuItemTypes"];let o={...t};for(const a of n)e[a]&&!s()(e[a],t[a])&&(o={...o,[a]:e[a]});return e.menuItemTypes&&(o={...o,nights:e.nights}),!s()(t,o)&&(this.setState({currentTreatmentTypeParameters:o}),!0)}}async function W(){const e=await Object(m.a)(1e4);return{point:{latitude:e.coords.latitude,longitude:e.coords.longitude}}}N.contextType=R.a,N.contextType=R.a},793:function(e,t,n){"use strict";function o(e){return null!=e}function a(e){return e.filter(o)}n.d(t,"a",(function(){return a}))},800:function(e,t,n){"use strict";var o;n.d(t,"a",(function(){return o})),function(e){e.total="total_price",e.perPerson="per_person_price"}(o||(o={}))},802:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"c",(function(){return h})),n.d(t,"b",(function(){return T}));var o,a=n(0),i=n.n(a),r=n(56),s=n(773),l=n(84),c=n(343),u=n(26),d=n(900),p=n.n(d),m=n(829),f=n(815);function h(e){return Object.values(o).find((t=>t===e))}!function(e){e.Hybrid="hybrid",e.List="list",e.Map="map"}(o||(o={}));const g=i.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"25",height:"24",viewBox:"0 0 25 24"},i.a.createElement("path",{fill:"#FFF",fillRule:"evenodd",d:"M17.793 5.293l1.414 1.414L13.914 12l5.293 5.293-1.414 1.414-5.293-5.293-5.293 5.293-1.414-1.414L11.086 12 5.793 6.707l1.414-1.414 5.293 5.293 5.293-5.293z"})),b=i.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},i.a.createElement("g",{transform:"translate(3 4)"},i.a.createElement("path",{fill:"#FFF",fillRule:"nonzero",d:"M5 1h12v2H5V1zm0 6h12v2H5V7zm0 6h12v2H5v-2zM1.5.5a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zm0 6a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zm0 6a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3z"}))),v=i.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},i.a.createElement("path",{fill:"#FFF",fillRule:"evenodd",d:"M21.759 17.807c.123.553 0 1.112-.337 1.532-.337.42-.855.661-1.422.661H4a1.805 1.805 0 0 1-1.422-.661 1.805 1.805 0 0 1-.337-1.532l1.566-7.046C4.026 9.774 4.989 9 6 9h1v2H6c-.081 0-.223.115-.24.194L4.247 18h15.506l-1.512-6.806c-.018-.079-.16-.194-.241-.194h-1V9h1c1.011 0 1.974.774 2.193 1.761l1.566 7.046zM12 2a4 4 0 0 1 4 4c0 3-4 8-4 8S8 9 8 6a4 4 0 0 1 4-4zm0 6a2 2 0 1 0-.001-4.001A2 2 0 0 0 12 8z"})),y={[o.Hybrid]:{mode:o.Map,cmsKey:"view-mode-map",cmsKeyHidden:"view-mode-list",icon:v,eventCategory:m.b.BrowseListResults,eventProperty:m.c.ToggleToMapButton},[o.List]:{mode:o.Map,cmsKey:"view-mode-map",cmsKeyHidden:"view-mode-list",icon:v,eventCategory:m.b.BrowseListResults,eventProperty:m.c.ToggleToMapButton},[o.Map]:{mode:o.Hybrid,cmsKey:"view-mode-list",cmsKeyHidden:"view-mode-map",icon:b,eventCategory:m.b.BrowseMapResults,eventProperty:m.c.ToggleToListButton}},w={[o.Hybrid]:{mode:o.List,cmsKey:"view-mode-list-from-hybrid",cmsKeyHidden:"view-mode-hybrid",icon:g,eventCategory:m.b.BrowseHybridResults,eventProperty:m.c.ToggleToListButton},[o.List]:{mode:o.Hybrid,cmsKey:"view-mode-hybrid",cmsKeyHidden:"view-mode-list-from-hybrid",icon:v,eventCategory:m.b.BrowseListResults,eventProperty:m.c.ToggleToHybridButton},[o.Map]:{mode:o.Hybrid,cmsKey:"view-mode-list",cmsKeyHidden:"view-mode-map",icon:b,eventCategory:m.b.BrowseMapResults,eventProperty:m.c.ToggleToListButton}},T=({currentMode:e,onChange:t,cms:n})=>{const{isDesktop:o}=Object(s.a)(),d=y[e],h=n[d.cmsKey],g=n[d.cmsKeyHidden],b=w[e],v=n[b.cmsKey],T=n[b.cmsKeyHidden],{pageData:C}=Object(a.useContext)(u.a),_=Object(l.a)({device:"mobile"}),S=n=>{const o=n[e];_&&Object(f.b)({countryCode:C.channel.country.countryCode,browsePageOutputSpecification:C.browse.specification,isOnMap:"map"!==o.mode,results:C.browse.results.length}),Object(m.e)(o.eventCategory,o.eventProperty),t(o.mode)};return i.a.createElement(i.a.Fragment,null,i.a.createElement(c.a,{serverRender:!o,device:["mobile","tablet"]},i.a.createElement(r.a,{positioningClassname:p.a.button,size:r.c.Large,colour:r.b.WhiteUndecorated,label:h,leftAlignLabels:!0,hiddenLabels:[g],icon:()=>d.icon,onClick:()=>S(y),"data-cy":"ToggleMap"})),i.a.createElement(c.a,{serverRender:o,device:"desktop"},i.a.createElement(r.a,{positioningClassname:p.a.button,size:r.c.Large,colour:r.b.WhiteUndecorated,label:v,leftAlignLabels:!0,hiddenLabels:[T],icon:()=>b.icon,onClick:()=>S(w),"data-cy":"ToggleMap"})))}},807:function(e,t,n){"use strict";n.d(t,"a",(function(){return B}));var o=n(0),a=n.n(o),i=n(400),r=n(897),s=n.n(r),l=n(792),c=n(816),u=n.n(c),d=n(408),p=n(790),m=n(901),f=n.n(m);function h(e){return e?String(e.distance):""}class g extends a.a.Component{render(){const e=this.props.validRadius.map((e=>{let t="km";"mile"===this.props.channel.distanceUnit&&(t=1===e?"mile":"miles");return{label:`${e.toString().replace(".",this.props.channel.decimalSeparator)} ${t}`,value:e}}));return[{label:this.props.nearbyLabel,value:0}].concat(e).map((({label:e,value:t})=>a.a.createElement("option",{key:t,value:t},e)))}}class b extends a.a.Component{constructor(e){super(e),this.onChange=e=>{this.setState({value:e.target.value});const t=(n=e.target.value,o=this.props.channel,parseFloat(n.replace(o.decimalSeparator,".")));var n,o;Object(p.e)(this.props.trackingCategory,this.props.channel.distanceUnit,t),this.props.changeBrowseData({location:{radius:t||0}},[],l.a.CurrentPage),this.props.closeDropdown()},this.state={value:h(e.radius)}}componentDidUpdate(){this.state.value!==h(this.props.radius)&&this.setState({value:h(this.props.radius)})}render(){return a.a.createElement("div",{className:u.a.listItem},a.a.createElement("label",{className:f.a.label},this.props.label),a.a.createElement("select",{className:f.a.select,value:this.state.value||"",onChange:this.onChange},a.a.createElement(g,{channel:this.props.channel,validRadius:this.props.validRadius,nearbyLabel:this.props.nearbyLabel})))}}function v(e){return a.a.createElement(d.a.Consumer,null,(t=>a.a.createElement(l.d.Consumer,null,(n=>a.a.createElement(p.l.Consumer,null,(o=>a.a.createElement(b,{...e,channel:t,changeBrowseData:n,trackingCategory:o})))))))}var y=n(785),w=n(820);var T=n(5);const C=o.forwardRef((({isSelected:e=!1,...t},n)=>{function a(e){e.preventDefault(),t.onClick&&t.onClick(t.keyValue)}let i;o.useImperativeHandle(n,(()=>({isSelectable:()=>!0}))),t.type===y.a.CurrentLocation&&(i=u.a.currentLocation);const r=Object(T.a)(u.a.listItem,u.a.selectable,i,{[u.a.selected]:e}),s=o.createElement(o.Fragment,null,o.createElement("span",null,t.label),t.labelRight&&o.createElement("span",null,t.labelRight));return o.createElement(o.Fragment,null,t.url?o.createElement("a",{href:t.url,className:r,onClick:a},s):o.createElement("div",{className:r,onClick:a},s),t.separatorLine&&o.createElement("div",{className:u.a.listItemSeparator}))}));C.displayName="ListItem";var _=n(902),S=n.n(_);const E=o.forwardRef(((e,t)=>(o.useImperativeHandle(t,(()=>({isSelectable:()=>!1}))),o.createElement("div",{className:S.a.listHeading},e.label))));E.displayName="ListHeading";var O=n(903),x=n.n(O);const I=o.forwardRef(((e,t)=>(o.useImperativeHandle(t,(()=>({isSelectable:()=>!1}))),o.createElement("div",{className:x.a.listLabel},e.label))));I.displayName="ListLabel";const R=o.forwardRef(((e,t)=>{const n=o.useRef(null),a=o.useRef([]),i=o.useRef(null),r=function(){const e=Object(o.useRef)(!0);return e.current?(e.current=!1,!0):e.current}();function s(t){e.onSelect(t,!0)}o.useEffect((()=>{var t;null===(t=e.onMount)||void 0===t||t.call(e,n)}),[]),o.useEffect((()=>{!r&&e.selectedItemKey&&function(){if(!i.current||!n.current)return;let e=i.current;for(let n=a.current.indexOf(i.current)-1;n>=0;n--){const t=a.current[n];if(null!==t){if(t.isSelectable())break;e=t}}if(!(e instanceof HTMLElement&&i.current instanceof HTMLElement))return;const t=n.current.clientHeight,o=n.current.scrollTop,r=e.offsetTop,s=i.current.offsetTop+i.current.offsetHeight;r<o?n.current.scrollTop=r:s>t+o&&(n.current.scrollTop=s-t)}()})),o.useImperativeHandle(t,(()=>({moveSelectedItemByOffset(t){const n=[];for(const i of e.sectionData)for(const e of i.items)"key"in e&&n.push(e.key);let o;o=e.selectedItemKey?n.indexOf(e.selectedItemKey):-1,o<0&&(o=t>0?-1:n.length);let a=o+t;a=Math.max(a,0),a=Math.min(a,n.length-1),e.onSelect(n[a],!1)}})));const l=[];let c=0;const d=(e=!1)=>{const t=c;return c+=1,e?e=>{i.current=e,a.current[t]=e}:e=>{a.current[t]=e}};for(const p of e.sectionData)p.heading&&l.push(o.createElement(E,{ref:d(),key:p.heading,label:p.heading})),p.items.map(((t,n)=>{if(!Object(w.a)()||"location-radius"!==t.type)switch(t.type){case"label":l.push(o.createElement(I,{ref:d(),key:`${t.label}-${n}`,label:t.label}));break;case"location-radius":l.push(o.createElement(o.Fragment,{key:t.type},o.createElement(v,{label:t.label,radius:t.radius,validRadius:t.validRadius,nearbyLabel:t.nearbyLabel,closeDropdown:e.closeDropdown}),n<p.items.length-1&&o.createElement("div",{className:u.a.categorySeparator})));break;case y.a.CurrentLocation:l.push(o.createElement(o.Fragment,{key:t.key},o.createElement(C,{ref:d(t.key===e.selectedItemKey),type:t.type,keyValue:t.key,label:t.label,labelRight:t.labelRight,url:t.url,isSelected:t.key===e.selectedItemKey,onClick:s}),n<p.items.length-1&&o.createElement("div",{className:u.a.categorySeparator})));break;default:l.push(o.createElement(C,{ref:d(t.key===e.selectedItemKey),type:t.type,key:t.key,keyValue:t.key,label:t.label,labelRight:t.labelRight,separatorLine:n<p.items.length-1,url:t.url,isSelected:t.key===e.selectedItemKey,onClick:s}))}}));return o.createElement("div",{ref:n,className:e.positioningClassName},l)}));function k(e,t){for(const n of e)for(const e of n.items)if("key"in e&&e.key===t)return e.label;return null}R.displayName="List";var L=n(858);const P=o.forwardRef((({renderHiddenResults:e=!1,...t},n)=>{var a,r;const l={[i.f]:-1,[i.a]:1,[i.e]:-5,[i.d]:5},c=o.useRef(null),u=o.useRef(null),[d,p]=o.useState(null!==(a=t.placeholderItemKey)&&void 0!==a?a:null),[m,f]=o.useState(null!==(r=t.placeholder)&&void 0!==r?r:""),h=o.useRef(null);function g(e,n){let o=n,a=e;e===t.placeholderItemKey&&(o="",a=null),null!==u.current&&u.current.setValue(o),p(e),h.current=e,w(o,a)}function b(){u.current&&u.current.blur()}function v(e,n){const o=k(t.sectionData,e);if(null===o)throw new Error("invalid key");g(e,o),T(),n&&null!==u.current&&u.current.blur()}function w(e,n){t.onChange&&t.onChange(e,n)}function T(){t.onComplete&&t.onComplete()}return o.useEffect((()=>{let e=t.placeholder;if(t.placeholderItemKey&&t.sectionData){const n=k(t.sectionData,t.placeholderItemKey);null!==n&&(e=n)}f(e)}),[t.placeholderItemKey,t.sectionData,t.placeholder]),o.useImperativeHandle(n,(()=>({setSelectedItemKey(e){if(!t.sectionData||!e)return void g(null,"");const n=k(t.sectionData,e);null!==n?g(e,n):g(null,"")}}))),o.createElement(L.a,{ref:u,icon:t.icon,isClearable:t.isClearable,isFocusOnClear:t.isFocusOnClear,isTextEditable:t.isTextEditable,isErrorStyling:t.isErrorStyling,isHotJarWhiteList:t.isHotJarWhiteList,placeholder:m,closeButtonText:t.closeButtonText,onKeyDown:function(e){if(e===i.b)return u.current&&u.current.blur(),T(),!1;const t=l[e];return void 0!==t&&(c.current&&c.current.moveSelectedItemByOffset(t),!0)},onChange:function(e,n){if(!n)return;const o=t.placeholderItemKey?t.placeholderItemKey:null;p(o),h.current=o,w(e,null)},onFocus:t.onFocus,onBlur:function(e){var n;if(!h.current){const[e,n]=function(){for(const e of t.sectionData)for(const t of e.items)if((t.type===y.a.TreatmentType||t.type===y.a.Treatments||t.type===y.a.Venue||t.type===y.a.ExternalLocation||t.type===y.a.Location||t.type===y.a.PostalArea||t.type===y.a.PostalReference||t.type===y.a.VenueType)&&t.key.startsWith("search"))return[t.key,t.label];return[]}();e&&n&&g(e,n)}null===(n=t.onBlur)||void 0===n||n.call(t,e)},renderHiddenResults:e,isPatternedBackground:t.isPatternedBackground},!(t.sectionData instanceof Array)||t.sectionData.length<=0?null:o.createElement(R,{ref:c,positioningClassName:s.a.list,selectedItemKey:null!==d?d:void 0,sectionData:t.sectionData,onSelect:v,closeDropdown:b}))}));P.displayName="SelectInput";const D=o.forwardRef((function(e,t){const n=o.useRef(null);return o.useImperativeHandle(t,(()=>({setSelectedItemKey(e){null!==n.current&&n.current.setSelectedItemKey(e)}}))),o.createElement(P,{...e,onChange:function(t,n){if(!e.onChange)return;const o=function(e,t){let n=1,o=1;return e.forEach((e=>{e.items.forEach((e=>{e.type!==y.a.TreatmentType&&e.type!==y.a.Treatments&&e.type!==y.a.Location&&e.type!==y.a.PostalArea&&e.type!==y.a.PostalReference&&e.type!==y.a.Venue&&e.type!==y.a.VenueType||(e.key===t&&(n=o),o++)}))})),n}(e.sectionData,n);e.onChange(t,n,function(t,n){if(!e.sectionData)return null;if(null!==t){const n=function(e,t){for(const n of e)for(const e of n.items)if("key"in e&&e.key===t)return e;return null}(e.sectionData,t);if(n)return"data"in n&&void 0!==n.data?n.data:null}const o=function(e,t){for(const n of e)for(const e of n.items)if(e.label.toLowerCase()===t.toLowerCase())return e;return null}(e.sectionData,n);return o&&"data"in o&&void 0!==o.data?o.data:null}(n,t),o)},ref:n,isPatternedBackground:e.isPatternedBackground})}));D.displayName="AssociatedDataSelectInput";const B=o.forwardRef((function({renderHiddenResults:e=!1,...t},n){const a=o.useRef(!1),i=o.useRef(null),[r,s]=o.useState(null);function l(e,n){0===e.length||e.length<3&&null===n?s(null):null===n&&t.searchFunction(e).then((e=>{a.current||(e.length>0?s([{heading:t.searchResultsHeading,items:e}]):s(function(){if(t.noResultsData)return t.noResultsData;return[{items:[{type:"label",label:t.cmsCommonControls.search["no-search-results-label"]}]}]}()))}))}o.useEffect((()=>()=>{a.current=!0}),[]),o.useImperativeHandle(n,(()=>({clear(){null!==i.current&&i.current.setSelectedItemKey(null)},setSelectedItemKey(e){null!==i.current&&i.current.setSelectedItemKey(e)}})));const{cmsCommonControls:c}=t,u=[];return t.dataAlwaysInDropdown&&u.push(...t.dataAlwaysInDropdown),null!==r?u.push(...r):u.push(...t.dataForNoSearch),o.createElement(D,{ref:i,icon:t.icon,closeButtonText:c["dropdown-input"]["close-button"],isErrorStyling:t.isErrorStyling,isClearable:t.isClearable,isHotJarWhiteList:t.isHotJarWhiteList,isFocusOnClear:t.isFocusOnClear,placeholder:t.placeholder,sectionData:u,onChange:function(e,n,o,a){l(e,n),t.onChange&&t.onChange(e,n,o,a)},onComplete:t.onComplete,onFocus:t.onFocus,onBlur:t.onBlur,renderHiddenResults:e,isPatternedBackground:t.isPatternedBackground})}));B.displayName="CommonSearchInput"},808:function(e,t,n){"use strict";n.d(t,"a",(function(){return w})),n.d(t,"b",(function(){return C}));var o=n(0),a=n.n(o),i=n(63),r=n(5);function s(e){const t=e.getBoundingClientRect(),n=document.body.getBoundingClientRect();return{x:t.left-n.left,y:t.top-n.top}}var l=n(12),c=n(400),u=n(876),d=n(835),p=n(773),m=n(84),f=n(820),h=n(904),g=n.n(h),b=n(905),v=n.n(b);const y=o.forwardRef((({placeholder:e="",isClearable:t=!1,isFocusedStyling:n=!1,isErrorStyling:a=!1,isEditable:i=!0,isHotJarWhiteList:l=!1,isPatternedBackground:c=!1,...u},d)=>{const p=o.useRef(null),m=o.useRef(null),f=o.useRef(null);function h(){if(null===m.current)return;const e=m.current.value.length;m.current.setSelectionRange(e,e)}o.useImperativeHandle(d,(()=>({focus(){null!==m.current&&(document.activeElement!==m.current&&h(),m.current.focus())},blur(){null!==m.current&&m.current.blur()},equalsClearIconRef:e=>f.current===e,equalsInputRef:e=>m.current===e,getAbsoluteBoundingRect(){if(null===p.current)return;const e=s(p.current),t=p.current.offsetWidth,n=p.current.offsetHeight;return{left:e.x,top:e.y,bottom:e.y+n,width:t}}})));const g=Object(r.a)(v.a.reset,{[v.a.visible]:u.value}),b=t?o.createElement("div",{ref:f,className:g,onClick:function(){u.onChange&&u.onChange("")}}):null,y=Object(r.a)({[v.a.container]:!0,[v.a.patternedBackground]:c&&!n,[v.a.focused]:n,[v.a.error]:a,[v.a.noneditable]:!i}),w=i?"search":"none",T=!i,C=u.icon;return o.createElement("div",{ref:p,className:y},C?o.createElement(C,{error:a,positioningClassName:v.a.icon}):null,o.createElement("input",{ref:m,className:v.a.input,type:"text","data-hj-whitelist":l?"":null,inputMode:w,autoComplete:"nope",readOnly:T,value:u.value,placeholder:e,onFocus:function(e){i||h(),i&&setTimeout((()=>{var e;null===(e=m.current)||void 0===e||e.select()}),0),u.onFocus&&u.onFocus(e)},onBlur:u.onBlur,onChange:function(e){u.onChange&&u.onChange(e.target.value)},onKeyDown:u.onKeyDown,onMouseUp:e=>e.preventDefault()}),b)}));var w;y.displayName="InputField",function(e){e.Clearable="clearable",e.ClearableWhenActive="clearable-when-active",e.NotClearable="not-clearable"}(w||(w={}));let T=-1;const C=Object(o.forwardRef)((({children:e,closeButtonText:t,placeholder:n,icon:h,isPatternedBackground:b,onChange:v,onFocus:C,onKeyDown:_,onBlur:S,isClearable:E=w.Clearable,isFocusOnClear:O=!0,isErrorStyling:x=!1,isTextEditable:I=!0,isHotJarWhiteList:R=!1,dropdownWidthRatio:k=1,renderHiddenResults:L=!1,onOpen:P=(()=>{}),onClose:D=(()=>{})},B)=>{const M=Object(o.useContext)(u.b),j=Object(o.useRef)(null),H=Object(o.useRef)(null),[N,W]=Object(o.useState)(!1),[F,$]=Object(o.useState)({left:0,bottom:0,width:0}),[A,K]=Object(o.useState)(""),{isMobile:V}=Object(p.a)(),U=Object(m.a)({device:"mobile",serverRender:V}),z=()=>{var e;if(!H)return;const t=null===(e=H.current)||void 0===e?void 0:e.getAbsoluteBoundingRect();void 0!==t&&$(t)},G=()=>{if(a.a.Children.count(e)<=0)return null;const t={left:`${F.left}px`,top:`${F.bottom}px`,width:`${Math.round(F.width*k)}px`},n=a.a.Children.only(e);if(!(n instanceof Object))throw new Error("Invalid type of child passed to DropdownInput");const o="string"==typeof n.type;return a.a.createElement("div",{ref:j,className:g.a.dropdownContainer,style:U?{}:t},a.a.cloneElement(n,o?void 0:{isDesktop:!U}))},Y=Object(o.useCallback)((e=>{e!==N&&(e?P():D()),W(e)}),[D,P,N]),q=()=>{N||(z(),T=U?window.scrollY:-1,Y(!0))},J=e=>{K(e),q(),v&&v(e,!0)},X=e=>{q(),C&&C(e)},Q=e=>{var t;if(e.keyCode===c.c)return e.preventDefault(),void(I?Y(!1):null===(t=H.current)||void 0===t||t.blur());let n=!1;if(_&&(n=!0===_(e.keyCode)),n)return e.preventDefault(),void q();U&&window.scrollTo(window.scrollX,0)},Z=(e=!1)=>a.a.createElement(y,{ref:H,value:A,placeholder:n,icon:h,isEditable:I,isClearable:E===w.Clearable||E===w.ClearableWhenActive&&N,isErrorStyling:x,isHotJarWhiteList:R,isFocusedStyling:e,onChange:J,onFocus:X,onKeyDown:Q,isPatternedBackground:b}),ee=(e,t=!1)=>e instanceof Node&&(("SELECT"===e.nodeName||"INPUT"===e.nodeName)&&(!(t||null===H.current||!H.current.equalsInputRef(e))||!(null===j.current||!j.current.contains(e)))),te=e=>{H.current&&(H.current.equalsInputRef(e.target)&&!Object(l.c)()||(ee(e.target)||(e.preventDefault(),e.stopPropagation()),(N||!H.current.equalsClearIconRef(e.target)||(K(""),v&&v("",!0),O))&&q()))},ne=Object(o.useCallback)((e=>{null===e.relatedTarget&&ee(e.target,!0)?null!==H.current&&H.current.focus():null!==e.relatedTarget&&ee(e.relatedTarget)||(Y(!1),S&&S(e))}),[S,Y]),oe=()=>{ae()},ae=Object(o.useCallback)((()=>{var e;Y(!1),null===(e=H.current)||void 0===e||e.blur(),Object(f.a)()&&ne({})}),[ne,Y]);return Object(o.useImperativeHandle)(B,(()=>({blur:ae,setValue(e){A!==e&&(K(e),v&&v(A,!1))}})),[ae,v,A]),Object(o.useEffect)((()=>{const e=()=>{N&&z()};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[N]),Object(o.useEffect)((()=>{L&&ae()}),[ae,L]),Object(o.useEffect)((()=>{var e;return U&&M(N),document.body.classList.toggle(g.a.bodyFocused,N),N?(null!==j.current&&(e=>{if(U)return;const t=parseInt(g.a.searchFieldHeight,10)+parseInt(g.a.desktopDropdownContainerMarginTop,10),n=e.getBoundingClientRect(),o=n.height;if(o<=0)return;const a=n.bottom,i=s(e).y,r=i+o,l=i-t;let c=window.scrollY;a>window.innerHeight&&(c=r-window.innerHeight+5),l-5<c&&(c=l-5),window.scrollTo(window.scrollX,c)})(j.current),null===(e=H.current)||void 0===e||e.focus()):U&&T>-1&&window.scrollTo(window.scrollX,T),()=>{document.body.classList.remove(g.a.bodyFocused)}}),[M,U,N]),L?a.a.createElement("div",{style:{display:"none"}},G()):N?(()=>{const e=G();return a.a.createElement("div",{className:g.a.containerFocused,onMouseDown:te,onBlur:ne},U&&a.a.createElement(d.a,{closeText:t,onCloseClick:oe}),a.a.createElement("div",{key:"searchArea",className:Object(r.a)(g.a.searchArea,g.a.focused)},Z(!0)),U?e:Object(i.createPortal)(e,document.body))})():a.a.createElement("div",{onMouseDown:te},a.a.createElement("div",{key:"searchArea",className:g.a.searchArea},Z()))}))},809:function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"d",(function(){return d})),n.d(t,"b",(function(){return p})),n.d(t,"c",(function(){return m}));var o,a=n(399),i=n(854),r=n.n(i);!function(e){e.ExternalLocation="external_location",e.Location="location",e.PostalArea="postal_area",e.PostalReference="postal_reference",e.TreatmentCategory="treatment_category",e.Venue="venue",e.VenueType="venue_type"}(o||(o={}));var s,l=n(785);async function c(e,t,n,i,r=15){const c=`/api/v1/search/unified?sources=${encodeURIComponent(t)}&text=${encodeURIComponent(n)}&size=${encodeURIComponent(String(r))}`;try{const t=await Object(a.a)(e,c);return t&&t.results?function(e){const t=[];for(const n of e)t.some((e=>e.type===n.type&&e.data&&n.data&&e.data.name===n.data.name))?console.warn("Duplicate search result",n):t.push(n);return t}(t.results).map((e=>function(e,t){let n;switch(e.type){case o.ExternalLocation:return Object(l.d)("search",l.a.ExternalLocation,e.data.reference,e.data.name);case o.Location:return n=t===s.Id?String(e.data.id):e.data.normalisedName,Object(l.d)("search",l.a.Location,n,e.data.name);case o.PostalArea:return n=t===s.Id?String(e.data.id):e.data.normalisedName,Object(l.d)("search",l.a.PostalArea,n,e.data.name);case o.PostalReference:return n=t===s.Id?String(e.data.id):e.data.normalisedName,Object(l.d)("search",l.a.PostalReference,n,e.data.name);case o.TreatmentCategory:return function(e,t){if(e.id)return function(e,t){if(void 0===e.normalisedName||void 0===e.name)return;const n=t===s.Id?String(e.id):e.normalisedName;return Object(l.d)("search",l.a.Treatments,n,e.name,void 0,e.aliasId)}(e,t);return function(e,t){if(void 0===e.treatmentGroup||void 0===e.treatmentGroup.normalisedName||void 0===e.treatmentGroup.name)return;const n=t===s.Id?String(e.treatmentGroup.id):e.treatmentGroup.normalisedName;return Object(l.d)("search",l.a.TreatmentType,n,e.treatmentGroup.name,void 0,e.aliasId)}(e,t)}(e.data,t);case o.VenueType:return function(e,t){if(e.id)return function(e,t){if(void 0===e.normalisedName||void 0===e.name)return;const n=t===s.Id?String(e.id):e.normalisedName;return Object(l.d)("search",l.a.VenueType,n,e.name,void 0,e.aliasId)}(e,t)}(e.data,t);case o.Venue:return Object(l.d)("search",l.a.Venue,e.data.normalisedName,e.data.name);default:return console.warn("Unrecognised result type",e),e}}(e,i))).filter((e=>void 0!==e)):[]}catch(u){return console.warn(u),[]}}function u(e,t,n=s.Id){return r()((async function(t,o,a){return await c(t,e,o,n,a)}),t)}function d(e,t=s.Id){return u("treatment_category,venue_type",e,t)}function p(e,t=s.Id){return u("location",e,t)}function m(e){return u("venue",e)}!function(e){e[e.Id=0]="Id",e[e.NormalisedName=1]="NormalisedName"}(s||(s={}))},811:function(e,t,n){"use strict";n.d(t,"b",(function(){return u})),n.d(t,"c",(function(){return d})),n.d(t,"a",(function(){return h}));var o=n(0),a=n.n(o),i=n(5),r=n(352),s=n(850),l=n.n(s);const c=16;var u,d,p;!function(e){e.Start="start",e.Middle="middle",e.End="end"}(u||(u={})),function(e){e.Top="top",e.Bottom="bottom",e.Left="left",e.Right="right"}(d||(d={})),function(e){e.Vertical="vertical",e.Horizontal="horizontal"}(p||(p={}));const m=e=>e===d.Left||e===d.Right?p.Horizontal:p.Vertical,f=(e,t)=>{const n=[];n.push(l.a[e]);const o=m(e),a=l.a[Object(r.g)(`${o} ${t}`)];return void 0!==a&&n.push(a),n};class h extends a.a.Component{constructor(e){super(e),this.tooltipBounds=void 0,this.state={...this.props},this.windowLimits={top:0,bottom:0,left:0,right:0},this.tooltip=a.a.createRef()}componentDidMount(){this.windowLimits={top:0,bottom:window.innerHeight,left:0,right:window.innerWidth},this.tooltip.current&&(this.tooltipBounds=this.tooltip.current.getBoundingClientRect(),this.positionTooltip())}positionTooltip(){if(!this.tooltipBounds)return;let e;const t=this.quadrantThatFits();e=this.tooltipBounds.left<c||this.tooltipBounds.top<c?u.Start:this.tooltipBounds.right>this.windowLimits.right-c||this.tooltipBounds.bottom>this.windowLimits.bottom-c?u.End:this.props.pointer,this.setState({pointer:e}),this.setTooltipMargin(e,t)}setTooltipMargin(e,t){if(!this.tooltip.current)return;if(e!==u.Middle||!this.tooltipBounds)return;m(t)===p.Horizontal?this.tooltip.current.style.setProperty("margin-top",this.tooltipBounds.height/2*-1+"px","important"):this.tooltip.current.style.setProperty("margin-left",this.tooltipBounds.width/2*-1+"px","important")}quadrantThatFits(){return this.getPositions(this.props.position).filter((e=>{if(!this.tooltipBounds)return!1;switch(e){case d.Top:return this.tooltipBounds.top>c;case d.Bottom:return this.tooltipBounds.bottom<this.windowLimits.bottom-c;case d.Left:return this.tooltipBounds.left>c;case d.Right:return this.tooltipBounds.right<this.windowLimits.right-c;default:return!1}}))[0]}getPositions(e){return{[d.Left]:[d.Left,d.Right,d.Top,d.Bottom],[d.Right]:[d.Right,d.Left,d.Top,d.Bottom],[d.Top]:[d.Top,d.Bottom,d.Left,d.Right],[d.Bottom]:[d.Bottom,d.Top,d.Left,d.Right]}[e]}render(){const e=Object(i.a)([l.a.tooltip,f(this.state.position,this.state.pointer),this.state.extraStyles]);return a.a.createElement("div",{className:e,ref:this.tooltip},this.props.children)}}},812:function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return p}));var o,a=n(0),i=n.n(a),r=n(94),s=n(161),l=n(162),c=n(163),u=n(887);!function(e){e.MobileVenue="mobileVenue",e.YieldDiscount="yieldDiscount",e.HomeBased="homeBased"}(o||(o={}));const d={[o.MobileVenue]:{icon:s.a,colour:r.ColorBloomBasePink600},[o.YieldDiscount]:{icon:l.a,colour:r.ColorBloomTeal700},[o.HomeBased]:{icon:c.a,colour:r.ColorBloomBasePink600}};function p(e){const{label:t,size:n,tooltipText:o,type:a}=e,r=d[a];return i.a.createElement(u.a,{size:n,icon:r.icon,iconColour:r.colour,text:t,colour:r.colour,tooltip:o})}},813:function(e,t,n){"use strict";function o(e){const[t,n]=e.split(":"),o=parseInt(t,10),a=o>=12&&24!==o,i=a||24===o?o-12:o;return[`${0===i?"12":i}:${n}`,a?"PM":"AM"]}function a(e){const[t,n]=o(e);return`${t} ${n}`}function i(e,t,n=t){const o=[];for(let i=t;i<=n;i++){const t=i<10?`0${i.toString()}`:i.toString(),n=`${t}00`,r=e?a(`${t}:00`):`${t}:00`;o.push({value:n,label:r})}return o}function r(e,t){let n=parseInt(e.substring(0,2),10)+t;n<0&&(n+=24),n>24&&(n%=24);const o=e.substring(2,4);return(n<10?`0${n.toString()}`:n.toString())+o}function s(e,t){return l(e)-l(t)}function l(e){const t=function(e){return{hours:parseInt(e.substring(0,2),10),minutes:parseInt(e.substring(2,4),10)}}(e);return 60*t.hours+t.minutes}function c(e,t){if(n=t,["US","GB","PH","CA","AU","NZ","IN","EG","SA","CO","PK","MY"].some((e=>n.toUpperCase()===e.toUpperCase())))return o(e);var n;return[e&&e.length<5?`0${e}`:e,void 0]}function u(e){const t=`${e}00`;return t&&t.length<4?`0${t}`:t}n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){return r})),n.d(t,"d",(function(){return s})),n.d(t,"e",(function(){return c})),n.d(t,"b",(function(){return u}))},814:function(e,t,n){"use strict";function o(e,t){const n=e.split(",").map((e=>{const t=e.split(":");if(2!==t.length)return console.warn("Skipping invalid choice part",e),{template:e};const n=t[0],o=t[1],a=n.split("-");let i,r;switch(a.length){case 1:a[0]&&(i=parseInt(a[0],10),r=i);break;case 2:i=parseInt(a[0],10),r=parseInt(a[1],10);break;default:console.warn("Invalid range",n)}return{lower:i,upper:r,template:o}})).filter((e=>!(void 0!==e.lower&&t<e.lower)&&!(void 0!==e.upper&&t>e.upper)));return n.length>0?n[0].template.replace("#",t.toString()):(console.warn(`No matching choice for ${t} in template`),"")}n.d(t,"a",(function(){return o}))},815:function(e,t,n){"use strict";n.d(t,"d",(function(){return i})),n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return l}));var o=n(82);const a=e=>{var t,n,o,a,i,r,s,l;return(null==e?void 0:e.point)?{locationType:"lat_lon",locationLatitude:e.point.lat,locationLongitude:e.point.lon,locationDistanceUnit:null===(t=e.radius)||void 0===t?void 0:t.distanceUnit,locationRadiusDistance:null===(n=e.radius)||void 0===n?void 0:n.distance}:(null==e?void 0:e.external)?{locationType:"external",locationLatitude:e.external.point.lat,locationLongitude:e.external.point.lon,locationDistanceUnit:null===(o=e.radius)||void 0===o?void 0:o.distanceUnit,locationRadiusDistance:null===(a=e.radius)||void 0===a?void 0:a.distance}:(null==e?void 0:e.tree)?{locationType:e.tree.type,locationLatitude:e.tree.point.lat,locationLongitude:e.tree.point.lon,locationDistanceUnit:null===(i=e.radius)||void 0===i?void 0:i.distanceUnit,locationRadiusDistance:null===(r=e.radius)||void 0===r?void 0:r.distance,locationName:e.tree.name}:(null==e?void 0:e.postalReference)?{locationType:"postal_reference",locationLatitude:e.postalReference.point.lat,locationLongitude:e.postalReference.point.lon,locationName:e.postalReference.name,locationDistanceUnit:null===(s=e.radius)||void 0===s?void 0:s.distanceUnit,locationRadiusDistance:null===(l=e.radius)||void 0===l?void 0:l.distance}:(null==e?void 0:e.box)?{location_box_northeast_lat:e.box.northEastLat,location_box_northeast_lon:e.box.northEastLon,location_box_southwest_lat:e.box.southWestLat,location_box_southwest_lon:e.box.southWestLon}:void 0},i=async(e,t,n,i,r)=>{var s,l,c,u,d,p,m,f,h,g,b,v,y,w,T,C,_,S,E,O,x,I,R,k,L,P,D,B,M,j,H;const N=n.location;let W="treatment_type";(null===(s=n.venueType)||void 0===s?void 0:s.id)&&(W="venue_type"),n.treatmentCategories&&(W="treatment"),await Object(o.c)(e,o.a.Search,{country:t,platform:"web",search_results_number:i,search_type:W,treatment_type_id:null===(l=n.treatmentCategoryGroup)||void 0===l?void 0:l.id.toString(),treatment_id:null===(c=n.treatmentCategories)||void 0===c?void 0:c[0].id.toString(),venue_type_id:null===(u=n.venueType)||void 0===u?void 0:u.id.toString(),location_type:null===(d=a(N))||void 0===d?void 0:d.locationType,location_tree_id:null===(m=null===(p=n.location)||void 0===p?void 0:p.tree)||void 0===m?void 0:m.id.toString(),location_latitude:null===(f=a(N))||void 0===f?void 0:f.locationLatitude,location_longitude:null===(h=a(N))||void 0===h?void 0:h.locationLongitude,location_name:null===(g=a(N))||void 0===g?void 0:g.locationName,location_external_id:null===(v=null===(b=n.location)||void 0===b?void 0:b.external)||void 0===v?void 0:v.id.toString(),location_zip_code:null===(w=null===(y=n.location)||void 0===y?void 0:y.postalReference)||void 0===w?void 0:w.name,location_zip_code_id:null===(C=null===(T=n.location)||void 0===T?void 0:T.postalReference)||void 0===C?void 0:C.id.toString(),location_box_northeast_lat:null===(_=a(N))||void 0===_?void 0:_.location_box_northeast_lat,location_box_northeast_lon:null===(S=a(N))||void 0===S?void 0:S.location_box_northeast_lon,location_box_southwest_lat:null===(E=a(N))||void 0===E?void 0:E.location_box_southwest_lat,location_box_southwest_lon:null===(O=a(N))||void 0===O?void 0:O.location_box_southwest_lon,location_radius_distance:null===(x=a(N))||void 0===x?void 0:x.locationRadiusDistance,location_radius_distance_unit:null===(I=a(N))||void 0===I?void 0:I.locationDistanceUnit,selected_appointment_date_type:(null===(R=n.date)||void 0===R?void 0:R.from)?"selected_date":"any_date",selected_appointment_date_from:null===(k=n.date)||void 0===k?void 0:k.from,selected_appointment_date_to:null===(L=n.date)||void 0===L?void 0:L.to,selected_appointment_time_type:n.startHours?"selected_time":"any_time",selected_appointment_time_from:n.startHours,selected_appointment_time_to:n.endHours,sorted_by:n.sort,price_filter_max:null===(P=n.price)||void 0===P?void 0:P.max,price_filter_min:null===(D=n.price)||void 0===D?void 0:D.min,venue_amenities_id_filter:null===(B=n.amenities)||void 0===B?void 0:B.map((e=>e.id)).join(", "),brands_id_filter:(null===(M=n.productBrands)||void 0===M?void 0:M.length)?n.productBrands[0].id.toString():void 0,brands_filter:(null===(j=n.productBrands)||void 0===j?void 0:j.length)?n.productBrands[0].name:"all_brands",accolade_filter_id:null===(H=n.accolade)||void 0===H?void 0:H.id.toString(),is_new_venues_filtered:Boolean(n.newVenues),is_discount_filtered:Boolean(n.yieldDiscounted),is_express_treatments_filtered:Boolean(n.maxServiceDurationMinutes),treatment_alias_id:null==r?void 0:r.toString()})},r=(e,t,n,a)=>{var i,r;const s=null===(i=t.treatmentCategoryGroup)||void 0===i?void 0:i.id.toString(),l=s&&!t.treatmentCategories?n["popular-treatments"][s]:[];Object(o.c)("search_results_filters_clicked",o.a.Other,{country:e,platform:"web",filter_type:a,treatment_category:s,treatment:null===(r=t.treatmentCategories)||void 0===r?void 0:r[0].id.toString(),popular_treatments_displayed:l.length>0})},s=({countryCode:e,browsePageOutputSpecification:t,isOnMap:n,results:i})=>{var r,s,l,c;const u=t.location;Object(o.c)("map_toggle",o.a.Other,{country:e,is_hidden:!n,platform:"web",is_web_mobile:!0,search_results_number:i,treatment_type_id:null===(r=t.treatmentCategoryGroup)||void 0===r?void 0:r.id.toString(),treatment_id:null===(s=t.treatmentCategories)||void 0===s?void 0:s[0].id.toString(),venue_type_id:null===(l=t.venueType)||void 0===l?void 0:l.id.toString(),location_type:null===(c=a(u))||void 0===c?void 0:c.locationType})},l=(e,t,n)=>{Object(o.c)("map_venue_pin_clicked",o.a.Other,{country:e,platform:"web",is_web_mobile:t,venue_id:`${n.venueId()}`,venue_rating_displayed:n.venueRating()})}},816:function(e,t,n){e.exports={"breakpoint-tablet":"(min-width: 520px)",selectable:"ListItem-module--selectable--11f344",selected:"ListItem-module--selected--4c23bd",listItem:"ListItem-module--listItem--4884c1",categorySeparator:"ListItem-module--categorySeparator--b3f75c",listItemSeparator:"ListItem-module--listItemSeparator--6bfb86",currentLocation:"ListItem-module--currentLocation--652bee"}},818:function(e,t,n){"use strict";var o;n.d(t,"a",(function(){return o})),function(e){e.Jit="jit",e.Offpeak="offpeak",e.SalePrice="sale_price"}(o||(o={}))},819:function(e,t,n){"use strict";async function o(e=3e4){return navigator&&navigator.geolocation?await new Promise(((t,n)=>{const o={timeout:e,maximumAge:6e4};window.navigator.geolocation.getCurrentPosition(t,n,o)})):Promise.reject("geolocation not supported")}function a(e){return"[object PositionError]"===e.toString()||"[object GeolocationPositionError]"===e.toString()}n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a}))},820:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var o=n(12);function a(){return o.a&&Boolean(window.MSInputMethodContext)&&Boolean(document.documentMode)}},821:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var o=n(0);const a={default:"var(--color-grey-70)",error:"#c80f00"};function i({error:e,positioningClassName:t}){const n=e?a.error:a.default;return o.createElement("svg",{className:t,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},o.createElement("g",{fill:"none",fillRule:"evenodd"},o.createElement("path",{d:"M0 0h24v24H0z"}),o.createElement("path",{stroke:n,strokeWidth:"2",d:"M12 21c1.5 0 7-7 7-11s-3-7-7-7-7 3-7 7 5.5 11 7 11z"}),o.createElement("circle",{cx:"12",cy:"10",r:"2",fill:n})))}},826:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var o=n(787);class a{constructor(e){this.priceRangeOutput=e}isRange(){return this.priceRangeOutput.range||!1}getSalePrice(){return this.priceRangeOutput.minSalePriceAmount}getFullPrice(){return this.priceRangeOutput.minFullPriceAmount}getDiscount(){return this.priceRangeOutput.maxDiscountPercentage}hasYieldDiscount(){return this.priceRangeOutput.yieldDiscountTypes.length>0}shouldShowStrikeThrough(){const e=o.a(this.getSalePrice()),t=o.a(this.getFullPrice());return!this.isRange()&&e!==t}getStrikeThroughPrice(e){return this.shouldShowStrikeThrough()?o.c(this.getFullPrice(),e):""}getDiscountText(e){const t=this.isRange()?e.saveUpTo:e.save,n=this.getDiscount().toString();return this.hasYieldDiscount()&&!this.shouldShowStrikeThrough()?`${t} ${n}%`:""}getPriceWithPrefix(e,t){const n=o.c(this.getSalePrice(),e),a=o.d(this,t);return""===a?n:`${a} ${n}`}static createDefaultPriceRangeOutput(e=null){const t={maxDiscountPercentage:0,maxFullPriceAmount:"",maxSalePriceAmount:"",maxSavingAmount:"",minDiscountPercentage:0,minFullPriceAmount:"",minSalePriceAmount:"",minSavingAmount:"",range:!1,yieldDiscountTypes:[]};return e&&Object.assign(t,e),t}}},827:function(e,t,n){"use strict";var o;function a(){return[o.Monday,o.Tuesday,o.Wednesday,o.Thursday,o.Friday,o.Saturday,o.Sunday]}function i(){const e=(new Date).getDay();return[o.Sunday,o.Monday,o.Tuesday,o.Wednesday,o.Thursday,o.Friday,o.Saturday][e]}function r(e){switch(e){case o.Monday:return"1";case o.Tuesday:return"2";case o.Wednesday:return"3";case o.Thursday:return"4";case o.Friday:return"5";case o.Saturday:return"6";case o.Sunday:return"7"}}n.d(t,"a",(function(){return a})),n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return r})),function(e){e.Sunday="sunday",e.Monday="monday",e.Tuesday="tuesday",e.Wednesday="wednesday",e.Thursday="thursday",e.Friday="friday",e.Saturday="saturday"}(o||(o={}))},828:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var o=n(827),a=n(813);function i(e,t,n,i,r){return Object(o.a)().map((s=>{const l={dayOfWeekType:s,dayName:n[s],dayNameShort:i[Object(o.b)(s)]},c=e.find((e=>e.dayOfWeek===s));if(void 0===c||!c.open||void 0===c.from||void 0===c.to)return{...l,isOpen:!1,timeColumns:[t]};const u=Object(a.e)(c.from,r),d=Object(a.e)(c.to,r);return{...l,isOpen:!0,timeColumns:[u[0],u[1],d[0],d[1]]}}))}},829:function(e,t,n){"use strict";n.d(t,"d",(function(){return s})),n.d(t,"e",(function(){return l})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){return i}));var o,a,i,r=n(48);function s(e,t,n,o,a){return Object(r.d)({category:e,property:t,action:n,label:o,value:a})}function l(e,t){return s(e,t,i.Click)}!function(e){e.BrowseListResults="browse_list_results",e.BrowseMapResults="browse_map_results",e.BrowseHybridResults="browse_hybrid_results",e.BrowseListCard="browse_list_card",e.BrowseHybridCard="browse_hybrid_card"}(o||(o={})),function(e){e.QuickView="quick_view",e.BestTreatmentInTown="best_treatment_in_town",e.GoToVenue="go_to_venue",e.ImageSlider="image_slider",e.ToggleToListButton="toggle_to_list_button",e.ToggleToHybridButton="toggle_to_hybrid_button",e.ToggleToMapButton="toggle_to_map_button"}(a||(a={})),function(e){e.Open="open",e.Close="close",e.Click="click"}(i||(i={}))},835:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var o=n(0),a=n.n(o),i=n(40),r=n(42),s=n(97),l=n(5),c=n(849),u=n.n(c);class d extends a.a.PureComponent{render(){const{closeText:e,title:t,positioningClassNames:n,icon:o}=this.props,c=Object(l.a)(u.a.header,n);return a.a.createElement("header",{className:c},a.a.createElement(i.a,{type:"smHeader"},t),a.a.createElement(r.a,{space:"xxs",className:u.a.close,onClick:this.props.onCloseClick},o&&a.a.createElement(s.a,{size:o.size,className:u.a.icon}),a.a.createElement(i.a,null,e)))}}},836:function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return r}));const o={km:6371,mile:3960};var a;function i(e){return e*Math.PI/180}function r(e,t,n){const r=n===a.KM?o.km:o.mile,s=i(t.lat-e.lat),l=i(t.lon-e.lon),c=i(e.lat),u=i(t.lat),d=Math.sin(s/2)*Math.sin(s/2)+Math.sin(l/2)*Math.sin(l/2)*Math.cos(c)*Math.cos(u);return r*(2*Math.atan2(Math.sqrt(d),Math.sqrt(1-d)))}!function(e){e[e.KM=0]="KM",e[e.MILE=1]="MILE"}(a||(a={}))},837:function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return p})),n.d(t,"d",(function(){return f})),n.d(t,"c",(function(){return g}));var o=n(856),a=n(352),i=n(836),r=n(349),s=n(875),l=n(872),c=(n(814),n(838)),u=n(857);function d(e,t,n,o){const c=t.data,u=e.location?e.location.point:void 0,d=function(e,t,n,o){if(!n)return"";const s="mile"===t.distanceUnit?i.a.MILE:i.a.KM,l=Object(i.b)(n,o,s),c=Object(a.c)(l,t);return r.c(e.page.browse.results.distance,c)}(n,o,u,c.location.point),f=g(t,e),b={openLabel:n.page.browse.results["quickview-open"],closeLabel:n.page.browse.results["quickview-close"],buttonLabel:n.venue["go-to-venue-button"]},v=Object(l.b)(t.data.openingHours,n.venue["opening-hours"].closed,n.common["day-names"],n.common.calendar["day-names-short"],o.country.countryCode),y="WHN_GB"===o.code||"WHN_IE"===o.code?"newline":"prefix",w=c.treatmentBadges;return{name:c.name,shortAddress:c.location.tree.name,distance:d,openingHours:v,rating:c.rating,reviewCountTemplate:n.venue["reviews-template"],openMapText:n.page.browse.results["open-map"],images:c.images.slice(0,5),eyecatcher:m(t,n),tags:h(t,n),menuHighlights:c.menuHighlights.map((e=>p(e,n))),venuePageUri:f,venueId:c.id,description:c.description,quickviewLabels:b,mapPopup:{mapApiKey:n.page.maps["google-map"]["api-key"],geoCode:c.location.point,mapCenter:c.location.map,addressLines:Object(a.a)(c.location.address.addressLines,c.location.address.postalCode,y),ctaText:n.venue["go-to-venue-button"]},bestTreatmentsBadgeLabel:Object(s.a)(w.map((e=>e.treatmentName)),n.common.labels["btt-badge-singular"],n.common.labels["btt-badge-plural"]),bestTreatmentsBadgeTooltip:n.common.labels["btt-badge-tooltip"],bestTreatmentsTrackingIds:w.map((e=>e.treatmentId)),channelOutput:o,cmsBrowsePage:n,isNewVenue:c.newVenue,accolades:c.accolades}}function p(e,t){const n=function(e,t){const n=e.minDurationMinutes,o=e.maxDurationMinutes,i=Object(a.d)(n,t.venue.menu.labels);if(n!==o){return`${i} - ${Object(a.d)(o,t.venue.menu.labels)}`}return i}(e.data.durationRange,t);return{dataOfferId:e.data.id,name:void 0!==e.data.name?e.data.name:"",duration:n,numGuests:e.data.guests,priceRangeOutput:e.data.priceRange,pricingDisplayType:e.data.pricingDisplayType,durationRange:e.data.durationRange}}function m(e,t){const n=e.data.accolades.find((e=>e.featured));if(n&&n.images){const e=t.entities.accolade[n.tooltipTextCMSKey];return{imageUri:Object(u.a)(n),tooltipText:void 0!==e?e.description:""}}if(e.data.newVenue)return t.page.browse.results.new}function f(e){return e.reduce(((e,t)=>(t.data.priceRange.yieldDiscountTypes.forEach((t=>{e[t]=!0})),e)),{})}function h(e,t){const n=f(e.data.menuHighlights);return Object(o.a)(n,e.data.type,e.data.subTypes,t.venue)}function g(e,t){return Object(c.f)(e.data.uri.desktopUri,{serviceIds:e.data.menuHighlights.map((e=>e.data.id)),date:t.date&&t.date.from,startTime:t.startHours,endTime:t.endHours,treatmentIds:(t.treatmentCategories||[]).map((e=>e.id)),treatmentTypeId:t.treatmentCategoryGroup&&t.treatmentCategoryGroup.id})}},838:function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a})),n.d(t,"c",(function(){return i})),n.d(t,"d",(function(){return s})),n.d(t,"e",(function(){return l})),n.d(t,"f",(function(){return u}));const o="serviceIds",a="date",i="timeFrom",r="timeTo",s="t",l="tt";function c(e){return`0${e}00`.slice(-4)}function u(e,t){const n=[];n.push(`${o}=${t.serviceIds.join(",")}`),t.date&&n.push(`${a}=${t.date}`),t.startTime&&n.push(`${i}=${c(t.startTime)}`),t.endTime&&n.push(`${r}=${c(t.endTime)}`),t.treatmentIds.length>0&&n.push(`${s}=${t.treatmentIds.join(",")}`),t.treatmentTypeId&&n.push(`${l}=${t.treatmentTypeId}`);return e+(n.length>0?`?${n.join("&")}`:"")}},839:function(e,t,n){e.exports={"breakpoint-desktop":"(min-width: 992px)","breakpoint-tablet":"(min-width: 520px)",white:"undefined","max-viewport-width":"1160px",animationTime:"400ms",animationTimingFunction:"ease-out",www:"WhatWhereWhen-module--www--9077f0",background:"WhatWhereWhen-module--background--04454c",content:"WhatWhereWhen-module--content--2344b8",viewModeToggle:"WhatWhereWhen-module--viewModeToggle--9273ef",collapsed:"WhatWhereWhen-module--collapsed--a740ab",collapsing:"WhatWhereWhen-module--collapsing--062f02","collapsing-animation":"WhatWhereWhen-module--collapsing-animation--b07bc8",expanding:"WhatWhereWhen-module--expanding--c0b0f3","expanding-animation":"WhatWhereWhen-module--expanding-animation--2af785","fade-in":"WhatWhereWhen-module--fade-in--4f9802",headline:"WhatWhereWhen-module--headline--15797b",inputs:"WhatWhereWhen-module--inputs--da978f",hideInput:"WhatWhereWhen-module--hideInput--4d4bc6",renderInput:"WhatWhereWhen-module--renderInput--b3b3fa"}},849:function(e,t,n){e.exports={"breakpoint-tablet":"(min-width: 520px)",header:"Header-module--header--05e04c",close:"Header-module--close--47f42e",icon:"Header-module--icon--a64dc4",mobileOnly:"Header-module--mobileOnly--0dee57"}},850:function(e,t,n){e.exports={"breakpoint-tablet":"(min-width: 520px)",tooltip:"Tooltip-module--tooltip--9c5dbb",top:"Tooltip-module--top--7d798f",right:"Tooltip-module--right--a11e68",bottom:"Tooltip-module--bottom--af3f59",left:"Tooltip-module--left--91e56f",horizontalStart:"Tooltip-module--horizontalStart--57fd2a",horizontalMiddle:"Tooltip-module--horizontalMiddle--952532",horizontalEnd:"Tooltip-module--horizontalEnd--419986",verticalStart:"Tooltip-module--verticalStart--ea83a3",verticalMiddle:"Tooltip-module--verticalMiddle--30572f",verticalEnd:"Tooltip-module--verticalEnd--6fa790"}},855:function(e,t,n){"use strict";n.d(t,"e",(function(){return s})),n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return u})),n.d(t,"d",(function(){return d})),n.d(t,"c",(function(){return p}));var o=n(359),a=n.n(o),i=n(99),r=n(12);function s(e,t,n){const o=new a.a(e);return o.set("protocol",t),o.set("host",n),o.toString()}function l(e,t,n){let o=n;if(r.a){const e=Object(i.i)(window.location.pathname,t.code,t.languageCode);e&&(o=e.values)}return Object(i.e)("browse",{...o,...e},t.code,t.languageCode)||""}function c(e,t,n){return l({page:e>1?[e.toString()]:[]},t,n)}function u(e,t,n){return l({page:null,location:[e]},t,n)}function d(e,t,n){return l({page:null,treatments:[e]},t,n)}function p(e,t,n){return l({page:null,treatmentType:[e]},t,n)}},856:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var o=n(812),a=n(349);function i(e,t,n,i){const r=[],s=function(e,t){function n(e){const n=t.menu[e];return{type:o.b.YieldDiscount,label:n,tooltipText:Object(a.c)(t.menu["discounts-tooltip"],n)}}if(e.jit&&e.offpeak)return n("jit-and-offpeak-discount-active");if(e.jit)return n("jit-discount-active");if(e.offpeak)return n("offpeak-discount-active");return}(e,i);s&&r.push(s),t&&t.mobile&&r.push(function(e){return{type:o.b.MobileVenue,label:e["mobile-venue"].label,tooltipText:e["mobile-venue"]["tooltip-content"]}}(i));const l=t&&t.id.toString()===i["home-based-venue"]["venue-type-id"],c=n&&n.some((e=>e.id.toString()===i["home-based-venue"]["venue-type-id"]));return(l||c)&&r.push(function(e){return{type:o.b.HomeBased,label:e["home-based-venue"].label,tooltipText:e["home-based-venue"]["tooltip-content"]}}(i)),r}},857:function(e,t,n){"use strict";function o(e){const t=Object.keys(e.vectorImage.uris)[0];return e.vectorImage.uris[t]}n.d(t,"a",(function(){return o}))},858:function(e,t,n){"use strict";var o=n(808);n.d(t,"a",(function(){return o.b}))},872:function(e,t,n){"use strict";n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return m.a}));var o=n(0),a=n.n(o),i=n(5),r=n(55),s=n(42),l=n(40),c=n(827),u=n(899),d=n.n(u);class p extends o.PureComponent{constructor(e){super(e),this.state={today:""}}componentDidMount(){this.setState({today:Object(c.c)()})}render(){return a.a.createElement("div",{className:this.props.positioningClassName,"data-cy":"VenueOpeningTimes"},a.a.createElement(r.a,{space:"xs"},this.props.items.map((e=>a.a.createElement("div",{key:e.dayName,className:Object(i.a)(this.state.today===e.dayOfWeekType,this.state.today===e.dayOfWeekType&&d.a.bold,e.isOpen?d.a.open:d.a.closed)},a.a.createElement(s.a,{justify:"between"},a.a.createElement(s.a,{space:"sm"},a.a.createElement("div",{className:d.a.indicator}),a.a.createElement(l.a,{className:d.a.labelDaynameShort},e.dayNameShort),a.a.createElement(l.a,{className:d.a.labelDayname},e.dayName)),e.timeColumns.length>1?a.a.createElement(s.a,{space:"xs"},a.a.createElement(l.a,null,e.timeColumns[0]),void 0!==e.timeColumns[1]&&a.a.createElement(l.a,null,e.timeColumns[1]),a.a.createElement(l.a,null,"\u2013"),a.a.createElement(l.a,null,e.timeColumns[2]),void 0!==e.timeColumns[3]&&a.a.createElement(l.a,null,e.timeColumns[3])):a.a.createElement("div",null,a.a.createElement(l.a,null,e.timeColumns[0]))))))))}}var m=n(828)},875:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var o=n(349);function a(e,t,n){if(0===e.length)return;const a=1===e.length?t:n;return Object(o.c)(a,...e)}},876:function(e,t,n){"use strict";n.d(t,"b",(function(){return d})),n.d(t,"a",(function(){return p}));var o,a=n(0),i=n.n(a),r=n(5),s=n(790),l=n(877),c=n.n(l),u=n(839);!function(e){e[e.None=0]="None",e.Click="click",e.Scroll="scroll"}(o||(o={}));const d=i.a.createContext((e=>{}));class p extends i.a.PureComponent{constructor(){var e;super(...arguments),this.state={collapsed:null!==(e=!this.props.openOnMount)&&void 0!==e&&e,ignoreScrolls:!1,animating:!1},this.setClickCollapsed=e=>{this.setCollapsed(e,o.Click)},this.setCollapsed=(e,t)=>{if(e!==this.state.collapsed&&!this.state.animating){if(this.setState({collapsed:e}),t!==o.None){Object(s.h)(this.props.trackingCategory,t,e?s.a.Collapse:s.a.Expand),this.setState({animating:!0});const n=1.1*parseInt(u.animationTime,10);setTimeout((()=>this.setState({animating:!1})),n)}this.props.updateHeroHeight&&this.props.updateHeroHeight()}},this.setIgnoreScrolls=e=>{this.setState({ignoreScrolls:e})},this.onScroll=()=>{if(this.state.ignoreScrolls)return;const e=window.scrollY;setTimeout((()=>{if(this.state.ignoreScrolls)return;Math.abs(window.scrollY-e)>0&&this.setCollapsed(!0,o.Scroll)}),50)},this.onCollapse=()=>{setTimeout((()=>{this.state.ignoreScrolls||this.setCollapsed(!0,o.Scroll)}),50)}}componentDidMount(){const e=!this.props.openOnMount;this.setCollapsed(e,o.None),document.addEventListener("scroll",this.onScroll),this.props.collapseOnEvent&&document.addEventListener(this.props.collapseOnEvent,this.onCollapse)}componentWillUnmount(){document.removeEventListener("scroll",this.onScroll),this.props.collapseOnEvent&&document.removeEventListener(this.props.collapseOnEvent,this.onCollapse)}render(){var e,t;return i.a.createElement("div",{className:Object(r.a)({[c.a.container]:!0,[c.a.heroTransition]:!0,[c.a.sticky]:!this.state.ignoreScrolls,[c.a.hidden]:this.props.hidden}),style:{"--StickyCollapse-height":`${null===(t=null===(e=this.props.heightRef)||void 0===e?void 0:e.current)||void 0===t?void 0:t.offsetHeight}px`},"data-cy":"Hero"},i.a.createElement(d.Provider,{value:this.setIgnoreScrolls},this.props.children(this.state.collapsed,this.setClickCollapsed,this.state.animating)))}}},877:function(e,t,n){e.exports={"z-index-sticky-browse-filter":"1","breakpoint-tablet":"(min-width: 520px)",heroTransition:"StickyCollapse-module--heroTransition--ae11e6",container:"StickyCollapse-module--container--d63e74",sticky:"StickyCollapse-module--sticky--3bffa5",hidden:"StickyCollapse-module--hidden--d0d473"}},887:function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var o=n(0),a=n.n(o),i=n(773),r=n(84),s=n(40),l=n(354),c=n(811),u=n(895),d=n.n(u);function p(e){const{icon:t,iconColour:n,size:o,tooltip:u,text:p,colour:m,children:f}=e,[h,g]=a.a.useState(!1),{isMobile:b}=Object(i.a)();let v=Object(r.a)({device:"mobile",serverRender:b});o&&(v="small"===o);const y=v?16:24,w=v?"xs":"md";const T=n?{fill:n}:{};return a.a.createElement("div",{className:d.a.iconWithContent,onMouseEnter:function(){g(!0)},onMouseLeave:function(){g(!1)},onPointerDown:function(){g(!h)},onClick:function(e){"A"!==e.target.nodeName&&(e.preventDefault(),e.stopPropagation())}},a.a.createElement(l.a,{space:w,align:"center"},a.a.createElement(t,{size:y,...T}),function(){if(f)return a.a.createElement(a.a.Fragment,null,f);const e="small"===o?"captionHeavy":"smHeader";return m?a.a.createElement("div",{style:{color:m}},a.a.createElement(s.a,{type:e},p)):a.a.createElement(s.a,{type:e},p)}()),u&&h?a.a.createElement(c.a,{position:c.c.Top,pointer:c.b.Middle,extraStyles:[d.a.tooltip]},u):null)}},895:function(e,t,n){e.exports={iconWithContent:"styles-module--iconWithContent--c34344",tooltip:"styles-module--tooltip--256614"}},897:function(e,t,n){e.exports={"breakpoint-tablet":"(min-width: 520px)",list:"SelectInput-module--list--85bf07"}},899:function(e,t,n){e.exports={"breakpoint-tablet":"(min-width: 520px)",indicator:"VenueOpeningTimes-module--indicator--b56cb6",closed:"VenueOpeningTimes-module--closed--5b7c8c",open:"VenueOpeningTimes-module--open--e78b75",labelDayname:"VenueOpeningTimes-module--labelDayname--adec04",labelDaynameShort:"VenueOpeningTimes-module--labelDaynameShort--357283",bold:"VenueOpeningTimes-module--bold--2fdfa5",highlighted:"VenueOpeningTimes-module--highlighted--587768"}},900:function(e,t,n){e.exports={"breakpoint-tablet":"(min-width: 520px)",button:"ViewModeToggle-module--button--6e057e"}},901:function(e,t,n){e.exports={"text-regular":"14px",select:"LocationRadius-module--select--794147",label:"LocationRadius-module--label--a3dd87"}},902:function(e,t,n){e.exports={"text-regular":"14px",listHeading:"ListHeading-module--listHeading--205469"}},903:function(e,t,n){e.exports={"text-regular":"14px",listLabel:"ListLabel-module--listLabel--17841c"}},904:function(e,t,n){e.exports={"breakpoint-tablet":"(min-width: 520px)","breakpoint-smaller-than-tablet":"(max-width: 519px)","tablet-layout-width":"520px","z-index-sticky-browse-filter-dropdown":"20",searchFieldHeight:"40px",desktopDropdownContainerMarginTop:"0",bodyFocused:"DropdownInput-module--bodyFocused--39cde5",containerFocused:"DropdownInput-module--containerFocused--16915f",searchArea:"DropdownInput-module--searchArea--4ed0f5",focused:"DropdownInput-module--focused--f55bab",dropdownContainer:"DropdownInput-module--dropdownContainer--6ea99b"}},905:function(e,t,n){e.exports={"breakpoint-tablet":"(min-width: 520px)",searchFieldHeight:"40px",container:"InputField-module--container--442176",patternedBackground:"InputField-module--patternedBackground--ab8a20",focused:"InputField-module--focused--f84d83",error:"InputField-module--error--eadc3c",input:"InputField-module--input--ba477c",noneditable:"InputField-module--noneditable--3fa93d",icon:"InputField-module--icon--580060",reset:"InputField-module--reset--acf14a",visible:"InputField-module--visible--b1ce3d"}}}]); //# sourceMappingURL=BrowsePage~NearMePage~QuestionPage~TreatmentPage~TreatmentTypePage~VenueTypePage-88faee.js.map