1import{r as m,j as e}from"./vendor-query-Oyu1rd__.js";import{bP as _,o as X,s as c,l as Y,B as Z,bQ as G,G as k,bE as H,bO as W}from"./index-th7DM8Ut.js";import{T as Q}from"./textarea-DaMEciff.js";import{S as ee,a as re,b as se,c as ae,d as te}from"./select-D90LC23l.js";import{aR as oe,L as E,aS as ne,b6 as le,J as ce,aA as I,j as ie,a7 as R,U as de,w as me,K as xe,ai as pe,a8 as ue,aj as S,X as he,t as C}from"./vendor-ui-epaFV1ME.js";import{u as be,e as ge,F as p,a as u,b as h,c as b,d as g,C as fe,t as je}from"./zod-CXzbUgIT.js";import{F as ve}from"./page-animations-CS0ik7BI.js";import Ne from"./not-found-CSBcHR_g.js";import{u as we}from"./vendor-i18n-rNDOJrVQ.js";import"./vendor-motion-C_1A7OQ1.js";import"./index-IOqQbuWX.js";import"./index-BQ-4a83e.js";import"./label-7Fz2tI6l.js";import"./unicorn-mascot-CCBGe0sy.js";const O="/api",ye=10*1024*1024,ke=["application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/rtf","text/rtf","text/plain","image/jpeg","image/png","image/webp"];function f({children:j,className:v=""}){const[t,r]=m.useState(!1);return e.jsxs("div",{className:v,children:[j({onFocus:()=>r(!0),onBlur:()=>r(!1)}),e.jsx(ve,{focused:t,className:"text-foreground"})]})}function Ve(){const[,j]=oe("/kariera/:slug"),v=j?.slug||"",t=_(v),{t:r}=we(),[T,N]=m.useState(!1),[$,q]=m.useState(!1),[i,l]=m.useState(null),[P,w]=m.useState(null);if(!t)return e.jsx(Ne,{});const z=t.icon,D=`https://cbdsvet.cz/kariera/${t.slug}`,F=X({name:c().min(2,r("careers.nameRequired")),email:c().email(r("careers.invalidEmail")),phone:c().min(9,r("careers.phoneRequired")),branch:c().optional(),message:c().min(10,r("careers.messageMinLength"))}),L=t.requiresBranch?F.extend({branch:c().min(1,r("careers.branchRequired","Vyberte poboÄku"))}):F,n=be({resolver:je(L),defaultValues:{name:"",email:"",phone:"",branch:"",message:""}}),M=s=>{w(null);const a=s.target.files?.[0]||null;if(!a){l(null);return}if(a.size>ye){w(r("careers.cvTooLarge","Soubor je pÅÃliÅ¡ velký (max 10 MB).")),l(null),s.target.value="";return}if(!ke.includes(a.type)&&!/\.(pdf|docx?|rtf|txt|jpe?g|png|webp)$/i.test(a.name)){w(r("careers.cvInvalidType","Povolené formáty: PDF, DOC, DOCX, RTF, TXT, JPG, PNG, WEBP.")),l(null),s.target.value="";return}l(a)},V=async s=>{const a=await fetch(`${O}/storage/uploads/career-cv/request-url`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:s.name,size:s.size,contentType:s.type||"application/octet-stream"})});if(!a.ok)throw new Error("upload-url-failed");const{uploadURL:o,objectPath:B,metadata:d}=await a.json();if(!(await fetch(o,{method:"PUT",headers:{"Content-Type":d.contentType},body:s})).ok)throw new Error("upload-put-failed");return{url:`${window.location.origin}/api/storage${B}`,filename:s.name}},U=async s=>{N(!0);try{let a;if(i)try{const d=await V(i);d&&(a={cvUrl:d.url,cvFilename:d.filename})}catch{C.error(r("careers.cvUploadFailed","NepodaÅilo se nahrát CV. Zkuste to prosÃm znovu.")),N(!1);return}const o={name:s.name,email:s.email,phone:s.phone,position:t.id,branch:t.requiresBranch?s.branch:null,message:s.message,...a||{}};if(!(await fetch(`${O}/careers/apply`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)})).ok)throw new Error("Failed to submit");q(!0),C.success(r("careers.successMessage"),{description:r("careers.successDescription")}),n.reset(),l(null)}catch{C.error(r("careers.errorMessage"))}finally{N(!1)}},A=[...t.descriptionItems.map(s=>`⢠${r(s)}`),"",r("careers.requirements","Požadavky")+":",...t.requirementItems.map(s=>`⢠${r(s)}`),"",r("careers.weOffer","Co nabÃzÃme")+":",...t.offerItems.map(s=>`⢠${r(s)}`)],x=r(t.titleKey),J=r("careers.detailMetaTitle","{{title}} â Kariéra | CBDsvÄt.cz",{title:x}),y=t.descriptionItems.slice(0,3).map(s=>r(s)).join(" · "),K=y.length>155?y.slice(0,152).replace(/\s+\S*$/,"")+"â¦":y;return e.jsxs("div",{className:"relative overflow-hidden",children:[e.jsx(Y,{path:`/kariera/${t.slug}`,title:J,description:K}),e.jsx(Z,{segments:[{label:r("careers.title","Kariéra"),href:"/kariera"}
1,{label:x}]}),e.jsx(G,{identifier:`cbdsvet-${t.id}`,title:x,description:A.join(` 2`),employmentType:t.employmentType,jobLocation:{addressLocality:t.requiresBranch?"Äeská republika":"Praha",addressCountry:"CZ",...t.requiresBranch?{}:{streetAddress:"PlzeÅská 2576/210",postalCode:"150 00"}},applyUrl:D}),e.jsxs("section",{className:"relative py-16 md:py-20 overflow-hidden border-b border-border",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-[var(--brand-gold)]/5 to-transparent pointer-events-none"}),e.jsxs("div",{className:"container mx-auto px-4 relative z-10 max-w-3xl",children:[e.jsxs(E,{href:"/kariera",className:"inline-flex items-center gap-1.5 text-xs font-bold uppercase tracking-widest text-muted-foreground hover:text-[var(--brand-gold)] transition-colors mb-6",children:[e.jsx(ne,{className:"h-3.5 w-3.5"}),r("careers.backToPositions","ZpÄt na pozice")]}),e.jsxs("div",{className:"flex items-start gap-4 mb-4",children:[e.jsx("div",{className:"w-14 h-14 border border-[var(--brand-gold)]/40 flex items-center justify-center shrink-0 bg-[var(--brand-gold)]/5",children:e.jsx(z,{className:"h-6 w-6 text-[var(--brand-gold)]"})}),e.jsxs("div",{children:[e.jsxs("div",{className:"inline-flex items-center gap-2 border border-[var(--brand-gold)] px-3 py-1 text-xs text-[var(--brand-gold)] font-bold uppercase tracking-widest mb-3",children:[e.jsx(le,{size:12}),r(t.fullTimeKey)]}),e.jsx("h1",{className:"font-display text-3xl md:text-5xl font-black uppercase text-foreground",children:x})]})]}),e.jsx("p",{className:"text-muted-foreground text-base md:text-lg mt-4",children:r(t.shortKey)})]})]}),e.jsx("section",{className:"container mx-auto px-4 py-16 max-w-5xl",children:e.jsxs("div",{className:"grid md:grid-cols-3 gap-8",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx(ce,{className:"h-4 w-4 text-[var(--brand-gold)]"}),e.jsx("h3",{className:"text-sm font-bold text-foreground uppercase tracking-wider",children:r("careers.responsibilities")})]}),e.jsx("ul",{className:"space-y-2",children:t.descriptionItems.map((s,a)=>e.jsxs("li",{className:"flex items-start gap-2 text-muted-foreground text-sm",children:[e.jsx("span",{className:"w-1 h-1 bg-[var(--brand-gold)] rounded-full mt-2 shrink-0"}),r(s)]},a))})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx(I,{className:"h-4 w-4 text-[var(--brand-gold)]"}),e.jsx("h3",{className:"text-sm font-bold text-foreground uppercase tracking-wider",children:r("careers.requirements")})]}),e.jsx("ul",{className:"space-y-2",children:t.requirementItems.map((s,a)=>e.jsxs("li",{className:"flex items-start gap-2 text-muted-foreground text-sm",children:[e.jsx("span",{className:"w-1 h-1 bg-[var(--brand-gold)] rounded-full mt-2 shrink-0"}),r(s)]},a))})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx(ie,{className:"h-4 w-4 text-[var(--brand-gold)]"}),e.jsx("h3",{className:"text-sm font-bold text-foreground uppercase tracking-wider",children:r("careers.weOffer")})]}),e.jsx("ul",{className:"space-y-2",children:t.offerItems.map((s,a)=>e.jsxs("li",{className:"flex items-start gap-2 text-muted-foreground text-sm",children:[e.jsx("span",{className:"w-1 h-1 bg-[var(--brand-gold)] rounded-full mt-2 shrink-0"}),r(s)]},a))})]})]})}),e.jsxs("section",{className:"container mx-auto px-4 py-16 max-w-3xl border-t border-border",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[e.jsx("div",{className:"w-10 h-10 border border-[var(--brand-gold)] flex items-center justify-center",children:e.jsx(R,{className:"h-4 w-4 text-[var(--brand-gold)]"})}),e.jsx("h2",{className:"font-display text-2xl md:text-3xl font-black uppercase text-foreground",children:r("careers.applyTitle")})]}),$?e.jsxs("div",{className:"bg-card border border-[var(--brand-gold)]/30 p-8 text-center",children:[e.jsx("div",{className:"w-16 h-16 border border-[var(--brand-gold)] flex items-center justify-center mx-auto mb-4",children:e.jsx(I,{className:"h-8 w-8 text-[var(--brand-gold)]"})}),e.jsx("h3",{className:"font-display text-xl font-black uppercase text-foreground mb-2",children:r("careers.thankYouTitle")}),e.jsx("p",{className:"text-muted-foreground",children:r("careers.thankYouText")})]}):e.jsx("div",{className:"bg-card border border-border p-6 md:p-8",children:e.jsx(ge,{...n,children:e.jsxs("form",{onSubmit:n.handleSubmit(U),className:"space-y-5",children:[e.jsxs("div",{className:"grid sm:grid-cols-2 gap-5",children:[e.jsx(p,{control:n.control,name:"name",render:({field:s})=>e.jsxs(u,{children:[e.jsxs(h,{className:"text-xs font-bold text-muted-foreground uppercase tracking-widest flex items-center gap-1.5",children:[e.jsx(de,{className:"h-3 w-3"}),r("careers.name")]}),e.jsx(f,{children:({onFocus:a,onBlur:o})=>e.jsx(b,{children:e.jsx(k,{placeholder:r("careers.namePlaceholder"),className:"h-11 bg-card border-border text-foreground placeholder:text-muted-foreground border-b-0 rounded-b-none",...s,onFocus:()=>a(),onBlur:()=>{s.onBlur(),o()}})})}),e.jsx(g,{})]})}),e.jsx(p,{control:n.control,name:"email",render:({field:s})=>e.jsxs(u,{children:[e.jsxs(h,{className:"text-xs font-bold text-muted-foreground uppercase tracking-widest flex items-center gap-1.5",children:[e.jsx(me,{className:"h-3 w-3"}),r("careers.email")]}),e.jsx(f,{children:({onFocus:a,onBlur:o})=>e.jsx(b,{children:e.jsx(k,{type:"email",placeholder:r("careers.emailPlaceholder"),className:"h-11 bg-card border-border text-foreground placeholder:text-muted-foreground border-b-0 rounded-b-none",...s,onFocus:()=>a(),onBlur:()=>{s.onBlur(),o()}})})}),e.jsx(g,{})]})})]}),e.jsxs("div",{className:"grid sm:grid-cols-2 gap-5",children:[e.jsx(p,{control:n.control,name:"phone",render:({field:s})=>e.jsxs(u,{children:[e.jsxs(h,{className:"text-xs font-bold text-muted-foreground uppercase tracking-widest flex items-center gap-1.5",children:[e.jsx(xe,{className:"h-3 w-3"}),r("careers.phone")]}),e.jsx(f,{children:({onFocus:a,onBlur:o})=>e.jsx(b,{children:e.jsx(k,{type:"tel",placeholder:r("careers.phonePlaceholder"),className:"h-11 bg-card border-border text-foreground placeholder:text-muted-foreground border-b-0 rounded-b-none",...s,onFocus:()=>a(),onBlur:()=>{s.onBlur(),o()}})})}),e.jsx(g,{})]})}),t.requiresBranch&&e.jsx(fe,{control:n.control,name:"branch",render:({field:s,fieldState:a})=>e.jsxs("div",{className:"space-y-2",children:[e.jsxs("label",{className:"text-xs font-bold text-muted-foreground uppercase tracking-widest flex items-center gap-1.5",children:[e.jsx(pe,{className:"h-3 w-3"}),r("careers.branch","PoboÄka")]}),e.jsxs(ee,{onValueChange:s.onChange,value:s.value||"",children:[e.jsx(re,{className:"h-11 bg-card border-border text-foreground",children:e.jsx(se,{placeholder:r("careers.branchPlaceholder","Vyberte poboÄku")})}),e.jsx(ae,{className:"bg-card border-border",children:H.map(o=>e.jsx(te,{value:o.id,className:"text-foreground hover:bg-white/5",children:o.city},o.id))})]}),a.error&&e.jsx("p",{className:"text-[0.8rem] font-medium text-destructive",children:a.error.message})]})})]}),e.jsx(p,{control:n.control,name:"message",render:({field:s})=>e.jsxs(u,{children:[e.jsxs(h,{className:"text-xs font-bold text-muted-foreground uppercase tracking-widest flex items-center gap-1.5",children:[e.jsx(ue,{className:"h-3 w-3"}),r("careers.message")]}),e.jsx(f,{children:({onFocus:a,onBlur:o})=>e.jsx(b,{children:e.jsx(Q,{placeholder:r("careers.messagePlaceholder"),className:"min-h-[140px] resize-y bg-card border-border text-foreground placeholder:text-muted-foreground border-b-0 rounded-b-none",...s,onFocus:()=>a(),onBlur:()=>{s.onBlur(),o()}})})}),e.jsx(g,{})]})}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("label",{className:"text-xs font-bold text-muted-foreground uppercase tracking-widest flex items-center gap-1.5",children:[e.jsx(S,{className:"h-3 w-3"}),r("careers.cvLabel","Životopis (volitelné)")]}),i?e.jsxs("div",{className:"flex items-center justify-between gap-3 px-3 py-2.5 border border-[var(--brand-gold)]/30 bg-[var(--brand-gold)]/5",children:[e.jsxs("span",{className:"text-sm text-foreground truncate flex items-center gap-2",children:[e.jsx(S,{className:"h-3.5 w-3.5 text-[var(--brand-gold)] shrink-0"}),e.jsx("span",{className:"truncate",children:i.name}),e.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:["(",Math.round(i.size/1024)," kB)"]})]}),e.jsx("button",{type:"button",onClick:()=>l(null),className:"text-muted-foreground hover:text-destructive shrink-0","aria-label":r("careers.cvRemove","Odebrat soubor"),children:e.jsx(he,{className:"h-4 w-4"})})]}):e.jsxs("label",{className:"flex items-center justify-center gap-2 h-11 border border-dashed border-border bg-card text-sm text-muted-foreground hover:border-[var(--brand-gold)]/50 hover:text-foreground transition-colors cursor-pointer",children:[e.jsx(S,{className:"h-4 w-4"}),e.jsx("span",{children:r("careers.cvUpload","Nahrát CV (PDF, DOC, DOCX â max 10 MB)")}),e.jsx("input",{type:"file",accept:".pdf,.doc,.docx,.rtf,.txt,.jpg,.jpeg,.png,.webp,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/rtf,text/plain,image/jpeg,image/png,image/webp",className:"hidden",onChange:M})]}),P&&e.jsx("p",{className:"text-[0.8rem] font-medium text-destructive",children:P}),e.jsx("p",{className:"text-[0.7rem] text-muted-foreground",children:r("careers.cvHelp","MotivaÄnà text napiÅ¡te do pole âZprávaâ. Soubor je volitelný.")})]}),e.jsxs("button",{type:"submit",disabled:T,className:"w-full h-12 gold-gradient text-[#0a0a0a] font-black uppercase tracking-widest flex items-center justify-center gap-2 hover:scale-[1.02] active:scale-[0.98] transition-all disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:scale-100",children:[e.jsx(R,{className:"h-4 w-4"}),r(T?"careers.sending":"careers.send")]})]})})}),e.jsxs("div",{className:"mt-12 text-center",children:[e.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:r("careers.otherPositions","Dalšà otevÅené pozice:")}),e.jsx("div",{className:"flex flex-wrap gap-2 justify-center",children:W.filter(s=>s.id!==t.id).map(s=>e.jsx(E,{href:`/kariera/${s.slug}`,className:"text-xs font-bold uppercase tracking-widest px-3 py-1.5 border border-border hover:border-[var(--brand-gold)]/50 hover:text-[var(--brand-gold)] transition-colors",children:r(s.titleKey)},s.id))})]})]})]})}export{Ve 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.