1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[331],{87925:function(e,r,t){t.d(r,{NotificationProvider:function(){return c},l:function(){return d}});var i=t(57437),o=t(2265),n=t(62877),s=t(82279),l=e=>{let{open:r,onClose:t,severity:o="success",message:l,autoHideDuration:a=5e3,anchorOrigin:d={vertical:"bottom",horizontal:"center"}}=e;return(0,i.jsx)(n.Z,{open:r,autoHideDuration:a,onClose:t,anchorOrigin:d,children:(0,i.jsx)(s.Z,{onClose:t,severity:o,sx:{width:"100%"},children:l})})};let a=(0,o.createContext)(void 0),d=()=>{let e=(0,o.useContext)(a);if(!e)throw Error("useNotification must be used within a NotificationProvider");return e},c=e=>{let{children:r}=e,[t,n]=(0,o.useState)(!1),[s,d]=(0,o.useState)(""),[c,u]=(0,o.useState)("success"),x=(0,o.useCallback)(function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"success";d(e),u(r),n(!0)},[]);return(0,i.jsxs)(a.Provider,{value:{showNotification:x},children:[r,(0,i.jsx)(l,{open:t,onClose:()=>n(!1),severity:c,message:s})]})}},40973:function(e,r,t){t.d(r,{HighlightSectionImages:function(){return l}});var i=t(57437),o=t(63832),n=t(8461),s=t(84498);let l=e=>{var r,t,l,a,d,c,u,x;let{images:h,title:m}=e;if(!h||!h[0]||!h[1])return;let p=h[0].hidden||!h[0].url,g=h[1].hidden||!h[1].url;if(!p||!g)return p||g?(0,i.jsx)(o.Z,{sx:{width:{xs:"100%",md:"50%"},display:"grid"},children:(0,i.jsx)(o.Z,{component:"img",src:p?(null===(d=h[1])||void 0===d?void 0:d.croppedImageUrl)||(0,n.g)(null===(c=h[1])||void 0===c?void 0:c.url):(null===(u=h[0])||void 0===u?void 0:u.croppedImageUrl)||(0,n.g)(null===(x=h[0])||void 0===x?void 0:x.url),alt:m||"",sx:{objectFit:"cover",aspectRatio:s.s.COMMON.HIGHLIGHT_SECTION,width:"90%",justifySelf:"center",zIndex:1}})}):(0,i.jsxs)(o.Z,{sx:{width:{xs:"100%",md:"50%"},display:"grid",gridTemplateColumns:"1fr",gridTemplateRows:"1fr"},children:[(0,i.jsx)(o.Z,{component:"img",src:(null===(r=h[0])||void 0===r?void 0:r.croppedImageUrl)||(0,n.g)(null===(t=h[0])||void 0===t?void 0:t.url),alt:m||"",sx:{objectFit:"cover",aspectRatio:s.s.COMMON.HIGHLIGHT_SECTION,width:"80%",gridColumn:"1 / 2",gridRow:"1 / 2",alignSelf:"start",justifySelf:"start",zIndex:1}}),(0,i.jsx)(o.Z,{component:"img",src:(null===(l=h[1])||void 0===l?void 0:l.croppedImageUrl)||(0,n.g)(null===(a=h[1])||void 0===a?void 0:a.url),alt:m||"",sx:{objectFit:"cover",aspectRatio:s.s.COMMON.HIGHLIGHT_SECTION_2,width:"65%",gridColumn:"1 / 2",gridRow:"1 / 2",alignSelf:"end",justifySelf:"end",zIndex:2,marginTop:"175px"}})]})}},36886:function(e,r,t){t.r(r),t.d(r,{HighlightSection:function(){return x},HighlightSectionText:function(){return u}});var i=t(57437),o=t(99583),n=t(70725),s=t(63582),l=t(46387),a=t(63832),d=t(44811),c=t(98489);let u=e=>{let{title:r,content:t,buttons:c,hasVisibleImages:u}=e;return(0,i.jsxs)(s.Z,{children:[(0,i.jsx)(l.Z,{variant:"h2",component:"h3",marginTop:5,marginBottom:1,"data-editor-field":n.Js.title,children:r}),(0,i.jsx)(l.Z,{variant:"body1",component:"div",lineHeight:2.5,"data-editor-field":n.Js.content,dangerouslySetInnerHTML:{__html:(0,o.Z)(t)||""}}),c&&(0,i.jsx)(s.Z,{direction:u?"column":"row",spacing:2,alignSelf:u?"flex-start":"center",children:c.map((e,r)=>e.text&&(0,i.jsx)(a.Z,{marginTop:2,children:(0,i.jsx)(d.Z,{variant:"contained",href:e.link||"",target:"_blank","data-editor-field":(0,n.Q2)(r),sx:{textTransform:"none",fontWeight:700},children:e.text})},r))})]})},x=e=>{var r,t,o,n,l;let{section:d,editorMode:x,sectionImageComponent:h,fillColor:m}=e,p=null==d?void 0:d.content,g=null==d?void 0:d.title,f=null==d?void 0:d.buttons,v=null==d?void 0:d.images,w=v&&((null===(r=v[0])||void 0===r?void 0:r.hidden)||!(null===(t=v[0])||void 0===t?void 0:t.url)),b=v&&((null===(o=v[1])||void 0===o?void 0:o.hidden)||!(null===(n=v[1])||void 0===n?void 0:n.url));return!!d&&(!!x||null!=d&&!!d.visible)&&(0,i.jsx)(s.Z,{id:"Highlight-"+(null==d?void 0:d.position),className:"scroll-to",paddingY:16,sx:{opacity:(null==d?void 0:d.visible)?"1":"0.2"},children:(0,i.jsx)(c.Z,{children:(0,i.jsxs)(s.Z,{gap:8,sx:{flexDirection:{xs:"column",md:"row"}},children:[(0,i.jsx)(h,{images:d.images,title:g,fillColor:m}),(0,i.jsx)(a.Z,{sx:w&&b?{width:"100%",display:"flex",justifyContent:"center",alignItems:"center",textAlign:"center",marginY:"10em"}:{width:{xs:"100%",md:"50%"},display:"flex",justifyContent:"left",alignItems:"center"},children:(0,i.jsx)(u,{title:g||"",content:p||"",buttons:f||[],hasVisibleImages:((null==d?void 0:null===(l=d.images)||void 0===l?void 0:l.filter(e=>!e.hidden&&e.url).length)||0)>0})})]})})})}},95985:function(e,r,t){t.r(r),t.d(r,{GivexLoyaltyApp:function(){return q}});var i=t(57437),o=t(2265),n=t(63582),s=t(46387),l=t(98489),a=t(63832),d=t(12713),c=t(23996),u=t(59832),x=t(62069),h=t(44811),m=t(73053),p=t(14759),g=t(94395),f=t(87061),v=t(69424),w=t(18620),b=t(34072),j=t(83257);let y=async(e,r,t)=>{let i={...e,captchaToken:t,merchantIdentifier:r},o="".concat(j.P0,"/").concat(r,"/register"),n=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});return await n.json()},Z=async(e,r,t)=>{let i={...e,captchaToken:t},o="".concat(j.P0,"/").concat(r,"/update-password"),n=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});return await n.json()},C=async(e,r,t)=>{let i={...e,captchaToken:t},o="".concat(j.P0,"/").concat(r,"/reset-password"),n=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});return await n.json()};var S=t(87925),P=e=>{let{onSwitchToRegister:r,onSwitchToDashboard:t,editorMode:l,onSwitchToForgotPassword:j}=e,[y,C]=(0,o.useState)({email:"",password:"",newPassword:"",confirmPassword:""}),[P,I]=(0,o.useState)(!1),[N,T]=(0,o.useState)(!1),[R,k]=(0,o.useState)(!1),[M,O]=(0,o.useState)(!1),[L,A]=(0,o.useState)({}),[W,E]=(0,o.useState)(!1),[H,F]=(0,o.useState)(null),z=o.useRef(null),{uniqueKey:D,login:U}=(0,f.U)(),{showNotification:q}=(0,S.l)(),B=e=>{let{name:r,value:t}=e.target;C({...y,[r]:t}),L[r]&&A(e=>{let t={...e};return delete t[r],t})},_=e=>{e.preventDefault()},G=y.newPassword.length>=8,Y=/[!@#$%^&*(),.?":{}|<>]/.test(y.newPassword),V=/\d/.test(y.newPassword),K=/[a-z]/.test(y.newPassword),$=/[A-Z]/.test(y.newPassword),J=()=>{let e={};return P?(y.newPassword||(e.newPassword="New password is required"),y.confirmPassword||(e.confirmPassword="Confirm password is required"),y.newPassword!==y.confirmPassword&&(e.confirmPassword="Passwords do not match"),w.BV.test(y.newPassword)||(e.newPassword="Password must be at least 8 characters, include a number and a symbol.")):(y.email||(e.email="Email is required"),y.password||(e.password="Password is required")),e},Q=e=>{F(e)},X=async()=>{let e=J();if(A(e),!(Object.keys(e).length>0)&&H){E(!0);try{let e=await Z({email:y.email,currentPassword:y.password,password:y.newPassword,confirmPassword:y.confirmPassword},D,H);e&&e.success?(q("Password updated successfully. Please log in with your new password.","success"),I(!1),C({email:y.email,password:"",newPassword:"",confirmPassword:""}),A({})):(q("Login failed: "+((null==e?void 0:e.errorMessage)||"Unknown error"),"error"),E(!1))}catch(e){q("Failed to update password. Please try again.","error")}finally{var r;null==z||null===(r=z.current)||void 0===r||r.reset(),E(!1),F(null)}}},ee=async e=>{var r,i;null==e||e.preventDefault();let o=J();if(A(o),Object.keys(o).length>0||!H)return;E(!0);let n=!1;try{let e=await U(y,D,H);if(e&&e.success){if(null===(r=e.result)||void 0===r?void 0:r.requiresPasswordChange){I(!0),q("You must change your temporary password before continuing.","warning"),E(!1);return}n=!0}else q("Login failed: "+((null==e?void 0:e.errorMessage)||"Unknown error"),"error"),E(!1)}catch(e){q("Login failed: "+e.message,"error")}finally{n||(null==z||null===(i=z.current)||void 0===i||i.reset(),E(!1),F(null))}n&&t&&t()};return P?(0,i.jsxs)(a.Z,{sx:{width:"100%",margin:"0 auto"},children:[(0,i.jsx)(s.Z,{variant:"h3",sx:{fontWeight:"bold",mb:4,textAlign:"center"},children:"Reset Account Password"}),(0,i.jsxs)(n.Z,{spacing:2,children:[(0,i.jsx)(d.Z,{label:"Enter New Password",name:"newPassword",type:R?"text":"password",fullWidth:!0,margin:"normal",value:y.newPassword,onChange:B,helperText:L.newPassword||"",error:!!L.newPassword,InputProps:{endAdornment:(0,i.jsx)(c.Z,{position:"end",children:(0,i.jsx)(u.Z,{"aria-label":"toggle new password visibility",onClick:()=>k(e=>!e),onMouseDown:_,edge:"end",children:R?(0,i.jsx)(p.Z,{}):(0,i.jsx)(g.Z,{})})})},sx:{"& .MuiOutlinedInput-root":{"&.Mui-focused fieldset :not(Mui-error) ":{borderColor:v.MN}}}}),(0,i.jsx)(d.Z,{label:"Re-Enter Password",name:"confirmPassword",type:M?"text":"password",fullWidth:!0,margin:"normal",value:y.confirmPassword,onChange:B,helperText:L.confirmPassword||"",error:!!L.confirmPassword,InputProps:{endAdornment:(0,i.jsx)(c.Z,{position:"end",children:(0,i.jsx)(u.Z,{"aria-label":"toggle confirm password visibility",onClick:()=>O(e=>!e),onMouseDown:_,edge:"end",children:M?(0,i.jsx)(p.Z,{}):(0,i.jsx)(g.Z,{})})})},sx:{"& .MuiOutlinedInput-root":{"&.Mui-focused fieldset :not(Mui-error) ":{borderColor:v.MN}}}})]}),(0,i.jsx)(x.ZP,{xs:12,sx:{my:2},children:!l&&(0,i.jsx)(b.Nc,{siteKey:"0x4AAAAAAB0gQ3-8KE5th5Xb",ref:z,onSuccess:Q,options:{theme:"light",size:"normal"}})}),(0,i.jsx)(n.Z,{spacing:2,children:(0,i.jsx)(h.Z,{type:"button",variant:"contained",fullWidth:!0,onClick:X,sx:{textTransform:"none",fontWeight:"bold"},children:W?(0,i.jsx)(m.Z,{size:24,color:"inherit"}):"Update Password"})}),(0,i.jsxs)(a.Z,{sx:{mt:3},children:[(0,i.jsx)(s.Z,{variant:"body1",sx:{fontWeight:"bold",mb:2},children:"Your password must contain"}),(0,i.jsxs)(n.Z,{spacing:1,children:[(0,i.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,i.jsx)(s.Z,{sx:{color:G?"#10B981":"#EF4444",fontWeight:"bold"},children:G?"â":"â"}),(0,i.jsx)(s.Z,{variant:"body2",children:"Minimum 8 characters in length"})]}),(0,i.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,i.jsx)(s.Z,{sx:{color:Y?"#10B981":"#EF4444",fontWeight:"bold"},children:Y?"â":"â"}),(0,i.jsx)(s.Z,{variant:"body2",children:"One special character (example: #&!?)"})]}),(0,i.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,i.jsx)(s.Z,{sx:{color:V?"#10B981":"#EF4444",fontWeight:"bold"},children:V?"â":"â"}),(0,i.jsx)(s.Z,{variant:"body2",children:"One number"})]}),(0,i.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,i.jsx)(s.Z,{sx:{color:K?"#10B981":"#EF4444",fontWeight:"bold"},children:K?"â":"â"}),(0,i.jsx)(s.Z,{variant:"body2",children:"One lower case letter"})]}),(0,i.jsxs)(a.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,i.jsx)(s.Z,{sx:{color:$?"#10B981":"#EF4444",fontWeight:"bold"},children:$?"â":"â"}),(0,i.jsx)(s.Z,{variant:"body2",children:"One upper case letter"})]})]})]})]}):(0,i.jsxs)(a.Z,{component:"form",onSubmit:ee,sx:{width:"100%",margin:"0 auto"},children:[(0,i.jsxs)(n.Z,{spacing:2,children:[(0,i.jsx)(n.Z,{direction:"row",spacing:2,children:(0,i.jsx)(d.Z,{label:"Email",n
1ame:"email",fullWidth:!0,margin:"normal",value:y.email,onChange:B,helperText:L.email||"",error:!!L.email})}),(0,i.jsx)(n.Z,{direction:"row",spacing:2,children:(0,i.jsx)(d.Z,{label:"Password",name:"password",type:N?"text":"password",fullWidth:!0,margin:"normal",value:y.password,onChange:B,helperText:L.password||"",error:!!L.password,InputProps:{endAdornment:(0,i.jsx)(c.Z,{position:"end",children:(0,i.jsx)(u.Z,{"aria-label":"toggle password visibility",onClick:()=>T(e=>!e),onMouseDown:_,edge:"end",children:N?(0,i.jsx)(p.Z,{}):(0,i.jsx)(g.Z,{})})})}})})]}),(0,i.jsx)(x.ZP,{xs:12,sx:{my:2},children:!l&&(0,i.jsx)(b.Nc,{siteKey:"0x4AAAAAAB0gQ3-8KE5th5Xb",ref:z,onSuccess:Q,options:{theme:"light",size:"normal"}})}),(0,i.jsx)(n.Z,{spacing:2,children:(0,i.jsx)(h.Z,{type:"submit",variant:"contained",fullWidth:!0,disabled:W||!H,sx:{textTransform:"none",fontWeight:"bold"},children:W?(0,i.jsx)(m.Z,{size:24,color:"inherit"}):"Log In"})}),(0,i.jsxs)(n.Z,{spacing:2,mt:3,alignItems:"center",children:[(0,i.jsx)(s.Z,{variant:"body1",onClick:j,sx:{fontWeight:"bold",cursor:"pointer"},children:"Forgot password"}),(0,i.jsxs)(s.Z,{variant:"body1",children:["Don't have an account?"," ",(0,i.jsx)("span",{onClick:r,style:{fontWeight:"bold",cursor:"pointer"},children:"Register"})]})]})]})},I=t(85860),N=t(11953),T=t(18856),R=t(56982),k=t(20816),M=t(71096),O=t.n(M),L=e=>{let{setCurrentView:r,editorMode:t,onSwitchToLogin:l,onSwitchToDashboard:c,onSwitchToThanksPage:u,onSwitchToTerms:x}=e,[p,g]=o.useState({firstName:"",lastName:"",email:"",phoneNumber:"",birthday:"",promotionOptIn:!1,termsAccepted:!1}),[v,w]=o.useState(!1),[j,Z]=(0,o.useState)(null),C=o.useRef(null),{uniqueKey:P}=(0,f.U)(),{showNotification:M}=(0,S.l)(),[L,A]=o.useState({}),W=e=>{let{name:r,value:t,type:i,checked:o}=e.target;g({...p,[r]:"checkbox"===i?o:t}),L[r]&&A(e=>{let t={...e};return delete t[r],t})},E=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,H=/^[a-zA-Z\s'-]+$/,F=/^\+[1-9]\d{0,14}$/,z=()=>{let e={};if(p.firstName.trim()?H.test(p.firstName)||(e.firstName="Name must not contain special symbols."):e.firstName="First name is required.",p.lastName.trim()?H.test(p.lastName)||(e.lastName="Name must not contain special symbols."):e.lastName="Last name is required.",p.email.trim()?E.test(p.email)||(e.email="Please enter a valid email address."):e.email="Email is required.",p.phoneNumber&&p.phoneNumber.trim()){let r=p.phoneNumber.replace(/[^\d+]/g,"");F.test(r)||(e.phoneNumber="Enter a valid phone number.")}else e.phoneNumber="Phone number is required.";return p.termsAccepted||(e.termsAccepted="You must agree to the Terms of Use."),e},D=async()=>{let e=z();if(A(e),Object.keys(e).length>0){M("Please fix the errors above.","error");return}if(j){w(!0);try{let e=p.phoneNumber.replace(/[^\d+]/g,""),r={firstName:p.firstName,lastName:p.lastName,email:p.email,phone:e,birthDate:p.birthday||void 0,promotionOptIn:p.promotionOptIn}
1,t=await y(r,P||"",j||"");console.log("Registration result:",t),t.success?(M("Registration successful!","success"),setTimeout(()=>{u&&u()},1200)):M(t.errorMessage||"Registration failed.","error")}catch(e){console.error("Registration error:",e),M("Network error. Please try again.","error")}finally{var r;null==C||null===(r=C.current)||void 0===r||r.reset(),w(!1),Z(null)}}};return(0,i.jsxs)(a.Z,{sx:{width:"100%",margin:"0 auto"},children:[(0,i.jsx)(s.Z,{variant:"h3",align:"left",fontWeight:"bold",gutterBottom:!0,sx:{marginBottom:4},children:"Register"}),(0,i.jsxs)(n.Z,{spacing:2,children:[(0,i.jsx)(d.Z,{label:"First Name*",name:"firstName",value:p.firstName,onChange:W,fullWidth:!0,error:!!L.firstName,helperText:L.firstName}),(0,i.jsx)(d.Z,{label:"Last Name*",name:"lastName",value:p.lastName,onChange:W,fullWidth:!0,error:!!L.lastName,helperText:L.lastName}),(0,i.jsx)(d.Z,{label:"Email*",name:"email",value:p.email,onChange:W,fullWidth:!0,error:!!L.email,helperText:L.email}),(0,i.jsx)(R.Kr,{label:"Phone Number*",value:p.phoneNumber,onChange:(e,r)=>{g(r=>({...r,phoneNumber:e})),L.phoneNumber&&A(e=>{let r={...e};return delete r.phoneNumber,r})},defaultCountry:"US",preferredCountries:["US","CA"],fullWidth:!0,name:"phoneNumber",id:"phone",autoComplete:"tel",error:!!L.phoneNumber,helperText:L.phoneNumber,sx:{"& input":{fontSize:".9rem"}}}),(0,i.jsx)(k.M,{label:"Birthday",name:"birthday",value:p.birthday?O()(p.birthday):null,onChange:e=>{g(r=>({...r,birthday:e?e.format("YYYY-MM-DD"):""})),L.birthday&&A(e=>{let r={...e};return delete r.birthday,r})},slotProps:{textField:{fullWidth:!0,error:!!L.birthday,helperText:L.birthday}}}),(0,i.jsx)(I.Z,{control:(0,i.jsx)(N.Z,{name:"promotionOptIn",checked:p.promotionOptIn,onChange:W,color:"primary"}),label:(0,i.jsx)(s.Z,{variant:"body1",children:"I would like to be contacted in the future regarding gift card promotions and/or other special offers via email"})}),(0,i.jsx)(I.Z,{control:(0,i.jsx)(N.Z,{name:"termsAccepted",checked:p.termsAccepted,onChange:W,color:"primary"}),label:(0,i.jsxs)(s.Z,{variant:"body1",children:["I agree to the"," ",(0,i.jsx)(T.Z,{onClick:x,sx:{cursor:"pointer"},children:"Terms of Use"})]})}),L.termsAccepted&&(0,i.jsx)(s.Z,{color:"error",variant:"body1",sx:{ml:2},children:L.termsAccepted}),!t&&(0,i.jsx)(a.Z,{children:(0,i.jsx)(b.Nc,{siteKey:"0x4AAAAAAB0gQ3-8KE5th5Xb",ref:C,onSuccess:e=>{Z(e)},options:{theme:"light",size:"normal"}})}),(0,i.jsx)(h.Z,{type:"button",variant:"contained",color:"primary",onClick:D,disabled:v||!j,fullWidth:!0,children:v?(0,i.jsx)(m.Z,{size:24,color:"inherit"}):"Register"}),(0,i.jsxs)(s.Z,{variant:"body1",align:"center",children:["Already Registered?"," ",(0,i.jsx)("span",{onClick:l,style:{fontWeight:"bold",cursor:"pointer"},children:"Login"})]})]})]})};let A=e=>{let{width:r=64,height:t=64}=e;return(0,i.jsxs)("svg",{width:r,height:t,viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)("path",{d:"M32 0C14.3584 0 0 14.3486 0 32C0 49.6514 14.3486 64 32 64C49.6514 64 64 49.6514 64 32C64 14.3486 49.6514 0 32 0ZM32 63.0012C14.9023 63.0012 0.988875 49.0877 0.988875 31.9901C0.988875 14.8924 14.9023 0.978976 32 0.978976C49.0976 0.978976 63.0111 14.8924 63.0111 31.9901C63.0111 49.0877 49.0976 63.0012 32 63.0012Z",fill:"#090304"}),(0,i.jsx)("path",{d:"M32.0003 6.32812C17.8396 6.32812 6.3291 17.8485 6.3291 31.9993C6.3291 46.1501 17.8495 57.6705 32.0003 57.6705C46.1511 57.6705 57.6715 46.1501 57.6715 31.9993C57.6715 17.8485 46.1511 6.32812 32.0003 6.32812ZM32.0003 56.6816C18.3934 56.6816 7.31798 45.6062 7.31798 31.9993C7.31798 30.16 7.52565 28.3602 7.91131 26.6297C11.9756 17.354 21.2215 10.867 32.0003 10.867C42.779 10.867 52.025 17.354 56.0893 26.6297C56.4749 28.3602 56.6826 30.1501 56.6826 31.9993C56.6826 45.6062 45.6072 56.6816 32.0003 56.6816Z",fill:"#090304"}),(0,i.jsx)("path",{d:"M29.5972 38.8337L22.4179 31.6545L21.7158 32.3467L29.5972 40.228L45.1818 24.6532L44.4797 23.9512L29.5972 38.8337Z",fill:"#090304"})]})};function W(e){let{onSwitchToLogin:r}=e;return(0,i.jsx)(a.Z,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"10vh",sx:{textAlign:"center",p:4},children:(0,i.jsxs)(n.Z,{spacing:3,alignItems:"center",children:[(0,i.jsx)(a.Z,{sx:{"& svg path":{fill:"currentColor"},color:"text.primary"},children:(0,i.jsx)(A,{width:80,height:80})}),(0,i.jsx)(s.Z,{variant:"h4",fontWeight:700,gutterBottom:!0,children:"Thanks for registering!"}),(0,i.jsx)(s.Z,{variant:"body1",gutterBottom:!0,children:"Check your email for your temporary password to login."})]})})}var E=t(99583);function H(e){let{onSwitchToRegister:r,data:t}=e;return(0,i.jsx)(a.Z,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"10vh",sx:{textAlign:"center",p:4},children:(0,i.jsxs)(n.Z,{spacing:2,children:[(0,i.jsx)(s.Z,{variant:"h4",align:"center",fontWeight:700,color:"#1a202c",gutterBottom:!0,children:"Merchant Loyalty Terms and Conditions"}),(0,i.jsx)(s.Z,{variant:"body1",component:"div",textAlign:"justify",dangerouslySetInnerHTML:{__html:(0,E.Z)((null==t?void 0:t.termsAndConditions)||"By enrolling in this loyalty program, customers agree to re
1ceive rewards and promotional offers based on their purchases and engagement with the participating merchant. Points or rewards earned are non-transferable, have no cash value, and may be subject to expiration or change at the merchant's discretion. The merchant reserves the right to modify or terminate the program at any time without prior notice. Misuse of the program or fraudulent activity may result in the forfeiture of rewards and removal from the program. Participation constitutes acceptance of these terms and any future updates.")||""}}),(0,i.jsx)(s.Z,{children:(0,i.jsx)(T.Z,{sx:{cursor:"pointer"},onClick:r,children:"< Back"})})]})})}var F=t(3853),z=e=>{let{setCurrentView:r,editorMode:t,onSwitchToLogin:l,onSwitchToDashboard:c,onSwitchToThanksPage:u,onSwitchToTerms:p}=e,[g,w]=(0,o.useState)(""),[j,y]=(0,o.useState)({}),[Z,S]=(0,o.useState)(!1),[P,I]=(0,o.useState)(!1),[N,T]=(0,o.useState)(null),[R,k]=(0,o.useState)(null),M=o.useRef(null),{uniqueKey:O}=(0,f.U)(),L=()=>{let e={};return g||(e.email="Email is required"),e},A=async e=>{e&&e.preventDefault();let r=L();if(y(r),!(Object.keys(r).length>0)){if(!R)return;S(!0),T(null);try{let e=await C({email:g},O||"",R||"");(null==e?void 0:e.success)&&(null==e?void 0:e.result)?(I(!0),T("Thank You. If this email is linked to an account, a temporary password will be sent to you.")):T("Failed to send reset instructions: "+((null==e?void 0:e.errorMessage)||"Unknown error"))}catch(e){console.error("Reset password failed:",e),T("Failed to send reset instructions. Please try again.")}finally{var t;null==M||null===(t=M.current)||void 0===t||t.reset(),S(!1),k(null)}}};return P?(0,i.jsxs)(a.Z,{textAlign:"center",py:4,children:[(0,i.jsx)(s.Z,{variant:"h4",align:"center",gutterBottom:!0,fontWeight:700,color:"#1a202c",children:"Forgot Password"}),(0,i.jsx)(s.Z,{color:"success.main",fontWeight:500,mb:2,children:N}),(0,i.jsx)(s.Z,{variant:"body1",align:"center",children:(0,i.jsx)("a",{onClick:l,style:{color:v.MN,fontWeight:600,textDecoration:"underline",cursor:"pointer"},children:"â Back to Login"})})]}):(0,i.jsx)(a.Z,{component:"form",onSubmit:A,sx:{width:"100%"},children:(0,i.jsxs)(x.ZP,{container:!0,spacing:3,children:[(0,i.jsx)(x.ZP,{xs:12,children:(0,i.jsx)(s.Z,{variant:"body1",align:"left",gutterBottom:!0,children:"Enter your email address and we'll send you instructions."})}),(0,i.jsx)(x.ZP,{xs:12,sx:{mb:2},children:(0,i.jsx)(d.Z,{fullWidth:!0,name:"email",label:"Email",type:"email",value:g,onChange:e=>{w(e.target.value),j.email&&y(e=>{let r={...e};return delete r.email,r})},onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),A())},helperText:j.email||"",error:!!j.email,sx:{backgroundColor:"#FFFFFF","& .MuiOutlinedInput-root":{"&.Mui-focused fieldset:not(Mui-error)":{borderColor:"#1a73e8"}}}})}),(0,i.jsx)(x.ZP,{xs:12,sx:{mb:2},children:(0,i.jsxs)(n.Z,{spacing:2,children:[!t&&(0,i.jsx)(a.Z,{children:(0,i.jsx)(b.Nc,{siteKey:"0x4AAAAAAB0gQ3-8KE5th5Xb",ref:M,onSuccess:e=>{k(e)},options:{theme:"light",size:"normal"}})}),(0,i.jsx)(h.Z,{type:"button",variant:"contained",color:"primary",onClick:A,disabled:Z||!R,children:Z?(0,i.jsx)(m.Z,{size:24,color:"inherit"}):"Send Reset Instructions"}),(0,i.jsx)(h.Z,{type:"button",variant:"contained",color:"primary",disabled:Z,onClick:l,children:Z?(0,i.jsx)(m.Z,{size:24,color:"inherit"}):"Switch to Login"})]})}),(0,i.jsx)(x.ZP,{xs:12,children:N&&(0,i.jsx)(s.Z,{variant:"body1",color:P?"success.main":"error",align:"center",children:N})})]})})},D=t(99376),U=e=>{let{section:r,editorMode:t,title:d}=e,{setMerchantData:c,getUserInfo:u,uniqueKey:x,merchantData:h}=(0,f.U)(),[m,p]=(0,o.useState)("login"),[g,v]=(0,o.useState)(!0),[w,b]=(0,o.useState)(!1),[j,y]=(0,o.useState)(null),Z=(0,D.useRouter)();return((0,o.useEffect)(()=>{if(w||!x)return;let e=!1;return v(!0),(async()=>{try{let r=(0,F.o)(x).then(r=>{e||y(r),r&&r.result&&c(r.result)}),t=u(x).then(e=>{e?Z.push("/loyalty-dashboard"):p("login")});await Promise.all([r,t])}catch(e){}finally{e||(v(!1),b(!0))}})(),()=>{e=!0}},[]),g||null===m)?(0,i.jsx)(n.Z,{alignItems:"center",justifyContent:"center",minHeight:300,children:(0,i.jsx)(s.Z,{variant:"h6",children:"Loading..."})}):(0,i.jsx)(n.Z,{id:"GivexLoyaltyApp-"+(null==r?void 0:r.position),className:"scroll-to",paddingBottom:16,paddingTop:"dashboard"===m?0:16,sx:{opacity:(null==r?void 0:r.visible)?"1":"0.2",pointerEvents:t?"none":"auto"},children:(0,i.jsx)(l.Z,{children:(0,i.jsx)(n.Z,{gap:8,sx:{flexDirection:{xs:"column",alignContent:"center",alignItems:"center"}},children:(0,i.jsxs)(a.Z,{sx:{width:{xs:"100%",maxWidth:"dashboard"===m?"100%":500}},children:["login"===m&&(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(P,{editorMode:t,onSwitchToRegister:()=>p("register"),onSwitchToDashboard:()=>{window.location.href="/loyalty-dashboard"},onSwitchToForgotPassword:()=>p("forgotPassword")})}),"register"===m&&(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(L,{setCurrentView:p,editorMode:t,onSwitchToLogin:()=>p("login"),onSwitchToDashboard:()=>{window.location.href="/loyalty-dashboard"},onSwitchToThanksPage:()=>p("thanks"),onSwitchToTerms:()=>p("terms")})}),"forgotPassword"===m&&(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(z,{setCurrentView:p,editorMode:t,onSwitchToLogin:()=>p("login")})}),"thanks"===m&&(0,i.jsx)(W,{onSwitchToLogin:()=>p("login")}),"terms"===m&&(0,i.jsx)(H,{data:h,onSwitchToRegister:()=>p("register")})]})})})})};let q=e=>{let{section:r,editorMode:t,data:o}=e,n=null==r?void 0:r.title;return!!r&&(!!t||null!=r&&!!r.visible)&&(0,i.jsx)(S.NotificationProvider,{children:(0,i.jsx)(U,{section:r,editorMode:null!=t&&t,title:null!=n?n:""})})}},76084:function(e,r,t){t.d(r,{DashboardContent:function(){return eu}});var i=t(57437),o=t(87061),n=t(2265),s=t(63582),l=t(46387),a=t(98489),d=t(63832),c=t(99962),u=t(28450),x=t(8350),h=t(35791),m=t(79507),p=t(59832),g=t(77468),f=t(44811),v=t(81705);let w=!1,b=e=>{w=e},j=()=>w;var y=e=>{var r,t;let{currentTab:o,onSwitchToOverview:s,onSwitchToAccountSettings:a,onSwitchToSecuritySettings:w,scheme:y}
1=e,[Z,C]=(0,n.useState)(!1),[S,P]=(0,n.useState)(null),I=(e,r)=>{j()?(e.preventDefault(),P(()=>r),C(!0)):null==r||r()},N=()=>{C(!1),P(null)},T=null==y?void 0:null===(t=y.styling)||void 0===t?void 0:null===(r=t.themeColors)||void 0===r?void 0:r.backgroundColor;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(c.Z,{value:o,centered:!0,children:[(0,i.jsx)(u.Z,{label:"Overview",value:"overview",onClick:e=>I(e,s)}),(0,i.jsx)(u.Z,{label:"Account",value:"account-settings",onClick:e=>I(e,a)}),(0,i.jsx)(u.Z,{label:"Security",value:"security-settings",onClick:e=>I(e,w)})]}),(0,i.jsx)(x.Z,{sx:{mb:2}}),(0,i.jsxs)(h.Z,{open:Z,onClose:N,PaperProps:{sx:{backgroundColor:T,width:380,borderRadius:"8px",border:"1px solid #E0E0E0",p:2}},children:[(0,i.jsxs)(m.Z,{sx:{fontWeight:400,fontSize:"1.15rem",p:"0px 16px 12px 16px",m:"0 -16px",mb:3,display:"flex",alignItems:"center",justifyContent:"space-between",borderBottom:"1px solid #E5E5E5",pb:1.5},children:["Confirm",(0,i.jsx)(p.Z,{sx:{position:"absolute",right:8,top:8},onClick:N,children:(0,i.jsx)(v.Z,{})})]}),(0,i.jsxs)(g.Z,{sx:{p:0},children:[(0,i.jsx)(l.Z,{sx:{textAlign:"center",mb:1},children:"Are you sure you want to navigate away?"}),(0,i.jsx)(l.Z,{sx:{textAlign:"center",mb:3,opacity:.6},children:"You will lose unsaved changes"}),(0,i.jsxs)(d.Z,{mt:1,display:"flex",gap:2,children:[(0,i.jsx)(f.Z,{variant:"contained",fullWidth:!0,sx:{borderRadius:"4px",textTransform:"uppercase"},onClick:N,children:"No"}),(0,i.jsx)(f.Z,{variant:"contained",fullWidth:!0,sx:{borderRadius:"4px",textTransform:"uppercase"},onClick:()=>{b(!1),C(!1),null==S||S(),P(null)},children:"Yes"})]})]})]})]})},Z=t(73053),C=t(31691),S=t(17150),P=t(30328),I=t(4117),N=t(5460),T=e=>{var r,t,o,s,a,c,u,x;let{pointsBalance:h,redeemableRewards:m,scheme:g,roundcorner:v}=e,w=(0,C.Z)(),b=(0,S.Z)(w.breakpoints.down("sm")),j=b?160:175,y=b?20:30,Z=null==g?void 0:null===(t=g.styling)||void 0===t?void 0:null===(r=t.themeColors)||void 0===r?void 0:r.backgroundColor,T=null==g?void 0:null===(s=g.styling)||void 0===s?void 0:null===(o=s.buttonStyles)||void 0===o?void 0:o.buttonColor,R=null==g?void 0:null===(c=g.styling)||void 0===c?void 0:null===(a=c.buttonStyles)||void 0===a?void 0:a.buttonTextColor,k=null==g?void 0:null===(x=g.styling)||void 0===x?void 0:null===(u=x.themeColors)||void 0===u?void 0:u.fontColor,M=(0,N.s9)(g)?"rgba(255, 255, 255, 0.12)":"rgba(0, 0, 0, 0.04)",O=(0,N.s9)(g)?Z:R,L=(0,n.useRef)(null),A=(0,n.useRef)(null),W=(0,n.useRef)(null),[E,H]=(0,n.useState)(!1),[F,z]=(0,n.useState)(!1),[D,U]=(0,n.useState)(0),[q,B]=(0,n.useState)(!1),[_,G]=(0,n.useState)(!1),[Y,V]=(0,n.useState)(0),K=(0,n.useMemo)(()=>{let e=m.length;return 48+e*j+(e-1)*y},[m.length,j,y]),$=(0,n.useMemo)(()=>e=>{let r=m.length;if(1===r)return 24+j/2;let t=K-48-j;return 24+j/2+t*e/(r-1)},[K,m.length,j]),J=()=>{let e=A.current,r=L.current;e&&r&&(U(r.clientWidth),B(e.scrollLeft>1),G(e.scrollLeft+e.clientWidth<e.scrollWidth-1))};(0,n.useLayoutEffect)(()=>{var e;J();let r=new ResizeObserver(()=>J());L.current&&r.observe(L.current),A.current&&r.observe(A.current);let t=()=>J();return null===(e=A.current)||void 0===e||e.addEventListener("scroll",t),()=>{var e;r.disconnect(),null===(e=A.current)||void 0===e||e.removeEventListener("scroll",t)}},[]),(0,n.useLayoutEffect)(()=>{if(b||!A.current||!L.current)return;let e=m.findIndex(e=>h<e.pointsRequired);if(-1===e||0===e)return;let r=$(e)-.7*L.current.clientWidth;setTimeout(()=>{var e;null===(e=A.current)||void 0===e||e.scrollTo({left:Math.max(0,r),behavior:"smooth"})},100)},[m,h,b,$,D]),(0,n.useLayoutEffect)(()=>{b&&W.current&&W.current.scrollHeight>400?z(!0):z(!1)},[b,m]),(0,n.useLayoutEffect)(()=>{if(!b||!W.current)return;let e=m.findIndex(e=>h<e.pointsRequired),r=-1===e?m.length-1:Math.max(e-1,0),t=W.current.querySelectorAll(".reward-row")[r];t instanceof HTMLElement?V(t.offsetTop+t.offsetHeight/2):V(0)},[b,h,m,E]);let Q=(0,n.useMemo)(()=>{var e,r,t,i,o,n,s,l,a;let d=null==m?void 0:m.length;if(!d||0===d)return 0;let c=null!==(t=null===(e=m[0])||void 0===e?void 0:e.pointsRequired)&&void 0!==t?t:0,u=null!==(i=null===(r=m[d-1])||void 0===r?void 0:r.pointsRequired)&&void 0!==i?i:0,x=$(0)-24,p=$(d-1)-24;if(h<c)return 0===c?0:h/c*x;if(h>=u)return p;if(1===d)return x;for(let e=0;e<d-1;e++)if(h<(null===(o=m[e+1])||void 0===o?void 0:o.pointsRequired)){let r=null!==(l=null===(n=m[e])||void 0===n?void 0:n.pointsRequired)&&void 0!==l?l:0,t=null!==(a=null===(s=m[e+1])||void 0===s?void 0:s.pointsRequired)&&void 0!==a?a:r,i=t===r?1:(h-r)/(t-r),o=$(e)-24;return o+i*($(e+1)-24-o)}return 0},[h,m,$]),X=e=>{let r=A.current;if(!r)return;let t=.8*D;r.scrollTo({left:"left"===e?r.scrollLeft-t:r.scrollLeft+t,behavior:"smooth"})},ee=m.length>0;return b?(0,i.jsxs)(d.Z,{sx:{backgroundColor:O,border:"1px solid ".concat(k),borderRadius:v?"20px":"0px",p:2,boxShadow:0,mx:"auto",my:3},children:[(0,i.jsxs)(d.Z,{sx:{display:"flex",alignItems:"center",gap:1.2,mb:1.5},children:[(0,i.jsx)(d.Z,{component:"img",src:"images/icons/loyalty_points_icon.svg",alt:"Loyalty Badge",sx:{width:28,height:28}}),(0,i.jsx)(l.Z,{variant:"h5",sx:{fontWeight:600},children:"Your Points Balance"})]}),(0,i.jsx)(l.Z,{variant:"h4",sx:{fontWeight:700,mb:2}
1,children:h.toLocaleString()}),ee&&(0,i.jsxs)(d.Z,{ref:W,sx:{position:"relative",maxHeight:E?"none":"400px",overflow:"hidden",pl:0,transition:"max-height 0.3s ease"},children:[(0,i.jsx)(d.Z,{sx:{position:"absolute",left:"5px",top:0,width:6,height:"100%",borderRadius:3,bgcolor:M}}),(0,i.jsx)(d.Z,{sx:{position:"absolute",left:"5px",top:0,width:6,height:"".concat(Y,"px"),borderRadius:3,bgcolor:T,transition:"height 0.4s ease"}}),(0,i.jsx)(d.Z,{sx:{display:"flex",flexDirection:"column",gap:3,position:"relative",zIndex:2},children:m.map((e,r)=>{let t=h>=e.pointsRequired;return(0,i.jsxs)(d.Z,{className:"reward-row",sx:{display:"flex",alignItems:"center",gap:2,position:"relative"},children:[(0,i.jsx)(d.Z,{sx:{width:16,height:16,borderRadius:"50%",backgroundColor:O,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,mt:"2px"},children:(0,i.jsx)(d.Z,{sx:{width:5,height:5,borderRadius:"50%",boxShadow:"0 0 0 3px ".concat(M),border:"2px solid ".concat(T)}})}),(0,i.jsxs)(d.Z,{sx:{flex:1,minWidth:0,bgcolor:t?T:M,color:t?R:k,borderRadius:"8px",px:1.5,py:.8,boxShadow:t?"0 2px 6px rgba(0,0,0,0.12)":"0 1px 2px rgba(0,0,0,0.05)",display:"flex",justifyContent:"space-between",alignItems:"center",textAlign:"left"},children:[(0,i.jsx)(l.Z,{variant:"body2",sx:{fontWeight:800,lineHeight:1.25,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",minWidth:0,pr:1},children:e.rewardName}),(0,i.jsxs)(l.Z,{variant:"caption",sx:{opacity:.9,fontWeight:600,flexShrink:0},children:[e.pointsRequired.toLocaleString()," pts"]})]})]},e.rewardId||"r-".concat(r))})})]}),ee&&F&&(0,i.jsx)(d.Z,{textAlign:"left",mt:1.5,children:(0,i.jsx)(f.Z,{onClick:()=>H(e=>!e),sx:{color:R,textTransform:"none",fontSize:"0.875rem",fontWeight:600,paddingX:1,minWidth:"auto"},children:E?"Show Less":"Show More"})})]}):(0,i.jsxs)(d.Z,{sx:{backgroundColor:O,border:"1px solid ".concat(k),borderRadius:v?"30px":"0px",p:{xs:2,sm:3},boxShadow:0,maxWidth:"1200px",mx:"auto",my:4},children:[(0,i.jsx)(l.Z,{variant:"h5",sx:{fontWeight:600,mb:3},children:"Your Points Balance"}),(0,i.jsxs)(d.Z,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},alignItems:{xs:"flex-start",md:"center"},gap:{xs:3,md:5}},children:[(0,i.jsxs)(d.Z,{sx:{flex:{xs:"1 1 auto",md:"0 0 200px"},display:"flex",alignItems:"center",justifyContent:"flex-start",gap:2,width:"100%"},children:[(0,i.jsx)(d.Z,{component:"img",src:"images/icons/loyalty_points_icon.svg",alt:"Loyalty Badge",sx:{width:{xs:64,sm:84},height:{xs:64,sm:84},flexShrink:0}}),(0,i.jsx)(d.Z,{sx:{textAlign:"left"},children:(0,i.jsx)(l.Z,{variant:"h4",sx:{fontWeight:700,lineHeight:1.1},children:h.toLocaleString()})})]}),ee&&(0,i.jsxs)(d.Z,{ref:L,sx:{position:"relative",flex:1,width:"100%",overflow:"hidden",py:1,px:"50px",mt:"-15px"},children:[q&&(0,i.jsx)(p.Z,{onClick:()=>X("left"),sx:{position:"absolute",left:0,top:"50%",transform:"translateY(-50%)",zIndex:3,"&:hover":{bgcolor:"#E7EAF0"}},children:(0,i.jsx)(P.Z,{})}),_&&(0,i.jsx)(p.Z,{onClick:()=>X("right"),sx:{position:"absolute",right:0,top:"50%",transform:"translateY(-50%)",zIndex:3,"&:hover":{bgcolor:"#E7EAF0"}},children:(0,i.jsx)(I.Z,{})}),(0,i.jsx)(d.Z,{ref:A,sx:{overflow:"hidden",position:"relative",width:"100%",pt:"26px",pb:0},children:(0,i.jsxs)(d.Z,{sx:{position:"relative",width:"".concat(K,"px"),height:"110px"},children:[m.map((e,r)=>{let t=Math.round($(r)-j/2),o=h>=e.pointsRequired;return(0,i.jsxs)(d.Z,{sx:{position:"absolute",bottom:59,left:t,width:j,height:75,bgcolor:o?T:M,color:o?R:k,borderRadius:"8px",textAlign:"center",px:1,py:1,display:"flex",flexDirection:"column"},children:[(0,i.jsx)(d.Z,{sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"},children:(0,i.jsx)(l.Z,{variant:"body2",sx:{fontWeight:800,lineHeight:1.25,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:e.rewardName})}),(0,i.jsxs)(l.Z,{variant:"caption",sx:{opacity:.95,flexShrink:0},children:[e.pointsRequired.toLocaleString()," pts"]})]},e.rewardId||"r-".concat(r))}),(0,i.jsx)(d.Z,{sx:{position:"absolute",left:24,right:24,bottom:36,height:6,borderRadius:3,bgcolor:M}}),(0,i.jsx)(d.Z,{sx:{position:"absolute",left:24,bottom:36,height:6,borderRadius:3,bgcolor:T,width:"".concat(Q,"px")}}),m.map((e,r)=>{let t=$(r);return m[r].pointsRequired,(0,i.jsx)(d.Z,{sx:{position:"absolute",bottom:29,left:Math.round(t-8)-2.5,width:21,height:21,borderRadius:"50%",backgroundColor:O,display:"flex",alignItems:"center",justifyContent:"center"},children:(0,i.jsx)(d.Z,{sx:{width:5,height:5,borderRadius:"50%",boxShadow:"0 0 0 3px ".concat(M),border:"2px s
1olid ".concat(T)}})},"dot-".concat(r))})]})})]})]})]})},R=t(45841),k=t(36137),M=t(41761),O=e=>{let{open:r,onClose:t,reward:o,themeColors:n,roundcorner:s}=e;if(!o)return null;let{backgroundColor:a,backgroundColor2:c,buttonColor:u,buttonTextColor:x,fontColor:m,isDark:f}=n,w="string"==typeof o.rewardDescription?o.rewardDescription.trim():String(o.rewardDescription||"").trim(),b=o.expiryDate?new Date(o.expiryDate).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}):null;return(0,i.jsxs)(h.Z,{open:r,onClose:t,maxWidth:"xs",fullWidth:!0,PaperProps:{sx:{borderRadius:"16px",overflow:"hidden",boxShadow:"0 2px 10px rgba(0,0,0,0.1)"}},children:[(0,i.jsx)(d.Z,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"center",p:1.2,bgcolor:a},children:(0,i.jsx)(p.Z,{onClick:t,sx:{width:32,height:32},children:(0,i.jsx)(v.Z,{sx:{fontSize:18,color:m}})})}),(0,i.jsxs)(g.Z,{sx:{px:3,pt:3,pb:4,textAlign:"center",bgcolor:a},children:[o.rewardImageUrl&&""!==o.rewardImageUrl.trim()?(0,i.jsx)(d.Z,{component:"img",src:o.rewardImageUrl,alt:o.rewardName||"Reward image",sx:{width:"100%",maxWidth:"200px",borderRadius:s?"8px":"0px",objectFit:"cover",mb:3,mx:"auto",display:"block"}}):(0,i.jsx)(d.Z,{component:"img",src:"images/icons/default_reward_icon.svg",alt:"Reward icon",sx:{width:"100%",maxWidth:"200px",borderRadius:s?"8px":"0px",objectFit:"cover",mb:3,mx:"auto",display:"block",filter:f?"brightness(0) invert(1)":"none"}}),(0,i.jsx)(l.Z,{variant:"h6",sx:{fontWeight:600,color:m,mb:.5,fontSize:"1.1rem"},children:o.rewardName}),null!==o.pointsRequired&&void 0!==o.pointsRequired&&(0,i.jsxs)(l.Z,{variant:"body2",sx:{color:m,fontWeight:600,mb:.5},children:[o.pointsRequired.toLocaleString()," pts"]}),b&&(0,i.jsxs)(l.Z,{variant:"body2",sx:{color:m,fontSize:"0.85rem",mb:2.5},children:["Exp ",b]}),(0,i.jsx)(l.Z,{variant:"body2",sx:{color:m,fontSize:"0.9rem",lineHeight:1.7,textAlign:"center"},children:w&&"null"!==w?w:"No description available for this reward."})]})]})};let L=e=>{let{title:r,rewards:t,isMobile:o,isComplimentary:n,onOpenModal:s,themeColors:a,roundcorner:c}=e,{backgroundColor:u,backgroundColor2:x,buttonColor:h,buttonTextColor:m,fontColor:p,isDark:g}=a;return(0,i.jsxs)(d.Z,{sx:{mb:3},children:[(0,i.jsx)(l.Z,{variant:"subtitle2",sx:{fontWeight:600,mb:1.5},children:r}),!o&&n?(0,i.jsx)(d.Z,{sx:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:2.5},children:t.map(e=>{var r;return(0,i.jsxs)(d.Z,{sx:{bgcolor:u,border:"1px solid ".concat(e.rewardAvailable?p:"".concat(p,"99")),borderRadius:c?"8px":"0px",p:2,display:"flex",alignItems:"center",justifyContent:"space-between",transition:"all 0.2s ease","&:hover":{transform:"translateY(-2px)",boxShadow:"0 4px 10px rgba(0,0,0,0.08)"}},children:[(0,i.jsx)(d.Z,{sx:{width:70,height:70,overflow:"hidden",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",opacity:e.rewardAvailable?1:.6,borderRadius:c?"8px":"0px"},children:e.rewardImageUrl&&""!==e.rewardImageUrl.trim()?(0,i.jsx)(R.Z,{component:"img",src:e.rewardImageUrl||"",alt:e.rewardName||"Reward image",sx:{width:"100%",height:"100%",objectFit:"cover"}}):(0,i.jsx)(d.Z,{component:"img",src:"images/icons/default_reward_icon.svg",alt:"Reward icon",sx:{width:36,height:36,filter:g?"brightness(0) invert(1)":"none"}})}),(0,i.jsxs)(d.Z,{sx:{flex:1,px:2,opacity:e.rewardAvailable?1:.6},children:[(0,i.jsx)(l.Z,{variant:"body1",sx:{fontWeight:600,mb:.3},children:e.rewardName}),e.expiryDate&&(0,i.jsxs)(l.Z,{variant:"caption",sx:{fontSize:"0.75rem",opacity:e.rewardAvailable?1:.8},children:["Exp ",null===(r=e.expiryDate)||void 0===r?void 0:r.toLocaleDateString()]})]}),(0,i.jsx)(f.Z,{variant:"contained",size:"small",disableElevation:!0,onClick:()=>s(e),sx:{bgcolor:e.rewardAvailable?h:u,color:e.rewardAvailable?m:h,fontSize:"0.75rem",fontWeight:600,px:2.5,py:.7,textTransform:"uppercase","&:hover":{bgcolor:e.rewardAvailable?h:u}},children:"View Details"})]},e.rewardId)})}):o?(0,i.jsx)(d.Z,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:t.map(e=>(0,i.jsx)(W,{reward:e,onClick:()=>s(e),locked:!e.rewardAvailable,themeColors:a,roundcorner:c},e.rewardId))}):(0,i.jsx)(d.Z,{sx:{display:"grid",gap:2,gridTemplateColumns:{sm:"repeat(3, 1fr)",md:"repeat(6, 1fr)"}},children:t.map(e=>(0,i.jsx)(A,{reward:e,onOpenModal:s,themeColors:a,roundcorner:c},e.rewardId))})]})},A=e=>{var r,t;let{reward:o,onOpenModal:n,themeColors:s,roundcorner:a}=e,{backgroundColor:c,backgroundColor2:u,buttonColor:x,buttonTextColor:h,fontColor:m,isDark:p}=s,g=!o.rewardAvailable;return(0,i.jsxs)(d.Z,{sx:{bgcolor:c,overflow:"hidden",border:"1px solid ".concat(g?"".concat(m,"99"):m),borderRadius:a?"8px":"0px",display:"flex",flexDirection:"column",transition:"all 0.2s ease","&:hover":g?{}:{transform:"translateY(-3px)",boxShadow:"0 4px 12px rgba(0,0,0,0.1)"}},children:[(0,i.jsx)(d.Z,{sx:{p:1.5,pb:0,display:"flex",alignItems:"center",justifyContent:"center",opacity:g?.6:1},children:o.rewardImageUrl&&""!==o.rewardImageUrl.trim()?(0,i.jsx)(R.Z,{component:"img",image:o.rewardImageUrl||"",alt:o.rewardName||"Reward image",sx:{width:"100%",height:"100%",objectFit:"cover",borderRadius:a?"8px":"0px"}}):(0,i.jsx)(d.Z,{component:"img",src:"images/icons/default_reward_icon.svg",alt:"Reward
1icon",sx:{width:"25px",height:"25px",alignSelf:"flex-start",marginRight:"auto",filter:p?"brightness(0) invert(1)":"none"}})}),(0,i.jsxs)(k.Z,{sx:{p:2,textAlign:"left",flexGrow:1,display:"flex",flexDirection:"column",justifyContent:"space-between",pb:"12px"},children:[(0,i.jsxs)(d.Z,{sx:{opacity:g?.6:1},children:[(0,i.jsx)(l.Z,{variant:"body2",sx:{fontWeight:600,lineHeight:1.3,minHeight:"1.3em",overflow:"hidden"},children:o.rewardName}),(null==o?void 0:o.expiryDate)&&(0,i.jsxs)(l.Z,{variant:"caption",sx:{opacity:g?1:.8,fontSize:"0.75rem",display:"block"},children:["Exp ",null==o?void 0:null===(r=o.expiryDate)||void 0===r?void 0:r.toLocaleDateString()]}),(0,i.jsxs)(l.Z,{variant:"caption",sx:{fontWeight:400,opacity:g?1:.8,display:"block",mt:.5,mb:1.5},children:[null===(t=o.pointsRequired)||void 0===t?void 0:t.toLocaleString()," pts"]})]}),(0,i.jsx)(f.Z,{variant:g?"outlined":"contained",size:"small",disableElevation:!0,onClick:()=>n(o),sx:{width:"100%",fontSize:"0.75rem",fontWeight:600,textTransform:"uppercase",borderRadius:a?"10px":"0px",py:.8,bgcolor:g?c:x,color:g?x:h,border:"1px solid ".concat(x),"&:hover":{bgcolor:g?c:x,color:g?x:h,border:"1px solid ".concat(x),opacity:g?1:.9}},children:"View Details"})]})]})},W=e=>{var r;let{reward:t,onClick:o,locked:n,themeColors:s,roundcorner:a}=e,{backgroundColor:c,backgroundColor2:u,buttonColor:x,buttonTextColor:h,fontColor:m,isDark:g}=s;return(0,i.jsxs)(d.Z,{onClick:o,sx:{display:"flex",alignItems:"center",backgroundColor:c,border:"1px solid ".concat(n?"".concat(m,"99"):m),justifyContent:"space-between",p:1.2,borderRadius:a?"20px":"0px",cursor:n?"default":"pointer","&:hover":n?{}:{transform:"translateY(-2px)",boxShadow:"0 2px 6px rgba(0,0,0,0.15)"}},children:[(0,i.jsx)(d.Z,{sx:{width:64,height:64,borderRadius:a?"20px":"0px",overflow:"hidden",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",opacity:n?.6:1},children:t.rewardImageUrl&&""!==t.rewardImageUrl.trim()?(0,i.jsx)(R.Z,{component:"img",image:t.rewardImageUrl||"",alt:t.rewardName||"Reward image",sx:{width:"100%",height:"100%",objectFit:"cover"}}):(0,i.jsx)(d.Z,{component:"img",src:"images/icons/default_reward_icon.svg",alt:"Reward icon",sx:{width:64,height:64,filter:g?"brightness(0) invert(1)":"none"}})}),(0,i.jsxs)(d.Z,{sx:{flex:1,pl:2,opacity:n?.6:1},children:[(0,i.jsx)(l.Z,{variant:"body2",sx:{fontWeight:600,lineHeight:1.3,mb:.3},children:t.rewardName}),(0,i.jsxs)(l.Z,{variant:"caption",sx:{fontSize:"0.8rem",opacity:n?1:.8},children:[null===(r=t.pointsRequired)||void 0===r?void 0:r.toLocaleString()," pts"]})]}),(0,i.jsx)(p.Z,{onClick:o,sx:{bgcolor:n?c:x,color:n?x:h,"&:hover":{bgcolor:n?c:x},width:32,height:32,flexShrink:0},children:(0,i.jsx)(M.Z,{sx:{fontSize:14}})})]})};var E=e=>{var r,t,o,s,a,c,u,x,h,m;let{redeemableRewards:p,complimentaryRewards:g=[],scheme:f,roundcorner:v}=e,[w,b]=(0,n.useState)(null),j=(0,C.Z)(),y=(0,S.Z)(j.breakpoints.down("sm")),Z=(null==f?void 0:null===(t=f.styling)||void 0===t?void 0:null===(r=t.themeColors)||void 0===r?void 0:r.backgroundColor)||"#FFFFFF",P=(null==f?void 0:null===(s=f.styling)||void 0===s?void 0:null===(o=s.themeColors)||void 0===o?void 0:o.backgroundColor2)||"#101010",I=null==f?void 0:null===(c=f.styling)||void 0===c?void 0:null===(a=c.buttonStyles)||void 0===a?void 0:a.buttonColor,T=null==f?void 0:null===(x=f.styling)||void 0===x?void 0:null===(u=x.buttonStyles)||void 0===u?void 0:u.buttonTextColor,R={backgroundColor:Z,backgroundColor2:P,buttonColor:I,buttonTextColor:T,fontColor:(null==f?void 0:null===(m=f.styling)||void 0===m?void 0:null===(h=m.themeColors)||void 0===h?void 0:h.fontColor)||"#101010",isDark:(0,N.s9)(f),secondaryColor:(0,N.s9)(f)?"rgba(255, 255, 255, 0.12)":"rgba(0, 0, 0, 0.04)"},k=e=>b(e);return p&&p.length>0||g&&g.length>0?(0,i.jsxs)(d.Z,{sx:{borderRadius:"12px",p:{xs:2,sm:3},boxShadow:0,maxWidth:"1200px",mx:"auto",my:4},children:[(0,i.jsx)(l.Z,{variant:"h5",sx:{fontWeight:600,mb:2},children:"Redeem Rewards"}),g.length>0&&(0,i.jsx)(L,{title:"Complimentary Rewards",rewards:g,isMobile:y,isComplimentary:!0,onOpenModal:k,themeColors:R,roundcorner:v}),p.length>0&&(0,i.jsx)(L,{title:"Rewards",rewards:p,isMobile:y,isComplimentary:!1,onOpenModal:k,themeColors:R,roundcorner:v}),(0,i.jsx)(O,{open:!!w,onClose:()=>b(null),reward:w,themeColors:R,roundcorner:v})]}):(0,i.jsxs)(d.Z,{sx:{borderRadius:"12px",p:{xs:4,sm:6},textAlign:"center",maxWidth:"1200px"},children:[(0,i.jsx)(d.Z,{component:"img",src:"images/icons/loyalty_no_rewards.svg",alt:"No Rewards",sx:{width:{xs:140,sm:180},height:"auto",mb:3,mx:"auto"}}),(0,i.jsx)(l.Z,{variant:"body1",sx:{fontWeight:400,fontSize:{xs:"0.95rem",sm:"1rem"},maxWidth:800,mx:"auto"},children:"No rewards available right now. Keep collecting points for future rewards!"})]})},H=e=>{let{onSwitchToLogin:r,scheme:t,roundcorner:s}
1=e,[a,c]=(0,n.useState)(null),{user:u,merchantData:x,uniqueKey:h,pointsBalance:m,redeemableRewards:p=[],complimentaryRewards:g=[],rewardsLoaded:f}=(0,o.U)();(0,n.useEffect)(()=>{if(x){var e;c((null===(e=x.merchant)||void 0===e?void 0:e.businessDba)||null)}},[x]);let v=p.map(e=>{var r,t,i,o,n;return{rewardId:null!==(r=e.rewardId)&&void 0!==r?r:"",rewardName:null!==(t=e.rewardName)&&void 0!==t?t:"Unnamed Reward",rewardDescription:null!==(i=e.rewardDescription)&&void 0!==i?i:"",pointsRequired:null!==(o=e.pointsRequired)&&void 0!==o?o:0,rewardAvailable:!!e.rewardAvailable,rewardImageUrl:null!==(n=e.rewardImageUrl)&&void 0!==n?n:"",expiryDate:e.expiryDate?new Date(e.expiryDate):null}}).sort((e,r)=>e.pointsRequired-r.pointsRequired),w=g.map(e=>{var r,t,i,o,n;return{rewardId:null!==(r=e.rewardId)&&void 0!==r?r:"",rewardName:null!==(t=e.rewardName)&&void 0!==t?t:"Unnamed Reward",rewardDescription:null!==(i=e.rewardDescription)&&void 0!==i?i:"",pointsRequired:null!==(o=e.pointsRequired)&&void 0!==o?o:0,rewardAvailable:!!e.rewardAvailable,rewardImageUrl:null!==(n=e.rewardImageUrl)&&void 0!==n?n:"",expiryDate:e.expiryDate?new Date(e.expiryDate):null}}).sort((e,r)=>e.pointsRequired-r.pointsRequired);return(0,i.jsx)(d.Z,{sx:{minHeight:"100vh",pt:"0px"},children:f?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(d.Z,{maxWidth:"1200px",margin:"0 auto",mb:4,sx:{mt:4},children:[(0,i.jsx)(l.Z,{variant:"h4",fontWeight:"600",children:"Your Loyalty Dashboard"}),(0,i.jsxs)(l.Z,{sx:{mt:1},children:["Track your rewards and enjoy exclusive member benefits at"," ",a]})]}),(0,i.jsx)(T,{pointsBalance:null!=m?m:0,redeemableRewards:v,scheme:t,roundcorner:s}),(0,i.jsx)(E,{redeemableRewards:v,complimentaryRewards:w,scheme:t,roundcorner:s})]}):(0,i.jsx)(d.Z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"60vh"},children:(0,i.jsx)(Z.Z,{})})})},F=t(62069),z=t(12713),D=t(85860),U=t(11953),q=t(20816),B=t(71096),_=t.n(B),G=t(87925),Y=t(18620),V=t(83257);let K=async(e,r,t)=>{let i="".concat(V.P0,"/").concat(e,"/member/account-info"),o=await fetch(i,{method:"PUT",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(localStorage.getItem("accessToken"))},body:JSON.stringify(r)});return 401===o.status?{result:{status:o.status.toString(),hasNewAccessToken:!1},errorMessage:"Unauthorized",success:!1,innerException:"",stackTrace:""}:await o.json()},$=async(e,r,t)=>{let i="".concat(V.P0,"/").concat(e,"/member/update-password"),o=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(localStorage.getItem("accessToken"))},body:JSON.stringify(r)});return 401===o.status?{result:!1,errorMessage:"Unauthorized",success:!1,innerException:"",stackTrace:""}:await o.json()};var J=t(99376),Q=t(56982);let X=[{fieldName:"customerFirstName",fieldLabel:"First Name",fieldType:"text",isRequired:!0,isVisible:!0},{fieldName:"customerLastName",fieldLabel:"Last Name",fieldType:"text",isRequired:!0,isVisible:!0},{fieldName:"customerEmail",fieldLabel:"Email Address",fieldType:"email",isRequired:!0,isVisible:!0},{fieldName:"customerPhone",fieldLabel:"Phone Number",fieldType:"tel",isRequired:!1,isVisible:!0},{fieldName:"customerPassword",fieldLabel:"Password",fieldType:"password",isRequired:!0,isVisible:!0}];var ee=e=>{var r,t,s,a,c;let{user:u,scheme:x}=e,[w,j]=n.useState({customerFirstName:(null==u?void 0:u.customerFirstName)||"",customerLastName:(null==u?void 0:u.customerLastName)||"",customerEmail:(null==u?void 0:u.customerEmail)||"",customerPhone:(null==u?void 0:u.customerPhone)||"",customerBirthdate:(null==u?void 0:u.customerBirthdate)||null,customerPassword:"",promotionOptIn:null!==(c=null==u?void 0:u.promotionOptIn)&&void 0!==c&&c}),[y,C]=n.useState({}
1),[S,P]=(0,n.useState)(!1),[I,T]=(0,n.useState)(!1),[R,k]=(0,n.useState)(!1),{showNotification:M}=(0,G.l)(),{merchantData:O,updateAuth:L,updateUser:A}=(0,o.U)(),W=(0,J.useRouter)(),E=e=>{let{name:r,value:t}=e.target;j(e=>({...e,[r]:t})),"customerPassword"!==r&&b(!0),y[r]&&C(e=>{let t={...e};return delete t[r],t})},H=e=>{let{name:r,value:t}=e.target,i=X.find(e=>e.fieldName===r);if(!i)return;let o=(0,Y.OP)(i,t,w);C(e=>({...e,[r]:o}))},B=(e,r,t)=>{j(r=>({...r,[e]:(null==t?void 0:t.numberValue)||""})),b(!0),y[e]&&C(r=>{let t={...r};return delete t[e],t})},V=()=>{let e={};return X.forEach(r=>{if("customerPassword"===r.fieldName)return;let t=w[r.fieldName],i=(0,Y.OP)(r,t,w);i&&(e[r.fieldName]=i)}),C(e),0===Object.keys(e).length},$=async()=>{if(!w.customerPassword.trim()){C(e=>({...e,customerPassword:"Password is required"}));return}P(!0);try{let e=await K((null==O?void 0:O.merchantIdentifier)||"",w,W);if(null==e?void 0:e.success){b(!1),M("Personal information saved successfully!","success");let r={...u};A(e.result.member||r),j(e=>({...e,customerPassword:""})),T(!1),e.result.hasNewAccessToken&&e.result.accessToken&&await L(e.result)}else M((null==e?void 0:e.errorMessage)||"Failed to save personal information.","error")}catch(e){M("Failed to save personal information.","error")}finally{P(!1)}},ee=null==x?void 0:null===(t=x.styling)||void 0===t?void 0:null===(r=t.themeColors)||void 0===r?void 0:r.backgroundColor,er=null==x?void 0:null===(a=x.styling)||void 0===a?void 0:null===(s=a.themeColors)||void 0===s?void 0:s.fontColor,et=(0,N.s9)(x)?"rgba(255, 255, 255, 0.24)":"rgba(0, 0, 0, 0.16)",ei={"& .MuiOutlinedInput-root":{borderRadius:"4px","& fieldset":{borderColor:et},"&:hover fieldset":{borderColor:et},"&.Mui-focused fieldset":{borderColor:et},"&.Mui-disabled":{"& fieldset":{borderColor:et},"& .MuiOutlinedInput-notchedOutline":{borderColor:et}},"& .MuiInputLabel-root.Mui-disabled":{opacity:.7},"& .MuiInputBase-input":{border:"none","&.Mui-disabled":{WebkitTextFillColor:er,opacity:.7,border:"none"}}}};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(d.Z,{sx:{p:0},children:[(0,i.jsx)(l.Z,{variant:"h3",sx:{fontWeight:600,mt:2,mb:4},children:"Personal Information"}),(0,i.jsxs)(F.ZP,{container:!0,spacing:2,children:[(0,i.jsx)(F.ZP,{xs:12,children:(0,i.jsx)(z.Z,{fullWidth:!0,required:!0,name:"customerFirstName",label:"First Name",value:w.customerFirstName,onChange:E,onBlur:H,error:!!y.customerFirstName,helperText:y.customerFirstName||"",sx:{...ei,"& .MuiInputLabel-asterisk":{color:"red"}}})}),(0,i.jsx)(F.ZP,{xs:12,children:(0,i.jsx)(z.Z,{fullWidth:!0,required:!0,name:"customerLastName",label:"Last Name",value:w.customerLastName,onChange:E,onBlur:H,error:!!y.customerLastName,helperText:y.customerLastName||"",sx:{...ei,"& .MuiInputLabel-asterisk":{color:"red"}}})}),(0,i.jsx)(F.ZP,{xs:12,children:(0,i.jsx)(z.Z,{fullWidth:!0,name:"customerEmail",label:"Email Address",value:w.customerEmail,disabled:!0,helperText:"This email is linked to your account and cannot be changed",FormHelperTextProps:{sx:{backgroundColor:ee,color:er}},sx:{...ei,"& .MuiFormHelperText-root":{pl:2,backgroundColor:ee,WebkitTextFillColor:er,opacity:.7}}})}),(0,i.jsx)(F.ZP,{xs:12,children:(0,i.jsx)(Q.Kr,{fullWidth:!0,name:"customerPhone",label:"Phone Number",value:w.customerPhone,onChange:(e,r)=>B("customerPhone",e,r),onBlur:()=>{let e=(0,Y.yN)("customerPhone",w.customerPhone,w,X);C(r=>({...r,customerPhone:e}))},error:!!y.customerPhone,helperText:y.customerPhone||"",preferredCountries:["US","CA"],defaultCountry:"US",sx:ei,inputProps:{autoComplete:"customerPhone",id:"customerPhone",type:"tel",maxLength:30}})}),(0,i.jsx)(F.ZP,{xs:12,children:(0,i.jsx)(q.M,{sx:{width:"100%",...ei},label:"Birthday",value:w.customerBirthdate?_()(w.customerBirthdate):null,onChange:e=>{j(r=>({...r,customerBirthdate:e?null==e?void 0:e.format("YYYY-MM-DD"):""})),b(!0)}})}),(0,i.jsx)(F.ZP,{xs:12,children:(0,i.jsx)(D.Z,{control:(0,i.jsx)(U.Z,{name:"promotionOptIn",checked:w.promotionOptIn,onChange:e=>{j(r=>({...r,promotionOptIn:e.target.checked})),b(!0)}}),label:(0,i.jsx)(l.Z,{variant:"body2",mt:2,children:"I would like to be contacted in the future regarding loyalty related promotions and/or other special offers via email"})})}),(0,i.jsx)(F.ZP,{xs:12,children:(0,i.jsx)(f.Z,{variant:"contained",sx:{borderRadius:"5px",fontWeight:600,textTransform:"uppercase",boxShadow:"none",px:2,height:"44px",mt:3,"&:hover":{boxShadow:"none"}},onClick:()=>{V()&&T(!0)},children:"Save Changes"})})]})]}),(0,i.jsxs)(h.Z,{open:I,onClose:()=>T(!1),PaperProps:{sx:{backgroundColor:ee,width:380,borderRadius:"8px",border:"1px solid #E0E0E0",p:2}},children:[(0,i.jsxs)(m.Z,{sx:{fontWeight:400,fontSize:"1.15rem",p:"0px 16px 12px 16px",m:"0 -16px",mb:3,display:"flex",alignItems:"center",justifyContent:"space-between",borderBottom:"1px solid #E5E5E5",pb:1.5},children:["Confirm",(0,i.jsx)(p.Z,{sx:{position:"absolute",right:8,top:8,backgroundColor:ee},onClick:()=>T(!1),children:(0,i.jsx)(v.Z,{})})]}),(0,i.jsxs)(g.Z,{sx:{p:0},children:[(0,i.jsx)(l.Z,{sx:{textAlign:"center",mb:2},children:"Enter password to save changes"}),(0,i.jsx)(z.Z,{fullWidth:!0,label:"Password",type:R?"text":"password",value:w.customerPassword,onChange:E,name:"customerPassword",error:!!y.customerPassword,helperText:y.customerPassword||"",sx:ei}),(0,i.jsxs)(d.Z,{mt:3,display:"flex",gap:2,children:[(0,i.jsx)(f.Z,{variant:"contained",fullWidth:!0,sx:{borderRadius:"4px",textTransform:"uppercase"},onClick:()=>T(!1),children:"Cancel"}),(0,i.jsx)(f.Z,{variant:"contained",fullWidth:!0,disabled:S,sx:{borderRadius:"4px",textTransform:"uppercase"},onClick:$,children:S?(0,i.jsx)(Z.Z,{size:24,color:"inherit"}):" Save Changes "})]})]})]})]})},er=e=>{let{scheme:r}=e,{user:t}=(0,o.U)();return(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(F.ZP,{container:!0,children:(0,i.jsx)(F.ZP,{xs:12,sm:6,children:(0,i.jsx)(ee,{user:t,scheme:r})})})})},et=t(23996),ei=t(64567),eo=t(84523),en=t(29539);
1let es=[{fieldName:"currentPassword",fieldLabel:"Current Password",fieldType:"password",isRequired:!0,isVisible:!0},{fieldName:"password",fieldLabel:"New Password",fieldType:"password",isRequired:!0,isVisible:!0},{fieldName:"confirmPassword",fieldLabel:"Confirm New Password",fieldType:"password",isRequired:!0,isVisible:!0}];var el=e=>{let{scheme:r}=e,[t,s]=n.useState({currentPassword:"",password:"",confirmPassword:""}),[a,c]=(0,n.useState)({currentPassword:!1,password:!1,confirmPassword:!1}),[u,x]=n.useState({}),{showNotification:h}=(0,G.l)(),[m,g]=(0,n.useState)(!1),{merchantData:w}=(0,o.U)(),j=(0,J.useRouter)(),y=e=>{c(r=>({...r,[e]:!r[e]}))},C=t.password||"",S={minLength:C.length>=8,special:/[^A-Za-z0-9]/.test(C),number:/\d/.test(C),lower:/[a-z]/.test(C),upper:/[A-Z]/.test(C)},P=Object.values(S).every(Boolean),I=()=>{let e={};es.forEach(r=>{let i=t[r.fieldName],o=(0,Y.OP)(r,i,t);o&&(e[r.fieldName]=o)});let r=(0,Y.ph)(t.password,t.confirmPassword);return r&&(e.confirmPassword=r),x(e),0===Object.keys(e).length},T=e=>{let{name:r,value:t}=e.target;s(e=>({...e,[r]:t})),b(!0),x(e=>{if(!e[r])return e;let{[r]:t,...i}=e;return i})},R=e=>{let{name:r,value:i}=e.target,o=es.find(e=>e.fieldName===r);if(!o)return;let n=(0,Y.OP)(o,i,t);if("password"===r||"confirmPassword"===r){let e=(0,Y.ph)(t.password,t.confirmPassword);e&&("confirmPassword"===r?n=e:n||(n=""),x(r=>({...r,confirmPassword:e})))}x(e=>({...e,[r]:n}))},k=async()=>{if(I()){g(!0);try{let r=await $((null==w?void 0:w.merchantIdentifier)||"",t,j);if(r&&r.success)b(!1),h("Password updated successfully!","success"),s({currentPassword:"",password:"",confirmPassword:""}),x({});else{var e;let t=(null==r?void 0:null===(e=r.errorMessage)||void 0===e?void 0:e.toLowerCase())||"";(t.includes("invalid customer login")||t.includes("invalid")||t.includes("150"))&&x(e=>({...e,currentPassword:"Incorrect password. Try again."})),h("Failed to update password: "+((null==r?void 0:r.errorMessage)||"Unknown error"),"error")}}catch(e){h("Failed to update password: "+e.message,"error")}finally{g(!1)}}},M=(e,r)=>(0,i.jsxs)(d.Z,{sx:{display:"flex",alignItems:"center",mb:.5},children:[e?(0,i.jsx)(ei.Z,{sx:{fontSize:18,mr:1,color:"#0F9D58"}}):(0,i.jsx)(v.Z,{sx:{fontSize:18,mr:1,color:"#D93025"}}),(0,i.jsx)(l.Z,{variant:"body2",children:r})]},r),O=(0,N.s9)(r)?"rgba(255, 255, 255, 0.24)":"rgba(0, 0, 0, 0.16)",L={"& .MuiOutlinedInput-root":{borderRadius:"4px","& fieldset":{borderColor:O},"&:hover fieldset":{borderColor:O},"&.Mui-focused fieldset":{borderColor:O}}};return(0,i.jsxs)(d.Z,{sx:{p:0},children:[(0,i.jsx)(l.Z,{variant:"h3",sx:{fontWeight:600,mt:2,mb:4},children:"Account Security"}),(0,i.jsxs)(F.ZP,{container:!0,spacing:2,children:[(0,i.jsx)(F.ZP,{xs:12,children:(0,i.jsx)(z.Z,{fullWidth:!0,name:"currentPassword",label:"Current Password",type:a.currentPassword?"text":"password",value:t.currentPassword,onChange:T,onBlur:R,error:!!u.currentPassword,helperText:u.currentPassword||"",InputProps:{endAdornment:(0,i.jsx)(et.Z,{position:"end",children:(0,i.jsx)(p.Z,{tabIndex:-1,onClick:()=>y("currentPassword"),sx:{color:u.currentPassword?"#d32f2f":"#777"},children:a.currentPassword?(0,i.jsx)(eo.Z,{fontSize:"small"}):(0,i.jsx)(en.Z,{fontSize:"small"})})})},sx:L})}),(0,i.jsx)(F.ZP,{xs:12,children:(0,i.jsx)(z.Z,{fullWidth:!0,name:"password",label:"New Password",type:a.password?"text":"password",value:t.password,onChange:T,onBlur:R,error:!!u.password,helperText:u.password||"",InputProps:{endAdornment:(0,i.jsx)(et.Z,{position:"end",children:(0,i.jsx)(p.Z,{tabIndex:-1,onClick:()=>y("password"),sx:{color:u.password?"#d32f2f":"#777"},children:a.password?(0,i.jsx)(eo.Z,{fontSize:"small"}):(0,i.jsx)(en.Z,{fontSize:"small"})})})},sx:L})}),(0,i.jsx)(F.ZP,{xs:12,children:(0,i.jsx)(z.Z,{fullWidth:!0,name:"confirmPassword",label:"Confirm New Password",type:a.confirmPassword?"text":"password",value:t.confirmPassword,onChange:T,onBlur:R,error:!!u.confirmPassword,helperText:u.confirmPassword||"",InputProps:{endAdornment:(0,i.jsx)(et.Z,{position:"end",children:(0,i.jsx)(p.Z,{tabIndex:-1,onClick:()=>y("confirmPassword"),sx:{color:u.confirmPassword?"#d32f2f":"#777"},children:a.confirmPassword?(0,i.jsx)(eo.Z,{fontSize:"small"}):(0,i.jsx)(en.Z,{fontSize:"small"})})})},sx:L})}),(0,i.jsx)(F.ZP,{xs:12,children:(0,i.jsxs)(d.Z,{sx:{mt:1},children:[(0,i.jsx)(l.Z,{variant:"body2",sx:{fontWeight:600,mb:1},children:"Your password must contain"}),M(S.minLength,"Minimum 8 characters in length"),M(S.special,"One special character (example: #&!?)"),M(S.number,"One number"),M(S.lower,"One lower case letter"),M(S.up
1per,"One upper case letter")]})}),(0,i.jsx)(F.ZP,{xs:12,children:(0,i.jsx)(f.Z,{variant:"contained",disabled:!!Object.values(u).some(e=>!!e)||es.some(e=>e.isRequired&&(!t[e.fieldName]||""===String(t[e.fieldName]).trim()))||!P||m,sx:{borderRadius:"5px",fontWeight:600,textTransform:"uppercase",boxShadow:"none",height:"44px",mt:3,"&:hover":{boxShadow:"none"},minWidth:"150px"},onClick:k,children:m?(0,i.jsx)(Z.Z,{size:24,color:"inherit"}):" Save Changes "})})]})]})},ea=e=>{let{scheme:r}=e;return(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(F.ZP,{container:!0,children:(0,i.jsx)(F.ZP,{xs:12,sm:6,children:(0,i.jsx)(el,{scheme:r})})})})},ed=e=>{let{onSwitchToLogin:r,section:t,scheme:n,roundcorner:s,theme:l}=e,{dashboardActiveTab:a,setDashboardActiveTab:c}=(0,o.U)();return(0,i.jsx)(d.Z,{children:(0,i.jsx)(d.Z,{sx:{maxWidth:"1200px",margin:"0 auto"},children:(0,i.jsxs)(d.Z,{sx:{padding:{xs:"16px",sm:"0px"}},children:[(0,i.jsx)(y,{currentTab:null!=a?a:"",onSwitchToOverview:()=>c("overview"),onSwitchToAccountSettings:()=>c("account-settings"),onSwitchToSecuritySettings:()=>c("security-settings"),scheme:n}),"overview"===a&&(0,i.jsx)(H,{onSwitchToLogin:r,section:t,scheme:n,roundcorner:s}),"account-settings"===a&&(0,i.jsx)(er,{scheme:n}),"security-settings"===a&&(0,i.jsx)(ea,{scheme:n})]})})})},ec=t(3853);let eu=e=>{var r;let{section:t,editorMode:c,data:u,scheme:x,roundcorner:h,theme:m}=e,p=null==u?void 0:null===(r=u.shopProfile)||void 0===r?void 0:r.loyaltyUniqueKey,{isLoggedIn:g,user:f,getUserInfo:v,setMerchantData:w}=(0,o.U)(),[b,j]=(0,n.useState)(!0),[y,Z]=(0,n.useState)(!1),[C,S]=(0,n.useState)(null),P=(0,J.useRouter)();return((0,n.useEffect)(()=>{if(y||!p)return;let e=!1;return j(!0),(async()=>{try{let r=(0,ec.o)(p).then(r=>{e||S(r),r&&r.result&&w(r.result)}),t=v(p).then(e=>{e?P.push("/loyalty-dashboard"):P.push("/loyalty")});await Promise.all([r,t])}catch(e){}finally{e||(j(!1),Z(!0))}})(),()=>{e=!0}},[]),b)?(0,i.jsx)(s.Z,{alignItems:"center",justifyContent:"center",minHeight:300,children:(0,i.jsx)(l.Z,{variant:"h6",children:"Loading..."})}):(0,i.jsx)(s.Z,{id:"GivexLoyaltyDashboard-"+(null==t?void 0:t.position),className:"scroll-to",paddingBottom:16,paddingTop:0,sx:{opacity:(null==t?void 0:t.visible)?"1":"0.2",pointerEvents:c?"none":"auto"},children:(0,i.jsx)(a.Z,{children:(0,i.jsx)(s.Z,{gap:8,sx:{flexDirection:{xs:"column",alignContent:"center",alignItems:"center"}},children:(0,i.jsx)(d.Z,{sx:{width:{xs:"100%",maxWidth:"100%"}},children:(0,i.jsx)(ed,{onSwitchToLogin:()=>P.push("/loyalty"),section:t,scheme:x,roundcorner:h,theme:m})})})})})}},33233:function(e,r,t){t.d(r,{HighlightSectionImages:function(){return l}});var i=t(57437),o=t(63832),n=t(8461),s=t(84498);let l=e=>{var r,t,l,a,d,c,u,x;let{images:h,title:m}=e;if(!h||!h[0]||!h[1])return;let p=h[0].hidden||!h[0].url,g=h[1].hidden||!h[1].url;if(!p||!g)return p||g?(0,i.jsx)(o.Z,{sx:{width:{xs:"100%",md:"50%"},display:"grid"},children:(0,i.jsx)(o.Z,{component:"img",src:p?(null===(d=h[1])||void 0===d?void 0:d.croppedImageUrl)||(0,n.g)(null===(c=h[1])||void 0===c?void 0:c.url):(null===(u=h[0])||void 0===u?void 0:u.croppedImageUrl)||(0,n.g)(null===(x=h[0])||void 0===x?void 0:x.url),alt:m||"",sx:{objectFit:"cover",aspectRatio:s.s.COMMON.HIGHLIGHT_SECTION,width:"90%",justifySelf:"center",zIndex:1}})}):(0,i.jsxs)(o.Z,{sx:{width:{xs:"100%",md:"50%"},display:"grid",gridTemplateColumns:"1fr",gridTemplateRows:"1fr"},children:[(0,i.jsx)(o.Z,{component:"img",src:(null===(r=h[0])||void 0===r?void 0:r.croppedImageUrl)||(0,n.g)(null===(t=h[0])||void 0===t?void 0:t.url),alt:m||"",sx:{objectFit:"cover",aspectRatio:s.s.COMMON.HIGHLIGHT_SECTION,width:"80%",gridColumn:"1 / 2",gridRow:"1 / 2",alignSelf:"start",justifySelf:"start",zIndex:1}}),(0,i.jsx)(o.Z,{component:"img",src:(null===(l=h[1])||void 0===l?void 0:l.croppedImageUrl)||(0,n.g)(null===(a=h[1])||void 0===a?void 0:a.url),alt:m||"",sx:{objectFit:"cover",aspectRatio:s.s.COMMON.HIGHLIGHT_SECTION_2,width:"65%",gridColumn:"1 / 2",gridRow:"1 / 2",alignSelf:"end",justifySelf:"end",zIndex:2,marginTop:"175px"}})]})}},50746:function(e,r,t){t.d(r,{HighlightSectionImages:function(){return a}});var i=t(57437),o=t(63832),n=t(8461),s=t(84498);let l=e=>(0,i.jsx)("svg",{viewBox:"0 0 171 188",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{d:"M53.2885 81.3179C53.2706 81.9472 53.5333 82.1113 54.0768 81.8104C57.8899 79.7266 61.6716 77.4809 65.4219 75.0734C77.0006 67.6365 89.3114 61.8365 102.354 57.6735C108.317 55.7652 117.243 53.9391 121.191 60.
1122C126.123 67.8439 120.524 78.5752 116.462 86.5023C110.308 98.5081 104.333 110.769 98.5344 123.286C98.4562 123.455 98.4118 123.638 98.4038 123.825C98.3957 124.011 98.4241 124.198 98.4874 124.373C98.5506 124.549 98.6475 124.71 98.7723 124.847C98.8972 124.984 99.0476 125.095 99.2148 125.173C100.944 125.98 102.871 126.687 104.995 127.294C125.584 133.171 145.606 140.613 165.063 149.618C167.358 150.68 169.001 152.301 169.994 154.481C174.542 164.487 152.815 168.338 146.926 169.603C136.444 171.847 125.57 176.874 115.828 181.682C112.783 183.187 101.734 190.608 99.1138 186.066C99.0577 185.969 99.0259 185.86 99.0212 185.748C99.0165 185.636 99.039 185.524 99.0868 185.423C101.263 180.677 104.672 178.194 109.233 175.253C119.505 168.632 129.123 163.115 138.087 158.701C139.293 158.106 140.385 157.326 141.544 156.649C141.63 156.598 141.701 156.523 141.748 156.433C141.794 156.343 141.815 156.241 141.807 156.14C141.8 156.038 141.764 155.941 141.704 155.859C141.644 155.778 141.563 155.715 141.469 155.678C126.693 149.892 111.615 144.985 96.2371 140.959C90.0323 139.338 81.6447 135.645 83.2952 127.512C84.7909 120.126 88.1055 113.396 91.4807 106.741C97.1848 95.4781 103.003 84.2795 108.936 73.1446C109.28 72.5017 109.327 71.5305 109.644 70.867C109.688 70.7731 109.704 70.6681 109.69 70.565C109.677 70.4618 109.633 70.365 109.566 70.2865C109.499 70.208 109.41 70.1512 109.312 70.1231C109.213 70.095 109.108 70.0968 109.01 70.1284C104.178 71.6787 99.5652 73.6371 95.1726 76.0036C84.6135 81.6895 74.3867 87.9432 64.4922 94.7645C59.9447 97.8971 52.0961 103.259 46.949 102.753C41.2899 102.199 38.1235 96.5428 37.9349 91.2969C37.7866 86.9834 38.0696 82.695 38.7837 78.4316C41.7345 60.7855 45.1098 43.536 47.5351 25.5616C47.6654 24.595 47.3487 24.408 46.5852 25.0008C46.0822 25.3883 45.4466 26.0404 44.6786 26.9569C34.0431 39.6238 24.234 52.92 15.2513 66.8454C13.5805 69.4353 11.7143 71.8702 9.65282 74.15C5.38828 78.8557 -0.371878 73.425 0.0188698 68.4937C0.400635 63.6741 2.13205 58.8271 5.21312 53.9527C16.0058 36.8903 28.4469 21.1934 42.5362 6.86219C47.3397 1.97873 50.1019 -0.928097 56.6301 0.26883C60.5443 0.986987 61.2248 3.68862 61.3932 7.49143C61.6447 13.1592 61.5167 18.567 61.0092 23.7149C59.3653 40.3762 56.3067 58.3506 53.814 75.7026C53.5221 77.718 53.3469 79.5898 53.2885 81.3179Z",fill:e.fillColor})}),a=e=>{var r,t,a,d,c,u,x,h;let{images:m,title:p,fillColor:g}=e;if(!m||!m[0]||!m[1])return;let f=m[0].hidden||!m[0].url,v=m[1].hidden||!m[1].url;if(!f||!v)return f||v?(0,i.jsxs)(o.Z,{sx:{width:{xs:"100%",md:"50%"},display:"grid"},children:[(0,i.jsx)(o.Z,{position:"relative",sx:{width:"20%",top:"20%",left:"-7%",transform:"rotate(-70deg)",zIndex:100},children:(0,i.jsx)(l,{fillColor:g})}),(0,i.jsx)(o.Z,{component:"img",src:f?(null===(c=m[1])||void 0===c?void 0:c.croppedImageUrl)||(0,n.g)(null===(u=m[1])||void 0===u?void 0:u.url):(null===(x=m[0])||void 0===x?void 0:x.croppedImageUrl)||(0,n.g)(null===(h=m[0])||void 0===h?void 0:h.url),alt:p||"",sx:{objectFit:"cover",aspectRatio:s.s.COMMON.HIGHLIGHT_SECTION,width:"90%",justifySelf:"center",zIndex:1,borderRadius:"20px"}})]}):(0,i.jsxs)(o.Z,{sx:{width:{xs:"100%",md:"50%"},paddingTop:"10%",display:"grid",gridTemplateColumns:"1fr",gridTemplateRows:"1fr"},children:[(0,i.jsx)(o.Z,{sx:{position:"relative",top:"-15%",left:"-10%",width:"20%",gridColumn:"1 / 2",gridRow:"1 / 2",alignSelf:"start",justifySelf:"start",transform:"rotate(-70deg)",zIndex:100},children:(0,i.jsx)(l,{fillColor:g})}),(0,i.jsx)(o.Z,{component:"img",src:(null===(r=m[0])||void 0===r?void 0:r.croppedImageUrl)||(0,n.g)(null===(t=m[0])||void 0===t?void 0:t.url),alt:p||"",sx:{objectFit:"cover",aspectRatio:s.s.COMMON.HIGHLIGHT_SECTION,width:"80%",gridColumn:"1 / 2",gridRow:"1 / 2",alignSelf:"start",justifySelf:"start",zIndex:1,borderRadius:"20px"}}),(0,i.jsx)(o.Z,{component:"img",src:(null===(a=m[1])||void 0===a?void 0:a.croppedImageUrl)||(0,n.g)(null===(d=m[1])||void 0===d?void 0:d.url),alt:p||"",sx:{objectFit:"cover",aspectRatio:s.s.COMMON.HIGHLIGHT_SECTION_2,width:"65%",gridColumn:"1 / 2",gridRow:"1 / 2",alignSelf:"end",justifySelf:"end",zIndex:2,marginTop:"175px",borderRadius:"20px"}})]})}},62699:function(e,r,t){t.d(r,{HighlightSectionImages:function(){return l}});var i=t(57437),o=t(63832),n=t(8461),s=t(84498);let l=e=>{var r,t,l,a,d,c,u,x;let{images:h,title:m}=e;if(!h||!h[0]||!h[1])return;let p=h[0].hidden||!h[0].url,g=h[1].hidden||!h[1].url;
1if(!p||!g)return p||g?(0,i.jsx)(o.Z,{sx:{width:{xs:"100%",md:"50%"},display:"grid"},children:(0,i.jsx)(o.Z,{component:"img",src:p?(null===(d=h[1])||void 0===d?void 0:d.croppedImageUrl)||(0,n.g)(null===(c=h[1])||void 0===c?void 0:c.url):(null===(u=h[0])||void 0===u?void 0:u.croppedImageUrl)||(0,n.g)(null===(x=h[0])||void 0===x?void 0:x.url),alt:m||"",sx:{objectFit:"cover",aspectRatio:s.s.COMMON.HIGHLIGHT_SECTION,width:"90%",justifySelf:"center",zIndex:1,borderRadius:"20px"}})}):(0,i.jsxs)(o.Z,{sx:{width:{xs:"100%",md:"50%"},display:"grid",gridTemplateColumns:"1fr",gridTemplateRows:"1fr"},children:[(0,i.jsx)(o.Z,{component:"img",src:(null===(r=h[0])||void 0===r?void 0:r.croppedImageUrl)||(0,n.g)(null===(t=h[0])||void 0===t?void 0:t.url),alt:m||"",sx:{objectFit:"cover",aspectRatio:s.s.COMMON.HIGHLIGHT_SECTION,width:"80%",gridColumn:"1 / 2",gridRow:"1 / 2",alignSelf:"start",justifySelf:"start",zIndex:1,borderRadius:"20px"}}),(0,i.jsx)(o.Z,{component:"img",src:(null===(l=h[1])||void 0===l?void 0:l.croppedImageUrl)||(0,n.g)(null===(a=h[1])||void 0===a?void 0:a.url),alt:m||"",sx:{objectFit:"cover",aspectRatio:s.s.COMMON.HIGHLIGHT_SECTION_2,width:"65%",gridColumn:"1 / 2",gridRow:"1 / 2",alignSelf:"end",justifySelf:"end",zIndex:2,marginTop:"175px",borderRadius:"20px"}})]})}},20625:function(e,r,t){t.d(r,{HighlightSectionImages:function(){return l}});var i=t(57437),o=t(63832),n=t(8461),s=t(84498);let l=e=>{var r,t,l,a,d,c,u,x;let{images:h,title:m}=e;if(!h||!h[0]||!h[1])return;let p=h[0].hidden||!h[0].url,g=h[1].hidden||!h[1].url;if(!p||!g)return p||g?(0,i.jsx)(o.Z,{sx:{width:{xs:"100%",md:"50%"},display:"grid"},children:(0,i.jsx)(o.Z,{component:"img",src:p?(null===(d=h[1])||void 0===d?void 0:d.croppedImageUrl)||(0,n.g)(null===(c=h[1])||void 0===c?void 0:c.url):(null===(u=h[0])||void 0===u?void 0:u.croppedImageUrl)||(0,n.g)(null===(x=h[0])||void 0===x?void 0:x.url),alt:m||"",sx:{objectFit:"cover",aspectRatio:s.s.COMMON.HIGHLIGHT_SECTION,width:"90%",justifySelf:"center",zIndex:1,borderRadius:"0px 300px 0px 0px"}})}):(0,i.jsxs)(o.Z,{sx:{width:{xs:"100%",md:"50%"},display:"grid",gridTemplateColumns:"1fr",gridTemplateRows:"1fr"},children:[(0,i.jsx)(o.Z,{component:"img",src:(null===(r=h[0])||void 0===r?void 0:r.croppedImageUrl)||(0,n.g)(null===(t=h[0])||void 0===t?void 0:t.url),alt:m||"",sx:{objectFit:"cover",aspectRatio:s.s.COMMON.HIGHLIGHT_SECTION,width:"80%",gridColumn:"1 / 2",gridRow:"1 / 2",alignSelf:"start",justifySelf:"end",zIndex:1,borderRadius:"0px 300px 0px 0px"}}),(0,i.jsx)(o.Z,{component:"img",src:(null===(l=h[1])||void 0===l?void 0:l.croppedImageUrl)||(0,n.g)(null===(a=h[1])||void 0===a?void 0:a.url),alt:m||"",sx:{objectFit:"cover",aspectRatio:s.s.COMMON.HIGHLIGHT_SECTION_2,width:"65%",gridColumn:"1 / 2",gridRow:"1 / 2",alignSelf:"end",justifySelf:"start",zIndex:2,marginTop:"250px",marginLeft:"30px",borderRadius:"200px 0px 0px 0px"}})]})}},3853:function(e,r,t){t.d(r,{o:function(){return d}});var i=t(28097),o=t.n(i),n=t(83257),s=t(69424),l=t(40257);let a=new(o());async function d(e){let r=await fetch("".concat(n.P0,"/").concat(e,"/register"),{method:"GET",headers:{"Content-Type":"application/json"}}),t=await r.json();if(!r.ok||!t.success)throw console.warn("Error fetching loyalty response:",t),Error("Error fetching loyalty response: ".concat(t));return a.set(s.Gg+e,t,l.env.LOYALTY_RESPONSE_CACHE_TTL||s.iy),t}},18620:function(e,r,t){function i(e,r){return e&&r&&e!==r?"Passwords do not match.":""}t.d(r,{BV:function(){return o},OP:function(){return n},ph:function(){return i},yN:function(){return s}}),t(40257);let o=/^(?=.*[0-9])(?=.*[^A-Za-z0-9]).{8,}$/;function n(e,r,t){return e.isRequired&&(null==r||"string"==typeof r&&""===r.trim())?"".concat(e.fieldLabel||e.fieldName," is required."):"email"!==e.fieldType||"string"!=typeof r||""===r.trim()||/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r)?"confirmPassword"===e.fieldName&&t.password!==r?"Passwords do not match.":"confirmEmail"===e.fieldName&&t.email!==r?"Emails do not match.":"confirmEmail"===e.fieldName&&r&&!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r)?"Please enter a valid email address.":"tel"!==e.fieldType||"string"!=typeof r||""===r.trim()||/^\+[1-9]\d{0,14}$/.test(r)?("firstName"===e.fieldName||"lastName"===e.fieldName||"customerFirstName"===e.fieldName||"customerLastName"===e.fieldName)&&"string"==typeof r&&""!==r.trim()?/^[a-zA-Z\s'-]+$/.test(r)?"":"Name must not contain special symbols.":"":"Please enter a valid phone number":"Please enter a valid email address."}function s(e,r,t,i){let o=i.find(r=>r.fieldName===e);return o?n(o,r,t):""}}}]);
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.