PageSourceSearch

https://beamish-maamoul-a3c725.netlify.app/assets/index-B-01gp8C.js

js beamish-maamoul-a3c725.netlify.app collected 2026-10-03 10:29:17 UTC 16,664 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/HomePage-DypOvXjW.js","assets/vendor-react-7UJKJIhU.js","assets/LoadingSkeleton-QEWSA_vr.js","assets/ImageLightbox-rc7PO4u9.js","assets/vendor-ui-DJKmmfZX.js","assets/calendar-AQTVilM2.js","assets/cs-FWuxrkYj.js","assets/vendor-supabase-CDTnsVBO.js","assets/MenuPage-DNbwzwD2.js","assets/PublicSpecialtiesPage-aKM4RKQ9.js","assets/PublicGalleryPage-B4A6k22P.js","assets/PublicNewsPage-CgUu3nWK.js","assets/LoginPage-BGKR6pSo.js","assets/NewsletterPage-BgdT6lKC.js","assets/NewsletterVerifyPage-BYUOuCIp.js","assets/NewsletterUnsubscribePage-CppNKe6T.js","assets/PromoCodePage-CSn3-dcf.js","assets/ReservationViewPage-XiHpjRrS.js","assets/ReservationConfirmPage-Ab061pVX.js","assets/ReservationRejectPage--HrPYReO.js","assets/PrivacyPolicyPage-DxzNxvll.js","assets/AdminLayout-BRTG4tdC.js","assets/DashboardPage-j4sFGRxA.js","assets/MenuItemsPage-RYN5fXym.js","assets/SpecialtiesPage-MTI_7oWz.js","assets/GalleryPage-Cauabntv.js","assets/NewsPage-CBJorPTY.js","assets/ReservationsPage-CiHC-ek3.js","assets/NewsletterPage-BisR0COW.js","assets/DiscountCodesPage-Bq0_bfjA.js"])))=>i.map(i=>d[i]);
2var e=Object.defineProperty,t=(t,a,r)=>((t,a,r)=>a in t?e(t,a,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[a]=r)(t,"symbol"!=typeof a?a+"":a,r);import{r as a,a as r,N as n,u as s,B as o,R as i,b as l}from"./vendor-react-7UJKJIhU.js";import{z as c,A as d,F as u,L as m}from"./vendor-ui-DJKmmfZX.js";import{c as p}from"./vendor-supabase-CDTnsVBO.js";!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver(e=>{for(const a of e)if("childList"===a.type)for(const e of a.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&t(e)}).observe(document,{childList:!0,subtree:!0})}function t(e){if(e.ep)return;e.ep=!0;const t=function(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?t.credentials="include":"anonymous"===e.crossOrigin?t.credentials="omit":t.credentials="same-origin",t}(e);fetch(e.href,t)}}();var h={exports:{}},_={},f=a,x=Symbol.for("react.element"),j=Symbol.for("react.fragment"),g=Object.prototype.hasOwnProperty,y=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,v={key:!0,ref:!0,__self:!0,__source:!0};function w(e,t,a){var r,n={},s=null,o=null;for(r in void 0!==a&&(s=""+a),void 0!==t.key&&(s=""+t.key),void 0!==t.ref&&(o=t.ref),t)g.call(t,r)&&!v.hasOwnProperty(r)&&(n[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===n[r]&&(n[r]=t[r]);return{$$typeof:x,type:e,key:s,ref:o,props:n,_owner:y.current}}_.Fragment=j,_.jsx=w,_.jsxs=w,h.exports=_;var P,b=h.exports,E=r;P=E.createRoot,E.hydrateRoot;const O={},k=function(e,t,a){let r=Promise.resolve();if(t&&t.length>0){document.getElementsByTagName("link");const e=document.querySelector("meta[property=csp-nonce]"),a=(null==e?void 0:e.nonce)||(null==e?void 0:e.getAttribute("nonce"));r=Promise.allSettled(t.map(e=>{if((e=function(e){return"/"+e}(e))in O)return;O[e]=!0;const t=e.endsWith(".css"),r=t?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${e}"]${r}`))return;const n=document.createElement("link");return n.rel=t?"stylesheet":"modulepreload",t||(n.as="script"),n.crossOrigin="",n.href=e,a&&n.setAttribute("nonce",a),document.head.appendChild(n),t?new Promise((t,a)=>{n.addEventListener("load",t),n.addEventListener("error",()=>a(new Error(`Unable to preload CSS for ${e}`)))}):void 0}))}function n(e){const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(const e of t||[])"rejected"===e.status&&n(e.reason);return e().catch(n)})},N=p("https://ywyxgkacawjjsqhdfhay.supabase.co","eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Inl3eXhna2FjYXdqanNxaGRmaGF5Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjM5NzUwOTgsImV4cCI6MjA3OTU1MTA5OH0.zPvyfUG4z0tYqFpuzHO20i2s9DXHg-yZyUzlvFNgHUQ"),I=9e5,L=18e5;async function R(e,t,a){try{await N.rpc("record_login_attempt",{p_identifier:e,p_success:t,p_ip_address:null})}catch(r){}}let z=null,T=Date.now(),D=[];function A(e){V(),S(e);const t=()=>{T=Date.now(),S(e)};return D=["mousedown","keydown","scroll","touchstart","click"].map(e=>(window.addEventListener(e,t,{passive:!0}),{event:e,handler:t})),()=>V()}function S(e){z&&clearTimeout(z),z=setTimeout(()=>{Date.now()-T>=L?e():S(e)},L)}function V(){z&&(clearTimeout(z),z=null),D.forEach(({event:e,handler:t})=>{window.removeEventListener(e,t)}),D=[]}function C(e){return e.trim().replace(/[<>'"&]/g,"").replace(/javascript:/gi,"").replace(/on\w+\s*=/gi,"").normalize("NFKC").slice(0,1e3)}function q(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)&&e.length<=255}async function M(){try{await Promise.all([N.rpc("cleanup_old_login_attempts"),N.rpc("cleanup_expired_sessions")])}catch(e){}}const U=a.createContext(void 0);function F({children:e}){const[t,r]=a.useState(null),[n,s]=a.useState(null),[o,i]=a.useState(null),[l,d]=a.use
2State(!0),u=async e=>{try{const{data:t,error:a}=await N.from("admin_users").select("*").eq("id",e).eq("is_active",!0).maybeSingle();if(a)throw a;return i(t),t}catch(t){return i(null),null}};a.useEffect(()=>{N.auth.getSession().then(async({data:{session:e}})=>{try{s(e),r((null==e?void 0:e.user)??null),(null==e?void 0:e.user)&&(await u(e.user.id),A(m))}catch(t){}finally{d(!1)}}).catch(e=>{d(!1)});const{data:{subscription:e}}=N.auth.onAuthStateChange((e,t)=>{(async()=>{try{s(t),r((null==t?void 0:t.user)??null),(null==t?void 0:t.user)?(await u(t.user.id),A(m)):(i(null),V())}catch(e){}finally{d(!1)}})()});try{M()}catch(a){}const t=setInterval(()=>{try{M()}catch(a){}},36e5);return()=>{e.unsubscribe(),V(),clearInterval(t)}},[]);const m=async()=>{c.error("Relace vypršela z důvodu nečinnosti. Přihlaste se prosím znovu."),await p()},p=async()=>{if(t)try{await N.rpc("log_admin_action",{p_admin_id:t.id,p_action:"LOGOUT",p_table_name:"admin_users",p_record_id:t.id})}catch(a){}V();const{error:e}=await N.auth.signOut();if(e)throw e;i(null)},h=async()=>{if(t)try{await N.from("admin_users").update({last_login_at:(new Date).toISOString()}).eq("id",t.id)}catch(e){}};return b.jsx(U.Provider,{value:{user:t,session:n,adminUser:o,loading:l,signIn:async(e,t)=>{var a;const r=await async function(e){try{const{data:t,error:a}=await N.rpc("check_rate_limit",{p_identifier:e,p_max_attempts:5,p_window_minutes:15});if(a)throw a;const r=!0===t;if(!r){const{data:t}=await N.from("login_attempts").select("created_at").eq("email",e).eq("success",!1).gte("created_at",new Date(Date.now()-I).toISOString()).order("created_at",{ascending:!1}).limit(1).maybeSingle();if(null==t?void 0:t.created_at)return{allowed:!1,attemptsRemaining:0,resetTime:new Date(new Date(t.created_at).getTime()+I)}}const{count:n}=await N.from("login_attempts").select("*",{count:"exact",head:!0}).eq("email",e).eq("success",!1).gte("created_at",new Date(Date.now()-I).toISOString());return{allowed:r,attemptsRemaining:Math.max(0,5-(n||0))}}catch(t){return{allowed:!1,attemptsRemaining:0}}}(e);if(!r.allowed){const e=r.resetTime?` Zkuste to znovu po ${r.resetTime.toLocaleTimeString("cs-CZ")}.`:"";throw new Error(`Příliš mnoho neúspěšných pokusů o přihlášení.${e}`)}try{const{data:a,error:r}=await N.auth.signInWithPassword({email:e,password:t});if(r)throw await R(e,!1,r.message),r;if(a.user){const t=await u(a.user.id);if(!t)throw await N.auth.signOut(),await R(e,!1),new Error("Přístup odepřen: Nemáte oprávnění administrátora");if(!t.is_active)throw await N.auth.signOut(),await R(e,!1),new Error("Váš účet byl deaktivován");await R(e,!0),await h();try{await N.rpc("log_admin_action",{p_admin_id:a.user.id,p_action:"LOGIN",p_table_name:"admin_users",p_record_id:a.user.id})}catch(n){0}A(m)}}catch(s){if(null==(a=s.message)?void 0:a.includes("Invalid login credentials"))throw new Error("Nesprávné přihlašovací údaje");throw new Error("Nesprávné přihlašovací údaje")}},signOut:p,updateLastLogin:h},children:e})}function G(){const e=a.useContext(U);if(void 0===e)throw new Error("useAuth must be used within an AuthProvider");return e}function Z({children:e}){const{user:t,adminUser:a,loading:r}=G();return r?b.jsx("div",{className:"min-h-screen flex items-center justify-center bg-parchment-100",children:b.jsxs("div",{className:"text-center",children:[b.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-copper-600 mx-auto mb-4"}),b.jsx("p",{className:"text-oak-700 font-body",children:"Ověřování přístupu..."})]})}):t?a?a.is_active?b.jsx(b.Fragment,{children:e}):b.jsx("div",{className:"min-h-screen flex items-center justify-center bg-parchment-100 px-4",children:b.jsxs("div",{className:"max-w-md w-full paper-card p-8 rounded-vintage border-2 border-oak-300 text-center",children:[b.jsx("div",{className:"w-16 h-16 bg-copper-100 rounded-full flex items-center justify-center mx-auto mb-4",children:b.jsx("svg",{className:"w-8 h-8 text-copper-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:b.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636"})})}),b.jsx("h2",{className:"text-2xl font-heading font-bold text-oak-900 mb-3",children:"Účet deaktivován"}),b.jsx("p",{className:"text-oak-700 font-body mb-6",children:"Váš účet byl deaktivován. Kontaktujte prosím správce systému."}),b.jsx("a",{href:"/",className:"btn-vintage inline-block",children:"Zpět na web"})]})}):b.jsx("div",{className:"min-h-screen flex items-center justify-center bg-parchment-100 px-4",children:b.jsxs("div",{className:"max-w-md w-full paper-card p-8 rounded-vintage border-2 border-oak-300 text-center",children:[b.jsx("div",{className:"w-16 h-16 bg-copper-100 rounded-full flex items-center justify-center mx-auto mb-4",children:b.jsx("svg",{className:"w-8 h-8 text-copper-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:b.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})})}),b.jsx("h2",{className:"text-2xl font-heading font-bold text-oak-900 mb-3",children:"Přístup odepřen"}),b.jsx("p",{className:"text-oak-700 font-body mb-6",children:"Nemáte oprávnění administrátora pro přístup k této části aplikace."}),b.jsx("a",{href:"/",className:"btn-vintage inline-block",children:"Zpět na web"})]})}):b.jsx(n,{to:"/sprava-7k9m2x5p8q/login",replace:!0})}class $ extends a.Component{constructor(e){super(e),t(this,"handleReset",()=>{this.setState({hasError:!1,error:null}),window.location.href="/"}),this.state={hasError:!1,error:null}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){}render(){return this.state.hasError?b.jsx("div",{className:"min-h-screen bg-parchment-100 flex items-center justify-center px-4",children:b.jsxs("div",{className:"max-w-md w-full paper-card p-8 rounded-vintage border-2 border-oak-300 text-center",children:[b.jsx("div",{className:"w-16 h-16 bg-red-100 rounded-full flex items-center justify-center mx-auto mb-4",children:b.jsx(d,{className:"w-8 h-8 text-red-600"})}),b.jsx("h2",{className:"text-2xl font-heading font-bold text-oak-900 mb-3",children:"Něco se pokazilo"}),b.jsx("p",{className:"text-oak-700 font-body mb-6",children:"Omlouváme se, došlo k neočekávané chybě. Zkuste to prosím znovu."}),!1,b.jsx("button",{onClick:this.handleReset,className:"btn-vintage",children:"Zpět na úvodní stránku"})]})}):this.props.children}}function B(){const{pathname:e}=s();return a.useEffect(()=>{window.scrollTo(0,0)},[e]),null}const H=a.lazy(()=>k(()=>import("./HomePage-DypOvXjW.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])).then(e=>({default:e.HomePage}))),J=a.lazy(()=>k(()=>import("./MenuPage-DNbwzwD2.js"),__vite__mapDeps([8,1,4,7])).then(e=>
2({default:e.MenuPage}))),X=a.lazy(()=>k(()=>import("./PublicSpecialtiesPage-aKM4RKQ9.js"),__vite__mapDeps([9,1,2,4,7])).then(e=>({default:e.PublicSpecialtiesPage}))),W=a.lazy(()=>k(()=>import("./PublicGalleryPage-B4A6k22P.js"),__vite__mapDeps([10,1,2,3,4,7])).then(e=>({default:e.PublicGalleryPage}))),Y=a.lazy(()=>k(()=>import("./PublicNewsPage-CgUu3nWK.js"),__vite__mapDeps([11,1,4,7])).then(e=>({default:e.PublicNewsPage}))),K=a.lazy(()=>k(()=>import("./LoginPage-BGKR6pSo.js"),__vite__mapDeps([12,1,4,7])).then(e=>({default:e.LoginPage}))),Q=a.lazy(()=>k(()=>import("./NewsletterPage-BgdT6lKC.js"),__vite__mapDeps([13,1,4,5,6,7]))),ee=a.lazy(()=>k(()=>import("./NewsletterVerifyPage-BYUOuCIp.js"),__vite__mapDeps([14,1,4,7]))),te=a.lazy(()=>k(()=>import("./NewsletterUnsubscribePage-CppNKe6T.js"),__vite__mapDeps([15,1,4,7]))),ae=a.lazy(()=>k(()=>import("./PromoCodePage-CSn3-dcf.js"),__vite__mapDeps([16,1,6,4,7]))),re=a.lazy(()=>k(()=>import("./ReservationViewPage-XiHpjRrS.js"),__vite__mapDeps([17,1,4,7])).then(e=>({default:e.ReservationViewPage}))),ne=a.lazy(()=>k(()=>import("./ReservationConfirmPage-Ab061pVX.js"),__vite__mapDeps([18,1,4,7])).then(e=>({default:e.ReservationConfirmPage}))),se=a.lazy(()=>k(()=>import("./ReservationRejectPage--HrPYReO.js"),__vite__mapDeps([19,1,4,7])).then(e=>({default:e.ReservationRejectPage}))),oe=a.lazy(()=>k(()=>import("./PrivacyPolicyPage-DxzNxvll.js"),__vite__mapDeps([20,1,4,7])).then(e=>({default:e.PrivacyPolicyPage}))),ie=a.lazy(()=>k(()=>import("./AdminLayout-BRTG4tdC.js"),__vite__mapDeps([21,4,1,7])).then(e=>({default:e.AdminLayout}))),le=a.lazy(()=>k(()=>import("./DashboardPage-j4sFGRxA.js"),__vite__mapDeps([22,1,4,7])).then(e=>({default:e.DashboardPage}))),ce=a.lazy(()=>k(()=>import("./MenuItemsPage-RYN5fXym.js"),__vite__mapDeps([23,1,4,7])).then(e=>({default:e.MenuItemsPage}))),de=a.lazy(()=>k(()=>import("./SpecialtiesPage-MTI_7oWz.js"),__vite__mapDeps([24,1,4,7])).then(e=>({default:e.SpecialtiesPage}))),ue=a.lazy(()=>k(()=>import("./GalleryPage-Cauabntv.js"),__vite__mapDeps([25,1,4,7])).then(e=>({default:e.GalleryPage}))),me=a.lazy(()=>k(()=>import("./NewsPage-CBJorPTY.js"),__vite__mapDeps([26,1,4,7])).then(e=>({default:e.NewsPage}))),pe=a.lazy(()=>k(()=>import("./ReservationsPage-CiHC-ek3.js"),__vite__mapDeps([27,1,4,7])).then(e=>({default:e.ReservationsPage}))),he=a.lazy(()=>k(()=>import("./NewsletterPage-BisR0COW.js"),__vite__mapDeps([28,1,4,6,7]))),_e=a.lazy(()=>k(()=>import("./DiscountCodesPage-Bq0_bfjA.js"),__vite__mapDeps([29,1,4,6,7]))),fe="sprava-7k9m2x5p8q",xe=`/${fe}/login`;function je(){return b.jsx("div",{className:"min-h-screen flex items-center justify-center bg-parchment-100",children:b.jsx(m,{className:"w-8 h-8 text-copper-600 animate-spin"})})}function ge(){return b.jsx($,{children:b.jsx(F,{children:b.jsxs(o,{children:[b.jsx(B,{}),b.jsx(a.Suspense,{fallback:b.jsx(je,{}),children:b.jsxs(i,{children:[b.jsx(l,{path:"/",element:b.jsx(H,{})}),b.jsx(l,{path:"/menu",element:b.jsx(J,{})}),b.jsx(l,{path:"/specialties",element:b.jsx(X,{})}),b.jsx(l,{path:"/gallery",element:b.jsx(W,{})}),b.jsx(l,{path:"/news",element:b.jsx(Y,{})}),b.jsx(l,{path:"/newsletter",element:b.jsx(Q,{})}),b.jsx(l,{path:"/newsletter/overit/:token",element:b.jsx(ee,{})}),b.jsx(l,{path:"/newsletter/odhlasit/:token",element:b.jsx(te,{})}),b.jsx(l,{path:"/sleva/:code",element:b.jsx(ae,{})}),b.jsx(l,{path:"/rezervace/zobrazit",element:b.jsx(re,{})}),b.jsx(l,{path:"/rezervace/potvrdit",element:b.jsx(ne,{})}),b.jsx(l,{path:"/rezervace/odmitnout",element:b.jsx(se,{})}),b.jsx(l,{path:"/ochrana-osobnich-udaju",element:b.jsx(oe,{})}),b.jsx(l,{path:xe,element:b.jsx(K,{})}),b.jsxs(l,{path:`/${fe}`,element:b.jsx(Z,{children:b.jsx(ie,{})}),children:[b.jsx(l,{index:!0,element:b.jsx(le,{})}),b.jsx(l,{path:"menu",element:b.jsx(ce,{})}),b.jsx(l,{path:"specialties",element:b.jsx(de,{})}),b.jsx(l,{path:"gallery",element:b.jsx(ue,{})}),b.jsx(l,{path:"news",element:b.jsx(me,{})}),b.jsx(l,{path:"reservations",element:b.jsx(pe,{})}),b.jsx(l,{path:"newsletter",element:b.jsx(he,{})}),b.jsx(l,{path:"discount-codes",element:b.jsx(_e,{})})]}),b.jsx(l,{path:"*",element:b.jsx(n,{to:"/",replace:!0})})]})}),b.jsx(u,{position:"top-right",toastOptions:{duration:3e3,style:{background:"#1f2937",color:"#fff",border:"1px solid #d97706"},success:{iconTheme:{primary:"#d97706",secondary:"#fff"}},error:{iconTheme:{primary:"#ef4444",secondary:"#fff"}}}})]})})})}P(document.getElementById("root")).render(b.jsx(a.StrictMode,{children:b.jsx(ge,{})}));export{B as S,C as a,b as j,N as s,G as u,q as v};

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.