PageSourceSearch

https://www.hasbropulse.com/mobify/bundle/2649/takeover.js

js hasbropulse.com collected 2026-09-24 09:04:27 UTC 11,251 bytes, 1 lines download raw bytes

1"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[4212],{7016:(e,t,n)=>{n.r(t),n.d(t,{default:()=>L});var o=n(54705),l=n(80045),i=n(10467),r=n(96540),a=n(22254),d=n(6442),u=n(56347),s=n(39934),c=n(20954),v=n(84819),p=n(87025),m=n(55170),g=n(80328),b=n(20459),f=n(66658),y=n(52050),h=n(97773),I=n(59326),_=n(2468),k=n(79637),w=n(59146),M=n(50503),C=n(91703),O=n(46648),A=n(55129),T=n(14741),P=n(87884);const x=["image"];function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function S(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach((function(t){(0,o.A)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const L=({contentAlign:e="center",size:t="medium",takeoverItems:n,data_amplience_page_name:o,data_amplience_component_name:E,data_amplience_component_schema:L,data_amplience_delivery_key:j,data_creative_index:D,layoutManagedByWrapper:q=!1,sectionContext:B})=>{const{ref:N}=(0,g.Ay)(E??"",E??"",o??"",L,j,D),G=(0,d.A)(),W=(0,m.HH)(),$=(0,u.zy)(),{id:z}=(0,p.A)(),{eventClient:F}=(0,b.Jr)(),H=(0,I.A)(),K=(0,_.d)(),U=(0,r.useRef)(),R=(0,T.Ch)(),V=(0,k.j)(),[Z,J]=(0,r.useState)(),Q=(0,r.useCallback)(function(){var e=(0,i.A)((function*(e){if(e&&"object"==typeof e&&"id"in e)try{yield(0,h.h)({orderable:!0,productId:e.id,c_isMembershipProduct:"c_isMembershipProduct"in e&&(null==e?void 0:e.c_isMembershipProduct)},1,H,K,U,G,null,$.pathname,F)}catch(e){console.error("Error adding to cart:",e)}else console.error("Invalid product data for add to cart:",e)}));return function(t){return e.apply(this,arguments)}}(),[H,K,U,G,$.pathname,F]),X=G.formatMessage({id:"countdown.startsIn",defaultMessage:[{type:0,value:"Starts In"}]}),Y=G.formatMessage({id:"countdown.endsIn",defaultMessage:[{type:0,value:"Ends In"}]}),ee=G.formatMessage({id:"countdown.ended",defaultMessage:[{type:0,value:"Ended"}]}),te=(0,r.useCallback)(((e,t=0,n="")=>{var o;null==F||null===(o=F.nav)||void 0===o||o.logSelectPromotion({pageId:(0,y.KL)(window.location.href)||null,pageType:(0,f.M5)($),pageSectionName:E||null,promotions:[{creativeName:E||null,creativeId:j||null,creativeSlot:L||null,creativeIndex:t,promotionId:e,promotionName:n||E||null}]})}),[F,$,E,j,L]),ne=n.map((e=>{var t,n,o;if(!e.product)return null;const l=(0,v.uq)(null===(t=e.product)||void 0===t?void 0:t.us,null===(n=e.product)||void 0===n?void 0:n.eu,null===(o=e.product)||void 0===o?void 0:o.uk,z);return(null==l?void 0:l.variant)??(null==l?void 0:l.id)??null})).filter(Boolean),oe=function(){var e=(0,i.A)((function*({queryKey:e}){const[,...t]=e;try{return(yield W.shopperProducts.getProducts({parameters:{ids:t},allImages:!1})).data}catch(e){return console.error("Error fetching products for takeover:",e),[]}}));return function(t){return e.apply(this,arguments)}}(),le=(0,a.I)({queryKey:["takeover-products",...ne],queryFn:oe,refetchOnWindowFocus:!1,staleTime:12e4,enabled:ne.length>0}).data??[],ie=n.map(((e,t)=>{var n,o,i,r,a,d,u,s,p,m,g,b,f,y,h,I,_,k,w,P,E,L,D,q,N,W,$,F,H,K,U,Z,ne,oe,ie;const re=(0,O.m)(null==e?void 0:e.cta),ae=(0,v.uq)(null==e||null===(n=e.product)||void 0===n?void 0:n.us,null==e||null===(o=e.product)||void 0===o?void 0:o.eu,null==e||null===(i=e.product)||void 0===i?void 0:i.uk,z),de=le.find((e=>{var t;return null!=e&&"object"==typeof e&&("id"in e&&(null==e?void 0:e.id)===(null==ae?void 0:ae.id)||"variants"in e&&Array.isArray(e.variants)&&(null===(t=e.variants)||void 0===t?void 0:t.some((e=>null!=e&&"object"==typeof e&&"productId"in e&&e.productId===(null==ae?void 0:ae.variant)))))}));let ue,se;if("backgroundImage"===(null===(r=e.background)||void 0===r||null===(a=r.assets)||void 0===a||null===(d=a[0])||void 0===d?void 0:d.type)&&(ue=(0,c.AH)(e.background.assets[0],{mobile:{format:"webp"},desktop:{format:"webp"}})),"backgroundVideo"===(null===(u=e.background)||void 0===u||null===(s=u.assets)||void 0===s||null===(p=s[0])||void 0===p?void 0:p.type)){const t=e.background.assets[
10].video,n=t?(0,M.f_)(t,"mp4_720p"):void 0,o=e.background.assets[0].mobileVideo;se={smallPhone:{uri:(o?(0,M.f_)(o,"mp4_720p"):void 0)??n??""},mediumTablet:{uri:n??""}},ue={url:(0,M.f_)(t)+".png",urlMobile:(0,M.f_)(o)+".png",altText:e.headline||"background video"}}const ce=(null===(m=e.logo)||void 0===m?void 0:m.image)??{},{image:ve}=ce,pe=(0,l.A)(ce,x),me=ve?(0,c.bv)(ve,S(S({},pe),{},{height:(0,C.b)(null===(g=e.logo)||void 0===g?void 0:g.size,null===(b=e.logo)||void 0===b?void 0:b.scale),format:"webp"})):void 0,ge=e.countdown,be=(0,A.$)(de,{startsInLabel:X,endsInLabel:Y}),fe=null!=ge&&ge.targetTime?new Date(ge.targetTime).getTime():be.targetTime?new Date(be.targetTime).getTime():0,ye=(null==ge?void 0:ge.style)??be.style??"none",he=(null==ge?void 0:ge.label)??be.label??"",Ie=(null==de?void 0:de.inventory)&&"object"==typeof de.inventory&&"orderable"in de.inventory&&(null===(f=de.inventory)||void 0===f?void 0:f.orderable),_e=G.formatMessage({id:"use_product.message.out_of_stock",defaultMessage:[{type:0,value:"Out of Stock"}]}),ke=null==re||null===(y=re[0])||void 0===y||null===(h=y.action)||void 0===h?void 0:h.type,we="addToCart"===ke;let Me=null==re||null===(I=re[0])||void 0===I?void 0:I.text,Ce=()=>{var e,t;return(0,T._o)(null==re||null===(e=re[0])||void 0===e?void 0:e.action,{openInNewWindow:(0,O.U)(null==re||null===(t=re[0])||void 0===t?void 0:t.action)},R)};const Oe=we&&!Ie;if(we)Ie||(Me=_e),Ce=()=>{Ie&&Q(de)};else if("notifyMe"===ke){var Ae;const e=null==re||null===(Ae=re[0])||void 0===Ae?void 0:Ae.action;Ce=()=>{"notifyMe"===(null==e?void 0:e.type)&&J(e),V.onOpen()}}const Te=(null==re?void 0:re.length)>=2,Pe=Te?null===(_=re[1])||void 0===_||null===(k=_.action)||void 0===k?void 0:k.type:null,xe="addToCart"===Pe;let Ee=Te?(null===(w=re[1])||void 0===w?void 0:w.text)??"":"",Se=()=>{var e,t;return(0,T._o)(null==re||null===(e=re[1])||void 0===e?void 0:e.action,{openInNewWindow:(0,O.U)(null==re||null===(t=re[1])||void 0===t?void 0:t.action)},R)};const Le=xe&&!Ie;if(xe)Se=()=>{Ie&&Q(de)},Ie||(Ee=_e);else if("notifyMe"===Pe){var je;const e=null==re||null===(je=re[1])||void 0===je?void 0:je.action;Se=()=>{"notifyMe"===(null==e?void 0:e.type)&&J(e),V.onOpen()}}return{headline:e.headline,shortTitle:e.shortTitle,bodyText:e.bodyText,logo:{source:{uri:me},accessibilityLabel:null===(P=e.logo)||void 0===P?void 0:P.altText,placement:null===(E=e.logo)||void 0===E?void 0:E.logoPlacement,size:null===(L=e.logo)||void 0===L?void 0:L.size,scale:null===(D=e.logo)||void 0===D?void 0:D.scale},primaryCta:{title:Me,showIcon:(null===(q=re[0])||void 0===q?void 0:q.hasIcon)??!1,onPress:()=>{Ce(),te(j||"",t,`${String(e.headline)} - ${String(Me)}`)},isDisabled:Oe},secondaryCta:(null==re?void 0:re.length)>1?{title:Ee,showIcon:(null===(N=re[1])||void 0===N?void 0:N.hasIcon)??!1,onPress:()=>{Se(),te(j||"",t,`${String(e.headline)} - ${String(Ee)}`)},isDisabled:Le}:void 0,backgroundGradientColor:null===(W=e.background)||void 0===W||null===($=W.gradient)||void 0===$?void 0:$.desktop,disableGradient:{smallPhone:(null===(F=e.background)||void 0===F||null===(H=F.gradient)||void 0===H?void 0:H.disableGradientMobile)??
1!1,mediumTablet:(null===(K=e.background)||void 0===K||null===(U=K.gradient)||void 0===U?void 0:U.disableGradient)??!1},backgroundGradientBlend:{mediumTablet:null===(Z=e.background)||void 0===Z||null===(ne=Z.gradient)||void 0===ne?void 0:ne.backgroundGradientBlend,smallPhone:null===(oe=e.background)||void 0===oe||null===(ie=oe.gradient)||void 0===ie?void 0:ie.backgroundGradientBlendMobile},backgroundColor:null==B?void 0:B.backgroundColor,videoSource:se,imageSource:ue?{smallPhone:{uri:ue.urlMobile??ue.url??""},mediumTablet:{uri:ue.url??""}}:void 0,timer:null!=ge&&ge.showCountdown?{targetInMilliseconds:fe,label:he??"",endLabel:ee,type:ye}:void 0}})).filter(Boolean);return r.createElement(r.Fragment,null,r.createElement(w.a,{ref:N,position:"relative",width:q?"100%":{base:"100%","2xl":"100dvw"},maxWidth:q?"100%":{"2xl":"2560px"},left:q?"0":{base:"0","2xl":"50%"},transform:q?"none":{base:"none","2xl":"translateX(-50%)"}},r.createElement(s.g,{contentAlign:e,variant:t,items:ie})),V.isOpen&&r.createElement(P.A,{isOpen:V.isOpen,onClose:V.onClose,cta:Z}))}},46648:(e,t,n)=>{function o(e){var t,n;return"button"===(null==e?void 0:e.type)?(null==e||null===(t=e.buttons)||void 0===t?void 0:t.map((e=>({type:"button",text:e.buttonText,hasIcon:e.buttonIcon,action:e.action[0]}))))??[]:"card"===(null==e?void 0:e.type)?[{type:"card",action:null==e||null===(n=e.action)||void 0===n?void 0:n[0],text:void 0,hasIcon:!1}]:[]}n.d(t,{U:()=>l,m:()=>o});const l=e=>"link"===(null==e?void 0:e.type)&&Boolean(e.openInNewWindow)},55129:(e,t,n)=>{function o(e,{startsInLabel:t,endsInLabel:n}){const o=null!=e&&e.c_isCFItem?null==e?void 0:e.c_cfTimerDate:null==e?void 0:e.c_timerDate,l=null!=e&&e.c_isCFItem?"endsin":null==e?void 0:e.c_timerType,i="startsin"===l?"startsin":"endsin"===l?"endsin":"none";return{targetTime:Number(o),style:l??"none",label:"startsin"===i?t:"endsin"===i?n:void 0}}n.d(t,{$:()=>o})},91703:(e,t,n)=>{function o(e,t){const n=t??1;switch(e){case"sm":return 24*n;case"lg":return 64*n;case"xl":return 96*n;default:return 56*n}}n.d(t,{b:()=>o})},97773:(e,t,n)=>{n.d(t,{h:()=>v});var o=n(10467),l=n(96540),i=n(38221),r=n.n(i),a=n(77714),d=n(62345),u=n(77950),s=n(68946),c=n(61903);const v=r()(function(){var e=(0,o.A)((function*(e,t,n,o,i,r,v,p,m){v&&p&&v((0,s.u)(e,p)),null==m||m.cart.logAddToCart((0,c.LR)({location:{pathname:p},products:[e],quantity:t,cartId:n.basketId,itemListId:"cart",itemListName:"cart",placementIndex:0}));try{var g;if(null==e||!e.orderable||!t)return;const s=e.productId,c=n.productItems&&n.productItems.filter((e=>e.productId===s))||[];var b,f;if(c.length>0){var y;const t=parseInt((null===(y=c[0])||void 0===y?void 0:y.quantity)||0)+1,o={productId:s,quantity:t};b=yield n.updateItemInBasket(o,c[0].itemId,e)}else{const o=[{productId:s,quantity:t,price:null==e?void 0:e.c_salePrice}];b=yield n.addItemToBasket(o,e,e.c_isMembershipProduct)}null!==(g=b)&&void 0!==g&&g.success?i.current=o({render:()=>l.createElement(u.A,{title:r.formatMessage({id:"product.addtocart.success",defaultMessage:[{type:0,value:"Item added to cart"}]}),status:"success",icon:d.P8,isClosable:!0,onClose:()=>{o.close(i.current)}})}):null!==(f=b)&&void 0!==f&&f.quantityRestriction?i.current=o({render:()=>l.createElement(u.A,{title:r.formatMessage({id:"product.quantity.limit.exceeded",defaultMessage:[{type:0,value:"Quantity Limit exceeded"}]}),status:"error",icon:d.VM,isClosable:!0,onClose:()=>{o.close(i.current)}})}):i.current=o({render:()=>l.createElement(u.A,{title:r.formatMessage(a.gS),status:"error",icon:d.fZ,isClosable:!0,onClose:()=>{o.close(i.current)}})})}catch(e){i.current=o({render:()=>l.createElement(u.A,{title:r.formatMessage(a.gS),status:"error",icon:d.fZ,isClosable:!0,onClose:()=>{o.close(i.current)}})})}}));return function(t,n,o,l,i,r,a,d,u){return e.apply(this,arguments)}}(),100)}}]);

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.