PageSourceSearch

https://resoflow-prod.web.app/assets/PublicWhatsOnPage-Chd_O9UA.js

js resoflow-prod.web.app collected 2026-10-03 12:37:19 UTC 9,582 bytes, 2 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"1.0.0"};var s=(new e.Error).stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="9d517646-f4d5-4f8b-acea-e29c1d0df20c",e._sentryDebugIdIdentifier="sentry-dbid-9d517646-f4d5-4f8b-acea-e29c1d0df20c")}catch(t){}}();import{b as e,j as s,bC as t,P as r,bD as a,bd as n}from"./index-CJ0eVksD.js";import{r as i,L as o}from"./vendor-react-Cg5IBgwO.js";import{u as l}from"./useVenueSlug-BxKp6v5q.js";import{c as d}from"./apiClient--m1UJa-S.js";import{w as u}from"./warmAppCheck-BZyyZa9n.js";import{u as m,r as c,a as p,c as x}from"./useVenueHub-CO7qGTlo.js";import{B as f}from"./button-Duwog9Kr.js";import{f as h}from"./helpers-DlcxdMGb.js";import{f as j}from"./whatsOnDisplay-q8WR5NBA.js";import{R as g}from"./RestaurantNotFound-DQyYVdiL.js";import{i as v}from"./publicLoadErrorPolicy-VQSxZSMd.js";import{V as b}from"./VenueBrandScope-BsXC4AXW.js";import{G as y}from"./GuestFooter-3OpaifHb.js";import{G as w}from"./GuestBackLink-Ccohp12O.js";import{V as N}from"./VenueHeader-pDPWBGp2.js";import{u as k,G as S}from"./GuestStickyHeader-kxcYkvs2.js";import{D as P,a as E,b as T,c as U}from"./dialog-BCSGQg7_.js";import{a as A}from"./policyAssembly-BmcRAJjp.js";import{g as D}from"./guestPageAnatomy-D4l2QrnT.js";import{H as F}from"./GuestAccountLink-DqBBOkzf.js";import{C}from"./calendar-fgfQljLH.js";import{C as I}from"./clock-2CKq179y.js";import"./vendor-firebase-db-BWYKWqg8.js";import"./vendor-firebase-auth-Dw-tYyLh.js";import"./firebase-DvHzvjpo.js";import"./turnstileScript-Nso5-LFr.js";import"./offlineActionPolicy-Djb7n2Z2.js";import"./index-C30fg99R.js";import"./utils-DruVD-uI.js";import"./useButton-Dv-sk77p.js";import"./cycleWindow-BHn3tM_i.js";import"./subDays-DeC4Dhpo.js";import"./en-US-DSTBSzO8.js";import"./format-Cqu3RLcn.js";import"./parseISO-B25Dly6c.js";import"./guestLoadRetry-CpAub0YA.js";import"./VenueLogo-BPpG5wQk.js";import"./venueAccent-DMW231X_.js";import"./PoweredByFooter-DcF6Wfei.js";import"./proxy-B4lWT78e.js";import"./DataProcessedLine-autMZBNp.js";import"./guestFrameContext-B9BEt9S3.js";import"./guestNav-ySHqJUvG.js";import"./useEscapeLayer-BYkrVTo8.js";import"./x-C3OBs_Zs.js";import"./composite-DSWmIJ4G.js";import"./useBaseUiId-D49M12hI.js";import"./useRole-BY-HprSY.js";import"./partialRefundPolicy-mnu0SBYM.js";import"./specialDateRules-BSvcUCYt.js";import"./customerRememberStore-OIlHQuFi.js";import"./circle-user-round-eGhbqS6R.js";function O(e){return null===e?null:0===e?"Free entry":`From £${(e/100).toFixed(2)}`}function R(){var R;e();const V=l(),{data:B}=m(V),H=i.useMemo(()=>V?c("whatsOn",V):null,[V]),[L,$]=i.useState((null==H?void 0:H.settings)??null),[G,W]=i.useState((null==H?void 0:H.tenantName)??""),[z,K]=i.useState((null==H?void 0:H.events)??[]),[_,M]=i.useState(!H),[J,Y]=i.useState(!0===(null==H?void 0:H.venueNotFound)),[q,Q]=i.useState(!1),[X,Z]=i.useState(0),[ee,se]=i.useState(null);i.useEffect(()=>{u()},[]);const te=(null==L?void 0:L.restaurantName)||G,{heroRef:re,heroInView:ae}=k(te);i.useEffect(()=>{if(!V)return;let e=!1;return p("whatsOn",V,async()=>{var e,s;const t=c("whatsOn",V),[r,a]=await Promise.allSettled([d("getPublicTenantSettings")({tenantId:V}),d("getPublicUpcomingEvents")({tenantId:V})]);if("fulfilled"===r.status&&v(r.value.data))return{settings:null,tenantName:"",events:[],eventsKnown:!0,venueNotFound:!0};if("rejected"===r.status&&"rejected"===a.status)throw new Error("what's-on bootstrap: both reads failed");const n="fulfilled"===r.status&&(null==(e=r.value.data)?void 0:e.settings)?r.value.data.settings:(null==t?void 0:t.settings)??null,i="fulfilled"===a.status&&Array.isArray(null==(s=a.value.data)?void 0:s.events)?a.value.data.events:null;return{settings:n,tenantName:(null==n?void 0:n.restaurantName)||(null==t?void 0:t.tenantName)||"",events:i??("rejected"===a.status&&(null==t?void 0:t.eventsKnown)?t.events:[]),eventsKnown:null!==i||"rejected"!==a.status||!0===(null==t?void 0:t.eventsKnown)}},{onFresh:s=>{if(!e){if(!0===s.venueNotFound)return Y(!0),void M(!1);$(s.settings),W(s.tenantName),K(s.events),Q(!s.eventsKnown),M(!1)}},onHardFailure:()=>{e||(Q(!0),M(!1))}}),()=>{e=!0}},[V,X]);const ne=(null==L?void 0:L.restaurantName)||G||"this venue";return _?s.jsx(t,{}):J?s.jsx(g,{venue:{slug:V}}):s.jsx(b,{colour:null==L?void 0:L.customAccentColor,children:s.jsxs("div",{className:"min-h-dvh bg-gray-50 flex flex-col font-sans",children:[s.jsx(r,{title:D(`What's on · ${ne}`,null==L?void 0:L.showBranding),description:`What's on at ${ne} — upcoming events and nights.`,path:`/events/${V??""}`,noindex:!1===(null==L?void 0:L.searchEngineIndexable)}),te&&s.jsx("div",{ref:re,children:s.jsx(N,{coverOverlay:s.jsxs(s.Fragment,{children:[s.jsx(w,{slug:V,websiteUrl:null==L?void 0:L.restaurantWebsiteUrl,hubAsHomepage:null==L?void 0:L.venueHubAsHomepage,variant:"pill",placement:"cover"}),s.jsx(F,{slug:V})]}),venueName:te,logoUrl:null==L?void 0:L.restaurantLogoUrl,coverUrl:null==L?void 0:L.coverPhotoUrl,size:"compact",nameTag:"p",className:"pb-4"})}),s.jsx(S,{title:ne,titleTag:"h1",titleHidden:!!te&&ae,titleRowExtras:s.jsx("p",{className:"text-[11px] font-bold text-primary uppercase tracking-wider",children:"What's on"})}),s.jsx("main",{className:"flex-1 max-w-3xl w-full mx-auto px-4 pt-6 pb-20 space-y-4",children:q?s.jsxs("div",{className:"max-w-md w-full mx-auto bg-white rounded-3xl border border-gray-100 shadow-lg shadow-gray-100/50 p-8 text-center mt-6",children:[s.jsx("div",{className:"w-12 h-12 rounded-full bg-amber-50 flex items-center justify-center mx-auto mb-4",children:s.jsx("span",{className:"text-amber-500 text-2xl","aria-hidden":"true",children:"⚠"})}),s.jsx("h2",{className:"text-xl font-black text-gray-900 tracking-tight mb-2",children:"We couldn't load what's on"}),s.jsx("p",{className:"text-sm text-gray-500 mb-6",children:"Please check your connection and try again."}),s.jsx(f,{onClick:()=>{V&&x("whatsOn",V),M(!0),Q(!1),Z(e=>e+1)},className:"w-full h-11 rounded-xl",children:"Try again"})]}):0===z.length?s.jsxs("div",{className:"text-center py-20",children:[s.jsxs("p",{className:"text-gray-400 font-medium",children:["Nothing scheduled right now — follow ",ne," for updates."]}),!0===(null==(R=null==B?void 0:B.flags)?void 0:R.bookingOpen)&&s.jsx(o,{to:a(`/book/${V??""}`),className:"mt-3 inline-block text-xs font-bold text-primary hover:underline",children:"Book a table instead →"})]}):z.map(e=>{const t="listing"!==e.kind,r=t?O(e.fromPricePence):null,i=s.jsxs("div",{className:"flex gap-4 p-4 sm:p-5",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-start justify-between gap-3",children:[s.jsx("h3",{className:"font-bold text-gray-900 leading-tight",children:e.name}),s.jsxs("span",{className:"shrink-0 inline-flex items-center gap-2",children:[t&&!e.soldOut&&s.jsx("span",{className:"px-2 py-0.5 rounded-full text-[9px] font-black uppercase tracking-widest bg-primary/10 text-primary border border-primary/20",children:"Buy tickets"}),e.soldOut&&s.jsx("span",{className:"px-2 py-0.5 rounded text-[9px] font-black uppercase tracking-widest bg-gray-100 text-gray-500 border border-gray-200",children:"Sold out"})]})]}),s.jsxs("div",{className:"mt-1.5 flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-gray-500 font-medium",children:[s.jsxs("span",{className:"inline-flex items-center gap-1",children:[s.jsx(C,{size:12,"aria-hidden":"true"}),j(e)]}),e.startTime&&s.jsxs("span",{className:"inline-flex items-center gap-1",children:[s.jsx(I,{size:12,"aria-hidden":"true"}),h(e.startTime,null==L?void 0:L.publicUse24HourTime),e.endTime?` – ${h(e.endTime,null==L?void 0:L.publicUse24HourTime)}`:""]}),r&&s.jsxs("span",{className:"inline-flex items-center gap-1 font-bold text-primary",children:[s.jsx(n,{size:12,"aria-hidden":"true"}),r]})]}),e.description&&s.jsx("p",{className:"mt-2 text-xs text-gray-500 leading-relaxed font-medium line-clamp-2",children:e.description})]}),e.imageUrl&&s.jsx("div",{className:"w-20 h-20 sm:w-24 sm:h-24 shrink-0 rounded-xl overflow-hidden border border-gray-100 shadow-sm",children:s.jsx("img",{src:e.imageUrl,alt:`${e.name} at ${ne}`,loading:"lazy",referrerPolicy:"no-referrer",className:"w-full h-full object-cover",onError:e=>{const s=e.target.parentElement;s&&(s.style.display="none")}})})]});return t?s.jsx(o,{to:a(`/event/${V}/${e.id}`),className:"block bg-white rounded-2xl border border-gray-100 shadow-sm overflow-hidden hover:border-primary/30 transition-colors",children:i},e.id):s.jsx("div",{className:"block bg-white rounded-2xl border border-gray-100 shadow-sm overflow-hidden",children:i},e.id)})}),s.jsx(y,{surface:"whatsOn",className:"pb-8",venueName:ne,showVenueCopyright:(null==L?void 0:L.showRestaurantCopyright)??!1,showBranding:!1!==(null==L?void 0:L.showBranding),isDemoVenue:!0===(null==L?void 0:L.isDemoVenue),links:[{label:"Privacy Policy",onClick:()=>se({title:"Privacy Policy",content:A(L??null,ne).privacyText})}]}),s.jsx(P,{open:null!==ee,onOpenChange:e=>{e||se(null)},children:s.jsxs(E,{className:"sm:max-w-lg max-h-[80dvh] overflow-y-auto rounded-2xl p-4",children:[s.jsx(T,{children:s.jsx(U,{className:"text-lg font-bold",children:null==ee?void 0:ee.title})}),s.jsx("div",{className:"text-sm text-gray-700 whitespace-pre-wrap leading-relaxed pt-2",children:(null==ee?void 0:ee.content)??""})]})})]})})}export{R as PublicWhatsOnPage,O as formatEventFromPrice};
2//# sourceMappingURL=PublicWhatsOnPage-Chd_O9UA.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.