1import{l as e,o as t,s as n,t as r}from"./button-DJSK5Nkr.js";import{a as i,d as a,g as o,h as s,i as c,r as l,s as u,v as d}from"./types-b_hvzd1J.js";import{t as f}from"./link-C9yD1PkQ.js";import{t as p}from"./arrow-left-2M-r8OTe.js";import{n as m,t as h}from"./LeadHiddenFields-DmmlPCTj.js";var g=e(n()),_=t(),v=[`веÑеÑинаÑам`,`веÑеÑинаÑнÑм клиникам`,`гÑÑмеÑам`,`pet-ÑиÑÑеÑам`,`ÑпеÑиалиÑÑам по вÑгÑлÑ`,`кинологам`,`зоопÑÐ¸Ñ Ð¾Ð»Ð¾Ð³Ð°Ð¼`,`диеÑологам`,`онлайн-ÑкÑпеÑÑам`],y=[`заÑвки Ð¾Ñ Ð²Ð»Ð°Ð´ÐµÐ»ÑÑев пиÑомÑев`,`каÑÑоÑÐºÑ Ð² каÑалоге`,`возможноÑÑÑ Ð¿ÑинимаÑÑ Ð·Ð°ÐºÐ°Ð·Ñ`,`пÑозÑаÑнÑÑ Ð°Ð½Ð°Ð»Ð¸ÑÐ¸ÐºÑ Ð¿Ð¾ заÑвкам в бÑдÑÑем`,`поддеÑÐ¶ÐºÑ Ð½Ð° ÑÑапе подклÑÑениÑ`],b=[`ÐеÑеÑинаÑ`,`ÐеÑеÑинаÑÐ½Ð°Ñ ÐºÐ»Ð¸Ð½Ð¸ÐºÐ°`,`ÐÑÑмеÑ`,`Pet-ÑиÑÑÐµÑ / нÑнÑ`,`СпеÑиалиÑÑ Ð¿Ð¾ вÑгÑлÑ`,`Ðинолог`,`ÐоопÑÐ¸Ñ Ð¾Ð»Ð¾Ð³`,`ÐиеÑолог`,`Ðнлайн-ÑкÑпеÑÑ`,`ÐÑÑгое`],x=c({name:i().trim().min(2,`УкажиÑе Ð¸Ð¼Ñ Ð¸Ð»Ð¸ название`).max(120),role:i().min(1,`ÐÑбеÑиÑе Ñип ÑпеÑиалиÑÑа`),city:i().min(1,`ÐÑбеÑиÑе гоÑод`),phone:i().trim().min(10,`ÐÑовеÑÑÑе Ð½Ð¾Ð¼ÐµÑ ÑелеÑона`).max(20).regex(/^[\d\s()+-]+$/,`ТолÑко ÑиÑÑÑ Ð¸ + ( ) -`),messenger:i().trim().max(100),link:i().trim().max(255),experience:i().trim().min(10,`ÐоÑоÑко опиÑиÑе опÑÑ`).max(1e3),comment:i().trim().max(1e3),consent:l(!0,{errorMap:()=>({message:`ÐÑжно ÑоглаÑие`})})}),S=`mt-2 h-12 w-full rounded-2xl border border-border bg-secondary/40 px-4 text-base outline-none transition-colors focus:border-primary`;function C(){let[e,t]=(0,g.useState)({name:``,role:``,city:``,phone:``,messenger:``,link:``,experience:``,comment:``}),[n,i]=(0,g.useState)(!1),[c,l]=(0,g.useState)({}),[C,w]=(0,g.useState)(!1),T=e=>n=>t(t=>({...t,[e]:n.target.value})),[E,D]=(0,g.useState)(!1),O=async t=>{t.preventDefault();let r=x.safeParse({...e,consent:n});if(!r.success){let e={};for(let t of r.error.issues)e[String(t.path[0])]??=t.message;l(e);return}l({}),D(!0);let i=crypto.randomUUID(),{error:a}=await d.from(`partner_applications`).insert({id:i,name:e.name.trim(),role:e.role,activity:e.experience.trim().slice(0,300),about:e.experience.trim(),city:e.city,contact:e.phone.trim(),messenger:e.messenger.trim()||null,link:e.link.trim()||null,comment:e.comment.trim()||null});if(D(!1),a){l({form:`Ðе ÑдалоÑÑ Ð¾ÑпÑавиÑÑ Ð·Ð°ÑвкÑ. ÐопÑобÑйÑе еÑÑ Ñаз.`});return}u(`partner_application`,i),o({type:`partner_request`,name:e.name.trim(),phone:e.phone.trim(),messenger:e.messenger.trim()||null,service:e.role,city:e.city,comment:[e.experience.trim(),e.link.trim(),e.comment.trim()].filter(Boolean).join(` 2`),source:`СÑаÑÑ Ð¿Ð°ÑÑнÑÑом`}),w(!0)},k=e=>c[e]&&(0,_.jsx)(`p`,{className:`mt-1 text-sm text-destructive`,children:c[e]});return(0,_.jsxs)(`main`,{className:`mx-auto max-w-5xl px-4 py-10 lg:py-14`,children:[(0,_.jsxs)(f,{to:`/marketplace`,className:`inline-flex items-center gap-2 text-sm font-semibold text-muted-foreground hover:text-foreground`,children:[(0,_.jsx)(p,{className:`h-4 w-4`}),` Ðазад в маÑкеÑплейÑ`]}),(0,_.jsx)(`h1`,{className:`mt-6 max-w-3xl font-display text-4xl font-extrabold leading-tight tracking-tight sm:text-5xl`,children:`СÑанÑÑе паÑÑнÑÑом ÐÐµÑ ÐÑивеÑ`}),(0,_.jsx)(`p`,{className:`mt-4 max-w-2xl text-lg text-muted-foreground`,children:`ÐÑли Ð²Ñ Ð²ÐµÑеÑинаÑ, гÑÑмеÑ, догÑиÑеÑ, нÑнÑ, ÑпеÑиалиÑÑ Ð¿Ð¾ вÑгÑÐ»Ñ Ð¸Ð»Ð¸ онлайн-ÑкÑпеÑÑ â оÑÑавÑÑе заÑвкÑ, и Ð¼Ñ ÑаÑÑкажем, как подклÑÑиÑÑÑÑ Ðº маÑкеÑплейÑÑ.`}),(0,_.jsxs)(`div`,{className:`mt-12 grid gap-6 md:grid-cols-2`,children:[(0,_.jsxs)(`section`,{className:`rounded-3xl border border-border bg-card p-6`,children:[(0,_.jsx)(`h2`,{className:`font-display text-2xl font-extrabold`,children:`ÐÐ¾Ð¼Ñ Ð¿Ð¾Ð´Ñ Ð¾Ð´Ð¸Ñ`}),(0,_.jsx)(`ul`,{className:`mt-4 flex flex-wrap gap-2`,children:v.map(e=>(0,_.jsx)(`li`,{className:`rounded-full bg-secondary px-3 py-1.5 text-sm font-semibold`,children:e},e))})]}),(0,_.jsxs)(`section`,{className:`rounded-3xl border border-border bg-card p-6`,children:[(0,_.jsx)(`h2`,{className:`font-display text-2xl font-extrabold`,children:`ЧÑо полÑÑÐ°ÐµÑ Ð¿Ð°ÑÑнÑÑ`}),(0,_.jsx)(`ul`,{className:`mt-4 space-y-2`,children:y.map(e=>(0,_.jsxs)(`li`,{className:`flex gap-2 text-muted-foreground`,children:[(0,_.jsx)(m,{className:`mt-0.5 h-5 w-5 shrink-0 text-primary`}),e]},e))})]})]}),(0,_.jsx)(`section`,{id:`form`,className:`mt-12 rounded-[2rem] border border-border bg-card p-6 shadow-sm sm:p-10`,children:C?(0,_.jsxs)(`div`,{className:`py-10 text-center`,children:[(0,_.jsx)(m,{className:`mx-auto h-14 w-14 text-primary`}),(0,_.jsx)(`p`,{className:`mt-4 font-display text-2xl font-extrabold`,children:a})]}):(0,_.jsxs)(`form`,{onSubmit:O,noValidate:!0,id:`partner-form`,...s(`partner_request`,`partner_form`,`partners`),children:[(0,_.jsx)(h,{}),(0,_.jsx)(`h2`,{className:`font-display text-2xl font-extrabold sm:text-3xl`,children:`ÐаÑвка паÑÑнÑÑа`}),(0,_.jsxs)(`div`,{className:`mt-6 grid gap-5 sm:grid-cols-2`,children:[(0,_.jsxs)(`label`,{className:`block font-semibold`,children:[`ÐÐ¼Ñ Ð¸Ð»Ð¸ название компании *`,(0,_.jsx)(`input`,{className:S,maxLength:120,id:`name`,name:`name`,value:e.name,onChange:T(`name`)}),k(`name`)]}),(0,_.jsxs)(`label`,{className:`block font-semibold`,children:[`Тип ÑпеÑиалиÑÑа *`,(0,_.jsxs)(`select`,{className:S,id:`service`,name:`service`,value:e.role,onChange:T(`role`),
2children:[(0,_.jsx)(`option`,{value:``,children:`ÐÑбеÑиÑе Ñип`}),b.map(e=>(0,_.jsx)(`option`,{children:e},e))]}),k(`role`)]}),(0,_.jsxs)(`label`,{className:`block font-semibold`,children:[`ÐоÑод *`,(0,_.jsxs)(`select`,{className:S,id:`city`,name:`city`,value:e.city,onChange:T(`city`),children:[(0,_.jsx)(`option`,{value:``,children:`ÐÑбеÑиÑе гоÑод`}),(0,_.jsx)(`option`,{children:`ÐоÑква`}),(0,_.jsx)(`option`,{children:`СанкÑ-ÐеÑеÑбÑÑг`}),(0,_.jsx)(`option`,{children:`Ðнлайн (вÑÑ Ð Ð¾ÑÑиÑ)`})]}),k(`city`)]}),(0,_.jsxs)(`label`,{className:`block font-semibold`,children:[`ТелеÑон *`,(0,_.jsx)(`input`,{className:S,inputMode:`tel`,maxLength:20,id:`phone`,name:`phone`,value:e.phone,onChange:T(`phone`),placeholder:`+7 999 123-45-67`}),k(`phone`)]}),(0,_.jsxs)(`label`,{className:`block font-semibold`,children:[`Ðик в Telegram`,(0,_.jsx)(`input`,{className:S,maxLength:100,id:`messenger`,name:`messenger`,value:e.messenger,onChange:T(`messenger`),placeholder:`@username`})]}),(0,_.jsxs)(`label`,{className:`block font-semibold`,children:[`Ð¡Ð°Ð¹Ñ Ð¸Ð»Ð¸ ÑоÑÑеÑи, еÑли еÑÑÑ`,(0,_.jsx)(`input`,{className:S,maxLength:255,id:`link`,name:`link`,value:e.link,onChange:T(`link`)})]}),(0,_.jsxs)(`label`,{className:`block font-semibold sm:col-span-2`,children:[`ÐÑаÑкое опиÑание опÑÑа *`,(0,_.jsx)(`textarea`,{className:`${S} h-28 py-3`,maxLength:1e3,id:`experience`,name:`experience`,value:e.experience,onChange:T(`experience`)}),k(`experience`)]}),(0,_.jsxs)(`label`,{className:`block font-semibold sm:col-span-2`,children:[`ÐомменÑаÑий`,(0,_.jsx)(`textarea`,{className:`${S} h-24 py-3`,maxLength:1e3,id:`comment`,name:`comment`,value:e.comment,onChange:T(`comment`)})]})]}),(0,_.jsxs)(`label`,{className:`mt-6 flex items-start gap-3 text-sm text-muted-foreground`,children:[(0,_.jsx)(`input`,{type:`checkbox`,checked:n,onChange:e=>i(e.target.checked),className:`mt-0.5 h-5 w-5 accent-primary`}),(0,_.jsxs)(`span`,{children:[`Я ÑоглаÑаÑÑÑ Ð½Ð° обÑабоÑÐºÑ Ð¿ÐµÑÑоналÑнÑÑ
даннÑÑ
в ÑооÑвеÑÑÑвии Ñ`,` `,(0,_.jsx)(`a`,{href:`https://petprivet.online/privacy`,target:`_blank`,rel:`noopener noreferrer`,className:`font-semibold text-foreground underline`,children:`полиÑикой конÑиденÑиалÑноÑÑи`})]})]}),k(`consent`),k(`form`),(0,_.jsx)(r,{type:`submit`,size:`lg`,disabled:E,className:`mt-6 h-14 w-full rounded-2xl text-base font-bold`,children:E?`ÐÑпÑавлÑемâ¦`:`ÐÑпÑавиÑÑ Ð·Ð°ÑÐ²ÐºÑ Ð¿Ð°ÑÑнÑÑа`})]})})]})}export{C 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.