PageSourceSearch

https://zdravi-bez-leku.macaly.app/assets/index-g_kMCqhT.js

js zdravi-bez-leku.macaly.app collected 2026-10-03 04:59:17 UTC 50,791 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/react-pdf.browser-BbJfp6lg.js","assets/index-CdBje7Uw.js","assets/index-BAhDNXT6.css"])))=>i.map(i=>d[i]);
2import{r as m,l as V,t as G,n as ie,m as e,S as q,L as W,C as Q,h as _,F as le,A as de,_ as ce,u as R,d as B,c as X,f as me,W as U,k as ue,b as J,s as xe,j as pe}from"./index-CdBje7Uw.js";import{g,r as he,v as Y,n as ee,D as be}from"./DiscountConfirmationBanner-BR6SyPqF.js";function $(t){const s=m.useMemo(()=>V(t._argsJSON),[t._argsJSON]),o=m.useMemo(()=>V(t._valueJSON),[t._valueJSON]),a=G(ie(t._name),s);return a===void 0?o:a}function fe({banner:t}){const[s,o]=m.useState(!1),a=t.code?.trim(),d=t.codeLabel?.trim()||"Dnešní slevový kód",i=t.imageUrl?.trim(),l=t.buttonLabel?.trim(),c=t.buttonUrl?.trim(),b=t.text?.trim();async function h(){if(a)try{await navigator.clipboard.writeText(a),o(!0),g("copy_discount_code",{location:"hero_banner",code:a}),setTimeout(()=>o(!1),2e3)}catch{o(!1)}}return e.jsxs("aside",{"aria-label":t.title,className:"flex flex-col gap-3 rounded-2xl border border-border bg-card p-5 shadow-sm lg:sticky lg:top-6",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-egg px-2.5 py-0.5 text-xs font-semibold text-orange-deep",children:[e.jsx("span",{"aria-hidden":!0,children:"⚡"})," Akce"]}),e.jsx("span",{className:"text-xs text-ink-soft",children:"dnes"})]}),i&&e.jsx("img",{src:i,alt:"",loading:"eager",className:"w-full rounded-xl object-contain"}),e.jsx("h2",{className:"text-lg font-bold text-brand-deep",children:t.title}),b&&e.jsx("p",{className:"text-sm text-ink-soft",children:b}),a&&e.jsxs("div",{className:"flex items-center gap-2 rounded-xl border border-dashed border-orange-deep/50 bg-egg px-3 py-2",children:[e.jsx("span",{className:"shrink-0 text-xs font-semibold text-orange-deep",children:d}),e.jsx("code",{className:"min-w-0 flex-1 overflow-hidden rounded-lg bg-card px-2 py-1 text-center font-mono text-xs font-bold tracking-wider text-orange-deep",children:a}),e.jsx("button",{type:"button",onClick:h,className:"focus-ring shrink-0 whitespace-nowrap rounded-lg bg-primary px-2.5 py-1 text-xs font-semibold text-primary-foreground transition hover:brightness-110",children:s?"Zkopírováno ✓":"Kopírovat"})]}),l&&c&&e.jsxs("a",{href:c,target:c.startsWith("http")?"_blank":void 0,rel:c.startsWith("http")?"noopener noreferrer":void 0,className:"focus-ring inline-flex items-center justify-center gap-2 rounded-full bg-primary px-5 py-2.5 text-sm font-semibold text-primary-foreground transition hover:brightness-110",onClick:()=>g("open_shop",{location:"hero_banner",label:l}),children:[l,e.jsx("span",{"aria-hidden":!0,children:"→"})]})]})}const ge=[{label:"Max. produktů má přírodní složení",icon:"leaf"},{label:"347 produktů v e-shopu",icon:"box"},{label:"Český dodavatel a poradce",icon:"cz"},{label:"Odpovědi zůstávají u vás",icon:"lock"}];function ve({name:t}){const s={width:18,height:18,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0};switch(t){case"leaf":return e.jsxs("svg",{...s,children:[e.jsx("path",{d:"M11 20A7 7 0 0 1 4 13c0-4 3-8 9-11 0 5-1 9-5 11"}),e.jsx("path",{d:"M4 20c4-2 7-6 8-12"})]});case"box":return e.jsxs("svg",{...s,children:[e.jsx("path",{d:"M21 16V8l-9-5-9 5v8l9 5 9-5z"}),e.jsx("path",{d:"m3.3 8 8.7 5 8.7-5"}),e.jsx("path",{d:"M12 13v8"})]});case"cz":return e.jsxs("svg",{...s,children:[e.jsx("path",{d:"M5 21V4h14"}),e.jsx("path",{d:"M5 12h9"})]});default:return e.jsxs("svg",{...s,children:[e.jsx("rect",{x:"4",y:"11",width:"16",height:"9",rx:"2"}),e.jsx("path",{d:"M8 11V7a4 4 0 0 1 8 0v4"})]})}}function je({banner:t}){return e.jsxs("header",{className:"hero-grid relative overflow-hidden",children:[e.jsxs("div",{className:"mx-auto w-full max-w-6xl px-5 pt-10 pb-6 sm:pt-16 sm:pb-10",children:[e.jsxs("nav",{className:"flex items-center justify-between gap-3","aria-label":"Hlavní navigace",children:[e.jsxs("a",{href:"/",className:"flex items-center gap-2 sm:gap-3 focus-ring rounded-lg",children:[e.jsx("img",{src:"https://assets.macaly-user-data.dev/cdn-cgi/image/format=webp,width=2000,height=2000,fit=scale-down,quality=90,anim=true/ae4wlo8wnhsj52rmn28pk01z/dphu4hjpsqbrmxulk4960we2/7gU3AAzA8UNIM3ZDQmuST.png",alt:"
2Vitality Lifestyle",className:"h-9 w-auto rounded-lg sm:h-10",loading:"eager"}),e.jsxs("div",{className:"flex flex-col leading-tight",children:[e.jsx("span",{className:"font-semibold tracking-tight text-brand-deep",children:"Zdraví bez léků"}),e.jsx("span",{className:"hidden text-xs text-ink-soft sm:inline",children:"zdravibezleku.cz"})]})]}),e.jsxs("div",{className:"flex items-center gap-4 text-sm",children:[e.jsx("a",{href:"#jak-to-funguje",className:"hidden text-ink-soft hover:text-brand focus-ring rounded sm:inline",children:"Jak to funguje"}),e.jsx("a",{href:q,target:"_blank",rel:"noopener noreferrer",className:"text-ink-soft hover:text-brand focus-ring rounded",onClick:()=>g("open_shop",{location:"header"}),children:"E-shop →"}),e.jsx(W,{to:"/admin",className:"text-ink-soft hover:text-brand focus-ring rounded",children:"Přihlášení"})]})]}),e.jsxs("div",{className:"mt-10 grid grid-cols-1 gap-8 lg:grid-cols-[minmax(0,1fr)_340px]",children:[e.jsxs("div",{className:"max-w-3xl",children:[e.jsxs("span",{className:"inline-flex items-center gap-2 rounded-full bg-egg px-3 py-1 text-sm font-medium text-orange-deep",children:[e.jsx("span",{"aria-hidden":!0,children:"⏱️"})," 2 minuty · 4 otázky"]}),e.jsx("h1",{className:"mt-4 text-balance text-4xl leading-tight font-bold sm:text-5xl",children:"Přírodní doplňky a kosmetika na míru — bez lékařské poradny"}),e.jsx("p",{className:"mt-4 text-lg text-ink-soft",children:"Odpovězte na 4 otázky a do 2 minut získejte až 6 ověřených produktů pro vaši zdravotní oblast. Bez registrace, bez ukládání dat — jen přírodní produkty z českého e-shopu."}),e.jsxs("div",{className:"mt-6 flex flex-wrap gap-3",children:[e.jsxs("a",{href:"#kviz",className:"focus-ring inline-flex items-center gap-2 rounded-full bg-primary px-6 py-3 text-base font-semibold text-primary-foreground shadow-sm transition hover:brightness-110",onClick:()=>g("start_quiz"),children:["Spustit poradce",e.jsx("span",{"aria-hidden":!0,children:"→"})]}),e.jsx("a",{href:"#oblasti",className:"focus-ring inline-flex items-center gap-2 rounded-full border border-border bg-card px-6 py-3 text-base font-semibold text-brand-deep transition hover:border-brand/40",onClick:()=>g("browse_areas"),children:"Procházet oblasti"})]}),e.jsx("ul",{className:"mt-8 grid grid-cols-1 gap-2 sm:grid-cols-2",children:ge.map(s=>e.jsxs("li",{className:"flex items-center gap-2 text-sm text-ink",children:[e.jsx("span",{className:"grid h-7 w-7 shrink-0 place-items-center rounded-full bg-mint text-brand",children:e.jsx(ve,{name:s.icon})}),s.label]},s.label))})]}),t&&e.jsx(fe,{banner:t})]})]}),e.jsxs("section",{id:"jak-to-funguje",className:"mx-auto w-full max-w-6xl px-5 py-10 sm:py-14",children:[e.jsx("h2",{className:"text-2xl font-bold sm:text-3xl",children:"Jak poradce funguje"}),e.jsx("ol",{className:"mt-6 grid grid-cols-1 gap-4 sm:grid-cols-3",children:[{n:1,t:"Vyberte zdravotní oblast",d:"Kloubky, imunita, spánek, pleť… 7 oblastí pokrývajících nejčastější potíže."},{n:2,t:"Upřesníme váš problém",d:"Stačí 3 krátké otázky — konkrétní potíž, oblíbená forma a věková kategorie."},{n:3,t:"Doporučíme produkty",d:"Až 6 přírodních produktů s přímým odkazem do e-shopu. Pro registrované zákazníky je připravena exkluzivní sleva."}].map(s=>e.jsxs("li",{className:"rounded-2xl border border-border bg-card p-5 shadow-sm",children:[e.jsx("span",{className:"grid h-9 w-9 place-items-center rounded-full bg-primary text-sm font-bold text-primary-foreground",children:s.n}),e.jsx("h3",{className:"mt-3 text-lg font-semibold text-brand-deep",children:s.t}),e.jsx("p",{className:"mt-1 text-sm text-ink-soft",children:s.d})]},s.n))})]}),e.jsxs("section",{id:"oblasti",className:"mx-auto w-full max-w-6xl px-5 pb-12 sm:pb-16",children:[e.jsx("h2",{className:"text-2xl font-bold sm:text-3xl",children:"Procházet zdravotní oblasti"}),e.jsx("p",{className:"mt-2 max-w-2xl text-ink-soft",children:"Rychlá cesta k výběru: klikněte na oblast a rovnou uvidíte doporučené přírodní produkty z e-shopu Zdraví bez léků."}),e.jsx("div",{className:"mt-6 grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:Q.map(s=>e.jsxs(W,{to:"/",search:{kat:s.id,problem:"vše",forma:"vše",vek:"vše"},className:"group focus-ring flex flex-col rounded-2xl border border-border bg-card p-5 shadow-sm transition hover:-translate-y-0.5 hover:border-brand/40 hover:shadow-md",onClick:()=>g("select_category",{category_id:s.id,category_label:s.label}),children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"grid h-11 w-11 place-items-center rounded-xl bg-mint text-2xl","aria-hidden":!0,
2children:s.icon}),e.jsx("h3",{className:"text-lg font-semibold text-brand-deep",children:s.label})]}),e.jsx("p",{className:"mt-3 text-sm text-ink-soft",children:s.seoBlurb}),e.jsxs("span",{className:"mt-4 inline-flex items-center gap-1 text-sm font-semibold text-brand group-hover:gap-2",children:["Zobrazit produkty ",e.jsx("span",{"aria-hidden":!0,children:"→"})]})]},s.id))})]}),e.jsx("section",{className:"mx-auto w-full max-w-6xl px-5 pb-16",children:e.jsxs("div",{className:"rounded-2xl bg-mint p-6 sm:p-8",children:[e.jsx("h2",{className:"text-xl font-bold sm:text-2xl text-brand-deep",children:"Vaše data zůstávají u vás"}),e.jsx("p",{className:"mt-2 max-w-3xl text-ink",children:"Poradce běží přímo ve vašem prohlížeči — vaše odpovědi z kvízu se nikam neodesílají. Váš e-mail předáváme pouze newsletterovému nástroji Ecomail pro potvrzené přihlášení (double opt-in), v souladu s GDPR. Produkty a ceny pocházejí z Google Merchant feedu e-shopu Zdraví bez léků."})]})})]})}function ke({step:t,total:s=4,label:o}){const a=Math.round(t/s*100);return e.jsxs("div",{className:"mb-1",role:"progressbar","aria-valuenow":t,"aria-valuemin":1,"aria-valuemax":s,"aria-label":`Krok ${t} ze ${s}${o?`: ${o}`:""}`,children:[e.jsxs("div",{className:"flex items-baseline justify-between gap-3",children:[e.jsxs("span",{className:"text-sm font-medium text-ink-soft",children:["Krok ",e.jsx("span",{className:"font-bold text-brand-deep",children:t})," ze ",s]}),o&&e.jsx("span",{className:"hidden text-sm text-ink-soft sm:inline","aria-hidden":!0,children:o})]}),e.jsx("div",{className:"mt-2 h-2 w-full overflow-hidden rounded-full bg-muted",children:e.jsx("div",{className:"h-full rounded-full bg-primary transition-[width] duration-500 ease-out",style:{width:`${a}%`}})})]})}const ye=["Zdravotní oblast","Konkrétní problém","Forma produktu","Věková kategorie"];function Ne({onSubmit:t}){const[s,o]=m.useState(1),[a,d]=m.useState(null),[i,l]=m.useState(null),[c,b]=m.useState(null),[h,n]=m.useState(null);function v(r){d(r),l(null),b(null),n(null),o(2),g("select_category",{category_id:r,category_label:_(r).label})}function k(r){l(r),o(3)}function x(r){b(r),o(4),g("select_form",{form:r})}function p(r){n(r),g("select_age",{age:r})}function y(){!a||!i||!c||!h||(g("complete_quiz",{category_id:a,category_label:_(a).label,problem:i,form:c,age:h}),t({kat:a,problem:i,forma:c,vek:h}))}return e.jsx("section",{id:"kviz",className:"mx-auto w-full max-w-3xl px-5 py-10 sm:py-14","aria-labelledby":"kviz-title",children:e.jsxs("div",{className:"rounded-3xl border border-border bg-card p-6 shadow-sm sm:p-8",children:[e.jsx("h2",{id:"kviz-title",className:"text-2xl font-bold sm:text-3xl text-brand-deep",children:"Personalizovaný poradce"}),e.jsx("p",{className:"mt-1 text-ink-soft",children:"4 krátké otázky — využijete ji za dvě minuty."}),e.jsx("div",{className:"mt-6",children:e.jsx(ke,{step:s,label:ye[s-1]})}),e.jsxs("div",{className:"mt-6",children:[s===1&&e.jsxs("fieldset",{className:"min-h-[220px]",children:[e.jsx("legend",{className:"mb-3 text-lg font-semibold text-brand-deep",children:"Kterou zdravotní oblast chcete řešit?"}),e.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:Q.map(r=>e.jsxs("button",{type:"button",onClick:()=>v(r.id),"aria-pressed":a===r.id,className:"focus-ring flex items-start gap-3 rounded-2xl border border-border bg-background p-4 text-left transition hover:border-brand/50 hover:bg-mint",children:[e.jsx("span",{className:"grid h-10 w-10 shrink-0 place-items-center rounded-xl bg-mint text-xl","aria-hidden":!0,children:r.icon}),e.jsxs("span",{children:[e.jsx("span",{className:"block font-semibold text-brand-deep",children:r.label}),e.jsx("span",{className:"mt-0.5 block text-sm text-ink-soft",children:r.tagline})]})]},r.id))})]}),s===2&&a&&e.jsxs("fieldset",{className:"min-h-[220px]",children:[e.jsxs("legend",{className:"mb-1 text-lg font-semibold text-brand-deep",children:[_(a).label," — co vás trápí nejvíc?"]}),e.jsx("p",{className:"mb-3 text-sm text-ink-soft",children:"Vyberte jednu možnost."}),e.jsx("div",{className:"flex flex-col gap-2",children:_(a).problems.map(r=>e.jsxs("button",{type:"button",onClick:()=>k(r),"aria-pressed":i===r,className:`focus-ring flex items-center gap-3 rounded-xl border p-3 text-left text-sm transition sm:text-base ${i===r?"border-brand bg-mint text-brand-deep":"border-border bg-background hover:border-brand/50 hover:bg-mint"}`,children:[e.jsx("span",{className:"grid h-6 w-6 shrink-0 place-items-center rounded-full border-2 border-brand/50 text-xs","aria-hidden":!0,
2children:i===r?"✓":""}),r]},r))})]}),s===3&&e.jsxs("fieldset",{className:"min-h-[220px]",children:[e.jsx("legend",{className:"mb-1 text-lg font-semibold text-brand-deep",children:"Jakou formu produktu preferujete?"}),e.jsx("p",{className:"mb-3 text-sm text-ink-soft",children:"Tobolky, tekutina, krém nebo čaj?"}),e.jsx("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:le.map(r=>e.jsxs("button",{type:"button",onClick:()=>x(r),"aria-pressed":c===r,className:`focus-ring flex items-center gap-3 rounded-xl border p-3 text-left text-sm transition sm:text-base ${c===r?"border-brand bg-mint text-brand-deep":"border-border bg-background hover:border-brand/50 hover:bg-mint"}`,children:[e.jsx("span",{className:"grid h-6 w-6 shrink-0 place-items-center rounded-full border-2 border-brand/50 text-xs","aria-hidden":!0,children:c===r?"✓":""}),r]},r))})]}),s===4&&e.jsxs("fieldset",{className:"min-h-[220px]",children:[e.jsx("legend",{className:"mb-1 text-lg font-semibold text-brand-deep",children:"Do jaké věkové kategorie patříte?"}),e.jsx("p",{className:"mb-3 text-sm text-ink-soft",children:"Pomůže nám to upřesnit doporučení."}),e.jsx("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-4",children:de.map(r=>e.jsx("button",{type:"button",onClick:()=>p(r),"aria-pressed":h===r,className:`focus-ring rounded-xl border p-3 text-center text-sm transition sm:text-base ${h===r?"border-brand bg-mint text-brand-deep":"border-border bg-background hover:border-brand/50 hover:bg-mint"}`,children:r},r))}),e.jsxs("button",{type:"button",onClick:y,disabled:!h,className:"focus-ring mt-6 inline-flex w-full items-center justify-center gap-2 rounded-full bg-accent px-6 py-3 text-base font-bold text-accent-foreground shadow-sm transition hover:brightness-105 disabled:cursor-not-allowed disabled:opacity-50 sm:w-auto",children:["Zobrazit doporučení",e.jsx("span",{"aria-hidden":!0,children:"→"})]})]})]}),s>1&&e.jsxs("button",{type:"button",onClick:()=>o(r=>Math.max(1,r-1)),className:"focus-ring mt-5 inline-flex items-center gap-1 text-sm font-medium text-ink-soft hover:text-brand",children:[e.jsx("span",{"aria-hidden":!0,children:"←"})," Zpět"]})]})})}function F(t){return!t||t==="vše"?"není specifikováno":t}function ze({kat:t,problem:s,forma:o,vek:a,products:d}){const[i,l]=m.useState(!1),[c,b]=m.useState(""),h=m.useCallback(async()=>{l(!0),b("");try{const{pdf:n,Document:v,Page:k,Text:x,View:p,StyleSheet:y,Link:r,Font:D}=await ce(async()=>{const{pdf:f,Document:P,Page:Z,Text:O,View:E,StyleSheet:j,Link:C,Font:L}=await import("./react-pdf.browser-BbJfp6lg.js");return{pdf:f,Document:P,Page:Z,Text:O,View:E,StyleSheet:j,Link:C,Font:L}},__vite__mapDeps([0,1,2])),T=_(t),M=new Date().toLocaleDateString("cs-CZ",{day:"2-digit",month:"2-digit",year:"numeric"}),u=y.create({page:{fontFamily:"Helvetica",backgroundColor:"#ffffff",paddingTop:40,paddingBottom:50,paddingHorizontal:40,fontSize:10,color:"#1a2e1a"},headerBar:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",borderBottomWidth:2,borderBottomColor:"#1f6b37",paddingBottom:10,marginBottom:18},headerLeft:{flexDirection:"row",alignItems:"center",gap:8},logoBox:{width:34,height:34,backgroundColor:"#1f6b37",borderRadius:8,alignItems:"center",justifyContent:"center"},logoText:{color:"#ffffff",fontSize:18},brandName:{fontSize:14,fontFamily:"Helvetica-Bold",color:"#154d28"},headerDate:{fontSize:8,color:"#6b7c6b"},summaryBox:{backgroundColor:"#f0f9f0",borderRadius:8,padding:12,marginBottom:20,flexDirection:"row",flexWrap:"wrap",gap:8},summaryItem:{width:"45%"},summaryLabel:{fontSize:8,color:"#6b7c6b",marginBottom:2},summaryValue:{fontSize:10,fontFamily:"Helvetica-Bold",color:"#154d28"},sectionTitle:{fontSize:13,fontFamily:"Helvetica-Bold",color:"#154d28",marginBottom:10},productGrid:{flexDirection:"column",gap:10,marginBottom:22},productCard:{borderWidth:1,borderColor:"#d4e8d4",borderRadius:8,padding:12,backgroundColor:"#fafffe"},productBrand:{fontSize:8,color:"#1f6b37",textTransform:"uppercase",letterSpacing:.5,marginBottom:2},productTitle:{fontSize:11,fontFamily:"Helvetica-Bold",color:"#154d28",marginBottom:4},productDesc:{fontSize:9,color:"#4a5e4a",lineHeight:1.4,marginBottom:6},productFooter:{flexDirection:"row",justifyContent:"space-between",alignItems:"center"},productPrice:{fontSize:11,fontFamily:"Helvetica-Bold",color:"#1a2e1a"},productLink:{fontSize:9,color:"#1f6b37",textDecoration:"underline"},discountBox:{borderWidth:1.5,borderColor:"#f5a44a",borderStyle:"dashed",borderRadius:8,padding:14,marginBottom:20,backgroundColor:"#fffdf9"},discountTitle:{fontSize:11,fontFamily:"Helvetica-Bold",color:"#b85c00",marginBottom:4},discountSubtitle:{fontSize:9,color:"#7a4000",marginBottom:10},discountWriteLine:{borderBottomWidth:1,borderBottomColor:"#c8a060",height:28,marginTop:4},discountWriteLabel:{fontSize:8,color:"#b85c00",marginTop:4},footer:{position:"absolute",bottom:24,left:40,right:40,flexDirection:"row",justifyContent:"space-between",alignItems:"center",borderTopWidth:1,borderTopColor:"#d4e8d4",paddingTop:8},footerText:{fontSize:8,color:"#6b7c6b"},footerLink:{fontSize:8,color:"#1f6b37",textDecoration:"underline"},disclaimer:{fontSize:8,color:"#8a9e8a",marginTop:6,lineHeight:1.5}}),A=e.jsx(v,{title:`Doporucene produkty — ${T.label}`,author:"Zdravi bez leku",subject:"Personalizovane doporuceni prirodnich doplnku",creator:"zdravi-bez-leku.macaly.app",children:e.jsxs(k,{size:"A4",style:u.page,children:[e.jsxs(p,{style:u.headerBar,children:[e.jsxs(p,{style:u.headerLeft,children:[e.jsx(p,{style:u.logoBox,children:e.jsx(x,{style:u.logoText})}),e.jsx(x,{style:u.brandName,children:"Zdravi bez leku"})]}),e.jsxs(x,{style:u.headerDate,children:["Doporuceni ze dne ",M]})]}),e.jsx(p,{style:u.summaryBox,children:[{label:"Zdravotni oblast",value:T.label},{label:"Konkretni problem",value:F(s)},{label:"Preferovana forma",value:F(o)},{label:"Vekova kategorie",value:F(a)}].map(f=>e.jsxs(p,{style:u.summaryItem,children:[e.jsx(x,{style:u.summaryLabel,children:f.label}),e.jsx(x,{style:u.summaryValue,children:f.value})]},f.label))}),e.jsxs(x,{style:u.sectionTitle,children:["Doporucene produkty (",d.length,")"]}),e.jsx(p,{style:u.productGrid,children:d.map((f,P)=>e.jsxs(p,{style:u.productCard,children:[f.brand?e.jsx(x,{style:u.productBrand,children:f.brand}):null,e.jsxs(x,{style:u.productTitle,children:[P+1,". ",f.title]}
2),f.shortDescription?e.jsx(x,{style:u.productDesc,children:f.shortDescription}):null,e.jsxs(p,{style:u.productFooter,children:[e.jsx(x,{style:u.productPrice,children:f.priceText||"Cena v e-shopu"}),e.jsx(r,{src:f.shopUrl,style:u.productLink,children:f.shopUrl})]})]},String(f._id)))}),e.jsxs(p,{style:u.discountBox,children:[e.jsx(x,{style:u.discountTitle,children:"Vas slevovy kod"}),e.jsx(x,{style:u.discountSubtitle,children:"Slevovy kod ziskate po zadani e-mailu v online poradci na zdravi-bez-leku.macaly.app. Vyplnte ho zde rucne a pouzijte pri objednavce v e-shopu zdravibezleku.cz."}),e.jsx(p,{style:u.discountWriteLine}),e.jsx(x,{style:u.discountWriteLabel,children:"Vypiste slevovy kod zde"})]}),e.jsx(x,{style:u.disclaimer,children:"Toto doporuceni bylo vygenerovano automaticky na zaklade vasich odpovedi a ma pouze informativni charakter. Nenahrazuje lekarske vysetreni ani odborna doporuceni. Pred uzitim doplnku stravy se poradte s lekarem, zejmena pokud uzivate leky nebo trpite zdravotnimi potizemi."}),e.jsxs(p,{style:u.footer,fixed:!0,children:[e.jsx(x,{style:u.footerText,children:"Zdravi bez leku — prirodni doplnky a kosmetika"}),e.jsx(r,{src:q,style:u.footerLink,children:"www.zdravibezleku.cz"})]})]})}),S=await n(A).toBlob(),w=URL.createObjectURL(S),N=document.createElement("a");N.href=w,N.download=`doporuceni-${t}-${new Date().toISOString().slice(0,10)}.pdf`,document.body.appendChild(N),N.click(),document.body.removeChild(N),URL.revokeObjectURL(w)}catch(n){console.error("PDF generation failed:",n),b("Nepodařilo se vygenerovat PDF. Zkuste to znovu.")}finally{l(!1)}},[t,s,o,a,d]);return e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("button",{type:"button",onClick:h,disabled:i,className:"focus-ring inline-flex items-center justify-center gap-2 rounded-full border border-border bg-card px-5 py-3 text-sm font-semibold text-brand-deep transition hover:border-brand/40 hover:bg-mint disabled:cursor-not-allowed disabled:opacity-60",children:i?e.jsxs(e.Fragment,{children:[e.jsxs("svg",{className:"h-4 w-4 animate-spin",viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),"Generuji PDF…"]}):e.jsxs(e.Fragment,{children:[e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[e.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),e.jsx("polyline",{points:"7 10 12 15 17 10"}),e.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]}),"Stáhnout doporučení jako PDF"]})}),c&&e.jsx("p",{className:"text-xs text-destructive",children:c})]})}const te="discount_attempts",we=5,se=3600*1e3;function re(){try{const t=sessionStorage.getItem(te);if(t)return JSON.parse(t)}catch{}return{count:0,since:Date.now()}}function Se(){const t=re();return Date.now()-t.since>se?!1:t.count>=we}function H(){const t=re(),s=Date.now(),o=s-t.since>se;try{sessionStorage.setItem(te,JSON.stringify({count:o?1:t.count+1,since:o?s:t.since}))}catch{}}const Ce={pohyb:["Který produkt je nejlepší na bolavá kolena?","Můžu kombinovat kloubní výživu s léky?","Jak dlouho trvá, než něco zabere?"],ocista:["Jaký detox je nejlepší pro játra?","Je kúra vhodná při léčbě antibiotiky?","Jak dlouho mám detox dělat?"],energie:["Co pomůže na chronickou únavu?","Můžu tyto doplňky užívat dlouhodobě?","Co brát před tréninkem?"],odolnost:["Jak posílit imunitu před zimou?","Který vitamín D je nejlepší?","Co na častá nachlazení dětí?"],spanek:["Co mi pomůže s usínáním?","Je melatonin bezpečný dlouhodobě?","Můžu kombinovat s bylinami na nervy?"],plet_vlasy:["Co na suchou a loupající se pleť?","Který kolagen je nejlepší na vlasy?","Můžu kombinovat kolagen s hyaluronem?"],starnuti:["Které antioxidanty jsou nejsilnější?","Je kolagen vhodný i pro muže?","Co brát na buněčnou oxidaci?"]},_e=["Který produkt by mi nejlépe pomohl?","Jaké jsou kontraindikace?","Jak dlouho užívat, než uvidím výsledek?"];function Pe({kat:t,problem:s,forma:o,vek:a,sourceIds:d}){const[i,l]=m.useState(null),[c,b]=m.useState([]),[h,n]=m.useState(""),[v,k]=m.useState(!1),[x,p]=m.useState(""),y=R(B.aiAdvisor.ask),r=G(B.aiAdvisor.getStatus,i?{sessionId:i}:"skip"),D=m.useRef(null);m.useEffect(()=>{l(he())},[]),m.useEffect(()=>{D.current&&(D.current.scrollTop=D.current.scrollHeight)},[c]);const T=_(t),M=Ce[t]??_e,u=r?.freeQuestionsUsed??0,A=r?.freeQuestionsTotal??3,S=Math.max(0,A-u),w=r?.unlocked??!1,[N,f]=m.useState(!1);async function P(j){if(!i)return;const C=j.trim();if(!C||v)return;p(""),k(!0);const L=[...c,{role:"user",content:C}];b(L),n("");try{g("ai_ask",{category:t,unlocked:w,free_remaining:S});const z=await y({sessionId:i,question:C,categoryId:t,categoryLabel:T.label,problem:s,forma:o,vek:a,sourceIds:d,history:c});if(!z.answer&&z.tier==="free"&&!z.unlocked){f(!0),k(!1);return}b([...L,{role:"assistant",content:z.answer}]),!z.unlocked&&z.remainingFree<=0&&f(!0)}catch(z){p(z instanceof Error?z.message:"Omlouváme se, něco se pokazilo.")}finally{k(!1)}}function Z(j){j.preventDefault(),P(h)}function O(j){v||N||P(j)}const E=c.length>0;return e.jsxs("section",{"aria-label":"AI poradce",className:"rounded-2xl border border-border bg-card p-5 sm:p-6",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{children:[e.jsxs("span",{className:"inline-flex items-center gap-2 rounded-full bg-mint px-3 py-1 text-xs font-semibold text-brand-deep",children:[e.jsx("span",{"aria-hidden":!0,
2children:"🤖"})," AI poradce"]}),e.jsxs("h2",{className:"mt-2 text-xl font-bold sm:text-2xl text-brand-deep",children:["Zeptejte se na cokoliv ohledně ",T.label.toLowerCase()]}),e.jsx("p",{className:"mt-1 text-sm text-ink-soft",children:"Odpovědi vycházejí z katalogů doporučených produktů. Na otázku odpovídá AI, ne lékař — při vážnějších potížích vyhledejte lékaře."})]}),i&&e.jsx(De,{unlocked:w,freeRemaining:S,freeTotal:A})]}),!E&&e.jsx("div",{className:"mt-4 flex flex-wrap gap-2",children:M.map(j=>e.jsx("button",{type:"button",onClick:()=>O(j),disabled:v||N,className:"focus-ring rounded-full border border-border bg-egg px-3 py-1.5 text-xs font-medium text-brand-deep transition hover:border-brand/40 disabled:cursor-not-allowed disabled:opacity-50",children:j},j))}),E&&e.jsxs("div",{ref:D,className:"mt-4 max-h-96 space-y-3 overflow-y-auto rounded-xl border border-border bg-muted/40 p-4","aria-live":"polite",children:[c.map((j,C)=>e.jsx("div",{className:j.role==="user"?"ml-auto max-w-[85%] rounded-2xl rounded-br-sm bg-primary px-4 py-2.5 text-sm text-primary-foreground":"mr-auto max-w-[85%] rounded-2xl rounded-bl-sm bg-card border border-border px-4 py-2.5 text-sm text-ink whitespace-pre-wrap",children:j.content},C)),v&&e.jsxs("div",{className:"mr-auto flex max-w-[85%] items-center gap-2 rounded-2xl rounded-bl-sm border border-border bg-card px-4 py-2.5 text-sm text-ink-soft",children:[e.jsxs("svg",{className:"h-4 w-4 animate-spin",viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),"AI přemýšlí…"]})]}),x&&e.jsx("p",{className:"mt-3 text-sm text-destructive",children:x}),N&&!w&&e.jsx(Te,{kat:t,sessionId:i,onConfirmed:()=>f(!1)}),(!N||w)&&e.jsxs("form",{onSubmit:Z,className:"mt-4 flex flex-col gap-3 sm:flex-row",children:[e.jsx("label",{htmlFor:"ai-input",className:"sr-only",children:"Vaše otázka"}),e.jsx("input",{id:"ai-input",type:"text",value:h,onChange:j=>n(j.target.value),placeholder:"Napište otázku poradci…",disabled:v||!i,className:"focus-ring w-full rounded-xl border border-border bg-card px-4 py-3 text-base text-ink placeholder:text-ink-soft/60 disabled:opacity-60"}),e.jsx("button",{type:"submit",disabled:v||!h.trim()||!i,className:"focus-ring inline-flex shrink-0 items-center justify-center gap-2 rounded-xl bg-primary px-6 py-3 text-base font-semibold text-primary-foreground transition hover:brightness-110 disabled:cursor-not-allowed disabled:opacity-50",children:v?"Odesíláme…":"Zeptat se"})]}),e.jsx("p",{className:"mt-3 text-xs text-ink-soft",children:w?"Máte odemknutý neomezený přístup na 24 hodin — ptejte se, kolik chcete.":S>0?`Zbývá ${S} ${S===1?"otázka":"otázky"} zdarma. Poté vám odemkneme další po potvrzení e-mailu.`:"Využili jste bezplatné otázky. Pro další přístup potvrďte svůj e-mail."})]})}function De({unlocked:t,freeRemaining:s,freeTotal:o}){return t?e.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1.5 rounded-full bg-orange/20 px-3 py-1 text-xs font-semibold text-orange-deep",children:[e.jsx("span",{"aria-hidden":!0,children:"✓"})," Odemčeno 24h"]}):e.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1.5 rounded-full border border-border bg-egg px-3 py-1 text-xs font-semibold text-brand-deep",children:[s,"/",o," zdarma"]})}function Te({kat:t,sessionId:s,onConfirmed:o}){const[a,d]=m.useState(""),[i,l]=m.useState("form"),[c,b]=m.useState(""),[h,n]=m.useState(""),v=R(B.discounts.sendDiscountRequest);async function k(x){x.preventDefault();const p=Y(a);if(p){H(),n(p);return}if(Se()){n("Příliš mnoho pokusů. Zkuste to prosím za hodinu.");return}n(""),l("loading");try{const y=ee(a),r=await v({email:y,sessionId:s??void 0});g("ai_email_gate",{status:r.status,category:t}),r.status==="confirmed"&&r.code?(b(r.code),l("confirmed"),o()):l("sent")}catch(y){H(),n(y instanceof Error?y.message:"Omlouváme se, něco se pokazilo."),l("form")}}return e.jsxs("div",{className:"mt-4 rounded-xl border border-orange/30 bg-egg p-4",children:[e.jsx("h3",{className:"text-base font-bold text-orange-deep",children:"Pro další otázky potvrďte svůj e-mail"}),e.jsxs("p",{className:"mt-1 text-sm text-ink",children:["Zbývají vám další otázky? Zadejte e-mail a klikněte na potvrzovací odkaz, který vám pošleme. Po potvrzení odemkneme poradce na 24 hodin a navíc získáte ",e.jsx("strong",{children:"slevový kód 5 %"})," na nákup v e-shopu."]}
2),i==="form"&&e.jsxs("form",{onSubmit:k,className:"mt-3 flex flex-col gap-3 sm:flex-row",children:[e.jsx("label",{htmlFor:"gate-email",className:"sr-only",children:"E-mail"}),e.jsx("input",{id:"gate-email",type:"email",inputMode:"email",autoComplete:"email",placeholder:" Váš e-mail",value:a,onChange:x=>d(x.target.value),className:"focus-ring w-full rounded-xl border border-border bg-card px-4 py-3 text-base text-ink placeholder:text-ink-soft/60"}),e.jsx("button",{type:"submit",className:"focus-ring inline-flex shrink-0 items-center justify-center rounded-xl bg-accent px-6 py-3 text-base font-bold text-accent-foreground transition hover:brightness-105",children:"Odemknout"})]}),i==="loading"&&e.jsxs("div",{className:"mt-3 flex items-center gap-3 text-ink",children:[e.jsxs("svg",{className:"h-5 w-5 animate-spin",viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),"Odesíláme…"]}),i==="sent"&&e.jsxs("div",{className:"mt-3 rounded-lg bg-card p-3 text-sm text-ink",children:[e.jsx("p",{className:"font-semibold text-brand-deep",children:"Zkontrolujte si e-mail 📧"}),e.jsx("p",{className:"mt-1 text-ink-soft",children:"Klikněte na potvrzovací odkaz v e-mailu od Ecomailu. Po přesměrování zpět na web se poradce automaticky odemkne."}),e.jsx("button",{type:"button",onClick:()=>l("form"),className:"focus-ring mt-3 inline-flex items-center justify-center rounded-full border border-border bg-card px-4 py-2 text-sm font-semibold text-brand-deep transition hover:border-brand/40",children:"Zkusit znovu"})]}),i==="confirmed"&&e.jsxs("div",{className:"mt-3 rounded-lg bg-card p-3 text-sm text-ink",children:[e.jsx("p",{className:"font-semibold text-brand-deep",children:"E-mail potvrzen — poradce odemčen ✓"}),e.jsx("p",{className:"mt-1 text-ink-soft",children:"Máte neomezený přístup na 24 hodin. Váš slevový kód 5 %:"}),e.jsx("div",{className:"mt-2 flex items-center gap-3",children:e.jsx("span",{className:"rounded-xl border border-orange/30 bg-egg px-4 py-2 text-2xl font-bold tracking-wider text-orange-deep",children:c})})]}),h&&e.jsx("p",{className:"mt-2 text-sm text-destructive",children:h}),e.jsxs("p",{className:"mt-3 text-xs text-ink-soft",children:["E-mail předáváme newsletterovému nástroji Ecomail (double opt-in, GDPR). Odpovědi z poradce se nikam neodesílají. Nechcete zadávat e-mail? Napište nám přímo na"," ",e.jsx("a",{href:`${X}`,target:"_blank",rel:"noopener noreferrer",className:"font-medium text-brand hover:underline",children:"WhatsApp"}),"."]})]})}function I(t){return!t||t==="vše"?"nezáleží":t}function Ae({src:t,alt:s}){const[o,a]=m.useState(!1);return!t||o?e.jsx("div",{className:"grid aspect-square w-full place-items-center rounded-xl bg-mint text-brand","aria-hidden":!0,children:e.jsx("span",{className:"text-4xl",children:"🌿"})}):e.jsx("img",{src:t,alt:s,loading:"lazy",onError:()=>a(!0),className:"aspect-square w-full rounded-xl bg-muted object-contain"})}const oe="discount_attempts",Ee=5,ae=3600*1e3;function ne(){try{const t=sessionStorage.getItem(oe);if(t)return JSON.parse(t)}catch{}return{count:0,since:Date.now()}}function Le(){const t=ne();return Date.now()-t.since>ae?!1:t.count>=Ee}function K(){const t=ne(),s=Date.now(),o=s-t.since>ae;try{sessionStorage.setItem(oe,JSON.stringify({count:o?1:t.count+1,since:o?s:t.since}))}catch{}}function Be(t){const s=Y(t);return s||(Le()?"Příliš mnoho pokusů. Zkuste to prosím za hodinu.":null)}function Me({banner:t}){const[s,o]=m.useState(!1),a=t.code?.trim(),d=t.codeLabel?.trim()||"Slevový kód";if(!a)return null;const i=a;async function l(){try{await navigator.clipboard.writeText(i),o(!0),g("copy_discount_code",{location:"results_promo",code:i}),setTimeout(()=>o(!1),2e3)}catch{o(!1)}}return e.jsxs("div",{className:"mt-6 rounded-2xl border border-orange/30 bg-egg p-5 sm:p-6",children:[e.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{children:[e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-orange/20 px-2.5 py-0.5 text-xs font-semibold text-orange-deep",children:[e.jsx("span",{"aria-hidden":!0,
2children:"⚡"})," Akce"]}),e.jsx("h2",{className:"mt-2 text-lg font-bold text-brand-deep",children:t.title}),t.text&&e.jsx("p",{className:"mt-1 text-sm text-ink-soft",children:t.text})]}),e.jsxs("div",{className:"flex items-center gap-2 rounded-xl border border-dashed border-orange-deep/50 bg-card px-3 py-2",children:[e.jsx("span",{className:"shrink-0 text-xs font-semibold text-orange-deep",children:d}),e.jsx("code",{className:"min-w-0 flex-1 overflow-hidden rounded-lg bg-egg px-2 py-1 text-center font-mono text-sm font-bold tracking-wider text-orange-deep",children:a}),e.jsx("button",{type:"button",onClick:l,className:"focus-ring shrink-0 whitespace-nowrap rounded-lg bg-primary px-3 py-1.5 text-xs font-semibold text-primary-foreground transition hover:brightness-110",children:s?"Zkopírováno ✓":"Kopírovat"})]})]}),t.buttonLabel&&t.buttonUrl&&e.jsxs("a",{href:t.buttonUrl,target:t.buttonUrl.startsWith("http")?"_blank":void 0,rel:t.buttonUrl.startsWith("http")?"noopener noreferrer":void 0,className:"focus-ring mt-4 inline-flex items-center justify-center gap-2 rounded-full bg-primary px-5 py-2.5 text-sm font-semibold text-primary-foreground transition hover:brightness-110",onClick:()=>g("open_shop",{location:"results_promo",label:t.buttonLabel}),children:[t.buttonLabel,e.jsx("span",{"aria-hidden":!0,children:"→"})]})]})}function Ze({kat:t}){const[s,o]=m.useState(""),[a,d]=m.useState("form"),[i,l]=m.useState(""),[c,b]=m.useState(""),[h,n]=m.useState(!1),v=R(B.discounts.sendDiscountRequest);async function k(p){p.preventDefault();const y=Be(s);if(y){K(),l(y);return}l(""),d("loading");try{const r=await v({email:ee(s)});g("request_discount",{status:r.status,category:t}),r.status==="confirmed"&&r.code?(b(r.code),d("confirmed")):d("sent")}catch(r){K(),l(r instanceof Error?r.message:"Omlouváme se, něco se pokazilo. Zkuste to znovu."),d("form")}}async function x(){if(c)try{await navigator.clipboard.writeText(c),n(!0),g("copy_discount_code",{code:c}),setTimeout(()=>n(!1),2e3)}catch{n(!1)}}return e.jsxs("div",{className:"rounded-2xl border border-border bg-egg p-6 sm:p-8",children:[e.jsx("h2",{className:"text-xl font-bold text-orange-deep sm:text-2xl",children:"Získejte 5% slevu na doporučené produkty"}),e.jsx("p",{className:"mt-2 text-ink",children:"Zadejte e-mail a pošleme vám potvrzovací odkaz. Po jeho kliknutí se odemkne slevový kód pro nákup v e-shopu Zdraví bez léků."}),a==="form"&&e.jsxs("form",{onSubmit:k,className:"mt-4 flex flex-col gap-3 sm:flex-row",children:[e.jsx("label",{htmlFor:"email",className:"sr-only",children:"E-mail"}),e.jsx("input",{id:"email",type:"email",inputMode:"email",autoComplete:"email",placeholder:" Váš e-mail",value:s,onChange:p=>o(p.target.value),className:"focus-ring w-full rounded-xl border border-border bg-card px-4 py-3 text-base text-ink placeholder:text-ink-soft/60"}),e.jsx("button",{type:"submit",className:"focus-ring inline-flex shrink-0 items-center justify-center rounded-xl bg-accent px-6 py-3 text-base font-bold text-accent-foreground transition hover:brightness-105",children:"Získat kód"})]}),a==="loading"&&e.jsxs("div",{className:"mt-4 flex items-center gap-3 text-ink",children:[e.jsxs("svg",{className:"h-5 w-5 animate-spin",viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),"Odesíláme…"]}),a==="sent"&&e.jsxs("div",{className:"mt-4 rounded-xl bg-card p-4 text-ink",children:[e.jsx("p",{className:"font-semibold text-brand-deep",children:"Zkontrolujte si e-mail 📧"}),e.jsx("p",{className:"mt-1 text-sm text-ink-soft",children:"Potvrzovací odkaz vám posíláme přes Ecomail. Klikněte na něj — po přesměrování zpět na web se vám slevový kód zobrazí. Pokud e-mail nedorazil, můžete kód vyžádat znovu."}),e.jsx("button",{type:"button",onClick:()=>d("form"),className:"focus-ring mt-3 inline-flex items-center justify-center rounded-full border border-border bg-card px-4 py-2 text-sm font-semibold text-brand-deep transition hover:border-brand/40",children:"Zkusit znovu"})]}),a==="confirmed"&&e.jsxs("div",{className:"mt-4 flex flex-col gap-3 sm:flex-row sm:items-center",children:[e.jsxs("div",{className:"flex items-center gap-3 rounded-xl bg-card px-4 py-3",children:[e.jsx("span",{className:"text-sm text-ink-soft",children:"Váš kód:"}),e.jsx("span",{className:"text-2xl font-bold tracking-wider text-orange-deep",children:c})]}),e.jsx("button",{type:"button",onClick:x,className:"focus-ring inline-flex items-center justify-center gap-2 rounded-xl bg-primary px-5 py-3 text-base font-semibold text-primary-foreground transition hover:brightness-110",children:h?"Zkopírováno ✓":"Zkopírovat kód"})]}),i&&e.jsx("p",{className:"mt-2 text-sm text-destructive",children:i}),e.jsx("p",{className:"mt-3 text-xs text-ink-soft",children:"Váš e-mail předáváme newsletterovému nástroji Ecomail pro potvrzené přihlášení (double opt-in, v souladu s GDPR). Odpovědi z poradce se nikam neodesílají."})]})}function Oe({kat:t,problem:s,forma:o,vek:a,products:d,banner:i}){const l=_(t),{displayedProducts:c,formFallback:b}=m.useMemo(()=>
2{if(!ue(o))return{displayedProducts:d.slice(0,6),formFallback:!1};const k=d.filter(x=>me(x.title,x.shortDescription)===o);return k.length>0?{displayedProducts:k.slice(0,6),formFallback:!1}:{displayedProducts:d.slice(0,6),formFallback:!0}},[d,o]);m.useEffect(()=>{window.scrollTo({top:0,behavior:"smooth"})},[t]);const h=encodeURIComponent(`Dobrý den, poradil jste mi přes web Zdraví bez léků — zajímají mě produkty pro "${l.label}".`);return e.jsxs("main",{className:"mx-auto w-full max-w-6xl px-5 pt-10 pb-16 sm:pt-14",children:[e.jsxs("nav",{"aria-label":"Drobečková navigace",className:"text-sm text-ink-soft",children:[e.jsx("a",{href:"/",className:"hover:text-brand focus-ring rounded",children:"Domů"}),e.jsx("span",{"aria-hidden":!0,children:" / "}),e.jsx("span",{className:"text-ink",children:l.label})]}),e.jsxs("header",{className:"mt-4 max-w-3xl",children:[e.jsxs("span",{className:"inline-flex items-center gap-2 rounded-full bg-mint px-3 py-1 text-sm font-medium text-brand-deep",children:[e.jsx("span",{"aria-hidden":!0,children:l.icon})," ",l.tagline]}),e.jsxs("h1",{className:"mt-3 text-3xl leading-tight font-bold sm:text-4xl",children:["Doporučené produkty — ",l.label]}),e.jsx("p",{className:"mt-3 text-ink-soft",children:l.seoBlurb}),e.jsx("ul",{className:"mt-4 flex flex-wrap gap-2 text-sm","aria-label":"Vaše volba",children:[{k:"Oblast",v:l.label},{k:"Problém",v:I(s)},{k:"Forma",v:I(o)},{k:"Věk",v:I(a)}].map(n=>e.jsxs("li",{className:"rounded-full border border-border bg-card px-3 py-1 text-ink",children:[e.jsxs("span",{className:"text-ink-soft",children:[n.k,":"]})," ",e.jsx("span",{className:"font-medium text-brand-deep",children:n.v})]},n.k))})]}),t==="ocista"&&e.jsxs("figure",{className:"mt-6 overflow-hidden rounded-2xl border border-border bg-card shadow-sm",children:[e.jsx("img",{src:"https://assets.macaly-user-data.dev/cdn-cgi/image/format=webp,width=2000,height=2000,fit=scale-down,quality=90,anim=true/ae4wlo8wnhsj52rmn28pk01z/dphu4hjpsqbrmxulk4960we2/BaSLiqQfr0rTQim08Wp3Z.png",alt:"Očista organismu a detoxikace — přírodní cesta k vitálnímu tělu",className:"h-auto w-full object-cover",loading:"lazy"}),e.jsx("figcaption",{className:"px-4 py-3 text-sm text-ink-soft",children:"Očista organismu je základ přirozené regenerace. Při detoxu podporujeme játra, ledviny, střeva a lymfu — orgány, které se denně starají o odvod toxinů."})]}),i&&e.jsx(Me,{banner:i}),e.jsxs("section",{"aria-label":"Doporučené produkty",className:"mt-8",children:[b&&e.jsxs("div",{className:"mb-4 rounded-xl border border-orange/30 bg-egg p-3 text-sm text-ink",children:["Pro vámi zvolenou formu ",e.jsx("strong",{children:o})," nemáme v této kategorii produkt — zobrazujeme všechny dostupné alternativy."]}),c.length===0?e.jsx("div",{className:"rounded-2xl border border-dashed border-border bg-muted p-10 text-center",children:e.jsx("p",{className:"text-ink-soft",children:"Produkty pro tuto oblast se připravují v e-shopu. Zkuste to za chvíli nebo nás kontaktujte na WhatsAppu."})}):e.jsx("div",{className:"grid grid-cols-1 gap-5 sm:grid-cols-2 lg:grid-cols-3",children:c.map(n=>e.jsxs("article",{className:"flex flex-col rounded-2xl border border-border bg-card p-4 shadow-sm transition hover:shadow-md",children:[e.jsx(Ae,{src:n.imageLink,alt:n.title}),e.jsxs("div",{className:"mt-3 flex flex-1 flex-col",children:[n.brand&&e.jsx("span",{className:"text-xs font-medium uppercase tracking-wide text-brand",children:n.brand}),e.jsx("h2",{className:"mt-1 text-base leading-snug font-semibold text-brand-deep",children:n.title}),n.shortDescription&&e.jsx("p",{className:"mt-2 text-sm text-ink-soft",children:n.shortDescription}),e.jsxs("div",{className:"mt-3 flex items-center justify-between gap-2",children:[n.priceText?e.jsx("span",{className:"text-lg font-bold text-ink",children:n.priceText}):e.jsx("span",{className:"text-sm text-ink-soft",children:"Cena v e-shopu"}),e.jsx("span",{className:"text-xs text-ink-soft",children:n.availability})]}),e.jsxs("a",{href:n.shopUrl,target:"_blank",rel:"noopener noreferrer",className:"focus-ring mt-4 inline-flex items-center justify-center gap-2 rounded-full bg-primary px-4 py-2.5 text-sm font-semibold text-primary-foreground transition hover:brightness-110",onClick:()=>g("open_shop",{location:"product_card",product_id:n.sourceId,product_title:n.title}
2),children:["Do e-shopu",e.jsx("span",{"aria-hidden":!0,children:"↗"})]})]})]},n._id))})]}),e.jsx("section",{"aria-label":"AI poradce",className:"mt-8",children:e.jsx(Pe,{kat:t,problem:s,forma:o,vek:a,sourceIds:l.productSourceIds})}),e.jsxs("section",{"aria-label":"Sleva a kontakt",className:"mt-10 grid grid-cols-1 gap-5 lg:grid-cols-2",children:[e.jsx(Ze,{kat:t}),e.jsxs("div",{className:"rounded-2xl border border-border bg-card p-6 sm:p-8",children:[e.jsx("h2",{className:"text-xl font-bold sm:text-2xl text-brand-deep",children:"Chcete se poradit?"}),e.jsx("p",{className:"mt-2 text-ink-soft",children:"Nevíte, který produkt si vybrat? Napište nám na WhatsApp — poradíme vám osobně a pomůžeme s výběrem přírodních doplňků."}),e.jsxs("a",{href:`${X}?text=${h}`,target:"_blank",rel:"noopener noreferrer",className:"focus-ring mt-5 inline-flex items-center justify-center gap-3 rounded-full bg-accent px-6 py-3 text-base font-bold text-accent-foreground shadow-sm transition hover:brightness-105",onClick:()=>g("open_whatsapp",{category:l.label}),children:[e.jsx("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:e.jsx("path",{d:"M12.04 2c-5.5 0-9.96 4.46-9.96 9.96 0 1.76.46 3.48 1.34 5L2 22l5.2-1.36a9.9 9.9 0 0 0 4.84 1.26h.01c5.5 0 9.96-4.46 9.96-9.96S17.54 2 12.04 2zm5.84 14.06c-.25.7-1.44 1.36-1.98 1.4-.53.06-1.02.26-3.44-.72-2.9-1.14-4.74-4.1-4.88-4.28-.14-.18-1.16-1.54-1.16-2.94 0-1.4.74-2.08 1-2.36.26-.28.56-.34.74-.34.18 0 .38 0 .54.02.18.02.42-.07.66.5.25.6.84 2.06.92 2.2.08.16.12.34.02.52-.1.18-.16.3-.3.46-.16.16-.32.36-.46.48-.16.14-.32.3-.14.56.18.26.8 1.32 1.72 2.14 1.18 1.06 2.18 1.4 2.44 1.56.26.16.42.14.58-.08.16-.22.66-.78.84-1.04.18-.28.36-.22.6-.14.24.08 1.5.72 1.76.84.26.14.44.2.5.3.06.12.06.66-.19 1.36z"})}),"Napsat na WhatsApp"]}),e.jsxs("p",{className:"mt-3 text-sm text-ink-soft",children:["Telefon: ",e.jsx("a",{href:`tel:${U.replace(/\s/g,"")}`,className:"font-medium text-brand hover:underline",children:U})]})]})]}),e.jsxs("div",{className:"mt-10 flex flex-col gap-3 sm:flex-row sm:items-center",children:[e.jsxs("a",{href:"/",className:"focus-ring inline-flex items-center justify-center gap-2 rounded-full border border-border bg-card px-5 py-3 text-sm font-semibold text-brand-deep transition hover:border-brand/40",children:[e.jsx("span",{"aria-hidden":!0,children:"←"})," Zkusit jinou oblast"]}),e.jsx(ze,{kat:t,problem:s,forma:o,vek:a,products:c})]})]})}const Fe=[{"@context":"https://schema.org","@type":"Service",name:"Zdravotní poradce Zdraví bez léků",serviceType:"Poradenství při výběru přírodních doplňků stravy a kosmetiky",areaServed:"CZ",description:"Personalizovaný online poradce, který na základě 4 otázek doporučí až 6 přírodních produktů z e-shopu Zdraví bez léků a nabídne slevu 5 % po potvrzení e-mailu.",provider:{"@type":"Organization",name:"Zdraví bez léků",url:"https://www.zdravibezleku.cz/"}},{"@context":"https://schema.org","@type":"FAQPage",mainEntity:[{"@type":"Question",name:"Jak zdravotní poradce funguje?",acceptedAnswer:{"@type":"Answer",text:"Odpovíte na 4 otázky — zdravotní oblast, konkrétní problém, oblíbená forma produktu a věková kategorie. Na základě volby vám poradce doporučí až 6 přírodních produktů z e-shopu Zdraví bez léků. Celý proces trvá asi 2 minuty."}},{"@type":"Question",name:"Je doporučení poradce zdarma?",acceptedAnswer:{"@type":"Answer",text:"Ano, poradce je zcela zdarma. Po dokončení kvízu navíc získáte slevu 5 % pro nákup v e-shopu — kód se odemkne po potvrzení e-mailu."}},{"@type":"Question",name:"Jak získám slevový kód?",acceptedAnswer:{"@type":"Answer",text:"Po zobrazení doporučených produktů zadejte e-mail. Pošleme vám potvrzovací odkaz přes Ecomail (double opt-in) a jakmile na něj kliknete, slevový kód se odemkne. Odpovědi z poradce se nikam neodesílají."}},{"@type":"Question",name:"Odesílá poradce moje data někam?",acceptedAnswer:{"@type":"Answer",text:"Odpovědi z poradce zůstávají ve vašem prohlížeči. Váš e-mail předáváme newsletterovému nástroji Ecomail pro potvrzené přihlášení (double opt-in), v souladu s GDPR."}}]}];function Ve(){const{preloadedProducts:t,preloadedBanner:s}=J.useLoaderData(),o=$(t),a=$(s),d=J.useSearch(),i=xe(),l=pe(d.kat)?d.kat:null,c=typeof d.potvrdit=="string"&&d.potvrdit.length>0;return e.jsxs(e.Fragment,{children:[c&&e.jsx(be,{email:d.potvrdit}),l?e.jsx(Oe,{kat:l,problem:d.problem,forma:d.forma,vek:d.vek,products:o,banner:a}):e.jsxs(e.Fragment,{children:[e.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(Fe)}}),e.jsx(je,{banner:a}),e.jsx(Ne,{onSubmit:b=>i({to:"/",search:b})}),e.jsx("footer",{className:"border-t border-border bg-muted",children:e.jsxs("div",{className:"mx-auto w-full max-w-6xl px-5 py-8 text-sm text-ink-soft",children:[e.jsxs("div",{className:"flex flex-col items-start justify-between gap-4 sm:flex-row",children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-semibold text-brand-deep",children:"Zdraví bez léků"}),e.jsx("p",{className:"mt-1",children:"Přírodní doplňky stravy a kosmetika z českého e-shopu. Poradce doporučuje produkty na základě vaší volby — nenahrazuje lékařskou konzultaci."})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("a",{href:"/",className:"hover:text-brand focus-ring rounded",children:"Domů"}),e.jsx("a",{href:"#oblasti",className:"hover:text-brand focus-ring rounded",children:"Zdravotní oblasti"}),e.jsx("a",{href:"/admin",className:"hover:text-brand focus-ring rounded",children:"Přihlášení do administrace"})]})]}),e.jsxs("p",{className:"mt-6 text-xs",children:["© ",new Date().getFullYear()," Zdraví bez léků. Doporučení poradce jsou orientační. Při zdravotních potížích vyhledejte lékaře."]}),e.jsx("p",{className:"mt-4 text-xs",children:e.jsx("a",{href:"https://www.macaly.com/?referral_code=PAM2TNOX",target:"_blank",rel:"noopener noreferrer",className:"hover:text-brand focus-ring rounded",children:"Tento průvodce vznikl s pomocí Macaly — zkuste to taky"})})]})})]})]})}export{Ve 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.