diff --git a/.gitignore b/.gitignore index 8280acb..8ab1c22 100644 --- a/.gitignore +++ b/.gitignore @@ -35,6 +35,11 @@ # (GitUpdateService) - pro Umgebung unterschiedlich, wird automatisch geschrieben. /hifi/api/config/update-state.php +# Merker der automatischen Datenbank-Nachruestung (SchemaController::ensureCurrent) - pro +# Umgebung unterschiedlich, wird automatisch geschrieben. +/hifi/api/config/.schema-version +/hifi/api/config/.schema-version.lock + # Dateien des Download-Bereichs (Songs usw., vom Admin hochgeladen) - koennen sehr gross # sein und sind Inhalte der jeweiligen Umgebung, kein Code. Der Ordner samt Schutz-.htaccess # wird vom DownloadController beim ersten Upload selbst angelegt. diff --git a/hifi-src/src/components/Accordion.jsx b/hifi-src/src/components/Accordion.jsx index 8119f1b..0898821 100644 --- a/hifi-src/src/components/Accordion.jsx +++ b/hifi-src/src/components/Accordion.jsx @@ -1,15 +1,43 @@ import { useState } from 'react'; import { motion, AnimatePresence } from 'framer-motion'; +import { useLiveEdit } from '../context/LiveEditContext.jsx'; +import { useLanguage } from '../context/LanguageContext.jsx'; +import { EditableText } from './live/Editable.jsx'; -export default function Accordion({ items }) { +// Eintraege mit "id" (FAQ aus der Datenbank) lassen sich im Live-Bearbeiten-Modus direkt +// aendern - dann sind alle Antworten aufgeklappt und die Frage ist kein Button mehr. +export default function Accordion({ items, entity = 'faqs' }) { const [openIndex, setOpenIndex] = useState(null); + const live = useLiveEdit(); + const { language } = useLanguage(); + + if (live.canEdit(entity)) { + return ( +
- {t('galleryOverview.intro')} -
+{typeof error === 'string' ? error : errorMessage(error, t)}
} {!brands && !error &&{t('galleryOverview.loading')}
} @@ -53,12 +52,15 @@ export default function GalleryOverview() { )} - - {brand.name} - + /> ))}{t('galleryProjectPage.empty')}
@@ -79,14 +80,14 @@ export default function GalleryProjectPage() { {/* Wer hier einen Umbau sieht, der gefaellt, soll direkt anfragen koennen. */}{t('galleryProjectPage.ctaText')}
+${t('home.heroSubtitle')}
` : ''; return { - eyebrow: s[`eyebrow_${language}`] || '', - title: s[`title_${language}`] || fallbackTitle, - bodyHtml: s[`body_html_${language}`] || fallbackBody, + // Inkl. noch nicht gespeicherter Live-Aenderungen (Bearbeiten-Modus). + eyebrow: live.getValue('home_sections', slug, 'eyebrow', language, s[`eyebrow_${language}`] || ''), + title: live.getValue('home_sections', slug, 'title', language, s[`title_${language}`] || fallbackTitle), + bodyHtml: live.getValue('home_sections', slug, 'body_html', language, s[`body_html_${language}`] || fallbackBody), align: s.text_align || 'center', // Nur fuer hero/youtube genutzt (echter Hintergrund) - siehe dragAnchorStyle-Aufrufe unten. alignX: s.text_align_x, alignY: s.text_align_y, - buttonLabel: s[`button_label_${language}`] || '', - buttonUrl: s.button_url || '', + buttonLabel: live.getValue('home_sections', slug, 'button_label', language, s[`button_label_${language}`] || ''), + buttonUrl: live.getValue('home_sections', slug, 'button_url', 'de', s.button_url || ''), fontFamily: s.font_family || undefined, }; }; @@ -148,6 +176,7 @@ export default function Home() { .then((rows) => { setFaqs( rows.map((f) => ({ + id: f.id, question: language === 'de' ? f.question_de : f.question_en, answer: language === 'de' ? f.answer_de : f.answer_en, })) @@ -246,23 +275,21 @@ export default function Home() { className="fixed inset-x-0 bottom-0 z-20 border-t border-neutral-200 bg-white/95 px-4 py-3 shadow-[0_-8px_24px_rgba(0,0,0,0.08)] backdrop-blur dark:border-neutral-800 dark:bg-neutral-950/95 sm:px-6" >- {t('home.stickyCta')} -
+- {section('hero').eyebrow} -
+ {(section('hero').eyebrow || editing) && ( +- {t('home.brandsHeading')} -
+- {section('youtube').eyebrow} -
+ {(section('youtube').eyebrow || editing) && ( +{section('craft').eyebrow}
- )} -{section('advice').eyebrow}
- )} -{section('insights').eyebrow}
- )} -{t('home.reviewsText')}
+{section('more').eyebrow}
+ {(section('more').eyebrow || editing) && ( +- {t('leistungen.intro')} -
+{service.description}
+{t('leistungen.notListedText')}
+- {t('vehicleSelect.intro')} -
+{typeof error === 'string' ? error : errorMessage(error, t)}
} @@ -76,12 +75,15 @@ export default function VehicleSelect() { className="h-full w-full object-cover transition duration-300 group-hover:scale-105" /> - - {brand.name} - + /> ) : ( - {brand.name} +${l.innerHTML.replace(/\n/g,"
")}
${l.innerHTML.replace(/\n/g,"
")}
${n("home.heroSubtitle")}
`:"";return{eyebrow:U[`eyebrow_${r}`]||"",title:U[`title_${r}`]||V,bodyHtml:U[`body_html_${r}`]||ae,align:U.text_align||"center",alignX:U.text_align_x,alignY:U.text_align_y,buttonLabel:U[`button_label_${r}`]||"",buttonUrl:U.button_url||"",fontFamily:U.font_family||void 0}},g=Be("home_sections.hero.eyebrow"),v=Be("home_sections.hero.title"),k=Be("home_sections.youtube.eyebrow"),S=Be("home_sections.youtube.title"),C=Be("home_sections.youtube.button_label"),j=Be("home_sections.craft.eyebrow"),P=Be("home_sections.craft.title"),M=Be("home_sections.advice.eyebrow"),E=Be("home_sections.advice.title"),O=Be("home_sections.insights.eyebrow"),K=Be("home_sections.insights.title"),H=Be("home_sections.more.eyebrow"),$=Be("home_sections.more.title"),se=Be("home_sections.more.button_label");p.useEffect(()=>{ce.get("/home-sections").then(h).catch(()=>x(!0))},[]),p.useEffect(()=>{ce.get("/partners").then(b).catch(()=>{})},[]);const[G,X]=p.useState(null),N=G?G.reviews.filter(I=>I.review_text).map(I=>({name:I.author_name,text:I.review_text,rating:I.rating,photo:I.profile_photo_url})):n("home.testimonials");p.useEffect(()=>{ce.get("/faqs").then(I=>{d(I.map(U=>({question:r==="de"?U.question_de:U.question_en,answer:r==="de"?U.answer_de:U.answer_en})))}).catch(()=>{})},[r]),p.useEffect(()=>{ce.get("/google-reviews").then(I=>{I.rating!=null&&I.reviews.some(U=>U.review_text)&&X(I)}).catch(()=>{})},[]),nr({title:n("home.metaTitle"),description:n("home.metaDescription"),path:"/"}),p.useEffect(()=>{if(c.length===0||s("home.faq"))return;const I=document.createElement("script");return I.type="application/ld+json",I.text=JSON.stringify({"@context":"https://schema.org","@type":"FAQPage",mainEntity:c.map(U=>({"@type":"Question",name:U.question,acceptedAnswer:{"@type":"Answer",text:U.answer}}))}),document.head.appendChild(I),()=>document.head.removeChild(I)},[c]),p.useEffect(()=>{var I;c.length>0&&window.location.hash==="#faq"&&((I=document.getElementById("faq"))==null||I.scrollIntoView())},[c]);const L=p.useRef(null);p.useEffect(()=>{var we,dt,Ln;const I=L.current;if(!I)return;const U=(we=window.matchMedia)==null?void 0:we.call(window,"(prefers-reduced-motion: reduce)").matches,V=(dt=navigator.connection)==null?void 0:dt.saveData;if(U||V)return;const Se=((Ln=window.matchMedia)==null?void 0:Ln.call(window,"(max-width: 767px), (pointer: coarse)").matches)?hE:fE,te=new IntersectionObserver(([Mx])=>{Mx.isIntersecting?(I.getAttribute("src")||(I.src=Se),I.play().catch(()=>{})):I.paused||I.pause()},{rootMargin:"300px 0px"});return te.observe(I),()=>te.disconnect()},[]);const F=p.useRef(null),{scrollYProgress:T}=sx({target:F,offset:["start start","end start"]}),A=Vj(),ie=an(T,[0,1],A?["0%","0%"]:["-6%","6%"]),z=an(T,[0,1],A?["0%","0%"]:["0%","60%"]),de=an(T,[0,.8],[1,0]),oe=an(T,[.5,1],[0,1]),re=an(oe,I=>I>.05?"auto":"none"),De=an(T,[.5,1],[16,0]);return l.jsxs("div",{children:[l.jsx(Kt.div,{style:{opacity:oe,pointerEvents:re,y:De},className:"fixed inset-x-0 bottom-0 z-20 border-t border-neutral-200 bg-white/95 px-4 py-3 shadow-[0_-8px_24px_rgba(0,0,0,0.08)] backdrop-blur dark:border-neutral-800 dark:bg-neutral-950/95 sm:px-6",children:l.jsxs("div",{className:"mx-auto flex max-w-6xl items-center justify-between gap-3",children:[l.jsx("p",{className:"hidden text-sm font-medium text-neutral-600 dark:text-neutral-300 sm:block",children:n("home.stickyCta")}),l.jsxs("div",{className:"flex w-full gap-3 sm:w-auto",children:[i&&l.jsx(W,{to:"/fahrzeuge",className:"flex-1 rounded-md bg-brand-500 px-5 py-2.5 text-center text-sm font-semibold text-white shadow-sm transition hover:-translate-y-0.5 hover:bg-brand-600 sm:flex-none",children:n("home.selectVehicle")}),l.jsx(W,{to:"/kontakt",className:"flex-1 rounded-md border border-neutral-300 px-5 py-2.5 text-center text-sm font-semibold text-neutral-700 transition hover:-translate-y-0.5 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-200 dark:hover:bg-neutral-800 sm:flex-none",children:n("home.getInTouch")})]})]})}),l.jsxs("section",{ref:F,className:"relative -mt-[89px] h-svh min-h-[560px] overflow-hidden sm:-mt-[97px]",children:[l.jsx(Kt.img,{style:{y:ie,scale:1.15},src:t,alt:n("home.heroImageAlt"),className:"absolute inset-0 h-full w-full object-cover"}),l.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-neutral-950 via-neutral-950/80 to-neutral-950/40"}),l.jsx(Kt.div,{style:{y:z,opacity:de},className:"absolute inset-0",children:l.jsx("div",{className:"absolute w-full max-w-2xl px-4 text-center sm:px-6",style:{...Vm(m("hero").alignX,m("hero").alignY,{x:50,y:50}),fontFamily:m("hero").fontFamily},children:l.jsxs(Kt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.7,ease:"easeOut"},children:[m("hero").eyebrow&&l.jsx("p",{className:"mb-3 text-sm font-semibold uppercase tracking-wide text-brand-400",style:g,children:m("hero").eyebrow}),l.jsx("h1",{className:"text-3xl font-extrabold tracking-tight text-white sm:text-5xl",style:v,children:m("hero").title}),l.jsx("div",{className:"legal-content mx-auto mt-4 max-w-2xl text-base text-neutral-200 sm:text-lg",dangerouslySetInnerHTML:{__html:m("hero").bodyHtml}}),l.jsxs("div",{className:"mt-8 flex flex-wrap items-center justify-center gap-3",children:[i&&l.jsx(W,{to:"/fahrzeuge",className:"rounded-md bg-brand-500 px-6 py-3 text-sm font-semibold text-white shadow-sm transition hover:-translate-y-0.5 hover:bg-brand-600 hover:shadow-lg",children:n("home.selectVehicle")}),l.jsx(W,{to:"/kontakt",className:"rounded-md border border-white/30 bg-white/10 px-6 py-3 text-sm font-semibold text-white backdrop-blur transition hover:-translate-y-0.5 hover:bg-white/20",children:n("home.getInTouch")})]})]})})})]}),!s("home.stats")&&l.jsx("section",{className:"border-b border-neutral-200 bg-neutral-950 py-8 dark:border-neutral-800",children:l.jsx("div",{className:"mx-auto grid max-w-6xl grid-cols-2 gap-6 px-4 text-center sm:grid-cols-4 sm:px-6",children:o.map((I,U)=>l.jsxs(ze,{index:U,children:[l.jsx("p",{className:"text-2xl font-extrabold text-brand-400 sm:text-3xl",children:I.value}),l.jsx("p",{className:"text-sm text-neutral-400",children:I.label})]},I.label))})}),!s("home.partners")&&l.jsx("section",{className:"border-b border-neutral-200 py-8 dark:border-neutral-800",children:l.jsxs("div",{className:"mx-auto max-w-6xl px-4 sm:px-6",children:[l.jsx("p",{className:"mb-4 text-center text-xs font-semibold uppercase tracking-wide text-neutral-400",children:n("home.brandsHeading")}),l.jsx("div",{className:"flex flex-wrap items-center justify-center gap-x-8 gap-y-3",children:w.map((I,U)=>l.jsx(ze,{index:U,children:I.logo_path?l.jsx("img",{src:I.logo_path,alt:I.name,className:"h-8 max-w-[8rem] object-contain opacity-70 grayscale transition hover:opacity-100 hover:grayscale-0"}):l.jsx("span",{className:"text-lg font-bold text-neutral-400 dark:text-neutral-600",children:I.name})},I.id))})]})}),!s("home.youtube")&&l.jsxs("section",{className:"relative min-h-[70vh] overflow-hidden sm:min-h-[85vh]",children:[l.jsx("video",{ref:L,loop:!0,muted:!0,playsInline:!0,preload:"none",poster:_x,className:"absolute inset-0 h-full w-full object-cover"}),l.jsx("div",{className:"absolute inset-0 bg-black/55"}),l.jsx("div",{className:"absolute w-full max-w-3xl px-4 text-center sm:px-6",style:{...Vm(m("youtube").alignX,m("youtube").alignY,{x:50,y:50}),fontFamily:m("youtube").fontFamily},children:l.jsxs(ze,{children:[m("youtube").eyebrow&&l.jsx("p",{className:"mb-4 text-xs font-semibold uppercase tracking-[0.2em] text-neutral-200 sm:text-sm",style:k,children:m("youtube").eyebrow}),l.jsx("h2",{className:"text-3xl font-bold uppercase tracking-wide text-white sm:text-5xl",style:S,children:m("youtube").title}),l.jsx("div",{className:"legal-content mt-4 text-xs font-semibold uppercase tracking-wide text-neutral-200 sm:text-sm",dangerouslySetInnerHTML:{__html:m("youtube").bodyHtml}}),l.jsx(Fm,{label:m("youtube").buttonLabel,url:m("youtube").buttonUrl,className:"mt-8 inline-flex items-center justify-center rounded-full bg-white px-8 py-3 text-xs font-bold uppercase tracking-wide text-neutral-900 transition hover:-translate-y-0.5 hover:bg-neutral-100",style:C})]})})]}),!s("home.craft")&&l.jsx("section",{className:"grain-band border-y border-neutral-200 bg-neutral-50 py-16 dark:border-neutral-800 dark:bg-neutral-900/40",children:l.jsxs("div",{className:"mx-auto max-w-6xl space-y-16 overflow-hidden px-4 sm:px-6",children:[l.jsxs("div",{className:"grid items-center gap-8 md:grid-cols-2",children:[l.jsx(ze,{direction:"left",shine:!0,className:"rounded-xl shadow-lg",children:l.jsx("img",{src:Nx,alt:n("home.craftImageAlt"),width:900,height:600,className:"w-full rounded-xl object-cover",style:{maxHeight:380}})}),l.jsxs(ze,{direction:"right",index:1,className:Mi[m("craft").align],style:{fontFamily:m("craft").fontFamily},children:[m("craft").eyebrow&&l.jsx("p",{className:"mb-2 text-sm font-semibold uppercase tracking-wide text-brand-600 dark:text-brand-400",style:j,children:m("craft").eyebrow}),l.jsx("h2",{className:"mb-3 text-2xl font-bold text-neutral-900 dark:text-white",style:P,children:m("craft").title}),l.jsx("div",{className:"legal-content text-neutral-600 dark:text-neutral-300",dangerouslySetInnerHTML:{__html:m("craft").bodyHtml}})]})]}),l.jsxs("div",{className:"grid items-center gap-8 md:grid-cols-2",children:[l.jsxs(ze,{direction:"left",className:`order-2 md:order-1 ${Mi[m("advice").align]}`,style:{fontFamily:m("advice").fontFamily},children:[m("advice").eyebrow&&l.jsx("p",{className:"mb-2 text-sm font-semibold uppercase tracking-wide text-brand-600 dark:text-brand-400",style:M,children:m("advice").eyebrow}),l.jsx("h2",{className:"mb-3 text-2xl font-bold text-neutral-900 dark:text-white",style:E,children:m("advice").title}),l.jsx("div",{className:"legal-content text-neutral-600 dark:text-neutral-300",dangerouslySetInnerHTML:{__html:m("advice").bodyHtml}})]}),l.jsx(ze,{direction:"right",index:1,shine:!0,className:"order-1 md:order-2 rounded-xl shadow-lg",children:l.jsx("img",{src:Ex,alt:n("home.adviceImageAlt"),width:900,height:600,className:"w-full rounded-xl object-cover",style:{maxHeight:380}})})]})]})}),!s("home.insights")&&l.jsxs("section",{className:"mx-auto max-w-6xl px-4 py-16 sm:px-6",children:[l.jsxs(ze,{className:`mb-8 ${Mi[m("insights").align]}`,style:{fontFamily:m("insights").fontFamily},children:[m("insights").eyebrow&&l.jsx("p",{className:"mb-2 text-sm font-semibold uppercase tracking-wide text-brand-600 dark:text-brand-400",style:O,children:m("insights").eyebrow}),l.jsx("h2",{className:"text-2xl font-bold text-neutral-900 dark:text-white",style:K,children:m("insights").title}),l.jsx("div",{className:"legal-content mt-2 text-neutral-600 dark:text-neutral-300",dangerouslySetInnerHTML:{__html:m("insights").bodyHtml}})]}),l.jsx("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3",children:u.map((I,U)=>l.jsx(ze,{index:U%3,shine:!0,className:"aspect-square overflow-hidden rounded-xl border border-neutral-200 dark:border-neutral-800",children:l.jsx("img",{src:I.src,alt:I.alt,width:I.width,height:I.height,loading:"lazy",className:"h-full w-full object-cover transition duration-300 hover:scale-105"})},I.src))})]}),!s("home.reviews")&&l.jsx("section",{className:"grain-band border-y border-neutral-200 bg-neutral-50 py-16 dark:border-neutral-800 dark:bg-neutral-900/40",children:l.jsxs("div",{className:"mx-auto max-w-6xl px-4 sm:px-6",children:[l.jsxs(ze,{className:"mb-10 text-center",children:[l.jsx("div",{className:"mb-2 flex items-center justify-center gap-2",children:l.jsx(Tx,{className:"h-6 w-6",count:G?Math.round(G.rating):5})}),l.jsx("h2",{className:"text-2xl font-bold text-neutral-900 dark:text-white",children:G?n("home.reviewsRatingDynamic")(G.rating,G.rating_count):n("home.reviewsRating")}),l.jsx("p",{className:"mt-1 text-neutral-600 dark:text-neutral-300",children:n("home.reviewsText")}),l.jsx("a",{href:"https://www.google.com/maps/search/?api=1&query=Hifi+Planet+Amorbach+Boxbrunner+Stra%C3%9Fe+20a",target:"_blank",rel:"noopener noreferrer",className:"mt-2 inline-block text-sm font-medium text-brand-600 hover:underline dark:text-brand-400",children:n("home.reviewsLink")})]}),l.jsx(ze,{children:l.jsx(oE,{testimonials:N})})]})}),!s("home.more")&&l.jsx("section",{className:"mx-auto max-w-6xl overflow-hidden px-4 py-16 sm:px-6",children:l.jsxs("div",{className:"grid items-center gap-10 md:grid-cols-2",children:[l.jsx(ze,{direction:"left",shine:!0,className:"overflow-hidden rounded-xl shadow-lg",children:l.jsx("img",{src:dE,alt:n("home.moreImageAlt"),width:1600,height:905,className:"h-full w-full object-cover",loading:"lazy"})}),l.jsxs(ze,{direction:"right",index:1,className:`rounded-xl border border-neutral-200 bg-white p-8 shadow-sm dark:border-neutral-800 dark:bg-neutral-900 ${Mi[m("more").align]}`,style:{fontFamily:m("more").fontFamily},children:[m("more").eyebrow&&l.jsx("p",{className:"mb-2 text-sm font-semibold uppercase tracking-wide text-brand-600 dark:text-brand-400",style:H,children:m("more").eyebrow}),l.jsx("h2",{className:"mb-3 text-2xl font-bold text-neutral-900 dark:text-white",style:$,children:m("more").title}),l.jsx("div",{className:`legal-content mb-8 max-w-2xl text-neutral-600 dark:text-neutral-300 ${mE[m("more").align]}`,dangerouslySetInnerHTML:{__html:m("more").bodyHtml}}),l.jsx(Fm,{label:m("more").buttonLabel,url:m("more").buttonUrl,className:"inline-block rounded-md border border-neutral-300 px-6 py-3 text-sm font-semibold text-neutral-700 transition hover:-translate-y-0.5 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-200 dark:hover:bg-neutral-800",style:se})]})]})}),!s("home.faq")&&l.jsx("section",{id:"faq",className:"scroll-mt-20 border-t border-neutral-300 py-16 dark:border-neutral-700",children:l.jsxs("div",{className:"mx-auto max-w-3xl px-4 sm:px-6",children:[l.jsx(ze,{className:"mb-8 text-center",children:l.jsx("h2",{className:"text-2xl font-bold text-neutral-900 dark:text-white",children:n("home.faqHeading")})}),l.jsx(ze,{index:1,children:l.jsx(sE,{items:c})})]})})]})}function ma(e,t){return e?e.code==="rate_limited"||e.status===429?t("errors.rateLimited"):e.code==="invalid_input"||e.status===422?t("errors.invalidInput"):e.status===404?t("errors.notFound"):e.status===503?t("errors.maintenance"):e.status>=500?t("errors.server"):e.status?t("errors.generic"):t("errors.network"):""}function xE(){const[e,t]=p.useState(null),[n,r]=p.useState(null),s=fa(),{t:i}=rt(),o=Cd(),{vehicle_tile_width:a,vehicle_tile_height:u}=Lt(),c={width:`${a}px`,height:`${u}px`};return nr({title:i("vehicleSelect.metaTitle"),description:i("vehicleSelect.metaDescription"),path:"/fahrzeuge"}),p.useEffect(()=>{s.vehicles.enabled&&!s.bypass||ce.get("/brands").then(t).catch(d=>r(d))},[s.vehicles.enabled,s.bypass]),s.vehicles.enabled&&!s.bypass?l.jsx(oi,{message:s.vehicles.message}):l.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-12 sm:px-6",children:[s.vehicles.enabled&&s.bypass&&l.jsx(ai,{inline:!0}),l.jsx("h1",{className:"mb-2 text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl",children:i("vehicleSelect.title")}),l.jsx("p",{className:"mb-8 text-neutral-600 dark:text-neutral-300",children:i("vehicleSelect.intro")}),n&&l.jsx("p",{className:"text-red-600",children:typeof n=="string"?n:ma(n,i)}),e===null&&!n&&l.jsx("div",{className:"flex flex-wrap gap-4","aria-busy":"true","aria-label":i("vehicleSelect.loading"),children:Array.from({length:6},(d,f)=>l.jsx("div",{style:c,className:"shrink-0 animate-pulse rounded-xl bg-neutral-200 dark:bg-neutral-800"},f))}),(e==null?void 0:e.length)===0&&!n&&l.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:i("vehicleSelect.empty")}),l.jsx("div",{className:"flex flex-wrap gap-4",children:(e||[]).map(d=>d.image_path?l.jsxs(W,{to:`/fahrzeuge/${d.slug}`,style:c,className:"group relative block shrink-0 overflow-hidden rounded-xl bg-neutral-900 shadow-sm transition hover:shadow-lg",children:[l.jsx("img",{src:d.image_path,alt:"",loading:"lazy",decoding:"async",width:a,height:u,className:"h-full w-full object-cover transition duration-300 group-hover:scale-105"}),l.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/85 via-black/10 to-transparent transition group-hover:from-black/95"}),l.jsx("span",{className:"absolute inset-x-0 bottom-0 p-4 text-center text-lg font-extrabold text-white",style:Jn(o,`brands.${d.id}.name`),children:d.name})]},d.id):l.jsx(W,{to:`/fahrzeuge/${d.slug}`,style:c,className:"flex shrink-0 flex-col items-center justify-center gap-3 rounded-xl border border-neutral-200 bg-white px-6 text-center font-semibold text-neutral-800 shadow-sm transition hover:-translate-y-0.5 hover:border-brand-500 hover:shadow-md dark:border-neutral-800 dark:bg-neutral-900 dark:text-neutral-100",children:l.jsx("span",{style:Jn(o,`brands.${d.id}.name`),children:d.name})},d.id))})]})}function Ed(){const{t:e}=rt(),{phone:t}=Lt(),n=da();return nr({title:e("notFound.metaTitle"),noindex:!0}),l.jsxs("div",{className:"mx-auto max-w-2xl px-4 py-20 text-center sm:px-6",children:[l.jsx("p",{className:"text-sm font-semibold uppercase tracking-[4px] text-brand-500",children:"404"}),l.jsx("h1",{className:"mt-3 text-3xl font-bold text-neutral-900 dark:text-white sm:text-4xl",children:e("notFound.title")}),l.jsx("p",{className:"mx-auto mt-4 max-w-md text-neutral-600 dark:text-neutral-300",children:e("notFound.text")}),l.jsxs("div",{className:"mt-10 flex flex-wrap justify-center gap-3",children:[!n("page.vehicles")&&l.jsxs(W,{to:"/fahrzeuge",className:"inline-flex items-center gap-2 rounded-md bg-brand-500 px-5 py-3 text-sm font-semibold text-white shadow-sm hover:bg-brand-600",children:[l.jsx(Oo,{className:"h-4 w-4"}),e("notFound.toVehicles")]}),l.jsxs(W,{to:"/kontakt",className:"inline-flex items-center gap-2 rounded-md border border-neutral-300 px-5 py-3 text-sm font-semibold text-neutral-700 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-200 dark:hover:bg-neutral-800",children:[l.jsx(zu,{className:"h-4 w-4"}),e("notFound.toContact")]}),t&&l.jsxs("a",{href:Sd(t),className:"inline-flex items-center gap-2 rounded-md border border-neutral-300 px-5 py-3 text-sm font-semibold text-neutral-700 hover:bg-neutral-100 dark:border-neutral-700 dark:text-neutral-200 dark:hover:bg-neutral-800",children:[l.jsx(Or,{className:"h-4 w-4"}),t]})]}),l.jsx(W,{to:"/",className:"mt-8 inline-block text-sm text-neutral-500 underline hover:text-brand-500",children:e("notFound.toHome")})]})}function vE(){const{brandSlug:e}=Bc(),[t,n]=p.useState(null),[r,s]=p.useState(null),i=fa(),{t:o}=rt(),a=Cd(),u=Be(t?`brands.${t.brand.id}.name`:""),{vehicle_tile_width:c,vehicle_tile_height:d}=Lt(),f={width:`${c}px`,height:`${d}px`};return p.useEffect(()=>{i.vehicles.enabled&&!i.bypass||ce.get(`/brands/${e}/models`).then(n).catch(h=>s(h))},[e,i.vehicles.enabled,i.bypass]),nr({title:t?`${t.brand.name} ${o("brandPage.titleSuffix")}`:o("brandPage.metaTitleFallback"),description:t?o("brandPage.metaDescription")(t.brand.name):void 0,path:`/fahrzeuge/${e}`}),i.vehicles.enabled&&!i.bypass?l.jsx(oi,{message:i.vehicles.message}):r?r.status===404?l.jsx(Ed,{}):l.jsx("p",{className:"mx-auto max-w-6xl px-4 py-12 text-red-600 sm:px-6",children:ma(r,o)}):t?l.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-12 sm:px-6",children:[i.vehicles.enabled&&i.bypass&&l.jsx(ai,{inline:!0}),l.jsxs("p",{className:"mb-1 text-sm text-neutral-500 dark:text-neutral-400",children:[l.jsx(W,{to:"/fahrzeuge",className:"hover:text-brand-500",children:o("brandPage.breadcrumbVehicles")})," / ",l.jsx("span",{style:u,children:t.brand.name})]}),l.jsxs("h1",{className:"mb-8 text-2xl font-bold text-neutral-900 dark:text-white sm:text-3xl",children:[l.jsx("span",{style:u,children:t.brand.name})," – ",o("brandPage.titleSuffix")]}),t.models.length===0&&l.jsx("p",{className:"text-neutral-500 dark:text-neutral-400",children:o("brandPage.empty")}),l.jsx("div",{className:"flex flex-wrap gap-4",children:t.models.map(h=>h.image_path?l.jsxs(W,{to:`/fahrzeuge/${e}/${h.slug}`,style:f,className:"group relative block shrink-0 overflow-hidden rounded-xl bg-neutral-900 shadow-sm transition hover:shadow-lg",children:[l.jsx("img",{src:h.image_path,alt:"",loading:"lazy",decoding:"async",width:c,height:d,className:"h-full w-full object-cover transition duration-300 group-hover:scale-105"}),l.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/85 via-black/10 to-transparent transition group-hover:from-black/95"}),l.jsx("span",{className:"absolute inset-x-0 bottom-0 p-4 text-center text-lg font-extrabold text-white",style:Jn(a,`car_models.${h.id}.name`),children:h.name})]},h.id):l.jsx(W,{to:`/fahrzeuge/${e}/${h.slug}`,style:f,className:"flex shrink-0 flex-col items-center justify-center gap-3 rounded-xl border border-neutral-200 bg-white px-6 text-center font-semibold text-neutral-800 shadow-sm transition hover:-translate-y-0.5 hover:border-brand-500 hover:shadow-md dark:border-neutral-800 dark:bg-neutral-900 dark:text-neutral-100",children:l.jsx("span",{style:Jn(a,`car_models.${h.id}.name`),children:h.name})},h.id))})]}):l.jsx("p",{className:"mx-auto max-w-6xl px-4 py-12 text-neutral-500 sm:px-6",children:o("brandPage.loading")})}function wE({text:e}){return e?e.split(/(\*\*[^*]+\*\*)/g).map((n,r)=>{const s=n.match(/^\*\*([^*]+)\*\*$/);return s?l.jsx("strong",{children:s[1]},r):l.jsx("span",{children:n},r)}):null}const Om="data:image/webp;base64,UklGRmoNAABXRUJQVlA4IF4NAAAQjACdASrgAVYDPlEok0ajoqGhIRK4IHAKCWlu/F+5xDCoDux8VXNtc99B5Uf715Q+k/+V6E/yD7bfvf7tYI7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T243ZhLnyOIlreUrMQAfwR/oYt+ljnDFKqa5PEczDPa+u/vWmR6UM+Q/lLFiIlgBJTfaekWoeLpPd9FPN4gIHzK1ZS8kDHyq3lh/e6FQ84a4Zg6JlfQC/qhAAAAA==",kE="/assets/base-BKOm0Bib.webp",bE="/assets/clear-DZZMSrMX.webp",SE="/assets/drive-BE2W1yna.webp",PE="/assets/prime-BTVNe2Gb.webp",jE="/assets/elite_r-BRvz_pyr.webp",CE="/assets/apex-CFy2qup8.webp",TE="/assets/statement-pTO-wTPx.webp",EE="/assets/limitless-DDs0S_PU.webp";function Pn(e,t,n){if(!e)return"";if(n==="en"){const r=e[`${t}_en`];if(r)return r}return e[t]}const NE=(e,t,n)=>{t/=100,n/=100;const r=o=>(o+e/30)%12,s=t*Math.min(n,1-n),i=o=>n-s*Math.max(-1,Math.min(r(o)-3,Math.min(9-r(o),1)));return[Math.round(i(0)*255),Math.round(i(8)*255),Math.round(i(4)*255)]},cl=(e,t,n)=>`rgb(${NE(e,t,n).join(", ")})`,zm=e=>e.map(([t,n,r,s,i,o])=>({bgTop:cl(t,n,r),border:cl(t,n,r+8),accent:cl(s,i,o),img:null})),Bm={graphite:[{accent:"#b6b6b6",border:"#2a2a2a",bgTop:"#1c1c1c",img:kE},{accent:"#d3d3d3",border:"#2e2e2e",bgTop:"#212121",img:bE},{accent:"#8fb8bd",border:"#26383b",bgTop:"#16282b",img:SE},{accent:"#6fbf73",border:"#1f3a24",bgTop:"#122916",img:PE},{accent:"#63d34f",border:"#204a1c",bgTop:"#123312",img:jE},{accent:"#8bea3c",border:"#2b5518",bgTop:"#173a0f",img:CE},{accent:"#d9a83c",border:"#4a3a16",bgTop:"#33270d",img:TE},{accent:"#f2c14e",border:"#5a4718",bgTop:"#3d2f0c",img:EE}],"deep-blue":zm([[215,18,11,210,15,60],[212,25,11,208,32,60],[210,38,12,206,46,60],[212,46,12,205,56,61],[214,52,12,205,63,62],[216,58,12,205,68,63],[220,62,12,212,73,65],[226,66,12,216,78,68]]),"warm-bronze":zm([[30,15,11,34,22,60],[34,32,11,34,46,60],[32,46,12,30,58,60],[26,52,12,24,65,60],[20,55,12,18,68,60],[14,55,12,12,68,61],[8,52,12,6,64,62],[2,50,12,358,60,63]])},_E="#f2f2f2",Hm="#8a8a8a",ME="#c4c4c4",$m=5,LE=3,AE={recommended:{Icon:qC,className:"bg-brand-500 text-white"},popular:{Icon:PC,className:"bg-amber-400 text-neutral-950"},tip:{Icon:EC,className:"bg-sky-500 text-white"},coming_soon:{Icon:ux,className:"bg-white text-neutral-900"},custom:{Icon:null,className:"bg-brand-500 text-white"}};function DE({pkg:e,tier:t,tierT:n,layout:r,bullets:s,formatPrice:i,contactUrl:o,priceNote:a,t:u}){const[c,d]=p.useState(!1),[f,h]=p.useState(!1),y=p.useRef(null),x=s.length-$m,w=c?s:s.slice(0,$m);p.useLayoutEffect(()=>{const P=y.current;if(!P||c){h(!1);return}const M=()=>h([...P.querySelectorAll("[data-clamp]")].some(O=>O.scrollHeight>O.clientHeight+1));M();const E=new ResizeObserver(M);return E.observe(P),()=>E.disconnect()},[c,s.length,e.description]);const b=Cd(),m=Jn(b,`packages.${e.id}.description`),g=Jn(b,`packages.${e.id}.price_text`),{package_card_height:v}=Lt(),k=AE[e.badge],S=r!=="grid",C=e.badge==="custom"?e.badge_text:e.badge&&u(`modelPage.badges.${e.badge}`),j=t.img?null:{backgroundColor:t.accent,WebkitMaskImage:`url(${Om})`,maskImage:`url(${Om})`,maskMode:"luminance",WebkitMaskSize:"cover",maskSize:"cover",WebkitMaskPosition:"center",maskPosition:"center",WebkitMaskRepeat:"no-repeat",maskRepeat:"no-repeat"};return l.jsxs("div",{style:{borderColor:t.border,background:`linear-gradient(180deg, ${t.bgTop} 0%, #0b0b0b 55%, #080808 100%)`,...S?{gridRow:"span 4",gridTemplateRows:"subgrid",rowGap:0}:{minHeight:`${v}px`}},className:r==="strip"?"relative grid snap-start overflow-hidden rounded-[18px] border shadow-xl shadow-neutral-900/20 dark:shadow-black/40":r==="coverflow"?"relative grid snap-center overflow-hidden rounded-[18px] border shadow-xl shadow-neutral-900/20 will-change-transform dark:shadow-black/40":"relative flex flex-col overflow-hidden rounded-[18px] border shadow-xl shadow-neutral-900/20 dark:shadow-black/40",children:[t.img?l.jsx("img",{src:t.img,alt:"","aria-hidden":"true",className:"pointer-events-none absolute inset-0 h-full w-full object-cover"}):l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"pointer-events-none absolute inset-0",style:{...j,opacity:.2+n*.45,filter:"blur(18px)"},"aria-hidden":"true"}),l.jsx("div",{className:"pointer-events-none absolute inset-0",style:{...j,opacity:.55+n*.45},"aria-hidden":"true"})]}),k&&C&&l.jsxs("span",{className:`absolute top-2 left-1/2 z-10 flex max-w-[calc(100%-16px)] -translate-x-1/2 items-center gap-1 whitespace-nowrap rounded-full px-3 py-1 text-xs font-bold shadow ${k.className}`,children:[k.Icon&&l.jsx(k.Icon,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":"true"}),l.jsx("span",{className:"truncate",children:C})]}),l.jsxs("div",{className:"relative z-10 text-center",style:{padding:"34px 20px 0",gridRow:1},children:[l.jsx("div",{style:{fontFamily:"'Barlow Condensed', sans-serif",fontSize:"30px",letterSpacing:"3px",fontWeight:600,color:t.accent,textTransform:"uppercase",lineHeight:1.1},children:e.name}),l.jsx("div",{style:{width:"44px",height:"2px",margin:"14px auto 0",background:`linear-gradient(90deg, rgba(255,255,255,0) 0%, ${t.accent} 50%, rgba(255,255,255,0) 100%)`}})]}),s.length>0&&l.jsxs("div",{className:"relative z-10",style:{gridRow:2,padding:"18px 20px 14px",background:c?"linear-gradient(180deg, rgba(8,8,8,0.7) 0%, rgba(8,8,8,0.62) 94%, rgba(8,8,8,0) 100%)":"linear-gradient(180deg, rgba(8,8,8,0.55) 0%, rgba(8,8,8,0.48) 92%, rgba(8,8,8,0) 100%)"},children:[l.jsx("ul",{ref:y,className:"space-y-1.5 text-left",children:w.map((P,M)=>l.jsxs("li",{className:"flex items-start gap-2",style:{fontSize:"13px",color:ME,...P.fromDescription?m:null},children:[l.jsx(aC,{className:"mt-0.5 h-3.5 w-3.5 shrink-0",style:{color:t.accent}}),l.jsx("span",{"data-clamp":!0,className:"leading-snug",style:c?void 0:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:LE,overflow:"hidden"},children:P.fromDescription?l.jsx(wE,{text:P.text}):P.text})]},M))}),(c||x>0||f)&&l.jsxs("button",{type:"button",onClick:()=>d(P=>!P),className:"mt-2.5 flex items-center gap-1 hover:opacity-80",style:{fontSize:"13px",color:t.accent},children:[c?u("modelPage.lessBullets"):x>0?u("modelPage.moreBullets")(x):u("modelPage.showMore"),c?l.jsx(pC,{className:"h-3.5 w-3.5"}):l.jsx(uC,{className:"h-3.5 w-3.5"})]})]}),l.jsx("div",{className:"relative z-10 flex-1",style:{gridRow:3}}),l.jsx("div",{className:"relative z-10",style:{gridRow:4,padding:"20px 20px 28px",background:"linear-gradient(180deg, rgba(8,8,8,0) 0%, rgba(8,8,8,0.85) 45%, rgba(8,8,8,0.95) 100%)"},children:l.jsxs("div",{className:"text-center",children:[!e.price_text&&l.jsx("div",{style:{fontSize:"13px",color:Hm},children:u("modelPage.totalPrice")}),l.jsx("div",{style:{marginTop:"4px",fontFamily:"'Barlow Condensed', sans-serif",fontSize:"30px",fontWeight:600,letterSpacing:"1px",color:_E,...e.price_text?g:null},children:e.price_text||i(e.total_price)}),!e.price_text&&a&&l.jsx("div",{style:{marginTop:"2px",fontSize:"11px",color:Hm},children:a}),l.jsx(W,{to:o(e),onClick:()=>Sn("select_package",{package_name:e.name,value:Number(e.total_price)||void 0,currency:"EUR"}),className:"mt-4 inline-block rounded-md bg-brand-500 px-4 py-2 text-center text-sm font-semibold text-white shadow-lg shadow-brand-500/30 hover:bg-brand-400",children:u("modelPage.requestContact")}),e.video_url&&l.jsx("div",{className:"mt-3",children:l.jsxs("a",{href:e.video_url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 rounded-full border border-white/15 bg-white/5 px-3 py-1 text-xs font-semibold text-white transition hover:bg-white/15",children:[l.jsx(yC,{className:"h-4 w-4 text-red-500","aria-hidden":"true"}),u("modelPage.videoLink")]})})]})})]})}function RE(){const{brandSlug:e,modelSlug:t}=Bc(),[n,r]=p.useState(null),[s,i]=p.useState(null),o=fa(),{t:a,language:u}=rt(),{package_card_theme:c,package_card_layout:d,package_wheel_hint_interval:f,package_card_width:h,package_card_height:y,phone:x,whatsapp:w,price_note:b,price_note_en:m}=Lt(),g=u==="en"&&m||b,v=Bm[c]||Bm.graphite,k=["grid","strip","coverflow"].includes(d)?d:"strip",S=Math.max(2,Number(f)||8)*1e3,C=p.useRef(null),j=p.useRef(null),P=p.useRef(null),[M,E]=p.useState(!1),O=T=>new Intl.NumberFormat(u==="de"?"de-DE":"en-US",{style:"currency",currency:"EUR"}).format(T);p.useEffect(()=>{o.vehicles.enabled&&!o.bypass||ce.get(`/models/${e}/${t}/packages`).then(r).catch(T=>i(T))},[e,t,o.vehicles.enabled,o.bypass]),p.useEffect(()=>{const T=C.current;if(k!=="coverflow"||!T)return;let A=0;const ie=()=>{A=0;const oe=T.scrollLeft+T.clientWidth/2;for(const re of T.children){const De=re.offsetLeft+re.offsetWidth/2,I=Math.max(-1,Math.min(1,(De-oe)/(re.offsetWidth*1.4))),U=Math.abs(I);re.style.transform=`rotateY(${(-I*35).toFixed(2)}deg) scale(${(1-U*.13).toFixed(3)}) translateZ(${(-U*60).toFixed(1)}px)`,re.style.zIndex=String(100-Math.round(U*50))}},z=()=>{A||(A=requestAnimationFrame(ie))};ie(),T.addEventListener("scroll",z,{passive:!0});const de=new ResizeObserver(z);return de.observe(T),()=>{T.removeEventListener("scroll",z),de.disconnect(),cancelAnimationFrame(A)}},[k,n]),p.useEffect(()=>{const T=C.current;if(k==="grid"||!T)return;const A=window.matchMedia("(pointer: coarse)").matches;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;let z=[],de=0;const oe=()=>{const De=Math.min(T.clientWidth*.4,160);z.push(setTimeout(()=>T.scrollTo({left:De,behavior:"smooth"}),500)),z.push(setTimeout(()=>T.scrollTo({left:0,behavior:"smooth"}),1250)),A||(z.push(setTimeout(()=>E(!0),450)),z.push(setTimeout(()=>E(!1),1700)))},re=new IntersectionObserver(([De])=>{De.isIntersecting&&(re.disconnect(),oe(),de=setInterval(()=>{T.scrollLeft<=1&&oe()},S))},{threshold:.35});return re.observe(T),()=>{re.disconnect(),clearInterval(de),z.forEach(clearTimeout)}},[k,n,S]),p.useEffect(()=>{const T=C.current;if(k==="grid"||!T)return;let A=0,ie=0,z=!1,de=0,oe=0;const re=()=>[...T.children].map(V=>V.offsetLeft+V.offsetWidth/2),De=(V,ae)=>{let Se=0,te=1/0;return V.forEach((we,dt)=>{const Ln=Math.abs(we-ae);Lnthis.bindToMotionValue(i,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Td.current||Rx(),this.shouldReduceMotion=$o.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),kt(this.notifyUpdate),kt(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&gx.has(t)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:u,ease:c,duration:d}=n.accelerate,f=new mx({element:this.current,name:t,keyframes:a,times:u,ease:c,duration:ct(d)}),h=o(f);this.valueSubscriptions.set(t,()=>{h(),f.cancel()});return}const r=ts.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&Q.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),i&&i()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Ho){const n=Ho[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Te()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r ${n("home.heroSubtitle")}Vh&&(t.x=1),t.yr