1"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[6166],{53326:(e,t,r)=>{r.d(t,{V:()=>s});var a=r(77810),o=r(69290),l=r(67234),i=r(59146),n=r(18646),d=r(12609),c=r(61892);const s=()=>{const e=new Array(4).fill(null);return a.createElement(o.m,{maxW:"container.xxl",p:{base:5,md:20}},a.createElement(l.s,{direction:"column",gap:{base:8,lg:10}},a.createElement(i.a,{gap:6,maxW:"full"},a.createElement(l.s,{direction:"column",gap:8},a.createElement(l.s,{justify:"space-between",align:"center"},a.createElement(n.r,{noOfLines:1,spacing:4,skeletonHeight:12,width:{base:"full",md:"50%"}})),a.createElement(d.z,{spacing:4,overflowX:"auto",css:{scrollSnapType:"x mandatory"}},e.map(((e,t)=>a.createElement(i.a,{key:t,flex:"0 0 auto",width:{base:"calc(50%)",md:"calc(50% - 8px)",lg:"calc(33.33% - 10px)",xl:"calc(25% - 12px)"}},a.createElement(c.E,{height:"200px",borderRadius:"lg"}),a.createElement(n.r,{mt:"4",noOfLines:1,skeletonHeight:12}),a.createElement(n.r,{mt:"4",noOfLines:1,skeletonHeight:8}),a.createElement(c.E,{height:"30px",width:"110px",mt:"4"})))))))))}},72181:(e,t,r)=>{r.d(t,{A:()=>F});var a=r(64180),o=r(10939),l=r(28407),i=r(77810),n=r(75826),d=r.n(n),c=r(34692),s=r(41863),u=r(77176),p=r(96182),m=r(30954),g=r(77182),b=r(28137),v=r(59146),y=r(65958),f=r(63668),E=r(12609),h=r(10551),I=r(21052),A=r(70581),w=r(61740),_=r(33952),P=r(87916),x=r(18167),S=r(73448),O=r(74941),k=r(82830),C=r(54851),L=r(90031),D=r(34638),B=r(7711),M=r(78041),j=r(23215),T=r(1714),z=r(21899),H=r(43195);function W(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function $(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?W(Object(r),!0).forEach((function(t){(0,o.A)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):W(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const U=(0,j.A)(u.K),V=({label:e})=>{const t=(0,p.A)({base:"captionBold",md:"subtitle3"});return i.createElement(m.E,{"data-testid":"product-badge",textStyle:t,bg:"white",px:{base:2,md:3},py:{base:1,md:"6px"},color:"brand.gray600black",borderRadius:"4px",border:"1px",borderColor:"brand.gray200",fontSize:{base:"xs",lg:"sm"},textTransform:"initial"},e)},q=({product:e,primaryAction:t,showLoading:r=!1,isWishlistItem:o=!0,dynamicImageProps:n,imageViewType:d=S.a7,selectableAttributeId:u=S.Jr,itemPosition:m=1})=>{var j,W,q,F,K,N,R;const{imageGroups:G=[],productId:J,variants:Q,representedProduct:X,id:Y}=e||{},Z=function(e){return Array.isArray(e)?e.map((e=>e.productId)).join(", "):""}(Q),{currency:ee}=(0,_.H2)(),te=(0,c.A)(),re=(0,p.A)({base:"subtitle3",md:"subtitle2"}),ae=(0,p.A)({base:"body3",md:"body2"}),oe=e.name??e.productName,le=(0,g.o)("ProductTile"),ie=(0,D.d)(),ne=(0,B.A)(),de=(0,L.useCustomerId)(),{data:ce}=(0,C.T)(),[se,ue]=(0,i.useState)([]),{mutateAsync:pe}=(0,L.useShopperCustomersMutation)("createCustomerProductListItem"),{mutateAsync:me}=(0,L.useShopperCustomersMutation)("deleteCustomerProductListItem"),ge=function(){var e=(0,l.A)((function*(e){ue([...se,e.productId??e.id]);const t=ce.id;yield pe({parameters:{customerId:de,listId:t},body:{quantity:1,public:!1,priority:1,type:"product",productId:e.productId??e.id}},{onError:()=>{ie({title:te.formatMessage(S.gS),status:"error"})},onSuccess:()=>{ie({title:te.formatMessage(S.FD,{quantity:1}),status:"success",action:i.createElement(b.$,{variant:"link",onClick:()=>ne(S.OU.WISHLIST)},te.formatMessage(S.D$))})},onSettled:()=>{ue(se.filter((t=>t!==(e.productId??e.id))))}})}));return function(t){return e.apply(this,arguments)}}(),be=function(){var e=(0,l.A)((function*(e){var t;ue([...se,e.productId??e.id]);const r=ce.id,a=null===(t=ce.customerProductListItems.find((t=>t.productId===(e.productId??e.id))))||void 0===t?void 0:t.id;yield me({body:{},parameters:{customerId:de,listId:r,itemId:a}},{onError:()=>{ie({title:te.formatMessage(S.gS),status:"error"})},onSuccess:()=>{ie({title:te.formatMessage(S.gq),status:"success"})},onSettled:()=>
1{ue(se.filter((t=>t!==(e.productId??e.id))))}})}));return function(t){return e.apply(this,arguments)}}(),ve=!(null==ce||null===(j=ce.customerProductListItems)||void 0===j||!j.find((e=>e.productId===(J??Y)))),ye=Q&&X?null==Q||null===(W=Q.find((t=>t.productId==e.representedProduct.id)))||void 0===W||null===(q=W.variationValues)||void 0===q?void 0:q[u]:void 0,[fe,Ee]=(0,i.useState)(ye),he=(0,i.useMemo)((()=>{var t,r;const a=null==e||null===(t=e.variationAttributes)||void 0===t?void 0:t.find((({id:e})=>e===u)),o={[u]:fe},l=(0,O.wP)(G,{viewType:d,variationValues:a?o:{}});return null==l||null===(r=l[0])||void 0===r?void 0:r.images[0]}),[e,u,fe,d]),Ie=(0,T.ec)(e),Ae=(null==he?void 0:he.disBaseLink)||(null==he?void 0:he.link)||(null==e||null===(F=e.image)||void 0===F?void 0:F.disBaseLink)||(null==e||null===(K=e.image)||void 0===K?void 0:K.link);let we=null;if(null!=e&&e.c_customProductUrl){var _e,Pe;const t=null==e||null===(_e=e.c_customProductUrl)||void 0===_e||null===(Pe=_e.split("/p/")[1])||void 0===Pe?void 0:Pe.split("/");t.length>1&&(we=t[0])}return i.createElement(v.a,(0,a.A)({},le.container,{position:"relative","data-testid":`productTile_${e.productId??e.id}`,"data-itemposition":`${m}_${e.productId??e.id}`}),i.createElement(H.A,{productId:(null==e?void 0:e.productId)??(null==e?void 0:e.id),bscProductId:(null==e?void 0:e.c_productBSCProductID)??(null==e||null===(N=e.representedProduct)||void 0===N?void 0:N.c_productBSCProductID),primaryCategory:(null==e?void 0:e.primaryCategoryId)||we||null,productSubCategorization:null==e||null===(R=e.c_productSubCategorization)||void 0===R?void 0:R.join(","),isBrotherBundle:null==e?void 0:e.c_productIsBrotherBundle,variantsProductIds:Z}),i.createElement(A.A,{variant:e},r&&i.createElement(w.A,null),i.createElement(y.B,{direction:"column",gap:4},i.createElement(P.A,(0,a.A)({to:Ie},le.link,{_hover:{cursor:"pointer",textDecoration:"none"},"aria-label":`${te.formatMessage({defaultMessage:[{type:0,value:"View product "},{type:1,value:"productId"}],id:"product_tile.link.view_product"},{productId:null==e?void 0:e.id})}`,role:"link","data-testid":`sf-product-tile-${e.productId??e.id}`}),i.createElement(v.a,le.imageWrapper,i.createElement(f.g,le.image,Ae?i.createElement(x.A,{"data-testid":"product-tile-image",src:`${Ae}[?sw={width}&q=60]`,widths:null==n?void 0:n.widths,imageProps:$({alt:"",loading:"lazy"},null==n?void 0:n.imageProps)}):i.createElement(v.a,{bg:"brand.gray100",w:"full",h:"full"})),i.createElement(v.a,le.topGradient),i.createElement(E.z,{position:"absolute",gap:"4px",top:3,left:3,zIndex:2},(null==e?void 0:e.c_productFlag)&&i.createElement(V,{key:null==e?void 0:e.c_productFlag,label:null==e?void 0:e.c_productFlag}),(null==e?void 0:e.isProductUnavailable)&&i.createElement(V,{label:i.createElement(s.A,{defaultMessage:[{type:0,value:"Unavailable"}],id:"item_image.label.unavailable"})}))),i.createElement(y.B,{direction:"column",mt:4,gap:4},i.createElement(h.T,{gap:1,alignItems:"flex-start"},i.createElement(I.E,{textStyle:re,color:"brand.gray600black",minH:"22px"},J??Y),i.createElement(I.E,{textStyle:ae,color:"brand.gray600black",noOfLines:{base:3,md:2},h:{base:"53px",md:11}},oe)),(0,z.Wl)(null==e?void 0:e.price)?i.createElement(k.A,{currency:ee,variant:e,color:"brand.gray600black",showListPrice:!0,headingStyle:!0,align:"left",baseDirection:"row",listPriceProps:{fontSize:"md",color:"brand.gray500"}}):i.createElement(E.z,{h:30}))),i.createElement(y.B,{direction:"column",gap:3},i.createElement(v.a,null,t)))),!o&&i.createElement(v.a,{onClick:e=>{e.preventDefault()}},i.createElement(U,(0,a.A)({h:{base:10,md:12},w:{base:10,md:12},minH:{base:10,md:12},minW:{base:10,md:12},p:0,"data-testid":"wishlist-button","aria-label":ve?te.formatMessage({id:"product_tile.assistive_msg.remove_from_wishlist",defaultMessage:[{type:0,value:"Remove "},{type:1,value:"product"},{type:0,value:" from wishlist"}]},{product:oe}):te.formatMessage({id:"product_tile.assistive_msg.add_to_wishlist",defaultMessage:[{type:0,value:"Add "},{type:1,value:"product"},{type:0,value:" to wishlist"}]},{product:oe}),icon:ve?i.createElement(M.nM,{width:6,height:6,fill:"brand.darkerBlue"}):i.createElement(M.C3,{width:6,height:6,color:"brand.darkerBlue"})},le.favIcon,{onClick:(0,l.A)((function*(){ve?be(e):ge(e)}))}))))};q.propTypes={product:d().object,onItemQuantityChange:d().func,onAddItemToCart:d().func,showLoading:d().bool,isWishlistItem:d().bool,primaryAction:d().node,secondaryActions:d().node};const F=q}}]);
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.