import{r as g,j as e,L as b}from"./vendor-react-BwKDLVNL.js";import{aD as K,v as p,w as h,G as w,x as l,A as L,D as S,z as i,y as n,B as N,F as y,I as j,aM as _,Z as M,H as z,ab as B}from"./index-C1ye5P3I.js";import"./vendor-dayjs-5tvLiZdS.js";import{M as O,b as $,a as D}from"./MarketingShell-pJlumM7K.js";import{R as E}from"./reveal-CBOIuxRc.js";import{p as I}from"./publicReviewsApi-36HQE_6C.js";import{c as R}from"./homeCityI18n-D4DZCNWK.js";import{u as F}from"./vendor-i18n-C6wqqoou.js";import{S as P}from"./star-UsrjAJnL.js";import{F as G}from"./funnel-CFr1ZAoG.js";import{Q as H}from"./quote-YfBHOjx2.js";import{M as q}from"./message-square-BtWwT-Tc.js";import{L as Q}from"./lock-CN_AeGOE.js";import"./vendor-query-D-sr233n.js";import"./vendor-sentry-B6ofghpF.js";import"./vendor-antd-core-4y2ghozH.js";import"./zap-Bd320S-h.js";import"./globe-C6LFgqFt.js";import"./shield-check-CUe1YrFZ.js";import"./users-BQu_O3JR.js";import"./file-text-cRwgk8Y4.js";import"./SiteFooter-CMa-vyJL.js";import"./send-BPZS28JS.js";import"./building-2-BaHHBpzk.js";import"./proxy-BqbKY9kW.js";const W=[{id:"fb-1",rating:5,comment:"Avalog сократили срок доставки из Шанхая на 12 дней, сэкономили 18% на логистике. Прозрачный калькулятор без сюрпризов.",cityFrom:"Шанхай",cityTo:"Москва",supplierReply:"Спасибо за отзыв! Рады что переход на маршрут через Тяньцзинь дал такой результат.",createdAt:"2026-04-12",author:"Импортёр электроники",i18nKey:"fb1"},{id:"fb-2",rating:5,comment:"Переключились на ЖД через Достык — транзит с 32 до 21 дня. Приоритетные слоты, цена ниже на 23%.",cityFrom:"Чэнду",cityTo:"Екатеринбург",supplierReply:null,createdAt:"2026-03-28",author:"Дистрибьютор стройматериалов",i18nKey:"fb2"},{id:"fb-3",rating:5,comment:"Срочные партии — авто через биржу. Доставили за 11 дней вместо 14. Цена на 9% ниже рыночной.",cityFrom:"Гуанчжоу",cityTo:"Краснодар",supplierReply:null,createdAt:"2026-03-15",author:"Производитель одежды",i18nKey:"fb3"},{id:"fb-4",rating:5,comment:"Крупногабарит OOG — мультимодаль за 28 дней. Все OOG-разрешения и страховка за 3 дня. Сэкономили 31% против авиафрахта.",cityFrom:"Нинбо",cityTo:"Новосибирск",supplierReply:"Это был один из самых сложных кейсов в квартале. Спасибо за доверие и оперативность с документами с вашей стороны.",createdAt:"2026-02-20",author:"Импортёр оборудования",i18nKey:"fb4"},{id:"fb-5",rating:4,comment:"Хороший сервис, но в пиковый сезон ставка прыгнула — пришлось перепланировать. В итоге всё ок, но хотелось бы более ранние алерты.",cityFrom:"Иу",cityTo:"Санкт-Петербург",supplierReply:"Спасибо за фидбек! Внедрили алерты за 72 часа до изменения ставки — теперь у вас будет время.",createdAt:"2026-02-08",author:"Ритейлер товаров для дома",i18nKey:"fb5"},{id:"fb-6",rating:5,comment:"Через платформу получили пул ставок уровня NVOCC. Ожидание судна — 2 дня вместо 10. Фрахт на 14% ниже.",cityFrom:"Новороссийск",cityTo:"Шанхай",supplierReply:null,createdAt:"2026-01-30",author:"Экспортёр зерновых",i18nKey:"fb6"},{id:"fb-7",rating:5,comment:"Документы для маркетплейса оформлены идеально. Прошли все аудит-проверки WB без замечаний.",cityFrom:"Шэньчжэнь",cityTo:"Москва",supplierReply:null,createdAt:"2026-01-18",author:"WB-селлер",i18nKey:"fb7"},{id:"fb-8",rating:5,comment:"0 списаний reefer-партий за 6 месяцев. Температурные журналы из ЛК — гениально для ХАССП-аудита.",cityFrom:"Хошимин",cityTo:"Москва",supplierReply:null,createdAt:"2026-01-05",author:"Импортёр кофе",i18nKey:"fb8"},{id:"fb-9",rating:3,comment:"В целом работает, но первый раз был неприятный сюрприз с THC. Сейчас в калькуляторе всё прозрачно — но было бы хорошо иметь алерт при первом заказе.",cityFrom:"Гонконг",cityTo:"Москва",supplierReply:"Согласны — обновили onboarding для первых заказов, теперь THC и сборы порта явно подсвечиваются.",createdAt:"2025-12-22",author:"Импортёр аксессуаров",i18nKey:"fb9"}];function V(t){return{id:String(t.id),rating:t.rating,comment:t.comment,cityFrom:t.cityFrom,cityTo:t.cityTo,supplierReply:t.supplierReply,createdAt:t.createdAt,author:"Клиент Avalog",authorKey:"apiClient"}}function U(t){const s=t.length,r=t.reduce((c,u)=>c+u.rating,0),o=s>0?r/s:0,x=[5,4,3,2,1].map(c=>({star:c,count:t.filter(u=>u.rating===c).length}));return{total:s,avg:o,counts:x}}function A({rating:t,size:s="md"}){const{t:r}=F(),o=s==="lg"?"h-5 w-5":s==="sm"?"h-3.5 w-3.5":"h-4 w-4";return e.jsx("div",{className:"flex items-center gap-0.5","aria-label":r("reviewsPage.stars.ratingPrefix","Оценка")+" "+t+" "+r("reviewsPage.stars.ratingSuffix","из 5"),children:Array.from({length:5}).map((x,c)=>e.jsx(P,{className:[o,c<Math.round(t)?"fill-yellow-400 text-yellow-400":"text-text-subtle/30"].join(" "),"aria-hidden":!0},c))})}function Z({star:t,count:s,total:r}){const o=r>0?Math.round(s/r*100):0;return e.jsxs(n,{gap:3,align:"center",className:"text-sm",children:[e.jsxs(n,{gap:1,align:"center",className:"w-12 shrink-0",children:[e.jsx(i,{className:"text-sm font-medium",children:t}),e.jsx(P,{className:"h-3.5 w-3.5 fill-yellow-400 text-yellow-400","aria-hidden":!0})]}),e.jsx("div",{className:"flex-1 h-2 rounded-full bg-bg-surface overflow-hidden",children:e.jsx("div",{className:"h-full bg-yellow-400 transition-all duration-500",style:{width:`${o}%`}})}),e.jsxs(i,{variant:"muted",className:"text-xs tabular-nums w-12 text-right shrink-0",children:[s," (",o,"%)"]})]})}const J=[{value:"all",key:"all",label:"Все отзывы"},{value:"5",key:"only5",label:"Только 5⭐"},{value:"4plus",key:"from4",label:"4⭐ и выше"},{value:"3plus",key:"from3",label:"3⭐ и выше"}];function X(t,s){switch(s){case"5":return t.rating===5;case"4plus":return t.rating>=4;case"3plus":return t.rating>=3;default:return!0}}function Y({label:t,active:s,onClick:r}){return e.jsx("button",{type:"button",onClick:r,className:["px-3.5 py-1.5 rounded-full text-sm font-medium border transition-all whitespace-nowrap",s?"bg-primary text-white border-primary shadow-sm":"bg-bg-base text-text-muted border-border hover:border-primary/40 hover:text-text"].join(" "),children:t})}function ke(){const{t,i18n:s}=F(),[r,o]=g.useState(W),[x,c]=g.useState(!0),[u,T]=g.useState("all"),[v,C]=g.useState("");g.useEffect(()=>{let a=!1;return I.list(50).then(d=>{a||d.length>=3&&o(d.map(V))}).catch(()=>{}).finally(()=>{a||c(!1)}),()=>{a=!0}},[]);const m=g.useMemo(()=>U(r),[r]),f=g.useMemo(()=>{const a=v.trim().toLowerCase();return r.filter(d=>!(!X(d,u)||a&&![d.comment,d.cityFrom??"",d.cityTo??"",d.author].join(" ").toLowerCase().includes(a)))},[r,u,v]);return e.jsxs(O,{active:null,children:[e.jsxs(K,{children:[e.jsx("title",{children:t("reviewsPage.meta.title","Отзывы клиентов — Avalog")}),e.jsx("meta",{name:"description",content:t("reviewsPage.meta.description","Отзывы клиентов Avalog: средняя оценка 4.8/5 на основе сотен отзывов. Реальные истории, маршруты, цифры. Фильтр по рейтингу и поиск по маршруту.")}),e.jsx("link",{rel:"canonical",href:"https://avalog.ru/reviews"})]}),e.jsxs(p,{py:"lg",className:"relative overflow-hidden bg-bg-base",children:[e.jsxs("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0",children:[e.jsx("div",{className:"absolute inset-x-0 top-0 h-[420px] bg-gradient-to-b from-primary-light/60 via-primary-light/15 to-transparent"}),e.jsx("div",{className:"absolute inset-0 opacity-60 [background-image:linear-gradient(to_right,var(--color-border)_1px,transparent_1px),linear-gradient(to_bottom,var(--color-border)_1px,transparent_1px)] [background-size:56px_56px] [mask-image:radial-gradient(ellipse_75%_50%_at_50%_0%,#000_55%,transparent_100%)]"})]}),e.jsx(h,{size:"base",className:"relative",children:e.jsxs(w,{cols:2,gap:10,className:"items-center",children:[e.jsx(E,{children:e.jsxs(l,{gap:4,children:[e.jsxs(L,{variant:"default",children:[e.jsx(P,{className:"h-3.5 w-3.5 mr-1 fill-yellow-400 text-yellow-400"}),t("reviewsPage.hero.badge","Отзывы клиентов")]}),e.jsxs(S,{size:"lg",children:[t("reviewsPage.hero.titleLine1","Что говорят те,"),e.jsx("br",{}),t("reviewsPage.hero.titleLine2","кто уже возит с Avalog")]}),e.jsx(i,{variant:"lead",className:"max-w-xl",children:t("reviewsPage.hero.subtitle","Публичные отзывы клиентов с маршрутами, оценкой и (где есть) ответами от команды Avalog. Без редактирования содержания.")}),e.jsxs(n,{gap:3,wrap:!0,children:[e.jsx(N,{size:"lg",asChild:!0,children:e.jsx(b,{to:"/",children:t("reviewsPage.hero.ctaCalc","Открыть калькулятор")})}),e.jsx(N,{size:"lg",variant:"outline",asChild:!0,children:e.jsx(b,{to:"/cases",children:t("reviewsPage.hero.ctaCases","Посмотреть кейсы")})})]})]})}),e.jsx(y,{children:e.jsx(j,{className:"pt-6",children:e.jsx(l,{gap:4,children:e.jsxs(n,{gap:4,align:"center",children:[e.jsxs(l,{gap:1,align:"start",children:[e.jsx(i,{className:"font-display font-bold text-5xl text-text tabular-nums leading-none",children:m.avg.toFixed(1)}),e.jsx(A,{rating:m.avg,size:"lg"}),e.jsxs(i,{variant:"muted",className:"text-sm",children:[m.total," ",t(`reviewsPage.stats.${k(m.total)}`,ee(m.total))]})]}),e.jsx("div",{className:"h-16 w-px bg-border"}),e.jsx(l,{gap:2,className:"flex-1",children:m.counts.map(a=>e.jsx(Z,{star:a.star,count:a.count,total:m.total},a.star))})]})})})})]})})]}),e.jsx(p,{py:"sm",bg:"base",children:e.jsx(h,{size:"base",children:e.jsxs(l,{gap:4,children:[e.jsxs(n,{gap:2,align:"center",wrap:!0,children:[e.jsx(G,{className:"h-4 w-4 text-text-muted"}),e.jsx(i,{variant:"caption",className:"text-text-muted",children:t("reviewsPage.filters.ratingLabel","Рейтинг:")}),J.map(a=>e.jsx(Y,{label:t(`reviewsPage.filters.${a.key}`,a.label),active:u===a.value,onClick:()=>T(a.value)},a.value))]}),e.jsxs("div",{className:"relative max-w-md",children:[e.jsx(_,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-text-muted pointer-events-none"}),e.jsx(M,{placeholder:t("reviewsPage.filters.searchPlaceholder","Поиск по маршруту или тексту…"),value:v,onChange:a=>C(a.target.value),className:"pl-9"})]}),e.jsxs(i,{variant:"muted",className:"text-sm",children:[t("reviewsPage.filters.shownLabel","Показано:")," ",e.jsx("strong",{className:"text-text",children:f.length})," ",t("reviewsPage.filters.ofLabel","из")," ",m.total,x?" · "+t("reviewsPage.filters.loadingFresh","загружаю свежие отзывы…"):null]})]})})}),e.jsx(p,{py:"md",bg:"base",children:e.jsx(h,{size:"base",children:f.length===0?e.jsx(y,{children:e.jsx(j,{className:"py-16 text-center",children:e.jsxs(l,{gap:3,align:"center",children:[e.jsx(i,{variant:"lead",children:t("reviewsPage.empty.title","Отзывов по фильтрам не найдено")}),e.jsx(i,{variant:"muted",children:t("reviewsPage.empty.subtitle","Попробуйте сбросить фильтр или поискать по другому маршруту.")})]})})}):e.jsx(w,{cols:2,gap:6,children:f.map(a=>e.jsx(y,{className:"h-full",children:e.jsx(j,{className:"pt-6",children:e.jsxs(l,{gap:4,children:[e.jsxs(n,{justify:"between",align:"center",children:[e.jsx(A,{rating:a.rating}),e.jsx(i,{variant:"muted",className:"text-xs",children:te(a.createdAt,s==null?void 0:s.language)})]}),e.jsxs(n,{gap:3,align:"start",children:[e.jsx(H,{className:"h-5 w-5 text-primary/30 shrink-0 mt-0.5","aria-hidden":!0}),e.jsx(i,{className:"text-base leading-relaxed",children:a.i18nKey?t(`reviewsPage.items.${a.i18nKey}.comment`,a.comment):a.comment})]}),e.jsxs(l,{gap:1,className:"pt-3 border-t border-border",children:[e.jsx(i,{weight:"semibold",className:"text-sm",children:a.i18nKey?t(`reviewsPage.items.${a.i18nKey}.author`,a.author):a.authorKey?t(`reviewsPage.items.${a.authorKey}.author`,a.author):a.author}),a.cityFrom&&a.cityTo?e.jsxs(n,{gap:1,align:"center",className:"text-xs text-text-muted",children:[e.jsx($,{className:"h-3 w-3"}),R(a.cityFrom,s==null?void 0:s.language)," →"," ",R(a.cityTo,s==null?void 0:s.language)]}):null]}),a.supplierReply?e.jsxs("div",{className:"mt-2 p-4 rounded-lg bg-primary-light/40 border border-primary/15",children:[e.jsxs(n,{gap:2,align:"center",className:"mb-2",children:[e.jsx(q,{className:"h-4 w-4 text-primary"}),e.jsx(i,{weight:"semibold",className:"text-sm text-primary",children:t("reviewsPage.items.replyLabel","Ответ Avalog")})]}),e.jsx(i,{variant:"muted",className:"text-sm",children:a.i18nKey?t(`reviewsPage.items.${a.i18nKey}.reply`,a.supplierReply):a.supplierReply})]}):null]})})},a.id))})})}),e.jsx(p,{py:"lg",bg:"surface",children:e.jsx(h,{size:"base",children:e.jsx(y,{className:"border-primary/30",children:e.jsx(j,{className:"py-10",children:e.jsxs(w,{cols:2,gap:8,className:"items-center",children:[e.jsxs(l,{gap:3,children:[e.jsx(z,{size:"h2",as:"h2",children:t("reviewsPage.cta.title","Возили с Avalog? Поделитесь опытом")}),e.jsx(i,{variant:"muted",children:t("reviewsPage.cta.subtitle","Отзывы оставляют только клиенты с завершённым заказом — это гарантия что вы видите реальные истории, а не накрутку.")}),e.jsxs(n,{gap:2,align:"center",children:[e.jsx(B,{className:"h-4 w-4 text-primary"}),e.jsx(i,{variant:"muted",className:"text-sm",children:t("reviewsPage.cta.gateNote","Доступно после первого закрытого заказа в личном кабинете")})]})]}),e.jsxs(l,{gap:3,align:"end",children:[e.jsxs(N,{size:"lg",disabled:!0,children:[e.jsx(Q,{className:"h-4 w-4"}),t("reviewsPage.cta.submitBtn","Оставить отзыв")]}),e.jsxs(i,{variant:"muted",className:"text-xs",children:[t("reviewsPage.cta.loginPrefix","Войдите в")," ",e.jsx(b,{to:"/login",className:"text-primary hover:underline",children:t("reviewsPage.cta.loginLink","личный кабинет")}),t("reviewsPage.cta.loginSuffix",", чтобы оставить отзыв")]})]})]})})})})}),e.jsx(D,{})]})}function k(t){const s=t%10,r=t%100;return s===1&&r!==11?"reviewOne":s>=2&&s<=4&&(r<10||r>=20)?"reviewFew":"reviewMany"}function ee(t){switch(k(t)){case"reviewOne":return"отзыв";case"reviewFew":return"отзыва";default:return"отзывов"}}function te(t,s){try{return new Date(t).toLocaleDateString(s||"ru-RU",{day:"numeric",month:"long",year:"numeric"})}catch{return t}}export{ke as default};