1"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[8931],{37662:(e,t,n)=>{n.d(t,{A:()=>v});var r=n(58168),o=n(80045),a=n(96540),i=n(5556),l=n.n(i),s=n(67234),d=n(77182),c=n(21052),u=n(6442);const p=["targetInMilliseconds","size","variant","isCFTimer","endedContent"],m=e=>{let{targetInMilliseconds:t,size:n="default",variant:i="none",isCFTimer:l,endedContent:m}=e,v=(0,o.A)(e,p);const g=(0,d.o)("Countdown",{variant:i,size:n}),f=(0,u.A)(),E=()=>{const e=t-Date.now();return e<500?0:e},[y,b]=(0,a.useState)(E);(0,a.useEffect)((()=>{if(y<500)return;const e=setInterval((()=>b(E())),500);return()=>clearInterval(e)}),[y]);const A=y/1e3,h=Math.floor(y/1e3/86400)||0,M=Math.floor(A%86400/3600)||0,I=Math.floor(A%3600/60)||0,w=Math.floor(A%60)||0,C=A<1?{background:"hasbroShade.350"}:{},P="none"!=i&&null!=i&&"undefined"!=i;return a.createElement(s.s,(0,r.A)({},g.container,v,{"data-testid":"countdown"}),P&&a.createElement(s.s,(0,r.A)({},g.headingContainer,C),A<1&&m?a.createElement(c.E,(0,r.A)({as:"span"},g.heading),m):l?a.createElement(c.E,(0,r.A)({as:"span"},g.heading),A<1?f.formatMessage({id:"countdown.fundingEnded",defaultMessage:[{type:0,value:"FUNDING ENDED"}]}):"startsin"===i?f.formatMessage({id:"countdown.fundingStartsIn",defaultMessage:[{type:0,value:"Funding Starts In"}]}):f.formatMessage({id:"countdown.fundingEndsIn",defaultMessage:[{type:0,value:"Funding Ends In"}]})):a.createElement(c.E,(0,r.A)({as:"span"},g.heading),A<1?f.formatMessage({id:"countdown.ended",defaultMessage:[{type:0,value:"Ended"}]}):"startsin"===i?f.formatMessage({id:"countdown.startsIn",defaultMessage:[{type:0,value:"Starts In"}]}):f.formatMessage({id:"countdown.endsIn",defaultMessage:[{type:0,value:"Ends In"}]}))),a.createElement(s.s,g.counterContainer,a.createElement(s.s,g.unit,a.createElement(c.E,(0,r.A)({as:"span"},g.unitValue),h),"inline"!==n&&a.createElement(c.E,(0,r.A)({as:"span"},g.unitLabel),f.formatMessage({id:"countdown.days",defaultMessage:[{type:0,value:"Days"}]}))),a.createElement(s.s,g.unit,a.createElement(c.E,(0,r.A)({as:"span"},g.unitValue),M),"inline"!==n&&a.createElement(c.E,(0,r.A)({as:"span"},g.unitLabel),f.formatMessage({id:"countdown.hours",defaultMessage:[{type:0,value:"Hours"}]}))),a.createElement(s.s,g.unit,a.createElement(c.E,(0,r.A)({as:"span"},g.unitValue),I),"inline"!==n&&a.createElement(c.E,(0,r.A)({as:"span"},g.unitLabel),f.formatMessage({id:"countdown.min",defaultMessage:[{type:0,value:"Min"}]}))),a.createElement(s.s,g.unit,a.createElement(c.E,(0,r.A)({as:"span"},g.unitValue),w),"inline"!==n&&a.createElement(c.E,(0,r.A)({as:"span"},g.unitLabel),f.formatMessage({id:"countdown.sec",defaultMessage:[{type:0,value:"sec"}]})))))};m.propTypes={targetInMilliseconds:l().number.isRequired,size:l().oneOf(["default","slim","inline"]),variant:l().oneOf(["none","startsin","endsin"]),isCFTimer:l().bool,endedContent:l().string};const v=m}
1,78704:(e,t,n)=>{n.d(t,{A:()=>A});var r=n(10467),o=n(96540),a=n(56347),i=n(6442),l=n(2468),s=n(59326),d=n(17287),c=n(77102),u=n(20459),p=n(38221),m=n.n(p),v=n(77714),g=n(68946),f=n(61903),E=n(97820),y=n(62345),b=n(77950);function A(e,t,n,p,A,h){const M=(0,i.A)(),I=(0,l.d)(),w=o.useRef(),C=(0,s.A)(),P=((0,d.A)(),(0,a.zy)()),{gtmDataLayer:D}=(0,o.useContext)(c.q),{eventClient:O}=(0,u.Jr)(),{ownedProductIds:S}=(0,E.A)(),{formatMessage:T}=(0,i.A)();return m()((()=>{const a=function(){var a=(0,r.A)((function*(){try{var r,a;if(!(null!=e&&e.orderable||null!=e&&null!==(r=e.inventory)&&void 0!==r&&r.orderable)||!t)return;null==O||O.cart.logAddToCart((0,f.LR)({location:P,products:[e],itemListId:(0,f.rR)(n,p),itemListName:A,quantity:t,cartId:C.basketId,placementIndex:h,ownedProductIds:S}));const d=(0,g.u)(e,n||"n/a");D(d);const c=e.productId||e.id,u=C.productItems&&C.productItems.filter((e=>e.productId===c))||[];var i,l;if(u.length>0){var s;const t=parseInt((null===(s=u[0])||void 0===s?void 0:s.quantity)||0)+1,n={productId:c,quantity:t};i=yield C.updateItemInBasket(n,u[0].itemId,e)}else{const n=[{productId:c,quantity:t,price:null==e?void 0:e.c_salePrice}];i=yield C.addItemToBasket(n,e)}null!==(a=i)&&void 0!==a&&a.success?w.current=I({render:()=>o.createElement(b.A,{title:T({id:"product.addtocart.success",defaultMessage:[{type:0,value:"Item added to cart"}]}),status:"success",icon:y.P8,isClosable:!0,onClose:()=>{I.close(w.current)}})}):null!==(l=i)&&void 0!==l&&l.quantityRestriction?w.current=I({render:()=>o.createElement(b.A,{title:M.formatMessage({id:"product.quantity.limit.exceeded",defaultMessage:[{type:0,value:"Quantity Limit exceeded"}]}),status:"error",icon:y.fZ,isClosable:!0,onClose:()=>{I.close(w.current)}})}):w.current=I({render:()=>o.createElement(b.A,{title:M.formatMessage(v.gS),status:"error",icon:y.fZ,isClosable:!0,onClose:()=>{I.close(w.current)}})})}catch(e){w.current=I({render:()=>o.createElement(b.A,{title:(null==e?void 0:e.message)||M.formatMessage(v.gS),status:"error",icon:y.fZ,isClosable:!0,onClose:()=>{I.close(w.current)}})})}}));return function(){return a.apply(this,arguments)}}();a()}),3e3)}},91801:(e,t,n)=>{n.r(t),n.d(t,{default:()=>q});var r=n(58168),o=n(54705),a=n(10467),i=n(96540),l=n(55170),s=n(5556),d=n.n(s),c=n(59146),u=n(28137),p=n(67234),m=n(75828),v=n(9e4),g=n(72176),f=n(54183),E=n(77182),y=n(85353),b=n(21052),A=n(2543),h=n.n(A),M=n(98452),I=n(40541),w=n(37662),C=n(47249),P=n(24542),D=n(6442),O=n(78704),S=n(21651),T=n(11987),k=n(84819),x=n(87025);function L(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?L(Object(n),!0).forEach((function(t){(0,o.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const j=({background:e,logo:t,description:n,timer:o,items:s})=>{var d,A,L,j,q;const R=(0,E.o)("SuperDrop"),{id:z}=(0,x.A)(),B=!!t,[F,G]=(0,i.useState)([]),[$,H]=(0,i.useState)(s?null===(d=(0,k.uq)(null===(A=s[0])||void 0===A?void 0:A.product,null===(L=s[0])||void 0===L?void 0:L.euProduct,null===(j=s[0])||void 0===j?void 0:j.ukProduct,z))||void 0===d?void 0:d.id:null),[N,V]=(0,i.useState)(!1),[W,U]=(0,i.useState)(!1),Z=(0,l.HH)(),K=[],J=(0,D.A)(),Q=(0,f.A)({base:{aspectRatio:"unset"}}),X={main:{scaleMode:"aspect",aspectRatio:"5:7",width:"250"},mobile:{scaleMode:"aspect",aspectRatio:"5:7",width:"250"}},Y={main:{scaleMode:"aspect",aspectRatio:"47:20",width:"1920"},mobile:{scaleMode:"aspect",aspectRatio:"75:128",width:"1240"}},ee=function(){var e=(0,a.A)((function*(){try{const e=yield Z.shopperProducts.getProduct({parameters:{id:$,allImages:!1}});G(e)}catch(e){console.error("Error fetching full product",e)}}));return function(){return e.apply(this,arguments)}}();(0,i.useEffect)((()=>{ee()}),[$]);const te=(0,O.A)(F,1,"superdrop-product");return null==s||s.filter((e=>{var t;return(null===(t=e.product)||void 0===t?void 0:t.id)===$})).map((e=>{var t;null==e||null===(t=e.images)||void 0===t||t.map(((e,t)=>{K.push(i.createElement(I.A,{content:_(_({},e),{},{customMainImageTransformations:X.main,customMobileImageTransformations:X.mobile}),styles:{aspectRatio:"5/7"},key:t}))}))})),i.createElement(p.s,{flexDirection:"column",position:"relative",pb:"16"},i.createElement(m.x,(0,r.A)({},R.gridContainer,{sx:Q}),i.createElement(v.E,(0,r.A)({},R.backgroundGridItem,{backgroundColor:null==e?void 0:e.color}),i.createElement(I.A,{content:_(_({},e.image),{},{customMainImageTransformations:Y.main,customMobileImageTransformations:Y.mobile}),styles:_({},R.backgroundGridItemImage)})),i.createElement(v.E,R.contentGridItem,i.createElement(p.s,R.contentContainer,B&&i.createElement(I.A,{content:_({},t),wrapperStyles:_({},R.contentContainerImage),styles:_({},R.logoContainer)}),(null==o?void 0:o.enabled)&&(null==o?void 0:o.eventDate)&&i.createElement(w.A,{alignSelf:"center",size:"slim",targetInMilliseconds:new Date(null==o?void 0:o.eventDate).getTime(),variant:null!=o&&o.variant?null==o?void 0:o.variant.trim().toLowerCase().replace(/\s/g,""):null}),(null==n?void 0:n.content)&&i.createElement(c.a,{color:(null==n?void 0:n.color)||"white","data-testid":"superdrop-description"},i.createElement(T.A,{content:null==n?void 0:n.content})))),!!s&&i.createElement(i.Fragment,null,i.createElement(v.E,(0,r.A)({},R.contentItemToggle,{"data-testid":"superdrop-content-item-toggle"}
1),i.createElement(g.B8,R.itemToggleList,null==s?void 0:s.map(((e,t)=>{var n,o;return e.product=(0,k.uq)(null==e?void 0:e.product,null==e?void 0:e.euProduct,null==e?void 0:e.ukProduct,z),i.createElement(g.ck,{key:t},i.createElement(u.$,(0,r.A)({},R.itemToggleListButton,$===(null===(n=e.product)||void 0===n?void 0:n.id)?R.itemToggleListButtonSelected:{},{onClick:()=>{var t;H(null===(t=e.product)||void 0===t?void 0:t.id),U(!0)},"data-testid":`superdrop-toggle-button-${null===(o=e.product)||void 0===o?void 0:o.id}}`}),e.title))})))),i.createElement(v.E,(0,r.A)({},R.carouselGridItem,{"data-testid":"superdrop-carousel-grid-item"}),i.createElement(C.A,{shiftCarousel:N,setShiftCarousel:V,changeProduct:W,setChangeProduct:U,productType:$,childWidth:180},K)))),i.createElement(p.s,{flexDirection:"column",bottom:"120px",width:"100%",alignItems:"center",rowGap:"10px",fontWeight:"700","data-testid":"superdrop-bottom-container"},null==s?void 0:s.map(((e,t)=>{var n,r,o,a,l,s,d,c;if(e.product=(0,k.uq)(null==e?void 0:e.product,null==e?void 0:e.euProduct,null==e?void 0:e.ukProduct),$===(null===(n=e.product)||void 0===n?void 0:n.id))return i.createElement(p.s,{flexDirection:"column",fontSize:".875rem",key:t},i.createElement(b.E,{color:null!==(r=e.strapline)&&void 0!==r&&r.color?null===(o=e.strapline)||void 0===o?void 0:o.color:"white",textAlign:"center"},null===(a=e.strapline)||void 0===a?void 0:a.text),i.createElement(y.D,{as:"h3",size:"h3",textAlign:"center",color:null!==(l=e.productTitle)&&void 0!==l&&l.color?null===(s=e.productTitle)||void 0===s?void 0:s.color:"white","data-testid":`superdrop-product-title-${h().kebabCase(null===(d=e.productTitle)||void 0===d?void 0:d.text)}`},null===(c=e.productTitle)||void 0===c?void 0:c.text))})),i.createElement(p.s,{color:"white",fontSize:"1rem","data-testid":`superdrop-product-price-${F.id}`},i.createElement(S.A,{currency:null==F?void 0:F.currency,prices:{price:(null==F?void 0:F.price)||void 0,priceMax:(null==F?void 0:F.priceMax)||void 0,setPrice:null==F?void 0:F.c_setPrice,salePrice:null==F?void 0:F.c_salePrice,listPrice:null==F?void 0:F.c_listPrice},productType:null==F?void 0:F.type,variant:"superDrop"})),i.createElement(p.s,{columnGap:"16px"},i.createElement(M.A,(0,r.A)({href:(0,P.ec)({id:F.id,name:F.name},J.locale)},R.pdpCtaButton,{"data-testid":`superdrop-discover-button-${F.id}`}),i.createElement(b.E,{fontWeight:"700",color:"white"},"Discover")),(null==F||null===(q=F.inventory)||void 0===q?void 0:q.orderable)&&i.createElement(u.$,{variant:"primary",size:"md",minWidth:"auto",lineHeight:"1",onClick:function(){var e=(0,a.A)((function*(e){e.preventDefault(),e.target.disabled=!0,yield te(),e.target.disabled=!1}));return function(t){return e.apply(this,arguments)}}(),"data-testid":`superdrop-add-to-cart-button-${F.id}`},J.formatMessage({defaultMessage:[{type:0,value:"Add to Cart"}],id:"product_view.button.add_to_cart"})))))};j.propTypes={background:d().object,logo:d().object,description:d().object,items:d().array,ctaButton:d().object,timer:d().object};const q=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.