1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8283],{18283:function(e,t,n){"use strict";n.d(t,{l:function(){return W}});var r=n(52322),l=n(12524),a=n.n(l),i=n(2784),o=n(6227),s=n.n(o);n(16198);var c=n(43841),u=n(6188),d=n(41929);let v=e=>e.scrollWidth-e.clientWidth,f=()=>(0,c.U)((e,t)=>({activePillIndex:0,scrollAreaElement:null,itemElements:[],currentItemIndex:0,numberVisibleItemsPerPage:0,numberOfPages:0,maxScrollLeft:0,currentPageIndex:0,pillElements:[],init:n=>{let{scrollAreaElement:r,itemElements:l}=n,a=v(r);e({scrollAreaElement:r,itemElements:l,maxScrollLeft:a});let i=()=>{let{scrollAreaElement:n,itemElements:r}=t();if(!n||!r.length)return;let{scrollLeft:l,clientWidth:a}=n,i=l+a/2,o=0,s=1/0;r.forEach((e,t)=>{let n=Math.abs(i-(e.offsetLeft+e.offsetWidth/2));n<s&&(s=n,o=t)}),e({currentPageIndex:o})},o=()=>{var n;let{currentPageIndex:r}=t();null===(n=l[r])||void 0===n||n.focus(),e({activePillIndex:r})};r.addEventListener(d.ej,i),r.addEventListener(d.mm,o);let s=()=>{e({scrollAreaElement:null,itemElements:[],currentItemIndex:0,maxScrollLeft:0}),r.removeEventListener(d.ej,i),r.removeEventListener(d.mm,o)},c=new ResizeObserver(()=>{let{scrollAreaElement:n,itemElements:r}=t();n&&r.length>0&&e({numberVisibleItemsPerPage:1,numberOfPages:r.length/1,maxScrollLeft:v(n)})});return c.observe(r),()=>{c.disconnect(),s()}},scrollToIndex:n=>{let{scrollAreaElement:r,itemElements:l}=t();if(!r||!l.length||!l[n])return;let a=window.matchMedia("(prefers-reduced-motion: reduce)").matches,i=l[n].offsetLeft-(r.clientWidth-l[n].offsetWidth)/2;r.scrollTo({left:i,behavior:a?"auto":"smooth"}),e({currentItemIndex:n,activePillIndex:n})},setPillElements:t=>{e({pillElements:t})}})),h=(0,i.createContext)(null),m=e=>{let{children:t}=e,n=(0,i.useRef)(f()).current;return(0,r.jsx)(h.Provider,{value:n,children:t})}
1,p=e=>{let t=(0,i.useContext)(h);if(!t)throw Error("Missing CarouselState in the tree");return(0,c.o)(t,(0,u.N)(e))},g=(0,i.forwardRef)((e,t)=>{let{children:n,className:l}=e;return(0,r.jsx)("li",{tabIndex:0,ref:t,className:[s().carouselItem,l].join(" "),children:n})});var _=n(62795),x=n(67677),b=n.n(x),w=n(79130),N=n.n(w);let C=N().bind(s());var j=n(28981),I=n(31120),P=n(23643),E=n(50933),L=n.n(E);let k={link_location:"1p savings challenge - carousel navigation",link_type:n(7922).fZ.Navigation},B=N().bind(L());var S=n(10699),R=n.n(S);let y=N().bind(R()),W={CarouselNextButton:e=>{let{onClick:t,as:n,className:l,...a}=e,{currentPageIndex:i,numberOfPages:o,scrollToIndex:s}=p(e=>e);return(0,r.jsx)(null!=n?n:"button",{className:[b().carouselButton,l].join(" "),disabled:i===o-1,type:"button","aria-label":"Go to next slide",onClick:e=>{s(Math.min(o-1,i+1)),t&&t(e)},tabIndex:-1,...a,children:(0,r.jsx)(_.Z,{})})},CarouselPreviousButton:e=>{let{onClick:t,as:n,className:l,...a}=e,{currentPageIndex:i,scrollToIndex:o}=p(e=>e);return(0,r.jsx)(null!=n?n:"button",{className:[b().carouselButton,l].join(" "),disabled:0===i,"aria-label":"Go to previous slide",onClick:e=>{o(Math.max(0,i-1)),t&&t(e)},tabIndex:-1,...a,children:(0,r.jsx)(_.Z,{})})},Content:e=>{let{children:t,className:n,carouselName:l}=e,{init:o,currentItemIndex:c}=p(e=>e),u=(0,i.useRef)([]),d=(0,i.useRef)(null);return(0,i.useEffect)(()=>{if((d||u)&&d.current)return o({scrollAreaElement:d.current,itemElements:u.current.map(e=>e)})},[d,u,o]),(0,r.jsx)("div",{className:s().carouselContent,children:(0,r.jsx)("ul",{ref:d,className:a()(s().carouselScrollArea,n),"data-current-item":c,children:i.Children.map(t,(e,t)=>(0,i.cloneElement)(e,{ref:e=>{u.current[t]=e},"data-testid":"".concat(l,"-carousel-item-").concat(t)}))})})},Item:g,NavigationDots:e=>{let{className:t}=e,{scrollToIndex:n,itemElements:l,numberVisibleItemsPerPage:a,numberOfPages:i,currentPageIndex:o}=p(e=>e);return(0,r.jsx)("ul",{className:[s().carouselNavigation,t].join(" "),children:Array.from({length:i}).map((e,t)=>(0,r.jsx)("li",{children:(0,r.jsx)("button",{"aria-label":"Go to carousel item ".concat(t+1),"data-monzoanalytics-no-tracking":!0,onClick:()=>n(Math.min(t*a,l.length-1)),className:C({carouselNavigationHitArea:!0,active:o===t}),children:(0,r.jsx)("span",{className:C({carouselNavigationDot:!0})})})},t))})},NavigationPills:e=>{let{className:t,children:n}=e,{sendEvent:l}=(0,I.Z)(),[a,o]=(0,i.useState)(!1),s=(0,i.useRef)(null),c=(0,i.useRef)(null),[{showLeftSwipeButton:u,showRightSwipeButton:v},f]=(0,i.useState)({showLeftSwipeButton:!1,showRightSwipeButton:!1}),{activePillIndex:h,pillElements:m,scrollAreaElement:g,setPillElements:_}=p(e=>e),x=(0,i.useRef)([]),b=(0,i.useCallback)(()=>{if(s.current){let{scrollLeft:e,clientWidth:t,scrollWidth:n}=s.current;f({showLeftSwipeButton:e>5,showRightSwipeButton:e+t<=n-5})}},[]);return(0,i.useEffect)(()=>{let e;let t=s.current;return t&&(t.addEventListener(d.ej,b),(e=new ResizeObserver(b)).observe(t)),()=>{t&&(t.removeEventListener(d.ej,b),e.unobserve(t))}},[b]),(0,i.useEffect)(()=>{let e;let t=s.current,n=m[h];return t&&n&&(e=new IntersectionObserver(e=>{var t;return o(!!(null==e?void 0:null===(t=e[0])||void 0===t?void 0:t.isIntersecting))},{root:t,threshold:1})).observe(n),()=>{n&&(null==e||e.unobserve(n))}},[h,m]),(0,i.useEffect)(()=>{let e=()=>{let e=m[h];!a&&e&&e.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})};return null==g||g.addEventListener(d.ej,e),()=>{null==g||g.removeEventListener(d.ej,e)}},[a,h,m,g]),(0,i.useEffect)(()=>{let e=c.current,t=m[h];e&&t&&(e.style.setProperty("--active-pill-indicator-width","".concat(t.offsetWidth,"px")),e.style.setProperty("--active-pill-indicator-left","".concat(t.offsetLeft,"px")))},[h,m]),(0,i.useEffect)(()=>{x&&x.current.length>0&&_(x.current.map(e=>e))},[x,_]),(0,r.jsx)("div",{className:B(L().wrapper,{hasSwipeButtons:u||v}),children:(0,r.jsxs)("ul",{ref:s,className:B(L().navigation,t),"data-testid":"carousel-navigation-buttons",role:"list",children:[u&&(0,r.jsx)("li",{"aria-hidden":"true",className:L().swipeLeftButtonWrapper,children:(0,r.jsx)(P.z,{ariaLabel:"Swipe carousel navigation links left",className:L().swipeButton,onClick:()=>{s.current&&(l({eventName:"buttonClick",eventParameters:{...k,link_text:"Swipe left"}}),s.current.scroll({left:-100,behavior:"smooth"}))},testId:"one-pence-challenge-carousel-swipe-left-button",icon:{color:j.PD.Trans
1parent,forceLightMode:!0,icon:"chevron.back",size:"large",type:"builtin"},styleType:"none"})},"left-chevron"),i.Children.map(n,(e,t)=>(0,i.cloneElement)(e,{ref:e=>{x.current[t]=e},index:t})),v&&(0,r.jsx)("li",{"aria-hidden":"true",className:L().swipeRightButtonWrapper,children:(0,r.jsx)(P.z,{ariaLabel:"Swipe carousel navigation links right",className:L().swipeButton,onClick:()=>{l({eventName:"buttonClick",eventParameters:{...k,link_text:"Swipe right"}}),s.current&&s.current.scroll({left:100,behavior:"smooth"})},testId:"one-pence-challenge-carousel-swipe-right-button",icon:{color:j.PD.Transparent,forceLightMode:!0,icon:"chevron.forward",size:"large",type:"builtin"},styleType:"none"})},"right-chevron"),(0,r.jsx)("li",{ref:c,"aria-hidden":"true",className:L().activeIndicator})]})})},NavigationPillsItem:(0,i.forwardRef)((e,t)=>{let{label:n,index:l}=e,{activePillIndex:a,scrollToIndex:o}=p(e=>e),{sendEvent:s}=(0,I.Z)(),c=(0,i.useRef)(null);return(0,r.jsx)("li",{ref:t,children:(0,r.jsx)("button",{ref:c,onClick:()=>{s({eventName:"buttonClick",eventParameters:{...k,link_text:n}}),null!=l&&null!==c.current&&o(l)},"data-monzoanalytics-action-id":"carousel-navigation",className:y({pill:!0,active:a===l}),tabIndex:0,children:n})},l)}),Root:e=>{let{children:t,className:n}=e;return(0,r.jsx)(m,{children:(0,r.jsx)("div",{className:a()(s().carouselRoot,n),role:"group",children:t})})}}},62795:function(e,t,n){"use strict";var r=n(52322);n(2784),t.Z=e=>(0,r.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,r.jsx)("path",{d:"M5 13H16.17L11.29 17.88C10.9 18.27 10.9 18.91 11.29 19.3C11.68 19.69 12.31 19.69 12.7 19.3L19.29 12.71C19.68 12.32 19.68 11.69 19.29 11.3L12.71 4.69997C12.32 4.30997 11.69 4.30997 11.3 4.69997C10.91 5.08997 10.91 5.71997 11.3 6.10997L16.17 11H5C4.45 11 4 11.45 4 12C4 12.55 4.45 13 5 13Z",fill:"#ffffff"})})},31120:function(e,t,n){"use strict";var r=n(65481);t.Z=()=>{let{sendEvent:e,sendEvents:t}=(0,r.aG3)(),{sendBusinessSignUpEvent:n,sendSignUpLeadEvent:l}=(0,r.MzK)(),{advertisingPartnersInitialised:a}=(0,r.e2s)();return{sendEvent:e,sendEvents:t,sendBusinessSignUpEvent:n,sendSignUpLeadEvent:l,facebookInitialised:a}}},6227:function(e){e.exports={carouselRoot:"Carousel_carouselRoot__R55E3",carouselContent:"Carousel_carouselContent__Uj9GU",carouselScrollArea:"Carousel_carouselScrollArea__Wh62S",carouselItem:"Carousel_carouselItem__sy_UV",carouselNavigation:"Carousel_carouselNavigation__c7_02",carouselNavigationHitArea:"Carousel_carouselNavigationHitArea__wOh92",carouselNavigationDot:"Carousel_carouselNavigationDot__6nOrr",active:"Carousel_active__l0FxS"}},67677:function(e){e.exports={carouselButton:"NavigationButtons_carouselButton__XlMcN",back:"NavigationButtons_back__iP7G0"}},50933:function(e){e.exports={wrapper:"NavigationPills_wrapper__skX94",hasSwipeButtons:"NavigationPills_hasSwipeButtons__Ob3zx",navigation:"NavigationPills_navigation__R6Ked",activeIndicator:"NavigationPills_activeIndicator__9Oprh",swipeButton:"NavigationPills_swipeButton__kEoDF",swipeLeftButtonWrapper:"NavigationPills_swipeLeftButtonWrapper__dS2Ie",swipeRightButtonWrapper:"NavigationPills_swipeRightButtonWrapper__crLz7"}},10699:function(e){e.exports={pill:"NavigationPillsItem_pill__LA_1T",active:"NavigationPillsItem_active__0MQeq"}}}]);
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.