PageSourceSearch

https://sonepar.es/_next/static/chunks/pages/store-locator-9af0259e3b604de5.js

js sonepar.es collected 2026-09-28 10:40:13 UTC 14,271 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9530],{2587:e=>{e.exports={container:"store-marker-pop-up_container__EinbU",title:"store-marker-pop-up_title__o3onf",open:"store-marker-pop-up_open__7d0kg",close:"store-marker-pop-up_close__3CQ_V",actions:"store-marker-pop-up_actions__Y7XK6",link:"store-marker-pop-up_link__vt1hd",icons:"store-marker-pop-up_icons__mtpqT",links:"store-marker-pop-up_links__aLOk_",stock:"store-marker-pop-up_stock__CkxFe"}},11882:e=>{e.exports={map:"store-map-container_map__Siqe5",closeButton:"store-map-container_closeButton__vdEct",closeButton__mobile:"store-map-container_closeButton__mobile__UMEsk",center:"store-map-container_center__lt7NF",zoom:"store-map-container_zoom__ncIIX",zoomIn:"store-map-container_zoomIn__sAInb",zoomOut:"store-map-container_zoomOut__HZSqm"}},20729:e=>{e.exports={container:"store-marker_container__LP4_w",dot:"store-marker_dot__EWfPs",active:"store-marker_active__vmbcY",default:"store-marker_default__NEC18"}},40385:e=>{e.exports={container:"store-locator-container_container__d__Tl"}},46025:e=>{e.exports={sideBox:"store-locator-with-map_sideBox__BYrYu",fullHeight:"store-locator-with-map_fullHeight__e7TgB",titleContainer:"store-locator-with-map_titleContainer__ddIkU",searchContainer:"store-locator-with-map_searchContainer__6Ws2_",pagination:"store-locator-with-map_pagination__jcHvQ",skeleton:"store-locator-with-map_skeleton__pUU_6"}},49055:e=>{e.exports={fullHeight:"store-google-map-mobile_fullHeight__VfUM3",halfHeight:"store-google-map-mobile_halfHeight__a_ymw",map:"store-google-map-mobile_map__4Q9r_",title:"store-google-map-mobile_title__j5SZF"}},59258:e=>{e.exports={loading:"store-map_loading__20G4_",fullHeight:"store-map_fullHeight__Lesk_",halfHeight:"store-map_halfHeight___u1MR"}},67284:e=>{e.exports={map:"store-map-mobile_map__cPwbl",closeButton:"store-map-mobile_closeButton__xDksi",closeButton__mobile:"store-map-mobile_closeButton__mobile__Hazvx",center:"store-map-mobile_center__WIuxh",zoom:"store-map-mobile_zoom__4pO4i",zoomIn:"store-map-mobile_zoomIn__W0kAH",zoomOut:"store-map-mobile_zoomOut__wwIWC",markerPopUp:"store-map-mobile_markerPopUp__dBx_7",loggedIn:"store-map-mobile_loggedIn__SZn_p"}},67457:(e,t,o)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/store-locator",function(){return o(87637)}])},87637:(e,t,o)=>{"use strict";o.r(t),o.d(t,{__N_SSP:()=>ej,default:()=>eg});var a=o(60004),s=o(43207),i=o(7976),r=o(68915),l=o(58946),n=o(73121),c=o(8225),d=o(20),p=o(10468),m=o(20655),_=o(12072),u=o(48628),h=o(91683),v=o(94835),x=o(31811),f=o(87285),j=o(83673),g=o(74709),k=o(46025),b=o.n(k),y=o(60072);function N(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,a)}return o}function w(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?N(Object(o),!0).forEach(function(t){(0,_.A)(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):N(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}let I=({fullHeight:e})=>{let{isLoggedIn:t}=(0,r.Z2)(),o=(0,l.v)(),{0:s,1:i}=(0,a.useState)(null),{isOpen:n,closeDrawer:c,openDrawer:d}=(0,u.b)(),{cart:p,isCartLoading:m}=(0,x.B_)(),{data:_}=(0,v.j2E)({variables:{facilityId:p?.logisticDetails?.facilityId},skip:!p?.logisticDetails?.facilityId||m||!t,fetchPolicy:"cache-first"});(0,a.useEffect)(()=>{s&&d()},[s]);let k=()=>{c(),i(null)};return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)("div",{id:"store-list",className:e?b().fullHeight:b().sideBox,children:t?(0,y.jsx)(j.D,w(w({},o),{},{setSelectStorePanelProps:i,defaultStore:_?.storeById,hideOpenMapButton:!0,hasPadding:!0})):(0,y.jsx)(g.E,w(w({},o),{},{hideOpenMapButton:!0,hasPadding:!0,defaultStore:void 0}))}),(0,y.jsx)(h._,{isOpen:n,onClose:k,closeLabel:"close store locator drawer",children:s&&(0,y.jsx)(f.N,{closeDrawer:k,selectStorePanelProps:s})})]})};var C=o(40385),z=o.n(C),H=o(82726),O=o(44908),B=o(10983),M=o(61688),S=o(62740),P=o(59258),E=o.n(P),$=o(35695),D=o(8280),L=o(66051),A=o(31893),V=o(20729),Z=o.n(V);let U=({dataTestId:e,isSelected:t=!1,isActive:o=!1})=>(0,y.jsxs)("div",{className:Z().container,children:[(0,y.jsxs)("svg",{"data-testid":e,width:t?"32":"20",height:t?"37":"25",viewBox:"0 0 20 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:Z().defaultContainer,children:[(0,y.jsx)("circle",{cx:"10",cy:"10",r:"10",className:o?Z().active:Z().default}),(0,y.jsx)("path",{d:"M6 19L10 25L14 19H6Z",className:o?Z().active:Z().default}),(0,y.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 6C6 5.44772 6.44772 5 7 5H13C13.5523 5 14 5.44772 14 6V7.40371L14.9642 9.8143C15.0259 9.96835 15.0071 10.1429 14.914 10.2803C14.821 10.4177 14.6659 10.5 14.5 10.5H14V14H15V15H5V14H6V10.5H5.5C5.33409 10.5 5.17898 10.4177 5.08597 10.2803C4.99295 10.1429 4.97415 9.96835 5.03576 9.8143L6 7.40371V6ZM7 14H10.5V10.5H7V14ZM11.5 14H13V10.5H11.5V14ZM13.1615 8L13.7615 9.5H6.23852L6.83852 8H13.1615ZM13 7V6H7V7H13Z",fill:o?"black":"white"})]}),(0,y.jsx)("div",{className:(0,$.A)(Z().dot,{[Z().active]:o})})]}),T=({store:e,activeStore:t})=>{let{cart:o}=(0,x.B_)(),a=e?.facilityId===o?.logisticDetails?.facilityId,s=e?.facilityId===t;return(0,y.jsx)(U,{isActive:s,isSelected:a,dataTestId:`marker-${a?"selected-":""}${s?"active-":""}${e?.facilityId}`})},F=({googleMap:e,stores:t,centerMarker:o,advancedMarker:s,activeStore:i,setActiveStore:r})=>{let{setIsMobileMarkerActive:n}=(0,l.v)();return(0,a.useEffect)(()=>{t.length&&(0,L.j)(t,e)},[t]),(0,y.jsx)(y.Fragment,{children:t.map(t=>(0,y.jsx)(A.J,{position:{lat:t.location.latitude,lng:t.location.longitude},map:e,advancedMarker:s,onClick:()=>{o?.({lat:t.location.latitude,lng:t.location.longitude}),r(t?.facilityId),n(!0)},children:(0,y.jsx)(T,{store:t,activeStore:i})},`${t?.facilityId}-key`))})};var R=o(49055),W=o.n(R);let X=()=>{let{stores:e,googleMap:t,setGoogleMap:o,activeStore:s,setActiveStore:i,isMobileMarkerActive:r,centerMarker:n}=(0,l.v)(),{0:c,1:d}=(0,a.useState)();return(0,y.jsx)(D.R,{setGoogleMap:o,setAdvancedMarker:d,className:(0,$.A)(W().map,r?W().fullHeight:W().halfHeight),children:t&&(0,y.jsx)(F,{googleMap:t,stores:e,centerMarker:n,advancedMarker:c,activeStore:s,setActiveStore:i})})};var Y=o(45062),q=o(88088),G=o(45927),K=o(5185),Q=o(86263),J=o(52726),ee=o(52322),et=o(35477),eo=o(55537),ea=o(82979),es=o(2587),ei=o.n(es);let er=({className:e,store:t,isSelected:o=!1,onClose:a})=>{let[l]=(0,s.B)(),{twelve_hours_notation:n}=(0,i.rD)(),{isLoggedIn:c}
1=(0,r.Z2)(),d=(0,ee.PK)(n),{isLockerOnly:p,hasLocalLocker:m,facility:_,seeOnMapHref:u,selectCtaLabel:h}=(0,G.k)(t),v=(0,ee.e$)(t,d)||l("header.storesDrawer.open.closedToday"),x=(0,ee.e$)(p?t:t.localLocker,d)||l("header.storesDrawer.open.closedToday"),{updateCartFacility:f}=(0,K.n)({facilityId:_?.facilityId,facilityName:_?.name});return(0,y.jsxs)("div",{className:(0,$.A)(ei().container,e),id:"gmap-popup","data-testid":"store-map-marker-pop-up",children:[o&&(0,y.jsx)(Y.v,{size:"s","data-testid":"map-marker-pop-up-is-selected",children:l("header.storesDrawer.selectedStore")}),a&&(0,y.jsx)(H.$,{variant:"ghost",icon:"cross",className:ei().close,size:"s",onClick:a,floating:!0,"data-testid":"close-button",children:null}),(0,y.jsx)(Q.w,{className:ei().title,variant:"underlined",href:(0,ea.vP)(_),"data-testid":"map-marker-pop-up-title",children:(0,y.jsx)(q.E,{size:"body-3",children:t.name})}),(0,y.jsx)("div",{children:(0,y.jsx)(q.E,{size:"body-2","data-testid":"map-marker-pop-up-address",children:`${t.address.addressLine1}, ${t.address.postalCode} ${t.address.city}`})}),_?.openingHours&&(0,y.jsxs)("div",{className:ei().open,children:[!p&&(0,y.jsxs)(q.E,{size:"body-1",color:"subtlest","data-testid":"map-marker-pop-up-store-open",children:[(0,y.jsx)("b",{children:l("header.storesDrawer.store")})," ",v]}),(p||m)&&(0,y.jsxs)(q.E,{size:"body-1",color:"subtlest","data-testid":"map-marker-pop-up-locker-open",children:[(0,y.jsx)("b",{children:l("header.storesDrawer.locker")})," ",x]})]}),(0,y.jsxs)("div",{className:ei().actions,children:[(0,y.jsxs)("div",{className:ei().icons,children:[_?.contactInfo?.phoneNumber&&(0,y.jsx)(Q.w,{variant:"ghost",icon:"phone",size:"s",href:`tel:${_?.contactInfo?.phoneNumber}`,"data-testid":"map-marker-pop-up-phone",title:l("store.call")}),(0,y.jsx)(Q.w,{variant:"ghost",icon:"direction",href:u,target:"_blank",size:"s","data-testid":"map-marker-pop-up-directions",title:l("store.directionTitle")})]}),(0,y.jsxs)("div",{className:ei().links,children:[(0,y.jsx)(Q.w,{className:ei().link,color:"secondary",href:(0,ea.vP)(_),variant:"underlined","data-testid":"map-marker-pop-up-store-details",children:(0,y.jsx)(q.E,{size:"body-1",children:l("store.seeDetails")})}),!o&&(0,y.jsx)(H.$,{className:ei().link,"data-testid":"map-marker-pop-up-shop-in-store",onClick:()=>{c?f():(0,J.A)((0,et.ly)(),eo.b.account.app)},variant:"underlined","data-cs-capture":!0,children:(0,y.jsx)(q.E,{size:"body-1",children:l(h)})})]})]})]})};var el=o(83948);let en=({googleMap:e,stores:t,advancedMarker:o,activeStore:s,setActiveStore:i,centerMarker:r})=>{let{cart:l}=(0,x.B_)(),n=(0,a.useCallback)(e=>{e?.facilityId!==s&&(i?.(e?.facilityId),r?.({lat:e.location.latitude,lng:e.location.longitude}))},[s]);return(0,a.useEffect)(()=>{t.length&&(0,L.j)(t,e)},[t]),(0,y.jsx)(y.Fragment,{children:t.map(t=>(0,y.jsxs)(A.J,{position:{lat:t.location.latitude,lng:t.location.longitude},map:e,advancedMarker:o,onClick:()=>n(t),children:[(0,y.jsx)(el.F,{showPopUp:s&&t?.facilityId===s,map:e,onClose:()=>i(null),children:(0,y.jsx)(er,{store:t,isSelected:l?.logisticDetails?.facilityId===t?.facilityId})}),(0,y.jsx)(T,{store:t,activeStore:s})]},`${t?.facilityId}-key`))})},ec=()=>{let{0:e,1:t}=(0,a.useState)(),{stores:o,googleMap:s,setGoogleMap:i,activeStore:r,setActiveStore:n,centerMarker:c}=(0,l.v)();return(0,y.jsx)(D.R,{setGoogleMap:i,setAdvancedMarker:t,children:s&&(0,y.jsx)(en,{googleMap:s,stores:o,advancedMarker:e,activeStore:r,setActiveStore:n,centerMarker:c})})},ed=({isMobile:e=!1})=>{let{google_maps_api_key:t}=(0,i.rD)(),{isMobileMarkerActive:o}=(0,l.v)();return(0,y.jsx)(M.Wrapper,{apiKey:t,render:()=>(0,y.jsx)("div",{className:(0,$.A)(E().loading,e&&o?E().fullHeight:E().halfHeight),children:(0,y.jsx)(S.y,{size:"l","data-testid":"loading-map"})}),version:"beta",libraries:["places","marker"],children:e?(0,y.jsx)(X,{}):(0,y.jsx)(ec,{})})};var ep=o(11882),em=o.n(ep);let e_=()=>{let[e]=(0,s.B)(),{getCurrentPosition:t,zoomIn:o,zoomOut:a}=(0,l.v)(),{back:i}=(0,B.useRouter)();return(0,y.jsxs)("div",{className:em().map,children:[(0,y.jsx)(ed,{}),(0,y.jsx)(H.$,{variant:"primary-inverse",icon:"cross",className:em().closeButton,onClick:i,floating:!0,"data-testid":"close-button",children:e("common.close")}),(0,y.jsx)(H.$,{variant:"primary-inverse",icon:"cross",className:em().closeButton__mobile,onClick:i,floating:!0,"data-testid":"close-button-mobile",title:e("common.close"),rounded:!0}),(0,y.jsxs)("div",{className:em().zoom,children:[(0,y.jsx)(H.$,{variant:"primary-inverse",icon:"plus",className:em().zoomIn,onClick:o,floating:!0,"data-testid":"zoom-in-button",title:e("storeMap.ariaLabel.zoomIn")}),(0,y.jsx)(O.c,{variant:"minor"}),(0,y.jsx)(H.$,{variant:"primary-inverse",icon:"minus",className:em().zoomOut,onClick:a,floating:!0,"data-testid":"zoom-out-button",title:e("storeMap.ariaLabel.zoomOut")})]}),(0,y.jsx)(H.$,{icon:"location",title:e("storeMap.ariaLabel.location"),className:em().center,variant:"primary-inverse",floating:!0,onClick:()=>t(!0),"data-testid":"location-button"})]})};var eu=o(67284),eh=o.n(eu);let ev=({isActive:e,setIsActive:t})=>{let[o]=(0,s.B)(),{cart:i}=(0,x.B_)(),{getCurrentPosition:n,zoomIn:c,zoomOut:d,stores:p,activeStore:m,setActiveStore:_,isMobileMarkerActive:u,setIsMobileMarkerActive:h}=(0,l.v)(),{back:v}=(0,B.useRouter)(),{isLoggedIn:f}=(0,r.Z2)(),j=(0,a.useMemo)(()=>p?.find(e=>e.facilityId===m),[p,m]);(0,a.useEffect)(()=>{t(u)},[u,t]);let g=(0,a.useCallback)(()=>{h(!1),_(null)},[_,h]);return(0,y.jsxs)("div",{className:eh().map,children:[(0,y.jsx)(ed,{isMobile:!0}),j&&(0,y.jsx)(er,{className:(0,$.A)(eh().markerPopUp,f&&eh().loggedIn),store:j,onClose:()=>_(null),isSelected:m===i?.logisticDetails?.facilityId}),(0,y.jsx)(H.$,{variant:"primary-inverse",icon:"cross",className:eh().closeButton,onClick:v,floating:!0,"data-testid":"close-button",children:o("common.close")}),e?(0,y.jsx)(H.$,{variant:"primary-inverse",icon:"arrow-left",className:eh().closeButton__mobile,onClick:g,floating:!0,"data-testid":"back-button-mobile",title:o("common.back"),rounded:!0}):(0,y.jsx)(H.$,{variant:"primary-inverse",icon:"cross",className:eh().closeButton__mobile,onClick:v,floating:!0,"data-testid":"close-button-mobile",title:o("common.close"),rounded:!0}),(0,y.jsxs)("div",{className:eh().zoom,children:[(0,y.jsx)(H.$,{variant:"primary-inverse",icon:"plus",className:eh().zoomIn,onClick:c,floating:!0,"data-testid":"zoom-in-button",title:o("storeMap.ariaLabel.zoomIn")}),(0,y.jsx)(O.c,{variant:"minor"}),(0,y.jsx)(H.$,{variant:"primary-inverse",icon:"minus",className:eh().zoomOut,onClick:d,floating:!0,"data-testid":"zoom-out-button",title:o("storeMap.ariaLabel.zoomOut")})]}),(0,y.jsx)(H.$,{icon:"location",title:o("storeMap.ariaLabel.location"),className:eh().center,variant:"primary-inverse",floating:!0,onClick:()=>n(!0),"data-testid":"location-button"})]})},ex=({isDesktop:e=!1})=>{let{0:t,1:o}=(0,a.useState)(!1),{0:s,1:i}=(0,a.useState)(!1);return(0,a.useEffect)(()=>{i(e)},[e]),s?(0,y.jsxs)("div",{className:z().container,"data-testid":"store-locator-page",children:[(0,y.jsx)(e_,{}),(0,y.jsx)(I,{})]}):(0,y.jsxs)("div",{className:z().container,"data-testid":"store-locator-page-mobile",children:[(0,y.jsx)(ev,{isActive:t,setIsActive:o}),!t&&(0,y.jsx)(I,{fullHeight:!0})]})};var ef=o(52035),ej=!0;let eg=()=>{let[e]=(0,s.B)(),{isFlagEnabled:t}=(0,i.h)(),o=d.U.up("md"),{isLoggedIn:a}=(0,r.Z2)();return t(p.he)?(0,y.jsx)(m.r,{title:`${e("storeLocator.title")}
1`,noPadding:!0,children:(0,y.jsx)(l.C,{fetchStoresHook:a?n.T:c.S,children:(0,y.jsx)(ex,{isDesktop:o})})}):(0,y.jsx)(ef.default,{statusCode:404})}}},e=>{e.O(0,[4125,636,6593,8792],()=>e(e.s=67457)),_N_E=e.O()}]);

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.