PageSourceSearch

https://kkcrvenazvezda.rs/_next/static/chunks/372.8a3ea269bbcfd776.js

js kkcrvenazvezda.rs collected 2026-09-24 23:43:04 UTC 16,301 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[372],{9958:e=>{e.exports={trigger:"StoreAvailability_trigger___y3bI",triggerIcon:"StoreAvailability_triggerIcon__AmGTX",overlay:"StoreAvailability_overlay__cpgCh",overlayOpen:"StoreAvailability_overlayOpen__xWuko",drawer:"StoreAvailability_drawer__fabGO",drawerOpen:"StoreAvailability_drawerOpen__lsGBu",header:"StoreAvailability_header__DE0st",headerTop:"StoreAvailability_headerTop__gy0ZA",product:"StoreAvailability_product__KZ7DG",productImg:"StoreAvailability_productImg__UOXMw",productInfo:"StoreAvailability_productInfo__P8kdI",productName:"StoreAvailability_productName__FWMgs",productVariant:"StoreAvailability_productVariant__k9cPN",title:"StoreAvailability_title__Isc6J",close:"StoreAvailability_close__lzeHl",closeIcon:"StoreAvailability_closeIcon__GTKET",search:"StoreAvailability_search__Nm9L_",searchWrap:"StoreAvailability_searchWrap__75XJI",searchInput:"StoreAvailability_searchInput__PtdYf",searchIcon:"StoreAvailability_searchIcon__7QPdi",list:"StoreAvailability_list___WCTZ",cityLabel:"StoreAvailability_cityLabel__jXC4m",empty:"StoreAvailability_empty__amm_M",store:"StoreAvailability_store__fhTvh",storeLink:"StoreAvailability_storeLink__OE5Uj",storeName:"StoreAvailability_storeName__qeOiS",mapLink:"StoreAvailability_mapLink__tyAdk",mapLinkIcon:"StoreAvailability_mapLinkIcon__53cXL",storeIcon:"StoreAvailability_storeIcon__Zmsks",storeInfo:"StoreAvailability_storeInfo__gTXmv",storeAddr:"StoreAvailability_storeAddr__YpHyE",storeRight:"StoreAvailability_storeRight__Xfgdq",stockBadge:"StoreAvailability_stockBadge__xWW56",stockIn:"StoreAvailability_stockIn__tB1EN",stockLow:"StoreAvailability_stockLow__hexrP",footer:"StoreAvailability_footer__hCn6B",footerText:"StoreAvailability_footerText__JdmhB",footerCount:"StoreAvailability_footerCount__z53qN",footerLink:"StoreAvailability_footerLink__9Skge",footerLinkIcon:"StoreAvailability_footerLinkIcon__v1Ra6",panel:"StoreAvailability_panel__an6gl",panelHead:"StoreAvailability_panelHead__L2Vhq",panelText:"StoreAvailability_panelText__vkZZb",panelIcon:"StoreAvailability_panelIcon__3thvv",panelTitle:"StoreAvailability_panelTitle__l_7sJ",panelDesc:"StoreAvailability_panelDesc__5Mmit",findStore:"StoreAvailability_findStore__Jl65c",findStoreIcon:"StoreAvailability_findStoreIcon__vdzO7",nearest:"StoreAvailability_nearest__MnE7s",nearestTag:"StoreAvailability_nearestTag__ZX8Qy",nearestInfo:"StoreAvailability_nearestInfo__NUljt",nearestName:"StoreAvailability_nearestName__SbVR8",nearestMeta:"StoreAvailability_nearestMeta__ngZ1z"}},40372:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>S});var r=a(95155),l=a(12115),n=a(47650),i=a(12758),o=a.n(i),s=a(2821),c=a(9958),d=a.n(c),u=a(36157),m=a(20063),v=a(2717),_=a(63414);let p=e=>{let{className:t}=e;return(0,r.jsxs)("svg",{className:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("path",{d:"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}),(0,r.jsx)("polyline",{points:"9 22 9 12 15 12 15 22"})]})},h=e=>{let{className:t}=e;return(0,r.jsxs)("svg",{className:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[(0,r.jsx)("circle",{cx:"11",cy:"11",r:"8"}),(0,r.jsx)("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]})},y=e=>{let{className:t}=e;return(0,r.jsxs)("svg",{className:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"}),(0,r.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"})]})},g=e=>{let{className:t}=e;return(0,r.jsxs)("svg",{className:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("path",{d:"M7 17L17 7"}),(0,r.jsx)("polyline",{points:"7 7 17 7 17 17"})]})},x=e=>{let{className:t}=e;return(0,r.jsxs)("svg",{className:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("path",{d:"M3 9l1.2-4.5A2 2 0 0 1 6.1 3h11.8a2 2 0 0 1 1.9 1.5L21 9"}),(0,r.jsx)("path",{d:"M3 9h18v2.5a3 3 0 0 1-6 0 3 3 0 0 1-6 0 3 3 0 0 1-6 0z"}),(0,r.jsx)("path",{d:"M5 13.5V21h14v-7.5"}),(0,r.jsx)("path",{d:"M10 21v-5h4v5"})]})},b=e=>{let{className:t}=e;return(0,r.jsxs)("svg",{className:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("path",{d:"M21 10c0 7-9 13-9 13S3 17 3 10a9 9 0 0 1 18 0z"}),(0,r.jsx)("circle",{cx:"12",cy:"10",r:"3"})]})},f=e=>{let{className:t}=e;return(0,r.jsxs)("svg",{className:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("path",{d:"M5 12h14"}),(0,r.jsx)("polyline",{points:"12 5 19 12 12 19"})]})},j=e=>{let{className:t,classes:a,data:{stores:i=[],lowStockLimit:o,buttonIcon:c,
1closeIcon:j,allStoresSlug:S,productCode:k,variantKeys:N,fractionDigits:A=2,buttonLabel:I="Check availability in stores",title:L="Availability in stores",searchPlaceholder:w="Search by city or store name...",inStock:C="In stock",lowStock:T="Low stock",noResults:M="No stores found",availableText:B="Available in {available} of {total} stores",allStoresLabel:F="All stores",mapLabel:O="Map",mode:E="button",panelTitle:P="This product is waiting for you in store",panelIntro:W="Not sold online.",panelEmptyText:D="Currently not in stock in any store — call us for delivery information.",findLabel:U="Find in store",nearestLabel:H="Nearest",openLabel:q="Open",closesLabel:R="Closes at {time}",closedLabel:X="Closed",opensLabel:Z="Opens at {time}"}={}}=e,z="panel"===E,{onGetLocations:V,onGetProducts:G,defaultLanguage:J,defaultCurrency:K}=(0,u.nm)(),Q=(0,m.usePathname)(),Y=(0,m.useSearchParams)(),[$,ee]=l.useState(!1),[et,ea]=l.useState([]),[er,el]=l.useState(!1),[en,ei]=l.useState(""),[eo,es]=l.useState(!1),[ec,ed]=l.useState({});l.useEffect(()=>{es(!0)},[]);let eu=l.useMemo(()=>{var e;return(null==Y||null==(e=Y.get)?void 0:e.call(Y,"variant"))||null},[Y]),em=l.useMemo(()=>N&&""!==N?N.split(",").map(e=>e.trim()).filter(Boolean):null,[N]),ev=l.useCallback(e=>{var t;let a=null==J||null==(t=J.locale)?void 0:t.replaceAll("_","-");if(!a)return String(null!=e?e:0);let r=Number(A)||0;return new Intl.NumberFormat(a,{style:"currency",currency:(null==K?void 0:K.isoCodeAlpha)||"EUR",currencyDisplay:"code",minimumFractionDigits:r,maximumFractionDigits:r}).format(null!=e?e:0)},[null==J?void 0:J.locale,null==K?void 0:K.isoCodeAlpha,A]),e_=l.useCallback(e=>{var t,a;let r=e;return(null==e||null==(t=e.variants)?void 0:t.length)===1?r=e.variants[0]:(null==e||null==(a=e.variants)?void 0:a.length)>1&&(r=e.variants.find(e=>Number(e.id)===Number(eu))||e.variants.find(e=>e.slug===Q)||e.variants[0]),r},[Q,eu]);l.useEffect(()=>{let e=!1,t=async t=>{try{let a=await G(t);if(e)return;let r=a||{},l=e_(r);ed({productId:(null==r?void 0:r.productId)||(null==r?void 0:r.id),...l,name:null==r?void 0:r.name})}catch(e){console.error("StoreAvailability: failed to load product",e)}};return k?t("code=".concat(k)):Q&&t("slug=".concat(Q)),()=>{e=!0}},[G,k,Q,e_]);let ep=l.useMemo(()=>{var e;let t=[];if(em&&em.length>0)for(let e of em){let a=null==ec?void 0:ec[e];if(null!=a&&""!==a){let r=e.charAt(0).toUpperCase()+e.slice(1);t.push("".concat(r,": ").concat(a))}}let a=null==ec||null==(e=ec.prices)?void 0:e[0];return null!=a&&t.push(ev(null==a?void 0:a.price)),t.length>0?t.join(" \xb7 "):null},[em,ec,ev]);l.useEffect(()=>{if(!$&&!z||er)return;let e=!1;return(async()=>{try{let t=await V();e||(ea(Array.isArray(t)?t:[]),el(!0))}catch(e){console.error("StoreAvailability: failed to load app_locations",e)}})(),()=>{e=!0}},[$,z,er,V]),l.useEffect(()=>{if(!$)return;let e=e=>{"Escape"===e.key&&ee(!1)},t=document.body.style.overflow;return document.body.style.overflow="hidden",document.addEventListener("keydown",e),()=>{document.body.style.overflow=t,document.removeEventListener("keydown",e)}},[$]);let eh=l.useMemo(()=>{if(!Array.isArray(i)||0===i.length)return[];let e=new Map;return et.forEach(t=>{(null==t?void 0:t.code)&&e.set(t.code,t)}),i.map(t=>{let a=e.get(t.code);return a?{code:t.code,quantity:t.quantity,name:a.name||t.name,city:a.city||t.city,addressLine1:a.addressLine1||t.addressLine1,slug:a.slug,imageUrl:a.imageUrl,latitude:a.latitude,longitude:a.longitude,workingHours:a.workingHoursFromCalendar}:null}).filter(Boolean)},[i,et]),ey=l.useMemo(()=>{let e=en.trim().toLowerCase();return e?eh.filter(t=>{let a=(t.name||"").toLowerCase(),r=(t.city||"").toLowerCase();return a.includes(e)||r.includes(e)}):eh},[eh,en]),eg=l.useMemo(()=>{let e=new Map;
1return ey.forEach(t=>{let a=t.city||"";e.has(a)||e.set(a,[]),e.get(a).push(t)}),Array.from(e.entries())},[ey]),ex=(e,r)=>(0,s.A)(e,"".concat(t).concat(r||""),{["".concat(a).concat(r||"")]:a&&r}),eb=Array.isArray(i)&&i.length>0,ef=e=>"number"==typeof o&&"number"==typeof(null==e?void 0:e.quantity)&&e.quantity<o,ej=e=>(0,s.A)(d().stockBadge,e?d().stockLow:d().stockIn,"".concat(t,"StockBadge"),"".concat(t).concat(e?"StockLow":"StockIn"),{["".concat(a,"StockBadge")]:a,["".concat(a).concat(e?"StockLow":"StockIn")]:a}),eS=()=>eo&&"undefined"!=typeof document?(0,n.createPortal)((0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:(0,s.A)(d().overlay,"".concat(t,"Overlay"),{[d().overlayOpen]:$,["".concat(t,"OverlayOpen")]:$,["".concat(a,"Overlay")]:a,["".concat(a,"OverlayOpen")]:a&&$}),onClick:()=>ee(!1)}),(0,r.jsxs)("aside",{className:(0,s.A)(d().drawer,"".concat(t,"Drawer"),{[d().drawerOpen]:$,["".concat(t,"DrawerOpen")]:$,["".concat(a,"Drawer")]:a,["".concat(a,"DrawerOpen")]:a&&$}),"aria-hidden":!$,children:[(0,r.jsxs)("div",{className:ex(d().header,"Header"),children:[(0,r.jsxs)("div",{className:ex(d().headerTop,"HeaderTop"),children:[(0,r.jsx)("div",{className:ex(d().title,"Title"),children:L}),(0,r.jsx)("button",{type:"button",className:ex(d().close,"Close"),onClick:()=>ee(!1),"aria-label":"Close",children:j?(0,r.jsx)(_.default,{data:{svgUrl:j},className:ex(null,"CloseIcon")}):(0,r.jsx)(y,{className:ex(d().closeIcon,"CloseIcon")})})]}),(null==ec?void 0:ec.name)&&(0,r.jsxs)("div",{className:ex(d().product,"Product"),children:[(0,r.jsx)("div",{className:ex(d().productImg,"ProductImg"),style:ec.imageUrl?{backgroundImage:"url(".concat(ec.imageUrl,")")}:void 0}),(0,r.jsxs)("div",{className:ex(d().productInfo,"ProductInfo"),children:[(0,r.jsx)("div",{className:ex(d().productName,"ProductName"),children:ec.name}),ep&&(0,r.jsx)("div",{className:ex(d().productVariant,"ProductVariant"),children:ep})]})]})]}),(0,r.jsx)("div",{className:ex(d().search,"Search"),children:(0,r.jsxs)("div",{className:ex(d().searchWrap,"SearchWrap"),children:[(0,r.jsx)(h,{className:ex(d().searchIcon,"SearchIcon")}),(0,r.jsx)("input",{type:"text",className:ex(d().searchInput,"SearchInput"),placeholder:w,value:en,onChange:e=>ei(e.target.value)})]})}),(0,r.jsx)("div",{className:ex(d().list,"List"),children:0===eg.length?(0,r.jsx)("div",{className:ex(d().empty,"Empty"),children:M}):eg.map(e=>{let[t,a]=e;return(0,r.jsxs)(l.Fragment,{children:[(0,r.jsx)("div",{className:ex(d().cityLabel,"CityLabel"),children:t}),a.map(e=>{let t=ef(e),a=null!=e.latitude&&null!=e.longitude,l=a?"https://www.google.com/maps/dir/?api=1&destination=".concat(e.latitude,",").concat(e.longitude):void 0,n=e.slug?e.slug.startsWith("/")?e.slug:"/".concat(e.slug):void 0,i=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:ex(d().storeIcon,"StoreIcon"),style:e.imageUrl?{backgroundImage:"url(".concat(e.imageUrl,")")}:void 0,children:!e.imageUrl&&(0,r.jsx)(p,{})}),(0,r.jsxs)("div",{className:ex(d().storeInfo,"StoreInfo"),children:[(0,r.jsx)("div",{className:ex(d().storeName,"StoreName"),children:e.name}),e.addressLine1&&(0,r.jsx)("div",{className:ex(d().storeAddr,"StoreAddr"),children:e.addressLine1})]})]});return(0,r.jsxs)("div",{className:ex(d().store,"Store"),children:[n?(0,r.jsx)(v.A,{href:n,className:ex(d().storeLink,"StoreLink"),onClick:()=>ee(!1),children:i}):i,(0,r.jsxs)("div",{className:ex(d().storeRight,"StoreRight"),children:[(0,r.jsx)("span",{className:ej(t),children:t?T:C}),a&&(0,r.jsxs)("a",{href:l,target:"_blank",rel:"noopener noreferrer",className:ex(d().mapLink,"MapLink"),children:[O,(0,r.jsx)(g,{className:ex(d().mapLinkIcon,"MapLinkIcon")})]})]})]},e.code)})]},t||"unknown")})}),(()=>{let e=eh.length,t=et.length||e;return(0,r.jsxs)("div",{className:ex(d().footer,"Footer"),children:[(0,r.jsx)("div",{className:ex(d().footerText,"FooterText"),children:B.split(/(\{available\}|\{total\})/g).map((a,n)=>"{available}"===a?(0,r.jsx)("strong",{className:ex(d().footerCount,"FooterCount"),children:e},n):"{total}"===a?(0,r.jsx)("strong",{className:ex(d().footerCount,"FooterCount"),children:t},n):(0,r.jsx)(l.Fragment,{children:a},n))}),S&&(0,r.jsxs)(v.A,{href:S,className:ex(d().footerLink,"FooterLink"),onClick:()=>ee(!1),children:[F,(0,r.jsx)(f,{className:ex(d().footerLinkIcon,"FooterLinkIcon")})]})]})})()]})]}),document.body):null;return z?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:ex(d().panel,"Panel"),children:[(0,r.jsxs)("div",{className:ex(d().panelHead,"PanelHead"),children:[(0,r.jsx)("div",{className:ex(d().panelIcon,"PanelIcon"),children:(0,r.jsx)(x,{})}),(0,r.jsxs)("div",{className:ex(d().panelText,"PanelText"),children:[(0,r.jsx)("div",{className:ex(d().panelTitle,"PanelTitle"),children:P}),(0,r.jsxs)("div",{className:ex(d().panelDesc,"PanelDesc"),children:[W,er&&0===eh.length?(0,r.jsxs)(r.Fragment,{children:[" ",D]}):null]})]}),(0,r.jsxs)("button",{type:"button",className:ex(d().findStore,"FindStore"),onClick:()=>ee(!0),children:[(0,r.jsx)(b,{className:ex(d().findStoreIcon,"FindStoreIcon")}),U]})]}),(()=>{let e=eh[0];if(!er||!e)return null;let t=ef(e),a=(e=>{if(!Array.isArray(e)||0===e.length)return null;let t=new Date,a=0===t.getDay()?7:t.getDay(),r=e=>
1{let[t,a]=String(e).split(":").map(Number);return 60*t+(a||0)},l=60*t.getHours()+t.getMinutes(),n=e.find(e=>Number(null==e?void 0:e.dow)===a);if((null==n?void 0:n.opensAt)&&(null==n?void 0:n.closesAt)){if(l>=r(n.opensAt)&&l<r(n.closesAt))return{open:!0,time:n.closesAt};if(l<r(n.opensAt))return{open:!1,time:n.opensAt}}for(let t=1;t<=7;t+=1){let r=(a-1+t)%7+1,l=e.find(e=>Number(null==e?void 0:e.dow)===r);if(null==l?void 0:l.opensAt)return{open:!1,time:l.opensAt}}return null})(e.workingHours),l=[[e.addressLine1,e.city].filter(Boolean).join(", "),...a?a.open?[q,R.replace("{time}",a.time)]:[X,Z.replace("{time}",a.time)]:[]].filter(Boolean).join(" • "),n=e.slug?e.slug.startsWith("/")?e.slug:"/".concat(e.slug):void 0,i=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:ex(d().nearestTag,"NearestTag"),children:H}),(0,r.jsxs)("div",{className:ex(d().nearestInfo,"NearestInfo"),children:[(0,r.jsx)("div",{className:ex(d().nearestName,"NearestName"),children:e.name}),l&&(0,r.jsx)("div",{className:ex(d().nearestMeta,"NearestMeta"),children:l})]}),(0,r.jsx)("span",{className:ej(t),children:t?T:C})]});return n?(0,r.jsx)(v.A,{href:n,className:ex(d().nearest,"Nearest"),children:i}):(0,r.jsx)("div",{className:ex(d().nearest,"Nearest"),children:i})})()]}),eS()]}):eb?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("button",{type:"button",className:ex(d().trigger,""),onClick:()=>ee(!0),children:[c?(0,r.jsx)(_.default,{data:{svgUrl:c},className:ex(null,"ButtonIcon")}):(0,r.jsx)(p,{className:ex(d().triggerIcon,"ButtonIcon")}),(0,r.jsx)("span",{className:ex(d().triggerLabel,"Label"),children:I})]}),eS()]}):null};j.propTypes={className:o().string,classes:o().string,data:o().shape({stores:o().array,lowStockLimit:o().number,buttonIcon:o().string,closeIcon:o().string,buttonLabel:o().string,title:o().string,searchPlaceholder:o().string,inStock:o().string,lowStock:o().string,noResults:o().string,availableText:o().string,allStoresLabel:o().string,allStoresSlug:o().string,mapLabel:o().string,productCode:o().string,variantKeys:o().string,fractionDigits:o().number,mode:o().oneOf(["button","panel"]),panelTitle:o().string,panelIntro:o().string,panelEmptyText:o().string,findLabel:o().string,nearestLabel:o().string,openLabel:o().string,closesLabel:o().string,closedLabel:o().string,opensLabel:o().string})};let S=j}}]);

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.