PageSourceSearch

https://medis.com.ua/_next/static/chunks/2841.ec9f18e99b0b10e7.js

js medis.com.ua collected 2026-10-02 21:21:22 UTC 7,516 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2841],{7886:function(e,l,t){t.r(l);var a=t(57437),s=t(2265),n=t(72694),r=t(23524),d=t(70070),i=t(9723),o=t(29437),c=t(23340),m=t(75465),x=t(45002),u=t(66742),h=t(90641),p=t(54916),f=t(99246),v=t(94457),j=t(57924),g=t(68402),b=t(17099),N=t(31406),w=t(52815),y=t(13751);l.default=function(e){let{onClose:l,homePage:t}=e,C=(0,s.useRef)(null),{point:k}=(0,y.O)(),{open:z,setOpen:_}=(0,w.W)(),D=(0,n.ac)("(min-width: 1160px)"),[S,I]=s.useState(""),[L,E]=(0,s.useState)(!1),[M,O]=(0,s.useState)({id:null,load:!1}),P=(0,s.useMemo)(()=>{if(t){var e;return null!==(e=t.page.additions.product_categories.array_data)&&void 0!==e?e:[]}return[]},[t]),{setCartAnalyses:J,cartAnalyses:T}=(0,N.x)(),{mutate:Z}=(0,j.S)(),$=(0,f.Z)(S.trim(),500),{data:A}=(0,b.J)({enabled:z}),{categories:B}=null!=A?A:{},F=(0,s.useMemo)(()=>t?t.page.additions.popular_products.array_data.map(e=>e.product):[],[t]),{data:H,fetchNextPage:U,isLoading:W,hasNextPage:q,isFetchingNextPage:R}=(0,g.Iy)({q:$}),G=e=>{var l,t;let{data:a}=e;(null==a?void 0:null===(t=a.result)||void 0===t?void 0:null===(l=t.cart)||void 0===l?void 0:l.products)&&(_(!1),J(a.result.cart.products),E(!0),O({id:null,load:!1}))},K=(e,l)=>{e.preventDefault(),e.stopPropagation(),T.some(e=>e.id===l)?E(!0):(O({id:l,load:!0}),Z({id:l,point_id:null==k?void 0:k.id},{onSuccess:G}))},Q=(0,s.useMemo)(()=>$?null==B?void 0:B.flatMap(e=>{let{items:l}=e;return l.map(e=>e).filter(e=>e.name.toLowerCase().startsWith($.toLowerCase()))}):null==P?void 0:P.map(e=>e.product_category),[$,B,P]),V=(0,s.useMemo)(()=>$?null!=H?H:[]:null!=F?F:[],[$,F,H]),{ref:X}=(0,n.S1)({threshold:.1,onChange:e=>{e&&q&&$&&U()}}),Y=()=>{null==l||l(),_(!1)},ee=(0,a.jsxs)("div",{className:"min-h-full md:flex md:flex-col",children:[(0,a.jsxs)("div",{className:"fixed z-10 flex h-fit w-full gap-4 border-b border-border bg-white p-6 pb-8 md:sticky md:top-0  md:bg-transparent md:p-0",children:[(0,a.jsx)(x.I,{ref:C,value:S,onChange:e=>I(e.target.value),startIcon:"search",withClearButton:!0,handleClear:()=>I(""),placeholder:D?"Пошук аналізів та категорій":"Назва чи код аналіза",className:"max-h-none border pr-0 md:h-20 md:border-0 md:pl-[96px]",startIconColor:"md:text-primary text-text-muted",startIconClassName:"md:bg-primary-skeleton md:w-[72px] md:h-14 md:rounded-xl md:justify-center"}
1),(0,a.jsx)(d.hU,{iconName:"close",variant:"secondary",className:"min-w-12 md:hidden",onClick:()=>{_(!1),null==l||l()}})]}),(0,a.jsx)("div",{className:(0,v.cn)("border-border pt-[103px] md:pt-0 md:border-t-0 flex items-start md:flex-row flex-col justify-start md:max-h-none min-h-full grow md:px-12 md:py-10",W||(null==Q?void 0:Q.length)||V.length?"flex-col-reverse":"justify-center items-center"),children:W||(null==Q?void 0:Q.length)||V.length?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"relative flex w-full flex-col gap-6 px-6 pb-10 pt-12 md:sticky md:top-[120px] md:max-w-[480px] md:p-0",children:[(0,a.jsx)("h2",{className:"text-lg font-bold text-text-muted",children:$?"Категорії":"Популярні категорії"}),(0,a.jsx)("div",{className:"hide-scrollbar flex h-full flex-col md:max-h-[583px] md:overflow-y-scroll",children:(null==Q?void 0:Q.length)?null==Q?void 0:Q.map((e,l)=>(0,a.jsx)("div",{className:"!border-cropped border-b",children:(0,a.jsx)(d.zx,{asLinkChild:!0,onClick:Y,href:"/analizy/kategoriia/".concat(e.slug),className:"h-[53px] max-w-none !bg-none px-0 py-4 text-base font-semibold text-black last:border-0 hover:opacity-50",children:e.name})},l)):(0,a.jsx)("div",{className:"text-bsae py-4 font-semibold text-text-muted",children:"На жаль, за вашим запитом категорії не знайдено"})})]}),(0,a.jsxs)("div",{className:"flex w-full max-w-[100vw] flex-col gap-6 border-t border-border px-4 pt-8 md:max-w-none md:border-0 md:p-0",children:[(0,a.jsx)("h2",{className:"text-lg font-bold text-text-muted",children:$?"Аналізи":"Популярні аналізи"}),(0,a.jsxs)("div",{className:(0,v.cn)("flex h-full flex-col gap-3",R&&"mb-4"),children:[W?(0,a.jsx)("div",{className:"flex w-full items-center justify-center",children:(0,a.jsx)(o.$,{})}):(null==V?void 0:V.length)?null==V?void 0:V.map(e=>(0,a.jsx)(d.zx,{className:"h-auto max-h-none max-w-none p-0",onClick:Y,children:(0,a.jsx)(r.$,{isLoading:M,...e,className:"w-full",handleEndButtonClick:l=>{K(l,e.id)}})},e.id)):(0,a.jsx)("div",{className:"py-4 text-base font-semibold text-text-muted",children:"На жаль, за вашим запитом аналізів не знайдено"}),(0,a.jsx)("div",{className:(0,v.cn)("flex w-full overflow-hidden items-center justify-center",R?"h-auto py-2":"h-0 py-0"),children:(0,a.jsx)(o.$,{})}),(0,a.jsx)("div",{ref:X})]})]})]}):(0,a.jsx)("div",{className:"mt-10 flex items-center justify-center md:mt-0",children:(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center gap-6",children:[(0,a.jsx)("div",{className:"flex size-12 items-center justify-center rounded bg-primary-skeleton",children:(0,a.jsx)(c.J,{name:"search_off",className:"size-8 text-primary"})}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 text-center",children:[(0,a.jsx)("p",{className:"text-lg font-medium",children:"Ми не можемо знайти відповідний аналіз"}),(0,a.jsx)("p",{className:"text-sm font-normal text-text-muted",children:"Спробуйте пошук за категоріями на сторінці аналізів"})]}),(0,a.jsx)(d.zx,{variant:"secondary",onClick:()=>{_(!1),null==l||l()},href:p.Z6.catalog,className:"max-w-none",asLinkChild:!0,children:"Перейти на сторінку аналізів"})]})})})]});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.zx,{variant:"outline",onClick:()=>_(!0),className:"hidden size-10 items-center justify-center rounded-full p-0 xxlg:flex",children:(0,a.jsx)(c.J,{name:"search",className:"size-5 text-primary"})}),D?(0,a.jsx)(u.u,{isUseHeader:!1,className:"top-0 mt-4 hidden h-full max-h-[calc(100vh-150px)] w-[calc(100vw-64px)] max-w-screen-2xl translate-y-0 overflow-y-scroll p-0 md:block",isOpen:z,onClose:()=>{_(!1),I("")},children:ee}):(0,a.jsx)(m.Drawer,{repositionInputs:!1,disablePreventScroll:!0,open:z,onOpenChange:_,children:(0,a.jsx)(m.DrawerContent,{onAnimationEnd:()=>{var e,l;z?null===(e=C.current)||void 0===e||e.focus():null===(l=C.current)||void 0===l||l.blur()},classNameOverlay:"z-[50]",className:"z-[1000] bg-white md:hidden",children:(0,a.jsx)(h.ScrollArea,{className:"relative flex flex-col",children:ee})})}),(0,a.jsx)(i.k,{open:L,onClose:()=>E(!1)})]})}},66742:function(e,l,t){t.d(l,{u:function(){return d}});var a=t(57437),s=t(60349),n=t(94457),r=t(74291);let d=e=>{let{title:l,isOpen:t,isUseHeader:d=!0,children:i,description:o,className:c,onClose:m}=e,x=(0,a.jsxs)(r.DialogHeader,{children:[(0,a.jsx)(r.DialogTitle,{children:l}),(0,a.jsx)(r.DialogDescription,{className:(0,n.cn)(!o&&"h-0"),children:o||""})]});return(0,a.jsx)(r.Dialog,{open:t,onOpenChange:e=>{e||m()},children:(0,a.jsxs)(r.DialogContent,{"aria-describedby":"modal-description",className:(0,n.cn)("w-11/12 rounded-xl bg-white",c),children:[d?x:(0,a.jsx)(s.f,{children:x}),i]})})}},99246:function(e,l,t){var a=t(2265);l.Z=function(e){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,[t,s]=(0,a.useState)(e);return(0,a.useEffect)(()=>{let t=setTimeout(()=>{s(e)},l);return()=>{clearTimeout(t)}},[e,l]),t}}}]);

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.