PageSourceSearch

https://www.mob.co.uk/_next/static/chunks/pages/onboarding/blackfriday-e3887e44a19a3a4c.js

js mob.co.uk collected 2026-09-27 21:51:56 UTC 15,858 bytes, 7 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4351],{24041:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/onboarding/blackfriday",function(){return n(51363)}])},51363:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSG:function(){return y}});var l=n(85893),i=n(68532),o=n(72596),r=n(90617),a=n(75572),s=n(60116),c=n(33379),u=n(28124),d=n(60373),m=n(28961),p=n(81807),f=n(20958),g=n(27595),x=n(11163),h=n(34651),v=n(67294);let b={welcome:"https://mob-cdn.ams3.cdn.digitaloceanspaces.com/files/OnboardingFlowFiles/WelcomeStep.png",recipeSelection:"https://mob-cdn.ams3.cdn.digitaloceanspaces.com/files/OnboardingFlowFiles/recipeSelectionBg.png",cookingHabits:"https://mob-cdn.ams3.cdn.digitaloceanspaces.com/files/OnboardingFlowFiles/cookingHabitsStepBg.png"},w=e=>{var t,n,i,o,a,w,j,y,N;let{userOnboarding:C,recipeSelectionStepAnswers:k,cookingHabitsStepAnswers:_}=e,[S,E]=(0,v.useState)(!1),{currentStepIndex:F,setCurrentStepIndex:Z,onboardingSteps:O,removeDynamicStep:A}=(0,r.tz)(),I=O[F];if(!I){let e=O[F-1];e&&(I=e)}let L=null==I?void 0:I.key,B=(0,v.useMemo)(()=>"welcome"===L?"Claim limited offer now":"Continue",[L]),P=C.onboardingSteps.find(e=>e.stepKey===L),R=(null==P?void 0:null===(n=P.logo)||void 0===n?void 0:null===(t=n[0])||void 0===t?void 0:t.url)||"",H=(null==P?void 0:null===(o=P.logo)||void 0===o?void 0:null===(i=o[0])||void 0===i?void 0:i.title)||"",W=(0,x.useRouter)(),U=(0,s.Z)(),{authStore:Y}=(0,c.m)(),$=Y.currentUser;(0,v.useEffect)(()=>{F===O.length&&W.push("/sign-up")},[F,O.length]),(0,v.useEffect)(()=>{sessionStorage.getItem("onboardingCompleted")&&Z(O.length-1),sessionStorage.removeItem("onboardingCompleted")},[O.length,Z]),(0,v.useEffect)(()=>{h.ZP.onFeatureFlags(function(){if(h.ZP.isFeatureEnabled("black-friday-campaign-25"))sessionStorage.setItem("customCampaign","BLACKFRIDAY");else{W.push("/onboarding");return}})},[]);let z=(0,v.useMemo)(()=>"welcome"===L?-1:"recipeSelection"===L?0:(null==L?void 0:L.startsWith("recipeSelectionFollowUp"))?1:"cookingHabits"===L?2:(null==L?void 0:L.startsWith("cookingHabitsFollowUp"))?3:0,[L]);if(!I)return null;let D=(null===(a=I.image)||void 0===a?void 0:a.url)||(null==P?void 0:null===(j=P.image)||void 0===j?void 0:null===(w=j[0])||void 0===w?void 0:w.url)||(null==P?void 0:null===(N=P.linkedOptionImages)||void 0===N?void 0:null===(y=N[0])||void 0===y?void 0:y.url)||b[L]||"",M=(e,t)=>{switch(e){case"welcome":U.pushEvent("onboarding_started",{promo:"black_friday"});break;case"recipeSelection":U.pushEvent("onboarding_step_completed",{onboardingStepName:e,onboardingWhatsImportant:null==t?void 0:t.title,promo:"black_friday"});break;case"cookingHabits":U.pushEvent("onboarding_step_completed",{onboardingStepName:e,onboardingHowYouCook:null==t?void 0:t.title,promo:"black_friday"})}},K=e=>{M(L,e),Z(F+1)},J=!!L&&!["recipeSelection","cookingHabits"].includes(L);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(d.Z,{isOpen:S,onClose:()=>E(!1),onConfirmExit:()=>{W.push("/"),U.pushEvent("onboarding_exited",{onboardingStepName:L})}}),(0,l.jsxs)(p.Z,{imageSection:(0,l.jsx)(g.Z,{currentStepKey:L,imageUrl:D,currentStep:I}),children:[(0,l.jsx)(m.Z,{currentStepKey:L,currentStepIndex:F,currentVisibleIndex:z,totalSteps:8,logoUrl:R,logoAlt:H,onBack:()=>{I.isFollowUpStep&&A(I.key),Z(F-1)},onClose:()=>{E(!0)}}),(0,l.jsx)(f.Z,{currentStep:I,stepProps:{handleContinue:K,stepData:P,recipeSelectionStepAnswers:k,cookingHabitsStepAnswers:_}}),(0,l.jsx)(u.Z,{currentStepKey:L,currentStepIndex:F,onboardingStepsLength:O.length,buttonLabel:B,onContinue:()=>K(null),currentUser:$,showButton:J,customCampaign:"BLACKFRIDAY"})]})]})},j=e=>(0,l.jsx)(r.kZ,{children:(0,l.jsx)(a.f,{children:(0,l.jsx)(w,{...e})})});j.getLayout=e=>{let{props:t}=e,{notifications:n,navigation:i,colourway:r}=t;return(0,l.jsx)(o.Z,{notifications:n,colourway:r,navigation:i,promoBanner:null,primaryNavigation:null,breadcrumbs:null,fullWidth:!0,children:e})};var y=!0;t.default=(0,i.j5)(j)},28124:function(e,t,n){"use strict";var l=n(85893),i=n(64656),o=n(60116),r=n(41664),a=n.n(r),s=n(23906),c=n(83233),u=n(34651),d=n(2875);t.Z=e=>{let{currentStepKey:t,currentStepIndex:n,onboardingStepsLength:r,buttonLabel:m,onContinue:p,currentUser:f,showButton:g,customCampaign:x,centerLoginLink:h=!1}=e,v=(0,o.Z)(),{prices:b,yearlyPrice:w,monthlyPrice:j,isLoading:y}=(0,c.f)(),N=w||j;N||y||d.cM.error("[OnboardingContinueButtonError] Unable to load pricing information.");let C=()=>
1{if(u.LJ.isFeatureEnabled("black-friday-campaign-25")&&"BLACKFRIDAY"===x){let e=u.LJ.getFeatureFlag("black-friday-campaign-25-banner-variants");v.pushEvent("black_friday_banner_variant_clicked",{bannerVariant:e,page:window.location.pathname})}},k=(0,l.jsx)(i.Z,{onClick:()=>(C(),p(),null),label:m,isFull:!0,theme:"light",href:n===r-1?"/sign-up":void 0,attributes:{"data-posthog":"onboarding-continue-button-".concat(t)}});return y?(0,l.jsx)(l.Fragment,{}):(0,l.jsxs)("div",{className:"OnboardingContinueButton",children:[g&&(u.LJ.isFeatureEnabled("black-friday-campaign-25")&&"BLACKFRIDAY"===x&&"welcome"===t?(0,l.jsx)(s.Z,{onboardingCTAButton:k,defaultPrice:N||{},couponCode:"S2YxYNPg",prices:b||[],customCampaign:x}):u.LJ.isFeatureEnabled("healthyjan-campaign-25")&&"HEALTHYJAN"===x&&"welcome"===t?(0,l.jsx)(s.Z,{onboardingCTAButton:k,defaultPrice:N||{},couponCode:"ZDUgOIp3",prices:b||[],customCampaign:x}):k),"welcome"===t&&!f&&(0,l.jsxs)("div",{className:h?"flex justify-center":"flex justify-between",children:[(0,l.jsxs)("div",{className:"mt-2 font-body text-sm font-medium text-zinc-700",children:["Already have a Mob account?"," ",(0,l.jsx)(a(),{href:"/signin",className:"underline",onClick:()=>v.pushEvent("onboarding_log_in_clicked"),"data-posthog":"onboarding-login-link",children:"Login"})]}),u.LJ.isFeatureEnabled("black-friday-campaign-25")&&"BLACKFRIDAY"===x&&(0,l.jsx)("div",{className:"mt-2 font-body text-sm font-medium text-zinc-700",children:"No free trial for this offer"}),u.LJ.isFeatureEnabled("healthyjan-campaign-25")&&"HEALTHYJAN"===x&&(0,l.jsx)("div",{className:"mt-2 font-body text-sm font-medium text-zinc-700",children:"No free trial for this offer"})]})]})}},60373:function(e,t,n){"use strict";var l=n(85893),i=n(64656),o=n(46100);t.Z=e=>{let{isOpen:t,onClose:n,onConfirmExit:r,onRequestClose:a}=e;return(0,l.jsx)("div",{className:"OnboardingExitModal",children:(0,l.jsxs)(o.Z,{isOpen:t,onRequestClose:()=>((null!=a?a:n)(),null),children:[(0,l.jsx)("h1",{className:"mb-4 text-xl font-medium sm:text-3xl","data-posthog":"onboarding-exit-modal-heading",children:"Are you sure you want to quit?"}),(0,l.jsx)("div",{className:"mb-3 font-body text-base font-medium","data-posthog":"onboarding-exit-modal-subheading",children:"You'll miss out on:"}),(0,l.jsx)("ul",{className:"space-y-2 font-body text-sm font-medium sm:text-base",children:(0,l.jsx)("li",{className:"flex items-center gap-2",children:(0,l.jsx)("span",{children:"Your free trial to access 3000+ healthy & delicious recipes and meal planning tools. Cancel anytime"})})}),(0,l.jsxs)("div",{className:"mt-6 flex w-full gap-2",children:[(0,l.jsx)(i.Z,{onClick:()=>(r(),null),label:"Quit",isFull:!0,theme:"dark",withBorder:!0,attributes:{"data-posthog":"onboarding-exit-modal-quit-button"}}),(0,l.jsx)(i.Z,{label:"Continue",onClick:()=>(n(),null),isFull:!0,theme:"light",attributes:{"data-posthog":"onboarding-exit-modal-continue-button"}})]})]})})}},28961:function(e,t,n){"use strict";var l=n(85893),i=n(5661),o=n(61871),r=n(76415),a=n(90512),s=n(25675),c=n.n(s);t.Z=e=>{let{currentStepKey:t,currentStepIndex:n,currentVisibleIndex:s,totalSteps:u,logoUrl:d,logoAlt:m,onBack:p,onClose:f}=e;return(0,l.jsxs)("div",{className:(0,a.Z)("OnboardingHeader","mb-6 flex shrink-0 items-center justify-between"),children:["welcome"===t&&d?(0,l.jsx)(c(),{src:d,alt:m,width:150,height:60,className:"h-6 w-auto lg:h-8"}):n>0?(0,l.jsx)("button",{onClick:p,children:(0,l.jsx)(o.Z,{className:"h-5 w-5"})}):(0,l.jsx)("span",{className:"w-5"}),n>0&&(0,l.jsx)("div",{className:"flex w-full justify-center",children:(0,l.jsx)("div",{className:"w-full max-w-[240px] sm:max-w-[320px]",children:(0,l.jsx)(i.Z,{currentIndex:s,totalSteps:u})})}),(0,l.jsx)("button",{onClick:f,className:"flex h-5 w-5 items-center justify-center text-black","data-cy":"onboarding-close",children:(0,l.jsx)(r.Z,{className:"h-5 w-5"})})]})}},81807:function(e,t,n){"use strict";var l=n(85893);t.Z=e=>{let{children:t,imageSection:n}=e;return(0,l.jsxs)("div",{className:"OnboardingLayout relative flex min-h-full w-screen flex-col overflow-y-auto lg:flex-row",children:[(0,l.jsx)("div",{className:"order-2 flex max-h-dvh w-full flex-grow flex-col bg-white px-6 py-6 text-black sm:px-6 lg:order-1 lg:w-1/2 lg:px-12 lg:py-12",children:t}),n]})}},20958:function(e,t,n){"use strict";var l=n(85893);t.Z=e=>
1{let{currentStep:t,stepProps:n}=e,i=t.component;return t.isFollowUpStep?(0,l.jsx)("div",{className:"OnboardingStepContent flex w-full flex-1 flex-col overflow-y-auto pt-4",children:(0,l.jsx)("div",{className:"flex h-full w-full flex-1 flex-col",children:(0,l.jsx)(i,{...n})})}):(0,l.jsx)("div",{className:"OnboardingStepContent flex min-h-0 flex-1 flex-col items-start justify-start overflow-y-auto pt-4",children:(0,l.jsx)("div",{className:"w-full max-w-5xl px-0 lg:px-0",children:(0,l.jsx)(i,{...n})})})}},27595:function(e,t,n){"use strict";var l=n(85893),i=n(8407),o=n(90512),r=n(25675),a=n.n(r);t.Z=e=>{let{currentStepKey:t,imageUrl:n,currentStep:r}=e;if(!n)return null;let s=n.startsWith("/"),c=s?void 0:i.Z;return"welcome"===t?(0,l.jsx)("div",{className:(0,o.Z)("OnboardingStepImage relative order-1 w-full overflow-hidden bg-white lg:order-2 lg:h-full lg:w-1/2","hidden lg:block"),children:(0,l.jsx)("div",{className:"relative h-full w-full [clip-path:polygon(0%_0%,100%_0%,100%_90%,0%_100%)] lg:[clip-path:none]",children:(0,l.jsx)(a(),{src:n,alt:"Welcome step",fill:!0,className:"object-cover",priority:!0})})}):(0,l.jsx)("div",{className:(0,o.Z)("OnboardingStepImage order-1 w-full bg-zinc-50 lg:order-2 lg:h-full lg:w-1/2","hidden items-center justify-center lg:flex"),children:(null==r?void 0:r.isFollowUpStep)?t.startsWith("cookingHabitsFollowUp")?(0,l.jsx)("div",{className:"relative w-full max-w-[260px] bg-zinc-50 px-2 py-6",children:(0,l.jsx)("div",{className:"relative aspect-[9/16] w-full overflow-hidden",children:(0,l.jsx)(a(),{src:n,alt:"Cooking Habits follow-up",fill:!0,className:"object-cover",priority:!0,loader:c,unoptimized:s})})}):(0,l.jsx)("div",{className:"relative aspect-[16/9] w-full max-w-4xl bg-zinc-50 px-6 py-8",children:(0,l.jsx)(a(),{src:n,alt:"Follow-up image",fill:!0,className:"rounded-xl object-cover",priority:!0,loader:c,unoptimized:s})}):(0,l.jsx)("div",{className:"relative h-full w-full [clip-path:polygon(0%_0%,100%_0%,100%_90%,0%_100%)] lg:[clip-path:none]",children:(0,l.jsx)(a(),{src:n,alt:"Onboarding step",fill:!0,className:"scale-[1.01] object-cover",priority:!0,loader:c,unoptimized:s})})})}},6757:function(e,t,n){"use strict";n.d(t,{z$:function(){return k},fC:function(){return C}});var l=n(67294),i=n(85893);function o(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}n(73935);var r=l.forwardRef((e,t)=>{let{children:n,...o}=e,r=l.Children.toArray(n),s=r.find(c);if(s){let e=s.props.children,n=r.map(t=>t!==s?t:l.Children.count(e)>1?l.Children.only(null):l.isValidElement(e)?e.props.children:null);return(0,i.jsx)(a,{...o,ref:t,children:l.isValidElement(e)?l.cloneElement(e,void 0,n):null})}return(0,i.jsx)(a,{...o,ref:t,children:n})});r.displayName="Slot";var a=l.forwardRef((e,t)=>{let{children:n,...i}=e;if(l.isValidElement(n)){let e,r;let a=(e=Object.getOwnPropertyDescriptor(n.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?n.ref:(e=Object.getOwnPropertyDescriptor(n,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?n.props.ref:n.props.ref||n.ref,s=function(e,t){let n={...t};for(let l in t){let i=e[l],o=t[l];/^on[A-Z]/.test(l)?i&&o?n[l]=(...e)=>{o(...e),i(...e)}:i&&(n[l]=i):"style"===l?n[l]={...i,...o}:"className"===l&&(n[l]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}(i,n.props);return n.type!==l.Fragment&&(s.ref=t?function(...e){return t=>{let n=!1,l=e.map(e=>{let l=o(e,t);return n||"function"!=typeof l||(n=!0),l});if(n)return()=>{for(let t=0;t<l.length;t++){let n=l[t];"function"==typeof n?n():o(e[t],null)}}}}(t,a):a),l.cloneElement(n,s)}return l.Children.count(n)>1?l.Children.only(null):null});a.displayName="SlotClone";var s=({children:e})=>(0,i.jsx)(i.Fragment,{children:e});function c(e){return l.isValidElement(e)&&e.type===s}var u=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{let n=l.forwardRef((e,n)=>{let{asChild:l,...o}=e,a=l?r:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,i.jsx)(a,{...o,ref:n})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),d="Progress",[m,p]=function(e,t=[]){let n=[],o=()=>{let t=n.map(e=>l.createContext(e));return function(n){let i=n?.[e]||t;return l.useMemo(()=>({[`__scope${e}`]:{...n,[e]:i}}),[n,i])}};return o.scopeName=e,[function(t,o){let r=l.createContext(o),a=n.length;n=[...n,o];let s=t=>{let{scope:n,children:o,...s}=t,c=n?.[e]?.[a]||r,u=l.useMemo(()=>s,Object.values(s));return(0,i.jsx)(c.Provider,{value:u,children:o})};return s.displayName=t+"Provider",[s,function(n,i){let s=i?.[e]?.[a]||r,c=l.useContext(s);if(c)return c;if(void 0!==o)return o;throw Error(`\`${n}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let i=n.reduce((t,{useScope:n,scopeName:l})=>{let i=n(e)[`__scope${l}`];return{...t,...i}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}(o,...t)]}(d),[f,g]=m(d),x=l.forwardRef((e,t)=>
1{var n,l;let{__scopeProgress:o,value:r=null,max:a,getValueLabel:s=b,...c}=e;(a||0===a)&&!y(a)&&console.error((n=`${a}`,`Invalid prop \`max\` of value \`${n}\` supplied to \`Progress\`. Only numbers greater than 0 are valid max values. Defaulting to \`100\`.`));let d=y(a)?a:100;null===r||N(r,d)||console.error((l=`${r}`,`Invalid prop \`value\` of value \`${l}\` supplied to \`Progress\`. The \`value\` prop must be:
2  - a positive number
3  - less than the value passed to \`max\` (or 100 if no \`max\` prop is set)
4  - \`null\` or \`undefined\` if the progress is indeterminate.
5
6Defaulting to \`null\`.`));let m=N(r,d)?r:null,p=j(m)?s(m,d):void 0;return(0,i.jsx)(f,{scope:o,value:m,max:d,children:(0,i.jsx)(u.div,{"aria-valuemax":d,"aria-valuemin":0,"aria-valuenow":j(m)?m:void 0,"aria-valuetext":p,role:"progressbar","data-state":w(m,d),"data-value":m??void 0,"data-max":d,...c,ref:t})})});x.displayName=d;var h="ProgressIndicator",v=l.forwardRef((e,t)=>{let{__scopeProgress:n,...l}=e,o=g(h,n);return(0,i.jsx)(u.div,{"data-state":w(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...l,ref:t})});function b(e,t){return`${Math.round(e/t*100)}%`}function w(e,t){return null==e?"indeterminate":e===t?"complete":"loading"}function j(e){return"number"==typeof e}function y(e){return j(e)&&!isNaN(e)&&e>0}function N(e,t){return j(e)&&!isNaN(e)&&e<=t&&e>=0}v.displayName=h;var C=x,k=v},61871:function(e,t,n){"use strict";var l=n(67294);let i=l.forwardRef(function(e,t){let{title:n,titleId:i,...o}=e;return l.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},o),n?l.createElement("title",{id:i},n):null,l.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5 8.25 12l7.5-7.5"}))});t.Z=i}},function(e){e.O(0,[8532,8134,3233,3165,6306,2888,9774,179],function(){return e(e.s=24041)}),_N_E=e.O()}]);
7//# sourceMappingURL=blackfriday-e3887e44a19a3a4c.js.map

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.