PageSourceSearch

https://gothamhallevents.com/assets/gallery-Di4PDdQ9.js

js gothamhallevents.com collected 2026-09-24 23:10:27 UTC 19,136 bytes, 1 lines download raw bytes

1import{u as he,au as ve,r as s,V as J,av as pe,a as ge,aw as ye,j as t,P as fe,S as be,ax as xe,ay as C,az as we,aA as _e,aB as E,aC as je,aD as ke,aE as ne,aF as Ne,aG as Ce,aH as Ee,I as Se,aI as Ae,f as Me,aJ as Pe,aK as Re,aL as Le,aM as Te}from"./main-M6-i8Mt9.js";let q=null;const K=new WeakMap;function Oe(){return typeof window>"u"||typeof IntersectionObserver>"u"?null:q||(q=new IntersectionObserver((n,o)=>{for(const l of n){if(!l.isIntersecting)continue;const y=K.get(l.target);y&&y(),K.delete(l.target),o.unobserve(l.target)}},{rootMargin:"0px 0px 20% 0px",threshold:.01}),q)}function ze(n){const{src:o,srcAvif:l,srcWebp:y,srcSetAvif:u,srcSetWebp:z,sizes:f,alt:b,rowIndex:v,unlockedRow:x,priority:d,onLoaded:Y,zoom:S,x:W,y:I,className:Q}=n,w=v<=x+2,[_,G]=s.useState(!1),[A,H]=s.useState(d),M=s.useRef(null),j=s.useRef(!1);s.useEffect(()=>{if(d)return;const p=M.current,g=Oe();if(!p||!g){H(!0);return}return K.set(p,()=>H(!0)),g.observe(p),()=>{K.delete(p),g.unobserve(p)}},[d]);const P=()=>{j.current||(j.current=!0,G(!0),Y(v))},V=Re(),R=d||_,m=w||_;return t.jsx(Le,{ref:M,src:m?o:void 0,srcAvif:m?l:void 0,srcWebp:m?y:void 0,srcSetAvif:m?u:void 0,srcSetWebp:m?z:void 0,sizes:f,alt:b,zoom:S,x:W,y:I,loading:d?"eager":"lazy",fetchPriority:d?"high":"low",onLoad:P,onError:P,className:"absolute inset-0",imgClassName:Q,scaleMultiplier:1,imgStyle:V||d?{opacity:1,filter:"none"}:{opacity:R?1:0,transition:"opacity 350ms ease-out"}})}const We=["All",...xe];function Ie(n,o){return n==="All"?!0:Pe(n,o)}function O(n){const o=(n??"").toLowerCase().trim();return o==="weddings"||o==="mitzvahs"||o==="mitzvah"?"Wedding celebration at Gotham Hall":o==="seated dinners"||o==="seated dinner"||o==="seated"||o==="galas"||o==="gala"?"Gala event at Gotham Hall":o==="fashion shows"||o==="fashion show"||o==="fashion"||o==="productions"?"Fashion production at Gotham Hall":o==="receptions"||o==="reception"?"Cocktail reception at Gotham Hall":o==="branding"||o==="corporate"?"Corporate event at Gotham Hall":o==="details"?"Architectural and decor detail inside Gotham Hall's landmark Manhattan ballroom":"Signature event beneath the stained-glass dome at Gotham Hall, NYC"}function ee(n){return n.match(/(?:youtube\.com\/(?:watch\?v=|embed\/|v\/)|youtu\.be\/)([^&?#/]+)/)?.[1]??null}function Ge(n){if(n.thumbnail_url)return n.thumbnail_url;const o=ee(n.url);return o?`https://i.ytimg.com/vi/${o}/maxresdefault.jpg`:null}function He(n){const o=ee(n.url);return o?[`https://i.ytimg.com/vi/${o}/sddefault.jpg`,`https://i.ytimg.com/vi/${o}/hqdefault.jpg`]:[]}let ae=!1;function Z(){if(ae||typeof document>"u")return;ae=!0;const n=["https://www.youtube-nocookie.com","https://www.google.com","https://i.ytimg.com","https://s.ytimg.com"];for(const o of n){const l=document.createElement("link");l.rel="preconnect",l.href=o,l.crossOrigin="anonymous",document.head.appendChild(l)}}const le=[{id:"v0",url:"https://www.youtube.com/watch?v=MEQIVC1CmdI",title:null,thumbnail_url:null,event_category:"corporate",sort_order:0},{id:"v1",url:"https://www.youtube.com/watch?v=SDUiw70QHq8",title:null,thumbnail_url:null,event_category:"productions",sort_order:1},{id:"v2",url:"https://www.youtube.com/watch?v=9HqHpzejPk0",title:null,thumbnail_url:null,event_category:"corporate",sort_order:2},{id:"v3",url:"https://www.youtube.com/watch?v=cUGpJVsBoUQ",title:null,thumbnail_url:null,event_category:"productions",sort_order:3},{id:"v4",url:"https://www.youtube.com/watch?v=Yyc2X7weiPM",title:null,thumbnail_url:null,event_category:"productions",sort_order:4},{id:"v5",url:"https://www.youtube.com/watch?v=yMWTfqrLM8M",title:null,thumbnail_url:null,event_category:"productions",sort_order:5},{id:"v7",url:"https://www.youtube.com/watch?v=sqcOOWPVeLE",title:null,thumbnail_url:null,event_category:"productions",sort_order:7},{id:"v8",url:"https://www.youtube.com/watch?v=HKYMHYVYeqM",title:null,thumbnail_url:null,event_category:"productions",sort_order:8},{id:"v9",url:"https://www.youtube.com/watch?v=IwO7r8AKcE0",title:null,thumbnail_url:null,event_category:"productions",sort_order:9},{id:"v10",url:"https://www.youtube.com/watch?v=QAYoctBQ9KM",title:null,thumbnail_url:null,event_category:"productions",sort_order:10},{id:"v11",url:"https://www.youtube.com/watch?v=Ct_fvby-yvg",title:null,thumbnail_url:null,event_category:"productions",sort_order:11},{id:"v12",url:"https://www.youtube.com/watch?v=NmUOoKlqefs",title:null,thumbnail_url:null,event_category:"corporate",sort_order:12},{id:"v13",url:"https://www.youtube.com/watch?v=KWExP_EMwXI",title:null,thumbnail_url:null,event_category:"weddings",sort_order:13},{id:"v14",url:"https://www.youtube.com/watch?v=EskmvdCxsYM",title:null,thumbnail_url:null,event_category:"weddings",sort_order:14},{id:"v15",url:"https://www.youtube.com/watch?v=FbX1ZDnz_uI",title:null,thumbnail_url:null,event_category:"weddings",sort_order:15},{id:"v16",url:"https://www.youtube.com/watch?v=kOJsp2jXkv8",title:null,thumbnail_url:null,event_category:"productions",sort_order:16}];function De(){const{content:n}=Ae.useLoaderData();return t.jsx(Me,{pageKey:"gallery",rows:n,children:t.jsx(Ve,{})})}function Ve(){const n=he("gallery"),o=ve(Te),[l,y]=s.useState("All"),[u,z]=s.useState("photos"),[f,b]=s.useState(null),[v,x]=s.useState(null),[d,Y]=s.useState(3),[S,W]=s.useState(3),[I,Q]=s.useState(()=>typeof window>"u"?1280:window.innerWidth);s.useEffect(()=>{if(typeof window>"u")return;const e=()=>Q(window.innerWidth);return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);const h=I>=1024?d:I>=768?2:S,[w,_]=s.useState(0),G=s.useRef(new Map),A=9,[H,M]=s.useState(A),[j,P]=s.useState(0);s.useEffect(()=>{if(typeof window>"u")return;const e=()=>{typeof document<"u"&&document.visibilityState==="hidden"||P(a=>a+1)};window.addEventListener("focus",e),document.addEventListener("visibilitychange",e);const r=J.channel("public:site_settings:gallery").on("postgres_changes",{event:"*",schema:"public",table:"site_settings"},()=>P(a=>a+1)).subscribe();return()=>{window.removeEventListener("focus",e),document.removeEventListener("visibilitychange",e),J.removeChannel(r)}},[]);const V=pe(),{data:R}=ge({queryKey:["public-gallery-photos"],queryFn:()=>o(),staleTime:10*6e4,gcTime:30*6e4,refetchOnMount:!1,refetchOnWindowFocus:!1});s.useEffect(()=>{j!==0&&V.invalidateQueries({queryKey:["public-gallery-photos"]})},[j,V]);const m=s.useMemo(()=>
1{if(!R)return null;const e=R.photos??[];return e.length===0?[]:e.map(r=>({id:r.id,url:r.url,alt_text:r.alt_text,is_decorative:r.is_decorative??!1,filename:r.filename,event_category:r.event_category,display_order:r.display_order??0,thumb_zoom:r.thumb_zoom??1,thumb_x:r.thumb_x??0,thumb_y:r.thumb_y??0}))},[R]),p=s.useMemo(()=>m===null?[]:m.length>0?m:ye,[m]),[g,te]=s.useState(null);s.useEffect(()=>{let e=!1;return(async()=>{const{data:r,error:a}=await J.from("gallery_items").select("id,url,title,thumbnail_url,event_category,sort_order").eq("type","video").order("sort_order",{ascending:!0});if(!e){if(a||!r){te([]);return}te(r)}})(),()=>{e=!0}},[j]);const ie=s.useMemo(()=>g===null?le:g.length>0?g:le,[g]),re=s.useCallback(e=>[...e].sort((r,a)=>{const T=r.display_order??0,k=a.display_order??0;return T!==k?T-k:r.id.localeCompare(a.id)}),[]),i=s.useMemo(()=>{const e=l==="All"?p:p.filter(r=>Ie(l,r.event_category));return re(e)},[p,l,re]),oe=ie;s.useEffect(()=>{G.current=new Map,_(0),M(A)},[i,h,u]);const $=Math.max(1,Math.ceil(i.length/h)),L=Math.min(H,$),ce=s.useMemo(()=>i.slice(0,L*h),[i,L,h]),ue=L>=$,U=u==="photos"&&m===null,de=h*A;s.useEffect(()=>{if(w>=L)return;const e=setTimeout(()=>{_(r=>Math.max(r,w+1))},1500);return()=>clearTimeout(e)},[w,L]);const me=s.useCallback(e=>{const r=G.current,a=(r.get(e)??0)+1;r.set(e,a);const k=e===$-1?i.length-e*h:h;a>=k&&_(N=>Math.max(N,e+1))},[h,i.length,$]),B=s.useCallback(()=>b(null),[]),D=s.useCallback(()=>b(e=>e===null?e:(e+1)%i.length),[i.length]),F=s.useCallback(()=>b(e=>e===null?e:(e-1+i.length)%i.length),[i.length]);s.useEffect(()=>{if(f===null)return;const e=r=>{r.key==="Escape"&&B(),r.key==="ArrowRight"&&D(),r.key==="ArrowLeft"&&F()};return window.addEventListener("keydown",e),document.body.style.overflow="hidden",()=>{window.removeEventListener("keydown",e),document.body.style.overflow=""}},[f,B,D,F]),s.useEffect(()=>{if(!v)return;const e=r=>{r.key==="Escape"&&x(null)};return window.addEventListener("keydown",e),document.body.style.overflow="hidden",()=>{window.removeEventListener("keydown",e),document.body.style.overflow=""}},[v]);const c=f!==null?i[f]:null;return t.jsxs(fe,{children:[t.jsx(be,{title:n.t("hero_title","Signature Moments"),titleAs:"h1",subtitle:n.t("hero_subtitle","A look inside weddings, galas, premieres, and private occasions held beneath the dome."),className:"!pt-32 !pb-2 md:!pb-3 [&>header]:!mb-2"}),t.jsx("div",{className:"container-luxe mb-4 flex justify-center",children:t.jsx("div",{role:"tablist","aria-label":"Media type",className:"inline-flex rounded-full border border-ivory/15 p-1 bg-ivory/5 touch-manipulation",children:["photos","videos"].map(e=>{const r=u===e;return t.jsx("button",{role:"tab","aria-selected":r,onClick:()=>z(e),onTouchEnd:a=>{a.preventDefault(),z(e)},className:`px-6 py-2 text-xs tracking-[0.2em] uppercase rounded-full transition-all duration-300 touch-manipulation ${r?"bg-gold/15 text-gold":"text-ivory/60 hover:text-ivory"}`,children:e},e)})})}),t.jsxs("div",{className:"container-luxe mb-12 relative",children:[t.jsx("div",{role:"tablist","aria-label":"Category","aria-hidden":u!=="photos",className:`flex flex-wrap justify-center gap-2 md:gap-3 transition-all duration-500 ease-out ${u!=="photos"?"opacity-0 blur-md pointer-events-none":"opacity-100 blur-0"}`,children:We.map(e=>{const r=e===l;return t.jsx("button",{role:"tab","aria-selected":r,tabIndex:u==="photos"?0:-1,onClick:()=>y(e),onTouchEnd:a=>{a.preventDefault(),y(e)},className:`px-5 py-2 text-xs tracking-[0.2em] uppercase rounded-full border transition-all duration-300 touch-manipulation ${r?"border-gold bg-gold/10 text-gold":"border-ivory/15 text-ivory/60 hover:border-gold/40 hover:text-ivory"}`,children:e},e)})}),t.jsx("div",{"aria-hidden":u==="photos",className:`absolute inset-x-0 top-1/2 -translate-y-1/2 flex justify-center px-4 pointer-events-none transition-all duration-500 ease-out ${u==="videos"?"opacity-100 blur-0":"opacity-0 blur-md"}`,children:t.jsx("p",{className:"text-center text-xs sm:text-sm md:text-base tracking-[0.35em] uppercase editorial-shimmer",style:{fontFamily:'"PT Serif", serif'},children:n.t("videos_tagline","Moments designed to be remembered.")})}),u==="photos"&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"hidden lg:flex absolute right-16 top-1/2 -translate-y-1/2 items-center gap-2",children:t.jsx("input",{type:"range",min:3,max:5,step:1,value:d,onChange:e=>Y(Number(e.target.value)),"aria-label":"Grid density",className:"w-20 h-1 appearance-none bg-ivory/15 rounded-full accent-gold cursor-pointer"})}),t.jsx("div",{className:"md:hidden mt-4 flex justify-center",children:t.jsx("div",{role:"tablist","aria-label":"Grid density",className:"inline-flex rounded-full border border-ivory/15 p-1 bg-ivory/5",children:[2,3].map(e=>{const r=S===e;return t.jsxs("button",{role:"tab","aria-selected":r,onClick:()=>W(e),onTouchEnd:a=>{a.preventDefault(),W(e)},className:`px-4 py-1.5 text-[10px] tracking-[0.2em] uppercase rounded-full transition-all duration-300 ${r?"bg-gold/15 text-gold":"text-ivory/55 hover:text-ivory"}`,children:[e," col"]}
1,e)})})})]})]}),t.jsx("div",{className:"container-luxe pb-24 md:pb-32",children:u==="photos"?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:`mx-auto grid ${S===2?"grid-cols-2":"grid-cols-3"} md:grid-cols-3 gap-2 md:gap-3 max-w-[1240px] ${d===3?"lg:grid-cols-3":d===4?"lg:grid-cols-4":"lg:grid-cols-5"}`,children:[U&&Array.from({length:de}).map((e,r)=>t.jsx("div",{"aria-hidden":"true",className:"relative overflow-hidden rounded-sm bg-charcoal/60 aspect-[4/3]"},`skeleton-${r}`)),!U&&ce.map((e,r)=>{const a=Math.floor(r/h);return t.jsxs("div",{className:"group relative overflow-hidden rounded-sm bg-charcoal aspect-[4/3]",children:[t.jsxs("button",{onClick:()=>b(r),className:"absolute inset-0 block w-full","aria-label":`Open ${C(e)||O(e.event_category)}`,children:[t.jsx(ze,{src:e.urlAvif||e.urlWebp?e.url:we(e.url,1200,{resize:"contain"}),srcAvif:e.urlAvif,srcWebp:e.urlWebp,srcSetAvif:e.srcSetAvif,srcSetWebp:e.srcSetWebp,sizes:"(max-width: 767px) 33vw, (max-width: 1023px) 33vw, 25vw",alt:e.is_decorative?"":C(e)||O(e.event_category),rowIndex:a,unlockedRow:w,priority:a===0,onLoaded:me,zoom:e.thumb_zoom,x:e.thumb_x,y:e.thumb_y,className:"absolute inset-0 h-full w-full object-cover"}),t.jsx("div",{className:"pointer-events-none absolute inset-0 bg-gradient-to-t from-onyx/90 via-onyx/10 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-500"}),t.jsx("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 p-4 translate-y-2 opacity-0 group-hover:translate-y-0 group-hover:opacity-100 transition-all duration-500",children:t.jsx("div",{className:"text-[10px] tracking-[0.25em] uppercase text-gold/90",children:e.event_category})})]}),t.jsx(_e,{item:{id:`gallery-${e.id}`,src:e.url,alt:C(e)||O(e.event_category),category:e.event_category??void 0,caption:C(e)||void 0}})]},e.id)}),!U&&m!==null&&i.length===0&&t.jsx("div",{className:"col-span-full text-center text-ivory/65 py-20 text-sm tracking-widest uppercase",children:"No photos in this category yet."})]}
1,`photos-${l}`),i.length>0&&t.jsx("div",{className:"mt-12 md:mt-16 flex justify-center",children:ue?t.jsx(E.p,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.6},className:"text-xs tracking-[0.3em] uppercase text-ivory/65",children:"All moments revealed"}):t.jsx("button",{onClick:()=>M(e=>e+A),className:"group relative px-10 py-4 text-xs tracking-[0.3em] uppercase text-gold border border-gold/40 rounded-full bg-gold/5 hover:bg-gold/10 hover:border-gold transition-all duration-500 hover:shadow-[0_0_30px_rgba(184,138,45,0.35)]",children:"Explore More Moments"})})]}):t.jsxs(E.div,{initial:"hidden",animate:"show",variants:{hidden:{},show:{transition:{staggerChildren:.08}}},className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 md:gap-6",children:[oe.map((e,r)=>{const a=Ge(e),T=He(e);return t.jsxs(E.button,{variants:{hidden:{opacity:0,y:20},show:{opacity:1,y:0}},onClick:()=>x(e),onMouseEnter:Z,onTouchStart:Z,onFocus:Z,className:"group relative block w-full overflow-hidden rounded-sm bg-charcoal aspect-video","aria-label":`Play ${e.title??"video"}`,children:[a&&t.jsx(je,{src:a,alt:e.title??"Video thumbnail",loading:r<3?"eager":"lazy",decoding:"async",fetchPriority:r<3?"high":"low","data-fallback-step":"0",onError:k=>{const N=k.currentTarget,se=Number(N.dataset.fallbackStep??"0"),X=T[se];X&&N.src!==X&&(N.dataset.fallbackStep=String(se+1),N.src=X)},className:"absolute inset-0 h-full w-full object-cover transition-transform duration-[1400ms] ease-out group-hover:scale-[1.04]"}),t.jsx("div",{className:"absolute inset-0 bg-onyx/30 group-hover:bg-onyx/10 transition-colors duration-500"}),t.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:t.jsx("div",{className:"h-16 w-16 rounded-full bg-gold/90 text-onyx flex items-center justify-center shadow-luxury group-hover:scale-110 transition-transform duration-500",children:t.jsx(ke,{className:"h-7 w-7 ml-1",fill:"currentColor"})})}),e.title&&t.jsxs("div",{className:"absolute inset-x-0 bottom-0 p-4 bg-gradient-to-t from-onyx/90 to-transparent",children:[t.jsx("div",{className:"text-[10px] tracking-[0.25em] uppercase text-gold/90",children:e.event_category}),t.jsx("div",{className:"mt-1 font-serif text-lg text-ivory",children:e.title})]})]},e.id)}),oe.length===0&&t.jsx("div",{className:"col-span-full text-center text-ivory/65 py-20 text-sm tracking-widest uppercase",children:"No videos in this category yet."})]},`videos-${l}`)}),t.jsx(ne,{children:c&&t.jsxs(E.div,{role:"dialog","aria-modal":"true","aria-label":C(c)||O(c.event_category)||"Photo",initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},transition:{duration:.25},className:"fixed inset-0 z-[100] flex items-center justify-center bg-onyx/95 backdrop-blur-md",onClick:B,children:[t.jsx("button",{onClick:e=>{e.stopPropagation(),F()},"aria-label":"Previous",className:"absolute left-4 md:left-8 h-11 w-11 flex items-center justify-center rounded-full border border-ivory/15 text-ivory/80 hover:text-gold hover:border-gold/50 transition-colors z-10",children:t.jsx(Ne,{className:"h-5 w-5"})}),t.jsx("button",{onClick:e=>{e.stopPropagation(),D()},"aria-label":"Next",className:"absolute right-4 md:right-8 h-11 w-11 flex items-center justify-center rounded-full border border-ivory/15 text-ivory/80 hover:text-gold hover:border-gold/50 transition-colors z-10",children:t.jsx(Ce,{className:"h-5 w-5"})}),t.jsxs(E.figure,{className:"max-w-[92vw] max-h-[88vh] flex flex-col items-center",onClick:e=>e.stopPropagation(),drag:"x",dragConstraints:{left:0,right:0},dragElastic:.2,onDragEnd:(e,r)=>{r.offset.x<-50||r.velocity.x<-500?D():(r.offset.x>50||r.velocity.x>500)&&F()},initial:{opacity:0,scale:.96},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.96},transition:{duration:.25},children:[t.jsxs("picture",{children:[c.urlAvif&&t.jsx("source",{type:"image/avif",srcSet:c.urlAvif}),c.urlWebp&&t.jsx("source",{type:"image/webp",srcSet:c.urlWebp}),t.jsx("img",{src:c.urlWebp??c.url,alt:c.is_decorative?"":C(c)||O(c.event_category),"data-a11y-invert":"",className:"max-w-[92vw] max-h-[78vh] w-auto h-auto object-contain rounded-sm shadow-luxury select-none",draggable:!1})]}),t.jsxs("figcaption",{className:"mt-5 text-center",children:[t.jsx("div",{className:"text-[10px] tracking-[0.25em] uppercase text-gold/90",children:c.event_category}),t.jsxs("div",{className:"mt-2 text-xs text-ivory/65 tracking-widest",children:[(f??0)+1," / ",i.length]})]})]},c.id)]})}),t.jsx(ne,{children:v&&t.jsxs(E.div,{role:"dialog","aria-modal":"true",initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},transition:{duration:.25},className:"fixed inset-0 z-[100] flex items-center justify-center bg-onyx/95 backdrop-blur-md p-4",onClick:()=>x(null),children:[t.jsx("button",{onClick:()=>x(null),"aria-label":"Close",className:"absolute top-6 right-6 h-11 w-11 flex items-center justify-center rounded-full border border-ivory/15 text-ivory/80 hover:text-gold hover:border-gold/50 transition-colors z-10",children:t.jsx(Ee,{className:"h-5 w-5"})}),t.jsx("div",{className:"w-full max-w-5xl aspect-video rounded-sm overflow-hidden shadow-luxury",onClick:e=>e.stopPropagation(),children:(()=>{const e=ee(v.url);return e?t.jsx("iframe",{src:`https://www.youtube-nocookie.com/embed/${e}?autoplay=1&rel=0&modestbranding=1&playsinline=1&iv_load_policy=3`,loading:"eager",referrerPolicy:"strict-origin-when-cross-origin",title:v.title??"Video",className:"w-full h-full",allow:"autoplay; encrypted-media; picture-in-picture",allowFullScreen:!0}):t.jsx("video",{src:v.url,controls:!0,autoPlay:!0,className:"w-full h-full"})})()})]})}),t.jsx(Se,{})]})}export{Ve as GalleryPage,De as component};

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.