Publish the prerendered static export (index.html, 404.html, cinema/,
c/, about/, for-cinemas/, for-film-lovers/, assets/, images/, og/,
sitemap.xml, robots.txt) as the site root and remove the React Router
+ Nitro source tree from this branch. Source remains available in
history at 0548772.
Note: public/sw.js here reports VERSION v2.0.5 while the removed source
tree (v2.1.0) was newer, and .gitignore was not carried over.
1 line
8.4 KiB
JavaScript
1 line
8.4 KiB
JavaScript
import{i as e,t}from"./react-B8IZ02wI.js";import{o as n,r,t as i}from"./IconCheck-B3jDJthn.js";import{t as a}from"./jsx-runtime-fBfwind-.js";import{a as o,i as s,n as c}from"./share-origin-COlEIvGo.js";import{t as l}from"./createReactComponent-C-DRqPhY.js";import{a as u,n as d}from"./SiteShell-DHgUrms6.js";import{d as f,n as p,s as m,u as h}from"./cinemas-CTA3vCte.js";var g=l(`outline`,`arrow-right`,`ArrowRight`,[[`path`,{d:`M5 12l14 0`,key:`svg-0`}],[`path`,{d:`M13 18l6 -6`,key:`svg-1`}],[`path`,{d:`M13 6l6 6`,key:`svg-2`}]]),_=l(`outline`,`building-community`,`BuildingCommunity`,[[`path`,{d:`M8 9l5 5v7h-5v-4m0 4h-5v-7l5 -5m1 1v-6a1 1 0 0 1 1 -1h10a1 1 0 0 1 1 1v17h-8`,key:`svg-0`}],[`path`,{d:`M13 7l0 .01`,key:`svg-1`}],[`path`,{d:`M17 7l0 .01`,key:`svg-2`}],[`path`,{d:`M17 11l0 .01`,key:`svg-3`}],[`path`,{d:`M17 15l0 .01`,key:`svg-4`}]]),v=l(`outline`,`circle-check`,`CircleCheck`,[[`path`,{d:`M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0`,key:`svg-0`}],[`path`,{d:`M9 12l2 2l4 -4`,key:`svg-1`}]]),y=l(`outline`,`map-pin`,`MapPin`,[[`path`,{d:`M9 11a3 3 0 1 0 6 0a3 3 0 0 0 -6 0`,key:`svg-0`}],[`path`,{d:`M17.657 16.657l-4.243 4.243a2 2 0 0 1 -2.827 0l-4.244 -4.243a8 8 0 1 1 11.314 0`,key:`svg-1`}]]),b=l(`outline`,`share`,`Share`,[[`path`,{d:`M3 12a3 3 0 1 0 6 0a3 3 0 1 0 -6 0`,key:`svg-0`}],[`path`,{d:`M15 6a3 3 0 1 0 6 0a3 3 0 1 0 -6 0`,key:`svg-1`}],[`path`,{d:`M15 18a3 3 0 1 0 6 0a3 3 0 1 0 -6 0`,key:`svg-2`}],[`path`,{d:`M8.7 10.7l6.6 -3.4`,key:`svg-3`}],[`path`,{d:`M8.7 13.3l6.6 3.4`,key:`svg-4`}]]),x=e(t(),1),S=a();function C({src:e,alt:t,className:n=``,fallback:r,size:i=`md`,lazy:a=!0}){let[o,s]=(0,x.useState)(null);return typeof e==`string`&&e.trim()!==``&&o!==e?(0,S.jsx)(`img`,{src:e,alt:t,className:`bg-[#242424] object-cover ${n}`,loading:a?`lazy`:`eager`,decoding:`async`,referrerPolicy:`no-referrer`,onError:()=>s(e)}):(0,S.jsx)(`div`,{className:`flex items-center justify-center bg-[#242424] ${n}`,role:`img`,"aria-label":t,children:r??(0,S.jsx)(d,{size:i})})}function w(e,t){return`${e.replace(/\/+$/,``)}${t.startsWith(`/`)?t:`/${t}`}`}function T(e,t){let n=(e??``).trim();return(n===``?t:n).replace(/\/+$/,``)}function E(e){return`/c/${e}`}function D(e){if(typeof document>`u`)return!1;let t=document.createElement(`textarea`);t.value=e,t.setAttribute(`readonly`,``),t.style.position=`fixed`,t.style.opacity=`0`,document.body.appendChild(t),t.select();let n=!1;try{n=document.execCommand(`copy`)}catch{n=!1}return document.body.removeChild(t),n}function O(){if(typeof navigator>`u`)return{};let e=navigator;return{share:typeof e.share==`function`?e.share.bind(e):void 0,writeText:typeof e.clipboard?.writeText==`function`?e.clipboard.writeText.bind(e.clipboard):void 0,legacyCopy:D}}async function k(e,t=O()){if(t.share)try{await t.share({title:e.title,url:e.url})}catch{}if(t.writeText)try{return await t.writeText(e.url),t.share?`shared`:`copied`}catch{}return t.legacyCopy?.(e.url)?t.share?`shared`:`copied`:`failed`}function A({slug:e,title:t,variant:n=`icon`}){let{messages:a}=r(),o=c(),[s,l]=(0,x.useState)(null),u=(0,x.useRef)(null);(0,x.useEffect)(()=>()=>{u.current&&clearTimeout(u.current)},[]);async function d(n){n.preventDefault(),n.stopPropagation();let r=await k({title:t,url:w(T(o,window.location.origin),E(e))});l(r),u.current&&clearTimeout(u.current),u.current=setTimeout(()=>l(null),2500)}let f=s===`copied`||s===`shared`,p=s===`failed`?a.share.failed:f?a.share.copied:n===`wide`?a.share.pageLabel:a.share.label,m=f?(0,S.jsx)(i,{size:16}):(0,S.jsx)(b,{size:16});return n===`wide`?(0,S.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,S.jsxs)(`button`,{type:`button`,onClick:d,title:t,className:`flex min-h-11 items-center gap-2 rounded-lg border px-4 text-sm backdrop-blur transition focus-visible:outline focus-visible:outline-2 focus-visible:outline-[#A92626] ${s===`failed`?`border-[#A92626]/60 bg-[#1B1B1B]/80 text-[#D47272]`:f?`border-[#D47272]/50 bg-[#1B1B1B]/80 text-[#D47272]`:`border-[#332B2B] bg-[#1B1B1B]/80 text-white hover:border-[#A92626]/60 hover:bg-[#242424]`}`,children:[m,p]}),(0,S.jsx)(`span`,{role:`status`,"aria-live":`polite`,className:`text-xs text-[#B3B3B3]`,children:s?p:``})]}):(0,S.jsxs)(`div`,{className:`relative`,children:[(0,S.jsx)(`button`,{type:`button`,onClick:d,"aria-label":`${a.share.label}: ${t}`,title:a.share.label,className:`relative flex size-9 items-center justify-center rounded-xl border backdrop-blur-xl transition after:absolute after:-inset-1.5 after:content-[''] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#A92626] active:scale-95 ${s===`failed`?`border-[#A92626]/60 bg-[#1B1B1B]/80 text-[#D47272]`:f?`border-[#D47272]/50 bg-[#1B1B1B]/80 text-[#D47272]`:`border-white/10 bg-[#1B1B1B]/80 text-white hover:border-[#A92626]/60 hover:bg-[#242424] hover:text-[#D47272]`}`,children:m}),(0,S.jsx)(`span`,{role:`status`,"aria-live":`polite`,className:`sr-only`,children:s?p:``})]})}var j=1500,M=new Map;function N(e){if(typeof window>`u`)return;let t=JSON.stringify(e),n=Date.now(),r=M.get(t);if(!(r!==void 0&&n-r<j)){M.set(t,n);try{fetch(`/api/analytics/collect`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({events:[e]}),keepalive:!0}).catch(()=>void 0)}catch{}}}function P({cinema:e,index:t=0,source:i=`list`,searchQuery:a}){let{locale:c,messages:l}=r(),{distances:d}=s(),v=p[t%p.length],b=e.photos.find(e=>e.trim()!==``),x=o(d[e.slug],l.card.distanceFallback),{ref:w,revealed:T,style:E}=u(140+t%4*70);return(0,S.jsxs)(`article`,{ref:w,"data-reveal":`zoom`,"data-revealed":T?``:void 0,style:E,className:`group relative flex aspect-[3/4] flex-col justify-end overflow-hidden rounded-[20px] bg-gradient-to-br p-2 transition-[translate,box-shadow] duration-300 ease-out hover:-translate-y-1 hover:shadow-[0_18px_38px_-24px_rgba(143,8,8,0.75)] lg:aspect-auto lg:h-[308px] ${v}`,children:[b?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(C,{src:b,alt:``,lazy:!0,className:`absolute inset-0 size-full object-cover transition-transform duration-700 ease-out group-hover:scale-[1.06]`}),(0,S.jsx)(`div`,{"aria-hidden":`true`,className:`absolute inset-0 bg-gradient-to-t from-[#0D0D0D]/95 via-[#0D0D0D]/35 to-transparent`})]}):null,(0,S.jsx)(`div`,{className:`absolute right-3 top-3 z-10`,children:(0,S.jsx)(A,{slug:e.slug,title:f(e,c)})}),(0,S.jsxs)(`div`,{className:`relative flex flex-col gap-1.5 rounded-2xl border border-white/10 bg-[#1B1B1B]/80 p-3 backdrop-blur-xl transition-colors duration-300 group-hover:border-[#A92626]/40`,children:[(0,S.jsx)(`span`,{className:`text-[10px] text-[#B3B3B3]`,children:x}),(0,S.jsx)(`h3`,{className:`text-sm font-semibold`,children:f(e,c)}),(0,S.jsxs)(`p`,{className:`flex items-center gap-1.5 text-xs text-[#B3B3B3]`,children:[(0,S.jsx)(y,{size:12}),h(e,c)||l.card.locationFallback]}),(0,S.jsxs)(`p`,{className:`flex items-center gap-1.5 text-xs text-[#B3B3B3]`,children:[(0,S.jsx)(_,{size:12}),m(e,l)||l.card.categoryFallback]}),(0,S.jsxs)(n,{to:`/cinema/${e.slug}`,onClick:()=>N({type:`cinema_select`,slug:e.slug,source:i,query:a,position:t+1,locale:c}),className:`mt-3 flex items-center justify-end gap-2 text-xs font-medium`,children:[l.card.seeDetail,` `,(0,S.jsx)(g,{size:12})]})]})]})}function F({cinemas:e,source:t=`list`,searchQuery:n}){return(0,S.jsx)(`div`,{className:`grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4`,children:e.map((e,r)=>(0,S.jsx)(P,{cinema:e,index:r,source:t,searchQuery:n},e.slug))})}var I=e=>`relative rounded-[18px] border px-4 py-2 text-sm after:absolute after:-inset-y-1.5 after:inset-x-0 after:content-[''] ${e?`border-[#A92626] bg-gradient-to-b from-[#8F0808]/30 to-[#1B1B1B]/0 text-[#D47272]`:`border-[#303030] bg-[#242424] text-[#B3B3B3] transition hover:border-[#A92626]/60`}`;function L({active:e,categories:t,onChange:n,venues:i=[],activeVenue:a=null,onVenueChange:o}){let{messages:s}=r(),[c,...l]=t,u=i.length>0&&typeof o==`function`,d=e===c&&a===null;return(0,S.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,S.jsx)(`button`,{type:`button`,onClick:()=>{n(c),o?.(null)},"aria-pressed":d,className:I(d),children:s.categories[c]}),u?i.map(e=>{let t=a===e;return(0,S.jsx)(`button`,{type:`button`,onClick:()=>{n(c),o?.(t?null:e)},"aria-pressed":t,className:I(t),children:s.venues[e]},e)}):null,u?(0,S.jsx)(`span`,{"aria-hidden":`true`,className:`mx-1 h-6 w-px bg-[#303030]`}):null,l.map(t=>{let r=t===e&&a===null;return(0,S.jsx)(`button`,{type:`button`,onClick:()=>{n(t),o?.(null)},"aria-pressed":r,className:I(r),children:s.categories[t]},t)})]})}export{C as a,A as i,F as n,y as o,N as r,v as s,L as t}; |