PageSourceSearch

https://markethacker.ru/assets/wb-search-BIBr8Pt9.js

js markethacker.ru collected 2026-10-02 02:07:30 UTC 52,583 bytes, 1 lines download raw bytes

1import{k as le,m as e,h as o,G as de,w as xe,F as oe,X as me,B as he,D as be,v as pe,A as ue,I as ge,E as fe}from"./index-BhuuQD9y.js";import{a as je,L as Ne,l as z,C as ve,M as W,T as X}from"./MhShell-Cbejmf_i.js";import{G as we,a as ye,L as T,M as ke,A as Ce,S as Fe,B as q,H as Ae,b as Be,c as Ee,d as Se}from"./AttentionAudit-Mc1F9Vo2.js";import{E as A}from"./eye-off-B2CqyrMi.js";import{E as R}from"./eye-x9lTuTW0.js";import{F as $e}from"./flask-conical-DM-aBxE5.js";import{S as K}from"./star-By9Bx_5C.js";import{A as Me}from"./activity-DliOxpLL.js";import{Z as Oe}from"./zap-Dah-fsUc.js";import{M as Te}from"./mouse-pointer-click-DaHLf1_c.js";import{S as Pe}from"./shopping-cart-CiOvX5MW.js";import{P as J}from"./package-oNVqdsaN.js";import{W as Q}from"./wallet-sO7ZU_x5.js";import"./arrow-right-DfMwkIJk.js";import"./flame-Bik0_g14.js";import"./percent-wBt4aiQW.js";import"./wrench-CeVsxVf-.js";import"./check-DVd4CU5_.js";import"./image-BuQU88l3.js";const Le=[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]],ne=le("chevrons-right",Le);const We=[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71",key:"1jlk70"}],["path",{d:"M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264",key:"18rp1v"}]],Re=le("shield-off",We);function js(){return e.jsxs(e.Fragment,{children:[e.jsx(je,{}),e.jsx(Ie,{})]})}const V=[{pos:1,title:"Омега-3 1000мг рыбий жир",brand:"Healthis",seller:"Healthcare Solutions",sku:"376772886",warehouse:"Самарская обл.",delivery:"60 ч.",priceSpp:265,priceOld:750,discountClub:4,rating:4.9,reviews:555693,isAd:!1,bust:0,category:"БАДы",action:"Распродажа",hue:"#FFB347",tag:"rival"},{pos:2,title:"Омега-3 90 капсул 1WIN",brand:"1WIN",seller:"1WIN GROUP",sku:"39982574",warehouse:"Электросталь",delivery:"26 ч.",priceSpp:239,priceOld:2274,discountClub:6,rating:4.9,reviews:311103,isAd:!0,bust:14,category:"БАДы",action:"ШОК ЦЕНА",hue:"#C9A0FF"},{pos:3,title:"Омега-3 триглицеридная форма",brand:"VitaMeal",seller:"ЗОЖ",sku:"26950668",warehouse:"Чехов 2",delivery:"27 ч.",priceSpp:336,priceOld:1275,discountClub:3,rating:4.9,reviews:534621,isAd:!1,bust:0,category:"БАДы",action:"Распродажа",hue:"#FFCC80"},{pos:4,title:"Пиколинат хрома 250мкг",brand:"VitaMeal",seller:"ЗОЖ",sku:"166936221",warehouse:"Электросталь",delivery:"26 ч.",priceSpp:294,priceOld:1115,discountClub:5,rating:4.9,reviews:534621,isAd:!0,bust:28,category:"БАДы",action:"Распродажа",hue:"#FFAB91",tag:"own"},{pos:5,title:"Мультикомплекс для работы мозга",brand:"MIXTERRA",seller:"Market Team",sku:"809321907",warehouse:"Рязанская обл.",delivery:"29 ч.",priceSpp:169,priceOld:715,discountClub:2,rating:4.9,reviews:2328,isAd:!1,bust:0,category:"БАДы",action:"Распродажа",hue:"#B0BEC5"}],C=Array.from({length:32}).map((s,t)=>{const r=V[t%V.length];return{...r,pos:t+1,sku:String(Number(r.sku)+t*17),isAd:t%4===0,bust:t%4===0?6+t%30:0,tag:t===3?"own":t===0?"rival":null}}),re=[42,48,51,47,55,63,70,68,75,82,88,96],De=["июн '25","июл '25","авг '25","сен '25","окт '25","ноя '25","дек '25","янв '26","фев '26","мар '26","апр '26","май '26"],_e=[3120,3480,3690,3410,3980,4520,5010,4880,5460,6050,6480,7064];function He({data:s,color:t="#CCFF00",width:r=88,height:n=26}){const x=Math.min(...s),b=Math.max(...s),a=r/(s.length-1),i=s.map((u,m)=>`${m*a},${n-(u-x)/(b-x||1)*(n-4)-2}`).join(" ");return e.jsxs("svg",{width:r,height:n,className:"overflow-visible",children:[e.jsx("polyline",{fill:"none",stroke:t,strokeWidth:1.8,points:i}),e.jsx("polyline",{fill:`url(#sg-${t.replace("#","")})`,stroke:"none",points:`0,${n} ${i} ${r},${n}`,opacity:.18}),e.jsx("defs",{children:e.jsxs("linearGradient",{id:`sg-${t.replace("#","")}`,x1:"0",x2:"0",y1:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",stopColor:t,stopOpacity:.6}),e.jsx("stop",{offset:"100%",stopColor:t,stopOpacity:0})]})})]})}function Ue({data:s,labels:t,values:r,expanded:n,onToggle:x,color:b="#8A2BE2"}){const[a,i]=o.useState(null),u=n?180:64,m=8,N=8,p=8,w=n?22:14;return e.jsxs("div",{className:"relative",children:[e.jsx("button",{onClick:x,title:n?"Свернуть":"Раскрыть",className:"absolute right-1 top-1 z-10 grid h-6 w-6 place-items-center rounded-md bg-white/80 text-[#8A2BE2] ring-1 ring-[#8A2BE2]/20 hover:bg-white",children:n?e.jsx(Ee,{className:"h-3 w-3"}):e.jsx(Se,{className:"h-3 w-3"})}),e.jsx("div",{className:"w-full",style:{height:u},children:e.jsx("svg",{viewBox:"0 0 100 100",preserveAspectRatio:"none",width:"100%",height:"100%",className:"block touch-none",onMouseLeave:()=>i(null),onMouseMove:l=>{const c=l.currentTarget.getBoundingClientRect(),g=(l.clientX-c.left)/c.width*100,h=(100-m-N)/(s.length-1),v=Math.max(0,Math.min(s.length-1,Math.round((g-m)/h)));i(v)},children:(()=>{const l=Math.min(...s),c=Math.max(...s),g=100-m-N,f=100-p-w,h=g/(s.length-1),v=s.map((j,y)=>{const D=m+y*h,_=p+(1-(j-l)/(c-l||1))*f;return{x:D,y:_}}),F=v.map(j=>`${j.x},${j.y}`).join(" "),B=`${m},${100-w} ${F} ${100-N},${100-w}`,E=`freq-grad-${b.replace("#","")}`;return e.jsxs(e.Fragment,{children:[e.jsx("defs",{children:e.jsxs("linearGradient",{id:E,x1:"0",x2:"0",y1:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",stopColor:b,stopOpacity:.45}),e.jsx("stop",{offset:"100%",stopColor:b,stopOpacity:0})]})}),n&&e.jsx("g",{stroke:"#2a1b4a",strokeOpacity:.06,strokeWidth:.15,children:[0,.25,.5,.75,1].map(j=>e.jsx("line",{x1:m,x2:100-N,y1:p+j*f,y2:p+j*f,vectorEffect:"non-scaling-stroke"},j))}),e.jsx("polygon",{points:B,fill:`url(#${E})`}),e.jsx("polyline",{fill:"none",stroke:b,strokeWidth:1.6,vectorEffect:"non-scaling-stroke",points:F}),v.map((j,y)=>e.jsx("circle",{cx:j.x,cy:j.y,r:a===y?1.4:.6,fill:a===y?"#CCFF00":b,stroke:b,strokeWidth:a===y?.5:0,vectorEffect:"non-scaling-stroke"}
1,y)),a!==null&&e.jsx("line",{x1:v[a].x,x2:v[a].x,y1:p,y2:100-w,stroke:b,strokeOpacity:.35,strokeDasharray:"1 1",strokeWidth:.4,vectorEffect:"non-scaling-stroke"})]})})()})}),e.jsx("div",{className:"mt-1 flex justify-between text-[9px] text-gray-400",children:n?t.map((l,c)=>e.jsx("span",{className:a===c?"font-semibold text-[#8A2BE2]":"",children:l.split(" ")[0]},c)):e.jsxs(e.Fragment,{children:[e.jsx("span",{children:t[0]}),e.jsx("span",{children:t[Math.floor(t.length/3)]}),e.jsx("span",{children:t[Math.floor(2*t.length/3)]}),e.jsx("span",{children:t[t.length-1]})]})}),a!==null&&e.jsxs("div",{className:"pointer-events-none absolute z-20 -translate-x-1/2 -translate-y-full rounded-md bg-[#2a1b4a] px-2 py-1 text-[10px] font-semibold text-white shadow-lg",style:{left:`${m+a*(100-m-N)/(s.length-1)}%`,top:4},children:[e.jsx("div",{className:"text-[9px] uppercase tracking-wide text-[#CCFF00]/90",children:t[a]}),e.jsxs("div",{className:"tabular-nums",children:[r[a].toLocaleString("ru-RU")," ",e.jsx("span",{className:"text-white/60",children:"показов"})]})]})]})}function ee({children:s,tone:t="lime",className:r=""}){const n={lime:"bg-[#CCFF00] text-[#2a1b4a]",violet:"bg-[#8A2BE2] text-white",slate:"bg-[#2a1b4a] text-[#CCFF00]",white:"bg-white/95 text-[#2a1b4a] border border-[#2a1b4a]/10"};return e.jsx("span",{className:`inline-flex items-center gap-1 rounded-md px-1.5 py-0.5 text-[10px] font-semibold tracking-tight ${n[t]} ${r}`,children:s})}function Ie(){const[s,t]=o.useState("grid5"),[r,n]=o.useState("all"),[x,b]=o.useState("web"),[a,i]=o.useState(!0),[u,m]=o.useState(!0),[N,p]=o.useState(!1),[w,l]=o.useState(1),[c,g]=o.useState(!0),[f,h]=o.use
1State(!0),[v,F]=o.useState(!0),[B,E]=o.useState(!0),[j,y]=o.useState(!0),[D,_]=o.useState(!0),[H,Z]=o.useState(()=>{const d={};return C.forEach(k=>d[k.sku]=k.tag??null),d}),U=C.filter(d=>d.isAd).length,Y=C.length-U,ce=o.useMemo(()=>r==="ads"?C.filter(d=>d.isAd):r==="organic"?C.filter(d=>!d.isAd):C,[r]);return e.jsxs("div",{className:"min-h-screen bg-[#f6f5fb] text-[#2a1b4a]",children:[e.jsxs("header",{className:"border-b border-black/5 bg-white",children:[e.jsxs("div",{className:"mx-auto flex max-w-[1480px] items-center gap-4 px-6 py-3",children:[e.jsx("span",{className:"text-xl font-extrabold italic text-[#CB11AB]",style:{fontFamily:"Georgia, serif"},children:"Wildberries"}),e.jsxs("div",{className:"relative flex-1",children:[e.jsx(de,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400"}),e.jsx("input",{defaultValue:"омега 3",className:"w-full rounded-lg border border-black/10 bg-[#f6f6f8] py-2.5 pl-9 pr-3 text-sm outline-none focus:border-[#CB11AB]/40"})]}),e.jsx("button",{className:"rounded-lg bg-[#CB11AB] px-5 py-2.5 text-sm font-medium text-white",children:"Найти"}),e.jsxs("div",{className:"hidden gap-5 text-sm text-gray-600 md:flex",children:[e.jsx("span",{children:"Доставка"}),e.jsx("span",{children:"Профиль"}),e.jsx("span",{children:"Корзина"})]})]}),e.jsxs("div",{className:"mx-auto flex max-w-[1480px] items-center gap-2 overflow-x-auto px-6 pb-3 text-sm",children:[e.jsxs("button",{className:"flex items-center gap-2 rounded-full bg-fuchsia-500 px-3 py-1.5 font-medium text-white",children:["Распродажа",e.jsx("span",{className:"inline-flex h-4 w-7 items-center rounded-full bg-white/30 p-0.5",children:e.jsx("span",{className:"ml-auto h-3 w-3 rounded-full bg-white"})})]}),["По популярности","Все фильтры","Цена, ₽","Срок доставки","Бренд","Оригинал","Категория","Назначение"].map(d=>e.jsxs("button",{className:"flex items-center gap-1 whitespace-nowrap rounded-full border border-black/10 bg-white px-3 py-1.5 text-gray-700",children:[d," ",e.jsx(xe,{className:"h-3.5 w-3.5 text-gray-400"})]},d)),e.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[e.jsx("button",{onClick:()=>t("grid4"),className:`grid h-8 w-8 place-items-center rounded ${s==="grid4"?"bg-[#2a1b4a] text-[#CCFF00]":"text-gray-400"}`,children:e.jsx(we,{className:"h-4 w-4"})}),e.jsx("button",{onClick:()=>t("grid5"),className:`grid h-8 w-8 place-items-center rounded ${s==="grid5"?"bg-[#2a1b4a] text-[#CCFF00]":"text-gray-400"}`,children:e.jsx(ye,{className:"h-4 w-4"})})]})]})]}),e.jsx(oe,{}),e.jsxs("main",{className:"mx-auto max-w-[1480px] px-6 py-3 space-y-3",children:[e.jsx(Ge,{showSegments:c,setShowSegments:g,device:x,setDevice:b,noAB:a,setNoAB:i,noPersonal:u,setNoPersonal:m,organicOnly:N,setOrganicOnly:p,page:w,setPage:l,sumAds:U,sumOrg:Y,setTab:n}),c?e.jsx(Ze,{onHide:()=>g(!1)}):e.jsx(L,{label:"Аналитика по сегментам",onShow:()=>g(!0)}),f?e.jsx(Xe,{open:f,setOpen:h,onHide:()=>h(!1)}):e.jsx(L,{label:"Воронка продаж по запросу",onShow:()=>h(!0)}),D&&e.jsxs("div",{className:"flex items-center justify-between gap-4 rounded-xl border border-[#8A2BE2]/25 bg-gradient-to-r from-[#f3eeff] to-[#faf8ff] px-4 py-2.5 text-sm text-[#2a1b4a]",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"grid h-7 w-7 place-items-center rounded-md bg-[#8A2BE2] text-white",children:e.jsx(Ne,{className:"h-3.5 w-3.5"})}),e.jsxs("span",{className:"text-[13px]",children:["Авторизуйтесь на ",e.jsx("b",{children:"Wildberries"}),", чтобы MarketHacker подтянул данные по вашим товарам и фактическим позициям."]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{className:"rounded-md bg-[#CCFF00] px-3 py-1.5 text-xs font-bold text-[#2a1b4a] ring-1 ring-[#8A2BE2]/20 hover:brightness-105",children:"Авторизоваться"}),e.jsx("button",{onClick:()=>_(!1),className:"rounded-md p-1.5 text-[#2a1b4a]/50 hover:bg-[#2a1b4a]/5",children:e.jsx(me,{className:"h-4 w-4"})})]})]}),B?e.jsxs("section",{className:"overflow-hidden rounded-2xl border border-black/5 bg-white shadow-sm",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[#8A2BE2]/15 bg-gradient-to-r from-[#faf8ff] to-white px-4 py-2.5 text-[#2a1b4a]",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("img",{src:z,alt:"MarketHacker",className:"h-6 w-6"}),e.jsx("h3",{className:"text-sm font-semibold tracking-tight",children:"Выдача 1–100 · подробная таблица"}),e.jsx("span",{className:"rounded-md bg-[#8A2BE2]/10 px-2 py-0.5 text-[10px] text-[#8A2BE2]",children:"кэш · 2 мин назад"})]}),e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsxs("button",{onClick:()=>F(d=>!d),className:"flex items-center gap-1 rounded-md bg-[#2a1b4a]/5 px-2.5 py-1.5 hover:bg-[#2a1b4a]/10",children:[v?e.jsx(A,{className:"h-3.5 w-3.5"}):e.jsx(R,{className:"h-3.5 w-3.5"})," Схема 1–100"]}),e.jsxs("button",{className:"flex items-center gap-1 rounded-md bg-[#2a1b4a]/5 px-2.5 py-1.5 hover:bg-[#2a1b4a]/10",children:[e.jsx(he,{className:"h-3.5 w-3.5"})," Колонки"]}),e.jsxs("button",{className:"flex items-center gap-1 rounded-md bg-[#CCFF00] px-2.5 py-1.5 font-semibold text-[#2a1b4a] ring-1 ring-[#8A2BE2]/20 hover:brightness-105",children:[e.jsx(be,{className:"h-3.5 w-3.5"})," Excel"]}),e.jsx("button",{onClick:()=>E(!1),title:"Скрыть блок",className:"flex items-center gap-1 rounded-md bg-[#2a1b4a]/5 px-2 py-1.5 text-[#2a1b4a]/60 hover:bg-[#2a1b4a]/10 hover:text-[#2a1b4a]",children:e.jsx(A,{className:"h-3.5 w-3.5"})})]})]}),e.jsxs("div",{className:"flex items-center justify-between border-b border-black/5 bg-white px-5 py-2.5",children:[e.jsx("div",{className:"flex items-center gap-1 rounded-lg bg-[#f3f3f6] p-1 text-sm",children:[["all","Общая выдача",C.length],["ads","Реклама",U],["organic","Органика",Y]].map(([d,k,S])=>e.jsxs("button",{onClick:()=>n(d),className:`flex items-center gap-2 rounded-md px-3 py-1.5 transition ${r===d?"bg-[#8A2BE2] text-white shadow-sm":"text-gray-600 hover:bg-white"}`,children:[k,e.jsx("span",{className:`rounded px-1.5 py-0.5 text-[10px] font-semibold tabular-nums ${r===d?"bg-white/25 text-white":"bg-black/5 text-gray-500"}`,children:S})]},d))}),e.jsxs("div",{className:"flex items-center gap-3 text-xs text-gray-500",children:[e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"h-2 w-2 rounded-sm bg-[#CCFF00]"})," Свои товары"]}),e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"h-2 w-2 rounded-sm bg-[#8A2BE2]"})," Конкуренты"]}),e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"h-2 w-2 rounded-sm bg-fuchsia-500"})," Реклама"]})]})]}),e.jsxs("div",{className:"flex",children:[v&&e.jsx(Je,{cards:C,tags:H}),e.jsx("div",{className:"flex-1 overflow-x-auto",children:e.jsx(Qe,{rows:ce,tags:H,setTag:(d,k)=>Z(S=>({...S,[d]:k}))})})]}),e.jsxs("div",{className:"flex items-center justify-between gap-3 border-t border-black/5 bg-[#fafafb] px-5 py-3",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-600",children:[e.jsx(ve,{className:"h-4 w-4 text-[#8A2BE2]"}),"Не нашли свой товар в выдаче 1–100? Проверьте позицию вручную:"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{placeholder:"Артик
1ул WB",className:"w-40 rounded-md border border-black/10 bg-white px-3 py-1.5 text-sm outline-none focus:border-[#8A2BE2]/40"}),e.jsx("button",{className:"rounded-md bg-[#8A2BE2] px-3 py-1.5 text-sm font-medium text-white hover:brightness-110",children:"Проверить позицию"}),e.jsx("button",{className:"rounded-md border border-[#CCFF00] bg-[#CCFF00]/10 px-3 py-1.5 text-sm font-semibold text-[#2a1b4a] hover:bg-[#CCFF00]/20",children:"Подсветить мои товары"})]})]})]}):e.jsx(L,{label:"Выдача 1–100 · подробная таблица",onShow:()=>E(!0)}),j?e.jsxs("section",{className:"overflow-hidden rounded-2xl border border-[#8A2BE2]/15 bg-white shadow-sm",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[#8A2BE2]/15 bg-gradient-to-r from-[#faf8ff] to-white px-4 py-2.5",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("img",{src:z,alt:"MH",className:"h-5 w-5"}),e.jsx("h3",{className:"text-sm font-semibold tracking-tight text-[#2a1b4a]",children:"Карточки топ-выдачи · MH-оверлей"}),e.jsx("span",{className:"rounded-md bg-[#8A2BE2]/10 px-2 py-0.5 text-[10px] text-[#8A2BE2]",children:s==="grid5"?"5 в ряд":"4 в ряд"})]}),e.jsxs("button",{onClick:()=>y(!1),title:"Скрыть блок",className:"flex items-center gap-1 rounded-md bg-[#2a1b4a]/5 px-2 py-1.5 text-xs text-[#2a1b4a]/60 hover:bg-[#2a1b4a]/10 hover:text-[#2a1b4a]",children:[e.jsx(A,{className:"h-3.5 w-3.5"})," Скрыть"]})]}),e.jsx("div",{className:`grid gap-3 p-3 ${s==="grid5"?"grid-cols-5":"grid-cols-4"}`,children:V.slice(0,s==="grid5"?5:4).map(d=>e.jsx(Ye,{c:d,tag:H[d.sku]??null,setTag:k=>Z(S=>({...S,[d.sku]:k}))},d.sku))})]}):e.jsx(L,{label:"Карточки топ-выдачи",onShow:()=>y(!0)}),e.jsx("p",{className:"pt-2 text-center text-xs text-gray-400",children:"Все данные — демонстрационные. UI MarketHacker рендерится поверх реальной выдачи Wildberries через расширение для браузера."})]})]})}function Ge(s){const t=s.sumAds+s.sumOrg,r=Math.round(s.sumOrg/t*100),n=100-r;return e.jsx("div",{className:"overflow-hidden rounded-2xl border border-[#8A2BE2]/15 bg-white text-[#2a1b4a] shadow-[0_8px_28px_-14px_rgba(138,43,226,0.25)]",children:e.jsxs("div",{className:"flex flex-wrap items-center gap-3 px-3 py-2",children:[e.jsxs("div",{className:"flex items-center gap-2 border-r border-[#2a1b4a]/10 pr-3",children:[e.jsx("img",{src:z,alt:"MH",className:"h-6 w-6"}),e.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-[0.18em] text-[#8A2BE2]",children:"MarketHacker · WB"})]}),e.jsxs("button",{onClick:()=>s.setShowSegments(!s.showSegments),className:"flex items-center gap-2 rounded-lg bg-[#f6f5fb] px-2.5 py-1.5 text-left hover:bg-[#efeaff]",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[9px] uppercase tracking-wide text-[#2a1b4a]/50",children:"Частотность / мес"}),e.jsxs("div",{className:"flex items-baseline gap-1.5",children:[e.jsx("span",{className:"text-sm font-bold tabular-nums",children:"7 064"}),e.jsx("span",{className:"text-[10px] font-semibold text-emerald-600",children:"+12%"})]})]}),e.jsx(He,{data:re,color:"#8A2BE2"})]}),e.jsxs("div",{className:"flex items-center gap-1 rounded-lg bg-[#f6f5fb] p-1",children:[e.jsxs("button",{onClick:()=>s.setTab("organic"),className:"flex items-center gap-1.5 rounded-md bg-emerald-50 px-2 py-1 text-[11px] font-semibold text-emerald-700 hover:bg-emerald-100",children:[e.jsx(T,{className:"h-3 w-3"}),"Орг.",e.jsxs("span",{className:"rounded bg-emerald-500/15 px-1 text-[10px] tabular-nums",children:[s.sumOrg," · ",r,"%"]})]}),e.jsxs("button",{onClick:()=>s.setTab("ads"),className:"flex items-center gap-1.5 rounded-md bg-fuchsia-50 px-2 py-1 text-[11px] font-semibold text-fuchsia-700 hover:bg-fuchsia-100",children:[e.jsx(W,{className:"h-3 w-3"}),"Рек.",e.jsxs("span",{className:"rounded bg-fuchsia-500/15 px-1 text-[10px] tabular-nums",children:[s.sumAds," · ",n,"%"]})]})]}),e.jsxs("div",{className:"flex items-center gap-4 border-l border-[#2a1b4a]/10 pl-3 text-[11px]",children:[e.jsx(P,{label:"Медиана",value:"414 ₽"}),e.jsx(P,{label:"Ср. чек",value:"444 ₽",trend:-10.5}),e.jsx(P,{label:"Ср. рейтинг",value:"4.7"}),e.jsx(P,{label:"Выручка/запрос",value:"161 298 ₽",trend:-9.9})]}),e.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[e.jsxs("div",{className:"flex items-center gap-1 rounded-lg bg-[#f6f5fb] p-0.5",children:[e.jsx(I,{active:s.device==="web",onClick:()=>s.setDevice("web"),icon:e.jsx(ke,{className:"h-3.5 w-3.5"}),label:"Web"}),e.jsx(I,{active:s.device==="ios",onClick:()=>s.setDevice("ios"),icon:e.jsx(Ce,{className:"h-3.5 w-3.5"}),label:"iOS"}),e.jsx(I,{active:s.device==="android",onClick:()=>s.setDevice("android"),icon:e.jsx(Fe,{className:"h-3.5 w-3.5"}),label:"Android"})]}),e.jsx(G,{active:s.noAB,onClick:()=>s.setNoAB(!s.noAB),icon:e.jsx($e,{className:"h-3 w-3"}),label:"Без A/B"}),e.jsx(G,{active:s.noPersonal,onClick:()=>s.setNoPersonal(!s.noPersonal),icon:e.jsx(Re,{className:"h-3 w-3"}),label:"Без перс."}),e.jsx(G,{active:s.organicOnly,onClick:()=>s.setOrganicOnly(!s.organicOnly),icon:e.jsx(T,{className:"h-3 w-3"}),label:"Только орг."}),e.jsxs("div",{className:"flex items-center gap-0.5 rounded-lg bg-[#f6f5fb] p-0.5",children:[e.jsx("button",{onClick:()=>s.setPage(1),className:`rounded px-2 py-1 text-[11px] font-semibold tabular-nums ${s.page===1?"bg-[#CCFF00] text-[#2a1b4a]":"text-[#2a1b4a]/60 hover:text-[#2a1b4a]"}`,children:"1–100"}),e.jsx("button",{onClick:()=>s.setPage(2),className:`rounded px-2 py-1 text-[11px] font-semibold tabular-nums ${s.page===2?"bg-[#CCFF00] text-[#2a1b4a]":"text-[#2a1b4a]/60 hover:text-[#2a1b4a]"}`,children:"101–200"})]}),e.jsxs("button",{onClick:()=>s.setShowSegments(!s.showSegments),className:"flex items-center gap-1 rounded-lg border border-[#8A2BE2]/30 bg-[#8A2BE2]/8 px-2.5 py-1.5 text-[11px] font-semibold text-[#8A2BE2] hover:bg-[#8A2BE2]/15",children:[e.jsx(pe,{className:"h-3.5 w-3.5"}),s.showSegments?"Свернуть аналитику":"Аналитика"]})]})]})})}function P({label:s,value:t,trend:r}){return e.jsxs("div",{className:"leading-tight",children:[e.jsx("div",{className:"text-[9px] uppercase tracking-wide text-[#2a1b4a]/45",children:s}),e.jsxs("div",{className:"flex items-baseline gap-1",children:[e.jsx("span",{className:"text-xs font-bold tabular-nums",children:t}),r!==void 0&&e.jsxs("span",{className:`text-[10px] font-semibold tabular-nums ${r>=0?"text-emerald-600":"text-rose-500"}`,children:[r>=0?"+":"",r,"%"]})]})]})}function I({active:s,onClick:t,icon:r,label:n}){return e.jsxs("button",{onClick:t,className:`flex items-center gap-1 rounded-md px-2 py-1 text-[11px] ${s?"bg-[#CCFF00] text-[#2a1b4a] font-semibold":"text-[#2a1b4a]/55 hover:text-[#2a1b4a]"}`,children:[r,n]})}function G({active:s,onClick:t,icon:r,label:n}){return e.jsxs("button",{onClick:t,className:`flex items-center gap-1 rounded-lg px-2 py-1.5 text-[11px] transition ${s?"bg-[#CCFF00]/30 text-[#2a1b4a] font-semibold ring-1 ring-[#8A2BE2]/30":"bg-[#f6f5fb] text-[#2a1b4a]/55 hover:text-[#2a1b4a]"}`,children:[r,n]})}const ze=[{range:"3.8–4.0",pct:4,color:"#FF5C7C"},{range:"4.1–4.3",pct:8,color:"#C7A0FF"},{range:"4.4–4.6",pct:18,color:"#8A2BE2"},{range:"4.7–4.9",pct:58,color:"#A8E000"},{range:"5.0",pct:12,color:"#CCFF00"}],se=[{id:"imp",label:"Показы",value:194032,unit:"",delta:-8.2,icon:e.jsx(R,{className:"h-3.5 w-3.5"}),rel:1,hint:"Сколько раз карточки из топ-100 показаны по запросу"},{id:"ctr",label:"Переходы в карточку",value:5820,unit:"",delta:-14.7,icon:e.jsx(Te,{className:"h-3.5 w-3.5"}),rel:.62,hint:"Клики по карточкам · CTR по предмету"}
1,{id:"cart",label:"Добавили в корзину",value:820,unit:"",delta:-23.65,icon:e.jsx(Pe,{className:"h-3.5 w-3.5"}),rel:.42},{id:"ord",label:"Заказы по запросу",value:206,unit:"шт",delta:-20.77,icon:e.jsx(J,{className:"h-3.5 w-3.5"}),rel:.28},{id:"rev",label:"Выручка по заказам",value:161298,unit:"₽",delta:-9.96,icon:e.jsx(Q,{className:"h-3.5 w-3.5"}),rel:.2},{id:"sell",label:"Расч. продажи",value:194,unit:"шт",delta:-20.49,icon:e.jsx(J,{className:"h-3.5 w-3.5"}),rel:.14},{id:"revs",label:"Выручка по продажам",value:151902,unit:"₽",delta:-9.64,icon:e.jsx(Q,{className:"h-3.5 w-3.5"}),rel:.1}],Ve=[{label:"CTR предмета",pct:3,delta:5},{label:"В корзину",pct:14,delta:-12.5},{label:"В заказ",pct:25,delta:4.17},{label:"Ср. чек",pct:783,delta:13.7},{label:"% выкупа",pct:94,delta:1.1},{label:"Сила запроса",pct:2,delta:-4.64}];function ie(s){return s.toLocaleString("ru-RU")}function L({label:s,onShow:t}){return e.jsxs("button",{onClick:t,className:"flex w-full items-center justify-between rounded-xl border border-dashed border-[#8A2BE2]/30 bg-white/60 px-4 py-2 text-xs text-[#2a1b4a]/60 hover:border-[#8A2BE2]/60 hover:bg-white hover:text-[#2a1b4a]",children:[e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(A,{className:"h-3.5 w-3.5"}),"Блок скрыт: ",e.jsx("b",{className:"font-semibold",children:s})]}),e.jsxs("span",{className:"flex items-center gap-1 rounded-md bg-[#CCFF00] px-2 py-1 font-semibold text-[#2a1b4a]",children:[e.jsx(R,{className:"h-3 w-3"})," Показать"]})]})}function Xe({open:s,setOpen:t,onHide:r}){return e.jsxs("div",{className:"overflow-hidden rounded-2xl border border-black/5 bg-white shadow-sm",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-black/5 bg-gradient-to-r from-[#faf8ff] to-white px-4 py-2.5",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"grid h-6 w-6 place-items-center rounded-md bg-[#8A2BE2] text-white",children:e.jsx(ne,{className:"h-3.5 w-3.5"})}),e.jsxs("h3",{className:"text-sm font-semibold tracking-tight text-[#2a1b4a]",children:["Воронка продаж по запросу ",e.jsx("span",{className:"text-[#8A2BE2]",children:"«омега 3»"})]}),e.jsx("span",{className:"rounded-md bg-[#8A2BE2]/10 px-2 py-0.5 text-[10px] text-[#8A2BE2]",children:"за 30 дн · vs. пред. 30 дн"})]}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("button",{onClick:()=>t(!s),className:"flex items-center gap-1 rounded-md bg-[#2a1b4a]/5 px-2.5 py-1.5 text-xs text-[#2a1b4a] hover:bg-[#2a1b4a]/10",children:s?"Свернуть":"Развернуть"}),r&&e.jsx("button",{onClick:r,title:"Скрыть блок",className:"flex items-center gap-1 rounded-md bg-[#2a1b4a]/5 px-2 py-1.5 text-xs text-[#2a1b4a]/60 hover:bg-[#2a1b4a]/10 hover:text-[#2a1b4a]",children:e.jsx(A,{className:"h-3.5 w-3.5"})})]})]}),s&&e.jsxs("div",{className:"px-4 py-4",children:[e.jsx("div",{className:"flex items-stretch gap-1 overflow-hidden",children:se.map((n,x)=>e.jsxs("div",{className:"flex min-w-0 flex-1 items-stretch",children:[e.jsx(qe,{s:n}),x<se.length-1&&e.jsx(Ke,{c:Ve[x]})]},n.id))}),e.jsxs("div",{className:"mt-4 flex items-center gap-2 text-[11px] text-gray-500",children:[e.jsx("span",{children:"Итого по воронке:"}),e.jsxs("span",{className:"rounded-md bg-emerald-50 px-2 py-0.5 font-semibold text-emerald-700",children:["сквозная конв. ",e.jsx("b",{className:"tabular-nums",children:"0.10%"})]}),e.jsxs("span",{className:"rounded-md bg-[#CCFF00]/30 px-2 py-0.5 font-semibold text-[#2a1b4a]",children:["средний чек ",e.jsx("b",{className:"tabular-nums",children:"783 ₽"})]}),e.jsxs("span",{className:"rounded-md bg-rose-50 px-2 py-0.5 font-semibold text-rose-600",children:["падение выручки ",e.jsx("b",{className:"tabular-nums",children:"−9.64%"})," м/м"]}),e.jsx("span",{className:"ml-auto text-gray-400",children:"данные — расчётные на основе выдачи и MPstats"})]})]})]})}function qe({s}){const t=s.delta>=0;return e.jsxs("div",{className:"group flex min-w-0 flex-1 flex-col overflow-hidden rounded-xl border border-black/5 bg-[#faf8ff] p-2 transition hover:border-[#8A2BE2]/30 hover:bg-white",children:[e.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] font-semibold uppercase tracking-wide text-[#8A2BE2]",children:[e.jsx("span",{className:"grid h-4 w-4 shrink-0 place-items-center rounded bg-[#8A2BE2]/15",children:s.icon}),e.jsx("span",{className:"truncate text-[9px] text-[#2a1b4a]/70",title:s.hint,children:s.label})]}),e.jsxs("div",{className:"mt-1.5 flex items-baseline gap-1",children:[e.jsx("span",{className:"text-base font-bold tabular-nums text-[#2a1b4a]",children:ie(s.value)}),s.unit&&e.jsx("span",{className:"text-[10px] text-[#2a1b4a]/50",children:s.unit})]}),e.jsxs("div",{className:`mt-0.5 text-[10px] font-semibold tabular-nums ${t?"text-emerald-600":"text-rose-500"}`,children:[t?"+":"",s.delta,"% м/м"]}),e.jsx("div",{className:"relative mt-2 h-1.5 overflow-hidden rounded-full bg-[#2a1b4a]/5",children:e.jsx("div",{className:"absolute inset-y-0 left-0 rounded-full bg-gradient-to-r from-[#8A2BE2] to-[#CCFF00]",style:{width:`${Math.max(6,s.rel*100)}%`}})}),e.jsxs("div",{className:"mt-0.5 truncate text-right text-[9px] tabular-nums text-gray-400",children:[(s.rel*100).toFixed(1),"% от показов"]})]})}function Ke({c:s}){const t=s.delta>=0;return e.jsxs("div",{className:"flex w-11 shrink-0 flex-col items-center justify-center gap-0.5 px-0 text-center",children:[e.jsx(ne,{className:"h-3.5 w-3.5 text-[#8A2BE2]/40"}),e.jsx("span",{className:"rounded bg-[#CCFF00]/30 px-1 py-0.5 text-[9px] font-bold tabular-nums text-[#2a1b4a]",children:s.pct>=100?ie(s.pct)+"₽":s.pct+"%"}),e.jsx("span",{className:"text-[8px] uppercase tracking-tight text-[#2a1b4a]/50 leading-tight",children:s.label}),e.jsxs("span",{className:`text-[9px] font-semibold tabular-nums ${t?"text-emerald-600":"text-rose-500"}`,children:[t?"+":"",s.delta,"%"]})]})}const te=[{range:"0 – 10",pct:6},{range:"11 – 100",pct:13},{range:"101 – 1 000",pct:22},{range:"1 001 – 10 000",pct:31},{range:"10 001+",pct:28}];function Ze({onHide:s}){const[t,r]=o.useState(!1);return e.jsxs("div",{className:"relative grid grid-cols-12 gap-3 rounded-2xl border border-black/5 bg-white p-3 shadow-sm",children:[s&&e.jsxs("button",{onClick:s,title:"Скрыть блок",className:"absolute right-2 top-2 z-10 flex items-center gap-1 rounded-md bg-[#2a1b4a]/5 px-2 py-1 text-[10px] text-[#2a1b4a]/60 hover:bg-[#2a1b4a]/10 hover:text-[#2a1b4a]",children:[e.jsx(A,{className:"h-3 w-3"})," Скрыть"]}),e.jsxs("div",{className:`${t?"col-span-12":"col-span-3"} rounded-xl border border-black/5 bg-[#faf8ff] p-3 transition-all`,children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wide text-gray-500",children:"Частотность запроса"}),e.jsx(ue,{className:"h-4 w-4 text-emerald-500"})]}),e.jsxs("div",{className:"mt-2 flex items-baseline gap-2",children:[e.jsx("span",{className:"text-2xl font-bold text-[#2a1b4a]",children:"7 064"}),e.jsx("span",{className:"text-xs text-gray-500",children:"мес"}),e.jsx("span",{className:"text-sm font-semibold text-[#2a1b4a]",children:"246"}),e.jsx("span",{className:"text-xs text-gray-500",children:"день"}),e.jsx("span",{className:"ml-auto text-xs font-semibold text-emerald-600",children:"+12.4% м/м"})]}),e.jsx("div",{className:"mt-3",children:e.jsx(Ue,{data:re,labels:De,values:_e,expanded:t,onToggle:()=>r(n=>!n)})})]}),e.jsxs("div",{className:"col-span-3 rounded-xl border border-black/5 bg-[#faf8ff] p-3",children:[e.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-wide text-gray-500",children:"Светофор выдачи"}),e.jsxs("div",{className:"mt-3 flex items-end gap-2",children:[e.jsxs("button",{className:"flex-1 rounded-lg bg-emerald-50 p-3 text-left ring-1 ring-emerald-200 hover:ring-emerald-400",children:[e.jsxs("div",{className:"flex items-center gap-1 text-[10px] font-semibold uppercase text-emerald-700",children:[e.jsx(T,{className:"h-3 w-3"})," Органика"]}),e.jsx("div",{className:"mt-1 text-2xl font-bold text-emerald-700",children:"76"}),e.jsx("div",{className:"text-[11px] text-emerald-600",children:"76% выдачи"})]}),e.jsxs("button",{className:"flex-1 rounded-lg bg-fuchsia-50 p-3 text-left ring-1 ring-fuchsia-200 hover:ring-fuchsia-400",children:[e.jsxs("div",{className:"flex items-center gap-1 text-[10px] font-semibold uppercase text-fuchsia-700",children:[e.jsx(W,{className:"h-3 w-3"})," Реклама"]}),e.jsx("div",{className:"mt-1 text-2xl font-bold text-fuchsia-700",children:"24"}),e.jsx("div",{className:"text-[11px] text-fuchsia-600",children:"24% выдачи"})]})]}),e.jsxs("div",{className:"mt-3 flex h-2 overflow-hidden rounded-full",children:[e.jsx("div",{className:"bg-emerald-400",style:{width:"76%"}}),e.jsx("div",{className:"bg-fuchsia-400",style:{width:"24%"}})]}),e.jsx("p",{className:"mt-2 text-[10px] text-gray-400",children:"Клик по сегменту — фильтр таблицы."})]}),e.jsxs("div",{className:"col-span-3 rounded-xl border border-black/5 bg-[#faf8ff] p-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wide text-gray-500",children:"Рейтинги в ТОП‑100"}),e.jsx(K,{className:"h-3.5 w-3.5 text-amber-400",fill:"#fbbf24"})]}),e.jsx("div",{className:"mt-3 space-y-1.5",children:ze.map(n=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"w-16 text-[11px] text-gray-600",children:n.range}),e.jsx("div",{className:"relative h-2 flex-1 overflow-hidden rounded-full bg-black/5",children:e.jsx("div",{className:"absolute inset-y-0 left-0 rounded-full",style:{width:`${n.pct}%`,background:n.color}})}),e.jsxs("span",{className:"w-8 text-right text-[11px] font-semibold text-[#2a1b4a]",children:[n.pct,"%"]})]},n.range))})]}),e.jsxs("div",{className:"col-span-3 space-y-3",children:[e.jsxs("div",{className:"rounded-xl border border-black/5 bg-[#faf8ff] p-3",children:[e.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wide text-gray-500",children:"Кол‑во оценок"}),e.jsx("div",{className:"mt-2 flex h-4 overflow-hidden rounded-md",children:te.map((n,x)=>e.jsxs("div",{className:"flex items-center justify-center text-[9px] font-semibold text-white/90",style:{width:`${n.pct}%`,background:["#E9DDFF","#C7A0FF","#8A2BE2","#A8E000","#CCFF00"][x],color:x===2?"white":"#2a1b4a"},children:[n.pct,"%"]},n.range))}),e.jsx("div",{className:"mt-1.5 flex justify-between text-[9px] text-gray-400",children:te.map(n=>e.jsx("span",{children:n.range},n.range))})]}),e.jsxs("div",{className:"rounded-xl border border-black/5 bg-[#faf8ff] p-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-[11px] font-semibold uppercase tracking-wide text-gray-500",children:"Цена с СПП, ₽"}),e.jsx(Me,{className:"h-3.5 w-3.5 text-[#8A2BE2]"})]}),e.jsxs("div",{className:"relative mt-3 h-8",children:[e.jsx("div",{className:"absolute inset-x-0 top-1/2 h-1.5 -translate-y-1/2 roun
1ded-full bg-gradient-to-r from-[#CCFF00] via-[#8A2BE2] to-[#FF5C7C]"}),e.jsxs("div",{className:"absolute left-0 top-0 flex flex-col items-start",children:[e.jsx("span",{className:"text-[11px] font-bold text-[#2a1b4a]",children:"58 ₽"}),e.jsx("span",{className:"text-[9px] text-gray-400",children:"мин"})]}),e.jsxs("div",{className:"absolute left-1/2 top-0 -translate-x-1/2 flex flex-col items-center",children:[e.jsx("span",{className:"text-[11px] font-bold text-[#8A2BE2]",children:"414 ₽"}),e.jsx("span",{className:"text-[9px] text-gray-400",children:"медиана"})]}),e.jsxs("div",{className:"absolute right-0 top-0 flex flex-col items-end",children:[e.jsx("span",{className:"text-[11px] font-bold text-[#2a1b4a]",children:"1 747 ₽"}),e.jsx("span",{className:"text-[9px] text-gray-400",children:"макс"})]})]})]})]})]})}function Ye({c:s,tag:t,setTag:r}){const[n,x]=o.useState(!1);return e.jsxs("div",{className:"group relative overflow-hidden rounded-2xl bg-white shadow-sm ring-1 ring-black/5 transition hover:shadow-md",children:[e.jsxs("div",{className:"absolute inset-x-0 top-0 z-20 flex items-center justify-between gap-1 bg-gradient-to-b from-[#2a1b4a]/80 via-[#2a1b4a]/40 to-transparent px-2 pb-5 pt-1.5",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"grid h-5 w-5 place-items-center rounded-md bg-[#CCFF00] text-[10px] font-black text-[#2a1b4a] tabular-nums",children:s.pos}),s.isAd?e.jsxs(ee,{tone:"violet",className:"!text-[9px]",children:[e.jsx(W,{className:"h-2.5 w-2.5"})," С РК · буст +",s.bust]}):e.jsxs(ee,{tone:"lime",className:"!text-[9px]",children:[e.jsx(T,{className:"h-2.5 w-2.5"})," БЕЗ РК"]})]}),e.jsxs("div",{className:"flex items-center gap-0.5",children:[e.jsx("button",{onClick:()=>r(t==="own"?null:"own"),title:"Отметить как свой товар",className:`grid h-5 w-5 place-items-center rounded ${t==="own"?"bg-[#CCFF00] text-[#2a1b4a]":"bg-white/15 text-white hover:bg-white/25"}`,children:e.jsx(q,{className:"h-3 w-3"})}),e.jsx("button",{onClick:()=>r(t==="rival"?null:"rival"),title:"Отметить как конкурента",className:`grid h-5 w-5 place-items-center rounded ${t==="rival"?"bg-[#8A2BE2] text-white":"bg-white/15 text-white hover:bg-white/25"}`,children:e.jsx(X,{className:"h-3 w-3"})})]})]}),e.jsxs("div",{className:"relative h-[200px] overflow-hidden",style:{background:`linear-gradient(135deg, ${s.hue}, #ffffff)`},children:[e.jsx("div",{className:"absolute inset-0 grid place-items-center",children:e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-widest text-black/40",children:s.brand}),e.jsx("div",{className:"px-4 text-center text-xl font-black uppercase leading-none text-black/70",children:s.title.split(" ").slice(0,2).join(" ")})]})}),e.jsx("button",{className:"absolute right-2 top-12 grid h-7 w-7 place-items-center rounded-full bg-white/80 text-gray-700 hover:bg-white",children:e.jsx(Ae,{className:"h-3.5 w-3.5"})}),e.jsxs("div",{className:"absolute bottom-2 left-2 flex flex-col gap-1",children:[e.jsx("span",{className:"rounded bg-fuchsia-500 px-1.5 py-0.5 text-[9px] font-bold text-white",children:"ХОРОШАЯ ЦЕНА"}),e.jsx("span",{className:"rounded bg-fuchsia-600 px-1.5 py-0.5 text-[9px] font-bold text-white",children:"РАСПРОДАЖА"})]})]}),e.jsxs("div",{className:"px-3 pt-2",children:[e.jsxs("div",{className:"flex items-baseline gap-1.5",children:[e.jsxs("span",{className:"text-base font-bold text-fuchsia-600",children:[s.priceSpp," ₽"]}),e.jsxs("span",{className:"text-xs text-gray-400 line-through",children:[s.priceOld," ₽"]}),e.jsxs("span",{className:"ml-auto inline-flex items-center gap-0.5 rounded bg-emerald-50 px-1 text-[10px] font-semibold text-emerald-700",children:[e.jsx(fe,{className:"h-2.5 w-2.5"})," -",Math.round((s.priceOld-s.priceSpp)/s.priceOld*100),"%"]})]}),e.jsxs("div",{className:"text-[10px] text-gray-500",children:["с WB Кошельком · клуб −",s.discountClub,"%"]}),e.jsxs("div",{className:"mt-1 flex items-center gap-1 text-[11px]",children:[e.jsx(K,{className:"h-3 w-3 fill-amber-400 text-amber-400"}),e.jsx("span",{className:"font-semibold",children:s.rating}),e.jsxs("span",{className:"text-gray-400",children:["· ",s.reviews.toLocaleStr
1ing("ru-RU")," оц."]})]})]}),e.jsxs("div",{className:"mt-2 space-y-1 border-t border-dashed border-[#8A2BE2]/25 bg-[#faf8ff] px-3 py-2 text-[11px] text-[#2a1b4a]",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-[9px] font-semibold uppercase tracking-wide text-[#8A2BE2]",children:"MarketHacker"}),s.isAd&&e.jsxs("span",{className:"flex items-center gap-0.5 rounded bg-[#CCFF00] px-1 text-[10px] font-bold text-[#2a1b4a] tabular-nums",children:[e.jsx(Oe,{className:"h-2.5 w-2.5"})," +",s.bust," поз. от рекламы"]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-x-2 gap-y-0.5 leading-tight",children:[e.jsx($,{k:"Артикул",v:s.sku}),e.jsx($,{k:"Склад",v:s.warehouse}),e.jsx($,{k:"Бренд",v:s.brand}),e.jsx($,{k:"Доставка",v:s.delivery}),e.jsx($,{k:"Продавец",v:s.seller,full:!0})]})]}),e.jsx("div",{className:"border-t border-dashed border-[#8A2BE2]/25 bg-[#faf8ff] px-3 pb-2",children:e.jsxs("button",{onClick:()=>x(!0),className:"flex w-full items-center justify-center gap-1 rounded-md border border-[#CCFF00]/60 bg-[#CCFF00]/10 px-2 py-1 text-[10px] font-medium text-[#2a1b4a] transition hover:bg-[#CCFF00]/20",children:[e.jsx(R,{className:"h-3 w-3"})," ИИ-анализ внимания"]})}),n&&e.jsx(Be,{marketplace:"wb",card:{sku:s.sku,title:s.title,brand:s.brand,hue:s.hue},onClose:()=>x(!1)})]})}function $({k:s,v:t,full:r}){return e.jsxs("div",{className:`flex items-baseline gap-1 ${r?"col-span-2":""}`,children:[e.jsx("span",{className:"text-[9px] uppercase tracking-wide text-[#2a1b4a]/45",children:s}),e.jsx("span",{className:"truncate text-[11px] font-medium text-[#2a1b4a] tabular-nums",children:t})]})}const O=[{id:"fast",label:"до 24 ч.",max:24,dot:"bg-emerald-500",cell:"bg-emerald-200 text-emerald-900",ring:"ring-emerald-400"},{id:"mid",label:"24–48 ч.",max:48,dot:"bg-lime-500",cell:"bg-lime-200 text-lime-900",ring:"ring-lime-400"},{id:"slow",label:"48–72 ч.",max:72,dot:"bg-amber-500",cell:"bg-amber-200 text-amber-900",ring:"ring-amber-400"},{id:"verySlow",label:"72+ ч.",max:999,dot:"bg-rose-500",cell:"bg-rose-200 text-rose-900",ring:"ring-rose-400"}];function ae(s){return O.find(t=>s<=t.max)??O[O.length-1]}function Je({cards:s,tags:t}){const r=new Set([3,27,64]),n=new Set([0,11,38,55,82]),[x,b]=o.useState("all"),[a,i]=o.useState("all"),[u,m]=o.useState("delivery"),N=Array.from({length:100}).map((l,c)=>{const g=s[c%s.length],f=c*7%5===0;let h=t[String(Number(g.sku)+c)]??null;h||(r.has(c)?h="own":n.has(c)&&(h="rival"));const v=(c*3+1)%7<4?"FBO":"FBS",F=parseInt(g.delivery,10)||36,B=Math.max(8,F+c*13%5*6-(v==="FBO"?8:0));return{i:c,isAd:f,tag:h,scheme:v,hours:B}}),p=N.filter(l=>(x==="all"||l.scheme===x)&&(a==="all"||ae(l.hours).id===a)),w=p.length?Math.round(p.reduce((l,c)=>l+c.hours,0)/p.length):0;return e.jsxs("div",{className:"w-[218px] shrink-0 border-r border-black/5 bg-[#fafafb] p-3",children:[e.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[e.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-wide text-gray-500",children:"Схема 1–100"}),e.jsx("button",{onClick:()=>m(u==="type"?"delivery":"type"),className:"rounded border border-black/10 bg-white px-1.5 py-0.5 text-[9px] font-medium text-gray-500 transition hover:border-[#8A2BE2]/40 hover:text-[#8A2BE2]",title:"Переключить раскраску карты",children:u==="delivery"?"цвет: доставка":"цвет: тип"})]}),e.jsx("div",{className:"mb-1.5 flex rounded-md border border-black/10 bg-white p-0.5",children:["all","FBO","FBS"].map(l=>e.jsx("button",{onClick:()=>b(l),className:`flex-1 rounded px-1 py-[3px] text-[9px] font-semibold transition ${x===l?"bg-[#2a1b4a] text-white":"text-gray-500 hover:text-[#2a1b4a]"}`,children:l==="all"?"Все":l},l))}),e.jsxs("div",{className:"mb-2 grid grid-cols-2 gap-1",children:[e.jsx("button",{onClick:()=>i("all"),className:`col-span-2 rounded border px-1 py-[3px] text-[9px] font-semibold transition ${a==="all"?"border-[#8A2BE2] bg-[#8A2BE2]/10 text-[#8A2BE2]":"border-black/10 bg-white text-gray-500 hover:text-[#2a1b4a]"}`,children:"Любая скорость"}),O.map(l=>e.jsxs("button",{onClick:()=>i(a===l.id?"all":l.id),className:`flex items-center gap-1 rounded border px-1 py-[3px] text-[9px] font-medium transition ${a===l.id?`border-transparent ring-2 ${l.ring} ${l.cell}`:"border-black/10 bg-white text-gray-500 hover:text-[#2a1b4a]"}`,children:[e.jsx("span",{className:`h-2 w-2 shrink-0 rounded-sm ${l.dot}`}),l.label]},l.id))]}),e.jsxs("div",{className:"mb-2 flex items-center justify-between rounded-md bg-white px-1.5 py-1 text-[9px] text-gray-500 ring-1 ring-black/5",children:[e.jsxs("span",{children:["Позиций: ",e.jsx("b",{className:"text-[#2a1b4a] tabular-nums",children:p.length})]}),e.jsxs("span",{children:["Ср. доставка: ",e.jsxs("b",{className:"text-[#2a1b4a] tabular-nums",children:[w," ч."]})]})]}
1),e.jsx("div",{className:"grid grid-cols-5 gap-1",children:N.map(l=>{const c=ae(l.hours),g=x!=="all"&&l.scheme!==x||a!=="all"&&c.id!==a,f=u==="delivery"?c.cell:l.isAd?"bg-fuchsia-200 text-fuchsia-800":"bg-emerald-100 text-emerald-800",h=l.tag==="own"?"ring-2 ring-[#CCFF00] ring-offset-1 ring-offset-[#fafafb]":l.tag==="rival"?"ring-2 ring-[#8A2BE2] ring-offset-1 ring-offset-[#fafafb]":"";return e.jsxs("div",{title:`Поз. ${l.i+1} · ${l.isAd?"реклама":"органика"} · ${l.scheme} · доставка ${l.hours} ч. (${c.label})${l.tag==="own"?" · свой":l.tag==="rival"?" · конкурент":""}`,className:`group/cell relative grid h-8 cursor-pointer place-items-center rounded leading-none tabular-nums transition hover:scale-110 ${f} ${h} ${g?"opacity-20 grayscale":""}`,children:[e.jsx("span",{className:"text-[9px] font-semibold",children:l.i+1}),e.jsxs("span",{className:"text-[7px] font-medium opacity-80",children:[l.hours,"ч"]}),e.jsx("span",{className:"absolute -left-1 -top-1 rounded-sm bg-white px-[2px] text-[6px] font-bold text-[#2a1b4a] ring-1 ring-black/10",children:l.scheme==="FBO"?"О":"С"}),l.tag==="own"&&e.jsx("span",{className:"absolute -right-1 -top-1 grid h-3 w-3 place-items-center rounded-sm bg-[#CCFF00] text-[#2a1b4a]",children:e.jsx(q,{className:"h-2 w-2 fill-current"})}),l.tag==="rival"&&e.jsx("span",{className:"absolute -right-1 -top-1 grid h-3 w-3 place-items-center rounded-sm bg-[#8A2BE2] text-white",children:e.jsx(X,{className:"h-2 w-2"})})]},l.i)})}),e.jsxs("div",{className:"mt-3 space-y-1.5 text-[10px] text-gray-500",children:[u==="delivery"?O.map(l=>e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:`h-2.5 w-2.5 rounded-sm ${l.dot}`})," ",l.label]},l.id)):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"h-2.5 w-2.5 rounded-sm bg-emerald-100 ring-1 ring-emerald-300"})," Органика"]}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"h-2.5 w-2.5 rounded-sm bg-fuchsia-200 ring-1 ring-fuchsia-300"})," Реклама"]})]}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"rounded-sm bg-white px-[3px] text-[7px] font-bold text-[#2a1b4a] ring-1 ring-black/10",children:"О / С"})," FBO / FBS"]}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"h-2.5 w-2.5 rounded-sm bg-white ring-2 ring-[#CCFF00]"})," Свой товар"]}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"h-2.5 w-2.5 rounded-sm bg-white ring-2 ring-[#8A2BE2]"})," Конкурент"]})]})]})}const M=[{id:"tag",label:"",w:36,min:28},{id:"pos",label:"Поз.",w:64,min:48,sortable:!0},{id:"name",label:"Артикул · Название",w:280,min:160,sortable:!0},{id:"cat",label:"Категория",w:100,min:70},{id:"brand",label:"Бренд",w:110,min:70,sortable:!0},{id:"rating",label:"Рейтинг",w:100,min:80,sortable:!0},{id:"price",label:"Цена с СПП",w:100,min:80,sortable:!0},{id:"club",label:"Клуб WB",w:80,min:60,sortable:!0},{id:"wh",label:"Приор. склад",w:130,min:90},{id:"del",label:"Доставка",w:90,min:70,sortable:!0},{id:"action",label:"Акция",w:120,min:80}];function Qe({rows:s,tags:t,setTag:r}){const[n,x]=o.useState(()=>M.map(a=>a.w)),b=(a,i)=>{i.preventDefault(),i.stopPropagation();const u=i.clientX,m=n[a],N=M[a].min,p=l=>{const c=Math.max(N,m+(l.clientX-u));x(g=>g.map((f,h)=>h===a?c:f))},w=()=>{window.removeEventListener("mousemove",p),window.removeEventListener("mouseup",w),document.body.style.cursor="",document.body.style.userSelect=""};document.body.style.cursor="col-resize",document.body.style.userSelect="none",window.addEventListener("mousemove",p),window.addEventListener("mouseup",w)};return e.jsxs("table",{className:"min-w-full text-sm",style:{tableLayout:"fixed",width:n.reduce((a,i)=>a+i,0)},children:[e.jsx("colgroup",{children:n.map((a,i)=>e.jsx("col",{style:{width:a}},M[i].id))}),e.jsx("thead",{className:"sticky top-0 bg-[#fafafb] text-[11px] uppercase tracking-wide text-gray-500",children:e.jsx("tr",{children:M.map((a,i)=>e.jsxs("th",{className:"relative border-b border-black/5 px-3 py-2 text-left font-semibold",children:[e.jsxs("button",{className:"flex items-center gap-1 hover:text-[#2a1b4a]",children:[a.label,a.sortable&&e.jsx(ge,{className:"h-3 w-3 text-gray-300"})]}),i<M.length-1&&e.jsx("span",{onMouseDown:u=>b(i,u),className:"absolute right-0 top-0 z-10 h-full w-1.5 cursor-col-resize select-none hover:bg-[#8A2BE2]/40",t
1itle:"Потяните, чтобы изменить ширину"})]},a.id))})}),e.jsx("tbody",{children:s.map(a=>{const i=t[a.sku]??null;return e.jsxs("tr",{className:`border-b border-black/5 transition hover:bg-[#CCFF00]/[0.06] ${i==="own"?"bg-[#CCFF00]/[0.08]":i==="rival"?"bg-[#8A2BE2]/[0.05]":""}`,children:[e.jsx("td",{className:"px-2 py-2",children:e.jsxs("div",{className:"flex flex-col gap-0.5",children:[e.jsx("button",{onClick:()=>r(a.sku,i==="own"?null:"own"),className:`grid h-4 w-4 place-items-center rounded ${i==="own"?"bg-[#CCFF00] text-[#2a1b4a]":"bg-black/5 text-gray-400 hover:bg-black/10"}`,children:e.jsx(q,{className:"h-2.5 w-2.5"})}),e.jsx("button",{onClick:()=>r(a.sku,i==="rival"?null:"rival"),className:`grid h-4 w-4 place-items-center rounded ${i==="rival"?"bg-[#8A2BE2] text-white":"bg-black/5 text-gray-400 hover:bg-black/10"}`,children:e.jsx(X,{className:"h-2.5 w-2.5"})})]})}),e.jsx("td",{className:"px-3 py-2",children:e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"text-sm font-bold text-[#2a1b4a]",children:a.pos}),a.isAd?e.jsx("span",{title:`+${a.bust} поз. от рекламы`,className:"grid h-4 w-4 place-items-center rounded bg-fuchsia-500/15 text-fuchsia-600",children:e.jsx(W,{className:"h-2.5 w-2.5"})}):e.jsx("span",{className:"grid h-4 w-4 place-items-center rounded bg-emerald-500/15 text-emerald-600",children:e.jsx(T,{className:"h-2.5 w-2.5"})})]})}),e.jsx("td",{className:"overflow-hidden px-3 py-2",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"h-9 w-9 shrink-0 rounded",style:{background:`linear-gradient(135deg, ${a.hue}, #ffffff)`}}),e.jsxs("div",{className:"min-w-0 leading-tight",children:[e.jsx("div",{className:"truncate text-[12px] font-medium text-[#2a1b4a]",children:a.title}),e.jsxs("div",{className:"text-[10px] text-gray-400",children:["art. ",a.sku]})]})]})}),e.jsx("td",{className:"overflow-hidden px-3 py-2 text-xs text-gray-600",children:e.jsx("div",{className:"truncate",children:a.category})}),e.jsx("td",{className:"overflow-hidden px-3 py-2 text-xs font-medium text-[#2a1b4a]",children:e.jsx("div",{className:"truncate",children:a.brand})}),e.jsx("td",{className:"px-3 py-2",children:e.jsxs("div",{className:"flex items-center gap-1 text-xs",children:[e.jsx(K,{className:"h-3 w-3 fill-amber-400 text-amber-400"}),e.jsx("span",{className:"font-semibold",children:a.rating}),e.jsxs("span",{className:"text-gray-400",children:["· ",a.reviews>1e3?`${Math.round(a.reviews/1e3)}
1k`:a.reviews]})]})}),e.jsxs("td",{className:"px-3 py-2",children:[e.jsxs("div",{className:"text-sm font-bold text-fuchsia-600",children:[a.priceSpp," ₽"]}),e.jsxs("div",{className:"text-[10px] text-gray-400 line-through",children:[a.priceOld," ₽"]})]}),e.jsx("td",{className:"px-3 py-2",children:e.jsxs("span",{className:"inline-flex items-center rounded bg-fuchsia-50 px-1.5 py-0.5 text-[10px] font-semibold text-fuchsia-700",children:["−",a.discountClub,"%"]})}),e.jsx("td",{className:"overflow-hidden px-3 py-2 text-xs text-gray-600",children:e.jsx("div",{className:"truncate",children:a.warehouse})}),e.jsx("td",{className:"overflow-hidden px-3 py-2 text-xs font-medium text-[#2a1b4a]",children:e.jsx("div",{className:"truncate",children:a.delivery})}),e.jsx("td",{className:"px-3 py-2",children:a.action?e.jsx("span",{className:"inline-flex items-center rounded-md bg-[#CCFF00]/15 px-1.5 py-0.5 text-[10px] font-semibold text-[#2a1b4a] ring-1 ring-[#CCFF00]/40",children:a.action}):e.jsx("span",{className:"text-[10px] text-gray-400",children:"без акции"})})]},a.pos+a.sku)})})]})}export{js 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.