1import{n as ve,u as ye,r as g,j as e}from"./vendor-react-BtGqQFvK.js";import{s as u,l as A,c as be,L as Q,aL as F,B as k,dO as _e,aS as je,aW as we,dx as Ne,t as H,aI as ke,bp as z,a4 as W,n as Z,e1 as X,bl as ee,ak as te,aR as Pe,aN as Se,b1 as Ee,aq as Ce,aG as qe}from"./app-shell-CMj3qzLx.js";import{C as L,g as M}from"./card-DX6FEdjS.js";import{L as ae}from"./label-DpwaeRB5.js";import{H as De}from"./App-UtdOfdj1.js";import{S as Le}from"./SafeHtml-BYspMT-7.js";import{u as Me}from"./useProductLandingStyles-CGfIgF5Y.js";import{g as Ae,a as He,b as Re,L as Ie}from"./LandingStyleScope-CO5_0akO.js";import{u as Oe}from"./vendor-i18n-Duo0qcql.js";import{e as Te,r as $e,L as B,a as j,M as Fe}from"./vendor-utils-BPqL1lCz.js";import"./vendor-supabase-PhdYWwdx.js";import"./vendor-ui-zUh5tm1d.js";import"./vendor-query-CzlW6vM0.js";import"./vendor-motion-D4fhTsRL.js";import"./config-CI13lgno.js";import"./serviceWorker-BdOWgZKc.js";import"./useSiteSettingsCache-CfWB2_oA.js";import"./sv2-iframe-runtime-evNQzxL9.js";import"./htmlSanitizer-C6zO-cru.js";import"./purify.es-LQkvcK5U.js";import"./colorUtils-COQcqF7b.js";async function ze(a,f){try{const{data:o}=await u.from("membership_subscriptions").select("membership_id, status, current_period_end").eq("user_id",a).in("status",["active","trialing"]),x=(o||[]).filter(i=>!i.current_period_end||new Date(i.current_period_end)>new Date).map(i=>i.membership_id);if(!x.length)return!1;const{data:p}=await u.from("memberships").select("id, event_ids").in("id",x);return(p||[]).some(i=>Array.isArray(i.event_ids)&&i.event_ids.includes(f))}catch(o){return A.error("Error checking membership event access",o instanceof Error?o:new Error(String(o))),!1}}const Be={course:ke,coaching:H,membership:Ne,community:we,digital_product:je,bundle:_e},Ue={course:"/checkout",coaching:"/checkout/coaching",membership:"/checkout/membresia",community:"/checkout/comunidad",digital_product:"/checkout/descarga",bundle:"/checkout/bundle"};function Ge(a,f){const[o,x]=g.useState({d:0,h:0,m:0,s:0}),[p,i]=g.useState(!1);return g.useEffect(()=>{if(!a||!f)return;const d=()=>{const y=Fe(new Date(a),new Date);if(y<=0){i(!0),x({d:0,h:0,m:0,s:0});return}x({d:Math.floor(y/86400),h:Math.floor(y%86400/3600),m:Math.floor(y%3600/60),s:y%60})};d();const t=setInterval(d,1e3);return()=>clearInterval(t)},[a,f]),{timeLeft:o,expired:p}}function Je({faq:a}){const[f,o]=g.useState(null);return e.jsx("div",{className:"space-y-3",children:a.map((x,p)=>e.jsxs("div",{className:"border rounded-xl overflow-hidden",children:[e.jsxs("button",{onClick:()=>o(f===p?null:p),className:"w-full flex items-center justify-between p-4 text-left hover:bg-muted/50 transition-colors",children:[e.jsx("span",{className:"font-medium text-foreground",children:x.question}),f===p?e.jsx(Ee,{className:"h-4 w-4 text-muted-foreground shrink-0 ml-2"}):e.jsx(Ce,{className:"h-4 w-4 text-muted-foreground shrink-0 ml-2"})]}),f===p&&e.jsx("div",{className:"px-4 pb-4 text-muted-foreground",children:x.answer})]},p))})}function gt(){const{t:a,i18n:f}=Oe(),o=f.language==="es"?Te:$e,{slug:x}=ve(),p=ye(),{toast:i}=qe(),{user:d}=be(),[t,y]=g.useState(null),[w,se]=g.useState(null),[re,U]=g.useState(!0),[G,P]=g.useState(!1),[S,E]=g.useState(!1),[b,ne]=g.useState(!1),[R,ie]=g.useState(""),[I,le]=g.useState(""),{styles:v}=Me(t?.tenant_id??null,"event",t?.id,f.language),_=t?B(new Date(t.event_date)):!1,O=t?.replay_visibility||"public",oe=O==="public"||O==="both"||O==="registrants_only"&&(S||b),T=!!t?.replay_url&&(!t.replay_available_until||!B(new Date(t.replay_available_until)))&&oe,$=t?.offer_text&&t?.offer_expires_at&&!B(new Date(t.offer_expires_at)),{timeLeft:C,expired:ce}=Ge(_?$&&t?.offer_expires_at||null:t?.event_date||null,t?.countdown_enabled??!1);g.useEffect(()=>{x&&de()},[x]);const de=async()=>{try{const{data:s,error:n}=await u.from("course_events_public").select("*").eq("slug",x).eq("is_published",!0).maybeSingle();if(n)throw n;if(!s){U(!1);return}const{data:c}=await u.rpc("get_event_registrations_count",{_event_id:s.id}),h={...s,registrations_count:c??0,benefits:Array.isArray(s.benefits)?s.benefits:null,faq:Array.isArray(s.faq)?s.faq:null};if(y(h),d){const{data:r}=await u.from("event_registrations").select("id").eq("event_id",s.id).eq("user_id",d.id).eq("status","registered").maybeSingle();r&&E(!0),await ze(d.id,s.id)&&ne(!0)}s.linked_product_type&&s.linked_product_id&&await me(s.linked_product_type,s.linked_product_id)}catch(s){A.error("Error loading event",s instanceof Error?s:new Error(String(s)))}finally{U(!1)}},me=async(s,n)=>{try{let c="",m=0,h="";switch(s){case"course":{const{data:r}=await u.from("courses").select("title, price, slug").eq("id",n).maybeSingle();r&&(c=r.title,m=r.price||0,h=r.slug);break}case"coaching":{const{data:r}=await u.from("coaching_programs").select("name, price, slug").eq("id",n).maybeSingle();r&&(c=r.name,m=r.price||0,h=r.slug);break}case"membership":{const{data:r}=await u.from("memberships").select("name, price_monthly, slug").eq("id",n).maybeSingle();r&&(c=r.name,m=r.price_monthly||0,h=r.slug);break}case"community":{const{data:r}=await u.from("communities").select("name, price, slug").eq("id",n).maybeSingle();r&&(c=r.name,m=r.price||0,h=r.slug);break}case"digital_product":{const{data:r}=await u.from("digital_products").select("name, price, slug").eq("id",n).maybeSingle();r&&(c=r.name,m=r.price||0,h=r.slug);break}case"bundle":{const{data:r}=await u.from("bundles").select("name, price, slug").eq("id",n).maybeSingle();r&&(c=r.name,m=r.price||0,h=r.slug);break}}if(c){const r=Ue[s]||"/checkout";se({name:c,price:m,slug:h,checkoutPath:`${r}/${h}`})}}catch(c){A.error("Error loading linked product",c instanceof Error?c:new Error(String(c)))}},ue=async()=>
1{if(t){if(t.pricing_type==="paid"&&t.price>0&&!b){if(t.linked_product_id&&t.linked_product_type){const n={course:"curso",membership:"membresia",community:"comunidad",digital_product:"producto",coaching:"coaching"}[t.linked_product_type]||"producto";p(`/checkout/${n}/${t.linked_product_id}`);return}i({title:a("eventPage.paymentRequired"),description:a("eventPage.paymentRequiredDesc",{price:t.price}),variant:"destructive"});return}if(t.max_attendees&&(t.registrations_count||0)>=t.max_attendees){i({title:a("eventPage.fullCapacity"),description:a("eventPage.fullCapacityDesc"),variant:"destructive"});return}if(!t.tenant_id){i({title:a("common.error"),description:a("eventPage.noSchoolError","Evento sin escuela asociada. Contacta con el organizador."),variant:"destructive"});return}P(!0);try{const s={event_id:t.id,tenant_id:t.tenant_id,status:"registered"};if(d){s.user_id=d.id,s.email=d.email??null;const l=d.user_metadata||{};s.name=(l.full_name||l.first_name||"").toString().trim()||null}else{const l=(R||"").trim();if(!l){i({title:a("eventPage.missingEmail"),description:a("eventPage.missingEmailDesc"),variant:"destructive"}),P(!1);return}const{data:fe}=await u.from("event_registrations").select("id").eq("event_id",t.id).eq("email",l).is("user_id",null).maybeSingle();if(fe){i({title:a("eventPage.alreadyRegisteredTitle"),description:a("eventPage.alreadyRegisteredEmail")}),E(!0),P(!1);return}s.email=l,s.name=(I||"").trim()||null}const n=u.from("event_registrations").insert(s),{data:c,error:m}=d?await n.select("id").maybeSingle():await n.then(l=>({data:null,error:l.error}));if(m){if(m.code==="23505"){i({title:a("eventPage.alreadyRegisteredTitle"),description:a("eventPage.alreadyRegisteredAccount")}),E(!0);return}throw m.code==="42501"||/row-level security/i.test(m.message||"")?new Error(a("eventPage.noPermission")):m}const h=d?.email||R,r=I||d?.user_metadata?.first_name||"";u.functions.invoke("send-event-emails",{body:{action:"send_confirmation",event_id:t.id,registrant_email:h,registrant_name:r,tenant_id:t.tenant_id,registration_id:c?.id??null}}).catch(l=>A.error("Error sending confirmation email",l instanceof Error?l:new Error(String(l)))),E(!0),y(l=>l&&{...l,registrations_count:(l.registrations_count||0)+1}),i({title:a("eventPage.registered"),description:a("eventPage.registeredDesc")})}catch(s){const n=s instanceof Error?s.message:a("eventPage.couldNotRegister");i({title:a("common.error"),description:n,variant:"destructive"})}finally{P(!1)}}};if(re)return e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:e.jsx(Q,{className:"h-8 w-8 animate-spin text-primary"})});if(!t)return e.jsxs("div",{className:"min-h-screen flex flex-col items-center justify-center bg-background",children:[e.jsx(F,{className:"h-16 w-16 text-muted-foreground mb-4"}),e.jsx("h1",{className:"text-2xl font-bold mb-2",children:a("eventPage.notFound")}),e.jsx(k,{onClick:()=>p("/"),children:a("eventPage.backHome")})]});const pe=t.linked_product_type?Be[t.linked_product_type]||z:z,N=t.max_attendees?(t.registrations_count||0)>=t.max_attendees:!1,ge=t.benefits&&t.benefits.length>0,xe=t.faq&&t.faq.length>0,J=t.speaker_name,he=Ae(v??void 0),q=He(v??void 0),V=Re(v??void 0),Y=v?.hero_text_color||void 0,D=!!(v?.hero_bg_color||v?.hero_gradient_from),K=t.max_attendees?Math.max(0,t.max_attendees-(t.registrations_count||0)):null;return e.jsx(Ie,{style:v,children:e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsxs(De,{children:[e.jsx("title",{children:t.title}),e.jsx("meta",{name:"description",content:t.description||a("eventPage.eventDescription",{title:t.title})}),e.jsx("meta",{property:"og:title",content:t.title}),e.jsx("meta",{property:"og:description",content:t.description||a("eventPage.eventDescription",{title:t.title})}),e.jsx("meta",{property:"og:type",content:"website"}),e.jsx("meta",{property:"og:url",content:window.location.href}),t.thumbnail_url&&e.jsx("meta",{property:"og:image",content:t.thumbnail_url}),e.jsx("link",{rel:"canonical",href:window.location.href}),e.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),e.jsx("meta",{name:"twitter:title",content:t.title}),e.jsx("meta",{name:"twitter:description",content:t.description||a("eventPage.eventDescription",{title:t.title})}),t.thumbnail_url&&e.jsx("meta",{name:"twitter:image",content:t.thumbnail_url}),e.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"Event",name:t.title,de
1scription:t.description||"",url:window.location.href,startDate:t.event_date,endDate:t.end_date||t.event_date,eventStatus:"https://schema.org/EventScheduled",eventAttendanceMode:"https://schema.org/OnlineEventAttendanceMode",location:{"@type":"VirtualLocation",url:t.meeting_url||window.location.href},image:t.thumbnail_url||void 0,organizer:{"@type":"Organization",name:t.speaker_name||void 0,url:window.location.origin},offers:t.pricing_type==="paid"&&t.price>0?{"@type":"Offer",price:t.price,priceCurrency:"EUR",availability:N?"https://schema.org/SoldOut":"https://schema.org/InStock",url:window.location.href,validFrom:new Date().toISOString()}:{"@type":"Offer",price:0,priceCurrency:"EUR",availability:N?"https://schema.org/SoldOut":"https://schema.org/InStock",url:window.location.href},...t.speaker_name?{performer:{"@type":"Person",name:t.speaker_name,description:t.speaker_bio||void 0,image:t.speaker_image_url||void 0}}:{}})}),e.jsx("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Inicio",item:`${window.location.origin}/`},{"@type":"ListItem",position:2,name:"Eventos",item:`${window.location.origin}/eventos`},{"@type":"ListItem",position:3,name:t.title,item:window.location.href}]})})]}),e.jsxs("header",{className:"relative overflow-hidden border-b",style:{...D?he:{},...Y?{color:Y}:{}},children:[t.thumbnail_url&&!D&&e.jsxs(e.Fragment,{children:[e.jsx("img",{src:t.thumbnail_url,alt:"","aria-hidden":!0,className:"absolute inset-0 h-full w-full object-cover scale-110 blur-[2px]",loading:"eager",decoding:"async"}),e.jsx("div",{"data-landing-hero-overlay":!0,className:"absolute inset-0 bg-[linear-gradient(115deg,hsl(var(--foreground)/0.92),hsl(var(--foreground)/0.72)_45%,hsl(var(--primary)/0.55))]"})]}),!t.thumbnail_url&&!D&&e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-primary/15 via-background to-primary/5"}),e.jsx("div",{className:`relative max-w-6xl mx-auto px-4 sm:px-6 py-14 sm:py-20 ${t.thumbnail_url&&!D?"text-background":""}`,children:e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-10 items-center",children:[e.jsxs("div",{className:"lg:col-span-7 space-y-5",children:[e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx("span",{"data-landing-badge":!0,className:"inline-flex items-center rounded-full bg-primary px-3 py-1 text-xs font-semibold text-primary-foreground shadow-sm",children:t.pricing_type==="free"?a("eventPage.freeBadge"):`â¬${t.price}`}),!_&&e.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full border border-current/25 bg-current/10 px-3 py-1 text-xs font-medium backdrop-blur-sm",children:[e.jsx(F,{className:"h-3.5 w-3.5"}),j(new Date(t.event_date),"d MMM yyyy · HH:mm",{locale:o}),"h"]}),_&&T&&e.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-full border border-current/25 bg-current/10 px-3 py-1 text-xs font-medium",children:[e.jsx(W,{className:"h-3.5 w-3.5"}),a("eventPage.replayAvailableBadge")]}),N&&e.jsx("span",{className:"inline-flex items-center rounded-full bg-destructive px-3 py-1 text-xs font-semibold text-destructive-foreground",children:a("eventPage.fullBadge")})]}),e.jsx("h1",{className:"text-4xl sm:text-5xl font-extrabold tracking-tight leading-[1.05]",style:{fontFamily:v?.heading_font_family||void 0,fontSize:v?.heading_font_size||void 0},children:t.title}),t.description&&e.jsx(Le,{html:t.description,className:"prose max-w-2xl text-lg opacity-90 [&_p]:m-0 [&_*]:text-inherit"}),e.jsx("div",{className:"flex flex-wrap gap-2 pt-1",children:[{icon:Z,label:`${j(new Date(t.event_date),"HH:mm",{locale:o})}h${t.end_date?` â ${j(new Date(t.end_date),"HH:mm",{locale:o})}h`:""}`},{icon:X,label:t.meeting_provider==="zoom"?"Zoom":t.meeting_provider==="meet"?"Google Meet":t.meeting_provider==="youtube"?"YouTube":t.meeting_provider==="jitsi"?"Jitsi":"Online"},{icon:H,label:`${a("eventPage.registeredCount",{count:t.registrations_count||0})}${t.max_attendees?` / ${t.max_attendees}`:""}`}].map(({icon:s,label:n})=>e.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-lg border border-current/20 bg-current/5 px-2.5 py-1.5 text-sm backdrop-blur-sm",children:[e.jsx(s,{className:"h-4 w-4 opacity-80"}),n]},n))}),J&&e.jsxs("div",{className:"flex items-center gap-3 pt-2",children:[t.speaker_image_url?e.jsx("img",{src:t.speaker_image_url,alt:t.speaker_name,className:"h-12 w-12 rounded-full object-cover ring-2 ring-current/20",loading:"lazy",decoding:"async"}):e.jsx("div",{className:"h-12 w-12 rounded-full bg-current/10 flex items-center justify-center font-bold text-lg",children:t.speaker_name.charAt(0)}),e.jsxs("div",{className:"text-sm",children:[e.jsx("p",{className:"opacity-75",children:a("eventPage.presentedBy")}),e.jsx("p",{className:"font-semibold",children:t.speaker_name})]})]})]}),e.jsx("div",{className:"lg:col-span-5",children:e.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card text-card-foreground p-6 shadow-2xl space-y-4",style:V,children:[t.countdown_enabled&&!ce&&e.jsxs("div",{children:[e.jsx("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground mb-2",children:a(_&&$?"eventPage.offerEndsIn":"eventPage.eventStartsIn")}),e.jsx("div",{className:"grid grid-cols-4 gap-2",children:[{v:C.d,l:a("eventPage.days")},{v:C.h,l:a("eventPage.hours")},{v:C.m,l:a("eventPage.mins")},{v:C.s,l:a("eventPage.secs")}].map(s=>e.jsxs("div",{className:"rounded-xl bg-muted/60 py-2.5 text-center",children:[e.jsx("div",{className:"text-2xl font-bold tabular-nums","data-landing-price":!0,children:String(s.v).padStart(2,"0")}),e.jsx("div",{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:s.l})]},s.l))})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:t.pricing_type==="free"||b?a("eventPage.reserveYourFreeSpot"):a("eventPage.registerByPriceCard",{price:t.price})}),t.pricing_type!=="free"&&!b&&e.jsxs("p",{className:"text-3xl font-extrabold mt-1","data-landing-price":!0,children:["â¬",t.price]})]}),b&&!S&&e.jsx("div",{className:"rounded-xl border border-primary/30 bg-primary/5 px-3 py-2 text-sm text-primary",children:"Incluido en tu membresÃa â reserva tu plaza sin coste."}),S?e.jsxs("div",{className:"space-y-2 text-center",children:[e.jsx(ee,{className:"h-10 w-10 text-primary mx-auto"}),e.jsx("p",{className:"font-medium text-primary",children:a("eventPage.alreadyRegisteredShort")}),t.meeting_url&&e.jsxs(k,{className:"w-full",onClick:()=>window.open(t.meeting_url,"_blank"),style:q,"data-landing-cta":!0,children:[e.jsx(X,{className:"h-4 w-4 mr-2"}),a("eventPage.joinEvent")]})]}):N?e.jsxs("div",{className:"text-center space-y-1.5 py-2",children:[e.jsx(H,{className:"h-10 w-10 text-muted-foreground mx-auto"}),e.jsx("p",{className:"font-medium text-muted-foreground",children:a("eventPage.fullCapacity")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:a("eventPage.fullCapacityCardDesc")})]}):_?e.jsx("p",{className:"text-sm text-muted-foreground text-center py-2",children:T?a("eventPage.watchRecording"):a("eventPage.statusPast","Este evento ya ha finalizado")}):e.jsxs(e.Fragment,{children:[!d&&e.jsxs("div",{className:"space-y-2.5",children:[e.jsxs("div",{children:[e.jsx(ae,{className:"text-xs",children:a("eventPage.name")}),e.jsx(te,{value:I,onChange:s=>
1le(s.target.value),placeholder:a("eventPage.yourName")})]}),e.jsxs("div",{children:[e.jsx(ae,{className:"text-xs",children:"Email *"}),e.jsx(te,{type:"email",value:R,onChange:s=>ie(s.target.value),placeholder:"[email protected]"})]})]}),e.jsxs(k,{className:"w-full landing-cta",size:"lg",onClick:ue,disabled:G,style:q,"data-landing-cta":!0,children:[G?e.jsx(Q,{className:"h-4 w-4 animate-spin mr-2"}):null,t.pricing_type==="free"||b?a("eventPage.registerFree"):a("eventPage.payAmount",{price:t.price})]}),K!==null&&e.jsx("p",{className:"text-xs text-center text-muted-foreground",children:a("eventPage.spotsRemaining",{count:K})})]})]})})]})})]}),e.jsx("div",{className:"max-w-5xl mx-auto px-4 sm:px-6 py-10 space-y-12",children:e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8",children:[e.jsxs("div",{className:"lg:col-span-2 space-y-10",children:[ge&&e.jsxs("section",{children:[e.jsx("h2",{className:"text-2xl font-bold text-foreground mb-6",children:a("eventPage.whatYouLearn")}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:t.benefits.map((s,n)=>e.jsxs("div",{className:"flex items-start gap-3 p-3 rounded-xl bg-primary/5 border border-primary/10",children:[e.jsx(ee,{className:"h-5 w-5 text-primary mt-0.5 shrink-0"}),e.jsx("span",{className:"text-foreground",children:s})]},n))})]}),J&&t.speaker_bio&&e.jsxs("section",{children:[e.jsx("h2",{className:"text-2xl font-bold text-foreground mb-6",children:a("eventPage.aboutSpeaker")}),e.jsx(L,{children:e.jsxs(M,{className:"p-6 flex flex-col sm:flex-row gap-6 items-start",children:[t.speaker_image_url?e.jsx("img",{src:t.speaker_image_url,alt:t.speaker_name,className:"h-24 w-24 rounded-2xl object-cover border-2 border-primary/20 shrink-0",loading:"lazy",decoding:"async"}):e.jsx("div",{className:"h-24 w-24 rounded-2xl bg-primary/10 flex items-center justify-center text-primary font-bold text-3xl shrink-0",children:t.speaker_name.charAt(0)}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-xl font-semibold text-foreground mb-2",children:t.speaker_name}),e.jsx("p",{className:"text-muted-foreground leading-relaxed",children:t.speaker_bio})]})]})})]}),_&&T&&e.jsx("section",{children:e.jsx(L,{children:e.jsxs(M,{className:"p-6",children:[e.jsxs("h2",{className:"text-xl font-semibold mb-4 flex items-center gap-2",children:[e.jsx(W,{className:"h-5 w-5 text-primary"}),a("eventPage.watchRecording")]}),e.jsx("div",{className:"aspect-video rounded-xl overflow-hidden bg-black",children:t.replay_url.includes("youtube")||t.replay_url.includes("youtu.be")?e.jsx("iframe",{src:t.replay_url.replace("watch?v=","embed/").replace("youtu.be/","youtube.com/embed/"),className:"w-full h-full",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0}):e.jsx("video",{src:t.replay_url,controls:!0,className:"w-full h-full"})}),t.replay_available_until&&e.jsxs("p",{className:"text-sm text-muted-foreground mt-3 flex items-center gap-1",children:[e.jsx(Pe,{className:"h-4 w-4"}),a("eventPage.availableUntil",{date:j(new Date(t.replay_available_until),"d 'de' MMMM, HH:mm",{locale:o})})]})]})})}),xe&&e.jsxs("section",{children:[e.jsx("h2",{className:"text-2xl font-bold text-foreground mb-6",children:a("eventPage.faqTitle")}),e.jsx(Je,{faq:t.faq})]})]}),e.jsxs("div",{className:"space-y-6",children:[e.jsx(L,{className:"rounded-2xl border-border/60 sticky top-6",style:V,children:e.jsxs(M,{className:"p-6 space-y-4",children:[e.jsx("h3",{className:"text-sm font-semibold uppercase tracking-wide text-muted-foreground",children:a("eventPage.eventDetails","Detalles del evento")}),e.jsxs("div",{className:"space-y-3 text-sm",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(F,{className:"h-4 w-4 mt-0.5 text-primary shrink-0"}),e.jsx("span",{children:j(new Date(t.event_date),"EEEE d 'de' MMMM yyyy",{locale:o})})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(Z,{className:"h-4 w-4 mt-0.5 text-primary shrink-0"}),e.jsxs("span",{children:[j(new Date(t.event_date),"HH:mm",{locale:o}),"h",t.end_date?` â ${j(new Date(t.end_date),"HH:mm",{locale:o})}h`:""]})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(H,{className:"h-4 w-4 mt-0.5 text-primary shrink-0"}),e.jsx("span",{children:a("eventPage.registeredCount",{count:t.registrations_count||0})})]})]}),!_&&!S&&!N&&e.jsx(k,{className:"w-full",size:"lg",onClick:()=>window.scrollTo({top:0,behavior:"smooth"}),style:q,"data-landing-cta":!0,children:t.pricing_type==="free"||b?a("eventPage.registerFree"):a("eventPage.payAmount",{price:t.price})})]})}),w&&e.jsx(L,{className:"shadow-lg rounded-2xl border-accent/20 bg-gradient-to-b from-accent/5 to-background",children:e.jsxs(M,{className:"p-6 space-y-4 text-center",children:[$&&e.jsx(Se,{variant:"destructive",className:"text-sm",children:t.offer_text}),e.jsx(pe,{className:"h-10 w-10 text-primary mx-auto"}),e.jsx("h3",{className:"text-lg font-semibold",children:w.name}),w.price>0&&e.jsxs("p",{className:"text-3xl font-bold text-primary","data-landing-price":!0,children:["â¬",w.price]}),e.jsxs(k,{className:"w-full",size:"lg",onClick:()=>p(w.checkoutPath),style:q,"data-landing-cta":!0,children:[e.jsx(z,{className:"h-4 w-4 mr-2"}),w.price>0?a("eventPage.buyNow"):a("eventPage.accessFree")]})]})})]})]})})]})})}export{gt as default};
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.