"use strict";exports.id=9853,exports.ids=[9853],exports.modules={19666:(e,r,t)=>{t.d(r,{Z:()=>f});var o=t(49115),n=t(11347),i=t(77171),a=t(16689),d=t(81349),s=t(29746),c=t(60679),p=t(19785),l=t(21917);let u=new Set,g=[],h=null;var b=t(20997);let product_ProductSentinel=function({product:e,title:r,page:t,pageSize:o,children:n}){let{ref:i,inView:d}=(0,p.useInView)(),{sendViewItemListEvent:s}=(0,l.m)({title:r,page:t,pageSize:o});return(0,a.useEffect)(()=>{d&&function({product:e,sendViewItemListEvent:r}){u.has(e.id)||(u.add(e.id),g.push({node:e}),h&&clearTimeout(h),h=setTimeout(()=>{g.length>0&&(r({products:g}),g=[])},300))}({product:e,sendViewItemListEvent:s})},[d,e]),b.jsx("div",{ref:i,style:{minHeight:"15.225rem"},children:n})};function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,o)}return t}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){var o;o=t[r],r in e?Object.defineProperty(e,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[r]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}let f=(0,a.memo)(function({products:e,page:r,pageSize:t,productCard:{showDiscountBadge:a,bordered:p,taxesConfiguration:l,sponsoredLabel:u}={},firstPage:g,shouldShowComparison:h,compareLabel:f,title:m}){let{isMobile:j}=(0,c.Z)(),{__experimentalProductCard:w}=(0,s.r3)();return b.jsx(i.Z,{aspectRatio:1,loading:0===e.length,children:b.jsx(o.Z,{children:j&&g===r?(0,b.jsxs)(b.Fragment,{children:[e.slice(0,2).map(({node:e},o)=>b.jsx(n.Z,{children:b.jsx(product_ProductSentinel,{product:e,title:m,page:r,pageSize:t,children:b.jsx(w.Component,_objectSpread(_objectSpread({enableCompareCheckbox:h,compareLabel:f,aspectRatio:1,imgProps:{width:150,height:150,sizes:"30vw",loading:"eager"}},w.props),{},{bordered:p??w.props.bordered,showDiscountBadge:a??w.props.showDiscountBadge,product:e,index:t*r+o+1,taxesConfiguration:l,sponsoredLabel:u}))})},`${e.id}`)),b.jsx(d.Z,{sectionName:"UIProductGrid-out-viewport",children:e.slice(2).map(({node:e},o)=>b.jsx(n.Z,{children:b.jsx(product_ProductSentinel,{product:e,title:m,page:r,pageSize:t,children:b.jsx(w.Component,_objectSpread(_objectSpread({enableCompareCheckbox:h,compareLabel:f,aspectRatio:1,imgProps:{width:150,height:150,sizes:"30vw",loading:"lazy"}},w.props),{},{bordered:p??w.props.bordered,showDiscountBadge:a??w.props.showDiscountBadge,product:e,index:t*r+o+1,taxesConfiguration:l,sponsoredLabel:u}))})},`${e.id}`))})]}):b.jsx(b.Fragment,{children:e.map(({node:e},o)=>b.jsx(n.Z,{children:b.jsx(product_ProductSentinel,{product:e,title:m,page:r,pageSize:t,children:b.jsx(w.Component,_objectSpread(_objectSpread({enableCompareCheckbox:h,compareLabel:f,aspectRatio:1,imgProps:{width:150,height:150,sizes:"30vw",loading:0===o?"eager":"lazy"}},w.props),{},{bordered:p??w.props.bordered,showDiscountBadge:a??w.props.showDiscountBadge,product:e,index:t*r+o+1,taxesConfiguration:l,sponsoredLabel:u}))})},`${e.id}`))})})})})},29853:(e,r,t)=>{t.a(e,async(e,o)=>{try{t.r(r),t.d(r,{default:()=>p});var n=t(19666),i=t(31854),a=t(16689),d=t(78593),s=t(20997),c=e([d]);d=(c.then?(await c)():c)[0];let p=(0,a.memo)(function({page:e,title:r,productCard:t,itemsPerPage:o,firstPage:a,shouldShowComparison:c,compareLabel:p}){let{data:l}=(0,d.__)(e),u=l?.search?.products?.edges??[];return s.jsx(i.Z,{products:u,page:e,pageSize:o,title:r,children:s.jsx(n.Z,{shouldShowComparison:c,compareLabel:p,products:u,page:e,pageSize:o,productCard:t,firstPage:a,title:r})})});o()}catch(e){o(e)}})},31854:(e,r,t)=>{t.d(r,{Z:()=>__WEBPACK_DEFAULT_EXPORT__});var o=t(69029),n=t(16689),i=t(19785),a=t(33339),d=t(20997);let replacePagination=(e,r)=>{let t=new URL(window.location.href);t.searchParams.get("page")!==e&&(t.searchParams.set("page",e),r.replace(t,void 0,{shallow:!0,scroll:!1}))},__WEBPACK_DEFAULT_EXPORT__=function({page:e,children:r}){let t=(0,a.useRouter)(),{pages:s}=(0,o.R)(),{ref:c,inView:p}=(0,i.useInView)({threshold:[.3,.7],triggerOnce:!1});return(0,n.useEffect)(()=>{p&&s.length>1&&replacePagination(e.toString(),t)},[s.length,p,e]),d.jsx("div",{ref:c,children:r})}},49115:(e,r,t)=>{t.d(r,{Z:()=>a});var o=t(16689),n=t.n(o);let i=(0,o.forwardRef)(function({testId:e="fs-product-grid",children:r,...t},o){return n().createElement("ul",{ref:o,"data-fs-product-grid":!0,...t},r)}),a=i},11347:(e,r,t)=>{t.d(r,{Z:()=>a});var o=t(16689),n=t.n(o);let i=(0,o.forwardRef)(function({testId:e="fs-product-grid-item",children:r,...t},o){return n().createElement("li",{ref:o,"data-fs-product-grid-item":!0,...t},r)}),a=i}};